From 1473d5eab8da9e5fd433e6c49ba3bda47620c614 Mon Sep 17 00:00:00 2001 From: IOhacker <46640258+IOhacker@users.noreply.github.com> Date: Sat, 24 Jan 2026 05:48:20 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20openMF/w?= =?UTF-8?q?eb-app@47951f241d9421fd3351546332662431e32ada87=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s => account-transfers.module-I2AUZ5I3.js} | 2 +- .../{chunk-2TCTDLYI.js => chunk-4LRUVBWU.js} | 2 +- .../{chunk-H57SRJU3.js => chunk-HSO7PUER.js} | 2 +- .../{chunk-DQ5ARSNI.js => chunk-L23REQE4.js} | 2 +- .../{chunk-6VWRXOOR.js => chunk-M2LEJORY.js} | 2 +- .../{chunk-GO3DT7AZ.js => chunk-N4NIFIJT.js} | 2 +- .../{chunk-T23EOHOO.js => chunk-V57SPJXE.js} | 2 +- .../{chunk-MPQURN5W.js => chunk-YFBSP33D.js} | 2 +- ...TBES.js => collaterals.module-F5CJKWNO.js} | 2 +- ...2.js => fixed-deposits.module-J2CODHEZ.js} | 4 +- browser/index.html | 2 +- ...e-W4P4LL7U.js => loans.module-MKUMWPPG.js} | 4 +- browser/main.js | 38 +++++++++---------- ... => recurring-deposits.module-WOKA4SXQ.js} | 2 +- ...2UTBN64A.js => savings.module-FEA35DY3.js} | 4 +- ...-ORHEO2AA.js => shares.module-LUCTNZUK.js} | 2 +- 16 files changed, 37 insertions(+), 37 deletions(-) rename browser/{account-transfers.module-TBVTO44T.js => account-transfers.module-I2AUZ5I3.js} (99%) rename browser/{chunk-2TCTDLYI.js => chunk-4LRUVBWU.js} (81%) rename browser/{chunk-H57SRJU3.js => chunk-HSO7PUER.js} (91%) rename browser/{chunk-DQ5ARSNI.js => chunk-L23REQE4.js} (99%) rename browser/{chunk-6VWRXOOR.js => chunk-M2LEJORY.js} (97%) rename browser/{chunk-GO3DT7AZ.js => chunk-N4NIFIJT.js} (97%) rename browser/{chunk-T23EOHOO.js => chunk-V57SPJXE.js} (89%) rename browser/{chunk-MPQURN5W.js => chunk-YFBSP33D.js} (99%) rename browser/{collaterals.module-CROVTBES.js => collaterals.module-F5CJKWNO.js} (99%) rename browser/{fixed-deposits.module-V2B6ZSI2.js => fixed-deposits.module-J2CODHEZ.js} (99%) rename browser/{loans.module-W4P4LL7U.js => loans.module-MKUMWPPG.js} (99%) rename browser/{recurring-deposits.module-ME5CQCIJ.js => recurring-deposits.module-WOKA4SXQ.js} (99%) rename browser/{savings.module-2UTBN64A.js => savings.module-FEA35DY3.js} (99%) rename browser/{shares.module-ORHEO2AA.js => shares.module-LUCTNZUK.js} (99%) diff --git a/browser/account-transfers.module-TBVTO44T.js b/browser/account-transfers.module-I2AUZ5I3.js similarity index 99% rename from browser/account-transfers.module-TBVTO44T.js rename to browser/account-transfers.module-I2AUZ5I3.js index 1a80b5478..e36ce77cb 100644 --- a/browser/account-transfers.module-TBVTO44T.js +++ b/browser/account-transfers.module-I2AUZ5I3.js @@ -1 +1 @@ -import{a as B}from"./chunk-6VWRXOOR.js";import{$a as he,$c as it,$d as vt,Ae as yt,Af as Kt,Cc as Ae,Da as N,Dd as Z,Df as Ot,Ea as q,Eb as V,Ed as ct,Fd as Pe,G as j,Ga as F,H as Rt,Hd as pt,Ia as h,Id as tt,Ja as x,Jd as Ht,Je as Ve,K as T,Kd as et,Ke as Re,L as b,Lc as R,Ld as mt,M as S,Na as Mt,Nc as Me,Nd as dt,Oa as kt,Pa as Bt,Pd as Ne,Qa as M,Qd as ut,Rd as ft,Rg as Ge,Sc as ht,Sd as _t,Tc as J,Ua as r,Ud as Ct,Va as c,Wa as u,We as Et,Xa as g,Xd as W,Ya as Te,Yc as K,Zc as I,_ as ce,_a as xe,_c as X,ab as be,bb as O,ca as e,cd as Ft,dd as ke,de as qe,eb as G,ed as at,eg as Le,fb as nt,fd as bt,gc as $,gd as Be,gg as He,hb as o,hd as rt,hg as $e,ib as l,ig as Ue,ja as P,jb as wt,jc as xt,ka as Lt,kc as Y,kd as ot,mc as pe,md as we,na as y,nd as lt,nf as $t,of as Ut,pa as At,pb as Se,pd as Fe,pf as zt,qb as ye,qc as Q,ra as C,rd as St,rf as Gt,sa as v,sb as Ee,sd as Oe,sf as jt,ta as E,td as L,ua as D,ud as U,uf as Qt,va as A,vf as Wt,vg as ze,wa as d,xa as a,xd as z,xf as Yt,ya as n,yf as Jt,za as _,zb as De,zd as st}from"./chunk-MPQURN5W.js";import{a as qt,b as Vt}from"./chunk-PHUH23IY.js";var Ye=()=>["../","edit"],Je=()=>["../","list-account-transactions"];function Ke(t,p){t&1&&(a(0,"button",1),r(1),o(2,"translate"),n()),t&2&&(d("routerLink",G(4,Je)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Xe(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ze(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Zt=(()=>{class t{constructor(){this.route=T($),this.allowclientedit=!1,this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){m&1&&(a(0,"div",0)(1,"button",1),_(2,"fa-icon",2),r(3),o(4,"translate"),n(),y(5,Ke,3,5,"button",3),n(),a(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),n(),_(12,"mat-divider",7),a(13,"div",8)(14,"span",9),r(15),o(16,"translate"),n(),a(17,"span",10),r(18),n()(),a(19,"div",8)(20,"span",9),r(21),o(22,"translate"),n(),a(23,"span",10),r(24),n()(),a(25,"div",8)(26,"span",9),r(27),o(28,"translate"),n(),a(29,"span",10),r(30),n()(),a(31,"div",8)(32,"span",9),r(33),o(34,"translate"),n(),a(35,"span",10),r(36),n()(),a(37,"div",8)(38,"span",9),r(39),o(40,"translate"),n(),a(41,"span",10),r(42),n()(),a(43,"div",8)(44,"span",9),r(45),o(46,"translate"),n(),a(47,"span",10),r(48),n()(),a(49,"div",8)(50,"span",9),r(51),o(52,"translate"),n(),a(53,"span",10),C(54,Xe,3,3,"span"),C(55,Ze,3,3,"span"),n()(),a(56,"div",8)(57,"span",9),r(58),o(59,"translate"),n(),a(60,"span",10),r(61),n()(),a(62,"div",8)(63,"span",9),r(64),o(65,"translate"),n(),a(66,"span",10),r(67),n()(),a(68,"div",8)(69,"span",9),r(70),o(71,"translate"),n(),a(72,"span",10),r(73),n()(),a(74,"div",8)(75,"span",9),r(76),o(77,"translate"),n(),a(78,"span",10),r(79),n()(),a(80,"div",8)(81,"span",9),r(82),o(83,"translate"),n(),a(84,"span",10),r(85),n()(),a(86,"div",8)(87,"span",9),r(88),o(89,"translate"),n(),a(90,"span",10),r(91),n()(),a(92,"div",8)(93,"span",9),r(94),o(95,"translate"),n(),a(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),n()(),a(100,"div",8)(101,"span",9),r(102),o(103,"translate"),n(),a(104,"span",10),r(105),n()(),a(106,"div",8)(107,"span",9),r(108),o(109,"translate"),n(),a(110,"span",10),r(111),n()(),a(112,"div",8)(113,"span",9),r(114),o(115,"translate"),n(),a(116,"span",10),r(117),n()(),a(118,"div",8)(119,"span",9),r(120),o(121,"translate"),n(),a(122,"span",10),r(123),o(124,"dateFormat"),n()()()()()()),m&2&&(e(),d("routerLink",G(89,Ye)),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:[V,L,Y,U,z,Q,W,vt,yt,Ct,R],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 tn=()=>["../view"];function en(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 an(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 on(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ln(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 cn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function pn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 mn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function dn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsDataAndTemplate,this.standingInstructionsId=i.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let m=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(m),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 i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:i,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:m,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,i),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,i)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(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"),n(),_(9,"input",7),n(),a(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),n(),_(14,"input",8),n(),a(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",9),n(),a(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),n(),_(24,"input",10),n(),a(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),n(),a(29,"mat-select",11),D(30,en,2,2,"mat-option",12,E),n(),C(32,nn,7,9,"mat-error"),n(),a(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),n(),a(37,"mat-select",13),D(38,an,2,2,"mat-option",12,E),n(),C(40,rn,7,9,"mat-error"),n(),a(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),n(),_(45,"input",14),n(),a(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),n(),_(50,"input",15),n(),a(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),n(),_(55,"input",16),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),_(60,"input",17),n(),a(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),n(),_(65,"input",18),n(),a(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),n(),_(70,"input",19),n(),a(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),n(),a(75,"mat-select",20),D(76,on,2,2,"mat-option",12,E),n()(),a(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),n(),_(82,"input",21),n(),a(83,"mat-form-field",22),h("click",function(){b(f);let w=M(90);return S(w.open())}),a(84,"mat-label"),r(85),o(86,"translate"),n(),_(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),C(91,ln,7,9,"mat-error"),n(),a(92,"mat-form-field",22),h("click",function(){b(f);let w=M(99);return S(w.open())}),a(93,"mat-label"),r(94),o(95,"translate"),n(),_(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),C(100,sn,7,9,"mat-error"),n(),a(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),n(),a(105,"mat-select",26),D(106,cn,2,2,"mat-option",12,E),n(),C(108,pn,7,9,"mat-error"),n(),a(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),n(),_(113,"input",27),n(),a(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),n(),a(118,"mat-select",28),D(119,mn,2,2,"mat-option",12,E),n()(),a(121,"mat-form-field",22),h("click",function(){b(f);let w=M(128);return S(w.open())}),a(122,"mat-label"),r(123),o(124,"translate"),n(),_(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),n()()(),a(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),n(),y(133,dn,3,4,"button",32),n()()()()}if(m&2){let f=M(90),k=M(99),w=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",w),e(),d("for",w),e(4),d("routerLink",G(83,tn)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var un=()=>["../"];function fn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 _n(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Cn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 vn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 In(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Tn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 xn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function Sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 yn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function En(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Dn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function An(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Mn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.displayName," ")}}function kn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function wn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Fn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function On(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Pn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 qn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Vn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Ln(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 $n(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Un(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 jn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(i=>{this.standingIntructionsTemplate=i.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(i=>{i===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 i=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,i).subscribe(m=>{this.standingIntructionsTemplate=m,this.setOptions()})}refineObject(i){let m=Object.getOwnPropertyNames(i);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(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"),n(),_(9,"input",7),C(10,fn,7,9,"mat-error"),n(),a(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),n(),a(20,"mat-select",9),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,_n,2,2,"mat-option",10,E),n(),C(23,Cn,7,9,"mat-error"),n(),a(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),n(),a(28,"mat-select",11),D(29,vn,2,2,"mat-option",10,E),n(),C(31,gn,7,9,"mat-error"),n(),a(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),n(),a(36,"mat-select",12),D(37,In,2,2,"mat-option",10,E),n(),C(39,Tn,7,9,"mat-error"),n(),a(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),n(),a(44,"mat-select",13),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,xn,2,2,"mat-option",10,E),n(),C(47,hn,7,9,"mat-error"),n(),a(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),n(),a(52,"mat-select",14),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,bn,2,3,"mat-option",10,E),n(),C(55,Sn,7,9,"mat-error"),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),a(60,"mat-select",15),D(61,yn,2,2,"mat-option",10,E),n(),C(63,En,7,9,"mat-error"),n(),a(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),n(),a(68,"mat-select",16),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Dn,2,2,"mat-option",10,E),n(),C(71,An,7,9,"mat-error"),n(),a(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),n(),a(76,"mat-select",17),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Mn,2,2,"mat-option",10,E),n(),C(79,kn,7,9,"mat-error"),n(),a(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),n(),a(84,"mat-select",18),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Bn,2,2,"mat-option",10,E),n(),C(87,wn,7,9,"mat-error"),n(),a(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),n(),a(92,"mat-select",19),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,Fn,2,3,"mat-option",10,E),n(),C(95,On,7,9,"mat-error"),n(),a(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),n(),a(100,"mat-select",20),D(101,Pn,2,2,"mat-option",10,E),n(),C(103,Nn,7,9,"mat-error"),n(),a(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),n(),_(108,"input",21),C(109,qn,7,9,"mat-error"),n(),a(110,"mat-form-field",22),h("click",function(){b(f);let w=M(117);return S(w.open())}),a(111,"mat-label"),r(112),o(113,"translate"),n(),_(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),C(118,Vn,7,9,"mat-error"),n(),a(119,"mat-form-field",22),h("click",function(){b(f);let w=M(126);return S(w.open())}),a(120,"mat-label"),r(121),o(122,"translate"),n(),_(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),C(127,Rn,7,9,"mat-error"),n(),a(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),n(),a(132,"mat-select",26),D(133,Ln,2,2,"mat-option",10,E),n(),C(135,Hn,7,9,"mat-error"),n(),a(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),n(),_(140,"input",27),C(141,$n,7,9,"mat-error"),n(),a(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),n(),a(146,"mat-select",28),D(147,Un,2,2,"mat-option",10,E),n(),C(149,zn,7,9,"mat-error"),n(),a(150,"mat-form-field",22),h("click",function(){b(f);let w=M(157);return S(w.open())}),a(151,"mat-label"),r(152),o(153,"translate"),n(),_(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),C(158,Gn,7,9,"mat-error"),n()()(),a(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),n(),y(163,jn,3,4,"button",32),n()()()()}if(m&2){let f=M(117),k=M(126),w=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",w),e(),d("for",w),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",G(99,un)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var je=t=>({balance:t}),Qn=()=>["../.."];function Wn(t,p){t&1&&(a(0,"div",4),_(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),n())}function Yn(t,p){if(t&1){let i=F();N(0),a(1,"button",23),h("click",function(){b(i);let s=x(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),n(),q()}if(t&2){let i=x(4);e(),d("disabled",i.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Jn(t,p){t&1&&(a(0,"mat-card-actions",17),y(1,Yn,4,4,"ng-container",22),n()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Kn(t,p){if(t&1){let i=F();a(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),n(),a(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),n(),a(9,"input",20,0),o(11,"translate"),be("ngModelChange",function(s){b(i);let f=x(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),n(),a(12,"mat-hint",21),r(13),n()()(),C(14,Jn,2,1,"mat-card-actions",17),n()}if(t&2){let i=x(2);e(3),c(l(4,8,"labels.heading.Transferred To")),e(4),c(l(8,10,"labels.inputs.Phone Number")),e(2),d("placeholder",O(l(11,12,"labels.text.EnterPhoneNumber")))("readonly",i.interbankTransferForm),xe("ngModel",i.phoneAccount),e(4),u("",i.phoneAccount.length||0,"/10"),e(),v(i.interbankTransferForm?-1:14)}}function Xn(t,p){t&1&&_(0,"mat-divider")}function Zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ti(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function ei(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ni(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ii(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i),e(),g(" ",i.id," - ",i.displayName," ")}}function ai(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ri(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 oi(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function li(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 si(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ci(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function pi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 mi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,Zn,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),a(19,"mat-select",29),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(20,ti,2,2,"mat-option",30,E),n(),C(22,ei,7,9,"mat-error"),n(),a(23,"mat-form-field",28)(24,"mat-label"),r(25),o(26,"translate"),n(),_(27,"input",31),o(28,"translate"),C(29,ni,7,9,"mat-error"),n(),a(30,"mat-autocomplete",32,2),D(32,ii,2,3,"mat-option",30,E),n(),a(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),n(),a(38,"mat-select",33),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(39,ai,2,2,"mat-option",30,E),n(),C(41,ri,7,9,"mat-error"),n(),a(42,"mat-form-field",28)(43,"mat-label"),r(44),o(45,"translate"),n(),a(46,"mat-select",34),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(47,oi,2,3,"mat-option",30,E),n(),C(49,li,7,9,"mat-error"),n(),a(50,"mat-form-field",28)(51,"mat-label"),r(52),o(53,"translate"),n(),_(54,"input",35),o(55,"translate"),C(56,si,7,9,"mat-error"),C(57,ci,4,6,"mat-error"),n(),a(58,"mat-form-field",36)(59,"mat-label"),r(60),o(61,"translate"),n(),_(62,"textarea",37),o(63,"translate"),C(64,pi,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=M(31),f=x(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,31,"labels.heading.Transfer Details")),e(5),c(l(8,33,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,35,"labels.text.SelectDate")))("min",f.minDate)("max",f.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,37,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?22:-1),e(3),c(l(26,39,"labels.inputs.Client")),e(2),d("placeholder",O(l(28,41,"labels.text.SelectOrTypeClientName")))("matAutocomplete",s),e(2),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?29:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(37,43,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?41:-1),e(3),c(l(45,45,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?49:-1),e(3),c(l(53,47,"labels.inputs.Amount")),e(2),d("placeholder",O(l(55,49,"labels.text.EnterAmount"))),e(2),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?56:-1),e(),v((i=f.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?57:-1),e(3),c(l(61,51,"labels.inputs.Description")),e(2),d("placeholder",O(l(63,53,"labels.text.EnterTransferDescription"))),e(2),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?64:-1)}}function di(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ui(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 fi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function _i(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function Ci(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 vi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,di,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",39),o(20,"translate"),n(),a(21,"mat-form-field",28)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",40),o(26,"translate"),n(),a(27,"mat-form-field",28)(28,"mat-label"),r(29),o(30,"translate"),n(),_(31,"input",41),o(32,"translate"),n(),a(33,"mat-form-field",28)(34,"mat-label"),r(35),o(36,"translate"),n(),_(37,"input",42),o(38,"translate"),n(),a(39,"mat-form-field",28)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"input",35),o(44,"translate"),C(45,ui,7,9,"mat-error"),C(46,fi,4,6,"mat-error"),C(47,_i,4,6,"mat-error"),n(),a(48,"mat-form-field",36)(49,"mat-label"),r(50),o(51,"translate"),n(),_(52,"textarea",37),o(53,"translate"),C(54,Ci,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=x(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,36,"labels.heading.Transfer Details")),e(5),c(l(8,38,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,40,"labels.text.SelectDate")))("min",s.minDate)("max",s.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,42,"labels.inputs.Bank")),e(2),d("placeholder",O(l(20,44,"labels.inputs.Bank")))("readonly",!0),e(4),c(l(24,46,"labels.inputs.Client")),e(2),d("placeholder",O(l(26,48,"labels.inputs.Client")))("readonly",!0),e(4),c(l(30,50,"labels.inputs.Account Type")),e(2),d("placeholder",O(l(32,52,"labels.inputs.Account Type")))("readonly",!0),e(4),c(l(36,54,"labels.inputs.Account")),e(2),d("placeholder",O(l(38,56,"labels.inputs.Account")))("readonly",!0),e(4),c(l(42,58,"labels.inputs.Amount")),e(2),d("placeholder",O(l(44,60,"labels.text.EnterAmount"))),e(2),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?45:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?46:-1),e(),v((i=s.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?47:-1),e(3),c(l(51,62,"labels.inputs.Description")),e(2),d("placeholder",O(l(53,64,"labels.text.EnterTransferDescription"))),e(2),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?54:-1)}}function gi(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ii(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ti(t,p){if(t&1&&(N(0),C(1,gi,3,4,"button",44),C(2,Ii,3,4,"button",44),q()),t&2){let i=x(3);e(),v(i.interbank&&i.interbankTransferForm?1:-1),e(),v(i.interbank?-1:2)}}function xi(t,p){t&1&&(a(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),n(),y(4,Ti,3,2,"ng-container",22),n()),t&2&&(e(),d("routerLink",G(5,Qn)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function hi(t,p){if(t&1&&(a(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),n(),_(6,"mat-divider"),a(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),n(),a(12,"div",15),r(13),n()(),a(14,"div",13)(15,"div",14),r(16),o(17,"translate"),n(),a(18,"div",15),r(19),n()(),a(20,"div",13)(21,"div",14),r(22),o(23,"translate"),n(),a(24,"div",15),r(25),n()(),a(26,"div",13)(27,"div",14),r(28),o(29,"translate"),n(),a(30,"div",15),r(31),n()(),a(32,"div",13)(33,"div",14),r(34),o(35,"translate"),n(),a(36,"div",15),r(37),n()()()(),C(38,Kn,15,14,"div",10),C(39,Xn,1,0,"mat-divider"),C(40,mi,65,55,"form",16),C(41,vi,55,66,"form",16),n(),C(42,xi,5,6,"mat-card-actions",17),n()),t&2){let i=x();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(i.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(i.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",i.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",i.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(i.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(i.accountTransferTemplateData.currency.name),e(),v(i.interbank?38:-1),e(),v(i.interbank?-1:39),e(),v(!i.interbank&&i.makeAccountTransferForm?40:-1),e(),v(i.interbank&&i.interbankTransferForm&&i.makeAccountTransferForm?41:-1),e(),v(!i.isLoading&&i.makeAccountTransferForm?42:-1)}}var ae=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.dateUtils=T(ht),this.settingsService=T(J),this.clientsService=T(Ue),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(i=>{this.accountTransferTemplateData=i.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 i=this.router.currentNavigation()?.extras?.state?.balance,m=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof i=="number"?i:m;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(i){if(!i){console.error("Account data is undefined"),this.isLoading=!1;return}let m=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[i.destinationFspId||"",I.required],toClientId:[(i.firstName||i.firsName||"")+" "+(i.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[i.partyId||"",I.required],transferAmount:[m,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(i){return i.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let i=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,i).subscribe(m=>{this.accountTransferTemplateData=m,this.toClientTypeData=m.toClientOptions,this.setOptions()})}refineObject(i){delete i.transferAmount,delete i.transferDate,delete i.transferDescription,i.toClientId&&typeof i.toClientId=="object"&&(i.toClientId=i.toClientId.id);let m=Object.getOwnPropertyNames(i);for(let s=0;s{typeof i=="string"&&i.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,i).subscribe(m=>{this.clientsData=m.pageItems}),this.changeEvent())})}displayClient(i){return i?i.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let i=this.settingsService.dateFormat,m=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=Vt(qt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,i),dateFormat:i,locale:m,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 i={homeTransactionId:crypto.randomUUID(),from:{fspId:Me.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(i)).subscribe(m=>{m.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},m=>{console.error("Interbank transfer error:",m),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(i=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(i)},i=>{console.error("searching account error:",i),this.isLoading=!1}))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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","","title","Phone number",3,"ngModelChange","readonly","ngModel","placeholder"],["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","title","Transaction Date",3,"min","max","matDatepicker","placeholder"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","title","Client name",3,"matAutocomplete","placeholder"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","title","Transfer amount","min","0.01","step","0.01",3,"placeholder"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","title","Transfer description",3,"placeholder"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","title","Bank",3,"readonly","placeholder"],["matInput","","formControlName","toClientId","title","Client",3,"readonly","placeholder"],["matInput","","formControlName","toAccountType","title","Account Type",3,"readonly","placeholder"],["matInput","","formControlName","toAccountId","title","Account",3,"readonly","placeholder"],["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(m,s){m&1&&(a(0,"div",3),C(1,Wn,5,0,"div",4),C(2,hi,43,29,"mat-card",5),n()),m&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[V,L,at,K,bt,X,it,lt,Fe,we,rt,ot,Y,U,z,st,tt,Z,ct,pt,Pe,et,dt,mt,ft,_t,ut,Q,W,yt,Oe,ke,Re,Ve,vt,Ht,R],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 bi=["instructionsTable"],Si=()=>[10,25,50,100],yi=t=>["../",t,"edit"],Ei=t=>["../",t,"view"];function Di(t,p){if(t&1){let i=F();a(0,"button",24),h("click",function(){b(i);let s=x();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),n()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Ai(t,p){if(t&1&&(a(0,"div",5)(1,"div")(2,"h3",25),r(3),o(4,"translate"),n()(),a(5,"div")(6,"h3",25),r(7),n()()()),t&2){let i=x();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(i.clientName)}}function Mi(t,p){if(t&1&&(a(0,"mat-form-field",6)(1,"mat-label"),r(2),o(3,"translate"),n(),_(4,"input",9),n(),a(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",9),n()),t&2){let i=x();e(2),c(l(3,4,"labels.text.ClientName")),e(2),d("formControl",i.clientNameControl),e(3),c(l(8,6,"labels.text.FromClientId")),e(2),d("formControl",i.fromClientId)}}function ki(t,p){if(t&1&&(a(0,"mat-option",8),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Bi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function wi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromClient.displayName,"-",i.fromClient.id," ")}}function Fi(t,p){if(t&1&&(a(0,"td",27),C(1,wi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromClient?1:-1)}}function Oi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Pi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromAccount.accountNo," (",i.fromAccountType.value,") ")}}function Ni(t,p){if(t&1&&(a(0,"td",27),C(1,Pi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromAccount&&(i!=null&&i.fromAccountType)?1:-1)}}function qi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function Vi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;u(" ",i.toClient.displayName," ")}}function Ri(t,p){if(t&1&&(a(0,"td",27),C(1,Vi,1,1),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toClient?1:-1)}}function Li(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Hi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.toAccount.accountNo," (",i.toAccountType.value,") ")}}function $i(t,p){if(t&1&&(a(0,"td",27),C(1,Hi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toAccount&&(i!=null&&i.toAccountType)?1:-1)}}function Ui(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function zi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.instructionType.value,"/",i.amount," ")}}function Gi(t,p){if(t&1&&(a(0,"td",27),C(1,zi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.instructionType&&(i==null?null:i.amount)!==void 0?1:-1)}}function ji(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Qi(t,p){if(t&1&&(r(0),o(1,"dateFormat"),o(2,"dateFormat")),t&2){let i=x().$implicit;g(" ",l(1,2,i.validFrom)," to ",l(2,4,i.validTill)," ")}}function Wi(t,p){if(t&1&&(a(0,"td",27),C(1,Qi,3,6),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.validFrom&&(i!=null&&i.validTill)?1:-1)}}function Yi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function Ji(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",30),n()),t&2){let i=x(2).$implicit;d("matTooltip",O(l(1,4,"tooltips.Edit Standing Instruction")))("routerLink",nt(8,yi,i.id)),At("aria-label",l(2,6,"tooltips.Edit Standing Instruction"))}}function Ki(t,p){t&1&&(a(0,"span"),y(1,Ji,4,10,"button",28),n()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Xi(t,p){if(t&1){let i=F();a(0,"button",32),o(1,"translate"),o(2,"translate"),h("click",function(){b(i);let s=x(2).$implicit,f=x();return S(f.deleteStandingInstruction(s.id))}),_(3,"i",33),n()}t&2&&(d("matTooltip",O(l(1,3,"tooltips.Delete Standing Instruction"))),At("aria-label",l(2,5,"tooltips.Delete Standing Instruction")))}function Zi(t,p){t&1&&(a(0,"span"),y(1,Xi,4,7,"button",31),n()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ta(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",34),n()),t&2){let i=x().$implicit;d("matTooltip",O(l(1,4,"tooltips.View Standing Instruction")))("routerLink",nt(8,Ei,i.id)),At("aria-label",l(2,6,"tooltips.View Standing Instruction"))}}function ea(t,p){if(t&1&&(a(0,"td",27),C(1,Ki,2,1,"span"),C(2,Zi,2,1,"span"),y(3,ta,4,10,"button",28),n()),t&2){let i=p.$implicit;e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?1:-1),e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function na(t,p){t&1&&_(0,"tr",35)}function ia(t,p){t&1&&_(0,"tr",36)}var re=(()=>{class t{constructor(){this.route=T($),this.accountTransfersService=T(B),this.settingsService=T(J),this.dialog=T(Ae),this.transferType=new Ft,this.fromAccountId=new Ft,this.clientNameControl=new Ft,this.fromClientId=new Ft,this.dataSource=new Ot,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(i=>{this.standingIntructionsTemplateData=i.standingIntructionsTemplate,i.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 i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:m,dateFormat:i,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(i){this.dialog.open(qe,{data:{deleteContext:`standing instruction id: ${i}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(i).subscribe(()=>{})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(m,s){if(m&1&&(Mt(bi,7),Mt(Et,7)),m&2){let f;kt(f=Bt())&&(s.instructionTableRef=f.first),kt(f=Bt())&&(s.paginator=f.first)}},decls:47,vars:20,consts:[["instructionsTable",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","gap-20px","responsive-column"],[1,"flex-100","layout-row","align-items-center","gap-20px"],[1,"flex-48"],[3,"formControl"],[3,"value"],["matInput","",3,"formControl"],[1,"table-container"],["mat-table","",1,"bordered-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"],["mat-raised-button","","color","primary",3,"click"],[1,"mat-h3","no-m-b"],["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(m,s){m&1&&(a(0,"div",1),y(1,Di,4,5,"button",2),n(),a(2,"mat-card",3)(3,"mat-card-content")(4,"div",4),C(5,Ai,8,4,"div",5),C(6,Mi,10,8),a(7,"mat-form-field",6)(8,"mat-label"),r(9),o(10,"translate"),n(),a(11,"mat-select",7),D(12,ki,2,2,"mat-option",8,E),n()(),a(14,"mat-form-field",6)(15,"mat-label"),r(16),o(17,"translate"),n(),_(18,"input",9),n()()(),a(19,"div",10)(20,"table",11,0),o(22,"translate"),N(23,12),y(24,Bi,3,3,"th",13)(25,Fi,2,1,"td",14),q(),N(26,15),y(27,Oi,3,3,"th",13)(28,Ni,2,1,"td",14),q(),N(29,16),y(30,qi,3,3,"th",13)(31,Ri,2,1,"td",14),q(),N(32,17),y(33,Li,3,3,"th",13)(34,$i,2,1,"td",14),q(),N(35,18),y(36,Ui,3,3,"th",13)(37,Gi,2,1,"td",14),q(),N(38,19),y(39,ji,3,3,"th",13)(40,Wi,2,1,"td",14),q(),N(41,20),y(42,Yi,3,3,"th",13)(43,ea,4,3,"td",14),q(),y(44,na,1,0,"tr",21)(45,ia,1,0,"tr",22),n(),_(46,"mat-paginator",23),n()()),m&2&&(e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(4),v(s.isFromClient?5:-1),e(),v(s.isFromClient?-1:6),e(3),c(l(10,13,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(4),c(l(17,15,"labels.text.FromAccountId")),e(2),d("formControl",s.fromAccountId),e(2),d("dataSource",s.dataSource),At("aria-label",l(22,17,"labels.heading.List Standing Instructions")),e(24),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",G(19,Si)))},dependencies:[V,L,K,X,Be,Y,U,z,tt,Z,et,dt,mt,Q,W,$t,Gt,zt,jt,Ut,Qt,Ne,Wt,Jt,Yt,Kt,Et,De,Ct,R],styles:[".container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{margin-top:1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:1.625rem;padding:0 .375rem;margin:.25rem;line-height:1.5625rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem 1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0}"]})}}return t})();var aa=()=>[5,10,25,50,100];function ra(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function oa(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"dateFormat"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.transferDate))}}function la(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function sa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferAmount)}}function ca(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function pa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferDescription)}}function ma(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function da(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"yesNo"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.reversed))}}function ua(t,p){t&1&&_(0,"tr",18)}function fa(t,p){t&1&&_(0,"tr",19)}var oe=(()=>{class t{constructor(){this.route=T($),this.dataSource=new Ot,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(i=>{this.listTransactionData=i.listTransactionData,this.dataSource=new Ot(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(m,s){if(m&1&&Mt(Et,7),m&2){let f;kt(f=Bt())&&(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(m,s){m&1&&(a(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),n(),a(7,"div",4),r(8),n(),a(9,"div",3),r(10),o(11,"translate"),n(),a(12,"div",4),r(13),n(),a(14,"div",3),r(15),o(16,"translate"),n(),a(17,"div",4),r(18),n()()()()(),a(19,"div",5)(20,"table",6),N(21,7),y(22,ra,3,3,"th",8)(23,oa,3,3,"td",9),q(),N(24,10),y(25,la,3,3,"th",8)(26,sa,2,1,"td",9),q(),N(27,11),y(28,ca,3,3,"th",8)(29,pa,2,1,"td",9),q(),N(30,12),y(31,ma,3,3,"th",8)(32,da,3,3,"td",9),q(),y(33,ua,1,0,"tr",13)(34,fa,1,0,"tr",14),n(),_(35,"mat-paginator",15),n()),m&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",G(18,aa)))},dependencies:[V,L,U,z,$t,Gt,zt,jt,Ut,Qt,Wt,Jt,Yt,Kt,Et,Ct,R,He],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 _a(t,p){t&1&&(a(0,"button",15),_(1,"fa-icon",16),r(2),o(3,"translate"),n()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function Ca(t,p){t&1&&(a(0,"span"),y(1,_a,4,3,"button",14),n()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}function va(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.fromAccountType.value)," ")}}function ga(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.toAccountType.value)," ")}}var le=(()=>{class t{constructor(){this.route=T($),this.location=T(Se),this.route.data.subscribe(i=>{this.viewAccountTransferData=i.viewAccountTransferData})}transferToClient(i){return`/#/clients/${i.id}`}transferToAccount(i,m){return`/#/clients/${i.id}/savings-accounts/${m.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-account-transfer"]],decls:97,vars:66,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"transfer-container"],[1,"status-indicator",3,"ngClass"],[1,"transfer-section"],[1,"section-title"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],["class","info-value",4,"ngIf"],[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(m,s){m&1&&(a(0,"div",0)(1,"div",1),C(2,Ca,2,1,"span"),n(),a(3,"mat-card")(4,"mat-card-content")(5,"div",2),_(6,"div",3),a(7,"section",4)(8,"h3",5),r(9),o(10,"translate"),n(),_(11,"mat-divider"),a(12,"div",6)(13,"div",7)(14,"span",8),r(15),o(16,"translate"),n(),a(17,"span",9),r(18),o(19,"formatNumber"),n()(),a(20,"div",7)(21,"span",8),r(22),o(23,"translate"),n(),a(24,"span",9),r(25),o(26,"dateFormat"),n()(),a(27,"div",7)(28,"span",8),r(29),o(30,"translate"),n(),a(31,"span",9),r(32),n()()()(),a(33,"section",4)(34,"h3",5),r(35),o(36,"translate"),n(),_(37,"mat-divider"),a(38,"div",6)(39,"div",7)(40,"span",8),r(41),o(42,"translate"),n(),a(43,"span",9),r(44),n()(),a(45,"div",7)(46,"span",8),r(47),o(48,"translate"),n(),a(49,"span",9),r(50),n()(),a(51,"div",7)(52,"span",8),r(53),o(54,"translate"),n(),y(55,va,3,3,"span",10),n(),a(56,"div",7)(57,"span",8),r(58),o(59,"translate"),n(),a(60,"span",9),r(61),n()()()(),a(62,"section",4)(63,"h3",5),r(64),o(65,"translate"),n(),_(66,"mat-divider"),a(67,"div",6)(68,"div",7)(69,"span",8),r(70),o(71,"translate"),n(),a(72,"span",9),r(73),n()(),a(74,"div",7)(75,"span",8),r(76),o(77,"translate"),n(),a(78,"span",9)(79,"a",11),r(80),n()()(),a(81,"div",7)(82,"span",8),r(83),o(84,"translate"),n(),y(85,ga,3,3,"span",10),n(),a(86,"div",7)(87,"span",8),r(88),o(89,"translate"),n(),a(90,"span",9)(91,"a",11),r(92),n()()()()()()(),a(93,"mat-card-actions",12)(94,"button",13),h("click",function(){return s.goBack()}),r(95),o(96,"translate"),n()()()()),m&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(3),c(l(10,32,"labels.heading.Transaction Details")),e(6),u("",l(16,34,"labels.inputs.Transaction Amount"),":"),e(3),Te(" ",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.displaySymbol," ",l(19,36,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.code,") "),e(4),u("",l(23,38,"labels.inputs.Transaction Date"),":"),e(3),c(l(26,40,s.viewAccountTransferData.transferDate)),e(4),u("",l(30,42,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(3),c(l(36,44,"labels.heading.Transferred From")),e(6),u("",l(42,46,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice==null?null:s.viewAccountTransferData.fromOffice.name),e(3),u("",l(48,48,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient==null?null:s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(54,50,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.fromAccountType==null?null:s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(59,52,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount==null?null:s.viewAccountTransferData.fromAccount.accountNo),e(3),c(l(65,54,"labels.heading.Transferred To")),e(6),u("",l(71,56,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice==null?null:s.viewAccountTransferData.toOffice.name),e(3),u("",l(77,58,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),ce),e(),u(" ",s.viewAccountTransferData.toClient==null?null:s.viewAccountTransferData.toClient.displayName," "),e(3),u("",l(84,60,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.toAccountType==null?null:s.viewAccountTransferData.toAccountType.value),e(3),u("",l(89,62,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),ce),e(),u(" ",s.viewAccountTransferData.toAccount==null?null:s.viewAccountTransferData.toAccount.accountNo," "),e(3),u(" ",l(96,64,"labels.buttons.Back")," "))},dependencies:[V,ye,Ee,L,U,z,st,Q,W,vt,yt,Ct,R,Le],styles:[".transfer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;position:relative;padding-left:20px}.status-indicator[_ngcontent-%COMP%]{position:absolute;top:0;left:-16px;width:4px;height:100%;border-radius:2px}.transfer-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-title[_ngcontent-%COMP%]{margin:0;font-size:1.125rem;font-weight:500}mat-divider[_ngcontent-%COMP%]{margin-bottom:.5rem}.info-grid[_ngcontent-%COMP%]{display:grid;gap:.75rem}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(150px,200px) auto;gap:1rem;align-items:start}@media (width <= 768px){.info-row[_ngcontent-%COMP%]{grid-template-columns:100%;gap:.25rem}}.info-label[_ngcontent-%COMP%]{font-weight:500}@media (width <= 768px){.info-label[_ngcontent-%COMP%]{font-size:.875rem}}.info-value[_ngcontent-%COMP%]{word-break:break-word}.info-value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var se=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.queryParamMap.get("officeId"),s=i.queryParamMap.get("accountType"),f=i.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,m,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){switch(i.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=i.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(J)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(m,s,f)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ie=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ia=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:se}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ae,resolve:{accountTransferTemplate:ve}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:re,resolve:{standingIntructionsTemplate:se}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:le,resolve:{viewAccountTransferData:Ie}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Zt,resolve:{standingInstructionsData:_e}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ne,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:oe,resolve:{listTransactionData:ge}}]}]}],Qe=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({providers:[_e,Ce,se,ve,ge,Ie],imports:[pe.forChild(Ia),pe]})}}return t})();var Ta=t=>({balance:t});function xa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ha(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ba(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",15),r(2),o(3,"translate"),n()),t&2){let i=x();e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,Ta,i.balance))," ")}}function Sa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 We=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(0,"form",2)(1,"div",3)(2,"mat-form-field",4),h("click",function(){b(f);let w=M(9);return S(w.open())}),a(3,"mat-label"),r(4),o(5,"translate"),n(),_(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),C(10,xa,7,9,"mat-error"),n(),a(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),n(),_(20,"input",9),n(),a(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",10),n(),a(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),n(),_(30,"input",11),n(),a(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),n(),_(35,"input",13,1),C(37,ha,7,9,"mat-error"),C(38,ba,4,6,"mat-error"),n(),a(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"textarea",14),C(44,Sa,7,9,"mat-error"),n()()()}if(m&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:[V,L,at,K,bt,X,it,lt,rt,ot,tt,Z,ct,pt,et,ft,_t,ut,vt,Ht,R],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 ml=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({imports:[Ge,$e,ze,Qe,Zt,ne,ie,ae,re,oe,le,We]})}}return t})();export{ml as AccountTransfersModule}; +import{a as B}from"./chunk-M2LEJORY.js";import{$a as he,$c as it,$d as vt,Ae as yt,Af as Kt,Cc as Ae,Da as N,Dd as Z,Df as Ot,Ea as q,Eb as V,Ed as ct,Fd as Pe,G as j,Ga as F,H as Rt,Hd as pt,Ia as h,Id as tt,Ja as x,Jd as Ht,Je as Ve,K as T,Kd as et,Ke as Re,L as b,Lc as R,Ld as mt,M as S,Na as Mt,Nc as Me,Nd as dt,Oa as kt,Pa as Bt,Pd as Ne,Qa as M,Qd as ut,Rd as ft,Rg as Ge,Sc as ht,Sd as _t,Tc as J,Ua as r,Ud as Ct,Va as c,Wa as u,We as Et,Xa as g,Xd as W,Ya as Te,Yc as K,Zc as I,_ as ce,_a as xe,_c as X,ab as be,bb as O,ca as e,cd as Ft,dd as ke,de as qe,eb as G,ed as at,eg as Le,fb as nt,fd as bt,gc as $,gd as Be,gg as He,hb as o,hd as rt,hg as $e,ib as l,ig as Ue,ja as P,jb as wt,jc as xt,ka as Lt,kc as Y,kd as ot,mc as pe,md as we,na as y,nd as lt,nf as $t,of as Ut,pa as At,pb as Se,pd as Fe,pf as zt,qb as ye,qc as Q,ra as C,rd as St,rf as Gt,sa as v,sb as Ee,sd as Oe,sf as jt,ta as E,td as L,ua as D,ud as U,uf as Qt,va as A,vf as Wt,vg as ze,wa as d,xa as a,xd as z,xf as Yt,ya as n,yf as Jt,za as _,zb as De,zd as st}from"./chunk-YFBSP33D.js";import{a as qt,b as Vt}from"./chunk-PHUH23IY.js";var Ye=()=>["../","edit"],Je=()=>["../","list-account-transactions"];function Ke(t,p){t&1&&(a(0,"button",1),r(1),o(2,"translate"),n()),t&2&&(d("routerLink",G(4,Je)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Xe(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ze(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Zt=(()=>{class t{constructor(){this.route=T($),this.allowclientedit=!1,this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){m&1&&(a(0,"div",0)(1,"button",1),_(2,"fa-icon",2),r(3),o(4,"translate"),n(),y(5,Ke,3,5,"button",3),n(),a(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),n(),_(12,"mat-divider",7),a(13,"div",8)(14,"span",9),r(15),o(16,"translate"),n(),a(17,"span",10),r(18),n()(),a(19,"div",8)(20,"span",9),r(21),o(22,"translate"),n(),a(23,"span",10),r(24),n()(),a(25,"div",8)(26,"span",9),r(27),o(28,"translate"),n(),a(29,"span",10),r(30),n()(),a(31,"div",8)(32,"span",9),r(33),o(34,"translate"),n(),a(35,"span",10),r(36),n()(),a(37,"div",8)(38,"span",9),r(39),o(40,"translate"),n(),a(41,"span",10),r(42),n()(),a(43,"div",8)(44,"span",9),r(45),o(46,"translate"),n(),a(47,"span",10),r(48),n()(),a(49,"div",8)(50,"span",9),r(51),o(52,"translate"),n(),a(53,"span",10),C(54,Xe,3,3,"span"),C(55,Ze,3,3,"span"),n()(),a(56,"div",8)(57,"span",9),r(58),o(59,"translate"),n(),a(60,"span",10),r(61),n()(),a(62,"div",8)(63,"span",9),r(64),o(65,"translate"),n(),a(66,"span",10),r(67),n()(),a(68,"div",8)(69,"span",9),r(70),o(71,"translate"),n(),a(72,"span",10),r(73),n()(),a(74,"div",8)(75,"span",9),r(76),o(77,"translate"),n(),a(78,"span",10),r(79),n()(),a(80,"div",8)(81,"span",9),r(82),o(83,"translate"),n(),a(84,"span",10),r(85),n()(),a(86,"div",8)(87,"span",9),r(88),o(89,"translate"),n(),a(90,"span",10),r(91),n()(),a(92,"div",8)(93,"span",9),r(94),o(95,"translate"),n(),a(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),n()(),a(100,"div",8)(101,"span",9),r(102),o(103,"translate"),n(),a(104,"span",10),r(105),n()(),a(106,"div",8)(107,"span",9),r(108),o(109,"translate"),n(),a(110,"span",10),r(111),n()(),a(112,"div",8)(113,"span",9),r(114),o(115,"translate"),n(),a(116,"span",10),r(117),n()(),a(118,"div",8)(119,"span",9),r(120),o(121,"translate"),n(),a(122,"span",10),r(123),o(124,"dateFormat"),n()()()()()()),m&2&&(e(),d("routerLink",G(89,Ye)),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:[V,L,Y,U,z,Q,W,vt,yt,Ct,R],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 tn=()=>["../view"];function en(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 an(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 on(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ln(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 cn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function pn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 mn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function dn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsDataAndTemplate,this.standingInstructionsId=i.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let m=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(m),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 i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:i,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:m,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,i),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,i)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(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"),n(),_(9,"input",7),n(),a(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),n(),_(14,"input",8),n(),a(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",9),n(),a(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),n(),_(24,"input",10),n(),a(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),n(),a(29,"mat-select",11),D(30,en,2,2,"mat-option",12,E),n(),C(32,nn,7,9,"mat-error"),n(),a(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),n(),a(37,"mat-select",13),D(38,an,2,2,"mat-option",12,E),n(),C(40,rn,7,9,"mat-error"),n(),a(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),n(),_(45,"input",14),n(),a(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),n(),_(50,"input",15),n(),a(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),n(),_(55,"input",16),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),_(60,"input",17),n(),a(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),n(),_(65,"input",18),n(),a(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),n(),_(70,"input",19),n(),a(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),n(),a(75,"mat-select",20),D(76,on,2,2,"mat-option",12,E),n()(),a(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),n(),_(82,"input",21),n(),a(83,"mat-form-field",22),h("click",function(){b(f);let w=M(90);return S(w.open())}),a(84,"mat-label"),r(85),o(86,"translate"),n(),_(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),C(91,ln,7,9,"mat-error"),n(),a(92,"mat-form-field",22),h("click",function(){b(f);let w=M(99);return S(w.open())}),a(93,"mat-label"),r(94),o(95,"translate"),n(),_(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),C(100,sn,7,9,"mat-error"),n(),a(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),n(),a(105,"mat-select",26),D(106,cn,2,2,"mat-option",12,E),n(),C(108,pn,7,9,"mat-error"),n(),a(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),n(),_(113,"input",27),n(),a(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),n(),a(118,"mat-select",28),D(119,mn,2,2,"mat-option",12,E),n()(),a(121,"mat-form-field",22),h("click",function(){b(f);let w=M(128);return S(w.open())}),a(122,"mat-label"),r(123),o(124,"translate"),n(),_(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),n()()(),a(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),n(),y(133,dn,3,4,"button",32),n()()()()}if(m&2){let f=M(90),k=M(99),w=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",w),e(),d("for",w),e(4),d("routerLink",G(83,tn)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var un=()=>["../"];function fn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 _n(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Cn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 vn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 In(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Tn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 xn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function Sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 yn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function En(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Dn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function An(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Mn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.displayName," ")}}function kn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function wn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Fn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function On(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Pn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 qn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Vn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Ln(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 $n(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Un(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 Gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 jn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(i=>{this.standingIntructionsTemplate=i.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(i=>{i===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 i=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,i).subscribe(m=>{this.standingIntructionsTemplate=m,this.setOptions()})}refineObject(i){let m=Object.getOwnPropertyNames(i);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(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"),n(),_(9,"input",7),C(10,fn,7,9,"mat-error"),n(),a(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),n(),a(20,"mat-select",9),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,_n,2,2,"mat-option",10,E),n(),C(23,Cn,7,9,"mat-error"),n(),a(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),n(),a(28,"mat-select",11),D(29,vn,2,2,"mat-option",10,E),n(),C(31,gn,7,9,"mat-error"),n(),a(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),n(),a(36,"mat-select",12),D(37,In,2,2,"mat-option",10,E),n(),C(39,Tn,7,9,"mat-error"),n(),a(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),n(),a(44,"mat-select",13),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,xn,2,2,"mat-option",10,E),n(),C(47,hn,7,9,"mat-error"),n(),a(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),n(),a(52,"mat-select",14),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,bn,2,3,"mat-option",10,E),n(),C(55,Sn,7,9,"mat-error"),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),a(60,"mat-select",15),D(61,yn,2,2,"mat-option",10,E),n(),C(63,En,7,9,"mat-error"),n(),a(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),n(),a(68,"mat-select",16),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Dn,2,2,"mat-option",10,E),n(),C(71,An,7,9,"mat-error"),n(),a(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),n(),a(76,"mat-select",17),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Mn,2,2,"mat-option",10,E),n(),C(79,kn,7,9,"mat-error"),n(),a(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),n(),a(84,"mat-select",18),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Bn,2,2,"mat-option",10,E),n(),C(87,wn,7,9,"mat-error"),n(),a(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),n(),a(92,"mat-select",19),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,Fn,2,3,"mat-option",10,E),n(),C(95,On,7,9,"mat-error"),n(),a(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),n(),a(100,"mat-select",20),D(101,Pn,2,2,"mat-option",10,E),n(),C(103,Nn,7,9,"mat-error"),n(),a(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),n(),_(108,"input",21),C(109,qn,7,9,"mat-error"),n(),a(110,"mat-form-field",22),h("click",function(){b(f);let w=M(117);return S(w.open())}),a(111,"mat-label"),r(112),o(113,"translate"),n(),_(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),C(118,Vn,7,9,"mat-error"),n(),a(119,"mat-form-field",22),h("click",function(){b(f);let w=M(126);return S(w.open())}),a(120,"mat-label"),r(121),o(122,"translate"),n(),_(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),C(127,Rn,7,9,"mat-error"),n(),a(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),n(),a(132,"mat-select",26),D(133,Ln,2,2,"mat-option",10,E),n(),C(135,Hn,7,9,"mat-error"),n(),a(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),n(),_(140,"input",27),C(141,$n,7,9,"mat-error"),n(),a(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),n(),a(146,"mat-select",28),D(147,Un,2,2,"mat-option",10,E),n(),C(149,zn,7,9,"mat-error"),n(),a(150,"mat-form-field",22),h("click",function(){b(f);let w=M(157);return S(w.open())}),a(151,"mat-label"),r(152),o(153,"translate"),n(),_(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),C(158,Gn,7,9,"mat-error"),n()()(),a(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),n(),y(163,jn,3,4,"button",32),n()()()()}if(m&2){let f=M(117),k=M(126),w=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",w),e(),d("for",w),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",G(99,un)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var je=t=>({balance:t}),Qn=()=>["../.."];function Wn(t,p){t&1&&(a(0,"div",4),_(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),n())}function Yn(t,p){if(t&1){let i=F();N(0),a(1,"button",23),h("click",function(){b(i);let s=x(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),n(),q()}if(t&2){let i=x(4);e(),d("disabled",i.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Jn(t,p){t&1&&(a(0,"mat-card-actions",17),y(1,Yn,4,4,"ng-container",22),n()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Kn(t,p){if(t&1){let i=F();a(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),n(),a(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),n(),a(9,"input",20,0),o(11,"translate"),be("ngModelChange",function(s){b(i);let f=x(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),n(),a(12,"mat-hint",21),r(13),n()()(),C(14,Jn,2,1,"mat-card-actions",17),n()}if(t&2){let i=x(2);e(3),c(l(4,8,"labels.heading.Transferred To")),e(4),c(l(8,10,"labels.inputs.Phone Number")),e(2),d("placeholder",O(l(11,12,"labels.text.EnterPhoneNumber")))("readonly",i.interbankTransferForm),xe("ngModel",i.phoneAccount),e(4),u("",i.phoneAccount.length||0,"/10"),e(),v(i.interbankTransferForm?-1:14)}}function Xn(t,p){t&1&&_(0,"mat-divider")}function Zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ti(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function ei(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ni(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ii(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i),e(),g(" ",i.id," - ",i.displayName," ")}}function ai(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ri(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 oi(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function li(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 si(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ci(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function pi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 mi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,Zn,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),a(19,"mat-select",29),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(20,ti,2,2,"mat-option",30,E),n(),C(22,ei,7,9,"mat-error"),n(),a(23,"mat-form-field",28)(24,"mat-label"),r(25),o(26,"translate"),n(),_(27,"input",31),o(28,"translate"),C(29,ni,7,9,"mat-error"),n(),a(30,"mat-autocomplete",32,2),D(32,ii,2,3,"mat-option",30,E),n(),a(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),n(),a(38,"mat-select",33),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(39,ai,2,2,"mat-option",30,E),n(),C(41,ri,7,9,"mat-error"),n(),a(42,"mat-form-field",28)(43,"mat-label"),r(44),o(45,"translate"),n(),a(46,"mat-select",34),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(47,oi,2,3,"mat-option",30,E),n(),C(49,li,7,9,"mat-error"),n(),a(50,"mat-form-field",28)(51,"mat-label"),r(52),o(53,"translate"),n(),_(54,"input",35),o(55,"translate"),C(56,si,7,9,"mat-error"),C(57,ci,4,6,"mat-error"),n(),a(58,"mat-form-field",36)(59,"mat-label"),r(60),o(61,"translate"),n(),_(62,"textarea",37),o(63,"translate"),C(64,pi,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=M(31),f=x(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,31,"labels.heading.Transfer Details")),e(5),c(l(8,33,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,35,"labels.text.SelectDate")))("min",f.minDate)("max",f.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,37,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?22:-1),e(3),c(l(26,39,"labels.inputs.Client")),e(2),d("placeholder",O(l(28,41,"labels.text.SelectOrTypeClientName")))("matAutocomplete",s),e(2),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?29:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(37,43,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?41:-1),e(3),c(l(45,45,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?49:-1),e(3),c(l(53,47,"labels.inputs.Amount")),e(2),d("placeholder",O(l(55,49,"labels.text.EnterAmount"))),e(2),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?56:-1),e(),v((i=f.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?57:-1),e(3),c(l(61,51,"labels.inputs.Description")),e(2),d("placeholder",O(l(63,53,"labels.text.EnterTransferDescription"))),e(2),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?64:-1)}}function di(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ui(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 fi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function _i(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function Ci(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 vi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,di,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",39),o(20,"translate"),n(),a(21,"mat-form-field",28)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",40),o(26,"translate"),n(),a(27,"mat-form-field",28)(28,"mat-label"),r(29),o(30,"translate"),n(),_(31,"input",41),o(32,"translate"),n(),a(33,"mat-form-field",28)(34,"mat-label"),r(35),o(36,"translate"),n(),_(37,"input",42),o(38,"translate"),n(),a(39,"mat-form-field",28)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"input",35),o(44,"translate"),C(45,ui,7,9,"mat-error"),C(46,fi,4,6,"mat-error"),C(47,_i,4,6,"mat-error"),n(),a(48,"mat-form-field",36)(49,"mat-label"),r(50),o(51,"translate"),n(),_(52,"textarea",37),o(53,"translate"),C(54,Ci,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=x(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,36,"labels.heading.Transfer Details")),e(5),c(l(8,38,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,40,"labels.text.SelectDate")))("min",s.minDate)("max",s.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,42,"labels.inputs.Bank")),e(2),d("placeholder",O(l(20,44,"labels.inputs.Bank")))("readonly",!0),e(4),c(l(24,46,"labels.inputs.Client")),e(2),d("placeholder",O(l(26,48,"labels.inputs.Client")))("readonly",!0),e(4),c(l(30,50,"labels.inputs.Account Type")),e(2),d("placeholder",O(l(32,52,"labels.inputs.Account Type")))("readonly",!0),e(4),c(l(36,54,"labels.inputs.Account")),e(2),d("placeholder",O(l(38,56,"labels.inputs.Account")))("readonly",!0),e(4),c(l(42,58,"labels.inputs.Amount")),e(2),d("placeholder",O(l(44,60,"labels.text.EnterAmount"))),e(2),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?45:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?46:-1),e(),v((i=s.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?47:-1),e(3),c(l(51,62,"labels.inputs.Description")),e(2),d("placeholder",O(l(53,64,"labels.text.EnterTransferDescription"))),e(2),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?54:-1)}}function gi(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ii(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ti(t,p){if(t&1&&(N(0),C(1,gi,3,4,"button",44),C(2,Ii,3,4,"button",44),q()),t&2){let i=x(3);e(),v(i.interbank&&i.interbankTransferForm?1:-1),e(),v(i.interbank?-1:2)}}function xi(t,p){t&1&&(a(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),n(),y(4,Ti,3,2,"ng-container",22),n()),t&2&&(e(),d("routerLink",G(5,Qn)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function hi(t,p){if(t&1&&(a(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),n(),_(6,"mat-divider"),a(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),n(),a(12,"div",15),r(13),n()(),a(14,"div",13)(15,"div",14),r(16),o(17,"translate"),n(),a(18,"div",15),r(19),n()(),a(20,"div",13)(21,"div",14),r(22),o(23,"translate"),n(),a(24,"div",15),r(25),n()(),a(26,"div",13)(27,"div",14),r(28),o(29,"translate"),n(),a(30,"div",15),r(31),n()(),a(32,"div",13)(33,"div",14),r(34),o(35,"translate"),n(),a(36,"div",15),r(37),n()()()(),C(38,Kn,15,14,"div",10),C(39,Xn,1,0,"mat-divider"),C(40,mi,65,55,"form",16),C(41,vi,55,66,"form",16),n(),C(42,xi,5,6,"mat-card-actions",17),n()),t&2){let i=x();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(i.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(i.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",i.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",i.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(i.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(i.accountTransferTemplateData.currency.name),e(),v(i.interbank?38:-1),e(),v(i.interbank?-1:39),e(),v(!i.interbank&&i.makeAccountTransferForm?40:-1),e(),v(i.interbank&&i.interbankTransferForm&&i.makeAccountTransferForm?41:-1),e(),v(!i.isLoading&&i.makeAccountTransferForm?42:-1)}}var ae=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.dateUtils=T(ht),this.settingsService=T(J),this.clientsService=T(Ue),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(i=>{this.accountTransferTemplateData=i.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 i=this.router.currentNavigation()?.extras?.state?.balance,m=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof i=="number"?i:m;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(i){if(!i){console.error("Account data is undefined"),this.isLoading=!1;return}let m=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[i.destinationFspId||"",I.required],toClientId:[(i.firstName||i.firsName||"")+" "+(i.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[i.partyId||"",I.required],transferAmount:[m,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(i){return i.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let i=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,i).subscribe(m=>{this.accountTransferTemplateData=m,this.toClientTypeData=m.toClientOptions,this.setOptions()})}refineObject(i){delete i.transferAmount,delete i.transferDate,delete i.transferDescription,i.toClientId&&typeof i.toClientId=="object"&&(i.toClientId=i.toClientId.id);let m=Object.getOwnPropertyNames(i);for(let s=0;s{typeof i=="string"&&i.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,i).subscribe(m=>{this.clientsData=m.pageItems}),this.changeEvent())})}displayClient(i){return i?i.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let i=this.settingsService.dateFormat,m=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=Vt(qt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,i),dateFormat:i,locale:m,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 i={homeTransactionId:crypto.randomUUID(),from:{fspId:Me.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(i)).subscribe(m=>{m.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},m=>{console.error("Interbank transfer error:",m),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(i=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(i)},i=>{console.error("searching account error:",i),this.isLoading=!1}))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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","","title","Phone number",3,"ngModelChange","readonly","ngModel","placeholder"],["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","title","Transaction Date",3,"min","max","matDatepicker","placeholder"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","title","Client name",3,"matAutocomplete","placeholder"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","title","Transfer amount","min","0.01","step","0.01",3,"placeholder"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","title","Transfer description",3,"placeholder"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","title","Bank",3,"readonly","placeholder"],["matInput","","formControlName","toClientId","title","Client",3,"readonly","placeholder"],["matInput","","formControlName","toAccountType","title","Account Type",3,"readonly","placeholder"],["matInput","","formControlName","toAccountId","title","Account",3,"readonly","placeholder"],["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(m,s){m&1&&(a(0,"div",3),C(1,Wn,5,0,"div",4),C(2,hi,43,29,"mat-card",5),n()),m&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[V,L,at,K,bt,X,it,lt,Fe,we,rt,ot,Y,U,z,st,tt,Z,ct,pt,Pe,et,dt,mt,ft,_t,ut,Q,W,yt,Oe,ke,Re,Ve,vt,Ht,R],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 bi=["instructionsTable"],Si=()=>[10,25,50,100],yi=t=>["../",t,"edit"],Ei=t=>["../",t,"view"];function Di(t,p){if(t&1){let i=F();a(0,"button",24),h("click",function(){b(i);let s=x();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),n()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Ai(t,p){if(t&1&&(a(0,"div",5)(1,"div")(2,"h3",25),r(3),o(4,"translate"),n()(),a(5,"div")(6,"h3",25),r(7),n()()()),t&2){let i=x();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(i.clientName)}}function Mi(t,p){if(t&1&&(a(0,"mat-form-field",6)(1,"mat-label"),r(2),o(3,"translate"),n(),_(4,"input",9),n(),a(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",9),n()),t&2){let i=x();e(2),c(l(3,4,"labels.text.ClientName")),e(2),d("formControl",i.clientNameControl),e(3),c(l(8,6,"labels.text.FromClientId")),e(2),d("formControl",i.fromClientId)}}function ki(t,p){if(t&1&&(a(0,"mat-option",8),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Bi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function wi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromClient.displayName,"-",i.fromClient.id," ")}}function Fi(t,p){if(t&1&&(a(0,"td",27),C(1,wi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromClient?1:-1)}}function Oi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Pi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromAccount.accountNo," (",i.fromAccountType.value,") ")}}function Ni(t,p){if(t&1&&(a(0,"td",27),C(1,Pi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromAccount&&(i!=null&&i.fromAccountType)?1:-1)}}function qi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function Vi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;u(" ",i.toClient.displayName," ")}}function Ri(t,p){if(t&1&&(a(0,"td",27),C(1,Vi,1,1),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toClient?1:-1)}}function Li(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Hi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.toAccount.accountNo," (",i.toAccountType.value,") ")}}function $i(t,p){if(t&1&&(a(0,"td",27),C(1,Hi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toAccount&&(i!=null&&i.toAccountType)?1:-1)}}function Ui(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function zi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.instructionType.value,"/",i.amount," ")}}function Gi(t,p){if(t&1&&(a(0,"td",27),C(1,zi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.instructionType&&(i==null?null:i.amount)!==void 0?1:-1)}}function ji(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Qi(t,p){if(t&1&&(r(0),o(1,"dateFormat"),o(2,"dateFormat")),t&2){let i=x().$implicit;g(" ",l(1,2,i.validFrom)," to ",l(2,4,i.validTill)," ")}}function Wi(t,p){if(t&1&&(a(0,"td",27),C(1,Qi,3,6),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.validFrom&&(i!=null&&i.validTill)?1:-1)}}function Yi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function Ji(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",30),n()),t&2){let i=x(2).$implicit;d("matTooltip",O(l(1,4,"tooltips.Edit Standing Instruction")))("routerLink",nt(8,yi,i.id)),At("aria-label",l(2,6,"tooltips.Edit Standing Instruction"))}}function Ki(t,p){t&1&&(a(0,"span"),y(1,Ji,4,10,"button",28),n()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Xi(t,p){if(t&1){let i=F();a(0,"button",32),o(1,"translate"),o(2,"translate"),h("click",function(){b(i);let s=x(2).$implicit,f=x();return S(f.deleteStandingInstruction(s.id))}),_(3,"i",33),n()}t&2&&(d("matTooltip",O(l(1,3,"tooltips.Delete Standing Instruction"))),At("aria-label",l(2,5,"tooltips.Delete Standing Instruction")))}function Zi(t,p){t&1&&(a(0,"span"),y(1,Xi,4,7,"button",31),n()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ta(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",34),n()),t&2){let i=x().$implicit;d("matTooltip",O(l(1,4,"tooltips.View Standing Instruction")))("routerLink",nt(8,Ei,i.id)),At("aria-label",l(2,6,"tooltips.View Standing Instruction"))}}function ea(t,p){if(t&1&&(a(0,"td",27),C(1,Ki,2,1,"span"),C(2,Zi,2,1,"span"),y(3,ta,4,10,"button",28),n()),t&2){let i=p.$implicit;e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?1:-1),e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function na(t,p){t&1&&_(0,"tr",35)}function ia(t,p){t&1&&_(0,"tr",36)}var re=(()=>{class t{constructor(){this.route=T($),this.accountTransfersService=T(B),this.settingsService=T(J),this.dialog=T(Ae),this.transferType=new Ft,this.fromAccountId=new Ft,this.clientNameControl=new Ft,this.fromClientId=new Ft,this.dataSource=new Ot,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(i=>{this.standingIntructionsTemplateData=i.standingIntructionsTemplate,i.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 i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:m,dateFormat:i,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(i){this.dialog.open(qe,{data:{deleteContext:`standing instruction id: ${i}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(i).subscribe(()=>{})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(m,s){if(m&1&&(Mt(bi,7),Mt(Et,7)),m&2){let f;kt(f=Bt())&&(s.instructionTableRef=f.first),kt(f=Bt())&&(s.paginator=f.first)}},decls:47,vars:20,consts:[["instructionsTable",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","gap-20px","responsive-column"],[1,"flex-100","layout-row","align-items-center","gap-20px"],[1,"flex-48"],[3,"formControl"],[3,"value"],["matInput","",3,"formControl"],[1,"table-container"],["mat-table","",1,"bordered-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"],["mat-raised-button","","color","primary",3,"click"],[1,"mat-h3","no-m-b"],["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(m,s){m&1&&(a(0,"div",1),y(1,Di,4,5,"button",2),n(),a(2,"mat-card",3)(3,"mat-card-content")(4,"div",4),C(5,Ai,8,4,"div",5),C(6,Mi,10,8),a(7,"mat-form-field",6)(8,"mat-label"),r(9),o(10,"translate"),n(),a(11,"mat-select",7),D(12,ki,2,2,"mat-option",8,E),n()(),a(14,"mat-form-field",6)(15,"mat-label"),r(16),o(17,"translate"),n(),_(18,"input",9),n()()(),a(19,"div",10)(20,"table",11,0),o(22,"translate"),N(23,12),y(24,Bi,3,3,"th",13)(25,Fi,2,1,"td",14),q(),N(26,15),y(27,Oi,3,3,"th",13)(28,Ni,2,1,"td",14),q(),N(29,16),y(30,qi,3,3,"th",13)(31,Ri,2,1,"td",14),q(),N(32,17),y(33,Li,3,3,"th",13)(34,$i,2,1,"td",14),q(),N(35,18),y(36,Ui,3,3,"th",13)(37,Gi,2,1,"td",14),q(),N(38,19),y(39,ji,3,3,"th",13)(40,Wi,2,1,"td",14),q(),N(41,20),y(42,Yi,3,3,"th",13)(43,ea,4,3,"td",14),q(),y(44,na,1,0,"tr",21)(45,ia,1,0,"tr",22),n(),_(46,"mat-paginator",23),n()()),m&2&&(e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(4),v(s.isFromClient?5:-1),e(),v(s.isFromClient?-1:6),e(3),c(l(10,13,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(4),c(l(17,15,"labels.text.FromAccountId")),e(2),d("formControl",s.fromAccountId),e(2),d("dataSource",s.dataSource),At("aria-label",l(22,17,"labels.heading.List Standing Instructions")),e(24),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",G(19,Si)))},dependencies:[V,L,K,X,Be,Y,U,z,tt,Z,et,dt,mt,Q,W,$t,Gt,zt,jt,Ut,Qt,Ne,Wt,Jt,Yt,Kt,Et,De,Ct,R],styles:[".container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{margin-top:1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:1.625rem;padding:0 .375rem;margin:.25rem;line-height:1.5625rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem 1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0}"]})}}return t})();var aa=()=>[5,10,25,50,100];function ra(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function oa(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"dateFormat"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.transferDate))}}function la(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function sa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferAmount)}}function ca(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function pa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferDescription)}}function ma(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function da(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"yesNo"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.reversed))}}function ua(t,p){t&1&&_(0,"tr",18)}function fa(t,p){t&1&&_(0,"tr",19)}var oe=(()=>{class t{constructor(){this.route=T($),this.dataSource=new Ot,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(i=>{this.listTransactionData=i.listTransactionData,this.dataSource=new Ot(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(m,s){if(m&1&&Mt(Et,7),m&2){let f;kt(f=Bt())&&(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(m,s){m&1&&(a(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),n(),a(7,"div",4),r(8),n(),a(9,"div",3),r(10),o(11,"translate"),n(),a(12,"div",4),r(13),n(),a(14,"div",3),r(15),o(16,"translate"),n(),a(17,"div",4),r(18),n()()()()(),a(19,"div",5)(20,"table",6),N(21,7),y(22,ra,3,3,"th",8)(23,oa,3,3,"td",9),q(),N(24,10),y(25,la,3,3,"th",8)(26,sa,2,1,"td",9),q(),N(27,11),y(28,ca,3,3,"th",8)(29,pa,2,1,"td",9),q(),N(30,12),y(31,ma,3,3,"th",8)(32,da,3,3,"td",9),q(),y(33,ua,1,0,"tr",13)(34,fa,1,0,"tr",14),n(),_(35,"mat-paginator",15),n()),m&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",G(18,aa)))},dependencies:[V,L,U,z,$t,Gt,zt,jt,Ut,Qt,Wt,Jt,Yt,Kt,Et,Ct,R,He],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 _a(t,p){t&1&&(a(0,"button",15),_(1,"fa-icon",16),r(2),o(3,"translate"),n()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function Ca(t,p){t&1&&(a(0,"span"),y(1,_a,4,3,"button",14),n()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}function va(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.fromAccountType.value)," ")}}function ga(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.toAccountType.value)," ")}}var le=(()=>{class t{constructor(){this.route=T($),this.location=T(Se),this.route.data.subscribe(i=>{this.viewAccountTransferData=i.viewAccountTransferData})}transferToClient(i){return`/#/clients/${i.id}`}transferToAccount(i,m){return`/#/clients/${i.id}/savings-accounts/${m.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-account-transfer"]],decls:97,vars:66,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"transfer-container"],[1,"status-indicator",3,"ngClass"],[1,"transfer-section"],[1,"section-title"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],["class","info-value",4,"ngIf"],[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(m,s){m&1&&(a(0,"div",0)(1,"div",1),C(2,Ca,2,1,"span"),n(),a(3,"mat-card")(4,"mat-card-content")(5,"div",2),_(6,"div",3),a(7,"section",4)(8,"h3",5),r(9),o(10,"translate"),n(),_(11,"mat-divider"),a(12,"div",6)(13,"div",7)(14,"span",8),r(15),o(16,"translate"),n(),a(17,"span",9),r(18),o(19,"formatNumber"),n()(),a(20,"div",7)(21,"span",8),r(22),o(23,"translate"),n(),a(24,"span",9),r(25),o(26,"dateFormat"),n()(),a(27,"div",7)(28,"span",8),r(29),o(30,"translate"),n(),a(31,"span",9),r(32),n()()()(),a(33,"section",4)(34,"h3",5),r(35),o(36,"translate"),n(),_(37,"mat-divider"),a(38,"div",6)(39,"div",7)(40,"span",8),r(41),o(42,"translate"),n(),a(43,"span",9),r(44),n()(),a(45,"div",7)(46,"span",8),r(47),o(48,"translate"),n(),a(49,"span",9),r(50),n()(),a(51,"div",7)(52,"span",8),r(53),o(54,"translate"),n(),y(55,va,3,3,"span",10),n(),a(56,"div",7)(57,"span",8),r(58),o(59,"translate"),n(),a(60,"span",9),r(61),n()()()(),a(62,"section",4)(63,"h3",5),r(64),o(65,"translate"),n(),_(66,"mat-divider"),a(67,"div",6)(68,"div",7)(69,"span",8),r(70),o(71,"translate"),n(),a(72,"span",9),r(73),n()(),a(74,"div",7)(75,"span",8),r(76),o(77,"translate"),n(),a(78,"span",9)(79,"a",11),r(80),n()()(),a(81,"div",7)(82,"span",8),r(83),o(84,"translate"),n(),y(85,ga,3,3,"span",10),n(),a(86,"div",7)(87,"span",8),r(88),o(89,"translate"),n(),a(90,"span",9)(91,"a",11),r(92),n()()()()()()(),a(93,"mat-card-actions",12)(94,"button",13),h("click",function(){return s.goBack()}),r(95),o(96,"translate"),n()()()()),m&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(3),c(l(10,32,"labels.heading.Transaction Details")),e(6),u("",l(16,34,"labels.inputs.Transaction Amount"),":"),e(3),Te(" ",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.displaySymbol," ",l(19,36,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.code,") "),e(4),u("",l(23,38,"labels.inputs.Transaction Date"),":"),e(3),c(l(26,40,s.viewAccountTransferData.transferDate)),e(4),u("",l(30,42,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(3),c(l(36,44,"labels.heading.Transferred From")),e(6),u("",l(42,46,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice==null?null:s.viewAccountTransferData.fromOffice.name),e(3),u("",l(48,48,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient==null?null:s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(54,50,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.fromAccountType==null?null:s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(59,52,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount==null?null:s.viewAccountTransferData.fromAccount.accountNo),e(3),c(l(65,54,"labels.heading.Transferred To")),e(6),u("",l(71,56,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice==null?null:s.viewAccountTransferData.toOffice.name),e(3),u("",l(77,58,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),ce),e(),u(" ",s.viewAccountTransferData.toClient==null?null:s.viewAccountTransferData.toClient.displayName," "),e(3),u("",l(84,60,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.toAccountType==null?null:s.viewAccountTransferData.toAccountType.value),e(3),u("",l(89,62,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),ce),e(),u(" ",s.viewAccountTransferData.toAccount==null?null:s.viewAccountTransferData.toAccount.accountNo," "),e(3),u(" ",l(96,64,"labels.buttons.Back")," "))},dependencies:[V,ye,Ee,L,U,z,st,Q,W,vt,yt,Ct,R,Le],styles:[".transfer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;position:relative;padding-left:20px}.status-indicator[_ngcontent-%COMP%]{position:absolute;top:0;left:-16px;width:4px;height:100%;border-radius:2px}.transfer-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-title[_ngcontent-%COMP%]{margin:0;font-size:1.125rem;font-weight:500}mat-divider[_ngcontent-%COMP%]{margin-bottom:.5rem}.info-grid[_ngcontent-%COMP%]{display:grid;gap:.75rem}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(150px,200px) auto;gap:1rem;align-items:start}@media (width <= 768px){.info-row[_ngcontent-%COMP%]{grid-template-columns:100%;gap:.25rem}}.info-label[_ngcontent-%COMP%]{font-weight:500}@media (width <= 768px){.info-label[_ngcontent-%COMP%]{font-size:.875rem}}.info-value[_ngcontent-%COMP%]{word-break:break-word}.info-value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var se=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.queryParamMap.get("officeId"),s=i.queryParamMap.get("accountType"),f=i.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,m,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){switch(i.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=i.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(J)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(m,s,f)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ie=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ia=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:se}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ae,resolve:{accountTransferTemplate:ve}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:re,resolve:{standingIntructionsTemplate:se}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:le,resolve:{viewAccountTransferData:Ie}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Zt,resolve:{standingInstructionsData:_e}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ne,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:oe,resolve:{listTransactionData:ge}}]}]}],Qe=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({providers:[_e,Ce,se,ve,ge,Ie],imports:[pe.forChild(Ia),pe]})}}return t})();var Ta=t=>({balance:t});function xa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ha(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 ba(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",15),r(2),o(3,"translate"),n()),t&2){let i=x();e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,Ta,i.balance))," ")}}function Sa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),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 We=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({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(m,s){if(m&1){let f=F();a(0,"form",2)(1,"div",3)(2,"mat-form-field",4),h("click",function(){b(f);let w=M(9);return S(w.open())}),a(3,"mat-label"),r(4),o(5,"translate"),n(),_(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),C(10,xa,7,9,"mat-error"),n(),a(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),n(),_(20,"input",9),n(),a(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",10),n(),a(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),n(),_(30,"input",11),n(),a(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),n(),_(35,"input",13,1),C(37,ha,7,9,"mat-error"),C(38,ba,4,6,"mat-error"),n(),a(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"textarea",14),C(44,Sa,7,9,"mat-error"),n()()()}if(m&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:[V,L,at,K,bt,X,it,lt,rt,ot,tt,Z,ct,pt,et,ft,_t,ut,vt,Ht,R],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 ml=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({imports:[Ge,$e,ze,Qe,Zt,ne,ie,ae,re,oe,le,We]})}}return t})();export{ml as AccountTransfersModule}; diff --git a/browser/chunk-2TCTDLYI.js b/browser/chunk-4LRUVBWU.js similarity index 81% rename from browser/chunk-2TCTDLYI.js rename to browser/chunk-4LRUVBWU.js index 591f643cd..4cbe17a00 100644 --- a/browser/chunk-2TCTDLYI.js +++ b/browser/chunk-4LRUVBWU.js @@ -1 +1 @@ -import{G as i,K as r,lg as n}from"./chunk-MPQURN5W.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,lg as n}from"./chunk-YFBSP33D.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-H57SRJU3.js b/browser/chunk-HSO7PUER.js similarity index 91% rename from browser/chunk-H57SRJU3.js rename to browser/chunk-HSO7PUER.js index c9f239dd3..557287cc1 100644 --- a/browser/chunk-H57SRJU3.js +++ b/browser/chunk-HSO7PUER.js @@ -1 +1 @@ -import{G as r,K as i,lg as n}from"./chunk-MPQURN5W.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,lg as n}from"./chunk-YFBSP33D.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-DQ5ARSNI.js b/browser/chunk-L23REQE4.js similarity index 99% rename from browser/chunk-DQ5ARSNI.js rename to browser/chunk-L23REQE4.js index 2f76b9eb8..858e0089f 100644 --- a/browser/chunk-DQ5ARSNI.js +++ b/browser/chunk-L23REQE4.js @@ -1 +1 @@ -import{C as y,G as o,J as v,K as u,Kc as C,Nb as a,Qb as h,R as b,Tc as l,b as f}from"./chunk-MPQURN5W.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.allowPartialPeriodInterestCalculation=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,Kc as C,Nb as a,Qb as h,R as b,Tc as l,b as f}from"./chunk-YFBSP33D.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.allowPartialPeriodInterestCalculation=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-6VWRXOOR.js b/browser/chunk-M2LEJORY.js similarity index 97% rename from browser/chunk-6VWRXOOR.js rename to browser/chunk-M2LEJORY.js index 32e77514c..659004125 100644 --- a/browser/chunk-6VWRXOOR.js +++ b/browser/chunk-M2LEJORY.js @@ -1 +1 @@ -import{B as h,G as g,K as l,Mb as m,Nb as o,Nc as i,Qb as I}from"./chunk-MPQURN5W.js";import{a as u,b as d}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(I)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new o().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new o().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new o().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let a=Object.getOwnPropertyNames(e);for(let p=0;p{let a=JSON.stringify(d(u({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/partyinfo`,a,{headers:e})}))}sendInterbankTransfer(t){let n=new m({"Content-Type":"application/json"});return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=g({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; +import{B as h,G as g,K as l,Mb as m,Nb as o,Nc as i,Qb as I}from"./chunk-YFBSP33D.js";import{a as u,b as d}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(I)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new o().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new o().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new o().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let a=Object.getOwnPropertyNames(e);for(let p=0;p{let a=JSON.stringify(d(u({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/partyinfo`,a,{headers:e})}))}sendInterbankTransfer(t){let n=new m({"Content-Type":"application/json"});return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=g({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; diff --git a/browser/chunk-GO3DT7AZ.js b/browser/chunk-N4NIFIJT.js similarity index 97% rename from browser/chunk-GO3DT7AZ.js rename to browser/chunk-N4NIFIJT.js index b2ed8af23..dbd81d2bf 100644 --- a/browser/chunk-GO3DT7AZ.js +++ b/browser/chunk-N4NIFIJT.js @@ -1 +1 @@ -import{G as i,K as p,Nb as n,Qb as v,jg as c,k as u}from"./chunk-MPQURN5W.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,Nb as n,Qb as v,jg as c,k as u}from"./chunk-YFBSP33D.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-T23EOHOO.js b/browser/chunk-V57SPJXE.js similarity index 89% rename from browser/chunk-T23EOHOO.js rename to browser/chunk-V57SPJXE.js index 5a0ce7e7b..497844904 100644 --- a/browser/chunk-T23EOHOO.js +++ b/browser/chunk-V57SPJXE.js @@ -1 +1 @@ -import{Ac as x,Dc as b,Eb as f,Ec as v,Fc as D,Gc as M,K as m,Lc 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,qc as g,td as S,wa as d,xa as e,ya as i}from"./chunk-MPQURN5W.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{Ac as x,Dc as b,Eb as f,Ec as v,Fc as D,Gc as M,K as m,Lc 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,qc as g,td as S,wa as d,xa as e,ya as i}from"./chunk-YFBSP33D.js";var h=()=>({confirm:!0}),O=(()=>{class l{constructor(){this.dialogRef=m(x)}static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275cmp=p({type:l,selectors:[["mifosx-undo-transaction-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(r,y){r&1&&(e(0,"h1",0),o(1),n(2,"translate"),i(),e(3,"div",1)(4,"p"),o(5),n(6,"translate"),i()(),e(7,"mat-dialog-actions",2)(8,"button",3),o(9),n(10,"translate"),i(),e(11,"button",4),o(12),n(13,"translate"),i()()),r&2&&(t(),s(a(2,5,"labels.heading.Undo Transaction")),t(4),s(a(6,7,"labels.text.Are you sure you want to undo this transaction")),t(4),s(a(10,9,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",u(13,h)),t(),c(" ",a(13,11,"labels.buttons.Confirm")," "))},dependencies:[f,S,g,v,D,M,b,C],encapsulation:2})}}return l})();export{O as a}; diff --git a/browser/chunk-MPQURN5W.js b/browser/chunk-YFBSP33D.js similarity index 99% rename from browser/chunk-MPQURN5W.js rename to browser/chunk-YFBSP33D.js index 0086c245c..24b24d054 100644 --- a/browser/chunk-MPQURN5W.js +++ b/browser/chunk-YFBSP33D.js @@ -10,7 +10,7 @@ Arguments: `+Array.prototype.slice.call(v).join("")+` ${e.map((n,o)=>`${o+1}) ${n.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function Uc(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var Ee=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(Ze(n))try{n()}catch(r){i=r instanceof i3?r.errors:[r]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let r of o)try{ax(r)}catch(a){i=i??[],a instanceof i3?i=[...i,...a.errors]:i.push(a)}}if(i)throw new i3(i)}}add(i){var e;if(i&&i!==this)if(this.closed)ax(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)&&Uc(e,i)}remove(i){let{_finalizers:e}=this;e&&Uc(e,i),i instanceof t&&i._removeParent(this)}};Ee.EMPTY=(()=>{let t=new Ee;return t.closed=!0,t})();var Bg=Ee.EMPTY;function o3(t){return t instanceof Ee||t&&"closed"in t&&Ze(t.remove)&&Ze(t.add)&&Ze(t.unsubscribe)}function ax(t){Ze(t)?t():t.unsubscribe()}var Pr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var d1={setTimeout(t,i,...e){let{delegate:n}=d1;return n?.setTimeout?n.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=d1;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function r3(t){d1.setTimeout(()=>{let{onUnhandledError:i}=Pr;if(i)i(t);else throw t})}function $c(){}var sx=jg("C",void 0,void 0);function cx(t){return jg("E",void 0,t)}function lx(t){return jg("N",t,void 0)}function jg(t,i,e){return{kind:t,value:i,error:e}}var Gc=null;function u1(t){if(Pr.useDeprecatedSynchronousErrorHandling){let i=!Gc;if(i&&(Gc={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:n}=Gc;if(Gc=null,e)throw n}}else t()}function dx(t){Pr.useDeprecatedSynchronousErrorHandling&&Gc&&(Gc.errorThrown=!0,Gc.error=t)}var Wc=class extends Ee{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,o3(i)&&i.add(this)):this.destination=F$}static create(i,e,n){return new Lr(i,e,n)}next(i){this.isStopped?Ug(lx(i),this):this._next(i)}error(i){this.isStopped?Ug(cx(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?Ug(sx,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()}}},z$=Function.prototype.bind;function Hg(t,i){return z$.call(t,i)}var $g=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(n){a3(n)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(n){a3(n)}else a3(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){a3(e)}}},Lr=class extends Wc{constructor(i,e,n){super();let o;if(Ze(i)||!i)o={next:i??void 0,error:e??void 0,complete:n??void 0};else{let r;this&&Pr.useDeprecatedNextContext?(r=Object.create(i),r.unsubscribe=()=>this.unsubscribe(),o={next:i.next&&Hg(i.next,r),error:i.error&&Hg(i.error,r),complete:i.complete&&Hg(i.complete,r)}):o=i}this.destination=new $g(o)}};function a3(t){Pr.useDeprecatedSynchronousErrorHandling?dx(t):r3(t)}function N$(t){throw t}function Ug(t,i){let{onStoppedNotification:e}=Pr;e&&d1.setTimeout(()=>e(t,i))}var F$={closed:!0,next:$c,error:N$,complete:$c};var m1=typeof Symbol=="function"&&Symbol.observable||"@@observable";function mo(t){return t}function Gg(...t){return Wg(t)}function Wg(t){return t.length===0?mo: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=B$(e)?e:new Lr(e,n,o);return u1(()=>{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=ux(n),new n((o,r)=>{let a=new Lr({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)}[m1](){return this}pipe(...e){return Wg(e)(this)}toPromise(e){return e=ux(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 ux(t){var i;return(i=t??Pr.Promise)!==null&&i!==void 0?i:Promise}function V$(t){return t&&Ze(t.next)&&Ze(t.error)&&Ze(t.complete)}function B$(t){return t&&t instanceof Wc||V$(t)&&o3(t)}function Yg(t){return Ze(t?.lift)}function Ke(t){return i=>{if(Yg(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 qe(t,i,e,n,o){return new qg(t,i,e,n,o)}var qg=class extends Wc{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 p1(){return Ke((t,i)=>{let e=null;t._refCount++;let n=qe(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 Bs=class extends Fe{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Yg(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 Ee;let e=this.getSubject();i.add(this.source.subscribe(qe(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Ee.EMPTY)}return i}refCount(){return p1()(this)}};var f1={schedule(t){let i=requestAnimationFrame,e=cancelAnimationFrame,{delegate:n}=f1;n&&(i=n.requestAnimationFrame,e=n.cancelAnimationFrame);let o=i(r=>{e=void 0,t(r)});return new Ee(()=>e?.(o))},requestAnimationFrame(...t){let{delegate:i}=f1;return(i?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:i}=f1;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var mx=Vs(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 s3(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new mx}next(e){u1(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){u1(()=>{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(){u1(()=>{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?Bg:(this.currentObservers=null,r.push(e),new Ee(()=>{this.currentObservers=null,Uc(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 s3(i,e),t})(),s3=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:Bg}};var ut=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 R2={now(){return(R2.delegate||Date).now()},delegate:void 0};var Ar=class extends B{constructor(i=1/0,e=1/0,n=R2){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=f1.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&&(f1.cancelAnimationFrame(e),i._scheduled=void 0)}};var d3=class extends _1{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 u3=new d3(l3);var Pn=new Fe(t=>t.complete());function m3(t){return t&&Ze(t.schedule)}function Qg(t){return t[t.length-1]}function p3(t){return Ze(Qg(t))?t.pop():void 0}function ma(t){return m3(Qg(t))?t.pop():void 0}function fx(t,i){return typeof Qg(t)=="number"?t.pop():i}function At(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 gx(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{u(n.next(f))}catch(h){a(h)}}function c(f){try{u(n.throw(f))}catch(h){a(h)}}function u(f){f.done?r(f.value):o(f.value).then(s,c)}u((n=n.apply(t,i||[])).next())})}function hx(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 _x(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(x){return function(D){return Promise.resolve(D).then(x,h)}}function s(x,D){n[x]&&(o[x]=function(Y){return new Promise(function(Q,X){r.push([x,Y,Q,X])>1||c(x,Y)})},D&&(o[x]=D(o[x])))}function c(x,D){try{u(n[x](D))}catch(Y){y(r[0][3],Y)}}function u(x){x.value instanceof Yc?Promise.resolve(x.value.v).then(f,h):y(r[0][2],x)}function f(x){c("next",x)}function h(x){c("throw",x)}function y(x,D){x(D),r.shift(),r.length&&c(r[0][0],r[0][1])}}function bx(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 hx=="function"?hx(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(u){r({value:u,done:s})},a)}}var b1=t=>t&&typeof t.length=="number"&&typeof t!="function";function f3(t){return Ze(t?.then)}function h3(t){return Ze(t[m1])}function g3(t){return Symbol.asyncIterator&&Ze(t?.[Symbol.asyncIterator])}function _3(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 j$(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var b3=j$();function v3(t){return Ze(t?.[b3])}function y3(t){return _x(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 C3(t){return Ze(t?.getReader)}function Rt(t){if(t instanceof Fe)return t;if(t!=null){if(h3(t))return H$(t);if(b1(t))return U$(t);if(f3(t))return $$(t);if(g3(t))return vx(t);if(v3(t))return G$(t);if(C3(t))return W$(t)}throw _3(t)}function H$(t){return new Fe(i=>{let e=t[m1]();if(Ze(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function U$(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,r3)})}function G$(t){return new Fe(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function vx(t){return new Fe(i=>{Y$(t,i).catch(e=>i.error(e))})}function W$(t){return vx(y3(t))}function Y$(t,i){var e,n,o,r;return gx(this,void 0,void 0,function*(){try{for(e=bx(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 Wi(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 x3(t,i=0){return Ke((e,n)=>{e.subscribe(qe(n,o=>Wi(n,t,()=>n.next(o),i),()=>Wi(n,t,()=>n.complete(),i),o=>Wi(n,t,()=>n.error(o),i)))})}function M3(t,i=0){return Ke((e,n)=>{n.add(t.schedule(()=>e.subscribe(n),i))})}function yx(t,i){return Rt(t).pipe(M3(i),x3(i))}function Cx(t,i){return Rt(t).pipe(M3(i),x3(i))}function xx(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 Mx(t,i){return new Fe(e=>{let n;return Wi(e,i,()=>{n=t[b3](),Wi(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)}),()=>Ze(n?.return)&&n.return()})}function w3(t,i){if(!t)throw new Error("Iterable cannot be null");return new Fe(e=>{Wi(e,i,()=>{let n=t[Symbol.asyncIterator]();Wi(e,i,()=>{n.next().then(o=>{o.done?e.complete():e.next(o.value)})},0,!0)})})}function wx(t,i){return w3(y3(t),i)}function Dx(t,i){if(t!=null){if(h3(t))return yx(t,i);if(b1(t))return xx(t,i);if(f3(t))return Cx(t,i);if(g3(t))return w3(t,i);if(v3(t))return Mx(t,i);if(C3(t))return wx(t,i)}throw _3(t)}function Zt(t,i){return i?Dx(t,i):Rt(t)}function ne(...t){let i=ma(t);return Zt(t,i)}function Lo(t,i){let e=Ze(t)?t:()=>t,n=o=>o.error(e());return new Fe(i?o=>i.schedule(n,0,o):n)}function hi(t){return!!t&&(t instanceof Fe||Ze(t.lift)&&Ze(t.subscribe))}var zr=Vs(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Kg(t,i){let e=typeof i=="object";return new Promise((n,o)=>{let r=new Lr({next:a=>{n(a),r.unsubscribe()},error:o,complete:()=>{e?n(i.defaultValue):o(new zr)}});t.subscribe(r)})}function D3(t){return t instanceof Date&&!isNaN(t)}var q$=Vs(t=>function(e=null){t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e});function Xg(t,i){let{first:e,each:n,with:o=Q$,scheduler:r=i??Rr,meta:a=null}=D3(t)?{first:t}:typeof t=="number"?{each:t}:t;if(e==null&&n==null)throw new TypeError("No timeout provided.");return Ke((s,c)=>{let u,f,h=null,y=0,x=D=>{f=Wi(c,r,()=>{try{u.unsubscribe(),Rt(o({meta:a,lastValue:h,seen:y})).subscribe(c)}catch(Y){c.error(Y)}},D)};u=s.subscribe(qe(c,D=>{f?.unsubscribe(),y++,c.next(h=D),n>0&&x(n)},void 0,void 0,()=>{f?.closed||f?.unsubscribe(),h=null})),!y&&x(e!=null?typeof e=="number"?e:+e-r.now():n)})}function Q$(t){throw new q$(t)}function le(t,i){return Ke((e,n)=>{let o=0;e.subscribe(qe(n,r=>{n.next(t.call(i,r,o++))}))})}var{isArray:K$}=Array;function X$(t,i){return K$(i)?t(...i):t(i)}function v1(t){return le(i=>X$(t,i))}var{isArray:Z$}=Array,{getPrototypeOf:J$,prototype:eG,keys:tG}=Object;function S3(t){if(t.length===1){let i=t[0];if(Z$(i))return{args:i,keys:null};if(nG(i)){let e=tG(i);return{args:e.map(n=>i[n]),keys:e}}}return{args:t,keys:null}}function nG(t){return t&&typeof t=="object"&&J$(t)===eG}function k3(t,i){return t.reduce((e,n,o)=>(e[n]=i[o],e),{})}function ii(...t){let i=ma(t),e=p3(t),{args:n,keys:o}=S3(t);if(n.length===0)return Zt([],i);let r=new Fe(iG(n,i,o?a=>k3(o,a):mo));return e?r.pipe(v1(e)):r}function iG(t,i,e=mo){return n=>{Sx(i,()=>{let{length:o}=t,r=new Array(o),a=o,s=o;for(let c=0;c{let u=Zt(t[c],i),f=!1;u.subscribe(qe(n,h=>{r[c]=h,f||(f=!0,s--),s||n.next(e(r.slice()))},()=>{--a||n.complete()}))},n)},n)}}function Sx(t,i,e){t?Wi(e,t,i):i()}function kx(t,i,e,n,o,r,a,s){let c=[],u=0,f=0,h=!1,y=()=>{h&&!c.length&&!u&&i.complete()},x=Y=>u{r&&i.next(Y),u++;let Q=!1;Rt(e(Y,f++)).subscribe(qe(i,X=>{o?.(X),r?x(X):i.next(X)},()=>{Q=!0},void 0,()=>{if(Q)try{for(u--;c.length&&uD(X)):D(X)}y()}catch(X){i.error(X)}}))};return t.subscribe(qe(i,x,()=>{h=!0,y()})),()=>{s?.()}}function cn(t,i,e=1/0){return Ze(i)?cn((n,o)=>le((r,a)=>i(n,r,o,a))(Rt(t(n,o))),e):(typeof i=="number"&&(e=i),Ke((n,o)=>kx(n,o,t,e)))}function pa(t=1/0){return cn(mo,t)}function Ex(){return pa(1)}function Yi(...t){return Ex()(Zt(t,ma(t)))}function qi(t){return new Fe(i=>{Rt(t()).subscribe(i)})}function Ja(...t){let i=p3(t),{args:e,keys:n}=S3(t),o=new Fe(r=>{let{length:a}=e;if(!a){r.complete();return}let s=new Array(a),c=a,u=a;for(let f=0;f{h||(h=!0,u--),s[f]=y},()=>c--,void 0,()=>{(!c||!h)&&(u||r.next(n?k3(n,s):s),r.complete())}))}});return i?o.pipe(v1(i)):o}var oG=["addListener","removeListener"],rG=["addEventListener","removeEventListener"],aG=["on","off"];function N2(t,i,e,n){if(Ze(e)&&(n=e,e=void 0),n)return N2(t,i,e).pipe(v1(n));let[o,r]=lG(t)?rG.map(a=>s=>t[a](i,s,e)):sG(t)?oG.map(Ix(t,i)):cG(t)?aG.map(Ix(t,i)):[];if(!o&&b1(t))return cn(a=>N2(a,i,e))(Rt(t));if(!o)throw new TypeError("Invalid event target");return new Fe(a=>{let s=(...c)=>a.next(1r(s)})}function Ix(t,i){return e=>n=>t[e](i,n)}function sG(t){return Ze(t.addListener)&&Ze(t.removeListener)}function cG(t){return Ze(t.on)&&Ze(t.off)}function lG(t){return Ze(t.addEventListener)&&Ze(t.removeEventListener)}function es(t=0,i,e=px){let n=-1;return i!=null&&(m3(i)?e=i:n=i),new Fe(o=>{let r=D3(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 Zg(t=0,i=Rr){return t<0&&(t=0),es(t,t,i)}function pt(...t){let i=ma(t),e=fx(t,1/0),n=t;return n.length?n.length===1?Rt(n[0]):pa(e)(Zt(n,i)):Pn}var{isArray:dG}=Array;function Ox(t){return t.length===1&&dG(t[0])?t[0]:t}function Oe(t,i){return Ke((e,n)=>{let o=0;e.subscribe(qe(n,r=>t.call(i,r,o++)&&n.next(r)))})}function Jg(...t){return t=Ox(t),t.length===1?Rt(t[0]):new Fe(uG(t))}function uG(t){return i=>{let e=[];for(let n=0;e&&!i.closed&&n{if(e){for(let r=0;r{let n=!1,o=null,r=null,a=!1,s=()=>{if(r?.unsubscribe(),r=null,n){n=!1;let u=o;o=null,e.next(u)}a&&e.complete()},c=()=>{r=null,a&&e.complete()};i.subscribe(qe(e,u=>{n=!0,o=u,r||Rt(t(u)).subscribe(r=qe(e,s,c))},()=>{a=!0,(!n||!r||r.closed)&&e.complete()}))})}function y1(t,i=Rr){return Tx(()=>es(t,i))}function hn(t){return Ke((i,e)=>{let n=null,o=!1,r;n=i.subscribe(qe(e,void 0,void 0,a=>{r=Rt(t(a,hn(t)(i))),n?(n.unsubscribe(),n=null,r.subscribe(e)):o=!0})),o&&(n.unsubscribe(),n=null,r.subscribe(e))})}function E3(t,i,e,n,o){return(r,a)=>{let s=e,c=i,u=0;r.subscribe(qe(a,f=>{let h=u++;c=s?t(c,f,h):(s=!0,f),n&&a.next(c)},o&&(()=>{s&&a.next(c),a.complete()})))}}function I3(t,i){return Ke(E3(t,i,arguments.length>=2,!1,!0))}function po(t,i){return Ze(i)?cn(t,i,1):cn(t,1)}function $o(t,i=Rr){return Ke((e,n)=>{let o=null,r=null,a=null,s=()=>{if(o){o.unsubscribe(),o=null;let u=r;r=null,n.next(u)}};function c(){let u=a+t,f=i.now();if(f{r=u,a=i.now(),o||(o=i.schedule(c,t),n.add(o))},()=>{s(),n.complete()},void 0,()=>{r=o=null}))})}function js(t){return Ke((i,e)=>{let n=!1;i.subscribe(qe(e,o=>{n=!0,e.next(o)},()=>{n||e.next(t),e.complete()}))})}function Ve(t){return t<=0?()=>Pn:Ke((i,e)=>{let n=0;i.subscribe(qe(e,o=>{++n<=t&&(e.next(o),t<=n&&e.complete())}))})}function Px(){return Ke((t,i)=>{t.subscribe(qe(i,$c))})}function C1(t){return le(()=>t)}function e8(t,i){return i?e=>Yi(i.pipe(Ve(1),Px()),e.pipe(e8(t))):cn((e,n)=>Rt(t(e,n)).pipe(Ve(1),C1(e)))}function ts(t,i=Rr){let e=es(t,i);return e8(()=>e)}function x1(t,i=mo){return t=t??mG,Ke((e,n)=>{let o,r=!0;e.subscribe(qe(n,a=>{let s=i(a);(r||!t(o,s))&&(r=!1,o=s,n.next(a))}))})}function mG(t,i){return t===i}function O3(t=pG){return Ke((i,e)=>{let n=!1;i.subscribe(qe(e,o=>{n=!0,e.next(o)},()=>n?e.complete():e.error(t())))})}function pG(){return new zr}function Nr(t){return Ke((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function Ao(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Oe((o,r)=>t(o,r,n)):mo,Ve(1),e?js(i):O3(()=>new zr))}function M1(t){return t<=0?()=>Pn:Ke((i,e)=>{let n=[];i.subscribe(qe(e,o=>{n.push(o),t{for(let o of n)e.next(o);e.complete()},void 0,()=>{n=null}))})}function t8(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Oe((o,r)=>t(o,r,n)):mo,M1(1),e?js(i):O3(()=>new zr))}function T3(){return Ke((t,i)=>{let e,n=!1;t.subscribe(qe(i,o=>{let r=e;e=o,n&&i.next([r,o]),n=!0}))})}function n8(t,i){return Ke(E3(t,i,arguments.length>=2,!0))}function F2(t={}){let{connector:i=()=>new B,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return r=>{let a,s,c,u=0,f=!1,h=!1,y=()=>{s?.unsubscribe(),s=void 0},x=()=>{y(),a=c=void 0,f=h=!1},D=()=>{let Y=a;x(),Y?.unsubscribe()};return Ke((Y,Q)=>{u++,!h&&!f&&y();let X=c=c??i();Q.add(()=>{u--,u===0&&!h&&!f&&(s=i8(D,o))}),X.subscribe(Q),!a&&u>0&&(a=new Lr({next:pe=>X.next(pe),error:pe=>{h=!0,y(),s=i8(x,e,pe),X.error(pe)},complete:()=>{f=!0,y(),s=i8(x,n),X.complete()}}),Rt(Y).subscribe(a))})(r)}}function i8(t,i,...e){if(i===!0){t();return}if(i===!1)return;let n=new Lr({next:()=>{n.unsubscribe(),t()}});return Rt(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,F2({connector:()=>new Ar(n,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function qc(t){return Oe((i,e)=>t<=e)}function Xe(...t){let i=ma(t);return Ke((e,n)=>{(i?Yi(t,e,i):Yi(t,e)).subscribe(n)})}function at(t,i){return Ke((e,n)=>{let o=null,r=0,a=!1,s=()=>a&&!o&&n.complete();e.subscribe(qe(n,c=>{o?.unsubscribe();let u=0,f=r++;Rt(t(c,f)).subscribe(o=qe(n,h=>n.next(i?i(c,h,f,u++):h),()=>{o=null,s()}))},()=>{a=!0,s()}))})}function xe(t){return Ke((i,e)=>{Rt(t).subscribe(qe(e,()=>e.complete(),$c)),!e.closed&&i.subscribe(e)})}function o8(t,i=!1){return Ke((e,n)=>{let o=0;e.subscribe(qe(n,r=>{let a=t(r,o++);(a||i)&&n.next(r),!a&&n.complete()}))})}function It(t,i,e){let n=Ze(t)||i||e?{next:t,error:i,complete:e}:t;return n?Ke((o,r)=>{var a;(a=n.subscribe)===null||a===void 0||a.call(n);let s=!0;o.subscribe(qe(r,c=>{var u;(u=n.next)===null||u===void 0||u.call(n,c),r.next(c)},()=>{var c;s=!1,(c=n.complete)===null||c===void 0||c.call(n),r.complete()},c=>{var u;s=!1,(u=n.error)===null||u===void 0||u.call(n,c),r.error(c)},()=>{var c,u;s&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):mo}function Lx(t){let i=ot(null);try{return t()}finally{ot(i)}}var Ax=Re(q({},Vc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Rx(t){if(t.dirty=!1,t.version>0&&!jc(t))return;t.version++;let i=Ns(t);try{t.cleanup(),t.fn()}finally{Bc(t,i)}}var R3="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",he=class extends Error{code;constructor(i,e){super(dr(i,e)),this.code=i}};function fG(t){return`NG0${Math.abs(t)}`}function dr(t,i){return`${fG(t)}${i?": "+i:""}`}var oi=globalThis;function Kt(t){for(let i in t)if(t[i]===Kt)return i;throw Error("")}function Fx(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function is(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(is).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 z3(t,i){return t?i?`${t} ${i}`:t:i||""}var hG=Kt({__forward_ref__:Kt});function Pt(t){return t.__forward_ref__=Pt,t.toString=function(){return is(this())},t}function gi(t){return g8(t)?t():t}function g8(t){return typeof t=="function"&&t.hasOwnProperty(hG)&&t.__forward_ref__===Pt}function z(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function J(t){return{providers:t.providers||[],imports:t.imports||[]}}function U2(t){return gG(t,N3)}function _8(t){return U2(t)!==null}function gG(t,i){return t.hasOwnProperty(i)&&t[i]||null}function _G(t){let i=t?.[N3]??null;return i||null}function a8(t){return t&&t.hasOwnProperty(L3)?t[L3]:null}var N3=Kt({\u0275prov:Kt}),L3=Kt({\u0275inj:Kt}),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=z({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function b8(t){return t&&!!t.\u0275providers}var v8=Kt({\u0275cmp:Kt}),y8=Kt({\u0275dir:Kt}),C8=Kt({\u0275pipe:Kt}),x8=Kt({\u0275mod:Kt}),B2=Kt({\u0275fac:Kt}),Jc=Kt({__NG_ELEMENT_ID__:Kt}),zx=Kt({__NG_ENV_ID__:Kt});function Ki(t){return typeof t=="string"?t:t==null?"":String(t)}function Vx(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ki(t)}var Bx=Kt({ngErrorCode:Kt}),bG=Kt({ngErrorMessage:Kt}),vG=Kt({ngTokenPath:Kt});function M8(t,i){return jx("",-200,i)}function F3(t,i){throw new he(-201,!1)}function jx(t,i,e){let n=new he(i,t);return n[Bx]=i,n[bG]=t,e&&(n[vG]=e),n}function yG(t){return t[Bx]}var s8;function Hx(){return s8}function fo(t){let i=s8;return s8=t,i}function w8(t,i,e){let n=U2(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;F3(t,"Injector")}var CG={},Qc=CG,c8="__NG_DI_FLAG__",l8=class{injector;constructor(i){this.injector=i}retrieve(i,e){let n=Kc(e)||0;try{return this.injector.get(i,n&8?null:Qc,n)}catch(o){if(c1(o))return o;throw o}}};function xG(t,i=0){let e=qm();if(e===void 0)throw new he(-203,!1);if(e===null)return w8(t,void 0,i);{let n=MG(i),o=e.retrieve(t,n);if(c1(o)){if(n.optional)return null;throw o}return o}}function be(t,i=0){return(Hx()||xG)(gi(t),i)}function d(t,i){return be(t,Kc(i))}function Kc(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function MG(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function d8(t){let i=[];for(let e=0;eArray.isArray(e)?V3(e,i):i(e))}function S8(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function $2(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function Gx(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 B3(t,i,e){let n=D1(t,i);return n>=0?t[n|1]=e:(n=~n,Wx(t,n,i,e)),n}function j3(t,i){let e=D1(t,i);if(e>=0)return t[e|1]}function D1(t,i){return DG(t,i,1)}function DG(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 V3(i,a=>{let s=a;A3(s,r,[],n)&&(o||=[],o.push(s))}),o!==void 0&&Qx(o,r),e}function Qx(t,i){for(let e=0;e{i(r,n)})}}function A3(t,i,e,n){if(t=gi(t),!t)return!1;let o=null,r=a8(t),a=!r&&fa(t);if(!r&&!a){let c=t.ngModule;if(r=a8(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 u of c)A3(u,i,e,n)}}else if(r){if(r.imports!=null&&!s){n.add(o);let u;try{V3(r.imports,f=>{A3(f,i,e,n)&&(u||=[],u.push(f))})}finally{}u!==void 0&&Qx(u,i)}if(!s){let u=Us(o)||(()=>new o);i({provide:o,useFactory:u,deps:Qi},o),i({provide:E8,useValue:o,multi:!0},o),i({provide:os,useValue:()=>be(o),multi:!0},o)}let c=r.providers;if(c!=null&&!s){let u=t;T8(c,f=>{i(f,u)})}}else return!1;return o!==t&&t.providers!==void 0}function T8(t,i){for(let e of t)b8(e)&&(e=e.\u0275providers),Array.isArray(e)?T8(e,i):i(e)}var SG=Kt({provide:String,useValue:Kt});function Kx(t){return t!==null&&typeof t=="object"&&SG in t}function kG(t){return!!(t&&t.useExisting)}function EG(t){return!!(t&&t.useFactory)}function Xc(t){return typeof t=="function"}function Xx(t){return!!t.useClass}var G2=new L(""),P3={},Nx={},r8;function S1(){return r8===void 0&&(r8=new j2),r8}var Jt=class{},Zc=class extends Jt{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,m8(i,a=>this.processProvider(a)),this.records.set(k8,w1(void 0,this)),o.has("environment")&&this.records.set(Jt,w1(void 0,this));let r=this.records.get(G2);r!=null&&typeof r.value=="string"&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(E8,Qi,{self:!0}))}retrieve(i,e){let n=Kc(e)||0;try{return this.get(i,Qc,n)}catch(o){if(c1(o))return o;throw o}}destroy(){V2(this),this._destroyed=!0;let i=ot(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(),ot(i)}}onDestroy(i){return V2(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){V2(this);let e=ua(this),n=fo(void 0),o;try{return i()}finally{ua(e),fo(n)}}get(i,e=Qc,n){if(V2(this),i.hasOwnProperty(zx))return i[zx](this);let o=Kc(n),r,a=ua(this),s=fo(void 0);try{if(!(o&4)){let u=this.records.get(i);if(u===void 0){let f=LG(i)&&U2(i);f&&this.injectableDefInScope(f)?u=w1(u8(i),P3):u=null,this.records.set(i,u)}if(u!=null)return this.hydrate(i,u,o)}let c=o&2?S1():this.parent;return e=o&8&&e===Qc?null:e,c.get(i,e)}catch(c){let u=yG(c);throw u===-200||u===-201?new he(u,null):c}finally{fo(s),ua(a)}}resolveInjectorInitializers(){let i=ot(null),e=ua(this),n=fo(void 0),o;try{let r=this.get(os,Qi,{self:!0});for(let a of r)a()}finally{ua(e),fo(n),ot(i)}}toString(){let i=[],e=this.records;for(let n of e.keys())i.push(is(n));return`R3Injector[${i.join(", ")}]`}processProvider(i){i=gi(i);let e=Xc(i)?i:gi(i&&i.provide),n=OG(i);if(!Xc(i)&&i.multi===!0){let o=this.records.get(e);o||(o=w1(void 0,P3,!0),o.factory=()=>d8(o.multi),this.records.set(e,o)),e=i,o.multi.push(i)}this.records.set(e,n)}hydrate(i,e,n){let o=ot(null);try{if(e.value===Nx)throw M8(is(i));return e.value===P3&&(e.value=Nx,e.value=e.factory(void 0,n)),typeof e.value=="object"&&e.value&&PG(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{ot(o)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=gi(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 u8(t){let i=U2(t),e=i!==null?i.factory:Us(t);if(e!==null)return e;if(t instanceof L)throw new he(204,!1);if(t instanceof Function)return IG(t);throw new he(204,!1)}function IG(t){if(t.length>0)throw new he(204,!1);let e=_G(t);return e!==null?()=>e.factory(t):()=>new t}function OG(t){if(Kx(t))return w1(void 0,t.useValue);{let i=P8(t);return w1(i,P3)}}function P8(t,i,e){let n;if(Xc(t)){let o=gi(t);return Us(o)||u8(o)}else if(Kx(t))n=()=>gi(t.useValue);else if(EG(t))n=()=>t.useFactory(...d8(t.deps||[]));else if(kG(t))n=(o,r)=>be(gi(t.useExisting),r!==void 0&&r&8?8:void 0);else{let o=gi(t&&(t.useClass||t.provide));if(TG(t))n=()=>new o(...d8(t.deps));else return Us(o)||u8(o)}return n}function V2(t){if(t.destroyed)throw new he(205,!1)}function w1(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function TG(t){return!!t.deps}function PG(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function LG(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function m8(t,i){for(let e of t)Array.isArray(e)?m8(e,i):e&&b8(e)?m8(e.\u0275providers,i):i(e)}function Si(t,i){let e;t instanceof Zc?(V2(t),e=t):e=new l8(t);let n,o=ua(e),r=fo(void 0);try{return i()}finally{ua(o),fo(r)}}function L8(){return Hx()!==void 0||qm()!=null}var Vr=0,Qe=1,st=2,_i=3,ur=4,ho=5,el=6,k1=7,$n=8,rs=9,ga=10,en=11,E1=12,A8=13,tl=14,Xi=15,Gs=16,nl=17,_a=18,W2=19,R8=20,ns=21,U3=22,as=23,Go=24,il=25,ol=26,ln=27,Zx=1,z8=6,Ws=7,Y2=8,rl=9,Gn=10;function ba(t){return Array.isArray(t)&&typeof t[Zx]=="object"}function Br(t){return Array.isArray(t)&&t[Zx]===!0}function N8(t){return(t.flags&4)!==0}function ss(t){return t.componentOffset>-1}function I1(t){return(t.flags&1)===1}function jr(t){return!!t.template}function O1(t){return(t[st]&512)!==0}function al(t){return(t[st]&256)===256}var F8="svg",Jx="math";function mr(t){for(;Array.isArray(t);)t=t[Vr];return t}function V8(t,i){return mr(i[t])}function pr(t,i){return mr(i[t.index])}function q2(t,i){return t.data[i]}function T1(t,i){return t[i]}function B8(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}function fr(t,i){let e=i[t];return ba(e)?e:e[Vr]}function eM(t){return(t[st]&4)===4}function $3(t){return(t[st]&128)===128}function tM(t){return Br(t[_i])}function Wo(t,i){return i==null?null:t[i]}function j8(t){t[nl]=0}function H8(t){t[st]&1024||(t[st]|=1024,$3(t)&&Ys(t))}function nM(t,i){for(;t>0;)i=i[tl],t--;return i}function Q2(t){return!!(t[st]&9216||t[Go]?.dirty)}function G3(t){t[ga].changeDetectionScheduler?.notify(8),t[st]&64&&(t[st]|=1024),Q2(t)&&Ys(t)}function Ys(t){t[ga].changeDetectionScheduler?.notify(0);let i=$s(t);for(;i!==null&&!(i[st]&8192||(i[st]|=8192,!$3(i)));)i=$s(i)}function U8(t,i){if(al(t))throw new he(911,!1);t[ns]===null&&(t[ns]=[]),t[ns].push(i)}function iM(t,i){if(t[ns]===null)return;let e=t[ns].indexOf(i);e!==-1&&t[ns].splice(e,1)}function $s(t){let i=t[_i];return Br(i)?i[_i]:i}function $8(t){return t[k1]??=[]}function G8(t){return t.cleanup??=[]}function oM(t,i,e,n){let o=$8(i);o.push(e),t.firstCreatePass&&G8(t).push(n,o.length-1)}var xt={lFrame:hM(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var p8=!1;function rM(){return xt.lFrame.elementDepthCount}function aM(){xt.lFrame.elementDepthCount++}function W8(){xt.lFrame.elementDepthCount--}function W3(){return xt.bindingsEnabled}function Y8(){return xt.skipHydrationRootTNode!==null}function q8(t){return xt.skipHydrationRootTNode===t}function Q8(){xt.skipHydrationRootTNode=null}function ze(){return xt.lFrame.lView}function dn(){return xt.lFrame.tView}function j(t){return xt.lFrame.contextLView=t,t[$n]}function H(t){return xt.lFrame.contextLView=null,t}function ri(){let t=K8();for(;t!==null&&t.type===64;)t=t.parent;return t}function K8(){return xt.lFrame.currentTNode}function sM(){let t=xt.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function P1(t,i){let e=xt.lFrame;e.currentTNode=t,e.isParent=i}function X8(){return xt.lFrame.isParent}function Z8(){xt.lFrame.isParent=!1}function cM(){return xt.lFrame.contextLView}function J8(){return p8}function L1(t){let i=p8;return p8=t,i}function cs(){let t=xt.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function Y3(){return xt.lFrame.bindingIndex}function lM(t){return xt.lFrame.bindingIndex=t}function va(){return xt.lFrame.bindingIndex++}function A1(t){let i=xt.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function dM(){return xt.lFrame.inI18n}function uM(t,i){let e=xt.lFrame;e.bindingIndex=e.bindingRootIndex=t,q3(i)}function mM(){return xt.lFrame.currentDirectiveIndex}function q3(t){xt.lFrame.currentDirectiveIndex=t}function pM(t){let i=xt.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}function Q3(){return xt.lFrame.currentQueryIndex}function K2(t){xt.lFrame.currentQueryIndex=t}function AG(t){let i=t[Qe];return i.type===2?i.declTNode:i.type===1?t[ho]:null}function e5(t,i,e){if(e&4){let o=i,r=t;for(;o=o.parent,o===null&&!(e&1);)if(o=AG(r),o===null||(r=r[tl],o.type&10))break;if(o===null)return!1;i=o,t=r}let n=xt.lFrame=fM();return n.currentTNode=i,n.lView=t,!0}function K3(t){let i=fM(),e=t[Qe];xt.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function fM(){let t=xt.lFrame,i=t===null?null:t.child;return i===null?hM(t):i}function hM(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 gM(){let t=xt.lFrame;return xt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var t5=gM;function X3(){let t=gM();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 _M(t){return(xt.lFrame.contextLView=nM(t,xt.lFrame.contextLView))[$n]}function hr(){return xt.lFrame.selectedIndex}function qs(t){xt.lFrame.selectedIndex=t}function R1(){let t=xt.lFrame;return q2(t.tView,t.selectedIndex)}function qt(){xt.lFrame.currentNamespace=F8}function gr(){RG()}function RG(){xt.lFrame.currentNamespace=null}function bM(){return xt.lFrame.currentNamespace}var vM=!0;function Z3(){return vM}function X2(t){vM=t}function f8(t,i=null,e=null,n){let o=n5(t,i,e,n);return o.resolveInjectorInitializers(),o}function n5(t,i=null,e=null,n,o=new Set){let r=[e||Qi,qx(t)];return n=n||(typeof t=="object"?void 0:is(t)),new Zc(r,i||S1(),n||null,o)}var Ce=class t{static THROW_IF_NOT_FOUND=Qc;static NULL=new j2;static create(i,e){if(Array.isArray(i))return f8({name:""},e,i,"");{let n=i.name??"";return f8({name:n},i.parent,i.providers,n)}}static \u0275prov=z({token:t,providedIn:"any",factory:()=>be(k8)});static __NG_ELEMENT_ID__=-1},De=new L(""),Zi=(()=>{class t{static __NG_ELEMENT_ID__=zG;static __NG_ENV_ID__=e=>e}return t})(),H2=class extends Zi{_lView;constructor(i){super(),this._lView=i}get destroyed(){return al(this._lView)}onDestroy(i){let e=this._lView;return U8(e,i),()=>iM(e,i)}};function zG(){return new H2(ze())}var Di=class{_console=console;handleError(i){this._console.error("ERROR",i)}},go=new L("",{providedIn:"root",factory:()=>{let t=d(Jt),i;return e=>{t.destroyed&&!i?setTimeout(()=>{throw e}):(i??=t.get(Di),i.handleError(e))}}}),yM={provide:os,useValue:()=>void d(Di),multi:!0};function ya(t){return typeof t=="function"&&t[ni]!==void 0}function ke(t,i){let[e,n,o]=Fg(t,i?.equal),r=e,a=r[ni];return r.set=n,r.update=o,r.asReadonly=J3.bind(r),r}function J3(){let t=this[ni];if(t.readonlyFn===void 0){let i=()=>this();i[ni]=t,t.readonlyFn=i}return t.readonlyFn}function i5(t){return ya(t)&&typeof t.set=="function"}var sl=(()=>{class t{view;node;constructor(e,n){this.view=e,this.node=n}static __NG_ELEMENT_ID__=NG}return t})();function NG(){return new sl(ze(),ri())}var lr=class{},Z2=new L("",{providedIn:"root",factory:()=>!1});var o5=new L(""),r5=new L(""),Ca=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ut(!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=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),z1=(()=>{class t{internalPendingTasks=d(Ca);scheduler=d(lr);errorHandler=d(go);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=z({token:t,providedIn:"root",factory:()=>new t})}return t})();function cl(...t){}var J2=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>new h8})}return t})(),h8=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 $1(t){return{toString:t}.toString()}var e4="__parameters__";function UG(t){return function(...e){if(t){let n=t(...e);for(let o in n)this[o]=n[o]}}}function ow(t,i,e){return $1(()=>{let n=UG(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,u,f){let h=c.hasOwnProperty(e4)?c[e4]:Object.defineProperty(c,e4,{value:[]})[e4];for(;h.length<=f;)h.push(null);return(h[f]=h[f]||[]).push(a),c}}return o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var _r=D8(ow("Optional"),8);var wa=D8(ow("SkipSelf"),4);function rw(t){let i=oi.ng;if(i&&i.\u0275compilerFacade)return i.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function $G(t){return typeof t=="function"}var m4=class{previousValue;currentValue;firstChange;constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function aw(t,i,e,n){i!==null?i.applyValueToInputSignal(i,n):t[e]=n}var Ne=(()=>{let t=()=>sw;return t.ngInherit=!0,t})();function sw(t){return t.type.prototype.ngOnChanges&&(t.setInput=WG),GG}function GG(){let t=lw(this),i=t?.current;if(i){let e=t.previous;if(e===Fr)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function WG(t,i,e,n,o){let r=this.declaredInputs[n],a=lw(t)||YG(t,{previous:Fr,current:null}),s=a.current||(a.current={}),c=a.previous,u=c[r];s[r]=new m4(u&&u.currentValue,e,c===Fr),aw(t,i,o,e)}var cw="__ngSimpleChanges__";function lw(t){return t[cw]||null}function YG(t,i){return t[cw]=i}var CM=[];var un=function(t,i=null,e){for(let n=0;n=n)break}else i[c]<0&&(t[nl]+=65536),(s>14>16&&(t[st]&3)===i&&(t[st]+=16384,xM(s,r)):xM(s,r)}var F1=-1,dl=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 KG(t){return(t.flags&8)!==0}function XG(t){return(t.flags&16)!==0}function ZG(t,i,e){let n=0;for(;ni){a=r-1;break}}}for(;r>16}function f4(t,i){let e=eW(t),n=i;for(;e>0;)n=n[tl],e--;return n}var g5=!0;function h4(t){let i=g5;return g5=t,i}var tW=256,fw=tW-1,hw=5,nW=0,xa={};function iW(t,i,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(Jc)&&(n=e[Jc]),n==null&&(n=e[Jc]=nW++);let o=n&fw,r=1<>hw)]|=r}function g4(t,i){let e=gw(t,i);if(e!==-1)return e;let n=i[Qe];n.firstCreatePass&&(t.injectorIndex=i.length,s5(n.data,t),s5(i,null),s5(n.blueprint,null));let o=t7(t,i),r=t.injectorIndex;if(pw(o)){let a=p4(o),s=f4(o,i),c=s[Qe].data;for(let u=0;u<8;u++)i[r+u]=s[a+u]|c[a+u]}return i[r+8]=o,r}function s5(t,i){t.push(0,0,0,0,0,0,0,0,i)}function gw(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function t7(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=Cw(o),n===null)return F1;if(e++,o=o[tl],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return F1}function _5(t,i,e){iW(t,i,e)}function oW(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,h=n?s:s+f,y=o?s+f:u;for(let x=h;x=c&&D.type===e)return x}if(o){let x=a[c];if(x&&jr(x)&&x.type===e)return c}return null}function i0(t,i,e,n,o){let r=t[e],a=i.data;if(r instanceof dl){let s=r;if(s.resolving){let x=Vx(a[e]);throw M8(x)}let c=h4(s.canSeeViewProviders);s.resolving=!0;let u=a[e].type||a[e],f,h=s.injectImpl?fo(s.injectImpl):null,y=e5(t,n,0);try{r=t[e]=s.factory(void 0,o,a,t,n),i.firstCreatePass&&e>=n.directiveStart&&qG(e,a[e],i)}finally{h!==null&&fo(h),h4(c),s.resolving=!1,t5()}}return r}function aW(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(Jc)?t[Jc]:void 0;return typeof i=="number"?i>=0?i&fw:sW:i}function wM(t,i,e){let n=1<>hw)]&n)}function DM(t,i){return!(t&2)&&!(t&1&&i)}var ll=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,n){return vw(this._tNode,this._lView,i,Kc(n),e)}};function sW(){return new ll(ri(),ze())}function Te(t){return $1(()=>{let i=t.prototype.constructor,e=i[B2]||b5(i),n=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==n;){let r=o[B2]||b5(o);if(r&&r!==e)return r;o=Object.getPrototypeOf(o)}return r=>new r})}function b5(t){return g8(t)?()=>{let i=b5(gi(t));return i&&i()}:Us(t)}function cW(t,i,e,n,o){let r=t,a=i;for(;r!==null&&a!==null&&a[st]&2048&&!O1(a);){let s=yw(r,a,e,n|2,xa);if(s!==xa)return s;let c=r.parent;if(!c){let u=a[R8];if(u){let f=u.get(e,xa,n);if(f!==xa)return f}c=Cw(a),a=a[tl]}r=c}return o}function Cw(t){let i=t[Qe],e=i.type;return e===2?i.declTNode:e===1?t[ho]:null}function m0(t){return oW(ri(),t)}function lW(){return G1(ri(),ze())}function G1(t,i){return new Z(pr(t,i))}var Z=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=lW}return t})();function xw(t){return t instanceof Z?t.nativeElement:t}function dW(){return this._results[Symbol.iterator]()}var zn=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=$x(i);(this._changesDetected=!Ux(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]=dW};function Mw(t){return(t.flags&128)===128}var n7=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(n7||{}),ww=new Map,uW=0;function mW(){return uW++}function pW(t){ww.set(t[W2],t)}function v5(t){ww.delete(t[W2])}var SM="__ngContext__";function B1(t,i){ba(i)?(t[SM]=i[W2],pW(i)):t[SM]=i}function Dw(t){return kw(t[E1])}function Sw(t){return kw(t[ur])}function kw(t){for(;t!==null&&!Br(t);)t=t[ur];return t}var y5;function i7(t){y5=t}function o7(){if(y5!==void 0)return y5;if(typeof document<"u")return document;throw new he(210,!1)}var Xs=new L("",{providedIn:"root",factory:()=>fW}),fW="ng",O4=new L(""),pl=new L("",{providedIn:"platform",factory:()=>"unknown"});var p0=new L(""),W1=new L("",{providedIn:"root",factory:()=>o7().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var hW="h",gW="b";var Ew="r";var Iw="di";var Ow=!1,Tw=new L("",{providedIn:"root",factory:()=>Ow});var T4=new L("");var _W=(t,i,e,n)=>{};function bW(t,i,e,n){_W(t,i,e,n)}function P4(t){return(t.flags&32)===32}var vW=()=>null;function Pw(t,i,e=!1){return vW(t,i,e)}function Lw(t,i){let e=t.contentQueries;if(e!==null){let n=ot(null);try{for(let o=0;ot,createScript:t=>t,createScriptURL:t=>t})}catch{}return t4}function L4(t){return yW()?.createHTML(t)||t}var n4;function Aw(){if(n4===void 0&&(n4=null,oi.trustedTypes))try{n4=oi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return n4}function kM(t){return Aw()?.createHTML(t)||t}function EM(t){return Aw()?.createScriptURL(t)||t}var ds=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${R3})`}},x5=class extends ds{getTypeName(){return"HTML"}},M5=class extends ds{getTypeName(){return"Style"}},w5=class extends ds{getTypeName(){return"Script"}},D5=class extends ds{getTypeName(){return"URL"}},S5=class extends ds{getTypeName(){return"ResourceURL"}};function Yo(t){return t instanceof ds?t.changingThisBreaksApplicationSecurity:t}function Da(t,i){let e=Rw(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${R3})`)}return e===i}function Rw(t){return t instanceof ds&&t.getTypeName()||null}function a7(t){return new x5(t)}function s7(t){return new M5(t)}function c7(t){return new w5(t)}function l7(t){return new D5(t)}function d7(t){return new S5(t)}function CW(t){let i=new E5(t);return xW()?new k5(i):i}var k5=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{let e=new window.DOMParser().parseFromString(L4(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.firstChild?.remove(),e)}catch{return null}}},E5=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=L4(i),e}};function xW(){try{return!!new window.DOMParser().parseFromString(L4(""),"text/html")}catch{return!1}}var MW=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function f0(t){return t=String(t),t.match(MW)?t:"unsafe:"+t}function us(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function h0(...t){let i={};for(let e of t)for(let n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}var zw=us("area,br,col,hr,img,wbr"),Nw=us("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Fw=us("rp,rt"),wW=h0(Fw,Nw),DW=h0(Nw,us("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")),SW=h0(Fw,us("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")),IM=h0(zw,DW,SW,wW),Vw=us("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),kW=us("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"),EW=us("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"),IW=h0(Vw,kW,EW),OW=us("script,style,template"),I5=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=LW(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=PW(e);if(r){e=r;break}e=o.pop()}}return this.buf.join("")}startElement(i){let e=OM(i).toLowerCase();if(!IM.hasOwnProperty(e))return this.sanitizedSomething=!0,!OW.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=i.attributes;for(let o=0;o"),!0}endElement(i){let e=OM(i).toLowerCase();IM.hasOwnProperty(e)&&!zw.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(TM(i))}};function TW(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function PW(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw Bw(i);return i}function LW(t){let i=t.firstChild;if(i&&TW(t,i))throw Bw(i);return i}function OM(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function Bw(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var AW=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,RW=/([^\#-~ |!])/g;function TM(t){return t.replace(/&/g,"&").replace(AW,function(i){let e=i.charCodeAt(0),n=i.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(RW,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}var i4;function A4(t,i){let e=null;try{i4=i4||CW(t);let n=i?String(i):"";e=i4.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=i4.getInertBodyElement(n)}while(n!==r);let s=new I5().sanitizeChildren(PM(e)||e);return L4(s)}finally{if(e){let n=PM(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function PM(t){return"content"in t&&zW(t)?t.content:null}function zW(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var NW=/^>|^->||--!>|)/g,VW="\u200B$1\u200B";function BW(t){return t.replace(NW,i=>i.replace(FW,VW))}function jW(t,i){return t.createText(i)}function HW(t,i,e){t.setValue(i,e)}function UW(t,i){return t.createComment(BW(i))}function jw(t,i,e){return t.createElement(i,e)}function _4(t,i,e,n,o){t.insertBefore(i,e,n,o)}function Hw(t,i,e){t.appendChild(i,e)}function LM(t,i,e,n,o){n!==null?_4(t,i,e,n,o):Hw(t,i,e)}function Uw(t,i,e,n){t.removeChild(null,i,e,n)}function $W(t,i,e){t.setAttribute(i,"style",e)}function GW(t,i,e){e===""?t.removeAttribute(i,"class"):t.setAttribute(i,"class",e)}function $w(t,i,e){let{mergedAttrs:n,classes:o,styles:r}=e;n!==null&&ZG(t,i,n),o!==null&&GW(t,i,o),r!==null&&$W(t,i,r)}var Wn=(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})(Wn||{});function fl(t){let i=m7();return i?kM(i.sanitize(Wn.HTML,t)||""):Da(t,"HTML")?kM(Yo(t)):A4(o7(),Ki(t))}function Y1(t){let i=m7();return i?i.sanitize(Wn.URL,t)||"":Da(t,"URL")?Yo(t):f0(Ki(t))}function Gw(t){let i=m7();if(i)return EM(i.sanitize(Wn.RESOURCE_URL,t)||"");if(Da(t,"ResourceURL"))return EM(Yo(t));throw new he(904,!1)}function WW(t,i){return i==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||i==="href"&&(t==="base"||t==="link")?Gw:Y1}function u7(t,i,e){return WW(i,e)(t)}function m7(){let t=ze();return t&&t[ga].sanitizer}function YW(t){return t.ownerDocument.defaultView}function qW(t){return t.ownerDocument}function Ww(t){return t instanceof Function?t():t}function QW(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 Yw="ng-template";function KW(t,i,e,n){let o=0;if(n){for(;o-1){let r;for(;++or?h="":h=o[f+1].toLowerCase(),n&2&&u!==h){if(Hr(n))return!1;a=!0}}}}return Hr(n)||a}function Hr(t){return(t&1)===0}function JW(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!==""&&!Hr(a)&&(i+=AM(r,o),o=""),n=a,r=r||!Hr(n);e++}return o!==""&&(i+=AM(r,o)),i}function rY(t){return t.map(oY).join(",")}function aY(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 Ee&&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)}})}}},U=T5;function Jw(t){let i,e;function n(){t=cl;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 zM(t){return queueMicrotask(()=>t()),()=>{t=cl}}var b7="isAngularZone",b4=b7+"_ID",uY=0,ce=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new U(!1);onMicrotaskEmpty=new U(!1);onStable=new U(!1);onError=new U(!1);constructor(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:r=Zw}=i;if(typeof Zone>"u")throw new he(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,fY(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(b7)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new he(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new he(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,mY,cl,cl);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)}},mY={};function v7(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 pY(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){Jw(()=>{t.callbackScheduled=!1,P5(t),t.isCheckStableRunning=!0,v7(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),P5(t)}function fY(t){let i=()=>{pY(t)},e=uY++;t._inner=t._inner.fork({name:"angular",properties:{[b7]:!0,[b4]:e,[b4+e]:!0},onInvokeTask:(n,o,r,a,s,c)=>{if(hY(c))return n.invokeTask(r,a,s,c);try{return NM(t),n.invokeTask(r,a,s,c)}finally{(t.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),FM(t)}},onInvoke:(n,o,r,a,s,c,u)=>{try{return NM(t),n.invoke(r,a,s,c,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!gY(c)&&i(),FM(t)}},onHasTask:(n,o,r,a)=>{n.hasTask(r,a),o===r&&(a.change=="microTask"?(t._hasPendingMicrotasks=a.microTask,P5(t),v7(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 P5(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function NM(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function FM(t){t._nesting--,v7(t)}var o0=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;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 hY(t){return eD(t,"__ignore_ng_zone__")}function gY(t){return eD(t,"__scheduler_tick__")}function eD(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}function tD(t="zone.js",i){return t==="noop"?new o0:t==="zone.js"?new ce(i):t}var N4=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),y7=[0,1,2,3],C7=(()=>{class t{ngZone=d(ce);scheduler=d(lr);errorHandler=d(Di,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){d(Zs,{optional:!0})}execute(){let e=this.sequences.size>0;e&&un(16),this.executing=!0;for(let n of y7)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&&un(17)}register(e){let{view:n}=e;n!==void 0?((n[il]??=[]).push(e),Ys(n),n[st]|=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(z4.AFTER_NEXT_RENDER,e):e()}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),r0=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?.[il];i&&(this.view[il]=i.filter(e=>e!==this))}};function Mt(t,i){let e=i?.injector??d(Ce);return Sa("NgAfterNextRender"),bY(t,e,i,!0)}function _Y(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function bY(t,i,e,n){let o=i.get(N4);o.impl??=i.get(C7);let r=i.get(Zs,null,{optional:!0}),a=e?.manualCleanup!==!0?i.get(Zi):null,s=i.get(sl,null,{optional:!0}),c=new r0(o.impl,_Y(t),s?.view,n,a,r?.snapshot(null));return o.impl.register(c),c}var nD=new L("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function iD(t,i,e){let n=t.get(nD);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 vY(t,i){let e=t.get(nD);if(i.detachedLeaveAnimationFns){for(let n of i.detachedLeaveAnimationFns)e.queue.delete(n);i.detachedLeaveAnimationFns=void 0}}function yY(t,i){for(let[e,n]of i)iD(t,n.animateFns)}function VM(t,i,e,n){let o=t?.[ol]?.enter;i!==null&&o&&o.has(e.index)&&yY(n,o)}function N1(t,i,e,n,o,r,a,s){if(o!=null){let c,u=!1;Br(o)?c=o:ba(o)&&(u=!0,o=o[Vr]);let f=mr(o);t===0&&n!==null?(VM(s,n,r,e),a==null?Hw(i,n,f):_4(i,n,f,a||null,!0)):t===1&&n!==null?(VM(s,n,r,e),_4(i,n,f,a||null,!0)):t===2?BM(s,r,e,h=>{Uw(i,f,u,h)}):t===3&&BM(s,r,e,()=>{i.destroyNode(f)}),c!=null&&TY(i,t,e,c,r,n,a)}}function CY(t,i){oD(t,i),i[Vr]=null,i[ho]=null}function xY(t,i,e,n,o,r){n[Vr]=o,n[ho]=i,V4(t,n,e,1,o,r)}function oD(t,i){i[ga].changeDetectionScheduler?.notify(9),V4(t,i,i[en],2,null,null)}function MY(t){let i=t[E1];if(!i)return c5(t[Qe],t);for(;i;){let e=null;if(ba(i))e=i[E1];else{let n=i[Gn];n&&(e=n)}if(!e){for(;i&&!i[ur]&&i!==t;)ba(i)&&c5(i[Qe],i),i=i[_i];i===null&&(i=t),ba(i)&&c5(i[Qe],i),e=i&&i[ur]}i=e}}function x7(t,i){let e=t[rl],n=e.indexOf(i);e.splice(n,1)}function F4(t,i){if(al(i))return;let e=i[en];e.destroyNode&&V4(t,i,e,3,null,null),MY(i)}function c5(t,i){if(al(i))return;let e=ot(null);try{i[st]&=-129,i[st]|=256,i[Go]&&Fs(i[Go]),SY(t,i),DY(t,i),i[Qe].type===1&&i[en].destroy();let n=i[Gs];if(n!==null&&Br(i[_i])){n!==i[_i]&&x7(n,i);let o=i[_a];o!==null&&o.detachView(t)}v5(i)}finally{ot(e)}}function BM(t,i,e,n){let o=t?.[ol];if(o==null||o.leave==null||!o.leave.has(i.index))return n(!1);t&&ul.add(t),iD(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[ol].running=void 0,ul.delete(t),i(!0)});return}i(!1)}function DY(t,i){let e=t.cleanup,n=i[k1];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[k1]=null);let o=i[ns];if(o!==null){i[ns]=null;for(let a=0;aln&&Xw(t,i,ln,!1),un(a?2:0,o,e),e(n,o)}finally{qs(r),un(a?3:1,o,e)}}function B4(t,i,e){NY(t,i,e),(e.flags&64)===64&&FY(t,i,e)}function g0(t,i,e=pr){let n=i.localNames;if(n!==null){let o=i.index+1;for(let r=0;rnull;function zY(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function dD(t,i,e,n,o,r){let a=i[Qe];if(j4(t,a,i,e,n)){ss(t)&&mD(i,t.index);return}t.type&3&&(e=zY(e)),uD(t,i,e,n,o,r)}function uD(t,i,e,n,o,r){if(t.type&3){let a=pr(t,i);n=r!=null?r(n,t.value||"",e):n,o.setProperty(a,e,n)}else t.type&12}function mD(t,i){let e=fr(i,t);e[st]&16||(e[st]|=64)}function NY(t,i,e){let n=e.directiveStart,o=e.directiveEnd;ss(e)&&lY(i,e,t.data[n+e.componentOffset]),t.firstCreatePass||g4(e,i);let r=e.initialInputs;for(let a=n;a{Ys(t.lView)},consumerOnSignalRead(){this.lView[Go]=this}});function KY(t){let i=t[Go]??Object.create(XY);return i.lView=t,i}var XY=Re(q({},Vc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=$s(t.lView);for(;i&&!_D(i[Qe]);)i=$s(i);i&&H8(i)},consumerOnSignalRead(){this.lView[Go]=this}});function _D(t){return t.type!==2}function bD(t){if(t[as]===null)return;let i=!0;for(;i;){let e=!1;for(let n of t[as])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));i=e&&!!(t[st]&8192)}}var ZY=100;function vD(t,i=0){let n=t[ga].rendererFactory,o=!1;o||n.begin?.();try{JY(t,i)}finally{o||n.end?.()}}function JY(t,i){let e=J8();try{L1(!0),A5(t,i);let n=0;for(;Q2(t);){if(n===ZY)throw new he(103,!1);n++,A5(t,1)}}finally{L1(e)}}function eq(t,i,e,n){if(al(i))return;let o=i[st],r=!1,a=!1;K3(i);let s=!0,c=null,u=null;r||(_D(t)?(u=WY(i),c=Ns(u)):Jm()===null?(s=!1,u=KY(i),c=Ns(u)):i[Go]&&(Fs(i[Go]),i[Go]=null));try{j8(i),lM(t.bindingStartIndex),e!==null&&lD(t,i,e,2,n);let f=(o&3)===3;if(!r)if(f){let x=t.preOrderCheckHooks;x!==null&&s4(i,x,null)}else{let x=t.preOrderHooks;x!==null&&c4(i,x,0,null),a5(i,0)}if(a||tq(i),bD(i),yD(i,0),t.contentQueries!==null&&Lw(t,i),!r)if(f){let x=t.contentCheckHooks;x!==null&&s4(i,x)}else{let x=t.contentHooks;x!==null&&c4(i,x,1),a5(i,1)}iq(t,i);let h=t.components;h!==null&&xD(i,h,0);let y=t.viewQuery;if(y!==null&&C5(2,y,n),!r)if(f){let x=t.viewCheckHooks;x!==null&&s4(i,x)}else{let x=t.viewHooks;x!==null&&c4(i,x,2),a5(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[U3]){for(let x of i[U3])x();i[U3]=null}r||(hD(i),i[st]&=-73)}catch(f){throw r||Ys(i),f}finally{u!==null&&(Bc(u,c),s&&qY(u)),X3()}}function yD(t,i){for(let e=Dw(t);e!==null;e=Sw(e))for(let n=Gn;n0&&(t[e-1][ur]=n[ur]);let r=$2(t,Gn+i);CY(n[Qe],n);let a=r[_a];a!==null&&a.detachView(r[Qe]),n[_i]=null,n[ur]=null,n[st]&=-129}return n}function oq(t,i,e,n){let o=Gn+n,r=e.length;n>0&&(e[o-1][ur]=i),n-1&&(s0(i,n),$2(e,n))}this._attachedToViewContainer=!1}F4(this._lView[Qe],this._lView)}onDestroy(i){U8(this._lView,i)}markForCheck(){I7(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[st]&=-129}reattach(){G3(this._lView),this._lView[st]|=128}detectChanges(){this._lView[st]|=1024,vD(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new he(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=O1(this._lView),e=this._lView[Gs];e!==null&&!i&&x7(e,this._lView),oD(this._lView[Qe],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new he(902,!1);this._appRef=i;let e=O1(this._lView),n=this._lView[Gs];n!==null&&!e&&SD(n,this._lView),G3(this._lView)}};var rt=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=rq;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=_0(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:o});return new Qs(r)}}return t})();function rq(){return H4(ri(),ze())}function H4(t,i){return t.type&4?new rt(i,t,G1(t,i)):null}function q1(t,i,e,n,o){let r=t.data[i];if(r===null)r=aq(t,i,e,n,o),dM()&&(r.flags|=32);else if(r.type&64){r.type=e,r.value=n,r.attrs=o;let a=sM();r.injectorIndex=a===null?-1:a.injectorIndex}return P1(r,!0),r}function aq(t,i,e,n,o){let r=K8(),a=X8(),s=a?r:r&&r.parent,c=t.data[i]=cq(t,s,e,i,n,o);return sq(t,c,r,a),c}function sq(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 cq(t,i,e,n,o,r){let a=i?i.injectorIndex:-1,s=0;return Y8()&&(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 Y_e=new RegExp(`^(\\d+)*(${gW}|${hW})*(.*)`);function lq(t){let i=t[z8]??[],n=t[_i][en],o=[];for(let r of i)r.data[Iw]!==void 0?o.push(r):dq(r,n);t[z8]=o}function dq(t,i){let e=0,n=t.firstChild;if(n){let o=t.data[Ew];for(;enull,mq=()=>null;function v4(t,i){return uq(t,i)}function kD(t,i,e){return mq(t,i,e)}var ED=class{},U4=class{},R5=class{resolveComponentFactory(i){throw new he(917,!1)}},v0=class{static NULL=new R5},Nn=class{},tt=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>pq()}return t})();function pq(){let t=ze(),i=ri(),e=fr(i.index,t);return(ba(e)?e:t)[en]}var ID=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>null})}return t})();var d4={},z5=class{injector;parentInjector;constructor(i,e){this.injector=i,this.parentInjector=e}get(i,e,n){let o=this.injector.get(i,d4,n);return o!==d4||e===d4?o:this.parentInjector.get(i,e,n)}};function y4(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 y=0;y0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function Cq(t,i,e){if(e){if(i.exportAs)for(let n=0;nn(mr(Y[t.index])):t.index;zD(D,i,e,r,s,x,!1)}}return u}function Dq(t){return t.startsWith("animation")||t.startsWith("transition")}function Sq(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 zD(t,i,e,n,o,r,a){let s=i.firstCreatePass?G8(i):null,c=$8(e),u=c.length;c.push(o,r),s&&s.push(n,t,u,(u+1)*(a?-1:1))}function WM(t,i,e,n,o,r){let a=i[e],s=i[Qe],u=s.data[e].outputs[n],h=a[u].subscribe(r);zD(t.index,s,i,o,r,h,!0)}var N5=Symbol("BINDING");var C4=class extends v0{ngModule;constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){let e=fa(i);return new Ks(e,this.ngModule)}};function kq(t){return Object.keys(t).map(i=>{let[e,n,o]=t[i],r={propName:e,templateName:i,isSignal:(n&R4.SignalBased)!==0};return o&&(r.transform=o),r})}function Eq(t){return Object.keys(t).map(i=>({propName:t[i],templateName:i}))}function Iq(t,i,e){let n=i instanceof Jt?i:i?.injector;return n&&t.getStandaloneInjector!==null&&(n=t.getStandaloneInjector(n)||n),n?new z5(e,n):e}function Oq(t){let i=t.get(Nn,null);if(i===null)throw new he(407,!1);let e=t.get(ID,null),n=t.get(lr,null);return{rendererFactory:i,sanitizer:e,changeDetectionScheduler:n,ngReflect:!1}}function Tq(t,i){let e=ND(t);return jw(i,e,e==="svg"?F8:e==="math"?Jx:null)}function ND(t){return(t.selectors[0][0]||"div").toLowerCase()}var Ks=class extends U4{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=kq(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Eq(this.componentDef.outputs),this.cachedOutputs}constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=rY(i.selectors),this.ngContentSelectors=i.ngContentSelectors??[],this.isBoundToModule=!!e}create(i,e,n,o,r,a){un(22);let s=ot(null);try{let c=this.componentDef,u=Pq(n,c,a,r),f=Iq(c,o||this.ngModule,i),h=Oq(f),y=h.rendererFactory.createRenderer(null,c),x=n?LY(y,n,c.encapsulation,f):Tq(c,y),D=a?.some(YM)||r?.some(X=>typeof X!="function"&&X.bindings.some(YM)),Y=h7(null,u,null,512|Qw(c),null,null,h,y,f,null,Pw(x,f,!0));Y[ln]=x,K3(Y);let Q=null;try{let X=O7(ln,Y,2,"#host",()=>u.directiveRegistry,!0,0);$w(y,x,X),B1(x,Y),B4(u,Y,X),r7(u,X,Y),T7(u,X),e!==void 0&&Aq(X,this.ngContentSelectors,e),Q=fr(X.index,Y),Y[$n]=Q[$n],E7(u,Y,null)}catch(X){throw Q!==null&&v5(Q),v5(Y),X}finally{un(23),X3()}return new x4(this.componentType,Y,!!D)}finally{ot(s)}}};function Pq(t,i,e,n){let o=t?["ng-version","20.3.15"]:aY(i.selectors[0]),r=null,a=null,s=0;if(e)for(let f of e)s+=f[N5].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 YM(t){let i=t[N5].kind;return i==="input"||i==="twoWay"}var x4=class extends ED{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e,n){super(),this._rootLView=e,this._hasInputBindings=n,this._tNode=q2(e[Qe],ln),this.location=G1(this._tNode,e),this.instance=fr(this._tNode.index,e)[$n],this.hostView=this.changeDetectorRef=new Qs(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=j4(n,o[Qe],o,i,e);this.previousInputValues.set(i,e);let a=fr(n.index,o);I7(a,1)}get injector(){return new ll(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function Aq(t,i,e){let n=t.projection=[];for(let o=0;o{class t{static __NG_ELEMENT_ID__=Rq}return t})();function Rq(){let t=ri();return VD(t,ze())}var zq=ft,FD=class extends zq{_lContainer;_hostTNode;_hostLView;constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return G1(this._hostTNode,this._hostLView)}get injector(){return new ll(this._hostTNode,this._hostLView)}get parentInjector(){let i=t7(this._hostTNode,this._hostLView);if(pw(i)){let e=f4(i,this._hostLView),n=p4(i),o=e[Qe].data[n+8];return new ll(o,e)}else return new ll(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=qM(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-Gn}createEmbeddedView(i,e,n){let o,r;typeof n=="number"?o=n:n!=null&&(o=n.index,r=n.injector);let a=v4(this._lContainer,i.ssrId),s=i.createEmbeddedViewImpl(e||{},r,a);return this.insertImpl(s,o,j1(this._hostTNode,a)),s}createComponent(i,e,n,o,r,a,s){let c=i&&!$G(i),u;if(c)u=e;else{let Q=e||{};u=Q.index,n=Q.injector,o=Q.projectableNodes,r=Q.environmentInjector||Q.ngModuleRef,a=Q.directives,s=Q.bindings}let f=c?i:new Ks(fa(i)),h=n||this.parentInjector;if(!r&&f.ngModule==null){let X=(c?h:this.parentInjector).get(Jt,null);X&&(r=X)}let y=fa(f.componentType??{}),x=v4(this._lContainer,y?.id??null),D=x?.firstChild??null,Y=f.create(h,o,D,r,a,s);return this.insertImpl(Y.hostView,u,j1(this._hostTNode,x)),Y}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,n){let o=i._lView;if(tM(o)){let s=this.indexOf(i);if(s!==-1)this.detach(s);else{let c=o[_i],u=new FD(c,c[ho],c[_i]);u.detach(u.indexOf(i))}}let r=this._adjustIndex(e),a=this._lContainer;return b0(a,o,r,n),i.attachToViewContainerRef(),S8(l5(a),r,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=qM(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),n=s0(this._lContainer,e);n&&($2(l5(this._lContainer),e),F4(n[Qe],n))}detach(i){let e=this._adjustIndex(i,-1),n=s0(this._lContainer,e);return n&&$2(l5(this._lContainer),e)!=null?new Qs(n):null}_adjustIndex(i,e=0){return i??this.length+e}};function qM(t){return t[Y2]}function l5(t){return t[Y2]||(t[Y2]=[])}function VD(t,i){let e,n=i[t.index];return Br(n)?e=n:(e=MD(n,i,null,t),i[t.index]=e,g7(i,e)),Fq(e,i,t,n),new FD(e,t,i)}function Nq(t,i){let e=t[en],n=e.createComment(""),o=pr(i,t),r=e.parentNode(o);return _4(e,r,n,e.nextSibling(o),!1),n}var Fq=jq,Vq=()=>!1;function Bq(t,i,e){return Vq(t,i,e)}function jq(t,i,e,n){if(t[Ws])return;let o;e.type&8?o=mr(n):o=Nq(i,e),t[Ws]=o}var F5=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},V5=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 u=r[s+1],f=i[-c];for(let h=Gn;hi.trim())}function $D(t,i,e){t.queries===null&&(t.queries=new B5),t.queries.track(new j5(i,e))}function Yq(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 A7(t,i){return t.queries.getByIndex(i)}function GD(t,i){let e=t[Qe],n=A7(e,i);return n.crossesNgTemplate?H5(e,t,i,[]):BD(e,t,n,i)}function WD(t,i,e){let n,o=L2(()=>{n._dirtyCounter();let r=qq(n,t);if(i&&r===void 0)throw new he(-951,!1);return r});return n=o[ni],n._dirtyCounter=ke(0),n._flatValue=void 0,o}function R7(t){return WD(!0,!1,t)}function z7(t){return WD(!0,!0,t)}function YD(t,i){let e=t[ni];e._lView=ze(),e._queryIndex=i,e._queryList=L7(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function qq(t,i){let e=t._lView,n=t._queryIndex;if(e===void 0||n===void 0||e[st]&4)return i?void 0:Qi;let o=L7(e,n),r=GD(e,n);return o.reset(r,xw),i?o.first:o._changesDetected||t._flatValue===void 0?t._flatValue=o.toArray():t._flatValue}function qD(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=>Kq(o,s)))}return r}return w4.forEach((o,r)=>{let a=[];o.templateUrl&&a.push(n(o.templateUrl).then(u=>{o.template=u}));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 u=o.styles.length,f=o.styleUrls;o.styleUrls.forEach((h,y)=>{s.push(""),a.push(n(h).then(x=>{s[u+y]=x,f.splice(f.indexOf(h),1),f.length==0&&(o.styleUrls=void 0)}))})}else o.styleUrl&&a.push(n(o.styleUrl).then(u=>{s.push(u),o.styleUrl=void 0}));let c=Promise.all(a).then(()=>Xq(r));i.push(c)}),QD(),Promise.all(i).then(()=>{})}var w4=new Map,Qq=new Set;function QD(){let t=w4;return w4=new Map,t}function KD(){return w4.size===0}function Kq(t,i){return typeof i=="string"?i:i.status!==void 0&&i.status!==200?Promise.reject(new he(918,!1)):i.text()}function Xq(t){Qq.delete(t)}var Ma=class{},G4=class{};var l0=class extends Ma{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new C4(this);constructor(i,e,n,o=!0){super(),this.ngModuleType=i,this._parent=e;let r=I8(i);this._bootstrapComponents=Ww(r.bootstrap),this._r3Injector=n5(i,e,[{provide:Ma,useValue:this},{provide:v0,useValue:this.componentFactoryResolver},...n],is(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)}},d0=class extends G4{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new l0(this.moduleType,i,[])}};function XD(t,i,e){return new l0(t,i,e,!1)}var D4=class extends Ma{injector;componentFactoryResolver=new C4(this);instance=null;constructor(i){super();let e=new Zc([...i.providers,{provide:Ma,useValue:this},{provide:v0,useValue:this.componentFactoryResolver}],i.parent||S1(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function Q1(t,i,e=null){return new D4({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var Zq=(()=>{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=O8(!1,e.type),o=n.length>0?Q1([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=z({token:t,providedIn:"environment",factory:()=>new t(be(Jt))})}return t})();function P(t){return $1(()=>{let i=ZD(t),e=Re(q({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===n7.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?o=>o.get(Zq).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||ls.Emulated,styles:t.styles||Qi,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&Sa("NgStandalone"),JD(e);let n=t.dependencies;return e.directiveDefs=QM(n,Jq),e.pipeDefs=QM(n,Yx),e.id=nQ(e),e})}function Jq(t){return fa(t)||H3(t)}function ee(t){return $1(()=>({type:t.type,bootstrap:t.bootstrap||Qi,declarations:t.declarations||Qi,imports:t.imports||Qi,exports:t.exports||Qi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function eQ(t,i){if(t==null)return Fr;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=R4.None,c=null),e[r]=[n,s,c],i[r]=a}return e}function tQ(t){if(t==null)return Fr;let i={};for(let e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}function R(t){return $1(()=>{let i=ZD(t);return JD(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 ZD(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||Fr,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Qi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:eQ(t.inputs,i),outputs:tQ(t.outputs),debugInfo:null}}function JD(t){t.features?.forEach(i=>i(t))}function QM(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 nQ(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 iQ(t){return Object.getPrototypeOf(t.prototype).constructor}function de(t){let i=iQ(t.type),e=!0,n=[t];for(;i;){let o;if(jr(t))o=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new he(903,!1);o=i.\u0275dir}if(o){if(e){n.push(o);let a=t;a.inputs=d5(t.inputs),a.declaredInputs=d5(t.declaredInputs),a.outputs=d5(t.outputs);let s=o.hostBindings;s&&cQ(t,s);let c=o.viewQuery,u=o.contentQueries;if(c&&aQ(t,c),u&&sQ(t,u),oQ(t,o),Fx(t.outputs,o.outputs),jr(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=V1(o.hostAttrs,e=V1(e,o.hostAttrs))}}function d5(t){return t===Fr?{}:t===Qi?[]:t}function aQ(t,i){let e=t.viewQuery;e?t.viewQuery=(n,o)=>{i(n,o),e(n,o)}:t.viewQuery=i}function sQ(t,i){let e=t.contentQueries;e?t.contentQueries=(n,o,r)=>{i(n,o,r),e(n,o,r)}:t.contentQueries=i}function cQ(t,i){let e=t.hostBindings;e?t.hostBindings=(n,o)=>{i(n,o),e(n,o)}:t.hostBindings=i}function N7(t){let i=e=>{let n=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=lQ,e.hostDirectives=n?t.map(U5):[t]):n?e.hostDirectives.unshift(...t.map(U5)):e.hostDirectives.unshift(t)};return i.ngInherit=!0,i}function lQ(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=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var Y4=new L(""),K1=new L(""),C0=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,n,o){this._ngZone=e,this.registry=n,L8()&&(this._destroyRef=d(Zi,{optional:!0})??void 0),F7||(nS(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:()=>{ce.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)(be(ce),be(x0),be(K1))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),x0=(()=>{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 F7?.findTestabilityInTree(this,e,n)??null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function nS(t){F7=t}var F7;function ms(t){return!!t&&typeof t.then=="function"}function q4(t){return!!t&&typeof t.subscribe=="function"}var V7=new L("");function Q4(t){return ha([{provide:V7,multi:!0,useValue:t}])}var B7=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n});appInits=d(V7,{optional:!0})??[];injector=d(Ce);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let o of this.appInits){let r=Si(this.injector,o);if(ms(r))e.push(r);else if(q4(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),K4=new L("");function iS(){Ng(()=>{let t="";throw new he(600,t)})}function oS(t){return t.isBoundToModule}var fQ=10;function j7(t,i){return Array.isArray(i)?i.reduce(j7,t):q(q({},t),i)}var bi=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=d(go);afterRenderManager=d(N4);zonelessEnabled=d(Z2);rootEffectScheduler=d(J2);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(Ca);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(le(e=>!e))}constructor(){d(Zs,{optional:!0})}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:o=>{o&&n()}})}).finally(()=>{e.unsubscribe()})}_injector=d(Jt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,n){return this.bootstrapImpl(e,n)}bootstrapImpl(e,n,o=Ce.NULL){return this._injector.get(ce).run(()=>{un(10);let a=e instanceof U4;if(!this._injector.get(B7).done){let D="";throw new he(405,D)}let c;a?c=e:c=this._injector.get(v0).resolveComponentFactory(e),this.componentTypes.push(c.componentType);let u=oS(c)?void 0:this._injector.get(Ma),f=n||c.selector,h=c.create(o,[],f,u),y=h.location.nativeElement,x=h.injector.get(Y4,null);return x?.registerApplication(y),h.onDestroy(()=>{this.detachView(h.hostView),t0(this.components,h),x?.unregisterApplication(y)}),this._loadComponent(h),un(11,h),h})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){un(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(z4.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new he(101,!1);let e=ot(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ot(e),this.afterTick.next(),un(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Nn,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Q2(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;t0(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(K4,[]).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),()=>t0(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new he(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function t0(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function X1(t,i){let e=ze(),n=va();if(_o(e,n,i)){let o=dn(),r=R1();if(j4(r,o,e,t,i))ss(r)&&mD(e,r.index);else{let s=pr(r,e);pD(e[en],s,null,r.value,t,i,null)}}return X1}function oe(t,i,e,n){let o=ze(),r=va();if(_o(o,r,i)){let a=dn(),s=R1();BY(s,o,t,i,e,n)}return oe}var ebe=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function H7(){return ze()[Xi][$n]}var $5=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 u5(t,i,e,n,o){return t===e&&Object.is(i,n)?1:Object.is(o(t,i),o(e,n))?-1:0}function hQ(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 u=t.at(r),f=i[r],h=u5(r,u,r,f,e);if(h!==0){h<0&&t.updateValue(r,f),r++;continue}let y=t.at(a),x=i[c],D=u5(a,y,c,x,e);if(D!==0){D<0&&t.updateValue(a,x),a--,c--;continue}let Y=e(r,u),Q=e(a,y),X=e(r,f);if(Object.is(X,Q)){let pe=e(c,x);Object.is(pe,Y)?(t.swap(r,a),t.updateValue(a,x),c--,a--):t.move(a,r),t.updateValue(r,f),r++;continue}if(n??=new S4,o??=JM(t,r,a,e),G5(t,n,r,X))t.updateValue(r,f),r++,a++;else if(o.has(X))n.set(Y,t.detach(r)),a--;else{let pe=t.create(r,i[r]);t.attach(r,pe),r++,a++}}for(;r<=c;)ZM(t,n,e,r,i[r]),r++}else if(i!=null){let c=i[Symbol.iterator](),u=c.next();for(;!u.done&&r<=a;){let f=t.at(r),h=u.value,y=u5(r,f,r,h,e);if(y!==0)y<0&&t.updateValue(r,h),r++,u=c.next();else{n??=new S4,o??=JM(t,r,a,e);let x=e(r,h);if(G5(t,n,r,x))t.updateValue(r,h),r++,a++,u=c.next();else if(!o.has(x))t.attach(r,t.create(r,h)),r++,a++,u=c.next();else{let D=e(r,f);n.set(D,t.detach(r)),a--}}}for(;!u.done;)ZM(t,n,e,t.length,u.value),u=c.next()}for(;r<=a;)t.destroy(t.detach(a--));n?.forEach(c=>{t.destroy(c)})}function G5(t,i,e,n){return i!==void 0&&i.has(n)?(t.attach(e,i.get(n)),i.delete(n),!0):!1}function ZM(t,i,e,n,o){if(G5(t,i,n,e(n,o)))t.updateValue(n,o);else{let r=t.create(n,o);t.attach(n,r)}}function JM(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 S4=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 I(t,i,e,n,o,r,a,s){Sa("NgControlFlow");let c=ze(),u=dn(),f=Wo(u.consts,r);return H1(c,u,t,i,e,n,o,f,256,a,s),U7}function U7(t,i,e,n,o,r,a,s){Sa("NgControlFlow");let c=ze(),u=dn(),f=Wo(u.consts,r);return H1(c,u,t,i,e,n,o,f,512,a,s),U7}function O(t,i){Sa("NgControlFlow");let e=ze(),n=va(),o=e[n]!==ai?e[n]:-1,r=o!==-1?k4(e,ln+o):void 0,a=0;if(_o(e,n,t)){let s=ot(null);try{if(r!==void 0&&DD(r,a),t!==-1){let c=ln+t,u=k4(e,c),f=Q5(e[Qe],c),h=kD(u,f,e),y=_0(e,f,i,{dehydratedView:h});b0(u,y,a,j1(f,h))}}finally{ot(s)}}else if(r!==void 0){let s=wD(r,a);s!==void 0&&(s[$n]=i)}}var W5=class{lContainer;$implicit;$index;constructor(i,e,n){this.lContainer=i,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-Gn}};function vt(t,i){return i}var Y5=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,n){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=n}};function nt(t,i,e,n,o,r,a,s,c,u,f,h,y){Sa("NgControlFlow");let x=ze(),D=dn(),Y=c!==void 0,Q=ze(),X=s?a.bind(Q[Xi][$n]):a,pe=new Y5(Y,X);Q[ln+t]=pe,H1(x,D,t+1,i,e,n,o,Wo(D.consts,r),256),Y&&H1(x,D,t+2,c,u,f,h,Wo(D.consts,y),512)}var q5=class extends $5{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-Gn}at(i){return this.getLView(i)[$n].$implicit}attach(i,e){let n=e[el];this.needsIndexUpdate||=i!==this.length,b0(this.lContainer,e,i,j1(this.templateTNode,n)),gQ(this.lContainer,i)}detach(i){return this.needsIndexUpdate||=i!==this.length-1,_Q(this.lContainer,i),bQ(this.lContainer,i)}create(i,e){let n=v4(this.lContainer,this.templateTNode.tView.ssrId),o=_0(this.hostLView,this.templateTNode,new W5(this.lContainer,e,i),{dehydratedView:n});return this.operationsCounter?.recordCreate(),o}destroy(i){F4(i[Qe],i),this.operationsCounter?.recordDestroy()}updateValue(i,e){this.getLView(i)[$n].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i0){let r=n[rs];vY(r,o),ul.delete(n),o.detachedLeaveAnimationFns=void 0}}function _Q(t,i){if(t.length<=Gn)return;let e=Gn+i,n=t[e],o=n?n[ol]:void 0;o&&o.leave&&o.leave.size>0&&(o.detachedLeaveAnimationFns=[])}function bQ(t,i){return s0(t,i)}function vQ(t,i){return wD(t,i)}function Q5(t,i){return q2(t,i)}function k(t,i,e){let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();dD(a,n,t,i,n[en],e)}return k}function K5(t,i,e,n,o){j4(i,t,e,o?"class":"style",n)}function g(t,i,e,n){let o=ze(),r=o[Qe],a=t+ln,s=r.firstCreatePass?O7(a,o,2,i,D7,W3(),e,n):r.data[a];if(S7(s,o,t,i,rS),I1(s)){let c=o[Qe];B4(c,o,s),r7(c,s,o)}return n!=null&&g0(o,s),g}function _(){let t=dn(),i=ri(),e=k7(i);return t.firstCreatePass&&T7(t,e),q8(e)&&Q8(),W8(),e.classesWithoutHost!=null&&KG(e)&&K5(t,e,ze(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&XG(e)&&K5(t,e,ze(),e.stylesWithoutHost,!1),_}function F(t,i,e,n){return g(t,i,e,n),_(),F}function Be(t,i,e,n){let o=ze(),r=o[Qe],a=t+ln,s=r.firstCreatePass?Mq(a,r,2,i,e,n):r.data[a];return S7(s,o,t,i,rS),n!=null&&g0(o,s),Be}function Ue(){let t=ri(),i=k7(t);return q8(i)&&Q8(),W8(),Ue}function Fn(t,i,e,n){return Be(t,i,e,n),Ue(),Fn}var rS=(t,i,e,n,o)=>(X2(!0),jw(i[en],n,bM()));function Ji(t,i,e){let n=ze(),o=n[Qe],r=t+ln,a=o.firstCreatePass?O7(r,n,8,"ng-container",D7,W3(),i,e):o.data[r];if(S7(a,n,t,"ng-container",yQ),I1(a)){let s=n[Qe];B4(s,n,a),r7(s,a,n)}return e!=null&&g0(n,a),Ji}function eo(){let t=dn(),i=ri(),e=k7(i);return t.firstCreatePass&&T7(t,e),eo}function Ut(t,i,e){return Ji(t,i,e),eo(),Ut}var yQ=(t,i,e,n,o)=>(X2(!0),UW(i[en],""));function se(){return ze()}function Dt(t,i,e){let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();uD(a,n,t,i,n[en],e)}return Dt}var o4=void 0;function CQ(t){let i=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return i===1&&e===0?1:5}var xQ=["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"]],o4,[["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"]],o4,[["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}",o4,"{1} 'at' {0}",o4],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",CQ],n0={};function $7(t,i,e){typeof i!="string"&&(e=i,i=t[Mn.LocaleId]),i=i.toLowerCase().replace(/_/g,"-"),n0[i]=t,e&&(n0[i][Mn.ExtraData]=e)}function bo(t){let i=MQ(t),e=ew(i);if(e)return e;let n=i.split("-")[0];if(e=ew(n),e)return e;if(n==="en")return xQ;throw new he(701,!1)}function ew(t){return t in n0||(n0[t]=oi.ng&&oi.ng.common&&oi.ng.common.locales&&oi.ng.common.locales[t]),n0[t]}var Mn=(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})(Mn||{});function MQ(t){return t.toLowerCase().replace(/_/g,"-")}var M0="en-US",wQ="USD";var DQ=M0;function aS(t){typeof t=="string"&&(DQ=t.toLowerCase().replace(/_/g,"-"))}function N(t,i,e){let n=ze(),o=dn(),r=ri();return sS(o,n,n[en],r,t,i,e),N}function ka(t,i,e){let n=ze(),o=dn(),r=ri();return(r.type&3||e)&&RD(r,o,n,e,n[en],t,i,u4(r,n,i)),ka}function sS(t,i,e,n,o,r,a){let s=!0,c=null;if((n.type&3||a)&&(c??=u4(n,i,r),RD(n,t,i,a,e,o,r,c)&&(s=!1)),s){let u=n.outputs?.[o],f=n.hostDirectiveOutputs?.[o];if(f&&f.length)for(let h=0;h>17&32767}function EQ(t){return(t&2)==2}function IQ(t,i){return t&131071|i<<17}function X5(t){return t|2}function U1(t){return(t&131068)>>2}function m5(t,i){return t&-131069|i<<2}function OQ(t){return(t&1)===1}function Z5(t){return t|1}function TQ(t,i,e,n,o,r){let a=r?i.classBindings:i.styleBindings,s=ml(a),c=U1(a);t[n]=e;let u=!1,f;if(Array.isArray(e)){let h=e;f=h[1],(f===null||D1(h,f)>0)&&(u=!0)}else f=e;if(o)if(c!==0){let y=ml(t[s+1]);t[n+1]=r4(y,s),y!==0&&(t[y+1]=m5(t[y+1],n)),t[s+1]=IQ(t[s+1],n)}else t[n+1]=r4(s,0),s!==0&&(t[s+1]=m5(t[s+1],n)),s=n;else t[n+1]=r4(c,0),s===0?s=n:t[c+1]=m5(t[c+1],n),c=n;u&&(t[n+1]=X5(t[n+1])),tw(t,f,n,!0),tw(t,f,n,!1),PQ(i,f,t,n,r),a=r4(s,c),r?i.classBindings=a:i.styleBindings=a}function PQ(t,i,e,n,o){let r=o?t.residualClasses:t.residualStyles;r!=null&&typeof i=="string"&&D1(r,i)>=0&&(e[n+1]=Z5(e[n+1]))}function tw(t,i,e,n){let o=t[e+1],r=i===null,a=n?ml(o):U1(o),s=!1;for(;a!==0&&(s===!1||r);){let c=t[a],u=t[a+1];LQ(c,i)&&(s=!0,t[a+1]=n?Z5(u):X5(u)),a=n?ml(u):U1(u)}s&&(t[e+1]=n?X5(o):Z5(o))}function LQ(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?D1(t,i)>=0:!1}var Ur={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function AQ(t){return t.substring(Ur.key,Ur.keyEnd)}function RQ(t){return zQ(t),cS(t,lS(t,0,Ur.textEnd))}function cS(t,i){let e=Ur.textEnd;return e===i?-1:(i=Ur.keyEnd=NQ(t,Ur.key=i,e),lS(t,i,e))}function zQ(t){Ur.key=0,Ur.keyEnd=0,Ur.value=0,Ur.valueEnd=0,Ur.textEnd=t.length}function lS(t,i,e){for(;i32;)i++;return i}function Nt(t,i,e){return dS(t,i,e,!1),Nt}function ie(t,i){return dS(t,i,null,!0),ie}function kt(t){VQ(GQ,FQ,t,!0)}function FQ(t,i){for(let e=RQ(i);e>=0;e=cS(i,e))B3(t,AQ(i),!0)}function dS(t,i,e,n){let o=ze(),r=dn(),a=A1(2);if(r.firstUpdatePass&&mS(r,t,a,n),i!==ai&&_o(o,a,i)){let s=r.data[hr()];pS(r,s,o,o[en],t,o[a+1]=YQ(i,e),n,a)}}function VQ(t,i,e,n){let o=dn(),r=A1(2);o.firstUpdatePass&&mS(o,null,r,n);let a=ze();if(e!==ai&&_o(a,r,e)){let s=o.data[hr()];if(fS(s,n)&&!uS(o,r)){let c=n?s.classesWithoutHost:s.stylesWithoutHost;c!==null&&(e=z3(c,e||"")),K5(o,s,a,e,n)}else WQ(o,s,a,a[en],a[r+1],a[r+1]=$Q(t,i,e),n,r)}}function uS(t,i){return i>=t.expandoStartIndex}function mS(t,i,e,n){let o=t.data;if(o[e+1]===null){let r=o[hr()],a=uS(t,e);fS(r,n)&&i===null&&!a&&(i=!1),i=BQ(o,r,i,n),TQ(o,r,i,e,a,n)}}function BQ(t,i,e,n){let o=pM(t),r=n?i.residualClasses:i.residualStyles;if(o===null)(n?i.classBindings:i.styleBindings)===0&&(e=p5(null,t,i,e,n),e=u0(e,i.attrs,n),r=null);else{let a=i.directiveStylingLast;if(a===-1||t[a]!==o)if(e=p5(o,t,i,e,n),r===null){let c=jQ(t,i,n);c!==void 0&&Array.isArray(c)&&(c=p5(null,t,i,c[1],n),c=u0(c,i.attrs,n),HQ(t,i,n,c))}else r=UQ(t,i,n)}return r!==void 0&&(n?i.residualClasses=r:i.residualStyles=r),e}function jQ(t,i,e){let n=e?i.classBindings:i.styleBindings;if(U1(n)!==0)return t[ml(n)]}function HQ(t,i,e,n){let o=e?i.classBindings:i.styleBindings;t[ml(o)]=n}function UQ(t,i,e){let n,o=i.directiveEnd;for(let r=1+i.directiveStylingLast;r0;){let c=t[o],u=Array.isArray(c),f=u?c[1]:c,h=f===null,y=e[o+1];y===ai&&(y=h?Qi:void 0);let x=h?j3(y,n):f===n?y:void 0;if(u&&!E4(x)&&(x=j3(c,n)),E4(x)&&(s=x,a))return s;let D=t[o+1];o=a?ml(D):U1(D)}if(i!==null){let c=r?i.residualClasses:i.residualStyles;c!=null&&(s=j3(c,n))}return s}function E4(t){return t!==void 0}function YQ(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=is(Yo(t)))),t}function fS(t,i){return(t.flags&(i?8:16))!==0}function C(t,i=""){let e=ze(),n=dn(),o=t+ln,r=n.firstCreatePass?q1(n,o,1,i,null):n.data[o],a=qQ(n,e,r,i,t);e[o]=a,Z3()&&M7(n,e,a,r),P1(r,!1)}var qQ=(t,i,e,n,o)=>(X2(!0),jW(i[en],n));function hS(t,i,e,n=""){return _o(t,va(),e)?i+Ki(e)+n:ai}function gS(t,i,e,n,o,r=""){let a=Y3(),s=c0(t,a,e,o);return A1(2),s?i+Ki(e)+n+Ki(o)+r:ai}function QQ(t,i,e,n,o,r,a,s=""){let c=Y3(),u=LD(t,c,e,o,a);return A1(3),u?i+Ki(e)+n+Ki(o)+r+Ki(a)+s:ai}function KQ(t,i,e,n,o,r,a,s,c,u=""){let f=Y3(),h=AD(t,f,e,o,a,c);return A1(4),h?i+Ki(e)+n+Ki(o)+r+Ki(a)+s+Ki(c)+u:ai}function T(t){return K("",t),T}function K(t,i,e){let n=ze(),o=hS(n,t,i,e);return o!==ai&&Z4(n,hr(),o),K}function Tt(t,i,e,n,o){let r=ze(),a=gS(r,t,i,e,n,o);return a!==ai&&Z4(r,hr(),a),Tt}function ps(t,i,e,n,o,r,a){let s=ze(),c=QQ(s,t,i,e,n,o,r,a);return c!==ai&&Z4(s,hr(),c),ps}function _S(t,i,e,n,o,r,a,s,c){let u=ze(),f=KQ(u,t,i,e,n,o,r,a,s,c);return f!==ai&&Z4(u,hr(),f),_S}function Z4(t,i,e){let n=V8(i,t);HW(t[en],n,e)}function J1(t,i,e){i5(i)&&(i=i());let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();dD(a,n,t,i,n[en],e)}return J1}function w0(t,i){let e=i5(t);return e&&t.set(i),e}function ed(t,i){let e=ze(),n=dn(),o=ri();return sS(n,e,e[en],o,t,i),ed}function Ft(t){return _o(ze(),va(),t)?Ki(t):ai}function gl(t,i,e=""){return hS(ze(),t,i,e)}function J4(t,i,e,n,o=""){return gS(ze(),t,i,e,n,o)}function XQ(t,i,e){let n=dn();if(n.firstCreatePass){let o=jr(t);J5(e,n.data,n.blueprint,o,!0),J5(i,n.data,n.blueprint,o,!1)}}function J5(t,i,e,n,o){if(t=gi(t),Array.isArray(t))for(let r=0;r>20;if(Xc(t)||!t.multi){let x=new dl(u,o,Me,null),D=h5(c,i,o?f:f+y,h);D===-1?(_5(g4(s,a),r,c),f5(r,t,i.length),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(x),a.push(x)):(e[D]=x,a[D]=x)}else{let x=h5(c,i,f+y,h),D=h5(c,i,f,f+y),Y=x>=0&&e[x],Q=D>=0&&e[D];if(o&&!Q||!o&&!Y){_5(g4(s,a),r,c);let X=eK(o?JQ:ZQ,e.length,o,n,u,t);!o&&Q&&(e[D].providerFactory=X),f5(r,t,i.length,0),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(X),a.push(X)}else{let X=bS(e[o?D:x],u,!o&&n);f5(r,t,x>-1?x:D,X)}!o&&n&&Q&&e[D].componentProviders++}}}function f5(t,i,e,n){let o=Xc(i),r=Xx(i);if(o||r){let c=(r?gi(i.useClass):i).prototype.ngOnDestroy;if(c){let u=t.destroyHooks||(t.destroyHooks=[]);if(!o&&i.multi){let f=u.indexOf(e);f===-1?u.push(e,[n,c]):u[f+1].push(n,c)}else u.push(e,c)}}}function bS(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function h5(t,i,e,n){for(let o=e;o{e.providersResolver=(n,o)=>XQ(n,o?o(t):t,i)}}function qo(t,i,e){let n=cs()+t,o=ze();return o[n]===ai?y0(o,n,e?i.call(e):i()):wq(o,n)}function Qo(t,i,e,n){return vS(ze(),cs(),t,i,e,n)}function W7(t,i,e,n,o){return yS(ze(),cs(),t,i,e,n,o)}function Y7(t,i,e,n,o,r){return CS(ze(),cs(),t,i,e,n,o,r)}function ep(t,i){let e=t[i];return e===ai?void 0:e}function vS(t,i,e,n,o,r){let a=i+e;return _o(t,a,o)?y0(t,a+1,r?n.call(r,o):n(o)):ep(t,a+1)}function yS(t,i,e,n,o,r,a){let s=i+e;return c0(t,s,o,r)?y0(t,s+2,a?n.call(a,o,r):n(o,r)):ep(t,s+2)}function CS(t,i,e,n,o,r,a,s){let c=i+e;return LD(t,c,o,r,a)?y0(t,c+3,s?n.call(s,o,r,a):n(o,r,a)):ep(t,c+3)}function tK(t,i,e,n,o,r,a,s,c){let u=i+e;return AD(t,u,o,r,a,s)?y0(t,u+4,c?n.call(c,o,r,a,s):n(o,r,a,s)):ep(t,u+4)}function S(t,i){let e=dn(),n,o=t+ln;e.firstCreatePass?(n=nK(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=Us(n.type,!0)),a,s=fo(Me);try{let c=h4(!1),u=r();return h4(c),B8(e,ze(),o,u),u}finally{fo(s)}}function nK(t,i){if(i)for(let e=i.length-1;e>=0;e--){let n=i[e];if(t===n.name)return n}}function E(t,i,e){let n=t+ln,o=ze(),r=T1(o,n);return np(o,n)?vS(o,cs(),i,r.transform,e,r):r.transform(e)}function Ko(t,i,e,n){let o=t+ln,r=ze(),a=T1(r,o);return np(r,o)?yS(r,cs(),i,a.transform,e,n,a):a.transform(e,n)}function iK(t,i,e,n,o){let r=t+ln,a=ze(),s=T1(a,r);return np(a,r)?CS(a,cs(),i,s.transform,e,n,o,s):s.transform(e,n,o)}function tp(t,i,e,n,o,r){let a=t+ln,s=ze(),c=T1(s,a);return np(s,a)?tK(s,cs(),i,c.transform,e,n,o,r,c):c.transform(e,n,o,r)}function np(t,i){return t[Qe].data[i].pure}function Js(t,i){return H4(t,i)}var a4=null;function xS(t){a4!==null&&(t.defaultEncapsulation!==a4.defaultEncapsulation||t.preserveWhitespaces!==a4.preserveWhitespaces)||(a4=t)}var I4=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},q7=(()=>{class t{compileModuleSync(e){return new d0(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),o=I8(e),r=Ww(o.declarations).reduce((a,s)=>{let c=fa(s);return c&&a.push(new Ks(c)),a},[]);return new I4(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),MS=new L("");var oK=(()=>{class t{zone=d(ce);changeDetectionScheduler=d(lr);applicationRef=d(bi);applicationErrorHandler=d(go);_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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wS({ngZoneFactory:t,ignoreChangesOutsideZone:i,scheduleInRootZone:e}){return t??=()=>new ce(Re(q({},Q7()),{scheduleInRootZone:e})),[{provide:ce,useFactory:t},{provide:os,multi:!0,useFactory:()=>{let n=d(oK,{optional:!0});return()=>n.initialize()}},{provide:os,multi:!0,useFactory:()=>{let n=d(rK);return()=>{n.initialize()}}},i===!0?{provide:o5,useValue:!0}:[],{provide:r5,useValue:e??Zw},{provide:go,useFactory:()=>{let n=d(ce),o=d(Jt),r;return a=>{n.runOutsideAngular(()=>{o.destroyed&&!r?setTimeout(()=>{throw a}):(r??=o.get(Di),r.handleError(a))})}}}]}function Q7(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var rK=(()=>{class t{subscription=new Ee;initialized=!1;zone=d(ce);pendingTasks=d(Ca);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(()=>{ce.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ce.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var DS=(()=>{class t{applicationErrorHandler=d(go);appRef=d(bi);taskService=d(Ca);ngZone=d(ce);zonelessEnabled=d(Z2);tracing=d(Zs,{optional:!0});disableScheduling=d(o5,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ee;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(b4):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(d(r5,{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 o0||!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?zM:Jw;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(b4+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,zM(()=>{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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function aK(){return typeof $localize<"u"&&$localize.locale||M0}var Wr=new L("",{providedIn:"root",factory:()=>d(Wr,{optional:!0,skipSelf:!0})||aK()}),K7=new L("",{providedIn:"root",factory:()=>wQ});var ip=class{destroyed=!1;listeners=null;errorHandler=d(Di,{optional:!0});destroyRef=d(Zi);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(i){if(this.destroyed)throw new he(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(dr(953,!1));return}if(this.listeners===null)return;let e=ot(null);try{for(let n of this.listeners)try{n(i)}catch(o){this.errorHandler?.handleError(o)}}finally{ot(e)}}};function Yn(t){return Lx(t)}function si(t,i){return L2(t,i?.equal)}var X7=class{[ni];constructor(i){this[ni]=i}destroy(){this[ni].destroy()}};function Ea(t,i){let e=i?.injector??d(Ce),n=i?.manualCleanup!==!0?e.get(Zi):null,o,r=e.get(sl,null,{optional:!0}),a=e.get(lr);return r!==null?(o=lK(r.view,a,t),n instanceof H2&&n._lView===r.view&&(n=null)):o=dK(t,e.get(J2),a),o.injector=e,n!==null&&(o.onDestroyFn=n.onDestroy(()=>o.destroy())),new X7(o)}var SS=Re(q({},Ax),{cleanupFns:void 0,zone:null,onDestroyFn:cl,run(){let t=L1(!1);try{Rx(this)}finally{L1(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=ot(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ot(t)}}}),sK=Re(q({},SS),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Fs(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),cK=Re(q({},SS),{consumerMarkedDirty(){this.view[st]|=8192,Ys(this.view),this.notifier.notify(13)},destroy(){Fs(this),this.onDestroyFn(),this.cleanup(),this.view[as]?.delete(this)}});function lK(t,i,e){let n=Object.create(cK);return n.view=t,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=i,n.fn=kS(n,e),t[as]??=new Set,t[as].add(n),n.consumerMarkedDirty(n),n}function dK(t,i,e){let n=Object.create(sK);return n.fn=kS(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 kS(t,i){return()=>{i(e=>(t.cleanupFns??=[]).push(e))}}var sp=Symbol("InputSignalNode#UNSET"),VS=Re(q({},A2),{transformFn:void 0,applyValueToInputSignal(t,i){Hc(t,i)}});function BS(t,i){let e=Object.create(VS);e.value=t,e.transformFn=i?.transform;function n(){if(zs(e),e.value===sp){let o=null;throw new he(-950,o)}return e.value}return n[ni]=e,n}var gn=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>m0(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},jS=new L("");jS.__NG_ELEMENT_ID__=t=>{let i=ri();if(i===null)throw new he(204,!1);if(i.type&2)return i.value;if(t&8)return null;throw new he(204,!1)};function ES(t,i){return BS(t,i)}function vK(t){return BS(sp,t)}var td=(ES.required=vK,ES);function IS(t,i){return R7(i)}function yK(t,i){return z7(i)}var S0=(IS.required=yK,IS);function OS(t,i){return R7(i)}function CK(t,i){return z7(i)}var HS=(OS.required=CK,OS);function US(t,i){let e=Object.create(VS),n=new ip;e.value=t;function o(){return zs(e),TS(e.value),e.value}return o[ni]=e,o.asReadonly=J3.bind(o),o.set=r=>{e.equal(e.value,r)||(Hc(e,r),n.emit(r))},o.update=r=>{TS(e.value),o.set(r(e.value))},o.subscribe=n.subscribe.bind(n),o.destroyRef=n.destroyRef,o}function TS(t){if(t===sp)throw new he(952,!1)}function PS(t,i){return US(t,i)}function xK(t){return US(sp,t)}var vo=(PS.required=xK,PS);function MK(t,i,e){let n=new d0(e);return Promise.resolve(n)}function LS(t){for(let i=t.length-1;i>=0;i--)if(t[i]!==void 0)return t[i]}var op=new L(""),wK=new L("");function D0(t){return!t.moduleRef}function DK(t){let i=D0(t)?t.r3Injector:t.moduleRef.injector,e=i.get(ce);return e.run(()=>{D0(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let n=i.get(go),o;if(e.runOutsideAngular(()=>{o=e.onError.subscribe({next:n})}),D0(t)){let r=()=>i.destroy(),a=t.platformInjector.get(op);a.add(r),i.onDestroy(()=>{o.unsubscribe(),a.delete(r)})}else{let r=()=>t.moduleRef.destroy(),a=t.platformInjector.get(op);a.add(r),t.moduleRef.onDestroy(()=>{t0(t.allPlatformModules,t.moduleRef),o.unsubscribe(),a.delete(r)})}return kK(n,e,()=>{let r=i.get(Ca),a=r.add(),s=i.get(B7);return s.runInitializers(),s.donePromise.then(()=>{let c=i.get(Wr,M0);if(aS(c||M0),!i.get(wK,!0))return D0(t)?i.get(bi):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(D0(t)){let f=i.get(bi);return t.rootComponent!==void 0&&f.bootstrap(t.rootComponent),f}else return $S?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void r.remove(a))})})}var $S;function AS(){$S=SK}function SK(t,i){let e=t.injector.get(bi);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(n=>e.bootstrap(n));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new he(-403,!1);i.push(t)}function kK(t,i,e){try{let n=e();return ms(n)?n.catch(o=>{throw i.runOutsideAngular(()=>t(o)),o}):n}catch(n){throw i.runOutsideAngular(()=>t(n)),n}}var GS=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,n){let o=n?.scheduleInRootZone,r=()=>tD(n?.ngZone,Re(q({},Q7({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),a=n?.ignoreChangesOutsideZone,s=[wS({ngZoneFactory:r,ignoreChangesOutsideZone:a}),{provide:lr,useExisting:DS},yM],c=XD(e.moduleType,this.injector,s);return AS(),DK({moduleRef:c,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,n=[]){let o=j7({},n);return AS(),MK(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 he(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());let e=this._injector.get(op,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(n){return new(n||t)(be(Ce))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),s_=null;function EK(t){if(l_())throw new he(400,!1);iS(),s_=t;let i=t.get(GS);return TK(t),i}function c_(t,i,e=[]){let n=`Platform: ${i}`,o=new L(n);return(r=[])=>{let a=l_();if(!a){let s=[...e,...r,{provide:o,useValue:!0}];a=t?.(s)??EK(IK(s,n))}return OK(o)}}function IK(t=[],i){return Ce.create({name:i,providers:[{provide:G2,useValue:"platform"},{provide:op,useValue:new Set([()=>s_=null])},...t]})}function OK(t){let i=l_();if(!i)throw new he(-401,!1);return i}function l_(){return s_?.get(GS)??null}function TK(t){let i=t.get(O4,null);Si(t,()=>{i?.forEach(e=>e())})}var we=(()=>{class t{static __NG_ELEMENT_ID__=PK}return t})();function PK(t){return LK(ri(),ze(),(t&16)===16)}function LK(t,i,e){if(ss(t)&&!e){let n=fr(t.index,i);return new Qs(n,n)}else if(t.type&175){let n=i[Xi];return new Qs(n,i)}return null}var J7=class{constructor(){}supports(i){return P7(i)}create(i){return new e_(i)}},AK=(t,i)=>i,e_=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||AK}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 t_(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 rp),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 rp),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}},t_=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}},n_=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}},rp=class{map=new Map;put(i){let e=i.trackById,n=this.map.get(e);n||(n=new n_,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 RS(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 r_(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))}},r_=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function zS(){return new Xo([new J7])}var Xo=(()=>{class t{factories;static \u0275prov=z({token:t,providedIn:"root",factory:zS});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||zS())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n!=null)return n;throw new he(901,!1)}}return t})();function NS(){return new cp([new i_])}var cp=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:NS});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||NS())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n)return n;throw new he(901,!1)}}return t})();var WS=c_(null,"core",[]),YS=(()=>{class t{constructor(e){}static \u0275fac=function(n){return new(n||t)(be(bi))};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();function $(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function ht(t,i=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):i}var Z7=Symbol("NOT_SET"),qS=new Set,RK=Re(q({},A2),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Z7,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(zs(u),u.value),u.signal[ni]=u,u.registerCleanupFn=f=>(u.cleanup??=new Set).add(f),this.nodes[s]=u,this.hooks[s]=f=>u.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??qS)e()}finally{Fs(i)}}};function QS(t,i){let e=i?.injector??d(Ce),n=e.get(lr),o=e.get(N4),r=e.get(Zs,null,{optional:!0});o.impl??=e.get(C7);let a=t;typeof a=="function"&&(a={mixedReadWrite:t});let s=e.get(sl,null,{optional:!0}),c=new a_(o.impl,[a.earlyRead,a.write,a.mixedReadWrite,a.read],s?.view,n,e,r?.snapshot(null));return o.impl.register(c),c}function lp(t,i){let e=fa(t),n=i.elementInjector||S1();return new Ks(e).create(n,i.projectableNodes,i.hostElement,i.environmentInjector,i.directives,i.bindings)}function KS(t){let i=fa(t);if(!i)return null;let e=new Ks(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 JS=null;function Zo(){return JS}function d_(t){JS??=t}var k0=class{},E0=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:()=>d(ek),providedIn:"platform"})}return t})(),u_=new L(""),ek=(()=>{class t extends E0{_location;_history;_doc=d(De);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Zo().getBaseHref(this._doc)}onPopState(e){let n=Zo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=Zo().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=z({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function dp(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function XS(t){let i=t.search(/#|\?|$/);return t[i-1]==="/"?t.slice(0,i-1)+t.slice(i):t}function Yr(t){return t&&t[0]!=="?"?`?${t}`:t}var qr=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:()=>d(mp),providedIn:"root"})}return t})(),up=new L(""),mp=(()=>{class t extends qr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??d(De).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 dp(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+Yr(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${n}${o}`:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r));this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(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)(be(E0),be(up,8))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),br=(()=>{class t{_subject=new B;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=FK(XS(ZS(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+Yr(n))}normalize(e){return t.stripTrailingSlash(NK(this._basePath,ZS(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+Yr(n)),o)}replaceState(e,n="",o=null){this._locationStrategy.replaceState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Yr(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=Yr;static joinWithSlash=dp;static stripTrailingSlash=XS;static \u0275fac=function(n){return new(n||t)(be(qr))};static \u0275prov=z({token:t,factory:()=>zK(),providedIn:"root"})}return t})();function zK(){return new br(be(qr))}function NK(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function ZS(t){return t.replace(/\/index.html$/,"")}function FK(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var C_=(()=>{class t extends qr{_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=dp(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r))||this._platformLocation.pathname;this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(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)(be(E0),be(up,8))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),ck={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]},xp=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(xp||{});var to=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(to||{}),rn=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(rn||{}),Ro=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(Ro||{}),Ri={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 lk(t){return bo(t)[Mn.LocaleId]}function dk(t,i,e){let n=bo(t),o=[n[Mn.DayPeriodsFormat],n[Mn.DayPeriodsStandalone]],r=vr(o,i);return vr(r,e)}function uk(t,i,e){let n=bo(t),o=[n[Mn.DaysFormat],n[Mn.DaysStandalone]],r=vr(o,i);return vr(r,e)}function mk(t,i,e){let n=bo(t),o=[n[Mn.MonthsFormat],n[Mn.MonthsStandalone]],r=vr(o,i);return vr(r,e)}function pk(t,i){let n=bo(t)[Mn.Eras];return vr(n,i)}function I0(t,i){let e=bo(t);return vr(e[Mn.DateFormat],i)}function O0(t,i){let e=bo(t);return vr(e[Mn.TimeFormat],i)}function T0(t,i){let n=bo(t)[Mn.DateTimeFormat];return vr(n,i)}function Kr(t,i){let e=bo(t),n=e[Mn.NumberSymbols][i];if(typeof n>"u"){if(i===Ri.CurrencyDecimal)return e[Mn.NumberSymbols][Ri.Decimal];if(i===Ri.CurrencyGroup)return e[Mn.NumberSymbols][Ri.Group]}return n}function x_(t,i){return bo(t)[Mn.NumberFormats][i]}function VK(t){return bo(t)[Mn.Currencies]}function fk(t){if(!t[Mn.ExtraData])throw new he(2303,!1)}function hk(t){let i=bo(t);return fk(i),(i[Mn.ExtraData][2]||[]).map(n=>typeof n=="string"?m_(n):[m_(n[0]),m_(n[1])])}function gk(t,i,e){let n=bo(t);fk(n);let o=[n[Mn.ExtraData][0],n[Mn.ExtraData][1]],r=vr(o,i)||[];return vr(r,e)||[]}function vr(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new he(2304,!1)}function m_(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}function _k(t,i,e="en"){let n=VK(e)[t]||ck[t]||[],o=n[1];return i==="narrow"&&typeof o=="string"?o:n[0]||t}var BK=2;function bk(t){let i,e=ck[t];return e&&(i=e[2]),typeof i=="number"?i:BK}var jK=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,pp={},HK=/((?:[^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 vk(t,i,e,n){let o=XK(t);i=fs(e,i)||i;let a=[],s;for(;i;)if(s=HK.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=Ck(n,c),o=KK(o,n));let u="";return a.forEach(f=>{let h=qK(f);u+=h?h(o,e,c):f==="''"?"'":f.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function bp(t,i,e){let n=new Date(0);return n.setFullYear(t,i,e),n.setHours(0,0,0),n}function fs(t,i){let e=lk(t);if(pp[e]??={},pp[e][i])return pp[e][i];let n="";switch(i){case"shortDate":n=I0(t,Ro.Short);break;case"mediumDate":n=I0(t,Ro.Medium);break;case"longDate":n=I0(t,Ro.Long);break;case"fullDate":n=I0(t,Ro.Full);break;case"shortTime":n=O0(t,Ro.Short);break;case"mediumTime":n=O0(t,Ro.Medium);break;case"longTime":n=O0(t,Ro.Long);break;case"fullTime":n=O0(t,Ro.Full);break;case"short":let o=fs(t,"shortTime"),r=fs(t,"shortDate");n=fp(T0(t,Ro.Short),[o,r]);break;case"medium":let a=fs(t,"mediumTime"),s=fs(t,"mediumDate");n=fp(T0(t,Ro.Medium),[a,s]);break;case"long":let c=fs(t,"longTime"),u=fs(t,"longDate");n=fp(T0(t,Ro.Long),[c,u]);break;case"full":let f=fs(t,"fullTime"),h=fs(t,"fullDate");n=fp(T0(t,Ro.Full),[f,h]);break}return n&&(pp[e][i]=n),n}function fp(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,n){return i!=null&&n in i?i[n]:e})),t}function Qr(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 UK(s,i);let c=Kr(a,Ri.MinusSign);return Qr(s,i,c,n,o)}}function $K(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 he(2301,!1)}}function _n(t,i,e=to.Format,n=!1){return function(o,r){return GK(o,r,t,i,e,n)}}function GK(t,i,e,n,o,r){switch(e){case 2:return mk(i,o,n)[t.getMonth()];case 1:return uk(i,o,n)[t.getDay()];case 0:let a=t.getHours(),s=t.getMinutes();if(r){let u=hk(i),f=gk(i,o,n),h=u.findIndex(y=>{if(Array.isArray(y)){let[x,D]=y,Y=a>=x.hours&&s>=x.minutes,Q=a0?Math.floor(o/60):Math.ceil(o/60);switch(t){case 0:return(o>=0?"+":"")+Qr(a,2,r)+Qr(Math.abs(o%60),2,r);case 1:return"GMT"+(o>=0?"+":"")+Qr(a,1,r);case 2:return"GMT"+(o>=0?"+":"")+Qr(a,2,r)+":"+Qr(Math.abs(o%60),2,r);case 3:return n===0?"Z":(o>=0?"+":"")+Qr(a,2,r)+":"+Qr(Math.abs(o%60),2,r);default:throw new he(2310,!1)}}}var WK=0,_p=4;function YK(t){let i=bp(t,WK,1).getDay();return bp(t,0,1+(i<=_p?_p:_p+7)-i)}function yk(t){let i=t.getDay(),e=i===0?-3:_p-i;return bp(t.getFullYear(),t.getMonth(),t.getDate()+e)}function p_(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=yk(e),a=YK(r.getFullYear()),s=r.getTime()-a.getTime();o=1+Math.round(s/6048e5)}return Qr(o,t,Kr(n,Ri.MinusSign))}}function gp(t,i=!1){return function(e,n){let r=yk(e).getFullYear();return Qr(r,t,Kr(n,Ri.MinusSign),i)}}var f_={};function qK(t){if(f_[t])return f_[t];let i;switch(t){case"G":case"GG":case"GGG":i=_n(3,rn.Abbreviated);break;case"GGGG":i=_n(3,rn.Wide);break;case"GGGGG":i=_n(3,rn.Narrow);break;case"y":i=ci(0,1,0,!1,!0);break;case"yy":i=ci(0,2,0,!0,!0);break;case"yyy":i=ci(0,3,0,!1,!0);break;case"yyyy":i=ci(0,4,0,!1,!0);break;case"Y":i=gp(1);break;case"YY":i=gp(2,!0);break;case"YYY":i=gp(3);break;case"YYYY":i=gp(4);break;case"M":case"L":i=ci(1,1,1);break;case"MM":case"LL":i=ci(1,2,1);break;case"MMM":i=_n(2,rn.Abbreviated);break;case"MMMM":i=_n(2,rn.Wide);break;case"MMMMM":i=_n(2,rn.Narrow);break;case"LLL":i=_n(2,rn.Abbreviated,to.Standalone);break;case"LLLL":i=_n(2,rn.Wide,to.Standalone);break;case"LLLLL":i=_n(2,rn.Narrow,to.Standalone);break;case"w":i=p_(1);break;case"ww":i=p_(2);break;case"W":i=p_(1,!0);break;case"d":i=ci(2,1);break;case"dd":i=ci(2,2);break;case"c":case"cc":i=ci(7,1);break;case"ccc":i=_n(1,rn.Abbreviated,to.Standalone);break;case"cccc":i=_n(1,rn.Wide,to.Standalone);break;case"ccccc":i=_n(1,rn.Narrow,to.Standalone);break;case"cccccc":i=_n(1,rn.Short,to.Standalone);break;case"E":case"EE":case"EEE":i=_n(1,rn.Abbreviated);break;case"EEEE":i=_n(1,rn.Wide);break;case"EEEEE":i=_n(1,rn.Narrow);break;case"EEEEEE":i=_n(1,rn.Short);break;case"a":case"aa":case"aaa":i=_n(0,rn.Abbreviated);break;case"aaaa":i=_n(0,rn.Wide);break;case"aaaaa":i=_n(0,rn.Narrow);break;case"b":case"bb":case"bbb":i=_n(0,rn.Abbreviated,to.Standalone,!0);break;case"bbbb":i=_n(0,rn.Wide,to.Standalone,!0);break;case"bbbbb":i=_n(0,rn.Narrow,to.Standalone,!0);break;case"B":case"BB":case"BBB":i=_n(0,rn.Abbreviated,to.Format,!0);break;case"BBBB":i=_n(0,rn.Wide,to.Format,!0);break;case"BBBBB":i=_n(0,rn.Narrow,to.Format,!0);break;case"h":i=ci(3,1,-12);break;case"hh":i=ci(3,2,-12);break;case"H":i=ci(3,1);break;case"HH":i=ci(3,2);break;case"m":i=ci(4,1);break;case"mm":i=ci(4,2);break;case"s":i=ci(5,1);break;case"ss":i=ci(5,2);break;case"S":i=ci(6,1);break;case"SS":i=ci(6,2);break;case"SSS":i=ci(6,3);break;case"Z":case"ZZ":case"ZZZ":i=hp(0);break;case"ZZZZZ":i=hp(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=hp(1);break;case"OOOO":case"ZZZZ":case"zzzz":i=hp(2);break;default:return null}return f_[t]=i,i}function Ck(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function QK(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function KK(t,i,e){let o=t.getTimezoneOffset(),r=Ck(i,o);return QK(t,-1*(r-o))}function XK(t){if(tk(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 bp(o,r-1,a)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(jK))return ZK(n)}let i=new Date(t);if(!tk(i))throw new he(2311,!1);return i}function ZK(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),u=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return r.call(i,a,s,c,u),i}function tk(t){return t instanceof Date&&!isNaN(t.valueOf())}var JK=/^(\d+)?\.((\d+)(-(\d+))?)?$/,nk=22,vp=".",P0="0",eX=";",tX=",",h_="#",ik="\xA4";function xk(t,i,e,n,o,r,a=!1){let s="",c=!1;if(!isFinite(t))s=Kr(e,Ri.Infinity);else{let u=iX(t);a&&(u=nX(u));let f=i.minInt,h=i.minFrac,y=i.maxFrac;if(r){let pe=r.match(JK);if(pe===null)throw new he(2306,!1);let mt=pe[1],Et=pe[3],Ht=pe[5];mt!=null&&(f=g_(mt)),Et!=null&&(h=g_(Et)),Ht!=null?y=g_(Ht):Et!=null&&h>y&&(y=h)}oX(u,h,y);let x=u.digits,D=u.integerLen,Y=u.exponent,Q=[];for(c=x.every(pe=>!pe);D0?Q=x.splice(D,x.length):(Q=x,x=[0]);let X=[];for(x.length>=i.lgSize&&X.unshift(x.splice(-i.lgSize,x.length).join(""));x.length>i.gSize;)X.unshift(x.splice(-i.gSize,x.length).join(""));x.length&&X.unshift(x.join("")),s=X.join(Kr(e,n)),Q.length&&(s+=Kr(e,o)+Q.join("")),Y&&(s+=Kr(e,Ri.Exponential)+"+"+Y)}return t<0&&!c?s=i.negPre+s+i.negSuf:s=i.posPre+s+i.posSuf,s}function Mp(t,i,e,n,o){let r=x_(i,xp.Currency),a=wk(r,Kr(i,Ri.MinusSign));return a.minFrac=bk(n),a.maxFrac=a.minFrac,xk(t,a,i,Ri.CurrencyGroup,Ri.CurrencyDecimal,o).replace(ik,e).replace(ik,"").trim()}function Mk(t,i,e){let n=x_(i,xp.Decimal),o=wk(n,Kr(i,Ri.MinusSign));return xk(t,o,i,Ri.Group,Ri.Decimal,e)}function wk(t,i="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(eX),o=n[0],r=n[1],a=o.indexOf(vp)!==-1?o.split(vp):[o.substring(0,o.lastIndexOf(P0)+1),o.substring(o.lastIndexOf(P0)+1)],s=a[0],c=a[1]||"";e.posPre=s.substring(0,s.indexOf(h_));for(let f=0;f-1&&(i=i.replace(vp,"")),(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)===P0;r++);if(r===(s=i.length))n=[0],o=1;else{for(s--;i.charAt(s)===P0;)s--;for(o-=r,n=[],a=0;r<=s;r++,a++)n[a]=Number(i.charAt(r))}return o>nk&&(n=n.splice(0,nk-1),e=o-1,o=1),{digits:n,exponent:e,integerLen:o}}function oX(t,i,e){if(i>e)throw new he(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 h=a;h=5)if(a-1<0){for(let h=0;h>a;h--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[a-1]++;for(;o=u?D.pop():c=!1),y>=10?1:0},0);f&&(n.unshift(f),t.integerLen++)}function g_(t){let i=parseInt(t);if(isNaN(i))throw new he(2305,!1);return i}var __=/\s+/,ok=[],Kn=(()=>{class t{_ngEl;_renderer;initialClasses=ok;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(__):ok}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(__):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(__).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)(Me(Z),Me(tt))};static \u0275dir=R({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var yp=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}},Dk=(()=>{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 yp(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),rk(s,o)}});for(let o=0,r=n.length;o{let r=n.get(o.currentIndex);rk(r,o)})}static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(Me(ft),Me(rt),Me(Xo))};static \u0275dir=R({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function rk(t,i){t.context.$implicit=i.item}var rX=(()=>{class t{_viewContainer;_context=new Cp;_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){ak(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){ak(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)(Me(ft),Me(rt))};static \u0275dir=R({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),Cp=class{$implicit=null;ngIf=null};function ak(t,i){if(t&&!t.createEmbeddedView)throw new he(2020,!1)}var b_=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()}},Sk=(()=>{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=R({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}})}return t})(),aX=(()=>{class t{ngSwitch;_view;ngSwitchCase;constructor(e,n,o){this.ngSwitch=o,o._addCase(),this._view=new b_(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static \u0275fac=function(n){return new(n||t)(Me(ft),Me(rt),Me(Sk,9))};static \u0275dir=R({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}})}return t})();var L0=(()=>{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:$r.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)(Me(Z),Me(cp),Me(tt))};static \u0275dir=R({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),ec=(()=>{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)(Me(ft))};static \u0275dir=R({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ne]})}return t})();function nd(t,i){return new he(2100,!1)}var v_=class{createSubscription(i,e,n){return Yn(()=>i.subscribe({next:e,error:n}))}dispose(i){Yn(()=>i.unsubscribe())}},y_=class{createSubscription(i,e,n){return i.then(o=>e?.(o),o=>n?.(o)),{unsubscribe:()=>{e=null,n=null}}}dispose(i){i.unsubscribe()}},sX=new y_,cX=new v_,A0=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=d(go);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(ms(e))return sX;if(q4(e))return cX;throw nd(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)(Me(we,16))};static \u0275pipe=wt({name:"async",type:t,pure:!1})}return t})(),lX=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw nd(t,e);return e.toLowerCase()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"lowercase",type:t,pure:!0})}return t})(),dX=/(?:[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,uX=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw nd(t,e);return e.replace(dX,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 mX="mediumDate",kk=new L(""),Ek=new L(""),id=(()=>{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??mX,s=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return vk(e,a,r||this.locale,s)}catch(a){throw nd(t,a.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16),Me(kk,24),Me(Ek,24))};static \u0275pipe=wt({name:"date",type:t,pure:!0})}return t})();function pX(t,i){return{key:t,value:i}}var fX=(()=>{class t{differs;constructor(e){this.differs=e}differ;keyValues=[];compareFn=sk;transform(e,n=sk){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(pX(a.key,a.currentValue))})),(o||r)&&(n&&this.keyValues.sort(n),this.compareFn=n),this.keyValues}static \u0275fac=function(n){return new(n||t)(Me(cp,16))};static \u0275pipe=wt({name:"keyvalue",type:t,pure:!1})}return t})();function sk(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(!Ik(e))return null;o||=this._locale;try{let r=Ok(e);return Mk(r,o,n)}catch(r){throw nd(t,r.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16))};static \u0275pipe=wt({name:"number",type:t,pure:!0})}return t})();var M_=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,n="USD"){this._locale=e,this._defaultCurrencyCode=n}transform(e,n=this._defaultCurrencyCode,o="symbol",r,a){if(!Ik(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=_k(s,o==="symbol"?"wide":"narrow",a):s=o);try{let c=Ok(e);return Mp(c,a,s,n,r)}catch(c){throw nd(t,c.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16),Me(K7,16))};static \u0275pipe=wt({name:"currency",type:t,pure:!0})}return t})();function Ik(t){return!(t==null||t===""||t!==t)}function Ok(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new he(2309,!1);return t}var fe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();function z0(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 _l=class{};function bMe(t,i,e){return $7(t,i,e)}var D_="browser";function Tk(t){return t===D_}var Pk=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>new w_(d(De),window)})}return t})(),w_=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(Re(q({},e),{left:i[0],top:i[1]}))}scrollToAnchor(i,e){let n=hX(this.document,i);n&&(this.scrollToElement(n,e),n.focus())}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch{console.warn(dr(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(Re(q({},e),{left:o-a[0],top:r-a[1]}))}};function hX(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 N0=class{_doc;constructor(i){this._doc=i}manager},wp=(()=>{class t extends N0{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)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Sp=new L(""),O_=(()=>{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 wp));this._plugins=o.slice().reverse();let r=e.find(a=>a instanceof wp);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 he(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||t)(be(Sp),be(ce))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),S_="ng-app-id";function Lk(t){for(let i of t)i.remove()}function Ak(t,i){let e=i.createElement("style");return e.textContent=t,e}function gX(t,i,e,n){let o=t.head?.querySelectorAll(`style[${S_}="${i}"],link[${S_}="${i}"]`);if(o)for(let r of o)r.removeAttribute(S_),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 E_(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var T_=(()=>{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,gX(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,Ak);n?.forEach(o=>this.addUsage(o,this.external,E_))}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&&(Lk(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Lk(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,Ak(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,E_(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)(be(De),be(Xs),be(W1,8),be(pl))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),k_={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"},P_=/%COMP%/g;var zk="%COMP%",_X=`_nghost-${zk}`,bX=`_ngcontent-${zk}`,vX=!0,yX=new L("",{providedIn:"root",factory:()=>vX});function CX(t){return bX.replace(P_,t)}function xX(t){return _X.replace(P_,t)}function Nk(t,i){return i.map(e=>e.replace(P_,t))}var L_=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,r,a,s,c=null,u=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=a,this.ngZone=s,this.nonce=c,this.tracingService=u,this.platformIsServer=!1,this.defaultRenderer=new F0(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 Dp?o.applyToHost(e):o instanceof V0&&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,u=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,h=this.platformIsServer,y=this.tracingService;switch(n.encapsulation){case ls.Emulated:r=new Dp(c,u,n,this.appId,f,a,s,h,y);break;case ls.ShadowDom:return new I_(c,u,e,n,a,s,this.nonce,h,y);default:r=new V0(c,u,n,f,a,s,h,y);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)(be(O_),be(T_),be(Xs),be(yX),be(De),be(ce),be(W1),be(Zs,8))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),F0=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(k_[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(Rk(i)?i.content:i).appendChild(e)}insertBefore(i,e,n){i&&(Rk(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 he(-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=k_[o];r?i.setAttributeNS(r,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){let o=k_[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&($r.DashCase|$r.Important)?i.style.setProperty(e,n,o&$r.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&$r.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=Zo().getGlobalEventTarget(this.doc,i),!i))throw new he(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 Rk(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var I_=class extends F0{sharedStylesHost;hostEl;shadowRoot;constructor(i,e,n,o,r,a,s,c,u){super(i,r,a,c,u),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let f=o.styles;f=Nk(o.id,f);for(let y of f){let x=document.createElement("style");s&&x.setAttribute("nonce",s),x.textContent=y,this.shadowRoot.appendChild(x)}let h=o.getExternalStyles?.();if(h)for(let y of h){let x=E_(y,r);s&&x.setAttribute("nonce",s),this.shadowRoot.appendChild(x)}}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)}},V0=class extends F0{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,n,o,r,a,s,c,u){super(i,r,a,s,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let f=n.styles;this.styles=u?Nk(u,f):f,this.styleUrls=n.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ul.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Dp=class extends V0{contentAttr;hostAttr;constructor(i,e,n,o,r,a,s,c,u){let f=o+"-"+n.id;super(i,e,n,r,a,s,c,u,f),this.contentAttr=CX(f),this.hostAttr=xX(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 kp=class t extends k0{supportsDOMEvents=!0;static makeCurrent(){d_(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=MX();return e==null?null:wX(e)}resetBaseElement(){B0=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return z0(document.cookie,i)}},B0=null;function MX(){return B0=B0||document.head.querySelector("base"),B0?B0.getAttribute("href"):null}function wX(t){return new URL(t,document.baseURI).pathname}var Ep=class{addToWindow(i){oi.getAngularTestability=(n,o=!0)=>{let r=i.findTestabilityInTree(n,o);if(r==null)throw new he(5103,!1);return r},oi.getAllAngularTestabilities=()=>i.getAllTestabilities(),oi.getAllAngularRootElements=()=>i.getAllRootElements();let e=n=>{let o=oi.getAllAngularTestabilities(),r=o.length,a=function(){r--,r==0&&n()};o.forEach(s=>{s.whenStable(a)})};oi.frameworkStabilizers||(oi.frameworkStabilizers=[]),oi.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,n){if(e==null)return null;let o=i.getTestability(e);return o??(n?Zo().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},DX=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Fk=["alt","control","meta","shift"],SX={"\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"},kX={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Vk=(()=>{class t extends N0{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(()=>Zo().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."),Fk.forEach(u=>{let f=n.indexOf(u);f>-1&&(n.splice(f,1),a+=u+".")}),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=SX[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"),Fk.forEach(a=>{if(a!==o){let s=kX[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)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function EX(){kp.makeCurrent()}function IX(){return new Di}function OX(){return i7(document),document}var TX=[{provide:pl,useValue:D_},{provide:O4,useValue:EX,multi:!0},{provide:De,useFactory:OX}],PX=c_(WS,"browser",TX);var LX=[{provide:K1,useClass:Ep},{provide:Y4,useClass:C0,deps:[ce,x0,K1]},{provide:C0,useClass:C0,deps:[ce,x0,K1]}],AX=[{provide:G2,useValue:"root"},{provide:Di,useFactory:IX},{provide:Sp,useClass:wp,multi:!0,deps:[De]},{provide:Sp,useClass:Vk,multi:!0,deps:[De]},L_,T_,O_,{provide:Nn,useExisting:L_},{provide:_l,useClass:DX},[]],RX=(()=>{class t{constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({providers:[...AX,...LX],imports:[fe,YS]})}return t})();var ad=class{},j0=class{},ki=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 Op=class{encodeKey(i){return Bk(i)}encodeValue(i){return Bk(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function zX(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 NX=/%(\d[a-f0-9])/gi,FX={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Bk(t){return encodeURIComponent(t).replace(NX,(i,e)=>FX[e]??i)}function Ip(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Op,i.fromString){if(i.fromObject)throw new he(2805,!1);this.map=zX(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(Ip):[Ip(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(Ip(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(Ip(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 Tp=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 VX(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function jk(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Hk(t){return typeof Blob<"u"&&t instanceof Blob}function Uk(t){return typeof FormData<"u"&&t instanceof FormData}function BX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var $k="Content-Type",Gk="Accept",Yk="X-Request-URL",qk="text/plain",Qk="application/json",jX=`${Qk}, ${qk}, */*`,od=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(VX(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 he(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 ki,this.context??=new Tp,!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(nn,i.setHeaders[nn]),pe)),i.setParams&&(mt=Object.keys(i.setParams).reduce((Ht,nn)=>Ht.set(nn,i.setParams[nn]),mt)),new t(e,n,Y,{params:mt,headers:pe,context:Et,reportProgress:X,responseType:o,withCredentials:Q,transferCache:x,keepalive:r,cache:s,priority:a,timeout:D,mode:c,redirect:u,credentials:f,referrer:h,integrity:y})}},bl=(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})(bl||{}),sd=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new ki,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}},Pp=class t extends sd{constructor(i={}){super(i)}type=bl.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})}},H0=class t extends sd{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=bl.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})}},rd=class extends sd{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}},HX=200,UX=204;function A_(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 Ln=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof od)r=e;else{let c;o.headers instanceof ki?c=o.headers:c=new ki(o.headers);let u;o.params&&(o.params instanceof te?u=o.params:u=new te({fromObject:o.params})),r=new od(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,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=ne(r).pipe(po(c=>this.handler.handle(c)));if(e instanceof od||o.observe==="events")return a;let s=a.pipe(Oe(c=>c instanceof H0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new he(2806,!1);return c.body}));case"blob":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new he(2807,!1);return c.body}));case"text":return s.pipe(le(c=>{if(c.body!==null&&typeof c.body!="string")throw new he(2808,!1);return c.body}));case"json":default:return s.pipe(le(c=>c.body))}case"response":return s;default:throw new he(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,A_(o,n))}post(e,n,o={}){return this.request("POST",e,A_(o,n))}put(e,n,o={}){return this.request("PUT",e,A_(o,n))}static \u0275fac=function(n){return new(n||t)(be(ad))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var $X=new L("");function Kk(t,i){return i(t)}function GX(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function WX(t,i,e){return(n,o)=>Si(e,()=>i(n,r=>t(r,o)))}var Ap=new L(""),z_=new L(""),Xk=new L(""),N_=new L("",{providedIn:"root",factory:()=>!0});function YX(){let t=null;return(i,e)=>{t===null&&(t=(d(Ap,{optional:!0})??[]).reduceRight(GX,Kk));let n=d(z1);if(d(N_)){let r=n.add();return t(i,e).pipe(Nr(r))}else return t(i,e)}}var Lp=(()=>{class t extends ad{backend;injector;chain=null;pendingTasks=d(z1);contributeToStability=d(N_);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(z_),...this.injector.get(Xk,[])]));this.chain=n.reduceRight((o,r)=>WX(o,r,this.injector),Kk)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Nr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(be(j0),be(Jt))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var qX=/^\)\]\}',?\n/,QX=RegExp(`^${Yk}:`,"m");function KX(t){return"responseURL"in t&&t.responseURL?t.responseURL:QX.test(t.getAllResponseHeaders())?t.getResponseHeader(Yk):null}var R_=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new he(-2800,!1);let n=this.xhrFactory;return ne(null).pipe(at(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Q,X)=>a.setRequestHeader(Q,X.join(","))),e.headers.has(Gk)||a.setRequestHeader(Gk,jX),!e.headers.has($k)){let Q=e.detectContentTypeHeader();Q!==null&&a.setRequestHeader($k,Q)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Q=e.responseType.toLowerCase();a.responseType=Q!=="json"?Q:"text"}let s=e.serializeBody(),c=null,u=()=>{if(c!==null)return c;let Q=a.statusText||"OK",X=new ki(a.getAllResponseHeaders()),pe=KX(a)||e.url;return c=new Pp({headers:X,status:a.status,statusText:Q,url:pe}),c},f=()=>{let{headers:Q,status:X,statusText:pe,url:mt}=u(),Et=null;X!==UX&&(Et=typeof a.response>"u"?a.responseText:a.response),X===0&&(X=Et?HX:0);let Ht=X>=200&&X<300;if(e.responseType==="json"&&typeof Et=="string"){let nn=Et;Et=Et.replace(qX,"");try{Et=Et!==""?JSON.parse(Et):null}catch(ar){Et=nn,Ht&&(Ht=!1,Et={error:ar,text:Et})}}Ht?(r.next(new H0({body:Et,headers:Q,status:X,statusText:pe,url:mt||void 0})),r.complete()):r.error(new rd({error:Et,headers:Q,status:X,statusText:pe,url:mt||void 0}))},h=Q=>{let{url:X}=u(),pe=new rd({error:Q,status:a.status||0,statusText:a.statusText||"Unknown Error",url:X||void 0});r.error(pe)},y=h;e.timeout&&(y=Q=>{let{url:X}=u(),pe=new rd({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:X||void 0});r.error(pe)});let x=!1,D=Q=>{x||(r.next(u()),x=!0);let X={type:bl.DownloadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),e.responseType==="text"&&a.responseText&&(X.partialText=a.responseText),r.next(X)},Y=Q=>{let X={type:bl.UploadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),r.next(X)};return a.addEventListener("load",f),a.addEventListener("error",h),a.addEventListener("timeout",y),a.addEventListener("abort",h),e.reportProgress&&(a.addEventListener("progress",D),s!==null&&a.upload&&a.upload.addEventListener("progress",Y)),a.send(s),r.next({type:bl.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",f),a.removeEventListener("timeout",y),e.reportProgress&&(a.removeEventListener("progress",D),s!==null&&a.upload&&a.upload.removeEventListener("progress",Y)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(be(_l))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Zk=new L(""),XX="XSRF-TOKEN",ZX=new L("",{providedIn:"root",factory:()=>XX}),JX="X-XSRF-TOKEN",eZ=new L("",{providedIn:"root",factory:()=>JX}),U0=class{},tZ=(()=>{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=z0(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(be(De),be(ZX))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),nZ=/^(?:https?:)?\/\//i;function iZ(t,i){if(!d(Zk)||t.method==="GET"||t.method==="HEAD"||nZ.test(t.url))return i(t);let e=d(U0).getToken(),n=d(eZ);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var F_=(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})(F_||{});function oZ(t,i){return{\u0275kind:t,\u0275providers:i}}function rZ(...t){let i=[Ln,R_,Lp,{provide:ad,useExisting:Lp},{provide:j0,useFactory:()=>d($X,{optional:!0})??d(R_)},{provide:z_,useValue:iZ,multi:!0},{provide:Zk,useValue:!0},{provide:U0,useClass:tZ}];for(let e of t)i.push(...e.\u0275providers);return ha(i)}var Wk=new L("");function aZ(){return oZ(F_.LegacyInterceptors,[{provide:Wk,useFactory:YX},{provide:z_,useExisting:Wk,multi:!0}])}var eE=(()=>{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)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=be(sZ),o},providedIn:"root"})}return t})(),sZ=(()=>{class t extends hs{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Wn.NONE:return n;case Wn.HTML:return Da(n,"HTML")?Yo(n):A4(this._doc,String(n)).toString();case Wn.STYLE:return Da(n,"Style")?Yo(n):n;case Wn.SCRIPT:if(Da(n,"Script"))return Yo(n);throw new he(5200,!1);case Wn.URL:return Da(n,"URL")?Yo(n):f0(String(n));case Wn.RESOURCE_URL:if(Da(n,"ResourceURL"))return Yo(n);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return a7(e)}bypassSecurityTrustStyle(e){return s7(e)}bypassSecurityTrustScript(e){return c7(e)}bypassSecurityTrustUrl(e){return l7(e)}bypassSecurityTrustResourceUrl(e){return d7(e)}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cd=class{},nE=(()=>{class t extends cd{getTranslation(e){return ne({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),G0=class{},iE=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function zp(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{Y0(i[n])?n in t?e[n]=V_(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):V_({},i)}function B_(t,i){let e=i.split(".");i="";do i+=e.shift(),tc(t)&&tc(t[i])&&(Y0(t[i])||G_(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function lZ(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends ld{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(W_(e))return this.interpolateString(e,n);if(cZ(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=B_(n,r);return tc(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),dd=class{},rE=(()=>{class t extends dd{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),W0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new U;onLangChange=new U;onDefaultLangChange=new U},j_=new L("ISOLATE_TRANSLATE_SERVICE"),H_=new L("USE_DEFAULT_LANG"),U_=new L("DEFAULT_LANGUAGE"),$_=new L("USE_EXTEND"),$0=t=>hi(t)?t:ne(t),zi=(()=>{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,u=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=u,c&&(this.store=new W0),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(Ve(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return ne(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return hi(n)?(n.pipe(Ve(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),ne(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),Ve(1));return this.loadingTranslations=n.pipe(le(o=>this.compiler.compileTranslations(o,e)),Hs(1),Ve(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]=V_(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(B_(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(B_(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(G_(e))return e.map(o=>this.runInterpolation(o,n));if(Y0(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||hi(r[c]);if(!a)return r;let s=n.map(c=>$0(r[c]));return Ja(s).pipe(le(c=>{let u={};return c.forEach((f,h)=>{u[n[h]]=f}),u}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(po(o=>$0(this.getParsedResult(o,e,n)))):$0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Yi(qi(()=>this.get(e,n)),this.onTranslationChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}stream(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" required');return Yi(qi(()=>this.get(e,n)),this.onLangChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}instant(e,n){if(!tc(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 hi(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){lZ(this.translations[o],e,W_(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)(be(W0),be(cd),be(dd),be(ld),be(G0),be(H_),be(j_),be($_),be(U_))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pe=(()=>{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);hi(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(zp(e,this.lastKey)&&zp(n,this.lastParams))return this.value;let o;if(tc(n[0])&&n.length)if(W_(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 Y0(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)(Me(zi,16),Me(we,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var Y_=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:nE},e.compiler||{provide:dd,useClass:rE},e.parser||{provide:ld,useClass:oE},e.missingTranslationHandler||{provide:G0,useClass:iE},W0,{provide:j_,useValue:e.isolate},{provide:H_,useValue:e.useDefaultLang},{provide:$_,useValue:e.extend},{provide:U_,useValue:e.defaultLanguage},zi]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:nE},e.compiler||{provide:dd,useClass:rE},e.parser||{provide:ld,useClass:oE},e.missingTranslationHandler||{provide:G0,useClass:iE},{provide:j_,useValue:e.isolate},{provide:H_,useValue:e.useDefaultLang},{provide:$_,useValue:e.extend},{provide:U_,useValue:e.defaultLanguage},zi]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();var q_={mifos_x:{version:"260123",hash:"8d4f663"},allow_switching_backend_instance:!0};var Je=window.env||{},je={production:!0,version:q_.mifos_x.version,hash:q_.mifos_x.hash,fineractPlatformTenantId:Je.fineractPlatformTenantId||"default",fineractPlatformTenantIds:Je.fineractPlatformTenantIds||"default",baseApiUrls:Je.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:Je.fineractApiUrl||(Je.fineractApiUrls?.length>0?Je.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:Je.oauthServerUrl||Je.fineractApiUrl+Je.apiProvider,allowServerSwitch:Je.allowServerSwitch||"true",apiProvider:Je.apiProvider||"/fineract-provider/api",apiVersion:Je.apiVersion||"/v1",apiActuator:Je.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:Je.oauthServerEnabled===!0,serverUrl:Je.oauthServerUrl||"",logoutUrl:Je.oauthServerLogoutUrl||"",appId:Je.oauthAppId||"",authorizeUrl:Je.oauthAuthorizeUrl||"",tokenUrl:Je.oauthTokenUrl||"",redirectUri:Je.oauthRedirectUri||"",scope:Je.oauthScope||""},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:Je.defaultLanguage||"en-US",supportedLanguages:Je.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:Je.preloadClients||!0,defaultCharDelimiter:Je.defaultCharDelimiter||",",displayBackEndInfo:Je.displayBackEndInfo||"true",displayTenantSelector:Je.displayTenantSelector||"true",tenantLogoUrl:Je.tenantLogoUrl||"assets/images/mifos_lg-logo.jpg",documentationBaseUrl:Je.documentationBaseUrl||"https://mifosforge.jira.com/wiki",waitTimeForNotifications:Je.waitTimeForNotifications||60,waitTimeForCOBCatchUp:Je.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:Je.sessionIdleTimeout||3e5}},httpCacheEnabled:Je.httpCacheEnabled||!1,mifosInterbankTransfersApiUrl:Je.mifosInterbankTransfersApiUrl||"https://apis.mifos.community",mifosInterbankTransfersApiProvider:Je.mifosInterbankTransfersApiProvider||"/vnext1",mifosInterbankTransfersApiVersion:Je.mifosInterbankTransfersApiVersion||"/v1.0",mifosInterbankTransfersEnabled:Je.mifosInterbankTransfersEnabled??!0,minPasswordLength:Je.minPasswordLength||12,complianceHideClientData:Je.complianceHideClientData==="true"||Je.complianceHideClientData===!0||!1,OIDC:{oidcServerEnabled:Je.oidcServerEnabled===!0||Je.oidcServerEnabled==="true"||Je.FINERACT_PLUGIN_OIDC_ENABLED==="true",oidcBaseUrl:Je.oidcBaseUrl||Je.FINERACT_PLUGIN_OIDC_BASE_URL||"",oidcClientId:Je.oidcClientId||Je.FINERACT_PLUGIN_OIDC_CLIENT_ID||"",oidcApiUrl:Je.oidcApiUrl||Je.FINERACT_PLUGIN_OIDC_API_URL||"",oidcFrontUrl:Je.oidcFrontUrl||Je.FINERACT_PLUGIN_OIDC_FRONTEND_URL||""}};je.serverUrl=`${je.baseApiUrl}${je.apiProvider}${je.apiVersion}`;var aE=(()=>{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 sE=(()=>{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 cE=(()=>{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 Ia=(()=>{class t{constructor(){this.alertEvent=new U}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var md=uo(yo());var zo=(()=>{class t{constructor(){this.datePipe=d(id)}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 id(this.language.code).transform(e,n)}formatDateAsString(e,n){return(0,md.default)(e).format(n)}parseDate(e){return e instanceof Array?(0,md.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,md.default)(e).toDate()}parseDatetime(e){return(0,md.default)(e).toDate()}convertToDate(e,n){return(0,md.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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=(()=>{class t{constructor(){this.alertService=d(Ia),this.dateUtils=d(zo),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=je.defaultLanguage?je.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"):je.baseApiUrl&&je.baseApiUrl!==""?je.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+je.apiProvider}get serverUrl(){return this.server+je.apiProvider+je.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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Np=uo(yo()),MDe=uo(dE()),wDe=uo(mE()),DDe=uo(fE()),SDe=uo(gE()),kDe=uo(bE()),EDe=uo(yE()),IDe=uo(xE()),ODe=uo(wE()),TDe=uo(SE()),PDe=uo(EE()),LDe=uo(OE());var Jo=(()=>{class t{constructor(){this.settingsService=d(tn),this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u"||e===null)return"";let r=this.settingsService.language.code,a;r?r.includes("-")?a=r.split("-")[0]:a=r:a="en",Np.default.locale(a);let s;return Array.isArray(e)?s=(0,Np.default)(e.join("-"),"YYYY-MM-DD"):s=(0,Np.default)(e),s.isValid()?n?s.format(n):s.format(o):""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!1})}}return t})();var q0=uo(yo());var Oa=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,u,f,h]=e;u!=null?o=(0,q0.default)({year:a,month:(s??1)-1,date:c,hour:u,minute:f??0,second:h??0}):o=(0,q0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=q0.default.unix(e):o=(0,q0.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 TE=(()=>{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 PE=new WeakMap,LE=(()=>{class t{constructor(){this.sanitizer=d(hs)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=PE.get(n);a||(a=new Map,PE.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),u=c?c[r]??"":"";return typeof u=="string"?this.sanitizer.sanitize(Wn.HTML,u)||"":String(u||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var nc=(()=>{class t{constructor(){this.decimalFormat=d(R0),this.settingsService=d(tn)}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 zE=uo(RE());var Bp=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return zE.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 NE=(()=>{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 vl=(()=>{class t{constructor(){this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var jp=(()=>{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 VE=(()=>{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 Hp=(()=>{class t{constructor(){this.translateService=d(zi)}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:!1})}}return t})();var BE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({providers:[NE,aE,sE,cE,LE,VE,Jo,Oa,TE,nc,Hp,Bp,vl,jp],imports:[fe]})}}return t})();var Up=class{validateSignature(i){return Promise.resolve(null)}validateAtHash(i){return Promise.resolve(!0)}},$p=class{};var Q0=class{},mZ=(()=>{class t extends Q0{now(){return Date.now()}new(){return new Date}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Gp=class{},Wp=class{},pZ=(()=>{class t{constructor(){this.data=new Map}getItem(e){return this.data.get(e)}removeItem(e){this.data.delete(e)}setItem(e,n){this.data.set(e,n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var K0=class{constructor(i){this.type=i}},Co=class extends K0{constructor(i,e=null){super(i),this.info=e}},Xr=class extends K0{constructor(i,e=null){super(i),this.info=e}},Vn=class extends K0{constructor(i,e,n=null){super(i),this.reason=e,this.params=n}};function jE(t){let i=t.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(i).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function HE(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var pd=class{constructor(i){this.clientId="",this.redirectUri="",this.postLogoutRedirectUri="",this.redirectUriAsPostLogoutRedirectUriFallback=!0,this.loginUrl="",this.scope="openid profile",this.resource="",this.rngUrl="",this.oidc=!0,this.requestAccessToken=!0,this.options=null,this.issuer="",this.logoutUrl="",this.clearHashAfterLogin=!0,this.tokenEndpoint=null,this.revocationEndpoint=null,this.customTokenParameters=[],this.userinfoEndpoint=null,this.responseType="",this.showDebugInformation=!1,this.silentRefreshRedirectUri="",this.silentRefreshMessagePrefix="",this.silentRefreshShowIFrame=!1,this.siletRefreshTimeout=1e3*20,this.silentRefreshTimeout=1e3*20,this.dummyClientSecret="",this.requireHttps="remoteOnly",this.strictDiscoveryDocumentValidation=!0,this.jwks=null,this.customQueryParams=null,this.silentRefreshIFrameName="angular-oauth-oidc-silent-refresh-iframe",this.timeoutFactor=.75,this.sessionChecksEnabled=!1,this.sessionCheckIntervall=3*1e3,this.sessionCheckIFrameUrl=null,this.sessionCheckIFrameName="angular-oauth-oidc-check-session-iframe",this.disableAtHashCheck=!1,this.skipSubjectCheck=!1,this.useIdTokenHintForSilentRefresh=!1,this.skipIssuerCheck=!1,this.nonceStateSeparator=";",this.useHttpBasicAuth=!1,this.decreaseExpirationBySec=0,this.waitForTokenInMsec=0,this.disablePKCE=!1,this.preserveRequestedRoute=!1,this.disableIdTokenTimer=!1,this.checkOrigin=!1,this.openUri=e=>{location.href=e},i&&Object.assign(this,i)}},yl=class{encodeKey(i){return encodeURIComponent(i)}encodeValue(i){return encodeURIComponent(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}},Yp=class{};var UE=(()=>{class t{getHashFragmentParams(e){let n=e||window.location.hash;if(n=decodeURIComponent(n),n.indexOf("#")!==0)return{};let o=n.indexOf("?");return o>-1?n=n.substr(o+1):n=n.substr(1),this.parseQueryString(n)}parseQueryString(e){let n={},o,r,a,s,c,u;if(e===null)return n;let f=e.split("&");for(let h=0;h=64;){for(r=i[0],a=i[1],s=i[2],c=i[3],u=i[4],f=i[5],h=i[6],y=i[7],D=0;D<16;D++)Y=n+D*4,t[D]=(e[Y]&255)<<24|(e[Y+1]&255)<<16|(e[Y+2]&255)<<8|e[Y+3]&255;for(D=16;D<64;D++)x=t[D-2],Q=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,x=t[D-15],X=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,t[D]=(Q+t[D-7]|0)+(X+t[D-16]|0);for(D=0;D<64;D++)Q=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(y+(hZ[D]+t[D]|0)|0)|0,X=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&s^a&s)|0,y=h,h=f,f=u,u=c+Q|0,c=s,s=a,a=r,r=Q+X|0;i[0]+=r,i[1]+=a,i[2]+=s,i[3]+=c,i[4]+=u,i[5]+=f,i[6]+=h,i[7]+=y,n+=64,o-=64}return n}var cb=class{constructor(){this.digestLength=$E,this.blockSize=fZ,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let i=0;i0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=i[n++],e--;this.bufferLength===64&&(sb(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=sb(this.temp,this.state,i,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=i[n++],e--;return this}finish(i){if(!this.finished){let e=this.bytesHashed,n=this.bufferLength,o=e/536870912|0,r=e<<3,a=e%64<56?64:128;this.buffer[n]=128;for(let s=n+1;s>>24&255,this.buffer[a-7]=o>>>16&255,this.buffer[a-6]=o>>>8&255,this.buffer[a-5]=o>>>0&255,this.buffer[a-4]=r>>>24&255,this.buffer[a-3]=r>>>16&255,this.buffer[a-2]=r>>>8&255,this.buffer[a-1]=r>>>0&255,sb(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(let e=0;e<8;e++)i[e*4+0]=this.state[e]>>>24&255,i[e*4+1]=this.state[e]>>>16&255,i[e*4+2]=this.state[e]>>>8&255,i[e*4+3]=this.state[e]>>>0&255;return this}digest(){let i=new Uint8Array(this.digestLength);return this.finish(i),i}_saveState(i){for(let e=0;e{class t{calcHash(e,n){return Yt(this,null,function*(){return bZ(gZ(_Z(e)))})}toHashString2(e){let n="";for(let o of e)n+=String.fromCharCode(o);return n}toHashString(e){let n=new Uint8Array(e),o="";for(let r of n)o+=String.fromCharCode(r);return o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Kp=(()=>{class t extends pd{constructor(e,n,o,r,a,s,c,u,f,h){super(),this.ngZone=e,this.http=n,this.config=a,this.urlHelper=s,this.logger=c,this.crypto=u,this.dateTimeService=h,this.discoveryDocumentLoaded=!1,this.state="",this.eventsSubject=new B,this.discoveryDocumentLoadedSubject=new B,this.grantTypesSupported=[],this.inImplicitFlow=!1,this.saveNoncesInLocalStorage=!1,this.debug("angular-oauth2-oidc v10"),this.document=f,a||(a={}),this.discoveryDocumentLoaded$=this.discoveryDocumentLoadedSubject.asObservable(),this.events=this.eventsSubject.asObservable(),r&&(this.tokenValidationHandler=r),a&&this.configure(a);try{o?this.setStorage(o):typeof sessionStorage<"u"&&this.setStorage(sessionStorage)}catch(y){console.error("No OAuthStorage provided and cannot access default (sessionStorage).Consider providing a custom OAuthStorage implementation in your module.",y)}if(this.checkLocalStorageAccessable()){let y=window?.navigator?.userAgent;(y?.includes("MSIE ")||y?.includes("Trident"))&&(this.saveNoncesInLocalStorage=!0)}this.setupRefreshTimer()}checkLocalStorageAccessable(){if(typeof window>"u")return!1;let e="test";try{return typeof window.localStorage>"u"?!1:(localStorage.setItem(e,e),localStorage.removeItem(e),!0)}catch{return!1}}configure(e){Object.assign(this,new pd,e),this.config=Object.assign({},new pd,e),this.sessionChecksEnabled&&this.setupSessionCheck(),this.configChanged()}configChanged(){this.setupRefreshTimer()}restartSessionChecksIfStillLoggedIn(){this.hasValidIdToken()&&this.initSessionCheck()}restartRefreshTimerIfStillLoggedIn(){this.setupExpirationTimers()}setupSessionCheck(){this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.initSessionCheck()})}setupAutomaticSilentRefresh(e={},n,o=!0){let r=!0;this.clearAutomaticRefreshTimer(),this.automaticRefreshSubscription=this.events.pipe(It(a=>{a.type==="token_received"?r=!0:a.type==="logout"&&(r=!1)}),Oe(a=>a.type==="token_expires"&&(n==null||n==="any"||a.info===n)),$o(1e3)).subscribe(()=>{r&&this.refreshInternal(e,o).catch(()=>{this.debug("Automatic silent refresh did not work")})}),this.restartRefreshTimerIfStillLoggedIn()}refreshInternal(e,n){return!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken():this.silentRefresh(e,n)}loadDiscoveryDocumentAndTryLogin(e=null){return this.loadDiscoveryDocument().then(()=>this.tryLogin(e))}loadDiscoveryDocumentAndLogin(e=null){return e=e||{},this.loadDiscoveryDocumentAndTryLogin(e).then(()=>{if(!this.hasValidIdToken()||!this.hasValidAccessToken()){let n=typeof e.state=="string"?e.state:"";return this.initLoginFlow(n),!1}else return!0})}debug(...e){this.showDebugInformation&&this.logger.debug(...e)}validateUrlFromDiscoveryDocument(e){let n=[],o=this.validateUrlForHttps(e),r=this.validateUrlAgainstIssuer(e);return o||n.push("https for all urls required. Also for urls received by discovery."),r||n.push("Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."),n}validateUrlForHttps(e){if(!e)return!0;let n=e.toLowerCase();return this.requireHttps===!1||(n.match(/^http:\/\/localhost($|[:/])/)||n.match(/^http:\/\/localhost($|[:/])/))&&this.requireHttps==="remoteOnly"?!0:n.startsWith("https://")}assertUrlNotNullAndCorrectProtocol(e,n){if(!e)throw new Error(`'${n}' should not be null`);if(!this.validateUrlForHttps(e))throw new Error(`'${n}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`)}validateUrlAgainstIssuer(e){return!this.strictDiscoveryDocumentValidation||!e?!0:e.toLowerCase().startsWith(this.issuer.toLowerCase())}setupRefreshTimer(){if(typeof window>"u"){this.debug("timer not supported on this plattform");return}(this.hasValidIdToken()||this.hasValidAccessToken())&&(this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()),this.tokenReceivedSubscription&&this.tokenReceivedSubscription.unsubscribe(),this.tokenReceivedSubscription=this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()})}setupExpirationTimers(){this.hasValidAccessToken()&&this.setupAccessTokenTimer(),!this.disableIdTokenTimer&&this.hasValidIdToken()&&this.setupIdTokenTimer()}setupAccessTokenTimer(){let e=this.getAccessTokenExpiration(),n=this.getAccessTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.accessTokenTimeoutSubscription=ne(new Xr("token_expires","access_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}setupIdTokenTimer(){let e=this.getIdTokenExpiration(),n=this.getIdTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.idTokenTimeoutSubscription=ne(new Xr("token_expires","id_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}stopAutomaticRefresh(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.clearAutomaticRefreshTimer()}clearAccessTokenTimer(){this.accessTokenTimeoutSubscription&&this.accessTokenTimeoutSubscription.unsubscribe()}clearIdTokenTimer(){this.idTokenTimeoutSubscription&&this.idTokenTimeoutSubscription.unsubscribe()}clearAutomaticRefreshTimer(){this.automaticRefreshSubscription&&this.automaticRefreshSubscription.unsubscribe()}calcTimeout(e,n){let o=this.dateTimeService.now(),r=(n-e)*this.timeoutFactor-(o-e),a=Math.max(0,r),s=2147483647;return a>s?s:a}setStorage(e){this._storage=e,this.configChanged()}loadDiscoveryDocument(e=null){return new Promise((n,o)=>{if(e||(e=this.issuer||"",e.endsWith("/")||(e+="/"),e+=".well-known/openid-configuration"),!this.validateUrlForHttps(e)){o("issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return}this.http.get(e).subscribe(r=>{if(!this.validateDiscoveryDocument(r)){this.eventsSubject.next(new Vn("discovery_document_validation_error",null)),o("discovery_document_validation_error");return}this.loginUrl=r.authorization_endpoint,this.logoutUrl=r.end_session_endpoint||this.logoutUrl,this.grantTypesSupported=r.grant_types_supported,this.issuer=r.issuer,this.tokenEndpoint=r.token_endpoint,this.userinfoEndpoint=r.userinfo_endpoint||this.userinfoEndpoint,this.jwksUri=r.jwks_uri,this.sessionCheckIFrameUrl=r.check_session_iframe||this.sessionCheckIFrameUrl,this.discoveryDocumentLoaded=!0,this.discoveryDocumentLoadedSubject.next(r),this.revocationEndpoint=r.revocation_endpoint||this.revocationEndpoint,this.sessionChecksEnabled&&this.restartSessionChecksIfStillLoggedIn(),this.loadJwks().then(a=>{let s={discoveryDocument:r,jwks:a},c=new Co("discovery_document_loaded",s);this.eventsSubject.next(c),n(c)}).catch(a=>{this.eventsSubject.next(new Vn("discovery_document_load_error",a)),o(a)})},r=>{this.logger.error("error loading discovery document",r),this.eventsSubject.next(new Vn("discovery_document_load_error",r)),o(r)})})}loadJwks(){return new Promise((e,n)=>{this.jwksUri?this.http.get(this.jwksUri).subscribe(o=>{this.jwks=o,e(o)},o=>{this.logger.error("error loading jwks",o),this.eventsSubject.next(new Vn("jwks_load_error",o)),n(o)}):e(null)})}validateDiscoveryDocument(e){let n;return!this.skipIssuerCheck&&e.issuer!==this.issuer?(this.logger.error("invalid issuer in discovery document","expected: "+this.issuer,"current: "+e.issuer),!1):(n=this.validateUrlFromDiscoveryDocument(e.authorization_endpoint),n.length>0?(this.logger.error("error validating authorization_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.end_session_endpoint),n.length>0?(this.logger.error("error validating end_session_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.token_endpoint),n.length>0&&this.logger.error("error validating token_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.revocation_endpoint),n.length>0&&this.logger.error("error validating revocation_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.userinfo_endpoint),n.length>0?(this.logger.error("error validating userinfo_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.jwks_uri),n.length>0?(this.logger.error("error validating jwks_uri in discovery document",n),!1):(this.sessionChecksEnabled&&!e.check_session_iframe&&this.logger.warn("sessionChecksEnabled is activated but discovery document does not contain a check_session_iframe field"),!0)))))}fetchTokenUsingPasswordFlowAndLoadUserProfile(e,n,o=new ki){return this.fetchTokenUsingPasswordFlow(e,n,o).then(()=>this.loadUserProfile())}loadUserProfile(){if(!this.hasValidAccessToken())throw new Error("Can not load User Profile without access_token");if(!this.validateUrlForHttps(this.userinfoEndpoint))throw new Error("userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return new Promise((e,n)=>{let o=new ki().set("Authorization","Bearer "+this.getAccessToken());this.http.get(this.userinfoEndpoint,{headers:o,observe:"response",responseType:"text"}).subscribe(r=>{if(this.debug("userinfo received",JSON.stringify(r)),r.headers.get("content-type").startsWith("application/json")){let a=JSON.parse(r.body),s=this.getIdentityClaims()||{};if(!this.skipSubjectCheck&&this.oidc&&(!s.sub||a.sub!==s.sub)){n(`if property oidc is true, the received user-id (sub) has to be the user-id of the user that has logged in with oidc. +`).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 Op=class{encodeKey(i){return Bk(i)}encodeValue(i){return Bk(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function zX(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 NX=/%(\d[a-f0-9])/gi,FX={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Bk(t){return encodeURIComponent(t).replace(NX,(i,e)=>FX[e]??i)}function Ip(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Op,i.fromString){if(i.fromObject)throw new he(2805,!1);this.map=zX(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(Ip):[Ip(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(Ip(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(Ip(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 Tp=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 VX(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function jk(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Hk(t){return typeof Blob<"u"&&t instanceof Blob}function Uk(t){return typeof FormData<"u"&&t instanceof FormData}function BX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var $k="Content-Type",Gk="Accept",Yk="X-Request-URL",qk="text/plain",Qk="application/json",jX=`${Qk}, ${qk}, */*`,od=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(VX(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 he(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 ki,this.context??=new Tp,!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(nn,i.setHeaders[nn]),pe)),i.setParams&&(mt=Object.keys(i.setParams).reduce((Ht,nn)=>Ht.set(nn,i.setParams[nn]),mt)),new t(e,n,Y,{params:mt,headers:pe,context:Et,reportProgress:X,responseType:o,withCredentials:Q,transferCache:x,keepalive:r,cache:s,priority:a,timeout:D,mode:c,redirect:u,credentials:f,referrer:h,integrity:y})}},bl=(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})(bl||{}),sd=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new ki,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}},Pp=class t extends sd{constructor(i={}){super(i)}type=bl.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})}},H0=class t extends sd{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=bl.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})}},rd=class extends sd{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}},HX=200,UX=204;function A_(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 Ln=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof od)r=e;else{let c;o.headers instanceof ki?c=o.headers:c=new ki(o.headers);let u;o.params&&(o.params instanceof te?u=o.params:u=new te({fromObject:o.params})),r=new od(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,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=ne(r).pipe(po(c=>this.handler.handle(c)));if(e instanceof od||o.observe==="events")return a;let s=a.pipe(Oe(c=>c instanceof H0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new he(2806,!1);return c.body}));case"blob":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new he(2807,!1);return c.body}));case"text":return s.pipe(le(c=>{if(c.body!==null&&typeof c.body!="string")throw new he(2808,!1);return c.body}));case"json":default:return s.pipe(le(c=>c.body))}case"response":return s;default:throw new he(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,A_(o,n))}post(e,n,o={}){return this.request("POST",e,A_(o,n))}put(e,n,o={}){return this.request("PUT",e,A_(o,n))}static \u0275fac=function(n){return new(n||t)(be(ad))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var $X=new L("");function Kk(t,i){return i(t)}function GX(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function WX(t,i,e){return(n,o)=>Si(e,()=>i(n,r=>t(r,o)))}var Ap=new L(""),z_=new L(""),Xk=new L(""),N_=new L("",{providedIn:"root",factory:()=>!0});function YX(){let t=null;return(i,e)=>{t===null&&(t=(d(Ap,{optional:!0})??[]).reduceRight(GX,Kk));let n=d(z1);if(d(N_)){let r=n.add();return t(i,e).pipe(Nr(r))}else return t(i,e)}}var Lp=(()=>{class t extends ad{backend;injector;chain=null;pendingTasks=d(z1);contributeToStability=d(N_);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(z_),...this.injector.get(Xk,[])]));this.chain=n.reduceRight((o,r)=>WX(o,r,this.injector),Kk)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Nr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(be(j0),be(Jt))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var qX=/^\)\]\}',?\n/,QX=RegExp(`^${Yk}:`,"m");function KX(t){return"responseURL"in t&&t.responseURL?t.responseURL:QX.test(t.getAllResponseHeaders())?t.getResponseHeader(Yk):null}var R_=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new he(-2800,!1);let n=this.xhrFactory;return ne(null).pipe(at(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Q,X)=>a.setRequestHeader(Q,X.join(","))),e.headers.has(Gk)||a.setRequestHeader(Gk,jX),!e.headers.has($k)){let Q=e.detectContentTypeHeader();Q!==null&&a.setRequestHeader($k,Q)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Q=e.responseType.toLowerCase();a.responseType=Q!=="json"?Q:"text"}let s=e.serializeBody(),c=null,u=()=>{if(c!==null)return c;let Q=a.statusText||"OK",X=new ki(a.getAllResponseHeaders()),pe=KX(a)||e.url;return c=new Pp({headers:X,status:a.status,statusText:Q,url:pe}),c},f=()=>{let{headers:Q,status:X,statusText:pe,url:mt}=u(),Et=null;X!==UX&&(Et=typeof a.response>"u"?a.responseText:a.response),X===0&&(X=Et?HX:0);let Ht=X>=200&&X<300;if(e.responseType==="json"&&typeof Et=="string"){let nn=Et;Et=Et.replace(qX,"");try{Et=Et!==""?JSON.parse(Et):null}catch(ar){Et=nn,Ht&&(Ht=!1,Et={error:ar,text:Et})}}Ht?(r.next(new H0({body:Et,headers:Q,status:X,statusText:pe,url:mt||void 0})),r.complete()):r.error(new rd({error:Et,headers:Q,status:X,statusText:pe,url:mt||void 0}))},h=Q=>{let{url:X}=u(),pe=new rd({error:Q,status:a.status||0,statusText:a.statusText||"Unknown Error",url:X||void 0});r.error(pe)},y=h;e.timeout&&(y=Q=>{let{url:X}=u(),pe=new rd({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:X||void 0});r.error(pe)});let x=!1,D=Q=>{x||(r.next(u()),x=!0);let X={type:bl.DownloadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),e.responseType==="text"&&a.responseText&&(X.partialText=a.responseText),r.next(X)},Y=Q=>{let X={type:bl.UploadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),r.next(X)};return a.addEventListener("load",f),a.addEventListener("error",h),a.addEventListener("timeout",y),a.addEventListener("abort",h),e.reportProgress&&(a.addEventListener("progress",D),s!==null&&a.upload&&a.upload.addEventListener("progress",Y)),a.send(s),r.next({type:bl.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",f),a.removeEventListener("timeout",y),e.reportProgress&&(a.removeEventListener("progress",D),s!==null&&a.upload&&a.upload.removeEventListener("progress",Y)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(be(_l))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Zk=new L(""),XX="XSRF-TOKEN",ZX=new L("",{providedIn:"root",factory:()=>XX}),JX="X-XSRF-TOKEN",eZ=new L("",{providedIn:"root",factory:()=>JX}),U0=class{},tZ=(()=>{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=z0(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(be(De),be(ZX))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),nZ=/^(?:https?:)?\/\//i;function iZ(t,i){if(!d(Zk)||t.method==="GET"||t.method==="HEAD"||nZ.test(t.url))return i(t);let e=d(U0).getToken(),n=d(eZ);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var F_=(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})(F_||{});function oZ(t,i){return{\u0275kind:t,\u0275providers:i}}function rZ(...t){let i=[Ln,R_,Lp,{provide:ad,useExisting:Lp},{provide:j0,useFactory:()=>d($X,{optional:!0})??d(R_)},{provide:z_,useValue:iZ,multi:!0},{provide:Zk,useValue:!0},{provide:U0,useClass:tZ}];for(let e of t)i.push(...e.\u0275providers);return ha(i)}var Wk=new L("");function aZ(){return oZ(F_.LegacyInterceptors,[{provide:Wk,useFactory:YX},{provide:z_,useExisting:Wk,multi:!0}])}var eE=(()=>{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)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=be(sZ),o},providedIn:"root"})}return t})(),sZ=(()=>{class t extends hs{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Wn.NONE:return n;case Wn.HTML:return Da(n,"HTML")?Yo(n):A4(this._doc,String(n)).toString();case Wn.STYLE:return Da(n,"Style")?Yo(n):n;case Wn.SCRIPT:if(Da(n,"Script"))return Yo(n);throw new he(5200,!1);case Wn.URL:return Da(n,"URL")?Yo(n):f0(String(n));case Wn.RESOURCE_URL:if(Da(n,"ResourceURL"))return Yo(n);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return a7(e)}bypassSecurityTrustStyle(e){return s7(e)}bypassSecurityTrustScript(e){return c7(e)}bypassSecurityTrustUrl(e){return l7(e)}bypassSecurityTrustResourceUrl(e){return d7(e)}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cd=class{},nE=(()=>{class t extends cd{getTranslation(e){return ne({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),G0=class{},iE=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function zp(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{Y0(i[n])?n in t?e[n]=V_(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):V_({},i)}function B_(t,i){let e=i.split(".");i="";do i+=e.shift(),tc(t)&&tc(t[i])&&(Y0(t[i])||G_(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function lZ(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends ld{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(W_(e))return this.interpolateString(e,n);if(cZ(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=B_(n,r);return tc(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),dd=class{},rE=(()=>{class t extends dd{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),W0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new U;onLangChange=new U;onDefaultLangChange=new U},j_=new L("ISOLATE_TRANSLATE_SERVICE"),H_=new L("USE_DEFAULT_LANG"),U_=new L("DEFAULT_LANGUAGE"),$_=new L("USE_EXTEND"),$0=t=>hi(t)?t:ne(t),zi=(()=>{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,u=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=u,c&&(this.store=new W0),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(Ve(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return ne(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return hi(n)?(n.pipe(Ve(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),ne(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),Ve(1));return this.loadingTranslations=n.pipe(le(o=>this.compiler.compileTranslations(o,e)),Hs(1),Ve(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]=V_(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(B_(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(B_(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(G_(e))return e.map(o=>this.runInterpolation(o,n));if(Y0(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||hi(r[c]);if(!a)return r;let s=n.map(c=>$0(r[c]));return Ja(s).pipe(le(c=>{let u={};return c.forEach((f,h)=>{u[n[h]]=f}),u}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(po(o=>$0(this.getParsedResult(o,e,n)))):$0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Yi(qi(()=>this.get(e,n)),this.onTranslationChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}stream(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" required');return Yi(qi(()=>this.get(e,n)),this.onLangChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}instant(e,n){if(!tc(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 hi(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){lZ(this.translations[o],e,W_(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)(be(W0),be(cd),be(dd),be(ld),be(G0),be(H_),be(j_),be($_),be(U_))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pe=(()=>{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);hi(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(zp(e,this.lastKey)&&zp(n,this.lastParams))return this.value;let o;if(tc(n[0])&&n.length)if(W_(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 Y0(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)(Me(zi,16),Me(we,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var Y_=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:nE},e.compiler||{provide:dd,useClass:rE},e.parser||{provide:ld,useClass:oE},e.missingTranslationHandler||{provide:G0,useClass:iE},W0,{provide:j_,useValue:e.isolate},{provide:H_,useValue:e.useDefaultLang},{provide:$_,useValue:e.extend},{provide:U_,useValue:e.defaultLanguage},zi]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:nE},e.compiler||{provide:dd,useClass:rE},e.parser||{provide:ld,useClass:oE},e.missingTranslationHandler||{provide:G0,useClass:iE},{provide:j_,useValue:e.isolate},{provide:H_,useValue:e.useDefaultLang},{provide:$_,useValue:e.extend},{provide:U_,useValue:e.defaultLanguage},zi]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();var q_={mifos_x:{version:"260124",hash:"47951f2"},allow_switching_backend_instance:!0};var Je=window.env||{},je={production:!0,version:q_.mifos_x.version,hash:q_.mifos_x.hash,fineractPlatformTenantId:Je.fineractPlatformTenantId||"default",fineractPlatformTenantIds:Je.fineractPlatformTenantIds||"default",baseApiUrls:Je.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:Je.fineractApiUrl||(Je.fineractApiUrls?.length>0?Je.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:Je.oauthServerUrl||Je.fineractApiUrl+Je.apiProvider,allowServerSwitch:Je.allowServerSwitch||"true",apiProvider:Je.apiProvider||"/fineract-provider/api",apiVersion:Je.apiVersion||"/v1",apiActuator:Je.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:Je.oauthServerEnabled===!0,serverUrl:Je.oauthServerUrl||"",logoutUrl:Je.oauthServerLogoutUrl||"",appId:Je.oauthAppId||"",authorizeUrl:Je.oauthAuthorizeUrl||"",tokenUrl:Je.oauthTokenUrl||"",redirectUri:Je.oauthRedirectUri||"",scope:Je.oauthScope||""},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:Je.defaultLanguage||"en-US",supportedLanguages:Je.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:Je.preloadClients||!0,defaultCharDelimiter:Je.defaultCharDelimiter||",",displayBackEndInfo:Je.displayBackEndInfo||"true",displayTenantSelector:Je.displayTenantSelector||"true",tenantLogoUrl:Je.tenantLogoUrl||"assets/images/mifos_lg-logo.jpg",documentationBaseUrl:Je.documentationBaseUrl||"https://mifosforge.jira.com/wiki",waitTimeForNotifications:Je.waitTimeForNotifications||60,waitTimeForCOBCatchUp:Je.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:Je.sessionIdleTimeout||3e5}},httpCacheEnabled:Je.httpCacheEnabled||!1,mifosInterbankTransfersApiUrl:Je.mifosInterbankTransfersApiUrl||"https://apis.mifos.community",mifosInterbankTransfersApiProvider:Je.mifosInterbankTransfersApiProvider||"/vnext1",mifosInterbankTransfersApiVersion:Je.mifosInterbankTransfersApiVersion||"/v1.0",mifosInterbankTransfersEnabled:Je.mifosInterbankTransfersEnabled??!0,minPasswordLength:Je.minPasswordLength||12,complianceHideClientData:Je.complianceHideClientData==="true"||Je.complianceHideClientData===!0||!1,OIDC:{oidcServerEnabled:Je.oidcServerEnabled===!0||Je.oidcServerEnabled==="true"||Je.FINERACT_PLUGIN_OIDC_ENABLED==="true",oidcBaseUrl:Je.oidcBaseUrl||Je.FINERACT_PLUGIN_OIDC_BASE_URL||"",oidcClientId:Je.oidcClientId||Je.FINERACT_PLUGIN_OIDC_CLIENT_ID||"",oidcApiUrl:Je.oidcApiUrl||Je.FINERACT_PLUGIN_OIDC_API_URL||"",oidcFrontUrl:Je.oidcFrontUrl||Je.FINERACT_PLUGIN_OIDC_FRONTEND_URL||""}};je.serverUrl=`${je.baseApiUrl}${je.apiProvider}${je.apiVersion}`;var aE=(()=>{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 sE=(()=>{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 cE=(()=>{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 Ia=(()=>{class t{constructor(){this.alertEvent=new U}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var md=uo(yo());var zo=(()=>{class t{constructor(){this.datePipe=d(id)}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 id(this.language.code).transform(e,n)}formatDateAsString(e,n){return(0,md.default)(e).format(n)}parseDate(e){return e instanceof Array?(0,md.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,md.default)(e).toDate()}parseDatetime(e){return(0,md.default)(e).toDate()}convertToDate(e,n){return(0,md.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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=(()=>{class t{constructor(){this.alertService=d(Ia),this.dateUtils=d(zo),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=je.defaultLanguage?je.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"):je.baseApiUrl&&je.baseApiUrl!==""?je.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+je.apiProvider}get serverUrl(){return this.server+je.apiProvider+je.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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Np=uo(yo()),MDe=uo(dE()),wDe=uo(mE()),DDe=uo(fE()),SDe=uo(gE()),kDe=uo(bE()),EDe=uo(yE()),IDe=uo(xE()),ODe=uo(wE()),TDe=uo(SE()),PDe=uo(EE()),LDe=uo(OE());var Jo=(()=>{class t{constructor(){this.settingsService=d(tn),this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u"||e===null)return"";let r=this.settingsService.language.code,a;r?r.includes("-")?a=r.split("-")[0]:a=r:a="en",Np.default.locale(a);let s;return Array.isArray(e)?s=(0,Np.default)(e.join("-"),"YYYY-MM-DD"):s=(0,Np.default)(e),s.isValid()?n?s.format(n):s.format(o):""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!1})}}return t})();var q0=uo(yo());var Oa=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,u,f,h]=e;u!=null?o=(0,q0.default)({year:a,month:(s??1)-1,date:c,hour:u,minute:f??0,second:h??0}):o=(0,q0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=q0.default.unix(e):o=(0,q0.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 TE=(()=>{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 PE=new WeakMap,LE=(()=>{class t{constructor(){this.sanitizer=d(hs)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=PE.get(n);a||(a=new Map,PE.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),u=c?c[r]??"":"";return typeof u=="string"?this.sanitizer.sanitize(Wn.HTML,u)||"":String(u||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var nc=(()=>{class t{constructor(){this.decimalFormat=d(R0),this.settingsService=d(tn)}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 zE=uo(RE());var Bp=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return zE.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 NE=(()=>{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 vl=(()=>{class t{constructor(){this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var jp=(()=>{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 VE=(()=>{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 Hp=(()=>{class t{constructor(){this.translateService=d(zi)}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:!1})}}return t})();var BE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({providers:[NE,aE,sE,cE,LE,VE,Jo,Oa,TE,nc,Hp,Bp,vl,jp],imports:[fe]})}}return t})();var Up=class{validateSignature(i){return Promise.resolve(null)}validateAtHash(i){return Promise.resolve(!0)}},$p=class{};var Q0=class{},mZ=(()=>{class t extends Q0{now(){return Date.now()}new(){return new Date}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Gp=class{},Wp=class{},pZ=(()=>{class t{constructor(){this.data=new Map}getItem(e){return this.data.get(e)}removeItem(e){this.data.delete(e)}setItem(e,n){this.data.set(e,n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var K0=class{constructor(i){this.type=i}},Co=class extends K0{constructor(i,e=null){super(i),this.info=e}},Xr=class extends K0{constructor(i,e=null){super(i),this.info=e}},Vn=class extends K0{constructor(i,e,n=null){super(i),this.reason=e,this.params=n}};function jE(t){let i=t.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(i).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function HE(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var pd=class{constructor(i){this.clientId="",this.redirectUri="",this.postLogoutRedirectUri="",this.redirectUriAsPostLogoutRedirectUriFallback=!0,this.loginUrl="",this.scope="openid profile",this.resource="",this.rngUrl="",this.oidc=!0,this.requestAccessToken=!0,this.options=null,this.issuer="",this.logoutUrl="",this.clearHashAfterLogin=!0,this.tokenEndpoint=null,this.revocationEndpoint=null,this.customTokenParameters=[],this.userinfoEndpoint=null,this.responseType="",this.showDebugInformation=!1,this.silentRefreshRedirectUri="",this.silentRefreshMessagePrefix="",this.silentRefreshShowIFrame=!1,this.siletRefreshTimeout=1e3*20,this.silentRefreshTimeout=1e3*20,this.dummyClientSecret="",this.requireHttps="remoteOnly",this.strictDiscoveryDocumentValidation=!0,this.jwks=null,this.customQueryParams=null,this.silentRefreshIFrameName="angular-oauth-oidc-silent-refresh-iframe",this.timeoutFactor=.75,this.sessionChecksEnabled=!1,this.sessionCheckIntervall=3*1e3,this.sessionCheckIFrameUrl=null,this.sessionCheckIFrameName="angular-oauth-oidc-check-session-iframe",this.disableAtHashCheck=!1,this.skipSubjectCheck=!1,this.useIdTokenHintForSilentRefresh=!1,this.skipIssuerCheck=!1,this.nonceStateSeparator=";",this.useHttpBasicAuth=!1,this.decreaseExpirationBySec=0,this.waitForTokenInMsec=0,this.disablePKCE=!1,this.preserveRequestedRoute=!1,this.disableIdTokenTimer=!1,this.checkOrigin=!1,this.openUri=e=>{location.href=e},i&&Object.assign(this,i)}},yl=class{encodeKey(i){return encodeURIComponent(i)}encodeValue(i){return encodeURIComponent(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}},Yp=class{};var UE=(()=>{class t{getHashFragmentParams(e){let n=e||window.location.hash;if(n=decodeURIComponent(n),n.indexOf("#")!==0)return{};let o=n.indexOf("?");return o>-1?n=n.substr(o+1):n=n.substr(1),this.parseQueryString(n)}parseQueryString(e){let n={},o,r,a,s,c,u;if(e===null)return n;let f=e.split("&");for(let h=0;h=64;){for(r=i[0],a=i[1],s=i[2],c=i[3],u=i[4],f=i[5],h=i[6],y=i[7],D=0;D<16;D++)Y=n+D*4,t[D]=(e[Y]&255)<<24|(e[Y+1]&255)<<16|(e[Y+2]&255)<<8|e[Y+3]&255;for(D=16;D<64;D++)x=t[D-2],Q=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,x=t[D-15],X=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,t[D]=(Q+t[D-7]|0)+(X+t[D-16]|0);for(D=0;D<64;D++)Q=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(y+(hZ[D]+t[D]|0)|0)|0,X=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&s^a&s)|0,y=h,h=f,f=u,u=c+Q|0,c=s,s=a,a=r,r=Q+X|0;i[0]+=r,i[1]+=a,i[2]+=s,i[3]+=c,i[4]+=u,i[5]+=f,i[6]+=h,i[7]+=y,n+=64,o-=64}return n}var cb=class{constructor(){this.digestLength=$E,this.blockSize=fZ,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let i=0;i0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=i[n++],e--;this.bufferLength===64&&(sb(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=sb(this.temp,this.state,i,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=i[n++],e--;return this}finish(i){if(!this.finished){let e=this.bytesHashed,n=this.bufferLength,o=e/536870912|0,r=e<<3,a=e%64<56?64:128;this.buffer[n]=128;for(let s=n+1;s>>24&255,this.buffer[a-7]=o>>>16&255,this.buffer[a-6]=o>>>8&255,this.buffer[a-5]=o>>>0&255,this.buffer[a-4]=r>>>24&255,this.buffer[a-3]=r>>>16&255,this.buffer[a-2]=r>>>8&255,this.buffer[a-1]=r>>>0&255,sb(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(let e=0;e<8;e++)i[e*4+0]=this.state[e]>>>24&255,i[e*4+1]=this.state[e]>>>16&255,i[e*4+2]=this.state[e]>>>8&255,i[e*4+3]=this.state[e]>>>0&255;return this}digest(){let i=new Uint8Array(this.digestLength);return this.finish(i),i}_saveState(i){for(let e=0;e{class t{calcHash(e,n){return Yt(this,null,function*(){return bZ(gZ(_Z(e)))})}toHashString2(e){let n="";for(let o of e)n+=String.fromCharCode(o);return n}toHashString(e){let n=new Uint8Array(e),o="";for(let r of n)o+=String.fromCharCode(r);return o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Kp=(()=>{class t extends pd{constructor(e,n,o,r,a,s,c,u,f,h){super(),this.ngZone=e,this.http=n,this.config=a,this.urlHelper=s,this.logger=c,this.crypto=u,this.dateTimeService=h,this.discoveryDocumentLoaded=!1,this.state="",this.eventsSubject=new B,this.discoveryDocumentLoadedSubject=new B,this.grantTypesSupported=[],this.inImplicitFlow=!1,this.saveNoncesInLocalStorage=!1,this.debug("angular-oauth2-oidc v10"),this.document=f,a||(a={}),this.discoveryDocumentLoaded$=this.discoveryDocumentLoadedSubject.asObservable(),this.events=this.eventsSubject.asObservable(),r&&(this.tokenValidationHandler=r),a&&this.configure(a);try{o?this.setStorage(o):typeof sessionStorage<"u"&&this.setStorage(sessionStorage)}catch(y){console.error("No OAuthStorage provided and cannot access default (sessionStorage).Consider providing a custom OAuthStorage implementation in your module.",y)}if(this.checkLocalStorageAccessable()){let y=window?.navigator?.userAgent;(y?.includes("MSIE ")||y?.includes("Trident"))&&(this.saveNoncesInLocalStorage=!0)}this.setupRefreshTimer()}checkLocalStorageAccessable(){if(typeof window>"u")return!1;let e="test";try{return typeof window.localStorage>"u"?!1:(localStorage.setItem(e,e),localStorage.removeItem(e),!0)}catch{return!1}}configure(e){Object.assign(this,new pd,e),this.config=Object.assign({},new pd,e),this.sessionChecksEnabled&&this.setupSessionCheck(),this.configChanged()}configChanged(){this.setupRefreshTimer()}restartSessionChecksIfStillLoggedIn(){this.hasValidIdToken()&&this.initSessionCheck()}restartRefreshTimerIfStillLoggedIn(){this.setupExpirationTimers()}setupSessionCheck(){this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.initSessionCheck()})}setupAutomaticSilentRefresh(e={},n,o=!0){let r=!0;this.clearAutomaticRefreshTimer(),this.automaticRefreshSubscription=this.events.pipe(It(a=>{a.type==="token_received"?r=!0:a.type==="logout"&&(r=!1)}),Oe(a=>a.type==="token_expires"&&(n==null||n==="any"||a.info===n)),$o(1e3)).subscribe(()=>{r&&this.refreshInternal(e,o).catch(()=>{this.debug("Automatic silent refresh did not work")})}),this.restartRefreshTimerIfStillLoggedIn()}refreshInternal(e,n){return!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken():this.silentRefresh(e,n)}loadDiscoveryDocumentAndTryLogin(e=null){return this.loadDiscoveryDocument().then(()=>this.tryLogin(e))}loadDiscoveryDocumentAndLogin(e=null){return e=e||{},this.loadDiscoveryDocumentAndTryLogin(e).then(()=>{if(!this.hasValidIdToken()||!this.hasValidAccessToken()){let n=typeof e.state=="string"?e.state:"";return this.initLoginFlow(n),!1}else return!0})}debug(...e){this.showDebugInformation&&this.logger.debug(...e)}validateUrlFromDiscoveryDocument(e){let n=[],o=this.validateUrlForHttps(e),r=this.validateUrlAgainstIssuer(e);return o||n.push("https for all urls required. Also for urls received by discovery."),r||n.push("Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."),n}validateUrlForHttps(e){if(!e)return!0;let n=e.toLowerCase();return this.requireHttps===!1||(n.match(/^http:\/\/localhost($|[:/])/)||n.match(/^http:\/\/localhost($|[:/])/))&&this.requireHttps==="remoteOnly"?!0:n.startsWith("https://")}assertUrlNotNullAndCorrectProtocol(e,n){if(!e)throw new Error(`'${n}' should not be null`);if(!this.validateUrlForHttps(e))throw new Error(`'${n}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`)}validateUrlAgainstIssuer(e){return!this.strictDiscoveryDocumentValidation||!e?!0:e.toLowerCase().startsWith(this.issuer.toLowerCase())}setupRefreshTimer(){if(typeof window>"u"){this.debug("timer not supported on this plattform");return}(this.hasValidIdToken()||this.hasValidAccessToken())&&(this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()),this.tokenReceivedSubscription&&this.tokenReceivedSubscription.unsubscribe(),this.tokenReceivedSubscription=this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()})}setupExpirationTimers(){this.hasValidAccessToken()&&this.setupAccessTokenTimer(),!this.disableIdTokenTimer&&this.hasValidIdToken()&&this.setupIdTokenTimer()}setupAccessTokenTimer(){let e=this.getAccessTokenExpiration(),n=this.getAccessTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.accessTokenTimeoutSubscription=ne(new Xr("token_expires","access_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}setupIdTokenTimer(){let e=this.getIdTokenExpiration(),n=this.getIdTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.idTokenTimeoutSubscription=ne(new Xr("token_expires","id_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}stopAutomaticRefresh(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.clearAutomaticRefreshTimer()}clearAccessTokenTimer(){this.accessTokenTimeoutSubscription&&this.accessTokenTimeoutSubscription.unsubscribe()}clearIdTokenTimer(){this.idTokenTimeoutSubscription&&this.idTokenTimeoutSubscription.unsubscribe()}clearAutomaticRefreshTimer(){this.automaticRefreshSubscription&&this.automaticRefreshSubscription.unsubscribe()}calcTimeout(e,n){let o=this.dateTimeService.now(),r=(n-e)*this.timeoutFactor-(o-e),a=Math.max(0,r),s=2147483647;return a>s?s:a}setStorage(e){this._storage=e,this.configChanged()}loadDiscoveryDocument(e=null){return new Promise((n,o)=>{if(e||(e=this.issuer||"",e.endsWith("/")||(e+="/"),e+=".well-known/openid-configuration"),!this.validateUrlForHttps(e)){o("issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return}this.http.get(e).subscribe(r=>{if(!this.validateDiscoveryDocument(r)){this.eventsSubject.next(new Vn("discovery_document_validation_error",null)),o("discovery_document_validation_error");return}this.loginUrl=r.authorization_endpoint,this.logoutUrl=r.end_session_endpoint||this.logoutUrl,this.grantTypesSupported=r.grant_types_supported,this.issuer=r.issuer,this.tokenEndpoint=r.token_endpoint,this.userinfoEndpoint=r.userinfo_endpoint||this.userinfoEndpoint,this.jwksUri=r.jwks_uri,this.sessionCheckIFrameUrl=r.check_session_iframe||this.sessionCheckIFrameUrl,this.discoveryDocumentLoaded=!0,this.discoveryDocumentLoadedSubject.next(r),this.revocationEndpoint=r.revocation_endpoint||this.revocationEndpoint,this.sessionChecksEnabled&&this.restartSessionChecksIfStillLoggedIn(),this.loadJwks().then(a=>{let s={discoveryDocument:r,jwks:a},c=new Co("discovery_document_loaded",s);this.eventsSubject.next(c),n(c)}).catch(a=>{this.eventsSubject.next(new Vn("discovery_document_load_error",a)),o(a)})},r=>{this.logger.error("error loading discovery document",r),this.eventsSubject.next(new Vn("discovery_document_load_error",r)),o(r)})})}loadJwks(){return new Promise((e,n)=>{this.jwksUri?this.http.get(this.jwksUri).subscribe(o=>{this.jwks=o,e(o)},o=>{this.logger.error("error loading jwks",o),this.eventsSubject.next(new Vn("jwks_load_error",o)),n(o)}):e(null)})}validateDiscoveryDocument(e){let n;return!this.skipIssuerCheck&&e.issuer!==this.issuer?(this.logger.error("invalid issuer in discovery document","expected: "+this.issuer,"current: "+e.issuer),!1):(n=this.validateUrlFromDiscoveryDocument(e.authorization_endpoint),n.length>0?(this.logger.error("error validating authorization_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.end_session_endpoint),n.length>0?(this.logger.error("error validating end_session_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.token_endpoint),n.length>0&&this.logger.error("error validating token_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.revocation_endpoint),n.length>0&&this.logger.error("error validating revocation_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.userinfo_endpoint),n.length>0?(this.logger.error("error validating userinfo_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.jwks_uri),n.length>0?(this.logger.error("error validating jwks_uri in discovery document",n),!1):(this.sessionChecksEnabled&&!e.check_session_iframe&&this.logger.warn("sessionChecksEnabled is activated but discovery document does not contain a check_session_iframe field"),!0)))))}fetchTokenUsingPasswordFlowAndLoadUserProfile(e,n,o=new ki){return this.fetchTokenUsingPasswordFlow(e,n,o).then(()=>this.loadUserProfile())}loadUserProfile(){if(!this.hasValidAccessToken())throw new Error("Can not load User Profile without access_token");if(!this.validateUrlForHttps(this.userinfoEndpoint))throw new Error("userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return new Promise((e,n)=>{let o=new ki().set("Authorization","Bearer "+this.getAccessToken());this.http.get(this.userinfoEndpoint,{headers:o,observe:"response",responseType:"text"}).subscribe(r=>{if(this.debug("userinfo received",JSON.stringify(r)),r.headers.get("content-type").startsWith("application/json")){let a=JSON.parse(r.body),s=this.getIdentityClaims()||{};if(!this.skipSubjectCheck&&this.oidc&&(!s.sub||a.sub!==s.sub)){n(`if property oidc is true, the received user-id (sub) has to be the user-id of the user that has logged in with oidc. if you are not using oidc but just oauth2 password flow set oidc to false`);return}a=Object.assign({},s,a),this._storage.setItem("id_token_claims_obj",JSON.stringify(a)),this.eventsSubject.next(new Co("user_profile_loaded")),e({info:a})}else this.debug("userinfo is not JSON, treating it as JWE/JWS"),this.eventsSubject.next(new Co("user_profile_loaded")),e(JSON.parse(r.body))},r=>{this.logger.error("error loading user info",r),this.eventsSubject.next(new Vn("user_profile_load_error",r)),n(r)})})}fetchTokenUsingPasswordFlow(e,n,o=new ki){let r={username:e,password:n};return this.fetchTokenUsingGrant("password",r,o)}fetchTokenUsingGrant(e,n,o=new ki){this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let r=new te({encoder:new yl}).set("grant_type",e).set("scope",this.scope);if(this.useHttpBasicAuth){let a=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+a)}if(this.useHttpBasicAuth||(r=r.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(r=r.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let a of Object.getOwnPropertyNames(this.customQueryParams))r=r.set(a,this.customQueryParams[a]);for(let a of Object.keys(n))r=r.set(a,n[a]);return o=o.set("Content-Type","application/x-www-form-urlencoded"),new Promise((a,s)=>{this.http.post(this.tokenEndpoint,r,{headers:o}).subscribe(c=>{this.debug("tokenResponse",c),this.storeAccessTokenResponse(c.access_token,c.refresh_token,c.expires_in||this.fallbackAccessTokenExpirationTimeInSec,c.scope,this.extractRecognizedCustomParameters(c)),this.oidc&&c.id_token&&this.processIdToken(c.id_token,c.access_token).then(u=>{this.storeIdToken(u),a(c)}),this.eventsSubject.next(new Co("token_received")),a(c)},c=>{this.logger.error("Error performing ${grantType} flow",c),this.eventsSubject.next(new Vn("token_error",c)),s(c)})})}refreshToken(){return this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint"),new Promise((e,n)=>{let o=new te({encoder:new yl}).set("grant_type","refresh_token").set("scope",this.scope).set("refresh_token",this._storage.getItem("refresh_token")),r=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let a=btoa(`${this.clientId}:${this.dummyClientSecret}`);r=r.set("Authorization","Basic "+a)}if(this.useHttpBasicAuth||(o=o.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(o=o.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let a of Object.getOwnPropertyNames(this.customQueryParams))o=o.set(a,this.customQueryParams[a]);this.http.post(this.tokenEndpoint,o,{headers:r}).pipe(at(a=>this.oidc&&a.id_token?Zt(this.processIdToken(a.id_token,a.access_token,!0)).pipe(It(s=>this.storeIdToken(s)),le(()=>a)):ne(a))).subscribe(a=>{this.debug("refresh tokenResponse",a),this.storeAccessTokenResponse(a.access_token,a.refresh_token,a.expires_in||this.fallbackAccessTokenExpirationTimeInSec,a.scope,this.extractRecognizedCustomParameters(a)),this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),e(a)},a=>{this.logger.error("Error refreshing token",a),this.eventsSubject.next(new Vn("token_refresh_error",a)),n(a)})})}removeSilentRefreshEventListener(){this.silentRefreshPostMessageEventListener&&(window.removeEventListener("message",this.silentRefreshPostMessageEventListener),this.silentRefreshPostMessageEventListener=null)}setupSilentRefreshEventListener(){this.removeSilentRefreshEventListener(),this.silentRefreshPostMessageEventListener=e=>{let n=this.processMessageEventMessage(e);this.checkOrigin&&e.origin!==location.origin&&console.error("wrong origin requested silent refresh!"),this.tryLogin({customHashFragment:n,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri||this.redirectUri}).catch(o=>this.debug("tryLogin during silent refresh failed",o))},window.addEventListener("message",this.silentRefreshPostMessageEventListener)}silentRefresh(e={},n=!0){let o=this.getIdentityClaims()||{};if(this.useIdTokenHintForSilentRefresh&&this.hasValidIdToken()&&(e.id_token_hint=this.getIdToken()),!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(typeof this.document>"u")throw new Error("silent refresh is not supported on this platform");let r=this.document.getElementById(this.silentRefreshIFrameName);r&&this.document.body.removeChild(r),this.silentRefreshSubject=o.sub;let a=this.document.createElement("iframe");a.id=this.silentRefreshIFrameName,this.setupSilentRefreshEventListener();let s=this.silentRefreshRedirectUri||this.redirectUri;this.createLoginUrl(null,null,s,n,e).then(h=>{a.setAttribute("src",h),this.silentRefreshShowIFrame||(a.style.display="none"),this.document.body.appendChild(a)});let c=this.events.pipe(Oe(h=>h instanceof Vn),Ao()),u=this.events.pipe(Oe(h=>h.type==="token_received"),Ao()),f=ne(new Vn("silent_refresh_timeout",null)).pipe(ts(this.silentRefreshTimeout));return Jg([c,u,f]).pipe(le(h=>{if(h instanceof Vn)throw h.type==="silent_refresh_timeout"?this.eventsSubject.next(h):(h=new Vn("silent_refresh_error",h),this.eventsSubject.next(h)),h;return h.type==="token_received"&&(h=new Co("silently_refreshed"),this.eventsSubject.next(h)),h})).toPromise()}initImplicitFlowInPopup(e){return this.initLoginFlowInPopup(e)}initLoginFlowInPopup(e){return e=e||{},this.createLoginUrl(null,null,this.silentRefreshRedirectUri,!1,{display:"popup"}).then(n=>new Promise((o,r)=>{let s=null;e.windowRef?e.windowRef&&!e.windowRef.closed&&(s=e.windowRef,s.location.href=n):s=window.open(n,"ngx-oauth2-oidc-login",this.calculatePopupFeatures(e));let c,u=D=>{this.tryLogin({customHashFragment:D,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri}).then(()=>{h(),o(!0)},Y=>{h(),r(Y)})},f=()=>{(!s||s.closed)&&(h(),r(new Vn("popup_closed",{})))};s?c=window.setInterval(f,500):r(new Vn("popup_blocked",{}));let h=()=>{window.clearInterval(c),window.removeEventListener("storage",x),window.removeEventListener("message",y),s!==null&&s.close(),s=null},y=D=>{let Y=this.processMessageEventMessage(D);Y&&Y!==null?(window.removeEventListener("storage",x),u(Y)):console.log("false event firing")},x=D=>{D.key==="auth_hash"&&(window.removeEventListener("message",y),u(D.newValue))};window.addEventListener("message",y),window.addEventListener("storage",x)}))}calculatePopupFeatures(e){let n=e.height||470,o=e.width||500,r=window.screenLeft+(window.outerWidth-o)/2,a=window.screenTop+(window.outerHeight-n)/2;return`location=no,toolbar=no,width=${o},height=${n},top=${a},left=${r}`}processMessageEventMessage(e){let n="#";if(this.silentRefreshMessagePrefix&&(n+=this.silentRefreshMessagePrefix),!e||!e.data||typeof e.data!="string")return;let o=e.data;if(o.startsWith(n))return"#"+o.substr(n.length)}canPerformSessionCheck(){return this.sessionChecksEnabled?this.sessionCheckIFrameUrl?this.getSessionState()?!(typeof this.document>"u"):(console.warn("sessionChecksEnabled is activated but there is no session_state"),!1):(console.warn("sessionChecksEnabled is activated but there is no sessionCheckIFrameUrl"),!1):!1}setupSessionCheckEventListener(){this.removeSessionCheckEventListener(),this.sessionCheckEventListener=e=>{let n=e.origin.toLowerCase(),o=this.issuer.toLowerCase();if(this.debug("sessionCheckEventListener"),!o.startsWith(n)){this.debug("sessionCheckEventListener","wrong origin",n,"expected",o,"event",e);return}switch(e.data){case"unchanged":this.ngZone.run(()=>{this.handleSessionUnchanged()});break;case"changed":this.ngZone.run(()=>{this.handleSessionChange()});break;case"error":this.ngZone.run(()=>{this.handleSessionError()});break}this.debug("got info from session check inframe",e)},this.ngZone.runOutsideAngular(()=>{window.addEventListener("message",this.sessionCheckEventListener)})}handleSessionUnchanged(){this.debug("session check","session unchanged"),this.eventsSubject.next(new Xr("session_unchanged"))}handleSessionChange(){this.eventsSubject.next(new Xr("session_changed")),this.stopSessionCheckTimer(),!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken().then(()=>{this.debug("token refresh after session change worked")}).catch(()=>{this.debug("token refresh did not work after session changed"),this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0)}):this.silentRefreshRedirectUri?(this.silentRefresh().catch(()=>this.debug("silent refresh failed after session changed")),this.waitForSilentRefreshAfterSessionChange()):(this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0))}waitForSilentRefreshAfterSessionChange(){this.events.pipe(Oe(e=>e.type==="silently_refreshed"||e.type==="silent_refresh_timeout"||e.type==="silent_refresh_error"),Ao()).subscribe(e=>{e.type!=="silently_refreshed"&&(this.debug("silent refresh did not work after session changed"),this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0))})}handleSessionError(){this.stopSessionCheckTimer(),this.eventsSubject.next(new Xr("session_error"))}removeSessionCheckEventListener(){this.sessionCheckEventListener&&(window.removeEventListener("message",this.sessionCheckEventListener),this.sessionCheckEventListener=null)}initSessionCheck(){if(!this.canPerformSessionCheck())return;let e=this.document.getElementById(this.sessionCheckIFrameName);e&&this.document.body.removeChild(e);let n=this.document.createElement("iframe");n.id=this.sessionCheckIFrameName,this.setupSessionCheckEventListener();let o=this.sessionCheckIFrameUrl;n.setAttribute("src",o),n.style.display="none",this.document.body.appendChild(n),this.startSessionCheckTimer()}startSessionCheckTimer(){this.stopSessionCheckTimer(),this.ngZone.runOutsideAngular(()=>{this.sessionCheckTimer=setInterval(this.checkSession.bind(this),this.sessionCheckIntervall)})}stopSessionCheckTimer(){this.sessionCheckTimer&&(clearInterval(this.sessionCheckTimer),this.sessionCheckTimer=null)}checkSession(){let e=this.document.getElementById(this.sessionCheckIFrameName);e||this.logger.warn("checkSession did not find iframe",this.sessionCheckIFrameName);let n=this.getSessionState();n||this.stopSessionCheckTimer();let o=this.clientId+" "+n;e.contentWindow.postMessage(o,this.issuer)}createLoginUrl(){return Yt(this,arguments,function*(e="",n="",o="",r=!1,a={}){let s=this,c;o?c=o:c=this.redirectUri;let u=yield this.createAndSaveNonce();if(e?e=u+this.config.nonceStateSeparator+encodeURIComponent(e):e=u,!this.requestAccessToken&&!this.oidc)throw new Error("Either requestAccessToken or oidc or both must be true");this.config.responseType?this.responseType=this.config.responseType:this.oidc&&this.requestAccessToken?this.responseType="id_token token":this.oidc&&!this.requestAccessToken?this.responseType="id_token":this.responseType="token";let f=s.loginUrl.indexOf("?")>-1?"&":"?",h=s.scope;this.oidc&&!h.match(/(^|\s)openid($|\s)/)&&(h="openid "+h);let y=s.loginUrl+f+"response_type="+encodeURIComponent(s.responseType)+"&client_id="+encodeURIComponent(s.clientId)+"&state="+encodeURIComponent(e)+"&redirect_uri="+encodeURIComponent(c)+"&scope="+encodeURIComponent(h);if(this.responseType.includes("code")&&!this.disablePKCE){let[x,D]=yield this.createChallangeVerifierPairForPKCE();this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("PKCE_verifier",D):this._storage.setItem("PKCE_verifier",D),y+="&code_challenge="+x,y+="&code_challenge_method=S256"}n&&(y+="&login_hint="+encodeURIComponent(n)),s.resource&&(y+="&resource="+encodeURIComponent(s.resource)),s.oidc&&(y+="&nonce="+encodeURIComponent(u)),r&&(y+="&prompt=none");for(let x of Object.keys(a))y+="&"+encodeURIComponent(x)+"="+encodeURIComponent(a[x]);if(this.customQueryParams)for(let x of Object.getOwnPropertyNames(this.customQueryParams))y+="&"+x+"="+encodeURIComponent(this.customQueryParams[x]);return y})}initImplicitFlowInternal(e="",n=""){if(this.inImplicitFlow)return;if(this.inImplicitFlow=!0,!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},r=null;typeof n=="string"?r=n:typeof n=="object"&&(o=n),this.createLoginUrl(e,r,null,!1,o).then(this.config.openUri).catch(a=>{console.error("Error in initImplicitFlow",a),this.inImplicitFlow=!1})}initImplicitFlow(e="",n=""){this.loginUrl!==""?this.initImplicitFlowInternal(e,n):this.events.pipe(Oe(o=>o.type==="discovery_document_loaded")).subscribe(()=>this.initImplicitFlowInternal(e,n))}resetImplicitFlow(){this.inImplicitFlow=!1}callOnTokenReceivedIfExists(e){let n=this;if(e.onTokenReceived){let o={idClaims:n.getIdentityClaims(),idToken:n.getIdToken(),accessToken:n.getAccessToken(),state:n.state};e.onTokenReceived(o)}}storeAccessTokenResponse(e,n,o,r,a){if(this._storage.setItem("access_token",e),r&&!Array.isArray(r)?this._storage.setItem("granted_scopes",JSON.stringify(r.split(" "))):r&&Array.isArray(r)&&this._storage.setItem("granted_scopes",JSON.stringify(r)),this._storage.setItem("access_token_stored_at",""+this.dateTimeService.now()),o){let s=o*1e3,u=this.dateTimeService.new().getTime()+s;this._storage.setItem("expires_at",""+u)}n&&this._storage.setItem("refresh_token",n),a&&a.forEach((s,c)=>{this._storage.setItem(c,s)})}tryLogin(e=null){return this.config.responseType==="code"?this.tryLoginCodeFlow(e).then(()=>!0):this.tryLoginImplicitFlow(e)}parseQueryString(e){return!e||e.length===0?{}:(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}tryLoginCodeFlow(e=null){return Yt(this,null,function*(){e=e||{};let n=e.customHashFragment?e.customHashFragment.substring(1):window.location.search,o=this.getCodePartsFromUrl(n),r=o.code,a=o.state,s=o.session_state;if(!e.preventClearHashAfterLogin){let f=location.origin+location.pathname+location.search.replace(/code=[^&$]*/,"").replace(/scope=[^&$]*/,"").replace(/state=[^&$]*/,"").replace(/session_state=[^&$]*/,"").replace(/^\?&/,"?").replace(/&$/,"").replace(/^\?$/,"").replace(/&+/g,"&").replace(/\?&/,"?").replace(/\?$/,"")+location.hash;history.replaceState(null,window.name,f)}let[c,u]=this.parseState(a);if(this.state=u,o.error){this.debug("error trying to login"),this.handleLoginError(e,o);let f=new Vn("code_error",{},o);return this.eventsSubject.next(f),Promise.reject(f)}if(!e.disableNonceCheck){if(!c)return this.saveRequestedRoute(),Promise.resolve();if(!e.disableOAuth2StateCheck&&!this.validateNonce(c)){let h=new Vn("invalid_nonce_in_state",null);return this.eventsSubject.next(h),Promise.reject(h)}}return this.storeSessionState(s),r&&(yield this.getTokenFromCode(r,e),this.restoreRequestedRoute()),Promise.resolve()})}saveRequestedRoute(){this.config.preserveRequestedRoute&&this._storage.setItem("requested_route",window.location.pathname+window.location.search)}restoreRequestedRoute(){let e=this._storage.getItem("requested_route");e&&history.replaceState(null,"",window.location.origin+e)}getCodePartsFromUrl(e){return!e||e.length===0?this.urlHelper.getHashFragmentParams():(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}getTokenFromCode(e,n){let o=new te({encoder:new yl}).set("grant_type","authorization_code").set("code",e).set("redirect_uri",n.customRedirectUri||this.redirectUri);if(!this.disablePKCE){let r;this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?r=localStorage.getItem("PKCE_verifier"):r=this._storage.getItem("PKCE_verifier"),r?o=o.set("code_verifier",r):console.warn("No PKCE verifier found in oauth storage!")}return this.fetchAndProcessToken(o,n)}fetchAndProcessToken(e,n){n=n||{},this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let o=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let r=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+r)}return this.useHttpBasicAuth||(e=e.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(e=e.set("client_secret",this.dummyClientSecret)),new Promise((r,a)=>{if(this.customQueryParams)for(let s of Object.getOwnPropertyNames(this.customQueryParams))e=e.set(s,this.customQueryParams[s]);this.http.post(this.tokenEndpoint,e,{headers:o}).subscribe(s=>{this.debug("refresh tokenResponse",s),this.storeAccessTokenResponse(s.access_token,s.refresh_token,s.expires_in||this.fallbackAccessTokenExpirationTimeInSec,s.scope,this.extractRecognizedCustomParameters(s)),this.oidc&&s.id_token?this.processIdToken(s.id_token,s.access_token,n.disableNonceCheck).then(c=>{this.storeIdToken(c),this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),r(s)}).catch(c=>{this.eventsSubject.next(new Vn("token_validation_error",c)),console.error("Error validating tokens"),console.error(c),a(c)}):(this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),r(s))},s=>{console.error("Error getting token",s),this.eventsSubject.next(new Vn("token_error",s)),a(s)})})}tryLoginImplicitFlow(e=null){e=e||{};let n;e.customHashFragment?n=this.urlHelper.getHashFragmentParams(e.customHashFragment):n=this.urlHelper.getHashFragmentParams(),this.debug("parsed url",n);let o=n.state,[r,a]=this.parseState(o);if(this.state=a,n.error){this.debug("error trying to login"),this.handleLoginError(e,n);let h=new Vn("token_error",{},n);return this.eventsSubject.next(h),Promise.reject(h)}let s=n.access_token,c=n.id_token,u=n.session_state,f=n.scope;if(!this.requestAccessToken&&!this.oidc)return Promise.reject("Either requestAccessToken or oidc (or both) must be true.");if(this.requestAccessToken&&!s||this.requestAccessToken&&!e.disableOAuth2StateCheck&&!o||this.oidc&&!c)return Promise.resolve(!1);if(this.sessionChecksEnabled&&!u&&this.logger.warn("session checks (Session Status Change Notification) were activated in the configuration but the id_token does not contain a session_state claim"),this.requestAccessToken&&!e.disableNonceCheck&&!this.validateNonce(r)){let y=new Vn("invalid_nonce_in_state",null);return this.eventsSubject.next(y),Promise.reject(y)}return this.requestAccessToken&&this.storeAccessTokenResponse(s,null,n.expires_in||this.fallbackAccessTokenExpirationTimeInSec,f),this.oidc?this.processIdToken(c,s,e.disableNonceCheck).then(h=>e.validationHandler?e.validationHandler({accessToken:s,idClaims:h.idTokenClaims,idToken:h.idToken,state:o}).then(()=>h):h).then(h=>(this.storeIdToken(h),this.storeSessionState(u),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.eventsSubject.next(new Co("token_received")),this.callOnTokenReceivedIfExists(e),this.inImplicitFlow=!1,!0)).catch(h=>(this.eventsSubject.next(new Vn("token_validation_error",h)),this.logger.error("Error validating tokens"),this.logger.error(h),Promise.reject(h))):(this.eventsSubject.next(new Co("token_received")),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.callOnTokenReceivedIfExists(e),Promise.resolve(!0))}parseState(e){let n=e,o="";if(e){let r=e.indexOf(this.config.nonceStateSeparator);r>-1&&(n=e.substr(0,r),o=e.substr(r+this.config.nonceStateSeparator.length))}return[n,o]}validateNonce(e){let n;return this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?n=localStorage.getItem("nonce"):n=this._storage.getItem("nonce"),n!==e?(console.error("Validating access_token failed, wrong state/nonce.",n,e),!1):!0}storeIdToken(e){this._storage.setItem("id_token",e.idToken),this._storage.setItem("id_token_claims_obj",e.idTokenClaimsJson),this._storage.setItem("id_token_expires_at",""+e.idTokenExpiresAt),this._storage.setItem("id_token_stored_at",""+this.dateTimeService.now())}storeSessionState(e){this._storage.setItem("session_state",e)}getSessionState(){return this._storage.getItem("session_state")}handleLoginError(e,n){e.onLoginError&&e.onLoginError(n),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash()}getClockSkewInMsec(e=6e5){return!this.clockSkewInSec&&this.clockSkewInSec!==0?e:this.clockSkewInSec*1e3}processIdToken(e,n,o=!1){let r=e.split("."),a=this.padBase64(r[0]),s=jE(a),c=JSON.parse(s),u=this.padBase64(r[1]),f=jE(u),h=JSON.parse(f),y;if(this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?y=localStorage.getItem("nonce"):y=this._storage.getItem("nonce"),Array.isArray(h.aud)){if(h.aud.every(pe=>pe!==this.clientId)){let pe="Wrong audience: "+h.aud.join(",");return this.logger.warn(pe),Promise.reject(pe)}}else if(h.aud!==this.clientId){let pe="Wrong audience: "+h.aud;return this.logger.warn(pe),Promise.reject(pe)}if(!h.sub){let pe="No sub claim in id_token";return this.logger.warn(pe),Promise.reject(pe)}if(this.sessionChecksEnabled&&this.silentRefreshSubject&&this.silentRefreshSubject!==h.sub){let pe=`After refreshing, we got an id_token for another user (sub). Expected sub: ${this.silentRefreshSubject}, received sub: ${h.sub}`;return this.logger.warn(pe),Promise.reject(pe)}if(!h.iat){let pe="No iat claim in id_token";return this.logger.warn(pe),Promise.reject(pe)}if(!this.skipIssuerCheck&&h.iss!==this.issuer){let pe="Wrong issuer: "+h.iss;return this.logger.warn(pe),Promise.reject(pe)}if(!o&&h.nonce!==y){let pe="Wrong nonce: "+h.nonce;return this.logger.warn(pe),Promise.reject(pe)}if(Object.prototype.hasOwnProperty.call(this,"responseType")&&(this.responseType==="code"||this.responseType==="id_token")&&(this.disableAtHashCheck=!0),!this.disableAtHashCheck&&this.requestAccessToken&&!h.at_hash){let pe="An at_hash is needed!";return this.logger.warn(pe),Promise.reject(pe)}let x=this.dateTimeService.now(),D=h.iat*1e3,Y=h.exp*1e3,Q=this.getClockSkewInMsec();if(D-Q>=x||Y+Q-this.decreaseExpirationBySec<=x){let pe="Token has expired";return console.error(pe),console.error({now:x,issuedAtMSec:D,expiresAtMSec:Y}),Promise.reject(pe)}let X={accessToken:n,idToken:e,jwks:this.jwks,idTokenClaims:h,idTokenHeader:c,loadKeys:()=>this.loadJwks()};return this.disableAtHashCheck?this.checkSignature(X).then(()=>({idToken:e,idTokenClaims:h,idTokenClaimsJson:f,idTokenHeader:c,idTokenHeaderJson:s,idTokenExpiresAt:Y})):this.checkAtHash(X).then(pe=>{if(!this.disableAtHashCheck&&this.requestAccessToken&&!pe){let mt="Wrong at_hash";return this.logger.warn(mt),Promise.reject(mt)}return this.checkSignature(X).then(()=>{let mt=!this.disableAtHashCheck,Et={idToken:e,idTokenClaims:h,idTokenClaimsJson:f,idTokenHeader:c,idTokenHeaderJson:s,idTokenExpiresAt:Y};return mt?this.checkAtHash(X).then(Ht=>{if(this.requestAccessToken&&!Ht){let nn="Wrong at_hash";return this.logger.warn(nn),Promise.reject(nn)}else return Et}):Et})})}getIdentityClaims(){let e=this._storage.getItem("id_token_claims_obj");return e?JSON.parse(e):null}getGrantedScopes(){let e=this._storage.getItem("granted_scopes");return e?JSON.parse(e):null}getIdToken(){return this._storage?this._storage.getItem("id_token"):null}padBase64(e){for(;e.length%4!==0;)e+="=";return e}getAccessToken(){return this._storage?this._storage.getItem("access_token"):null}getRefreshToken(){return this._storage?this._storage.getItem("refresh_token"):null}getAccessTokenExpiration(){return this._storage.getItem("expires_at")?parseInt(this._storage.getItem("expires_at"),10):null}getAccessTokenStoredAt(){return parseInt(this._storage.getItem("access_token_stored_at"),10)}getIdTokenStoredAt(){return parseInt(this._storage.getItem("id_token_stored_at"),10)}getIdTokenExpiration(){return this._storage.getItem("id_token_expires_at")?parseInt(this._storage.getItem("id_token_expires_at"),10):null}hasValidAccessToken(){if(this.getAccessToken()){let e=this._storage.getItem("expires_at"),n=this.dateTimeService.new();return!(e&&parseInt(e,10)-this.decreaseExpirationBySec=0&&this._storage.getItem(e)!==null?JSON.parse(this._storage.getItem(e)):null}authorizationHeader(){return"Bearer "+this.getAccessToken()}logOut(e={},n=""){let o=!1;typeof e=="boolean"&&(o=e,e={});let r=this.getIdToken();if(this._storage.removeItem("access_token"),this._storage.removeItem("id_token"),this._storage.removeItem("refresh_token"),this.saveNoncesInLocalStorage?(localStorage.removeItem("nonce"),localStorage.removeItem("PKCE_verifier")):(this._storage.removeItem("nonce"),this._storage.removeItem("PKCE_verifier")),this._storage.removeItem("expires_at"),this._storage.removeItem("id_token_claims_obj"),this._storage.removeItem("id_token_expires_at"),this._storage.removeItem("id_token_stored_at"),this._storage.removeItem("access_token_stored_at"),this._storage.removeItem("granted_scopes"),this._storage.removeItem("session_state"),this.config.customTokenParameters&&this.config.customTokenParameters.forEach(s=>this._storage.removeItem(s)),this.silentRefreshSubject=null,this.eventsSubject.next(new Xr("logout")),!this.logoutUrl||o)return;let a;if(!this.validateUrlForHttps(this.logoutUrl))throw new Error("logoutUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(this.logoutUrl.indexOf("{{")>-1)a=this.logoutUrl.replace(/\{\{id_token\}\}/,encodeURIComponent(r)).replace(/\{\{client_id\}\}/,encodeURIComponent(this.clientId));else{let s=new te({encoder:new yl});r&&(s=s.set("id_token_hint",r));let c=this.postLogoutRedirectUri||this.redirectUriAsPostLogoutRedirectUriFallback&&this.redirectUri||"";c&&(s=s.set("post_logout_redirect_uri",c),n&&(s=s.set("state",n)));for(let u in e)s=s.set(u,e[u]);a=this.logoutUrl+(this.logoutUrl.indexOf("?")>-1?"&":"?")+s.toString()}this.config.openUri(a)}createAndSaveNonce(){let e=this;return this.createNonce().then(function(n){return e.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("nonce",n):e._storage.setItem("nonce",n),n})}ngOnDestroy(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.removeSilentRefreshEventListener();let e=this.document.getElementById(this.silentRefreshIFrameName);e&&e.remove(),this.stopSessionCheckTimer(),this.removeSessionCheckEventListener();let n=this.document.getElementById(this.sessionCheckIFrameName);n&&n.remove()}createNonce(){return new Promise(e=>{if(this.rngUrl)throw new Error("createNonce with rng-web-api has not been implemented so far");let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",o=45,r="",a=typeof self>"u"?null:self.crypto||self.msCrypto;if(a){let s=new Uint8Array(o);a.getRandomValues(s),s.map||(s.map=Array.prototype.map),s=s.map(c=>n.charCodeAt(c%n.length)),r=String.fromCharCode.apply(null,s)}else for(;0o.type==="discovery_document_loaded")).subscribe(()=>this.initCodeFlowInternal(e,n))}initCodeFlowInternal(e="",n={}){if(!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},r=null;typeof n=="string"?r=n:typeof n=="object"&&(o=n),this.createLoginUrl(e,r,null,!1,o).then(this.config.openUri).catch(a=>{console.error("Error in initAuthorizationCodeFlow"),console.error(a)})}createChallangeVerifierPairForPKCE(){return Yt(this,null,function*(){if(!this.crypto)throw new Error("PKCE support for code flow needs a CryptoHander. Did you import the OAuthModule using forRoot() ?");let e=yield this.createNonce(),n=yield this.crypto.calcHash(e,"sha-256");return[HE(n),e]})}extractRecognizedCustomParameters(e){let n=new Map;return this.config.customTokenParameters&&this.config.customTokenParameters.forEach(o=>{e[o]&&n.set(o,JSON.stringify(e[o]))}),n}revokeTokenAndLogout(e={},n=!1){let o=this.revocationEndpoint,r=this.getAccessToken(),a=this.getRefreshToken();if(!r)return Promise.resolve();let s=new te({encoder:new yl}),c=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let u=btoa(`${this.clientId}:${this.dummyClientSecret}`);c=c.set("Authorization","Basic "+u)}if(this.useHttpBasicAuth||(s=s.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(s=s.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let u of Object.getOwnPropertyNames(this.customQueryParams))s=s.set(u,this.customQueryParams[u]);return new Promise((u,f)=>{let h,y;if(r){let x=s.set("token",r).set("token_type_hint","access_token");h=this.http.post(o,x,{headers:c})}else h=ne(null);if(a){let x=s.set("token",a).set("token_type_hint","refresh_token");y=this.http.post(o,x,{headers:c})}else y=ne(null);n&&(h=h.pipe(hn(x=>x.status===0?ne(null):Lo(x))),y=y.pipe(hn(x=>x.status===0?ne(null):Lo(x)))),ii([h,y]).subscribe(x=>{this.logOut(e),u(x),this.logger.info("Token successfully revoked")},x=>{this.logger.error("Error revoking token",x),this.eventsSubject.next(new Vn("token_revoke_error",x)),f(x)})})}clearLocationHash(){location.hash!=""&&(location.hash="")}static{this.\u0275fac=function(n){return new(n||t)(be(ce),be(Ln),be(Wp,8),be(Yp,8),be(pd,8),be(UE),be(Gp),be(qp,8),be(De),be(Q0))}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Qp=class{},lb=class{handleError(i){return Lo(i)}},yZ=(()=>{class t{constructor(e,n,o){this.oAuthService=e,this.errorHandler=n,this.moduleConfig=o}checkUrl(e){return this.moduleConfig.resourceServer.customUrlValidation?this.moduleConfig.resourceServer.customUrlValidation(e):this.moduleConfig.resourceServer.allowedUrls?!!this.moduleConfig.resourceServer.allowedUrls.find(n=>e.toLowerCase().startsWith(n.toLowerCase())):!0}intercept(e,n){let o=e.url.toLowerCase();return!this.moduleConfig||!this.moduleConfig.resourceServer||!this.checkUrl(o)?n.handle(e):this.moduleConfig.resourceServer.sendAccessToken?pt(ne(this.oAuthService.getAccessToken()).pipe(Oe(a=>!!a)),this.oAuthService.events.pipe(Oe(a=>a.type==="token_received"),Xg(this.oAuthService.waitForTokenInMsec||0),hn(()=>ne(null)),le(()=>this.oAuthService.getAccessToken()))).pipe(Ve(1),cn(a=>{if(a){let s="Bearer "+a,c=e.headers.set("Authorization",s);e=e.clone({headers:c})}return n.handle(e).pipe(hn(s=>this.errorHandler.handleError(s)))})):n.handle(e).pipe(hn(a=>this.errorHandler.handleError(a)))}static{this.\u0275fac=function(n){return new(n||t)(be(Kp),be(Qp),be($p,8))}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();function CZ(){return console}function xZ(){return typeof sessionStorage<"u"?sessionStorage:new pZ}function MZ(t=null,i=Up){return ha([Kp,UE,{provide:Gp,useFactory:CZ},{provide:Wp,useFactory:xZ},{provide:Yp,useClass:i},{provide:qp,useClass:vZ},{provide:Qp,useClass:lb},{provide:$p,useValue:t},{provide:Ap,useClass:yZ,multi:!0},{provide:Q0,useClass:mZ}])}var ISe=(()=>{class t{static forRoot(e=null,n=Up){return{ngModule:t,providers:[MZ(e,n)]}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({imports:[fe]})}}return t})();var _s={headers:{"Fineract-Platform-TenantId":je.fineractPlatformTenantId}},Xp="Authorization",wZ="Fineract-Platform-TenantId",GE="Fineract-Platform-TFA-Token",WE=(()=>{class t{constructor(){this.settingsService=d(tn)}intercept(e,n){return this.settingsService.tenantIdentifier&&(_s.headers["Fineract-Platform-TenantId"]=this.settingsService.tenantIdentifier),e=e.clone({setHeaders:_s.headers}),n.handle(e)}setAuthorizationToken(e){je.oauth.enabled?_s.headers[Xp]=`Bearer ${e}`:_s.headers[Xp]=`Basic ${e}`}setTwoFactorAccessToken(e){_s.headers[GE]=e}removeAuthorization(){delete _s.headers[Xp]}removeAuthorizationTenant(){delete _s.headers[Xp],delete _s.headers[wZ]}removeTwoFactorAuthorization(){delete _s.headers[GE]}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Ni=(function(t){return t.OAuth2="oauth2",t.OIDC="oidc",t.Basic="basic",t})(Ni||{});function db(){return je.OIDC.oidcServerEnabled?Ni.OIDC:je.oauth.enabled?Ni.OAuth2:Ni.Basic}function YE(){switch(db()){case Ni.OIDC:return DZ();case Ni.OAuth2:return SZ();default:return{clientId:""}}}function DZ(){let t=je.OIDC.oidcFrontUrl||window.location.origin;return{issuer:je.OIDC.oidcBaseUrl,clientId:je.OIDC.oidcClientId,redirectUri:`${t}/callback`,postLogoutRedirectUri:`${t}/#/login`,responseType:"code",scope:"openid profile email offline_access",oidc:!0,useSilentRefresh:!1,requireHttps:je.production,showDebugInformation:!je.production,sessionChecksEnabled:!1,clearHashAfterLogin:!1}}function SZ(){let t=window.location.origin;return{issuer:je.oauth.serverUrl,loginUrl:je.oauth.authorizeUrl,tokenEndpoint:je.oauth.tokenUrl,redirectUri:je.oauth.redirectUri,postLogoutRedirectUri:`${t}/#/login`,clientId:je.oauth.appId,responseType:"code",scope:je.oauth.scope,useSilentRefresh:!1,oidc:!1,skipIssuerCheck:!0,strictDiscoveryDocumentValidation:!1,requireHttps:je.production,showDebugInformation:!je.production,sessionChecksEnabled:!1,clearHashAfterLogin:!1}}var Zp=(()=>{class t{changePassword(e,n){return this.http.put(`/users/${e}`,n)}constructor(){this.http=d(Ln),this.alertService=d(Ia),this.authenticationInterceptor=d(WE),this.oauthService=d(Kp),this.userLoggedIn$=new ut(!1),this.isAuthenticated$=this.userLoggedIn$.asObservable(),this.rememberMe=!1,this.storage=sessionStorage,this.dialogShown=!1,this.authMode=Ni.Basic,this.credentialsStorageKey="mifosXCredentials",this.twoFactorAuthenticationTokenStorageKey="mifosXTwoFactorAuthenticationToken",this.authMode=db(),this.authMode!==Ni.Basic&&this.initializeOAuthService(),this.restoreSession()}initializeOAuthService(){this.oauthService.configure(YE());let e=je.enableRememberMe?localStorage:sessionStorage;this.oauthService.setStorage(e),this.oauthService.setupAutomaticSilentRefresh(),this.oauthService.events.subscribe(n=>{(n.type==="token_received"||n.type==="token_refreshed")&&this.updateCredentialsToken()}),this.cleanupLegacyStorage()}restoreSession(){let e=this.getSavedCredentials();if(e)if(e.rememberMe&&(this.rememberMe=!0,this.storage=localStorage,this.oauthService.setStorage(this.storage)),this.authMode!==Ni.Basic)this.oauthService.hasValidAccessToken()?(this.authenticationInterceptor.setAuthorizationToken(this.oauthService.getAccessToken()),this.userLoggedIn$.next(!0)):this.oauthService.getRefreshToken()&&this.oauthService.refreshToken().then(()=>this.userLoggedIn$.next(!0)).catch(()=>this.logout().subscribe());else{this.authenticationInterceptor.setAuthorizationToken(e.base64EncodedAuthenticationKey);let n=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));n&&this.authenticationInterceptor.setTwoFactorAccessToken(n.token),this.userLoggedIn$.next(!0)}}updateCredentialsToken(){let e=this.oauthService.getAccessToken();if(!e)return;this.authenticationInterceptor.setAuthorizationToken(e);let n=this.getCredentials();n&&(n.accessToken=e,this.storage.setItem(this.credentialsStorageKey,JSON.stringify(n)))}getSavedCredentials(){let e=sessionStorage.getItem(this.credentialsStorageKey)||localStorage.getItem(this.credentialsStorageKey);return e?JSON.parse(e):null}login(e){if(this.alertService.alert({type:"Authentication Start",message:"Please wait..."}),this.authMode!==Ni.Basic)return this.oauthService.initCodeFlow(),ne(!0);if(!e)throw new Error("loginContext is required when using Basic authentication");return this.rememberMe=je.enableRememberMe?e?.remember??!1:!1,this.storage=this.rememberMe?localStorage:sessionStorage,this.http.post("/authentication",{username:e.username,password:e.password,remember:this.rememberMe}).pipe(le(n=>(this.onLoginSuccess(n),!0)))}getUserDetails(){return Yt(this,null,function*(){let e=this.oauthService.getAccessToken();return new Promise((n,o)=>{if(this.authMode===Ni.OIDC){let r=`${je.OIDC.oidcApiUrl}authentication/userdetails`;this.http.post(r,{token:e}).subscribe({next:a=>{let s=a.object;s.accessToken=e,this.onLoginSuccess(s),n()},error:a=>{console.error("Failed to fetch user details:",a),o(a)}})}else if(this.authMode===Ni.OAuth2){let r=new ki().set("Authorization",`Bearer ${e}`),a=`${je.oauth.serverUrl}/userdetails`;this.http.get(a,{headers:r}).subscribe({next:s=>{s.accessToken=e,this.onLoginSuccess(s),n()},error:s=>{console.error("Failed to fetch user details:",s),o(s)}})}})})}onLoginSuccess(e){this.userLoggedIn$.next(!0),e.rememberMe=this.rememberMe,this.authMode!==Ni.Basic?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)}handleOAuthCallback(){return Yt(this,null,function*(){try{let e=sessionStorage.getItem("oauth_callback_query");return e?(sessionStorage.removeItem("oauth_callback_query"),yield this.oauthService.tryLoginCodeFlow({customHashFragment:e})):yield this.oauthService.tryLoginCodeFlow(),this.oauthService.hasValidAccessToken()?(yield this.getUserDetails(),!0):!1}catch(e){return console.error("OAuth callback failed:",e),!1}})}logout(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));if(e&&(this.http.post("/twofactor/invalidate",{token:e.token}).subscribe(),this.authenticationInterceptor.removeTwoFactorAuthorization()),sessionStorage.removeItem("oauth_callback_query"),this.authenticationInterceptor.removeAuthorization(),this.setCredentials(),this.resetDialog(),this.userLoggedIn$.next(!1),this.authMode===Ni.OIDC)this.oauthService.logOut();else if(this.authMode===Ni.OAuth2){this.oauthService.logOut(!0);let n=window.open(je.oauth.logoutUrl,"_blank","width=100,height=100");setTimeout(()=>{n&&n.close(),window.location.href=`${window.location.origin}/#/login`},500)}return ne(!0)}twoFactorAccessTokenIsValid(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e?new Date().getTime(){n.removeItem(this.credentialsStorageKey),n.removeItem(this.twoFactorAuthenticationTokenStorageKey)}),this.cleanupLegacyStorage())}cleanupLegacyStorage(){["mifosXZitadelTokenDetails","mifosXOAuthTokenDetails","token_start_time","refresh_expires_in","mifosXZitadel","auth_code"].forEach(n=>{localStorage.removeItem(n),sessionStorage.removeItem(n)})}getDeliveryMethods(){return this.http.get("/twofactor")}showDialog(){this.dialogShown=!0}resetDialog(){this.dialogShown=!1}hasDialogBeenShown(){return this.dialogShown}requestOTP(e){let n=new te;return n=n.set("deliveryMethod",e.name),n=n.set("extendedToken",this.rememberMe.toString()),this.http.post("/twofactor",{},{params:n})}validateOTP(e){let n=new te().set("token",e);return this.http.post("/twofactor/validate",{},{params:n}).pipe(le(o=>{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(le(()=>{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$.value}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var ic=(()=>{class t{constructor(){this.templateRef=d(rt),this.viewContainer=d(ft),this.authenticationService=d(Zp);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=R({type:t,selectors:[["","mifosxHasPermission",""]],inputs:{mifosxHasPermission:"mifosxHasPermission"}})}}return t})();var tI=(()=>{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)(Me(tt),Me(Z))};static \u0275dir=R({type:t})}return t})(),nI=(()=>{class t extends tI{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,features:[de]})}return t})(),vi=new L("");var kZ={provide:vi,useExisting:Pt(()=>Ii),multi:!0};function EZ(){let t=Zo()?Zo().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var IZ=new L(""),Ii=(()=>{class t extends tI{_compositionMode;_composing=!1;constructor(e,n,o){super(e,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!EZ())}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)(Me(tt),Me(Z),Me(IZ,8))};static \u0275dir=R({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:[ue([kZ]),de]})}return t})();function fb(t){return t==null||hb(t)===0}function hb(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Oi=new L(""),xl=new L(""),OZ=/^(?=.{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])?)*$/,an=class{static min(i){return iI(i)}static max(i){return oI(i)}static required(i){return rI(i)}static requiredTrue(i){return TZ(i)}static email(i){return PZ(i)}static minLength(i){return aI(i)}static maxLength(i){return sI(i)}static pattern(i){return LZ(i)}static nullValidator(i){return ef()}static compose(i){return pI(i)}static composeAsync(i){return fI(i)}};function iI(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 rI(t){return fb(t.value)?{required:!0}:null}function TZ(t){return t.value===!0?null:{required:!0}}function PZ(t){return fb(t.value)||OZ.test(t.value)?null:{email:!0}}function aI(t){return i=>{let e=i.value?.length??hb(i.value);return e===null||e===0?null:e{let e=i.value?.length??hb(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function LZ(t){if(!t)return ef;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(fb(n.value))return null;let o=n.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function ef(t){return null}function cI(t){return t!=null}function lI(t){return ms(t)?Zt(t):t}function dI(t){let i={};return t.forEach(e=>{i=e!=null?q(q({},i),e):i}),Object.keys(i).length===0?null:i}function uI(t,i){return i.map(e=>e(t))}function AZ(t){return!t.validate}function mI(t){return t.map(i=>AZ(i)?i:e=>i.validate(e))}function pI(t){if(!t)return null;let i=t.filter(cI);return i.length==0?null:function(e){return dI(uI(e,i))}}function gb(t){return t!=null?pI(mI(t)):null}function fI(t){if(!t)return null;let i=t.filter(cI);return i.length==0?null:function(e){let n=uI(e,i).map(lI);return Ja(n).pipe(le(dI))}}function _b(t){return t!=null?fI(mI(t)):null}function qE(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function hI(t){return t._rawValidators}function gI(t){return t._rawAsyncValidators}function ub(t){return t?Array.isArray(t)?t:[t]:[]}function tf(t,i){return Array.isArray(t)?t.includes(i):t===i}function QE(t,i){let e=ub(i);return ub(t).forEach(o=>{tf(e,o)||e.push(o)}),e}function KE(t,i){return ub(i).filter(e=>!tf(t,e))}var nf=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=gb(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=_b(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}},Ei=class extends nf{name;get formDirective(){return null}get path(){return null}},li=class extends nf{_parent=null;name=null;valueAccessor=null},of=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}},RZ={"[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"},_ke=Re(q({},RZ),{"[class.ng-submitted]":"isSubmitted"}),bn=(()=>{class t extends of{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Me(li,2))};static \u0275dir=R({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&ie("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:[de]})}return t})(),yr=(()=>{class t extends of{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Me(Ei,10))};static \u0275dir=R({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&ie("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:[de]})}return t})();var X0="VALID",Jp="INVALID",fd="PENDING",Z0="DISABLED",rc=class{},rf=class extends rc{value;source;constructor(i,e){super(),this.value=i,this.source=e}},eu=class extends rc{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},tu=class extends rc{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},hd=class extends rc{status;source;constructor(i,e){super(),this.status=i,this.source=e}},af=class extends rc{source;constructor(i){super(),this.source=i}},nu=class extends rc{source;constructor(i){super(),this.source=i}};function bb(t){return(df(t)?t.validators:t)||null}function zZ(t){return Array.isArray(t)?gb(t):t||null}function vb(t,i){return(df(i)?i.asyncValidators:t)||null}function NZ(t){return Array.isArray(t)?_b(t):t||null}function df(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function _I(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new he(1e3,"");if(!n[e])throw new he(1001,"")}function bI(t,i,e){t._forEachChild((n,o)=>{if(e[o]===void 0)throw new he(1002,"")})}var gd=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 Yn(this.statusReactive)}set status(i){Yn(()=>this.statusReactive.set(i))}_status=si(()=>this.statusReactive());statusReactive=ke(void 0);get valid(){return this.status===X0}get invalid(){return this.status===Jp}get pending(){return this.status==fd}get disabled(){return this.status===Z0}get enabled(){return this.status!==Z0}errors;get pristine(){return Yn(this.pristineReactive)}set pristine(i){Yn(()=>this.pristineReactive.set(i))}_pristine=si(()=>this.pristineReactive());pristineReactive=ke(!0);get dirty(){return!this.pristine}get touched(){return Yn(this.touchedReactive)}set touched(i){Yn(()=>this.touchedReactive.set(i))}_touched=si(()=>this.touchedReactive());touchedReactive=ke(!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(QE(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(QE(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(KE(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(KE(i,this._rawAsyncValidators))}hasValidator(i){return tf(this._rawValidators,i)}hasAsyncValidator(i){return tf(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(Re(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new tu(!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 tu(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Re(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new eu(!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 eu(!0,n))}markAsPending(i={}){this.status=fd;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new hd(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Re(q({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=Z0,this.errors=null,this._forEachChild(o=>{o.disable(Re(q({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rf(this.value,n)),this._events.next(new hd(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Re(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=X0,this._forEachChild(n=>{n.enable(Re(q({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Re(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===X0||this.status===fd)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rf(this.value,e)),this._events.next(new hd(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Re(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()?Z0:X0}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=fd,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=lI(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 hd(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?Z0:this.errors?Jp:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(fd)?fd:this._anyControlsHaveStatus(Jp)?Jp:X0}_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 eu(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new tu(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){df(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=zZ(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=NZ(this._rawAsyncValidators)}},Cl=class extends gd{constructor(i,e,n){super(bb(e),vb(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={}){bI(this,!0,i),Object.keys(i).forEach(n=>{_I(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 nu(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 vI=Cl;var mb=class extends Cl{};var _d=new L("",{providedIn:"root",factory:()=>uf}),uf="always";function mf(t,i){return[...i.path,t]}function iu(t,i,e=uf){yb(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),VZ(t,i),jZ(t,i),BZ(t,i),FZ(t,i)}function sf(t,i,e=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),lf(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function cf(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function FZ(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function yb(t,i){let e=hI(t);i.validator!==null?t.setValidators(qE(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=gI(t);i.asyncValidator!==null?t.setAsyncValidators(qE(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();cf(i._rawValidators,o),cf(i._rawAsyncValidators,o)}function lf(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=hI(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=gI(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 cf(i._rawValidators,n),cf(i._rawAsyncValidators,n),e}function VZ(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&yI(t,i)})}function BZ(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&yI(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function yI(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function jZ(t,i){let e=(n,o)=>{i.valueAccessor.writeValue(n),o&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function CI(t,i){t==null,yb(t,i)}function HZ(t,i){return lf(t,i)}function Cb(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function UZ(t){return Object.getPrototypeOf(t.constructor)===nI}function xI(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function xb(t,i){if(!i)return null;Array.isArray(i);let e,n,o;return i.forEach(r=>{r.constructor===Ii?e=r:UZ(r)?n=r:o=r}),o||n||e||null}function $Z(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var GZ={provide:Ei,useExisting:Pt(()=>bd)},J0=Promise.resolve(),bd=(()=>{class t extends Ei{callSetDisabledState;get submitted(){return Yn(this.submittedReactive)}_submitted=si(()=>this.submittedReactive());submittedReactive=ke(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(e,n,o){super(),this.callSetDisabledState=o,this.form=new Cl({},gb(e),_b(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){J0.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),iu(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){J0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){J0.then(()=>{let n=this._findContainer(e.path),o=new Cl({});CI(o,e),n.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){J0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){J0.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),xI(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new af(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)(Me(Oi,10),Me(xl,10),Me(_d,8))};static \u0275dir=R({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:[ue([GZ]),de]})}return t})();function XE(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function ZE(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var oc=class extends gd{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(bb(e),vb(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),df(e)&&(e.nonNullable||e.initialValueIsDefault)&&(ZE(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 nu(this))}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){XE(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){XE(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){ZE(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}},no=oc,WZ=t=>t instanceof oc,YZ=(()=>{class t extends Ei{_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 mf(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=Te(t)))(o||t)}})();static \u0275dir=R({type:t,standalone:!1,features:[de]})}return t})();var qZ={provide:li,useExisting:Pt(()=>QZ)},JE=Promise.resolve(),QZ=(()=>{class t extends li{_changeDetectorRef;callSetDisabledState;control=new oc;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;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=xb(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),Cb(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(){iu(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){JE.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,o=n!==0&&$(n);JE.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?mf(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(Me(Ei,9),Me(Oi,10),Me(xl,10),Me(vi,10),Me(we,8),Me(_d,8))};static \u0275dir=R({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:[ue([qZ]),de,Ne]})}return t})();var ac=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),KZ={provide:vi,useExisting:Pt(()=>XZ),multi:!0},XZ=(()=>{class t extends nI{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=Te(t)))(o||t)}})();static \u0275dir=R({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:[ue([KZ]),de]})}return t})();var Mb=new L(""),ZZ={provide:li,useExisting:Pt(()=>Fi)},Fi=(()=>{class t extends li{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new U;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=xb(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&sf(n,this,!1),iu(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Cb(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&sf(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)(Me(Oi,10),Me(xl,10),Me(vi,10),Me(Mb,8),Me(_d,8))};static \u0275dir=R({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:[ue([ZZ]),de,Ne]})}return t})(),JZ={provide:Ei,useExisting:Pt(()=>yi)},yi=(()=>{class t extends Ei{callSetDisabledState;get submitted(){return Yn(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=si(()=>this._submittedReactive());_submittedReactive=ke(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new U;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&&(lf(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 iu(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){sf(e.control||null,e,!1),$Z(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),xI(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new af(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&&(sf(n||null,e),WZ(o)&&(iu(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);CI(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&HZ(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){yb(this.form,this),this._oldForm&&lf(this._oldForm,this)}static \u0275fac=function(n){return new(n||t)(Me(Oi,10),Me(xl,10),Me(_d,8))};static \u0275dir=R({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:[ue([JZ]),de,Ne]})}return t})(),eJ={provide:Ei,useExisting:Pt(()=>MI)},MI=(()=>{class t extends YZ{name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){DI(this._parent)}static \u0275fac=function(n){return new(n||t)(Me(Ei,13),Me(Oi,10),Me(xl,10))};static \u0275dir=R({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[ue([eJ]),de]})}return t})(),tJ={provide:Ei,useExisting:Pt(()=>wI)},wI=(()=>{class t extends Ei{_parent;name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){DI(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 mf(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||t)(Me(Ei,13),Me(Oi,10),Me(xl,10))};static \u0275dir=R({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[ue([tJ]),de]})}return t})();function DI(t){return!(t instanceof MI)&&!(t instanceof yi)&&!(t instanceof wI)}var nJ={provide:li,useExisting:Pt(()=>er)},er=(()=>{class t extends li{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new U;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=xb(this,r)}ngOnChanges(e){this._added||this._setUpControl(),Cb(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 mf(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)(Me(Ei,13),Me(Oi,10),Me(xl,10),Me(vi,10),Me(Mb,8))};static \u0275dir=R({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[ue([nJ]),de,Ne]})}return t})();function SI(t){return typeof t=="number"?t:parseInt(t,10)}function kI(t){return typeof t=="number"?t:parseFloat(t)}var ou=(()=>{class t{_validator=ef;_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):ef,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=R({type:t,features:[Ne]})}return t})(),iJ={provide:Oi,useExisting:Pt(()=>oJ),multi:!0},oJ=(()=>{class t extends ou{max;inputName="max";normalizeInput=e=>kI(e);createValidator=e=>oI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({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&&oe("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[ue([iJ]),de]})}return t})(),rJ={provide:Oi,useExisting:Pt(()=>aJ),multi:!0},aJ=(()=>{class t extends ou{min;inputName="min";normalizeInput=e=>kI(e);createValidator=e=>iI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({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&&oe("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[ue([rJ]),de]})}return t})(),sJ={provide:Oi,useExisting:Pt(()=>Zr),multi:!0};var Zr=(()=>{class t extends ou{required;inputName="required";normalizeInput=$;createValidator=e=>rI;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({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&&oe("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[ue([sJ]),de]})}return t})();var cJ={provide:Oi,useExisting:Pt(()=>lJ),multi:!0},lJ=(()=>{class t extends ou{minlength;inputName="minlength";normalizeInput=e=>SI(e);createValidator=e=>aI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("minlength",o._enabled?o.minlength:null)},inputs:{minlength:"minlength"},standalone:!1,features:[ue([cJ]),de]})}return t})(),dJ={provide:Oi,useExisting:Pt(()=>uJ),multi:!0},uJ=(()=>{class t extends ou{maxlength;inputName="maxlength";normalizeInput=e=>SI(e);createValidator=e=>sI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("maxlength",o._enabled?o.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[ue([dJ]),de]})}return t})();var EI=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})(),pb=class extends gd{constructor(i,e,n){super(bb(e),vb(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={}){bI(this,!1,i),i.forEach((n,o)=>{_I(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 nu(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 eI(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var mJ=(()=>{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 eI(n)?r=n:n!==null&&(r.validators=n.validator,r.asyncValidators=n.asyncValidator),new Cl(o,r)}record(e,n=null){let o=this._reduceControls(e);return new mb(o,n)}control(e,n,o){let r={};return this.useNonNullable?(eI(n)?r=n:(r.validators=n,r.asyncValidators=o),new oc(e,Re(q({},r),{nonNullable:!0}))):new oc(e,n,o)}array(e,n,o){let r=e.map(a=>this._createControl(a));return new pb(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 oc)return e;if(e instanceof gd)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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var sc=(()=>{class t extends mJ{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=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var II=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:_d,useValue:e.callSetDisabledState??uf}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[EI]})}return t})(),ve=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Mb,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:_d,useValue:e.callSetDisabledState??uf}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[EI]})}return t})();var OI=(()=>{class t{constructor(){this.locale=d(Wr),this.el=d(Z),this.control=d(li),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:Mp(e,this.locale,this.displaySymbol,this.currencyCode,this.digitsInfo)+this.sufix}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=R({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 Pke=(()=>{class t{constructor(){this.control=d(li),this.el=d(Z)}onFocus(){this.control.control?.markAsTouched(),this.control.control?.updateValueAndValidity()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=R({type:t,selectors:[["","mifosxValidateOnFocus",""]],hostBindings:function(n,o){n&1&&N("focus",function(){return o.onFocus()})}})}}return t})();var TI=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({imports:[fe]})}}return t})();var Cr=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 bs(t){return t.buttons===0||t.detail===0}function vs(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 wb;function PI(){if(wb==null){let t=typeof document<"u"?document.head:null;wb=!!(t&&(t.createShadowRoot||t.attachShadow))}return wb}function Ml(t){if(PI()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function xo(){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 qn(t){return t.composedPath?t.composedPath()[0]:t.target}var Db;try{Db=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Db=!1}var $e=(()=>{class t{_platformId=d(pl);isBrowser=this._platformId?Tk(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||Db)&&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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ru;function LI(){if(ru==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ru=!0}))}finally{ru=ru||!1}return ru}function cc(t){return LI()?t:!!t.capture}function wn(t,i=0){return pf(t)?Number(t):arguments.length===2?i:0}function pf(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function An(t){return t instanceof Z?t.nativeElement:t}var AI=new L("cdk-input-modality-detector-options"),RI={ignoreKeys:[18,17,224,91,16]},zI=650,Sb={passive:!0,capture:!0},NI=(()=>{class t{_platform=d($e);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ut(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(n=>n===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=qn(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(vs(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=qn(e)};constructor(){let e=d(ce),n=d(De),o=d(AI,{optional:!0});if(this._options=q(q({},RI),o),this.modalityDetected=this._modality.pipe(qc(1)),this.modalityChanged=this.modalityDetected.pipe(x1()),this._platform.isBrowser){let r=d(Nn).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(n,"keydown",this._onKeydown,Sb),r.listen(n,"mousedown",this._onMousedown,Sb),r.listen(n,"touchstart",this._onTouchstart,Sb)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),au=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(au||{}),FI=new L("cdk-focus-monitor-default-options"),ff=cc({passive:!0,capture:!0}),mn=(()=>{class t{_ngZone=d(ce);_platform=d($e);_inputModalityDetector=d(NI);_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(De);_stopInputModalityDetector=new B;constructor(){let e=d(FI,{optional:!0});this._detectionMode=e?.detectionMode||au.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let n=qn(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=An(e);if(!this._platform.isBrowser||o.nodeType!==1)return ne();let r=Ml(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=An(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=An(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===au.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===au.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?zI:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,n){let o=this._elementInfo.get(n),r=qn(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,ff),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,ff)}),this._rootNodeFocusListenerCount.set(n,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(xe(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,ff),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ff),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(Z);_focusMonitor=d(mn);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new U;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=R({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var hf=new WeakMap,lt=(()=>{class t{_appRef;_injector=d(Ce);_environmentInjector=d(Jt);load(e){let n=this._appRef=this._appRef||this._injector.get(bi),o=hf.get(n);o||(o={loaders:new Set,refs:[]},hf.set(n,o),n.onDestroy(()=>{hf.get(n)?.refs.forEach(r=>r.destroy()),hf.delete(n)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(lp(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var No=(()=>{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 Jr(t){return Array.isArray(t)?t:[t]}var VI=new Set,wl,gf=(()=>{class t{_platform=d($e);_nonce=d(W1,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):fJ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&pJ(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function pJ(t,i){if(!VI.has(t))try{wl||(wl=document.createElement("style"),i&&wl.setAttribute("nonce",i),wl.setAttribute("type","text/css"),document.head.appendChild(wl)),wl.sheet&&(wl.sheet.insertRule(`@media ${t} {body{ }}`,0),VI.add(t))}catch(e){console.error(e)}}function fJ(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var Dl=(()=>{class t{_mediaMatcher=d(gf);_zone=d(ce);_queries=new Map;_destroySubject=new B;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return BI(Jr(e)).some(o=>this._registerQuery(o).mql.matches)}observe(e){let o=BI(Jr(e)).map(a=>this._registerQuery(a).observable),r=ii(o);return r=Yi(r.pipe(Ve(1)),r.pipe(qc(1),$o(0))),r.pipe(le(a=>{let s={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:u})=>{s.matches=s.matches||c,s.breakpoints[u]=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(Xe(n),le(({matches:a})=>({query:e,matches:a})),xe(this._destroySubject)),mql:n};return this._queries.set(e,r),r}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function BI(t){return t.map(i=>i.split(",")).reduce((i,e)=>i.concat(e)).map(i=>i.trim())}function hJ(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),HI=(()=>{class t{_mutationObserverFactory=d(jI);_observedElements=new Map;_ngZone=d(ce);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){let n=An(e);return new Fe(o=>{let a=this._observeElement(n).pipe(le(s=>s.filter(c=>!hJ(c))),Oe(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),cu=(()=>{class t{_contentObserver=d(HI);_elementRef=d(Z);event=new U;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=wn(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($o(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",$],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),vd=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({providers:[jI]})}return t})();var dc=(()=>{class t{_platform=d($e);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return _J(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let n=gJ(DJ(e));if(n&&(UI(n)===-1||!this.isVisible(n)))return!1;let o=e.nodeName.toLowerCase(),r=UI(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!MJ(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 wJ(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function gJ(t){try{return t.frameElement}catch{return null}}function _J(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function bJ(t){let i=t.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function vJ(t){return CJ(t)&&t.type=="hidden"}function yJ(t){return xJ(t)&&t.hasAttribute("href")}function CJ(t){return t.nodeName.toLowerCase()=="input"}function xJ(t){return t.nodeName.toLowerCase()=="a"}function WI(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let i=t.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function UI(t){if(!WI(t))return null;let i=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function MJ(t){let i=t.nodeName.toLowerCase(),e=i==="input"&&t.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function wJ(t){return vJ(t)?!1:bJ(t)||yJ(t)||t.hasAttribute("contenteditable")||WI(t)}function DJ(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var _f=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?Mt(i,{injector:this._injector}):setTimeout(i)}},yd=(()=>{class t{_checker=d(dc);_ngZone=d(ce);_document=d(De);_injector=d(Ce);constructor(){d(lt).load(No)}create(e,n=!1){return new _f(e,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Eb=(()=>{class t{_elementRef=d(Z);_focusTrapFactory=d(yd);focusTrap;_previouslyFocusedElement=null;get enabled(){return this.focusTrap?.enabled||!1}set enabled(e){this.focusTrap&&(this.focusTrap.enabled=e)}autoCapture;constructor(){d($e).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=xo(),this.focusTrap?.focusInitialElementWhenReady()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[2,"cdkTrapFocus","enabled",$],autoCapture:[2,"cdkTrapFocusAutoCapture","autoCapture",$]},exportAs:["cdkTrapFocus"],features:[Ne]})}return t})(),YI=new L("liveAnnouncerElement",{providedIn:"root",factory:qI});function qI(){return null}var QI=new L("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),SJ=0,lu=(()=>{class t{_ngZone=d(ce);_defaultOptions=d(QI,{optional:!0});_liveElement;_document=d(De);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d(YI,{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($e);_hasCheckedHighContrastMode;_document=d(De);_breakpointSubscription;constructor(){this._breakpointSubscription=d(Dl).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return lc.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 lc.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return lc.BLACK_ON_WHITE}return lc.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(kb,$I,GI),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===lc.BLACK_ON_WHITE?e.add(kb,$I):n===lc.WHITE_ON_BLACK&&e.add(kb,GI)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ys=(()=>{class t{constructor(){d(bf)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[vd]})}return t})();var Ib={},Ge=(()=>{class t{_appId=d(Xs);getId(e){return this._appId!=="ng"&&(e+=this._appId),Ib.hasOwnProperty(e)||(Ib[e]=0),`${e}${Ib[e]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var kJ=200,Cd=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:kJ;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(It(e=>this._pressedLetters.push(e)),$o(i),Oe(()=>this._pressedLetters.length>0),le(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let n=1;nt[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var xd=class{_items;_activeItemIndex=ke(-1);_activeItem=ke(null);_wrap=!1;_typeaheadSubscription=Ee.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 zn?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):ya(i)&&(this._effectRef=Ea(()=>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 Cd(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 Sl=class extends xd{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}};var ea=class extends xd{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};function kl(t){return hi(t)?t:ne(t)}var Ob=class{_activeItemIndex=-1;_activeItem=null;_shouldActivationFollowFocus=!1;_horizontalOrientation="ltr";_skipPredicateFn=i=>!1;_trackByFn=i=>i;_items=[];_typeahead;_typeaheadSubscription=Ee.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()})):hi(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 Cd(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()?kl(this._activeItem.getChildren()).pipe(Ve(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=kl(i.getChildren()):e=ne(this._items.filter(n=>n.getParent()===null)),e.pipe(Ve(1)).subscribe(n=>{for(let o of n)o.expand()})}_activateCurrentItem(){this._activeItem?.activate()}};function EJ(){return(t,i)=>new Ob(t,i)}var ZI=new L("tree-key-manager",{providedIn:"root",factory:EJ});var eO=" ";function Md(t,i,e){let n=xf(t,i);e=e.trim(),!n.some(o=>o.trim()===e)&&(n.push(e),t.setAttribute(i,n.join(eO)))}function uc(t,i,e){let n=xf(t,i);e=e.trim();let o=n.filter(r=>r!==e);o.length?t.setAttribute(i,o.join(eO)):t.removeAttribute(i)}function xf(t,i){return t.getAttribute(i)?.match(/\S+/g)??[]}var tO="cdk-describedby-message",Cf="cdk-describedby-host",Pb=0,wd=(()=>{class t{_platform=d($e);_document=d(De);_messageRegistry=new Map;_messagesContainer=null;_id=`${Pb++}`;constructor(){d(lt).load(No),this._id=d(Xs)+"-"+Pb++}describe(e,n,o){if(!this._canBeDescribed(e,n))return;let r=Tb(n,o);typeof n!="string"?(JI(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=Tb(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(`[${Cf}="${this._id}"]`);for(let n=0;no.indexOf(tO)!=0);e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){let o=this._messageRegistry.get(n);Md(e,"aria-describedby",o.messageElement.id),e.setAttribute(Cf,this._id),o.referenceCount++}_removeMessageReference(e,n){let o=this._messageRegistry.get(n);o.referenceCount--,uc(e,"aria-describedby",o.messageElement.id),e.removeAttribute(Cf)}_isElementDescribedByMessage(e,n){let o=xf(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=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Tb(t,i){return typeof t=="string"?`${i||""}/${t}`:t}function JI(t,i){t.id||(t.id=`${tO}-${i}-${Pb++}`)}var IJ=["mat-internal-form-field",""],OJ=["*"],Dd=(()=>{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&&ie("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:IJ,ngContentSelectors:OJ,decls:1,vars:0,template:function(n,o){n&1&&(Se(),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 nO=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})(),Mf={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 TJ=new L("MATERIAL_ANIMATIONS");var iO=null;function mu(){return d(TJ,{optional:!0})?.animationsDisabled||d(p0,{optional:!0})==="NoopAnimations"?"di-disabled":(iO??=d(gf).matchMedia("(prefers-reduced-motion)").matches,iO?"reduced-motion":"enabled")}function We(){return mu()!=="enabled"}var pn=(()=>{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}} diff --git a/browser/collaterals.module-CROVTBES.js b/browser/collaterals.module-F5CJKWNO.js similarity index 99% rename from browser/collaterals.module-CROVTBES.js rename to browser/collaterals.module-F5CJKWNO.js index 53a0a3e9d..9954fd394 100644 --- a/browser/collaterals.module-CROVTBES.js +++ b/browser/collaterals.module-F5CJKWNO.js @@ -1 +1 @@ -import{$c as at,$d as ht,Af as wt,Cc as Y,Da as _,Dd as st,Ea as x,Eb as v,Ed as ct,G as y,Ga as J,H as S,Ia as E,Id as dt,Ja as K,K as d,Kd as ut,L as G,Lc as F,M as U,Nb as W,Qb as X,Rg as Tt,Tc as Z,Ua as o,Ud as Ct,Va as c,Wa as h,Xa as b,Xd as ft,Yc as tt,Zc as et,_c as it,ca as i,de as bt,eb as R,ed as nt,eg as Et,gc as P,hb as r,hd as lt,hg as Rt,ib as m,ja as I,jc as T,ka as w,kc as B,kd as ot,mc as j,na as f,nd as rt,nf as vt,of as gt,pf as _t,qc as O,ra as Q,rd as mt,rf as xt,sa as z,sf as Dt,td as V,ud as L,uf as Mt,vf as yt,vg as Pt,wa as C,xa as l,xd as N,xf as St,ya as n,yf as It,za as u,zd as pt}from"./chunk-MPQURN5W.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{$c as at,$d as ht,Af as wt,Cc as Y,Da as _,Dd as st,Ea as x,Eb as v,Ed as ct,G as y,Ga as J,H as S,Ia as E,Id as dt,Ja as K,K as d,Kd as ut,L as G,Lc as F,M as U,Nb as W,Qb as X,Rg as Tt,Tc as Z,Ua as o,Ud as Ct,Va as c,Wa as h,Xa as b,Xd as ft,Yc as tt,Zc as et,_c as it,ca as i,de as bt,eb as R,ed as nt,eg as Et,gc as P,hb as r,hd as lt,hg as Rt,ib as m,ja as I,jc as T,ka as w,kc as B,kd as ot,mc as j,na as f,nd as rt,nf as vt,of as gt,pf as _t,qc as O,ra as Q,rd as mt,rf as xt,sa as z,sf as Dt,td as V,ud as L,uf as Mt,vf as yt,vg as Pt,wa as C,xa as l,xd as N,xf as St,ya as n,yf as It,za as u,zd as pt}from"./chunk-YFBSP33D.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-V2B6ZSI2.js b/browser/fixed-deposits.module-J2CODHEZ.js similarity index 99% rename from browser/fixed-deposits.module-V2B6ZSI2.js rename to browser/fixed-deposits.module-J2CODHEZ.js index 1b6628291..f8ad95799 100644 --- a/browser/fixed-deposits.module-V2B6ZSI2.js +++ b/browser/fixed-deposits.module-J2CODHEZ.js @@ -1,2 +1,2 @@ -import{a as sn}from"./chunk-T23EOHOO.js";import{a as yi,b as Ii}from"./chunk-H57SRJU3.js";import{a as cn}from"./chunk-6VWRXOOR.js";import{$b as oe,$c as pt,$d as ut,Ac as Xt,Ad as Li,Ae as Re,Af as Ht,Bc as Be,Bg as on,Cc as Ut,Cd as Gi,Da as b,Db as se,Dc as Zt,Dd as nt,Df as ve,Ea as P,Eb as y,Ec as te,Ed as Ct,Fc as ee,G as Gt,Ga as F,Gc as ie,Gg as an,H as He,Hd as Pt,Ia as M,Id as ot,If as Ki,Ig as rn,Ja as _,Jd as Ft,Jf as Qi,K as x,Kd as dt,Kf as Yi,L as S,Lc as w,Ld as At,M as A,Na as ht,Nb as le,Nd as Ot,Oa as vt,Pa as Dt,Pd as me,Qa as k,Qb as Ni,Qd as Mt,Qg as ei,Rd as Tt,Rg as pn,Sc as et,Sd as St,T as Jt,Tc as U,Td as Ue,Ua as a,Ud as yt,Va as m,Wa as u,Wd as It,We as Ui,Xa as T,Xd as de,Ya as ce,Yb as Ie,Yc as rt,Zb as Fe,Zc as V,_ as Ri,_c as it,_f as Ji,ac as ae,bb as _t,bc as we,ca as i,cd as Z,ce as he,da as $e,de as ke,df as ji,dg as Xi,eb as R,ed as ct,ef as Wi,eg as ue,fb as Ge,fd as jt,fg as Zi,gc as N,gd as zi,gg as tn,hb as r,hc as Vi,hd as st,hf as Ye,hg as en,ib as c,if as Je,ja as O,jb as E,jc as W,jf as Xe,ka as Le,kc as tt,kd as lt,ke as je,kf as Ze,lb as at,lc as qi,le as We,lf as ne,lg as $t,mc as Oi,me as Ke,mf as Wt,na as C,nd as gt,nf as wt,of as Et,pa as Te,pc as Ee,pf as Bt,qb as Se,qc as B,ra as h,rd as mt,re as Qe,rf as kt,sa as v,sb as Ae,sf as Rt,ta as $,tb as Oe,td as I,ua as L,ud as Y,uf as Nt,va as G,vd as Hi,vf as Vt,vg as nn,wa as d,wd as $i,xa as n,xd as xt,xf as qt,xg as ti,ya as o,yf as zt,yg as Ne,za as g,zb as ye,zd as bt}from"./chunk-MPQURN5W.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-TBVTO44T.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-V57SPJXE.js";import{a as yi,b as Ii}from"./chunk-HSO7PUER.js";import{a as cn}from"./chunk-M2LEJORY.js";import{$b as oe,$c as pt,$d as ut,Ac as Xt,Ad as Li,Ae as Re,Af as Ht,Bc as Be,Bg as on,Cc as Ut,Cd as Gi,Da as b,Db as se,Dc as Zt,Dd as nt,Df as ve,Ea as P,Eb as y,Ec as te,Ed as Ct,Fc as ee,G as Gt,Ga as F,Gc as ie,Gg as an,H as He,Hd as Pt,Ia as M,Id as ot,If as Ki,Ig as rn,Ja as _,Jd as Ft,Jf as Qi,K as x,Kd as dt,Kf as Yi,L as S,Lc as w,Ld as At,M as A,Na as ht,Nb as le,Nd as Ot,Oa as vt,Pa as Dt,Pd as me,Qa as k,Qb as Ni,Qd as Mt,Qg as ei,Rd as Tt,Rg as pn,Sc as et,Sd as St,T as Jt,Tc as U,Td as Ue,Ua as a,Ud as yt,Va as m,Wa as u,Wd as It,We as Ui,Xa as T,Xd as de,Ya as ce,Yb as Ie,Yc as rt,Zb as Fe,Zc as V,_ as Ri,_c as it,_f as Ji,ac as ae,bb as _t,bc as we,ca as i,cd as Z,ce as he,da as $e,de as ke,df as ji,dg as Xi,eb as R,ed as ct,ef as Wi,eg as ue,fb as Ge,fd as jt,fg as Zi,gc as N,gd as zi,gg as tn,hb as r,hc as Vi,hd as st,hf as Ye,hg as en,ib as c,if as Je,ja as O,jb as E,jc as W,jf as Xe,ka as Le,kc as tt,kd as lt,ke as je,kf as Ze,lb as at,lc as qi,le as We,lf as ne,lg as $t,mc as Oi,me as Ke,mf as Wt,na as C,nd as gt,nf as wt,of as Et,pa as Te,pc as Ee,pf as Bt,qb as Se,qc as B,ra as h,rd as mt,re as Qe,rf as kt,sa as v,sb as Ae,sf as Rt,ta as $,tb as Oe,td as I,ua as L,ud as Y,uf as Nt,va as G,vd as Hi,vf as Vt,vg as nn,wa as d,wd as $i,xa as n,xd as xt,xf as qt,xg as ti,ya as o,yf as zt,yg as Ne,za as g,zb as ye,zd as bt}from"./chunk-YFBSP33D.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-I2AUZ5I3.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 0c44d689a..41793bfb6 100644 --- a/browser/index.html +++ b/browser/index.html @@ -109,5 +109,5 @@
- + diff --git a/browser/loans.module-W4P4LL7U.js b/browser/loans.module-MKUMWPPG.js similarity index 99% rename from browser/loans.module-W4P4LL7U.js rename to browser/loans.module-MKUMWPPG.js index e66b9158a..cbc181e35 100644 --- a/browser/loans.module-W4P4LL7U.js +++ b/browser/loans.module-MKUMWPPG.js @@ -1,4 +1,4 @@ -import{a as y1}from"./chunk-2TCTDLYI.js";import{a as t1,b as Op,c as Gr,d as Wr,e as Ip,f as Lp}from"./chunk-DQ5ARSNI.js";import{a as Ep,b as md,c as S1,d as D1}from"./chunk-GO3DT7AZ.js";import{a as x1}from"./chunk-6VWRXOOR.js";import{$ as hp,$a as tc,$c as Ee,$d as un,$f as p1,Aa as ee,Ac as Vo,Ad as Qf,Ae as $o,Af as Mn,Ba as te,Bc as Uo,Bg as g1,C as kf,Cb as zf,Cc as Gn,Cg as _1,Da as X,Db as Sa,Dc as Xl,Dd as ge,Df as Li,Ea as Q,Eb as wt,Ec as Ur,Ed as Ue,Fc as Ho,G as rn,Ga as Ct,Gc as Go,Gg as C1,H as up,Hd as Je,Ia as it,Id as _e,If as o1,Ig as b1,Ja as T,Jd as Wn,Je as i1,Jf as r1,K as A,Kc as pa,Kd as Te,Ke as a1,Kf as l1,L as lt,Lc as Tt,Ld as In,M as st,Mc as Hf,Na as mi,Nc as Gf,Nd as En,Oa as di,Pa as ui,Pc as Ql,Pd as Oi,Pg as Mp,Qa as Lt,Qd as Qe,Qg as Bi,R as fp,Rd as tn,Rg as v1,Sc as me,Sd as en,T as Vr,Tc as oe,Td as Da,Ua as c,Ud as gn,Va as b,Vb as Jl,Vc as Wf,Wa as v,Wd as wa,We as Do,Xa as $t,Xd as Ae,Y as Nf,Ya as cd,Yc as we,Yf as s1,Za as Zl,Zc as Wt,Zf as c1,_ as sd,_a as Qs,_c as he,_f as Va,ab as ec,b as Af,bb as ce,be as e1,c as Mf,ca as o,cb as Rf,cd as pe,ce as _i,cg as m1,da as Kl,dd as $f,de as ra,df as ja,dg as Tp,e as Of,eb as Ut,ed as Ne,ee as n1,ef as wo,eg as fn,fb as ka,fd as Mi,ff as yp,fg as Ap,gc as Et,gd as Wo,ge as _p,gg as Hr,ha as Ff,hb as p,hc as Vf,hd as Le,hf as ts,hg as d1,i as ld,ib as m,if as es,ig as as,ja as Dt,jb as Re,jc as le,jf as ns,k as If,ka as gp,kb as Bf,kc as ae,kd as ke,ke as Cp,kf as is,kg as At,lb as Ye,lc as Uf,ld as Yf,le as bp,lf as mo,mc as pd,md as Kf,me as vp,mf as za,mg as u1,n as Ef,na as N,nd as ze,nf as vn,of as xn,pa as oa,pc as qa,pf as yn,qb as ca,qc as Gt,qf as Sp,ra as M,rd as Pe,re as xp,rf as Sn,s as Lf,sa as O,sb as qf,sd as Zf,sf as Dn,ta as Ce,td as Pt,tf as Dp,tg as f1,ua as de,ud as xe,uf as wn,va as ue,vd as Jf,ve as ma,vf as Pn,vg as h1,wa as x,wd as Xf,wf as wp,xa as s,xb as jf,xd as Oe,xf as Tn,xg as la,ya as l,yf as An,yg as Pi,za as P,zd as Ve,zf as Pp,zg as nc}from"./chunk-MPQURN5W.js";import{a as ie,b as ve,d as Tf}from"./chunk-PHUH23IY.js";var kp=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:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{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 __=()=>["./general"],C_=()=>["./accountdetail"],b_=()=>["./repayment-schedule"],v_=()=>["./loan-documents"],x_=()=>["./original-schedule"],y_=()=>["./transactions"],S_=()=>["./deferred-income"],D_=()=>["./buy-down-fees"],w_=()=>["./delinquencytags"],P_=()=>["./loan-collateral"],T_=()=>["./loan-tranche-details"],A_=()=>["./term-variations"],M_=()=>["./overdue-charges"],O_=()=>["./floating-interest-rates"],I_=()=>["./charges"],E_=()=>["./loan-reschedules"],L_=()=>["./notes"],k_=()=>["./standing-instruction"],N_=()=>["./external-asset-owner"],F_=t=>["./datatables",t];function R_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",48),P(6,"i",49),l(),c(7),l()()),t&2){let e=T(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 B_(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=T(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 q_(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=T(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 j_(t,n){if(t&1&&(s(0,"div")(1,"table",47)(2,"tbody"),M(3,R_,8,5,"tr"),M(4,B_,7,6,"tr"),M(5,q_,7,6,"tr"),l()()()),t&2){let e=T();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 z_(t,n){if(t&1&&(s(0,"td",50),c(1),p(2,"currency"),l()),t&2){let e=T(3);o(),v(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function V_(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 U_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,z_,3,6,"td",50),M(5,V_,3,3,"td"),l()),t&2){let e=T(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 H_(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=T(2);o(2),b(m(3,2,"labels.inputs.Arrears Since")),o(3),b(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function G_(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=T(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 W_(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,U_,6,5,"tr"),M(14,H_,7,6,"tr"),M(15,G_,7,9,"tr"),l()()()),t&2){let e=T();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 $_(t,n){if(t&1&&(s(0,"button",41)(1,"mat-icon",51),P(2,"fa-icon",52),l()()),t&2){T();let e=Lt(35);x("matMenuTriggerFor",e)}}function Y_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.loanAction(a.name))}),s(1,"mat-icon",55),P(2,"fa-icon",56),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=T().$implicit;o(2),x("icon",ce(e.icon)),o(2),b(m(5,3,"labels.menus."+e.name))}}function K_(t,n){if(t&1&&N(0,Y_,6,5,"button",53),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function Z_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function J_(t,n){if(t&1&&(s(0,"span"),N(1,Z_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function X_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,6),de(6,J_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=T();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.Payments")),o(4),ue(i.buttonConfig.optionsPayment)}}function Q_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function tC(t,n){if(t&1&&(s(0,"span"),N(1,Q_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function eC(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,7),de(6,tC,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=T();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.More")),o(4),ue(i.buttonConfig.options)}}function nC(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,x_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function iC(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,y_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Transactions")," ")}}function aC(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,S_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function oC(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,D_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function rC(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,w_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function lC(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,P_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function sC(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,T_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function cC(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,A_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function pC(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,M_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function mC(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,O_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function dC(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,I_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Charges")," ")}}function uC(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,E_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function fC(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,L_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function hC(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,k_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function gC(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,N_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function _C(t,n){if(t&1&&(s(0,"a",45,23),c(2),l()),t&2){let e=Lt(1),i=T().$implicit;x("routerLink",ka(3,F_,i.registeredTableName))("active",e.isActive),o(2),v(" ",i.registeredTableName," ")}}function CC(t,n){if(t&1&&N(0,_C,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(At),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 kp(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"),P(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"),P(12,"i",32),p(13,"translate"),p(14,"statusLookup"),s(15,"span",33),c(16),p(17,"translate"),l(),s(18,"span",33),P(19,"mifosx-long-text",34),l(),P(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(),P(29,"br"),l(),M(30,j_,6,3,"div"),l(),M(31,W_,16,15,"div",39),s(32,"div",40),M(33,$_,3,1,"button",41),l()()()(),s(34,"mat-menu",null,0),de(36,K_,1,1,"button",42,Ce),M(38,X_,8,4,"ng-container",43),M(39,eC,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,nC,4,6,"a",45),s(51,"a",45,3),c(53),p(54,"translate"),l(),M(55,iC,4,6,"a",45),M(56,aC,4,6,"a",45),M(57,oC,4,6,"a",45),M(58,rC,4,6,"a",45),M(59,lC,4,6,"a",45),M(60,sC,4,6,"a",45),M(61,cC,4,6,"a",45),M(62,pC,4,6,"a",45),M(63,mC,4,6,"a",45),M(64,dC,4,6,"a",45),M(65,uC,4,6,"a",45),s(66,"a",45,4),c(68),p(69,"translate"),l(),N(70,fC,4,6,"a",46),M(71,hC,4,6,"a",45),M(72,gC,4,6,"a",45),de(73,CC,1,1,"a",45,Ce),l(),s(75,"mat-tab-nav-panel",null,5),P(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),ue(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,__))("active",r.isActive),o(2),v(" ",m(45,59,"labels.inputs.General")," "),o(2),x("routerLink",Ut(68,C_))("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,b_))("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,v_))("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(),ue(a.loanDatatables)}},dependencies:[wt,ca,Pt,ae,xe,Oe,Ae,Qf,Xf,_1,Oi,Jf,Mp,C1,qa,vp,xp,un,bp,Cp,o1,r1,Uf,l1,Vf,Sa,gn,Tt,Ap,fn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function bC(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=T();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 vC(t,n){t&1&&P(0,"th",21)}function xC(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.property))}}function yC(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 SC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function DC(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 wC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.paid,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(),v(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function TC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function AC(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 MC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function OC(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 IC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function EC(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 LC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function kC(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 NC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function FC(t,n){t&1&&P(0,"tr",27)}function RC(t,n){t&1&&P(0,"tr",28)}function BC(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),N(6,vC,1,0,"th",6)(7,xC,3,3,"td",7),Q(),X(8,8),N(9,yC,3,3,"th",9)(10,SC,3,6,"td",10),Q(),X(11,11),N(12,DC,3,3,"th",9)(13,wC,3,6,"td",12),Q(),X(14,13),N(15,PC,3,3,"th",9)(16,TC,3,6,"td",14),Q(),X(17,15),N(18,AC,3,3,"th",9)(19,MC,3,6,"td",12),Q(),X(20,16),N(21,OC,3,3,"th",9)(22,IC,3,6,"td",12),Q(),X(23,17),N(24,EC,3,3,"th",9)(25,LC,3,6,"td",10),Q(),X(26,18),N(27,kC,3,3,"th",9)(28,NC,3,6,"td",10),Q(),N(29,FC,1,0,"tr",19)(30,RC,1,0,"tr",20),l()()),t&2){let e=T();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 qC(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 jC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function zC(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 VC(t,n){if(t&1&&(M(0,jC,3,3,"span"),M(1,zC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function UC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function HC(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 GC(t,n){if(t&1&&(M(0,UC,2,1,"span"),M(1,HC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function WC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function $C(t,n){t&1&&P(0,"span")}function YC(t,n){if(t&1&&(s(0,"span"),c(1),M(2,$C,1,0,"span"),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function KC(t,n){if(t&1&&(M(0,WC,3,3,"span"),M(1,YC,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function ZC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function JC(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function XC(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 QC(t,n){if(t&1&&(M(0,JC,2,2,"span"),M(1,XC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function tb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2).$implicit;o(),b(e.value)}}function eb(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 nb(t,n){if(t&1&&(M(0,tb,2,1,"span"),M(1,eb,3,3,"span")),t&2){let e=T().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function ib(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;v(" ",e.value," ")}}function ab(t,n){if(t&1&&(s(0,"td",22),M(1,VC,2,2),M(2,GC,2,2),M(3,KC,2,2),M(4,ZC,2,2,"span"),M(5,QC,2,2),M(6,nb,2,2),M(7,ib,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 ob(t,n){t&1&&P(0,"tr",28)}function rb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),N(6,qC,3,3,"td",7),Q(),X(7,30),N(8,ab,8,7,"td",7),Q(),N(9,ob,1,0,"tr",20),l()()),t&2){let e=T();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function lb(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 sb(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function cb(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 pb(t,n){if(t&1&&(M(0,sb,3,3,"span"),M(1,cb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function mb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function db(t,n){t&1&&P(0,"span")}function ub(t,n){if(t&1&&(s(0,"span"),c(1),M(2,db,1,0,"span"),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function fb(t,n){if(t&1&&(M(0,mb,3,3,"span"),M(1,ub,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function hb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function gb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function _b(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 Cb(t,n){if(t&1&&(M(0,gb,2,2,"span"),M(1,_b,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function bb(t,n){if(t&1&&(s(0,"td",22),M(1,pb,2,2),M(2,fb,2,2),M(3,hb,2,2,"span"),M(4,Cb,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 vb(t,n){t&1&&P(0,"tr",28)}function xb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),N(6,lb,3,3,"td",7),Q(),X(7,30),N(8,bb,5,4,"td",7),Q(),N(9,vb,1,0,"tr",20),l()()),t&2){let e=T();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function yb(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=T(2);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function Sb(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 Db(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=T(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 wb(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=T(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 Pb(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=T(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 Tb(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,yb,2,1,"span",35),M(11,Sb,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,Db,7,9,"div",34),M(20,wb,7,9,"div",34),M(21,Pb,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=T();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 Fp=(()=>{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,bC,21,15),M(2,BC,31,6,"div"),M(3,rb,10,5,"div"),M(4,xb,10,5,"div"),M(5,Tb,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Va,Sa,gn,Tt,fn],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 Ab(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=T(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(Re(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Mb(t,n){if(t&1&&(ee(0,"span",4),M(1,Ab,8,8,"span"),te()),t&2){let e=T();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}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=T();o(2),v(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Re(6,5,e.loanDetails.repaymentFrequencyType.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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),v(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}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=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function kb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Nb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function Bb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),v(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function qb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=T();o(),v(" ",e.loanDetails.fundName," ")}}function jb(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 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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),v(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}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),p(6,"yesNo"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),v(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Ub(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=T();o(2),v(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),b(e.loanDetails.closureLoanAccountNo)}}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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),v(" ",m(6,4,e.loanDetails.topupAmount)," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),v(" ",Re(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}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=T();o(2),v(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),v(" ",Re(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function $b(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=T();o(2),v(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),v(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function Yb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),v(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function Kb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),v(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}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,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=T();o(2),v(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Zl(" ",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 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,"formatNumber"),te()()),t&2){let e=T();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 Rp=(()=>{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:206,vars:191,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,"translate"),p(19,"translateKey"),M(20,Mb,2,1,"span",4),te()(),M(21,Ob,7,8,"div",2),ee(22,"div",2)(23,"span",3),c(24),p(25,"translate"),te(),ee(26,"span",3),c(27),p(28,"translateKey"),te()(),M(29,Ib,7,6,"div",2),ee(30,"div",2)(31,"span",3),c(32),p(33,"translate"),te(),ee(34,"span",3),c(35),p(36,"yesNo"),te()(),ee(37,"div",2)(38,"span",3),c(39),p(40,"translate"),te(),ee(41,"span",3),c(42),p(43,"formatNumber"),p(44,"translate"),p(45,"translateKey"),te()(),ee(46,"div",2)(47,"span",3),c(48),p(49,"translate"),te(),ee(50,"span",3),c(51),p(52,"translate"),te()(),ee(53,"div",2)(54,"span",3),c(55),p(56,"translate"),te(),ee(57,"span",3),c(58),p(59,"yesNo"),te()(),ee(60,"div",2)(61,"span",3),c(62),p(63,"translate"),te(),ee(64,"span",3),c(65),p(66,"translateKey"),te()(),ee(67,"div",2)(68,"span",3),c(69),p(70,"translate"),te(),ee(71,"span",3),c(72),p(73,"yesNo"),te()(),M(74,Eb,7,7,"div",2),M(75,Lb,7,7,"div",2),M(76,kb,7,7,"div",2),ee(77,"div",2)(78,"span",3),c(79),p(80,"translate"),te(),ee(81,"span",3),c(82),p(83,"yesNo"),te()(),M(84,Nb,7,7,"div",2),M(85,Fb,7,7,"div",2),M(86,Rb,7,7,"div",2),M(87,Bb,7,6,"div",2),ee(88,"div",2)(89,"span",3),c(90),p(91,"translate"),te(),ee(92,"span",3),c(93),te()(),ee(94,"div",2)(95,"span",3),c(96),p(97,"translate"),te(),ee(98,"span",3),c(99),te()(),ee(100,"div",2)(101,"span",3),c(102),p(103,"translate"),te(),ee(104,"span",3),c(105),te()(),ee(106,"div",2)(107,"span",3),c(108),p(109,"translate"),te(),ee(110,"span",3),c(111),p(112,"yesNo"),te()(),ee(113,"div",2)(114,"span",3),c(115),p(116,"translate"),te(),M(117,qb,2,1,"span",3),M(118,jb,3,3,"span",3),te(),ee(119,"div",2)(120,"span",3),c(121),p(122,"translate"),te(),ee(123,"span",3),c(124),te()(),ee(125,"div",2)(126,"span",3),c(127),p(128,"translate"),te(),ee(129,"span",3),c(130),p(131,"translateKey"),te()(),ee(132,"div",2)(133,"span",3),c(134),p(135,"translate"),te(),ee(136,"span",3),c(137),p(138,"yesNo"),te()(),ee(139,"div",2)(140,"span",3),c(141),p(142,"translate"),te(),ee(143,"span",3),c(144),p(145,"yesNo"),te()(),ee(146,"div",2)(147,"span",3),c(148),p(149,"translate"),te(),ee(150,"span",3),c(151),p(152,"dateFormat"),te()(),ee(153,"div",2)(154,"span",3),c(155),p(156,"translate"),te(),ee(157,"span",3),c(158),p(159,"dateFormat"),te()(),ee(160,"div",2)(161,"span",3),c(162),p(163,"translate"),te(),ee(164,"span",3),c(165),p(166,"dateFormat"),te()(),ee(167,"div",2)(168,"span",3),c(169),p(170,"translate"),te(),ee(171,"span",3),c(172),p(173,"dateFormat"),te()(),M(174,zb,7,6,"div",2),M(175,Vb,7,6,"div",2),M(176,Ub,7,4,"div",2),M(177,Hb,7,6,"div",2),ee(178,"div",2)(179,"span",3),c(180),p(181,"translate"),te(),ee(182,"span",3),c(183),p(184,"yesNo"),te()(),ee(185,"div",2)(186,"span",3),c(187),p(188,"translate"),te(),ee(189,"span",3),c(190),p(191,"translateKey"),te()(),ee(192,"div",2)(193,"span",3),c(194),p(195,"translate"),te(),ee(196,"span",3),c(197),p(198,"translateKey"),te()(),M(199,Gb,7,7,"div",2),M(200,Wb,7,7,"div",2),M(201,$b,6,4,"div",2),M(202,Yb,6,4,"div",2),M(203,Kb,7,6,"div",2),M(204,Zb,10,15,"div",2),M(205,Jb,7,6,"div",2),te()()),i&2&&(o(2),b(m(3,81,"labels.heading.Loan Details")),o(5),b(m(8,83,"labels.inputs.Repayment Strategy")),o(3),b(Re(11,85,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),b(m(15,88,"labels.inputs.Repayments")),o(3),Zl("",a.loanDetails.numberOfRepayments," ",m(18,90,"labels.commons.every")," ",a.loanDetails.repaymentEvery,"\xA0",Re(19,92,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(3),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?20:-1),o(),O(a.loanDetails.fixedLength?21:-1),o(3),v(" ",m(25,95,"labels.inputs.Amortization")," "),o(3),v(" ",Re(28,97,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?29:-1),o(3),v(" ",m(33,100,"labels.inputs.Equal Amortization")," "),o(3),v(" ",m(36,102,a.loanDetails.isEqualAmortization)," "),o(4),v(" ",m(40,104,"labels.inputs.Interest")," "),o(3),Zl(" ",m(43,106,a.loanDetails.annualInterestRate)," % ",m(44,108,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Re(45,110,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),v(" ",m(49,113,"labels.inputs.Interest Type")," "),o(3),v(" ",m(52,115,"labels.text."+a.loanDetails.interestType.value)," "),o(4),v("",m(56,117,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(59,119,a.loanDetails.enableDownPayment)),o(4),v("",m(63,121,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),b(Re(66,123,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),v(" ",m(70,126,"labels.inputs.Enable income capitalization")),o(3),v(" ",m(73,128,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(),O(a.loanDetails.enableIncomeCapitalization?76:-1),o(3),v(" ",m(80,130,"labels.inputs.Enable Buy down fee")),o(3),v(" ",m(83,132,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(),O(a.loanDetails.enableBuyDownFee?87:-1),o(3),v(" ",m(91,134,"labels.inputs.Grace: On Principal Payment")),o(3),v(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),v(" ",m(97,136,"labels.inputs.Grace: On Interest Payment")),o(3),v(" ",a.loanDetails.graceOnInterestPayment," "),o(3),v(" ",m(103,138,"labels.inputs.Grace on Arrears Ageing")),o(3),v(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),v(" ",m(109,140,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(112,142,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),v(" ",m(116,144,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?117:-1),o(),O(a.loanDetails.fundName?-1:118),o(3),v(" ",m(122,146,"labels.inputs.Interest Free Period")),o(3),v(" ",a.loanDetails.graceOnInterestCharged," "),o(3),v(" ",m(128,148,"labels.inputs.Interest Calculation Period")),o(3),v(" ",Re(131,150,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),v(" ",m(135,153,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),v(" ",m(138,155,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),v("",m(142,157,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),b(m(145,159,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),v(" ",m(149,161,"labels.inputs.Submitted on")),o(3),v(" ",m(152,163,a.loanDetails.timeline.submittedOnDate)," "),o(4),v(" ",m(156,165,"labels.inputs.Approved on")),o(3),v(" ",m(159,167,a.loanDetails.timeline.approvedOnDate)," "),o(4),v(" ",m(163,169,"labels.inputs.Disbursed on")),o(3),v(" ",m(166,171,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),v(" ",m(170,173,"labels.inputs.Matures on")),o(3),v(" ",m(173,175,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(),O(a.loanDetails.isTopup?177:-1),o(3),v(" ",m(181,177,"labels.inputs.Recalculate Interest based on new terms")),o(3),v(" ",m(184,179,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),v(" ",m(188,181,"labels.inputs.Days in year")),o(3),v(" ",Re(191,183,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),v(" ",m(195,186,"labels.inputs.Days in month")),o(3),v(" ",Re(198,188,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?201:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?204:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?205:-1))},dependencies:[wt,Pt,gn,Tt,wa,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Bp=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),this.authenticationService=A(Wf);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&&P(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,Pt,u1],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 Po=Uint8Array,Qa=Uint16Array,gd=Int32Array,_d=new Po([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]),Cd=new Po([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]),w1=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M1=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,fd[ri]=((br&65280)>>8|(br&255)<<8)>>1;var br,ri,oc=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},Sl=new Po(288);for(ri=0;ri<144;++ri)Sl[ri]=8;var ri;for(ri=144;ri<256;++ri)Sl[ri]=9;var ri;for(ri=256;ri<280;++ri)Sl[ri]=7;var ri;for(ri=280;ri<288;++ri)Sl[ri]=8;var ri,qp=new Po(32);for(ri=0;ri<32;++ri)qp[ri]=5;var ri,Qb=oc(Sl,9,0);var tv=oc(qp,5,0);var E1=function(t){return(t+7)/8|0},ev=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new Po(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},ic=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},dd=function(t,n){for(var e=[],i=0;ik&&(k=r[i].s);var D=new Qa(k+1),U=hd(e[y-1],D,0);if(U>n){var i=0,H=0,Z=U-n,z=1<n)H+=z-(1<>=Z;H>0;){var dt=r[i].s;D[dt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new Po(D),l:U}},hd=function(t,n,e){return t.s==-1?Math.max(hd(t.l,n,e+1),hd(t.r,n,e+1)):n[t.s]=e},T1=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}},ac=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&&!xt[w1[Y-1]];--Y);var rt=_+5<<3,ot=ac(a,Sl)+ac(r,qp)+u,Mt=ac(a,k)+ac(r,H)+u+14+3*Y+ac(jt,xt)+2*jt[16]+3*jt[17]+7*jt[18];if(g>=0&&rt<=ot&&rt<=Mt)return L1(n,y,t.subarray(g,g+_));var Nt,Rt,St,qt;if(vr(n,y,1+(Mt15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else Nt=Qb,Rt=Sl,St=tv,qt=qp;for(var ht=0;ht255){var et=ct>>18&31;ic(n,y,Nt[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,ct>>23&31),y+=_d[et]);var ft=ct&31;ic(n,y,St[ft]),y+=qt[ft],ft>3&&(ic(n,y,ct>>5&8191),y+=Cd[ft])}else ic(n,y,Nt[ct]),y+=Rt[ct]}return ic(n,y,Nt[256]),y+Rt[256]},nv=new gd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),k1=new Po(0),iv=function(t,n,e,i,a,r){var u=r.z||t.length,d=new Po(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=nv[n-1],k=I>>13,D=I&8191,U=(1<7e3||xt>24576)&&(Nt>423||!_)){y=A1(t,g,0,nt,Ot,Yt,ht,xt,Y,tt-Y,y),xt=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-Mt&32767;if(Nt>2&&rt==dt(tt-Jt))for(var B=Math.min(k,Nt)-1,J=Math.min(32767,tt),et=Math.min(258,Nt);Jt<=J&&--se&&ot!=Mt;){if(t[tt+St]==t[tt+St-Jt]){for(var ct=0;ctSt){if(St=ct,qt=Jt,ct>B)break;for(var ft=Math.min(Jt,ct-2),bt=0,Rt=0;Rtbt&&(bt=Ht,Mt=It)}}}ot=Mt,Mt=H[ot],Jt+=ot-Mt&32767}if(qt){nt[xt++]=268435456|ud[St]<<18|P1[qt];var re=ud[St]&31,Me=P1[qt]&31;ht+=_d[re]+Cd[Me],++Ot[257+re],++Yt[Me],j=tt+St,++jt}else nt[xt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,j);tt=u&&(g[y/8|0]=_,De=u),y=L1(g,y+1,t.subarray(tt,De))}r.i=u}return ev(d,0,i+E1(y)+a)};var N1=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}}},av=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new Po(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return iv(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 F1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var ov=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=N1();a.p(n.dictionary),F1(t,2,a.d())}};function jp(t,n){n||(n={});var e=N1();e.p(t);var i=av(t,n,n.dictionary?6:2,4);return ov(i,n),F1(i,i.length-4,e.d()),i}var rv=typeof TextDecoder<"u"&&new TextDecoder,lv=0;try{rv.decode(k1,{stream:!0}),lv=1}catch{}function R1(t){if(Array.isArray(t))return t}function B1(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 bd(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e["./general"],C_=()=>["./accountdetail"],b_=()=>["./repayment-schedule"],v_=()=>["./loan-documents"],x_=()=>["./original-schedule"],y_=()=>["./transactions"],S_=()=>["./deferred-income"],D_=()=>["./buy-down-fees"],w_=()=>["./delinquencytags"],P_=()=>["./loan-collateral"],T_=()=>["./loan-tranche-details"],A_=()=>["./term-variations"],M_=()=>["./overdue-charges"],O_=()=>["./floating-interest-rates"],I_=()=>["./charges"],E_=()=>["./loan-reschedules"],L_=()=>["./notes"],k_=()=>["./standing-instruction"],N_=()=>["./external-asset-owner"],F_=t=>["./datatables",t];function R_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",48),P(6,"i",49),l(),c(7),l()()),t&2){let e=T(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 B_(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=T(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 q_(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=T(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 j_(t,n){if(t&1&&(s(0,"div")(1,"table",47)(2,"tbody"),M(3,R_,8,5,"tr"),M(4,B_,7,6,"tr"),M(5,q_,7,6,"tr"),l()()()),t&2){let e=T();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 z_(t,n){if(t&1&&(s(0,"td",50),c(1),p(2,"currency"),l()),t&2){let e=T(3);o(),v(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function V_(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 U_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,z_,3,6,"td",50),M(5,V_,3,3,"td"),l()),t&2){let e=T(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 H_(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=T(2);o(2),b(m(3,2,"labels.inputs.Arrears Since")),o(3),b(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function G_(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=T(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 W_(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,U_,6,5,"tr"),M(14,H_,7,6,"tr"),M(15,G_,7,9,"tr"),l()()()),t&2){let e=T();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 $_(t,n){if(t&1&&(s(0,"button",41)(1,"mat-icon",51),P(2,"fa-icon",52),l()()),t&2){T();let e=Lt(35);x("matMenuTriggerFor",e)}}function Y_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.loanAction(a.name))}),s(1,"mat-icon",55),P(2,"fa-icon",56),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=T().$implicit;o(2),x("icon",ce(e.icon)),o(2),b(m(5,3,"labels.menus."+e.name))}}function K_(t,n){if(t&1&&N(0,Y_,6,5,"button",53),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function Z_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function J_(t,n){if(t&1&&(s(0,"span"),N(1,Z_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function X_(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,6),de(6,J_,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=T();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.Payments")),o(4),ue(i.buttonConfig.optionsPayment)}}function Q_(t,n){if(t&1){let e=Ct();s(0,"button",54),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),v(" ",m(2,1,"labels.menus."+e.name)," ")}}function tC(t,n){if(t&1&&(s(0,"span"),N(1,Q_,3,3,"button",53),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function eC(t,n){if(t&1&&(X(0,43),s(1,"button",57),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,7),de(6,tC,2,1,"span",null,Ce),l(),Q()),t&2){let e=Lt(5),i=T();o(),x("matMenuTriggerFor",e),o(),b(m(3,2,"labels.menus.More")),o(4),ue(i.buttonConfig.options)}}function nC(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,x_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function iC(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,y_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Transactions")," ")}}function aC(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,S_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function oC(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,D_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function rC(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,w_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function lC(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,P_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function sC(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,T_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function cC(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,A_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function pC(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,M_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function mC(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,O_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function dC(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,I_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Charges")," ")}}function uC(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,E_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function fC(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,L_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Notes")," ")}}function hC(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,k_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function gC(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,N_))("active",e.isActive),o(2),v(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function _C(t,n){if(t&1&&(s(0,"a",45,23),c(2),l()),t&2){let e=Lt(1),i=T().$implicit;x("routerLink",ka(3,F_,i.registeredTableName))("active",e.isActive),o(2),v(" ",i.registeredTableName," ")}}function CC(t,n){if(t&1&&N(0,_C,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(At),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 kp(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"),P(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"),P(12,"i",32),p(13,"translate"),p(14,"statusLookup"),s(15,"span",33),c(16),p(17,"translate"),l(),s(18,"span",33),P(19,"mifosx-long-text",34),l(),P(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(),P(29,"br"),l(),M(30,j_,6,3,"div"),l(),M(31,W_,16,15,"div",39),s(32,"div",40),M(33,$_,3,1,"button",41),l()()()(),s(34,"mat-menu",null,0),de(36,K_,1,1,"button",42,Ce),M(38,X_,8,4,"ng-container",43),M(39,eC,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,nC,4,6,"a",45),s(51,"a",45,3),c(53),p(54,"translate"),l(),M(55,iC,4,6,"a",45),M(56,aC,4,6,"a",45),M(57,oC,4,6,"a",45),M(58,rC,4,6,"a",45),M(59,lC,4,6,"a",45),M(60,sC,4,6,"a",45),M(61,cC,4,6,"a",45),M(62,pC,4,6,"a",45),M(63,mC,4,6,"a",45),M(64,dC,4,6,"a",45),M(65,uC,4,6,"a",45),s(66,"a",45,4),c(68),p(69,"translate"),l(),N(70,fC,4,6,"a",46),M(71,hC,4,6,"a",45),M(72,gC,4,6,"a",45),de(73,CC,1,1,"a",45,Ce),l(),s(75,"mat-tab-nav-panel",null,5),P(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),ue(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,__))("active",r.isActive),o(2),v(" ",m(45,59,"labels.inputs.General")," "),o(2),x("routerLink",Ut(68,C_))("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,b_))("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,v_))("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(),ue(a.loanDatatables)}},dependencies:[wt,ca,Pt,ae,xe,Oe,Ae,Qf,Xf,_1,Oi,Jf,Mp,C1,qa,vp,xp,un,bp,Cp,o1,r1,Uf,l1,Vf,Sa,gn,Tt,Ap,fn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function bC(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=T();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 vC(t,n){t&1&&P(0,"th",21)}function xC(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.property))}}function yC(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 SC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function DC(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 wC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.paid,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(),v(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function TC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function AC(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 MC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function OC(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 IC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function EC(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 LC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function kC(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 NC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function FC(t,n){t&1&&P(0,"tr",27)}function RC(t,n){t&1&&P(0,"tr",28)}function BC(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),N(6,vC,1,0,"th",6)(7,xC,3,3,"td",7),Q(),X(8,8),N(9,yC,3,3,"th",9)(10,SC,3,6,"td",10),Q(),X(11,11),N(12,DC,3,3,"th",9)(13,wC,3,6,"td",12),Q(),X(14,13),N(15,PC,3,3,"th",9)(16,TC,3,6,"td",14),Q(),X(17,15),N(18,AC,3,3,"th",9)(19,MC,3,6,"td",12),Q(),X(20,16),N(21,OC,3,3,"th",9)(22,IC,3,6,"td",12),Q(),X(23,17),N(24,EC,3,3,"th",9)(25,LC,3,6,"td",10),Q(),X(26,18),N(27,kC,3,3,"th",9)(28,NC,3,6,"td",10),Q(),N(29,FC,1,0,"tr",19)(30,RC,1,0,"tr",20),l()()),t&2){let e=T();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 qC(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 jC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function zC(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 VC(t,n){if(t&1&&(M(0,jC,3,3,"span"),M(1,zC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function UC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function HC(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 GC(t,n){if(t&1&&(M(0,UC,2,1,"span"),M(1,HC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function WC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function $C(t,n){t&1&&P(0,"span")}function YC(t,n){if(t&1&&(s(0,"span"),c(1),M(2,$C,1,0,"span"),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function KC(t,n){if(t&1&&(M(0,WC,3,3,"span"),M(1,YC,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function ZC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function JC(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function XC(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 QC(t,n){if(t&1&&(M(0,JC,2,2,"span"),M(1,XC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function tb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2).$implicit;o(),b(e.value)}}function eb(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 nb(t,n){if(t&1&&(M(0,tb,2,1,"span"),M(1,eb,3,3,"span")),t&2){let e=T().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function ib(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;v(" ",e.value," ")}}function ab(t,n){if(t&1&&(s(0,"td",22),M(1,VC,2,2),M(2,GC,2,2),M(3,KC,2,2),M(4,ZC,2,2,"span"),M(5,QC,2,2),M(6,nb,2,2),M(7,ib,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 ob(t,n){t&1&&P(0,"tr",28)}function rb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),N(6,qC,3,3,"td",7),Q(),X(7,30),N(8,ab,8,7,"td",7),Q(),N(9,ob,1,0,"tr",20),l()()),t&2){let e=T();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function lb(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 sb(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),v(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function cb(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 pb(t,n){if(t&1&&(M(0,sb,3,3,"span"),M(1,cb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function mb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Unassigned")," "))}function db(t,n){t&1&&P(0,"span")}function ub(t,n){if(t&1&&(s(0,"span"),c(1),M(2,db,1,0,"span"),l()),t&2){let e=T(4);o(),v(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function fb(t,n){if(t&1&&(M(0,mb,3,3,"span"),M(1,ub,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function hb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function gb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function _b(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 Cb(t,n){if(t&1&&(M(0,gb,2,2,"span"),M(1,_b,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function bb(t,n){if(t&1&&(s(0,"td",22),M(1,pb,2,2),M(2,fb,2,2),M(3,hb,2,2,"span"),M(4,Cb,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 vb(t,n){t&1&&P(0,"tr",28)}function xb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),N(6,lb,3,3,"td",7),Q(),X(7,30),N(8,bb,5,4,"td",7),Q(),N(9,vb,1,0,"tr",20),l()()),t&2){let e=T();o(2),b(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function yb(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=T(2);o(),v(" ",e.loanDetails.loanPurposeName," ")}}function Sb(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 Db(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=T(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 wb(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=T(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 Pb(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=T(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 Tb(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,yb,2,1,"span",35),M(11,Sb,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,Db,7,9,"div",34),M(20,wb,7,9,"div",34),M(21,Pb,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=T();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 Fp=(()=>{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,bC,21,15),M(2,BC,31,6,"div"),M(3,rb,10,5,"div"),M(4,xb,10,5,"div"),M(5,Tb,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Va,Sa,gn,Tt,fn],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 Ab(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=T(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(Re(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Mb(t,n){if(t&1&&(ee(0,"span",4),M(1,Ab,8,8,"span"),te()),t&2){let e=T();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}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=T();o(2),v(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Re(6,5,e.loanDetails.repaymentFrequencyType.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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),v(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}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=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function kb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),v(" ",Re(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Nb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),v(" ",Re(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function Bb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),v(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function qb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=T();o(),v(" ",e.loanDetails.fundName," ")}}function jb(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 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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),v(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}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),p(6,"yesNo"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),v(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Ub(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=T();o(2),v(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),b(e.loanDetails.closureLoanAccountNo)}}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,"formatNumber"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),v(" ",m(6,4,e.loanDetails.topupAmount)," ")}}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,"translateKey"),te()()),t&2){let e=T();o(2),v(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),v(" ",Re(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}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=T();o(2),v(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),v(" ",Re(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function $b(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=T();o(2),v(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),v(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function Yb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),v(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function Kb(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=T();o(2),v(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),v(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}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,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=T();o(2),v(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Zl(" ",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 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,"formatNumber"),te()()),t&2){let e=T();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 Rp=(()=>{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:206,vars:191,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,"translate"),p(19,"translateKey"),M(20,Mb,2,1,"span",4),te()(),M(21,Ob,7,8,"div",2),ee(22,"div",2)(23,"span",3),c(24),p(25,"translate"),te(),ee(26,"span",3),c(27),p(28,"translateKey"),te()(),M(29,Ib,7,6,"div",2),ee(30,"div",2)(31,"span",3),c(32),p(33,"translate"),te(),ee(34,"span",3),c(35),p(36,"yesNo"),te()(),ee(37,"div",2)(38,"span",3),c(39),p(40,"translate"),te(),ee(41,"span",3),c(42),p(43,"formatNumber"),p(44,"translate"),p(45,"translateKey"),te()(),ee(46,"div",2)(47,"span",3),c(48),p(49,"translate"),te(),ee(50,"span",3),c(51),p(52,"translate"),te()(),ee(53,"div",2)(54,"span",3),c(55),p(56,"translate"),te(),ee(57,"span",3),c(58),p(59,"yesNo"),te()(),ee(60,"div",2)(61,"span",3),c(62),p(63,"translate"),te(),ee(64,"span",3),c(65),p(66,"translateKey"),te()(),ee(67,"div",2)(68,"span",3),c(69),p(70,"translate"),te(),ee(71,"span",3),c(72),p(73,"yesNo"),te()(),M(74,Eb,7,7,"div",2),M(75,Lb,7,7,"div",2),M(76,kb,7,7,"div",2),ee(77,"div",2)(78,"span",3),c(79),p(80,"translate"),te(),ee(81,"span",3),c(82),p(83,"yesNo"),te()(),M(84,Nb,7,7,"div",2),M(85,Fb,7,7,"div",2),M(86,Rb,7,7,"div",2),M(87,Bb,7,6,"div",2),ee(88,"div",2)(89,"span",3),c(90),p(91,"translate"),te(),ee(92,"span",3),c(93),te()(),ee(94,"div",2)(95,"span",3),c(96),p(97,"translate"),te(),ee(98,"span",3),c(99),te()(),ee(100,"div",2)(101,"span",3),c(102),p(103,"translate"),te(),ee(104,"span",3),c(105),te()(),ee(106,"div",2)(107,"span",3),c(108),p(109,"translate"),te(),ee(110,"span",3),c(111),p(112,"yesNo"),te()(),ee(113,"div",2)(114,"span",3),c(115),p(116,"translate"),te(),M(117,qb,2,1,"span",3),M(118,jb,3,3,"span",3),te(),ee(119,"div",2)(120,"span",3),c(121),p(122,"translate"),te(),ee(123,"span",3),c(124),te()(),ee(125,"div",2)(126,"span",3),c(127),p(128,"translate"),te(),ee(129,"span",3),c(130),p(131,"translateKey"),te()(),ee(132,"div",2)(133,"span",3),c(134),p(135,"translate"),te(),ee(136,"span",3),c(137),p(138,"yesNo"),te()(),ee(139,"div",2)(140,"span",3),c(141),p(142,"translate"),te(),ee(143,"span",3),c(144),p(145,"yesNo"),te()(),ee(146,"div",2)(147,"span",3),c(148),p(149,"translate"),te(),ee(150,"span",3),c(151),p(152,"dateFormat"),te()(),ee(153,"div",2)(154,"span",3),c(155),p(156,"translate"),te(),ee(157,"span",3),c(158),p(159,"dateFormat"),te()(),ee(160,"div",2)(161,"span",3),c(162),p(163,"translate"),te(),ee(164,"span",3),c(165),p(166,"dateFormat"),te()(),ee(167,"div",2)(168,"span",3),c(169),p(170,"translate"),te(),ee(171,"span",3),c(172),p(173,"dateFormat"),te()(),M(174,zb,7,6,"div",2),M(175,Vb,7,6,"div",2),M(176,Ub,7,4,"div",2),M(177,Hb,7,6,"div",2),ee(178,"div",2)(179,"span",3),c(180),p(181,"translate"),te(),ee(182,"span",3),c(183),p(184,"yesNo"),te()(),ee(185,"div",2)(186,"span",3),c(187),p(188,"translate"),te(),ee(189,"span",3),c(190),p(191,"translateKey"),te()(),ee(192,"div",2)(193,"span",3),c(194),p(195,"translate"),te(),ee(196,"span",3),c(197),p(198,"translateKey"),te()(),M(199,Gb,7,7,"div",2),M(200,Wb,7,7,"div",2),M(201,$b,6,4,"div",2),M(202,Yb,6,4,"div",2),M(203,Kb,7,6,"div",2),M(204,Zb,10,15,"div",2),M(205,Jb,7,6,"div",2),te()()),i&2&&(o(2),b(m(3,81,"labels.heading.Loan Details")),o(5),b(m(8,83,"labels.inputs.Repayment Strategy")),o(3),b(Re(11,85,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),b(m(15,88,"labels.inputs.Repayments")),o(3),Zl("",a.loanDetails.numberOfRepayments," ",m(18,90,"labels.commons.every")," ",a.loanDetails.repaymentEvery,"\xA0",Re(19,92,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(3),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?20:-1),o(),O(a.loanDetails.fixedLength?21:-1),o(3),v(" ",m(25,95,"labels.inputs.Amortization")," "),o(3),v(" ",Re(28,97,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?29:-1),o(3),v(" ",m(33,100,"labels.inputs.Equal Amortization")," "),o(3),v(" ",m(36,102,a.loanDetails.isEqualAmortization)," "),o(4),v(" ",m(40,104,"labels.inputs.Interest")," "),o(3),Zl(" ",m(43,106,a.loanDetails.annualInterestRate)," % ",m(44,108,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Re(45,110,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),v(" ",m(49,113,"labels.inputs.Interest Type")," "),o(3),v(" ",m(52,115,"labels.text."+a.loanDetails.interestType.value)," "),o(4),v("",m(56,117,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(59,119,a.loanDetails.enableDownPayment)),o(4),v("",m(63,121,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),b(Re(66,123,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),v(" ",m(70,126,"labels.inputs.Enable income capitalization")),o(3),v(" ",m(73,128,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(),O(a.loanDetails.enableIncomeCapitalization?76:-1),o(3),v(" ",m(80,130,"labels.inputs.Enable Buy down fee")),o(3),v(" ",m(83,132,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(),O(a.loanDetails.enableBuyDownFee?87:-1),o(3),v(" ",m(91,134,"labels.inputs.Grace: On Principal Payment")),o(3),v(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),v(" ",m(97,136,"labels.inputs.Grace: On Interest Payment")),o(3),v(" ",a.loanDetails.graceOnInterestPayment," "),o(3),v(" ",m(103,138,"labels.inputs.Grace on Arrears Ageing")),o(3),v(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),v(" ",m(109,140,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(112,142,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),v(" ",m(116,144,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?117:-1),o(),O(a.loanDetails.fundName?-1:118),o(3),v(" ",m(122,146,"labels.inputs.Interest Free Period")),o(3),v(" ",a.loanDetails.graceOnInterestCharged," "),o(3),v(" ",m(128,148,"labels.inputs.Interest Calculation Period")),o(3),v(" ",Re(131,150,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),v(" ",m(135,153,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),v(" ",m(138,155,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),v("",m(142,157,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),b(m(145,159,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),v(" ",m(149,161,"labels.inputs.Submitted on")),o(3),v(" ",m(152,163,a.loanDetails.timeline.submittedOnDate)," "),o(4),v(" ",m(156,165,"labels.inputs.Approved on")),o(3),v(" ",m(159,167,a.loanDetails.timeline.approvedOnDate)," "),o(4),v(" ",m(163,169,"labels.inputs.Disbursed on")),o(3),v(" ",m(166,171,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),v(" ",m(170,173,"labels.inputs.Matures on")),o(3),v(" ",m(173,175,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(),O(a.loanDetails.isTopup?177:-1),o(3),v(" ",m(181,177,"labels.inputs.Recalculate Interest based on new terms")),o(3),v(" ",m(184,179,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),v(" ",m(188,181,"labels.inputs.Days in year")),o(3),v(" ",Re(191,183,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),v(" ",m(195,186,"labels.inputs.Days in month")),o(3),v(" ",Re(198,188,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?201:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?204:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?205:-1))},dependencies:[wt,Pt,gn,Tt,wa,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Bp=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),this.authenticationService=A(Wf);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&&P(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,Pt,u1],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 Po=Uint8Array,Qa=Uint16Array,gd=Int32Array,_d=new Po([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]),Cd=new Po([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]),w1=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M1=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,fd[ri]=((br&65280)>>8|(br&255)<<8)>>1;var br,ri,oc=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},Sl=new Po(288);for(ri=0;ri<144;++ri)Sl[ri]=8;var ri;for(ri=144;ri<256;++ri)Sl[ri]=9;var ri;for(ri=256;ri<280;++ri)Sl[ri]=7;var ri;for(ri=280;ri<288;++ri)Sl[ri]=8;var ri,qp=new Po(32);for(ri=0;ri<32;++ri)qp[ri]=5;var ri,Qb=oc(Sl,9,0);var tv=oc(qp,5,0);var E1=function(t){return(t+7)/8|0},ev=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new Po(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},ic=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},dd=function(t,n){for(var e=[],i=0;ik&&(k=r[i].s);var D=new Qa(k+1),U=hd(e[y-1],D,0);if(U>n){var i=0,H=0,Z=U-n,z=1<n)H+=z-(1<>=Z;H>0;){var dt=r[i].s;D[dt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new Po(D),l:U}},hd=function(t,n,e){return t.s==-1?Math.max(hd(t.l,n,e+1),hd(t.r,n,e+1)):n[t.s]=e},T1=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}},ac=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&&!xt[w1[Y-1]];--Y);var rt=_+5<<3,ot=ac(a,Sl)+ac(r,qp)+u,Mt=ac(a,k)+ac(r,H)+u+14+3*Y+ac(jt,xt)+2*jt[16]+3*jt[17]+7*jt[18];if(g>=0&&rt<=ot&&rt<=Mt)return L1(n,y,t.subarray(g,g+_));var Nt,Rt,St,qt;if(vr(n,y,1+(Mt15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else Nt=Qb,Rt=Sl,St=tv,qt=qp;for(var ht=0;ht255){var et=ct>>18&31;ic(n,y,Nt[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,ct>>23&31),y+=_d[et]);var ft=ct&31;ic(n,y,St[ft]),y+=qt[ft],ft>3&&(ic(n,y,ct>>5&8191),y+=Cd[ft])}else ic(n,y,Nt[ct]),y+=Rt[ct]}return ic(n,y,Nt[256]),y+Rt[256]},nv=new gd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),k1=new Po(0),iv=function(t,n,e,i,a,r){var u=r.z||t.length,d=new Po(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=nv[n-1],k=I>>13,D=I&8191,U=(1<7e3||xt>24576)&&(Nt>423||!_)){y=A1(t,g,0,nt,Ot,Yt,ht,xt,Y,tt-Y,y),xt=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-Mt&32767;if(Nt>2&&rt==dt(tt-Jt))for(var B=Math.min(k,Nt)-1,J=Math.min(32767,tt),et=Math.min(258,Nt);Jt<=J&&--se&&ot!=Mt;){if(t[tt+St]==t[tt+St-Jt]){for(var ct=0;ctSt){if(St=ct,qt=Jt,ct>B)break;for(var ft=Math.min(Jt,ct-2),bt=0,Rt=0;Rtbt&&(bt=Ht,Mt=It)}}}ot=Mt,Mt=H[ot],Jt+=ot-Mt&32767}if(qt){nt[xt++]=268435456|ud[St]<<18|P1[qt];var re=ud[St]&31,Me=P1[qt]&31;ht+=_d[re]+Cd[Me],++Ot[257+re],++Yt[Me],j=tt+St,++jt}else nt[xt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,j);tt=u&&(g[y/8|0]=_,De=u),y=L1(g,y+1,t.subarray(tt,De))}r.i=u}return ev(d,0,i+E1(y)+a)};var N1=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}}},av=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new Po(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return iv(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 F1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var ov=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=N1();a.p(n.dictionary),F1(t,2,a.d())}};function jp(t,n){n||(n={});var e=N1();e.p(t);var i=av(t,n,n.dictionary?6:2,4);return ov(i,n),F1(i,i.length-4,e.d()),i}var rv=typeof TextDecoder<"u"&&new TextDecoder,lv=0;try{rv.decode(k1,{stream:!0}),lv=1}catch{}function R1(t){if(Array.isArray(t))return t}function B1(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 bd(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])})(),yd={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},rc=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=cv,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=yd[e].BYTES_PER_ELEMENT*n,a=this.byteOffset+this.offset,r=this.buffer.slice(a,a+i);if(this.littleEndian===pv&&e!=="uint8"&&e!=="int8"){let d=new Uint8Array(this.buffer.slice(a,a+i));d.reverse();let g=new yd[e](d.buffer);return this.offset+=i,g.reverse(),g}let u=new yd[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 ps(t){let n=t.length;for(;--n>=0;)t[n]=0}var mv=0,Ph=1,dv=2,uv=3,fv=258,Wd=29,xc=256,uc=xc+1+Wd,ls=30,$d=19,Th=2*uc+1,Dl=15,Sd=16,hv=7,Yd=256,Ah=16,Mh=17,Oh=18,Rd=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]),Wp=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]),gv=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Ih=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_v=512,yr=new Array((uc+2)*2);ps(yr);var pc=new Array(ls*2);ps(pc);var fc=new Array(_v);ps(fc);var hc=new Array(fv-uv+1);ps(hc);var Kd=new Array(Wd);ps(Kd);var $p=new Array(ls);ps($p);function Dd(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 Eh,Lh,kh;function wd(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}var Nh=t=>t<256?fc[t]:fc[256+(t>>>7)],gc=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},Ua=(t,n,e)=>{t.bi_valid>Sd-e?(t.bi_buf|=n<>Sd-t.bi_valid,t.bi_valid+=e-Sd):(t.bi_buf|=n<{Ua(t,e[n*2],e[n*2+1])},Fh=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},Cv=t=>{t.bi_valid===16?(gc(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)},bv=(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,k,D,U,H=0;for(k=0;k<=Dl;k++)t.bl_count[k]=0;for(e[t.heap[t.heap_max]*2+1]=0,_=t.heap_max+1;_g&&(k=g,H++),e[y*2+1]=k,!(y>i)&&(t.bl_count[k]++,D=0,y>=d&&(D=u[y-d]),U=e[y*2],t.opt_len+=U*(k+D),r&&(t.static_len+=U*(a[y*2+1]+D)));if(H!==0){do{for(k=g-1;t.bl_count[k]===0;)k--;t.bl_count[k]--,t.bl_count[k+1]+=2,t.bl_count[g]--,H-=2}while(H>0);for(k=g;k!==0;k--)for(y=t.bl_count[k];y!==0;)I=t.heap[--_],!(I>i)&&(e[I*2+1]!==k&&(t.opt_len+=(k-e[I*2+1])*e[I*2],e[I*2+1]=k),y--)}},Rh=(t,n,e)=>{let i=new Array(Dl+1),a=0,r,u;for(r=1;r<=Dl;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]=Fh(i[d]++,d))}},vv=()=>{let t,n,e,i,a,r=new Array(Dl+1);for(e=0,i=0;i>=7;i{let n;for(n=0;n{t.bi_valid>8?gc(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},V1=(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?Ko(t,a,n):(u=hc[a],Ko(t,u+xc+1,n),d=Rd[u],d!==0&&(a-=Kd[u],Ua(t,a,d)),i--,u=Nh(i),Ko(t,u,e),d=Wp[u],d!==0&&(i-=$p[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=Th,u=0;u>1;u>=1;u--)Pd(t,e,u);_=r;do u=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Pd(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]=_++,Pd(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],bv(t,n),Rh(e,g,t.bl_count)},H1=(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(H1(t,t.dyn_ltree,t.l_desc.max_code),H1(t,t.dyn_dtree,t.d_desc.max_code),Bd(t,t.bl_desc),n=$d-1;n>=3&&t.bl_tree[Ih[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},yv=(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{W1||(vv(),W1=!0),t.l_desc=new wd(t.dyn_ltree,Eh),t.d_desc=new wd(t.dyn_dtree,Lh),t.bl_desc=new wd(t.bl_tree,kh),t.bi_buf=0,t.bi_valid=0,Bh(t)},jh=(t,n,e,i)=>{Ua(t,(mv<<1)+(i?1:0),3),qh(t),gc(t,e),gc(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},wv=t=>{Ua(t,Ph<<1,3),Ko(t,Yd,yr),Cv(t)},Pv=(t,n,e,i)=>{let a,r,u=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=Sv(t)),Bd(t,t.l_desc),Bd(t,t.d_desc),u=xv(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?jh(t,n,e,i):t.strategy===4||r===a?(Ua(t,(Ph<<1)+(i?1:0),3),U1(t,yr,pc)):(Ua(t,(dv<<1)+(i?1:0),3),yv(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),U1(t,t.dyn_ltree,t.dyn_dtree)),Bh(t),i&&qh(t)},Tv=(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[(hc[e]+xc+1)*2]++,t.dyn_dtree[Nh(n)*2]++),t.sym_next===t.sym_end),Av=Dv,Mv=jh,Ov=Pv,Iv=Tv,Ev=wv,Lv={_tr_init:Av,_tr_stored_block:Mv,_tr_flush_block:Ov,_tr_tally:Iv,_tr_align:Ev},kv=(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},_c=kv,Nv=()=>{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},Fv=new Uint32Array(Nv()),Rv=(t,n,e,i)=>{let a=Fv,r=i+e;t^=-1;for(let u=i;u>>8^a[(t^n[u])&255];return t^-1},da=Rv,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"},ms={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:Bv,_tr_stored_block:qd,_tr_flush_block:qv,_tr_tally:Kr,_tr_align:jv}=Lv,{Z_NO_FLUSH:Zr,Z_PARTIAL_FLUSH:zv,Z_FULL_FLUSH:Vv,Z_FINISH:uo,Z_BLOCK:$1,Z_OK:va,Z_STREAM_END:Y1,Z_STREAM_ERROR:Zo,Z_DATA_ERROR:Uv,Z_BUF_ERROR:Td,Z_DEFAULT_COMPRESSION:Hv,Z_FILTERED:Gv,Z_HUFFMAN_ONLY:zp,Z_RLE:Wv,Z_FIXED:$v,Z_DEFAULT_STRATEGY:Yv,Z_UNKNOWN:Kv,Z_DEFLATED:Zp}=ms,Zv=9,Jv=15,Xv=8,Qv=29,t5=256,jd=t5+1+Qv,e5=30,n5=19,i5=2*jd+1,a5=15,ti=3,Yr=258,Jo=Yr+ti+1,o5=32,ss=42,Zd=57,zd=69,Vd=73,Ud=91,Hd=103,wl=113,sc=666,Na=1,ds=2,Al=3,us=4,r5=3,Pl=(t,n)=>(t.msg=Tl[n],n),K1=t=>t*2-(t>4?9:0),$r=t=>{let n=t.length;for(;--n>=0;)t[n]=0},l5=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)},s5=(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)=>{qv(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},lc=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},Gd=(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=_c(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)},zh=(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,k=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},cs=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),l5(t),i+=n),t.strm.avail_in===0)break;if(e=Gd(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&&(Gd(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&&(Gd(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!==Zr&&t.strm.avail_in===0&&a<=r)&&(i=a>r?r:a,u=n===uo&&t.strm.avail_in===0&&i===a?1:0,qd(t,t.block_start,i,u),t.block_start+=i,to(t.strm)),u?Al:Na)},Ad=(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=zh(t,e)),t.match_length>=ti)if(i=Kr(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=Kr(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=Kr(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=Kr(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=Kr(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(cs(t),t.lookahead<=Yr&&n===Zr)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=Kr(t,1,t.match_length-ti),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=Kr(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?Al:us):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Na:ds},p5=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(cs(t),t.lookahead===0)){if(n===Zr)return Na;break}if(t.match_length=0,e=Kr(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?Al:us):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Na:ds};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 cc=[new Yo(0,0,0,0,Vh),new Yo(4,4,8,4,Ad),new Yo(4,5,16,8,Ad),new Yo(4,6,32,32,Ad),new Yo(4,4,16,16,os),new Yo(8,16,32,32,os),new Yo(8,16,128,128,os),new Yo(8,32,128,256,os),new Yo(32,128,258,1024,os),new Yo(32,258,258,4096,os)],m5=t=>{t.window_size=2*t.w_size,$r(t.head),t.max_lazy_match=cc[t.level].max_lazy,t.good_match=cc[t.level].good_length,t.nice_match=cc[t.level].nice_length,t.max_chain_length=cc[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 d5(){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(i5*2),this.dyn_dtree=new Uint16Array((2*e5+1)*2),this.bl_tree=new Uint16Array((2*n5+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(a5+1),this.heap=new Uint16Array(2*jd+1),$r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*jd+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 yc=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.status!==ss&&n.status!==Zd&&n.status!==zd&&n.status!==Vd&&n.status!==Ud&&n.status!==Hd&&n.status!==wl&&n.status!==sc?1:0},Uh=t=>{if(yc(t))return Pl(t,Zo);t.total_in=t.total_out=0,t.data_type=Kv;let n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Zd:n.wrap?ss:wl,t.adler=n.wrap===2?0:1,n.last_flush=-2,Bv(n),va},Hh=t=>{let n=Uh(t);return n===va&&m5(t.state),n},u5=(t,n)=>yc(t)||t.state.wrap!==2?Zo:(t.state.gzhead=n,va),Gh=(t,n,e,i,a,r)=>{if(!t)return Zo;let u=1;if(n===Hv&&(n=6),i<0?(u=0,i=-i):i>15&&(u=2,i-=16),a<1||a>Zv||e!==Zp||i<8||i>15||n<0||n>9||r<0||r>$v||i===8&&u!==1)return Pl(t,Zo);i===8&&(i=9);let d=new d5;return t.state=d,d.strm=t,d.status=ss,d.wrap=u,d.gzhead=null,d.w_bits=i,d.w_size=1<Gh(t,n,Zp,Jv,Xv,Yv),h5=(t,n)=>{if(yc(t)||n>$1||n<0)return t?Pl(t,Zo):Zo;let e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===sc&&n!==uo)return Pl(t,t.avail_out===0?Td:Zo);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&&K1(n)<=K1(i)&&n!==uo)return Pl(t,Td);if(e.status===sc&&t.avail_in!==0)return Pl(t,Td);if(e.status===ss&&e.wrap===0&&(e.status=wl),e.status===ss){let a=Zp+(e.w_bits-8<<4)<<8,r=-1;if(e.strategy>=zp||e.level<2?r=0:e.level<6?r=1:e.level===6?r=2:r=3,a|=r<<6,e.strstart!==0&&(a|=o5),a+=31-a%31,lc(e,a),e.strstart!==0&&(lc(e,t.adler>>>16),lc(e,t.adler&65535)),t.adler=1,e.status=wl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===Zd){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>=zp||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=zd;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>=zp||e.level<2?4:0),li(e,r5),e.status=wl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===zd){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=Vd}if(e.status===Vd){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=Ud}if(e.status===Ud){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=Hd}if(e.status===Hd){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=wl,to(t),e.pending!==0)return e.last_flush=-1,va}if(t.avail_in!==0||e.lookahead!==0||n!==Zr&&e.status!==sc){let a=e.level===0?Vh(e,n):e.strategy===zp?p5(e,n):e.strategy===Wv?c5(e,n):cc[e.level].func(e,n);if((a===Al||a===us)&&(e.status=sc),a===Na||a===Al)return t.avail_out===0&&(e.last_flush=-1),va;if(a===ds&&(n===zv?jv(e):n!==$1&&(qd(e,0,0,!1),n===Vv&&($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?Y1:(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)):(lc(e,t.adler>>>16),lc(e,t.adler&65535)),to(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?va:Y1)},g5=t=>{if(yc(t))return Zo;let n=t.state.status;return t.state=null,n===wl?Pl(t,Uv):va},_5=(t,n)=>{let e=n.length;if(yc(t))return Zo;let i=t.state,a=i.wrap;if(a===2||a===1&&i.status!==ss||i.lookahead)return Zo;if(a===1&&(t.adler=_c(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,cs(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,cs(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},C5=f5,b5=Gh,v5=Hh,x5=Uh,y5=u5,S5=h5,D5=g5,w5=_5,P5="pako deflate (from Nodeca project)",mc={deflateInit:C5,deflateInit2:b5,deflateReset:v5,deflateResetKeep:x5,deflateSetHeader:y5,deflate:S5,deflateEnd:D5,deflateSetDictionary:w5,deflateInfo:P5},T5=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),A5=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)T5(e,i)&&(t[i]=e[i])}}return t},M5=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;Cc[254]=Cc[254]=1;var O5=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},I5=(t,n)=>{if(n<65534&&t.subarray&&Wh)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 I5(r,a)},L5=(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+Cc[t[e]]>n?e:n},bc={string2buf:O5,buf2string:E5,utf8border:L5};function k5(){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 $h=k5,Yh=Object.prototype.toString,{Z_NO_FLUSH:N5,Z_SYNC_FLUSH:F5,Z_FULL_FLUSH:R5,Z_FINISH:B5,Z_OK:Yp,Z_STREAM_END:q5,Z_DEFAULT_COMPRESSION:j5,Z_DEFAULT_STRATEGY:z5,Z_DEFLATED:V5}=ms;function Sc(t){this.options=Jp.assign({level:j5,method:V5,chunkSize:16384,windowBits:15,memLevel:8,strategy:z5},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 $h,this.strm.avail_out=0;let e=mc.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(e!==Yp)throw new Error(Tl[e]);if(n.header&&mc.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=bc.string2buf(n.dictionary):Yh.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,e=mc.deflateSetDictionary(this.strm,i),e!==Yp)throw new Error(Tl[e]);this._dict_set=!0}}Sc.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?B5:N5,typeof t=="string"?e.input=bc.string2buf(t):Yh.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===F5||r===R5)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(a=mc.deflate(e,r),a===q5)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),a=mc.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Yp;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};Sc.prototype.onData=function(t){this.chunks.push(t)};Sc.prototype.onEnd=function(t){t===Yp&&(this.result=Jp.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Jd(t,n){let e=new Sc(n);if(e.push(t,!0),e.err)throw e.msg||Tl[e.err];return e.result}function U5(t,n){return n=n||{},n.raw=!0,Jd(t,n)}function H5(t,n){return n=n||{},n.gzip=!0,Jd(t,n)}var G5=Sc,W5=Jd,$5=U5,Y5=H5,K5=ms,Z5={Deflate:G5,deflate:W5,deflateRaw:$5,gzip:Y5,constants:K5},Vp=16209,J5=16191,X5=function(n,e){let i,a,r,u,d,g,_,y,I,k,D,U,H,Z,z,mt,dt,nt,Ot,Yt,jt,ht,tt,xt,j=n.state;i=n.next_in,tt=n.input,a=i+(n.avail_in-5),r=n.next_out,xt=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,k=j.window,D=j.hold,U=j.bits,H=j.lencode,Z=j.distcode,z=(1<>>24,D>>>=nt,U-=nt,nt=dt>>>16&255,nt===0)xt[r++]=dt&65535;else if(nt&16){Ot=dt&65535,nt&=15,nt&&(U>>=nt,U-=nt),U<15&&(D+=tt[i++]<>>24,D>>>=nt,U-=nt,nt=dt>>>16&255,nt&16){if(Yt=dt&65535,nt&=15,Ug){n.msg="invalid distance too far back",j.mode=Vp;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=Vp;break t}if(jt=0,ht=k,I===0){if(jt+=_-nt,nt2;)xt[r++]=ht[jt++],xt[r++]=ht[jt++],xt[r++]=ht[jt++],Ot-=3;Ot&&(xt[r++]=ht[jt++],Ot>1&&(xt[r++]=ht[jt++]))}else{jt=r-Yt;do xt[r++]=xt[jt++],xt[r++]=xt[jt++],xt[r++]=xt[jt++],Ot-=3;while(Ot>2);Ot&&(xt[r++]=xt[jt++],Ot>1&&(xt[r++]=xt[jt++]))}}else if((nt&64)===0){dt=Z[(dt&65535)+(D&(1<>3,i-=Ot,U-=Ot<<3,D&=(1<{let g=d.bits,_=0,y=0,I=0,k=0,D=0,U=0,H=0,Z=0,z=0,mt=0,dt,nt,Ot,Yt,jt,ht=null,tt,xt=new Uint16Array(rs+1),j=new Uint16Array(rs+1),Y=null,rt,ot,Mt;for(_=0;_<=rs;_++)xt[_]=0;for(y=0;y=1&&xt[k]===0;k--);if(D>k&&(D=k),k===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===X1||k!==1))return-1;for(j[1]=0,_=1;_Z1||t===Q1&&z>J1)return 1;for(;;){rt=_-H,u[y]+1=tt?(ot=Y[u[y]-tt],Mt=ht[u[y]-tt]):(ot=96,Mt=0),dt=1<<_-H,nt=1<>H)+nt]=rt<<24|ot<<16|Mt|0;while(nt!==0);for(dt=1<<_-1;mt&dt;)dt>>=1;if(dt!==0?(mt&=dt-1,mt+=dt):mt=0,y++,--xt[_]===0){if(_===k)break;_=n[e+u[y]]}if(_>D&&(mt&Yt)!==Ot){for(H===0&&(H=D),jt+=I,U=_-H,Z=1<Z1||t===Q1&&z>J1)return 1;Ot=mt&Yt,a[Ot]=D<<24|U<<16|jt-r|0}}return mt!==0&&(a[jt+mt]=_-H<<24|64<<16|0),d.bits=D,0},dc=ix,ax=0,Kh=1,Zh=2,{Z_FINISH:th,Z_BLOCK:ox,Z_TREES:Up,Z_OK:Ml,Z_STREAM_END:rx,Z_NEED_DICT:lx,Z_STREAM_ERROR:fo,Z_DATA_ERROR:Jh,Z_MEM_ERROR:Xh,Z_BUF_ERROR:sx,Z_DEFLATED:eh}=ms,Xp=16180,nh=16181,ih=16182,ah=16183,oh=16184,rh=16185,lh=16186,sh=16187,ch=16188,ph=16189,Kp=16190,xr=16191,Od=16192,mh=16193,Id=16194,dh=16195,uh=16196,fh=16197,hh=16198,Hp=16199,Gp=16200,gh=16201,_h=16202,Ch=16203,bh=16204,vh=16205,Ed=16206,xh=16207,yh=16208,Ii=16209,Qh=16210,t2=16211,cx=852,px=592,mx=15,dx=mx,Sh=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ux(){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 Ol=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.modet2?1:0},e2=t=>{if(Ol(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=Xp,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(cx),n.distcode=n.distdyn=new Int32Array(px),n.sane=1,n.back=-1,Ml},n2=t=>{if(Ol(t))return fo;let n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,e2(t)},i2=(t,n)=>{let e;if(Ol(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,n2(t))},a2=(t,n)=>{if(!t)return fo;let e=new ux;t.state=e,e.strm=t,e.window=null,e.mode=Xp;let i=i2(t,n);return i!==Ml&&(t.state=null),i},fx=t=>a2(t,dx),Dh=!0,Ld,kd,hx=t=>{if(Dh){Ld=new Int32Array(512),kd=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(dc(Kh,t.lens,0,288,Ld,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;dc(Zh,t.lens,0,32,kd,0,t.work,{bits:5}),Dh=!1}t.lencode=Ld,t.lenbits=9,t.distcode=kd,t.distbits=5},o2=(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,k,D,U,H,Z=0,z,mt,dt,nt,Ot,Yt,jt,ht,tt=new Uint8Array(4),xt,j,Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ol(t)||!t.output||!t.input&&t.avail_in!==0)return fo;e=t.state,e.mode===xr&&(e.mode=Od),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,k=g,ht=Ml;t:for(;;)switch(e.mode){case Xp:if(e.wrap===0){e.mode=Od;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=nh;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)!==eh){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=ih;case ih: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=ah;case ah: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=oh;case oh: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=rh;case rh: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=lh;case lh: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 ph:for(;y<32;){if(d===0)break t;d--,_+=i[r++]<>>=y&7,y-=y&7,e.mode=Ed;break}for(;y<3;){if(d===0)break t;d--,_+=i[r++]<>>=1,y-=1,_&3){case 0:e.mode=mh;break;case 1:if(hx(e),e.mode=Hp,n===Up){_>>>=2,y-=2;break t}break;case 2:e.mode=uh;break;case 3:t.msg="invalid block type",e.mode=Ii}_>>>=2,y-=2;break;case mh: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=Id,n===Up)break t;case Id:e.mode=dh;case dh: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 uh: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=fh;case fh:for(;e.have>>=3,y-=3}for(;e.have<19;)e.lens[Y[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,xt={bits:e.lenbits},ht=dc(ax,e.lens,0,19,e.lencode,0,e.work,xt),e.lenbits=xt.bits,ht){t.msg="invalid code lengths set",e.mode=Ii;break}e.have=0,e.mode=hh;case hh:for(;e.have>>24,mt=Z>>>16&255,dt=Z&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>>=z,y-=z,e.lens[e.have++]=dt;else{if(dt===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(dt===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,xt={bits:e.lenbits},ht=dc(Kh,e.lens,0,e.nlen,e.lencode,0,e.work,xt),e.lenbits=xt.bits,ht){t.msg="invalid literal/lengths set",e.mode=Ii;break}if(e.distbits=6,e.distcode=e.distdyn,xt={bits:e.distbits},ht=dc(Zh,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,xt),e.distbits=xt.bits,ht){t.msg="invalid distances set",e.mode=Ii;break}if(e.mode=Hp,n===Up)break t;case Hp:e.mode=Gp;case Gp: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,X5(t,k),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;Z=e.lencode[_&(1<>>24,mt=Z>>>16&255,dt=Z&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],z=Z>>>24,mt=Z>>>16&255,dt=Z&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=dt,mt===0){e.mode=vh;break}if(mt&32){e.back=-1,e.mode=xr;break}if(mt&64){t.msg="invalid literal/length code",e.mode=Ii;break}e.extra=mt&15,e.mode=gh;case gh:if(e.extra){for(j=e.extra;y>>=e.extra,y-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=_h;case _h:for(;Z=e.distcode[_&(1<>>24,mt=Z>>>16&255,dt=Z&65535,!(z<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],z=Z>>>24,mt=Z>>>16&255,dt=Z&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,mt&64){t.msg="invalid distance code",e.mode=Ii;break}e.offset=dt,e.extra=mt&15,e.mode=Ch;case Ch: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=bh;case bh:if(g===0)break t;if(D=k-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=Gp);break;case vh:if(g===0)break t;a[u++]=e.length,g--,e.mode=Gp;break;case Ed:if(e.wrap){for(;y<32;){if(d===0)break t;d--,_|=i[r++]<{if(Ol(t))return fo;let n=t.state;return n.window&&(n.window=null),t.state=null,Ml},Cx=(t,n)=>{if(Ol(t))return fo;let e=t.state;return(e.wrap&2)===0?fo:(e.head=n,n.done=!1,Ml)},bx=(t,n)=>{let e=n.length,i,a,r;return Ol(t)||(i=t.state,i.wrap!==0&&i.mode!==Kp)?fo:i.mode===Kp&&(a=1,a=_c(a,n,e,0),a!==i.check)?Jh:(r=o2(t,n,e,e),r?(i.mode=Qh,Xh):(i.havedict=1,Ml))},vx=n2,xx=i2,yx=e2,Sx=fx,Dx=a2,wx=gx,Px=_x,Tx=Cx,Ax=bx,Mx="pako inflate (from Nodeca project)",Sr={inflateReset:vx,inflateReset2:xx,inflateResetKeep:yx,inflateInit:Sx,inflateInit2:Dx,inflate:wx,inflateEnd:Px,inflateGetHeader:Tx,inflateSetDictionary:Ax,inflateInfo:Mx};function Ox(){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 Ix=Ox,r2=Object.prototype.toString,{Z_NO_FLUSH:Ex,Z_FINISH:Lx,Z_OK:vc,Z_STREAM_END:Nd,Z_NEED_DICT:Fd,Z_STREAM_ERROR:kx,Z_DATA_ERROR:wh,Z_MEM_ERROR:Nx}=ms;function Dc(t){this.options=Jp.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 $h,this.strm.avail_out=0;let e=Sr.inflateInit2(this.strm,n.windowBits);if(e!==vc)throw new Error(Tl[e]);if(this.header=new Ix,Sr.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=bc.string2buf(n.dictionary):r2.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=Sr.inflateSetDictionary(this.strm,n.dictionary),e!==vc)))throw new Error(Tl[e])}Dc.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?Lx:Ex,r2.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===Fd&&a&&(r=Sr.inflateSetDictionary(e,a),r===vc?r=Sr.inflate(e,u):r===wh&&(r=Fd));e.avail_in>0&&r===Nd&&e.state.wrap>0&&t[e.next_in]!==0;)Sr.inflateReset(e),r=Sr.inflate(e,u);switch(r){case kx:case wh:case Fd:case Nx:return this.onEnd(r),this.ended=!0,!1}if(d=e.avail_out,e.next_out&&(e.avail_out===0||r===Nd))if(this.options.to==="string"){let g=bc.utf8border(e.output,e.next_out),_=e.next_out-g,y=bc.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===vc&&d===0)){if(r===Nd)return r=Sr.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};Dc.prototype.onData=function(t){this.chunks.push(t)};Dc.prototype.onEnd=function(t){t===vc&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Jp.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Xd(t,n){let e=new Dc(n);if(e.push(t),e.err)throw e.msg||Tl[e.err];return e.result}function Fx(t,n){return n=n||{},n.raw=!0,Xd(t,n)}var Rx=Dc,Bx=Xd,qx=Fx,jx=Xd,zx=ms,Vx={Inflate:Rx,inflate:Bx,inflateRaw:qx,ungzip:jx,constants:zx},{Deflate:NR,deflate:FR,deflateRaw:RR,gzip:BR}=Z5,{Inflate:Ux,inflate:Hx,inflateRaw:qR,ungzip:jR}=Vx;var Qd=Ux,l2=Hx;var c2=[];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;c2[t]=n}var s2=4294967295;function Gx(t,n,e){let i=t;for(let a=0;a>>8;return i}function Wx(t,n){return(Gx(s2,t,n)^s2)>>>0}function tu(t,n,e){let i=t.readUint32(),a=Wx(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 Qp(t,n,e){for(let i=0;i>1)&255}else{for(;r>1)&255;for(;r>1)&255}}function im(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 Xx=new Uint16Array([255]),Qx=new Uint8Array(Xx.buffer),t3=Qx[0]===255,e3=new Uint8Array(0);function eu(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),_=e3,y=0,I,k;for(let D=0;D>8&255}var am=Uint8Array.of(137,80,78,71,13,10,26,10);function nu(t){if(!d2(t.readBytes(am.length)))throw new Error("wrong PNG signature")}function d2(t){if(t.length79)throw new Error("keyword length must be between 1 and 79")}var r3=/^[\u0000-\u00FF]*$/;function l3(t){if(!r3.test(t))throw new Error("invalid latin1 text")}function h2(t,n,e){let i=iu(n);t[i]=s3(n,e-i.length-1)}function iu(t){for(t.mark();t.readByte()!==a3;);let n=t.offset;t.reset();let e=f2.decode(t.readBytes(n-t.offset-1));return t.skip(1),o3(e),e}function s3(t,n){return f2.decode(t.readBytes(n))}var Fa={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},wc={UNKNOWN:-1,DEFLATE:0},om={UNKNOWN:-1,ADAPTIVE:0},Pc={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Tc={NONE:0,BACKGROUND:1,PREVIOUS:2},rm={SOURCE:0,OVER:1};var lm=class extends rc{_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 Qd,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=wc.UNKNOWN,this._filterMethod=om.UNKNOWN,this._interlaceMethod=Pc.UNKNOWN,this._colorType=Fa.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(nu(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeChunk(n,e)}return this.decodeImage(),this._png}decodeApng(){for(nu(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 u2:h2(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?tu(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?tu(this,n+4,e):this.skip(4)}decodeIHDR(){let n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=c3(this.readUint8());let e=this.readUint8();this._colorType=e;let i;switch(e){case Fa.GREYSCALE:i=1;break;case Fa.TRUECOLOUR:i=3;break;case Fa.INDEXED_COLOUR:i=1;break;case Fa.GREYSCALE_ALPHA:i=2;break;case Fa.TRUECOLOUR_ALPHA:i=4;break;case Fa.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==wc.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 rm.SOURCE:for(let r=0;r=200&&n.status<=299}function sm(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 Il=Cn.saveAs||((typeof window>"u"?"undefined":fi(window))!=="object"||window!==Cn?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var i=Cn.URL||Cn.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?_2(a.href)?ou(t,n,e):sm(a,a.target="_blank"):sm(a)):(a.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(a.href)},4e4),setTimeout(function(){sm(a)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(_2(t))ou(t,n,e);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){sm(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 ou(t,n,e);var a=t.type==="application/octet-stream",r=/constructor/i.test(Cn.HTMLElement)||Cn.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=Cn.URL||Cn.webkitURL,_=g.createObjectURL(t);i?i.location=_:location.href=_,i=null,setTimeout(function(){g.revokeObjectURL(_)},4e4)}});function z2(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 dm=Cn.atob.bind(Cn),C2=Cn.btoa.bind(Cn);function ru(t,n){var e=t[0],i=t[1],a=t[2],r=t[3];e=Pa(e,i,a,r,n[0],7,-680876936),r=Pa(r,e,i,a,n[1],12,-389564586),a=Pa(a,r,e,i,n[2],17,606105819),i=Pa(i,a,r,e,n[3],22,-1044525330),e=Pa(e,i,a,r,n[4],7,-176418897),r=Pa(r,e,i,a,n[5],12,1200080426),a=Pa(a,r,e,i,n[6],17,-1473231341),i=Pa(i,a,r,e,n[7],22,-45705983),e=Pa(e,i,a,r,n[8],7,1770035416),r=Pa(r,e,i,a,n[9],12,-1958414417),a=Pa(a,r,e,i,n[10],17,-42063),i=Pa(i,a,r,e,n[11],22,-1990404162),e=Pa(e,i,a,r,n[12],7,1804603682),r=Pa(r,e,i,a,n[13],12,-40341101),a=Pa(a,r,e,i,n[14],17,-1502002290),e=Ta(e,i=Pa(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=Aa(e,i=Ta(i,a,r,e,n[12],20,-1926607734),a,r,n[5],4,-378558),r=Aa(r,e,i,a,n[8],11,-2022574463),a=Aa(a,r,e,i,n[11],16,1839030562),i=Aa(i,a,r,e,n[14],23,-35309556),e=Aa(e,i,a,r,n[1],4,-1530992060),r=Aa(r,e,i,a,n[4],11,1272893353),a=Aa(a,r,e,i,n[7],16,-155497632),i=Aa(i,a,r,e,n[10],23,-1094730640),e=Aa(e,i,a,r,n[13],4,681279174),r=Aa(r,e,i,a,n[0],11,-358537222),a=Aa(a,r,e,i,n[3],16,-722521979),i=Aa(i,a,r,e,n[6],23,76029189),e=Aa(e,i,a,r,n[9],4,-640364487),r=Aa(r,e,i,a,n[12],11,-421815835),a=Aa(a,r,e,i,n[15],16,530742520),e=Ma(e,i=Aa(i,a,r,e,n[2],23,-995338651),a,r,n[0],6,-198630844),r=Ma(r,e,i,a,n[7],10,1126891415),a=Ma(a,r,e,i,n[14],15,-1416354905),i=Ma(i,a,r,e,n[5],21,-57434055),e=Ma(e,i,a,r,n[12],6,1700485571),r=Ma(r,e,i,a,n[3],10,-1894986606),a=Ma(a,r,e,i,n[10],15,-1051523),i=Ma(i,a,r,e,n[1],21,-2054922799),e=Ma(e,i,a,r,n[8],6,1873313359),r=Ma(r,e,i,a,n[15],10,-30611744),a=Ma(a,r,e,i,n[6],15,-1560198380),i=Ma(i,a,r,e,n[13],21,1309151649),e=Ma(e,i,a,r,n[4],6,-145523070),r=Ma(r,e,i,a,n[11],10,-1120210379),a=Ma(a,r,e,i,n[2],15,718787259),i=Ma(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 bm(t,n,e,i,a,r){return n=Qr(Qr(n,t),Qr(i,r)),Qr(n<>>32-a,e)}function Pa(t,n,e,i,a,r,u){return bm(n&e|~n&i,t,n,a,r,u)}function Ta(t,n,e,i,a,r,u){return bm(n&i|e&~i,t,n,a,r,u)}function Aa(t,n,e,i,a,r,u){return bm(n^e^i,t,n,a,r,u)}function Ma(t,n,e,i,a,r,u){return bm(e^(n|~i),t,n,a,r,u)}function V2(t){var n,e=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)ru(i,p3(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(ru(i,a),n=0;n<16;n++)a[n]=0;return a[14]=8*e,ru(i,a),i}function p3(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 b2="0123456789abcdef".split("");function m3(t){for(var n="",e=0;e<4;e++)n+=b2[t>>8*e+4&15]+b2[t>>8*e&15];return n}function d3(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function du(t){return V2(t).map(d3).join("")}var u3=(function(t){for(var n=0;n>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&4294967295}function uu(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,k=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=du(r+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=uu(this.encryptionKey,this.padding)}function _s(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 x2(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){Cn.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 _m(t){if(!(this instanceof _m))return new _m(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 U2(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function El(t,n,e,i,a){if(!(this instanceof El))return new El(t,n,e,i,a);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,U2.call(this,i,a)}function Cs(t,n,e,i,a){if(!(this instanceof Cs))return new Cs(t,n,e,i,a);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,U2.call(this,i,a)}function Ke(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,k={},D={internal:{},__private__:{}};D.__private__.PubSub=x2;var U="1.3",H=D.__private__.getPdfVersion=function(){return U};D.__private__.setPdfVersion=function(C){U=C};var Z={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 Z};var z=D.__private__.getPageFormat=function(C){return Z[C]};a=a||"a4";var mt="compat",dt="advanced",nt=mt;function Ot(){this.saveGraphicsState(),G(new dn(Rn,0,0,-Rn,0,dl()*Rn).toString()+" cm"),this.setFontSize(this.getFontSize()/Rn),_="n",nt=dt}function Yt(){this.restoreGraphicsState(),_="S",nt=mt}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===mt;return E&&Ot.call(this),typeof C!="function"||(C(this),E&&Yt.call(this)),this},D.compatAPI=function(C){var E=nt===dt;return E&&Yt.call(this),typeof C!="function"||(C(this),E&&Ot.call(this)),this},D.isAdvancedAPI=function(){return nt===dt};var ht,tt=function(C){if(nt!==dt)throw new Error(C+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},xt=D.roundToPrecision=D.__private__.roundToPrecision=function(C,E){var K=n||E;if(isNaN(C)||isNaN(K))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return C.toFixed(K).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 xt(C,g)}:g==="smart"?function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return xt(C,C>-1&&C<1?16:5)}:function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.hpf");return xt(C,16)};var j=D.f2=D.__private__.f2=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f2");return xt(C,2)},Y=D.__private__.f3=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.f3");return xt(C,3)},rt=D.scale=D.__private__.scale=function(C){if(isNaN(C))throw new Error("Invalid argument passed to jsPDF.scale");return nt===mt?C*Rn:nt===dt?C:void 0},ot=function(C){return rt((function(E){return nt===mt?dl()-E:nt===dt?E:void 0})(C))};D.__private__.setPrecision=D.setPrecision=function(C){typeof parseInt(C,10)=="number"&&(n=parseInt(C,10))};var Mt,Nt="00000000000000000000000000000000",Rt=D.__private__.getFileId=function(){return Nt},St=D.__private__.setFileId=function(C){return Nt=C!==void 0&&/^[a-fA-F0-9]{32}$/.test(C)?C.toUpperCase():Nt.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),y!==null&&(Qi=new gs(y.userPermissions,y.userPassword,y.ownerPassword,Nt)),Nt};D.setFileId=function(C){return St(C),this},D.getFileId=function(){return Rt()};var qt=D.__private__.convertDateToPDFDate=function(C){var E=C.getTimezoneOffset(),K=E<0?"+":"-",at=Math.floor(Math.abs(E/60)),gt=Math.abs(E%60),zt=[K,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),K=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),Kt=parseInt(C.substr(14,2),10);return new Date(E,K,at,gt,zt,Kt,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 Mt=E},B=D.__private__.getCreationDate=function(C){var E=Mt;return C==="jsDate"&&(E=se(Mt)),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)},ct=D.__private__.padd2Hex=function(C){return("00"+(C=C.toString())).substr(C.length)},ft=0,bt=[],It=[],kt=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(),kt+=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,K=new ArrayBuffer(E),at=new Uint8Array(K);E--;)at[E]=C.charCodeAt(E);return K},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===dt?C/Rn:C,this};var pn,Be=D.__private__.getFontSize=D.getFontSize=function(){return nt===mt?Qt:Qt*Rn},sn=t.R2L||!1;D.__private__.setR2L=D.setR2L=function(C){return sn=C,this},D.__private__.getR2L=D.getR2L=function(){return sn};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,kn=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,K){return si(C),Jn(E),kn(K),this};var Kn={title:"",subject:"",author:"",keywords:"",creator:""};D.__private__.getDocumentProperty=function(C){if(Object.keys(Kn).indexOf(C)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Kn[C]},D.__private__.getDocumentProperties=function(){return Kn},D.__private__.setDocumentProperties=D.setProperties=D.setDocumentProperties=function(C){for(var E in Kn)Kn.hasOwnProperty(E)&&C[E]&&(Kn[E]=C[E]);return this},D.__private__.setDocumentProperty=function(C,E){if(Object.keys(Kn).indexOf(C)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Kn[C]=E};var We,Rn,Xe,ji,ii,Vn={},Un={},Ti=[],ln={},yi={},hn={},Nn={},Ai=null,Hn=0,mn=[],ci=new x2(D),al=t.hotfixes||[],xa={},er={},Lo=[],dn=function C(E,K,at,gt,zt,Kt){if(!(this instanceof C))return new C(E,K,at,gt,zt,Kt);isNaN(E)&&(E=1),isNaN(K)&&(K=0),isNaN(at)&&(at=0),isNaN(gt)&&(gt=1),isNaN(zt)&&(zt=0),isNaN(Kt)&&(Kt=0),this._matrix=[E,K,at,gt,zt,Kt]};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,K=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,Kt=C.tx*this.shy+C.ty*this.sy+this.ty;return new dn(E,K,at,gt,zt,Kt)},dn.prototype.decompose=function(){var C=this.sx,E=this.shy,K=this.shx,at=this.sy,gt=this.tx,zt=this.ty,Kt=Math.sqrt(C*C+E*E),je=(C/=Kt)*K+(E/=Kt)*at;K-=C*je,at-=E*je;var $e=Math.sqrt(K*K+at*at);return je/=$e,C*(at/=$e)>16&255,at=$e>>8&255,gt=255&$e}if(at===void 0||zt===void 0&&K===at&&at===gt)E=typeof K=="string"?K+" "+Kt[0]:C.precision===2?j(K/255)+" "+Kt[0]:Y(K/255)+" "+Kt[0];else if(zt===void 0||fi(zt)==="object"){if(zt&&!isNaN(zt.a)&&zt.a===0)return["1.","1.","1.",Kt[1]].join(" ");E=typeof K=="string"?[K,at,gt,Kt[1]].join(" "):C.precision===2?[j(K/255),j(at/255),j(gt/255),Kt[1]].join(" "):[Y(K/255),Y(at/255),Y(gt/255),Kt[1]].join(" ")}else E=typeof K=="string"?[K,at,gt,zt,Kt[2]].join(" "):C.precision===2?[j(K),j(at),j(gt),j(zt),Kt[2]].join(" "):[Y(K),Y(at),Y(gt),Y(zt),Kt[2]].join(" ");return E},Co=D.__private__.getFilters=function(){return u},ao=D.__private__.putStream=function(C){var E=(C=C||{}).data||"",K=C.filters||Co(),at=C.alreadyAppliedFilters||[],gt=C.addLength1||!1,zt=E.length,Kt=C.objectId,je=function(ta){return ta};if(y!==null&&Kt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");y!==null&&(je=Qi.encryptor(Kt,0));var $e={};K===!0&&(K=["FlateEncode"]);var bn=C.additionalKeyValues||[],Bn=($e=Ke.API.processDataByFilters!==void 0?Ke.API.processDataByFilters(E,K):{data:E,reverseChain:[]}).reverseChain+(Array.isArray(at)?at.join(" "):at.toString());if($e.data.length!==0&&(bn.push({key:"Length",value:$e.data.length}),gt===!0&&bn.push({key:"Length1",value:zt})),Bn.length!=0)if(Bn.split("/").length-1==1)bn.push({key:"Filter",value:Bn});else{bn.push({key:"Filter",value:"["+Bn+"]"});for(var ai=0;ai>"),$e.data.length!==0&&(G("stream"),G(je($e.data)),G("endstream"))},rl=D.__private__.putPage=function(C){var E=C.number,K=C.data,at=C.objId,gt=C.contentsObjId;fa(at,!0),G("<>"),G("endobj");var zt=K.join(` `);return nt===dt&&(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,k=d.metadata.subset.encode(d.metadata.glyIdsUsed,1),D="",U=0;U>"),g("endobj");var mt=_();g("<<"),g("/Type /Font"),g("/BaseFont /"+_s(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 "+Z+" 0 R"),g("/BaseFont /"+_s(d.fontName)),g("/Encoding /"+d.encoding),g("/DescendantFonts ["+mt+" 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,k="",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||{},k=I.pdfEscape,D=I.activeFontKey,U=I.fonts,H=D,Z="",z=0,mt="",dt=U[H].encoding;if(U[H].encoding!=="Identity-H")return{text:d,x:g,y:_,options:y,mutex:I};for(mt=d,H=D,Array.isArray(d)&&(mt=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)$/),mt=!1,dt=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||(Mt=rt[ot-1])!=="EN"&&Mt!=="AN"||(Nt=Y[ot+1])!=="EN"&&Nt!=="AN"?qt="N":mt&&(Nt="AN"),qt=Nt===Mt?Nt:"N";break;case"ES":qt=(Mt=ot>0?rt[ot-1]:"B")==="EN"&&ot+10&&rt[ot-1]==="EN"){qt="EN";break}if(mt){qt="N";break}for(Rt=ot+1,St=Y.length;Rt=1425&&se<=2303||se===64286;if(Mt=Y[Rt],Jt&&(Mt==="R"||Mt==="AL")){qt="R";break}}}qt=ot<1||(Mt=Y[ot-1])==="B"?"N":rt[ot-1];break;case"B":mt=!1,a=!0,qt=dt;break;case"S":r=!0,qt="N"}return qt},jt=function(j,Y,rt){var ot=j.split("");return rt&&ht(ot,rt,{hiLevel:dt}),ot.reverse(),Y&&Y.reverse(),ot.join("")},ht=function(j,Y,rt){var ot,Mt,Nt,Rt,St,qt=-1,se=j.length,Jt=0,B=[],J=dt?D:k,et=[];for(mt=!1,a=!1,r=!1,Mt=0;Mt0)if(ot===16){for(Mt=qt;Mt-1){for(Mt=qt;Mt=0&&ct[kt]==="WS";kt--)ft[kt]=dt}})(et,Y,se)},tt=function(j,Y,rt,ot,Mt){if(!(Mt.hiLevel=j){for(St=Jt+1;St=j;)St++;for(qt=Jt,Rt=St-1;qt=0&&(Nt[se]=Z[qt+1])})(ot,rt,Mt),tt(2,ot,Y,rt,Mt),tt(1,ot,Y,rt,Mt),ot.join("")};return this.__bidiEngine__.doBidiReorder=function(j,Y,rt){if((function(Mt,Nt){if(Nt)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,k,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(k=e[H],a.writeString(H),a.writeInt(t(k)),a.writeInt(_),a.writeInt(k.length),U=U.concat(k),H==="head"&&(d=_),_+=k.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=Q2.call(e);e.length%4;)e.push(0);for(r=new tl(e),a=0,i=0,u=e.length;ik;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),n.pos+=2,H=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),_=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),y=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++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,dt=r.length;z=Z;i=U<=Z?++mt:--mt)y[g]===0?u=i+_[g]:(u=d[y[g]/2+(i-U)-(k-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,k,D,U,H,Z,z,mt,dt,nt,Ot,Yt,jt,ht,tt,xt,j,Y,rt,ot,Mt,Nt,Rt,St,qt,se,Jt,B,J,et,ct,ft,bt,It,kt,Ht,re,Me;switch(ot=new tl,u=Object.keys(n).sort(function(De,an){return De-an}),e){case"macroman":for(H=0,Z=(function(){var De=[];for(U=0;U<256;++U)De.push(0);return De})(),mt={0:0},r={},Mt=0,qt=u.length;Mt=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(xt),ot.writeUInt16(ht),ot.writeUInt16(k),ot.writeUInt16(jt),bt=0,B=I.length;bta;i=0<=a?++i:--i)e=new j2(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=j2.encode(n,e),(a=new tl).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},t})(),k3=(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})(),N3=(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})(),F3=(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})(),R3=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},B3=(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,k;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,k;for(k=[],_=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})(),Q2=[].slice,z3=(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 U3(d,_,I,g,y):new V3(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})(),G3=(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,k,D,U,H,Z,z;for(a in i=X2.encode(this.generateCmap(),"unicode"),u=this.glyphsFor(n),D={0:0},z=i.charMap)D[(g=z[a]).old]=g.new;for(U in k=i.maxGlyphID,u)U in D||(D[U]=k++);return y=(function(mt){var dt,nt;for(dt in nt={},mt)nt[mt[dt]]=dt;return nt})(D),I=Object.keys(y).sort(function(mt,dt){return mt-dt}),H=(function(){var mt,dt,nt;for(nt=[],mt=0,dt=I.length;mt>"),r.join(` `)}return""+e},n})();function og(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="",k=1;if((i.valign==="middle"||i.valign==="bottom"||i.halign==="center"||i.halign==="right")&&(I=typeof t=="string"?t.split(y):t,k=I.length||1),e+=d*(2-r),i.valign==="middle"?e-=k/2*_:i.valign==="bottom"&&(e-=k*_),i.halign==="center"||i.halign==="right"){var D=d;if(i.halign==="center"&&(D*=.5),I&&k>=1){for(var U=0;U0,i=n||n===0;return e&&i?"DF":e?"S":i?"F":null}function ym(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 pg(t,n){var e=ym(n.settings.margin,0);return t.pageSize().width-(e.left+e.right)}function Y3(t,n,e,i,a){var r={},u=1.3333333333333333,d=_u(n,function(dt){return a.getComputedStyle(dt).backgroundColor});d!=null&&(r.fillColor=d);var g=_u(n,function(dt){return a.getComputedStyle(dt).color});g!=null&&(r.textColor=g);var _=Z3(i,e);_&&(r.cellPadding=_);var y="borderTopColor",I=u*e,k=i.borderTopWidth;if(i.borderBottomWidth===k&&i.borderRightWidth===k&&i.borderLeftWidth===k){var D=(parseFloat(k)||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=_u(n,function(dt){return a.getComputedStyle(dt)[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 Z=parseInt(i.fontSize||"");isNaN(Z)||(r.fontSize=Z/u);var z=K3(i);z&&(r.fontStyle=z);var mt=(i.fontFamily||"").toLowerCase();return t.indexOf(mt)!==-1&&(r.font=mt),r}function K3(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 _u(t,n){var e=mg(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 mg(t,n){var e=n(t);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?t.parentElement==null?null:mg(t.parentElement,n):e}function Z3(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=ym(r,0);return a>u.top&&(u.top=a),a>u.bottom&&(u.bottom=a),u}function dg(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=[],k=[];if(!d)return console.error("Html table could not be found with input: ",n),{head:y,body:I,foot:k};for(var D=0;D0&&(a||I.display!=="none"))return u}function X3(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 Q3(t,n,e){for(var i=0,a=[t,n,e];i0?"_".concat(g):"");var y={dataKey:_};a.push(y)}}),a}var Du=(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})(),ry=(function(t){rg(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})(Du),ly=(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})(),hg=(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=ym(this.styles.cellPadding,0);return n==="vertical"?e.top+e.bottom:n==="horizontal"?e.left+e.right:e[n]},t})(),sy=(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"))),dy(n),uy(n,t),my(n)}function py(t,n){var e=t.scaleFactor(),i=n.settings.horizontalPageBreak,a=pg(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 wu(t,n,e){for(var i=n,a=t.reduce(function(D,U){return D+U.wrappedWidth},0),r=0;re(D):!0});k.length&&(n=wu(k,n,e))}return n}function my(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,k=y.rowSpan>I?I:y.rowSpan;n[g.index]={cell:y,left:k,row:r}}}}}function dy(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 uy(t,n){for(var e={count:0,height:0},i=0,a=t.allRows();i1&&e.count*e.height0&&e.height>k&&(k=e.height),k>r.height&&(r.height=k)}}e.count--}}function eg(t,n,e,i,a){return t.map(function(r){return fy(r,n,e,i,a)})}function fy(t,n,e,i,a){var r=1e4*i.scaleFactor();if(n=Math.ceil(n*r)/r,n>=vm(t,e,i))return t;for(;n0?e:null}function gy(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 _y(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 sy(a,n,e)})}function Cy(t,n,e,i,a,r,u){var d=$3(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:{},k=t==="body"&&e%2===0?Dr({},d.alternateRow,a.alternateRowStyles):{},D=W3(r),U=Dr({},D,_,k,I);return Dr(U,u)}function by(t,n,e){var i;e===void 0&&(e={});var a=pg(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(k){var D=n.columns.find(function(U){return U.dataKey===k||U.index===k});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 vy(t,n){for(var e=[],i=0;iy.pageSize().height)&&(bg(y),r.y=a.top),n.callWillDrawPageHooks(y,r);var I=Dr({},r);n.startPageNumber=y.pageNumber(),e.horizontalPageBreak?xy(y,n,I,r):(y.applyStyles(y.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&n.head.forEach(function(k){return wr(y,n,k,r,n.columns)}),y.applyStyles(y.userStyles),n.body.forEach(function(k,D){var U=D===n.body.length-1;xm(y,n,k,U,I,r,n.columns)}),y.applyStyles(y.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&n.foot.forEach(function(k){return wr(y,n,k,r,n.columns)})),sg(y,n,I,r),n.callEndPageHooks(y,r),n.finalY=r.y,t.lastAutoTable=n,y.applyStyles(y.userStyles)}function xy(t,n,e,i){var a=vy(t,n),r=n.settings;if(r.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(_,y){t.applyStyles(t.userStyles),y>0?Ac(t,n,e,i,_.columns,!0):ig(t,n,i,_.columns),yy(t,n,e,i,_.columns),bu(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?Ac(t,n,e,i,y,!0):ig(t,n,i,y),_=ag(t,n,u+1,i,y),bu(t,n,i,y)}var I=_-u;a.slice(1).forEach(function(k){t.applyStyles(t.userStyles),Ac(t,n,e,i,k.columns,!0),ag(t,n,u+1,i,k.columns,I),bu(t,n,i,k.columns)}),u=_};uI&&(y.text=_.text.splice(I,_.text.length));var k=i.scaleFactor(),D=i.getLineHeightFactor();_.contentHeight=_.getContentHeight(k,D),_.contentHeight>=n&&(_.contentHeight=n,y.styles.minCellHeight-=n),_.contentHeight>t.height&&(t.height=_.contentHeight),y.contentHeight=y.getContentHeight(k,D),y.contentHeight>r&&(r=y.contentHeight),a[g.index]=y}}var U=new fg(t.raw,-1,t.section,a,!0);U.height=r;for(var H=0,Z=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 xm(t,n,e,i,a,r,u){var d=Cg(t,n,i,r);if(e.canEntireRowFit(d,u))wr(t,n,e,r,u);else if(wy(t,e,d,n)){var g=Dy(e,d,n,t);wr(t,n,e,r,u),Ac(t,n,a,r,u),xm(t,n,g,i,a,r,u)}else Ac(t,n,a,r,u),xm(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 Ss(this),r=dg(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 vu;function vg(t,n){var e=ug(t,n),i=gg(t,e);_g(t,i)}try{typeof window<"u"&&window&&(xu=window,yu=xu.jsPDF||((vu=xu.jspdf)===null||vu===void 0?void 0:vu.jsPDF),yu&&Ay(yu))}catch(t){console.error("Could not apply autoTable plugin",t)}var xu,yu;var My=()=>["header","header-amount","header-total-cost","header-installment-totals"];function Oy(t,n){if(t&1){let e=Ct();s(0,"div",1)(1,"button",4),it("click",function(){lt(e);let a=T();return st(a.exportToPDF())}),P(2,"fa-icon",5),c(3,"Export to PDF "),l()()}}function Iy(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function Ey(t,n){if(t&1&&(s(0,"td",43),c(1),l()),t&2){let e=n.$implicit;o(),b(e.period)}}function Ly(t,n){t&1&&(s(0,"td",44),c(1,"\xA0"),l())}function ky(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 Ny(t,n){if(t&1&&(s(0,"td",45),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",e.daysInPeriod," ")}}function Fy(t,n){t&1&&(s(0,"td",46)(1,"b"),c(2," Total"),l()())}function Ry(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 By(t,n){if(t&1&&(s(0,"td",47),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.dueDate)," ")}}function qy(t,n){t&1&&P(0,"td",44)}function jy(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 zy(t,n){if(t&1&&(s(0,"td",45),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.obligationsMetOnDate)," ")}}function Vy(t,n){t&1&&P(0,"td",44)}function Uy(t,n){t&1&&(s(0,"th",48),c(1,"\xA0"),l())}function Hy(t,n){t&1&&(s(0,"span"),P(1,"i",49),l())}function Gy(t,n){if(t&1&&(s(0,"td",45),M(1,Hy,2,0,"span"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),O(e.obligationsMetOnDate?1:-1)}}function Wy(t,n){t&1&&P(0,"td",44)}function $y(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 Yy(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.principalLoanBalanceOutstanding)," ")}}function Ky(t,n){t&1&&(s(0,"td",52),c(1,"\xA0"),l())}function Zy(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 Jy(t,n){if(t&1&&(s(0,"td",53),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.principalDue)," ")}}function Xy(t,n){if(t&1&&(s(0,"td",54)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPrincipalExpected,e.currencyCode,"symbol-narrow","1.2-2"))}}function Qy(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 t4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.interestOriginalDue)," ")}}function e4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalInterestCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function n4(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 i4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.feeChargesDue)," ")}}function a4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalFeeChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function o4(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 r4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.penaltyChargesDue)," ")}}function l4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPenaltyChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}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.Due")," "))}function c4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalDueForPeriod)," ")}}function p4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepaymentExpected,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function m4(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 d4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidForPeriod)," ")}}function u4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepayment,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function f4(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 h4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidInAdvanceForPeriod)," ")}}function g4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidInAdvance,e.currencyCode,"symbol-narrow","1.2-2")," ")}}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.Late")," "))}function C4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalPaidLateForPeriod)," ")}}function b4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidLate,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function v4(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 x4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(3);x("ngClass",i.installmentStyle(e)),o(),v(" ",m(2,2,e.totalWaivedForPeriod)," ")}}function y4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(3);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalWaived,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function S4(t,n){t&1&&(X(0,32),N(1,v4,3,3,"th",19)(2,x4,3,4,"td",20)(3,y4,4,6,"td",21),Q())}function D4(t,n){t&1&&P(0,"th",48)}function w4(t,n){t&1&&P(0,"td",56)}function P4(t,n){t&1&&(s(0,"td",44),P(1,"b"),l())}function T4(t,n){t&1&&(X(0,32),N(1,D4,1,0,"th",17)(2,w4,1,0,"td",55)(3,P4,2,0,"td",9),Q())}function A4(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 M4(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 O4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),v(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalOutstanding,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function I4(t,n){t&1&&P(0,"th",48),t&2&&oa("colspan",5)}function E4(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 L4(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 k4(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 N4(t,n){t&1&&P(0,"tr",58)}function F4(t,n){t&1&&P(0,"tr",58)}function R4(t,n){t&1&&P(0,"tr",59)}function B4(t,n){t&1&&P(0,"tr",60)}function q4(t,n){if(t&1&&(s(0,"table",2),X(1,6),N(2,Iy,2,0,"th",7)(3,Ey,2,1,"td",8)(4,Ly,2,0,"td",9),Q(),X(5,10),N(6,ky,3,3,"th",7)(7,Ny,2,2,"td",11)(8,Fy,3,0,"td",12),Q(),X(9,13),N(10,Ry,3,3,"th",7)(11,By,3,4,"td",14)(12,qy,1,0,"td",9),Q(),X(13,15),N(14,jy,3,3,"th",7)(15,zy,3,4,"td",11)(16,Vy,1,0,"td",9),Q(),X(17,16),N(18,Uy,2,0,"th",17)(19,Gy,2,2,"td",11)(20,Wy,1,0,"td",9),Q(),X(21,18),N(22,$y,3,3,"th",19)(23,Yy,3,4,"td",20)(24,Ky,2,0,"td",21),Q(),X(25,22),N(26,Zy,3,3,"th",19)(27,Jy,3,4,"td",23)(28,Xy,4,6,"td",24),Q(),X(29,25),N(30,Qy,3,3,"th",19)(31,t4,3,4,"td",20)(32,e4,4,6,"td",21),Q(),X(33,26),N(34,n4,3,3,"th",19)(35,i4,3,4,"td",20)(36,a4,4,6,"td",21),Q(),X(37,27),N(38,o4,3,3,"th",19)(39,r4,3,4,"td",20)(40,l4,4,6,"td",21),Q(),X(41,28),N(42,s4,3,3,"th",19)(43,c4,3,4,"td",20)(44,p4,4,6,"td",21),Q(),X(45,29),N(46,m4,3,3,"th",19)(47,d4,3,4,"td",20)(48,u4,4,6,"td",21),Q(),X(49,30),N(50,f4,3,3,"th",19)(51,h4,3,4,"td",20)(52,g4,4,6,"td",21),Q(),X(53,31),N(54,_4,3,3,"th",19)(55,C4,3,4,"td",20)(56,b4,4,6,"td",21),Q(),M(57,S4,4,0,"ng-container",32),M(58,T4,4,0,"ng-container",32),X(59,33),N(60,A4,3,3,"th",19)(61,M4,3,3,"td",34)(62,O4,4,6,"td",21),Q(),X(63,35),N(64,I4,1,1,"th",17),Q(),X(65,36),N(66,E4,3,4,"th",7),Q(),X(67,37),N(68,L4,3,4,"th",7),Q(),X(69,38),N(70,k4,3,4,"th",7),Q(),N(71,N4,1,0,"tr",39)(72,F4,1,0,"tr",39)(73,R4,1,0,"tr",40)(74,B4,1,0,"tr",41),l()),t&2){let e=T();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,My)),o(),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns),o(),x("matFooterRowDef",e.displayedColumns)}}function j4(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function z4(t,n){if(t&1&&(s(0,"td",56),c(1),l()),t&2){let e=n.$implicit;o(),b(e.period)}}function V4(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 U4(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 H4(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 G4(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 W4(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 $4(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 Y4(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 K4(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 Z4(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 J4(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 X4(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 Q4(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"formatNumber"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.totalDueForPeriod)," ")}}function tS(t,n){if(t&1&&(s(0,"span",66)(1,"b"),c(2),p(3,"formatNumber"),l()()),t&2){let e=T().$implicit;o(2),b(m(3,1,e.totalDueForPeriod))}}function eS(t,n){if(t&1&&(s(0,"td",57),M(1,Q4,3,3,"span"),M(2,tS,4,3,"span",66),l()),t&2){let e=n.$implicit;o(),O(e.changed?-1:1),o(),O(e.changed?2:-1)}}function nS(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 iS(t,n){if(t&1){let e=Ct();s(0,"span"),X(1),s(2,"button",68),p(3,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.editInstallment(a))}),P(4,"fa-icon",69),l(),s(5,"button",70),p(6,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.startEdit(a.period))}),P(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 aS(t,n){if(t&1&&(s(0,"td",67),M(1,iS,8,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(e.period&&e.period+1<(i.repaymentScheduleDetails==null||i.repaymentScheduleDetails.periods==null?null:i.repaymentScheduleDetails.periods.length)?1:-1)}}function oS(t,n){t&1&&P(0,"td",44)}function rS(t,n){t&1&&P(0,"tr",58)}function lS(t,n){t&1&&P(0,"tr",72)}function sS(t,n){if(t&1&&(s(0,"table",3),X(1,6),N(2,j4,2,0,"th",7)(3,z4,2,1,"td",55),Q(),X(4,13),N(5,V4,3,3,"th",7)(6,U4,4,3,"td",61),Q(),X(7,18),N(8,H4,3,3,"th",19)(9,G4,3,3,"td",34),Q(),X(10,22),N(11,W4,3,3,"th",19)(12,$4,4,3,"td",34),Q(),X(13,25),N(14,Y4,3,3,"th",19)(15,K4,3,3,"td",34),Q(),X(16,26),N(17,Z4,3,3,"th",19)(18,J4,3,3,"td",34),Q(),X(19,28),N(20,X4,3,3,"th",19)(21,eS,3,2,"td",34),Q(),X(22,62),N(23,nS,3,3,"th",17)(24,aS,2,1,"td",63)(25,oS,1,0,"td",9),Q(),N(26,rS,1,0,"tr",39)(27,lS,1,0,"tr",64),l()),t&2){let e=T();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(me),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 Kl,this.businessDate=new Date,this.destroyRef=A(fp),this.businessDate=this.settingsService.businessDate}ngOnInit(){this.route.parent?this.route.parent.data.pipe(Op(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,me.DEFAULT_DATEFORMAT)}.pdf`,a={orientation:"l",unit:"in",format:"letter",precision:2,compress:!0,putOnlyUsedFonts:!0},r=new Ke(a);vg(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 Pi({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,Oy,4,0,"div",1),M(2,q4,75,8,"table",2),M(3,sS,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,Pt,Gt,un,vn,Sn,yn,Dn,xn,wn,Sp,Dp,Pn,An,Tn,Mn,wp,Pp,qa,Oi,Sa,gn,Tt,fn],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}.dark-theme[_nghost-%COMP%] .mat-header-cell[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{color:#ffffffb3}div.container[_ngcontent-%COMP%]{overflow:auto;max-width:100%}"]})}}return t})();var cS=()=>[50,100,200],pS=()=>["export"],mS=t=>[t,"reciept"],dS=t=>["/","journal-entry","view",t];function uS(t,n){if(t&1){let e=Ct();s(0,"div",2)(1,"mat-checkbox",46),it("click",function(){lt(e);let a=T();return st(a.hideReversed())}),c(2),p(3,"translate"),l(),s(4,"mat-checkbox",46),it("click",function(){lt(e);let a=T();return st(a.hideAccruals())}),c(5),p(6,"translate"),l(),s(7,"button",47),c(8),p(9,"translate"),l()()}if(t&2){let e=T();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,pS)),o(),v(" ",m(9,10,"labels.buttons.Export")," ")}}function fS(t,n){if(t&1){let e=Ct();s(0,"td",48),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.index;o(),v(" ",e+1," ")}}function hS(t,n){if(t&1){let e=Ct();s(0,"td",49),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",e.id," ")}}function gS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",e.officeName," ")}}function _S(t,n){if(t&1&&(s(0,"td",51),P(1,"mifosx-external-identifier",52),l()),t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),x("externalId",ce(e.externalId))}}function CS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"dateFormat"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.date)," ")}}function bS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"translateKey"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",Re(2,2,e.type.value,"catalogs")," ")}}function vS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.amount)," ")}}function xS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.principalPortion)," ")}}function yS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.interestPortion)," ")}}function SS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.feeChargesPortion)," ")}}function DS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.penaltyChargesPortion)," ")}}function wS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),v(" ",m(2,2,e.outstandingLoanBalance)," ")}}function PS(t,n){if(t&1&&(s(0,"button",55)(1,"mat-icon"),c(2,"more_vert"),l()()),t&2){T();let e=Lt(3);x("matMenuTriggerFor",e)}}function TS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.showTransactions(a))}),s(2,"mat-icon"),P(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 AS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.openInterestRefundDialog(a))}),s(2,"mat-icon"),P(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 MS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoTransaction(r,a))}),s(1,"mat-icon"),P(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 OS(t,n){if(t&1){let e=Ct();s(0,"span"),N(1,MS,6,3,"button",59),s(2,"button",60),it("click",function(a){lt(e);let r=T(2);return st(r.routeEdit(a))}),s(3,"mat-icon"),P(4,"fa-icon",61),l(),s(5,"span"),c(6),p(7,"translate"),l()()()}if(t&2){let e=T().$implicit;o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("routerLink",ka(5,mS,e.id)),o(4),b(m(7,3,"tooltips.View Receipts"))}}function IS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),P(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 ES(t,n){t&1&&(s(0,"span"),N(1,IS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAGE_LOAN"))}function LS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),P(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 kS(t,n){t&1&&(s(0,"span"),N(1,LS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAMORTIZE_LOAN"))}function NS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.capitalizedIncomeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),P(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 FS(t,n){t&1&&(s(0,"span"),N(1,NS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","CAPITALIZEDINCOME_LOAN"))}function RS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.buyDownFeeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),P(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 BS(t,n){t&1&&(s(0,"span"),N(1,RS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","BUYDOWNFEE_LOAN"))}function qS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",64),it("click",function(a){lt(e);let r=T(2);return st(r.routeEdit(a))}),s(2,"mat-icon"),P(3,"fa-icon",65),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}if(t&2){let e=T().$implicit;o(),x("routerLink",ka(4,dS,"L"+e.id)),o(4),b(m(6,2,"tooltips.View Journal Entries"))}}function jS(t,n){if(t&1&&(s(0,"td",54),M(1,PS,3,1,"button",55),s(2,"mat-menu",null,0),M(4,TS,7,3,"span"),M(5,AS,7,3,"span"),M(6,OS,8,7,"span"),M(7,ES,2,1,"span"),M(8,kS,2,1,"span"),M(9,FS,2,1,"span"),M(10,BS,2,1,"span"),M(11,qS,7,6,"span"),l()()),t&2){let e=n.$implicit,i=T();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 zS(t,n){t&1&&(s(0,"th",66),c(1,"#"),l())}function VS(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 US(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 HS(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 GS(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 WS(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 $S(t,n){t&1&&P(0,"th",66)}function YS(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 KS(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 ZS(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 JS(t,n){t&1&&P(0,"th",66),t&2&&oa("colspan",6)}function XS(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 QS(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 tD(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 eD(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 nD(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 iD(t,n){t&1&&P(0,"th",66),t&2&&oa("colspan",2)}function aD(t,n){t&1&&P(0,"tr",69)}function oD(t,n){t&1&&P(0,"tr",69)}function rD(t,n){t&1&&P(0,"tr",70)}var Sm=(()=>{class t{constructor(){this.route=A(Et),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.loansService=A(At),this.translateService=A(pa),this.settingsService=A(oe),this.alertService=A(Ql),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 k=e.id;(this.isChargeOff(e.type)||d==="undowriteoff"||this.isWriteOff(e.type))&&(k=null),this.loansService.executeLoansAccountTransactionsCommand(u,d,_,k).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 e1({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 Pi({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:a.amount,type:"number",required:!0,readonly:!0,order:1}),r,new Pi({controlName:"externalId",label:this.translateService.instant("labels.inputs.External Id"),value:"",type:"text",required:!1,order:3}),new Pi({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:k}=y,D=Tf(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 Pi({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Wt.min(.001),Wt.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 k=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:k,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 Pi({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Wt.min(.001),Wt.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 k=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:k,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,uS,10,13,"div",2),s(2,"table",3),X(3,4),N(4,fS,2,1,"td",5),Q(),X(5,6),N(6,hS,2,2,"td",7),Q(),X(7,8),N(8,gS,2,2,"td",9),Q(),X(9,10),N(10,_S,2,3,"td",11),Q(),X(11,12),N(12,CS,3,4,"td",9),Q(),X(13,13),N(14,bS,3,5,"td",9),Q(),X(15,14),N(16,vS,3,4,"td",15),Q(),X(17,16),N(18,xS,3,4,"td",15),Q(),X(19,17),N(20,yS,3,4,"td",15),Q(),X(21,18),N(22,SS,3,4,"td",15),Q(),X(23,19),N(24,DS,3,4,"td",15),Q(),X(25,20),N(26,wS,3,4,"td",15),Q(),X(27,21),N(28,jS,12,9,"td",22),Q(),X(29,23),N(30,zS,2,0,"th",24),Q(),X(31,25),N(32,VS,3,3,"th",24),Q(),X(33,26),N(34,US,3,3,"th",24),Q(),X(35,27),N(36,HS,3,3,"th",24),Q(),X(37,28),N(38,GS,3,3,"th",24),Q(),X(39,29),N(40,WS,3,3,"th",24),Q(),X(41,30),N(42,$S,1,0,"th",24),Q(),X(43,31),N(44,YS,3,4,"th",32),Q(),X(45,33),N(46,KS,3,3,"th",24),Q(),X(47,34),N(48,ZS,3,3,"th",32),Q(),X(49,35),N(50,JS,1,1,"th",24),Q(),X(51,36),N(52,XS,3,4,"th",37),Q(),X(53,38),N(54,QS,3,4,"th",37),Q(),X(55,39),N(56,tD,3,4,"th",37),Q(),X(57,40),N(58,eD,3,4,"th",37),Q(),X(59,41),N(60,nD,3,4,"th",37),Q(),X(61,42),N(62,iD,1,1,"th",24),Q(),N(63,aD,1,0,"tr",43)(64,oD,1,0,"tr",43)(65,rD,1,0,"tr",44),l(),P(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,cS)))},dependencies:[wt,ca,Pt,he,Wo,ae,Gt,Da,Ae,vn,wo,Sn,xn,wn,Va,qa,vp,xp,bp,Cp,un,yn,Dn,Pn,An,Tn,Mn,Do,gn,Tt,wa,fn],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 lD=()=>["header","header-amount","header-total-cost","header-installment-totals"];function sD(t,n){t&1&&(s(0,"th",24),c(1,"#"),l())}function cD(t,n){if(t&1&&(s(0,"td",25),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function pD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function mD(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 dD(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 uD(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 fD(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 hD(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 gD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function _D(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 CD(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 bD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalPrincipalExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function vD(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 xD(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 yD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalInterestCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function SD(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 DD(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 wD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalFeeChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function PD(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 TD(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 AD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalPenaltyChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function MD(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 OD(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 ID(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),v(" ",Ye(3,1,e.originalScheduleDetails.totalRepaymentExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ED(t,n){t&1&&P(0,"th",30),t&2&&oa("colspan",2)}function LD(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 kD(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 ND(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 FD(t,n){t&1&&P(0,"tr",31)}function RD(t,n){t&1&&P(0,"tr",31)}function BD(t,n){t&1&&P(0,"tr",32)}function qD(t,n){t&1&&P(0,"tr",33)}var Dm=(()=>{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),N(3,sD,2,0,"th",3)(4,cD,2,1,"td",4)(5,pD,2,0,"td",5),Q(),X(6,6),N(7,mD,3,3,"th",3)(8,dD,3,3,"td",4)(9,uD,4,3,"td",5),Q(),X(10,7),N(11,fD,3,3,"th",8)(12,hD,3,3,"td",9)(13,gD,2,0,"td",5),Q(),X(14,10),N(15,_D,3,3,"th",8)(16,CD,3,3,"td",9)(17,bD,4,6,"td",11),Q(),X(18,12),N(19,vD,3,3,"th",8)(20,xD,3,3,"td",9)(21,yD,4,6,"td",11),Q(),X(22,13),N(23,SD,3,3,"th",8)(24,DD,3,3,"td",9)(25,wD,4,6,"td",11),Q(),X(26,14),N(27,PD,3,3,"th",8)(28,TD,3,3,"td",9)(29,AD,4,6,"td",11),Q(),X(30,15),N(31,MD,3,3,"th",8)(32,OD,3,3,"td",9)(33,ID,4,6,"td",11),Q(),X(34,16),N(35,ED,1,1,"th",17),Q(),X(36,18),N(37,LD,3,4,"th",17),Q(),X(38,19),N(39,kD,3,4,"th",17),Q(),X(40,20),N(41,ND,3,4,"th",17),Q(),N(42,FD,1,0,"tr",21)(43,RD,1,0,"tr",21)(44,BD,1,0,"tr",22)(45,qD,1,0,"tr",23),l()()),i&2&&(o(),x("dataSource",a.originalScheduleDetails.periods),o(41),x("matHeaderRowDef",Ut(5,lD)),o(),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("matFooterRowDef",a.displayedColumns))},dependencies:[wt,Pt,vn,wo,Sn,yn,Dn,xn,wn,Sp,Dp,Pn,An,Tn,Mn,wp,Pp,Sa,gn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();var jD=()=>[10,25,50,100];function zD(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 VD(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 UD(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 HD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function GD(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 WD(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 $D(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 YD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function KD(t,n){t&1&&P(0,"tr",13)}function ZD(t,n){t&1&&P(0,"tr",14)}var wm=(()=>{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),N(3,zD,3,3,"th",3)(4,VD,2,2,"td",4),Q(),X(5,5),N(6,UD,3,3,"th",3)(7,HD,2,1,"td",4),Q(),X(8,6),N(9,GD,3,3,"th",3)(10,WD,3,3,"td",4),Q(),X(11,7),N(12,$D,3,3,"th",3)(13,YD,2,1,"td",4),Q(),N(14,KD,1,0,"tr",8)(15,ZD,1,0,"tr",9),l(),P(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,jD)))},dependencies:[wt,Pt,vn,wo,Sn,yn,Dn,yp,xn,wn,Pn,An,Tn,Mn,Do,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}"]})}}return t})();var JD=()=>[50,100,200],XD=t=>[t];function QD(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 tw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.name)}}function ew(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 nw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Penalty")))}function iw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Fee")))}function aw(t,n){if(t&1&&(s(0,"td",23),M(1,nw,3,3,"span"),M(2,iw,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.penalty?1:-1),o(),O(e.penalty?-1:2)}}function ow(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 rw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function lw(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 sw(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 cw(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 pw(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 mw(t,n){if(t&1&&(s(0,"th",24),M(1,cw,3,3,"span"),M(2,pw,3,3,"span"),l()),t&2){let e=T();x("hide",e.useDueDate),o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function dw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(m(2,1,e.dueDate))}}function uw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(m(2,1,e.submittedOnDate))}}function fw(t,n){if(t&1&&(s(0,"td",23),M(1,dw,3,3,"span"),M(2,uw,3,3,"span"),l()),t&2){let e=T();o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function hw(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 gw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function _w(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 Cw(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 bw(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 vw(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 xw(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 yw(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 Sw(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 Dw(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 ww(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 Pw(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",30),p(2,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.editCharge(r))}),P(3,"i",31),l(),s(4,"button",32),p(5,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.deleteCharge(r.id))}),P(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 Tw(t,n){if(t&1){let e=Ct();s(0,"button",34),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.adjustCharge(r.id))}),P(2,"i",31),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Adjust Charge")))}function Aw(t,n){if(t&1){let e=Ct();s(0,"button",30),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.payCharge(r.id))}),P(2,"i",35),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Pay Charge")))}function Mw(t,n){if(t&1){let e=Ct();s(0,"button",30),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.waiveCharge(r.id))}),P(2,"i",36),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Waive Charge")))}function Ow(t,n){if(t&1&&(s(0,"td",27),M(1,Pw,7,8,"span"),M(2,Tw,3,4,"button",28),M(3,Aw,3,4,"button",29),M(4,Mw,3,4,"button",29),l()),t&2){let e=n.$implicit,i=T();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 Iw(t,n){t&1&&P(0,"tr",37)}function Ew(t,n){if(t&1&&P(0,"tr",38),t&2){let e=n.$implicit;x("routerLink",ka(1,XD,e.id))}}var Pm=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(Et),this.dateUtils=A(me),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 Pi({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),N(3,QD,3,3,"th",3)(4,tw,2,1,"td",4),Q(),X(5,5),N(6,ew,3,3,"th",3)(7,aw,3,2,"td",4),Q(),X(8,6),N(9,ow,3,3,"th",3)(10,rw,2,1,"td",4),Q(),X(11,7),N(12,lw,3,3,"th",3)(13,sw,3,3,"td",4),Q(),X(14,8),N(15,mw,3,3,"th",9)(16,fw,3,2,"td",4),Q(),X(17,10),N(18,hw,3,3,"th",3)(19,gw,2,1,"td",4),Q(),X(20,11),N(21,_w,3,3,"th",12)(22,Cw,3,6,"td",13),Q(),X(23,14),N(24,bw,3,3,"th",12)(25,vw,3,6,"td",13),Q(),X(26,15),N(27,xw,3,3,"th",12)(28,yw,3,6,"td",13),Q(),X(29,16),N(30,Sw,3,3,"th",12)(31,Dw,3,6,"td",13),Q(),X(32,17),N(33,ww,3,3,"th",12)(34,Ow,5,4,"td",18),Q(),N(35,Iw,1,0,"tr",19)(36,Ew,1,3,"tr",20),l(),P(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,JD)))},dependencies:[wt,Pt,ae,Gt,vn,wo,Sn,yn,Dn,yp,xn,wn,Oi,Pn,An,Tn,Mn,Do,Sa,gn,Tt],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),P(1,"mifosx-entity-datatable-tab",1),l()),i&2&&(o(),x("entityId",a.entityId)("multiRowDatatableFlag",a.multiRowDatatableFlag)("entityDatatable",a.entityDatatable))},dependencies:[wt,Pt,g1],encapsulation:2})}}return t})();var Lw=()=>["../../general"];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.Closed Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function Nw(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.closeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Am=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,kw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),N(23,Nw,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,Lw)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Fw=()=>["../../general"];function Rw(t,n){if(t&1){let e=Ct();s(0,"button",7),it("click",function(){lt(e);let a=T();return st(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Submit")," "))}var Mm=(()=>{class t{constructor(){this.loanService=A(At),this.formBuilder=A(Pe),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(),P(8,"textarea",3),l(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),N(13,Rw,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,Fw)),o(),v(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVALUNDO_LOAN"))},dependencies:[wt,Pt,we,he,Wo,ae,xe,Oe,Ve,_e,ge,Te,Gt,Ae,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Bw=()=>["../../general"];function qw(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 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.Loan Officer")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function zw(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 Vw(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.assignOfficerForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Om=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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:["",Wt.required],assignmentDate:[new Date,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(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),de(10,qw,2,2,"mat-option",5,Ce),l(),M(12,jw,7,9,"mat-error"),l(),s(13,"mat-form-field",6),it("click",function(){lt(r);let d=Lt(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),M(21,zw,7,9,"mat-error"),l()(),s(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),l(),N(26,Vw,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),ue(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,Bw)),o(),v(" ",m(25,16,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","BULKREASSIGN_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Uw=()=>["../../general"];function Hw(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 Gw(t,n){if(t&1&&(s(0,"button",16),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.foreclosureForm.valid),o(),v(" ",m(2,2,"labels.buttons.Foreclosure")," ")}}var Im=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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),Wt.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:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,Hw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"input",8),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),P(28,"input",9),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),P(33,"input",10),l(),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"input",11),l(),s(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),l(),P(43,"textarea",12),l()(),s(44,"mat-card-actions",13)(45,"button",14),c(46),p(47,"translate"),l(),N(48,Gw,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,Uw)),o(),v(" ",m(47,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","FORECLOSURE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Ww=()=>["../../general"];function $w(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 Yw(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",14),it("click",function(){lt(e);let a=Lt(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",15)(5,"mat-datepicker-toggle",16)(6,"mat-datepicker",null,0),M(8,$w,7,9,"mat-error"),l()}if(t&2){let e=Lt(7),i=T();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 Kw(t,n){if(t&1&&P(0,"mifosx-input-amount",7),t&2){let e=T();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.prepayLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")}}function Zw(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 Jw(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",17),de(5,Zw,2,2,"mat-option",18,Ce),l()()),t&2){let e=T();o(2),b(m(3,1,"labels.inputs.Payment Type")),o(3),ue(e.paymentTypes)}}function Xw(t,n){if(t&1){let e=Ct();s(0,"div",9)(1,"span",19),it("click",function(){lt(e);let a=T();return st(a.addPaymentDetails())}),s(2,"mat-slide-toggle")(3,"div",20)(4,"span",21),c(5),p(6,"translate"),l()()()()()}if(t&2){let e=T();o(3),x("className",e.showPaymentDetails?"enabled":"disabled"),o(2),b(m(6,2,"labels.inputs.Show Payment Details"))}}function Qw(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",23),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",24),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",25),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(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 tP(t,n){if(t&1&&(s(0,"button",27),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.prepayLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Em=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],transactionAmount:["",Wt.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,Yw,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,Kw,1,4,"mifosx-input-amount",7),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",8),l(),M(37,Jw,7,3,"mat-form-field"),M(38,Xw,7,4,"div",9),M(39,Qw,25,15),s(40,"mat-form-field")(41,"mat-label"),c(42),p(43,"translate"),l(),P(44,"textarea",10),l()(),s(45,"mat-card-actions",11)(46,"button",12),c(47),p(48,"translate"),l(),N(49,tP,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,Ww)),o(),v(" ",m(48,39,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Bi,ja,Wn,Tt,fn],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 Lm=(()=>{class t{constructor(){this.loanService=A(At),this.dateUtils=A(me)}loadPenalties(e){return this.loanService.getLoanCharges(e).pipe(If(i=>{let a=[];Array.isArray(i)?a=i:i&&Array.isArray(i.pageItems)?a=i.pageItems:i&&Array.isArray(i.content)?a=i.content:i&&Array.isArray(i.charges)?a=i.charges:i&&i.data&&Array.isArray(i.data)&&(a=i.data);let r=this.filterPenaltyCharges(a);return r.forEach(u=>{u.dueDate&&(u.dueDate=this.dateUtils.parseDate(u.dueDate))}),r.sort((u,d)=>u.dueDate&&d.dueDate?u.dueDate.getTime()-d.dueDate.getTime():0),r}))}filterPenaltyCharges(e){return!e||!Array.isArray(e)?[]:e.filter(i=>!i||!(i.penalty===!0||i.penalty==="true"||i.chargeTimeType&&(i.chargeTimeType.value?.toLowerCase().includes("overdue")||i.chargeTimeType.code?.toLowerCase().includes("overdue")||i.chargeTimeType.id===9))||i.waived===!0||i.waived==="true"||i.paid===!0||i.paid==="true"?!1:(i.amountOutstanding||i.amountOutstanding===0?i.amountOutstanding:i.amount)>0)}toggleSelectAllPenalties(e,i){let a=!e;return{selectAllPenalties:a,selectedPenalties:a?i.map(r=>r.id):[]}}togglePenaltySelection(e,i,a){let r=[...i],u=r.indexOf(e);u>-1?r.splice(u,1):r.push(e);let d=a.length,g=d===0?!1:r.length===d;return{selectedPenalties:r,selectAllPenalties:g}}isPenaltySelected(e,i){return i.includes(e)}getPenaltyDisplayKey(e){if(!e)return"labels.inputs.Overdue Fees";let i=(e.name||e.chargeTimeType?.value||"Overdue Fees").toString().trim(),a=i.toUpperCase();return a==="MORA"||a==="OVERDUE"?"labels.inputs.Overdue":a==="OVERDUE FEES"?"labels.inputs.Overdue Fees":(i.startsWith("labels."),i)}waivePenalties(e,i){if(!i||i.length===0)return ld([]);let a=i.map(r=>this.loanService.executeLoansAccountChargesCommand(e,"waive",{},r).pipe(Lf(u=>(console.error(`Error waiving penalty ${r}:`,u),ld(null)))));return Ef(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var eP=()=>["../../general"],nP=(t,n)=>n.id;function iP(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 aP(t,n){if(t&1&&(s(0,"div",7)(1,"div",19),c(2),p(3,"translate"),l(),s(4,"div",20),c(5),p(6,"formatNumber"),l(),s(7,"div",19),c(8),p(9,"translate"),l(),s(10,"div",20),c(11),p(12,"formatNumber"),l(),s(13,"div",19),c(14),p(15,"translate"),l(),s(16,"div",20),c(17),p(18,"formatNumber"),l(),s(19,"div",19),c(20),p(21,"translate"),l(),s(22,"div",20),c(23),p(24,"formatNumber"),l()()),t&2){let e=T();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 oP(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 rP(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",21),de(5,oP,2,2,"mat-option",11,Ce),l()()),t&2){let e=T();o(2),b(m(3,1,"labels.inputs.Classification")),o(3),ue(e.classificationOptions)}}function lP(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 sP(t,n){if(t&1){let e=Ct();s(0,"div",26)(1,"mat-checkbox",13),it("change",function(){let a=lt(e).$implicit,r=T(3);return st(r.togglePenaltySelection(a.id))}),l(),s(2,"span",27),c(3),p(4,"translate"),l(),s(5,"span",28),c(6),p(7,"translate"),l(),s(8,"span",29),c(9),p(10,"dateFormat"),l(),s(11,"span",30),c(12),p(13,"formatNumber"),l()()}if(t&2){let e=n.$implicit,i=T(3);o(),x("checked",i.isPenaltySelected(e.id)),o(2),b(m(4,5,"labels.inputs.Penalty")),o(3),b(m(7,7,i.getPenaltyDisplayKey(e))),o(3),b(m(10,9,e.dueDate)),o(3),b(m(13,11,e.amountOutstanding||e.amount||0))}}function cP(t,n){if(t&1){let e=Ct();s(0,"div",22)(1,"div",24)(2,"mat-checkbox",13),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelectAllPenalties())}),c(3),p(4,"translate"),l()(),s(5,"div",25),de(6,sP,14,13,"div",26,nP),l()()}if(t&2){let e=T(2);o(2),x("checked",e.selectAllPenalties),o(),v(" ",m(4,2,"labels.inputs.All")," "),o(3),ue(e.penalties)}}function pP(t,n){t&1&&(s(0,"div",23)(1,"span",31),c(2),p(3,"translate"),l()()),t&2&&(o(2),b(m(3,1,"labels.text.No penalties found")))}function mP(t,n){if(t&1&&M(0,cP,8,4,"div",22)(1,pP,4,3,"div",23),t&2){let e=T();O(e.penalties.length>0?0:1)}}function dP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",32),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",33),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",34),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",35),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",36),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 uP(t,n){t&1&&(s(0,"mat-checkbox",15),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Skip Interest Refund Transaction Posting")," "))}function fP(t,n){if(t&1&&(s(0,"button",37),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.repaymentLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var km=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.penaltyManagementService=A(Lm),this.showPaymentDetails=!1,this.waivePenalties=!1,this.penalties=[],this.selectedPenalties=[],this.selectAllPenalties=!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),this.loadPenalties()}createRepaymentLoanForm(){this.repaymentLoanForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,Wt.required],externalId:"",paymentTypeId:"",note:"",skipInterestRefund:[!1]}),this.isCapitalizedIncome()?(this.repaymentLoanForm.addControl("transactionAmount",new pe("",[])),this.updateTransactionAmountValidators(!1)):(this.repaymentLoanForm.addControl("transactionAmount",new pe("",[])),this.updateTransactionAmountValidators(!1)),(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")}loadPenalties(){this.penaltyManagementService.loadPenalties(this.loanId).subscribe({next:e=>{this.penalties=e},error:e=>{console.error("Error loading penalties:",e),this.penalties=[]}})}toggleWaivePenalties(){this.waivePenalties=!this.waivePenalties,this.waivePenalties?this.recalculateTransactionAmount():(this.selectedPenalties=[],this.selectAllPenalties=!1,this.updateTransactionAmountValidators(!1),this.recalculateTransactionAmount())}toggleSelectAllPenalties(){let e=this.penaltyManagementService.toggleSelectAllPenalties(this.selectAllPenalties,this.penalties);this.selectAllPenalties=e.selectAllPenalties,this.selectedPenalties=e.selectedPenalties,this.recalculateTransactionAmount()}togglePenaltySelection(e){let i=this.penaltyManagementService.togglePenaltySelection(e,this.selectedPenalties,this.penalties);this.selectedPenalties=i.selectedPenalties,this.selectAllPenalties=i.selectAllPenalties,this.recalculateTransactionAmount()}isPenaltySelected(e){return this.penaltyManagementService.isPenaltySelected(e,this.selectedPenalties)}getPenaltyDisplayKey(e){return this.penaltyManagementService.getPenaltyDisplayKey(e)}recalculateTransactionAmount(){let e=this.repaymentLoanForm.value.transactionAmount,i=e!=null?Number(e):Number(this.dataObject.amount??0),a=isNaN(i)?Number(this.dataObject.amount??0):i;if(!this.waivePenalties||this.selectedPenalties.length===0){this.repaymentLoanForm.patchValue({transactionAmount:a},{emitEvent:!1});return}let r=0;this.selectedPenalties.forEach(d=>{let g=this.penalties.find(_=>_.id===d);g&&(r+=g.amountOutstanding||g.amount||0)});let u=Math.max(0,a-r);this.updateTransactionAmountValidators(this.waivePenalties&&u===0),this.repaymentLoanForm.patchValue({transactionAmount:u},{emitEvent:!1})}updateTransactionAmountValidators(e){let i=[Wt.required,Wt.min(e?0:.001)];this.isCapitalizedIncome()&&i.push(Wt.max(this.dataObject.amount)),this.repaymentLoanForm.controls.transactionAmount.setValidators(i),this.repaymentLoanForm.controls.transactionAmount.updateValueAndValidity({emitEvent:!1})}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.waivePenalties&&this.selectedPenalties.length>0?this.penaltyManagementService.waivePenalties(this.loanId,this.selectedPenalties).subscribe({next:()=>{this.submitRepayment(u)},error:d=>{console.error("Error waiving penalties:",d),this.submitRepayment(u)}}):this.submitRepayment(u)}submitRepayment(e){this.loanService.submitLoanActionButton(this.loanId,e,this.command).subscribe(i=>{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:50,vars:41,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","m-b-10"],[3,"change","checked"],["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"],[1,"layout-row-wrap","m-t-20"],[1,"m-t-20","m-l-10"],[1,"flex-100","m-b-10"],[1,"flex-100","layout-row-wrap"],[1,"penalty-item-container"],[1,"penalty-label","mat-body-strong"],[1,"penalty-name"],[1,"penalty-date"],[1,"penalty-amount","r-amount"],[1,"mat-body-2"],["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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,iP,7,9,"mat-error"),l(),M(14,aP,25,24,"div",7),P(15,"mifosx-input-amount",8),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),P(20,"input",9),l(),M(21,rP,7,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),s(26,"mat-select",10),de(27,lP,2,2,"mat-option",11,Ce),l()(),s(29,"div",12)(30,"mat-slide-toggle",13),it("change",function(){return lt(r),st(a.addPaymentDetails())}),c(31),p(32,"translate"),l()(),s(33,"div",12)(34,"mat-slide-toggle",13),it("change",function(){return lt(r),st(a.toggleWaivePenalties())}),c(35),p(36,"translate"),l()(),M(37,mP,2,1),M(38,dP,25,15),s(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),l(),P(43,"textarea",14),l(),M(44,uP,3,3,"mat-checkbox",15),l(),s(45,"mat-card-actions",16)(46,"button",17),c(47),p(48,"translate"),l(),N(49,fP,3,4,"button",18),l()()()()()}if(i&2){let r=Lt(12);o(2),x("formGroup",a.repaymentLoanForm),o(5),b(m(8,26,"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,28,"labels.inputs.External Id")),o(3),O(a.isCapitalizedIncome()||a.isBuyDownFee()?21:-1),o(3),b(m(25,30,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(3),x("checked",a.showPaymentDetails),o(),v(" ",m(32,32,"labels.inputs.Show Payment Details")," "),o(3),x("checked",a.waivePenalties),o(),v(" ",m(36,34,"labels.inputs.Waive Penalties")," "),o(2),O(a.waivePenalties?37:-1),o(),O(a.showPaymentDetails?38:-1),o(3),v(" ",m(42,36,"labels.inputs.Note")),o(3),O(a.showInterestRefundCheckbox()?44:-1),o(2),x("routerLink",Ut(40,eP)),o(),v(" ",m(48,38,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Da,Ae,Bi,ja,Wn,gn,Tt,fn],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}.penalty-item-container[_ngcontent-%COMP%]{width:100%;max-width:100%;display:grid;grid-template-columns:auto minmax(80px,110px) minmax(140px,100%) minmax(130px,170px) minmax(90px,120px);align-items:center;gap:8px;margin-top:10px;padding:12px 16px;background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;overflow:hidden}.penalty-label[_ngcontent-%COMP%]{min-width:80px}.penalty-name[_ngcontent-%COMP%]{min-width:120px}.penalty-date[_ngcontent-%COMP%]{white-space:nowrap}.penalty-amount[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.dark-theme[_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%]{background-color:#3a3a3a;color:#ffffffde;border-color:#4a4a4a}"]})}}return t})();var hP=()=>["../../general"];function gP(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 _P(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.creditBalanceLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Nm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],transactionAmount:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,gP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"textarea",9),l()(),s(25,"mat-card-actions",10)(26,"button",11),c(27),p(28,"translate"),l(),N(29,_P,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,hP)),o(),v(" ",m(28,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Bi,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var CP=()=>["../../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.Interest Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function vP(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.loanInterestForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Fm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.settingsService=A(oe),this.dateUtils=A(me),this.loanService=A(At),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,Wt.required],transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,bP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"textarea",8),l()(),s(20,"mat-card-actions",9)(21,"button",10),c(22),p(23,"translate"),l(),N(24,vP,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,CP)),o(),v(" ",m(23,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WAIVEINTERESTPORTION_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Bi,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var xP=()=>["../../general"];function yP(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 SP(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 DP(t,n){if(t&1){let e=Ct();s(0,"button",14),it("click",function(){lt(e);let a=T();return st(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Submit")," "))}var Rm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.loanService=A(At),this.dateUtils=A(me),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),Wt.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=Ct();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(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,yP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,SP,2,2,"mat-option",9,Ce),l()(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),P(30,"textarea",10),l()()(),s(31,"mat-card-actions",11)(32,"button",12),c(33),p(34,"translate"),l(),N(35,DP,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),ue(a.writeOffReasonOptions),o(4),b(m(29,19,"labels.inputs.Note")),o(4),x("routerLink",Ut(23,xP)),o(),v(" ",m(34,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WRITEOFF_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var wP=()=>["../../general"];function PP(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 TP(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.closeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Bm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,PP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),N(23,TP,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,wP)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSEASRESCHEDULED_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var AP=()=>["../../general"],MP=(t,n)=>n.id;function OP(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 IP(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 EP(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 LP(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 kP(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",6),it("click",function(){lt(e);let a=Lt(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18)(5,"mat-datepicker-toggle",8)(6,"mat-datepicker",null,2),l()}if(t&2){let e=Lt(7),i=T();o(2),b(m(3,4,"labels.inputs.Installment Rescheduled to")),o(2),x("min",i.minDate)("matDatepicker",e),o(),x("for",e)}}function NP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",20),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 FP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Number Of new Repayments")))}function RP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.New Interest Rate")))}function BP(t,n){if(t&1){let e=Ct();s(0,"div",28)(1,"mat-checkbox",26),it("change",function(){let a=lt(e).$implicit,r=T(3);return st(r.togglePenaltySelection(a.id))}),l(),s(2,"span",29),c(3),p(4,"translate"),l(),s(5,"span",30),c(6),p(7,"translate"),l(),s(8,"span",31),c(9),p(10,"dateFormat"),l(),s(11,"span",32),c(12),p(13,"formatNumber"),l()()}if(t&2){let e=n.$implicit,i=T(3);o(),x("checked",i.isPenaltySelected(e.id)),o(2),b(m(4,5,"labels.inputs.Penalty")),o(3),b(m(7,7,i.getPenaltyDisplayKey(e))),o(3),b(m(10,9,e.dueDate)),o(3),b(m(13,11,e.amountOutstanding||e.amount||0))}}function qP(t,n){if(t&1){let e=Ct();s(0,"div",23)(1,"div",25)(2,"mat-checkbox",26),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelectAllPenalties())}),c(3),p(4,"translate"),l()(),s(5,"div",27),de(6,BP,14,13,"div",28,MP),l()()}if(t&2){let e=T(2);o(2),x("checked",e.selectAllPenalties),o(),v(" ",m(4,2,"labels.inputs.All")," "),o(3),ue(e.penalties)}}function jP(t,n){t&1&&(s(0,"div",24)(1,"span",33),c(2),p(3,"translate"),l()()),t&2&&(o(2),b(m(3,1,"labels.text.No penalties found")))}function zP(t,n){if(t&1&&M(0,qP,8,4,"div",23)(1,jP,4,3,"div",24),t&2){let e=T();O(e.penalties.length>0?0:1)}}function VP(t,n){if(t&1&&(s(0,"button",34),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.rescheduleLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var qm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.penaltyManagementService=A(Lm),this.destroyRef=A(fp),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.waivePenalties=new pe(!1),this.penalties=[],this.selectedPenalties=[],this.selectAllPenalties=!1,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.codes=this.dataObject.rescheduleReasons,this.setRescheduleLoanForm(),this.loadPenalties(),this.setupWaivePenaltiesListener()}setRescheduleLoanForm(){this.rescheduleLoanForm=this.formBuilder.group({rescheduleFromDate:[new Date,Wt.required],rescheduleReasonId:["",Wt.required],submittedOnDate:[new Date,Wt.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.waivePenalties.value&&this.selectedPenalties.length>0?this.penaltyManagementService.waivePenalties(this.loanId,this.selectedPenalties).subscribe({next:()=>{this.submitReschedule(g)},error:_=>{console.error("Error waiving penalties:",_),this.submitReschedule(g)}}):this.submitReschedule(g)}submitReschedule(e){this.loanService.submitRescheduleData(e).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}loadPenalties(){this.penaltyManagementService.loadPenalties(this.loanId).subscribe({next:e=>{this.penalties=e},error:e=>{console.error("Error loading penalties:",e),this.penalties=[]}})}setupWaivePenaltiesListener(){this.waivePenalties.valueChanges.pipe(Op(this.destroyRef)).subscribe(e=>{e||(this.selectedPenalties=[],this.selectAllPenalties=!1)})}toggleSelectAllPenalties(){let e=this.penaltyManagementService.toggleSelectAllPenalties(this.selectAllPenalties,this.penalties);this.selectAllPenalties=e.selectAllPenalties,this.selectedPenalties=e.selectedPenalties}togglePenaltySelection(e){let i=this.penaltyManagementService.togglePenaltySelection(e,this.selectedPenalties,this.penalties);this.selectedPenalties=i.selectedPenalties,this.selectAllPenalties=i.selectAllPenalties}isPenaltySelected(e){return this.penaltyManagementService.isPenaltySelected(e,this.selectedPenalties)}getPenaltyDisplayKey(e){return this.penaltyManagementService.getPenaltyDisplayKey(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reschedule"]],inputs:{dataObject:"dataObject"},decls:61,vars:53,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,"m-b-10",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"],[1,"layout-row-wrap","m-t-20"],[1,"m-t-20","m-l-10"],[1,"flex-100","m-b-10"],[3,"change","checked"],[1,"flex-100","layout-row-wrap"],[1,"penalty-item-container"],[1,"penalty-label","mat-body-strong"],[1,"penalty-name"],[1,"penalty-date"],[1,"penalty-amount","r-amount"],[1,"mat-body-2"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",3)(1,"mat-card")(2,"form",4),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",7)(10,"mat-datepicker-toggle",8)(11,"mat-datepicker",null,0),M(13,OP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",9),de(19,IP,2,2,"mat-option",10,Ce),l(),M(21,EP,7,9,"mat-error"),l(),s(22,"mat-form-field",6),it("click",function(){lt(r);let d=Lt(29);return st(d.open())}),s(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"input",11)(27,"mat-datepicker-toggle",8)(28,"mat-datepicker",null,1),M(30,LP,7,9,"mat-error"),l(),s(31,"mat-form-field")(32,"mat-label"),c(33),p(34,"translate"),l(),P(35,"textarea",12),l(),s(36,"mat-checkbox",13),c(37),p(38,"translate"),l(),M(39,kP,8,6,"mat-form-field"),s(40,"mat-checkbox",13),c(41),p(42,"translate"),l(),M(43,NP,10,6),s(44,"mat-checkbox",13),c(45),p(46,"translate"),l(),M(47,FP,5,3,"mat-form-field"),s(48,"mat-checkbox",13),c(49),p(50,"translate"),l(),M(51,RP,5,3,"mat-form-field"),s(52,"mat-checkbox",14),c(53),p(54,"translate"),l(),M(55,zP,2,1),l(),s(56,"mat-card-actions",15)(57,"button",16),c(58),p(59,"translate"),l(),N(60,VP,3,4,"button",17),l()()()()()}if(i&2){let r=Lt(12),u=Lt(29);o(2),x("formGroup",a.rescheduleLoanForm),o(5),b(m(8,32,"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,34,"labels.inputs.Reason for Rescheduling")),o(3),ue(a.codes),o(2),O(a.rescheduleLoanForm.controls.rescheduleReasonId.hasError("required")?21:-1),o(3),b(m(25,36,"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,38,"labels.inputs.Comments")),o(3),x("formControl",a.changeRepaymentDate),o(),v(" ",m(38,40,"labels.inputs.Change Repayment Date")," "),o(2),O(a.changeRepaymentDate.value?39:-1),o(),x("formControl",a.introduceGracePeriods),o(),v(" ",m(42,42,"labels.inputs.Introduce Mid-term grace periods")," "),o(2),O(a.introduceGracePeriods.value?43:-1),o(),x("formControl",a.extendRepaymentPeriod),o(),v(" ",m(46,44,"labels.inputs.Extend Repayment Period")," "),o(2),O(a.extendRepaymentPeriod.value?47:-1),o(),x("formControl",a.adjustinterestrates),o(),v(" ",m(50,46,"labels.inputs.Adjust interest rates for remainder of loan")," "),o(2),O(a.adjustinterestrates.value?51:-1),o(),x("formControl",a.waivePenalties),o(),v(" ",m(54,48,"labels.inputs.Waive Penalties")," "),o(2),O(a.waivePenalties.value?55:-1),o(2),x("routerLink",Ut(52,AP)),o(),v(" ",m(59,50,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_RESCHEDULELOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Wo,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Da,Ae,gn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.penalty-item-container[_ngcontent-%COMP%]{width:100%;max-width:100%;display:grid;grid-template-columns:auto minmax(80px,110px) minmax(140px,100%) minmax(130px,170px) minmax(90px,120px);align-items:center;gap:8px;margin-top:10px;padding:12px 16px;background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;overflow:hidden}.penalty-label[_ngcontent-%COMP%]{min-width:80px}.penalty-name[_ngcontent-%COMP%]{min-width:120px}.penalty-date[_ngcontent-%COMP%]{color:#000000b3;white-space:nowrap}.penalty-amount[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.dark-theme[_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%]{background-color:#3a3a3a;color:#ffffffde;border-color:#4a4a4a}"]})}}return t})();var UP=()=>["../../general"];function HP(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 GP(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 WP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",20),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",21),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",22),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(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 $P(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.recoveryRepaymentLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var jm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],transactionAmount:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,HP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),s(24,"mat-select",9),de(25,GP,2,2,"mat-option",10,Ce),l()(),s(27,"div",11)(28,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(29,"mat-slide-toggle")(30,"div",13)(31,"span",14),c(32),p(33,"translate"),l()()()()(),M(34,WP,25,15),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"textarea",15),l()(),s(40,"mat-card-actions",16)(41,"button",17),c(42),p(43,"translate"),l(),N(44,$P,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),ue(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,UP)),o(),v(" ",m(43,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Bi,ja,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();function YP(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Active")," "))}function KP(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Deleted")," "))}function ZP(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=T();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 zm=(()=>{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,YP,3,3,"span"),M(35,KP,3,3,"span"),l()(),M(36,ZP,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,Pt,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function JP(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 XP(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(m(2,1,"labels.inputs.Unassigned")))}function QP(t,n){t&1&&(s(0,"span"),P(1,"fa-icon",5),l())}function tT(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 eT(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 nT(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 iT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t(" ",e.firstname," \xA0 ",e.lastname," ")}}function aT(t,n){if(t&1&&(s(0,"td",25),M(1,iT,2,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function oT(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 rT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v(" ",e.clientRelationshipType==null?null:e.clientRelationshipType.name," ")}}function lT(t,n){if(t&1&&(s(0,"td",25),M(1,rT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function sT(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 cT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v(" ",e.guarantorType.value," ")}}function pT(t,n){if(t&1&&(s(0,"td",25),M(1,cT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function mT(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 dT(t,n){t&1&&P(0,"span")}function uT(t,n){if(t&1&&(s(0,"td",25),M(1,dT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function fT(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 hT(t,n){t&1&&P(0,"span")}function gT(t,n){if(t&1&&(s(0,"td",25),M(1,hT,1,0,"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.Remaining Amount")))}function CT(t,n){t&1&&P(0,"span")}function bT(t,n){if(t&1&&(s(0,"td",25),M(1,CT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function vT(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 xT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Active")," "))}function yT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"labels.inputs.Deleted")," "))}function ST(t,n){if(t&1&&(s(0,"span"),M(1,xT,3,3,"span"),M(2,yT,3,3,"span"),l()),t&2){let e=T().$implicit;o(),O(e.status?1:-1),o(),O(e.status?-1:2)}}function DT(t,n){if(t&1&&(s(0,"td",25),M(1,ST,3,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function wT(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 PT(t,n){if(t&1){let e=Ct();s(0,"button",28),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.viewGuarantorDetails(a))}),P(1,"fa-icon",29),l()}}function TT(t,n){t&1&&(s(0,"button",27),P(1,"fa-icon",30),l())}function AT(t,n){if(t&1){let e=Ct();s(0,"button",32),it("click",function(){lt(e);let a=T(3).$implicit,r=T(2);return st(r.deleteGuarantor(a.id))}),P(1,"fa-icon",33),l()}}function MT(t,n){t&1&&(s(0,"span"),N(1,AT,2,0,"button",31),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_GUARANTOR"))}function OT(t,n){if(t&1&&(s(0,"span"),N(1,PT,2,0,"button",26),M(2,TT,2,0,"button",27),M(3,MT,2,1,"span"),l()),t&2){let e=T().$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 IT(t,n){if(t&1&&(s(0,"td",25),M(1,OT,4,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function ET(t,n){t&1&&P(0,"tr",34)}function LT(t,n){t&1&&P(0,"tr",35)}function kT(t,n){if(t&1){let e=Ct();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(){lt(e);let a=T();return st(a.toggleGuarantorsDetailsOverview())}),c(10),l()()()(),s(11,"table",11),p(12,"accountsFilter"),X(13,12),N(14,nT,3,3,"th",13)(15,aT,2,1,"td",14),Q(),X(16,15),N(17,oT,3,3,"th",13)(18,lT,2,1,"td",14),Q(),X(19,16),N(20,sT,3,3,"th",13)(21,pT,2,1,"td",14),Q(),X(22,17),N(23,mT,3,3,"th",13)(24,uT,2,1,"td",14),Q(),X(25,18),N(26,fT,3,3,"th",13)(27,gT,2,1,"td",14),Q(),X(28,19),N(29,_T,3,3,"th",13)(30,bT,2,1,"td",14),Q(),X(31,20),N(32,vT,3,3,"th",13)(33,DT,2,1,"td",14),Q(),X(34,21),N(35,wT,3,3,"th",13)(36,IT,2,1,"td",14),Q(),N(37,ET,1,0,"tr",22)(38,LT,1,0,"tr",23),l()()}if(t&2){let e=T();o(5),b(m(6,5,"labels.heading.Guarantors Details")),o(5),v(" ",e.showDeletedGuarantorsAccounts?"Hide Deleted Guarantors":"Show Deleted Guarantors"," "),o(),x("dataSource",Bf(12,7,e.guarantorDetails,"guarantor",e.showDeletedGuarantorsAccounts)),o(26),x("matHeaderRowDef",e.guarantorsDisplayedColumns),o(),x("matRowDefColumns",e.guarantorsDisplayedColumns)}}var Vm=(()=>{class t{constructor(){this.dialog=A(Gn),this.loansService=A(At),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(zm,{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,JP,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,XP,3,3,"span"),M(26,QP,2,0,"span"),l()(),s(27,"tr")(28,"td"),c(29),p(30,"translate"),l(),s(31,"td"),P(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,tT,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,eT,3,3,"span"),l()()()()()(),M(67,kT,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,Pt,xe,Gt,Ae,un,Va,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt,p1,fn],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 NT=()=>["../../general"];function FT(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 RT(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 BT(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 qT(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 jT(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",15),de(5,qT,2,3,"mat-option",13,Ce),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),P(11,"input",16),l()),t&2){let e=T(2);o(2),b(m(3,2,"labels.inputs.Account")),o(3),ue(e.accountOptions),o(4),b(m(10,4,"labels.inputs.Amount"))}}function zT(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",10)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",11),M(5,FT,7,9,"mat-error"),l(),s(6,"mat-autocomplete",12,0),it("optionSelected",function(a){lt(e);let r=T();return st(r.clientSelected(a.option.value))}),de(8,RT,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),de(15,BT,2,2,"mat-option",13,Ce),l()(),M(17,jT,12,6)}if(t&2){let e=Lt(7),i=T();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),ue(i.clientsData),o(4),b(m(13,8,"labels.inputs.Relationship")),o(3),ue(i.relationTypes),o(2),O((i.accountOptions==null?null:i.accountOptions.length)>0?17:-1)}}function VT(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 UT(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(),cd(" ",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 HT(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(),cd(" ",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 GT(t,n){if(t&1){let e=Ct();s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",14),de(5,VT,2,2,"mat-option",13,Ce),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),P(11,"input",17),M(12,UT,8,12,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",18),M(18,HT,8,12,"mat-error"),l(),s(19,"mat-form-field",19),it("click",function(){lt(e);let a=Lt(26);return st(a.open())}),s(20,"mat-label"),c(21),p(22,"translate"),l(),P(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(),P(31,"input",22),l(),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",23),l(),s(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),l(),P(41,"input",24),l(),s(42,"mat-form-field")(43,"mat-label"),c(44),p(45,"translate"),l(),P(46,"input",25),l(),s(47,"mat-form-field")(48,"mat-label"),c(49),p(50,"translate"),l(),P(51,"input",26),l(),s(52,"mat-form-field")(53,"mat-label"),c(54),p(55,"translate"),l(),P(56,"input",27),l()}if(t&2){let e=Lt(26),i=T();o(2),b(m(3,16,"labels.inputs.Relationship")),o(3),ue(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 WT(t,n){if(t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.newGuarantorForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function $T(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=T();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 Um=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.clientsService=A(as),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:["",Wt.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,zT,18,10),M(9,GT,57,36),l(),s(10,"mat-card-actions",6)(11,"button",7),c(12),p(13,"translate"),l(),N(14,WT,3,4,"button",8),l()()(),M(15,$T,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,NT)),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,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Da,Ae,a1,i1,Tt],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 YT=()=>["../../general"];function KT(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 ZT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",13),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Fixed EMI amount")))}function JT(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.disbursementForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Hm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loanService=A(At),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,Wt.required],transactionAmount:[this.dataObject.amount,Wt.required],note:[""]}),this.dataObject.fixedEmiAmount&&this.disbursementForm.addControl("fixedEmiAmount",new pe(this.dataObject.fixedEmiAmount,[Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,KT,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),p(20,"formatNumber"),l(),M(21,ZT,5,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"textarea",9),l()(),s(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),l(),N(31,JT,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,YT)),o(),v(" ",m(30,26,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSETOSAVINGS_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Bi,Wn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var XT=()=>["../../general"];function QT(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 tA(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.rejectLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Gm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.route=A(Et),this.loanService=A(At),this.dateUtils=A(me),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,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,QT,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),N(23,tA,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,XT)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REJECT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var eA=()=>["../../general"];function nA(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 iA(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 aA(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",21),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",22),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",23),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(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 oA(t,n){if(t&1&&(s(0,"button",25),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.disbursementLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Wm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],transactionAmount:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,nA,6,6,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),p(20,"formatNumber"),l(),s(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),l(),P(25,"input",9),l(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),s(30,"mat-select",10),de(31,iA,2,2,"mat-option",11,Ce),l()(),s(33,"div",12)(34,"span",13),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(35,"mat-slide-toggle")(36,"div",14)(37,"span",15),c(38),p(39,"translate"),l()()()()(),M(40,aA,25,15),s(41,"mat-form-field")(42,"mat-label"),c(43),p(44,"translate"),l(),P(45,"textarea",16),l()(),s(46,"mat-card-actions",17)(47,"button",18),c(48),p(49,"translate"),l(),N(50,oA,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),ue(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,eA)),o(),v(" ",m(49,36,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Bi,ja,Wn,Tt,fn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var rA=()=>["../../../general"];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.Withdrawn On Date")," ",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",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.withdrawnByClientLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var $m=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,lA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),N(23,sA,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,rA)),o(),v(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WITHDRAW_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var cA=()=>["../../loan-collateral"];function pA(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 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.Collateral Type")," ",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.Value")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function uA(t,n){if(t&1&&(s(0,"button",10),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.collateralForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Ym=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.route=A(Et),this.loanService=A(At)}ngOnInit(){this.createAddCollateralForm()}createAddCollateralForm(){this.collateralForm=this.formBuilder.group({collateralTypeId:["",Wt.required],value:["",Wt.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),de(10,pA,2,2,"mat-option",4,Ce),l(),M(12,mA,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",5),M(18,dA,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"textarea",6),l()(),s(24,"mat-card-actions",7)(25,"button",8),c(26),p(27,"translate"),l(),N(28,uA,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),ue(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,cA)),o(),v(" ",m(27,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_COLLATERAL"))},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Te,En,In,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var fA=()=>["../../general"];function hA(t,n){if(t&1){let e=Ct();s(0,"button",7),it("click",function(){lt(e);let a=T();return st(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(Pe),this.loansService=A(At),this.router=A(le),this.route=A(Et),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.note=this.formBuilder.control("",Wt.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(),P(8,"textarea",3),l()(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),N(13,hA,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,fA)),o(),v(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSALUNDO_LOAN"))},dependencies:[wt,Pt,we,he,ze,Wo,ae,xe,Oe,Ve,_e,ge,Te,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var gA=["screenReport"],_A=()=>["../../general"];function CA(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 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.Screen Report")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}var Zm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loansService=A(At),this.route=A(Et),this.sanitizer=A(Jl),this.renderer=A(Ff),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(Nf.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(gA,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=Ct();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return lt(r),st(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),de(10,CA,2,2,"mat-option",6,Ce),l(),M(12,bA,7,9,"mat-error"),l()(),s(13,"mat-card-actions",7)(14,"button",8),c(15),p(16,"translate"),l(),s(17,"button",9),P(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 lt(r),st(a.print())}),P(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),ue(a.templatesData),o(2),O(a.loanScreenReportForm.controls.templateId.hasError("required")?12:-1),o(2),x("routerLink",Ut(20,_A)),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,Pt,Ne,he,Ee,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,En,In,Gt,un,Tt],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 vA=()=>["../../general"];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.Approved Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function yA(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=T();x("disabled",!e.approveLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Jm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.dateUtils=A(me),this.loanService=A(At),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,Wt.required],expectedDisbursementDate:[""],approvedLoanAmount:[this.loanData.approvalAmount,Wt.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=Ct();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",4)(5,"mat-form-field",5),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),M(13,xA,7,9,"mat-error"),l(),s(14,"mat-form-field",5),it("click",function(){lt(r);let d=Lt(21);return st(d.open())}),s(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8)(19,"mat-datepicker-toggle",7)(20,"mat-datepicker",null,1),l(),P(22,"mifosx-input-amount",9),s(23,"mat-form-field")(24,"mat-label"),c(25),p(26,"translate"),l(),P(27,"input",10),p(28,"formatNumber"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),P(33,"input",11),M(34,yA,7,9,"mat-error"),l(),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"textarea",12),l()(),s(40,"mat-card-actions",13)(41,"button",14),c(42),p(43,"translate"),l(),N(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,vA)),o(),v(" ",m(43,34,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Bi,Wn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var DA=()=>["../../general"];function wA(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 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.Charge")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function TA(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 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.Due Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function MA(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",12),it("click",function(){lt(e);let a=Lt(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",13)(5,"mat-datepicker-toggle",14)(6,"mat-datepicker",null,0),M(8,AA,7,9,"mat-error"),l()}if(t&2){let e=Lt(7),i=T();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 OA(t,n){if(t&1&&(s(0,"button",15),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.loanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Xm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),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("",Wt.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:["",Wt.required],amount:["",Wt.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),de(10,wA,2,2,"mat-option",5,Ce),l(),M(12,PA,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",6),M(18,TA,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"input",7),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),P(28,"input",8),l(),M(29,MA,9,8,"mat-form-field"),l(),s(30,"mat-card-actions",9)(31,"button",10),c(32),p(33,"translate"),l(),N(34,OA,3,4,"button",11),l()()()()()),i&2&&(o(2),x("formGroup",a.loanChargeForm),o(5),b(m(8,11,"labels.inputs.Charge")),o(3),ue(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,DA)),o(),v(" ",m(33,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var IA=()=>["../../general"];function EA(t,n){if(t&1&&P(0,"mifosx-repayment-schedule-tab",2),t&2){let e=T();x("repaymentScheduleDetails",e.repaymentScheduleDetails)("forEditing",!0)}}var Qm=(()=>{class t{constructor(){this.loansService=A(At),this.router=A(le),this.route=A(Et),this.dialog=A(Gn),this.dateUtils=A(me),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 nc({controlName:"fromPeriod",label:"From Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new nc({controlName:"toPeriod",label:"To Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new Pi({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 k=this.dateUtils.formatDate(I.dueDate,this.settingsService.dateFormat);I.period&&d<=I.period&&g>=I.period&&I.totalDueForPeriod!==_&&(I.totalDueForPeriod=_,this.repaymentScheduleChanges[k]={dueDate:k,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,EA,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,IA)),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,Pt,ae,xe,Oe,Ve,Gt,ho,Tt],encapsulation:2})}}return t})();var LA=()=>["../../general"];function kA(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 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 FA(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 RA(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.chargeoffLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var t0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,kA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",7),de(19,NA,2,2,"mat-option",8,Ce),l(),M(21,FA,7,9,"mat-error"),l(),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"input",9),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"textarea",10),l()(),s(32,"mat-card-actions",11)(33,"button",12),c(34),p(35,"translate"),l(),N(36,RA,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),ue(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,LA)),o(),v(" ",m(35,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CHARGEOFF_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var BA=()=>["../../general"];function qA(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 jA(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 zA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",11),M(5,jA,7,9,"mat-error"),l()),t&2){let e=T();o(2),b(m(3,2,"labels.inputs.Purchase Price Ratio")),o(3),O(e.saleLoanForm.controls.purchasePriceRatio.hasError("required")?5:-1)}}function VA(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 UA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",12),M(5,VA,7,9,"mat-error"),l()),t&2){let e=T();o(2),b(m(3,2,"labels.inputs.Owner External Id")),o(3),O(e.saleLoanForm.controls.ownerExternalId.hasError("required")?5:-1)}}function HA(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.saleLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var e0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.externalAssetOwnerService=A(Wr),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],purchasePriceRatio:["",Wt.required],transferExternalId:"",ownerExternalId:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,qA,7,9,"mat-error"),l(),M(14,zA,6,4,"mat-form-field"),M(15,UA,6,4,"mat-form-field"),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),P(20,"input",7),l()(),s(21,"mat-card-actions",8)(22,"button",9),c(23),p(24,"translate"),l(),N(25,HA,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,BA)),o(),v(" ",m(24,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","SALE_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var xg=(()=>{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),P(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,Pt,Gt,Ho,Go,ho,Tt],encapsulation:2})}}return t})();var GA=()=>["../../general"];function WA(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 $A(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 YA(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(" ",Re(2,2,e.value,"catalogs")," ")}}function KA(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 ZA(t,n){if(t&1&&P(0,"mifosx-input-amount",19),t&2){let e=T(2);x("currency",e.loanTransactionData.currency)("isRequired",!1)("inputFormControl",e.reagingLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")("minVal",0)}}function JA(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=T(2);x("disabled",!e.reagingLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function XA(t,n){if(t&1){let e=Ct();s(0,"button",25),it("click",function(){lt(e);let a=T(2);return st(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=T(2);x("disabled",!e.reagingLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Preview")," ")}}function QA(t,n){if(t&1){let e=Ct();s(0,"form",3),it("ngSubmit",function(){lt(e);let a=T();return st(a.submit())}),s(1,"mat-card-content")(2,"div",4)(3,"mat-form-field")(4,"mat-label"),c(5),p(6,"translate"),l(),P(7,"input",5),l(),s(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),l(),P(12,"input",6),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),s(17,"mat-select",7),de(18,WA,2,2,"mat-option",8,Ce),l()(),s(20,"mat-form-field",9),it("click",function(){lt(e);let a=Lt(27);return st(a.open())}),s(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",10)(25,"mat-datepicker-toggle",11)(26,"mat-datepicker",null,0),M(28,$A,7,9,"mat-error"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),s(33,"mat-select",12),de(34,YA,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),de(41,KA,2,2,"mat-option",8,Ce),l()(),s(43,"mat-form-field")(44,"mat-label"),c(45),p(46,"translate"),l(),P(47,"input",14),l(),s(48,"mat-form-field")(49,"mat-label"),c(50),p(51,"translate"),l(),P(52,"input",15),l(),s(53,"div",16)(54,"span",17),it("click",function(){lt(e);let a=T();return st(a.displayTransactionAmount())}),s(55,"mat-slide-toggle")(56,"div")(57,"span",18),c(58),p(59,"translate"),l()()()()(),M(60,ZA,1,5,"mifosx-input-amount",19),l(),s(61,"mat-card-actions",20)(62,"button",21),c(63),p(64,"translate"),l(),N(65,JA,3,4,"button",22)(66,XA,3,4,"button",23),l()()()}if(t&2){let e=Lt(27),i=T();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),ue(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),ue(i.reAgeInterestHandlingOptions),o(4),b(m(39,30,"labels.inputs.Reason")),o(3),ue(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,GA)),o(),v(" ",m(64,38,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAGING_LOAN"),o(),x("mifosxHasPermission","REAGING_LOAN")}}var n0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.loanService=A(At),this.dateUtils=A(me),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,Wt.required],startDate:[this.settingsService.businessDate,Wt.required],frequencyNumber:[1,Wt.required],frequencyType:[,Wt.required],reAgeInterestHandling:[this.reAgeInterestHandlingOptions[0]],transactionAmount:[,[Wt.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(xg,{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,QA,67,41,"form",2),l()()),i&2&&(o(2),O(a.loanTransactionData!==null?2:-1))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Ae,Bi,ja,Tt,wa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var yg=(()=>{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),P(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,Pt,Gt,Ur,Ho,Go,ho,Tt],encapsulation:2})}}return t})();var tM=()=>["../../general"];function eM(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(" ",Re(2,2,e.value,"catalogs")," ")}}function nM(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 iM(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.reamortizeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}function aM(t,n){if(t&1){let e=Ct();s(0,"button",13),it("click",function(){lt(e);let a=T();return st(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=T();x("disabled",!e.reamortizeLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Preview")," ")}}var i0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.loanService=A(At),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(yg,{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),de(10,eM,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),de(18,nM,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(),P(25,"input",6),l()(),s(26,"div",2)(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",7),l()(),s(32,"mat-card-actions",8)(33,"button",9),c(34),p(35,"translate"),l(),N(36,iM,3,4,"button",10)(37,aM,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),ue(a.reAmortizationInterestHandlingOptions),o(5),b(m(16,11,"labels.inputs.Reason")),o(3),ue(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,tM)),o(),v(" ",m(35,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAMORTIZE_LOAN"),o(),x("mifosxHasPermission","REAMORTIZE_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Ee,Le,ke,ae,xe,Oe,Ve,_e,ge,Te,En,In,Gt,Ae,Tt,wa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var oM=()=>["../../general"];function rM(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=T();o(2),$t("",Re(3,2,"Maturity Date","inputs")," : ",m(4,5,e.maturityDate))}}function lM(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 sM(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 cM(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.interestPauseLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var a0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),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,Wt.required],endDate:[this.startDate,Wt.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=Ct();s(0,"div",2)(1,"mat-card"),M(2,rM,5,7,"div",3),s(3,"form",4),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(4,"mat-card-content")(5,"div",5)(6,"mat-form-field",6),it("click",function(){lt(r);let d=Lt(13);return st(d.open())}),s(7,"mat-label"),c(8),p(9,"translate"),l(),P(10,"input",7)(11,"mat-datepicker-toggle",8)(12,"mat-datepicker",null,0),M(14,lM,6,6,"mat-error"),l(),s(15,"mat-form-field",6),it("click",function(){lt(r);let d=Lt(22);return st(d.open())}),s(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",9)(20,"mat-datepicker-toggle",8)(21,"mat-datepicker",null,1),M(23,sM,6,6,"mat-error"),l()(),s(24,"mat-card-actions",10)(25,"button",11),c(26),p(27,"translate"),l(),N(28,cM,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,oM)),o(),v(" ",m(27,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ae,gn,Tt,wa],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var pM=()=>["../../general"];function mM(t,n){if(t&1&&(s(0,"button",8),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.undoWriteOffLoanForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var Sg=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.alertService=A(Ql),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(),P(12,"textarea",4),l()(),s(13,"mat-card-actions",5)(14,"button",6),c(15),p(16,"translate"),l(),N(17,mM,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,pM)),o(),v(" ",m(16,10,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","UNDOWRITEOFF_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Ee,Le,ke,ae,xe,Oe,Ve,_e,ge,Te,Gt,Ae,Wn,Tt],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 dM(t,n){if(t&1&&P(0,"mifosx-loans-account-close",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function uM(t,n){t&1&&P(0,"mifosx-undo-approval")}function fM(t,n){if(t&1&&P(0,"mifosx-assign-loan-officer",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function hM(t,n){if(t&1&&P(0,"mifosx-foreclosure",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function gM(t,n){if(t&1&&P(0,"mifosx-prepay-loan",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function _M(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function CM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function bM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function vM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function xM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function yM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function SM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function DM(t,n){if(t&1&&P(0,"mifosx-loan-credit-balance-refund",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function wM(t,n){if(t&1&&P(0,"mifosx-waive-interest",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function PM(t,n){if(t&1&&P(0,"mifosx-write-off-page",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function TM(t,n){if(t&1&&P(0,"mifosx-close-as-rescheduled",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function AM(t,n){if(t&1&&P(0,"mifosx-loan-reschedule",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function MM(t,n){if(t&1&&P(0,"mifosx-recovery-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function OM(t,n){if(t&1&&P(0,"mifosx-view-guarantors",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function IM(t,n){if(t&1&&P(0,"mifosx-create-guarantor",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function EM(t,n){if(t&1&&P(0,"mifosx-disburse-to-savings-account",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function LM(t,n){t&1&&P(0,"mifosx-reject-loan")}function kM(t,n){if(t&1&&P(0,"mifosx-disburse",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function NM(t,n){t&1&&P(0,"mifosx-withdrawn-by-client")}function FM(t,n){if(t&1&&P(0,"mifosx-add-collateral",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function RM(t,n){if(t&1&&P(0,"mifosx-undo-disbursal",1),t&2){let e=T();x("actionName",e.actionName)}}function BM(t,n){if(t&1&&P(0,"mifosx-loan-screen-reports",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function qM(t,n){t&1&&P(0,"mifosx-approve-loan")}function jM(t,n){t&1&&P(0,"mifosx-add-loan-charge")}function zM(t,n){t&1&&P(0,"mifosx-edit-repayment-schedule")}function VM(t,n){if(t&1&&P(0,"mifosx-charge-off",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function UM(t,n){t&1&&P(0,"mifosx-asset-transfer-loan")}function HM(t,n){if(t&1&&P(0,"mifosx-loan-reaging",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function GM(t,n){if(t&1&&P(0,"mifosx-loan-reamortize",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function WM(t,n){if(t&1&&P(0,"mifosx-add-interest-pause",0),t&2){let e=T();x("dataObject",e.navigationData)}}function $M(t,n){if(t&1&&P(0,"mifosx-undo-write-off",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}var o0=(()=>{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,dM,1,1,"mifosx-loans-account-close",0),M(1,uM,1,0,"mifosx-undo-approval"),M(2,fM,1,1,"mifosx-assign-loan-officer",0),M(3,hM,1,1,"mifosx-foreclosure",0),M(4,gM,1,1,"mifosx-prepay-loan",0),M(5,_M,1,1,"mifosx-make-repayment",0),M(6,CM,1,1,"mifosx-make-repayment",0),M(7,bM,1,1,"mifosx-make-repayment",0),M(8,vM,1,1,"mifosx-make-repayment",0),M(9,xM,1,1,"mifosx-make-repayment",0),M(10,yM,1,1,"mifosx-make-repayment",0),M(11,SM,1,1,"mifosx-make-repayment",0),M(12,DM,1,1,"mifosx-loan-credit-balance-refund",0),M(13,wM,1,1,"mifosx-waive-interest",0),M(14,PM,1,1,"mifosx-write-off-page",0),M(15,TM,1,1,"mifosx-close-as-rescheduled",0),M(16,AM,1,1,"mifosx-loan-reschedule",0),M(17,MM,1,1,"mifosx-recovery-repayment",0),M(18,OM,1,1,"mifosx-view-guarantors",0),M(19,IM,1,1,"mifosx-create-guarantor",0),M(20,EM,1,1,"mifosx-disburse-to-savings-account",0),M(21,LM,1,0,"mifosx-reject-loan"),M(22,kM,1,1,"mifosx-disburse",0),M(23,NM,1,0,"mifosx-withdrawn-by-client"),M(24,FM,1,1,"mifosx-add-collateral",0),M(25,RM,1,1,"mifosx-undo-disbursal",1),M(26,BM,1,1,"mifosx-loan-screen-reports",0),M(27,qM,1,0,"mifosx-approve-loan"),M(28,jM,1,0,"mifosx-add-loan-charge"),M(29,zM,1,0,"mifosx-edit-repayment-schedule"),M(30,VM,1,1,"mifosx-charge-off",0),M(31,UM,1,0,"mifosx-asset-transfer-loan"),M(32,HM,1,1,"mifosx-loan-reaging",0),M(33,GM,1,1,"mifosx-loan-reamortize",0),M(34,WM,1,1,"mifosx-add-interest-pause",0),M(35,$M,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,Pt,Am,Mm,Om,Im,Em,km,Nm,Fm,Rm,Bm,qm,jm,Vm,Um,Hm,Gm,Wm,$m,Ym,Km,Zm,Jm,Xm,Qm,t0,e0,n0,i0,a0,Sg],encapsulation:2})}}return t})();function YM(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 KM(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 ZM(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 JM(t,n){if(t&1&&(s(0,"td",9),c(1),l()),t&2){let e=n.$implicit;o(),b(e.effectiveInterestRate)}}function XM(t,n){t&1&&P(0,"tr",10)}function QM(t,n){t&1&&P(0,"tr",11)}var r0=(()=>{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),N(3,YM,3,3,"th",3)(4,KM,3,3,"td",4),Q(),X(5,5),N(6,ZM,3,3,"th",3)(7,JM,2,1,"td",4),Q(),N(8,XM,1,0,"tr",6)(9,QM,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,gn,Tt],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();function tO(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=T();o(2),v("",m(3,2,"labels.inputs.Allow full term for each tranche"),":"),o(3),b(m(6,4,e.loanDetails.allowFullTermForTranche))}}function eO(t,n){if(t&1){let e=Ct();s(0,"button",8),it("click",function(){lt(e);let a=T();return st(a.addDisbursementDataEntry())}),P(1,"fa-icon",9),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Add")," "))}function nO(t,n){if(t&1){let e=Ct();s(0,"button",8),it("click",function(){lt(e);let a=T();return st(a.editDisbursementData())}),c(1),p(2,"translate"),l()}t&2&&(o(),v(" ",m(2,1,"labels.buttons.Apply Changes")," "))}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.Expected Disbursement On")))}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.expectedDisbursementDate))}}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.Disbursed On")))}function rO(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.actualDisbursementDate)," ")}}function lO(t,n){if(t&1&&(s(0,"td",19),M(1,rO,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.actualDisbursementDate?1:-1)}}function sO(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 cO(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.principal)}}function pO(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 mO(t,n){t&1&&(s(0,"span"),P(1,"i",22),l())}function dO(t,n){if(t&1){let e=Ct();s(0,"button",23),p(1,"translate"),it("click",function(){lt(e);let a=T().index,r=T(2);return st(r.editDisbursementDataEntry(a))}),P(2,"fa-icon",24),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit")))}function uO(t,n){if(t&1){let e=Ct();s(0,"button",25),p(1,"translate"),it("click",function(){lt(e);let a=T().index,r=T(2);return st(r.removeDisbursementDataEntry(a))}),P(2,"fa-icon",26),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete")))}function fO(t,n){if(t&1&&(s(0,"td",19),M(1,mO,2,0,"span"),M(2,dO,3,4,"button",20),M(3,uO,3,4,"button",21),l()),t&2){let e=n.$implicit,i=T(2);o(),O(e.actualDisbursementDate?1:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?2:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?3:-1)}}function hO(t,n){t&1&&P(0,"tr",27)}function gO(t,n){t&1&&P(0,"tr",28)}function _O(t,n){if(t&1&&(s(0,"table",7),X(1,10),N(2,iO,3,3,"th",11)(3,aO,3,3,"td",12),Q(),X(4,13),N(5,oO,3,3,"th",11)(6,lO,2,1,"td",12),Q(),X(7,14),N(8,sO,3,3,"th",11)(9,cO,2,1,"td",12),Q(),X(10,15),N(11,pO,3,3,"th",11)(12,fO,4,3,"td",12),Q(),N(13,hO,1,0,"tr",16)(14,gO,1,0,"tr",17),l()),t&2){let e=T();x("dataSource",e.disbursementDataSource),o(13),x("matHeaderRowDef",e.expectedDisbursementColumns),o(),x("matRowDefColumns",e.expectedDisbursementColumns)}}function CO(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 bO(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 vO(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 xO(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.termValue)}}function yO(t,n){t&1&&P(0,"tr",27)}function SO(t,n){t&1&&P(0,"tr",28)}function DO(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",7),X(5,29),N(6,CO,3,3,"th",11)(7,bO,3,3,"td",12),Q(),X(8,30),N(9,vO,3,3,"th",11)(10,xO,2,1,"td",12),Q(),N(11,yO,1,0,"tr",16)(12,SO,1,0,"tr",17),l()()),t&2){let e=T();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 l0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.loanServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),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 Pi({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()(),N(8,tO,7,6,"div",4),s(9,"h3"),c(10),p(11,"translate"),l(),s(12,"div",5),M(13,eO,4,3,"button",6),M(14,nO,3,3,"button",6),l(),M(15,_O,15,3,"table",7),M(16,DO,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,qf,Pt,Gt,un,vn,Sn,yn,Dn,xn,wn,qa,Oi,Pn,An,Tn,Mn,gn,Tt,fn,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 wO=()=>["../actions/Add Collateral"];function PO(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=T();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 TO(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 AO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function MO(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 OO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.currency.code)}}function IO(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 EO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),b(e.description)}}function LO(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 kO(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 NO(t,n){t&1&&P(0,"tr",19)}function FO(t,n){t&1&&P(0,"tr",20)}function RO(t,n){if(t&1&&(s(0,"table",6),X(1,9),N(2,TO,3,3,"th",10)(3,AO,2,1,"td",11),Q(),X(4,12),N(5,MO,3,3,"th",10)(6,OO,2,1,"td",11),Q(),X(7,13),N(8,IO,3,3,"th",10)(9,EO,2,1,"td",11),Q(),X(10,14),N(11,LO,3,3,"th",10)(12,kO,3,3,"td",11),Q(),N(13,NO,1,0,"tr",15)(14,FO,1,0,"tr",16),l()),t&2){let e=T();x("dataSource",e.loanCollaterals),o(13),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}var s0=(()=>{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,PO,18,12,"div",5),M(10,RO,15,3,"table",6),l()),i&2&&(o(3),b(m(4,5,"labels.inputs.Loan Collateral Details")),o(3),x("routerLink",Ut(9,wO)),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,Pt,ae,Gt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt,fn],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 Dg=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var BO=()=>["../","general"];function qO(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 jO(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 zO(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"),de(6,jO,2,2,"mat-option",7,Ce),l()()),t&2){let e=T(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),ue(e.loanOfficerOptions)}}function VO(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 UO(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 HO(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 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.Disbursement on")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}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(),$t(" (",e.accountNo,") ",e.productName," ")}}function $O(t,n){if(t&1){let e=Ct();s(0,"div",8)(1,"mat-form-field",15)(2,"mat-label"),c(3),p(4,"translate"),l(),P(5,"input",16),p(6,"translate"),l(),M(7,zO,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"),de(14,VO,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),de(21,UO,2,2,"mat-option",7,Ce),l()(),s(23,"mat-form-field",19),it("click",function(){lt(e);let a=Lt(31);return st(a.open())}),s(24,"mat-label"),c(25),p(26,"translate"),l(),P(27,"input",20),p(28,"translate"),P(29,"mat-datepicker-toggle",21)(30,"mat-datepicker",null,0),M(32,HO,7,9,"mat-error"),l(),s(33,"mat-form-field",19),it("click",function(){lt(e);let a=Lt(41);return st(a.open())}),s(34,"mat-label"),c(35),p(36,"translate"),l(),P(37,"input",22),p(38,"translate"),P(39,"mat-datepicker-toggle",21)(40,"mat-datepicker",null,1),M(42,GO,7,9,"mat-error"),l(),P(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),de(52,WO,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=T();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),ue(a.loanPurposeOptions),o(4),b(m(19,35,"labels.inputs.Fund")),o(3),ue(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),ue(a.accountLinkingOptions),o(4),b(m(57,49,"labels.inputs.Create standing instructions at disbursement"))}}function YO(t,n){t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,BO)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oo=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loansService=A(At),this.route=A(Et),this.translateService=A(pa),this.settingsService=A(oe),this.commons=A(Dg),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 Of(1),this.filterFormCtrl=new pe(""),this._onDestroy=new Mf,this.loansAccountProductTemplate=new Kl,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(kf(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:["",Wt.required],loanOfficerId:[""],loanPurposeId:[""],fundId:[""],submittedOnDate:[this.settingsService.businessDate,Wt.required],expectedDisbursementDate:["",Wt.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"),P(9,"ngx-mat-select-search",6),l(),de(10,qO,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,$O,58,51,"div",8),s(21,"div",9)(22,"button",10),P(23,"fa-icon",11),c(24),p(25,"translate"),l(),s(26,"button",12),c(27),p(28,"translate"),P(29,"fa-icon",13),l(),M(30,YO,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(),ue(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,Pt,Ne,we,he,Ee,ze,Wo,Le,ke,ae,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Da,Oi,c1,s1,$o,za,un,mo,jf,Tt],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 KO=t=>({data:t});function ZO(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),v(" ",e.name," ")}}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.Quantity")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function XO(t,n){if(t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),l()()),t&2){let e=T();o(),v(" ",m(2,2,"labels.inputs.Quantity can not be more than")," "),o(3),b(e.maxQuantity)}}var c0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),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:["",Wt.required],quantity:["",Wt.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:43,vars:39,consts:[["mat-dialog-title",""],[3,"formGroup"],[1,"layout-column"],["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"],["align","center"],["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,"mat-dialog-content")(4,"form",1)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),l(),s(10,"mat-select",3),de(11,ZO,2,2,"mat-option",4,Ce),l(),s(13,"mat-error"),c(14),p(15,"translate"),p(16,"translate"),s(17,"strong"),c(18),p(19,"translate"),l()()(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",5),M(25,JO,7,9,"mat-error"),M(26,XO,5,4,"mat-error"),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",6),l(),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",7),l()()()(),s(37,"mat-dialog-actions",8)(38,"button",9),c(39),p(40,"translate"),l(),s(41,"button",10),c(42),l()()),i&2&&(o(),b(m(2,19,"labels.heading.Add Loan Collateral")),o(3),x("formGroup",a.addCollateralForm),o(4),b(m(9,21,"labels.inputs.Collateral")),o(3),ue(a.collateralTypeData),o(3),$t(" ",m(15,23,"labels.inputs.Collateral")," ",m(16,25,"labels.commons.is")," "),o(4),b(m(19,27,"labels.commons.required")),o(4),b(m(23,29,"labels.inputs.Quantity")),o(2),x("max",a.maxQuantity)("min",0),o(),O(a.addCollateralForm.controls.quantity.hasError("required")?25:-1),o(),O(a.addCollateralForm.controls.quantity.hasError("max")?26:-1),o(3),b(m(30,31,"labels.inputs.Total Value")),o(2),x("disabled",!0),o(3),b(m(35,33,"labels.inputs.Total Collateral Value")),o(2),x("disabled",!0),o(3),b(m(40,35,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",ka(37,KO,a.addCollateralForm))("disabled",!a.addCollateralForm.valid||a.addCollateralForm.pristine),o(),v(" ",a.layout.addButtonText," "))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Kf,Yf,Le,ke,_e,ge,Ue,Te,En,In,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();var QO=()=>["../","general"];function t6(t,n){if(t&1&&P(0,"mifosx-input-amount",4),t&2){let e=T();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.loansAccountTermsForm.controls.principalAmount)("inputLabel","Principal")}}function e6(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 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(" ",Re(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.Frequency")," ",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",11)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",60),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Fixed Length")))}function o6(t,n){if(t&1&&(s(0,"span",12),c(1),p(2,"find"),l()),t&2){let e=T();o(),b(Ye(2,1,e.loansAccountTermsForm.value.loanTermFrequencyType,e.termFrequencyTypeData,"id","value"))}}function r6(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 l6(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",61),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Installment Amount")))}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.Repaid every")," ",m(3,5,"labels.commons.is")," "),o(4),b(m(6,7,"labels.commons.required")))}function c6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function p6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function m6(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),de(5,p6,3,5,"mat-option",10,Ce),l()()),t&2){let e=T();o(2),b(m(3,1,"labels.inputs.Select On")),o(3),ue(e.repaymentFrequencyNthDayTypeData)}}function d6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function u6(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),de(5,d6,3,5,"mat-option",10,Ce),l()()),t&2){let e=T();o(2),b(m(3,1,"labels.inputs.Select Day")),o(3),ue(e.repaymentFrequencyDaysOfWeekTypeData)}}function f6(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 h6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function g6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function _6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function C6(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 b6(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",69),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Principal Percentage Per Installment")))}function v6(t,n){if(t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",64),l(),s(5,"mat-form-field",7)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",65),de(10,h6,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"),de(25,g6,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"),de(33,_6,3,5,"mat-option",10,Ce),l(),M(35,C6,7,9,"mat-error"),l(),M(36,b6,5,3,"mat-form-field",7),s(37,"mat-checkbox",68)(38,"p"),c(39),p(40,"translate"),l()()),t&2){let e=T();o(2),v("",m(3,15,"labels.inputs.Nominal interest rate")," %"),o(5),b(m(8,17,"labels.inputs.Frequency")),o(3),ue(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),ue(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),ue(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 x6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function y6(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(" ",Re(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 D6(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),de(6,x6,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"),de(14,y6,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=T();o(3),b(m(4,6,"labels.inputs.Interest Method")),o(3),ue(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),ue(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 w6(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=T();o(4),b(m(5,2,"labels.inputs.Loan Schedule Type")),o(4),b(Re(9,4,e.loanScheduleType.value,"catalogs"))}}function P6(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(" ",Re(2,2,e.name,"catalogs")," ")}}function T6(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 A6(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(" ",Re(2,2,e.value,"catalogs")," ")}}function M6(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 O6(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=T();o(4),b(m(5,2,"labels.inputs.Delinquency Bucket")),o(3),b(e.loanProduct==null?null:e.loanProduct.delinquencyBucket.name)}}function I6(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 E6(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 L6(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),de(5,E6,2,2,"mat-option",10,Ce),l()()),t&2){let e=T(2);o(2),b(m(3,1,"labels.inputs.Loan closed with Topup")),o(3),ue(e.clientActiveLoanData)}}function k6(t,n){if(t&1&&(X(0,23),s(1,"mat-checkbox",76)(2,"p"),c(3),p(4,"translate"),l()(),M(5,L6,7,3,"mat-form-field",77),Q()),t&2){let e=T();o(3),v("",m(4,2,"labels.inputs.Is Topup Loan"),"?"),o(2),O(e.loansAccountTermsForm.controls.isTopup.value?5:-1)}}function N6(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=T();o(2),b(m(3,2,"labels.inputs.Days in year")),o(3),b(Re(6,4,e.loansAccountTermsData.daysInYearType.value,"catalogs"))}}function F6(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=T();o(2),b(m(3,2,"labels.inputs.Days in month")),o(3),b(Re(6,4,e.loansAccountTermsData.daysInMonthType.value,"catalogs"))}}function R6(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=T();o(2),b(m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),b(e.loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value)}}function B6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),v(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function q6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),v("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay)}}function j6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function z6(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,B6,2,1,"span"),M(15,q6,2,1,"span"),M(16,j6,2,2,"span"),l()()),t&2){let e=T();o(2),b(m(3,7,"labels.inputs.Interest recalculation compounding on")),o(3),b(Re(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 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),l()()),t&2){let e=T();o(2),b(m(3,2,"labels.inputs.Frequency Interval for recalculation")),o(3),b(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval)}}function U6(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 H6(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 G6(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 W6(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 $6(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 Y6(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 K6(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 Z6(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.principal," ")}}function J6(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 X6(t,n){if(t&1){let e=Ct();s(0,"td",88)(1,"button",89),p(2,"translate"),it("click",function(){let a=lt(e).index,r=T(2);return st(r.removeDisbursementDataEntry(a))}),P(3,"fa-icon",90),l()()}t&2&&(o(),x("matTooltip",ce(m(2,2,"tooltips.Delete"))))}function Q6(t,n){t&1&&P(0,"tr",91)}function tI(t,n){t&1&&P(0,"tr",92)}function eI(t,n){if(t&1){let e=Ct();P(0,"mat-divider",27),M(1,U6,4,3,"div",34),M(2,H6,4,7,"mat-checkbox",79),s(3,"div",34)(4,"mat-form-field",23)(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",80),M(9,G6,7,9,"mat-error"),l(),s(10,"span",23)(11,"button",81),it("click",function(){lt(e);let a=T();return st(a.addDisbursementDataEntry(a.disbursementData))}),P(12,"fa-icon",82),l()()(),M(13,W6,4,3,"div",34),s(14,"table",83),X(15,84),N(16,$6,3,3,"th",46)(17,Y6,3,3,"td",47),Q(),X(18,85),N(19,K6,3,3,"th",46)(20,Z6,2,1,"td",47),Q(),X(21,86),N(22,J6,3,3,"th",46)(23,X6,4,4,"td",47),Q(),N(24,Q6,1,0,"tr",52)(25,tI,1,0,"tr",53),l()}if(t&2){let e=T();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 nI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),v(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function iI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),v("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay," ")}}function aI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function oI(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,nI,2,1,"span"),M(7,iI,2,1,"span"),M(8,aI,2,2,"span"),l()()),t&2){let e=T();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 rI(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=T();o(2),b(m(3,2,"labels.inputs.Frequency Interval for compounding")),o(3),b(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval)}}function lI(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 sI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.type.name)}}function cI(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 pI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(e.value)}}function mI(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 dI(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 uI(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 fI(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 hI(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 gI(t,n){if(t&1){let e=Ct();s(0,"td",88)(1,"button",93),it("click",function(){let a=lt(e).index,r=T();return st(r.deleteCollateral(a))}),P(2,"fa-icon",90),l()()}}function _I(t,n){t&1&&P(0,"tr",91)}function CI(t,n){t&1&&P(0,"tr",92)}function bI(t,n){t&1&&(s(0,"button",59),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,QO)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Io=(()=>{class t{constructor(){this.formBuilder=A(Pe),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,Wt.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,Wt.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([Wt.required]),i.setValidators([Wt.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},Wt.required)),this.loansAccountTermsForm.addControl("fixedLength",new pe(this.loansAccountTermsData.product.fixedLength))):this.loansAccountTermsForm.addControl("interestRatePerPeriod",new pe(this.loansAccountTermsData.interestRatePerPeriod,Wt.required)))}hasFixedLength(){return this.loansAccountTermsData?!!this.loansAccountTermsData.product?.fixedLength:!1}isEqualPrincipalPayments(){return this.loansAccountTermsForm.value.amortizationType===0}createloansAccountTermsForm(){this.loansAccountTermsForm=this.formBuilder.group({principalAmount:["",Wt.required],loanTermFrequency:[{value:"",disabled:!0},Wt.required],loanTermFrequencyType:["",Wt.required],numberOfRepayments:["",Wt.required],repaymentEvery:["",Wt.required],repaymentFrequencyType:[{value:"",disabled:!0},Wt.required],repaymentFrequencyNthDayType:[""],repaymentFrequencyDayOfWeekType:[""],repaymentsStartingFromDate:[""],interestChargedFromDate:[""],interestRatePerPeriod:[""],interestType:[""],isFloatingInterestRate:[null],isEqualAmortization:[""],amortizationType:["",Wt.required],interestCalculationPeriodType:[""],allowPartialPeriodInterestCalculation:[""],inArrearsTolerance:[""],graceOnInterestCharged:[""],graceOnPrincipalPayment:[""],graceOnInterestPayment:[""],graceOnArrearsAgeing:[""],loanIdToClose:[""],fixedEmiAmount:[""],isTopup:[""],maxOutstandingLoanBalance:[""],interestRateDifferential:[""],transactionProcessingStrategyCode:["",Wt.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 Pi({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(c0,{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=Ct();s(0,"form",2)(1,"div",3),M(2,t6,1,4,"mifosx-input-amount",4),s(3,"h4",5),c(4),p(5,"translate"),P(6,"i",6),p(7,"translate"),l(),s(8,"mat-form-field",7)(9,"mat-label"),c(10),p(11,"translate"),l(),P(12,"input",8),M(13,e6,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),de(19,n6,3,5,"mat-option",10,Ce),l(),M(21,i6,7,9,"mat-error"),l(),M(22,a6,5,3,"mat-form-field",11),M(23,o6,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(),P(31,"input",13),p(32,"translate"),M(33,r6,7,9,"mat-error"),l(),M(34,l6,5,3,"mat-form-field",7),s(35,"mat-form-field",14),it("click",function(){lt(r);let d=Lt(43);return st(d.open())}),s(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"input",15),p(40,"translate"),P(41,"mat-datepicker-toggle",16)(42,"mat-datepicker",null,0),l(),s(44,"mat-form-field",14),it("click",function(){lt(r);let d=Lt(52);return st(d.open())}),s(45,"mat-label"),c(46),p(47,"translate"),l(),P(48,"input",17),p(49,"translate"),P(50,"mat-datepicker-toggle",16)(51,"mat-datepicker",null,1),l(),s(53,"h4",5),c(54),p(55,"translate"),P(56,"i",6),p(57,"translate"),l(),s(58,"mat-form-field",7)(59,"mat-label"),c(60),p(61,"translate"),l(),P(62,"input",18),p(63,"translate"),M(64,s6,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),de(70,c6,3,5,"mat-option",10,Ce),l()(),M(72,m6,7,3,"mat-form-field",20),M(73,u6,7,3,"mat-form-field",20),M(74,f6,4,7,"mat-checkbox",21),s(75,"h4",5),c(76),p(77,"translate"),l(),M(78,v6,41,35),M(79,D6,21,14,"div",22),s(80,"h4",5),c(81),p(82,"translate"),l(),M(83,w6,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"),de(90,P6,3,5,"mat-option",10,Ce),l(),M(92,T6,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"),de(102,A6,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,M6,5,3,"ng-container",27),s(110,"mat-form-field",23)(111,"mat-label"),c(112),p(113,"translate"),l(),P(114,"input",28),p(115,"translate"),l(),s(116,"mat-form-field",23)(117,"mat-label"),c(118),p(119,"translate"),l(),P(120,"input",29),p(121,"translate"),l(),s(122,"h4",5),c(123),p(124,"translate"),P(125,"i",6),p(126,"translate"),l(),s(127,"mat-form-field",7)(128,"mat-label"),c(129),p(130,"translate"),l(),P(131,"input",30),l(),s(132,"mat-form-field",7)(133,"mat-label"),c(134),p(135,"translate"),l(),P(136,"input",31),l(),s(137,"mat-form-field",23)(138,"mat-label"),c(139),p(140,"translate"),l(),P(141,"input",32),l(),M(142,O6,8,4,"div",33),M(143,I6,5,3,"div",23),M(144,k6,6,4,"ng-container",23),P(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,N6,7,7,"div",34),M(155,F6,7,7,"div",34),M(156,R6,6,4,"div",34),M(157,z6,17,14),M(158,V6,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,eI,26,12),M(176,oI,9,7,"div",37),M(177,rI,6,4,"div",37),P(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 lt(r),st(a.addCollateral())}),P(187,"fa-icon",43),c(188),p(189,"translate"),l()()()(),s(190,"table",44),X(191,45),N(192,lI,3,3,"th",46)(193,sI,2,1,"td",47),Q(),X(194,48),N(195,cI,3,3,"th",46)(196,pI,2,1,"td",47),Q(),X(197,49),N(198,mI,3,3,"th",46)(199,dI,2,1,"td",47),Q(),X(200,50),N(201,uI,3,3,"th",46)(202,fI,2,1,"td",47),Q(),X(203,51),N(204,hI,3,3,"th",46)(205,gI,3,0,"td",47),Q(),N(206,_I,1,0,"tr",52)(207,CI,1,0,"tr",53),l()(),s(208,"div",54)(209,"button",55),P(210,"fa-icon",56),c(211),p(212,"translate"),l(),s(213,"button",57),c(214),p(215,"translate"),P(216,"fa-icon",58),l(),M(217,bI,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),ue(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),ue(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),ue(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),ue(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,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Da,Bi,Oi,$o,qa,un,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,za,mo,gn,Tt,wa,Tp,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 vI=()=>["../","general"];function xI(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 yI(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 DI(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 wI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeCalculationType.value," ")}}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.Amount")))}function TI(t,n){if(t&1){let e=Ct();s(0,"td",30),c(1),s(2,"button",31),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.editChargeAmount(a))}),P(3,"fa-icon",32),l()()}if(t&2){let e=n.$implicit;o(),v(" ",e.amount," ")}}function AI(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 MI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeTimeType.value," ")}}function OI(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 II(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function EI(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function LI(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 kI(t,n){if(t&1){let e=Ct();s(0,"button",31),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.editChargeDate(a))}),P(1,"fa-icon",32),l()}}function NI(t,n){if(t&1&&(s(0,"td",30),M(1,II,3,3,"span"),M(2,EI,3,3,"span"),M(3,LI,3,3,"span"),M(4,kI,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 FI(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 RI(t,n){if(t&1){let e=Ct();s(0,"td",30)(1,"button",34),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.deleteCharge(a))}),P(2,"fa-icon",35),l()()}}function BI(t,n){t&1&&P(0,"tr",36)}function qI(t,n){t&1&&P(0,"tr",37)}function jI(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 zI(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 VI(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 UI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.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.Amount")))}function GI(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 WI(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 $I(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function YI(t,n){t&1&&P(0,"tr",36)}function KI(t,n){t&1&&P(0,"tr",37)}function ZI(t,n){t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,vI)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Eo=(()=>{class t{constructor(){this.dialog=A(Gn),this.dateUtils=A(me),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 Pi({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 Pi({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=Ct();s(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",null,0),de(7,xI,2,2,"mat-option",3,Ce),l()(),s(9,"div",4)(10,"button",5),it("click",function(){lt(r);let d=Lt(6);return st(a.addCharge(d))}),P(11,"fa-icon",6),c(12),p(13,"translate"),l()(),s(14,"table",7),X(15,8),N(16,yI,3,3,"th",9)(17,SI,2,1,"td",10),Q(),X(18,11),N(19,DI,3,3,"th",9)(20,wI,2,1,"td",10),Q(),X(21,12),N(22,PI,3,3,"th",9)(23,TI,4,1,"td",10),Q(),X(24,13),N(25,AI,3,3,"th",9)(26,MI,2,1,"td",10),Q(),X(27,14),N(28,OI,3,3,"th",9)(29,NI,5,4,"td",10),Q(),X(30,15),N(31,FI,3,3,"th",9)(32,RI,3,0,"td",10),Q(),N(33,BI,1,0,"tr",16)(34,qI,1,0,"tr",17),l(),P(35,"mat-divider",18),s(36,"h4",19),c(37),p(38,"translate"),l(),s(39,"table",20),X(40,8),N(41,jI,3,3,"th",9)(42,zI,2,1,"td",10),Q(),X(43,21),N(44,VI,3,3,"th",9)(45,UI,2,1,"td",10),Q(),X(46,12),N(47,HI,3,3,"th",9)(48,GI,3,3,"td",10),Q(),X(49,22),N(50,WI,3,3,"th",9)(51,$I,2,1,"td",10),Q(),N(52,YI,1,0,"tr",16)(53,KI,1,0,"tr",17),l()(),s(54,"div",23)(55,"button",24),P(56,"fa-icon",25),c(57),p(58,"translate"),l(),s(59,"button",26),c(60),p(61,"translate"),P(62,"fa-icon",27),l(),M(63,ZI,3,5,"button",28),l()}if(i&2){let r=Lt(6);o(3),b(m(4,14,"labels.inputs.Charge")),o(4),ue(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,Pt,ae,_e,ge,En,In,Gt,un,vn,Sn,yn,Dn,xn,wn,qa,Pn,An,Tn,Mn,$o,za,mo,gn,Tt,fn],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 JI(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 XI(t,n){if(t&1&&(s(0,"mat-select",11),de(1,JI,2,2,"mat-option",14,Ce),l()),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName)),o(),ue(e.columnValues)}}function QI(t,n){if(t&1&&P(0,"input",12),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function tE(t,n){if(t&1&&P(0,"input",13),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function eE(t,n){if(t&1&&P(0,"textarea",13),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function nE(t,n){if(t&1){let e=Ct();s(0,"span",15),it("click",function(){lt(e);let a=Lt(4);return st(a.open())}),P(1,"input",16)(2,"mat-datepicker-toggle",17)(3,"mat-datepicker",null,0),l()}if(t&2){let e=Lt(4),i=T(2).$implicit;o(),x("formControlName",ce(i.controlName))("matDatepicker",e),o(),x("for",e)}}function iE(t,n){if(t&1&&(s(0,"mat-form-field",9)(1,"mat-label"),c(2),l(),M(3,XI,3,2,"mat-select",11),M(4,QI,1,2,"input",12),M(5,tE,1,2,"input",13),M(6,eE,1,2,"textarea",13),M(7,nE,5,4,"span"),l()),t&2){let e=T().$implicit,i=T();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 aE(t,n){if(t&1&&(s(0,"mat-checkbox",10),c(1),l()),t&2){let e=T().$implicit,i=T();x("formControlName",ce(e.controlName)),o(),v(" ",i.getInputName(e)," ")}}function oE(t,n){if(t&1&&(s(0,"div",3),M(1,iE,8,6,"mat-form-field",9),M(2,aE,2,3,"mat-checkbox",10),l()),t&2){let e=n.$implicit,i=T();o(),O(i.isBoolean(e.columnDisplayType)?-1:1),o(),O(i.isBoolean(e.columnDisplayType)?2:-1)}}var Ds=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.settingsService=A(oe),this.dateUtils=A(me),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,[Wt.required]):e[i.controlName]=new pe("",[Wt.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),de(2,oE,3,2,"div",3,Ce),l(),s(4,"div",4)(5,"button",5),P(6,"fa-icon",6),c(7),p(8,"translate"),l(),s(9,"button",7),c(10),p(11,"translate"),P(12,"fa-icon",8),l()()()),i&2&&(x("formGroup",a.datatableForm),o(2),ue(a.datatableInputs),o(5),v(" ",m(8,3,"labels.buttons.Previous")," "),o(3),v(" ",m(11,5,"labels.buttons.Next")," "))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,Le,ke,_e,ge,Je,Te,En,In,tn,en,Qe,Gt,Da,za,un,mo,Tt],styles:[".date-picker[_ngcontent-%COMP%]{width:92%}mat-checkbox[_ngcontent-%COMP%]{margin-top:30px}"]})}}return t})();var rE=()=>["../","general"];function lE(t,n){t&1&&(s(0,"button",9),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,rE)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var el=(()=>{class t{constructor(){this.loansService=A(At),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()}),P(2,"fa-icon",2),c(3),p(4,"translate"),l(),P(5,"mifosx-repayment-schedule-tab",3),l(),s(6,"div",4)(7,"button",5),P(8,"fa-icon",6),c(9),p(10,"translate"),l(),s(11,"button",7),c(12),p(13,"translate"),P(14,"fa-icon",8),l(),M(15,lE,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,Pt,ae,Gt,un,ho,za,mo,Tt],encapsulation:2})}}return t})();var sE=()=>["../.."];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,"find"),l()()),t&2){let e=T();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 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,"find"),l()()),t&2){let e=T();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 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,"find"),l()()),t&2){let e=T();o(2),v("",m(3,2,"labels.inputs.Fund"),":"),o(3),b(Ye(6,4,e.loansAccount.fundId,e.loansAccountProductTemplate.fundOptions,"id","name"))}}function dE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),P(5,"mifosx-external-identifier",16),l()()),t&2){let e=T();o(2),v("",m(3,3,"labels.inputs.External id"),":"),o(3),x("externalId",ce(e.loansAccount.externalId))}}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.Client ID")))}function fE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function hE(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 gE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function _E(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 CE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.purpose)}}function bE(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 vE(t,n){if(t&1&&(s(0,"td",27),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.principal,i.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," ")}}function xE(t,n){t&1&&P(0,"tr",28)}function yE(t,n){t&1&&P(0,"tr",29)}function SE(t,n){if(t&1&&(s(0,"h3",7),c(1),p(2,"translate"),l(),P(3,"mat-divider",3),s(4,"div",5)(5,"table",17,0),X(7,18),N(8,uE,3,3,"th",19)(9,fE,2,1,"td",20),Q(),X(10,21),N(11,hE,3,3,"th",19)(12,gE,2,1,"td",20),Q(),X(13,22),N(14,_E,3,3,"th",19)(15,CE,2,1,"td",20),Q(),X(16,23),N(17,bE,3,3,"th",19)(18,vE,3,6,"td",20),Q(),N(19,xE,1,0,"tr",24)(20,yE,1,0,"tr",25),l()()),t&2){let e=T();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 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),p(6,"yesNo"),l()()),t&2){let e=T();o(2),v("",m(3,2,"labels.inputs.Enable Down Payments"),":"),o(3),b(m(6,4,e.loansAccount.enableDownPayment))}}function wE(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=T();o(2),v("",m(3,2,"labels.inputs.First repayment on"),":"),o(3),b(m(6,4,e.loansAccount.repaymentsStartingFromDate))}}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=T();o(2),v("",m(3,2,"labels.inputs.Interest charged from"),":"),o(3),b(m(6,4,e.loansAccount.interestChargedFromDate))}}function TE(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=T();o(2),v("",m(3,3,"labels.inputs.Nominal interest rate"),":"),o(3),$t("",e.loansAccount.interestRatePerPeriod,"\xA0\xA0",e.loansAccountProductTemplate.interestRateFrequencyType.value)}}function AE(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=T();o(2),v("",m(3,2,"labels.inputs.Interest method"),": "),o(3),b(e.loansAccount.interestType)}}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),l()()),t&2){let e=T();o(2),v("",m(3,2,"labels.inputs.Is Equal Amortization"),":"),o(3),b(e.loansAccount.isEqualAmortization)}}function OE(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=T();o(2),v("",m(3,2,"labels.inputs.Calculate interest for exact days in partial period"),":"),o(3),b(e.loansAccount.allowPartialPeriodInterestCalculation)}}function IE(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=T();o(2),v("",m(3,2,"labels.inputs.Arrears tolerance"),": "),o(3),b(e.loansAccount.inArrearsTolerance)}}function EE(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=T();o(2),v("",m(3,2,"labels.inputs.Interest free period"),": "),o(3),b(e.loansAccount.graceOnInterestCharged)}}function LE(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=T();o(2),v("",m(3,2,"labels.inputs.On principal payment"),": "),o(3),b(e.loansAccount.graceOnPrincipalPayment)}}function kE(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=T();o(2),v("",m(3,2,"labels.inputs.On interest payment"),": "),o(3),b(e.loansAccount.graceOnInterestPayment)}}function NE(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=T();o(2),v("",m(3,2,"labels.inputs.On Arrears Aging"),": "),o(3),b(e.loansAccount.graceOnArrearsAgeing)}}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=T();o(2),v("",m(3,2,"labels.inputs.Is Topup Loan"),"? "),o(3),b(e.loansAccount.isTopup)}}function RE(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,"translateKey"),l()()),t&2){let e=T();o(2),v("",m(3,2,"labels.inputs.Days in month"),": "),o(3),b(Re(6,4,e.loansAccountProductTemplate==null?null:e.loansAccountProductTemplate.daysInMonthType.value,"catalogs"))}}function BE(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 qE(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 jE(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 zE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeCalculationType.value," ")}}function VE(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 UE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.amount," ")}}function HE(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 GE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.chargeTimeType.value," ")}}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.Date")))}function $E(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function YE(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function KE(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 ZE(t,n){if(t&1&&(s(0,"td",27),M(1,$E,3,3,"span"),M(2,YE,3,3,"span"),M(3,KE,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 JE(t,n){t&1&&P(0,"tr",28)}function XE(t,n){t&1&&P(0,"tr",29)}function QE(t,n){if(t&1&&(s(0,"div",9)(1,"h3",2),c(2),p(3,"translate"),l(),P(4,"mat-divider",3),s(5,"table",30),X(6,21),N(7,BE,3,3,"th",19)(8,qE,2,1,"td",20),Q(),X(9,31),N(10,jE,3,3,"th",19)(11,zE,2,1,"td",20),Q(),X(12,32),N(13,VE,3,3,"th",19)(14,UE,2,1,"td",20),Q(),X(15,33),N(16,HE,3,3,"th",19)(17,GE,2,1,"td",20),Q(),X(18,34),N(19,WE,3,3,"th",19)(20,ZE,4,3,"td",20),Q(),N(21,JE,1,0,"tr",24)(22,XE,1,0,"tr",25),l()()),t&2){let e=T();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 t7(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 e7(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 n7(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 i7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeCalculationType.value)}}function a7(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 o7(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 r7(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 l7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(e.chargeTimeType.value)}}function s7(t,n){t&1&&P(0,"tr",28)}function c7(t,n){t&1&&P(0,"tr",29)}function p7(t,n){if(t&1&&(s(0,"div",10)(1,"h3",35),c(2),p(3,"translate"),l(),P(4,"mat-divider",36),s(5,"table",37),X(6,21),N(7,t7,3,3,"th",19)(8,e7,2,1,"td",20),Q(),X(9,38),N(10,n7,3,3,"th",19)(11,i7,2,1,"td",20),Q(),X(12,32),N(13,a7,3,3,"th",19)(14,o7,3,3,"td",20),Q(),X(15,39),N(16,r7,3,3,"th",19)(17,l7,2,1,"td",20),Q(),N(18,s7,1,0,"tr",24)(19,c7,1,0,"tr",25),l()()),t&2){let e=T();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 Kl,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:148,vars:170,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),P(9,"mifosx-long-text",6),p(10,"find"),l()(),M(11,cE,7,9,"div",3),M(12,pE,7,9,"div",3),M(13,mE,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,dE,6,5,"div",3),M(29,SE,21,6),s(30,"h3",7),c(31),p(32,"translate"),l(),P(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,DE,7,6,"div",3),M(66,wE,7,6,"div",3),M(67,PE,7,6,"div",3),M(68,TE,6,5,"div",3),M(69,AE,6,4,"div",3),M(70,ME,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"),p(78,"translateKey"),l()(),s(79,"div",3)(80,"span",4),c(81),p(82,"translate"),l(),s(83,"span",5),c(84),p(85,"find"),p(86,"translateKey"),l()(),M(87,OE,6,4,"div",3),M(88,IE,6,4,"div",3),M(89,EE,6,4,"div",3),s(90,"div",3)(91,"span",4),c(92),p(93,"translate"),l(),s(94,"span",5),c(95),p(96,"find"),p(97,"translateKey"),l()(),s(98,"div",3)(99,"span",4),c(100),p(101,"translate"),l(),s(102,"span",5),c(103),p(104,"formatNumber"),l()(),s(105,"div",3)(106,"span",4),c(107),p(108,"translate"),l(),s(109,"span",5),c(110),p(111,"formatNumber"),l()(),s(112,"h3",7),c(113),p(114,"translate"),l(),P(115,"mat-divider",3),M(116,LE,6,4,"div",3),M(117,kE,6,4,"div",3),M(118,NE,6,4,"div",3),s(119,"div",3)(120,"span",4),c(121),p(122,"translate"),l(),s(123,"span",5),c(124),p(125,"yesNo"),l()(),M(126,FE,6,4,"div",3),s(127,"div",3)(128,"span",4),c(129),p(130,"translate"),l(),s(131,"span",5),c(132),p(133,"yesNo"),l()(),M(134,RE,7,7,"div",3),M(135,QE,23,6,"div",9),M(136,p7,20,6,"div",10),l(),s(137,"div",11)(138,"button",12),P(139,"fa-icon",13),c(140),p(141,"translate"),l(),s(142,"button",14),c(143),p(144,"translate"),l(),s(145,"button",15),it("click",function(){return a.submitEvent.emit()}),c(146),p(147,"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",Rf(` - `,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),Zl("",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(Re(78,122,Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value"),"catalogs")),o(5),v("",m(82,125,"labels.inputs.Interest calculation period"),": "),o(3),b(Re(86,132,Ye(85,127,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value"),"catalogs")),o(3),O(a.loansAccount.allowPartialPeriodInterestCalculation?87:-1),o(),O(a.loansAccount.inArrearsTolerance?88:-1),o(),O(a.loansAccount.graceOnInterestCharged?89:-1),o(3),v("",m(93,135,"labels.inputs.Repayment strategy"),": "),o(3),b(Re(97,142,Ye(96,137,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name"),"catalogs")),o(5),v(" ",m(101,145,"labels.inputs.Installment Amount")," "),o(3),v(" ",m(104,147,a.loansAccount.fixedEmiAmount)," "),o(4),v(" ",m(108,149,"labels.inputs.Balloon Repayment Amount")," "),o(3),v(" ",m(111,151,a.loansAccount.balloonRepaymentAmount)," "),o(3),b(m(114,153,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?116:-1),o(),O(a.loansAccount.graceOnInterestPayment?117:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?118:-1),o(3),v(" ",m(122,155,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(125,157,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?126:-1),o(3),v("",m(130,159,"labels.inputs.Recalculate Interest"),": "),o(3),b(m(133,161,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?134:-1),o(),O(a.loansAccount.charges.length?135:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?136:-1),o(4),v(" ",m(141,163,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(169,sE)),o(),v(" ",m(144,165,"labels.buttons.Cancel")," "),o(3),v(" ",m(147,167,"labels.buttons.Submit")," "))},dependencies:[wt,Pt,ae,Gt,Mp,Va,$o,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,za,un,Sa,gn,Tt,wa,Tp,fn,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 m7=["dtloan"];function d7(t,n){t&1&&P(0,"fa-icon",20)}function u7(t,n){t&1&&P(0,"fa-icon",20)}function f7(t,n){t&1&&P(0,"fa-icon",21)}function h7(t,n){t&1&&P(0,"fa-icon",22)}function g7(t,n){t&1&&P(0,"fa-icon",23)}function _7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function C7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function b7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function v7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function x7(t,n){if(t&1&&(s(0,"mat-step",18),N(1,v7,2,3,"ng-template",14),P(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function y7(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(e.registeredTableName)}}function S7(t,n){if(t&1&&(s(0,"mat-step"),N(1,y7,1,1,"ng-template",14),P(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function D7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function w7(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),N(1,D7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var p0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),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(m7,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=Ct();s(0,"div",6)(1,"mat-stepper",7,0),N(3,d7,1,0,"ng-template",8)(4,u7,1,0,"ng-template",9)(5,f7,1,0,"ng-template",10)(6,h7,1,0,"ng-template",11)(7,g7,1,0,"ng-template",12),s(8,"mat-step",13),N(9,_7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(12,"mat-step",13),N(13,C7,2,3,"ng-template",14),P(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),N(17,b7,2,3,"ng-template",14),P(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,x7,4,4,"mat-step",18),de(21,S7,4,1,"mat-step",null,Ce),M(23,w7,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(),ue(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,Ds,nl,Tt],encapsulation:2})}}return t})();var m0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),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="+Gf.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&&P(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,Pt,f1],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 P7=["instructionsTable"];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.Client")))}function A7(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 M7(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 O7(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 I7(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 E7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v(" ",e.toClient.displayName," ")}}function L7(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 k7(t,n){if(t&1&&(s(0,"td",17),M(1,E7,2,1,"span"),M(2,L7,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 N7(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 F7(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 R7(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 B7(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 q7(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 j7(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 z7(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 V7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function U7(t,n){t&1&&(s(0,"span"),N(1,V7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function H7(t,n){if(t&1){let e=Ct();s(0,"button",22),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T();return st(r.deleteStandingInstruction(a.id))}),P(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function G7(t,n){t&1&&(s(0,"span"),N(1,H7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function W7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function $7(t,n){if(t&1&&(s(0,"td",17),M(1,U7,2,1,"span"),M(2,G7,2,1,"span"),N(3,W7,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 Y7(t,n){t&1&&P(0,"tr",25)}function K7(t,n){t&1&&P(0,"tr",26)}var d0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),this.dialog=A(Gn),this.accountTransfersService=A(x1),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(P7,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),N(9,T7,3,3,"th",6)(10,A7,2,2,"td",7),Q(),X(11,8),N(12,M7,3,3,"th",6)(13,O7,2,2,"td",7),Q(),X(14,9),N(15,I7,3,3,"th",6)(16,k7,3,2,"td",7),Q(),X(17,10),N(18,N7,3,3,"th",6)(19,F7,2,2,"td",7),Q(),X(20,11),N(21,R7,3,3,"th",6)(22,B7,2,2,"td",7),Q(),X(23,12),N(24,q7,3,3,"th",6)(25,j7,4,6,"td",7),Q(),X(26,13),N(27,z7,3,3,"th",6)(28,$7,4,3,"td",7),Q(),N(29,Y7,1,0,"tr",14)(30,K7,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,Pt,Gt,Ae,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,gn,Tt],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 Z7(t,n){t&1&&P(0,"fa-icon",15)}function J7(t,n){t&1&&P(0,"fa-icon",15)}function X7(t,n){t&1&&P(0,"fa-icon",16)}function Q7(t,n){t&1&&P(0,"fa-icon",17)}function t8(t,n){t&1&&P(0,"fa-icon",18)}function e8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function n8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function i8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function a8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function o8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function r8(t,n){if(t&1){let e=Ct();s(0,"mat-step",14),N(1,o8,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Mc=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),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.allowPartialPeriodInterestCalculation=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=Ct();s(0,"div",1)(1,"mat-stepper",2,0),N(3,Z7,1,0,"ng-template",3)(4,J7,1,0,"ng-template",4)(5,X7,1,0,"ng-template",5)(6,Q7,1,0,"ng-template",6)(7,t8,1,0,"ng-template",7),s(8,"mat-step",8),N(9,e8,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",8),N(12,n8,2,3,"ng-template",9),P(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),N(15,i8,2,3,"ng-template",9),P(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),N(18,a8,2,3,"ng-template",9),P(19,"mifosx-loans-account-schedule-step",13),l(),M(20,r8,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,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,nl,Tt],encapsulation:2})}}return t})();var l8=()=>["../"];function s8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function c8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(3);return st(a.payCharge())}),P(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Pay")," "))}function p8(t,n){t&1&&(s(0,"span"),N(1,c8,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function m8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(3);return st(a.waiveCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Waive")," "))}function d8(t,n){t&1&&(s(0,"span"),N(1,m8,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function u8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(2);return st(a.adjustmentCharge())}),P(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Adjustment")," "))}function f8(t,n){if(t&1&&(s(0,"div",0),N(1,s8,4,3,"button",8),M(2,p8,2,1,"span"),M(3,d8,2,1,"span"),s(4,"span"),N(5,u8,4,3,"button",9),l()()),t&2){let e=T();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function h8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function g8(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.deleteCharge())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function _8(t,n){t&1&&(s(0,"div",0),N(1,h8,4,3,"button",8)(2,g8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var u0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(Et),this.dateUtils=A(me),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 Pi({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,f8,6,4,"div",0),M(1,_8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),P(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,l8)),o(),v(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,ca,Pt,ae,xe,Oe,Gt,Ae,un,gn,Tt,fn],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 C8=()=>["../"];function b8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",13),P(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.undoTransaction())}),P(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=T(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 v8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.chargebackTransaction())}),P(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=T(2);o(),x("disabled",!e.allowChargeback),o(2),v("",m(4,2,"Chargeback")," ")}}function x8(t,n){t&1&&(s(0,"div",0),N(1,b8,9,9,"span",12)(2,v8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function y8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Re(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=T();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),sd),o(),v(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function D8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"External Id")," "))}function w8(t,n){if(t&1&&(s(0,"div",5),P(1,"mifosx-external-identifier",18),l()),t&2){let e=T();o(),x("externalId",ce(e.transactionData.externalId))}}function P8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Re(2,1,"Classification","catalogs")," "))}function T8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=T();o(),v(" ",e.transactionData.classification.name," ")}}function A8(t,n){t&1&&P(0,"mat-divider",7),t&2&&x("inset",!0)}function M8(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 O8(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 I8(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 E8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=T(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),sd),o(),v(" ",e.toLoanTransaction," ")}}function L8(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 k8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function N8(t,n){t&1&&P(0,"tr",31)}function F8(t,n){t&1&&P(0,"tr",32)}function R8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),P(3,"br"),s(4,"table",19),X(5,20),N(6,M8,3,3,"th",21)(7,O8,3,4,"td",22),Q(),X(8,23),N(9,I8,3,3,"th",21)(10,E8,3,2,"td",24),Q(),X(11,25),N(12,L8,3,3,"th",21)(13,k8,3,6,"td",24),Q(),N(14,N8,1,0,"tr",26)(15,F8,1,0,"tr",27),l()()),t&2){let e=T();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 B8(t,n){if(t&1&&P(0,"mifosx-transaction-payment-detail",9),t&2){let e=T();x("paymentDetailData",e.transactionData.paymentDetailData)}}var f0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(Et),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.translateService=A(pa),this.settingsService=A(oe),this.organizationService=A(Ip),this.alertService=A(Ql),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 Pi({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Pi({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 nc({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Pi({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,x8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),P(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,y8,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,D8,3,3,"div",4),M(37,w8,2,2,"div",5),M(38,P8,3,4,"div",4),M(39,T8,2,1,"div",6),M(40,A8,1,1,"mat-divider",7),M(41,R8,16,6,"div",8),M(42,B8,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(" ",Re(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(" ",Re(15,26,"Type","catalogs")," "),o(3),v(" ",Re(18,29,a.transactionData.type.value,"catalogs")," "),o(3),v(" ",Re(21,32,"Transaction Date","catalogs")," "),o(3),v(" ",m(24,35,a.transactionData.date)," "),o(3),v(" ",Re(27,37,"Currency","catalogs")," "),o(3),v(" ",a.transactionData.currency.name," "),o(2),v(" ",Re(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,C8)),o(),v(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,ca,Pt,ae,xe,Oe,Gt,Ae,un,Va,$o,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,b1,Sa,gn,Tt,wa],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 q8=()=>["../"];function j8(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 z8(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 V8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Account Number")))}function U8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Cheque")))}function H8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Routing Code")))}function G8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Receipt Number")))}function W8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Bank")))}var h0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),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:["",Wt.required],transactionAmount:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,j8,7,9,"mat-error"),l(),P(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),de(24,z8,2,2,"mat-option",10,Ce),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,V8,5,3,"mat-form-field"),M(34,U8,5,3,"mat-form-field"),M(35,H8,5,3,"mat-form-field"),M(36,G8,5,3,"mat-form-field"),M(37,W8,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),ue(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,q8)),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,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Bi,ja,Tt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var $8=()=>["../../../general"],g0=(()=>{class t{constructor(){this.sanitizer=A(Jl),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),P(3,"fa-icon",3),c(4),p(5,"translate"),l()(),P(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,$8)),o(2),v("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Pt,ae,xe,Gt,un,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var Y8=()=>["../"];function K8(t,n){if(t&1&&P(0,"iframe",13),t&2){let e=T();x("src",e.pentahoUrl,hp)}}var _0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.reportsService=A(Ep),this.formBuilder=A(Pe),this.dateUtils=A(me),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:["",Wt.required],toDate:[this.settingsService.businessDate,Wt.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=Ct();s(0,"form",2),it("ngSubmit",function(){return lt(r),st(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(9);return st(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),P(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(){lt(r);let d=Lt(24);return st(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),P(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),P(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,K8,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,Y8)),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,Pt,Ne,we,he,Ee,ze,Le,ke,ae,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,un,Tt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var Z8=t=>["../../",t,"general"];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.Loan Id")))}function X8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.childLoanId," ")}}function Q8(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 tL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientId)}}function eL(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 nL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientName)}}function iL(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 aL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childLoanAccountNo)}}function oL(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 rL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childPrincipalAmount)}}function lL(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 sL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.parentPrincipalAmount)}}function cL(t,n){t&1&&P(0,"tr",14)}function pL(t,n){if(t&1&&P(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",ka(1,Z8,e.childLoanId))}}var C0=(()=>{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),N(7,J8,3,3,"th",3)(8,X8,2,1,"td",4),Q(),X(9,5),N(10,Q8,3,3,"th",3)(11,tL,2,1,"td",4),Q(),X(12,6),N(13,eL,3,3,"th",3)(14,nL,2,1,"td",4),Q(),X(15,7),N(16,iL,3,3,"th",3)(17,aL,2,1,"td",4),Q(),X(18,8),N(19,oL,3,3,"th",3)(20,rL,2,1,"td",4),Q(),X(21,9),N(22,lL,3,3,"th",3)(23,sL,2,1,"td",4),Q(),N(24,cL,1,0,"tr",10)(25,pL,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,Pt,ae,xe,Oe,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt],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 mL=()=>["../","general"];function dL(t,n){if(t&1){let e=Ct();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelects())}),ec("ngModelChange",function(a){lt(e);let r=T(2);return tc(r.selectAllItems,a)||(r.selectAllItems=a),st(a)}),l()()}if(t&2){let e=T(2);o(),Qs("ngModel",e.selectAllItems)}}function uL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelect())}),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.selected,a)||(r.selected=a),st(a)}),l()()}if(t&2){let e=n.$implicit;o(),Qs("ngModel",e.selected)}}function fL(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 hL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function gL(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 _L(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function CL(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 bL(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 vL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.loanPurposeId,a)||(r.loanPurposeId=a),st(a)}),de(6,bL,2,2,"mat-option",21,Ce),l()()()}if(t&2){let e=n.$implicit,i=T(2);o(3),b(m(4,2,"labels.inputs.Select Purpose")),o(2),Qs("ngModel",e.loanPurposeId),o(),ue(i.loanPurposeOptions)}}function xL(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 yL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"input",22),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.principal,a)||(r.principal=a),st(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),Qs("ngModel",e.principal)}}function SL(t,n){t&1&&P(0,"tr",23)}function DL(t,n){t&1&&P(0,"tr",24)}function wL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),N(3,dL,2,1,"th",9)(4,uL,2,1,"td",10),Q(),X(5,11),N(6,fL,3,3,"th",9)(7,hL,2,1,"td",10),Q(),X(8,12),N(9,gL,3,3,"th",9)(10,_L,2,1,"td",10),Q(),X(11,13),N(12,CL,3,3,"th",9)(13,vL,8,4,"td",10),Q(),X(14,14),N(15,xL,3,3,"th",9)(16,yL,3,1,"td",10),Q(),N(17,SL,1,0,"tr",15)(18,DL,1,0,"tr",16),l()()),t&2){let e=T();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function PL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,mL)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oc=(()=>{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,wL,19,3,"div",0),s(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),P(9,"fa-icon",5),l(),M(10,PL,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,Pt,we,Mi,he,ae,_e,ge,Te,En,In,Gt,Da,vn,Sn,yn,Dn,Zf,$f,xn,wn,Pn,An,Tn,Mn,za,un,mo,Tt],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 TL=["dtloan"];function AL(t,n){t&1&&P(0,"fa-icon",20)}function ML(t,n){t&1&&P(0,"fa-icon",20)}function OL(t,n){t&1&&P(0,"fa-icon",21)}function IL(t,n){t&1&&P(0,"fa-icon",22)}function EL(t,n){t&1&&P(0,"fa-icon",23)}function LL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function kL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function NL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function FL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.heading.Active Client Members"))}function RL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function BL(t,n){if(t&1&&(s(0,"mat-step",18),N(1,RL,2,3,"ng-template",13),P(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function qL(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(e.registeredTableName)}}function jL(t,n){if(t&1&&(s(0,"mat-step"),N(1,qL,1,1,"ng-template",13),P(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function zL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function VL(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),N(1,zL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var b0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.dateUtils=A(me),this.i18nService=A(t1),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(Oc,7),mi(TL,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=Ct();s(0,"div",5)(1,"mat-stepper",6,0),N(3,AL,1,0,"ng-template",7)(4,ML,1,0,"ng-template",8)(5,OL,1,0,"ng-template",9)(6,IL,1,0,"ng-template",10)(7,EL,1,0,"ng-template",11),s(8,"mat-step",12),N(9,LL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",12),N(12,kL,2,3,"ng-template",13),P(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),N(16,NL,2,3,"ng-template",13),P(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),N(20,FL,2,3,"ng-template",13),P(21,"mifosx-loans-active-client-members",17),l(),M(22,BL,4,4,"mat-step",18),de(23,jL,4,1,"mat-step",null,Ce),M(25,VL,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(),ue(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,Oc,el,Ds,nl,Tt],encapsulation:2})}}return t})();function UL(t,n){t&1&&(s(0,"div",1),P(1,"mat-spinner",2),l())}function HL(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 GL(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 WL(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 $L(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 YL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.buyDownFeeAmount,"0.00")," ")}}function KL(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 ZL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.amortizedAmount,"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.Not Yet Amortized Amount")))}function XL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function QL(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 tk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.adjustedAmount,"0.00")," ")}}function ek(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 nk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.chargedOffAmount,"0.00")," ")}}function ik(t,n){t&1&&P(0,"tr",19)}function ak(t,n){t&1&&P(0,"tr",20)}function ok(t,n){if(t&1&&(s(0,"table",4),X(1,5),N(2,GL,3,3,"th",6)(3,WL,3,3,"td",7),Q(),X(4,8),N(5,$L,3,3,"th",6)(6,YL,3,4,"td",9),Q(),X(7,10),N(8,KL,3,3,"th",6)(9,ZL,3,4,"td",9),Q(),X(10,11),N(11,JL,3,3,"th",6)(12,XL,3,4,"td",9),Q(),X(13,12),N(14,QL,3,3,"th",6)(15,tk,3,4,"td",9),Q(),X(16,13),N(17,ek,3,3,"th",6)(18,nk,3,4,"td",9),Q(),N(19,ik,1,0,"tr",14)(20,ak,1,0,"tr",15),l()),t&2){let e=T(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function rk(t,n){if(t&1&&(s(0,"div"),M(1,HL,3,3,"div",3),M(2,ok,21,3,"table",4),l()),t&2){let e=T();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var wg=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),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,UL,2,0,"div",1),M(5,rk,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,gn,Tt,fn],encapsulation:2})}}return t})();var il=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Pu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var v0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=rn({token:t,factory:t.\u0275fac})}}return t})();var Tu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Au=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var x0=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var y0=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.reportsService=A(Ep)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Lu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Nu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var lk=t=>({data:t});function sk(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 ck(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 S0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),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,Wt.required],endDate:["",Wt.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=Ct();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,sk,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,ck,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",ka(28,lk,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),v(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,we,he,Ee,ze,Le,ke,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function pk(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 mk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function dk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v("( ",e.delinquencyRange.minimumAgeDays," )")}}function uk(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,mk,2,2,"span"),M(3,dk,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 fk(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 hk(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.addedOnDate)," ")}}function gk(t,n){if(t&1&&(s(0,"td",12),M(1,hk,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function _k(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 Ck(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.liftedOnDate)," ")}}function bk(t,n){if(t&1&&(s(0,"td",12),M(1,Ck,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function vk(t,n){t&1&&P(0,"tr",13)}function xk(t,n){t&1&&P(0,"tr",14)}function yk(t,n){if(t&1&&(s(0,"table",1),X(1,4),N(2,pk,3,3,"th",5)(3,uk,4,3,"td",6),Q(),X(4,7),N(5,fk,3,3,"th",5)(6,gk,2,1,"td",6),Q(),X(7,8),N(8,_k,3,3,"th",5)(9,bk,2,1,"td",6),Q(),N(10,vk,1,0,"tr",9)(11,xk,1,0,"tr",10),l()),t&2){let e=T();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function Sk(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 Dk(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.classification)}}function wk(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 Pk(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 Tk(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 Ak(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Mk(t,n){t&1&&P(0,"tr",13)}function Ok(t,n){t&1&&P(0,"tr",14)}function Ik(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),N(6,Sk,3,3,"th",5)(7,Dk,2,1,"td",6),Q(),X(8,15),N(9,wk,3,3,"th",5)(10,Pk,3,3,"td",6),Q(),X(11,16),N(12,Tk,3,3,"th",5)(13,Ak,3,6,"td",6),Q(),N(14,Mk,1,0,"tr",9)(15,Ok,1,0,"tr",10),l()()),t&2){let e=T();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 Ek(t,n){if(t&1){let e=Ct();s(0,"button",18),it("click",function(){lt(e);let a=T(2);return st(a.createDelinquencyAction())}),P(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function Lk(t,n){t&1&&(s(0,"div",2),N(1,Ek,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function kk(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 Nk(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",ce(i.actionClass(e.action))),o(),b(e.action)}}function Fk(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 Rk(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 Bk(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 qk(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 jk(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 zk(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 Vk(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 Uk(t,n){if(t&1){let e=Ct();s(0,"button",28),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.resumeDelinquencyClassification(a))}),P(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function Hk(t,n){t&1&&(s(0,"span"),N(1,Uk,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function Gk(t,n){if(t&1&&(s(0,"td",12),M(1,Hk,2,1,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function Wk(t,n){t&1&&P(0,"tr",13)}function $k(t,n){t&1&&P(0,"tr",14)}function Yk(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),N(6,kk,3,3,"th",5)(7,Nk,2,3,"td",21),Q(),X(8,22),N(9,Fk,3,3,"th",5)(10,Rk,3,3,"td",6),Q(),X(11,23),N(12,Bk,3,3,"th",5)(13,qk,3,3,"td",6),Q(),X(14,24),N(15,jk,3,3,"th",5)(16,zk,3,3,"td",6),Q(),X(17,25),N(18,Vk,3,3,"th",5)(19,Gk,2,1,"td",6),Q(),N(20,Wk,1,0,"tr",9)(21,$k,1,0,"tr",10),l()()),t&2){let e=T();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 D0=(()=>{class t{constructor(){this.route=A(Et),this.loansServices=A(At),this.dateUtils=A(me),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(S0,{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,yk,12,3,"table",1),M(5,Ik,16,6,"div"),M(6,Lk,2,1,"div",2),M(7,Yk,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,Pt,Gt,Ae,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,un,Oi,Sa,gn,Tt,m1,fn],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 Pg=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Kk=()=>["../actions/Reschedule"];function Zk(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function Jk(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function Xk(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 Qk(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),P(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 tN(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 eN(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 nN(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 iN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.rescheduleReasonCodeValue.name," ")}}function aN(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 oN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Reject"))}),P(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Approve"))}),P(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 rN(t,n){if(t&1&&(s(0,"td",14),M(1,oN,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function lN(t,n){t&1&&P(0,"tr",22)}function sN(t,n){t&1&&P(0,"tr",23)}var w0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),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),N(7,Zk,2,0,"th",5)(8,Jk,2,1,"td",6),Q(),X(9,7),N(10,Xk,3,3,"th",5)(11,Qk,7,6,"td",6),Q(),X(12,8),N(13,tN,3,3,"th",5)(14,eN,3,3,"td",6),Q(),X(15,9),N(16,nN,3,3,"th",5)(17,iN,2,1,"td",6),Q(),X(18,10),N(19,aN,3,3,"th",5)(20,rN,2,1,"td",6),Q(),N(21,lN,1,0,"tr",11)(22,sN,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,Kk)),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,Pt,ae,Gt,vn,Sn,yn,Dn,xn,wn,un,Oi,Pn,An,Tn,Mn,gn,Tt,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 cN=()=>["../.."];function pN(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 mN(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 dN(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(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 uN(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.adjustLoanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var P0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Ip),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,Wt.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(),P(11,"span",5)(12,"input",6),M(13,pN,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,mN,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,dN,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),N(43,uN,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),ue(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,cN)),o(),v(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,Gt,Ae,ja,Wn,Tt],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 Tg=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fN=t=>["/","journal-entry","view-transfer",t];function hN(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),P(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),P(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=T();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 gN(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.saleLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Sell Loan")," "))}function _N(t,n){t&1&&(s(0,"div",4),N(1,gN,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function CN(t,n){if(t&1){let e=Ct();s(0,"button",20),it("click",function(){lt(e);let a=T(2);return st(a.cancelSaleLoan())}),P(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function bN(t,n){t&1&&(s(0,"div",4),N(1,CN,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function vN(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.buyBackLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function xN(t,n){t&1&&(s(0,"div",4),N(1,vN,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function yN(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 SN(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),P(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=T(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),v(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function DN(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 wN(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 PN(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 TN(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function AN(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 MN(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function ON(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 IN(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 EN(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 LN(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 kN(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 NN(t,n){if(t&1){let e=Ct();s(0,"button",42),p(1,"translate"),it("click",function(a){lt(e);let r=T(3);return st(r.routeJournalEntry(a))}),P(2,"i",43),l()}if(t&2){let e=T().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",ka(5,fN,e.transferId))}}function FN(t,n){if(t&1&&(s(0,"td",40),M(1,NN,3,7,"button",41),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function RN(t,n){t&1&&P(0,"tr",44)}function BN(t,n){t&1&&P(0,"tr",45)}function qN(t,n){if(t&1&&(s(0,"table",5),X(1,22),N(2,yN,3,3,"th",23)(3,SN,6,4,"td",24),Q(),X(4,25),N(5,DN,3,3,"th",23)(6,wN,3,3,"td",24),Q(),X(7,26),N(8,PN,3,3,"th",23)(9,TN,2,2,"td",24),Q(),X(10,27),N(11,AN,3,3,"th",23)(12,MN,2,2,"td",24),Q(),X(13,28),N(14,ON,3,3,"th",23)(15,IN,3,3,"td",24),Q(),X(16,29),N(17,EN,3,3,"th",23)(18,LN,3,3,"td",24),Q(),X(19,30),N(20,kN,3,3,"th",31)(21,FN,2,1,"td",32),Q(),N(22,RN,1,0,"tr",33)(23,BN,1,0,"tr",34),l()),t&2){let e=T();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var T0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Lp),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(n1,{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,hN,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,_N,2,1,"div",4),M(7,bN,2,1,"div",4),M(8,xN,2,1,"div",4),l(),M(9,qN,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,Pt,ae,Gt,Ae,un,Va,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,zf,gn,Tt,fn],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 Ru=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ag=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Mg=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Og=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function jN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function zN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function VN(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 UN(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 HN(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 GN(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 WN(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 $N(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 YN(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 KN(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 ZN(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 JN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Edit"))}),P(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Delete"))}),P(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 XN(t,n){if(t&1&&(s(0,"td",14),M(1,JN,7,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function QN(t,n){t&1&&P(0,"tr",19)}function tF(t,n){t&1&&P(0,"tr",20)}function eF(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),N(6,jN,2,0,"th",4)(7,zN,2,1,"td",5),Q(),X(8,6),N(9,VN,3,3,"th",4)(10,UN,3,3,"td",5),Q(),X(11,7),N(12,HN,3,3,"th",4)(13,GN,3,3,"td",5),Q(),X(14,8),N(15,WN,3,3,"th",4)(16,$N,3,3,"td",5),Q(),X(17,9),N(18,YN,3,3,"th",4)(19,KN,3,3,"td",5),Q(),X(20,10),N(21,ZN,3,3,"th",4)(22,XN,2,1,"td",5),Q(),N(23,QN,1,0,"tr",11)(24,tF,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=T();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 A0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dates=A(me),this.settingsService=A(oe),this.loansService=A(At),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(k=>{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),de(1,eF,25,6,"div",null,Ce),l()),i&2&&(o(),ue(a.loanTermVariationsData))},dependencies:[wt,Pt,vn,Sn,yn,Dn,xn,wn,qa,Oi,un,Pn,An,Tn,Mn,gn,Tt,fn],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 qu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();function nF(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 iF(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 aF(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 oF(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 rF(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 lF(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 sF(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 cF(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.amountAdjustment,"-")," ")}}function pF(t,n){t&1&&P(0,"tr",12)}function mF(t,n){t&1&&P(0,"tr",13)}function dF(t,n){if(t&1&&(s(0,"table",1),X(1,2),N(2,nF,3,3,"th",3)(3,iF,3,3,"td",4),Q(),X(4,5),N(5,aF,3,3,"th",3)(6,oF,3,3,"td",4),Q(),X(7,6),N(8,rF,3,3,"th",3)(9,lF,3,3,"td",4),Q(),X(10,7),N(11,sF,3,3,"th",3)(12,cF,3,4,"td",4),Q(),N(13,pF,1,0,"tr",8)(14,mF,1,0,"tr",9),l()),t&2){let e=T();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Ig=(()=>{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,dF,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt,fn],encapsulation:2})}}return t})();var ju=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var zu=(()=>{class t{constructor(){this.loansService=A(At)}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 Af(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=rn({token:t,factory:t.\u0275fac})}}return t})();var uF=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:p0,resolve:{loansAccountTemplate:Mu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:Np,resolve:{loanDetailsData:il,loanDatatables:v0,loanArrearsDelinquencyConfig:Tg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Fp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,loanDatatables:v0}},{path:"accountdetail",component:Rp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Dm,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:Sm},{path:"export",component:_0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:ju},children:[{path:"",component:Ig}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:Fu,loanDelinquencyData:Bu,loanDelinquencyActions:Og},children:[{path:"",component:D0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:Pg},children:[{path:"",component:w0}]},{path:"loan-collateral",component:s0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:Mg}},{path:"term-variations",component:A0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,interestPausesData:qu}},{path:"loan-tranche-details",component:l0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:wm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:r0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:Pm},{path:"loan-documents",component:m0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:Ou}},{path:"notes",component:Bp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:Pu}},{path:"standing-instruction",component:d0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:T0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Ag,loanTransfersData:Ru}},{path:"datatables",children:[{path:":datatableName",component:Tm,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Tu}}]},{path:"buy-down-fees",component:wg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:zu}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:il},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:f0,resolve:{loansAccountTransaction:Iu}},{path:"edit",component:h0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Lu}},{path:"reciept",component:g0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Eu}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:x0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:u0,resolve:{loansAccountCharge:y0,loanDetailsData:il}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:P0,resolve:{loansAccountCharge:y0,loanDetailsData:il}}]},{path:":loanId/actions/:action",component:o0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Au}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-TBVTO44T.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:x0}}]},{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:b0,resolve:{loansAccountTemplate:Nu,groupsData:D1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:C0,resolve:{glimData:ku,groupsData:md}}]}],Eg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({providers:[il,Pu,v0,Tu,Fu,Au,Mu,Ou,x0,y0,Iu,Lu,Eu,y1,md,ku,S1,Nu,Ru,Bu,qu,ju,zu],imports:[pd.forChild(uF),pd]})}}return t})();var Lg=(()=>{class t{constructor(){this.externalAssetOwner=A(Lp)}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),P(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),P(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,Pt,un,Va,gn,Tt,fn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var Flt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({imports:[v1,h1,Eg,d1,Hf,Xm,Np,Fp,Rp,Bp,Pm,wm,Dm,ho,o0,Am,Sm,Tm,Mm,Om,Im,Em,km,Fm,r0,Rm,l0,Bm,qm,s0,p0,Oo,Io,Eo,nl,c0,jm,Vm,Um,zm,Gm,Wm,$m,Ym,Km,m0,d0,Mc,Zm,Jm,u0,f0,h0,g0,_0,Nm,C0,b0,D0,el,Qm,Hm,Ds,w0,P0,t0,e0,T0,Lg,S0,n0,i0,A0,a0,Oc]})}}return t})();export{Flt 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),Zl("",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(Re(78,122,Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value"),"catalogs")),o(5),v("",m(82,125,"labels.inputs.Interest calculation period"),": "),o(3),b(Re(86,132,Ye(85,127,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value"),"catalogs")),o(3),O(a.loansAccount.allowPartialPeriodInterestCalculation?87:-1),o(),O(a.loansAccount.inArrearsTolerance?88:-1),o(),O(a.loansAccount.graceOnInterestCharged?89:-1),o(3),v("",m(93,135,"labels.inputs.Repayment strategy"),": "),o(3),b(Re(97,142,Ye(96,137,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name"),"catalogs")),o(5),v(" ",m(101,145,"labels.inputs.Installment Amount")," "),o(3),v(" ",m(104,147,a.loansAccount.fixedEmiAmount)," "),o(4),v(" ",m(108,149,"labels.inputs.Balloon Repayment Amount")," "),o(3),v(" ",m(111,151,a.loansAccount.balloonRepaymentAmount)," "),o(3),b(m(114,153,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?116:-1),o(),O(a.loansAccount.graceOnInterestPayment?117:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?118:-1),o(3),v(" ",m(122,155,"labels.inputs.Enable installment level Delinquency")," "),o(3),v(" ",m(125,157,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?126:-1),o(3),v("",m(130,159,"labels.inputs.Recalculate Interest"),": "),o(3),b(m(133,161,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?134:-1),o(),O(a.loansAccount.charges.length?135:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?136:-1),o(4),v(" ",m(141,163,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(169,sE)),o(),v(" ",m(144,165,"labels.buttons.Cancel")," "),o(3),v(" ",m(147,167,"labels.buttons.Submit")," "))},dependencies:[wt,Pt,ae,Gt,Mp,Va,$o,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,za,un,Sa,gn,Tt,wa,Tp,fn,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 m7=["dtloan"];function d7(t,n){t&1&&P(0,"fa-icon",20)}function u7(t,n){t&1&&P(0,"fa-icon",20)}function f7(t,n){t&1&&P(0,"fa-icon",21)}function h7(t,n){t&1&&P(0,"fa-icon",22)}function g7(t,n){t&1&&P(0,"fa-icon",23)}function _7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function C7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function b7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function v7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function x7(t,n){if(t&1&&(s(0,"mat-step",18),N(1,v7,2,3,"ng-template",14),P(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function y7(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(e.registeredTableName)}}function S7(t,n){if(t&1&&(s(0,"mat-step"),N(1,y7,1,1,"ng-template",14),P(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function D7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function w7(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),N(1,D7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var p0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),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(m7,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=Ct();s(0,"div",6)(1,"mat-stepper",7,0),N(3,d7,1,0,"ng-template",8)(4,u7,1,0,"ng-template",9)(5,f7,1,0,"ng-template",10)(6,h7,1,0,"ng-template",11)(7,g7,1,0,"ng-template",12),s(8,"mat-step",13),N(9,_7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(12,"mat-step",13),N(13,C7,2,3,"ng-template",14),P(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),N(17,b7,2,3,"ng-template",14),P(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,x7,4,4,"mat-step",18),de(21,S7,4,1,"mat-step",null,Ce),M(23,w7,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(),ue(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,Ds,nl,Tt],encapsulation:2})}}return t})();var m0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),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="+Gf.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&&P(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,Pt,f1],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 P7=["instructionsTable"];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.Client")))}function A7(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 M7(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 O7(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 I7(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 E7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v(" ",e.toClient.displayName," ")}}function L7(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 k7(t,n){if(t&1&&(s(0,"td",17),M(1,E7,2,1,"span"),M(2,L7,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 N7(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 F7(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 R7(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 B7(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 q7(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 j7(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 z7(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 V7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function U7(t,n){t&1&&(s(0,"span"),N(1,V7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function H7(t,n){if(t&1){let e=Ct();s(0,"button",22),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T();return st(r.deleteStandingInstruction(a.id))}),P(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function G7(t,n){t&1&&(s(0,"span"),N(1,H7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function W7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function $7(t,n){if(t&1&&(s(0,"td",17),M(1,U7,2,1,"span"),M(2,G7,2,1,"span"),N(3,W7,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 Y7(t,n){t&1&&P(0,"tr",25)}function K7(t,n){t&1&&P(0,"tr",26)}var d0=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),this.dialog=A(Gn),this.accountTransfersService=A(x1),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(P7,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),N(9,T7,3,3,"th",6)(10,A7,2,2,"td",7),Q(),X(11,8),N(12,M7,3,3,"th",6)(13,O7,2,2,"td",7),Q(),X(14,9),N(15,I7,3,3,"th",6)(16,k7,3,2,"td",7),Q(),X(17,10),N(18,N7,3,3,"th",6)(19,F7,2,2,"td",7),Q(),X(20,11),N(21,R7,3,3,"th",6)(22,B7,2,2,"td",7),Q(),X(23,12),N(24,q7,3,3,"th",6)(25,j7,4,6,"td",7),Q(),X(26,13),N(27,z7,3,3,"th",6)(28,$7,4,3,"td",7),Q(),N(29,Y7,1,0,"tr",14)(30,K7,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,Pt,Gt,Ae,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,gn,Tt],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 Z7(t,n){t&1&&P(0,"fa-icon",15)}function J7(t,n){t&1&&P(0,"fa-icon",15)}function X7(t,n){t&1&&P(0,"fa-icon",16)}function Q7(t,n){t&1&&P(0,"fa-icon",17)}function t8(t,n){t&1&&P(0,"fa-icon",18)}function e8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function n8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function i8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function a8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function o8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function r8(t,n){if(t&1){let e=Ct();s(0,"mat-step",14),N(1,o8,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Mc=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),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.allowPartialPeriodInterestCalculation=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=Ct();s(0,"div",1)(1,"mat-stepper",2,0),N(3,Z7,1,0,"ng-template",3)(4,J7,1,0,"ng-template",4)(5,X7,1,0,"ng-template",5)(6,Q7,1,0,"ng-template",6)(7,t8,1,0,"ng-template",7),s(8,"mat-step",8),N(9,e8,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",8),N(12,n8,2,3,"ng-template",9),P(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),N(15,i8,2,3,"ng-template",9),P(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),N(18,a8,2,3,"ng-template",9),P(19,"mifosx-loans-account-schedule-step",13),l(),M(20,r8,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,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,nl,Tt],encapsulation:2})}}return t})();var l8=()=>["../"];function s8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function c8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(3);return st(a.payCharge())}),P(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Pay")," "))}function p8(t,n){t&1&&(s(0,"span"),N(1,c8,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function m8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(3);return st(a.waiveCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Waive")," "))}function d8(t,n){t&1&&(s(0,"span"),N(1,m8,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function u8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(2);return st(a.adjustmentCharge())}),P(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Adjustment")," "))}function f8(t,n){if(t&1&&(s(0,"div",0),N(1,s8,4,3,"button",8),M(2,p8,2,1,"span"),M(3,d8,2,1,"span"),s(4,"span"),N(5,u8,4,3,"button",9),l()()),t&2){let e=T();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function h8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Edit")," "))}function g8(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.deleteCharge())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v(" ",m(3,1,"labels.buttons.Delete")," "))}function _8(t,n){t&1&&(s(0,"div",0),N(1,h8,4,3,"button",8)(2,g8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var u0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(Et),this.dateUtils=A(me),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 Pi({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,f8,6,4,"div",0),M(1,_8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),P(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,l8)),o(),v(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,ca,Pt,ae,xe,Oe,Gt,Ae,un,gn,Tt,fn],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 C8=()=>["../"];function b8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",13),P(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.undoTransaction())}),P(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=T(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 v8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.chargebackTransaction())}),P(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=T(2);o(),x("disabled",!e.allowChargeback),o(2),v("",m(4,2,"Chargeback")," ")}}function x8(t,n){t&1&&(s(0,"div",0),N(1,b8,9,9,"span",12)(2,v8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function y8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Re(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=T();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),sd),o(),v(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function D8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),v(" ",m(2,1,"External Id")," "))}function w8(t,n){if(t&1&&(s(0,"div",5),P(1,"mifosx-external-identifier",18),l()),t&2){let e=T();o(),x("externalId",ce(e.transactionData.externalId))}}function P8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),v(" ",Re(2,1,"Classification","catalogs")," "))}function T8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=T();o(),v(" ",e.transactionData.classification.name," ")}}function A8(t,n){t&1&&P(0,"mat-divider",7),t&2&&x("inset",!0)}function M8(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 O8(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 I8(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 E8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=T(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),sd),o(),v(" ",e.toLoanTransaction," ")}}function L8(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 k8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function N8(t,n){t&1&&P(0,"tr",31)}function F8(t,n){t&1&&P(0,"tr",32)}function R8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),P(3,"br"),s(4,"table",19),X(5,20),N(6,M8,3,3,"th",21)(7,O8,3,4,"td",22),Q(),X(8,23),N(9,I8,3,3,"th",21)(10,E8,3,2,"td",24),Q(),X(11,25),N(12,L8,3,3,"th",21)(13,k8,3,6,"td",24),Q(),N(14,N8,1,0,"tr",26)(15,F8,1,0,"tr",27),l()()),t&2){let e=T();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 B8(t,n){if(t&1&&P(0,"mifosx-transaction-payment-detail",9),t&2){let e=T();x("paymentDetailData",e.transactionData.paymentDetailData)}}var f0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(Et),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.translateService=A(pa),this.settingsService=A(oe),this.organizationService=A(Ip),this.alertService=A(Ql),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 Pi({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Pi({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 nc({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Pi({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,x8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),P(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,y8,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,D8,3,3,"div",4),M(37,w8,2,2,"div",5),M(38,P8,3,4,"div",4),M(39,T8,2,1,"div",6),M(40,A8,1,1,"mat-divider",7),M(41,R8,16,6,"div",8),M(42,B8,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(" ",Re(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(" ",Re(15,26,"Type","catalogs")," "),o(3),v(" ",Re(18,29,a.transactionData.type.value,"catalogs")," "),o(3),v(" ",Re(21,32,"Transaction Date","catalogs")," "),o(3),v(" ",m(24,35,a.transactionData.date)," "),o(3),v(" ",Re(27,37,"Currency","catalogs")," "),o(3),v(" ",a.transactionData.currency.name," "),o(2),v(" ",Re(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,C8)),o(),v(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,ca,Pt,ae,xe,Oe,Gt,Ae,un,Va,$o,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,b1,Sa,gn,Tt,wa],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 q8=()=>["../"];function j8(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 z8(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 V8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Account Number")))}function U8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Cheque")))}function H8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Routing Code")))}function G8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Receipt Number")))}function W8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),b(m(3,1,"labels.inputs.Bank")))}var h0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(Et),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),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:["",Wt.required],transactionAmount:["",Wt.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=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,j8,7,9,"mat-error"),l(),P(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),de(24,z8,2,2,"mat-option",10,Ce),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,V8,5,3,"mat-form-field"),M(34,U8,5,3,"mat-form-field"),M(35,H8,5,3,"mat-form-field"),M(36,G8,5,3,"mat-form-field"),M(37,W8,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),ue(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,q8)),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,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,tn,en,Qe,Gt,Bi,ja,Tt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var $8=()=>["../../../general"],g0=(()=>{class t{constructor(){this.sanitizer=A(Jl),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),P(3,"fa-icon",3),c(4),p(5,"translate"),l()(),P(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,$8)),o(2),v("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Pt,ae,xe,Gt,un,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var Y8=()=>["../"];function K8(t,n){if(t&1&&P(0,"iframe",13),t&2){let e=T();x("src",e.pentahoUrl,hp)}}var _0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.reportsService=A(Ep),this.formBuilder=A(Pe),this.dateUtils=A(me),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:["",Wt.required],toDate:[this.settingsService.businessDate,Wt.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=Ct();s(0,"form",2),it("ngSubmit",function(){return lt(r),st(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(9);return st(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),P(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(){lt(r);let d=Lt(24);return st(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),P(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),P(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,K8,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,Y8)),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,Pt,Ne,we,he,Ee,ze,Le,ke,ae,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,un,Tt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var Z8=t=>["../../",t,"general"];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.Loan Id")))}function X8(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.childLoanId," ")}}function Q8(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 tL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientId)}}function eL(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 nL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.clientName)}}function iL(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 aL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childLoanAccountNo)}}function oL(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 rL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.childPrincipalAmount)}}function lL(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 sL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(e.parentPrincipalAmount)}}function cL(t,n){t&1&&P(0,"tr",14)}function pL(t,n){if(t&1&&P(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",ka(1,Z8,e.childLoanId))}}var C0=(()=>{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),N(7,J8,3,3,"th",3)(8,X8,2,1,"td",4),Q(),X(9,5),N(10,Q8,3,3,"th",3)(11,tL,2,1,"td",4),Q(),X(12,6),N(13,eL,3,3,"th",3)(14,nL,2,1,"td",4),Q(),X(15,7),N(16,iL,3,3,"th",3)(17,aL,2,1,"td",4),Q(),X(18,8),N(19,oL,3,3,"th",3)(20,rL,2,1,"td",4),Q(),X(21,9),N(22,lL,3,3,"th",3)(23,sL,2,1,"td",4),Q(),N(24,cL,1,0,"tr",10)(25,pL,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,Pt,ae,xe,Oe,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt],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 mL=()=>["../","general"];function dL(t,n){if(t&1){let e=Ct();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelects())}),ec("ngModelChange",function(a){lt(e);let r=T(2);return tc(r.selectAllItems,a)||(r.selectAllItems=a),st(a)}),l()()}if(t&2){let e=T(2);o(),Qs("ngModel",e.selectAllItems)}}function uL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelect())}),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.selected,a)||(r.selected=a),st(a)}),l()()}if(t&2){let e=n.$implicit;o(),Qs("ngModel",e.selected)}}function fL(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 hL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function gL(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 _L(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),b(e.displayName)}}function CL(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 bL(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 vL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.loanPurposeId,a)||(r.loanPurposeId=a),st(a)}),de(6,bL,2,2,"mat-option",21,Ce),l()()()}if(t&2){let e=n.$implicit,i=T(2);o(3),b(m(4,2,"labels.inputs.Select Purpose")),o(2),Qs("ngModel",e.loanPurposeId),o(),ue(i.loanPurposeOptions)}}function xL(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 yL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"input",22),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.principal,a)||(r.principal=a),st(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),Qs("ngModel",e.principal)}}function SL(t,n){t&1&&P(0,"tr",23)}function DL(t,n){t&1&&P(0,"tr",24)}function wL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),N(3,dL,2,1,"th",9)(4,uL,2,1,"td",10),Q(),X(5,11),N(6,fL,3,3,"th",9)(7,hL,2,1,"td",10),Q(),X(8,12),N(9,gL,3,3,"th",9)(10,_L,2,1,"td",10),Q(),X(11,13),N(12,CL,3,3,"th",9)(13,vL,8,4,"td",10),Q(),X(14,14),N(15,xL,3,3,"th",9)(16,yL,3,1,"td",10),Q(),N(17,SL,1,0,"tr",15)(18,DL,1,0,"tr",16),l()()),t&2){let e=T();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function PL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,mL)),o(),v(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oc=(()=>{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,wL,19,3,"div",0),s(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),P(9,"fa-icon",5),l(),M(10,PL,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,Pt,we,Mi,he,ae,_e,ge,Te,En,In,Gt,Da,vn,Sn,yn,Dn,Zf,$f,xn,wn,Pn,An,Tn,Mn,za,un,mo,Tt],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 TL=["dtloan"];function AL(t,n){t&1&&P(0,"fa-icon",20)}function ML(t,n){t&1&&P(0,"fa-icon",20)}function OL(t,n){t&1&&P(0,"fa-icon",21)}function IL(t,n){t&1&&P(0,"fa-icon",22)}function EL(t,n){t&1&&P(0,"fa-icon",23)}function LL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.DETAILS"))}function kL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.TERMS"))}function NL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.CHARGES"))}function FL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.heading.Active Client Members"))}function RL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function BL(t,n){if(t&1&&(s(0,"mat-step",18),N(1,RL,2,3,"ng-template",13),P(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function qL(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(e.registeredTableName)}}function jL(t,n){if(t&1&&(s(0,"mat-step"),N(1,qL,1,1,"ng-template",13),P(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function zL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&b(m(1,1,"labels.inputs.PREVIEW"))}function VL(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),N(1,zL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var b0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.dateUtils=A(me),this.i18nService=A(t1),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(Oc,7),mi(TL,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=Ct();s(0,"div",5)(1,"mat-stepper",6,0),N(3,AL,1,0,"ng-template",7)(4,ML,1,0,"ng-template",8)(5,OL,1,0,"ng-template",9)(6,IL,1,0,"ng-template",10)(7,EL,1,0,"ng-template",11),s(8,"mat-step",12),N(9,LL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",12),N(12,kL,2,3,"ng-template",13),P(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),N(16,NL,2,3,"ng-template",13),P(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),N(20,FL,2,3,"ng-template",13),P(21,"mifosx-loans-active-client-members",17),l(),M(22,BL,4,4,"mat-step",18),de(23,jL,4,1,"mat-step",null,Ce),M(25,VL,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(),ue(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,Oc,el,Ds,nl,Tt],encapsulation:2})}}return t})();function UL(t,n){t&1&&(s(0,"div",1),P(1,"mat-spinner",2),l())}function HL(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 GL(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 WL(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 $L(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 YL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.buyDownFeeAmount,"0.00")," ")}}function KL(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 ZL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.amortizedAmount,"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.Not Yet Amortized Amount")))}function XL(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function QL(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 tk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.adjustedAmount,"0.00")," ")}}function ek(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 nk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.chargedOffAmount,"0.00")," ")}}function ik(t,n){t&1&&P(0,"tr",19)}function ak(t,n){t&1&&P(0,"tr",20)}function ok(t,n){if(t&1&&(s(0,"table",4),X(1,5),N(2,GL,3,3,"th",6)(3,WL,3,3,"td",7),Q(),X(4,8),N(5,$L,3,3,"th",6)(6,YL,3,4,"td",9),Q(),X(7,10),N(8,KL,3,3,"th",6)(9,ZL,3,4,"td",9),Q(),X(10,11),N(11,JL,3,3,"th",6)(12,XL,3,4,"td",9),Q(),X(13,12),N(14,QL,3,3,"th",6)(15,tk,3,4,"td",9),Q(),X(16,13),N(17,ek,3,3,"th",6)(18,nk,3,4,"td",9),Q(),N(19,ik,1,0,"tr",14)(20,ak,1,0,"tr",15),l()),t&2){let e=T(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function rk(t,n){if(t&1&&(s(0,"div"),M(1,HL,3,3,"div",3),M(2,ok,21,3,"table",4),l()),t&2){let e=T();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var wg=(()=>{class t{constructor(){this.route=A(Et),this.loansService=A(At),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,UL,2,0,"div",1),M(5,rk,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,gn,Tt,fn],encapsulation:2})}}return t})();var il=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Pu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var v0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=rn({token:t,factory:t.\u0275fac})}}return t})();var Tu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Au=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var x0=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var y0=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.reportsService=A(Ep)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Lu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Nu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var lk=t=>({data:t});function sk(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 ck(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 S0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),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,Wt.required],endDate:["",Wt.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=Ct();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,sk,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){lt(r);let d=Lt(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,ck,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",ka(28,lk,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),v(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,we,he,Ee,ze,Le,ke,_e,ge,Ue,Je,Te,tn,en,Qe,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function pk(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 mk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function dk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),v("( ",e.delinquencyRange.minimumAgeDays," )")}}function uk(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,mk,2,2,"span"),M(3,dk,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 fk(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 hk(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.addedOnDate)," ")}}function gk(t,n){if(t&1&&(s(0,"td",12),M(1,hk,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function _k(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 Ck(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),v(" ",m(2,1,e.liftedOnDate)," ")}}function bk(t,n){if(t&1&&(s(0,"td",12),M(1,Ck,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function vk(t,n){t&1&&P(0,"tr",13)}function xk(t,n){t&1&&P(0,"tr",14)}function yk(t,n){if(t&1&&(s(0,"table",1),X(1,4),N(2,pk,3,3,"th",5)(3,uk,4,3,"td",6),Q(),X(4,7),N(5,fk,3,3,"th",5)(6,gk,2,1,"td",6),Q(),X(7,8),N(8,_k,3,3,"th",5)(9,bk,2,1,"td",6),Q(),N(10,vk,1,0,"tr",9)(11,xk,1,0,"tr",10),l()),t&2){let e=T();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function Sk(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 Dk(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),b(e.classification)}}function wk(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 Pk(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 Tk(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 Ak(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),v(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Mk(t,n){t&1&&P(0,"tr",13)}function Ok(t,n){t&1&&P(0,"tr",14)}function Ik(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),N(6,Sk,3,3,"th",5)(7,Dk,2,1,"td",6),Q(),X(8,15),N(9,wk,3,3,"th",5)(10,Pk,3,3,"td",6),Q(),X(11,16),N(12,Tk,3,3,"th",5)(13,Ak,3,6,"td",6),Q(),N(14,Mk,1,0,"tr",9)(15,Ok,1,0,"tr",10),l()()),t&2){let e=T();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 Ek(t,n){if(t&1){let e=Ct();s(0,"button",18),it("click",function(){lt(e);let a=T(2);return st(a.createDelinquencyAction())}),P(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function Lk(t,n){t&1&&(s(0,"div",2),N(1,Ek,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function kk(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 Nk(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",ce(i.actionClass(e.action))),o(),b(e.action)}}function Fk(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 Rk(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 Bk(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 qk(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 jk(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 zk(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 Vk(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 Uk(t,n){if(t&1){let e=Ct();s(0,"button",28),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.resumeDelinquencyClassification(a))}),P(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function Hk(t,n){t&1&&(s(0,"span"),N(1,Uk,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function Gk(t,n){if(t&1&&(s(0,"td",12),M(1,Hk,2,1,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function Wk(t,n){t&1&&P(0,"tr",13)}function $k(t,n){t&1&&P(0,"tr",14)}function Yk(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),N(6,kk,3,3,"th",5)(7,Nk,2,3,"td",21),Q(),X(8,22),N(9,Fk,3,3,"th",5)(10,Rk,3,3,"td",6),Q(),X(11,23),N(12,Bk,3,3,"th",5)(13,qk,3,3,"td",6),Q(),X(14,24),N(15,jk,3,3,"th",5)(16,zk,3,3,"td",6),Q(),X(17,25),N(18,Vk,3,3,"th",5)(19,Gk,2,1,"td",6),Q(),N(20,Wk,1,0,"tr",9)(21,$k,1,0,"tr",10),l()()),t&2){let e=T();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 D0=(()=>{class t{constructor(){this.route=A(Et),this.loansServices=A(At),this.dateUtils=A(me),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(S0,{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,yk,12,3,"table",1),M(5,Ik,16,6,"div"),M(6,Lk,2,1,"div",2),M(7,Yk,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,Pt,Gt,Ae,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,un,Oi,Sa,gn,Tt,m1,fn],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 Pg=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Kk=()=>["../actions/Reschedule"];function Zk(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function Jk(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(e.id)}}function Xk(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 Qk(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),P(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 tN(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 eN(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 nN(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 iN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),v(" ",e.rescheduleReasonCodeValue.name," ")}}function aN(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 oN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Reject"))}),P(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Approve"))}),P(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 rN(t,n){if(t&1&&(s(0,"td",14),M(1,oN,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function lN(t,n){t&1&&P(0,"tr",22)}function sN(t,n){t&1&&P(0,"tr",23)}var w0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.loansServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),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),N(7,Zk,2,0,"th",5)(8,Jk,2,1,"td",6),Q(),X(9,7),N(10,Xk,3,3,"th",5)(11,Qk,7,6,"td",6),Q(),X(12,8),N(13,tN,3,3,"th",5)(14,eN,3,3,"td",6),Q(),X(15,9),N(16,nN,3,3,"th",5)(17,iN,2,1,"td",6),Q(),X(18,10),N(19,aN,3,3,"th",5)(20,rN,2,1,"td",6),Q(),N(21,lN,1,0,"tr",11)(22,sN,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,Kk)),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,Pt,ae,Gt,vn,Sn,yn,Dn,xn,wn,un,Oi,Pn,An,Tn,Mn,gn,Tt,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 cN=()=>["../.."];function pN(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 mN(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 dN(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(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 uN(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.adjustLoanChargeForm.valid),o(),v(" ",m(2,2,"labels.buttons.Submit")," ")}}var P0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(Et),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Ip),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,Wt.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(),P(11,"span",5)(12,"input",6),M(13,pN,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,mN,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,dN,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),N(43,uN,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),ue(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,cN)),o(),v(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Ee,ze,Le,ke,ae,xe,Oe,Ve,_e,ge,Ue,Je,Te,En,In,Gt,Ae,ja,Wn,Tt],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 Tg=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fN=t=>["/","journal-entry","view-transfer",t];function hN(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),P(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),P(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=T();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 gN(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.saleLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Sell Loan")," "))}function _N(t,n){t&1&&(s(0,"div",4),N(1,gN,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function CN(t,n){if(t&1){let e=Ct();s(0,"button",20),it("click",function(){lt(e);let a=T(2);return st(a.cancelSaleLoan())}),P(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function bN(t,n){t&1&&(s(0,"div",4),N(1,CN,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function vN(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.buyBackLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),v("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function xN(t,n){t&1&&(s(0,"div",4),N(1,vN,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function yN(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 SN(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),P(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=T(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),v(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function DN(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 wN(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 PN(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 TN(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function AN(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 MN(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function ON(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 IN(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 EN(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 LN(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 kN(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 NN(t,n){if(t&1){let e=Ct();s(0,"button",42),p(1,"translate"),it("click",function(a){lt(e);let r=T(3);return st(r.routeJournalEntry(a))}),P(2,"i",43),l()}if(t&2){let e=T().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",ka(5,fN,e.transferId))}}function FN(t,n){if(t&1&&(s(0,"td",40),M(1,NN,3,7,"button",41),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function RN(t,n){t&1&&P(0,"tr",44)}function BN(t,n){t&1&&P(0,"tr",45)}function qN(t,n){if(t&1&&(s(0,"table",5),X(1,22),N(2,yN,3,3,"th",23)(3,SN,6,4,"td",24),Q(),X(4,25),N(5,DN,3,3,"th",23)(6,wN,3,3,"td",24),Q(),X(7,26),N(8,PN,3,3,"th",23)(9,TN,2,2,"td",24),Q(),X(10,27),N(11,AN,3,3,"th",23)(12,MN,2,2,"td",24),Q(),X(13,28),N(14,ON,3,3,"th",23)(15,IN,3,3,"td",24),Q(),X(16,29),N(17,EN,3,3,"th",23)(18,LN,3,3,"td",24),Q(),X(19,30),N(20,kN,3,3,"th",31)(21,FN,2,1,"td",32),Q(),N(22,RN,1,0,"tr",33)(23,BN,1,0,"tr",34),l()),t&2){let e=T();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var T0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Lp),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(n1,{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,hN,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,_N,2,1,"div",4),M(7,bN,2,1,"div",4),M(8,xN,2,1,"div",4),l(),M(9,qN,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,Pt,ae,Gt,Ae,un,Va,vn,Sn,yn,Dn,xn,wn,Oi,Pn,An,Tn,Mn,zf,gn,Tt,fn],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 Ru=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Ag=(()=>{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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Mg=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var Og=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function jN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function zN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),b(e+1)}}function VN(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 UN(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 HN(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 GN(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 WN(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 $N(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 YN(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 KN(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 ZN(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 JN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Edit"))}),P(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Delete"))}),P(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 XN(t,n){if(t&1&&(s(0,"td",14),M(1,JN,7,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function QN(t,n){t&1&&P(0,"tr",19)}function tF(t,n){t&1&&P(0,"tr",20)}function eF(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),N(6,jN,2,0,"th",4)(7,zN,2,1,"td",5),Q(),X(8,6),N(9,VN,3,3,"th",4)(10,UN,3,3,"td",5),Q(),X(11,7),N(12,HN,3,3,"th",4)(13,GN,3,3,"td",5),Q(),X(14,8),N(15,WN,3,3,"th",4)(16,$N,3,3,"td",5),Q(),X(17,9),N(18,YN,3,3,"th",4)(19,KN,3,3,"td",5),Q(),X(20,10),N(21,ZN,3,3,"th",4)(22,XN,2,1,"td",5),Q(),N(23,QN,1,0,"tr",11)(24,tF,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=T();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 A0=(()=>{class t{constructor(){this.route=A(Et),this.router=A(le),this.dates=A(me),this.settingsService=A(oe),this.loansService=A(At),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(k=>{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),de(1,eF,25,6,"div",null,Ce),l()),i&2&&(o(),ue(a.loanTermVariationsData))},dependencies:[wt,Pt,vn,Sn,yn,Dn,xn,wn,qa,Oi,un,Pn,An,Tn,Mn,gn,Tt,fn],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 qu=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();function nF(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 iF(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 aF(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 oF(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 rF(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 lF(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 sF(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 cF(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),v(" ",Re(2,1,e.amountAdjustment,"-")," ")}}function pF(t,n){t&1&&P(0,"tr",12)}function mF(t,n){t&1&&P(0,"tr",13)}function dF(t,n){if(t&1&&(s(0,"table",1),X(1,2),N(2,nF,3,3,"th",3)(3,iF,3,3,"td",4),Q(),X(4,5),N(5,aF,3,3,"th",3)(6,oF,3,3,"td",4),Q(),X(7,6),N(8,rF,3,3,"th",3)(9,lF,3,3,"td",4),Q(),X(10,7),N(11,sF,3,3,"th",3)(12,cF,3,4,"td",4),Q(),N(13,pF,1,0,"tr",8)(14,mF,1,0,"tr",9),l()),t&2){let e=T();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Ig=(()=>{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,dF,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,Pt,vn,Sn,yn,Dn,xn,wn,Pn,An,Tn,Mn,Tt,fn],encapsulation:2})}}return t})();var ju=(()=>{class t{constructor(){this.loansService=A(At)}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=rn({token:t,factory:t.\u0275fac})}}return t})();var zu=(()=>{class t{constructor(){this.loansService=A(At)}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 Af(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=rn({token:t,factory:t.\u0275fac})}}return t})();var uF=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:p0,resolve:{loansAccountTemplate:Mu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:Np,resolve:{loanDetailsData:il,loanDatatables:v0,loanArrearsDelinquencyConfig:Tg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Fp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,loanDatatables:v0}},{path:"accountdetail",component:Rp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Dm,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:Sm},{path:"export",component:_0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:ju},children:[{path:"",component:Ig}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:Fu,loanDelinquencyData:Bu,loanDelinquencyActions:Og},children:[{path:"",component:D0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:Pg},children:[{path:"",component:w0}]},{path:"loan-collateral",component:s0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:Mg}},{path:"term-variations",component:A0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:il,interestPausesData:qu}},{path:"loan-tranche-details",component:l0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:wm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:r0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:Pm},{path:"loan-documents",component:m0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:Ou}},{path:"notes",component:Bp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:Pu}},{path:"standing-instruction",component:d0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:T0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Ag,loanTransfersData:Ru}},{path:"datatables",children:[{path:":datatableName",component:Tm,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Tu}}]},{path:"buy-down-fees",component:wg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:zu}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:il},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:f0,resolve:{loansAccountTransaction:Iu}},{path:"edit",component:h0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Lu}},{path:"reciept",component:g0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Eu}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:x0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:u0,resolve:{loansAccountCharge:y0,loanDetailsData:il}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:P0,resolve:{loansAccountCharge:y0,loanDetailsData:il}}]},{path:":loanId/actions/:action",component:o0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Au}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-I2AUZ5I3.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:x0}}]},{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:b0,resolve:{loansAccountTemplate:Nu,groupsData:D1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:C0,resolve:{glimData:ku,groupsData:md}}]}],Eg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({providers:[il,Pu,v0,Tu,Fu,Au,Mu,Ou,x0,y0,Iu,Lu,Eu,y1,md,ku,S1,Nu,Ru,Bu,qu,ju,zu],imports:[pd.forChild(uF),pd]})}}return t})();var Lg=(()=>{class t{constructor(){this.externalAssetOwner=A(Lp)}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),P(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),P(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,Pt,un,Va,gn,Tt,fn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var Flt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({imports:[v1,h1,Eg,d1,Hf,Xm,Np,Fp,Rp,Bp,Pm,wm,Dm,ho,o0,Am,Sm,Tm,Mm,Om,Im,Em,km,Fm,r0,Rm,l0,Bm,qm,s0,p0,Oo,Io,Eo,nl,c0,jm,Vm,Um,zm,Gm,Wm,$m,Ym,Km,m0,d0,Mc,Zm,Jm,u0,f0,h0,g0,_0,Nm,C0,b0,D0,el,Qm,Hm,Ds,w0,P0,t0,e0,T0,Lg,S0,n0,i0,A0,a0,Oc]})}}return t})();export{Flt as LoansModule}; diff --git a/browser/main.js b/browser/main.js index c5fba052c..c5a10a4d9 100644 --- a/browser/main.js +++ b/browser/main.js @@ -1,10 +1,10 @@ -import{a as rF,b as hc,c as Ba,d as d_,e as li,f as UF}from"./chunk-DQ5ARSNI.js";import{a as mr,b as JT,c as XT,d as yf}from"./chunk-GO3DT7AZ.js";import{$ as Dg,$a as jc,$b as Go,$c as Xe,$d as Fe,$e as rr,$f as ms,A as Sl,Aa as en,Ab as Bg,Ac as eo,Ad as ua,Ae as Ri,Af as Tt,Ag as s_,B as bd,Ba as Xi,Bb as Rg,Bc as xo,Bd as nF,Be as gF,Bf as wF,Bg as Nr,C as fl,Ca as Og,Cb as Ap,Cc as Ht,Cd as A0,Ce as _F,Cf as TF,D as ko,Da as X,Db as I0,Dc as Hn,Dd as Re,De as Zg,Df as Wt,Dg as GF,E as No,Ea as Z,Eb as de,Ec as Gn,Ed as ut,Ee as CF,Ef as MF,Eg as Ui,F as xk,Fa as Pl,Fb as jl,Fc as ho,Fd as $a,Fe as Vs,Ff as DF,Fg as c_,G as Be,Ga as Y,Gb as Rk,Gc as Bn,Gd as k0,Ge as Np,Gf as il,Gg as fc,H as Hi,Ha as Ik,Hb as Nk,Hc as Ug,Hd as ai,He as Lp,Hf as jr,Hg as jF,I as w0,Ia as R,Ib as Lk,Ic as Yk,Id as ke,Ie as vF,If as lr,J as Gr,Ja as S,Jb as Ng,Jc as Kk,Jd as jn,Je as nr,Jf as sr,Jg as p_,K as T,Ka as Ok,Kb as Lg,Kc as vi,Kd as ze,Ke as or,Kf as cr,Kg as ra,L as z,La as Ak,Lb as Vk,Lc as he,Ld as ft,Le as Vp,Lf as EF,Lg as ds,M as H,Ma as D0,Mc as Bp,Md as br,Me as qp,Mf as IF,Mg as Io,N as sa,Na as Ee,Nb as cn,Nc as dn,Nd as gt,Ne as Ar,Nf as e_,Ng as us,O as bk,Oa as we,Ob as QT,Oc as Jk,Od as fa,Oe as kr,Of as L0,Og as m_,P as Ep,Pa as Te,Pb as qk,Pc as Ir,Pd as ci,Pe as dc,Pf as V0,Pg as $F,Q as yk,Qa as xe,Qb as Lo,Qc as Xk,Qd as pi,Qe as Fr,Qf as t_,R as T0,Ra as Ip,Rb as kp,Rc as Zk,Rd as mi,Re as Br,Rf as OF,Rg as co,S as Sk,Sa as el,Sb as zk,Sc as Zt,Sd as di,Se as cs,Sf as i_,T as Ko,Ta as kk,Tb as Hk,Tc as Ot,Td as fi,Te as ta,Tf as q0,U as Mg,Ua as c,Ub as Gk,Uc as bf,Ud as wi,Ue as zp,Uf as z0,V as vf,Va as h,Vb as rc,Vc as Jo,Vd as kn,Ve as ha,Vf as AF,W as Pk,Wa as v,Wb as Eo,Wc as O0,Wd as Oi,We as Ft,Wf as kF,X as WT,Xa as le,Xb as Ns,Xc as eF,Xd as Je,Xe as xF,Xf as n_,Y as wk,Ya as Ho,Yb as Er,Yc as st,Yd as oF,Ye as N0,Yf as FF,Z as Tk,Za as Ag,Zb as vr,Zc as ne,Zd as aF,Ze as ps,Zf as BF,_ as rn,_a as Gc,_b as jk,_c as Ue,_d as F0,_e as ar,_f as Fa,a as gf,aa as Mk,ab as $c,ac as Ja,ad as Ls,ae as Qg,af as bF,ag as uc,b as _f,ba as M0,bb as Le,bc as xr,bf as yF,bg as o_,c as Cr,ca as a,cb as Uc,cc as wd,cd as it,ce as sn,cf as SF,cg as nl,d as za,da as yi,db as kg,dc as Vg,dd as Rp,de as xi,df as Hp,dg as Jn,e as mk,ea as yd,eb as ae,ec as xf,ed as et,ee as B0,ef as At,eg as Rn,f as dk,fa as Dk,fb as Nt,fc as qg,fd as on,fe as sc,ff as ri,fg as bo,g as uk,ga as Ek,gb as Mr,gc as Ie,gd as bn,ge as ii,gf as PF,gg as go,h as Cf,ha as Eg,hb as p,hc as ma,hd as Ze,he as lF,hf as ga,hg as xa,i as Rs,ia as aa,ib as m,ic as zg,id as da,ie as sF,if as _a,ig as Ai,j as Tg,ja as me,jb as Dt,jc as Ve,jd as Ga,je as Yg,jf as Ca,jg as Nn,k as An,ka as Gi,kb as Dr,kc as Ae,kd as tt,ke as cc,kf as va,kg as RF,l as fk,la as Sd,lb as zt,lc as Ha,ld as tF,le as pc,lf as Ki,m as hk,ma as Ig,mb as ti,mc as xn,md as Xo,me as mc,mf as qi,mg as H0,n as P0,na as k,nb as ls,nc as Hg,nd as dt,ne as cF,nf as _t,ng as NF,o as xd,oa as Tr,ob as Fk,oc as Gg,od as Wg,oe as pF,of as Ct,og as LF,p as gk,pa as gn,pb as E0,pc as Pi,pd as ja,pe as mF,pf as vt,pg as VF,q as Zr,qa as Pd,qb as ao,qc as ve,qd as iF,qe as R0,qg as qF,r as Hc,ra as E,rb as wl,rc as jg,rd as nt,re as ea,rf as xt,rg as a_,s as nc,sa as I,sb as tr,sc as YT,sd as lc,se as Kg,sf as bt,sg as zF,t as Bo,ta as Me,tb as oc,tc as $k,td as fe,te as dF,tg as HF,u as Dp,ua as Se,ub as ac,uc as Uk,ud as $e,ue as uF,uf as yt,ug as r_,v as Ro,va as Pe,vb as ss,vc as KT,vd as Zo,ve as Or,vf as St,vg as Rr,w as ul,wa as g,wb as Bk,wc as $g,wd as tl,we as Jg,wg as l_,x as _k,xa as l,xb as ir,xc as Wk,xd as Ke,xe as Xg,xf as Pt,xg as pr,y as Ck,ya as r,yb as Fg,yc as Qk,yd as Tl,ye as fF,yf as wt,yg as Sn,z as vk,za as b,zb as Op,zc as Fp,zd as It,ze as hF,zg as $i}from"./chunk-MPQURN5W.js";import{a as at,b as Lt,c as Fs,d as Pg,e as pt,f as $T,g as Bs,h as Zn,i as UT,j as pk,k as wg}from"./chunk-PHUH23IY.js";var Od=pt((W0,Of)=>{(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,w=2,P=1,M=2,D=4,F=8,V=16,U=32,K=64,se=128,ee=256,re=512,ce=30,_e="...",ue=800,j=16,W=1,pe=2,O=3,B=1/0,L=9007199254740991,N=17976931348623157e292,G=NaN,$=4294967295,oe=$-1,be=$>>>1,ye=[["ary",se],["bind",P],["bindKey",M],["curry",F],["curryRight",V],["flip",re],["partial",U],["partialRight",K],["rearg",ee]],Ne="[object Arguments]",te="[object Array]",Oe="[object AsyncFunction]",J="[object Boolean]",Q="[object Date]",Ce="[object DOMException]",qe="[object Error]",mt="[object Function]",Ye="[object GeneratorFunction]",rt="[object Map]",Qt="[object Number]",Gt="[object Null]",Qe="[object Object]",qt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Kt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",ki="[object WeakMap]",Ni="[object WeakSet]",un="[object ArrayBuffer]",ji="[object DataView]",Ji="[object Float32Array]",no="[object Float64Array]",Cn="[object Int8Array]",Zi="[object Int16Array]",vn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Xn="[object Uint16Array]",mn="[object Uint32Array]",Tn=/\b__p \+= '';/g,Nl=/\b(__p \+=) '' \+/g,Pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,En=/&(?:amp|lt|gt|quot|#39);/g,Ra=/[&<>"']/g,Un=RegExp(En.source),Wn=RegExp(Ra.source),ll=/<%-([\s\S]+?)%>/g,Fn=/<%([\s\S]+?)%>/g,In=/<%=([\s\S]+?)%>/g,ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sl=/[\\^$.*+?()[\]{}|]/g,Qn=RegExp(sl.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fi=/\{\n\/\* \[wrapped with (.+)\] \*/,Mo=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pn=/[()=,{}\[\]\/\s]/,jo=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,an=/\w*$/,qo=/^[-+]0x[0-9a-f]+$/i,mo=/^0b[01]+$/i,uo=/^\[object .+?Constructor\]$/,Wo=/^0o[0-7]+$/i,Oa=/^(?:0|[1-9]\d*)$/,Za=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fr=/($^)/,Qa=/['\n\r\u2028\u2029\\]/g,er="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",bi=ht+oi+Mi,Vi="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",_n="\\xac\\xb1\\xd7\\xf7",_o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Yn="\\u2000-\\u206f",Ln=" \\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",Kn="A-Z\\xc0-\\xd6\\xd8-\\xde",wa="\\ufe0e\\ufe0f",Aa=_n+_o+Yn+Ln,Oo="['\u2019]",Qo="["+er+"]",hr="["+Aa+"]",zr="["+bi+"]",cl="\\d+",Jl="["+Vi+"]",Js="["+fn+"]",ld="[^"+er+Aa+cl+Vi+fn+Kn+"]",Xs="\\ud83c[\\udffb-\\udfff]",Fo="(?:"+zr+"|"+Xs+")",zo="[^"+er+"]",sd="(?:\\ud83c[\\udde6-\\uddff]){2}",Ms="[\\ud800-\\udbff][\\udc00-\\udfff]",Ds="["+Kn+"]",Kr="\\u200d",Xl="(?:"+Js+"|"+ld+")",Zs="(?:"+Ds+"|"+ld+")",_p="(?:"+Oo+"(?:d|ll|m|re|s|t|ve))?",cd="(?:"+Oo+"(?:D|LL|M|RE|S|T|VE))?",Ac=Fo+"?",Es="["+wa+"]?",Nh="(?:"+Kr+"(?:"+[zo,sd,Ms].join("|")+")"+Es+Ac+")*",s0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pd=Es+Ac+Nh,c0="(?:"+[Jl,sd,Ms].join("|")+")"+pd,Lh="(?:"+[zo+zr+"?",zr,sd,Ms,Qo].join("|")+")",p0=RegExp(Oo,"g"),m0=RegExp(zr,"g"),Vw=RegExp(Xs+"(?="+Xs+")|"+Lh+pd,"g"),IZ=RegExp([Ds+"?"+Js+"+"+_p+"(?="+[hr,Ds,"$"].join("|")+")",Zs+"+"+cd+"(?="+[hr,Ds+Xl,"$"].join("|")+")",Ds+"?"+Xl+"+"+_p,Ds+"+"+cd,Zu,s0,cl,c0].join("|"),"g"),OZ=RegExp("["+Kr+er+bi+wa+"]"),AZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kZ=["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"],FZ=-1,Ta={};Ta[Ji]=Ta[no]=Ta[Cn]=Ta[Zi]=Ta[vn]=Ta[zi]=Ta[Li]=Ta[Xn]=Ta[mn]=!0,Ta[Ne]=Ta[te]=Ta[un]=Ta[J]=Ta[ji]=Ta[Q]=Ta[qe]=Ta[mt]=Ta[rt]=Ta[Qt]=Ta[Qe]=Ta[Ut]=Ta[Kt]=Ta[ei]=Ta[ki]=!1;var pa={};pa[Ne]=pa[te]=pa[un]=pa[ji]=pa[J]=pa[Q]=pa[Ji]=pa[no]=pa[Cn]=pa[Zi]=pa[vn]=pa[rt]=pa[Qt]=pa[Qe]=pa[Ut]=pa[Kt]=pa[ei]=pa[ni]=pa[zi]=pa[Li]=pa[Xn]=pa[mn]=!0,pa[qe]=pa[mt]=pa[ki]=!1;var BZ={\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"},RZ={"&":"&","<":"<",">":">",'"':""","'":"'"},NZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},LZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},VZ=parseFloat,qZ=parseInt,nA=typeof global=="object"&&global&&global.Object===Object&&global,zZ=typeof self=="object"&&self&&self.Object===Object&&self,Pr=nA||zZ||Function("return this")(),qw=typeof W0=="object"&&W0&&!W0.nodeType&&W0,md=qw&&typeof Of=="object"&&Of&&!Of.nodeType&&Of,oA=md&&md.exports===qw,zw=oA&&nA.process,Zl=(function(){try{var Yt=md&&md.require&&md.require("util").types;return Yt||zw&&zw.binding&&zw.binding("util")}catch{}})(),aA=Zl&&Zl.isArrayBuffer,rA=Zl&&Zl.isDate,lA=Zl&&Zl.isMap,sA=Zl&&Zl.isRegExp,cA=Zl&&Zl.isSet,pA=Zl&&Zl.isTypedArray;function Ll(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 HZ(Yt,Si,hi,hn){for(var oo=-1,$o=Yt==null?0:Yt.length;++oo<$o;){var gr=Yt[oo];Si(hn,gr,hi(gr),Yt)}return hn}function es(Yt,Si){for(var hi=-1,hn=Yt==null?0:Yt.length;++hi-1}function Hw(Yt,Si,hi){for(var hn=-1,oo=Yt==null?0:Yt.length;++hn-1;);return hi}function CA(Yt,Si){for(var hi=Yt.length;hi--&&d0(Si,Yt[hi],0)>-1;);return hi}function JZ(Yt,Si){for(var hi=Yt.length,hn=0;hi--;)Yt[hi]===Si&&++hn;return hn}var XZ=Uw(BZ),ZZ=Uw(RZ);function eee(Yt){return"\\"+LZ[Yt]}function tee(Yt,Si){return Yt==null?e:Yt[Si]}function u0(Yt){return OZ.test(Yt)}function iee(Yt){return AZ.test(Yt)}function nee(Yt){for(var Si,hi=[];!(Si=Yt.next()).done;)hi.push(Si.value);return hi}function Kw(Yt){var Si=-1,hi=Array(Yt.size);return Yt.forEach(function(hn,oo){hi[++Si]=[oo,hn]}),hi}function vA(Yt,Si){return function(hi){return Yt(Si(hi))}}function xp(Yt,Si){for(var hi=-1,hn=Yt.length,oo=0,$o=[];++hi-1}function jee(A,q){var ie=this.__data__,De=ig(ie,A);return De<0?(++this.size,ie.push([A,q])):ie[De][1]=q,this}kc.prototype.clear=qee,kc.prototype.delete=zee,kc.prototype.get=Hee,kc.prototype.has=Gee,kc.prototype.set=jee;function Fc(A){var q=-1,ie=A==null?0:A.length;for(this.clear();++q=q?A:q)),A}function ns(A,q,ie,De,Ge,ct){var kt,$t=q&_,Xt=q&C,Di=q&x;if(ie&&(kt=Ge?ie(A,De,Ge,ct):ie(A)),kt!==e)return kt;if(!Na(A))return A;var Ii=so(A);if(Ii){if(kt=Qte(A),!$t)return vl(A,kt)}else{var Bi=Xr(A),tn=Bi==mt||Bi==Ye;if(Mp(A))return t7(A,$t);if(Bi==Qe||Bi==Ne||tn&&!Ge){if(kt=Xt||tn?{}:x7(A),!$t)return Xt?Nte(A,rte(kt,A)):Rte(A,OA(kt,A))}else{if(!pa[Bi])return Ge?A:{};kt=Yte(A,Bi,$t)}}ct||(ct=new Os);var yn=ct.get(A);if(yn)return yn;ct.set(A,kt),Y7(A)?A.forEach(function(zn){kt.add(ns(zn,q,ie,zn,A,ct))}):W7(A)&&A.forEach(function(zn,wo){kt.set(wo,ns(zn,q,ie,wo,A,ct))});var qn=Di?Xt?yT:bT:Xt?bl:wr,fo=Ii?e:qn(A);return es(fo||A,function(zn,wo){fo&&(wo=zn,zn=A[wo]),lf(kt,wo,ns(zn,q,ie,wo,A,ct))}),kt}function lte(A){var q=wr(A);return function(ie){return AA(ie,A,q)}}function AA(A,q,ie){var De=ie.length;if(A==null)return!De;for(A=la(A);De--;){var Ge=ie[De],ct=q[Ge],kt=A[Ge];if(kt===e&&!(Ge in A)||!ct(kt))return!1}return!0}function kA(A,q,ie){if(typeof A!="function")throw new ts(i);return ff(function(){A.apply(e,ie)},q)}function sf(A,q,ie,De){var Ge=-1,ct=Vh,kt=!0,$t=A.length,Xt=[],Di=q.length;if(!$t)return Xt;ie&&(q=ka(q,Vl(ie))),De?(ct=Hw,kt=!1):q.length>=t&&(ct=ef,kt=!1,q=new fd(q));e:for(;++Ge<$t;){var Ii=A[Ge],Bi=ie==null?Ii:ie(Ii);if(Ii=De||Ii!==0?Ii:0,kt&&Bi===Bi){for(var tn=Di;tn--;)if(q[tn]===Bi)continue e;Xt.push(Ii)}else ct(q,Bi,De)||Xt.push(Ii)}return Xt}var Sp=r7(ec),FA=r7(oT,!0);function ste(A,q){var ie=!0;return Sp(A,function(De,Ge,ct){return ie=!!q(De,Ge,ct),ie}),ie}function ng(A,q,ie){for(var De=-1,Ge=A.length;++DeGe?0:Ge+ie),De=De===e||De>Ge?Ge:po(De),De<0&&(De+=Ge),De=ie>De?0:J7(De);ie0&&ie($t)?q>1?Hr($t,q-1,ie,De,Ge):vp(Ge,$t):De||(Ge[Ge.length]=$t)}return Ge}var nT=l7(),RA=l7(!0);function ec(A,q){return A&&nT(A,q,wr)}function oT(A,q){return A&&RA(A,q,wr)}function og(A,q){return Cp(q,function(ie){return Vc(A[ie])})}function gd(A,q){q=wp(q,A);for(var ie=0,De=q.length;A!=null&&ieq}function pte(A,q){return A!=null&&oa.call(A,q)}function mte(A,q){return A!=null&&q in la(A)}function dte(A,q,ie){return A>=Jr(q,ie)&&A<_r(q,ie)}function rT(A,q,ie){for(var De=ie?Hw:Vh,Ge=A[0].length,ct=A.length,kt=ct,$t=hi(ct),Xt=1/0,Di=[];kt--;){var Ii=A[kt];kt&&q&&(Ii=ka(Ii,Vl(q))),Xt=Jr(Ii.length,Xt),$t[kt]=!ie&&(q||Ge>=120&&Ii.length>=120)?new fd(kt&&Ii):e}Ii=A[0];var Bi=-1,tn=$t[0];e:for(;++Bi-1;)$t!==A&&Yh.call($t,Xt,1),Yh.call(A,Xt,1);return A}function WA(A,q){for(var ie=A?q.length:0,De=ie-1;ie--;){var Ge=q[ie];if(ie==De||Ge!==ct){var ct=Ge;Lc(Ge)?Yh.call(A,Ge,1):fT(A,Ge)}}return A}function mT(A,q){return A+Xh(MA()*(q-A+1))}function wte(A,q,ie,De){for(var Ge=-1,ct=_r(Jh((q-A)/(ie||1)),0),kt=hi(ct);ct--;)kt[De?ct:++Ge]=A,A+=ie;return kt}function dT(A,q){var ie="";if(!A||q<1||q>L)return ie;do q%2&&(ie+=A),q=Xh(q/2),q&&(A+=A);while(q);return ie}function Co(A,q){return ET(S7(A,q,yl),A+"")}function Tte(A){return IA(S0(A))}function Mte(A,q){var ie=S0(A);return hg(ie,hd(q,0,ie.length))}function mf(A,q,ie,De){if(!Na(A))return A;q=wp(q,A);for(var Ge=-1,ct=q.length,kt=ct-1,$t=A;$t!=null&&++GeGe?0:Ge+q),ie=ie>Ge?Ge:ie,ie<0&&(ie+=Ge),Ge=q>ie?0:ie-q>>>0,q>>>=0;for(var ct=hi(Ge);++De>>1,kt=A[ct];kt!==null&&!zl(kt)&&(ie?kt<=q:kt=t){var Di=q?null:zte(A);if(Di)return zh(Di);kt=!1,Ge=ef,Xt=new fd}else Xt=q?[]:$t;e:for(;++De=De?A:os(A,q,ie)}var e7=Cee||function(A){return Pr.clearTimeout(A)};function t7(A,q){if(q)return A.slice();var ie=A.length,De=yA?yA(ie):new A.constructor(ie);return A.copy(De),De}function CT(A){var q=new A.constructor(A.byteLength);return new Wh(q).set(new Wh(A)),q}function Ate(A,q){var ie=q?CT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.byteLength)}function kte(A){var q=new A.constructor(A.source,an.exec(A));return q.lastIndex=A.lastIndex,q}function Fte(A){return rf?la(rf.call(A)):{}}function i7(A,q){var ie=q?CT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.length)}function n7(A,q){if(A!==q){var ie=A!==e,De=A===null,Ge=A===A,ct=zl(A),kt=q!==e,$t=q===null,Xt=q===q,Di=zl(q);if(!$t&&!Di&&!ct&&A>q||ct&&kt&&Xt&&!$t&&!Di||De&&kt&&Xt||!ie&&Xt||!Ge)return 1;if(!De&&!ct&&!Di&&A=$t)return Xt;var Di=ie[De];return Xt*(Di=="desc"?-1:1)}}return A.index-q.index}function o7(A,q,ie,De){for(var Ge=-1,ct=A.length,kt=ie.length,$t=-1,Xt=q.length,Di=_r(ct-kt,0),Ii=hi(Xt+Di),Bi=!De;++$t1?ie[Ge-1]:e,kt=Ge>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(Ge--,ct):e,kt&&ml(ie[0],ie[1],kt)&&(ct=Ge<3?e:ct,Ge=1),q=la(q);++De-1?Ge[ct?q[kt]:kt]:e}}function p7(A){return Nc(function(q){var ie=q.length,De=ie,Ge=is.prototype.thru;for(A&&q.reverse();De--;){var ct=q[De];if(typeof ct!="function")throw new ts(i);if(Ge&&!kt&&ug(ct)=="wrapper")var kt=new is([],!0)}for(De=kt?De:ie;++De1&&Ao.reverse(),Ii&&Xt$t))return!1;var Di=ct.get(A),Ii=ct.get(q);if(Di&&Ii)return Di==q&&Ii==A;var Bi=-1,tn=!0,yn=ie&w?new fd:e;for(ct.set(A,q),ct.set(q,A);++Bi<$t;){var qn=A[Bi],fo=q[Bi];if(De)var zn=kt?De(fo,qn,Bi,q,A,ct):De(qn,fo,Bi,A,q,ct);if(zn!==e){if(zn)continue;tn=!1;break}if(yn){if(!jw(q,function(wo,Ao){if(!ef(yn,Ao)&&(qn===wo||Ge(qn,wo,ie,De,ct)))return yn.push(Ao)})){tn=!1;break}}else if(!(qn===fo||Ge(qn,fo,ie,De,ct))){tn=!1;break}}return ct.delete(A),ct.delete(q),tn}function Gte(A,q,ie,De,Ge,ct,kt){switch(ie){case ji:if(A.byteLength!=q.byteLength||A.byteOffset!=q.byteOffset)return!1;A=A.buffer,q=q.buffer;case un:return!(A.byteLength!=q.byteLength||!ct(new Wh(A),new Wh(q)));case J:case Q:case Qt:return As(+A,+q);case qe:return A.name==q.name&&A.message==q.message;case Ut:case ei:return A==q+"";case rt:var $t=Kw;case Kt:var Xt=De&y;if($t||($t=zh),A.size!=q.size&&!Xt)return!1;var Di=kt.get(A);if(Di)return Di==q;De|=w,kt.set(A,q);var Ii=_7($t(A),$t(q),De,Ge,ct,kt);return kt.delete(A),Ii;case ni:if(rf)return rf.call(A)==rf.call(q)}return!1}function jte(A,q,ie,De,Ge,ct){var kt=ie&y,$t=bT(A),Xt=$t.length,Di=bT(q),Ii=Di.length;if(Xt!=Ii&&!kt)return!1;for(var Bi=Xt;Bi--;){var tn=$t[Bi];if(!(kt?tn in q:oa.call(q,tn)))return!1}var yn=ct.get(A),qn=ct.get(q);if(yn&&qn)return yn==q&&qn==A;var fo=!0;ct.set(A,q),ct.set(q,A);for(var zn=kt;++Bi1?"& ":"")+q[De],q=q.join(ie>2?", ":" "),A.replace(_i,`{ +import{a as rF,b as hc,c as Ba,d as u_,e as li,f as UF}from"./chunk-L23REQE4.js";import{a as dr,b as XT,c as ZT,d as Sf}from"./chunk-N4NIFIJT.js";import{$ as Eg,$a as jc,$b as Go,$c as Xe,$d as Be,$e as lr,$f as ms,A as Sl,Aa as en,Ab as Rg,Ac as eo,Ad as ua,Ae as Ri,Af as Tt,Ag as c_,B as bd,Ba as Xi,Bb as Ng,Bc as xo,Bd as nF,Be as gF,Bf as wF,Bg as Lr,C as vr,Ca as Ag,Cb as Ap,Cc as Ht,Cd as A0,Ce as _F,Cf as TF,D as ko,Da as X,Db as I0,Dc as Hn,Dd as Re,De as e_,Df as Wt,Dg as GF,E as No,Ea as Z,Eb as de,Ec as Gn,Ed as ut,Ee as CF,Ef as MF,Eg as Ui,F as xk,Fa as Pl,Fb as jl,Fc as ho,Fd as $a,Fe as Vs,Ff as DF,Fg as p_,G as Fe,Ga as Y,Gb as Rk,Gc as Bn,Gd as k0,Ge as Np,Gf as nl,Gg as fc,H as Hi,Ha as Ik,Hb as Nk,Hc as Wg,Hd as ai,He as Lp,Hf as $r,Hg as jF,I as w0,Ia as R,Ib as Lk,Ic as Yk,Id as ke,Ie as vF,If as sr,J as jr,Ja as S,Jb as Lg,Jc as Kk,Jd as jn,Je as or,Jf as cr,Jg as m_,K as T,Ka as Ok,Kb as Vg,Kc as vi,Kd as ze,Ke as ar,Kf as pr,Kg as ra,L as z,La as Ak,Lb as Vk,Lc as he,Ld as ft,Le as Vp,Lf as EF,Lg as ds,M as H,Ma as D0,Mc as Bp,Md as yr,Me as qp,Mf as IF,Mg as Io,N as sa,Na as Ee,Nb as cn,Nc as dn,Nd as gt,Ne as kr,Nf as t_,Ng as us,O as bk,Oa as we,Ob as YT,Oc as Jk,Od as fa,Oe as Fr,Of as L0,Og as d_,P as Ep,Pa as Te,Pb as qk,Pc as Or,Pd as ci,Pe as dc,Pf as V0,Pg as $F,Q as yk,Qa as xe,Qb as Lo,Qc as Xk,Qd as pi,Qe as Br,Qf as i_,R as T0,Ra as Ip,Rb as kp,Rc as Zk,Rd as mi,Re as Rr,Rf as OF,Rg as co,S as Sk,Sa as tl,Sb as zk,Sc as Zt,Sd as di,Se as cs,Sf as n_,T as Ko,Ta as kk,Tb as Hk,Tc as Ot,Td as fi,Te as ta,Tf as q0,U as Dg,Ua as c,Ub as Gk,Uc as yf,Ud as wi,Ue as zp,Uf as z0,V as xf,Va as h,Vb as rc,Vc as Jo,Vd as kn,Ve as ha,Vf as AF,W as Pk,Wa as v,Wb as Eo,Wc as O0,Wd as Oi,We as Ft,Wf as kF,X as QT,Xa as le,Xb as Ns,Xc as eF,Xd as Je,Xe as xF,Xf as o_,Y as wk,Ya as Ho,Yb as Ir,Yc as st,Yd as oF,Ye as N0,Yf as FF,Z as Tk,Za as kg,Zb as xr,Zc as ne,Zd as aF,Ze as ps,Zf as BF,_ as rn,_a as Gc,_b as jk,_c as Ue,_d as F0,_e as rr,_f as Fa,a as gf,aa as Mk,ab as $c,ac as Xa,ad as Ls,ae as Yg,af as bF,ag as uc,b as _f,ba as M0,bb as Le,bc as br,bf as yF,bg as a_,c as Ja,ca as a,cb as Uc,cc as wd,cd as it,ce as sn,cf as SF,cg as ol,d as za,da as yi,db as Fg,dc as qg,dd as Rp,de as xi,df as Hp,dg as Jn,e as Cf,ea as yd,eb as ae,ec as bf,ed as et,ee as B0,ef as At,eg as Rn,f as dk,fa as Dk,fb as Nt,fc as zg,fd as on,fe as sc,ff as ri,fg as bo,g as uk,ga as Ek,gb as Dr,gc as Ie,gd as bn,ge as ii,gf as PF,gg as go,h as vf,ha as Ig,hb as p,hc as ma,hd as Ze,he as lF,hf as ga,hg as xa,i as Rs,ia as aa,ib as m,ic as Hg,id as da,ie as sF,if as _a,ig as Ai,j as Mg,ja as me,jb as Dt,jc as Ve,jd as Ga,je as Kg,jf as Ca,jg as Nn,k as An,ka as Gi,kb as Er,kc as Ae,kd as tt,ke as cc,kf as va,kg as RF,l as fk,la as Sd,lb as zt,lc as Ha,ld as tF,le as pc,lf as Ki,m as hk,ma as Og,mb as ti,mc as xn,md as Xo,me as mc,mf as qi,mg as H0,n as P0,na as k,nb as ls,nc as Gg,nd as dt,ne as cF,nf as _t,ng as NF,o as xd,oa as Mr,ob as Fk,oc as jg,od as Qg,oe as pF,of as Ct,og as LF,p as gk,pa as gn,pb as E0,pc as Pi,pd as ja,pe as mF,pf as vt,pg as VF,q as el,qa as Pd,qb as ao,qc as ve,qd as iF,qe as R0,qg as qF,r as Hc,ra as E,rb as wl,rc as $g,rd as nt,re as ea,rf as xt,rg as r_,s as nc,sa as I,sb as ir,sc as KT,sd as lc,se as Jg,sf as bt,sg as zF,t as Bo,ta as Me,tb as oc,tc as $k,td as fe,te as dF,tg as HF,u as Dp,ua as Se,ub as ac,uc as Uk,ud as $e,ue as uF,uf as yt,ug as l_,v as Ro,va as Pe,vb as ss,vc as JT,vd as Zo,ve as Ar,vf as St,vg as Nr,w as fl,wa as g,wb as Bk,wc as Ug,wd as il,we as Xg,wg as s_,x as _k,xa as l,xb as nr,xc as Wk,xd as Ke,xe as Zg,xf as Pt,xg as mr,y as Ck,ya as r,yb as Bg,yc as Qk,yd as Tl,ye as fF,yf as wt,yg as Sn,z as vk,za as b,zb as Op,zc as Fp,zd as It,ze as hF,zg as $i}from"./chunk-YFBSP33D.js";import{a as at,b as Lt,c as Fs,d as wg,e as pt,f as UT,g as Bs,h as Zn,i as WT,j as mk,k as Tg}from"./chunk-PHUH23IY.js";var Od=pt((W0,Af)=>{(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,w=2,P=1,M=2,D=4,F=8,V=16,U=32,K=64,se=128,ee=256,re=512,ce=30,_e="...",ue=800,j=16,W=1,pe=2,O=3,B=1/0,L=9007199254740991,N=17976931348623157e292,G=NaN,$=4294967295,oe=$-1,be=$>>>1,ye=[["ary",se],["bind",P],["bindKey",M],["curry",F],["curryRight",V],["flip",re],["partial",U],["partialRight",K],["rearg",ee]],Ne="[object Arguments]",te="[object Array]",Oe="[object AsyncFunction]",J="[object Boolean]",Q="[object Date]",Ce="[object DOMException]",qe="[object Error]",mt="[object Function]",Ye="[object GeneratorFunction]",rt="[object Map]",Qt="[object Number]",Gt="[object Null]",Qe="[object Object]",qt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Kt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",ki="[object WeakMap]",Ni="[object WeakSet]",un="[object ArrayBuffer]",ji="[object DataView]",Ji="[object Float32Array]",no="[object Float64Array]",Cn="[object Int8Array]",Zi="[object Int16Array]",vn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Xn="[object Uint16Array]",mn="[object Uint32Array]",Tn=/\b__p \+= '';/g,Nl=/\b(__p \+=) '' \+/g,Pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,En=/&(?:amp|lt|gt|quot|#39);/g,Ra=/[&<>"']/g,Un=RegExp(En.source),Wn=RegExp(Ra.source),sl=/<%-([\s\S]+?)%>/g,Fn=/<%([\s\S]+?)%>/g,In=/<%=([\s\S]+?)%>/g,fr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cl=/[\\^$.*+?()[\]{}|]/g,Qn=RegExp(cl.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fi=/\{\n\/\* \[wrapped with (.+)\] \*/,Mo=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pn=/[()=,{}\[\]\/\s]/,jo=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,an=/\w*$/,qo=/^[-+]0x[0-9a-f]+$/i,mo=/^0b[01]+$/i,uo=/^\[object .+?Constructor\]$/,Wo=/^0o[0-7]+$/i,Oa=/^(?:0|[1-9]\d*)$/,er=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hr=/($^)/,Qa=/['\n\r\u2028\u2029\\]/g,tr="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",bi=ht+oi+Mi,Vi="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",_n="\\xac\\xb1\\xd7\\xf7",_o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Yn="\\u2000-\\u206f",Ln=" \\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",Kn="A-Z\\xc0-\\xd6\\xd8-\\xde",wa="\\ufe0e\\ufe0f",Aa=_n+_o+Yn+Ln,Oo="['\u2019]",Qo="["+tr+"]",gr="["+Aa+"]",Hr="["+bi+"]",pl="\\d+",Jl="["+Vi+"]",Js="["+fn+"]",ld="[^"+tr+Aa+pl+Vi+fn+Kn+"]",Xs="\\ud83c[\\udffb-\\udfff]",Fo="(?:"+Hr+"|"+Xs+")",zo="[^"+tr+"]",sd="(?:\\ud83c[\\udde6-\\uddff]){2}",Ms="[\\ud800-\\udbff][\\udc00-\\udfff]",Ds="["+Kn+"]",Jr="\\u200d",Xl="(?:"+Js+"|"+ld+")",Zs="(?:"+Ds+"|"+ld+")",_p="(?:"+Oo+"(?:d|ll|m|re|s|t|ve))?",cd="(?:"+Oo+"(?:D|LL|M|RE|S|T|VE))?",Ac=Fo+"?",Es="["+wa+"]?",Lh="(?:"+Jr+"(?:"+[zo,sd,Ms].join("|")+")"+Es+Ac+")*",s0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pd=Es+Ac+Lh,c0="(?:"+[Jl,sd,Ms].join("|")+")"+pd,Vh="(?:"+[zo+Hr+"?",Hr,sd,Ms,Qo].join("|")+")",p0=RegExp(Oo,"g"),m0=RegExp(Hr,"g"),qw=RegExp(Xs+"(?="+Xs+")|"+Vh+pd,"g"),OZ=RegExp([Ds+"?"+Js+"+"+_p+"(?="+[gr,Ds,"$"].join("|")+")",Zs+"+"+cd+"(?="+[gr,Ds+Xl,"$"].join("|")+")",Ds+"?"+Xl+"+"+_p,Ds+"+"+cd,Zu,s0,pl,c0].join("|"),"g"),AZ=RegExp("["+Jr+tr+bi+wa+"]"),kZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,FZ=["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"],BZ=-1,Ta={};Ta[Ji]=Ta[no]=Ta[Cn]=Ta[Zi]=Ta[vn]=Ta[zi]=Ta[Li]=Ta[Xn]=Ta[mn]=!0,Ta[Ne]=Ta[te]=Ta[un]=Ta[J]=Ta[ji]=Ta[Q]=Ta[qe]=Ta[mt]=Ta[rt]=Ta[Qt]=Ta[Qe]=Ta[Ut]=Ta[Kt]=Ta[ei]=Ta[ki]=!1;var pa={};pa[Ne]=pa[te]=pa[un]=pa[ji]=pa[J]=pa[Q]=pa[Ji]=pa[no]=pa[Cn]=pa[Zi]=pa[vn]=pa[rt]=pa[Qt]=pa[Qe]=pa[Ut]=pa[Kt]=pa[ei]=pa[ni]=pa[zi]=pa[Li]=pa[Xn]=pa[mn]=!0,pa[qe]=pa[mt]=pa[ki]=!1;var RZ={\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"},NZ={"&":"&","<":"<",">":">",'"':""","'":"'"},LZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},VZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qZ=parseFloat,zZ=parseInt,oA=typeof global=="object"&&global&&global.Object===Object&&global,HZ=typeof self=="object"&&self&&self.Object===Object&&self,wr=oA||HZ||Function("return this")(),zw=typeof W0=="object"&&W0&&!W0.nodeType&&W0,md=zw&&typeof Af=="object"&&Af&&!Af.nodeType&&Af,aA=md&&md.exports===zw,Hw=aA&&oA.process,Zl=(function(){try{var Yt=md&&md.require&&md.require("util").types;return Yt||Hw&&Hw.binding&&Hw.binding("util")}catch{}})(),rA=Zl&&Zl.isArrayBuffer,lA=Zl&&Zl.isDate,sA=Zl&&Zl.isMap,cA=Zl&&Zl.isRegExp,pA=Zl&&Zl.isSet,mA=Zl&&Zl.isTypedArray;function Ll(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 GZ(Yt,Si,hi,hn){for(var oo=-1,$o=Yt==null?0:Yt.length;++oo<$o;){var _r=Yt[oo];Si(hn,_r,hi(_r),Yt)}return hn}function es(Yt,Si){for(var hi=-1,hn=Yt==null?0:Yt.length;++hi-1}function Gw(Yt,Si,hi){for(var hn=-1,oo=Yt==null?0:Yt.length;++hn-1;);return hi}function vA(Yt,Si){for(var hi=Yt.length;hi--&&d0(Si,Yt[hi],0)>-1;);return hi}function XZ(Yt,Si){for(var hi=Yt.length,hn=0;hi--;)Yt[hi]===Si&&++hn;return hn}var ZZ=Ww(RZ),eee=Ww(NZ);function tee(Yt){return"\\"+VZ[Yt]}function iee(Yt,Si){return Yt==null?e:Yt[Si]}function u0(Yt){return AZ.test(Yt)}function nee(Yt){return kZ.test(Yt)}function oee(Yt){for(var Si,hi=[];!(Si=Yt.next()).done;)hi.push(Si.value);return hi}function Jw(Yt){var Si=-1,hi=Array(Yt.size);return Yt.forEach(function(hn,oo){hi[++Si]=[oo,hn]}),hi}function xA(Yt,Si){return function(hi){return Yt(Si(hi))}}function xp(Yt,Si){for(var hi=-1,hn=Yt.length,oo=0,$o=[];++hi-1}function $ee(A,q){var ie=this.__data__,De=ng(ie,A);return De<0?(++this.size,ie.push([A,q])):ie[De][1]=q,this}kc.prototype.clear=zee,kc.prototype.delete=Hee,kc.prototype.get=Gee,kc.prototype.has=jee,kc.prototype.set=$ee;function Fc(A){var q=-1,ie=A==null?0:A.length;for(this.clear();++q=q?A:q)),A}function ns(A,q,ie,De,Ge,ct){var kt,$t=q&_,Xt=q&C,Di=q&x;if(ie&&(kt=Ge?ie(A,De,Ge,ct):ie(A)),kt!==e)return kt;if(!Na(A))return A;var Ii=so(A);if(Ii){if(kt=Yte(A),!$t)return vl(A,kt)}else{var Bi=Zr(A),tn=Bi==mt||Bi==Ye;if(Mp(A))return i7(A,$t);if(Bi==Qe||Bi==Ne||tn&&!Ge){if(kt=Xt||tn?{}:b7(A),!$t)return Xt?Lte(A,lte(kt,A)):Nte(A,AA(kt,A))}else{if(!pa[Bi])return Ge?A:{};kt=Kte(A,Bi,$t)}}ct||(ct=new Os);var yn=ct.get(A);if(yn)return yn;ct.set(A,kt),K7(A)?A.forEach(function(zn){kt.add(ns(zn,q,ie,zn,A,ct))}):Q7(A)&&A.forEach(function(zn,wo){kt.set(wo,ns(zn,q,ie,wo,A,ct))});var qn=Di?Xt?ST:yT:Xt?bl:Tr,fo=Ii?e:qn(A);return es(fo||A,function(zn,wo){fo&&(wo=zn,zn=A[wo]),lf(kt,wo,ns(zn,q,ie,wo,A,ct))}),kt}function ste(A){var q=Tr(A);return function(ie){return kA(ie,A,q)}}function kA(A,q,ie){var De=ie.length;if(A==null)return!De;for(A=la(A);De--;){var Ge=ie[De],ct=q[Ge],kt=A[Ge];if(kt===e&&!(Ge in A)||!ct(kt))return!1}return!0}function FA(A,q,ie){if(typeof A!="function")throw new ts(i);return ff(function(){A.apply(e,ie)},q)}function sf(A,q,ie,De){var Ge=-1,ct=qh,kt=!0,$t=A.length,Xt=[],Di=q.length;if(!$t)return Xt;ie&&(q=ka(q,Vl(ie))),De?(ct=Gw,kt=!1):q.length>=t&&(ct=ef,kt=!1,q=new fd(q));e:for(;++Ge<$t;){var Ii=A[Ge],Bi=ie==null?Ii:ie(Ii);if(Ii=De||Ii!==0?Ii:0,kt&&Bi===Bi){for(var tn=Di;tn--;)if(q[tn]===Bi)continue e;Xt.push(Ii)}else ct(q,Bi,De)||Xt.push(Ii)}return Xt}var Sp=l7(ec),BA=l7(aT,!0);function cte(A,q){var ie=!0;return Sp(A,function(De,Ge,ct){return ie=!!q(De,Ge,ct),ie}),ie}function og(A,q,ie){for(var De=-1,Ge=A.length;++DeGe?0:Ge+ie),De=De===e||De>Ge?Ge:po(De),De<0&&(De+=Ge),De=ie>De?0:X7(De);ie0&&ie($t)?q>1?Gr($t,q-1,ie,De,Ge):vp(Ge,$t):De||(Ge[Ge.length]=$t)}return Ge}var oT=s7(),NA=s7(!0);function ec(A,q){return A&&oT(A,q,Tr)}function aT(A,q){return A&&NA(A,q,Tr)}function ag(A,q){return Cp(q,function(ie){return Vc(A[ie])})}function gd(A,q){q=wp(q,A);for(var ie=0,De=q.length;A!=null&&ieq}function mte(A,q){return A!=null&&oa.call(A,q)}function dte(A,q){return A!=null&&q in la(A)}function ute(A,q,ie){return A>=Xr(q,ie)&&A=120&&Ii.length>=120)?new fd(kt&&Ii):e}Ii=A[0];var Bi=-1,tn=$t[0];e:for(;++Bi-1;)$t!==A&&Kh.call($t,Xt,1),Kh.call(A,Xt,1);return A}function QA(A,q){for(var ie=A?q.length:0,De=ie-1;ie--;){var Ge=q[ie];if(ie==De||Ge!==ct){var ct=Ge;Lc(Ge)?Kh.call(A,Ge,1):hT(A,Ge)}}return A}function dT(A,q){return A+Zh(DA()*(q-A+1))}function Tte(A,q,ie,De){for(var Ge=-1,ct=Cr(Xh((q-A)/(ie||1)),0),kt=hi(ct);ct--;)kt[De?ct:++Ge]=A,A+=ie;return kt}function uT(A,q){var ie="";if(!A||q<1||q>L)return ie;do q%2&&(ie+=A),q=Zh(q/2),q&&(A+=A);while(q);return ie}function Co(A,q){return IT(P7(A,q,yl),A+"")}function Mte(A){return OA(S0(A))}function Dte(A,q){var ie=S0(A);return gg(ie,hd(q,0,ie.length))}function mf(A,q,ie,De){if(!Na(A))return A;q=wp(q,A);for(var Ge=-1,ct=q.length,kt=ct-1,$t=A;$t!=null&&++GeGe?0:Ge+q),ie=ie>Ge?Ge:ie,ie<0&&(ie+=Ge),Ge=q>ie?0:ie-q>>>0,q>>>=0;for(var ct=hi(Ge);++De>>1,kt=A[ct];kt!==null&&!zl(kt)&&(ie?kt<=q:kt=t){var Di=q?null:Hte(A);if(Di)return Hh(Di);kt=!1,Ge=ef,Xt=new fd}else Xt=q?[]:$t;e:for(;++De=De?A:os(A,q,ie)}var t7=vee||function(A){return wr.clearTimeout(A)};function i7(A,q){if(q)return A.slice();var ie=A.length,De=SA?SA(ie):new A.constructor(ie);return A.copy(De),De}function vT(A){var q=new A.constructor(A.byteLength);return new Qh(q).set(new Qh(A)),q}function kte(A,q){var ie=q?vT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.byteLength)}function Fte(A){var q=new A.constructor(A.source,an.exec(A));return q.lastIndex=A.lastIndex,q}function Bte(A){return rf?la(rf.call(A)):{}}function n7(A,q){var ie=q?vT(A.buffer):A.buffer;return new A.constructor(ie,A.byteOffset,A.length)}function o7(A,q){if(A!==q){var ie=A!==e,De=A===null,Ge=A===A,ct=zl(A),kt=q!==e,$t=q===null,Xt=q===q,Di=zl(q);if(!$t&&!Di&&!ct&&A>q||ct&&kt&&Xt&&!$t&&!Di||De&&kt&&Xt||!ie&&Xt||!Ge)return 1;if(!De&&!ct&&!Di&&A=$t)return Xt;var Di=ie[De];return Xt*(Di=="desc"?-1:1)}}return A.index-q.index}function a7(A,q,ie,De){for(var Ge=-1,ct=A.length,kt=ie.length,$t=-1,Xt=q.length,Di=Cr(ct-kt,0),Ii=hi(Xt+Di),Bi=!De;++$t1?ie[Ge-1]:e,kt=Ge>2?ie[2]:e;for(ct=A.length>3&&typeof ct=="function"?(Ge--,ct):e,kt&&dl(ie[0],ie[1],kt)&&(ct=Ge<3?e:ct,Ge=1),q=la(q);++De-1?Ge[ct?q[kt]:kt]:e}}function m7(A){return Nc(function(q){var ie=q.length,De=ie,Ge=is.prototype.thru;for(A&&q.reverse();De--;){var ct=q[De];if(typeof ct!="function")throw new ts(i);if(Ge&&!kt&&fg(ct)=="wrapper")var kt=new is([],!0)}for(De=kt?De:ie;++De1&&Ao.reverse(),Ii&&Xt$t))return!1;var Di=ct.get(A),Ii=ct.get(q);if(Di&&Ii)return Di==q&&Ii==A;var Bi=-1,tn=!0,yn=ie&w?new fd:e;for(ct.set(A,q),ct.set(q,A);++Bi<$t;){var qn=A[Bi],fo=q[Bi];if(De)var zn=kt?De(fo,qn,Bi,q,A,ct):De(qn,fo,Bi,A,q,ct);if(zn!==e){if(zn)continue;tn=!1;break}if(yn){if(!$w(q,function(wo,Ao){if(!ef(yn,Ao)&&(qn===wo||Ge(qn,wo,ie,De,ct)))return yn.push(Ao)})){tn=!1;break}}else if(!(qn===fo||Ge(qn,fo,ie,De,ct))){tn=!1;break}}return ct.delete(A),ct.delete(q),tn}function jte(A,q,ie,De,Ge,ct,kt){switch(ie){case ji:if(A.byteLength!=q.byteLength||A.byteOffset!=q.byteOffset)return!1;A=A.buffer,q=q.buffer;case un:return!(A.byteLength!=q.byteLength||!ct(new Qh(A),new Qh(q)));case J:case Q:case Qt:return As(+A,+q);case qe:return A.name==q.name&&A.message==q.message;case Ut:case ei:return A==q+"";case rt:var $t=Jw;case Kt:var Xt=De&y;if($t||($t=Hh),A.size!=q.size&&!Xt)return!1;var Di=kt.get(A);if(Di)return Di==q;De|=w,kt.set(A,q);var Ii=C7($t(A),$t(q),De,Ge,ct,kt);return kt.delete(A),Ii;case ni:if(rf)return rf.call(A)==rf.call(q)}return!1}function $te(A,q,ie,De,Ge,ct){var kt=ie&y,$t=yT(A),Xt=$t.length,Di=yT(q),Ii=Di.length;if(Xt!=Ii&&!kt)return!1;for(var Bi=Xt;Bi--;){var tn=$t[Bi];if(!(kt?tn in q:oa.call(q,tn)))return!1}var yn=ct.get(A),qn=ct.get(q);if(yn&&qn)return yn==q&&qn==A;var fo=!0;ct.set(A,q),ct.set(q,A);for(var zn=kt;++Bi1?"& ":"")+q[De],q=q.join(ie>2?", ":" "),A.replace(_i,`{ /* [wrapped with `+q+`] */ -`)}function Jte(A){return so(A)||vd(A)||!!(wA&&A&&A[wA])}function Lc(A,q){var ie=typeof A;return q=q??L,!!q&&(ie=="number"||ie!="symbol"&&Oa.test(A))&&A>-1&&A%1==0&&A0){if(++q>=ue)return arguments[0]}else q=0;return A.apply(e,arguments)}}function hg(A,q){var ie=-1,De=A.length,Ge=De-1;for(q=q===e?De:q;++ie1?A[q-1]:e;return ie=typeof ie=="function"?(A.pop(),ie):e,B7(A,ie)});function R7(A){var q=ot(A);return q.__chain__=!0,q}function sne(A,q){return q(A),A}function gg(A,q){return q(A)}var cne=Nc(function(A){var q=A.length,ie=q?A[0]:0,De=this.__wrapped__,Ge=function(ct){return iT(ct,A)};return q>1||this.__actions__.length||!(De instanceof Do)||!Lc(ie)?this.thru(Ge):(De=De.slice(ie,+ie+(q?1:0)),De.__actions__.push({func:gg,args:[Ge],thisArg:e}),new is(De,this.__chain__).thru(function(ct){return q&&!ct.length&&ct.push(e),ct}))});function pne(){return R7(this)}function mne(){return new is(this.value(),this.__chain__)}function dne(){this.__values__===e&&(this.__values__=K7(this.value()));var A=this.__index__>=this.__values__.length,q=A?e:this.__values__[this.__index__++];return{done:A,value:q}}function une(){return this}function fne(A){for(var q,ie=this;ie instanceof tg;){var De=E7(ie);De.__index__=0,De.__values__=e,q?Ge.__wrapped__=De:q=De;var Ge=De;ie=ie.__wrapped__}return Ge.__wrapped__=A,q}function hne(){var A=this.__wrapped__;if(A instanceof Do){var q=A;return this.__actions__.length&&(q=new Do(this)),q=q.reverse(),q.__actions__.push({func:gg,args:[IT],thisArg:e}),new is(q,this.__chain__)}return this.thru(IT)}function gne(){return XA(this.__wrapped__,this.__actions__)}var _ne=sg(function(A,q,ie){oa.call(A,ie)?++A[ie]:Bc(A,ie,1)});function Cne(A,q,ie){var De=so(A)?mA:ste;return ie&&ml(A,q,ie)&&(q=e),De(A,Vn(q,3))}function vne(A,q){var ie=so(A)?Cp:BA;return ie(A,Vn(q,3))}var xne=c7(I7),bne=c7(O7);function yne(A,q){return Hr(_g(A,q),1)}function Sne(A,q){return Hr(_g(A,q),B)}function Pne(A,q,ie){return ie=ie===e?1:po(ie),Hr(_g(A,q),ie)}function N7(A,q){var ie=so(A)?es:Sp;return ie(A,Vn(q,3))}function L7(A,q){var ie=so(A)?GZ:FA;return ie(A,Vn(q,3))}var wne=sg(function(A,q,ie){oa.call(A,ie)?A[ie].push(q):Bc(A,ie,[q])});function Tne(A,q,ie,De){A=xl(A)?A:S0(A),ie=ie&&!De?po(ie):0;var Ge=A.length;return ie<0&&(ie=_r(Ge+ie,0)),yg(A)?ie<=Ge&&A.indexOf(q,ie)>-1:!!Ge&&d0(A,q,ie)>-1}var Mne=Co(function(A,q,ie){var De=-1,Ge=typeof q=="function",ct=xl(A)?hi(A.length):[];return Sp(A,function(kt){ct[++De]=Ge?Ll(q,kt,ie):cf(kt,q,ie)}),ct}),Dne=sg(function(A,q,ie){Bc(A,ie,q)});function _g(A,q){var ie=so(A)?ka:zA;return ie(A,Vn(q,3))}function Ene(A,q,ie,De){return A==null?[]:(so(q)||(q=q==null?[]:[q]),ie=De?e:ie,so(ie)||(ie=ie==null?[]:[ie]),$A(A,q,ie))}var Ine=sg(function(A,q,ie){A[ie?0:1].push(q)},function(){return[[],[]]});function One(A,q,ie){var De=so(A)?Gw:hA,Ge=arguments.length<3;return De(A,Vn(q,4),ie,Ge,Sp)}function Ane(A,q,ie){var De=so(A)?jZ:hA,Ge=arguments.length<3;return De(A,Vn(q,4),ie,Ge,FA)}function kne(A,q){var ie=so(A)?Cp:BA;return ie(A,xg(Vn(q,3)))}function Fne(A){var q=so(A)?IA:Tte;return q(A)}function Bne(A,q,ie){(ie?ml(A,q,ie):q===e)?q=1:q=po(q);var De=so(A)?nte:Mte;return De(A,q)}function Rne(A){var q=so(A)?ote:Ete;return q(A)}function Nne(A){if(A==null)return 0;if(xl(A))return yg(A)?f0(A):A.length;var q=Xr(A);return q==rt||q==Kt?A.size:sT(A).length}function Lne(A,q,ie){var De=so(A)?jw:Ite;return ie&&ml(A,q,ie)&&(q=e),De(A,Vn(q,3))}var Vne=Co(function(A,q){if(A==null)return[];var ie=q.length;return ie>1&&ml(A,q[0],q[1])?q=[]:ie>2&&ml(q[0],q[1],q[2])&&(q=[q[0]]),$A(A,Hr(q,1),[])}),Cg=vee||function(){return Pr.Date.now()};function qne(A,q){if(typeof q!="function")throw new ts(i);return A=po(A),function(){if(--A<1)return q.apply(this,arguments)}}function V7(A,q,ie){return q=ie?e:q,q=A&&q==null?A.length:q,Rc(A,se,e,e,e,e,q)}function q7(A,q){var ie;if(typeof q!="function")throw new ts(i);return A=po(A),function(){return--A>0&&(ie=q.apply(this,arguments)),A<=1&&(q=e),ie}}var AT=Co(function(A,q,ie){var De=P;if(ie.length){var Ge=xp(ie,b0(AT));De|=U}return Rc(A,De,q,ie,Ge)}),z7=Co(function(A,q,ie){var De=P|M;if(ie.length){var Ge=xp(ie,b0(z7));De|=U}return Rc(q,De,A,ie,Ge)});function H7(A,q,ie){q=ie?e:q;var De=Rc(A,F,e,e,e,e,e,q);return De.placeholder=H7.placeholder,De}function G7(A,q,ie){q=ie?e:q;var De=Rc(A,V,e,e,e,e,e,q);return De.placeholder=G7.placeholder,De}function j7(A,q,ie){var De,Ge,ct,kt,$t,Xt,Di=0,Ii=!1,Bi=!1,tn=!0;if(typeof A!="function")throw new ts(i);q=rs(q)||0,Na(ie)&&(Ii=!!ie.leading,Bi="maxWait"in ie,ct=Bi?_r(rs(ie.maxWait)||0,q):ct,tn="trailing"in ie?!!ie.trailing:tn);function yn(Ka){var ks=De,zc=Ge;return De=Ge=e,Di=Ka,kt=A.apply(zc,ks),kt}function qn(Ka){return Di=Ka,$t=ff(wo,q),Ii?yn(Ka):kt}function fo(Ka){var ks=Ka-Xt,zc=Ka-Di,ck=q-ks;return Bi?Jr(ck,ct-zc):ck}function zn(Ka){var ks=Ka-Xt,zc=Ka-Di;return Xt===e||ks>=q||ks<0||Bi&&zc>=ct}function wo(){var Ka=Cg();if(zn(Ka))return Ao(Ka);$t=ff(wo,fo(Ka))}function Ao(Ka){return $t=e,tn&&De?yn(Ka):(De=Ge=e,kt)}function Hl(){$t!==e&&e7($t),Di=0,De=Xt=Ge=$t=e}function dl(){return $t===e?kt:Ao(Cg())}function Gl(){var Ka=Cg(),ks=zn(Ka);if(De=arguments,Ge=this,Xt=Ka,ks){if($t===e)return qn(Xt);if(Bi)return e7($t),$t=ff(wo,q),yn(Xt)}return $t===e&&($t=ff(wo,q)),kt}return Gl.cancel=Hl,Gl.flush=dl,Gl}var zne=Co(function(A,q){return kA(A,1,q)}),Hne=Co(function(A,q,ie){return kA(A,rs(q)||0,ie)});function Gne(A){return Rc(A,re)}function vg(A,q){if(typeof A!="function"||q!=null&&typeof q!="function")throw new ts(i);var ie=function(){var De=arguments,Ge=q?q.apply(this,De):De[0],ct=ie.cache;if(ct.has(Ge))return ct.get(Ge);var kt=A.apply(this,De);return ie.cache=ct.set(Ge,kt)||ct,kt};return ie.cache=new(vg.Cache||Fc),ie}vg.Cache=Fc;function xg(A){if(typeof A!="function")throw new ts(i);return function(){var q=arguments;switch(q.length){case 0:return!A.call(this);case 1:return!A.call(this,q[0]);case 2:return!A.call(this,q[0],q[1]);case 3:return!A.call(this,q[0],q[1],q[2])}return!A.apply(this,q)}}function jne(A){return q7(2,A)}var $ne=Ote(function(A,q){q=q.length==1&&so(q[0])?ka(q[0],Vl(Vn())):ka(Hr(q,1),Vl(Vn()));var ie=q.length;return Co(function(De){for(var Ge=-1,ct=Jr(De.length,ie);++Ge=q}),vd=LA((function(){return arguments})())?LA:function(A){return qa(A)&&oa.call(A,"callee")&&!PA.call(A,"callee")},so=hi.isArray,roe=aA?Vl(aA):fte;function xl(A){return A!=null&&bg(A.length)&&!Vc(A)}function Ya(A){return qa(A)&&xl(A)}function loe(A){return A===!0||A===!1||qa(A)&&pl(A)==J}var Mp=bee||jT,soe=rA?Vl(rA):hte;function coe(A){return qa(A)&&A.nodeType===1&&!hf(A)}function poe(A){if(A==null)return!0;if(xl(A)&&(so(A)||typeof A=="string"||typeof A.splice=="function"||Mp(A)||y0(A)||vd(A)))return!A.length;var q=Xr(A);if(q==rt||q==Kt)return!A.size;if(uf(A))return!sT(A).length;for(var ie in A)if(oa.call(A,ie))return!1;return!0}function moe(A,q){return pf(A,q)}function doe(A,q,ie){ie=typeof ie=="function"?ie:e;var De=ie?ie(A,q):e;return De===e?pf(A,q,e,ie):!!De}function FT(A){if(!qa(A))return!1;var q=pl(A);return q==qe||q==Ce||typeof A.message=="string"&&typeof A.name=="string"&&!hf(A)}function uoe(A){return typeof A=="number"&&TA(A)}function Vc(A){if(!Na(A))return!1;var q=pl(A);return q==mt||q==Ye||q==Oe||q==Bt}function U7(A){return typeof A=="number"&&A==po(A)}function bg(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=L}function Na(A){var q=typeof A;return A!=null&&(q=="object"||q=="function")}function qa(A){return A!=null&&typeof A=="object"}var W7=lA?Vl(lA):_te;function foe(A,q){return A===q||lT(A,q,PT(q))}function hoe(A,q,ie){return ie=typeof ie=="function"?ie:e,lT(A,q,PT(q),ie)}function goe(A){return Q7(A)&&A!=+A}function _oe(A){if(eie(A))throw new oo(n);return VA(A)}function Coe(A){return A===null}function voe(A){return A==null}function Q7(A){return typeof A=="number"||qa(A)&&pl(A)==Qt}function hf(A){if(!qa(A)||pl(A)!=Qe)return!1;var q=Qh(A);if(q===null)return!0;var ie=oa.call(q,"constructor")&&q.constructor;return typeof ie=="function"&&ie instanceof ie&&jh.call(ie)==hee}var BT=sA?Vl(sA):Cte;function xoe(A){return U7(A)&&A>=-L&&A<=L}var Y7=cA?Vl(cA):vte;function yg(A){return typeof A=="string"||!so(A)&&qa(A)&&pl(A)==ei}function zl(A){return typeof A=="symbol"||qa(A)&&pl(A)==ni}var y0=pA?Vl(pA):xte;function boe(A){return A===e}function yoe(A){return qa(A)&&Xr(A)==ki}function Soe(A){return qa(A)&&pl(A)==Ni}var Poe=dg(cT),woe=dg(function(A,q){return A<=q});function K7(A){if(!A)return[];if(xl(A))return yg(A)?Is(A):vl(A);if(tf&&A[tf])return nee(A[tf]());var q=Xr(A),ie=q==rt?Kw:q==Kt?zh:S0;return ie(A)}function qc(A){if(!A)return A===0?A:0;if(A=rs(A),A===B||A===-B){var q=A<0?-1:1;return q*N}return A===A?A:0}function po(A){var q=qc(A),ie=q%1;return q===q?ie?q-ie:q:0}function J7(A){return A?hd(po(A),0,$):0}function rs(A){if(typeof A=="number")return A;if(zl(A))return G;if(Na(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=Na(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=gA(A);var ie=mo.test(A);return ie||Wo.test(A)?qZ(A.slice(2),ie?2:8):qo.test(A)?G:+A}function X7(A){return tc(A,bl(A))}function Toe(A){return A?hd(po(A),-L,L):A===0?A:0}function Yo(A){return A==null?"":ql(A)}var Moe=v0(function(A,q){if(uf(q)||xl(q)){tc(q,wr(q),A);return}for(var ie in q)oa.call(q,ie)&&lf(A,ie,q[ie])}),Z7=v0(function(A,q){tc(q,bl(q),A)}),Sg=v0(function(A,q,ie,De){tc(q,bl(q),A,De)}),Doe=v0(function(A,q,ie,De){tc(q,wr(q),A,De)}),Eoe=Nc(iT);function Ioe(A,q){var ie=C0(A);return q==null?ie:OA(ie,q)}var Ooe=Co(function(A,q){A=la(A);var ie=-1,De=q.length,Ge=De>2?q[2]:e;for(Ge&&ml(q[0],q[1],Ge)&&(De=1);++ie1),ct}),tc(A,yT(A),ie),De&&(ie=ns(ie,_|C|x,Hte));for(var Ge=q.length;Ge--;)fT(ie,q[Ge]);return ie});function Yoe(A,q){return tk(A,xg(Vn(q)))}var Koe=Nc(function(A,q){return A==null?{}:Ste(A,q)});function tk(A,q){if(A==null)return{};var ie=ka(yT(A),function(De){return[De]});return q=Vn(q),UA(A,ie,function(De,Ge){return q(De,Ge[0])})}function Joe(A,q,ie){q=wp(q,A);var De=-1,Ge=q.length;for(Ge||(Ge=1,A=e);++Deq){var De=A;A=q,q=De}if(ie||A%1||q%1){var Ge=MA();return Jr(A+Ge*(q-A+VZ("1e-"+((Ge+"").length-1))),q)}return mT(A,q)}var sae=x0(function(A,q,ie){return q=q.toLowerCase(),A+(ie?ok(q):q)});function ok(A){return LT(Yo(A).toLowerCase())}function ak(A){return A=Yo(A),A&&A.replace(Za,XZ).replace(m0,"")}function cae(A,q,ie){A=Yo(A),q=ql(q);var De=A.length;ie=ie===e?De:hd(po(ie),0,De);var Ge=ie;return ie-=q.length,ie>=0&&A.slice(ie,Ge)==q}function pae(A){return A=Yo(A),A&&Wn.test(A)?A.replace(Ra,ZZ):A}function mae(A){return A=Yo(A),A&&Qn.test(A)?A.replace(sl,"\\$&"):A}var dae=x0(function(A,q,ie){return A+(ie?"-":"")+q.toLowerCase()}),uae=x0(function(A,q,ie){return A+(ie?" ":"")+q.toLowerCase()}),fae=s7("toLowerCase");function hae(A,q,ie){A=Yo(A),q=po(q);var De=q?f0(A):0;if(!q||De>=q)return A;var Ge=(q-De)/2;return mg(Xh(Ge),ie)+A+mg(Jh(Ge),ie)}function gae(A,q,ie){A=Yo(A),q=po(q);var De=q?f0(A):0;return q&&De>>0,ie?(A=Yo(A),A&&(typeof q=="string"||q!=null&&!BT(q))&&(q=ql(q),!q&&u0(A))?Tp(Is(A),0,ie):A.split(q,ie)):[]}var Sae=x0(function(A,q,ie){return A+(ie?" ":"")+LT(q)});function Pae(A,q,ie){return A=Yo(A),ie=ie==null?0:hd(po(ie),0,A.length),q=ql(q),A.slice(ie,ie+q.length)==q}function wae(A,q,ie){var De=ot.templateSettings;ie&&ml(A,q,ie)&&(q=e),A=Yo(A),q=Sg({},q,De,h7);var Ge=Sg({},q.imports,De.imports,h7),ct=wr(Ge),kt=Yw(Ge,ct),$t,Xt,Di=0,Ii=q.interpolate||fr,Bi="__p += '",tn=Jw((q.escape||fr).source+"|"+Ii.source+"|"+(Ii===In?Mn:fr).source+"|"+(q.evaluate||fr).source+"|$","g"),yn="//# sourceURL="+(oa.call(q,"sourceURL")?(q.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++FZ+"]")+` -`;A.replace(tn,function(zn,wo,Ao,Hl,dl,Gl){return Ao||(Ao=Hl),Bi+=A.slice(Di,Gl).replace(Qa,eee),wo&&($t=!0,Bi+=`' + +`)}function Xte(A){return so(A)||vd(A)||!!(TA&&A&&A[TA])}function Lc(A,q){var ie=typeof A;return q=q??L,!!q&&(ie=="number"||ie!="symbol"&&Oa.test(A))&&A>-1&&A%1==0&&A0){if(++q>=ue)return arguments[0]}else q=0;return A.apply(e,arguments)}}function gg(A,q){var ie=-1,De=A.length,Ge=De-1;for(q=q===e?De:q;++ie1?A[q-1]:e;return ie=typeof ie=="function"?(A.pop(),ie):e,R7(A,ie)});function N7(A){var q=ot(A);return q.__chain__=!0,q}function cne(A,q){return q(A),A}function _g(A,q){return q(A)}var pne=Nc(function(A){var q=A.length,ie=q?A[0]:0,De=this.__wrapped__,Ge=function(ct){return nT(ct,A)};return q>1||this.__actions__.length||!(De instanceof Do)||!Lc(ie)?this.thru(Ge):(De=De.slice(ie,+ie+(q?1:0)),De.__actions__.push({func:_g,args:[Ge],thisArg:e}),new is(De,this.__chain__).thru(function(ct){return q&&!ct.length&&ct.push(e),ct}))});function mne(){return N7(this)}function dne(){return new is(this.value(),this.__chain__)}function une(){this.__values__===e&&(this.__values__=J7(this.value()));var A=this.__index__>=this.__values__.length,q=A?e:this.__values__[this.__index__++];return{done:A,value:q}}function fne(){return this}function hne(A){for(var q,ie=this;ie instanceof ig;){var De=I7(ie);De.__index__=0,De.__values__=e,q?Ge.__wrapped__=De:q=De;var Ge=De;ie=ie.__wrapped__}return Ge.__wrapped__=A,q}function gne(){var A=this.__wrapped__;if(A instanceof Do){var q=A;return this.__actions__.length&&(q=new Do(this)),q=q.reverse(),q.__actions__.push({func:_g,args:[OT],thisArg:e}),new is(q,this.__chain__)}return this.thru(OT)}function _ne(){return ZA(this.__wrapped__,this.__actions__)}var Cne=cg(function(A,q,ie){oa.call(A,ie)?++A[ie]:Bc(A,ie,1)});function vne(A,q,ie){var De=so(A)?dA:cte;return ie&&dl(A,q,ie)&&(q=e),De(A,Vn(q,3))}function xne(A,q){var ie=so(A)?Cp:RA;return ie(A,Vn(q,3))}var bne=p7(O7),yne=p7(A7);function Sne(A,q){return Gr(Cg(A,q),1)}function Pne(A,q){return Gr(Cg(A,q),B)}function wne(A,q,ie){return ie=ie===e?1:po(ie),Gr(Cg(A,q),ie)}function L7(A,q){var ie=so(A)?es:Sp;return ie(A,Vn(q,3))}function V7(A,q){var ie=so(A)?jZ:BA;return ie(A,Vn(q,3))}var Tne=cg(function(A,q,ie){oa.call(A,ie)?A[ie].push(q):Bc(A,ie,[q])});function Mne(A,q,ie,De){A=xl(A)?A:S0(A),ie=ie&&!De?po(ie):0;var Ge=A.length;return ie<0&&(ie=Cr(Ge+ie,0)),Sg(A)?ie<=Ge&&A.indexOf(q,ie)>-1:!!Ge&&d0(A,q,ie)>-1}var Dne=Co(function(A,q,ie){var De=-1,Ge=typeof q=="function",ct=xl(A)?hi(A.length):[];return Sp(A,function(kt){ct[++De]=Ge?Ll(q,kt,ie):cf(kt,q,ie)}),ct}),Ene=cg(function(A,q,ie){Bc(A,ie,q)});function Cg(A,q){var ie=so(A)?ka:HA;return ie(A,Vn(q,3))}function Ine(A,q,ie,De){return A==null?[]:(so(q)||(q=q==null?[]:[q]),ie=De?e:ie,so(ie)||(ie=ie==null?[]:[ie]),UA(A,q,ie))}var One=cg(function(A,q,ie){A[ie?0:1].push(q)},function(){return[[],[]]});function Ane(A,q,ie){var De=so(A)?jw:gA,Ge=arguments.length<3;return De(A,Vn(q,4),ie,Ge,Sp)}function kne(A,q,ie){var De=so(A)?$Z:gA,Ge=arguments.length<3;return De(A,Vn(q,4),ie,Ge,BA)}function Fne(A,q){var ie=so(A)?Cp:RA;return ie(A,bg(Vn(q,3)))}function Bne(A){var q=so(A)?OA:Mte;return q(A)}function Rne(A,q,ie){(ie?dl(A,q,ie):q===e)?q=1:q=po(q);var De=so(A)?ote:Dte;return De(A,q)}function Nne(A){var q=so(A)?ate:Ite;return q(A)}function Lne(A){if(A==null)return 0;if(xl(A))return Sg(A)?f0(A):A.length;var q=Zr(A);return q==rt||q==Kt?A.size:cT(A).length}function Vne(A,q,ie){var De=so(A)?$w:Ote;return ie&&dl(A,q,ie)&&(q=e),De(A,Vn(q,3))}var qne=Co(function(A,q){if(A==null)return[];var ie=q.length;return ie>1&&dl(A,q[0],q[1])?q=[]:ie>2&&dl(q[0],q[1],q[2])&&(q=[q[0]]),UA(A,Gr(q,1),[])}),vg=xee||function(){return wr.Date.now()};function zne(A,q){if(typeof q!="function")throw new ts(i);return A=po(A),function(){if(--A<1)return q.apply(this,arguments)}}function q7(A,q,ie){return q=ie?e:q,q=A&&q==null?A.length:q,Rc(A,se,e,e,e,e,q)}function z7(A,q){var ie;if(typeof q!="function")throw new ts(i);return A=po(A),function(){return--A>0&&(ie=q.apply(this,arguments)),A<=1&&(q=e),ie}}var kT=Co(function(A,q,ie){var De=P;if(ie.length){var Ge=xp(ie,b0(kT));De|=U}return Rc(A,De,q,ie,Ge)}),H7=Co(function(A,q,ie){var De=P|M;if(ie.length){var Ge=xp(ie,b0(H7));De|=U}return Rc(q,De,A,ie,Ge)});function G7(A,q,ie){q=ie?e:q;var De=Rc(A,F,e,e,e,e,e,q);return De.placeholder=G7.placeholder,De}function j7(A,q,ie){q=ie?e:q;var De=Rc(A,V,e,e,e,e,e,q);return De.placeholder=j7.placeholder,De}function $7(A,q,ie){var De,Ge,ct,kt,$t,Xt,Di=0,Ii=!1,Bi=!1,tn=!0;if(typeof A!="function")throw new ts(i);q=rs(q)||0,Na(ie)&&(Ii=!!ie.leading,Bi="maxWait"in ie,ct=Bi?Cr(rs(ie.maxWait)||0,q):ct,tn="trailing"in ie?!!ie.trailing:tn);function yn(Ka){var ks=De,zc=Ge;return De=Ge=e,Di=Ka,kt=A.apply(zc,ks),kt}function qn(Ka){return Di=Ka,$t=ff(wo,q),Ii?yn(Ka):kt}function fo(Ka){var ks=Ka-Xt,zc=Ka-Di,pk=q-ks;return Bi?Xr(pk,ct-zc):pk}function zn(Ka){var ks=Ka-Xt,zc=Ka-Di;return Xt===e||ks>=q||ks<0||Bi&&zc>=ct}function wo(){var Ka=vg();if(zn(Ka))return Ao(Ka);$t=ff(wo,fo(Ka))}function Ao(Ka){return $t=e,tn&&De?yn(Ka):(De=Ge=e,kt)}function Hl(){$t!==e&&t7($t),Di=0,De=Xt=Ge=$t=e}function ul(){return $t===e?kt:Ao(vg())}function Gl(){var Ka=vg(),ks=zn(Ka);if(De=arguments,Ge=this,Xt=Ka,ks){if($t===e)return qn(Xt);if(Bi)return t7($t),$t=ff(wo,q),yn(Xt)}return $t===e&&($t=ff(wo,q)),kt}return Gl.cancel=Hl,Gl.flush=ul,Gl}var Hne=Co(function(A,q){return FA(A,1,q)}),Gne=Co(function(A,q,ie){return FA(A,rs(q)||0,ie)});function jne(A){return Rc(A,re)}function xg(A,q){if(typeof A!="function"||q!=null&&typeof q!="function")throw new ts(i);var ie=function(){var De=arguments,Ge=q?q.apply(this,De):De[0],ct=ie.cache;if(ct.has(Ge))return ct.get(Ge);var kt=A.apply(this,De);return ie.cache=ct.set(Ge,kt)||ct,kt};return ie.cache=new(xg.Cache||Fc),ie}xg.Cache=Fc;function bg(A){if(typeof A!="function")throw new ts(i);return function(){var q=arguments;switch(q.length){case 0:return!A.call(this);case 1:return!A.call(this,q[0]);case 2:return!A.call(this,q[0],q[1]);case 3:return!A.call(this,q[0],q[1],q[2])}return!A.apply(this,q)}}function $ne(A){return z7(2,A)}var Une=Ate(function(A,q){q=q.length==1&&so(q[0])?ka(q[0],Vl(Vn())):ka(Gr(q,1),Vl(Vn()));var ie=q.length;return Co(function(De){for(var Ge=-1,ct=Xr(De.length,ie);++Ge=q}),vd=VA((function(){return arguments})())?VA:function(A){return qa(A)&&oa.call(A,"callee")&&!wA.call(A,"callee")},so=hi.isArray,loe=rA?Vl(rA):hte;function xl(A){return A!=null&&yg(A.length)&&!Vc(A)}function Ya(A){return qa(A)&&xl(A)}function soe(A){return A===!0||A===!1||qa(A)&&ml(A)==J}var Mp=yee||$T,coe=lA?Vl(lA):gte;function poe(A){return qa(A)&&A.nodeType===1&&!hf(A)}function moe(A){if(A==null)return!0;if(xl(A)&&(so(A)||typeof A=="string"||typeof A.splice=="function"||Mp(A)||y0(A)||vd(A)))return!A.length;var q=Zr(A);if(q==rt||q==Kt)return!A.size;if(uf(A))return!cT(A).length;for(var ie in A)if(oa.call(A,ie))return!1;return!0}function doe(A,q){return pf(A,q)}function uoe(A,q,ie){ie=typeof ie=="function"?ie:e;var De=ie?ie(A,q):e;return De===e?pf(A,q,e,ie):!!De}function BT(A){if(!qa(A))return!1;var q=ml(A);return q==qe||q==Ce||typeof A.message=="string"&&typeof A.name=="string"&&!hf(A)}function foe(A){return typeof A=="number"&&MA(A)}function Vc(A){if(!Na(A))return!1;var q=ml(A);return q==mt||q==Ye||q==Oe||q==Bt}function W7(A){return typeof A=="number"&&A==po(A)}function yg(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=L}function Na(A){var q=typeof A;return A!=null&&(q=="object"||q=="function")}function qa(A){return A!=null&&typeof A=="object"}var Q7=sA?Vl(sA):Cte;function hoe(A,q){return A===q||sT(A,q,wT(q))}function goe(A,q,ie){return ie=typeof ie=="function"?ie:e,sT(A,q,wT(q),ie)}function _oe(A){return Y7(A)&&A!=+A}function Coe(A){if(tie(A))throw new oo(n);return qA(A)}function voe(A){return A===null}function xoe(A){return A==null}function Y7(A){return typeof A=="number"||qa(A)&&ml(A)==Qt}function hf(A){if(!qa(A)||ml(A)!=Qe)return!1;var q=Yh(A);if(q===null)return!0;var ie=oa.call(q,"constructor")&&q.constructor;return typeof ie=="function"&&ie instanceof ie&&$h.call(ie)==gee}var RT=cA?Vl(cA):vte;function boe(A){return W7(A)&&A>=-L&&A<=L}var K7=pA?Vl(pA):xte;function Sg(A){return typeof A=="string"||!so(A)&&qa(A)&&ml(A)==ei}function zl(A){return typeof A=="symbol"||qa(A)&&ml(A)==ni}var y0=mA?Vl(mA):bte;function yoe(A){return A===e}function Soe(A){return qa(A)&&Zr(A)==ki}function Poe(A){return qa(A)&&ml(A)==Ni}var woe=ug(pT),Toe=ug(function(A,q){return A<=q});function J7(A){if(!A)return[];if(xl(A))return Sg(A)?Is(A):vl(A);if(tf&&A[tf])return oee(A[tf]());var q=Zr(A),ie=q==rt?Jw:q==Kt?Hh:S0;return ie(A)}function qc(A){if(!A)return A===0?A:0;if(A=rs(A),A===B||A===-B){var q=A<0?-1:1;return q*N}return A===A?A:0}function po(A){var q=qc(A),ie=q%1;return q===q?ie?q-ie:q:0}function X7(A){return A?hd(po(A),0,$):0}function rs(A){if(typeof A=="number")return A;if(zl(A))return G;if(Na(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=Na(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=_A(A);var ie=mo.test(A);return ie||Wo.test(A)?zZ(A.slice(2),ie?2:8):qo.test(A)?G:+A}function Z7(A){return tc(A,bl(A))}function Moe(A){return A?hd(po(A),-L,L):A===0?A:0}function Yo(A){return A==null?"":ql(A)}var Doe=v0(function(A,q){if(uf(q)||xl(q)){tc(q,Tr(q),A);return}for(var ie in q)oa.call(q,ie)&&lf(A,ie,q[ie])}),ek=v0(function(A,q){tc(q,bl(q),A)}),Pg=v0(function(A,q,ie,De){tc(q,bl(q),A,De)}),Eoe=v0(function(A,q,ie,De){tc(q,Tr(q),A,De)}),Ioe=Nc(nT);function Ooe(A,q){var ie=C0(A);return q==null?ie:AA(ie,q)}var Aoe=Co(function(A,q){A=la(A);var ie=-1,De=q.length,Ge=De>2?q[2]:e;for(Ge&&dl(q[0],q[1],Ge)&&(De=1);++ie1),ct}),tc(A,ST(A),ie),De&&(ie=ns(ie,_|C|x,Gte));for(var Ge=q.length;Ge--;)hT(ie,q[Ge]);return ie});function Koe(A,q){return ik(A,bg(Vn(q)))}var Joe=Nc(function(A,q){return A==null?{}:Pte(A,q)});function ik(A,q){if(A==null)return{};var ie=ka(ST(A),function(De){return[De]});return q=Vn(q),WA(A,ie,function(De,Ge){return q(De,Ge[0])})}function Xoe(A,q,ie){q=wp(q,A);var De=-1,Ge=q.length;for(Ge||(Ge=1,A=e);++Deq){var De=A;A=q,q=De}if(ie||A%1||q%1){var Ge=DA();return Xr(A+Ge*(q-A+qZ("1e-"+((Ge+"").length-1))),q)}return dT(A,q)}var cae=x0(function(A,q,ie){return q=q.toLowerCase(),A+(ie?ak(q):q)});function ak(A){return VT(Yo(A).toLowerCase())}function rk(A){return A=Yo(A),A&&A.replace(er,ZZ).replace(m0,"")}function pae(A,q,ie){A=Yo(A),q=ql(q);var De=A.length;ie=ie===e?De:hd(po(ie),0,De);var Ge=ie;return ie-=q.length,ie>=0&&A.slice(ie,Ge)==q}function mae(A){return A=Yo(A),A&&Wn.test(A)?A.replace(Ra,eee):A}function dae(A){return A=Yo(A),A&&Qn.test(A)?A.replace(cl,"\\$&"):A}var uae=x0(function(A,q,ie){return A+(ie?"-":"")+q.toLowerCase()}),fae=x0(function(A,q,ie){return A+(ie?" ":"")+q.toLowerCase()}),hae=c7("toLowerCase");function gae(A,q,ie){A=Yo(A),q=po(q);var De=q?f0(A):0;if(!q||De>=q)return A;var Ge=(q-De)/2;return dg(Zh(Ge),ie)+A+dg(Xh(Ge),ie)}function _ae(A,q,ie){A=Yo(A),q=po(q);var De=q?f0(A):0;return q&&De>>0,ie?(A=Yo(A),A&&(typeof q=="string"||q!=null&&!RT(q))&&(q=ql(q),!q&&u0(A))?Tp(Is(A),0,ie):A.split(q,ie)):[]}var Pae=x0(function(A,q,ie){return A+(ie?" ":"")+VT(q)});function wae(A,q,ie){return A=Yo(A),ie=ie==null?0:hd(po(ie),0,A.length),q=ql(q),A.slice(ie,ie+q.length)==q}function Tae(A,q,ie){var De=ot.templateSettings;ie&&dl(A,q,ie)&&(q=e),A=Yo(A),q=Pg({},q,De,g7);var Ge=Pg({},q.imports,De.imports,g7),ct=Tr(Ge),kt=Kw(Ge,ct),$t,Xt,Di=0,Ii=q.interpolate||hr,Bi="__p += '",tn=Xw((q.escape||hr).source+"|"+Ii.source+"|"+(Ii===In?Mn:hr).source+"|"+(q.evaluate||hr).source+"|$","g"),yn="//# sourceURL="+(oa.call(q,"sourceURL")?(q.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++BZ+"]")+` +`;A.replace(tn,function(zn,wo,Ao,Hl,ul,Gl){return Ao||(Ao=Hl),Bi+=A.slice(Di,Gl).replace(Qa,tee),wo&&($t=!0,Bi+=`' + __e(`+wo+`) + -'`),dl&&(Xt=!0,Bi+=`'; -`+dl+`; +'`),ul&&(Xt=!0,Bi+=`'; +`+ul+`; __p += '`),Ao&&(Bi+=`' + ((__t = (`+Ao+`)) == null ? '' : __t) + '`),Di=Gl+zn.length,zn}),Bi+=`'; @@ -17,16 +17,16 @@ __p += '`),Ao&&(Bi+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Bi+`return __p -}`;var fo=lk(function(){return $o(ct,yn+"return "+Bi).apply(e,kt)});if(fo.source=Bi,FT(fo))throw fo;return fo}function Tae(A){return Yo(A).toLowerCase()}function Mae(A){return Yo(A).toUpperCase()}function Dae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return gA(A);if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=Is(q),ct=_A(De,Ge),kt=CA(De,Ge)+1;return Tp(De,ct,kt).join("")}function Eae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return A.slice(0,xA(A)+1);if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=CA(De,Is(q))+1;return Tp(De,0,Ge).join("")}function Iae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return A.replace(Rt,"");if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=_A(De,Is(q));return Tp(De,Ge).join("")}function Oae(A,q){var ie=ce,De=_e;if(Na(q)){var Ge="separator"in q?q.separator:Ge;ie="length"in q?po(q.length):ie,De="omission"in q?ql(q.omission):De}A=Yo(A);var ct=A.length;if(u0(A)){var kt=Is(A);ct=kt.length}if(ie>=ct)return A;var $t=ie-f0(De);if($t<1)return De;var Xt=kt?Tp(kt,0,$t).join(""):A.slice(0,$t);if(Ge===e)return Xt+De;if(kt&&($t+=Xt.length-$t),BT(Ge)){if(A.slice($t).search(Ge)){var Di,Ii=Xt;for(Ge.global||(Ge=Jw(Ge.source,Yo(an.exec(Ge))+"g")),Ge.lastIndex=0;Di=Ge.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?$t:Bi)}}else if(A.indexOf(ql(Ge),$t)!=$t){var tn=Xt.lastIndexOf(Ge);tn>-1&&(Xt=Xt.slice(0,tn))}return Xt+De}function Aae(A){return A=Yo(A),A&&Un.test(A)?A.replace(En,lee):A}var kae=x0(function(A,q,ie){return A+(ie?" ":"")+q.toUpperCase()}),LT=s7("toUpperCase");function rk(A,q,ie){return A=Yo(A),q=ie?e:q,q===e?iee(A)?pee(A):WZ(A):A.match(q)||[]}var lk=Co(function(A,q){try{return Ll(A,e,q)}catch(ie){return FT(ie)?ie:new oo(ie)}}),Fae=Nc(function(A,q){return es(q,function(ie){ie=ic(ie),Bc(A,ie,AT(A[ie],A))}),A});function Bae(A){var q=A==null?0:A.length,ie=Vn();return A=q?ka(A,function(De){if(typeof De[1]!="function")throw new ts(i);return[ie(De[0]),De[1]]}):[],Co(function(De){for(var Ge=-1;++GeL)return[];var ie=$,De=Jr(A,$);q=Vn(q),A-=$;for(var Ge=Qw(De,q);++ie0||q<0)?new Do(ie):(A<0?ie=ie.takeRight(-A):A&&(ie=ie.drop(A)),q!==e&&(q=po(q),ie=q<0?ie.dropRight(-q):ie.take(q-A)),ie)},Do.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Do.prototype.toArray=function(){return this.take($)},ec(Do.prototype,function(A,q){var ie=/^(?:filter|find|map|reject)|While$/.test(q),De=/^(?:head|last)$/.test(q),Ge=ot[De?"take"+(q=="last"?"Right":""):q],ct=De||/^find/.test(q);Ge&&(ot.prototype[q]=function(){var kt=this.__wrapped__,$t=De?[1]:arguments,Xt=kt instanceof Do,Di=$t[0],Ii=Xt||so(kt),Bi=function(wo){var Ao=Ge.apply(ot,vp([wo],$t));return De&&tn?Ao[0]:Ao};Ii&&ie&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var tn=this.__chain__,yn=!!this.__actions__.length,qn=ct&&!tn,fo=Xt&&!yn;if(!ct&&Ii){kt=fo?kt:new Do(this);var zn=A.apply(kt,$t);return zn.__actions__.push({func:gg,args:[Bi],thisArg:e}),new is(zn,tn)}return qn&&fo?A.apply(this,$t):(zn=this.thru(Bi),qn?De?zn.value()[0]:zn.value():zn)})}),es(["pop","push","shift","sort","splice","unshift"],function(A){var q=Hh[A],ie=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",De=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var Ge=arguments;if(De&&!this.__chain__){var ct=this.value();return q.apply(so(ct)?ct:[],Ge)}return this[ie](function(kt){return q.apply(so(kt)?kt:[],Ge)})}}),ec(Do.prototype,function(A,q){var ie=ot[q];if(ie){var De=ie.name+"";oa.call(_0,De)||(_0[De]=[]),_0[De].push({name:q,func:ie})}}),_0[cg(e,M).name]=[{name:"wrapper",func:e}],Do.prototype.clone=Aee,Do.prototype.reverse=kee,Do.prototype.value=Fee,ot.prototype.at=cne,ot.prototype.chain=pne,ot.prototype.commit=mne,ot.prototype.next=dne,ot.prototype.plant=fne,ot.prototype.reverse=hne,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=gne,ot.prototype.first=ot.prototype.head,tf&&(ot.prototype[tf]=une),ot},bp=mee();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Pr._=bp,define(function(){return bp})):md?((md.exports=bp)._=bp,qw._=bp):Pr._=bp}).call(W0)});var N9=pt(QC=>{"use strict";QC.byteLength=Rhe;QC.toByteArray=Lhe;QC.fromByteArray=zhe;var Pc=[],Cs=[],Bhe=typeof Uint8Array<"u"?Uint8Array:Array,QM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(qd=0,B9=QM.length;qd0)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 Rhe(e){var o=R9(e),t=o[0],n=o[1];return(t+n)*3/4-n}function Nhe(e,o,t){return(o+t)*3/4-t}function Lhe(e){var o,t=R9(e),n=t[0],i=t[1],s=new Bhe(Nhe(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=Cs[e.charCodeAt(f)]<<2|Cs[e.charCodeAt(f+1)]>>4,s[d++]=o&255),i===1&&(o=Cs[e.charCodeAt(f)]<<10|Cs[e.charCodeAt(f+1)]<<4|Cs[e.charCodeAt(f+2)]>>2,s[d++]=o>>8&255,s[d++]=o&255),s}function Vhe(e){return Pc[e>>18&63]+Pc[e>>12&63]+Pc[e>>6&63]+Pc[e&63]}function qhe(e,o,t){for(var n,i=[],s=o;su?u:d+s));return n===1?(o=e[t-1],i.push(Pc[o>>2]+Pc[o<<4&63]+"==")):n===2&&(o=(e[t-2]<<8)+e[t-1],i.push(Pc[o>>10]+Pc[o>>4&63]+Pc[o<<2&63]+"=")),i.join("")}});var L9=pt(YM=>{YM.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,w=e[o+x];for(x+=y,s=w&(1<<-C)-1,w>>=-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:(w?-1:1)*(1/0);d=d+Math.pow(2,n),s=s-_}return(w?-1:1)*d*Math.pow(2,s-n)};YM.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,w=n?0:s-1,P=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+w]=u&255,w+=P,u/=256,i-=8);for(d=d<0;e[t+w]=d&255,w+=P,d/=256,_-=8);e[t+w-P]|=M*128}});var J9=pt(pu=>{"use strict";var KM=N9(),cu=L9(),V9=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pu.Buffer=Ti;pu.SlowBuffer=Whe;pu.INSPECT_MAX_BYTES=50;var YC=2147483647;pu.kMaxLength=YC;Ti.TYPED_ARRAY_SUPPORT=Hhe();!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 Hhe(){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 np(e){if(e>YC)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 e5(e)}return H9(e,o,t)}Ti.poolSize=8192;function H9(e,o,t){if(typeof e=="string")return jhe(e,o);if(ArrayBuffer.isView(e))return $he(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(wc(e,ArrayBuffer)||e&&wc(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(wc(e,SharedArrayBuffer)||e&&wc(e.buffer,SharedArrayBuffer)))return XM(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=Uhe(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 H9(e,o,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function G9(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 Ghe(e,o,t){return G9(e),e<=0?np(e):o!==void 0?typeof t=="string"?np(e).fill(o,t):np(e).fill(o):np(e)}Ti.alloc=function(e,o,t){return Ghe(e,o,t)};function e5(e){return G9(e),np(e<0?0:t5(e)|0)}Ti.allocUnsafe=function(e){return e5(e)};Ti.allocUnsafeSlow=function(e){return e5(e)};function jhe(e,o){if((typeof o!="string"||o==="")&&(o="utf8"),!Ti.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var t=j9(e,o)|0,n=np(t),i=n.write(e,o);return i!==t&&(n=n.slice(0,i)),n}function JM(e){for(var o=e.length<0?0:t5(e.length)|0,t=np(o),n=0;n=YC)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+YC.toString(16)+" bytes");return e|0}function Whe(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(wc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),wc(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 j9(e,o){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wc(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 ZM(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return K9(e).length;default:if(i)return n?-1:ZM(e).length;o=(""+o).toLowerCase(),i=!0}}Ti.byteLength=j9;function Qhe(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 oge(this,o,t);case"utf8":case"utf-8":return U9(this,o,t);case"ascii":return ige(this,o,t);case"latin1":case"binary":return nge(this,o,t);case"base64":return ege(this,o,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return age(this,o,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ti.prototype._isBuffer=!0;function zd(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+=" ... "),""};V9&&(Ti.prototype[V9]=Ti.prototype.inspect);Ti.prototype.compare=function(o,t,n,i,s){if(wc(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,i5(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:q9(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):q9(e,[o],t,n,i);throw new TypeError("val must be string, number or Buffer")}function q9(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(w,P){return s===1?w[P]:w.readUInt16BE(P*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 Yhe(this,o,t,n);case"utf8":case"utf-8":return Khe(this,o,t,n);case"ascii":case"latin1":case"binary":return Jhe(this,o,t,n);case"base64":return Xhe(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 ege(e,o,t){return o===0&&t===e.length?KM.fromByteArray(e):KM.fromByteArray(e.slice(o,t))}function U9(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 tge(n)}var z9=4096;function tge(e){var o=e.length;if(o<=z9)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||Lr(o,t,this.length);for(var i=this[o],s=1,d=0;++d>>0,t=t>>>0,n||Lr(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||Lr(o,1,this.length),this[o]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(o,t){return o=o>>>0,t||Lr(o,2,this.length),this[o]|this[o+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(o,t){return o=o>>>0,t||Lr(o,2,this.length),this[o]<<8|this[o+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(o,t){return o=o>>>0,t||Lr(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||Lr(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||Lr(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||Lr(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||Lr(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]};Ti.prototype.readInt16LE=function(o,t){o=o>>>0,t||Lr(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||Lr(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||Lr(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||Lr(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||Lr(o,4,this.length),cu.read(this,o,!0,23,4)};Ti.prototype.readFloatBE=function(o,t){return o=o>>>0,t||Lr(o,4,this.length),cu.read(this,o,!1,23,4)};Ti.prototype.readDoubleLE=function(o,t){return o=o>>>0,t||Lr(o,8,this.length),cu.read(this,o,!0,52,8)};Ti.prototype.readDoubleBE=function(o,t){return o=o>>>0,t||Lr(o,8,this.length),cu.read(this,o,!1,52,8)};function kl(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;kl(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;kl(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||kl(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||kl(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||kl(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||kl(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||kl(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);kl(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);kl(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||kl(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||kl(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||kl(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||kl(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||kl(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 W9(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 Q9(e,o,t,n,i){return o=+o,t=t>>>0,i||W9(e,o,t,4,34028234663852886e22,-34028234663852886e22),cu.write(e,o,t,n,23,4),t+4}Ti.prototype.writeFloatLE=function(o,t,n){return Q9(this,o,t,!0,n)};Ti.prototype.writeFloatBE=function(o,t,n){return Q9(this,o,t,!1,n)};function Y9(e,o,t,n,i){return o=+o,t=t>>>0,i||W9(e,o,t,8,17976931348623157e292,-17976931348623157e292),cu.write(e,o,t,n,52,8),t+8}Ti.prototype.writeDoubleLE=function(o,t,n){return Y9(this,o,t,!0,n)};Ti.prototype.writeDoubleBE=function(o,t,n){return Y9(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 sge(e){for(var o=[],t=0;t>8,i=t%256,s.push(i),s.push(n);return s}function K9(e){return KM.toByteArray(lge(e))}function KC(e,o,t,n){for(var i=0;i=o.length||i>=e.length);++i)o[i+t]=e[i];return i}function wc(e,o){return e instanceof o||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===o.name}function i5(e){return e!==e}var pge=(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 LV=pt((E3n,NV)=>{function dXe(){this.__data__=[],this.size=0}NV.exports=dXe});var Jd=pt((I3n,VV)=>{function uXe(e,o){return e===o||e!==e&&o!==o}VV.exports=uXe});var N1=pt((O3n,qV)=>{var fXe=Jd();function hXe(e,o){for(var t=e.length;t--;)if(fXe(e[t][0],o))return t;return-1}qV.exports=hXe});var HV=pt((A3n,zV)=>{var gXe=N1(),_Xe=Array.prototype,CXe=_Xe.splice;function vXe(e){var o=this.__data__,t=gXe(o,e);if(t<0)return!1;var n=o.length-1;return t==n?o.pop():CXe.call(o,t,1),--this.size,!0}zV.exports=vXe});var jV=pt((k3n,GV)=>{var xXe=N1();function bXe(e){var o=this.__data__,t=xXe(o,e);return t<0?void 0:o[t][1]}GV.exports=bXe});var UV=pt((F3n,$V)=>{var yXe=N1();function SXe(e){return yXe(this.__data__,e)>-1}$V.exports=SXe});var QV=pt((B3n,WV)=>{var PXe=N1();function wXe(e,o){var t=this.__data__,n=PXe(t,e);return n<0?(++this.size,t.push([e,o])):t[n][1]=o,this}WV.exports=wXe});var L1=pt((R3n,YV)=>{var TXe=LV(),MXe=HV(),DXe=jV(),EXe=UV(),IXe=QV();function bu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var OXe=L1();function AXe(){this.__data__=new OXe,this.size=0}KV.exports=AXe});var ZV=pt((L3n,XV)=>{function kXe(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}XV.exports=kXe});var tq=pt((V3n,eq)=>{function FXe(e){return this.__data__.get(e)}eq.exports=FXe});var nq=pt((q3n,iq)=>{function BXe(e){return this.__data__.has(e)}iq.exports=BXe});var jD=pt((z3n,oq)=>{var RXe=typeof global=="object"&&global&&global.Object===Object&&global;oq.exports=RXe});var xs=pt((H3n,aq)=>{var NXe=jD(),LXe=typeof self=="object"&&self&&self.Object===Object&&self,VXe=NXe||LXe||Function("return this")();aq.exports=VXe});var Xd=pt((G3n,rq)=>{var qXe=xs(),zXe=qXe.Symbol;rq.exports=zXe});var pq=pt((j3n,cq)=>{var lq=Xd(),sq=Object.prototype,HXe=sq.hasOwnProperty,GXe=sq.toString,V1=lq?lq.toStringTag:void 0;function jXe(e){var o=HXe.call(e,V1),t=e[V1];try{e[V1]=void 0;var n=!0}catch{}var i=GXe.call(e);return n&&(o?e[V1]=t:delete e[V1]),i}cq.exports=jXe});var dq=pt(($3n,mq)=>{var $Xe=Object.prototype,UXe=$Xe.toString;function WXe(e){return UXe.call(e)}mq.exports=WXe});var pm=pt((U3n,hq)=>{var uq=Xd(),QXe=pq(),YXe=dq(),KXe="[object Null]",JXe="[object Undefined]",fq=uq?uq.toStringTag:void 0;function XXe(e){return e==null?e===void 0?JXe:KXe:fq&&fq in Object(e)?QXe(e):YXe(e)}hq.exports=XXe});var $l=pt((W3n,gq)=>{function ZXe(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}gq.exports=ZXe});var yu=pt((Q3n,_q)=>{var eZe=pm(),tZe=$l(),iZe="[object AsyncFunction]",nZe="[object Function]",oZe="[object GeneratorFunction]",aZe="[object Proxy]";function rZe(e){if(!tZe(e))return!1;var o=eZe(e);return o==nZe||o==oZe||o==iZe||o==aZe}_q.exports=rZe});var vq=pt((Y3n,Cq)=>{var lZe=xs(),sZe=lZe["__core-js_shared__"];Cq.exports=sZe});var yq=pt((K3n,bq)=>{var $D=vq(),xq=(function(){var e=/[^.]+$/.exec($D&&$D.keys&&$D.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function cZe(e){return!!xq&&xq in e}bq.exports=cZe});var UD=pt((J3n,Sq)=>{var pZe=Function.prototype,mZe=pZe.toString;function dZe(e){if(e!=null){try{return mZe.call(e)}catch{}try{return e+""}catch{}}return""}Sq.exports=dZe});var wq=pt((X3n,Pq)=>{var uZe=yu(),fZe=yq(),hZe=$l(),gZe=UD(),_Ze=/[\\^$.*+?()[\]{}|]/g,CZe=/^\[object .+?Constructor\]$/,vZe=Function.prototype,xZe=Object.prototype,bZe=vZe.toString,yZe=xZe.hasOwnProperty,SZe=RegExp("^"+bZe.call(yZe).replace(_Ze,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function PZe(e){if(!hZe(e)||fZe(e))return!1;var o=uZe(e)?SZe:CZe;return o.test(gZe(e))}Pq.exports=PZe});var Mq=pt((Z3n,Tq)=>{function wZe(e,o){return e?.[o]}Tq.exports=wZe});var mm=pt((eSn,Dq)=>{var TZe=wq(),MZe=Mq();function DZe(e,o){var t=MZe(e,o);return TZe(t)?t:void 0}Dq.exports=DZe});var Yb=pt((tSn,Eq)=>{var EZe=mm(),IZe=xs(),OZe=EZe(IZe,"Map");Eq.exports=OZe});var q1=pt((iSn,Iq)=>{var AZe=mm(),kZe=AZe(Object,"create");Iq.exports=kZe});var kq=pt((nSn,Aq)=>{var Oq=q1();function FZe(){this.__data__=Oq?Oq(null):{},this.size=0}Aq.exports=FZe});var Bq=pt((oSn,Fq)=>{function BZe(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}Fq.exports=BZe});var Nq=pt((aSn,Rq)=>{var RZe=q1(),NZe="__lodash_hash_undefined__",LZe=Object.prototype,VZe=LZe.hasOwnProperty;function qZe(e){var o=this.__data__;if(RZe){var t=o[e];return t===NZe?void 0:t}return VZe.call(o,e)?o[e]:void 0}Rq.exports=qZe});var Vq=pt((rSn,Lq)=>{var zZe=q1(),HZe=Object.prototype,GZe=HZe.hasOwnProperty;function jZe(e){var o=this.__data__;return zZe?o[e]!==void 0:GZe.call(o,e)}Lq.exports=jZe});var zq=pt((lSn,qq)=>{var $Ze=q1(),UZe="__lodash_hash_undefined__";function WZe(e,o){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=$Ze&&o===void 0?UZe:o,this}qq.exports=WZe});var Gq=pt((sSn,Hq)=>{var QZe=kq(),YZe=Bq(),KZe=Nq(),JZe=Vq(),XZe=zq();function Su(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var jq=Gq(),ZZe=L1(),eet=Yb();function tet(){this.size=0,this.__data__={hash:new jq,map:new(eet||ZZe),string:new jq}}$q.exports=tet});var Qq=pt((pSn,Wq)=>{function iet(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}Wq.exports=iet});var z1=pt((mSn,Yq)=>{var net=Qq();function oet(e,o){var t=e.__data__;return net(o)?t[typeof o=="string"?"string":"hash"]:t.map}Yq.exports=oet});var Jq=pt((dSn,Kq)=>{var aet=z1();function ret(e){var o=aet(this,e).delete(e);return this.size-=o?1:0,o}Kq.exports=ret});var Zq=pt((uSn,Xq)=>{var set=z1();function cet(e){return set(this,e).get(e)}Xq.exports=cet});var tz=pt((fSn,ez)=>{var pet=z1();function met(e){return pet(this,e).has(e)}ez.exports=met});var nz=pt((hSn,iz)=>{var det=z1();function uet(e,o){var t=det(this,e),n=t.size;return t.set(e,o),this.size+=t.size==n?0:1,this}iz.exports=uet});var Kb=pt((gSn,oz)=>{var fet=Uq(),het=Jq(),get=Zq(),_et=tz(),Cet=nz();function Pu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var vet=L1(),xet=Yb(),bet=Kb(),yet=200;function Pet(e,o){var t=this.__data__;if(t instanceof vet){var n=t.__data__;if(!xet||n.length{var wet=L1(),Tet=JV(),Met=ZV(),Det=tq(),Eet=nq(),Iet=rz();function wu(e){var o=this.__data__=new wet(e);this.size=o.size}wu.prototype.clear=Tet;wu.prototype.delete=Met;wu.prototype.get=Det;wu.prototype.has=Eet;wu.prototype.set=Iet;lz.exports=wu});var Jb=pt((vSn,sz)=>{function Oet(e,o){for(var t=-1,n=e==null?0:e.length;++t{var Aet=mm(),ket=(function(){try{var e=Aet(Object,"defineProperty");return e({},"",{}),e}catch{}})();cz.exports=ket});var G1=pt((bSn,mz)=>{var pz=WD();function Fet(e,o,t){o=="__proto__"&&pz?pz(e,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[o]=t}mz.exports=Fet});var j1=pt((ySn,dz)=>{var Bet=G1(),Ret=Jd(),Net=Object.prototype,Let=Net.hasOwnProperty;function Vet(e,o,t){var n=e[o];(!(Let.call(e,o)&&Ret(n,t))||t===void 0&&!(o in e))&&Bet(e,o,t)}dz.exports=Vet});var Tu=pt((SSn,uz)=>{var qet=j1(),zet=G1();function Het(e,o,t,n){var i=!t;t||(t={});for(var s=-1,d=o.length;++s{function Get(e,o){for(var t=-1,n=Array(e);++t{function jet(e){return e!=null&&typeof e=="object"}gz.exports=jet});var Cz=pt((TSn,_z)=>{var $et=pm(),Uet=Qs(),Wet="[object Arguments]";function Qet(e){return Uet(e)&&$et(e)==Wet}_z.exports=Qet});var Mu=pt((MSn,bz)=>{var vz=Cz(),Yet=Qs(),xz=Object.prototype,Ket=xz.hasOwnProperty,Jet=xz.propertyIsEnumerable,Xet=vz((function(){return arguments})())?vz:function(e){return Yet(e)&&Ket.call(e,"callee")&&!Jet.call(e,"callee")};bz.exports=Xet});var Xa=pt((DSn,yz)=>{var Zet=Array.isArray;yz.exports=Zet});var Pz=pt((ESn,Sz)=>{function ett(){return!1}Sz.exports=ett});var Zd=pt(($1,Du)=>{var ttt=xs(),itt=Pz(),Mz=typeof $1=="object"&&$1&&!$1.nodeType&&$1,wz=Mz&&typeof Du=="object"&&Du&&!Du.nodeType&&Du,ntt=wz&&wz.exports===Mz,Tz=ntt?ttt.Buffer:void 0,ott=Tz?Tz.isBuffer:void 0,att=ott||itt;Du.exports=att});var U1=pt((ISn,Dz)=>{var rtt=9007199254740991,ltt=/^(?:0|[1-9]\d*)$/;function stt(e,o){var t=typeof e;return o=o??rtt,!!o&&(t=="number"||t!="symbol"&<t.test(e))&&e>-1&&e%1==0&&e{var ctt=9007199254740991;function ptt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ctt}Ez.exports=ptt});var Oz=pt((ASn,Iz)=>{var mtt=pm(),dtt=Xb(),utt=Qs(),ftt="[object Arguments]",htt="[object Array]",gtt="[object Boolean]",_tt="[object Date]",Ctt="[object Error]",vtt="[object Function]",xtt="[object Map]",btt="[object Number]",ytt="[object Object]",Stt="[object RegExp]",Ptt="[object Set]",wtt="[object String]",Ttt="[object WeakMap]",Mtt="[object ArrayBuffer]",Dtt="[object DataView]",Ett="[object Float32Array]",Itt="[object Float64Array]",Ott="[object Int8Array]",Att="[object Int16Array]",ktt="[object Int32Array]",Ftt="[object Uint8Array]",Btt="[object Uint8ClampedArray]",Rtt="[object Uint16Array]",Ntt="[object Uint32Array]",Da={};Da[Ett]=Da[Itt]=Da[Ott]=Da[Att]=Da[ktt]=Da[Ftt]=Da[Btt]=Da[Rtt]=Da[Ntt]=!0;Da[ftt]=Da[htt]=Da[Mtt]=Da[gtt]=Da[Dtt]=Da[_tt]=Da[Ctt]=Da[vtt]=Da[xtt]=Da[btt]=Da[ytt]=Da[Stt]=Da[Ptt]=Da[wtt]=Da[Ttt]=!1;function Ltt(e){return utt(e)&&dtt(e.length)&&!!Da[mtt(e)]}Iz.exports=Ltt});var W1=pt((kSn,Az)=>{function Vtt(e){return function(o){return e(o)}}Az.exports=Vtt});var Zb=pt((Q1,Eu)=>{var qtt=jD(),kz=typeof Q1=="object"&&Q1&&!Q1.nodeType&&Q1,Y1=kz&&typeof Eu=="object"&&Eu&&!Eu.nodeType&&Eu,ztt=Y1&&Y1.exports===kz,QD=ztt&&qtt.process,Htt=(function(){try{var e=Y1&&Y1.require&&Y1.require("util").types;return e||QD&&QD.binding&&QD.binding("util")}catch{}})();Eu.exports=Htt});var Iu=pt((FSn,Rz)=>{var Gtt=Oz(),jtt=W1(),Fz=Zb(),Bz=Fz&&Fz.isTypedArray,$tt=Bz?jtt(Bz):Gtt;Rz.exports=$tt});var YD=pt((BSn,Nz)=>{var Utt=hz(),Wtt=Mu(),Qtt=Xa(),Ytt=Zd(),Ktt=U1(),Jtt=Iu(),Xtt=Object.prototype,Ztt=Xtt.hasOwnProperty;function eit(e,o){var t=Qtt(e),n=!t&&Wtt(e),i=!t&&!n&&Ytt(e),s=!t&&!n&&!i&&Jtt(e),d=t||n||i||s,u=d?Utt(e.length,String):[],f=u.length;for(var _ in e)(o||Ztt.call(e,_))&&!(d&&(_=="length"||i&&(_=="offset"||_=="parent")||s&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||Ktt(_,f)))&&u.push(_);return u}Nz.exports=eit});var K1=pt((RSn,Lz)=>{var tit=Object.prototype;function iit(e){var o=e&&e.constructor,t=typeof o=="function"&&o.prototype||tit;return e===t}Lz.exports=iit});var KD=pt((NSn,Vz)=>{function nit(e,o){return function(t){return e(o(t))}}Vz.exports=nit});var zz=pt((LSn,qz)=>{var oit=KD(),ait=oit(Object.keys,Object);qz.exports=ait});var ey=pt((VSn,Hz)=>{var rit=K1(),lit=zz(),sit=Object.prototype,cit=sit.hasOwnProperty;function pit(e){if(!rit(e))return lit(e);var o=[];for(var t in Object(e))cit.call(e,t)&&t!="constructor"&&o.push(t);return o}Hz.exports=pit});var Dc=pt((qSn,Gz)=>{var mit=yu(),dit=Xb();function uit(e){return e!=null&&dit(e.length)&&!mit(e)}Gz.exports=uit});var cp=pt((zSn,jz)=>{var fit=YD(),hit=ey(),git=Dc();function _it(e){return git(e)?fit(e):hit(e)}jz.exports=_it});var Uz=pt((HSn,$z)=>{var Cit=Tu(),vit=cp();function xit(e,o){return e&&Cit(o,vit(o),e)}$z.exports=xit});var Qz=pt((GSn,Wz)=>{function bit(e){var o=[];if(e!=null)for(var t in Object(e))o.push(t);return o}Wz.exports=bit});var Kz=pt((jSn,Yz)=>{var yit=$l(),Sit=K1(),Pit=Qz(),wit=Object.prototype,Tit=wit.hasOwnProperty;function Mit(e){if(!yit(e))return Pit(e);var o=Sit(e),t=[];for(var n in e)n=="constructor"&&(o||!Tit.call(e,n))||t.push(n);return t}Yz.exports=Mit});var dm=pt(($Sn,Jz)=>{var Dit=YD(),Eit=Kz(),Iit=Dc();function Oit(e){return Iit(e)?Dit(e,!0):Eit(e)}Jz.exports=Oit});var Zz=pt((USn,Xz)=>{var Ait=Tu(),kit=dm();function Fit(e,o){return e&&Ait(o,kit(o),e)}Xz.exports=Fit});var JD=pt((J1,Ou)=>{var Bit=xs(),nH=typeof J1=="object"&&J1&&!J1.nodeType&&J1,eH=nH&&typeof Ou=="object"&&Ou&&!Ou.nodeType&&Ou,Rit=eH&&eH.exports===nH,tH=Rit?Bit.Buffer:void 0,iH=tH?tH.allocUnsafe:void 0;function Nit(e,o){if(o)return e.slice();var t=e.length,n=iH?iH(t):new e.constructor(t);return e.copy(n),n}Ou.exports=Nit});var XD=pt((WSn,oH)=>{function Lit(e,o){var t=-1,n=e.length;for(o||(o=Array(n));++t{function Vit(e,o){for(var t=-1,n=e==null?0:e.length,i=0,s=[];++t{function qit(){return[]}rH.exports=qit});var ty=pt((KSn,sH)=>{var zit=ZD(),Hit=eE(),Git=Object.prototype,jit=Git.propertyIsEnumerable,lH=Object.getOwnPropertySymbols,$it=lH?function(e){return e==null?[]:(e=Object(e),zit(lH(e),function(o){return jit.call(e,o)}))}:Hit;sH.exports=$it});var pH=pt((JSn,cH)=>{var Uit=Tu(),Wit=ty();function Qit(e,o){return Uit(e,Wit(e),o)}cH.exports=Qit});var iy=pt((XSn,mH)=>{function Yit(e,o){for(var t=-1,n=o.length,i=e.length;++t{var Kit=KD(),Jit=Kit(Object.getPrototypeOf,Object);dH.exports=Jit});var tE=pt((ePn,uH)=>{var Xit=iy(),Zit=X1(),ent=ty(),tnt=eE(),int=Object.getOwnPropertySymbols,nnt=int?function(e){for(var o=[];e;)Xit(o,ent(e)),e=Zit(e);return o}:tnt;uH.exports=nnt});var hH=pt((tPn,fH)=>{var ont=Tu(),ant=tE();function rnt(e,o){return ont(e,ant(e),o)}fH.exports=rnt});var iE=pt((iPn,gH)=>{var lnt=iy(),snt=Xa();function cnt(e,o,t){var n=o(e);return snt(e)?n:lnt(n,t(e))}gH.exports=cnt});var nE=pt((nPn,_H)=>{var pnt=iE(),mnt=ty(),dnt=cp();function unt(e){return pnt(e,dnt,mnt)}_H.exports=unt});var vH=pt((oPn,CH)=>{var fnt=iE(),hnt=tE(),gnt=dm();function _nt(e){return fnt(e,gnt,hnt)}CH.exports=_nt});var bH=pt((aPn,xH)=>{var Cnt=mm(),vnt=xs(),xnt=Cnt(vnt,"DataView");xH.exports=xnt});var SH=pt((rPn,yH)=>{var bnt=mm(),ynt=xs(),Snt=bnt(ynt,"Promise");yH.exports=Snt});var oE=pt((lPn,PH)=>{var Pnt=mm(),wnt=xs(),Tnt=Pnt(wnt,"Set");PH.exports=Tnt});var TH=pt((sPn,wH)=>{var Mnt=mm(),Dnt=xs(),Ent=Mnt(Dnt,"WeakMap");wH.exports=Ent});var t0=pt((cPn,kH)=>{var aE=bH(),rE=Yb(),lE=SH(),sE=oE(),cE=TH(),AH=pm(),Au=UD(),MH="[object Map]",Int="[object Object]",DH="[object Promise]",EH="[object Set]",IH="[object WeakMap]",OH="[object DataView]",Ont=Au(aE),Ant=Au(rE),knt=Au(lE),Fnt=Au(sE),Bnt=Au(cE),e0=AH;(aE&&e0(new aE(new ArrayBuffer(1)))!=OH||rE&&e0(new rE)!=MH||lE&&e0(lE.resolve())!=DH||sE&&e0(new sE)!=EH||cE&&e0(new cE)!=IH)&&(e0=function(e){var o=AH(e),t=o==Int?e.constructor:void 0,n=t?Au(t):"";if(n)switch(n){case Ont:return OH;case Ant:return MH;case knt:return DH;case Fnt:return EH;case Bnt:return IH}return o});kH.exports=e0});var BH=pt((pPn,FH)=>{var Rnt=Object.prototype,Nnt=Rnt.hasOwnProperty;function Lnt(e){var o=e.length,t=new e.constructor(o);return o&&typeof e[0]=="string"&&Nnt.call(e,"index")&&(t.index=e.index,t.input=e.input),t}FH.exports=Lnt});var pE=pt((mPn,RH)=>{var Vnt=xs(),qnt=Vnt.Uint8Array;RH.exports=qnt});var ny=pt((dPn,LH)=>{var NH=pE();function znt(e){var o=new e.constructor(e.byteLength);return new NH(o).set(new NH(e)),o}LH.exports=znt});var qH=pt((uPn,VH)=>{var Hnt=ny();function Gnt(e,o){var t=o?Hnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}VH.exports=Gnt});var HH=pt((fPn,zH)=>{var jnt=/\w*$/;function $nt(e){var o=new e.constructor(e.source,jnt.exec(e));return o.lastIndex=e.lastIndex,o}zH.exports=$nt});var WH=pt((hPn,UH)=>{var GH=Xd(),jH=GH?GH.prototype:void 0,$H=jH?jH.valueOf:void 0;function Unt(e){return $H?Object($H.call(e)):{}}UH.exports=Unt});var mE=pt((gPn,QH)=>{var Wnt=ny();function Qnt(e,o){var t=o?Wnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}QH.exports=Qnt});var KH=pt((_Pn,YH)=>{var Ynt=ny(),Knt=qH(),Jnt=HH(),Xnt=WH(),Znt=mE(),eot="[object Boolean]",tot="[object Date]",iot="[object Map]",not="[object Number]",oot="[object RegExp]",aot="[object Set]",rot="[object String]",lot="[object Symbol]",sot="[object ArrayBuffer]",cot="[object DataView]",pot="[object Float32Array]",mot="[object Float64Array]",dot="[object Int8Array]",uot="[object Int16Array]",fot="[object Int32Array]",hot="[object Uint8Array]",got="[object Uint8ClampedArray]",_ot="[object Uint16Array]",Cot="[object Uint32Array]";function vot(e,o,t){var n=e.constructor;switch(o){case sot:return Ynt(e);case eot:case tot:return new n(+e);case cot:return Knt(e,t);case pot:case mot:case dot:case uot:case fot:case hot:case got:case _ot:case Cot:return Znt(e,t);case iot:return new n;case not:case rot:return new n(e);case oot:return Jnt(e);case aot:return new n;case lot:return Xnt(e)}}YH.exports=vot});var dE=pt((CPn,XH)=>{var xot=$l(),JH=Object.create,bot=(function(){function e(){}return function(o){if(!xot(o))return{};if(JH)return JH(o);e.prototype=o;var t=new e;return e.prototype=void 0,t}})();XH.exports=bot});var uE=pt((vPn,ZH)=>{var yot=dE(),Sot=X1(),Pot=K1();function wot(e){return typeof e.constructor=="function"&&!Pot(e)?yot(Sot(e)):{}}ZH.exports=wot});var tG=pt((xPn,eG)=>{var Tot=t0(),Mot=Qs(),Dot="[object Map]";function Eot(e){return Mot(e)&&Tot(e)==Dot}eG.exports=Eot});var aG=pt((bPn,oG)=>{var Iot=tG(),Oot=W1(),iG=Zb(),nG=iG&&iG.isMap,Aot=nG?Oot(nG):Iot;oG.exports=Aot});var lG=pt((yPn,rG)=>{var kot=t0(),Fot=Qs(),Bot="[object Set]";function Rot(e){return Fot(e)&&kot(e)==Bot}rG.exports=Rot});var mG=pt((SPn,pG)=>{var Not=lG(),Lot=W1(),sG=Zb(),cG=sG&&sG.isSet,Vot=cG?Lot(cG):Not;pG.exports=Vot});var fE=pt((PPn,hG)=>{var qot=H1(),zot=Jb(),Hot=j1(),Got=Uz(),jot=Zz(),$ot=JD(),Uot=XD(),Wot=pH(),Qot=hH(),Yot=nE(),Kot=vH(),Jot=t0(),Xot=BH(),Zot=KH(),eat=uE(),tat=Xa(),iat=Zd(),nat=aG(),oat=$l(),aat=mG(),rat=cp(),lat=dm(),sat=1,cat=2,pat=4,dG="[object Arguments]",mat="[object Array]",dat="[object Boolean]",uat="[object Date]",fat="[object Error]",uG="[object Function]",hat="[object GeneratorFunction]",gat="[object Map]",_at="[object Number]",fG="[object Object]",Cat="[object RegExp]",vat="[object Set]",xat="[object String]",bat="[object Symbol]",yat="[object WeakMap]",Sat="[object ArrayBuffer]",Pat="[object DataView]",wat="[object Float32Array]",Tat="[object Float64Array]",Mat="[object Int8Array]",Dat="[object Int16Array]",Eat="[object Int32Array]",Iat="[object Uint8Array]",Oat="[object Uint8ClampedArray]",Aat="[object Uint16Array]",kat="[object Uint32Array]",Pa={};Pa[dG]=Pa[mat]=Pa[Sat]=Pa[Pat]=Pa[dat]=Pa[uat]=Pa[wat]=Pa[Tat]=Pa[Mat]=Pa[Dat]=Pa[Eat]=Pa[gat]=Pa[_at]=Pa[fG]=Pa[Cat]=Pa[vat]=Pa[xat]=Pa[bat]=Pa[Iat]=Pa[Oat]=Pa[Aat]=Pa[kat]=!0;Pa[fat]=Pa[uG]=Pa[yat]=!1;function oy(e,o,t,n,i,s){var d,u=o&sat,f=o&cat,_=o&pat;if(t&&(d=i?t(e,n,i,s):t(e)),d!==void 0)return d;if(!oat(e))return e;var C=tat(e);if(C){if(d=Xot(e),!u)return Uot(e,d)}else{var x=Jot(e),y=x==uG||x==hat;if(iat(e))return $ot(e,u);if(x==fG||x==dG||y&&!i){if(d=f||y?{}:eat(e),!u)return f?Qot(e,jot(d,e)):Wot(e,Got(d,e))}else{if(!Pa[x])return i?e:{};d=Zot(e,x,u)}}s||(s=new qot);var w=s.get(e);if(w)return w;s.set(e,d),aat(e)?e.forEach(function(D){d.add(oy(D,o,t,D,e,s))}):nat(e)&&e.forEach(function(D,F){d.set(F,oy(D,o,t,F,e,s))});var P=_?f?Kot:Yot:f?lat:rat,M=C?void 0:P(e);return zot(M||e,function(D,F){M&&(F=D,D=e[F]),Hot(d,F,oy(D,o,t,F,e,s))}),d}hG.exports=oy});var _G=pt((wPn,gG)=>{var Fat=fE(),Bat=4;function Rat(e){return Fat(e,Bat)}gG.exports=Rat});var ay=pt((TPn,CG)=>{function Nat(e){return function(){return e}}CG.exports=Nat});var xG=pt((MPn,vG)=>{function Lat(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}}vG.exports=Lat});var ry=pt((DPn,bG)=>{var Vat=xG(),qat=Vat();bG.exports=qat});var ly=pt((EPn,yG)=>{var zat=ry(),Hat=cp();function Gat(e,o){return e&&zat(e,o,Hat)}yG.exports=Gat});var PG=pt((IPn,SG)=>{var jat=Dc();function $at(e,o){return function(t,n){if(t==null)return t;if(!jat(t))return e(t,n);for(var i=t.length,s=o?i:-1,d=Object(t);(o?s--:++s{var Uat=ly(),Wat=PG(),Qat=Wat(Uat);wG.exports=Qat});var um=pt((APn,TG)=>{function Yat(e){return e}TG.exports=Yat});var hE=pt((kPn,MG)=>{var Kat=um();function Jat(e){return typeof e=="function"?e:Kat}MG.exports=Jat});var gE=pt((FPn,DG)=>{var Xat=Jb(),Zat=Z1(),ert=hE(),trt=Xa();function irt(e,o){var t=trt(e)?Xat:Zat;return t(e,ert(o))}DG.exports=irt});var _E=pt((BPn,EG)=>{EG.exports=gE()});var OG=pt((RPn,IG)=>{var nrt=Z1();function ort(e,o){var t=[];return nrt(e,function(n,i,s){o(n,i,s)&&t.push(n)}),t}IG.exports=ort});var kG=pt((NPn,AG)=>{var art="__lodash_hash_undefined__";function rrt(e){return this.__data__.set(e,art),this}AG.exports=rrt});var BG=pt((LPn,FG)=>{function lrt(e){return this.__data__.has(e)}FG.exports=lrt});var CE=pt((VPn,RG)=>{var srt=Kb(),crt=kG(),prt=BG();function sy(e){var o=-1,t=e==null?0:e.length;for(this.__data__=new srt;++o{function mrt(e,o){for(var t=-1,n=e==null?0:e.length;++t{function drt(e,o){return e.has(o)}VG.exports=drt});var xE=pt((HPn,qG)=>{var urt=CE(),frt=LG(),hrt=vE(),grt=1,_rt=2;function Crt(e,o,t,n,i,s){var d=t&grt,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,w=t&_rt?new urt:void 0;for(s.set(e,o),s.set(o,e);++x{function vrt(e){var o=-1,t=Array(e.size);return e.forEach(function(n,i){t[++o]=[i,n]}),t}zG.exports=vrt});var cy=pt((jPn,GG)=>{function xrt(e){var o=-1,t=Array(e.size);return e.forEach(function(n){t[++o]=n}),t}GG.exports=xrt});var QG=pt(($Pn,WG)=>{var jG=Xd(),$G=pE(),brt=Jd(),yrt=xE(),Srt=HG(),Prt=cy(),wrt=1,Trt=2,Mrt="[object Boolean]",Drt="[object Date]",Ert="[object Error]",Irt="[object Map]",Ort="[object Number]",Art="[object RegExp]",krt="[object Set]",Frt="[object String]",Brt="[object Symbol]",Rrt="[object ArrayBuffer]",Nrt="[object DataView]",UG=jG?jG.prototype:void 0,bE=UG?UG.valueOf:void 0;function Lrt(e,o,t,n,i,s,d){switch(t){case Nrt:if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case Rrt:return!(e.byteLength!=o.byteLength||!s(new $G(e),new $G(o)));case Mrt:case Drt:case Ort:return brt(+e,+o);case Ert:return e.name==o.name&&e.message==o.message;case Art:case Frt:return e==o+"";case Irt:var u=Srt;case krt:var f=n&wrt;if(u||(u=Prt),e.size!=o.size&&!f)return!1;var _=d.get(e);if(_)return _==o;n|=Trt,d.set(e,o);var C=yrt(u(e),u(o),n,i,s,d);return d.delete(e),C;case Brt:if(bE)return bE.call(e)==bE.call(o)}return!1}WG.exports=Lrt});var JG=pt((UPn,KG)=>{var YG=nE(),Vrt=1,qrt=Object.prototype,zrt=qrt.hasOwnProperty;function Hrt(e,o,t,n,i,s){var d=t&Vrt,u=YG(e),f=u.length,_=YG(o),C=_.length;if(f!=C&&!d)return!1;for(var x=f;x--;){var y=u[x];if(!(d?y in o:zrt.call(o,y)))return!1}var w=s.get(e),P=s.get(o);if(w&&P)return w==o&&P==e;var M=!0;s.set(e,o),s.set(o,e);for(var D=d;++x{var yE=H1(),Grt=xE(),jrt=QG(),$rt=JG(),XG=t0(),ZG=Xa(),ej=Zd(),Urt=Iu(),Wrt=1,tj="[object Arguments]",ij="[object Array]",py="[object Object]",Qrt=Object.prototype,nj=Qrt.hasOwnProperty;function Yrt(e,o,t,n,i,s){var d=ZG(e),u=ZG(o),f=d?ij:XG(e),_=u?ij:XG(o);f=f==tj?py:f,_=_==tj?py:_;var C=f==py,x=_==py,y=f==_;if(y&&ej(e)){if(!ej(o))return!1;d=!0,C=!1}if(y&&!C)return s||(s=new yE),d||Urt(e)?Grt(e,o,t,n,i,s):jrt(e,o,f,t,n,i,s);if(!(t&Wrt)){var w=C&&nj.call(e,"__wrapped__"),P=x&&nj.call(o,"__wrapped__");if(w||P){var M=w?e.value():e,D=P?o.value():o;return s||(s=new yE),i(M,D,t,n,s)}}return y?(s||(s=new yE),$rt(e,o,t,n,i,s)):!1}oj.exports=Yrt});var SE=pt((QPn,sj)=>{var Krt=aj(),rj=Qs();function lj(e,o,t,n,i){return e===o?!0:e==null||o==null||!rj(e)&&!rj(o)?e!==e&&o!==o:Krt(e,o,t,n,lj,i)}sj.exports=lj});var pj=pt((YPn,cj)=>{var Jrt=H1(),Xrt=SE(),Zrt=1,elt=2;function tlt(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 ilt=$l();function nlt(e){return e===e&&!ilt(e)}mj.exports=nlt});var uj=pt((JPn,dj)=>{var olt=PE(),alt=cp();function rlt(e){for(var o=alt(e),t=o.length;t--;){var n=o[t],i=e[n];o[t]=[n,i,olt(i)]}return o}dj.exports=rlt});var wE=pt((XPn,fj)=>{function llt(e,o){return function(t){return t==null?!1:t[e]===o&&(o!==void 0||e in Object(t))}}fj.exports=llt});var gj=pt((ZPn,hj)=>{var slt=pj(),clt=uj(),plt=wE();function mlt(e){var o=clt(e);return o.length==1&&o[0][2]?plt(o[0][0],o[0][1]):function(t){return t===e||slt(t,e,o)}}hj.exports=mlt});var i0=pt((ewn,_j)=>{var dlt=pm(),ult=Qs(),flt="[object Symbol]";function hlt(e){return typeof e=="symbol"||ult(e)&&dlt(e)==flt}_j.exports=hlt});var my=pt((twn,Cj)=>{var glt=Xa(),_lt=i0(),Clt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vlt=/^\w*$/;function xlt(e,o){if(glt(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||_lt(e)?!0:vlt.test(e)||!Clt.test(e)||o!=null&&e in Object(o)}Cj.exports=xlt});var bj=pt((iwn,xj)=>{var vj=Kb(),blt="Expected a function";function TE(e,o){if(typeof e!="function"||o!=null&&typeof o!="function")throw new TypeError(blt);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(TE.Cache||vj),t}TE.Cache=vj;xj.exports=TE});var Sj=pt((nwn,yj)=>{var ylt=bj(),Slt=500;function Plt(e){var o=ylt(e,function(n){return t.size===Slt&&t.clear(),n}),t=o.cache;return o}yj.exports=Plt});var wj=pt((own,Pj)=>{var wlt=Sj(),Tlt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mlt=/\\(\\)?/g,Dlt=wlt(function(e){var o=[];return e.charCodeAt(0)===46&&o.push(""),e.replace(Tlt,function(t,n,i,s){o.push(i?s.replace(Mlt,"$1"):n||t)}),o});Pj.exports=Dlt});var eh=pt((awn,Tj)=>{function Elt(e,o){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t{var Mj=Xd(),Ilt=eh(),Olt=Xa(),Alt=i0(),klt=1/0,Dj=Mj?Mj.prototype:void 0,Ej=Dj?Dj.toString:void 0;function Ij(e){if(typeof e=="string")return e;if(Olt(e))return Ilt(e,Ij)+"";if(Alt(e))return Ej?Ej.call(e):"";var o=e+"";return o=="0"&&1/e==-klt?"-0":o}Oj.exports=Ij});var ME=pt((lwn,kj)=>{var Flt=Aj();function Blt(e){return e==null?"":Flt(e)}kj.exports=Blt});var th=pt((swn,Fj)=>{var Rlt=Xa(),Nlt=my(),Llt=wj(),Vlt=ME();function qlt(e,o){return Rlt(e)?e:Nlt(e,o)?[e]:Llt(Vlt(e))}Fj.exports=qlt});var ku=pt((cwn,Bj)=>{var zlt=i0(),Hlt=1/0;function Glt(e){if(typeof e=="string"||zlt(e))return e;var o=e+"";return o=="0"&&1/e==-Hlt?"-0":o}Bj.exports=Glt});var ih=pt((pwn,Rj)=>{var jlt=th(),$lt=ku();function Ult(e,o){o=jlt(o,e);for(var t=0,n=o.length;e!=null&&t{var Wlt=ih();function Qlt(e,o,t){var n=e==null?void 0:Wlt(e,o);return n===void 0?t:n}Nj.exports=Qlt});var qj=pt((dwn,Vj)=>{function Ylt(e,o){return e!=null&&o in Object(e)}Vj.exports=Ylt});var DE=pt((uwn,zj)=>{var Klt=th(),Jlt=Mu(),Xlt=Xa(),Zlt=U1(),est=Xb(),tst=ku();function ist(e,o,t){o=Klt(o,e);for(var n=-1,i=o.length,s=!1;++n{var nst=qj(),ost=DE();function ast(e,o){return e!=null&&ost(e,o,nst)}Hj.exports=ast});var jj=pt((hwn,Gj)=>{var rst=SE(),lst=Lj(),sst=EE(),cst=my(),pst=PE(),mst=wE(),dst=ku(),ust=1,fst=2;function hst(e,o){return cst(e)&&pst(o)?mst(dst(e),o):function(t){var n=lst(t,e);return n===void 0&&n===o?sst(t,e):rst(o,n,ust|fst)}}Gj.exports=hst});var IE=pt((gwn,$j)=>{function gst(e){return function(o){return o?.[e]}}$j.exports=gst});var Wj=pt((_wn,Uj)=>{var _st=ih();function Cst(e){return function(o){return _st(o,e)}}Uj.exports=Cst});var Yj=pt((Cwn,Qj)=>{var vst=IE(),xst=Wj(),bst=my(),yst=ku();function Sst(e){return bst(e)?vst(yst(e)):xst(e)}Qj.exports=Sst});var Ec=pt((vwn,Kj)=>{var Pst=gj(),wst=jj(),Tst=um(),Mst=Xa(),Dst=Yj();function Est(e){return typeof e=="function"?e:e==null?Tst:typeof e=="object"?Mst(e)?wst(e[0],e[1]):Pst(e):Dst(e)}Kj.exports=Est});var OE=pt((xwn,Jj)=>{var Ist=ZD(),Ost=OG(),Ast=Ec(),kst=Xa();function Fst(e,o){var t=kst(e)?Ist:Ost;return t(e,Ast(o,3))}Jj.exports=Fst});var Zj=pt((bwn,Xj)=>{var Bst=Object.prototype,Rst=Bst.hasOwnProperty;function Nst(e,o){return e!=null&&Rst.call(e,o)}Xj.exports=Nst});var AE=pt((ywn,e$)=>{var Lst=Zj(),Vst=DE();function qst(e,o){return e!=null&&Vst(e,o,Lst)}e$.exports=qst});var i$=pt((Swn,t$)=>{var zst=ey(),Hst=t0(),Gst=Mu(),jst=Xa(),$st=Dc(),Ust=Zd(),Wst=K1(),Qst=Iu(),Yst="[object Map]",Kst="[object Set]",Jst=Object.prototype,Xst=Jst.hasOwnProperty;function Zst(e){if(e==null)return!0;if($st(e)&&(jst(e)||typeof e=="string"||typeof e.splice=="function"||Ust(e)||Qst(e)||Gst(e)))return!e.length;var o=Hst(e);if(o==Yst||o==Kst)return!e.size;if(Wst(e))return!zst(e).length;for(var t in e)if(Xst.call(e,t))return!1;return!0}t$.exports=Zst});var kE=pt((Pwn,n$)=>{function ect(e){return e===void 0}n$.exports=ect});var FE=pt((wwn,o$)=>{var tct=Z1(),ict=Dc();function nct(e,o){var t=-1,n=ict(e)?Array(e.length):[];return tct(e,function(i,s,d){n[++t]=o(i,s,d)}),n}o$.exports=nct});var BE=pt((Twn,a$)=>{var oct=eh(),act=Ec(),rct=FE(),lct=Xa();function sct(e,o){var t=lct(e)?oct:rct;return t(e,act(o,3))}a$.exports=sct});var l$=pt((Mwn,r$)=>{function cct(e,o,t,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(t=e[++i]);++i{function pct(e,o,t,n,i){return i(e,function(s,d,u){t=n?(n=!1,s):o(t,s,d,u)}),t}s$.exports=pct});var RE=pt((Ewn,p$)=>{var mct=l$(),dct=Z1(),uct=Ec(),fct=c$(),hct=Xa();function gct(e,o,t){var n=hct(e)?mct:fct,i=arguments.length<3;return n(e,uct(o,4),t,i,dct)}p$.exports=gct});var d$=pt((Iwn,m$)=>{var _ct=pm(),Cct=Xa(),vct=Qs(),xct="[object String]";function bct(e){return typeof e=="string"||!Cct(e)&&vct(e)&&_ct(e)==xct}m$.exports=bct});var f$=pt((Own,u$)=>{var yct=IE(),Sct=yct("length");u$.exports=Sct});var g$=pt((Awn,h$)=>{var Pct="\\ud800-\\udfff",wct="\\u0300-\\u036f",Tct="\\ufe20-\\ufe2f",Mct="\\u20d0-\\u20ff",Dct=wct+Tct+Mct,Ect="\\ufe0e\\ufe0f",Ict="\\u200d",Oct=RegExp("["+Ict+Pct+Dct+Ect+"]");function Act(e){return Oct.test(e)}h$.exports=Act});var w$=pt((kwn,P$)=>{var C$="\\ud800-\\udfff",kct="\\u0300-\\u036f",Fct="\\ufe20-\\ufe2f",Bct="\\u20d0-\\u20ff",Rct=kct+Fct+Bct,Nct="\\ufe0e\\ufe0f",Lct="["+C$+"]",NE="["+Rct+"]",LE="\\ud83c[\\udffb-\\udfff]",Vct="(?:"+NE+"|"+LE+")",v$="[^"+C$+"]",x$="(?:\\ud83c[\\udde6-\\uddff]){2}",b$="[\\ud800-\\udbff][\\udc00-\\udfff]",qct="\\u200d",y$=Vct+"?",S$="["+Nct+"]?",zct="(?:"+qct+"(?:"+[v$,x$,b$].join("|")+")"+S$+y$+")*",Hct=S$+y$+zct,Gct="(?:"+[v$+NE+"?",NE,x$,b$,Lct].join("|")+")",_$=RegExp(LE+"(?="+LE+")|"+Gct+Hct,"g");function jct(e){for(var o=_$.lastIndex=0;_$.test(e);)++o;return o}P$.exports=jct});var M$=pt((Fwn,T$)=>{var $ct=f$(),Uct=g$(),Wct=w$();function Qct(e){return Uct(e)?Wct(e):$ct(e)}T$.exports=Qct});var E$=pt((Bwn,D$)=>{var Yct=ey(),Kct=t0(),Jct=Dc(),Xct=d$(),Zct=M$(),ept="[object Map]",tpt="[object Set]";function ipt(e){if(e==null)return 0;if(Jct(e))return Xct(e)?Zct(e):e.length;var o=Kct(e);return o==ept||o==tpt?e.size:Yct(e).length}D$.exports=ipt});var O$=pt((Rwn,I$)=>{var npt=Jb(),opt=dE(),apt=ly(),rpt=Ec(),lpt=X1(),spt=Xa(),cpt=Zd(),ppt=yu(),mpt=$l(),dpt=Iu();function upt(e,o,t){var n=spt(e),i=n||cpt(e)||dpt(e);if(o=rpt(o,4),t==null){var s=e&&e.constructor;i?t=n?new s:[]:mpt(e)?t=ppt(s)?opt(lpt(e)):{}:t={}}return(i?npt:apt)(e,function(d,u,f){return o(t,d,u,f)}),t}I$.exports=upt});var B$=pt((Nwn,F$)=>{var A$=Xd(),fpt=Mu(),hpt=Xa(),k$=A$?A$.isConcatSpreadable:void 0;function gpt(e){return hpt(e)||fpt(e)||!!(k$&&e&&e[k$])}F$.exports=gpt});var dy=pt((Lwn,N$)=>{var _pt=iy(),Cpt=B$();function R$(e,o,t,n,i){var s=-1,d=e.length;for(t||(t=Cpt),i||(i=[]);++s0&&t(u)?o>1?R$(u,o-1,t,n,i):_pt(i,u):n||(i[i.length]=u)}return i}N$.exports=R$});var V$=pt((Vwn,L$)=>{function vpt(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)}L$.exports=vpt});var VE=pt((qwn,z$)=>{var xpt=V$(),q$=Math.max;function bpt(e,o,t){return o=q$(o===void 0?e.length-1:o,0),function(){for(var n=arguments,i=-1,s=q$(n.length-o,0),d=Array(s);++i{var ypt=ay(),H$=WD(),Spt=um(),Ppt=H$?function(e,o){return H$(e,"toString",{configurable:!0,enumerable:!1,value:ypt(o),writable:!0})}:Spt;G$.exports=Ppt});var U$=pt((Hwn,$$)=>{var wpt=800,Tpt=16,Mpt=Date.now;function Dpt(e){var o=0,t=0;return function(){var n=Mpt(),i=Tpt-(n-t);if(t=n,i>0){if(++o>=wpt)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}$$.exports=Dpt});var qE=pt((Gwn,W$)=>{var Ept=j$(),Ipt=U$(),Opt=Ipt(Ept);W$.exports=Opt});var nh=pt((jwn,Q$)=>{var Apt=um(),kpt=VE(),Fpt=qE();function Bpt(e,o){return Fpt(kpt(e,o,Apt),e+"")}Q$.exports=Bpt});var zE=pt(($wn,Y$)=>{function Rpt(e,o,t,n){for(var i=e.length,s=t+(n?1:-1);n?s--:++s{function Npt(e){return e!==e}K$.exports=Npt});var Z$=pt((Wwn,X$)=>{function Lpt(e,o,t){for(var n=t-1,i=e.length;++n{var Vpt=zE(),qpt=J$(),zpt=Z$();function Hpt(e,o,t){return o===o?zpt(e,o,t):Vpt(e,qpt,t)}eU.exports=Hpt});var nU=pt((Ywn,iU)=>{var Gpt=tU();function jpt(e,o){var t=e==null?0:e.length;return!!t&&Gpt(e,o,0)>-1}iU.exports=jpt});var aU=pt((Kwn,oU)=>{function $pt(e,o,t){for(var n=-1,i=e==null?0:e.length;++n{function Upt(){}rU.exports=Upt});var cU=pt((Xwn,sU)=>{var HE=oE(),Wpt=lU(),Qpt=cy(),Ypt=1/0,Kpt=HE&&1/Qpt(new HE([,-0]))[1]==Ypt?function(e){return new HE(e)}:Wpt;sU.exports=Kpt});var mU=pt((Zwn,pU)=>{var Jpt=CE(),Xpt=nU(),Zpt=aU(),emt=vE(),tmt=cU(),imt=cy(),nmt=200;function omt(e,o,t){var n=-1,i=Xpt,s=e.length,d=!0,u=[],f=u;if(t)d=!1,i=Zpt;else if(s>=nmt){var _=o?null:tmt(e);if(_)return imt(_);d=!1,i=emt,f=new Jpt}else f=o?[]:u;e:for(;++n{var amt=Dc(),rmt=Qs();function lmt(e){return rmt(e)&&amt(e)}dU.exports=lmt});var fU=pt((tTn,uU)=>{var smt=dy(),cmt=nh(),pmt=mU(),mmt=GE(),dmt=cmt(function(e){return pmt(smt(e,1,mmt,!0))});uU.exports=dmt});var gU=pt((iTn,hU)=>{var umt=eh();function fmt(e,o){return umt(o,function(t){return e[t]})}hU.exports=fmt});var jE=pt((nTn,_U)=>{var hmt=gU(),gmt=cp();function _mt(e){return e==null?[]:hmt(e,gmt(e))}_U.exports=_mt});var Ul=pt((oTn,CU)=>{var uy;if(typeof Fs=="function")try{uy={clone:_G(),constant:ay(),each:_E(),filter:OE(),has:AE(),isArray:Xa(),isEmpty:i$(),isFunction:yu(),isUndefined:kE(),keys:cp(),map:BE(),reduce:RE(),size:E$(),transform:O$(),union:fU(),values:jE()}}catch{}uy||(uy=window._);CU.exports=uy});var fy=pt((rTn,yU)=>{"use strict";var ro=Ul();yU.exports=Po;var Cmt="\0",n0="\0",vU="";function Po(e){this._isDirected=ro.has(e,"directed")?e.directed:!0,this._isMultigraph=ro.has(e,"multigraph")?e.multigraph:!1,this._isCompound=ro.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ro.constant(void 0),this._defaultEdgeLabelFn=ro.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n0]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Po.prototype._nodeCount=0;Po.prototype._edgeCount=0;Po.prototype.isDirected=function(){return this._isDirected};Po.prototype.isMultigraph=function(){return this._isMultigraph};Po.prototype.isCompound=function(){return this._isCompound};Po.prototype.setGraph=function(e){return this._label=e,this};Po.prototype.graph=function(){return this._label};Po.prototype.setDefaultNodeLabel=function(e){return ro.isFunction(e)||(e=ro.constant(e)),this._defaultNodeLabelFn=e,this};Po.prototype.nodeCount=function(){return this._nodeCount};Po.prototype.nodes=function(){return ro.keys(this._nodes)};Po.prototype.sources=function(){var e=this;return ro.filter(this.nodes(),function(o){return ro.isEmpty(e._in[o])})};Po.prototype.sinks=function(){var e=this;return ro.filter(this.nodes(),function(o){return ro.isEmpty(e._out[o])})};Po.prototype.setNodes=function(e,o){var t=arguments,n=this;return ro.each(e,function(i){t.length>1?n.setNode(i,o):n.setNode(i)}),this};Po.prototype.setNode=function(e,o){return ro.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]=n0,this._children[e]={},this._children[n0][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};Po.prototype.node=function(e){return this._nodes[e]};Po.prototype.hasNode=function(e){return ro.has(this._nodes,e)};Po.prototype.removeNode=function(e){var o=this;if(ro.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],ro.each(this.children(e),function(n){o.setParent(n)}),delete this._children[e]),ro.each(ro.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ro.each(ro.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};Po.prototype.setParent=function(e,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ro.isUndefined(o))o=n0;else{o+="";for(var t=o;!ro.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};Po.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};Po.prototype.parent=function(e){if(this._isCompound){var o=this._parent[e];if(o!==n0)return o}};Po.prototype.children=function(e){if(ro.isUndefined(e)&&(e=n0),this._isCompound){var o=this._children[e];if(o)return ro.keys(o)}else{if(e===n0)return this.nodes();if(this.hasNode(e))return[]}};Po.prototype.predecessors=function(e){var o=this._preds[e];if(o)return ro.keys(o)};Po.prototype.successors=function(e){var o=this._sucs[e];if(o)return ro.keys(o)};Po.prototype.neighbors=function(e){var o=this.predecessors(e);if(o)return ro.union(o,this.successors(e))};Po.prototype.isLeaf=function(e){var o;return this.isDirected()?o=this.successors(e):o=this.neighbors(e),o.length===0};Po.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;ro.each(this._nodes,function(s,d){e(d)&&o.setNode(d,s)}),ro.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&&ro.each(o.nodes(),function(s){o.setParent(s,i(s))}),o};Po.prototype.setDefaultEdgeLabel=function(e){return ro.isFunction(e)||(e=ro.constant(e)),this._defaultEdgeLabelFn=e,this};Po.prototype.edgeCount=function(){return this._edgeCount};Po.prototype.edges=function(){return ro.values(this._edgeObjs)};Po.prototype.setPath=function(e,o){var t=this,n=arguments;return ro.reduce(e,function(i,s){return n.length>1?t.setEdge(i,s,o):t.setEdge(i,s),s}),this};Po.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,ro.isUndefined(t)||(t=""+t);var d=oh(this._isDirected,e,o,t);if(ro.has(this._edgeLabels,d))return i&&(this._edgeLabels[d]=n),this;if(!ro.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=vmt(this._isDirected,e,o,t);return e=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,xU(this._preds[o],e),xU(this._sucs[e],o),this._in[o][d]=u,this._out[e][d]=u,this._edgeCount++,this};Po.prototype.edge=function(e,o,t){var n=arguments.length===1?$E(this._isDirected,arguments[0]):oh(this._isDirected,e,o,t);return this._edgeLabels[n]};Po.prototype.hasEdge=function(e,o,t){var n=arguments.length===1?$E(this._isDirected,arguments[0]):oh(this._isDirected,e,o,t);return ro.has(this._edgeLabels,n)};Po.prototype.removeEdge=function(e,o,t){var n=arguments.length===1?$E(this._isDirected,arguments[0]):oh(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],bU(this._preds[o],e),bU(this._sucs[e],o),delete this._in[o][n],delete this._out[e][n],this._edgeCount--),this};Po.prototype.inEdges=function(e,o){var t=this._in[e];if(t){var n=ro.values(t);return o?ro.filter(n,function(i){return i.v===o}):n}};Po.prototype.outEdges=function(e,o){var t=this._out[e];if(t){var n=ro.values(t);return o?ro.filter(n,function(i){return i.w===o}):n}};Po.prototype.nodeEdges=function(e,o){var t=this.inEdges(e,o);if(t)return t.concat(this.outEdges(e,o))};function xU(e,o){e[o]?e[o]++:e[o]=1}function bU(e,o){--e[o]||delete e[o]}function oh(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}return i+vU+s+vU+(ro.isUndefined(n)?Cmt:n)}function vmt(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 $E(e,o){return oh(e,o.v,o.w,o.name)}});var PU=pt((lTn,SU)=>{SU.exports="2.1.8"});var TU=pt((sTn,wU)=>{wU.exports={Graph:fy(),version:PU()}});var DU=pt((cTn,MU)=>{var Ic=Ul(),xmt=fy();MU.exports={write:bmt,read:Pmt};function bmt(e){var o={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ymt(e),edges:Smt(e)};return Ic.isUndefined(e.graph())||(o.value=Ic.clone(e.graph())),o}function ymt(e){return Ic.map(e.nodes(),function(o){var t=e.node(o),n=e.parent(o),i={v:o};return Ic.isUndefined(t)||(i.value=t),Ic.isUndefined(n)||(i.parent=n),i})}function Smt(e){return Ic.map(e.edges(),function(o){var t=e.edge(o),n={v:o.v,w:o.w};return Ic.isUndefined(o.name)||(n.name=o.name),Ic.isUndefined(t)||(n.value=t),n})}function Pmt(e){var o=new xmt(e.options).setGraph(e.value);return Ic.each(e.nodes,function(t){o.setNode(t.v,t.value),t.parent&&o.setParent(t.v,t.parent)}),Ic.each(e.edges,function(t){o.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),o}});var IU=pt((pTn,EU)=>{var hy=Ul();EU.exports=wmt;function wmt(e){var o={},t=[],n;function i(s){hy.has(o,s)||(o[s]=!0,n.push(s),hy.each(e.successors(s),i),hy.each(e.predecessors(s),i))}return hy.each(e.nodes(),function(s){n=[],i(s),n.length&&t.push(n)}),t}});var UE=pt((mTn,AU)=>{var OU=Ul();AU.exports=bs;function bs(){this._arr=[],this._keyIndices={}}bs.prototype.size=function(){return this._arr.length};bs.prototype.keys=function(){return this._arr.map(function(e){return e.key})};bs.prototype.has=function(e){return OU.has(this._keyIndices,e)};bs.prototype.priority=function(e){var o=this._keyIndices[e];if(o!==void 0)return this._arr[o].priority};bs.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};bs.prototype.add=function(e,o){var t=this._keyIndices;if(e=String(e),!OU.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};bs.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};bs.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)};bs.prototype._heapify=function(e){var o=this._arr,t=2*e,n=t+1,i=e;t>1,!(o[n].priority{var Tmt=Ul(),Mmt=UE();kU.exports=Emt;var Dmt=Tmt.constant(1);function Emt(e,o,t,n){return Imt(e,String(o),t||Dmt,n||function(i){return e.outEdges(i)})}function Imt(e,o,t,n){var i={},s=new Mmt,d,u,f=function(_){var C=_.v!==d?_.v:_.w,x=i[C],y=t(_),w=u.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+y);w0&&(d=s.removeMin(),u=i[d],u.distance!==Number.POSITIVE_INFINITY);)n(d).forEach(f);return i}});var BU=pt((uTn,FU)=>{var Omt=WE(),Amt=Ul();FU.exports=kmt;function kmt(e,o,t){return Amt.transform(e.nodes(),function(n,i){n[i]=Omt(e,i,o,t)},{})}});var QE=pt((fTn,NU)=>{var RU=Ul();NU.exports=Fmt;function Fmt(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){RU.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){RU.has(n,d)||s(d)}),i}});var VU=pt((hTn,LU)=>{var Bmt=Ul(),Rmt=QE();LU.exports=Nmt;function Nmt(e){return Bmt.filter(Rmt(e),function(o){return o.length>1||o.length===1&&e.hasEdge(o[0],o[0])})}});var zU=pt((gTn,qU)=>{var Lmt=Ul();qU.exports=qmt;var Vmt=Lmt.constant(1);function qmt(e,o,t){return zmt(e,o||Vmt,t||function(n){return e.outEdges(n)})}function zmt(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[_],w=C.distance+x.distance;w{var ah=Ul();GU.exports=HU;HU.CycleException=gy;function HU(e){var o={},t={},n=[];function i(s){if(ah.has(t,s))throw new gy;ah.has(o,s)||(t[s]=!0,o[s]=!0,ah.each(e.predecessors(s),i),delete t[s],n.push(s))}if(ah.each(e.sinks(),i),ah.size(o)!==e.nodeCount())throw new gy;return n}function gy(){}gy.prototype=new Error});var UU=pt((CTn,$U)=>{var jU=YE();$U.exports=Hmt;function Hmt(e){try{jU(e)}catch(o){if(o instanceof jU.CycleException)return!1;throw o}return!0}});var KE=pt((vTn,QU)=>{var _y=Ul();QU.exports=Gmt;function Gmt(e,o,t){_y.isArray(o)||(o=[o]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return _y.each(o,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);WU(e,d,t==="post",s,n,i)}),i}function WU(e,o,t,n,i,s){_y.has(n,o)||(n[o]=!0,t||s.push(o),_y.each(i(o),function(d){WU(e,d,t,n,i,s)}),t&&s.push(o))}});var KU=pt((xTn,YU)=>{var jmt=KE();YU.exports=$mt;function $mt(e,o){return jmt(e,o,"post")}});var XU=pt((bTn,JU)=>{var Umt=KE();JU.exports=Wmt;function Wmt(e,o){return Umt(e,o,"pre")}});var tW=pt((yTn,eW)=>{var ZU=Ul(),Qmt=fy(),Ymt=UE();eW.exports=Kmt;function Kmt(e,o){var t=new Qmt,n={},i=new Ymt,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(),ZU.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 nW=pt((STn,iW)=>{iW.exports={components:IU(),dijkstra:WE(),dijkstraAll:BU(),findCycles:VU(),floydWarshall:zU(),isAcyclic:UU(),postorder:KU(),preorder:XU(),prim:tW(),tarjan:QE(),topsort:YE()}});var rW=pt((PTn,aW)=>{var oW=TU();aW.exports={Graph:oW.Graph,json:DU(),alg:nW(),version:oW.version}});var ys=pt((wTn,lW)=>{var Cy;if(typeof Fs=="function")try{Cy=rW()}catch{}Cy||(Cy=window.graphlib);lW.exports=Cy});var cW=pt((MTn,sW)=>{var Jmt=fE(),Xmt=1,Zmt=4;function edt(e){return Jmt(e,Xmt|Zmt)}sW.exports=edt});var rh=pt((DTn,pW)=>{var tdt=Jd(),idt=Dc(),ndt=U1(),odt=$l();function adt(e,o,t){if(!odt(t))return!1;var n=typeof o;return(n=="number"?idt(t)&&ndt(o,t.length):n=="string"&&o in t)?tdt(t[o],e):!1}pW.exports=adt});var uW=pt((ETn,dW)=>{var rdt=nh(),ldt=Jd(),sdt=rh(),cdt=dm(),mW=Object.prototype,pdt=mW.hasOwnProperty,mdt=rdt(function(e,o){e=Object(e);var t=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&sdt(o[0],o[1],i)&&(n=1);++t{var ddt=Ec(),udt=Dc(),fdt=cp();function hdt(e){return function(o,t,n){var i=Object(o);if(!udt(o)){var s=ddt(t,3);o=fdt(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}}fW.exports=hdt});var _W=pt((OTn,gW)=>{var gdt=/\s/;function _dt(e){for(var o=e.length;o--&&gdt.test(e.charAt(o)););return o}gW.exports=_dt});var vW=pt((ATn,CW)=>{var Cdt=_W(),vdt=/^\s+/;function xdt(e){return e&&e.slice(0,Cdt(e)+1).replace(vdt,"")}CW.exports=xdt});var SW=pt((kTn,yW)=>{var bdt=vW(),xW=$l(),ydt=i0(),bW=NaN,Sdt=/^[-+]0x[0-9a-f]+$/i,Pdt=/^0b[01]+$/i,wdt=/^0o[0-7]+$/i,Tdt=parseInt;function Mdt(e){if(typeof e=="number")return e;if(ydt(e))return bW;if(xW(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=xW(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=bdt(e);var t=Pdt.test(e);return t||wdt.test(e)?Tdt(e.slice(2),t?2:8):Sdt.test(e)?bW:+e}yW.exports=Mdt});var JE=pt((FTn,wW)=>{var Ddt=SW(),PW=1/0,Edt=17976931348623157e292;function Idt(e){if(!e)return e===0?e:0;if(e=Ddt(e),e===PW||e===-PW){var o=e<0?-1:1;return o*Edt}return e===e?e:0}wW.exports=Idt});var MW=pt((BTn,TW)=>{var Odt=JE();function Adt(e){var o=Odt(e),t=o%1;return o===o?t?o-t:o:0}TW.exports=Adt});var EW=pt((RTn,DW)=>{var kdt=zE(),Fdt=Ec(),Bdt=MW(),Rdt=Math.max;function Ndt(e,o,t){var n=e==null?0:e.length;if(!n)return-1;var i=t==null?0:Bdt(t);return i<0&&(i=Rdt(n+i,0)),kdt(e,Fdt(o,3),i)}DW.exports=Ndt});var OW=pt((NTn,IW)=>{var Ldt=hW(),Vdt=EW(),qdt=Ldt(Vdt);IW.exports=qdt});var XE=pt((LTn,AW)=>{var zdt=dy();function Hdt(e){var o=e==null?0:e.length;return o?zdt(e,1):[]}AW.exports=Hdt});var FW=pt((VTn,kW)=>{var Gdt=ry(),jdt=hE(),$dt=dm();function Udt(e,o){return e==null?e:Gdt(e,jdt(o),$dt)}kW.exports=Udt});var RW=pt((qTn,BW)=>{function Wdt(e){var o=e==null?0:e.length;return o?e[o-1]:void 0}BW.exports=Wdt});var LW=pt((zTn,NW)=>{var Qdt=G1(),Ydt=ly(),Kdt=Ec();function Jdt(e,o){var t={};return o=Kdt(o,3),Ydt(e,function(n,i,s){Qdt(t,i,o(n,i,s))}),t}NW.exports=Jdt});var vy=pt((HTn,VW)=>{var Xdt=i0();function Zdt(e,o,t){for(var n=-1,i=e.length;++n{function e0t(e,o){return e>o}qW.exports=e0t});var GW=pt((jTn,HW)=>{var t0t=vy(),i0t=zW(),n0t=um();function o0t(e){return e&&e.length?t0t(e,n0t,i0t):void 0}HW.exports=o0t});var ZE=pt(($Tn,jW)=>{var a0t=G1(),r0t=Jd();function l0t(e,o,t){(t!==void 0&&!r0t(e[o],t)||t===void 0&&!(o in e))&&a0t(e,o,t)}jW.exports=l0t});var WW=pt((UTn,UW)=>{var s0t=pm(),c0t=X1(),p0t=Qs(),m0t="[object Object]",d0t=Function.prototype,u0t=Object.prototype,$W=d0t.toString,f0t=u0t.hasOwnProperty,h0t=$W.call(Object);function g0t(e){if(!p0t(e)||s0t(e)!=m0t)return!1;var o=c0t(e);if(o===null)return!0;var t=f0t.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&$W.call(t)==h0t}UW.exports=g0t});var eI=pt((WTn,QW)=>{function _0t(e,o){if(!(o==="constructor"&&typeof e[o]=="function")&&o!="__proto__")return e[o]}QW.exports=_0t});var KW=pt((QTn,YW)=>{var C0t=Tu(),v0t=dm();function x0t(e){return C0t(e,v0t(e))}YW.exports=x0t});var iQ=pt((YTn,tQ)=>{var JW=ZE(),b0t=JD(),y0t=mE(),S0t=XD(),P0t=uE(),XW=Mu(),ZW=Xa(),w0t=GE(),T0t=Zd(),M0t=yu(),D0t=$l(),E0t=WW(),I0t=Iu(),eQ=eI(),O0t=KW();function A0t(e,o,t,n,i,s,d){var u=eQ(e,t),f=eQ(o,t),_=d.get(f);if(_){JW(e,t,_);return}var C=s?s(u,f,t+"",e,o,d):void 0,x=C===void 0;if(x){var y=ZW(f),w=!y&&T0t(f),P=!y&&!w&&I0t(f);C=f,y||w||P?ZW(u)?C=u:w0t(u)?C=S0t(u):w?(x=!1,C=b0t(f,!0)):P?(x=!1,C=y0t(f,!0)):C=[]:E0t(f)||XW(f)?(C=u,XW(u)?C=O0t(u):(!D0t(u)||M0t(u))&&(C=P0t(f))):x=!1}x&&(d.set(f,C),i(C,f,n,s,d),d.delete(f)),JW(e,t,C)}tQ.exports=A0t});var aQ=pt((KTn,oQ)=>{var k0t=H1(),F0t=ZE(),B0t=ry(),R0t=iQ(),N0t=$l(),L0t=dm(),V0t=eI();function nQ(e,o,t,n,i){e!==o&&B0t(o,function(s,d){if(i||(i=new k0t),N0t(s))R0t(e,o,d,t,nQ,n,i);else{var u=n?n(V0t(e,d),s,d+"",e,o,i):void 0;u===void 0&&(u=s),F0t(e,d,u)}},L0t)}oQ.exports=nQ});var lQ=pt((JTn,rQ)=>{var q0t=nh(),z0t=rh();function H0t(e){return q0t(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&&z0t(t[0],t[1],d)&&(s=i<3?void 0:s,i=1),o=Object(o);++n{var G0t=aQ(),j0t=lQ(),$0t=j0t(function(e,o,t){G0t(e,o,t)});sQ.exports=$0t});var tI=pt((ZTn,pQ)=>{function U0t(e,o){return e{var W0t=vy(),Q0t=tI(),Y0t=um();function K0t(e){return e&&e.length?W0t(e,Y0t,Q0t):void 0}mQ.exports=K0t});var fQ=pt((t4n,uQ)=>{var J0t=vy(),X0t=Ec(),Z0t=tI();function eut(e,o){return e&&e.length?J0t(e,X0t(o,2),Z0t):void 0}uQ.exports=eut});var gQ=pt((i4n,hQ)=>{var tut=xs(),iut=function(){return tut.Date.now()};hQ.exports=iut});var vQ=pt((n4n,CQ)=>{var nut=j1(),out=th(),aut=U1(),_Q=$l(),rut=ku();function lut(e,o,t,n){if(!_Q(e))return e;o=out(o,e);for(var i=-1,s=o.length,d=s-1,u=e;u!=null&&++i{var sut=ih(),cut=vQ(),put=th();function mut(e,o,t){for(var n=-1,i=o.length,s={};++n{var dut=bQ(),uut=EE();function fut(e,o){return dut(e,o,function(t,n){return uut(e,n)})}yQ.exports=fut});var wQ=pt((r4n,PQ)=>{var hut=XE(),gut=VE(),_ut=qE();function Cut(e){return _ut(gut(e,void 0,hut),e+"")}PQ.exports=Cut});var MQ=pt((l4n,TQ)=>{var vut=SQ(),xut=wQ(),but=xut(function(e,o){return e==null?{}:vut(e,o)});TQ.exports=but});var EQ=pt((s4n,DQ)=>{var yut=Math.ceil,Sut=Math.max;function Put(e,o,t,n){for(var i=-1,s=Sut(yut((o-e)/(t||1)),0),d=Array(s);s--;)d[n?s:++i]=e,e+=t;return d}DQ.exports=Put});var OQ=pt((c4n,IQ)=>{var wut=EQ(),Tut=rh(),iI=JE();function Mut(e){return function(o,t,n){return n&&typeof n!="number"&&Tut(o,t,n)&&(t=n=void 0),o=iI(o),t===void 0?(t=o,o=0):t=iI(t),n=n===void 0?o{var Dut=OQ(),Eut=Dut();AQ.exports=Eut});var BQ=pt((m4n,FQ)=>{function Iut(e,o){var t=e.length;for(e.sort(o);t--;)e[t]=e[t].value;return e}FQ.exports=Iut});var LQ=pt((d4n,NQ)=>{var RQ=i0();function Out(e,o){if(e!==o){var t=e!==void 0,n=e===null,i=e===e,s=RQ(e),d=o!==void 0,u=o===null,f=o===o,_=RQ(o);if(!u&&!_&&!s&&e>o||s&&d&&f&&!u&&!_||n&&d&&f||!t&&f||!i)return 1;if(!n&&!s&&!_&&e{var Aut=LQ();function kut(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}VQ.exports=kut});var HQ=pt((f4n,zQ)=>{var nI=eh(),Fut=ih(),But=Ec(),Rut=FE(),Nut=BQ(),Lut=W1(),Vut=qQ(),qut=um(),zut=Xa();function Hut(e,o,t){o.length?o=nI(o,function(s){return zut(s)?function(d){return Fut(d,s.length===1?s[0]:s)}:s}):o=[qut];var n=-1;o=nI(o,Lut(But));var i=Rut(e,function(s,d,u){var f=nI(o,function(_){return _(s)});return{criteria:f,index:++n,value:s}});return Nut(i,function(s,d){return Vut(s,d,t)})}zQ.exports=Hut});var $Q=pt((h4n,jQ)=>{var Gut=dy(),jut=HQ(),$ut=nh(),GQ=rh(),Uut=$ut(function(e,o){if(e==null)return[];var t=o.length;return t>1&&GQ(e,o[0],o[1])?o=[]:t>2&&GQ(o[0],o[1],o[2])&&(o=[o[0]]),jut(e,Gut(o,1),[])});jQ.exports=Uut});var WQ=pt((g4n,UQ)=>{var Wut=ME(),Qut=0;function Yut(e){var o=++Qut;return Wut(e)+o}UQ.exports=Yut});var YQ=pt((_4n,QQ)=>{function Kut(e,o,t){for(var n=-1,i=e.length,s=o.length,d={};++n{var Jut=j1(),Xut=YQ();function Zut(e,o){return Xut(e||[],o||[],Jut)}KQ.exports=Zut});var Ea=pt((v4n,XQ)=>{var xy;if(typeof Fs=="function")try{xy={cloneDeep:cW(),constant:ay(),defaults:uW(),each:_E(),filter:OE(),find:OW(),flatten:XE(),forEach:gE(),forIn:FW(),has:AE(),isUndefined:kE(),last:RW(),map:BE(),mapValues:LW(),max:GW(),merge:cQ(),min:dQ(),minBy:fQ(),now:gQ(),pick:MQ(),range:kQ(),reduce:RE(),sortBy:$Q(),uniqueId:WQ(),values:jE(),zipObject:JQ()}}catch{}xy||(xy=window._);XQ.exports=xy});var tY=pt((b4n,eY)=>{eY.exports=by;function by(){var e={};e._next=e._prev=e,this._sentinel=e}by.prototype.dequeue=function(){var e=this._sentinel,o=e._prev;if(o!==e)return ZQ(o),o};by.prototype.enqueue=function(e){var o=this._sentinel;e._prev&&e._next&&ZQ(e),e._next=o._next,o._next._prev=e,o._next=e,e._prev=o};by.prototype.toString=function(){for(var e=[],o=this._sentinel,t=o._prev;t!==o;)e.push(JSON.stringify(t,eft)),t=t._prev;return"["+e.join(", ")+"]"};function ZQ(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function eft(e,o){if(e!=="_next"&&e!=="_prev")return o}});var nY=pt((y4n,iY)=>{var pp=Ea(),tft=ys().Graph,ift=tY();iY.exports=oft;var nft=pp.constant(1);function oft(e,o){if(e.nodeCount()<=1)return[];var t=rft(e,o||nft),n=aft(t.graph,t.buckets,t.zeroIdx);return pp.flatten(pp.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function aft(e,o,t){for(var n=[],i=o[o.length-1],s=o[0],d;e.nodeCount();){for(;d=s.dequeue();)oI(e,o,t,d);for(;d=i.dequeue();)oI(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(oI(e,o,t,d,!0));break}}}return n}function oI(e,o,t,n,i){var s=i?[]:void 0;return pp.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,aI(o,t,f)}),pp.forEach(e.outEdges(n.v),function(d){var u=e.edge(d),f=d.w,_=e.node(f);_.in-=u,aI(o,t,_)}),e.removeNode(n.v),s}function rft(e,o){var t=new tft,n=0,i=0;pp.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),pp.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=pp.range(i+n+3).map(function(){return new ift}),d=n+1;return pp.forEach(t.nodes(),function(u){aI(s,d,t.node(u))}),{graph:t,buckets:s,zeroIdx:d}}function aI(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 aY=pt((S4n,oY)=>{"use strict";var o0=Ea(),lft=nY();oY.exports={run:sft,undo:pft};function sft(e){var o=e.graph().acyclicer==="greedy"?lft(e,t(e)):cft(e);o0.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,o0.uniqueId("rev"))});function t(n){return function(i){return n.edge(i).weight}}}function cft(e){var o=[],t={},n={};function i(s){o0.has(n,s)||(n[s]=!0,t[s]=!0,o0.forEach(e.outEdges(s),function(d){o0.has(t,d.w)?o.push(d):i(d.w)}),delete t[s])}return o0.forEach(e.nodes(),i),o}function pft(e){o0.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 gl=pt((P4n,cY)=>{"use strict";var Uo=Ea(),rY=ys().Graph;cY.exports={addDummyNode:lY,simplify:mft,asNonCompoundGraph:dft,successorWeights:uft,predecessorWeights:fft,intersectRect:hft,buildLayerMatrix:gft,normalizeRanks:_ft,removeEmptyRanks:Cft,addBorderNode:vft,maxRank:sY,partition:xft,time:bft,notime:yft};function lY(e,o,t,n){var i;do i=Uo.uniqueId(n);while(e.hasNode(i));return t.dummy=o,e.setNode(i,t),i}function mft(e){var o=new rY().setGraph(e.graph());return Uo.forEach(e.nodes(),function(t){o.setNode(t,e.node(t))}),Uo.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 dft(e){var o=new rY({multigraph:e.isMultigraph()}).setGraph(e.graph());return Uo.forEach(e.nodes(),function(t){e.children(t).length||o.setNode(t,e.node(t))}),Uo.forEach(e.edges(),function(t){o.setEdge(t,e.edge(t))}),o}function uft(e){var o=Uo.map(e.nodes(),function(t){var n={};return Uo.forEach(e.outEdges(t),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Uo.zipObject(e.nodes(),o)}function fft(e){var o=Uo.map(e.nodes(),function(t){var n={};return Uo.forEach(e.inEdges(t),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Uo.zipObject(e.nodes(),o)}function hft(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 gft(e){var o=Uo.map(Uo.range(sY(e)+1),function(){return[]});return Uo.forEach(e.nodes(),function(t){var n=e.node(t),i=n.rank;Uo.isUndefined(i)||(o[i][n.order]=t)}),o}function _ft(e){var o=Uo.min(Uo.map(e.nodes(),function(t){return e.node(t).rank}));Uo.forEach(e.nodes(),function(t){var n=e.node(t);Uo.has(n,"rank")&&(n.rank-=o)})}function Cft(e){var o=Uo.min(Uo.map(e.nodes(),function(s){return e.node(s).rank})),t=[];Uo.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;Uo.forEach(t,function(s,d){Uo.isUndefined(s)&&d%i!==0?--n:n&&Uo.forEach(s,function(u){e.node(u).rank+=n})})}function vft(e,o,t,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=t,i.order=n),lY(e,"border",i,o)}function sY(e){return Uo.max(Uo.map(e.nodes(),function(o){var t=e.node(o).rank;if(!Uo.isUndefined(t))return t}))}function xft(e,o){var t={lhs:[],rhs:[]};return Uo.forEach(e,function(n){o(n)?t.lhs.push(n):t.rhs.push(n)}),t}function bft(e,o){var t=Uo.now();try{return o()}finally{console.log(e+" time: "+(Uo.now()-t)+"ms")}}function yft(e,o){return o()}});var dY=pt((w4n,mY)=>{"use strict";var pY=Ea(),Sft=gl();mY.exports={run:Pft,undo:Tft};function Pft(e){e.graph().dummyChains=[],pY.forEach(e.edges(),function(o){wft(e,o)})}function wft(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 yy=Ea();uY.exports={longestPath:Mft,slack:Dft};function Mft(e){var o={};function t(n){var i=e.node(n);if(yy.has(o,n))return i.rank;o[n]=!0;var s=yy.min(yy.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}yy.forEach(e.sources(),t)}function Dft(e,o){return e.node(o.w).rank-e.node(o.v).rank-e.edge(o).minlen}});var rI=pt((M4n,fY)=>{"use strict";var Sy=Ea(),Eft=ys().Graph,Py=lh().slack;fY.exports=Ift;function Ift(e){var o=new Eft({directed:!1}),t=e.nodes()[0],n=e.nodeCount();o.setNode(t,{});for(var i,s;Oft(o,e){"use strict";var mp=Ea(),Fft=rI(),Bft=lh().slack,Rft=lh().longestPath,Nft=ys().alg.preorder,Lft=ys().alg.postorder,Vft=gl().simplify;bY.exports=a0;a0.initLowLimValues=sI;a0.initCutValues=lI;a0.calcCutValue=gY;a0.leaveEdge=CY;a0.enterEdge=vY;a0.exchangeEdges=xY;function a0(e){e=Vft(e),Rft(e);var o=Fft(e);sI(o),lI(o,e);for(var t,n;t=CY(o);)n=vY(o,e,t),xY(o,e,t,n)}function lI(e,o){var t=Lft(e,e.nodes());t=t.slice(0,t.length-1),mp.forEach(t,function(n){qft(e,o,n)})}function qft(e,o,t){var n=e.node(t),i=n.parent;e.edge(t,i).cutvalue=gY(e,o,t)}function gY(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,mp.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,Hft(e,t,C)){var w=e.edge(t,C).cutvalue;u+=x?-w:w}}}),u}function sI(e,o){arguments.length<2&&(o=e.nodes()[0]),_Y(e,{},1,o)}function _Y(e,o,t,n,i){var s=t,d=e.node(n);return o[n]=!0,mp.forEach(e.neighbors(n),function(u){mp.has(o,u)||(t=_Y(e,o,t,u,n))}),d.low=s,d.lim=t++,i?d.parent=i:delete d.parent,t}function CY(e){return mp.find(e.edges(),function(o){return e.edge(o).cutvalue<0})}function vY(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 _=mp.filter(o.edges(),function(C){return f===hY(e,e.node(C.v),u)&&f!==hY(e,e.node(C.w),u)});return mp.minBy(_,function(C){return Bft(o,C)})}function xY(e,o,t,n){var i=t.v,s=t.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),sI(e),lI(e,o),zft(e,o)}function zft(e,o){var t=mp.find(e.nodes(),function(i){return!o.node(i).parent}),n=Nft(e,t);n=n.slice(1),mp.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 Hft(e,o,t){return e.hasEdge(o,t)}function hY(e,o,t){return t.low<=o.lim&&o.lim<=t.lim}});var TY=pt((E4n,wY)=>{"use strict";var Gft=lh(),PY=Gft.longestPath,jft=rI(),$ft=yY();wY.exports=Uft;function Uft(e){switch(e.graph().ranker){case"network-simplex":SY(e);break;case"tight-tree":Qft(e);break;case"longest-path":Wft(e);break;default:SY(e)}}var Wft=PY;function Qft(e){PY(e),jft(e)}function SY(e){$ft(e)}});var DY=pt((I4n,MY)=>{var cI=Ea();MY.exports=Yft;function Yft(e){var o=Jft(e);cI.forEach(e.graph().dummyChains,function(t){for(var n=e.node(t),i=n.edgeObj,s=Kft(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 Jft(e){var o={},t=0;function n(i){var s=t;cI.forEach(e.children(i),n),o[i]={low:s,lim:t++}}return cI.forEach(e.children(),n),o}});var OY=pt((O4n,IY)=>{var dp=Ea(),pI=gl();IY.exports={run:Xft,cleanup:t1t};function Xft(e){var o=pI.addDummyNode(e,"root",{},"_root"),t=Zft(e),n=dp.max(dp.values(t))-1,i=2*n+1;e.graph().nestingRoot=o,dp.forEach(e.edges(),function(d){e.edge(d).minlen*=i});var s=e1t(e)+1;dp.forEach(e.children(),function(d){EY(e,o,i,s,n,t,d)}),e.graph().nodeRankFactor=i}function EY(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=pI.addBorderNode(e,"_bt"),_=pI.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(f,d),C.borderTop=f,e.setParent(_,d),C.borderBottom=_,dp.forEach(u,function(x){EY(e,o,t,n,i,s,x);var y=e.node(x),w=y.borderTop?y.borderTop:x,P=y.borderBottom?y.borderBottom:x,M=y.borderTop?n:2*n,D=w!==P?1:i-s[d]+1;e.setEdge(f,w,{weight:M,minlen:D,nestingEdge:!0}),e.setEdge(P,_,{weight:M,minlen:D,nestingEdge:!0})}),e.parent(d)||e.setEdge(o,f,{weight:0,minlen:i+s[d]})}function Zft(e){var o={};function t(n,i){var s=e.children(n);s&&s.length&&dp.forEach(s,function(d){t(d,i+1)}),o[n]=i}return dp.forEach(e.children(),function(n){t(n,1)}),o}function e1t(e){return dp.reduce(e.edges(),function(o,t){return o+e.edge(t).weight},0)}function t1t(e){var o=e.graph();e.removeNode(o.nestingRoot),delete o.nestingRoot,dp.forEach(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}});var FY=pt((A4n,kY)=>{var mI=Ea(),i1t=gl();kY.exports=n1t;function n1t(e){function o(t){var n=e.children(t),i=e.node(t);if(n.length&&mI.forEach(n,o),mI.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,d=i.maxRank+1;s{"use strict";var Oc=Ea();NY.exports={adjust:o1t,undo:a1t};function o1t(e){var o=e.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&RY(e)}function a1t(e){var o=e.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&r1t(e),(o==="lr"||o==="rl")&&(l1t(e),RY(e))}function RY(e){Oc.forEach(e.nodes(),function(o){BY(e.node(o))}),Oc.forEach(e.edges(),function(o){BY(e.edge(o))})}function BY(e){var o=e.width;e.width=e.height,e.height=o}function r1t(e){Oc.forEach(e.nodes(),function(o){dI(e.node(o))}),Oc.forEach(e.edges(),function(o){var t=e.edge(o);Oc.forEach(t.points,dI),Oc.has(t,"y")&&dI(t)})}function dI(e){e.y=-e.y}function l1t(e){Oc.forEach(e.nodes(),function(o){uI(e.node(o))}),Oc.forEach(e.edges(),function(o){var t=e.edge(o);Oc.forEach(t.points,uI),Oc.has(t,"x")&&uI(t)})}function uI(e){var o=e.x;e.x=e.y,e.y=o}});var qY=pt((F4n,VY)=>{"use strict";var up=Ea();VY.exports=s1t;function s1t(e){var o={},t=up.filter(e.nodes(),function(u){return!e.children(u).length}),n=up.max(up.map(t,function(u){return e.node(u).rank})),i=up.map(up.range(n+1),function(){return[]});function s(u){if(!up.has(o,u)){o[u]=!0;var f=e.node(u);i[f.rank].push(u),up.forEach(e.successors(u),s)}}var d=up.sortBy(t,function(u){return e.node(u).rank});return up.forEach(d,s),i}});var HY=pt((B4n,zY)=>{"use strict";var fm=Ea();zY.exports=c1t;function c1t(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 $Y=pt((R4n,jY)=>{var GY=Ea();jY.exports=m1t;function m1t(e,o){return GY.map(o,function(t){var n=e.inEdges(t);if(n.length){var i=GY.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 WY=pt((N4n,UY)=>{"use strict";var Wl=Ea();UY.exports=d1t;function d1t(e,o){var t={};Wl.forEach(e,function(i,s){var d=t[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};Wl.isUndefined(i.barycenter)||(d.barycenter=i.barycenter,d.weight=i.weight)}),Wl.forEach(o.edges(),function(i){var s=t[i.v],d=t[i.w];!Wl.isUndefined(s)&&!Wl.isUndefined(d)&&(d.indegree++,s.out.push(t[i.w]))});var n=Wl.filter(t,function(i){return!i.indegree});return u1t(n)}function u1t(e){var o=[];function t(s){return function(d){d.merged||(Wl.isUndefined(d.barycenter)||Wl.isUndefined(s.barycenter)||d.barycenter>=s.barycenter)&&f1t(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),Wl.forEach(i.in.reverse(),t(i)),Wl.forEach(i.out,n(i))}return Wl.map(Wl.filter(o,function(s){return!s.merged}),function(s){return Wl.pick(s,["vs","i","barycenter","weight"])})}function f1t(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 KY=pt((L4n,YY)=>{var sh=Ea(),h1t=gl();YY.exports=g1t;function g1t(e,o){var t=h1t.partition(e,function(C){return sh.has(C,"barycenter")}),n=t.lhs,i=sh.sortBy(t.rhs,function(C){return-C.i}),s=[],d=0,u=0,f=0;n.sort(_1t(!!o)),f=QY(s,i,f),sh.forEach(n,function(C){f+=C.vs.length,s.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,f=QY(s,i,f)});var _={vs:sh.flatten(s,!0)};return u&&(_.barycenter=d/u,_.weight=u),_}function QY(e,o,t){for(var n;o.length&&(n=sh.last(o)).i<=t;)o.pop(),e.push(n.vs),t++;return t}function _1t(e){return function(o,t){return o.barycentert.barycenter?1:e?t.i-o.i:o.i-t.i}}});var ZY=pt((V4n,XY)=>{var hm=Ea(),C1t=$Y(),v1t=WY(),x1t=KY();XY.exports=JY;function JY(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=hm.filter(i,function(P){return P!==d&&P!==u}));var _=C1t(e,i);hm.forEach(_,function(P){if(e.children(P.v).length){var M=JY(e,P.v,t,n);f[P.v]=M,hm.has(M,"barycenter")&&y1t(P,M)}});var C=v1t(_,t);b1t(C,f);var x=x1t(C,n);if(d&&(x.vs=hm.flatten([d,x.vs,u],!0),e.predecessors(d).length)){var y=e.node(e.predecessors(d)[0]),w=e.node(e.predecessors(u)[0]);hm.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+y.order+w.order)/(x.weight+2),x.weight+=2}return x}function b1t(e,o){hm.forEach(e,function(t){t.vs=hm.flatten(t.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function y1t(e,o){hm.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 tK=pt((q4n,eK)=>{var ch=Ea(),S1t=ys().Graph;eK.exports=P1t;function P1t(e,o,t){var n=w1t(e),i=new S1t({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return ch.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),ch.forEach(e[t](s),function(f){var _=f.v===s?f.w:f.v,C=i.edge(_,s),x=ch.isUndefined(C)?0:C.weight;i.setEdge(_,s,{weight:e.edge(f).weight+x})}),ch.has(d,"minRank")&&i.setNode(s,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),i}function w1t(e){for(var o;e.hasNode(o=ch.uniqueId("_root")););return o}});var nK=pt((z4n,iK)=>{var T1t=Ea();iK.exports=M1t;function M1t(e,o,t){var n={},i;T1t.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 sK=pt((H4n,lK)=>{"use strict";var gm=Ea(),D1t=qY(),E1t=HY(),I1t=ZY(),O1t=tK(),A1t=nK(),k1t=ys().Graph,oK=gl();lK.exports=F1t;function F1t(e){var o=oK.maxRank(e),t=aK(e,gm.range(1,o+1),"inEdges"),n=aK(e,gm.range(o-1,-1,-1),"outEdges"),i=D1t(e);rK(e,i);for(var s=Number.POSITIVE_INFINITY,d,u=0,f=0;f<4;++u,++f){B1t(u%2?t:n,u%4>=2),i=oK.buildLayerMatrix(e);var _=E1t(e,i);_{"use strict";var lo=Ea(),R1t=ys().Graph,N1t=gl();_K.exports={positionX:q1t,findType1Conflicts:cK,findType2Conflicts:pK,addConflict:fI,hasConflict:mK,verticalAlignment:dK,horizontalCompaction:uK,alignCoordinates:hK,findSmallestWidthAlignment:fK,balance:gK};function cK(e,o){var t={};function n(i,s){var d=0,u=0,f=i.length,_=lo.last(s);return lo.forEach(s,function(C,x){var y=L1t(e,C),w=y?e.node(y).order:f;(y||C===_)&&(lo.forEach(s.slice(u,x+1),function(P){lo.forEach(e.predecessors(P),function(M){var D=e.node(M),F=D.order;(F_)&&fI(t,y,C)})})}function i(s,d){var u=-1,f,_=0;return lo.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 lo.reduce(o,i),t}function L1t(e,o){if(e.node(o).dummy)return lo.find(e.predecessors(o),function(t){return e.node(t).dummy})}function fI(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 mK(e,o,t){if(o>t){var n=o;o=t,t=n}return lo.has(e[o],t)}function dK(e,o,t,n){var i={},s={},d={};return lo.forEach(o,function(u){lo.forEach(u,function(f,_){i[f]=f,s[f]=f,d[f]=_})}),lo.forEach(o,function(u){var f=-1;lo.forEach(u,function(_){var C=n(_);if(C.length){C=lo.sortBy(C,function(M){return d[M]});for(var x=(C.length-1)/2,y=Math.floor(x),w=Math.ceil(x);y<=w;++y){var P=C[y];s[_]===_&&f{"use strict";var ph=Ea(),vK=gl(),G1t=CK().positionX;xK.exports=j1t;function j1t(e){e=vK.asNonCompoundGraph(e),$1t(e),ph.forEach(G1t(e),function(o,t){e.node(t).x=o})}function $1t(e){var o=vK.buildLayerMatrix(e),t=e.graph().ranksep,n=0;ph.forEach(o,function(i){var s=ph.max(ph.map(i,function(d){return e.node(d).height}));ph.forEach(i,function(d){e.node(d).y=n+s/2}),n+=s+t})}});var MK=pt(($4n,TK)=>{"use strict";var vo=Ea(),yK=aY(),SK=dY(),U1t=TY(),W1t=gl().normalizeRanks,Q1t=DY(),Y1t=gl().removeEmptyRanks,PK=OY(),K1t=FY(),wK=LY(),J1t=sK(),X1t=bK(),_m=gl(),Z1t=ys().Graph;TK.exports=eht;function eht(e,o){var t=o&&o.debugTiming?_m.time:_m.notime;t("layout",function(){var n=t(" buildLayoutGraph",function(){return mht(e)});t(" runLayout",function(){tht(n,t)}),t(" updateInputGraph",function(){iht(e,n)})})}function tht(e,o){o(" makeSpaceForEdgeLabels",function(){dht(e)}),o(" removeSelfEdges",function(){bht(e)}),o(" acyclic",function(){yK.run(e)}),o(" nestingGraph.run",function(){PK.run(e)}),o(" rank",function(){U1t(_m.asNonCompoundGraph(e))}),o(" injectEdgeLabelProxies",function(){uht(e)}),o(" removeEmptyRanks",function(){Y1t(e)}),o(" nestingGraph.cleanup",function(){PK.cleanup(e)}),o(" normalizeRanks",function(){W1t(e)}),o(" assignRankMinMax",function(){fht(e)}),o(" removeEdgeLabelProxies",function(){hht(e)}),o(" normalize.run",function(){SK.run(e)}),o(" parentDummyChains",function(){Q1t(e)}),o(" addBorderSegments",function(){K1t(e)}),o(" order",function(){J1t(e)}),o(" insertSelfEdges",function(){yht(e)}),o(" adjustCoordinateSystem",function(){wK.adjust(e)}),o(" position",function(){X1t(e)}),o(" positionSelfEdges",function(){Sht(e)}),o(" removeBorderNodes",function(){xht(e)}),o(" normalize.undo",function(){SK.undo(e)}),o(" fixupEdgeLabelCoords",function(){Cht(e)}),o(" undoCoordinateSystem",function(){wK.undo(e)}),o(" translateGraph",function(){ght(e)}),o(" assignNodeIntersects",function(){_ht(e)}),o(" reversePoints",function(){vht(e)}),o(" acyclic.undo",function(){yK.undo(e)})}function iht(e,o){vo.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))}),vo.forEach(e.edges(),function(t){var n=e.edge(t),i=o.edge(t);n.points=i.points,vo.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=o.graph().width,e.graph().height=o.graph().height}var nht=["nodesep","edgesep","ranksep","marginx","marginy"],oht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},aht=["acyclicer","ranker","rankdir","align"],rht=["width","height"],lht={width:0,height:0},sht=["minlen","weight","width","height","labeloffset"],cht={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},pht=["labelpos"];function mht(e){var o=new Z1t({multigraph:!0,compound:!0}),t=gI(e.graph());return o.setGraph(vo.merge({},oht,hI(t,nht),vo.pick(t,aht))),vo.forEach(e.nodes(),function(n){var i=gI(e.node(n));o.setNode(n,vo.defaults(hI(i,rht),lht)),o.setParent(n,e.parent(n))}),vo.forEach(e.edges(),function(n){var i=gI(e.edge(n));o.setEdge(n,vo.merge({},cht,hI(i,sht),vo.pick(i,pht)))}),o}function dht(e){var o=e.graph();o.ranksep/=2,vo.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 uht(e){vo.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};_m.addDummyNode(e,"edge-proxy",s,"_ep")}})}function fht(e){var o=0;vo.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=vo.max(o,n.maxRank))}),e.graph().maxRank=o}function hht(e){vo.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 ght(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,w=_.height;o=Math.min(o,C-y/2),t=Math.max(t,C+y/2),n=Math.min(n,x-w/2),i=Math.max(i,x+w/2)}vo.forEach(e.nodes(),function(_){f(e.node(_))}),vo.forEach(e.edges(),function(_){var C=e.edge(_);vo.has(C,"x")&&f(C)}),o-=d,n-=u,vo.forEach(e.nodes(),function(_){var C=e.node(_);C.x-=o,C.y-=n}),vo.forEach(e.edges(),function(_){var C=e.edge(_);vo.forEach(C.points,function(x){x.x-=o,x.y-=n}),vo.has(C,"x")&&(C.x-=o),vo.has(C,"y")&&(C.y-=n)}),s.width=t-o+d,s.height=i-n+u}function _ht(e){vo.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(_m.intersectRect(n,s)),t.points.push(_m.intersectRect(i,d))})}function Cht(e){vo.forEach(e.edges(),function(o){var t=e.edge(o);if(vo.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 vht(e){vo.forEach(e.edges(),function(o){var t=e.edge(o);t.reversed&&t.points.reverse()})}function xht(e){vo.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(vo.last(t.borderLeft)),d=e.node(vo.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}}),vo.forEach(e.nodes(),function(o){e.node(o).dummy==="border"&&e.removeNode(o)})}function bht(e){vo.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 yht(e){var o=_m.buildLayerMatrix(e);vo.forEach(o,function(t){var n=0;vo.forEach(t,function(i,s){var d=e.node(i);d.order=s+n,vo.forEach(d.selfEdges,function(u){_m.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 Sht(e){vo.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 hI(e,o){return vo.mapValues(vo.pick(e,o),Number)}function gI(e){var o={};return vo.forEach(e,function(t,n){o[n.toLowerCase()]=t}),o}});var EK=pt((U4n,DK)=>{var wy=Ea(),Pht=gl(),wht=ys().Graph;DK.exports={debugOrdering:Tht};function Tht(e){var o=Pht.buildLayerMatrix(e),t=new wht({compound:!0,multigraph:!0}).setGraph({});return wy.forEach(e.nodes(),function(n){t.setNode(n,{label:n}),t.setParent(n,"layer"+e.node(n).rank)}),wy.forEach(e.edges(),function(n){t.setEdge(n.v,n.w,{},n.name)}),wy.forEach(o,function(n,i){var s="layer"+i;t.setNode(s,{rank:"same"}),wy.reduce(n,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var OK=pt((W4n,IK)=>{IK.exports="0.8.5"});var kK=pt((Q4n,AK)=>{AK.exports={graphlib:ys(),layout:MK(),debug:EK(),util:{time:gl().time,notime:gl().notime},version:OK()}});var xI=pt(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var vI=(function(){function e(o,t,n){this.source=o,this.target=t,this.type=n}return e})();Cm.PowerEdge=vI;var rJ=(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 Fu);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={};lJ(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 vI(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})();Cm.Configuration=rJ;function lJ(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)}lJ(n.children,i,t)}})}var mh=(function(){function e(o,t,n,i,s){t===void 0&&(t=new dh),n===void 0&&(n=new dh),i===void 0&&(i=new Fu),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 vI(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})();Cm.Module=mh;function Aht(e,o){var t={};for(var n in e)n in o&&(t[n]=e[n]);return t}var Fu=(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=Aht(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})();Cm.ModuleSet=Fu;var dh=(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 Fu;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})();Cm.LinkSets=dh;function kht(e,o,t,n){for(var i=e.length,s=new rJ(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}}Cm.getGroups=kht});var Iy=pt(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});function sJ(e,o){var t={};for(var n in e)t[n]={};for(var n in o)t[n]={};return Object.keys(t).length}function cJ(e,o){var t=0;for(var n in e)typeof o[n]<"u"&&++t;return t}function Fht(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 pJ(e,o,t,n){var i=Fht(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 Bht(e,o,t){t===void 0&&(t=1),pJ(e,t,function(n,i){return Math.sqrt(sJ(n,i)-cJ(n,i))},o)}Bu.symmetricDiffLinkLengths=Bht;function Rht(e,o,t){t===void 0&&(t=1),pJ(e,t,function(n,i){return Math.min(Object.keys(n).length,Object.keys(i).length)<1.1?0:cJ(n,i)/sJ(n,i)},o)}Bu.jaccardLinkLengths=Rht;function Nht(e,o,t,n){var i=mJ(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}Bu.generateDirectedEdgeConstraints=Nht;function mJ(e,o,t){var n=[],i=0,s=[],d=[];function u(F){F.index=F.lowlink=i++,s.push(F),F.onStack=!0;for(var V=0,U=F.out;V"u"?(u(K),F.lowlink=Math.min(F.lowlink,K.lowlink)):K.onStack&&(F.lowlink=Math.min(F.lowlink,K.index))}if(F.lowlink===F.index){for(var se=[];s.length&&(K=s.pop(),K.onStack=!1,se.push(K),K!==F););d.push(se.map(function(ee){return ee.id}))}}for(var f=0;f"u"&&u(D)}return d}Bu.stronglyConnectedComponents=mJ});var Oy=pt(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var dJ=(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})();uh.Locks=dJ;var Lht=(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 uJ,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 dJ,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 P=this.offsetDir();for(i=0;i1&&M>D||!isFinite(D)){for(i=0;i1&&(F=1);var V=D*D,U=2*F*(M-D)/(V*M),K=M*M*M,se=2*-F/(V*K);for(isFinite(U)||console.log(U),i=0;i0?j-(O+1)*re:j-(O-1)*re;-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})();uh.PseudoRandom=uJ});var Fy=pt(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var fJ=(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})();fp.PositionStats=fJ;var Ay=(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})();fp.Constraint=Ay;var ky=(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})();fp.Variable=ky;var bI=(function(){function e(o){this.vars=[],o.offset=0,this.ps=new fJ(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})();fp.Solver=SI;function Vht(e,o,t){for(var n=e.map(function(D){return new ky(D.desiredCenter)}),i=[],s=e.length,d=0;d{"use strict";var qht=l0&&l0.__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(l0,"__esModule",{value:!0});var hJ=(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 gJ(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})();l0.TreeBase=hJ;var gJ=(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})();l0.Iterator=gJ;var By=(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})(),zht=(function(e){qht(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 By(t),n=!0,this.size++;else{var i=new By(void 0),s=!1,d=!1,u=null,f=i,_=null,C=this._root;for(f.right=this._root;;){if(C===null?(C=new By(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 By(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 w=d.right===s;o.is_red(y.get_child(_))?d.set_child(w,o.double_rotate(s,_)):o.is_red(y.get_child(!_))&&d.set_child(w,o.single_rotate(s,_));var P=d.get_child(w);P.red=!0,i.red=!0,P.left.red=!1,P.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})(hJ);l0.RBTree=zht});var Ru=pt(Cl=>{"use strict";var Hht=Cl&&Cl.__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(Cl,"__esModule",{value:!0});var hp=Fy(),Ght=PI();function fh(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(o,t){return t.bounds.union(o)},vm.empty()):vm.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(o,t){return fh(t).union(o)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}Cl.computeGroupBounds=fh;var vm=(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,w=y*_-C*x;if(w==0)return null;var P=o-s,M=t-d,D=C*M-y*P,F=D/w,V=_*M-x*P,U=V/w;return F>=0&&F<=1&&U>=0&&U<=1?{x:o+F*_,y:t+F*x}:null},e.prototype.inflate=function(o){return new e(this.x-o,this.X+o,this.y-o,this.Y+o)},e})();Cl.Rectangle=vm;function jht(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}}}Cl.makeEdgeBetween=jht;function $ht(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}}Cl.makeEdgeTo=$ht;var Uht=(function(){function e(o,t,n){this.v=o,this.r=t,this.pos=n,this.prev=wI(),this.next=wI()}return e})(),_J=(function(){function e(o,t,n){this.isOpen=o,this.v=t,this.pos=n}return e})();function Wht(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 xJ(e,o){return MI(e,o,CJ,1e-6)}Cl.generateXConstraints=xJ;function bJ(e,o){return MI(e,o,vJ,1e-6)}Cl.generateYConstraints=bJ;function yJ(e){return TI(e,CJ,1e-6)}Cl.generateXGroupConstraints=yJ;function SJ(e){return TI(e,vJ,1e-6)}Cl.generateYGroupConstraints=SJ;function Kht(e){var o=e.map(function(i){return new hp.Variable(i.cx())}),t=xJ(e,o),n=new hp.Solver(o,t);n.solve(),o.forEach(function(i,s){return e[s].setXCentre(i.position())}),o=e.map(function(i){return new hp.Variable(i.cy())}),t=bJ(e,o),n=new hp.Solver(o,t),n.solve(),o.forEach(function(i,s){return e[s].setYCentre(i.position())})}Cl.removeOverlaps=Kht;var Ry=(function(e){Hht(o,e);function o(t,n){var i=e.call(this,0,n)||this;return i.index=t,i}return o})(hp.Variable);Cl.IndexedVariable=Ry;var Jht=(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 Ry(_,1)}),i&&this.createConstraints(i),s&&n&&typeof n.groups<"u"){o.forEach(function(f){if(!f.width||!f.height){f.bounds=new vm(f.x,f.x,f.y,f.y);return}var _=f.width/2,C=f.height/2;f.bounds=new vm(f.x-_,f.x+_,f.y-C,f.y+C)}),fh(n);var u=o.length;t.forEach(function(f){d.variables[u]=f.minVar=new Ry(u++,typeof f.stiffness<"u"?f.stiffness:.01),d.variables[u]=f.maxVar=new Ry(u++,typeof f.stiffness<"u"?f.stiffness:.01)})}}return e.prototype.createSeparation=function(o){return new hp.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 hp.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 vm(_-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,yJ,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,SJ,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&&(fh(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(_),fh(this.rootGroup))},e.prototype.solve=function(o,t,n,i){var s=new hp.Solver(o,t);s.setStartingPositions(n),s.setDesiredPositions(i),s.solve()},e})();Cl.Projection=Jht});var DI=pt(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});var PJ=(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(EI,"__esModule",{value:!0});var wJ=DI(),TJ=(function(){function e(o,t){this.id=o,this.distance=t}return e})(),Zht=(function(){function e(o){this.id=o,this.neighbours=[]}return e})(),MJ=(function(){function e(o,t,n){this.node=o,this.prev=t,this.d=n}return e})(),egt=(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 Zht(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 TJ(_,C)),this.neighbours[_].neighbours.push(new TJ(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(w,P){return w.q=P}))}}return s},e})();EI.Calculator=egt});var kI=pt(Va=>{"use strict";var EJ=Va&&Va.__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(Va,"__esModule",{value:!0});var tgt=Ru(),OI=(function(){function e(){}return e})();Va.Point=OI;var AI=(function(){function e(o,t,n,i){this.x1=o,this.y1=t,this.x2=n,this.y2=i}return e})();Va.LineSegment=AI;var igt=(function(e){EJ(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(OI);Va.PolyPoint=igt;function Ql(e,o,t){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)}Va.isLeft=Ql;function Ks(e,o,t){return Ql(e,o,t)>0}function Ss(e,o,t){return Ql(e,o,t)<0}function ngt(e){var o=e.slice(0).sort(function(y,w){return y.x!==w.x?w.x-y.x:w.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(!(Ql(o[i],o[f],o[n])>=0&&n1&&!(Ql(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(!(Ql(o[_],o[d],o[n])>=0&&n>d)){for(;u.length>x&&!(Ql(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}}return u}Va.ConvexHull=ngt;function ogt(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)}Va.clockwiseRadialSweep=ogt;function agt(e,o){var t=o.slice(0);return t.push(o[0]),{rtan:Vy(e,t),ltan:qy(e,t)}}function Vy(e,o){var t=o.length-1,n,i,s,d,u;if(Ss(e,o[1],o[0])&&!Ks(e,o[t-1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Ks(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=Ss(e,o[s+1],o[s]),u&&!Ks(e,o[s-1],o[s]))return s;d=Ks(e,o[n+1],o[n]),d?u||Ks(e,o[n],o[s])?i=s:n=s:u&&Ss(e,o[n],o[s])?i=s:n=s}}function qy(e,o){var t=o.length-1,n,i,s,d,u;if(Ks(e,o[t-1],o[0])&&!Ss(e,o[1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Ss(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=Ss(e,o[s+1],o[s]),Ks(e,o[s-1],o[s])&&!u)return s;d=Ss(e,o[n+1],o[n]),d?u?Ss(e,o[n],o[s])?i=s:n=s:i=s:u?n=s:Ks(e,o[n],o[s])?i=s:n=s}}function zy(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}}Va.tangent_PolyPolyC=zy;function rgt(e,o){var t=IJ(o,e);return{t1:t.t2,t2:t.t1}}Va.LRtangent_PolyPolyC=rgt;function IJ(e,o){return zy(e,o,Vy,qy,Ks,Ss)}Va.RLtangent_PolyPolyC=IJ;function lgt(e,o){return zy(e,o,qy,qy,Ss,Ss)}Va.LLtangent_PolyPolyC=lgt;function sgt(e,o){return zy(e,o,Vy,Vy,Ks,Ks)}Va.RRtangent_PolyPolyC=sgt;var gh=(function(){function e(o,t){this.t1=o,this.t2=t}return e})();Va.BiTangent=gh;var OJ=(function(){function e(){}return e})();Va.BiTangents=OJ;var cgt=(function(e){EJ(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(OI);Va.TVGPoint=cgt;var II=(function(){function e(o,t,n,i){this.id=o,this.polyid=t,this.polyvertid=n,this.p=i,i.vv=this}return e})();Va.VisibilityVertex=II;var Ly=(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})();Va.VisibilityEdge=Ly;var pgt=(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 Ly(s[d-1].vv,f))}s.length>1&&this.E.push(new Ly(s[0].vv,s[s.length-1].vv))}for(var i=0;i0)return!0;return!1},e})();Va.TangentVisibilityGraph=pgt;function AJ(e,o){for(var t=[],n=1,i=o.length;n=0&&P>=0&&M<0&&D>=0&&F>=0&&V<0?i.ll=new gh(s,d):w<=0&&P<=0&&M>0&&D<=0&&F<=0&&V>0?i.rr=new gh(s,d):w<=0&&P>0&&M<=0&&D>=0&&F<0&&V>=0?i.rl=new gh(s,d):w>=0&&P<0&&M>=0&&D<=0&&F>0&&V<=0&&(i.lr=new gh(s,d))}return i}Va.tangents=kJ;function mgt(e,o){for(var t=1,n=o.length;t0)return!0}return!1}Va.polysOverlap=dgt});var FI=pt(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});var Ps={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function ugt(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,w=0,P=0,M=0,D=[];if(e.length==0)return;F(e),U(e,C),s&&V(e);function F(ce){ce.forEach(function(ue){_e(ue)});function _e(ue){var j=Number.MAX_VALUE,W=Number.MAX_VALUE,pe=0,O=0;ue.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)}),ue.width=pe-j,ue.height=O-W}}function V(ce){ce.forEach(function(_e){var ue={x:0,y:0};_e.array.forEach(function(pe){ue.x+=pe.x,ue.y+=pe.y}),ue.x/=_e.array.length,ue.y/=_e.array.length;var j={x:ue.x-_e.width/2,y:ue.y-_e.height/2},W={x:_e.x-j.x+f/2-y/2,y:_e.y-j.y+_/2-w/2};_e.array.forEach(function(pe){pe.x+=W.x,pe.y+=W.y})})}function U(ce,_e){var ue=Number.POSITIVE_INFINITY,j=0;ce.sort(function(ye,Ne){return Ne.height-ye.height}),P=ce.reduce(function(ye,Ne){return ye.widthP||$>Ps.FLOAT_EPSILON;){if(N!=1)var oe=pe-(pe-W)/Ps.GOLDEN_SECTION,B=K(ce,oe);if(N!=0)var be=W+(pe-W)/Ps.GOLDEN_SECTION,L=K(ce,be);if(G=Math.abs(oe-be),$=Math.abs(B-L),BL?(W=oe,oe=be,B=L,N=1):(pe=be,be=oe,L=B,N=0),O++>100)break}K(ce,j)}function K(ce,_e){D=[],y=0,w=0,M=u;for(var ue=0;ue=ce.height&&D[j].x+D[j].width+ce.width+Ps.PADDING-_e<=Ps.FLOAT_EPSILON){ue=D[j];break}D.push(ce),ue!==void 0?(ce.x=ue.x+ue.width+Ps.PADDING,ce.y=ue.bottom,ce.space_left=ce.height,ce.bottom=ce.y,ue.space_left-=ce.height+Ps.PADDING,ue.bottom+=ce.height+Ps.PADDING):(ce.y=M,M+=ce.height+Ps.PADDING,ce.x=d,ce.bottom=ce.y,ce.space_left=ce.height),ce.y+ce.height-w>-Ps.FLOAT_EPSILON&&(w=ce.y+ce.height-u),ce.x+ce.width-y>-Ps.FLOAT_EPSILON&&(y=ce.x+ce.width-d)}function ee(ce){var _e=0;return ce.forEach(function(ue){return _e+=ue.width+Ps.PADDING}),_e}function re(){return y/w}}Hy.applyPacking=ugt;function fgt(e,o){for(var t={},n={},i=[],s=0,d=0;d{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var hgt=xI(),BI=Iy(),Gy=Oy(),jy=Ru(),FJ=hh(),BJ=kI(),RJ=FI(),_h;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(_h=Ch.EventType||(Ch.EventType={}));function $y(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var ggt=(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[_h[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:_h.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=hgt.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:_h.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 BI.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 BI.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,w=this._canvasSize[0],P=this._canvasSize[1],M=new Array(x),D=new Array(x),F=null,V=this._avoidOverlaps;this._nodes.forEach(function(ue,j){ue.index=j,typeof ue.x>"u"&&(ue.x=w/2,ue.y=P/2),M[j]=ue.x,D[j]=ue.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new FJ.Calculator(x,this._links,e.getSourceIndex,e.getTargetIndex,function(ue){return u.getLinkLength(ue)}).DistanceMatrix(),F=Gy.Descent.createSquareMatrix(x,function(){return 2}),this._links.forEach(function(ue){typeof ue.source=="number"&&(ue.source=u._nodes[ue.source]),typeof ue.target=="number"&&(ue.target=u._nodes[ue.target])}),this._links.forEach(function(ue){var j=e.getSourceIndex(ue),W=e.getTargetIndex(ue);F[j][W]=F[W][j]=ue.weight||1}));var K=Gy.Descent.createSquareMatrix(x,function(ue,j){return U[ue][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var f=C,se=function(j,W,pe,O){F[j][W]=F[W][j]=pe,K[j][W]=K[W][j]=O};this._groups.forEach(function(j){se(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(BI.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new Gy.Descent([M,D],K),this._descent.locks.clear();for(var f=0;f0&&(this._descent.project=new jy.Projection(this._nodes,this._groups,this._rootGroup,ee).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(w,P,d),this.avoidOverlaps(V),V&&(this._nodes.forEach(function(ue,j){ue.x=M[j],ue.y=D[j]}),this._descent.project=new jy.Projection(this._nodes,this._groups,this._rootGroup,ee,!0).projectFunctions(),this._nodes.forEach(function(ue,j){M[j]=ue.x,D[j]=ue.y})),this._descent.G=F,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=Gy.Descent.createSquareMatrix(x,function(ue,j){return ue>=C||j>=C?F[ue][j]:0});this._descent.G=_e,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(w,P,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=RJ.separateGraphs(this._nodes,this._links);RJ.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 BJ.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 BJ.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(K){return K.source.id},x=function(K){return K.target.id},y=function(K){return K.length()},w=new FJ.Calculator(s.V.length,s.E,C,x,y),P=w.PathFromNodeToNode(f.id,_.id);if(P.length===1||P.length===s.V.length){var M=jy.makeEdgeBetween(o.source.innerBounds,o.target.innerBounds,t);i=[M.sourceIntersection,M.arrowStart]}else{for(var D=P.length-2,F=s.V[P[D]].p,V=s.V[P[0]].p,i=[o.source.innerBounds.rayIntersection(F.x,F.y)],U=D;U>=0;--U)i.push(s.V[P[U]].p);i.push(jy.makeEdgeTo(V,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){$y(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 $y(o)?{x:o.bounds.cx(),y:o.bounds.cy()}:o},e.drag=function(o,t){$y(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){$y(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})();Ch.Layout=ggt});var LJ=pt(Lu=>{"use strict";var _gt=Lu&&Lu.__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(Lu,"__esModule",{value:!0});var RI=Nu(),NJ=(function(e){_gt(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=RI.Layout.dragStart,n.dragend=n.dragEnd=RI.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})(RI.Layout);Lu.LayoutAdaptor=NJ;function Cgt(e){return new NJ(e)}Lu.adaptor=Cgt});var qJ=pt(Vu=>{"use strict";var vgt=Vu&&Vu.__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(Vu,"__esModule",{value:!0});var Yl=Nu(),VJ=(function(e){vgt(o,e);function o(){var t=e.call(this)||this;t.event=d3.dispatch(Yl.EventType[Yl.EventType.start],Yl.EventType[Yl.EventType.tick],Yl.EventType[Yl.EventType.end]);var n=t,i;return t.drag=function(){if(!s)var s=d3.behavior.drag().origin(Yl.Layout.dragOrigin).on("dragstart.d3adaptor",Yl.Layout.dragStart).on("drag.d3adaptor",function(d){Yl.Layout.drag(d,d3.event),n.resume()}).on("dragend.d3adaptor",Yl.Layout.dragEnd);if(!arguments.length)return s;this.call(s)},t}return o.prototype.trigger=function(t){var n={type:Yl.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(Yl.EventType[t],n),this},o})(Yl.Layout);Vu.D3StyleLayoutAdaptor=VJ;function xgt(){return new VJ}Vu.d3adaptor=xgt});var zJ=pt(vh=>{"use strict";var bgt=vh&&vh.__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(vh,"__esModule",{value:!0});var Kl=Nu(),ygt=(function(e){bgt(o,e);function o(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(Kl.EventType[Kl.EventType.start],Kl.EventType[Kl.EventType.tick],Kl.EventType[Kl.EventType.end]);var i=n,s;return n.drag=function(){if(!d)var d=t.drag().subject(Kl.Layout.dragOrigin).on("start.d3adaptor",Kl.Layout.dragStart).on("drag.d3adaptor",function(u){Kl.Layout.drag(u,t.event),i.resume()}).on("end.d3adaptor",Kl.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},n}return o.prototype.trigger=function(t){var n={type:Kl.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(Kl.EventType[t],n),this},o})(Kl.Layout);vh.D3StyleLayoutAdaptor=ygt});var HJ=pt(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});var Sgt=qJ(),Pgt=zJ();function wgt(e){return!e||Tgt(e)?new Sgt.D3StyleLayoutAdaptor:new Pgt.D3StyleLayoutAdaptor(e)}NI.d3adaptor=wgt;function Tgt(e){var o=/^3\./;return e.version&&e.version.match(o)!==null}});var zI=pt(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var Mgt=Ru(),LI=Fy(),Dgt=hh(),GJ=(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})();qu.NodeWrapper=GJ;var VI=(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})();qu.Vert=VI;var qI=(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})();qu.LongestCommonSubsequence=qI;var Egt=(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 GJ(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=Mgt.Rectangle.empty();M.children.forEach(function(F){return D=D.union(i.nodes[F].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}})),w=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}})),P=y.concat(w);P.forEach(function(M){return M.verts=[]}),this.verts=[],this.edges=[],y.forEach(function(M){return w.forEach(function(D){var F=new VI(i.verts.length,D.x1,M.y1);M.verts.push(F),D.verts.push(F),i.verts.push(F);for(var V=i.backToFront.length;V-- >0;){var U=i.backToFront[V],K=U.rect,se=Math.abs(F.x-K.cx()),ee=Math.abs(F.y-K.cy());if(se0;){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 LI.Variable(U[0][o])}),_=[],C=0;C=0&&_.push(new LI.Constraint(f[D],f[F],d))}var V=new LI.Solver(f,_);V.solve(),f.forEach(function(U,K){var se=i[K],ee=U.position();se[0][o]=se[1][o]=ee;var re=n[se.edgeid];se.i>0&&(re[se.i-1][1][o]=ee),se.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&&ce>1?1e3:0},M=w.PathFromNodeToNodeWithPrevCost(i.ports[0].id,s.ports[0].id,P),D=M.reverse().map(function(F){return n.verts[F]});return D.push(this.nodes[s.id].ports[0]),D.filter(function(F,V){return!(V0&&F.node===s&&D[V-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],w=y[0].x,P=y[0].y,M=y[1].x,D=y[1].y;C=M-w,x=D-P;var F=e.angleBetween2Lines(u,y)<0?1:0,V,U;Math.abs(C)>0?(V=w+C/Math.abs(C)*t,U=P):(V=w,U=P+x/Math.abs(x)*t);var K=Math.abs(V-f),se=Math.abs(U-_);s.routepath+="A "+K+" "+se+" 0 0 "+F+" "+V+" "+U+" "}else{var ee=[f,_],re,ce;Math.abs(C)>0?(f-=C/Math.abs(C)*i,re=[f,_+n],ce=[f,_-n]):(_-=x/Math.abs(x)*i,re=[f+n,_],ce=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+re[0]+" "+re[1]+" L "+ce[0]+" "+ce[1])}}else{var u=o[0],f=u[1].x,_=u[1].y,C=f-u[0].x,x=_-u[0].y,ee=[f,_],re,ce;Math.abs(C)>0?(f-=C/Math.abs(C)*i,re=[f,_+n],ce=[f,_-n]):(_-=x/Math.abs(x)*i,re=[f+n,_],ce=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+re[0]+" "+re[1]+" L "+ce[0]+" "+ce[1])}return s},e})();qu.GridRouter=Egt});var jJ=pt(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var Igt=hh(),HI=Oy(),Ogt=Ru(),Agt=Iy(),kgt=(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})();xh.Link3D=kgt;var Fgt=(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})();xh.Node3D=Fgt;var Bgt=(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 Rgt;this.useJaccardLinkLengths&&Agt.jaccardLinkLengths(this.links,i,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var s=new Igt.Calculator(n,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=HI.Descent.createSquareMatrix(n,function(C,x){return s[C][x]}),u=HI.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 HI.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new Ogt.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var f=0;f{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});var GI=Nu(),Ngt=zI();function Lgt(e,o,t,n){e.cola.start(0,0,0,10,!1);var i=Vgt(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})}Uy.gridify=Lgt;function Vgt(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 Ngt.GridRouter(i,{getChildren:function(s){return s.children},getBounds:function(s){return s.bounds}},t-n)}function qgt(e,o,t){var n;e.nodes.forEach(function(u,f){return u.index=f}),new GI.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 GI.Layout().size(o).nodes(d).links(s).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new GI.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}}Uy.powerGraphGridLayout=qgt});var UJ=pt(Wy=>{"use strict";function al(e){for(var o in e)Wy.hasOwnProperty(o)||(Wy[o]=e[o])}Object.defineProperty(Wy,"__esModule",{value:!0});al(LJ());al(HJ());al(Oy());al(kI());al(zI());al(FI());al(Nu());al(jJ());al(Iy());al(xI());al(DI());al(PI());al(Ru());al(hh());al(Fy());al($J())});var HO=pt((iZ,zO)=>{(function(e){typeof iZ=="object"&&typeof zO<"u"?zO.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 Fs=="function"&&Fs;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 Fs=="function"&&Fs,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"],F=y.map||function(U){if(U==="")return null;let K=Number(U);if(!Number.isNaN(K)&&K!==1/0)return K;let se=D.reduce((re,ce)=>{if(re)return re;let _e=u(U,ce,!0);return _e.isValid()?_e:null},null);if(se)return new Date(se.valueOf());let ee=C[U];return ee!==void 0?ee:U},V=i.parse(y.parserOptions).on("data",U=>{M.addRow(U.map(F))}).on("end",()=>{V.emit("worksheet",M)});V.on("worksheet",w).on("error",P),x.pipe(V)})}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((w,P)=>{y=y||{};let M=this.workbook.getWorksheet(y.sheetName||y.sheetId),D=i.format(y.formatterOptions);x.on("finish",()=>{w()}),D.on("error",P),D.pipe(x);let{dateFormat:F,dateUTC:V}=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 F?V?u.utc(ee).format(F):u(ee).format(F):V?u.utc(ee).format():u(ee).format();if(ee.error)return ee.error;if(typeof ee=="object")return JSON.stringify(ee)}return ee}),K=y.includeEmptyRows===void 0||y.includeEmptyRows,se=1;M&&M.eachRow((ee,re)=>{if(K)for(;se++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,w){if(!x||!y)throw new Error("A Cell needs a Row");this._row=x,this._column=y,n.validateAddress(w),this._address=w,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,w){let P=x&&x.numFmt||y&&y.numFmt;P&&(w.numFmt=P);let M=x&&x.font||y&&y.font;M&&(w.font=M);let D=x&&x.alignment||y&&y.alignment;D&&(w.alignment=D);let F=x&&x.border||y&&y.border;F&&(w.border=F);let V=x&&x.fill||y&&y.fill;V&&(w.fill=V);let U=x&&x.protection||y&&y.protection;return U&&(w.protection=U),w}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(w=>{y.addEx(this.fullAddress,w)})}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=w=>{let P=C[w];P&&(x[w]=P)};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 w=this.types[C];if(!w)throw new Error("Could not create Value of type "+C);return new w(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(w,P){return w.min-P.min});y<_.length;){let w=_[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,w;function P(D,F){let V=f.findCellAt(C,D,_.col);return!(!V||!V.mark)&&(x[F]=D,V.mark=!1,!0)}for(w=_.row-1;P(w,"top");w--);for(w=_.row+1;P(w,"bottom");w++);function M(D,F){let V=[];for(w=x.top;w<=x.bottom;w++){let U=f.findCellAt(C,w,D);if(!U||!U.mark)return!1;V.push(U)}x[F]=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=P;M>=_;M--)D=this._cells[M-1],D?(F=this.getCell(M+w),F.value=D.value,F.style=D.style,F._comment=D._comment):this._cells[M+w-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=(w,P,M)=>{w[P]===void 0&&(w[P]=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=(w,P)=>{if(!w)throw new Error(P)};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((w,P)=>{u(w.name,`Column ${P} must have a name`),P===0?d(w,"totalsRowLabel","Total"):(d(w,"totalsRowFunction","none"),w.totalsRowFormula=this.getFormula(w))})}store(){let s=(x,y)=>{y&&Object.keys(y).forEach(w=>{x[w]=y[w]})},{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,w)=>{let{style:P,name:M}=y,D=x.getCell(_+w);D.value=M,s(D,P)})}if(u.rows.forEach(x=>{let y=d.getRow(f+C++);x.forEach((w,P)=>{let M=y.getCell(_+P);M.value=w,s(M,u.columns[P].style)})}),u.totalsRow){let x=d.getRow(f+C++);u.columns.forEach((y,w)=>{let P=x.getCell(_+w);if(w===0)P.value=y.totalsRowLabel;else{let M=this.getFormula(y);P.value=M?{formula:y.totalsRowFormula,result:y.totalsRowResult}:null}s(P,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,w)=>{x.getCell(f+w).value=y})}),d.totalsRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{let w=C.getCell(f+y);y===0?w.value=x.totalsRowLabel:this.getFormula(x)&&(w.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(P&&P.orderNo)>w?P.orderNo:w,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(w=>w.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:w}=e("../utils/copy-style");o.exports=class{constructor(P){P=P||{},this._workbook=P.workbook,this.id=P.id,this.orderNo=P.orderNo,this.name=P.name,this.state=P.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},P.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:!(!P.pageSetup||!P.pageSetup.fitToWidth&&!P.pageSetup.fitToHeight||P.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},P.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},P.headerFooter),this.dataValidations=new x,this.views=P.views||[],this.autoFilter=P.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(P){if(P===void 0&&(P="sheet"+this.id),this._name!==P){if(typeof P!="string")throw new Error("The name has to be a string.");if(P==="")throw new Error("The name can't be empty.");if(P==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(P))throw new Error(`Worksheet name ${P} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(P))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+P);if(P&&P.length>31&&(console.warn(`Worksheet name ${P} exceeds 31 chars. This will be truncated`),P=P.substring(0,31)),this._workbook._worksheets.find(M=>M&&M.name.toLowerCase()===P.toLowerCase()))throw new Error("Worksheet name already exists: "+P);this._name=P}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let P=new s;return this._rows.forEach(M=>{if(M){let D=M.dimensions;D&&P.expand(M.number,D.min,M.number,D.max)}}),P}get columns(){return this._columns}set columns(P){this._headerRowCount=P.reduce((F,V)=>{let U=(V.header?1:V.headers&&V.headers.length)||0;return Math.max(F,U)},0);let M=1,D=this._columns=[];P.forEach(F=>{let V=new u(this,M++,!1);D.push(V),V.defn=F})}getColumnKey(P){return this._keys[P]}setColumnKey(P,M){this._keys[P]=M}deleteColumnKey(P){delete this._keys[P]}eachColumnKey(P){n.each(this._keys,P)}getColumn(P){if(typeof P=="string"){let M=this._keys[P];if(M)return M;P=i.l2n(P)}if(this._columns||(this._columns=[]),P>this._columns.length){let M=this._columns.length+1;for(;M<=P;)this._columns.push(new u(this,M++))}return this._columns[P-1]}spliceColumns(P,M){let D=this._rows.length;for(var F=arguments.length,V=new Array(F>2?F-2:0),U=2;U0)for(let re=0;re{ce.push(ue[re]||null)});let _e=this.getRow(re+1);_e.splice.apply(_e,ce)}else this._rows.forEach(re=>{re&&re.splice(P,M)});let K=V.length-M,se=P+M,ee=this._columns.length;if(K<0)for(let re=P+V.length;re<=ee;re++)this.getColumn(re).defn=this.getColumn(re-K).defn;else if(K>0)for(let re=ee;re>=se;re--)this.getColumn(re+K).defn=this.getColumn(re).defn;for(let re=P;re{P=Math.max(P,M.cellCount)}),P}get actualColumnCount(){let P=[],M=0;return this.eachRow(D=>{D.eachCell(F=>{let{col:V}=F;P[V]||(P[V]=!0,M++)})}),M}_commitRow(){}get _lastRowNumber(){let P=this._rows,M=P.length;for(;M>0&&P[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(P){return this._rows[P-1]}findRows(P,M){return this._rows.slice(P-1,P-1+M)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let P=0;return this.eachRow(()=>{P++}),P}getRow(P){let M=this._rows[P-1];return M||(M=this._rows[P-1]=new d(this,P)),M}getRows(P,M){if(M<1)return;let D=[];for(let F=P;F1&&arguments[1]!==void 0?arguments[1]:"n",D=this._nextRow,F=this.getRow(D);return F.values=P,this._setStyleOption(D,M[0]==="i"?M:"n"),F}addRows(P){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",D=[];return P.forEach(F=>{D.push(this.addRow(F,M))}),D}insertRow(P,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(P,0,M),this._setStyleOption(P,D),this.getRow(P)}insertRows(P,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(P,0,...M),D!=="n")for(let F=0;F1&&arguments[1]!==void 0?arguments[1]:"n";M[0]==="o"&&this.findRow(P+1)!==void 0?this._copyStyle(P+1,P,M[1]==="+"):M[0]==="i"&&this.findRow(P-1)!==void 0&&this._copyStyle(P-1,P,M[1]==="+")}_copyStyle(P,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=this.getRow(P),V=this.getRow(M);V.style=w(F.style),F.eachCell({includeEmpty:D},(U,K)=>{V.getCell(K).style=w(U.style)}),V.height=F.height}duplicateRow(P,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=this._rows[P-1],V=new Array(M).fill(F.values);this.spliceRows(P+1,D?0:M,...V);for(let U=0;U{K.getCell(ee).style=se.style})}}spliceRows(P,M){let D=P+M;for(var F=arguments.length,V=new Array(F>2?F-2:0),U=2;U{_e.getCell(j).style=ue.style}),this._rows[re-1]=void 0}else this._rows[re+se-1]=void 0;else if(se>0)for(re=ee;re>=D;re--)if(ce=this._rows[re-1],ce){let _e=this.getRow(re+se);_e.values=ce.values,_e.style=ce.style,_e.height=ce.height,ce.eachCell({includeEmpty:!0},(ue,j)=>{if(_e.getCell(j).style=ue.style,ue._value.constructor.name==="MergeValue"){let W=this.getRow(ue._row._number+K).getCell(j),pe=ue._value._master,O=this.getRow(pe._row._number+K).getCell(pe._column._number);W.merge(O)}})}else this._rows[re+se-1]=void 0;for(re=0;re{D&&D.hasValues&&M(D,D.number)})}getSheetValues(){let P=[];return this._rows.forEach(M=>{M&&(P[M.number]=M.values)}),P}findCell(P,M){let D=i.getAddress(P,M),F=this._rows[D.row-1];return F?F.findCell(D.col):void 0}getCell(P,M){let D=i.getAddress(P,M);return this.getRow(D.row).getCellEx(D)}mergeCells(){for(var P=arguments.length,M=new Array(P),D=0;D{if(F.intersects(P))throw new Error("Cannot merge already merged cells")});let D=this.getCell(P.top,P.left);for(let F=P.top;F<=P.bottom;F++)for(let V=P.left;V<=P.right;V++)(F>P.top||V>P.left)&&this.getCell(F,V).merge(D,M);this._merges[D.address]=P}_unMergeMaster(P){let M=this._merges[P.address];if(M){for(let D=M.top;D<=M.bottom;D++)for(let F=M.left;F<=M.right;F++)this.getCell(D,F).unmerge();delete this._merges[P.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var P=arguments.length,M=new Array(P),D=0;D3&&arguments[3]!==void 0?arguments[3]:"shared",V=i.decode(P),{top:U,left:K,bottom:se,right:ee}=V,re=ee-K+1,ce=i.encodeAddress(U,K),_e=F==="shared",ue;ue=typeof D=="function"?D:Array.isArray(D)?Array.isArray(D[0])?(W,pe)=>D[W-U][pe-K]:(W,pe)=>D[(W-U)*re+(pe-K)]:()=>{};let j=!0;for(let W=U;W<=se;W++)for(let pe=K;pe<=ee;pe++)j?(this.getCell(W,pe).value={shareType:F,formula:M,ref:P,result:ue(W,pe)},j=!1):this.getCell(W,pe).value=_e?{sharedFormula:ce,result:ue(W,pe)}:ue(W,pe)}addImage(P,M){let D={type:"image",imageId:P,range:M};this._media.push(new _(this,D))}getImages(){return this._media.filter(P=>P.type==="image")}addBackgroundImage(P){let M={type:"background",imageId:P};this._media.push(new _(this,M))}getBackgroundImageId(){let P=this._media.find(M=>M.type==="background");return P&&P.imageId}protect(P,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),P&&(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(P,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),M&&(this.sheetProtection=Object.assign(this.sheetProtection,M),!P&&"spinCount"in M&&delete this.sheetProtection.spinCount),D()})}unprotect(){this.sheetProtection=null}addTable(P){let M=new C(this,P);return this.tables[P.name]=M,M}getTable(P){return this.tables[P]}removeTable(P){delete this.tables[P]}getTables(){return Object.values(this.tables)}addConditionalFormatting(P){this.conditionalFormattings.push(P)}removeConditionalFormatting(P){typeof P=="number"?this.conditionalFormattings.splice(P,1):this.conditionalFormattings=P instanceof Function?this.conditionalFormattings.filter(P):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(P){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=P}get model(){let P={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(F=>F.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(F=>F.model),conditionalFormattings:this.conditionalFormattings};P.cols=u.toModel(this.columns);let M=P.rows=[],D=P.dimensions=new s;return this._rows.forEach(F=>{let V=F&&F.model;V&&(D.expand(V.number,V.min,V.number,V.max),M.push(V))}),P.merges=[],n.each(this._merges,F=>{P.merges.push(F.range)}),P}_parseRows(P){this._rows=[],P.rows.forEach(M=>{let D=new d(this,M.number);this._rows[D.number-1]=D,D.model=M})}_parseMergeCells(P){n.each(P.mergeCells,M=>{this.mergeCellsWithoutStyle(M)})}set model(P){this.name=P.name,this._columns=u.fromModel(this,P.cols),this._parseRows(P),this._parseMergeCells(P),this.dataValidations=new x(P.dataValidations),this.properties=P.properties,this.pageSetup=P.pageSetup,this.headerFooter=P.headerFooter,this.views=P.views,this.autoFilter=P.autoFilter,this._media=P.media.map(M=>new _(this,M)),this.sheetProtection=P.sheetProtection,this.tables=P.tables.reduce((M,D)=>{let F=new C;return F.model=D,M[D.name]=F,M},{}),this.conditionalFormattings=P.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 P,M=0;M=65&&P<=90)u=!0,f+=s[M],_=26*_+P-64;else if(P>=48&&P<=57)C=!0,x+=s[M],y=10*y+P-48;else if(C&&u&&P!==36)break;if(u){if(_>16384)throw new Error("Out of bounds. Invalid column letter: "+f)}else _=void 0;C||(y=void 0);let w={address:s=f+x,col:_,row:y,$col$row:`$${f}$${x}`};return _<=100&&y<=100&&(this._hash[s]=w,this._hash[w.$col$row]=w),w},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]),w=Math.min(x.row,y.row),P=Math.min(x.col,y.col),M=Math.max(x.row,y.row),D=Math.max(x.col,y.col);return x=this.n2l(P)+w,y=this.n2l(D)+M,{top:w,left:P,bottom:M,right:D,sheetName:u,tl:{address:x,col:P,row:w,$col$row:`$${this.n2l(P)}$${w}`,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 pk(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new i));let u=new n,f;u.on("error",P=>{f=P});let _=[];u.on("opentag",P=>_.push({eventType:"opentag",value:P})),u.on("text",P=>_.push({eventType:"text",value:P})),u.on("closetag",P=>_.push({eventType:"closetag",value:P}));try{for(var C=wg(d),x,y,w;x=!(y=yield new UT(C.next())).done;x=!1){let P=y.value;if(u.write(s(P)),f)throw f;yield _,_=[]}}catch{w=[y]}finally{try{x&&(y=C.return)&&(yield new UT(y.call(C)))}finally{if(w)throw w[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,w,P,M)=>{if(M)return x;let D=s.exec(P);if(D){let F=D[1],V=D[2].toUpperCase(),U=D[3],K=D[4];if(V.length>3||V.length===3&&V>"XFD")return x;let se=n.l2n(V),ee=parseInt(K,10);return F||(se+=C.col-_.col),U||(ee+=C.row-_.row),(y||"")+(F||"")+n.n2l(se)+(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,F,V){return this.toBuffer().copy(M,D,F,V)}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,F,V){return this._data._buf.copy(M,D,F,V)}toBuffer(){return this._data.toBuffer()}}class C{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,F,V){this._data.copy(M,D,F,V)}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,F){let V=Math.min(F,this.size-this.iWrite);return M.copy(this.buffer,this.iWrite,D,D+V),this.iWrite+=V,V}}let y=function(P){P=P||{},this.bufSize=P.bufSize||1048576,this.buffers=[],this.batch=P.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(P=>P.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let M=this.buffers[this.buffers.length-1];if(!M.full)return M}let P=new x(this.bufSize);return this.buffers.push(P),P},_pipe(P){return Zn(this,null,function*(){yield Promise.all(this.pipes.map(function(M){return new Promise(D=>{M.write(P.toBuffer(),()=>{D()})})}))})},_writeToBuffers(P){let M=0,D=P.length;for(;M1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(F),n.nextTick(D)):(yield this._pipe(F),D());else this.paused||this.emit("data",F.toBuffer()),this._writeToBuffers(F),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(P,M,D){let F=V=>{V?D(V):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};P?this.write(P,M,F):F()},read(P){let M;if(P){for(M=[];P&&this.buffers.length&&!this.buffers[0].eod;){let D=this.buffers[0],F=D.read(P);P-=F.length,M.push(F),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(P){this.encoding=P},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(P){this.pipes.push(P),!this.paused&&this.buffers.length&&this.end()},unpipe(P){this.pipes=this.pipes.filter(M=>M!==P)},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((w,P)=>{let M=u[P];return s.isEqual(w,M)});if(d===null||u===null)return d===u;if(y=Object.keys(d),Object.keys(u).length!==y.length)return!1;for(let w of y)if(!u.hasOwnProperty(w))return!1;return s.every(d,(w,P)=>{let M=u[P];return s.isEqual(w,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,w){f=d[w],C=Array.isArray(y),s.isObject(y)||C?(C?(C=!1,_=f&&Array.isArray(f)?f:[]):_=f&&s.isObject(f)?f:{},d[w]=s.deepMerge(_,y)):s.isUndefined(y)||(d[w]=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(w=>{Object.defineProperty(f,w,Object.getOwnPropertyDescriptor(C,w))});let y={constructor:{value:f,enumerable:!1,writable:!1,configurable:!0}};x&&Object.keys(x).forEach(w=>{y[w]=Object.getOwnPropertyDescriptor(x,w)}),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,w=_.index;for(;w=11&&P!==13)){x="";break}continue}y!==w&&(C+=f.substring(y,w)),y=w+1,x&&(C+=x)}return y!==w?C+f.substring(y,w):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 Zn(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 Zn(this,null,function*(){try{for(var f=wg(u),_,C,x;_=!(C=yield f.next()).done;_=!1){let y=C.value;for(let{eventType:w,value:P}of y)if(w==="opentag")this.parseOpen(P);else if(w==="text")this.parseText(P);else if(w==="closetag"&&!this.parseClose(P.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 Zn(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 w=y%2==0;!_&&w&&s(x)?f.push(x):_&&!w?(_=!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"),w=e("./workbook-calc-properties-xform");class P extends d{constructor(){super(),this.map={fileVersion:P.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 w}}prepare(D){D.sheets=D.worksheets;let F=[],V=0;D.sheets.forEach(U=>{if(U.pageSetup&&U.pageSetup.printArea&&U.pageSetup.printArea.split("&&").forEach(K=>{let se=K.split(":"),ee={name:"_xlnm.Print_Area",ranges:[`'${U.name}'!$${se[0]}:$${se[1]}`],localSheetId:V};F.push(ee)}),U.pageSetup&&(U.pageSetup.printTitlesRow||U.pageSetup.printTitlesColumn)){let K=[];if(U.pageSetup.printTitlesColumn){let ee=U.pageSetup.printTitlesColumn.split(":");K.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}if(U.pageSetup.printTitlesRow){let ee=U.pageSetup.printTitlesRow.split(":");K.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}let se={name:"_xlnm.Print_Titles",ranges:K,localSheetId:V};F.push(se)}V++}),F.length&&(D.definedNames=D.definedNames.concat(F)),(D.media||[]).forEach((U,K)=>{U.name=U.type+(K+1)})}render(D,F){D.openXml(s.StdDocAttributes),D.openNode("workbook",P.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(D),this.map.workbookPr.render(D,F.properties),this.map.bookViews.render(D,F.views),this.map.sheets.render(D,F.sheets),this.map.definedNames.render(D,F.definedNames),this.map.calcPr.render(D,F.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 F=(D.workbookRels||[]).reduce((ee,re)=>(ee[re.Id]=re,ee),{}),V=[],U,K=0;(D.sheets||[]).forEach(ee=>{let re=F[ee.rId];re&&(U=D.worksheetHash["xl/"+re.Target.replace(/^(\s|\/xl\/)+/,"")],U&&(U.name=ee.name,U.id=ee.id,U.state=ee.state,V[K++]=U))});let se=[];n.each(D.definedNames,ee=>{if(ee.name==="_xlnm.Print_Area"){if(U=V[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let re=i.decodeEx(ee.ranges[0]);U.pageSetup.printArea=U.pageSetup.printArea?`${U.pageSetup.printArea}&&${re.dimensions}`:re.dimensions}}else if(ee.name==="_xlnm.Print_Titles"){if(U=V[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let re=ee.ranges.join(","),ce=/\$/g,_e=/\$\d+:\$\d+/,ue=re.match(_e);if(ue&&ue.length){let pe=ue[0];U.pageSetup.printTitlesRow=pe.replace(ce,"")}let j=/\$[A-Z]+:\$[A-Z]+/,W=re.match(j);if(W&&W.length){let pe=W[0];U.pageSetup.printTitlesColumn=pe.replace(ce,"")}}}else se.push(ee)}),D.definedNames=se,D.media.forEach((ee,re)=>{ee.index=re})}}P.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"},P.STATIC_XFORMS={fileVersion:new u({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},o.exports=P},{"../../../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(w){return(typeof w.range=="string"?n.decode(w.range):w.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(Lt(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 w=C.commentsMap&&C.commentsMap[_.address];w&&(_.comment=w)}}},{"../../../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=P=>{let{type:M,operator:D}=P;switch(M){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:M};default:return{type:M,operator:D}}};class w 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(F=>{this.formulaXform.render(M,F)}),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){w.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 F=(V=>{if(V.formulae&&V.formulae[0])return V.formulae[0];let U=new s(V.ref),{tl:K}=U;switch(V.operator){case"containsText":return`NOT(ISERROR(SEARCH("${V.text}",${K})))`;case"containsBlanks":return`LEN(TRIM(${K}))=0`;case"notContainsBlanks":return`LEN(TRIM(${K}))>0`;case"containsErrors":return`ISERROR(${K})`;case"notContainsErrors":return`NOT(ISERROR(${K}))`;default:return}})(D);F&&this.formulaXform.render(M,F),M.closeNode()}renderTimePeriod(M,D){M.openNode(this.tag,{type:"timePeriod",dxfId:D.dxfId,priority:D.priority,timePeriod:D.timePeriod});let F=(V=>{if(V.formulae&&V.formulae[0])return V.formulae[0];let U=new s(V.ref),{tl:K}=U;switch(V.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${K},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${K},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${K},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${K},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${K},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${K},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${K},1)=TODAY()-1`;case"today":return`FLOOR(${K},1)=TODAY()`;case"tomorrow":return`FLOOR(${K},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${K},1)<=6,FLOOR(${K},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${K})=MONTH(EDATE(TODAY(),0-1)),YEAR(${K})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${K})=MONTH(TODAY()),YEAR(${K})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${K})=MONTH(EDATE(TODAY(),0+1)),YEAR(${K})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(D);F&&this.formulaXform.render(M,F),M.closeNode()}createNewModel(M){let{attributes:D}=M;return Lt(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=w},{"../../../../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,w){let P=x[y];P!==void 0?C[y]=P:w!==void 0&&(C[y]=w)}function _(C,x,y,w){let P=x[y];P!==void 0?C[y]=i.parseBoolean(P):w!==void 0&&(C[y]=w)}o.exports=class extends d{get tag(){return"dataValidations"}render(C,x){let y=(function(w){let P=n.map(w,(F,V)=>({address:V,dataValidation:F,marked:!1})).sort((F,V)=>n.strcmp(F.address,V.address)),M=n.keyBy(P,"address"),D=(F,V,U)=>{for(let K=0;K{if(!F.marked){let V=s.decodeEx(F.address);if(V.dimensions)return M[V.dimensions].marked=!0,Lt(at({},F.dataValidation),{sqref:F.address});let U=1,K=s.encodeAddress(V.row+U,V.col);for(;w[K]&&n.isEqual(F.dataValidation,w[K]);)U++,K=s.encodeAddress(V.row+U,V.col);let se=1;for(;D(V,U,V.col+se);)se++;for(let ee=0;ee1||se>1){let ee=V.row+(U-1),re=V.col+(se-1);return Lt(at({},F.dataValidation),{sqref:`${F.address}:${s.encodeAddress(ee,re)}`})}return Lt(at({},F.dataValidation),{sqref:F.address})}return null}).filter(Boolean)})(x);y.length&&(C.openNode("dataValidations",{count:y.length}),y.forEach(w=>{C.openNode("dataValidation"),w.type!=="any"&&(C.addAttribute("type",w.type),w.operator&&w.type!=="list"&&w.operator!=="between"&&C.addAttribute("operator",w.operator),w.allowBlank&&C.addAttribute("allowBlank","1")),w.showInputMessage&&C.addAttribute("showInputMessage","1"),w.promptTitle&&C.addAttribute("promptTitle",w.promptTitle),w.prompt&&C.addAttribute("prompt",w.prompt),w.showErrorMessage&&C.addAttribute("showErrorMessage","1"),w.errorStyle&&C.addAttribute("errorStyle",w.errorStyle),w.errorTitle&&C.addAttribute("errorTitle",w.errorTitle),w.error&&C.addAttribute("error",w.error),C.addAttribute("sqref",w.sqref),(w.formulae||[]).forEach((P,M)=>{C.openNode("formula"+(M+1)),w.type==="date"?C.writeText(i.dateToExcel(new Date(P))):C.writeText(P),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 w=C.left;w<=C.right;w++){let P=y.cells[w-1];P?P.type===d.ValueType.Merge&&(P.master=C.tl):y.cells[w]={type:d.ValueType.Null,address:s.encodeAddress(x,w)}}}})}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(w,P,M){M&&d.addAttribute(w,P)},_,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"),w=e("./hyperlink-xform"),P=e("./merge-cell-xform"),M=e("./data-validations-xform"),D=e("./sheet-properties-xform"),F=e("./sheet-format-properties-xform"),V=e("./sheet-view-xform"),U=e("./sheet-protection-xform"),K=e("./page-margins-xform"),se=e("./page-setup-xform"),ee=e("./print-options-xform"),re=e("./auto-filter-xform"),ce=e("./picture-xform"),_e=e("./drawing-xform"),ue=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 $={},oe={};return N.forEach(be=>{$[be.ref]=be,be.rules.forEach(ye=>{let{x14Id:Ne}=ye;Ne&&(oe[Ne]=ye)})}),G.forEach(be=>{be.rules.forEach(ye=>{let Ne=oe[ye.x14Id];Ne?((te,Oe)=>{Object.keys(Oe).forEach(J=>{let Q=te[J],Ce=Oe[J];Q===void 0&&Ce!==void 0&&(te[J]=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:oe,ignoreNodes:be}=G||{};this.ignoreNodes=be||[],this.map={sheetPr:new D,dimension:new y,sheetViews:new _({tag:"sheetViews",count:!1,childXform:new V}),sheetFormatPr:new F,cols:new _({tag:"cols",count:!1,childXform:new x}),sheetData:new _({tag:"sheetData",count:!1,empty:!0,childXform:new C({maxItems:oe}),maxItems:$}),autoFilter:new re,mergeCells:new _({tag:"mergeCells",count:!0,childXform:new P}),rowBreaks:new j,hyperlinks:new _({tag:"hyperlinks",count:!1,childXform:new w}),pageMargins:new K,dataValidations:new M,pageSetup:new se,headerFooter:new W,printOptions:new ee,picture:new ce,drawing:new _e,sheetProtection:new U,tableParts:new _({tag:"tableParts",count:!0,childXform:new ue}),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 oe=G.rels=[];function be(te){return"rId"+(te.length+1)}if(G.hyperlinks.forEach(te=>{let Oe=be(oe);te.rId=Oe,oe.push({Id:Oe,Type:d.Hyperlink,Target:te.target,TargetMode:"External"})}),G.comments.length>0){let te={Id:be(oe),Type:d.Comments,Target:`../comments${G.id}.xml`};oe.push(te);let Oe={Id:be(oe),Type:d.VmlDrawing,Target:`../drawings/vmlDrawing${G.id}.vml`};oe.push(Oe),G.comments.forEach(J=>{J.refAddress=i.decodeAddress(J.ref)}),$.commentRefs.push({commentName:"comments"+G.id,vmlDrawing:"vmlDrawing"+G.id})}let ye=[],Ne;G.media.forEach(te=>{if(te.type==="background"){let Oe=be(oe);Ne=$.media[te.imageId],oe.push({Id:Oe,Type:d.Image,Target:`../media/${Ne.name}.${Ne.extension}`}),G.background={rId:Oe},G.image=$.media[te.imageId]}else if(te.type==="image"){let{drawing:Oe}=G;Ne=$.media[te.imageId],Oe||(Oe=G.drawing={rId:be(oe),name:"drawing"+ ++$.drawingsCount,anchors:[],rels:[]},$.drawings.push(Oe),oe.push({Id:Oe.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${Oe.name}.xml`}));let J=this.preImageId===te.imageId?ye[te.imageId]:ye[Oe.rels.length];J||(J=be(Oe.rels),ye[Oe.rels.length]=J,Oe.rels.push({Id:J,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Ne.name}.${Ne.extension}`}));let Q={picture:{rId:J},range:te.range};if(te.hyperlinks&&te.hyperlinks.hyperlink){let Ce=be(Oe.rels);ye[Oe.rels.length]=Ce,Q.picture.hyperlinks={tooltip:te.hyperlinks.tooltip,rId:Ce},Oe.rels.push({Id:Ce,Type:d.Hyperlink,Target:te.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=te.imageId,Oe.anchors.push(Q)}}),G.tables.forEach(te=>{let Oe=be(oe);te.rId=Oe,oe.push({Id:Oe,Type:d.Table,Target:"../tables/"+te.target}),te.columns.forEach(J=>{let{style:Q}=J;Q&&(J.dxfId=$.styles.addDxfStyle(Q))})}),this.map.extLst.prepare(G,$)}render(G,$){G.openXml(s.StdDocAttributes),G.openNode("worksheet",L.WORKSHEET_ATTRIBUTES);let oe=$.properties?{defaultRowHeight:$.properties.defaultRowHeight,dyDescent:$.properties.dyDescent,outlineLevelCol:$.properties.outlineLevelCol,outlineLevelRow:$.properties.outlineLevelRow}:void 0;$.properties&&$.properties.defaultColWidth&&(oe.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,oe),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(Oe=>{Oe.Type===d.VmlDrawing&&G.leafNode("legacyDrawing",{"r:id":Oe.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 oe={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(oe,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 oe=(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((Oe,J)=>{Oe.note=Object.assign({},Oe.note,te[J])})}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]=oe[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=oe[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 Oe={type:"image",imageId:te.medium.index,range:te.range,hyperlinks:te.picture.hyperlinks};G.media.push(Oe)}})}}let be=G.background&&oe[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=oe[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,w){w&&(f.addAttribute(y,w),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,w,P){y&&(_[w]=P,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=Lt(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(w=>{y.render(C,w)}),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,w){let{map:P}=this;y.openNode(this.options.tagName),f.each(this.map,(M,D)=>{P[D].xform.render(y,w[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 w=this.map[y];return this.parser.model&&(this.model[w.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"),w=e("./dxf-xform");class P 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 w}),numFmt:new x,font:new f,fill:new _,border:new C,style:new y({xfId:!0}),cellStyles:P.STATIC_XFORMS.cellStyles,tableStyles:P.STATIC_XFORMS.tableStyles,extLst:P.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,F){F=F||this.model,D.openXml(i.StdDocAttributes),D.openNode("styleSheet",P.STYLESHEET_ATTRIBUTES),this.index?(F.numFmts&&F.numFmts.length&&(D.openNode("numFmts",{count:F.numFmts.length}),F.numFmts.forEach(V=>{D.writeXml(V)}),D.closeNode()),F.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),D.openNode("fonts",{count:F.fonts.length,"x14ac:knownFonts":1}),F.fonts.forEach(V=>{D.writeXml(V)}),D.closeNode(),D.openNode("fills",{count:F.fills.length}),F.fills.forEach(V=>{D.writeXml(V)}),D.closeNode(),D.openNode("borders",{count:F.borders.length}),F.borders.forEach(V=>{D.writeXml(V)}),D.closeNode(),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),D.openNode("cellXfs",{count:F.styles.length}),F.styles.forEach(V=>{D.writeXml(V)}),D.closeNode()):(this.map.numFmts.render(D,F.numFmts),this.map.fonts.render(D,F.fonts),this.map.fills.render(D,F.fills),this.map.borders.render(D,F.borders),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(D,F.styles)),P.STATIC_XFORMS.cellStyles.render(D),this.map.dxfs.render(D,F.dxfs),P.STATIC_XFORMS.tableStyles.render(D),P.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 F=(V,U)=>{U.model&&U.model.length&&(this.model[V]=U.model)};if(F("numFmts",this.map.numFmts),F("fonts",this.map.fonts),F("fills",this.map.fills),F("borders",this.map.borders),F("styles",this.map.cellXfs),F("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let V=this.index.numFmt;this.model.numFmts.forEach(U=>{V[U.id]=U.formatCode})}return!1}default:return!0}}addStyleModel(D,F){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 V={};if(F=F||n.ValueType.Number,D.numFmt)V.numFmtId=this._addNumFmtStr(D.numFmt);else switch(F){case n.ValueType.Number:V.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:V.numFmtId=this._addNumFmtStr("mm-dd-yy")}D.font&&(V.fontId=this._addFont(D.font)),D.border&&(V.borderId=this._addBorder(D.border)),D.fill&&(V.fillId=this._addFill(D.fill)),D.alignment&&(V.alignment=D.alignment),D.protection&&(V.protection=D.protection);let U=this._addStyle(V);return this.weakMap&&this.weakMap.set(D,U),U}getStyleModel(D){let F=this.model.styles[D];if(!F)return null;let V=this.index.model[D];if(V)return V;if(V=this.index.model[D]={},F.numFmtId){let K=this.index.numFmt[F.numFmtId]||x.getDefaultFmtCode(F.numFmtId);K&&(V.numFmt=K)}function U(K,se,ee){if(ee||ee===0){let re=se[ee];re&&(V[K]=re)}}return U("font",this.model.fonts,F.fontId),U("border",this.model.borders,F.borderId),U("fill",this.model.fills,F.fillId),F.alignment&&(V.alignment=F.alignment),F.protection&&(V.protection=F.protection),V}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 F=this.map.style.toXml(D),V=this.index.style[F];return V===void 0&&(V=this.index.style[F]=this.model.styles.length,this.model.styles.push(F)),V}_addNumFmtStr(D){let F=x.getDefaultFmtId(D);if(F!==void 0||(F=this.index.numFmt[D],F!==void 0))return F;F=this.index.numFmt[D]=164+this.model.numFmts.length;let V=this.map.numFmt.toXml({id:F,formatCode:D});return this.model.numFmts.push(V),F}_addFont(D){let F=this.map.font.toXml(D),V=this.index.font[F];return V===void 0&&(V=this.index.font[F]=this.model.fonts.length,this.model.fonts.push(F)),V}_addBorder(D){let F=this.map.border.toXml(D),V=this.index.border[F];return V===void 0&&(V=this.index.border[F]=this.model.borders.length,this.model.borders.push(F)),V}_addFill(D){let F=this.map.fill.toXml(D),V=this.index.fill[F];return V===void 0&&(V=this.index.fill[F]=this.model.fills.length,this.model.fills.push(F)),V}}P.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"},P.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"}}]}]})},P.Mock=class extends P{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=P},{"../../../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,Lt(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:w}=x;switch(y){case this.tag:this.reset(),this.model={name:w.name,displayName:w.displayName||w.name,tableRef:w.ref,totalsRow:w.totalsRowCount==="1",headerRow:w.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,w)=>{this.model.columns[w].filterButton=y.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(x,y){x.columns.forEach(w=>{w.dxfId!==void 0&&(w.style=y.styles.getDxfStyle(w.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"),w=e("./xform/style/styles-xform"),P=e("./xform/core/core-xform"),M=e("./xform/strings/shared-strings-xform"),D=e("./xform/core/relationships-xform"),F=e("./xform/core/content-types-xform"),V=e("./xform/core/app-xform"),U=e("./xform/book/workbook-xform"),K=e("./xform/sheet/worksheet-xform"),se=e("./xform/drawing/drawing-xform"),ee=e("./xform/table/table-xform"),re=e("./xform/comment/comments-xform"),ce=e("./xform/comment/vml-notes-xform"),_e=e("./xml/theme1");class ue{constructor(W){this.workbook=W}readFile(W,pe){return Zn(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 K(pe),L=new se,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,Oe)=>(te[Oe.Id]=Oe,te),{}),(ye.anchors||[]).forEach(te=>{let Oe=te.picture&&te.picture.hyperlinks;Oe&&G.rels[Oe.rId]&&(Oe.hyperlink=G.rels[Oe.rId].Target,delete Oe.rId)}),L.reconcile(ye,G))});let $={styles:W.styles};Object.values(W.tables).forEach(be=>{N.reconcile(be,$)});let oe={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,oe)}),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 Zn(this,null,function*(){let N=new K(B),G=yield N.parseStream(W);G.sheetNo=O,pe.worksheetHash[L]=G,pe.worksheets.push(G)})}_processCommentEntry(W,pe,O){return Zn(this,null,function*(){let B=new re,L=yield B.parseStream(W);pe.comments[`../${O}.xml`]=L})}_processTableEntry(W,pe,O){return Zn(this,null,function*(){let B=new ee,L=yield B.parseStream(W);pe.tables[`../tables/${O}.xml`]=L})}_processWorksheetRelsEntry(W,pe,O){return Zn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.worksheetRels[O]=L})}_processMediaEntry(W,pe,O){return Zn(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 oe=new _;oe.on("finish",()=>{pe.mediaIndex[O]=pe.media.length,pe.mediaIndex[N]=pe.media.length;let be={type:"image",name:N,extension:L,buffer:oe.toBuffer()};pe.media.push(be),G()}),W.on("error",be=>{$(be)}),W.pipe(oe)})}})}_processDrawingEntry(W,pe,O){return Zn(this,null,function*(){let B=new se,L=yield B.parseStream(W);pe.drawings[O]=L})}_processDrawingRelsEntry(W,pe,O){return Zn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.drawingRels[O]=L})}_processVmlDrawingEntry(W,pe,O){return Zn(this,null,function*(){let B=new ce,L=yield B.parseStream(W);pe.vmlDrawings[`../drawings/${O}.vml`]=L})}_processThemeEntry(W,pe,O){return Zn(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 Zn(this,null,function*(){!W[Symbol.asyncIterator]&&W.pipe&&(W=W.pipe(new u));let O=[];try{for(var B=wg(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 Zn(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 oe;G=new u({writableObjectMode:!0,readableObjectMode:!0}),oe=n.browser?y(yield N.async("nodebuffer")):yield N.async("string");let be=16384;for(let ye=0;yeZn(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(($,oe)=>{s.readFile(N,G,(be,ye)=>{be?oe(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 se,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 Zn(this,null,function*(){let O=new F().toXml(pe);W.append(O,{name:"[Content_Types].xml"})})}addApp(W,pe){return Zn(this,null,function*(){let O=new V().toXml(pe);W.append(O,{name:"docProps/app.xml"})})}addCore(W,pe){return Zn(this,null,function*(){let O=new P;W.append(O.toXml(pe),{name:"docProps/core.xml"})})}addThemes(W,pe){return Zn(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 Zn(this,null,function*(){let pe=new D().toXml([{Id:"rId1",Type:ue.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:ue.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:ue.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);W.append(pe,{name:"_rels/.rels"})})}addWorkbookRels(W,pe){return Zn(this,null,function*(){let O=1,B=[{Id:"rId"+O++,Type:ue.RelType.Styles,Target:"styles.xml"},{Id:"rId"+O++,Type:ue.RelType.Theme,Target:"theme/theme1.xml"}];pe.sharedStrings.count&&B.push({Id:"rId"+O++,Type:ue.RelType.SharedStrings,Target:"sharedStrings.xml"}),pe.worksheets.forEach(N=>{N.rId="rId"+O++,B.push({Id:N.rId,Type:ue.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 Zn(this,null,function*(){pe.sharedStrings&&pe.sharedStrings.count&&W.append(pe.sharedStrings.xml,{name:"xl/sharedStrings.xml"})})}addStyles(W,pe){return Zn(this,null,function*(){let{xml:O}=pe.styles;O&&W.append(O,{name:"xl/styles.xml"})})}addWorkbook(W,pe){return Zn(this,null,function*(){let O=new U;W.append(O.toXml(pe),{name:"xl/workbook.xml"})})}addWorksheets(W,pe){return Zn(this,null,function*(){let O=new K,B=new D,L=new re,N=new ce;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 w(!0):new w.Mock;let O=new U,B=new K;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 Zn(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 Zn(this,null,function*(){let pe=new _;return yield this.write(pe,W),pe.read()})}}ue.RelType=e("./rel-type"),o.exports=ue}).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=` +}`;var fo=sk(function(){return $o(ct,yn+"return "+Bi).apply(e,kt)});if(fo.source=Bi,BT(fo))throw fo;return fo}function Mae(A){return Yo(A).toLowerCase()}function Dae(A){return Yo(A).toUpperCase()}function Eae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return _A(A);if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=Is(q),ct=CA(De,Ge),kt=vA(De,Ge)+1;return Tp(De,ct,kt).join("")}function Iae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return A.slice(0,bA(A)+1);if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=vA(De,Is(q))+1;return Tp(De,0,Ge).join("")}function Oae(A,q,ie){if(A=Yo(A),A&&(ie||q===e))return A.replace(Rt,"");if(!A||!(q=ql(q)))return A;var De=Is(A),Ge=CA(De,Is(q));return Tp(De,Ge).join("")}function Aae(A,q){var ie=ce,De=_e;if(Na(q)){var Ge="separator"in q?q.separator:Ge;ie="length"in q?po(q.length):ie,De="omission"in q?ql(q.omission):De}A=Yo(A);var ct=A.length;if(u0(A)){var kt=Is(A);ct=kt.length}if(ie>=ct)return A;var $t=ie-f0(De);if($t<1)return De;var Xt=kt?Tp(kt,0,$t).join(""):A.slice(0,$t);if(Ge===e)return Xt+De;if(kt&&($t+=Xt.length-$t),RT(Ge)){if(A.slice($t).search(Ge)){var Di,Ii=Xt;for(Ge.global||(Ge=Xw(Ge.source,Yo(an.exec(Ge))+"g")),Ge.lastIndex=0;Di=Ge.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?$t:Bi)}}else if(A.indexOf(ql(Ge),$t)!=$t){var tn=Xt.lastIndexOf(Ge);tn>-1&&(Xt=Xt.slice(0,tn))}return Xt+De}function kae(A){return A=Yo(A),A&&Un.test(A)?A.replace(En,see):A}var Fae=x0(function(A,q,ie){return A+(ie?" ":"")+q.toUpperCase()}),VT=c7("toUpperCase");function lk(A,q,ie){return A=Yo(A),q=ie?e:q,q===e?nee(A)?mee(A):QZ(A):A.match(q)||[]}var sk=Co(function(A,q){try{return Ll(A,e,q)}catch(ie){return BT(ie)?ie:new oo(ie)}}),Bae=Nc(function(A,q){return es(q,function(ie){ie=ic(ie),Bc(A,ie,kT(A[ie],A))}),A});function Rae(A){var q=A==null?0:A.length,ie=Vn();return A=q?ka(A,function(De){if(typeof De[1]!="function")throw new ts(i);return[ie(De[0]),De[1]]}):[],Co(function(De){for(var Ge=-1;++GeL)return[];var ie=$,De=Xr(A,$);q=Vn(q),A-=$;for(var Ge=Yw(De,q);++ie0||q<0)?new Do(ie):(A<0?ie=ie.takeRight(-A):A&&(ie=ie.drop(A)),q!==e&&(q=po(q),ie=q<0?ie.dropRight(-q):ie.take(q-A)),ie)},Do.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Do.prototype.toArray=function(){return this.take($)},ec(Do.prototype,function(A,q){var ie=/^(?:filter|find|map|reject)|While$/.test(q),De=/^(?:head|last)$/.test(q),Ge=ot[De?"take"+(q=="last"?"Right":""):q],ct=De||/^find/.test(q);Ge&&(ot.prototype[q]=function(){var kt=this.__wrapped__,$t=De?[1]:arguments,Xt=kt instanceof Do,Di=$t[0],Ii=Xt||so(kt),Bi=function(wo){var Ao=Ge.apply(ot,vp([wo],$t));return De&&tn?Ao[0]:Ao};Ii&&ie&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var tn=this.__chain__,yn=!!this.__actions__.length,qn=ct&&!tn,fo=Xt&&!yn;if(!ct&&Ii){kt=fo?kt:new Do(this);var zn=A.apply(kt,$t);return zn.__actions__.push({func:_g,args:[Bi],thisArg:e}),new is(zn,tn)}return qn&&fo?A.apply(this,$t):(zn=this.thru(Bi),qn?De?zn.value()[0]:zn.value():zn)})}),es(["pop","push","shift","sort","splice","unshift"],function(A){var q=Gh[A],ie=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",De=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var Ge=arguments;if(De&&!this.__chain__){var ct=this.value();return q.apply(so(ct)?ct:[],Ge)}return this[ie](function(kt){return q.apply(so(kt)?kt:[],Ge)})}}),ec(Do.prototype,function(A,q){var ie=ot[q];if(ie){var De=ie.name+"";oa.call(_0,De)||(_0[De]=[]),_0[De].push({name:q,func:ie})}}),_0[pg(e,M).name]=[{name:"wrapper",func:e}],Do.prototype.clone=kee,Do.prototype.reverse=Fee,Do.prototype.value=Bee,ot.prototype.at=pne,ot.prototype.chain=mne,ot.prototype.commit=dne,ot.prototype.next=une,ot.prototype.plant=hne,ot.prototype.reverse=gne,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=_ne,ot.prototype.first=ot.prototype.head,tf&&(ot.prototype[tf]=fne),ot},bp=dee();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(wr._=bp,define(function(){return bp})):md?((md.exports=bp)._=bp,zw._=bp):wr._=bp}).call(W0)});var N9=pt(YC=>{"use strict";YC.byteLength=Nhe;YC.toByteArray=Vhe;YC.fromByteArray=Hhe;var Pc=[],Cs=[],Rhe=typeof Uint8Array<"u"?Uint8Array:Array,YM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(qd=0,B9=YM.length;qd0)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 Nhe(e){var o=R9(e),t=o[0],n=o[1];return(t+n)*3/4-n}function Lhe(e,o,t){return(o+t)*3/4-t}function Vhe(e){var o,t=R9(e),n=t[0],i=t[1],s=new Rhe(Lhe(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=Cs[e.charCodeAt(f)]<<2|Cs[e.charCodeAt(f+1)]>>4,s[d++]=o&255),i===1&&(o=Cs[e.charCodeAt(f)]<<10|Cs[e.charCodeAt(f+1)]<<4|Cs[e.charCodeAt(f+2)]>>2,s[d++]=o>>8&255,s[d++]=o&255),s}function qhe(e){return Pc[e>>18&63]+Pc[e>>12&63]+Pc[e>>6&63]+Pc[e&63]}function zhe(e,o,t){for(var n,i=[],s=o;su?u:d+s));return n===1?(o=e[t-1],i.push(Pc[o>>2]+Pc[o<<4&63]+"==")):n===2&&(o=(e[t-2]<<8)+e[t-1],i.push(Pc[o>>10]+Pc[o>>4&63]+Pc[o<<2&63]+"=")),i.join("")}});var L9=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,w=e[o+x];for(x+=y,s=w&(1<<-C)-1,w>>=-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:(w?-1:1)*(1/0);d=d+Math.pow(2,n),s=s-_}return(w?-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,w=n?0:s-1,P=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+w]=u&255,w+=P,u/=256,i-=8);for(d=d<0;e[t+w]=d&255,w+=P,d/=256,_-=8);e[t+w-P]|=M*128}});var J9=pt(pu=>{"use strict";var JM=N9(),cu=L9(),V9=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pu.Buffer=Ti;pu.SlowBuffer=Qhe;pu.INSPECT_MAX_BYTES=50;var KC=2147483647;pu.kMaxLength=KC;Ti.TYPED_ARRAY_SUPPORT=Ghe();!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 Ghe(){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 np(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 t5(e)}return H9(e,o,t)}Ti.poolSize=8192;function H9(e,o,t){if(typeof e=="string")return $he(e,o);if(ArrayBuffer.isView(e))return Uhe(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(wc(e,ArrayBuffer)||e&&wc(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(wc(e,SharedArrayBuffer)||e&&wc(e.buffer,SharedArrayBuffer)))return ZM(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=Whe(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 H9(e,o,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function G9(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 jhe(e,o,t){return G9(e),e<=0?np(e):o!==void 0?typeof t=="string"?np(e).fill(o,t):np(e).fill(o):np(e)}Ti.alloc=function(e,o,t){return jhe(e,o,t)};function t5(e){return G9(e),np(e<0?0:i5(e)|0)}Ti.allocUnsafe=function(e){return t5(e)};Ti.allocUnsafeSlow=function(e){return t5(e)};function $he(e,o){if((typeof o!="string"||o==="")&&(o="utf8"),!Ti.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var t=j9(e,o)|0,n=np(t),i=n.write(e,o);return i!==t&&(n=n.slice(0,i)),n}function XM(e){for(var o=e.length<0?0:i5(e.length)|0,t=np(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 Qhe(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(wc(o,Uint8Array)&&(o=Ti.from(o,o.offset,o.byteLength)),wc(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 j9(e,o){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||wc(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 e5(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return K9(e).length;default:if(i)return n?-1:e5(e).length;o=(""+o).toLowerCase(),i=!0}}Ti.byteLength=j9;function Yhe(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 age(this,o,t);case"utf8":case"utf-8":return U9(this,o,t);case"ascii":return nge(this,o,t);case"latin1":case"binary":return oge(this,o,t);case"base64":return tge(this,o,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rge(this,o,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ti.prototype._isBuffer=!0;function zd(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+=" ... "),""};V9&&(Ti.prototype[V9]=Ti.prototype.inspect);Ti.prototype.compare=function(o,t,n,i,s){if(wc(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,n5(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:q9(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):q9(e,[o],t,n,i);throw new TypeError("val must be string, number or Buffer")}function q9(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(w,P){return s===1?w[P]:w.readUInt16BE(P*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 Khe(this,o,t,n);case"utf8":case"utf-8":return Jhe(this,o,t,n);case"ascii":case"latin1":case"binary":return Xhe(this,o,t,n);case"base64":return Zhe(this,o,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ege(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 tge(e,o,t){return o===0&&t===e.length?JM.fromByteArray(e):JM.fromByteArray(e.slice(o,t))}function U9(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 ige(n)}var z9=4096;function ige(e){var o=e.length;if(o<=z9)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||Vr(o,t,this.length);for(var i=this[o],s=1,d=0;++d>>0,t=t>>>0,n||Vr(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||Vr(o,1,this.length),this[o]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(o,t){return o=o>>>0,t||Vr(o,2,this.length),this[o]|this[o+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(o,t){return o=o>>>0,t||Vr(o,2,this.length),this[o]<<8|this[o+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(o,t){return o=o>>>0,t||Vr(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||Vr(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||Vr(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||Vr(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||Vr(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]};Ti.prototype.readInt16LE=function(o,t){o=o>>>0,t||Vr(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||Vr(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||Vr(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||Vr(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||Vr(o,4,this.length),cu.read(this,o,!0,23,4)};Ti.prototype.readFloatBE=function(o,t){return o=o>>>0,t||Vr(o,4,this.length),cu.read(this,o,!1,23,4)};Ti.prototype.readDoubleLE=function(o,t){return o=o>>>0,t||Vr(o,8,this.length),cu.read(this,o,!0,52,8)};Ti.prototype.readDoubleBE=function(o,t){return o=o>>>0,t||Vr(o,8,this.length),cu.read(this,o,!1,52,8)};function kl(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;kl(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;kl(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||kl(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||kl(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||kl(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||kl(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||kl(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);kl(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);kl(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||kl(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||kl(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||kl(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||kl(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||kl(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 W9(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 Q9(e,o,t,n,i){return o=+o,t=t>>>0,i||W9(e,o,t,4,34028234663852886e22,-34028234663852886e22),cu.write(e,o,t,n,23,4),t+4}Ti.prototype.writeFloatLE=function(o,t,n){return Q9(this,o,t,!0,n)};Ti.prototype.writeFloatBE=function(o,t,n){return Q9(this,o,t,!1,n)};function Y9(e,o,t,n,i){return o=+o,t=t>>>0,i||W9(e,o,t,8,17976931348623157e292,-17976931348623157e292),cu.write(e,o,t,n,52,8),t+8}Ti.prototype.writeDoubleLE=function(o,t,n){return Y9(this,o,t,!0,n)};Ti.prototype.writeDoubleBE=function(o,t,n){return Y9(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 cge(e){for(var o=[],t=0;t>8,i=t%256,s.push(i),s.push(n);return s}function K9(e){return JM.toByteArray(sge(e))}function JC(e,o,t,n){for(var i=0;i=o.length||i>=e.length);++i)o[i+t]=e[i];return i}function wc(e,o){return e instanceof o||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===o.name}function n5(e){return e!==e}var mge=(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 VV=pt((B3n,LV)=>{function uXe(){this.__data__=[],this.size=0}LV.exports=uXe});var Jd=pt((R3n,qV)=>{function fXe(e,o){return e===o||e!==e&&o!==o}qV.exports=fXe});var L1=pt((N3n,zV)=>{var hXe=Jd();function gXe(e,o){for(var t=e.length;t--;)if(hXe(e[t][0],o))return t;return-1}zV.exports=gXe});var GV=pt((L3n,HV)=>{var _Xe=L1(),CXe=Array.prototype,vXe=CXe.splice;function xXe(e){var o=this.__data__,t=_Xe(o,e);if(t<0)return!1;var n=o.length-1;return t==n?o.pop():vXe.call(o,t,1),--this.size,!0}HV.exports=xXe});var $V=pt((V3n,jV)=>{var bXe=L1();function yXe(e){var o=this.__data__,t=bXe(o,e);return t<0?void 0:o[t][1]}jV.exports=yXe});var WV=pt((q3n,UV)=>{var SXe=L1();function PXe(e){return SXe(this.__data__,e)>-1}UV.exports=PXe});var YV=pt((z3n,QV)=>{var wXe=L1();function TXe(e,o){var t=this.__data__,n=wXe(t,e);return n<0?(++this.size,t.push([e,o])):t[n][1]=o,this}QV.exports=TXe});var V1=pt((H3n,KV)=>{var MXe=VV(),DXe=GV(),EXe=$V(),IXe=WV(),OXe=YV();function bu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var AXe=V1();function kXe(){this.__data__=new AXe,this.size=0}JV.exports=kXe});var eq=pt((j3n,ZV)=>{function FXe(e){var o=this.__data__,t=o.delete(e);return this.size=o.size,t}ZV.exports=FXe});var iq=pt(($3n,tq)=>{function BXe(e){return this.__data__.get(e)}tq.exports=BXe});var oq=pt((U3n,nq)=>{function RXe(e){return this.__data__.has(e)}nq.exports=RXe});var $D=pt((W3n,aq)=>{var NXe=typeof global=="object"&&global&&global.Object===Object&&global;aq.exports=NXe});var xs=pt((Q3n,rq)=>{var LXe=$D(),VXe=typeof self=="object"&&self&&self.Object===Object&&self,qXe=LXe||VXe||Function("return this")();rq.exports=qXe});var Xd=pt((Y3n,lq)=>{var zXe=xs(),HXe=zXe.Symbol;lq.exports=HXe});var mq=pt((K3n,pq)=>{var sq=Xd(),cq=Object.prototype,GXe=cq.hasOwnProperty,jXe=cq.toString,q1=sq?sq.toStringTag:void 0;function $Xe(e){var o=GXe.call(e,q1),t=e[q1];try{e[q1]=void 0;var n=!0}catch{}var i=jXe.call(e);return n&&(o?e[q1]=t:delete e[q1]),i}pq.exports=$Xe});var uq=pt((J3n,dq)=>{var UXe=Object.prototype,WXe=UXe.toString;function QXe(e){return WXe.call(e)}dq.exports=QXe});var pm=pt((X3n,gq)=>{var fq=Xd(),YXe=mq(),KXe=uq(),JXe="[object Null]",XXe="[object Undefined]",hq=fq?fq.toStringTag:void 0;function ZXe(e){return e==null?e===void 0?XXe:JXe:hq&&hq in Object(e)?YXe(e):KXe(e)}gq.exports=ZXe});var $l=pt((Z3n,_q)=>{function eZe(e){var o=typeof e;return e!=null&&(o=="object"||o=="function")}_q.exports=eZe});var yu=pt((eSn,Cq)=>{var tZe=pm(),iZe=$l(),nZe="[object AsyncFunction]",oZe="[object Function]",aZe="[object GeneratorFunction]",rZe="[object Proxy]";function lZe(e){if(!iZe(e))return!1;var o=tZe(e);return o==oZe||o==aZe||o==nZe||o==rZe}Cq.exports=lZe});var xq=pt((tSn,vq)=>{var sZe=xs(),cZe=sZe["__core-js_shared__"];vq.exports=cZe});var Sq=pt((iSn,yq)=>{var UD=xq(),bq=(function(){var e=/[^.]+$/.exec(UD&&UD.keys&&UD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function pZe(e){return!!bq&&bq in e}yq.exports=pZe});var WD=pt((nSn,Pq)=>{var mZe=Function.prototype,dZe=mZe.toString;function uZe(e){if(e!=null){try{return dZe.call(e)}catch{}try{return e+""}catch{}}return""}Pq.exports=uZe});var Tq=pt((oSn,wq)=>{var fZe=yu(),hZe=Sq(),gZe=$l(),_Ze=WD(),CZe=/[\\^$.*+?()[\]{}|]/g,vZe=/^\[object .+?Constructor\]$/,xZe=Function.prototype,bZe=Object.prototype,yZe=xZe.toString,SZe=bZe.hasOwnProperty,PZe=RegExp("^"+yZe.call(SZe).replace(CZe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wZe(e){if(!gZe(e)||hZe(e))return!1;var o=fZe(e)?PZe:vZe;return o.test(_Ze(e))}wq.exports=wZe});var Dq=pt((aSn,Mq)=>{function TZe(e,o){return e?.[o]}Mq.exports=TZe});var mm=pt((rSn,Eq)=>{var MZe=Tq(),DZe=Dq();function EZe(e,o){var t=DZe(e,o);return MZe(t)?t:void 0}Eq.exports=EZe});var Kb=pt((lSn,Iq)=>{var IZe=mm(),OZe=xs(),AZe=IZe(OZe,"Map");Iq.exports=AZe});var z1=pt((sSn,Oq)=>{var kZe=mm(),FZe=kZe(Object,"create");Oq.exports=FZe});var Fq=pt((cSn,kq)=>{var Aq=z1();function BZe(){this.__data__=Aq?Aq(null):{},this.size=0}kq.exports=BZe});var Rq=pt((pSn,Bq)=>{function RZe(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}Bq.exports=RZe});var Lq=pt((mSn,Nq)=>{var NZe=z1(),LZe="__lodash_hash_undefined__",VZe=Object.prototype,qZe=VZe.hasOwnProperty;function zZe(e){var o=this.__data__;if(NZe){var t=o[e];return t===LZe?void 0:t}return qZe.call(o,e)?o[e]:void 0}Nq.exports=zZe});var qq=pt((dSn,Vq)=>{var HZe=z1(),GZe=Object.prototype,jZe=GZe.hasOwnProperty;function $Ze(e){var o=this.__data__;return HZe?o[e]!==void 0:jZe.call(o,e)}Vq.exports=$Ze});var Hq=pt((uSn,zq)=>{var UZe=z1(),WZe="__lodash_hash_undefined__";function QZe(e,o){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=UZe&&o===void 0?WZe:o,this}zq.exports=QZe});var jq=pt((fSn,Gq)=>{var YZe=Fq(),KZe=Rq(),JZe=Lq(),XZe=qq(),ZZe=Hq();function Su(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var $q=jq(),eet=V1(),tet=Kb();function iet(){this.size=0,this.__data__={hash:new $q,map:new(tet||eet),string:new $q}}Uq.exports=iet});var Yq=pt((gSn,Qq)=>{function net(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}Qq.exports=net});var H1=pt((_Sn,Kq)=>{var oet=Yq();function aet(e,o){var t=e.__data__;return oet(o)?t[typeof o=="string"?"string":"hash"]:t.map}Kq.exports=aet});var Xq=pt((CSn,Jq)=>{var ret=H1();function set(e){var o=ret(this,e).delete(e);return this.size-=o?1:0,o}Jq.exports=set});var ez=pt((vSn,Zq)=>{var cet=H1();function pet(e){return cet(this,e).get(e)}Zq.exports=pet});var iz=pt((xSn,tz)=>{var met=H1();function det(e){return met(this,e).has(e)}tz.exports=det});var oz=pt((bSn,nz)=>{var uet=H1();function fet(e,o){var t=uet(this,e),n=t.size;return t.set(e,o),this.size+=t.size==n?0:1,this}nz.exports=fet});var Jb=pt((ySn,az)=>{var het=Wq(),get=Xq(),_et=ez(),Cet=iz(),vet=oz();function Pu(e){var o=-1,t=e==null?0:e.length;for(this.clear();++o{var xet=V1(),bet=Kb(),yet=Jb(),Pet=200;function wet(e,o){var t=this.__data__;if(t instanceof xet){var n=t.__data__;if(!bet||n.length{var Tet=V1(),Met=XV(),Det=eq(),Eet=iq(),Iet=oq(),Oet=lz();function wu(e){var o=this.__data__=new Tet(e);this.size=o.size}wu.prototype.clear=Met;wu.prototype.delete=Det;wu.prototype.get=Eet;wu.prototype.has=Iet;wu.prototype.set=Oet;sz.exports=wu});var Xb=pt((wSn,cz)=>{function Aet(e,o){for(var t=-1,n=e==null?0:e.length;++t{var ket=mm(),Fet=(function(){try{var e=ket(Object,"defineProperty");return e({},"",{}),e}catch{}})();pz.exports=Fet});var j1=pt((MSn,dz)=>{var mz=QD();function Bet(e,o,t){o=="__proto__"&&mz?mz(e,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[o]=t}dz.exports=Bet});var $1=pt((DSn,uz)=>{var Ret=j1(),Net=Jd(),Let=Object.prototype,Vet=Let.hasOwnProperty;function qet(e,o,t){var n=e[o];(!(Vet.call(e,o)&&Net(n,t))||t===void 0&&!(o in e))&&Ret(e,o,t)}uz.exports=qet});var Tu=pt((ESn,fz)=>{var zet=$1(),Het=j1();function Get(e,o,t,n){var i=!t;t||(t={});for(var s=-1,d=o.length;++s{function jet(e,o){for(var t=-1,n=Array(e);++t{function $et(e){return e!=null&&typeof e=="object"}_z.exports=$et});var vz=pt((ASn,Cz)=>{var Uet=pm(),Wet=Qs(),Qet="[object Arguments]";function Yet(e){return Wet(e)&&Uet(e)==Qet}Cz.exports=Yet});var Mu=pt((kSn,yz)=>{var xz=vz(),Ket=Qs(),bz=Object.prototype,Jet=bz.hasOwnProperty,Xet=bz.propertyIsEnumerable,Zet=xz((function(){return arguments})())?xz:function(e){return Ket(e)&&Jet.call(e,"callee")&&!Xet.call(e,"callee")};yz.exports=Zet});var Za=pt((FSn,Sz)=>{var ett=Array.isArray;Sz.exports=ett});var wz=pt((BSn,Pz)=>{function ttt(){return!1}Pz.exports=ttt});var Zd=pt((U1,Du)=>{var itt=xs(),ntt=wz(),Dz=typeof U1=="object"&&U1&&!U1.nodeType&&U1,Tz=Dz&&typeof Du=="object"&&Du&&!Du.nodeType&&Du,ott=Tz&&Tz.exports===Dz,Mz=ott?itt.Buffer:void 0,att=Mz?Mz.isBuffer:void 0,rtt=att||ntt;Du.exports=rtt});var W1=pt((RSn,Ez)=>{var ltt=9007199254740991,stt=/^(?:0|[1-9]\d*)$/;function ctt(e,o){var t=typeof e;return o=o??ltt,!!o&&(t=="number"||t!="symbol"&&stt.test(e))&&e>-1&&e%1==0&&e{var ptt=9007199254740991;function mtt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ptt}Iz.exports=mtt});var Az=pt((LSn,Oz)=>{var dtt=pm(),utt=Zb(),ftt=Qs(),htt="[object Arguments]",gtt="[object Array]",_tt="[object Boolean]",Ctt="[object Date]",vtt="[object Error]",xtt="[object Function]",btt="[object Map]",ytt="[object Number]",Stt="[object Object]",Ptt="[object RegExp]",wtt="[object Set]",Ttt="[object String]",Mtt="[object WeakMap]",Dtt="[object ArrayBuffer]",Ett="[object DataView]",Itt="[object Float32Array]",Ott="[object Float64Array]",Att="[object Int8Array]",ktt="[object Int16Array]",Ftt="[object Int32Array]",Btt="[object Uint8Array]",Rtt="[object Uint8ClampedArray]",Ntt="[object Uint16Array]",Ltt="[object Uint32Array]",Da={};Da[Itt]=Da[Ott]=Da[Att]=Da[ktt]=Da[Ftt]=Da[Btt]=Da[Rtt]=Da[Ntt]=Da[Ltt]=!0;Da[htt]=Da[gtt]=Da[Dtt]=Da[_tt]=Da[Ett]=Da[Ctt]=Da[vtt]=Da[xtt]=Da[btt]=Da[ytt]=Da[Stt]=Da[Ptt]=Da[wtt]=Da[Ttt]=Da[Mtt]=!1;function Vtt(e){return ftt(e)&&utt(e.length)&&!!Da[dtt(e)]}Oz.exports=Vtt});var Q1=pt((VSn,kz)=>{function qtt(e){return function(o){return e(o)}}kz.exports=qtt});var ey=pt((Y1,Eu)=>{var ztt=$D(),Fz=typeof Y1=="object"&&Y1&&!Y1.nodeType&&Y1,K1=Fz&&typeof Eu=="object"&&Eu&&!Eu.nodeType&&Eu,Htt=K1&&K1.exports===Fz,YD=Htt&&ztt.process,Gtt=(function(){try{var e=K1&&K1.require&&K1.require("util").types;return e||YD&&YD.binding&&YD.binding("util")}catch{}})();Eu.exports=Gtt});var Iu=pt((qSn,Nz)=>{var jtt=Az(),$tt=Q1(),Bz=ey(),Rz=Bz&&Bz.isTypedArray,Utt=Rz?$tt(Rz):jtt;Nz.exports=Utt});var KD=pt((zSn,Lz)=>{var Wtt=gz(),Qtt=Mu(),Ytt=Za(),Ktt=Zd(),Jtt=W1(),Xtt=Iu(),Ztt=Object.prototype,eit=Ztt.hasOwnProperty;function tit(e,o){var t=Ytt(e),n=!t&&Qtt(e),i=!t&&!n&&Ktt(e),s=!t&&!n&&!i&&Xtt(e),d=t||n||i||s,u=d?Wtt(e.length,String):[],f=u.length;for(var _ in e)(o||eit.call(e,_))&&!(d&&(_=="length"||i&&(_=="offset"||_=="parent")||s&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||Jtt(_,f)))&&u.push(_);return u}Lz.exports=tit});var J1=pt((HSn,Vz)=>{var iit=Object.prototype;function nit(e){var o=e&&e.constructor,t=typeof o=="function"&&o.prototype||iit;return e===t}Vz.exports=nit});var JD=pt((GSn,qz)=>{function oit(e,o){return function(t){return e(o(t))}}qz.exports=oit});var Hz=pt((jSn,zz)=>{var ait=JD(),rit=ait(Object.keys,Object);zz.exports=rit});var ty=pt(($Sn,Gz)=>{var lit=J1(),sit=Hz(),cit=Object.prototype,pit=cit.hasOwnProperty;function mit(e){if(!lit(e))return sit(e);var o=[];for(var t in Object(e))pit.call(e,t)&&t!="constructor"&&o.push(t);return o}Gz.exports=mit});var Dc=pt((USn,jz)=>{var dit=yu(),uit=Zb();function fit(e){return e!=null&&uit(e.length)&&!dit(e)}jz.exports=fit});var cp=pt((WSn,$z)=>{var hit=KD(),git=ty(),_it=Dc();function Cit(e){return _it(e)?hit(e):git(e)}$z.exports=Cit});var Wz=pt((QSn,Uz)=>{var vit=Tu(),xit=cp();function bit(e,o){return e&&vit(o,xit(o),e)}Uz.exports=bit});var Yz=pt((YSn,Qz)=>{function yit(e){var o=[];if(e!=null)for(var t in Object(e))o.push(t);return o}Qz.exports=yit});var Jz=pt((KSn,Kz)=>{var Sit=$l(),Pit=J1(),wit=Yz(),Tit=Object.prototype,Mit=Tit.hasOwnProperty;function Dit(e){if(!Sit(e))return wit(e);var o=Pit(e),t=[];for(var n in e)n=="constructor"&&(o||!Mit.call(e,n))||t.push(n);return t}Kz.exports=Dit});var dm=pt((JSn,Xz)=>{var Eit=KD(),Iit=Jz(),Oit=Dc();function Ait(e){return Oit(e)?Eit(e,!0):Iit(e)}Xz.exports=Ait});var eH=pt((XSn,Zz)=>{var kit=Tu(),Fit=dm();function Bit(e,o){return e&&kit(o,Fit(o),e)}Zz.exports=Bit});var XD=pt((X1,Ou)=>{var Rit=xs(),oH=typeof X1=="object"&&X1&&!X1.nodeType&&X1,tH=oH&&typeof Ou=="object"&&Ou&&!Ou.nodeType&&Ou,Nit=tH&&tH.exports===oH,iH=Nit?Rit.Buffer:void 0,nH=iH?iH.allocUnsafe:void 0;function Lit(e,o){if(o)return e.slice();var t=e.length,n=nH?nH(t):new e.constructor(t);return e.copy(n),n}Ou.exports=Lit});var ZD=pt((ZSn,aH)=>{function Vit(e,o){var t=-1,n=e.length;for(o||(o=Array(n));++t{function qit(e,o){for(var t=-1,n=e==null?0:e.length,i=0,s=[];++t{function zit(){return[]}lH.exports=zit});var iy=pt((iPn,cH)=>{var Hit=eE(),Git=tE(),jit=Object.prototype,$it=jit.propertyIsEnumerable,sH=Object.getOwnPropertySymbols,Uit=sH?function(e){return e==null?[]:(e=Object(e),Hit(sH(e),function(o){return $it.call(e,o)}))}:Git;cH.exports=Uit});var mH=pt((nPn,pH)=>{var Wit=Tu(),Qit=iy();function Yit(e,o){return Wit(e,Qit(e),o)}pH.exports=Yit});var ny=pt((oPn,dH)=>{function Kit(e,o){for(var t=-1,n=o.length,i=e.length;++t{var Jit=JD(),Xit=Jit(Object.getPrototypeOf,Object);uH.exports=Xit});var iE=pt((rPn,fH)=>{var Zit=ny(),ent=Z1(),tnt=iy(),int=tE(),nnt=Object.getOwnPropertySymbols,ont=nnt?function(e){for(var o=[];e;)Zit(o,tnt(e)),e=ent(e);return o}:int;fH.exports=ont});var gH=pt((lPn,hH)=>{var ant=Tu(),rnt=iE();function lnt(e,o){return ant(e,rnt(e),o)}hH.exports=lnt});var nE=pt((sPn,_H)=>{var snt=ny(),cnt=Za();function pnt(e,o,t){var n=o(e);return cnt(e)?n:snt(n,t(e))}_H.exports=pnt});var oE=pt((cPn,CH)=>{var mnt=nE(),dnt=iy(),unt=cp();function fnt(e){return mnt(e,unt,dnt)}CH.exports=fnt});var xH=pt((pPn,vH)=>{var hnt=nE(),gnt=iE(),_nt=dm();function Cnt(e){return hnt(e,_nt,gnt)}vH.exports=Cnt});var yH=pt((mPn,bH)=>{var vnt=mm(),xnt=xs(),bnt=vnt(xnt,"DataView");bH.exports=bnt});var PH=pt((dPn,SH)=>{var ynt=mm(),Snt=xs(),Pnt=ynt(Snt,"Promise");SH.exports=Pnt});var aE=pt((uPn,wH)=>{var wnt=mm(),Tnt=xs(),Mnt=wnt(Tnt,"Set");wH.exports=Mnt});var MH=pt((fPn,TH)=>{var Dnt=mm(),Ent=xs(),Int=Dnt(Ent,"WeakMap");TH.exports=Int});var t0=pt((hPn,FH)=>{var rE=yH(),lE=Kb(),sE=PH(),cE=aE(),pE=MH(),kH=pm(),Au=WD(),DH="[object Map]",Ont="[object Object]",EH="[object Promise]",IH="[object Set]",OH="[object WeakMap]",AH="[object DataView]",Ant=Au(rE),knt=Au(lE),Fnt=Au(sE),Bnt=Au(cE),Rnt=Au(pE),e0=kH;(rE&&e0(new rE(new ArrayBuffer(1)))!=AH||lE&&e0(new lE)!=DH||sE&&e0(sE.resolve())!=EH||cE&&e0(new cE)!=IH||pE&&e0(new pE)!=OH)&&(e0=function(e){var o=kH(e),t=o==Ont?e.constructor:void 0,n=t?Au(t):"";if(n)switch(n){case Ant:return AH;case knt:return DH;case Fnt:return EH;case Bnt:return IH;case Rnt:return OH}return o});FH.exports=e0});var RH=pt((gPn,BH)=>{var Nnt=Object.prototype,Lnt=Nnt.hasOwnProperty;function Vnt(e){var o=e.length,t=new e.constructor(o);return o&&typeof e[0]=="string"&&Lnt.call(e,"index")&&(t.index=e.index,t.input=e.input),t}BH.exports=Vnt});var mE=pt((_Pn,NH)=>{var qnt=xs(),znt=qnt.Uint8Array;NH.exports=znt});var oy=pt((CPn,VH)=>{var LH=mE();function Hnt(e){var o=new e.constructor(e.byteLength);return new LH(o).set(new LH(e)),o}VH.exports=Hnt});var zH=pt((vPn,qH)=>{var Gnt=oy();function jnt(e,o){var t=o?Gnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}qH.exports=jnt});var GH=pt((xPn,HH)=>{var $nt=/\w*$/;function Unt(e){var o=new e.constructor(e.source,$nt.exec(e));return o.lastIndex=e.lastIndex,o}HH.exports=Unt});var QH=pt((bPn,WH)=>{var jH=Xd(),$H=jH?jH.prototype:void 0,UH=$H?$H.valueOf:void 0;function Wnt(e){return UH?Object(UH.call(e)):{}}WH.exports=Wnt});var dE=pt((yPn,YH)=>{var Qnt=oy();function Ynt(e,o){var t=o?Qnt(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}YH.exports=Ynt});var JH=pt((SPn,KH)=>{var Knt=oy(),Jnt=zH(),Xnt=GH(),Znt=QH(),eot=dE(),tot="[object Boolean]",iot="[object Date]",not="[object Map]",oot="[object Number]",aot="[object RegExp]",rot="[object Set]",lot="[object String]",sot="[object Symbol]",cot="[object ArrayBuffer]",pot="[object DataView]",mot="[object Float32Array]",dot="[object Float64Array]",uot="[object Int8Array]",fot="[object Int16Array]",hot="[object Int32Array]",got="[object Uint8Array]",_ot="[object Uint8ClampedArray]",Cot="[object Uint16Array]",vot="[object Uint32Array]";function xot(e,o,t){var n=e.constructor;switch(o){case cot:return Knt(e);case tot:case iot:return new n(+e);case pot:return Jnt(e,t);case mot:case dot:case uot:case fot:case hot:case got:case _ot:case Cot:case vot:return eot(e,t);case not:return new n;case oot:case lot:return new n(e);case aot:return Xnt(e);case rot:return new n;case sot:return Znt(e)}}KH.exports=xot});var uE=pt((PPn,ZH)=>{var bot=$l(),XH=Object.create,yot=(function(){function e(){}return function(o){if(!bot(o))return{};if(XH)return XH(o);e.prototype=o;var t=new e;return e.prototype=void 0,t}})();ZH.exports=yot});var fE=pt((wPn,eG)=>{var Sot=uE(),Pot=Z1(),wot=J1();function Tot(e){return typeof e.constructor=="function"&&!wot(e)?Sot(Pot(e)):{}}eG.exports=Tot});var iG=pt((TPn,tG)=>{var Mot=t0(),Dot=Qs(),Eot="[object Map]";function Iot(e){return Dot(e)&&Mot(e)==Eot}tG.exports=Iot});var rG=pt((MPn,aG)=>{var Oot=iG(),Aot=Q1(),nG=ey(),oG=nG&&nG.isMap,kot=oG?Aot(oG):Oot;aG.exports=kot});var sG=pt((DPn,lG)=>{var Fot=t0(),Bot=Qs(),Rot="[object Set]";function Not(e){return Bot(e)&&Fot(e)==Rot}lG.exports=Not});var dG=pt((EPn,mG)=>{var Lot=sG(),Vot=Q1(),cG=ey(),pG=cG&&cG.isSet,qot=pG?Vot(pG):Lot;mG.exports=qot});var hE=pt((IPn,gG)=>{var zot=G1(),Hot=Xb(),Got=$1(),jot=Wz(),$ot=eH(),Uot=XD(),Wot=ZD(),Qot=mH(),Yot=gH(),Kot=oE(),Jot=xH(),Xot=t0(),Zot=RH(),eat=JH(),tat=fE(),iat=Za(),nat=Zd(),oat=rG(),aat=$l(),rat=dG(),lat=cp(),sat=dm(),cat=1,pat=2,mat=4,uG="[object Arguments]",dat="[object Array]",uat="[object Boolean]",fat="[object Date]",hat="[object Error]",fG="[object Function]",gat="[object GeneratorFunction]",_at="[object Map]",Cat="[object Number]",hG="[object Object]",vat="[object RegExp]",xat="[object Set]",bat="[object String]",yat="[object Symbol]",Sat="[object WeakMap]",Pat="[object ArrayBuffer]",wat="[object DataView]",Tat="[object Float32Array]",Mat="[object Float64Array]",Dat="[object Int8Array]",Eat="[object Int16Array]",Iat="[object Int32Array]",Oat="[object Uint8Array]",Aat="[object Uint8ClampedArray]",kat="[object Uint16Array]",Fat="[object Uint32Array]",Pa={};Pa[uG]=Pa[dat]=Pa[Pat]=Pa[wat]=Pa[uat]=Pa[fat]=Pa[Tat]=Pa[Mat]=Pa[Dat]=Pa[Eat]=Pa[Iat]=Pa[_at]=Pa[Cat]=Pa[hG]=Pa[vat]=Pa[xat]=Pa[bat]=Pa[yat]=Pa[Oat]=Pa[Aat]=Pa[kat]=Pa[Fat]=!0;Pa[hat]=Pa[fG]=Pa[Sat]=!1;function ay(e,o,t,n,i,s){var d,u=o&cat,f=o&pat,_=o&mat;if(t&&(d=i?t(e,n,i,s):t(e)),d!==void 0)return d;if(!aat(e))return e;var C=iat(e);if(C){if(d=Zot(e),!u)return Wot(e,d)}else{var x=Xot(e),y=x==fG||x==gat;if(nat(e))return Uot(e,u);if(x==hG||x==uG||y&&!i){if(d=f||y?{}:tat(e),!u)return f?Yot(e,$ot(d,e)):Qot(e,jot(d,e))}else{if(!Pa[x])return i?e:{};d=eat(e,x,u)}}s||(s=new zot);var w=s.get(e);if(w)return w;s.set(e,d),rat(e)?e.forEach(function(D){d.add(ay(D,o,t,D,e,s))}):oat(e)&&e.forEach(function(D,F){d.set(F,ay(D,o,t,F,e,s))});var P=_?f?Jot:Kot:f?sat:lat,M=C?void 0:P(e);return Hot(M||e,function(D,F){M&&(F=D,D=e[F]),Got(d,F,ay(D,o,t,F,e,s))}),d}gG.exports=ay});var CG=pt((OPn,_G)=>{var Bat=hE(),Rat=4;function Nat(e){return Bat(e,Rat)}_G.exports=Nat});var ry=pt((APn,vG)=>{function Lat(e){return function(){return e}}vG.exports=Lat});var bG=pt((kPn,xG)=>{function Vat(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}}xG.exports=Vat});var ly=pt((FPn,yG)=>{var qat=bG(),zat=qat();yG.exports=zat});var sy=pt((BPn,SG)=>{var Hat=ly(),Gat=cp();function jat(e,o){return e&&Hat(e,o,Gat)}SG.exports=jat});var wG=pt((RPn,PG)=>{var $at=Dc();function Uat(e,o){return function(t,n){if(t==null)return t;if(!$at(t))return e(t,n);for(var i=t.length,s=o?i:-1,d=Object(t);(o?s--:++s{var Wat=sy(),Qat=wG(),Yat=Qat(Wat);TG.exports=Yat});var um=pt((LPn,MG)=>{function Kat(e){return e}MG.exports=Kat});var gE=pt((VPn,DG)=>{var Jat=um();function Xat(e){return typeof e=="function"?e:Jat}DG.exports=Xat});var _E=pt((qPn,EG)=>{var Zat=Xb(),ert=eh(),trt=gE(),irt=Za();function nrt(e,o){var t=irt(e)?Zat:ert;return t(e,trt(o))}EG.exports=nrt});var CE=pt((zPn,IG)=>{IG.exports=_E()});var AG=pt((HPn,OG)=>{var ort=eh();function art(e,o){var t=[];return ort(e,function(n,i,s){o(n,i,s)&&t.push(n)}),t}OG.exports=art});var FG=pt((GPn,kG)=>{var rrt="__lodash_hash_undefined__";function lrt(e){return this.__data__.set(e,rrt),this}kG.exports=lrt});var RG=pt((jPn,BG)=>{function srt(e){return this.__data__.has(e)}BG.exports=srt});var vE=pt(($Pn,NG)=>{var crt=Jb(),prt=FG(),mrt=RG();function cy(e){var o=-1,t=e==null?0:e.length;for(this.__data__=new crt;++o{function drt(e,o){for(var t=-1,n=e==null?0:e.length;++t{function urt(e,o){return e.has(o)}qG.exports=urt});var bE=pt((QPn,zG)=>{var frt=vE(),hrt=VG(),grt=xE(),_rt=1,Crt=2;function vrt(e,o,t,n,i,s){var d=t&_rt,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,w=t&Crt?new frt:void 0;for(s.set(e,o),s.set(o,e);++x{function xrt(e){var o=-1,t=Array(e.size);return e.forEach(function(n,i){t[++o]=[i,n]}),t}HG.exports=xrt});var py=pt((KPn,jG)=>{function brt(e){var o=-1,t=Array(e.size);return e.forEach(function(n){t[++o]=n}),t}jG.exports=brt});var YG=pt((JPn,QG)=>{var $G=Xd(),UG=mE(),yrt=Jd(),Srt=bE(),Prt=GG(),wrt=py(),Trt=1,Mrt=2,Drt="[object Boolean]",Ert="[object Date]",Irt="[object Error]",Ort="[object Map]",Art="[object Number]",krt="[object RegExp]",Frt="[object Set]",Brt="[object String]",Rrt="[object Symbol]",Nrt="[object ArrayBuffer]",Lrt="[object DataView]",WG=$G?$G.prototype:void 0,yE=WG?WG.valueOf:void 0;function Vrt(e,o,t,n,i,s,d){switch(t){case Lrt:if(e.byteLength!=o.byteLength||e.byteOffset!=o.byteOffset)return!1;e=e.buffer,o=o.buffer;case Nrt:return!(e.byteLength!=o.byteLength||!s(new UG(e),new UG(o)));case Drt:case Ert:case Art:return yrt(+e,+o);case Irt:return e.name==o.name&&e.message==o.message;case krt:case Brt:return e==o+"";case Ort:var u=Prt;case Frt:var f=n&Trt;if(u||(u=wrt),e.size!=o.size&&!f)return!1;var _=d.get(e);if(_)return _==o;n|=Mrt,d.set(e,o);var C=Srt(u(e),u(o),n,i,s,d);return d.delete(e),C;case Rrt:if(yE)return yE.call(e)==yE.call(o)}return!1}QG.exports=Vrt});var XG=pt((XPn,JG)=>{var KG=oE(),qrt=1,zrt=Object.prototype,Hrt=zrt.hasOwnProperty;function Grt(e,o,t,n,i,s){var d=t&qrt,u=KG(e),f=u.length,_=KG(o),C=_.length;if(f!=C&&!d)return!1;for(var x=f;x--;){var y=u[x];if(!(d?y in o:Hrt.call(o,y)))return!1}var w=s.get(e),P=s.get(o);if(w&&P)return w==o&&P==e;var M=!0;s.set(e,o),s.set(o,e);for(var D=d;++x{var SE=G1(),jrt=bE(),$rt=YG(),Urt=XG(),ZG=t0(),ej=Za(),tj=Zd(),Wrt=Iu(),Qrt=1,ij="[object Arguments]",nj="[object Array]",my="[object Object]",Yrt=Object.prototype,oj=Yrt.hasOwnProperty;function Krt(e,o,t,n,i,s){var d=ej(e),u=ej(o),f=d?nj:ZG(e),_=u?nj:ZG(o);f=f==ij?my:f,_=_==ij?my:_;var C=f==my,x=_==my,y=f==_;if(y&&tj(e)){if(!tj(o))return!1;d=!0,C=!1}if(y&&!C)return s||(s=new SE),d||Wrt(e)?jrt(e,o,t,n,i,s):$rt(e,o,f,t,n,i,s);if(!(t&Qrt)){var w=C&&oj.call(e,"__wrapped__"),P=x&&oj.call(o,"__wrapped__");if(w||P){var M=w?e.value():e,D=P?o.value():o;return s||(s=new SE),i(M,D,t,n,s)}}return y?(s||(s=new SE),Urt(e,o,t,n,i,s)):!1}aj.exports=Krt});var PE=pt((ewn,cj)=>{var Jrt=rj(),lj=Qs();function sj(e,o,t,n,i){return e===o?!0:e==null||o==null||!lj(e)&&!lj(o)?e!==e&&o!==o:Jrt(e,o,t,n,sj,i)}cj.exports=sj});var mj=pt((twn,pj)=>{var Xrt=G1(),Zrt=PE(),elt=1,tlt=2;function ilt(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 nlt=$l();function olt(e){return e===e&&!nlt(e)}dj.exports=olt});var fj=pt((nwn,uj)=>{var alt=wE(),rlt=cp();function llt(e){for(var o=rlt(e),t=o.length;t--;){var n=o[t],i=e[n];o[t]=[n,i,alt(i)]}return o}uj.exports=llt});var TE=pt((own,hj)=>{function slt(e,o){return function(t){return t==null?!1:t[e]===o&&(o!==void 0||e in Object(t))}}hj.exports=slt});var _j=pt((awn,gj)=>{var clt=mj(),plt=fj(),mlt=TE();function dlt(e){var o=plt(e);return o.length==1&&o[0][2]?mlt(o[0][0],o[0][1]):function(t){return t===e||clt(t,e,o)}}gj.exports=dlt});var i0=pt((rwn,Cj)=>{var ult=pm(),flt=Qs(),hlt="[object Symbol]";function glt(e){return typeof e=="symbol"||flt(e)&&ult(e)==hlt}Cj.exports=glt});var dy=pt((lwn,vj)=>{var _lt=Za(),Clt=i0(),vlt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xlt=/^\w*$/;function blt(e,o){if(_lt(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Clt(e)?!0:xlt.test(e)||!vlt.test(e)||o!=null&&e in Object(o)}vj.exports=blt});var yj=pt((swn,bj)=>{var xj=Jb(),ylt="Expected a function";function ME(e,o){if(typeof e!="function"||o!=null&&typeof o!="function")throw new TypeError(ylt);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||xj),t}ME.Cache=xj;bj.exports=ME});var Pj=pt((cwn,Sj)=>{var Slt=yj(),Plt=500;function wlt(e){var o=Slt(e,function(n){return t.size===Plt&&t.clear(),n}),t=o.cache;return o}Sj.exports=wlt});var Tj=pt((pwn,wj)=>{var Tlt=Pj(),Mlt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dlt=/\\(\\)?/g,Elt=Tlt(function(e){var o=[];return e.charCodeAt(0)===46&&o.push(""),e.replace(Mlt,function(t,n,i,s){o.push(i?s.replace(Dlt,"$1"):n||t)}),o});wj.exports=Elt});var th=pt((mwn,Mj)=>{function Ilt(e,o){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t{var Dj=Xd(),Olt=th(),Alt=Za(),klt=i0(),Flt=1/0,Ej=Dj?Dj.prototype:void 0,Ij=Ej?Ej.toString:void 0;function Oj(e){if(typeof e=="string")return e;if(Alt(e))return Olt(e,Oj)+"";if(klt(e))return Ij?Ij.call(e):"";var o=e+"";return o=="0"&&1/e==-Flt?"-0":o}Aj.exports=Oj});var DE=pt((uwn,Fj)=>{var Blt=kj();function Rlt(e){return e==null?"":Blt(e)}Fj.exports=Rlt});var ih=pt((fwn,Bj)=>{var Nlt=Za(),Llt=dy(),Vlt=Tj(),qlt=DE();function zlt(e,o){return Nlt(e)?e:Llt(e,o)?[e]:Vlt(qlt(e))}Bj.exports=zlt});var ku=pt((hwn,Rj)=>{var Hlt=i0(),Glt=1/0;function jlt(e){if(typeof e=="string"||Hlt(e))return e;var o=e+"";return o=="0"&&1/e==-Glt?"-0":o}Rj.exports=jlt});var nh=pt((gwn,Nj)=>{var $lt=ih(),Ult=ku();function Wlt(e,o){o=$lt(o,e);for(var t=0,n=o.length;e!=null&&t{var Qlt=nh();function Ylt(e,o,t){var n=e==null?void 0:Qlt(e,o);return n===void 0?t:n}Lj.exports=Ylt});var zj=pt((Cwn,qj)=>{function Klt(e,o){return e!=null&&o in Object(e)}qj.exports=Klt});var EE=pt((vwn,Hj)=>{var Jlt=ih(),Xlt=Mu(),Zlt=Za(),est=W1(),tst=Zb(),ist=ku();function nst(e,o,t){o=Jlt(o,e);for(var n=-1,i=o.length,s=!1;++n{var ost=zj(),ast=EE();function rst(e,o){return e!=null&&ast(e,o,ost)}Gj.exports=rst});var $j=pt((bwn,jj)=>{var lst=PE(),sst=Vj(),cst=IE(),pst=dy(),mst=wE(),dst=TE(),ust=ku(),fst=1,hst=2;function gst(e,o){return pst(e)&&mst(o)?dst(ust(e),o):function(t){var n=sst(t,e);return n===void 0&&n===o?cst(t,e):lst(o,n,fst|hst)}}jj.exports=gst});var OE=pt((ywn,Uj)=>{function _st(e){return function(o){return o?.[e]}}Uj.exports=_st});var Qj=pt((Swn,Wj)=>{var Cst=nh();function vst(e){return function(o){return Cst(o,e)}}Wj.exports=vst});var Kj=pt((Pwn,Yj)=>{var xst=OE(),bst=Qj(),yst=dy(),Sst=ku();function Pst(e){return yst(e)?xst(Sst(e)):bst(e)}Yj.exports=Pst});var Ec=pt((wwn,Jj)=>{var wst=_j(),Tst=$j(),Mst=um(),Dst=Za(),Est=Kj();function Ist(e){return typeof e=="function"?e:e==null?Mst:typeof e=="object"?Dst(e)?Tst(e[0],e[1]):wst(e):Est(e)}Jj.exports=Ist});var AE=pt((Twn,Xj)=>{var Ost=eE(),Ast=AG(),kst=Ec(),Fst=Za();function Bst(e,o){var t=Fst(e)?Ost:Ast;return t(e,kst(o,3))}Xj.exports=Bst});var e$=pt((Mwn,Zj)=>{var Rst=Object.prototype,Nst=Rst.hasOwnProperty;function Lst(e,o){return e!=null&&Nst.call(e,o)}Zj.exports=Lst});var kE=pt((Dwn,t$)=>{var Vst=e$(),qst=EE();function zst(e,o){return e!=null&&qst(e,o,Vst)}t$.exports=zst});var n$=pt((Ewn,i$)=>{var Hst=ty(),Gst=t0(),jst=Mu(),$st=Za(),Ust=Dc(),Wst=Zd(),Qst=J1(),Yst=Iu(),Kst="[object Map]",Jst="[object Set]",Xst=Object.prototype,Zst=Xst.hasOwnProperty;function ect(e){if(e==null)return!0;if(Ust(e)&&($st(e)||typeof e=="string"||typeof e.splice=="function"||Wst(e)||Yst(e)||jst(e)))return!e.length;var o=Gst(e);if(o==Kst||o==Jst)return!e.size;if(Qst(e))return!Hst(e).length;for(var t in e)if(Zst.call(e,t))return!1;return!0}i$.exports=ect});var FE=pt((Iwn,o$)=>{function tct(e){return e===void 0}o$.exports=tct});var BE=pt((Own,a$)=>{var ict=eh(),nct=Dc();function oct(e,o){var t=-1,n=nct(e)?Array(e.length):[];return ict(e,function(i,s,d){n[++t]=o(i,s,d)}),n}a$.exports=oct});var RE=pt((Awn,r$)=>{var act=th(),rct=Ec(),lct=BE(),sct=Za();function cct(e,o){var t=sct(e)?act:lct;return t(e,rct(o,3))}r$.exports=cct});var s$=pt((kwn,l$)=>{function pct(e,o,t,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(t=e[++i]);++i{function mct(e,o,t,n,i){return i(e,function(s,d,u){t=n?(n=!1,s):o(t,s,d,u)}),t}c$.exports=mct});var NE=pt((Bwn,m$)=>{var dct=s$(),uct=eh(),fct=Ec(),hct=p$(),gct=Za();function _ct(e,o,t){var n=gct(e)?dct:hct,i=arguments.length<3;return n(e,fct(o,4),t,i,uct)}m$.exports=_ct});var u$=pt((Rwn,d$)=>{var Cct=pm(),vct=Za(),xct=Qs(),bct="[object String]";function yct(e){return typeof e=="string"||!vct(e)&&xct(e)&&Cct(e)==bct}d$.exports=yct});var h$=pt((Nwn,f$)=>{var Sct=OE(),Pct=Sct("length");f$.exports=Pct});var _$=pt((Lwn,g$)=>{var wct="\\ud800-\\udfff",Tct="\\u0300-\\u036f",Mct="\\ufe20-\\ufe2f",Dct="\\u20d0-\\u20ff",Ect=Tct+Mct+Dct,Ict="\\ufe0e\\ufe0f",Oct="\\u200d",Act=RegExp("["+Oct+wct+Ect+Ict+"]");function kct(e){return Act.test(e)}g$.exports=kct});var T$=pt((Vwn,w$)=>{var v$="\\ud800-\\udfff",Fct="\\u0300-\\u036f",Bct="\\ufe20-\\ufe2f",Rct="\\u20d0-\\u20ff",Nct=Fct+Bct+Rct,Lct="\\ufe0e\\ufe0f",Vct="["+v$+"]",LE="["+Nct+"]",VE="\\ud83c[\\udffb-\\udfff]",qct="(?:"+LE+"|"+VE+")",x$="[^"+v$+"]",b$="(?:\\ud83c[\\udde6-\\uddff]){2}",y$="[\\ud800-\\udbff][\\udc00-\\udfff]",zct="\\u200d",S$=qct+"?",P$="["+Lct+"]?",Hct="(?:"+zct+"(?:"+[x$,b$,y$].join("|")+")"+P$+S$+")*",Gct=P$+S$+Hct,jct="(?:"+[x$+LE+"?",LE,b$,y$,Vct].join("|")+")",C$=RegExp(VE+"(?="+VE+")|"+jct+Gct,"g");function $ct(e){for(var o=C$.lastIndex=0;C$.test(e);)++o;return o}w$.exports=$ct});var D$=pt((qwn,M$)=>{var Uct=h$(),Wct=_$(),Qct=T$();function Yct(e){return Wct(e)?Qct(e):Uct(e)}M$.exports=Yct});var I$=pt((zwn,E$)=>{var Kct=ty(),Jct=t0(),Xct=Dc(),Zct=u$(),ept=D$(),tpt="[object Map]",ipt="[object Set]";function npt(e){if(e==null)return 0;if(Xct(e))return Zct(e)?ept(e):e.length;var o=Jct(e);return o==tpt||o==ipt?e.size:Kct(e).length}E$.exports=npt});var A$=pt((Hwn,O$)=>{var opt=Xb(),apt=uE(),rpt=sy(),lpt=Ec(),spt=Z1(),cpt=Za(),ppt=Zd(),mpt=yu(),dpt=$l(),upt=Iu();function fpt(e,o,t){var n=cpt(e),i=n||ppt(e)||upt(e);if(o=lpt(o,4),t==null){var s=e&&e.constructor;i?t=n?new s:[]:dpt(e)?t=mpt(s)?apt(spt(e)):{}:t={}}return(i?opt:rpt)(e,function(d,u,f){return o(t,d,u,f)}),t}O$.exports=fpt});var R$=pt((Gwn,B$)=>{var k$=Xd(),hpt=Mu(),gpt=Za(),F$=k$?k$.isConcatSpreadable:void 0;function _pt(e){return gpt(e)||hpt(e)||!!(F$&&e&&e[F$])}B$.exports=_pt});var uy=pt((jwn,L$)=>{var Cpt=ny(),vpt=R$();function N$(e,o,t,n,i){var s=-1,d=e.length;for(t||(t=vpt),i||(i=[]);++s0&&t(u)?o>1?N$(u,o-1,t,n,i):Cpt(i,u):n||(i[i.length]=u)}return i}L$.exports=N$});var q$=pt(($wn,V$)=>{function xpt(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)}V$.exports=xpt});var qE=pt((Uwn,H$)=>{var bpt=q$(),z$=Math.max;function ypt(e,o,t){return o=z$(o===void 0?e.length-1:o,0),function(){for(var n=arguments,i=-1,s=z$(n.length-o,0),d=Array(s);++i{var Spt=ry(),G$=QD(),Ppt=um(),wpt=G$?function(e,o){return G$(e,"toString",{configurable:!0,enumerable:!1,value:Spt(o),writable:!0})}:Ppt;j$.exports=wpt});var W$=pt((Qwn,U$)=>{var Tpt=800,Mpt=16,Dpt=Date.now;function Ept(e){var o=0,t=0;return function(){var n=Dpt(),i=Mpt-(n-t);if(t=n,i>0){if(++o>=Tpt)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}U$.exports=Ept});var zE=pt((Ywn,Q$)=>{var Ipt=$$(),Opt=W$(),Apt=Opt(Ipt);Q$.exports=Apt});var oh=pt((Kwn,Y$)=>{var kpt=um(),Fpt=qE(),Bpt=zE();function Rpt(e,o){return Bpt(Fpt(e,o,kpt),e+"")}Y$.exports=Rpt});var HE=pt((Jwn,K$)=>{function Npt(e,o,t,n){for(var i=e.length,s=t+(n?1:-1);n?s--:++s{function Lpt(e){return e!==e}J$.exports=Lpt});var eU=pt((Zwn,Z$)=>{function Vpt(e,o,t){for(var n=t-1,i=e.length;++n{var qpt=HE(),zpt=X$(),Hpt=eU();function Gpt(e,o,t){return o===o?Hpt(e,o,t):qpt(e,zpt,t)}tU.exports=Gpt});var oU=pt((tTn,nU)=>{var jpt=iU();function $pt(e,o){var t=e==null?0:e.length;return!!t&&jpt(e,o,0)>-1}nU.exports=$pt});var rU=pt((iTn,aU)=>{function Upt(e,o,t){for(var n=-1,i=e==null?0:e.length;++n{function Wpt(){}lU.exports=Wpt});var pU=pt((oTn,cU)=>{var GE=aE(),Qpt=sU(),Ypt=py(),Kpt=1/0,Jpt=GE&&1/Ypt(new GE([,-0]))[1]==Kpt?function(e){return new GE(e)}:Qpt;cU.exports=Jpt});var dU=pt((aTn,mU)=>{var Xpt=vE(),Zpt=oU(),emt=rU(),tmt=xE(),imt=pU(),nmt=py(),omt=200;function amt(e,o,t){var n=-1,i=Zpt,s=e.length,d=!0,u=[],f=u;if(t)d=!1,i=emt;else if(s>=omt){var _=o?null:imt(e);if(_)return nmt(_);d=!1,i=tmt,f=new Xpt}else f=o?[]:u;e:for(;++n{var rmt=Dc(),lmt=Qs();function smt(e){return lmt(e)&&rmt(e)}uU.exports=smt});var hU=pt((lTn,fU)=>{var cmt=uy(),pmt=oh(),mmt=dU(),dmt=jE(),umt=pmt(function(e){return mmt(cmt(e,1,dmt,!0))});fU.exports=umt});var _U=pt((sTn,gU)=>{var fmt=th();function hmt(e,o){return fmt(o,function(t){return e[t]})}gU.exports=hmt});var $E=pt((cTn,CU)=>{var gmt=_U(),_mt=cp();function Cmt(e){return e==null?[]:gmt(e,_mt(e))}CU.exports=Cmt});var Ul=pt((pTn,vU)=>{var fy;if(typeof Fs=="function")try{fy={clone:CG(),constant:ry(),each:CE(),filter:AE(),has:kE(),isArray:Za(),isEmpty:n$(),isFunction:yu(),isUndefined:FE(),keys:cp(),map:RE(),reduce:NE(),size:I$(),transform:A$(),union:hU(),values:$E()}}catch{}fy||(fy=window._);vU.exports=fy});var hy=pt((dTn,SU)=>{"use strict";var ro=Ul();SU.exports=Po;var vmt="\0",n0="\0",xU="";function Po(e){this._isDirected=ro.has(e,"directed")?e.directed:!0,this._isMultigraph=ro.has(e,"multigraph")?e.multigraph:!1,this._isCompound=ro.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ro.constant(void 0),this._defaultEdgeLabelFn=ro.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n0]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Po.prototype._nodeCount=0;Po.prototype._edgeCount=0;Po.prototype.isDirected=function(){return this._isDirected};Po.prototype.isMultigraph=function(){return this._isMultigraph};Po.prototype.isCompound=function(){return this._isCompound};Po.prototype.setGraph=function(e){return this._label=e,this};Po.prototype.graph=function(){return this._label};Po.prototype.setDefaultNodeLabel=function(e){return ro.isFunction(e)||(e=ro.constant(e)),this._defaultNodeLabelFn=e,this};Po.prototype.nodeCount=function(){return this._nodeCount};Po.prototype.nodes=function(){return ro.keys(this._nodes)};Po.prototype.sources=function(){var e=this;return ro.filter(this.nodes(),function(o){return ro.isEmpty(e._in[o])})};Po.prototype.sinks=function(){var e=this;return ro.filter(this.nodes(),function(o){return ro.isEmpty(e._out[o])})};Po.prototype.setNodes=function(e,o){var t=arguments,n=this;return ro.each(e,function(i){t.length>1?n.setNode(i,o):n.setNode(i)}),this};Po.prototype.setNode=function(e,o){return ro.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]=n0,this._children[e]={},this._children[n0][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};Po.prototype.node=function(e){return this._nodes[e]};Po.prototype.hasNode=function(e){return ro.has(this._nodes,e)};Po.prototype.removeNode=function(e){var o=this;if(ro.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],ro.each(this.children(e),function(n){o.setParent(n)}),delete this._children[e]),ro.each(ro.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ro.each(ro.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};Po.prototype.setParent=function(e,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ro.isUndefined(o))o=n0;else{o+="";for(var t=o;!ro.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};Po.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};Po.prototype.parent=function(e){if(this._isCompound){var o=this._parent[e];if(o!==n0)return o}};Po.prototype.children=function(e){if(ro.isUndefined(e)&&(e=n0),this._isCompound){var o=this._children[e];if(o)return ro.keys(o)}else{if(e===n0)return this.nodes();if(this.hasNode(e))return[]}};Po.prototype.predecessors=function(e){var o=this._preds[e];if(o)return ro.keys(o)};Po.prototype.successors=function(e){var o=this._sucs[e];if(o)return ro.keys(o)};Po.prototype.neighbors=function(e){var o=this.predecessors(e);if(o)return ro.union(o,this.successors(e))};Po.prototype.isLeaf=function(e){var o;return this.isDirected()?o=this.successors(e):o=this.neighbors(e),o.length===0};Po.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;ro.each(this._nodes,function(s,d){e(d)&&o.setNode(d,s)}),ro.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&&ro.each(o.nodes(),function(s){o.setParent(s,i(s))}),o};Po.prototype.setDefaultEdgeLabel=function(e){return ro.isFunction(e)||(e=ro.constant(e)),this._defaultEdgeLabelFn=e,this};Po.prototype.edgeCount=function(){return this._edgeCount};Po.prototype.edges=function(){return ro.values(this._edgeObjs)};Po.prototype.setPath=function(e,o){var t=this,n=arguments;return ro.reduce(e,function(i,s){return n.length>1?t.setEdge(i,s,o):t.setEdge(i,s),s}),this};Po.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,ro.isUndefined(t)||(t=""+t);var d=ah(this._isDirected,e,o,t);if(ro.has(this._edgeLabels,d))return i&&(this._edgeLabels[d]=n),this;if(!ro.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=xmt(this._isDirected,e,o,t);return e=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,bU(this._preds[o],e),bU(this._sucs[e],o),this._in[o][d]=u,this._out[e][d]=u,this._edgeCount++,this};Po.prototype.edge=function(e,o,t){var n=arguments.length===1?UE(this._isDirected,arguments[0]):ah(this._isDirected,e,o,t);return this._edgeLabels[n]};Po.prototype.hasEdge=function(e,o,t){var n=arguments.length===1?UE(this._isDirected,arguments[0]):ah(this._isDirected,e,o,t);return ro.has(this._edgeLabels,n)};Po.prototype.removeEdge=function(e,o,t){var n=arguments.length===1?UE(this._isDirected,arguments[0]):ah(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],yU(this._preds[o],e),yU(this._sucs[e],o),delete this._in[o][n],delete this._out[e][n],this._edgeCount--),this};Po.prototype.inEdges=function(e,o){var t=this._in[e];if(t){var n=ro.values(t);return o?ro.filter(n,function(i){return i.v===o}):n}};Po.prototype.outEdges=function(e,o){var t=this._out[e];if(t){var n=ro.values(t);return o?ro.filter(n,function(i){return i.w===o}):n}};Po.prototype.nodeEdges=function(e,o){var t=this.inEdges(e,o);if(t)return t.concat(this.outEdges(e,o))};function bU(e,o){e[o]?e[o]++:e[o]=1}function yU(e,o){--e[o]||delete e[o]}function ah(e,o,t,n){var i=""+o,s=""+t;if(!e&&i>s){var d=i;i=s,s=d}return i+xU+s+xU+(ro.isUndefined(n)?vmt:n)}function xmt(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 UE(e,o){return ah(e,o.v,o.w,o.name)}});var wU=pt((uTn,PU)=>{PU.exports="2.1.8"});var MU=pt((fTn,TU)=>{TU.exports={Graph:hy(),version:wU()}});var EU=pt((hTn,DU)=>{var Ic=Ul(),bmt=hy();DU.exports={write:ymt,read:wmt};function ymt(e){var o={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Smt(e),edges:Pmt(e)};return Ic.isUndefined(e.graph())||(o.value=Ic.clone(e.graph())),o}function Smt(e){return Ic.map(e.nodes(),function(o){var t=e.node(o),n=e.parent(o),i={v:o};return Ic.isUndefined(t)||(i.value=t),Ic.isUndefined(n)||(i.parent=n),i})}function Pmt(e){return Ic.map(e.edges(),function(o){var t=e.edge(o),n={v:o.v,w:o.w};return Ic.isUndefined(o.name)||(n.name=o.name),Ic.isUndefined(t)||(n.value=t),n})}function wmt(e){var o=new bmt(e.options).setGraph(e.value);return Ic.each(e.nodes,function(t){o.setNode(t.v,t.value),t.parent&&o.setParent(t.v,t.parent)}),Ic.each(e.edges,function(t){o.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),o}});var OU=pt((gTn,IU)=>{var gy=Ul();IU.exports=Tmt;function Tmt(e){var o={},t=[],n;function i(s){gy.has(o,s)||(o[s]=!0,n.push(s),gy.each(e.successors(s),i),gy.each(e.predecessors(s),i))}return gy.each(e.nodes(),function(s){n=[],i(s),n.length&&t.push(n)}),t}});var WE=pt((_Tn,kU)=>{var AU=Ul();kU.exports=bs;function bs(){this._arr=[],this._keyIndices={}}bs.prototype.size=function(){return this._arr.length};bs.prototype.keys=function(){return this._arr.map(function(e){return e.key})};bs.prototype.has=function(e){return AU.has(this._keyIndices,e)};bs.prototype.priority=function(e){var o=this._keyIndices[e];if(o!==void 0)return this._arr[o].priority};bs.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};bs.prototype.add=function(e,o){var t=this._keyIndices;if(e=String(e),!AU.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};bs.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};bs.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)};bs.prototype._heapify=function(e){var o=this._arr,t=2*e,n=t+1,i=e;t>1,!(o[n].priority{var Mmt=Ul(),Dmt=WE();FU.exports=Imt;var Emt=Mmt.constant(1);function Imt(e,o,t,n){return Omt(e,String(o),t||Emt,n||function(i){return e.outEdges(i)})}function Omt(e,o,t,n){var i={},s=new Dmt,d,u,f=function(_){var C=_.v!==d?_.v:_.w,x=i[C],y=t(_),w=u.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+y);w0&&(d=s.removeMin(),u=i[d],u.distance!==Number.POSITIVE_INFINITY);)n(d).forEach(f);return i}});var RU=pt((vTn,BU)=>{var Amt=QE(),kmt=Ul();BU.exports=Fmt;function Fmt(e,o,t){return kmt.transform(e.nodes(),function(n,i){n[i]=Amt(e,i,o,t)},{})}});var YE=pt((xTn,LU)=>{var NU=Ul();LU.exports=Bmt;function Bmt(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){NU.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){NU.has(n,d)||s(d)}),i}});var qU=pt((bTn,VU)=>{var Rmt=Ul(),Nmt=YE();VU.exports=Lmt;function Lmt(e){return Rmt.filter(Nmt(e),function(o){return o.length>1||o.length===1&&e.hasEdge(o[0],o[0])})}});var HU=pt((yTn,zU)=>{var Vmt=Ul();zU.exports=zmt;var qmt=Vmt.constant(1);function zmt(e,o,t){return Hmt(e,o||qmt,t||function(n){return e.outEdges(n)})}function Hmt(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[_],w=C.distance+x.distance;w{var rh=Ul();jU.exports=GU;GU.CycleException=_y;function GU(e){var o={},t={},n=[];function i(s){if(rh.has(t,s))throw new _y;rh.has(o,s)||(t[s]=!0,o[s]=!0,rh.each(e.predecessors(s),i),delete t[s],n.push(s))}if(rh.each(e.sinks(),i),rh.size(o)!==e.nodeCount())throw new _y;return n}function _y(){}_y.prototype=new Error});var WU=pt((PTn,UU)=>{var $U=KE();UU.exports=Gmt;function Gmt(e){try{$U(e)}catch(o){if(o instanceof $U.CycleException)return!1;throw o}return!0}});var JE=pt((wTn,YU)=>{var Cy=Ul();YU.exports=jmt;function jmt(e,o,t){Cy.isArray(o)||(o=[o]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return Cy.each(o,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);QU(e,d,t==="post",s,n,i)}),i}function QU(e,o,t,n,i,s){Cy.has(n,o)||(n[o]=!0,t||s.push(o),Cy.each(i(o),function(d){QU(e,d,t,n,i,s)}),t&&s.push(o))}});var JU=pt((TTn,KU)=>{var $mt=JE();KU.exports=Umt;function Umt(e,o){return $mt(e,o,"post")}});var ZU=pt((MTn,XU)=>{var Wmt=JE();XU.exports=Qmt;function Qmt(e,o){return Wmt(e,o,"pre")}});var iW=pt((DTn,tW)=>{var eW=Ul(),Ymt=hy(),Kmt=WE();tW.exports=Jmt;function Jmt(e,o){var t=new Ymt,n={},i=new Kmt,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(),eW.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 oW=pt((ETn,nW)=>{nW.exports={components:OU(),dijkstra:QE(),dijkstraAll:RU(),findCycles:qU(),floydWarshall:HU(),isAcyclic:WU(),postorder:JU(),preorder:ZU(),prim:iW(),tarjan:YE(),topsort:KE()}});var lW=pt((ITn,rW)=>{var aW=MU();rW.exports={Graph:aW.Graph,json:EU(),alg:oW(),version:aW.version}});var ys=pt((OTn,sW)=>{var vy;if(typeof Fs=="function")try{vy=lW()}catch{}vy||(vy=window.graphlib);sW.exports=vy});var pW=pt((kTn,cW)=>{var Xmt=hE(),Zmt=1,edt=4;function tdt(e){return Xmt(e,Zmt|edt)}cW.exports=tdt});var lh=pt((FTn,mW)=>{var idt=Jd(),ndt=Dc(),odt=W1(),adt=$l();function rdt(e,o,t){if(!adt(t))return!1;var n=typeof o;return(n=="number"?ndt(t)&&odt(o,t.length):n=="string"&&o in t)?idt(t[o],e):!1}mW.exports=rdt});var fW=pt((BTn,uW)=>{var ldt=oh(),sdt=Jd(),cdt=lh(),pdt=dm(),dW=Object.prototype,mdt=dW.hasOwnProperty,ddt=ldt(function(e,o){e=Object(e);var t=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&cdt(o[0],o[1],i)&&(n=1);++t{var udt=Ec(),fdt=Dc(),hdt=cp();function gdt(e){return function(o,t,n){var i=Object(o);if(!fdt(o)){var s=udt(t,3);o=hdt(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}}hW.exports=gdt});var CW=pt((NTn,_W)=>{var _dt=/\s/;function Cdt(e){for(var o=e.length;o--&&_dt.test(e.charAt(o)););return o}_W.exports=Cdt});var xW=pt((LTn,vW)=>{var vdt=CW(),xdt=/^\s+/;function bdt(e){return e&&e.slice(0,vdt(e)+1).replace(xdt,"")}vW.exports=bdt});var PW=pt((VTn,SW)=>{var ydt=xW(),bW=$l(),Sdt=i0(),yW=NaN,Pdt=/^[-+]0x[0-9a-f]+$/i,wdt=/^0b[01]+$/i,Tdt=/^0o[0-7]+$/i,Mdt=parseInt;function Ddt(e){if(typeof e=="number")return e;if(Sdt(e))return yW;if(bW(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=bW(o)?o+"":o}if(typeof e!="string")return e===0?e:+e;e=ydt(e);var t=wdt.test(e);return t||Tdt.test(e)?Mdt(e.slice(2),t?2:8):Pdt.test(e)?yW:+e}SW.exports=Ddt});var XE=pt((qTn,TW)=>{var Edt=PW(),wW=1/0,Idt=17976931348623157e292;function Odt(e){if(!e)return e===0?e:0;if(e=Edt(e),e===wW||e===-wW){var o=e<0?-1:1;return o*Idt}return e===e?e:0}TW.exports=Odt});var DW=pt((zTn,MW)=>{var Adt=XE();function kdt(e){var o=Adt(e),t=o%1;return o===o?t?o-t:o:0}MW.exports=kdt});var IW=pt((HTn,EW)=>{var Fdt=HE(),Bdt=Ec(),Rdt=DW(),Ndt=Math.max;function Ldt(e,o,t){var n=e==null?0:e.length;if(!n)return-1;var i=t==null?0:Rdt(t);return i<0&&(i=Ndt(n+i,0)),Fdt(e,Bdt(o,3),i)}EW.exports=Ldt});var AW=pt((GTn,OW)=>{var Vdt=gW(),qdt=IW(),zdt=Vdt(qdt);OW.exports=zdt});var ZE=pt((jTn,kW)=>{var Hdt=uy();function Gdt(e){var o=e==null?0:e.length;return o?Hdt(e,1):[]}kW.exports=Gdt});var BW=pt(($Tn,FW)=>{var jdt=ly(),$dt=gE(),Udt=dm();function Wdt(e,o){return e==null?e:jdt(e,$dt(o),Udt)}FW.exports=Wdt});var NW=pt((UTn,RW)=>{function Qdt(e){var o=e==null?0:e.length;return o?e[o-1]:void 0}RW.exports=Qdt});var VW=pt((WTn,LW)=>{var Ydt=j1(),Kdt=sy(),Jdt=Ec();function Xdt(e,o){var t={};return o=Jdt(o,3),Kdt(e,function(n,i,s){Ydt(t,i,o(n,i,s))}),t}LW.exports=Xdt});var xy=pt((QTn,qW)=>{var Zdt=i0();function e0t(e,o,t){for(var n=-1,i=e.length;++n{function t0t(e,o){return e>o}zW.exports=t0t});var jW=pt((KTn,GW)=>{var i0t=xy(),n0t=HW(),o0t=um();function a0t(e){return e&&e.length?i0t(e,o0t,n0t):void 0}GW.exports=a0t});var eI=pt((JTn,$W)=>{var r0t=j1(),l0t=Jd();function s0t(e,o,t){(t!==void 0&&!l0t(e[o],t)||t===void 0&&!(o in e))&&r0t(e,o,t)}$W.exports=s0t});var QW=pt((XTn,WW)=>{var c0t=pm(),p0t=Z1(),m0t=Qs(),d0t="[object Object]",u0t=Function.prototype,f0t=Object.prototype,UW=u0t.toString,h0t=f0t.hasOwnProperty,g0t=UW.call(Object);function _0t(e){if(!m0t(e)||c0t(e)!=d0t)return!1;var o=p0t(e);if(o===null)return!0;var t=h0t.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&UW.call(t)==g0t}WW.exports=_0t});var tI=pt((ZTn,YW)=>{function C0t(e,o){if(!(o==="constructor"&&typeof e[o]=="function")&&o!="__proto__")return e[o]}YW.exports=C0t});var JW=pt((e4n,KW)=>{var v0t=Tu(),x0t=dm();function b0t(e){return v0t(e,x0t(e))}KW.exports=b0t});var nQ=pt((t4n,iQ)=>{var XW=eI(),y0t=XD(),S0t=dE(),P0t=ZD(),w0t=fE(),ZW=Mu(),eQ=Za(),T0t=jE(),M0t=Zd(),D0t=yu(),E0t=$l(),I0t=QW(),O0t=Iu(),tQ=tI(),A0t=JW();function k0t(e,o,t,n,i,s,d){var u=tQ(e,t),f=tQ(o,t),_=d.get(f);if(_){XW(e,t,_);return}var C=s?s(u,f,t+"",e,o,d):void 0,x=C===void 0;if(x){var y=eQ(f),w=!y&&M0t(f),P=!y&&!w&&O0t(f);C=f,y||w||P?eQ(u)?C=u:T0t(u)?C=P0t(u):w?(x=!1,C=y0t(f,!0)):P?(x=!1,C=S0t(f,!0)):C=[]:I0t(f)||ZW(f)?(C=u,ZW(u)?C=A0t(u):(!E0t(u)||D0t(u))&&(C=w0t(f))):x=!1}x&&(d.set(f,C),i(C,f,n,s,d),d.delete(f)),XW(e,t,C)}iQ.exports=k0t});var rQ=pt((i4n,aQ)=>{var F0t=G1(),B0t=eI(),R0t=ly(),N0t=nQ(),L0t=$l(),V0t=dm(),q0t=tI();function oQ(e,o,t,n,i){e!==o&&R0t(o,function(s,d){if(i||(i=new F0t),L0t(s))N0t(e,o,d,t,oQ,n,i);else{var u=n?n(q0t(e,d),s,d+"",e,o,i):void 0;u===void 0&&(u=s),B0t(e,d,u)}},V0t)}aQ.exports=oQ});var sQ=pt((n4n,lQ)=>{var z0t=oh(),H0t=lh();function G0t(e){return z0t(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&&H0t(t[0],t[1],d)&&(s=i<3?void 0:s,i=1),o=Object(o);++n{var j0t=rQ(),$0t=sQ(),U0t=$0t(function(e,o,t){j0t(e,o,t)});cQ.exports=U0t});var iI=pt((a4n,mQ)=>{function W0t(e,o){return e{var Q0t=xy(),Y0t=iI(),K0t=um();function J0t(e){return e&&e.length?Q0t(e,K0t,Y0t):void 0}dQ.exports=J0t});var hQ=pt((l4n,fQ)=>{var X0t=xy(),Z0t=Ec(),eut=iI();function tut(e,o){return e&&e.length?X0t(e,Z0t(o,2),eut):void 0}fQ.exports=tut});var _Q=pt((s4n,gQ)=>{var iut=xs(),nut=function(){return iut.Date.now()};gQ.exports=nut});var xQ=pt((c4n,vQ)=>{var out=$1(),aut=ih(),rut=W1(),CQ=$l(),lut=ku();function sut(e,o,t,n){if(!CQ(e))return e;o=aut(o,e);for(var i=-1,s=o.length,d=s-1,u=e;u!=null&&++i{var cut=nh(),put=xQ(),mut=ih();function dut(e,o,t){for(var n=-1,i=o.length,s={};++n{var uut=yQ(),fut=IE();function hut(e,o){return uut(e,o,function(t,n){return fut(e,n)})}SQ.exports=hut});var TQ=pt((d4n,wQ)=>{var gut=ZE(),_ut=qE(),Cut=zE();function vut(e){return Cut(_ut(e,void 0,gut),e+"")}wQ.exports=vut});var DQ=pt((u4n,MQ)=>{var xut=PQ(),but=TQ(),yut=but(function(e,o){return e==null?{}:xut(e,o)});MQ.exports=yut});var IQ=pt((f4n,EQ)=>{var Sut=Math.ceil,Put=Math.max;function wut(e,o,t,n){for(var i=-1,s=Put(Sut((o-e)/(t||1)),0),d=Array(s);s--;)d[n?s:++i]=e,e+=t;return d}EQ.exports=wut});var AQ=pt((h4n,OQ)=>{var Tut=IQ(),Mut=lh(),nI=XE();function Dut(e){return function(o,t,n){return n&&typeof n!="number"&&Mut(o,t,n)&&(t=n=void 0),o=nI(o),t===void 0?(t=o,o=0):t=nI(t),n=n===void 0?o{var Eut=AQ(),Iut=Eut();kQ.exports=Iut});var RQ=pt((_4n,BQ)=>{function Out(e,o){var t=e.length;for(e.sort(o);t--;)e[t]=e[t].value;return e}BQ.exports=Out});var VQ=pt((C4n,LQ)=>{var NQ=i0();function Aut(e,o){if(e!==o){var t=e!==void 0,n=e===null,i=e===e,s=NQ(e),d=o!==void 0,u=o===null,f=o===o,_=NQ(o);if(!u&&!_&&!s&&e>o||s&&d&&f&&!u&&!_||n&&d&&f||!t&&f||!i)return 1;if(!n&&!s&&!_&&e{var kut=VQ();function Fut(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}qQ.exports=Fut});var GQ=pt((x4n,HQ)=>{var oI=th(),But=nh(),Rut=Ec(),Nut=BE(),Lut=RQ(),Vut=Q1(),qut=zQ(),zut=um(),Hut=Za();function Gut(e,o,t){o.length?o=oI(o,function(s){return Hut(s)?function(d){return But(d,s.length===1?s[0]:s)}:s}):o=[zut];var n=-1;o=oI(o,Vut(Rut));var i=Nut(e,function(s,d,u){var f=oI(o,function(_){return _(s)});return{criteria:f,index:++n,value:s}});return Lut(i,function(s,d){return qut(s,d,t)})}HQ.exports=Gut});var UQ=pt((b4n,$Q)=>{var jut=uy(),$ut=GQ(),Uut=oh(),jQ=lh(),Wut=Uut(function(e,o){if(e==null)return[];var t=o.length;return t>1&&jQ(e,o[0],o[1])?o=[]:t>2&&jQ(o[0],o[1],o[2])&&(o=[o[0]]),$ut(e,jut(o,1),[])});$Q.exports=Wut});var QQ=pt((y4n,WQ)=>{var Qut=DE(),Yut=0;function Kut(e){var o=++Yut;return Qut(e)+o}WQ.exports=Kut});var KQ=pt((S4n,YQ)=>{function Jut(e,o,t){for(var n=-1,i=e.length,s=o.length,d={};++n{var Xut=$1(),Zut=KQ();function eft(e,o){return Zut(e||[],o||[],Xut)}JQ.exports=eft});var Ea=pt((w4n,ZQ)=>{var by;if(typeof Fs=="function")try{by={cloneDeep:pW(),constant:ry(),defaults:fW(),each:CE(),filter:AE(),find:AW(),flatten:ZE(),forEach:_E(),forIn:BW(),has:kE(),isUndefined:FE(),last:NW(),map:RE(),mapValues:VW(),max:jW(),merge:pQ(),min:uQ(),minBy:hQ(),now:_Q(),pick:DQ(),range:FQ(),reduce:NE(),sortBy:UQ(),uniqueId:QQ(),values:$E(),zipObject:XQ()}}catch{}by||(by=window._);ZQ.exports=by});var iY=pt((M4n,tY)=>{tY.exports=yy;function yy(){var e={};e._next=e._prev=e,this._sentinel=e}yy.prototype.dequeue=function(){var e=this._sentinel,o=e._prev;if(o!==e)return eY(o),o};yy.prototype.enqueue=function(e){var o=this._sentinel;e._prev&&e._next&&eY(e),e._next=o._next,o._next._prev=e,o._next=e,e._prev=o};yy.prototype.toString=function(){for(var e=[],o=this._sentinel,t=o._prev;t!==o;)e.push(JSON.stringify(t,tft)),t=t._prev;return"["+e.join(", ")+"]"};function eY(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function tft(e,o){if(e!=="_next"&&e!=="_prev")return o}});var oY=pt((D4n,nY)=>{var pp=Ea(),ift=ys().Graph,nft=iY();nY.exports=aft;var oft=pp.constant(1);function aft(e,o){if(e.nodeCount()<=1)return[];var t=lft(e,o||oft),n=rft(t.graph,t.buckets,t.zeroIdx);return pp.flatten(pp.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function rft(e,o,t){for(var n=[],i=o[o.length-1],s=o[0],d;e.nodeCount();){for(;d=s.dequeue();)aI(e,o,t,d);for(;d=i.dequeue();)aI(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(aI(e,o,t,d,!0));break}}}return n}function aI(e,o,t,n,i){var s=i?[]:void 0;return pp.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,rI(o,t,f)}),pp.forEach(e.outEdges(n.v),function(d){var u=e.edge(d),f=d.w,_=e.node(f);_.in-=u,rI(o,t,_)}),e.removeNode(n.v),s}function lft(e,o){var t=new ift,n=0,i=0;pp.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),pp.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=pp.range(i+n+3).map(function(){return new nft}),d=n+1;return pp.forEach(t.nodes(),function(u){rI(s,d,t.node(u))}),{graph:t,buckets:s,zeroIdx:d}}function rI(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 rY=pt((E4n,aY)=>{"use strict";var o0=Ea(),sft=oY();aY.exports={run:cft,undo:mft};function cft(e){var o=e.graph().acyclicer==="greedy"?sft(e,t(e)):pft(e);o0.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,o0.uniqueId("rev"))});function t(n){return function(i){return n.edge(i).weight}}}function pft(e){var o=[],t={},n={};function i(s){o0.has(n,s)||(n[s]=!0,t[s]=!0,o0.forEach(e.outEdges(s),function(d){o0.has(t,d.w)?o.push(d):i(d.w)}),delete t[s])}return o0.forEach(e.nodes(),i),o}function mft(e){o0.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 gl=pt((I4n,pY)=>{"use strict";var Uo=Ea(),lY=ys().Graph;pY.exports={addDummyNode:sY,simplify:dft,asNonCompoundGraph:uft,successorWeights:fft,predecessorWeights:hft,intersectRect:gft,buildLayerMatrix:_ft,normalizeRanks:Cft,removeEmptyRanks:vft,addBorderNode:xft,maxRank:cY,partition:bft,time:yft,notime:Sft};function sY(e,o,t,n){var i;do i=Uo.uniqueId(n);while(e.hasNode(i));return t.dummy=o,e.setNode(i,t),i}function dft(e){var o=new lY().setGraph(e.graph());return Uo.forEach(e.nodes(),function(t){o.setNode(t,e.node(t))}),Uo.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 uft(e){var o=new lY({multigraph:e.isMultigraph()}).setGraph(e.graph());return Uo.forEach(e.nodes(),function(t){e.children(t).length||o.setNode(t,e.node(t))}),Uo.forEach(e.edges(),function(t){o.setEdge(t,e.edge(t))}),o}function fft(e){var o=Uo.map(e.nodes(),function(t){var n={};return Uo.forEach(e.outEdges(t),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Uo.zipObject(e.nodes(),o)}function hft(e){var o=Uo.map(e.nodes(),function(t){var n={};return Uo.forEach(e.inEdges(t),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Uo.zipObject(e.nodes(),o)}function gft(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 _ft(e){var o=Uo.map(Uo.range(cY(e)+1),function(){return[]});return Uo.forEach(e.nodes(),function(t){var n=e.node(t),i=n.rank;Uo.isUndefined(i)||(o[i][n.order]=t)}),o}function Cft(e){var o=Uo.min(Uo.map(e.nodes(),function(t){return e.node(t).rank}));Uo.forEach(e.nodes(),function(t){var n=e.node(t);Uo.has(n,"rank")&&(n.rank-=o)})}function vft(e){var o=Uo.min(Uo.map(e.nodes(),function(s){return e.node(s).rank})),t=[];Uo.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;Uo.forEach(t,function(s,d){Uo.isUndefined(s)&&d%i!==0?--n:n&&Uo.forEach(s,function(u){e.node(u).rank+=n})})}function xft(e,o,t,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=t,i.order=n),sY(e,"border",i,o)}function cY(e){return Uo.max(Uo.map(e.nodes(),function(o){var t=e.node(o).rank;if(!Uo.isUndefined(t))return t}))}function bft(e,o){var t={lhs:[],rhs:[]};return Uo.forEach(e,function(n){o(n)?t.lhs.push(n):t.rhs.push(n)}),t}function yft(e,o){var t=Uo.now();try{return o()}finally{console.log(e+" time: "+(Uo.now()-t)+"ms")}}function Sft(e,o){return o()}});var uY=pt((O4n,dY)=>{"use strict";var mY=Ea(),Pft=gl();dY.exports={run:wft,undo:Mft};function wft(e){e.graph().dummyChains=[],mY.forEach(e.edges(),function(o){Tft(e,o)})}function Tft(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 Sy=Ea();fY.exports={longestPath:Dft,slack:Eft};function Dft(e){var o={};function t(n){var i=e.node(n);if(Sy.has(o,n))return i.rank;o[n]=!0;var s=Sy.min(Sy.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}Sy.forEach(e.sources(),t)}function Eft(e,o){return e.node(o.w).rank-e.node(o.v).rank-e.edge(o).minlen}});var lI=pt((k4n,hY)=>{"use strict";var Py=Ea(),Ift=ys().Graph,wy=sh().slack;hY.exports=Oft;function Oft(e){var o=new Ift({directed:!1}),t=e.nodes()[0],n=e.nodeCount();o.setNode(t,{});for(var i,s;Aft(o,e){"use strict";var mp=Ea(),Bft=lI(),Rft=sh().slack,Nft=sh().longestPath,Lft=ys().alg.preorder,Vft=ys().alg.postorder,qft=gl().simplify;yY.exports=a0;a0.initLowLimValues=cI;a0.initCutValues=sI;a0.calcCutValue=_Y;a0.leaveEdge=vY;a0.enterEdge=xY;a0.exchangeEdges=bY;function a0(e){e=qft(e),Nft(e);var o=Bft(e);cI(o),sI(o,e);for(var t,n;t=vY(o);)n=xY(o,e,t),bY(o,e,t,n)}function sI(e,o){var t=Vft(e,e.nodes());t=t.slice(0,t.length-1),mp.forEach(t,function(n){zft(e,o,n)})}function zft(e,o,t){var n=e.node(t),i=n.parent;e.edge(t,i).cutvalue=_Y(e,o,t)}function _Y(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,mp.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,Gft(e,t,C)){var w=e.edge(t,C).cutvalue;u+=x?-w:w}}}),u}function cI(e,o){arguments.length<2&&(o=e.nodes()[0]),CY(e,{},1,o)}function CY(e,o,t,n,i){var s=t,d=e.node(n);return o[n]=!0,mp.forEach(e.neighbors(n),function(u){mp.has(o,u)||(t=CY(e,o,t,u,n))}),d.low=s,d.lim=t++,i?d.parent=i:delete d.parent,t}function vY(e){return mp.find(e.edges(),function(o){return e.edge(o).cutvalue<0})}function xY(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 _=mp.filter(o.edges(),function(C){return f===gY(e,e.node(C.v),u)&&f!==gY(e,e.node(C.w),u)});return mp.minBy(_,function(C){return Rft(o,C)})}function bY(e,o,t,n){var i=t.v,s=t.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),cI(e),sI(e,o),Hft(e,o)}function Hft(e,o){var t=mp.find(e.nodes(),function(i){return!o.node(i).parent}),n=Lft(e,t);n=n.slice(1),mp.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 Gft(e,o,t){return e.hasEdge(o,t)}function gY(e,o,t){return t.low<=o.lim&&o.lim<=t.lim}});var MY=pt((B4n,TY)=>{"use strict";var jft=sh(),wY=jft.longestPath,$ft=lI(),Uft=SY();TY.exports=Wft;function Wft(e){switch(e.graph().ranker){case"network-simplex":PY(e);break;case"tight-tree":Yft(e);break;case"longest-path":Qft(e);break;default:PY(e)}}var Qft=wY;function Yft(e){wY(e),$ft(e)}function PY(e){Uft(e)}});var EY=pt((R4n,DY)=>{var pI=Ea();DY.exports=Kft;function Kft(e){var o=Xft(e);pI.forEach(e.graph().dummyChains,function(t){for(var n=e.node(t),i=n.edgeObj,s=Jft(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 Xft(e){var o={},t=0;function n(i){var s=t;pI.forEach(e.children(i),n),o[i]={low:s,lim:t++}}return pI.forEach(e.children(),n),o}});var AY=pt((N4n,OY)=>{var dp=Ea(),mI=gl();OY.exports={run:Zft,cleanup:i1t};function Zft(e){var o=mI.addDummyNode(e,"root",{},"_root"),t=e1t(e),n=dp.max(dp.values(t))-1,i=2*n+1;e.graph().nestingRoot=o,dp.forEach(e.edges(),function(d){e.edge(d).minlen*=i});var s=t1t(e)+1;dp.forEach(e.children(),function(d){IY(e,o,i,s,n,t,d)}),e.graph().nodeRankFactor=i}function IY(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=mI.addBorderNode(e,"_bt"),_=mI.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(f,d),C.borderTop=f,e.setParent(_,d),C.borderBottom=_,dp.forEach(u,function(x){IY(e,o,t,n,i,s,x);var y=e.node(x),w=y.borderTop?y.borderTop:x,P=y.borderBottom?y.borderBottom:x,M=y.borderTop?n:2*n,D=w!==P?1:i-s[d]+1;e.setEdge(f,w,{weight:M,minlen:D,nestingEdge:!0}),e.setEdge(P,_,{weight:M,minlen:D,nestingEdge:!0})}),e.parent(d)||e.setEdge(o,f,{weight:0,minlen:i+s[d]})}function e1t(e){var o={};function t(n,i){var s=e.children(n);s&&s.length&&dp.forEach(s,function(d){t(d,i+1)}),o[n]=i}return dp.forEach(e.children(),function(n){t(n,1)}),o}function t1t(e){return dp.reduce(e.edges(),function(o,t){return o+e.edge(t).weight},0)}function i1t(e){var o=e.graph();e.removeNode(o.nestingRoot),delete o.nestingRoot,dp.forEach(e.edges(),function(t){var n=e.edge(t);n.nestingEdge&&e.removeEdge(t)})}});var BY=pt((L4n,FY)=>{var dI=Ea(),n1t=gl();FY.exports=o1t;function o1t(e){function o(t){var n=e.children(t),i=e.node(t);if(n.length&&dI.forEach(n,o),dI.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,d=i.maxRank+1;s{"use strict";var Oc=Ea();LY.exports={adjust:a1t,undo:r1t};function a1t(e){var o=e.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&NY(e)}function r1t(e){var o=e.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&l1t(e),(o==="lr"||o==="rl")&&(s1t(e),NY(e))}function NY(e){Oc.forEach(e.nodes(),function(o){RY(e.node(o))}),Oc.forEach(e.edges(),function(o){RY(e.edge(o))})}function RY(e){var o=e.width;e.width=e.height,e.height=o}function l1t(e){Oc.forEach(e.nodes(),function(o){uI(e.node(o))}),Oc.forEach(e.edges(),function(o){var t=e.edge(o);Oc.forEach(t.points,uI),Oc.has(t,"y")&&uI(t)})}function uI(e){e.y=-e.y}function s1t(e){Oc.forEach(e.nodes(),function(o){fI(e.node(o))}),Oc.forEach(e.edges(),function(o){var t=e.edge(o);Oc.forEach(t.points,fI),Oc.has(t,"x")&&fI(t)})}function fI(e){var o=e.x;e.x=e.y,e.y=o}});var zY=pt((q4n,qY)=>{"use strict";var up=Ea();qY.exports=c1t;function c1t(e){var o={},t=up.filter(e.nodes(),function(u){return!e.children(u).length}),n=up.max(up.map(t,function(u){return e.node(u).rank})),i=up.map(up.range(n+1),function(){return[]});function s(u){if(!up.has(o,u)){o[u]=!0;var f=e.node(u);i[f.rank].push(u),up.forEach(e.successors(u),s)}}var d=up.sortBy(t,function(u){return e.node(u).rank});return up.forEach(d,s),i}});var GY=pt((z4n,HY)=>{"use strict";var fm=Ea();HY.exports=p1t;function p1t(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 UY=pt((H4n,$Y)=>{var jY=Ea();$Y.exports=d1t;function d1t(e,o){return jY.map(o,function(t){var n=e.inEdges(t);if(n.length){var i=jY.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 QY=pt((G4n,WY)=>{"use strict";var Wl=Ea();WY.exports=u1t;function u1t(e,o){var t={};Wl.forEach(e,function(i,s){var d=t[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};Wl.isUndefined(i.barycenter)||(d.barycenter=i.barycenter,d.weight=i.weight)}),Wl.forEach(o.edges(),function(i){var s=t[i.v],d=t[i.w];!Wl.isUndefined(s)&&!Wl.isUndefined(d)&&(d.indegree++,s.out.push(t[i.w]))});var n=Wl.filter(t,function(i){return!i.indegree});return f1t(n)}function f1t(e){var o=[];function t(s){return function(d){d.merged||(Wl.isUndefined(d.barycenter)||Wl.isUndefined(s.barycenter)||d.barycenter>=s.barycenter)&&h1t(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),Wl.forEach(i.in.reverse(),t(i)),Wl.forEach(i.out,n(i))}return Wl.map(Wl.filter(o,function(s){return!s.merged}),function(s){return Wl.pick(s,["vs","i","barycenter","weight"])})}function h1t(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 JY=pt((j4n,KY)=>{var ch=Ea(),g1t=gl();KY.exports=_1t;function _1t(e,o){var t=g1t.partition(e,function(C){return ch.has(C,"barycenter")}),n=t.lhs,i=ch.sortBy(t.rhs,function(C){return-C.i}),s=[],d=0,u=0,f=0;n.sort(C1t(!!o)),f=YY(s,i,f),ch.forEach(n,function(C){f+=C.vs.length,s.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,f=YY(s,i,f)});var _={vs:ch.flatten(s,!0)};return u&&(_.barycenter=d/u,_.weight=u),_}function YY(e,o,t){for(var n;o.length&&(n=ch.last(o)).i<=t;)o.pop(),e.push(n.vs),t++;return t}function C1t(e){return function(o,t){return o.barycentert.barycenter?1:e?t.i-o.i:o.i-t.i}}});var eK=pt(($4n,ZY)=>{var hm=Ea(),v1t=UY(),x1t=QY(),b1t=JY();ZY.exports=XY;function XY(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=hm.filter(i,function(P){return P!==d&&P!==u}));var _=v1t(e,i);hm.forEach(_,function(P){if(e.children(P.v).length){var M=XY(e,P.v,t,n);f[P.v]=M,hm.has(M,"barycenter")&&S1t(P,M)}});var C=x1t(_,t);y1t(C,f);var x=b1t(C,n);if(d&&(x.vs=hm.flatten([d,x.vs,u],!0),e.predecessors(d).length)){var y=e.node(e.predecessors(d)[0]),w=e.node(e.predecessors(u)[0]);hm.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+y.order+w.order)/(x.weight+2),x.weight+=2}return x}function y1t(e,o){hm.forEach(e,function(t){t.vs=hm.flatten(t.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function S1t(e,o){hm.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 iK=pt((U4n,tK)=>{var ph=Ea(),P1t=ys().Graph;tK.exports=w1t;function w1t(e,o,t){var n=T1t(e),i=new P1t({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return ph.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),ph.forEach(e[t](s),function(f){var _=f.v===s?f.w:f.v,C=i.edge(_,s),x=ph.isUndefined(C)?0:C.weight;i.setEdge(_,s,{weight:e.edge(f).weight+x})}),ph.has(d,"minRank")&&i.setNode(s,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),i}function T1t(e){for(var o;e.hasNode(o=ph.uniqueId("_root")););return o}});var oK=pt((W4n,nK)=>{var M1t=Ea();nK.exports=D1t;function D1t(e,o,t){var n={},i;M1t.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 cK=pt((Q4n,sK)=>{"use strict";var gm=Ea(),E1t=zY(),I1t=GY(),O1t=eK(),A1t=iK(),k1t=oK(),F1t=ys().Graph,aK=gl();sK.exports=B1t;function B1t(e){var o=aK.maxRank(e),t=rK(e,gm.range(1,o+1),"inEdges"),n=rK(e,gm.range(o-1,-1,-1),"outEdges"),i=E1t(e);lK(e,i);for(var s=Number.POSITIVE_INFINITY,d,u=0,f=0;f<4;++u,++f){R1t(u%2?t:n,u%4>=2),i=aK.buildLayerMatrix(e);var _=I1t(e,i);_{"use strict";var lo=Ea(),N1t=ys().Graph,L1t=gl();CK.exports={positionX:z1t,findType1Conflicts:pK,findType2Conflicts:mK,addConflict:hI,hasConflict:dK,verticalAlignment:uK,horizontalCompaction:fK,alignCoordinates:gK,findSmallestWidthAlignment:hK,balance:_K};function pK(e,o){var t={};function n(i,s){var d=0,u=0,f=i.length,_=lo.last(s);return lo.forEach(s,function(C,x){var y=V1t(e,C),w=y?e.node(y).order:f;(y||C===_)&&(lo.forEach(s.slice(u,x+1),function(P){lo.forEach(e.predecessors(P),function(M){var D=e.node(M),F=D.order;(F_)&&hI(t,y,C)})})}function i(s,d){var u=-1,f,_=0;return lo.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 lo.reduce(o,i),t}function V1t(e,o){if(e.node(o).dummy)return lo.find(e.predecessors(o),function(t){return e.node(t).dummy})}function hI(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 dK(e,o,t){if(o>t){var n=o;o=t,t=n}return lo.has(e[o],t)}function uK(e,o,t,n){var i={},s={},d={};return lo.forEach(o,function(u){lo.forEach(u,function(f,_){i[f]=f,s[f]=f,d[f]=_})}),lo.forEach(o,function(u){var f=-1;lo.forEach(u,function(_){var C=n(_);if(C.length){C=lo.sortBy(C,function(M){return d[M]});for(var x=(C.length-1)/2,y=Math.floor(x),w=Math.ceil(x);y<=w;++y){var P=C[y];s[_]===_&&f{"use strict";var mh=Ea(),xK=gl(),j1t=vK().positionX;bK.exports=$1t;function $1t(e){e=xK.asNonCompoundGraph(e),U1t(e),mh.forEach(j1t(e),function(o,t){e.node(t).x=o})}function U1t(e){var o=xK.buildLayerMatrix(e),t=e.graph().ranksep,n=0;mh.forEach(o,function(i){var s=mh.max(mh.map(i,function(d){return e.node(d).height}));mh.forEach(i,function(d){e.node(d).y=n+s/2}),n+=s+t})}});var DK=pt((J4n,MK)=>{"use strict";var vo=Ea(),SK=rY(),PK=uY(),W1t=MY(),Q1t=gl().normalizeRanks,Y1t=EY(),K1t=gl().removeEmptyRanks,wK=AY(),J1t=BY(),TK=VY(),X1t=cK(),Z1t=yK(),_m=gl(),eht=ys().Graph;MK.exports=tht;function tht(e,o){var t=o&&o.debugTiming?_m.time:_m.notime;t("layout",function(){var n=t(" buildLayoutGraph",function(){return dht(e)});t(" runLayout",function(){iht(n,t)}),t(" updateInputGraph",function(){nht(e,n)})})}function iht(e,o){o(" makeSpaceForEdgeLabels",function(){uht(e)}),o(" removeSelfEdges",function(){yht(e)}),o(" acyclic",function(){SK.run(e)}),o(" nestingGraph.run",function(){wK.run(e)}),o(" rank",function(){W1t(_m.asNonCompoundGraph(e))}),o(" injectEdgeLabelProxies",function(){fht(e)}),o(" removeEmptyRanks",function(){K1t(e)}),o(" nestingGraph.cleanup",function(){wK.cleanup(e)}),o(" normalizeRanks",function(){Q1t(e)}),o(" assignRankMinMax",function(){hht(e)}),o(" removeEdgeLabelProxies",function(){ght(e)}),o(" normalize.run",function(){PK.run(e)}),o(" parentDummyChains",function(){Y1t(e)}),o(" addBorderSegments",function(){J1t(e)}),o(" order",function(){X1t(e)}),o(" insertSelfEdges",function(){Sht(e)}),o(" adjustCoordinateSystem",function(){TK.adjust(e)}),o(" position",function(){Z1t(e)}),o(" positionSelfEdges",function(){Pht(e)}),o(" removeBorderNodes",function(){bht(e)}),o(" normalize.undo",function(){PK.undo(e)}),o(" fixupEdgeLabelCoords",function(){vht(e)}),o(" undoCoordinateSystem",function(){TK.undo(e)}),o(" translateGraph",function(){_ht(e)}),o(" assignNodeIntersects",function(){Cht(e)}),o(" reversePoints",function(){xht(e)}),o(" acyclic.undo",function(){SK.undo(e)})}function nht(e,o){vo.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))}),vo.forEach(e.edges(),function(t){var n=e.edge(t),i=o.edge(t);n.points=i.points,vo.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=o.graph().width,e.graph().height=o.graph().height}var oht=["nodesep","edgesep","ranksep","marginx","marginy"],aht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rht=["acyclicer","ranker","rankdir","align"],lht=["width","height"],sht={width:0,height:0},cht=["minlen","weight","width","height","labeloffset"],pht={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},mht=["labelpos"];function dht(e){var o=new eht({multigraph:!0,compound:!0}),t=_I(e.graph());return o.setGraph(vo.merge({},aht,gI(t,oht),vo.pick(t,rht))),vo.forEach(e.nodes(),function(n){var i=_I(e.node(n));o.setNode(n,vo.defaults(gI(i,lht),sht)),o.setParent(n,e.parent(n))}),vo.forEach(e.edges(),function(n){var i=_I(e.edge(n));o.setEdge(n,vo.merge({},pht,gI(i,cht),vo.pick(i,mht)))}),o}function uht(e){var o=e.graph();o.ranksep/=2,vo.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 fht(e){vo.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};_m.addDummyNode(e,"edge-proxy",s,"_ep")}})}function hht(e){var o=0;vo.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=vo.max(o,n.maxRank))}),e.graph().maxRank=o}function ght(e){vo.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 _ht(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,w=_.height;o=Math.min(o,C-y/2),t=Math.max(t,C+y/2),n=Math.min(n,x-w/2),i=Math.max(i,x+w/2)}vo.forEach(e.nodes(),function(_){f(e.node(_))}),vo.forEach(e.edges(),function(_){var C=e.edge(_);vo.has(C,"x")&&f(C)}),o-=d,n-=u,vo.forEach(e.nodes(),function(_){var C=e.node(_);C.x-=o,C.y-=n}),vo.forEach(e.edges(),function(_){var C=e.edge(_);vo.forEach(C.points,function(x){x.x-=o,x.y-=n}),vo.has(C,"x")&&(C.x-=o),vo.has(C,"y")&&(C.y-=n)}),s.width=t-o+d,s.height=i-n+u}function Cht(e){vo.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(_m.intersectRect(n,s)),t.points.push(_m.intersectRect(i,d))})}function vht(e){vo.forEach(e.edges(),function(o){var t=e.edge(o);if(vo.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 xht(e){vo.forEach(e.edges(),function(o){var t=e.edge(o);t.reversed&&t.points.reverse()})}function bht(e){vo.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(vo.last(t.borderLeft)),d=e.node(vo.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}}),vo.forEach(e.nodes(),function(o){e.node(o).dummy==="border"&&e.removeNode(o)})}function yht(e){vo.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 Sht(e){var o=_m.buildLayerMatrix(e);vo.forEach(o,function(t){var n=0;vo.forEach(t,function(i,s){var d=e.node(i);d.order=s+n,vo.forEach(d.selfEdges,function(u){_m.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 Pht(e){vo.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 gI(e,o){return vo.mapValues(vo.pick(e,o),Number)}function _I(e){var o={};return vo.forEach(e,function(t,n){o[n.toLowerCase()]=t}),o}});var IK=pt((X4n,EK)=>{var Ty=Ea(),wht=gl(),Tht=ys().Graph;EK.exports={debugOrdering:Mht};function Mht(e){var o=wht.buildLayerMatrix(e),t=new Tht({compound:!0,multigraph:!0}).setGraph({});return Ty.forEach(e.nodes(),function(n){t.setNode(n,{label:n}),t.setParent(n,"layer"+e.node(n).rank)}),Ty.forEach(e.edges(),function(n){t.setEdge(n.v,n.w,{},n.name)}),Ty.forEach(o,function(n,i){var s="layer"+i;t.setNode(s,{rank:"same"}),Ty.reduce(n,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var AK=pt((Z4n,OK)=>{OK.exports="0.8.5"});var FK=pt((eMn,kK)=>{kK.exports={graphlib:ys(),layout:DK(),debug:IK(),util:{time:gl().time,notime:gl().notime},version:AK()}});var bI=pt(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var xI=(function(){function e(o,t,n){this.source=o,this.target=t,this.type=n}return e})();Cm.PowerEdge=xI;var lJ=(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 Fu);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={};sJ(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 xI(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})();Cm.Configuration=lJ;function sJ(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)}sJ(n.children,i,t)}})}var dh=(function(){function e(o,t,n,i,s){t===void 0&&(t=new uh),n===void 0&&(n=new uh),i===void 0&&(i=new Fu),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 xI(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})();Cm.Module=dh;function kht(e,o){var t={};for(var n in e)n in o&&(t[n]=e[n]);return t}var Fu=(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=kht(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})();Cm.ModuleSet=Fu;var uh=(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 Fu;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})();Cm.LinkSets=uh;function Fht(e,o,t,n){for(var i=e.length,s=new lJ(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}}Cm.getGroups=Fht});var Oy=pt(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});function cJ(e,o){var t={};for(var n in e)t[n]={};for(var n in o)t[n]={};return Object.keys(t).length}function pJ(e,o){var t=0;for(var n in e)typeof o[n]<"u"&&++t;return t}function Bht(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 mJ(e,o,t,n){var i=Bht(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 Rht(e,o,t){t===void 0&&(t=1),mJ(e,t,function(n,i){return Math.sqrt(cJ(n,i)-pJ(n,i))},o)}Bu.symmetricDiffLinkLengths=Rht;function Nht(e,o,t){t===void 0&&(t=1),mJ(e,t,function(n,i){return Math.min(Object.keys(n).length,Object.keys(i).length)<1.1?0:pJ(n,i)/cJ(n,i)},o)}Bu.jaccardLinkLengths=Nht;function Lht(e,o,t,n){var i=dJ(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}Bu.generateDirectedEdgeConstraints=Lht;function dJ(e,o,t){var n=[],i=0,s=[],d=[];function u(F){F.index=F.lowlink=i++,s.push(F),F.onStack=!0;for(var V=0,U=F.out;V"u"?(u(K),F.lowlink=Math.min(F.lowlink,K.lowlink)):K.onStack&&(F.lowlink=Math.min(F.lowlink,K.index))}if(F.lowlink===F.index){for(var se=[];s.length&&(K=s.pop(),K.onStack=!1,se.push(K),K!==F););d.push(se.map(function(ee){return ee.id}))}}for(var f=0;f"u"&&u(D)}return d}Bu.stronglyConnectedComponents=dJ});var Ay=pt(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var uJ=(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})();fh.Locks=uJ;var Vht=(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 fJ,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 uJ,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 P=this.offsetDir();for(i=0;i1&&M>D||!isFinite(D)){for(i=0;i1&&(F=1);var V=D*D,U=2*F*(M-D)/(V*M),K=M*M*M,se=2*-F/(V*K);for(isFinite(U)||console.log(U),i=0;i0?j-(O+1)*re:j-(O-1)*re;-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})();fh.PseudoRandom=fJ});var By=pt(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var hJ=(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})();fp.PositionStats=hJ;var ky=(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})();fp.Constraint=ky;var Fy=(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})();fp.Variable=Fy;var yI=(function(){function e(o){this.vars=[],o.offset=0,this.ps=new hJ(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})();fp.Solver=PI;function qht(e,o,t){for(var n=e.map(function(D){return new Fy(D.desiredCenter)}),i=[],s=e.length,d=0;d{"use strict";var zht=l0&&l0.__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(l0,"__esModule",{value:!0});var gJ=(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 _J(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})();l0.TreeBase=gJ;var _J=(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})();l0.Iterator=_J;var Ry=(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})(),Hht=(function(e){zht(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 Ry(t),n=!0,this.size++;else{var i=new Ry(void 0),s=!1,d=!1,u=null,f=i,_=null,C=this._root;for(f.right=this._root;;){if(C===null?(C=new Ry(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 Ry(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 w=d.right===s;o.is_red(y.get_child(_))?d.set_child(w,o.double_rotate(s,_)):o.is_red(y.get_child(!_))&&d.set_child(w,o.single_rotate(s,_));var P=d.get_child(w);P.red=!0,i.red=!0,P.left.red=!1,P.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})(gJ);l0.RBTree=Hht});var Ru=pt(Cl=>{"use strict";var Ght=Cl&&Cl.__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(Cl,"__esModule",{value:!0});var hp=By(),jht=wI();function hh(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(o,t){return t.bounds.union(o)},vm.empty()):vm.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(o,t){return hh(t).union(o)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}Cl.computeGroupBounds=hh;var vm=(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,w=y*_-C*x;if(w==0)return null;var P=o-s,M=t-d,D=C*M-y*P,F=D/w,V=_*M-x*P,U=V/w;return F>=0&&F<=1&&U>=0&&U<=1?{x:o+F*_,y:t+F*x}:null},e.prototype.inflate=function(o){return new e(this.x-o,this.X+o,this.y-o,this.Y+o)},e})();Cl.Rectangle=vm;function $ht(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}}}Cl.makeEdgeBetween=$ht;function Uht(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}}Cl.makeEdgeTo=Uht;var Wht=(function(){function e(o,t,n){this.v=o,this.r=t,this.pos=n,this.prev=TI(),this.next=TI()}return e})(),CJ=(function(){function e(o,t,n){this.isOpen=o,this.v=t,this.pos=n}return e})();function Qht(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 bJ(e,o){return DI(e,o,vJ,1e-6)}Cl.generateXConstraints=bJ;function yJ(e,o){return DI(e,o,xJ,1e-6)}Cl.generateYConstraints=yJ;function SJ(e){return MI(e,vJ,1e-6)}Cl.generateXGroupConstraints=SJ;function PJ(e){return MI(e,xJ,1e-6)}Cl.generateYGroupConstraints=PJ;function Jht(e){var o=e.map(function(i){return new hp.Variable(i.cx())}),t=bJ(e,o),n=new hp.Solver(o,t);n.solve(),o.forEach(function(i,s){return e[s].setXCentre(i.position())}),o=e.map(function(i){return new hp.Variable(i.cy())}),t=yJ(e,o),n=new hp.Solver(o,t),n.solve(),o.forEach(function(i,s){return e[s].setYCentre(i.position())})}Cl.removeOverlaps=Jht;var Ny=(function(e){Ght(o,e);function o(t,n){var i=e.call(this,0,n)||this;return i.index=t,i}return o})(hp.Variable);Cl.IndexedVariable=Ny;var Xht=(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 Ny(_,1)}),i&&this.createConstraints(i),s&&n&&typeof n.groups<"u"){o.forEach(function(f){if(!f.width||!f.height){f.bounds=new vm(f.x,f.x,f.y,f.y);return}var _=f.width/2,C=f.height/2;f.bounds=new vm(f.x-_,f.x+_,f.y-C,f.y+C)}),hh(n);var u=o.length;t.forEach(function(f){d.variables[u]=f.minVar=new Ny(u++,typeof f.stiffness<"u"?f.stiffness:.01),d.variables[u]=f.maxVar=new Ny(u++,typeof f.stiffness<"u"?f.stiffness:.01)})}}return e.prototype.createSeparation=function(o){return new hp.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 hp.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 vm(_-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,SJ,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,PJ,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&&(hh(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(_),hh(this.rootGroup))},e.prototype.solve=function(o,t,n,i){var s=new hp.Solver(o,t);s.setStartingPositions(n),s.setDesiredPositions(i),s.solve()},e})();Cl.Projection=Xht});var EI=pt(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});var wJ=(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(II,"__esModule",{value:!0});var TJ=EI(),MJ=(function(){function e(o,t){this.id=o,this.distance=t}return e})(),egt=(function(){function e(o){this.id=o,this.neighbours=[]}return e})(),DJ=(function(){function e(o,t,n){this.node=o,this.prev=t,this.d=n}return e})(),tgt=(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 egt(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 MJ(_,C)),this.neighbours[_].neighbours.push(new MJ(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(w,P){return w.q=P}))}}return s},e})();II.Calculator=tgt});var FI=pt(Va=>{"use strict";var IJ=Va&&Va.__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(Va,"__esModule",{value:!0});var igt=Ru(),AI=(function(){function e(){}return e})();Va.Point=AI;var kI=(function(){function e(o,t,n,i){this.x1=o,this.y1=t,this.x2=n,this.y2=i}return e})();Va.LineSegment=kI;var ngt=(function(e){IJ(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(AI);Va.PolyPoint=ngt;function Ql(e,o,t){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)}Va.isLeft=Ql;function Ks(e,o,t){return Ql(e,o,t)>0}function Ss(e,o,t){return Ql(e,o,t)<0}function ogt(e){var o=e.slice(0).sort(function(y,w){return y.x!==w.x?w.x-y.x:w.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(!(Ql(o[i],o[f],o[n])>=0&&n1&&!(Ql(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(!(Ql(o[_],o[d],o[n])>=0&&n>d)){for(;u.length>x&&!(Ql(u[u.length-2],u[u.length-1],o[n])>0);)u.length-=1;n!=i&&u.push(o[n])}}return u}Va.ConvexHull=ogt;function agt(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)}Va.clockwiseRadialSweep=agt;function rgt(e,o){var t=o.slice(0);return t.push(o[0]),{rtan:qy(e,t),ltan:zy(e,t)}}function qy(e,o){var t=o.length-1,n,i,s,d,u;if(Ss(e,o[1],o[0])&&!Ks(e,o[t-1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Ks(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=Ss(e,o[s+1],o[s]),u&&!Ks(e,o[s-1],o[s]))return s;d=Ks(e,o[n+1],o[n]),d?u||Ks(e,o[n],o[s])?i=s:n=s:u&&Ss(e,o[n],o[s])?i=s:n=s}}function zy(e,o){var t=o.length-1,n,i,s,d,u;if(Ks(e,o[t-1],o[0])&&!Ss(e,o[1],o[0]))return 0;for(n=0,i=t;;){if(i-n===1)return Ss(e,o[n],o[i])?n:i;if(s=Math.floor((n+i)/2),u=Ss(e,o[s+1],o[s]),Ks(e,o[s-1],o[s])&&!u)return s;d=Ss(e,o[n+1],o[n]),d?u?Ss(e,o[n],o[s])?i=s:n=s:i=s:u?n=s:Ks(e,o[n],o[s])?i=s:n=s}}function Hy(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}}Va.tangent_PolyPolyC=Hy;function lgt(e,o){var t=OJ(o,e);return{t1:t.t2,t2:t.t1}}Va.LRtangent_PolyPolyC=lgt;function OJ(e,o){return Hy(e,o,qy,zy,Ks,Ss)}Va.RLtangent_PolyPolyC=OJ;function sgt(e,o){return Hy(e,o,zy,zy,Ss,Ss)}Va.LLtangent_PolyPolyC=sgt;function cgt(e,o){return Hy(e,o,qy,qy,Ks,Ks)}Va.RRtangent_PolyPolyC=cgt;var _h=(function(){function e(o,t){this.t1=o,this.t2=t}return e})();Va.BiTangent=_h;var AJ=(function(){function e(){}return e})();Va.BiTangents=AJ;var pgt=(function(e){IJ(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o})(AI);Va.TVGPoint=pgt;var OI=(function(){function e(o,t,n,i){this.id=o,this.polyid=t,this.polyvertid=n,this.p=i,i.vv=this}return e})();Va.VisibilityVertex=OI;var Vy=(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})();Va.VisibilityEdge=Vy;var mgt=(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 Vy(s[d-1].vv,f))}s.length>1&&this.E.push(new Vy(s[0].vv,s[s.length-1].vv))}for(var i=0;i0)return!0;return!1},e})();Va.TangentVisibilityGraph=mgt;function kJ(e,o){for(var t=[],n=1,i=o.length;n=0&&P>=0&&M<0&&D>=0&&F>=0&&V<0?i.ll=new _h(s,d):w<=0&&P<=0&&M>0&&D<=0&&F<=0&&V>0?i.rr=new _h(s,d):w<=0&&P>0&&M<=0&&D>=0&&F<0&&V>=0?i.rl=new _h(s,d):w>=0&&P<0&&M>=0&&D<=0&&F>0&&V<=0&&(i.lr=new _h(s,d))}return i}Va.tangents=FJ;function dgt(e,o){for(var t=1,n=o.length;t0)return!0}return!1}Va.polysOverlap=ugt});var BI=pt(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});var Ps={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function fgt(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,w=0,P=0,M=0,D=[];if(e.length==0)return;F(e),U(e,C),s&&V(e);function F(ce){ce.forEach(function(ue){_e(ue)});function _e(ue){var j=Number.MAX_VALUE,W=Number.MAX_VALUE,pe=0,O=0;ue.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)}),ue.width=pe-j,ue.height=O-W}}function V(ce){ce.forEach(function(_e){var ue={x:0,y:0};_e.array.forEach(function(pe){ue.x+=pe.x,ue.y+=pe.y}),ue.x/=_e.array.length,ue.y/=_e.array.length;var j={x:ue.x-_e.width/2,y:ue.y-_e.height/2},W={x:_e.x-j.x+f/2-y/2,y:_e.y-j.y+_/2-w/2};_e.array.forEach(function(pe){pe.x+=W.x,pe.y+=W.y})})}function U(ce,_e){var ue=Number.POSITIVE_INFINITY,j=0;ce.sort(function(ye,Ne){return Ne.height-ye.height}),P=ce.reduce(function(ye,Ne){return ye.widthP||$>Ps.FLOAT_EPSILON;){if(N!=1)var oe=pe-(pe-W)/Ps.GOLDEN_SECTION,B=K(ce,oe);if(N!=0)var be=W+(pe-W)/Ps.GOLDEN_SECTION,L=K(ce,be);if(G=Math.abs(oe-be),$=Math.abs(B-L),BL?(W=oe,oe=be,B=L,N=1):(pe=be,be=oe,L=B,N=0),O++>100)break}K(ce,j)}function K(ce,_e){D=[],y=0,w=0,M=u;for(var ue=0;ue=ce.height&&D[j].x+D[j].width+ce.width+Ps.PADDING-_e<=Ps.FLOAT_EPSILON){ue=D[j];break}D.push(ce),ue!==void 0?(ce.x=ue.x+ue.width+Ps.PADDING,ce.y=ue.bottom,ce.space_left=ce.height,ce.bottom=ce.y,ue.space_left-=ce.height+Ps.PADDING,ue.bottom+=ce.height+Ps.PADDING):(ce.y=M,M+=ce.height+Ps.PADDING,ce.x=d,ce.bottom=ce.y,ce.space_left=ce.height),ce.y+ce.height-w>-Ps.FLOAT_EPSILON&&(w=ce.y+ce.height-u),ce.x+ce.width-y>-Ps.FLOAT_EPSILON&&(y=ce.x+ce.width-d)}function ee(ce){var _e=0;return ce.forEach(function(ue){return _e+=ue.width+Ps.PADDING}),_e}function re(){return y/w}}Gy.applyPacking=fgt;function hgt(e,o){for(var t={},n={},i=[],s=0,d=0;d{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var ggt=bI(),RI=Oy(),jy=Ay(),$y=Ru(),BJ=gh(),RJ=FI(),NJ=BI(),Ch;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(Ch=vh.EventType||(vh.EventType={}));function Uy(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var _gt=(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[Ch[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:Ch.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=ggt.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:Ch.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 RI.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 RI.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,w=this._canvasSize[0],P=this._canvasSize[1],M=new Array(x),D=new Array(x),F=null,V=this._avoidOverlaps;this._nodes.forEach(function(ue,j){ue.index=j,typeof ue.x>"u"&&(ue.x=w/2,ue.y=P/2),M[j]=ue.x,D[j]=ue.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new BJ.Calculator(x,this._links,e.getSourceIndex,e.getTargetIndex,function(ue){return u.getLinkLength(ue)}).DistanceMatrix(),F=jy.Descent.createSquareMatrix(x,function(){return 2}),this._links.forEach(function(ue){typeof ue.source=="number"&&(ue.source=u._nodes[ue.source]),typeof ue.target=="number"&&(ue.target=u._nodes[ue.target])}),this._links.forEach(function(ue){var j=e.getSourceIndex(ue),W=e.getTargetIndex(ue);F[j][W]=F[W][j]=ue.weight||1}));var K=jy.Descent.createSquareMatrix(x,function(ue,j){return U[ue][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var f=C,se=function(j,W,pe,O){F[j][W]=F[W][j]=pe,K[j][W]=K[W][j]=O};this._groups.forEach(function(j){se(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(RI.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new jy.Descent([M,D],K),this._descent.locks.clear();for(var f=0;f0&&(this._descent.project=new $y.Projection(this._nodes,this._groups,this._rootGroup,ee).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(w,P,d),this.avoidOverlaps(V),V&&(this._nodes.forEach(function(ue,j){ue.x=M[j],ue.y=D[j]}),this._descent.project=new $y.Projection(this._nodes,this._groups,this._rootGroup,ee,!0).projectFunctions(),this._nodes.forEach(function(ue,j){M[j]=ue.x,D[j]=ue.y})),this._descent.G=F,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=jy.Descent.createSquareMatrix(x,function(ue,j){return ue>=C||j>=C?F[ue][j]:0});this._descent.G=_e,this._descent.run(i)}return this.updateNodePositions(),this.separateOverlappingComponents(w,P,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=NJ.separateGraphs(this._nodes,this._links);NJ.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 RJ.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 RJ.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(K){return K.source.id},x=function(K){return K.target.id},y=function(K){return K.length()},w=new BJ.Calculator(s.V.length,s.E,C,x,y),P=w.PathFromNodeToNode(f.id,_.id);if(P.length===1||P.length===s.V.length){var M=$y.makeEdgeBetween(o.source.innerBounds,o.target.innerBounds,t);i=[M.sourceIntersection,M.arrowStart]}else{for(var D=P.length-2,F=s.V[P[D]].p,V=s.V[P[0]].p,i=[o.source.innerBounds.rayIntersection(F.x,F.y)],U=D;U>=0;--U)i.push(s.V[P[U]].p);i.push($y.makeEdgeTo(V,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){Uy(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 Uy(o)?{x:o.bounds.cx(),y:o.bounds.cy()}:o},e.drag=function(o,t){Uy(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){Uy(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})();vh.Layout=_gt});var VJ=pt(Lu=>{"use strict";var Cgt=Lu&&Lu.__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(Lu,"__esModule",{value:!0});var NI=Nu(),LJ=(function(e){Cgt(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=NI.Layout.dragStart,n.dragend=n.dragEnd=NI.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})(NI.Layout);Lu.LayoutAdaptor=LJ;function vgt(e){return new LJ(e)}Lu.adaptor=vgt});var zJ=pt(Vu=>{"use strict";var xgt=Vu&&Vu.__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(Vu,"__esModule",{value:!0});var Yl=Nu(),qJ=(function(e){xgt(o,e);function o(){var t=e.call(this)||this;t.event=d3.dispatch(Yl.EventType[Yl.EventType.start],Yl.EventType[Yl.EventType.tick],Yl.EventType[Yl.EventType.end]);var n=t,i;return t.drag=function(){if(!s)var s=d3.behavior.drag().origin(Yl.Layout.dragOrigin).on("dragstart.d3adaptor",Yl.Layout.dragStart).on("drag.d3adaptor",function(d){Yl.Layout.drag(d,d3.event),n.resume()}).on("dragend.d3adaptor",Yl.Layout.dragEnd);if(!arguments.length)return s;this.call(s)},t}return o.prototype.trigger=function(t){var n={type:Yl.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(Yl.EventType[t],n),this},o})(Yl.Layout);Vu.D3StyleLayoutAdaptor=qJ;function bgt(){return new qJ}Vu.d3adaptor=bgt});var HJ=pt(xh=>{"use strict";var ygt=xh&&xh.__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(xh,"__esModule",{value:!0});var Kl=Nu(),Sgt=(function(e){ygt(o,e);function o(t){var n=e.call(this)||this;n.d3Context=t,n.event=t.dispatch(Kl.EventType[Kl.EventType.start],Kl.EventType[Kl.EventType.tick],Kl.EventType[Kl.EventType.end]);var i=n,s;return n.drag=function(){if(!d)var d=t.drag().subject(Kl.Layout.dragOrigin).on("start.d3adaptor",Kl.Layout.dragStart).on("drag.d3adaptor",function(u){Kl.Layout.drag(u,t.event),i.resume()}).on("end.d3adaptor",Kl.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},n}return o.prototype.trigger=function(t){var n={type:Kl.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(Kl.EventType[t],n),this},o})(Kl.Layout);xh.D3StyleLayoutAdaptor=Sgt});var GJ=pt(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});var Pgt=zJ(),wgt=HJ();function Tgt(e){return!e||Mgt(e)?new Pgt.D3StyleLayoutAdaptor:new wgt.D3StyleLayoutAdaptor(e)}LI.d3adaptor=Tgt;function Mgt(e){var o=/^3\./;return e.version&&e.version.match(o)!==null}});var HI=pt(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var Dgt=Ru(),VI=By(),Egt=gh(),jJ=(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})();qu.NodeWrapper=jJ;var qI=(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})();qu.Vert=qI;var zI=(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})();qu.LongestCommonSubsequence=zI;var Igt=(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 jJ(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=Dgt.Rectangle.empty();M.children.forEach(function(F){return D=D.union(i.nodes[F].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}})),w=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}})),P=y.concat(w);P.forEach(function(M){return M.verts=[]}),this.verts=[],this.edges=[],y.forEach(function(M){return w.forEach(function(D){var F=new qI(i.verts.length,D.x1,M.y1);M.verts.push(F),D.verts.push(F),i.verts.push(F);for(var V=i.backToFront.length;V-- >0;){var U=i.backToFront[V],K=U.rect,se=Math.abs(F.x-K.cx()),ee=Math.abs(F.y-K.cy());if(se0;){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 VI.Variable(U[0][o])}),_=[],C=0;C=0&&_.push(new VI.Constraint(f[D],f[F],d))}var V=new VI.Solver(f,_);V.solve(),f.forEach(function(U,K){var se=i[K],ee=U.position();se[0][o]=se[1][o]=ee;var re=n[se.edgeid];se.i>0&&(re[se.i-1][1][o]=ee),se.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&&ce>1?1e3:0},M=w.PathFromNodeToNodeWithPrevCost(i.ports[0].id,s.ports[0].id,P),D=M.reverse().map(function(F){return n.verts[F]});return D.push(this.nodes[s.id].ports[0]),D.filter(function(F,V){return!(V0&&F.node===s&&D[V-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],w=y[0].x,P=y[0].y,M=y[1].x,D=y[1].y;C=M-w,x=D-P;var F=e.angleBetween2Lines(u,y)<0?1:0,V,U;Math.abs(C)>0?(V=w+C/Math.abs(C)*t,U=P):(V=w,U=P+x/Math.abs(x)*t);var K=Math.abs(V-f),se=Math.abs(U-_);s.routepath+="A "+K+" "+se+" 0 0 "+F+" "+V+" "+U+" "}else{var ee=[f,_],re,ce;Math.abs(C)>0?(f-=C/Math.abs(C)*i,re=[f,_+n],ce=[f,_-n]):(_-=x/Math.abs(x)*i,re=[f+n,_],ce=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+re[0]+" "+re[1]+" L "+ce[0]+" "+ce[1])}}else{var u=o[0],f=u[1].x,_=u[1].y,C=f-u[0].x,x=_-u[0].y,ee=[f,_],re,ce;Math.abs(C)>0?(f-=C/Math.abs(C)*i,re=[f,_+n],ce=[f,_-n]):(_-=x/Math.abs(x)*i,re=[f+n,_],ce=[f-n,_]),s.routepath+="L "+f+" "+_+" ",i>0&&(s.arrowpath="M "+ee[0]+" "+ee[1]+" L "+re[0]+" "+re[1]+" L "+ce[0]+" "+ce[1])}return s},e})();qu.GridRouter=Igt});var $J=pt(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var Ogt=gh(),GI=Ay(),Agt=Ru(),kgt=Oy(),Fgt=(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})();bh.Link3D=Fgt;var Bgt=(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})();bh.Node3D=Bgt;var Rgt=(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 Ngt;this.useJaccardLinkLengths&&kgt.jaccardLinkLengths(this.links,i,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var s=new Ogt.Calculator(n,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=GI.Descent.createSquareMatrix(n,function(C,x){return s[C][x]}),u=GI.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 GI.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new Agt.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var f=0;f{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});var jI=Nu(),Lgt=HI();function Vgt(e,o,t,n){e.cola.start(0,0,0,10,!1);var i=qgt(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})}Wy.gridify=Vgt;function qgt(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 Lgt.GridRouter(i,{getChildren:function(s){return s.children},getBounds:function(s){return s.bounds}},t-n)}function zgt(e,o,t){var n;e.nodes.forEach(function(u,f){return u.index=f}),new jI.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 jI.Layout().size(o).nodes(d).links(s).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new jI.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}}Wy.powerGraphGridLayout=zgt});var WJ=pt(Qy=>{"use strict";function rl(e){for(var o in e)Qy.hasOwnProperty(o)||(Qy[o]=e[o])}Object.defineProperty(Qy,"__esModule",{value:!0});rl(VJ());rl(GJ());rl(Ay());rl(FI());rl(HI());rl(BI());rl(Nu());rl($J());rl(Oy());rl(bI());rl(EI());rl(wI());rl(Ru());rl(gh());rl(By());rl(UJ())});var GO=pt((nZ,HO)=>{(function(e){typeof nZ=="object"&&typeof HO<"u"?HO.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 Fs=="function"&&Fs;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 Fs=="function"&&Fs,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"],F=y.map||function(U){if(U==="")return null;let K=Number(U);if(!Number.isNaN(K)&&K!==1/0)return K;let se=D.reduce((re,ce)=>{if(re)return re;let _e=u(U,ce,!0);return _e.isValid()?_e:null},null);if(se)return new Date(se.valueOf());let ee=C[U];return ee!==void 0?ee:U},V=i.parse(y.parserOptions).on("data",U=>{M.addRow(U.map(F))}).on("end",()=>{V.emit("worksheet",M)});V.on("worksheet",w).on("error",P),x.pipe(V)})}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((w,P)=>{y=y||{};let M=this.workbook.getWorksheet(y.sheetName||y.sheetId),D=i.format(y.formatterOptions);x.on("finish",()=>{w()}),D.on("error",P),D.pipe(x);let{dateFormat:F,dateUTC:V}=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 F?V?u.utc(ee).format(F):u(ee).format(F):V?u.utc(ee).format():u(ee).format();if(ee.error)return ee.error;if(typeof ee=="object")return JSON.stringify(ee)}return ee}),K=y.includeEmptyRows===void 0||y.includeEmptyRows,se=1;M&&M.eachRow((ee,re)=>{if(K)for(;se++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,w){if(!x||!y)throw new Error("A Cell needs a Row");this._row=x,this._column=y,n.validateAddress(w),this._address=w,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,w){let P=x&&x.numFmt||y&&y.numFmt;P&&(w.numFmt=P);let M=x&&x.font||y&&y.font;M&&(w.font=M);let D=x&&x.alignment||y&&y.alignment;D&&(w.alignment=D);let F=x&&x.border||y&&y.border;F&&(w.border=F);let V=x&&x.fill||y&&y.fill;V&&(w.fill=V);let U=x&&x.protection||y&&y.protection;return U&&(w.protection=U),w}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(w=>{y.addEx(this.fullAddress,w)})}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=w=>{let P=C[w];P&&(x[w]=P)};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 w=this.types[C];if(!w)throw new Error("Could not create Value of type "+C);return new w(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(w,P){return w.min-P.min});y<_.length;){let w=_[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,w;function P(D,F){let V=f.findCellAt(C,D,_.col);return!(!V||!V.mark)&&(x[F]=D,V.mark=!1,!0)}for(w=_.row-1;P(w,"top");w--);for(w=_.row+1;P(w,"bottom");w++);function M(D,F){let V=[];for(w=x.top;w<=x.bottom;w++){let U=f.findCellAt(C,w,D);if(!U||!U.mark)return!1;V.push(U)}x[F]=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=P;M>=_;M--)D=this._cells[M-1],D?(F=this.getCell(M+w),F.value=D.value,F.style=D.style,F._comment=D._comment):this._cells[M+w-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=(w,P,M)=>{w[P]===void 0&&(w[P]=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=(w,P)=>{if(!w)throw new Error(P)};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((w,P)=>{u(w.name,`Column ${P} must have a name`),P===0?d(w,"totalsRowLabel","Total"):(d(w,"totalsRowFunction","none"),w.totalsRowFormula=this.getFormula(w))})}store(){let s=(x,y)=>{y&&Object.keys(y).forEach(w=>{x[w]=y[w]})},{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,w)=>{let{style:P,name:M}=y,D=x.getCell(_+w);D.value=M,s(D,P)})}if(u.rows.forEach(x=>{let y=d.getRow(f+C++);x.forEach((w,P)=>{let M=y.getCell(_+P);M.value=w,s(M,u.columns[P].style)})}),u.totalsRow){let x=d.getRow(f+C++);u.columns.forEach((y,w)=>{let P=x.getCell(_+w);if(w===0)P.value=y.totalsRowLabel;else{let M=this.getFormula(y);P.value=M?{formula:y.totalsRowFormula,result:y.totalsRowResult}:null}s(P,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,w)=>{x.getCell(f+w).value=y})}),d.totalsRow){let C=s.getRow(u+_++);d.columns.forEach((x,y)=>{let w=C.getCell(f+y);y===0?w.value=x.totalsRowLabel:this.getFormula(x)&&(w.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(P&&P.orderNo)>w?P.orderNo:w,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(w=>w.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:w}=e("../utils/copy-style");o.exports=class{constructor(P){P=P||{},this._workbook=P.workbook,this.id=P.id,this.orderNo=P.orderNo,this.name=P.name,this.state=P.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},P.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:!(!P.pageSetup||!P.pageSetup.fitToWidth&&!P.pageSetup.fitToHeight||P.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},P.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},P.headerFooter),this.dataValidations=new x,this.views=P.views||[],this.autoFilter=P.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(P){if(P===void 0&&(P="sheet"+this.id),this._name!==P){if(typeof P!="string")throw new Error("The name has to be a string.");if(P==="")throw new Error("The name can't be empty.");if(P==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(P))throw new Error(`Worksheet name ${P} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(P))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+P);if(P&&P.length>31&&(console.warn(`Worksheet name ${P} exceeds 31 chars. This will be truncated`),P=P.substring(0,31)),this._workbook._worksheets.find(M=>M&&M.name.toLowerCase()===P.toLowerCase()))throw new Error("Worksheet name already exists: "+P);this._name=P}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let P=new s;return this._rows.forEach(M=>{if(M){let D=M.dimensions;D&&P.expand(M.number,D.min,M.number,D.max)}}),P}get columns(){return this._columns}set columns(P){this._headerRowCount=P.reduce((F,V)=>{let U=(V.header?1:V.headers&&V.headers.length)||0;return Math.max(F,U)},0);let M=1,D=this._columns=[];P.forEach(F=>{let V=new u(this,M++,!1);D.push(V),V.defn=F})}getColumnKey(P){return this._keys[P]}setColumnKey(P,M){this._keys[P]=M}deleteColumnKey(P){delete this._keys[P]}eachColumnKey(P){n.each(this._keys,P)}getColumn(P){if(typeof P=="string"){let M=this._keys[P];if(M)return M;P=i.l2n(P)}if(this._columns||(this._columns=[]),P>this._columns.length){let M=this._columns.length+1;for(;M<=P;)this._columns.push(new u(this,M++))}return this._columns[P-1]}spliceColumns(P,M){let D=this._rows.length;for(var F=arguments.length,V=new Array(F>2?F-2:0),U=2;U0)for(let re=0;re{ce.push(ue[re]||null)});let _e=this.getRow(re+1);_e.splice.apply(_e,ce)}else this._rows.forEach(re=>{re&&re.splice(P,M)});let K=V.length-M,se=P+M,ee=this._columns.length;if(K<0)for(let re=P+V.length;re<=ee;re++)this.getColumn(re).defn=this.getColumn(re-K).defn;else if(K>0)for(let re=ee;re>=se;re--)this.getColumn(re+K).defn=this.getColumn(re).defn;for(let re=P;re{P=Math.max(P,M.cellCount)}),P}get actualColumnCount(){let P=[],M=0;return this.eachRow(D=>{D.eachCell(F=>{let{col:V}=F;P[V]||(P[V]=!0,M++)})}),M}_commitRow(){}get _lastRowNumber(){let P=this._rows,M=P.length;for(;M>0&&P[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(P){return this._rows[P-1]}findRows(P,M){return this._rows.slice(P-1,P-1+M)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let P=0;return this.eachRow(()=>{P++}),P}getRow(P){let M=this._rows[P-1];return M||(M=this._rows[P-1]=new d(this,P)),M}getRows(P,M){if(M<1)return;let D=[];for(let F=P;F1&&arguments[1]!==void 0?arguments[1]:"n",D=this._nextRow,F=this.getRow(D);return F.values=P,this._setStyleOption(D,M[0]==="i"?M:"n"),F}addRows(P){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",D=[];return P.forEach(F=>{D.push(this.addRow(F,M))}),D}insertRow(P,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(P,0,M),this._setStyleOption(P,D),this.getRow(P)}insertRows(P,M){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(P,0,...M),D!=="n")for(let F=0;F1&&arguments[1]!==void 0?arguments[1]:"n";M[0]==="o"&&this.findRow(P+1)!==void 0?this._copyStyle(P+1,P,M[1]==="+"):M[0]==="i"&&this.findRow(P-1)!==void 0&&this._copyStyle(P-1,P,M[1]==="+")}_copyStyle(P,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=this.getRow(P),V=this.getRow(M);V.style=w(F.style),F.eachCell({includeEmpty:D},(U,K)=>{V.getCell(K).style=w(U.style)}),V.height=F.height}duplicateRow(P,M){let D=arguments.length>2&&arguments[2]!==void 0&&arguments[2],F=this._rows[P-1],V=new Array(M).fill(F.values);this.spliceRows(P+1,D?0:M,...V);for(let U=0;U{K.getCell(ee).style=se.style})}}spliceRows(P,M){let D=P+M;for(var F=arguments.length,V=new Array(F>2?F-2:0),U=2;U{_e.getCell(j).style=ue.style}),this._rows[re-1]=void 0}else this._rows[re+se-1]=void 0;else if(se>0)for(re=ee;re>=D;re--)if(ce=this._rows[re-1],ce){let _e=this.getRow(re+se);_e.values=ce.values,_e.style=ce.style,_e.height=ce.height,ce.eachCell({includeEmpty:!0},(ue,j)=>{if(_e.getCell(j).style=ue.style,ue._value.constructor.name==="MergeValue"){let W=this.getRow(ue._row._number+K).getCell(j),pe=ue._value._master,O=this.getRow(pe._row._number+K).getCell(pe._column._number);W.merge(O)}})}else this._rows[re+se-1]=void 0;for(re=0;re{D&&D.hasValues&&M(D,D.number)})}getSheetValues(){let P=[];return this._rows.forEach(M=>{M&&(P[M.number]=M.values)}),P}findCell(P,M){let D=i.getAddress(P,M),F=this._rows[D.row-1];return F?F.findCell(D.col):void 0}getCell(P,M){let D=i.getAddress(P,M);return this.getRow(D.row).getCellEx(D)}mergeCells(){for(var P=arguments.length,M=new Array(P),D=0;D{if(F.intersects(P))throw new Error("Cannot merge already merged cells")});let D=this.getCell(P.top,P.left);for(let F=P.top;F<=P.bottom;F++)for(let V=P.left;V<=P.right;V++)(F>P.top||V>P.left)&&this.getCell(F,V).merge(D,M);this._merges[D.address]=P}_unMergeMaster(P){let M=this._merges[P.address];if(M){for(let D=M.top;D<=M.bottom;D++)for(let F=M.left;F<=M.right;F++)this.getCell(D,F).unmerge();delete this._merges[P.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var P=arguments.length,M=new Array(P),D=0;D3&&arguments[3]!==void 0?arguments[3]:"shared",V=i.decode(P),{top:U,left:K,bottom:se,right:ee}=V,re=ee-K+1,ce=i.encodeAddress(U,K),_e=F==="shared",ue;ue=typeof D=="function"?D:Array.isArray(D)?Array.isArray(D[0])?(W,pe)=>D[W-U][pe-K]:(W,pe)=>D[(W-U)*re+(pe-K)]:()=>{};let j=!0;for(let W=U;W<=se;W++)for(let pe=K;pe<=ee;pe++)j?(this.getCell(W,pe).value={shareType:F,formula:M,ref:P,result:ue(W,pe)},j=!1):this.getCell(W,pe).value=_e?{sharedFormula:ce,result:ue(W,pe)}:ue(W,pe)}addImage(P,M){let D={type:"image",imageId:P,range:M};this._media.push(new _(this,D))}getImages(){return this._media.filter(P=>P.type==="image")}addBackgroundImage(P){let M={type:"background",imageId:P};this._media.push(new _(this,M))}getBackgroundImageId(){let P=this._media.find(M=>M.type==="background");return P&&P.imageId}protect(P,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),P&&(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(P,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),M&&(this.sheetProtection=Object.assign(this.sheetProtection,M),!P&&"spinCount"in M&&delete this.sheetProtection.spinCount),D()})}unprotect(){this.sheetProtection=null}addTable(P){let M=new C(this,P);return this.tables[P.name]=M,M}getTable(P){return this.tables[P]}removeTable(P){delete this.tables[P]}getTables(){return Object.values(this.tables)}addConditionalFormatting(P){this.conditionalFormattings.push(P)}removeConditionalFormatting(P){typeof P=="number"?this.conditionalFormattings.splice(P,1):this.conditionalFormattings=P instanceof Function?this.conditionalFormattings.filter(P):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(P){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=P}get model(){let P={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(F=>F.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(F=>F.model),conditionalFormattings:this.conditionalFormattings};P.cols=u.toModel(this.columns);let M=P.rows=[],D=P.dimensions=new s;return this._rows.forEach(F=>{let V=F&&F.model;V&&(D.expand(V.number,V.min,V.number,V.max),M.push(V))}),P.merges=[],n.each(this._merges,F=>{P.merges.push(F.range)}),P}_parseRows(P){this._rows=[],P.rows.forEach(M=>{let D=new d(this,M.number);this._rows[D.number-1]=D,D.model=M})}_parseMergeCells(P){n.each(P.mergeCells,M=>{this.mergeCellsWithoutStyle(M)})}set model(P){this.name=P.name,this._columns=u.fromModel(this,P.cols),this._parseRows(P),this._parseMergeCells(P),this.dataValidations=new x(P.dataValidations),this.properties=P.properties,this.pageSetup=P.pageSetup,this.headerFooter=P.headerFooter,this.views=P.views,this.autoFilter=P.autoFilter,this._media=P.media.map(M=>new _(this,M)),this.sheetProtection=P.sheetProtection,this.tables=P.tables.reduce((M,D)=>{let F=new C;return F.model=D,M[D.name]=F,M},{}),this.conditionalFormattings=P.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 P,M=0;M=65&&P<=90)u=!0,f+=s[M],_=26*_+P-64;else if(P>=48&&P<=57)C=!0,x+=s[M],y=10*y+P-48;else if(C&&u&&P!==36)break;if(u){if(_>16384)throw new Error("Out of bounds. Invalid column letter: "+f)}else _=void 0;C||(y=void 0);let w={address:s=f+x,col:_,row:y,$col$row:`$${f}$${x}`};return _<=100&&y<=100&&(this._hash[s]=w,this._hash[w.$col$row]=w),w},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]),w=Math.min(x.row,y.row),P=Math.min(x.col,y.col),M=Math.max(x.row,y.row),D=Math.max(x.col,y.col);return x=this.n2l(P)+w,y=this.n2l(D)+M,{top:w,left:P,bottom:M,right:D,sheetName:u,tl:{address:x,col:P,row:w,$col$row:`$${this.n2l(P)}$${w}`,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 mk(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new i));let u=new n,f;u.on("error",P=>{f=P});let _=[];u.on("opentag",P=>_.push({eventType:"opentag",value:P})),u.on("text",P=>_.push({eventType:"text",value:P})),u.on("closetag",P=>_.push({eventType:"closetag",value:P}));try{for(var C=Tg(d),x,y,w;x=!(y=yield new WT(C.next())).done;x=!1){let P=y.value;if(u.write(s(P)),f)throw f;yield _,_=[]}}catch{w=[y]}finally{try{x&&(y=C.return)&&(yield new WT(y.call(C)))}finally{if(w)throw w[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,w,P,M)=>{if(M)return x;let D=s.exec(P);if(D){let F=D[1],V=D[2].toUpperCase(),U=D[3],K=D[4];if(V.length>3||V.length===3&&V>"XFD")return x;let se=n.l2n(V),ee=parseInt(K,10);return F||(se+=C.col-_.col),U||(ee+=C.row-_.row),(y||"")+(F||"")+n.n2l(se)+(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,F,V){return this.toBuffer().copy(M,D,F,V)}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,F,V){return this._data._buf.copy(M,D,F,V)}toBuffer(){return this._data.toBuffer()}}class C{constructor(M){this._data=M}get length(){return this._data.length}copy(M,D,F,V){this._data.copy(M,D,F,V)}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,F){let V=Math.min(F,this.size-this.iWrite);return M.copy(this.buffer,this.iWrite,D,D+V),this.iWrite+=V,V}}let y=function(P){P=P||{},this.bufSize=P.bufSize||1048576,this.buffers=[],this.batch=P.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(P=>P.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let M=this.buffers[this.buffers.length-1];if(!M.full)return M}let P=new x(this.bufSize);return this.buffers.push(P),P},_pipe(P){return Zn(this,null,function*(){yield Promise.all(this.pipes.map(function(M){return new Promise(D=>{M.write(P.toBuffer(),()=>{D()})})}))})},_writeToBuffers(P){let M=0,D=P.length;for(;M1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(F),n.nextTick(D)):(yield this._pipe(F),D());else this.paused||this.emit("data",F.toBuffer()),this._writeToBuffers(F),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(P,M,D){let F=V=>{V?D(V):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};P?this.write(P,M,F):F()},read(P){let M;if(P){for(M=[];P&&this.buffers.length&&!this.buffers[0].eod;){let D=this.buffers[0],F=D.read(P);P-=F.length,M.push(F),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(P){this.encoding=P},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(P){this.pipes.push(P),!this.paused&&this.buffers.length&&this.end()},unpipe(P){this.pipes=this.pipes.filter(M=>M!==P)},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((w,P)=>{let M=u[P];return s.isEqual(w,M)});if(d===null||u===null)return d===u;if(y=Object.keys(d),Object.keys(u).length!==y.length)return!1;for(let w of y)if(!u.hasOwnProperty(w))return!1;return s.every(d,(w,P)=>{let M=u[P];return s.isEqual(w,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,w){f=d[w],C=Array.isArray(y),s.isObject(y)||C?(C?(C=!1,_=f&&Array.isArray(f)?f:[]):_=f&&s.isObject(f)?f:{},d[w]=s.deepMerge(_,y)):s.isUndefined(y)||(d[w]=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(w=>{Object.defineProperty(f,w,Object.getOwnPropertyDescriptor(C,w))});let y={constructor:{value:f,enumerable:!1,writable:!1,configurable:!0}};x&&Object.keys(x).forEach(w=>{y[w]=Object.getOwnPropertyDescriptor(x,w)}),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,w=_.index;for(;w=11&&P!==13)){x="";break}continue}y!==w&&(C+=f.substring(y,w)),y=w+1,x&&(C+=x)}return y!==w?C+f.substring(y,w):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 Zn(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 Zn(this,null,function*(){try{for(var f=Tg(u),_,C,x;_=!(C=yield f.next()).done;_=!1){let y=C.value;for(let{eventType:w,value:P}of y)if(w==="opentag")this.parseOpen(P);else if(w==="text")this.parseText(P);else if(w==="closetag"&&!this.parseClose(P.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 Zn(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 w=y%2==0;!_&&w&&s(x)?f.push(x):_&&!w?(_=!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"),w=e("./workbook-calc-properties-xform");class P extends d{constructor(){super(),this.map={fileVersion:P.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 w}}prepare(D){D.sheets=D.worksheets;let F=[],V=0;D.sheets.forEach(U=>{if(U.pageSetup&&U.pageSetup.printArea&&U.pageSetup.printArea.split("&&").forEach(K=>{let se=K.split(":"),ee={name:"_xlnm.Print_Area",ranges:[`'${U.name}'!$${se[0]}:$${se[1]}`],localSheetId:V};F.push(ee)}),U.pageSetup&&(U.pageSetup.printTitlesRow||U.pageSetup.printTitlesColumn)){let K=[];if(U.pageSetup.printTitlesColumn){let ee=U.pageSetup.printTitlesColumn.split(":");K.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}if(U.pageSetup.printTitlesRow){let ee=U.pageSetup.printTitlesRow.split(":");K.push(`'${U.name}'!$${ee[0]}:$${ee[1]}`)}let se={name:"_xlnm.Print_Titles",ranges:K,localSheetId:V};F.push(se)}V++}),F.length&&(D.definedNames=D.definedNames.concat(F)),(D.media||[]).forEach((U,K)=>{U.name=U.type+(K+1)})}render(D,F){D.openXml(s.StdDocAttributes),D.openNode("workbook",P.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(D),this.map.workbookPr.render(D,F.properties),this.map.bookViews.render(D,F.views),this.map.sheets.render(D,F.sheets),this.map.definedNames.render(D,F.definedNames),this.map.calcPr.render(D,F.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 F=(D.workbookRels||[]).reduce((ee,re)=>(ee[re.Id]=re,ee),{}),V=[],U,K=0;(D.sheets||[]).forEach(ee=>{let re=F[ee.rId];re&&(U=D.worksheetHash["xl/"+re.Target.replace(/^(\s|\/xl\/)+/,"")],U&&(U.name=ee.name,U.id=ee.id,U.state=ee.state,V[K++]=U))});let se=[];n.each(D.definedNames,ee=>{if(ee.name==="_xlnm.Print_Area"){if(U=V[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let re=i.decodeEx(ee.ranges[0]);U.pageSetup.printArea=U.pageSetup.printArea?`${U.pageSetup.printArea}&&${re.dimensions}`:re.dimensions}}else if(ee.name==="_xlnm.Print_Titles"){if(U=V[ee.localSheetId],U){U.pageSetup||(U.pageSetup={});let re=ee.ranges.join(","),ce=/\$/g,_e=/\$\d+:\$\d+/,ue=re.match(_e);if(ue&&ue.length){let pe=ue[0];U.pageSetup.printTitlesRow=pe.replace(ce,"")}let j=/\$[A-Z]+:\$[A-Z]+/,W=re.match(j);if(W&&W.length){let pe=W[0];U.pageSetup.printTitlesColumn=pe.replace(ce,"")}}}else se.push(ee)}),D.definedNames=se,D.media.forEach((ee,re)=>{ee.index=re})}}P.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"},P.STATIC_XFORMS={fileVersion:new u({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},o.exports=P},{"../../../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(w){return(typeof w.range=="string"?n.decode(w.range):w.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(Lt(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 w=C.commentsMap&&C.commentsMap[_.address];w&&(_.comment=w)}}},{"../../../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=P=>{let{type:M,operator:D}=P;switch(M){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:M};default:return{type:M,operator:D}}};class w 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(F=>{this.formulaXform.render(M,F)}),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){w.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 F=(V=>{if(V.formulae&&V.formulae[0])return V.formulae[0];let U=new s(V.ref),{tl:K}=U;switch(V.operator){case"containsText":return`NOT(ISERROR(SEARCH("${V.text}",${K})))`;case"containsBlanks":return`LEN(TRIM(${K}))=0`;case"notContainsBlanks":return`LEN(TRIM(${K}))>0`;case"containsErrors":return`ISERROR(${K})`;case"notContainsErrors":return`NOT(ISERROR(${K}))`;default:return}})(D);F&&this.formulaXform.render(M,F),M.closeNode()}renderTimePeriod(M,D){M.openNode(this.tag,{type:"timePeriod",dxfId:D.dxfId,priority:D.priority,timePeriod:D.timePeriod});let F=(V=>{if(V.formulae&&V.formulae[0])return V.formulae[0];let U=new s(V.ref),{tl:K}=U;switch(V.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${K},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${K},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${K},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${K},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${K},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${K},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${K},1)=TODAY()-1`;case"today":return`FLOOR(${K},1)=TODAY()`;case"tomorrow":return`FLOOR(${K},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${K},1)<=6,FLOOR(${K},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${K})=MONTH(EDATE(TODAY(),0-1)),YEAR(${K})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${K})=MONTH(TODAY()),YEAR(${K})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${K})=MONTH(EDATE(TODAY(),0+1)),YEAR(${K})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(D);F&&this.formulaXform.render(M,F),M.closeNode()}createNewModel(M){let{attributes:D}=M;return Lt(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=w},{"../../../../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,w){let P=x[y];P!==void 0?C[y]=P:w!==void 0&&(C[y]=w)}function _(C,x,y,w){let P=x[y];P!==void 0?C[y]=i.parseBoolean(P):w!==void 0&&(C[y]=w)}o.exports=class extends d{get tag(){return"dataValidations"}render(C,x){let y=(function(w){let P=n.map(w,(F,V)=>({address:V,dataValidation:F,marked:!1})).sort((F,V)=>n.strcmp(F.address,V.address)),M=n.keyBy(P,"address"),D=(F,V,U)=>{for(let K=0;K{if(!F.marked){let V=s.decodeEx(F.address);if(V.dimensions)return M[V.dimensions].marked=!0,Lt(at({},F.dataValidation),{sqref:F.address});let U=1,K=s.encodeAddress(V.row+U,V.col);for(;w[K]&&n.isEqual(F.dataValidation,w[K]);)U++,K=s.encodeAddress(V.row+U,V.col);let se=1;for(;D(V,U,V.col+se);)se++;for(let ee=0;ee1||se>1){let ee=V.row+(U-1),re=V.col+(se-1);return Lt(at({},F.dataValidation),{sqref:`${F.address}:${s.encodeAddress(ee,re)}`})}return Lt(at({},F.dataValidation),{sqref:F.address})}return null}).filter(Boolean)})(x);y.length&&(C.openNode("dataValidations",{count:y.length}),y.forEach(w=>{C.openNode("dataValidation"),w.type!=="any"&&(C.addAttribute("type",w.type),w.operator&&w.type!=="list"&&w.operator!=="between"&&C.addAttribute("operator",w.operator),w.allowBlank&&C.addAttribute("allowBlank","1")),w.showInputMessage&&C.addAttribute("showInputMessage","1"),w.promptTitle&&C.addAttribute("promptTitle",w.promptTitle),w.prompt&&C.addAttribute("prompt",w.prompt),w.showErrorMessage&&C.addAttribute("showErrorMessage","1"),w.errorStyle&&C.addAttribute("errorStyle",w.errorStyle),w.errorTitle&&C.addAttribute("errorTitle",w.errorTitle),w.error&&C.addAttribute("error",w.error),C.addAttribute("sqref",w.sqref),(w.formulae||[]).forEach((P,M)=>{C.openNode("formula"+(M+1)),w.type==="date"?C.writeText(i.dateToExcel(new Date(P))):C.writeText(P),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 w=C.left;w<=C.right;w++){let P=y.cells[w-1];P?P.type===d.ValueType.Merge&&(P.master=C.tl):y.cells[w]={type:d.ValueType.Null,address:s.encodeAddress(x,w)}}}})}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(w,P,M){M&&d.addAttribute(w,P)},_,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"),w=e("./hyperlink-xform"),P=e("./merge-cell-xform"),M=e("./data-validations-xform"),D=e("./sheet-properties-xform"),F=e("./sheet-format-properties-xform"),V=e("./sheet-view-xform"),U=e("./sheet-protection-xform"),K=e("./page-margins-xform"),se=e("./page-setup-xform"),ee=e("./print-options-xform"),re=e("./auto-filter-xform"),ce=e("./picture-xform"),_e=e("./drawing-xform"),ue=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 $={},oe={};return N.forEach(be=>{$[be.ref]=be,be.rules.forEach(ye=>{let{x14Id:Ne}=ye;Ne&&(oe[Ne]=ye)})}),G.forEach(be=>{be.rules.forEach(ye=>{let Ne=oe[ye.x14Id];Ne?((te,Oe)=>{Object.keys(Oe).forEach(J=>{let Q=te[J],Ce=Oe[J];Q===void 0&&Ce!==void 0&&(te[J]=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:oe,ignoreNodes:be}=G||{};this.ignoreNodes=be||[],this.map={sheetPr:new D,dimension:new y,sheetViews:new _({tag:"sheetViews",count:!1,childXform:new V}),sheetFormatPr:new F,cols:new _({tag:"cols",count:!1,childXform:new x}),sheetData:new _({tag:"sheetData",count:!1,empty:!0,childXform:new C({maxItems:oe}),maxItems:$}),autoFilter:new re,mergeCells:new _({tag:"mergeCells",count:!0,childXform:new P}),rowBreaks:new j,hyperlinks:new _({tag:"hyperlinks",count:!1,childXform:new w}),pageMargins:new K,dataValidations:new M,pageSetup:new se,headerFooter:new W,printOptions:new ee,picture:new ce,drawing:new _e,sheetProtection:new U,tableParts:new _({tag:"tableParts",count:!0,childXform:new ue}),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 oe=G.rels=[];function be(te){return"rId"+(te.length+1)}if(G.hyperlinks.forEach(te=>{let Oe=be(oe);te.rId=Oe,oe.push({Id:Oe,Type:d.Hyperlink,Target:te.target,TargetMode:"External"})}),G.comments.length>0){let te={Id:be(oe),Type:d.Comments,Target:`../comments${G.id}.xml`};oe.push(te);let Oe={Id:be(oe),Type:d.VmlDrawing,Target:`../drawings/vmlDrawing${G.id}.vml`};oe.push(Oe),G.comments.forEach(J=>{J.refAddress=i.decodeAddress(J.ref)}),$.commentRefs.push({commentName:"comments"+G.id,vmlDrawing:"vmlDrawing"+G.id})}let ye=[],Ne;G.media.forEach(te=>{if(te.type==="background"){let Oe=be(oe);Ne=$.media[te.imageId],oe.push({Id:Oe,Type:d.Image,Target:`../media/${Ne.name}.${Ne.extension}`}),G.background={rId:Oe},G.image=$.media[te.imageId]}else if(te.type==="image"){let{drawing:Oe}=G;Ne=$.media[te.imageId],Oe||(Oe=G.drawing={rId:be(oe),name:"drawing"+ ++$.drawingsCount,anchors:[],rels:[]},$.drawings.push(Oe),oe.push({Id:Oe.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${Oe.name}.xml`}));let J=this.preImageId===te.imageId?ye[te.imageId]:ye[Oe.rels.length];J||(J=be(Oe.rels),ye[Oe.rels.length]=J,Oe.rels.push({Id:J,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Ne.name}.${Ne.extension}`}));let Q={picture:{rId:J},range:te.range};if(te.hyperlinks&&te.hyperlinks.hyperlink){let Ce=be(Oe.rels);ye[Oe.rels.length]=Ce,Q.picture.hyperlinks={tooltip:te.hyperlinks.tooltip,rId:Ce},Oe.rels.push({Id:Ce,Type:d.Hyperlink,Target:te.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=te.imageId,Oe.anchors.push(Q)}}),G.tables.forEach(te=>{let Oe=be(oe);te.rId=Oe,oe.push({Id:Oe,Type:d.Table,Target:"../tables/"+te.target}),te.columns.forEach(J=>{let{style:Q}=J;Q&&(J.dxfId=$.styles.addDxfStyle(Q))})}),this.map.extLst.prepare(G,$)}render(G,$){G.openXml(s.StdDocAttributes),G.openNode("worksheet",L.WORKSHEET_ATTRIBUTES);let oe=$.properties?{defaultRowHeight:$.properties.defaultRowHeight,dyDescent:$.properties.dyDescent,outlineLevelCol:$.properties.outlineLevelCol,outlineLevelRow:$.properties.outlineLevelRow}:void 0;$.properties&&$.properties.defaultColWidth&&(oe.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,oe),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(Oe=>{Oe.Type===d.VmlDrawing&&G.leafNode("legacyDrawing",{"r:id":Oe.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 oe={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(oe,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 oe=(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((Oe,J)=>{Oe.note=Object.assign({},Oe.note,te[J])})}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]=oe[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=oe[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 Oe={type:"image",imageId:te.medium.index,range:te.range,hyperlinks:te.picture.hyperlinks};G.media.push(Oe)}})}}let be=G.background&&oe[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=oe[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,w){w&&(f.addAttribute(y,w),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,w,P){y&&(_[w]=P,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=Lt(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(w=>{y.render(C,w)}),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,w){let{map:P}=this;y.openNode(this.options.tagName),f.each(this.map,(M,D)=>{P[D].xform.render(y,w[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 w=this.map[y];return this.parser.model&&(this.model[w.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"),w=e("./dxf-xform");class P 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 w}),numFmt:new x,font:new f,fill:new _,border:new C,style:new y({xfId:!0}),cellStyles:P.STATIC_XFORMS.cellStyles,tableStyles:P.STATIC_XFORMS.tableStyles,extLst:P.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,F){F=F||this.model,D.openXml(i.StdDocAttributes),D.openNode("styleSheet",P.STYLESHEET_ATTRIBUTES),this.index?(F.numFmts&&F.numFmts.length&&(D.openNode("numFmts",{count:F.numFmts.length}),F.numFmts.forEach(V=>{D.writeXml(V)}),D.closeNode()),F.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),D.openNode("fonts",{count:F.fonts.length,"x14ac:knownFonts":1}),F.fonts.forEach(V=>{D.writeXml(V)}),D.closeNode(),D.openNode("fills",{count:F.fills.length}),F.fills.forEach(V=>{D.writeXml(V)}),D.closeNode(),D.openNode("borders",{count:F.borders.length}),F.borders.forEach(V=>{D.writeXml(V)}),D.closeNode(),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),D.openNode("cellXfs",{count:F.styles.length}),F.styles.forEach(V=>{D.writeXml(V)}),D.closeNode()):(this.map.numFmts.render(D,F.numFmts),this.map.fonts.render(D,F.fonts),this.map.fills.render(D,F.fills),this.map.borders.render(D,F.borders),this.map.cellStyleXfs.render(D,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(D,F.styles)),P.STATIC_XFORMS.cellStyles.render(D),this.map.dxfs.render(D,F.dxfs),P.STATIC_XFORMS.tableStyles.render(D),P.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 F=(V,U)=>{U.model&&U.model.length&&(this.model[V]=U.model)};if(F("numFmts",this.map.numFmts),F("fonts",this.map.fonts),F("fills",this.map.fills),F("borders",this.map.borders),F("styles",this.map.cellXfs),F("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let V=this.index.numFmt;this.model.numFmts.forEach(U=>{V[U.id]=U.formatCode})}return!1}default:return!0}}addStyleModel(D,F){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 V={};if(F=F||n.ValueType.Number,D.numFmt)V.numFmtId=this._addNumFmtStr(D.numFmt);else switch(F){case n.ValueType.Number:V.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:V.numFmtId=this._addNumFmtStr("mm-dd-yy")}D.font&&(V.fontId=this._addFont(D.font)),D.border&&(V.borderId=this._addBorder(D.border)),D.fill&&(V.fillId=this._addFill(D.fill)),D.alignment&&(V.alignment=D.alignment),D.protection&&(V.protection=D.protection);let U=this._addStyle(V);return this.weakMap&&this.weakMap.set(D,U),U}getStyleModel(D){let F=this.model.styles[D];if(!F)return null;let V=this.index.model[D];if(V)return V;if(V=this.index.model[D]={},F.numFmtId){let K=this.index.numFmt[F.numFmtId]||x.getDefaultFmtCode(F.numFmtId);K&&(V.numFmt=K)}function U(K,se,ee){if(ee||ee===0){let re=se[ee];re&&(V[K]=re)}}return U("font",this.model.fonts,F.fontId),U("border",this.model.borders,F.borderId),U("fill",this.model.fills,F.fillId),F.alignment&&(V.alignment=F.alignment),F.protection&&(V.protection=F.protection),V}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 F=this.map.style.toXml(D),V=this.index.style[F];return V===void 0&&(V=this.index.style[F]=this.model.styles.length,this.model.styles.push(F)),V}_addNumFmtStr(D){let F=x.getDefaultFmtId(D);if(F!==void 0||(F=this.index.numFmt[D],F!==void 0))return F;F=this.index.numFmt[D]=164+this.model.numFmts.length;let V=this.map.numFmt.toXml({id:F,formatCode:D});return this.model.numFmts.push(V),F}_addFont(D){let F=this.map.font.toXml(D),V=this.index.font[F];return V===void 0&&(V=this.index.font[F]=this.model.fonts.length,this.model.fonts.push(F)),V}_addBorder(D){let F=this.map.border.toXml(D),V=this.index.border[F];return V===void 0&&(V=this.index.border[F]=this.model.borders.length,this.model.borders.push(F)),V}_addFill(D){let F=this.map.fill.toXml(D),V=this.index.fill[F];return V===void 0&&(V=this.index.fill[F]=this.model.fills.length,this.model.fills.push(F)),V}}P.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"},P.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"}}]}]})},P.Mock=class extends P{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=P},{"../../../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,Lt(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:w}=x;switch(y){case this.tag:this.reset(),this.model={name:w.name,displayName:w.displayName||w.name,tableRef:w.ref,totalsRow:w.totalsRowCount==="1",headerRow:w.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,w)=>{this.model.columns[w].filterButton=y.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(x,y){x.columns.forEach(w=>{w.dxfId!==void 0&&(w.style=y.styles.getDxfStyle(w.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"),w=e("./xform/style/styles-xform"),P=e("./xform/core/core-xform"),M=e("./xform/strings/shared-strings-xform"),D=e("./xform/core/relationships-xform"),F=e("./xform/core/content-types-xform"),V=e("./xform/core/app-xform"),U=e("./xform/book/workbook-xform"),K=e("./xform/sheet/worksheet-xform"),se=e("./xform/drawing/drawing-xform"),ee=e("./xform/table/table-xform"),re=e("./xform/comment/comments-xform"),ce=e("./xform/comment/vml-notes-xform"),_e=e("./xml/theme1");class ue{constructor(W){this.workbook=W}readFile(W,pe){return Zn(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 K(pe),L=new se,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,Oe)=>(te[Oe.Id]=Oe,te),{}),(ye.anchors||[]).forEach(te=>{let Oe=te.picture&&te.picture.hyperlinks;Oe&&G.rels[Oe.rId]&&(Oe.hyperlink=G.rels[Oe.rId].Target,delete Oe.rId)}),L.reconcile(ye,G))});let $={styles:W.styles};Object.values(W.tables).forEach(be=>{N.reconcile(be,$)});let oe={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,oe)}),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 Zn(this,null,function*(){let N=new K(B),G=yield N.parseStream(W);G.sheetNo=O,pe.worksheetHash[L]=G,pe.worksheets.push(G)})}_processCommentEntry(W,pe,O){return Zn(this,null,function*(){let B=new re,L=yield B.parseStream(W);pe.comments[`../${O}.xml`]=L})}_processTableEntry(W,pe,O){return Zn(this,null,function*(){let B=new ee,L=yield B.parseStream(W);pe.tables[`../tables/${O}.xml`]=L})}_processWorksheetRelsEntry(W,pe,O){return Zn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.worksheetRels[O]=L})}_processMediaEntry(W,pe,O){return Zn(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 oe=new _;oe.on("finish",()=>{pe.mediaIndex[O]=pe.media.length,pe.mediaIndex[N]=pe.media.length;let be={type:"image",name:N,extension:L,buffer:oe.toBuffer()};pe.media.push(be),G()}),W.on("error",be=>{$(be)}),W.pipe(oe)})}})}_processDrawingEntry(W,pe,O){return Zn(this,null,function*(){let B=new se,L=yield B.parseStream(W);pe.drawings[O]=L})}_processDrawingRelsEntry(W,pe,O){return Zn(this,null,function*(){let B=new D,L=yield B.parseStream(W);pe.drawingRels[O]=L})}_processVmlDrawingEntry(W,pe,O){return Zn(this,null,function*(){let B=new ce,L=yield B.parseStream(W);pe.vmlDrawings[`../drawings/${O}.vml`]=L})}_processThemeEntry(W,pe,O){return Zn(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 Zn(this,null,function*(){!W[Symbol.asyncIterator]&&W.pipe&&(W=W.pipe(new u));let O=[];try{for(var B=Tg(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 Zn(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 oe;G=new u({writableObjectMode:!0,readableObjectMode:!0}),oe=n.browser?y(yield N.async("nodebuffer")):yield N.async("string");let be=16384;for(let ye=0;yeZn(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(($,oe)=>{s.readFile(N,G,(be,ye)=>{be?oe(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 se,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 Zn(this,null,function*(){let O=new F().toXml(pe);W.append(O,{name:"[Content_Types].xml"})})}addApp(W,pe){return Zn(this,null,function*(){let O=new V().toXml(pe);W.append(O,{name:"docProps/app.xml"})})}addCore(W,pe){return Zn(this,null,function*(){let O=new P;W.append(O.toXml(pe),{name:"docProps/core.xml"})})}addThemes(W,pe){return Zn(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 Zn(this,null,function*(){let pe=new D().toXml([{Id:"rId1",Type:ue.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:ue.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:ue.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);W.append(pe,{name:"_rels/.rels"})})}addWorkbookRels(W,pe){return Zn(this,null,function*(){let O=1,B=[{Id:"rId"+O++,Type:ue.RelType.Styles,Target:"styles.xml"},{Id:"rId"+O++,Type:ue.RelType.Theme,Target:"theme/theme1.xml"}];pe.sharedStrings.count&&B.push({Id:"rId"+O++,Type:ue.RelType.SharedStrings,Target:"sharedStrings.xml"}),pe.worksheets.forEach(N=>{N.rId="rId"+O++,B.push({Id:N.rId,Type:ue.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 Zn(this,null,function*(){pe.sharedStrings&&pe.sharedStrings.count&&W.append(pe.sharedStrings.xml,{name:"xl/sharedStrings.xml"})})}addStyles(W,pe){return Zn(this,null,function*(){let{xml:O}=pe.styles;O&&W.append(O,{name:"xl/styles.xml"})})}addWorkbook(W,pe){return Zn(this,null,function*(){let O=new U;W.append(O.toXml(pe),{name:"xl/workbook.xml"})})}addWorksheets(W,pe){return Zn(this,null,function*(){let O=new K,B=new D,L=new re,N=new ce;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 w(!0):new w.Mock;let O=new U,B=new K;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 Zn(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 Zn(this,null,function*(){let pe=new _;return yield this.write(pe,W),pe.read()})}}ue.RelType=e("./rel-type"),o.exports=ue}).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,w)=>y?(x=!0,C(y)):(w&&w.forEach(P=>{this.push(n.from(P,"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| ]`;this.ESCAPE_REGEXP=new RegExp(f)}set headers(u){this._headers=u}shouldQuote(u,f){let _=f?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(_)?_:Array.isArray(_)?_[u]:this._headers!==null&&_[this._headers[u]]}format(u,f,_){let C=(""+(s.default(u)?"":u)).replace(/\0/g,""),{formatterOptions:x}=this;return x.quote!==""&&C.indexOf(x.quote)!==-1?this.quoteField(C.replace(this.REPLACE_REGEXP,x.escapedQuote)):C.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(f,_)?this.quoteField(C):C}quoteField(u){let{quote:f}=this.formatterOptions;return`${f}${u}${f}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,o,t){"use strict";var n=function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;let i=n(e("lodash.isfunction")),s=n(e("lodash.isequal")),d=e("./FieldFormatter"),u=e("../types");class f{constructor(C){this.rowCount=0,this.formatterOptions=C,this.fieldFormatter=new d.FieldFormatter(C),this.headers=C.headers,this.shouldWriteHeaders=C.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),C.transform&&(this.rowTransform=C.transform)}static isRowHashArray(C){return!!Array.isArray(C)&&Array.isArray(C[0])&&C[0].length===2}static isRowArray(C){return Array.isArray(C)&&!this.isRowHashArray(C)}static gatherHeaders(C){return f.isRowHashArray(C)?C.map(x=>x[0]):Array.isArray(C)?C:Object.keys(C)}static createTransform(C){return u.isSyncTransform(C)?(x,y)=>{let w=null;try{w=C(x)}catch(P){return y(P)}return y(null,w)}:(x,y)=>{C(x,y)}}set rowTransform(C){if(!i.default(C))throw new TypeError("The transform should be a function");this._rowTransform=f.createTransform(C)}format(C,x){this.callTransformer(C,(y,w)=>{if(y)return x(y);if(!C)return x(null);let P=[];if(w){let{shouldFormatColumns:M,headers:D}=this.checkHeaders(w);if(this.shouldWriteHeaders&&D&&!this.hasWrittenHeaders&&(P.push(this.formatColumns(D,!0)),this.hasWrittenHeaders=!0),M){let F=this.gatherColumns(w);P.push(this.formatColumns(F,!1))}}return x(null,P)})}finish(C){let x=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return C(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));x.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&x.push(this.formatterOptions.rowDelimiter),C(null,x)}checkHeaders(C){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let x=f.gatherHeaders(C);return this.headers=x,this.fieldFormatter.headers=x,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(x,C),headers:x}:{shouldFormatColumns:!0,headers:null}}gatherColumns(C){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(C)?f.isRowHashArray(C)?this.headers.map((x,y)=>{let w=C[y];return w?w[1]:""}):f.isRowArray(C)&&!this.shouldWriteHeaders?C:this.headers.map((x,y)=>C[y]):this.headers.map(x=>C[x])}callTransformer(C,x){return this._rowTransform?this._rowTransform(C,x):x(null,C)}formatColumns(C,x){let y=C.map((P,M)=>this.fieldFormatter.format(P,M,x)).join(this.formatterOptions.delimiter),{rowCount:w}=this;return this.rowCount+=1,w?[this.formatterOptions.rowDelimiter,y].join(""):y}}t.RowFormatter=f},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var n=e("./RowFormatter");Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=e("./FieldFormatter");Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,o,t){(function(n){(function(){"use strict";var i=Object.create?function(M,D,F,V){V===void 0&&(V=F),Object.defineProperty(M,V,{enumerable:!0,get:function(){return D[F]}})}:function(M,D,F,V){V===void 0&&(V=F),M[V]=D[F]},s=Object.create?function(M,D){Object.defineProperty(M,"default",{enumerable:!0,value:D})}:function(M,D){M.default=D},d=function(M){if(M&&M.__esModule)return M;var D={};if(M!=null)for(var F in M)F!=="default"&&Object.prototype.hasOwnProperty.call(M,F)&&i(D,M,F);return s(D,M),D},u=function(M,D){for(var F in M)F==="default"||Object.prototype.hasOwnProperty.call(D,F)||i(D,M,F)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;let f=e("util"),_=e("stream"),C=d(e("fs")),x=e("./FormatterOptions"),y=e("./CsvFormatterStream");u(e("./types"),t);var w=e("./CsvFormatterStream");Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return w.CsvFormatterStream}});var P=e("./FormatterOptions");Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return P.FormatterOptions}}),t.format=M=>new y.CsvFormatterStream(new x.FormatterOptions(M)),t.write=(M,D)=>{let F=t.format(D),V=f.promisify((U,K)=>{F.write(U,void 0,K)});return M.reduce((U,K)=>U.then(()=>V(K)),Promise.resolve()).then(()=>F.end()).catch(U=>{F.emit("error",U)}),F},t.writeToStream=(M,D,F)=>t.write(D,F).pipe(M),t.writeToBuffer=function(M){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=[],V=new _.Writable({write(U,K,se){F.push(U),se()}});return new Promise((U,K)=>{V.on("error",K).on("finish",()=>U(n.concat(F))),t.write(M,D).pipe(V)})},t.writeToString=(M,D)=>t.writeToBuffer(M,D).then(F=>F.toString()),t.writeToPath=(M,D,F)=>{let V=C.createWriteStream(M,{encoding:"utf8"});return t.write(D,F).pipe(V)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=n=>n.length===1},{}],153:[function(e,o,t){(function(n){(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;let i=e("string_decoder"),s=e("stream"),d=e("./transforms"),u=e("./parser");class f extends s.Transform{constructor(C){super({objectMode:C.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=C,this.parser=new u.Parser(C),this.headerTransformer=new d.HeaderTransformer(C),this.decoder=new i.StringDecoder(C.encoding),this.rowTransformerValidator=new d.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(C){return this.rowTransformerValidator.rowTransform=C,this}validate(C){return this.rowTransformerValidator.rowValidator=C,this}emit(C){if(C==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var x=arguments.length,y=new Array(x>1?x-1:0),w=1;w{let M=V=>V?x(V):P%100!=0?w(P+1):void n(()=>w(P+1));if(this.checkAndEmitHeaders(),P>=y||this.hasHitRowLimit)return x();if(this.parsedLineCount+=1,this.shouldSkipLine)return M();let D=C[P];this.rowCount+=1,this.parsedRowCount+=1;let F=this.rowCount;return this.transformRow(D,(V,U)=>{if(V)return this.rowCount-=1,M(V);if(!U)return M(new Error("expected transform result"));if(U.isValid){if(U.row)return this.pushRow(U.row,M)}else this.emit("data-invalid",U.row,F,U.reason);return M()})};w(0)}transformRow(C,x){try{this.headerTransformer.transform(C,(y,w)=>y?x(y):w?w.isValid?w.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(w.row,x):this.skipRow(x):(this.rowCount-=1,this.parsedRowCount-=1,x(null,{row:null,isValid:!0})):this.shouldEmitRows?x(null,{isValid:!1,row:C}):this.skipRow(x):x(new Error("Expected result from header transform")))}catch(y){x(y)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(C){return this.rowCount-=1,C(null,{row:null,isValid:!0})}pushRow(C,x){try{this.parserOptions.objectMode?this.push(C):this.push(JSON.stringify(C)),x()}catch(y){x(y)}}static wrapDoneCallback(C){let x=!1;return function(y){if(y){if(x)throw y;return x=!0,void C(y)}for(var w=arguments.length,P=new Array(w>1?w-1:0),M=1;M1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=(u=this.escape)!==null&&u!==void 0?u:this.quote,this.supportsComments=!s.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,o,t){"use strict";var n=Object.create?function(w,P,M,D){D===void 0&&(D=M),Object.defineProperty(w,D,{enumerable:!0,get:function(){return P[M]}})}:function(w,P,M,D){D===void 0&&(D=M),w[D]=P[M]},i=Object.create?function(w,P){Object.defineProperty(w,"default",{enumerable:!0,value:P})}:function(w,P){w.default=P},s=function(w){if(w&&w.__esModule)return w;var P={};if(w!=null)for(var M in w)M!=="default"&&Object.prototype.hasOwnProperty.call(w,M)&&n(P,w,M);return i(P,w),P},d=function(w,P){for(var M in w)M==="default"||Object.prototype.hasOwnProperty.call(P,M)||n(P,w,M)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;let u=s(e("fs")),f=e("stream"),_=e("./ParserOptions"),C=e("./CsvParserStream");d(e("./types"),t);var x=e("./CsvParserStream");Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return x.CsvParserStream}});var y=e("./ParserOptions");Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return y.ParserOptions}}),t.parse=w=>new C.CsvParserStream(new _.ParserOptions(w)),t.parseStream=(w,P)=>w.pipe(new C.CsvParserStream(new _.ParserOptions(P))),t.parseFile=function(w){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u.createReadStream(w).pipe(new C.CsvParserStream(new _.ParserOptions(P)))},t.parseString=(w,P)=>{let M=new f.Readable;return M.push(w),M.push(null),M.pipe(new C.CsvParserStream(new _.ParserOptions(P)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;let n=e("./Scanner"),i=e("./RowParser"),s=e("./Token");class d{constructor(f){this.parserOptions=f,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(f){return f&&f.charCodeAt(0)===65279?f.slice(1):f}parse(f,_){let C=new n.Scanner({line:d.removeBOM(f),parserOptions:this.parserOptions,hasMoreData:_});return this.parserOptions.supportsComments?this.parseWithComments(C):this.parseWithoutComments(C)}parseWithoutComments(f){let _=[],C=!0;for(;C;)C=this.parseRow(f,_);return{line:f.line,rows:_}}parseWithComments(f){let{parserOptions:_}=this,C=[];for(let x=f.nextCharacterToken;x!==null;x=f.nextCharacterToken)if(s.Token.isTokenComment(x,_)){if(f.advancePastLine()===null)return{line:f.lineFromCursor,rows:C};if(!f.hasMoreCharacters)return{line:f.lineFromCursor,rows:C};f.truncateToCursor()}else if(!this.parseRow(f,C))break;return{line:f.line,rows:C}}parseRow(f,_){if(!f.nextNonSpaceToken)return!1;let C=this.rowParser.parse(f);return C!==null&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(C)||_.push(C),!0)}}t.Parser=d},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;let n=e("./column"),i=e("./Token");t.RowParser=class{constructor(s){this.parserOptions=s,this.columnParser=new n.ColumnParser(s)}static isEmptyRow(s){return s.join("").replace(/\s+/g,"")===""}parse(s){let{parserOptions:d}=this,{hasMoreData:u}=s,f=s,_=[],C=this.getStartToken(f,_);for(;C;){if(i.Token.isTokenRowDelimiter(C))return f.advancePastToken(C),!f.hasMoreCharacters&&i.Token.isTokenCarriageReturn(C,d)&&u?null:(f.truncateToCursor(),_);if(!this.shouldSkipColumnParse(f,C,_)){let x=this.columnParser.parse(f);if(x===null)return null;_.push(x)}C=f.nextNonSpaceToken}return u?null:(f.truncateToCursor(),_)}getStartToken(s,d){let u=s.nextNonSpaceToken;return u!==null&&i.Token.isTokenDelimiter(u,this.parserOptions)?(d.push(""),s.nextNonSpaceToken):u}shouldSkipColumnParse(s,d,u){let{parserOptions:f}=this;if(i.Token.isTokenDelimiter(d,f)){s.advancePastToken(d);let _=s.nextCharacterToken;if(!s.hasMoreCharacters||_!==null&&i.Token.isTokenRowDelimiter(_)||_!==null&&i.Token.isTokenDelimiter(_,f))return u.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;let n=e("./Token"),i=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(s){this.cursor=0,this.line=s.line,this.lineLength=this.line.length,this.parserOptions=s.parserOptions,this.hasMoreData=s.hasMoreData,this.cursor=s.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:s}=this,d=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(d)===-1)return null;let u=d.exec(s);if(u==null)return null;let f=u[1],_=this.cursor+(u.index||0);return new n.Token({token:f,startCursor:_,endCursor:_+f.length-1})}get nextCharacterToken(){let{cursor:s,lineLength:d}=this;return d<=s?null:new n.Token({token:this.line[s],startCursor:s,endCursor:s})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let s=i.exec(this.lineFromCursor);return s?(this.cursor+=(s.index||0)+s[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(s){return this.cursor=s,this}advanceToToken(s){return this.cursor=s.startCursor,this}advancePastToken(s){return this.cursor=s.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0,t.Token=class{constructor(n){this.token=n.token,this.startCursor=n.startCursor,this.endCursor=n.endCursor}static isTokenRowDelimiter(n){let i=n.token;return i==="\r"||i===` `||i===`\r `}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(w=>x[w].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,w)=>x?C(x):C(null,y?{row:_,isValid:y,reason:w}:{row:_,isValid:!1,reason:w}))}}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,w)=>y?_(y):w&&!w.isValid?_(null,{row:x,isValid:!1,reason:w.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,w){let P={};this._baseState=P,P.name=w,P.enc=x,P.parent=y||null,P.children=null,P.tag=null,P.args=null,P.reverseArgs=null,P.choice=null,P.optional=!1,P.any=!1,P.obj=!1,P.use=null,P.useDecoder=null,P.key=null,P.default=null,P.explicit=null,P.implicit=null,P.contains=null,P.parent||(P.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(P){y[P]=x[P]});let w=new this.constructor(y.parent);return w._baseState=y,w},_.prototype._wrap=function(){let x=this._baseState;f.forEach(function(y){this[y]=function(){let w=new this.constructor(this);return x.children.push(w),w[y].apply(w,arguments)}},this)},_.prototype._init=function(x){let y=this._baseState;d(y.parent===null),x.call(this),y.children=y.children.filter(function(w){return w._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,w=x.filter(function(P){return P instanceof this.constructor},this);x=x.filter(function(P){return!(P instanceof this.constructor)},this),w.length!==0&&(d(y.children===null),y.children=w,w.forEach(function(P){P._baseState.parent=this},this)),x.length!==0&&(d(y.args===null),y.args=x,y.reverseArgs=x.map(function(P){if(typeof P!="object"||P.constructor!==Object)return P;let M={};return Object.keys(P).forEach(function(D){D==(0|D)&&(D|=0);let F=P[D];M[F]=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,w=Array.prototype.slice.call(arguments);return d(y.tag===null),y.tag=x,this._useArgs(w),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(w){return x[w]})),this},_.prototype.contains=function(x){let y=this._baseState;return d(y.use===null),y.contains=x,this},_.prototype._decode=function(x,y){let w=this._baseState;if(w.parent===null)return x.wrapResult(w.children[0]._decode(x,y));let P,M=w.default,D=!0,F=null;if(w.key!==null&&(F=x.enterKey(w.key)),w.optional){let V=null;if(w.explicit!==null?V=w.explicit:w.implicit!==null?V=w.implicit:w.tag!==null&&(V=w.tag),V!==null||w.any){if(D=this._peekTag(x,V,w.any),x.isError(D))return D}else{let U=x.save();try{w.choice===null?this._decodeGeneric(w.tag,x,y):this._decodeChoice(x,y),D=!0}catch{D=!1}x.restore(U)}}if(w.obj&&D&&(P=x.enterObject()),D){if(w.explicit!==null){let U=this._decodeTag(x,w.explicit);if(x.isError(U))return U;x=U}let V=x.offset;if(w.use===null&&w.choice===null){let U;w.any&&(U=x.save());let K=this._decodeTag(x,w.implicit!==null?w.implicit:w.tag,w.any);if(x.isError(K))return K;w.any?M=x.raw(U):x=K}if(y&&y.track&&w.tag!==null&&y.track(x.path(),V,x.length,"tagged"),y&&y.track&&w.tag!==null&&y.track(x.path(),x.offset,x.length,"content"),w.any||(M=w.choice===null?this._decodeGeneric(w.tag,x,y):this._decodeChoice(x,y)),x.isError(M))return M;if(w.any||w.choice!==null||w.children===null||w.children.forEach(function(U){U._decode(x,y)}),w.contains&&(w.tag==="octstr"||w.tag==="bitstr")){let U=new s(M);M=this._getUse(w.contains,x._reporterState.obj)._decode(U,y)}}return w.obj&&D&&(M=x.leaveObject(P)),w.key===null||M===null&&D!==!0?F!==null&&x.exitKey(F):x.leaveKey(F,w.key,M),M},_.prototype._decodeGeneric=function(x,y,w){let P=this._baseState;return x==="seq"||x==="set"?null:x==="seqof"||x==="setof"?this._decodeList(y,x,P.args[0],w):/str$/.test(x)?this._decodeStr(y,x,w):x==="objid"&&P.args?this._decodeObjid(y,P.args[0],P.args[1],w):x==="objid"?this._decodeObjid(y,null,null,w):x==="gentime"||x==="utctime"?this._decodeTime(y,x,w):x==="null_"?this._decodeNull(y,w):x==="bool"?this._decodeBool(y,w):x==="objDesc"?this._decodeStr(y,x,w):x==="int"||x==="enum"?this._decodeInt(y,P.args&&P.args[0],w):P.use!==null?this._getUse(P.use,y._reporterState.obj)._decode(y,w):y.error("unknown tag: "+x)},_.prototype._getUse=function(x,y){let w=this._baseState;return w.useDecoder=this._use(x,y),d(w.useDecoder._baseState.parent===null),w.useDecoder=w.useDecoder._baseState.children[0],w.implicit!==w.useDecoder._baseState.implicit&&(w.useDecoder=w.useDecoder.clone(),w.useDecoder._baseState.implicit=w.implicit),w.useDecoder},_.prototype._decodeChoice=function(x,y){let w=this._baseState,P=null,M=!1;return Object.keys(w.choice).some(function(D){let F=x.save(),V=w.choice[D];try{let U=V._decode(x,y);if(x.isError(U))return!1;P={type:D,value:U},M=!0}catch{return x.restore(F),!1}return!0},this),M?P:x.error("Choice not matched")},_.prototype._createEncoderBuffer=function(x){return new i(x,this.reporter)},_.prototype._encode=function(x,y,w){let P=this._baseState;if(P.default!==null&&P.default===x)return;let M=this._encodeValue(x,y,w);return M===void 0||this._skipDefault(M,y,w)?void 0:M},_.prototype._encodeValue=function(x,y,w){let P=this._baseState;if(P.parent===null)return P.children[0]._encode(x,y||new n);let M=null;if(this.reporter=y,P.optional&&x===void 0){if(P.default===null)return;x=P.default}let D=null,F=!1;if(P.any)M=this._createEncoderBuffer(x);else if(P.choice)M=this._encodeChoice(x,y);else if(P.contains)D=this._getUse(P.contains,w)._encode(x,y),F=!0;else if(P.children)D=P.children.map(function(V){if(V._baseState.tag==="null_")return V._encode(null,y,x);if(V._baseState.key===null)return y.error("Child should have a key");let U=y.enterKey(V._baseState.key);if(typeof x!="object")return y.error("Child expected, but input is not object");let K=V._encode(x[V._baseState.key],y,x);return y.leaveKey(U),K},this).filter(function(V){return V}),D=this._createEncoderBuffer(D);else if(P.tag==="seqof"||P.tag==="setof"){if(!P.args||P.args.length!==1)return y.error("Too many args for : "+P.tag);if(!Array.isArray(x))return y.error("seqof/setof, but data is not Array");let V=this.clone();V._baseState.implicit=null,D=this._createEncoderBuffer(x.map(function(U){let K=this._baseState;return this._getUse(K.args[0],x)._encode(U,y)},V))}else P.use!==null?M=this._getUse(P.use,w)._encode(x,y):(D=this._encodePrimitive(P.tag,x),F=!0);if(!P.any&&P.choice===null){let V=P.implicit!==null?P.implicit:P.tag,U=P.implicit===null?"universal":"context";V===null?P.use===null&&y.error("Tag could be omitted only for .use()"):P.use===null&&(M=this._encodeComposite(V,F,U,D))}return P.explicit!==null&&(M=this._encodeComposite(P.explicit,!1,"context",M)),M},_.prototype._encodeChoice=function(x,y){let w=this._baseState,P=w.choice[x.type];return P||d(!1,x.type+" not found in "+JSON.stringify(Object.keys(w.choice))),P._encode(x.value,y)},_.prototype._encodePrimitive=function(x,y){let w=this._baseState;if(/str$/.test(x))return this._encodeStr(y,x);if(x==="objid"&&w.args)return this._encodeObjid(y,w.reverseArgs[0],w.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,w.args&&w.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,w){let P=y.readUInt8(w);if(y.isError(P))return P;let M=u.tagClass[P>>6],D=(32&P)==0;if((31&P)==31){let F=P;for(P=0;(128&F)==128;){if(F=y.readUInt8(w),y.isError(F))return F;P<<=7,P|=127&F}}else P&=31;return{cls:M,primitive:D,tag:P,tagStr:u.tag[P]}}function x(y,w,P){let M=y.readUInt8(P);if(y.isError(M))return M;if(!w&&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 F=0;F=31?K.error("Multi-octet tag encoding unsupported"):(V||(se|=32),se|=d.tagClassByName[U||"universal"]<<6,se)})(C,x,y,this.reporter);if(w.length<128){let F=i.alloc(2);return F[0]=P,F[1]=w.length,this._createEncoderBuffer([F,w])}let M=1;for(let F=w.length;F>=256;F>>=8)M++;let D=i.alloc(2+M);D[0]=P,D[1]=128|M;for(let F=1+M,V=w.length;V>0;F--,V>>=8)D[F]=255&V;return this._createEncoderBuffer([D,w])},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 w=0;w=40)return this.reporter.error("Second objid identifier OOB");C.splice(0,2,40*C[0]+C[1])}let w=0;for(let D=0;D=128;F>>=7)w++}let P=i.alloc(w),M=P.length-1;for(let D=C.length-1;D>=0;D--){let F=C[D];for(P[M--]=127&F;(F>>=7)>0;)P[M--]=128|127&F}return this._createEncoderBuffer(P)},f.prototype._encodeTime=function(C,x){let y,w=new Date(C);return x==="gentime"?y=[_(w.getUTCFullYear()),_(w.getUTCMonth()+1),_(w.getUTCDate()),_(w.getUTCHours()),_(w.getUTCMinutes()),_(w.getUTCSeconds()),"Z"].join(""):x==="utctime"?y=[_(w.getUTCFullYear()%100),_(w.getUTCMonth()+1),_(w.getUTCDate()),_(w.getUTCHours()),_(w.getUTCMinutes()),_(w.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 P=C.toArray();!C.sign&&128&P[0]&&P.unshift(0),C=i.from(P)}if(i.isBuffer(C)){let P=C.length;C.length===0&&P++;let M=i.alloc(P);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 P=C;P>=256;P>>=8)y++;let w=new Array(y);for(let P=w.length-1;P>=0;P--)w[P]=255&C,C>>=8;return 128&w[0]&&w.unshift(0),this._createEncoderBuffer(i.from(w))},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 w=this._baseState,P;if(w.default===null)return!1;let M=C.join();if(w.defaultBuffer===void 0&&(w.defaultBuffer=this._encodeValue(w.default,x,y).join()),M.length!==w.defaultBuffer.length)return!1;for(P=0;P=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,oe=pe;oe1&&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"],w=[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],P=[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 oe=1;oe>>26,ye=67108863&$,Ne=Math.min(oe,W.length-1),te=Math.max(0,oe-j.length+1);te<=Ne;te++){var Oe=oe-te|0;be+=(N=(B=0|j.words[Oe])*(L=0|W.words[te])+ye)/67108864|0,ye=67108863&N}pe.words[oe]=0|ye,$=0|be}return $!==0?pe.words[oe]=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 $=w[j],oe=P[j];pe="";var be=this.clone();for(be.negative=0;!be.isZero();){var ye=be.modn(oe).toString(j);pe=(be=be.idivn(oe)).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),oe=this.clone();if(G){for(N=0;!oe.isZero();N++)L=oe.andln(255),oe.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],Oe=8191&te,J=te>>>13,Q=0|N[2],Ce=8191&Q,qe=Q>>>13,mt=0|N[3],Ye=8191&mt,rt=mt>>>13,Qt=0|N[4],Gt=8191&Qt,Qe=Qt>>>13,qt=0|N[5],Bt=8191&qt,Ut=qt>>>13,Kt=0|N[6],ei=8191&Kt,ni=Kt>>>13,Ei=0|N[7],ki=8191&Ei,Ni=Ei>>>13,un=0|N[8],ji=8191&un,Ji=un>>>13,no=0|N[9],Cn=8191&no,Zi=no>>>13,vn=0|G[0],zi=8191&vn,Li=vn>>>13,Xn=0|G[1],mn=8191&Xn,Tn=Xn>>>13,Nl=0|G[2],Pn=8191&Nl,En=Nl>>>13,Ra=0|G[3],Un=8191&Ra,Wn=Ra>>>13,ll=0|G[4],Fn=8191&ll,In=ll>>>13,ur=0|G[5],$n=8191&ur,On=ur>>>13,sl=0|G[6],Qn=8191&sl,Rt=sl>>>13,ui=0|G[7],_i=8191&ui,Fi=ui>>>13,Mo=0|G[8],Yi=8191&Mo,pn=Mo>>>13,jo=0|G[9],Mn=8191&jo,an=jo>>>13;pe.negative=j.negative^W.negative,pe.length=19;var qo=(oe+(O=Math.imul(ye,zi))|0)+((8191&(B=(B=Math.imul(ye,Li))+Math.imul(Ne,zi)|0))<<13)|0;oe=((L=Math.imul(Ne,Li))+(B>>>13)|0)+(qo>>>26)|0,qo&=67108863,O=Math.imul(Oe,zi),B=(B=Math.imul(Oe,Li))+Math.imul(J,zi)|0,L=Math.imul(J,Li);var mo=(oe+(O=O+Math.imul(ye,mn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Tn)|0)+Math.imul(Ne,mn)|0))<<13)|0;oe=((L=L+Math.imul(Ne,Tn)|0)+(B>>>13)|0)+(mo>>>26)|0,mo&=67108863,O=Math.imul(Ce,zi),B=(B=Math.imul(Ce,Li))+Math.imul(qe,zi)|0,L=Math.imul(qe,Li),O=O+Math.imul(Oe,mn)|0,B=(B=B+Math.imul(Oe,Tn)|0)+Math.imul(J,mn)|0,L=L+Math.imul(J,Tn)|0;var uo=(oe+(O=O+Math.imul(ye,Pn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,En)|0)+Math.imul(Ne,Pn)|0))<<13)|0;oe=((L=L+Math.imul(Ne,En)|0)+(B>>>13)|0)+(uo>>>26)|0,uo&=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,mn)|0,B=(B=B+Math.imul(Ce,Tn)|0)+Math.imul(qe,mn)|0,L=L+Math.imul(qe,Tn)|0,O=O+Math.imul(Oe,Pn)|0,B=(B=B+Math.imul(Oe,En)|0)+Math.imul(J,Pn)|0,L=L+Math.imul(J,En)|0;var Wo=(oe+(O=O+Math.imul(ye,Un)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Wn)|0)+Math.imul(Ne,Un)|0))<<13)|0;oe=((L=L+Math.imul(Ne,Wn)|0)+(B>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,O=Math.imul(Gt,zi),B=(B=Math.imul(Gt,Li))+Math.imul(Qe,zi)|0,L=Math.imul(Qe,Li),O=O+Math.imul(Ye,mn)|0,B=(B=B+Math.imul(Ye,Tn)|0)+Math.imul(rt,mn)|0,L=L+Math.imul(rt,Tn)|0,O=O+Math.imul(Ce,Pn)|0,B=(B=B+Math.imul(Ce,En)|0)+Math.imul(qe,Pn)|0,L=L+Math.imul(qe,En)|0,O=O+Math.imul(Oe,Un)|0,B=(B=B+Math.imul(Oe,Wn)|0)+Math.imul(J,Un)|0,L=L+Math.imul(J,Wn)|0;var Oa=(oe+(O=O+Math.imul(ye,Fn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,In)|0)+Math.imul(Ne,Fn)|0))<<13)|0;oe=((L=L+Math.imul(Ne,In)|0)+(B>>>13)|0)+(Oa>>>26)|0,Oa&=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(Gt,mn)|0,B=(B=B+Math.imul(Gt,Tn)|0)+Math.imul(Qe,mn)|0,L=L+Math.imul(Qe,Tn)|0,O=O+Math.imul(Ye,Pn)|0,B=(B=B+Math.imul(Ye,En)|0)+Math.imul(rt,Pn)|0,L=L+Math.imul(rt,En)|0,O=O+Math.imul(Ce,Un)|0,B=(B=B+Math.imul(Ce,Wn)|0)+Math.imul(qe,Un)|0,L=L+Math.imul(qe,Wn)|0,O=O+Math.imul(Oe,Fn)|0,B=(B=B+Math.imul(Oe,In)|0)+Math.imul(J,Fn)|0,L=L+Math.imul(J,In)|0;var Za=(oe+(O=O+Math.imul(ye,$n)|0)|0)+((8191&(B=(B=B+Math.imul(ye,On)|0)+Math.imul(Ne,$n)|0))<<13)|0;oe=((L=L+Math.imul(Ne,On)|0)+(B>>>13)|0)+(Za>>>26)|0,Za&=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,mn)|0,B=(B=B+Math.imul(Bt,Tn)|0)+Math.imul(Ut,mn)|0,L=L+Math.imul(Ut,Tn)|0,O=O+Math.imul(Gt,Pn)|0,B=(B=B+Math.imul(Gt,En)|0)+Math.imul(Qe,Pn)|0,L=L+Math.imul(Qe,En)|0,O=O+Math.imul(Ye,Un)|0,B=(B=B+Math.imul(Ye,Wn)|0)+Math.imul(rt,Un)|0,L=L+Math.imul(rt,Wn)|0,O=O+Math.imul(Ce,Fn)|0,B=(B=B+Math.imul(Ce,In)|0)+Math.imul(qe,Fn)|0,L=L+Math.imul(qe,In)|0,O=O+Math.imul(Oe,$n)|0,B=(B=B+Math.imul(Oe,On)|0)+Math.imul(J,$n)|0,L=L+Math.imul(J,On)|0;var fr=(oe+(O=O+Math.imul(ye,Qn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Rt)|0)+Math.imul(Ne,Qn)|0))<<13)|0;oe=((L=L+Math.imul(Ne,Rt)|0)+(B>>>13)|0)+(fr>>>26)|0,fr&=67108863,O=Math.imul(ki,zi),B=(B=Math.imul(ki,Li))+Math.imul(Ni,zi)|0,L=Math.imul(Ni,Li),O=O+Math.imul(ei,mn)|0,B=(B=B+Math.imul(ei,Tn)|0)+Math.imul(ni,mn)|0,L=L+Math.imul(ni,Tn)|0,O=O+Math.imul(Bt,Pn)|0,B=(B=B+Math.imul(Bt,En)|0)+Math.imul(Ut,Pn)|0,L=L+Math.imul(Ut,En)|0,O=O+Math.imul(Gt,Un)|0,B=(B=B+Math.imul(Gt,Wn)|0)+Math.imul(Qe,Un)|0,L=L+Math.imul(Qe,Wn)|0,O=O+Math.imul(Ye,Fn)|0,B=(B=B+Math.imul(Ye,In)|0)+Math.imul(rt,Fn)|0,L=L+Math.imul(rt,In)|0,O=O+Math.imul(Ce,$n)|0,B=(B=B+Math.imul(Ce,On)|0)+Math.imul(qe,$n)|0,L=L+Math.imul(qe,On)|0,O=O+Math.imul(Oe,Qn)|0,B=(B=B+Math.imul(Oe,Rt)|0)+Math.imul(J,Qn)|0,L=L+Math.imul(J,Rt)|0;var Qa=(oe+(O=O+Math.imul(ye,_i)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Fi)|0)+Math.imul(Ne,_i)|0))<<13)|0;oe=((L=L+Math.imul(Ne,Fi)|0)+(B>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,O=Math.imul(ji,zi),B=(B=Math.imul(ji,Li))+Math.imul(Ji,zi)|0,L=Math.imul(Ji,Li),O=O+Math.imul(ki,mn)|0,B=(B=B+Math.imul(ki,Tn)|0)+Math.imul(Ni,mn)|0,L=L+Math.imul(Ni,Tn)|0,O=O+Math.imul(ei,Pn)|0,B=(B=B+Math.imul(ei,En)|0)+Math.imul(ni,Pn)|0,L=L+Math.imul(ni,En)|0,O=O+Math.imul(Bt,Un)|0,B=(B=B+Math.imul(Bt,Wn)|0)+Math.imul(Ut,Un)|0,L=L+Math.imul(Ut,Wn)|0,O=O+Math.imul(Gt,Fn)|0,B=(B=B+Math.imul(Gt,In)|0)+Math.imul(Qe,Fn)|0,L=L+Math.imul(Qe,In)|0,O=O+Math.imul(Ye,$n)|0,B=(B=B+Math.imul(Ye,On)|0)+Math.imul(rt,$n)|0,L=L+Math.imul(rt,On)|0,O=O+Math.imul(Ce,Qn)|0,B=(B=B+Math.imul(Ce,Rt)|0)+Math.imul(qe,Qn)|0,L=L+Math.imul(qe,Rt)|0,O=O+Math.imul(Oe,_i)|0,B=(B=B+Math.imul(Oe,Fi)|0)+Math.imul(J,_i)|0,L=L+Math.imul(J,Fi)|0;var er=(oe+(O=O+Math.imul(ye,Yi)|0)|0)+((8191&(B=(B=B+Math.imul(ye,pn)|0)+Math.imul(Ne,Yi)|0))<<13)|0;oe=((L=L+Math.imul(Ne,pn)|0)+(B>>>13)|0)+(er>>>26)|0,er&=67108863,O=Math.imul(Cn,zi),B=(B=Math.imul(Cn,Li))+Math.imul(Zi,zi)|0,L=Math.imul(Zi,Li),O=O+Math.imul(ji,mn)|0,B=(B=B+Math.imul(ji,Tn)|0)+Math.imul(Ji,mn)|0,L=L+Math.imul(Ji,Tn)|0,O=O+Math.imul(ki,Pn)|0,B=(B=B+Math.imul(ki,En)|0)+Math.imul(Ni,Pn)|0,L=L+Math.imul(Ni,En)|0,O=O+Math.imul(ei,Un)|0,B=(B=B+Math.imul(ei,Wn)|0)+Math.imul(ni,Un)|0,L=L+Math.imul(ni,Wn)|0,O=O+Math.imul(Bt,Fn)|0,B=(B=B+Math.imul(Bt,In)|0)+Math.imul(Ut,Fn)|0,L=L+Math.imul(Ut,In)|0,O=O+Math.imul(Gt,$n)|0,B=(B=B+Math.imul(Gt,On)|0)+Math.imul(Qe,$n)|0,L=L+Math.imul(Qe,On)|0,O=O+Math.imul(Ye,Qn)|0,B=(B=B+Math.imul(Ye,Rt)|0)+Math.imul(rt,Qn)|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(qe,_i)|0,L=L+Math.imul(qe,Fi)|0,O=O+Math.imul(Oe,Yi)|0,B=(B=B+Math.imul(Oe,pn)|0)+Math.imul(J,Yi)|0,L=L+Math.imul(J,pn)|0;var ht=(oe+(O=O+Math.imul(ye,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(ye,an)|0)+Math.imul(Ne,Mn)|0))<<13)|0;oe=((L=L+Math.imul(Ne,an)|0)+(B>>>13)|0)+(ht>>>26)|0,ht&=67108863,O=Math.imul(Cn,mn),B=(B=Math.imul(Cn,Tn))+Math.imul(Zi,mn)|0,L=Math.imul(Zi,Tn),O=O+Math.imul(ji,Pn)|0,B=(B=B+Math.imul(ji,En)|0)+Math.imul(Ji,Pn)|0,L=L+Math.imul(Ji,En)|0,O=O+Math.imul(ki,Un)|0,B=(B=B+Math.imul(ki,Wn)|0)+Math.imul(Ni,Un)|0,L=L+Math.imul(Ni,Wn)|0,O=O+Math.imul(ei,Fn)|0,B=(B=B+Math.imul(ei,In)|0)+Math.imul(ni,Fn)|0,L=L+Math.imul(ni,In)|0,O=O+Math.imul(Bt,$n)|0,B=(B=B+Math.imul(Bt,On)|0)+Math.imul(Ut,$n)|0,L=L+Math.imul(Ut,On)|0,O=O+Math.imul(Gt,Qn)|0,B=(B=B+Math.imul(Gt,Rt)|0)+Math.imul(Qe,Qn)|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,pn)|0)+Math.imul(qe,Yi)|0,L=L+Math.imul(qe,pn)|0;var oi=(oe+(O=O+Math.imul(Oe,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(Oe,an)|0)+Math.imul(J,Mn)|0))<<13)|0;oe=((L=L+Math.imul(J,an)|0)+(B>>>13)|0)+(oi>>>26)|0,oi&=67108863,O=Math.imul(Cn,Pn),B=(B=Math.imul(Cn,En))+Math.imul(Zi,Pn)|0,L=Math.imul(Zi,En),O=O+Math.imul(ji,Un)|0,B=(B=B+Math.imul(ji,Wn)|0)+Math.imul(Ji,Un)|0,L=L+Math.imul(Ji,Wn)|0,O=O+Math.imul(ki,Fn)|0,B=(B=B+Math.imul(ki,In)|0)+Math.imul(Ni,Fn)|0,L=L+Math.imul(Ni,In)|0,O=O+Math.imul(ei,$n)|0,B=(B=B+Math.imul(ei,On)|0)+Math.imul(ni,$n)|0,L=L+Math.imul(ni,On)|0,O=O+Math.imul(Bt,Qn)|0,B=(B=B+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Qn)|0,L=L+Math.imul(Ut,Rt)|0,O=O+Math.imul(Gt,_i)|0,B=(B=B+Math.imul(Gt,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,pn)|0)+Math.imul(rt,Yi)|0,L=L+Math.imul(rt,pn)|0;var Mi=(oe+(O=O+Math.imul(Ce,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(Ce,an)|0)+Math.imul(qe,Mn)|0))<<13)|0;oe=((L=L+Math.imul(qe,an)|0)+(B>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,O=Math.imul(Cn,Un),B=(B=Math.imul(Cn,Wn))+Math.imul(Zi,Un)|0,L=Math.imul(Zi,Wn),O=O+Math.imul(ji,Fn)|0,B=(B=B+Math.imul(ji,In)|0)+Math.imul(Ji,Fn)|0,L=L+Math.imul(Ji,In)|0,O=O+Math.imul(ki,$n)|0,B=(B=B+Math.imul(ki,On)|0)+Math.imul(Ni,$n)|0,L=L+Math.imul(Ni,On)|0,O=O+Math.imul(ei,Qn)|0,B=(B=B+Math.imul(ei,Rt)|0)+Math.imul(ni,Qn)|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(Gt,Yi)|0,B=(B=B+Math.imul(Gt,pn)|0)+Math.imul(Qe,Yi)|0,L=L+Math.imul(Qe,pn)|0;var bi=(oe+(O=O+Math.imul(Ye,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(Ye,an)|0)+Math.imul(rt,Mn)|0))<<13)|0;oe=((L=L+Math.imul(rt,an)|0)+(B>>>13)|0)+(bi>>>26)|0,bi&=67108863,O=Math.imul(Cn,Fn),B=(B=Math.imul(Cn,In))+Math.imul(Zi,Fn)|0,L=Math.imul(Zi,In),O=O+Math.imul(ji,$n)|0,B=(B=B+Math.imul(ji,On)|0)+Math.imul(Ji,$n)|0,L=L+Math.imul(Ji,On)|0,O=O+Math.imul(ki,Qn)|0,B=(B=B+Math.imul(ki,Rt)|0)+Math.imul(Ni,Qn)|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,pn)|0)+Math.imul(Ut,Yi)|0,L=L+Math.imul(Ut,pn)|0;var Vi=(oe+(O=O+Math.imul(Gt,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(Gt,an)|0)+Math.imul(Qe,Mn)|0))<<13)|0;oe=((L=L+Math.imul(Qe,an)|0)+(B>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,O=Math.imul(Cn,$n),B=(B=Math.imul(Cn,On))+Math.imul(Zi,$n)|0,L=Math.imul(Zi,On),O=O+Math.imul(ji,Qn)|0,B=(B=B+Math.imul(ji,Rt)|0)+Math.imul(Ji,Qn)|0,L=L+Math.imul(Ji,Rt)|0,O=O+Math.imul(ki,_i)|0,B=(B=B+Math.imul(ki,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,pn)|0)+Math.imul(ni,Yi)|0,L=L+Math.imul(ni,pn)|0;var fn=(oe+(O=O+Math.imul(Bt,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(Bt,an)|0)+Math.imul(Ut,Mn)|0))<<13)|0;oe=((L=L+Math.imul(Ut,an)|0)+(B>>>13)|0)+(fn>>>26)|0,fn&=67108863,O=Math.imul(Cn,Qn),B=(B=Math.imul(Cn,Rt))+Math.imul(Zi,Qn)|0,L=Math.imul(Zi,Rt),O=O+Math.imul(ji,_i)|0,B=(B=B+Math.imul(ji,Fi)|0)+Math.imul(Ji,_i)|0,L=L+Math.imul(Ji,Fi)|0,O=O+Math.imul(ki,Yi)|0,B=(B=B+Math.imul(ki,pn)|0)+Math.imul(Ni,Yi)|0,L=L+Math.imul(Ni,pn)|0;var _n=(oe+(O=O+Math.imul(ei,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(ei,an)|0)+Math.imul(ni,Mn)|0))<<13)|0;oe=((L=L+Math.imul(ni,an)|0)+(B>>>13)|0)+(_n>>>26)|0,_n&=67108863,O=Math.imul(Cn,_i),B=(B=Math.imul(Cn,Fi))+Math.imul(Zi,_i)|0,L=Math.imul(Zi,Fi),O=O+Math.imul(ji,Yi)|0,B=(B=B+Math.imul(ji,pn)|0)+Math.imul(Ji,Yi)|0,L=L+Math.imul(Ji,pn)|0;var _o=(oe+(O=O+Math.imul(ki,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(ki,an)|0)+Math.imul(Ni,Mn)|0))<<13)|0;oe=((L=L+Math.imul(Ni,an)|0)+(B>>>13)|0)+(_o>>>26)|0,_o&=67108863,O=Math.imul(Cn,Yi),B=(B=Math.imul(Cn,pn))+Math.imul(Zi,Yi)|0,L=Math.imul(Zi,pn);var Yn=(oe+(O=O+Math.imul(ji,Mn)|0)|0)+((8191&(B=(B=B+Math.imul(ji,an)|0)+Math.imul(Ji,Mn)|0))<<13)|0;oe=((L=L+Math.imul(Ji,an)|0)+(B>>>13)|0)+(Yn>>>26)|0,Yn&=67108863;var Ln=(oe+(O=Math.imul(Cn,Mn))|0)+((8191&(B=(B=Math.imul(Cn,an))+Math.imul(Zi,Mn)|0))<<13)|0;return oe=((L=Math.imul(Zi,an))+(B>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,$[0]=qo,$[1]=mo,$[2]=uo,$[3]=Wo,$[4]=Oa,$[5]=Za,$[6]=fr,$[7]=Qa,$[8]=er,$[9]=ht,$[10]=oi,$[11]=Mi,$[12]=bi,$[13]=Vi,$[14]=fn,$[15]=_n,$[16]=_o,$[17]=Yn,$[18]=Ln,oe!==0&&($[19]=oe,pe.length++),pe};function F(j,W,pe){return new V().mulp(j,W,pe)}function V(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,oe&=67108863}L.words[$]=be,N=oe,oe=G}return N!==0?L.words[$]=N:L.length--,L.strip()})(this,j,W):F(this,j,W)},V.prototype.makeRBT=function(j){for(var W=new Array(j),pe=u.prototype._countBits(j)-1,O=0;O>=1;return O},V.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>>oe}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&&(oe!==0||$>=O);$--){var be=0|this.words[$];this.words[$]=oe<<26-B|be>>>B,oe=be&N}return G&&oe!==0&&(G.words[G.length++]=oe),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(),oe=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(oe)),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(oe)),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 oe=0,be=1;(pe.words[0]&be)==0&&oe<26;++oe,be<<=1);if(oe>0)for(pe.iushrn(oe);oe-- >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 K(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 se(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function ee(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function re(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function ce(){K.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 ue(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)}K.prototype._tmp=function(){var j=new u(null);return j.words=new Array(Math.ceil(this.n/13)),j},K.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},K.prototype.split=function(j,W){j.iushrn(this.n,0,W)},K.prototype.imulK=function(j){return j.imul(this.k)},d(se,K),se.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},se.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 se;else if(j==="p224")W=new ee;else if(j==="p192")W=new re;else{if(j!=="p25519")throw new Error("Unknown prime "+j);W=new ce}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 oe=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,Oe=0;te.cmp(L)!==0;Oe++)te=te.redSqr();s(Oe=0;O--){for(var $=W.words[O],oe=G-1;oe>=0;oe--){var be=$>>oe&1;B!==pe[0]&&(B=this.sqr(B)),be!==0||L!==0?(L<<=1,L|=be,(++N===4||O===0&&oe===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 ue(j)},d(ue,_e),ue.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},ue.prototype.convertFrom=function(j){var W=this.imod(j.mul(this.rinv));return W.red=null,W},ue.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)},ue.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)},ue.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),w=y[0],P=y[1];return 3*(w+P)/4-P},t.toByteArray=function(x){var y,w,P=_(x),M=P[0],D=P[1],F=new s((function(K,se,ee){return 3*(se+ee)/4-ee})(0,M,D)),V=0,U=D>0?M-4:M;for(w=0;w>16&255,F[V++]=y>>8&255,F[V++]=255&y;return D===2&&(y=i[x.charCodeAt(w)]<<2|i[x.charCodeAt(w+1)]>>4,F[V++]=255&y),D===1&&(y=i[x.charCodeAt(w)]<<10|i[x.charCodeAt(w+1)]<<4|i[x.charCodeAt(w+2)]>>2,F[V++]=y>>8&255,F[V++]=255&y),F},t.fromByteArray=function(x){for(var y,w=x.length,P=w%3,M=[],D=0,F=w-P;DF?F:D+16383));return P===1?(y=x[w-1],M.push(n[y>>2]+n[y<<4&63]+"==")):P===2&&(y=(x[w-2]<<8)+x[w-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 w=x.indexOf("=");return w===-1&&(w=y),[w,w===y?0:4-w%4]}function C(x,y,w){for(var P,M,D=[],F=y;F>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,oe=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-oe&67108863,(oe+=24)>=26&&(oe-=26,G++);else if(L==="le")for(N=0,G=0;N>>26-oe&67108863,(oe+=24)>=26&&(oe-=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[oe]|=67108863&G,$>=18?($-=18,oe+=1,this.words[oe]|=G>>>26):$+=8;else for(N=(O.length-B)%2==0?B+1:B;N=18?($-=18,oe+=1,this.words[oe]|=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,oe=$%N,be=Math.min($,$-oe)+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")]=w}catch{u.prototype.inspect=w}else u.prototype.inspect=w;function w(){return(this.red?""}var P=["","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?P[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 Oe=te.modrn(Ne).toString(O);L=(te=te.idivn(Ne)).isZero()?Oe+L:P[ye-Oe.length]+Oe+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 F(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],oe=G*$,be=67108863&oe,ye=oe/67108864|0;L.words[0]=be;for(var Ne=1;Ne>>26,Oe=67108863&ye,J=Math.min(Ne,B.length-1),Q=Math.max(0,Ne-O.length+1);Q<=J;Q++){var Ce=Ne-Q|0;te+=(oe=(G=0|O.words[Ce])*($=0|B.words[Q])+Oe)/67108864|0,Oe=67108863&oe}L.words[Ne]=0|Oe,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(oe,be){return oe.allocUnsafe?oe.allocUnsafe(be):new oe(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=oe>>>24,$+=2)}if(L=0&&(O[L--]=oe>>8&255),L>=0&&(O[L--]=oe>>16&255),$===6?(L>=0&&(O[L--]=oe>>24&255),N=0,$=0):(N=oe>>>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,oe=0;oe>26,this.words[oe]=67108863&B;for(;$!==0&&oe>26,this.words[oe]=67108863&B;if($===0&&oe>>13,Q=0|oe[1],Ce=8191&Q,qe=Q>>>13,mt=0|oe[2],Ye=8191&mt,rt=mt>>>13,Qt=0|oe[3],Gt=8191&Qt,Qe=Qt>>>13,qt=0|oe[4],Bt=8191&qt,Ut=qt>>>13,Kt=0|oe[5],ei=8191&Kt,ni=Kt>>>13,Ei=0|oe[6],ki=8191&Ei,Ni=Ei>>>13,un=0|oe[7],ji=8191&un,Ji=un>>>13,no=0|oe[8],Cn=8191&no,Zi=no>>>13,vn=0|oe[9],zi=8191&vn,Li=vn>>>13,Xn=0|be[0],mn=8191&Xn,Tn=Xn>>>13,Nl=0|be[1],Pn=8191&Nl,En=Nl>>>13,Ra=0|be[2],Un=8191&Ra,Wn=Ra>>>13,ll=0|be[3],Fn=8191&ll,In=ll>>>13,ur=0|be[4],$n=8191&ur,On=ur>>>13,sl=0|be[5],Qn=8191&sl,Rt=sl>>>13,ui=0|be[6],_i=8191&ui,Fi=ui>>>13,Mo=0|be[7],Yi=8191&Mo,pn=Mo>>>13,jo=0|be[8],Mn=8191&jo,an=jo>>>13,qo=0|be[9],mo=8191&qo,uo=qo>>>13;L.negative=O.negative^B.negative,L.length=19;var Wo=(Ne+(N=Math.imul(Oe,mn))|0)+((8191&(G=(G=Math.imul(Oe,Tn))+Math.imul(J,mn)|0))<<13)|0;Ne=(($=Math.imul(J,Tn))+(G>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,N=Math.imul(Ce,mn),G=(G=Math.imul(Ce,Tn))+Math.imul(qe,mn)|0,$=Math.imul(qe,Tn);var Oa=(Ne+(N=N+Math.imul(Oe,Pn)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,En)|0)+Math.imul(J,Pn)|0))<<13)|0;Ne=(($=$+Math.imul(J,En)|0)+(G>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,N=Math.imul(Ye,mn),G=(G=Math.imul(Ye,Tn))+Math.imul(rt,mn)|0,$=Math.imul(rt,Tn),N=N+Math.imul(Ce,Pn)|0,G=(G=G+Math.imul(Ce,En)|0)+Math.imul(qe,Pn)|0,$=$+Math.imul(qe,En)|0;var Za=(Ne+(N=N+Math.imul(Oe,Un)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,Wn)|0)+Math.imul(J,Un)|0))<<13)|0;Ne=(($=$+Math.imul(J,Wn)|0)+(G>>>13)|0)+(Za>>>26)|0,Za&=67108863,N=Math.imul(Gt,mn),G=(G=Math.imul(Gt,Tn))+Math.imul(Qe,mn)|0,$=Math.imul(Qe,Tn),N=N+Math.imul(Ye,Pn)|0,G=(G=G+Math.imul(Ye,En)|0)+Math.imul(rt,Pn)|0,$=$+Math.imul(rt,En)|0,N=N+Math.imul(Ce,Un)|0,G=(G=G+Math.imul(Ce,Wn)|0)+Math.imul(qe,Un)|0,$=$+Math.imul(qe,Wn)|0;var fr=(Ne+(N=N+Math.imul(Oe,Fn)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,In)|0)+Math.imul(J,Fn)|0))<<13)|0;Ne=(($=$+Math.imul(J,In)|0)+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,N=Math.imul(Bt,mn),G=(G=Math.imul(Bt,Tn))+Math.imul(Ut,mn)|0,$=Math.imul(Ut,Tn),N=N+Math.imul(Gt,Pn)|0,G=(G=G+Math.imul(Gt,En)|0)+Math.imul(Qe,Pn)|0,$=$+Math.imul(Qe,En)|0,N=N+Math.imul(Ye,Un)|0,G=(G=G+Math.imul(Ye,Wn)|0)+Math.imul(rt,Un)|0,$=$+Math.imul(rt,Wn)|0,N=N+Math.imul(Ce,Fn)|0,G=(G=G+Math.imul(Ce,In)|0)+Math.imul(qe,Fn)|0,$=$+Math.imul(qe,In)|0;var Qa=(Ne+(N=N+Math.imul(Oe,$n)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,On)|0)+Math.imul(J,$n)|0))<<13)|0;Ne=(($=$+Math.imul(J,On)|0)+(G>>>13)|0)+(Qa>>>26)|0,Qa&=67108863,N=Math.imul(ei,mn),G=(G=Math.imul(ei,Tn))+Math.imul(ni,mn)|0,$=Math.imul(ni,Tn),N=N+Math.imul(Bt,Pn)|0,G=(G=G+Math.imul(Bt,En)|0)+Math.imul(Ut,Pn)|0,$=$+Math.imul(Ut,En)|0,N=N+Math.imul(Gt,Un)|0,G=(G=G+Math.imul(Gt,Wn)|0)+Math.imul(Qe,Un)|0,$=$+Math.imul(Qe,Wn)|0,N=N+Math.imul(Ye,Fn)|0,G=(G=G+Math.imul(Ye,In)|0)+Math.imul(rt,Fn)|0,$=$+Math.imul(rt,In)|0,N=N+Math.imul(Ce,$n)|0,G=(G=G+Math.imul(Ce,On)|0)+Math.imul(qe,$n)|0,$=$+Math.imul(qe,On)|0;var er=(Ne+(N=N+Math.imul(Oe,Qn)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,Rt)|0)+Math.imul(J,Qn)|0))<<13)|0;Ne=(($=$+Math.imul(J,Rt)|0)+(G>>>13)|0)+(er>>>26)|0,er&=67108863,N=Math.imul(ki,mn),G=(G=Math.imul(ki,Tn))+Math.imul(Ni,mn)|0,$=Math.imul(Ni,Tn),N=N+Math.imul(ei,Pn)|0,G=(G=G+Math.imul(ei,En)|0)+Math.imul(ni,Pn)|0,$=$+Math.imul(ni,En)|0,N=N+Math.imul(Bt,Un)|0,G=(G=G+Math.imul(Bt,Wn)|0)+Math.imul(Ut,Un)|0,$=$+Math.imul(Ut,Wn)|0,N=N+Math.imul(Gt,Fn)|0,G=(G=G+Math.imul(Gt,In)|0)+Math.imul(Qe,Fn)|0,$=$+Math.imul(Qe,In)|0,N=N+Math.imul(Ye,$n)|0,G=(G=G+Math.imul(Ye,On)|0)+Math.imul(rt,$n)|0,$=$+Math.imul(rt,On)|0,N=N+Math.imul(Ce,Qn)|0,G=(G=G+Math.imul(Ce,Rt)|0)+Math.imul(qe,Qn)|0,$=$+Math.imul(qe,Rt)|0;var ht=(Ne+(N=N+Math.imul(Oe,_i)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,Fi)|0)+Math.imul(J,_i)|0))<<13)|0;Ne=(($=$+Math.imul(J,Fi)|0)+(G>>>13)|0)+(ht>>>26)|0,ht&=67108863,N=Math.imul(ji,mn),G=(G=Math.imul(ji,Tn))+Math.imul(Ji,mn)|0,$=Math.imul(Ji,Tn),N=N+Math.imul(ki,Pn)|0,G=(G=G+Math.imul(ki,En)|0)+Math.imul(Ni,Pn)|0,$=$+Math.imul(Ni,En)|0,N=N+Math.imul(ei,Un)|0,G=(G=G+Math.imul(ei,Wn)|0)+Math.imul(ni,Un)|0,$=$+Math.imul(ni,Wn)|0,N=N+Math.imul(Bt,Fn)|0,G=(G=G+Math.imul(Bt,In)|0)+Math.imul(Ut,Fn)|0,$=$+Math.imul(Ut,In)|0,N=N+Math.imul(Gt,$n)|0,G=(G=G+Math.imul(Gt,On)|0)+Math.imul(Qe,$n)|0,$=$+Math.imul(Qe,On)|0,N=N+Math.imul(Ye,Qn)|0,G=(G=G+Math.imul(Ye,Rt)|0)+Math.imul(rt,Qn)|0,$=$+Math.imul(rt,Rt)|0,N=N+Math.imul(Ce,_i)|0,G=(G=G+Math.imul(Ce,Fi)|0)+Math.imul(qe,_i)|0,$=$+Math.imul(qe,Fi)|0;var oi=(Ne+(N=N+Math.imul(Oe,Yi)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,pn)|0)+Math.imul(J,Yi)|0))<<13)|0;Ne=(($=$+Math.imul(J,pn)|0)+(G>>>13)|0)+(oi>>>26)|0,oi&=67108863,N=Math.imul(Cn,mn),G=(G=Math.imul(Cn,Tn))+Math.imul(Zi,mn)|0,$=Math.imul(Zi,Tn),N=N+Math.imul(ji,Pn)|0,G=(G=G+Math.imul(ji,En)|0)+Math.imul(Ji,Pn)|0,$=$+Math.imul(Ji,En)|0,N=N+Math.imul(ki,Un)|0,G=(G=G+Math.imul(ki,Wn)|0)+Math.imul(Ni,Un)|0,$=$+Math.imul(Ni,Wn)|0,N=N+Math.imul(ei,Fn)|0,G=(G=G+Math.imul(ei,In)|0)+Math.imul(ni,Fn)|0,$=$+Math.imul(ni,In)|0,N=N+Math.imul(Bt,$n)|0,G=(G=G+Math.imul(Bt,On)|0)+Math.imul(Ut,$n)|0,$=$+Math.imul(Ut,On)|0,N=N+Math.imul(Gt,Qn)|0,G=(G=G+Math.imul(Gt,Rt)|0)+Math.imul(Qe,Qn)|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,pn)|0)+Math.imul(qe,Yi)|0,$=$+Math.imul(qe,pn)|0;var Mi=(Ne+(N=N+Math.imul(Oe,Mn)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,an)|0)+Math.imul(J,Mn)|0))<<13)|0;Ne=(($=$+Math.imul(J,an)|0)+(G>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,N=Math.imul(zi,mn),G=(G=Math.imul(zi,Tn))+Math.imul(Li,mn)|0,$=Math.imul(Li,Tn),N=N+Math.imul(Cn,Pn)|0,G=(G=G+Math.imul(Cn,En)|0)+Math.imul(Zi,Pn)|0,$=$+Math.imul(Zi,En)|0,N=N+Math.imul(ji,Un)|0,G=(G=G+Math.imul(ji,Wn)|0)+Math.imul(Ji,Un)|0,$=$+Math.imul(Ji,Wn)|0,N=N+Math.imul(ki,Fn)|0,G=(G=G+Math.imul(ki,In)|0)+Math.imul(Ni,Fn)|0,$=$+Math.imul(Ni,In)|0,N=N+Math.imul(ei,$n)|0,G=(G=G+Math.imul(ei,On)|0)+Math.imul(ni,$n)|0,$=$+Math.imul(ni,On)|0,N=N+Math.imul(Bt,Qn)|0,G=(G=G+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Qn)|0,$=$+Math.imul(Ut,Rt)|0,N=N+Math.imul(Gt,_i)|0,G=(G=G+Math.imul(Gt,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,pn)|0)+Math.imul(rt,Yi)|0,$=$+Math.imul(rt,pn)|0,N=N+Math.imul(Ce,Mn)|0,G=(G=G+Math.imul(Ce,an)|0)+Math.imul(qe,Mn)|0,$=$+Math.imul(qe,an)|0;var bi=(Ne+(N=N+Math.imul(Oe,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Oe,uo)|0)+Math.imul(J,mo)|0))<<13)|0;Ne=(($=$+Math.imul(J,uo)|0)+(G>>>13)|0)+(bi>>>26)|0,bi&=67108863,N=Math.imul(zi,Pn),G=(G=Math.imul(zi,En))+Math.imul(Li,Pn)|0,$=Math.imul(Li,En),N=N+Math.imul(Cn,Un)|0,G=(G=G+Math.imul(Cn,Wn)|0)+Math.imul(Zi,Un)|0,$=$+Math.imul(Zi,Wn)|0,N=N+Math.imul(ji,Fn)|0,G=(G=G+Math.imul(ji,In)|0)+Math.imul(Ji,Fn)|0,$=$+Math.imul(Ji,In)|0,N=N+Math.imul(ki,$n)|0,G=(G=G+Math.imul(ki,On)|0)+Math.imul(Ni,$n)|0,$=$+Math.imul(Ni,On)|0,N=N+Math.imul(ei,Qn)|0,G=(G=G+Math.imul(ei,Rt)|0)+Math.imul(ni,Qn)|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(Gt,Yi)|0,G=(G=G+Math.imul(Gt,pn)|0)+Math.imul(Qe,Yi)|0,$=$+Math.imul(Qe,pn)|0,N=N+Math.imul(Ye,Mn)|0,G=(G=G+Math.imul(Ye,an)|0)+Math.imul(rt,Mn)|0,$=$+Math.imul(rt,an)|0;var Vi=(Ne+(N=N+Math.imul(Ce,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Ce,uo)|0)+Math.imul(qe,mo)|0))<<13)|0;Ne=(($=$+Math.imul(qe,uo)|0)+(G>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,N=Math.imul(zi,Un),G=(G=Math.imul(zi,Wn))+Math.imul(Li,Un)|0,$=Math.imul(Li,Wn),N=N+Math.imul(Cn,Fn)|0,G=(G=G+Math.imul(Cn,In)|0)+Math.imul(Zi,Fn)|0,$=$+Math.imul(Zi,In)|0,N=N+Math.imul(ji,$n)|0,G=(G=G+Math.imul(ji,On)|0)+Math.imul(Ji,$n)|0,$=$+Math.imul(Ji,On)|0,N=N+Math.imul(ki,Qn)|0,G=(G=G+Math.imul(ki,Rt)|0)+Math.imul(Ni,Qn)|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,pn)|0)+Math.imul(Ut,Yi)|0,$=$+Math.imul(Ut,pn)|0,N=N+Math.imul(Gt,Mn)|0,G=(G=G+Math.imul(Gt,an)|0)+Math.imul(Qe,Mn)|0,$=$+Math.imul(Qe,an)|0;var fn=(Ne+(N=N+Math.imul(Ye,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Ye,uo)|0)+Math.imul(rt,mo)|0))<<13)|0;Ne=(($=$+Math.imul(rt,uo)|0)+(G>>>13)|0)+(fn>>>26)|0,fn&=67108863,N=Math.imul(zi,Fn),G=(G=Math.imul(zi,In))+Math.imul(Li,Fn)|0,$=Math.imul(Li,In),N=N+Math.imul(Cn,$n)|0,G=(G=G+Math.imul(Cn,On)|0)+Math.imul(Zi,$n)|0,$=$+Math.imul(Zi,On)|0,N=N+Math.imul(ji,Qn)|0,G=(G=G+Math.imul(ji,Rt)|0)+Math.imul(Ji,Qn)|0,$=$+Math.imul(Ji,Rt)|0,N=N+Math.imul(ki,_i)|0,G=(G=G+Math.imul(ki,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,pn)|0)+Math.imul(ni,Yi)|0,$=$+Math.imul(ni,pn)|0,N=N+Math.imul(Bt,Mn)|0,G=(G=G+Math.imul(Bt,an)|0)+Math.imul(Ut,Mn)|0,$=$+Math.imul(Ut,an)|0;var _n=(Ne+(N=N+Math.imul(Gt,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Gt,uo)|0)+Math.imul(Qe,mo)|0))<<13)|0;Ne=(($=$+Math.imul(Qe,uo)|0)+(G>>>13)|0)+(_n>>>26)|0,_n&=67108863,N=Math.imul(zi,$n),G=(G=Math.imul(zi,On))+Math.imul(Li,$n)|0,$=Math.imul(Li,On),N=N+Math.imul(Cn,Qn)|0,G=(G=G+Math.imul(Cn,Rt)|0)+Math.imul(Zi,Qn)|0,$=$+Math.imul(Zi,Rt)|0,N=N+Math.imul(ji,_i)|0,G=(G=G+Math.imul(ji,Fi)|0)+Math.imul(Ji,_i)|0,$=$+Math.imul(Ji,Fi)|0,N=N+Math.imul(ki,Yi)|0,G=(G=G+Math.imul(ki,pn)|0)+Math.imul(Ni,Yi)|0,$=$+Math.imul(Ni,pn)|0,N=N+Math.imul(ei,Mn)|0,G=(G=G+Math.imul(ei,an)|0)+Math.imul(ni,Mn)|0,$=$+Math.imul(ni,an)|0;var _o=(Ne+(N=N+Math.imul(Bt,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Bt,uo)|0)+Math.imul(Ut,mo)|0))<<13)|0;Ne=(($=$+Math.imul(Ut,uo)|0)+(G>>>13)|0)+(_o>>>26)|0,_o&=67108863,N=Math.imul(zi,Qn),G=(G=Math.imul(zi,Rt))+Math.imul(Li,Qn)|0,$=Math.imul(Li,Rt),N=N+Math.imul(Cn,_i)|0,G=(G=G+Math.imul(Cn,Fi)|0)+Math.imul(Zi,_i)|0,$=$+Math.imul(Zi,Fi)|0,N=N+Math.imul(ji,Yi)|0,G=(G=G+Math.imul(ji,pn)|0)+Math.imul(Ji,Yi)|0,$=$+Math.imul(Ji,pn)|0,N=N+Math.imul(ki,Mn)|0,G=(G=G+Math.imul(ki,an)|0)+Math.imul(Ni,Mn)|0,$=$+Math.imul(Ni,an)|0;var Yn=(Ne+(N=N+Math.imul(ei,mo)|0)|0)+((8191&(G=(G=G+Math.imul(ei,uo)|0)+Math.imul(ni,mo)|0))<<13)|0;Ne=(($=$+Math.imul(ni,uo)|0)+(G>>>13)|0)+(Yn>>>26)|0,Yn&=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(Cn,Yi)|0,G=(G=G+Math.imul(Cn,pn)|0)+Math.imul(Zi,Yi)|0,$=$+Math.imul(Zi,pn)|0,N=N+Math.imul(ji,Mn)|0,G=(G=G+Math.imul(ji,an)|0)+Math.imul(Ji,Mn)|0,$=$+Math.imul(Ji,an)|0;var Ln=(Ne+(N=N+Math.imul(ki,mo)|0)|0)+((8191&(G=(G=G+Math.imul(ki,uo)|0)+Math.imul(Ni,mo)|0))<<13)|0;Ne=(($=$+Math.imul(Ni,uo)|0)+(G>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,N=Math.imul(zi,Yi),G=(G=Math.imul(zi,pn))+Math.imul(Li,Yi)|0,$=Math.imul(Li,pn),N=N+Math.imul(Cn,Mn)|0,G=(G=G+Math.imul(Cn,an)|0)+Math.imul(Zi,Mn)|0,$=$+Math.imul(Zi,an)|0;var Kn=(Ne+(N=N+Math.imul(ji,mo)|0)|0)+((8191&(G=(G=G+Math.imul(ji,uo)|0)+Math.imul(Ji,mo)|0))<<13)|0;Ne=(($=$+Math.imul(Ji,uo)|0)+(G>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,N=Math.imul(zi,Mn),G=(G=Math.imul(zi,an))+Math.imul(Li,Mn)|0,$=Math.imul(Li,an);var wa=(Ne+(N=N+Math.imul(Cn,mo)|0)|0)+((8191&(G=(G=G+Math.imul(Cn,uo)|0)+Math.imul(Zi,mo)|0))<<13)|0;Ne=(($=$+Math.imul(Zi,uo)|0)+(G>>>13)|0)+(wa>>>26)|0,wa&=67108863;var Aa=(Ne+(N=Math.imul(zi,mo))|0)+((8191&(G=(G=Math.imul(zi,uo))+Math.imul(Li,mo)|0))<<13)|0;return Ne=(($=Math.imul(Li,uo))+(G>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,ye[0]=Wo,ye[1]=Oa,ye[2]=Za,ye[3]=fr,ye[4]=Qa,ye[5]=er,ye[6]=ht,ye[7]=oi,ye[8]=Mi,ye[9]=bi,ye[10]=Vi,ye[11]=fn,ye[12]=_n,ye[13]=_o,ye[14]=Yn,ye[15]=Ln,ye[16]=Kn,ye[17]=wa,ye[18]=Aa,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,oe&=67108863}L.words[$]=be,N=oe,oe=G}return N!==0?L.words[$]=N:L.length--,L._strip()}function K(O,B,L){return U(O,B,L)}function se(O,B){this.x=O,this.y=B}Math.imul||(V=F),u.prototype.mulTo=function(O,B){var L=this.length+O.length;return this.length===10&&O.length===10?V(this,O,B):L<63?F(this,O,B):L<1024?U(this,O,B):K(this,O,B)},se.prototype.makeRBT=function(O){for(var B=new Array(O),L=u.prototype._countBits(O)-1,N=0;N>=1;return N},se.prototype.permute=function(O,B,L,N,G,$){for(var oe=0;oe<$;oe++)N[oe]=B[O[oe]],G[oe]=L[O[oe]]},se.prototype.transform=function(O,B,L,N,G,$){this.permute($,O,B,L,N,G);for(var oe=1;oe>>=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 oe=new Array($.bitLength()),be=0;be>>Ne&1}return oe})(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),oe=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&oe}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(oe===0)return this._strip();for(s(oe===-1),oe=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 oe,be=N.length-G.length;if(B!=="mod"){(oe=new u(null)).length=be+1,oe.words=new Array(oe.length);for(var ye=0;ye=0;te--){var Oe=67108864*(0|N.words[G.length+te])+(0|N.words[G.length+te-1]);for(Oe=Math.min(Oe/$|0,67108863),N._ishlnsubmul(G,Oe,te);N.negative!==0;)Oe--,N.negative=0,N._ishlnsubmul(G,1,te),N.isZero()||(N.negative^=1);oe&&(oe.words[te]=Oe)}return oe&&oe._strip(),N._strip(),B!=="div"&&L!==0&&N.iushrn(L),{div:oe||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),oe=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,Oe=1;(B.words[0]&Oe)==0&&te<26;++te,Oe<<=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 J=0,Q=1;(L.words[0]&Q)==0&&J<26;++J,Q<<=1);if(J>0)for(L.iushrn(J);J-- >0;)($.isOdd()||oe.isOdd())&&($.iadd(ye),oe.isub(Ne)),$.iushrn(1),oe.iushrn(1);B.cmp(L)>=0?(B.isub(L),N.isub($),G.isub(oe)):(L.isub(B),$.isub(N),oe.isub(G))}return{a:$,b:oe,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),oe=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(oe),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(oe),$.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,oe&=67108863,this.words[$]=oe}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 re(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 ce(){re.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _e(){re.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function ue(){re.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){re.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)}re.prototype._tmp=function(){var O=new u(null);return O.words=new Array(Math.ceil(this.n/13)),O},re.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},re.prototype.split=function(O,B){O.iushrn(this.n,0,B)},re.prototype.imulK=function(O){return O.imul(this.k)},d(ce,re),ce.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},ce.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 ce;else if(O==="p224")B=new _e;else if(O==="p192")B=new ue;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),oe=$.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(oe)!==0;)ye.redIAdd(oe);for(var Ne=this.pow(ye,N),te=this.pow(O,N.addn(1).iushrn(1)),Oe=this.pow(O,N),J=G;Oe.cmp($)!==0;){for(var Q=Oe,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,(++oe===4||N===0&&Ne===0)&&(G=this.mul(G,L[$]),oe=0,$=0)):oe=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]^K[ce>>>16&255]^se[_e>>>8&255]^ee[255&ue]^x[j++],D=U[ce>>>24]^K[_e>>>16&255]^se[ue>>>8&255]^ee[255&re]^x[j++],F=U[_e>>>24]^K[ue>>>16&255]^se[re>>>8&255]^ee[255&ce]^x[j++],V=U[ue>>>24]^K[re>>>16&255]^se[ce>>>8&255]^ee[255&_e]^x[j++],re=M,ce=D,_e=F,ue=V;return M=(w[re>>>24]<<24|w[ce>>>16&255]<<16|w[_e>>>8&255]<<8|w[255&ue])^x[j++],D=(w[ce>>>24]<<24|w[_e>>>16&255]<<16|w[ue>>>8&255]<<8|w[255&re])^x[j++],F=(w[_e>>>24]<<24|w[ue>>>16&255]<<16|w[re>>>8&255]<<8|w[255&ce])^x[j++],V=(w[ue>>>24]<<24|w[re>>>16&255]<<16|w[ce>>>8&255]<<8|w[255&_e])^x[j++],[M>>>=0,D>>>=0,F>>>=0,V>>>=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=[],w=[],P=[[],[],[],[]],M=[[],[],[],[]],D=0,F=0,V=0;V<256;++V){var U=F^F<<1^F<<2^F<<3^F<<4;U=U>>>8^255&U^99,y[D]=U,w[U]=D;var K=C[D],se=C[K],ee=C[se],re=257*C[U]^16843008*U;P[0][D]=re<<24|re>>>8,P[1][D]=re<<16|re>>>16,P[2][D]=re<<8|re>>>24,P[3][D]=re,re=16843009*ee^65537*se^257*K^16843008*D,M[0][U]=re<<24|re>>>8,M[1][U]=re<<16|re>>>16,M[2][U]=re<<8|re>>>24,M[3][U]=re,D===0?D=F=1:(D=K^C[C[C[ee^K]]],F^=C[C[F]])}return{SBOX:y,INV_SBOX:w,SUB_MIX:P,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,w=4*(y+1),P=[],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]),P[M]=P[M-x]^D}for(var F=[],V=0;V>>24]]^f.INV_SUB_MIX[1][f.SBOX[K>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[K>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&K]]}this._nRounds=y,this._keySchedule=P,this._invKeySchedule=F},_.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),w=n.allocUnsafe(16);return w.writeUInt32BE(y[0],0),w.writeUInt32BE(y[3],4),w.writeUInt32BE(y[2],8),w.writeUInt32BE(y[1],12),w},_.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,w,P){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),w=(function(F,V,U){if(V.length===12)return F._finID=i.concat([V,i.from([0,0,0,1])]),i.concat([V,i.from([0,0,0,2])]);var K=new u(U),se=V.length,ee=se%16;K.update(V),ee&&(ee=16-ee,K.update(i.alloc(ee,0))),K.update(i.alloc(8,0));var re=8*se,ce=i.alloc(8);ce.writeUIntBE(re,0,8),K.update(ce),F._finID=K.state;var _e=i.from(F._finID);return _(_e),_e})(this,w,D),this._prev=i.from(w),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=P,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 w=this._mode.encrypt(this,x);return this._decrypt?this._ghash.update(x):this._ghash.update(w),this._len+=x.length,w},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,w){var P=0;y.length!==w.length&&P++;for(var M=Math.min(y.length,w.length),D=0;D16)throw new Error("unable to decrypt data");for(var D=-1;++D16)return P=this.cache.slice(0,16),this.cache=this.cache.slice(16),P}else if(this.cache.length>=16)return P=this.cache.slice(0,16),this.cache=this.cache.slice(16),P;return null},x.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(w,P){var M=s[w.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var D=_(P,!1,M.key,M.iv);return y(w,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(P,M,D){u.call(this),this._cache=new y,this._cipher=new f.AES(M),this._prev=s.from(D),this._mode=P,this._autopadding=!0}e("inherits")(C,u),C.prototype._update=function(P){var M,D;this._cache.add(P);for(var F=[];M=this._cache.get();)D=this._mode.encrypt(this,M),F.push(D);return s.concat(F)};var x=s.alloc(16,16);function y(){this.cache=s.allocUnsafe(0)}function w(P,M,D){var F=n[P.toLowerCase()];if(!F)throw new TypeError("invalid suite type");if(typeof M=="string"&&(M=s.from(M)),M.length!==F.key/8)throw new TypeError("invalid key length "+M.length);if(typeof D=="string"&&(D=s.from(D)),F.mode!=="GCM"&&D.length!==F.iv)throw new TypeError("invalid iv length "+D.length);return F.type==="stream"?new d(F.module,M,D):F.type==="auth"?new i(F.module,M,D):new C(F.module,M,D)}C.prototype._final=function(){var P=this._cache.flush();if(this._autopadding)return P=this._mode.encrypt(this,P),this._cipher.scrub(),P;if(!P.equals(x))throw this._cipher.scrub(),new Error("data not multiple of block length")},C.prototype.setAutoPadding=function(P){return this._autopadding=!!P,this},y.prototype.add=function(P){this.cache=s.concat([this.cache,P])},y.prototype.get=function(){if(this.cache.length>15){var P=this.cache.slice(0,16);return this.cache=this.cache.slice(16),P}return null},y.prototype.flush=function(){for(var P=16-this.cache.length,M=s.allocUnsafe(P),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(se){var ee=d(se);return{blinder:ee.toRed(i.mont(se.modulus)).redPow(new i(se.publicExponent)).fromRed(),unblinder:ee.invm(se.modulus)}})(_),x=_.modulus.byteLength(),y=new i(f).mul(C.blinder).umod(_.modulus),w=y.toRed(i.mont(_.prime1)),P=y.toRed(i.mont(_.prime2)),M=_.coefficient,D=_.prime1,F=_.prime2,V=w.redPow(_.exponent1).fromRed(),U=P.redPow(_.exponent2).fromRed(),K=V.isub(U).imul(M).umod(D).imul(F);return U.iadd(K).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(P){s.Writable.call(this);var M=_[P];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(P){s.Writable.call(this);var M=_[P];if(!M)throw new Error("Unknown message digest");this._hash=i(M.hash),this._tag=M.id,this._signType=M.sign}function y(P){return new C(P)}function w(P){return new x(P)}Object.keys(_).forEach(function(P){_[P].id=n.from(_[P].id,"hex"),_[P.toLowerCase()]=_[P]}),d(C,s.Writable),C.prototype._write=function(P,M,D){this._hash.update(P),D()},C.prototype.update=function(P,M){return typeof P=="string"&&(P=n.from(P,M)),this._hash.update(P),this},C.prototype.sign=function(P,M){this.end();var D=this._hash.digest(),F=u(D,P,this._hashType,this._signType,this._tag);return M?F.toString(M):F},d(x,s.Writable),x.prototype._write=function(P,M,D){this._hash.update(P),D()},x.prototype.update=function(P,M){return typeof P=="string"&&(P=n.from(P,M)),this._hash.update(P),this},x.prototype.verify=function(P,M,D){typeof M=="string"&&(M=n.from(M,D)),this.end();var F=this._hash.digest();return f(M,F,P,this._signType,this._tag)},o.exports={Sign:y,Verify:w,createSign:y,createVerify:w}},{"./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(P,M,D,F){if((P=n.from(P.toArray())).length0&&D.ishrn(F),D}function y(P,M,D){var F,V;do{for(F=n.alloc(0);8*F.length=C)throw new Error("invalid sig")}o.exports=function(_,C,x,y,w){var P=d(x);if(P.type==="ec"){if(y!=="ecdsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");return(function(se,ee,re){var ce=u[re.data.algorithm.curve.join(".")];if(!ce)throw new Error("unknown curve "+re.data.algorithm.curve.join("."));var _e=new s(ce),ue=re.data.subjectPrivateKey.data;return _e.verify(ee,se,ue)})(_,C,P)}if(P.type==="dsa"){if(y!=="dsa")throw new Error("wrong public key type");return(function(se,ee,re){var ce=re.data.p,_e=re.data.q,ue=re.data.g,j=re.data.pub_key,W=d.signature.decode(se,"der"),pe=W.s,O=W.r;f(pe,_e),f(O,_e);var B=i.mont(ce),L=pe.invm(_e);return ue.toRed(B).redPow(new i(ee).mul(L).mod(_e)).fromRed().mul(j.toRed(B).redPow(O.mul(L).mod(_e)).fromRed()).mod(ce).mod(_e).cmp(O)===0})(_,C,P)}if(y!=="rsa"&&y!=="ecdsa/rsa")throw new Error("wrong public key type");C=n.concat([w,C]);for(var M=P.modulus.byteLength(),D=[1],F=0;C.length+D.length+2>5==6?2:P>>4==14?3:P>>3==30?4:P>>6==2?-1:-2}function u(P){var M=this.lastTotal-this.lastNeed,D=(function(F,V,U){if((192&V[0])!=128)return F.lastNeed=0,"\uFFFD";if(F.lastNeed>1&&V.length>1){if((192&V[1])!=128)return F.lastNeed=1,"\uFFFD";if(F.lastNeed>2&&V.length>2&&(192&V[2])!=128)return F.lastNeed=2,"\uFFFD"}})(this,P);return D!==void 0?D:this.lastNeed<=P.length?(P.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(P.copy(this.lastChar,M,0,P.length),void(this.lastNeed-=P.length))}function f(P,M){if((P.length-M)%2==0){var D=P.toString("utf16le",M);if(D){var F=D.charCodeAt(D.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",M,P.length-1)}function _(P){var M=P&&P.length?this.write(P):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,D)}return M}function C(P,M){var D=(P.length-M)%3;return D===0?P.toString("base64",M):(this.lastNeed=3-D,this.lastTotal=3,D===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",M,P.length-D))}function x(P){var M=P&&P.length?this.write(P):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function y(P){return P.toString(this.encoding)}function w(P){return P&&P.length?this.write(P):""}t.StringDecoder=s,s.prototype.write=function(P){if(P.length===0)return"";var M,D;if(this.lastNeed){if((M=this.fillLast(P))===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D=0?(ee>0&&(V.lastNeed=ee-1),ee):--se=0?(ee>0&&(V.lastNeed=ee-2),ee):--se=0?(ee>0&&(ee===2?ee=0:V.lastNeed=ee-3),ee):0})(this,P,M);if(!this.lastNeed)return P.toString("utf8",M);this.lastTotal=D;var F=P.length-(D-this.lastNeed);return P.copy(this.lastChar,0,F),P.toString("utf8",M,F)},s.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.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 "'+J+'" is invalid for option "size"');var Q=new Uint8Array(J);return Q.__proto__=u.prototype,Q}function u(J,Q,Ce){if(typeof J=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(J)}return f(J,Q,Ce)}function f(J,Q,Ce){if(typeof J=="string")return(function(Ye,rt){if(typeof rt=="string"&&rt!==""||(rt="utf8"),!u.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);var Qt=0|w(Ye,rt),Gt=d(Qt),Qe=Gt.write(Ye,rt);return Qe!==Qt&&(Gt=Gt.slice(0,Qe)),Gt})(J,Q);if(ArrayBuffer.isView(J))return x(J);if(J==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof J);if(te(J,ArrayBuffer)||J&&te(J.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|J}function w(J,Q){if(u.isBuffer(J))return J.length;if(ArrayBuffer.isView(J)||te(J,ArrayBuffer))return J.byteLength;if(typeof J!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof J);var Ce=J.length,qe=arguments.length>2&&arguments[2]===!0;if(!qe&&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(J).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ce;case"hex":return Ce>>>1;case"base64":return ye(J).length;default:if(mt)return qe?-1:be(J).length;Q=(""+Q).toLowerCase(),mt=!0}}function P(J,Q,Ce){var qe=!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(J||(J="utf8");;)switch(J){case"hex":return W(this,Q,Ce);case"utf8":case"utf-8":return _e(this,Q,Ce);case"ascii":return ue(this,Q,Ce);case"latin1":case"binary":return j(this,Q,Ce);case"base64":return ce(this,Q,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,Q,Ce);default:if(qe)throw new TypeError("Unknown encoding: "+J);J=(J+"").toLowerCase(),qe=!0}}function M(J,Q,Ce){var qe=J[Q];J[Q]=J[Ce],J[Ce]=qe}function D(J,Q,Ce,qe,mt){if(J.length===0)return-1;if(typeof Ce=="string"?(qe=Ce,Ce=0):Ce>2147483647?Ce=2147483647:Ce<-2147483648&&(Ce=-2147483648),Oe(Ce=+Ce)&&(Ce=mt?0:J.length-1),Ce<0&&(Ce=J.length+Ce),Ce>=J.length){if(mt)return-1;Ce=J.length-1}else if(Ce<0){if(!mt)return-1;Ce=0}if(typeof Q=="string"&&(Q=u.from(Q,qe)),u.isBuffer(Q))return Q.length===0?-1:F(J,Q,Ce,qe,mt);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?mt?Uint8Array.prototype.indexOf.call(J,Q,Ce):Uint8Array.prototype.lastIndexOf.call(J,Q,Ce):F(J,[Q],Ce,qe,mt);throw new TypeError("val must be string, number or Buffer")}function F(J,Q,Ce,qe,mt){var Ye,rt=1,Qt=J.length,Gt=Q.length;if(qe!==void 0&&((qe=String(qe).toLowerCase())==="ucs2"||qe==="ucs-2"||qe==="utf16le"||qe==="utf-16le")){if(J.length<2||Q.length<2)return-1;rt=2,Qt/=2,Gt/=2,Ce/=2}function Qe(Kt,ei){return rt===1?Kt[ei]:Kt.readUInt16BE(ei*rt)}if(mt){var qt=-1;for(Ye=Ce;YeQt&&(Ce=Qt-Gt),Ye=Ce;Ye>=0;Ye--){for(var Bt=!0,Ut=0;Utmt&&(qe=mt):qe=mt;var Ye=Q.length;qe>Ye/2&&(qe=Ye/2);for(var rt=0;rt>8,Gt=rt%256,Qe.push(Gt),Qe.push(Qt);return Qe})(Q,J.length-Ce),J,Ce,qe)}function ce(J,Q,Ce){return Q===0&&Ce===J.length?i.fromByteArray(J):i.fromByteArray(J.slice(Q,Ce))}function _e(J,Q,Ce){Ce=Math.min(J.length,Ce);for(var qe=[],mt=Q;mt239?4:Qe>223?3:Qe>191?2:1;if(mt+Bt<=Ce)switch(Bt){case 1:Qe<128&&(qt=Qe);break;case 2:(192&(Ye=J[mt+1]))==128&&(Gt=(31&Qe)<<6|63&Ye)>127&&(qt=Gt);break;case 3:Ye=J[mt+1],rt=J[mt+2],(192&Ye)==128&&(192&rt)==128&&(Gt=(15&Qe)<<12|(63&Ye)<<6|63&rt)>2047&&(Gt<55296||Gt>57343)&&(qt=Gt);break;case 4:Ye=J[mt+1],rt=J[mt+2],Qt=J[mt+3],(192&Ye)==128&&(192&rt)==128&&(192&Qt)==128&&(Gt=(15&Qe)<<18|(63&Ye)<<12|(63&rt)<<6|63&Qt)>65535&&Gt<1114112&&(qt=Gt)}qt===null?(qt=65533,Bt=1):qt>65535&&(qt-=65536,qe.push(qt>>>10&1023|55296),qt=56320|1023&qt),qe.push(qt),mt+=Bt}return(function(Ut){var Kt=Ut.length;if(Kt<=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(J,Q,Ce){return f(J,Q,Ce)},u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,u.alloc=function(J,Q,Ce){return(function(qe,mt,Ye){return _(qe),qe<=0?d(qe):mt!==void 0?typeof Ye=="string"?d(qe).fill(mt,Ye):d(qe).fill(mt):d(qe)})(J,Q,Ce)},u.allocUnsafe=function(J){return C(J)},u.allocUnsafeSlow=function(J){return C(J)},u.isBuffer=function(J){return J!=null&&J._isBuffer===!0&&J!==u.prototype},u.compare=function(J,Q){if(te(J,Uint8Array)&&(J=u.from(J,J.offset,J.byteLength)),te(Q,Uint8Array)&&(Q=u.from(Q,Q.offset,Q.byteLength)),!u.isBuffer(J)||!u.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(J===Q)return 0;for(var Ce=J.length,qe=Q.length,mt=0,Ye=Math.min(Ce,qe);mtQ&&(J+=" ... "),""},u.prototype.compare=function(J,Q,Ce,qe,mt){if(te(J,Uint8Array)&&(J=u.from(J,J.offset,J.byteLength)),!u.isBuffer(J))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof J);if(Q===void 0&&(Q=0),Ce===void 0&&(Ce=J?J.length:0),qe===void 0&&(qe=0),mt===void 0&&(mt=this.length),Q<0||Ce>J.length||qe<0||mt>this.length)throw new RangeError("out of range index");if(qe>=mt&&Q>=Ce)return 0;if(qe>=mt)return-1;if(Q>=Ce)return 1;if(this===J)return 0;for(var Ye=(mt>>>=0)-(qe>>>=0),rt=(Ce>>>=0)-(Q>>>=0),Qt=Math.min(Ye,rt),Gt=this.slice(qe,mt),Qe=J.slice(Q,Ce),qt=0;qt>>=0,isFinite(Ce)?(Ce>>>=0,qe===void 0&&(qe="utf8")):(qe=Ce,Ce=void 0)}var mt=this.length-Q;if((Ce===void 0||Ce>mt)&&(Ce=mt),J.length>0&&(Ce<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");qe||(qe="utf8");for(var Ye=!1;;)switch(qe){case"hex":return V(this,J,Q,Ce);case"utf8":case"utf-8":return U(this,J,Q,Ce);case"ascii":return K(this,J,Q,Ce);case"latin1":case"binary":return se(this,J,Q,Ce);case"base64":return ee(this,J,Q,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,J,Q,Ce);default:if(Ye)throw new TypeError("Unknown encoding: "+qe);qe=(""+qe).toLowerCase(),Ye=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(J,Q,Ce){var qe="";Ce=Math.min(J.length,Ce);for(var mt=Q;mtqe)&&(Ce=qe);for(var mt="",Ye=Q;YeCe)throw new RangeError("Trying to access beyond buffer length")}function B(J,Q,Ce,qe,mt,Ye){if(!u.isBuffer(J))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>mt||QJ.length)throw new RangeError("Index out of range")}function L(J,Q,Ce,qe,mt,Ye){if(Ce+qe>J.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("Index out of range")}function N(J,Q,Ce,qe,mt){return Q=+Q,Ce>>>=0,mt||L(J,0,Ce,4),s.write(J,Q,Ce,qe,23,4),Ce+4}function G(J,Q,Ce,qe,mt){return Q=+Q,Ce>>>=0,mt||L(J,0,Ce,8),s.write(J,Q,Ce,qe,52,8),Ce+8}u.prototype.slice=function(J,Q){var Ce=this.length;(J=~~J)<0?(J+=Ce)<0&&(J=0):J>Ce&&(J=Ce),(Q=Q===void 0?Ce:~~Q)<0?(Q+=Ce)<0&&(Q=0):Q>Ce&&(Q=Ce),Q>>=0,Q>>>=0,Ce||O(J,Q,this.length);for(var qe=this[J],mt=1,Ye=0;++Ye>>=0,Q>>>=0,Ce||O(J,Q,this.length);for(var qe=this[J+--Q],mt=1;Q>0&&(mt*=256);)qe+=this[J+--Q]*mt;return qe},u.prototype.readUInt8=function(J,Q){return J>>>=0,Q||O(J,1,this.length),this[J]},u.prototype.readUInt16LE=function(J,Q){return J>>>=0,Q||O(J,2,this.length),this[J]|this[J+1]<<8},u.prototype.readUInt16BE=function(J,Q){return J>>>=0,Q||O(J,2,this.length),this[J]<<8|this[J+1]},u.prototype.readUInt32LE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+16777216*this[J+3]},u.prototype.readUInt32BE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),16777216*this[J]+(this[J+1]<<16|this[J+2]<<8|this[J+3])},u.prototype.readIntLE=function(J,Q,Ce){J>>>=0,Q>>>=0,Ce||O(J,Q,this.length);for(var qe=this[J],mt=1,Ye=0;++Ye=(mt*=128)&&(qe-=Math.pow(2,8*Q)),qe},u.prototype.readIntBE=function(J,Q,Ce){J>>>=0,Q>>>=0,Ce||O(J,Q,this.length);for(var qe=Q,mt=1,Ye=this[J+--qe];qe>0&&(mt*=256);)Ye+=this[J+--qe]*mt;return Ye>=(mt*=128)&&(Ye-=Math.pow(2,8*Q)),Ye},u.prototype.readInt8=function(J,Q){return J>>>=0,Q||O(J,1,this.length),128&this[J]?-1*(255-this[J]+1):this[J]},u.prototype.readInt16LE=function(J,Q){J>>>=0,Q||O(J,2,this.length);var Ce=this[J]|this[J+1]<<8;return 32768&Ce?4294901760|Ce:Ce},u.prototype.readInt16BE=function(J,Q){J>>>=0,Q||O(J,2,this.length);var Ce=this[J+1]|this[J]<<8;return 32768&Ce?4294901760|Ce:Ce},u.prototype.readInt32LE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},u.prototype.readInt32BE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},u.prototype.readFloatLE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),s.read(this,J,!0,23,4)},u.prototype.readFloatBE=function(J,Q){return J>>>=0,Q||O(J,4,this.length),s.read(this,J,!1,23,4)},u.prototype.readDoubleLE=function(J,Q){return J>>>=0,Q||O(J,8,this.length),s.read(this,J,!0,52,8)},u.prototype.readDoubleBE=function(J,Q){return J>>>=0,Q||O(J,8,this.length),s.read(this,J,!1,52,8)},u.prototype.writeUIntLE=function(J,Q,Ce,qe){J=+J,Q>>>=0,Ce>>>=0,qe||B(this,J,Q,Ce,Math.pow(2,8*Ce)-1,0);var mt=1,Ye=0;for(this[Q]=255&J;++Ye>>=0,Ce>>>=0,qe||B(this,J,Q,Ce,Math.pow(2,8*Ce)-1,0);var mt=Ce-1,Ye=1;for(this[Q+mt]=255&J;--mt>=0&&(Ye*=256);)this[Q+mt]=J/Ye&255;return Q+Ce},u.prototype.writeUInt8=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,1,255,0),this[Q]=255&J,Q+1},u.prototype.writeUInt16LE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,2,65535,0),this[Q]=255&J,this[Q+1]=J>>>8,Q+2},u.prototype.writeUInt16BE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,2,65535,0),this[Q]=J>>>8,this[Q+1]=255&J,Q+2},u.prototype.writeUInt32LE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,4,4294967295,0),this[Q+3]=J>>>24,this[Q+2]=J>>>16,this[Q+1]=J>>>8,this[Q]=255&J,Q+4},u.prototype.writeUInt32BE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,4,4294967295,0),this[Q]=J>>>24,this[Q+1]=J>>>16,this[Q+2]=J>>>8,this[Q+3]=255&J,Q+4},u.prototype.writeIntLE=function(J,Q,Ce,qe){if(J=+J,Q>>>=0,!qe){var mt=Math.pow(2,8*Ce-1);B(this,J,Q,Ce,mt-1,-mt)}var Ye=0,rt=1,Qt=0;for(this[Q]=255&J;++Ye>0)-Qt&255;return Q+Ce},u.prototype.writeIntBE=function(J,Q,Ce,qe){if(J=+J,Q>>>=0,!qe){var mt=Math.pow(2,8*Ce-1);B(this,J,Q,Ce,mt-1,-mt)}var Ye=Ce-1,rt=1,Qt=0;for(this[Q+Ye]=255&J;--Ye>=0&&(rt*=256);)J<0&&Qt===0&&this[Q+Ye+1]!==0&&(Qt=1),this[Q+Ye]=(J/rt>>0)-Qt&255;return Q+Ce},u.prototype.writeInt8=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,1,127,-128),J<0&&(J=255+J+1),this[Q]=255&J,Q+1},u.prototype.writeInt16LE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,2,32767,-32768),this[Q]=255&J,this[Q+1]=J>>>8,Q+2},u.prototype.writeInt16BE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,2,32767,-32768),this[Q]=J>>>8,this[Q+1]=255&J,Q+2},u.prototype.writeInt32LE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,4,2147483647,-2147483648),this[Q]=255&J,this[Q+1]=J>>>8,this[Q+2]=J>>>16,this[Q+3]=J>>>24,Q+4},u.prototype.writeInt32BE=function(J,Q,Ce){return J=+J,Q>>>=0,Ce||B(this,J,Q,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),this[Q]=J>>>24,this[Q+1]=J>>>16,this[Q+2]=J>>>8,this[Q+3]=255&J,Q+4},u.prototype.writeFloatLE=function(J,Q,Ce){return N(this,J,Q,!0,Ce)},u.prototype.writeFloatBE=function(J,Q,Ce){return N(this,J,Q,!1,Ce)},u.prototype.writeDoubleLE=function(J,Q,Ce){return G(this,J,Q,!0,Ce)},u.prototype.writeDoubleBE=function(J,Q,Ce){return G(this,J,Q,!1,Ce)},u.prototype.copy=function(J,Q,Ce,qe){if(!u.isBuffer(J))throw new TypeError("argument should be a Buffer");if(Ce||(Ce=0),qe||qe===0||(qe=this.length),Q>=J.length&&(Q=J.length),Q||(Q=0),qe>0&&qe=this.length)throw new RangeError("Index out of range");if(qe<0)throw new RangeError("sourceEnd out of bounds");qe>this.length&&(qe=this.length),J.length-Q=0;--Ye)J[Ye+Q]=this[Ye+Ce];else Uint8Array.prototype.set.call(J,this.subarray(Ce,qe),Q);return mt},u.prototype.fill=function(J,Q,Ce,qe){if(typeof J=="string"){if(typeof Q=="string"?(qe=Q,Q=0,Ce=this.length):typeof Ce=="string"&&(qe=Ce,Ce=this.length),qe!==void 0&&typeof qe!="string")throw new TypeError("encoding must be a string");if(typeof qe=="string"&&!u.isEncoding(qe))throw new TypeError("Unknown encoding: "+qe);if(J.length===1){var mt=J.charCodeAt(0);(qe==="utf8"&&mt<128||qe==="latin1")&&(J=mt)}}else typeof J=="number"&&(J&=255);if(Q<0||this.length>>=0,Ce=Ce===void 0?this.length:Ce>>>0,J||(J=0),typeof J=="number")for(Ye=Q;Ye55295&&Ce<57344){if(!mt){if(Ce>56319){(Q-=3)>-1&&Ye.push(239,191,189);continue}if(rt+1===qe){(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(J){return i.toByteArray((function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace($,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q})(J))}function Ne(J,Q,Ce,qe){for(var mt=0;mt=Q.length||mt>=J.length);++mt)Q[mt+Ce]=J[mt];return mt}function te(J,Q){return J instanceof Q||J!=null&&J.constructor!=null&&J.constructor.name!=null&&J.constructor.name===Q.name}function Oe(J){return J!=J}}).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),w=s(y),P=i(C,w);if(u&&_!=_){for(;w>P;)if((x=y[P++])!=x)return!0}else for(;w>P;P++)if((u||P in y)&&y[P]===_)return u||P||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,w=x===2,P=x===3,M=x===4,D=x===6,F=x===7,V=x===5||D;return function(U,K,se,ee){for(var re,ce,_e=d(U),ue=s(_e),j=n(K,se),W=u(ue),pe=0,O=ee||f,B=y?O(U,W):w||F?O(U,0):void 0;W>pe;pe++)if((V||pe in ue)&&(ce=j(re=ue[pe],pe,_e),x))if(y)B[pe]=ce;else if(ce)switch(x){case 3:return!0;case 5:return re;case 6:return pe;case 2:_(B,re)}else switch(x){case 4:return!1;case 7:_(B,re)}return D?-1:P||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),w=n(C===void 0?x:C,x),P=d(u(w-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,w,P,M,D,F=C.target,V=C.global,U=C.stat;if(y=V?n:U?n[F]||u(F,{}):(n[F]||{}).prototype)for(w in x){if(M=x[w],P=C.dontCallGetSet?(D=i(y,w))&&D.value:y[w],!_(V?w:F+(U?".":"#")+w,C.forced)&&P!==void 0){if(typeof M==typeof P)continue;f(M,P)}(C.sham||P&&P.sham)&&s(M,"sham",!0),d(y,w,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;yse;se++)if((re=N(D[se]))&&_(M,re))return re;return new P(!1)}U=C(D,K)}for(ce=W?D.next:U.next;!(_e=i(ce,U)).done;){try{re=N(_e.value)}catch(G){y(U,"throw",G)}if(typeof re=="object"&&re&&_(M,re))return re}return new P(!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 w=C+" Iterator";return _.prototype=i(n,{next:s(+!y,x)}),d(_,w,!1,!0),u[w]=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"),w=e("../internals/define-built-in"),P=e("../internals/well-known-symbol"),M=e("../internals/iterators"),D=e("../internals/iterators-core"),F=d.PROPER,V=d.CONFIGURABLE,U=D.IteratorPrototype,K=D.BUGGY_SAFARI_ITERATORS,se=P("iterator"),ee=function(){return this};o.exports=function(re,ce,_e,ue,j,W,pe){f(_e,ce,ue);var O,B,L,N=function(te){if(te===j&&ye)return ye;if(!K&&te&&te in oe)return oe[te];switch(te){case"keys":case"values":case"entries":return function(){return new _e(this,te)}}return function(){return new _e(this)}},G=ce+" Iterator",$=!1,oe=re.prototype,be=oe[se]||oe["@@iterator"]||j&&oe[j],ye=!K&&be||N(j),Ne=ce==="Array"&&oe.entries||be;if(Ne&&(O=_(Ne.call(new re)))!==Object.prototype&&O.next&&(s||_(O)===U||(C?C(O,U):u(O[se])||w(O,se,ee)),x(O,G,!0,!0),s&&(M[G]=ee)),F&&j==="values"&&be&&be.name!=="values"&&(!s&&V?y(oe,"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)(K||$||!(L in oe))&&w(oe,L,B[L]);else n({target:ce,proto:!0,forced:K||$},B);return s&&!pe||oe[se]===ye||w(oe,se,ye,{name:j}),M[ce]=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"),w=e("../internals/is-pure"),P=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[P].call(D)!==D})?n={}:w&&(n=_(n)),u(n[P])||x(n,P,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,w=String,P=Object.defineProperty,M=n("".slice),D=n("".replace),F=n([].join),V=u&&!i(function(){return P(function(){},"length",{value:8}).length!==8}),U=String(String).split("String"),K=o.exports=function(se,ee,re){M(w(ee),0,7)==="Symbol("&&(ee="["+D(w(ee),/^Symbol\(([^)]*)\)/,"$1")+"]"),re&&re.getter&&(ee="get "+ee),re&&re.setter&&(ee="set "+ee),(!d(se,"name")||f&&se.name!==ee)&&(u?P(se,"name",{value:ee,configurable:!0}):se.name=ee),V&&re&&d(re,"arity")&&se.length!==re.arity&&P(se,"length",{value:re.arity});try{re&&d(re,"constructor")&&re.constructor?u&&P(se,"prototype",{writable:!1}):se.prototype&&(se.prototype=void 0)}catch{}var ce=x(se);return d(ce,"source")||(ce.source=F(U,typeof ee=="string"?ee:"")),se};Function.prototype.toString=K(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"),w=e("../internals/engine-is-ios"),P=e("../internals/engine-is-ios-pebble"),M=e("../internals/engine-is-webos-webkit"),D=e("../internals/engine-is-node"),F=f.MutationObserver||f.WebKitMutationObserver,V=f.document,U=f.process,K=f.Promise,se=C(f,"queueMicrotask"),ee=se&&se.value;if(!ee){var re=new y,ce=function(){var _e,ue;for(D&&(_e=U.domain)&&_e.exit();ue=re.get();)try{ue()}catch(j){throw re.head&&n(),j}_e&&_e.enter()};w||D||M||!F||!V?!P&&K&&K.resolve?((d=K.resolve(void 0)).constructor=K,u=_(d.then,d),n=function(){u(ce)}):D?n=function(){U.nextTick(ce)}:(x=_(x,f),n=function(){x(ce)}):(i=!0,s=V.createTextNode(""),new F(ce).observe(s,{characterData:!0}),n=function(){s.data=i=!i}),ee=function(_e){re.head||n(),re.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,w=Object.defineProperty,P=i([].concat);o.exports=!y||d(function(){if(n&&y({b:1},y(w({},"a",{enumerable:!0,get:function(){w(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},D={},F=Symbol("assign detection");return M[F]=7,"abcdefghijklmnopqrst".split("").forEach(function(V){D[V]=V}),y({},M)[F]!==7||u(y({},D)).join("")!=="abcdefghijklmnopqrst"})?function(M,D){for(var F=C(M),V=arguments.length,U=1,K=f.f,se=_.f;V>U;)for(var ee,re=x(arguments[U++]),ce=K?P(u(re),K(re)):u(re),_e=ce.length,ue=0;_e>ue;)ee=ce[ue++],n&&!s(se,re,ee)||(F[ee]=re[ee]);return F}: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(){},w=function(D){return"