diff --git a/browser/account-transfers.module-SVGMDSDT.js b/browser/account-transfers.module-ITK72AO6.js similarity index 99% rename from browser/account-transfers.module-SVGMDSDT.js rename to browser/account-transfers.module-ITK72AO6.js index 1ee791d1e..22d2a3558 100644 --- a/browser/account-transfers.module-SVGMDSDT.js +++ b/browser/account-transfers.module-ITK72AO6.js @@ -1 +1 @@ -import{a as B}from"./chunk-NXQKTE5C.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-7FEQNMCH.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-D3FYZXVS.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-AN3QH62E.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-7FEQNMCH.js b/browser/chunk-AN3QH62E.js similarity index 99% rename from browser/chunk-7FEQNMCH.js rename to browser/chunk-AN3QH62E.js index 64b7a47ec..8db84a8f2 100644 --- a/browser/chunk-7FEQNMCH.js +++ b/browser/chunk-AN3QH62E.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:"251214",hash:"6ef7306"},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)}transform(e,n,o="labels"){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:!0})}}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:"251214",hash:"7fad7ee"},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)}transform(e,n,o="labels"){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:!0})}}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} diff --git a/browser/chunk-NXQKTE5C.js b/browser/chunk-D3FYZXVS.js similarity index 97% rename from browser/chunk-NXQKTE5C.js rename to browser/chunk-D3FYZXVS.js index f2b14b55a..dfe1b2ef3 100644 --- a/browser/chunk-NXQKTE5C.js +++ b/browser/chunk-D3FYZXVS.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-7FEQNMCH.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-AN3QH62E.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-74XF6YAH.js b/browser/chunk-DZANW5MK.js similarity index 91% rename from browser/chunk-74XF6YAH.js rename to browser/chunk-DZANW5MK.js index a7f8dc161..51fe6ec6b 100644 --- a/browser/chunk-74XF6YAH.js +++ b/browser/chunk-DZANW5MK.js @@ -1 +1 @@ -import{G as r,K as i,fg as n}from"./chunk-7FEQNMCH.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-AN3QH62E.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-PLYSABD6.js b/browser/chunk-HSUNFZWO.js similarity index 99% rename from browser/chunk-PLYSABD6.js rename to browser/chunk-HSUNFZWO.js index 685fe1f9c..04e78c542 100644 --- a/browser/chunk-PLYSABD6.js +++ b/browser/chunk-HSUNFZWO.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-7FEQNMCH.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-AN3QH62E.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-NNGBTDIJ.js b/browser/chunk-HVJPPWE2.js similarity index 97% rename from browser/chunk-NNGBTDIJ.js rename to browser/chunk-HVJPPWE2.js index c18fc56d8..9470b8610 100644 --- a/browser/chunk-NNGBTDIJ.js +++ b/browser/chunk-HVJPPWE2.js @@ -1 +1 @@ -import{G as i,K as p,Ob as n,Rb as v,dg as c,k as u}from"./chunk-7FEQNMCH.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-AN3QH62E.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-QQLIMQCA.js b/browser/chunk-XFJ7RLE3.js similarity index 81% rename from browser/chunk-QQLIMQCA.js rename to browser/chunk-XFJ7RLE3.js index 957520be3..2ce879af2 100644 --- a/browser/chunk-QQLIMQCA.js +++ b/browser/chunk-XFJ7RLE3.js @@ -1 +1 @@ -import{G as i,K as r,fg as n}from"./chunk-7FEQNMCH.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-AN3QH62E.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/chunk-MYPYMZXS.js b/browser/chunk-Z4I7DFSM.js similarity index 89% rename from browser/chunk-MYPYMZXS.js rename to browser/chunk-Z4I7DFSM.js index 6d9250cf0..e17949169 100644 --- a/browser/chunk-MYPYMZXS.js +++ b/browser/chunk-Z4I7DFSM.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-7FEQNMCH.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-AN3QH62E.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/collaterals.module-LAWKHKWO.js b/browser/collaterals.module-WJ7ZPJD3.js similarity index 99% rename from browser/collaterals.module-LAWKHKWO.js rename to browser/collaterals.module-WJ7ZPJD3.js index 8b5eb796a..61b817f06 100644 --- a/browser/collaterals.module-LAWKHKWO.js +++ b/browser/collaterals.module-WJ7ZPJD3.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-7FEQNMCH.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-AN3QH62E.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-KLLBEEI4.js b/browser/fixed-deposits.module-PPAKIEUE.js similarity index 99% rename from browser/fixed-deposits.module-KLLBEEI4.js rename to browser/fixed-deposits.module-PPAKIEUE.js index c08b374e3..b47534387 100644 --- a/browser/fixed-deposits.module-KLLBEEI4.js +++ b/browser/fixed-deposits.module-PPAKIEUE.js @@ -1,2 +1,2 @@ -import{a as sn}from"./chunk-MYPYMZXS.js";import{a as yi,b as Ii}from"./chunk-74XF6YAH.js";import{a as cn}from"./chunk-NXQKTE5C.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-7FEQNMCH.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-SVGMDSDT.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-Z4I7DFSM.js";import{a as yi,b as Ii}from"./chunk-DZANW5MK.js";import{a as cn}from"./chunk-D3FYZXVS.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-AN3QH62E.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-ITK72AO6.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 a7291b635..d3255e7ec 100644 --- a/browser/index.html +++ b/browser/index.html @@ -57,5 +57,5 @@
- + diff --git a/browser/loans.module-B4SLDFRT.js b/browser/loans.module-SJ4YBX74.js similarity index 99% rename from browser/loans.module-B4SLDFRT.js rename to browser/loans.module-SJ4YBX74.js index 0cf176a05..b8894202f 100644 --- a/browser/loans.module-B4SLDFRT.js +++ b/browser/loans.module-SJ4YBX74.js @@ -1,4 +1,4 @@ -import{a as _1}from"./chunk-QQLIMQCA.js";import{a as Yf,b as h1,c as Gr,d as Wr,e as Op,f as Ep}from"./chunk-PLYSABD6.js";import{a as Ip,b as ld,c as C1,d as b1}from"./chunk-NNGBTDIJ.js";import{a as g1}from"./chunk-NXQKTE5C.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-7FEQNMCH.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-SVGMDSDT.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-ITK72AO6.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 92c0f1ca0..e10f24a25 100644 --- a/browser/main.js +++ b/browser/main.js @@ -1,6 +1,6 @@ -import{a as JF,b as Rk,c as Ea,d as Xg,e as li,f as Nk}from"./chunk-PLYSABD6.js";import{a as lr,b as BT,c as RT,d as mf}from"./chunk-NNGBTDIJ.js";import{$ as gg,$a as Bc,$b as NF,$d as vi,$e as ri,$f as go,A as fl,Aa as vF,Ab as yg,Ac as x0,Ad as b0,Ae as Pp,Af as Qr,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 Rl,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 qa,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 as,F as sF,Fa as gl,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 Nl,Gc as ho,Gd as Fe,Ge as Dp,Gf as xk,Gg as rs,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 hl,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 vl,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 _l,Sb as bp,Sc as Ot,Sd as Pi,Se as P0,Sf as wk,T as Uo,Ta as wF,Tb as kF,Tc as pf,Td as ki,Te as ns,Tf as Pk,U as hg,Ua as c,Ub as BF,Uc as Wo,Ud as Ke,Ue as tr,Uf as Da,V as sf,Va as h,Vb as RF,Vc as $F,Vd as YF,Ve as ir,Vf as os,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 ce,Xd as ke,Xe as dk,Xf as $g,Y as fF,Ya as ea,Yb as Es,Yc as $e,Yd as Rg,Ye as uk,Yf as Yr,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 Is,_d as an,_e as It,_f as In,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 Ua,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 Ra,da as bi,db as xg,dc as ud,dd as tn,de as Ri,df as ua,dg as On,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 Ja,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 La,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 Ft,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 Xa,ke as ZF,kg as Ik,l as tF,la as md,lb as $t,lc as Oe,ld as dt,le as ek,lf as xt,lg as Ug,m as iF,ma as Cg,mb as ti,mc as Na,md as Bg,me as w0,mf as bt,mg as Ok,n as d0,na as F,nb as es,nc as gn,nd as Va,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 ul,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 ts,rc as ve,rd as fe,re as Pr,rf as wt,rg as vn,s as fg,sa as I,sb as Js,sc as Ag,sd as Ue,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 Wr,ue as ok,uf as Tt,ug as Or,v as Ao,va as we,vb as is,vc as VF,vd as Je,ve as ak,vf as hk,w as Ys,wa as g,wb as MF,wc as kT,wd as Cl,we as rk,wf as gk,wg as Fk,x as aF,xa as l,xb as Ka,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 Os,zf as Ck,zg as rc}from"./chunk-7FEQNMCH.js";import{a as at,b as qt,c as Ms,d as Y7,e as pt,f as ET,g as Ds,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,se=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]",Ae="[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,El=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,Oa=/[&<>"']/g,zn=RegExp(wn.source),Hn=RegExp(Oa.source),Zr=/<%-([\s\S]+?)%>/g,En=/<%([\s\S]+?)%>/g,Pn=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,el=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(el.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fi=/\{\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*)$/,Qa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pr=/($^)/,Ga=/['\n\r\u2028\u2029\\]/g,Ya="\\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",An=" \\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+An,Mo="['\u2019]",jo="["+Ya+"]",mr="["+Ta+"]",Br="["+xi+"]",tl="\\d+",jl="["+Vi+"]",Gs="["+pn+"]",Ym="[^"+Ya+Ta+tl+Vi+pn+$n+"]",js="\\ud83c[\\udffb-\\udfff]",Io="(?:"+Br+"|"+js+")",No="[^"+Ya+"]",Jm="(?:\\ud83c[\\udde6-\\uddff]){2}",xs="[\\ud800-\\udbff][\\udc00-\\udfff]",bs="["+$n+"]",jr="\\u200d",$l="(?:"+Gs+"|"+Ym+")",$s="(?:"+bs+"|"+Ym+")",lp="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",Km="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Sc=Io+"?",ys="["+va+"]?",Th="(?:"+jr+"(?:"+[No,Jm,xs].join("|")+")"+ys+Sc+")*",Jd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xm=ys+Sc+Th,Kd="(?:"+[jl,Jm,xs].join("|")+")"+Xm,Mh="(?:"+[No+Br+"?",Br,Jm,xs,jo].join("|")+")",Xd=RegExp(Mo,"g"),Zd=RegExp(Br,"g"),SP=RegExp(js+"(?="+js+")|"+Mh+Xm,"g"),CZ=RegExp([bs+"?"+Gs+"+"+lp+"(?="+[mr,bs,"$"].join("|")+")",$s+"+"+Km+"(?="+[mr,bs+$l,"$"].join("|")+")",bs+"?"+$l+"+"+lp,bs+"+"+Km,zu,Jd,tl,Kd].join("|"),"g"),vZ=RegExp("["+jr+Ya+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,Ul=(function(){try{var Yt=Zm&&Zm.require&&Zm.require("util").types;return Yt||PP&&PP.binding&&PP.binding("util")}catch{}})(),jO=Ul&&Ul.isArrayBuffer,$O=Ul&&Ul.isDate,UO=Ul&&Ul.isMap,WO=Ul&&Ul.isRegExp,QO=Ul&&Ul.isSet,YO=Ul&&Ul.isTypedArray;function Il(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 Jl(A,H,ie,De,He,ct){var At,jt=H&_,Xt=H&C,Di=H&x;if(ie&&(At=He?ie(A,De,He,ct):ie(A)),At!==e)return At;if(!Aa(A))return A;var Ii=no(A);if(Ii){if(At=Rte(A),!jt)return cl(A,At)}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(At=Xt||Zi?{}:a7(A),!jt)return Xt?Pte(A,Qee(At,A)):wte(A,gA(At,A))}else{if(!aa[Bi])return He?A:{};At=Nte(A,Bi,jt)}}ct||(ct=new ws);var Cn=ct.get(A);if(Cn)return Cn;ct.set(A,At),k7(A)?A.forEach(function(Rn){At.add(Jl(Rn,H,ie,Rn,A,ct))}):A7(A)&&A.forEach(function(Rn,xo){At.set(xo,Jl(Rn,H,ie,xo,A,ct))});var Bn=Di?Xt?rT:aT:Xt?ml:xr,so=Ii?e:Bn(A);return Wl(so||A,function(Rn,xo){so&&(xo=Rn,Rn=A[xo]),Qu(At,xo,Jl(Rn,H,ie,xo,A,ct))}),At}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],At=A[He];if(At===e&&!(He in A)||!ct(At))return!1}return!0}function CA(A,H,ie){if(typeof A!="function")throw new Ql(i);return tf(function(){A.apply(e,ie)},H)}function Yu(A,H,ie,De){var He=-1,ct=Dh,At=!0,jt=A.length,Xt=[],Di=H.length;if(!jt)return Xt;ie&&(H=Ma(H,Ol(ie))),De?(ct=TP,At=!1):H.length>=t&&(ct=Hu,At=!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 Us(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(At&&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),At=hi(ct);ct--;)At[De?ct:++He]=A,A+=ie;return At}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,dl),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(!Aa(A))return A;H=hp(H,A);for(var He=-1,ct=H.length,At=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,At=A[ct];At!==null&&!Fl(At)&&(ie?At<=H:At=t){var Di=H?null:Ete(A);if(Di)return Ih(Di);At=!1,He=Hu,Xt=new id}else Xt=H?[]:jt;e:for(;++De=De?A:Kl(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=Fl(A),At=H!==e,jt=H===null,Xt=H===H,Di=Fl(H);if(!jt&&!Di&&!ct&&A>H||ct&&At&&Xt&&!jt&&!Di||De&&At&&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,At=ie.length,jt=-1,Xt=H.length,Di=ur(ct-At,0),Ii=hi(Xt+Di),Bi=!De;++jt1?ie[He-1]:e,At=He>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,At&&nl(ie[0],ie[1],At)&&(ct=He<3?e:ct,He=1),H=ia(H);++De-1?He[ct?H[At]:At]:e}}function YA(A){return Dc(function(H){var ie=H.length,De=ie,He=Yl.prototype.thru;for(A&&H.reverse();De--;){var ct=H[De];if(typeof ct!="function")throw new Ql(i);if(He&&!At&&ig(ct)=="wrapper")var At=new Yl([],!0)}for(De=At?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 Ea,d as Xg,e as li,f as Nk}from"./chunk-HSUNFZWO.js";import{a as lr,b as BT,c as RT,d as mf}from"./chunk-HVJPPWE2.js";import{$ as gg,$a as Bc,$b as NF,$d as vi,$e as ri,$f as go,A as fl,Aa as vF,Ab as yg,Ac as x0,Ad as b0,Ae as Pp,Af as Qr,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 Rl,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 qa,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 gl,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 Nl,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 hl,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 vl,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 _l,Sb as bp,Sc as Ot,Sd as Pi,Se as P0,Sf as wk,T as Uo,Ta as wF,Tb as kF,Tc as pf,Td as ki,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 Da,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 ce,Xd as ke,Xe as dk,Xf as $g,Y as fF,Ya as ea,Yb as Is,Yc as $e,Yd as Rg,Ye as uk,Yf as Yr,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 In,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 Ua,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 Ra,da as bi,db as xg,dc as ud,dd as tn,de as Ri,df as ua,dg as On,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 Ja,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 La,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 Ft,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 Xa,ke as ZF,kg as Ik,l as tF,la as md,lb as $t,lc as Oe,ld as dt,le as ek,lf as xt,lg as Ug,m as iF,ma as Cg,mb as ti,mc as Na,md as Bg,me as w0,mf as bt,mg as Ok,n as d0,na as F,nb as es,nc as gn,nd as Va,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 ul,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 ts,rc as ve,rd as fe,re as Pr,rf as wt,rg as vn,s as fg,sa as I,sb as is,sc as Ag,sd as Ue,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 Wr,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 Cl,we as rk,wf as gk,wg as Fk,x as aF,xa as l,xb as Ka,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-AN3QH62E.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,se=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]",Ae="[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,El=/\b(__p \+=) '' \+/g,xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,Oa=/[&<>"']/g,zn=RegExp(wn.source),Hn=RegExp(Oa.source),Zr=/<%-([\s\S]+?)%>/g,En=/<%([\s\S]+?)%>/g,Pn=/<%=([\s\S]+?)%>/g,cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,el=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(el.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fi=/\{\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*)$/,Qa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pr=/($^)/,Ga=/['\n\r\u2028\u2029\\]/g,Ya="\\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",An=" \\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+An,Mo="['\u2019]",jo="["+Ya+"]",mr="["+Ta+"]",Br="["+xi+"]",tl="\\d+",jl="["+Vi+"]",js="["+pn+"]",Ym="[^"+Ya+Ta+tl+Vi+pn+$n+"]",$s="\\ud83c[\\udffb-\\udfff]",Io="(?:"+Br+"|"+$s+")",No="[^"+Ya+"]",Jm="(?:\\ud83c[\\udde6-\\uddff]){2}",bs="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+$n+"]",jr="\\u200d",$l="(?:"+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="(?:"+[jl,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+$l,"$"].join("|")+")",ys+"?"+$l+"+"+lp,ys+"+"+Km,zu,Jd,tl,Kd].join("|"),"g"),vZ=RegExp("["+jr+Ya+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,Ul=(function(){try{var Yt=Zm&&Zm.require&&Zm.require("util").types;return Yt||PP&&PP.binding&&PP.binding("util")}catch{}})(),jO=Ul&&Ul.isArrayBuffer,$O=Ul&&Ul.isDate,UO=Ul&&Ul.isMap,WO=Ul&&Ul.isRegExp,QO=Ul&&Ul.isSet,YO=Ul&&Ul.isTypedArray;function Il(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 Jl(A,H,ie,De,He,ct){var At,jt=H&_,Xt=H&C,Di=H&x;if(ie&&(At=He?ie(A,De,He,ct):ie(A)),At!==e)return At;if(!Aa(A))return A;var Ii=no(A);if(Ii){if(At=Rte(A),!jt)return cl(A,At)}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(At=Xt||Zi?{}:a7(A),!jt)return Xt?Pte(A,Qee(At,A)):wte(A,gA(At,A))}else{if(!aa[Bi])return He?A:{};At=Nte(A,Bi,jt)}}ct||(ct=new Ps);var Cn=ct.get(A);if(Cn)return Cn;ct.set(A,At),k7(A)?A.forEach(function(Rn){At.add(Jl(Rn,H,ie,Rn,A,ct))}):A7(A)&&A.forEach(function(Rn,xo){At.set(xo,Jl(Rn,H,ie,xo,A,ct))});var Bn=Di?Xt?rT:aT:Xt?ml:xr,so=Ii?e:Bn(A);return Wl(so||A,function(Rn,xo){so&&(xo=Rn,Rn=A[xo]),Qu(At,xo,Jl(Rn,H,ie,xo,A,ct))}),At}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],At=A[He];if(At===e&&!(He in A)||!ct(At))return!1}return!0}function CA(A,H,ie){if(typeof A!="function")throw new Ql(i);return tf(function(){A.apply(e,ie)},H)}function Yu(A,H,ie,De){var He=-1,ct=Dh,At=!0,jt=A.length,Xt=[],Di=H.length;if(!jt)return Xt;ie&&(H=Ma(H,Ol(ie))),De?(ct=TP,At=!1):H.length>=t&&(ct=Hu,At=!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(At&&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),At=hi(ct);ct--;)At[De?ct:++He]=A,A+=ie;return At}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,dl),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(!Aa(A))return A;H=hp(H,A);for(var He=-1,ct=H.length,At=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,At=A[ct];At!==null&&!Fl(At)&&(ie?At<=H:At=t){var Di=H?null:Ete(A);if(Di)return Ih(Di);At=!1,He=Hu,Xt=new id}else Xt=H?[]:jt;e:for(;++De=De?A:Kl(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=Fl(A),At=H!==e,jt=H===null,Xt=H===H,Di=Fl(H);if(!jt&&!Di&&!ct&&A>H||ct&&At&&Xt&&!jt&&!Di||De&&At&&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,At=ie.length,jt=-1,Xt=H.length,Di=ur(ct-At,0),Ii=hi(Xt+Di),Bi=!De;++jt1?ie[He-1]:e,At=He>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,At&&nl(ie[0],ie[1],At)&&(ct=He<3?e:ct,He=1),H=ia(H);++De-1?He[ct?H[At]:At]:e}}function YA(A){return Dc(function(H){var ie=H.length,De=ie,He=Yl.prototype.thru;for(A&&H.reverse();De--;){var ct=H[De];if(typeof ct!="function")throw new Ql(i);if(He&&!At&&ig(ct)=="wrapper")var At=new Yl([],!0)}for(De=At?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 Yl(De,this.__chain__).thru(function(ct){return H&&!ct.length&&ct.push(e),ct}))});function Xie(){return b7(this)}function Zie(){return new Yl(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 Yl(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&&nl(A,H,ie)&&(H=e),De(A,Fn(H,3))}function lne(A,H){var ie=no(A)?sp:xA;return ie(A,Fn(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)?Wl:up;return ie(A,Fn(H,3))}function S7(A,H){var ie=no(A)?OZ:vA;return ie(A,Fn(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=pl(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=pl(A)?hi(A.length):[];return up(A,function(At){ct[++De]=He?Il(H,At,ie):Ju(At,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,Fn(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,Fn(H,4),ie,He,up)}function xne(A,H,ie){var De=no(A)?AZ:eA,He=arguments.length<3;return De(A,Fn(H,4),ie,He,vA)}function bne(A,H){var ie=no(A)?sp:xA;return ie(A,cg(Fn(H,3)))}function yne(A){var H=no(A)?hA:fte;return H(A)}function Sne(A,H,ie){(ie?nl(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(pl(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&&nl(A,H,ie)&&(H=e),De(A,Fn(H,3))}var Mne=uo(function(A,H){if(A==null)return[];var ie=H.length;return ie>1&&nl(A,H[0],H[1])?H=[]:ie>2&&nl(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 Ql(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 Ql(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,At,jt,Xt,Di=0,Ii=!1,Bi=!1,Zi=!0;if(typeof A!="function")throw new Ql(i);H=Zl(H)||0,Aa(ie)&&(Ii=!!ie.leading,Bi="maxWait"in ie,ct=Bi?ur(Zl(ie.maxWait)||0,H):ct,Zi="trailing"in ie?!!ie.trailing:Zi);function Cn($a){var Ts=De,Ac=He;return De=He=e,Di=$a,At=A.apply(Ac,Ts),At}function Bn($a){return Di=$a,jt=tf(xo,H),Ii?Cn($a):At}function so($a){var Ts=$a-Xt,Ac=$a-Di,Q7=H-Ts;return Bi?$r(Q7,ct-Ac):Q7}function Rn($a){var Ts=$a-Xt,Ac=$a-Di;return Xt===e||Ts>=H||Ts<0||Bi&&Ac>=ct}function xo(){var $a=lg();if(Rn($a))return Do($a);jt=tf(xo,so($a))}function Do($a){return jt=e,Zi&&De?Cn($a):(De=He=e,At)}function kl(){jt!==e&&VA(jt),Di=0,De=Xt=He=jt=e}function ol(){return jt===e?At:Do(lg())}function Bl(){var $a=lg(),Ts=Rn($a);if(De=arguments,He=this,Xt=$a,Ts){if(jt===e)return Bn(Xt);if(Bi)return VA(jt),jt=tf(xo,H),Cn(Xt)}return jt===e&&(jt=tf(xo,H)),At}return Bl.cancel=kl,Bl.flush=ol,Bl}var Ene=uo(function(A,H){return CA(A,1,H)}),Ine=uo(function(A,H,ie){return CA(A,Zl(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 Ql(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 At=A.apply(this,De);return ie.cache=ct.set(He,At)||ct,At};return ie.cache=new(sg.Cache||Pc),ie}sg.Cache=Pc;function cg(A){if(typeof A!="function")throw new Ql(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],Ol(Fn())):Ma(Rr(H,1),Ol(Fn()));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 Ba(A)&&Xo.call(A,"callee")&&!cA.call(A,"callee")},no=hi.isArray,Qne=jO?Ol(jO):ite;function pl(A){return A!=null&&pg(A.length)&&!Ic(A)}function ja(A){return Ba(A)&&pl(A)}function Yne(A){return A===!0||A===!1||Ba(A)&&il(A)==K}var _p=cee||DT,Jne=$O?Ol($O):nte;function Kne(A){return Ba(A)&&A.nodeType===1&&!nf(A)}function Xne(A){if(A==null)return!0;if(pl(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(!Ba(A))return!1;var H=il(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(!Aa(A))return!1;var H=il(A);return H==mt||H==Ye||H==Ae||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 Aa(A){var H=typeof A;return A!=null&&(H=="object"||H=="function")}function Ba(A){return A!=null&&typeof A=="object"}var A7=UO?Ol(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"||Ba(A)&&il(A)==Qt}function nf(A){if(!Ba(A)||il(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?Ol(WO):rte;function soe(A){return O7(A)&&A>=-L&&A<=L}var k7=QO?Ol(QO):lte;function mg(A){return typeof A=="string"||!no(A)&&Ba(A)&&il(A)==ei}function Fl(A){return typeof A=="symbol"||Ba(A)&&il(A)==ni}var p0=YO?Ol(YO):ste;function coe(A){return A===e}function poe(A){return Ba(A)&&Ur(A)==Ai}function moe(A){return Ba(A)&&il(A)==Ni}var doe=tg(WP),uoe=tg(function(A,H){return A<=H});function B7(A){if(!A)return[];if(pl(A))return mg(A)?Ss(A):cl(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=Zl(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 Zl(A){if(typeof A=="number")return A;if(Fl(A))return G;if(Aa(A)){var H=typeof A.valueOf=="function"?A.valueOf():A;A=Aa(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 Ws(A,ml(A))}function foe(A){return A?nd(ao(A),-L,L):A===0?A:0}function $o(A){return A==null?"":Al(A)}var hoe=l0(function(A,H){if(ef(H)||pl(H)){Ws(H,xr(H),A);return}for(var ie in H)Xo.call(H,ie)&&Qu(A,ie,H[ie])}),L7=l0(function(A,H){Ws(H,ml(H),A)}),dg=l0(function(A,H,ie,De){Ws(H,ml(H),A,De)}),goe=l0(function(A,H,ie,De){Ws(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&&nl(H[0],H[1],He)&&(De=1);++ie1),ct}),Ws(A,rT(A),ie),De&&(ie=Jl(ie,_|C|x,Ite));for(var He=H.length;He--;)XP(ie,H[He]);return ie});function Noe(A,H){return q7(A,cg(Fn(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=Fn(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(Qa,qZ).replace(Zd,"")}function Koe(A,H,ie){A=$o(A),H=Al(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(Oa,zZ):A}function Zoe(A){return A=$o(A),A&&Gn.test(A)?A.replace(el,"\\$&"):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=Al(H),!H&&t0(A))?gp(Ss(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=Al(H),A.slice(ie,ie+H.length)==H}function uae(A,H,ie){var De=ot.templateSettings;ie&&nl(A,H,ie)&&(H=e),A=$o(A),H=dg({},H,De,e7);var He=dg({},H.imports,De.imports,e7),ct=xr(He),At=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+"]")+` +`)}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 Yl(De,this.__chain__).thru(function(ct){return H&&!ct.length&&ct.push(e),ct}))});function Xie(){return b7(this)}function Zie(){return new Yl(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 Yl(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&&nl(A,H,ie)&&(H=e),De(A,Fn(H,3))}function lne(A,H){var ie=no(A)?sp:xA;return ie(A,Fn(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)?Wl:up;return ie(A,Fn(H,3))}function S7(A,H){var ie=no(A)?OZ:vA;return ie(A,Fn(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=pl(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=pl(A)?hi(A.length):[];return up(A,function(At){ct[++De]=He?Il(H,At,ie):Ju(At,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,Fn(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,Fn(H,4),ie,He,up)}function xne(A,H,ie){var De=no(A)?AZ:eA,He=arguments.length<3;return De(A,Fn(H,4),ie,He,vA)}function bne(A,H){var ie=no(A)?sp:xA;return ie(A,cg(Fn(H,3)))}function yne(A){var H=no(A)?hA:fte;return H(A)}function Sne(A,H,ie){(ie?nl(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(pl(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&&nl(A,H,ie)&&(H=e),De(A,Fn(H,3))}var Mne=uo(function(A,H){if(A==null)return[];var ie=H.length;return ie>1&&nl(A,H[0],H[1])?H=[]:ie>2&&nl(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 Ql(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 Ql(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,At,jt,Xt,Di=0,Ii=!1,Bi=!1,Zi=!0;if(typeof A!="function")throw new Ql(i);H=Zl(H)||0,Aa(ie)&&(Ii=!!ie.leading,Bi="maxWait"in ie,ct=Bi?ur(Zl(ie.maxWait)||0,H):ct,Zi="trailing"in ie?!!ie.trailing:Zi);function Cn($a){var Ms=De,Ac=He;return De=He=e,Di=$a,At=A.apply(Ac,Ms),At}function Bn($a){return Di=$a,jt=tf(xo,H),Ii?Cn($a):At}function so($a){var Ms=$a-Xt,Ac=$a-Di,Q7=H-Ms;return Bi?$r(Q7,ct-Ac):Q7}function Rn($a){var Ms=$a-Xt,Ac=$a-Di;return Xt===e||Ms>=H||Ms<0||Bi&&Ac>=ct}function xo(){var $a=lg();if(Rn($a))return Do($a);jt=tf(xo,so($a))}function Do($a){return jt=e,Zi&&De?Cn($a):(De=He=e,At)}function kl(){jt!==e&&VA(jt),Di=0,De=Xt=He=jt=e}function ol(){return jt===e?At:Do(lg())}function Bl(){var $a=lg(),Ms=Rn($a);if(De=arguments,He=this,Xt=$a,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)),At}return Bl.cancel=kl,Bl.flush=ol,Bl}var Ene=uo(function(A,H){return CA(A,1,H)}),Ine=uo(function(A,H,ie){return CA(A,Zl(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 Ql(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 At=A.apply(this,De);return ie.cache=ct.set(He,At)||ct,At};return ie.cache=new(sg.Cache||Pc),ie}sg.Cache=Pc;function cg(A){if(typeof A!="function")throw new Ql(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],Ol(Fn())):Ma(Rr(H,1),Ol(Fn()));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 Ba(A)&&Xo.call(A,"callee")&&!cA.call(A,"callee")},no=hi.isArray,Qne=jO?Ol(jO):ite;function pl(A){return A!=null&&pg(A.length)&&!Ic(A)}function ja(A){return Ba(A)&&pl(A)}function Yne(A){return A===!0||A===!1||Ba(A)&&il(A)==K}var _p=cee||DT,Jne=$O?Ol($O):nte;function Kne(A){return Ba(A)&&A.nodeType===1&&!nf(A)}function Xne(A){if(A==null)return!0;if(pl(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(!Ba(A))return!1;var H=il(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(!Aa(A))return!1;var H=il(A);return H==mt||H==Ye||H==Ae||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 Aa(A){var H=typeof A;return A!=null&&(H=="object"||H=="function")}function Ba(A){return A!=null&&typeof A=="object"}var A7=UO?Ol(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"||Ba(A)&&il(A)==Qt}function nf(A){if(!Ba(A)||il(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?Ol(WO):rte;function soe(A){return O7(A)&&A>=-L&&A<=L}var k7=QO?Ol(QO):lte;function mg(A){return typeof A=="string"||!no(A)&&Ba(A)&&il(A)==ei}function Fl(A){return typeof A=="symbol"||Ba(A)&&il(A)==ni}var p0=YO?Ol(YO):ste;function coe(A){return A===e}function poe(A){return Ba(A)&&Ur(A)==Ai}function moe(A){return Ba(A)&&il(A)==Ni}var doe=tg(WP),uoe=tg(function(A,H){return A<=H});function B7(A){if(!A)return[];if(pl(A))return mg(A)?ws(A):cl(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=Zl(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 Zl(A){if(typeof A=="number")return A;if(Fl(A))return G;if(Aa(A)){var H=typeof A.valueOf=="function"?A.valueOf():A;A=Aa(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,ml(A))}function foe(A){return A?nd(ao(A),-L,L):A===0?A:0}function $o(A){return A==null?"":Al(A)}var hoe=l0(function(A,H){if(ef(H)||pl(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,ml(H),A)}),dg=l0(function(A,H,ie,De){Qs(H,ml(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&&nl(H[0],H[1],He)&&(De=1);++ie1),ct}),Qs(A,rT(A),ie),De&&(ie=Jl(ie,_|C|x,Ite));for(var He=H.length;He--;)XP(ie,H[He]);return ie});function Noe(A,H){return q7(A,cg(Fn(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=Fn(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(Qa,qZ).replace(Zd,"")}function Koe(A,H,ie){A=$o(A),H=Al(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(Oa,zZ):A}function Zoe(A){return A=$o(A),A&&Gn.test(A)?A.replace(el,"\\$&"):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=Al(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=Al(H),A.slice(ie,ie+H.length)==H}function uae(A,H,ie){var De=ot.templateSettings;ie&&nl(A,H,ie)&&(H=e),A=$o(A),H=dg({},H,De,e7);var He=dg({},H.imports,De.imports,e7),ct=xr(He),At=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,kl,ol,Bl){return Do||(Do=kl),Bi+=A.slice(Di,Bl).replace(Ga,HZ),xo&&(jt=!0,Bi+=`' + __e(`+xo+`) + '`),ol&&(Xt=!0,Bi+=`'; @@ -17,7 +17,7 @@ __p += '`),Do&&(Bi+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Bi+`return __p -}`;var so=U7(function(){return zo(ct,Cn+"return "+Bi).apply(e,At)});if(so.source=Bi,CT(so))throw so;return so}function fae(A){return $o(A).toLowerCase()}function hae(A){return $o(A).toUpperCase()}function gae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return tA(A);if(!A||!(H=Al(H)))return A;var De=Ss(A),He=Ss(H),ct=iA(De,He),At=nA(De,He)+1;return gp(De,ct,At).join("")}function _ae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return A.slice(0,aA(A)+1);if(!A||!(H=Al(H)))return A;var De=Ss(A),He=nA(De,Ss(H))+1;return gp(De,0,He).join("")}function Cae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return A.replace(Rt,"");if(!A||!(H=Al(H)))return A;var De=Ss(A),He=iA(De,Ss(H));return gp(De,He).join("")}function vae(A,H){var ie=se,De=_e;if(Aa(H)){var He="separator"in H?H.separator:He;ie="length"in H?ao(H.length):ie,De="omission"in H?Al(H.omission):De}A=$o(A);var ct=A.length;if(t0(A)){var At=Ss(A);ct=At.length}if(ie>=ct)return A;var jt=ie-i0(De);if(jt<1)return De;var Xt=At?gp(At,0,jt).join(""):A.slice(0,jt);if(He===e)return Xt+De;if(At&&(jt+=Xt.length-jt),vT(He)){if(A.slice(jt).search(He)){var Di,Ii=Xt;for(He.global||(He=BP(He.source,$o(nn.exec(He))+"g")),He.lastIndex=0;Di=He.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?jt:Bi)}}else if(A.indexOf(Al(He),jt)!=jt){var Zi=Xt.lastIndexOf(He);Zi>-1&&(Xt=Xt.slice(0,Zi))}return Xt+De}function xae(A){return A=$o(A),A&&zn.test(A)?A.replace(wn,YZ):A}var bae=s0(function(A,H,ie){return A+(ie?" ":"")+H.toUpperCase()}),yT=WA("toUpperCase");function $7(A,H,ie){return A=$o(A),H=ie?e:H,H===e?jZ(A)?XZ(A):BZ(A):A.match(H)||[]}var U7=uo(function(A,H){try{return Il(A,e,H)}catch(ie){return CT(ie)?ie:new Zn(ie)}}),yae=Dc(function(A,H){return Wl(H,function(ie){ie=Qs(ie),Tc(A,ie,gT(A[ie],A))}),A});function Sae(A){var H=A==null?0:A.length,ie=Fn();return A=H?Ma(A,function(De){if(typeof De[1]!="function")throw new Ql(i);return[ie(De[0]),De[1]]}):[],uo(function(De){for(var He=-1;++HeL)return[];var ie=$,De=$r(A,$);H=Fn(H),A-=$;for(var He=AP(De,H);++ie0||H<0)?new So(ie):(A<0?ie=ie.takeRight(-A):A&&(ie=ie.drop(A)),H!==e&&(H=ao(H),ie=H<0?ie.dropRight(-H):ie.take(H-A)),ie)},So.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},So.prototype.toArray=function(){return this.take($)},Us(So.prototype,function(A,H){var ie=/^(?:filter|find|map|reject)|While$/.test(H),De=/^(?:head|last)$/.test(H),He=ot[De?"take"+(H=="last"?"Right":""):H],ct=De||/^find/.test(H);He&&(ot.prototype[H]=function(){var At=this.__wrapped__,jt=De?[1]:arguments,Xt=At instanceof So,Di=jt[0],Ii=Xt||no(At),Bi=function(xo){var Do=He.apply(ot,cp([xo],jt));return De&&Zi?Do[0]:Do};Ii&&ie&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var Zi=this.__chain__,Cn=!!this.__actions__.length,Bn=ct&&!Zi,so=Xt&&!Cn;if(!ct&&Ii){At=so?At:new So(this);var Rn=A.apply(At,jt);return Rn.__actions__.push({func:ag,args:[Bi],thisArg:e}),new Yl(Rn,Zi)}return Bn&&so?A.apply(this,jt):(Rn=this.thru(Bi),Bn?De?Rn.value()[0]:Rn.value():Rn)})}),Wl(["pop","push","shift","sort","splice","unshift"],function(A){var H=Oh[A],ie=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",De=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var He=arguments;if(De&&!this.__chain__){var ct=this.value();return H.apply(no(ct)?ct:[],He)}return this[ie](function(At){return H.apply(no(At)?At:[],He)})}}),Us(So.prototype,function(A,H){var ie=ot[H];if(ie){var De=ie.name+"";Xo.call(a0,De)||(a0[De]=[]),a0[De].push({name:H,func:ie})}}),a0[Xh(e,M).name]=[{name:"wrapper",func:e}],So.prototype.clone=xee,So.prototype.reverse=bee,So.prototype.value=yee,ot.prototype.at=Kie,ot.prototype.chain=Xie,ot.prototype.commit=Zie,ot.prototype.next=ene,ot.prototype.plant=ine,ot.prototype.reverse=nne,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=one,ot.prototype.first=ot.prototype.head,Gu&&(ot.prototype[Gu]=tne),ot},mp=ZZ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(vr._=mp,define(function(){return mp})):Zm?((Zm.exports=mp)._=mp,wP._=mp):vr._=mp}).call(B0)});var D9=pt(FC=>{"use strict";FC.byteLength=whe;FC.toByteArray=The;FC.fromByteArray=Ehe;var hc=[],ms=[],She=typeof Uint8Array<"u"?Uint8Array:Array,FM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Dd=0,T9=FM.length;Dd0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=o);var n=t===o?0:4-t%4;return[t,n]}function whe(e){var o=M9(e),t=o[0],n=o[1];return(t+n)*3/4-n}function Phe(e,o,t){return(o+t)*3/4-t}function The(e){var o,t=M9(e),n=t[0],i=t[1],s=new She(Phe(e,n,i)),d=0,u=i>0?n-4:n,f;for(f=0;f>16&255,s[d++]=o>>8&255,s[d++]=o&255;return i===2&&(o=ms[e.charCodeAt(f)]<<2|ms[e.charCodeAt(f+1)]>>4,s[d++]=o&255),i===1&&(o=ms[e.charCodeAt(f)]<<10|ms[e.charCodeAt(f+1)]<<4|ms[e.charCodeAt(f+2)]>>2,s[d++]=o>>8&255,s[d++]=o&255),s}function Mhe(e){return hc[e>>18&63]+hc[e>>12&63]+hc[e>>6&63]+hc[e&63]}function Dhe(e,o,t){for(var n,i=[],s=o;su?u:d+s));return n===1?(o=e[t-1],i.push(hc[o>>2]+hc[o<<4&63]+"==")):n===2&&(o=(e[t-2]<<8)+e[t-1],i.push(hc[o>>10]+hc[o>>4&63]+hc[o<<2&63]+"=")),i.join("")}});var E9=pt(kM=>{kM.read=function(e,o,t,n,i){var s,d,u=i*8-n-1,f=(1<>1,C=-7,x=t?i-1:0,y=t?-1:1,P=e[o+x];for(x+=y,s=P&(1<<-C)-1,P>>=-C,C+=u;C>0;s=s*256+e[o+x],x+=y,C-=8);for(d=s&(1<<-C)-1,s>>=-C,C+=n;C>0;d=d*256+e[o+x],x+=y,C-=8);if(s===0)s=1-_;else{if(s===f)return d?NaN:(P?-1:1)*(1/0);d=d+Math.pow(2,n),s=s-_}return(P?-1:1)*d*Math.pow(2,s-n)};kM.write=function(e,o,t,n,i,s){var d,u,f,_=s*8-i-1,C=(1<<_)-1,x=C>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=n?0:s-1,S=n?1:-1,M=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(u=isNaN(o)?1:0,d=C):(d=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+x>=1?o+=y/f:o+=y*Math.pow(2,1-x),o*f>=2&&(d++,f/=2),d+x>=C?(u=0,d=C):d+x>=1?(u=(o*f-1)*Math.pow(2,i),d=d+x):(u=o*Math.pow(2,x-1)*Math.pow(2,i),d=0));i>=8;e[t+P]=u&255,P+=S,u/=256,i-=8);for(d=d<0;e[t+P]=d&255,P+=S,d/=256,_-=8);e[t+P-S]|=M*128}});var H9=pt(X0=>{"use strict";var BM=D9(),K0=E9(),I9=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;X0.Buffer=Ti;X0.SlowBuffer=Bhe;X0.INSPECT_MAX_BYTES=50;var kC=2147483647;X0.kMaxLength=kC;Ti.TYPED_ARRAY_SUPPORT=Ihe();!Ti.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ihe(){try{var e=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(e,o),e.foo()===42}catch{return!1}}Object.defineProperty(Ti.prototype,"parent",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.buffer}});Object.defineProperty(Ti.prototype,"offset",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.byteOffset}});function Wc(e){if(e>kC)throw new RangeError('The value "'+e+'" is invalid for option "size"');var o=new Uint8Array(e);return Object.setPrototypeOf(o,Ti.prototype),o}function Ti(e,o,t){if(typeof e=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return VM(e)}return F9(e,o,t)}Ti.poolSize=8192;function F9(e,o,t){if(typeof e=="string")return Ahe(e,o);if(ArrayBuffer.isView(e))return Fhe(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(gc(e,ArrayBuffer)||e&&gc(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(gc(e,SharedArrayBuffer)||e&&gc(e.buffer,SharedArrayBuffer)))return NM(e,o,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Ti.from(n,o,t);var i=khe(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ti.from(e[Symbol.toPrimitive]("string"),o,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ti.from=function(e,o,t){return F9(e,o,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function k9(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ohe(e,o,t){return k9(e),e<=0?Wc(e):o!==void 0?typeof t=="string"?Wc(e).fill(o,t):Wc(e).fill(o):Wc(e)}Ti.alloc=function(e,o,t){return Ohe(e,o,t)};function VM(e){return k9(e),Wc(e<0?0:qM(e)|0)}Ti.allocUnsafe=function(e){return VM(e)};Ti.allocUnsafeSlow=function(e){return VM(e)};function Ahe(e,o){if((typeof o!="string"||o==="")&&(o="utf8"),!Ti.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var t=B9(e,o)|0,n=Wc(t),i=n.write(e,o);return i!==t&&(n=n.slice(0,i)),n}function RM(e){for(var o=e.length<0?0:qM(e.length)|0,t=Wc(o),n=0;n=kC)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kC.toString(16)+" bytes");return e|0}function Bhe(e){return+e!=e&&(e=0),Ti.alloc(+e)}Ti.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==Ti.prototype};Ti.compare=function(o,t){if(gc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),gc(t,Uint8Array)&&(t=Ti.from(t,t.offset,t.byteLength)),!Ti.isBuffer(o)||!Ti.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===t)return 0;for(var n=o.length,i=t.length,s=0,d=Math.min(n,i);si.length?Ti.from(d).copy(i,s):Uint8Array.prototype.set.call(i,d,s);else if(Ti.isBuffer(d))d.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=d.length}return i};function B9(e,o){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||gc(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(o){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return LM(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return z9(e).length;default:if(i)return n?-1:LM(e).length;o=(""+o).toLowerCase(),i=!0}}Ti.byteLength=B9;function Rhe(e,o,t){var n=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,o>>>=0,t<=o))return"";for(e||(e="utf8");;)switch(e){case"hex":return Uhe(this,o,t);case"utf8":case"utf-8":return N9(this,o,t);case"ascii":return jhe(this,o,t);case"latin1":case"binary":return $he(this,o,t);case"base64":return Hhe(this,o,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Whe(this,o,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ti.prototype._isBuffer=!0;function Ed(e,o,t){var n=e[o];e[o]=e[t],e[t]=n}Ti.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(o+=" ... "),""};I9&&(Ti.prototype[I9]=Ti.prototype.inspect);Ti.prototype.compare=function(o,t,n,i,s){if(gc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),!Ti.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(t===void 0&&(t=0),n===void 0&&(n=o?o.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>o.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===o)return 0;for(var d=s-i,u=n-t,f=Math.min(d,u),_=this.slice(i,s),C=o.slice(t,n),x=0;x2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,zM(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof o=="string"&&(o=Ti.from(o,n)),Ti.isBuffer(o))return o.length===0?-1:O9(e,o,t,n,i);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,o,t):Uint8Array.prototype.lastIndexOf.call(e,o,t):O9(e,[o],t,n,i);throw new TypeError("val must be string, number or Buffer")}function O9(e,o,t,n,i){var s=1,d=e.length,u=o.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||o.length<2)return-1;s=2,d/=2,u/=2,t/=2}function f(P,S){return s===1?P[S]:P.readUInt16BE(S*s)}var _;if(i){var C=-1;for(_=t;_d&&(t=d-u),_=t;_>=0;_--){for(var x=!0,y=0;yi&&(n=i)):n=i;var s=o.length;n>s/2&&(n=s/2);for(var d=0;d>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-t;if((n===void 0||n>s)&&(n=s),o.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var d=!1;;)switch(i){case"hex":return Nhe(this,o,t,n);case"utf8":case"utf-8":return Lhe(this,o,t,n);case"ascii":case"latin1":case"binary":return Vhe(this,o,t,n);case"base64":return qhe(this,o,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zhe(this,o,t,n);default:if(d)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),d=!0}};Ti.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Hhe(e,o,t){return o===0&&t===e.length?BM.fromByteArray(e):BM.fromByteArray(e.slice(o,t))}function N9(e,o,t){t=Math.min(e.length,t);for(var n=[],i=o;i239?4:s>223?3:s>191?2:1;if(i+u<=t){var f,_,C,x;switch(u){case 1:s<128&&(d=s);break;case 2:f=e[i+1],(f&192)===128&&(x=(s&31)<<6|f&63,x>127&&(d=x));break;case 3:f=e[i+1],_=e[i+2],(f&192)===128&&(_&192)===128&&(x=(s&15)<<12|(f&63)<<6|_&63,x>2047&&(x<55296||x>57343)&&(d=x));break;case 4:f=e[i+1],_=e[i+2],C=e[i+3],(f&192)===128&&(_&192)===128&&(C&192)===128&&(x=(s&15)<<18|(f&63)<<12|(_&63)<<6|C&63,x>65535&&x<1114112&&(d=x))}}d===null?(d=65533,u=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),i+=u}return Ghe(n)}var A9=4096;function Ghe(e){var o=e.length;if(o<=A9)return String.fromCharCode.apply(String,e);for(var t="",n=0;nn)&&(t=n);for(var i="",s=o;sn&&(o=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tt)throw new RangeError("Trying to access beyond buffer length")}Ti.prototype.readUintLE=Ti.prototype.readUIntLE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o],s=1,d=0;++d>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o+--t],s=1;t>0&&(s*=256);)i+=this[o+--t]*s;return i};Ti.prototype.readUint8=Ti.prototype.readUInt8=function(o,t){return o=o>>>0,t||Ar(o,1,this.length),this[o]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(o,t){return o=o>>>0,t||Ar(o,2,this.length),this[o]|this[o+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(o,t){return o=o>>>0,t||Ar(o,2,this.length),this[o]<<8|this[o+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216};Ti.prototype.readUint32BE=Ti.prototype.readUInt32BE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])};Ti.prototype.readIntLE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o],s=1,d=0;++d=s&&(i-=Math.pow(2,8*t)),i};Ti.prototype.readIntBE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=t,s=1,d=this[o+--i];i>0&&(s*=256);)d+=this[o+--i]*s;return s*=128,d>=s&&(d-=Math.pow(2,8*t)),d};Ti.prototype.readInt8=function(o,t){return o=o>>>0,t||Ar(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]};Ti.prototype.readInt16LE=function(o,t){o=o>>>0,t||Ar(o,2,this.length);var n=this[o]|this[o+1]<<8;return n&32768?n|4294901760:n};Ti.prototype.readInt16BE=function(o,t){o=o>>>0,t||Ar(o,2,this.length);var n=this[o+1]|this[o]<<8;return n&32768?n|4294901760:n};Ti.prototype.readInt32LE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24};Ti.prototype.readInt32BE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]};Ti.prototype.readFloatLE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),K0.read(this,o,!0,23,4)};Ti.prototype.readFloatBE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),K0.read(this,o,!1,23,4)};Ti.prototype.readDoubleLE=function(o,t){return o=o>>>0,t||Ar(o,8,this.length),K0.read(this,o,!0,52,8)};Ti.prototype.readDoubleBE=function(o,t){return o=o>>>0,t||Ar(o,8,this.length),K0.read(this,o,!1,52,8)};function Tl(e,o,t,n,i,s){if(!Ti.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>i||oe.length)throw new RangeError("Index out of range")}Ti.prototype.writeUintLE=Ti.prototype.writeUIntLE=function(o,t,n,i){if(o=+o,t=t>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;Tl(this,o,t,n,s,0)}var d=1,u=0;for(this[t]=o&255;++u>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;Tl(this,o,t,n,s,0)}var d=n-1,u=1;for(this[t+d]=o&255;--d>=0&&(u*=256);)this[t+d]=o/u&255;return t+n};Ti.prototype.writeUint8=Ti.prototype.writeUInt8=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,1,255,0),this[t]=o&255,t+1};Ti.prototype.writeUint16LE=Ti.prototype.writeUInt16LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,65535,0),this[t]=o&255,this[t+1]=o>>>8,t+2};Ti.prototype.writeUint16BE=Ti.prototype.writeUInt16BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,65535,0),this[t]=o>>>8,this[t+1]=o&255,t+2};Ti.prototype.writeUint32LE=Ti.prototype.writeUInt32LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,4294967295,0),this[t+3]=o>>>24,this[t+2]=o>>>16,this[t+1]=o>>>8,this[t]=o&255,t+4};Ti.prototype.writeUint32BE=Ti.prototype.writeUInt32BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,4294967295,0),this[t]=o>>>24,this[t+1]=o>>>16,this[t+2]=o>>>8,this[t+3]=o&255,t+4};Ti.prototype.writeIntLE=function(o,t,n,i){if(o=+o,t=t>>>0,!i){var s=Math.pow(2,8*n-1);Tl(this,o,t,n,s-1,-s)}var d=0,u=1,f=0;for(this[t]=o&255;++d>0)-f&255;return t+n};Ti.prototype.writeIntBE=function(o,t,n,i){if(o=+o,t=t>>>0,!i){var s=Math.pow(2,8*n-1);Tl(this,o,t,n,s-1,-s)}var d=n-1,u=1,f=0;for(this[t+d]=o&255;--d>=0&&(u*=256);)o<0&&f===0&&this[t+d+1]!==0&&(f=1),this[t+d]=(o/u>>0)-f&255;return t+n};Ti.prototype.writeInt8=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,1,127,-128),o<0&&(o=255+o+1),this[t]=o&255,t+1};Ti.prototype.writeInt16LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,32767,-32768),this[t]=o&255,this[t+1]=o>>>8,t+2};Ti.prototype.writeInt16BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,32767,-32768),this[t]=o>>>8,this[t+1]=o&255,t+2};Ti.prototype.writeInt32LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,2147483647,-2147483648),this[t]=o&255,this[t+1]=o>>>8,this[t+2]=o>>>16,this[t+3]=o>>>24,t+4};Ti.prototype.writeInt32BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[t]=o>>>24,this[t+1]=o>>>16,this[t+2]=o>>>8,this[t+3]=o&255,t+4};function L9(e,o,t,n,i,s){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function V9(e,o,t,n,i){return o=+o,t=t>>>0,i||L9(e,o,t,4,34028234663852886e22,-34028234663852886e22),K0.write(e,o,t,n,23,4),t+4}Ti.prototype.writeFloatLE=function(o,t,n){return V9(this,o,t,!0,n)};Ti.prototype.writeFloatBE=function(o,t,n){return V9(this,o,t,!1,n)};function q9(e,o,t,n,i){return o=+o,t=t>>>0,i||L9(e,o,t,8,17976931348623157e292,-17976931348623157e292),K0.write(e,o,t,n,52,8),t+8}Ti.prototype.writeDoubleLE=function(o,t,n){return q9(this,o,t,!0,n)};Ti.prototype.writeDoubleBE=function(o,t,n){return q9(this,o,t,!1,n)};Ti.prototype.copy=function(o,t,n,i){if(!Ti.isBuffer(o))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=o.length&&(t=o.length),t||(t=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),o.length-t>>0,n=n===void 0?this.length:n>>>0,o||(o=0);var d;if(typeof o=="number")for(d=t;d55295&&t<57344){if(!i){if(t>56319){(o-=3)>-1&&s.push(239,191,189);continue}else if(d+1===n){(o-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(o-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(o-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((o-=1)<0)break;s.push(t)}else if(t<2048){if((o-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((o-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((o-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function Jhe(e){for(var o=[],t=0;t>8,i=t%256,s.push(i),s.push(n);return s}function z9(e){return BM.toByteArray(Yhe(e))}function BC(e,o,t,n){for(var i=0;i=o.length||i>=e.length);++i)o[i+t]=e[i];return i}function gc(e,o){return e instanceof o||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===o.name}function zM(e){return e!==e}var Xhe=(function(){for(var e="0123456789abcdef",o=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)o[n+i]=e[t]+e[i];return o})()});var EV=pt((Ibn,DV)=>{function yKe(){this.__data__=[],this.size=0}DV.exports=yKe});var Vd=pt((Obn,IV)=>{function SKe(e,o){return e===o||e!==e&&o!==o}IV.exports=SKe});var T1=pt((Abn,OV)=>{var wKe=Vd();function PKe(e,o){for(var t=e.length;t--;)if(wKe(e[t][0],o))return t;return-1}OV.exports=PKe});var FV=pt((Fbn,AV)=>{var TKe=T1(),MKe=Array.prototype,DKe=MKe.splice;function EKe(e){var o=this.__data__,t=TKe(o,e);if(t<0)return!1;var n=o.length-1;return t==n?o.pop():DKe.call(o,t,1),--this.size,!0}AV.exports=EKe});var BV=pt((kbn,kV)=>{var IKe=T1();function OKe(e){var o=this.__data__,t=IKe(o,e);return t<0?void 0:o[t][1]}kV.exports=OKe});var NV=pt((Bbn,RV)=>{var AKe=T1();function FKe(e){return AKe(this.__data__,e)>-1}RV.exports=FKe});var VV=pt((Rbn,LV)=>{var kKe=T1();function BKe(e,o){var t=this.__data__,n=kKe(t,e);return n<0?(++this.size,t.push([e,o])):t[n][1]=o,this}LV.exports=BKe});var M1=pt((Nbn,qV)=>{var RKe=EV(),NKe=FV(),LKe=BV(),VKe=NV(),qKe=VV();function cu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var zKe=M1();function HKe(){this.__data__=new zKe,this.size=0}zV.exports=HKe});var jV=pt((Vbn,GV)=>{function GKe(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}GV.exports=GKe});var UV=pt((qbn,$V)=>{function jKe(e){return this.__data__.get(e)}$V.exports=jKe});var QV=pt((zbn,WV)=>{function $Ke(e){return this.__data__.has(e)}WV.exports=$Ke});var ED=pt((Hbn,YV)=>{var UKe=typeof global=="object"&&global&&global.Object===Object&&global;YV.exports=UKe});var us=pt((Gbn,JV)=>{var WKe=ED(),QKe=typeof self=="object"&&self&&self.Object===Object&&self,YKe=WKe||QKe||Function("return this")();JV.exports=YKe});var qd=pt((jbn,KV)=>{var JKe=us(),KKe=JKe.Symbol;KV.exports=KKe});var tq=pt(($bn,eq)=>{var XV=qd(),ZV=Object.prototype,XKe=ZV.hasOwnProperty,ZKe=ZV.toString,D1=XV?XV.toStringTag:void 0;function eXe(e){var o=XKe.call(e,D1),t=e[D1];try{e[D1]=void 0;var n=!0}catch{}var i=ZKe.call(e);return n&&(o?e[D1]=t:delete e[D1]),i}eq.exports=eXe});var nq=pt((Ubn,iq)=>{var tXe=Object.prototype,iXe=tXe.toString;function nXe(e){return iXe.call(e)}iq.exports=nXe});var Xp=pt((Wbn,rq)=>{var oq=qd(),oXe=tq(),aXe=nq(),rXe="[object Null]",lXe="[object Undefined]",aq=oq?oq.toStringTag:void 0;function sXe(e){return e==null?e===void 0?lXe:rXe:aq&&aq in Object(e)?oXe(e):aXe(e)}rq.exports=sXe});var Ll=pt((Qbn,lq)=>{function cXe(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}lq.exports=cXe});var pu=pt((Ybn,sq)=>{var pXe=Xp(),mXe=Ll(),dXe="[object AsyncFunction]",uXe="[object Function]",fXe="[object GeneratorFunction]",hXe="[object Proxy]";function gXe(e){if(!mXe(e))return!1;var o=pXe(e);return o==uXe||o==fXe||o==dXe||o==hXe}sq.exports=gXe});var pq=pt((Jbn,cq)=>{var _Xe=us(),CXe=_Xe["__core-js_shared__"];cq.exports=CXe});var uq=pt((Kbn,dq)=>{var ID=pq(),mq=(function(){var e=/[^.]+$/.exec(ID&&ID.keys&&ID.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function vXe(e){return!!mq&&mq in e}dq.exports=vXe});var OD=pt((Xbn,fq)=>{var xXe=Function.prototype,bXe=xXe.toString;function yXe(e){if(e!=null){try{return bXe.call(e)}catch{}try{return e+""}catch{}}return""}fq.exports=yXe});var gq=pt((Zbn,hq)=>{var SXe=pu(),wXe=uq(),PXe=Ll(),TXe=OD(),MXe=/[\\^$.*+?()[\]{}|]/g,DXe=/^\[object .+?Constructor\]$/,EXe=Function.prototype,IXe=Object.prototype,OXe=EXe.toString,AXe=IXe.hasOwnProperty,FXe=RegExp("^"+OXe.call(AXe).replace(MXe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kXe(e){if(!PXe(e)||wXe(e))return!1;var o=SXe(e)?FXe:DXe;return o.test(TXe(e))}hq.exports=kXe});var Cq=pt((eyn,_q)=>{function BXe(e,o){return e?.[o]}_q.exports=BXe});var Zp=pt((tyn,vq)=>{var RXe=gq(),NXe=Cq();function LXe(e,o){var t=NXe(e,o);return RXe(t)?t:void 0}vq.exports=LXe});var Fb=pt((iyn,xq)=>{var VXe=Zp(),qXe=us(),zXe=VXe(qXe,"Map");xq.exports=zXe});var E1=pt((nyn,bq)=>{var HXe=Zp(),GXe=HXe(Object,"create");bq.exports=GXe});var wq=pt((oyn,Sq)=>{var yq=E1();function jXe(){this.__data__=yq?yq(null):{},this.size=0}Sq.exports=jXe});var Tq=pt((ayn,Pq)=>{function $Xe(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}Pq.exports=$Xe});var Dq=pt((ryn,Mq)=>{var UXe=E1(),WXe="__lodash_hash_undefined__",QXe=Object.prototype,YXe=QXe.hasOwnProperty;function JXe(e){var o=this.__data__;if(UXe){var t=o[e];return t===WXe?void 0:t}return YXe.call(o,e)?o[e]:void 0}Mq.exports=JXe});var Iq=pt((lyn,Eq)=>{var KXe=E1(),XXe=Object.prototype,ZXe=XXe.hasOwnProperty;function eZe(e){var o=this.__data__;return KXe?o[e]!==void 0:ZXe.call(o,e)}Eq.exports=eZe});var Aq=pt((syn,Oq)=>{var tZe=E1(),iZe="__lodash_hash_undefined__";function nZe(e,o){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=tZe&&o===void 0?iZe:o,this}Oq.exports=nZe});var kq=pt((cyn,Fq)=>{var oZe=wq(),aZe=Tq(),rZe=Dq(),lZe=Iq(),sZe=Aq();function mu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var Bq=kq(),cZe=M1(),pZe=Fb();function mZe(){this.size=0,this.__data__={hash:new Bq,map:new(pZe||cZe),string:new Bq}}Rq.exports=mZe});var Vq=pt((myn,Lq)=>{function dZe(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}Lq.exports=dZe});var I1=pt((dyn,qq)=>{var uZe=Vq();function fZe(e,o){var t=e.__data__;return uZe(o)?t[typeof o=="string"?"string":"hash"]:t.map}qq.exports=fZe});var Hq=pt((uyn,zq)=>{var hZe=I1();function gZe(e){var o=hZe(this,e).delete(e);return this.size-=o?1:0,o}zq.exports=gZe});var jq=pt((fyn,Gq)=>{var _Ze=I1();function CZe(e){return _Ze(this,e).get(e)}Gq.exports=CZe});var Uq=pt((hyn,$q)=>{var vZe=I1();function xZe(e){return vZe(this,e).has(e)}$q.exports=xZe});var Qq=pt((gyn,Wq)=>{var bZe=I1();function yZe(e,o){var t=bZe(this,e),n=t.size;return t.set(e,o),this.size+=t.size==n?0:1,this}Wq.exports=yZe});var kb=pt((_yn,Yq)=>{var SZe=Nq(),wZe=Hq(),PZe=jq(),TZe=Uq(),MZe=Qq();function du(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var DZe=M1(),EZe=Fb(),IZe=kb(),OZe=200;function AZe(e,o){var t=this.__data__;if(t instanceof DZe){var n=t.__data__;if(!EZe||n.length{var FZe=M1(),kZe=HV(),BZe=jV(),RZe=UV(),NZe=QV(),LZe=Kq();function uu(e){var o=this.__data__=new FZe(e);this.size=o.size}uu.prototype.clear=kZe;uu.prototype.delete=BZe;uu.prototype.get=RZe;uu.prototype.has=NZe;uu.prototype.set=LZe;Xq.exports=uu});var Bb=pt((xyn,Zq)=>{function VZe(e,o){for(var t=-1,n=e==null?0:e.length;++t{var qZe=Zp(),zZe=(function(){try{var e=qZe(Object,"defineProperty");return e({},"",{}),e}catch{}})();ez.exports=zZe});var A1=pt((yyn,iz)=>{var tz=AD();function HZe(e,o,t){o=="__proto__"&&tz?tz(e,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[o]=t}iz.exports=HZe});var F1=pt((Syn,nz)=>{var GZe=A1(),jZe=Vd(),$Ze=Object.prototype,UZe=$Ze.hasOwnProperty;function WZe(e,o,t){var n=e[o];(!(UZe.call(e,o)&&jZe(n,t))||t===void 0&&!(o in e))&&GZe(e,o,t)}nz.exports=WZe});var fu=pt((wyn,oz)=>{var QZe=F1(),YZe=A1();function JZe(e,o,t,n){var i=!t;t||(t={});for(var s=-1,d=o.length;++s{function KZe(e,o){for(var t=-1,n=Array(e);++t{function XZe(e){return e!=null&&typeof e=="object"}lz.exports=XZe});var cz=pt((Myn,sz)=>{var ZZe=Xp(),eet=qs(),tet="[object Arguments]";function iet(e){return eet(e)&&ZZe(e)==tet}sz.exports=iet});var hu=pt((Dyn,dz)=>{var pz=cz(),net=qs(),mz=Object.prototype,oet=mz.hasOwnProperty,aet=mz.propertyIsEnumerable,ret=pz((function(){return arguments})())?pz:function(e){return net(e)&&oet.call(e,"callee")&&!aet.call(e,"callee")};dz.exports=ret});var Wa=pt((Eyn,uz)=>{var set=Array.isArray;uz.exports=set});var hz=pt((Iyn,fz)=>{function cet(){return!1}fz.exports=cet});var zd=pt((k1,gu)=>{var pet=us(),met=hz(),Cz=typeof k1=="object"&&k1&&!k1.nodeType&&k1,gz=Cz&&typeof gu=="object"&&gu&&!gu.nodeType&&gu,det=gz&&gz.exports===Cz,_z=det?pet.Buffer:void 0,uet=_z?_z.isBuffer:void 0,fet=uet||met;gu.exports=fet});var B1=pt((Oyn,vz)=>{var het=9007199254740991,get=/^(?:0|[1-9]\d*)$/;function _et(e,o){var t=typeof e;return o=o??het,!!o&&(t=="number"||t!="symbol"&&get.test(e))&&e>-1&&e%1==0&&e{var Cet=9007199254740991;function vet(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cet}xz.exports=vet});var yz=pt((Fyn,bz)=>{var xet=Xp(),bet=Rb(),yet=qs(),wet="[object Arguments]",Pet="[object Array]",Tet="[object Boolean]",Met="[object Date]",Det="[object Error]",Eet="[object Function]",Iet="[object Map]",Oet="[object Number]",Aet="[object Object]",Fet="[object RegExp]",ket="[object Set]",Bet="[object String]",Ret="[object WeakMap]",Net="[object ArrayBuffer]",Let="[object DataView]",Vet="[object Float32Array]",qet="[object Float64Array]",zet="[object Int8Array]",Het="[object Int16Array]",Get="[object Int32Array]",jet="[object Uint8Array]",$et="[object Uint8ClampedArray]",Uet="[object Uint16Array]",Wet="[object Uint32Array]",ya={};ya[Vet]=ya[qet]=ya[zet]=ya[Het]=ya[Get]=ya[jet]=ya[$et]=ya[Uet]=ya[Wet]=!0;ya[wet]=ya[Pet]=ya[Net]=ya[Tet]=ya[Let]=ya[Met]=ya[Det]=ya[Eet]=ya[Iet]=ya[Oet]=ya[Aet]=ya[Fet]=ya[ket]=ya[Bet]=ya[Ret]=!1;function Qet(e){return yet(e)&&bet(e.length)&&!!ya[xet(e)]}bz.exports=Qet});var R1=pt((kyn,Sz)=>{function Yet(e){return function(o){return e(o)}}Sz.exports=Yet});var Nb=pt((N1,_u)=>{var Jet=ED(),wz=typeof N1=="object"&&N1&&!N1.nodeType&&N1,L1=wz&&typeof _u=="object"&&_u&&!_u.nodeType&&_u,Ket=L1&&L1.exports===wz,FD=Ket&&Jet.process,Xet=(function(){try{var e=L1&&L1.require&&L1.require("util").types;return e||FD&&FD.binding&&FD.binding("util")}catch{}})();_u.exports=Xet});var Cu=pt((Byn,Mz)=>{var Zet=yz(),ett=R1(),Pz=Nb(),Tz=Pz&&Pz.isTypedArray,ttt=Tz?ett(Tz):Zet;Mz.exports=ttt});var kD=pt((Ryn,Dz)=>{var itt=rz(),ntt=hu(),ott=Wa(),att=zd(),rtt=B1(),ltt=Cu(),stt=Object.prototype,ctt=stt.hasOwnProperty;function ptt(e,o){var t=ott(e),n=!t&&ntt(e),i=!t&&!n&&att(e),s=!t&&!n&&!i&<t(e),d=t||n||i||s,u=d?itt(e.length,String):[],f=u.length;for(var _ in e)(o||ctt.call(e,_))&&!(d&&(_=="length"||i&&(_=="offset"||_=="parent")||s&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||rtt(_,f)))&&u.push(_);return u}Dz.exports=ptt});var V1=pt((Nyn,Ez)=>{var mtt=Object.prototype;function dtt(e){var o=e&&e.constructor,t=typeof o=="function"&&o.prototype||mtt;return e===t}Ez.exports=dtt});var BD=pt((Lyn,Iz)=>{function utt(e,o){return function(t){return e(o(t))}}Iz.exports=utt});var Az=pt((Vyn,Oz)=>{var ftt=BD(),htt=ftt(Object.keys,Object);Oz.exports=htt});var Lb=pt((qyn,Fz)=>{var gtt=V1(),_tt=Az(),Ctt=Object.prototype,vtt=Ctt.hasOwnProperty;function xtt(e){if(!gtt(e))return _tt(e);var o=[];for(var t in Object(e))vtt.call(e,t)&&t!="constructor"&&o.push(t);return o}Fz.exports=xtt});var vc=pt((zyn,kz)=>{var btt=pu(),ytt=Rb();function Stt(e){return e!=null&&ytt(e.length)&&!btt(e)}kz.exports=Stt});var Zc=pt((Hyn,Bz)=>{var wtt=kD(),Ptt=Lb(),Ttt=vc();function Mtt(e){return Ttt(e)?wtt(e):Ptt(e)}Bz.exports=Mtt});var Nz=pt((Gyn,Rz)=>{var Dtt=fu(),Ett=Zc();function Itt(e,o){return e&&Dtt(o,Ett(o),e)}Rz.exports=Itt});var Vz=pt((jyn,Lz)=>{function Ott(e){var o=[];if(e!=null)for(var t in Object(e))o.push(t);return o}Lz.exports=Ott});var zz=pt(($yn,qz)=>{var Att=Ll(),Ftt=V1(),ktt=Vz(),Btt=Object.prototype,Rtt=Btt.hasOwnProperty;function Ntt(e){if(!Att(e))return ktt(e);var o=Ftt(e),t=[];for(var n in e)n=="constructor"&&(o||!Rtt.call(e,n))||t.push(n);return t}qz.exports=Ntt});var em=pt((Uyn,Hz)=>{var Ltt=kD(),Vtt=zz(),qtt=vc();function ztt(e){return qtt(e)?Ltt(e,!0):Vtt(e)}Hz.exports=ztt});var jz=pt((Wyn,Gz)=>{var Htt=fu(),Gtt=em();function jtt(e,o){return e&&Htt(o,Gtt(o),e)}Gz.exports=jtt});var RD=pt((q1,vu)=>{var $tt=us(),Qz=typeof q1=="object"&&q1&&!q1.nodeType&&q1,$z=Qz&&typeof vu=="object"&&vu&&!vu.nodeType&&vu,Utt=$z&&$z.exports===Qz,Uz=Utt?$tt.Buffer:void 0,Wz=Uz?Uz.allocUnsafe:void 0;function Wtt(e,o){if(o)return e.slice();var t=e.length,n=Wz?Wz(t):new e.constructor(t);return e.copy(n),n}vu.exports=Wtt});var ND=pt((Qyn,Yz)=>{function Qtt(e,o){var t=-1,n=e.length;for(o||(o=Array(n));++t{function Ytt(e,o){for(var t=-1,n=e==null?0:e.length,i=0,s=[];++t{function Jtt(){return[]}Kz.exports=Jtt});var Vb=pt((Kyn,Zz)=>{var Ktt=LD(),Xtt=VD(),Ztt=Object.prototype,eit=Ztt.propertyIsEnumerable,Xz=Object.getOwnPropertySymbols,tit=Xz?function(e){return e==null?[]:(e=Object(e),Ktt(Xz(e),function(o){return eit.call(e,o)}))}:Xtt;Zz.exports=tit});var tH=pt((Xyn,eH)=>{var iit=fu(),nit=Vb();function oit(e,o){return iit(e,nit(e),o)}eH.exports=oit});var qb=pt((Zyn,iH)=>{function ait(e,o){for(var t=-1,n=o.length,i=e.length;++t{var rit=BD(),lit=rit(Object.getPrototypeOf,Object);nH.exports=lit});var qD=pt((t3n,oH)=>{var sit=qb(),cit=z1(),pit=Vb(),mit=VD(),dit=Object.getOwnPropertySymbols,uit=dit?function(e){for(var o=[];e;)sit(o,pit(e)),e=cit(e);return o}:mit;oH.exports=uit});var rH=pt((i3n,aH)=>{var fit=fu(),hit=qD();function git(e,o){return fit(e,hit(e),o)}aH.exports=git});var zD=pt((n3n,lH)=>{var _it=qb(),Cit=Wa();function vit(e,o,t){var n=o(e);return Cit(e)?n:_it(n,t(e))}lH.exports=vit});var HD=pt((o3n,sH)=>{var xit=zD(),bit=Vb(),yit=Zc();function Sit(e){return xit(e,yit,bit)}sH.exports=Sit});var pH=pt((a3n,cH)=>{var wit=zD(),Pit=qD(),Tit=em();function Mit(e){return wit(e,Tit,Pit)}cH.exports=Mit});var dH=pt((r3n,mH)=>{var Dit=Zp(),Eit=us(),Iit=Dit(Eit,"DataView");mH.exports=Iit});var fH=pt((l3n,uH)=>{var Oit=Zp(),Ait=us(),Fit=Oit(Ait,"Promise");uH.exports=Fit});var GD=pt((s3n,hH)=>{var kit=Zp(),Bit=us(),Rit=kit(Bit,"Set");hH.exports=Rit});var _H=pt((c3n,gH)=>{var Nit=Zp(),Lit=us(),Vit=Nit(Lit,"WeakMap");gH.exports=Vit});var Gd=pt((p3n,wH)=>{var jD=dH(),$D=Fb(),UD=fH(),WD=GD(),QD=_H(),SH=Xp(),xu=OD(),CH="[object Map]",qit="[object Object]",vH="[object Promise]",xH="[object Set]",bH="[object WeakMap]",yH="[object DataView]",zit=xu(jD),Hit=xu($D),Git=xu(UD),jit=xu(WD),$it=xu(QD),Hd=SH;(jD&&Hd(new jD(new ArrayBuffer(1)))!=yH||$D&&Hd(new $D)!=CH||UD&&Hd(UD.resolve())!=vH||WD&&Hd(new WD)!=xH||QD&&Hd(new QD)!=bH)&&(Hd=function(e){var o=SH(e),t=o==qit?e.constructor:void 0,n=t?xu(t):"";if(n)switch(n){case zit:return yH;case Hit:return CH;case Git:return vH;case jit:return xH;case $it:return bH}return o});wH.exports=Hd});var TH=pt((m3n,PH)=>{var Uit=Object.prototype,Wit=Uit.hasOwnProperty;function Qit(e){var o=e.length,t=new e.constructor(o);return o&&typeof e[0]=="string"&&Wit.call(e,"index")&&(t.index=e.index,t.input=e.input),t}PH.exports=Qit});var YD=pt((d3n,MH)=>{var Yit=us(),Jit=Yit.Uint8Array;MH.exports=Jit});var zb=pt((u3n,EH)=>{var DH=YD();function Kit(e){var o=new e.constructor(e.byteLength);return new DH(o).set(new DH(e)),o}EH.exports=Kit});var OH=pt((f3n,IH)=>{var Xit=zb();function Zit(e,o){var t=o?Xit(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}IH.exports=Zit});var FH=pt((h3n,AH)=>{var ent=/\w*$/;function tnt(e){var o=new e.constructor(e.source,ent.exec(e));return o.lastIndex=e.lastIndex,o}AH.exports=tnt});var LH=pt((g3n,NH)=>{var kH=qd(),BH=kH?kH.prototype:void 0,RH=BH?BH.valueOf:void 0;function int(e){return RH?Object(RH.call(e)):{}}NH.exports=int});var JD=pt((_3n,VH)=>{var nnt=zb();function ont(e,o){var t=o?nnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}VH.exports=ont});var zH=pt((C3n,qH)=>{var ant=zb(),rnt=OH(),lnt=FH(),snt=LH(),cnt=JD(),pnt="[object Boolean]",mnt="[object Date]",dnt="[object Map]",unt="[object Number]",fnt="[object RegExp]",hnt="[object Set]",gnt="[object String]",_nt="[object Symbol]",Cnt="[object ArrayBuffer]",vnt="[object DataView]",xnt="[object Float32Array]",bnt="[object Float64Array]",ynt="[object Int8Array]",Snt="[object Int16Array]",wnt="[object Int32Array]",Pnt="[object Uint8Array]",Tnt="[object Uint8ClampedArray]",Mnt="[object Uint16Array]",Dnt="[object Uint32Array]";function Ent(e,o,t){var n=e.constructor;switch(o){case Cnt:return ant(e);case pnt:case mnt:return new n(+e);case vnt:return rnt(e,t);case xnt:case bnt:case ynt:case Snt:case wnt:case Pnt:case Tnt:case Mnt:case Dnt:return cnt(e,t);case dnt:return new n;case unt:case gnt:return new n(e);case fnt:return lnt(e);case hnt:return new n;case _nt:return snt(e)}}qH.exports=Ent});var KD=pt((v3n,GH)=>{var Int=Ll(),HH=Object.create,Ont=(function(){function e(){}return function(o){if(!Int(o))return{};if(HH)return HH(o);e.prototype=o;var t=new e;return e.prototype=void 0,t}})();GH.exports=Ont});var XD=pt((x3n,jH)=>{var Ant=KD(),Fnt=z1(),knt=V1();function Bnt(e){return typeof e.constructor=="function"&&!knt(e)?Ant(Fnt(e)):{}}jH.exports=Bnt});var UH=pt((b3n,$H)=>{var Rnt=Gd(),Nnt=qs(),Lnt="[object Map]";function Vnt(e){return Nnt(e)&&Rnt(e)==Lnt}$H.exports=Vnt});var JH=pt((y3n,YH)=>{var qnt=UH(),znt=R1(),WH=Nb(),QH=WH&&WH.isMap,Hnt=QH?znt(QH):qnt;YH.exports=Hnt});var XH=pt((S3n,KH)=>{var Gnt=Gd(),jnt=qs(),$nt="[object Set]";function Unt(e){return jnt(e)&&Gnt(e)==$nt}KH.exports=Unt});var iG=pt((w3n,tG)=>{var Wnt=XH(),Qnt=R1(),ZH=Nb(),eG=ZH&&ZH.isSet,Ynt=eG?Qnt(eG):Wnt;tG.exports=Ynt});var ZD=pt((P3n,rG)=>{var Jnt=O1(),Knt=Bb(),Xnt=F1(),Znt=Nz(),eot=jz(),tot=RD(),iot=ND(),not=tH(),oot=rH(),aot=HD(),rot=pH(),lot=Gd(),sot=TH(),cot=zH(),pot=XD(),mot=Wa(),dot=zd(),uot=JH(),fot=Ll(),hot=iG(),got=Zc(),_ot=em(),Cot=1,vot=2,xot=4,nG="[object Arguments]",bot="[object Array]",yot="[object Boolean]",Sot="[object Date]",wot="[object Error]",oG="[object Function]",Pot="[object GeneratorFunction]",Tot="[object Map]",Mot="[object Number]",aG="[object Object]",Dot="[object RegExp]",Eot="[object Set]",Iot="[object String]",Oot="[object Symbol]",Aot="[object WeakMap]",Fot="[object ArrayBuffer]",kot="[object DataView]",Bot="[object Float32Array]",Rot="[object Float64Array]",Not="[object Int8Array]",Lot="[object Int16Array]",Vot="[object Int32Array]",qot="[object Uint8Array]",zot="[object Uint8ClampedArray]",Hot="[object Uint16Array]",Got="[object Uint32Array]",Ca={};Ca[nG]=Ca[bot]=Ca[Fot]=Ca[kot]=Ca[yot]=Ca[Sot]=Ca[Bot]=Ca[Rot]=Ca[Not]=Ca[Lot]=Ca[Vot]=Ca[Tot]=Ca[Mot]=Ca[aG]=Ca[Dot]=Ca[Eot]=Ca[Iot]=Ca[Oot]=Ca[qot]=Ca[zot]=Ca[Hot]=Ca[Got]=!0;Ca[wot]=Ca[oG]=Ca[Aot]=!1;function Hb(e,o,t,n,i,s){var d,u=o&Cot,f=o&vot,_=o&xot;if(t&&(d=i?t(e,n,i,s):t(e)),d!==void 0)return d;if(!fot(e))return e;var C=mot(e);if(C){if(d=sot(e),!u)return iot(e,d)}else{var x=lot(e),y=x==oG||x==Pot;if(dot(e))return tot(e,u);if(x==aG||x==nG||y&&!i){if(d=f||y?{}:pot(e),!u)return f?oot(e,eot(d,e)):not(e,Znt(d,e))}else{if(!Ca[x])return i?e:{};d=cot(e,x,u)}}s||(s=new Jnt);var P=s.get(e);if(P)return P;s.set(e,d),hot(e)?e.forEach(function(D){d.add(Hb(D,o,t,D,e,s))}):uot(e)&&e.forEach(function(D,k){d.set(k,Hb(D,o,t,k,e,s))});var S=_?f?rot:aot:f?_ot:got,M=C?void 0:S(e);return Knt(M||e,function(D,k){M&&(k=D,D=e[k]),Xnt(d,k,Hb(D,o,t,k,e,s))}),d}rG.exports=Hb});var sG=pt((T3n,lG)=>{var jot=ZD(),$ot=4;function Uot(e){return jot(e,$ot)}lG.exports=Uot});var Gb=pt((M3n,cG)=>{function Wot(e){return function(){return e}}cG.exports=Wot});var mG=pt((D3n,pG)=>{function Qot(e){return function(o,t,n){for(var i=-1,s=Object(o),d=n(o),u=d.length;u--;){var f=d[e?u:++i];if(t(s[f],f,s)===!1)break}return o}}pG.exports=Qot});var jb=pt((E3n,dG)=>{var Yot=mG(),Jot=Yot();dG.exports=Jot});var $b=pt((I3n,uG)=>{var Kot=jb(),Xot=Zc();function Zot(e,o){return e&&Kot(e,o,Xot)}uG.exports=Zot});var hG=pt((O3n,fG)=>{var eat=vc();function tat(e,o){return function(t,n){if(t==null)return t;if(!eat(t))return e(t,n);for(var i=t.length,s=o?i:-1,d=Object(t);(o?s--:++s{var iat=$b(),nat=hG(),oat=nat(iat);gG.exports=oat});var tm=pt((F3n,_G)=>{function aat(e){return e}_G.exports=aat});var eE=pt((k3n,CG)=>{var rat=tm();function lat(e){return typeof e=="function"?e:rat}CG.exports=lat});var tE=pt((B3n,vG)=>{var sat=Bb(),cat=H1(),pat=eE(),mat=Wa();function dat(e,o){var t=mat(e)?sat:cat;return t(e,pat(o))}vG.exports=dat});var iE=pt((R3n,xG)=>{xG.exports=tE()});var yG=pt((N3n,bG)=>{var uat=H1();function fat(e,o){var t=[];return uat(e,function(n,i,s){o(n,i,s)&&t.push(n)}),t}bG.exports=fat});var wG=pt((L3n,SG)=>{var hat="__lodash_hash_undefined__";function gat(e){return this.__data__.set(e,hat),this}SG.exports=gat});var TG=pt((V3n,PG)=>{function _at(e){return this.__data__.has(e)}PG.exports=_at});var nE=pt((q3n,MG)=>{var Cat=kb(),vat=wG(),xat=TG();function Ub(e){var o=-1,t=e==null?0:e.length;for(this.__data__=new Cat;++o{function bat(e,o){for(var t=-1,n=e==null?0:e.length;++t{function yat(e,o){return e.has(o)}IG.exports=yat});var aE=pt((G3n,OG)=>{var Sat=nE(),wat=EG(),Pat=oE(),Tat=1,Mat=2;function Dat(e,o,t,n,i,s){var d=t&Tat,u=e.length,f=o.length;if(u!=f&&!(d&&f>u))return!1;var _=s.get(e),C=s.get(o);if(_&&C)return _==o&&C==e;var x=-1,y=!0,P=t&Mat?new Sat:void 0;for(s.set(e,o),s.set(o,e);++x{function Eat(e){var o=-1,t=Array(e.size);return e.forEach(function(n,i){t[++o]=[i,n]}),t}AG.exports=Eat});var Wb=pt(($3n,kG)=>{function Iat(e){var o=-1,t=Array(e.size);return e.forEach(function(n){t[++o]=n}),t}kG.exports=Iat});var VG=pt((U3n,LG)=>{var BG=qd(),RG=YD(),Oat=Vd(),Aat=aE(),Fat=FG(),kat=Wb(),Bat=1,Rat=2,Nat="[object Boolean]",Lat="[object Date]",Vat="[object Error]",qat="[object Map]",zat="[object Number]",Hat="[object RegExp]",Gat="[object Set]",jat="[object String]",$at="[object Symbol]",Uat="[object ArrayBuffer]",Wat="[object DataView]",NG=BG?BG.prototype:void 0,rE=NG?NG.valueOf:void 0;function Qat(e,o,t,n,i,s,d){switch(t){case Wat:if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case Uat:return!(e.byteLength!=o.byteLength||!s(new RG(e),new RG(o)));case Nat:case Lat:case zat:return Oat(+e,+o);case Vat:return e.name==o.name&&e.message==o.message;case Hat:case jat:return e==o+"";case qat:var u=Fat;case Gat:var f=n&Bat;if(u||(u=kat),e.size!=o.size&&!f)return!1;var _=d.get(e);if(_)return _==o;n|=Rat,d.set(e,o);var C=Aat(u(e),u(o),n,i,s,d);return d.delete(e),C;case $at:if(rE)return rE.call(e)==rE.call(o)}return!1}LG.exports=Qat});var HG=pt((W3n,zG)=>{var qG=HD(),Yat=1,Jat=Object.prototype,Kat=Jat.hasOwnProperty;function Xat(e,o,t,n,i,s){var d=t&Yat,u=qG(e),f=u.length,_=qG(o),C=_.length;if(f!=C&&!d)return!1;for(var x=f;x--;){var y=u[x];if(!(d?y in o:Kat.call(o,y)))return!1}var P=s.get(e),S=s.get(o);if(P&&S)return P==o&&S==e;var M=!0;s.set(e,o),s.set(o,e);for(var D=d;++x{var lE=O1(),Zat=aE(),ert=VG(),trt=HG(),GG=Gd(),jG=Wa(),$G=zd(),irt=Cu(),nrt=1,UG="[object Arguments]",WG="[object Array]",Qb="[object Object]",ort=Object.prototype,QG=ort.hasOwnProperty;function art(e,o,t,n,i,s){var d=jG(e),u=jG(o),f=d?WG:GG(e),_=u?WG:GG(o);f=f==UG?Qb:f,_=_==UG?Qb:_;var C=f==Qb,x=_==Qb,y=f==_;if(y&&$G(e)){if(!$G(o))return!1;d=!0,C=!1}if(y&&!C)return s||(s=new lE),d||irt(e)?Zat(e,o,t,n,i,s):ert(e,o,f,t,n,i,s);if(!(t&nrt)){var P=C&&QG.call(e,"__wrapped__"),S=x&&QG.call(o,"__wrapped__");if(P||S){var M=P?e.value():e,D=S?o.value():o;return s||(s=new lE),i(M,D,t,n,s)}}return y?(s||(s=new lE),trt(e,o,t,n,i,s)):!1}YG.exports=art});var sE=pt((Y3n,ZG)=>{var rrt=JG(),KG=qs();function XG(e,o,t,n,i){return e===o?!0:e==null||o==null||!KG(e)&&!KG(o)?e!==e&&o!==o:rrt(e,o,t,n,XG,i)}ZG.exports=XG});var tj=pt((J3n,ej)=>{var lrt=O1(),srt=sE(),crt=1,prt=2;function mrt(e,o,t,n){var i=t.length,s=i,d=!n;if(e==null)return!s;for(e=Object(e);i--;){var u=t[i];if(d&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i{var drt=Ll();function urt(e){return e===e&&!drt(e)}ij.exports=urt});var oj=pt((X3n,nj)=>{var frt=cE(),hrt=Zc();function grt(e){for(var o=hrt(e),t=o.length;t--;){var n=o[t],i=e[n];o[t]=[n,i,frt(i)]}return o}nj.exports=grt});var pE=pt((Z3n,aj)=>{function _rt(e,o){return function(t){return t==null?!1:t[e]===o&&(o!==void 0||e in Object(t))}}aj.exports=_rt});var lj=pt((eSn,rj)=>{var Crt=tj(),vrt=oj(),xrt=pE();function brt(e){var o=vrt(e);return o.length==1&&o[0][2]?xrt(o[0][0],o[0][1]):function(t){return t===e||Crt(t,e,o)}}rj.exports=brt});var jd=pt((tSn,sj)=>{var yrt=Xp(),Srt=qs(),wrt="[object Symbol]";function Prt(e){return typeof e=="symbol"||Srt(e)&&yrt(e)==wrt}sj.exports=Prt});var Yb=pt((iSn,cj)=>{var Trt=Wa(),Mrt=jd(),Drt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ert=/^\w*$/;function Irt(e,o){if(Trt(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Mrt(e)?!0:Ert.test(e)||!Drt.test(e)||o!=null&&e in Object(o)}cj.exports=Irt});var dj=pt((nSn,mj)=>{var pj=kb(),Ort="Expected a function";function mE(e,o){if(typeof e!="function"||o!=null&&typeof o!="function")throw new TypeError(Ort);var t=function(){var n=arguments,i=o?o.apply(this,n):n[0],s=t.cache;if(s.has(i))return s.get(i);var d=e.apply(this,n);return t.cache=s.set(i,d)||s,d};return t.cache=new(mE.Cache||pj),t}mE.Cache=pj;mj.exports=mE});var fj=pt((oSn,uj)=>{var Art=dj(),Frt=500;function krt(e){var o=Art(e,function(n){return t.size===Frt&&t.clear(),n}),t=o.cache;return o}uj.exports=krt});var gj=pt((aSn,hj)=>{var Brt=fj(),Rrt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nrt=/\\(\\)?/g,Lrt=Brt(function(e){var o=[];return e.charCodeAt(0)===46&&o.push(""),e.replace(Rrt,function(t,n,i,s){o.push(i?s.replace(Nrt,"$1"):n||t)}),o});hj.exports=Lrt});var G1=pt((rSn,_j)=>{function Vrt(e,o){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t{var Cj=qd(),qrt=G1(),zrt=Wa(),Hrt=jd(),Grt=1/0,vj=Cj?Cj.prototype:void 0,xj=vj?vj.toString:void 0;function bj(e){if(typeof e=="string")return e;if(zrt(e))return qrt(e,bj)+"";if(Hrt(e))return xj?xj.call(e):"";var o=e+"";return o=="0"&&1/e==-Grt?"-0":o}yj.exports=bj});var dE=pt((sSn,wj)=>{var jrt=Sj();function $rt(e){return e==null?"":jrt(e)}wj.exports=$rt});var j1=pt((cSn,Pj)=>{var Urt=Wa(),Wrt=Yb(),Qrt=gj(),Yrt=dE();function Jrt(e,o){return Urt(e)?e:Wrt(e,o)?[e]:Qrt(Yrt(e))}Pj.exports=Jrt});var bu=pt((pSn,Tj)=>{var Krt=jd(),Xrt=1/0;function Zrt(e){if(typeof e=="string"||Krt(e))return e;var o=e+"";return o=="0"&&1/e==-Xrt?"-0":o}Tj.exports=Zrt});var $1=pt((mSn,Mj)=>{var elt=j1(),tlt=bu();function ilt(e,o){o=elt(o,e);for(var t=0,n=o.length;e!=null&&t{var nlt=$1();function olt(e,o,t){var n=e==null?void 0:nlt(e,o);return n===void 0?t:n}Dj.exports=olt});var Oj=pt((uSn,Ij)=>{function alt(e,o){return e!=null&&o in Object(e)}Ij.exports=alt});var uE=pt((fSn,Aj)=>{var rlt=j1(),llt=hu(),slt=Wa(),clt=B1(),plt=Rb(),mlt=bu();function dlt(e,o,t){o=rlt(o,e);for(var n=-1,i=o.length,s=!1;++n{var ult=Oj(),flt=uE();function hlt(e,o){return e!=null&&flt(e,o,ult)}Fj.exports=hlt});var Bj=pt((gSn,kj)=>{var glt=sE(),_lt=Ej(),Clt=fE(),vlt=Yb(),xlt=cE(),blt=pE(),ylt=bu(),Slt=1,wlt=2;function Plt(e,o){return vlt(e)&&xlt(o)?blt(ylt(e),o):function(t){var n=_lt(t,e);return n===void 0&&n===o?Clt(t,e):glt(o,n,Slt|wlt)}}kj.exports=Plt});var hE=pt((_Sn,Rj)=>{function Tlt(e){return function(o){return o?.[e]}}Rj.exports=Tlt});var Lj=pt((CSn,Nj)=>{var Mlt=$1();function Dlt(e){return function(o){return Mlt(o,e)}}Nj.exports=Dlt});var qj=pt((vSn,Vj)=>{var Elt=hE(),Ilt=Lj(),Olt=Yb(),Alt=bu();function Flt(e){return Olt(e)?Elt(Alt(e)):Ilt(e)}Vj.exports=Flt});var xc=pt((xSn,zj)=>{var klt=lj(),Blt=Bj(),Rlt=tm(),Nlt=Wa(),Llt=qj();function Vlt(e){return typeof e=="function"?e:e==null?Rlt:typeof e=="object"?Nlt(e)?Blt(e[0],e[1]):klt(e):Llt(e)}zj.exports=Vlt});var gE=pt((bSn,Hj)=>{var qlt=LD(),zlt=yG(),Hlt=xc(),Glt=Wa();function jlt(e,o){var t=Glt(e)?qlt:zlt;return t(e,Hlt(o,3))}Hj.exports=jlt});var jj=pt((ySn,Gj)=>{var $lt=Object.prototype,Ult=$lt.hasOwnProperty;function Wlt(e,o){return e!=null&&Ult.call(e,o)}Gj.exports=Wlt});var _E=pt((SSn,$j)=>{var Qlt=jj(),Ylt=uE();function Jlt(e,o){return e!=null&&Ylt(e,o,Qlt)}$j.exports=Jlt});var Wj=pt((wSn,Uj)=>{var Klt=Lb(),Xlt=Gd(),Zlt=hu(),est=Wa(),tst=vc(),ist=zd(),nst=V1(),ost=Cu(),ast="[object Map]",rst="[object Set]",lst=Object.prototype,sst=lst.hasOwnProperty;function cst(e){if(e==null)return!0;if(tst(e)&&(est(e)||typeof e=="string"||typeof e.splice=="function"||ist(e)||ost(e)||Zlt(e)))return!e.length;var o=Xlt(e);if(o==ast||o==rst)return!e.size;if(nst(e))return!Klt(e).length;for(var t in e)if(sst.call(e,t))return!1;return!0}Uj.exports=cst});var CE=pt((PSn,Qj)=>{function pst(e){return e===void 0}Qj.exports=pst});var vE=pt((TSn,Yj)=>{var mst=H1(),dst=vc();function ust(e,o){var t=-1,n=dst(e)?Array(e.length):[];return mst(e,function(i,s,d){n[++t]=o(i,s,d)}),n}Yj.exports=ust});var xE=pt((MSn,Jj)=>{var fst=G1(),hst=xc(),gst=vE(),_st=Wa();function Cst(e,o){var t=_st(e)?fst:gst;return t(e,hst(o,3))}Jj.exports=Cst});var Xj=pt((DSn,Kj)=>{function vst(e,o,t,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(t=e[++i]);++i{function xst(e,o,t,n,i){return i(e,function(s,d,u){t=n?(n=!1,s):o(t,s,d,u)}),t}Zj.exports=xst});var bE=pt((ISn,t$)=>{var bst=Xj(),yst=H1(),Sst=xc(),wst=e$(),Pst=Wa();function Tst(e,o,t){var n=Pst(e)?bst:wst,i=arguments.length<3;return n(e,Sst(o,4),t,i,yst)}t$.exports=Tst});var n$=pt((OSn,i$)=>{var Mst=Xp(),Dst=Wa(),Est=qs(),Ist="[object String]";function Ost(e){return typeof e=="string"||!Dst(e)&&Est(e)&&Mst(e)==Ist}i$.exports=Ost});var a$=pt((ASn,o$)=>{var Ast=hE(),Fst=Ast("length");o$.exports=Fst});var l$=pt((FSn,r$)=>{var kst="\\ud800-\\udfff",Bst="\\u0300-\\u036f",Rst="\\ufe20-\\ufe2f",Nst="\\u20d0-\\u20ff",Lst=Bst+Rst+Nst,Vst="\\ufe0e\\ufe0f",qst="\\u200d",zst=RegExp("["+qst+kst+Lst+Vst+"]");function Hst(e){return zst.test(e)}r$.exports=Hst});var g$=pt((kSn,h$)=>{var c$="\\ud800-\\udfff",Gst="\\u0300-\\u036f",jst="\\ufe20-\\ufe2f",$st="\\u20d0-\\u20ff",Ust=Gst+jst+$st,Wst="\\ufe0e\\ufe0f",Qst="["+c$+"]",yE="["+Ust+"]",SE="\\ud83c[\\udffb-\\udfff]",Yst="(?:"+yE+"|"+SE+")",p$="[^"+c$+"]",m$="(?:\\ud83c[\\udde6-\\uddff]){2}",d$="[\\ud800-\\udbff][\\udc00-\\udfff]",Jst="\\u200d",u$=Yst+"?",f$="["+Wst+"]?",Kst="(?:"+Jst+"(?:"+[p$,m$,d$].join("|")+")"+f$+u$+")*",Xst=f$+u$+Kst,Zst="(?:"+[p$+yE+"?",yE,m$,d$,Qst].join("|")+")",s$=RegExp(SE+"(?="+SE+")|"+Zst+Xst,"g");function ect(e){for(var o=s$.lastIndex=0;s$.test(e);)++o;return o}h$.exports=ect});var C$=pt((BSn,_$)=>{var tct=a$(),ict=l$(),nct=g$();function oct(e){return ict(e)?nct(e):tct(e)}_$.exports=oct});var x$=pt((RSn,v$)=>{var act=Lb(),rct=Gd(),lct=vc(),sct=n$(),cct=C$(),pct="[object Map]",mct="[object Set]";function dct(e){if(e==null)return 0;if(lct(e))return sct(e)?cct(e):e.length;var o=rct(e);return o==pct||o==mct?e.size:act(e).length}v$.exports=dct});var y$=pt((NSn,b$)=>{var uct=Bb(),fct=KD(),hct=$b(),gct=xc(),_ct=z1(),Cct=Wa(),vct=zd(),xct=pu(),bct=Ll(),yct=Cu();function Sct(e,o,t){var n=Cct(e),i=n||vct(e)||yct(e);if(o=gct(o,4),t==null){var s=e&&e.constructor;i?t=n?new s:[]:bct(e)?t=xct(s)?fct(_ct(e)):{}:t={}}return(i?uct:hct)(e,function(d,u,f){return o(t,d,u,f)}),t}b$.exports=Sct});var T$=pt((LSn,P$)=>{var S$=qd(),wct=hu(),Pct=Wa(),w$=S$?S$.isConcatSpreadable:void 0;function Tct(e){return Pct(e)||wct(e)||!!(w$&&e&&e[w$])}P$.exports=Tct});var Jb=pt((VSn,D$)=>{var Mct=qb(),Dct=T$();function M$(e,o,t,n,i){var s=-1,d=e.length;for(t||(t=Dct),i||(i=[]);++s0&&t(u)?o>1?M$(u,o-1,t,n,i):Mct(i,u):n||(i[i.length]=u)}return i}D$.exports=M$});var I$=pt((qSn,E$)=>{function Ect(e,o,t){switch(t.length){case 0:return e.call(o);case 1:return e.call(o,t[0]);case 2:return e.call(o,t[0],t[1]);case 3:return e.call(o,t[0],t[1],t[2])}return e.apply(o,t)}E$.exports=Ect});var wE=pt((zSn,A$)=>{var Ict=I$(),O$=Math.max;function Oct(e,o,t){return o=O$(o===void 0?e.length-1:o,0),function(){for(var n=arguments,i=-1,s=O$(n.length-o,0),d=Array(s);++i{var Act=Gb(),F$=AD(),Fct=tm(),kct=F$?function(e,o){return F$(e,"toString",{configurable:!0,enumerable:!1,value:Act(o),writable:!0})}:Fct;k$.exports=kct});var N$=pt((GSn,R$)=>{var Bct=800,Rct=16,Nct=Date.now;function Lct(e){var o=0,t=0;return function(){var n=Nct(),i=Rct-(n-t);if(t=n,i>0){if(++o>=Bct)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}R$.exports=Lct});var PE=pt((jSn,L$)=>{var Vct=B$(),qct=N$(),zct=qct(Vct);L$.exports=zct});var U1=pt(($Sn,V$)=>{var Hct=tm(),Gct=wE(),jct=PE();function $ct(e,o){return jct(Gct(e,o,Hct),e+"")}V$.exports=$ct});var TE=pt((USn,q$)=>{function Uct(e,o,t,n){for(var i=e.length,s=t+(n?1:-1);n?s--:++s{function Wct(e){return e!==e}z$.exports=Wct});var j$=pt((QSn,G$)=>{function Qct(e,o,t){for(var n=t-1,i=e.length;++n{var Yct=TE(),Jct=H$(),Kct=j$();function Xct(e,o,t){return o===o?Kct(e,o,t):Yct(e,Jct,t)}$$.exports=Xct});var Q$=pt((JSn,W$)=>{var Zct=U$();function ept(e,o){var t=e==null?0:e.length;return!!t&&Zct(e,o,0)>-1}W$.exports=ept});var J$=pt((KSn,Y$)=>{function tpt(e,o,t){for(var n=-1,i=e==null?0:e.length;++n{function ipt(){}K$.exports=ipt});var eU=pt((ZSn,Z$)=>{var ME=GD(),npt=X$(),opt=Wb(),apt=1/0,rpt=ME&&1/opt(new ME([,-0]))[1]==apt?function(e){return new ME(e)}:npt;Z$.exports=rpt});var iU=pt((ewn,tU)=>{var lpt=nE(),spt=Q$(),cpt=J$(),ppt=oE(),mpt=eU(),dpt=Wb(),upt=200;function fpt(e,o,t){var n=-1,i=spt,s=e.length,d=!0,u=[],f=u;if(t)d=!1,i=cpt;else if(s>=upt){var _=o?null:mpt(e);if(_)return dpt(_);d=!1,i=ppt,f=new lpt}else f=o?[]:u;e:for(;++n{var hpt=vc(),gpt=qs();function _pt(e){return gpt(e)&&hpt(e)}nU.exports=_pt});var aU=pt((iwn,oU)=>{var Cpt=Jb(),vpt=U1(),xpt=iU(),bpt=DE(),ypt=vpt(function(e){return xpt(Cpt(e,1,bpt,!0))});oU.exports=ypt});var lU=pt((nwn,rU)=>{var Spt=G1();function wpt(e,o){return Spt(o,function(t){return e[t]})}rU.exports=wpt});var EE=pt((own,sU)=>{var Ppt=lU(),Tpt=Zc();function Mpt(e){return e==null?[]:Ppt(e,Tpt(e))}sU.exports=Mpt});var Vl=pt((awn,cU)=>{var Kb;if(typeof Ms=="function")try{Kb={clone:sG(),constant:Gb(),each:iE(),filter:gE(),has:_E(),isArray:Wa(),isEmpty:Wj(),isFunction:pu(),isUndefined:CE(),keys:Zc(),map:xE(),reduce:bE(),size:x$(),transform:y$(),union:aU(),values:EE()}}catch{}Kb||(Kb=window._);cU.exports=Kb});var Xb=pt((lwn,uU)=>{"use strict";var to=Vl();uU.exports=vo;var Dpt="\0",$d="\0",pU="";function vo(e){this._isDirected=to.has(e,"directed")?e.directed:!0,this._isMultigraph=to.has(e,"multigraph")?e.multigraph:!1,this._isCompound=to.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=to.constant(void 0),this._defaultEdgeLabelFn=to.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[$d]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}vo.prototype._nodeCount=0;vo.prototype._edgeCount=0;vo.prototype.isDirected=function(){return this._isDirected};vo.prototype.isMultigraph=function(){return this._isMultigraph};vo.prototype.isCompound=function(){return this._isCompound};vo.prototype.setGraph=function(e){return this._label=e,this};vo.prototype.graph=function(){return this._label};vo.prototype.setDefaultNodeLabel=function(e){return to.isFunction(e)||(e=to.constant(e)),this._defaultNodeLabelFn=e,this};vo.prototype.nodeCount=function(){return this._nodeCount};vo.prototype.nodes=function(){return to.keys(this._nodes)};vo.prototype.sources=function(){var e=this;return to.filter(this.nodes(),function(o){return to.isEmpty(e._in[o])})};vo.prototype.sinks=function(){var e=this;return to.filter(this.nodes(),function(o){return to.isEmpty(e._out[o])})};vo.prototype.setNodes=function(e,o){var t=arguments,n=this;return to.each(e,function(i){t.length>1?n.setNode(i,o):n.setNode(i)}),this};vo.prototype.setNode=function(e,o){return to.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=o),this):(this._nodes[e]=arguments.length>1?o:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=$d,this._children[e]={},this._children[$d][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};vo.prototype.node=function(e){return this._nodes[e]};vo.prototype.hasNode=function(e){return to.has(this._nodes,e)};vo.prototype.removeNode=function(e){var o=this;if(to.has(this._nodes,e)){var t=function(n){o.removeEdge(o._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],to.each(this.children(e),function(n){o.setParent(n)}),delete this._children[e]),to.each(to.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],to.each(to.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};vo.prototype.setParent=function(e,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(to.isUndefined(o))o=$d;else{o+="";for(var t=o;!to.isUndefined(t);t=this.parent(t))if(t===e)throw new Error("Setting "+o+" as parent of "+e+" would create a cycle");this.setNode(o)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=o,this._children[o][e]=!0,this};vo.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};vo.prototype.parent=function(e){if(this._isCompound){var o=this._parent[e];if(o!==$d)return o}};vo.prototype.children=function(e){if(to.isUndefined(e)&&(e=$d),this._isCompound){var o=this._children[e];if(o)return to.keys(o)}else{if(e===$d)return this.nodes();if(this.hasNode(e))return[]}};vo.prototype.predecessors=function(e){var o=this._preds[e];if(o)return to.keys(o)};vo.prototype.successors=function(e){var o=this._sucs[e];if(o)return to.keys(o)};vo.prototype.neighbors=function(e){var o=this.predecessors(e);if(o)return to.union(o,this.successors(e))};vo.prototype.isLeaf=function(e){var o;return this.isDirected()?o=this.successors(e):o=this.neighbors(e),o.length===0};vo.prototype.filterNodes=function(e){var o=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});o.setGraph(this.graph());var t=this;to.each(this._nodes,function(s,d){e(d)&&o.setNode(d,s)}),to.each(this._edgeObjs,function(s){o.hasNode(s.v)&&o.hasNode(s.w)&&o.setEdge(s,t.edge(s))});var n={};function i(s){var d=t.parent(s);return d===void 0||o.hasNode(d)?(n[s]=d,d):d in n?n[d]:i(d)}return this._isCompound&&to.each(o.nodes(),function(s){o.setParent(s,i(s))}),o};vo.prototype.setDefaultEdgeLabel=function(e){return to.isFunction(e)||(e=to.constant(e)),this._defaultEdgeLabelFn=e,this};vo.prototype.edgeCount=function(){return this._edgeCount};vo.prototype.edges=function(){return to.values(this._edgeObjs)};vo.prototype.setPath=function(e,o){var t=this,n=arguments;return to.reduce(e,function(i,s){return n.length>1?t.setEdge(i,s,o):t.setEdge(i,s),s}),this};vo.prototype.setEdge=function(){var e,o,t,n,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,o=s.w,t=s.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=s,o=arguments[1],t=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,o=""+o,to.isUndefined(t)||(t=""+t);var d=W1(this._isDirected,e,o,t);if(to.has(this._edgeLabels,d))return i&&(this._edgeLabels[d]=n),this;if(!to.isUndefined(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(o),this._edgeLabels[d]=i?n:this._defaultEdgeLabelFn(e,o,t);var u=Ept(this._isDirected,e,o,t);return e=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,mU(this._preds[o],e),mU(this._sucs[e],o),this._in[o][d]=u,this._out[e][d]=u,this._edgeCount++,this};vo.prototype.edge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t);return this._edgeLabels[n]};vo.prototype.hasEdge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t);return to.has(this._edgeLabels,n)};vo.prototype.removeEdge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t),i=this._edgeObjs[n];return i&&(e=i.v,o=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],dU(this._preds[o],e),dU(this._sucs[e],o),delete this._in[o][n],delete this._out[e][n],this._edgeCount--),this};vo.prototype.inEdges=function(e,o){var t=this._in[e];if(t){var n=to.values(t);return o?to.filter(n,function(i){return i.v===o}):n}};vo.prototype.outEdges=function(e,o){var t=this._out[e];if(t){var n=to.values(t);return o?to.filter(n,function(i){return i.w===o}):n}};vo.prototype.nodeEdges=function(e,o){var t=this.inEdges(e,o);if(t)return t.concat(this.outEdges(e,o))};function mU(e,o){e[o]?e[o]++:e[o]=1}function dU(e,o){--e[o]||delete e[o]}function W1(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}return i+pU+s+pU+(to.isUndefined(n)?Dpt:n)}function Ept(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}var u={v:i,w:s};return n&&(u.name=n),u}function IE(e,o){return W1(e,o.v,o.w,o.name)}});var hU=pt((swn,fU)=>{fU.exports="2.1.8"});var _U=pt((cwn,gU)=>{gU.exports={Graph:Xb(),version:hU()}});var vU=pt((pwn,CU)=>{var bc=Vl(),Ipt=Xb();CU.exports={write:Opt,read:kpt};function Opt(e){var o={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Apt(e),edges:Fpt(e)};return bc.isUndefined(e.graph())||(o.value=bc.clone(e.graph())),o}function Apt(e){return bc.map(e.nodes(),function(o){var t=e.node(o),n=e.parent(o),i={v:o};return bc.isUndefined(t)||(i.value=t),bc.isUndefined(n)||(i.parent=n),i})}function Fpt(e){return bc.map(e.edges(),function(o){var t=e.edge(o),n={v:o.v,w:o.w};return bc.isUndefined(o.name)||(n.name=o.name),bc.isUndefined(t)||(n.value=t),n})}function kpt(e){var o=new Ipt(e.options).setGraph(e.value);return bc.each(e.nodes,function(t){o.setNode(t.v,t.value),t.parent&&o.setParent(t.v,t.parent)}),bc.each(e.edges,function(t){o.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),o}});var bU=pt((mwn,xU)=>{var Zb=Vl();xU.exports=Bpt;function Bpt(e){var o={},t=[],n;function i(s){Zb.has(o,s)||(o[s]=!0,n.push(s),Zb.each(e.successors(s),i),Zb.each(e.predecessors(s),i))}return Zb.each(e.nodes(),function(s){n=[],i(s),n.length&&t.push(n)}),t}});var OE=pt((dwn,SU)=>{var yU=Vl();SU.exports=fs;function fs(){this._arr=[],this._keyIndices={}}fs.prototype.size=function(){return this._arr.length};fs.prototype.keys=function(){return this._arr.map(function(e){return e.key})};fs.prototype.has=function(e){return yU.has(this._keyIndices,e)};fs.prototype.priority=function(e){var o=this._keyIndices[e];if(o!==void 0)return this._arr[o].priority};fs.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};fs.prototype.add=function(e,o){var t=this._keyIndices;if(e=String(e),!yU.has(t,e)){var n=this._arr,i=n.length;return t[e]=i,n.push({key:e,priority:o}),this._decrease(i),!0}return!1};fs.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};fs.prototype.decrease=function(e,o){var t=this._keyIndices[e];if(o>this._arr[t].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[t].priority+" New: "+o);this._arr[t].priority=o,this._decrease(t)};fs.prototype._heapify=function(e){var o=this._arr,t=2*e,n=t+1,i=e;t>1,!(o[n].priority{var Rpt=Vl(),Npt=OE();wU.exports=Vpt;var Lpt=Rpt.constant(1);function Vpt(e,o,t,n){return qpt(e,String(o),t||Lpt,n||function(i){return e.outEdges(i)})}function qpt(e,o,t,n){var i={},s=new Npt,d,u,f=function(_){var C=_.v!==d?_.v:_.w,x=i[C],y=t(_),P=u.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+y);P0&&(d=s.removeMin(),u=i[d],u.distance!==Number.POSITIVE_INFINITY);)n(d).forEach(f);return i}});var TU=pt((fwn,PU)=>{var zpt=AE(),Hpt=Vl();PU.exports=Gpt;function Gpt(e,o,t){return Hpt.transform(e.nodes(),function(n,i){n[i]=zpt(e,i,o,t)},{})}});var FE=pt((hwn,DU)=>{var MU=Vl();DU.exports=jpt;function jpt(e){var o=0,t=[],n={},i=[];function s(d){var u=n[d]={onStack:!0,lowlink:o,index:o++};if(t.push(d),e.successors(d).forEach(function(C){MU.has(n,C)?n[C].onStack&&(u.lowlink=Math.min(u.lowlink,n[C].index)):(s(C),u.lowlink=Math.min(u.lowlink,n[C].lowlink))}),u.lowlink===u.index){var f=[],_;do _=t.pop(),n[_].onStack=!1,f.push(_);while(d!==_);i.push(f)}}return e.nodes().forEach(function(d){MU.has(n,d)||s(d)}),i}});var IU=pt((gwn,EU)=>{var $pt=Vl(),Upt=FE();EU.exports=Wpt;function Wpt(e){return $pt.filter(Upt(e),function(o){return o.length>1||o.length===1&&e.hasEdge(o[0],o[0])})}});var AU=pt((_wn,OU)=>{var Qpt=Vl();OU.exports=Jpt;var Ypt=Qpt.constant(1);function Jpt(e,o,t){return Kpt(e,o||Ypt,t||function(n){return e.outEdges(n)})}function Kpt(e,o,t){var n={},i=e.nodes();return i.forEach(function(s){n[s]={},n[s][s]={distance:0},i.forEach(function(d){s!==d&&(n[s][d]={distance:Number.POSITIVE_INFINITY})}),t(s).forEach(function(d){var u=d.v===s?d.w:d.v,f=o(d);n[s][u]={distance:f,predecessor:s}})}),i.forEach(function(s){var d=n[s];i.forEach(function(u){var f=n[u];i.forEach(function(_){var C=f[s],x=d[_],y=f[_],P=C.distance+x.distance;P{var Q1=Vl();kU.exports=FU;FU.CycleException=ey;function FU(e){var o={},t={},n=[];function i(s){if(Q1.has(t,s))throw new ey;Q1.has(o,s)||(t[s]=!0,o[s]=!0,Q1.each(e.predecessors(s),i),delete t[s],n.push(s))}if(Q1.each(e.sinks(),i),Q1.size(o)!==e.nodeCount())throw new ey;return n}function ey(){}ey.prototype=new Error});var NU=pt((vwn,RU)=>{var BU=kE();RU.exports=Xpt;function Xpt(e){try{BU(e)}catch(o){if(o instanceof BU.CycleException)return!1;throw o}return!0}});var BE=pt((xwn,VU)=>{var ty=Vl();VU.exports=Zpt;function Zpt(e,o,t){ty.isArray(o)||(o=[o]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return ty.each(o,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);LU(e,d,t==="post",s,n,i)}),i}function LU(e,o,t,n,i,s){ty.has(n,o)||(n[o]=!0,t||s.push(o),ty.each(i(o),function(d){LU(e,d,t,n,i,s)}),t&&s.push(o))}});var zU=pt((bwn,qU)=>{var emt=BE();qU.exports=tmt;function tmt(e,o){return emt(e,o,"post")}});var GU=pt((ywn,HU)=>{var imt=BE();HU.exports=nmt;function nmt(e,o){return imt(e,o,"pre")}});var UU=pt((Swn,$U)=>{var jU=Vl(),omt=Xb(),amt=OE();$U.exports=rmt;function rmt(e,o){var t=new omt,n={},i=new amt,s;function d(f){var _=f.v===s?f.w:f.v,C=i.priority(_);if(C!==void 0){var x=o(f);x0;){if(s=i.removeMin(),jU.has(n,s))t.setEdge(s,n[s]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(s).forEach(d)}return t}});var QU=pt((wwn,WU)=>{WU.exports={components:bU(),dijkstra:AE(),dijkstraAll:TU(),findCycles:IU(),floydWarshall:AU(),isAcyclic:NU(),postorder:zU(),preorder:GU(),prim:UU(),tarjan:FE(),topsort:kE()}});var KU=pt((Pwn,JU)=>{var YU=_U();JU.exports={Graph:YU.Graph,json:vU(),alg:QU(),version:YU.version}});var hs=pt((Twn,XU)=>{var iy;if(typeof Ms=="function")try{iy=KU()}catch{}iy||(iy=window.graphlib);XU.exports=iy});var eW=pt((Dwn,ZU)=>{var lmt=ZD(),smt=1,cmt=4;function pmt(e){return lmt(e,smt|cmt)}ZU.exports=pmt});var Y1=pt((Ewn,tW)=>{var mmt=Vd(),dmt=vc(),umt=B1(),fmt=Ll();function hmt(e,o,t){if(!fmt(t))return!1;var n=typeof o;return(n=="number"?dmt(t)&&umt(o,t.length):n=="string"&&o in t)?mmt(t[o],e):!1}tW.exports=hmt});var oW=pt((Iwn,nW)=>{var gmt=U1(),_mt=Vd(),Cmt=Y1(),vmt=em(),iW=Object.prototype,xmt=iW.hasOwnProperty,bmt=gmt(function(e,o){e=Object(e);var t=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&Cmt(o[0],o[1],i)&&(n=1);++t{var ymt=xc(),Smt=vc(),wmt=Zc();function Pmt(e){return function(o,t,n){var i=Object(o);if(!Smt(o)){var s=ymt(t,3);o=wmt(o),t=function(u){return s(i[u],u,i)}}var d=e(o,t,n);return d>-1?i[s?o[d]:d]:void 0}}aW.exports=Pmt});var sW=pt((Awn,lW)=>{var Tmt=/\s/;function Mmt(e){for(var o=e.length;o--&&Tmt.test(e.charAt(o)););return o}lW.exports=Mmt});var pW=pt((Fwn,cW)=>{var Dmt=sW(),Emt=/^\s+/;function Imt(e){return e&&e.slice(0,Dmt(e)+1).replace(Emt,"")}cW.exports=Imt});var fW=pt((kwn,uW)=>{var Omt=pW(),mW=Ll(),Amt=jd(),dW=NaN,Fmt=/^[-+]0x[0-9a-f]+$/i,kmt=/^0b[01]+$/i,Bmt=/^0o[0-7]+$/i,Rmt=parseInt;function Nmt(e){if(typeof e=="number")return e;if(Amt(e))return dW;if(mW(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=mW(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=Omt(e);var t=kmt.test(e);return t||Bmt.test(e)?Rmt(e.slice(2),t?2:8):Fmt.test(e)?dW:+e}uW.exports=Nmt});var RE=pt((Bwn,gW)=>{var Lmt=fW(),hW=1/0,Vmt=17976931348623157e292;function qmt(e){if(!e)return e===0?e:0;if(e=Lmt(e),e===hW||e===-hW){var o=e<0?-1:1;return o*Vmt}return e===e?e:0}gW.exports=qmt});var CW=pt((Rwn,_W)=>{var zmt=RE();function Hmt(e){var o=zmt(e),t=o%1;return o===o?t?o-t:o:0}_W.exports=Hmt});var xW=pt((Nwn,vW)=>{var Gmt=TE(),jmt=xc(),$mt=CW(),Umt=Math.max;function Wmt(e,o,t){var n=e==null?0:e.length;if(!n)return-1;var i=t==null?0:$mt(t);return i<0&&(i=Umt(n+i,0)),Gmt(e,jmt(o,3),i)}vW.exports=Wmt});var yW=pt((Lwn,bW)=>{var Qmt=rW(),Ymt=xW(),Jmt=Qmt(Ymt);bW.exports=Jmt});var NE=pt((Vwn,SW)=>{var Kmt=Jb();function Xmt(e){var o=e==null?0:e.length;return o?Kmt(e,1):[]}SW.exports=Xmt});var PW=pt((qwn,wW)=>{var Zmt=jb(),edt=eE(),tdt=em();function idt(e,o){return e==null?e:Zmt(e,edt(o),tdt)}wW.exports=idt});var MW=pt((zwn,TW)=>{function ndt(e){var o=e==null?0:e.length;return o?e[o-1]:void 0}TW.exports=ndt});var EW=pt((Hwn,DW)=>{var odt=A1(),adt=$b(),rdt=xc();function ldt(e,o){var t={};return o=rdt(o,3),adt(e,function(n,i,s){odt(t,i,o(n,i,s))}),t}DW.exports=ldt});var ny=pt((Gwn,IW)=>{var sdt=jd();function cdt(e,o,t){for(var n=-1,i=e.length;++n{function pdt(e,o){return e>o}OW.exports=pdt});var kW=pt(($wn,FW)=>{var mdt=ny(),ddt=AW(),udt=tm();function fdt(e){return e&&e.length?mdt(e,udt,ddt):void 0}FW.exports=fdt});var LE=pt((Uwn,BW)=>{var hdt=A1(),gdt=Vd();function _dt(e,o,t){(t!==void 0&&!gdt(e[o],t)||t===void 0&&!(o in e))&&hdt(e,o,t)}BW.exports=_dt});var LW=pt((Wwn,NW)=>{var Cdt=Xp(),vdt=z1(),xdt=qs(),bdt="[object Object]",ydt=Function.prototype,Sdt=Object.prototype,RW=ydt.toString,wdt=Sdt.hasOwnProperty,Pdt=RW.call(Object);function Tdt(e){if(!xdt(e)||Cdt(e)!=bdt)return!1;var o=vdt(e);if(o===null)return!0;var t=wdt.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&RW.call(t)==Pdt}NW.exports=Tdt});var VE=pt((Qwn,VW)=>{function Mdt(e,o){if(!(o==="constructor"&&typeof e[o]=="function")&&o!="__proto__")return e[o]}VW.exports=Mdt});var zW=pt((Ywn,qW)=>{var Ddt=fu(),Edt=em();function Idt(e){return Ddt(e,Edt(e))}qW.exports=Idt});var WW=pt((Jwn,UW)=>{var HW=LE(),Odt=RD(),Adt=JD(),Fdt=ND(),kdt=XD(),GW=hu(),jW=Wa(),Bdt=DE(),Rdt=zd(),Ndt=pu(),Ldt=Ll(),Vdt=LW(),qdt=Cu(),$W=VE(),zdt=zW();function Hdt(e,o,t,n,i,s,d){var u=$W(e,t),f=$W(o,t),_=d.get(f);if(_){HW(e,t,_);return}var C=s?s(u,f,t+"",e,o,d):void 0,x=C===void 0;if(x){var y=jW(f),P=!y&&Rdt(f),S=!y&&!P&&qdt(f);C=f,y||P||S?jW(u)?C=u:Bdt(u)?C=Fdt(u):P?(x=!1,C=Odt(f,!0)):S?(x=!1,C=Adt(f,!0)):C=[]:Vdt(f)||GW(f)?(C=u,GW(u)?C=zdt(u):(!Ldt(u)||Ndt(u))&&(C=kdt(f))):x=!1}x&&(d.set(f,C),i(C,f,n,s,d),d.delete(f)),HW(e,t,C)}UW.exports=Hdt});var JW=pt((Kwn,YW)=>{var Gdt=O1(),jdt=LE(),$dt=jb(),Udt=WW(),Wdt=Ll(),Qdt=em(),Ydt=VE();function QW(e,o,t,n,i){e!==o&&$dt(o,function(s,d){if(i||(i=new Gdt),Wdt(s))Udt(e,o,d,t,QW,n,i);else{var u=n?n(Ydt(e,d),s,d+"",e,o,i):void 0;u===void 0&&(u=s),jdt(e,d,u)}},Qdt)}YW.exports=QW});var XW=pt((Xwn,KW)=>{var Jdt=U1(),Kdt=Y1();function Xdt(e){return Jdt(function(o,t){var n=-1,i=t.length,s=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,d&&Kdt(t[0],t[1],d)&&(s=i<3?void 0:s,i=1),o=Object(o);++n{var Zdt=JW(),e0t=XW(),t0t=e0t(function(e,o,t){Zdt(e,o,t)});ZW.exports=t0t});var qE=pt((ePn,tQ)=>{function i0t(e,o){return e{var n0t=ny(),o0t=qE(),a0t=tm();function r0t(e){return e&&e.length?n0t(e,a0t,o0t):void 0}iQ.exports=r0t});var aQ=pt((iPn,oQ)=>{var l0t=ny(),s0t=xc(),c0t=qE();function p0t(e,o){return e&&e.length?l0t(e,s0t(o,2),c0t):void 0}oQ.exports=p0t});var lQ=pt((nPn,rQ)=>{var m0t=us(),d0t=function(){return m0t.Date.now()};rQ.exports=d0t});var pQ=pt((oPn,cQ)=>{var u0t=F1(),f0t=j1(),h0t=B1(),sQ=Ll(),g0t=bu();function _0t(e,o,t,n){if(!sQ(e))return e;o=f0t(o,e);for(var i=-1,s=o.length,d=s-1,u=e;u!=null&&++i{var C0t=$1(),v0t=pQ(),x0t=j1();function b0t(e,o,t){for(var n=-1,i=o.length,s={};++n{var y0t=dQ(),S0t=fE();function w0t(e,o){return y0t(e,o,function(t,n){return S0t(e,n)})}uQ.exports=w0t});var gQ=pt((lPn,hQ)=>{var P0t=NE(),T0t=wE(),M0t=PE();function D0t(e){return M0t(T0t(e,void 0,P0t),e+"")}hQ.exports=D0t});var CQ=pt((sPn,_Q)=>{var E0t=fQ(),I0t=gQ(),O0t=I0t(function(e,o){return e==null?{}:E0t(e,o)});_Q.exports=O0t});var xQ=pt((cPn,vQ)=>{var A0t=Math.ceil,F0t=Math.max;function k0t(e,o,t,n){for(var i=-1,s=F0t(A0t((o-e)/(t||1)),0),d=Array(s);s--;)d[n?s:++i]=e,e+=t;return d}vQ.exports=k0t});var yQ=pt((pPn,bQ)=>{var B0t=xQ(),R0t=Y1(),zE=RE();function N0t(e){return function(o,t,n){return n&&typeof n!="number"&&R0t(o,t,n)&&(t=n=void 0),o=zE(o),t===void 0?(t=o,o=0):t=zE(t),n=n===void 0?o{var L0t=yQ(),V0t=L0t();SQ.exports=V0t});var TQ=pt((dPn,PQ)=>{function q0t(e,o){var t=e.length;for(e.sort(o);t--;)e[t]=e[t].value;return e}PQ.exports=q0t});var EQ=pt((uPn,DQ)=>{var MQ=jd();function z0t(e,o){if(e!==o){var t=e!==void 0,n=e===null,i=e===e,s=MQ(e),d=o!==void 0,u=o===null,f=o===o,_=MQ(o);if(!u&&!_&&!s&&e>o||s&&d&&f&&!u&&!_||n&&d&&f||!t&&f||!i)return 1;if(!n&&!s&&!_&&e{var H0t=EQ();function G0t(e,o,t){for(var n=-1,i=e.criteria,s=o.criteria,d=i.length,u=t.length;++n=u)return f;var _=t[n];return f*(_=="desc"?-1:1)}}return e.index-o.index}IQ.exports=G0t});var FQ=pt((hPn,AQ)=>{var HE=G1(),j0t=$1(),$0t=xc(),U0t=vE(),W0t=TQ(),Q0t=R1(),Y0t=OQ(),J0t=tm(),K0t=Wa();function X0t(e,o,t){o.length?o=HE(o,function(s){return K0t(s)?function(d){return j0t(d,s.length===1?s[0]:s)}:s}):o=[J0t];var n=-1;o=HE(o,Q0t($0t));var i=U0t(e,function(s,d,u){var f=HE(o,function(_){return _(s)});return{criteria:f,index:++n,value:s}});return W0t(i,function(s,d){return Y0t(s,d,t)})}AQ.exports=X0t});var RQ=pt((gPn,BQ)=>{var Z0t=Jb(),eut=FQ(),tut=U1(),kQ=Y1(),iut=tut(function(e,o){if(e==null)return[];var t=o.length;return t>1&&kQ(e,o[0],o[1])?o=[]:t>2&&kQ(o[0],o[1],o[2])&&(o=[o[0]]),eut(e,Z0t(o,1),[])});BQ.exports=iut});var LQ=pt((_Pn,NQ)=>{var nut=dE(),out=0;function aut(e){var o=++out;return nut(e)+o}NQ.exports=aut});var qQ=pt((CPn,VQ)=>{function rut(e,o,t){for(var n=-1,i=e.length,s=o.length,d={};++n{var lut=F1(),sut=qQ();function cut(e,o){return sut(e||[],o||[],lut)}zQ.exports=cut});var Sa=pt((xPn,GQ)=>{var oy;if(typeof Ms=="function")try{oy={cloneDeep:eW(),constant:Gb(),defaults:oW(),each:iE(),filter:gE(),find:yW(),flatten:NE(),forEach:tE(),forIn:PW(),has:_E(),isUndefined:CE(),last:MW(),map:xE(),mapValues:EW(),max:kW(),merge:eQ(),min:nQ(),minBy:aQ(),now:lQ(),pick:CQ(),range:wQ(),reduce:bE(),sortBy:RQ(),uniqueId:LQ(),values:EE(),zipObject:HQ()}}catch{}oy||(oy=window._);GQ.exports=oy});var UQ=pt((yPn,$Q)=>{$Q.exports=ay;function ay(){var e={};e._next=e._prev=e,this._sentinel=e}ay.prototype.dequeue=function(){var e=this._sentinel,o=e._prev;if(o!==e)return jQ(o),o};ay.prototype.enqueue=function(e){var o=this._sentinel;e._prev&&e._next&&jQ(e),e._next=o._next,o._next._prev=e,o._next=e,e._prev=o};ay.prototype.toString=function(){for(var e=[],o=this._sentinel,t=o._prev;t!==o;)e.push(JSON.stringify(t,put)),t=t._prev;return"["+e.join(", ")+"]"};function jQ(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function put(e,o){if(e!=="_next"&&e!=="_prev")return o}});var QQ=pt((SPn,WQ)=>{var ep=Sa(),mut=hs().Graph,dut=UQ();WQ.exports=fut;var uut=ep.constant(1);function fut(e,o){if(e.nodeCount()<=1)return[];var t=gut(e,o||uut),n=hut(t.graph,t.buckets,t.zeroIdx);return ep.flatten(ep.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function hut(e,o,t){for(var n=[],i=o[o.length-1],s=o[0],d;e.nodeCount();){for(;d=s.dequeue();)GE(e,o,t,d);for(;d=i.dequeue();)GE(e,o,t,d);if(e.nodeCount()){for(var u=o.length-2;u>0;--u)if(d=o[u].dequeue(),d){n=n.concat(GE(e,o,t,d,!0));break}}}return n}function GE(e,o,t,n,i){var s=i?[]:void 0;return ep.forEach(e.inEdges(n.v),function(d){var u=e.edge(d),f=e.node(d.v);i&&s.push({v:d.v,w:d.w}),f.out-=u,jE(o,t,f)}),ep.forEach(e.outEdges(n.v),function(d){var u=e.edge(d),f=d.w,_=e.node(f);_.in-=u,jE(o,t,_)}),e.removeNode(n.v),s}function gut(e,o){var t=new mut,n=0,i=0;ep.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),ep.forEach(e.edges(),function(u){var f=t.edge(u.v,u.w)||0,_=o(u),C=f+_;t.setEdge(u.v,u.w,C),i=Math.max(i,t.node(u.v).out+=_),n=Math.max(n,t.node(u.w).in+=_)});var s=ep.range(i+n+3).map(function(){return new dut}),d=n+1;return ep.forEach(t.nodes(),function(u){jE(s,d,t.node(u))}),{graph:t,buckets:s,zeroIdx:d}}function jE(e,o,t){t.out?t.in?e[t.out-t.in+o].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}});var JQ=pt((wPn,YQ)=>{"use strict";var Ud=Sa(),_ut=QQ();YQ.exports={run:Cut,undo:xut};function Cut(e){var o=e.graph().acyclicer==="greedy"?_ut(e,t(e)):vut(e);Ud.forEach(o,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,Ud.uniqueId("rev"))});function t(n){return function(i){return n.edge(i).weight}}}function vut(e){var o=[],t={},n={};function i(s){Ud.has(n,s)||(n[s]=!0,t[s]=!0,Ud.forEach(e.outEdges(s),function(d){Ud.has(t,d.w)?o.push(d):i(d.w)}),delete t[s])}return Ud.forEach(e.nodes(),i),o}function xut(e){Ud.forEach(e.edges(),function(o){var t=e.edge(o);if(t.reversed){e.removeEdge(o);var n=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(o.w,o.v,t,n)}})}});var rl=pt((PPn,eY)=>{"use strict";var Ho=Sa(),KQ=hs().Graph;eY.exports={addDummyNode:XQ,simplify:but,asNonCompoundGraph:yut,successorWeights:Sut,predecessorWeights:wut,intersectRect:Put,buildLayerMatrix:Tut,normalizeRanks:Mut,removeEmptyRanks:Dut,addBorderNode:Eut,maxRank:ZQ,partition:Iut,time:Out,notime:Aut};function XQ(e,o,t,n){var i;do i=Ho.uniqueId(n);while(e.hasNode(i));return t.dummy=o,e.setNode(i,t),i}function but(e){var o=new KQ().setGraph(e.graph());return Ho.forEach(e.nodes(),function(t){o.setNode(t,e.node(t))}),Ho.forEach(e.edges(),function(t){var n=o.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);o.setEdge(t.v,t.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),o}function yut(e){var o=new KQ({multigraph:e.isMultigraph()}).setGraph(e.graph());return Ho.forEach(e.nodes(),function(t){e.children(t).length||o.setNode(t,e.node(t))}),Ho.forEach(e.edges(),function(t){o.setEdge(t,e.edge(t))}),o}function Sut(e){var o=Ho.map(e.nodes(),function(t){var n={};return Ho.forEach(e.outEdges(t),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Ho.zipObject(e.nodes(),o)}function wut(e){var o=Ho.map(e.nodes(),function(t){var n={};return Ho.forEach(e.inEdges(t),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Ho.zipObject(e.nodes(),o)}function Put(e,o){var t=e.x,n=e.y,i=o.x-t,s=o.y-n,d=e.width/2,u=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var f,_;return Math.abs(s)*d>Math.abs(i)*u?(s<0&&(u=-u),f=u*i/s,_=u):(i<0&&(d=-d),f=d,_=d*s/i),{x:t+f,y:n+_}}function Tut(e){var o=Ho.map(Ho.range(ZQ(e)+1),function(){return[]});return Ho.forEach(e.nodes(),function(t){var n=e.node(t),i=n.rank;Ho.isUndefined(i)||(o[i][n.order]=t)}),o}function Mut(e){var o=Ho.min(Ho.map(e.nodes(),function(t){return e.node(t).rank}));Ho.forEach(e.nodes(),function(t){var n=e.node(t);Ho.has(n,"rank")&&(n.rank-=o)})}function Dut(e){var o=Ho.min(Ho.map(e.nodes(),function(s){return e.node(s).rank})),t=[];Ho.forEach(e.nodes(),function(s){var d=e.node(s).rank-o;t[d]||(t[d]=[]),t[d].push(s)});var n=0,i=e.graph().nodeRankFactor;Ho.forEach(t,function(s,d){Ho.isUndefined(s)&&d%i!==0?--n:n&&Ho.forEach(s,function(u){e.node(u).rank+=n})})}function Eut(e,o,t,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=t,i.order=n),XQ(e,"border",i,o)}function ZQ(e){return Ho.max(Ho.map(e.nodes(),function(o){var t=e.node(o).rank;if(!Ho.isUndefined(t))return t}))}function Iut(e,o){var t={lhs:[],rhs:[]};return Ho.forEach(e,function(n){o(n)?t.lhs.push(n):t.rhs.push(n)}),t}function Out(e,o){var t=Ho.now();try{return o()}finally{console.log(e+" time: "+(Ho.now()-t)+"ms")}}function Aut(e,o){return o()}});var nY=pt((TPn,iY)=>{"use strict";var tY=Sa(),Fut=rl();iY.exports={run:kut,undo:Rut};function kut(e){e.graph().dummyChains=[],tY.forEach(e.edges(),function(o){But(e,o)})}function But(e,o){var t=o.v,n=e.node(t).rank,i=o.w,s=e.node(i).rank,d=o.name,u=e.edge(o),f=u.labelRank;if(s!==n+1){e.removeEdge(o);var _,C,x;for(x=0,++n;n{"use strict";var ry=Sa();oY.exports={longestPath:Nut,slack:Lut};function Nut(e){var o={};function t(n){var i=e.node(n);if(ry.has(o,n))return i.rank;o[n]=!0;var s=ry.min(ry.map(e.outEdges(n),function(d){return t(d.w)-e.edge(d).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),i.rank=s}ry.forEach(e.sources(),t)}function Lut(e,o){return e.node(o.w).rank-e.node(o.v).rank-e.edge(o).minlen}});var $E=pt((DPn,aY)=>{"use strict";var ly=Sa(),Vut=hs().Graph,sy=J1().slack;aY.exports=qut;function qut(e){var o=new Vut({directed:!1}),t=e.nodes()[0],n=e.nodeCount();o.setNode(t,{});for(var i,s;zut(o,e){"use strict";var tp=Sa(),jut=$E(),$ut=J1().slack,Uut=J1().longestPath,Wut=hs().alg.preorder,Qut=hs().alg.postorder,Yut=rl().simplify;dY.exports=Wd;Wd.initLowLimValues=WE;Wd.initCutValues=UE;Wd.calcCutValue=lY;Wd.leaveEdge=cY;Wd.enterEdge=pY;Wd.exchangeEdges=mY;function Wd(e){e=Yut(e),Uut(e);var o=jut(e);WE(o),UE(o,e);for(var t,n;t=cY(o);)n=pY(o,e,t),mY(o,e,t,n)}function UE(e,o){var t=Qut(e,e.nodes());t=t.slice(0,t.length-1),tp.forEach(t,function(n){Jut(e,o,n)})}function Jut(e,o,t){var n=e.node(t),i=n.parent;e.edge(t,i).cutvalue=lY(e,o,t)}function lY(e,o,t){var n=e.node(t),i=n.parent,s=!0,d=o.edge(t,i),u=0;return d||(s=!1,d=o.edge(i,t)),u=d.weight,tp.forEach(o.nodeEdges(t),function(f){var _=f.v===t,C=_?f.w:f.v;if(C!==i){var x=_===s,y=o.edge(f).weight;if(u+=x?y:-y,Xut(e,t,C)){var P=e.edge(t,C).cutvalue;u+=x?-P:P}}}),u}function WE(e,o){arguments.length<2&&(o=e.nodes()[0]),sY(e,{},1,o)}function sY(e,o,t,n,i){var s=t,d=e.node(n);return o[n]=!0,tp.forEach(e.neighbors(n),function(u){tp.has(o,u)||(t=sY(e,o,t,u,n))}),d.low=s,d.lim=t++,i?d.parent=i:delete d.parent,t}function cY(e){return tp.find(e.edges(),function(o){return e.edge(o).cutvalue<0})}function pY(e,o,t){var n=t.v,i=t.w;o.hasEdge(n,i)||(n=t.w,i=t.v);var s=e.node(n),d=e.node(i),u=s,f=!1;s.lim>d.lim&&(u=d,f=!0);var _=tp.filter(o.edges(),function(C){return f===rY(e,e.node(C.v),u)&&f!==rY(e,e.node(C.w),u)});return tp.minBy(_,function(C){return $ut(o,C)})}function mY(e,o,t,n){var i=t.v,s=t.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),WE(e),UE(e,o),Kut(e,o)}function Kut(e,o){var t=tp.find(e.nodes(),function(i){return!o.node(i).parent}),n=Wut(e,t);n=n.slice(1),tp.forEach(n,function(i){var s=e.node(i).parent,d=o.edge(i,s),u=!1;d||(d=o.edge(s,i),u=!0),o.node(i).rank=o.node(s).rank+(u?d.minlen:-d.minlen)})}function Xut(e,o,t){return e.hasEdge(o,t)}function rY(e,o,t){return t.low<=o.lim&&o.lim<=t.lim}});var _Y=pt((IPn,gY)=>{"use strict";var Zut=J1(),hY=Zut.longestPath,eft=$E(),tft=uY();gY.exports=ift;function ift(e){switch(e.graph().ranker){case"network-simplex":fY(e);break;case"tight-tree":oft(e);break;case"longest-path":nft(e);break;default:fY(e)}}var nft=hY;function oft(e){hY(e),eft(e)}function fY(e){tft(e)}});var vY=pt((OPn,CY)=>{var QE=Sa();CY.exports=aft;function aft(e){var o=lft(e);QE.forEach(e.graph().dummyChains,function(t){for(var n=e.node(t),i=n.edgeObj,s=rft(e,o,i.v,i.w),d=s.path,u=s.lca,f=0,_=d[f],C=!0;t!==i.w;){if(n=e.node(t),C){for(;(_=d[f])!==u&&e.node(_).maxRankd||u>o[f].lim));for(_=f,f=n;(f=e.parent(f))!==_;)s.push(f);return{path:i.concat(s.reverse()),lca:_}}function lft(e){var o={},t=0;function n(i){var s=t;QE.forEach(e.children(i),n),o[i]={low:s,lim:t++}}return QE.forEach(e.children(),n),o}});var yY=pt((APn,bY)=>{var ip=Sa(),YE=rl();bY.exports={run:sft,cleanup:mft};function sft(e){var o=YE.addDummyNode(e,"root",{},"_root"),t=cft(e),n=ip.max(ip.values(t))-1,i=2*n+1;e.graph().nestingRoot=o,ip.forEach(e.edges(),function(d){e.edge(d).minlen*=i});var s=pft(e)+1;ip.forEach(e.children(),function(d){xY(e,o,i,s,n,t,d)}),e.graph().nodeRankFactor=i}function xY(e,o,t,n,i,s,d){var u=e.children(d);if(!u.length){d!==o&&e.setEdge(o,d,{weight:0,minlen:t});return}var f=YE.addBorderNode(e,"_bt"),_=YE.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(f,d),C.borderTop=f,e.setParent(_,d),C.borderBottom=_,ip.forEach(u,function(x){xY(e,o,t,n,i,s,x);var y=e.node(x),P=y.borderTop?y.borderTop:x,S=y.borderBottom?y.borderBottom:x,M=y.borderTop?n:2*n,D=P!==S?1:i-s[d]+1;e.setEdge(f,P,{weight:M,minlen:D,nestingEdge:!0}),e.setEdge(S,_,{weight:M,minlen:D,nestingEdge:!0})}),e.parent(d)||e.setEdge(o,f,{weight:0,minlen:i+s[d]})}function cft(e){var o={};function t(n,i){var s=e.children(n);s&&s.length&&ip.forEach(s,function(d){t(d,i+1)}),o[n]=i}return ip.forEach(e.children(),function(n){t(n,1)}),o}function pft(e){return ip.reduce(e.edges(),function(o,t){return o+e.edge(t).weight},0)}function mft(e){var o=e.graph();e.removeNode(o.nestingRoot),delete o.nestingRoot,ip.forEach(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}});var PY=pt((FPn,wY)=>{var JE=Sa(),dft=rl();wY.exports=uft;function uft(e){function o(t){var n=e.children(t),i=e.node(t);if(n.length&&JE.forEach(n,o),JE.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,d=i.maxRank+1;s{"use strict";var yc=Sa();DY.exports={adjust:fft,undo:hft};function fft(e){var o=e.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&MY(e)}function hft(e){var o=e.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&gft(e),(o==="lr"||o==="rl")&&(_ft(e),MY(e))}function MY(e){yc.forEach(e.nodes(),function(o){TY(e.node(o))}),yc.forEach(e.edges(),function(o){TY(e.edge(o))})}function TY(e){var o=e.width;e.width=e.height,e.height=o}function gft(e){yc.forEach(e.nodes(),function(o){KE(e.node(o))}),yc.forEach(e.edges(),function(o){var t=e.edge(o);yc.forEach(t.points,KE),yc.has(t,"y")&&KE(t)})}function KE(e){e.y=-e.y}function _ft(e){yc.forEach(e.nodes(),function(o){XE(e.node(o))}),yc.forEach(e.edges(),function(o){var t=e.edge(o);yc.forEach(t.points,XE),yc.has(t,"x")&&XE(t)})}function XE(e){var o=e.x;e.x=e.y,e.y=o}});var OY=pt((BPn,IY)=>{"use strict";var np=Sa();IY.exports=Cft;function Cft(e){var o={},t=np.filter(e.nodes(),function(u){return!e.children(u).length}),n=np.max(np.map(t,function(u){return e.node(u).rank})),i=np.map(np.range(n+1),function(){return[]});function s(u){if(!np.has(o,u)){o[u]=!0;var f=e.node(u);i[f.rank].push(u),np.forEach(e.successors(u),s)}}var d=np.sortBy(t,function(u){return e.node(u).rank});return np.forEach(d,s),i}});var FY=pt((RPn,AY)=>{"use strict";var im=Sa();AY.exports=vft;function vft(e,o){for(var t=0,n=1;n0;)C%2&&(x+=u[C+1]),C=C-1>>1,u[C]+=_.weight;f+=_.weight*x})),f}});var RY=pt((NPn,BY)=>{var kY=Sa();BY.exports=bft;function bft(e,o){return kY.map(o,function(t){var n=e.inEdges(t);if(n.length){var i=kY.reduce(n,function(s,d){var u=e.edge(d),f=e.node(d.v);return{sum:s.sum+u.weight*f.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:t}})}});var LY=pt((LPn,NY)=>{"use strict";var ql=Sa();NY.exports=yft;function yft(e,o){var t={};ql.forEach(e,function(i,s){var d=t[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};ql.isUndefined(i.barycenter)||(d.barycenter=i.barycenter,d.weight=i.weight)}),ql.forEach(o.edges(),function(i){var s=t[i.v],d=t[i.w];!ql.isUndefined(s)&&!ql.isUndefined(d)&&(d.indegree++,s.out.push(t[i.w]))});var n=ql.filter(t,function(i){return!i.indegree});return Sft(n)}function Sft(e){var o=[];function t(s){return function(d){d.merged||(ql.isUndefined(d.barycenter)||ql.isUndefined(s.barycenter)||d.barycenter>=s.barycenter)&&wft(s,d)}}function n(s){return function(d){d.in.push(s),--d.indegree===0&&e.push(d)}}for(;e.length;){var i=e.pop();o.push(i),ql.forEach(i.in.reverse(),t(i)),ql.forEach(i.out,n(i))}return ql.map(ql.filter(o,function(s){return!s.merged}),function(s){return ql.pick(s,["vs","i","barycenter","weight"])})}function wft(e,o){var t=0,n=0;e.weight&&(t+=e.barycenter*e.weight,n+=e.weight),o.weight&&(t+=o.barycenter*o.weight,n+=o.weight),e.vs=o.vs.concat(e.vs),e.barycenter=t/n,e.weight=n,e.i=Math.min(o.i,e.i),o.merged=!0}});var zY=pt((VPn,qY)=>{var K1=Sa(),Pft=rl();qY.exports=Tft;function Tft(e,o){var t=Pft.partition(e,function(C){return K1.has(C,"barycenter")}),n=t.lhs,i=K1.sortBy(t.rhs,function(C){return-C.i}),s=[],d=0,u=0,f=0;n.sort(Mft(!!o)),f=VY(s,i,f),K1.forEach(n,function(C){f+=C.vs.length,s.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,f=VY(s,i,f)});var _={vs:K1.flatten(s,!0)};return u&&(_.barycenter=d/u,_.weight=u),_}function VY(e,o,t){for(var n;o.length&&(n=K1.last(o)).i<=t;)o.pop(),e.push(n.vs),t++;return t}function Mft(e){return function(o,t){return o.barycentert.barycenter?1:e?t.i-o.i:o.i-t.i}}});var jY=pt((qPn,GY)=>{var nm=Sa(),Dft=RY(),Eft=LY(),Ift=zY();GY.exports=HY;function HY(e,o,t,n){var i=e.children(o),s=e.node(o),d=s?s.borderLeft:void 0,u=s?s.borderRight:void 0,f={};d&&(i=nm.filter(i,function(S){return S!==d&&S!==u}));var _=Dft(e,i);nm.forEach(_,function(S){if(e.children(S.v).length){var M=HY(e,S.v,t,n);f[S.v]=M,nm.has(M,"barycenter")&&Aft(S,M)}});var C=Eft(_,t);Oft(C,f);var x=Ift(C,n);if(d&&(x.vs=nm.flatten([d,x.vs,u],!0),e.predecessors(d).length)){var y=e.node(e.predecessors(d)[0]),P=e.node(e.predecessors(u)[0]);nm.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+y.order+P.order)/(x.weight+2),x.weight+=2}return x}function Oft(e,o){nm.forEach(e,function(t){t.vs=nm.flatten(t.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function Aft(e,o){nm.isUndefined(e.barycenter)?(e.barycenter=o.barycenter,e.weight=o.weight):(e.barycenter=(e.barycenter*e.weight+o.barycenter*o.weight)/(e.weight+o.weight),e.weight+=o.weight)}});var UY=pt((zPn,$Y)=>{var X1=Sa(),Fft=hs().Graph;$Y.exports=kft;function kft(e,o,t){var n=Bft(e),i=new Fft({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return X1.forEach(e.nodes(),function(s){var d=e.node(s),u=e.parent(s);(d.rank===o||d.minRank<=o&&o<=d.maxRank)&&(i.setNode(s),i.setParent(s,u||n),X1.forEach(e[t](s),function(f){var _=f.v===s?f.w:f.v,C=i.edge(_,s),x=X1.isUndefined(C)?0:C.weight;i.setEdge(_,s,{weight:e.edge(f).weight+x})}),X1.has(d,"minRank")&&i.setNode(s,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),i}function Bft(e){for(var o;e.hasNode(o=X1.uniqueId("_root")););return o}});var QY=pt((HPn,WY)=>{var Rft=Sa();WY.exports=Nft;function Nft(e,o,t){var n={},i;Rft.forEach(t,function(s){for(var d=e.parent(s),u,f;d;){if(u=e.parent(d),u?(f=n[u],n[u]=d):(f=i,i=d),f&&f!==d){o.setEdge(f,d);return}d=u}})}});var ZY=pt((GPn,XY)=>{"use strict";var om=Sa(),Lft=OY(),Vft=FY(),qft=jY(),zft=UY(),Hft=QY(),Gft=hs().Graph,YY=rl();XY.exports=jft;function jft(e){var o=YY.maxRank(e),t=JY(e,om.range(1,o+1),"inEdges"),n=JY(e,om.range(o-1,-1,-1),"outEdges"),i=Lft(e);KY(e,i);for(var s=Number.POSITIVE_INFINITY,d,u=0,f=0;f<4;++u,++f){$ft(u%2?t:n,u%4>=2),i=YY.buildLayerMatrix(e);var _=Vft(e,i);_{"use strict";var io=Sa(),Uft=hs().Graph,Wft=rl();sJ.exports={positionX:Jft,findType1Conflicts:eJ,findType2Conflicts:tJ,addConflict:ZE,hasConflict:iJ,verticalAlignment:nJ,horizontalCompaction:oJ,alignCoordinates:rJ,findSmallestWidthAlignment:aJ,balance:lJ};function eJ(e,o){var t={};function n(i,s){var d=0,u=0,f=i.length,_=io.last(s);return io.forEach(s,function(C,x){var y=Qft(e,C),P=y?e.node(y).order:f;(y||C===_)&&(io.forEach(s.slice(u,x+1),function(S){io.forEach(e.predecessors(S),function(M){var D=e.node(M),k=D.order;(k_)&&ZE(t,y,C)})})}function i(s,d){var u=-1,f,_=0;return io.forEach(d,function(C,x){if(e.node(C).dummy==="border"){var y=e.predecessors(C);y.length&&(f=e.node(y[0]).order,n(d,_,x,u,f),_=x,u=f)}n(d,_,d.length,f,s.length)}),d}return io.reduce(o,i),t}function Qft(e,o){if(e.node(o).dummy)return io.find(e.predecessors(o),function(t){return e.node(t).dummy})}function ZE(e,o,t){if(o>t){var n=o;o=t,t=n}var i=e[o];i||(e[o]=i={}),i[t]=!0}function iJ(e,o,t){if(o>t){var n=o;o=t,t=n}return io.has(e[o],t)}function nJ(e,o,t,n){var i={},s={},d={};return io.forEach(o,function(u){io.forEach(u,function(f,_){i[f]=f,s[f]=f,d[f]=_})}),io.forEach(o,function(u){var f=-1;io.forEach(u,function(_){var C=n(_);if(C.length){C=io.sortBy(C,function(M){return d[M]});for(var x=(C.length-1)/2,y=Math.floor(x),P=Math.ceil(x);y<=P;++y){var S=C[y];s[_]===_&&f{"use strict";var Z1=Sa(),pJ=rl(),Zft=cJ().positionX;mJ.exports=e1t;function e1t(e){e=pJ.asNonCompoundGraph(e),t1t(e),Z1.forEach(Zft(e),function(o,t){e.node(t).x=o})}function t1t(e){var o=pJ.buildLayerMatrix(e),t=e.graph().ranksep,n=0;Z1.forEach(o,function(i){var s=Z1.max(Z1.map(i,function(d){return e.node(d).height}));Z1.forEach(i,function(d){e.node(d).y=n+s/2}),n+=s+t})}});var CJ=pt((UPn,_J)=>{"use strict";var fo=Sa(),uJ=JQ(),fJ=nY(),i1t=_Y(),n1t=rl().normalizeRanks,o1t=vY(),a1t=rl().removeEmptyRanks,hJ=yY(),r1t=PY(),gJ=EY(),l1t=ZY(),s1t=dJ(),am=rl(),c1t=hs().Graph;_J.exports=p1t;function p1t(e,o){var t=o&&o.debugTiming?am.time:am.notime;t("layout",function(){var n=t(" buildLayoutGraph",function(){return b1t(e)});t(" runLayout",function(){m1t(n,t)}),t(" updateInputGraph",function(){d1t(e,n)})})}function m1t(e,o){o(" makeSpaceForEdgeLabels",function(){y1t(e)}),o(" removeSelfEdges",function(){O1t(e)}),o(" acyclic",function(){uJ.run(e)}),o(" nestingGraph.run",function(){hJ.run(e)}),o(" rank",function(){i1t(am.asNonCompoundGraph(e))}),o(" injectEdgeLabelProxies",function(){S1t(e)}),o(" removeEmptyRanks",function(){a1t(e)}),o(" nestingGraph.cleanup",function(){hJ.cleanup(e)}),o(" normalizeRanks",function(){n1t(e)}),o(" assignRankMinMax",function(){w1t(e)}),o(" removeEdgeLabelProxies",function(){P1t(e)}),o(" normalize.run",function(){fJ.run(e)}),o(" parentDummyChains",function(){o1t(e)}),o(" addBorderSegments",function(){r1t(e)}),o(" order",function(){l1t(e)}),o(" insertSelfEdges",function(){A1t(e)}),o(" adjustCoordinateSystem",function(){gJ.adjust(e)}),o(" position",function(){s1t(e)}),o(" positionSelfEdges",function(){F1t(e)}),o(" removeBorderNodes",function(){I1t(e)}),o(" normalize.undo",function(){fJ.undo(e)}),o(" fixupEdgeLabelCoords",function(){D1t(e)}),o(" undoCoordinateSystem",function(){gJ.undo(e)}),o(" translateGraph",function(){T1t(e)}),o(" assignNodeIntersects",function(){M1t(e)}),o(" reversePoints",function(){E1t(e)}),o(" acyclic.undo",function(){uJ.undo(e)})}function d1t(e,o){fo.forEach(e.nodes(),function(t){var n=e.node(t),i=o.node(t);n&&(n.x=i.x,n.y=i.y,o.children(t).length&&(n.width=i.width,n.height=i.height))}),fo.forEach(e.edges(),function(t){var n=e.edge(t),i=o.edge(t);n.points=i.points,fo.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=o.graph().width,e.graph().height=o.graph().height}var u1t=["nodesep","edgesep","ranksep","marginx","marginy"],f1t={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},h1t=["acyclicer","ranker","rankdir","align"],g1t=["width","height"],_1t={width:0,height:0},C1t=["minlen","weight","width","height","labeloffset"],v1t={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},x1t=["labelpos"];function b1t(e){var o=new c1t({multigraph:!0,compound:!0}),t=tI(e.graph());return o.setGraph(fo.merge({},f1t,eI(t,u1t),fo.pick(t,h1t))),fo.forEach(e.nodes(),function(n){var i=tI(e.node(n));o.setNode(n,fo.defaults(eI(i,g1t),_1t)),o.setParent(n,e.parent(n))}),fo.forEach(e.edges(),function(n){var i=tI(e.edge(n));o.setEdge(n,fo.merge({},v1t,eI(i,C1t),fo.pick(i,x1t)))}),o}function y1t(e){var o=e.graph();o.ranksep/=2,fo.forEach(e.edges(),function(t){var n=e.edge(t);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(o.rankdir==="TB"||o.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function S1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);if(t.width&&t.height){var n=e.node(o.v),i=e.node(o.w),s={rank:(i.rank-n.rank)/2+n.rank,e:o};am.addDummyNode(e,"edge-proxy",s,"_ep")}})}function w1t(e){var o=0;fo.forEach(e.nodes(),function(t){var n=e.node(t);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,o=fo.max(o,n.maxRank))}),e.graph().maxRank=o}function P1t(e){fo.forEach(e.nodes(),function(o){var t=e.node(o);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(o))})}function T1t(e){var o=Number.POSITIVE_INFINITY,t=0,n=Number.POSITIVE_INFINITY,i=0,s=e.graph(),d=s.marginx||0,u=s.marginy||0;function f(_){var C=_.x,x=_.y,y=_.width,P=_.height;o=Math.min(o,C-y/2),t=Math.max(t,C+y/2),n=Math.min(n,x-P/2),i=Math.max(i,x+P/2)}fo.forEach(e.nodes(),function(_){f(e.node(_))}),fo.forEach(e.edges(),function(_){var C=e.edge(_);fo.has(C,"x")&&f(C)}),o-=d,n-=u,fo.forEach(e.nodes(),function(_){var C=e.node(_);C.x-=o,C.y-=n}),fo.forEach(e.edges(),function(_){var C=e.edge(_);fo.forEach(C.points,function(x){x.x-=o,x.y-=n}),fo.has(C,"x")&&(C.x-=o),fo.has(C,"y")&&(C.y-=n)}),s.width=t-o+d,s.height=i-n+u}function M1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o),n=e.node(o.v),i=e.node(o.w),s,d;t.points?(s=t.points[0],d=t.points[t.points.length-1]):(t.points=[],s=i,d=n),t.points.unshift(am.intersectRect(n,s)),t.points.push(am.intersectRect(i,d))})}function D1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);if(fo.has(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function E1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);t.reversed&&t.points.reverse()})}function I1t(e){fo.forEach(e.nodes(),function(o){if(e.children(o).length){var t=e.node(o),n=e.node(t.borderTop),i=e.node(t.borderBottom),s=e.node(fo.last(t.borderLeft)),d=e.node(fo.last(t.borderRight));t.width=Math.abs(d.x-s.x),t.height=Math.abs(i.y-n.y),t.x=s.x+t.width/2,t.y=n.y+t.height/2}}),fo.forEach(e.nodes(),function(o){e.node(o).dummy==="border"&&e.removeNode(o)})}function O1t(e){fo.forEach(e.edges(),function(o){if(o.v===o.w){var t=e.node(o.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:o,label:e.edge(o)}),e.removeEdge(o)}})}function A1t(e){var o=am.buildLayerMatrix(e);fo.forEach(o,function(t){var n=0;fo.forEach(t,function(i,s){var d=e.node(i);d.order=s+n,fo.forEach(d.selfEdges,function(u){am.addDummyNode(e,"selfedge",{width:u.label.width,height:u.label.height,rank:d.rank,order:s+ ++n,e:u.e,label:u.label},"_se")}),delete d.selfEdges})})}function F1t(e){fo.forEach(e.nodes(),function(o){var t=e.node(o);if(t.dummy==="selfedge"){var n=e.node(t.e.v),i=n.x+n.width/2,s=n.y,d=t.x-i,u=n.height/2;e.setEdge(t.e,t.label),e.removeNode(o),t.label.points=[{x:i+2*d/3,y:s-u},{x:i+5*d/6,y:s-u},{x:i+d,y:s},{x:i+5*d/6,y:s+u},{x:i+2*d/3,y:s+u}],t.label.x=t.x,t.label.y=t.y}})}function eI(e,o){return fo.mapValues(fo.pick(e,o),Number)}function tI(e){var o={};return fo.forEach(e,function(t,n){o[n.toLowerCase()]=t}),o}});var xJ=pt((WPn,vJ)=>{var cy=Sa(),k1t=rl(),B1t=hs().Graph;vJ.exports={debugOrdering:R1t};function R1t(e){var o=k1t.buildLayerMatrix(e),t=new B1t({compound:!0,multigraph:!0}).setGraph({});return cy.forEach(e.nodes(),function(n){t.setNode(n,{label:n}),t.setParent(n,"layer"+e.node(n).rank)}),cy.forEach(e.edges(),function(n){t.setEdge(n.v,n.w,{},n.name)}),cy.forEach(o,function(n,i){var s="layer"+i;t.setNode(s,{rank:"same"}),cy.reduce(n,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var yJ=pt((QPn,bJ)=>{bJ.exports="0.8.5"});var wJ=pt((YPn,SJ)=>{SJ.exports={graphlib:hs(),layout:CJ(),debug:xJ(),util:{time:rl().time,notime:rl().notime},version:yJ()}});var aI=pt(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var oI=(function(){function e(o,t,n){this.source=o,this.target=t,this.type=n}return e})();rm.PowerEdge=oI;var KJ=(function(){function e(o,t,n,i){var s=this;if(this.linkAccessor=n,this.modules=new Array(o),this.roots=[],i)this.initModulesFromGroup(i);else{this.roots.push(new yu);for(var d=0;d=this.R))return this.merge(n.a,n.b,o),!0}},e.prototype.nEdges=function(o,t){var n=o.incoming.intersection(t.incoming),i=o.outgoing.intersection(t.outgoing);return this.R-n.count()-i.count()},e.prototype.getGroupHierarchy=function(o){var t=this,n=[],i={};XJ(this.roots[0],i,n);var s=this.allEdges();return s.forEach(function(d){var u=t.modules[d.source],f=t.modules[d.target];o.push(new oI(typeof u.gid>"u"?d.source:n[u.gid],typeof f.gid>"u"?d.target:n[f.gid],d.type))}),n},e.prototype.allEdges=function(){var o=[];return e.getEdges(this.roots[0],o),o},e.getEdges=function(o,t){o.forAll(function(n){n.getEdges(t),e.getEdges(n.children,t)})},e})();rm.Configuration=KJ;function XJ(e,o,t){e.forAll(function(n){if(n.isLeaf())o.leaves||(o.leaves=[]),o.leaves.push(n.id);else{var i=o;if(n.gid=t.length,!n.isIsland()||n.isPredefined()){if(i={id:n.gid},n.isPredefined())for(var s in n.definition)i[s]=n.definition[s];o.groups||(o.groups=[]),o.groups.push(n.gid),t.push(i)}XJ(n.children,i,t)}})}var eh=(function(){function e(o,t,n,i,s){t===void 0&&(t=new th),n===void 0&&(n=new th),i===void 0&&(i=new yu),this.id=o,this.outgoing=t,this.incoming=n,this.children=i,this.definition=s}return e.prototype.getEdges=function(o){var t=this;this.outgoing.forAll(function(n,i){n.forAll(function(s){o.push(new oI(t.id,s.id,i))})})},e.prototype.isLeaf=function(){return this.children.count()===0},e.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},e.prototype.isPredefined=function(){return typeof this.definition<"u"},e})();rm.Module=eh;function H1t(e,o){var t={};for(var n in e)n in o&&(t[n]=e[n]);return t}var yu=(function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(o){var t=new e;return t.table=H1t(this.table,o.table),t},e.prototype.intersectionCount=function(o){return this.intersection(o).count()},e.prototype.contains=function(o){return o in this.table},e.prototype.add=function(o){this.table[o.id]=o},e.prototype.remove=function(o){delete this.table[o.id]},e.prototype.forAll=function(o){for(var t in this.table)o(this.table[t])},e.prototype.modules=function(){var o=[];return this.forAll(function(t){t.isPredefined()||o.push(t)}),o},e})();rm.ModuleSet=yu;var th=(function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(o){var t=!1;return this.forAllModules(function(n){!t&&n.id==o&&(t=!0)}),t},e.prototype.add=function(o,t){var n=o in this.sets?this.sets[o]:this.sets[o]=new yu;n.add(t),++this.n},e.prototype.remove=function(o,t){var n=this.sets[o];n.remove(t),n.count()===0&&delete this.sets[o],--this.n},e.prototype.forAll=function(o){for(var t in this.sets)o(this.sets[t],Number(t))},e.prototype.forAllModules=function(o){this.forAll(function(t,n){return t.forAll(o)})},e.prototype.intersection=function(o){var t=new e;return this.forAll(function(n,i){if(i in o.sets){var s=n.intersection(o.sets[i]),d=s.count();d>0&&(t.sets[i]=s,t.n+=d)}}),t},e})();rm.LinkSets=th;function G1t(e,o,t,n){for(var i=e.length,s=new KJ(i,o,t,n);s.greedyMerge(););var d=[],u=s.getGroupHierarchy(d);return d.forEach(function(f){var _=function(C){var x=f[C];typeof x=="number"&&(f[C]=e[x])};_("source"),_("target")}),{groups:u,powerEdges:d}}rm.getGroups=G1t});var fy=pt(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});function ZJ(e,o){var t={};for(var n in e)t[n]={};for(var n in o)t[n]={};return Object.keys(t).length}function eK(e,o){var t=0;for(var n in e)typeof o[n]<"u"&&++t;return t}function j1t(e,o){var t={},n=function(i,s){typeof t[i]>"u"&&(t[i]={}),t[i][s]={}};return e.forEach(function(i){var s=o.getSourceIndex(i),d=o.getTargetIndex(i);n(s,d),n(d,s)}),t}function tK(e,o,t,n){var i=j1t(e,n);e.forEach(function(s){var d=i[n.getSourceIndex(s)],u=i[n.getTargetIndex(s)];n.setLength(s,1+o*t(d,u))})}function $1t(e,o,t){t===void 0&&(t=1),tK(e,t,function(n,i){return Math.sqrt(ZJ(n,i)-eK(n,i))},o)}Su.symmetricDiffLinkLengths=$1t;function U1t(e,o,t){t===void 0&&(t=1),tK(e,t,function(n,i){return Math.min(Object.keys(n).length,Object.keys(i).length)<1.1?0:eK(n,i)/ZJ(n,i)},o)}Su.jaccardLinkLengths=U1t;function W1t(e,o,t,n){var i=iK(e,o,n),s={};i.forEach(function(u,f){return u.forEach(function(_){return s[_]=f})});var d=[];return o.forEach(function(u){var f=n.getSourceIndex(u),_=n.getTargetIndex(u),C=s[f],x=s[_];C!==x&&d.push({axis:t,left:f,right:_,gap:n.getMinSeparation(u)})}),d}Su.generateDirectedEdgeConstraints=W1t;function iK(e,o,t){var n=[],i=0,s=[],d=[];function u(k){k.index=k.lowlink=i++,s.push(k),k.onStack=!0;for(var z=0,U=k.out;z"u"?(u(J),k.lowlink=Math.min(k.lowlink,J.lowlink)):J.onStack&&(k.lowlink=Math.min(k.lowlink,J.index))}if(k.lowlink===k.index){for(var re=[];s.length&&(J=s.pop(),J.onStack=!1,re.push(J),J!==k););d.push(re.map(function(ee){return ee.id}))}}for(var f=0;f"u"&&u(D)}return d}Su.stronglyConnectedComponents=iK});var hy=pt(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var nK=(function(){function e(){this.locks={}}return e.prototype.add=function(o,t){this.locks[o]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var o in this.locks)return!1;return!0},e.prototype.apply=function(o){for(var t in this.locks)o(Number(t),this.locks[t])},e})();ih.Locks=nK;var Q1t=(function(){function e(o,t,n){n===void 0&&(n=null),this.D=t,this.G=n,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new oK,this.project=null,this.x=o,this.k=o.length;var i=this.n=o[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new nK,this.minD=Number.MAX_VALUE;for(var s=i,d;s--;)for(d=i;--d>s;){var u=t[s][d];u>0&&u1e-9)break;var S=this.offsetDir();for(i=0;i1&&M>D||!isFinite(D)){for(i=0;i1&&(k=1);var z=D*D,U=2*k*(M-D)/(z*M),J=M*M*M,re=2*-k/(z*J);for(isFinite(U)||console.log(U),i=0;i0?j-(O+1)*ae:j-(O-1)*ae;-ee0;)for(var s=t;s-- >0;)n(i,s)},e.prototype.matrixApply=function(o){e.mApply(this.k,this.n,o)},e.prototype.computeNextPosition=function(o,t){var n=this;this.computeDerivatives(o);var i=this.computeStepSize(this.g);if(this.stepAndProject(o,t,this.g,i),this.project){this.matrixApply(function(d,u){return n.e[d][u]=o[d][u]-t[d][u]});var s=this.computeStepSize(this.e);s=Math.max(.2,Math.min(s,1)),this.stepAndProject(o,t,this.e,s)}},e.prototype.run=function(o){for(var t=Number.MAX_VALUE,n=!1;!n&&o-- >0;){var i=this.rungeKutta();n=Math.abs(t/i-1)>16)/this.range},e.prototype.getNextBetween=function(o,t){return o+this.getNext()*(t-o)},e})();ih.PseudoRandom=oK});var Cy=pt(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var aK=(function(){function e(o){this.scale=o,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(o){var t=this.scale/o.scale,n=o.offset/o.scale,i=o.weight;this.AB+=i*t*n,this.AD+=i*t*o.desiredPosition,this.A2+=i*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e})();op.PositionStats=aK;var gy=(function(){function e(o,t,n,i){i===void 0&&(i=!1),this.left=o,this.right=t,this.gap=n,this.equality=i,this.active=!1,this.unsatisfiable=!1,this.left=o,this.right=t,this.gap=n,this.equality=i}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e})();op.Constraint=gy;var _y=(function(){function e(o,t,n){t===void 0&&(t=1),n===void 0&&(n=1),this.desiredPosition=o,this.weight=t,this.scale=n,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(o,t){var n=function(i,s){return i.active&&o!==s&&t(i,s)};this.cOut.forEach(function(i){return n(i,i.right)}),this.cIn.forEach(function(i){return n(i,i.left)})},e})();op.Variable=_y;var rI=(function(){function e(o){this.vars=[],o.offset=0,this.ps=new aK(o.scale),this.addVariable(o)}return e.prototype.addVariable=function(o){o.block=this,this.vars.push(o),this.ps.addVariable(o),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var o=0,t=this.vars.length;o=0?this.inactive.push(o):this.bs.merge(o)}}},e.prototype.solve=function(){this.satisfy();for(var o=Number.MAX_VALUE,t=this.bs.cost();Math.abs(o-t)>1e-4;)this.satisfy(),o=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e})();op.Solver=sI;function Y1t(e,o,t){for(var n=e.map(function(D){return new _y(D.desiredCenter)}),i=[],s=e.length,d=0;d{"use strict";var J1t=Yd&&Yd.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Yd,"__esModule",{value:!0});var rK=(function(){function e(){this.findIter=function(o){for(var t=this._root,n=this.iterator();t!==null;){var i=this._comparator(o,t.data);if(i===0)return n._cursor=t,n;n._ancestors.push(t),t=t.get_child(i>0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(o){for(var t=this._root;t!==null;){var n=this._comparator(o,t.data);if(n===0)return t.data;t=t.get_child(n>0)}return null},e.prototype.lowerBound=function(o){return this._bound(o,this._comparator)},e.prototype.upperBound=function(o){var t=this._comparator;function n(i,s){return t(s,i)}return this._bound(o,n)},e.prototype.min=function(){var o=this._root;if(o===null)return null;for(;o.left!==null;)o=o.left;return o.data},e.prototype.max=function(){var o=this._root;if(o===null)return null;for(;o.right!==null;)o=o.right;return o.data},e.prototype.iterator=function(){return new lK(this)},e.prototype.each=function(o){for(var t=this.iterator(),n;(n=t.next())!==null;)o(n)},e.prototype.reach=function(o){for(var t=this.iterator(),n;(n=t.prev())!==null;)o(n)},e.prototype._bound=function(o,t){for(var n=this._root,i=this.iterator();n!==null;){var s=this._comparator(o,n.data);if(s===0)return i._cursor=n,i;i._ancestors.push(n),n=n.get_child(s>0)}for(var d=i._ancestors.length-1;d>=0;--d)if(n=i._ancestors[d],t(o,n.data)>0)return i._cursor=n,i._ancestors.length=d,i;return i._ancestors.length=0,i},e})();Yd.TreeBase=rK;var lK=(function(){function e(o){this._tree=o,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},e.prototype.next=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._minNode(o)}else if(this._cursor.right===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===t)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},e.prototype.prev=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._maxNode(o)}else if(this._cursor.left===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===t)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},e.prototype._minNode=function(o){for(;o.left!==null;)this._ancestors.push(o),o=o.left;this._cursor=o},e.prototype._maxNode=function(o){for(;o.right!==null;)this._ancestors.push(o),o=o.right;this._cursor=o},e})();Yd.Iterator=lK;var vy=(function(){function e(o){this.data=o,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(o){return o?this.right:this.left},e.prototype.set_child=function(o,t){o?this.right=t:this.left=t},e})(),K1t=(function(e){J1t(o,e);function o(t){var n=e.call(this)||this;return n._root=null,n._comparator=t,n.size=0,n}return o.prototype.insert=function(t){var n=!1;if(this._root===null)this._root=new vy(t),n=!0,this.size++;else{var i=new vy(void 0),s=!1,d=!1,u=null,f=i,_=null,C=this._root;for(f.right=this._root;;){if(C===null?(C=new vy(t),_.set_child(s,C),n=!0,this.size++):o.is_red(C.left)&&o.is_red(C.right)&&(C.red=!0,C.left.red=!1,C.right.red=!1),o.is_red(C)&&o.is_red(_)){var x=f.right===u;C===_.get_child(d)?f.set_child(x,o.single_rotate(u,!d)):f.set_child(x,o.double_rotate(u,!d))}var y=this._comparator(C.data,t);if(y===0)break;d=s,s=y<0,u!==null&&(f=u),u=_,_=C,C=C.get_child(s)}this._root=i.right}return this._root.red=!1,n},o.prototype.remove=function(t){if(this._root===null)return!1;var n=new vy(void 0),i=n;i.right=this._root;for(var s=null,d=null,u=null,f=!0;i.get_child(f)!==null;){var _=f;d=s,s=i,i=i.get_child(f);var C=this._comparator(t,i.data);if(f=C>0,C===0&&(u=i),!o.is_red(i)&&!o.is_red(i.get_child(f))){if(o.is_red(i.get_child(!f))){var x=o.single_rotate(i,f);s.set_child(_,x),s=x}else if(!o.is_red(i.get_child(!f))){var y=s.get_child(!_);if(y!==null)if(!o.is_red(y.get_child(!_))&&!o.is_red(y.get_child(_)))s.red=!1,y.red=!0,i.red=!0;else{var P=d.right===s;o.is_red(y.get_child(_))?d.set_child(P,o.double_rotate(s,_)):o.is_red(y.get_child(!_))&&d.set_child(P,o.single_rotate(s,_));var S=d.get_child(P);S.red=!0,i.red=!0,S.left.red=!1,S.right.red=!1}}}}return u!==null&&(u.data=i.data,s.set_child(s.right===i,i.get_child(i.left===null)),this.size--),this._root=n.right,this._root!==null&&(this._root.red=!1),u!==null},o.is_red=function(t){return t!==null&&t.red},o.single_rotate=function(t,n){var i=t.get_child(!n);return t.set_child(!n,i.get_child(n)),i.set_child(n,t),t.red=!0,i.red=!1,i},o.double_rotate=function(t,n){return t.set_child(!n,o.single_rotate(t.get_child(!n),!n)),o.single_rotate(t,n)},o})(rK);Yd.RBTree=K1t});var wu=pt(sl=>{"use strict";var X1t=sl&&sl.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(sl,"__esModule",{value:!0});var ap=Cy(),Z1t=cI();function nh(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(o,t){return t.bounds.union(o)},lm.empty()):lm.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(o,t){return nh(t).union(o)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}sl.computeGroupBounds=nh;var lm=(function(){function e(o,t,n,i){this.x=o,this.X=t,this.y=n,this.Y=i}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(o){var t=this.cx(),n=o.cx();return t<=n&&o.x0?n[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(o,t,n,i,s,d,u,f){var _=n-o,C=u-s,x=i-t,y=f-d,P=y*_-C*x;if(P==0)return null;var S=o-s,M=t-d,D=C*M-y*S,k=D/P,z=_*M-x*S,U=z/P;return k>=0&&k<=1&&U>=0&&U<=1?{x:o+k*_,y:t+k*x}:null},e.prototype.inflate=function(o){return new e(this.x-o,this.X+o,this.y-o,this.Y+o)},e})();sl.Rectangle=lm;function eht(e,o,t){var n=e.rayIntersection(o.cx(),o.cy())||{x:e.cx(),y:e.cy()},i=o.rayIntersection(e.cx(),e.cy())||{x:o.cx(),y:o.cy()},s=i.x-n.x,d=i.y-n.y,u=Math.sqrt(s*s+d*d),f=u-t;return{sourceIntersection:n,targetIntersection:i,arrowStart:{x:n.x+f*s/u,y:n.y+f*d/u}}}sl.makeEdgeBetween=eht;function tht(e,o,t){var n=o.rayIntersection(e.x,e.y);n||(n={x:o.cx(),y:o.cy()});var i=n.x-e.x,s=n.y-e.y,d=Math.sqrt(i*i+s*s);return{x:n.x-t*i/d,y:n.y-t*s/d}}sl.makeEdgeTo=tht;var iht=(function(){function e(o,t,n){this.v=o,this.r=t,this.pos=n,this.prev=pI(),this.next=pI()}return e})(),sK=(function(){function e(o,t,n){this.isOpen=o,this.v=t,this.pos=n}return e})();function nht(e,o){return e.pos>o.pos?1:e.pos=s);var u=new Array(d);for(i=0;i0&&(e[n].insert(s),s[i].insert(e))};t("next","prev"),t("prev","next")}function mK(e,o){return dI(e,o,cK,1e-6)}sl.generateXConstraints=mK;function dK(e,o){return dI(e,o,pK,1e-6)}sl.generateYConstraints=dK;function uK(e){return mI(e,cK,1e-6)}sl.generateXGroupConstraints=uK;function fK(e){return mI(e,pK,1e-6)}sl.generateYGroupConstraints=fK;function rht(e){var o=e.map(function(i){return new ap.Variable(i.cx())}),t=mK(e,o),n=new ap.Solver(o,t);n.solve(),o.forEach(function(i,s){return e[s].setXCentre(i.position())}),o=e.map(function(i){return new ap.Variable(i.cy())}),t=dK(e,o),n=new ap.Solver(o,t),n.solve(),o.forEach(function(i,s){return e[s].setYCentre(i.position())})}sl.removeOverlaps=rht;var xy=(function(e){X1t(o,e);function o(t,n){var i=e.call(this,0,n)||this;return i.index=t,i}return o})(ap.Variable);sl.IndexedVariable=xy;var lht=(function(){function e(o,t,n,i,s){var d=this;if(n===void 0&&(n=null),i===void 0&&(i=null),s===void 0&&(s=!1),this.nodes=o,this.groups=t,this.rootGroup=n,this.avoidOverlaps=s,this.variables=o.map(function(f,_){return f.variable=new xy(_,1)}),i&&this.createConstraints(i),s&&n&&typeof n.groups<"u"){o.forEach(function(f){if(!f.width||!f.height){f.bounds=new lm(f.x,f.x,f.y,f.y);return}var _=f.width/2,C=f.height/2;f.bounds=new lm(f.x-_,f.x+_,f.y-C,f.y+C)}),nh(n);var u=o.length;t.forEach(function(f){d.variables[u]=f.minVar=new xy(u++,typeof f.stiffness<"u"?f.stiffness:.01),d.variables[u]=f.maxVar=new xy(u++,typeof f.stiffness<"u"?f.stiffness:.01)})}}return e.prototype.createSeparation=function(o){return new ap.Constraint(this.nodes[o.left].variable,this.nodes[o.right].variable,o.gap,typeof o.equality<"u"?o.equality:!1)},e.prototype.makeFeasible=function(o){var t=this;if(this.avoidOverlaps){var n="x",i="width";o.axis==="x"&&(n="y",i="height");var s=o.offsets.map(function(u){return t.nodes[u.node]}).sort(function(u,f){return u[n]-f[n]}),d=null;s.forEach(function(u){if(d){var f=d[n]+d[i];f>u[n]&&(u[n]=f)}d=u})}},e.prototype.createAlignment=function(o){var t=this,n=this.nodes[o.offsets[0].node].variable;this.makeFeasible(o);var i=o.axis==="x"?this.xConstraints:this.yConstraints;o.offsets.slice(1).forEach(function(s){var d=t.nodes[s.node].variable;i.push(new ap.Constraint(n,d,s.offset,!0))})},e.prototype.createConstraints=function(o){var t=this,n=function(i){return typeof i.type>"u"||i.type==="separation"};this.xConstraints=o.filter(function(i){return i.axis==="x"&&n(i)}).map(function(i){return t.createSeparation(i)}),this.yConstraints=o.filter(function(i){return i.axis==="y"&&n(i)}).map(function(i){return t.createSeparation(i)}),o.filter(function(i){return i.type==="alignment"}).forEach(function(i){return t.createAlignment(i)})},e.prototype.setupVariablesAndBounds=function(o,t,n,i){this.nodes.forEach(function(s,d){s.fixed?(s.variable.weight=s.fixedWeight?s.fixedWeight:1e3,n[d]=i(s)):s.variable.weight=1;var u=(s.width||0)/2,f=(s.height||0)/2,_=o[d],C=t[d];s.bounds=new lm(_-u,_+u,C-f,C+f)})},e.prototype.xProject=function(o,t,n){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(o,t,o,n,function(i){return i.px},this.xConstraints,uK,function(i){return i.bounds.setXCentre(n[i.variable.index]=i.variable.position())},function(i){var s=n[i.minVar.index]=i.minVar.position(),d=n[i.maxVar.index]=i.maxVar.position(),u=i.padding/2;i.bounds.x=s-u,i.bounds.X=d+u})},e.prototype.yProject=function(o,t,n){!this.rootGroup&&!this.yConstraints||this.project(o,t,t,n,function(i){return i.py},this.yConstraints,fK,function(i){return i.bounds.setYCentre(n[i.variable.index]=i.variable.position())},function(i){var s=n[i.minVar.index]=i.minVar.position(),d=n[i.maxVar.index]=i.maxVar.position(),u=i.padding/2;i.bounds.y=s-u,i.bounds.Y=d+u})},e.prototype.projectFunctions=function(){var o=this;return[function(t,n,i){return o.xProject(t,n,i)},function(t,n,i){return o.yProject(t,n,i)}]},e.prototype.project=function(o,t,n,i,s,d,u,f,_){this.setupVariablesAndBounds(o,t,i,s),this.rootGroup&&this.avoidOverlaps&&(nh(this.rootGroup),d=d.concat(u(this.rootGroup))),this.solve(this.variables,d,n,i),this.nodes.forEach(f),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(_),nh(this.rootGroup))},e.prototype.solve=function(o,t,n,i){var s=new ap.Solver(o,t);s.setStartingPositions(n),s.setDesiredPositions(i),s.solve()},e})();sl.Projection=lht});var uI=pt(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var hK=(function(){function e(o){this.elem=o,this.subheaps=[]}return e.prototype.toString=function(o){for(var t="",n=!1,i=0;i{"use strict";Object.defineProperty(fI,"__esModule",{value:!0});var gK=uI(),_K=(function(){function e(o,t){this.id=o,this.distance=t}return e})(),cht=(function(){function e(o){this.id=o,this.neighbours=[]}return e})(),CK=(function(){function e(o,t,n){this.node=o,this.prev=t,this.d=n}return e})(),pht=(function(){function e(o,t,n,i,s){this.n=o,this.es=t,this.neighbours=new Array(this.n);for(var d=this.n;d--;)this.neighbours[d]=new cht(d);for(d=this.es.length;d--;){var u=this.es[d],f=n(u),_=i(u),C=s(u);this.neighbours[f].neighbours.push(new _K(_,C)),this.neighbours[_].neighbours.push(new _K(f,C))}}return e.prototype.DistanceMatrix=function(){for(var o=new Array(this.n),t=0;tx&&(_.d=x,_.prev=u,n.reduceKey(_.q,_,function(P,S){return P.q=S}))}}return s},e})();fI.Calculator=pht});var CI=pt(ka=>{"use strict";var xK=ka&&ka.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(ka,"__esModule",{value:!0});var mht=wu(),gI=(function(){function e(){}return e})();ka.Point=gI;var _I=(function(){function e(o,t,n,i){this.x1=o,this.y1=t,this.x2=n,this.y2=i}return e})();ka.LineSegment=_I;var dht=(function(e){xK(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(gI);ka.PolyPoint=dht;function zl(e,o,t){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)}ka.isLeft=zl;function Hs(e,o,t){return zl(e,o,t)>0}function gs(e,o,t){return zl(e,o,t)<0}function uht(e){var o=e.slice(0).sort(function(y,P){return y.x!==P.x?P.x-y.x:P.y-y.y}),t=e.length,n,i=0,s=o[0].x;for(n=1;n=0&&o[n].x===C;n--);for(f=n+1,n=d;++n<=f;)if(!(zl(o[i],o[f],o[n])>=0&&n1&&!(zl(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}_!=f&&u.push(o[_]);var x=u.length;for(n=f;--n>=d;)if(!(zl(o[_],o[d],o[n])>=0&&n>d)){for(;u.length>x&&!(zl(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}}return u}ka.ConvexHull=uht;function fht(e,o,t){o.slice(0).sort(function(n,i){return Math.atan2(n.y-e.y,n.x-e.x)-Math.atan2(i.y-e.y,i.x-e.x)}).forEach(t)}ka.clockwiseRadialSweep=fht;function hht(e,o){var t=o.slice(0);return t.push(o[0]),{rtan:Sy(e,t),ltan:wy(e,t)}}function Sy(e,o){var t=o.length-1,n,i,s,d,u;if(gs(e,o[1],o[0])&&!Hs(e,o[t-1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Hs(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=gs(e,o[s+1],o[s]),u&&!Hs(e,o[s-1],o[s]))return s;d=Hs(e,o[n+1],o[n]),d?u||Hs(e,o[n],o[s])?i=s:n=s:u&&gs(e,o[n],o[s])?i=s:n=s}}function wy(e,o){var t=o.length-1,n,i,s,d,u;if(Hs(e,o[t-1],o[0])&&!gs(e,o[1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return gs(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=gs(e,o[s+1],o[s]),Hs(e,o[s-1],o[s])&&!u)return s;d=gs(e,o[n+1],o[n]),d?u?gs(e,o[n],o[s])?i=s:n=s:i=s:u?n=s:Hs(e,o[n],o[s])?i=s:n=s}}function Py(e,o,t,n,i,s){var d,u;d=t(o[0],e),u=n(e[d],o);for(var f=!1;!f;){for(f=!0;d===e.length-1&&(d=0),!i(o[u],e[d],e[d+1]);)++d;for(;u===0&&(u=o.length-1),!s(e[d],o[u],o[u-1]);)--u,f=!1}return{t1:d,t2:u}}ka.tangent_PolyPolyC=Py;function ght(e,o){var t=bK(o,e);return{t1:t.t2,t2:t.t1}}ka.LRtangent_PolyPolyC=ght;function bK(e,o){return Py(e,o,Sy,wy,Hs,gs)}ka.RLtangent_PolyPolyC=bK;function _ht(e,o){return Py(e,o,wy,wy,gs,gs)}ka.LLtangent_PolyPolyC=_ht;function Cht(e,o){return Py(e,o,Sy,Sy,Hs,Hs)}ka.RRtangent_PolyPolyC=Cht;var ah=(function(){function e(o,t){this.t1=o,this.t2=t}return e})();ka.BiTangent=ah;var yK=(function(){function e(){}return e})();ka.BiTangents=yK;var vht=(function(e){xK(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(gI);ka.TVGPoint=vht;var hI=(function(){function e(o,t,n,i){this.id=o,this.polyid=t,this.polyvertid=n,this.p=i,i.vv=this}return e})();ka.VisibilityVertex=hI;var yy=(function(){function e(o,t){this.source=o,this.target=t}return e.prototype.length=function(){var o=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(o*o+t*t)},e})();ka.VisibilityEdge=yy;var xht=(function(){function e(o,t){if(this.P=o,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var n=o.length,i=0;i0&&this.E.push(new yy(s[d-1].vv,f))}s.length>1&&this.E.push(new yy(s[0].vv,s[s.length-1].vv))}for(var i=0;i0)return!0;return!1},e})();ka.TangentVisibilityGraph=xht;function SK(e,o){for(var t=[],n=1,i=o.length;n=0&&S>=0&&M<0&&D>=0&&k>=0&&z<0?i.ll=new ah(s,d):P<=0&&S<=0&&M>0&&D<=0&&k<=0&&z>0?i.rr=new ah(s,d):P<=0&&S>0&&M<=0&&D>=0&&k<0&&z>=0?i.rl=new ah(s,d):P>=0&&S<0&&M>=0&&D<=0&&k>0&&z<=0&&(i.lr=new ah(s,d))}return i}ka.tangents=wK;function bht(e,o){for(var t=1,n=o.length;t0)return!0}return!1}ka.polysOverlap=yht});var vI=pt(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var _s={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function Sht(e,o,t,x,C,s){C===void 0&&(C=1),s===void 0&&(s=!0);var d=0,u=0,f=o,_=t,C=typeof C<"u"?C:1,x=typeof x<"u"?x:0,y=0,P=0,S=0,M=0,D=[];if(e.length==0)return;k(e),U(e,C),s&&z(e);function k(se){se.forEach(function(de){_e(de)});function _e(de){var j=Number.MAX_VALUE,W=Number.MAX_VALUE,pe=0,O=0;de.array.forEach(function(B){var L=typeof B.width<"u"?B.width:x,N=typeof B.height<"u"?B.height:x;L/=2,N/=2,pe=Math.max(B.x+L,pe),j=Math.min(B.x-L,j),O=Math.max(B.y+N,O),W=Math.min(B.y-N,W)}),de.width=pe-j,de.height=O-W}}function z(se){se.forEach(function(_e){var de={x:0,y:0};_e.array.forEach(function(pe){de.x+=pe.x,de.y+=pe.y}),de.x/=_e.array.length,de.y/=_e.array.length;var j={x:de.x-_e.width/2,y:de.y-_e.height/2},W={x:_e.x-j.x+f/2-y/2,y:_e.y-j.y+_/2-P/2};_e.array.forEach(function(pe){pe.x+=W.x,pe.y+=W.y})})}function U(se,_e){var de=Number.POSITIVE_INFINITY,j=0;se.sort(function(ye,Ne){return Ne.height-ye.height}),S=se.reduce(function(ye,Ne){return ye.widthS||$>_s.FLOAT_EPSILON;){if(N!=1)var ne=pe-(pe-W)/_s.GOLDEN_SECTION,B=J(se,ne);if(N!=0)var be=W+(pe-W)/_s.GOLDEN_SECTION,L=J(se,be);if(G=Math.abs(ne-be),$=Math.abs(B-L),BL?(W=ne,ne=be,B=L,N=1):(pe=be,be=ne,L=B,N=0),O++>100)break}J(se,j)}function J(se,_e){D=[],y=0,P=0,M=u;for(var de=0;de=se.height&&D[j].x+D[j].width+se.width+_s.PADDING-_e<=_s.FLOAT_EPSILON){de=D[j];break}D.push(se),de!==void 0?(se.x=de.x+de.width+_s.PADDING,se.y=de.bottom,se.space_left=se.height,se.bottom=se.y,de.space_left-=se.height+_s.PADDING,de.bottom+=se.height+_s.PADDING):(se.y=M,M+=se.height+_s.PADDING,se.x=d,se.bottom=se.y,se.space_left=se.height),se.y+se.height-P>-_s.FLOAT_EPSILON&&(P=se.y+se.height-u),se.x+se.width-y>-_s.FLOAT_EPSILON&&(y=se.x+se.width-d)}function ee(se){var _e=0;return se.forEach(function(de){return _e+=de.width+_s.PADDING}),_e}function ae(){return y/P}}Ty.applyPacking=Sht;function wht(e,o){for(var t={},n={},i=[],s=0,d=0;d{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var Pht=aI(),xI=fy(),My=hy(),Dy=wu(),PK=oh(),TK=CI(),MK=vI(),rh;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(rh=lh.EventType||(lh.EventType={}));function Ey(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var Tht=(function(){function e(){var o=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(t){return typeof o._linkType=="function"?o._linkType(t):0}}}return e.prototype.on=function(o,t){return this.event||(this.event={}),typeof o=="string"?this.event[rh[o]]=t:this.event[o]=t,this},e.prototype.trigger=function(o){this.event&&typeof this.event[o.type]<"u"&&this.event[o.type](o)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha"u"||typeof n.py>"u")&&(n.px=n.x,n.py=n.y);var s=[n.px,n.py];this._descent.locks.add(i,s)}var d=this._descent.rungeKutta();return d===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=d),this._lastStress=d,this.updateNodePositions(),this.trigger({type:rh.tick,alpha:this._alpha,stress:this._lastStress}),!1},e.prototype.updateNodePositions=function(){for(var o=this._descent.x[0],t=this._descent.x[1],n,i=this._nodes.length;i--;)n=this._nodes[i],n.x=o[i],n.y=t[i]},e.prototype.nodes=function(o){if(!o){if(this._nodes.length===0&&this._links.length>0){var t=0;this._links.forEach(function(i){t=Math.max(t,i.source,i.target)}),this._nodes=new Array(++t);for(var n=0;n"u"&&(n.padding=1),typeof n.leaves<"u"&&n.leaves.forEach(function(i,s){typeof i=="number"&&((n.leaves[s]=t._nodes[i]).parent=n)}),typeof n.groups<"u"&&n.groups.forEach(function(i,s){typeof i=="number"&&((n.groups[s]=t._groups[i]).parent=n)})}),this._rootGroup.leaves=this._nodes.filter(function(n){return typeof n.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(n){return typeof n.parent>"u"}),this):this._groups},e.prototype.powerGraphGroups=function(o){var t=Pht.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(t.groups),o(t),this},e.prototype.avoidOverlaps=function(o){return arguments.length?(this._avoidOverlaps=o,this):this._avoidOverlaps},e.prototype.handleDisconnected=function(o){return arguments.length?(this._handleDisconnected=o,this):this._handleDisconnected},e.prototype.flowLayout=function(o,t){return arguments.length||(o="y"),this._directedLinkConstraints={axis:o,getMinSeparation:typeof t=="number"?function(){return t}:t},this},e.prototype.links=function(o){return arguments.length?(this._links=o,this):this._links},e.prototype.constraints=function(o){return arguments.length?(this._constraints=o,this):this._constraints},e.prototype.distanceMatrix=function(o){return arguments.length?(this._distanceMatrix=o,this):this._distanceMatrix},e.prototype.size=function(o){return o?(this._canvasSize=o,this):this._canvasSize},e.prototype.defaultNodeSize=function(o){return o?(this._defaultNodeSize=o,this):this._defaultNodeSize},e.prototype.groupCompactness=function(o){return o?(this._groupCompactness=o,this):this._groupCompactness},e.prototype.linkDistance=function(o){return o?(this._linkDistance=typeof o=="function"?o:+o,this._linkLengthCalculator=null,this):this._linkDistance},e.prototype.linkType=function(o){return this._linkType=o,this},e.prototype.convergenceThreshold=function(o){return o?(this._threshold=typeof o=="function"?o:+o,this):this._threshold},e.prototype.alpha=function(o){return arguments.length?(o=+o,this._alpha?o>0?this._alpha=o:this._alpha=0:o>0&&(this._running||(this._running=!0,this.trigger({type:rh.start,alpha:this._alpha=o}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(o){return typeof this._linkDistance=="function"?+this._linkDistance(o):this._linkDistance},e.setLinkLength=function(o,t){o.length=t},e.prototype.getLinkType=function(o){return typeof this._linkType=="function"?this._linkType(o):0},e.prototype.symmetricDiffLinkLengths=function(o,t){var n=this;return t===void 0&&(t=1),this.linkDistance(function(i){return o*i.length}),this._linkLengthCalculator=function(){return xI.symmetricDiffLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(o,t){var n=this;return t===void 0&&(t=1),this.linkDistance(function(i){return o*i.length}),this._linkLengthCalculator=function(){return xI.jaccardLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.start=function(o,t,n,i,s,d){var u=this;o===void 0&&(o=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!0),d===void 0&&(d=!0);var f,_,C=this.nodes().length,x=C+2*this._groups.length,y=this._links.length,P=this._canvasSize[0],S=this._canvasSize[1],M=new Array(x),D=new Array(x),k=null,z=this._avoidOverlaps;this._nodes.forEach(function(de,j){de.index=j,typeof de.x>"u"&&(de.x=P/2,de.y=S/2),M[j]=de.x,D[j]=de.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new PK.Calculator(x,this._links,e.getSourceIndex,e.getTargetIndex,function(de){return u.getLinkLength(de)}).DistanceMatrix(),k=My.Descent.createSquareMatrix(x,function(){return 2}),this._links.forEach(function(de){typeof de.source=="number"&&(de.source=u._nodes[de.source]),typeof de.target=="number"&&(de.target=u._nodes[de.target])}),this._links.forEach(function(de){var j=e.getSourceIndex(de),W=e.getTargetIndex(de);k[j][W]=k[W][j]=de.weight||1}));var J=My.Descent.createSquareMatrix(x,function(de,j){return U[de][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var f=C,re=function(j,W,pe,O){k[j][W]=k[W][j]=pe,J[j][W]=J[W][j]=O};this._groups.forEach(function(j){re(f,f+1,u._groupCompactness,.1),M[f]=0,D[f++]=0,M[f]=0,D[f++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var ee=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,ee=ee.concat(xI.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new My.Descent([M,D],J),this._descent.locks.clear();for(var f=0;f0&&(this._descent.project=new Dy.Projection(this._nodes,this._groups,this._rootGroup,ee).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(P,S,d),this.avoidOverlaps(z),z&&(this._nodes.forEach(function(de,j){de.x=M[j],de.y=D[j]}),this._descent.project=new Dy.Projection(this._nodes,this._groups,this._rootGroup,ee,!0).projectFunctions(),this._nodes.forEach(function(de,j){M[j]=de.x,D[j]=de.y})),this._descent.G=k,this._descent.run(n),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=C,this._descent.scaleSnapByMaxH=C!=x;var _e=My.Descent.createSquareMatrix(x,function(de,j){return de>=C||j>=C?k[de][j]:0});this._descent.G=_e,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(P,S,d),s?this.resume():this},e.prototype.initialLayout=function(o,t,n){if(this._groups.length>0&&o>0){var i=this._nodes.length,s=this._links.map(function(u){return{source:u.source.index,target:u.target.index}}),d=this._nodes.map(function(u){return{index:u.index}});this._groups.forEach(function(u,f){d.push({index:u.index=i+f})}),this._groups.forEach(function(u,f){typeof u.leaves<"u"&&u.leaves.forEach(function(_){return s.push({source:u.index,target:_.index})}),typeof u.groups<"u"&&u.groups.forEach(function(_){return s.push({source:u.index,target:_.index})})}),new e().size(this.size()).nodes(d).links(s).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(o,0,0,0,!1),this._nodes.forEach(function(u){t[u.index]=d[u.index].x,n[u.index]=d[u.index].y})}else this._descent.run(o)},e.prototype.separateOverlappingComponents=function(o,t,n){var i=this;if(n===void 0&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var s=this._descent.x[0],d=this._descent.x[1];this._nodes.forEach(function(f,_){f.x=s[_],f.y=d[_]});var u=MK.separateGraphs(this._nodes,this._links);MK.applyPacking(u,o,t,this._defaultNodeSize,1,n),this._nodes.forEach(function(f,_){i._descent.x[0][_]=f.x,i._descent.x[1][_]=f.y,f.bounds&&(f.bounds.setXCentre(f.x),f.bounds.setYCentre(f.y))})}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(o){o===void 0&&(o=0),this._visibilityGraph=new TK.TangentVisibilityGraph(this._nodes.map(function(t){return t.bounds.inflate(-o).vertices()}))},e.prototype.routeEdge=function(o,t,n){t===void 0&&(t=5);var i=[],s=new TK.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),d={x:o.source.x,y:o.source.y},u={x:o.target.x,y:o.target.y},f=s.addPoint(d,o.source.index),_=s.addPoint(u,o.target.index);s.addEdgeIfVisible(d,u,o.source.index,o.target.index),typeof n<"u"&&n(s);var C=function(J){return J.source.id},x=function(J){return J.target.id},y=function(J){return J.length()},P=new PK.Calculator(s.V.length,s.E,C,x,y),S=P.PathFromNodeToNode(f.id,_.id);if(S.length===1||S.length===s.V.length){var M=Dy.makeEdgeBetween(o.source.innerBounds,o.target.innerBounds,t);i=[M.sourceIntersection,M.arrowStart]}else{for(var D=S.length-2,k=s.V[S[D]].p,z=s.V[S[0]].p,i=[o.source.innerBounds.rayIntersection(k.x,k.y)],U=D;U>=0;--U)i.push(s.V[S[U]].p);i.push(Dy.makeEdgeTo(z,o.target.innerBounds,t))}return i},e.getSourceIndex=function(o){return typeof o.source=="number"?o.source:o.source.index},e.getTargetIndex=function(o){return typeof o.target=="number"?o.target:o.target.index},e.linkId=function(o){return e.getSourceIndex(o)+"-"+e.getTargetIndex(o)},e.dragStart=function(o){Ey(o)?e.storeOffset(o,e.dragOrigin(o)):(e.stopNode(o),o.fixed|=2)},e.stopNode=function(o){o.px=o.x,o.py=o.y},e.storeOffset=function(o,t){typeof o.leaves<"u"&&o.leaves.forEach(function(n){n.fixed|=2,e.stopNode(n),n._dragGroupOffsetX=n.x-t.x,n._dragGroupOffsetY=n.y-t.y}),typeof o.groups<"u"&&o.groups.forEach(function(n){return e.storeOffset(n,t)})},e.dragOrigin=function(o){return Ey(o)?{x:o.bounds.cx(),y:o.bounds.cy()}:o},e.drag=function(o,t){Ey(o)?(typeof o.leaves<"u"&&o.leaves.forEach(function(n){o.bounds.setXCentre(t.x),o.bounds.setYCentre(t.y),n.px=n._dragGroupOffsetX+t.x,n.py=n._dragGroupOffsetY+t.y}),typeof o.groups<"u"&&o.groups.forEach(function(n){return e.drag(n,t)})):(o.px=t.x,o.py=t.y)},e.dragEnd=function(o){Ey(o)?(typeof o.leaves<"u"&&o.leaves.forEach(function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY}),typeof o.groups<"u"&&o.groups.forEach(e.dragEnd)):o.fixed&=-7},e.mouseOver=function(o){o.fixed|=4,o.px=o.x,o.py=o.y},e.mouseOut=function(o){o.fixed&=-5},e})();lh.Layout=Tht});var EK=pt(Tu=>{"use strict";var Mht=Tu&&Tu.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Tu,"__esModule",{value:!0});var bI=Pu(),DK=(function(e){Mht(o,e);function o(t){var n=e.call(this)||this,i=n,s=t;return s.trigger&&(n.trigger=s.trigger),s.kick&&(n.kick=s.kick),s.drag&&(n.drag=s.drag),s.on&&(n.on=s.on),n.dragstart=n.dragStart=bI.Layout.dragStart,n.dragend=n.dragEnd=bI.Layout.dragEnd,n}return o.prototype.trigger=function(t){},o.prototype.kick=function(){},o.prototype.drag=function(){},o.prototype.on=function(t,n){return this},o})(bI.Layout);Tu.LayoutAdaptor=DK;function Dht(e){return new DK(e)}Tu.adaptor=Dht});var OK=pt(Mu=>{"use strict";var Eht=Mu&&Mu.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Mu,"__esModule",{value:!0});var Hl=Pu(),IK=(function(e){Eht(o,e);function o(){var t=e.call(this)||this;t.event=d3.dispatch(Hl.EventType[Hl.EventType.start],Hl.EventType[Hl.EventType.tick],Hl.EventType[Hl.EventType.end]);var n=t,i;return t.drag=function(){if(!s)var s=d3.behavior.drag().origin(Hl.Layout.dragOrigin).on("dragstart.d3adaptor",Hl.Layout.dragStart).on("drag.d3adaptor",function(d){Hl.Layout.drag(d,d3.event),n.resume()}).on("dragend.d3adaptor",Hl.Layout.dragEnd);if(!arguments.length)return s;this.call(s)},t}return o.prototype.trigger=function(t){var n={type:Hl.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event[n.type](n)},o.prototype.kick=function(){var t=this;d3.timer(function(){return e.prototype.tick.call(t)})},o.prototype.on=function(t,n){return typeof t=="string"?this.event.on(t,n):this.event.on(Hl.EventType[t],n),this},o})(Hl.Layout);Mu.D3StyleLayoutAdaptor=IK;function Iht(){return new IK}Mu.d3adaptor=Iht});var AK=pt(sh=>{"use strict";var Oht=sh&&sh.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(sh,"__esModule",{value:!0});var Gl=Pu(),Aht=(function(e){Oht(o,e);function o(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(Gl.EventType[Gl.EventType.start],Gl.EventType[Gl.EventType.tick],Gl.EventType[Gl.EventType.end]);var i=n,s;return n.drag=function(){if(!d)var d=t.drag().subject(Gl.Layout.dragOrigin).on("start.d3adaptor",Gl.Layout.dragStart).on("drag.d3adaptor",function(u){Gl.Layout.drag(u,t.event),i.resume()}).on("end.d3adaptor",Gl.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},n}return o.prototype.trigger=function(t){var n={type:Gl.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(n.type,n)},o.prototype.kick=function(){var t=this,n=this.d3Context.timer(function(){return e.prototype.tick.call(t)&&n.stop()})},o.prototype.on=function(t,n){return typeof t=="string"?this.event.on(t,n):this.event.on(Gl.EventType[t],n),this},o})(Gl.Layout);sh.D3StyleLayoutAdaptor=Aht});var FK=pt(yI=>{"use strict";Object.defineProperty(yI,"__esModule",{value:!0});var Fht=OK(),kht=AK();function Bht(e){return!e||Rht(e)?new Fht.D3StyleLayoutAdaptor:new kht.D3StyleLayoutAdaptor(e)}yI.d3adaptor=Bht;function Rht(e){var o=/^3\./;return e.version&&e.version.match(o)!==null}});var TI=pt(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Nht=wu(),SI=Cy(),Lht=oh(),kK=(function(){function e(o,t,n){this.id=o,this.rect=t,this.children=n,this.leaf=typeof n>"u"||n.length===0}return e})();Du.NodeWrapper=kK;var wI=(function(){function e(o,t,n,i,s){i===void 0&&(i=null),s===void 0&&(s=null),this.id=o,this.x=t,this.y=n,this.node=i,this.line=s}return e})();Du.Vert=wI;var PI=(function(){function e(o,t){this.s=o,this.t=t;var n=e.findMatch(o,t),i=t.slice(0).reverse(),s=e.findMatch(o,i);n.length>=s.length?(this.length=n.length,this.si=n.si,this.ti=n.ti,this.reversed=!1):(this.length=s.length,this.si=s.si,this.ti=t.length-s.ti-s.length,this.reversed=!0)}return e.findMatch=function(o,t){for(var n=o.length,i=t.length,s={length:0,si:-1,ti:-1},d=new Array(n),u=0;us.length&&(s.length=_,s.si=u-_+1,s.ti=f-_+1)}else d[u][f]=0}return s},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e})();Du.LongestCommonSubsequence=PI;var Vht=(function(){function e(o,t,n){var i=this;n===void 0&&(n=12),this.originalnodes=o,this.groupPadding=n,this.leaves=null,this.nodes=o.map(function(M,D){return new kK(D,t.getBounds(M),t.getChildren(M))}),this.leaves=this.nodes.filter(function(M){return M.leaf}),this.groups=this.nodes.filter(function(M){return!M.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(M){return M.children.forEach(function(D){return i.nodes[D].parent=M})}),this.root={children:[]},this.nodes.forEach(function(M){typeof M.parent>"u"&&(M.parent=i.root,i.root.children.push(M.id)),M.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(M,D){return i.getDepth(M)-i.getDepth(D)});var s=this.backToFront.slice(0).reverse().filter(function(M){return!M.leaf});s.forEach(function(M){var D=Nht.Rectangle.empty();M.children.forEach(function(k){return D=D.union(i.nodes[k].rect)}),M.rect=D.inflate(i.groupPadding)});var d=this.midPoints(this.cols.map(function(M){return M.pos})),u=this.midPoints(this.rows.map(function(M){return M.pos})),f=d[0],_=d[d.length-1],C=u[0],x=u[u.length-1],y=this.rows.map(function(M){return{x1:f,x2:_,y1:M.pos,y2:M.pos}}).concat(u.map(function(M){return{x1:f,x2:_,y1:M,y2:M}})),P=this.cols.map(function(M){return{x1:M.pos,x2:M.pos,y1:C,y2:x}}).concat(d.map(function(M){return{x1:M,x2:M,y1:C,y2:x}})),S=y.concat(P);S.forEach(function(M){return M.verts=[]}),this.verts=[],this.edges=[],y.forEach(function(M){return P.forEach(function(D){var k=new wI(i.verts.length,D.x1,M.y1);M.verts.push(k),D.verts.push(k),i.verts.push(k);for(var z=i.backToFront.length;z-- >0;){var U=i.backToFront[z],J=U.rect,re=Math.abs(k.x-J.cx()),ee=Math.abs(k.y-J.cy());if(re0;){var i=n.filter(function(d){return d.rect["overlap"+o.toUpperCase()](n[0].rect)}),s={nodes:i,pos:this.avg(i.map(function(d){return d.rect["c"+o]()}))};t.push(s),s.nodes.forEach(function(d){return n.splice(n.indexOf(d),1)})}return t.sort(function(d,u){return d.pos-u.pos}),t},e.prototype.getDepth=function(o){for(var t=0;o.parent!==this.root;)t++,o=o.parent;return t},e.prototype.midPoints=function(o){for(var t=o[1]-o[0],n=[o[0]-t/2],i=1;i.1)&&(x={pos:f[0][t],segments:[]},C.push(x)),x.segments.push(f)}return C},e.nudgeSegs=function(o,t,n,i,s,d){var u=i.length;if(!(u<=1)){for(var f=i.map(function(U){return new SI.Variable(U[0][o])}),_=[],C=0;C=0&&_.push(new SI.Constraint(f[D],f[k],d))}var z=new SI.Solver(f,_);z.solve(),f.forEach(function(U,J){var re=i[J],ee=U.position();re[0][o]=re[1][o]=ee;var ae=n[re.edgeid];re.i>0&&(ae[re.i-1][1][o]=ee),re.iMath.PI||s<-Math.PI)&&(s=i-n),s},e.isLeft=function(o,t,n){return(t.x-o.x)*(n.y-o.y)-(t.y-o.y)*(n.x-o.x)<=0},e.getOrder=function(o){for(var t={},n=0;n"u"&&(t[i.l]={}),t[i.l][i.r]=!0}return function(s,d){return typeof t[s]<"u"&&t[s][d]}},e.orderEdges=function(o){for(var t=[],n=0;n=s.length||u.ti+u.length>=d.length)){t.push({l:n,r:i});continue}u.si+u.length>=s.length||u.ti+u.length>=d.length?(f=s[u.si+1],C=s[u.si-1],_=d[u.ti-1]):(f=s[u.si+u.length-2],_=s[u.si+u.length],C=d[u.ti+u.length]),e.isLeft(f,_,C)?t.push({l:i,r:n}):t.push({l:n,r:i})}}return e.getOrder(t)},e.makeSegments=function(o){function t(_){return{x:_.x,y:_.y}}for(var n=function(_,C,x){return Math.abs((C.x-_.x)*(x.y-_.y)-(C.y-_.y)*(x.x-_.x))<.001},i=[],s=t(o[0]),d=1;d1&&se>1?1e3:0},M=P.PathFromNodeToNodeWithPrevCost(i.ports[0].id,s.ports[0].id,S),D=M.reverse().map(function(k){return n.verts[k]});return D.push(this.nodes[s.id].ports[0]),D.filter(function(k,z){return!(z0&&k.node===s&&D[z-1].node===s)})},e.getRoutePath=function(o,t,n,i){var s={routepath:"M "+o[0][0].x+" "+o[0][0].y+" ",arrowpath:""};if(o.length>1)for(var d=0;d0?f-=C/Math.abs(C)*t:_-=x/Math.abs(x)*t,s.routepath+="L "+f+" "+_+" ";var y=o[d+1],P=y[0].x,S=y[0].y,M=y[1].x,D=y[1].y;C=M-P,x=D-S;var k=e.angleBetween2Lines(u,y)<0?1:0,z,U;Math.abs(C)>0?(z=P+C/Math.abs(C)*t,U=S):(z=P,U=S+x/Math.abs(x)*t);var J=Math.abs(z-f),re=Math.abs(U-_);s.routepath+="A "+J+" "+re+" 0 0 "+k+" "+z+" "+U+" "}else{var ee=[f,_],ae,se;Math.abs(C)>0?(f-=C/Math.abs(C)*i,ae=[f,_+n],se=[f,_-n]):(_-=x/Math.abs(x)*i,ae=[f+n,_],se=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+ae[0]+" "+ae[1]+" L "+se[0]+" "+se[1])}}else{var u=o[0],f=u[1].x,_=u[1].y,C=f-u[0].x,x=_-u[0].y,ee=[f,_],ae,se;Math.abs(C)>0?(f-=C/Math.abs(C)*i,ae=[f,_+n],se=[f,_-n]):(_-=x/Math.abs(x)*i,ae=[f+n,_],se=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+ae[0]+" "+ae[1]+" L "+se[0]+" "+se[1])}return s},e})();Du.GridRouter=Vht});var BK=pt(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var qht=oh(),MI=hy(),zht=wu(),Hht=fy(),Ght=(function(){function e(o,t){this.source=o,this.target=t}return e.prototype.actualLength=function(o){var t=this;return Math.sqrt(o.reduce(function(n,i){var s=i[t.target]-i[t.source];return n+s*s},0))},e})();ch.Link3D=Ght;var jht=(function(){function e(o,t,n){o===void 0&&(o=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=o,this.y=t,this.z=n}return e})();ch.Node3D=jht;var $ht=(function(){function e(o,t,n){var i=this;n===void 0&&(n=1),this.nodes=o,this.links=t,this.idealLinkLength=n,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var s=0;s"u"&&(d[C]=Math.random())}i.result[0][u]=d.x,i.result[1][u]=d.y,i.result[2][u]=d.z})}return e.prototype.linkLength=function(o){return o.actualLength(this.result)},e.prototype.start=function(o){var t=this;o===void 0&&(o=100);var n=this.nodes.length,i=new Uht;this.useJaccardLinkLengths&&Hht.jaccardLinkLengths(this.links,i,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var s=new qht.Calculator(n,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=MI.Descent.createSquareMatrix(n,function(C,x){return s[C][x]}),u=MI.Descent.createSquareMatrix(n,function(){return 2});this.links.forEach(function(C){var x=C.source,y=C.target;return u[x][y]=u[y][x]=1}),this.descent=new MI.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new zht.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var f=0;f{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var DI=Pu(),Wht=TI();function Qht(e,o,t,n){e.cola.start(0,0,0,10,!1);var i=Yht(e.cola.nodes(),e.cola.groups(),t,n);return i.routeEdges(e.powerGraph.powerEdges,o,function(s){return s.source.routerNode.id},function(s){return s.target.routerNode.id})}Iy.gridify=Qht;function Yht(e,o,t,n){e.forEach(function(s){s.routerNode={name:s.name,bounds:s.bounds.inflate(-t)}}),o.forEach(function(s){s.routerNode={bounds:s.bounds.inflate(-n),children:(typeof s.groups<"u"?s.groups.map(function(d){return e.length+d.id}):[]).concat(typeof s.leaves<"u"?s.leaves.map(function(d){return d.index}):[])}});var i=e.concat(o).map(function(s,d){return s.routerNode.id=d,s.routerNode});return new Wht.GridRouter(i,{getChildren:function(s){return s.children},getBounds:function(s){return s.bounds}},t-n)}function Jht(e,o,t){var n;e.nodes.forEach(function(u,f){return u.index=f}),new DI.Layout().avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups(function(u){n=u,n.groups.forEach(function(f){return f.padding=t})});var i=e.nodes.length,s=[],d=e.nodes.slice(0);return d.forEach(function(u,f){return u.index=f}),n.groups.forEach(function(u){var f=u.index=u.id+i;d.push(u),typeof u.leaves<"u"&&u.leaves.forEach(function(_){return s.push({source:f,target:_.index})}),typeof u.groups<"u"&&u.groups.forEach(function(_){return s.push({source:f,target:_.id+i})})}),n.powerEdges.forEach(function(u){s.push({source:u.source.index,target:u.target.index})}),new DI.Layout().size(o).nodes(d).links(s).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new DI.Layout().convergenceThreshold(.001).size(o).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(u){n=u,n.groups.forEach(function(f){f.padding=t})}).start(50,0,100,0,!1),powerGraph:n}}Iy.powerGraphGridLayout=Jht});var NK=pt(Oy=>{"use strict";function Kr(e){for(var o in e)Oy.hasOwnProperty(o)||(Oy[o]=e[o])}Object.defineProperty(Oy,"__esModule",{value:!0});Kr(EK());Kr(FK());Kr(hy());Kr(CI());Kr(TI());Kr(vI());Kr(Pu());Kr(BK());Kr(fy());Kr(aI());Kr(uI());Kr(cI());Kr(wu());Kr(oh());Kr(Cy());Kr(RK())});var MO=pt((jX,TO)=>{(function(e){typeof jX=="object"&&typeof TO<"u"?TO.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})(function(){return(function e(o,t,n){function i(u,f){if(!t[u]){if(!o[u]){var _=typeof Ms=="function"&&Ms;if(!f&&_)return _(u,!0);if(s)return s(u,!0);var C=new Error("Cannot find module '"+u+"'");throw C.code="MODULE_NOT_FOUND",C}var x=t[u]={exports:{}};o[u][0].call(x.exports,function(y){return i(o[u][1][y]||y)},x,x.exports,e,o,t,n)}return t[u].exports}for(var s=typeof Ms=="function"&&Ms,d=0;d{let M=this.workbook.addWorksheet(y.sheetName),D=y.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],k=y.map||function(U){if(U==="")return null;let J=Number(U);if(!Number.isNaN(J)&&J!==1/0)return J;let re=D.reduce((ae,se)=>{if(ae)return ae;let _e=u(U,se,!0);return _e.isValid()?_e:null},null);if(re)return new Date(re.valueOf());let ee=C[U];return ee!==void 0?ee:U},z=i.parse(y.parserOptions).on("data",U=>{M.addRow(U.map(k))}).on("end",()=>{z.emit("worksheet",M)});z.on("worksheet",P).on("error",S),x.pipe(z)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(x,y){return new Promise((P,S)=>{y=y||{};let M=this.workbook.getWorksheet(y.sheetName||y.sheetId),D=i.format(y.formatterOptions);x.on("finish",()=>{P()}),D.on("error",S),D.pipe(x);let{dateFormat:k,dateUTC:z}=y,U=y.map||(ee=>{if(ee){if(ee.text||ee.hyperlink)return ee.hyperlink||ee.text||"";if(ee.formula||ee.result)return ee.result||"";if(ee instanceof Date)return k?z?u.utc(ee).format(k):u(ee).format(k):z?u.utc(ee).format():u(ee).format();if(ee.error)return ee.error;if(typeof ee=="object")return JSON.stringify(ee)}return ee}),J=y.includeEmptyRows===void 0||y.includeEmptyRows,re=1;M&&M.eachRow((ee,ae)=>{if(J)for(;re++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,u)if(typeof u=="string"){let _=n.decodeAddress(u);this.nativeCol=_.col+f,this.nativeColOff=0,this.nativeRow=_.row+f,this.nativeRowOff=0}else u.nativeCol!==void 0?(this.nativeCol=u.nativeCol||0,this.nativeColOff=u.nativeColOff||0,this.nativeRow=u.nativeRow||0,this.nativeRowOff=u.nativeRowOff||0):u.col!==void 0?(this.col=u.col+f,this.row=u.row+f):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof i||d==null?d:new i(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}o.exports=i},{"../utils/col-cache":19}],3:[function(e,o,t){"use strict";let n=e("../utils/col-cache"),i=e("../utils/under-dash"),s=e("./enums"),{slideFormula:d}=e("../utils/shared-formula"),u=e("./note");class f{constructor(x,y,P){if(!x||!y)throw new Error("A Cell needs a Row");this._row=x,this._column=y,n.validateAddress(P),this._address=P,this._value=_.create(f.Types.Null,this),this.style=this._mergeStyle(x.style,y.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(x){this.style.numFmt=x}get font(){return this.style.font}set font(x){this.style.font=x}get alignment(){return this.style.alignment}set alignment(x){this.style.alignment=x}get border(){return this.style.border}set border(x){this.style.border=x}get fill(){return this.style.fill}set fill(x){this.style.fill=x}get protection(){return this.style.protection}set protection(x){this.style.protection=x}_mergeStyle(x,y,P){let S=x&&x.numFmt||y&&y.numFmt;S&&(P.numFmt=S);let M=x&&x.font||y&&y.font;M&&(P.font=M);let D=x&&x.alignment||y&&y.alignment;D&&(P.alignment=D);let k=x&&x.border||y&&y.border;k&&(P.border=k);let z=x&&x.fill||y&&y.fill;z&&(P.fill=z);let U=x&&x.protection||y&&y.protection;return U&&(P.protection=U),P}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===f.Types.Merge}merge(x,y){this._value.release(),this._value=_.create(f.Types.Merge,this,x),y||(this.style=x.style)}unmerge(){this.type===f.Types.Merge&&(this._value.release(),this._value=_.create(f.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(x){return this._value.type===f.Types.Merge&&this._value.isMergedTo(x)}get master(){return this.type===f.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===f.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(x){this.type!==f.Types.Merge?(this._value.release(),this._value=_.create(_.getType(x),this,x)):this._value.master.value=x}get note(){return this._comment&&this._comment.note}set note(x){this._comment=new u(x)}get text(){return this._value.toString()}get html(){return i.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(x){this.type===f.Types.String&&(this._value=_.create(f.Types.Hyperlink,this,{text:this._value.value,hyperlink:x}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:x}=this._row;return{sheetName:x.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(x){this.names=[x]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(x){let{definedNames:y}=this.workbook;y.removeAllNames(this.fullAddress),x.forEach(P=>{y.addEx(this.fullAddress,P)})}addName(x){this.workbook.definedNames.addEx(this.fullAddress,x)}removeName(x){this.workbook.definedNames.removeEx(this.fullAddress,x)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(x){this._dataValidations.add(this.address,x)}get model(){let{model:x}=this._value;return x.style=this.style,this._comment&&(x.comment=this._comment.model),x}set model(x){if(this._value.release(),this._value=_.create(x.type,this),this._value.model=x,x.comment)switch(x.comment.type){case"note":this._comment=u.fromModel(x.comment)}x.style?this.style=x.style:this.style={}}}f.Types=s.ValueType;let _={getType:C=>C==null?f.Types.Null:C instanceof String||typeof C=="string"?f.Types.String:typeof C=="number"?f.Types.Number:typeof C=="boolean"?f.Types.Boolean:C instanceof Date?f.Types.Date:C.text&&C.hyperlink?f.Types.Hyperlink:C.formula||C.sharedFormula?f.Types.Formula:C.richText?f.Types.RichText:C.sharedString?f.Types.SharedString:C.error?f.Types.Error:f.Types.JSON,types:[{t:f.Types.Null,f:class{constructor(C){this.model={address:C.address,type:f.Types.Null}}get value(){return null}set value(C){}get type(){return f.Types.Null}get effectiveType(){return f.Types.Null}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){}toString(){return""}}},{t:f.Types.Number,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Number,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Number}get effectiveType(){return f.Types.Number}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.String,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.String}get effectiveType(){return f.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:f.Types.Date,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Date,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Date}get effectiveType(){return f.Types.Date}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.Hyperlink,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Hyperlink,text:x?x.text:void 0,hyperlink:x?x.hyperlink:void 0},x&&x.tooltip&&(this.model.tooltip=x.tooltip)}get value(){let C={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(C.tooltip=this.model.tooltip),C}set value(C){this.model={text:C.text,hyperlink:C.hyperlink},C.tooltip&&(this.model.tooltip=C.tooltip)}get text(){return this.model.text}set text(C){this.model.text=C}get hyperlink(){return this.model.hyperlink}set hyperlink(C){this.model.hyperlink=C}get type(){return f.Types.Hyperlink}get effectiveType(){return f.Types.Hyperlink}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:f.Types.Formula,f:class{constructor(C,x){this.cell=C,this.model={address:C.address,type:f.Types.Formula,shareType:x?x.shareType:void 0,ref:x?x.ref:void 0,formula:x?x.formula:void 0,sharedFormula:x?x.sharedFormula:void 0,result:x?x.result:void 0}}_copyModel(C){let x={},y=P=>{let S=C[P];S&&(x[P]=S)};return y("formula"),y("result"),y("ref"),y("shareType"),y("sharedFormula"),x}get value(){return this._copyModel(this.model)}set value(C){this.model=this._copyModel(C)}validate(C){switch(_.getType(C)){case f.Types.Null:case f.Types.String:case f.Types.Number:case f.Types.Date:break;case f.Types.Hyperlink:case f.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(C){this.model.formula=C}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(C){this.model.result=C}get type(){return f.Types.Formula}get effectiveType(){let C=this.model.result;return C==null?s.ValueType.Null:C instanceof String||typeof C=="string"?s.ValueType.String:typeof C=="number"?s.ValueType.Number:C instanceof Date?s.ValueType.Date:C.text&&C.hyperlink?s.ValueType.Hyperlink:C.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(C){this.model.address=C}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:C}=this.cell,x=C.findCell(this.model.sharedFormula);this._translatedFormula=x&&d(x.formula,x.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:f.Types.Merge,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Merge,master:x?x.address:void 0},this._master=x,x&&x.addMergeRef()}get value(){return this._master.value}set value(C){C instanceof f?(this._master&&this._master.releaseMergeRef(),C.addMergeRef(),this._master=C):this._master.value=C}isMergedTo(C){return C===this._master}get master(){return this._master}get type(){return f.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:f.Types.JSON,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:JSON.stringify(x),rawValue:x}}get value(){return this.model.rawValue}set value(C){this.model.rawValue=C,this.model.value=JSON.stringify(C)}get type(){return f.Types.String}get effectiveType(){return f.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:f.Types.SharedString,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.SharedString,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.SharedString}get effectiveType(){return f.Types.SharedString}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.RichText,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}toString(){return this.model.value.richText.map(C=>C.text).join("")}get type(){return f.Types.RichText}get effectiveType(){return f.Types.RichText}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:f.Types.Boolean,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Boolean,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Boolean}get effectiveType(){return f.Types.Boolean}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.Error,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Error,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Error}get effectiveType(){return f.Types.Error}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((C,x)=>(C[x.t]=x.f,C),[]),create(C,x,y){let P=this.types[C];if(!P)throw new Error("Could not create Value of type "+C);return new P(x,y)}};o.exports=f},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache");class d{constructor(f,_,C){this._worksheet=f,this._number=_,C!==!1&&(this.defn=C)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(f){f?(this.key=f.key,this.width=f.width!==void 0?f.width:9,this.outlineLevel=f.outlineLevel,f.style?this.style=f.style:this.style={},this.header=f.header,this._hidden=!!f.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(f){f!==void 0?(this._header=f,this.headers.forEach((_,C)=>{this._worksheet.getCell(C+1,this.number).value=_})):this._header=void 0}get key(){return this._key}set key(f){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=f,f&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(f){this._hidden=f}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(f){this._outlineLevel=f}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(f){return this.width===f.width&&this.hidden===f.hidden&&this.outlineLevel===f.outlineLevel&&n.isEqual(this.style,f.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let f=this.style;return!f||!(f.font||f.numFmt||f.alignment||f.border||f.fill||f.protection)}get headerCount(){return this.headers.length}eachCell(f,_){let C=this.number;_||(_=f,f=null),this._worksheet.eachRow(f,(x,y)=>{_(x.getCell(C),y)})}get values(){let f=[];return this.eachCell((_,C)=>{_&&_.type!==i.ValueType.Null&&(f[C]=_.value)}),f}set values(f){if(!f)return;let _=this.number,C=0;f.hasOwnProperty("0")&&(C=1),f.forEach((x,y)=>{this._worksheet.getCell(y+C,_).value=x})}_applyStyle(f,_){return this.style[f]=_,this.eachCell(C=>{C[f]=_}),_}get numFmt(){return this.style.numFmt}set numFmt(f){this._applyStyle("numFmt",f)}get font(){return this.style.font}set font(f){this._applyStyle("font",f)}get alignment(){return this.style.alignment}set alignment(f){this._applyStyle("alignment",f)}get protection(){return this.style.protection}set protection(f){this._applyStyle("protection",f)}get border(){return this.style.border}set border(f){this._applyStyle("border",f)}get fill(){return this.style.fill}set fill(f){this._applyStyle("fill",f)}static toModel(f){let _=[],C=null;return f&&f.forEach((x,y)=>{x.isDefault?C&&(C=null):C&&x.equivalentTo(C)?C.max=y+1:(C={min:y+1,max:y+1,width:x.width!==void 0?x.width:9,style:x.style,isCustomWidth:x.isCustomWidth,hidden:x.hidden,outlineLevel:x.outlineLevel,collapsed:x.collapsed},_.push(C))}),_.length?_:void 0}static fromModel(f,_){let C=[],x=1,y=0;for(_=(_=_||[]).sort(function(P,S){return P.min-S.min});y<_.length;){let P=_[y++];for(;x{_.removeCellEx(f)})}forEach(f){n.each(this.matrixMap,(_,C)=>{_.forEach(x=>{f(C,x)})})}getNames(f){return this.getNamesEx(i.decodeEx(f))}getNamesEx(f){return n.map(this.matrixMap,(_,C)=>_.findCellEx(f)&&C).filter(Boolean)}_explore(f,_){_.mark=!1;let{sheetName:C}=_,x=new d(_.row,_.col,_.row,_.col,C),y,P;function S(D,k){let z=f.findCellAt(C,D,_.col);return!(!z||!z.mark)&&(x[k]=D,z.mark=!1,!0)}for(P=_.row-1;S(P,"top");P--);for(P=_.row+1;S(P,"bottom");P++);function M(D,k){let z=[];for(P=x.top;P<=x.bottom;P++){let U=f.findCellAt(C,P,D);if(!U||!U.mark)return!1;z.push(U)}x[k]=D;for(let U=0;U{C.mark=!0}),{name:f,ranges:_.map(C=>C.mark&&this._explore(_,C)).filter(Boolean).map(C=>C.$shortRange)}):{name:f,ranges:[]}}normaliseMatrix(f,_){f.forEachInSheet(_,(C,x,y)=>{C&&(C.row===x&&C.col===y||(C.row=x,C.col=y,C.address=i.n2l(y)+x))})}spliceRows(f,_,C,x){n.each(this.matrixMap,y=>{y.spliceRows(f,_,C,x),this.normaliseMatrix(y,f)})}spliceColumns(f,_,C,x){n.each(this.matrixMap,y=>{y.spliceColumns(f,_,C,x),this.normaliseMatrix(y,f)})}get model(){return n.map(this.matrixMap,(f,_)=>this.getRanges(_,f)).filter(f=>f.ranges.length)}set model(f){let _=this.matrixMap={};f.forEach(C=>{let x=_[C.name]=new s;C.ranges.forEach(y=>{u.test(y.split("!").pop()||"")&&x.addCell(y)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,o,t){"use strict";o.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,o,t){"use strict";let n=e("../utils/col-cache"),i=e("./anchor");o.exports=class{constructor(s,d){this.worksheet=s,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:d,imageId:u,range:f,hyperlinks:_}=s;if(this.type=d,this.imageId=u,d==="image")if(typeof f=="string"){let C=n.decode(f);this.range={tl:new i(this.worksheet,{col:C.left,row:C.top},-1),br:new i(this.worksheet,{col:C.right,row:C.bottom},0),editAs:"oneCell"}}else this.range={tl:new i(this.worksheet,f.tl,0),br:f.br&&new i(this.worksheet,f.br,0),ext:f.ext,editAs:f.editAs,hyperlinks:_||f.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,o,t){"use strict";let n=e("../utils/under-dash");class i{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return n.deepMerge({},i.DEFAULT_CONFIGS,d)}set model(d){let{note:u}=d,{texts:f}=u;f.length===1&&Object.keys(f[0]).length===1?this.note=f[0].text:this.note=u}static fromModel(d){let u=new i;return u.model=d,u}}i.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},o.exports=i},{"../utils/under-dash":26}],10:[function(e,o,t){"use strict";let n=e("../utils/col-cache");class i{constructor(){this.decode(arguments)}setTLBR(d,u,f,_,C){if(arguments.length<4){let x=n.decodeAddress(d),y=n.decodeAddress(u);this.model={top:Math.min(x.row,y.row),left:Math.min(x.col,y.col),bottom:Math.max(x.row,y.row),right:Math.max(x.col,y.col),sheetName:f},this.setTLBR(x.row,x.col,y.row,y.col,C)}else this.model={top:Math.min(d,f),left:Math.min(u,_),bottom:Math.max(d,f),right:Math.max(u,_),sheetName:C}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{let u=d[0];if(u instanceof i)this.model={top:u.model.top,left:u.model.left,bottom:u.model.bottom,right:u.model.right,sheetName:u.sheetName};else if(u instanceof Array)this.decode(u);else if(u.top&&u.left&&u.bottom&&u.right)this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName};else{let f=n.decodeEx(u);f.top?this.model={top:f.top,left:f.left,bottom:f.bottom,right:f.right,sheetName:f.sheetName}:this.model={top:f.row,left:f.col,bottom:f.row,right:f.col,sheetName:f.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){let{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,u,f,_){(!this.model.top||dthis.bottom)&&(this.bottom=f),(!this.model.right||_>this.right)&&(this.right=_)}expandRow(d){if(d){let{dimensions:u,number:f}=d;u&&this.expand(f,u.min,f,u.max)}}expandToAddress(d){let u=n.decodeEx(d);this.expand(u.row,u.col,u.row,u.col)}get tl(){return n.n2l(this.left)+this.top}get $t$l(){return`$${n.n2l(this.left)}$${this.top}`}get br(){return n.n2l(this.right)+this.bottom}get $b$r(){return`$${n.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottomthis.bottom)&&!(d.rightthis.right)}contains(d){let u=n.decodeEx(d);return this.containsEx(u)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let u=this.left;u<=this.right;u++)for(let f=this.top;f<=this.bottom;f++)d(n.encodeAddress(f,u),f,u)}}o.exports=i},{"../utils/col-cache":19}],11:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache"),d=e("./cell");o.exports=class{constructor(u,f){this._worksheet=u,this._number=f,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(u){return this._cells[u-1]}getCellEx(u){let f=this._cells[u.col-1];if(!f){let _=this._worksheet.getColumn(u.col);f=new d(this,_,u.address),this._cells[u.col-1]=f}return f}getCell(u){if(typeof u=="string"){let f=this._worksheet.getColumnKey(u);u=f?f.number:s.l2n(u)}return this._cells[u-1]||this.getCellEx({address:s.encodeAddress(this._number,u),row:this._number,col:u})}splice(u,f){let _=u+f;for(var C=arguments.length,x=new Array(C>2?C-2:0),y=2;y0)for(M=S;M>=_;M--)D=this._cells[M-1],D?(k=this.getCell(M+P),k.value=D.value,k.style=D.style,k._comment=D._comment):this._cells[M+P-1]=void 0;for(M=0;M{_&&_.type!==i.ValueType.Null&&f(_,C+1)})}addPageBreak(u,f){let _=this._worksheet,C=Math.max(0,u-1)||0,x=Math.max(0,f-1)||16838,y={id:this._number,max:x,man:1};C&&(y.min=C),_.rowBreaks.push(y)}get values(){let u=[];return this._cells.forEach(f=>{f&&f.type!==i.ValueType.Null&&(u[f.col]=f.value)}),u}set values(u){if(this._cells=[],u)if(u instanceof Array){let f=0;u.hasOwnProperty("0")&&(f=1),u.forEach((_,C)=>{_!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,C+f),row:this._number,col:C+f}).value=_)})}else this._worksheet.eachColumnKey((f,_)=>{u[_]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,f.number),row:this._number,col:f.number}).value=u[_])})}get hasValues(){return n.some(this._cells,u=>u&&u.type!==i.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let u=0;return this.eachCell(()=>{u++}),u}get dimensions(){let u=0,f=0;return this._cells.forEach(_=>{_&&_.type!==i.ValueType.Null&&((!u||u>_.col)&&(u=_.col),f<_.col&&(f=_.col))}),u>0?{min:u,max:f}:null}_applyStyle(u,f){return this.style[u]=f,this._cells.forEach(_=>{_&&(_[u]=f)}),f}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let u=[],f=0,_=0;return this._cells.forEach(C=>{if(C){let x=C.model;x&&((!f||f>C.col)&&(f=C.col),_{switch(_.type){case d.Types.Merge:break;default:{let C;if(_.address)C=s.decodeAddress(_.address);else if(f){let{row:x}=f,y=f.col+1;C={row:x,col:y,address:s.encodeAddress(x,y),$col$row:`$${s.n2l(y)}$${x}`}}f=C,this.getCellEx(C).model=_;break}}}),u.height?this.height=u.height:delete this.height,this.hidden=u.hidden,this.outlineLevel=u.outlineLevel||0,this.style=u.style&&JSON.parse(JSON.stringify(u.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,o,t){"use strict";let n=e("../utils/col-cache");class i{constructor(d,u,f){this.table=d,this.column=u,this.index=f}_set(d,u){this.table.cacheState(),this.column[d]=u}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}o.exports=class{constructor(s,d){this.worksheet=s,d&&(this.table=d,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,d=(P,S,M)=>{P[S]===void 0&&(P[S]=M)};d(s,"headerRow",!0),d(s,"totalsRow",!1),d(s,"style",{}),d(s.style,"theme","TableStyleMedium2"),d(s.style,"showFirstColumn",!1),d(s.style,"showLastColumn",!1),d(s.style,"showRowStripes",!1),d(s.style,"showColumnStripes",!1);let u=(P,S)=>{if(!P)throw new Error(S)};u(s.ref,"Table must have ref"),u(s.columns,"Table must have column definitions"),u(s.rows,"Table must have row definitions"),s.tl=n.decodeAddress(s.ref);let{row:f,col:_}=s.tl;u(f>0,"Table must be on valid row"),u(_>0,"Table must be on valid col");let{width:C,filterHeight:x,tableHeight:y}=this;s.autoFilterRef=n.encode(f,_,f+x-1,_+C-1),s.tableRef=n.encode(f,_,f+y-1,_+C-1),s.columns.forEach((P,S)=>{u(P.name,`Column ${S} must have a name`),S===0?d(P,"totalsRowLabel","Total"):(d(P,"totalsRowFunction","none"),P.totalsRowFormula=this.getFormula(P))})}store(){let s=(x,y)=>{y&&Object.keys(y).forEach(P=>{x[P]=y[P]})},{worksheet:d,table:u}=this,{row:f,col:_}=u.tl,C=0;if(u.headerRow){let x=d.getRow(f+C++);u.columns.forEach((y,P)=>{let{style:S,name:M}=y,D=x.getCell(_+P);D.value=M,s(D,S)})}if(u.rows.forEach(x=>{let y=d.getRow(f+C++);x.forEach((P,S)=>{let M=y.getCell(_+S);M.value=P,s(M,u.columns[S].style)})}),u.totalsRow){let x=d.getRow(f+C++);u.columns.forEach((y,P)=>{let S=x.getCell(_+P);if(P===0)S.value=y.totalsRowLabel;else{let M=this.getFormula(y);S.value=M?{formula:y.totalsRowFormula,result:y.totalsRowResult}:null}s(S,y.style)})}}load(s){let{table:d}=this,{row:u,col:f}=d.tl,_=0;if(d.headerRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{C.getCell(f+y).value=x.name})}if(d.rows.forEach(C=>{let x=s.getRow(u+_++);C.forEach((y,P)=>{x.getCell(f+P).value=y})}),d.totalsRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{let P=C.getCell(f+y);y===0?P.value=x.totalsRowLabel:this.getFormula(x)&&(P.value={formula:x.totalsRowFormula,result:x.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,d)}getColumn(s){let d=this.table.columns[s];return new i(this,d,s)}addColumn(s,d,u){this.cacheState(),u===void 0?(this.table.columns.push(s),this.table.rows.forEach((f,_)=>{f.push(d[_])})):(this.table.columns.splice(u,0,s),this.table.rows.forEach((f,_)=>{f.splice(u,0,d[_])}))}removeColumns(s){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,d),this.table.rows.forEach(u=>{u.splice(s,d)})}_assign(s,d,u){this.cacheState(),s[d]=u}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,o,t){"use strict";let n=e("./worksheet"),i=e("./defined-names"),s=e("../xlsx/xlsx"),d=e("../csv/csv");o.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new i}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let u=1;u(S&&S.orderNo)>P?S.orderNo:P,0),x=Object.assign({},f,{id:_,name:u,orderNo:C+1,workbook:this}),y=new n(x);return this._worksheets[_]=y,y}removeWorksheetEx(u){delete this._worksheets[u.id]}removeWorksheet(u){let f=this.getWorksheet(u);f&&f.destroy()}getWorksheet(u){return u===void 0?this._worksheets.find(Boolean):typeof u=="number"?this._worksheets[u]:typeof u=="string"?this._worksheets.find(f=>f&&f.name===u):void 0}get worksheets(){return this._worksheets.slice(1).sort((u,f)=>u.orderNo-f.orderNo).filter(Boolean)}eachSheet(u){this.worksheets.forEach(f=>{u(f,f.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(u){let f=this.media.length;return this.media.push(Object.assign({},u,{type:"image"})),f}getImage(u){return this.media[u]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(u=>u.model),sheets:this.worksheets.map(u=>u.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(u){this.creator=u.creator,this.lastModifiedBy=u.lastModifiedBy,this.lastPrinted=u.lastPrinted,this.created=u.created,this.modified=u.modified,this.company=u.company,this.manager=u.manager,this.title=u.title,this.subject=u.subject,this.keywords=u.keywords,this.category=u.category,this.description=u.description,this.language=u.language,this.revision=u.revision,this.contentStatus=u.contentStatus,this.properties=u.properties,this.calcProperties=u.calcProperties,this._worksheets=[],u.worksheets.forEach(f=>{let{id:_,name:C,state:x}=f,y=u.sheets&&u.sheets.findIndex(P=>P.id===_);(this._worksheets[_]=new n({id:_,name:C,orderNo:y,state:x,workbook:this})).model=f}),this._definedNames.model=u.definedNames,this.views=u.views,this._themes=u.themes,this.media=u.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("../utils/col-cache"),s=e("./range"),d=e("./row"),u=e("./column"),f=e("./enums"),_=e("./image"),C=e("./table"),x=e("./data-validations"),y=e("../utils/encryptor"),{copyStyle:P}=e("../utils/copy-style");o.exports=class{constructor(S){S=S||{},this._workbook=S.workbook,this.id=S.id,this.orderNo=S.orderNo,this.name=S.name,this.state=S.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},S.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!S.pageSetup||!S.pageSetup.fitToWidth&&!S.pageSetup.fitToHeight||S.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},S.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},S.headerFooter),this.dataValidations=new x,this.views=S.views||[],this.autoFilter=S.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(S){if(S===void 0&&(S="sheet"+this.id),this._name!==S){if(typeof S!="string")throw new Error("The name has to be a string.");if(S==="")throw new Error("The name can't be empty.");if(S==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(S))throw new Error(`Worksheet name ${S} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(S))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+S);if(S&&S.length>31&&(console.warn(`Worksheet name ${S} exceeds 31 chars. This will be truncated`),S=S.substring(0,31)),this._workbook._worksheets.find(M=>M&&M.name.toLowerCase()===S.toLowerCase()))throw new Error("Worksheet name already exists: "+S);this._name=S}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let S=new s;return this._rows.forEach(M=>{if(M){let D=M.dimensions;D&&S.expand(M.number,D.min,M.number,D.max)}}),S}get columns(){return this._columns}set columns(S){this._headerRowCount=S.reduce((k,z)=>{let U=(z.header?1:z.headers&&z.headers.length)||0;return Math.max(k,U)},0);let M=1,D=this._columns=[];S.forEach(k=>{let z=new u(this,M++,!1);D.push(z),z.defn=k})}getColumnKey(S){return this._keys[S]}setColumnKey(S,M){this._keys[S]=M}deleteColumnKey(S){delete this._keys[S]}eachColumnKey(S){n.each(this._keys,S)}getColumn(S){if(typeof S=="string"){let M=this._keys[S];if(M)return M;S=i.l2n(S)}if(this._columns||(this._columns=[]),S>this._columns.length){let M=this._columns.length+1;for(;M<=S;)this._columns.push(new u(this,M++))}return this._columns[S-1]}spliceColumns(S,M){let D=this._rows.length;for(var k=arguments.length,z=new Array(k>2?k-2:0),U=2;U0)for(let ae=0;ae{se.push(de[ae]||null)});let _e=this.getRow(ae+1);_e.splice.apply(_e,se)}else this._rows.forEach(ae=>{ae&&ae.splice(S,M)});let J=z.length-M,re=S+M,ee=this._columns.length;if(J<0)for(let ae=S+z.length;ae<=ee;ae++)this.getColumn(ae).defn=this.getColumn(ae-J).defn;else if(J>0)for(let ae=ee;ae>=re;ae--)this.getColumn(ae+J).defn=this.getColumn(ae).defn;for(let ae=S;ae{S=Math.max(S,M.cellCount)}),S}get actualColumnCount(){let S=[],M=0;return this.eachRow(D=>{D.eachCell(k=>{let{col:z}=k;S[z]||(S[z]=!0,M++)})}),M}_commitRow(){}get _lastRowNumber(){let S=this._rows,M=S.length;for(;M>0&&S[M-1]===void 0;)M--;return M}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(S){return this._rows[S-1]}findRows(S,M){return this._rows.slice(S-1,S-1+M)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let S=0;return this.eachRow(()=>{S++}),S}getRow(S){let M=this._rows[S-1];return M||(M=this._rows[S-1]=new d(this,S)),M}getRows(S,M){if(M<1)return;let D=[];for(let k=S;k1&&arguments[1]!==void 0?arguments[1]:"n",D=this._nextRow,k=this.getRow(D);return k.values=S,this._setStyleOption(D,M[0]==="i"?M:"n"),k}addRows(S){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",D=[];return S.forEach(k=>{D.push(this.addRow(k,M))}),D}insertRow(S,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(S,0,M),this._setStyleOption(S,D),this.getRow(S)}insertRows(S,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(S,0,...M),D!=="n")for(let k=0;k1&&arguments[1]!==void 0?arguments[1]:"n";M[0]==="o"&&this.findRow(S+1)!==void 0?this._copyStyle(S+1,S,M[1]==="+"):M[0]==="i"&&this.findRow(S-1)!==void 0&&this._copyStyle(S-1,S,M[1]==="+")}_copyStyle(S,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this.getRow(S),z=this.getRow(M);z.style=P(k.style),k.eachCell({includeEmpty:D},(U,J)=>{z.getCell(J).style=P(U.style)}),z.height=k.height}duplicateRow(S,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this._rows[S-1],z=new Array(M).fill(k.values);this.spliceRows(S+1,D?0:M,...z);for(let U=0;U{J.getCell(ee).style=re.style})}}spliceRows(S,M){let D=S+M;for(var k=arguments.length,z=new Array(k>2?k-2:0),U=2;U{_e.getCell(j).style=de.style}),this._rows[ae-1]=void 0}else this._rows[ae+re-1]=void 0;else if(re>0)for(ae=ee;ae>=D;ae--)if(se=this._rows[ae-1],se){let _e=this.getRow(ae+re);_e.values=se.values,_e.style=se.style,_e.height=se.height,se.eachCell({includeEmpty:!0},(de,j)=>{if(_e.getCell(j).style=de.style,de._value.constructor.name==="MergeValue"){let W=this.getRow(de._row._number+J).getCell(j),pe=de._value._master,O=this.getRow(pe._row._number+J).getCell(pe._column._number);W.merge(O)}})}else this._rows[ae+re-1]=void 0;for(ae=0;ae{D&&D.hasValues&&M(D,D.number)})}getSheetValues(){let S=[];return this._rows.forEach(M=>{M&&(S[M.number]=M.values)}),S}findCell(S,M){let D=i.getAddress(S,M),k=this._rows[D.row-1];return k?k.findCell(D.col):void 0}getCell(S,M){let D=i.getAddress(S,M);return this.getRow(D.row).getCellEx(D)}mergeCells(){for(var S=arguments.length,M=new Array(S),D=0;D{if(k.intersects(S))throw new Error("Cannot merge already merged cells")});let D=this.getCell(S.top,S.left);for(let k=S.top;k<=S.bottom;k++)for(let z=S.left;z<=S.right;z++)(k>S.top||z>S.left)&&this.getCell(k,z).merge(D,M);this._merges[D.address]=S}_unMergeMaster(S){let M=this._merges[S.address];if(M){for(let D=M.top;D<=M.bottom;D++)for(let k=M.left;k<=M.right;k++)this.getCell(D,k).unmerge();delete this._merges[S.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var S=arguments.length,M=new Array(S),D=0;D3&&arguments[3]!==void 0?arguments[3]:"shared",z=i.decode(S),{top:U,left:J,bottom:re,right:ee}=z,ae=ee-J+1,se=i.encodeAddress(U,J),_e=k==="shared",de;de=typeof D=="function"?D:Array.isArray(D)?Array.isArray(D[0])?(W,pe)=>D[W-U][pe-J]:(W,pe)=>D[(W-U)*ae+(pe-J)]:()=>{};let j=!0;for(let W=U;W<=re;W++)for(let pe=J;pe<=ee;pe++)j?(this.getCell(W,pe).value={shareType:k,formula:M,ref:S,result:de(W,pe)},j=!1):this.getCell(W,pe).value=_e?{sharedFormula:se,result:de(W,pe)}:de(W,pe)}addImage(S,M){let D={type:"image",imageId:S,range:M};this._media.push(new _(this,D))}getImages(){return this._media.filter(S=>S.type==="image")}addBackgroundImage(S){let M={type:"background",imageId:S};this._media.push(new _(this,M))}getBackgroundImageId(){let S=this._media.find(M=>M.type==="background");return S&&S.imageId}protect(S,M){return new Promise(D=>{this.sheetProtection={sheet:!0},M&&"spinCount"in M&&(M.spinCount=Number.isFinite(M.spinCount)?Math.round(Math.max(0,M.spinCount)):1e5),S&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=y.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=M&&"spinCount"in M?M.spinCount:1e5,this.sheetProtection.hashValue=y.convertPasswordToHash(S,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),M&&(this.sheetProtection=Object.assign(this.sheetProtection,M),!S&&"spinCount"in M&&delete this.sheetProtection.spinCount),D()})}unprotect(){this.sheetProtection=null}addTable(S){let M=new C(this,S);return this.tables[S.name]=M,M}getTable(S){return this.tables[S]}removeTable(S){delete this.tables[S]}getTables(){return Object.values(this.tables)}addConditionalFormatting(S){this.conditionalFormattings.push(S)}removeConditionalFormatting(S){typeof S=="number"?this.conditionalFormattings.splice(S,1):this.conditionalFormattings=S instanceof Function?this.conditionalFormattings.filter(S):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(S){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=S}get model(){let S={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(k=>k.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(k=>k.model),conditionalFormattings:this.conditionalFormattings};S.cols=u.toModel(this.columns);let M=S.rows=[],D=S.dimensions=new s;return this._rows.forEach(k=>{let z=k&&k.model;z&&(D.expand(z.number,z.min,z.number,z.max),M.push(z))}),S.merges=[],n.each(this._merges,k=>{S.merges.push(k.range)}),S}_parseRows(S){this._rows=[],S.rows.forEach(M=>{let D=new d(this,M.number);this._rows[D.number-1]=D,D.model=M})}_parseMergeCells(S){n.each(S.mergeCells,M=>{this.mergeCellsWithoutStyle(M)})}set model(S){this.name=S.name,this._columns=u.fromModel(this,S.cols),this._parseRows(S),this._parseMergeCells(S),this.dataValidations=new x(S.dataValidations),this.properties=S.properties,this.pageSetup=S.pageSetup,this.headerFooter=S.headerFooter,this.views=S.views,this.autoFilter=S.autoFilter,this._media=S.media.map(M=>new _(this,M)),this.sheetProtection=S.sheetProtection,this.tables=S.tables.reduce((M,D)=>{let k=new C;return k.model=D,M[D.name]=k,M},{}),this.conditionalFormattings=S.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,o,t){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let n={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach(s=>{n[s]=i[s]}),o.exports=n},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,o,t){"use strict";let n=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");t.bufferToString=function(i){return typeof i=="string"?i:n?n.decode(i):i.toString()}},{}],17:[function(e,o,t){"use strict";let n=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:i}=e("buffer");t.stringToBuffer=function(s){return typeof s!="string"?s:n?i.from(n.encode(s).buffer):i.from(s)}},{buffer:220}],18:[function(e,o,t){"use strict";let n=e("./under-dash"),i=e("./col-cache");o.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(i.decodeEx(s))}getCell(s){return this.findCellEx(i.decodeEx(s),!0)}findCell(s){return this.findCellEx(i.decodeEx(s),!1)}findCellAt(s,d,u){let f=this.sheets[s],_=f&&f[d];return _&&_[u]}addCellEx(s){if(s.top)for(let d=s.top;d<=s.bottom;d++)for(let u=s.left;u<=s.right;u++)this.getCellAt(s.sheetName,d,u);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,d){let u=this.findSheet(s,d),f=this.findSheetRow(u,s,d);return this.findRowCell(f,s,d)}getCellAt(s,d,u){let f=this.sheets[s]||(this.sheets[s]=[]),_=f[d]||(f[d]=[]);return _[u]||(_[u]={sheetName:s,address:i.n2l(u)+d,row:d,col:u})}removeCellEx(s){let d=this.findSheet(s);if(!d)return;let u=this.findSheetRow(d,s);u&&delete u[s.col]}forEachInSheet(s,d){let u=this.sheets[s];u&&u.forEach((f,_)=>{f&&f.forEach((C,x)=>{C&&d(C,_,x)})})}forEach(s){n.each(this.sheets,(d,u)=>{this.forEachInSheet(u,s)})}map(s){let d=[];return this.forEach(u=>{d.push(s(u))}),d}findSheet(s,d){let u=s.sheetName;return this.sheets[u]?this.sheets[u]:d?this.sheets[u]=[]:void 0}findSheetRow(s,d,u){let{row:f}=d;return s&&s[f]?s[f]:u?s[f]=[]:void 0}findRowCell(s,d,u){let{col:f}=d;return s&&s[f]?s[f]:u?s[f]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(s,d,u,f){let _=this.sheets[s];if(_){let C=[];for(let x=0;x{x.splice(d,u,...C)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,o,t){"use strict";let n=/^[A-Z]+\d+$/,i={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let d,u,f,_,C,x=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;x<=26;)d=this._dictionary[x-1],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(x=27;x<=702;)u=x-27,f=u%26,_=Math.floor(u/26),d=this._dictionary[_]+this._dictionary[f],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(x=703;x<=16384;)u=x-703,f=u%26,_=Math.floor(u/26)%26,C=Math.floor(u/676),d=this._dictionary[C]+this._dictionary[_]+this._dictionary[f],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!n.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let d=s.length<5&&this._hash[s];if(d)return d;let u=!1,f="",_=0,C=!1,x="",y=0;for(let S,M=0;M=65&&S<=90)u=!0,f+=s[M],_=26*_+S-64;else if(S>=48&&S<=57)C=!0,x+=s[M],y=10*y+S-48;else if(C&&u&&S!==36)break;if(u){if(_>16384)throw new Error("Out of bounds. Invalid column letter: "+f)}else _=void 0;C||(y=void 0);let P={address:s=f+x,col:_,row:y,$col$row:`$${f}$${x}`};return _<=100&&y<=100&&(this._hash[s]=P,this._hash[P.$col$row]=P),P},getAddress(s,d){if(d){let u=this.n2l(d)+s;return this.decodeAddress(u)}return this.decodeAddress(s)},decode(s){let d=s.split(":");if(d.length===2){let u=this.decodeAddress(d[0]),f=this.decodeAddress(d[1]),_={top:Math.min(u.row,f.row),left:Math.min(u.col,f.col),bottom:Math.max(u.row,f.row),right:Math.max(u.col,f.col)};return _.tl=this.n2l(_.left)+_.top,_.br=this.n2l(_.right)+_.bottom,_.dimensions=`${_.tl}:${_.br}`,_}return this.decodeAddress(s)},decodeEx(s){let d=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),u=d[1]||d[2],f=d[3],_=f.split(":");if(_.length>1){let x=this.decodeAddress(_[0]),y=this.decodeAddress(_[1]),P=Math.min(x.row,y.row),S=Math.min(x.col,y.col),M=Math.max(x.row,y.row),D=Math.max(x.col,y.col);return x=this.n2l(S)+P,y=this.n2l(D)+M,{top:P,left:S,bottom:M,right:D,sheetName:u,tl:{address:x,col:S,row:P,$col$row:`$${this.n2l(S)}$${P}`,sheetName:u},br:{address:y,col:D,row:M,$col$row:`$${this.n2l(D)}$${M}`,sheetName:u},dimensions:`${x}:${y}`}}if(f.startsWith("#"))return u?{sheetName:u,error:f}:{error:f};let C=this.decodeAddress(f);return u?at({sheetName:u},C):C},encodeAddress:(s,d)=>i.n2l(d)+s,encode(){switch(arguments.length){case 2:return i.encodeAddress(arguments[0],arguments[1]);case 4:return`${i.encodeAddress(arguments[0],arguments[1])}:${i.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,d){let[u,f,,_,C]=s,[x,y]=d;return x>=u&&x<=_&&y>=f&&y<=C}};o.exports=i},{}],20:[function(e,o,t){"use strict";let n=(s,d)=>at(at({},s),d.reduce((u,f)=>(s[f]&&(u[f]=at({},s[f])),u),{})),i=function(s,d,u){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[u]&&(d[u]=n(s[u],f))};t.copyStyle=s=>{if(!s)return s;if(d=s,Object.keys(d).length===0)return{};var d;let u=at({},s);return i(s,u,"font",["color"]),i(s,u,"alignment"),i(s,u,"protection"),s.border&&(i(s,u,"border"),i(s.border,u.border,"top",["color"]),i(s.border,u.border,"left",["color"]),i(s.border,u.border,"bottom",["color"]),i(s.border,u.border,"right",["color"]),i(s.border,u.border,"diagonal",["color"])),s.fill&&(i(s,u,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(u.fill.stops=s.fill.stops.map(f=>n(f,["color"])))),u}},{}],21:[function(e,o,t){(function(n){(function(){"use strict";let i=e("crypto"),s={hash(d){let u=i.createHash(d);for(var f=arguments.length,_=new Array(f>1?f-1:0),C=1;Ci.randomBytes(d)};o.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,o,t){"use strict";let{SaxesParser:n}=e("saxes"),{PassThrough:i}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");o.exports=function(d){return J7(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new i));let u=new n,f;u.on("error",S=>{f=S});let _=[];u.on("opentag",S=>_.push({eventType:"opentag",value:S})),u.on("text",S=>_.push({eventType:"text",value:S})),u.on("closetag",S=>_.push({eventType:"closetag",value:S}));try{for(var C=ug(d),x,y,P;x=!(y=yield new IT(C.next())).done;x=!1){let S=y.value;if(u.write(s(S)),f)throw f;yield _,_=[]}}catch{P=[y]}finally{try{x&&(y=C.return)&&(yield new IT(y.call(C)))}finally{if(P)throw P[0]}}})}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,o,t){"use strict";let n=e("./col-cache"),i=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;o.exports={slideFormula:function(d,u,f){let _=n.decode(u),C=n.decode(f);return d.replace(i,(x,y,P,S,M)=>{if(M)return x;let D=s.exec(S);if(D){let k=D[1],z=D[2].toUpperCase(),U=D[3],J=D[4];if(z.length>3||z.length===3&&z>"XFD")return x;let re=n.l2n(z),ee=parseInt(J,10);return k||(re+=C.col-_.col),U||(ee+=C.row-_.row),(y||"")+(k||"")+n.n2l(re)+(U||"")+ee}return x})}}},{"./col-cache":19}],24:[function(e,o,t){(function(n,i){(function(){"use strict";let s=e("readable-stream"),d=e("./utils"),u=e("./string-buf");class f{constructor(M,D){this._data=M,this._encoding=D}get length(){return this.toBuffer().length}copy(M,D,k,z){return this.toBuffer().copy(M,D,k,z)}toBuffer(){return this._buffer||(this._buffer=i.from(this._data,this._encoding)),this._buffer}}class _{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,k,z){return this._data._buf.copy(M,D,k,z)}toBuffer(){return this._data.toBuffer()}}class C{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,k,z){this._data.copy(M,D,k,z)}toBuffer(){return this._data}}class x{constructor(M){this.size=M,this.buffer=i.alloc(M),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let M=i.alloc(this.iWrite-this.iRead);return this.buffer.copy(M,0,this.iRead,this.iWrite),M}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(M){let D;return M===0?null:M===void 0||M>=this.length?(D=this.toBuffer(),this.iRead=this.iWrite,D):(D=i.alloc(M),this.buffer.copy(D,0,this.iRead,M),this.iRead+=M,D)}write(M,D,k){let z=Math.min(k,this.size-this.iWrite);return M.copy(this.buffer,this.iWrite,D,D+z),this.iWrite+=z,z}}let y=function(S){S=S||{},this.bufSize=S.bufSize||1048576,this.buffers=[],this.batch=S.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(y,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return i.concat(this.buffers.map(S=>S.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let M=this.buffers[this.buffers.length-1];if(!M.full)return M}let S=new x(this.bufSize);return this.buffers.push(S),S},_pipe(S){return qn(this,null,function*(){yield Promise.all(this.pipes.map(function(M){return new Promise(D=>{M.write(S.toBuffer(),()=>{D()})})}))})},_writeToBuffers(S){let M=0,D=S.length;for(;M1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(k),n.nextTick(D)):(yield this._pipe(k),D());else this.paused||this.emit("data",k.toBuffer()),this._writeToBuffers(k),this.emit("readable");return!0})},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(S,M,D){let k=z=>{z?D(z):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};S?this.write(S,M,k):k()},read(S){let M;if(S){for(M=[];S&&this.buffers.length&&!this.buffers[0].eod;){let D=this.buffers[0],k=D.read(S);S-=k.length,M.push(k),D.eod&&D.full&&this.buffers.shift()}return i.concat(M)}return M=this.buffers.map(D=>D.toBuffer()).filter(Boolean),this.buffers=[],i.concat(M)},setEncoding(S){this.encoding=S},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(S){this.pipes.push(S),!this.paused&&this.buffers.length&&this.end()},unpipe(S){this.pipes=this.pipes.filter(M=>M!==S)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),o.exports=y}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,o,t){(function(n){(function(){"use strict";o.exports=class{constructor(i){this._buf=n.alloc(i&&i.size||16384),this._encoding=i&&i.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=n.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(i){i=i||0,this._buffer=void 0,this._inPos=i}_grow(i){let s=2*this._buf.length;for(;s=this._buf.length-4;)this._grow(this._inPos+i.length),s=this._inPos+this._buf.write(i,this._inPos,this._encoding);this._inPos=s}addStringBuf(i){i.length&&(this._buffer=void 0,this.length+i.length>this.capacity&&this._grow(this.length+i.length),i._buf.copy(this._buf,this._inPos,0,i.length),this._inPos+=i.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,o,t){"use strict";let{toString:n}=Object.prototype,i=/["&<>]/,s={each:function(d,u){d&&(Array.isArray(d)?d.forEach(u):Object.keys(d).forEach(f=>{u(d[f],f)}))},some:function(d,u){return!!d&&(Array.isArray(d)?d.some(u):Object.keys(d).some(f=>u(d[f],f)))},every:function(d,u){return!d||(Array.isArray(d)?d.every(u):Object.keys(d).every(f=>u(d[f],f)))},map:function(d,u){return d?Array.isArray(d)?d.map(u):Object.keys(d).map(f=>u(d[f],f)):[]},keyBy:(d,u)=>d.reduce((f,_)=>(f[_[u]]=_,f),{}),isEqual:function(d,u){let f=typeof d,_=typeof u,C=Array.isArray(d),x=Array.isArray(u),y;if(f!==_)return!1;switch(typeof d){case"object":if(C||x)return!(!C||!x)&&d.length===u.length&&d.every((P,S)=>{let M=u[S];return s.isEqual(P,M)});if(d===null||u===null)return d===u;if(y=Object.keys(d),Object.keys(u).length!==y.length)return!1;for(let P of y)if(!u.hasOwnProperty(P))return!1;return s.every(d,(P,S)=>{let M=u[S];return s.isEqual(P,M)});default:return d===u}},escapeHtml(d){let u=i.exec(d);if(!u)return d;let f="",_="",C=0,x=u.index;for(;x":_=">";break;default:continue}C!==x&&(f+=d.substring(C,x)),C=x+1,f+=_}return C!==x?f+d.substring(C,x):f},strcmp:(d,u)=>du?1:0,isUndefined:d=>n.call(d)==="[object Undefined]",isObject:d=>n.call(d)==="[object Object]",deepMerge(){let d=arguments[0]||{},{length:u}=arguments,f,_,C;function x(y,P){f=d[P],C=Array.isArray(y),s.isObject(y)||C?(C?(C=!1,_=f&&Array.isArray(f)?f:[]):_=f&&s.isObject(f)?f:{},d[P]=s.deepMerge(_,y)):s.isUndefined(y)||(d[P]=y)}for(let y=0;y&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,u={nop(){},promiseImmediate:f=>new Promise(_=>{n.setImmediate?i(()=>{_(f)}):setTimeout(()=>{_(f)},1)}),inherits:function(f,_,C,x){f.super_=_,x||(x=C,C=null),C&&Object.keys(C).forEach(P=>{Object.defineProperty(f,P,Object.getOwnPropertyDescriptor(C,P))});let y={constructor:{value:f,enumerable:!1,writable:!1,configurable:!0}};x&&Object.keys(x).forEach(P=>{y[P]=Object.getOwnPropertyDescriptor(x,P)}),f.prototype=Object.create(_.prototype,y)},dateToExcel:(f,_)=>25569+f.getTime()/864e5-(_?1462:0),excelToDate(f,_){let C=Math.round(24*(f-25569+(_?1462:0))*3600*1e3);return new Date(C)},parsePath(f){let _=f.lastIndexOf("/");return{path:f.substring(0,_),name:f.substring(_+1)}},getRelsPath(f){let _=u.parsePath(f);return`${_.path}/_rels/${_.name}.rels`},xmlEncode(f){let _=d.exec(f);if(!_)return f;let C="",x="",y=0,P=_.index;for(;P=11&&S!==13)){x="";break}continue}y!==P&&(C+=f.substring(y,P)),y=P+1,x&&(C+=x)}return y!==P?C+f.substring(y,P):C},xmlDecode:f=>f.replace(/&([a-z]*);/g,_=>{switch(_){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return _}}),validInt(f){let _=parseInt(f,10);return Number.isNaN(_)?0:_},isDateFmt(f){return f?(f=(f=f.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:f=>new Promise(_=>{s.access(f,s.constants.F_OK,C=>{_(!C)})})},toIsoDateString:f=>f.toIsoString().subsstr(0,10),parseBoolean:f=>f===!0||f==="true"||f===1||f==="1"};o.exports=u}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,o,t){"use strict";let n=e("./under-dash"),i=e("./utils");function s(f,_,C){f.push(` ${_}="${i.xmlEncode(C.toString())}"`)}function d(f,_){if(_){let C=[];n.each(_,(x,y)=>{x!==void 0&&s(C,y,x)}),f.push(C.join(""))}}class u{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(_){let C=this._xml;C.push(" +}`;var so=U7(function(){return zo(ct,Cn+"return "+Bi).apply(e,At)});if(so.source=Bi,CT(so))throw so;return so}function fae(A){return $o(A).toLowerCase()}function hae(A){return $o(A).toUpperCase()}function gae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return tA(A);if(!A||!(H=Al(H)))return A;var De=ws(A),He=ws(H),ct=iA(De,He),At=nA(De,He)+1;return gp(De,ct,At).join("")}function _ae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return A.slice(0,aA(A)+1);if(!A||!(H=Al(H)))return A;var De=ws(A),He=nA(De,ws(H))+1;return gp(De,0,He).join("")}function Cae(A,H,ie){if(A=$o(A),A&&(ie||H===e))return A.replace(Rt,"");if(!A||!(H=Al(H)))return A;var De=ws(A),He=iA(De,ws(H));return gp(De,He).join("")}function vae(A,H){var ie=se,De=_e;if(Aa(H)){var He="separator"in H?H.separator:He;ie="length"in H?ao(H.length):ie,De="omission"in H?Al(H.omission):De}A=$o(A);var ct=A.length;if(t0(A)){var At=ws(A);ct=At.length}if(ie>=ct)return A;var jt=ie-i0(De);if(jt<1)return De;var Xt=At?gp(At,0,jt).join(""):A.slice(0,jt);if(He===e)return Xt+De;if(At&&(jt+=Xt.length-jt),vT(He)){if(A.slice(jt).search(He)){var Di,Ii=Xt;for(He.global||(He=BP(He.source,$o(nn.exec(He))+"g")),He.lastIndex=0;Di=He.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?jt:Bi)}}else if(A.indexOf(Al(He),jt)!=jt){var Zi=Xt.lastIndexOf(He);Zi>-1&&(Xt=Xt.slice(0,Zi))}return Xt+De}function xae(A){return A=$o(A),A&&zn.test(A)?A.replace(wn,YZ):A}var bae=s0(function(A,H,ie){return A+(ie?" ":"")+H.toUpperCase()}),yT=WA("toUpperCase");function $7(A,H,ie){return A=$o(A),H=ie?e:H,H===e?jZ(A)?XZ(A):BZ(A):A.match(H)||[]}var U7=uo(function(A,H){try{return Il(A,e,H)}catch(ie){return CT(ie)?ie:new Zn(ie)}}),yae=Dc(function(A,H){return Wl(H,function(ie){ie=Ys(ie),Tc(A,ie,gT(A[ie],A))}),A});function Sae(A){var H=A==null?0:A.length,ie=Fn();return A=H?Ma(A,function(De){if(typeof De[1]!="function")throw new Ql(i);return[ie(De[0]),De[1]]}):[],uo(function(De){for(var He=-1;++HeL)return[];var ie=$,De=$r(A,$);H=Fn(H),A-=$;for(var He=AP(De,H);++ie0||H<0)?new So(ie):(A<0?ie=ie.takeRight(-A):A&&(ie=ie.drop(A)),H!==e&&(H=ao(H),ie=H<0?ie.dropRight(-H):ie.take(H-A)),ie)},So.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},So.prototype.toArray=function(){return this.take($)},Ws(So.prototype,function(A,H){var ie=/^(?:filter|find|map|reject)|While$/.test(H),De=/^(?:head|last)$/.test(H),He=ot[De?"take"+(H=="last"?"Right":""):H],ct=De||/^find/.test(H);He&&(ot.prototype[H]=function(){var At=this.__wrapped__,jt=De?[1]:arguments,Xt=At instanceof So,Di=jt[0],Ii=Xt||no(At),Bi=function(xo){var Do=He.apply(ot,cp([xo],jt));return De&&Zi?Do[0]:Do};Ii&&ie&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var Zi=this.__chain__,Cn=!!this.__actions__.length,Bn=ct&&!Zi,so=Xt&&!Cn;if(!ct&&Ii){At=so?At:new So(this);var Rn=A.apply(At,jt);return Rn.__actions__.push({func:ag,args:[Bi],thisArg:e}),new Yl(Rn,Zi)}return Bn&&so?A.apply(this,jt):(Rn=this.thru(Bi),Bn?De?Rn.value()[0]:Rn.value():Rn)})}),Wl(["pop","push","shift","sort","splice","unshift"],function(A){var H=Oh[A],ie=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",De=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var He=arguments;if(De&&!this.__chain__){var ct=this.value();return H.apply(no(ct)?ct:[],He)}return this[ie](function(At){return H.apply(no(At)?At:[],He)})}}),Ws(So.prototype,function(A,H){var ie=ot[H];if(ie){var De=ie.name+"";Xo.call(a0,De)||(a0[De]=[]),a0[De].push({name:H,func:ie})}}),a0[Xh(e,M).name]=[{name:"wrapper",func:e}],So.prototype.clone=xee,So.prototype.reverse=bee,So.prototype.value=yee,ot.prototype.at=Kie,ot.prototype.chain=Xie,ot.prototype.commit=Zie,ot.prototype.next=ene,ot.prototype.plant=ine,ot.prototype.reverse=nne,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=one,ot.prototype.first=ot.prototype.head,Gu&&(ot.prototype[Gu]=tne),ot},mp=ZZ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(vr._=mp,define(function(){return mp})):Zm?((Zm.exports=mp)._=mp,wP._=mp):vr._=mp}).call(B0)});var D9=pt(FC=>{"use strict";FC.byteLength=whe;FC.toByteArray=The;FC.fromByteArray=Ehe;var hc=[],ds=[],She=typeof Uint8Array<"u"?Uint8Array:Array,FM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Dd=0,T9=FM.length;Dd0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=o);var n=t===o?0:4-t%4;return[t,n]}function whe(e){var o=M9(e),t=o[0],n=o[1];return(t+n)*3/4-n}function Phe(e,o,t){return(o+t)*3/4-t}function The(e){var o,t=M9(e),n=t[0],i=t[1],s=new She(Phe(e,n,i)),d=0,u=i>0?n-4:n,f;for(f=0;f>16&255,s[d++]=o>>8&255,s[d++]=o&255;return i===2&&(o=ds[e.charCodeAt(f)]<<2|ds[e.charCodeAt(f+1)]>>4,s[d++]=o&255),i===1&&(o=ds[e.charCodeAt(f)]<<10|ds[e.charCodeAt(f+1)]<<4|ds[e.charCodeAt(f+2)]>>2,s[d++]=o>>8&255,s[d++]=o&255),s}function Mhe(e){return hc[e>>18&63]+hc[e>>12&63]+hc[e>>6&63]+hc[e&63]}function Dhe(e,o,t){for(var n,i=[],s=o;su?u:d+s));return n===1?(o=e[t-1],i.push(hc[o>>2]+hc[o<<4&63]+"==")):n===2&&(o=(e[t-2]<<8)+e[t-1],i.push(hc[o>>10]+hc[o>>4&63]+hc[o<<2&63]+"=")),i.join("")}});var E9=pt(kM=>{kM.read=function(e,o,t,n,i){var s,d,u=i*8-n-1,f=(1<>1,C=-7,x=t?i-1:0,y=t?-1:1,P=e[o+x];for(x+=y,s=P&(1<<-C)-1,P>>=-C,C+=u;C>0;s=s*256+e[o+x],x+=y,C-=8);for(d=s&(1<<-C)-1,s>>=-C,C+=n;C>0;d=d*256+e[o+x],x+=y,C-=8);if(s===0)s=1-_;else{if(s===f)return d?NaN:(P?-1:1)*(1/0);d=d+Math.pow(2,n),s=s-_}return(P?-1:1)*d*Math.pow(2,s-n)};kM.write=function(e,o,t,n,i,s){var d,u,f,_=s*8-i-1,C=(1<<_)-1,x=C>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=n?0:s-1,S=n?1:-1,M=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(u=isNaN(o)?1:0,d=C):(d=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+x>=1?o+=y/f:o+=y*Math.pow(2,1-x),o*f>=2&&(d++,f/=2),d+x>=C?(u=0,d=C):d+x>=1?(u=(o*f-1)*Math.pow(2,i),d=d+x):(u=o*Math.pow(2,x-1)*Math.pow(2,i),d=0));i>=8;e[t+P]=u&255,P+=S,u/=256,i-=8);for(d=d<0;e[t+P]=d&255,P+=S,d/=256,_-=8);e[t+P-S]|=M*128}});var H9=pt(X0=>{"use strict";var BM=D9(),K0=E9(),I9=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;X0.Buffer=Ti;X0.SlowBuffer=Bhe;X0.INSPECT_MAX_BYTES=50;var kC=2147483647;X0.kMaxLength=kC;Ti.TYPED_ARRAY_SUPPORT=Ihe();!Ti.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ihe(){try{var e=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(e,o),e.foo()===42}catch{return!1}}Object.defineProperty(Ti.prototype,"parent",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.buffer}});Object.defineProperty(Ti.prototype,"offset",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.byteOffset}});function Wc(e){if(e>kC)throw new RangeError('The value "'+e+'" is invalid for option "size"');var o=new Uint8Array(e);return Object.setPrototypeOf(o,Ti.prototype),o}function Ti(e,o,t){if(typeof e=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return VM(e)}return F9(e,o,t)}Ti.poolSize=8192;function F9(e,o,t){if(typeof e=="string")return Ahe(e,o);if(ArrayBuffer.isView(e))return Fhe(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(gc(e,ArrayBuffer)||e&&gc(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(gc(e,SharedArrayBuffer)||e&&gc(e.buffer,SharedArrayBuffer)))return NM(e,o,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Ti.from(n,o,t);var i=khe(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ti.from(e[Symbol.toPrimitive]("string"),o,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ti.from=function(e,o,t){return F9(e,o,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function k9(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Ohe(e,o,t){return k9(e),e<=0?Wc(e):o!==void 0?typeof t=="string"?Wc(e).fill(o,t):Wc(e).fill(o):Wc(e)}Ti.alloc=function(e,o,t){return Ohe(e,o,t)};function VM(e){return k9(e),Wc(e<0?0:qM(e)|0)}Ti.allocUnsafe=function(e){return VM(e)};Ti.allocUnsafeSlow=function(e){return VM(e)};function Ahe(e,o){if((typeof o!="string"||o==="")&&(o="utf8"),!Ti.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var t=B9(e,o)|0,n=Wc(t),i=n.write(e,o);return i!==t&&(n=n.slice(0,i)),n}function RM(e){for(var o=e.length<0?0:qM(e.length)|0,t=Wc(o),n=0;n=kC)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kC.toString(16)+" bytes");return e|0}function Bhe(e){return+e!=e&&(e=0),Ti.alloc(+e)}Ti.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==Ti.prototype};Ti.compare=function(o,t){if(gc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),gc(t,Uint8Array)&&(t=Ti.from(t,t.offset,t.byteLength)),!Ti.isBuffer(o)||!Ti.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===t)return 0;for(var n=o.length,i=t.length,s=0,d=Math.min(n,i);si.length?Ti.from(d).copy(i,s):Uint8Array.prototype.set.call(i,d,s);else if(Ti.isBuffer(d))d.copy(i,s);else throw new TypeError('"list" argument must be an Array of Buffers');s+=d.length}return i};function B9(e,o){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||gc(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(o){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return LM(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return z9(e).length;default:if(i)return n?-1:LM(e).length;o=(""+o).toLowerCase(),i=!0}}Ti.byteLength=B9;function Rhe(e,o,t){var n=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,o>>>=0,t<=o))return"";for(e||(e="utf8");;)switch(e){case"hex":return Uhe(this,o,t);case"utf8":case"utf-8":return N9(this,o,t);case"ascii":return jhe(this,o,t);case"latin1":case"binary":return $he(this,o,t);case"base64":return Hhe(this,o,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Whe(this,o,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ti.prototype._isBuffer=!0;function Ed(e,o,t){var n=e[o];e[o]=e[t],e[t]=n}Ti.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(o+=" ... "),""};I9&&(Ti.prototype[I9]=Ti.prototype.inspect);Ti.prototype.compare=function(o,t,n,i,s){if(gc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),!Ti.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(t===void 0&&(t=0),n===void 0&&(n=o?o.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),t<0||n>o.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=n)return 0;if(i>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,s>>>=0,this===o)return 0;for(var d=s-i,u=n-t,f=Math.min(d,u),_=this.slice(i,s),C=o.slice(t,n),x=0;x2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,zM(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof o=="string"&&(o=Ti.from(o,n)),Ti.isBuffer(o))return o.length===0?-1:O9(e,o,t,n,i);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,o,t):Uint8Array.prototype.lastIndexOf.call(e,o,t):O9(e,[o],t,n,i);throw new TypeError("val must be string, number or Buffer")}function O9(e,o,t,n,i){var s=1,d=e.length,u=o.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||o.length<2)return-1;s=2,d/=2,u/=2,t/=2}function f(P,S){return s===1?P[S]:P.readUInt16BE(S*s)}var _;if(i){var C=-1;for(_=t;_d&&(t=d-u),_=t;_>=0;_--){for(var x=!0,y=0;yi&&(n=i)):n=i;var s=o.length;n>s/2&&(n=s/2);for(var d=0;d>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-t;if((n===void 0||n>s)&&(n=s),o.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var d=!1;;)switch(i){case"hex":return Nhe(this,o,t,n);case"utf8":case"utf-8":return Lhe(this,o,t,n);case"ascii":case"latin1":case"binary":return Vhe(this,o,t,n);case"base64":return qhe(this,o,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zhe(this,o,t,n);default:if(d)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),d=!0}};Ti.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Hhe(e,o,t){return o===0&&t===e.length?BM.fromByteArray(e):BM.fromByteArray(e.slice(o,t))}function N9(e,o,t){t=Math.min(e.length,t);for(var n=[],i=o;i239?4:s>223?3:s>191?2:1;if(i+u<=t){var f,_,C,x;switch(u){case 1:s<128&&(d=s);break;case 2:f=e[i+1],(f&192)===128&&(x=(s&31)<<6|f&63,x>127&&(d=x));break;case 3:f=e[i+1],_=e[i+2],(f&192)===128&&(_&192)===128&&(x=(s&15)<<12|(f&63)<<6|_&63,x>2047&&(x<55296||x>57343)&&(d=x));break;case 4:f=e[i+1],_=e[i+2],C=e[i+3],(f&192)===128&&(_&192)===128&&(C&192)===128&&(x=(s&15)<<18|(f&63)<<12|(_&63)<<6|C&63,x>65535&&x<1114112&&(d=x))}}d===null?(d=65533,u=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),i+=u}return Ghe(n)}var A9=4096;function Ghe(e){var o=e.length;if(o<=A9)return String.fromCharCode.apply(String,e);for(var t="",n=0;nn)&&(t=n);for(var i="",s=o;sn&&(o=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tt)throw new RangeError("Trying to access beyond buffer length")}Ti.prototype.readUintLE=Ti.prototype.readUIntLE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o],s=1,d=0;++d>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o+--t],s=1;t>0&&(s*=256);)i+=this[o+--t]*s;return i};Ti.prototype.readUint8=Ti.prototype.readUInt8=function(o,t){return o=o>>>0,t||Ar(o,1,this.length),this[o]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(o,t){return o=o>>>0,t||Ar(o,2,this.length),this[o]|this[o+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(o,t){return o=o>>>0,t||Ar(o,2,this.length),this[o]<<8|this[o+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216};Ti.prototype.readUint32BE=Ti.prototype.readUInt32BE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])};Ti.prototype.readIntLE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=this[o],s=1,d=0;++d=s&&(i-=Math.pow(2,8*t)),i};Ti.prototype.readIntBE=function(o,t,n){o=o>>>0,t=t>>>0,n||Ar(o,t,this.length);for(var i=t,s=1,d=this[o+--i];i>0&&(s*=256);)d+=this[o+--i]*s;return s*=128,d>=s&&(d-=Math.pow(2,8*t)),d};Ti.prototype.readInt8=function(o,t){return o=o>>>0,t||Ar(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]};Ti.prototype.readInt16LE=function(o,t){o=o>>>0,t||Ar(o,2,this.length);var n=this[o]|this[o+1]<<8;return n&32768?n|4294901760:n};Ti.prototype.readInt16BE=function(o,t){o=o>>>0,t||Ar(o,2,this.length);var n=this[o+1]|this[o]<<8;return n&32768?n|4294901760:n};Ti.prototype.readInt32LE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24};Ti.prototype.readInt32BE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]};Ti.prototype.readFloatLE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),K0.read(this,o,!0,23,4)};Ti.prototype.readFloatBE=function(o,t){return o=o>>>0,t||Ar(o,4,this.length),K0.read(this,o,!1,23,4)};Ti.prototype.readDoubleLE=function(o,t){return o=o>>>0,t||Ar(o,8,this.length),K0.read(this,o,!0,52,8)};Ti.prototype.readDoubleBE=function(o,t){return o=o>>>0,t||Ar(o,8,this.length),K0.read(this,o,!1,52,8)};function Tl(e,o,t,n,i,s){if(!Ti.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>i||oe.length)throw new RangeError("Index out of range")}Ti.prototype.writeUintLE=Ti.prototype.writeUIntLE=function(o,t,n,i){if(o=+o,t=t>>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;Tl(this,o,t,n,s,0)}var d=1,u=0;for(this[t]=o&255;++u>>0,n=n>>>0,!i){var s=Math.pow(2,8*n)-1;Tl(this,o,t,n,s,0)}var d=n-1,u=1;for(this[t+d]=o&255;--d>=0&&(u*=256);)this[t+d]=o/u&255;return t+n};Ti.prototype.writeUint8=Ti.prototype.writeUInt8=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,1,255,0),this[t]=o&255,t+1};Ti.prototype.writeUint16LE=Ti.prototype.writeUInt16LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,65535,0),this[t]=o&255,this[t+1]=o>>>8,t+2};Ti.prototype.writeUint16BE=Ti.prototype.writeUInt16BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,65535,0),this[t]=o>>>8,this[t+1]=o&255,t+2};Ti.prototype.writeUint32LE=Ti.prototype.writeUInt32LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,4294967295,0),this[t+3]=o>>>24,this[t+2]=o>>>16,this[t+1]=o>>>8,this[t]=o&255,t+4};Ti.prototype.writeUint32BE=Ti.prototype.writeUInt32BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,4294967295,0),this[t]=o>>>24,this[t+1]=o>>>16,this[t+2]=o>>>8,this[t+3]=o&255,t+4};Ti.prototype.writeIntLE=function(o,t,n,i){if(o=+o,t=t>>>0,!i){var s=Math.pow(2,8*n-1);Tl(this,o,t,n,s-1,-s)}var d=0,u=1,f=0;for(this[t]=o&255;++d>0)-f&255;return t+n};Ti.prototype.writeIntBE=function(o,t,n,i){if(o=+o,t=t>>>0,!i){var s=Math.pow(2,8*n-1);Tl(this,o,t,n,s-1,-s)}var d=n-1,u=1,f=0;for(this[t+d]=o&255;--d>=0&&(u*=256);)o<0&&f===0&&this[t+d+1]!==0&&(f=1),this[t+d]=(o/u>>0)-f&255;return t+n};Ti.prototype.writeInt8=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,1,127,-128),o<0&&(o=255+o+1),this[t]=o&255,t+1};Ti.prototype.writeInt16LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,32767,-32768),this[t]=o&255,this[t+1]=o>>>8,t+2};Ti.prototype.writeInt16BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,2,32767,-32768),this[t]=o>>>8,this[t+1]=o&255,t+2};Ti.prototype.writeInt32LE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,2147483647,-2147483648),this[t]=o&255,this[t+1]=o>>>8,this[t+2]=o>>>16,this[t+3]=o>>>24,t+4};Ti.prototype.writeInt32BE=function(o,t,n){return o=+o,t=t>>>0,n||Tl(this,o,t,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[t]=o>>>24,this[t+1]=o>>>16,this[t+2]=o>>>8,this[t+3]=o&255,t+4};function L9(e,o,t,n,i,s){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function V9(e,o,t,n,i){return o=+o,t=t>>>0,i||L9(e,o,t,4,34028234663852886e22,-34028234663852886e22),K0.write(e,o,t,n,23,4),t+4}Ti.prototype.writeFloatLE=function(o,t,n){return V9(this,o,t,!0,n)};Ti.prototype.writeFloatBE=function(o,t,n){return V9(this,o,t,!1,n)};function q9(e,o,t,n,i){return o=+o,t=t>>>0,i||L9(e,o,t,8,17976931348623157e292,-17976931348623157e292),K0.write(e,o,t,n,52,8),t+8}Ti.prototype.writeDoubleLE=function(o,t,n){return q9(this,o,t,!0,n)};Ti.prototype.writeDoubleBE=function(o,t,n){return q9(this,o,t,!1,n)};Ti.prototype.copy=function(o,t,n,i){if(!Ti.isBuffer(o))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=o.length&&(t=o.length),t||(t=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),o.length-t>>0,n=n===void 0?this.length:n>>>0,o||(o=0);var d;if(typeof o=="number")for(d=t;d55295&&t<57344){if(!i){if(t>56319){(o-=3)>-1&&s.push(239,191,189);continue}else if(d+1===n){(o-=3)>-1&&s.push(239,191,189);continue}i=t;continue}if(t<56320){(o-=3)>-1&&s.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(o-=3)>-1&&s.push(239,191,189);if(i=null,t<128){if((o-=1)<0)break;s.push(t)}else if(t<2048){if((o-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((o-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((o-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function Jhe(e){for(var o=[],t=0;t>8,i=t%256,s.push(i),s.push(n);return s}function z9(e){return BM.toByteArray(Yhe(e))}function BC(e,o,t,n){for(var i=0;i=o.length||i>=e.length);++i)o[i+t]=e[i];return i}function gc(e,o){return e instanceof o||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===o.name}function zM(e){return e!==e}var Xhe=(function(){for(var e="0123456789abcdef",o=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)o[n+i]=e[t]+e[i];return o})()});var EV=pt((Fbn,DV)=>{function yKe(){this.__data__=[],this.size=0}DV.exports=yKe});var Vd=pt((kbn,IV)=>{function SKe(e,o){return e===o||e!==e&&o!==o}IV.exports=SKe});var T1=pt((Bbn,OV)=>{var wKe=Vd();function PKe(e,o){for(var t=e.length;t--;)if(wKe(e[t][0],o))return t;return-1}OV.exports=PKe});var FV=pt((Rbn,AV)=>{var TKe=T1(),MKe=Array.prototype,DKe=MKe.splice;function EKe(e){var o=this.__data__,t=TKe(o,e);if(t<0)return!1;var n=o.length-1;return t==n?o.pop():DKe.call(o,t,1),--this.size,!0}AV.exports=EKe});var BV=pt((Nbn,kV)=>{var IKe=T1();function OKe(e){var o=this.__data__,t=IKe(o,e);return t<0?void 0:o[t][1]}kV.exports=OKe});var NV=pt((Lbn,RV)=>{var AKe=T1();function FKe(e){return AKe(this.__data__,e)>-1}RV.exports=FKe});var VV=pt((Vbn,LV)=>{var kKe=T1();function BKe(e,o){var t=this.__data__,n=kKe(t,e);return n<0?(++this.size,t.push([e,o])):t[n][1]=o,this}LV.exports=BKe});var M1=pt((qbn,qV)=>{var RKe=EV(),NKe=FV(),LKe=BV(),VKe=NV(),qKe=VV();function cu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var zKe=M1();function HKe(){this.__data__=new zKe,this.size=0}zV.exports=HKe});var jV=pt((Hbn,GV)=>{function GKe(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}GV.exports=GKe});var UV=pt((Gbn,$V)=>{function jKe(e){return this.__data__.get(e)}$V.exports=jKe});var QV=pt((jbn,WV)=>{function $Ke(e){return this.__data__.has(e)}WV.exports=$Ke});var ED=pt(($bn,YV)=>{var UKe=typeof global=="object"&&global&&global.Object===Object&&global;YV.exports=UKe});var fs=pt((Ubn,JV)=>{var WKe=ED(),QKe=typeof self=="object"&&self&&self.Object===Object&&self,YKe=WKe||QKe||Function("return this")();JV.exports=YKe});var qd=pt((Wbn,KV)=>{var JKe=fs(),KKe=JKe.Symbol;KV.exports=KKe});var tq=pt((Qbn,eq)=>{var XV=qd(),ZV=Object.prototype,XKe=ZV.hasOwnProperty,ZKe=ZV.toString,D1=XV?XV.toStringTag:void 0;function eXe(e){var o=XKe.call(e,D1),t=e[D1];try{e[D1]=void 0;var n=!0}catch{}var i=ZKe.call(e);return n&&(o?e[D1]=t:delete e[D1]),i}eq.exports=eXe});var nq=pt((Ybn,iq)=>{var tXe=Object.prototype,iXe=tXe.toString;function nXe(e){return iXe.call(e)}iq.exports=nXe});var Xp=pt((Jbn,rq)=>{var oq=qd(),oXe=tq(),aXe=nq(),rXe="[object Null]",lXe="[object Undefined]",aq=oq?oq.toStringTag:void 0;function sXe(e){return e==null?e===void 0?lXe:rXe:aq&&aq in Object(e)?oXe(e):aXe(e)}rq.exports=sXe});var Ll=pt((Kbn,lq)=>{function cXe(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}lq.exports=cXe});var pu=pt((Xbn,sq)=>{var pXe=Xp(),mXe=Ll(),dXe="[object AsyncFunction]",uXe="[object Function]",fXe="[object GeneratorFunction]",hXe="[object Proxy]";function gXe(e){if(!mXe(e))return!1;var o=pXe(e);return o==uXe||o==fXe||o==dXe||o==hXe}sq.exports=gXe});var pq=pt((Zbn,cq)=>{var _Xe=fs(),CXe=_Xe["__core-js_shared__"];cq.exports=CXe});var uq=pt((eyn,dq)=>{var ID=pq(),mq=(function(){var e=/[^.]+$/.exec(ID&&ID.keys&&ID.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function vXe(e){return!!mq&&mq in e}dq.exports=vXe});var OD=pt((tyn,fq)=>{var xXe=Function.prototype,bXe=xXe.toString;function yXe(e){if(e!=null){try{return bXe.call(e)}catch{}try{return e+""}catch{}}return""}fq.exports=yXe});var gq=pt((iyn,hq)=>{var SXe=pu(),wXe=uq(),PXe=Ll(),TXe=OD(),MXe=/[\\^$.*+?()[\]{}|]/g,DXe=/^\[object .+?Constructor\]$/,EXe=Function.prototype,IXe=Object.prototype,OXe=EXe.toString,AXe=IXe.hasOwnProperty,FXe=RegExp("^"+OXe.call(AXe).replace(MXe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kXe(e){if(!PXe(e)||wXe(e))return!1;var o=SXe(e)?FXe:DXe;return o.test(TXe(e))}hq.exports=kXe});var Cq=pt((nyn,_q)=>{function BXe(e,o){return e?.[o]}_q.exports=BXe});var Zp=pt((oyn,vq)=>{var RXe=gq(),NXe=Cq();function LXe(e,o){var t=NXe(e,o);return RXe(t)?t:void 0}vq.exports=LXe});var Fb=pt((ayn,xq)=>{var VXe=Zp(),qXe=fs(),zXe=VXe(qXe,"Map");xq.exports=zXe});var E1=pt((ryn,bq)=>{var HXe=Zp(),GXe=HXe(Object,"create");bq.exports=GXe});var wq=pt((lyn,Sq)=>{var yq=E1();function jXe(){this.__data__=yq?yq(null):{},this.size=0}Sq.exports=jXe});var Tq=pt((syn,Pq)=>{function $Xe(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}Pq.exports=$Xe});var Dq=pt((cyn,Mq)=>{var UXe=E1(),WXe="__lodash_hash_undefined__",QXe=Object.prototype,YXe=QXe.hasOwnProperty;function JXe(e){var o=this.__data__;if(UXe){var t=o[e];return t===WXe?void 0:t}return YXe.call(o,e)?o[e]:void 0}Mq.exports=JXe});var Iq=pt((pyn,Eq)=>{var KXe=E1(),XXe=Object.prototype,ZXe=XXe.hasOwnProperty;function eZe(e){var o=this.__data__;return KXe?o[e]!==void 0:ZXe.call(o,e)}Eq.exports=eZe});var Aq=pt((myn,Oq)=>{var tZe=E1(),iZe="__lodash_hash_undefined__";function nZe(e,o){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=tZe&&o===void 0?iZe:o,this}Oq.exports=nZe});var kq=pt((dyn,Fq)=>{var oZe=wq(),aZe=Tq(),rZe=Dq(),lZe=Iq(),sZe=Aq();function mu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var Bq=kq(),cZe=M1(),pZe=Fb();function mZe(){this.size=0,this.__data__={hash:new Bq,map:new(pZe||cZe),string:new Bq}}Rq.exports=mZe});var Vq=pt((fyn,Lq)=>{function dZe(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}Lq.exports=dZe});var I1=pt((hyn,qq)=>{var uZe=Vq();function fZe(e,o){var t=e.__data__;return uZe(o)?t[typeof o=="string"?"string":"hash"]:t.map}qq.exports=fZe});var Hq=pt((gyn,zq)=>{var hZe=I1();function gZe(e){var o=hZe(this,e).delete(e);return this.size-=o?1:0,o}zq.exports=gZe});var jq=pt((_yn,Gq)=>{var _Ze=I1();function CZe(e){return _Ze(this,e).get(e)}Gq.exports=CZe});var Uq=pt((Cyn,$q)=>{var vZe=I1();function xZe(e){return vZe(this,e).has(e)}$q.exports=xZe});var Qq=pt((vyn,Wq)=>{var bZe=I1();function yZe(e,o){var t=bZe(this,e),n=t.size;return t.set(e,o),this.size+=t.size==n?0:1,this}Wq.exports=yZe});var kb=pt((xyn,Yq)=>{var SZe=Nq(),wZe=Hq(),PZe=jq(),TZe=Uq(),MZe=Qq();function du(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var DZe=M1(),EZe=Fb(),IZe=kb(),OZe=200;function AZe(e,o){var t=this.__data__;if(t instanceof DZe){var n=t.__data__;if(!EZe||n.length{var FZe=M1(),kZe=HV(),BZe=jV(),RZe=UV(),NZe=QV(),LZe=Kq();function uu(e){var o=this.__data__=new FZe(e);this.size=o.size}uu.prototype.clear=kZe;uu.prototype.delete=BZe;uu.prototype.get=RZe;uu.prototype.has=NZe;uu.prototype.set=LZe;Xq.exports=uu});var Bb=pt((Syn,Zq)=>{function VZe(e,o){for(var t=-1,n=e==null?0:e.length;++t{var qZe=Zp(),zZe=(function(){try{var e=qZe(Object,"defineProperty");return e({},"",{}),e}catch{}})();ez.exports=zZe});var A1=pt((Pyn,iz)=>{var tz=AD();function HZe(e,o,t){o=="__proto__"&&tz?tz(e,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[o]=t}iz.exports=HZe});var F1=pt((Tyn,nz)=>{var GZe=A1(),jZe=Vd(),$Ze=Object.prototype,UZe=$Ze.hasOwnProperty;function WZe(e,o,t){var n=e[o];(!(UZe.call(e,o)&&jZe(n,t))||t===void 0&&!(o in e))&&GZe(e,o,t)}nz.exports=WZe});var fu=pt((Myn,oz)=>{var QZe=F1(),YZe=A1();function JZe(e,o,t,n){var i=!t;t||(t={});for(var s=-1,d=o.length;++s{function KZe(e,o){for(var t=-1,n=Array(e);++t{function XZe(e){return e!=null&&typeof e=="object"}lz.exports=XZe});var cz=pt((Iyn,sz)=>{var ZZe=Xp(),eet=zs(),tet="[object Arguments]";function iet(e){return eet(e)&&ZZe(e)==tet}sz.exports=iet});var hu=pt((Oyn,dz)=>{var pz=cz(),net=zs(),mz=Object.prototype,oet=mz.hasOwnProperty,aet=mz.propertyIsEnumerable,ret=pz((function(){return arguments})())?pz:function(e){return net(e)&&oet.call(e,"callee")&&!aet.call(e,"callee")};dz.exports=ret});var Wa=pt((Ayn,uz)=>{var set=Array.isArray;uz.exports=set});var hz=pt((Fyn,fz)=>{function cet(){return!1}fz.exports=cet});var zd=pt((k1,gu)=>{var pet=fs(),met=hz(),Cz=typeof k1=="object"&&k1&&!k1.nodeType&&k1,gz=Cz&&typeof gu=="object"&&gu&&!gu.nodeType&&gu,det=gz&&gz.exports===Cz,_z=det?pet.Buffer:void 0,uet=_z?_z.isBuffer:void 0,fet=uet||met;gu.exports=fet});var B1=pt((kyn,vz)=>{var het=9007199254740991,get=/^(?:0|[1-9]\d*)$/;function _et(e,o){var t=typeof e;return o=o??het,!!o&&(t=="number"||t!="symbol"&&get.test(e))&&e>-1&&e%1==0&&e{var Cet=9007199254740991;function vet(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Cet}xz.exports=vet});var yz=pt((Ryn,bz)=>{var xet=Xp(),bet=Rb(),yet=zs(),wet="[object Arguments]",Pet="[object Array]",Tet="[object Boolean]",Met="[object Date]",Det="[object Error]",Eet="[object Function]",Iet="[object Map]",Oet="[object Number]",Aet="[object Object]",Fet="[object RegExp]",ket="[object Set]",Bet="[object String]",Ret="[object WeakMap]",Net="[object ArrayBuffer]",Let="[object DataView]",Vet="[object Float32Array]",qet="[object Float64Array]",zet="[object Int8Array]",Het="[object Int16Array]",Get="[object Int32Array]",jet="[object Uint8Array]",$et="[object Uint8ClampedArray]",Uet="[object Uint16Array]",Wet="[object Uint32Array]",ya={};ya[Vet]=ya[qet]=ya[zet]=ya[Het]=ya[Get]=ya[jet]=ya[$et]=ya[Uet]=ya[Wet]=!0;ya[wet]=ya[Pet]=ya[Net]=ya[Tet]=ya[Let]=ya[Met]=ya[Det]=ya[Eet]=ya[Iet]=ya[Oet]=ya[Aet]=ya[Fet]=ya[ket]=ya[Bet]=ya[Ret]=!1;function Qet(e){return yet(e)&&bet(e.length)&&!!ya[xet(e)]}bz.exports=Qet});var R1=pt((Nyn,Sz)=>{function Yet(e){return function(o){return e(o)}}Sz.exports=Yet});var Nb=pt((N1,_u)=>{var Jet=ED(),wz=typeof N1=="object"&&N1&&!N1.nodeType&&N1,L1=wz&&typeof _u=="object"&&_u&&!_u.nodeType&&_u,Ket=L1&&L1.exports===wz,FD=Ket&&Jet.process,Xet=(function(){try{var e=L1&&L1.require&&L1.require("util").types;return e||FD&&FD.binding&&FD.binding("util")}catch{}})();_u.exports=Xet});var Cu=pt((Lyn,Mz)=>{var Zet=yz(),ett=R1(),Pz=Nb(),Tz=Pz&&Pz.isTypedArray,ttt=Tz?ett(Tz):Zet;Mz.exports=ttt});var kD=pt((Vyn,Dz)=>{var itt=rz(),ntt=hu(),ott=Wa(),att=zd(),rtt=B1(),ltt=Cu(),stt=Object.prototype,ctt=stt.hasOwnProperty;function ptt(e,o){var t=ott(e),n=!t&&ntt(e),i=!t&&!n&&att(e),s=!t&&!n&&!i&<t(e),d=t||n||i||s,u=d?itt(e.length,String):[],f=u.length;for(var _ in e)(o||ctt.call(e,_))&&!(d&&(_=="length"||i&&(_=="offset"||_=="parent")||s&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||rtt(_,f)))&&u.push(_);return u}Dz.exports=ptt});var V1=pt((qyn,Ez)=>{var mtt=Object.prototype;function dtt(e){var o=e&&e.constructor,t=typeof o=="function"&&o.prototype||mtt;return e===t}Ez.exports=dtt});var BD=pt((zyn,Iz)=>{function utt(e,o){return function(t){return e(o(t))}}Iz.exports=utt});var Az=pt((Hyn,Oz)=>{var ftt=BD(),htt=ftt(Object.keys,Object);Oz.exports=htt});var Lb=pt((Gyn,Fz)=>{var gtt=V1(),_tt=Az(),Ctt=Object.prototype,vtt=Ctt.hasOwnProperty;function xtt(e){if(!gtt(e))return _tt(e);var o=[];for(var t in Object(e))vtt.call(e,t)&&t!="constructor"&&o.push(t);return o}Fz.exports=xtt});var vc=pt((jyn,kz)=>{var btt=pu(),ytt=Rb();function Stt(e){return e!=null&&ytt(e.length)&&!btt(e)}kz.exports=Stt});var Zc=pt(($yn,Bz)=>{var wtt=kD(),Ptt=Lb(),Ttt=vc();function Mtt(e){return Ttt(e)?wtt(e):Ptt(e)}Bz.exports=Mtt});var Nz=pt((Uyn,Rz)=>{var Dtt=fu(),Ett=Zc();function Itt(e,o){return e&&Dtt(o,Ett(o),e)}Rz.exports=Itt});var Vz=pt((Wyn,Lz)=>{function Ott(e){var o=[];if(e!=null)for(var t in Object(e))o.push(t);return o}Lz.exports=Ott});var zz=pt((Qyn,qz)=>{var Att=Ll(),Ftt=V1(),ktt=Vz(),Btt=Object.prototype,Rtt=Btt.hasOwnProperty;function Ntt(e){if(!Att(e))return ktt(e);var o=Ftt(e),t=[];for(var n in e)n=="constructor"&&(o||!Rtt.call(e,n))||t.push(n);return t}qz.exports=Ntt});var em=pt((Yyn,Hz)=>{var Ltt=kD(),Vtt=zz(),qtt=vc();function ztt(e){return qtt(e)?Ltt(e,!0):Vtt(e)}Hz.exports=ztt});var jz=pt((Jyn,Gz)=>{var Htt=fu(),Gtt=em();function jtt(e,o){return e&&Htt(o,Gtt(o),e)}Gz.exports=jtt});var RD=pt((q1,vu)=>{var $tt=fs(),Qz=typeof q1=="object"&&q1&&!q1.nodeType&&q1,$z=Qz&&typeof vu=="object"&&vu&&!vu.nodeType&&vu,Utt=$z&&$z.exports===Qz,Uz=Utt?$tt.Buffer:void 0,Wz=Uz?Uz.allocUnsafe:void 0;function Wtt(e,o){if(o)return e.slice();var t=e.length,n=Wz?Wz(t):new e.constructor(t);return e.copy(n),n}vu.exports=Wtt});var ND=pt((Kyn,Yz)=>{function Qtt(e,o){var t=-1,n=e.length;for(o||(o=Array(n));++t{function Ytt(e,o){for(var t=-1,n=e==null?0:e.length,i=0,s=[];++t{function Jtt(){return[]}Kz.exports=Jtt});var Vb=pt((e3n,Zz)=>{var Ktt=LD(),Xtt=VD(),Ztt=Object.prototype,eit=Ztt.propertyIsEnumerable,Xz=Object.getOwnPropertySymbols,tit=Xz?function(e){return e==null?[]:(e=Object(e),Ktt(Xz(e),function(o){return eit.call(e,o)}))}:Xtt;Zz.exports=tit});var tH=pt((t3n,eH)=>{var iit=fu(),nit=Vb();function oit(e,o){return iit(e,nit(e),o)}eH.exports=oit});var qb=pt((i3n,iH)=>{function ait(e,o){for(var t=-1,n=o.length,i=e.length;++t{var rit=BD(),lit=rit(Object.getPrototypeOf,Object);nH.exports=lit});var qD=pt((o3n,oH)=>{var sit=qb(),cit=z1(),pit=Vb(),mit=VD(),dit=Object.getOwnPropertySymbols,uit=dit?function(e){for(var o=[];e;)sit(o,pit(e)),e=cit(e);return o}:mit;oH.exports=uit});var rH=pt((a3n,aH)=>{var fit=fu(),hit=qD();function git(e,o){return fit(e,hit(e),o)}aH.exports=git});var zD=pt((r3n,lH)=>{var _it=qb(),Cit=Wa();function vit(e,o,t){var n=o(e);return Cit(e)?n:_it(n,t(e))}lH.exports=vit});var HD=pt((l3n,sH)=>{var xit=zD(),bit=Vb(),yit=Zc();function Sit(e){return xit(e,yit,bit)}sH.exports=Sit});var pH=pt((s3n,cH)=>{var wit=zD(),Pit=qD(),Tit=em();function Mit(e){return wit(e,Tit,Pit)}cH.exports=Mit});var dH=pt((c3n,mH)=>{var Dit=Zp(),Eit=fs(),Iit=Dit(Eit,"DataView");mH.exports=Iit});var fH=pt((p3n,uH)=>{var Oit=Zp(),Ait=fs(),Fit=Oit(Ait,"Promise");uH.exports=Fit});var GD=pt((m3n,hH)=>{var kit=Zp(),Bit=fs(),Rit=kit(Bit,"Set");hH.exports=Rit});var _H=pt((d3n,gH)=>{var Nit=Zp(),Lit=fs(),Vit=Nit(Lit,"WeakMap");gH.exports=Vit});var Gd=pt((u3n,wH)=>{var jD=dH(),$D=Fb(),UD=fH(),WD=GD(),QD=_H(),SH=Xp(),xu=OD(),CH="[object Map]",qit="[object Object]",vH="[object Promise]",xH="[object Set]",bH="[object WeakMap]",yH="[object DataView]",zit=xu(jD),Hit=xu($D),Git=xu(UD),jit=xu(WD),$it=xu(QD),Hd=SH;(jD&&Hd(new jD(new ArrayBuffer(1)))!=yH||$D&&Hd(new $D)!=CH||UD&&Hd(UD.resolve())!=vH||WD&&Hd(new WD)!=xH||QD&&Hd(new QD)!=bH)&&(Hd=function(e){var o=SH(e),t=o==qit?e.constructor:void 0,n=t?xu(t):"";if(n)switch(n){case zit:return yH;case Hit:return CH;case Git:return vH;case jit:return xH;case $it:return bH}return o});wH.exports=Hd});var TH=pt((f3n,PH)=>{var Uit=Object.prototype,Wit=Uit.hasOwnProperty;function Qit(e){var o=e.length,t=new e.constructor(o);return o&&typeof e[0]=="string"&&Wit.call(e,"index")&&(t.index=e.index,t.input=e.input),t}PH.exports=Qit});var YD=pt((h3n,MH)=>{var Yit=fs(),Jit=Yit.Uint8Array;MH.exports=Jit});var zb=pt((g3n,EH)=>{var DH=YD();function Kit(e){var o=new e.constructor(e.byteLength);return new DH(o).set(new DH(e)),o}EH.exports=Kit});var OH=pt((_3n,IH)=>{var Xit=zb();function Zit(e,o){var t=o?Xit(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}IH.exports=Zit});var FH=pt((C3n,AH)=>{var ent=/\w*$/;function tnt(e){var o=new e.constructor(e.source,ent.exec(e));return o.lastIndex=e.lastIndex,o}AH.exports=tnt});var LH=pt((v3n,NH)=>{var kH=qd(),BH=kH?kH.prototype:void 0,RH=BH?BH.valueOf:void 0;function int(e){return RH?Object(RH.call(e)):{}}NH.exports=int});var JD=pt((x3n,VH)=>{var nnt=zb();function ont(e,o){var t=o?nnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}VH.exports=ont});var zH=pt((b3n,qH)=>{var ant=zb(),rnt=OH(),lnt=FH(),snt=LH(),cnt=JD(),pnt="[object Boolean]",mnt="[object Date]",dnt="[object Map]",unt="[object Number]",fnt="[object RegExp]",hnt="[object Set]",gnt="[object String]",_nt="[object Symbol]",Cnt="[object ArrayBuffer]",vnt="[object DataView]",xnt="[object Float32Array]",bnt="[object Float64Array]",ynt="[object Int8Array]",Snt="[object Int16Array]",wnt="[object Int32Array]",Pnt="[object Uint8Array]",Tnt="[object Uint8ClampedArray]",Mnt="[object Uint16Array]",Dnt="[object Uint32Array]";function Ent(e,o,t){var n=e.constructor;switch(o){case Cnt:return ant(e);case pnt:case mnt:return new n(+e);case vnt:return rnt(e,t);case xnt:case bnt:case ynt:case Snt:case wnt:case Pnt:case Tnt:case Mnt:case Dnt:return cnt(e,t);case dnt:return new n;case unt:case gnt:return new n(e);case fnt:return lnt(e);case hnt:return new n;case _nt:return snt(e)}}qH.exports=Ent});var KD=pt((y3n,GH)=>{var Int=Ll(),HH=Object.create,Ont=(function(){function e(){}return function(o){if(!Int(o))return{};if(HH)return HH(o);e.prototype=o;var t=new e;return e.prototype=void 0,t}})();GH.exports=Ont});var XD=pt((S3n,jH)=>{var Ant=KD(),Fnt=z1(),knt=V1();function Bnt(e){return typeof e.constructor=="function"&&!knt(e)?Ant(Fnt(e)):{}}jH.exports=Bnt});var UH=pt((w3n,$H)=>{var Rnt=Gd(),Nnt=zs(),Lnt="[object Map]";function Vnt(e){return Nnt(e)&&Rnt(e)==Lnt}$H.exports=Vnt});var JH=pt((P3n,YH)=>{var qnt=UH(),znt=R1(),WH=Nb(),QH=WH&&WH.isMap,Hnt=QH?znt(QH):qnt;YH.exports=Hnt});var XH=pt((T3n,KH)=>{var Gnt=Gd(),jnt=zs(),$nt="[object Set]";function Unt(e){return jnt(e)&&Gnt(e)==$nt}KH.exports=Unt});var iG=pt((M3n,tG)=>{var Wnt=XH(),Qnt=R1(),ZH=Nb(),eG=ZH&&ZH.isSet,Ynt=eG?Qnt(eG):Wnt;tG.exports=Ynt});var ZD=pt((D3n,rG)=>{var Jnt=O1(),Knt=Bb(),Xnt=F1(),Znt=Nz(),eot=jz(),tot=RD(),iot=ND(),not=tH(),oot=rH(),aot=HD(),rot=pH(),lot=Gd(),sot=TH(),cot=zH(),pot=XD(),mot=Wa(),dot=zd(),uot=JH(),fot=Ll(),hot=iG(),got=Zc(),_ot=em(),Cot=1,vot=2,xot=4,nG="[object Arguments]",bot="[object Array]",yot="[object Boolean]",Sot="[object Date]",wot="[object Error]",oG="[object Function]",Pot="[object GeneratorFunction]",Tot="[object Map]",Mot="[object Number]",aG="[object Object]",Dot="[object RegExp]",Eot="[object Set]",Iot="[object String]",Oot="[object Symbol]",Aot="[object WeakMap]",Fot="[object ArrayBuffer]",kot="[object DataView]",Bot="[object Float32Array]",Rot="[object Float64Array]",Not="[object Int8Array]",Lot="[object Int16Array]",Vot="[object Int32Array]",qot="[object Uint8Array]",zot="[object Uint8ClampedArray]",Hot="[object Uint16Array]",Got="[object Uint32Array]",Ca={};Ca[nG]=Ca[bot]=Ca[Fot]=Ca[kot]=Ca[yot]=Ca[Sot]=Ca[Bot]=Ca[Rot]=Ca[Not]=Ca[Lot]=Ca[Vot]=Ca[Tot]=Ca[Mot]=Ca[aG]=Ca[Dot]=Ca[Eot]=Ca[Iot]=Ca[Oot]=Ca[qot]=Ca[zot]=Ca[Hot]=Ca[Got]=!0;Ca[wot]=Ca[oG]=Ca[Aot]=!1;function Hb(e,o,t,n,i,s){var d,u=o&Cot,f=o&vot,_=o&xot;if(t&&(d=i?t(e,n,i,s):t(e)),d!==void 0)return d;if(!fot(e))return e;var C=mot(e);if(C){if(d=sot(e),!u)return iot(e,d)}else{var x=lot(e),y=x==oG||x==Pot;if(dot(e))return tot(e,u);if(x==aG||x==nG||y&&!i){if(d=f||y?{}:pot(e),!u)return f?oot(e,eot(d,e)):not(e,Znt(d,e))}else{if(!Ca[x])return i?e:{};d=cot(e,x,u)}}s||(s=new Jnt);var P=s.get(e);if(P)return P;s.set(e,d),hot(e)?e.forEach(function(D){d.add(Hb(D,o,t,D,e,s))}):uot(e)&&e.forEach(function(D,k){d.set(k,Hb(D,o,t,k,e,s))});var S=_?f?rot:aot:f?_ot:got,M=C?void 0:S(e);return Knt(M||e,function(D,k){M&&(k=D,D=e[k]),Xnt(d,k,Hb(D,o,t,k,e,s))}),d}rG.exports=Hb});var sG=pt((E3n,lG)=>{var jot=ZD(),$ot=4;function Uot(e){return jot(e,$ot)}lG.exports=Uot});var Gb=pt((I3n,cG)=>{function Wot(e){return function(){return e}}cG.exports=Wot});var mG=pt((O3n,pG)=>{function Qot(e){return function(o,t,n){for(var i=-1,s=Object(o),d=n(o),u=d.length;u--;){var f=d[e?u:++i];if(t(s[f],f,s)===!1)break}return o}}pG.exports=Qot});var jb=pt((A3n,dG)=>{var Yot=mG(),Jot=Yot();dG.exports=Jot});var $b=pt((F3n,uG)=>{var Kot=jb(),Xot=Zc();function Zot(e,o){return e&&Kot(e,o,Xot)}uG.exports=Zot});var hG=pt((k3n,fG)=>{var eat=vc();function tat(e,o){return function(t,n){if(t==null)return t;if(!eat(t))return e(t,n);for(var i=t.length,s=o?i:-1,d=Object(t);(o?s--:++s{var iat=$b(),nat=hG(),oat=nat(iat);gG.exports=oat});var tm=pt((R3n,_G)=>{function aat(e){return e}_G.exports=aat});var eE=pt((N3n,CG)=>{var rat=tm();function lat(e){return typeof e=="function"?e:rat}CG.exports=lat});var tE=pt((L3n,vG)=>{var sat=Bb(),cat=H1(),pat=eE(),mat=Wa();function dat(e,o){var t=mat(e)?sat:cat;return t(e,pat(o))}vG.exports=dat});var iE=pt((V3n,xG)=>{xG.exports=tE()});var yG=pt((q3n,bG)=>{var uat=H1();function fat(e,o){var t=[];return uat(e,function(n,i,s){o(n,i,s)&&t.push(n)}),t}bG.exports=fat});var wG=pt((z3n,SG)=>{var hat="__lodash_hash_undefined__";function gat(e){return this.__data__.set(e,hat),this}SG.exports=gat});var TG=pt((H3n,PG)=>{function _at(e){return this.__data__.has(e)}PG.exports=_at});var nE=pt((G3n,MG)=>{var Cat=kb(),vat=wG(),xat=TG();function Ub(e){var o=-1,t=e==null?0:e.length;for(this.__data__=new Cat;++o{function bat(e,o){for(var t=-1,n=e==null?0:e.length;++t{function yat(e,o){return e.has(o)}IG.exports=yat});var aE=pt((U3n,OG)=>{var Sat=nE(),wat=EG(),Pat=oE(),Tat=1,Mat=2;function Dat(e,o,t,n,i,s){var d=t&Tat,u=e.length,f=o.length;if(u!=f&&!(d&&f>u))return!1;var _=s.get(e),C=s.get(o);if(_&&C)return _==o&&C==e;var x=-1,y=!0,P=t&Mat?new Sat:void 0;for(s.set(e,o),s.set(o,e);++x{function Eat(e){var o=-1,t=Array(e.size);return e.forEach(function(n,i){t[++o]=[i,n]}),t}AG.exports=Eat});var Wb=pt((Q3n,kG)=>{function Iat(e){var o=-1,t=Array(e.size);return e.forEach(function(n){t[++o]=n}),t}kG.exports=Iat});var VG=pt((Y3n,LG)=>{var BG=qd(),RG=YD(),Oat=Vd(),Aat=aE(),Fat=FG(),kat=Wb(),Bat=1,Rat=2,Nat="[object Boolean]",Lat="[object Date]",Vat="[object Error]",qat="[object Map]",zat="[object Number]",Hat="[object RegExp]",Gat="[object Set]",jat="[object String]",$at="[object Symbol]",Uat="[object ArrayBuffer]",Wat="[object DataView]",NG=BG?BG.prototype:void 0,rE=NG?NG.valueOf:void 0;function Qat(e,o,t,n,i,s,d){switch(t){case Wat:if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case Uat:return!(e.byteLength!=o.byteLength||!s(new RG(e),new RG(o)));case Nat:case Lat:case zat:return Oat(+e,+o);case Vat:return e.name==o.name&&e.message==o.message;case Hat:case jat:return e==o+"";case qat:var u=Fat;case Gat:var f=n&Bat;if(u||(u=kat),e.size!=o.size&&!f)return!1;var _=d.get(e);if(_)return _==o;n|=Rat,d.set(e,o);var C=Aat(u(e),u(o),n,i,s,d);return d.delete(e),C;case $at:if(rE)return rE.call(e)==rE.call(o)}return!1}LG.exports=Qat});var HG=pt((J3n,zG)=>{var qG=HD(),Yat=1,Jat=Object.prototype,Kat=Jat.hasOwnProperty;function Xat(e,o,t,n,i,s){var d=t&Yat,u=qG(e),f=u.length,_=qG(o),C=_.length;if(f!=C&&!d)return!1;for(var x=f;x--;){var y=u[x];if(!(d?y in o:Kat.call(o,y)))return!1}var P=s.get(e),S=s.get(o);if(P&&S)return P==o&&S==e;var M=!0;s.set(e,o),s.set(o,e);for(var D=d;++x{var lE=O1(),Zat=aE(),ert=VG(),trt=HG(),GG=Gd(),jG=Wa(),$G=zd(),irt=Cu(),nrt=1,UG="[object Arguments]",WG="[object Array]",Qb="[object Object]",ort=Object.prototype,QG=ort.hasOwnProperty;function art(e,o,t,n,i,s){var d=jG(e),u=jG(o),f=d?WG:GG(e),_=u?WG:GG(o);f=f==UG?Qb:f,_=_==UG?Qb:_;var C=f==Qb,x=_==Qb,y=f==_;if(y&&$G(e)){if(!$G(o))return!1;d=!0,C=!1}if(y&&!C)return s||(s=new lE),d||irt(e)?Zat(e,o,t,n,i,s):ert(e,o,f,t,n,i,s);if(!(t&nrt)){var P=C&&QG.call(e,"__wrapped__"),S=x&&QG.call(o,"__wrapped__");if(P||S){var M=P?e.value():e,D=S?o.value():o;return s||(s=new lE),i(M,D,t,n,s)}}return y?(s||(s=new lE),trt(e,o,t,n,i,s)):!1}YG.exports=art});var sE=pt((X3n,ZG)=>{var rrt=JG(),KG=zs();function XG(e,o,t,n,i){return e===o?!0:e==null||o==null||!KG(e)&&!KG(o)?e!==e&&o!==o:rrt(e,o,t,n,XG,i)}ZG.exports=XG});var tj=pt((Z3n,ej)=>{var lrt=O1(),srt=sE(),crt=1,prt=2;function mrt(e,o,t,n){var i=t.length,s=i,d=!n;if(e==null)return!s;for(e=Object(e);i--;){var u=t[i];if(d&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i{var drt=Ll();function urt(e){return e===e&&!drt(e)}ij.exports=urt});var oj=pt((tSn,nj)=>{var frt=cE(),hrt=Zc();function grt(e){for(var o=hrt(e),t=o.length;t--;){var n=o[t],i=e[n];o[t]=[n,i,frt(i)]}return o}nj.exports=grt});var pE=pt((iSn,aj)=>{function _rt(e,o){return function(t){return t==null?!1:t[e]===o&&(o!==void 0||e in Object(t))}}aj.exports=_rt});var lj=pt((nSn,rj)=>{var Crt=tj(),vrt=oj(),xrt=pE();function brt(e){var o=vrt(e);return o.length==1&&o[0][2]?xrt(o[0][0],o[0][1]):function(t){return t===e||Crt(t,e,o)}}rj.exports=brt});var jd=pt((oSn,sj)=>{var yrt=Xp(),Srt=zs(),wrt="[object Symbol]";function Prt(e){return typeof e=="symbol"||Srt(e)&&yrt(e)==wrt}sj.exports=Prt});var Yb=pt((aSn,cj)=>{var Trt=Wa(),Mrt=jd(),Drt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ert=/^\w*$/;function Irt(e,o){if(Trt(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Mrt(e)?!0:Ert.test(e)||!Drt.test(e)||o!=null&&e in Object(o)}cj.exports=Irt});var dj=pt((rSn,mj)=>{var pj=kb(),Ort="Expected a function";function mE(e,o){if(typeof e!="function"||o!=null&&typeof o!="function")throw new TypeError(Ort);var t=function(){var n=arguments,i=o?o.apply(this,n):n[0],s=t.cache;if(s.has(i))return s.get(i);var d=e.apply(this,n);return t.cache=s.set(i,d)||s,d};return t.cache=new(mE.Cache||pj),t}mE.Cache=pj;mj.exports=mE});var fj=pt((lSn,uj)=>{var Art=dj(),Frt=500;function krt(e){var o=Art(e,function(n){return t.size===Frt&&t.clear(),n}),t=o.cache;return o}uj.exports=krt});var gj=pt((sSn,hj)=>{var Brt=fj(),Rrt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nrt=/\\(\\)?/g,Lrt=Brt(function(e){var o=[];return e.charCodeAt(0)===46&&o.push(""),e.replace(Rrt,function(t,n,i,s){o.push(i?s.replace(Nrt,"$1"):n||t)}),o});hj.exports=Lrt});var G1=pt((cSn,_j)=>{function Vrt(e,o){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t{var Cj=qd(),qrt=G1(),zrt=Wa(),Hrt=jd(),Grt=1/0,vj=Cj?Cj.prototype:void 0,xj=vj?vj.toString:void 0;function bj(e){if(typeof e=="string")return e;if(zrt(e))return qrt(e,bj)+"";if(Hrt(e))return xj?xj.call(e):"";var o=e+"";return o=="0"&&1/e==-Grt?"-0":o}yj.exports=bj});var dE=pt((mSn,wj)=>{var jrt=Sj();function $rt(e){return e==null?"":jrt(e)}wj.exports=$rt});var j1=pt((dSn,Pj)=>{var Urt=Wa(),Wrt=Yb(),Qrt=gj(),Yrt=dE();function Jrt(e,o){return Urt(e)?e:Wrt(e,o)?[e]:Qrt(Yrt(e))}Pj.exports=Jrt});var bu=pt((uSn,Tj)=>{var Krt=jd(),Xrt=1/0;function Zrt(e){if(typeof e=="string"||Krt(e))return e;var o=e+"";return o=="0"&&1/e==-Xrt?"-0":o}Tj.exports=Zrt});var $1=pt((fSn,Mj)=>{var elt=j1(),tlt=bu();function ilt(e,o){o=elt(o,e);for(var t=0,n=o.length;e!=null&&t{var nlt=$1();function olt(e,o,t){var n=e==null?void 0:nlt(e,o);return n===void 0?t:n}Dj.exports=olt});var Oj=pt((gSn,Ij)=>{function alt(e,o){return e!=null&&o in Object(e)}Ij.exports=alt});var uE=pt((_Sn,Aj)=>{var rlt=j1(),llt=hu(),slt=Wa(),clt=B1(),plt=Rb(),mlt=bu();function dlt(e,o,t){o=rlt(o,e);for(var n=-1,i=o.length,s=!1;++n{var ult=Oj(),flt=uE();function hlt(e,o){return e!=null&&flt(e,o,ult)}Fj.exports=hlt});var Bj=pt((vSn,kj)=>{var glt=sE(),_lt=Ej(),Clt=fE(),vlt=Yb(),xlt=cE(),blt=pE(),ylt=bu(),Slt=1,wlt=2;function Plt(e,o){return vlt(e)&&xlt(o)?blt(ylt(e),o):function(t){var n=_lt(t,e);return n===void 0&&n===o?Clt(t,e):glt(o,n,Slt|wlt)}}kj.exports=Plt});var hE=pt((xSn,Rj)=>{function Tlt(e){return function(o){return o?.[e]}}Rj.exports=Tlt});var Lj=pt((bSn,Nj)=>{var Mlt=$1();function Dlt(e){return function(o){return Mlt(o,e)}}Nj.exports=Dlt});var qj=pt((ySn,Vj)=>{var Elt=hE(),Ilt=Lj(),Olt=Yb(),Alt=bu();function Flt(e){return Olt(e)?Elt(Alt(e)):Ilt(e)}Vj.exports=Flt});var xc=pt((SSn,zj)=>{var klt=lj(),Blt=Bj(),Rlt=tm(),Nlt=Wa(),Llt=qj();function Vlt(e){return typeof e=="function"?e:e==null?Rlt:typeof e=="object"?Nlt(e)?Blt(e[0],e[1]):klt(e):Llt(e)}zj.exports=Vlt});var gE=pt((wSn,Hj)=>{var qlt=LD(),zlt=yG(),Hlt=xc(),Glt=Wa();function jlt(e,o){var t=Glt(e)?qlt:zlt;return t(e,Hlt(o,3))}Hj.exports=jlt});var jj=pt((PSn,Gj)=>{var $lt=Object.prototype,Ult=$lt.hasOwnProperty;function Wlt(e,o){return e!=null&&Ult.call(e,o)}Gj.exports=Wlt});var _E=pt((TSn,$j)=>{var Qlt=jj(),Ylt=uE();function Jlt(e,o){return e!=null&&Ylt(e,o,Qlt)}$j.exports=Jlt});var Wj=pt((MSn,Uj)=>{var Klt=Lb(),Xlt=Gd(),Zlt=hu(),est=Wa(),tst=vc(),ist=zd(),nst=V1(),ost=Cu(),ast="[object Map]",rst="[object Set]",lst=Object.prototype,sst=lst.hasOwnProperty;function cst(e){if(e==null)return!0;if(tst(e)&&(est(e)||typeof e=="string"||typeof e.splice=="function"||ist(e)||ost(e)||Zlt(e)))return!e.length;var o=Xlt(e);if(o==ast||o==rst)return!e.size;if(nst(e))return!Klt(e).length;for(var t in e)if(sst.call(e,t))return!1;return!0}Uj.exports=cst});var CE=pt((DSn,Qj)=>{function pst(e){return e===void 0}Qj.exports=pst});var vE=pt((ESn,Yj)=>{var mst=H1(),dst=vc();function ust(e,o){var t=-1,n=dst(e)?Array(e.length):[];return mst(e,function(i,s,d){n[++t]=o(i,s,d)}),n}Yj.exports=ust});var xE=pt((ISn,Jj)=>{var fst=G1(),hst=xc(),gst=vE(),_st=Wa();function Cst(e,o){var t=_st(e)?fst:gst;return t(e,hst(o,3))}Jj.exports=Cst});var Xj=pt((OSn,Kj)=>{function vst(e,o,t,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(t=e[++i]);++i{function xst(e,o,t,n,i){return i(e,function(s,d,u){t=n?(n=!1,s):o(t,s,d,u)}),t}Zj.exports=xst});var bE=pt((FSn,t$)=>{var bst=Xj(),yst=H1(),Sst=xc(),wst=e$(),Pst=Wa();function Tst(e,o,t){var n=Pst(e)?bst:wst,i=arguments.length<3;return n(e,Sst(o,4),t,i,yst)}t$.exports=Tst});var n$=pt((kSn,i$)=>{var Mst=Xp(),Dst=Wa(),Est=zs(),Ist="[object String]";function Ost(e){return typeof e=="string"||!Dst(e)&&Est(e)&&Mst(e)==Ist}i$.exports=Ost});var a$=pt((BSn,o$)=>{var Ast=hE(),Fst=Ast("length");o$.exports=Fst});var l$=pt((RSn,r$)=>{var kst="\\ud800-\\udfff",Bst="\\u0300-\\u036f",Rst="\\ufe20-\\ufe2f",Nst="\\u20d0-\\u20ff",Lst=Bst+Rst+Nst,Vst="\\ufe0e\\ufe0f",qst="\\u200d",zst=RegExp("["+qst+kst+Lst+Vst+"]");function Hst(e){return zst.test(e)}r$.exports=Hst});var g$=pt((NSn,h$)=>{var c$="\\ud800-\\udfff",Gst="\\u0300-\\u036f",jst="\\ufe20-\\ufe2f",$st="\\u20d0-\\u20ff",Ust=Gst+jst+$st,Wst="\\ufe0e\\ufe0f",Qst="["+c$+"]",yE="["+Ust+"]",SE="\\ud83c[\\udffb-\\udfff]",Yst="(?:"+yE+"|"+SE+")",p$="[^"+c$+"]",m$="(?:\\ud83c[\\udde6-\\uddff]){2}",d$="[\\ud800-\\udbff][\\udc00-\\udfff]",Jst="\\u200d",u$=Yst+"?",f$="["+Wst+"]?",Kst="(?:"+Jst+"(?:"+[p$,m$,d$].join("|")+")"+f$+u$+")*",Xst=f$+u$+Kst,Zst="(?:"+[p$+yE+"?",yE,m$,d$,Qst].join("|")+")",s$=RegExp(SE+"(?="+SE+")|"+Zst+Xst,"g");function ect(e){for(var o=s$.lastIndex=0;s$.test(e);)++o;return o}h$.exports=ect});var C$=pt((LSn,_$)=>{var tct=a$(),ict=l$(),nct=g$();function oct(e){return ict(e)?nct(e):tct(e)}_$.exports=oct});var x$=pt((VSn,v$)=>{var act=Lb(),rct=Gd(),lct=vc(),sct=n$(),cct=C$(),pct="[object Map]",mct="[object Set]";function dct(e){if(e==null)return 0;if(lct(e))return sct(e)?cct(e):e.length;var o=rct(e);return o==pct||o==mct?e.size:act(e).length}v$.exports=dct});var y$=pt((qSn,b$)=>{var uct=Bb(),fct=KD(),hct=$b(),gct=xc(),_ct=z1(),Cct=Wa(),vct=zd(),xct=pu(),bct=Ll(),yct=Cu();function Sct(e,o,t){var n=Cct(e),i=n||vct(e)||yct(e);if(o=gct(o,4),t==null){var s=e&&e.constructor;i?t=n?new s:[]:bct(e)?t=xct(s)?fct(_ct(e)):{}:t={}}return(i?uct:hct)(e,function(d,u,f){return o(t,d,u,f)}),t}b$.exports=Sct});var T$=pt((zSn,P$)=>{var S$=qd(),wct=hu(),Pct=Wa(),w$=S$?S$.isConcatSpreadable:void 0;function Tct(e){return Pct(e)||wct(e)||!!(w$&&e&&e[w$])}P$.exports=Tct});var Jb=pt((HSn,D$)=>{var Mct=qb(),Dct=T$();function M$(e,o,t,n,i){var s=-1,d=e.length;for(t||(t=Dct),i||(i=[]);++s0&&t(u)?o>1?M$(u,o-1,t,n,i):Mct(i,u):n||(i[i.length]=u)}return i}D$.exports=M$});var I$=pt((GSn,E$)=>{function Ect(e,o,t){switch(t.length){case 0:return e.call(o);case 1:return e.call(o,t[0]);case 2:return e.call(o,t[0],t[1]);case 3:return e.call(o,t[0],t[1],t[2])}return e.apply(o,t)}E$.exports=Ect});var wE=pt((jSn,A$)=>{var Ict=I$(),O$=Math.max;function Oct(e,o,t){return o=O$(o===void 0?e.length-1:o,0),function(){for(var n=arguments,i=-1,s=O$(n.length-o,0),d=Array(s);++i{var Act=Gb(),F$=AD(),Fct=tm(),kct=F$?function(e,o){return F$(e,"toString",{configurable:!0,enumerable:!1,value:Act(o),writable:!0})}:Fct;k$.exports=kct});var N$=pt((USn,R$)=>{var Bct=800,Rct=16,Nct=Date.now;function Lct(e){var o=0,t=0;return function(){var n=Nct(),i=Rct-(n-t);if(t=n,i>0){if(++o>=Bct)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}R$.exports=Lct});var PE=pt((WSn,L$)=>{var Vct=B$(),qct=N$(),zct=qct(Vct);L$.exports=zct});var U1=pt((QSn,V$)=>{var Hct=tm(),Gct=wE(),jct=PE();function $ct(e,o){return jct(Gct(e,o,Hct),e+"")}V$.exports=$ct});var TE=pt((YSn,q$)=>{function Uct(e,o,t,n){for(var i=e.length,s=t+(n?1:-1);n?s--:++s{function Wct(e){return e!==e}z$.exports=Wct});var j$=pt((KSn,G$)=>{function Qct(e,o,t){for(var n=t-1,i=e.length;++n{var Yct=TE(),Jct=H$(),Kct=j$();function Xct(e,o,t){return o===o?Kct(e,o,t):Yct(e,Jct,t)}$$.exports=Xct});var Q$=pt((ZSn,W$)=>{var Zct=U$();function ept(e,o){var t=e==null?0:e.length;return!!t&&Zct(e,o,0)>-1}W$.exports=ept});var J$=pt((ewn,Y$)=>{function tpt(e,o,t){for(var n=-1,i=e==null?0:e.length;++n{function ipt(){}K$.exports=ipt});var eU=pt((iwn,Z$)=>{var ME=GD(),npt=X$(),opt=Wb(),apt=1/0,rpt=ME&&1/opt(new ME([,-0]))[1]==apt?function(e){return new ME(e)}:npt;Z$.exports=rpt});var iU=pt((nwn,tU)=>{var lpt=nE(),spt=Q$(),cpt=J$(),ppt=oE(),mpt=eU(),dpt=Wb(),upt=200;function fpt(e,o,t){var n=-1,i=spt,s=e.length,d=!0,u=[],f=u;if(t)d=!1,i=cpt;else if(s>=upt){var _=o?null:mpt(e);if(_)return dpt(_);d=!1,i=ppt,f=new lpt}else f=o?[]:u;e:for(;++n{var hpt=vc(),gpt=zs();function _pt(e){return gpt(e)&&hpt(e)}nU.exports=_pt});var aU=pt((awn,oU)=>{var Cpt=Jb(),vpt=U1(),xpt=iU(),bpt=DE(),ypt=vpt(function(e){return xpt(Cpt(e,1,bpt,!0))});oU.exports=ypt});var lU=pt((rwn,rU)=>{var Spt=G1();function wpt(e,o){return Spt(o,function(t){return e[t]})}rU.exports=wpt});var EE=pt((lwn,sU)=>{var Ppt=lU(),Tpt=Zc();function Mpt(e){return e==null?[]:Ppt(e,Tpt(e))}sU.exports=Mpt});var Vl=pt((swn,cU)=>{var Kb;if(typeof Ds=="function")try{Kb={clone:sG(),constant:Gb(),each:iE(),filter:gE(),has:_E(),isArray:Wa(),isEmpty:Wj(),isFunction:pu(),isUndefined:CE(),keys:Zc(),map:xE(),reduce:bE(),size:x$(),transform:y$(),union:aU(),values:EE()}}catch{}Kb||(Kb=window._);cU.exports=Kb});var Xb=pt((pwn,uU)=>{"use strict";var to=Vl();uU.exports=vo;var Dpt="\0",$d="\0",pU="";function vo(e){this._isDirected=to.has(e,"directed")?e.directed:!0,this._isMultigraph=to.has(e,"multigraph")?e.multigraph:!1,this._isCompound=to.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=to.constant(void 0),this._defaultEdgeLabelFn=to.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[$d]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}vo.prototype._nodeCount=0;vo.prototype._edgeCount=0;vo.prototype.isDirected=function(){return this._isDirected};vo.prototype.isMultigraph=function(){return this._isMultigraph};vo.prototype.isCompound=function(){return this._isCompound};vo.prototype.setGraph=function(e){return this._label=e,this};vo.prototype.graph=function(){return this._label};vo.prototype.setDefaultNodeLabel=function(e){return to.isFunction(e)||(e=to.constant(e)),this._defaultNodeLabelFn=e,this};vo.prototype.nodeCount=function(){return this._nodeCount};vo.prototype.nodes=function(){return to.keys(this._nodes)};vo.prototype.sources=function(){var e=this;return to.filter(this.nodes(),function(o){return to.isEmpty(e._in[o])})};vo.prototype.sinks=function(){var e=this;return to.filter(this.nodes(),function(o){return to.isEmpty(e._out[o])})};vo.prototype.setNodes=function(e,o){var t=arguments,n=this;return to.each(e,function(i){t.length>1?n.setNode(i,o):n.setNode(i)}),this};vo.prototype.setNode=function(e,o){return to.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=o),this):(this._nodes[e]=arguments.length>1?o:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=$d,this._children[e]={},this._children[$d][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};vo.prototype.node=function(e){return this._nodes[e]};vo.prototype.hasNode=function(e){return to.has(this._nodes,e)};vo.prototype.removeNode=function(e){var o=this;if(to.has(this._nodes,e)){var t=function(n){o.removeEdge(o._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],to.each(this.children(e),function(n){o.setParent(n)}),delete this._children[e]),to.each(to.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],to.each(to.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};vo.prototype.setParent=function(e,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(to.isUndefined(o))o=$d;else{o+="";for(var t=o;!to.isUndefined(t);t=this.parent(t))if(t===e)throw new Error("Setting "+o+" as parent of "+e+" would create a cycle");this.setNode(o)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=o,this._children[o][e]=!0,this};vo.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};vo.prototype.parent=function(e){if(this._isCompound){var o=this._parent[e];if(o!==$d)return o}};vo.prototype.children=function(e){if(to.isUndefined(e)&&(e=$d),this._isCompound){var o=this._children[e];if(o)return to.keys(o)}else{if(e===$d)return this.nodes();if(this.hasNode(e))return[]}};vo.prototype.predecessors=function(e){var o=this._preds[e];if(o)return to.keys(o)};vo.prototype.successors=function(e){var o=this._sucs[e];if(o)return to.keys(o)};vo.prototype.neighbors=function(e){var o=this.predecessors(e);if(o)return to.union(o,this.successors(e))};vo.prototype.isLeaf=function(e){var o;return this.isDirected()?o=this.successors(e):o=this.neighbors(e),o.length===0};vo.prototype.filterNodes=function(e){var o=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});o.setGraph(this.graph());var t=this;to.each(this._nodes,function(s,d){e(d)&&o.setNode(d,s)}),to.each(this._edgeObjs,function(s){o.hasNode(s.v)&&o.hasNode(s.w)&&o.setEdge(s,t.edge(s))});var n={};function i(s){var d=t.parent(s);return d===void 0||o.hasNode(d)?(n[s]=d,d):d in n?n[d]:i(d)}return this._isCompound&&to.each(o.nodes(),function(s){o.setParent(s,i(s))}),o};vo.prototype.setDefaultEdgeLabel=function(e){return to.isFunction(e)||(e=to.constant(e)),this._defaultEdgeLabelFn=e,this};vo.prototype.edgeCount=function(){return this._edgeCount};vo.prototype.edges=function(){return to.values(this._edgeObjs)};vo.prototype.setPath=function(e,o){var t=this,n=arguments;return to.reduce(e,function(i,s){return n.length>1?t.setEdge(i,s,o):t.setEdge(i,s),s}),this};vo.prototype.setEdge=function(){var e,o,t,n,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,o=s.w,t=s.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=s,o=arguments[1],t=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,o=""+o,to.isUndefined(t)||(t=""+t);var d=W1(this._isDirected,e,o,t);if(to.has(this._edgeLabels,d))return i&&(this._edgeLabels[d]=n),this;if(!to.isUndefined(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(o),this._edgeLabels[d]=i?n:this._defaultEdgeLabelFn(e,o,t);var u=Ept(this._isDirected,e,o,t);return e=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,mU(this._preds[o],e),mU(this._sucs[e],o),this._in[o][d]=u,this._out[e][d]=u,this._edgeCount++,this};vo.prototype.edge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t);return this._edgeLabels[n]};vo.prototype.hasEdge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t);return to.has(this._edgeLabels,n)};vo.prototype.removeEdge=function(e,o,t){var n=arguments.length===1?IE(this._isDirected,arguments[0]):W1(this._isDirected,e,o,t),i=this._edgeObjs[n];return i&&(e=i.v,o=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],dU(this._preds[o],e),dU(this._sucs[e],o),delete this._in[o][n],delete this._out[e][n],this._edgeCount--),this};vo.prototype.inEdges=function(e,o){var t=this._in[e];if(t){var n=to.values(t);return o?to.filter(n,function(i){return i.v===o}):n}};vo.prototype.outEdges=function(e,o){var t=this._out[e];if(t){var n=to.values(t);return o?to.filter(n,function(i){return i.w===o}):n}};vo.prototype.nodeEdges=function(e,o){var t=this.inEdges(e,o);if(t)return t.concat(this.outEdges(e,o))};function mU(e,o){e[o]?e[o]++:e[o]=1}function dU(e,o){--e[o]||delete e[o]}function W1(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}return i+pU+s+pU+(to.isUndefined(n)?Dpt:n)}function Ept(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}var u={v:i,w:s};return n&&(u.name=n),u}function IE(e,o){return W1(e,o.v,o.w,o.name)}});var hU=pt((mwn,fU)=>{fU.exports="2.1.8"});var _U=pt((dwn,gU)=>{gU.exports={Graph:Xb(),version:hU()}});var vU=pt((uwn,CU)=>{var bc=Vl(),Ipt=Xb();CU.exports={write:Opt,read:kpt};function Opt(e){var o={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Apt(e),edges:Fpt(e)};return bc.isUndefined(e.graph())||(o.value=bc.clone(e.graph())),o}function Apt(e){return bc.map(e.nodes(),function(o){var t=e.node(o),n=e.parent(o),i={v:o};return bc.isUndefined(t)||(i.value=t),bc.isUndefined(n)||(i.parent=n),i})}function Fpt(e){return bc.map(e.edges(),function(o){var t=e.edge(o),n={v:o.v,w:o.w};return bc.isUndefined(o.name)||(n.name=o.name),bc.isUndefined(t)||(n.value=t),n})}function kpt(e){var o=new Ipt(e.options).setGraph(e.value);return bc.each(e.nodes,function(t){o.setNode(t.v,t.value),t.parent&&o.setParent(t.v,t.parent)}),bc.each(e.edges,function(t){o.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),o}});var bU=pt((fwn,xU)=>{var Zb=Vl();xU.exports=Bpt;function Bpt(e){var o={},t=[],n;function i(s){Zb.has(o,s)||(o[s]=!0,n.push(s),Zb.each(e.successors(s),i),Zb.each(e.predecessors(s),i))}return Zb.each(e.nodes(),function(s){n=[],i(s),n.length&&t.push(n)}),t}});var OE=pt((hwn,SU)=>{var yU=Vl();SU.exports=hs;function hs(){this._arr=[],this._keyIndices={}}hs.prototype.size=function(){return this._arr.length};hs.prototype.keys=function(){return this._arr.map(function(e){return e.key})};hs.prototype.has=function(e){return yU.has(this._keyIndices,e)};hs.prototype.priority=function(e){var o=this._keyIndices[e];if(o!==void 0)return this._arr[o].priority};hs.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};hs.prototype.add=function(e,o){var t=this._keyIndices;if(e=String(e),!yU.has(t,e)){var n=this._arr,i=n.length;return t[e]=i,n.push({key:e,priority:o}),this._decrease(i),!0}return!1};hs.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};hs.prototype.decrease=function(e,o){var t=this._keyIndices[e];if(o>this._arr[t].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[t].priority+" New: "+o);this._arr[t].priority=o,this._decrease(t)};hs.prototype._heapify=function(e){var o=this._arr,t=2*e,n=t+1,i=e;t>1,!(o[n].priority{var Rpt=Vl(),Npt=OE();wU.exports=Vpt;var Lpt=Rpt.constant(1);function Vpt(e,o,t,n){return qpt(e,String(o),t||Lpt,n||function(i){return e.outEdges(i)})}function qpt(e,o,t,n){var i={},s=new Npt,d,u,f=function(_){var C=_.v!==d?_.v:_.w,x=i[C],y=t(_),P=u.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+y);P0&&(d=s.removeMin(),u=i[d],u.distance!==Number.POSITIVE_INFINITY);)n(d).forEach(f);return i}});var TU=pt((_wn,PU)=>{var zpt=AE(),Hpt=Vl();PU.exports=Gpt;function Gpt(e,o,t){return Hpt.transform(e.nodes(),function(n,i){n[i]=zpt(e,i,o,t)},{})}});var FE=pt((Cwn,DU)=>{var MU=Vl();DU.exports=jpt;function jpt(e){var o=0,t=[],n={},i=[];function s(d){var u=n[d]={onStack:!0,lowlink:o,index:o++};if(t.push(d),e.successors(d).forEach(function(C){MU.has(n,C)?n[C].onStack&&(u.lowlink=Math.min(u.lowlink,n[C].index)):(s(C),u.lowlink=Math.min(u.lowlink,n[C].lowlink))}),u.lowlink===u.index){var f=[],_;do _=t.pop(),n[_].onStack=!1,f.push(_);while(d!==_);i.push(f)}}return e.nodes().forEach(function(d){MU.has(n,d)||s(d)}),i}});var IU=pt((vwn,EU)=>{var $pt=Vl(),Upt=FE();EU.exports=Wpt;function Wpt(e){return $pt.filter(Upt(e),function(o){return o.length>1||o.length===1&&e.hasEdge(o[0],o[0])})}});var AU=pt((xwn,OU)=>{var Qpt=Vl();OU.exports=Jpt;var Ypt=Qpt.constant(1);function Jpt(e,o,t){return Kpt(e,o||Ypt,t||function(n){return e.outEdges(n)})}function Kpt(e,o,t){var n={},i=e.nodes();return i.forEach(function(s){n[s]={},n[s][s]={distance:0},i.forEach(function(d){s!==d&&(n[s][d]={distance:Number.POSITIVE_INFINITY})}),t(s).forEach(function(d){var u=d.v===s?d.w:d.v,f=o(d);n[s][u]={distance:f,predecessor:s}})}),i.forEach(function(s){var d=n[s];i.forEach(function(u){var f=n[u];i.forEach(function(_){var C=f[s],x=d[_],y=f[_],P=C.distance+x.distance;P{var Q1=Vl();kU.exports=FU;FU.CycleException=ey;function FU(e){var o={},t={},n=[];function i(s){if(Q1.has(t,s))throw new ey;Q1.has(o,s)||(t[s]=!0,o[s]=!0,Q1.each(e.predecessors(s),i),delete t[s],n.push(s))}if(Q1.each(e.sinks(),i),Q1.size(o)!==e.nodeCount())throw new ey;return n}function ey(){}ey.prototype=new Error});var NU=pt((ywn,RU)=>{var BU=kE();RU.exports=Xpt;function Xpt(e){try{BU(e)}catch(o){if(o instanceof BU.CycleException)return!1;throw o}return!0}});var BE=pt((Swn,VU)=>{var ty=Vl();VU.exports=Zpt;function Zpt(e,o,t){ty.isArray(o)||(o=[o]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return ty.each(o,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);LU(e,d,t==="post",s,n,i)}),i}function LU(e,o,t,n,i,s){ty.has(n,o)||(n[o]=!0,t||s.push(o),ty.each(i(o),function(d){LU(e,d,t,n,i,s)}),t&&s.push(o))}});var zU=pt((wwn,qU)=>{var emt=BE();qU.exports=tmt;function tmt(e,o){return emt(e,o,"post")}});var GU=pt((Pwn,HU)=>{var imt=BE();HU.exports=nmt;function nmt(e,o){return imt(e,o,"pre")}});var UU=pt((Twn,$U)=>{var jU=Vl(),omt=Xb(),amt=OE();$U.exports=rmt;function rmt(e,o){var t=new omt,n={},i=new amt,s;function d(f){var _=f.v===s?f.w:f.v,C=i.priority(_);if(C!==void 0){var x=o(f);x0;){if(s=i.removeMin(),jU.has(n,s))t.setEdge(s,n[s]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(s).forEach(d)}return t}});var QU=pt((Mwn,WU)=>{WU.exports={components:bU(),dijkstra:AE(),dijkstraAll:TU(),findCycles:IU(),floydWarshall:AU(),isAcyclic:NU(),postorder:zU(),preorder:GU(),prim:UU(),tarjan:FE(),topsort:kE()}});var KU=pt((Dwn,JU)=>{var YU=_U();JU.exports={Graph:YU.Graph,json:vU(),alg:QU(),version:YU.version}});var gs=pt((Ewn,XU)=>{var iy;if(typeof Ds=="function")try{iy=KU()}catch{}iy||(iy=window.graphlib);XU.exports=iy});var eW=pt((Own,ZU)=>{var lmt=ZD(),smt=1,cmt=4;function pmt(e){return lmt(e,smt|cmt)}ZU.exports=pmt});var Y1=pt((Awn,tW)=>{var mmt=Vd(),dmt=vc(),umt=B1(),fmt=Ll();function hmt(e,o,t){if(!fmt(t))return!1;var n=typeof o;return(n=="number"?dmt(t)&&umt(o,t.length):n=="string"&&o in t)?mmt(t[o],e):!1}tW.exports=hmt});var oW=pt((Fwn,nW)=>{var gmt=U1(),_mt=Vd(),Cmt=Y1(),vmt=em(),iW=Object.prototype,xmt=iW.hasOwnProperty,bmt=gmt(function(e,o){e=Object(e);var t=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&Cmt(o[0],o[1],i)&&(n=1);++t{var ymt=xc(),Smt=vc(),wmt=Zc();function Pmt(e){return function(o,t,n){var i=Object(o);if(!Smt(o)){var s=ymt(t,3);o=wmt(o),t=function(u){return s(i[u],u,i)}}var d=e(o,t,n);return d>-1?i[s?o[d]:d]:void 0}}aW.exports=Pmt});var sW=pt((Bwn,lW)=>{var Tmt=/\s/;function Mmt(e){for(var o=e.length;o--&&Tmt.test(e.charAt(o)););return o}lW.exports=Mmt});var pW=pt((Rwn,cW)=>{var Dmt=sW(),Emt=/^\s+/;function Imt(e){return e&&e.slice(0,Dmt(e)+1).replace(Emt,"")}cW.exports=Imt});var fW=pt((Nwn,uW)=>{var Omt=pW(),mW=Ll(),Amt=jd(),dW=NaN,Fmt=/^[-+]0x[0-9a-f]+$/i,kmt=/^0b[01]+$/i,Bmt=/^0o[0-7]+$/i,Rmt=parseInt;function Nmt(e){if(typeof e=="number")return e;if(Amt(e))return dW;if(mW(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=mW(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=Omt(e);var t=kmt.test(e);return t||Bmt.test(e)?Rmt(e.slice(2),t?2:8):Fmt.test(e)?dW:+e}uW.exports=Nmt});var RE=pt((Lwn,gW)=>{var Lmt=fW(),hW=1/0,Vmt=17976931348623157e292;function qmt(e){if(!e)return e===0?e:0;if(e=Lmt(e),e===hW||e===-hW){var o=e<0?-1:1;return o*Vmt}return e===e?e:0}gW.exports=qmt});var CW=pt((Vwn,_W)=>{var zmt=RE();function Hmt(e){var o=zmt(e),t=o%1;return o===o?t?o-t:o:0}_W.exports=Hmt});var xW=pt((qwn,vW)=>{var Gmt=TE(),jmt=xc(),$mt=CW(),Umt=Math.max;function Wmt(e,o,t){var n=e==null?0:e.length;if(!n)return-1;var i=t==null?0:$mt(t);return i<0&&(i=Umt(n+i,0)),Gmt(e,jmt(o,3),i)}vW.exports=Wmt});var yW=pt((zwn,bW)=>{var Qmt=rW(),Ymt=xW(),Jmt=Qmt(Ymt);bW.exports=Jmt});var NE=pt((Hwn,SW)=>{var Kmt=Jb();function Xmt(e){var o=e==null?0:e.length;return o?Kmt(e,1):[]}SW.exports=Xmt});var PW=pt((Gwn,wW)=>{var Zmt=jb(),edt=eE(),tdt=em();function idt(e,o){return e==null?e:Zmt(e,edt(o),tdt)}wW.exports=idt});var MW=pt((jwn,TW)=>{function ndt(e){var o=e==null?0:e.length;return o?e[o-1]:void 0}TW.exports=ndt});var EW=pt(($wn,DW)=>{var odt=A1(),adt=$b(),rdt=xc();function ldt(e,o){var t={};return o=rdt(o,3),adt(e,function(n,i,s){odt(t,i,o(n,i,s))}),t}DW.exports=ldt});var ny=pt((Uwn,IW)=>{var sdt=jd();function cdt(e,o,t){for(var n=-1,i=e.length;++n{function pdt(e,o){return e>o}OW.exports=pdt});var kW=pt((Qwn,FW)=>{var mdt=ny(),ddt=AW(),udt=tm();function fdt(e){return e&&e.length?mdt(e,udt,ddt):void 0}FW.exports=fdt});var LE=pt((Ywn,BW)=>{var hdt=A1(),gdt=Vd();function _dt(e,o,t){(t!==void 0&&!gdt(e[o],t)||t===void 0&&!(o in e))&&hdt(e,o,t)}BW.exports=_dt});var LW=pt((Jwn,NW)=>{var Cdt=Xp(),vdt=z1(),xdt=zs(),bdt="[object Object]",ydt=Function.prototype,Sdt=Object.prototype,RW=ydt.toString,wdt=Sdt.hasOwnProperty,Pdt=RW.call(Object);function Tdt(e){if(!xdt(e)||Cdt(e)!=bdt)return!1;var o=vdt(e);if(o===null)return!0;var t=wdt.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&RW.call(t)==Pdt}NW.exports=Tdt});var VE=pt((Kwn,VW)=>{function Mdt(e,o){if(!(o==="constructor"&&typeof e[o]=="function")&&o!="__proto__")return e[o]}VW.exports=Mdt});var zW=pt((Xwn,qW)=>{var Ddt=fu(),Edt=em();function Idt(e){return Ddt(e,Edt(e))}qW.exports=Idt});var WW=pt((Zwn,UW)=>{var HW=LE(),Odt=RD(),Adt=JD(),Fdt=ND(),kdt=XD(),GW=hu(),jW=Wa(),Bdt=DE(),Rdt=zd(),Ndt=pu(),Ldt=Ll(),Vdt=LW(),qdt=Cu(),$W=VE(),zdt=zW();function Hdt(e,o,t,n,i,s,d){var u=$W(e,t),f=$W(o,t),_=d.get(f);if(_){HW(e,t,_);return}var C=s?s(u,f,t+"",e,o,d):void 0,x=C===void 0;if(x){var y=jW(f),P=!y&&Rdt(f),S=!y&&!P&&qdt(f);C=f,y||P||S?jW(u)?C=u:Bdt(u)?C=Fdt(u):P?(x=!1,C=Odt(f,!0)):S?(x=!1,C=Adt(f,!0)):C=[]:Vdt(f)||GW(f)?(C=u,GW(u)?C=zdt(u):(!Ldt(u)||Ndt(u))&&(C=kdt(f))):x=!1}x&&(d.set(f,C),i(C,f,n,s,d),d.delete(f)),HW(e,t,C)}UW.exports=Hdt});var JW=pt((ePn,YW)=>{var Gdt=O1(),jdt=LE(),$dt=jb(),Udt=WW(),Wdt=Ll(),Qdt=em(),Ydt=VE();function QW(e,o,t,n,i){e!==o&&$dt(o,function(s,d){if(i||(i=new Gdt),Wdt(s))Udt(e,o,d,t,QW,n,i);else{var u=n?n(Ydt(e,d),s,d+"",e,o,i):void 0;u===void 0&&(u=s),jdt(e,d,u)}},Qdt)}YW.exports=QW});var XW=pt((tPn,KW)=>{var Jdt=U1(),Kdt=Y1();function Xdt(e){return Jdt(function(o,t){var n=-1,i=t.length,s=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,d&&Kdt(t[0],t[1],d)&&(s=i<3?void 0:s,i=1),o=Object(o);++n{var Zdt=JW(),e0t=XW(),t0t=e0t(function(e,o,t){Zdt(e,o,t)});ZW.exports=t0t});var qE=pt((nPn,tQ)=>{function i0t(e,o){return e{var n0t=ny(),o0t=qE(),a0t=tm();function r0t(e){return e&&e.length?n0t(e,a0t,o0t):void 0}iQ.exports=r0t});var aQ=pt((aPn,oQ)=>{var l0t=ny(),s0t=xc(),c0t=qE();function p0t(e,o){return e&&e.length?l0t(e,s0t(o,2),c0t):void 0}oQ.exports=p0t});var lQ=pt((rPn,rQ)=>{var m0t=fs(),d0t=function(){return m0t.Date.now()};rQ.exports=d0t});var pQ=pt((lPn,cQ)=>{var u0t=F1(),f0t=j1(),h0t=B1(),sQ=Ll(),g0t=bu();function _0t(e,o,t,n){if(!sQ(e))return e;o=f0t(o,e);for(var i=-1,s=o.length,d=s-1,u=e;u!=null&&++i{var C0t=$1(),v0t=pQ(),x0t=j1();function b0t(e,o,t){for(var n=-1,i=o.length,s={};++n{var y0t=dQ(),S0t=fE();function w0t(e,o){return y0t(e,o,function(t,n){return S0t(e,n)})}uQ.exports=w0t});var gQ=pt((pPn,hQ)=>{var P0t=NE(),T0t=wE(),M0t=PE();function D0t(e){return M0t(T0t(e,void 0,P0t),e+"")}hQ.exports=D0t});var CQ=pt((mPn,_Q)=>{var E0t=fQ(),I0t=gQ(),O0t=I0t(function(e,o){return e==null?{}:E0t(e,o)});_Q.exports=O0t});var xQ=pt((dPn,vQ)=>{var A0t=Math.ceil,F0t=Math.max;function k0t(e,o,t,n){for(var i=-1,s=F0t(A0t((o-e)/(t||1)),0),d=Array(s);s--;)d[n?s:++i]=e,e+=t;return d}vQ.exports=k0t});var yQ=pt((uPn,bQ)=>{var B0t=xQ(),R0t=Y1(),zE=RE();function N0t(e){return function(o,t,n){return n&&typeof n!="number"&&R0t(o,t,n)&&(t=n=void 0),o=zE(o),t===void 0?(t=o,o=0):t=zE(t),n=n===void 0?o{var L0t=yQ(),V0t=L0t();SQ.exports=V0t});var TQ=pt((hPn,PQ)=>{function q0t(e,o){var t=e.length;for(e.sort(o);t--;)e[t]=e[t].value;return e}PQ.exports=q0t});var EQ=pt((gPn,DQ)=>{var MQ=jd();function z0t(e,o){if(e!==o){var t=e!==void 0,n=e===null,i=e===e,s=MQ(e),d=o!==void 0,u=o===null,f=o===o,_=MQ(o);if(!u&&!_&&!s&&e>o||s&&d&&f&&!u&&!_||n&&d&&f||!t&&f||!i)return 1;if(!n&&!s&&!_&&e{var H0t=EQ();function G0t(e,o,t){for(var n=-1,i=e.criteria,s=o.criteria,d=i.length,u=t.length;++n=u)return f;var _=t[n];return f*(_=="desc"?-1:1)}}return e.index-o.index}IQ.exports=G0t});var FQ=pt((CPn,AQ)=>{var HE=G1(),j0t=$1(),$0t=xc(),U0t=vE(),W0t=TQ(),Q0t=R1(),Y0t=OQ(),J0t=tm(),K0t=Wa();function X0t(e,o,t){o.length?o=HE(o,function(s){return K0t(s)?function(d){return j0t(d,s.length===1?s[0]:s)}:s}):o=[J0t];var n=-1;o=HE(o,Q0t($0t));var i=U0t(e,function(s,d,u){var f=HE(o,function(_){return _(s)});return{criteria:f,index:++n,value:s}});return W0t(i,function(s,d){return Y0t(s,d,t)})}AQ.exports=X0t});var RQ=pt((vPn,BQ)=>{var Z0t=Jb(),eut=FQ(),tut=U1(),kQ=Y1(),iut=tut(function(e,o){if(e==null)return[];var t=o.length;return t>1&&kQ(e,o[0],o[1])?o=[]:t>2&&kQ(o[0],o[1],o[2])&&(o=[o[0]]),eut(e,Z0t(o,1),[])});BQ.exports=iut});var LQ=pt((xPn,NQ)=>{var nut=dE(),out=0;function aut(e){var o=++out;return nut(e)+o}NQ.exports=aut});var qQ=pt((bPn,VQ)=>{function rut(e,o,t){for(var n=-1,i=e.length,s=o.length,d={};++n{var lut=F1(),sut=qQ();function cut(e,o){return sut(e||[],o||[],lut)}zQ.exports=cut});var Sa=pt((SPn,GQ)=>{var oy;if(typeof Ds=="function")try{oy={cloneDeep:eW(),constant:Gb(),defaults:oW(),each:iE(),filter:gE(),find:yW(),flatten:NE(),forEach:tE(),forIn:PW(),has:_E(),isUndefined:CE(),last:MW(),map:xE(),mapValues:EW(),max:kW(),merge:eQ(),min:nQ(),minBy:aQ(),now:lQ(),pick:CQ(),range:wQ(),reduce:bE(),sortBy:RQ(),uniqueId:LQ(),values:EE(),zipObject:HQ()}}catch{}oy||(oy=window._);GQ.exports=oy});var UQ=pt((PPn,$Q)=>{$Q.exports=ay;function ay(){var e={};e._next=e._prev=e,this._sentinel=e}ay.prototype.dequeue=function(){var e=this._sentinel,o=e._prev;if(o!==e)return jQ(o),o};ay.prototype.enqueue=function(e){var o=this._sentinel;e._prev&&e._next&&jQ(e),e._next=o._next,o._next._prev=e,o._next=e,e._prev=o};ay.prototype.toString=function(){for(var e=[],o=this._sentinel,t=o._prev;t!==o;)e.push(JSON.stringify(t,put)),t=t._prev;return"["+e.join(", ")+"]"};function jQ(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function put(e,o){if(e!=="_next"&&e!=="_prev")return o}});var QQ=pt((TPn,WQ)=>{var ep=Sa(),mut=gs().Graph,dut=UQ();WQ.exports=fut;var uut=ep.constant(1);function fut(e,o){if(e.nodeCount()<=1)return[];var t=gut(e,o||uut),n=hut(t.graph,t.buckets,t.zeroIdx);return ep.flatten(ep.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function hut(e,o,t){for(var n=[],i=o[o.length-1],s=o[0],d;e.nodeCount();){for(;d=s.dequeue();)GE(e,o,t,d);for(;d=i.dequeue();)GE(e,o,t,d);if(e.nodeCount()){for(var u=o.length-2;u>0;--u)if(d=o[u].dequeue(),d){n=n.concat(GE(e,o,t,d,!0));break}}}return n}function GE(e,o,t,n,i){var s=i?[]:void 0;return ep.forEach(e.inEdges(n.v),function(d){var u=e.edge(d),f=e.node(d.v);i&&s.push({v:d.v,w:d.w}),f.out-=u,jE(o,t,f)}),ep.forEach(e.outEdges(n.v),function(d){var u=e.edge(d),f=d.w,_=e.node(f);_.in-=u,jE(o,t,_)}),e.removeNode(n.v),s}function gut(e,o){var t=new mut,n=0,i=0;ep.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),ep.forEach(e.edges(),function(u){var f=t.edge(u.v,u.w)||0,_=o(u),C=f+_;t.setEdge(u.v,u.w,C),i=Math.max(i,t.node(u.v).out+=_),n=Math.max(n,t.node(u.w).in+=_)});var s=ep.range(i+n+3).map(function(){return new dut}),d=n+1;return ep.forEach(t.nodes(),function(u){jE(s,d,t.node(u))}),{graph:t,buckets:s,zeroIdx:d}}function jE(e,o,t){t.out?t.in?e[t.out-t.in+o].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}});var JQ=pt((MPn,YQ)=>{"use strict";var Ud=Sa(),_ut=QQ();YQ.exports={run:Cut,undo:xut};function Cut(e){var o=e.graph().acyclicer==="greedy"?_ut(e,t(e)):vut(e);Ud.forEach(o,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,Ud.uniqueId("rev"))});function t(n){return function(i){return n.edge(i).weight}}}function vut(e){var o=[],t={},n={};function i(s){Ud.has(n,s)||(n[s]=!0,t[s]=!0,Ud.forEach(e.outEdges(s),function(d){Ud.has(t,d.w)?o.push(d):i(d.w)}),delete t[s])}return Ud.forEach(e.nodes(),i),o}function xut(e){Ud.forEach(e.edges(),function(o){var t=e.edge(o);if(t.reversed){e.removeEdge(o);var n=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(o.w,o.v,t,n)}})}});var rl=pt((DPn,eY)=>{"use strict";var Ho=Sa(),KQ=gs().Graph;eY.exports={addDummyNode:XQ,simplify:but,asNonCompoundGraph:yut,successorWeights:Sut,predecessorWeights:wut,intersectRect:Put,buildLayerMatrix:Tut,normalizeRanks:Mut,removeEmptyRanks:Dut,addBorderNode:Eut,maxRank:ZQ,partition:Iut,time:Out,notime:Aut};function XQ(e,o,t,n){var i;do i=Ho.uniqueId(n);while(e.hasNode(i));return t.dummy=o,e.setNode(i,t),i}function but(e){var o=new KQ().setGraph(e.graph());return Ho.forEach(e.nodes(),function(t){o.setNode(t,e.node(t))}),Ho.forEach(e.edges(),function(t){var n=o.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);o.setEdge(t.v,t.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),o}function yut(e){var o=new KQ({multigraph:e.isMultigraph()}).setGraph(e.graph());return Ho.forEach(e.nodes(),function(t){e.children(t).length||o.setNode(t,e.node(t))}),Ho.forEach(e.edges(),function(t){o.setEdge(t,e.edge(t))}),o}function Sut(e){var o=Ho.map(e.nodes(),function(t){var n={};return Ho.forEach(e.outEdges(t),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Ho.zipObject(e.nodes(),o)}function wut(e){var o=Ho.map(e.nodes(),function(t){var n={};return Ho.forEach(e.inEdges(t),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Ho.zipObject(e.nodes(),o)}function Put(e,o){var t=e.x,n=e.y,i=o.x-t,s=o.y-n,d=e.width/2,u=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var f,_;return Math.abs(s)*d>Math.abs(i)*u?(s<0&&(u=-u),f=u*i/s,_=u):(i<0&&(d=-d),f=d,_=d*s/i),{x:t+f,y:n+_}}function Tut(e){var o=Ho.map(Ho.range(ZQ(e)+1),function(){return[]});return Ho.forEach(e.nodes(),function(t){var n=e.node(t),i=n.rank;Ho.isUndefined(i)||(o[i][n.order]=t)}),o}function Mut(e){var o=Ho.min(Ho.map(e.nodes(),function(t){return e.node(t).rank}));Ho.forEach(e.nodes(),function(t){var n=e.node(t);Ho.has(n,"rank")&&(n.rank-=o)})}function Dut(e){var o=Ho.min(Ho.map(e.nodes(),function(s){return e.node(s).rank})),t=[];Ho.forEach(e.nodes(),function(s){var d=e.node(s).rank-o;t[d]||(t[d]=[]),t[d].push(s)});var n=0,i=e.graph().nodeRankFactor;Ho.forEach(t,function(s,d){Ho.isUndefined(s)&&d%i!==0?--n:n&&Ho.forEach(s,function(u){e.node(u).rank+=n})})}function Eut(e,o,t,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=t,i.order=n),XQ(e,"border",i,o)}function ZQ(e){return Ho.max(Ho.map(e.nodes(),function(o){var t=e.node(o).rank;if(!Ho.isUndefined(t))return t}))}function Iut(e,o){var t={lhs:[],rhs:[]};return Ho.forEach(e,function(n){o(n)?t.lhs.push(n):t.rhs.push(n)}),t}function Out(e,o){var t=Ho.now();try{return o()}finally{console.log(e+" time: "+(Ho.now()-t)+"ms")}}function Aut(e,o){return o()}});var nY=pt((EPn,iY)=>{"use strict";var tY=Sa(),Fut=rl();iY.exports={run:kut,undo:Rut};function kut(e){e.graph().dummyChains=[],tY.forEach(e.edges(),function(o){But(e,o)})}function But(e,o){var t=o.v,n=e.node(t).rank,i=o.w,s=e.node(i).rank,d=o.name,u=e.edge(o),f=u.labelRank;if(s!==n+1){e.removeEdge(o);var _,C,x;for(x=0,++n;n{"use strict";var ry=Sa();oY.exports={longestPath:Nut,slack:Lut};function Nut(e){var o={};function t(n){var i=e.node(n);if(ry.has(o,n))return i.rank;o[n]=!0;var s=ry.min(ry.map(e.outEdges(n),function(d){return t(d.w)-e.edge(d).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),i.rank=s}ry.forEach(e.sources(),t)}function Lut(e,o){return e.node(o.w).rank-e.node(o.v).rank-e.edge(o).minlen}});var $E=pt((OPn,aY)=>{"use strict";var ly=Sa(),Vut=gs().Graph,sy=J1().slack;aY.exports=qut;function qut(e){var o=new Vut({directed:!1}),t=e.nodes()[0],n=e.nodeCount();o.setNode(t,{});for(var i,s;zut(o,e){"use strict";var tp=Sa(),jut=$E(),$ut=J1().slack,Uut=J1().longestPath,Wut=gs().alg.preorder,Qut=gs().alg.postorder,Yut=rl().simplify;dY.exports=Wd;Wd.initLowLimValues=WE;Wd.initCutValues=UE;Wd.calcCutValue=lY;Wd.leaveEdge=cY;Wd.enterEdge=pY;Wd.exchangeEdges=mY;function Wd(e){e=Yut(e),Uut(e);var o=jut(e);WE(o),UE(o,e);for(var t,n;t=cY(o);)n=pY(o,e,t),mY(o,e,t,n)}function UE(e,o){var t=Qut(e,e.nodes());t=t.slice(0,t.length-1),tp.forEach(t,function(n){Jut(e,o,n)})}function Jut(e,o,t){var n=e.node(t),i=n.parent;e.edge(t,i).cutvalue=lY(e,o,t)}function lY(e,o,t){var n=e.node(t),i=n.parent,s=!0,d=o.edge(t,i),u=0;return d||(s=!1,d=o.edge(i,t)),u=d.weight,tp.forEach(o.nodeEdges(t),function(f){var _=f.v===t,C=_?f.w:f.v;if(C!==i){var x=_===s,y=o.edge(f).weight;if(u+=x?y:-y,Xut(e,t,C)){var P=e.edge(t,C).cutvalue;u+=x?-P:P}}}),u}function WE(e,o){arguments.length<2&&(o=e.nodes()[0]),sY(e,{},1,o)}function sY(e,o,t,n,i){var s=t,d=e.node(n);return o[n]=!0,tp.forEach(e.neighbors(n),function(u){tp.has(o,u)||(t=sY(e,o,t,u,n))}),d.low=s,d.lim=t++,i?d.parent=i:delete d.parent,t}function cY(e){return tp.find(e.edges(),function(o){return e.edge(o).cutvalue<0})}function pY(e,o,t){var n=t.v,i=t.w;o.hasEdge(n,i)||(n=t.w,i=t.v);var s=e.node(n),d=e.node(i),u=s,f=!1;s.lim>d.lim&&(u=d,f=!0);var _=tp.filter(o.edges(),function(C){return f===rY(e,e.node(C.v),u)&&f!==rY(e,e.node(C.w),u)});return tp.minBy(_,function(C){return $ut(o,C)})}function mY(e,o,t,n){var i=t.v,s=t.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),WE(e),UE(e,o),Kut(e,o)}function Kut(e,o){var t=tp.find(e.nodes(),function(i){return!o.node(i).parent}),n=Wut(e,t);n=n.slice(1),tp.forEach(n,function(i){var s=e.node(i).parent,d=o.edge(i,s),u=!1;d||(d=o.edge(s,i),u=!0),o.node(i).rank=o.node(s).rank+(u?d.minlen:-d.minlen)})}function Xut(e,o,t){return e.hasEdge(o,t)}function rY(e,o,t){return t.low<=o.lim&&o.lim<=t.lim}});var _Y=pt((FPn,gY)=>{"use strict";var Zut=J1(),hY=Zut.longestPath,eft=$E(),tft=uY();gY.exports=ift;function ift(e){switch(e.graph().ranker){case"network-simplex":fY(e);break;case"tight-tree":oft(e);break;case"longest-path":nft(e);break;default:fY(e)}}var nft=hY;function oft(e){hY(e),eft(e)}function fY(e){tft(e)}});var vY=pt((kPn,CY)=>{var QE=Sa();CY.exports=aft;function aft(e){var o=lft(e);QE.forEach(e.graph().dummyChains,function(t){for(var n=e.node(t),i=n.edgeObj,s=rft(e,o,i.v,i.w),d=s.path,u=s.lca,f=0,_=d[f],C=!0;t!==i.w;){if(n=e.node(t),C){for(;(_=d[f])!==u&&e.node(_).maxRankd||u>o[f].lim));for(_=f,f=n;(f=e.parent(f))!==_;)s.push(f);return{path:i.concat(s.reverse()),lca:_}}function lft(e){var o={},t=0;function n(i){var s=t;QE.forEach(e.children(i),n),o[i]={low:s,lim:t++}}return QE.forEach(e.children(),n),o}});var yY=pt((BPn,bY)=>{var ip=Sa(),YE=rl();bY.exports={run:sft,cleanup:mft};function sft(e){var o=YE.addDummyNode(e,"root",{},"_root"),t=cft(e),n=ip.max(ip.values(t))-1,i=2*n+1;e.graph().nestingRoot=o,ip.forEach(e.edges(),function(d){e.edge(d).minlen*=i});var s=pft(e)+1;ip.forEach(e.children(),function(d){xY(e,o,i,s,n,t,d)}),e.graph().nodeRankFactor=i}function xY(e,o,t,n,i,s,d){var u=e.children(d);if(!u.length){d!==o&&e.setEdge(o,d,{weight:0,minlen:t});return}var f=YE.addBorderNode(e,"_bt"),_=YE.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(f,d),C.borderTop=f,e.setParent(_,d),C.borderBottom=_,ip.forEach(u,function(x){xY(e,o,t,n,i,s,x);var y=e.node(x),P=y.borderTop?y.borderTop:x,S=y.borderBottom?y.borderBottom:x,M=y.borderTop?n:2*n,D=P!==S?1:i-s[d]+1;e.setEdge(f,P,{weight:M,minlen:D,nestingEdge:!0}),e.setEdge(S,_,{weight:M,minlen:D,nestingEdge:!0})}),e.parent(d)||e.setEdge(o,f,{weight:0,minlen:i+s[d]})}function cft(e){var o={};function t(n,i){var s=e.children(n);s&&s.length&&ip.forEach(s,function(d){t(d,i+1)}),o[n]=i}return ip.forEach(e.children(),function(n){t(n,1)}),o}function pft(e){return ip.reduce(e.edges(),function(o,t){return o+e.edge(t).weight},0)}function mft(e){var o=e.graph();e.removeNode(o.nestingRoot),delete o.nestingRoot,ip.forEach(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}});var PY=pt((RPn,wY)=>{var JE=Sa(),dft=rl();wY.exports=uft;function uft(e){function o(t){var n=e.children(t),i=e.node(t);if(n.length&&JE.forEach(n,o),JE.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,d=i.maxRank+1;s{"use strict";var yc=Sa();DY.exports={adjust:fft,undo:hft};function fft(e){var o=e.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&MY(e)}function hft(e){var o=e.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&gft(e),(o==="lr"||o==="rl")&&(_ft(e),MY(e))}function MY(e){yc.forEach(e.nodes(),function(o){TY(e.node(o))}),yc.forEach(e.edges(),function(o){TY(e.edge(o))})}function TY(e){var o=e.width;e.width=e.height,e.height=o}function gft(e){yc.forEach(e.nodes(),function(o){KE(e.node(o))}),yc.forEach(e.edges(),function(o){var t=e.edge(o);yc.forEach(t.points,KE),yc.has(t,"y")&&KE(t)})}function KE(e){e.y=-e.y}function _ft(e){yc.forEach(e.nodes(),function(o){XE(e.node(o))}),yc.forEach(e.edges(),function(o){var t=e.edge(o);yc.forEach(t.points,XE),yc.has(t,"x")&&XE(t)})}function XE(e){var o=e.x;e.x=e.y,e.y=o}});var OY=pt((LPn,IY)=>{"use strict";var np=Sa();IY.exports=Cft;function Cft(e){var o={},t=np.filter(e.nodes(),function(u){return!e.children(u).length}),n=np.max(np.map(t,function(u){return e.node(u).rank})),i=np.map(np.range(n+1),function(){return[]});function s(u){if(!np.has(o,u)){o[u]=!0;var f=e.node(u);i[f.rank].push(u),np.forEach(e.successors(u),s)}}var d=np.sortBy(t,function(u){return e.node(u).rank});return np.forEach(d,s),i}});var FY=pt((VPn,AY)=>{"use strict";var im=Sa();AY.exports=vft;function vft(e,o){for(var t=0,n=1;n0;)C%2&&(x+=u[C+1]),C=C-1>>1,u[C]+=_.weight;f+=_.weight*x})),f}});var RY=pt((qPn,BY)=>{var kY=Sa();BY.exports=bft;function bft(e,o){return kY.map(o,function(t){var n=e.inEdges(t);if(n.length){var i=kY.reduce(n,function(s,d){var u=e.edge(d),f=e.node(d.v);return{sum:s.sum+u.weight*f.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:t}})}});var LY=pt((zPn,NY)=>{"use strict";var ql=Sa();NY.exports=yft;function yft(e,o){var t={};ql.forEach(e,function(i,s){var d=t[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};ql.isUndefined(i.barycenter)||(d.barycenter=i.barycenter,d.weight=i.weight)}),ql.forEach(o.edges(),function(i){var s=t[i.v],d=t[i.w];!ql.isUndefined(s)&&!ql.isUndefined(d)&&(d.indegree++,s.out.push(t[i.w]))});var n=ql.filter(t,function(i){return!i.indegree});return Sft(n)}function Sft(e){var o=[];function t(s){return function(d){d.merged||(ql.isUndefined(d.barycenter)||ql.isUndefined(s.barycenter)||d.barycenter>=s.barycenter)&&wft(s,d)}}function n(s){return function(d){d.in.push(s),--d.indegree===0&&e.push(d)}}for(;e.length;){var i=e.pop();o.push(i),ql.forEach(i.in.reverse(),t(i)),ql.forEach(i.out,n(i))}return ql.map(ql.filter(o,function(s){return!s.merged}),function(s){return ql.pick(s,["vs","i","barycenter","weight"])})}function wft(e,o){var t=0,n=0;e.weight&&(t+=e.barycenter*e.weight,n+=e.weight),o.weight&&(t+=o.barycenter*o.weight,n+=o.weight),e.vs=o.vs.concat(e.vs),e.barycenter=t/n,e.weight=n,e.i=Math.min(o.i,e.i),o.merged=!0}});var zY=pt((HPn,qY)=>{var K1=Sa(),Pft=rl();qY.exports=Tft;function Tft(e,o){var t=Pft.partition(e,function(C){return K1.has(C,"barycenter")}),n=t.lhs,i=K1.sortBy(t.rhs,function(C){return-C.i}),s=[],d=0,u=0,f=0;n.sort(Mft(!!o)),f=VY(s,i,f),K1.forEach(n,function(C){f+=C.vs.length,s.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,f=VY(s,i,f)});var _={vs:K1.flatten(s,!0)};return u&&(_.barycenter=d/u,_.weight=u),_}function VY(e,o,t){for(var n;o.length&&(n=K1.last(o)).i<=t;)o.pop(),e.push(n.vs),t++;return t}function Mft(e){return function(o,t){return o.barycentert.barycenter?1:e?t.i-o.i:o.i-t.i}}});var jY=pt((GPn,GY)=>{var nm=Sa(),Dft=RY(),Eft=LY(),Ift=zY();GY.exports=HY;function HY(e,o,t,n){var i=e.children(o),s=e.node(o),d=s?s.borderLeft:void 0,u=s?s.borderRight:void 0,f={};d&&(i=nm.filter(i,function(S){return S!==d&&S!==u}));var _=Dft(e,i);nm.forEach(_,function(S){if(e.children(S.v).length){var M=HY(e,S.v,t,n);f[S.v]=M,nm.has(M,"barycenter")&&Aft(S,M)}});var C=Eft(_,t);Oft(C,f);var x=Ift(C,n);if(d&&(x.vs=nm.flatten([d,x.vs,u],!0),e.predecessors(d).length)){var y=e.node(e.predecessors(d)[0]),P=e.node(e.predecessors(u)[0]);nm.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+y.order+P.order)/(x.weight+2),x.weight+=2}return x}function Oft(e,o){nm.forEach(e,function(t){t.vs=nm.flatten(t.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function Aft(e,o){nm.isUndefined(e.barycenter)?(e.barycenter=o.barycenter,e.weight=o.weight):(e.barycenter=(e.barycenter*e.weight+o.barycenter*o.weight)/(e.weight+o.weight),e.weight+=o.weight)}});var UY=pt((jPn,$Y)=>{var X1=Sa(),Fft=gs().Graph;$Y.exports=kft;function kft(e,o,t){var n=Bft(e),i=new Fft({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return X1.forEach(e.nodes(),function(s){var d=e.node(s),u=e.parent(s);(d.rank===o||d.minRank<=o&&o<=d.maxRank)&&(i.setNode(s),i.setParent(s,u||n),X1.forEach(e[t](s),function(f){var _=f.v===s?f.w:f.v,C=i.edge(_,s),x=X1.isUndefined(C)?0:C.weight;i.setEdge(_,s,{weight:e.edge(f).weight+x})}),X1.has(d,"minRank")&&i.setNode(s,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),i}function Bft(e){for(var o;e.hasNode(o=X1.uniqueId("_root")););return o}});var QY=pt(($Pn,WY)=>{var Rft=Sa();WY.exports=Nft;function Nft(e,o,t){var n={},i;Rft.forEach(t,function(s){for(var d=e.parent(s),u,f;d;){if(u=e.parent(d),u?(f=n[u],n[u]=d):(f=i,i=d),f&&f!==d){o.setEdge(f,d);return}d=u}})}});var ZY=pt((UPn,XY)=>{"use strict";var om=Sa(),Lft=OY(),Vft=FY(),qft=jY(),zft=UY(),Hft=QY(),Gft=gs().Graph,YY=rl();XY.exports=jft;function jft(e){var o=YY.maxRank(e),t=JY(e,om.range(1,o+1),"inEdges"),n=JY(e,om.range(o-1,-1,-1),"outEdges"),i=Lft(e);KY(e,i);for(var s=Number.POSITIVE_INFINITY,d,u=0,f=0;f<4;++u,++f){$ft(u%2?t:n,u%4>=2),i=YY.buildLayerMatrix(e);var _=Vft(e,i);_{"use strict";var io=Sa(),Uft=gs().Graph,Wft=rl();sJ.exports={positionX:Jft,findType1Conflicts:eJ,findType2Conflicts:tJ,addConflict:ZE,hasConflict:iJ,verticalAlignment:nJ,horizontalCompaction:oJ,alignCoordinates:rJ,findSmallestWidthAlignment:aJ,balance:lJ};function eJ(e,o){var t={};function n(i,s){var d=0,u=0,f=i.length,_=io.last(s);return io.forEach(s,function(C,x){var y=Qft(e,C),P=y?e.node(y).order:f;(y||C===_)&&(io.forEach(s.slice(u,x+1),function(S){io.forEach(e.predecessors(S),function(M){var D=e.node(M),k=D.order;(k_)&&ZE(t,y,C)})})}function i(s,d){var u=-1,f,_=0;return io.forEach(d,function(C,x){if(e.node(C).dummy==="border"){var y=e.predecessors(C);y.length&&(f=e.node(y[0]).order,n(d,_,x,u,f),_=x,u=f)}n(d,_,d.length,f,s.length)}),d}return io.reduce(o,i),t}function Qft(e,o){if(e.node(o).dummy)return io.find(e.predecessors(o),function(t){return e.node(t).dummy})}function ZE(e,o,t){if(o>t){var n=o;o=t,t=n}var i=e[o];i||(e[o]=i={}),i[t]=!0}function iJ(e,o,t){if(o>t){var n=o;o=t,t=n}return io.has(e[o],t)}function nJ(e,o,t,n){var i={},s={},d={};return io.forEach(o,function(u){io.forEach(u,function(f,_){i[f]=f,s[f]=f,d[f]=_})}),io.forEach(o,function(u){var f=-1;io.forEach(u,function(_){var C=n(_);if(C.length){C=io.sortBy(C,function(M){return d[M]});for(var x=(C.length-1)/2,y=Math.floor(x),P=Math.ceil(x);y<=P;++y){var S=C[y];s[_]===_&&f{"use strict";var Z1=Sa(),pJ=rl(),Zft=cJ().positionX;mJ.exports=e1t;function e1t(e){e=pJ.asNonCompoundGraph(e),t1t(e),Z1.forEach(Zft(e),function(o,t){e.node(t).x=o})}function t1t(e){var o=pJ.buildLayerMatrix(e),t=e.graph().ranksep,n=0;Z1.forEach(o,function(i){var s=Z1.max(Z1.map(i,function(d){return e.node(d).height}));Z1.forEach(i,function(d){e.node(d).y=n+s/2}),n+=s+t})}});var CJ=pt((YPn,_J)=>{"use strict";var fo=Sa(),uJ=JQ(),fJ=nY(),i1t=_Y(),n1t=rl().normalizeRanks,o1t=vY(),a1t=rl().removeEmptyRanks,hJ=yY(),r1t=PY(),gJ=EY(),l1t=ZY(),s1t=dJ(),am=rl(),c1t=gs().Graph;_J.exports=p1t;function p1t(e,o){var t=o&&o.debugTiming?am.time:am.notime;t("layout",function(){var n=t(" buildLayoutGraph",function(){return b1t(e)});t(" runLayout",function(){m1t(n,t)}),t(" updateInputGraph",function(){d1t(e,n)})})}function m1t(e,o){o(" makeSpaceForEdgeLabels",function(){y1t(e)}),o(" removeSelfEdges",function(){O1t(e)}),o(" acyclic",function(){uJ.run(e)}),o(" nestingGraph.run",function(){hJ.run(e)}),o(" rank",function(){i1t(am.asNonCompoundGraph(e))}),o(" injectEdgeLabelProxies",function(){S1t(e)}),o(" removeEmptyRanks",function(){a1t(e)}),o(" nestingGraph.cleanup",function(){hJ.cleanup(e)}),o(" normalizeRanks",function(){n1t(e)}),o(" assignRankMinMax",function(){w1t(e)}),o(" removeEdgeLabelProxies",function(){P1t(e)}),o(" normalize.run",function(){fJ.run(e)}),o(" parentDummyChains",function(){o1t(e)}),o(" addBorderSegments",function(){r1t(e)}),o(" order",function(){l1t(e)}),o(" insertSelfEdges",function(){A1t(e)}),o(" adjustCoordinateSystem",function(){gJ.adjust(e)}),o(" position",function(){s1t(e)}),o(" positionSelfEdges",function(){F1t(e)}),o(" removeBorderNodes",function(){I1t(e)}),o(" normalize.undo",function(){fJ.undo(e)}),o(" fixupEdgeLabelCoords",function(){D1t(e)}),o(" undoCoordinateSystem",function(){gJ.undo(e)}),o(" translateGraph",function(){T1t(e)}),o(" assignNodeIntersects",function(){M1t(e)}),o(" reversePoints",function(){E1t(e)}),o(" acyclic.undo",function(){uJ.undo(e)})}function d1t(e,o){fo.forEach(e.nodes(),function(t){var n=e.node(t),i=o.node(t);n&&(n.x=i.x,n.y=i.y,o.children(t).length&&(n.width=i.width,n.height=i.height))}),fo.forEach(e.edges(),function(t){var n=e.edge(t),i=o.edge(t);n.points=i.points,fo.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=o.graph().width,e.graph().height=o.graph().height}var u1t=["nodesep","edgesep","ranksep","marginx","marginy"],f1t={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},h1t=["acyclicer","ranker","rankdir","align"],g1t=["width","height"],_1t={width:0,height:0},C1t=["minlen","weight","width","height","labeloffset"],v1t={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},x1t=["labelpos"];function b1t(e){var o=new c1t({multigraph:!0,compound:!0}),t=tI(e.graph());return o.setGraph(fo.merge({},f1t,eI(t,u1t),fo.pick(t,h1t))),fo.forEach(e.nodes(),function(n){var i=tI(e.node(n));o.setNode(n,fo.defaults(eI(i,g1t),_1t)),o.setParent(n,e.parent(n))}),fo.forEach(e.edges(),function(n){var i=tI(e.edge(n));o.setEdge(n,fo.merge({},v1t,eI(i,C1t),fo.pick(i,x1t)))}),o}function y1t(e){var o=e.graph();o.ranksep/=2,fo.forEach(e.edges(),function(t){var n=e.edge(t);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(o.rankdir==="TB"||o.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function S1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);if(t.width&&t.height){var n=e.node(o.v),i=e.node(o.w),s={rank:(i.rank-n.rank)/2+n.rank,e:o};am.addDummyNode(e,"edge-proxy",s,"_ep")}})}function w1t(e){var o=0;fo.forEach(e.nodes(),function(t){var n=e.node(t);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,o=fo.max(o,n.maxRank))}),e.graph().maxRank=o}function P1t(e){fo.forEach(e.nodes(),function(o){var t=e.node(o);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(o))})}function T1t(e){var o=Number.POSITIVE_INFINITY,t=0,n=Number.POSITIVE_INFINITY,i=0,s=e.graph(),d=s.marginx||0,u=s.marginy||0;function f(_){var C=_.x,x=_.y,y=_.width,P=_.height;o=Math.min(o,C-y/2),t=Math.max(t,C+y/2),n=Math.min(n,x-P/2),i=Math.max(i,x+P/2)}fo.forEach(e.nodes(),function(_){f(e.node(_))}),fo.forEach(e.edges(),function(_){var C=e.edge(_);fo.has(C,"x")&&f(C)}),o-=d,n-=u,fo.forEach(e.nodes(),function(_){var C=e.node(_);C.x-=o,C.y-=n}),fo.forEach(e.edges(),function(_){var C=e.edge(_);fo.forEach(C.points,function(x){x.x-=o,x.y-=n}),fo.has(C,"x")&&(C.x-=o),fo.has(C,"y")&&(C.y-=n)}),s.width=t-o+d,s.height=i-n+u}function M1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o),n=e.node(o.v),i=e.node(o.w),s,d;t.points?(s=t.points[0],d=t.points[t.points.length-1]):(t.points=[],s=i,d=n),t.points.unshift(am.intersectRect(n,s)),t.points.push(am.intersectRect(i,d))})}function D1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);if(fo.has(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function E1t(e){fo.forEach(e.edges(),function(o){var t=e.edge(o);t.reversed&&t.points.reverse()})}function I1t(e){fo.forEach(e.nodes(),function(o){if(e.children(o).length){var t=e.node(o),n=e.node(t.borderTop),i=e.node(t.borderBottom),s=e.node(fo.last(t.borderLeft)),d=e.node(fo.last(t.borderRight));t.width=Math.abs(d.x-s.x),t.height=Math.abs(i.y-n.y),t.x=s.x+t.width/2,t.y=n.y+t.height/2}}),fo.forEach(e.nodes(),function(o){e.node(o).dummy==="border"&&e.removeNode(o)})}function O1t(e){fo.forEach(e.edges(),function(o){if(o.v===o.w){var t=e.node(o.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:o,label:e.edge(o)}),e.removeEdge(o)}})}function A1t(e){var o=am.buildLayerMatrix(e);fo.forEach(o,function(t){var n=0;fo.forEach(t,function(i,s){var d=e.node(i);d.order=s+n,fo.forEach(d.selfEdges,function(u){am.addDummyNode(e,"selfedge",{width:u.label.width,height:u.label.height,rank:d.rank,order:s+ ++n,e:u.e,label:u.label},"_se")}),delete d.selfEdges})})}function F1t(e){fo.forEach(e.nodes(),function(o){var t=e.node(o);if(t.dummy==="selfedge"){var n=e.node(t.e.v),i=n.x+n.width/2,s=n.y,d=t.x-i,u=n.height/2;e.setEdge(t.e,t.label),e.removeNode(o),t.label.points=[{x:i+2*d/3,y:s-u},{x:i+5*d/6,y:s-u},{x:i+d,y:s},{x:i+5*d/6,y:s+u},{x:i+2*d/3,y:s+u}],t.label.x=t.x,t.label.y=t.y}})}function eI(e,o){return fo.mapValues(fo.pick(e,o),Number)}function tI(e){var o={};return fo.forEach(e,function(t,n){o[n.toLowerCase()]=t}),o}});var xJ=pt((JPn,vJ)=>{var cy=Sa(),k1t=rl(),B1t=gs().Graph;vJ.exports={debugOrdering:R1t};function R1t(e){var o=k1t.buildLayerMatrix(e),t=new B1t({compound:!0,multigraph:!0}).setGraph({});return cy.forEach(e.nodes(),function(n){t.setNode(n,{label:n}),t.setParent(n,"layer"+e.node(n).rank)}),cy.forEach(e.edges(),function(n){t.setEdge(n.v,n.w,{},n.name)}),cy.forEach(o,function(n,i){var s="layer"+i;t.setNode(s,{rank:"same"}),cy.reduce(n,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var yJ=pt((KPn,bJ)=>{bJ.exports="0.8.5"});var wJ=pt((XPn,SJ)=>{SJ.exports={graphlib:gs(),layout:CJ(),debug:xJ(),util:{time:rl().time,notime:rl().notime},version:yJ()}});var aI=pt(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var oI=(function(){function e(o,t,n){this.source=o,this.target=t,this.type=n}return e})();rm.PowerEdge=oI;var KJ=(function(){function e(o,t,n,i){var s=this;if(this.linkAccessor=n,this.modules=new Array(o),this.roots=[],i)this.initModulesFromGroup(i);else{this.roots.push(new yu);for(var d=0;d=this.R))return this.merge(n.a,n.b,o),!0}},e.prototype.nEdges=function(o,t){var n=o.incoming.intersection(t.incoming),i=o.outgoing.intersection(t.outgoing);return this.R-n.count()-i.count()},e.prototype.getGroupHierarchy=function(o){var t=this,n=[],i={};XJ(this.roots[0],i,n);var s=this.allEdges();return s.forEach(function(d){var u=t.modules[d.source],f=t.modules[d.target];o.push(new oI(typeof u.gid>"u"?d.source:n[u.gid],typeof f.gid>"u"?d.target:n[f.gid],d.type))}),n},e.prototype.allEdges=function(){var o=[];return e.getEdges(this.roots[0],o),o},e.getEdges=function(o,t){o.forAll(function(n){n.getEdges(t),e.getEdges(n.children,t)})},e})();rm.Configuration=KJ;function XJ(e,o,t){e.forAll(function(n){if(n.isLeaf())o.leaves||(o.leaves=[]),o.leaves.push(n.id);else{var i=o;if(n.gid=t.length,!n.isIsland()||n.isPredefined()){if(i={id:n.gid},n.isPredefined())for(var s in n.definition)i[s]=n.definition[s];o.groups||(o.groups=[]),o.groups.push(n.gid),t.push(i)}XJ(n.children,i,t)}})}var eh=(function(){function e(o,t,n,i,s){t===void 0&&(t=new th),n===void 0&&(n=new th),i===void 0&&(i=new yu),this.id=o,this.outgoing=t,this.incoming=n,this.children=i,this.definition=s}return e.prototype.getEdges=function(o){var t=this;this.outgoing.forAll(function(n,i){n.forAll(function(s){o.push(new oI(t.id,s.id,i))})})},e.prototype.isLeaf=function(){return this.children.count()===0},e.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},e.prototype.isPredefined=function(){return typeof this.definition<"u"},e})();rm.Module=eh;function H1t(e,o){var t={};for(var n in e)n in o&&(t[n]=e[n]);return t}var yu=(function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(o){var t=new e;return t.table=H1t(this.table,o.table),t},e.prototype.intersectionCount=function(o){return this.intersection(o).count()},e.prototype.contains=function(o){return o in this.table},e.prototype.add=function(o){this.table[o.id]=o},e.prototype.remove=function(o){delete this.table[o.id]},e.prototype.forAll=function(o){for(var t in this.table)o(this.table[t])},e.prototype.modules=function(){var o=[];return this.forAll(function(t){t.isPredefined()||o.push(t)}),o},e})();rm.ModuleSet=yu;var th=(function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(o){var t=!1;return this.forAllModules(function(n){!t&&n.id==o&&(t=!0)}),t},e.prototype.add=function(o,t){var n=o in this.sets?this.sets[o]:this.sets[o]=new yu;n.add(t),++this.n},e.prototype.remove=function(o,t){var n=this.sets[o];n.remove(t),n.count()===0&&delete this.sets[o],--this.n},e.prototype.forAll=function(o){for(var t in this.sets)o(this.sets[t],Number(t))},e.prototype.forAllModules=function(o){this.forAll(function(t,n){return t.forAll(o)})},e.prototype.intersection=function(o){var t=new e;return this.forAll(function(n,i){if(i in o.sets){var s=n.intersection(o.sets[i]),d=s.count();d>0&&(t.sets[i]=s,t.n+=d)}}),t},e})();rm.LinkSets=th;function G1t(e,o,t,n){for(var i=e.length,s=new KJ(i,o,t,n);s.greedyMerge(););var d=[],u=s.getGroupHierarchy(d);return d.forEach(function(f){var _=function(C){var x=f[C];typeof x=="number"&&(f[C]=e[x])};_("source"),_("target")}),{groups:u,powerEdges:d}}rm.getGroups=G1t});var fy=pt(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});function ZJ(e,o){var t={};for(var n in e)t[n]={};for(var n in o)t[n]={};return Object.keys(t).length}function eK(e,o){var t=0;for(var n in e)typeof o[n]<"u"&&++t;return t}function j1t(e,o){var t={},n=function(i,s){typeof t[i]>"u"&&(t[i]={}),t[i][s]={}};return e.forEach(function(i){var s=o.getSourceIndex(i),d=o.getTargetIndex(i);n(s,d),n(d,s)}),t}function tK(e,o,t,n){var i=j1t(e,n);e.forEach(function(s){var d=i[n.getSourceIndex(s)],u=i[n.getTargetIndex(s)];n.setLength(s,1+o*t(d,u))})}function $1t(e,o,t){t===void 0&&(t=1),tK(e,t,function(n,i){return Math.sqrt(ZJ(n,i)-eK(n,i))},o)}Su.symmetricDiffLinkLengths=$1t;function U1t(e,o,t){t===void 0&&(t=1),tK(e,t,function(n,i){return Math.min(Object.keys(n).length,Object.keys(i).length)<1.1?0:eK(n,i)/ZJ(n,i)},o)}Su.jaccardLinkLengths=U1t;function W1t(e,o,t,n){var i=iK(e,o,n),s={};i.forEach(function(u,f){return u.forEach(function(_){return s[_]=f})});var d=[];return o.forEach(function(u){var f=n.getSourceIndex(u),_=n.getTargetIndex(u),C=s[f],x=s[_];C!==x&&d.push({axis:t,left:f,right:_,gap:n.getMinSeparation(u)})}),d}Su.generateDirectedEdgeConstraints=W1t;function iK(e,o,t){var n=[],i=0,s=[],d=[];function u(k){k.index=k.lowlink=i++,s.push(k),k.onStack=!0;for(var z=0,U=k.out;z"u"?(u(J),k.lowlink=Math.min(k.lowlink,J.lowlink)):J.onStack&&(k.lowlink=Math.min(k.lowlink,J.index))}if(k.lowlink===k.index){for(var re=[];s.length&&(J=s.pop(),J.onStack=!1,re.push(J),J!==k););d.push(re.map(function(ee){return ee.id}))}}for(var f=0;f"u"&&u(D)}return d}Su.stronglyConnectedComponents=iK});var hy=pt(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var nK=(function(){function e(){this.locks={}}return e.prototype.add=function(o,t){this.locks[o]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var o in this.locks)return!1;return!0},e.prototype.apply=function(o){for(var t in this.locks)o(Number(t),this.locks[t])},e})();ih.Locks=nK;var Q1t=(function(){function e(o,t,n){n===void 0&&(n=null),this.D=t,this.G=n,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new oK,this.project=null,this.x=o,this.k=o.length;var i=this.n=o[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new nK,this.minD=Number.MAX_VALUE;for(var s=i,d;s--;)for(d=i;--d>s;){var u=t[s][d];u>0&&u1e-9)break;var S=this.offsetDir();for(i=0;i1&&M>D||!isFinite(D)){for(i=0;i1&&(k=1);var z=D*D,U=2*k*(M-D)/(z*M),J=M*M*M,re=2*-k/(z*J);for(isFinite(U)||console.log(U),i=0;i0?j-(O+1)*ae:j-(O-1)*ae;-ee0;)for(var s=t;s-- >0;)n(i,s)},e.prototype.matrixApply=function(o){e.mApply(this.k,this.n,o)},e.prototype.computeNextPosition=function(o,t){var n=this;this.computeDerivatives(o);var i=this.computeStepSize(this.g);if(this.stepAndProject(o,t,this.g,i),this.project){this.matrixApply(function(d,u){return n.e[d][u]=o[d][u]-t[d][u]});var s=this.computeStepSize(this.e);s=Math.max(.2,Math.min(s,1)),this.stepAndProject(o,t,this.e,s)}},e.prototype.run=function(o){for(var t=Number.MAX_VALUE,n=!1;!n&&o-- >0;){var i=this.rungeKutta();n=Math.abs(t/i-1)>16)/this.range},e.prototype.getNextBetween=function(o,t){return o+this.getNext()*(t-o)},e})();ih.PseudoRandom=oK});var Cy=pt(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var aK=(function(){function e(o){this.scale=o,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(o){var t=this.scale/o.scale,n=o.offset/o.scale,i=o.weight;this.AB+=i*t*n,this.AD+=i*t*o.desiredPosition,this.A2+=i*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e})();op.PositionStats=aK;var gy=(function(){function e(o,t,n,i){i===void 0&&(i=!1),this.left=o,this.right=t,this.gap=n,this.equality=i,this.active=!1,this.unsatisfiable=!1,this.left=o,this.right=t,this.gap=n,this.equality=i}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e})();op.Constraint=gy;var _y=(function(){function e(o,t,n){t===void 0&&(t=1),n===void 0&&(n=1),this.desiredPosition=o,this.weight=t,this.scale=n,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(o,t){var n=function(i,s){return i.active&&o!==s&&t(i,s)};this.cOut.forEach(function(i){return n(i,i.right)}),this.cIn.forEach(function(i){return n(i,i.left)})},e})();op.Variable=_y;var rI=(function(){function e(o){this.vars=[],o.offset=0,this.ps=new aK(o.scale),this.addVariable(o)}return e.prototype.addVariable=function(o){o.block=this,this.vars.push(o),this.ps.addVariable(o),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var o=0,t=this.vars.length;o=0?this.inactive.push(o):this.bs.merge(o)}}},e.prototype.solve=function(){this.satisfy();for(var o=Number.MAX_VALUE,t=this.bs.cost();Math.abs(o-t)>1e-4;)this.satisfy(),o=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e})();op.Solver=sI;function Y1t(e,o,t){for(var n=e.map(function(D){return new _y(D.desiredCenter)}),i=[],s=e.length,d=0;d{"use strict";var J1t=Yd&&Yd.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Yd,"__esModule",{value:!0});var rK=(function(){function e(){this.findIter=function(o){for(var t=this._root,n=this.iterator();t!==null;){var i=this._comparator(o,t.data);if(i===0)return n._cursor=t,n;n._ancestors.push(t),t=t.get_child(i>0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(o){for(var t=this._root;t!==null;){var n=this._comparator(o,t.data);if(n===0)return t.data;t=t.get_child(n>0)}return null},e.prototype.lowerBound=function(o){return this._bound(o,this._comparator)},e.prototype.upperBound=function(o){var t=this._comparator;function n(i,s){return t(s,i)}return this._bound(o,n)},e.prototype.min=function(){var o=this._root;if(o===null)return null;for(;o.left!==null;)o=o.left;return o.data},e.prototype.max=function(){var o=this._root;if(o===null)return null;for(;o.right!==null;)o=o.right;return o.data},e.prototype.iterator=function(){return new lK(this)},e.prototype.each=function(o){for(var t=this.iterator(),n;(n=t.next())!==null;)o(n)},e.prototype.reach=function(o){for(var t=this.iterator(),n;(n=t.prev())!==null;)o(n)},e.prototype._bound=function(o,t){for(var n=this._root,i=this.iterator();n!==null;){var s=this._comparator(o,n.data);if(s===0)return i._cursor=n,i;i._ancestors.push(n),n=n.get_child(s>0)}for(var d=i._ancestors.length-1;d>=0;--d)if(n=i._ancestors[d],t(o,n.data)>0)return i._cursor=n,i._ancestors.length=d,i;return i._ancestors.length=0,i},e})();Yd.TreeBase=rK;var lK=(function(){function e(o){this._tree=o,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},e.prototype.next=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._minNode(o)}else if(this._cursor.right===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===t)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},e.prototype.prev=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._maxNode(o)}else if(this._cursor.left===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===t)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},e.prototype._minNode=function(o){for(;o.left!==null;)this._ancestors.push(o),o=o.left;this._cursor=o},e.prototype._maxNode=function(o){for(;o.right!==null;)this._ancestors.push(o),o=o.right;this._cursor=o},e})();Yd.Iterator=lK;var vy=(function(){function e(o){this.data=o,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(o){return o?this.right:this.left},e.prototype.set_child=function(o,t){o?this.right=t:this.left=t},e})(),K1t=(function(e){J1t(o,e);function o(t){var n=e.call(this)||this;return n._root=null,n._comparator=t,n.size=0,n}return o.prototype.insert=function(t){var n=!1;if(this._root===null)this._root=new vy(t),n=!0,this.size++;else{var i=new vy(void 0),s=!1,d=!1,u=null,f=i,_=null,C=this._root;for(f.right=this._root;;){if(C===null?(C=new vy(t),_.set_child(s,C),n=!0,this.size++):o.is_red(C.left)&&o.is_red(C.right)&&(C.red=!0,C.left.red=!1,C.right.red=!1),o.is_red(C)&&o.is_red(_)){var x=f.right===u;C===_.get_child(d)?f.set_child(x,o.single_rotate(u,!d)):f.set_child(x,o.double_rotate(u,!d))}var y=this._comparator(C.data,t);if(y===0)break;d=s,s=y<0,u!==null&&(f=u),u=_,_=C,C=C.get_child(s)}this._root=i.right}return this._root.red=!1,n},o.prototype.remove=function(t){if(this._root===null)return!1;var n=new vy(void 0),i=n;i.right=this._root;for(var s=null,d=null,u=null,f=!0;i.get_child(f)!==null;){var _=f;d=s,s=i,i=i.get_child(f);var C=this._comparator(t,i.data);if(f=C>0,C===0&&(u=i),!o.is_red(i)&&!o.is_red(i.get_child(f))){if(o.is_red(i.get_child(!f))){var x=o.single_rotate(i,f);s.set_child(_,x),s=x}else if(!o.is_red(i.get_child(!f))){var y=s.get_child(!_);if(y!==null)if(!o.is_red(y.get_child(!_))&&!o.is_red(y.get_child(_)))s.red=!1,y.red=!0,i.red=!0;else{var P=d.right===s;o.is_red(y.get_child(_))?d.set_child(P,o.double_rotate(s,_)):o.is_red(y.get_child(!_))&&d.set_child(P,o.single_rotate(s,_));var S=d.get_child(P);S.red=!0,i.red=!0,S.left.red=!1,S.right.red=!1}}}}return u!==null&&(u.data=i.data,s.set_child(s.right===i,i.get_child(i.left===null)),this.size--),this._root=n.right,this._root!==null&&(this._root.red=!1),u!==null},o.is_red=function(t){return t!==null&&t.red},o.single_rotate=function(t,n){var i=t.get_child(!n);return t.set_child(!n,i.get_child(n)),i.set_child(n,t),t.red=!0,i.red=!1,i},o.double_rotate=function(t,n){return t.set_child(!n,o.single_rotate(t.get_child(!n),!n)),o.single_rotate(t,n)},o})(rK);Yd.RBTree=K1t});var wu=pt(sl=>{"use strict";var X1t=sl&&sl.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(sl,"__esModule",{value:!0});var ap=Cy(),Z1t=cI();function nh(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(o,t){return t.bounds.union(o)},lm.empty()):lm.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(o,t){return nh(t).union(o)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}sl.computeGroupBounds=nh;var lm=(function(){function e(o,t,n,i){this.x=o,this.X=t,this.y=n,this.Y=i}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(o){var t=this.cx(),n=o.cx();return t<=n&&o.x0?n[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(o,t,n,i,s,d,u,f){var _=n-o,C=u-s,x=i-t,y=f-d,P=y*_-C*x;if(P==0)return null;var S=o-s,M=t-d,D=C*M-y*S,k=D/P,z=_*M-x*S,U=z/P;return k>=0&&k<=1&&U>=0&&U<=1?{x:o+k*_,y:t+k*x}:null},e.prototype.inflate=function(o){return new e(this.x-o,this.X+o,this.y-o,this.Y+o)},e})();sl.Rectangle=lm;function eht(e,o,t){var n=e.rayIntersection(o.cx(),o.cy())||{x:e.cx(),y:e.cy()},i=o.rayIntersection(e.cx(),e.cy())||{x:o.cx(),y:o.cy()},s=i.x-n.x,d=i.y-n.y,u=Math.sqrt(s*s+d*d),f=u-t;return{sourceIntersection:n,targetIntersection:i,arrowStart:{x:n.x+f*s/u,y:n.y+f*d/u}}}sl.makeEdgeBetween=eht;function tht(e,o,t){var n=o.rayIntersection(e.x,e.y);n||(n={x:o.cx(),y:o.cy()});var i=n.x-e.x,s=n.y-e.y,d=Math.sqrt(i*i+s*s);return{x:n.x-t*i/d,y:n.y-t*s/d}}sl.makeEdgeTo=tht;var iht=(function(){function e(o,t,n){this.v=o,this.r=t,this.pos=n,this.prev=pI(),this.next=pI()}return e})(),sK=(function(){function e(o,t,n){this.isOpen=o,this.v=t,this.pos=n}return e})();function nht(e,o){return e.pos>o.pos?1:e.pos=s);var u=new Array(d);for(i=0;i0&&(e[n].insert(s),s[i].insert(e))};t("next","prev"),t("prev","next")}function mK(e,o){return dI(e,o,cK,1e-6)}sl.generateXConstraints=mK;function dK(e,o){return dI(e,o,pK,1e-6)}sl.generateYConstraints=dK;function uK(e){return mI(e,cK,1e-6)}sl.generateXGroupConstraints=uK;function fK(e){return mI(e,pK,1e-6)}sl.generateYGroupConstraints=fK;function rht(e){var o=e.map(function(i){return new ap.Variable(i.cx())}),t=mK(e,o),n=new ap.Solver(o,t);n.solve(),o.forEach(function(i,s){return e[s].setXCentre(i.position())}),o=e.map(function(i){return new ap.Variable(i.cy())}),t=dK(e,o),n=new ap.Solver(o,t),n.solve(),o.forEach(function(i,s){return e[s].setYCentre(i.position())})}sl.removeOverlaps=rht;var xy=(function(e){X1t(o,e);function o(t,n){var i=e.call(this,0,n)||this;return i.index=t,i}return o})(ap.Variable);sl.IndexedVariable=xy;var lht=(function(){function e(o,t,n,i,s){var d=this;if(n===void 0&&(n=null),i===void 0&&(i=null),s===void 0&&(s=!1),this.nodes=o,this.groups=t,this.rootGroup=n,this.avoidOverlaps=s,this.variables=o.map(function(f,_){return f.variable=new xy(_,1)}),i&&this.createConstraints(i),s&&n&&typeof n.groups<"u"){o.forEach(function(f){if(!f.width||!f.height){f.bounds=new lm(f.x,f.x,f.y,f.y);return}var _=f.width/2,C=f.height/2;f.bounds=new lm(f.x-_,f.x+_,f.y-C,f.y+C)}),nh(n);var u=o.length;t.forEach(function(f){d.variables[u]=f.minVar=new xy(u++,typeof f.stiffness<"u"?f.stiffness:.01),d.variables[u]=f.maxVar=new xy(u++,typeof f.stiffness<"u"?f.stiffness:.01)})}}return e.prototype.createSeparation=function(o){return new ap.Constraint(this.nodes[o.left].variable,this.nodes[o.right].variable,o.gap,typeof o.equality<"u"?o.equality:!1)},e.prototype.makeFeasible=function(o){var t=this;if(this.avoidOverlaps){var n="x",i="width";o.axis==="x"&&(n="y",i="height");var s=o.offsets.map(function(u){return t.nodes[u.node]}).sort(function(u,f){return u[n]-f[n]}),d=null;s.forEach(function(u){if(d){var f=d[n]+d[i];f>u[n]&&(u[n]=f)}d=u})}},e.prototype.createAlignment=function(o){var t=this,n=this.nodes[o.offsets[0].node].variable;this.makeFeasible(o);var i=o.axis==="x"?this.xConstraints:this.yConstraints;o.offsets.slice(1).forEach(function(s){var d=t.nodes[s.node].variable;i.push(new ap.Constraint(n,d,s.offset,!0))})},e.prototype.createConstraints=function(o){var t=this,n=function(i){return typeof i.type>"u"||i.type==="separation"};this.xConstraints=o.filter(function(i){return i.axis==="x"&&n(i)}).map(function(i){return t.createSeparation(i)}),this.yConstraints=o.filter(function(i){return i.axis==="y"&&n(i)}).map(function(i){return t.createSeparation(i)}),o.filter(function(i){return i.type==="alignment"}).forEach(function(i){return t.createAlignment(i)})},e.prototype.setupVariablesAndBounds=function(o,t,n,i){this.nodes.forEach(function(s,d){s.fixed?(s.variable.weight=s.fixedWeight?s.fixedWeight:1e3,n[d]=i(s)):s.variable.weight=1;var u=(s.width||0)/2,f=(s.height||0)/2,_=o[d],C=t[d];s.bounds=new lm(_-u,_+u,C-f,C+f)})},e.prototype.xProject=function(o,t,n){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(o,t,o,n,function(i){return i.px},this.xConstraints,uK,function(i){return i.bounds.setXCentre(n[i.variable.index]=i.variable.position())},function(i){var s=n[i.minVar.index]=i.minVar.position(),d=n[i.maxVar.index]=i.maxVar.position(),u=i.padding/2;i.bounds.x=s-u,i.bounds.X=d+u})},e.prototype.yProject=function(o,t,n){!this.rootGroup&&!this.yConstraints||this.project(o,t,t,n,function(i){return i.py},this.yConstraints,fK,function(i){return i.bounds.setYCentre(n[i.variable.index]=i.variable.position())},function(i){var s=n[i.minVar.index]=i.minVar.position(),d=n[i.maxVar.index]=i.maxVar.position(),u=i.padding/2;i.bounds.y=s-u,i.bounds.Y=d+u})},e.prototype.projectFunctions=function(){var o=this;return[function(t,n,i){return o.xProject(t,n,i)},function(t,n,i){return o.yProject(t,n,i)}]},e.prototype.project=function(o,t,n,i,s,d,u,f,_){this.setupVariablesAndBounds(o,t,i,s),this.rootGroup&&this.avoidOverlaps&&(nh(this.rootGroup),d=d.concat(u(this.rootGroup))),this.solve(this.variables,d,n,i),this.nodes.forEach(f),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(_),nh(this.rootGroup))},e.prototype.solve=function(o,t,n,i){var s=new ap.Solver(o,t);s.setStartingPositions(n),s.setDesiredPositions(i),s.solve()},e})();sl.Projection=lht});var uI=pt(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var hK=(function(){function e(o){this.elem=o,this.subheaps=[]}return e.prototype.toString=function(o){for(var t="",n=!1,i=0;i{"use strict";Object.defineProperty(fI,"__esModule",{value:!0});var gK=uI(),_K=(function(){function e(o,t){this.id=o,this.distance=t}return e})(),cht=(function(){function e(o){this.id=o,this.neighbours=[]}return e})(),CK=(function(){function e(o,t,n){this.node=o,this.prev=t,this.d=n}return e})(),pht=(function(){function e(o,t,n,i,s){this.n=o,this.es=t,this.neighbours=new Array(this.n);for(var d=this.n;d--;)this.neighbours[d]=new cht(d);for(d=this.es.length;d--;){var u=this.es[d],f=n(u),_=i(u),C=s(u);this.neighbours[f].neighbours.push(new _K(_,C)),this.neighbours[_].neighbours.push(new _K(f,C))}}return e.prototype.DistanceMatrix=function(){for(var o=new Array(this.n),t=0;tx&&(_.d=x,_.prev=u,n.reduceKey(_.q,_,function(P,S){return P.q=S}))}}return s},e})();fI.Calculator=pht});var CI=pt(ka=>{"use strict";var xK=ka&&ka.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(ka,"__esModule",{value:!0});var mht=wu(),gI=(function(){function e(){}return e})();ka.Point=gI;var _I=(function(){function e(o,t,n,i){this.x1=o,this.y1=t,this.x2=n,this.y2=i}return e})();ka.LineSegment=_I;var dht=(function(e){xK(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(gI);ka.PolyPoint=dht;function zl(e,o,t){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)}ka.isLeft=zl;function Gs(e,o,t){return zl(e,o,t)>0}function _s(e,o,t){return zl(e,o,t)<0}function uht(e){var o=e.slice(0).sort(function(y,P){return y.x!==P.x?P.x-y.x:P.y-y.y}),t=e.length,n,i=0,s=o[0].x;for(n=1;n=0&&o[n].x===C;n--);for(f=n+1,n=d;++n<=f;)if(!(zl(o[i],o[f],o[n])>=0&&n1&&!(zl(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}_!=f&&u.push(o[_]);var x=u.length;for(n=f;--n>=d;)if(!(zl(o[_],o[d],o[n])>=0&&n>d)){for(;u.length>x&&!(zl(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}}return u}ka.ConvexHull=uht;function fht(e,o,t){o.slice(0).sort(function(n,i){return Math.atan2(n.y-e.y,n.x-e.x)-Math.atan2(i.y-e.y,i.x-e.x)}).forEach(t)}ka.clockwiseRadialSweep=fht;function hht(e,o){var t=o.slice(0);return t.push(o[0]),{rtan:Sy(e,t),ltan:wy(e,t)}}function Sy(e,o){var t=o.length-1,n,i,s,d,u;if(_s(e,o[1],o[0])&&!Gs(e,o[t-1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Gs(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=_s(e,o[s+1],o[s]),u&&!Gs(e,o[s-1],o[s]))return s;d=Gs(e,o[n+1],o[n]),d?u||Gs(e,o[n],o[s])?i=s:n=s:u&&_s(e,o[n],o[s])?i=s:n=s}}function wy(e,o){var t=o.length-1,n,i,s,d,u;if(Gs(e,o[t-1],o[0])&&!_s(e,o[1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return _s(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=_s(e,o[s+1],o[s]),Gs(e,o[s-1],o[s])&&!u)return s;d=_s(e,o[n+1],o[n]),d?u?_s(e,o[n],o[s])?i=s:n=s:i=s:u?n=s:Gs(e,o[n],o[s])?i=s:n=s}}function Py(e,o,t,n,i,s){var d,u;d=t(o[0],e),u=n(e[d],o);for(var f=!1;!f;){for(f=!0;d===e.length-1&&(d=0),!i(o[u],e[d],e[d+1]);)++d;for(;u===0&&(u=o.length-1),!s(e[d],o[u],o[u-1]);)--u,f=!1}return{t1:d,t2:u}}ka.tangent_PolyPolyC=Py;function ght(e,o){var t=bK(o,e);return{t1:t.t2,t2:t.t1}}ka.LRtangent_PolyPolyC=ght;function bK(e,o){return Py(e,o,Sy,wy,Gs,_s)}ka.RLtangent_PolyPolyC=bK;function _ht(e,o){return Py(e,o,wy,wy,_s,_s)}ka.LLtangent_PolyPolyC=_ht;function Cht(e,o){return Py(e,o,Sy,Sy,Gs,Gs)}ka.RRtangent_PolyPolyC=Cht;var ah=(function(){function e(o,t){this.t1=o,this.t2=t}return e})();ka.BiTangent=ah;var yK=(function(){function e(){}return e})();ka.BiTangents=yK;var vht=(function(e){xK(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(gI);ka.TVGPoint=vht;var hI=(function(){function e(o,t,n,i){this.id=o,this.polyid=t,this.polyvertid=n,this.p=i,i.vv=this}return e})();ka.VisibilityVertex=hI;var yy=(function(){function e(o,t){this.source=o,this.target=t}return e.prototype.length=function(){var o=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(o*o+t*t)},e})();ka.VisibilityEdge=yy;var xht=(function(){function e(o,t){if(this.P=o,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var n=o.length,i=0;i0&&this.E.push(new yy(s[d-1].vv,f))}s.length>1&&this.E.push(new yy(s[0].vv,s[s.length-1].vv))}for(var i=0;i0)return!0;return!1},e})();ka.TangentVisibilityGraph=xht;function SK(e,o){for(var t=[],n=1,i=o.length;n=0&&S>=0&&M<0&&D>=0&&k>=0&&z<0?i.ll=new ah(s,d):P<=0&&S<=0&&M>0&&D<=0&&k<=0&&z>0?i.rr=new ah(s,d):P<=0&&S>0&&M<=0&&D>=0&&k<0&&z>=0?i.rl=new ah(s,d):P>=0&&S<0&&M>=0&&D<=0&&k>0&&z<=0&&(i.lr=new ah(s,d))}return i}ka.tangents=wK;function bht(e,o){for(var t=1,n=o.length;t0)return!0}return!1}ka.polysOverlap=yht});var vI=pt(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var Cs={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function Sht(e,o,t,x,C,s){C===void 0&&(C=1),s===void 0&&(s=!0);var d=0,u=0,f=o,_=t,C=typeof C<"u"?C:1,x=typeof x<"u"?x:0,y=0,P=0,S=0,M=0,D=[];if(e.length==0)return;k(e),U(e,C),s&&z(e);function k(se){se.forEach(function(de){_e(de)});function _e(de){var j=Number.MAX_VALUE,W=Number.MAX_VALUE,pe=0,O=0;de.array.forEach(function(B){var L=typeof B.width<"u"?B.width:x,N=typeof B.height<"u"?B.height:x;L/=2,N/=2,pe=Math.max(B.x+L,pe),j=Math.min(B.x-L,j),O=Math.max(B.y+N,O),W=Math.min(B.y-N,W)}),de.width=pe-j,de.height=O-W}}function z(se){se.forEach(function(_e){var de={x:0,y:0};_e.array.forEach(function(pe){de.x+=pe.x,de.y+=pe.y}),de.x/=_e.array.length,de.y/=_e.array.length;var j={x:de.x-_e.width/2,y:de.y-_e.height/2},W={x:_e.x-j.x+f/2-y/2,y:_e.y-j.y+_/2-P/2};_e.array.forEach(function(pe){pe.x+=W.x,pe.y+=W.y})})}function U(se,_e){var de=Number.POSITIVE_INFINITY,j=0;se.sort(function(ye,Ne){return Ne.height-ye.height}),S=se.reduce(function(ye,Ne){return ye.widthS||$>Cs.FLOAT_EPSILON;){if(N!=1)var ne=pe-(pe-W)/Cs.GOLDEN_SECTION,B=J(se,ne);if(N!=0)var be=W+(pe-W)/Cs.GOLDEN_SECTION,L=J(se,be);if(G=Math.abs(ne-be),$=Math.abs(B-L),BL?(W=ne,ne=be,B=L,N=1):(pe=be,be=ne,L=B,N=0),O++>100)break}J(se,j)}function J(se,_e){D=[],y=0,P=0,M=u;for(var de=0;de=se.height&&D[j].x+D[j].width+se.width+Cs.PADDING-_e<=Cs.FLOAT_EPSILON){de=D[j];break}D.push(se),de!==void 0?(se.x=de.x+de.width+Cs.PADDING,se.y=de.bottom,se.space_left=se.height,se.bottom=se.y,de.space_left-=se.height+Cs.PADDING,de.bottom+=se.height+Cs.PADDING):(se.y=M,M+=se.height+Cs.PADDING,se.x=d,se.bottom=se.y,se.space_left=se.height),se.y+se.height-P>-Cs.FLOAT_EPSILON&&(P=se.y+se.height-u),se.x+se.width-y>-Cs.FLOAT_EPSILON&&(y=se.x+se.width-d)}function ee(se){var _e=0;return se.forEach(function(de){return _e+=de.width+Cs.PADDING}),_e}function ae(){return y/P}}Ty.applyPacking=Sht;function wht(e,o){for(var t={},n={},i=[],s=0,d=0;d{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var Pht=aI(),xI=fy(),My=hy(),Dy=wu(),PK=oh(),TK=CI(),MK=vI(),rh;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(rh=lh.EventType||(lh.EventType={}));function Ey(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var Tht=(function(){function e(){var o=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(t){return typeof o._linkType=="function"?o._linkType(t):0}}}return e.prototype.on=function(o,t){return this.event||(this.event={}),typeof o=="string"?this.event[rh[o]]=t:this.event[o]=t,this},e.prototype.trigger=function(o){this.event&&typeof this.event[o.type]<"u"&&this.event[o.type](o)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha"u"||typeof n.py>"u")&&(n.px=n.x,n.py=n.y);var s=[n.px,n.py];this._descent.locks.add(i,s)}var d=this._descent.rungeKutta();return d===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=d),this._lastStress=d,this.updateNodePositions(),this.trigger({type:rh.tick,alpha:this._alpha,stress:this._lastStress}),!1},e.prototype.updateNodePositions=function(){for(var o=this._descent.x[0],t=this._descent.x[1],n,i=this._nodes.length;i--;)n=this._nodes[i],n.x=o[i],n.y=t[i]},e.prototype.nodes=function(o){if(!o){if(this._nodes.length===0&&this._links.length>0){var t=0;this._links.forEach(function(i){t=Math.max(t,i.source,i.target)}),this._nodes=new Array(++t);for(var n=0;n"u"&&(n.padding=1),typeof n.leaves<"u"&&n.leaves.forEach(function(i,s){typeof i=="number"&&((n.leaves[s]=t._nodes[i]).parent=n)}),typeof n.groups<"u"&&n.groups.forEach(function(i,s){typeof i=="number"&&((n.groups[s]=t._groups[i]).parent=n)})}),this._rootGroup.leaves=this._nodes.filter(function(n){return typeof n.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(n){return typeof n.parent>"u"}),this):this._groups},e.prototype.powerGraphGroups=function(o){var t=Pht.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(t.groups),o(t),this},e.prototype.avoidOverlaps=function(o){return arguments.length?(this._avoidOverlaps=o,this):this._avoidOverlaps},e.prototype.handleDisconnected=function(o){return arguments.length?(this._handleDisconnected=o,this):this._handleDisconnected},e.prototype.flowLayout=function(o,t){return arguments.length||(o="y"),this._directedLinkConstraints={axis:o,getMinSeparation:typeof t=="number"?function(){return t}:t},this},e.prototype.links=function(o){return arguments.length?(this._links=o,this):this._links},e.prototype.constraints=function(o){return arguments.length?(this._constraints=o,this):this._constraints},e.prototype.distanceMatrix=function(o){return arguments.length?(this._distanceMatrix=o,this):this._distanceMatrix},e.prototype.size=function(o){return o?(this._canvasSize=o,this):this._canvasSize},e.prototype.defaultNodeSize=function(o){return o?(this._defaultNodeSize=o,this):this._defaultNodeSize},e.prototype.groupCompactness=function(o){return o?(this._groupCompactness=o,this):this._groupCompactness},e.prototype.linkDistance=function(o){return o?(this._linkDistance=typeof o=="function"?o:+o,this._linkLengthCalculator=null,this):this._linkDistance},e.prototype.linkType=function(o){return this._linkType=o,this},e.prototype.convergenceThreshold=function(o){return o?(this._threshold=typeof o=="function"?o:+o,this):this._threshold},e.prototype.alpha=function(o){return arguments.length?(o=+o,this._alpha?o>0?this._alpha=o:this._alpha=0:o>0&&(this._running||(this._running=!0,this.trigger({type:rh.start,alpha:this._alpha=o}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(o){return typeof this._linkDistance=="function"?+this._linkDistance(o):this._linkDistance},e.setLinkLength=function(o,t){o.length=t},e.prototype.getLinkType=function(o){return typeof this._linkType=="function"?this._linkType(o):0},e.prototype.symmetricDiffLinkLengths=function(o,t){var n=this;return t===void 0&&(t=1),this.linkDistance(function(i){return o*i.length}),this._linkLengthCalculator=function(){return xI.symmetricDiffLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(o,t){var n=this;return t===void 0&&(t=1),this.linkDistance(function(i){return o*i.length}),this._linkLengthCalculator=function(){return xI.jaccardLinkLengths(n._links,n.linkAccessor,t)},this},e.prototype.start=function(o,t,n,i,s,d){var u=this;o===void 0&&(o=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!0),d===void 0&&(d=!0);var f,_,C=this.nodes().length,x=C+2*this._groups.length,y=this._links.length,P=this._canvasSize[0],S=this._canvasSize[1],M=new Array(x),D=new Array(x),k=null,z=this._avoidOverlaps;this._nodes.forEach(function(de,j){de.index=j,typeof de.x>"u"&&(de.x=P/2,de.y=S/2),M[j]=de.x,D[j]=de.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new PK.Calculator(x,this._links,e.getSourceIndex,e.getTargetIndex,function(de){return u.getLinkLength(de)}).DistanceMatrix(),k=My.Descent.createSquareMatrix(x,function(){return 2}),this._links.forEach(function(de){typeof de.source=="number"&&(de.source=u._nodes[de.source]),typeof de.target=="number"&&(de.target=u._nodes[de.target])}),this._links.forEach(function(de){var j=e.getSourceIndex(de),W=e.getTargetIndex(de);k[j][W]=k[W][j]=de.weight||1}));var J=My.Descent.createSquareMatrix(x,function(de,j){return U[de][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var f=C,re=function(j,W,pe,O){k[j][W]=k[W][j]=pe,J[j][W]=J[W][j]=O};this._groups.forEach(function(j){re(f,f+1,u._groupCompactness,.1),M[f]=0,D[f++]=0,M[f]=0,D[f++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var ee=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,ee=ee.concat(xI.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new My.Descent([M,D],J),this._descent.locks.clear();for(var f=0;f0&&(this._descent.project=new Dy.Projection(this._nodes,this._groups,this._rootGroup,ee).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(P,S,d),this.avoidOverlaps(z),z&&(this._nodes.forEach(function(de,j){de.x=M[j],de.y=D[j]}),this._descent.project=new Dy.Projection(this._nodes,this._groups,this._rootGroup,ee,!0).projectFunctions(),this._nodes.forEach(function(de,j){M[j]=de.x,D[j]=de.y})),this._descent.G=k,this._descent.run(n),i){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=C,this._descent.scaleSnapByMaxH=C!=x;var _e=My.Descent.createSquareMatrix(x,function(de,j){return de>=C||j>=C?k[de][j]:0});this._descent.G=_e,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(P,S,d),s?this.resume():this},e.prototype.initialLayout=function(o,t,n){if(this._groups.length>0&&o>0){var i=this._nodes.length,s=this._links.map(function(u){return{source:u.source.index,target:u.target.index}}),d=this._nodes.map(function(u){return{index:u.index}});this._groups.forEach(function(u,f){d.push({index:u.index=i+f})}),this._groups.forEach(function(u,f){typeof u.leaves<"u"&&u.leaves.forEach(function(_){return s.push({source:u.index,target:_.index})}),typeof u.groups<"u"&&u.groups.forEach(function(_){return s.push({source:u.index,target:_.index})})}),new e().size(this.size()).nodes(d).links(s).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(o,0,0,0,!1),this._nodes.forEach(function(u){t[u.index]=d[u.index].x,n[u.index]=d[u.index].y})}else this._descent.run(o)},e.prototype.separateOverlappingComponents=function(o,t,n){var i=this;if(n===void 0&&(n=!0),!this._distanceMatrix&&this._handleDisconnected){var s=this._descent.x[0],d=this._descent.x[1];this._nodes.forEach(function(f,_){f.x=s[_],f.y=d[_]});var u=MK.separateGraphs(this._nodes,this._links);MK.applyPacking(u,o,t,this._defaultNodeSize,1,n),this._nodes.forEach(function(f,_){i._descent.x[0][_]=f.x,i._descent.x[1][_]=f.y,f.bounds&&(f.bounds.setXCentre(f.x),f.bounds.setYCentre(f.y))})}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(o){o===void 0&&(o=0),this._visibilityGraph=new TK.TangentVisibilityGraph(this._nodes.map(function(t){return t.bounds.inflate(-o).vertices()}))},e.prototype.routeEdge=function(o,t,n){t===void 0&&(t=5);var i=[],s=new TK.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),d={x:o.source.x,y:o.source.y},u={x:o.target.x,y:o.target.y},f=s.addPoint(d,o.source.index),_=s.addPoint(u,o.target.index);s.addEdgeIfVisible(d,u,o.source.index,o.target.index),typeof n<"u"&&n(s);var C=function(J){return J.source.id},x=function(J){return J.target.id},y=function(J){return J.length()},P=new PK.Calculator(s.V.length,s.E,C,x,y),S=P.PathFromNodeToNode(f.id,_.id);if(S.length===1||S.length===s.V.length){var M=Dy.makeEdgeBetween(o.source.innerBounds,o.target.innerBounds,t);i=[M.sourceIntersection,M.arrowStart]}else{for(var D=S.length-2,k=s.V[S[D]].p,z=s.V[S[0]].p,i=[o.source.innerBounds.rayIntersection(k.x,k.y)],U=D;U>=0;--U)i.push(s.V[S[U]].p);i.push(Dy.makeEdgeTo(z,o.target.innerBounds,t))}return i},e.getSourceIndex=function(o){return typeof o.source=="number"?o.source:o.source.index},e.getTargetIndex=function(o){return typeof o.target=="number"?o.target:o.target.index},e.linkId=function(o){return e.getSourceIndex(o)+"-"+e.getTargetIndex(o)},e.dragStart=function(o){Ey(o)?e.storeOffset(o,e.dragOrigin(o)):(e.stopNode(o),o.fixed|=2)},e.stopNode=function(o){o.px=o.x,o.py=o.y},e.storeOffset=function(o,t){typeof o.leaves<"u"&&o.leaves.forEach(function(n){n.fixed|=2,e.stopNode(n),n._dragGroupOffsetX=n.x-t.x,n._dragGroupOffsetY=n.y-t.y}),typeof o.groups<"u"&&o.groups.forEach(function(n){return e.storeOffset(n,t)})},e.dragOrigin=function(o){return Ey(o)?{x:o.bounds.cx(),y:o.bounds.cy()}:o},e.drag=function(o,t){Ey(o)?(typeof o.leaves<"u"&&o.leaves.forEach(function(n){o.bounds.setXCentre(t.x),o.bounds.setYCentre(t.y),n.px=n._dragGroupOffsetX+t.x,n.py=n._dragGroupOffsetY+t.y}),typeof o.groups<"u"&&o.groups.forEach(function(n){return e.drag(n,t)})):(o.px=t.x,o.py=t.y)},e.dragEnd=function(o){Ey(o)?(typeof o.leaves<"u"&&o.leaves.forEach(function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY}),typeof o.groups<"u"&&o.groups.forEach(e.dragEnd)):o.fixed&=-7},e.mouseOver=function(o){o.fixed|=4,o.px=o.x,o.py=o.y},e.mouseOut=function(o){o.fixed&=-5},e})();lh.Layout=Tht});var EK=pt(Tu=>{"use strict";var Mht=Tu&&Tu.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Tu,"__esModule",{value:!0});var bI=Pu(),DK=(function(e){Mht(o,e);function o(t){var n=e.call(this)||this,i=n,s=t;return s.trigger&&(n.trigger=s.trigger),s.kick&&(n.kick=s.kick),s.drag&&(n.drag=s.drag),s.on&&(n.on=s.on),n.dragstart=n.dragStart=bI.Layout.dragStart,n.dragend=n.dragEnd=bI.Layout.dragEnd,n}return o.prototype.trigger=function(t){},o.prototype.kick=function(){},o.prototype.drag=function(){},o.prototype.on=function(t,n){return this},o})(bI.Layout);Tu.LayoutAdaptor=DK;function Dht(e){return new DK(e)}Tu.adaptor=Dht});var OK=pt(Mu=>{"use strict";var Eht=Mu&&Mu.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(Mu,"__esModule",{value:!0});var Hl=Pu(),IK=(function(e){Eht(o,e);function o(){var t=e.call(this)||this;t.event=d3.dispatch(Hl.EventType[Hl.EventType.start],Hl.EventType[Hl.EventType.tick],Hl.EventType[Hl.EventType.end]);var n=t,i;return t.drag=function(){if(!s)var s=d3.behavior.drag().origin(Hl.Layout.dragOrigin).on("dragstart.d3adaptor",Hl.Layout.dragStart).on("drag.d3adaptor",function(d){Hl.Layout.drag(d,d3.event),n.resume()}).on("dragend.d3adaptor",Hl.Layout.dragEnd);if(!arguments.length)return s;this.call(s)},t}return o.prototype.trigger=function(t){var n={type:Hl.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event[n.type](n)},o.prototype.kick=function(){var t=this;d3.timer(function(){return e.prototype.tick.call(t)})},o.prototype.on=function(t,n){return typeof t=="string"?this.event.on(t,n):this.event.on(Hl.EventType[t],n),this},o})(Hl.Layout);Mu.D3StyleLayoutAdaptor=IK;function Iht(){return new IK}Mu.d3adaptor=Iht});var AK=pt(sh=>{"use strict";var Oht=sh&&sh.__extends||(function(){var e=function(o,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},e(o,t)};return function(o,t){e(o,t);function n(){this.constructor=o}o.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})();Object.defineProperty(sh,"__esModule",{value:!0});var Gl=Pu(),Aht=(function(e){Oht(o,e);function o(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(Gl.EventType[Gl.EventType.start],Gl.EventType[Gl.EventType.tick],Gl.EventType[Gl.EventType.end]);var i=n,s;return n.drag=function(){if(!d)var d=t.drag().subject(Gl.Layout.dragOrigin).on("start.d3adaptor",Gl.Layout.dragStart).on("drag.d3adaptor",function(u){Gl.Layout.drag(u,t.event),i.resume()}).on("end.d3adaptor",Gl.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},n}return o.prototype.trigger=function(t){var n={type:Gl.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(n.type,n)},o.prototype.kick=function(){var t=this,n=this.d3Context.timer(function(){return e.prototype.tick.call(t)&&n.stop()})},o.prototype.on=function(t,n){return typeof t=="string"?this.event.on(t,n):this.event.on(Gl.EventType[t],n),this},o})(Gl.Layout);sh.D3StyleLayoutAdaptor=Aht});var FK=pt(yI=>{"use strict";Object.defineProperty(yI,"__esModule",{value:!0});var Fht=OK(),kht=AK();function Bht(e){return!e||Rht(e)?new Fht.D3StyleLayoutAdaptor:new kht.D3StyleLayoutAdaptor(e)}yI.d3adaptor=Bht;function Rht(e){var o=/^3\./;return e.version&&e.version.match(o)!==null}});var TI=pt(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Nht=wu(),SI=Cy(),Lht=oh(),kK=(function(){function e(o,t,n){this.id=o,this.rect=t,this.children=n,this.leaf=typeof n>"u"||n.length===0}return e})();Du.NodeWrapper=kK;var wI=(function(){function e(o,t,n,i,s){i===void 0&&(i=null),s===void 0&&(s=null),this.id=o,this.x=t,this.y=n,this.node=i,this.line=s}return e})();Du.Vert=wI;var PI=(function(){function e(o,t){this.s=o,this.t=t;var n=e.findMatch(o,t),i=t.slice(0).reverse(),s=e.findMatch(o,i);n.length>=s.length?(this.length=n.length,this.si=n.si,this.ti=n.ti,this.reversed=!1):(this.length=s.length,this.si=s.si,this.ti=t.length-s.ti-s.length,this.reversed=!0)}return e.findMatch=function(o,t){for(var n=o.length,i=t.length,s={length:0,si:-1,ti:-1},d=new Array(n),u=0;us.length&&(s.length=_,s.si=u-_+1,s.ti=f-_+1)}else d[u][f]=0}return s},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e})();Du.LongestCommonSubsequence=PI;var Vht=(function(){function e(o,t,n){var i=this;n===void 0&&(n=12),this.originalnodes=o,this.groupPadding=n,this.leaves=null,this.nodes=o.map(function(M,D){return new kK(D,t.getBounds(M),t.getChildren(M))}),this.leaves=this.nodes.filter(function(M){return M.leaf}),this.groups=this.nodes.filter(function(M){return!M.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(M){return M.children.forEach(function(D){return i.nodes[D].parent=M})}),this.root={children:[]},this.nodes.forEach(function(M){typeof M.parent>"u"&&(M.parent=i.root,i.root.children.push(M.id)),M.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(M,D){return i.getDepth(M)-i.getDepth(D)});var s=this.backToFront.slice(0).reverse().filter(function(M){return!M.leaf});s.forEach(function(M){var D=Nht.Rectangle.empty();M.children.forEach(function(k){return D=D.union(i.nodes[k].rect)}),M.rect=D.inflate(i.groupPadding)});var d=this.midPoints(this.cols.map(function(M){return M.pos})),u=this.midPoints(this.rows.map(function(M){return M.pos})),f=d[0],_=d[d.length-1],C=u[0],x=u[u.length-1],y=this.rows.map(function(M){return{x1:f,x2:_,y1:M.pos,y2:M.pos}}).concat(u.map(function(M){return{x1:f,x2:_,y1:M,y2:M}})),P=this.cols.map(function(M){return{x1:M.pos,x2:M.pos,y1:C,y2:x}}).concat(d.map(function(M){return{x1:M,x2:M,y1:C,y2:x}})),S=y.concat(P);S.forEach(function(M){return M.verts=[]}),this.verts=[],this.edges=[],y.forEach(function(M){return P.forEach(function(D){var k=new wI(i.verts.length,D.x1,M.y1);M.verts.push(k),D.verts.push(k),i.verts.push(k);for(var z=i.backToFront.length;z-- >0;){var U=i.backToFront[z],J=U.rect,re=Math.abs(k.x-J.cx()),ee=Math.abs(k.y-J.cy());if(re0;){var i=n.filter(function(d){return d.rect["overlap"+o.toUpperCase()](n[0].rect)}),s={nodes:i,pos:this.avg(i.map(function(d){return d.rect["c"+o]()}))};t.push(s),s.nodes.forEach(function(d){return n.splice(n.indexOf(d),1)})}return t.sort(function(d,u){return d.pos-u.pos}),t},e.prototype.getDepth=function(o){for(var t=0;o.parent!==this.root;)t++,o=o.parent;return t},e.prototype.midPoints=function(o){for(var t=o[1]-o[0],n=[o[0]-t/2],i=1;i.1)&&(x={pos:f[0][t],segments:[]},C.push(x)),x.segments.push(f)}return C},e.nudgeSegs=function(o,t,n,i,s,d){var u=i.length;if(!(u<=1)){for(var f=i.map(function(U){return new SI.Variable(U[0][o])}),_=[],C=0;C=0&&_.push(new SI.Constraint(f[D],f[k],d))}var z=new SI.Solver(f,_);z.solve(),f.forEach(function(U,J){var re=i[J],ee=U.position();re[0][o]=re[1][o]=ee;var ae=n[re.edgeid];re.i>0&&(ae[re.i-1][1][o]=ee),re.iMath.PI||s<-Math.PI)&&(s=i-n),s},e.isLeft=function(o,t,n){return(t.x-o.x)*(n.y-o.y)-(t.y-o.y)*(n.x-o.x)<=0},e.getOrder=function(o){for(var t={},n=0;n"u"&&(t[i.l]={}),t[i.l][i.r]=!0}return function(s,d){return typeof t[s]<"u"&&t[s][d]}},e.orderEdges=function(o){for(var t=[],n=0;n=s.length||u.ti+u.length>=d.length)){t.push({l:n,r:i});continue}u.si+u.length>=s.length||u.ti+u.length>=d.length?(f=s[u.si+1],C=s[u.si-1],_=d[u.ti-1]):(f=s[u.si+u.length-2],_=s[u.si+u.length],C=d[u.ti+u.length]),e.isLeft(f,_,C)?t.push({l:i,r:n}):t.push({l:n,r:i})}}return e.getOrder(t)},e.makeSegments=function(o){function t(_){return{x:_.x,y:_.y}}for(var n=function(_,C,x){return Math.abs((C.x-_.x)*(x.y-_.y)-(C.y-_.y)*(x.x-_.x))<.001},i=[],s=t(o[0]),d=1;d1&&se>1?1e3:0},M=P.PathFromNodeToNodeWithPrevCost(i.ports[0].id,s.ports[0].id,S),D=M.reverse().map(function(k){return n.verts[k]});return D.push(this.nodes[s.id].ports[0]),D.filter(function(k,z){return!(z0&&k.node===s&&D[z-1].node===s)})},e.getRoutePath=function(o,t,n,i){var s={routepath:"M "+o[0][0].x+" "+o[0][0].y+" ",arrowpath:""};if(o.length>1)for(var d=0;d0?f-=C/Math.abs(C)*t:_-=x/Math.abs(x)*t,s.routepath+="L "+f+" "+_+" ";var y=o[d+1],P=y[0].x,S=y[0].y,M=y[1].x,D=y[1].y;C=M-P,x=D-S;var k=e.angleBetween2Lines(u,y)<0?1:0,z,U;Math.abs(C)>0?(z=P+C/Math.abs(C)*t,U=S):(z=P,U=S+x/Math.abs(x)*t);var J=Math.abs(z-f),re=Math.abs(U-_);s.routepath+="A "+J+" "+re+" 0 0 "+k+" "+z+" "+U+" "}else{var ee=[f,_],ae,se;Math.abs(C)>0?(f-=C/Math.abs(C)*i,ae=[f,_+n],se=[f,_-n]):(_-=x/Math.abs(x)*i,ae=[f+n,_],se=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+ae[0]+" "+ae[1]+" L "+se[0]+" "+se[1])}}else{var u=o[0],f=u[1].x,_=u[1].y,C=f-u[0].x,x=_-u[0].y,ee=[f,_],ae,se;Math.abs(C)>0?(f-=C/Math.abs(C)*i,ae=[f,_+n],se=[f,_-n]):(_-=x/Math.abs(x)*i,ae=[f+n,_],se=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+ae[0]+" "+ae[1]+" L "+se[0]+" "+se[1])}return s},e})();Du.GridRouter=Vht});var BK=pt(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var qht=oh(),MI=hy(),zht=wu(),Hht=fy(),Ght=(function(){function e(o,t){this.source=o,this.target=t}return e.prototype.actualLength=function(o){var t=this;return Math.sqrt(o.reduce(function(n,i){var s=i[t.target]-i[t.source];return n+s*s},0))},e})();ch.Link3D=Ght;var jht=(function(){function e(o,t,n){o===void 0&&(o=0),t===void 0&&(t=0),n===void 0&&(n=0),this.x=o,this.y=t,this.z=n}return e})();ch.Node3D=jht;var $ht=(function(){function e(o,t,n){var i=this;n===void 0&&(n=1),this.nodes=o,this.links=t,this.idealLinkLength=n,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var s=0;s"u"&&(d[C]=Math.random())}i.result[0][u]=d.x,i.result[1][u]=d.y,i.result[2][u]=d.z})}return e.prototype.linkLength=function(o){return o.actualLength(this.result)},e.prototype.start=function(o){var t=this;o===void 0&&(o=100);var n=this.nodes.length,i=new Uht;this.useJaccardLinkLengths&&Hht.jaccardLinkLengths(this.links,i,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var s=new qht.Calculator(n,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=MI.Descent.createSquareMatrix(n,function(C,x){return s[C][x]}),u=MI.Descent.createSquareMatrix(n,function(){return 2});this.links.forEach(function(C){var x=C.source,y=C.target;return u[x][y]=u[y][x]=1}),this.descent=new MI.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new zht.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var f=0;f{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var DI=Pu(),Wht=TI();function Qht(e,o,t,n){e.cola.start(0,0,0,10,!1);var i=Yht(e.cola.nodes(),e.cola.groups(),t,n);return i.routeEdges(e.powerGraph.powerEdges,o,function(s){return s.source.routerNode.id},function(s){return s.target.routerNode.id})}Iy.gridify=Qht;function Yht(e,o,t,n){e.forEach(function(s){s.routerNode={name:s.name,bounds:s.bounds.inflate(-t)}}),o.forEach(function(s){s.routerNode={bounds:s.bounds.inflate(-n),children:(typeof s.groups<"u"?s.groups.map(function(d){return e.length+d.id}):[]).concat(typeof s.leaves<"u"?s.leaves.map(function(d){return d.index}):[])}});var i=e.concat(o).map(function(s,d){return s.routerNode.id=d,s.routerNode});return new Wht.GridRouter(i,{getChildren:function(s){return s.children},getBounds:function(s){return s.bounds}},t-n)}function Jht(e,o,t){var n;e.nodes.forEach(function(u,f){return u.index=f}),new DI.Layout().avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups(function(u){n=u,n.groups.forEach(function(f){return f.padding=t})});var i=e.nodes.length,s=[],d=e.nodes.slice(0);return d.forEach(function(u,f){return u.index=f}),n.groups.forEach(function(u){var f=u.index=u.id+i;d.push(u),typeof u.leaves<"u"&&u.leaves.forEach(function(_){return s.push({source:f,target:_.index})}),typeof u.groups<"u"&&u.groups.forEach(function(_){return s.push({source:f,target:_.id+i})})}),n.powerEdges.forEach(function(u){s.push({source:u.source.index,target:u.target.index})}),new DI.Layout().size(o).nodes(d).links(s).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new DI.Layout().convergenceThreshold(.001).size(o).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(u){n=u,n.groups.forEach(function(f){f.padding=t})}).start(50,0,100,0,!1),powerGraph:n}}Iy.powerGraphGridLayout=Jht});var NK=pt(Oy=>{"use strict";function Kr(e){for(var o in e)Oy.hasOwnProperty(o)||(Oy[o]=e[o])}Object.defineProperty(Oy,"__esModule",{value:!0});Kr(EK());Kr(FK());Kr(hy());Kr(CI());Kr(TI());Kr(vI());Kr(Pu());Kr(BK());Kr(fy());Kr(aI());Kr(uI());Kr(cI());Kr(wu());Kr(oh());Kr(Cy());Kr(RK())});var MO=pt((jX,TO)=>{(function(e){typeof jX=="object"&&typeof TO<"u"?TO.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})(function(){return(function e(o,t,n){function i(u,f){if(!t[u]){if(!o[u]){var _=typeof Ds=="function"&&Ds;if(!f&&_)return _(u,!0);if(s)return s(u,!0);var C=new Error("Cannot find module '"+u+"'");throw C.code="MODULE_NOT_FOUND",C}var x=t[u]={exports:{}};o[u][0].call(x.exports,function(y){return i(o[u][1][y]||y)},x,x.exports,e,o,t,n)}return t[u].exports}for(var s=typeof Ds=="function"&&Ds,d=0;d{let M=this.workbook.addWorksheet(y.sheetName),D=y.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],k=y.map||function(U){if(U==="")return null;let J=Number(U);if(!Number.isNaN(J)&&J!==1/0)return J;let re=D.reduce((ae,se)=>{if(ae)return ae;let _e=u(U,se,!0);return _e.isValid()?_e:null},null);if(re)return new Date(re.valueOf());let ee=C[U];return ee!==void 0?ee:U},z=i.parse(y.parserOptions).on("data",U=>{M.addRow(U.map(k))}).on("end",()=>{z.emit("worksheet",M)});z.on("worksheet",P).on("error",S),x.pipe(z)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(x,y){return new Promise((P,S)=>{y=y||{};let M=this.workbook.getWorksheet(y.sheetName||y.sheetId),D=i.format(y.formatterOptions);x.on("finish",()=>{P()}),D.on("error",S),D.pipe(x);let{dateFormat:k,dateUTC:z}=y,U=y.map||(ee=>{if(ee){if(ee.text||ee.hyperlink)return ee.hyperlink||ee.text||"";if(ee.formula||ee.result)return ee.result||"";if(ee instanceof Date)return k?z?u.utc(ee).format(k):u(ee).format(k):z?u.utc(ee).format():u(ee).format();if(ee.error)return ee.error;if(typeof ee=="object")return JSON.stringify(ee)}return ee}),J=y.includeEmptyRows===void 0||y.includeEmptyRows,re=1;M&&M.eachRow((ee,ae)=>{if(J)for(;re++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,u)if(typeof u=="string"){let _=n.decodeAddress(u);this.nativeCol=_.col+f,this.nativeColOff=0,this.nativeRow=_.row+f,this.nativeRowOff=0}else u.nativeCol!==void 0?(this.nativeCol=u.nativeCol||0,this.nativeColOff=u.nativeColOff||0,this.nativeRow=u.nativeRow||0,this.nativeRowOff=u.nativeRowOff||0):u.col!==void 0?(this.col=u.col+f,this.row=u.row+f):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof i||d==null?d:new i(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}o.exports=i},{"../utils/col-cache":19}],3:[function(e,o,t){"use strict";let n=e("../utils/col-cache"),i=e("../utils/under-dash"),s=e("./enums"),{slideFormula:d}=e("../utils/shared-formula"),u=e("./note");class f{constructor(x,y,P){if(!x||!y)throw new Error("A Cell needs a Row");this._row=x,this._column=y,n.validateAddress(P),this._address=P,this._value=_.create(f.Types.Null,this),this.style=this._mergeStyle(x.style,y.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(x){this.style.numFmt=x}get font(){return this.style.font}set font(x){this.style.font=x}get alignment(){return this.style.alignment}set alignment(x){this.style.alignment=x}get border(){return this.style.border}set border(x){this.style.border=x}get fill(){return this.style.fill}set fill(x){this.style.fill=x}get protection(){return this.style.protection}set protection(x){this.style.protection=x}_mergeStyle(x,y,P){let S=x&&x.numFmt||y&&y.numFmt;S&&(P.numFmt=S);let M=x&&x.font||y&&y.font;M&&(P.font=M);let D=x&&x.alignment||y&&y.alignment;D&&(P.alignment=D);let k=x&&x.border||y&&y.border;k&&(P.border=k);let z=x&&x.fill||y&&y.fill;z&&(P.fill=z);let U=x&&x.protection||y&&y.protection;return U&&(P.protection=U),P}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===f.Types.Merge}merge(x,y){this._value.release(),this._value=_.create(f.Types.Merge,this,x),y||(this.style=x.style)}unmerge(){this.type===f.Types.Merge&&(this._value.release(),this._value=_.create(f.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(x){return this._value.type===f.Types.Merge&&this._value.isMergedTo(x)}get master(){return this.type===f.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===f.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(x){this.type!==f.Types.Merge?(this._value.release(),this._value=_.create(_.getType(x),this,x)):this._value.master.value=x}get note(){return this._comment&&this._comment.note}set note(x){this._comment=new u(x)}get text(){return this._value.toString()}get html(){return i.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(x){this.type===f.Types.String&&(this._value=_.create(f.Types.Hyperlink,this,{text:this._value.value,hyperlink:x}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:x}=this._row;return{sheetName:x.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(x){this.names=[x]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(x){let{definedNames:y}=this.workbook;y.removeAllNames(this.fullAddress),x.forEach(P=>{y.addEx(this.fullAddress,P)})}addName(x){this.workbook.definedNames.addEx(this.fullAddress,x)}removeName(x){this.workbook.definedNames.removeEx(this.fullAddress,x)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(x){this._dataValidations.add(this.address,x)}get model(){let{model:x}=this._value;return x.style=this.style,this._comment&&(x.comment=this._comment.model),x}set model(x){if(this._value.release(),this._value=_.create(x.type,this),this._value.model=x,x.comment)switch(x.comment.type){case"note":this._comment=u.fromModel(x.comment)}x.style?this.style=x.style:this.style={}}}f.Types=s.ValueType;let _={getType:C=>C==null?f.Types.Null:C instanceof String||typeof C=="string"?f.Types.String:typeof C=="number"?f.Types.Number:typeof C=="boolean"?f.Types.Boolean:C instanceof Date?f.Types.Date:C.text&&C.hyperlink?f.Types.Hyperlink:C.formula||C.sharedFormula?f.Types.Formula:C.richText?f.Types.RichText:C.sharedString?f.Types.SharedString:C.error?f.Types.Error:f.Types.JSON,types:[{t:f.Types.Null,f:class{constructor(C){this.model={address:C.address,type:f.Types.Null}}get value(){return null}set value(C){}get type(){return f.Types.Null}get effectiveType(){return f.Types.Null}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){}toString(){return""}}},{t:f.Types.Number,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Number,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Number}get effectiveType(){return f.Types.Number}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.String,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.String}get effectiveType(){return f.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:f.Types.Date,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Date,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Date}get effectiveType(){return f.Types.Date}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.Hyperlink,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Hyperlink,text:x?x.text:void 0,hyperlink:x?x.hyperlink:void 0},x&&x.tooltip&&(this.model.tooltip=x.tooltip)}get value(){let C={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(C.tooltip=this.model.tooltip),C}set value(C){this.model={text:C.text,hyperlink:C.hyperlink},C.tooltip&&(this.model.tooltip=C.tooltip)}get text(){return this.model.text}set text(C){this.model.text=C}get hyperlink(){return this.model.hyperlink}set hyperlink(C){this.model.hyperlink=C}get type(){return f.Types.Hyperlink}get effectiveType(){return f.Types.Hyperlink}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:f.Types.Formula,f:class{constructor(C,x){this.cell=C,this.model={address:C.address,type:f.Types.Formula,shareType:x?x.shareType:void 0,ref:x?x.ref:void 0,formula:x?x.formula:void 0,sharedFormula:x?x.sharedFormula:void 0,result:x?x.result:void 0}}_copyModel(C){let x={},y=P=>{let S=C[P];S&&(x[P]=S)};return y("formula"),y("result"),y("ref"),y("shareType"),y("sharedFormula"),x}get value(){return this._copyModel(this.model)}set value(C){this.model=this._copyModel(C)}validate(C){switch(_.getType(C)){case f.Types.Null:case f.Types.String:case f.Types.Number:case f.Types.Date:break;case f.Types.Hyperlink:case f.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(C){this.model.formula=C}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(C){this.model.result=C}get type(){return f.Types.Formula}get effectiveType(){let C=this.model.result;return C==null?s.ValueType.Null:C instanceof String||typeof C=="string"?s.ValueType.String:typeof C=="number"?s.ValueType.Number:C instanceof Date?s.ValueType.Date:C.text&&C.hyperlink?s.ValueType.Hyperlink:C.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(C){this.model.address=C}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:C}=this.cell,x=C.findCell(this.model.sharedFormula);this._translatedFormula=x&&d(x.formula,x.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:f.Types.Merge,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Merge,master:x?x.address:void 0},this._master=x,x&&x.addMergeRef()}get value(){return this._master.value}set value(C){C instanceof f?(this._master&&this._master.releaseMergeRef(),C.addMergeRef(),this._master=C):this._master.value=C}isMergedTo(C){return C===this._master}get master(){return this._master}get type(){return f.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:f.Types.JSON,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:JSON.stringify(x),rawValue:x}}get value(){return this.model.rawValue}set value(C){this.model.rawValue=C,this.model.value=JSON.stringify(C)}get type(){return f.Types.String}get effectiveType(){return f.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:f.Types.SharedString,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.SharedString,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.SharedString}get effectiveType(){return f.Types.SharedString}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.RichText,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.String,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}toString(){return this.model.value.richText.map(C=>C.text).join("")}get type(){return f.Types.RichText}get effectiveType(){return f.Types.RichText}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:f.Types.Boolean,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Boolean,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Boolean}get effectiveType(){return f.Types.Boolean}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:f.Types.Error,f:class{constructor(C,x){this.model={address:C.address,type:f.Types.Error,value:x}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return f.Types.Error}get effectiveType(){return f.Types.Error}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((C,x)=>(C[x.t]=x.f,C),[]),create(C,x,y){let P=this.types[C];if(!P)throw new Error("Could not create Value of type "+C);return new P(x,y)}};o.exports=f},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache");class d{constructor(f,_,C){this._worksheet=f,this._number=_,C!==!1&&(this.defn=C)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(f){f?(this.key=f.key,this.width=f.width!==void 0?f.width:9,this.outlineLevel=f.outlineLevel,f.style?this.style=f.style:this.style={},this.header=f.header,this._hidden=!!f.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(f){f!==void 0?(this._header=f,this.headers.forEach((_,C)=>{this._worksheet.getCell(C+1,this.number).value=_})):this._header=void 0}get key(){return this._key}set key(f){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=f,f&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(f){this._hidden=f}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(f){this._outlineLevel=f}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(f){return this.width===f.width&&this.hidden===f.hidden&&this.outlineLevel===f.outlineLevel&&n.isEqual(this.style,f.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let f=this.style;return!f||!(f.font||f.numFmt||f.alignment||f.border||f.fill||f.protection)}get headerCount(){return this.headers.length}eachCell(f,_){let C=this.number;_||(_=f,f=null),this._worksheet.eachRow(f,(x,y)=>{_(x.getCell(C),y)})}get values(){let f=[];return this.eachCell((_,C)=>{_&&_.type!==i.ValueType.Null&&(f[C]=_.value)}),f}set values(f){if(!f)return;let _=this.number,C=0;f.hasOwnProperty("0")&&(C=1),f.forEach((x,y)=>{this._worksheet.getCell(y+C,_).value=x})}_applyStyle(f,_){return this.style[f]=_,this.eachCell(C=>{C[f]=_}),_}get numFmt(){return this.style.numFmt}set numFmt(f){this._applyStyle("numFmt",f)}get font(){return this.style.font}set font(f){this._applyStyle("font",f)}get alignment(){return this.style.alignment}set alignment(f){this._applyStyle("alignment",f)}get protection(){return this.style.protection}set protection(f){this._applyStyle("protection",f)}get border(){return this.style.border}set border(f){this._applyStyle("border",f)}get fill(){return this.style.fill}set fill(f){this._applyStyle("fill",f)}static toModel(f){let _=[],C=null;return f&&f.forEach((x,y)=>{x.isDefault?C&&(C=null):C&&x.equivalentTo(C)?C.max=y+1:(C={min:y+1,max:y+1,width:x.width!==void 0?x.width:9,style:x.style,isCustomWidth:x.isCustomWidth,hidden:x.hidden,outlineLevel:x.outlineLevel,collapsed:x.collapsed},_.push(C))}),_.length?_:void 0}static fromModel(f,_){let C=[],x=1,y=0;for(_=(_=_||[]).sort(function(P,S){return P.min-S.min});y<_.length;){let P=_[y++];for(;x{_.removeCellEx(f)})}forEach(f){n.each(this.matrixMap,(_,C)=>{_.forEach(x=>{f(C,x)})})}getNames(f){return this.getNamesEx(i.decodeEx(f))}getNamesEx(f){return n.map(this.matrixMap,(_,C)=>_.findCellEx(f)&&C).filter(Boolean)}_explore(f,_){_.mark=!1;let{sheetName:C}=_,x=new d(_.row,_.col,_.row,_.col,C),y,P;function S(D,k){let z=f.findCellAt(C,D,_.col);return!(!z||!z.mark)&&(x[k]=D,z.mark=!1,!0)}for(P=_.row-1;S(P,"top");P--);for(P=_.row+1;S(P,"bottom");P++);function M(D,k){let z=[];for(P=x.top;P<=x.bottom;P++){let U=f.findCellAt(C,P,D);if(!U||!U.mark)return!1;z.push(U)}x[k]=D;for(let U=0;U{C.mark=!0}),{name:f,ranges:_.map(C=>C.mark&&this._explore(_,C)).filter(Boolean).map(C=>C.$shortRange)}):{name:f,ranges:[]}}normaliseMatrix(f,_){f.forEachInSheet(_,(C,x,y)=>{C&&(C.row===x&&C.col===y||(C.row=x,C.col=y,C.address=i.n2l(y)+x))})}spliceRows(f,_,C,x){n.each(this.matrixMap,y=>{y.spliceRows(f,_,C,x),this.normaliseMatrix(y,f)})}spliceColumns(f,_,C,x){n.each(this.matrixMap,y=>{y.spliceColumns(f,_,C,x),this.normaliseMatrix(y,f)})}get model(){return n.map(this.matrixMap,(f,_)=>this.getRanges(_,f)).filter(f=>f.ranges.length)}set model(f){let _=this.matrixMap={};f.forEach(C=>{let x=_[C.name]=new s;C.ranges.forEach(y=>{u.test(y.split("!").pop()||"")&&x.addCell(y)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,o,t){"use strict";o.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,o,t){"use strict";let n=e("../utils/col-cache"),i=e("./anchor");o.exports=class{constructor(s,d){this.worksheet=s,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:d,imageId:u,range:f,hyperlinks:_}=s;if(this.type=d,this.imageId=u,d==="image")if(typeof f=="string"){let C=n.decode(f);this.range={tl:new i(this.worksheet,{col:C.left,row:C.top},-1),br:new i(this.worksheet,{col:C.right,row:C.bottom},0),editAs:"oneCell"}}else this.range={tl:new i(this.worksheet,f.tl,0),br:f.br&&new i(this.worksheet,f.br,0),ext:f.ext,editAs:f.editAs,hyperlinks:_||f.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,o,t){"use strict";let n=e("../utils/under-dash");class i{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return n.deepMerge({},i.DEFAULT_CONFIGS,d)}set model(d){let{note:u}=d,{texts:f}=u;f.length===1&&Object.keys(f[0]).length===1?this.note=f[0].text:this.note=u}static fromModel(d){let u=new i;return u.model=d,u}}i.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},o.exports=i},{"../utils/under-dash":26}],10:[function(e,o,t){"use strict";let n=e("../utils/col-cache");class i{constructor(){this.decode(arguments)}setTLBR(d,u,f,_,C){if(arguments.length<4){let x=n.decodeAddress(d),y=n.decodeAddress(u);this.model={top:Math.min(x.row,y.row),left:Math.min(x.col,y.col),bottom:Math.max(x.row,y.row),right:Math.max(x.col,y.col),sheetName:f},this.setTLBR(x.row,x.col,y.row,y.col,C)}else this.model={top:Math.min(d,f),left:Math.min(u,_),bottom:Math.max(d,f),right:Math.max(u,_),sheetName:C}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{let u=d[0];if(u instanceof i)this.model={top:u.model.top,left:u.model.left,bottom:u.model.bottom,right:u.model.right,sheetName:u.sheetName};else if(u instanceof Array)this.decode(u);else if(u.top&&u.left&&u.bottom&&u.right)this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName};else{let f=n.decodeEx(u);f.top?this.model={top:f.top,left:f.left,bottom:f.bottom,right:f.right,sheetName:f.sheetName}:this.model={top:f.row,left:f.col,bottom:f.row,right:f.col,sheetName:f.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){let{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,u,f,_){(!this.model.top||dthis.bottom)&&(this.bottom=f),(!this.model.right||_>this.right)&&(this.right=_)}expandRow(d){if(d){let{dimensions:u,number:f}=d;u&&this.expand(f,u.min,f,u.max)}}expandToAddress(d){let u=n.decodeEx(d);this.expand(u.row,u.col,u.row,u.col)}get tl(){return n.n2l(this.left)+this.top}get $t$l(){return`$${n.n2l(this.left)}$${this.top}`}get br(){return n.n2l(this.right)+this.bottom}get $b$r(){return`$${n.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottomthis.bottom)&&!(d.rightthis.right)}contains(d){let u=n.decodeEx(d);return this.containsEx(u)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let u=this.left;u<=this.right;u++)for(let f=this.top;f<=this.bottom;f++)d(n.encodeAddress(f,u),f,u)}}o.exports=i},{"../utils/col-cache":19}],11:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache"),d=e("./cell");o.exports=class{constructor(u,f){this._worksheet=u,this._number=f,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(u){return this._cells[u-1]}getCellEx(u){let f=this._cells[u.col-1];if(!f){let _=this._worksheet.getColumn(u.col);f=new d(this,_,u.address),this._cells[u.col-1]=f}return f}getCell(u){if(typeof u=="string"){let f=this._worksheet.getColumnKey(u);u=f?f.number:s.l2n(u)}return this._cells[u-1]||this.getCellEx({address:s.encodeAddress(this._number,u),row:this._number,col:u})}splice(u,f){let _=u+f;for(var C=arguments.length,x=new Array(C>2?C-2:0),y=2;y0)for(M=S;M>=_;M--)D=this._cells[M-1],D?(k=this.getCell(M+P),k.value=D.value,k.style=D.style,k._comment=D._comment):this._cells[M+P-1]=void 0;for(M=0;M{_&&_.type!==i.ValueType.Null&&f(_,C+1)})}addPageBreak(u,f){let _=this._worksheet,C=Math.max(0,u-1)||0,x=Math.max(0,f-1)||16838,y={id:this._number,max:x,man:1};C&&(y.min=C),_.rowBreaks.push(y)}get values(){let u=[];return this._cells.forEach(f=>{f&&f.type!==i.ValueType.Null&&(u[f.col]=f.value)}),u}set values(u){if(this._cells=[],u)if(u instanceof Array){let f=0;u.hasOwnProperty("0")&&(f=1),u.forEach((_,C)=>{_!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,C+f),row:this._number,col:C+f}).value=_)})}else this._worksheet.eachColumnKey((f,_)=>{u[_]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,f.number),row:this._number,col:f.number}).value=u[_])})}get hasValues(){return n.some(this._cells,u=>u&&u.type!==i.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let u=0;return this.eachCell(()=>{u++}),u}get dimensions(){let u=0,f=0;return this._cells.forEach(_=>{_&&_.type!==i.ValueType.Null&&((!u||u>_.col)&&(u=_.col),f<_.col&&(f=_.col))}),u>0?{min:u,max:f}:null}_applyStyle(u,f){return this.style[u]=f,this._cells.forEach(_=>{_&&(_[u]=f)}),f}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let u=[],f=0,_=0;return this._cells.forEach(C=>{if(C){let x=C.model;x&&((!f||f>C.col)&&(f=C.col),_{switch(_.type){case d.Types.Merge:break;default:{let C;if(_.address)C=s.decodeAddress(_.address);else if(f){let{row:x}=f,y=f.col+1;C={row:x,col:y,address:s.encodeAddress(x,y),$col$row:`$${s.n2l(y)}$${x}`}}f=C,this.getCellEx(C).model=_;break}}}),u.height?this.height=u.height:delete this.height,this.hidden=u.hidden,this.outlineLevel=u.outlineLevel||0,this.style=u.style&&JSON.parse(JSON.stringify(u.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,o,t){"use strict";let n=e("../utils/col-cache");class i{constructor(d,u,f){this.table=d,this.column=u,this.index=f}_set(d,u){this.table.cacheState(),this.column[d]=u}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}o.exports=class{constructor(s,d){this.worksheet=s,d&&(this.table=d,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,d=(P,S,M)=>{P[S]===void 0&&(P[S]=M)};d(s,"headerRow",!0),d(s,"totalsRow",!1),d(s,"style",{}),d(s.style,"theme","TableStyleMedium2"),d(s.style,"showFirstColumn",!1),d(s.style,"showLastColumn",!1),d(s.style,"showRowStripes",!1),d(s.style,"showColumnStripes",!1);let u=(P,S)=>{if(!P)throw new Error(S)};u(s.ref,"Table must have ref"),u(s.columns,"Table must have column definitions"),u(s.rows,"Table must have row definitions"),s.tl=n.decodeAddress(s.ref);let{row:f,col:_}=s.tl;u(f>0,"Table must be on valid row"),u(_>0,"Table must be on valid col");let{width:C,filterHeight:x,tableHeight:y}=this;s.autoFilterRef=n.encode(f,_,f+x-1,_+C-1),s.tableRef=n.encode(f,_,f+y-1,_+C-1),s.columns.forEach((P,S)=>{u(P.name,`Column ${S} must have a name`),S===0?d(P,"totalsRowLabel","Total"):(d(P,"totalsRowFunction","none"),P.totalsRowFormula=this.getFormula(P))})}store(){let s=(x,y)=>{y&&Object.keys(y).forEach(P=>{x[P]=y[P]})},{worksheet:d,table:u}=this,{row:f,col:_}=u.tl,C=0;if(u.headerRow){let x=d.getRow(f+C++);u.columns.forEach((y,P)=>{let{style:S,name:M}=y,D=x.getCell(_+P);D.value=M,s(D,S)})}if(u.rows.forEach(x=>{let y=d.getRow(f+C++);x.forEach((P,S)=>{let M=y.getCell(_+S);M.value=P,s(M,u.columns[S].style)})}),u.totalsRow){let x=d.getRow(f+C++);u.columns.forEach((y,P)=>{let S=x.getCell(_+P);if(P===0)S.value=y.totalsRowLabel;else{let M=this.getFormula(y);S.value=M?{formula:y.totalsRowFormula,result:y.totalsRowResult}:null}s(S,y.style)})}}load(s){let{table:d}=this,{row:u,col:f}=d.tl,_=0;if(d.headerRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{C.getCell(f+y).value=x.name})}if(d.rows.forEach(C=>{let x=s.getRow(u+_++);C.forEach((y,P)=>{x.getCell(f+P).value=y})}),d.totalsRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{let P=C.getCell(f+y);y===0?P.value=x.totalsRowLabel:this.getFormula(x)&&(P.value={formula:x.totalsRowFormula,result:x.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,d)}getColumn(s){let d=this.table.columns[s];return new i(this,d,s)}addColumn(s,d,u){this.cacheState(),u===void 0?(this.table.columns.push(s),this.table.rows.forEach((f,_)=>{f.push(d[_])})):(this.table.columns.splice(u,0,s),this.table.rows.forEach((f,_)=>{f.splice(u,0,d[_])}))}removeColumns(s){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,d),this.table.rows.forEach(u=>{u.splice(s,d)})}_assign(s,d,u){this.cacheState(),s[d]=u}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,o,t){"use strict";let n=e("./worksheet"),i=e("./defined-names"),s=e("../xlsx/xlsx"),d=e("../csv/csv");o.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new i}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let u=1;u(S&&S.orderNo)>P?S.orderNo:P,0),x=Object.assign({},f,{id:_,name:u,orderNo:C+1,workbook:this}),y=new n(x);return this._worksheets[_]=y,y}removeWorksheetEx(u){delete this._worksheets[u.id]}removeWorksheet(u){let f=this.getWorksheet(u);f&&f.destroy()}getWorksheet(u){return u===void 0?this._worksheets.find(Boolean):typeof u=="number"?this._worksheets[u]:typeof u=="string"?this._worksheets.find(f=>f&&f.name===u):void 0}get worksheets(){return this._worksheets.slice(1).sort((u,f)=>u.orderNo-f.orderNo).filter(Boolean)}eachSheet(u){this.worksheets.forEach(f=>{u(f,f.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(u){let f=this.media.length;return this.media.push(Object.assign({},u,{type:"image"})),f}getImage(u){return this.media[u]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(u=>u.model),sheets:this.worksheets.map(u=>u.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(u){this.creator=u.creator,this.lastModifiedBy=u.lastModifiedBy,this.lastPrinted=u.lastPrinted,this.created=u.created,this.modified=u.modified,this.company=u.company,this.manager=u.manager,this.title=u.title,this.subject=u.subject,this.keywords=u.keywords,this.category=u.category,this.description=u.description,this.language=u.language,this.revision=u.revision,this.contentStatus=u.contentStatus,this.properties=u.properties,this.calcProperties=u.calcProperties,this._worksheets=[],u.worksheets.forEach(f=>{let{id:_,name:C,state:x}=f,y=u.sheets&&u.sheets.findIndex(P=>P.id===_);(this._worksheets[_]=new n({id:_,name:C,orderNo:y,state:x,workbook:this})).model=f}),this._definedNames.model=u.definedNames,this.views=u.views,this._themes=u.themes,this.media=u.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,o,t){"use strict";let n=e("../utils/under-dash"),i=e("../utils/col-cache"),s=e("./range"),d=e("./row"),u=e("./column"),f=e("./enums"),_=e("./image"),C=e("./table"),x=e("./data-validations"),y=e("../utils/encryptor"),{copyStyle:P}=e("../utils/copy-style");o.exports=class{constructor(S){S=S||{},this._workbook=S.workbook,this.id=S.id,this.orderNo=S.orderNo,this.name=S.name,this.state=S.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},S.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!S.pageSetup||!S.pageSetup.fitToWidth&&!S.pageSetup.fitToHeight||S.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},S.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},S.headerFooter),this.dataValidations=new x,this.views=S.views||[],this.autoFilter=S.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(S){if(S===void 0&&(S="sheet"+this.id),this._name!==S){if(typeof S!="string")throw new Error("The name has to be a string.");if(S==="")throw new Error("The name can't be empty.");if(S==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(S))throw new Error(`Worksheet name ${S} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(S))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+S);if(S&&S.length>31&&(console.warn(`Worksheet name ${S} exceeds 31 chars. This will be truncated`),S=S.substring(0,31)),this._workbook._worksheets.find(M=>M&&M.name.toLowerCase()===S.toLowerCase()))throw new Error("Worksheet name already exists: "+S);this._name=S}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let S=new s;return this._rows.forEach(M=>{if(M){let D=M.dimensions;D&&S.expand(M.number,D.min,M.number,D.max)}}),S}get columns(){return this._columns}set columns(S){this._headerRowCount=S.reduce((k,z)=>{let U=(z.header?1:z.headers&&z.headers.length)||0;return Math.max(k,U)},0);let M=1,D=this._columns=[];S.forEach(k=>{let z=new u(this,M++,!1);D.push(z),z.defn=k})}getColumnKey(S){return this._keys[S]}setColumnKey(S,M){this._keys[S]=M}deleteColumnKey(S){delete this._keys[S]}eachColumnKey(S){n.each(this._keys,S)}getColumn(S){if(typeof S=="string"){let M=this._keys[S];if(M)return M;S=i.l2n(S)}if(this._columns||(this._columns=[]),S>this._columns.length){let M=this._columns.length+1;for(;M<=S;)this._columns.push(new u(this,M++))}return this._columns[S-1]}spliceColumns(S,M){let D=this._rows.length;for(var k=arguments.length,z=new Array(k>2?k-2:0),U=2;U0)for(let ae=0;ae{se.push(de[ae]||null)});let _e=this.getRow(ae+1);_e.splice.apply(_e,se)}else this._rows.forEach(ae=>{ae&&ae.splice(S,M)});let J=z.length-M,re=S+M,ee=this._columns.length;if(J<0)for(let ae=S+z.length;ae<=ee;ae++)this.getColumn(ae).defn=this.getColumn(ae-J).defn;else if(J>0)for(let ae=ee;ae>=re;ae--)this.getColumn(ae+J).defn=this.getColumn(ae).defn;for(let ae=S;ae{S=Math.max(S,M.cellCount)}),S}get actualColumnCount(){let S=[],M=0;return this.eachRow(D=>{D.eachCell(k=>{let{col:z}=k;S[z]||(S[z]=!0,M++)})}),M}_commitRow(){}get _lastRowNumber(){let S=this._rows,M=S.length;for(;M>0&&S[M-1]===void 0;)M--;return M}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(S){return this._rows[S-1]}findRows(S,M){return this._rows.slice(S-1,S-1+M)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let S=0;return this.eachRow(()=>{S++}),S}getRow(S){let M=this._rows[S-1];return M||(M=this._rows[S-1]=new d(this,S)),M}getRows(S,M){if(M<1)return;let D=[];for(let k=S;k1&&arguments[1]!==void 0?arguments[1]:"n",D=this._nextRow,k=this.getRow(D);return k.values=S,this._setStyleOption(D,M[0]==="i"?M:"n"),k}addRows(S){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",D=[];return S.forEach(k=>{D.push(this.addRow(k,M))}),D}insertRow(S,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(S,0,M),this._setStyleOption(S,D),this.getRow(S)}insertRows(S,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(S,0,...M),D!=="n")for(let k=0;k1&&arguments[1]!==void 0?arguments[1]:"n";M[0]==="o"&&this.findRow(S+1)!==void 0?this._copyStyle(S+1,S,M[1]==="+"):M[0]==="i"&&this.findRow(S-1)!==void 0&&this._copyStyle(S-1,S,M[1]==="+")}_copyStyle(S,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this.getRow(S),z=this.getRow(M);z.style=P(k.style),k.eachCell({includeEmpty:D},(U,J)=>{z.getCell(J).style=P(U.style)}),z.height=k.height}duplicateRow(S,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],k=this._rows[S-1],z=new Array(M).fill(k.values);this.spliceRows(S+1,D?0:M,...z);for(let U=0;U{J.getCell(ee).style=re.style})}}spliceRows(S,M){let D=S+M;for(var k=arguments.length,z=new Array(k>2?k-2:0),U=2;U{_e.getCell(j).style=de.style}),this._rows[ae-1]=void 0}else this._rows[ae+re-1]=void 0;else if(re>0)for(ae=ee;ae>=D;ae--)if(se=this._rows[ae-1],se){let _e=this.getRow(ae+re);_e.values=se.values,_e.style=se.style,_e.height=se.height,se.eachCell({includeEmpty:!0},(de,j)=>{if(_e.getCell(j).style=de.style,de._value.constructor.name==="MergeValue"){let W=this.getRow(de._row._number+J).getCell(j),pe=de._value._master,O=this.getRow(pe._row._number+J).getCell(pe._column._number);W.merge(O)}})}else this._rows[ae+re-1]=void 0;for(ae=0;ae{D&&D.hasValues&&M(D,D.number)})}getSheetValues(){let S=[];return this._rows.forEach(M=>{M&&(S[M.number]=M.values)}),S}findCell(S,M){let D=i.getAddress(S,M),k=this._rows[D.row-1];return k?k.findCell(D.col):void 0}getCell(S,M){let D=i.getAddress(S,M);return this.getRow(D.row).getCellEx(D)}mergeCells(){for(var S=arguments.length,M=new Array(S),D=0;D{if(k.intersects(S))throw new Error("Cannot merge already merged cells")});let D=this.getCell(S.top,S.left);for(let k=S.top;k<=S.bottom;k++)for(let z=S.left;z<=S.right;z++)(k>S.top||z>S.left)&&this.getCell(k,z).merge(D,M);this._merges[D.address]=S}_unMergeMaster(S){let M=this._merges[S.address];if(M){for(let D=M.top;D<=M.bottom;D++)for(let k=M.left;k<=M.right;k++)this.getCell(D,k).unmerge();delete this._merges[S.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var S=arguments.length,M=new Array(S),D=0;D3&&arguments[3]!==void 0?arguments[3]:"shared",z=i.decode(S),{top:U,left:J,bottom:re,right:ee}=z,ae=ee-J+1,se=i.encodeAddress(U,J),_e=k==="shared",de;de=typeof D=="function"?D:Array.isArray(D)?Array.isArray(D[0])?(W,pe)=>D[W-U][pe-J]:(W,pe)=>D[(W-U)*ae+(pe-J)]:()=>{};let j=!0;for(let W=U;W<=re;W++)for(let pe=J;pe<=ee;pe++)j?(this.getCell(W,pe).value={shareType:k,formula:M,ref:S,result:de(W,pe)},j=!1):this.getCell(W,pe).value=_e?{sharedFormula:se,result:de(W,pe)}:de(W,pe)}addImage(S,M){let D={type:"image",imageId:S,range:M};this._media.push(new _(this,D))}getImages(){return this._media.filter(S=>S.type==="image")}addBackgroundImage(S){let M={type:"background",imageId:S};this._media.push(new _(this,M))}getBackgroundImageId(){let S=this._media.find(M=>M.type==="background");return S&&S.imageId}protect(S,M){return new Promise(D=>{this.sheetProtection={sheet:!0},M&&"spinCount"in M&&(M.spinCount=Number.isFinite(M.spinCount)?Math.round(Math.max(0,M.spinCount)):1e5),S&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=y.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=M&&"spinCount"in M?M.spinCount:1e5,this.sheetProtection.hashValue=y.convertPasswordToHash(S,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),M&&(this.sheetProtection=Object.assign(this.sheetProtection,M),!S&&"spinCount"in M&&delete this.sheetProtection.spinCount),D()})}unprotect(){this.sheetProtection=null}addTable(S){let M=new C(this,S);return this.tables[S.name]=M,M}getTable(S){return this.tables[S]}removeTable(S){delete this.tables[S]}getTables(){return Object.values(this.tables)}addConditionalFormatting(S){this.conditionalFormattings.push(S)}removeConditionalFormatting(S){typeof S=="number"?this.conditionalFormattings.splice(S,1):this.conditionalFormattings=S instanceof Function?this.conditionalFormattings.filter(S):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(S){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=S}get model(){let S={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(k=>k.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(k=>k.model),conditionalFormattings:this.conditionalFormattings};S.cols=u.toModel(this.columns);let M=S.rows=[],D=S.dimensions=new s;return this._rows.forEach(k=>{let z=k&&k.model;z&&(D.expand(z.number,z.min,z.number,z.max),M.push(z))}),S.merges=[],n.each(this._merges,k=>{S.merges.push(k.range)}),S}_parseRows(S){this._rows=[],S.rows.forEach(M=>{let D=new d(this,M.number);this._rows[D.number-1]=D,D.model=M})}_parseMergeCells(S){n.each(S.mergeCells,M=>{this.mergeCellsWithoutStyle(M)})}set model(S){this.name=S.name,this._columns=u.fromModel(this,S.cols),this._parseRows(S),this._parseMergeCells(S),this.dataValidations=new x(S.dataValidations),this.properties=S.properties,this.pageSetup=S.pageSetup,this.headerFooter=S.headerFooter,this.views=S.views,this.autoFilter=S.autoFilter,this._media=S.media.map(M=>new _(this,M)),this.sheetProtection=S.sheetProtection,this.tables=S.tables.reduce((M,D)=>{let k=new C;return k.model=D,M[D.name]=k,M},{}),this.conditionalFormattings=S.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,o,t){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let n={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach(s=>{n[s]=i[s]}),o.exports=n},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,o,t){"use strict";let n=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");t.bufferToString=function(i){return typeof i=="string"?i:n?n.decode(i):i.toString()}},{}],17:[function(e,o,t){"use strict";let n=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:i}=e("buffer");t.stringToBuffer=function(s){return typeof s!="string"?s:n?i.from(n.encode(s).buffer):i.from(s)}},{buffer:220}],18:[function(e,o,t){"use strict";let n=e("./under-dash"),i=e("./col-cache");o.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(i.decodeEx(s))}getCell(s){return this.findCellEx(i.decodeEx(s),!0)}findCell(s){return this.findCellEx(i.decodeEx(s),!1)}findCellAt(s,d,u){let f=this.sheets[s],_=f&&f[d];return _&&_[u]}addCellEx(s){if(s.top)for(let d=s.top;d<=s.bottom;d++)for(let u=s.left;u<=s.right;u++)this.getCellAt(s.sheetName,d,u);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,d){let u=this.findSheet(s,d),f=this.findSheetRow(u,s,d);return this.findRowCell(f,s,d)}getCellAt(s,d,u){let f=this.sheets[s]||(this.sheets[s]=[]),_=f[d]||(f[d]=[]);return _[u]||(_[u]={sheetName:s,address:i.n2l(u)+d,row:d,col:u})}removeCellEx(s){let d=this.findSheet(s);if(!d)return;let u=this.findSheetRow(d,s);u&&delete u[s.col]}forEachInSheet(s,d){let u=this.sheets[s];u&&u.forEach((f,_)=>{f&&f.forEach((C,x)=>{C&&d(C,_,x)})})}forEach(s){n.each(this.sheets,(d,u)=>{this.forEachInSheet(u,s)})}map(s){let d=[];return this.forEach(u=>{d.push(s(u))}),d}findSheet(s,d){let u=s.sheetName;return this.sheets[u]?this.sheets[u]:d?this.sheets[u]=[]:void 0}findSheetRow(s,d,u){let{row:f}=d;return s&&s[f]?s[f]:u?s[f]=[]:void 0}findRowCell(s,d,u){let{col:f}=d;return s&&s[f]?s[f]:u?s[f]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(s,d,u,f){let _=this.sheets[s];if(_){let C=[];for(let x=0;x{x.splice(d,u,...C)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,o,t){"use strict";let n=/^[A-Z]+\d+$/,i={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let d,u,f,_,C,x=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;x<=26;)d=this._dictionary[x-1],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(x=27;x<=702;)u=x-27,f=u%26,_=Math.floor(u/26),d=this._dictionary[_]+this._dictionary[f],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(x=703;x<=16384;)u=x-703,f=u%26,_=Math.floor(u/26)%26,C=Math.floor(u/676),d=this._dictionary[C]+this._dictionary[_]+this._dictionary[f],this._n2l[x]=d,this._l2n[d]=x,x++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!n.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let d=s.length<5&&this._hash[s];if(d)return d;let u=!1,f="",_=0,C=!1,x="",y=0;for(let S,M=0;M=65&&S<=90)u=!0,f+=s[M],_=26*_+S-64;else if(S>=48&&S<=57)C=!0,x+=s[M],y=10*y+S-48;else if(C&&u&&S!==36)break;if(u){if(_>16384)throw new Error("Out of bounds. Invalid column letter: "+f)}else _=void 0;C||(y=void 0);let P={address:s=f+x,col:_,row:y,$col$row:`$${f}$${x}`};return _<=100&&y<=100&&(this._hash[s]=P,this._hash[P.$col$row]=P),P},getAddress(s,d){if(d){let u=this.n2l(d)+s;return this.decodeAddress(u)}return this.decodeAddress(s)},decode(s){let d=s.split(":");if(d.length===2){let u=this.decodeAddress(d[0]),f=this.decodeAddress(d[1]),_={top:Math.min(u.row,f.row),left:Math.min(u.col,f.col),bottom:Math.max(u.row,f.row),right:Math.max(u.col,f.col)};return _.tl=this.n2l(_.left)+_.top,_.br=this.n2l(_.right)+_.bottom,_.dimensions=`${_.tl}:${_.br}`,_}return this.decodeAddress(s)},decodeEx(s){let d=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),u=d[1]||d[2],f=d[3],_=f.split(":");if(_.length>1){let x=this.decodeAddress(_[0]),y=this.decodeAddress(_[1]),P=Math.min(x.row,y.row),S=Math.min(x.col,y.col),M=Math.max(x.row,y.row),D=Math.max(x.col,y.col);return x=this.n2l(S)+P,y=this.n2l(D)+M,{top:P,left:S,bottom:M,right:D,sheetName:u,tl:{address:x,col:S,row:P,$col$row:`$${this.n2l(S)}$${P}`,sheetName:u},br:{address:y,col:D,row:M,$col$row:`$${this.n2l(D)}$${M}`,sheetName:u},dimensions:`${x}:${y}`}}if(f.startsWith("#"))return u?{sheetName:u,error:f}:{error:f};let C=this.decodeAddress(f);return u?at({sheetName:u},C):C},encodeAddress:(s,d)=>i.n2l(d)+s,encode(){switch(arguments.length){case 2:return i.encodeAddress(arguments[0],arguments[1]);case 4:return`${i.encodeAddress(arguments[0],arguments[1])}:${i.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,d){let[u,f,,_,C]=s,[x,y]=d;return x>=u&&x<=_&&y>=f&&y<=C}};o.exports=i},{}],20:[function(e,o,t){"use strict";let n=(s,d)=>at(at({},s),d.reduce((u,f)=>(s[f]&&(u[f]=at({},s[f])),u),{})),i=function(s,d,u){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[u]&&(d[u]=n(s[u],f))};t.copyStyle=s=>{if(!s)return s;if(d=s,Object.keys(d).length===0)return{};var d;let u=at({},s);return i(s,u,"font",["color"]),i(s,u,"alignment"),i(s,u,"protection"),s.border&&(i(s,u,"border"),i(s.border,u.border,"top",["color"]),i(s.border,u.border,"left",["color"]),i(s.border,u.border,"bottom",["color"]),i(s.border,u.border,"right",["color"]),i(s.border,u.border,"diagonal",["color"])),s.fill&&(i(s,u,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(u.fill.stops=s.fill.stops.map(f=>n(f,["color"])))),u}},{}],21:[function(e,o,t){(function(n){(function(){"use strict";let i=e("crypto"),s={hash(d){let u=i.createHash(d);for(var f=arguments.length,_=new Array(f>1?f-1:0),C=1;Ci.randomBytes(d)};o.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,o,t){"use strict";let{SaxesParser:n}=e("saxes"),{PassThrough:i}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");o.exports=function(d){return J7(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new i));let u=new n,f;u.on("error",S=>{f=S});let _=[];u.on("opentag",S=>_.push({eventType:"opentag",value:S})),u.on("text",S=>_.push({eventType:"text",value:S})),u.on("closetag",S=>_.push({eventType:"closetag",value:S}));try{for(var C=ug(d),x,y,P;x=!(y=yield new IT(C.next())).done;x=!1){let S=y.value;if(u.write(s(S)),f)throw f;yield _,_=[]}}catch{P=[y]}finally{try{x&&(y=C.return)&&(yield new IT(y.call(C)))}finally{if(P)throw P[0]}}})}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,o,t){"use strict";let n=e("./col-cache"),i=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;o.exports={slideFormula:function(d,u,f){let _=n.decode(u),C=n.decode(f);return d.replace(i,(x,y,P,S,M)=>{if(M)return x;let D=s.exec(S);if(D){let k=D[1],z=D[2].toUpperCase(),U=D[3],J=D[4];if(z.length>3||z.length===3&&z>"XFD")return x;let re=n.l2n(z),ee=parseInt(J,10);return k||(re+=C.col-_.col),U||(ee+=C.row-_.row),(y||"")+(k||"")+n.n2l(re)+(U||"")+ee}return x})}}},{"./col-cache":19}],24:[function(e,o,t){(function(n,i){(function(){"use strict";let s=e("readable-stream"),d=e("./utils"),u=e("./string-buf");class f{constructor(M,D){this._data=M,this._encoding=D}get length(){return this.toBuffer().length}copy(M,D,k,z){return this.toBuffer().copy(M,D,k,z)}toBuffer(){return this._buffer||(this._buffer=i.from(this._data,this._encoding)),this._buffer}}class _{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,k,z){return this._data._buf.copy(M,D,k,z)}toBuffer(){return this._data.toBuffer()}}class C{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,k,z){this._data.copy(M,D,k,z)}toBuffer(){return this._data}}class x{constructor(M){this.size=M,this.buffer=i.alloc(M),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let M=i.alloc(this.iWrite-this.iRead);return this.buffer.copy(M,0,this.iRead,this.iWrite),M}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(M){let D;return M===0?null:M===void 0||M>=this.length?(D=this.toBuffer(),this.iRead=this.iWrite,D):(D=i.alloc(M),this.buffer.copy(D,0,this.iRead,M),this.iRead+=M,D)}write(M,D,k){let z=Math.min(k,this.size-this.iWrite);return M.copy(this.buffer,this.iWrite,D,D+z),this.iWrite+=z,z}}let y=function(S){S=S||{},this.bufSize=S.bufSize||1048576,this.buffers=[],this.batch=S.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(y,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return i.concat(this.buffers.map(S=>S.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let M=this.buffers[this.buffers.length-1];if(!M.full)return M}let S=new x(this.bufSize);return this.buffers.push(S),S},_pipe(S){return qn(this,null,function*(){yield Promise.all(this.pipes.map(function(M){return new Promise(D=>{M.write(S.toBuffer(),()=>{D()})})}))})},_writeToBuffers(S){let M=0,D=S.length;for(;M1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(k),n.nextTick(D)):(yield this._pipe(k),D());else this.paused||this.emit("data",k.toBuffer()),this._writeToBuffers(k),this.emit("readable");return!0})},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(S,M,D){let k=z=>{z?D(z):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};S?this.write(S,M,k):k()},read(S){let M;if(S){for(M=[];S&&this.buffers.length&&!this.buffers[0].eod;){let D=this.buffers[0],k=D.read(S);S-=k.length,M.push(k),D.eod&&D.full&&this.buffers.shift()}return i.concat(M)}return M=this.buffers.map(D=>D.toBuffer()).filter(Boolean),this.buffers=[],i.concat(M)},setEncoding(S){this.encoding=S},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(S){this.pipes.push(S),!this.paused&&this.buffers.length&&this.end()},unpipe(S){this.pipes=this.pipes.filter(M=>M!==S)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),o.exports=y}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,o,t){(function(n){(function(){"use strict";o.exports=class{constructor(i){this._buf=n.alloc(i&&i.size||16384),this._encoding=i&&i.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=n.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(i){i=i||0,this._buffer=void 0,this._inPos=i}_grow(i){let s=2*this._buf.length;for(;s=this._buf.length-4;)this._grow(this._inPos+i.length),s=this._inPos+this._buf.write(i,this._inPos,this._encoding);this._inPos=s}addStringBuf(i){i.length&&(this._buffer=void 0,this.length+i.length>this.capacity&&this._grow(this.length+i.length),i._buf.copy(this._buf,this._inPos,0,i.length),this._inPos+=i.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,o,t){"use strict";let{toString:n}=Object.prototype,i=/["&<>]/,s={each:function(d,u){d&&(Array.isArray(d)?d.forEach(u):Object.keys(d).forEach(f=>{u(d[f],f)}))},some:function(d,u){return!!d&&(Array.isArray(d)?d.some(u):Object.keys(d).some(f=>u(d[f],f)))},every:function(d,u){return!d||(Array.isArray(d)?d.every(u):Object.keys(d).every(f=>u(d[f],f)))},map:function(d,u){return d?Array.isArray(d)?d.map(u):Object.keys(d).map(f=>u(d[f],f)):[]},keyBy:(d,u)=>d.reduce((f,_)=>(f[_[u]]=_,f),{}),isEqual:function(d,u){let f=typeof d,_=typeof u,C=Array.isArray(d),x=Array.isArray(u),y;if(f!==_)return!1;switch(typeof d){case"object":if(C||x)return!(!C||!x)&&d.length===u.length&&d.every((P,S)=>{let M=u[S];return s.isEqual(P,M)});if(d===null||u===null)return d===u;if(y=Object.keys(d),Object.keys(u).length!==y.length)return!1;for(let P of y)if(!u.hasOwnProperty(P))return!1;return s.every(d,(P,S)=>{let M=u[S];return s.isEqual(P,M)});default:return d===u}},escapeHtml(d){let u=i.exec(d);if(!u)return d;let f="",_="",C=0,x=u.index;for(;x":_=">";break;default:continue}C!==x&&(f+=d.substring(C,x)),C=x+1,f+=_}return C!==x?f+d.substring(C,x):f},strcmp:(d,u)=>du?1:0,isUndefined:d=>n.call(d)==="[object Undefined]",isObject:d=>n.call(d)==="[object Object]",deepMerge(){let d=arguments[0]||{},{length:u}=arguments,f,_,C;function x(y,P){f=d[P],C=Array.isArray(y),s.isObject(y)||C?(C?(C=!1,_=f&&Array.isArray(f)?f:[]):_=f&&s.isObject(f)?f:{},d[P]=s.deepMerge(_,y)):s.isUndefined(y)||(d[P]=y)}for(let y=0;y&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,u={nop(){},promiseImmediate:f=>new Promise(_=>{n.setImmediate?i(()=>{_(f)}):setTimeout(()=>{_(f)},1)}),inherits:function(f,_,C,x){f.super_=_,x||(x=C,C=null),C&&Object.keys(C).forEach(P=>{Object.defineProperty(f,P,Object.getOwnPropertyDescriptor(C,P))});let y={constructor:{value:f,enumerable:!1,writable:!1,configurable:!0}};x&&Object.keys(x).forEach(P=>{y[P]=Object.getOwnPropertyDescriptor(x,P)}),f.prototype=Object.create(_.prototype,y)},dateToExcel:(f,_)=>25569+f.getTime()/864e5-(_?1462:0),excelToDate(f,_){let C=Math.round(24*(f-25569+(_?1462:0))*3600*1e3);return new Date(C)},parsePath(f){let _=f.lastIndexOf("/");return{path:f.substring(0,_),name:f.substring(_+1)}},getRelsPath(f){let _=u.parsePath(f);return`${_.path}/_rels/${_.name}.rels`},xmlEncode(f){let _=d.exec(f);if(!_)return f;let C="",x="",y=0,P=_.index;for(;P=11&&S!==13)){x="";break}continue}y!==P&&(C+=f.substring(y,P)),y=P+1,x&&(C+=x)}return y!==P?C+f.substring(y,P):C},xmlDecode:f=>f.replace(/&([a-z]*);/g,_=>{switch(_){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return _}}),validInt(f){let _=parseInt(f,10);return Number.isNaN(_)?0:_},isDateFmt(f){return f?(f=(f=f.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:f=>new Promise(_=>{s.access(f,s.constants.F_OK,C=>{_(!C)})})},toIsoDateString:f=>f.toIsoString().subsstr(0,10),parseBoolean:f=>f===!0||f==="true"||f===1||f==="1"};o.exports=u}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,o,t){"use strict";let n=e("./under-dash"),i=e("./utils");function s(f,_,C){f.push(` ${_}="${i.xmlEncode(C.toString())}"`)}function d(f,_){if(_){let C=[];n.each(_,(x,y)=>{x!==void 0&&s(C,y,x)}),f.push(C.join(""))}}class u{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(_){let C=this._xml;C.push(" `)}openNode(_,C){let x=this.tos,y=this._xml;x&&this.open&&y.push(">"),this._stack.push(_),y.push("<"),y.push(_),d(y,C),this.leaf=!0,this.open=!0}addAttribute(_,C){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");C!==void 0&&s(this._xml,_,C)}addAttributes(_){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d(this._xml,_)}writeText(_){let C=this._xml;this.open&&(C.push(">"),this.open=!1),this.leaf=!1,C.push(i.xmlEncode(_.toString()))}writeXml(_){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(_)}closeNode(){let _=this._stack.pop(),C=this._xml;this.leaf?C.push("/>"):(C.push("")),this.open=!1,this.leaf=!1}leafNode(_,C,x){this.openNode(_,C),x!==void 0&&this.writeText(x),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let _=this._rollbacks.pop();this._xml.length>_.xml&&this._xml.splice(_.xml,this._xml.length-_.xml),this._stack.length>_.stack&&this._stack.splice(_.stack,this._stack.length-_.stack),this.leaf=_.leaf,this.open=_.open}get xml(){return this.closeAll(),this._xml.join("")}}u.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},o.exports=u},{"./under-dash":26,"./utils":27}],29:[function(e,o,t){(function(n){(function(){"use strict";let i=e("events"),s=e("jszip"),d=e("./stream-buf"),{stringToBuffer:u}=e("./browser-buffer-encode");class f extends i.EventEmitter{constructor(C){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},C),this.zip=new s,this.stream=new d}append(C,x){x.hasOwnProperty("base64")&&x.base64?this.zip.file(x.name,C,{base64:!0}):(n.browser&&typeof C=="string"&&(C=u(C)),this.zip.file(x.name,C))}finalize(){return qn(this,null,function*(){let C=yield this.zip.generateAsync(this.options);this.stream.end(C),this.emit("finish")})}read(C){return this.stream.read(C)}setEncoding(C){return this.stream.setEncoding(C)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(C,x){return this.stream.pipe(C,x)}unpipe(C){return this.stream.unpipe(C)}unshift(C){return this.stream.unshift(C)}wrap(C){return this.stream.wrap(C)}}o.exports={ZipWriter:f}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,o,t){"use strict";o.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,o,t){"use strict";o.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,o,t){"use strict";let n=e("../../utils/parse-sax"),i=e("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(u){}parseText(u){}parseClose(u){}reconcile(u,f){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(u=>{u instanceof s?u.reset():u.xform&&u.xform.reset()})}mergeModel(u){this.model=Object.assign(this.model||{},u)}parse(u){return qn(this,null,function*(){try{for(var f=ug(u),_,C,x;_=!(C=yield f.next()).done;_=!1){let y=C.value;for(let{eventType:P,value:S}of y)if(P==="opentag")this.parseOpen(S);else if(P==="text")this.parseText(S);else if(P==="closetag"&&!this.parseClose(S.name))return this.model}}catch{x=[C]}finally{try{_&&(C=f.return)&&(yield C.call(f))}finally{if(x)throw x[0]}}return this.model})}parseStream(u){return qn(this,null,function*(){return this.parse(n(u))})}get xml(){return this.toXml(this.model)}toXml(u){let f=new i;return this.render(f,u),f.xml}static toAttribute(u,f){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(_)return f}else if(_||u!==f)return u.toString()}static toStringAttribute(u,f){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(u,f,_)}static toStringValue(u,f){return u===void 0?f:u}static toBoolAttribute(u,f){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(_)return f}else if(_||u!==f)return u?"1":"0"}static toBoolValue(u,f){return u===void 0?f:u==="1"}static toIntAttribute(u,f){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(u,f,_)}static toIntValue(u,f){return u===void 0?f:parseInt(u,10)}static toFloatAttribute(u,f){let _=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(u,f,_)}static toFloatValue(u,f){return u===void 0?f:parseFloat(u)}}o.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../../../utils/col-cache");function s(u){try{return i.decodeEx(u),!0}catch{return!1}}function d(u){let f=[],_=!1,C="";return u.split(",").forEach(x=>{if(!x)return;let y=(x.match(/'/g)||[]).length;if(!y)return void(_?C+=x+",":s(x)&&f.push(x));let P=y%2==0;!_&&P&&s(x)?f.push(x):_&&!P?(_=!1,s(C+x)&&f.push(C+x),C=""):(_=!0,C+=x+",")}),f}o.exports=class extends n{render(u,f){u.openNode("definedName",{name:f.name,localSheetId:f.localSheetId}),u.writeText(f.ranges.join(",")),u.closeNode()}parseOpen(u){switch(u.name){case"definedName":return this._parsedName=u.attributes.name,this._parsedLocalSheetId=u.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(u){this._parsedText.push(u)}parseClose(){return this.model={name:this._parsedName,ranges:d(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,o,t){"use strict";let n=e("../../../utils/utils"),i=e("../base-xform");o.exports=class extends i{render(s,d){s.leafNode("sheet",{sheetId:d.id,name:d.name,state:d.state,"r:id":d.rId})}parseOpen(s){return s.name==="sheet"&&(this.model={name:n.xmlDecode(s.attributes.name),id:parseInt(s.attributes.sheetId,10),state:s.attributes.state,rId:s.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){i.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:s.fullCalcOnLoad?1:void 0})}parseOpen(i){return i.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){i.leafNode("workbookPr",{date1904:s.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(i){return i.name==="workbookPr"&&(this.model={date1904:i.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){let d={xWindow:s.x||0,yWindow:s.y||0,windowWidth:s.width||12e3,windowHeight:s.height||24e3,firstSheet:s.firstSheet,activeTab:s.activeTab};s.visibility&&s.visibility!=="visible"&&(d.visibility=s.visibility),i.leafNode("workbookView",d)}parseOpen(i){if(i.name==="workbookView"){let s=this.model={},d=function(f,_,C){let x=_!==void 0?s[f]=_:C;x!==void 0&&(s[f]=x)},u=function(f,_,C){let x=_!==void 0?s[f]=parseInt(_,10):C;x!==void 0&&(s[f]=x)};return u("x",i.attributes.xWindow,0),u("y",i.attributes.yWindow,0),u("width",i.attributes.windowWidth,25e3),u("height",i.attributes.windowHeight,1e4),d("visibility",i.attributes.visibility,"visible"),u("activeTab",i.attributes.activeTab,void 0),u("firstSheet",i.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),d=e("../base-xform"),u=e("../static-xform"),f=e("../list-xform"),_=e("./defined-name-xform"),C=e("./sheet-xform"),x=e("./workbook-view-xform"),y=e("./workbook-properties-xform"),P=e("./workbook-calc-properties-xform");class S extends d{constructor(){super(),this.map={fileVersion:S.STATIC_XFORMS.fileVersion,workbookPr:new y,bookViews:new f({tag:"bookViews",count:!1,childXform:new x}),sheets:new f({tag:"sheets",count:!1,childXform:new C}),definedNames:new f({tag:"definedNames",count:!1,childXform:new _}),calcPr:new P}}prepare(D){D.sheets=D.worksheets;let k=[],z=0;D.sheets.forEach(U=>{if(U.pageSetup&&U.pageSetup.printArea&&U.pageSetup.printArea.split("&&").forEach(J=>{let re=J.split(":"),ee={name:"_xlnm.Print_Area",ranges:[`'${U.name}'!$${re[0]}:$${re[1]}`],localSheetId:z};k.push(ee)}),U.pageSetup&&(U.pageSetup.printTitlesRow||U.pageSetup.printTitlesColumn)){let J=[];if(U.pageSetup.printTitlesColumn){let ee=U.pageSetup.printTitlesColumn.split(":");J.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}if(U.pageSetup.printTitlesRow){let ee=U.pageSetup.printTitlesRow.split(":");J.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}let re={name:"_xlnm.Print_Titles",ranges:J,localSheetId:z};k.push(re)}z++}),k.length&&(D.definedNames=D.definedNames.concat(k)),(D.media||[]).forEach((U,J)=>{U.name=U.type+(J+1)})}render(D,k){D.openXml(s.StdDocAttributes),D.openNode("workbook",S.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(D),this.map.workbookPr.render(D,k.properties),this.map.bookViews.render(D,k.views),this.map.sheets.render(D,k.sheets),this.map.definedNames.render(D,k.definedNames),this.map.calcPr.render(D,k.calcProperties),D.closeNode()}parseOpen(D){if(this.parser)return this.parser.parseOpen(D),!0;switch(D.name){case"workbook":return!0;default:return this.parser=this.map[D.name],this.parser&&this.parser.parseOpen(D),!0}}parseText(D){this.parser&&this.parser.parseText(D)}parseClose(D){if(this.parser)return this.parser.parseClose(D)||(this.parser=void 0),!0;switch(D){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(D){let k=(D.workbookRels||[]).reduce((ee,ae)=>(ee[ae.Id]=ae,ee),{}),z=[],U,J=0;(D.sheets||[]).forEach(ee=>{let ae=k[ee.rId];ae&&(U=D.worksheetHash["xl/"+ae.Target.replace(/^(\s|\/xl\/)+/,"")],U&&(U.name=ee.name,U.id=ee.id,U.state=ee.state,z[J++]=U))});let re=[];n.each(D.definedNames,ee=>{if(ee.name==="_xlnm.Print_Area"){if(U=z[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let ae=i.decodeEx(ee.ranges[0]);U.pageSetup.printArea=U.pageSetup.printArea?`${U.pageSetup.printArea}&&${ae.dimensions}`:ae.dimensions}}else if(ee.name==="_xlnm.Print_Titles"){if(U=z[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let ae=ee.ranges.join(","),se=/\$/g,_e=/\$\d+:\$\d+/,de=ae.match(_e);if(de&&de.length){let pe=de[0];U.pageSetup.printTitlesRow=pe.replace(se,"")}let j=/\$[A-Z]+:\$[A-Z]+/,W=ae.match(j);if(W&&W.length){let pe=W[0];U.pageSetup.printTitlesColumn=pe.replace(se,"")}}}else re.push(ee)}),D.definedNames=re,D.media.forEach((ee,ae)=>{ee.index=ae})}}S.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},S.STATIC_XFORMS={fileVersion:new u({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},o.exports=S},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,o,t){"use strict";let n=e("../strings/rich-text-xform"),i=e("../../../utils/utils"),s=e("../base-xform"),d=o.exports=function(u){this.model=u};i.inherits(d,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new n),this._richTextXform},render(u,f){f=f||this.model,u.openNode("comment",{ref:f.ref,authorId:0}),u.openNode("text"),f&&f.note&&f.note.texts&&f.note.texts.forEach(_=>{this.richTextXform.render(u,_)}),u.closeNode(),u.closeNode()},parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"comment":return this.model=at({type:"note",note:{texts:[]}},u.attributes),!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(u),!0;default:return!1}},parseText(u){this.parser&&this.parser.parseText(u)},parseClose(u){switch(u){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../../../utils/utils"),s=e("../base-xform"),d=e("./comment-xform"),u=o.exports=function(){this.map={comment:new d}};i.inherits(u,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(f,_){_=_||this.model,f.openXml(n.StdDocAttributes),f.openNode("comments",u.COMMENTS_ATTRIBUTES),f.openNode("authors"),f.leafNode("author",null,"Author"),f.closeNode(),f.openNode("commentList"),_.comments.forEach(C=>{this.map.comment.render(f,C)}),f.closeNode(),f.closeNode()},parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(f),!0;default:return!1}},parseText(f){this.parser&&this.parser.parseText(f)},parseClose(f){switch(f){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(f),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{constructor(i){super(),this._model=i}get tag(){return this._model&&this._model.tag}render(i,s,d){(s===d[2]||this.tag==="x:SizeWithCells"&&s===d[1])&&i.leafNode(this.tag)}parseOpen(i){switch(i.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{constructor(i){super(),this._model=i}get tag(){return this._model&&this._model.tag}render(i,s){i.leafNode(this.tag,null,s)}parseOpen(i){switch(i.name){case this.tag:return this.text="",!0;default:return!1}}parseText(i){this.text=i}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"x:Anchor"}getAnchorRect(i){let s=Math.floor(i.left),d=Math.floor(68*(i.left-s)),u=Math.floor(i.top),f=Math.floor(18*(i.top-u)),_=Math.floor(i.right),C=Math.floor(68*(i.right-_)),x=Math.floor(i.bottom);return[s,d,u,f,_,C,x,Math.floor(18*(i.bottom-x))]}getDefaultRect(i){let s=i.col,d=Math.max(i.row-2,0);return[s,6,d,14,s+2,2,d+4,16]}render(i,s){let d=s.anchor?this.getAnchorRect(s.anchor):this.getDefaultRect(s.refAddress);i.leafNode("x:Anchor",null,d.join(", "))}parseOpen(i){switch(i.name){case this.tag:return this.text="",!0;default:return!1}}parseText(i){this.text=i}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./vml-anchor-xform"),s=e("./style/vml-protection-xform"),d=e("./style/vml-position-xform"),u=["twoCells","oneCells","absolute"];o.exports=class extends n{constructor(){super(),this.map={"x:Anchor":new i,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new d({tag:"x:SizeWithCells"}),"x:MoveWithCells":new d({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(f,_){let{protection:C,editAs:x}=_.note;f.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(f,x,u),this.map["x:SizeWithCells"].render(f,x,u),this.map["x:Anchor"].render(f,_),this.map["x:Locked"].render(f,C.locked),f.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(f,C.lockText),f.leafNode("x:Row",null,_.refAddress.row-1),f.leafNode("x:Column",null,_.refAddress.col-1),f.closeNode()}parseOpen(f){switch(f.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){let f=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),_=Object.keys(f).length;this.model.editAs=u[_],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./vml-shape-xform");class d extends i{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(f,_){f.openXml(n.StdDocAttributes),f.openNode(this.tag,d.DRAWING_ATTRIBUTES),f.openNode("o:shapelayout",{"v:ext":"edit"}),f.leafNode("o:idmap",{"v:ext":"edit",data:1}),f.closeNode(),f.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),f.leafNode("v:stroke",{joinstyle:"miter"}),f.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),f.closeNode(),_.comments.forEach((C,x)=>{this.map["v:shape"].render(f,C,x)}),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(f){case this.tag:return!1;default:return!0}}reconcile(f,_){f.anchors.forEach(C=>{C.br?this.map["xdr:twoCellAnchor"].reconcile(C,_):this.map["xdr:oneCellAnchor"].reconcile(C,_)})}}d.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},o.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./vml-textbox-xform"),s=e("./vml-client-data-xform");class d extends n{constructor(){super(),this.map={"v:textbox":new i,"x:ClientData":new s}}get tag(){return"v:shape"}render(f,_,C){f.openNode("v:shape",d.V_SHAPE_ATTRIBUTES(_,C)),f.leafNode("v:fill",{color2:"infoBackground [80]"}),f.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),f.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(f,_),this.map["x:ClientData"].render(f,_),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:this.reset(),this.model={margins:{insetmode:f.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}d.V_SHAPE_ATTRIBUTES=(u,f)=>({id:"_x0000_s"+(1025+f),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":u.note.margins&&u.note.margins.insetmode}),o.exports=d},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"v:textbox"}conversionUnit(i,s,d){return`${parseFloat(i)*s.toFixed(2)}${d}`}reverseConversionUnit(i){return(i||"").split(",").map(s=>Number(parseFloat(this.conversionUnit(parseFloat(s),.1,"")).toFixed(2)))}render(i,s){let d={style:"mso-direction-alt:auto"};if(s&&s.note){let{inset:u}=s.note&&s.note.margins;Array.isArray(u)&&(u=u.map(f=>this.conversionUnit(f,10,"mm")).join(",")),u&&(d.inset=u)}i.openNode("v:textbox",d),i.leafNode("div",{style:"text-align:left"}),i.closeNode()}parseOpen(i){switch(i.name){case this.tag:return this.model={inset:this.reverseConversionUnit(i.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(i){switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(e,o,t){"use strict";let n=e("./base-xform");o.exports=class extends n{createNewModel(i){return{}}parseOpen(i){return this.parser=this.parser||this.map[i.name],this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag&&(this.model=this.createNewModel(i),!0)}parseText(i){this.parser&&this.parser.parseText(i)}onParserClose(i,s){this.model[i]=s.model}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.onParserClose(i,this.parser),this.parser=void 0),!0):i!==this.tag}}},{"./base-xform":32}],49:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){i.openNode("HeadingPairs"),i.openNode("vt:vector",{size:2,baseType:"variant"}),i.openNode("vt:variant"),i.leafNode("vt:lpstr",void 0,"Worksheets"),i.closeNode(),i.openNode("vt:variant"),i.leafNode("vt:i4",void 0,s.length),i.closeNode(),i.closeNode(),i.closeNode()}parseOpen(i){return i.name==="HeadingPairs"}parseText(){}parseClose(i){return i!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){i.openNode("TitlesOfParts"),i.openNode("vt:vector",{size:s.length,baseType:"lpstr"}),s.forEach(d=>{i.leafNode("vt:lpstr",void 0,d.name)}),i.closeNode(),i.closeNode()}parseOpen(i){return i.name==="TitlesOfParts"}parseText(){}parseClose(i){return i!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../simple/string-xform"),d=e("./app-heading-pairs-xform"),u=e("./app-titles-of-parts-xform");class f extends i{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new d,TitleOfParts:new u}}render(C,x){C.openXml(n.StdDocAttributes),C.openNode("Properties",f.PROPERTY_ATTRIBUTES),C.leafNode("Application",void 0,"Microsoft Excel"),C.leafNode("DocSecurity",void 0,"0"),C.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(C,x.worksheets),this.map.TitleOfParts.render(C,x.worksheets),this.map.Company.render(C,x.company||""),this.map.Manager.render(C,x.manager),C.leafNode("LinksUpToDate",void 0,"false"),C.leafNode("SharedDoc",void 0,"false"),C.leafNode("HyperlinksChanged",void 0,"false"),C.leafNode("AppVersion",void 0,"16.0300"),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"Properties":return!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}f.DateFormat=function(_){return _.toISOString().replace(/[.]\d{3,6}/,"")},f.DateAttrs={"xsi:type":"dcterms:W3CDTF"},f.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},o.exports=f},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform");class s extends i{render(u,f){u.openXml(n.StdDocAttributes),u.openNode("Types",s.PROPERTY_ATTRIBUTES);let _={};(f.media||[]).forEach(C=>{if(C.type==="image"){let x=C.extension;_[x]||(_[x]=!0,u.leafNode("Default",{Extension:x,ContentType:"image/"+x}))}}),u.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),u.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),u.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),f.worksheets.forEach(C=>{let x=`/xl/worksheets/sheet${C.id}.xml`;u.leafNode("Override",{PartName:x,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),u.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),u.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),f.sharedStrings&&f.sharedStrings.count&&u.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),f.tables&&f.tables.forEach(C=>{u.leafNode("Override",{PartName:"/xl/tables/"+C.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),f.drawings&&f.drawings.forEach(C=>{u.leafNode("Override",{PartName:`/xl/drawings/${C.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),f.commentRefs&&(u.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),f.commentRefs.forEach(C=>{let{commentName:x}=C;u.leafNode("Override",{PartName:`/xl/${x}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),u.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),u.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),u.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},o.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../simple/date-xform"),d=e("../simple/string-xform"),u=e("../simple/integer-xform");class f extends i{constructor(){super(),this.map={"dc:creator":new d({tag:"dc:creator"}),"dc:title":new d({tag:"dc:title"}),"dc:subject":new d({tag:"dc:subject"}),"dc:description":new d({tag:"dc:description"}),"dc:identifier":new d({tag:"dc:identifier"}),"dc:language":new d({tag:"dc:language"}),"cp:keywords":new d({tag:"cp:keywords"}),"cp:category":new d({tag:"cp:category"}),"cp:lastModifiedBy":new d({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:f.DateFormat}),"cp:revision":new u({tag:"cp:revision"}),"cp:version":new d({tag:"cp:version"}),"cp:contentStatus":new d({tag:"cp:contentStatus"}),"cp:contentType":new d({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:f.DateAttrs,format:f.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:f.DateAttrs,format:f.DateFormat})}}render(C,x){C.openXml(n.StdDocAttributes),C.openNode("cp:coreProperties",f.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(C,x.creator),this.map["dc:title"].render(C,x.title),this.map["dc:subject"].render(C,x.subject),this.map["dc:description"].render(C,x.description),this.map["dc:identifier"].render(C,x.identifier),this.map["dc:language"].render(C,x.language),this.map["cp:keywords"].render(C,x.keywords),this.map["cp:category"].render(C,x.category),this.map["cp:lastModifiedBy"].render(C,x.lastModifiedBy),this.map["cp:lastPrinted"].render(C,x.lastPrinted),this.map["cp:revision"].render(C,x.revision),this.map["cp:version"].render(C,x.version),this.map["cp:contentStatus"].render(C,x.contentStatus),this.map["cp:contentType"].render(C,x.contentType),this.map["dcterms:created"].render(C,x.created),this.map["dcterms:modified"].render(C,x.modified),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[C.name],this.parser)return this.parser.parseOpen(C),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(C))}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+C)}}}f.DateFormat=function(_){return _.toISOString().replace(/[.]\d{3}/,"")},f.DateAttrs={"xsi:type":"dcterms:W3CDTF"},f.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},o.exports=f},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{render(i,s){i.leafNode("Relationship",s)}parseOpen(i){switch(i.name){case"Relationship":return this.model=i.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./relationship-xform");class d extends i{constructor(){super(),this.map={Relationship:new s}}render(f,_){_=_||this._values,f.openXml(n.StdDocAttributes),f.openNode("Relationships",d.RELATIONSHIPS_ATTRIBUTES),_.forEach(C=>{this.map.Relationship.render(f,C)}),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[f.name],this.parser)return this.parser.parseOpen(f),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(f))}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(f){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+f)}}}d.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},o.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:this.reset(),this.model={range:{editAs:i.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}reconcilePicture(i,s){if(i&&i.rId){let d=s.rels[i.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(d){let u=d[1],f=s.mediaIndex[u];return s.media[f]}}}}},{"../base-xform":32}],57:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./blip-xform");o.exports=class extends n{constructor(){super(),this.map={"a:blip":new i}}get tag(){return"xdr:blipFill"}render(s,d){s.openNode(this.tag),this.map["a:blip"].render(s,d),s.openNode("a:stretch"),s.leafNode("a:fillRect"),s.closeNode(),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(){}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"a:blip"}render(i,s){i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":s.rId,cstate:"print"})}parseOpen(i){switch(i.name){case this.tag:return this.model={rId:i.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(i){switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"xdr:cNvPicPr"}render(i){i.openNode(this.tag),i.leafNode("a:picLocks",{noChangeAspect:"1"}),i.closeNode()}parseOpen(i){switch(i.name){case this.tag:default:return!0}}parseText(){}parseClose(i){switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./hlink-click-xform"),s=e("./ext-lst-xform");o.exports=class extends n{constructor(){super(),this.map={"a:hlinkClick":new i,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(d,u){d.openNode(this.tag,{id:u.index,name:"Picture "+u.index}),this.map["a:hlinkClick"].render(d,u),this.map["a:extLst"].render(d,u),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../simple/integer-xform");o.exports=class extends n{constructor(s){super(),this.tag=s.tag,this.map={"xdr:col":new i({tag:"xdr:col",zero:!0}),"xdr:colOff":new i({tag:"xdr:colOff",zero:!0}),"xdr:row":new i({tag:"xdr:row",zero:!0}),"xdr:rowOff":new i({tag:"xdr:rowOff",zero:!0})}}render(s,d){s.openNode(this.tag),this.map["xdr:col"].render(s,d.nativeCol),this.map["xdr:colOff"].render(s,d.nativeColOff),this.map["xdr:row"].render(s,d.nativeRow),this.map["xdr:rowOff"].render(s,d.nativeRowOff),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,o,t){"use strict";let n=e("../../../utils/col-cache"),i=e("../../../utils/xml-stream"),s=e("../base-xform"),d=e("./two-cell-anchor-xform"),u=e("./one-cell-anchor-xform");class f extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new d,"xdr:oneCellAnchor":new u}}prepare(C){C.anchors.forEach((x,y)=>{x.anchorType=(function(P){return(typeof P.range=="string"?n.decode(P.range):P.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(x),this.map[x.anchorType].prepare(x,{index:y})})}get tag(){return"xdr:wsDr"}render(C,x){C.openXml(i.StdDocAttributes),C.openNode(this.tag,f.DRAWING_ATTRIBUTES),x.anchors.forEach(y=>{this.map[y.anchorType].render(C,y)}),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C)}return!0}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(C){case this.tag:return!1;default:return!0}}reconcile(C,x){C.anchors.forEach(y=>{y.br?this.map["xdr:twoCellAnchor"].reconcile(y,x):this.map["xdr:oneCellAnchor"].reconcile(y,x)})}}f.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},o.exports=f},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"a:extLst"}render(i){i.openNode(this.tag),i.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),i.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),i.closeNode(),i.closeNode()}parseOpen(i){switch(i.name){case this.tag:default:return!0}}parseText(){}parseClose(i){switch(i){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.map={}}render(i,s){i.openNode(this.tag);let d=Math.floor(9525*s.width),u=Math.floor(9525*s.height);i.addAttribute("cx",d),i.addAttribute("cy",u),i.closeNode()}parseOpen(i){return i.name===this.tag&&(this.model={width:parseInt(i.attributes.cx||"0",10)/9525,height:parseInt(i.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"a:hlinkClick"}render(i,s){s.hyperlinks&&s.hyperlinks.rId&&i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":s.hyperlinks.rId,tooltip:s.hyperlinks.tooltip})}parseOpen(i){switch(i.name){case this.tag:return this.model={hyperlinks:{rId:i.attributes["r:id"],tooltip:i.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform");o.exports=class extends n{constructor(){super(),this.map={"xdr:cNvPr":new i,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(d,u){d.openNode(this.tag),this.map["xdr:cNvPr"].render(d,u),this.map["xdr:cNvPicPr"].render(d,u),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,o,t){"use strict";let n=e("./base-cell-anchor-xform"),i=e("../static-xform"),s=e("./cell-position-xform"),d=e("./ext-xform"),u=e("./pic-xform");o.exports=class extends n{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new d({tag:"xdr:ext"}),"xdr:pic":new u,"xdr:clientData":new i({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(f,_){this.map["xdr:pic"].prepare(f.picture,_)}render(f,_){f.openNode(this.tag,{editAs:_.range.editAs||"oneCell"}),this.map["xdr:from"].render(f,_.range.tl),this.map["xdr:ext"].render(f,_.range.ext),this.map["xdr:pic"].render(f,_.picture),this.map["xdr:clientData"].render(f,{}),f.closeNode()}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(f,_){f.medium=this.reconcilePicture(f.picture,_)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../static-xform"),s=e("./blip-fill-xform"),d=e("./nv-pic-pr-xform"),u=e("./sp-pr");o.exports=class extends n{constructor(){super(),this.map={"xdr:nvPicPr":new d,"xdr:blipFill":new s,"xdr:spPr":new i(u)}}get tag(){return"xdr:pic"}prepare(f,_){f.index=_.index+1}render(f,_){f.openNode(this.tag),this.map["xdr:nvPicPr"].render(f,_),this.map["xdr:blipFill"].render(f,_),this.map["xdr:spPr"].render(f,_),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.tag:this.reset();break;default:this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f)}return!0}parseText(){}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(f){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,o,t){"use strict";o.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,o,t){"use strict";let n=e("./base-cell-anchor-xform"),i=e("../static-xform"),s=e("./cell-position-xform"),d=e("./pic-xform");o.exports=class extends n{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new d,"xdr:clientData":new i({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(u,f){this.map["xdr:pic"].prepare(u.picture,f)}render(u,f){u.openNode(this.tag,{editAs:f.range.editAs||"oneCell"}),this.map["xdr:from"].render(u,f.range.tl),this.map["xdr:to"].render(u,f.range.br),this.map["xdr:pic"].render(u,f.picture),this.map["xdr:clientData"].render(u,{}),u.closeNode()}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(u,f){u.medium=this.reconcilePicture(u.picture,f)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,o,t){"use strict";let n=e("./base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.always=!!i.always,this.count=i.count,this.empty=i.empty,this.$count=i.$count||"count",this.$=i.$,this.childXform=i.childXform,this.maxItems=i.maxItems}prepare(i,s){let{childXform:d}=this;i&&i.forEach((u,f)=>{s.index=f,d.prepare(u,s)})}render(i,s){if(this.always||s&&s.length){i.openNode(this.tag,this.$),this.count&&i.addAttribute(this.$count,s&&s.length||0);let{childXform:d}=this;(s||[]).forEach((u,f)=>{d.render(i,u,f)}),i.closeNode()}else this.empty&&i.leafNode(this.tag)}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(i)&&(this.parser=this.childXform,!0)}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser){if(!this.parser.parseClose(i)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(i,s){if(i){let{childXform:d}=this;i.forEach(u=>{d.reconcile(u,s)})}}}},{"./base-xform":32}],72:[function(e,o,t){"use strict";let n=e("../../../utils/col-cache"),i=e("../base-xform");o.exports=class extends i{get tag(){return"autoFilter"}render(s,d){if(d)if(typeof d=="string")s.leafNode("autoFilter",{ref:d});else{let u=function(C){return typeof C=="string"?C:n.getAddress(C.row,C.column).address},f=u(d.from),_=u(d.to);f&&_&&s.leafNode("autoFilter",{ref:`${f}:${_}`})}}parseOpen(s){s.name==="autoFilter"&&(this.model=s.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,o,t){"use strict";let n=e("../../../utils/utils"),i=e("../base-xform"),s=e("../../../doc/range"),d=e("../../../doc/enums"),u=e("../strings/rich-text-xform");function f(_){if(_==null)return d.ValueType.Null;if(_ instanceof String||typeof _=="string")return d.ValueType.String;if(typeof _=="number")return d.ValueType.Number;if(typeof _=="boolean")return d.ValueType.Boolean;if(_ instanceof Date)return d.ValueType.Date;if(_.text&&_.hyperlink)return d.ValueType.Hyperlink;if(_.formula)return d.ValueType.Formula;if(_.error)return d.ValueType.Error;throw new Error("I could not understand type of value")}o.exports=class extends i{constructor(){super(),this.richTextXForm=new u}get tag(){return"c"}prepare(_,C){let x=C.styles.addStyleModel(_.style||{},(function(y){switch(y.type){case d.ValueType.Formula:return f(y.result);default:return y.type}})(_));switch(x&&(_.styleId=x),_.comment&&C.comments.push(qt(at({},_.comment),{ref:_.address})),_.type){case d.ValueType.String:case d.ValueType.RichText:C.sharedStrings&&(_.ssId=C.sharedStrings.add(_.value));break;case d.ValueType.Date:C.date1904&&(_.date1904=!0);break;case d.ValueType.Hyperlink:C.sharedStrings&&_.text!==void 0&&_.text!==null&&(_.ssId=C.sharedStrings.add(_.text)),C.hyperlinks.push({address:_.address,target:_.hyperlink,tooltip:_.tooltip});break;case d.ValueType.Merge:C.merges.add(_);break;case d.ValueType.Formula:if(C.date1904&&(_.date1904=!0),_.shareType==="shared"&&(_.si=C.siFormulae++),_.formula)C.formulae[_.address]=_;else if(_.sharedFormula){let y=C.formulae[_.sharedFormula];if(!y)throw new Error("Shared Formula master must exist above and or left of clone for cell "+_.address);y.si===void 0?(y.shareType="shared",y.si=C.siFormulae++,y.range=new s(y.address,_.address)):y.range&&y.range.expandToAddress(_.address),_.si=y.si}}}renderFormula(_,C){let x=null;switch(C.shareType){case"shared":x={t:"shared",ref:C.ref||C.range.range,si:C.si};break;case"array":x={t:"array",ref:C.ref};break;default:C.si!==void 0&&(x={t:"shared",si:C.si})}switch(f(C.result)){case d.ValueType.Null:_.leafNode("f",x,C.formula);break;case d.ValueType.String:_.addAttribute("t","str"),_.leafNode("f",x,C.formula),_.leafNode("v",null,C.result);break;case d.ValueType.Number:_.leafNode("f",x,C.formula),_.leafNode("v",null,C.result);break;case d.ValueType.Boolean:_.addAttribute("t","b"),_.leafNode("f",x,C.formula),_.leafNode("v",null,C.result?1:0);break;case d.ValueType.Error:_.addAttribute("t","e"),_.leafNode("f",x,C.formula),_.leafNode("v",null,C.result.error);break;case d.ValueType.Date:_.leafNode("f",x,C.formula),_.leafNode("v",null,n.dateToExcel(C.result,C.date1904));break;default:throw new Error("I could not understand type of value")}}render(_,C){if(C.type!==d.ValueType.Null||C.styleId){switch(_.openNode("c"),_.addAttribute("r",C.address),C.styleId&&_.addAttribute("s",C.styleId),C.type){case d.ValueType.Null:break;case d.ValueType.Number:_.leafNode("v",null,C.value);break;case d.ValueType.Boolean:_.addAttribute("t","b"),_.leafNode("v",null,C.value?"1":"0");break;case d.ValueType.Error:_.addAttribute("t","e"),_.leafNode("v",null,C.value.error);break;case d.ValueType.String:case d.ValueType.RichText:C.ssId!==void 0?(_.addAttribute("t","s"),_.leafNode("v",null,C.ssId)):C.value&&C.value.richText?(_.addAttribute("t","inlineStr"),_.openNode("is"),C.value.richText.forEach(x=>{this.richTextXForm.render(_,x)}),_.closeNode("is")):(_.addAttribute("t","str"),_.leafNode("v",null,C.value));break;case d.ValueType.Date:_.leafNode("v",null,n.dateToExcel(C.value,C.date1904));break;case d.ValueType.Hyperlink:C.ssId!==void 0?(_.addAttribute("t","s"),_.leafNode("v",null,C.ssId)):(_.addAttribute("t","str"),_.leafNode("v",null,C.text));break;case d.ValueType.Formula:this.renderFormula(_,C);break;case d.ValueType.Merge:}_.closeNode()}}parseOpen(_){if(this.parser)return this.parser.parseOpen(_),!0;switch(_.name){case"c":return this.model={address:_.attributes.r},this.t=_.attributes.t,_.attributes.s&&(this.model.styleId=parseInt(_.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=_.attributes.si,this.model.shareType=_.attributes.t,this.model.ref=_.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(_),!0;default:return!1}}parseText(_){if(this.parser)this.parser.parseText(_);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+_:_;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+_:_:this.model.value=this.model.value?this.model.value+_:_}}parseClose(_){switch(_){case"c":{let{model:C}=this;if(C.formula||C.shareType)C.type=d.ValueType.Formula,C.value&&(this.t==="str"?C.result=n.xmlDecode(C.value):this.t==="b"?C.result=parseInt(C.value,10)!==0:this.t==="e"?C.result={error:C.value}:C.result=parseFloat(C.value),C.value=void 0);else if(C.value!==void 0)switch(this.t){case"s":C.type=d.ValueType.String,C.value=parseInt(C.value,10);break;case"str":C.type=d.ValueType.String,C.value=n.xmlDecode(C.value);break;case"inlineStr":C.type=d.ValueType.String;break;case"b":C.type=d.ValueType.Boolean,C.value=parseInt(C.value,10)!==0;break;case"e":C.type=d.ValueType.Error,C.value={error:C.value};break;default:C.type=d.ValueType.Number,C.value=parseFloat(C.value)}else C.styleId?C.type=d.ValueType.Null:C.type=d.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(_),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(_),!0)}}reconcile(_,C){let x=_.styleId&&C.styles&&C.styles.getStyleModel(_.styleId);switch(x&&(_.style=x),_.styleId!==void 0&&(_.styleId=void 0),_.type){case d.ValueType.String:typeof _.value=="number"&&C.sharedStrings&&(_.value=C.sharedStrings.getString(_.value)),_.value.richText&&(_.type=d.ValueType.RichText);break;case d.ValueType.Number:x&&n.isDateFmt(x.numFmt)&&(_.type=d.ValueType.Date,_.value=n.excelToDate(_.value,C.date1904));break;case d.ValueType.Formula:_.result!==void 0&&x&&n.isDateFmt(x.numFmt)&&(_.result=n.excelToDate(_.result,C.date1904)),_.shareType==="shared"&&(_.ref?C.formulae[_.si]=_.address:(_.sharedFormula=C.formulae[_.si],delete _.shareType),delete _.si)}let y=C.hyperlinkMap[_.address];y&&(_.type===d.ValueType.Formula?(_.text=_.result,_.result=void 0):(_.text=_.value,_.value=void 0),_.type=d.ValueType.Hyperlink,_.hyperlink=y);let P=C.commentsMap&&C.commentsMap[_.address];P&&(_.comment=P)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{get tag(){return"x14:cfIcon"}render(i,s){i.leafNode(this.tag,{iconSet:s.iconSet,iconId:s.iconId})}parseOpen(i){let{attributes:s}=i;this.model={iconSet:s.iconSet,iconId:n.toIntValue(s.iconId)}}parseClose(i){return i!==this.tag}}},{"../../base-xform":32}],75:[function(e,o,t){"use strict";let{v4:n}=e("uuid"),i=e("../../base-xform"),s=e("../../composite-xform"),d=e("./databar-ext-xform"),u=e("./icon-set-ext-xform"),f={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class _ extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new d,"x14:iconSet":this.iconSetXform=new u}}get tag(){return"x14:cfRule"}static isExt(x){return x.type==="dataBar"?d.isExt(x):!(x.type!=="iconSet"||!x.custom&&!f[x.iconSet])}prepare(x){_.isExt(x)&&(x.x14Id=`{${n()}}`.toUpperCase())}render(x,y){if(_.isExt(y))switch(y.type){case"dataBar":this.renderDataBar(x,y);break;case"iconSet":this.renderIconSet(x,y)}}renderDataBar(x,y){x.openNode(this.tag,{type:"dataBar",id:y.x14Id}),this.databarXform.render(x,y),x.closeNode()}renderIconSet(x,y){x.openNode(this.tag,{type:"iconSet",priority:y.priority,id:y.x14Id||`{${n()}}`}),this.iconSetXform.render(x,y),x.closeNode()}createNewModel(x){let{attributes:y}=x;return{type:y.type,x14Id:y.id,priority:i.toIntValue(y.priority)}}onParserClose(x,y){Object.assign(this.model,y.model)}}o.exports=_},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("./f-ext-xform");o.exports=class extends n{constructor(){super(),this.map={"xm:f":this.fExtXform=new i}}get tag(){return"x14:cfvo"}render(s,d){s.openNode(this.tag,{type:d.type}),d.value!==void 0&&this.fExtXform.render(s,d.value),s.closeNode()}createNewModel(s){return{type:s.attributes.type}}onParserClose(s,d){switch(s){case"xm:f":this.model.value=d.model?parseFloat(d.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform");o.exports=class extends n{constructor(){super(),this.map={"xm:sqref":this.sqRef=new i,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(d,u){d.rules.forEach(f=>{this.cfRule.prepare(f,u)})}render(d,u){u.rules.some(s.isExt)&&(d.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),u.rules.filter(s.isExt).forEach(f=>this.cfRule.render(d,f)),this.sqRef.render(d,u.ref),d.closeNode())}createNewModel(){return{rules:[]}}onParserClose(d,u){switch(d){case"xm:sqref":this.model.ref=u.model;break;case"x14:cfRule":this.model.rules.push(u.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform");o.exports=class extends n{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(d){return d.hasExtContent===void 0&&(d.hasExtContent=d.some(u=>u.rules.some(i.isExt))),d.hasExtContent}prepare(d,u){d.forEach(f=>{this.cfXform.prepare(f,u)})}render(d,u){this.hasContent(u)&&(d.openNode(this.tag),u.forEach(f=>this.cfXform.render(d,f)),d.closeNode())}createNewModel(){return[]}onParserClose(d,u){this.model.push(u.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("../../composite-xform"),s=e("../../style/color-xform"),d=e("./cfvo-ext-xform");o.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new d,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(u){return!u.gradient}get tag(){return"x14:dataBar"}render(u,f){u.openNode(this.tag,{minLength:n.toIntAttribute(f.minLength,0,!0),maxLength:n.toIntAttribute(f.maxLength,100,!0),border:n.toBoolAttribute(f.border,!1),gradient:n.toBoolAttribute(f.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(f.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(f.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(f.axisPosition,"auto"),direction:n.toAttribute(f.direction,"leftToRight")}),f.cfvo.forEach(_=>{this.cfvoXform.render(u,_)}),this.borderColorXform.render(u,f.borderColor),this.negativeBorderColorXform.render(u,f.negativeBorderColor),this.negativeFillColorXform.render(u,f.negativeFillColor),this.axisColorXform.render(u,f.axisColor),u.closeNode()}createNewModel(u){let{attributes:f}=u;return{cfvo:[],minLength:n.toIntValue(f.minLength,0),maxLength:n.toIntValue(f.maxLength,100),border:n.toBoolValue(f.border,!1),gradient:n.toBoolValue(f.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(f.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(f.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(f.axisPosition,"auto"),direction:n.toStringValue(f.direction,"leftToRight")}}onParserClose(u,f){let[,_]=u.split(":");switch(_){case"cfvo":this.model.cfvo.push(f.model);break;default:this.model[_]=f.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{get tag(){return"xm:f"}render(i,s){i.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(i){this.model+=i}parseClose(i){return i!==this.tag}}},{"../../base-xform":32}],81:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("../../composite-xform"),s=e("./cfvo-ext-xform"),d=e("./cf-icon-ext-xform");o.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new d}}get tag(){return"x14:iconSet"}render(u,f){u.openNode(this.tag,{iconSet:n.toStringAttribute(f.iconSet),reverse:n.toBoolAttribute(f.reverse,!1),showValue:n.toBoolAttribute(f.showValue,!0),custom:n.toBoolAttribute(f.icons,!1)}),f.cfvo.forEach(_=>{this.cfvoXform.render(u,_)}),f.icons&&f.icons.forEach((_,C)=>{_.iconId=C,this.cfIconXform.render(u,_)}),u.closeNode()}createNewModel(u){let{attributes:f}=u;return{cfvo:[],iconSet:n.toStringValue(f.iconSet,"3TrafficLights"),reverse:n.toBoolValue(f.reverse,!1),showValue:n.toBoolValue(f.showValue,!0)}}onParserClose(u,f){let[,_]=u.split(":");switch(_){case"cfvo":this.model.cfvo.push(f.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(f.model);break;default:this.model[_]=f.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{get tag(){return"xm:sqref"}render(i,s){i.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(i){this.model+=i}parseClose(i){return i!==this.tag}}},{"../../base-xform":32}],83:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("../../composite-xform"),s=e("../../../../doc/range"),d=e("./databar-xform"),u=e("./ext-lst-ref-xform"),f=e("./formula-xform"),_=e("./color-scale-xform"),C=e("./icon-set-xform"),x={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},y=S=>{let{type:M,operator:D}=S;switch(M){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:M};default:return{type:M,operator:D}}};class P extends i{constructor(){super(),this.map={dataBar:this.databarXform=new d,extLst:this.extLstRefXform=new u,formula:this.formulaXform=new f,colorScale:this.colorScaleXform=new _,iconSet:this.iconSetXform=new C}}get tag(){return"cfRule"}static isPrimitive(M){return M.type!=="iconSet"||!M.custom&&!x[M.iconSet]}render(M,D){switch(D.type){case"expression":this.renderExpression(M,D);break;case"cellIs":this.renderCellIs(M,D);break;case"top10":this.renderTop10(M,D);break;case"aboveAverage":this.renderAboveAverage(M,D);break;case"dataBar":this.renderDataBar(M,D);break;case"colorScale":this.renderColorScale(M,D);break;case"iconSet":this.renderIconSet(M,D);break;case"containsText":this.renderText(M,D);break;case"timePeriod":this.renderTimePeriod(M,D)}}renderExpression(M,D){M.openNode(this.tag,{type:"expression",dxfId:D.dxfId,priority:D.priority}),this.formulaXform.render(M,D.formulae[0]),M.closeNode()}renderCellIs(M,D){M.openNode(this.tag,{type:"cellIs",dxfId:D.dxfId,priority:D.priority,operator:D.operator}),D.formulae.forEach(k=>{this.formulaXform.render(M,k)}),M.closeNode()}renderTop10(M,D){M.leafNode(this.tag,{type:"top10",dxfId:D.dxfId,priority:D.priority,percent:n.toBoolAttribute(D.percent,!1),bottom:n.toBoolAttribute(D.bottom,!1),rank:n.toIntValue(D.rank,10,!0)})}renderAboveAverage(M,D){M.leafNode(this.tag,{type:"aboveAverage",dxfId:D.dxfId,priority:D.priority,aboveAverage:n.toBoolAttribute(D.aboveAverage,!0)})}renderDataBar(M,D){M.openNode(this.tag,{type:"dataBar",priority:D.priority}),this.databarXform.render(M,D),this.extLstRefXform.render(M,D),M.closeNode()}renderColorScale(M,D){M.openNode(this.tag,{type:"colorScale",priority:D.priority}),this.colorScaleXform.render(M,D),M.closeNode()}renderIconSet(M,D){P.isPrimitive(D)&&(M.openNode(this.tag,{type:"iconSet",priority:D.priority}),this.iconSetXform.render(M,D),M.closeNode())}renderText(M,D){M.openNode(this.tag,{type:D.operator,dxfId:D.dxfId,priority:D.priority,operator:n.toStringAttribute(D.operator,"containsText")});let k=(z=>{if(z.formulae&&z.formulae[0])return z.formulae[0];let U=new s(z.ref),{tl:J}=U;switch(z.operator){case"containsText":return`NOT(ISERROR(SEARCH("${z.text}",${J})))`;case"containsBlanks":return`LEN(TRIM(${J}))=0`;case"notContainsBlanks":return`LEN(TRIM(${J}))>0`;case"containsErrors":return`ISERROR(${J})`;case"notContainsErrors":return`NOT(ISERROR(${J}))`;default:return}})(D);k&&this.formulaXform.render(M,k),M.closeNode()}renderTimePeriod(M,D){M.openNode(this.tag,{type:"timePeriod",dxfId:D.dxfId,priority:D.priority,timePeriod:D.timePeriod});let k=(z=>{if(z.formulae&&z.formulae[0])return z.formulae[0];let U=new s(z.ref),{tl:J}=U;switch(z.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${J},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${J},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${J},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${J},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${J},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${J},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${J},1)=TODAY()-1`;case"today":return`FLOOR(${J},1)=TODAY()`;case"tomorrow":return`FLOOR(${J},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${J},1)<=6,FLOOR(${J},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${J})=MONTH(EDATE(TODAY(),0-1)),YEAR(${J})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${J})=MONTH(TODAY()),YEAR(${J})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${J})=MONTH(EDATE(TODAY(),0+1)),YEAR(${J})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(D);k&&this.formulaXform.render(M,k),M.closeNode()}createNewModel(M){let{attributes:D}=M;return qt(at({},y(D)),{dxfId:n.toIntValue(D.dxfId),priority:n.toIntValue(D.priority),timePeriod:D.timePeriod,percent:n.toBoolValue(D.percent),bottom:n.toBoolValue(D.bottom),rank:n.toIntValue(D.rank),aboveAverage:n.toBoolValue(D.aboveAverage)})}onParserClose(M,D){switch(M){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,D.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(D.model)}}}o.exports=P},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{get tag(){return"cfvo"}render(i,s){i.leafNode(this.tag,{type:s.type,val:s.value})}parseOpen(i){this.model={type:i.attributes.type,value:n.toFloatValue(i.attributes.val)}}parseClose(i){return i!==this.tag}}},{"../../base-xform":32}],85:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("../../style/color-xform"),s=e("./cfvo-xform");o.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return"colorScale"}render(d,u){d.openNode(this.tag),u.cfvo.forEach(f=>{this.cfvoXform.render(d,f)}),u.color.forEach(f=>{this.colorXform.render(d,f)}),d.closeNode()}createNewModel(d){return{cfvo:[],color:[]}}onParserClose(d,u){this.model[d].push(u.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("./cf-rule-xform");o.exports=class extends n{constructor(){super(),this.map={cfRule:new i}}get tag(){return"conditionalFormatting"}render(s,d){d.rules.some(i.isPrimitive)&&(s.openNode(this.tag,{sqref:d.ref}),d.rules.forEach(u=>{i.isPrimitive(u)&&(u.ref=d.ref,this.map.cfRule.render(s,u))}),s.closeNode())}createNewModel(s){let{attributes:d}=s;return{ref:d.sqref,rules:[]}}onParserClose(s,d){this.model.rules.push(d.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("./conditional-formatting-xform");o.exports=class extends n{constructor(){super(),this.cfXform=new i}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(s,d){let u=s.reduce((f,_)=>Math.max(f,..._.rules.map(C=>C.priority||0)),1);s.forEach(f=>{f.rules.forEach(_=>{_.priority||(_.priority=u++),_.style&&(_.dxfId=d.styles.addDxfStyle(_.style))})})}render(s,d){d.forEach(u=>{this.cfXform.render(s,u)})}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(s),!0;default:return!1}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return!!this.parser&&(!!this.parser.parseClose(s)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(s,d){s.forEach(u=>{u.rules.forEach(f=>{f.dxfId!==void 0&&(f.style=d.styles.getDxfStyle(f.dxfId),delete f.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,o,t){"use strict";let n=e("../../composite-xform"),i=e("../../style/color-xform"),s=e("./cfvo-xform");o.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return"dataBar"}render(d,u){d.openNode(this.tag),u.cfvo.forEach(f=>{this.cfvoXform.render(d,f)}),this.colorXform.render(d,u.color),d.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(d,u){switch(d){case"cfvo":this.model.cfvo.push(u.model);break;case"color":this.model.color=u.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("../../composite-xform");class s extends n{get tag(){return"x14:id"}render(f,_){f.leafNode(this.tag,null,_)}parseOpen(){this.model=""}parseText(f){this.model+=f}parseClose(f){return f!==this.tag}}class d extends i{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(f,_){f.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(f,_.x14Id),f.closeNode()}createNewModel(){return{}}onParserClose(f,_){this.model.x14Id=_.model}}o.exports=class extends i{constructor(){super(),this.map={ext:new d}}get tag(){return"extLst"}render(u,f){u.openNode(this.tag),this.map.ext.render(u,f),u.closeNode()}createNewModel(){return{}}onParserClose(u,f){Object.assign(this.model,f.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,o,t){"use strict";let n=e("../../base-xform");o.exports=class extends n{get tag(){return"formula"}render(i,s){i.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(i){this.model+=i}parseClose(i){return i!==this.tag}}},{"../../base-xform":32}],91:[function(e,o,t){"use strict";let n=e("../../base-xform"),i=e("../../composite-xform"),s=e("./cfvo-xform");o.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(d,u){d.openNode(this.tag,{iconSet:n.toStringAttribute(u.iconSet,"3TrafficLights"),reverse:n.toBoolAttribute(u.reverse,!1),showValue:n.toBoolAttribute(u.showValue,!0)}),u.cfvo.forEach(f=>{this.cfvoXform.render(d,f)}),d.closeNode()}createNewModel(d){let{attributes:u}=d;return{iconSet:n.toStringValue(u.iconSet,"3TrafficLights"),reverse:n.toBoolValue(u.reverse),showValue:n.toBoolValue(u.showValue),cfvo:[]}}onParserClose(d,u){this.model[d].push(u.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,o,t){"use strict";let n=e("../../../utils/utils"),i=e("../base-xform");o.exports=class extends i{get tag(){return"col"}prepare(s,d){let u=d.styles.addStyleModel(s.style||{});u&&(s.styleId=u)}render(s,d){s.openNode("col"),s.addAttribute("min",d.min),s.addAttribute("max",d.max),d.width&&s.addAttribute("width",d.width),d.styleId&&s.addAttribute("style",d.styleId),d.hidden&&s.addAttribute("hidden","1"),d.bestFit&&s.addAttribute("bestFit","1"),d.outlineLevel&&s.addAttribute("outlineLevel",d.outlineLevel),d.collapsed&&s.addAttribute("collapsed","1"),s.addAttribute("customWidth","1"),s.closeNode()}parseOpen(s){if(s.name==="col"){let d=this.model={min:parseInt(s.attributes.min||"0",10),max:parseInt(s.attributes.max||"0",10),width:s.attributes.width===void 0?void 0:parseFloat(s.attributes.width||"0")};return s.attributes.style&&(d.styleId=parseInt(s.attributes.style,10)),n.parseBoolean(s.attributes.hidden)&&(d.hidden=!0),n.parseBoolean(s.attributes.bestFit)&&(d.bestFit=!0),s.attributes.outlineLevel&&(d.outlineLevel=parseInt(s.attributes.outlineLevel,10)),n.parseBoolean(s.attributes.collapsed)&&(d.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(s,d){s.styleId&&(s.style=d.styles.getStyleModel(s.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../../../utils/utils"),s=e("../../../utils/col-cache"),d=e("../base-xform"),u=e("../../../doc/range");function f(C,x,y,P){let S=x[y];S!==void 0?C[y]=S:P!==void 0&&(C[y]=P)}function _(C,x,y,P){let S=x[y];S!==void 0?C[y]=i.parseBoolean(S):P!==void 0&&(C[y]=P)}o.exports=class extends d{get tag(){return"dataValidations"}render(C,x){let y=(function(P){let S=n.map(P,(k,z)=>({address:z,dataValidation:k,marked:!1})).sort((k,z)=>n.strcmp(k.address,z.address)),M=n.keyBy(S,"address"),D=(k,z,U)=>{for(let J=0;J{if(!k.marked){let z=s.decodeEx(k.address);if(z.dimensions)return M[z.dimensions].marked=!0,qt(at({},k.dataValidation),{sqref:k.address});let U=1,J=s.encodeAddress(z.row+U,z.col);for(;P[J]&&n.isEqual(k.dataValidation,P[J]);)U++,J=s.encodeAddress(z.row+U,z.col);let re=1;for(;D(z,U,z.col+re);)re++;for(let ee=0;ee1||re>1){let ee=z.row+(U-1),ae=z.col+(re-1);return qt(at({},k.dataValidation),{sqref:`${k.address}:${s.encodeAddress(ee,ae)}`})}return qt(at({},k.dataValidation),{sqref:k.address})}return null}).filter(Boolean)})(x);y.length&&(C.openNode("dataValidations",{count:y.length}),y.forEach(P=>{C.openNode("dataValidation"),P.type!=="any"&&(C.addAttribute("type",P.type),P.operator&&P.type!=="list"&&P.operator!=="between"&&C.addAttribute("operator",P.operator),P.allowBlank&&C.addAttribute("allowBlank","1")),P.showInputMessage&&C.addAttribute("showInputMessage","1"),P.promptTitle&&C.addAttribute("promptTitle",P.promptTitle),P.prompt&&C.addAttribute("prompt",P.prompt),P.showErrorMessage&&C.addAttribute("showErrorMessage","1"),P.errorStyle&&C.addAttribute("errorStyle",P.errorStyle),P.errorTitle&&C.addAttribute("errorTitle",P.errorTitle),P.error&&C.addAttribute("error",P.error),C.addAttribute("sqref",P.sqref),(P.formulae||[]).forEach((S,M)=>{C.openNode("formula"+(M+1)),P.type==="date"?C.writeText(i.dateToExcel(new Date(S))):C.writeText(S),C.closeNode()}),C.closeNode()}),C.closeNode())}parseOpen(C){switch(C.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=C.attributes.sqref;let x={type:C.attributes.type||"any",formulae:[]};switch(C.attributes.type&&_(x,C.attributes,"allowBlank"),_(x,C.attributes,"showInputMessage"),_(x,C.attributes,"showErrorMessage"),x.type){case"any":case"list":case"custom":break;default:f(x,C.attributes,"operator","between")}return f(x,C.attributes,"promptTitle"),f(x,C.attributes,"prompt"),f(x,C.attributes,"errorStyle"),f(x,C.attributes,"errorTitle"),f(x,C.attributes,"error"),this._dataValidation=x,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(C){this._formula&&this._formula.push(C)}parseClose(C){switch(C){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(x=>{x.includes(":")?new u(x).forEachAddress(y=>{this.model[y]=this._dataValidation}):this.model[x]=this._dataValidation}),!0;case"formula1":case"formula2":{let x=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":x=parseInt(x,10);break;case"decimal":x=parseFloat(x);break;case"date":x=i.excelToDate(parseFloat(x))}return this._dataValidation.formulae.push(x),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"dimension"}render(i,s){s&&i.leafNode("dimension",{ref:s})}parseOpen(i){return i.name==="dimension"&&(this.model=i.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"drawing"}render(i,s){s&&i.leafNode(this.tag,{"r:id":s.rId})}parseOpen(i){switch(i.name){case this.tag:return this.model={rId:i.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,o,t){"use strict";let n=e("../composite-xform"),i=e("./cf-ext/conditional-formattings-ext-xform");class s extends n{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new i}}get tag(){return"ext"}hasContent(u){return this.conditionalFormattings.hasContent(u.conditionalFormattings)}prepare(u,f){this.conditionalFormattings.prepare(u.conditionalFormattings,f)}render(u,f){u.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(u,f.conditionalFormattings),u.closeNode()}createNewModel(){return{}}onParserClose(u,f){this.model[u]=f.model}}o.exports=class extends n{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(d,u){this.ext.prepare(d,u)}hasContent(d){return this.ext.hasContent(d)}render(d,u){this.hasContent(u)&&(d.openNode("extLst"),this.ext.render(d,u),d.closeNode())}createNewModel(){return{}}onParserClose(d,u){Object.assign(this.model,u.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"headerFooter"}render(i,s){if(s){i.addRollback();let d=!1;i.openNode("headerFooter"),s.differentFirst&&(i.addAttribute("differentFirst","1"),d=!0),s.differentOddEven&&(i.addAttribute("differentOddEven","1"),d=!0),s.oddHeader&&typeof s.oddHeader=="string"&&(i.leafNode("oddHeader",null,s.oddHeader),d=!0),s.oddFooter&&typeof s.oddFooter=="string"&&(i.leafNode("oddFooter",null,s.oddFooter),d=!0),s.evenHeader&&typeof s.evenHeader=="string"&&(i.leafNode("evenHeader",null,s.evenHeader),d=!0),s.evenFooter&&typeof s.evenFooter=="string"&&(i.leafNode("evenFooter",null,s.evenFooter),d=!0),s.firstHeader&&typeof s.firstHeader=="string"&&(i.leafNode("firstHeader",null,s.firstHeader),d=!0),s.firstFooter&&typeof s.firstFooter=="string"&&(i.leafNode("firstFooter",null,s.firstFooter),d=!0),d?(i.closeNode(),i.commit()):i.rollback()}}parseOpen(i){switch(i.name){case"headerFooter":return this.model={},i.attributes.differentFirst&&(this.model.differentFirst=parseInt(i.attributes.differentFirst,0)===1),i.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(i.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(i){switch(this.currentNode){case"oddHeader":this.model.oddHeader=i;break;case"oddFooter":this.model.oddFooter=i;break;case"evenHeader":this.model.evenHeader=i;break;case"evenFooter":this.model.evenFooter=i;break;case"firstHeader":this.model.firstHeader=i;break;case"firstFooter":this.model.firstFooter=i}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"hyperlink"}render(i,s){this.isInternalLink(s)?i.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip,location:s.target}):i.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip})}parseOpen(i){return i.name==="hyperlink"&&(this.model={address:i.attributes.ref,rId:i.attributes["r:id"],tooltip:i.attributes.tooltip},i.attributes.location&&(this.model.target=i.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(i){return i.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(i.target)}}},{"../base-xform":32}],99:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"mergeCell"}render(i,s){i.leafNode("mergeCell",{ref:s})}parseOpen(i){return i.name==="mergeCell"&&(this.model=i.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../../../doc/range"),s=e("../../../utils/col-cache"),d=e("../../../doc/enums");o.exports=class{constructor(){this.merges={}}add(u){if(this.merges[u.master])this.merges[u.master].expandToAddress(u.address);else{let f=`${u.master}:${u.address}`;this.merges[u.master]=new i(f)}}get mergeCells(){return n.map(this.merges,u=>u.range)}reconcile(u,f){n.each(u,_=>{let C=s.decode(_);for(let x=C.top;x<=C.bottom;x++){let y=f[x-1];for(let P=C.left;P<=C.right;P++){let S=y.cells[P-1];S?S.type===d.ValueType.Merge&&(S.master=C.tl):y.cells[P]={type:d.ValueType.Null,address:s.encodeAddress(x,P)}}}})}getMasterAddress(u){let f=this.hash[u];return f&&f.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,o,t){"use strict";let n=e("../base-xform"),i=s=>s!==void 0;o.exports=class extends n{get tag(){return"outlinePr"}render(s,d){return!(!d||!i(d.summaryBelow)&&!i(d.summaryRight))&&(s.leafNode(this.tag,{summaryBelow:i(d.summaryBelow)?Number(d.summaryBelow):void 0,summaryRight:i(d.summaryRight)?Number(d.summaryRight):void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={summaryBelow:i(s.attributes.summaryBelow)?!!Number(s.attributes.summaryBelow):void 0,summaryRight:i(s.attributes.summaryRight)?!!Number(s.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"brk"}render(i,s){i.leafNode("brk",s)}parseOpen(i){return i.name==="brk"&&(this.model=i.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../base-xform");o.exports=class extends i{get tag(){return"pageMargins"}render(s,d){if(d){let u={left:d.left,right:d.right,top:d.top,bottom:d.bottom,header:d.header,footer:d.footer};n.some(u,f=>f!==void 0)&&s.leafNode(this.tag,u)}}parseOpen(s){switch(s.name){case this.tag:return this.model={left:parseFloat(s.attributes.left||.7),right:parseFloat(s.attributes.right||.7),top:parseFloat(s.attributes.top||.75),bottom:parseFloat(s.attributes.bottom||.75),header:parseFloat(s.attributes.header||.3),footer:parseFloat(s.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"pageSetUpPr"}render(i,s){return!(!s||!s.fitToPage)&&(i.leafNode(this.tag,{fitToPage:s.fitToPage?"1":void 0}),!0)}parseOpen(i){return i.name===this.tag&&(this.model={fitToPage:i.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../base-xform");function s(_){return _?"1":void 0}function d(_){switch(_){case"overThenDown":return _;default:return}}function u(_){switch(_){case"atEnd":case"asDisplyed":return _;default:return}}function f(_){switch(_){case"dash":case"blank":case"NA":return _;default:return}}o.exports=class extends i{get tag(){return"pageSetup"}render(_,C){if(C){let x={paperSize:C.paperSize,orientation:C.orientation,horizontalDpi:C.horizontalDpi,verticalDpi:C.verticalDpi,pageOrder:d(C.pageOrder),blackAndWhite:s(C.blackAndWhite),draft:s(C.draft),cellComments:u(C.cellComments),errors:f(C.errors),scale:C.scale,fitToWidth:C.fitToWidth,fitToHeight:C.fitToHeight,firstPageNumber:C.firstPageNumber,useFirstPageNumber:s(C.firstPageNumber),usePrinterDefaults:s(C.usePrinterDefaults),copies:C.copies};n.some(x,y=>y!==void 0)&&_.leafNode(this.tag,x)}}parseOpen(_){switch(_.name){case this.tag:return this.model={paperSize:(C=_.attributes.paperSize,C!==void 0?parseInt(C,10):void 0),orientation:_.attributes.orientation||"portrait",horizontalDpi:parseInt(_.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(_.attributes.verticalDpi||"4294967295",10),pageOrder:_.attributes.pageOrder||"downThenOver",blackAndWhite:_.attributes.blackAndWhite==="1",draft:_.attributes.draft==="1",cellComments:_.attributes.cellComments||"None",errors:_.attributes.errors||"displayed",scale:parseInt(_.attributes.scale||"100",10),fitToWidth:parseInt(_.attributes.fitToWidth||"1",10),fitToHeight:parseInt(_.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(_.attributes.firstPageNumber||"1",10),useFirstPageNumber:_.attributes.useFirstPageNumber==="1",usePrinterDefaults:_.attributes.usePrinterDefaults==="1",copies:parseInt(_.attributes.copies||"1",10)},!0;default:return!1}var C}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"picture"}render(i,s){s&&i.leafNode(this.tag,{"r:id":s.rId})}parseOpen(i){switch(i.name){case this.tag:return this.model={rId:i.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../base-xform");function s(d){return d?"1":void 0}o.exports=class extends i{get tag(){return"printOptions"}render(d,u){if(u){let f={headings:s(u.showRowColHeaders),gridLines:s(u.showGridLines),horizontalCentered:s(u.horizontalCentered),verticalCentered:s(u.verticalCentered)};n.some(f,_=>_!==void 0)&&d.leafNode(this.tag,f)}}parseOpen(d){switch(d.name){case this.tag:return this.model={showRowColHeaders:d.attributes.headings==="1",showGridLines:d.attributes.gridLines==="1",horizontalCentered:d.attributes.horizontalCentered==="1",verticalCentered:d.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,o,t){"use strict";let n=e("./page-breaks-xform"),i=e("../list-xform");o.exports=class extends i{constructor(){super({tag:"rowBreaks",count:!0,childXform:new n})}render(s,d){if(d&&d.length){s.openNode(this.tag,this.$),this.count&&(s.addAttribute(this.$count,d.length),s.addAttribute("manualBreakCount",d.length));let{childXform:u}=this;d.forEach(f=>{u.render(s,f)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../../../utils/utils"),s=e("./cell-xform");o.exports=class extends n{constructor(d){super(),this.maxItems=d&&d.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(d,u){let f=u.styles.addStyleModel(d.style);f&&(d.styleId=f);let _=this.map.c;d.cells.forEach(C=>{_.prepare(C,u)})}render(d,u,f){d.openNode("row"),d.addAttribute("r",u.number),u.height&&(d.addAttribute("ht",u.height),d.addAttribute("customHeight","1")),u.hidden&&d.addAttribute("hidden","1"),u.min>0&&u.max>0&&u.min<=u.max&&d.addAttribute("spans",`${u.min}:${u.max}`),u.styleId&&(d.addAttribute("s",u.styleId),d.addAttribute("customFormat","1")),d.addAttribute("x14ac:dyDescent","0.25"),u.outlineLevel&&d.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&d.addAttribute("collapsed","1");let _=this.map.c;u.cells.forEach(C=>{_.render(d,C,f)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;if(d.name==="row"){this.numRowsSeen+=1;let u=d.attributes.spans?d.attributes.spans.split(":").map(_=>parseInt(_,10)):[void 0,void 0],f=this.model={number:parseInt(d.attributes.r,10),min:u[0],max:u[1],cells:[]};return d.attributes.s&&(f.styleId=parseInt(d.attributes.s,10)),i.parseBoolean(d.attributes.hidden)&&(f.hidden=!0),i.parseBoolean(d.attributes.bestFit)&&(f.bestFit=!0),d.attributes.ht&&(f.height=parseFloat(d.attributes.ht)),d.attributes.outlineLevel&&(f.outlineLevel=parseInt(d.attributes.outlineLevel,10)),i.parseBoolean(d.attributes.collapsed)&&(f.collapsed=!0),!0}return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(d,u){d.style=d.styleId?u.styles.getStyleModel(d.styleId):{},d.styleId!==void 0&&(d.styleId=void 0);let f=this.map.c;d.cells.forEach(_=>{f.reconcile(_,u)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../base-xform");o.exports=class extends i{get tag(){return"sheetFormatPr"}render(s,d){if(d){let u={defaultRowHeight:d.defaultRowHeight,outlineLevelRow:d.outlineLevelRow,outlineLevelCol:d.outlineLevelCol,"x14ac:dyDescent":d.dyDescent};d.defaultColWidth&&(u.defaultColWidth=d.defaultColWidth),d.defaultRowHeight&&d.defaultRowHeight===15||(u.customHeight="1"),n.some(u,f=>f!==void 0)&&s.leafNode("sheetFormatPr",u)}}parseOpen(s){return s.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(s.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(s.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(s.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(s.attributes.outlineLevelCol||"0",10)},s.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(s.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../style/color-xform"),s=e("./page-setup-properties-xform"),d=e("./outline-properties-xform");o.exports=class extends n{constructor(){super(),this.map={tabColor:new i("tabColor"),pageSetUpPr:new s,outlinePr:new d}}get tag(){return"sheetPr"}render(u,f){if(f){u.addRollback(),u.openNode("sheetPr");let _=!1;_=this.map.tabColor.render(u,f.tabColor)||_,_=this.map.pageSetUpPr.render(u,f.pageSetup)||_,_=this.map.outlinePr.render(u,f.outlineProperties)||_,_?(u.closeNode(),u.commit()):u.rollback()}}parseOpen(u){return this.parser?(this.parser.parseOpen(u),!0):u.name===this.tag?(this.reset(),!0):!!this.map[u.name]&&(this.parser=this.map[u.name],this.parser.parseOpen(u),!0)}parseText(u){return!!this.parser&&(this.parser.parseText(u),!0)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../base-xform");function s(u,f){return u?f:void 0}function d(u,f){return u===f||void 0}o.exports=class extends i{get tag(){return"sheetProtection"}render(u,f){if(f){let _={sheet:s(f.sheet,"1"),selectLockedCells:f.selectLockedCells===!1?"1":void 0,selectUnlockedCells:f.selectUnlockedCells===!1?"1":void 0,formatCells:s(f.formatCells,"0"),formatColumns:s(f.formatColumns,"0"),formatRows:s(f.formatRows,"0"),insertColumns:s(f.insertColumns,"0"),insertRows:s(f.insertRows,"0"),insertHyperlinks:s(f.insertHyperlinks,"0"),deleteColumns:s(f.deleteColumns,"0"),deleteRows:s(f.deleteRows,"0"),sort:s(f.sort,"0"),autoFilter:s(f.autoFilter,"0"),pivotTables:s(f.pivotTables,"0")};f.sheet&&(_.algorithmName=f.algorithmName,_.hashValue=f.hashValue,_.saltValue=f.saltValue,_.spinCount=f.spinCount,_.objects=s(f.objects===!1,"1"),_.scenarios=s(f.scenarios===!1,"1")),n.some(_,C=>C!==void 0)&&u.leafNode(this.tag,_)}}parseOpen(u){switch(u.name){case this.tag:return this.model={sheet:d(u.attributes.sheet,"1"),objects:u.attributes.objects!=="1"&&void 0,scenarios:u.attributes.scenarios!=="1"&&void 0,selectLockedCells:u.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:u.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:d(u.attributes.formatCells,"0"),formatColumns:d(u.attributes.formatColumns,"0"),formatRows:d(u.attributes.formatRows,"0"),insertColumns:d(u.attributes.insertColumns,"0"),insertRows:d(u.attributes.insertRows,"0"),insertHyperlinks:d(u.attributes.insertHyperlinks,"0"),deleteColumns:d(u.attributes.deleteColumns,"0"),deleteRows:d(u.attributes.deleteRows,"0"),sort:d(u.attributes.sort,"0"),autoFilter:d(u.attributes.autoFilter,"0"),pivotTables:d(u.attributes.pivotTables,"0")},u.attributes.algorithmName&&(this.model.algorithmName=u.attributes.algorithmName,this.model.hashValue=u.attributes.hashValue,this.model.saltValue=u.attributes.saltValue,this.model.spinCount=parseInt(u.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,o,t){"use strict";let n=e("../../../utils/col-cache"),i=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};o.exports=class extends i{get tag(){return"sheetView"}prepare(d){switch(d.state){case"frozen":case"split":break;default:d.state="normal"}}render(d,u){d.openNode("sheetView",{workbookViewId:u.workbookViewId||0});let f=function(P,S,M){M&&d.addAttribute(P,S)},_,C,x,y;switch(f("rightToLeft","1",u.rightToLeft===!0),f("tabSelected","1",u.tabSelected),f("showRuler","0",u.showRuler===!1),f("showRowColHeaders","0",u.showRowColHeaders===!1),f("showGridLines","0",u.showGridLines===!1),f("zoomScale",u.zoomScale,u.zoomScale),f("zoomScaleNormal",u.zoomScaleNormal,u.zoomScaleNormal),f("view",u.style,u.style),u.state){case"frozen":C=u.xSplit||0,x=u.ySplit||0,_=u.topLeftCell||n.getAddress(x+1,C+1).address,y=(u.xSplit&&u.ySplit?"bottomRight":u.xSplit&&"topRight")||"bottomLeft",d.leafNode("pane",{xSplit:u.xSplit||void 0,ySplit:u.ySplit||void 0,topLeftCell:_,activePane:y,state:"frozen"}),d.leafNode("selection",{pane:y,activeCell:u.activeCell,sqref:u.activeCell});break;case"split":u.activePane==="topLeft"&&(u.activePane=void 0),d.leafNode("pane",{xSplit:u.xSplit||void 0,ySplit:u.ySplit||void 0,topLeftCell:u.topLeftCell,activePane:u.activePane}),d.leafNode("selection",{pane:u.activePane,activeCell:u.activeCell,sqref:u.activeCell});break;case"normal":u.activeCell&&d.leafNode("selection",{activeCell:u.activeCell,sqref:u.activeCell})}d.closeNode()}parseOpen(d){switch(d.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(d.attributes.workbookViewId,10),rightToLeft:d.attributes.rightToLeft==="1",tabSelected:d.attributes.tabSelected==="1",showRuler:d.attributes.showRuler!=="0",showRowColHeaders:d.attributes.showRowColHeaders!=="0",showGridLines:d.attributes.showGridLines!=="0",zoomScale:parseInt(d.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(d.attributes.zoomScaleNormal||"100",10),style:d.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(d.attributes.xSplit||"0",10),ySplit:parseInt(d.attributes.ySplit||"0",10),topLeftCell:d.attributes.topLeftCell,activePane:d.attributes.activePane||"topLeft",state:d.attributes.state},!0;case"selection":{let u=d.attributes.pane||"topLeft";return this.selections[u]={pane:u,activeCell:d.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(d){let u,f;switch(d){case"sheetView":return this.sheetView&&this.pane?(u=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(u.activePane=this.pane.activePane),f=this.selections[this.pane.activePane],f&&f.activeCell&&(u.activeCell=f.activeCell),this.sheetView.style&&(u.style=this.sheetView.style)):(u=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},f=this.selections.topLeft,f&&f.activeCell&&(u.activeCell=f.activeCell),this.sheetView.style&&(u.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"tablePart"}render(i,s){s&&i.leafNode(this.tag,{"r:id":s.rId})}parseOpen(i){switch(i.name){case this.tag:return this.model={rId:i.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),d=e("../../rel-type"),u=e("./merges"),f=e("../base-xform"),_=e("../list-xform"),C=e("./row-xform"),x=e("./col-xform"),y=e("./dimension-xform"),P=e("./hyperlink-xform"),S=e("./merge-cell-xform"),M=e("./data-validations-xform"),D=e("./sheet-properties-xform"),k=e("./sheet-format-properties-xform"),z=e("./sheet-view-xform"),U=e("./sheet-protection-xform"),J=e("./page-margins-xform"),re=e("./page-setup-xform"),ee=e("./print-options-xform"),ae=e("./auto-filter-xform"),se=e("./picture-xform"),_e=e("./drawing-xform"),de=e("./table-part-xform"),j=e("./row-breaks-xform"),W=e("./header-footer-xform"),pe=e("./cf/conditional-formattings-xform"),O=e("./ext-lst-xform"),B=(N,G)=>{if(!G||!G.length)return N;if(!N||!N.length)return G;let $={},ne={};return N.forEach(be=>{$[be.ref]=be,be.rules.forEach(ye=>{let{x14Id:Ne}=ye;Ne&&(ne[Ne]=ye)})}),G.forEach(be=>{be.rules.forEach(ye=>{let Ne=ne[ye.x14Id];Ne?((te,Ae)=>{Object.keys(Ae).forEach(K=>{let Q=te[K],Ce=Ae[K];Q===void 0&&Ce!==void 0&&(te[K]=Ce)})})(Ne,ye):$[be.ref]?$[be.ref].rules.push(ye):N.push({ref:be.ref,rules:[ye]})})}),N};class L extends f{constructor(G){super();let{maxRows:$,maxCols:ne,ignoreNodes:be}=G||{};this.ignoreNodes=be||[],this.map={sheetPr:new D,dimension:new y,sheetViews:new _({tag:"sheetViews",count:!1,childXform:new z}),sheetFormatPr:new k,cols:new _({tag:"cols",count:!1,childXform:new x}),sheetData:new _({tag:"sheetData",count:!1,empty:!0,childXform:new C({maxItems:ne}),maxItems:$}),autoFilter:new ae,mergeCells:new _({tag:"mergeCells",count:!0,childXform:new S}),rowBreaks:new j,hyperlinks:new _({tag:"hyperlinks",count:!1,childXform:new P}),pageMargins:new J,dataValidations:new M,pageSetup:new re,headerFooter:new W,printOptions:new ee,picture:new se,drawing:new _e,sheetProtection:new U,tableParts:new _({tag:"tableParts",count:!0,childXform:new de}),conditionalFormatting:new pe,extLst:new O}}prepare(G,$){$.merges=new u,G.hyperlinks=$.hyperlinks=[],G.comments=$.comments=[],$.formulae={},$.siFormulae=0,this.map.cols.prepare(G.cols,$),this.map.sheetData.prepare(G.rows,$),this.map.conditionalFormatting.prepare(G.conditionalFormattings,$),G.mergeCells=$.merges.mergeCells;let ne=G.rels=[];function be(te){return"rId"+(te.length+1)}if(G.hyperlinks.forEach(te=>{let Ae=be(ne);te.rId=Ae,ne.push({Id:Ae,Type:d.Hyperlink,Target:te.target,TargetMode:"External"})}),G.comments.length>0){let te={Id:be(ne),Type:d.Comments,Target:`../comments${G.id}.xml`};ne.push(te);let Ae={Id:be(ne),Type:d.VmlDrawing,Target:`../drawings/vmlDrawing${G.id}.vml`};ne.push(Ae),G.comments.forEach(K=>{K.refAddress=i.decodeAddress(K.ref)}),$.commentRefs.push({commentName:"comments"+G.id,vmlDrawing:"vmlDrawing"+G.id})}let ye=[],Ne;G.media.forEach(te=>{if(te.type==="background"){let Ae=be(ne);Ne=$.media[te.imageId],ne.push({Id:Ae,Type:d.Image,Target:`../media/${Ne.name}.${Ne.extension}`}),G.background={rId:Ae},G.image=$.media[te.imageId]}else if(te.type==="image"){let{drawing:Ae}=G;Ne=$.media[te.imageId],Ae||(Ae=G.drawing={rId:be(ne),name:"drawing"+ ++$.drawingsCount,anchors:[],rels:[]},$.drawings.push(Ae),ne.push({Id:Ae.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${Ae.name}.xml`}));let K=this.preImageId===te.imageId?ye[te.imageId]:ye[Ae.rels.length];K||(K=be(Ae.rels),ye[Ae.rels.length]=K,Ae.rels.push({Id:K,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Ne.name}.${Ne.extension}`}));let Q={picture:{rId:K},range:te.range};if(te.hyperlinks&&te.hyperlinks.hyperlink){let Ce=be(Ae.rels);ye[Ae.rels.length]=Ce,Q.picture.hyperlinks={tooltip:te.hyperlinks.tooltip,rId:Ce},Ae.rels.push({Id:Ce,Type:d.Hyperlink,Target:te.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=te.imageId,Ae.anchors.push(Q)}}),G.tables.forEach(te=>{let Ae=be(ne);te.rId=Ae,ne.push({Id:Ae,Type:d.Table,Target:"../tables/"+te.target}),te.columns.forEach(K=>{let{style:Q}=K;Q&&(K.dxfId=$.styles.addDxfStyle(Q))})}),this.map.extLst.prepare(G,$)}render(G,$){G.openXml(s.StdDocAttributes),G.openNode("worksheet",L.WORKSHEET_ATTRIBUTES);let ne=$.properties?{defaultRowHeight:$.properties.defaultRowHeight,dyDescent:$.properties.dyDescent,outlineLevelCol:$.properties.outlineLevelCol,outlineLevelRow:$.properties.outlineLevelRow}:void 0;$.properties&&$.properties.defaultColWidth&&(ne.defaultColWidth=$.properties.defaultColWidth);let be={outlineProperties:$.properties&&$.properties.outlineProperties,tabColor:$.properties&&$.properties.tabColor,pageSetup:$.pageSetup&&$.pageSetup.fitToPage?{fitToPage:$.pageSetup.fitToPage}:void 0},ye=$.pageSetup&&$.pageSetup.margins,Ne={showRowColHeaders:$.pageSetup&&$.pageSetup.showRowColHeaders,showGridLines:$.pageSetup&&$.pageSetup.showGridLines,horizontalCentered:$.pageSetup&&$.pageSetup.horizontalCentered,verticalCentered:$.pageSetup&&$.pageSetup.verticalCentered},te=$.sheetProtection;this.map.sheetPr.render(G,be),this.map.dimension.render(G,$.dimensions),this.map.sheetViews.render(G,$.views),this.map.sheetFormatPr.render(G,ne),this.map.cols.render(G,$.cols),this.map.sheetData.render(G,$.rows),this.map.sheetProtection.render(G,te),this.map.autoFilter.render(G,$.autoFilter),this.map.mergeCells.render(G,$.mergeCells),this.map.conditionalFormatting.render(G,$.conditionalFormattings),this.map.dataValidations.render(G,$.dataValidations),this.map.hyperlinks.render(G,$.hyperlinks),this.map.printOptions.render(G,Ne),this.map.pageMargins.render(G,ye),this.map.pageSetup.render(G,$.pageSetup),this.map.headerFooter.render(G,$.headerFooter),this.map.rowBreaks.render(G,$.rowBreaks),this.map.drawing.render(G,$.drawing),this.map.picture.render(G,$.background),this.map.tableParts.render(G,$.tables),this.map.extLst.render(G,$),$.rels&&$.rels.forEach(Ae=>{Ae.Type===d.VmlDrawing&&G.leafNode("legacyDrawing",{"r:id":Ae.Id})}),G.closeNode()}parseOpen(G){return this.parser?(this.parser.parseOpen(G),!0):G.name==="worksheet"?(n.each(this.map,$=>{$.reset()}),!0):(this.map[G.name]&&!this.ignoreNodes.includes(G.name)&&(this.parser=this.map[G.name],this.parser.parseOpen(G)),!0)}parseText(G){this.parser&&this.parser.parseText(G)}parseClose(G){if(this.parser)return this.parser.parseClose(G)||(this.parser=void 0),!0;switch(G){case"worksheet":{let $=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&($.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&($.outlineProperties=this.map.sheetPr.model.outlineProperties);let ne={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},be=Object.assign(ne,this.map.pageSetup.model,this.map.printOptions.model),ye=B(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:$,views:this.map.sheetViews.model,pageSetup:be,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:ye},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(G,$){let ne=(G.relationships||[]).reduce((ye,Ne)=>{if(ye[Ne.Id]=Ne,Ne.Type===d.Comments&&(G.comments=$.comments[Ne.Target].comments),Ne.Type===d.VmlDrawing&&G.comments&&G.comments.length){let te=$.vmlDrawings[Ne.Target].comments;G.comments.forEach((Ae,K)=>{Ae.note=Object.assign({},Ae.note,te[K])})}return ye},{});if($.commentsMap=(G.comments||[]).reduce((ye,Ne)=>(Ne.ref&&(ye[Ne.ref]=Ne),ye),{}),$.hyperlinkMap=(G.hyperlinks||[]).reduce((ye,Ne)=>(Ne.rId&&(ye[Ne.address]=ne[Ne.rId].Target),ye),{}),$.formulae={},G.rows=G.rows&&G.rows.filter(Boolean)||[],G.rows.forEach(ye=>{ye.cells=ye.cells&&ye.cells.filter(Boolean)||[]}),this.map.cols.reconcile(G.cols,$),this.map.sheetData.reconcile(G.rows,$),this.map.conditionalFormatting.reconcile(G.conditionalFormattings,$),G.media=[],G.drawing){let ye=ne[G.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(ye){let Ne=ye[1];$.drawings[Ne].anchors.forEach(te=>{if(te.medium){let Ae={type:"image",imageId:te.medium.index,range:te.range,hyperlinks:te.picture.hyperlinks};G.media.push(Ae)}})}}let be=G.background&&ne[G.background.rId];if(be){let ye=be.Target.split("/media/")[1],Ne=$.mediaIndex&&$.mediaIndex[ye];Ne!==void 0&&G.media.push({type:"background",imageId:Ne})}G.tables=(G.tables||[]).map(ye=>{let Ne=ne[ye.rId];return $.tables[Ne.Target]}),delete G.relationships,delete G.hyperlinks,delete G.comments}}L.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},o.exports=L},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr}render(i,s){s&&(i.openNode(this.tag),i.closeNode())}parseOpen(i){i.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs,this._format=i.format||function(s){try{return Number.isNaN(s.getTime())?"":s.toISOString()}catch{return""}},this._parse=i.parse||function(s){return new Date(s)}}render(i,s){s&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,this._format(s)):i.writeText(this._format(s)),i.closeNode())}parseOpen(i){i.name===this.tag&&(this.attr?this.model=this._parse(i.attributes[this.attr]):this.text=[])}parseText(i){this.attr||this.text.push(i)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs,this.zero=i.zero}render(i,s){(s||this.zero)&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,s):i.writeText(s),i.closeNode())}parseOpen(i){return i.name===this.tag&&(this.attr?this.model=parseInt(i.attributes[this.attr],10):this.text=[],!0)}parseText(i){this.attr||this.text.push(i)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs}render(i,s){s!==void 0&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,s):i.writeText(s),i.closeNode())}parseOpen(i){i.name===this.tag&&(this.attr?this.model=i.attributes[this.attr]:this.text=[])}parseText(i){this.attr||this.text.push(i)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,o,t){"use strict";let n=e("./base-xform"),i=e("../../utils/xml-stream");o.exports=class extends n{constructor(s){super(),this._model=s}render(s){if(!this._xml){let d=new i;(function u(f,_){f.openNode(_.tag,_.$),_.c&&_.c.forEach(C=>{u(f,C)}),_.t&&f.writeText(_.t),f.closeNode()})(d,this._model),this._xml=d.xml}s.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(s){switch(s){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,o,t){"use strict";let n=e("./text-xform"),i=e("./rich-text-xform"),s=e("../base-xform");o.exports=class extends s{constructor(){super(),this.map={r:new i,t:new n}}get tag(){return"rPh"}render(d,u){if(d.openNode(this.tag,{sb:u.sb||0,eb:u.eb||0}),u&&u.hasOwnProperty("richText")&&u.richText){let{r:f}=this.map;u.richText.forEach(_=>{f.render(d,_)})}else u&&this.map.t.render(d,u.text);d.closeNode()}parseOpen(d){let{name:u}=d;return this.parser?(this.parser.parseOpen(d),!0):u===this.tag?(this.model={sb:parseInt(d.attributes.sb,10),eb:parseInt(d.attributes.eb,10)},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(d),!0))}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){switch(d){case"r":{let u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(d){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,o,t){"use strict";let n=e("./text-xform"),i=e("../style/font-xform"),s=e("../base-xform");class d extends s{constructor(f){super(),this.model=f}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new n)}get fontXform(){return this._fontXform||(this._fontXform=new i(d.FONT_OPTIONS))}render(f,_){_=_||this.model,f.openNode("r"),_.font&&this.fontXform.render(f,_.font),this.textXform.render(f,_.text),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(f),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(f),!0;default:return!1}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){switch(f){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(f),!0}}}d.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},o.exports=d},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,o,t){"use strict";let n=e("./text-xform"),i=e("./rich-text-xform"),s=e("./phonetic-text-xform"),d=e("../base-xform");o.exports=class extends d{constructor(u){super(),this.model=u,this.map={r:new i,t:new n,rPh:new s}}get tag(){return"si"}render(u,f){u.openNode(this.tag),f&&f.hasOwnProperty("richText")&&f.richText?f.richText.length?f.richText.forEach(_=>{this.map.r.render(u,_)}):this.map.t.render(u,""):f!=null&&this.map.t.render(u,f),u.closeNode()}parseOpen(u){let{name:f}=u;return this.parser?(this.parser.parseOpen(u),!0):f===this.tag?(this.model={},!0):(this.parser=this.map[f],!!this.parser&&(this.parser.parseOpen(u),!0))}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":{let f=this.model.richText;f||(f=this.model.richText=[]),f.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./shared-string-xform");o.exports=class extends i{constructor(d){super(),this.model=d||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(d){return this.model.values[d]}add(d){return d.richText?this.addRichText(d):this.addText(d)}addText(d){let u=this.hash[d];return u===void 0&&(u=this.hash[d]=this.model.values.length,this.model.values.push(d)),this.model.count++,u}addRichText(d){let u=this.sharedStringXform.toXml(d),f=this.rich[u];return f===void 0&&(f=this.rich[u]=this.model.values.length,this.model.values.push(d)),this.model.count++,f}render(d,u){u=u||this._values,d.openXml(n.StdDocAttributes),d.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:u.count,uniqueCount:u.values.length});let f=this.sharedStringXform;u.values.forEach(_=>{f.render(d,_)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(d),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(d))}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(d){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+d)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"t"}render(i,s){i.openNode("t"),/^\s|\n|\s$/.test(s)&&i.addAttribute("xml:space","preserve"),i.writeText(s),i.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(i,s)=>String.fromCharCode(parseInt(s,16)))}parseOpen(i){switch(i.name){case"t":return this._text=[],!0;default:return!1}}parseText(i){this._text.push(i)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,o,t){"use strict";let n=e("../../../doc/enums"),i=e("../../../utils/utils"),s=e("../base-xform"),d={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((f,_)=>(f[_]=!0,f),{}),horizontal(f){return this.horizontalValues[f]?f:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((f,_)=>(f[_]=!0,f),{}),vertical(f){return f==="middle"?"center":this.verticalValues[f]?f:void 0},wrapText:f=>!!f||void 0,shrinkToFit:f=>!!f||void 0,textRotation(f){switch(f){case"vertical":return f;default:return(f=i.validInt(f))>=-90&&f<=90?f:void 0}},indent:f=>(f=i.validInt(f),Math.max(0,f)),readingOrder(f){switch(f){case"ltr":return n.ReadingOrder.LeftToRight;case"rtl":return n.ReadingOrder.RightToLeft;default:return}}},u={toXml(f){if(f=d.textRotation(f)){if(f==="vertical")return 255;let _=Math.round(f);if(_>=0&&_<=90)return _;if(_<0&&_>=-90)return 90-_}},toModel(f){let _=i.validInt(f);if(_!==void 0){if(_===255)return"vertical";if(_>=0&&_<=90)return _;if(_>90&&_<=180)return 90-_}}};o.exports=class extends s{get tag(){return"alignment"}render(f,_){f.addRollback(),f.openNode("alignment");let C=!1;function x(y,P){P&&(f.addAttribute(y,P),C=!0)}x("horizontal",d.horizontal(_.horizontal)),x("vertical",d.vertical(_.vertical)),x("wrapText",!!d.wrapText(_.wrapText)&&"1"),x("shrinkToFit",!!d.shrinkToFit(_.shrinkToFit)&&"1"),x("indent",d.indent(_.indent)),x("textRotation",u.toXml(_.textRotation)),x("readingOrder",d.readingOrder(_.readingOrder)),f.closeNode(),C?f.commit():f.rollback()}parseOpen(f){let _={},C=!1;function x(y,P,S){y&&(_[P]=S,C=!0)}x(f.attributes.horizontal,"horizontal",f.attributes.horizontal),x(f.attributes.vertical,"vertical",f.attributes.vertical==="center"?"middle":f.attributes.vertical),x(f.attributes.wrapText,"wrapText",i.parseBoolean(f.attributes.wrapText)),x(f.attributes.shrinkToFit,"shrinkToFit",i.parseBoolean(f.attributes.shrinkToFit)),x(f.attributes.indent,"indent",parseInt(f.attributes.indent,10)),x(f.attributes.textRotation,"textRotation",u.toModel(f.attributes.textRotation)),x(f.attributes.readingOrder,"readingOrder",f.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=C?_:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../../../utils/utils"),s=e("./color-xform");class d extends n{constructor(f){super(),this.name=f,this.map={color:new s}}get tag(){return this.name}render(f,_,C){let x=_&&_.color||C||this.defaultColor;f.openNode(this.name),_&&_.style&&(f.addAttribute("style",_.style),x&&this.map.color.render(f,x)),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case this.name:{let{style:_}=f.attributes;return this.model=_?{style:_}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(f),!0;default:return!1}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){return this.parser?(this.parser.parseClose(f)||(this.parser=void 0),!0):(f===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(f){return d.validStyleValues[f]}}d.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((u,f)=>(u[f]=!0,u),{}),o.exports=class extends n{constructor(){super(),this.map={top:new d("top"),left:new d("left"),bottom:new d("bottom"),right:new d("right"),diagonal:new d("diagonal")}}render(u,f){let{color:_}=f;function C(x,y){x&&!x.color&&f.color&&(x=qt(at({},x),{color:f.color})),y.render(u,x,_)}u.openNode("border"),f.diagonal&&f.diagonal.style&&(f.diagonal.up&&u.addAttribute("diagonalUp","1"),f.diagonal.down&&u.addAttribute("diagonalDown","1")),C(f.left,this.map.left),C(f.right,this.map.right),C(f.top,this.map.top),C(f.bottom,this.map.bottom),C(f.diagonal,this.map.diagonal),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"border":return this.reset(),this.diagonalUp=i.parseBoolean(u.attributes.diagonalUp),this.diagonalDown=i.parseBoolean(u.attributes.diagonalDown),!0;default:return this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),!0)}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;if(u==="border"){let f=this.model={},_=function(C,x,y){x&&(y&&Object.assign(x,y),f[C]=x)};_("left",this.map.left.model),_("right",this.map.right.model),_("top",this.map.top.model),_("bottom",this.map.bottom.model),_("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{constructor(i){super(),this.name=i||"color"}get tag(){return this.name}render(i,s){return!!s&&(i.openNode(this.name),s.argb?i.addAttribute("rgb",s.argb):s.theme!==void 0?(i.addAttribute("theme",s.theme),s.tint!==void 0&&i.addAttribute("tint",s.tint)):s.indexed!==void 0?i.addAttribute("indexed",s.indexed):i.addAttribute("auto","1"),i.closeNode(),!0)}parseOpen(i){return i.name===this.name&&(i.attributes.rgb?this.model={argb:i.attributes.rgb}:i.attributes.theme?(this.model={theme:parseInt(i.attributes.theme,10)},i.attributes.tint&&(this.model.tint=parseFloat(i.attributes.tint))):i.attributes.indexed?this.model={indexed:parseInt(i.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./alignment-xform"),s=e("./border-xform"),d=e("./fill-xform"),u=e("./font-xform"),f=e("./numfmt-xform"),_=e("./protection-xform");o.exports=class extends n{constructor(){super(),this.map={alignment:new i,border:new s,fill:new d,font:new u,numFmt:new f,protection:new _}}get tag(){return"dxf"}render(C,x){if(C.openNode(this.tag),x.font&&this.map.font.render(C,x.font),x.numFmt&&x.numFmtId){let y={id:x.numFmtId,formatCode:x.numFmt};this.map.numFmt.render(C,y)}x.fill&&this.map.fill.render(C,x.fill),x.alignment&&this.map.alignment.render(C,x.alignment),x.border&&this.map.border.render(C,x.border),x.protection&&this.map.protection.render(C,x.protection),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C),!0}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return this.parser?(this.parser.parseClose(C)||(this.parser=void 0),!0):C!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./color-xform");class s extends n{constructor(){super(),this.map={color:new i}}get tag(){return"stop"}render(C,x){C.openNode("stop"),C.addAttribute("position",x.position),this.map.color.render(C,x.color),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"stop":return this.model={position:parseFloat(C.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(C),!0;default:return!1}}parseText(){}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class d extends n{constructor(){super(),this.map={fgColor:new i("fgColor"),bgColor:new i("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(C,x){C.openNode("patternFill"),C.addAttribute("patternType",x.pattern),x.fgColor&&this.map.fgColor.render(C,x.fgColor),x.bgColor&&this.map.bgColor.render(C,x.bgColor),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"patternFill":return this.model={type:"pattern",pattern:C.attributes.patternType},!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.parser.model&&(this.model[C]=this.parser.model),this.parser=void 0),!0)}}class u extends n{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(C,x){switch(C.openNode("gradientFill"),x.gradient){case"angle":C.addAttribute("degree",x.degree);break;case"path":C.addAttribute("type","path"),x.center.left&&(C.addAttribute("left",x.center.left),x.center.right===void 0&&C.addAttribute("right",x.center.left)),x.center.right&&C.addAttribute("right",x.center.right),x.center.top&&(C.addAttribute("top",x.center.top),x.center.bottom===void 0&&C.addAttribute("bottom",x.center.top)),x.center.bottom&&C.addAttribute("bottom",x.center.bottom)}let y=this.map.stop;x.stops.forEach(P=>{y.render(C,P)}),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"gradientFill":{let x=this.model={stops:[]};return C.attributes.degree?(x.gradient="angle",x.degree=parseInt(C.attributes.degree,10)):C.attributes.type==="path"&&(x.gradient="path",x.center={left:C.attributes.left?parseFloat(C.attributes.left):0,top:C.attributes.top?parseFloat(C.attributes.top):0},C.attributes.right!==C.attributes.left&&(x.center.right=C.attributes.right?parseFloat(C.attributes.right):0),C.attributes.bottom!==C.attributes.top&&(x.center.bottom=C.attributes.bottom?parseFloat(C.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(C),!0;default:return!1}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class f extends n{constructor(){super(),this.map={patternFill:new d,gradientFill:new u}}get tag(){return"fill"}render(C,x){switch(C.addRollback(),C.openNode("fill"),x.type){case"pattern":this.map.patternFill.render(C,x);break;case"gradient":this.map.gradientFill.render(C,x);break;default:return void C.rollback()}C.closeNode(),C.commit()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"fill":return this.model={},!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(C){return f.validPatternValues[C]}}f.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((_,C)=>(_[C]=!0,_),{}),f.StopXform=s,f.PatternFillXform=d,f.GradientFillXform=u,o.exports=f},{"../base-xform":32,"./color-xform":128}],131:[function(e,o,t){"use strict";let n=e("./color-xform"),i=e("../simple/boolean-xform"),s=e("../simple/integer-xform"),d=e("../simple/string-xform"),u=e("./underline-xform"),f=e("../../../utils/under-dash"),_=e("../base-xform");class C extends _{constructor(y){super(),this.options=y||C.OPTIONS,this.map={b:{prop:"bold",xform:new i({tag:"b",attr:"val"})},i:{prop:"italic",xform:new i({tag:"i",attr:"val"})},u:{prop:"underline",xform:new u},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new n},condense:{prop:"condense",xform:new i({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new i({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new i({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new d({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new d({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new i({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new i({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new d({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(y,P){let{map:S}=this;y.openNode(this.options.tagName),f.each(this.map,(M,D)=>{S[D].xform.render(y,P[M.prop])}),y.closeNode()}parseOpen(y){if(this.parser)return this.parser.parseOpen(y),!0;if(this.map[y.name])return this.parser=this.map[y.name].xform,this.parser.parseOpen(y);switch(y.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(y){this.parser&&this.parser.parseText(y)}parseClose(y){if(this.parser&&!this.parser.parseClose(y)){let P=this.map[y];return this.parser.model&&(this.model[P.prop]=this.parser.model),this.parser=void 0,!0}switch(y){case this.options.tagName:return!1;default:return!0}}}C.OPTIONS={tagName:"font",fontNameTag:"name"},o.exports=C},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,o,t){"use strict";let n=e("../../../utils/under-dash"),i=e("../../defaultnumformats"),s=e("../base-xform"),d=(function(){let f={};return n.each(i,(_,C)=>{_.f&&(f[_.f]=parseInt(C,10))}),f})();class u extends s{constructor(_,C){super(),this.id=_,this.formatCode=C}get tag(){return"numFmt"}render(_,C){_.leafNode("numFmt",{numFmtId:C.id,formatCode:C.formatCode})}parseOpen(_){switch(_.name){case"numFmt":return this.model={id:parseInt(_.attributes.numFmtId,10),formatCode:_.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}u.getDefaultFmtId=function(f){return d[f]},u.getDefaultFmtCode=function(f){return i[f]&&i[f].f},o.exports=u},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,o,t){"use strict";let n=e("../base-xform"),i={boolean:(s,d)=>s===void 0?d:s};o.exports=class extends n{get tag(){return"protection"}render(s,d){s.addRollback(),s.openNode("protection");let u=!1;function f(_,C){C!==void 0&&(s.addAttribute(_,C),u=!0)}f("locked",i.boolean(d.locked,!0)?void 0:"0"),f("hidden",i.boolean(d.hidden,!1)?"1":void 0),s.closeNode(),u?s.commit():s.rollback()}parseOpen(s){let d={locked:s.attributes.locked!=="0",hidden:s.attributes.hidden==="1"},u=!d.locked||d.hidden;this.model=u?d:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./alignment-xform"),s=e("./protection-xform");o.exports=class extends n{constructor(d){super(),this.xfId=!(!d||!d.xfId),this.map={alignment:new i,protection:new s}}get tag(){return"xf"}render(d,u){d.openNode("xf",{numFmtId:u.numFmtId||0,fontId:u.fontId||0,fillId:u.fillId||0,borderId:u.borderId||0}),this.xfId&&d.addAttribute("xfId",u.xfId||0),u.numFmtId&&d.addAttribute("applyNumberFormat","1"),u.fontId&&d.addAttribute("applyFont","1"),u.fillId&&d.addAttribute("applyFill","1"),u.borderId&&d.addAttribute("applyBorder","1"),u.alignment&&d.addAttribute("applyAlignment","1"),u.protection&&d.addAttribute("applyProtection","1"),u.alignment&&this.map.alignment.render(d,u.alignment),u.protection&&this.map.protection.render(d,u.protection),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"xf":return this.model={numFmtId:parseInt(d.attributes.numFmtId,10),fontId:parseInt(d.attributes.fontId,10),fillId:parseInt(d.attributes.fillId,10),borderId:parseInt(d.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(d.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(d),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):d!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,o,t){"use strict";let n=e("../../../doc/enums"),i=e("../../../utils/xml-stream"),s=e("../base-xform"),d=e("../static-xform"),u=e("../list-xform"),f=e("./font-xform"),_=e("./fill-xform"),C=e("./border-xform"),x=e("./numfmt-xform"),y=e("./style-xform"),P=e("./dxf-xform");class S extends s{constructor(D){super(),this.map={numFmts:new u({tag:"numFmts",count:!0,childXform:new x}),fonts:new u({tag:"fonts",count:!0,childXform:new f,$:{"x14ac:knownFonts":1}}),fills:new u({tag:"fills",count:!0,childXform:new _}),borders:new u({tag:"borders",count:!0,childXform:new C}),cellStyleXfs:new u({tag:"cellStyleXfs",count:!0,childXform:new y}),cellXfs:new u({tag:"cellXfs",count:!0,childXform:new y({xfId:!0})}),dxfs:new u({tag:"dxfs",always:!0,count:!0,childXform:new P}),numFmt:new x,font:new f,fill:new _,border:new C,style:new y({xfId:!0}),cellStyles:S.STATIC_XFORMS.cellStyles,tableStyles:S.STATIC_XFORMS.tableStyles,extLst:S.STATIC_XFORMS.extLst},D&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(D,k){k=k||this.model,D.openXml(i.StdDocAttributes),D.openNode("styleSheet",S.STYLESHEET_ATTRIBUTES),this.index?(k.numFmts&&k.numFmts.length&&(D.openNode("numFmts",{count:k.numFmts.length}),k.numFmts.forEach(z=>{D.writeXml(z)}),D.closeNode()),k.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),D.openNode("fonts",{count:k.fonts.length,"x14ac:knownFonts":1}),k.fonts.forEach(z=>{D.writeXml(z)}),D.closeNode(),D.openNode("fills",{count:k.fills.length}),k.fills.forEach(z=>{D.writeXml(z)}),D.closeNode(),D.openNode("borders",{count:k.borders.length}),k.borders.forEach(z=>{D.writeXml(z)}),D.closeNode(),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),D.openNode("cellXfs",{count:k.styles.length}),k.styles.forEach(z=>{D.writeXml(z)}),D.closeNode()):(this.map.numFmts.render(D,k.numFmts),this.map.fonts.render(D,k.fonts),this.map.fills.render(D,k.fills),this.map.borders.render(D,k.borders),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(D,k.styles)),S.STATIC_XFORMS.cellStyles.render(D),this.map.dxfs.render(D,k.dxfs),S.STATIC_XFORMS.tableStyles.render(D),S.STATIC_XFORMS.extLst.render(D),D.closeNode()}parseOpen(D){if(this.parser)return this.parser.parseOpen(D),!0;switch(D.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[D.name],this.parser&&this.parser.parseOpen(D),!0}}parseText(D){this.parser&&this.parser.parseText(D)}parseClose(D){if(this.parser)return this.parser.parseClose(D)||(this.parser=void 0),!0;switch(D){case"styleSheet":{this.model={};let k=(z,U)=>{U.model&&U.model.length&&(this.model[z]=U.model)};if(k("numFmts",this.map.numFmts),k("fonts",this.map.fonts),k("fills",this.map.fills),k("borders",this.map.borders),k("styles",this.map.cellXfs),k("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let z=this.index.numFmt;this.model.numFmts.forEach(U=>{z[U.id]=U.formatCode})}return!1}default:return!0}}addStyleModel(D,k){if(!D)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(D))return this.weakMap.get(D);let z={};if(k=k||n.ValueType.Number,D.numFmt)z.numFmtId=this._addNumFmtStr(D.numFmt);else switch(k){case n.ValueType.Number:z.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:z.numFmtId=this._addNumFmtStr("mm-dd-yy")}D.font&&(z.fontId=this._addFont(D.font)),D.border&&(z.borderId=this._addBorder(D.border)),D.fill&&(z.fillId=this._addFill(D.fill)),D.alignment&&(z.alignment=D.alignment),D.protection&&(z.protection=D.protection);let U=this._addStyle(z);return this.weakMap&&this.weakMap.set(D,U),U}getStyleModel(D){let k=this.model.styles[D];if(!k)return null;let z=this.index.model[D];if(z)return z;if(z=this.index.model[D]={},k.numFmtId){let J=this.index.numFmt[k.numFmtId]||x.getDefaultFmtCode(k.numFmtId);J&&(z.numFmt=J)}function U(J,re,ee){if(ee||ee===0){let ae=re[ee];ae&&(z[J]=ae)}}return U("font",this.model.fonts,k.fontId),U("border",this.model.borders,k.borderId),U("fill",this.model.fills,k.fillId),k.alignment&&(z.alignment=k.alignment),k.protection&&(z.protection=k.protection),z}addDxfStyle(D){return D.numFmt&&(D.numFmtId=this._addNumFmtStr(D.numFmt)),this.model.dxfs.push(D),this.model.dxfs.length-1}getDxfStyle(D){return this.model.dxfs[D]}_addStyle(D){let k=this.map.style.toXml(D),z=this.index.style[k];return z===void 0&&(z=this.index.style[k]=this.model.styles.length,this.model.styles.push(k)),z}_addNumFmtStr(D){let k=x.getDefaultFmtId(D);if(k!==void 0||(k=this.index.numFmt[D],k!==void 0))return k;k=this.index.numFmt[D]=164+this.model.numFmts.length;let z=this.map.numFmt.toXml({id:k,formatCode:D});return this.model.numFmts.push(z),k}_addFont(D){let k=this.map.font.toXml(D),z=this.index.font[k];return z===void 0&&(z=this.index.font[k]=this.model.fonts.length,this.model.fonts.push(k)),z}_addBorder(D){let k=this.map.border.toXml(D),z=this.index.border[k];return z===void 0&&(z=this.index.border[k]=this.model.borders.length,this.model.borders.push(k)),z}_addFill(D){let k=this.map.fill.toXml(D),z=this.index.fill[k];return z===void 0&&(z=this.index.fill[k]=this.model.fills.length,this.model.fills.push(k)),z}}S.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},S.STATIC_XFORMS={cellStyles:new d({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new d({tag:"dxfs",$:{count:0}}),tableStyles:new d({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new d({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},S.Mock=class extends S{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(M){return M.autodrain(),Promise.resolve()}addStyleModel(M,D){switch(D){case n.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){let M={numFmtId:x.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(M)}return this._dateStyleId}getStyleModel(){return{}}},o.exports=S},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,o,t){"use strict";let n=e("../base-xform");class i extends n{constructor(d){super(),this.model=d}get tag(){return"u"}render(d,u){if((u=u||this.model)===!0)d.leafNode("u");else{let f=i.Attributes[u];f&&d.leafNode("u",f)}}parseOpen(d){d.name==="u"&&(this.model=d.attributes.val||!0)}parseText(){}parseClose(){return!1}}i.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},o.exports=i},{"../base-xform":32}],137:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("./filter-column-xform");o.exports=class extends n{constructor(){super(),this.map={filterColumn:new i}}get tag(){return"autoFilter"}prepare(s){s.columns.forEach((d,u)=>{this.map.filterColumn.prepare(d,{index:u})})}render(s,d){return s.openNode(this.tag,{ref:d.autoFilterRef}),d.columns.forEach(u=>{this.map.filterColumn.render(s,u)}),s.closeNode(),!0}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model={autoFilterRef:s.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[s.name],this.parser)return this.parseOpen(s),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(s){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+s)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"customFilter"}render(i,s){i.leafNode(this.tag,{val:s.val,operator:s.operator})}parseOpen(i){return i.name===this.tag&&(this.model={val:i.attributes.val,operator:i.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,o,t){"use strict";let n=e("../base-xform"),i=e("../list-xform"),s=e("./custom-filter-xform"),d=e("./filter-xform");o.exports=class extends n{constructor(){super(),this.map={customFilters:new i({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new i({tag:"filters",count:!1,empty:!0,childXform:new d})}}get tag(){return"filterColumn"}prepare(u,f){u.colId=f.index.toString()}render(u,f){return f.customFilters?(u.openNode(this.tag,{colId:f.colId,hiddenButton:f.filterButton?"0":"1"}),this.map.customFilters.render(u,f.customFilters),u.closeNode(),!0):(u.leafNode(this.tag,{colId:f.colId,hiddenButton:f.filterButton?"0":"1"}),!0)}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;let{attributes:f}=u;switch(u.name){case this.tag:return this.model={filterButton:f.hiddenButton==="0"},!0;default:if(this.parser=this.map[u.name],this.parser)return this.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"filter"}render(i,s){i.leafNode(this.tag,{val:s.val})}parseOpen(i){return i.name===this.tag&&(this.model={val:i.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"tableColumn"}prepare(i,s){i.id=s.index+1}render(i,s){return i.leafNode(this.tag,{id:s.id.toString(),name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId}),!0}parseOpen(i){if(i.name===this.tag){let{attributes:s}=i;return this.model={name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,o,t){"use strict";let n=e("../base-xform");o.exports=class extends n{get tag(){return"tableStyleInfo"}render(i,s){return i.leafNode(this.tag,{name:s.theme?s.theme:void 0,showFirstColumn:s.showFirstColumn?"1":"0",showLastColumn:s.showLastColumn?"1":"0",showRowStripes:s.showRowStripes?"1":"0",showColumnStripes:s.showColumnStripes?"1":"0"}),!0}parseOpen(i){if(i.name===this.tag){let{attributes:s}=i;return this.model={theme:s.name?s.name:null,showFirstColumn:s.showFirstColumn==="1",showLastColumn:s.showLastColumn==="1",showRowStripes:s.showRowStripes==="1",showColumnStripes:s.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,o,t){"use strict";let n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../list-xform"),d=e("./auto-filter-xform"),u=e("./table-column-xform"),f=e("./table-style-info-xform");class _ extends i{constructor(){super(),this.map={autoFilter:new d,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new u}),tableStyleInfo:new f}}prepare(x,y){this.map.autoFilter.prepare(x),this.map.tableColumns.prepare(x.columns,y)}get tag(){return"table"}render(x,y){x.openXml(n.StdDocAttributes),x.openNode(this.tag,qt(at({},_.TABLE_ATTRIBUTES),{id:y.id,name:y.name,displayName:y.displayName||y.name,ref:y.tableRef,totalsRowCount:y.totalsRow?"1":void 0,totalsRowShown:y.totalsRow?void 0:"1",headerRowCount:y.headerRow?"1":"0"})),this.map.autoFilter.render(x,y),this.map.tableColumns.render(x,y.columns),this.map.tableStyleInfo.render(x,y.style),x.closeNode()}parseOpen(x){if(this.parser)return this.parser.parseOpen(x),!0;let{name:y,attributes:P}=x;switch(y){case this.tag:this.reset(),this.model={name:P.name,displayName:P.displayName||P.name,tableRef:P.ref,totalsRow:P.totalsRowCount==="1",headerRow:P.headerRowCount==="1"};break;default:this.parser=this.map[x.name],this.parser&&this.parser.parseOpen(x)}return!0}parseText(x){this.parser&&this.parser.parseText(x)}parseClose(x){if(this.parser)return this.parser.parseClose(x)||(this.parser=void 0),!0;switch(x){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((y,P)=>{this.model.columns[P].filterButton=y.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(x,y){x.columns.forEach(P=>{P.dxfId!==void 0&&(P.style=y.styles.getDxfStyle(P.dxfId))})}}_.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},o.exports=_},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,o,t){(function(n,i){(function(){"use strict";let s=e("fs"),d=e("jszip"),{PassThrough:u}=e("readable-stream"),f=e("../utils/zip-stream"),_=e("../utils/stream-buf"),C=e("../utils/utils"),x=e("../utils/xml-stream"),{bufferToString:y}=e("../utils/browser-buffer-decode"),P=e("./xform/style/styles-xform"),S=e("./xform/core/core-xform"),M=e("./xform/strings/shared-strings-xform"),D=e("./xform/core/relationships-xform"),k=e("./xform/core/content-types-xform"),z=e("./xform/core/app-xform"),U=e("./xform/book/workbook-xform"),J=e("./xform/sheet/worksheet-xform"),re=e("./xform/drawing/drawing-xform"),ee=e("./xform/table/table-xform"),ae=e("./xform/comment/comments-xform"),se=e("./xform/comment/vml-notes-xform"),_e=e("./xml/theme1");class de{constructor(W){this.workbook=W}readFile(W,pe){return qn(this,null,function*(){if(!(yield C.fs.exists(W)))throw new Error("File not found: "+W);let O=s.createReadStream(W);try{let B=yield this.read(O,pe);return O.close(),B}catch(B){throw O.close(),B}})}parseRels(W){return new D().parseStream(W)}parseWorkbook(W){return new U().parseStream(W)}parseSharedStrings(W){return new M().parseStream(W)}reconcile(W,pe){let O=new U,B=new J(pe),L=new re,N=new ee;O.reconcile(W);let G={media:W.media,mediaIndex:W.mediaIndex};Object.keys(W.drawings).forEach(be=>{let ye=W.drawings[be],Ne=W.drawingRels[be];Ne&&(G.rels=Ne.reduce((te,Ae)=>(te[Ae.Id]=Ae,te),{}),(ye.anchors||[]).forEach(te=>{let Ae=te.picture&&te.picture.hyperlinks;Ae&&G.rels[Ae.rId]&&(Ae.hyperlink=G.rels[Ae.rId].Target,delete Ae.rId)}),L.reconcile(ye,G))});let $={styles:W.styles};Object.values(W.tables).forEach(be=>{N.reconcile(be,$)});let ne={styles:W.styles,sharedStrings:W.sharedStrings,media:W.media,mediaIndex:W.mediaIndex,date1904:W.properties&&W.properties.date1904,drawings:W.drawings,comments:W.comments,tables:W.tables,vmlDrawings:W.vmlDrawings};W.worksheets.forEach(be=>{be.relationships=W.worksheetRels[be.sheetNo],B.reconcile(be,ne)}),delete W.worksheetHash,delete W.worksheetRels,delete W.globalRels,delete W.sharedStrings,delete W.workbookRels,delete W.sheetDefs,delete W.styles,delete W.mediaIndex,delete W.drawings,delete W.drawingRels,delete W.vmlDrawings}_processWorksheetEntry(W,pe,O,B,L){return qn(this,null,function*(){let N=new J(B),G=yield N.parseStream(W);G.sheetNo=O,pe.worksheetHash[L]=G,pe.worksheets.push(G)})}_processCommentEntry(W,pe,O){return qn(this,null,function*(){let B=new ae,L=yield B.parseStream(W);pe.comments[`../${O}.xml`]=L})}_processTableEntry(W,pe,O){return qn(this,null,function*(){let B=new ee,L=yield B.parseStream(W);pe.tables[`../tables/${O}.xml`]=L})}_processWorksheetRelsEntry(W,pe,O){return qn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.worksheetRels[O]=L})}_processMediaEntry(W,pe,O){return qn(this,null,function*(){let B=O.lastIndexOf(".");if(B>=1){let L=O.substr(B+1),N=O.substr(0,B);yield new Promise((G,$)=>{let ne=new _;ne.on("finish",()=>{pe.mediaIndex[O]=pe.media.length,pe.mediaIndex[N]=pe.media.length;let be={type:"image",name:N,extension:L,buffer:ne.toBuffer()};pe.media.push(be),G()}),W.on("error",be=>{$(be)}),W.pipe(ne)})}})}_processDrawingEntry(W,pe,O){return qn(this,null,function*(){let B=new re,L=yield B.parseStream(W);pe.drawings[O]=L})}_processDrawingRelsEntry(W,pe,O){return qn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.drawingRels[O]=L})}_processVmlDrawingEntry(W,pe,O){return qn(this,null,function*(){let B=new se,L=yield B.parseStream(W);pe.vmlDrawings[`../drawings/${O}.vml`]=L})}_processThemeEntry(W,pe,O){return qn(this,null,function*(){yield new Promise((B,L)=>{let N=new _;W.on("error",L),N.on("error",L),N.on("finish",()=>{pe.themes[O]=N.read().toString(),B()}),W.pipe(N)})})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}read(W,pe){return qn(this,null,function*(){!W[Symbol.asyncIterator]&&W.pipe&&(W=W.pipe(new u));let O=[];try{for(var B=ug(W),L,N,G;L=!(N=yield B.next()).done;L=!1){let $=N.value;O.push($)}}catch{G=[N]}finally{try{L&&(N=B.return)&&(yield N.call(B))}finally{if(G)throw G[0]}}return this.load(i.concat(O),pe)})}load(W,pe){return qn(this,null,function*(){let O;O=pe&&pe.base64?i.from(W.toString(),"base64"):W;let B={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},L=yield d.loadAsync(O);for(let N of Object.values(L.files))if(!N.dir){let G,$=N.name;if($[0]==="/"&&($=$.substr(1)),$.match(/xl\/media\//)||$.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))G=new u,G.write(yield N.async("nodebuffer"));else{let ne;G=new u({writableObjectMode:!0,readableObjectMode:!0}),ne=n.browser?y(yield N.async("nodebuffer")):yield N.async("string");let be=16384;for(let ye=0;yeqn(null,null,function*(){if(O.type==="image"){let B=`xl/media/${O.name}.${O.extension}`;if(O.filename){let L=yield(function(N,G){return new Promise(($,ne)=>{s.readFile(N,G,(be,ye)=>{be?ne(be):$(ye)})})})(O.filename);return W.append(L,{name:B})}if(O.buffer)return W.append(O.buffer,{name:B});if(O.base64){let L=O.base64,N=L.substring(L.indexOf(",")+1);return W.append(N,{name:B,base64:!0})}}throw new Error("Unsupported media")})))})}addDrawings(W,pe){let O=new re,B=new D;pe.worksheets.forEach(L=>{let{drawing:N}=L;if(N){O.prepare(N,{});let G=O.toXml(N);W.append(G,{name:`xl/drawings/${N.name}.xml`}),G=B.toXml(N.rels),W.append(G,{name:`xl/drawings/_rels/${N.name}.xml.rels`})}})}addTables(W,pe){let O=new ee;pe.worksheets.forEach(B=>{let{tables:L}=B;L.forEach(N=>{O.prepare(N,{});let G=O.toXml(N);W.append(G,{name:"xl/tables/"+N.target})})})}addContentTypes(W,pe){return qn(this,null,function*(){let O=new k().toXml(pe);W.append(O,{name:"[Content_Types].xml"})})}addApp(W,pe){return qn(this,null,function*(){let O=new z().toXml(pe);W.append(O,{name:"docProps/app.xml"})})}addCore(W,pe){return qn(this,null,function*(){let O=new S;W.append(O.toXml(pe),{name:"docProps/core.xml"})})}addThemes(W,pe){return qn(this,null,function*(){let O=pe.themes||{theme1:_e};Object.keys(O).forEach(B=>{let L=O[B],N=`xl/theme/${B}.xml`;W.append(L,{name:N})})})}addOfficeRels(W){return qn(this,null,function*(){let pe=new D().toXml([{Id:"rId1",Type:de.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:de.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:de.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);W.append(pe,{name:"_rels/.rels"})})}addWorkbookRels(W,pe){return qn(this,null,function*(){let O=1,B=[{Id:"rId"+O++,Type:de.RelType.Styles,Target:"styles.xml"},{Id:"rId"+O++,Type:de.RelType.Theme,Target:"theme/theme1.xml"}];pe.sharedStrings.count&&B.push({Id:"rId"+O++,Type:de.RelType.SharedStrings,Target:"sharedStrings.xml"}),pe.worksheets.forEach(N=>{N.rId="rId"+O++,B.push({Id:N.rId,Type:de.RelType.Worksheet,Target:`worksheets/sheet${N.id}.xml`})});let L=new D().toXml(B);W.append(L,{name:"xl/_rels/workbook.xml.rels"})})}addSharedStrings(W,pe){return qn(this,null,function*(){pe.sharedStrings&&pe.sharedStrings.count&&W.append(pe.sharedStrings.xml,{name:"xl/sharedStrings.xml"})})}addStyles(W,pe){return qn(this,null,function*(){let{xml:O}=pe.styles;O&&W.append(O,{name:"xl/styles.xml"})})}addWorkbook(W,pe){return qn(this,null,function*(){let O=new U;W.append(O.toXml(pe),{name:"xl/workbook.xml"})})}addWorksheets(W,pe){return qn(this,null,function*(){let O=new J,B=new D,L=new ae,N=new se;pe.worksheets.forEach(G=>{let $=new x;O.render($,G),W.append($.xml,{name:`xl/worksheets/sheet${G.id}.xml`}),G.rels&&G.rels.length&&($=new x,B.render($,G.rels),W.append($.xml,{name:`xl/worksheets/_rels/sheet${G.id}.xml.rels`})),G.comments.length>0&&($=new x,L.render($,G),W.append($.xml,{name:`xl/comments${G.id}.xml`}),$=new x,N.render($,G),W.append($.xml,{name:`xl/drawings/vmlDrawing${G.id}.vml`}))})})}_finalize(W){return new Promise((pe,O)=>{W.on("finish",()=>{pe(this)}),W.on("error",O),W.finalize()})}prepareModel(W,pe){W.creator=W.creator||"ExcelJS",W.lastModifiedBy=W.lastModifiedBy||"ExcelJS",W.created=W.created||new Date,W.modified=W.modified||new Date,W.useSharedStrings=pe.useSharedStrings===void 0||pe.useSharedStrings,W.useStyles=pe.useStyles===void 0||pe.useStyles,W.sharedStrings=new M,W.styles=W.useStyles?new P(!0):new P.Mock;let O=new U,B=new J;O.prepare(W);let L={sharedStrings:W.sharedStrings,styles:W.styles,date1904:W.properties.date1904,drawingsCount:0,media:W.media};L.drawings=W.drawings=[],L.commentRefs=W.commentRefs=[];let N=0;W.tables=[],W.worksheets.forEach(G=>{G.tables.forEach($=>{N++,$.target=`table${N}.xml`,$.id=N,W.tables.push($)}),B.prepare(G,L)})}write(W,pe){return qn(this,null,function*(){pe=pe||{};let{model:O}=this.workbook,B=new f.ZipWriter(pe.zip);return B.pipe(W),this.prepareModel(O,pe),yield this.addContentTypes(B,O),yield this.addOfficeRels(B,O),yield this.addWorkbookRels(B,O),yield this.addWorksheets(B,O),yield this.addSharedStrings(B,O),yield this.addDrawings(B,O),yield this.addTables(B,O),yield Promise.all([this.addThemes(B,O),this.addStyles(B,O)]),yield this.addMedia(B,O),yield Promise.all([this.addApp(B,O),this.addCore(B,O)]),yield this.addWorkbook(B,O),this._finalize(B)})}writeFile(W,pe){let O=s.createWriteStream(W);return new Promise((B,L)=>{O.on("finish",()=>{B()}),O.on("error",N=>{L(N)}),this.write(O,pe).then(()=>{O.end()}).catch(N=>{L(N)})})}writeBuffer(W){return qn(this,null,function*(){let pe=new _;return yield this.write(pe,W),pe.read()})}}de.RelType=e("./rel-type"),o.exports=de}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,o,t){"use strict";o.exports=` `},{}],146:[function(e,o,t){(function(n){(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;let i=e("stream"),s=e("./formatter");class d extends i.Transform{constructor(f){super({writableObjectMode:f.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=f,this.rowFormatter=new s.RowFormatter(f),this.hasWrittenBOM=!f.writeBOM}transform(f){return this.rowFormatter.rowTransform=f,this}_transform(f,_,C){let x=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(f,(y,P)=>y?(x=!0,C(y)):(P&&P.forEach(S=>{this.push(n.from(S,"utf8"))}),x=!0,C()))}catch(y){if(x)throw y;C(y)}}_flush(f){this.rowFormatter.finish((_,C)=>_?f(_):(C&&C.forEach(x=>{this.push(n.from(x,"utf8"))}),f()))}}t.CsvFormatterStream=d}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0,t.FormatterOptions=class{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var i;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,n||{}),n?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),n?.quote===!0?this.quote='"':n?.quote===!1&&(this.quote=""),typeof n?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((i=n.writeHeaders)===null||i===void 0||i),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,o,t){"use strict";var n=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;let i=n(e("lodash.isboolean")),s=n(e("lodash.isnil")),d=n(e("lodash.escaperegexp"));t.FieldFormatter=class{constructor(u){this._headers=null,this.formatterOptions=u,u.headers!==null&&(this.headers=u.headers),this.REPLACE_REGEXP=new RegExp(u.quote,"g");let f=`[${u.delimiter}${d.default(u.rowDelimiter)}|\r| @@ -26,7 +26,7 @@ function print() { __p += __j.call(arguments, '') } `}static isTokenCarriageReturn(n,i){return n.token===i.carriageReturn}static isTokenComment(n,i){return i.supportsComments&&!!n&&n.token===i.comment}static isTokenEscapeCharacter(n,i){return n.token===i.escapeChar}static isTokenQuote(n,i){return n.token===i.quote}static isTokenDelimiter(n,i){return n.token===i.delimiter}}},{}],160:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=void 0,t.ColumnFormatter=class{constructor(n){n.trim?this.format=i=>i.trim():n.ltrim?this.format=i=>i.trimLeft():n.rtrim?this.format=i=>i.trimRight():this.format=i=>i}}},{}],161:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnParser=void 0;let n=e("./NonQuotedColumnParser"),i=e("./QuotedColumnParser"),s=e("../Token");t.ColumnParser=class{constructor(d){this.parserOptions=d,this.quotedColumnParser=new i.QuotedColumnParser(d),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(d)}parse(d){let{nextNonSpaceToken:u}=d;return u!==null&&s.Token.isTokenQuote(u,this.parserOptions)?(d.advanceToToken(u),this.quotedColumnParser.parse(d)):this.nonQuotedColumnParser.parse(d)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonQuotedColumnParser=void 0;let n=e("./ColumnFormatter"),i=e("../Token");t.NonQuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new n.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;let{parserOptions:d}=this,u=[],f=s.nextCharacterToken;for(;f&&!i.Token.isTokenDelimiter(f,d)&&!i.Token.isTokenRowDelimiter(f);f=s.nextCharacterToken)u.push(f.token),s.advancePastToken(f);return this.columnFormatter.format(u.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=void 0;let n=e("./ColumnFormatter"),i=e("../Token");t.QuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new n.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;let d=s.cursor,{foundClosingQuote:u,col:f}=this.gatherDataBetweenQuotes(s);if(!u){if(s.advanceTo(d),!s.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${s.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(s),f}gatherDataBetweenQuotes(s){let{parserOptions:d}=this,u=!1,f=!1,_=[],C=s.nextCharacterToken;for(;!f&&C!==null;C=s.nextCharacterToken){let x=i.Token.isTokenQuote(C,d);if(!u&&x)u=!0;else if(u)if(i.Token.isTokenEscapeCharacter(C,d)){s.advancePastToken(C);let y=s.nextCharacterToken;y!==null&&(i.Token.isTokenQuote(y,d)||i.Token.isTokenEscapeCharacter(y,d))?(_.push(y.token),C=y):x?f=!0:_.push(C.token)}else x?f=!0:_.push(C.token);s.advancePastToken(C)}return{col:this.columnFormatter.format(_.join("")),foundClosingQuote:f}}checkForMalformedColumn(s){let{parserOptions:d}=this,{nextNonSpaceToken:u}=s;if(u){let f=i.Token.isTokenDelimiter(u,d),_=i.Token.isTokenRowDelimiter(u);if(!f&&!_){let C=s.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${d.escapedDelimiter}' OR new line got: '${u.token}'. at '${C}`)}s.advanceToToken(u)}else s.hasMoreData||s.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=void 0;var n=e("./ColumnParser");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var i=e("./NonQuotedColumnParser");Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var s=e("./QuotedColumnParser");Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var d=e("./ColumnFormatter");Object.defineProperty(t,"ColumnFormatter",{enumerable:!0,get:function(){return d.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=t.Token=t.Scanner=t.RowParser=t.Parser=void 0;var n=e("./Parser");Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=e("./RowParser");Object.defineProperty(t,"RowParser",{enumerable:!0,get:function(){return i.RowParser}});var s=e("./Scanner");Object.defineProperty(t,"Scanner",{enumerable:!0,get:function(){return s.Scanner}});var d=e("./Token");Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return d.Token}});var u=e("./column");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return u.ColumnParser}}),Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return u.NonQuotedColumnParser}}),Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return u.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,o,t){"use strict";var n=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=void 0;let i=n(e("lodash.isundefined")),s=n(e("lodash.isfunction")),d=n(e("lodash.uniq")),u=n(e("lodash.groupby"));t.HeaderTransformer=class{constructor(f){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=f,f.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(f.headers)?this.setHeaders(f.headers):s.default(f.headers)&&(this.headersTransform=f.headers)}transform(f,_){return this.shouldMapRow(f)?_(null,this.processRow(f)):_(null,{row:null,isValid:!0})}shouldMapRow(f){let{parserOptions:_}=this;if(!this.headersTransform&&_.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(f)){if(this.headersTransform)this.setHeaders(this.headersTransform(f));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(f)}return!1}return!0}processRow(f){if(!this.headers)return{row:f,isValid:!0};let{parserOptions:_}=this;if(!_.discardUnmappedColumns&&f.length>this.headersLength){if(!_.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${f.length}`);return{row:f,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${f.length}`}}return _.strictColumnHandling&&f.length!!x);if(d.default(C).length!==C.length){let x=u.default(C),y=Object.keys(x).filter(P=>x[P].length>1);throw new Error("Duplicate headers found "+JSON.stringify(y))}this.headers=f,this.receivedHeaders=!0,this.headersLength=((_=this.headers)===null||_===void 0?void 0:_.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,o,t){"use strict";var n=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowTransformerValidator=void 0;let i=n(e("lodash.isfunction")),s=e("../types");class d{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(f){return s.isSyncTransform(f)?(_,C)=>{let x=null;try{x=f(_)}catch(y){return C(y)}return C(null,x)}:f}static createValidator(f){return s.isSyncValidate(f)?(_,C)=>{C(null,{row:_,isValid:f(_)})}:(_,C)=>{f(_,(x,y,P)=>x?C(x):C(null,y?{row:_,isValid:y,reason:P}:{row:_,isValid:!1,reason:P}))}}set rowTransform(f){if(!i.default(f))throw new TypeError("The transform should be a function");this._rowTransform=d.createTransform(f)}set rowValidator(f){if(!i.default(f))throw new TypeError("The validate should be a function");this._rowValidator=d.createValidator(f)}transformAndValidate(f,_){return this.callTransformer(f,(C,x)=>C?_(C):x?this.callValidator(x,(y,P)=>y?_(y):P&&!P.isValid?_(null,{row:x,isValid:!1,reason:P.reason}):_(null,{row:x,isValid:!0})):_(null,{row:null,isValid:!0}))}callTransformer(f,_){return this._rowTransform?this._rowTransform(f,_):_(null,f)}callValidator(f,_){return this._rowValidator?this._rowValidator(f,_):_(null,{row:f,isValid:!0})}}t.RowTransformerValidator=d},{"../types":169,"lodash.isfunction":446}],168:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=t.RowTransformerValidator=void 0;var n=e("./RowTransformerValidator");Object.defineProperty(t,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=e("./HeaderTransformer");Object.defineProperty(t,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncValidate=t.isSyncTransform=void 0,t.isSyncTransform=n=>n.length===1,t.isSyncValidate=n=>n.length===1},{}],170:[function(e,o,t){"use strict";let n=t;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(e,o,t){"use strict";let n=e("./encoders"),i=e("./decoders"),s=e("inherits");function d(u,f){this.name=u,this.body=f,this.decoders={},this.encoders={}}t.define=function(u,f){return new d(u,f)},d.prototype._createNamed=function(u){let f=this.name;function _(C){this._initNamed(C,f)}return s(_,u),_.prototype._initNamed=function(C,x){u.call(this,C,x)},new _(this)},d.prototype._getDecoder=function(u){return u=u||"der",this.decoders.hasOwnProperty(u)||(this.decoders[u]=this._createNamed(i[u])),this.decoders[u]},d.prototype.decode=function(u,f,_){return this._getDecoder(f).decode(u,_)},d.prototype._getEncoder=function(u){return u=u||"der",this.encoders.hasOwnProperty(u)||(this.encoders[u]=this._createNamed(n[u])),this.encoders[u]},d.prototype.encode=function(u,f,_){return this._getEncoder(f).encode(u,_)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,o,t){"use strict";let n=e("inherits"),i=e("../base/reporter").Reporter,s=e("safer-buffer").Buffer;function d(f,_){i.call(this,_),s.isBuffer(f)?(this.base=f,this.offset=0,this.length=f.length):this.error("Input not Buffer")}function u(f,_){if(Array.isArray(f))this.length=0,this.value=f.map(function(C){return u.isEncoderBuffer(C)||(C=new u(C,_)),this.length+=C.length,C},this);else if(typeof f=="number"){if(!(0<=f&&f<=255))return _.error("non-byte EncoderBuffer value");this.value=f,this.length=1}else if(typeof f=="string")this.value=f,this.length=s.byteLength(f);else{if(!s.isBuffer(f))return _.error("Unsupported type: "+typeof f);this.value=f,this.length=f.length}}n(d,i),t.DecoderBuffer=d,d.isDecoderBuffer=function(f){return f instanceof d?!0:typeof f=="object"&&s.isBuffer(f.base)&&f.constructor.name==="DecoderBuffer"&&typeof f.offset=="number"&&typeof f.length=="number"&&typeof f.save=="function"&&typeof f.restore=="function"&&typeof f.isEmpty=="function"&&typeof f.readUInt8=="function"&&typeof f.skip=="function"&&typeof f.raw=="function"},d.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},d.prototype.restore=function(f){let _=new d(this.base);return _.offset=f.offset,_.length=this.offset,this.offset=f.offset,i.prototype.restore.call(this,f.reporter),_},d.prototype.isEmpty=function(){return this.offset===this.length},d.prototype.readUInt8=function(f){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(f||"DecoderBuffer overrun")},d.prototype.skip=function(f,_){if(!(this.offset+f<=this.length))return this.error(_||"DecoderBuffer overrun");let C=new d(this.base);return C._reporterState=this._reporterState,C.offset=this.offset,C.length=this.offset+f,this.offset+=f,C},d.prototype.raw=function(f){return this.base.slice(f?f.offset:this.offset,this.length)},t.EncoderBuffer=u,u.isEncoderBuffer=function(f){return f instanceof u?!0:typeof f=="object"&&f.constructor.name==="EncoderBuffer"&&typeof f.length=="number"&&typeof f.join=="function"},u.prototype.join=function(f,_){return f||(f=s.alloc(this.length)),_||(_=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(C){C.join(f,_),_+=C.length}):(typeof this.value=="number"?f[_]=this.value:typeof this.value=="string"?f.write(this.value,_):s.isBuffer(this.value)&&this.value.copy(f,_),_+=this.length)),f}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,o,t){"use strict";let n=t;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,o,t){"use strict";let n=e("../base/reporter").Reporter,i=e("../base/buffer").EncoderBuffer,s=e("../base/buffer").DecoderBuffer,d=e("minimalistic-assert"),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function _(x,y,P){let S={};this._baseState=S,S.name=P,S.enc=x,S.parent=y||null,S.children=null,S.tag=null,S.args=null,S.reverseArgs=null,S.choice=null,S.optional=!1,S.any=!1,S.obj=!1,S.use=null,S.useDecoder=null,S.key=null,S.default=null,S.explicit=null,S.implicit=null,S.contains=null,S.parent||(S.children=[],this._wrap())}o.exports=_;let C=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];_.prototype.clone=function(){let x=this._baseState,y={};C.forEach(function(S){y[S]=x[S]});let P=new this.constructor(y.parent);return P._baseState=y,P},_.prototype._wrap=function(){let x=this._baseState;f.forEach(function(y){this[y]=function(){let P=new this.constructor(this);return x.children.push(P),P[y].apply(P,arguments)}},this)},_.prototype._init=function(x){let y=this._baseState;d(y.parent===null),x.call(this),y.children=y.children.filter(function(P){return P._baseState.parent===this},this),d.equal(y.children.length,1,"Root node can have only one child")},_.prototype._useArgs=function(x){let y=this._baseState,P=x.filter(function(S){return S instanceof this.constructor},this);x=x.filter(function(S){return!(S instanceof this.constructor)},this),P.length!==0&&(d(y.children===null),y.children=P,P.forEach(function(S){S._baseState.parent=this},this)),x.length!==0&&(d(y.args===null),y.args=x,y.reverseArgs=x.map(function(S){if(typeof S!="object"||S.constructor!==Object)return S;let M={};return Object.keys(S).forEach(function(D){D==(0|D)&&(D|=0);let k=S[D];M[k]=D}),M}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(x){_.prototype[x]=function(){let y=this._baseState;throw new Error(x+" not implemented for encoding: "+y.enc)}}),u.forEach(function(x){_.prototype[x]=function(){let y=this._baseState,P=Array.prototype.slice.call(arguments);return d(y.tag===null),y.tag=x,this._useArgs(P),this}}),_.prototype.use=function(x){d(x);let y=this._baseState;return d(y.use===null),y.use=x,this},_.prototype.optional=function(){return this._baseState.optional=!0,this},_.prototype.def=function(x){let y=this._baseState;return d(y.default===null),y.default=x,y.optional=!0,this},_.prototype.explicit=function(x){let y=this._baseState;return d(y.explicit===null&&y.implicit===null),y.explicit=x,this},_.prototype.implicit=function(x){let y=this._baseState;return d(y.explicit===null&&y.implicit===null),y.implicit=x,this},_.prototype.obj=function(){let x=this._baseState,y=Array.prototype.slice.call(arguments);return x.obj=!0,y.length!==0&&this._useArgs(y),this},_.prototype.key=function(x){let y=this._baseState;return d(y.key===null),y.key=x,this},_.prototype.any=function(){return this._baseState.any=!0,this},_.prototype.choice=function(x){let y=this._baseState;return d(y.choice===null),y.choice=x,this._useArgs(Object.keys(x).map(function(P){return x[P]})),this},_.prototype.contains=function(x){let y=this._baseState;return d(y.use===null),y.contains=x,this},_.prototype._decode=function(x,y){let P=this._baseState;if(P.parent===null)return x.wrapResult(P.children[0]._decode(x,y));let S,M=P.default,D=!0,k=null;if(P.key!==null&&(k=x.enterKey(P.key)),P.optional){let z=null;if(P.explicit!==null?z=P.explicit:P.implicit!==null?z=P.implicit:P.tag!==null&&(z=P.tag),z!==null||P.any){if(D=this._peekTag(x,z,P.any),x.isError(D))return D}else{let U=x.save();try{P.choice===null?this._decodeGeneric(P.tag,x,y):this._decodeChoice(x,y),D=!0}catch{D=!1}x.restore(U)}}if(P.obj&&D&&(S=x.enterObject()),D){if(P.explicit!==null){let U=this._decodeTag(x,P.explicit);if(x.isError(U))return U;x=U}let z=x.offset;if(P.use===null&&P.choice===null){let U;P.any&&(U=x.save());let J=this._decodeTag(x,P.implicit!==null?P.implicit:P.tag,P.any);if(x.isError(J))return J;P.any?M=x.raw(U):x=J}if(y&&y.track&&P.tag!==null&&y.track(x.path(),z,x.length,"tagged"),y&&y.track&&P.tag!==null&&y.track(x.path(),x.offset,x.length,"content"),P.any||(M=P.choice===null?this._decodeGeneric(P.tag,x,y):this._decodeChoice(x,y)),x.isError(M))return M;if(P.any||P.choice!==null||P.children===null||P.children.forEach(function(U){U._decode(x,y)}),P.contains&&(P.tag==="octstr"||P.tag==="bitstr")){let U=new s(M);M=this._getUse(P.contains,x._reporterState.obj)._decode(U,y)}}return P.obj&&D&&(M=x.leaveObject(S)),P.key===null||M===null&&D!==!0?k!==null&&x.exitKey(k):x.leaveKey(k,P.key,M),M},_.prototype._decodeGeneric=function(x,y,P){let S=this._baseState;return x==="seq"||x==="set"?null:x==="seqof"||x==="setof"?this._decodeList(y,x,S.args[0],P):/str$/.test(x)?this._decodeStr(y,x,P):x==="objid"&&S.args?this._decodeObjid(y,S.args[0],S.args[1],P):x==="objid"?this._decodeObjid(y,null,null,P):x==="gentime"||x==="utctime"?this._decodeTime(y,x,P):x==="null_"?this._decodeNull(y,P):x==="bool"?this._decodeBool(y,P):x==="objDesc"?this._decodeStr(y,x,P):x==="int"||x==="enum"?this._decodeInt(y,S.args&&S.args[0],P):S.use!==null?this._getUse(S.use,y._reporterState.obj)._decode(y,P):y.error("unknown tag: "+x)},_.prototype._getUse=function(x,y){let P=this._baseState;return P.useDecoder=this._use(x,y),d(P.useDecoder._baseState.parent===null),P.useDecoder=P.useDecoder._baseState.children[0],P.implicit!==P.useDecoder._baseState.implicit&&(P.useDecoder=P.useDecoder.clone(),P.useDecoder._baseState.implicit=P.implicit),P.useDecoder},_.prototype._decodeChoice=function(x,y){let P=this._baseState,S=null,M=!1;return Object.keys(P.choice).some(function(D){let k=x.save(),z=P.choice[D];try{let U=z._decode(x,y);if(x.isError(U))return!1;S={type:D,value:U},M=!0}catch{return x.restore(k),!1}return!0},this),M?S:x.error("Choice not matched")},_.prototype._createEncoderBuffer=function(x){return new i(x,this.reporter)},_.prototype._encode=function(x,y,P){let S=this._baseState;if(S.default!==null&&S.default===x)return;let M=this._encodeValue(x,y,P);return M===void 0||this._skipDefault(M,y,P)?void 0:M},_.prototype._encodeValue=function(x,y,P){let S=this._baseState;if(S.parent===null)return S.children[0]._encode(x,y||new n);let M=null;if(this.reporter=y,S.optional&&x===void 0){if(S.default===null)return;x=S.default}let D=null,k=!1;if(S.any)M=this._createEncoderBuffer(x);else if(S.choice)M=this._encodeChoice(x,y);else if(S.contains)D=this._getUse(S.contains,P)._encode(x,y),k=!0;else if(S.children)D=S.children.map(function(z){if(z._baseState.tag==="null_")return z._encode(null,y,x);if(z._baseState.key===null)return y.error("Child should have a key");let U=y.enterKey(z._baseState.key);if(typeof x!="object")return y.error("Child expected, but input is not object");let J=z._encode(x[z._baseState.key],y,x);return y.leaveKey(U),J},this).filter(function(z){return z}),D=this._createEncoderBuffer(D);else if(S.tag==="seqof"||S.tag==="setof"){if(!S.args||S.args.length!==1)return y.error("Too many args for : "+S.tag);if(!Array.isArray(x))return y.error("seqof/setof, but data is not Array");let z=this.clone();z._baseState.implicit=null,D=this._createEncoderBuffer(x.map(function(U){let J=this._baseState;return this._getUse(J.args[0],x)._encode(U,y)},z))}else S.use!==null?M=this._getUse(S.use,P)._encode(x,y):(D=this._encodePrimitive(S.tag,x),k=!0);if(!S.any&&S.choice===null){let z=S.implicit!==null?S.implicit:S.tag,U=S.implicit===null?"universal":"context";z===null?S.use===null&&y.error("Tag could be omitted only for .use()"):S.use===null&&(M=this._encodeComposite(z,k,U,D))}return S.explicit!==null&&(M=this._encodeComposite(S.explicit,!1,"context",M)),M},_.prototype._encodeChoice=function(x,y){let P=this._baseState,S=P.choice[x.type];return S||d(!1,x.type+" not found in "+JSON.stringify(Object.keys(P.choice))),S._encode(x.value,y)},_.prototype._encodePrimitive=function(x,y){let P=this._baseState;if(/str$/.test(x))return this._encodeStr(y,x);if(x==="objid"&&P.args)return this._encodeObjid(y,P.reverseArgs[0],P.args[1]);if(x==="objid")return this._encodeObjid(y,null,null);if(x==="gentime"||x==="utctime")return this._encodeTime(y,x);if(x==="null_")return this._encodeNull();if(x==="int"||x==="enum")return this._encodeInt(y,P.args&&P.reverseArgs[0]);if(x==="bool")return this._encodeBool(y);if(x==="objDesc")return this._encodeStr(y,x);throw new Error("Unsupported tag: "+x)},_.prototype._isNumstr=function(x){return/^[0-9 ]*$/.test(x)},_.prototype._isPrintstr=function(x){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(x)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,o,t){"use strict";let n=e("inherits");function i(d){this._reporterState={obj:null,path:[],options:d||{},errors:[]}}function s(d,u){this.path=d,this.rethrow(u)}t.Reporter=i,i.prototype.isError=function(d){return d instanceof s},i.prototype.save=function(){let d=this._reporterState;return{obj:d.obj,pathLen:d.path.length}},i.prototype.restore=function(d){let u=this._reporterState;u.obj=d.obj,u.path=u.path.slice(0,d.pathLen)},i.prototype.enterKey=function(d){return this._reporterState.path.push(d)},i.prototype.exitKey=function(d){let u=this._reporterState;u.path=u.path.slice(0,d-1)},i.prototype.leaveKey=function(d,u,f){let _=this._reporterState;this.exitKey(d),_.obj!==null&&(_.obj[u]=f)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){let d=this._reporterState,u=d.obj;return d.obj={},u},i.prototype.leaveObject=function(d){let u=this._reporterState,f=u.obj;return u.obj=d,f},i.prototype.error=function(d){let u,f=this._reporterState,_=d instanceof s;if(u=_?d:new s(f.path.map(function(C){return"["+JSON.stringify(C)+"]"}).join(""),d.message||d,d.stack),!f.options.partial)throw u;return _||f.errors.push(u),u},i.prototype.wrapResult=function(d){let u=this._reporterState;return u.options.partial?{result:this.isError(d)?null:d,errors:u.errors}:d},n(s,Error),s.prototype.rethrow=function(d){if(this.message=d+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(u){this.stack=u.stack}return this}},{inherits:440}],176:[function(e,o,t){"use strict";function n(i){let s={};return Object.keys(i).forEach(function(d){(0|d)==d&&(d|=0);let u=i[d];s[u]=d}),s}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag)},{}],177:[function(e,o,t){"use strict";let n=t;n._reverse=function(i){let s={};return Object.keys(i).forEach(function(d){(0|d)==d&&(d|=0);let u=i[d];s[u]=d}),s},n.der=e("./der")},{"./der":176}],178:[function(e,o,t){"use strict";let n=e("inherits"),i=e("bn.js"),s=e("../base/buffer").DecoderBuffer,d=e("../base/node"),u=e("../constants/der");function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new _,this.tree._init(y.body)}function _(y){d.call(this,"der",y)}function C(y,P){let S=y.readUInt8(P);if(y.isError(S))return S;let M=u.tagClass[S>>6],D=(32&S)==0;if((31&S)==31){let k=S;for(S=0;(128&k)==128;){if(k=y.readUInt8(P),y.isError(k))return k;S<<=7,S|=127&k}}else S&=31;return{cls:M,primitive:D,tag:S,tagStr:u.tag[S]}}function x(y,P,S){let M=y.readUInt8(S);if(y.isError(M))return M;if(!P&&M===128)return null;if((128&M)==0)return M;let D=127&M;if(D>4)return y.error("length octect is too long");M=0;for(let k=0;k=31?J.error("Multi-octet tag encoding unsupported"):(z||(re|=32),re|=d.tagClassByName[U||"universal"]<<6,re)})(C,x,y,this.reporter);if(P.length<128){let k=i.alloc(2);return k[0]=S,k[1]=P.length,this._createEncoderBuffer([k,P])}let M=1;for(let k=P.length;k>=256;k>>=8)M++;let D=i.alloc(2+M);D[0]=S,D[1]=128|M;for(let k=1+M,z=P.length;z>0;k--,z>>=8)D[k]=255&z;return this._createEncoderBuffer([D,P])},f.prototype._encodeStr=function(C,x){if(x==="bitstr")return this._createEncoderBuffer([0|C.unused,C.data]);if(x==="bmpstr"){let y=i.alloc(2*C.length);for(let P=0;P=40)return this.reporter.error("Second objid identifier OOB");C.splice(0,2,40*C[0]+C[1])}let P=0;for(let D=0;D=128;k>>=7)P++}let S=i.alloc(P),M=S.length-1;for(let D=C.length-1;D>=0;D--){let k=C[D];for(S[M--]=127&k;(k>>=7)>0;)S[M--]=128|127&k}return this._createEncoderBuffer(S)},f.prototype._encodeTime=function(C,x){let y,P=new Date(C);return x==="gentime"?y=[_(P.getUTCFullYear()),_(P.getUTCMonth()+1),_(P.getUTCDate()),_(P.getUTCHours()),_(P.getUTCMinutes()),_(P.getUTCSeconds()),"Z"].join(""):x==="utctime"?y=[_(P.getUTCFullYear()%100),_(P.getUTCMonth()+1),_(P.getUTCDate()),_(P.getUTCHours()),_(P.getUTCMinutes()),_(P.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+x+" time is not supported yet"),this._encodeStr(y,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(C,x){if(typeof C=="string"){if(!x)return this.reporter.error("String int or enum given, but no values map");if(!x.hasOwnProperty(C))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(C));C=x[C]}if(typeof C!="number"&&!i.isBuffer(C)){let S=C.toArray();!C.sign&&128&S[0]&&S.unshift(0),C=i.from(S)}if(i.isBuffer(C)){let S=C.length;C.length===0&&S++;let M=i.alloc(S);return C.copy(M),C.length===0&&(M[0]=0),this._createEncoderBuffer(M)}if(C<128)return this._createEncoderBuffer(C);if(C<256)return this._createEncoderBuffer([0,C]);let y=1;for(let S=C;S>=256;S>>=8)y++;let P=new Array(y);for(let S=P.length-1;S>=0;S--)P[S]=255&C,C>>=8;return 128&P[0]&&P.unshift(0),this._createEncoderBuffer(i.from(P))},f.prototype._encodeBool=function(C){return this._createEncoderBuffer(C?255:0)},f.prototype._use=function(C,x){return typeof C=="function"&&(C=C(x)),C._getEncoder("der").tree},f.prototype._skipDefault=function(C,x,y){let P=this._baseState,S;if(P.default===null)return!1;let M=C.join();if(P.defaultBuffer===void 0&&(P.defaultBuffer=this._encodeValue(P.default,x,y).join()),M.length!==P.defaultBuffer.length)return!1;for(S=0;S=65&&pe<=70?pe-55:pe>=97&&pe<=102?pe-87:pe-48&15}function C(j,W,pe){var O=_(j,pe);return pe-1>=W&&(O|=_(j,pe-1)<<4),O}function x(j,W,pe,O){for(var B=0,L=Math.min(j.length,pe),N=W;N=49?G-49+10:G>=17?G-17+10:G}return B}u.isBN=function(j){return j instanceof u||j!==null&&typeof j=="object"&&j.constructor.wordSize===u.wordSize&&Array.isArray(j.words)},u.max=function(j,W){return j.cmp(W)>0?j:W},u.min=function(j,W){return j.cmp(W)<0?j:W},u.prototype._init=function(j,W,pe){if(typeof j=="number")return this._initNumber(j,W,pe);if(typeof j=="object")return this._initArray(j,W,pe);W==="hex"&&(W=16),s(W===(0|W)&&W>=2&&W<=36);var O=0;(j=j.toString().replace(/\s+/g,""))[0]==="-"&&(O++,this.negative=1),O=0;O-=3)L=j[O]|j[O-1]<<8|j[O-2]<<16,this.words[B]|=L<>>26-N&67108863,(N+=24)>=26&&(N-=26,B++);else if(pe==="le")for(O=0,B=0;O>>26-N&67108863,(N+=24)>=26&&(N-=26,B++);return this.strip()},u.prototype._parseHex=function(j,W,pe){this.length=Math.ceil((j.length-W)/6),this.words=new Array(this.length);for(var O=0;O=W;O-=2)B=C(j,W,O)<=18?(L-=18,N+=1,this.words[N]|=B>>>26):L+=8;else for(O=(j.length-W)%2==0?W+1:W;O=18?(L-=18,N+=1,this.words[N]|=B>>>26):L+=8;this.strip()},u.prototype._parseBase=function(j,W,pe){this.words=[0],this.length=1;for(var O=0,B=1;B<=67108863;B*=W)O++;O--,B=B/W|0;for(var L=j.length-pe,N=L%O,G=Math.min(L,L-N)+pe,$=0,ne=pe;ne1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],P=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function M(j,W,pe){pe.negative=W.negative^j.negative;var O=j.length+W.length|0;pe.length=O,O=O-1|0;var B=0|j.words[0],L=0|W.words[0],N=B*L,G=67108863&N,$=N/67108864|0;pe.words[0]=G;for(var ne=1;ne>>26,ye=67108863&$,Ne=Math.min(ne,W.length-1),te=Math.max(0,ne-j.length+1);te<=Ne;te++){var Ae=ne-te|0;be+=(N=(B=0|j.words[Ae])*(L=0|W.words[te])+ye)/67108864|0,ye=67108863&N}pe.words[ne]=0|ye,$=0|be}return $!==0?pe.words[ne]=0|$:pe.length--,pe.strip()}u.prototype.toString=function(j,W){var pe;if(W=0|W||1,(j=j||10)===16||j==="hex"){pe="";for(var O=0,B=0,L=0;L>>24-O&16777215)!==0||L!==this.length-1?y[6-G.length]+G+pe:G+pe,(O+=2)>=26&&(O-=26,L--)}for(B!==0&&(pe=B.toString(16)+pe);pe.length%W!=0;)pe="0"+pe;return this.negative!==0&&(pe="-"+pe),pe}if(j===(0|j)&&j>=2&&j<=36){var $=P[j],ne=S[j];pe="";var be=this.clone();for(be.negative=0;!be.isZero();){var ye=be.modn(ne).toString(j);pe=(be=be.idivn(ne)).isZero()?ye+pe:y[$-ye.length]+ye+pe}for(this.isZero()&&(pe="0"+pe);pe.length%W!=0;)pe="0"+pe;return this.negative!==0&&(pe="-"+pe),pe}s(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=67108864*this.words[1]:this.length===3&&this.words[2]===1?j+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(j,W){return s(f!==void 0),this.toArrayLike(f,j,W)},u.prototype.toArray=function(j,W){return this.toArrayLike(Array,j,W)},u.prototype.toArrayLike=function(j,W,pe){var O=this.byteLength(),B=pe||Math.max(1,O);s(O<=B,"byte array longer than desired length"),s(B>0,"Requested array length <= 0"),this.strip();var L,N,G=W==="le",$=new j(B),ne=this.clone();if(G){for(N=0;!ne.isZero();N++)L=ne.andln(255),ne.iushrn(8),$[N]=L;for(;N=4096&&(pe+=13,W>>>=13),W>=64&&(pe+=7,W>>>=7),W>=8&&(pe+=4,W>>>=4),W>=2&&(pe+=2,W>>>=2),pe+W},u.prototype._zeroBits=function(j){if(j===0)return 26;var W=j,pe=0;return(8191&W)==0&&(pe+=13,W>>>=13),(127&W)==0&&(pe+=7,W>>>=7),(15&W)==0&&(pe+=4,W>>>=4),(3&W)==0&&(pe+=2,W>>>=2),(1&W)==0&&pe++,pe},u.prototype.bitLength=function(){var j=this.words[this.length-1],W=this._countBits(j);return 26*(this.length-1)+W},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,W=0;Wj.length?this.clone().ior(j):j.clone().ior(this)},u.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},u.prototype.iuand=function(j){var W;W=this.length>j.length?j:this;for(var pe=0;pej.length?this.clone().iand(j):j.clone().iand(this)},u.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},u.prototype.iuxor=function(j){var W,pe;this.length>j.length?(W=this,pe=j):(W=j,pe=this);for(var O=0;Oj.length?this.clone().ixor(j):j.clone().ixor(this)},u.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},u.prototype.inotn=function(j){s(typeof j=="number"&&j>=0);var W=0|Math.ceil(j/26),pe=j%26;this._expand(W),pe>0&&W--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-pe),this.strip()},u.prototype.notn=function(j){return this.clone().inotn(j)},u.prototype.setn=function(j,W){s(typeof j=="number"&&j>=0);var pe=j/26|0,O=j%26;return this._expand(pe+1),this.words[pe]=W?this.words[pe]|1<j.length?(pe=this,O=j):(pe=j,O=this);for(var B=0,L=0;L>>26;for(;B!==0&&L>>26;if(this.length=pe.length,B!==0)this.words[this.length]=B,this.length++;else if(pe!==this)for(;Lj.length?this.clone().iadd(j):j.clone().iadd(this)},u.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var W=this.iadd(j);return j.negative=1,W._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var pe,O,B=this.cmp(j);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;B>0?(pe=this,O=j):(pe=j,O=this);for(var L=0,N=0;N>26,this.words[N]=67108863&W;for(;L!==0&&N>26,this.words[N]=67108863&W;if(L===0&&N>>13,te=0|N[1],Ae=8191&te,K=te>>>13,Q=0|N[2],Ce=8191&Q,Ve=Q>>>13,mt=0|N[3],Ye=8191&mt,rt=mt>>>13,Qt=0|N[4],zt=8191&Qt,Qe=Qt>>>13,Vt=0|N[5],Bt=8191&Vt,Ut=Vt>>>13,Jt=0|N[6],ei=8191&Jt,ni=Jt>>>13,Ei=0|N[7],Ai=8191&Ei,Ni=Ei>>>13,cn=0|N[8],ji=8191&cn,Ki=cn>>>13,Xn=0|N[9],fn=8191&Xn,Xi=Xn>>>13,hn=0|G[0],zi=8191&hn,Li=hn>>>13,Yn=0|G[1],sn=8191&Yn,bn=Yn>>>13,El=0|G[2],xn=8191&El,wn=El>>>13,Oa=0|G[3],zn=8191&Oa,Hn=Oa>>>13,Zr=0|G[4],En=8191&Zr,Pn=Zr>>>13,cr=0|G[5],Vn=8191&cr,Tn=cr>>>13,el=0|G[6],Gn=8191&el,Rt=el>>>13,ui=0|G[7],_i=8191&ui,Fi=ui>>>13,yo=0|G[8],Yi=8191&yo,ln=yo>>>13,qo=0|G[9],yn=8191&qo,nn=qo>>>13;pe.negative=j.negative^W.negative,pe.length=19;var Ro=(ne+(O=Math.imul(ye,zi))|0)+((8191&(B=(B=Math.imul(ye,Li))+Math.imul(Ne,zi)|0))<<13)|0;ne=((L=Math.imul(Ne,Li))+(B>>>13)|0)+(Ro>>>26)|0,Ro&=67108863,O=Math.imul(Ae,zi),B=(B=Math.imul(Ae,Li))+Math.imul(K,zi)|0,L=Math.imul(K,Li);var ro=(ne+(O=O+Math.imul(ye,sn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,bn)|0)+Math.imul(Ne,sn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,bn)|0)+(B>>>13)|0)+(ro>>>26)|0,ro&=67108863,O=Math.imul(Ce,zi),B=(B=Math.imul(Ce,Li))+Math.imul(Ve,zi)|0,L=Math.imul(Ve,Li),O=O+Math.imul(Ae,sn)|0,B=(B=B+Math.imul(Ae,bn)|0)+Math.imul(K,sn)|0,L=L+Math.imul(K,bn)|0;var lo=(ne+(O=O+Math.imul(ye,xn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,wn)|0)+Math.imul(Ne,xn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,wn)|0)+(B>>>13)|0)+(lo>>>26)|0,lo&=67108863,O=Math.imul(Ye,zi),B=(B=Math.imul(Ye,Li))+Math.imul(rt,zi)|0,L=Math.imul(rt,Li),O=O+Math.imul(Ce,sn)|0,B=(B=B+Math.imul(Ce,bn)|0)+Math.imul(Ve,sn)|0,L=L+Math.imul(Ve,bn)|0,O=O+Math.imul(Ae,xn)|0,B=(B=B+Math.imul(Ae,wn)|0)+Math.imul(K,xn)|0,L=L+Math.imul(K,wn)|0;var Go=(ne+(O=O+Math.imul(ye,zn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Hn)|0)+Math.imul(Ne,zn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,Hn)|0)+(B>>>13)|0)+(Go>>>26)|0,Go&=67108863,O=Math.imul(zt,zi),B=(B=Math.imul(zt,Li))+Math.imul(Qe,zi)|0,L=Math.imul(Qe,Li),O=O+Math.imul(Ye,sn)|0,B=(B=B+Math.imul(Ye,bn)|0)+Math.imul(rt,sn)|0,L=L+Math.imul(rt,bn)|0,O=O+Math.imul(Ce,xn)|0,B=(B=B+Math.imul(Ce,wn)|0)+Math.imul(Ve,xn)|0,L=L+Math.imul(Ve,wn)|0,O=O+Math.imul(Ae,zn)|0,B=(B=B+Math.imul(Ae,Hn)|0)+Math.imul(K,zn)|0,L=L+Math.imul(K,Hn)|0;var Pa=(ne+(O=O+Math.imul(ye,En)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Pn)|0)+Math.imul(Ne,En)|0))<<13)|0;ne=((L=L+Math.imul(Ne,Pn)|0)+(B>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,O=Math.imul(Bt,zi),B=(B=Math.imul(Bt,Li))+Math.imul(Ut,zi)|0,L=Math.imul(Ut,Li),O=O+Math.imul(zt,sn)|0,B=(B=B+Math.imul(zt,bn)|0)+Math.imul(Qe,sn)|0,L=L+Math.imul(Qe,bn)|0,O=O+Math.imul(Ye,xn)|0,B=(B=B+Math.imul(Ye,wn)|0)+Math.imul(rt,xn)|0,L=L+Math.imul(rt,wn)|0,O=O+Math.imul(Ce,zn)|0,B=(B=B+Math.imul(Ce,Hn)|0)+Math.imul(Ve,zn)|0,L=L+Math.imul(Ve,Hn)|0,O=O+Math.imul(Ae,En)|0,B=(B=B+Math.imul(Ae,Pn)|0)+Math.imul(K,En)|0,L=L+Math.imul(K,Pn)|0;var Qa=(ne+(O=O+Math.imul(ye,Vn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Tn)|0)+Math.imul(Ne,Vn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,Tn)|0)+(B>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,O=Math.imul(ei,zi),B=(B=Math.imul(ei,Li))+Math.imul(ni,zi)|0,L=Math.imul(ni,Li),O=O+Math.imul(Bt,sn)|0,B=(B=B+Math.imul(Bt,bn)|0)+Math.imul(Ut,sn)|0,L=L+Math.imul(Ut,bn)|0,O=O+Math.imul(zt,xn)|0,B=(B=B+Math.imul(zt,wn)|0)+Math.imul(Qe,xn)|0,L=L+Math.imul(Qe,wn)|0,O=O+Math.imul(Ye,zn)|0,B=(B=B+Math.imul(Ye,Hn)|0)+Math.imul(rt,zn)|0,L=L+Math.imul(rt,Hn)|0,O=O+Math.imul(Ce,En)|0,B=(B=B+Math.imul(Ce,Pn)|0)+Math.imul(Ve,En)|0,L=L+Math.imul(Ve,Pn)|0,O=O+Math.imul(Ae,Vn)|0,B=(B=B+Math.imul(Ae,Tn)|0)+Math.imul(K,Vn)|0,L=L+Math.imul(K,Tn)|0;var pr=(ne+(O=O+Math.imul(ye,Gn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Rt)|0)+Math.imul(Ne,Gn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,Rt)|0)+(B>>>13)|0)+(pr>>>26)|0,pr&=67108863,O=Math.imul(Ai,zi),B=(B=Math.imul(Ai,Li))+Math.imul(Ni,zi)|0,L=Math.imul(Ni,Li),O=O+Math.imul(ei,sn)|0,B=(B=B+Math.imul(ei,bn)|0)+Math.imul(ni,sn)|0,L=L+Math.imul(ni,bn)|0,O=O+Math.imul(Bt,xn)|0,B=(B=B+Math.imul(Bt,wn)|0)+Math.imul(Ut,xn)|0,L=L+Math.imul(Ut,wn)|0,O=O+Math.imul(zt,zn)|0,B=(B=B+Math.imul(zt,Hn)|0)+Math.imul(Qe,zn)|0,L=L+Math.imul(Qe,Hn)|0,O=O+Math.imul(Ye,En)|0,B=(B=B+Math.imul(Ye,Pn)|0)+Math.imul(rt,En)|0,L=L+Math.imul(rt,Pn)|0,O=O+Math.imul(Ce,Vn)|0,B=(B=B+Math.imul(Ce,Tn)|0)+Math.imul(Ve,Vn)|0,L=L+Math.imul(Ve,Tn)|0,O=O+Math.imul(Ae,Gn)|0,B=(B=B+Math.imul(Ae,Rt)|0)+Math.imul(K,Gn)|0,L=L+Math.imul(K,Rt)|0;var Ga=(ne+(O=O+Math.imul(ye,_i)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Fi)|0)+Math.imul(Ne,_i)|0))<<13)|0;ne=((L=L+Math.imul(Ne,Fi)|0)+(B>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,O=Math.imul(ji,zi),B=(B=Math.imul(ji,Li))+Math.imul(Ki,zi)|0,L=Math.imul(Ki,Li),O=O+Math.imul(Ai,sn)|0,B=(B=B+Math.imul(Ai,bn)|0)+Math.imul(Ni,sn)|0,L=L+Math.imul(Ni,bn)|0,O=O+Math.imul(ei,xn)|0,B=(B=B+Math.imul(ei,wn)|0)+Math.imul(ni,xn)|0,L=L+Math.imul(ni,wn)|0,O=O+Math.imul(Bt,zn)|0,B=(B=B+Math.imul(Bt,Hn)|0)+Math.imul(Ut,zn)|0,L=L+Math.imul(Ut,Hn)|0,O=O+Math.imul(zt,En)|0,B=(B=B+Math.imul(zt,Pn)|0)+Math.imul(Qe,En)|0,L=L+Math.imul(Qe,Pn)|0,O=O+Math.imul(Ye,Vn)|0,B=(B=B+Math.imul(Ye,Tn)|0)+Math.imul(rt,Vn)|0,L=L+Math.imul(rt,Tn)|0,O=O+Math.imul(Ce,Gn)|0,B=(B=B+Math.imul(Ce,Rt)|0)+Math.imul(Ve,Gn)|0,L=L+Math.imul(Ve,Rt)|0,O=O+Math.imul(Ae,_i)|0,B=(B=B+Math.imul(Ae,Fi)|0)+Math.imul(K,_i)|0,L=L+Math.imul(K,Fi)|0;var Ya=(ne+(O=O+Math.imul(ye,Yi)|0)|0)+((8191&(B=(B=B+Math.imul(ye,ln)|0)+Math.imul(Ne,Yi)|0))<<13)|0;ne=((L=L+Math.imul(Ne,ln)|0)+(B>>>13)|0)+(Ya>>>26)|0,Ya&=67108863,O=Math.imul(fn,zi),B=(B=Math.imul(fn,Li))+Math.imul(Xi,zi)|0,L=Math.imul(Xi,Li),O=O+Math.imul(ji,sn)|0,B=(B=B+Math.imul(ji,bn)|0)+Math.imul(Ki,sn)|0,L=L+Math.imul(Ki,bn)|0,O=O+Math.imul(Ai,xn)|0,B=(B=B+Math.imul(Ai,wn)|0)+Math.imul(Ni,xn)|0,L=L+Math.imul(Ni,wn)|0,O=O+Math.imul(ei,zn)|0,B=(B=B+Math.imul(ei,Hn)|0)+Math.imul(ni,zn)|0,L=L+Math.imul(ni,Hn)|0,O=O+Math.imul(Bt,En)|0,B=(B=B+Math.imul(Bt,Pn)|0)+Math.imul(Ut,En)|0,L=L+Math.imul(Ut,Pn)|0,O=O+Math.imul(zt,Vn)|0,B=(B=B+Math.imul(zt,Tn)|0)+Math.imul(Qe,Vn)|0,L=L+Math.imul(Qe,Tn)|0,O=O+Math.imul(Ye,Gn)|0,B=(B=B+Math.imul(Ye,Rt)|0)+Math.imul(rt,Gn)|0,L=L+Math.imul(rt,Rt)|0,O=O+Math.imul(Ce,_i)|0,B=(B=B+Math.imul(Ce,Fi)|0)+Math.imul(Ve,_i)|0,L=L+Math.imul(Ve,Fi)|0,O=O+Math.imul(Ae,Yi)|0,B=(B=B+Math.imul(Ae,ln)|0)+Math.imul(K,Yi)|0,L=L+Math.imul(K,ln)|0;var ht=(ne+(O=O+Math.imul(ye,yn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,nn)|0)+Math.imul(Ne,yn)|0))<<13)|0;ne=((L=L+Math.imul(Ne,nn)|0)+(B>>>13)|0)+(ht>>>26)|0,ht&=67108863,O=Math.imul(fn,sn),B=(B=Math.imul(fn,bn))+Math.imul(Xi,sn)|0,L=Math.imul(Xi,bn),O=O+Math.imul(ji,xn)|0,B=(B=B+Math.imul(ji,wn)|0)+Math.imul(Ki,xn)|0,L=L+Math.imul(Ki,wn)|0,O=O+Math.imul(Ai,zn)|0,B=(B=B+Math.imul(Ai,Hn)|0)+Math.imul(Ni,zn)|0,L=L+Math.imul(Ni,Hn)|0,O=O+Math.imul(ei,En)|0,B=(B=B+Math.imul(ei,Pn)|0)+Math.imul(ni,En)|0,L=L+Math.imul(ni,Pn)|0,O=O+Math.imul(Bt,Vn)|0,B=(B=B+Math.imul(Bt,Tn)|0)+Math.imul(Ut,Vn)|0,L=L+Math.imul(Ut,Tn)|0,O=O+Math.imul(zt,Gn)|0,B=(B=B+Math.imul(zt,Rt)|0)+Math.imul(Qe,Gn)|0,L=L+Math.imul(Qe,Rt)|0,O=O+Math.imul(Ye,_i)|0,B=(B=B+Math.imul(Ye,Fi)|0)+Math.imul(rt,_i)|0,L=L+Math.imul(rt,Fi)|0,O=O+Math.imul(Ce,Yi)|0,B=(B=B+Math.imul(Ce,ln)|0)+Math.imul(Ve,Yi)|0,L=L+Math.imul(Ve,ln)|0;var oi=(ne+(O=O+Math.imul(Ae,yn)|0)|0)+((8191&(B=(B=B+Math.imul(Ae,nn)|0)+Math.imul(K,yn)|0))<<13)|0;ne=((L=L+Math.imul(K,nn)|0)+(B>>>13)|0)+(oi>>>26)|0,oi&=67108863,O=Math.imul(fn,xn),B=(B=Math.imul(fn,wn))+Math.imul(Xi,xn)|0,L=Math.imul(Xi,wn),O=O+Math.imul(ji,zn)|0,B=(B=B+Math.imul(ji,Hn)|0)+Math.imul(Ki,zn)|0,L=L+Math.imul(Ki,Hn)|0,O=O+Math.imul(Ai,En)|0,B=(B=B+Math.imul(Ai,Pn)|0)+Math.imul(Ni,En)|0,L=L+Math.imul(Ni,Pn)|0,O=O+Math.imul(ei,Vn)|0,B=(B=B+Math.imul(ei,Tn)|0)+Math.imul(ni,Vn)|0,L=L+Math.imul(ni,Tn)|0,O=O+Math.imul(Bt,Gn)|0,B=(B=B+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Gn)|0,L=L+Math.imul(Ut,Rt)|0,O=O+Math.imul(zt,_i)|0,B=(B=B+Math.imul(zt,Fi)|0)+Math.imul(Qe,_i)|0,L=L+Math.imul(Qe,Fi)|0,O=O+Math.imul(Ye,Yi)|0,B=(B=B+Math.imul(Ye,ln)|0)+Math.imul(rt,Yi)|0,L=L+Math.imul(rt,ln)|0;var Mi=(ne+(O=O+Math.imul(Ce,yn)|0)|0)+((8191&(B=(B=B+Math.imul(Ce,nn)|0)+Math.imul(Ve,yn)|0))<<13)|0;ne=((L=L+Math.imul(Ve,nn)|0)+(B>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,O=Math.imul(fn,zn),B=(B=Math.imul(fn,Hn))+Math.imul(Xi,zn)|0,L=Math.imul(Xi,Hn),O=O+Math.imul(ji,En)|0,B=(B=B+Math.imul(ji,Pn)|0)+Math.imul(Ki,En)|0,L=L+Math.imul(Ki,Pn)|0,O=O+Math.imul(Ai,Vn)|0,B=(B=B+Math.imul(Ai,Tn)|0)+Math.imul(Ni,Vn)|0,L=L+Math.imul(Ni,Tn)|0,O=O+Math.imul(ei,Gn)|0,B=(B=B+Math.imul(ei,Rt)|0)+Math.imul(ni,Gn)|0,L=L+Math.imul(ni,Rt)|0,O=O+Math.imul(Bt,_i)|0,B=(B=B+Math.imul(Bt,Fi)|0)+Math.imul(Ut,_i)|0,L=L+Math.imul(Ut,Fi)|0,O=O+Math.imul(zt,Yi)|0,B=(B=B+Math.imul(zt,ln)|0)+Math.imul(Qe,Yi)|0,L=L+Math.imul(Qe,ln)|0;var xi=(ne+(O=O+Math.imul(Ye,yn)|0)|0)+((8191&(B=(B=B+Math.imul(Ye,nn)|0)+Math.imul(rt,yn)|0))<<13)|0;ne=((L=L+Math.imul(rt,nn)|0)+(B>>>13)|0)+(xi>>>26)|0,xi&=67108863,O=Math.imul(fn,En),B=(B=Math.imul(fn,Pn))+Math.imul(Xi,En)|0,L=Math.imul(Xi,Pn),O=O+Math.imul(ji,Vn)|0,B=(B=B+Math.imul(ji,Tn)|0)+Math.imul(Ki,Vn)|0,L=L+Math.imul(Ki,Tn)|0,O=O+Math.imul(Ai,Gn)|0,B=(B=B+Math.imul(Ai,Rt)|0)+Math.imul(Ni,Gn)|0,L=L+Math.imul(Ni,Rt)|0,O=O+Math.imul(ei,_i)|0,B=(B=B+Math.imul(ei,Fi)|0)+Math.imul(ni,_i)|0,L=L+Math.imul(ni,Fi)|0,O=O+Math.imul(Bt,Yi)|0,B=(B=B+Math.imul(Bt,ln)|0)+Math.imul(Ut,Yi)|0,L=L+Math.imul(Ut,ln)|0;var Vi=(ne+(O=O+Math.imul(zt,yn)|0)|0)+((8191&(B=(B=B+Math.imul(zt,nn)|0)+Math.imul(Qe,yn)|0))<<13)|0;ne=((L=L+Math.imul(Qe,nn)|0)+(B>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,O=Math.imul(fn,Vn),B=(B=Math.imul(fn,Tn))+Math.imul(Xi,Vn)|0,L=Math.imul(Xi,Tn),O=O+Math.imul(ji,Gn)|0,B=(B=B+Math.imul(ji,Rt)|0)+Math.imul(Ki,Gn)|0,L=L+Math.imul(Ki,Rt)|0,O=O+Math.imul(Ai,_i)|0,B=(B=B+Math.imul(Ai,Fi)|0)+Math.imul(Ni,_i)|0,L=L+Math.imul(Ni,Fi)|0,O=O+Math.imul(ei,Yi)|0,B=(B=B+Math.imul(ei,ln)|0)+Math.imul(ni,Yi)|0,L=L+Math.imul(ni,ln)|0;var pn=(ne+(O=O+Math.imul(Bt,yn)|0)|0)+((8191&(B=(B=B+Math.imul(Bt,nn)|0)+Math.imul(Ut,yn)|0))<<13)|0;ne=((L=L+Math.imul(Ut,nn)|0)+(B>>>13)|0)+(pn>>>26)|0,pn&=67108863,O=Math.imul(fn,Gn),B=(B=Math.imul(fn,Rt))+Math.imul(Xi,Gn)|0,L=Math.imul(Xi,Rt),O=O+Math.imul(ji,_i)|0,B=(B=B+Math.imul(ji,Fi)|0)+Math.imul(Ki,_i)|0,L=L+Math.imul(Ki,Fi)|0,O=O+Math.imul(Ai,Yi)|0,B=(B=B+Math.imul(Ai,ln)|0)+Math.imul(Ni,Yi)|0,L=L+Math.imul(Ni,ln)|0;var dn=(ne+(O=O+Math.imul(ei,yn)|0)|0)+((8191&(B=(B=B+Math.imul(ei,nn)|0)+Math.imul(ni,yn)|0))<<13)|0;ne=((L=L+Math.imul(ni,nn)|0)+(B>>>13)|0)+(dn>>>26)|0,dn&=67108863,O=Math.imul(fn,_i),B=(B=Math.imul(fn,Fi))+Math.imul(Xi,_i)|0,L=Math.imul(Xi,Fi),O=O+Math.imul(ji,Yi)|0,B=(B=B+Math.imul(ji,ln)|0)+Math.imul(Ki,Yi)|0,L=L+Math.imul(Ki,ln)|0;var mo=(ne+(O=O+Math.imul(Ai,yn)|0)|0)+((8191&(B=(B=B+Math.imul(Ai,nn)|0)+Math.imul(Ni,yn)|0))<<13)|0;ne=((L=L+Math.imul(Ni,nn)|0)+(B>>>13)|0)+(mo>>>26)|0,mo&=67108863,O=Math.imul(fn,Yi),B=(B=Math.imul(fn,ln))+Math.imul(Xi,Yi)|0,L=Math.imul(Xi,ln);var jn=(ne+(O=O+Math.imul(ji,yn)|0)|0)+((8191&(B=(B=B+Math.imul(ji,nn)|0)+Math.imul(Ki,yn)|0))<<13)|0;ne=((L=L+Math.imul(Ki,nn)|0)+(B>>>13)|0)+(jn>>>26)|0,jn&=67108863;var An=(ne+(O=Math.imul(fn,yn))|0)+((8191&(B=(B=Math.imul(fn,nn))+Math.imul(Xi,yn)|0))<<13)|0;return ne=((L=Math.imul(Xi,nn))+(B>>>13)|0)+(An>>>26)|0,An&=67108863,$[0]=Ro,$[1]=ro,$[2]=lo,$[3]=Go,$[4]=Pa,$[5]=Qa,$[6]=pr,$[7]=Ga,$[8]=Ya,$[9]=ht,$[10]=oi,$[11]=Mi,$[12]=xi,$[13]=Vi,$[14]=pn,$[15]=dn,$[16]=mo,$[17]=jn,$[18]=An,ne!==0&&($[19]=ne,pe.length++),pe};function k(j,W,pe){return new z().mulp(j,W,pe)}function z(j,W){this.x=j,this.y=W}Math.imul||(D=M),u.prototype.mulTo=function(j,W){var pe=this.length+j.length;return this.length===10&&j.length===10?D(this,j,W):pe<63?M(this,j,W):pe<1024?(function(O,B,L){L.negative=B.negative^O.negative,L.length=O.length+B.length;for(var N=0,G=0,$=0;$>>26)|0)>>>26,ne&=67108863}L.words[$]=be,N=ne,ne=G}return N!==0?L.words[$]=N:L.length--,L.strip()})(this,j,W):k(this,j,W)},z.prototype.makeRBT=function(j){for(var W=new Array(j),pe=u.prototype._countBits(j)-1,O=0;O>=1;return O},z.prototype.permute=function(j,W,pe,O,B,L){for(var N=0;N>>=1)B++;return 1<>>=13,pe[2*L+1]=8191&B,B>>>=13;for(L=2*W;L>=26,W+=O/67108864|0,W+=B>>>26,this.words[pe]=67108863&B}return W!==0&&(this.words[pe]=W,this.length++),this},u.prototype.muln=function(j){return this.clone().imuln(j)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(j){var W=(function(L){for(var N=new Array(L.bitLength()),G=0;G>>ne}return N})(j);if(W.length===0)return new u(1);for(var pe=this,O=0;O=0);var W,pe=j%26,O=(j-pe)/26,B=67108863>>>26-pe<<26-pe;if(pe!==0){var L=0;for(W=0;W>>26-pe}L&&(this.words[W]=L,this.length++)}if(O!==0){for(W=this.length-1;W>=0;W--)this.words[W+O]=this.words[W];for(W=0;W=0),O=W?(W-W%26)/26:0;var B=j%26,L=Math.min((j-B)/26,this.length),N=67108863^67108863>>>B<L)for(this.length-=L,$=0;$=0&&(ne!==0||$>=O);$--){var be=0|this.words[$];this.words[$]=ne<<26-B|be>>>B,ne=be&N}return G&&ne!==0&&(G.words[G.length++]=ne),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(j,W,pe){return s(this.negative===0),this.iushrn(j,W,pe)},u.prototype.shln=function(j){return this.clone().ishln(j)},u.prototype.ushln=function(j){return this.clone().iushln(j)},u.prototype.shrn=function(j){return this.clone().ishrn(j)},u.prototype.ushrn=function(j){return this.clone().iushrn(j)},u.prototype.testn=function(j){s(typeof j=="number"&&j>=0);var W=j%26,pe=(j-W)/26,O=1<=0);var W=j%26,pe=(j-W)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=pe)return this;if(W!==0&&pe++,this.length=Math.min(pe,this.length),W!==0){var O=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},u.prototype.isubn=function(j){if(s(typeof j=="number"),s(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W>26)-(G/67108864|0),this.words[O+pe]=67108863&B}for(;O>26,this.words[O+pe]=67108863&B;if(N===0)return this.strip();for(s(N===-1),N=0,O=0;O>26,this.words[O]=67108863&B;return this.negative=1,this.strip()},u.prototype._wordDiv=function(j,W){var pe=(this.length,j.length),O=this.clone(),B=j,L=0|B.words[B.length-1];(pe=26-this._countBits(L))!==0&&(B=B.ushln(pe),O.iushln(pe),L=0|B.words[B.length-1]);var N,G=O.length-B.length;if(W!=="mod"){(N=new u(null)).length=G+1,N.words=new Array(N.length);for(var $=0;$=0;be--){var ye=67108864*(0|O.words[B.length+be])+(0|O.words[B.length+be-1]);for(ye=Math.min(ye/L|0,67108863),O._ishlnsubmul(B,ye,be);O.negative!==0;)ye--,O.negative=0,O._ishlnsubmul(B,1,be),O.isZero()||(O.negative^=1);N&&(N.words[be]=ye)}return N&&N.strip(),O.strip(),W!=="div"&&pe!==0&&O.iushrn(pe),{div:N||null,mod:O}},u.prototype.divmod=function(j,W,pe){return s(!j.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:this.negative!==0&&j.negative===0?(L=this.neg().divmod(j,W),W!=="mod"&&(O=L.div.neg()),W!=="div"&&(B=L.mod.neg(),pe&&B.negative!==0&&B.iadd(j)),{div:O,mod:B}):this.negative===0&&j.negative!==0?(L=this.divmod(j.neg(),W),W!=="mod"&&(O=L.div.neg()),{div:O,mod:L.mod}):(this.negative&j.negative)!=0?(L=this.neg().divmod(j.neg(),W),W!=="div"&&(B=L.mod.neg(),pe&&B.negative!==0&&B.isub(j)),{div:L.div,mod:B}):j.length>this.length||this.cmp(j)<0?{div:new u(0),mod:this}:j.length===1?W==="div"?{div:this.divn(j.words[0]),mod:null}:W==="mod"?{div:null,mod:new u(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new u(this.modn(j.words[0]))}:this._wordDiv(j,W);var O,B,L},u.prototype.div=function(j){return this.divmod(j,"div",!1).div},u.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},u.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},u.prototype.divRound=function(j){var W=this.divmod(j);if(W.mod.isZero())return W.div;var pe=W.div.negative!==0?W.mod.isub(j):W.mod,O=j.ushrn(1),B=j.andln(1),L=pe.cmp(O);return L<0||B===1&&L===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},u.prototype.modn=function(j){s(j<=67108863);for(var W=(1<<26)%j,pe=0,O=this.length-1;O>=0;O--)pe=(W*pe+(0|this.words[O]))%j;return pe},u.prototype.idivn=function(j){s(j<=67108863);for(var W=0,pe=this.length-1;pe>=0;pe--){var O=(0|this.words[pe])+67108864*W;this.words[pe]=O/j|0,W=O%j}return this.strip()},u.prototype.divn=function(j){return this.clone().idivn(j)},u.prototype.egcd=function(j){s(j.negative===0),s(!j.isZero());var W=this,pe=j.clone();W=W.negative!==0?W.umod(j):W.clone();for(var O=new u(1),B=new u(0),L=new u(0),N=new u(1),G=0;W.isEven()&&pe.isEven();)W.iushrn(1),pe.iushrn(1),++G;for(var $=pe.clone(),ne=W.clone();!W.isZero();){for(var be=0,ye=1;(W.words[0]&ye)==0&&be<26;++be,ye<<=1);if(be>0)for(W.iushrn(be);be-- >0;)(O.isOdd()||B.isOdd())&&(O.iadd($),B.isub(ne)),O.iushrn(1),B.iushrn(1);for(var Ne=0,te=1;(pe.words[0]&te)==0&&Ne<26;++Ne,te<<=1);if(Ne>0)for(pe.iushrn(Ne);Ne-- >0;)(L.isOdd()||N.isOdd())&&(L.iadd($),N.isub(ne)),L.iushrn(1),N.iushrn(1);W.cmp(pe)>=0?(W.isub(pe),O.isub(L),B.isub(N)):(pe.isub(W),L.isub(O),N.isub(B))}return{a:L,b:N,gcd:pe.iushln(G)}},u.prototype._invmp=function(j){s(j.negative===0),s(!j.isZero());var W=this,pe=j.clone();W=W.negative!==0?W.umod(j):W.clone();for(var O,B=new u(1),L=new u(0),N=pe.clone();W.cmpn(1)>0&&pe.cmpn(1)>0;){for(var G=0,$=1;(W.words[0]&$)==0&&G<26;++G,$<<=1);if(G>0)for(W.iushrn(G);G-- >0;)B.isOdd()&&B.iadd(N),B.iushrn(1);for(var ne=0,be=1;(pe.words[0]&be)==0&&ne<26;++ne,be<<=1);if(ne>0)for(pe.iushrn(ne);ne-- >0;)L.isOdd()&&L.iadd(N),L.iushrn(1);W.cmp(pe)>=0?(W.isub(pe),B.isub(L)):(pe.isub(W),L.isub(B))}return(O=W.cmpn(1)===0?B:L).cmpn(0)<0&&O.iadd(j),O},u.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var W=this.clone(),pe=j.clone();W.negative=0,pe.negative=0;for(var O=0;W.isEven()&&pe.isEven();O++)W.iushrn(1),pe.iushrn(1);for(;;){for(;W.isEven();)W.iushrn(1);for(;pe.isEven();)pe.iushrn(1);var B=W.cmp(pe);if(B<0){var L=W;W=pe,pe=L}else if(B===0||pe.cmpn(1)===0)break;W.isub(pe)}return pe.iushln(O)},u.prototype.invm=function(j){return this.egcd(j).a.umod(j)},u.prototype.isEven=function(){return(1&this.words[0])==0},u.prototype.isOdd=function(){return(1&this.words[0])==1},u.prototype.andln=function(j){return this.words[0]&j},u.prototype.bincn=function(j){s(typeof j=="number");var W=j%26,pe=(j-W)/26,O=1<>>26,N&=67108863,this.words[L]=N}return B!==0&&(this.words[L]=B,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(j){var W,pe=j<0;if(this.negative!==0&&!pe)return-1;if(this.negative===0&&pe)return 1;if(this.strip(),this.length>1)W=1;else{pe&&(j=-j),s(j<=67108863,"Number is too big");var O=0|this.words[0];W=O===j?0:Oj.length)return 1;if(this.length=0;pe--){var O=0|this.words[pe],B=0|j.words[pe];if(O!==B){OB&&(W=1);break}}return W},u.prototype.gtn=function(j){return this.cmpn(j)===1},u.prototype.gt=function(j){return this.cmp(j)===1},u.prototype.gten=function(j){return this.cmpn(j)>=0},u.prototype.gte=function(j){return this.cmp(j)>=0},u.prototype.ltn=function(j){return this.cmpn(j)===-1},u.prototype.lt=function(j){return this.cmp(j)===-1},u.prototype.lten=function(j){return this.cmpn(j)<=0},u.prototype.lte=function(j){return this.cmp(j)<=0},u.prototype.eqn=function(j){return this.cmpn(j)===0},u.prototype.eq=function(j){return this.cmp(j)===0},u.red=function(j){return new _e(j)},u.prototype.toRed=function(j){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},u.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(j){return this.red=j,this},u.prototype.forceRed=function(j){return s(!this.red,"Already a number in reduction context"),this._forceRed(j)},u.prototype.redAdd=function(j){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},u.prototype.redIAdd=function(j){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},u.prototype.redSub=function(j){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},u.prototype.redISub=function(j){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},u.prototype.redShl=function(j){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},u.prototype.redMul=function(j){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},u.prototype.redIMul=function(j){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},u.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(j){return s(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var U={k256:null,p224:null,p192:null,p25519:null};function J(j,W){this.name=j,this.p=new u(W,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function re(){J.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function ee(){J.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function ae(){J.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function se(){J.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _e(j){if(typeof j=="string"){var W=u._prime(j);this.m=W.p,this.prime=W}else s(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}function de(j){_e.call(this,j),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}J.prototype._tmp=function(){var j=new u(null);return j.words=new Array(Math.ceil(this.n/13)),j},J.prototype.ireduce=function(j){var W,pe=j;do this.split(pe,this.tmp),W=(pe=(pe=this.imulK(pe)).iadd(this.tmp)).bitLength();while(W>this.n);var O=W0?pe.isub(this.p):pe.strip!==void 0?pe.strip():pe._strip(),pe},J.prototype.split=function(j,W){j.iushrn(this.n,0,W)},J.prototype.imulK=function(j){return j.imul(this.k)},d(re,J),re.prototype.split=function(j,W){for(var pe=Math.min(j.length,9),O=0;O>>22,B=L}B>>>=22,j.words[O-10]=B,B===0&&j.length>10?j.length-=10:j.length-=9},re.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var W=0,pe=0;pe>>=26,j.words[pe]=B,W=O}return W!==0&&(j.words[j.length++]=W),j},u._prime=function(j){if(U[j])return U[j];var W;if(j==="k256")W=new re;else if(j==="p224")W=new ee;else if(j==="p192")W=new ae;else{if(j!=="p25519")throw new Error("Unknown prime "+j);W=new se}return U[j]=W,W},_e.prototype._verify1=function(j){s(j.negative===0,"red works only with positives"),s(j.red,"red works only with red numbers")},_e.prototype._verify2=function(j,W){s((j.negative|W.negative)==0,"red works only with positives"),s(j.red&&j.red===W.red,"red works only with red numbers")},_e.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},_e.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},_e.prototype.add=function(j,W){this._verify2(j,W);var pe=j.add(W);return pe.cmp(this.m)>=0&&pe.isub(this.m),pe._forceRed(this)},_e.prototype.iadd=function(j,W){this._verify2(j,W);var pe=j.iadd(W);return pe.cmp(this.m)>=0&&pe.isub(this.m),pe},_e.prototype.sub=function(j,W){this._verify2(j,W);var pe=j.sub(W);return pe.cmpn(0)<0&&pe.iadd(this.m),pe._forceRed(this)},_e.prototype.isub=function(j,W){this._verify2(j,W);var pe=j.isub(W);return pe.cmpn(0)<0&&pe.iadd(this.m),pe},_e.prototype.shl=function(j,W){return this._verify1(j),this.imod(j.ushln(W))},_e.prototype.imul=function(j,W){return this._verify2(j,W),this.imod(j.imul(W))},_e.prototype.mul=function(j,W){return this._verify2(j,W),this.imod(j.mul(W))},_e.prototype.isqr=function(j){return this.imul(j,j.clone())},_e.prototype.sqr=function(j){return this.mul(j,j)},_e.prototype.sqrt=function(j){if(j.isZero())return j.clone();var W=this.m.andln(3);if(s(W%2==1),W===3){var pe=this.m.add(new u(1)).iushrn(2);return this.pow(j,pe)}for(var O=this.m.subn(1),B=0;!O.isZero()&&O.andln(1)===0;)B++,O.iushrn(1);s(!O.isZero());var L=new u(1).toRed(this),N=L.redNeg(),G=this.m.subn(1).iushrn(1),$=this.m.bitLength();for($=new u(2*$*$).toRed(this);this.pow($,G).cmp(N)!==0;)$.redIAdd(N);for(var ne=this.pow($,O),be=this.pow(j,O.addn(1).iushrn(1)),ye=this.pow(j,O),Ne=B;ye.cmp(L)!==0;){for(var te=ye,Ae=0;te.cmp(L)!==0;Ae++)te=te.redSqr();s(Ae=0;O--){for(var $=W.words[O],ne=G-1;ne>=0;ne--){var be=$>>ne&1;B!==pe[0]&&(B=this.sqr(B)),be!==0||L!==0?(L<<=1,L|=be,(++N===4||O===0&&ne===0)&&(B=this.mul(B,pe[L]),N=0,L=0)):N=0}G=26}return B},_e.prototype.convertTo=function(j){var W=j.umod(this.m);return W===j?W.clone():W},_e.prototype.convertFrom=function(j){var W=j.clone();return W.red=null,W},u.mont=function(j){return new de(j)},d(de,_e),de.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},de.prototype.convertFrom=function(j){var W=this.imod(j.mul(this.rinv));return W.red=null,W},de.prototype.imul=function(j,W){if(j.isZero()||W.isZero())return j.words[0]=0,j.length=1,j;var pe=j.imul(W),O=pe.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=pe.isub(O).iushrn(this.shift),L=B;return B.cmp(this.m)>=0?L=B.isub(this.m):B.cmpn(0)<0&&(L=B.iadd(this.m)),L._forceRed(this)},de.prototype.mul=function(j,W){if(j.isZero()||W.isZero())return new u(0)._forceRed(this);var pe=j.mul(W),O=pe.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=pe.isub(O).iushrn(this.shift),L=B;return B.cmp(this.m)>=0?L=B.isub(this.m):B.cmpn(0)<0&&(L=B.iadd(this.m)),L._forceRed(this)},de.prototype.invm=function(j){return this.imod(j._invmp(this.m).mul(this.r2))._forceRed(this)}})(o===void 0||o)},{buffer:188}],185:[function(e,o,t){"use strict";t.byteLength=function(x){var y=_(x),P=y[0],S=y[1];return 3*(P+S)/4-S},t.toByteArray=function(x){var y,P,S=_(x),M=S[0],D=S[1],k=new s((function(J,re,ee){return 3*(re+ee)/4-ee})(0,M,D)),z=0,U=D>0?M-4:M;for(P=0;P>16&255,k[z++]=y>>8&255,k[z++]=255&y;return D===2&&(y=i[x.charCodeAt(P)]<<2|i[x.charCodeAt(P+1)]>>4,k[z++]=255&y),D===1&&(y=i[x.charCodeAt(P)]<<10|i[x.charCodeAt(P+1)]<<4|i[x.charCodeAt(P+2)]>>2,k[z++]=y>>8&255,k[z++]=255&y),k},t.fromByteArray=function(x){for(var y,P=x.length,S=P%3,M=[],D=0,k=P-S;Dk?k:D+16383));return S===1?(y=x[P-1],M.push(n[y>>2]+n[y<<4&63]+"==")):S===2&&(y=(x[P-2]<<8)+x[P-1],M.push(n[y>>10]+n[y>>4&63]+n[y<<2&63]+"=")),M.join("")};for(var n=[],i=[],s=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,f=d.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var P=x.indexOf("=");return P===-1&&(P=y),[P,P===y?0:4-P%4]}function C(x,y,P){for(var S,M,D=[],k=y;k>18&63]+n[M>>12&63]+n[M>>6&63]+n[63&M]);return D.join("")}i[45]=62,i[95]=63},{}],186:[function(e,o,t){"use strict";(function(n,i){function s(O,B){if(!O)throw new Error(B||"Assertion failed")}function d(O,B){O.super_=B;var L=function(){};L.prototype=B.prototype,O.prototype=new L,O.prototype.constructor=O}function u(O,B,L){if(u.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&(B!=="le"&&B!=="be"||(L=B,B=10),this._init(O||0,B||10,L||"be"))}var f;typeof n=="object"?n.exports=u:(void 0).BN=u,u.BN=u,u.wordSize=26;try{f=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function _(O,B){var L=O.charCodeAt(B);return L>=48&&L<=57?L-48:L>=65&&L<=70?L-55:L>=97&&L<=102?L-87:void s(!1,"Invalid character in "+O)}function C(O,B,L){var N=_(O,L);return L-1>=B&&(N|=_(O,L-1)<<4),N}function x(O,B,L,N){for(var G=0,$=0,ne=Math.min(O.length,L),be=B;be=49?ye-49+10:ye>=17?ye-17+10:ye,s(ye>=0&&$0?O:B},u.min=function(O,B){return O.cmp(B)<0?O:B},u.prototype._init=function(O,B,L){if(typeof O=="number")return this._initNumber(O,B,L);if(typeof O=="object")return this._initArray(O,B,L);B==="hex"&&(B=16),s(B===(0|B)&&B>=2&&B<=36);var N=0;(O=O.toString().replace(/\s+/g,""))[0]==="-"&&(N++,this.negative=1),N=0;N-=3)$=O[N]|O[N-1]<<8|O[N-2]<<16,this.words[G]|=$<>>26-ne&67108863,(ne+=24)>=26&&(ne-=26,G++);else if(L==="le")for(N=0,G=0;N>>26-ne&67108863,(ne+=24)>=26&&(ne-=26,G++);return this._strip()},u.prototype._parseHex=function(O,B,L){this.length=Math.ceil((O.length-B)/6),this.words=new Array(this.length);for(var N=0;N=B;N-=2)G=C(O,B,N)<<$,this.words[ne]|=67108863&G,$>=18?($-=18,ne+=1,this.words[ne]|=G>>>26):$+=8;else for(N=(O.length-B)%2==0?B+1:B;N=18?($-=18,ne+=1,this.words[ne]|=G>>>26):$+=8;this._strip()},u.prototype._parseBase=function(O,B,L){this.words=[0],this.length=1;for(var N=0,G=1;G<=67108863;G*=B)N++;N--,G=G/B|0;for(var $=O.length-L,ne=$%N,be=Math.min($,$-ne)+L,ye=0,Ne=L;Ne1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{u.prototype[Symbol.for("nodejs.util.inspect.custom")]=P}catch{u.prototype.inspect=P}else u.prototype.inspect=P;function P(){return(this.red?""}var S=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],D=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];u.prototype.toString=function(O,B){var L;if(B=0|B||1,(O=O||10)===16||O==="hex"){L="";for(var N=0,G=0,$=0;$>>24-N&16777215,(N+=2)>=26&&(N-=26,$--),L=G!==0||$!==this.length-1?S[6-be.length]+be+L:be+L}for(G!==0&&(L=G.toString(16)+L);L.length%B!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}if(O===(0|O)&&O>=2&&O<=36){var ye=M[O],Ne=D[O];L="";var te=this.clone();for(te.negative=0;!te.isZero();){var Ae=te.modrn(Ne).toString(O);L=(te=te.idivn(Ne)).isZero()?Ae+L:S[ye-Ae.length]+Ae+L}for(this.isZero()&&(L="0"+L);L.length%B!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}s(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=67108864*this.words[1]:this.length===3&&this.words[2]===1?O+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},u.prototype.toJSON=function(){return this.toString(16,2)},f&&(u.prototype.toBuffer=function(O,B){return this.toArrayLike(f,O,B)}),u.prototype.toArray=function(O,B){return this.toArrayLike(Array,O,B)};function k(O,B,L){L.negative=B.negative^O.negative;var N=O.length+B.length|0;L.length=N,N=N-1|0;var G=0|O.words[0],$=0|B.words[0],ne=G*$,be=67108863&ne,ye=ne/67108864|0;L.words[0]=be;for(var Ne=1;Ne>>26,Ae=67108863&ye,K=Math.min(Ne,B.length-1),Q=Math.max(0,Ne-O.length+1);Q<=K;Q++){var Ce=Ne-Q|0;te+=(ne=(G=0|O.words[Ce])*($=0|B.words[Q])+Ae)/67108864|0,Ae=67108863&ne}L.words[Ne]=0|Ae,ye=0|te}return ye!==0?L.words[Ne]=0|ye:L.length--,L._strip()}u.prototype.toArrayLike=function(O,B,L){this._strip();var N=this.byteLength(),G=L||Math.max(1,N);s(N<=G,"byte array longer than desired length"),s(G>0,"Requested array length <= 0");var $=(function(ne,be){return ne.allocUnsafe?ne.allocUnsafe(be):new ne(be)})(O,G);return this["_toArrayLike"+(B==="le"?"LE":"BE")]($,N),$},u.prototype._toArrayLikeLE=function(O,B){for(var L=0,N=0,G=0,$=0;G>8&255),L>16&255),$===6?(L>24&255),N=0,$=0):(N=ne>>>24,$+=2)}if(L=0&&(O[L--]=ne>>8&255),L>=0&&(O[L--]=ne>>16&255),$===6?(L>=0&&(O[L--]=ne>>24&255),N=0,$=0):(N=ne>>>24,$+=2)}if(L>=0)for(O[L--]=N;L>=0;)O[L--]=0},Math.clz32?u.prototype._countBits=function(O){return 32-Math.clz32(O)}:u.prototype._countBits=function(O){var B=O,L=0;return B>=4096&&(L+=13,B>>>=13),B>=64&&(L+=7,B>>>=7),B>=8&&(L+=4,B>>>=4),B>=2&&(L+=2,B>>>=2),L+B},u.prototype._zeroBits=function(O){if(O===0)return 26;var B=O,L=0;return(8191&B)==0&&(L+=13,B>>>=13),(127&B)==0&&(L+=7,B>>>=7),(15&B)==0&&(L+=4,B>>>=4),(3&B)==0&&(L+=2,B>>>=2),(1&B)==0&&L++,L},u.prototype.bitLength=function(){var O=this.words[this.length-1],B=this._countBits(O);return 26*(this.length-1)+B},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,B=0;BO.length?this.clone().ior(O):O.clone().ior(this)},u.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},u.prototype.iuand=function(O){var B;B=this.length>O.length?O:this;for(var L=0;LO.length?this.clone().iand(O):O.clone().iand(this)},u.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},u.prototype.iuxor=function(O){var B,L;this.length>O.length?(B=this,L=O):(B=O,L=this);for(var N=0;NO.length?this.clone().ixor(O):O.clone().ixor(this)},u.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},u.prototype.inotn=function(O){s(typeof O=="number"&&O>=0);var B=0|Math.ceil(O/26),L=O%26;this._expand(B),L>0&&B--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-L),this._strip()},u.prototype.notn=function(O){return this.clone().inotn(O)},u.prototype.setn=function(O,B){s(typeof O=="number"&&O>=0);var L=O/26|0,N=O%26;return this._expand(L+1),this.words[L]=B?this.words[L]|1<O.length?(L=this,N=O):(L=O,N=this);for(var G=0,$=0;$>>26;for(;G!==0&&$>>26;if(this.length=L.length,G!==0)this.words[this.length]=G,this.length++;else if(L!==this)for(;$O.length?this.clone().iadd(O):O.clone().iadd(this)},u.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var B=this.iadd(O);return O.negative=1,B._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var L,N,G=this.cmp(O);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;G>0?(L=this,N=O):(L=O,N=this);for(var $=0,ne=0;ne>26,this.words[ne]=67108863&B;for(;$!==0&&ne>26,this.words[ne]=67108863&B;if($===0&&ne>>13,Q=0|ne[1],Ce=8191&Q,Ve=Q>>>13,mt=0|ne[2],Ye=8191&mt,rt=mt>>>13,Qt=0|ne[3],zt=8191&Qt,Qe=Qt>>>13,Vt=0|ne[4],Bt=8191&Vt,Ut=Vt>>>13,Jt=0|ne[5],ei=8191&Jt,ni=Jt>>>13,Ei=0|ne[6],Ai=8191&Ei,Ni=Ei>>>13,cn=0|ne[7],ji=8191&cn,Ki=cn>>>13,Xn=0|ne[8],fn=8191&Xn,Xi=Xn>>>13,hn=0|ne[9],zi=8191&hn,Li=hn>>>13,Yn=0|be[0],sn=8191&Yn,bn=Yn>>>13,El=0|be[1],xn=8191&El,wn=El>>>13,Oa=0|be[2],zn=8191&Oa,Hn=Oa>>>13,Zr=0|be[3],En=8191&Zr,Pn=Zr>>>13,cr=0|be[4],Vn=8191&cr,Tn=cr>>>13,el=0|be[5],Gn=8191&el,Rt=el>>>13,ui=0|be[6],_i=8191&ui,Fi=ui>>>13,yo=0|be[7],Yi=8191&yo,ln=yo>>>13,qo=0|be[8],yn=8191&qo,nn=qo>>>13,Ro=0|be[9],ro=8191&Ro,lo=Ro>>>13;L.negative=O.negative^B.negative,L.length=19;var Go=(Ne+(N=Math.imul(Ae,sn))|0)+((8191&(G=(G=Math.imul(Ae,bn))+Math.imul(K,sn)|0))<<13)|0;Ne=(($=Math.imul(K,bn))+(G>>>13)|0)+(Go>>>26)|0,Go&=67108863,N=Math.imul(Ce,sn),G=(G=Math.imul(Ce,bn))+Math.imul(Ve,sn)|0,$=Math.imul(Ve,bn);var Pa=(Ne+(N=N+Math.imul(Ae,xn)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,wn)|0)+Math.imul(K,xn)|0))<<13)|0;Ne=(($=$+Math.imul(K,wn)|0)+(G>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,N=Math.imul(Ye,sn),G=(G=Math.imul(Ye,bn))+Math.imul(rt,sn)|0,$=Math.imul(rt,bn),N=N+Math.imul(Ce,xn)|0,G=(G=G+Math.imul(Ce,wn)|0)+Math.imul(Ve,xn)|0,$=$+Math.imul(Ve,wn)|0;var Qa=(Ne+(N=N+Math.imul(Ae,zn)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,Hn)|0)+Math.imul(K,zn)|0))<<13)|0;Ne=(($=$+Math.imul(K,Hn)|0)+(G>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,N=Math.imul(zt,sn),G=(G=Math.imul(zt,bn))+Math.imul(Qe,sn)|0,$=Math.imul(Qe,bn),N=N+Math.imul(Ye,xn)|0,G=(G=G+Math.imul(Ye,wn)|0)+Math.imul(rt,xn)|0,$=$+Math.imul(rt,wn)|0,N=N+Math.imul(Ce,zn)|0,G=(G=G+Math.imul(Ce,Hn)|0)+Math.imul(Ve,zn)|0,$=$+Math.imul(Ve,Hn)|0;var pr=(Ne+(N=N+Math.imul(Ae,En)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,Pn)|0)+Math.imul(K,En)|0))<<13)|0;Ne=(($=$+Math.imul(K,Pn)|0)+(G>>>13)|0)+(pr>>>26)|0,pr&=67108863,N=Math.imul(Bt,sn),G=(G=Math.imul(Bt,bn))+Math.imul(Ut,sn)|0,$=Math.imul(Ut,bn),N=N+Math.imul(zt,xn)|0,G=(G=G+Math.imul(zt,wn)|0)+Math.imul(Qe,xn)|0,$=$+Math.imul(Qe,wn)|0,N=N+Math.imul(Ye,zn)|0,G=(G=G+Math.imul(Ye,Hn)|0)+Math.imul(rt,zn)|0,$=$+Math.imul(rt,Hn)|0,N=N+Math.imul(Ce,En)|0,G=(G=G+Math.imul(Ce,Pn)|0)+Math.imul(Ve,En)|0,$=$+Math.imul(Ve,Pn)|0;var Ga=(Ne+(N=N+Math.imul(Ae,Vn)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,Tn)|0)+Math.imul(K,Vn)|0))<<13)|0;Ne=(($=$+Math.imul(K,Tn)|0)+(G>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,N=Math.imul(ei,sn),G=(G=Math.imul(ei,bn))+Math.imul(ni,sn)|0,$=Math.imul(ni,bn),N=N+Math.imul(Bt,xn)|0,G=(G=G+Math.imul(Bt,wn)|0)+Math.imul(Ut,xn)|0,$=$+Math.imul(Ut,wn)|0,N=N+Math.imul(zt,zn)|0,G=(G=G+Math.imul(zt,Hn)|0)+Math.imul(Qe,zn)|0,$=$+Math.imul(Qe,Hn)|0,N=N+Math.imul(Ye,En)|0,G=(G=G+Math.imul(Ye,Pn)|0)+Math.imul(rt,En)|0,$=$+Math.imul(rt,Pn)|0,N=N+Math.imul(Ce,Vn)|0,G=(G=G+Math.imul(Ce,Tn)|0)+Math.imul(Ve,Vn)|0,$=$+Math.imul(Ve,Tn)|0;var Ya=(Ne+(N=N+Math.imul(Ae,Gn)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,Rt)|0)+Math.imul(K,Gn)|0))<<13)|0;Ne=(($=$+Math.imul(K,Rt)|0)+(G>>>13)|0)+(Ya>>>26)|0,Ya&=67108863,N=Math.imul(Ai,sn),G=(G=Math.imul(Ai,bn))+Math.imul(Ni,sn)|0,$=Math.imul(Ni,bn),N=N+Math.imul(ei,xn)|0,G=(G=G+Math.imul(ei,wn)|0)+Math.imul(ni,xn)|0,$=$+Math.imul(ni,wn)|0,N=N+Math.imul(Bt,zn)|0,G=(G=G+Math.imul(Bt,Hn)|0)+Math.imul(Ut,zn)|0,$=$+Math.imul(Ut,Hn)|0,N=N+Math.imul(zt,En)|0,G=(G=G+Math.imul(zt,Pn)|0)+Math.imul(Qe,En)|0,$=$+Math.imul(Qe,Pn)|0,N=N+Math.imul(Ye,Vn)|0,G=(G=G+Math.imul(Ye,Tn)|0)+Math.imul(rt,Vn)|0,$=$+Math.imul(rt,Tn)|0,N=N+Math.imul(Ce,Gn)|0,G=(G=G+Math.imul(Ce,Rt)|0)+Math.imul(Ve,Gn)|0,$=$+Math.imul(Ve,Rt)|0;var ht=(Ne+(N=N+Math.imul(Ae,_i)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,Fi)|0)+Math.imul(K,_i)|0))<<13)|0;Ne=(($=$+Math.imul(K,Fi)|0)+(G>>>13)|0)+(ht>>>26)|0,ht&=67108863,N=Math.imul(ji,sn),G=(G=Math.imul(ji,bn))+Math.imul(Ki,sn)|0,$=Math.imul(Ki,bn),N=N+Math.imul(Ai,xn)|0,G=(G=G+Math.imul(Ai,wn)|0)+Math.imul(Ni,xn)|0,$=$+Math.imul(Ni,wn)|0,N=N+Math.imul(ei,zn)|0,G=(G=G+Math.imul(ei,Hn)|0)+Math.imul(ni,zn)|0,$=$+Math.imul(ni,Hn)|0,N=N+Math.imul(Bt,En)|0,G=(G=G+Math.imul(Bt,Pn)|0)+Math.imul(Ut,En)|0,$=$+Math.imul(Ut,Pn)|0,N=N+Math.imul(zt,Vn)|0,G=(G=G+Math.imul(zt,Tn)|0)+Math.imul(Qe,Vn)|0,$=$+Math.imul(Qe,Tn)|0,N=N+Math.imul(Ye,Gn)|0,G=(G=G+Math.imul(Ye,Rt)|0)+Math.imul(rt,Gn)|0,$=$+Math.imul(rt,Rt)|0,N=N+Math.imul(Ce,_i)|0,G=(G=G+Math.imul(Ce,Fi)|0)+Math.imul(Ve,_i)|0,$=$+Math.imul(Ve,Fi)|0;var oi=(Ne+(N=N+Math.imul(Ae,Yi)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,ln)|0)+Math.imul(K,Yi)|0))<<13)|0;Ne=(($=$+Math.imul(K,ln)|0)+(G>>>13)|0)+(oi>>>26)|0,oi&=67108863,N=Math.imul(fn,sn),G=(G=Math.imul(fn,bn))+Math.imul(Xi,sn)|0,$=Math.imul(Xi,bn),N=N+Math.imul(ji,xn)|0,G=(G=G+Math.imul(ji,wn)|0)+Math.imul(Ki,xn)|0,$=$+Math.imul(Ki,wn)|0,N=N+Math.imul(Ai,zn)|0,G=(G=G+Math.imul(Ai,Hn)|0)+Math.imul(Ni,zn)|0,$=$+Math.imul(Ni,Hn)|0,N=N+Math.imul(ei,En)|0,G=(G=G+Math.imul(ei,Pn)|0)+Math.imul(ni,En)|0,$=$+Math.imul(ni,Pn)|0,N=N+Math.imul(Bt,Vn)|0,G=(G=G+Math.imul(Bt,Tn)|0)+Math.imul(Ut,Vn)|0,$=$+Math.imul(Ut,Tn)|0,N=N+Math.imul(zt,Gn)|0,G=(G=G+Math.imul(zt,Rt)|0)+Math.imul(Qe,Gn)|0,$=$+Math.imul(Qe,Rt)|0,N=N+Math.imul(Ye,_i)|0,G=(G=G+Math.imul(Ye,Fi)|0)+Math.imul(rt,_i)|0,$=$+Math.imul(rt,Fi)|0,N=N+Math.imul(Ce,Yi)|0,G=(G=G+Math.imul(Ce,ln)|0)+Math.imul(Ve,Yi)|0,$=$+Math.imul(Ve,ln)|0;var Mi=(Ne+(N=N+Math.imul(Ae,yn)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,nn)|0)+Math.imul(K,yn)|0))<<13)|0;Ne=(($=$+Math.imul(K,nn)|0)+(G>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,N=Math.imul(zi,sn),G=(G=Math.imul(zi,bn))+Math.imul(Li,sn)|0,$=Math.imul(Li,bn),N=N+Math.imul(fn,xn)|0,G=(G=G+Math.imul(fn,wn)|0)+Math.imul(Xi,xn)|0,$=$+Math.imul(Xi,wn)|0,N=N+Math.imul(ji,zn)|0,G=(G=G+Math.imul(ji,Hn)|0)+Math.imul(Ki,zn)|0,$=$+Math.imul(Ki,Hn)|0,N=N+Math.imul(Ai,En)|0,G=(G=G+Math.imul(Ai,Pn)|0)+Math.imul(Ni,En)|0,$=$+Math.imul(Ni,Pn)|0,N=N+Math.imul(ei,Vn)|0,G=(G=G+Math.imul(ei,Tn)|0)+Math.imul(ni,Vn)|0,$=$+Math.imul(ni,Tn)|0,N=N+Math.imul(Bt,Gn)|0,G=(G=G+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Gn)|0,$=$+Math.imul(Ut,Rt)|0,N=N+Math.imul(zt,_i)|0,G=(G=G+Math.imul(zt,Fi)|0)+Math.imul(Qe,_i)|0,$=$+Math.imul(Qe,Fi)|0,N=N+Math.imul(Ye,Yi)|0,G=(G=G+Math.imul(Ye,ln)|0)+Math.imul(rt,Yi)|0,$=$+Math.imul(rt,ln)|0,N=N+Math.imul(Ce,yn)|0,G=(G=G+Math.imul(Ce,nn)|0)+Math.imul(Ve,yn)|0,$=$+Math.imul(Ve,nn)|0;var xi=(Ne+(N=N+Math.imul(Ae,ro)|0)|0)+((8191&(G=(G=G+Math.imul(Ae,lo)|0)+Math.imul(K,ro)|0))<<13)|0;Ne=(($=$+Math.imul(K,lo)|0)+(G>>>13)|0)+(xi>>>26)|0,xi&=67108863,N=Math.imul(zi,xn),G=(G=Math.imul(zi,wn))+Math.imul(Li,xn)|0,$=Math.imul(Li,wn),N=N+Math.imul(fn,zn)|0,G=(G=G+Math.imul(fn,Hn)|0)+Math.imul(Xi,zn)|0,$=$+Math.imul(Xi,Hn)|0,N=N+Math.imul(ji,En)|0,G=(G=G+Math.imul(ji,Pn)|0)+Math.imul(Ki,En)|0,$=$+Math.imul(Ki,Pn)|0,N=N+Math.imul(Ai,Vn)|0,G=(G=G+Math.imul(Ai,Tn)|0)+Math.imul(Ni,Vn)|0,$=$+Math.imul(Ni,Tn)|0,N=N+Math.imul(ei,Gn)|0,G=(G=G+Math.imul(ei,Rt)|0)+Math.imul(ni,Gn)|0,$=$+Math.imul(ni,Rt)|0,N=N+Math.imul(Bt,_i)|0,G=(G=G+Math.imul(Bt,Fi)|0)+Math.imul(Ut,_i)|0,$=$+Math.imul(Ut,Fi)|0,N=N+Math.imul(zt,Yi)|0,G=(G=G+Math.imul(zt,ln)|0)+Math.imul(Qe,Yi)|0,$=$+Math.imul(Qe,ln)|0,N=N+Math.imul(Ye,yn)|0,G=(G=G+Math.imul(Ye,nn)|0)+Math.imul(rt,yn)|0,$=$+Math.imul(rt,nn)|0;var Vi=(Ne+(N=N+Math.imul(Ce,ro)|0)|0)+((8191&(G=(G=G+Math.imul(Ce,lo)|0)+Math.imul(Ve,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Ve,lo)|0)+(G>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,N=Math.imul(zi,zn),G=(G=Math.imul(zi,Hn))+Math.imul(Li,zn)|0,$=Math.imul(Li,Hn),N=N+Math.imul(fn,En)|0,G=(G=G+Math.imul(fn,Pn)|0)+Math.imul(Xi,En)|0,$=$+Math.imul(Xi,Pn)|0,N=N+Math.imul(ji,Vn)|0,G=(G=G+Math.imul(ji,Tn)|0)+Math.imul(Ki,Vn)|0,$=$+Math.imul(Ki,Tn)|0,N=N+Math.imul(Ai,Gn)|0,G=(G=G+Math.imul(Ai,Rt)|0)+Math.imul(Ni,Gn)|0,$=$+Math.imul(Ni,Rt)|0,N=N+Math.imul(ei,_i)|0,G=(G=G+Math.imul(ei,Fi)|0)+Math.imul(ni,_i)|0,$=$+Math.imul(ni,Fi)|0,N=N+Math.imul(Bt,Yi)|0,G=(G=G+Math.imul(Bt,ln)|0)+Math.imul(Ut,Yi)|0,$=$+Math.imul(Ut,ln)|0,N=N+Math.imul(zt,yn)|0,G=(G=G+Math.imul(zt,nn)|0)+Math.imul(Qe,yn)|0,$=$+Math.imul(Qe,nn)|0;var pn=(Ne+(N=N+Math.imul(Ye,ro)|0)|0)+((8191&(G=(G=G+Math.imul(Ye,lo)|0)+Math.imul(rt,ro)|0))<<13)|0;Ne=(($=$+Math.imul(rt,lo)|0)+(G>>>13)|0)+(pn>>>26)|0,pn&=67108863,N=Math.imul(zi,En),G=(G=Math.imul(zi,Pn))+Math.imul(Li,En)|0,$=Math.imul(Li,Pn),N=N+Math.imul(fn,Vn)|0,G=(G=G+Math.imul(fn,Tn)|0)+Math.imul(Xi,Vn)|0,$=$+Math.imul(Xi,Tn)|0,N=N+Math.imul(ji,Gn)|0,G=(G=G+Math.imul(ji,Rt)|0)+Math.imul(Ki,Gn)|0,$=$+Math.imul(Ki,Rt)|0,N=N+Math.imul(Ai,_i)|0,G=(G=G+Math.imul(Ai,Fi)|0)+Math.imul(Ni,_i)|0,$=$+Math.imul(Ni,Fi)|0,N=N+Math.imul(ei,Yi)|0,G=(G=G+Math.imul(ei,ln)|0)+Math.imul(ni,Yi)|0,$=$+Math.imul(ni,ln)|0,N=N+Math.imul(Bt,yn)|0,G=(G=G+Math.imul(Bt,nn)|0)+Math.imul(Ut,yn)|0,$=$+Math.imul(Ut,nn)|0;var dn=(Ne+(N=N+Math.imul(zt,ro)|0)|0)+((8191&(G=(G=G+Math.imul(zt,lo)|0)+Math.imul(Qe,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Qe,lo)|0)+(G>>>13)|0)+(dn>>>26)|0,dn&=67108863,N=Math.imul(zi,Vn),G=(G=Math.imul(zi,Tn))+Math.imul(Li,Vn)|0,$=Math.imul(Li,Tn),N=N+Math.imul(fn,Gn)|0,G=(G=G+Math.imul(fn,Rt)|0)+Math.imul(Xi,Gn)|0,$=$+Math.imul(Xi,Rt)|0,N=N+Math.imul(ji,_i)|0,G=(G=G+Math.imul(ji,Fi)|0)+Math.imul(Ki,_i)|0,$=$+Math.imul(Ki,Fi)|0,N=N+Math.imul(Ai,Yi)|0,G=(G=G+Math.imul(Ai,ln)|0)+Math.imul(Ni,Yi)|0,$=$+Math.imul(Ni,ln)|0,N=N+Math.imul(ei,yn)|0,G=(G=G+Math.imul(ei,nn)|0)+Math.imul(ni,yn)|0,$=$+Math.imul(ni,nn)|0;var mo=(Ne+(N=N+Math.imul(Bt,ro)|0)|0)+((8191&(G=(G=G+Math.imul(Bt,lo)|0)+Math.imul(Ut,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Ut,lo)|0)+(G>>>13)|0)+(mo>>>26)|0,mo&=67108863,N=Math.imul(zi,Gn),G=(G=Math.imul(zi,Rt))+Math.imul(Li,Gn)|0,$=Math.imul(Li,Rt),N=N+Math.imul(fn,_i)|0,G=(G=G+Math.imul(fn,Fi)|0)+Math.imul(Xi,_i)|0,$=$+Math.imul(Xi,Fi)|0,N=N+Math.imul(ji,Yi)|0,G=(G=G+Math.imul(ji,ln)|0)+Math.imul(Ki,Yi)|0,$=$+Math.imul(Ki,ln)|0,N=N+Math.imul(Ai,yn)|0,G=(G=G+Math.imul(Ai,nn)|0)+Math.imul(Ni,yn)|0,$=$+Math.imul(Ni,nn)|0;var jn=(Ne+(N=N+Math.imul(ei,ro)|0)|0)+((8191&(G=(G=G+Math.imul(ei,lo)|0)+Math.imul(ni,ro)|0))<<13)|0;Ne=(($=$+Math.imul(ni,lo)|0)+(G>>>13)|0)+(jn>>>26)|0,jn&=67108863,N=Math.imul(zi,_i),G=(G=Math.imul(zi,Fi))+Math.imul(Li,_i)|0,$=Math.imul(Li,Fi),N=N+Math.imul(fn,Yi)|0,G=(G=G+Math.imul(fn,ln)|0)+Math.imul(Xi,Yi)|0,$=$+Math.imul(Xi,ln)|0,N=N+Math.imul(ji,yn)|0,G=(G=G+Math.imul(ji,nn)|0)+Math.imul(Ki,yn)|0,$=$+Math.imul(Ki,nn)|0;var An=(Ne+(N=N+Math.imul(Ai,ro)|0)|0)+((8191&(G=(G=G+Math.imul(Ai,lo)|0)+Math.imul(Ni,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Ni,lo)|0)+(G>>>13)|0)+(An>>>26)|0,An&=67108863,N=Math.imul(zi,Yi),G=(G=Math.imul(zi,ln))+Math.imul(Li,Yi)|0,$=Math.imul(Li,ln),N=N+Math.imul(fn,yn)|0,G=(G=G+Math.imul(fn,nn)|0)+Math.imul(Xi,yn)|0,$=$+Math.imul(Xi,nn)|0;var $n=(Ne+(N=N+Math.imul(ji,ro)|0)|0)+((8191&(G=(G=G+Math.imul(ji,lo)|0)+Math.imul(Ki,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Ki,lo)|0)+(G>>>13)|0)+($n>>>26)|0,$n&=67108863,N=Math.imul(zi,yn),G=(G=Math.imul(zi,nn))+Math.imul(Li,yn)|0,$=Math.imul(Li,nn);var va=(Ne+(N=N+Math.imul(fn,ro)|0)|0)+((8191&(G=(G=G+Math.imul(fn,lo)|0)+Math.imul(Xi,ro)|0))<<13)|0;Ne=(($=$+Math.imul(Xi,lo)|0)+(G>>>13)|0)+(va>>>26)|0,va&=67108863;var Ta=(Ne+(N=Math.imul(zi,ro))|0)+((8191&(G=(G=Math.imul(zi,lo))+Math.imul(Li,ro)|0))<<13)|0;return Ne=(($=Math.imul(Li,lo))+(G>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,ye[0]=Go,ye[1]=Pa,ye[2]=Qa,ye[3]=pr,ye[4]=Ga,ye[5]=Ya,ye[6]=ht,ye[7]=oi,ye[8]=Mi,ye[9]=xi,ye[10]=Vi,ye[11]=pn,ye[12]=dn,ye[13]=mo,ye[14]=jn,ye[15]=An,ye[16]=$n,ye[17]=va,ye[18]=Ta,Ne!==0&&(ye[19]=Ne,L.length++),L};function U(O,B,L){L.negative=B.negative^O.negative,L.length=O.length+B.length;for(var N=0,G=0,$=0;$>>26)|0)>>>26,ne&=67108863}L.words[$]=be,N=ne,ne=G}return N!==0?L.words[$]=N:L.length--,L._strip()}function J(O,B,L){return U(O,B,L)}function re(O,B){this.x=O,this.y=B}Math.imul||(z=k),u.prototype.mulTo=function(O,B){var L=this.length+O.length;return this.length===10&&O.length===10?z(this,O,B):L<63?k(this,O,B):L<1024?U(this,O,B):J(this,O,B)},re.prototype.makeRBT=function(O){for(var B=new Array(O),L=u.prototype._countBits(O)-1,N=0;N>=1;return N},re.prototype.permute=function(O,B,L,N,G,$){for(var ne=0;ne<$;ne++)N[ne]=B[O[ne]],G[ne]=L[O[ne]]},re.prototype.transform=function(O,B,L,N,G,$){this.permute($,O,B,L,N,G);for(var ne=1;ne>>=1)G++;return 1<>>=13,L[2*$+1]=8191&G,G>>>=13;for($=2*B;$>=26,L+=G/67108864|0,L+=$>>>26,this.words[N]=67108863&$}return L!==0&&(this.words[N]=L,this.length++),B?this.ineg():this},u.prototype.muln=function(O){return this.clone().imuln(O)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(O){var B=(function($){for(var ne=new Array($.bitLength()),be=0;be>>Ne&1}return ne})(O);if(B.length===0)return new u(1);for(var L=this,N=0;N=0);var B,L=O%26,N=(O-L)/26,G=67108863>>>26-L<<26-L;if(L!==0){var $=0;for(B=0;B>>26-L}$&&(this.words[B]=$,this.length++)}if(N!==0){for(B=this.length-1;B>=0;B--)this.words[B+N]=this.words[B];for(B=0;B=0),N=B?(B-B%26)/26:0;var G=O%26,$=Math.min((O-G)/26,this.length),ne=67108863^67108863>>>G<$)for(this.length-=$,ye=0;ye=0&&(Ne!==0||ye>=N);ye--){var te=0|this.words[ye];this.words[ye]=Ne<<26-G|te>>>G,Ne=te&ne}return be&&Ne!==0&&(be.words[be.length++]=Ne),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},u.prototype.ishrn=function(O,B,L){return s(this.negative===0),this.iushrn(O,B,L)},u.prototype.shln=function(O){return this.clone().ishln(O)},u.prototype.ushln=function(O){return this.clone().iushln(O)},u.prototype.shrn=function(O){return this.clone().ishrn(O)},u.prototype.ushrn=function(O){return this.clone().iushrn(O)},u.prototype.testn=function(O){s(typeof O=="number"&&O>=0);var B=O%26,L=(O-B)/26,N=1<=0);var B=O%26,L=(O-B)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=L)return this;if(B!==0&&L++,this.length=Math.min(L,this.length),B!==0){var N=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},u.prototype.isubn=function(O){if(s(typeof O=="number"),s(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(be/67108864|0),this.words[N+L]=67108863&G}for(;N>26,this.words[N+L]=67108863&G;if(ne===0)return this._strip();for(s(ne===-1),ne=0,N=0;N>26,this.words[N]=67108863&G;return this.negative=1,this._strip()},u.prototype._wordDiv=function(O,B){var L=(this.length,O.length),N=this.clone(),G=O,$=0|G.words[G.length-1];(L=26-this._countBits($))!==0&&(G=G.ushln(L),N.iushln(L),$=0|G.words[G.length-1]);var ne,be=N.length-G.length;if(B!=="mod"){(ne=new u(null)).length=be+1,ne.words=new Array(ne.length);for(var ye=0;ye=0;te--){var Ae=67108864*(0|N.words[G.length+te])+(0|N.words[G.length+te-1]);for(Ae=Math.min(Ae/$|0,67108863),N._ishlnsubmul(G,Ae,te);N.negative!==0;)Ae--,N.negative=0,N._ishlnsubmul(G,1,te),N.isZero()||(N.negative^=1);ne&&(ne.words[te]=Ae)}return ne&&ne._strip(),N._strip(),B!=="div"&&L!==0&&N.iushrn(L),{div:ne||null,mod:N}},u.prototype.divmod=function(O,B,L){return s(!O.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:this.negative!==0&&O.negative===0?($=this.neg().divmod(O,B),B!=="mod"&&(N=$.div.neg()),B!=="div"&&(G=$.mod.neg(),L&&G.negative!==0&&G.iadd(O)),{div:N,mod:G}):this.negative===0&&O.negative!==0?($=this.divmod(O.neg(),B),B!=="mod"&&(N=$.div.neg()),{div:N,mod:$.mod}):(this.negative&O.negative)!=0?($=this.neg().divmod(O.neg(),B),B!=="div"&&(G=$.mod.neg(),L&&G.negative!==0&&G.isub(O)),{div:$.div,mod:G}):O.length>this.length||this.cmp(O)<0?{div:new u(0),mod:this}:O.length===1?B==="div"?{div:this.divn(O.words[0]),mod:null}:B==="mod"?{div:null,mod:new u(this.modrn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new u(this.modrn(O.words[0]))}:this._wordDiv(O,B);var N,G,$},u.prototype.div=function(O){return this.divmod(O,"div",!1).div},u.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},u.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},u.prototype.divRound=function(O){var B=this.divmod(O);if(B.mod.isZero())return B.div;var L=B.div.negative!==0?B.mod.isub(O):B.mod,N=O.ushrn(1),G=O.andln(1),$=L.cmp(N);return $<0||G===1&&$===0?B.div:B.div.negative!==0?B.div.isubn(1):B.div.iaddn(1)},u.prototype.modrn=function(O){var B=O<0;B&&(O=-O),s(O<=67108863);for(var L=(1<<26)%O,N=0,G=this.length-1;G>=0;G--)N=(L*N+(0|this.words[G]))%O;return B?-N:N},u.prototype.modn=function(O){return this.modrn(O)},u.prototype.idivn=function(O){var B=O<0;B&&(O=-O),s(O<=67108863);for(var L=0,N=this.length-1;N>=0;N--){var G=(0|this.words[N])+67108864*L;this.words[N]=G/O|0,L=G%O}return this._strip(),B?this.ineg():this},u.prototype.divn=function(O){return this.clone().idivn(O)},u.prototype.egcd=function(O){s(O.negative===0),s(!O.isZero());var B=this,L=O.clone();B=B.negative!==0?B.umod(O):B.clone();for(var N=new u(1),G=new u(0),$=new u(0),ne=new u(1),be=0;B.isEven()&&L.isEven();)B.iushrn(1),L.iushrn(1),++be;for(var ye=L.clone(),Ne=B.clone();!B.isZero();){for(var te=0,Ae=1;(B.words[0]&Ae)==0&&te<26;++te,Ae<<=1);if(te>0)for(B.iushrn(te);te-- >0;)(N.isOdd()||G.isOdd())&&(N.iadd(ye),G.isub(Ne)),N.iushrn(1),G.iushrn(1);for(var K=0,Q=1;(L.words[0]&Q)==0&&K<26;++K,Q<<=1);if(K>0)for(L.iushrn(K);K-- >0;)($.isOdd()||ne.isOdd())&&($.iadd(ye),ne.isub(Ne)),$.iushrn(1),ne.iushrn(1);B.cmp(L)>=0?(B.isub(L),N.isub($),G.isub(ne)):(L.isub(B),$.isub(N),ne.isub(G))}return{a:$,b:ne,gcd:L.iushln(be)}},u.prototype._invmp=function(O){s(O.negative===0),s(!O.isZero());var B=this,L=O.clone();B=B.negative!==0?B.umod(O):B.clone();for(var N,G=new u(1),$=new u(0),ne=L.clone();B.cmpn(1)>0&&L.cmpn(1)>0;){for(var be=0,ye=1;(B.words[0]&ye)==0&&be<26;++be,ye<<=1);if(be>0)for(B.iushrn(be);be-- >0;)G.isOdd()&&G.iadd(ne),G.iushrn(1);for(var Ne=0,te=1;(L.words[0]&te)==0&&Ne<26;++Ne,te<<=1);if(Ne>0)for(L.iushrn(Ne);Ne-- >0;)$.isOdd()&&$.iadd(ne),$.iushrn(1);B.cmp(L)>=0?(B.isub(L),G.isub($)):(L.isub(B),$.isub(G))}return(N=B.cmpn(1)===0?G:$).cmpn(0)<0&&N.iadd(O),N},u.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var B=this.clone(),L=O.clone();B.negative=0,L.negative=0;for(var N=0;B.isEven()&&L.isEven();N++)B.iushrn(1),L.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;L.isEven();)L.iushrn(1);var G=B.cmp(L);if(G<0){var $=B;B=L,L=$}else if(G===0||L.cmpn(1)===0)break;B.isub(L)}return L.iushln(N)},u.prototype.invm=function(O){return this.egcd(O).a.umod(O)},u.prototype.isEven=function(){return(1&this.words[0])==0},u.prototype.isOdd=function(){return(1&this.words[0])==1},u.prototype.andln=function(O){return this.words[0]&O},u.prototype.bincn=function(O){s(typeof O=="number");var B=O%26,L=(O-B)/26,N=1<>>26,ne&=67108863,this.words[$]=ne}return G!==0&&(this.words[$]=G,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(O){var B,L=O<0;if(this.negative!==0&&!L)return-1;if(this.negative===0&&L)return 1;if(this._strip(),this.length>1)B=1;else{L&&(O=-O),s(O<=67108863,"Number is too big");var N=0|this.words[0];B=N===O?0:NO.length)return 1;if(this.length=0;L--){var N=0|this.words[L],G=0|O.words[L];if(N!==G){NG&&(B=1);break}}return B},u.prototype.gtn=function(O){return this.cmpn(O)===1},u.prototype.gt=function(O){return this.cmp(O)===1},u.prototype.gten=function(O){return this.cmpn(O)>=0},u.prototype.gte=function(O){return this.cmp(O)>=0},u.prototype.ltn=function(O){return this.cmpn(O)===-1},u.prototype.lt=function(O){return this.cmp(O)===-1},u.prototype.lten=function(O){return this.cmpn(O)<=0},u.prototype.lte=function(O){return this.cmp(O)<=0},u.prototype.eqn=function(O){return this.cmpn(O)===0},u.prototype.eq=function(O){return this.cmp(O)===0},u.red=function(O){return new W(O)},u.prototype.toRed=function(O){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},u.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(O){return this.red=O,this},u.prototype.forceRed=function(O){return s(!this.red,"Already a number in reduction context"),this._forceRed(O)},u.prototype.redAdd=function(O){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},u.prototype.redIAdd=function(O){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},u.prototype.redSub=function(O){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},u.prototype.redISub=function(O){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},u.prototype.redShl=function(O){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},u.prototype.redMul=function(O){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},u.prototype.redIMul=function(O){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},u.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(O){return s(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var ee={k256:null,p224:null,p192:null,p25519:null};function ae(O,B){this.name=O,this.p=new u(B,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function se(){ae.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _e(){ae.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function de(){ae.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){ae.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(O){if(typeof O=="string"){var B=u._prime(O);this.m=B.p,this.prime=B}else s(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}function pe(O){W.call(this,O),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}ae.prototype._tmp=function(){var O=new u(null);return O.words=new Array(Math.ceil(this.n/13)),O},ae.prototype.ireduce=function(O){var B,L=O;do this.split(L,this.tmp),B=(L=(L=this.imulK(L)).iadd(this.tmp)).bitLength();while(B>this.n);var N=B0?L.isub(this.p):L.strip!==void 0?L.strip():L._strip(),L},ae.prototype.split=function(O,B){O.iushrn(this.n,0,B)},ae.prototype.imulK=function(O){return O.imul(this.k)},d(se,ae),se.prototype.split=function(O,B){for(var L=Math.min(O.length,9),N=0;N>>22,G=$}G>>>=22,O.words[N-10]=G,G===0&&O.length>10?O.length-=10:O.length-=9},se.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var B=0,L=0;L>>=26,O.words[L]=G,B=N}return B!==0&&(O.words[O.length++]=B),O},u._prime=function(O){if(ee[O])return ee[O];var B;if(O==="k256")B=new se;else if(O==="p224")B=new _e;else if(O==="p192")B=new de;else{if(O!=="p25519")throw new Error("Unknown prime "+O);B=new j}return ee[O]=B,B},W.prototype._verify1=function(O){s(O.negative===0,"red works only with positives"),s(O.red,"red works only with red numbers")},W.prototype._verify2=function(O,B){s((O.negative|B.negative)==0,"red works only with positives"),s(O.red&&O.red===B.red,"red works only with red numbers")},W.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):(y(O,O.umod(this.m)._forceRed(this)),O)},W.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},W.prototype.add=function(O,B){this._verify2(O,B);var L=O.add(B);return L.cmp(this.m)>=0&&L.isub(this.m),L._forceRed(this)},W.prototype.iadd=function(O,B){this._verify2(O,B);var L=O.iadd(B);return L.cmp(this.m)>=0&&L.isub(this.m),L},W.prototype.sub=function(O,B){this._verify2(O,B);var L=O.sub(B);return L.cmpn(0)<0&&L.iadd(this.m),L._forceRed(this)},W.prototype.isub=function(O,B){this._verify2(O,B);var L=O.isub(B);return L.cmpn(0)<0&&L.iadd(this.m),L},W.prototype.shl=function(O,B){return this._verify1(O),this.imod(O.ushln(B))},W.prototype.imul=function(O,B){return this._verify2(O,B),this.imod(O.imul(B))},W.prototype.mul=function(O,B){return this._verify2(O,B),this.imod(O.mul(B))},W.prototype.isqr=function(O){return this.imul(O,O.clone())},W.prototype.sqr=function(O){return this.mul(O,O)},W.prototype.sqrt=function(O){if(O.isZero())return O.clone();var B=this.m.andln(3);if(s(B%2==1),B===3){var L=this.m.add(new u(1)).iushrn(2);return this.pow(O,L)}for(var N=this.m.subn(1),G=0;!N.isZero()&&N.andln(1)===0;)G++,N.iushrn(1);s(!N.isZero());var $=new u(1).toRed(this),ne=$.redNeg(),be=this.m.subn(1).iushrn(1),ye=this.m.bitLength();for(ye=new u(2*ye*ye).toRed(this);this.pow(ye,be).cmp(ne)!==0;)ye.redIAdd(ne);for(var Ne=this.pow(ye,N),te=this.pow(O,N.addn(1).iushrn(1)),Ae=this.pow(O,N),K=G;Ae.cmp($)!==0;){for(var Q=Ae,Ce=0;Q.cmp($)!==0;Ce++)Q=Q.redSqr();s(Ce=0;N--){for(var ye=B.words[N],Ne=be-1;Ne>=0;Ne--){var te=ye>>Ne&1;G!==L[0]&&(G=this.sqr(G)),te!==0||$!==0?($<<=1,$|=te,(++ne===4||N===0&&Ne===0)&&(G=this.mul(G,L[$]),ne=0,$=0)):ne=0}be=26}return G},W.prototype.convertTo=function(O){var B=O.umod(this.m);return B===O?B.clone():B},W.prototype.convertFrom=function(O){var B=O.clone();return B.red=null,B},u.mont=function(O){return new pe(O)},d(pe,W),pe.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},pe.prototype.convertFrom=function(O){var B=this.imod(O.mul(this.rinv));return B.red=null,B},pe.prototype.imul=function(O,B){if(O.isZero()||B.isZero())return O.words[0]=0,O.length=1,O;var L=O.imul(B),N=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=L.isub(N).iushrn(this.shift),$=G;return G.cmp(this.m)>=0?$=G.isub(this.m):G.cmpn(0)<0&&($=G.iadd(this.m)),$._forceRed(this)},pe.prototype.mul=function(O,B){if(O.isZero()||B.isZero())return new u(0)._forceRed(this);var L=O.mul(B),N=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=L.isub(N).iushrn(this.shift),$=G;return G.cmp(this.m)>=0?$=G.isub(this.m):G.cmpn(0)<0&&($=G.iadd(this.m)),$._forceRed(this)},pe.prototype.invm=function(O){return this.imod(O._invmp(this.m).mul(this.r2))._forceRed(this)}})(o===void 0||o)},{buffer:188}],187:[function(e,o,t){"use strict";var n;function i(d){this.rand=d}if(o.exports=function(d){return n||(n=new i(null)),n.generate(d)},o.exports.Rand=i,i.prototype.generate=function(d){return this._rand(d)},i.prototype._rand=function(d){if(this.rand.getBytes)return this.rand.getBytes(d);for(var u=new Uint8Array(d),f=0;f>>24]^J[se>>>16&255]^re[_e>>>8&255]^ee[255&de]^x[j++],D=U[se>>>24]^J[_e>>>16&255]^re[de>>>8&255]^ee[255&ae]^x[j++],k=U[_e>>>24]^J[de>>>16&255]^re[ae>>>8&255]^ee[255&se]^x[j++],z=U[de>>>24]^J[ae>>>16&255]^re[se>>>8&255]^ee[255&_e]^x[j++],ae=M,se=D,_e=k,de=z;return M=(P[ae>>>24]<<24|P[se>>>16&255]<<16|P[_e>>>8&255]<<8|P[255&de])^x[j++],D=(P[se>>>24]<<24|P[_e>>>16&255]<<16|P[de>>>8&255]<<8|P[255&ae])^x[j++],k=(P[_e>>>24]<<24|P[de>>>16&255]<<16|P[ae>>>8&255]<<8|P[255&se])^x[j++],z=(P[de>>>24]<<24|P[ae>>>16&255]<<16|P[se>>>8&255]<<8|P[255&_e])^x[j++],[M>>>=0,D>>>=0,k>>>=0,z>>>=0]}var u=[0,1,2,4,8,16,32,64,128,27,54],f=(function(){for(var C=new Array(256),x=0;x<256;x++)C[x]=x<128?x<<1:x<<1^283;for(var y=[],P=[],S=[[],[],[],[]],M=[[],[],[],[]],D=0,k=0,z=0;z<256;++z){var U=k^k<<1^k<<2^k<<3^k<<4;U=U>>>8^255&U^99,y[D]=U,P[U]=D;var J=C[D],re=C[J],ee=C[re],ae=257*C[U]^16843008*U;S[0][D]=ae<<24|ae>>>8,S[1][D]=ae<<16|ae>>>16,S[2][D]=ae<<8|ae>>>24,S[3][D]=ae,ae=16843009*ee^65537*re^257*J^16843008*D,M[0][U]=ae<<24|ae>>>8,M[1][U]=ae<<16|ae>>>16,M[2][U]=ae<<8|ae>>>24,M[3][U]=ae,D===0?D=k=1:(D=J^C[C[C[ee^J]]],k^=C[C[k]])}return{SBOX:y,INV_SBOX:P,SUB_MIX:S,INV_SUB_MIX:M}})();function _(C){this._key=i(C),this._reset()}_.blockSize=16,_.keySize=32,_.prototype.blockSize=_.blockSize,_.prototype.keySize=_.keySize,_.prototype._reset=function(){for(var C=this._key,x=C.length,y=x+6,P=4*(y+1),S=[],M=0;M>>24,D=f.SBOX[D>>>24]<<24|f.SBOX[D>>>16&255]<<16|f.SBOX[D>>>8&255]<<8|f.SBOX[255&D],D^=u[M/x|0]<<24):x>6&&M%x==4&&(D=f.SBOX[D>>>24]<<24|f.SBOX[D>>>16&255]<<16|f.SBOX[D>>>8&255]<<8|f.SBOX[255&D]),S[M]=S[M-x]^D}for(var k=[],z=0;z>>24]]^f.INV_SUB_MIX[1][f.SBOX[J>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[J>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&J]]}this._nRounds=y,this._keySchedule=S,this._invKeySchedule=k},_.prototype.encryptBlockRaw=function(C){return d(C=i(C),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},_.prototype.encryptBlock=function(C){var x=this.encryptBlockRaw(C),y=n.allocUnsafe(16);return y.writeUInt32BE(x[0],0),y.writeUInt32BE(x[1],4),y.writeUInt32BE(x[2],8),y.writeUInt32BE(x[3],12),y},_.prototype.decryptBlock=function(C){var x=(C=i(C))[1];C[1]=C[3],C[3]=x;var y=d(C,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),P=n.allocUnsafe(16);return P.writeUInt32BE(y[0],0),P.writeUInt32BE(y[3],4),P.writeUInt32BE(y[2],8),P.writeUInt32BE(y[1],12),P},_.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},o.exports.AES=_},{"safe-buffer":494}],190:[function(e,o,t){"use strict";var n=e("./aes"),i=e("safe-buffer").Buffer,s=e("cipher-base"),d=e("inherits"),u=e("./ghash"),f=e("buffer-xor"),_=e("./incr32");function C(x,y,P,S){s.call(this);var M=i.alloc(4,0);this._cipher=new n.AES(y);var D=this._cipher.encryptBlock(M);this._ghash=new u(D),P=(function(k,z,U){if(z.length===12)return k._finID=i.concat([z,i.from([0,0,0,1])]),i.concat([z,i.from([0,0,0,2])]);var J=new u(U),re=z.length,ee=re%16;J.update(z),ee&&(ee=16-ee,J.update(i.alloc(ee,0))),J.update(i.alloc(8,0));var ae=8*re,se=i.alloc(8);se.writeUIntBE(ae,0,8),J.update(se),k._finID=J.state;var _e=i.from(k._finID);return _(_e),_e})(this,P,D),this._prev=i.from(P),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=S,this._alen=0,this._len=0,this._mode=x,this._authTag=null,this._called=!1}d(C,s),C.prototype._update=function(x){if(!this._called&&this._alen){var y=16-this._alen%16;y<16&&(y=i.alloc(y,0),this._ghash.update(y))}this._called=!0;var P=this._mode.encrypt(this,x);return this._decrypt?this._ghash.update(x):this._ghash.update(P),this._len+=x.length,P},C.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var x=f(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&(function(y,P){var S=0;y.length!==P.length&&S++;for(var M=Math.min(y.length,P.length),D=0;D16)throw new Error("unable to decrypt data");for(var D=-1;++D16)return S=this.cache.slice(0,16),this.cache=this.cache.slice(16),S}else if(this.cache.length>=16)return S=this.cache.slice(0,16),this.cache=this.cache.slice(16),S;return null},x.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(P,S){var M=s[P.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var D=_(S,!1,M.key,M.iv);return y(P,D.key,D.iv)},t.createDecipheriv=y},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,o,t){"use strict";var n=e("./modes"),i=e("./authCipher"),s=e("safe-buffer").Buffer,d=e("./streamCipher"),u=e("cipher-base"),f=e("./aes"),_=e("evp_bytestokey");function C(S,M,D){u.call(this),this._cache=new y,this._cipher=new f.AES(M),this._prev=s.from(D),this._mode=S,this._autopadding=!0}e("inherits")(C,u),C.prototype._update=function(S){var M,D;this._cache.add(S);for(var k=[];M=this._cache.get();)D=this._mode.encrypt(this,M),k.push(D);return s.concat(k)};var x=s.alloc(16,16);function y(){this.cache=s.allocUnsafe(0)}function P(S,M,D){var k=n[S.toLowerCase()];if(!k)throw new TypeError("invalid suite type");if(typeof M=="string"&&(M=s.from(M)),M.length!==k.key/8)throw new TypeError("invalid key length "+M.length);if(typeof D=="string"&&(D=s.from(D)),k.mode!=="GCM"&&D.length!==k.iv)throw new TypeError("invalid iv length "+D.length);return k.type==="stream"?new d(k.module,M,D):k.type==="auth"?new i(k.module,M,D):new C(k.module,M,D)}C.prototype._final=function(){var S=this._cache.flush();if(this._autopadding)return S=this._mode.encrypt(this,S),this._cipher.scrub(),S;if(!S.equals(x))throw this._cipher.scrub(),new Error("data not multiple of block length")},C.prototype.setAutoPadding=function(S){return this._autopadding=!!S,this},y.prototype.add=function(S){this.cache=s.concat([this.cache,S])},y.prototype.get=function(){if(this.cache.length>15){var S=this.cache.slice(0,16);return this.cache=this.cache.slice(16),S}return null},y.prototype.flush=function(){for(var S=16-this.cache.length,M=s.allocUnsafe(S),D=-1;++D>>0,0),f.writeUInt32BE(u[1]>>>0,4),f.writeUInt32BE(u[2]>>>0,8),f.writeUInt32BE(u[3]>>>0,12),f}function d(u){this.h=u,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}d.prototype.ghash=function(u){for(var f=-1;++f0;f--)C[f]=C[f]>>>1|(1&C[f-1])<<31;C[0]=C[0]>>>1,_&&(C[0]=C[0]^225<<24)}this.state=s(x)},d.prototype.update=function(u){var f;for(this.cache=n.concat([this.cache,u]);this.cache.length>=16;)f=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(f)},d.prototype.final=function(u,f){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(s([0,u,0,f])),this.state},o.exports=d},{"safe-buffer":494}],195:[function(e,o,t){"use strict";o.exports=function(n){for(var i,s=n.length;s--;){if((i=n.readUInt8(s))!==255){i++,n.writeUInt8(i,s);break}n.writeUInt8(0,s)}}},{}],196:[function(e,o,t){"use strict";var n=e("buffer-xor");t.encrypt=function(i,s){var d=n(s,i._prev);return i._prev=i._cipher.encryptBlock(d),i._prev},t.decrypt=function(i,s){var d=i._prev;i._prev=s;var u=i._cipher.decryptBlock(s);return n(u,d)}},{"buffer-xor":219}],197:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer,i=e("buffer-xor");function s(d,u,f){var _=u.length,C=i(u,d._cache);return d._cache=d._cache.slice(_),d._prev=n.concat([d._prev,f?u:C]),C}t.encrypt=function(d,u,f){for(var _,C=n.allocUnsafe(0);u.length;){if(d._cache.length===0&&(d._cache=d._cipher.encryptBlock(d._prev),d._prev=n.allocUnsafe(0)),!(d._cache.length<=u.length)){C=n.concat([C,s(d,u,f)]);break}_=d._cache.length,C=n.concat([C,s(d,u.slice(0,_),f)]),u=u.slice(_)}return C}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer;function i(d,u,f){for(var _,C,x=-1,y=0;++x<8;)_=u&1<<7-x?128:0,y+=(128&(C=d._cipher.encryptBlock(d._prev)[0]^_))>>x%8,d._prev=s(d._prev,f?_:C);return y}function s(d,u){var f=d.length,_=-1,C=n.allocUnsafe(d.length);for(d=n.concat([d,n.from([u])]);++_>7;return C}t.encrypt=function(d,u,f){for(var _=u.length,C=n.allocUnsafe(_),x=-1;++x<_;)C[x]=i(d,u[x],f);return C}},{"safe-buffer":494}],199:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer;function i(s,d,u){var f=s._cipher.encryptBlock(s._prev)[0]^d;return s._prev=n.concat([s._prev.slice(1),n.from([u?d:f])]),f}t.encrypt=function(s,d,u){for(var f=d.length,_=n.allocUnsafe(f),C=-1;++C=0||!_.umod(f.prime1)||!_.umod(f.prime2));return _}function u(f,_){var C=(function(re){var ee=d(re);return{blinder:ee.toRed(i.mont(re.modulus)).redPow(new i(re.publicExponent)).fromRed(),unblinder:ee.invm(re.modulus)}})(_),x=_.modulus.byteLength(),y=new i(f).mul(C.blinder).umod(_.modulus),P=y.toRed(i.mont(_.prime1)),S=y.toRed(i.mont(_.prime2)),M=_.coefficient,D=_.prime1,k=_.prime2,z=P.redPow(_.exponent1).fromRed(),U=S.redPow(_.exponent2).fromRed(),J=z.isub(U).imul(M).umod(D).imul(k);return U.iadd(J).imul(C.unblinder).umod(_.modulus).toArrayLike(n,"be",x)}u.getr=d,o.exports=u}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,o,t){"use strict";o.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,o,t){o.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(e,o,t){o.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hash"),s=e("readable-stream"),d=e("inherits"),u=e("./sign"),f=e("./verify"),_=e("./algorithms.json");function C(S){s.Writable.call(this);var M=_[S];if(!M)throw new Error("Unknown message digest");this._hashType=M.hash,this._hash=i(M.hash),this._tag=M.id,this._signType=M.sign}function x(S){s.Writable.call(this);var M=_[S];if(!M)throw new Error("Unknown message digest");this._hash=i(M.hash),this._tag=M.id,this._signType=M.sign}function y(S){return new C(S)}function P(S){return new x(S)}Object.keys(_).forEach(function(S){_[S].id=n.from(_[S].id,"hex"),_[S.toLowerCase()]=_[S]}),d(C,s.Writable),C.prototype._write=function(S,M,D){this._hash.update(S),D()},C.prototype.update=function(S,M){return typeof S=="string"&&(S=n.from(S,M)),this._hash.update(S),this},C.prototype.sign=function(S,M){this.end();var D=this._hash.digest(),k=u(D,S,this._hashType,this._signType,this._tag);return M?k.toString(M):k},d(x,s.Writable),x.prototype._write=function(S,M,D){this._hash.update(S),D()},x.prototype.update=function(S,M){return typeof S=="string"&&(S=n.from(S,M)),this._hash.update(S),this},x.prototype.verify=function(S,M,D){typeof M=="string"&&(M=n.from(M,D)),this.end();var k=this._hash.digest();return f(M,k,S,this._signType,this._tag)},o.exports={Sign:y,Verify:P,createSign:y,createVerify:P}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer,i=e("create-hmac"),s=e("browserify-rsa"),d=e("elliptic").ec,u=e("bn.js"),f=e("parse-asn1"),_=e("./curves.json");function C(S,M,D,k){if((S=n.from(S.toArray())).length0&&D.ishrn(k),D}function y(S,M,D){var k,z;do{for(k=n.alloc(0);8*k.length=C)throw new Error("invalid sig")}o.exports=function(_,C,x,y,P){var S=d(x);if(S.type==="ec"){if(y!=="ecdsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");return(function(re,ee,ae){var se=u[ae.data.algorithm.curve.join(".")];if(!se)throw new Error("unknown curve "+ae.data.algorithm.curve.join("."));var _e=new s(se),de=ae.data.subjectPrivateKey.data;return _e.verify(ee,re,de)})(_,C,S)}if(S.type==="dsa"){if(y!=="dsa")throw new Error("wrong public key type");return(function(re,ee,ae){var se=ae.data.p,_e=ae.data.q,de=ae.data.g,j=ae.data.pub_key,W=d.signature.decode(re,"der"),pe=W.s,O=W.r;f(pe,_e),f(O,_e);var B=i.mont(se),L=pe.invm(_e);return de.toRed(B).redPow(new i(ee).mul(L).mod(_e)).fromRed().mul(j.toRed(B).redPow(O.mul(L).mod(_e)).fromRed()).mod(se).mod(_e).cmp(O)===0})(_,C,S)}if(y!=="rsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");C=n.concat([P,C]);for(var M=S.modulus.byteLength(),D=[1],k=0;C.length+D.length+2>5==6?2:S>>4==14?3:S>>3==30?4:S>>6==2?-1:-2}function u(S){var M=this.lastTotal-this.lastNeed,D=(function(k,z,U){if((192&z[0])!=128)return k.lastNeed=0,"\uFFFD";if(k.lastNeed>1&&z.length>1){if((192&z[1])!=128)return k.lastNeed=1,"\uFFFD";if(k.lastNeed>2&&z.length>2&&(192&z[2])!=128)return k.lastNeed=2,"\uFFFD"}})(this,S);return D!==void 0?D:this.lastNeed<=S.length?(S.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(S.copy(this.lastChar,M,0,S.length),void(this.lastNeed-=S.length))}function f(S,M){if((S.length-M)%2==0){var D=S.toString("utf16le",M);if(D){var k=D.charCodeAt(D.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=S[S.length-1],S.toString("utf16le",M,S.length-1)}function _(S){var M=S&&S.length?this.write(S):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,D)}return M}function C(S,M){var D=(S.length-M)%3;return D===0?S.toString("base64",M):(this.lastNeed=3-D,this.lastTotal=3,D===1?this.lastChar[0]=S[S.length-1]:(this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1]),S.toString("base64",M,S.length-D))}function x(S){var M=S&&S.length?this.write(S):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function y(S){return S.toString(this.encoding)}function P(S){return S&&S.length?this.write(S):""}t.StringDecoder=s,s.prototype.write=function(S){if(S.length===0)return"";var M,D;if(this.lastNeed){if((M=this.fillLast(S))===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D=0?(ee>0&&(z.lastNeed=ee-1),ee):--re=0?(ee>0&&(z.lastNeed=ee-2),ee):--re=0?(ee>0&&(ee===2?ee=0:z.lastNeed=ee-3),ee):0})(this,S,M);if(!this.lastNeed)return S.toString("utf8",M);this.lastTotal=D;var k=S.length-(D-this.lastNeed);return S.copy(this.lastChar,0,k),S.toString("utf8",M,k)},s.prototype.fillLast=function(S){if(this.lastNeed<=S.length)return S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,S.length),this.lastNeed-=S.length}},{"safe-buffer":217}],219:[function(e,o,t){(function(n){(function(){"use strict";o.exports=function(i,s){for(var d=Math.min(i.length,s.length),u=new n(d),f=0;f2147483647)throw new RangeError('The value "'+K+'" is invalid for option "size"');var Q=new Uint8Array(K);return Q.__proto__=u.prototype,Q}function u(K,Q,Ce){if(typeof K=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(K)}return f(K,Q,Ce)}function f(K,Q,Ce){if(typeof K=="string")return(function(Ye,rt){if(typeof rt=="string"&&rt!==""||(rt="utf8"),!u.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);var Qt=0|P(Ye,rt),zt=d(Qt),Qe=zt.write(Ye,rt);return Qe!==Qt&&(zt=zt.slice(0,Qe)),zt})(K,Q);if(ArrayBuffer.isView(K))return x(K);if(K==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof K);if(te(K,ArrayBuffer)||K&&te(K.buffer,ArrayBuffer))return(function(Ye,rt,Qt){if(rt<0||Ye.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|K}function P(K,Q){if(u.isBuffer(K))return K.length;if(ArrayBuffer.isView(K)||te(K,ArrayBuffer))return K.byteLength;if(typeof K!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof K);var Ce=K.length,Ve=arguments.length>2&&arguments[2]===!0;if(!Ve&&Ce===0)return 0;for(var mt=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return Ce;case"utf8":case"utf-8":return be(K).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ce;case"hex":return Ce>>>1;case"base64":return ye(K).length;default:if(mt)return Ve?-1:be(K).length;Q=(""+Q).toLowerCase(),mt=!0}}function S(K,Q,Ce){var Ve=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((Ce===void 0||Ce>this.length)&&(Ce=this.length),Ce<=0)||(Ce>>>=0)<=(Q>>>=0))return"";for(K||(K="utf8");;)switch(K){case"hex":return W(this,Q,Ce);case"utf8":case"utf-8":return _e(this,Q,Ce);case"ascii":return de(this,Q,Ce);case"latin1":case"binary":return j(this,Q,Ce);case"base64":return se(this,Q,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,Q,Ce);default:if(Ve)throw new TypeError("Unknown encoding: "+K);K=(K+"").toLowerCase(),Ve=!0}}function M(K,Q,Ce){var Ve=K[Q];K[Q]=K[Ce],K[Ce]=Ve}function D(K,Q,Ce,Ve,mt){if(K.length===0)return-1;if(typeof Ce=="string"?(Ve=Ce,Ce=0):Ce>2147483647?Ce=2147483647:Ce<-2147483648&&(Ce=-2147483648),Ae(Ce=+Ce)&&(Ce=mt?0:K.length-1),Ce<0&&(Ce=K.length+Ce),Ce>=K.length){if(mt)return-1;Ce=K.length-1}else if(Ce<0){if(!mt)return-1;Ce=0}if(typeof Q=="string"&&(Q=u.from(Q,Ve)),u.isBuffer(Q))return Q.length===0?-1:k(K,Q,Ce,Ve,mt);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?mt?Uint8Array.prototype.indexOf.call(K,Q,Ce):Uint8Array.prototype.lastIndexOf.call(K,Q,Ce):k(K,[Q],Ce,Ve,mt);throw new TypeError("val must be string, number or Buffer")}function k(K,Q,Ce,Ve,mt){var Ye,rt=1,Qt=K.length,zt=Q.length;if(Ve!==void 0&&((Ve=String(Ve).toLowerCase())==="ucs2"||Ve==="ucs-2"||Ve==="utf16le"||Ve==="utf-16le")){if(K.length<2||Q.length<2)return-1;rt=2,Qt/=2,zt/=2,Ce/=2}function Qe(Jt,ei){return rt===1?Jt[ei]:Jt.readUInt16BE(ei*rt)}if(mt){var Vt=-1;for(Ye=Ce;YeQt&&(Ce=Qt-zt),Ye=Ce;Ye>=0;Ye--){for(var Bt=!0,Ut=0;Utmt&&(Ve=mt):Ve=mt;var Ye=Q.length;Ve>Ye/2&&(Ve=Ye/2);for(var rt=0;rt>8,zt=rt%256,Qe.push(zt),Qe.push(Qt);return Qe})(Q,K.length-Ce),K,Ce,Ve)}function se(K,Q,Ce){return Q===0&&Ce===K.length?i.fromByteArray(K):i.fromByteArray(K.slice(Q,Ce))}function _e(K,Q,Ce){Ce=Math.min(K.length,Ce);for(var Ve=[],mt=Q;mt239?4:Qe>223?3:Qe>191?2:1;if(mt+Bt<=Ce)switch(Bt){case 1:Qe<128&&(Vt=Qe);break;case 2:(192&(Ye=K[mt+1]))==128&&(zt=(31&Qe)<<6|63&Ye)>127&&(Vt=zt);break;case 3:Ye=K[mt+1],rt=K[mt+2],(192&Ye)==128&&(192&rt)==128&&(zt=(15&Qe)<<12|(63&Ye)<<6|63&rt)>2047&&(zt<55296||zt>57343)&&(Vt=zt);break;case 4:Ye=K[mt+1],rt=K[mt+2],Qt=K[mt+3],(192&Ye)==128&&(192&rt)==128&&(192&Qt)==128&&(zt=(15&Qe)<<18|(63&Ye)<<12|(63&rt)<<6|63&Qt)>65535&&zt<1114112&&(Vt=zt)}Vt===null?(Vt=65533,Bt=1):Vt>65535&&(Vt-=65536,Ve.push(Vt>>>10&1023|55296),Vt=56320|1023&Vt),Ve.push(Vt),mt+=Bt}return(function(Ut){var Jt=Ut.length;if(Jt<=4096)return String.fromCharCode.apply(String,Ut);for(var ei="",ni=0;ni"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(K,Q,Ce){return f(K,Q,Ce)},u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,u.alloc=function(K,Q,Ce){return(function(Ve,mt,Ye){return _(Ve),Ve<=0?d(Ve):mt!==void 0?typeof Ye=="string"?d(Ve).fill(mt,Ye):d(Ve).fill(mt):d(Ve)})(K,Q,Ce)},u.allocUnsafe=function(K){return C(K)},u.allocUnsafeSlow=function(K){return C(K)},u.isBuffer=function(K){return K!=null&&K._isBuffer===!0&&K!==u.prototype},u.compare=function(K,Q){if(te(K,Uint8Array)&&(K=u.from(K,K.offset,K.byteLength)),te(Q,Uint8Array)&&(Q=u.from(Q,Q.offset,Q.byteLength)),!u.isBuffer(K)||!u.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(K===Q)return 0;for(var Ce=K.length,Ve=Q.length,mt=0,Ye=Math.min(Ce,Ve);mtQ&&(K+=" ... "),""},u.prototype.compare=function(K,Q,Ce,Ve,mt){if(te(K,Uint8Array)&&(K=u.from(K,K.offset,K.byteLength)),!u.isBuffer(K))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof K);if(Q===void 0&&(Q=0),Ce===void 0&&(Ce=K?K.length:0),Ve===void 0&&(Ve=0),mt===void 0&&(mt=this.length),Q<0||Ce>K.length||Ve<0||mt>this.length)throw new RangeError("out of range index");if(Ve>=mt&&Q>=Ce)return 0;if(Ve>=mt)return-1;if(Q>=Ce)return 1;if(this===K)return 0;for(var Ye=(mt>>>=0)-(Ve>>>=0),rt=(Ce>>>=0)-(Q>>>=0),Qt=Math.min(Ye,rt),zt=this.slice(Ve,mt),Qe=K.slice(Q,Ce),Vt=0;Vt>>=0,isFinite(Ce)?(Ce>>>=0,Ve===void 0&&(Ve="utf8")):(Ve=Ce,Ce=void 0)}var mt=this.length-Q;if((Ce===void 0||Ce>mt)&&(Ce=mt),K.length>0&&(Ce<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var Ye=!1;;)switch(Ve){case"hex":return z(this,K,Q,Ce);case"utf8":case"utf-8":return U(this,K,Q,Ce);case"ascii":return J(this,K,Q,Ce);case"latin1":case"binary":return re(this,K,Q,Ce);case"base64":return ee(this,K,Q,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,K,Q,Ce);default:if(Ye)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).toLowerCase(),Ye=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function de(K,Q,Ce){var Ve="";Ce=Math.min(K.length,Ce);for(var mt=Q;mtVe)&&(Ce=Ve);for(var mt="",Ye=Q;YeCe)throw new RangeError("Trying to access beyond buffer length")}function B(K,Q,Ce,Ve,mt,Ye){if(!u.isBuffer(K))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>mt||QK.length)throw new RangeError("Index out of range")}function L(K,Q,Ce,Ve,mt,Ye){if(Ce+Ve>K.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("Index out of range")}function N(K,Q,Ce,Ve,mt){return Q=+Q,Ce>>>=0,mt||L(K,0,Ce,4),s.write(K,Q,Ce,Ve,23,4),Ce+4}function G(K,Q,Ce,Ve,mt){return Q=+Q,Ce>>>=0,mt||L(K,0,Ce,8),s.write(K,Q,Ce,Ve,52,8),Ce+8}u.prototype.slice=function(K,Q){var Ce=this.length;(K=~~K)<0?(K+=Ce)<0&&(K=0):K>Ce&&(K=Ce),(Q=Q===void 0?Ce:~~Q)<0?(Q+=Ce)<0&&(Q=0):Q>Ce&&(Q=Ce),Q>>=0,Q>>>=0,Ce||O(K,Q,this.length);for(var Ve=this[K],mt=1,Ye=0;++Ye>>=0,Q>>>=0,Ce||O(K,Q,this.length);for(var Ve=this[K+--Q],mt=1;Q>0&&(mt*=256);)Ve+=this[K+--Q]*mt;return Ve},u.prototype.readUInt8=function(K,Q){return K>>>=0,Q||O(K,1,this.length),this[K]},u.prototype.readUInt16LE=function(K,Q){return K>>>=0,Q||O(K,2,this.length),this[K]|this[K+1]<<8},u.prototype.readUInt16BE=function(K,Q){return K>>>=0,Q||O(K,2,this.length),this[K]<<8|this[K+1]},u.prototype.readUInt32LE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),(this[K]|this[K+1]<<8|this[K+2]<<16)+16777216*this[K+3]},u.prototype.readUInt32BE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),16777216*this[K]+(this[K+1]<<16|this[K+2]<<8|this[K+3])},u.prototype.readIntLE=function(K,Q,Ce){K>>>=0,Q>>>=0,Ce||O(K,Q,this.length);for(var Ve=this[K],mt=1,Ye=0;++Ye=(mt*=128)&&(Ve-=Math.pow(2,8*Q)),Ve},u.prototype.readIntBE=function(K,Q,Ce){K>>>=0,Q>>>=0,Ce||O(K,Q,this.length);for(var Ve=Q,mt=1,Ye=this[K+--Ve];Ve>0&&(mt*=256);)Ye+=this[K+--Ve]*mt;return Ye>=(mt*=128)&&(Ye-=Math.pow(2,8*Q)),Ye},u.prototype.readInt8=function(K,Q){return K>>>=0,Q||O(K,1,this.length),128&this[K]?-1*(255-this[K]+1):this[K]},u.prototype.readInt16LE=function(K,Q){K>>>=0,Q||O(K,2,this.length);var Ce=this[K]|this[K+1]<<8;return 32768&Ce?4294901760|Ce:Ce},u.prototype.readInt16BE=function(K,Q){K>>>=0,Q||O(K,2,this.length);var Ce=this[K+1]|this[K]<<8;return 32768&Ce?4294901760|Ce:Ce},u.prototype.readInt32LE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24},u.prototype.readInt32BE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]},u.prototype.readFloatLE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),s.read(this,K,!0,23,4)},u.prototype.readFloatBE=function(K,Q){return K>>>=0,Q||O(K,4,this.length),s.read(this,K,!1,23,4)},u.prototype.readDoubleLE=function(K,Q){return K>>>=0,Q||O(K,8,this.length),s.read(this,K,!0,52,8)},u.prototype.readDoubleBE=function(K,Q){return K>>>=0,Q||O(K,8,this.length),s.read(this,K,!1,52,8)},u.prototype.writeUIntLE=function(K,Q,Ce,Ve){K=+K,Q>>>=0,Ce>>>=0,Ve||B(this,K,Q,Ce,Math.pow(2,8*Ce)-1,0);var mt=1,Ye=0;for(this[Q]=255&K;++Ye>>=0,Ce>>>=0,Ve||B(this,K,Q,Ce,Math.pow(2,8*Ce)-1,0);var mt=Ce-1,Ye=1;for(this[Q+mt]=255&K;--mt>=0&&(Ye*=256);)this[Q+mt]=K/Ye&255;return Q+Ce},u.prototype.writeUInt8=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,1,255,0),this[Q]=255&K,Q+1},u.prototype.writeUInt16LE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,2,65535,0),this[Q]=255&K,this[Q+1]=K>>>8,Q+2},u.prototype.writeUInt16BE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,2,65535,0),this[Q]=K>>>8,this[Q+1]=255&K,Q+2},u.prototype.writeUInt32LE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,4,4294967295,0),this[Q+3]=K>>>24,this[Q+2]=K>>>16,this[Q+1]=K>>>8,this[Q]=255&K,Q+4},u.prototype.writeUInt32BE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,4,4294967295,0),this[Q]=K>>>24,this[Q+1]=K>>>16,this[Q+2]=K>>>8,this[Q+3]=255&K,Q+4},u.prototype.writeIntLE=function(K,Q,Ce,Ve){if(K=+K,Q>>>=0,!Ve){var mt=Math.pow(2,8*Ce-1);B(this,K,Q,Ce,mt-1,-mt)}var Ye=0,rt=1,Qt=0;for(this[Q]=255&K;++Ye>0)-Qt&255;return Q+Ce},u.prototype.writeIntBE=function(K,Q,Ce,Ve){if(K=+K,Q>>>=0,!Ve){var mt=Math.pow(2,8*Ce-1);B(this,K,Q,Ce,mt-1,-mt)}var Ye=Ce-1,rt=1,Qt=0;for(this[Q+Ye]=255&K;--Ye>=0&&(rt*=256);)K<0&&Qt===0&&this[Q+Ye+1]!==0&&(Qt=1),this[Q+Ye]=(K/rt>>0)-Qt&255;return Q+Ce},u.prototype.writeInt8=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,1,127,-128),K<0&&(K=255+K+1),this[Q]=255&K,Q+1},u.prototype.writeInt16LE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,2,32767,-32768),this[Q]=255&K,this[Q+1]=K>>>8,Q+2},u.prototype.writeInt16BE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,2,32767,-32768),this[Q]=K>>>8,this[Q+1]=255&K,Q+2},u.prototype.writeInt32LE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,4,2147483647,-2147483648),this[Q]=255&K,this[Q+1]=K>>>8,this[Q+2]=K>>>16,this[Q+3]=K>>>24,Q+4},u.prototype.writeInt32BE=function(K,Q,Ce){return K=+K,Q>>>=0,Ce||B(this,K,Q,4,2147483647,-2147483648),K<0&&(K=4294967295+K+1),this[Q]=K>>>24,this[Q+1]=K>>>16,this[Q+2]=K>>>8,this[Q+3]=255&K,Q+4},u.prototype.writeFloatLE=function(K,Q,Ce){return N(this,K,Q,!0,Ce)},u.prototype.writeFloatBE=function(K,Q,Ce){return N(this,K,Q,!1,Ce)},u.prototype.writeDoubleLE=function(K,Q,Ce){return G(this,K,Q,!0,Ce)},u.prototype.writeDoubleBE=function(K,Q,Ce){return G(this,K,Q,!1,Ce)},u.prototype.copy=function(K,Q,Ce,Ve){if(!u.isBuffer(K))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),Ve||Ve===0||(Ve=this.length),Q>=K.length&&(Q=K.length),Q||(Q=0),Ve>0&&Ve=this.length)throw new RangeError("Index out of range");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),K.length-Q=0;--Ye)K[Ye+Q]=this[Ye+Ce];else Uint8Array.prototype.set.call(K,this.subarray(Ce,Ve),Q);return mt},u.prototype.fill=function(K,Q,Ce,Ve){if(typeof K=="string"){if(typeof Q=="string"?(Ve=Q,Q=0,Ce=this.length):typeof Ce=="string"&&(Ve=Ce,Ce=this.length),Ve!==void 0&&typeof Ve!="string")throw new TypeError("encoding must be a string");if(typeof Ve=="string"&&!u.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve);if(K.length===1){var mt=K.charCodeAt(0);(Ve==="utf8"&&mt<128||Ve==="latin1")&&(K=mt)}}else typeof K=="number"&&(K&=255);if(Q<0||this.length>>=0,Ce=Ce===void 0?this.length:Ce>>>0,K||(K=0),typeof K=="number")for(Ye=Q;Ye55295&&Ce<57344){if(!mt){if(Ce>56319){(Q-=3)>-1&&Ye.push(239,191,189);continue}if(rt+1===Ve){(Q-=3)>-1&&Ye.push(239,191,189);continue}mt=Ce;continue}if(Ce<56320){(Q-=3)>-1&&Ye.push(239,191,189),mt=Ce;continue}Ce=65536+(mt-55296<<10|Ce-56320)}else mt&&(Q-=3)>-1&&Ye.push(239,191,189);if(mt=null,Ce<128){if((Q-=1)<0)break;Ye.push(Ce)}else if(Ce<2048){if((Q-=2)<0)break;Ye.push(Ce>>6|192,63&Ce|128)}else if(Ce<65536){if((Q-=3)<0)break;Ye.push(Ce>>12|224,Ce>>6&63|128,63&Ce|128)}else{if(!(Ce<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;Ye.push(Ce>>18|240,Ce>>12&63|128,Ce>>6&63|128,63&Ce|128)}}return Ye}function ye(K){return i.toByteArray((function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace($,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q})(K))}function Ne(K,Q,Ce,Ve){for(var mt=0;mt=Q.length||mt>=K.length);++mt)Q[mt+Ce]=K[mt];return mt}function te(K,Q){return K instanceof Q||K!=null&&K.constructor!=null&&K.constructor.name!=null&&K.constructor.name===Q.name}function Ae(K){return K!=K}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,o,t){"use strict";var n=e("safe-buffer").Buffer,i=e("stream").Transform,s=e("string_decoder").StringDecoder;function d(u){i.call(this),this.hashMode=typeof u=="string",this.hashMode?this[u]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(d,i),d.prototype.update=function(u,f,_){typeof u=="string"&&(u=n.from(u,f));var C=this._update(u);return this.hashMode?this:(_&&(C=this._toString(C,_)),C)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(u,f,_){var C;try{this.hashMode?this._update(u):this.push(this._update(u))}catch(x){C=x}finally{_(C)}},d.prototype._flush=function(u){var f;try{this.push(this.__final())}catch(_){f=_}u(f)},d.prototype._finalOrDigest=function(u){var f=this.__final()||n.alloc(0);return u&&(f=this._toString(f,u,!0)),f},d.prototype._toString=function(u,f,_){if(this._decoder||(this._decoder=new s(f),this._encoding=f),this._encoding!==f)throw new Error("can't switch encodings");var C=this._decoder.write(u);return _&&(C+=this._decoder.end()),C},o.exports=d},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,o,t){"use strict";var n=e("../internals/is-callable"),i=e("../internals/try-to-string"),s=TypeError;o.exports=function(d){if(n(d))return d;throw new s(i(d)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,o,t){"use strict";var n=e("../internals/is-constructor"),i=e("../internals/try-to-string"),s=TypeError;o.exports=function(d){if(n(d))return d;throw new s(i(d)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,o,t){"use strict";var n=e("../internals/is-callable"),i=String,s=TypeError;o.exports=function(d){if(typeof d=="object"||n(d))return d;throw new s("Can't set "+i(d)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,o,t){"use strict";var n=e("../internals/well-known-symbol"),i=e("../internals/object-create"),s=e("../internals/object-define-property").f,d=n("unscopables"),u=Array.prototype;u[d]===void 0&&s(u,d,{configurable:!0,value:i(null)}),o.exports=function(f){u[d][f]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,o,t){"use strict";var n=e("../internals/object-is-prototype-of"),i=TypeError;o.exports=function(s,d){if(n(d,s))return s;throw new i("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,o,t){"use strict";var n=e("../internals/is-object"),i=String,s=TypeError;o.exports=function(d){if(n(d))return d;throw new s(i(d)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,o,t){"use strict";var n=e("../internals/to-indexed-object"),i=e("../internals/to-absolute-index"),s=e("../internals/length-of-array-like"),d=function(u){return function(f,_,C){var x,y=n(f),P=s(y),S=i(C,P);if(u&&_!=_){for(;P>S;)if((x=y[S++])!=x)return!0}else for(;P>S;S++)if((u||S in y)&&y[S]===_)return u||S||0;return!u&&-1}};o.exports={includes:d(!0),indexOf:d(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,o,t){"use strict";var n=e("../internals/function-bind-context"),i=e("../internals/function-uncurry-this"),s=e("../internals/indexed-object"),d=e("../internals/to-object"),u=e("../internals/length-of-array-like"),f=e("../internals/array-species-create"),_=i([].push),C=function(x){var y=x===1,P=x===2,S=x===3,M=x===4,D=x===6,k=x===7,z=x===5||D;return function(U,J,re,ee){for(var ae,se,_e=d(U),de=s(_e),j=n(J,re),W=u(de),pe=0,O=ee||f,B=y?O(U,W):P||k?O(U,0):void 0;W>pe;pe++)if((z||pe in de)&&(se=j(ae=de[pe],pe,_e),x))if(y)B[pe]=se;else if(se)switch(x){case 3:return!0;case 5:return ae;case 6:return pe;case 2:_(B,ae)}else switch(x){case 4:return!1;case 7:_(B,ae)}return D?-1:S||M?M:B}};o.exports={forEach:C(0),map:C(1),filter:C(2),some:C(3),every:C(4),find:C(5),findIndex:C(6),filterReject:C(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(e,o,t){"use strict";var n=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like"),s=e("../internals/create-property"),d=Array,u=Math.max;o.exports=function(f,_,C){for(var x=i(f),y=n(_,x),P=n(C===void 0?x:C,x),S=d(u(P-y,0)),M=0;y0&&n[0]<4?1:+(n[0]+n[1])),!i&&d&&(!(n=d.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=d.match(/Chrome\/(\d+)/))&&(i=+n[1]),o.exports=i},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,o,t){"use strict";o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,o,t){"use strict";var n=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,s=e("../internals/create-non-enumerable-property"),d=e("../internals/define-built-in"),u=e("../internals/define-global-property"),f=e("../internals/copy-constructor-properties"),_=e("../internals/is-forced");o.exports=function(C,x){var y,P,S,M,D,k=C.target,z=C.global,U=C.stat;if(y=z?n:U?n[k]||u(k,{}):(n[k]||{}).prototype)for(P in x){if(M=x[P],S=C.dontCallGetSet?(D=i(y,P))&&D.value:y[P],!_(z?P:k+(U?".":"#")+P,C.forced)&&S!==void 0){if(typeof M==typeof S)continue;f(M,S)}(C.sham||S&&S.sham)&&s(M,"sham",!0),d(y,P,M,C)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(e,o,t){"use strict";o.exports=function(n){try{return!!n()}catch{return!0}}},{}],261:[function(e,o,t){"use strict";var n=e("../internals/function-bind-native"),i=Function.prototype,s=i.apply,d=i.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(n?d.bind(s):function(){return d.apply(s,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,o,t){"use strict";var n=e("../internals/function-uncurry-this-clause"),i=e("../internals/a-callable"),s=e("../internals/function-bind-native"),d=n(n.bind);o.exports=function(u,f){return i(u),f===void 0?u:s?d(u,f):function(){return u.apply(f,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,o,t){"use strict";var n=e("../internals/fails");o.exports=!n(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(e,o,t){"use strict";var n=e("../internals/function-bind-native"),i=Function.prototype.call;o.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,o,t){"use strict";var n=e("../internals/descriptors"),i=e("../internals/has-own-property"),s=Function.prototype,d=n&&Object.getOwnPropertyDescriptor,u=i(s,"name"),f=u&&function(){}.name==="something",_=u&&(!n||n&&d(s,"name").configurable);o.exports={EXISTS:u,PROPER:f,CONFIGURABLE:_}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,o,t){"use strict";var n=e("../internals/function-uncurry-this"),i=e("../internals/a-callable");o.exports=function(s,d,u){try{return n(i(Object.getOwnPropertyDescriptor(s,d)[u]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,o,t){"use strict";var n=e("../internals/classof-raw"),i=e("../internals/function-uncurry-this");o.exports=function(s){if(n(s)==="Function")return i(s)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,o,t){"use strict";var n=e("../internals/function-bind-native"),i=Function.prototype,s=i.call,d=n&&i.bind.bind(s,s);o.exports=n?d:function(u){return function(){return s.apply(u,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,o,t){"use strict";var n=e("../internals/global"),i=e("../internals/is-callable"),s=function(d){return i(d)?d:void 0};o.exports=function(d,u){return arguments.length<2?s(n[d]):n[d]&&n[d][u]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,o,t){"use strict";var n=e("../internals/classof"),i=e("../internals/get-method"),s=e("../internals/is-null-or-undefined"),d=e("../internals/iterators"),u=e("../internals/well-known-symbol")("iterator");o.exports=function(f){if(!s(f))return i(f,u)||i(f,"@@iterator")||d[n(f)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,o,t){"use strict";var n=e("../internals/function-call"),i=e("../internals/a-callable"),s=e("../internals/an-object"),d=e("../internals/try-to-string"),u=e("../internals/get-iterator-method"),f=TypeError;o.exports=function(_,C){var x=arguments.length<2?u(_):C;if(i(x))return s(n(x,_));throw new f(d(_)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(e,o,t){"use strict";var n=e("../internals/function-uncurry-this"),i=e("../internals/is-array"),s=e("../internals/is-callable"),d=e("../internals/classof-raw"),u=e("../internals/to-string"),f=n([].push);o.exports=function(_){if(s(_))return _;if(i(_)){for(var C=_.length,x=[],y=0;yre;re++)if((ae=N(D[re]))&&_(M,ae))return ae;return new S(!1)}U=C(D,J)}for(se=W?D.next:U.next;!(_e=i(se,U)).done;){try{ae=N(_e.value)}catch(G){y(U,"throw",G)}if(typeof ae=="object"&&ae&&_(M,ae))return ae}return new S(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(e,o,t){"use strict";var n=e("../internals/function-call"),i=e("../internals/an-object"),s=e("../internals/get-method");o.exports=function(d,u,f){var _,C;i(d);try{if(!(_=s(d,"return"))){if(u==="throw")throw f;return f}_=n(_,d)}catch(x){C=!0,_=x}if(u==="throw")throw f;if(C)throw _;return i(_),f}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,o,t){"use strict";var n=e("../internals/iterators-core").IteratorPrototype,i=e("../internals/object-create"),s=e("../internals/create-property-descriptor"),d=e("../internals/set-to-string-tag"),u=e("../internals/iterators"),f=function(){return this};o.exports=function(_,C,x,y){var P=C+" Iterator";return _.prototype=i(n,{next:s(+!y,x)}),d(_,P,!1,!0),u[P]=f,_}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(e,o,t){"use strict";var n=e("../internals/export"),i=e("../internals/function-call"),s=e("../internals/is-pure"),d=e("../internals/function-name"),u=e("../internals/is-callable"),f=e("../internals/iterator-create-constructor"),_=e("../internals/object-get-prototype-of"),C=e("../internals/object-set-prototype-of"),x=e("../internals/set-to-string-tag"),y=e("../internals/create-non-enumerable-property"),P=e("../internals/define-built-in"),S=e("../internals/well-known-symbol"),M=e("../internals/iterators"),D=e("../internals/iterators-core"),k=d.PROPER,z=d.CONFIGURABLE,U=D.IteratorPrototype,J=D.BUGGY_SAFARI_ITERATORS,re=S("iterator"),ee=function(){return this};o.exports=function(ae,se,_e,de,j,W,pe){f(_e,se,de);var O,B,L,N=function(te){if(te===j&&ye)return ye;if(!J&&te&&te in ne)return ne[te];switch(te){case"keys":case"values":case"entries":return function(){return new _e(this,te)}}return function(){return new _e(this)}},G=se+" Iterator",$=!1,ne=ae.prototype,be=ne[re]||ne["@@iterator"]||j&&ne[j],ye=!J&&be||N(j),Ne=se==="Array"&&ne.entries||be;if(Ne&&(O=_(Ne.call(new ae)))!==Object.prototype&&O.next&&(s||_(O)===U||(C?C(O,U):u(O[re])||P(O,re,ee)),x(O,G,!0,!0),s&&(M[G]=ee)),k&&j==="values"&&be&&be.name!=="values"&&(!s&&z?y(ne,"name","values"):($=!0,ye=function(){return i(be,this)})),j)if(B={values:N("values"),keys:W?ye:N("keys"),entries:N("entries")},pe)for(L in B)(J||$||!(L in ne))&&P(ne,L,B[L]);else n({target:se,proto:!0,forced:J||$},B);return s&&!pe||ne[re]===ye||P(ne,re,ye,{name:j}),M[se]=ye,B}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(e,o,t){"use strict";var n,i,s,d=e("../internals/fails"),u=e("../internals/is-callable"),f=e("../internals/is-object"),_=e("../internals/object-create"),C=e("../internals/object-get-prototype-of"),x=e("../internals/define-built-in"),y=e("../internals/well-known-symbol"),P=e("../internals/is-pure"),S=y("iterator"),M=!1;[].keys&&("next"in(s=[].keys())?(i=C(C(s)))!==Object.prototype&&(n=i):M=!0),!f(n)||d(function(){var D={};return n[S].call(D)!==D})?n={}:P&&(n=_(n)),u(n[S])||x(n,S,function(){return this}),o.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:M}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(e,o,t){arguments[4][276][0].apply(t,arguments)},{dup:276}],299:[function(e,o,t){"use strict";var n=e("../internals/to-length");o.exports=function(i){return n(i.length)}},{"../internals/to-length":343}],300:[function(e,o,t){"use strict";var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),s=e("../internals/is-callable"),d=e("../internals/has-own-property"),u=e("../internals/descriptors"),f=e("../internals/function-name").CONFIGURABLE,_=e("../internals/inspect-source"),C=e("../internals/internal-state"),x=C.enforce,y=C.get,P=String,S=Object.defineProperty,M=n("".slice),D=n("".replace),k=n([].join),z=u&&!i(function(){return S(function(){},"length",{value:8}).length!==8}),U=String(String).split("String"),J=o.exports=function(re,ee,ae){M(P(ee),0,7)==="Symbol("&&(ee="["+D(P(ee),/^Symbol\(([^)]*)\)/,"$1")+"]"),ae&&ae.getter&&(ee="get "+ee),ae&&ae.setter&&(ee="set "+ee),(!d(re,"name")||f&&re.name!==ee)&&(u?S(re,"name",{value:ee,configurable:!0}):re.name=ee),z&&ae&&d(ae,"arity")&&re.length!==ae.arity&&S(re,"length",{value:ae.arity});try{ae&&d(ae,"constructor")&&ae.constructor?u&&S(re,"prototype",{writable:!1}):re.prototype&&(re.prototype=void 0)}catch{}var se=x(re);return d(se,"source")||(se.source=k(U,typeof ee=="string"?ee:"")),re};Function.prototype.toString=J(function(){return s(this)&&y(this).source||_(this)},"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(e,o,t){"use strict";var n=Math.ceil,i=Math.floor;o.exports=Math.trunc||function(s){var d=+s;return(d>0?i:n)(d)}},{}],302:[function(e,o,t){"use strict";var n,i,s,d,u,f=e("../internals/global"),_=e("../internals/function-bind-context"),C=e("../internals/object-get-own-property-descriptor").f,x=e("../internals/task").set,y=e("../internals/queue"),P=e("../internals/engine-is-ios"),S=e("../internals/engine-is-ios-pebble"),M=e("../internals/engine-is-webos-webkit"),D=e("../internals/engine-is-node"),k=f.MutationObserver||f.WebKitMutationObserver,z=f.document,U=f.process,J=f.Promise,re=C(f,"queueMicrotask"),ee=re&&re.value;if(!ee){var ae=new y,se=function(){var _e,de;for(D&&(_e=U.domain)&&_e.exit();de=ae.get();)try{de()}catch(j){throw ae.head&&n(),j}_e&&_e.enter()};P||D||M||!k||!z?!S&&J&&J.resolve?((d=J.resolve(void 0)).constructor=J,u=_(d.then,d),n=function(){u(se)}):D?n=function(){U.nextTick(se)}:(x=_(x,f),n=function(){x(se)}):(i=!0,s=z.createTextNode(""),new k(se).observe(s,{characterData:!0}),n=function(){s.data=i=!i}),ee=function(_e){ae.head||n(),ae.add(_e)}}o.exports=ee},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(e,o,t){"use strict";var n=e("../internals/a-callable"),i=TypeError,s=function(d){var u,f;this.promise=new d(function(_,C){if(u!==void 0||f!==void 0)throw new i("Bad Promise constructor");u=_,f=C}),this.resolve=n(u),this.reject=n(f)};o.exports.f=function(d){return new s(d)}},{"../internals/a-callable":222}],304:[function(e,o,t){"use strict";var n=e("../internals/is-regexp"),i=TypeError;o.exports=function(s){if(n(s))throw new i("The method doesn't accept regular expressions");return s}},{"../internals/is-regexp":291}],305:[function(e,o,t){"use strict";var n=e("../internals/descriptors"),i=e("../internals/function-uncurry-this"),s=e("../internals/function-call"),d=e("../internals/fails"),u=e("../internals/object-keys"),f=e("../internals/object-get-own-property-symbols"),_=e("../internals/object-property-is-enumerable"),C=e("../internals/to-object"),x=e("../internals/indexed-object"),y=Object.assign,P=Object.defineProperty,S=i([].concat);o.exports=!y||d(function(){if(n&&y({b:1},y(P({},"a",{enumerable:!0,get:function(){P(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},D={},k=Symbol("assign detection");return M[k]=7,"abcdefghijklmnopqrst".split("").forEach(function(z){D[z]=z}),y({},M)[k]!==7||u(y({},D)).join("")!=="abcdefghijklmnopqrst"})?function(M,D){for(var k=C(M),z=arguments.length,U=1,J=f.f,re=_.f;z>U;)for(var ee,ae=x(arguments[U++]),se=J?S(u(ae),J(ae)):u(ae),_e=se.length,de=0;_e>de;)ee=se[de++],n&&!s(re,ae,ee)||(k[ee]=ae[ee]);return k}:y},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(e,o,t){"use strict";var n,i=e("../internals/an-object"),s=e("../internals/object-define-properties"),d=e("../internals/enum-bug-keys"),u=e("../internals/hidden-keys"),f=e("../internals/html"),_=e("../internals/document-create-element"),C=e("../internals/shared-key"),x=C("IE_PROTO"),y=function(){},P=function(D){return"