1import {a as P$1,d as ce,L as Lb,F as Fe,k as ko$1,K as Ki,fY as Ge,fZ as We,f_ as ci$1,R,cj as Txe,a1 as xMe,a2 as MMe,a3 as NMe,a4 as AMe,a5 as TMe,a6 as PMe,a7 as RMe,a8 as OMe,a9 as FMe,aa as LMe,ad as W8,ae as w,ak as em$1,al as Ht$1,am as tm$1,ah as S,aj as be,an as Fq,ap as E,ao as le,aq as ye,at as Bq,ag as Ee,aZ as X$1,aT as Zn,ai as Ce,n as ne$1,J,_ as _1e,f$ as Je,g0 as fr,z,bV as Yt$1,m as Dn$1,O as Oe,N as N$1,i as hc,u as ue,f as Xt$1,g1 as Ye,B as Be,ch as ae,p as pe,P as Pe,g2 as Xe,s as p,r as B,v as Ss,j as zn$1,o as od,ci as gt,t as Ob,b5 as vp,b6 as A3e,C as Au,e as e$1,be as An,c as Se,D as Dt,g as Rn$1,M as Mu,bO as _p,bP as Lo$1,w as i,ck as B$1,cl as g,aB as x,aC as Z_e,aD as t1,aE as W_e,aF as Y_e,cd as _1,bg as KW,aG as eu,aH as mY,dv as lO,d6 as z8,aI as os,aJ as kL,aK as rZ,aL as FZ,aM as Tu,cm as hDe,cn as vF,co as jK,Y as wu,aN as Cb,aO as ns,aP as nb,aQ as mu,bG as ob,bh as GF,bi as Du,aY as Ml,aR as N4,az as vn$1,aS as F4,au as et,av as q,aw as $,aX as Y$1,ba as _a,aU as Tr,bR as cc,bS as lc,bT as ga$1,bU as Su,aV as Ae,af as he,aA as Ve,a_ as gn$1,br as Ge$1,a$ as Ct,b0 as wt,cp as Nc,cq as Ce$1,g3 as K$1,g4 as Bt,g5 as Et,g6 as Ke,S as SW,b,T,g7 as v,cg as jn$2,g8 as Be$1,cr as s$1,q as k$1,cs as kl,y as Pb,bw as Kt$1,ca as v$1,g9 as wi$2,bC as Zo$1,ga as Ei,ct as M,gb as Vi,b2 as C,gc as zi,cu as x$1,b4 as y2,cv as D,gd as Y$2,bD as Nt,ge as $e,cx as x$2,cy as y,cz as B$2,ay as iD,$ as $9,Z as RQ,a0 as pMe,ab as fv,ac as bW,bB as X8,ar as Lt,as as Uw,bf as dY,U as ec,cA as zCe,bb as ZCe,bc as e0e,cB as i0e,cE as XCe,cD as JCe,bk as sa,bm as ca$1,G as xZ,I as _Z,Q as hZ,V as jCe,gf as xt,gg as He,by as n0e,bJ as Eb,bK as DS,bL as Oke,bH as _7,cF as _Q,cG as MTe,cH as XF,aW as Rq,cI as hc$1,bl as Td,bM as Vq,cJ as BM}from'./main-IZHJ2OCR.js';import {u}from'./chunk-CNlunSl3.js';import {k}from'./chunk-CWv-OwU7.js';import {h}from'./chunk-CnxuHBAx.js';import {l}from'./chunk-BSCCaqP7.js';import {e as et$1}from'./chunk-QQwpGhEE.js';import {f}from'./chunk-BG6Y4irt.js';import {j as jn$1}from'./chunk-A10Z6-W8.js';import {t as t$1}from'./chunk-B5dBYwcC.js';import {s}from'./chunk-i66OAyKa.js';function K(e,n){if(e&1&&(w(0,"th",13),Ee(1),S()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("transformerEventTypeCode")," ");}}function N(e,n){if(e&1&&(w(0,"td",14),Ee(1),S()),e&2){let t=n.$implicit;E(),Zn(" ",t.transformerEventTypeCode," ");}}function Q(e,n){if(e&1&&(w(0,"th",13),Ee(1),S()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("eventDate")," ");}}function V(e,n){if(e&1&&(w(0,"td",14),Ee(1),S()),e&2){let t=n.$implicit;E(),Zn(" ",t.eventDate," ");}}function X(e,n){if(e&1&&(w(0,"th",13),Ee(1),S()),e&2){let t=X$1();E(),Zn(" ",t.meta?.getCaption("referenceDocument")," ");}}function Y(e,n){if(e&1&&(w(0,"td",14),Ee(1),S()),e&2){let t=n.$implicit;E(),Zn(" ",t.referenceDocument," ");}}function Z(e,n){if(e&1&&(w(0,"td",15),Ee(1),S()),e&2){let t=n.$implicit;E(),Zn(" ",t.notes," ");}}function ee(e,n){e&1&&Ce(0,"tr",16);}function te(e,n){e&1&&Ce(0,"tr",17);}function ne(e,n){e&1&&Ce(0,"tr",18);}function ie(e,n){e&1&&Ce(0,"mat-progress-spinner",12);}var re=(()=>{class e{constructor(t,p,a,F,q,z,G){this.session=t,this.changeRef=p,this.route=a,this.router=F,this.lookupService=q,this.source=z,this.transformer=G,this.ngUnsubscribe=new P$1,this.displayedColumns=["transformerEventTypeCode","eventDate","referenceDocument"],this.displayedColumnsExtended=["notes"],this.lookupService.metadata().subscribe(J=>this.meta=J);}isExtendedRow(t,p){return t%2>0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(p){return new(p||e)(ce(Lb),ce(Fe),ce(ko$1),ce(Ki),ce(Ge),ce(We),ce(ci$1))};}static{this.\u0275cmp=R({type:e,selectors:[["oppt-transformer-event-overview-list"]],standalone:false,decls:18,vars:8,consts:[[1,"oppt-host"],["mat-table","",1,"oppt-cursor-default",3,"dataSource"],["matColumnDef","transformerEventTypeCode"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","eventDate"],["matColumnDef","referenceDocument"],["matColumnDef","notes"],["mat-cell","","class","oppt-grey-color","colspan","100%",4,"matCellDef"],["mat-header-row","","class","oppt-condensed-header",4,"matHeaderRowDef"],["mat-row","","class","oppt-extended-row-1",4,"matRowDef","matRowDefColumns"],["mat-row","","class","oppt-extended-row-2",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mode","indeterminate","diameter","40","strokeWidth","4",1,"oppt-table-spinner"],["mat-header-cell",""],["mat-cell",""],["mat-cell","","colspan","100%",1,"oppt-grey-color"],["mat-header-row","",1,"oppt-condensed-header"],["mat-row","",1,"oppt-extended-row-1"],["mat-row","",1,"oppt-extended-row-2"]],template:function(p,a){p&1&&(w(0,"div",0)(1,"table",1),em$1(2,2),Ht$1(3,K,2,1,"th",3)(4,N,2,1,"td",4),tm$1(),em$1(5,5),Ht$1(6,Q,2,1,"th",3)(7,V,2,1,"td",4),tm$1(),em$1(8,6),Ht$1(9,X,2,1,"th",3)(10,Y,2,1,"td",4),tm$1(),em$1(11,7),Ht$1(12,Z,2,1,"td",8),tm$1(),Ht$1(13,ee,1,0,"tr",9)(14,te,1,0,"tr",10)(15,ne,1,0,"tr",11),S(),be(16,ie,1,0,"mat-progress-spinner",12),Fq(17,"async"),S()),p&2&&(E(),le("dataSource",a.source),E(12),le("matHeaderRowDef",a.displayedColumns),E(),le("matRowDefColumns",a.displayedColumns),E(),le("matRowDefColumns",a.displayedColumnsExtended)("matRowDefWhen",a.isExtendedRow),E(),ye(Bq(17,6,a.source.busy)?16:-1));},dependencies:[Txe,xMe,MMe,NMe,AMe,TMe,PMe,RMe,OMe,FMe,LMe,W8],styles:[".oppt-table[_ngcontent-%COMP%]{width:100%}div.oppt-host[_ngcontent-%COMP%]{min-height:150px}.mat-column-referenceDocument[_ngcontent-%COMP%]{display:none}@media(min-width:960px){.mat-column-referenceDocument[_ngcontent-%COMP%]{display:table-cell}}"],changeDetection:1});}}return e})();var fe=class extends i{constructor(){super(...arguments),this.transformerId=null,this.actionDateFrom=null,this.actionDateTo=null,this.transformerActionCodes=[];}};function Ht(t,s){if(t&1&&(w(0,"th",13),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("transformerActionCode")," ");}}function qt(t,s){if(t&1&&(w(0,"td",14),Ee(1),S()),t&2){let e=s.$implicit;E(),Zn(" ",e.transformerActionCode," ");}}function Qt(t,s){if(t&1&&(w(0,"th",13),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("actionDate")," ");}}function zt(t,s){if(t&1&&(w(0,"td",14),Ee(1),S()),t&2){let e=s.$implicit;E(),Zn(" ",e.actionDate," ");}}function $t(t,s){if(t&1&&(w(0,"th",13),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("stationNumber")," ");}}function Wt(t,s){if(t&1&&(w(0,"td",14),Ee(1),S()),t&2){let e=s.$implicit;E(),Zn(" ",e.stationNumber," ");}}function Yt(t,s){if(t&1&&(w(0,"td",15),Ee(1),S()),t&2){let e=s.$implicit;E(),Zn(" ",e.statusDescription," ");}}function Kt(t,s){t&1&&Ce(0,"tr",16);}function Jt(t,s){t&1&&Ce(0,"tr",17);}function Xt(t,s){t&1&&Ce(0,"tr",18);}function Zt(t,s){t&1&&Ce(0,"mat-progress-spinner",12);}var ei=(()=>{class t{constructor(e,o,i,h,y,F,B){this.session=e,this.changeRef=o,this.route=i,this.router=h,this.lookupService=y,this.source=F,this.transformer=B,this.ngUnsubscribe=new P$1,this.displayedColumns=["transformerActionCode","actionDate","stationNumber"],this.displayedColumnsExtended=["statusDescription"],this.lookupService.metadata().subscribe(I=>this.meta=I);}isExtendedRow(e,o){return e%2>0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(o){return new(o||t)(ce(Lb),ce(Fe),ce(ko$1),ce(Ki),ce(Je),ce(Xe),ce(ci$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-action-overview-list"]],standalone:false,decls:18,vars:8,consts:[[1,"oppt-host"],["mat-table","",1,"oppt-cursor-default",3,"dataSource"],["matColumnDef","transformerActionCode"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actionDate"],["matColumnDef","stationNumber"],["matColumnDef","statusDescription"],["mat-cell","","class","oppt-grey-color","colspan","100%",4,"matCellDef"],["mat-header-row","","class","oppt-condensed-header",4,"matHeaderRowDef"],["mat-row","","class","oppt-extended-row-1",4,"matRowDef","matRowDefColumns"],["mat-row","","class","oppt-extended-row-2",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mode","indeterminate","diameter","40","strokeWidth","4",1,"oppt-table-spinner"],["mat-header-cell",""],["mat-cell",""],["mat-cell","","colspan","100%",1,"oppt-grey-color"],["mat-header-row","",1,"oppt-condensed-header"],["mat-row","",1,"oppt-extended-row-1"],["mat-row","",1,"oppt-extended-row-2"]],template:function(o,i){o&1&&(w(0,"div",0)(1,"table",1),em$1(2,2),Ht$1(3,Ht,2,1,"th",3)(4,qt,2,1,"td",4),tm$1(),em$1(5,5),Ht$1(6,Qt,2,1,"th",3)(7,zt,2,1,"td",4),tm$1(),em$1(8,6),Ht$1(9,$t,2,1,"th",3)(10,Wt,2,1,"td",4),tm$1(),em$1(11,7),Ht$1(12,Yt,2,1,"td",8),tm$1(),Ht$1(13,Kt,1,0,"tr",9)(14,Jt,1,0,"tr",10)(15,Xt,1,0,"tr",11),S(),be(16,Zt,1,0,"mat-progress-spinner",12),Fq(17,"async"),S()),o&2&&(E(),le("dataSource",i.source),E(12),le("matHeaderRowDef",i.displayedColumns),E(),le("matRowDefColumns",i.displayedColumns),E(),le("matRowDefColumns",i.displayedColumnsExtended)("matRowDefWhen",i.isExtendedRow),E(),ye(Bq(17,6,i.source.busy)?16:-1));},dependencies:[Txe,xMe,MMe,NMe,AMe,TMe,PMe,RMe,OMe,FMe,LMe,W8],styles:[".oppt-table[_ngcontent-%COMP%]{width:100%}div.oppt-host[_ngcontent-%COMP%]{min-height:150px}.mat-column-stationNumber[_ngcontent-%COMP%], .mat-column-addressLine1[_ngcontent-%COMP%]{display:none}@media(min-width:960px){.mat-column-stationNumber[_ngcontent-%COMP%]{display:table-cell}}"],changeDetection:1});}}return t})();var P=(()=>{class t extends z{get identifyingFieldsDisabled(){return this._identifyingFieldsDisabled}set identifyingFieldsDisabled(e){this._identifyingFieldsDisabled=e,this.afterDisabledChanged();}get featureFieldsDisabled(){return this._featureFieldsDisabled}set featureFieldsDisabled(e){this._featureFieldsDisabled=e,this.afterDisabledChanged();}constructor(e,o,i,h,y,F){super(),this.service=e,this.session=o,this.transformerService=i,this.lookup=h,this.featureLookup=y,this.circuitLookup=F,this.ngUnsubscribe=new P$1,this._identifyingFieldsDisabled=false,this._featureFieldsDisabled=false,this.canDelete=new Yt$1(false),this.serverService=e,this.formFields=["transformerActionCode","stationNumber","addressLine1","feature","featureId","assetGroupName","objectId","position","actionDate","statusDescription","phase","configuration","tapSetting","circuitId","referenceDocument","notes","customText1","customText2","customText3","customText4","customText5"],Dn$1([this.formChanges,this.transformerService.entityChanges]).pipe(Oe(this.ngUnsubscribe)).subscribe(B=>{let I=B[1];if(N$1.isNull(this.entity)||N$1.isNull(I)||!I.canEditActions||!this.session.claimCheck(hc.TransformerE
1dit,I.systemId)){this.canEdit.next(false),this.canDelete.next(false);return}this.canEdit.next(true),this.canDelete.next(true);}),this.initializeLookups();}initializeLookups(){this.tapSettingOptionsObserver=this.transformerService.entityChanges.pipe(ue(e=>{let o=[];return N$1.isNull(e)||(o.push(this.createTapSetting(1,e.tapSetting1)),o.push(this.createTapSetting(2,e.tapSetting2)),o.push(this.createTapSetting(3,e.tapSetting3)),o.push(this.createTapSetting(4,e.tapSetting4)),o.push(this.createTapSetting(5,e.tapSetting5))),o})),this.circuitOptionsObserver=this.formChanges.pipe(Xt$1(e=>N$1.isNull(e)?An:N$1.isNull(this.transformerService.entity)?An:this.circuitLookup.list()),ue(e=>e.reduce((o,i)=>(i.systemId===this.transformerService.entity.systemId&&o.push(i),o),[])));}createTapSetting(e,o){let i=new Ye;return i.value=e,N$1.isNullOrEmpty(o)?i.name="Setting "+e.toString():i.name=o,i}getFeatureDescription(e){return N$1.isNull(e)||N$1.isNullOrEmpty(e.featureId)?"None":N$1.isNotNullOrEmpty(e.featureStationNumber)?e.featureStationNumber:N$1.isNotNullOrEmpty(e.assetGroupName)&&N$1.isNotNullOrEmpty(e.objectId)?e.assetGroupName+" "+e.objectId.toString():e.featureId}afterDisabledChanged(){N$1.isNull(this.form)||(this.disableControl("assetGroupName"),this.disableControl("featureId"),this.identifyingFieldsDisabled?this.disableControl("transformerActionCode"):this.enableControl("transformerActionCode"),this.featureFieldsDisabled||this.identifyingFieldsDisabled?this.disableControl("stationNumber"):this.enableControl("stationNumber"));}addCustomValidators(){this.addFeatureValidator();}addFeatureValidator(){let e=this.meta.getControl("stationNumber");this.meta.addMessage("stationNumber",k.featureDuplicateValidatorKey,"Found more than one feature. Use the picker to select one feature."),this.meta.addMessage("stationNumber",k.featureLookupValidatorKey,"Feature not found."),this.meta.addMessage("stationNumber","alreadyAudited","Material already audited"),e.setAsyncValidators(k.featureLookupValidator(this.transformerService.entity.systemId,"Transformer",this.featureLookup,this.form)),this.lookup.systemObserver.pipe(Be(1)).subscribe(o=>{o.transformerInstallFeature||this.form.get("feature").setValue(new ae);});}ngOnDestroy(){super.ngOnDestroy(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(o){return new(o||t)(pe(fr),pe(Lb),pe(ci$1),pe(A3e),pe(B$1),pe(g))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var ii=["formRef"],ri=["transformerActionTypeSelect"],oi=["stationNumberRef"],ni=["actionDateTextRef"];function ai(t,s){t&1&&(w(0,"oppt-form-field",9)(1,"mat-form-field"),Ce(2,"mat-label"),w(3,"mat-select",21,4)(5,"mat-option",22),Ee(6,"Install"),S(),w(7,"mat-option",23),Ee(8,"Removal"),S()(),N4(),S()()),t&2&&(E(3),F4());}function si(t,s){t&1&&(w(0,"oppt-form-field",9)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",24),N4(),S()()),t&2&&(E(3),F4());}function mi(t,s){t&1&&(w(0,"oppt-form-field",13)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",25),N4(),S()()),t&2&&(E(3),F4());}function li(t,s){t&1&&(w(0,"oppt-form-field",13)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",26),N4(),S()()),t&2&&(E(3),F4());}function fi(t,s){t&1&&(w(0,"oppt-form-field",13)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",26),N4(),S()()),t&2&&(E(3),F4());}function ci(t,s){if(t&1){let e=gn$1();w(0,"div",7)(1,"oppt-form-field",13)(2,"oppt-form-field")(3,"mat-form-field"),Ce(4,"mat-label"),w(5,"input",27,5),he("keydown.arrowdown",function(){Ct(e);let i=X$1();return wt(i.pickFeature())}),S(),N4(),w(7,"mat-icon",28),he("click",function(){Ct(e);let i=X$1();return wt(i.pickFeature())}),Ee(8,"find_replace"),S()()()(),Ht$1(9,fi,4,0,"oppt-form-field",15),w(10,"oppt-form-field",29)(11,"mat-form-field"),Ce(12,"mat-label")(13,"input",30),N4(),S()(),w(14,"oppt-form-field",9)(15,"mat-form-field"),Ce(16,"mat-label")(17,"input",31),N4(),w(18,"mat-icon",32),he("click",function(){Ct(e);let i=X$1();return wt(i.copyFeatureId())}),Ee(19,"bookmarks"),S()()()();}if(t&2){let e=X$1();E(5),F4(),E(4),le("ngIf",e.showStationFields&&e.showFeatureFields),E(4),F4(),E(4),F4();}}function pi(t,s){if(t&1&&(w(0,"mat-option",34),Ee(1),S()),t&2){let e=s.$implicit;le("value",e.circuitId),E(),Ge$1(e.circuitName);}}function di(t,s){if(t&1&&(w(0,"div",7)(1,"oppt-form-field",9)(2,"mat-form-field"),Ce(3,"mat-label"),w(4,"mat-select",33)(5,"mat-option",34),Ee(6,"1"),S(),w(7,"mat-option",34),Ee(8,"2"),S(),w(9,"mat-option",34),Ee(10,"3"),S()(),N4(),S()(),w(11,"oppt-form-field",9)(12,"mat-form-field"),Ce(13,"mat-label")(14,"input",35),N4(),S()(),w(15,"oppt-form-field",9)(16,"mat-form-field"),Ce(17,"mat-label"),w(18,"mat-select",36)(19,"mat-option"),Ee(20,"None"),S(),Ht$1(21,pi,2,2,"mat-option",37),Fq(22,"async"),S(),N4(),S()()()),t&2){let e=X$1();E(4),F4(),E(),le("value",1),E(2),le("value",2),E(2),le("value",3),E(5),F4(),E(4),F4(),E(3),le("ngForOf",Bq(22,4,e.service.circuitOptionsObserver));}}function ui(t,s){if(t&1&&(w(0,"mat-option",34),Ee(1),S()),t&2){let e=s.$implicit;le("value",e.value),E(),Ge$1(e.name);}}function hi(t,s){if(t&1&&(w(0,"div",7)(1,"oppt-form-field",9)(2,"mat-form-field"),Ce(3,"mat-label")(4,"input",38),N4(),S()(),w(5,"oppt-form-field",9)(6,"mat-form-field"),Ce(7,"mat-label"),w(8,"mat-select",39)(9,"mat-option"),Ee(10,"None"),S(),Ht$1(11,ui,2,2,"mat-option",37),Fq(12,"async"),S(),N4(),S()()()),t&2){let e=X$1();E(4),F4(),E(4),F4(),E(3),le("ngForOf",Bq(12,1,e.service.tapSettingOptionsObserver));}}function vi(t,s){t&1&&(w(0,"oppt-form-field",40)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",41),N4(),S()()),t&2&&(E(3),F4());}function gi$1(t,s){t&1&&(w(0,"oppt-form-field",40)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",42),N4(),S()()),t&2&&(E(3),F4());}function Ci(t,s){t&1&&(w(0,"oppt-form-field",40)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",43),N4(),S()()),t&2&&(E(3),F4());}function _i(t,s){t&1&&(w(0,"oppt-form-field",40)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",44),N4(),S()()),t&2&&(E(3),F4());}function bi(t,s){t&1&&(w(0,"oppt-form-field",13)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",45),N4(),S()()),t&2&&(E(3),F4());}var Ut=(()=>{class t{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,o,i,h,y,F){this.dialog=e,this.transformer=o,this.service=i,this.changeRef=h,this.lookup=y,this.errorHandler=F,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate,this.showTransformerActionCode=true,this.save=new B,this.show
1FeatureFields=false,this.showStationFields=false;}ngAfterViewInit(){this.lookup.systemObserver.pipe(Be(1)).subscribe(e=>{this.showFeatureFields=e.transformerInstallFeature,this.changeRef.detectChanges();}),Ss(this.formRef.nativeElement,"submit").pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{this.save&&this.save.emit(this.meta);}),this.service.formChanges.pipe(od(0),Xt$1(e=>(this.initialize(),N$1.isNull(e)||!e.enabled?(this.changeRef.detectChanges(),An):(!this.service.identifyingFieldsDisabled&&this.showTransformerActionCode?this.transformerActionTypeSelect.focus():Ob.setFocusAndSelect(this.actionDateTextRef),this.changeRef.detectChanges(),this.entity.entityAction!=="Create"?An:this.service.form.get("transformerActionCode").valueChanges))),zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.handleTransformerActionCodeChanged(),this.changeRef.detectChanges();});}pickFeature(){if(this.showFeatureFields===false||this.service.disabled||this.service.identifyingFieldsDisabled||this.form.get("stationNumber").disabled)return;this.dialog.open(gt,{width:"100%",maxWidth:"1100px",data:{title:this.meta.getCaption("featureId"),systemId:this.transformer.entity.systemId,asset:"Transformer",requireStationNumberExists:true}}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1)).subscribe(o=>{N$1.isNotNull(o)&&(this.form.get("feature").setValue(o),this.form.get("featureId").setValue(o.featureId),this.form.get("assetGroupName").setValue(o.assetGroupName),this.form.get("phase").setValue(o.phase),this.form.get("circuitId").setValue(o.circuitId),this.form.get("stationNumber").setValue(o.stationNumber)),Ob.setFocusAndSelect(this.stationNumberRef);});}copyFeatureId(){let e=this.form.get("featureId").value;if(N$1.isNullOrEmpty(e)){this.errorHandler.showMessage("No feature available");return}Ob.copyToClipboard(e),this.errorHandler.showMessage("Copied to clipboard");}handleTransformerActionCodeChanged(){if(N$1.isNull(this.service.form))return;let e=this.service.form.get("transformerActionCode").value;if(this.service.entity.entityAction!=="Create"&&this.service.identifyingFieldsDisabled===false&&(this.service.identifyingFieldsDisabled=true),e==="Install"){this.form.get("position").setValue(1),this.service.featureFieldsDisabled===true&&(this.service.featureFieldsDisabled=false),this.showStationFields===false&&(this.showStationFields=true);return}if(this.showStationFields===true&&(this.showStationFields=false),this.service.entity.entityAction==="Create"){if(this.service.featureFieldsDisabled===false){this.service.featureFieldsDisabled=true;let o=this.form.get("feature").value;N$1.isNotNull(o)&&N$1.isNotNullOrEmpty(o.featureId)&&this.form.get("feature").setValue(null),this.form.get("featureId").setValue(null),this.form.get("assetGroupName").setValue(null),this.form.get("objectId").setValue(null),this.form.get("position").setValue(null),this.form.get("phase").setValue(null),this.form.get("circuitId").setValue(null),this.form.get("tapSetting").setValue(null),this.form.get("configuration").setValue(null),this.service.form.get("stationNumber").setValue(null),this.service.form.get("addressLine1").setValue(null);}}else this.service.featureFieldsDisabled===false&&(this.service.featureFieldsDisabled=true);}initialize(){if(N$1.isNull(this.service.form))return;let e=this.service.form.get("transformerActionCode").value;if(this.service.entity.entityAction!=="Create"&&this.service.identifyingFieldsDisabled===false&&(this.service.identifyingFieldsDisabled=true),e==="Install"){this.service.featureFieldsDisabled===true&&(this.service.featureFieldsDisabled=false),this.showStationFields===false&&(this.showStationFields=true);return}this.showStationFields===true&&(this.showStationFields=false),this.service.entity.entityAction==="Create"?this.service.featureFieldsDisabled===false&&(this.service.featureFieldsDisabled=true):this.service.featureFieldsDisabled===false&&(this.service.featureFieldsDisabled=true);}ngOnDestroy(){this.save.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(o){return new(o||t)(ce(vp),ce(ci$1),ce(P),ce(Fe),ce(A3e),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-action-form"]],viewQuery:function(o,i){if(o&1&&et(ii,5)(ri,5)(oi,5)(ni,5),o&2){let h;q(h=$())&&(i.formRef=h.first),q(h=$())&&(i.transformerActionTypeSelect=h.first),q(h=$())&&(i.stationNumberRef=h.first),q(h=$())&&(i.actionDateTextRef=h.first);}},inputs:{formId:"formId",showTransformerActionCode:"showTransformerActionCode"},outputs:{save:"save"},standalone:false,decls:41,vars:21,consts:[["formRef",""],["actionDateTextRef",""],["actionDateRef",""],["notesTextarea",""],["transformerActionTypeSelect",""],["stationNumberRef",""],["novalidate","","autocomplete","off",3,"formGroup","formMetadata","id"],[1,"flex-form"],["class","flex-min-150",4,"ngIf"],[1,"flex-min-150"],["matInput","","formControlName","actionDate","autocomplete","off","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],[1,"flex-100p"],["matInput","","type","text","maxLength","200","autocomplete","off","formControlName","statusDescription"],["class","flex-100p",4,"ngIf"],["class","flex-form",4,"ngIf"],["matInput","","type","text","maxLength","50","autocomplete","off","formControlName","referenceDocument"],["matInput","","formControlName","notes","type","text","maxLength","1000","autocomplete","off"],["align","end"],["class","flex-min-150 flex-100p-lt-sm",4,"ngIf"],["formControlName","transformerActionCode"],["value","Install"],["value","Removal"],["matInput","","formControlName","transformerActionCode","type","text"],["matInput","","type","text","formControlName","stationNumber","required",""],["matInput","","type","text","formControlName","addressLine1"],["matInput","","formControlName","stationNumber","type","text","maxlength","30","autocomplete","off","required","",3,"keydown.arrowdown"],["matSuffix","",1,"oppt-cursor-pointer",3,"click"],[1,"flex-min-150-g10"],["matInput","","type","text","formControlName","assetGroupName"],["matInput","","type","text","formControlName","featureId"],["matSuffix","","matTooltip","Copy global ID to clipboard",1,"oppt-cursor-pointer",3,"click"],["formControlName","position"],[3,"value"],["matInput","","type","text","maxLength","3","autocomplete","off","formControlName","ph
1ase"],["formControlName","circuitId"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","text","maxLength","30","autocomplete","off","formControlName","configuration"],["formControlName","tapSetting"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","customText1","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText2","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText3","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText4","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText5","type","text","maxLength","200","autocomplete","off"]],template:function(o,i){if(o&1&&(w(0,"form",6,0)(2,"div",7),Ht$1(3,ai,9,0,"oppt-form-field",8)(4,si,4,0,"oppt-form-field",8),w(5,"oppt-form-field",9)(6,"mat-form-field"),Ce(7,"mat-label")(8,"input",10,1),N4(),Ce(10,"mat-datepicker-toggle",11)(11,"mat-datepicker",12,2),S()(),w(13,"oppt-form-field",13)(14,"mat-form-field"),Ce(15,"mat-label")(16,"input",14),N4(),S()(),Ht$1(17,mi,4,0,"oppt-form-field",15)(18,li,4,0,"oppt-form-field",15),S(),Ht$1(19,ci,20,1,"div",16)(20,di,23,6,"div",16)(21,hi,13,3,"div",16),w(22,"div",7)(23,"oppt-form-field",9)(24,"mat-form-field"),Ce(25,"mat-label")(26,"input",17),N4(),S()(),w(27,"oppt-form-field",13)(28,"mat-form-field"),Ce(29,"mat-label")(30,"textarea",18,3),N4(),w(32,"mat-hint",19),Ee(33),S()()()(),w(34,"div",7),Ht$1(35,vi,4,0,"oppt-form-field",20)(36,gi$1,4,0,"oppt-form-field",20),S(),w(37,"div",7),Ht$1(38,Ci,4,0,"oppt-form-field",20)(39,_i,4,0,"oppt-form-field",20)(40,bi,4,0,"oppt-form-field",15),S()()),o&2){let h=vn$1(12),y=vn$1(31);le("formGroup",i.form)("formMetadata",i.meta)("id",i.formId)("@fadeIn",void 0),E(3),le("ngIf",i.showTransformerActionCode&&i.meta.form.get("transformerActionCode").enabled),E(),le("ngIf",i.showTransformerActionCode&&i.meta.form.get("transformerActionCode").disabled),E(4),le("min",i.minDate)("max",i.maxDate)("matDatepicker",h),F4(),E(2),le("for",h),E(6),F4(),E(),le("ngIf",i.showStationFields&&!i.showFeatureFields),E(),le("ngIf",i.showStationFields&&!i.showFeatureFields),E(),le("ngIf",i.showStationFields&&i.showFeatureFields),E(),le("ngIf",i.showStationFields),E(),le("ngIf",i.showStationFields),E(5),F4(),E(4),F4(),E(3),Zn("",y.value.length," / 1000"),E(2),le("ngIf",i.meta.showField("customText1")),E(),le("ngIf",i.meta.showField("customText2")),E(2),le("ngIf",i.meta.showField("customText3")),E(),le("ngIf",i.meta.showField("customText4")),E(),le("ngIf",i.meta.showField("customText5"));}},dependencies:[Z_e,t1,W_e,Y_e,_1,KW,eu,mY,lO,z8,os,kL,rZ,FZ,Tu,hDe,vF,jK,wu,Cb,ns,nb,mu,ob,GF,Du,Ml,W8],styles:["mat-chip[_ngcontent-%COMP%]{text-align:center}.oppt-width-spacer[_ngcontent-%COMP%]{height:0;margin:0;padding:0}"],data:{animation:[x]},changeDetection:1});}}return t})();function Si(t,s){if(t&1){let e=gn$1();w(0,"oppt-transformer-action-form",8),he("save",function(){Ct(e);let i=X$1();return wt(i.save())}),S();}t&2&&le("showTransformerActionCode",false);}function Ti(t,s){t&1&&Ce(0,"mat-progress-bar",7);}var wi$1=(()=>{class t extends e$1{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(e,o,i,h,y,F,B,I,Pt,pe){switch(super(B),this.router=e,this.changeRef=o,this.route=i,this.session=h,this.dialog=y,this.transformer=F,this.lookup=I,this.dialogRef=Pt,this.ngUnsubscribe=new P$1,this.title="Create install action",this.transformerActionCode="Install",this.initialize=()=>N$1.isNull(this.transformer)?An:this.transformer.entityChanges.pipe(Se(N$1.isNotNull),Be(1),Dt(G=>{if(!G.canEditActions)return this.dialogRef.close(),An;let K=this.service.getNewEntity();return K.transformerId=G.transformerId,K.transformerActionCode=this.transformerActionCode,this.transformerActionCode==="Install"&&(K.position=1),this.service.resolveNew(K)})),this.onBeforeChangeSystemId=G=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){G.cancel("Busy, please wait");return}this.service.form.dirty&&G.cancel("Unsaved changes");}},this.service.disabled=false,this.transformerOverview=pe.transformer,this.transformerActionCode=pe.transformerActionCode,this.transformerActionCode){case "Install":this.title="Create install action";break;
1case "Removal":this.title="Create removal action";break;case "Decommission":this.title="Create decommission action";break}}ngAfterViewInit(){this.transformer.resolveByEntity(this.transformerOverview).pipe(Xt$1(e=>this.initialize())).subscribe(e=>{},e=>{console.log(e),this.dialogRef.close();}),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}save(){this.transformer.busy.getValue()||N$1.isNull(this.transformer.entity)||this.service.save().pipe(Dt(e=>e.resultType==="Failure"?An:(this.service.showForm.next(false),Y$1(e)))).subscribe(e=>{this.dialogRef.close(this.service.entity.transformerActionId);},e=>{console.log(e);});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardNew().pipe(Oe(this.ngUnsubscribe),Rn$1(e=>{e&&N$1.isNotNull(this.service.entity)&&this.service.clear();})):true}cancel(){this.dialogRef.close();}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(o){return new(o||t)(ce(Ki),ce(Fe),ce(ko$1),ce(Lb),ce(Mu),ce(ci$1),ce(P),ce(A3e),ce(_p),ce(Lo$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-action-new-dialog"]],standalone:false,features:[Ve([ci$1,P]),Ae],decls:14,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content","","opptScroller","",3,"keydown.control.enter","keydown.escape"],["formId","transformerActionEdit",3,"showTransformerActionCode"],["align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","button","color","primary","type","submit","form","transformerActionEdit",3,"disabled"],[1,"oppt-progress-bar-wrapper"],["mode","indeterminate"],["formId","transformerActionEdit",3,"save","showTransformerActionCode"]],template:function(o,i){o&1&&(w(0,"h2",0),Ee(1),S(),w(2,"div",1),he("keydown.control.enter",function(){return i.save()})("keydown.escape",function(){return i.cancel()}),be(3,Si,1,1,"oppt-transformer-action-form",2),Fq(4,"async"),S(),w(5,"mat-dialog-actions",3)(6,"button",4),he("click",function(){return i.cancel()}),Ee(7,"Cancel"),S(),w(8,"button",5),Fq(9,"async"),Ee(10,"Create"),S()(),w(11,"div",6),be(12,Ti,1,0,"mat-progress-bar",7),Fq(13,"async"),S()),o&2&&(E(),Zn(" ",i.title,` 2`),E(2),ye(Bq(4,4,i.showForm)?3:-1),E(5),le("disabled",Bq(9,6,i.cannotSave)),E(4),ye(Bq(13,8,i.busy)?12:-1));},dependencies:[_a,Tr,cc,lc,ga$1,Su,Ut,W8],encapsulation:2,changeDetection:1});}}return t})();var Gr=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({providers:[Je,fr],imports:[_1e,u,h]});}}return t})();var Br=(()=>{class t{constructor(){}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformers"]],standalone:false,decls:7,vars:0,consts:[["outlet","outlet"],[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],[1,"oppt-host","flex-full-screen"],[1,"oppt-host","flex-100p"],[1,"oppt-host"]],template:function(i,a){i&1&&(w(0,"div",1),Ce(1,"div",2),w(2,"div",3)(3,"article",4),Ce(4,"router-outlet",5,0),S()(),Ce(6,"div",2),S());},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();var _n=t=>({"oppt-hide":t}),yn=t=>["/transformers",t];function Sn(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("transformerNumber")," ");}}function Tn(t,l){if(t&1&&(w(0,"td",17),Ee(1),S()),t&2){let e=l.$implicit;E(),Zn(" ",e.transformerNumber," ");}}function In(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("transformerStatusCode")," ");}}function wn(t,l){if(t&1&&(w(0,"td",17),Ee(1),S()),t&2){let e=l.$implicit;E(),Zn(" ",e.transformerStatusCode," ");}}function Dn(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("transformerTypeCode")," ");}}function Mn(t,l){if(t&1&&(w(0,"td",17),Ee(1),S()),t&2){let e=l.$implicit;E(),Zn(" ",e.transformerTypeCode," ");}}function kn(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("kvaRating")," ");}}function En(t,l){if(t&1&&(w(0,"td",17),Ee(1),Fq(2,"number"),S()),t&2){let e=l.$implicit;E(),Zn(" ",Vq(2,1,e.kvaRating,"1.0-2")," ");}}function Nn(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("phaseCount")," ");}}function Fn(t,l){if(t&1&&(w(0,"td",17),Ee(1),Fq(2,"number"),S()),t&2){let e=l.$implicit;E(),Zn(" ",Vq(2,1,e.phaseCount,"1.0")," ");}}function On(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("statusDescription")," ");}}function Rn(t,l){if(t&1&&(w(0,"td",17),Ee(1),S()),t&2){let e=l.$implicit;E(),Zn(" ",e.statusDescription," ");}}function Bn(t,l){if(t&1&&(w(0,"th",16),Ee(1),S()),t&2){let e=X$1();E(),Zn(" ",e.meta?.getCaption("lastStatusDate")," ");}}function Vn(t,l){if(t&1&&(w(0,"td",17),Ee(1),S()),t&2){let e=l.$implicit;E(),Zn(" ",e.lastStatusDate," ");}}function jn(t,l){t&1&&Ce(0,"tr",18);}function Ln(t,l){if(t&1&&Ce(0,"tr",19),t&2){let e=l.$implicit;le("routerLink",Uw(2,yn,e.transformerId))("routerLinkActive","mat-row-selected");}}var gi=(()=>{class t{get orderBy(){return this.searchService.getOrderByClause(this.sort)}set orderBy(e){this.searchService.setMatSort(this.sort,e);}get pageSize(){return N$1.isNull(this.pager)?this.session.pageSize:this.pager.pageSize}set pageSize(e){N$1.isNull(this.pager)||(this.pager.pageSize=e);}get pageIndex(){return N$1.isNull(this.pager)?0:this.pager.pageIndex}set pageIndex(e){N$1.isNull(this.pager)||(this.pager.pageIndex=e);}get pageChanged(){return this.pager.page}get sortChanged(){return this.sort.sortChange}constructor(e,i){this.searchService=e,this.session=i,this.opptShow=false,this.displayedColumns=["transformerNumber","transformerStatusCode","transformerTypeCode","kvaRating","phaseCount","statusDescription","lastStatusDate"],this.searchService.metadata().pipe(Be(1)).subscribe(a=>{this.meta=a;});}trackTransformerBy(e,i){return i?i.transformerId:void 0}static{this.\u0275fac=function(i){return new(i||t)(ce(Bt),ce(Lb))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-table"]],viewQuery:function(i,a){if(i&1&&et(RQ,5)($9,5),i&2){let d;q(d=$())&&(a.sort=d.first),q(d=$())&&(a.pager=d.first);}},inputs:{opptShow:"opptShow"},standalone:false,decls:31,vars:15,consts:[["paginator",""],["mat-table","","matSort","",1,"oppt-table",3,"dataSource","trackBy"],["matColumnDef","transformerNumber"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","transformerStatusCode"],["matColumnDef","transformerTypeCode"],["matColumnDef","kvaRating"],["matColumnDef","phaseCount"],["matColumnDef","statusDescription"],["matColumnDef","lastStatusDate"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink","routerLinkActive",4,"matRowDef","matRowDefColumns"],[3,"hidden"],["pageIndex","0",3,"length","pageSize"],[1,"oppt-fab-space"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink","routerLinkActive"]],template:function(i,a){i&1&&(w(0,"div")(1,"table",1),em$1(2,2),Ht$1(3,Sn,2,1,"th",3)(4,Tn,2,1,"td",4),tm$1(),em$1(5,5),Ht$1(6,In,2,1,"th",3)(7,wn,2,1,"td",4),tm$1(),em$1(8,6),Ht$1(9,Dn,2,1,"th",3)(10,Mn,2,1,"td",4),tm$1(),em$1(11,7),Ht$1(12,kn,2,1,"th",3)(13,En,3,4,"td",4),tm$1(),em$1(14,8),Ht$1(15,Nn,2,1,"th",3)(16,Fn,3,4,"td",4),tm$1(),em$1(17,9),Ht$1(18,On,2,1,"th",3)(19,Rn,2,1,"td",4),tm$1(),em$1(20,10),Ht$1(21,Bn,2,1,"th",3)(22,Vn,2,1,"td",4),tm$1(),Ht$1(23,jn,1,0,"tr",11)(24,Ln,1,4,"tr",12),S(),w(25,"div",13),Fq(26,"async"),Ce(27,"mat-paginator",14,0),Fq(29,"async"),S(),Ce(30,"div",15),S()),i&2&&(Lt(Uw(13,_n,!a.opptShow)),E(),le("dataSource",a.searchService)("trackBy",a.trackTransformerBy),E(22),le("matHeaderRowDef",a.displayedColumns),E(),le("matRowDefColumns",a.displayedColumns),E(),le("hidden",Bq(26,9,a.searchService.n
2oPaging)),E(2),le("length",Bq(29,11,a.searchService.totalRecords))("pageSize",a.session.pageSize));},dependencies:[$9,RQ,pMe,xMe,MMe,NMe,AMe,TMe,PMe,RMe,OMe,FMe,LMe,fv,bW,W8,X8],styles:[".oppt-table[_ngcontent-%COMP%]{width:100%}.mat-column-transformerTypeCode[_ngcontent-%COMP%], .mat-column-kvaRating[_ngcontent-%COMP%], .mat-column-phaseCount[_ngcontent-%COMP%], .mat-column-statusDescription[_ngcontent-%COMP%], .mat-column-lastStatusDate[_ngcontent-%COMP%]{display:none}@media(min-width:600px){.mat-column-kvaRating[_ngcontent-%COMP%], .mat-column-phaseCount[_ngcontent-%COMP%]{display:table-cell}}@media(min-width:960px){.mat-column-transformerTypeCode[_ngcontent-%COMP%], .mat-column-lastStatusDate[_ngcontent-%COMP%]{display:table-cell}}@media(min-width:1280px){.mat-column-statusDescription[_ngcontent-%COMP%]{display:table-cell}}"],changeDetection:1});}}return t})();function Un(t,l){if(t&1&&(w(0,"mat-option",8),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Pn(t,l){if(t&1&&(w(0,"mat-option",8),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function zn(t,l){if(t&1&&(w(0,"mat-option",8),Ee(1),S()),t&2){let e=l.$implicit;le("value",e.value),E(),Ge$1(e.caption);}}function Hn(t,l){if(t&1){let e=gn$1();w(0,"mat-dialog-content")(1,"form",3,0),he("submit",function(){Ct(e);let a=X$1();return wt(a.done())}),w(3,"div",4)(4,"oppt-form-field",5)(5,"mat-form-field"),Ce(6,"mat-label")(7,"input",6),N4(),S()(),w(8,"oppt-form-field",5)(9,"mat-form-field"),Ce(10,"mat-label"),w(11,"mat-select",7),sa(12,Un,2,2,"mat-option",8,Td),S(),N4(),S()()(),w(14,"div",4)(15,"oppt-form-field",5)(16,"mat-form-field"),Ce(17,"mat-label"),w(18,"mat-select",9),sa(19,Pn,2,2,"mat-option",8,Td),S(),N4(),S()()(),w(21,"div",4)(22,"oppt-form-field",5)(23,"mat-form-field"),Ce(24,"mat-label")(25,"input",10),N4(),S()(),w(26,"oppt-form-field",5)(27,"mat-form-field"),Ce(28,"mat-label")(29,"input",11),N4(),S()(),w(30,"oppt-form-field",5)(31,"mat-form-field"),Ce(32,"mat-label")(33,"input",12),N4(),S()(),w(34,"oppt-form-field",5)(35,"mat-form-field"),Ce(36,"mat-label")(37,"input",13),N4(),S()()(),w(38,"div",4)(39,"oppt-form-field",5)(40,"mat-form-field"),Ce(41,"mat-label"),w(42,"mat-select",14),sa(43,zn,2,2,"mat-option",8,Td),S(),N4(),S()(),w(45,"oppt-form-field",15)(46,"mat-form-field"),Ce(47,"mat-label")(48,"input",16),N4(),Ce(49,"mat-datepicker-toggle",17)(50,"mat-datepicker",18,1),S()(),w(52,"oppt-form-field",15)(53,"mat-form-field"),Ce(54,"mat-label")(55,"input",19),N4(),Ce(56,"mat-datepicker-toggle",17)(57,"mat-datepicker",18,2),S()()()()(),w(59,"div",20)(60,"button",21),he("click",function(){Ct(e);let a=X$1();return wt(a.cancel())}),Ee(61,"Cancel"),S(),w(62,"button",21),he("click",function(){Ct(e);let a=X$1();return wt(a.reset())}),Ee(63,"Reset criteria"),S(),w(64,"button",22),Ee(65,"Search"),S()();}if(t&2){let e=vn$1(51),i=vn$1(58),a=X$1();E(),le("formGroup",a.meta.form)("formMetadata",a.meta),E(6),F4(),E(4),F4(),E(),ca$1(a.transformerStatusCodeOptions),E(6),F4(),E(),ca$1(a.transformerTypeCodeOptions),E(6),F4(),E(4),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(),ca$1(a.searchDateOptions),E(5),le("min",a.minDate)("max",a.maxDate)("matDatepicker",e),F4(),E(),le("for",e),E(6),le("min",a.minDate)("max",a.maxDate)("matDatepicker",i),F4(),E(),le("for",i),E(8),le("disabled",a.cannotSearch);}}var jr=(()=>{class t{get cannotSearch(){return z.isInvalid(this.form)}constructor(e,i,a,d,_,S){this.searchService=e,this.transformerService=i,this.session=a,this.ngChanges=d,this.dialogRef=_,this.tenantCodeLookup=S,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate,this.searchDateOptions=[],this.transformerStatusCodeOptions=Ei,this.transformerTypeCodeOptions=[],this.title="Advanced search",this.isVisible=false;}done(){if(this.cannotSearch)return;let e=this.searchService.advancedCriteria;N$1.isNull(e)?e=new Be$1:e=Object.assign({},e),this.meta.update(e),e.systemId=this.session.systemId,this.dialogRef.close(e);}reset(){let e=new Be$1;this.meta.loadFrom(e);}cancel(){this.dialogRef.close();}ngAfterViewInit(){this.session.systemIdObserver.pipe(Xt$1(e=>this.tenantCodeLookup.list().pipe(Oe(this.ngUnsubscribe),ue(i=>i.reduce((d,_)=>(_.codeType==="Transformer type"&&(_.systemId==null||_.systemId===e)&&d.push(_.code),d),[])))),od(0),Oe(this.ngUnsubscribe)).subscribe(e=>{this.transformerTypeCodeOptions=e;}),this.transformerService.metadata().pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(e=>{if(N$1.isNull(this.meta)){let a=new M(Vi(e.metadataList),this.session);this.form=a.createFormGroup(["defaultSearch","transformerStatusCodes","transformerTypeCodes","phaseCountFrom","phaseCountTo","kvaRatingFrom","kvaRatingTo","searchDate","dateFrom","dateTo"]),this.meta=new C(a,this.form);}let i=this.searchService.advancedCriteria||new Be$1;this.meta.loadFrom(i),this.searchDateOptions=zi(e),this.isVisible=true,this.ngChanges.detectChanges();});}
2ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Bt),ce(Et),ce(Lb),ce(Fe),ce(_p),ce(x$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-search"]],standalone:false,decls:1,vars:1,consts:[["formRef",""],["dateFromPick",""],["dateToPick",""],["id","transformerSearchForm","novalidate","",3,"submit","formGroup","formMetadata"],[1,"flex-form"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","defaultSearch","maxlength","50","type","text","autocomplete","off"],["multiple","true","formControlName","transformerStatusCodes"],[3,"value"],["multiple","true","formControlName","transformerTypeCodes"],["matInput","","formControlName","phaseCountFrom","maxlength","13","type","number","autocomplete","off"],["matInput","","formControlName","phaseCountTo","maxlength","13","type","number","autocomplete","off"],["matInput","","formControlName","kvaRatingFrom","maxlength","13","type","number","autocomplete","off"],["matInput","","formControlName","kvaRatingTo","maxlength","13","type","number","autocomplete","off"],["formControlName","searchDate"],[1,"flex-160"],["matInput","","formControlName","dateFrom","autocomplete","off",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],["matInput","","formControlName","dateTo","autocomplete","off",3,"min","max","matDatepicker"],["mat-dialog-actions","","align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","submit","color","primary","form","transformerSearchForm",3,"disabled"]],template:function(i,a){i&1&&be(0,Hn,66,11),i&2&&ye(a.isVisible?0:-1);},dependencies:[Z_e,t1,dY,W_e,Y_e,KW,eu,mY,os,kL,rZ,FZ,Tu,Tr,hDe,vF,jK,lc,ga$1,Cb,ns,nb,ob,GF,Du],styles:["[_nghost-%COMP%] .mat-dialog-content{max-height:55vh}"],changeDetection:1});}}return t})();var $n=["transformerNumberRef"],qn=()=>["Transformer manufacturer"];function Qn(t,l){if(t&1){let e=gn$1();w(0,"button",32),he("click",function(){Ct(e);let a=X$1(2);return wt(a.getNextTransformerNumber())}),w(1,"mat-icon"),Ee(2,"auto_awesome"),S()();}if(t&2){let e=X$1(2);le("disabled",(e.form==null?null:e.form.disabled)===null?true:e.form==null?null:e.form.disabled);}}function Wn(t,l){if(t&1&&(w(0,"mat-option",16),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Yn(t,l){if(t&1&&(w(0,"mat-option",16),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Jn(t,l){if(t&1&&(w(0,"mat-option",16),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Kn(t,l){if(t&1&&(w(0,"form",4)(1,"div",10)(2,"oppt-form-field",11)(3,"mat-form-field"),Ce(4,"mat-label")(5,"input",12,0),N4(),be(7,Qn,3,1,"button",13),S()(),w(8,"oppt-form-field",14)(9,"mat-form-field"),Ce(10,"mat-label"),w(11,"mat-select",15)(12,"mat-option"),Ee(13,"None"),S(),sa(14,Wn,2,2,"mat-option",16,Td),Fq(16,"async"),S(),N4(),S()()(),w(17,"div",10)(18,"oppt-form-field",14)(19,"mat-form-field"),Ce(20,"mat-label")(21,"input",17),N4(),S()(),w(22,"oppt-form-field",14)(23,"mat-form-field"),Ce(24,"mat-label")(25,"input",18),N4(),S()()(),w(26,"div",10),Ce(27,"oppt-organization-picker",19),w(28,"oppt-form-field",14)(29,"mat-form-field"),Ce(30,"mat-label")(31,"input",20),N4(),Ce(32,"mat-datepicker-toggle",21)(33,"mat-datepicker",22,1),S()(),w(35,"oppt-form-field",23)(36,"mat-form-field"),Ce(37,"mat-label")(38,"input",24),N4(),S()()(),w(39,"div",10)(40,"oppt-form-field",23)(41,"mat-form-field"),Ce(42,"mat-label")(43,"input",25),N4(),S()()(),w(44,"div",10)(45,"oppt-form-field",14)(46,"mat-form-field"),Ce(47,"mat-label"),w(48,"mat-select",26)(49,"mat-option"),Ee(50,"None"),S(),sa(51,Yn,2,2,"mat-option",16,Td),Fq(53,"async"),S(),N4(),S()(),w(54,"oppt-form-field",14)(55,"mat-form-field"),Ce(56,"mat-label"),w(57,"mat-select",27)(58,"mat-option"),Ee(59,"None"),S(),sa(60,Jn,2,2,"mat-option",16,Td),Fq(62,"async"),S(),N4(),S()()(),w(63,"div",10)(64,"oppt-form-field",14)(65,"mat-form-field"),Ce(66,"mat-label")(67,"input",28),N4(),S()(),w(68,"oppt-form-field",14)(69,"mat-form-field"),Ce(70,"mat-label")(71,"input",29),N4(),S()(),w(72,"oppt-form-field",30)(73,"mat-form-field"),Ce(74,"mat-label")(75,"input",31),N4(),S()()()()),t&2){let e=vn$1(34),i=X$1();le("formGroup",i.form)("formMetadata",i.meta),E(5),F4(),E(2),ye(i.entity.entityAction==="Create"?7:-1),E(4),F4(),E(3),ca$1(Bq(16,9,i.service.transformerTypeCodeObserver)),E(7),F4(),E(4),F4(),E(2),le("systemId",i.entity==null?null:i.entity.systemId)("limitOrganizationTypeCodes",Rq(15,qn)),E(4),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e),E(6),F4(),E(5),F4(),E(5),F4(),E(3),ca$1(Bq(53,11,i.service.primaryVoltageCodeObserver)),E(6),F4(),E(3),ca$1(Bq(62,13,i.service.secondaryVoltageCodeObserver)),E(7),F4(),E(4),F4(),E(4),F4();}}function Xn(t,l){t&1&&Ce(0,"mat-progress-bar",9);}var Ar=(()=>{class t extends e$1{constructor(e,i,a,d,_,S,V,J){super(e),this.transformerService=i,this.session=a,this.dialog=d,this.lookup=_,this.district=S,this.dialogRef=V,this.errorHandler=J,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate,this.initialize=()=>{let L=this.service.getNewEntity();return L.transformerId=y2.newId(),L.systemId=this.session.systemId,L.entityAction="Create",this.service.resolveNew(L,["transformerNumber","transformerTypeCode","serialNumber","catalogNumber","description","transformerMfgOrganizationId","transformerMfgOrganizationCode","transformerMfgOrganizationName","manufacturerDate","primaryVoltageCode","secondaryVoltageCode","kvaRating","impedance","phaseCount"])},this.onBeforeChangeSystemId=L=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){L.cancel("Busy, please wait");return}this.service.form.dirty&&L.cancel("Unsaved changes");}},e.disabled=false;}ngAfterViewInit(){this.initialize().pipe(ue(e=>{if(!this.session.setSystemId(e.systemId))throw new Error("system change not available");return e})).subscribe(e=>{},e=>{console.log(e),this.dialogRef.close();}),this.session.systemIdObserver.pipe(Se(e=>N$1.isNotNull(this.service.entity)&&e!==this.service.entity.systemId),Oe(this.ngUnsubscribe)).subscribe(e=>{this.dialogRef.close();}
2),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}getNextTransformerNumber(){this.service.disabled||this.transformerService.getNextTransformerNumber(this.service.entity.systemId).pipe(Oe(this.ngUnsubscribe),Be(1)).subscribe({next:e=>{N$1.isNotNull(e)&&N$1.isNotNullOrEmpty(e.nextTransformerNumber)?(this.form.get("transformerNumber").setValue(e.nextTransformerNumber),Ob.setFocusAndSelect(this.transformerNumberRef)):(this.errorHandler.showErrorMessage("Unable to automatically calculate the next transformer number."),Ob.setFocusAndSelect(this.transformerNumberRef));},error:e=>{this.errorHandler.showErrorMessage("Unable to automatically calculate the next transformer number."),Ob.setFocusAndSelect(this.transformerNumberRef);}});}save(){this.service.save().subscribe(e=>{e.resultType!=="Failure"&&this.dialogRef.close(this.service.entity.transformerId);});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardNew().pipe(Oe(this.ngUnsubscribe),Rn$1(e=>{e&&N$1.isNotNull(this.service.entity)&&this.service.clear();})):true}cancel(){this.dialogRef.close();}
2ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2),ce(Et),ce(Lb),ce(Mu),ce(A3e),ce(D),ce(_p),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-new-dialog"]],viewQuery:function(i,a){if(i&1&&et($n,5),i&2){let d;q(d=$())&&(a.transformerNumberRef=d.first);}},standalone:false,features:[Ve([wi$2]),Ae],decls:14,vars:9,consts:[["transformerNumberRef",""],["manufacturerDatePick",""],["mat-dialog-title",""],["opptScroller","",3,"keydown.control.enter"],["id","newForm","novalidate","",3,"formGroup","formMetadata"],["align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","button","color","primary",3,"click","disabled"],[1,"oppt-progress-bar-wrapper"],["mode","indeterminate"],[1,"flex-form"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","transformerNumber","required","","type","text","maxLength","50","autocomplete","off"],["matSuffix","","mat-icon-button","","color","primary","aria-label","Calculate next transformer number","matTooltip","Calculate next instrument transformer number","type","button",3,"disabled"],[1,"flex-min-150"],["formControlName","transformerTypeCode"],[3,"value"],["matInput","","formControlName","serialNumber","type","text","maxLength","50","autocomplete","off"],["matInput","","formControlName","catalogNumber","type","text","maxLength","50","autocomplete","off"],["controlName","transformerMfgOrganizationCode",1,"flex-min-150-g10","flex-100p-lt-sm",3,"systemId","limitOrganizationTypeCodes"],["matInput","","formControlName","manufacturerDate","autocomplete","off",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],[1,"flex-100p"],["matInput","","formControlName","transformerMfgOrganizationName","type","text","autocomplete","off"],["matInput","","formControlName","description","type","text","maxLength","200","autocomplete","off"],["formControlName","primaryVoltageCode"],["formControlName","secondaryVoltageCode"],["matInput","","type","number","autocomplete","off","formControlName","kvaRating"],["matInput","","type","number","autocomplete","off","formControlName","impedance"],[1,"flex-min-100"],["matInput","","type","number","autocomplete","off","formControlName","phaseCount"],["matSuffix","","mat-icon-button","","color","primary","aria-label","Calculate next transformer number","matTooltip","Calculate next instrument transformer number","type","button",3,"click","disabled"]],template:function(i,a){i&1&&(w(0,"h2",2),Ee(1,` Create transformer 3`),S(),w(2,"mat-dialog-content",3),he("keydown.control.enter",function(){return a.save()}),be(3,Kn,76,16,"form",4),Fq(4,"async"),S(),w(5,"mat-dialog-actions",5)(6,"button",6),he("click",function(){return a.cancel()}),Ee(7,"Cancel"),S(),w(8,"button",7),Fq(9,"async"),he("click",function(){return a.save()}),Ee(10,"Create"),S()(),w(11,"div",8),be(12,Xn,1,0,"mat-progress-bar",9),Fq(13,"async"),S()),i&2&&(E(3),ye(Bq(4,3,a.showForm)?3:-1),E(5),le("disabled",Bq(9,5,a.cannotSave)),E(4),ye(Bq(13,7,a.busy)?12:-1));},dependencies:[Z_e,t1,dY,W_e,Y_e,_1,eu,mY,os,kL,rZ,FZ,_a,Tu,Tr,ec,hDe,vF,jK,cc,lc,ga$1,wu,Cb,ns,nb,ob,Su,GF,Du,Ml,et$1,W8],encapsulation:2,changeDetection:1});}}return t})();var to=t=>["/transformers",t];function io(t,l){if(t&1){let e=gn$1();w(0,"button",12),he("click",function(){Ct(e);let a=X$1();return wt(a.refresh())}),w(1,"mat-icon",13),Ee(2,"refresh"),S()();}}function ro(t,l){t&1&&(w(0,"div",4),Ce(1,"mat-progress-spinner",14),S());}function no(t,l){if(t&1&&(w(0,"p"),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge$1(e.transformerTypeCode);}}function oo(t,l){if(t&1&&(w(0,"p"),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge$1(e.kvaRating+" kVA");}}function ao(t,l){if(t&1&&(w(0,"mat-card",15)(1,"mat-card-header")(2,"mat-card-title-group")(3,"mat-card-title"),Ee(4),S()()(),w(5,"mat-card-content"),be(6,no,2,1,"p"),be(7,oo,2,1,"p"),S()()),t&2){let e=X$1().$implicit;le("routerLink",Uw(5,to,e.transformerId))("@fadeIn",void 0),E(4),Ge$1(e.transformerNumber),E(2),ye(e.transformerTypeCode?6:-1),E(),ye(e.kvaRating?7:-1);}}function mo(t,l){t&1&&Ce(0,"mat-card",16),t&2&&le("@fadeIn",void 0);}function so(t,l){if(t&1&&be(0,ao,8,7,"mat-card",15)(1,mo,1,1,"mat-card",16),t&2){let i=l.$implicit;ye((i.transformerId===null)?1:0);}}var Ur=(()=>{class t{constructor(e,i,a){this.service=e,this.changeRef=i,this.breakpoints=a,this.ngUnsubscribe=new P$1,this.list=[],this.busy=true,this.bandSize=new Yt$1(0),this.index=new Yt$1(0),this.cannotGoPrevious=this.index.pipe(ue(d=>d<=0),Oe(this.ngUnsubscribe)),this.repopulate=new P$1,this.refresh=()=>{this.service.refresh();},this.populate=d=>{let _=this.bandSize.getValue();this.breakpoints.isMatched(s$1.lg)?_!==5&&(this.bandSize.next(5),this.index.next(0)):this.breakpoints.isMatched(s$1.md)?_!==4&&(this.bandSize.next(4),this.index.next(0)):this.breakpoints.isMatched(s$1.sm)?_!==3&&(this.bandSize.next(3),this.index.next(0)):this.breakpoints.isMatched(s$1.xs)?_!==2&&(this.bandSize.next(2),this.index.next(0)):_!==7&&(this.bandSize.next(7),this.index.next(0));let S=d.length,V=this.index.getValue();V>S&&(this.index.next(0),V=0);let J=V+this.bandSize.getValue();J>S&&(J=S);let L=[];V<=S&&(L=d.slice(V,J));let U=this.bandSize.getValue()-L.length;for(let E=U;E>0;E--){let je=new Y$2;je.transformerNumber="_"+E.toString(),L.push(je);}this.list=L;}
3,this.cannotGoNext=Dn$1([this.service.totalRecords.pipe(Zo$1()),this.bandSize,this.index]).pipe(ue(d=>{let _=d[0],S=d[1];return d[2]+S>=_}),Oe(this.ngUnsubscribe));}goToNextPage(){this.service.busy.getValue()||this.cannotGoNext.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()+this.bandSize.getValue();this.index.next(i),this.repopulate.next(void 0);});}goToPreviousPage(){this.service.busy.getValue()||this.cannotGoPrevious.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()-this.bandSize.getValue();i>=0?(this.index.next(i),this.repopulate.next(void 0)):this.index.getValue()!==0&&(this.index.next(0),this.repopulate.next(void 0));});}ngAfterViewInit(){Dn$1([this.service.recent,this.breakpoints.observe([s$1.xs,s$1.sm,s$1.md,s$1.lg,s$1.xl]).pipe(Nt(null)),this.repopulate.pipe(Nt(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.populate(e[0]);},e=>console.log(e)),this.service.busy.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy!==e&&(this.busy=e);});}trackTransformerBy(e,i){return i.transformerId===null?i.transformerNumber:i.transformerId}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete(),this.bandSize.complete(),this.index.complete(),this.repopulate.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ke),ce(Fe),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-recent-band"]],standalone:false,decls:20,vars:7,consts:[[1,"oppt-band-host"],[1,"flex-row"],[1,"mat-h2","oppt-m0","flex-self-center"],["type","button","mat-icon-button",""],[1,"oppt-refresh-spinner"],[1,"oppt-band"],[1,"oppt-band-cards","flex-fill-gap","flex-row","flex-gap-10",2,"order","2"],[1,"oppt-pager-wrapper",2,"order","1"],["type","button","mat-mini-fab","","color","primary",3,"click","disabled"],["aria-label","Previous transformers"],[1,"oppt-pager-wrapper",2,"order","3"],["aria-label","Next transformers"],["type","button","mat-icon-button","",3,"click"],["aria-label","refresh","color","primary"],["mode","indeterminate","diameter","20","strokeWidth","2"],["appearance","outlined","matTooltip","Go to transformer overview",1,"flex-min-150",3,"routerLink"],["appearance","outlined",1,"flex-min-150","oppt-empty-card"]],template:function(i,a){if(i&1&&(w(0,"div",0)(1,"div",1)(2,"h2",2),Ee(3,"Recent transformers"),S(),be(4,io,3,0,"button",3)(5,ro,2,0,"div",4),S(),w(6,"div",5)(7,"div",6),sa(8,so,2,1,null,null,a.trackTransformerBy,true),S(),w(10,"div",7)(11,"button",8),Fq(12,"async"),he("click",function(){return a.goToPreviousPage()}),w(13,"mat-icon",9),Ee(14,"keyboard_arrow_left"),S()()(),w(15,"div",10)(16,"button",8),Fq(17,"async"),he("click",function(){return a.goToNextPage()}),w(18,"mat-icon",11),Ee(19,"keyboard_arrow_right"),S()()()()()),i&2){E(4),ye((a.busy)===false?4:5),E(4),ca$1(a.list),E(3),le("disabled",Bq(12,3,a.cannotGoPrevious)),E(5),le("disabled",Bq(17,5,a.cannotGoNext));}},dependencies:[zCe,ec,ZCe,e0e,i0e,XCe,JCe,wu,Txe,Ml,fv,W8],encapsulation:2,data:{animation:[x]},changeDetection:1});}}return t})();var Ii=class{constructor(){this.transformerStatusCode=null,this.transformerCount=0;}};var wi=(()=>{class t{constructor(e,i){this.service=e,this.session=i,this.ngUnsubscribe=new P$1,this.systemId=0,this.statuses=new Yt$1([]),this.totalRecords=new Yt$1(0),this.busy=new Yt$1(false),this.refresh=()=>{this.systemId=this.session.systemId,this.statuses.next([]),this.totalRecords.next(0),this.busy.next(true),this.service.getStatusOverview(this.systemId).subscribe(a=>{this.statuses.next(a),this.totalRecords.next(a.length),this.busy.next(false);},a=>{console.log(a),this.busy.next(false);});},this.session.systemIdObserver.pipe(Oe(this.ngUnsubscribe)).subscribe(a=>this.refresh());}ngOnDestroy(){this.statuses.complete(),this.busy.complete(),this.totalRecords.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(pe(K$1),pe(Lb))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();function co(t,l){if(t&1){let e=gn$1();w(0,"button",12),he("click",function(){Ct(e);let a=X$1();return wt(a.refresh())}),w(1,"mat-icon",13),Ee(2,"refresh"),S()();}}function fo(t,l){t&1&&(w(0,"div",4),Ce(1,"mat-progress-spinner",14),S());}function uo(t,l){if(t&1){let e=gn$1();w(0,"mat-card",17),he("click",function(){Ct(e);let a=X$1().$implicit,d=X$1();return wt(d.search(a))}),w(1,"mat-icon",18),Ee(2,"search"),S(),w(3,"mat-card-header")(4,"mat-card-title-group",19)(5,"mat-card-title",20),Ee(6),Fq(7,"number"),S()()(),Ce(8,"div",21),w(9,"mat-card-content",22)(10,"p"),Ee(11),S()()();}if(t&2){let e=X$1().$implicit;le("@fadeIn",void 0)("matTooltip","Search for "+e.transformerStatusCode+" transformers"),E(6),Ge$1(Vq(7,4,e.transformerCount,"1.0")),E(5),Ge$1(e.transformerStatusCode);}}function ho(t,l){t&1&&Ce(0,"mat-card",16),t&2&&le("@fadeIn",void 0);}function vo(t,l){if(t&1&&be(0,uo,12,7,"mat-card",15)(1,ho,1,1,"mat-card",16),t&2){let i=l.$implicit;ye((i.transformerStatusCode===null)?1:0);}}var Pr=(()=>{class t{constructor(e,i,a,d,_){this.service=e,this.session=i,this.lookup=a,this.changeRef=d,this.breakpoints=_,this.ngUnsubscribe=new P$1,this.advancedSearch=new B,this.list=[],this.busy=true,this.bandSize=new Yt$1(0),this.index=new Yt$1(0),this.cannotGoPrevious=this.index.pipe(ue(S=>S<=0),Oe(this.ngUnsubscribe)),this.repopulate=new P$1,this.refresh=()=>{this.service.refresh();},this.populate=S=>{let V=this.bandSize.getValue();this.breakpoints.isMatched(s$1.lg)?V!==5&&(this.bandSize.next(5),this.index.next(0)):this.breakpoints.isMatched(s$1.md)?V!==4&&(this.bandSize.next(4),this.index.next(0)):this.breakpoints.isMatched(s$1.sm)?V!==3&&(this.bandSize.next(3),this.index.next(0)):this.breakpoints.isMatched(s$1.xs)?V!==2&&(this.bandSize.next(2),this.index.next(0)):V!==7&&(this.bandSize.next(7),this.index.next(0));let J=S.length,L=this.index.getValue();L>J&&(this.index.next(0),L=0);let U=L+this.bandSize.getValue();U>J&&(U=J);let E=[];
3L<=J&&(E=S.slice(L,U));let je=this.bandSize.getValue()-E.length;for(let rt=je;rt>0;rt--){let ae=new Ii;ae.transformerCount=rt,E.push(ae);}this.list=E;},this.cannotGoNext=Dn$1([this.service.totalRecords.pipe(Zo$1()),this.bandSize,this.index]).pipe(ue(S=>{let V=S[0],J=S[1];return S[2]+J>=V}),Oe(this.ngUnsubscribe));}search(e){this.lookup.systemObserver.pipe(Be(1)).subscribe(i=>{let a=new Be$1;a.systemId=i.systemId,a.transformerStatusCodes=[e.transformerStatusCode],this.advancedSearch.emit(a);});}goToNextPage(){this.service.busy.getValue()||this.cannotGoNext.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()+this.bandSize.getValue();this.index.next(i),this.repopulate.next(void 0);});}goToPreviousPage(){this.service.busy.getValue()||this.cannotGoPrevious.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()-this.bandSize.getValue();i>=0?(this.index.next(i),this.repopulate.next(void 0)):this.index.getValue()!==0&&(this.index.next(0),this.repopulate.next(void 0));});}ngAfterViewInit(){Dn$1([this.service.statuses,this.breakpoints.observe([s$1.xs,s$1.sm,s$1.md,s$1.lg,s$1.xl]).pipe(Nt(null)),this.repopulate.pipe(Nt(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.populate(e[0]);},e=>console.log(e)),this.service.busy.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy!==e&&(this.busy=e);});}trackStatusBy(e,i){return i.transformerStatusCode===null?i.transformerCount:i.transformerStatusCode}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete(),this.bandSize.complete(),this.index.complete(),this.repopulate.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi),ce(Lb),ce(A3e),ce(Fe),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-status-band"]],outputs:{advancedSearch:"advancedSearch"},standalone:false,decls:20,vars:7,consts:[[1,"oppt-band-host"],[1,"flex-row"],[1,"mat-h2","oppt-m0","flex-self-center"],["type","button","mat-icon-button",""],[1,"oppt-refresh-spinner"],[1,"oppt-band"],[1,"oppt-band-cards","flex-fill-gap","flex-row","flex-gap-10",2,"order","2"],[1,"oppt-pager-wrapper",2,"order","1"],["type","button","mat-mini-fab","","color","primary",3,"click","disabled"],["aria-label","Previous statuses"],[1,"oppt-pager-wrapper",2,"order","3"],["aria-label","Next statuses"],["type","button","mat-icon-button","",3,"click"],["aria-label","refresh","color","primary"],["mode","indeterminate","diameter","20","strokeWidth","2"],["appearance","outlined",1,"flex-min-150",3,"matTooltip"],["appearance","outlined",1,"flex-min-150","oppt-empty-card"],["appearance","outlined",1,"flex-min-150",3,"click","matTooltip"],[1,"oppt-card-background-icon"],[1,"flex-justify-end"],[1,"mat-headline-3","oppt-m0"],[1,"flex-fill-gap"],[1,"flex-row","flex-justify-end"]],template:function(i,a){if(i&1&&(w(0,"div",0)(1,"div",1)(2,"h2",2),Ee(3,"Transformer status"),S(),be(4,co,3,0,"button",3)(5,fo,2,0,"div",4),S(),w(6,"div",5)(7,"div",6),sa(8,vo,2,1,null,null,a.trackStatusBy,true),S(),w(10,"div",7)(11,"button",8),Fq(12,"async"),he("click",function(){return a.goToPreviousPage()}),w(13,"mat-icon",9),Ee(14,"keyboard_arrow_left"),S()()(),w(15,"div",10)(16,"button",8),Fq(17,"async"),he("click",function(){return a.goToNextPage()}),w(18,"mat-icon",11),Ee(19,"keyboard_arrow_right"),S()()()()()),i&2){E(4),ye((a.busy)===false?4:5),E(4),ca$1(a.list),E(3),le("disabled",Bq(12,3,a.cannotGoPrevious)),E(5),le("disabled",Bq(17,5,a.cannotGoNext));}},dependencies:[zCe,ec,ZCe,e0e,i0e,XCe,JCe,wu,Txe,Ml,W8,X8],encapsulation:2,data:{animation:[x]},changeDetection:1});}}return t})();var go=(t,l)=>l.componentId;function bo(t,l){if(t&1){let e=gn$1();w(0,"button",7),he("click",function(){Ct(e);let a=X$1().$implicit,d=X$1(2);return wt(d.routeTo(a))}),Ee(1),S();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(),Zn(" ",e.name," ");}}function xo(t,l){if(t&1&&(w(0,"a",6),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn(" ",e.name," ");}}function _o(t,l){if(t&1&&be(0,bo,2,2,"button",5)(1,xo,2,3,"a",6),t&2){let i=l.$implicit;ye((i.uri===null)?0:1);}}function yo(t,l){if(t&1&&(w(0,"mat-card",0)(1,"mat-card-header",1)(2,"mat-card-title"),Ee(3,"Links"),S(),Ce(4,"div",2),w(5,"mat-icon"),Ee(6,"link"),S()(),w(7,"mat-card-content",3),Ce(8,"div",4),sa(9,_o,2,1,null,null,go),S()()),t&2){let e=X$1();E(9),ca$1(e.components);}}var zr=(()=>{class t{constructor(e,i,a,d,_){this.session=e,this.router=i,this.route=a,this.lookup=d,this.changeRef=_,this.ngUnsubscribe=new P$1,this.components=[],this.anyLinks=false;}ngAfterViewInit(){this.lookup.availableComponentsObserver.pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.components=e.filter(i=>i.componentLocationCode==="transformerdashboard"),this.components.length>0&&(this.anyLinks=true);});}routeTo(e){this.router.navigate([`/${e.route}`]);}trackComponentBy(e,i){return i?i.componentId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Lb),ce(Ki),ce(ko$1),ce(A3e),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformers-links-card"]],standalone:false,decls:1,vars:1,consts:[["appearance","outlined",1,"oppt-job-trans-card"],[1,"oppt-primary-background","oppt-pb5"],[1,"flex-fill-gap"],[1,"flex-column"],[1,"oppt-mb5"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"disabled"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"href","target"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"click","disabled"]],template:function(i,a){i&1&&be(0,yo,11,0,"mat-card",0),i&2&&ye(a.anyLinks?0:-1);},dependencies:[Tr,ZCe,e0e,i0e,XCe,wu],styles:[".mat-mdc-card-content[_ngcontent-%COMP%]{height:180px;overflow-y:auto;padding:0 8px}"],data:{animation:[x]},changeDetection:1});}}return t})();var Hr=t=>({"oppt-hide":t});function wo(t,l){if(t&1){let e=gn$1();em$1(0,1),w(1,"button",14),he("click",function(){Ct(e);let a=X$1();return wt(a.modeChanged({value:"dashboard"}))}),w(2,"mat-icon"),Ee(3,"arrow_back"),S()(),w(4,"div",15)(5,"h4",16),Ee(6,"Transformers"),S(),w(7,"h5",16),Ee(8),S()(),tm$1();}if(t&2){let e=X$1();E(8),Ge$1(e.searchService.resultsText);}}function Do(t,l){if(t&1){let e=gn$1();em$1(0,1),w(1,"button",17),he("click",function(){Ct(e);let a=X$1();return wt(a.cradle.toggleLeftNav())}),w(2,"mat-icon"),Ee(3,"menu"),S()(),w(4,"h3",16),Ee(5,"Transformers"),S(),tm$1();}}function Mo(t,l){t&1&&(w(0,"div",4)(1,"div",18)(2,"div",19)(3,"div",20)(4,"h1",21),Ee(5,"Transformers"),S()()()()());}function ko(t,l){if(t&1){let e=gn$1();w(0,"button",22),he("click",function(){Ct(e);let a=X$1();return wt(a.add())}),w(1,"mat-icon"),Ee(2,"add"),S()();}}function Eo(t,l){t&1&&Ce(0,"oppt-not-found-state",8);}var $r=(()=>{class t{get mode(){return this.cache.retrieveInMemory("transformerDashboardMode","dashboard")}set mode(e){this.cache.stashInMemory("transformerDashboardMode",e);}constructor(e,i,a,d,_,S,V,J,L){this.searchService=e,this.cradle=i,this.session=a,this.dialog=d,this.changeRef=_,this.router=S,this.matDialog=V,this.breakpoints=J,this.cache=L,this.ngUnsubscribe=new P$1,this.busy=true,this.showNotFoundState=false,this.showList=false,this.showGraphs=false,this.canCreate=false,this.responsiveDesign=()=>this.breakpoints.isMatched(s$1.ltMd)?this.showGraphs?(this.showGraphs=false,true):false:this.showGraphs?false:(this.showGraphs=true,true),this.setState=(U,E)=>{if(this.busy=U,U||this.searchService.criteria===null){this.showNotFoundState&&(this.showNotFoundState=false),this.showList&&(this.showList=false);return}E?(this.showList||(this.showList=true),this.showNotFoundState&&(this.showNotFoundState=false)):(this.showList&&(this.showList=false),this.showNotFoundState||(this.showNotFoundState=true));},this.advancedSearch=U=>{this.searchService.advancedCriteria=U;let E=this.searchService.getCriteriaFromAdvancedCriteria(U);E.systemId=this.session.systemId,E.pageIndex=0,E.pageSize=this.session.pageSize,this.search.opptSearchText=E.defaultSearch,this.table.orderBy=E.orderBy,this.table.pageSize=E.pageSize,this.table.pageIndex=E.pageIndex,this.searchService.criteria=E,this.mode="list",this.changeRef.detectChanges();},this.setCriteria=(U=false)=>{let E=this.getCriteria();return U?(this.searchService.criteria=E,true):(N$1.isShallowEqual(E,this.searchService.criteria)||(this.searchService.criteria=E),true)},this.getCriteria=()=>{let U=this.cache.retrieveInMemory("transformerDashboardAdvancedCriteria",null);N$1.isNotNull(U)&&(this.searchService.advancedCriteria=U,this.cache.clearInMemory("transformerDashboardAdvancedCriteria"),this.search.opptSearchText=U.defaultSearch,this.table.orderBy=U.orderBy,this.table.pageSize=U.pageSize,this.table.pageIndex=U.pageIndex);let E=null;return N$1.isNotNull(this.searchService.advancedCriteria)?E=this.searchService.getCriteriaFromAdvancedCriteria(this.searchService.advancedCriteria):E=new v,E.defaultSearch=this.search.opptSearchText,E.systemId=this.session.systemId,E.orderBy=this.table.orderBy,E.pageSize=this.table.pageSize,E.pageIndex=this.table.pageIndex,E},this.responsiveDesign();}ngAfterViewInit(){this.searchService.metadata().pipe(od(0),Be(1)).subscribe(e=>{this.meta=e,N$1.isNotNull(this.searchService.criteria)&&(this.search.opptSearchText=this.searchService.criteria.defaultSearch,this.table.orderBy=this.searchService.criteria.orderBy,this.table.pageSize=this.searchService.criteria.pageSize,this.table.pageIndex=this.searchService.criteria.pageIndex);let i=this.cache.retrieveInMemory("transformerDashboardAdvancedCriteria",null);N$1.isNotNull(i)&&this.setCriteria(true);}),this.session.systemIdObserver.pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(e=>
3{this.canCreate=this.session.claimCheck(hc.TransformerEdit,e),this.searchService.criteria&&this.searchService.criteria.systemId!==e&&(this.table.pageIndex=0,this.searchService.advancedCriteria=this.getAdvancedCriteriaFromSimpleSearch(),this.setCriteria(true));}),this.search.opptSearchTextChange.pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.table.pageIndex=0,this.searchService.advancedCriteria=this.getAdvancedCriteriaFromSimpleSearch(),this.setCriteria(true),this.mode="list",this.changeRef.detectChanges();}),this.table.sortChanged.pipe(zn$1(200),Oe(this.ngUnsubscribe)).subscribe(e=>{this.mode==="list"&&(this.table.pageIndex=0,this.setCriteria());}),this.table.pageChanged.pipe(zn$1(200),Oe(this.ngUnsubscribe)).subscribe(e=>{this.mode==="list"&&this.setCriteria();}),Dn$1([this.searchService.busy,this.searchService.anyResults]).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.setState(e[0],e[1]);}),this.searchService.busy.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy=e,this.changeRef.detectChanges();}),this.breakpoints.observe([s$1.ltMd]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.responsiveDesign()&&this.changeRef.detectChanges();});}showAdvancedSearch(){this.dialog.open(jr,{width:"100%",maxWidth:"800px",position:{right:"5px",top:"5px"}}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1)).subscribe(i=>{N$1.isNull(i)||this.advancedSearch(i);});}getAdvancedCriteriaFromSimpleSearch(){let e=new Be$1;return e.defaultSearch=this.search.opptSearchText,e.systemId=this.session.systemId,e}goToList(){this.mode="list",this.searchService.criteria===null&&this.setCriteria();}modeChanged(e){this.mode=e.value,e.value==="list"&&this.goToList();}add(){this.matDialog.open(Ar,{maxWidth:"800px",minWidth:"300px",width:"70vw"}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1)).subscribe(i=>{N$1.isNotNullOrEmpty(i)&&this.router.navigate(["/transformers",i]);},i=>{console.log(i);});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Bt),ce(k$1),ce(Lb),ce(vp),ce(Fe),ce(Ki),ce(vp),ce(kl),ce(Pb))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-dashboard"]],viewQuery:function(i,a){if(i&1&&et(gi,5)(_Z,5),i&2){let d;q(d=$())&&(a.table=d.first),q(d=$())&&(a.search=d.first);}},standalone:false,decls:21,vars:17,consts:[["opptToolbarColor","primary","opptBackground","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft",""],["opptToolbarRight","",1,"flex-row"],["placeholder","Search transformers",3,"opptMoreClick","opptMore"],[1,"oppt-heading","oppt-primary"],["opptBottomRightFab","",1,"flex-row","flex-gap-10","flex-place-center-start"],["mat-fab","","color","accent","aria-label","Create a new transformer","type","button","matTooltip","Create a new transformer"],[3,"opptShow"],["titleCaption","No transformers found for this search"],[3,"advancedSearch"],[1,"oppt-widgets-section","flex-row","flex-wrap"],[1,"flex-pad-64"],[1,"flex-max-330","flex-100p-lt-sm"],[1,"oppt-fab-space"],["mat-icon-button","","type","button","matTooltip","Go to dashboard",3,"click"],[1,"flex-column","oppt-heading-wrapper"],[1,"oppt-white-color"],["mat-icon-button","","type","menu",3,"click"],[1,"oppt-heading-section-host","flex-row"],[1,"oppt-heading-section","flex-auto","flex-column","flex-place-start-end"],[1,"oppt-heading-wrapper"],[1,"mat-h1"],["mat-fab","","color","accent","aria-label","Create a new transformer","type","button","matTooltip","Create a new transformer",3,"click"]],template:function(i,a){if(i&1&&(w(0,"oppt-section",0),be(1,wo,9,1,"ng-container",1)(2,Do,6,0,"ng-container",1),w(3,"div",2)(4,"oppt-toolbar-search",3),he("opptMoreClick",function(){return a.showAdvancedSearch()}),S()(),be(5,Mo,6,0,"div",4),w(6,"div",5),be(7,ko,3,0,"button",6),S(),w(8,"div")(9,"div"),Ce(10,"oppt-transformer-table",7),be(11,Eo,1,0,"oppt-not-found-state",8),S(),w(12,"div"),Ce(13,"oppt-transformer-recent-band"),w(14,"oppt-transformer-status-band",9),he("advancedSearch",function(_){return a.advancedSearch(_)}),S(),w(15,"div",10),Ce(16,"div",11),w(17,"div",12),Ce(18,"oppt-transformers-links-card"),S(),Ce(19,"div",11),S(),Ce(20,"div",13),S()()()),i&2){le("opptBusy",a.busy)("opptMaxWidth",2e3)("opptNoScrollNoB
3order",true),E(),ye((a.mode)==="list"?1:2),E(3),le("opptMore",true),E(),ye(a.mode!=="list"?5:-1),E(2),ye(a.canCreate?7:-1),E(2),Lt(Uw(13,Hr,a.mode!=="list")),E(),le("opptShow",a.showList),E(),ye(a.showNotFoundState?11:-1),E(),Lt(Uw(15,Hr,a.mode==="list"));}},dependencies:[xZ,_Z,hZ,ec,jCe,wu,Ml,gi,Ur,Pr,zr],encapsulation:2,changeDetection:1});}}return t})();var qr=(()=>{class t{constructor(e,i,a,d,_){this.transformer=e,this.service=i,this.session=a,this.router=d,this.route=_,this.ngUnsubscribe=new P$1,this.onBeforeChangeSystemId=S=>{if(!this.transformer||this.transformer.loading.getValue())return;let V=this.transformer.entity;if(!(V!==null&&V.systemId===S.newSystemId)){if(this.transformer.busy.getValue()){S.cancel("Busy, please wait");return}this.service.pendingUpdates&&S.cancel("Busy, please wait");}},_.params.pipe(Oe(this.ngUnsubscribe),Zo$1((S,V)=>N$1.isSimilar(S.transformerId,V.transformerId)),Dt(S=>e.resolve(S.transformerId)),ue(S=>{if(!this.session.setSystemId(S.systemId))throw new Error("system change not available");return S}),Oe(this.ngUnsubscribe)).subscribe(S=>{},S=>{console.log(S),this.router.navigate(["/transformers"]);}),this.session.systemIdObserver.pipe(Se(S=>N$1.isNotNull(e.entity)&&S!==e.entity.systemId),Oe(this.ngUnsubscribe)).subscribe(S=>{this.router.navigate(["/transformers"]);}
3),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(Et),ce(Lb),ce(Ki),ce(ko$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer"]],standalone:false,features:[Ve([ci$1,We,Xe])],decls:1,vars:0,consts:[[1,"oppt-host"]],template:function(i,a){i&1&&Ce(0,"router-outlet",0);},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();var No=()=>["Disposal vendor"];function Fo(t,l){if(t&1&&(w(0,"form",6)(1,"div",10)(2,"oppt-form-field",11)(3,"mat-form-field"),Ce(4,"mat-label")(5,"input",12),N4(),Ce(6,"mat-datepicker-toggle",13)(7,"mat-datepicker",14,0),S()(),Ce(9,"oppt-organization-picker",15),w(10,"oppt-form-field",11)(11,"mat-form-field"),Ce(12,"mat-label")(13,"input",16),N4(),S()(),w(14,"oppt-form-field",11)(15,"mat-form-field"),Ce(16,"mat-label")(17,"textarea",17,1),N4(),w(19,"mat-hint",7),Ee(20),S()()()()()),t&2){let e=vn$1(8),i=vn$1(18),a=X$1();le("formGroup",a.form)("formMetadata",a.meta),E(5),le("min",a.minDate)("max",a.maxDate)("matDatepicker",e),F4(),E(),le("for",e),E(3),le("systemId",a.entity==null?null:a.entity.systemId)("limitOrganizationTypeCodes",Rq(9,No)),E(4),F4(),E(4),F4(),E(3),Zn("",i.value.length," / 200");}}var Qr=(()=>{class t extends e$1{constructor(e,i,a,d){super(e),this.session=i,this.dialogRef=a,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate,this.title="Dispose",this.cancelCaption="Cancel",this.saveCaption="Dispose",this.initialize=()=>{if(N$1.isNull(this.transformer))return this.dialogRef.close(),An;let _=this.service.getNewEntity();return _.systemId=this.transformer.systemId,_.transformerId=this.transformer.transformerId,_.transformerNumber=this.transformer.transformerNumber,_.disposalOrganizationCode=this.transformer.disposalOrganizationCode,_.disposalOrganizationId=this.transformer.disposalOrganizationId,_.disposalOrganizationName=this.transformer.disposalOrganizationName,_.entityAction="Create",this.service.resolveByEntity(_,["statusDescription","disposalDate","disposalOrganizationId","disposalOrganizationCode","disposalOrganizationName"])},this.onBeforeChangeSystemId=_=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){_.cancel("Busy, please wait");return}this.service.form.dirty&&_.cancel("Unsaved changes");}},this.service.informationFieldsDisabled=false,this.transformer=d.transformer;}ngAfterViewInit(){this.initialize().pipe(ue(e=>{if(!this.session.setSystemId(e.systemId))throw new Error("system change not available");return e})).subscribe(e=>{},e=>{console.log(e),this.dialogRef.close();}),this.session.systemIdObserver.pipe(Se(e=>N$1.isNotNull(this.service.entity)&&e!==this.service.entity.systemId),Oe(this.ngUnsubscribe)).subscribe(e=>{this.dialogRef.close();}
3),this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}done(){this.service.cannotSave.subscribe(e=>{if(e===false){let i=new $e;i.transformerId=this.service.entity.transformerId,i.disposalDate=this.meta.getValueOrDefault("disposalDate"),i.disposalOrganizationId=this.form.get("disposalOrganizationId").value,i.statusDescription=this.form.get("statusDescription").value,this.dialogRef.close(i);}});}cancel(){this.dialogRef.close();}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2),ce(Lb),ce(_p),ce(Lo$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-dispose-dialog"]],standalone:false,features:[Ve([wi$2]),Ae],decls:14,vars:7,consts:[["disposalDatePick",""],["statusTextarea",""],["mat-dialog-title",""],[1,"mat-h1"],[1,"mat-typography","oppt-grey-color"],["opptScroller","",3,"keydown.control.enter"],["id","statusForm","novalidate","",3,"formGroup","formMetadata"],["align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","button","color","primary",3,"click","disabled"],[1,"flex-form"],[1,"flex-100p"],["matInput","","formControlName","disposalDate","required","","autocomplete","off",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],["controlName","disposalOrganizationCode",1,"flex-100p",3,"systemId","limitOrganizationTypeCodes"],["matInput","","formControlName","disposalOrganizationName","type","text","autocomplete","off"],["matInput","","formControlName","statusDescription","type","text","maxLength","200","autocomplete","off"]],template:function(i,a){i&1&&(w(0,"div",2)(1,"h1",3),Ee(2),S(),w(3,"p",4),Ee(4,"Dispose this transformer?"),S()(),w(5,"mat-dialog-content",5),he("keydown.control.enter",function(){return a.done()}),be(6,Fo,21,10,"form",6),Fq(7,"async"),S(),w(8,"mat-dialog-actions",7)(9,"button",8),he("click",function(){return a.cancel()}),Ee(10,"Cancel"),S(),w(11,"button",9),Fq(12,"async"),he("click",function(){return a.done()}),Ee(13,"Dispose"),S()()),i&2&&(E(2),Ge$1(a.title),E(4),ye(Bq(7,3,a.showForm)?6:-1),E(5),le("disabled",Bq(12,5,a.cannotSave)));},dependencies:[Z_e,t1,W_e,Y_e,_1,eu,mY,os,kL,rZ,FZ,_a,Tu,Tr,hDe,vF,jK,cc,lc,ga$1,Cb,ns,nb,mu,ob,et$1,W8],encapsulation:2,changeDetection:1});}}return t})();function Oo(t,l){t&1&&(w(0,"mat-icon",3),Ee(1,"block"),S());}function Ro(t,l){t&1&&(w(0,"mat-icon",3),Ee(1,"delete_forever"),S());}function Bo(t,l){if(t&1&&(w(0,"h4",6),Ee(1),S()),t&2){let e=X$1();E(),Ge$1(e.entity?.lastStatusDate);}}function Vo(t,l){if(t&1&&(w(0,"button",8)(1,"mat-icon"),Ee(2,"more_vert"),S()()),t&2){X$1();let e=vn$1(13);le("matMenuTriggerFor",e);}}function jo(t,l){if(t&1){let e=gn$1();w(0,"button",13),he("click",function(){Ct(e);let a=X$1();return wt(a.changeStatus(a.transformer.workflowStep.nextStep1Description))}),Ee(1),S();}if(t&2){let e=X$1();E(),Zn(" ",e.transformer.workflowStep.nextStep1Description," ");}}function Lo(t,l){if(t&1){let e=gn$1();w(0,"button",13),he("click",function(){Ct(e);let a=X$1();return wt(a.changeStatus(a.transformer.workflowStep.nextStep2Description))}),Ee(1),S();}if(t&2){let e=X$1();E(),Zn(" ",e.transformer.workflowStep.nextStep2Description," ");}}function Ao(t,l){if(t&1){let e=gn$1();w(0,"button",13),he("click",function(){Ct(e);let a=X$1();return wt(a.changeStatus(a.transformer.workflowStep.nextStep3Description))}),Ee(1),S();}if(t&2){let e=X$1();E(),Zn(" ",e.transformer.workflowStep.nextStep3Description," ");}}function Uo(t,l){if(t&1){let e=gn$1();w(0,"button",13),he("click",function(){Ct(e);let a=X$1();return wt(a.changeStatus(a.transformer.workflowStep.previousStepDescription))}),Ee(1),S();}if(t&2){let e=X$1();E(),Zn(" ",e.transformer.workflowStep.previousStepDescription," ");}}function Po(t,l){if(t&1&&(w(0,"mat-card-content",11)(1,"p",6),Ee(2),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity?.statusDescription);}}function zo(t,l){if(t&1){let e=gn$1();w(0,"mat-card-actions",12)(1,"button",14),he("click",function(){Ct(e);let a=X$1();return wt(a.changeStatus(a.transformer.workflowStep==null?null:a.transformer.workflowStep.nextStep1Description))}),Ee(2),S()();}if(t&2){let e=X$1();E(2),Ge$1(e.transformer.workflowStep?.nextStep1Description);}}var Wr=(()=>{class t{constructor(e,i,a,d,_,S,V,J,L,U){this.router=e,this.recent=i,this.changeRef=a,this.transformer=d,this.service=_,this.matDialog=S,this.errorHandler=V,this.dialog=J,this.session=L,this.documentationService=U,this.ngUnsubscribe=new P$1,this.entity=null,this.canEdit=false;}changeStatus(e){if(!(this.service.pendingUpdates.getValue()||this.transformer.busy.getValue())&&!N$1.isNull(this.transformer.entity)&&this.session.claimCheck(hc.TransformerE
3dit,this.entity.systemId))switch(e){case "Install":this.addTransformerAction("Install");break;case "Remove":this.addTransformerAction("Removal");break;case "Decommission":this.addTransformerAction("Decommission");break;case "Recommission":this.recommission();break;case "Dispose":this.dispose();break;case "Undo dispose":this.undoDispose();break;case "Delete":this.delete();break}}delete(){this.session.claimCheck(hc.TransformerEdit,this.entity.systemId)&&this.dialog.Confirm("Delete transformer?",null,"Delete","Cancel").pipe(Dt(e=>{if(!e)return An;let i=new xt;return i.transformerId=this.transformer.entity.transformerId,this.service.delete(i)})).subscribe(e=>{e.resultType!=="Failure"&&(this.recent.removeRecent(this.transformer.entity),this.errorHandler.showMessage("Transformer deleted"),this.router.navigate(["/transformers"]));},e=>{console.log(e);});}dispose(){if(this.transformer.entity.transformerStatusCode!=="Decommissioned")return;this.matDialog.open(Qr,{maxWidth:"800px",minWidth:"300px",width:"70vw",data:{transformer:this.transformer.entity}}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1),Dt(i=>N$1.isNull(i)?An:this.service.dispose(i,"Disposed")),Dt(i=>i.resultType==="Failure"?An:this.transformer.refresh())).subscribe(i=>{},i=>{console.log(i);});}undoDispose(){this.transformer.entity.transformerStatusCode==="Disposed"&&this.dialog.Confirm("Undo transformer dispose?",null,"Undo dispose","Cancel").pipe(Dt(e=>{if(!e)return An;let i=new He;return i.transformerId=this.transformer.entity.transformerId,this.service.undoDispose(i,"Disposal undone")}),Dt(e=>e.resultType==="Failure"?An:this.transformer.refresh())).subscribe(e=>{},e=>{console.log(e);});}recommission(){this.transformer.entity.transformerStatusCode==="Decommissioned"&&this.dialog.Confirm("Recommission transformer?",null,"Recommission","Cancel").pipe(Dt(e=>{if(!e)return An;let i=new He;return i.transformerId=this.transformer.entity.transformerId,this.service.recommission(i,"Recommissioned")}),Dt(e=>e.resultType==="Failure"?An:this.transformer.refresh())).subscribe(e=>{},e=>{console.log(e);});}addTransformerAction(e){if(!this.session.claimCheck(hc.TransformerEdit,this.entity.systemId)||!this.transformer.entity.canEditActions)return;this.matDialog.open(wi$1,{width:"100%",maxWidth:"800px",data:{transformer:this.transformer.entity,transformerActionCode:e}}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1),Dt(a=>N$1.isNullOrEmpty(a)?An:this.transformer.refresh())).subscribe(a=>{},a=>{console.log(a);});}showDocumentation(){return this.documentationService.tryDownloadAndOpen("client_transformer_overview")}ngAfterViewInit(){this.transformer.entityChanges.pipe(Se(N$1.isNotNull),zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.entity=e,!this.entity||!this.session.claimCheck(hc.TransformerEdit,this.entity.systemId)?this.canEdit=false:this.canEdit=true;});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(Ke),ce(Fe),ce(ci$1),ce(Et),ce(vp),ce(Au),ce(Mu),ce(Lb),ce(v$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-status-card"]],standalone:false,decls:20,vars:10,consts:[["moreMenu","matMenu"],[1,"oppt-card"],[1,"oppt-icon-container"],[1,"oppt-icon"],[1,"flex-row"],[1,"oppt-primary-color"],[1,"oppt-dark-grey-color"],[1,"flex-fill-gap"],["mat-icon-button","","type","button","type","menu",1,"oppt-status-menu-button",3,"matMenuTriggerFor"],["yPosition","below"],["type","button","mat-menu-item",""],[1,"oppt-card-content"],["align","end"],["type","button","mat-menu-item","",3,"click"],["mat-stroked-button","","color","primary","type","button",3,"click"]],template:function(i,a){if(i&1&&(w(0,"mat-card",1)(1,"div",2),be(2,Oo,2,0,"mat-icon",3)(3,Ro,2,0,"mat-icon",3),S(),w(4,"mat-card-header",4)(5,"div")(6,"h2",5),Ee(7),S(),be(8,Bo,2,1,"h4",6),S(),Ce(9,"div",7),w(10,"div"),be(11,Vo,3,1,"button",8),w(12,"mat-menu",9,0),be(14,jo,2,1,"button",10),be(15,Lo,2,1,"button",10),be(16,Ao,2,1,"button",10),be(17,Uo,2,1,"button",10),S()()(),be(18,Po,3,1,"mat-card-content",11),be(19,zo,3,1,"mat-card-actions",12),S()),i&2){let d;E(2),ye((d=a.entity?.transformerStatusCode)==="Decommissioned"?2:d==="Disposed"?3:-1),E(5),Ge$1(a.entity?.transformerStatusCode),E(),ye(a.entity?.lastStatusDate?8:-1),E(3),ye(a.canEdit?11:-1),E(3),ye(a.transformer.workflowStep?.nextStep1Description?14:-1),E(),ye(a.transformer.workflowStep?.nextStep2Description?15:-1),E(),ye(a.transformer.workflowStep?.nextStep3Description?16:-1),E(),ye(a.transformer.workflowStep?.previousStepDescription?17:-1),E(),ye(a.entity?.statusDescription?18:-1),E(),ye(a.transformer.workflowStep?.nextStep1Description&&a.canEdit?19:-1);}},dependencies:[Tr,ec,ZCe,n0e,e0e,i0e,wu,Eb,DS,Oke],styles:[".oppt-card[_ngcontent-%COMP%]{margin:4px;min-height:80px}.oppt-icon-container[_ngcontent-%COMP%]{position:relative;height:0}.oppt-icon[_ngcontent-%COMP%]{font-size:500%;height:auto;width:auto;position:absolute;color:#ff91004d;right:40px}"],changeDetection:1});}}return t})();var Go=t=>["/transformers",t,"attributes"];function $o(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.transformerMfgOrganizationName),E(2),Ge$1(e.meta.getCaption("transformerMfgOrganizationName"));}}function qo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.disposalOrganizationName),E(2),Ge$1(e.meta.getCaption("disposalOrganizationName"));}}function Qo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.serialNumber),E(2),Ge$1(e.meta.getCaption("serialNumber"));}}function Wo(t,l){if(t&1){let e=gn$1();w(0,"div",2)(1,"button",8),he("click",function(){Ct(e);let a=X$1();return wt(a.copyFeatureId())}),Ee(2),w(3,"mat-icon",5),Ee(4,"bookmarks"),S()(),w(5,"p",7),Ee(6),S()();}if(t&2){let e=X$1();E(2),Zn(" ",e.entity?.stationNumber," "),E(4),Ge$1(e.meta.getCaption("stationNumber"));}}function Yo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.stationNumber),E(2),Ge$1(e.meta.getCaption("stationNumber"));}}function Jo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.addressLine1),E(2),Ge$1(e.meta.getCaption("addressLine1"));}}function Ko(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.description),E(2),Ge$1(e.meta.getCaption("description"));}}function Xo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.position),E(2),Ge$1(e.meta.getCaption("position"));}}function Zo(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.phase),E(2),Ge$1(e.meta.getCaption("phase"));}}function ea(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.kvaRating),E(2),Ge$1(e.meta.getCaption("kvaRating"));}}function ta(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.primaryVoltageCode),E(2),Ge$1(e.meta.getCaption("primaryVoltageCode"));}}function ia(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.secondaryVoltageCode),E(2),Ge$1(e.meta.getCaption("secondaryVoltageCode"));}}function ra(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.lastInstallDate),E(2),Ge$1(e.meta.getCaption("lastInstallDate"));}}function na(t,l){if(t&1&&(w(0,"div",2)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity.lastRemovalDate),E(2),Ge$1(e.meta.getCaption("lastRemovalDate"));}}var Yr=(()=>{class t{get entity(){return this.service.entity}get meta(){return this.service.meta}get transformerId(){return Ob.getParam(this.route,"transformerId")}copyFeatureId(){if(N$1.isNullOrEmpty(this.entity.featureId)){this.errorHandler.showMessage("No feature available");return}Ob.copyToClipboard(this.entity.featureId),this.errorHandler.showMessage("Copied to clipboard");}constructor(e,i,a){this.service=e,this.route=i,this.errorHandler=a;}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(ko$1),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-setup-card"]],standalone:false,decls:22,vars:17,consts:[[1,"oppt-widget"],[1,"oppt-primary-color","oppt-mb10"],[1,"oppt-attribute"],[1,"oppt-attribute","oppt-mt15","flex-row"],["type","button","mat-button","","color","primary",3,"routerLink"],["iconPositionEnd",""],[1,"oppt-attribute-value"],[1,"oppt-attribute-title","oppt-grey-color"],["mat-button","","matTooltip","Copy global ID to clipboard","type","button",1,"oppt-feature-button",3,"click"]],template:function(i,a){i&1&&(w(0,"div",0)(1,"h2",1),Ee(2,"Transformer attributes"),S(),be(3,$o,5,2,"div",2),be(4,qo,5,2,"div",2),be(5,Qo,5,2,"div",2),be(6,Wo,7,2,"div",2),be(7,Yo,5,2,"div",2),be(8,Jo,5,2,"div",2),be(9,Ko,5,2,"div",2),be(10,Xo,5,2,"div",2),be(11,Zo,5,2,"div",2),be(12,ea,5,2,"div",2),be(13,ta,5,2,"div",2),be(14,ia,5,2,"div",2),be(15,ra,5,2,"div",2),be(16,na,5,2,"div",2),w(17,"div",3)(18,"button",4),Ee(19,"Show more"),w(20,"mat-icon",5),Ee(21,"arrow_forward"),S()()()()),i&2&&(E(3),ye(a.entity.transformerMfgOrganizationName?3:-1),E(),ye(a.entity.disposalOrganizationName?4:-1),E(),ye(a.entity.serialNumber?5:-1),E(),ye(a.entity?.featureId&&a.entity.stationNumber?6:-1),E(),ye(!a.entity?.featureId&&a.entity.stationNumber?7:-1),E(),ye(a.entity.addressLine1?8:-1),E(),ye(a.entity.description?9:-1),E(),ye(a.entity.position?10:-1),E(),ye(a.entity.phase?11:-1),E(),ye(a.entity.kvaRating?12:-1),E(),ye(a.entity.primaryVoltageCode?13:-1),E(),ye(a.entity.secondaryVoltageCode?14:-1),E(),ye(a.entity.lastInstallDate?15:-1),E(),ye(a.entity.lastRemovalDate?16:-1),E(2),le("routerLink",Uw(15,Go,a.transformerId)));},dependencies:[Tr,wu,Ml,fv],styles:[".oppt-widget[_ngcontent-%COMP%]{margin:24px 8px 24px 16px}.mdc-button[_ngcontent-%COMP%]{margin-left:-8px}.oppt-feature-button[_ngcontent-%COMP%]{margin-left:-8px;text-align:left}"],changeDetection:1});}}return t})();function aa(t,l){if(t&1&&(w(0,"div",1)(1,"h1",3),Ee(2),S(),w(3,"h5",4),Ee(4),S()()),t&2){let e=X$1();E(2),Ge$1(e.entity?.transformerNumber),E(2),Ge$1(e.entity?.transformerTypeCode);}}var Jr=(()=>{class t{get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,i){this.service=e,this.changeRef=i,this.ngUnsubscribe=new P$1,this.entityLoaded=false;}ngAfterViewInit(){Kt$1(this.service.busy,this.service.loading).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{!this.service.loading.getValue()&&N$1.isNotNull(this.entity)?this.entityLoaded=true:this.entityLoaded=false,this.changeRef.detectChanges();});}
3ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-overview-header"]],standalone:false,decls:3,vars:1,consts:[[1,"oppt-heading-section-1"],[1,"oppt-heading-section-2"],[1,"oppt-heading-asside-spacer"],[1,"mat-h1"],[1,"mat-h5"]],template:function(i,a){i&1&&(w(0,"div",0),be(1,aa,5,2,"div",1),Ce(2,"div",2),S()),i&2&&(E(),ye(a.entityLoaded?1:-1));},styles:["[_nghost-%COMP%]{width:100%;height:70px;min-width:0;display:block;color:#fff}[_nghost-%COMP%] .oppt-heading-section-1[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row}[_nghost-%COMP%] .oppt-heading-section-2[_ngcontent-%COMP%]{width:100%;height:70px;padding:0 8px 8px 72px;max-width:100%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;text-wrap:none;flex-wrap:nowrap;overflow-wrap:break-word;overflow-y:hidden;overflow-x:hidden;word-break:break-all}[_nghost-%COMP%] .oppt-heading-asside-spacer[_ngcontent-%COMP%]{flex:0 0 320px;width:320px;max-width:320px}[_nghost-%COMP%] h1.mat-h1[_ngcontent-%COMP%], [_nghost-%COMP%] h2.mat-h2[_ngcontent-%COMP%], [_nghost-%COMP%] h3.mat-h3[_ngcontent-%COMP%], [_nghost-%COMP%] h4.mat-h4[_ngcontent-%COMP%], [_nghost-%COMP%] h5.mat-h5[_ngcontent-%COMP%], [_nghost-%COMP%] h6.mat-h6[_ngcontent-%COMP%]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;text-wrap:none;flex-wrap:nowrap;overflow-wrap:break-word;overflow-y:hidden;overflow-x:hidden;word-break:break-all;margin:0}[_nghost-%COMP%] h1.mat-h1[_ngcontent-%COMP%]{max-height:32px}[_nghost-%COMP%] h5.mat-h5[_ngcontent-%COMP%]{max-height:42px}@media(max-width:1279px){.oppt-heading-asside-spacer[_ngcontent-%COMP%]{display:none}}"],changeDetection:1});}}return t})();var Kr=(()=>{class t{get entity(){return this.service.entity}get meta(){return this.service.meta}get transformerId(){return this.service.transformerId.getValue()}constructor(e,i,a,d,_){this.service=e,this.route=i,this.report=a,this.session=d,this.documentationService=_,this.reportRequestId="C424A0DD-42E7-439B-826B-063F890BE321",this.reportId="9E9094C2-9E6E-4D5D-86FD-FFE25FCF59F9",this.selectedIndex=0;}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_transformer_event_overview_card");}export(){this.report.isQueued(this.reportRequestId)||this.service.entityChanges.pipe(Se(N$1.isNotNull),od(0),Be(1)).subscribe(e=>{let i=new x$2;i.reportId=this.reportId,i.systemId=this.session.systemId,i.title="Transformer event overview export",i.parameterValues.transformerId=e.transformerId;let a=new y(this.reportRequestId,i);this.report.enqueue(a);});}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(ko$1),ce(B$2),ce(Lb),ce(v$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-event-overview-card"]],standalone:false,decls:9,vars:0,consts:[[1,"oppt-card","mat-typography","flex-column"],[1,"flex-row"],[1,"flex-min-16"],["mat-icon-button","","type","button","matTooltip","Export list",1,"oppt-status-menu-button",3,"click"],[1,"oppt-p0","oppt-overflow-auto-y"]],template:function(i,a){i&1&&(w(0,"mat-card",0)(1,"mat-card-header",1)(2,"h2",2),Ee(3,"Events"),S(),w(4,"button",3),he("click",function(){return a.export()}),w(5,"mat-icon"),Ee(6,"file_download"),S()()(),w(7,"mat-card-content",4),Ce(8,"oppt-transformer-event-overview-list"),S()());},dependencies:[ec,ZCe,e0e,i0e,wu,Ml,re],styles:[".oppt-card[_ngcontent-%COMP%]{margin:4px;max-width:inherit;height:400px}[_nghost-%COMP%] .mat-tab-label{height:32px}"],changeDetection:1});}}return t})();var Xr=(()=>{class t{get entity(){return this.service.entity}get meta(){return this.service.meta}get transformerId(){return this.service.transformerId.getValue()}constructor(e,i,a,d,_){this.service=e,this.route=i,this.report=a,this.session=d,this.documentationService=_,this.reportRequestId="1A8E569C-6C16-4AA5-AE95-40F3792345AF",this.reportId="E3D4F392-38FC-4D1F-A9EA-DB1ACFBC2C72",this.selectedIndex=0;}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_transformer_overview");}export(){this.report.isQueued(this.reportRequestId)||this.service.entityChanges.pipe(Se(N$1.isNotNull),od(0),Be(1)).subscribe(e=>{let i=new x$2;i.reportId=this.reportId,i.systemId=this.session.systemId,i.title="Transformer action overview export",i.parameterValues.transformerId=e.transformerId;let a=new y(this.reportRequestId,i);this.report.enqueue(a);});}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(ko$1),ce(B$2),ce(Lb),
3ce(v$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-action-overview-card"]],standalone:false,decls:9,vars:0,consts:[[1,"oppt-card","mat-typography","flex-column"],[1,"flex-row"],[1,"flex-min-16"],["mat-icon-button","","type","button","matTooltip","Export list",1,"oppt-status-menu-button",3,"click"],[1,"oppt-p0","oppt-overflow-auto-y"]],template:function(i,a){i&1&&(w(0,"mat-card",0)(1,"mat-card-header",1)(2,"h2",2),Ee(3,"Actions"),S(),w(4,"button",3),he("click",function(){return a.export()}),w(5,"mat-icon"),Ee(6,"file_download"),S()()(),w(7,"mat-card-content",4),Ce(8,"oppt-transformer-action-overview-list"),S()());},dependencies:[ec,ZCe,e0e,i0e,wu,Ml,ei],styles:[".oppt-card[_ngcontent-%COMP%]{margin:4px;max-width:inherit;height:400px}[_nghost-%COMP%] .mat-tab-label{height:32px}"],changeDetection:1});}}return t})();var Zr=(t,l)=>l.componentId;function ca(t,l){if(t&1&&(w(0,"span",13),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge$1(e.asside);}}function da(t,l){if(t&1){let e=gn$1();w(0,"button",9),he("click",function(){Ct(e);let a=X$1().$implicit,d=X$1(2);return wt(d.routeTo(a))}),w(1,"span",10)(2,"span",11),Ee(3),S(),Ce(4,"span",12),be(5,ca,2,1,"span",13),S()();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(3),Ge$1(e.name),E(2),ye(e.asside?5:-1);}}function fa(t,l){if(t&1&&(w(0,"a",8),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn(" ",e.name," ");}}function ua(t,l){if(t&1&&be(0,da,6,3,"button",7)(1,fa,2,3,"a",8),t&2){let i=l.$implicit;ye((i.uri===null)?0:1);}}function ha(t,l){t&1&&(w(0,"div",4),Ce(1,"mat-divider"),w(2,"h4",14),Ee(3,"Links"),S()());}function va(t,l){if(t&1&&(w(0,"span",13),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge$1(e.asside);}}function Ca(t,l){if(t&1){let e=gn$1();w(0,"button",9),he("click",function(){Ct(e);let a=X$1().$implicit,d=X$1(2);return wt(d.routeTo(a))}),w(1,"span",10)(2,"span",11),Ee(3),S(),Ce(4,"span",12),be(5,va,2,1,"span",13),S()();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(3),Ge$1(e.name),E(2),ye(e.asside?5:-1);}}function ga(t,l){if(t&1&&(w(0,"a",8),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn(" ",e.name," ");}}function ba(t,l){if(t&1&&be(0,Ca,6,3,"button",7)(1,ga,2,3,"a",8),t&2){let i=l.$implicit;ye((i.uri===null)?0:1);}}function xa(t,l){if(t&1){let e=gn$1();w(0,"div",3),sa(1,ua,2,1,null,null,Zr),be(3,ha,4,0,"div",4),sa(4,ba,2,1,null,null,Zr),w(6,"div",5),Ce(7,"mat-divider"),S(),w(8,"button",6),he("click",function(){Ct(e);let a=X$1();return wt(a.showDocumentation())}),Ee(9," Help "),S()();}if(t&2){let e=X$1();le("@fadeIn",void 0),E(),ca$1(e.mainComponents),E(2),ye(e.linksComponents.length>0?3:-1),E(),ca$1(e.linksComponents);}}var tn=(()=>{class t{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(e,i,a,d,_,S,V,J,L){this.transformer=e,this.service=i,this.session=a,this.router=d,this.route=_,this.lookup=S,this.changeRef=V,this.errorHandler=J,this.documentationService=L,this.ngUnsubscribe=new P$1,this.loading=true,this.components=new Yt$1([]),this.mainComponents=[],this.linksComponents=[],this.buildComponents=(U,E,je)=>U.reduce((rt,ae)=>{if(ae.componentLocationCode!=="transformermain"&&ae.componentLocationCode!=="transformeroverview")return rt;let Se=null,Mi=null;if(N$1.isNullOrEmpty(ae.route)){if(N$1.isNullOrEmpty(ae.uri))return rt;Se=ae.uri.replace(/{transformerId}/gi,this.transformerId),N$1.isNullOrEmpty(je)?/{transformerNumber}|{serialNumber}|{stationNumber}|{featureId}/i.test(Se)&&(Se=null):(Se=Se.replace(/{transformerNumber}/gi,encodeURIComponent(je.transformerNumber)),Se=Se.replace(/{serialNumber}/gi,encodeURIComponent(je.serialNumber)),Se=Se.replace(/{stationNumber}/gi,encodeURIComponent(je.stationNumber)),Se=Se.replace(/{featureId}/gi,encodeURIComponent(je.featureId)));}else {let Kt=E.numbers[ae.route];N$1.isNotNullOrEmpty(Kt)&&Kt>0&&(Kt<1e3?Mi=Kt.toString():Mi="1k+");}let Le=new t$1;return Le.name=ae.name,Le.description=ae.description,Le.materialImage=ae.materialImage,Le.componentId=ae.componentId,Le.componentLocationCode=ae.componentLocationCode,Le.route=ae.route,Le.uri=Se,Le.asside=Mi,Le.openNewWindow=ae.openNewWindow,rt.push(Le),rt},[]);}ngAfterViewInit(){Dn$1([this.lookup.availableComponentsObserver,this.transformer.statisticsSubject.pipe(Nt(null)),this.transformer.entityChanges.pipe(Nt(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.components.next(this.buildComponents(e[0],e[1],e[2]));}),Dn$1([this.components,this.search.opptSearchTextChange.pipe(Nt(""))]).pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{let i=e[0];this.mainComponents=i.filter(d=>d.componentLocationCode==="transformermain"&&N$1.stringContains(this.search.opptSearchText,[d.name,d.description])),this.linksComponents=i.filter(d=>d.componentLocationCode==="transformeroverview"&&N$1.stringContains(this.search.opptSearchText,[d.name,d.description]));let a=this.transformer.entity;if(N$1.isNotNull(a)&&N$1.isNotNullOrEmpty(a.featureId)&&this.session.claimCheck(hc.Feature,a.systemId)&&N$1.stringContains(this.search.opptSearchText,["Feature overview"])){let d=new t$1;d.componentId="14D38F2D-29BB-4E07-AC75-3CABEE78AADD",d.description="Go to feature overview",d.route="currentfeature",d.name="Feature overview";let _=this.mainComponents.findIndex(S=>S.route==="attributes");this.mainComponents.splice(_+1,0,d);}this.loading&&i.length>0&&(this.loading=false);}),N$1.isNotNull(this.sidenav)&&this.sidenav.closedStart.pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(e=>{this.search.opptSearchText="";});}toggleNav(e){N$1.isNull(this.sidenav)||(N$1.isNull(e)?this.sidenav.toggle(
3):this.sidenav.toggle(e),this.sidenav.opened||(this.search.opptSearchText=""));}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_transformer_overview");}routeTo(e){if(!N$1.isNull(this.transformer.entity)){if(e.route==="currentfeature"){let i=this.transformer.entity.featureId;if(N$1.isNullOrEmpty(i))return;this.router.navigate([`features/${i}`]),this.toggleNav(false);return}this.router.navigate([`/transformers/${this.transformerId}/${e.route}`]),this.toggleNav(false);}}trackComponentBy(e,i){return i?i.componentId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(Et),ce(Lb),ce(Ki),ce(ko$1),ce(A3e),ce(Fe),ce(Au),ce(v$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-nav"]],viewQuery:function(i,a){if(i&1&&et(_Z,5),i&2){let d;q(d=$())&&(a.search=d.first);}},inputs:{sidenav:"sidenav"},standalone:false,decls:5,vars:1,consts:[[1,"oppt-nav-widget-container","oppt-host","oppt-material-background","flex-column"],[1,"oppt-toolbar-widget","flex-auto","flex-row","flex-place-center-start","oppt-ml10","oppt-mb10"],[1,"oppt-overflow-auto-y"],[1,"flex-column","oppt-menu-items-container"],[1,"oppt-mt10","oppt-mb5"],[1,"oppt-mt10","oppt-mb5","oppt-hide-gt-md"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker","oppt-hide-gt-md",3,"click"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"disabled"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"href","target"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"click","disabled"],[1,"flex-row","oppt-w100p"],[1,"oppt-menu-text"],[1,"flex-fill-gap"],[1,"oppt-menu-count","flex-auto"],[1,"opt-dark-grey","oppt-ml10"]],template:function(i,a){i&1&&(w(0,"div",0)(1,"div",1),Ce(2,"oppt-toolbar-search"),S(),w(3,"div",2),be(4,xa,10,2,"div",3),S()()),i&2&&(E(4),ye(a.loading?-1:4));},dependencies:[_Z,Tr,_7],styles:["[_nghost-%COMP%]{background:transparent;border-radius:18px}.oppt-nav-widget-container[_ngcontent-%COMP%]{border-radius:18px;overflow:hidden}.oppt-menu-items-container[_ngcontent-%COMP%]{padding:6px 4px}"],data:{animation:[x]},changeDetection:1});}}return t})();var ya=()=>["/transformers"];function Sa(t,l){if(t&1){let e=gn$1();w(0,"button",14),he("click",function(){Ct(e);let a=X$1();return wt(a.showDocumentation())}),w(1,"mat-icon",15),Ee(2,"help"),S()();}}function Ta(t,l){if(t&1){let e=gn$1();w(0,"button",16),he("click",function(){Ct(e),X$1();let a=vn$1(2);return wt(a.toggle())}),w(1,"mat-icon"),Ee(2,"menu"),S()();}}function Ia(t,l){t&1&&Ce(0,"oppt-transformer-nav",11);}function wa(t,l){t&1&&(w(0,"div",13)(1,"div",17)(2,"div",18),Ce(3,"oppt-transformer-status-card")(4,"oppt-transformer-setup-card"),S(),w(5,"div",19),Ce(6,"oppt-transformer-action-overview-card",20)(7,"oppt-transformer-event-overview-card",20),S()(),Ce(8,"div",21),S());}var rn=(()=>{class t{get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,i,a,d,_,S,V,J,L){this.router=e,this.session=i,this.service=a,this.serverService=d,this.route=_,this.changeRef=S,this.matDialog=V,this.documentationService=J,this.breakpoints=L,this.ngUnsubscribe=new P$1,this.showStaticDrawer=false,this.entityLoaded=false,this.loading=true,this.busy=true,this.ltLg=true,this.setBreakpoints=()=>{this.breakpoints.isMatched(s$1.ltLg)?this.ltLg=true:this.ltLg=false,this.changeRef.detectChanges();},this.onBeforeChangeSystemId=U=>{!this.service||this.service.loading.getValue()||(this.service.busy.getValue()||this.serverService.pendingUpdates.getValue())&&U.cancel("Busy, please wait");}
3,this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}ngOnInit(){this.setBreakpoints();}ngAfterViewInit(){Kt$1(this.service.busy,this.service.loading,this.serverService.pendingUpdates).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy=this.service.busy.getValue()||this.serverService.pendingUpdates.getValue(),this.loading=this.service.loading.getValue(),!this.loading&&N$1.isNotNull(this.entity)?this.entityLoaded=true:this.entityLoaded=false,this.changeRef.detectChanges();}),this.breakpoints.observe(s$1.ltLg).pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{this.setBreakpoints();});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:!this.service.busy.getValue()&&!this.serverService.pendingUpdates.getValue()}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_transformer_overview");}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(Lb),ce(ci$1),ce(Et),ce(ko$1),ce(Fe),ce(vp),ce(v$1),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-overview"]],standalone:false,decls:20,vars:9,consts:[["rightnav",""],[1,"oppt-host"],["mode","over","position","end",1,"oppt-host"],[1,"oppt-transformer-nav"],[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],["opptToolbarColor","primary-darker",1,"oppt-host","flex-full-screen",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Help with transformer"],["opptToolbarRight","","mat-icon-button","","type","menu"],["opptTopRightDrawer","",1,"oppt-hide-lt-lg","mat-elevation-z12","flex-280"],[1,"oppt-primary-darker"],[1,"flex-row","oppt-cards"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Help with transformer",3,"click"],["aria-label","Help with transformer"],["opptToolbarRight","","mat-icon-button","","type","menu",3,"click"],[1,"oppt-cards","flex-full-screen","flex-row","flex-wrap"],[1,"oppt-details-section"],[1,"oppt-lists-section"],[1,"oppt-list-card"],[1,"oppt-hide-lt-lg","flex-320"]],template:function(i,a){i&1&&(w(0,"mat-sidenav-container",1)(1,"mat-sidenav",2,0),Ce(3,"oppt-transformer-nav",3),S(),w(4,"mat-sidenav-content",1)(5,"div",4),Ce(6,"div",5),w(7,"oppt-section",6)(8,"button",7)(9,"mat-icon"),Ee(10,"arrow_back"),S()(),w(11,"h3",8),Ee(12,"Transformer"),S(),be(13,Sa,3,0,"button",9),be(14,Ta,3,0,"button",10),be(15,Ia,1,0,"oppt-transformer-nav",11),w(16,"div",1),Ce(17,"oppt-transformer-overview-header",12),be(18,wa,9,0,"div",13),S()(),Ce(19,"div",5),S()()()),i&2&&(E(7),le("opptBusy",a.busy)("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(),le("routerLink",Rq(8,ya)),E(5),ye(a.ltLg?-1:13),E(),ye(a.ltLg?14:-1),E(),ye(a.loading?-1:15),E(3),ye(a.entityLoaded?18:-1));},dependencies:[hZ,ec,wu,_Q,MTe,XF,Ml,fv,Wr,Yr,Jr,Kr,Xr,tn],styles:[".oppt-cards[_ngcontent-%COMP%]{margin:6px}.oppt-details-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 280px;box-sizing:border-box;max-width:100%;max-width:380px}.oppt-stats-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 160px;box-sizing:border-box;max-width:100%}.oppt-lists-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 485px;box-sizing:border-box;max-width:100%}.mat-drawer[_ngcontent-%COMP%]{width:280px}@media(max-width:599px){.oppt-details-section[_ngcontent-%COMP%]{flex:0 1 100%;box-sizing:border-box;max-width:100%}.oppt-lists-section[_ngcontent-%COMP%]{display:none}}@media(max-width:959px){.oppt-stats-section[_ngcontent-%COMP%]{display:none}}"],changeDetection:1});}}return t})();var nn=(()=>{class t{get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,i){this.service=e,this.changeRef=i,this.ngUnsubscribe=new P$1,this.showStaticDrawer=false,this.entityLoaded=false;}ngAfterViewInit(){Kt$1(this.service.busy,this.service.loading).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{!this.service.loading.getValue()&&N$1.isNotNull(this.entity)?this.entityLoaded=true:this.entityLoaded=false;});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ci$1),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-header"]],inputs:{heading:"heading"},standalone:false,decls:6,vars:2,consts:[[1,"oppt-heading-section","flex-column","flex-place-start-end"],[1,"oppt-heading-wrapper"],[1,"mat-h1"],[1,"mat-h5"]],template:function(i,a){i&1&&(w(0,"div",0)(1,"div",1)(2,"h1",2),Ee(3),S(),w(4,"h5",3),Ee(5),S()()()),i&2&&(E(3),Ge$1(a.heading),E(2),Ge$1(a.entity?.transformerNumber));},styles:["[_nghost-%COMP%]{width:100%;height:70px;display:block;color:#fff}[_nghost-%COMP%] .oppt-heading-section[_ngcontent-%COMP%]{height:100%;padding:0 8px 8px 72px}[_nghost-%COMP%] .mat-h1[_ngcontent-%COMP%], [_nghost-%COMP%] .mat-h5[_ngcontent-%COMP%]{overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;margin:0}[_nghost-%COMP%] .mat-h5[_ngcontent-%COMP%]{max-height:42px;white-space:normal;margin:0}"],changeDetection:1});}}return t})();var Ma=["outlet"],ka=t=>["/transformers",t],on=(()=>{class t{get transformerId(){return Ob.getParam(this.route,"transformerId")}constructor(e,i,a){this.changeRef=e,this.cradle=i,this.route=a,this.flexAsideHidden="0 0 0",this.flexAsideShow="1 0 500px",this.flexAside=this.flexAsideHidden;}static{this.\u0275fac=function(i){return new(i||t)(ce(Fe),ce(k$1),ce(ko$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-reports"]
3],viewQuery:function(i,a){if(i&1&&et(Ma,5),i&2){let d;q(d=$())&&(a.outlet=d.first);}},standalone:false,decls:10,vars:5,consts:[[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],[1,"oppt-host","flex-full-screen"],[1,"oppt-host","flex-100p"],["contextParameterName","TransformerId","opptToolbarColor","primary-darker",1,"oppt-host",3,"contextParameterValue","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","menu",3,"routerLink"],["heading","Reports",1,"oppt-primary-darker"]],template:function(i,a){i&1&&(w(0,"div",0),Ce(1,"div",1),w(2,"div",2)(3,"article",3)(4,"oppt-report-list",4)(5,"button",5)(6,"mat-icon"),Ee(7,"arrow_back"),S()(),Ce(8,"oppt-transformer-header",6),S()()(),Ce(9,"div",1),S()),i&2&&(E(4),le("contextParameterValue",a.transformerId)("opptNoScrollNoBorder",true),E(),le("routerLink",Uw(3,ka,a.transformerId)));},dependencies:[ec,wu,fv,hc$1,nn],encapsulation:2,changeDetection:1});}}return t})();var Ea=["transformerNumberRef"],Na=()=>["Transformer manufacturer"];function Fa(t,l){if(t&1){let e=gn$1();w(0,"button",49),he("click",function(){Ct(e);let a=X$1();return wt(a.getNextTransformerNumber())}),w(1,"mat-icon"),Ee(2,"auto_awesome"),S()();}if(t&2){let e=X$1();le("disabled",(e.form==null?null:e.form.disabled)===null?true:e.form==null?null:e.form.disabled);}}function Oa(t,l){if(t&1&&(w(0,"mat-option",50),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Ra(t,l){if(t&1&&(w(0,"mat-option",50),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Ba(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",51),N4(),S()()),t&2&&(E(3),F4());}function Va(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",52),N4(),S()()),t&2&&(E(3),F4());}function ja(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",53),N4(),S()()),t&2&&(E(3),F4());}function La(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",54),N4(),S()()),t&2&&(E(3),F4());}function Aa(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",55),N4(),S()()),t&2&&(E(3),F4());}function Ua(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",56),N4(),S()()),t&2&&(E(3),F4());}function Pa(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",57),N4(),S()()),t&2&&(E(3),F4());}function za(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",58),N4(),S()()),t&2&&(E(3),F4());}function Ha(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",59),N4(),S()()),t&2&&(E(3),F4());}function Ga(t,l){t&1&&(w(0,"oppt-form-field",12)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",60),N4(),S()()),t&2&&(E(3),F4());}function $a(t,l){t&1&&(w(0,"oppt-form-field",32)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",61),N4(),S()()),t&2&&(E(3),F4());}function qa(t,l){t&1&&(w(0,"oppt-form-field",32)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",62),N4(),S()()),t&2&&(E(3),F4());}function Qa(t,l){t&1&&(w(0,"oppt-form-field",32)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",63),N4(),S()()),t&2&&(E(3),F4());}function Wa(t,l){t&1&&(w(0,"oppt-form-field",32)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",64),N4(),S()()),t&2&&(E(3),F4());}function Ya(t,l){t&1&&(w(0,"oppt-form-field",32)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",65),N4(),S()()),t&2&&(E(3),F4());}function Ja(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",66),N4(),S()()),t&2&&(E(3),F4());}function Ka(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",67),N4(),S()()),t&2&&(E(3),F4());}function Xa(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",68),N4(),S()()),t&2&&(E(3),F4());}function Za(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",69),N4(),S()()),t&2&&(E(3),F4());}function em(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",70),N4(),S()()),t&2&&(E(3),F4());}function tm(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",71),N4(),S()()),t&2&&(E(3),F4());}function im(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",72),N4(),S()()),t&2&&(E(3),F4());}function rm(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",73),N4(),S()()),t&2&&(E(3),F4());}function nm(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",74),N4(),S()()),t&2&&(E(3),F4());}function om(t,l){t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",75),N4(),S()()),t&2&&(E(3),F4());}function am(t,l){if(t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",76),N4(),Ce(4,"mat-datepicker-toggle",30)(5,"mat-datepicker",3
31,4),S()()),t&2){let e=vn$1(6),i=X$1();E(3),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e);}}function mm(t,l){if(t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",77),N4(),Ce(4,"mat-datepicker-toggle",30)(5,"mat-datepicker",31,5),S()()),t&2){let e=vn$1(6),i=X$1();E(3),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e);}}function sm(t,l){if(t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",78),N4(),Ce(4,"mat-datepicker-toggle",30)(5,"mat-datepicker",31,6),S()()),t&2){let e=vn$1(6),i=X$1();E(3),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e);}}function lm(t,l){if(t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",79),N4(),Ce(4,"mat-datepicker-toggle",30)(5,"mat-datepicker",31,7),S()()),t&2){let e=vn$1(6),i=X$1();E(3),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e);}}function pm(t,l){if(t&1&&(w(0,"oppt-form-field",15)(1,"mat-form-field"),Ce(2,"mat-label")(3,"input",80),N4(),Ce(4,"mat-datepicker-toggle",30)(5,"mat-datepicker",31,8),S()()),t&2){let e=vn$1(6),i=X$1();E(3),le("min",i.minDate)("max",i.maxDate)("matDatepicker",e),F4(),E(),le("for",e);}}var an=(()=>{class t{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,i,a,d){this.service=e,this.transformerService=i,this.lookup=a,this.errorHandler=d,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate;}getNextTransformerNumber(){this.service.disabled||this.transformerService.getNextTransformerNumber(this.service.entity.systemId).pipe(Oe(this.ngUnsubscribe),Be(1)).subscribe({next:e=>{N$1.isNotNull(e)&&N$1.isNotNullOrEmpty(e.nextTransformerNumber)?(this.form.get("transformerNumber").setValue(e.nextTransformerNumber),Ob.setFocusAndSelect(this.transformerNumberRef)):(this.errorHandler.showErrorMessage("Unable to automatically calculate the next transformer number."),Ob.setFocusAndSelect(this.transformerNumberRef));},error:e=>{this.errorHandler.showErrorMessage("Unable to automatically calculate the next transformer number."),Ob.setFocusAndSelect(this.transformerNumberRef);}});}ngAfterViewInit(){this.service.formChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{Ob.setFocusAndSelect(this.transformerNumberRef);});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2),ce(Et),ce(A3e),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-main-form"]],viewQuery:function(i,a){if(i&1&&et(Ea,5),i&2){let d;q(d=$())&&(a.transformerNumberRef=d.first);}},standalone:false,decls:156,vars:51,consts:[["transformerNumberRef",""],["manufacturerDatePick",""],["notesTextarea",""],["purchaseDatePick",""],["customDate1Pick",""],["customDate2Pick",""],["customDate3Pick",""],["customDate4Pick",""],["customDate5Pick",""],[3,"formGroup","formMetadata"],[1,"mat-h4","oppt-grey","oppt-mb20"],[1,"flex-form"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","transformerNumber","type","text","maxLength","50","autocomplete","off"],["matSuffix","","mat-icon-button","","color","primary","aria-label","Calculate next transformer number","matTooltip","Calculate next instrument transformer number","type","button",3,"disabled","click",4,"ngIf"],[1,"flex-min-150"],["formControlName","transformerTypeCode"],[3,"value",4,"ngFor","ngForOf"],["matInput","","formControlName","transformerStatusCode","type","text","autocomplete","off"],["matInput","","formControlName","lastStatusDate","type","text","autocomplete","off"],[1,"flex-min-150-g10"],["matInput","","formControlName","stationNumber","type","text","autocomplete","off"],[1,"flex-100p","oppt-hide-gt-lg"],[1,"flex-min-80"],["matInput","","formControlName","position","type","text","autocomplete","off"],["matInput","","formControlName","phase","type","text","autocomplete","off"],["matInput","","formControlName","serialNumber","type","text","maxLength","50","autocomplete","off"],["matInput","","formControlName","catalogNumber","type","text","maxLength","50","autocomplete","off"],["controlName","transformerMfgOrganizationCode",1,"flex-min-150-g10","flex-100p-lt-sm",3,"systemId","limitOrganizationTypeCodes"],["matInput","","formControlName","manufacturerDate","autocomplete","off",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],[1,"flex-100p"],["matInput","","formControlName","transformerMfgOrganizationName","type","text","autocomplete","off"],["matInput","","formControlName","description","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","notes","type","text","maxLength","1000","autocomplete","off"],["align","end"],[1,"oppt-mt10"],[1,"flex-min-170"],["matInput","","formControlName","purchaseOrderNumber","type","text","maxLength","50","autocomplete","off"],["matInput","","formControlName","purchaseDate","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","purchaseYear","type","number","maxLength","4","autocomplete","off"],["matInput","","type","number","autocomplete","off","formControlName","purchaseCost"],["matInput","","type","number","autocomplete","off","formControlName","installedCost"],["matInput","","type","number","autocomplete","off","formControlName","installedCostCf"],["formControlName","taxingDistrictCode"],["class","flex-min-150 flex-100p-lt-sm",4,"ngIf"],["class","flex-100p",4,"ngIf"],["class","flex-min-150",4,"ngIf"],["matSuffix","","mat-icon-button","","color","primary","aria-label","Calculate next transformer number","matTooltip","Calculate next instrument transformer number","type","button",3,"click","disabled"],[3,"value"],["matInput","","formControlName","customText1","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText2","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText3","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText4","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText5","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText6","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText7","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText8","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText9","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText10","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText11","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText12","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText13","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText14","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customText15","type","text","maxLength","200","autocomplete","off"],["matInput","","formControlName","customNumber1","type","number","autocomplete","off"],["matInput","","formControlName","customNumber2","type","number","autocomplete","off"],["matInput","","formControlName","customNumber3","type","number","autocomplete","off"],["matInput","","formControlName","customNumber4","type","number","autocomplete","off"],["matInput","","formControlName","customNumber5","type","number","autocomplete","off"],["matInput","","formControlName","customNumber6","type","number","autocomplete","off"],["matInput","","formControlName","customNumber7","type","number","autocomplete","off"],["matInput","","formControlName","customNumber8","type","number","autocomplete","off"],["matInput","","formControlName","customNumber9","type","number","autocomplete","off"],["matInput","","formControlName","customNumber10","type","number","autocomplete","off"],["matInput","","formControlName","customDate1","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","customDate2","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","customDate3","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","customDate4","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","customDate5","autocomplete","off",3,"min","max","matDatepicker"]],template:function(i,a){if(i&1&&(w(0,"div",9)(1,"h4",10),Ee(2,"Transformer attributes"),S(),w(3,"div",11)(4,"oppt-form-field",12)(5,"mat-form-field"),Ce(6,"mat-label")(7,"input",13,0),N4(),Ht$1(9,Fa,3,1,"button",14),S()(),w(10,"oppt-form-field",15)(11,"mat-form-field"),Ce(12,"mat-label"),w(13,"mat-select",16)(14,"mat-option"),Ee(15,"None"),S(),Ht$1(16,Oa,2,2,"mat-option",17),Fq(17,"async"),S(),N4(),S()()(),w(18,"div",11)(19,"oppt-form-field",15)(20,"mat-form-field"),Ce(21,"mat-label")(22,"
3input",18),N4(),S()(),w(23,"oppt-form-field",15)(24,"mat-form-field"),Ce(25,"mat-label")(26,"input",19),N4(),S()(),w(27,"oppt-form-field",20)(28,"mat-form-field"),Ce(29,"mat-label")(30,"input",21),N4(),S()(),Ce(31,"div",22),w(32,"oppt-form-field",23)(33,"mat-form-field"),Ce(34,"mat-label")(35,"input",24),N4(),S()(),w(36,"oppt-form-field",23)(37,"mat-form-field"),Ce(38,"mat-label")(39,"input",25),N4(),S()()(),w(40,"div",11)(41,"oppt-form-field",15)(42,"mat-form-field"),Ce(43,"mat-label")(44,"input",26,0),N4(),S()(),w(46,"oppt-form-field",15)(47,"mat-form-field"),Ce(48,"mat-label")(49,"input",27,0),N4(),S()()(),w(51,"div",11),Ce(52,"oppt-organization-picker",28),w(53,"oppt-form-field",15)(54,"mat-form-field"),Ce(55,"mat-label")(56,"input",29),N4(),Ce(57,"mat-datepicker-toggle",30)(58,"mat-datepicker",31,1),S()(),w(60,"oppt-form-field",32)(61,"mat-form-field"),Ce(62,"mat-label")(63,"input",33),N4(),S()()(),w(64,"div",11)(65,"oppt-form-field",32)(66,"mat-form-field"),Ce(67,"mat-label")(68,"input",34),N4(),S()()(),w(69,"div",11)(70,"oppt-form-field",32)(71,"mat-form-field"),Ce(72,"mat-label")(73,"textarea",35,2),N4(),w(75,"mat-hint",36),Ee(76),S()()()(),Ce(77,"mat-divider",37),w(78,"h4",10),Ee(79,"Additional information"),S(),w(80,"div",11)(81,"oppt-form-field",38)(82,"mat-form-field"),Ce(83,"mat-label")(84,"input",39,0),N4(),S()(),w(86,"oppt-form-field",15)(87,"mat-form-field"),Ce(88,"mat-label")(89,"input",40),N4(),Ce(90,"mat-datepicker-toggle",30)(91,"mat-datepicker",31,3),S()(),w(93,"oppt-form-field",15)(94,"mat-form-field"),Ce(95,"mat-label")(96,"input",41),N4(),S()()(),w(97,"div",11)(98,"oppt-form-field",15)(99,"mat-form-field"),Ce(100,"mat-label")(101,"input",42),N4(),S()(),w(102,"oppt-form-field",15)(103,"mat-form-field"),Ce(104,"mat-label")(105,"input",43),N4(),S()(),w(106,"oppt-form-field",15)(107,"mat-form-field"),Ce(108,"mat-label")(109,"input",44),N4(),S()()(),w(110,"div",11)(111,"oppt-form-field",15)(112,"mat-form-field"),Ce(113,"mat-label"),w(114,"mat-select",45)(115,"mat-option"),Ee(116,"None"),S(),Ht$1(117,Ra,2,2,"mat-option",17),Fq(118,"async"),S(),N4(),S()()(),w(119,"div",11),Ht$1(120,Ba,4,0,"oppt-form-field",46)(121,Va,4,0,"oppt-form-field",46),S(),w(122,"div",11),Ht$1(123,ja,4,0,"oppt-form-field",46)(124,La,4,0,"oppt-form-field",46),S(),w(125,"div",11),Ht$1(126,Aa,4,0,"oppt-form-field",46)(127,Ua,4,0,"oppt-form-field",46),S(),w(128,"div",11),Ht$1(129,Pa,4,0,"oppt-form-field",46)(130,za,4,0,"oppt-form-field",46),S(),w(131,"div",11),Ht$1(132,Ha,4,0,"oppt-form-field",46)(133,Ga,4,0,"oppt-form-field",46),S(),w(134,"div",11),Ht$1(135,$a,4,0,"oppt-form-field",47)(136,qa,4,0,"oppt-form-field",47)(137,Qa,4,0,"oppt-form-field",47)(138,Wa,4,0,"oppt-form-field",47)(139,Ya,4,0,"oppt-form-field",47),S(),w(140,"div",11),Ht$1(141,Ja,4,0,"oppt-form-field",48)(142,Ka,4,0,"oppt-form-field",48)(143,Xa,4,0,"oppt-form-field",48)(144,Za,4,0,"oppt-form-field",48)(145,em,4,0,"oppt-form-field",48)(146,tm,4,0,"oppt-form-field",48)(147,im,4,0,"oppt-form-field",48)(148,rm,4,0,"oppt-form-field",48)(149,nm,4,0,"oppt-form-field",48)(150,om,4,0,"oppt-form-field",48)(151,am,7,4,"oppt-form-field",48)(152,mm,7,4,"oppt-form-field",48)(153,sm,7,4,"oppt-form-field",48)(154,lm,7,4,"oppt-form-field",48)(155,pm,7,4,"oppt-form-field",48),S()()),i&2){let d=vn$1(59),_=vn$1(74),S=vn$1(92);le("formGroup",a.form)("formMetadata",a.meta),E(7),F4(),E(2),le("ngIf",a.entity.entityAction==="Create"),E(4),F4(),E(3),le("ngForOf",Bq(17,46,a.service.transformerTypeCodeObserver)),E(6),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(4),F4(),E(5),F4(),E(5),F4(),E(3),le("systemId",a.entity==null?null:a.entity.systemId)("limitOrganizationTypeCodes",Rq(50,Na)),E(4),le("min",a.minDate)("max",a.maxDate)("matDatepicker",d),F4(),E(),le("for",d),E(6),F4(),E(5),F4(),E(5),F4(),E(3),Zn("",_.value.length," / 1000"),E(8),F4(),E(5),le("min",a.minDate)("max",a.maxDate)("matDatepicker",S),F4(),E(),le("for",S),E(6),F4(),E(5),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(3),le("ngForOf",Bq(118,48,a.service.taxingDistrictCodeObserver)),E(3),le("ngIf",a.meta.showField("customText1")),E(),le("ngIf",a.meta.showField("customText2")),E(2),le("ngIf",a.meta.showField("customText3")),E(),le("ngIf",a.meta.showField("customText4")),E(2),le("ngIf",a.meta.showField("customText5")),E(),le("ngIf",a.meta.showField("customText6")),E(2),le("ngIf",a.meta.showField("customText7")),E(),le("ngIf",a.meta.showField("customText8")),E(2),le("ngIf",a.meta.showField("customText9")),E(),le("ngIf",a.meta.showField("customText10")),E(2),le("ngIf",a.meta.showField("customText11")),E(),le("ngIf",a.meta.showField("customText12")),E(),le("ngIf",a.meta.showField("customText13")),E(),le("ngIf",a.meta.showField("customText14")),E(),le("ngIf",a.meta.showField("customText15")),E(2),le("ngIf",a.meta.showField("customNumber1")),E(),le("ngIf",a.meta.showField("customNumber2")),E(),le("ngIf",a.meta.showField("customNumber3")),E(),le("ngIf",a.meta.showField("customNumber4")),E(),le("ngIf",a.meta.showField("customNumber5")),E(),le("ngIf",a.meta.showField("customNumber6")),E(),le("ngIf",a.meta.showField("customNumber7")),E(),le("ngIf",a.meta.showField("customNumber8")),E(),le("ngIf",a.meta.showField("customNumber9")),E(),le("ngIf",a.meta.showField("customNumber10")),E(),le("ngIf",a.meta.showField("customDate1")),E(),le("ngIf",a.meta.showField("customDate2")),E(),le("ngIf",a.meta.showField("customDate3")),E(),le("ngIf",a.meta.showField("customDate4")),E(),le("ngIf",a.meta.showField("customDate5"));}},dependencies:[t1,dY,W_e,Y_e,eu,mY,lO,z8,os,kL,rZ,FZ,Tu,ec,hDe,vF,jK,wu,Cb,ns,nb,mu,ob,GF,Du,_7,Ml,et$1,W8],encapsulation:2,changeDetection:1});}}return t})();var dm=()=>["Disposal vendor"];function fm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function um(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function hm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function vm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function Cm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function gm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function bm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}function xm(t,l){if(t&1&&(w(0,"mat-option",5),Ee(1),S()),t&2){let e=l.$implicit;le("value",e),E(),Ge$1(e);}}var mn=(()=>{class t{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e,i){this.service=e,this.lookup=i,this.ngUnsubscribe=new P$1,this.minDate=p.minDate,this.maxDate=p.maxDate;}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2),ce(A3e))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-secondary-form"]],standalone:false,decls:197,vars:23,consts:[[3,"formGroup","formMetadata"],[1,"mat-h4","oppt-grey","oppt-mb20"],[1,"flex-form"],[1,"flex-min-150"],["formControlName","primaryVoltageCode"],[3,"value"],["formControlName","secondaryVoltageCode"],["matInput","","type","number","autocomplete","off","formControlName","kvaRating"],["matInput","","type","number","autocomplete","off","formControlName","impedance"],[1,"flex-min-100"],["matInput","","type","number","autocomplete","off","formControlName","ph
3aseCount"],["formControlName","coreTypeCode"],["formControlName","mountingTypeCode"],["formControlName","protectionTypeCode"],["formControlName","sizeAndTypeCode"],[1,"flex-min-150-g10"],["formControlName","bushingTypeCode"],["matInput","","type","number","autocomplete","off","formControlName","primaryBushingCount"],[1,"flex-150"],["matInput","","formControlName","primarySwitch","maxLength","10","type","text","autocomplete","off"],["matInput","","formControlName","primarySwitchNotes","maxLength","100","type","text","autocomplete","off"],["formControlName","oilTypeCode"],["matInput","","type","number","autocomplete","off","formControlName","oilGallons"],["matInput","","type","number","autocomplete","off","formControlName","largeLoadLoss"],["matInput","","type","number","autocomplete","off","formControlName","noLoadLoss"],["matInput","","type","number","autocomplete","off","formControlName","totalLoadLoss"],[1,"flex-100p","oppt-hide-gt-md"],["matInput","","type","text","autocomplete","off","formControlName","pcb"],["matInput","","type","number","autocomplete","off","formControlName","weight"],["matInput","","formControlName","tapSetting1","maxLength","10","type","text","autocomplete","off"],["matInput","","formControlName","tapSetting2","maxLength","10","type","text","autocomplete","off"],["matInput","","formControlName","tapSetting3","maxLength","10","type","text","autocomplete","off"],["matInput","","formControlName","tapSetting4","maxLength","10","type","text","autocomplete","off"],["matInput","","formControlName","tapSetting5","maxLength","10","type","text","autocomplete","off"],[1,"oppt-mt10"],["matInput","","formControlName","transformerStatusCode","type","text","autocomplete","off"],["matInput","","formControlName","lastStatusDate","type","text","autocomplete","off"],[1,"flex-100p"],["matInput","","formControlName","addressLine1","type","text","autocomplete","off"],["matInput","","formControlName","statusDescription","type","text","autocomplete","off"],["matInput","","formControlName","lastInstallDate","type","text","autocomplete","off"],["matInput","","formControlName","lastRemovalDate","type","text","autocomplete","off"],["matInput","","formControlName","decommissionDate","type","text","autocomplete","off"],["controlName","disposalOrganizationCode",1,"flex-min-150-g10","flex-100p-lt-sm",3,"systemId","limitOrganizationTypeCodes"],["matInput","","disabled","true","type","text","autocomplete","off",3,"value"],["matInput","","formControlName","disposalOrganizationName","type","text","autocomplete","off"]],template:function(i,a){i&1&&(w(0,"div",0)(1,"h4",1),Ee(2,"Specifications"),S(),w(3,"div",2)(4,"oppt-form-field",3)(5,"mat-form-field"),Ce(6,"mat-label"),w(7,"mat-select",4)(8,"mat-option"),Ee(9,"None"),S(),sa(10,fm,2,2,"mat-option",5,Td),Fq(12,"async"),S(),N4(),S()(),w(13,"oppt-form-field",3)(14,"mat-form-field"),Ce(15,"mat-label"),w(16,"mat-select",6)(17,"mat-option"),Ee(18,"None"),S(),sa(19,um,2,2,"mat-option",5,Td),Fq(21,"async"),S(),N4(),S()()(),w(22,"div",2)(23,"oppt-form-field",3)(24,"mat-form-field"),Ce(25,"mat-label")(26,"input",7),N4(),S()(),w(27,"oppt-form-field",3)(28,"mat-form-field"),Ce(29,"mat-label")(30,"input",8),N4(),S()(),w(31,"oppt-form-field",9)(32,"mat-form-field"),Ce(33,"mat-label")(34,"input",10),N4(),S()()(),w(35,"div",2)(36,"oppt-form-field",3)(37,"mat-form-field"),Ce(38,"mat-label"),w(39,"mat-select",11)(40,"mat-option"),Ee(41,"None"),S(),sa(42,hm,2,2,"mat-option",5,Td),Fq(44,"async"),S(),N4(),S()(),w(45,"oppt-form-field",3)(46,"mat-form-field"),Ce(47,"mat-label"),w(48,"mat-select",12)(49,"mat-option"),Ee(50,"None"),S(),sa(51,vm,2,2,"mat-option",5,Td),Fq(53,"async"),S(),N4(),S()(),w(54,"oppt-form-field",3)(55,"mat-form-field"),Ce(56,"mat-label"),w(57,"mat-select",13)(58,"mat-option"),Ee(59,"None"),S(),sa(60,Cm,2,2,"mat-option",5,Td),Fq(62,"async"),S(),N4(),S()()(),w(63,"div",2)(64,"oppt-form-field",3)(65,"mat-form-field"),Ce(66,"mat-label"),w(67,"mat-select",14)(68,"mat-option"),Ee(69,"None"),S(),sa(70,gm,2,2,"mat-option",5,Td),Fq(72,"async"),S(),N4(),S()(),w(73,"oppt-form-field",15)(74,"mat-form-field"),Ce(75,"mat-label"),w(76,"mat-select",16)(77,"mat-option"),Ee(78,"None"),S(),sa(79,bm,2,2,"mat-option",5,Td),Fq(81,"async"),S(),N4(),S()(),w(82,"oppt-form-field",3)(83,"mat-form-field"),Ce(84,"mat-label")(85,"input",17),N4(),S()()(),w(86,"div",2)(87,"oppt-form-field",18)(88,"mat-form-field"),Ce(89,"mat-label")(90,"input",19),N4(),S()(),w(91,"oppt-form-field",3)(92,"mat-form-field"),Ce(93,"mat-label")(94,"input",20),N4(),S()()(),w(95,"div",2)(96,"oppt-form-field",15)(97,"mat-form-field"),Ce(98,"mat-label"),w(99,"mat-select",21)(100,"mat-option"),Ee(101,"None"),S(),sa(102,xm,2,2,"mat-option",5,Td),Fq(104,"async"),S(),N4(),S()(),w(105,"oppt-form-field",9)(106,"mat-form-field"),Ce(107,"mat-label")(108,"input",22),N4(),S()()(),w(109,"div",2)(110,"oppt-form-field",9)(111,"mat-form-field"),Ce(112,"mat-label")(113,"input",23),N4(),S()(),w(114,"oppt-form-field",9)(115,"mat-form-field"),Ce(116,"mat-label")(117,"input",24),N4(),S()(),w(118,"oppt-form-field",9)(119,"mat-form-field"),Ce(120,"mat-label")(121,"input",25),N4(),S()(),Ce(122,"div",26),w(123,"oppt-form-field",3)(124,"mat-form-field"),Ce(125,"mat-label")(126,"input",27),N4(),S()(),w(127,"oppt-form-field",9)(128,"mat-form-field"),Ce(129,"mat-label")(130,"input",28),N4(),S()()(),w(131,"div",2)(132,"oppt-form-field",9)(133,"mat-form-field"),Ce(134,"mat-label")(135,"input",29),N4(),S()(),w(136,"oppt-form-field",9)(137,"mat-form-field"),Ce(138,"mat-label")(139,"input",30),N4(),S()(),w(140,"oppt-form-field",9)(141,"mat-form-field"),Ce(142,"mat-label")(143,"input",31),N4(),S()(),Ce(144,"div",26),w(145,"oppt-form-field",9)(146,"mat-form-field"),Ce(147,"mat-label")(148,"input",32),N4(),S()(),w(149,"oppt-form-field",9)(150,"mat-form-field"),Ce(151,"mat-label")(152,"input",33),N4(),S()()(),Ce(153,"mat-divider",34),w(154,"h4",1),Ee(155,"
3Status"),S(),w(156,"div",2)(157,"oppt-form-field",3)(158,"mat-form-field"),Ce(159,"mat-label")(160,"input",35),N4(),S()(),w(161,"oppt-form-field",9)(162,"mat-form-field"),Ce(163,"mat-label")(164,"input",36),N4(),S()(),w(165,"oppt-form-field",37)(166,"mat-form-field"),Ce(167,"mat-label")(168,"input",38),N4(),S()(),w(169,"oppt-form-field",37)(170,"mat-form-field"),Ce(171,"mat-label")(172,"input",39),N4(),S()()(),w(173,"div",2)(174,"oppt-form-field",9)(175,"mat-form-field"),Ce(176,"mat-label")(177,"input",40),N4(),S()(),w(178,"oppt-form-field",9)(179,"mat-form-field"),Ce(180,"mat-label")(181,"input",41),N4(),S()(),w(182,"oppt-form-field",9)(183,"mat-form-field"),Ce(184,"mat-label")(185,"input",42),N4(),S()()(),w(186,"div",2),Ce(187,"oppt-organization-picker",43),w(188,"oppt-form-field",3)(189,"mat-form-field")(190,"mat-label"),Ee(191),S(),Ce(192,"input",44),S()(),w(193,"oppt-form-field",37)(194,"mat-form-field"),Ce(195,"mat-label")(196,"input",45),N4(),S()()()()),i&2&&(le("formGroup",a.form)("formMetadata",a.meta),E(7),F4(),E(3),ca$1(Bq(12,6,a.service.primaryVoltageCodeObserver)),E(6),F4(),E(3),ca$1(Bq(21,8,a.service.secondaryVoltageCodeObserver)),E(7),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(3),ca$1(Bq(44,10,a.service.coreTypeCodeObserver)),E(6),F4(),E(3),ca$1(Bq(53,12,a.service.mountingTypeCodeObserver)),E(6),F4(),E(3),ca$1(Bq(62,14,a.service.protectionTypeCodeObserver)),E(7),F4(),E(3),ca$1(Bq(72,16,a.service.sizeAndTypeCodeObserver)),E(6),F4(),E(3),ca$1(Bq(81,18,a.service.bushingTypeCodeObserver)),E(6),F4(),E(5),F4(),E(4),F4(),E(5),F4(),E(3),ca$1(Bq(104,20,a.service.oilTypeCodeObserver)),E(6),F4(),E(5),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(4),F4(),E(5),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(4),F4(),E(8),F4(),E(4),F4(),E(4),F4(),E(4),F4(),E(5),F4(),E(4),F4(),E(4),F4(),E(2),le("systemId",a.entity==null?null:a.entity.systemId)("limitOrganizationTypeCodes",Rq(22,dm)),E(4),Ge$1(a.meta.getCaption("disposalDate")),E(),le("value",a.entity==null?null:a.entity.disposalDate),E(4),F4());},dependencies:[t1,dY,W_e,Y_e,eu,mY,os,kL,rZ,FZ,Tu,Cb,ns,nb,GF,Du,_7,et$1,W8],encapsulation:2,changeDetection:1});}}return t})();var ym=["formRef"],Di=(()=>{class t{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity}constructor(e){this.service=e,this.ngUnsubscribe=new P$1,this.save=new B;}ngAfterViewInit(){N$1.isNotNull(this.formRef)&&Ss(this.formRef.nativeElement,"submit").pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{this.save.emit(this.meta);});}ngOnDestroy(){this.save.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-form"]],viewQuery:function(i,a){if(i&1&&et(ym,5),i&2){let d;q(d=$())&&(a.formRef=d.first);}},inputs:{formId:"formId"},outputs:{save:"save"},standalone:false,decls:9,vars:4,consts:[["formRef",""],["novalidate","",1,"flex-pages",3,"formGroup","formMetadata","id"],["appearance","raised",1,"oppt-material-background","flex-page"],[1,"oppt-card-container"],["appearance","raised",1,"oppt-material-background","oppt-dynamic-page"]],template:function(i,a){i&1&&(w(0,"form",1,0)(2,"mat-card",2)(3,"mat-card-content"),Ce(4,"oppt-transformer-main-form"),S()(),w(5,"div",3)(6,"mat-card",4)(7,"mat-card-content"),Ce(8,"oppt-transformer-secondary-form"),S()()()()),i&2&&le("formGroup",a.form)("formMetadata",a.meta)("id",a.formId)("@fadeIn",void 0);},dependencies:[Z_e,Y_e,eu,kL,ZCe,e0e,an,mn],encapsulation:2,data:{animation:[x]},changeDetection:1});}}return t})();var Sm=t=>["/transformers",t],ln=()=>["edit"];function Tm(t,l){t&1&&(w(0,"button",6)(1,"mat-icon"),Ee(2,"mode_edit"),S()()),t&2&&le("routerLink",Rq(1,ln));}function Im(t,l){t&1&&Ce(0,"oppt-transformer-form");}function wm(t,l){t&1&&(w(0,"button",13)(1,"mat-icon"),Ee(2,"mode_edit"),S()()),t&2&&le("routerLink",Rq(1,ln));}var pn=(()=>{class t extends e$1{get transformerId(){return this.transformer.transformerId.getValue()}constructor(e,i,a,d){super(i),this.router=e,this.transformer=a,this.documentationService=d,this.canDelete=true,this.service.disabled=true;}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_transformer_setup");}canDeactivate(){return !this.service||this.service.loading.getValue()?true:!this.service.busy.getValue()}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(wi$2),ce(ci$1),ce(v$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-detail"]],standalone:false,features:[Ae],decls:23,vars:17,consts:[["opptToolbarColor","primary-darker","opptBackgroun
3d","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Help with transformer attributes",3,"click"],["aria-label","Help with transformer attributes"],["opptBottomRightFab",""],["mat-fab","","color","accent","aria-label","Edit transformer attributes","type","button",1,"oppt-hide-gt-md",3,"routerLink"],[1,"oppt-flex-space","oppt-primary-darker"],[1,"page-content"],[1,"flex-row"],[1,"flex-min-200"],[1,"oppt-fab-space"],[1,"oppt-fab-right-section","flex-max-200","oppt-hide-lt-lg","flex-row","flex-place-end-center"],["mat-fab","","color","accent","aria-label","Edit transformer attributes","type","button",3,"routerLink"]],template:function(i,a){i&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S()(),w(5,"h3",2),Ee(6,"Transformer attributes"),S(),w(7,"button",3),he("click",function(){return a.showDocumentation()}),w(8,"mat-icon",4),Ee(9,"help"),S()(),w(10,"div",5),be(11,Tm,3,2,"button",6),Fq(12,"async"),S(),Ce(13,"div",7),w(14,"div",8)(15,"div",9)(16,"div",10),be(17,Im,1,0,"oppt-transformer-form"),Fq(18,"async"),Ce(19,"div",11),S(),w(20,"div",12),be(21,wm,3,2,"button",13),Fq(22,"async"),S()()()()),i&2&&(le("opptBusy",Bq(1,7,a.busy))("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(2),le("routerLink",Uw(15,Sm,a.transformerId)),E(9),ye(Bq(12,9,a.canEdit)?11:-1),E(6),ye(Bq(18,11,a.showForm)?17:-1),E(4),ye(Bq(22,13,a.canEdit)?21:-1));},dependencies:[hZ,ec,jCe,wu,Ml,fv,Di,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:8px}.oppt-flex-space[_ngcontent-%COMP%]{position:absolute;height:220px;width:100%}.oppt-fab-right-section[_ngcontent-%COMP%]{height:240px;margin-left:8px}"],changeDetection:1});}}return t})();var cn=(()=>{class t{constructor(e,i,a,d,_){this.service=e,this.session=i,this.router=a,this.route=d,this.transformer=_,this.ngUnsubscribe=new P$1,this.onBeforeChangeSystemId=S=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){S.cancel("Busy, please wait");return}this.service.form.dirty&&S.cancel("Unsaved changes");}},e.disabled=true;}
3ngAfterViewInit(){this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId),this.transformer.transformerId.pipe(Oe(this.ngUnsubscribe),Se(N$1.isNotNull),Dt(e=>this.service.resolve(e)),ue(e=>{if(!this.session.setSystemId(e.systemId))throw new Error("system change not available");return e}),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.log(e),this.router.navigate(["/transformers"]);}),this.session.systemIdObserver.pipe(Se(e=>N$1.isNotNull(this.service.entity)&&e!==this.service.entity.systemId),Oe(this.ngUnsubscribe)).subscribe(e=>{this.router.navigate(["/transformers"]);});}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(wi$2),ce(Lb),ce(Ki),ce(ko$1),ce(ci$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-setup"]],standalone:false,features:[Ve([wi$2])],decls:1,vars:0,consts:[[1,"oppt-host"]],template:function(i,a){i&1&&Ce(0,"router-outlet",0);},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();var Dm=t=>["/transformers",t];function Mm(t,l){if(t&1&&(w(0,"button",3),Fq(1,"async"),Ee(2,"Save"),S()),t&2){let e=X$1();le("disabled",Bq(1,1,e.cannotSave));}}function km(t,l){if(t&1){let e=gn$1();w(0,"oppt-transformer-form",11),he("save",function(){Ct(e);let a=X$1();return wt(a.save())}),S();}}var dn=(()=>{class t extends e$1{get transformerId(){return this.transformer.transformerId.getValue()}constructor(e,i,a,d){super(i),this.router=e,this.transformer=a,this.dialog=d,this.ngUnsubscribe=new P$1,this.service.disabled=false;}ngAfterViewInit(){Kt$1(this.service.formChanges,this.transformer.entityChanges).pipe(Oe(this.ngUnsubscribe)).subscribe(e=>{N$1.isNull(this.transformer.entity)||N$1.isNull(this.service.entity)||this.service.canEdit.getValue()||this.router.navigate(["/transformers",this.transformerId,"attributes"]);});}save(){this.service.save().subscribe(e=>{e.resultType!=="Failure"&&(this.transformer.refresh().subscribe(i=>{},i=>console.log(i)),this.router.navigate(["/transformers",this.transformerId]));});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardChanges().pipe(Rn$1(e=>{e&&N$1.isNotNull(this.service.entity)&&this.service.clear();})):true}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(wi$2),ce(ci$1),ce(Mu))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-edit"]],standalone:false,features:[Ae],decls:17,vars:14,consts:[["opptToolbarColor","primary-darker","opptBackground","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-flat-button","","color","accent","type","submit","form","transformerEdit",3,"disabled"],[1,"oppt-flex-space","oppt-primary-darker"],[1,"page-content"],[1,"flex-row"],[1,"flex-min-200"],["formId","transformerEdit"],[1,"oppt-fab-space"],[1,"oppt-fab-right-section","flex-max-200","oppt-hide-lt-lg"],["formId","transformerEdit",3,"save"]],template:function(i,a){i&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S()(),w(5,"h3",2),Ee(6,"Transformer attributes"),S(),be(7,Mm,3,3,"button",3),Fq(8,"async"),Ce(9,"div",4),w(10,"div",5)(11,"div",6)(12,"div",7),be(13,km,1,0,"oppt-transformer-form",8),Fq(14,"async"),Ce(15,"div",9),S(),Ce(16,"div",10),S()()()),i&2&&(le("opptBusy",Bq(1,6,a.busy))("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(2),le("routerLink",Uw(12,Dm,a.transformerId)),E(5),ye(Bq(8,8,a.showForm)?7:-1),E(6),ye(Bq(14,10,a.showForm)?13:-1));},dependencies:[hZ,Tr,ec,wu,fv,Di,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:8px}.oppt-flex-space[_ngcontent-%COMP%]{position:absolute;height:220px;width:100%}.oppt-fab-right-section[_ngcontent-%COMP%]{height:240px;margin-left:8px}"],changeDetection:1});}}return t})();var fn=[{path:"attributes",component:cn,children:[{path:"",pathMatch:"full",component:pn,
3canDeactivate:[b]},{path:"edit",pathMatch:"full",component:dn,canDeactivate:[b],canActivate:[T],canActivateChild:[T],data:{claim:["TransformerEdit","Transformer"]}}]}];var un=(()=>{class t{constructor(e,i){this.route=e,this.router=i;}ngAfterViewInit(){this.router.navigate(["transformers"]);}static{this.\u0275fac=function(i){return new(i||t)(ce(ko$1),ce(Ki))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-transformer-find"]],standalone:false,decls:0,vars:0,template:function(i,a){},encapsulation:2,changeDetection:1});}}return t})();var hn=(()=>{class t{get mode(){return this.cache.retrieveInMemory("transformerDashboardMode","dashboard")}set mode(e){this.cache.stashInMemory("transformerDashboardMode",e);}constructor(e,i,a,d){this.transformerService=e,this.session=i,this.router=a,this.cache=d,this.ngUnsubscribe=new P$1;}resolve(e){let i=e.queryParamMap.get("transformerNumber"),a=e.queryParamMap.get("search");if(N$1.isNotNullOrEmpty(i)){let d=new v;return d.systemId=this.session.systemId,d.transformerNumbers=[i],d.pageSize=1,this.transformerService.search(d).pipe(Be(1),Oe(this.ngUnsubscribe),ue(_=>_.totalRecords===1?(this.router.navigate(["transformers",_.list[0].transformerId]),null):(this.router.navigate(["transformers","search"]),this.resolveSearch(i))),jn$2(_=>(console.error("Error fetching transformer number",_),this.resolveSearch(i))))}return this.resolveSearch(a)}resolveSearch(e){let i=new Be$1;return i.systemId=this.session.systemId,N$1.isNotNullOrEmpty(e)&&(i.defaultSearch=e),this.cache.stashInMemory("transformerDashboardMode","list"),this.cache.stashInMemory("transformerDashboardAdvancedCriteria",i),this.router.navigate(["/transformers"],{queryParams:{}}),Y$1(true)}static{this.\u0275fac=function(i){return new(i||t)(pe(K$1),pe(Lb),pe(Ki),pe(Pb))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();var Em=[{path:"",component:Br,children:[{path:"search",component:un,resolve:{searchResults:hn}},{path:"",pathMatch:"full",component:$r}]},{path:":transformerId",component:qr,children:[{path:"",pathMatch:"full",component:rn,canDeactivate:[b]},...fn,...f,{path:"reports",component:on},{path:"actions",loadChildren:()=>import('./chunk-BNwX4E8o.js').then(t=>t.TransformerActionsModule),canActivate:[T],canActivateChild:[T]},{path:"events",loadChildren:()=>import('./chunk-DZEc0Jfx.js').then(t=>t.TransformerEventsModule),canActivate:[T],canActivateChild:[T]},{path:"**",redirectTo:""}]}],vn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({imports:[SW.forChild(Em),SW]});}}return t})();var Cn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({imports:[_1e,s,SW]});}}return t})();var gn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({imports:[_1e,SW,s,l]});}}return t})();var bn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({imports:[_1e,SW]});}}return t})();var xn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({providers:[Ge],imports:[_1e]});}}return t})();var _d=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne$1({type:t});}static{this.\u0275inj=J({providers:[K$1,Bt,Et,Ke,wi],imports:[_1e,vn,bn,Cn,gn,l,Nc,jn$1,Ce$1,s,xn,Gr]});}}return t})();var chunkWG2ZJFAC=/*#__PURE__*/Object.freeze({__proto__:null,TransformersModule:_d});export{Gr as G,P,Ut as U,chunkWG2ZJFAC as c,fe as f};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.