1"use strict";(self.webpackChunkchd_mirame_web=self.webpackChunkchd_mirame_web||[]).push([[8978],{8306:(X,U,d)=>{d.d(U,{b:()=>w});var f=d(7470),p=d(5e3);let w=(()=>{class D{constructor(){}minMaxValidation(g,x){return T=>{var r,N;let h=!1;if(void 0!==T){let u=null===(r=T.get(g))||void 0===r?void 0:r.value,t=null===(N=T.get(x))||void 0===N?void 0:N.value;null!==u&&null!==t&&""!==u.trim()&&""!==t.trim()&&Number(f.c.convertFormattedNumber(u.toString()))>Number(f.c.convertFormattedNumber(t.toString()))&&(h=!0)}return h?{minMaxError:!0}:null}}iniEndValidationDate(g,x){return T=>{var r,N;let h=!1;if(void 0!==T){let u=null===(r=T.get(g))||void 0===r?void 0:r.value,t=null===(N=T.get(x))||void 0===N?void 0:N.value;if(null!==u&&null!==t){let C=new Date(u),M=new Date(t);C.getTime()>M.getTime()&&(h=!0)}}return h?{iniEndDateError:!0}:null}}surfaceValidation(g,x,T){return r=>{var N,h,u;let t=!1;if(void 0!==r){let C=null===(N=r.get(g))||void 0===N?void 0:N.value,M=null===(h=r.get(x))||void 0===h?void 0:h.value,Z=null===(u=r.get(T))||void 0===u?void 0:u.value;if(f.c.isNullorEmpty(C))(!f.c.isNullorEmpty(M)||!f.c.isNullorEmpty(Z))&&(t=!0);else if(f.c.isNullorEmpty(M))(f.c.isNullorEmpty(Z)||C!=Z)&&(t=!0);else if(f.c.isNullorEmpty(Z))C!=M&&(t=!0);else{let A=Number(f.c.convertFormattedNumber(C.toString())),H=Number(f.c.convertFormattedNumber(M.toString()))+Number(f.c.convertFormattedNumber(Z.toString()));H=Math.round(1e4*H)/1e4,(A<H||A>H)&&(t=!0)}}return t?{surfaceError:!0}:null}}}return D.\u0275fac=function(g){return new(g||D)},D.\u0275prov=p.Yz7({token:D,factory:D.\u0275fac,providedIn:"root"}),D})()},9555:(X,U,d)=>{d.d(U,{B:()=>M});var f=d(3179),p=d(5e3),w=d(60),D=d(4623),v=d(508),g=d(7278),x=d(7238),T=d(4894),r=d(3718);function N(Z,A){1&Z&&(p.TgZ(0,"span"),p._uU(1,"\xa0"),p.qZA())}function h(Z,A){1&Z&&(p.TgZ(0,"span"),p._uU(1,"\xa0"),p.qZA())}function u(Z,A){if(1&Z&&(p.TgZ(0,"span",7),p._uU(1),p.ALo(2,"number"),p.YNc(3,h,2,0,"span",4),p._uU(4),p.ALo(5,"translate"),p.qZA()),2&Z){const E=p.oxw(2);p.xp6(1),p.Oqu(p.xi3(2,3,E.elem,E.numberConstant)),p.xp6(2),p.Q6J("ngIf",E.unit),p.xp6(1),p.Oqu(p.lcZ(5,6,E.unit))}}function t(Z,A){if(1&Z&&(p.TgZ(0,"span",7),p._uU(1),p.ALo(2,"number"),p.ALo(3,"transformValue"),p.ALo(4,"transformValue"),p.qZA()),2&Z){const E=p.oxw(2);p.xp6(1),p.AsE(" ",p.xi3(2,2,p.xi3(3,5,E.elem,E.transformAction).value,E.numberConstant)," ",p.xi3(4,8,E.elem,E.transformAction).units," ")}}function C(Z,A){if(1&Z&&(p.TgZ(0,"mat-list-item",1)(1,"div",2)(2,"span",3),p.ALo(3,"translate"),p._uU(4),p.ALo(5,"translate"),p.YNc(6,N,2,0,"span",4),p._uU(7),p.qZA(),p.YNc(8,u,6,8,"span",5),p.YNc(9,t,5,11,"ng-template",null,6,p.W1O),p.qZA()()),2&Z){const E=p.MAs(10),_=p.oxw();p.xp6(2),p.s9C("matTooltip",p.lcZ(3,6,_.tooltip)),p.xp6(2),p.Oqu(p.lcZ(5,8,_.label)),p.xp6(2),p.Q6J("ngIf",_.labelExtend),p.xp6(1),p.Oqu(_.labelExtend),p.xp6(1),p.Q6J("ngIf",!_.transformAction)("ngIfElse",E)}}let M=(()=>{class Z{constructor(){this.label="",this.labelExtend="",this.tooltip="",this.numberConstant=f.C.numRed}ngOnInit(){}}return Z.\u0275fac=function(E){return new(E||Z)},Z.\u0275cmp=p.Xpm({type:Z,selectors:[["app-mat-list-item-number"]],inputs:{elem:"elem",label:"label",labelExtend:"labelExtend",tooltip:"tooltip",numberConstant:"numberConstant",unit:"unit",transformAction:"transformAction"},decls:1,vars:1,consts:[["class","bar-gradient-float-right",4,"ngIf"],[1,"bar-gradient-float-right"],["matLine",""],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[4,"ngIf"],["class","float-end text-wrap",4,"ngIf","ngIfElse"],["transformElem",""],[1,"float-end","text-wrap"]],template:function(E,_){1&E&&p.YNc(0,C,11,10,"mat-list-item",0),2&E&&p.Q6J("ngIf",null!=_.elem)},directives:[w.O5,D.Tg,v.X2,g.M,x.gM],pipes:[T.X$,w.JJ,r.V],styles:[""]}),Z})()},3279:(X,U,d)=>{d.d(U,{f:()=>h});var f=d(5e3),p=d(60),w=d(4623),D=d(508),v=d(7278),g=d(7238),x=d(4894);function T(u,t){1&u&&(f.TgZ(0,"span"),f._uU(1,"\xa0"),f.qZA())}function r(u,t){1&u&&(f.TgZ(0,"span"),f._uU(1,"\xa0"),f.qZA())}function N(u,t){if(1&u&&(f.TgZ(0,"mat-list-item",1)(1,"div",2)(2,"span",3),f.ALo(3,"translate"),f._uU(4),f.ALo(5,"translate"),f.YNc(6,T,2,0,"span",4),f._uU(7),f.qZA(),f.TgZ(8,"span",5),f._uU(9),f.YNc(10,r,2,0,"span",4),f._uU(11),f.ALo(12,"translate"),f.qZA()()()),2&u){const C=f.oxw();f.xp6(2),f.s9C("matTooltip",f.lcZ(3,7,C.tooltip)),f.xp6(2),f.Oqu(f.lcZ(5,9,C.label)),f.xp6(2),f.Q6J("ngIf",C.labelExtend),f.xp6(1),f.Oqu(C.labelExtend),f.xp6(2),f.hij("",C.elem," "),f.xp6(1),f.Q6J("ngIf",C.unit),f.xp6(1),f.Oqu(f.lcZ(12,11,C.unit))}}let h=(()=>{class u{constructor(){this.label="",this.labelExtend="",this.tooltip=""}
1ngOnInit(){}}return u.\u0275fac=function(C){return new(C||u)},u.\u0275cmp=f.Xpm({type:u,selectors:[["app-mat-list-item-text"]],inputs:{elem:"elem",label:"label",labelExtend:"labelExtend",tooltip:"tooltip",unit:"unit"},decls:1,vars:1,consts:[["class","bar-gradient-float-right comentarios",4,"ngIf"],[1,"bar-gradient-float-right","comentarios"],["matLine",""],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[4,"ngIf"],[1,"float-end","text-wrap"]],template:function(C,M){1&C&&f.YNc(0,N,13,13,"mat-list-item",0),2&C&&f.Q6J("ngIf",M.elem)},directives:[p.O5,w.Tg,D.X2,v.M,g.gM],pipes:[x.X$],styles:[".comentarios[_ngcontent-%COMP%]{padding:10px 0!important;height:auto!important}"]}),u})()},2810:(X,U,d)=>{d.d(U,{J:()=>w});var f=d(5e3),p=d(7663);let w=(()=>{class D{constructor(){this.chartSize={width:250,height:250}}ngOnInit(){}}return D.\u0275fac=function(g){return new(g||D)},D.\u0275cmp=f.Xpm({type:D,selectors:[["app-pie-chart"]],inputs:{chartData:"chartData",chartOptions:"chartOptions",chartSize:"chartSize"},decls:1,vars:4,consts:[["type","pie",3,"width","height","data","options"]],template:function(g,x){1&g&&f._UZ(0,"p-chart",0),2&g&&(f.s9C("width",x.chartSize.width),f.s9C("height",x.chartSize.width),f.Q6J("data",x.chartData)("options",x.chartOptions))},directives:[p.C],styles:[""]}),D})()},3718:(X,U,d)=>{d.d(U,{V:()=>w});var f=d(5e3),p=d(4894);let w=(()=>{class D{constructor(g){this.translate=g}transform(g,x){let T={};switch(x){case"transformArea":T=this.transformArea(g);break;case"transformVolume":T=this.transformVolume(g);break;case"transformVolumeSingle":T=this.transformVolumeSingle(g);break;case"transformAreaHa":T=this.transformAreaHa(g);break;case"transformVolumeM3":T=this.transformVolumeM3(g);break;case"transformVolumeM3Ha":T=this.transformVolumeM3Ha(g)}return T}transformArea(g){let x=this.translate.instant("unidades.km2");return g<1&&(g*=1e6,x=this.translate.instant("unidades.m2")),{value:g,units:x}}transformAreaHa(g){let x=this.translate.instant("unidades.ha");return g<1&&(g*=1e4,x=this.translate.instant("unidades.m2")),{value:g,units:x}}transformVolume(g){let x=this.translate.instant("unidades.m3Anyo");return g>1e6&&(g/=1e6,x=this.translate.instant("unidades.hm3Anyo")),{value:g,units:x}}transformVolumeSingle(g){let x=this.translate.instant("unidades.m3");return g>1e6&&(g/=1e6,x=this.translate.instant("unidades.hm3")),{value:g,units:x}}transformVolumeM3Ha(g){let x=this.translate.instant("unidades.m3Ha");return g>1e6&&(g/=1e6,x=this.translate.instant("unidades.hm3Ha")),{value:g,units:x}}transformVolumeM3(g){let x=this.translate.instant("unidades.m3");return g>1e6&&(g/=1e6,x=this.translate.instant("unidades.hm3")),{value:g,units:x}}}return D.\u0275fac=function(g){return new(g||D)(f.Y36(p.sK,16))},D.\u0275pipe=f.Yjl({name:"transformValue",type:D,pure:!0}),D})()},8978:(X,U,d)=>{d.r(U),d.d(U,{ExtractionsModule:()=>vc,HttpLoaderFactory:()=>Zt});var f=d(4486),p=d(4894),w=d(40),D=d(520),v=d(3932),g=d(8976),x=d(7579),T=d(2722),r=d(3179);class N{constructor(c,e,i){this.newSearch=c,this.count=e,this.data=i}}var h=d(60),u=d(7470),t=d(5e3),C=d(3280),M=d(9027),Z=d(1250),A=d(4834),E=d(5861),_=d(3075),H=d(8825),L=d(4107),At=d(2260),W=d(4209),Et=d(9547),P=d(7322),$=d(8833),k=d(508),B=d(7238),Q=d(7318),J=d(7423),I=d(5397);function Ot(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numEntero")))}function Dt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombreProvincia," ")}}function Nt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombreMunicipio," ")}}function It(n,c){1&n&&(t.TgZ(0,"h3")(1,"b"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t._UZ(4,"i",28),t.qZA()),2&n&&(t.xp6(2),t.hij("",t.lcZ(3,1,"extractions.data.ocultarBusqueda")," "))}function yt(n,c){1&n&&(t.TgZ(0,"h3")(1,"b"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t._UZ(4,"i",29),t.qZA()),2&n&&(t.xp6(2),t.hij("",t.lcZ(3,1,"extractions.data.ocultarBusqueda")," "))}function Mt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}
1function Pt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function qt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function St(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Ut(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function wt(n,c){if(1&n&&(t.TgZ(0,"mat-option",47),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Lt(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij("",t.lcZ(2,1,"validacionForm.requerido")," "))}function Jt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Rt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Vt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Ft(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.requerido")))}function Bt(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Qt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Yt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function kt(n,c){if(1&n&&(t.TgZ(0,"mat-option",10),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Gt(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.requerido")))}function Ht(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function $t(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"div",3)(2,"div",4)(3,"mat-form-field",5)(4,"mat-label"),t._uU(5),t.ALo(6,"translate"),t.qZA(),t._UZ(7,"input",30),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",4)(10,"mat-form-field",5)(11,"mat-label"),t._uU(12),t.ALo(13,"translate"),t.qZA(),t._UZ(14,"input",31),t.ALo(15,"translate"),t.qZA()(),t.TgZ(16,"div",4)(17,"mat-form-field",5)(18,"mat-label"),t._uU(19),t.ALo(20,"translate"),t.qZA(),t.TgZ(21,"mat-select",32),t._UZ(22,"mat-option",10),t.YNc(23,Mt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(24,"div",4)(25,"mat-form-field",5)(26,"mat-label"),t._uU(27),t.ALo(28,"translate"),t.qZA(),t.TgZ(29,"mat-select",33),t._UZ(30,"mat-option",10),t.YNc(31,Pt,2,2,"mat-option",11),t.qZA()()()(),t.TgZ(32,"div",3)(33,"div",4)(34,"mat-form-field",5)(35,"mat-label"),t._uU(36),t.ALo(37,"translate"),t.qZA(),t.TgZ(38,"mat-select",34),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().getComboSubtipo(a)}),t._UZ(39,"mat-option",10),t.YNc(40,qt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(41,"div",4)(42,"mat-form-field",5)(43,"mat-label"),t._uU(44),t.ALo(45,"translate"),t.qZA(),t.TgZ(46,"mat-select",35),t._UZ(47,"mat-option",10),t.YNc(48,St,2,2,"mat-option",11),t.qZA()()(),t.TgZ(49,"div",4)(50,"mat-form-field",5)(51,"mat-label"),t._uU(52),t.ALo(53,"translate"),t.qZA(),t.TgZ(54,"mat-select",36),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().getMasasAgua(a)}),t._UZ(55,"mat-option",10),t.YNc(56,Ut,2,2,"mat-option",11),t.qZA()()(),t.TgZ(57,"div",4)(58,"mat-form-field",5),t._UZ(59,"mat-label"),t.TgZ(60,"mat-select",37),t._UZ(61,"mat-option",10),t.YNc(62,wt,2,3,"mat-option",38),t.qZA(),t.YNc(63,Lt,3,3,"mat-error",8),t.qZA()()(),t.TgZ(64,"div",3)(65,"div",4)(66,"mat-form-field",5)(67,"mat-label"),t._uU(68),t.ALo(69,"translate"),t.qZA(),t.TgZ(70,"mat-select",39),t._UZ(71,"mat-option",10),t.YNc(72,Jt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(73,"div",4)(74,"mat-form-field",5)(75,"mat-label"),t._uU(76),t.ALo(77,"translate"),t.qZA(),t.TgZ(78,"mat-select",40),t._UZ(79,"mat-option",10),t.YNc(80,Rt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(81,"div",4)(82,"mat-form-field",5)(83,"mat-label"),t._uU(84),t.ALo(85,"translate"),t.qZA(),t.TgZ(86,"mat-select",41),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().activarCampoProfundidad(a)}),t._UZ(87,"mat-option",10),t.YNc(88,Vt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(89,"div",4)(90,"mat-form-field",5),t._UZ(91,"input",42),t.YNc(92,Ft,3,3,"mat-error",8),t.YNc(93,Bt,3,3,"mat-error",8),t.qZA()()(),t.TgZ(94,"div",3)(95,"div",4)(96,"mat-form-field",5)(97,"mat-label"),t._uU(98),t.ALo(99,"translate"),t.qZA(),t.TgZ(100,"mat-select",43),t._UZ(101,"mat-option",10),t.YNc(102,Qt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(103,"div",4)(104,"mat-form-field",5)(105,"mat-label"),t._uU(106),t.ALo(107,"translate"),t.qZA(),t.TgZ(108,"mat-select",44),t._UZ(109,"mat-option",10),t.YNc(110,Yt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(111,"div",4)(112,"mat-form-field",5)(113,"mat-label"),t._uU(114),t.ALo(115,"translate"),t.qZA(),t.TgZ(116,"mat-select",45),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().activarCampoVolumen(a)}),t._UZ(117,"mat-option",10),t.YNc(118,kt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(119,"div",4)(120,"mat-form-field",5),t._UZ(121,"input",46),t.YNc(122,Gt,3,3,"mat-error",8),t.YNc(123,Ht,3,3,"mat-error",8),t.qZA()()()()}if(2&n){const e=t.oxw();let i,a,o,l,s;t.xp6(5),t.Oqu(t.lcZ(6,32,"extractions.busqueda.formulario.codIntegra")),t.xp6(2),t.s9C("placeholder",t.lcZ(8,34,"formBusqueda.plcHldrCodigo")),t.xp6(5),t.Oqu(t.lcZ(13,36,"extractions.busqueda.formulario.codAlberca")),t.xp6(2),t.s9C("placeholder",t.lcZ(1
15,38,"formBusqueda.plcHldrCodigo")),t.xp6(5),t.Oqu(t.lcZ(20,40,"extractions.busqueda.formulario.subzona")),t.xp6(4),t.Q6J("ngForOf",e.comboSubZona),t.xp6(4),t.Oqu(t.lcZ(28,42,"extractions.busqueda.formulario.situacion")),t.xp6(4),t.Q6J("ngForOf",e.comboSituacion),t.xp6(5),t.Oqu(t.lcZ(37,44,"extractions.busqueda.formulario.tipoCaptacion")),t.xp6(4),t.Q6J("ngForOf",e.comboTipoCaptacion),t.xp6(4),t.Oqu(t.lcZ(45,46,"extractions.busqueda.formulario.subtipo")),t.xp6(4),t.Q6J("ngForOf",e.comboSubtipo),t.xp6(4),t.hij("",t.lcZ(53,48,"extractions.busqueda.formulario.tipoMasaAgua")," "),t.xp6(4),t.Q6J("ngForOf",e.tipoMasaAguaCombo),t.xp6(6),t.Q6J("ngForOf",e.masasAguaCombo),t.xp6(1),t.Q6J("ngIf",null==(i=e.searchGroup.get("masaAguaAsociada"))?null:i.hasError),t.xp6(5),t.Oqu(t.lcZ(69,50,"extractions.busqueda.formulario.tipoUso")),t.xp6(4),t.Q6J("ngForOf",e.comboUsos),t.xp6(4),t.Oqu(t.lcZ(77,52,"extractions.busqueda.formulario.contador")),t.xp6(4),t.Q6J("ngForOf",e.comboContador),t.xp6(4),t.Oqu(t.lcZ(85,54,"extractions.busqueda.formulario.profundidad")),t.xp6(4),t.Q6J("ngForOf",e.operadorLogisticoCombo),t.xp6(4),t.Q6J("ngIf",null==(a=e.searchGroup.get("profundidad"))?null:a.hasError("required")),t.xp6(1),t.Q6J("ngIf",null==(o=e.searchGroup.get("profundidad"))?null:o.hasError("pattern")),t.xp6(5),t.Oqu(t.lcZ(99,56,"extractions.busqueda.formulario.subcaptacion")),t.xp6(4),t.Q6J("ngForOf",e.comboSubcaptacionSN),t.xp6(4),t.Oqu(t.lcZ(107,58,"extractions.busqueda.formulario.captacionEmergencia")),t.xp6(4),t.Q6J("ngForOf",e.comboEmergenciaSN),t.xp6(4),t.Oqu(t.lcZ(115,60,"extractions.busqueda.formulario.volumen")),t.xp6(4),t.Q6J("ngForOf",e.operadorLogisticoCombo),t.xp6(4),t.Q6J("ngIf",null==(l=e.searchGroup.get("volumen"))?null:l.hasError("required")),t.xp6(1),t.Q6J("ngIf",null==(s=e.searchGroup.get("volumen"))?null:s.hasError("pattern"))}}const zt=function(n){return{active:n}};function jt(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"label",48),t._UZ(2,"input",49),t.TgZ(3,"i",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleValActivation()}),t.ALo(4,"translate"),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(3),t.s9C("matTooltip",t.lcZ(4,2,"formBusqueda.filtrar")),t.Q6J("ngClass",t.VKq(4,zt,e.isActive))}}function Xt(n,c){1&n&&t._UZ(0,"app-spinner")}const Wt=function(){return["2"]};let Kt=(()=>{class n{constructor(e,i,a,o,l,s,m,b){this.searchStatusService=e,this.globalService=i,this.temporaryStorageService=a,this.fb=o,this.rolesService=l,this.router=s,this.activatedRoute=m,this.extractionsService=b,this.typeKey="",this.newSearchEvent=new t.vpe,this.disabledReportButton=!0,this.perfilUsuario="",this.stop$=new x.x,this.provinces=[],this.municipalities=[],this.combosCharged=!1,this.matcher=new H.o,this.isActive=!1,this.isActiveBusqueda=!1,this.globalService.getProvinces().subscribe(O=>{this.provinces=O}),this.rolesService.profile$.pipe((0,T.R)(this.stop$)).subscribe(O=>{this.perfilUsuario=O})}ngOnInit(){this.temporaryStorage=this.temporaryStorageService.forKey(this.typeKey+"_search_form"),this.createForm(),this.restoreFromTemporaryStorage(),this.extractionsService.combosBusquedaSubject$.pipe((0,T.R)(this.stop$)).subscribe(e=>{this.comboSituacion=e.find(i=>i.listado===r.C.COMBO_SITUACION_EXTRACCION).data,this.comboSubcaptacionSN=e.find(i=>i.listado===r.C.COMBO_SI_NO_SIN_CAT).data,this.comboEmergenciaSN=e.find(i=>i.listado===r.C.COMBO_SI_NO_SIN_CAT).data,this.comboContador=e.find(i=>i.listado===r.C.COMBO_CONTADOR_EXTRACCION).data,this.operadorLogisticoCombo=e.find(i=>i.listado===r.C.COMBO_OPERADOR_LOGICO).data,this.comboTipoCaptacion=e.find(i=>i.listado===r.C.COMBO_TIPO_CAPTACION).data,this.comboSubZona=e.find(i=>i.listado===r.C.COMBO_TIPO_SUBZONAS_PROPUESTAS).data,this.comboProfundidadMMI=e.find(i=>i.listado===r.C.COMBO_OPERADOR_LOGICO).data,this.tipoMasaAguaCombo=e.find(i=>i.listado===r.C.COMBO_TIPOLOGIA_MASAS_AGUA_RELACIONADAS).data,this.comboUsos=e.find(i=>i.listado===r.C.COMBO_USOS_EXTRACCIONES).data,this.combosCharged=!0})}createForm(){this.searchGroup=this.fb.group({nombre:this.fb.control({value:"",disabled:!1}),codigo:this.fb.control({value:"",disabled:!1},_.kI.pattern(r.C.regExpNumEntCodePatternAndSpaceFormatted)),provincia:this.fb.control({value:"",disabled:!1}),municipio:this.fb.control({value:"",disabled:!0}),codIntegra:this.fb.control({value:"",disabled:!1}),codAlberca:this.fb.control({value:"",disabled:!1}),uso:this.fb.control({value:"",disabled:!1}),situacion:this.fb.control({value:"",disabled:!1}),subcaptacion:this.fb.control({value:"",disabled:!1}),captacionEmergencia:this.fb.control({value:"",disabled:!1}),contador:this.fb.control({value:"",disabled:!1}),operadorLogisticoCombo:this.fb.control({value:"",disabled:!1}),tipoCaptacion:this.fb.control({value:"",disabled:!1}),subtipo:this.fb.control({value:"",disabled:!0}),subzona:this.fb.control({value:"",disabled:!1}),tipoProfundidad:this.fb.control({value:"",disabled:!1}),profundidad:this.fb.control({value:"",disabled:!0},[_.kI.required,_.kI.pattern(r.C.regExpNumFormatted)]),volumen:this.fb.control({value:"",disabled:!0},[_.kI.required,_.kI.pattern(r.C.regExpNumFormatted)]),tipoMasaAgua:this.fb.control({value:"",disabled:!1}),masaAguaAsociada:this.fb.control({value:"",disabled:!0},_.kI.required),tipoVolumen:this.fb.control({value:"",disabled:!1}),validadorActivado:this.fb.control({value:!1,disabled:!0})}),this.perfilUsuario===r.C.perfilValidador&&this.searchGroup.get("validadorActivado").enable(),this.initialValues=this.searchGroup.value}onSubmit(){this.searchGroup.invalid||(this.sendNewSearch(Object.assign({},this.searchGroup.value)),this.searchStatusService.searchChange(!0),this.temporaryStorage.remove(),this.saveToTemporaryStorage(this.searchGroup.value))}sendNewSearch(e){this.newSearchEvent.emit(e)}restoreFromTemporaryStorage(){var e=this;return(0,E.Z)(function*(){var i;let a=yield e.temporaryStorage.get();if(a){for(const l in a){let s=a[l];if(null===(i=e.searchGroup.get(l))||void 0===i||i.setValue(s),"provincia"!==l||u.c.isNullorEmpty(s)||u.c.isUndefined(s))if("validadorActivado"===l)e.isActive=!0===s;else if("tipoMasaAgua"!==l||u.c.isNullorEmpty(s)||u.c.isUndefined(s))if("tipoCaptacion"!==l||u.c.isNullorEmpty(s)||u.c.isUndefined(s))if("tipoVolumen"!==l||u.c.isNullorEmpty(s)||u.c.isUndefined(s)){if("tipoProfundidad"===l&&!u.c.isNullorEmpty(s)&&!u.c.isUndefined(s)){let m;yield e.activarCampoProfundidad(new L.mG(m,s))}}else{let m;yield e.activarCampoVolumen(new L.mG(m,s))}else{let m;yield e.getComboSubtipo(new L.mG(m,s))}else{let m;yield e.getMasasAgua(new L.mG(m,s))}else{let m;yield e.getMunicipalities(new L.mG(m,s))}}let o=new Map;o.set("camposDeshabilitados",["uso","masaAguaAsociada","subtipo","volumen","profundidad"]),e.isActiveBusqueda=u.c.checkOpenExtendedSearch(e.searchGroup,o),e.onSubmit()}})()}activarCampoUso(e){null!=e.value&&null!=e.value?this.searchGroup.get("uso").enable():(this.searchGroup.get("uso").disable(),this.searchGroup.controls.uso.setValue(""))}saveToTemporaryStorage(e){this.temporaryStorage.set(e)}getMunicipalities(e){var i=this;return(0,E.Z)(function*(){return i.searchGroup.controls.municipio.setValue(""),new Promise(a=>{null!=e.value&&null!=e.value?i.globalService.getMunicipalitiesByProvId(e.value).subscribe(o=>{i.municipalities=o,i.searchGroup.get("municipio").enable(),a()}):(i.searchGroup.get("municipio").disable(),i.municipalities=[],a())})})()}generateReport(){this.router.navigate(["./report"],{relativeTo:this.activatedRoute,state:this.searchGroup.value})}toggleValActivation(){this.isActive=!this.isActive}resetForm(){this.searchGroup.reset(this.initialValues),this.isActive=!1,this.searchGroup.get("masaAguaAsociada").disable(),this.searchGroup.get("subtipo").disable(),this.searchGroup.get("volumen").disable(),this.searchGroup.get("profundidad").disable()}getMasasAgua(e){var i=this;return(0,E.Z)(function*(){return new Promise(a=>{null!=e.value&&null!=e.value?(i.searchGroup.controls.masaAguaAsociada.setValue(""),i.searchGroup.get("masaAguaAsociada").disable(),i.extractionsService.getComboMasasRelacionadas(e.value).subscribe(o=>{i.masasAguaCombo=o.find(l=>l.listado===r.C.COMBO_MASAS_AGUA_RELACIONADAS).data,i.searchGroup.get("masaAguaAsociada").enable()})):(i.masasAguaCombo=[],i.searchGroup.controls.masaAguaAsociada.setValue(""),i.searchGroup.get("masaAguaAsociada").disable()),a()})})()}getComboSubtipo(e){var i=this;return(0,E.Z)(function*(){return new Promise(a=>{null!=e.value&&null!=e.value?(i.searchGroup.controls.subtipo.setValue(""),i.searchGroup.get("subtipo").disable(),i.extractionsService.getComboSubtipo(e.value).subscribe(o=>{i.comboSubtipo=o.find(l=>l.listado===r.C.COMBO_SUBTIPOS_EXTRACCION).data,i.searchGroup.get("subtipo").enable()})):(i.comboSubtipo=[],i.searchGroup.controls.subtipo.setValue(""),i.searchGroup.get("subtipo").disable()),a()})})()}activarCampoVolumen(e){null!=e.value&&null!=e.value?4===e.value?this.searchGroup.get("volumen").disable():this.searchGroup.get("volumen").enable():(this.searchGroup.get("volumen").disable(),this.searchGroup.controls.volumen.setValue(""))}activarCampoProfundidad(e){null!=e.value&&null!=e.value?4===e.value?this.searchGroup.get("profundidad").disable():this.searchGroup.get("profundidad").enable():(this.searchGroup.get("profundidad").disable(),this.searchGroup.controls.profundidad.setValue(""))}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(At.o),t.Y36(W.U),t.Y36(Et.x),t.Y36(_.qu),t.Y36(M.f),t.Y36(v.F0),t.Y36(v.gz),t.Y36(C.k))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-extractions-search-form"]],inputs:{typeKey:"typeKey",combos:"combos",disabledReportButton:"disabledReportButton"},outputs:{newSearchEvent:"newSearchEvent"},decls:59,vars:38,consts:[[3,"formGroup","ngSubmit"],["searchForm","ngForm"],[1,"container"],[1,"row"],[1,"col","col-xl-3"],["appearance","fill"],["matInput","","id","name","type","text","formControlName","nombre",1,"campoBusqueda",3,"placeholder"],["matInput","","id","code","type","text","formControlName","codigo",1,"campoBusqueda",3,"placeholder","errorStateMatcher"],[4,"ngIf"],["id","province","formControlName","provincia",1,"campoBusqueda",3,"selectionChange"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["id","municipality","formControlName","municipio",1,"campoBusqueda"],["row","",1,"col","col-xl-4"],[1,"container-subtitle",3,"click"],[4,"ngIf","ngIfElse"],["arriba",""],[1,"row","mt-4"],[1,"col-md-12"],[1,"float-end"],[4,"appHasrole"],["type","button","mat-flat-button","","color","primary",1,"btn-third",3,"click"],[1,"fa-solid","fa-lines-leaning"],["type","submit","mat-flat-button","","color","primary",1,"btn-first"],[1,"fa-solid","fa-magnifying-glass"],["type","button","mat-flat-button","","color","primary",1,"btn-second",3,"disabled","click"],[1,"fa-solid","fa-circle-info"],["loading",""],[1,"fa-sm","fa","fa-chevron-down"],[1,"fa-sm","fa","fa-chevron-up"],["matInput","","id","codIntegra","type","text","formControlName","codIntegra",1,"campoBusqueda",3,"placeholder"],["matInput","","id","codAlberca","type","text","formControlName","codAlberca",1,"campoBusqueda",3,"placeholder"],["id","subzona","formControlName","subzona",1,"campoBusqueda"],["id","situacion","formControlName","situacion",1,"campoBusqueda"],["id","tipoCaptacion","formControlName","tipoCaptacion",1,"campoBusqueda",3,"selectionChange"],["id","subtipo","formControlName","subtipo",1,"campoBusqueda"],["id","tipoMasaAgua","formControlName","tipoMasaAgua",1,"campoBusqueda",3,"selectionChange"],["id","masaAguaAsociada","formControlName","masaAguaAsociada",1,"campoBusqueda"],[3,"value","matTooltip",4,"ngFor","ngForOf"],["id","uso","formControlName","uso",1,"campoBusqueda"],["id","ontador","formControlName","contador",1,"campoBusqueda"],["id","tipoProfundidad","formControlName","tipoProfundidad",1,"campoBusqueda",3,"selectionChange"],["matInput","","id","profundidad","type","text","formControlName","profundidad",1,"campoBusqueda"],["id","subcaptacion","formControlName","subcaptacion",1,"campoBusqueda"],["id","captacionEmergencia","formControlName","captacionEmergencia",1,"campoBusqueda"],["id","tipoVolumen","formControlName","tipoVolumen",1,"campoBusqueda",3,"selectionChange"],["matInput","","id","volumen","type","text","formControlName","volumen",1,"campoBusqueda"],[3,"value","matTooltip"],[1,"custom-checkbox"],["type","checkbox","formControlName","validadorActivado","id","checkValidacion"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",1,"fa-regular","fa-square-check","fa-lg",3,"ngClass","matTooltip","click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"form",0,1),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(2,"div",2)(3,"div",3)(4,"div",4)(5,"mat-form-field",5)(6,"mat-label"),t._uU(7),t.ALo(8,"translate"),t.qZA(),t._UZ(9,"
1input",6),t.ALo(10,"translate"),t.qZA()(),t.TgZ(11,"div",4)(12,"mat-form-field",5)(13,"mat-label"),t._uU(14),t.ALo(15,"translate"),t.qZA(),t._UZ(16,"input",7),t.ALo(17,"translate"),t.YNc(18,Ot,3,3,"mat-error",8),t.qZA()(),t.TgZ(19,"div",4)(20,"mat-form-field",5)(21,"mat-label"),t._uU(22),t.ALo(23,"translate"),t.qZA(),t.TgZ(24,"mat-select",9),t.NdJ("selectionChange",function(o){return i.getMunicipalities(o)}),t._UZ(25,"mat-option",10),t.YNc(26,Dt,2,2,"mat-option",11),t.qZA()()(),t.TgZ(27,"div",4)(28,"mat-form-field",5)(29,"mat-label"),t._uU(30),t.ALo(31,"translate"),t.qZA(),t.TgZ(32,"mat-select",12),t._UZ(33,"mat-option",10),t.YNc(34,Nt,2,2,"mat-option",11),t.qZA()()()(),t.TgZ(35,"div",13)(36,"div",14),t.NdJ("click",function(){return i.isActiveBusqueda=!i.isActiveBusqueda}),t.YNc(37,It,5,3,"h3",15),t.YNc(38,yt,5,3,"ng-template",null,16,t.W1O),t.qZA()(),t.YNc(40,$t,124,62,"div",8),t.TgZ(41,"div",17)(42,"div",18)(43,"div",19),t.YNc(44,jt,5,6,"ng-container",20),t.TgZ(45,"button",21),t.NdJ("click",function(){return i.resetForm()}),t._uU(46),t.ALo(47,"translate"),t._UZ(48,"i",22),t.qZA(),t.TgZ(49,"button",23),t._uU(50),t.ALo(51,"translate"),t._UZ(52,"i",24),t.qZA(),t.TgZ(53,"button",25),t.NdJ("click",function(){return i.generateReport()}),t._uU(54),t.ALo(55,"translate"),t._UZ(56,"i",26),t.qZA()()()()()(),t.YNc(57,Xt,1,0,"ng-template",null,27,t.W1O)),2&e){const a=t.MAs(39);let o;t.Q6J("formGroup",i.searchGroup),t.xp6(7),t.Oqu(t.lcZ(8,19,"formBusqueda.nombre")),t.xp6(2),t.s9C("placeholder",t.lcZ(10,21,"formBusqueda.plcHldrNombre")),t.xp6(5),t.Oqu(t.lcZ(15,23,"formBusqueda.codigo")),t.xp6(2),t.s9C("placeholder",t.lcZ(17,25,"formBusqueda.plcHldrCodigo")),t.Q6J("errorStateMatcher",i.matcher),t.xp6(2),t.Q6J("ngIf",null==(o=i.searchGroup.get("codigo"))?null:o.hasError),t.xp6(4),t.Oqu(t.lcZ(23,27,"formBusqueda.provincia")),t.xp6(4),t.Q6J("ngForOf",i.provinces),t.xp6(4),t.Oqu(t.lcZ(31,29,"formBusqueda.municipio")),t.xp6(4),t.Q6J("ngForOf",i.municipalities),t.xp6(3),t.Q6J("ngIf",!i.isActiveBusqueda)("ngIfElse",a),t.xp6(3),t.Q6J("ngIf",i.isActiveBusqueda),t.xp6(4),t.Q6J("appHasrole",t.DdM(37,Wt)),t.xp6(2),t.hij("",t.lcZ(47,31,"botones.limpiar")," "),t.xp6(4),t.hij("",t.lcZ(51,33,"botones.buscar")," "),t.xp6(3),t.Q6J("disabled",i.disabledReportButton),t.xp6(1),t.hij("",t.lcZ(55,35,"botones.informe")," ")}},directives:[_._Y,_.JL,_.sg,P.KE,P.hX,$.Nt,_.Fj,_.JJ,_.u,h.O5,P.TO,L.gD,k.ey,h.sg,B.gM,Q.I,_.Wl,h.mk,J.lW,I.O],pipes:[p.X$],styles:[".mat-checkbox[_ngcontent-%COMP%]{margin:0 8px 8px 0}"]}),n})();var R=d(7278),te=d(4511);function ee(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"h3",5),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"app-search-table",6),t.NdJ("changePageEvent",function(a){return t.CHM(e),t.oxw().updatePage(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(2),t.Oqu(t.lcZ(3,4,"formBusqueda.resultado")),t.xp6(2),t.Q6J("searchResult",e.extracctionsObj)("tableColumns",e.tableConfiguration)("visor",e.visorLink)}}function ne(n,c){1&n&&(t.TgZ(0,"div")(1,"div",8)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()()()),2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"formBusqueda.noResultados")))}function ie(n,c){if(1&n&&t.YNc(0,ne,5,3,"div",7),2&n){const e=t.oxw();t.Q6J("ngIf",e.extracctionsObj&&0===e.extracctionsObj.data.length)}}let ae=(()=>{class n{constructor(e,i,a,o){this.extractionsService=e,this.translate=i,this.rolesService=a,this.selectedTabService=o,this.disabledReportButton=!0,this.visorLink="/viewer/"+r.C.grantingWaterExtractEntity,this.perfilUsuario="",this.stop$=new x.x,this.visorLinkCiudadano="/viewer/"+r.C.grantingWaterExtractCiudadanoEntity,this.translate.get(["extractions.busqueda.tabla.codigo","extractions.busqueda.tabla.codIntegra","extractions.busqueda.tabla.codAlberca","extractions.busqueda.tabla.nombre","extractions.busqueda.tabla.situacion","extractions.busqueda.tabla.tipo","extractions.busqueda.tabla.volumen"]).subscribe(l=>{this.tableConfiguration=this.getTableConfiguration(l)}),this.formStorageType=u.c.getEntityName(r.C.tipoEntidad.extraccionAguas,!0),this.extractionsService.getCombosBusquedaExtracciones(),this.numberPipe=new h.JJ(this.translate.currentLang),this.selectedTabService.changeTab(0),this.rolesService.profile$.pipe((0,T.R)(this.stop$)).subscribe(l=>{this.perfilUsuario=l})}getTableConfiguration(e){return[{columnDef:"detalle",header:"",cell:i=>""},{columnDef:"codigo",header:e["extractions.busqueda.tabla.codigo"],cell:i=>`${i.id}`},{columnDef:"codIntegra",header:e["extractions.busqueda.tabla.codIntegra"],cell:i=>`${i.codIntegra}`},{columnDef:"codAlberca",header:e["extractions.busqueda.tabla.codAlberca"],cell:i=>`${i.codAlberca}`},{columnDef:"nombre",header:e["extractions.busqueda.tabla.nombre"],cell:i=>`${i.nombre}`},{columnDef:"situacion",header:e["extractions.busqueda.tabla.situacion"],cell:i=>`${i.situacion}`},{columnDef:"tipo",header:e["extractions.busqueda.tabla.tipo"],cell:i=>`${i.tipo}`},{columnDef:"volumen",header:e["extractions.busqueda.tabla.volumen"],headerTooltip:this.translate.instant("extractions.busqueda.tabla.tltipVolumen"),cell:i=>`${this.numberPipe.transform(i.volumen,r.C.numRed)||""}`,conditionalStyle:i=>({textGrey:this.CheckColor(i)})}]}CheckColor(e){return u.c.isNullorEmpty(e.max_vol)&&e.estimated_max_vol||u.c.isNullorEmpty(e.max_vol)&&u.c.isNullorEmpty(e.estimated_max_vol)&&e.informed_max_vol_year||u.c.isNullorEmpty(e.max_vol)&&u.c.isNullorEmpty(e.estimated_max_vol)&&u.c.isNullorEmpty(e.informed_max_vol_year)&&e.max_vol_year}ngOnInit(){}ngOnDestroy(){}search(e){this.searchFilter=e,u.c.convertFormattedNumberSearchForm(this.searchFilter,e,["profundidad","volumen"]),this.extractionsService.getExtracciones(this.searchFilter).subscribe(i=>{this.extractionsService.getCountExtracciones(this.searchFilter).subscribe(a=>{this.count=a,this.disabledReportButton=!(this.count>0),this.extracctionsObj=new N(!0,a,i);for(const o of this.extracctionsObj.data)null==o.situacion&&(o.situacion=""),null==o.tipo&&(o.tipo=""),null==o.nombre&&(o.nombre=""),null==o.codAlberca&&(o.codAlberca=""),null==o.codIntegra&&(o.codIntegra=""),o.concesional&&this.perfilUsuario==r.C.perfilCiudadano&&this.hideOptionsMapAndView(o)})})}hideOptionsMapAndView(e){e.activeMap=!1}updatePage(e){this.extractionsService.getExtracciones(this.searchFilter,e.pageNumber.toString(),e.pageSize.toString(),e.sortDirection,e.sortField).subscribe(i=>{this.extracctionsObj=new N(!1,this.count,i);for(const a of this.extracctionsObj.data)null==a.situacion&&(a.situacion=""),null==a.tipo&&(a.tipo=""),null==a.nombre&&(a.nombre=""),null==a.codAlberca&&(a.codAlberca=""),null==a.codIntegra&&(a.codIntegra=""),a.concesional&&this.perfilUsuario==r.C.perfilCiudadano&&this.hideOptionsMapAndView(a)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(p.sK),t.Y36(M.f),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-search-list"]],decls:10,vars:7,consts:[[1,"container-title"],[1,"mb-2"],[3,"typeKey","disabledReportButton","
1newSearchEvent"],[4,"ngIf","ngIfElse"],["noResultados",""],["appBold",""],[3,"searchResult","tableColumns","visor","changePageEvent"],[4,"ngIf"],[1,"container-subtitle"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.ALo(3,"translate"),t.qZA()(),t._UZ(4,"mat-divider",1),t.TgZ(5,"app-extractions-search-form",2),t.NdJ("newSearchEvent",function(o){return i.search(o)}),t.qZA(),t.ynx(6),t.YNc(7,ee,5,6,"ng-container",3),t.BQk(),t.YNc(8,ie,1,1,"ng-template",null,4,t.W1O)),2&e){const a=t.MAs(9);t.xp6(2),t.Oqu(t.lcZ(3,5,"extractions.busqueda.titulo")),t.xp6(3),t.Q6J("typeKey",i.formStorageType)("disabledReportButton",i.disabledReportButton),t.xp6(2),t.Q6J("ngIf",i.tableConfiguration&&null!=i.extracctionsObj&&i.extracctionsObj.data.length>0)("ngIfElse",a)}},directives:[A.d,Kt,h.O5,R.M,te.D],pipes:[p.X$],styles:[""]}),n})();var oe=d(3402),ce=d(2810),ct=d(7555);function re(n,c){if(1&n&&(t.TgZ(0,"div")(1,"div",7)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",8)(6,"div",9)(7,"div",8),t._UZ(8,"app-pie-chart",10),t.qZA(),t.TgZ(9,"div",7)(10,"h3"),t._uU(11),t.ALo(12,"translate"),t.qZA()()(),t.TgZ(13,"div",9)(14,"div",8),t._UZ(15,"app-pie-chart",10),t.qZA(),t.TgZ(16,"div",7)(17,"h3"),t._uU(18),t.ALo(19,"translate"),t.qZA()()()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,7,"extractions.data.graficas.origenAgua")),t.xp6(5),t.Q6J("chartData",e.dataNumero)("chartOptions",e.pieChartOptions),t.xp6(3),t.Oqu(t.lcZ(12,9,"extractions.data.graficas.numeroExtracciones")),t.xp6(4),t.Q6J("chartData",e.dataVolumen)("chartOptions",e.pieChartOptions),t.xp6(3),t.Oqu(t.lcZ(19,11,"extractions.data.graficas.volumen"))}}function se(n,c){if(1&n&&(t.TgZ(0,"div",8)(1,"div",9)(2,"div",8),t._UZ(3,"app-pie-chart",10),t.qZA(),t.TgZ(4,"div",7)(5,"h3"),t._uU(6),t.ALo(7,"translate"),t.qZA()()(),t.TgZ(8,"div",9)(9,"div",8),t._UZ(10,"app-pie-chart",10),t.qZA(),t.TgZ(11,"div",7)(12,"h3"),t._uU(13),t.ALo(14,"translate"),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(3),t.Q6J("chartData",e.dataExp)("chartOptions",e.pieChartOptions),t.xp6(3),t.Oqu(t.lcZ(7,6,"extractions.data.graficas.sistemasExplotacion")),t.xp6(4),t.Q6J("chartData",e.dataMasas)("chartOptions",e.pieChartOptions),t.xp6(3),t.Oqu(t.lcZ(14,8,"extractions.data.graficas.masasSubterraneas"))}}function le(n,c){if(1&n&&(t.TgZ(0,"div")(1,"div",8)(2,"div",11)(3,"div",8),t._UZ(4,"app-pie-chart",10),t.qZA()()(),t.TgZ(5,"div",7)(6,"h3"),t._uU(7),t.ALo(8,"translate"),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(4),t.Q6J("chartData",e.dataMasas)("chartOptions",e.pieChartOptions),t.xp6(3),t.Oqu(t.lcZ(8,3,"extractions.data.graficas.masasSubterraneas"))}}const st=function(){return["4","2","7"]};let de=(()=>{class n{constructor(e,i,a,o){this.extractionsService=e,this.chartConfigurationService=i,this.translate=a,this.selectedTabService=o,this.stop$=new x.x,this.selectedTabService.changeTab(0)}ngOnInit(){this.extractionsService.getExtraccionesEnCifras().pipe((0,T.R)(this.stop$)).subscribe(e=>{this.extraccionesEnCifras=e;let i=e.origenAgua,a=u.c.getPieChartColors(13),o=["#D5F5E3","#F0F4C3"],l=[this.translate.instant("extractions.data.graficas.extraccionesSuperficiales"),this.translate.instant("extractions.data.graficas.extraccionesSubterraneas")];this.dataNumero=this.buildChartConfig(l,this.prepareDataNumeroExtraccionesOrigen(i),o),this.dataVolumen=this.buildChartConfig(l,this.prepareData(i),o),this.dataExp=this.buildChartConfig(this.prepareLabel(e.sistemasExplotacion),this.prepareData(e.sistemasExplotacion),a),this.dataMasas=this.buildChartConfig(this.prepareLabel(e.masasSubterraneas),this.prepareData(e.masasSubterraneas),a)}),this.pieChartOptions=this.chartConfigurationService.getPieChartOptionsPorcentaje(!1,"")}prepareLabel(e){return e.map(i=>i.descripcion)}prepareData(e){return e.map(i=>i.volumen)}prepareDataNumeroExtraccionesOrigen(e){return e.map(i=>i.numeroExtracciones)}buildChartConfig(e,i,a){return this.pieChartOptions=this.chartConfigurationService.getPieChartOptionsPorcentaje(!1,""),{labels:e,datasets:[{data:i,backgroundColor:a,hoverBackgroundColor:a}]}}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(oe.E),t.Y36(p.sK),t.Y36(Z.O))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-data"]],decls:21,vars:18,consts:[[1,"container-title"],[1,"mb-2"],[1,"container-text"],[1,"justify-text"],[4,"appHasrole"],["class","row",4,"appHasrole"],[4,"appNothasrole"],[1,"container-subtitle","mt-4",2,"text-align","center"],[1,"row"],[1,"col-6"],[3,"chartData","chartOptions"],[1,"col"]],template:function(e,i){1&e&&(t.ynx(0),t.TgZ(1,"div",0)(2,"h2"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"mat-divider",1),t.TgZ(6,"div",2)(7,"p",3),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.TgZ(10,"p",3),t._uU(11),t.ALo(12,"translate"),t.qZA()(),t.TgZ(13,"div",0)(14,"h2"),t._uU(15),t.ALo(16,"translate"),t.qZA()(),t._UZ(17,"mat-divider",1),t.YNc(18,re,20,13,"div",4),t.YNc(19,se,15,10,"div",5),t.YNc(20,le,9,5,"div",6),t.BQk()),2&e&&(t.xp6(3),t.Oqu(t.lcZ(4,7,"extractions.data.queEsUnaExtraccion")),t.xp6(5),t.Oqu(t.lcZ(9,9,"extractions.data.def1")),t.xp6(3),t.Oqu(t.lcZ(12,11,"extractions.data.def2")),t.xp6(4),t.Oqu(t.lcZ(16,13,"extractions.data.extraccionesCifras")),t.xp6(3),t.Q6J("appHasrole",t.DdM(15,st)),t.xp6(1),t.Q6J("appHasrole",t.DdM(16,st)),t.xp6(1),t.Q6J("appNothasrole",t.DdM(17,st)))},directives:[A.d,Q.I,ce.J,ct.b],pipes:[p.X$],styles:[""]}),n})();var lt=d(33),pe=d(7706),dt=d(8914),me=d(5563);let _e=(()=>{class n{constructor(e,i,a,o,l){this.entityMenuService=e,this.translate=i,this.rolesService=a,this.languageChangeService=o,this.configService=l,this.stop$=new x.x,this.languageChangeService.language$.subscribe(s=>{this.translate.currentLang="",this.translate.use(s),this.rolesService.profile$.pipe((0,T.R)(this.stop$)).subscribe(m=>{this.viewerLayers=m===r.C.perfilCiudadano?this.configService.getFeatureTypeConfiguration(r.C.grantingWaterExtractCiudadanoEntity).layersIdsToLoad:[],this.translate.get("extractions.fichaGeneral.titulo").subscribe(b=>{this.entityMenu={type:b,datalink:"data",searchlink:"search",generalDataLink:"search/general",technicalDataLink:"search/technical",entityType:r.C.tipoEntidad.extraccionAguas,layersIds:this.viewerLayers},this.entityMenuService.entityMenuChange(this.entityMenu)})})})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(lt.$),t.Y36(p.sK),t.Y36(M.f),t.Y36(pe.S),t.Y36(dt.E))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-extractions"]],decls:5,vars:0,consts:[[1,"row"],[1,"col-12","col-md-auto"],[1,"col","col-lg-8","col-xl"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"app-entity-menu"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"router-outlet"),t.qZA()())},directives:[me.A,v.lC],styles:[""]}),n})();var pt=d(2170),ue=d(2511),S=d(3468),K=d(4623),fe=d(5194),Y=d(2600),ge=d(5245);function he(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",19)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",22),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblNombre")),t.xp6(3),t.Oqu(e.extraccion.nombre)}}function be(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblSituacion")),t.xp6(3),t.Oqu(e.extraccion.situacion)}}function xe(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblCaptacion")),t.xp6(3),t.Oqu(e.extraccion.tipo)}}function ve(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblSubtipo")),t.xp6(3),t.Oqu(e.extraccion.subtipo)}}function Ce(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblSubtipo")),t.xp6(3),t.Oqu(e.extraccion.subtipo)}}function Te(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.ALo(7,"number"),t.ALo(8,"translate"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,6,"extractions.fichaGeneral.lblSubtipo")),t.xp6(3),t.xDo("",e.extraccion.subtipo," ","(","",t.xi3(7,8,e.extraccion.profundidad,e.numRed)," ",t.lcZ(8,11,"unidades.metros"),"",")","")}}function Ze(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblSubtipo")),t.xp6(3),t.Oqu(e.extraccion.subtipo)}}function Ae(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.ALo(7,"number"),t.ALo(8,"translate"),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,6,"extractions.fichaGeneral.lblSubtipo")),t.xp6(3),t.xDo("",e.extraccion.subtipo," ","(","",t.xi3(7,8,e.extraccion.profundidad,e.numRed)," ",t.lcZ(8,11,"unidades.metros"),"",")","")}}function Ee(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",23)(1,"div",20)(2,"span",21),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",16),t._uU(6),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblSubzona")),t.xp6(3),t.Oqu(e.extraccion.subzona)}}function Oe(n,c){if(1&n&&(t.TgZ(0,"div",20)(1,"span",29),t._uU(2),t.qZA()()),2&n){const e=c.$implicit;t.xp6(2),t.Oqu(e)}}function De(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"mat-list-item",24)(2,"span",25),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"mat-list",26)(6,"mat-list-item",27),t.YNc(7,Oe,3,1,"div",28),t.qZA()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblProvincias")),t.xp6(4),t.Q6J("ngForOf",e.extraccion.provincias)}}function Ne(n,c){if(1&n&&(t.TgZ(0,"div",20)(1,"span",29),t._uU(2),t.qZA()()),2&n){const e=c.$implicit;t.xp6(2),t.Oqu(e)}}function Ie(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"mat-list-item",24)(2,"span",25),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"mat-list",26)(6,"mat-list-item",27),t.YNc(7,Ne,3,1,"div",28),t.qZA()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaGeneral.lblMunicipios")),t.xp6(4),t.Q6J("ngForOf",e.extraccion.municipios)}}function ye(n,c){if(1&n&&t._UZ(0,"app-image-map",31),2&n){const e=t.oxw(3);t.Q6J("entityDataMap",e.photoMap)("entitiesLayers",e.layer)("foto",e.fotoPrincipal)}}function Me(n,c){if(1&n&&(t.ynx(0),t.YNc(1,ye,1,3,"app-image-map",30),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.photoMap)}}function Pe(n,c){if(1&n&&t._UZ(0,"app-image-map",31),2&n){const e=t.oxw(3);t.Q6J("entityDataMap",e.photoMap)("entitiesLayers",e.layerCiudadano)("foto",e.fotoPrincipal)}}function qe(n,c){if(1&n&&(t.ynx(0),t.YNc(1,Pe,1,3,"app-image-map",30),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.photoMap)}}function Se(n,c){if(1&n&&t._UZ(0,"app-map-icon",33),2&n){const e=t.oxw(3);t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id)}}function Ue(n,c){if(1&n&&(t.ynx(0),t.YNc(1,Se,1,2,"app-map-icon",32),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.photoMap)}}function we(n,c){if(1&n&&t._UZ(0,"app-map-icon",33),2&n){const e=t.oxw(3);t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}function Le(n,c){if(1&n&&(t.ynx(0),t.YNc(1,we,1,2,"app-map-icon",32),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.photoMap&&!e.extraccion.concesional)}}const rt=function(){return["4","2","7"]};function Je(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",2)(1,"div",3)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",4),t.TgZ(5,"div",5)(6,"div",6)(7,"mat-list",7),t.YNc(8,he,7,4,"mat-list-item",8),t.YNc(9,be,7,4,"mat-list-item",9),t.YNc(10,xe,7,4,"mat-list-item",9),t.YNc(11,ve,7,4,"mat-list-item",9),t.YNc(12,Ce,7,4,"mat-list-item",9),t.YNc(13,Te,9,13,"mat-list-item",9),t.YNc(14,Ze,7,4,"mat-list-item",9),t.YNc(15,Ae,9,13,"mat-list-item",9),t.YNc(16,Ee,7,4,"mat-list-item",9),t.YNc(17,De,8,4,"ng-container",10),t.YNc(18,Ie,8,4,"ng-container",10),t.qZA()(),t.TgZ(19,"div",11),t.YNc(20,Me,2,1,"ng-container",12),t.YNc(21,qe,2,1,"ng-container",13),t.qZA()(),t.TgZ(22,"div",14)(23,"div",15)(24,"div",16),t.YNc(25,Ue,2,1,"ng-container",12),t.YNc(26,Le,2,1,"ng-container",13),t.TgZ(27,"a",17),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return a.printData(a.extraccion.id)}),t.TgZ(28,"mat-icon",18),t.ALo(29,"translate"),t._uU(30,"print "),t.qZA()()()()()()}if(2&n){const e=t.oxw();
1t.xp6(3),t.AsE("",e.extraccion.id," - ",e.extraccion.nombre,""),t.xp6(5),t.Q6J("ngIf",e.extraccion.nombre),t.xp6(1),t.Q6J("ngIf",e.extraccion.situacion),t.xp6(1),t.Q6J("ngIf",e.extraccion.tipo),t.xp6(1),t.Q6J("ngIf",1==e.extraccion.idTipo&&6!=e.extraccion.idSubtipo&&e.extraccion.subtipo),t.xp6(1),t.Q6J("ngIf",1==e.extraccion.idTipo&&6==e.extraccion.idSubtipo&&e.extraccion.subtipo&&!e.extraccion.profundidad),t.xp6(1),t.Q6J("ngIf",1==e.extraccion.idTipo&&6==e.extraccion.idSubtipo&&e.extraccion.subtipo&&e.extraccion.profundidad),t.xp6(1),t.Q6J("ngIf",1!=e.extraccion.idTipo&&e.extraccion.subtipo&&!e.extraccion.profundidad),t.xp6(1),t.Q6J("ngIf",1!=e.extraccion.idTipo&&e.extraccion.subtipo&&e.extraccion.profundidad),t.xp6(1),t.Q6J("ngIf",e.extraccion.subzona),t.xp6(1),t.Q6J("ngIf",e.extraccion.provincias&&e.extraccion.provincias.length>0),t.xp6(1),t.Q6J("ngIf",e.extraccion.municipios&&e.extraccion.municipios.length>0),t.xp6(2),t.Q6J("appHasrole",t.DdM(20,rt)),t.xp6(1),t.Q6J("appNothasrole",t.DdM(21,rt)),t.xp6(4),t.Q6J("appHasrole",t.DdM(22,rt)),t.xp6(1),t.Q6J("appNothasrole",t.DdM(23,rt)),t.xp6(2),t.s9C("matTooltip",t.lcZ(29,18,"tootips.tltipImprimirFicha"))}}function Re(n,c){1&n&&t._UZ(0,"app-spinner")}let Ve=(()=>{class n{constructor(e,i,a,o,l,s,m,b){this.route=e,this.entityMenuService=i,this.extractionsService=a,this.globalService=o,this.selectedTabService=l,this.translate=s,this.dialogModelService=m,this.configService=b,this.substringByChar=u.c.substringByChar,this.numRed=r.C.numRed,this.layer=[],this.layerCiudadano=[],this.entityName=r.C.grantingWaterExtractEntity,this.entityNameCiudadano=r.C.grantingWaterExtractEntity,this.stop$=new x.x,this.selectedTabService.changeTab(0)}ngOnInit(){let e=this.route.snapshot.paramMap.get("gid");null!=e&&(this.entityMenuService.submenuChange(!0),this.extractionsService.getExtraccion(Number(e)).pipe((0,T.R)(this.stop$)).subscribe(i=>{this.extraccion=i,this.usosExtraction=this.extraccion.usosMod.usos;for(const a of this.usosExtraction)switch(a.tipoUso){case r.C.tiposUso.NUCLEO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerNucleos));break;case r.C.tiposUso.ABASTFUERA:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerOtrosAbastecimientos));break;case r.C.tiposUso.REGADIO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerRegadio));break;case r.C.tiposUso.GANADERO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExplotacionesGanaderas));break;case r.C.tiposUso.HIDROELEC:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerCentralesHidroelectricas));break;case r.C.tiposUso.TERMICA:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerCentralesTermicas));break;case r.C.tiposUso.ACUICULTURA:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerPiscifactorias));break;case r.C.tiposUso.RECREATIVO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerUsosRecreativos));break;case r.C.tiposUso.PUBLICO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerUsoPublico));break;case r.C.tiposUso.PRIVADO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerUsoPrivado));break;case r.C.tiposUso.INDUSTRIA:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerIndustriasBienes)),this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerIndustriasOcio)),this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerIndustriasExtractivas)),this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerCamposGolf)),this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerIndustriasFuerzamotriz));break;case r.C.tiposUso.OTRO:this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerOtrosAbastecimientos))}this.extraccion.idTipo===r.C.TipoExtraccion.SUBTERRANEA?this.extraccion.concesional?(this.entityName=r.C.grantingWaterExtractSubConcesionalEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSubConcesionalCiudadanoEntity,this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSubterraneasConcesional))):(this.entityName=r.C.grantingWaterExtractSubEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSubCiudadanoEntity,this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSubterraneas)),this.layerCiudadano.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSubterraneas))):this.extraccion.idTipo===r.C.TipoExtraccion.SUPERFICIAL?this.extraccion.concesional?(this.entityName=r.C.grantingWaterExtractSupConcesionalEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSupConcesionalCiudadanoEntity,this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSuperficialesConcesional))):(this.entityName=r.C.grantingWaterExtractSupEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSupCiudadanoEntity,this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSuperficiales)),this.layerCiudadano.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSuperficiales))):(this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSubterraneas)),this.layer.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSuperficiales)),this.layerCiudadano.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSubterraneas)),this.layerCiudadano.push(this.configService.getItemLayerById(r.C.olMap.layerExtraccionesSuperficiales)))}
1),this.entityMenuService.gidEntitySubject$.next(e),this.extractionsService.getExtensionFeature(Number(e)).subscribe(i=>{this.photoMap=new pt.lC([Number(e)],200===i.status?i.body:[])}),this.extractionsService.getFotoPrincipal(Number(e)).subscribe(i=>{this.fotoPrincipal=i}))}printData(e){ue.l.printData(e,r.C.tipoEntidad.extraccionAguas,this.dialogModelService,this.translate,this.globalService)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.gz),t.Y36(lt.$),t.Y36(C.k),t.Y36(W.U),t.Y36(Z.O),t.Y36(p.sK),t.Y36(S.r),t.Y36(dt.E))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-general-data"]],decls:3,vars:2,consts:[["class","container",4,"ngIf","ngIfElse"],["loading",""],[1,"container"],[1,"container-title"],[1,"mb-2"],[1,"row","mb-4"],[1,"col-5"],["dense",""],["class","bar-gradient comentarios",4,"ngIf"],["class","bar-gradient-float-right",4,"ngIf"],[4,"ngIf"],[1,"col-7","iframeMapa"],[4,"appHasrole"],[4,"appNothasrole"],[1,"row"],[1,"col-md-12"],[1,"float-end"],["mat-flat-button","",3,"click"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",1,"btn-icon-mat",3,"matTooltip"],[1,"bar-gradient","comentarios"],["matLine",""],["appBold","",1,"float-start"],[1,"float-end","text-wrap"],[1,"bar-gradient-float-right"],[1,"bar-light-blue","mb-2"],["appBold",""],["dense","",1,"ms-5"],[1,"bar-lighter-blue","mb-2"],["matLine","",4,"ngFor","ngForOf"],[1,"float-start"],[3,"entityDataMap","entitiesLayers","foto",4,"ngIf"],[3,"entityDataMap","entitiesLayers","foto"],[3,"entityName","entityId",4,"ngIf"],[3,"entityName","entityId"]],template:function(e,i){if(1&e&&(t.YNc(0,Je,31,24,"div",0),t.YNc(1,Re,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.extraccion)("ngIfElse",a)}},directives:[h.O5,A.d,K.i$,K.Tg,k.X2,R.M,h.sg,Q.I,fe.E,ct.b,Y.N,J.zs,ge.Hw,B.gM,I.O],pipes:[p.X$,h.JJ],styles:[".container-title[_ngcontent-%COMP%]{border-left:6px solid #1c7696;padding-left:1rem}.container-subtitle[_ngcontent-%COMP%]{color:#1c7696}div.detail-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{font-weight:700}.detail-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.iframeMapa[_ngcontent-%COMP%]{text-align:-webkit-center;margin-top:1rem}.btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.comentarios[_ngcontent-%COMP%]{padding-top:16px!important;padding-bottom:16px!important;height:auto!important}"]}),n})();var mt=d(3251),xt=d(9555);function Fe(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblNombre")),t.xp6(3),t.Oqu(e.extraccion.nombre)}}function Be(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblCodIntegra")),t.xp6(3),t.Oqu(e.extraccion.codIntegra)}}function Qe(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblCodAlberca")),t.xp6(3),t.Oqu(e.extraccion.codAlberca)}}function Ye(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblCodigoEuropeo")),t.xp6(3),t.Oqu(e.extraccion.codigoEuropeo)}}function ke(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblCodigoSINAC")),t.xp6(3),t.Oqu(e.extraccion.codeSINAC)}}function Ge(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSinacZoneCode")),t.xp6(3),t.Oqu(e.extraccion.sinacZoneCode)}}function He(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSCV")),t.xp6(3),t.Oqu(e.extraccion.codescv)}}function $e(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSituacion")),t.xp6(3),t.Oqu(e.extraccion.situacion)}}function ze(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblCaptacion")),t.xp6(3),t.Oqu(e.extraccion.tipo)}}function je(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSubtipo")),t.xp6(3),t.Oqu(e.extraccion.subtipo)}}function Xe(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSituacionSinac")),t.xp6(3),t.Oqu(e.extraccion.situacionSinac)}}function We(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSinacZoneName")),t.xp6(3),t.Oqu(e.extraccion.sinacZoneName)}}function Ke(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblEmergencia")),t.xp6(3),t.Oqu(e.extraccion.emergencia)}}function tn(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",14),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"span",10),t._uU(6),t.qZA()()()),2&n){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"extractions.fichaTecnica.lblSubCaptacion")),t.xp6(3),t.Oqu(e.extraccion.subcaptacion)}}function en(n,c){if(1&n&&(t.TgZ(0,"mat-list-item",12)(1,"div",13)(2,"span",15),t.ALo(3,"translate"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"span",10),t._uU(7),t.qZA()()()),2&n){const e=t.oxw();t.xp6(2),t.s9C("matTooltip",t.lcZ(3,3,"extractions.fichaTecnica.tltipZonificacion")),t.xp6(2),t.hij(" ",t.lcZ(5,5,"extractions.fichaTecnica.lblZonificacion"),""),t.xp6(3),t.Oqu(e.extraccion.zonificacion)}}function nn(n,c){if(1&n&&t._UZ(0,"app-map-icon",16),2&n){const e=t.oxw();t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}let an=(()=>{class n{constructor(e){this.translate=e,this.numRed=r.C.numRed,this.dateFormat=r.C.dateFormat,this.tooltipHabitantesCensados="",this.tooltipHabitantesPonderados=""}ngOnInit(){this.tooltipHabitantesCensados=this.translate.instant("extractions.fichaTecnica.tltipHabitantesCensados")+"("+this.extraccion.anioCensado+")",this.tooltipHabitantesPonderados=this.translate.instant("extractions.fichaTecnica.tltipHabitantesPonderados")+"("+this.extraccion.anioPonderado+")"}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(p.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data-no-perfil"]],inputs:{extraccion:"extraccion",entityName:"entityName",entityNameCiudadano:"entityNameCiudadano"},decls:30,vars:22,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[1,"row","mb-4"],[1,"col","col-xl-6"],["dense",""],["class","bar-gradient-float-right",4,"ngIf"],[3,"elem","label","tooltip","unit"],[1,"row"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId",4,"ngIf"],[1,"bar-gradient-float-right"],["matLine",""],["appBold","",1,"float-start"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",1,"float-start",3,"matTooltip"],[3,"entityName","entityId"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2)(5,"div",3)(6,"div",4)(7,"mat-list",5),t.YNc(8,Fe,7,4,"mat-list-item",6),t.YNc(9,Be,7,4,"mat-list-item",6),t.YNc(10,Qe,7,4,"mat-list-item",6),t.YNc(11,Ye,7,4,"mat-list-item",6),t.YNc(12,ke,7,4,"mat-list-item",6),t.YNc(13,Ge,7,4,"mat-list-item",6),t.YNc(14,He,7,4,"mat-list-item",6),t._UZ(15,"app-mat-list-item-number",7),t.qZA()(),t.TgZ(16,"div",4)(17,"mat-list",5),t.YNc(18,$e,7,4,"mat-list-item",6),t.YNc(19,ze,7,4,"mat-list-item",6),t.YNc(20,je,7,4,"mat-list-item",6),t.YNc(21,Xe,7,4,"mat-list-item",6),t.YNc(22,We,7,4,"mat-list-item",6),t.YNc(23,Ke,7,4,"mat-list-item",6),t.YNc(24,tn,7,4,"mat-list-item",6),t.YNc(25,en,8,7,"mat-list-item",6),t.qZA()()(),t.TgZ(26,"div",8)(27,"div",9)(28,"div",10),t.YNc(29,nn,1,2,"app-map-icon",11),t.qZA()()()()),2&e&&(t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(6),t.Q6J("ngIf",i.extraccion.nombre),t.xp6(1),t.Q6J("ngIf",i.extraccion.codIntegra),t.xp6(1),t.Q6J("ngIf",i.extraccion.codAlberca),t.xp6(1),t.Q6J("ngIf",i.extraccion.codigoEuropeo),t.xp6(1),t.Q6J("ngIf",i.extraccion.codeSINAC),t.xp6(1),t.Q6J("ngIf",i.extraccion.situacionSinac),t.xp6(1),t.Q6J("ngIf",i.extraccion.codescv),t.xp6(1),t.Q6J("elem",i.extraccion.coordenadaZ)("label","extractions.fichaTecnica.lblCoordenadaZ")("tooltip","extractions.fichaTecnica.tltipCoordenadaZ")("unit","unidades.metros"),t.xp6(3),t.Q6J("ngIf",i.extraccion.situacion),t.xp6(1),t.Q6J("ngIf",i.extraccion.tipo),t.xp6(1),t.Q6J("ngIf",i.extraccion.subtipo),t.xp6(1),t.Q6J("ngIf",i.extraccion.situacionSinac),t.xp6(1),t.Q6J("ngIf",i.extraccion.situacionSinac),t.xp6(1),t.Q6J("ngIf",i.extraccion.emergencia),t.xp6(1),t.Q6J("ngIf",i.extraccion.subcaptacion),t.xp6(1),t.Q6J("ngIf",i.extraccion.zonificacion),t.xp6(4),t.Q6J("ngIf",!i.extraccion.concesional))},directives:[A.d,K.i$,h.O5,K.Tg,k.X2,R.M,xt.B,B.gM,Y.N],pipes:[p.X$],styles:[""]}),n})();var j=d(9506),z=d(5448),tt=d(4533),_t=d(2546);function on(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",6)(2,"h3"),t._uU(3),t.qZA()(),t.BQk()),2&n){const e=t.oxw();
1t.xp6(3),t.Oqu(e.extraccion.mensajeValidacion)}}function cn(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function rn(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function sn(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function ln(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function dn(n,c){if(1&n&&(t.TgZ(0,"div",9)(1,"div",52)(2,"div",11)(3,"div",18)(4,"span",21),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"div",19),t._uU(8),t.ALo(9,"number"),t.ALo(10,"translate"),t.qZA()()(),t.TgZ(11,"div",52)(12,"div",11)(13,"div",18)(14,"span",21),t._uU(15),t.ALo(16,"translate"),t.qZA()(),t.TgZ(17,"div",19),t._uU(18),t.ALo(19,"number"),t.ALo(20,"translate"),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(4),t.s9C("matTooltip",e.tooltipHabitantesCensados),t.xp6(1),t.Oqu(t.lcZ(6,8,"extractions.fichaTecnica.lblHabitantesCensados")),t.xp6(3),t.AsE("",t.xi3(9,10,e.extraccion.habitantesCensados,e.numRed)," ",t.lcZ(10,13,"unidades.habitantes"),""),t.xp6(6),t.s9C("matTooltip",e.tooltipHabitantesPonderados),t.xp6(1),t.Oqu(t.lcZ(16,15,"extractions.fichaTecnica.lblHabitantesPonderados")),t.xp6(3),t.AsE("",t.xi3(19,17,e.extraccion.habitantesPonderados,e.numRed)," ",t.lcZ(20,20,"unidades.habitantes"),"")}}function pn(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function mn(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function _n(n,c){if(1&n&&(t.TgZ(0,"mat-option",51),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function un(n,c){if(1&n&&(t.TgZ(0,"div",17)(1,"div",11)(2,"div",20)(3,"span",21),t.ALo(4,"translate"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"div",19),t._uU(8),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.s9C("matTooltip",t.lcZ(4,3,"extractions.fichaTecnica.tltipZonificacion")),t.xp6(2),t.Oqu(t.lcZ(6,5,"extractions.fichaTecnica.lblZonificacion")),t.xp6(3),t.hij("",e.extraccion.zonificacion," ")}}function fn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",57),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).validateVersions()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("disabled",e.disableValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}const gn=function(){return["2","7"]};function hn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",9)(1,"div",53)(2,"div",54)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",9)(7,"app-version-table",55),t.NdJ("newSelectEvent",function(a){return t.CHM(e),t.oxw(2).addSelection(a)})("newValidateVersionEvent",function(a){return t.CHM(e),t.oxw(2).validateVersions(a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(2).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",9)(9,"div",44)(10,"div",45),t.YNc(11,fn,3,4,"button",56),t.qZA()()()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.extractionsControlVersiones)("tableColumns",e.tableConfiguration)("itemName",e.extraccion.nombre)("entityType",e.extractionsType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,gn))}}const bn=function(n,c,e){return["../../fieldsHistory",n,c,e]};function xn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"form",7,8),t.NdJ("ngSubmit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"span",13),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",14)(10,"mat-form-field",15),t._UZ(11,"input",16),t.qZA()()()()(),t.TgZ(12,"div",9)(13,"div",17)(14,"div",11)(15,"div",18)(16,"span",13),t._uU(17),t.ALo(18,"translate"),t.qZA()(),t.TgZ(19,"div",19),t._uU(20),t.qZA()()(),t.TgZ(21,"div",17)(22,"div",11)(23,"div",20)(24,"span",21),t.ALo(25,"translate"),t._uU(26),t.ALo(27,"translate"),t.qZA()(),t.TgZ(28,"div",22)(29,"mat-form-field",15)(30,"mat-select",23),t.
1NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(31,"mat-option",24),t.YNc(32,cn,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(33,"div",9)(34,"div",17)(35,"div",11)(36,"div",18)(37,"span",13),t._uU(38),t.ALo(39,"translate"),t.qZA()(),t.TgZ(40,"div",19)(41,"mat-form-field",15),t._UZ(42,"input",26),t.qZA()()()(),t.TgZ(43,"div",17)(44,"div",11)(45,"div",20)(46,"span",21),t.ALo(47,"translate"),t._uU(48),t.ALo(49,"translate"),t.qZA()(),t.TgZ(50,"div",22)(51,"mat-form-field",15)(52,"mat-select",27),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().getComboSubtipo(a)}),t.YNc(53,rn,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(54,"div",9)(55,"div",17)(56,"div",11)(57,"div",18)(58,"span",13),t._uU(59),t.ALo(60,"translate"),t.qZA()(),t.TgZ(61,"div",19)(62,"mat-form-field",15),t._UZ(63,"input",28),t.qZA()()()(),t.TgZ(64,"div",17)(65,"div",11)(66,"div",20)(67,"span",21),t.ALo(68,"translate"),t._uU(69),t.ALo(70,"translate"),t.qZA()(),t.TgZ(71,"div",22)(72,"mat-form-field",15)(73,"mat-select",29),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(74,"mat-option",24),t.YNc(75,sn,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(76,"div",9)(77,"div",17)(78,"div",11)(79,"div",20)(80,"span",21),t.ALo(81,"translate"),t._uU(82),t.ALo(83,"translate"),t.qZA()(),t.TgZ(84,"div",19)(85,"mat-form-field",15),t._UZ(86,"input",30),t.qZA()()()(),t.TgZ(87,"div",17)(88,"div",11)(89,"div",20)(90,"span",21),t.ALo(91,"translate"),t._uU(92),t.ALo(93,"translate"),t.qZA()(),t.TgZ(94,"div",22)(95,"mat-form-field",15)(96,"mat-select",31),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(97,"mat-option",24),t.YNc(98,ln,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(99,"div",9)(100,"div",17)(101,"div",11)(102,"div",20)(103,"span",13),t._uU(104),t.ALo(105,"translate"),t.qZA()(),t.TgZ(106,"div",19)(107,"mat-form-field",15),t._UZ(108,"input",32),t.qZA()()()(),t.TgZ(109,"div",17)(110,"div",11)(111,"div",20)(112,"span",21),t.ALo(113,"translate"),t._uU(114),t.ALo(115,"translate"),t.qZA()(),t.TgZ(116,"div",19)(117,"mat-form-field",15),t._UZ(118,"input",33),t.qZA()()()()(),t.YNc(119,dn,21,22,"div",34),t.TgZ(120,"div",9)(121,"div",17)(122,"div",11)(123,"div",20)(124,"span",13),t._uU(125),t.ALo(126,"translate"),t.qZA()(),t.TgZ(127,"div",19)(128,"mat-form-field",15),t._UZ(129,"input",35),t.qZA()()()(),t.TgZ(130,"div",17)(131,"div",11)(132,"div",20)(133,"span",21),t.ALo(134,"translate"),t._uU(135),t.ALo(136,"translate"),t.qZA()(),t.TgZ(137,"div",22)(138,"mat-form-field",15)(139,"mat-select",36),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(140,"mat-option",24),t.YNc(141,pn,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(142,"div",9)(143,"div",17)(144,"div",37)(145,"div",38)(146,"span",21),t.ALo(147,"translate"),t._uU(148),t.ALo(149,"translate"),t.qZA()(),t.TgZ(150,"div",19),t._uU(151),t.ALo(152,"number"),t.ALo(153,"translate"),t.qZA()()(),t.TgZ(154,"div",17)(155,"div",11)(156,"div",20)(157,"span",21),t.ALo(158,"translate"),t._uU(159),t.ALo(160,"translate"),t.qZA()(),t.TgZ(161,"div",22)(162,"mat-form-field",15)(163,"mat-select",39),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(164,"mat-option",24),t.YNc(165,mn,2,3,"mat-option",25),t.qZA()()()()()(),t.TgZ(166,"div",9)(167,"div",17)(168,"div",11)(169,"div",20)(170,"span",21),t.ALo(171,"translate"),t._uU(172),t.ALo(173,"translate"),t.qZA()(),t.TgZ(174,"div",22)(175,"mat-form-field",15)(176,"mat-select",40),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw().selectedValue(a)}),t._UZ(177,"mat-option",24),t.YNc(178,_n,2,3,"mat-option",25),t.qZA()()()()(),t.YNc(179,un,9,7,"div",41),t.qZA(),t.TgZ(180,"div",9)(181,"div",12)(182,"span",13),t._uU(183),t.ALo(184,"translate"),t.qZA()(),t.TgZ(185,"div",14)(186,"mat-form-field",15),t._UZ(187,"textarea",42,43),t.qZA()()(),t.TgZ(189,"div",9)(190,"div",44)(191,"div",45)(192,"button",46),t._uU(193),t.ALo(194,"translate"),t.qZA(),t.TgZ(195,"button",47),t._uU(196),t.ALo(197,"translate"),t._UZ(198,"i",48),t.qZA(),t._UZ(199,"app-map-icon",49),t.qZA()()(),t.YNc(200,hn,12,9,"div",50),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("formGroup",e.technicalGroup),t.xp6(7),t.Oqu(t.lcZ(8,54,"extractions.fichaTecnica.lblNombre")),t.xp6(10),t.Oqu(t.lcZ(18,56,"extractions.fichaTecnica.lblCodIntegra")),t.xp6(3),t.Oqu(e.extraccion.codIntegra),t.xp6(4),t.s9C("matTooltip",t.lcZ(25,58,"extractions.fichaTecnica.tltlblSituacion")),t.xp6(2),t.Oqu(t.lcZ(27,60,"extractions.fichaTecnica.lblSituacion")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.situacionCombo),t.xp6(6),t.Oqu(t.lcZ(39,62,"extractions.fichaTecnica.lblCodAlberca")),t.xp6(8),t.s9C("matTooltip",t.lcZ(47,64,"extractions.fichaTecnica.tltlblTipoCaptacion")),t.xp6(2),t.Oqu(t.lcZ(49,66,"extractions.fichaTecnica.lblCaptacion")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(1),t.Q6J("ngForOf",e.tipoCombo),t.xp6(6),t.Oqu(t.lcZ(60,68,"extractions.fichaTecnica.lblCodigoEuropeo")),t.xp6(8),t.s9C("matTooltip",t.lcZ(68,70,"extractions.fichaTecnica.tltlblSubtipo")),t.xp6(2),t.Oqu(t.lcZ(70,72,"extractions.fichaTecnica.lblSubtipo")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.subtipoCombo),t.xp6(5),t.s9C("matTooltip",t.lcZ(81,74,"extractions.fichaTecnica.tltipCodigoSINAC")),t.xp6(2),t.Oqu(t.lcZ(83,76,"extractions.fichaTecnica.lblCodigoSINAC")),t.xp6(8),t.s9C("matTooltip",t.lcZ(91,78,"extractions.fichaTecnica.tltipSituacionSinac")),t.xp6(2),t.Oqu(t.lcZ(93,80,"extractions.fichaTecnica.lblSituacionSinac")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.situacionSinacCombo),t.xp6(6),t.Oqu(t.lcZ(105,82,"extractions.fichaTecnica.lblSinacZoneCode")),t.xp6(8),t.s9C("matTooltip",t.lcZ(113,84,"extractions.fichaTecnica.tltipSinacZoneName")),t.xp6(2),t.Oqu(t.lcZ(115,86,"extractions.fichaTecnica.lblSinacZoneName")),t.xp6(5),t.Q6J("ngIf",e.extraccion.habitantesCensados)("ngIfOr",e.extraccion.habitantesponderados),t.xp6(6),t.Oqu(t.lcZ(126,88,"extractions.fichaTecnica.lblSCV")),t.xp6(8),t.s9C("matTooltip",t.lcZ(134,90,"extractions.fichaTecnica.tltlblEmergencia")),t.xp6(2),t.Oqu(t.lcZ(136,92,"extractions.fichaTecnica.lblEmergencia")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.emergenciaCombo),t.xp6(5),t.s9C("matTooltip",t.lcZ(147,94,"extractions.fichaTecnica.tltipCoordenadaZ")),t.xp6(2),t.Oqu(t.lcZ(149,96,"extractions.fichaTecnica.lblCoordenadaZ")),t.xp6(3),t.AsE("",t.xi3(152,98,e.extraccion.coordenadaZ,e.numRed)," ",t.lcZ(1
153,101,"unidades.metros"),""),t.xp6(6),t.s9C("matTooltip",t.lcZ(158,103,"extractions.fichaTecnica.tltLblSubCaptacion")),t.xp6(2),t.Oqu(t.lcZ(160,105,"extractions.fichaTecnica.lblSubCaptacion")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.subcaptacionCombo),t.xp6(5),t.s9C("matTooltip",t.lcZ(171,107,"extractions.fichaTecnica.tltlblZpGenerate")),t.xp6(2),t.Oqu(t.lcZ(173,109,"extractions.fichaTecnica.lblZpGenerate")),t.xp6(4),t.Q6J("errorStateMatcher",e.matcher),t.xp6(2),t.Q6J("ngForOf",e.zpGenerateCombo),t.xp6(1),t.Q6J("ngIf",2==e.extraccion.idTipo),t.xp6(4),t.Oqu(t.lcZ(184,111,"extractions.fichaTecnica.lblComentarios")),t.xp6(9),t.Q6J("routerLink",t.kEZ(117,bn,e.extraccion.id,e.tabGeneralData,e.extraccion.nombre)),t.xp6(1),t.Oqu(t.lcZ(194,113,"botones.historico")),t.xp6(3),t.hij(" ",t.lcZ(197,115,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id),t.xp6(1),t.Q6J("ngIf",e.existVersions)}}function vn(n,c){1&n&&t._UZ(0,"app-spinner")}let Cn=(()=>{class n{constructor(e,i,a,o,l,s,m){this.extractionsService=e,this.router=i,this.fb=a,this.activatedRoute=o,this.dialogModelService=l,this.translate=s,this.tableConfigurationService=m,this.numRed=r.C.numRed,this.numberPipe=new h.JJ(this.translate.currentLang),this.existVersions=!1,this.selection=[],this.stop$=new x.x,this.disableValidateBtn=!0,this.combosCharged=!1,this.selectedCombosTextValues={idTipo:"",idSubtipo:"",idSubcaptacion:"",idEmergencia:"",idZpGenerate:"",idSituacion:"",idUsoEspecifico:"",idSituacionSinac:""},this.matcher=new H.o,this.extractionsType=r.C.tipoEntidad.extraccionAguas,this.tabGeneralData=r.C.operacion.OPERACION_GENERAL,this.tooltipHabitantesCensados="",this.tooltipHabitantesPonderados="",this.tableConfiguration=this.tableConfigurationService.getVersionTableConfiguration()}ngOnInit(){this.extractionsService.combosBusquedaSubject$.pipe((0,T.R)(this.stop$)).subscribe(e=>{this.tipoCombo=e.find(i=>i.listado===r.C.COMBO_TIPO_CAPTACION).data,this.subcaptacionCombo=e.find(i=>i.listado===r.C.COMBO_SI_NO_SIN_CAT).data,this.emergenciaCombo=e.find(i=>i.listado===r.C.COMBO_SI_NO_SIN_CAT).data,this.situacionCombo=e.find(i=>i.listado===r.C.COMBO_SITUACION_EXTRACCION).data,this.zpGenerateCombo=e.find(i=>i.listado===r.C.COMBO_SI_NO_SIN_CAT).data,this.usoEspecificoCombo=e.find(i=>i.listado===r.C.COMBO_USOS_EXTRACCIONES).data,this.situacionSinacCombo=e.find(i=>i.listado===r.C.COMBO_SITUACION_SINAC).data,this.extraccion.idTipo&&this.extractionsService.getComboSubtipo(this.extraccion.idTipo).subscribe(i=>{this.subtipoCombo=i.find(a=>a.listado===r.C.COMBO_SUBTIPOS_EXTRACCION).data}),this.combosCharged=!0}),this.combosCharged||this.extractionsService.getCombosBusquedaExtracciones(),this.createForm(),this.extractionsService.getControlDeVersiones(Number(this.extraccion.id),r.C.operacion.OPERACION_GENERAL).subscribe(e=>{e.length>0&&(this.existVersions=!0),this.extractionsControlVersiones=e}),this.tooltipHabitantesCensados=this.translate.instant("extractions.fichaTecnica.tltipHabitantesCensados")+"("+this.extraccion.anioCensado+")",this.tooltipHabitantesPonderados=this.translate.instant("extractions.fichaTecnica.tltipHabitantesPonderados")+"("+this.extraccion.anioPonderado+")"}createForm(){var e,i,a,o;this.technicalGroup=this.fb.group({nombre:this.fb.control({value:this.extraccion.nombre,disabled:!1}),codAlberca:this.fb.control({value:this.extraccion.codAlberca,disabled:!1}),idSituacion:this.fb.control({value:this.extraccion.idSituacion,disabled:!1}),idTipo:this.fb.control({value:this.extraccion.idTipo,disabled:!1}),idSubtipo:this.fb.control({value:this.extraccion.idSubtipo,disabled:!1}),idSubcaptacion:this.fb.control({value:this.extraccion.idSubcaptacion,disabled:!1}),idEmergencia:this.fb.control({value:this.extraccion.idEmergencia,disabled:!1}),idZpGenerate:this.fb.control({value:this.extraccion.idZpGenerate,disabled:!1}),idSituacionSinac:this.fb.control({value:this.extraccion.idSituacionSinac,disabled:!1}),codigoEuropeo:this.fb.control({value:this.extraccion.codigoEuropeo,disabled:!1}),comentarios:this.fb.control({value:this.extraccion.comentarios,disabled:!1}),codescv:this.fb.control({value:null===(e=this.extraccion)||void 0===e?void 0:e.codescv,disabled:!1}),codeSINAC:this.fb.control({value:null===(i=this.extraccion)||void 0===i?void 0:i.codeSINAC,disabled:!1}),sinacZoneCode:this.fb.control({value:null===(a=this.extraccion)||void 0===a?void 0:a.sinacZoneCode,disabled:!1}),sinacZoneName:this.fb.control({value:null===(o=this.extraccion)||void 0===o?void 0:o.sinacZoneName,disabled:!1})}),this.initialValues=this.technicalGroup.value}onSubmit(){if(this.technicalGroup.invalid)return;let e=u.c.compareObjects(this.initialValues,this.technicalGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.extraccion.id}/${this.tabGeneralData}`],{relativeTo:this.activatedRoute,state:this.prepareData(e)}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}validateVersions(e){let i=[];e?i.push(e):i=this.selection.map(a=>a),this.extractionsService.validarBloque(i).subscribe(a=>{200===a.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),`${this.translate.instant("dialogos.validarVersion.validacionCorrecta")} ${a.body}
1 ${this.translate.instant(a.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),this.translate.instant("dialogos.validarVersion.validacionError"))})}deleteVersion(e){this.extractionsService.descartarOperacion(e.version,e.operacionEntidad).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarCorrecta")),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarError"))})}addSelection(e){this.disableValidateBtn=0===e.length,this.selection=e}ngOnDestroy(){this.stop$.next(!0)}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(o=>o);let a=[];for(const o in e){let l,s;s=i.includes(o)?this.selectedCombosTextValues[o]:e[o],l=new j.i(o,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${o}`),e[o],s),a.push(l)}return a}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}getComboSubtipo(e){var i=this;return(0,E.Z)(function*(){return i.subtipoCombo=[],i.technicalGroup.controls.idSubtipo.setValue(""),i.selectedValue(e),new Promise(a=>{null!=e.value&&null!=e.value&&i.extractionsService.getComboSubtipo(e.value).subscribe(o=>{i.subtipoCombo=o.find(l=>l.listado===r.C.COMBO_SUBTIPOS_EXTRACCION).data}),a()})})()}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(v.F0),t.Y36(_.qu),t.Y36(v.gz),t.Y36(S.r),t.Y36(p.sK),t.Y36(z.A))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data-perfil"]],inputs:{extraccion:"extraccion",entityName:"entityName"},decls:9,vars:5,consts:[[4,"ngIf"],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container","px-4"],[3,"formGroup","ngSubmit",4,"ngIf","ngIfElse"],["loading",""],[1,"container-subtitle","mt-4","mb-2","textRed"],[3,"formGroup","ngSubmit"],["technicalForm","ngForm"],[1,"row"],[1,"col","col-xl-12"],[1,"row","inputRow"],[1,"col","col-xl-2","labelForm"],["appBold",""],[1,"col","col-xl-10"],["appearance","standard",1,"width-100"],["matInput","","name","nombre","type","text","formControlName","nombre"],[1,"col","col-xl-6"],[1,"col","col-xl-4","labelForm"],[1,"col","col-xl-8"],[1,"col-4","col-xl-4","labelForm"],["appBold","","matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"matTooltip"],[1,"col-8"],["name","idSituacion","formControlName","idSituacion",3,"errorStateMatcher","selectionChange"],[3,"value"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["matInput","","name","codAlberca","type","text","formControlName","codAlberca"],["name","idTipo","formControlName","idTipo",3,"errorStateMatcher","selectionChange"],["matInput","","name","codigoEuropeo","type","text","formControlName","codigoEuropeo"],["name","idSubtipo","formControlName","idSubtipo",3,"errorStateMatcher","selectionChange"],["matInput","","name","codeSINAC","type","text","formControlName","codeSINAC"],["name","idSituacionSinac","formControlName","idSituacionSinac",3,"errorStateMatcher","selectionChange"],["matInput","","name","sinacZoneCode","type","text","formControlName","sinacZoneCode"],["matInput","","name","sinacZoneName","type","text","formControlName","sinacZoneName"],["class","row",4,"ngIf","ngIfOr"],["matInput","","name","codescv","type","text","formControlName","codescv"],["name","idEmergencia","formControlName","idEmergencia",3,"errorStateMatcher","selectionChange"],[1,"row","mb-4"],[1,"col","col-xl-2labelForm"],["name","idSubcaptacion","formControlName","idSubcaptacion",3,"errorStateMatcher","selectionChange"],["name","idZpGenerate","formControlName","idZpGenerate",3,"errorStateMatcher","selectionChange"],["class","col col-xl-6",4,"ngIf"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios"],["autosize","cdkTextareaAutosize"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],[3,"entityName","entityId"],["class","row",4,"ngIf"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip"],[1,"col","col-xl-6","mb-3"],[1,"col"],[1,"container-subtitle","mb-2"],[3,"searchResult","tableColumns","itemName","entityType","newSelectEvent","newValidateVersionEvent","newDeleteVersionEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"]],template:function(e,i){if(1&e&&(t.YNc(0,on,4,1,"ng-container",0),t.TgZ(1,"div",1)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",2),t.TgZ(5,"div",3),t.YNc(6,xn,201,121,"form",4),t.qZA(),t.YNc(7,vn,1,0,"ng-template",null,5,t.W1O)),2&e){const a=t.MAs(8);t.Q6J("ngIf",i.extraccion.mensajeValidacion),t.xp6(3),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(3),t.Q6J("ngIf",i.combosCharged)("ngIfElse",a)}},directives:[h.O5,A.d,_._Y,_.JL,_.sg,R.M,P.KE,$.Nt,_.Fj,_.JJ,_.u,B.gM,L.gD,k.ey,h.sg,tt.IC,J.lW,v.rH,Y.N,_t.L,Q.I,I.O],pipes:[p.X$,h.JJ],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}"]}),n})();var Tn=d(3279),et=d(1155);function Zn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",7)(2,"div",8)(3,"mat-list",9),t._UZ(4,"app-mat-list-item-text",10),t.qZA()()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("elem",e.technicalData.nombreSubtipo)("label","extractions.fichaTecnica.lblTipoCaptacion")}}function An(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",13)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"app-manage-basic-table",14),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"extractions.fichaTecnica.lblDatosPerforacion")),t.xp6(2),t.Q6J("searchResult",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion)("tableColumns",e.tableConfigurationPerforacion)("visibleButtons",e.visibleButtons)("showPagination",!1)}}function En(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",12)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"app-manage-basic-table",14),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"extractions.fichaTecnica.lblDatosEntubacion")),t.xp6(2),t.Q6J("searchResult",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion)("tableColumns",e.tableConfigurationEntubacion)("visibleButtons",e.visibleButtons)("showPagination",!1)}}function On(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",12)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"app-manage-basic-table",14),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("showPagination",!1)}}function Dn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",15)(2,"mat-list",9),t._UZ(3,"app-mat-list-item-text",10)(4,"app-mat-list-item-text",10),t.qZA()(),t.BQk()),2&n){const e=c.ngIf;
1t.xp6(3),t.Q6J("elem",e.descTuberiaPiezometrica)("label","extractions.fichaTecnica.lblTuberiaPiezometrica"),t.xp6(1),t.Q6J("elem",e.descContador)("label","extractions.fichaTecnica.lblTipoContador")}}function Nn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",13)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",15)(6,"mat-list",9),t._UZ(7,"app-mat-list-item-text",10),t.qZA()(),t.BQk()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,3,"extractions.fichaTecnica.lblComentarios")),t.xp6(4),t.Q6J("elem",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.comentarios)("label","extractions.fichaTecnica.lblComentarios")}}function In(n,c){if(1&n&&(t.ynx(0),t.YNc(1,An,6,7,"div",6),t.YNc(2,En,6,7,"div",6),t.YNc(3,On,6,7,"div",6),t.TgZ(4,"div",11)(5,"div",12)(6,"h3"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.YNc(9,Dn,5,4,"ng-container",5),t.qZA(),t.TgZ(10,"div",11),t.YNc(11,Nn,8,5,"ng-container",5),t.qZA(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion.length>0),t.xp6(1),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion.length>0),t.xp6(1),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0),t.xp6(4),t.Oqu(t.lcZ(8,6,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.comentarios)}}function yn(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",13)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",15)(6,"mat-list",9),t._UZ(7,"app-mat-list-item-number",10)(8,"app-mat-list-item-number",10)(9,"app-mat-list-item-number",10)(10,"app-mat-list-item-number",10)(11,"app-mat-list-item-text",10),t.qZA()()()),2&n){const e=c.ngIf;t.xp6(3),t.Oqu(t.lcZ(4,11,"extractions.fichaTecnica.lblGaleria")),t.xp6(4),t.Q6J("elem",e.profundidad)("label","extractions.fichaTecnica.lblLongitud"),t.xp6(1),t.Q6J("elem",e.maxDiametro)("label","extractions.fichaTecnica.lblDiametroMaximo"),t.xp6(1),t.Q6J("elem",e.minDiametro)("label","extractions.fichaTecnica.lblDiametroMinimo"),t.xp6(1),t.Q6J("elem",e.longitudTuberia)("label","extractions.fichaTecnica.lblTuberiaFiltrante"),t.xp6(1),t.Q6J("elem",e.comentarios)("label","extractions.fichaTecnica.lblComentarios")}}function Mn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",15)(2,"mat-list",9),t._UZ(3,"app-mat-list-item-text",10),t.qZA()(),t.BQk()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("elem",e.technicalData.pantallaGaleriaDatTecExtraccionesDto.descContador)("label","extractions.fichaTecnica.lblTipoContador")}}function Pn(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",16)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"app-manage-basic-table",14),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("showPagination",!1)}}function qn(n,c){if(1&n&&(t.ynx(0),t.YNc(1,yn,12,13,"div",6),t.TgZ(2,"div",11)(3,"div",12)(4,"h3"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.YNc(7,Mn,4,2,"ng-container",5),t.qZA(),t.TgZ(8,"div",11)(9,"div",15)(10,"mat-list",9),t._UZ(11,"app-mat-list-item-text",10),t.qZA()()(),t.YNc(12,Pn,6,7,"div",6),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.technicalData.pantallaGaleriaDatTecExtraccionesDto),t.xp6(4),t.Oqu(t.lcZ(6,6,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaGaleriaDatTecExtraccionesDto),t.xp6(4),t.Q6J("elem",e.technicalData.pantallaGaleriaDatTecExtraccionesDto.descInstalacion)("label","extractions.fichaTecnica.lblInstalacionBombeo"),t.xp6(1),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0)}}function Sn(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",16)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t._UZ(5,"app-manage-basic-table",14),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("showPagination",!1)}}function Un(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",8)(2,"div",17)(3,"h3"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"mat-list",9),t._UZ(7,"app-mat-list-item-text",10),t.qZA()(),t.TgZ(8,"div",8)(9,"div",17)(10,"h3"),t._uU(11),t.ALo(12,"translate"),t.qZA()(),t.TgZ(13,"mat-list",9),t._UZ(14,"app-mat-list-item-text",10),t.qZA()()()),2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"extractions.fichaTecnica.lblAzudRelacionado")),t.xp6(3),t.Q6J("elem",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.descAzud)("label","extractions.fichaTecnica.lblNombre"),t.xp6(4),t.Oqu(t.lcZ(12,8,"extractions.fichaTecnica.lblEmbalseRelacionado")),t.xp6(3),t.Q6J("elem",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.descEmbalse)("label","extractions.fichaTecnica.lblNombre")}}function wn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",15)(2,"mat-list",9),t._UZ(3,"app-mat-list-item-text",10)(4,"app-mat-list-item-text",10),t.qZA()(),t.BQk()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("elem",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.descContador)("label","extractions.fichaTecnica.lblTipoContador"),t.xp6(1),t.Q6J("elem",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.comentarios)("label","extractions.fichaTecnica.lblComentarios")}}function Ln(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",11)(2,"div",15)(3,"mat-list",9),t._UZ(4,"app-mat-list-item-text",10),t.qZA()()(),t.YNc(5,Sn,6,7,"div",6),t.YNc(6,Un,15,10,"div",6),t.TgZ(7,"div",11)(8,"div",13)(9,"h3"),t._uU(10),t.ALo(11,"translate"),t.qZA()(),t.YNc(12,wn,5,4,"ng-container",5),t.qZA(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(4),t.Q6J("elem",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.descInstalacion)("label","extractions.fichaTecnica.lblInstalacionBombeo"),t.xp6(1),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0),t.xp6(1),t.Q6J("ngIf",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.idAzud||e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto.idEmbalse),t.xp6(4),t.Oqu(t.lcZ(11,6,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaAzudEmbalseDatTecExtraccionesDto)}}function Jn(n,c){1&n&&(t.ynx(0),t.TgZ(1,"div",18)(2,"h4"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.BQk()),2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"extractions.fichaTecnica.lblNoHayDatosTecnicosRecogidosCaptacion")))}function Rn(n,c){if(1&n&&t._UZ(0,"app-map-icon",22),2&n){const e=t.oxw(3);t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}function Vn(n,c){if(1&n&&(t.TgZ(0,"div",11)(1,"div",19)(2,"div",20),t.YNc(3,Rn,1,2,"app-map-icon",21),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf",!e.extraccion.concesional)}}function Fn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4),t.YNc(6,Zn,5,2,"ng-container",5),t.YNc(7,In,12,8,"ng-container",5),t.YNc(8,qn,13,8,"ng-container",5),t.YNc(9,Ln,13,8,"ng-container",5),t.YNc(10,Jn,5,3,"ng-container",5),t.YNc(11,Vn,4,1,"div",6),t.qZA(),t.BQk()),2&n){const e=t.oxw();
1t.xp6(3),t.AsE("",e.extraccion.id," - ",e.extraccion.nombre,""),t.xp6(3),t.Q6J("ngIf",e.typeForm1||e.typeForm2||e.typeForm3),t.xp6(1),t.Q6J("ngIf",e.typeForm1),t.xp6(1),t.Q6J("ngIf",e.typeForm2),t.xp6(1),t.Q6J("ngIf",e.typeForm3),t.xp6(1),t.Q6J("ngIf",e.typeForm4),t.xp6(1),t.Q6J("ngIf",!e.typeForm4)}}function Bn(n,c){1&n&&t._UZ(0,"app-spinner")}let Qn=(()=>{class n{constructor(e,i){this.tableConfigurationService=e,this.extractionsService=i,this.numRed=r.C.numRed,this.dateFormat=r.C.dateFormat,this.stop$=new x.x,this.typeForm1=!1,this.typeForm2=!1,this.typeForm3=!1,this.typeForm4=!1,this.visibleButtons={edit:{active:!1}},this.tableConfigurationPerforacion=this.tableConfigurationService.getExtractionsDatosPerforacionTableConfiguration(),this.tableConfigurationBombeo=this.tableConfigurationService.getExtractionsDatosBombeoTableConfiguration(),this.tableConfigurationEntubacion=this.tableConfigurationService.getExtractionsDatosEntubacionTableConfiguration()}ngOnInit(){this.extractionsService.getDatosTecnicos(this.extraccion.id).pipe((0,T.R)(this.stop$)).subscribe(e=>{this.technicalData=e;let i=this.technicalData.idSubtipo;i?i===r.C.subtipoCaptacionExtracciones.POZO||i===r.C.subtipoCaptacionExtracciones.EXTRACCION_EN_ALUVIAL||i===r.C.subtipoCaptacionExtracciones.SONDEO||i===r.C.subtipoCaptacionExtracciones.TOMA_DE_CAUCE||i===r.C.subtipoCaptacionExtracciones.POZO_CON_DREN||i===r.C.subtipoCaptacionExtracciones.POZO_RADIAL?this.typeForm1=!0:i===r.C.subtipoCaptacionExtracciones.GALERIA?this.typeForm2=!0:i===r.C.subtipoCaptacionExtracciones.TOMA_FIJA||i===r.C.subtipoCaptacionExtracciones.TOMA_MOVIL||i===r.C.subtipoCaptacionExtracciones.MANANTIAL_CAPTADO||i===r.C.subtipoCaptacionExtracciones.TOMA_DE_EMBALSE||i===r.C.subtipoCaptacionExtracciones.TOMA_DE_LAGO||i===r.C.subtipoCaptacionExtracciones.TOMA_DE_CANAL||i===r.C.subtipoCaptacionExtracciones.PRESA||i===r.C.subtipoCaptacionExtracciones.AZUD||i===r.C.subtipoCaptacionExtracciones.MANANTIAL_CAPTADO_EN_ALUVIAL?this.typeForm3=!0:(i===r.C.subtipoCaptacionExtracciones.EMISARIO_AGUAS_RESIDUALES_RECICLADAS||i===r.C.subtipoCaptacionExtracciones.CHARCA||i===r.C.subtipoCaptacionExtracciones.CHARCA_EN_ALUVIAL||i===r.C.subtipoCaptacionExtracciones.PLUVIAL||i===r.C.subtipoCaptacionExtracciones.EXCAVACION_BALSA||i===r.C.subtipoCaptacionExtracciones.OTROS||i===r.C.subtipoCaptacionExtracciones.DESCONOCIDO||i===r.C.subtipoCaptacionExtracciones.SIN_CATALOGAR)&&(this.typeForm4=!0):this.typeForm4=!0})}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(z.A),t.Y36(C.k))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technic-data-no-perfil"]],inputs:{extraccion:"extraccion",entityName:"entityName",entityNameCiudadano:"entityNameCiudadano"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[4,"ngIf"],["class","row",4,"ngIf"],[1,"row","mb-2"],[1,"col","col-xl-6"],["dense",""],[3,"elem","label"],[1,"row"],[1,"container-subtitle","mt-2"],[1,"container-subtitle"],[3,"searchResult","tableColumns","visibleButtons","showPagination"],[1,"col","col-xl-12"],[1,"container-subtitle","mb-2","mt-2"],[1,"container-subtitle","mb-2"],[1,"container-subtitle","mt-4","mb-2","textRedCenter"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId",4,"ngIf"],[3,"entityName","entityId"]],template:function(e,i){if(1&e&&(t.YNc(0,Fn,12,8,"ng-container",0),t.YNc(1,Bn,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.technicalData)("ngIfElse",a)}},directives:[h.O5,A.d,K.i$,Tn.f,et.D,xt.B,Y.N,I.O],pipes:[p.X$],styles:[""]}),n})();var ut=d(8306);function Yn(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",6)(2,"span",7),t._uU(3),t.ALo(4,"translate"),t.qZA(),t._uU(5),t.qZA(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(3),t.hij("",t.lcZ(4,2,"extractions.fichaTecnica.lblTipoCaptacion"),":\xa0"),t.xp6(2),t.hij("",e.technicalData.nombreSubtipo," ")}}function kn(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-manage-basic-table",33),t.NdJ("newEditEvent",function(a){return t.CHM(e),t.oxw(3).editPerforacion(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw(3).deletePerforacion(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("searchResult",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion)("tableColumns",e.tableConfigurationPerforacion)("visibleButtons",e.visibleButtons)("actionsColumnWidth",9)("showPagination",!1)}}function Gn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionPerforacion)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disablePerforacionValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}const G=function(){return["2","7"]};function Hn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionPerforacion)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionPerforacion,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,Gn,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.perforacionControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function $n(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-manage-basic-table",33),t.NdJ("newEditEvent",function(a){return t.CHM(e),t.oxw(3).editEntubacion(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw(3).deleteEntubacion(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("searchResult",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion)("tableColumns",e.tableConfigurationEntubacion)("visibleButtons",e.visibleButtons)("actionsColumnWidth",9)("showPagination",!1)}}function zn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionEntubacion)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableEntubacionValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function jn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionEntubacion)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionEntubacion,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,zn,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.entubacionControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function Xn(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-manage-basic-table",33),t.NdJ("newEditEvent",function(a){return t.CHM(e),t.oxw(3).editBombeo(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw(3).deleteBombeo(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("actionsColumnWidth",9)("showPagination",!1)}}function Wn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionBombeo)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableBombeoValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function Kn(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionBombeo)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionBombeo,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,Wn,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.bombeoControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function ti(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function ei(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function ni(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionTypePozo)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disablePozoValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function ii(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionTypePozo)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionTypePozo,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,ni,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.pozoControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}const ft=function(n,c,e){return["../../fieldsHistory",n,c,e]};function ai(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",8)(2,"div",9)(3,"h3"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.YNc(6,kn,2,5,"ng-container",5),t.TgZ(7,"div",8)(8,"div",10)(9,"div",11)(10,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).newPerforacion()}),t._uU(11),t.ALo(12,"translate"),t.qZA()()()()(),t.YNc(13,Hn,12,9,"div",13),t.TgZ(14,"div",8)(15,"div",9)(16,"h3"),t._uU(17),t.ALo(18,"translate"),t.qZA()(),t.YNc(19,$n,2,5,"ng-container",5),t.TgZ(20,"div",8)(21,"div",10)(22,"div",11)(23,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).newEntubacion()}),t._uU(24),t.ALo(25,"translate"),t.qZA()()()()(),t.YNc(26,jn,12,9,"div",13),t.TgZ(27,"div",8)(28,"div",9)(29,"h3"),t._uU(30),t.ALo(31,"translate"),t.qZA()(),t.YNc(32,Xn,2,5,"ng-container",5),t.TgZ(33,"div",8)(34,"div",10)(35,"div",11)(36,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).newBombeo()}),t._uU(37),t.ALo(38,"translate"),t.qZA()()()()(),t.YNc(39,Kn,12,9,"div",13),t.TgZ(40,"form",14,15),t.NdJ("ngSubmit",function(){return t.CHM(e),t.oxw(2).onSubmitPozo()}),t.TgZ(42,"div",9)(43,"h3"),t._uU(44),t.ALo(45,"translate"),t.qZA()(),t.TgZ(46,"div",8)(47,"div",16)(48,"div",17)(49,"div",18)(50,"span",7),t._uU(51),t.ALo(52,"translate"),t.qZA()(),t.TgZ(53,"div",19)(54,"mat-form-field",20)(55,"mat-select",21),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t.YNc(56,ti,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(57,"div",8)(58,"div",16)(59,"div",17)(60,"div",18)(61,"span",7),t._uU(62),t.ALo(63,"translate"),t.qZA()(),t.TgZ(64,"div",19)(65,"mat-form-field",20)(66,"mat-select",23),t.
1NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(67,"mat-option",24),t.YNc(68,ei,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(69,"div",8)(70,"div",16)(71,"div",17)(72,"div",25)(73,"span",7),t._uU(74),t.ALo(75,"translate"),t.qZA()(),t.TgZ(76,"div",19)(77,"mat-form-field",20),t._UZ(78,"textarea",26,27),t.qZA()()()()(),t.TgZ(80,"div",8)(81,"div",28)(82,"div",11)(83,"button",29),t._uU(84),t.ALo(85,"translate"),t.qZA(),t.TgZ(86,"button",30),t._uU(87),t.ALo(88,"translate"),t._UZ(89,"i",31),t.qZA(),t._UZ(90,"app-map-icon",32),t.qZA()()()(),t.YNc(91,ii,12,9,"div",13),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Oqu(t.lcZ(5,25,"extractions.fichaTecnica.lblDatosPerforacion")),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.perforacion.length>0),t.xp6(5),t.Oqu(t.lcZ(12,27,"botones.nuevo")),t.xp6(2),t.Q6J("ngIf",e.existPerforacionVersions),t.xp6(4),t.Oqu(t.lcZ(18,29,"extractions.fichaTecnica.lblDatosEntubacion")),t.xp6(2),t.Q6J("ngIf",e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion&&e.technicalData.pantallaPerforacionEntubacionDatTecExtraccionesDto.entubacion.length>0),t.xp6(5),t.Oqu(t.lcZ(25,31,"botones.nuevo")),t.xp6(2),t.Q6J("ngIf",e.existEntubacionVersions),t.xp6(4),t.Oqu(t.lcZ(31,33,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0),t.xp6(5),t.Oqu(t.lcZ(38,35,"botones.nuevo")),t.xp6(2),t.Q6J("ngIf",e.existBombeoVersions),t.xp6(1),t.Q6J("formGroup",e.pozoGroup),t.xp6(4),t.Oqu(t.lcZ(45,37,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(7),t.Oqu(t.lcZ(52,39,"extractions.fichaTecnica.lblTuberiaPiezometrica")),t.xp6(5),t.Q6J("ngForOf",e.defaultCombo),t.xp6(6),t.Oqu(t.lcZ(63,41,"extractions.fichaTecnica.lblTipoContador")),t.xp6(6),t.Q6J("ngForOf",e.contadorCombo),t.xp6(6),t.Oqu(t.lcZ(75,43,"extractions.fichaTecnica.lblComentarios")),t.xp6(9),t.Q6J("routerLink",t.kEZ(49,ft,e.extraccion.id,e.operacionTypePozo,e.extraccion.nombre)),t.xp6(1),t.Oqu(t.lcZ(85,45,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(88,47,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id),t.xp6(1),t.Q6J("ngIf",e.existPozoVersions)}}function oi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function ci(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function ri(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function si(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function li(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function di(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"validacionForm.requerido")," "))}function pi(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function mi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.validarMinimoMaximo")))}function _i(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionTypeGaleria)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableGaleriaValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function ui(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionTypeGaleria)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionTypeGaleria,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,_i,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.galeriaControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function fi(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-manage-basic-table",33),t.NdJ("newEditEvent",function(a){return t.CHM(e),t.oxw(3).editBombeo(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw(3).deleteBombeo(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("actionsColumnWidth",9)("showPagination",!1)}}function gi(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionBombeo)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableBombeoValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function hi(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionBombeo)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionBombeo,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,gi,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.bombeoControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function bi(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"form",14,40),t.NdJ("ngSubmit",function(){return t.CHM(e),t.oxw(2).onSubmitGaleria()}),t.TgZ(3,"div",9)(4,"h3"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"div",8)(8,"div",19)(9,"div",17)(10,"div",41)(11,"span",7),t._uU(12),t.ALo(13,"translate"),t.qZA()(),t.TgZ(14,"div",42)(15,"mat-form-field",20),t._UZ(16,"input",43),t.YNc(17,oi,3,3,"mat-error",5),t.qZA()(),t.TgZ(18,"div",44),t._uU(19),t.ALo(20,"translate"),t.qZA()()()(),t.TgZ(21,"div",8)(22,"div",19)(23,"div",17)(24,"div",41)(25,"span",7),t._uU(26),t.ALo(27,"translate"),t.qZA()(),t.TgZ(28,"div",42)(29,"mat-form-field",20),t._UZ(30,"input",45),t.YNc(31,ci,3,3,"mat-error",5),t.qZA()(),t.TgZ(32,"div",44),t._uU(33),t.ALo(34,"translate"),t.qZA()()()(),t.TgZ(35,"div",8)(36,"div",19)(37,"div",17)(38,"div",41)(39,"span",7),t._uU(40),t.ALo(41,"translate"),t.qZA()(),t.TgZ(42,"div",42)(43,"mat-form-field",20),t._UZ(44,"input",46),t.YNc(45,ri,3,3,"mat-error",5),t.qZA()(),t.TgZ(46,"div",44),t._uU(47),t.ALo(48,"translate"),t.qZA()()()(),t.TgZ(49,"div",8)(50,"div",19)(51,"div",17)(52,"div",41)(53,"span",7),t._uU(54),t.ALo(55,"translate"),t.qZA()(),t.TgZ(56,"div",42)(57,"mat-form-field",20),t._UZ(58,"input",47),t.YNc(59,si,3,3,"mat-error",5),t.qZA()(),t.TgZ(60,"div",44),t._uU(61),t.ALo(62,"translate"),t.qZA()()()(),t.TgZ(63,"div",8)(64,"div",19)(65,"div",17)(66,"div",41)(67,"span",7),t._uU(68),t.ALo(69,"translate"),t.qZA()(),t.TgZ(70,"div",48)(71,"mat-form-field",20),t._UZ(72,"textarea",26,27),t.qZA()()()()(),t.TgZ(74,"div",8)(75,"div",9)(76,"h3"),t._uU(77),t.ALo(78,"translate"),t.qZA()()(),t.TgZ(79,"div",8)(80,"div",19)(81,"div",17)(82,"div",49)(83,"span",7),t._uU(84),t.ALo(85,"translate"),t.qZA()(),t.TgZ(86,"div",48)(87,"mat-form-field",20)(88,"mat-select",23),t.
1NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(89,"mat-option",24),t.YNc(90,li,2,3,"mat-option",22),t.qZA(),t.YNc(91,di,3,3,"mat-error",5),t.qZA()()()()(),t.TgZ(92,"div",8)(93,"div",19)(94,"div",17)(95,"div",49)(96,"span",7),t._uU(97),t.ALo(98,"translate"),t.qZA()(),t.TgZ(99,"div",48)(100,"mat-form-field",20)(101,"mat-select",50),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t.YNc(102,pi,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(103,"div",8)(104,"div",51),t.YNc(105,mi,3,3,"mat-error",5),t.qZA()(),t.TgZ(106,"div",8)(107,"div",28)(108,"div",11)(109,"button",29),t._uU(110),t.ALo(111,"translate"),t.qZA(),t.TgZ(112,"button",30),t._uU(113),t.ALo(114,"translate"),t._UZ(115,"i",31),t.qZA(),t._UZ(116,"app-map-icon",32),t.qZA()()(),t.YNc(117,ui,12,9,"div",13),t.qZA(),t.TgZ(118,"div",8)(119,"div",35)(120,"h3"),t._uU(121),t.ALo(122,"translate"),t.qZA()(),t.YNc(123,fi,2,5,"ng-container",5),t.TgZ(124,"div",8)(125,"div",10)(126,"div",11)(127,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).newBombeo()}),t._uU(128),t.ALo(129,"translate"),t.qZA()()()()(),t.YNc(130,hi,12,9,"div",13),t.BQk()}if(2&n){const e=t.oxw(2);let i,a,o,l,s;t.xp6(1),t.Q6J("formGroup",e.galeriaGroup),t.xp6(4),t.Oqu(t.lcZ(6,32,"extractions.fichaTecnica.lblGaleria")),t.xp6(7),t.Oqu(t.lcZ(13,34,"extractions.fichaTecnica.lblLongitudSinUnidad")),t.xp6(5),t.Q6J("ngIf",null==(i=e.galeriaGroup.get("profundidad"))?null:i.hasError),t.xp6(2),t.hij(" ",t.lcZ(20,36,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(27,38,"extractions.fichaTecnica.lblDiametroMaximoSinUnidad")),t.xp6(5),t.Q6J("ngIf",null==(a=e.galeriaGroup.get("maxDiametro"))?null:a.hasError),t.xp6(2),t.hij(" ",t.lcZ(34,40,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(41,42,"extractions.fichaTecnica.lblDiametroMinimoSinUnidad")),t.xp6(5),t.Q6J("ngIf",null==(o=e.galeriaGroup.get("minDiametro"))?null:o.hasError),t.xp6(2),t.hij(" ",t.lcZ(48,44,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(55,46,"extractions.fichaTecnica.lblTuberiaFiltranteSinUnidad")),t.xp6(5),t.Q6J("ngIf",null==(l=e.galeriaGroup.get("longitudTuberia"))?null:l.hasError),t.xp6(2),t.hij(" ",t.lcZ(62,48,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(69,50,"extractions.fichaTecnica.lblComentarios")),t.xp6(9),t.Oqu(t.lcZ(78,52,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(7),t.Oqu(t.lcZ(85,54,"extractions.fichaTecnica.lblTipoContador")),t.xp6(6),t.Q6J("ngForOf",e.contadorCombo),t.xp6(1),t.Q6J("ngIf",null==(s=e.galeriaGroup.get("idContador"))?null:s.hasError("required")),t.xp6(6),t.Oqu(t.lcZ(98,56,"extractions.fichaTecnica.lblInstalacionBombeo")),t.xp6(5),t.Q6J("ngForOf",e.defaultCombo),t.xp6(3),t.Q6J("ngIf",e.galeriaGroup.hasError("minMaxError")),t.xp6(4),t.Q6J("routerLink",t.kEZ(66,ft,e.extraccion.id,e.operacionTypeGaleria,e.extraccion.nombre)),t.xp6(1),t.Oqu(t.lcZ(111,58,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(114,60,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id),t.xp6(1),t.Q6J("ngIf",e.existGaleriaVersions),t.xp6(4),t.Oqu(t.lcZ(122,62,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0),t.xp6(5),t.Oqu(t.lcZ(129,64,"botones.nuevo")),t.xp6(2),t.Q6J("ngIf",e.existBombeoVersions)}}function xi(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function vi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"validacionForm.requerido")," "))}function Ci(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-manage-basic-table",33),t.NdJ("newEditEvent",function(a){return t.CHM(e),t.oxw(3).editBombeo(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw(3).deleteBombeo(a)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("searchResult",e.technicalData.instalacionBombeo)("tableColumns",e.tableConfigurationBombeo)("visibleButtons",e.visibleButtons)("actionsColumnWidth",9)("showPagination",!1)}}function Ti(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionBombeo)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableBombeoValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function Zi(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionBombeo)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionBombeo,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,Ti,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.bombeoControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function Ai(n,c){if(1&n&&(t.TgZ(0,"mat-option",57),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.id),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Ei(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Oi(n,c){if(1&n&&(t.TgZ(0,"mat-option",39),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Di(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(4);return a.validateVersions(a.operacionTypeAzudEmbalse)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("disabled",e.disableAzudEmbalseValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}function Ni(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",8)(1,"div",34)(2,"div",35)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",8)(7,"app-version-table",36),t.NdJ("newSelectEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.addSelection(a,o.operacionTypeAzudEmbalse)})("newValidateVersionEvent",function(a){t.CHM(e);const o=t.oxw(3);return o.validateVersions(o.operacionTypeAzudEmbalse,a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(3).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",8)(9,"div",28)(10,"div",11),t.YNc(11,Di,3,4,"button",37),t.qZA()()()()()}if(2&n){const e=t.oxw(3);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.azudEmbalseControlVersiones)("tableColumns",e.tableConfigurationVersion)("itemName",e.extraccion.nombre)("entityType",e.entityType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,G))}}function Ii(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"form",14,52),t.NdJ("ngSubmit",function(){return t.CHM(e),t.oxw(2).onSubmitToma()}),t.TgZ(3,"div",8)(4,"div",48)(5,"div",17)(6,"div",49)(7,"span",7),t._uU(8),t.ALo(9,"translate"),t.qZA()(),t.TgZ(10,"div",48)(11,"mat-form-field",20)(12,"mat-select",50),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(13,"mat-option",24),t.YNc(14,xi,2,3,"mat-option",22),t.qZA(),t.YNc(15,vi,3,3,"mat-error",5),t.qZA()()()()(),t.TgZ(16,"div",8)(17,"div",35)(18,"h3"),t._uU(19),t.ALo(20,"translate"),t.qZA()(),t.YNc(21,Ci,2,5,"ng-container",5),t.TgZ(22,"div",8)(23,"div",10)(24,"div",11)(25,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).newBombeo()}),t._uU(26),t.ALo(27,"translate"),t.qZA()()()()(),t.YNc(28,Zi,12,9,"div",13),t.TgZ(29,"div",8)(30,"div",48)(31,"div",35)(32,"h3"),t._uU(33),t.ALo(34,"translate"),t.qZA()(),t.TgZ(35,"div",17)(36,"div",49)(37,"span",7),t._uU(38),t.ALo(39,"translate"),t.qZA()(),t.TgZ(40,"div",48)(41,"mat-form-field",20)(42,"mat-select",53),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(43,"mat-option",24),t.YNc(44,Ai,2,3,"mat-option",54),t.qZA()()()()()(),t.TgZ(45,"div",8)(46,"div",48)(47,"div",35)(48,"h3"),t._uU(49),t.ALo(50,"translate"),t.qZA()(),t.TgZ(51,"div",17)(52,"div",49)(53,"span",7),t._uU(54),t.ALo(55,"translate"),t.qZA()(),t.TgZ(56,"div",48)(57,"mat-form-field",20)(58,"mat-select",55),t.NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(59,"mat-option",24),t.YNc(60,Ei,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(61,"div",8)(62,"div",9)(63,"h3"),t._uU(64),t.ALo(65,"translate"),t.qZA()()(),t.TgZ(66,"div",8)(67,"div",48)(68,"div",17)(69,"div",49)(70,"span",7),t._uU(71),t.ALo(72,"translate"),t.qZA()(),t.TgZ(73,"div",48)(74,"mat-form-field",20)(75,"mat-select",23),t.
1NdJ("selectionChange",function(a){return t.CHM(e),t.oxw(2).selectedValue(a)}),t._UZ(76,"mat-option",24),t.YNc(77,Oi,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(78,"div",8)(79,"div",48)(80,"div",17)(81,"div",41)(82,"span",7),t._uU(83),t.ALo(84,"translate"),t.qZA()(),t.TgZ(85,"div",48)(86,"mat-form-field",20),t._UZ(87,"textarea",56,27),t.qZA()()()()(),t.TgZ(89,"div",8)(90,"div",28)(91,"div",11)(92,"button",29),t._uU(93),t.ALo(94,"translate"),t.qZA(),t.TgZ(95,"button",30),t._uU(96),t.ALo(97,"translate"),t._UZ(98,"i",31),t.qZA(),t._UZ(99,"app-map-icon",32),t.qZA()()()(),t.YNc(100,Ni,12,9,"div",13),t.BQk()}if(2&n){const e=t.oxw(2);let i;t.xp6(1),t.Q6J("formGroup",e.tomaGroup),t.xp6(7),t.Oqu(t.lcZ(9,24,"extractions.fichaTecnica.lblInstalacionBombeo")),t.xp6(6),t.Q6J("ngForOf",e.defaultCombo),t.xp6(1),t.Q6J("ngIf",null==(i=e.tomaGroup.get("idInstalacion"))?null:i.hasError("required")),t.xp6(4),t.Oqu(t.lcZ(20,26,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(2),t.Q6J("ngIf",e.technicalData.instalacionBombeo&&e.technicalData.instalacionBombeo.length>0),t.xp6(5),t.Oqu(t.lcZ(27,28,"botones.nuevo")),t.xp6(2),t.Q6J("ngIf",e.existBombeoVersions),t.xp6(5),t.Oqu(t.lcZ(34,30,"extractions.fichaTecnica.lblAzudRelacionado")),t.xp6(5),t.Oqu(t.lcZ(39,32,"extractions.fichaTecnica.lblNombre")),t.xp6(6),t.Q6J("ngForOf",e.azudCombo),t.xp6(5),t.Oqu(t.lcZ(50,34,"extractions.fichaTecnica.lblEmbalseRelacionado")),t.xp6(5),t.Oqu(t.lcZ(55,36,"extractions.fichaTecnica.lblNombre")),t.xp6(6),t.Q6J("ngForOf",e.embalseCombo),t.xp6(4),t.Oqu(t.lcZ(65,38,"extractions.fichaTecnica.lblOtrosDatos")),t.xp6(7),t.Oqu(t.lcZ(72,40,"extractions.fichaTecnica.lblTipoContador")),t.xp6(6),t.Q6J("ngForOf",e.contadorCombo),t.xp6(6),t.Oqu(t.lcZ(84,42,"extractions.fichaTecnica.lblComentarios")),t.xp6(9),t.Q6J("routerLink",t.kEZ(48,ft,e.extraccion.id,e.operacionTypeAzudEmbalse,e.extraccion.nombre)),t.xp6(1),t.Oqu(t.lcZ(94,44,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(97,46,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id),t.xp6(1),t.Q6J("ngIf",e.existAzudEmbalseVersions)}}function yi(n,c){1&n&&(t.ynx(0),t.TgZ(1,"div",58)(2,"h4"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.BQk()),2&n&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"extractions.fichaTecnica.lblNoHayDatosTecnicosRecogidosCaptacion")))}function Mi(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4),t.YNc(6,Yn,6,4,"ng-container",5),t.YNc(7,ai,92,53,"ng-container",5),t.YNc(8,bi,131,70,"ng-container",5),t.YNc(9,Ii,101,52,"ng-container",5),t.YNc(10,yi,5,3,"ng-container",5),t.qZA(),t.BQk()),2&n){const e=t.oxw();
1t.xp6(3),t.AsE("",e.extraccion.id," - ",e.extraccion.nombre,""),t.xp6(3),t.Q6J("ngIf",e.typeForm1||e.typeForm2||e.typeForm3),t.xp6(1),t.Q6J("ngIf",e.typeForm1),t.xp6(1),t.Q6J("ngIf",e.typeForm2),t.xp6(1),t.Q6J("ngIf",e.typeForm3),t.xp6(1),t.Q6J("ngIf",e.typeForm4)}}function Pi(n,c){1&n&&t._UZ(0,"app-spinner")}let qi=(()=>{class n{constructor(e,i,a,o,l,s,m,b){this.tableConfigurationService=e,this.extractionsService=i,this.translate=a,this.dialogModelService=o,this.router=l,this.fb=s,this.activatedRoute=m,this.checkGreaterThanService=b,this.editBombeoEvent=new t.vpe,this.newBombeoEvent=new t.vpe,this.newEntubacionEvent=new t.vpe,this.editEntubacionEvent=new t.vpe,this.newPerforacionEvent=new t.vpe,this.editPerforacionEvent=new t.vpe,this.numRed=r.C.numRed,this.dateFormat=r.C.dateFormat,this.stop$=new x.x,this.typeForm1=!1,this.typeForm2=!1,this.typeForm3=!1,this.typeForm4=!1,this.selectedCombosTextValues={idContador:"",idTuberiaPiezometrica:"",idInstalacion:"",idEmbalse:"",idAzud:""},this.profiles=["2","4","7"],this.visibleButtons={edit:{active:!0,profiles:this.profiles},delete:{active:!0,profiles:this.profiles}},this.operacionBombeo=r.C.operacion.OPERACION_BOMBEO_EXTRACCIONES,this.operacionEntubacion=r.C.operacion.OPERACION_ENTUBACION_EXTRACCIONES,this.operacionPerforacion=r.C.operacion.OPERACION_PERFORACION_EXTRACCIONES,this.operacionTypePozo=r.C.operacion.OPERACION_POZO_EXTRACCIONES,this.operacionTypeGaleria=r.C.operacion.OPERACION_GALERIA_EXTRACCIONES,this.operacionTypeAzudEmbalse=r.C.operacion.OPERACION_AZUD_EMBALSE_EXTRACCIONES,this.numberPipe=new h.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.operation=r.C.operacionRealizada.MODIFICADO,this.entityType=r.C.tipoEntidad.extraccionAguas,this.existBombeoVersions=!1,this.existEntubacionVersions=!1,this.existPerforacionVersions=!1,this.existPozoVersions=!1,this.existGaleriaVersions=!1,this.existAzudEmbalseVersions=!1,this.selectionBombeo=[],this.disableBombeoValidateBtn=!0,this.selectionEntubacion=[],this.disableEntubacionValidateBtn=!0,this.selectionPerforacion=[],this.disablePerforacionValidateBtn=!0,this.selectionPozo=[],this.disablePozoValidateBtn=!0,this.selectionGaleria=[],this.disableGaleriaValidateBtn=!0,this.selectionAzudEmbalse=[],this.disableAzudEmbalseValidateBtn=!0,this.tableConfigurationPerforacion=this.tableConfigurationService.getExtractionsDatosPerforacionTableConfiguration(),this.tableConfigurationBombeo=this.tableConfigurationService.getExtractionsDatosBombeoTableConfiguration(),this.tableConfigurationEntubacion=this.tableConfigurationService.getExtractionsDatosEntubacionTableConfiguration(),this.tableConfigurationVersion=this.tableConfigurationService.getVersionTableConfiguration()}ngOnInit(){this.extractionsService.getDatosTecnicos(Number(this.extraccion.id)).pipe((0,T.R)(this.stop$)).subscribe(e=>{var i,a,o,l;this.technicalData=e;let s=this.technicalData.idSubtipo;s?s===r.C.subtipoCaptacionExtracciones.POZO||s===r.C.subtipoCaptacionExtracciones.EXTRACCION_EN_ALUVIAL||s===r.C.subtipoCaptacionExtracciones.SONDEO||s===r.C.subtipoCaptacionExtracciones.POZO_CON_DREN||s===r.C.subtipoCaptacionExtracciones.POZO_RADIAL?(this.createPozoForm(),this.typeForm1=!0):s===r.C.subtipoCaptacionExtracciones.GALERIA?(this.createGaleriaForm(),this.typeForm2=!0):s===r.C.subtipoCaptacionExtracciones.TOMA_FIJA||s===r.C.subtipoCaptacionExtracciones.TOMA_MOVIL||s===r.C.subtipoCaptacionExtracciones.MANANTIAL_CAPTADO||s===r.C.subtipoCaptacionExtracciones.TOMA_DE_EMBALSE||s===r.C.subtipoCaptacionExtracciones.TOMA_DE_LAGO||s===r.C.subtipoCaptacionExtracciones.TOMA_DE_CANAL||s===r.C.subtipoCaptacionExtracciones.TOMA_DE_CAUCE||s===r.C.subtipoCaptacionExtracciones.PRESA||s===r.C.subtipoCaptacionExtracciones.AZUD||s===r.C.subtipoCaptacionExtracciones.MANANTIAL_CAPTADO_EN_ALUVIAL?(this.azudCombo=null===(i=this.combos)||void 0===i?void 0:i.find(m=>m.listado===r.C.COMBO_AZUD_EXTRACCIONES).data,this.embalseCombo=null===(a=this.combos)||void 0===a?void 0:a.find(m=>m.listado===r.C.COMBO_EMBALSE_EXTRACCIONES).data,this.createTomaForm(),this.typeForm3=!0):(s===r.C.subtipoCaptacionExtracciones.EMISARIO_AGUAS_RESIDUALES_RECICLADAS||s===r.C.subtipoCaptacionExtracciones.CHARCA||s===r.C.subtipoCaptacionExtracciones.CHARCA_EN_ALUVIAL||s===r.C.subtipoCaptacionExtracciones.PLUVIAL||s===r.C.subtipoCaptacionExtracciones.EXCAVACION_BALSA||s===r.C.subtipoCaptacionExtracciones.OTROS||s===r.C.subtipoCaptacionExtracciones.DESCONOCIDO||s===r.C.subtipoCaptacionExtracciones.SIN_CATALOGAR)&&(this.t
1ypeForm4=!0):this.typeForm4=!0,this.contadorCombo=null===(o=this.combos)||void 0===o?void 0:o.find(m=>m.listado===r.C.COMBO_CONTADOR_EXTRACCION).data,this.defaultCombo=null===(l=this.combos)||void 0===l?void 0:l.find(m=>m.listado===r.C.COMBO_DEFAULT).data,this.callToControlVersiones()})}createPozoForm(){var e,i,a,o,l,s;this.pozoGroup=this.fb.group({idContador:this.fb.control({value:null===(i=null===(e=this.technicalData)||void 0===e?void 0:e.pantallaPerforacionEntubacionDatTecExtraccionesDto)||void 0===i?void 0:i.idContador,disabled:!1}),idTuberiaPiezometrica:this.fb.control({value:null===(o=null===(a=this.technicalData)||void 0===a?void 0:a.pantallaPerforacionEntubacionDatTecExtraccionesDto)||void 0===o?void 0:o.idTuberiaPiezometrica,disabled:!1}),comentarios:this.fb.control({value:null===(s=null===(l=this.technicalData)||void 0===l?void 0:l.pantallaPerforacionEntubacionDatTecExtraccionesDto)||void 0===s?void 0:s.comentarios,disabled:!1})}),this.initialValuesPozoForm=this.pozoGroup.value}onSubmitPozo(){var e;if(this.pozoGroup.invalid)return;let i=u.c.compareObjects(this.initialValuesPozoForm,this.pozoGroup.value);this.goToFieldVersion(i,this.operacionTypePozo,null===(e=this.technicalData)||void 0===e?void 0:e.pantallaPerforacionEntubacionDatTecExtraccionesDto)}createGaleriaForm(){var e,i,a,o,l,s,m,b,O,F,it,at,ot,y;this.galeriaGroup=this.fb.group({profundidad:this.fb.control({value:this.numberPipe.transform(null===(i=null===(e=this.technicalData)||void 0===e?void 0:e.pantallaGaleriaDatTecExtraccionesDto)||void 0===i?void 0:i.profundidad,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),maxDiametro:this.fb.control({value:this.numberPipe.transform(null===(o=null===(a=this.technicalData)||void 0===a?void 0:a.pantallaGaleriaDatTecExtraccionesDto)||void 0===o?void 0:o.maxDiametro,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),minDiametro:this.fb.control({value:this.numberPipe.transform(null===(s=null===(l=this.technicalData)||void 0===l?void 0:l.pantallaGaleriaDatTecExtraccionesDto)||void 0===s?void 0:s.minDiametro,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),longitudTuberia:this.fb.control({value:this.numberPipe.transform(null===(b=null===(m=this.technicalData)||void 0===m?void 0:m.pantallaGaleriaDatTecExtraccionesDto)||void 0===b?void 0:b.longitudTuberia,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),comentarios:this.fb.control({value:null===(F=null===(O=this.technicalData)||void 0===O?void 0:O.pantallaGaleriaDatTecExtraccionesDto)||void 0===F?void 0:F.comentarios,disabled:!1}),idContador:this.fb.control({value:null===(at=null===(it=this.technicalData)||void 0===it?void 0:it.pantallaGaleriaDatTecExtraccionesDto)||void 0===at?void 0:at.idContador,disabled:!1},_.kI.required),idInstalacion:this.fb.control({value:null===(y=null===(ot=this.technicalData)||void 0===ot?void 0:ot.pantallaGaleriaDatTecExtraccionesDto)||void 0===y?void 0:y.idInstalacion,disabled:!1})},{validators:this.checkGreaterThanService.minMaxValidation("minDiametro","maxDiametro")}),this.initialValuesGaleriaForm=this.galeriaGroup.value,this.elementCheckNameList=["profundidad","maxDiametro","minDiametro","longitudTuberia"]}onSubmitGaleria(){var e;if(this.galeriaGroup.invalid)return;let i=u.c.compareObjects(this.initialValuesGaleriaForm,this.galeriaGroup.value);this.goToFieldVersion(i,this.operacionTypeGaleria,null===(e=this.technicalData)||void 0===e?void 0:e.pantallaGaleriaDatTecExtraccionesDto)}createTomaForm(){var e,i,a,o,l,s,m,b,O,F;this.tomaGroup=this.fb.group({idContador:this.fb.control({value:null===(i=null===(e=this.technicalData)||void 0===e?void 0:e.pantallaAzudEmbalseDatTecExtraccionesDto)||void 0===i?void 0:i.idContador,disabled:!1}),idInstalacion:this.fb.control({value:null===(o=null===(a=this.technicalData)||void 0===a?void 0:a.pantallaAzudEmbalseDatTecExtraccionesDto)||void 0===o?void 0:o.idInstalacion,disabled:!1},_.kI.required),idEmbalse:this.fb.control({value:null===(s=null===(l=this.technicalData)||void 0===l?void 0:l.pantallaAzudEmbalseDatTecExtraccionesDto)||void 0===s?void 0:s.idEmbalse,disabled:!1}),idAzud:this.fb.control({value:null===(b=null===(m=this.technicalData)||void 0===m?void 0:m.pantallaAzudEmbalseDatTecExtraccionesDto)||void 0===b?void 0:b.idAzud,disabled:!1}),comentarios:this.fb.control({value:null===(F=null===(O=this.technicalData)||void 0===O?void 0:O.pantallaAzudEmbalseDatTecExtraccionesDto)||void 0===F?void 0:F.comentarios,disabled:!1})}
1),this.initialValuesTomaForm=this.tomaGroup.value}onSubmitToma(){var e;if(this.tomaGroup.invalid)return;let i=u.c.compareObjects(this.initialValuesTomaForm,this.tomaGroup.value);this.goToFieldVersion(i,this.operacionTypeAzudEmbalse,null===(e=this.technicalData)||void 0===e?void 0:e.pantallaAzudEmbalseDatTecExtraccionesDto)}goToFieldVersion(e,i,a){Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.extraccion.id}/${i}`],{relativeTo:this.activatedRoute,state:{comparedObject:this.prepareData(e),item:a,operation:this.operation}}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(o=>o);let a=[];for(const o in e){let l,s=e[o],m=e[o];i.includes(o)?s=this.selectedCombosTextValues[o]:(m&&this.elementCheckNameList.includes(o)&&(m=u.c.convertFormattedNumber(m.toString())),s=e[o]),l=new j.i(o,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${o}`),m,s,!1),a.push(l)}return a}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}editPerforacion(e){this.editPerforacionEvent.emit(e)}deletePerforacion(e){this.router.navigate([`../../fieldsVersionDelete/${this.extraccion.id}/${this.operacionPerforacion}`],{relativeTo:this.activatedRoute,state:e})}newPerforacion(){this.newPerforacionEvent.emit(!0)}editBombeo(e){this.editBombeoEvent.emit(e)}deleteBombeo(e){this.router.navigate([`../../fieldsVersionDelete/${this.extraccion.id}/${this.operacionBombeo}`],{relativeTo:this.activatedRoute,state:e})}newBombeo(){this.newBombeoEvent.emit(!0)}editEntubacion(e){this.editEntubacionEvent.emit(e)}deleteEntubacion(e){this.router.navigate([`../../fieldsVersionDelete/${this.extraccion.id}/${this.operacionEntubacion}`],{relativeTo:this.activatedRoute,state:e})}newEntubacion(){this.newEntubacionEvent.emit(!0)}callToControlVersiones(){this.typeForm1?(this.callToControlVersionesPerforacion(),this.callToControlVersionesEntubacion(),this.callToControlVersionesBombeo(),this.callToControlVersionesPozo()):this.typeForm2?(this.callToControlVersionesBombeo(),this.callToControlVersionesGaleria()):this.typeForm3&&(this.callToControlVersionesBombeo(),this.callToControlVersionesAzudEmbalse())}callToControlVersionesBombeo(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionBombeo).subscribe(e=>{e.length>0&&(this.existBombeoVersions=!0),this.bombeoControlVersiones=e})}callToControlVersionesEntubacion(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionEntubacion).subscribe(e=>{e.length>0&&(this.existEntubacionVersions=!0),this.entubacionControlVersiones=e})}callToControlVersionesPerforacion(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionPerforacion).subscribe(e=>{e.length>0&&(this.existPerforacionVersions=!0),this.perforacionControlVersiones=e})}callToControlVersionesPozo(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionTypePozo).subscribe(e=>{e.length>0&&(this.existPozoVersions=!0),this.pozoControlVersiones=e})}callToControlVersionesGaleria(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionTypeGaleria).subscribe(e=>{e.length>0&&(this.existGaleriaVersions=!0),this.galeriaControlVersiones=e})}callToControlVersionesAzudEmbalse(){this.extractionsService.getControlDeVersiones(this.extraccion.id,this.operacionTypeAzudEmbalse).subscribe(e=>{e.length>0&&(this.existAzudEmbalseVersions=!0),this.azudEmbalseControlVersiones=e})}addSelection(e,i){i===this.operacionBombeo?(this.disableBombeoValidateBtn=0===e.length,this.selectionBombeo=e):i===this.operacionEntubacion?(this.disableEntubacionValidateBtn=0===e.length,this.selectionEntubacion=e):i===this.operacionPerforacion?(this.disablePerforacionValidateBtn=0===e.length,this.selectionPerforacion=e):i===this.operacionTypePozo?(this.disablePozoValidateBtn=0===e.length,this.selectionPozo=e):i===this.operacionTypeGaleria?(this.disableGaleriaValidateBtn=0===e.length,this.selectionGaleria=e):i===this.operacionTypeAzudEmbalse&&(this.disableAzudEmbalseValidateBtn=0===e.length,this.selectionAzudEmbalse=e)}deleteVersion(e){this.extractionsService.descartarOperacion(e.version,e.operacionEntidad).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartar
1Version.titulo"),this.translate.instant("dialogos.descartarVersion.descartarCorrecta")),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarError"))})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}validateVersions(e,i){let a=[];i?a.push(i):a=this.getValidateVersionList(e),this.extractionsService.validarBloque(a).subscribe(o=>{200===o.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),`${this.translate.instant("dialogos.validarVersion.validacionCorrecta")} ${o.body} ${this.translate.instant(o.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),this.translate.instant("dialogos.validarVersion.validacionError"))})}getValidateVersionList(e){let i=[];return e===this.operacionBombeo?i=this.selectionBombeo:e===this.operacionEntubacion?i=this.selectionEntubacion:e===this.operacionPerforacion?i=this.selectionPerforacion:e===this.operacionTypePozo?i=this.selectionPozo:e===this.operacionTypeGaleria?i=this.selectionGaleria:e===this.operacionTypeAzudEmbalse&&(i=this.selectionAzudEmbalse),i}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(z.A),t.Y36(C.k),t.Y36(p.sK),t.Y36(S.r),t.Y36(v.F0),t.Y36(_.qu),t.Y36(v.gz),t.Y36(ut.b))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technic-data-perfil"]],inputs:{extraccion:"extraccion",entityName:"entityName",combos:"combos"},outputs:{editBombeoEvent:"editBombeoEvent",newBombeoEvent:"newBombeoEvent",newEntubacionEvent:"newEntubacionEvent",editEntubacionEvent:"editEntubacionEvent",newPerforacionEvent:"newPerforacionEvent",editPerforacionEvent:"editPerforacionEvent"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[4,"ngIf"],[1,"mb-4","mt-4"],["appBold",""],[1,"row"],[1,"container-subtitle"],[1,"col-md-12","mt-2"],[1,"float-end"],["type","button","mat-flat-button","",1,"btn-first",3,"click"],["class","row",4,"ngIf"],[3,"formGroup","ngSubmit"],["pozoForm","ngForm"],[1,"col","col-xl-10"],[1,"row","inputRow"],[1,"col","col-xl-3","labelForm"],[1,"col","col-xl-9"],["appearance","standard",1,"width-100"],["name","idTuberiaPiezometrica","formControlName","idTuberiaPiezometrica",3,"selectionChange"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["name","idContador","formControlName","idContador",3,"selectionChange"],[3,"value"],[1,"col-xl-3","labelForm"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios"],["autosize","cdkTextareaAutosize"],[1,"col","col-md-12"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],[3,"entityName","entityId"],[3,"searchResult","tableColumns","visibleButtons","actionsColumnWidth","showPagination","newEditEvent","newDeleteEvent"],[1,"col"],[1,"container-subtitle","mb-2"],[3,"searchResult","tableColumns","itemName","entityType","newSelectEvent","newValidateVersionEvent","newDeleteVersionEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip"],["galeriaForm","ngForm"],[1,"col-xl-4","labelForm"],[1,"col","col-xl-7"],["matInput","","name","profundidad","type","text","formControlName","profundidad"],[1,"col","col-xl-1"],["matInput","","name","maxDiametro","type","text","formControlName","maxDiametro"],["matInput","","name","minDiametro","type","text","formControlName","minDiametro"],["matInput","","name","longitudTuberia","type","text","formControlName","longitudTuberia"],[1,"col","col-xl-8"],[1,"col","col-xl-4","labelForm"],["name","idInstalacion","formControlName","idInstalacion",3,"selectionChange"],[1,"col-md-12"],["tomaForm","ngForm"],["name","idAzud","formControlName","idAzud",3,"selectionChange"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["name","idEmbal
1se","formControlName","idEmbalse",3,"selectionChange"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",3,"value","matTooltip"],[1,"container-subtitle","mt-4","mb-2","textRedCenter"]],template:function(e,i){if(1&e&&(t.YNc(0,Mi,11,7,"ng-container",0),t.YNc(1,Pi,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.technicalData)("ngIfElse",a)}},directives:[h.O5,A.d,R.M,et.D,J.lW,_t.L,Q.I,_._Y,_.JL,_.sg,P.KE,L.gD,_.JJ,_.u,h.sg,k.ey,B.gM,$.Nt,tt.IC,_.Fj,v.rH,Y.N,P.TO,I.O],pipes:[p.X$],styles:[""]}),n})();function Si(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Ui(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function wi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Li(n,c){if(1&n&&(t.TgZ(0,"mat-option",35),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Ji(n,c){if(1&n&&(t.TgZ(0,"mat-option",35),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Ri(n,c){if(1&n&&(t.TgZ(0,"mat-option",35),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Vi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.validarDesdeHasta")))}function Fi(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToFieldsHistory()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"botones.historico")," "))}function Bi(n,c){1&n&&t._UZ(0,"app-spinner")}let Qi=(()=>{class n{constructor(e,i,a,o,l,s){this.dialogModelService=e,this.router=i,this.fb=a,this.activatedRoute=o,this.translate=l,this.checkGreaterThanService=s,this.goBackEvent=new t.vpe,this.selectedCombosTextValues={litologia:"",edad:"",acuifero:""},this.operacionPerforacion=r.C.operacion.OPERACION_PERFORACION_EXTRACCIONES,this.numberPipe=new h.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.stop$=new x.x,this.operation=r.C.operacionRealizada.ANADIDO}ngOnInit(){var e,i,a;u.c.isUndefined(this.perforacionItem)||(this.operation=r.C.operacionRealizada.MODIFICADO),this.litologiaCombo=null===(e=this.combos)||void 0===e?void 0:e.find(o=>o.listado===r.C.COMBO_LITOLOGIA_DATTEC_EXTRACCION).data,this.edadCombo=null===(i=this.combos)||void 0===i?void 0:i.find(o=>o.listado===r.C.COMBO_EDAD_DATTEC_EXTRACCION).data,this.acuiferoCombo=null===(a=this.combos)||void 0===a?void 0:a.find(o=>o.listado===r.C.COMBO_ACUIFERO_DATTEC_EXTRACCION).data,this.createForm()}createForm(){var e,i,a,o,l,s,m;this.drillingGroup=this.fb.group({desde:this.fb.control({value:this.numberPipe.transform(null===(e=this.perforacionItem)||void 0===e?void 0:e.desde,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),hasta:this.fb.control({value:this.numberPipe.transform(null===(i=this.perforacionItem)||void 0===i?void 0:i.hasta,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),diametro:this.fb.control({value:this.numberPipe.transform(null===(a=this.perforacionItem)||void 0===a?void 0:a.diametro,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),litologia:this.fb.control({value:null===(o=this.perforacionItem)||void 0===o?void 0:o.litologia,disabled:!1}),edad:this.fb.control({value:null===(l=this.perforacionItem)||void 0===l?void 0:l.edad,disabled:!1}),acuifero:this.fb.control({value:null===(s=this.perforacionItem)||void 0===s?void 0:s.acuifero,disabled:!1}),comentarios:this.fb.control({value:null===(m=this.perforacionItem)||void 0===m?void 0:m.comentarios,disabled:!1})},{validators:this.checkGreaterThanService.minMaxValidation("desde","hasta")}),this.initialValues=this.drillingGroup.value,this.elementCheckNameList=["desde","hasta","diametro"]}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}goToFieldsHistory(){this.router.navigate([`../../fieldsHistory/${this.extraccion.id}/${this.operacionPerforacion}`],{relativeTo:this.activatedRoute,state:{item:this.perforacionItem,name:this.extraccion.nombre}})}goBack(){this.goBackEvent.emit(!0)}onSubmit(){if(this.drillingGroup.invalid)return;let e=u.c.compareObjects(this.initialValues,this.drillingGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.extraccion.id}/${this.operacionPerforacion}`],{relativeTo:this.activatedRoute,state:{comparedObject:this.prepareData(e),item:this.perforacionItem,operation:this.operation}}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(o=>o);let a=[];for(const o in e){let l,s=e[o],m=e[o];i.includes(o)?s=this.selectedCombosTextValues[o]:(m&&this.elementCheckNameList.includes(o)&&(m=u.c.c
1onvertFormattedNumber(m.toString())),s=e[o]);let b=!1;l=new j.i(o,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${o}`),m,s,b),a.push(l)}return a}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.r),t.Y36(v.F0),t.Y36(_.qu),t.Y36(v.gz),t.Y36(p.sK),t.Y36(ut.b))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-drilling-edit"]],inputs:{extraccion:"extraccion",perforacionItem:"perforacionItem",combos:"combos"},outputs:{goBackEvent:"goBackEvent"},decls:118,vars:50,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container-subtitle","mt-1"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["drillingForm","ngForm"],[1,"row"],[1,"col","col-xl-9"],[1,"row","inputRow"],[1,"col-xl-4","labelForm"],["appBold",""],[1,"col","col-xl-7"],["appearance","standard",1,"width-100"],["matInput","","name","desde","type","text","formControlName","desde"],[4,"ngIf"],[1,"col","col-xl-1"],["matInput","","name","hasta","type","text","formControlName","hasta"],["matInput","","name","diametro","type","text","formControlName","diametro"],[1,"col","col-xl-4","labelForm"],[1,"col","col-xl-8"],["name","litologia","formControlName","litologia",3,"selectionChange"],[3,"value"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["name","edad","formControlName","edad",3,"selectionChange"],["name","acuifero","formControlName","acuifero",3,"selectionChange"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios"],["autosize","cdkTextareaAutosize"],[1,"col-md-12"],[1,"float-end"],["class","btn-first","type","button","mat-flat-button","",3,"click",4,"ngIf"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],["type","button","mat-flat-button","",1,"btn-second",3,"click"],[1,"fa-regular"],["loading",""],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip"],["type","button","mat-flat-button","",1,"btn-first",3,"click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.ynx(4),t.TgZ(5,"div",2)(6,"h3"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",3)(10,"form",4,5),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"span",10),t._uU(17),t.ALo(18,"translate"),t.qZA()(),t.TgZ(19,"div",11)(20,"mat-form-field",12),t._UZ(21,"input",13),t.YNc(22,Si,3,3,"mat-error",14),t.qZA()(),t.TgZ(23,"div",15),t._uU(24),t.ALo(25,"translate"),t.qZA()()()(),t.TgZ(26,"div",6)(27,"div",7)(28,"div",8)(29,"div",9)(30,"span",10),t._uU(31),t.ALo(32,"translate"),t.qZA()(),t.TgZ(33,"div",11)(34,"mat-form-field",12),t._UZ(35,"input",16),t.YNc(36,Ui,3,3,"mat-error",14),t.qZA()(),t.TgZ(37,"div",15),t._uU(38),t.ALo(39,"translate"),t.qZA()()()(),t.TgZ(40,"div",6)(41,"div",7)(42,"div",8)(43,"div",9)(44,"span",10),t._uU(45),t.ALo(46,"translate"),t.qZA()(),t.TgZ(47,"div",11)(48,"mat-form-field",12),t._UZ(49,"input",17),t.YNc(50,wi,3,3,"mat-error",14),t.qZA()(),t.TgZ(51,"div",15),t._uU(52),t.ALo(53,"translate"),t.qZA()()()(),t.TgZ(54,"div",6)(55,"div",7)(56,"div",8)(57,"div",18)(58,"span",10),t._uU(59),t.ALo(60,"translate"),t.qZA()(),t.TgZ(61,"div",19)(62,"mat-form-field",12)(63,"mat-select",20),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(64,"mat-option",21),t.YNc(65,Li,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(66,"div",6)(67,"div",7)(68,"div",8)(69,"div",18)(70,"span",10),t._uU(71),t.ALo(72,"translate"),t.qZA()(),t.TgZ(73,"div",19)(74,"mat-form-field",12)(75,"mat-select",23),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(76,"mat-option",21),t.YNc(77,Ji,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(78,"div",6)(79,"div",7)(80,"div",8)(81,"div",18)(82,"span",10),t._uU(83),t.ALo(84,"translate"),t.qZA()(),t.TgZ(85,"div",19)(86,"mat-form-field",12)(87,"mat-select",24),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(88,"mat-option",21),t.YNc(89,Ri,2,3,"mat-option",22),t.qZA()()()()()(),t.TgZ(90,"div",6)(91,"div",7)(92,"div",8)(93,"div",9)(94,"span",10),t._uU(95),t.ALo(96,"translate"),t.qZA()(),t.TgZ(97,"div",19)(98,"mat-form-field",12),t._UZ(99,"textarea",25,26),t.qZA()()()()(),t.TgZ(101,"div",6)(102,"div",27),t.YNc(103,Vi,3,3,"mat-error",14),t.qZA()(),t.TgZ(104,"div",6)(105,"div",27)(106,"div",28),t.YNc(107,Fi,3,3,"button",29),t.TgZ(108,"button",30),t._uU(109),t.ALo(110,"translate"),t._UZ(111,"i",31),t.qZA(),t.TgZ(112,"button",32),t.NdJ("click",function(){return i.goBack()}),t._uU(113),t.ALo(114,"translate"),t._UZ(115,"i",33),t.qZA()()()()()(),t.BQk(),t.YNc(116,Bi,1,0,"ng-template",null,34,t.W1O)),2&e){let a,o,l;t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(5),t.Oqu(t.lcZ(8,24,"extractions.fichaTecnica.lblDatosPerforacion")),t.xp6(3),t.Q6J("formGroup",i.drillingGroup),t.xp6(7),t.Oqu(t.lcZ(18,26,"extractions.fichaTecnica.lblDesde")),t.xp6(5),t.Q6J("ngIf",null==(a=i.drillingGroup.get("des
1de"))?null:a.hasError),t.xp6(2),t.hij(" ",t.lcZ(25,28,"unidades.metros")," "),t.xp6(7),t.Oqu(t.lcZ(32,30,"extractions.fichaTecnica.lblHasta")),t.xp6(5),t.Q6J("ngIf",null==(o=i.drillingGroup.get("hasta"))?null:o.hasError),t.xp6(2),t.hij(" ",t.lcZ(39,32,"unidades.metros")," "),t.xp6(7),t.Oqu(t.lcZ(46,34,"extractions.fichaTecnica.lblDiametro")),t.xp6(5),t.Q6J("ngIf",null==(l=i.drillingGroup.get("diametro"))?null:l.hasError),t.xp6(2),t.hij(" ",t.lcZ(53,36,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(60,38,"extractions.fichaTecnica.lblLitologiaPredominante")),t.xp6(6),t.Q6J("ngForOf",i.litologiaCombo),t.xp6(6),t.Oqu(t.lcZ(72,40,"extractions.fichaTecnica.lblEdad")),t.xp6(6),t.Q6J("ngForOf",i.edadCombo),t.xp6(6),t.Oqu(t.lcZ(84,42,"extractions.fichaTecnica.lblAcuifero")),t.xp6(6),t.Q6J("ngForOf",i.acuiferoCombo),t.xp6(6),t.Oqu(t.lcZ(96,44,"extractions.fichaTecnica.lblObservaciones")),t.xp6(8),t.Q6J("ngIf",i.drillingGroup.hasError("minMaxError")),t.xp6(4),t.Q6J("ngIf",i.perforacionItem),t.xp6(2),t.hij("",t.lcZ(110,46,"botones.guardar")," "),t.xp6(4),t.hij("",t.lcZ(114,48,"botones.volver")," ")}},directives:[A.d,_._Y,_.JL,_.sg,R.M,P.KE,$.Nt,_.Fj,_.JJ,_.u,h.O5,P.TO,L.gD,k.ey,h.sg,B.gM,tt.IC,J.lW,I.O],pipes:[p.X$],styles:[""]}),n})();function Yi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function ki(n,c){if(1&n&&(t.TgZ(0,"mat-option",33),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function Gi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"validacionForm.requerido")," "))}function Hi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function $i(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function zi(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToFieldsHistory()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"botones.historico")," "))}function ji(n,c){1&n&&t._UZ(0,"app-spinner")}let Xi=(()=>{class n{constructor(e,i,a,o,l){this.dialogModelService=e,this.router=i,this.fb=a,this.activatedRoute=o,this.translate=l,this.goBackEvent=new t.vpe,this.selectedCombosTextValues={idTipoMotor:""},this.operacionBombeo=r.C.operacion.OPERACION_BOMBEO_EXTRACCIONES,this.numberPipe=new h.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.stop$=new x.x,this.operation=r.C.operacionRealizada.ANADIDO}ngOnInit(){var e;this.createForm(),u.c.isUndefined(this.bombeoItem)||(this.operation=r.C.operacionRealizada.MODIFICADO),this.tipoMotorCombo=null===(e=this.combos)||void 0===e?void 0:e.find(i=>i.listado===r.C.COMBO_MOTOR_DATTEC_EXTRACCION).data}createForm(){var e,i,a,o,l,s;this.pumpGroup=this.fb.group({profundidadAspiracion:this.fb.control({value:this.numberPipe.transform(null===(e=this.bombeoItem)||void 0===e?void 0:e.profundidadAspiracion,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),idTipoMotor:this.fb.control({value:null===(i=this.bombeoItem)||void 0===i?void 0:i.idTipoMotor,disabled:!1},_.kI.required),caudalMaximo:this.fb.control({value:this.numberPipe.transform(null===(a=this.bombeoItem)||void 0===a?void 0:a.caudalMaximo,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),potanciaTotalCV:this.fb.control({value:this.numberPipe.transform(null===(o=this.bombeoItem)||void 0===o?void 0:o.potanciaTotalCV,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),potanciaTotalKW:this.fb.control({value:this.numberPipe.transform(null===(l=this.bombeoItem)||void 0===l?void 0:l.potanciaTotalKW,r.C.numRed),disabled:!0}),potanciaCalculada:this.fb.control({value:this.numberPipe.transform(null===(s=this.bombeoItem)||void 0===s?void 0:s.potanciaCalculada,r.C.numRed),disabled:!0})}),this.initialValues=this.pumpGroup.value,this.elementCheckNameList=["profundidadAspiracion","caudalMaximo","potanciaTotalCV"]}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}goToFieldsHistory(){this.router.navigate([`../../fieldsHistory/${this.extraccion.id}/${this.operacionBombeo}`],{relativeTo:this.activatedRoute,state:{item:this.bombeoItem,name:this.extraccion.nombre}})}goBack(){this.goBackEvent.emit(!0)}onSubmit(){if(this.pumpGroup.invalid)return;let e=u.c.compareObjects(this.initialValues,this.pumpGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.extraccion.id}/${this.operacionBombeo}`],{relativeTo:this.activatedRoute,state:{comparedObject:this.prepareData(e),item:this.bombeoItem,operation:this.operation}}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(o=>o);let a=[];for(const o in e){let l,s=e[o],m=e[o];i.includes(o)?s=this.selectedCombosTextValues[o]:(m&&this.elementCheckNameList.includes(o)&&(m=Number(u.c.convertFormattedNumber(m.toString()))),s=e[o]);let b=!1;u.c.isUndefined(this.bombeoItem)&&(b=this.pumpGroup.controls[o].hasValidator(_.kI.required)),l=new j.i(o,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${o}`),m,s,b),a.push(l)}return a}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.r),t.Y36(v.F0),t.Y36(_.qu),t.Y36(v.gz),t.Y36(p.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-pump-edit"]],inputs:{extraccion:"extraccion",bombeoItem:"bombeoItem",combos:"combos"},outputs:{goBackEvent:"goBackEvent"},decls:107,vars:51,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container-subtitle","mt-1"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["pumpForm","ngForm"],[1,"row"],[1,"col","col-xl-9"],[1,"row","inputRow"],[1,"col-xl-4","labelForm"],["appBold",""],[1,"col","col-xl-7"],["appearance","standard",1,"width-100"],["matInput","","name","profundidadAspiracion","type","text","formControlName","profundidadAspiracion"],[4,"ngIf"],[1,"col","col-xl-1"],[1,"col","col-xl-4","labelForm"],[1,"col","col-xl-8"],["name","idTipoMotor","formControlName","idTipoMotor",3,"selectionChange"],[3,"value"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["matInput","","name","caudalMaximo","type","text","formControlName","caudalMaximo"],["matInput","","name","potanciaTotalCV","type","text","formControlName","potanciaTotalCV"],["matInput","","name","potanciaTotalKW","type","text","formControlName","potanciaTotalKW"],["matInput","","name","potanciaCalculada","type","text","formControlName","potanciaCalculada"],[1,"col-md-12"],[1,"float-end"],["class","btn-first","type","button","mat-flat-button","",3,"click",4,"ngIf"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],["type","button","mat-flat-button","",1,"btn-second",3,"click"],[1,"fa-regular"],["loading",""],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip"],["type","button","mat-flat-button","",1,"btn-first",3,"click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.ynx(4),t.TgZ(5,"div",2)(6,"h3"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",3)(10,"form",4,5),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"span",10),t._uU(17),t.ALo(18,"translate"),t.qZA()(),t.TgZ(19,"div",11)(20,"mat-form-field",12),t._UZ(21,"input",13),t.YNc(22,Yi,3,3,"mat-error",14),t.qZA()(),t.TgZ(23,"div",15),t._uU(24),t.ALo(25,"translate"),t.qZA()()()(),t.TgZ(26,"div",6)(27,"div",7)(28,"div",8)(29,"div",16)(30,"span",10),t._uU(31),t.ALo(32,"translate"),t.qZA()(),t.TgZ(33,"div",17)(34,"mat-form-field",12)(35,"mat-select",18),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(36,"mat-option",19),t.YNc(37,ki,2,3,"mat-option",20),t.qZA(),t.YNc(38,Gi,3,3,"mat-error",14),t.qZA()()()()(),t.TgZ(39,"div",6)(40,"div",7)(41,"div",8)(42,"div",9)(43,"span",10),t._uU(44),t.ALo(45,"translate"),t.qZA()(),t.TgZ(46,"div",11)(47,"mat-form-field",12),t._UZ(48,"input",21),t.YNc(49,Hi,3,3,"mat-error",14),t.qZA()(),t.TgZ(50,"div",15),t._uU(51),t.ALo(52,"translate"),t.qZA()()()(),t.TgZ(53,"div",6)(54,"div",7)(55,"div",8)(56,"div",9)(57,"span",10),t._uU(58),t.ALo(59,"translate"),t.qZA()(),t.TgZ(60,"div",11)(61,"mat-form-field",12),t._UZ(62,"input",22),t.YNc(63,$i,3,3,"mat-error",14),t.qZA()(),t.TgZ(64,"div",15),t._uU(65),t.ALo(66,"translate"),t.qZA()()()(),t.TgZ(67,"div",6)(68,"div",7)(69,"div",8)(70,"div",9)(71,"span",10),t._uU(72),t.ALo(73,"translate"),t.qZA()(),t.TgZ(74,"div",11)(75,"mat-form-field",12),t._UZ(76,"input",23),t.qZA()(),t.TgZ(77,"div",15),t._uU(78),t.ALo(79,"translate"),t.qZA()()()(),t.TgZ(80,"div",6)(81,"div",7)(82,"div",8)(83,"div",9)(84,"span",10),t._uU(85),t.ALo(86,"translate"),t.qZA()(),t.TgZ(87,"div",11)(88,"mat-form-field",12),t._UZ(89,"input",24),t.qZA()(),t.TgZ(90,"div",15),t._uU(91),t.ALo(92,"translate"),t.qZA()()()(),t.TgZ(93,"div",6)(94,"div",25)(95,"div",26),t.YNc(96,zi,3,3,"button",27),t.TgZ(97,"button",28),t._uU(98),t.ALo(99,"translate"),t._UZ(100,"i",29),t.qZA(),t.TgZ(101,"button",30),t.NdJ("click",function(){return i.goBack()}),t._uU(102),t.ALo(103,"translate"),t._UZ(104,"i",31),t.qZA()()()()()(),t.BQk(),t.YNc(105,ji,1,0,"ng-template",null,32,t.W1O)),2&e){let a,o,l,s;t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(5),t.Oqu(t.lcZ(8,23,"extractions.fichaTecnica.lblDatosInstalacionBombeo")),t.xp6(3),t.Q6J("formGroup",i.pumpGroup),t.xp6(7),t.Oqu(t.lcZ(18,25,"extractions.fichaTecnica.lblProfundidadAspiracion")),t.xp6(5),t.Q6J("ngIf",null==(a=i.pumpGroup.get("profundidadAspiracion"))?null:a.hasError),t.xp6(2),t.hij(" ",t.lcZ(25,27,"unidades.metros")," "),t.xp6(7),t.Oqu(t.lcZ(32,29,"extractions.fichaTecnica.lblTipoMotor")),t.xp6(6),t.Q6J("ngForOf",i.tipoMotorCombo),t.xp6(1),t.Q6J("ngIf",null==(o=i.pumpGroup.get("idTipoMotor"))?null:o.hasError("required")),t.xp6(6),t.Oqu(t.lcZ(45,31,"extractions.fichaTecnica.lblCaudalMaximo")),t.xp6(5),t.Q6J("ngIf",null==(l=i.pumpGroup.get("caudalMaximo"))?null:l.hasError),t.xp6(2),t.hij(" ",t.lcZ(52,33,"unidades.lSeg")," "),t.xp6(7),t.Oqu(t.lcZ(59,35,"extractions.fichaTecnica.lblPotenciaTotal")),t.xp6(5),t.Q6J("ngIf",null==(s=i.pumpGroup.get("potanciaTotalCV"))?null:s.hasError),t.xp6(2),t.hij(" ",t.lcZ(66,37,"unidades.cv")," "),t.xp6(7),t.Oqu(t.lcZ(73,39,"extractions.fichaTecnica.lblPotenciaTotal")),t.xp6(6),t.hij(" ",t.lcZ(79,41,"unidades.kw")," "),t.xp6(7),t.Oqu(t.lcZ(86,43,"extractions.fichaTecnica.lblPotenciaCalculada")),t.xp6(6),t.hij(" ",t.lcZ(92,45,"unidades.kw")," "),t.xp6(5),t.Q6J("ngIf",i.bombeoItem),t.xp6(2),t.hij("",t.lcZ(99,47,"botones.guardar")," "),t.xp6(4),t.hij("",t.lcZ(103,49,"botones.volver")," ")}},directives:[A.d,_._Y,_.JL,_.sg,R.M,P.KE,$.Nt,_.Fj,_.JJ,_.u,h.O5,P.TO,L.gD,k.ey,h.sg,B.gM,J.lW,I.O],pipes:[p.X$],styles:[""]}),n})();function Wi(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Ki(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function ta(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function ea(n,c){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function na(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"validacionForm.requerido")," "))}function ia(n,c){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=c.$implicit;t.s9C("matTooltip",e.nombre),t.Q6J("value",e.id),t.xp6(1),t.hij(" ",e.nombre," ")}}function aa(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"validacionForm.requerido")," "))}function oa(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.validarDesdeHasta")))}function ca(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",35),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToFieldsHistory()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"botones.historico")," "))}function ra(n,c){1&n&&t._UZ(0,"app-spinner")}let sa=(()=>{class n{constructor(e,i,a,o,l,s){this.dialogModelService=e,this.router=i,this.fb=a,this.activatedRoute=o,this.translate=l,this.checkGreaterThanService=s,this.goBackEvent=new t.vpe,this.selectedCombosTextValues={idTipo:"",idRelleno:""},this.operacionEntubacion=r.C.operacion.OPERACION_ENTUBACION_EXTRACCIONES,this.numberPipe=new h.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.stop$=new x.x,this.operation=r.C.operacionRealizada.ANADIDO}ngOnInit(){var e,i;this.createForm(),u.c.isUndefined(this.entubacionItem)||(this.operation=r.C.operacionRealizada.MODIFICADO),this.tipoCombo=null===(e=this.combos)||void 0===e?void 0:e.find(a=>a.listado===r.C.COMBO_TIPO_ENTUBACION_DATTEC_EXTRACCION).data,this.rellenoCombo=null===(i=this.combos)||void 0===i?void 0:i.find(a=>a.listado===r.C.COMBO_RELLENO_DATTEC_EXTRACCION).data}createForm(){var e,i,a,o,l,s;this.intubationGroup=this.fb.group({desde:this.fb.control({value:this.numberPipe.transform(null===(e=this.entubacionItem)||void 0===e?void 0:e.desde,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),hasta:this.fb.control({value:this.numberPipe.transform(null===(i=this.entubacionItem)||void 0===i?void 0:i.hasta,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),diametro:this.fb.control({value:this.numberPipe.transform(null===(a=this.entubacionItem)||void 0===a?void 0:a.diametro,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),idTipo:this.fb.control({value:null===(o=this.entubacionItem)||void 0===o?void 0:o.idTipo,disabled:!1},_.kI.required),idRelleno:this.fb.control({value:null===(l=this.entubacionItem)||void 0===l?void 0:l.idRelleno,disabled:!1},_.kI.required),comentarios:this.fb.control({value:null===(s=this.entubacionItem)||void 0===s?void 0:s.comentarios,disabled:!1})},{validators:this.checkGreaterThanService.minMaxValidation("desde","hasta")}),this.initialValues=this.intubationGroup.value,this.elementCheckNameList=["desde","hasta","diametro"]}selectedValue(e){this.selectedCombosTextValues[e.source.ngControl.name]=e.source.triggerValue}goToFieldsHistory(){this.router.navigate([`../../fieldsHistory/${this.extraccion.id}/${this.operacionEntubacion}`],{relativeTo:this.activatedRoute,state:{item:this.entubacionItem,name:this.extraccion.nombre}})}goBack(){this.goBackEvent.emit(!0)}onSubmit(){if(this.intubationGroup.invalid)return;let e=u.c.compareObjects(this.initialValues,this.intubationGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersion/${this.extraccion.id}/${this.operacionEntubacion}`],{relativeTo:this.activatedRoute,state:{comparedObject:this.prepareData(e),item:this.entubacionItem,operation:this.operation}}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}prepareData(e){const i=Object.keys(this.selectedCombosTextValues).map(o=>o);let a=[];for(const o in e){let l,s=e[o],m=e[o];i.includes(o)?s=this.selectedCombosTextValues[o]:(m&&this.elementCheckNameList.includes(o)&&(m=u.c.c
1onvertFormattedNumber(m.toString())),s=e[o]);let b=!1;u.c.isUndefined(this.entubacionItem)&&(b=this.intubationGroup.controls[o].hasValidator(_.kI.required)),l=new j.i(o,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${o}`),m,s,b),a.push(l)}return a}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.r),t.Y36(v.F0),t.Y36(_.qu),t.Y36(v.gz),t.Y36(p.sK),t.Y36(ut.b))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-intubation-edit"]],inputs:{extraccion:"extraccion",entubacionItem:"entubacionItem",combos:"combos"},outputs:{goBackEvent:"goBackEvent"},decls:108,vars:48,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container-subtitle","mt-1"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["intubationForm","ngForm"],[1,"row"],[1,"col","col-xl-9"],[1,"row","inputRow"],[1,"col-xl-4","labelForm"],["appBold",""],[1,"col","col-xl-7"],["appearance","standard",1,"width-100"],["matInput","","name","desde","type","text","formControlName","desde"],[4,"ngIf"],[1,"col","col-xl-1"],["matInput","","name","hasta","type","text","formControlName","hasta"],["matInput","","name","diametro","type","text","formControlName","diametro"],[1,"col","col-xl-4","labelForm"],[1,"col","col-xl-8"],["name","idTipo","formControlName","idTipo",3,"selectionChange"],[3,"value"],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip",4,"ngFor","ngForOf"],["name","idRelleno","formControlName","idRelleno",3,"selectionChange"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","5","name","comentarios","formControlName","comentarios"],["autosize","cdkTextareaAutosize"],[1,"col-md-12"],[1,"float-end"],["class","btn-first","type","button","mat-flat-button","",3,"click",4,"ngIf"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],["type","button","mat-flat-button","",1,"btn-second",3,"click"],[1,"fa-regular"],["loading",""],["matTooltipPosition","after","matTooltipClass","custom-tooltip",3,"value","matTooltip"],["type","button","mat-flat-button","",1,"btn-first",3,"click"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.ynx(4),t.TgZ(5,"div",2)(6,"h3"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"div",3)(10,"form",4,5),t.NdJ("ngSubmit",function(){return i.onSubmit()}),t.TgZ(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9)(16,"span",10),t._uU(17),t.ALo(18,"translate"),t.qZA()(),t.TgZ(19,"div",11)(20,"mat-form-field",12),t._UZ(21,"input",13),t.YNc(22,Wi,3,3,"mat-error",14),t.qZA()(),t.TgZ(23,"div",15),t._uU(24),t.ALo(25,"translate"),t.qZA()()()(),t.TgZ(26,"div",6)(27,"div",7)(28,"div",8)(29,"div",9)(30,"span",10),t._uU(31),t.ALo(32,"translate"),t.qZA()(),t.TgZ(33,"div",11)(34,"mat-form-field",12),t._UZ(35,"input",16),t.YNc(36,Ki,3,3,"mat-error",14),t.qZA()(),t.TgZ(37,"div",15),t._uU(38),t.ALo(39,"translate"),t.qZA()()()(),t.TgZ(40,"div",6)(41,"div",7)(42,"div",8)(43,"div",9)(44,"span",10),t._uU(45),t.ALo(46,"translate"),t.qZA()(),t.TgZ(47,"div",11)(48,"mat-form-field",12),t._UZ(49,"input",17),t.YNc(50,ta,3,3,"mat-error",14),t.qZA()(),t.TgZ(51,"div",15),t._uU(52),t.ALo(53,"translate"),t.qZA()()()(),t.TgZ(54,"div",6)(55,"div",7)(56,"div",8)(57,"div",18)(58,"span",10),t._uU(59),t.ALo(60,"translate"),t.qZA()(),t.TgZ(61,"div",19)(62,"mat-form-field",12)(63,"mat-select",20),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(64,"mat-option",21),t.YNc(65,ea,2,3,"mat-option",22),t.qZA(),t.YNc(66,na,3,3,"mat-error",14),t.qZA()()()()(),t.TgZ(67,"div",6)(68,"div",7)(69,"div",8)(70,"div",18)(71,"span",10),t._uU(72),t.ALo(73,"translate"),t.qZA()(),t.TgZ(74,"div",19)(75,"mat-form-field",12)(76,"mat-select",23),t.NdJ("selectionChange",function(o){return i.selectedValue(o)}),t._UZ(77,"mat-option",21),t.YNc(78,ia,2,3,"mat-option",22),t.qZA(),t.YNc(79,aa,3,3,"mat-error",14),t.qZA()()()()(),t.TgZ(80,"div",6)(81,"div",7)(82,"div",8)(83,"div",9)(84,"span",10),t._uU(85),t.ALo(86,"translate"),t.qZA()(),t.TgZ(87,"div",19)(88,"mat-form-field",12),t._UZ(89,"textarea",24,25),t.qZA()()()()(),t.TgZ(91,"div",6)(92,"div",26),t.YNc(93,oa,3,3,"mat-error",14),t.qZA()(),t.TgZ(94,"div",6)(95,"div",26)(96,"div",27),t.YNc(97,ca,3,3,"button",28),t.TgZ(98,"button",29),t._uU(99),t.ALo(100,"translate"),t._UZ(101,"i",30),t.qZA(),t.TgZ(102,"button",31),t.NdJ("click",function(){return i.goBack()}),t._uU(103),t.ALo(104,"translate"),t._UZ(105,"i",32),t.qZA()()()()()(),t.BQk(),t.YNc(106,ra,1,0,"ng-template",null,33,t.W1O)),2&e){let a,o,l,s,m;t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(5),t.Oqu(t.lcZ(8,24,"extractions.fichaTecnica.lblDatosEntubacion")),t.xp6(3),t.Q6J("formGroup",i.intubationGroup),t.xp6(7),t.Oqu(t.lcZ(18,26,"extractions.fichaTecnica.lblDesde")),t.xp6(5),t.Q6J("ngIf",null==(a=i.intubationGroup.get("des
1de"))?null:a.hasError),t.xp6(2),t.hij(" ",t.lcZ(25,28,"unidades.metros")," "),t.xp6(7),t.Oqu(t.lcZ(32,30,"extractions.fichaTecnica.lblHasta")),t.xp6(5),t.Q6J("ngIf",null==(o=i.intubationGroup.get("hasta"))?null:o.hasError),t.xp6(2),t.hij(" ",t.lcZ(39,32,"unidades.metros")," "),t.xp6(7),t.Oqu(t.lcZ(46,34,"extractions.fichaTecnica.lblDiametro")),t.xp6(5),t.Q6J("ngIf",null==(l=i.intubationGroup.get("diametro"))?null:l.hasError),t.xp6(2),t.hij(" ",t.lcZ(53,36,"unidades.mm")," "),t.xp6(7),t.Oqu(t.lcZ(60,38,"extractions.fichaTecnica.lblTipo")),t.xp6(6),t.Q6J("ngForOf",i.tipoCombo),t.xp6(1),t.Q6J("ngIf",null==(s=i.intubationGroup.get("idTipo"))?null:s.hasError("required")),t.xp6(6),t.Oqu(t.lcZ(73,40,"extractions.fichaTecnica.lblRelleno")),t.xp6(6),t.Q6J("ngForOf",i.rellenoCombo),t.xp6(1),t.Q6J("ngIf",null==(m=i.intubationGroup.get("idRelleno"))?null:m.hasError("required")),t.xp6(6),t.Oqu(t.lcZ(86,42,"extractions.fichaTecnica.lblObservaciones")),t.xp6(8),t.Q6J("ngIf",i.intubationGroup.hasError("minMaxError")),t.xp6(4),t.Q6J("ngIf",i.entubacionItem),t.xp6(2),t.hij("",t.lcZ(100,44,"botones.guardar")," "),t.xp6(4),t.hij("",t.lcZ(104,46,"botones.volver")," ")}},directives:[A.d,_._Y,_.JL,_.sg,R.M,P.KE,$.Nt,_.Fj,_.JJ,_.u,h.O5,P.TO,L.gD,k.ey,h.sg,B.gM,tt.IC,J.lW,I.O],pipes:[p.X$],styles:[""]}),n})();function la(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",11)(1,"div",12)(2,"div",13)(3,"h3",14),t.ALo(4,"translate"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"app-manage-basic-table",15),t.NdJ("newSearchEvent",function(a){return t.CHM(e),t.oxw(2).searchItem(a)}),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(3),t.s9C("matTooltip",t.lcZ(4,6,"extractions.fichaTecnica.tltipUsosExtraccion")),t.xp6(2),t.Oqu(t.lcZ(6,8,"extractions.fichaTecnica.lblUsosExtraccion")),t.xp6(2),t.Q6J("searchResult",e.usos.usos)("tableColumns",e.tableConfigurationUso)("visibleButtons",e.visibleButtons)("actionsColumnWidth",e.actionsColumnWidth)}}function da(n,c){if(1&n&&t._UZ(0,"app-map-icon",16),2&n){const e=t.oxw(2);t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id)}}function pa(n,c){if(1&n&&t._UZ(0,"app-map-icon",16),2&n){const e=t.oxw(2);t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}function ma(n,c){if(1&n&&(t.ynx(0,5),t.YNc(1,la,8,10,"div",6),t.TgZ(2,"div",7)(3,"div",8)(4,"div",9),t.YNc(5,da,1,2,"app-map-icon",10),t.YNc(6,pa,1,2,"app-map-icon",10),t.qZA()()(),t.BQk()),2&n){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.usos.usos&&e.usos.usos.length>0),t.xp6(4),t.Q6J("ngIf",e.isProfile),t.xp6(1),t.Q6J("ngIf",!e.isProfile&&!e.extraccion.concesional)}}function _a(n,c){1&n&&t._UZ(0,"app-spinner")}let ua=(()=>{class n{constructor(e,i,a){this.extractionsService=e,this.translate=i,this.router=a,this.visibleButtons={search:{active:!0},map:{active:!0}},this.actionsColumnWidth=10,this.numberPipe=new h.JJ(this.translate.currentLang),this.tableConfigurationUso=[{columnDef:"acciones",header:"",cell:o=>""},{columnDef:"id",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.id"),cell:o=>`${o.id}`,conditionalStyle:o=>({textGrey:this.getStyleColor(o.situacion)})},{columnDef:"nombre",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.nombre"),cell:o=>`${this.checkNull(o.nombre)}`,conditionalStyle:o=>({textGrey:this.getStyleColor(o.situacion)})},{columnDef:"tipoUso",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.tipoUso"),cell:o=>`${this.checkNull(o.tipoUso)}`,conditionalStyle:o=>({textGrey:this.getStyleColor(o.situacion)})},{columnDef:"situacion",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.situacion"),cell:o=>`${this.checkNull(o.situacion)}`,conditionalStyle:o=>({textGrey:this.getStyleColor(o.situacion)})},{columnDef:"codigoIntegra",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.codigoIntegra"),cell:o=>`${this.checkNull(o.codigoIntegra)}`,conditionalStyle:o=>({textGrey:this.getStyleColor(o.situacion)})},{columnDef:"volumen",header:this.translate.instant("extractions.fichaTecnica.tablaUsos.volumen"),cell:o=>`${this.numberPipe.transform(o.volumen,r.C.numEnt)||""}`,conditionalStyle:o=>({textGrey:o.volumenEstimado||this.getStyleColor(o.situacion)})}]}ngOnInit(){this.extractionsService.getUsos(Number(this.extraccion.id)).subscribe(e=>{u.c.fillUrlMapVisorUsos(e.usos),this.usos=e})}searchItem(e){let i=u.c.getGeneralURL(e.tipoEntidad,e.id.toString());u.c.isDMADueroURL(i)?window.location.href=i:this.router.navigate([`${i}`])}checkNull(e){return null==e&&(e=""),e}getStyleColor(e){return e===r.C.condicionesEstilosUsos.SIN_CONCESION||"Antiguo derecho/Fuera de servicio"===e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(p.sK),t.Y36(v.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-uses"]],inputs:{extraccion:"extraccion",isProfile:"isProfile",entityName:"entityName",entityNameCiudadano:"entityNameCiudadano"},decls:8,vars:3,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container","px-4"],[";","","else","","loading","",4,"ngIf"],["loading",""],[";","","else","","loading",""],["class","row mb-4",4,"ngIf"],[1,"row"],[1,"col-md-12"],[1,"float-end"],[3,"entityName","entityId",4,"ngIf"],[1,"row","mb-4"],[1,"col"],[1,"container-subtitle","mb-2"],["matTooltipPosition","below","matTooltipClass","custom-tooltip",3,"matTooltip"],[3,"searchResult","tableColumns","visibleButtons","actionsColumnWidth","newSearchEvent"],[3,"entityName","entityId"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2),t.YNc(5,ma,7,3,"ng-container",3),t.qZA(),t.YNc(6,_a,1,0,"ng-template",null,4,t.W1O)),2&e&&(t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(3),t.Q6J("ngIf",i.usos))},directives:[A.d,h.O5,B.gM,et.D,Y.N,I.O],pipes:[p.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}.comentarios[_ngcontent-%COMP%]{padding-top:16px!important;padding-bottom:16px!important;height:auto!important}"]}),n})();var fa=d(6627),ga=d(975),ha=d(3746),ba=d(1127);const nt=function(){return["2","4","7"]};function xa(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-basic-table",21),t.NdJ("newSelectEvent",function(a){return t.CHM(e),t.oxw(4).addSelection(a)}),t.qZA()}if(2&n){const e=t.oxw(2).$implicit,i=t.oxw(2);t.Q6J("searchResult",e.relatedElement.elementos)("tableColumns",i.getConfigRelatedElementTable(e.relatedElement.codigoTipo))("profilesCheckTabla",t.DdM(3,nt))}}function va(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-version-control",22),t.NdJ("newDialogEvent",function(a){return t.CHM(e),t.oxw(4).openVersionDialog(a)})("newExistVersionEvent",function(a){t.CHM(e);const o=t.oxw(2).$implicit;return t.oxw(2).onExistVersion(a,o)}),t.qZA()}if(2&n){const e=t.oxw(2).$implicit,i=t.oxw(2);t.Q6J("entityType",i.extractionType)("entityId",i.extraccion.id)("entityName",i.extraccion.nombre)("relElemType",e.typeCode)}}function Ca(n,c){if(1&n&&(t.TgZ(0,"div",16)(1,"div",17)(2,"h3",18),t._uU(3),t.qZA(),t.YNc(4,xa,1,4,"app-basic-table",19),t.qZA(),t.YNc(5,va,1,4,"app-version-control",20),t.qZA()),2&n){const e=t.oxw().$implicit;t.oxw();const i=t.MAs(8);t.xp6(3),t.Oqu(e.typeName),t.xp6(1),t.Q6J("ngIf",e.relatedElement)("ngIfElse",i),t.xp6(1),t.Q6J("appHasrole",t.DdM(4,nt))}}function Ta(n,c){if(1&n&&(t.ynx(0),t.YNc(1,Ca,6,5,"div",15),t.BQk()),2&n){const e=c.$implicit;t.xp6(1),t.Q6J("ngIf",null!=e.relatedElement||!1!==e.hasVersions)}}function Za(n,c){1&n&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"elementosRelacionados.noRelacionados")))}const Aa=function(n,c,e){return["../../fieldsHistory",n,c,e]};function Ea(n,c){if(1&n&&(t.TgZ(0,"button",23),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n){const e=t.oxw(2);t.Q6J("routerLink",t.kEZ(4,Aa,e.extraccion.id,e.operacionRelElem,e.extraccion.nombre)),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.historico"))}}function Oa(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).deleteRelated()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("disabled",e.disableDeleteBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.desvincularElemento"))}}function Da(n,c){1&n&&(t.ynx(0),t.YNc(1,Oa,3,4,"button",24),t.BQk()),2&n&&(t.xp6(1),t.Q6J("appHasrole",t.DdM(1,nt)))}function Na(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).showNewElementForm(
1)}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"botones.vincularElemento")))}function Ia(n,c){if(1&n&&t._UZ(0,"app-map-icon",27),2&n){const e=t.oxw(2);t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id)}}function ya(n,c){if(1&n&&t._UZ(0,"app-map-icon",27),2&n){const e=t.oxw(2);t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}function Ma(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"app-related-element-form",28),t.NdJ("newTypeEvent",function(a){return t.CHM(e),t.oxw(2).getRelatableElements(a)})("newRelationDataEvent",function(a){return t.CHM(e),t.oxw(2).saveRelation(a)}),t.qZA()()}if(2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("elemName",e.extraccion.nombre)("entityTypes",e.relatedElementsTypesFiltered)("relatableElements",e.relatableElements)("distanceCombo",e.distanceCombo)}}function Pa(n,c){if(1&n&&(t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4),t.YNc(6,Ta,2,1,"ng-container",5),t.YNc(7,Za,3,3,"ng-template",null,6,t.W1O),t.TgZ(9,"div",7)(10,"div",8)(11,"div",9),t.YNc(12,Ea,3,8,"button",10),t.YNc(13,Da,2,2,"ng-container",11),t.YNc(14,Na,3,3,"button",12),t.YNc(15,Ia,1,2,"app-map-icon",13),t.YNc(16,ya,1,2,"app-map-icon",13),t.qZA()()(),t.YNc(17,Ma,2,4,"div",14),t.qZA(),t.BQk()),2&n){const e=t.oxw();
1t.xp6(3),t.AsE("",e.extraccion.id," - ",e.extraccion.nombre,""),t.xp6(3),t.Q6J("ngForOf",e.relatedElementsAll),t.xp6(6),t.Q6J("appHasrole",t.DdM(9,nt)),t.xp6(1),t.Q6J("ngIf",e.relatedElements.length>0),t.xp6(1),t.Q6J("appHasrole",t.DdM(10,nt)),t.xp6(1),t.Q6J("ngIf",e.isProfile),t.xp6(1),t.Q6J("ngIf",!e.isProfile&&!e.extraccion.concesional),t.xp6(1),t.Q6J("ngIf",e.showAddNewElement)}}function qa(n,c){1&n&&t._UZ(0,"app-spinner")}let Sa=(()=>{class n{constructor(e,i,a,o,l,s,m){this.extractionsService=e,this.translate=i,this.dialogModelService=a,this.router=o,this.tableConfigurationService=l,this.globalService=s,this.activatedRoute=m,this.newDialogEvent=new t.vpe,this.extractionType=r.C.tipoEntidad.extraccionAguas,this.relatableElements=[],this.showAddNewElement=!1,this.disableDeleteBtn=!0,this.selection=[],this.operacionRelElem=r.C.operacion.ELEMENTOS_RELACIONADOS,this.loaded=!1}ngOnInit(){this.globalService.getComboDistanciaElemRelaPorTipoEntidad(r.C.tipoEntidad.extraccionAguas).subscribe(e=>{this.distanceCombo=e}),this.extractionsService.getElementosRelacionados(Number(this.extraccion.id)).subscribe(e=>{this.loaded=!0,this.relatedElements=e.elementosRelacionados,this.relatedElements=u.c.setViewerUrlToRelatedElements(this.relatedElements),this.relatedElementsAll=(0,fa.v)(e.tiposEntidadesRelacionadas,this.relatedElements),this.filterRiverRelatableElementsTypes(e.tiposEntidadesRelacionadas)})}filterRiverRelatableElementsTypes(e){this.relatedElementsTypesFiltered=e,this.relatedElementsAll.find(i=>i.typeCode===r.C.relatedElements.RIO&&null!=i.relatedElement)&&(this.relatedElementsTypesFiltered=e.filter(i=>i.id!=r.C.relatedElements.RIO))}getConfigRelatedElementTable(e){return this.tableConfigurationService.getRelatedElementTableConfiguration(e)}showNewElementForm(){this.showAddNewElement=!0}addSelection(e){for(const i of e.selected)this.selection.includes(i)||this.selection.push(i);for(const i of e.deselected)if(this.selection.includes(i)){const a=this.selection.indexOf(i);this.selection.splice(a,1)}this.disableDeleteBtn=0===this.selection.length}deleteRelated(){this.dialogModelService.openConfirmDialog(this.translate.instant("dialogos.descartarRelacion.titulo"),this.translate.instant("dialogos.descartarRelacion.msgConfirmacion")).subscribe(e=>{if(e){let i=this.selection.map(a=>a);this.router.navigate([`../../fieldsVersionRelation/${this.extraccion.id}`],{relativeTo:this.activatedRoute,state:{operation:r.C.operacionRealizada.ELIMINADO,relatedElements:i,entityData:{id:this.extraccion.id,name:this.extraccion.nombre,entityType:this.extractionType}}})}})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}getRelatableElements(e){this.extractionsService.getElementosRelacionablesPorIdYTipo(this.extraccion.id,e.codTipo,e.codDistancia).subscribe(i=>{this.relatableElements=i})}saveRelation(e){this.router.navigate([`../../fieldsVersionRelation/${this.extraccion.id}`],{relativeTo:this.activatedRoute,state:{operation:r.C.operacionRealizada.ANADIDO,relationData:e,entityData:{id:this.extraccion.id,name:this.extraccion.nombre,entityType:this.extractionType}}})}openVersionDialog(e){this.dialogModelService.openRelatedElementDialog({gid:this.extraccion.id,gidVersion:e.version,operation:e.operacionEntidad,itemName:this.extraccion.nombre,entityType:this.extractionType,relElemType:e.id})}onExistVersion(e,i){i.hasVersions=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(p.sK),t.Y36(S.r),t.Y36(v.F0),t.Y36(z.A),t.Y36(W.U),t.Y36(v.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-related-elements"]],inputs:{extraccion:"extraccion",entityName:"entityName",entityNameCiudadano:"entityNameCiudadano",isProfile:"isProfile"},outputs:{newDialogEvent:"newDialogEvent"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[4,"ngFor","ngForOf"],["noRelatedElements",""],[1,"row"],[1,"col-md-12"],[1,"float-end"],["class","btn-first","type","button","mat-flat-button","",3,"routerLink",4,"appHasrole"],[4,"ngIf"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"appHasrole"],[3,"entityName","entityId",4,"ngIf"],["class","row",4,"ngIf"],["class","row mb-4",4,"ngIf"],[1,"row","mb-4"],[1,"col"],["appBold",""],[3,"searchResult","tableColumns","profilesCheckTabla","newSelectEvent",4,"ngIf","ngIfElse"],[3,"entityType","entityId","entityName","relElemType","newDialogEvent","newExistVersionEvent",4,"appHasrole"],[3,"searchResult","tableColumns","profilesCheckTabla","newSelectEvent"],[3,"entityType","entityId","entityName","relElemType","newDialogEvent","newExistVersionEvent"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"],["type","button","mat-flat-button","",1,"btn-first",3,"click"],[3,"entityName","entityId"],[3,"elemName","entityTypes","relatableElements","distanceCombo","
1newTypeEvent","newRelationDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,Pa,18,11,"ng-container",0),t.YNc(1,qa,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.loaded)("ngIfElse",a)}},directives:[h.O5,A.d,h.sg,R.M,ga.N,Q.I,ha.s,J.lW,v.rH,Y.N,ba.y,I.O],pipes:[p.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();function Ua(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function wa(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function La(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Ja(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Ra(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Va(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Fa(n,c){1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"validacionForm.numero")))}function Ba(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",34)(2,"h3"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",7)(6,"div",35)(7,"app-manage-basic-table",36),t.NdJ("newSearchEvent",function(a){return t.CHM(e),t.oxw(2).viewReport(a)}),t.qZA()()(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,4,"extractions.fichaTecnica.lblInformesAsociados")),t.xp6(4),t.Q6J("searchResult",e.infoConcesional.listaInformesAsocidos)("tableColumns",e.tableConfigurationinformes)("visibleButtons",e.visibleButtonsGeneral)}}function Qa(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",40),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).validateVersions()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("disabled",e.disableValidateBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"botones.valSeleccion"))}}const Ya=function(){return["2","7"]};function ka(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",35)(2,"div",37)(3,"h2"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",7)(7,"app-version-table",38),t.NdJ("newSelectEvent",function(a){return t.CHM(e),t.oxw(2).addSelection(a)})("newValidateVersionEvent",function(a){return t.CHM(e),t.oxw(2).validateVersions(a)})("newDeleteVersionEvent",function(a){return t.CHM(e),t.oxw(2).deleteVersion(a)}),t.qZA()(),t.TgZ(8,"div",7)(9,"div",27)(10,"div",28),t.YNc(11,Qa,3,4,"button",39),t.qZA()()()()()}if(2&n){const e=t.oxw(2);t.xp6(4),t.Oqu(t.lcZ(5,6,"versionado.controlVersiones")),t.xp6(3),t.Q6J("searchResult",e.extractionsControlVersiones)("tableColumns",e.tableConfiguration)("itemName",e.extraccion.nombre)("entityType",e.extractionsType),t.xp6(4),t.Q6J("appHasrole",t.DdM(8,Ya))}}const Ga=function(n,c,e){return["../../fieldsHistory",n,c,e]};function Ha(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4)(6,"form",5,6),t.NdJ("ngSubmit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10)(12,"span",11),t._uU(13),t.ALo(14,"translate"),t.qZA()(),t.TgZ(15,"div",12)(16,"mat-form-field",13),t._UZ(17,"input",14),t.qZA(),t.YNc(18,Ua,3,3,"mat-error",15),t.qZA(),t.TgZ(19,"div",16),t._uU(20),t.ALo(21,"translate"),t.qZA()(),t.TgZ(22,"div",9)(23,"div",10)(24,"span",11),t._uU(25),t.ALo(26,"translate"),t.qZA()(),t.TgZ(27,"div",12)(28,"mat-form-field",13),t._UZ(29,"input",17),t.qZA(),t.YNc(30,wa,3,3,"mat-error",15),t.qZA(),t.TgZ(31,"div",16),t._uU(32),t.ALo(33,"translate"),t.qZA()(),t.TgZ(34,"div",9)(35,"div",10)(36,"span",11),t._uU(37),t.ALo(38,"translate"),t.qZA()(),t.TgZ(39,"div",12)(40,"mat-form-field",13),t._UZ(41,"input",18),t.qZA(),t.YNc(42,La,3,3,"mat-error",15),t.qZA(),t.TgZ(43,"div",16),t._uU(44),t.ALo(45,"translate"),t.qZA()(),t.TgZ(46,"div",9)(47,"div",10)(48,"span",11),t._uU(49),t.ALo(50,"translate"),t.qZA()(),t.TgZ(51,"div",12)(52,"mat-form-field",13),t._UZ(53,"input",19),t.qZA(),t.YNc(54,Ja,3,3,"mat-error",15),t.qZA(),t.TgZ(55,"div",16),t._uU(56),t.ALo(57,"translate"),t.qZA()(),t.TgZ(58,"div",9)(59,"div",10)(60,"span",11),t._uU(61),t.ALo(62,"translate"),t.qZA()(),t.TgZ(63,"div",12)(64,"mat-form-field",13),t._UZ(65,"input",20),t.qZA(),t.YNc(66,Ra,3,3,"mat-error",15),t.qZA(),t.TgZ(67,"div",16),t._uU(68),t.ALo(69,"translate"),t.qZA()(),t.TgZ(70,"div",9)(71,"div",10)(72,"span",11),t._uU(73),t.ALo(74,"translate"),t.qZA()(),t.TgZ(75,"div",12)(76,"mat-form-field",13),t._UZ(77,"input",21),t.qZA(),t.YNc(78,Va,3,3,"mat-error",15),t.qZA(),t.TgZ(79,"div",16),t._uU(80),t.ALo(81,"translate"),t.qZA()(),t.TgZ(82,"div",9)(83,"div",10)(84,"span",11),t._uU(85),t.ALo(86,"translate"),t.qZA()(),t.TgZ(87,"div",12)(88,"mat-form-field",13),t._UZ(89,"input",22),t.qZA(),t.YNc(90,Fa,3,3,"mat-error",15),t.qZA(),t.TgZ(91,"div",16),t._uU(92),t.ALo(93,"translate"),t.qZA()()(),t.TgZ(94,"div",8)(95,"div",23)(96,"span",11),t._uU(97),t.ALo(98,"translate"),t.qZA()(),t.TgZ(99,"div",24)(100,"mat-form-field",13),t._UZ(101,"textarea",25,26),t.qZA()()()(),t.TgZ(103,"div",7)(104,"div",27)(105,"div",28)(106,"button",29),t._uU(107),t.ALo(108,"translate"),t.qZA(),t.TgZ(109,"button",30),t._uU(110),t.ALo(111,"translate"),t._UZ(112,"i",31),t.qZA(),t._UZ(113,"app-map-icon",32),t.qZA()()(),t.YNc(114,Ba,8,6,"ng-container",15),t.YNc(115,ka,12,9,"div",33),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw();let i,a,o,l,s,m,b;t.xp6(3),t.AsE("",e.extraccion.id," - ",e.extraccion.nombre,""),t.xp6(3),t.Q6J("formGroup",e.technicalGroup),t.xp6(7),t.Oqu(t.lcZ(14,32,"extractions.fichaTecnica.lblCaudalMedioEquivalente")),t.xp6(5),t.Q6J("ngIf",null==(i=e.technicalGroup.get("caudalMedioSolicitado"))?null:i.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(21,34,"unidades.lSeg")," "),t.xp6(5),t.Oqu(t.lcZ(26,36,"extractions.fichaTecnica.lblVolMaximoAnualSolicitado")),t.xp6(5),t.Q6J("ngIf",null==(a=e.technicalGroup.get("volumenMaxSolicitado"))?null:a.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(33,38,"unidades.m3")," "),t.xp6(5),t.Oqu(t.lcZ(38,40,"extractions.fichaTecnica.lblVolumenMaxAnualInformado")),t.xp6(5),t.Q6J("ngIf",null==(o=e.technicalGroup.get("volumenMaxAnualInformado"))?null:o.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(45,42,"unidades.m3")," "),t.xp6(5),t.Oqu(t.lcZ(50,44,"extractions.fichaTecnica.lblVolumenMaxAnualEstimado")),t.xp6(5),t.Q6J("ngIf",null==(l=e.technicalGroup.get("volumenMaxAnualEstimadoCaptacion"))?null:l.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(57,46,"unidades.m3")," "),t.xp6(5),t.Oqu(t.lcZ(62,48,"extractions.fichaTecnica.lblVolumenMaxCaptacion")),t.xp6(5),t.Q6J("ngIf",null==(s=e.technicalGroup.get("volMaximoAnualCaptacion"))?null:s.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(69,50,"unidades.m3")," "),t.xp6(5),t.Oqu(t.lcZ(74,52,"extractions.fichaTecnica.lblCaudalMaxInstantaneo")),t.xp6(5),t.Q6J("ngIf",null==(m
1=e.technicalGroup.get("caudalMaxInstantaneoCaptacion"))?null:m.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(81,54,"unidades.lSeg")," "),t.xp6(5),t.Oqu(t.lcZ(86,56,"extractions.fichaTecnica.lblCaudalMaxEquivalente")),t.xp6(5),t.Q6J("ngIf",null==(b=e.technicalGroup.get("caudalMedioEquivalenteCaptacion"))?null:b.hasError("pattern")),t.xp6(2),t.hij(" ",t.lcZ(93,58,"unidades.lSeg")," "),t.xp6(5),t.Oqu(t.lcZ(98,60,"extractions.fichaTecnica.lblComentarios")),t.xp6(9),t.Q6J("routerLink",t.kEZ(66,Ga,e.infoConcesional.id,e.tabGeneralData,e.infoConcesional.nombre)),t.xp6(1),t.Oqu(t.lcZ(108,62,"botones.historico")),t.xp6(3),t.hij("",t.lcZ(111,64,"botones.guardar")," "),t.xp6(3),t.Q6J("entityName",e.entityName)("entityId",e.infoConcesional.id),t.xp6(1),t.Q6J("ngIf",e.infoConcesional&&e.infoConcesional.listaInformesAsocidos&&e.infoConcesional.listaInformesAsocidos.length>0),t.xp6(1),t.Q6J("ngIf",e.existVersions)}}function $a(n,c){1&n&&t._UZ(0,"app-spinner")}let za=(()=>{class n{constructor(e,i,a,o,l,s,m){this.extractionsService=e,this.translate=i,this.dialogModelService=a,this.router=o,this.tableConfigurationService=l,this.activatedRoute=s,this.fb=m,this.existVersions=!1,this.selection=[],this.perfilUsuario="",this.stop$=new x.x,this.disableValidateBtn=!0,this.tabGeneralData=r.C.operacion.OPERACION_INFO_CONCESIONAL,this.extractionsType=r.C.tipoEntidad.extraccionAguas,this.numberPipe=new h.JJ(this.translate.currentLang),this.elementCheckNameList=[],this.tableConfiguration=this.tableConfigurationService.getVersionTableConfiguration(),this.tableConfigurationinformes=[{columnDef:"acciones",header:"",cell:b=>""},{columnDef:"idReport",header:this.translate.instant("extractions.fichaTecnica.tablaInformes.informe"),cell:b=>`${b.idReport}`},{columnDef:"idDossier",header:this.translate.instant("extractions.fichaTecnica.tablaInformes.expedienteIntegra"),cell:b=>`${b.idDossier||""}`},{columnDef:"idDossierAlternative",header:this.translate.instant("extractions.fichaTecnica.tablaInformes.expedienteAlberca"),cell:b=>`${b.idDossierAlternative||""}`},{columnDef:"name",header:this.translate.instant("extractions.fichaTecnica.tablaInformes.nombre"),cell:b=>`${b.name}`},{columnDef:"resultado",header:this.translate.instant("extractions.fichaTecnica.tablaInformes.resultado"),cell:b=>`${b.resultado||""}`}]}ngOnInit(){this.extractionsService.getInformacionConcesional(Number(this.extraccion.id)).subscribe(e=>{this.infoConcesional=e,this.createForm()}),this.extractionsService.getControlDeVersiones(Number(this.extraccion.id),this.tabGeneralData).subscribe(e=>{e.length>0&&(this.existVersions=!0),this.extractionsControlVersiones=e}),this.visibleButtonsGeneral={search:{active:!0}}}createForm(){var e,i,a,o,l,s,m;this.technicalGroup=this.fb.group({caudalMedioSolicitado:this.fb.control({value:this.numberPipe.transform(null===(e=this.infoConcesional)||void 0===e?void 0:e.caudalMedioSolicitado,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),volumenMaxSolicitado:this.fb.control({value:this.numberPipe.transform(null===(i=this.infoConcesional)||void 0===i?void 0:i.volumenMaxSolicitado,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),volumenMaxAnualInformado:this.fb.control({value:this.numberPipe.transform(null===(a=this.infoConcesional)||void 0===a?void 0:a.volumenMaxAnualInformado,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),volumenMaxAnualEstimadoCaptacion:this.fb.control({value:this.numberPipe.transform(null===(o=this.infoConcesional)||void 0===o?void 0:o.volumenMaxAnualEstimadoCaptacion,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),volMaximoAnualCaptacion:this.fb.control({value:this.numberPipe.transform(null===(l=this.infoConcesional)||void 0===l?void 0:l.volMaximoAnualCaptacion,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),caudalMaxInstantaneoCaptacion:this.fb.control({value:this.numberPipe.transform(null===(s=this.infoConcesional)||void 0===s?void 0:s.caudalMaxInstantaneoCaptacion,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),caudalMedioEquivalenteCaptacion:this.fb.control({value:this.numberPipe.transform(null===(m=this.infoConcesional)||void 0===m?void 0:m.caudalMedioEquivalenteCaptacion,r.C.numRed),disabled:!1},_.kI.pattern(r.C.regExpNumFormatted)),comentariosInfoConcesion:this.fb.control({value:this.infoConcesional.comentariosInfoConcesion,disabled:!1})}),this.initialValues=this.technicalGroup.value,this.elementCheckNameList=["caudalMaxInstantaneoCaptacion","caudalMedioSolicitado","caudalMedioEquivalenteCaptacion","volumenMaxSolicitado","volumenMaxAnualInformado","volumenMaxAnualEstimadoCaptacion","volMaximoAnualCaptacion"]}onSubmit(){if(this.technicalGroup.invalid)return;let e=u.c.compareObjects(this.initialValues,this.technicalGroup.value);Object.keys(e).length>0?this.router.navigate([`../../fieldsVersionUses/${this.infoConcesional.id}/${this.tabGeneralData}`],{relativeTo:this.activatedRoute,state:this.prepareData(e)}):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.sinCambios"))}validateVersions(e){let i=[];e?i.push(e):i=this.selection.map(a=>a),this.extractionsService.validarBloque(i).subscribe(a=>{200===a.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),`${this.translate.instant("dialogos.validarVersion.validacionCorrecta")} ${a.body}
1 ${this.translate.instant(a.body>1?"dialogos.validarVersion.variosElementos":"dialogos.validarVersion.1elemento")}`),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.validarVersion.tituloVersion"),this.translate.instant("dialogos.validarVersion.validacionError"))})}deleteVersion(e){this.extractionsService.descartarOperacion(e.version,e.operacionEntidad).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarCorrecta")),this.reloadComponent()):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.descartarVersion.titulo"),this.translate.instant("dialogos.descartarVersion.descartarError"))})}addSelection(e){this.disableValidateBtn=0===e.length,this.selection=e}ngOnDestroy(){this.stop$.next(!0)}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}prepareData(e){let i=[];for(const a in e){let o,l,s=e[a];l=e[a],s&&this.elementCheckNameList.includes(a)&&(s=u.c.convertFormattedNumber(s.toString())),o=new j.i(a,this.translate.instant(`extractions.fichaTecnica.lblsGuardarCambios.${a}`),s,l),i.push(o)}return i}viewReport(e){let i=u.c.getGeneralURL(r.C.tipoEntidad.informesCompatibilidad,e.idReport.toString());u.c.isDMADueroURL(i)?window.location.href=i:this.router.navigate([`${i}`])}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(C.k),t.Y36(p.sK),t.Y36(S.r),t.Y36(v.F0),t.Y36(z.A),t.Y36(v.gz),t.Y36(_.qu))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-concesional-info-perfil"]],inputs:{extraccion:"extraccion",entityName:"entityName"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title","mt-1"],[1,"mb-2"],[1,"container","px-4"],[3,"formGroup","ngSubmit"],["technicalForm","ngForm"],[1,"row"],[1,"col","col-xl-6"],[1,"row","inputRow"],[1,"col","col-xl-8","labelForm"],["appBold",""],[1,"col","col-xl-3"],["appearance","standard",1,"width-100"],["matInput","","name","caudalMedioSolicitado","type","text","formControlName","caudalMedioSolicitado"],[4,"ngIf"],[1,"col","col-xl-1"],["matInput","","name","volumenMaxSolicitado","type","text","formControlName","volumenMaxSolicitado"],["matInput","","name","volumenMaxAnualInformado","type","text","formControlName","volumenMaxAnualInformado"],["matInput","","name","volumenMaxAnualEstimadoCaptacion","type","text","formControlName","volumenMaxAnualEstimadoCaptacion"],["matInput","","name","volMaximoAnualCaptacion","type","text","formControlName","volMaximoAnualCaptacion"],["matInput","","name","caudalMaxInstantaneoCaptacion","type","text","formControlName","caudalMaxInstantaneoCaptacion"],["matInput","","name","caudalMedioEquivalenteCaptacion","type","text","formControlName","caudalMedioEquivalenteCaptacion"],[1,"col","col-xl-2","labelForm"],[1,"col","col-xl-10"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","15","cdkAutosizeMaxRows","15","name","comentariosInfoConcesion","formControlName","comentariosInfoConcesion"],["autosize","cdkTextareaAutosize"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","",1,"btn-first",3,"routerLink"],["type","submit","mat-flat-button","",1,"btn-second"],[1,"fa-regular","fa-floppy-disk"],[3,"entityName","entityId"],["class","row",4,"ngIf"],[1,"container-subtitle","mt-4"],[1,"col"],[3,"searchResult","tableColumns","visibleButtons","newSearchEvent"],[1,"container-subtitle","mb-2"],[3,"searchResult","tableColumns","itemName","entityType","newSelectEvent","newValidateVersionEvent","newDeleteVersionEvent"],["class","btn-first","type","button","mat-flat-button","",3,"disabled","click",4,"appHasrole"],["type","button","mat-flat-button","",1,"btn-first",3,"disabled","click"]],template:function(e,i){if(1&e&&(t.YNc(0,Ha,116,70,"ng-container",0),t.YNc(1,$a,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.infoConcesional)("ngIfElse",a)}},directives:[h.O5,A.d,_._Y,_.JL,_.sg,R.M,P.KE,$.Nt,_.Fj,_.JJ,_.u,P.TO,tt.IC,J.lW,v.rH,Y.N,et.D,_t.L,Q.I,I.O],pipes:[p.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();var ja=d(9646),Xa=d(4128),Wa=d(2215),Ka=d(4821),to=d(8966),eo=d(4752),no=d(42);function io(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",15)(2,"div",16)(3,"app-photo-metadata",17),t.NdJ("newMetadataEditEvent",function(a){return t.CHM(e),t.oxw(3).setPhotoMetadata(a)}),t.qZA()(),t.TgZ(4,"div",18)(5,"h3",19),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"app-manage-basic-table",20),t.NdJ("newSelectEvent",function(a){return t.CHM(e),t.oxw(3).addSelection(a)}),t.qZA(),t.TgZ(9,"div",7)(10,"button",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw(3);return a.validatePhoto(a.imageDetailId)}),t._uU(11),t.ALo(12,"translate"),t.qZA()()()(),t.BQk()}if(2&n){const e=t.oxw().ngIf,i=t.oxw(2);t.xp6(3),t.Q6J("dataId",i.imageDetailId)("showForm",!0),t.xp6(3),t.Oqu(t.lcZ(7,6,"validacionFotos.elemCercanos.titulo")),t.xp6(2),t.Q6J("searchResult",e)("tableColumns",i.tableRelatedElemConfiguration),t.xp6(3),t.Oqu(t.lcZ(12,8,"botones.validarFoto"))}}function ao(n,c){if(1&n&&(t.ynx(0),t.YNc(1,io,13,10,"ng-container",14),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showEdit)}}function oo(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",11)(2,"div",12)(3,"app-carousel",13),t.NdJ("sendItemIdEvent",function(a){return t.CHM(e),t.oxw().seeDetail(a)})("favoriteEvent",function(a){return t.CHM(e),t.oxw().setFavorite(a)})("newDeleteEvent",function(a){return t.CHM(e),t.oxw().reloadPhotos(a)})("newEditEvent",function(a){return t.CHM(e),t.oxw().getRelatedElements(a)}),t.qZA()()(),t.YNc(4,ao,2,1,"ng-container",14),t.ALo(5,"async"),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(3),t.Q6J("images",e.photos)("config",e.carouselConfiguration)("entityId",e.extraccion.id)("entityType",e.entityType),t.xp6(1),t.Q6J("ngIf",t.lcZ(5,5,e.relatedElements$))}}function co(n,c){1&n&&(t.TgZ(0,"div",22)(1,"p"),t._uU(2),t.ALo(3,"translate"),t.qZA()()),2&n&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"fotosRelacionadas.sinFotos")))}function ro(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){return t.CHM(e),t.oxw().addPhoto()}),t._uU(1),t.ALo(2,"translate"),t._UZ(3,"i",23),t.qZA()}2&n&&(t.xp6(1),t.hij("",t.lcZ(2,1,"botones.nuevaFoto")," "))}function so(n,c){if(1&n&&(t.ynx(0),t._UZ(1,"app-map-icon",24),t.BQk()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("entityName",e.entityName)("entityId",e.extraccion.id)}}function lo(n,c){if(1&n&&t._UZ(0,"app-map-icon",24),2&n){const e=t.oxw(2);t.Q6J("entityName",e.entityNameCiudadano)("entityId",e.extraccion.id)}}function po(n,c){if(1&n&&(t.ynx(0),t.YNc(1,lo,1,2,"app-map-icon",25),t.BQk()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.extraccion.concesional)}}const gt=function(){return["4","2"]};let mo=(()=>{class n{constructor(e,i,a,o,l,s,m,b,O){this.dialog=e,this.extractionsService=i,this.dialogModelService=a,this.translate=o,this.globalService=l,this.tableConfigurationService=s,this.router=m,this.activatedRoute=b,this.configService=O,this.photos=[],this.imagesMetadata=[],this.coordinates=[],this.coordinatesEvent=new t.vpe,this.entityType=r.C.tipoEntidad.extraccionAguas,this.selectionCloseElements=[],this.showEdit=!1,this.carouselConfiguration={numVisible:1,numScroll:1,circular:!0,orientation:"horizontal",autoplayInterval:null},this.tableRelatedElemConfiguration=this.tableConfigurationService.getRelatedElemTableConfiguration()}ngOnInit(){this.getRelatedPhotos(!0)}getRelatedPhotos(e){this.extractionsService.getfotosExtraccion(Number(this.extraccion.id)).subscribe(i=>{this.imagesMetadata=i,this.setRelatedPhotos(),this.photos.length>0&&(this.imageDetailId=e?this.photos[0].id:this.currentId)})}getRelatedElements(e){this.relatedElements$=this.globalService.getElementosCercanos(e),this.showEdit=!0}setRelatedPhotos(){this.photos=[];for(let e of this.imagesMetadata)this.photos.push(u.c.createNewPhoto(e))}seeDetail(e){this.currentId=e,this.imageDetailId=this.currentId,this.showEdit=!1}addPhoto(){this.extractionsService.getExtensionFeature(this.extraccion.id).subscribe(e=>{if(200===e.status){let i=new pt.lC([this.extraccion.id],e.body),a="";a=this.extraccion.idTipo===r.C.TipoExtraccion.SUBTERRANEA?this.configService.getLayerConfiguration(r.C.olMap.layerExtraccionesSubterraneas).layerName:this.configService.getLayerConfiguration(r.C.olMap.layerExtraccionesSuperficiales).layerName,this.dialog.open(Ka.k,{width:"800px",data:{photoMap:i,layerName:a}}).afterClosed().subscribe(l=>{l&&!1!==l&&l.length>0&&(this.coordinates=l,this.coordinatesEvent.emit(l))})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.titulo"),this.translate.instant("dialogos.fotos.anadirFotoError"))})}reloadPhotos(e){this.getRelatedPhotos(!0)}setFavorite(e){this.extractionsService.setFotoFavorita(Number(this.extraccion.id),e).subscribe(i=>{i?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.establecerFotoFavorita.titulo"),this.translate.instant("dialogos.establecerFotoFavorita.favoritaCorrecto")),this.getRelatedPhotos(!1)):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.establecerFotoFavorita.titulo"),this.translate.instant("dialogos.establecerFotoFavorita.favoritaError"))})}addSelection(e){this.selectionCloseElements=e}validatePhoto(e){this.selectionCloseElements.length>0?this.saveData(e):this.dialogModelService.openConfirmDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),`${this.translate.instant("dialogos.fotos.validacion.msgConfirmacionDescartarAsociacion")} ${this.translate.instant("dialogos.fotos.validacion.msgConfirmacionDescartar2")}`).subscribe(i=>{i&&this.saveData(e)})}reloadComponent(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.navigate(["./"],{relativeTo:this.activatedRoute,queryParamsHandling:"merge"})}setPhotoMetadata(e){this.photoMetadata=e}saveData(e){let i=new Wa.K(this.selectionCloseElements,e),a={agregarRelacionFoto:this.globalService.agregarRelacionFoto(i),actualizarFoto:this.photoMetadata?this.globalService.actualizarFoto(this.photoMetadata):(0,ja.of)(null)};(0,Xa.D)(a).subscribe(o=>{200!==o.agregarRelacionFoto.status||!u.c.isNullorEmpty(o.actualizarFoto)&&200!==o.actualizarFoto.status?this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),this.translate.instant("dialogos.fotos.validacion.validarError")):(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.fotos.validacion.tituloValidar"),this.translate.instant("dialogos.fotos.validacion.validar
1Correcto")),this.reloadComponent())})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(to.uw),t.Y36(C.k),t.Y36(S.r),t.Y36(p.sK),t.Y36(W.U),t.Y36(z.A),t.Y36(v.F0),t.Y36(v.gz),t.Y36(dt.E))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-related-photos"]],inputs:{extraccion:"extraccion",entityName:"entityName",entityNameCiudadano:"entityNameCiudadano"},outputs:{coordinatesEvent:"coordinatesEvent"},decls:14,vars:10,consts:[[1,"container-title","mt-1"],[1,"mb-2"],[1,"container"],[4,"ngIf","ngIfElse"],["noPhotos",""],[1,"row"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"appHasrole"],[4,"appHasrole"],[4,"appNothasrole"],[1,"row","mb-4"],[1,"col"],[3,"images","config","entityId","entityType","sendItemIdEvent","favoriteEvent","newDeleteEvent","newEditEvent"],[4,"ngIf"],[1,"row","justify-content-center","mb-4"],[1,"col","col-xl-10","mb-4"],[3,"dataId","showForm","newMetadataEditEvent"],[1,"col-12"],["appBold",""],[3,"searchResult","tableColumns","newSelectEvent"],["type","button","mat-flat-button","",1,"btn-first",3,"click"],[1,"container-text"],[1,"fa-solid","fa-camera"],[3,"entityName","entityId"],[3,"entityName","entityId",4,"ngIf"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.TgZ(4,"div",2),t.YNc(5,oo,6,7,"ng-container",3),t.YNc(6,co,4,3,"ng-template",null,4,t.W1O),t.TgZ(8,"div",5)(9,"div",6)(10,"div",7),t.YNc(11,ro,4,3,"button",8),t.YNc(12,so,2,2,"ng-container",9),t.YNc(13,po,2,1,"ng-container",10),t.qZA()()()()),2&e){const a=t.MAs(7);t.xp6(2),t.AsE("",i.extraccion.id," - ",i.extraccion.nombre,""),t.xp6(3),t.Q6J("ngIf",i.imagesMetadata.length>0)("ngIfElse",a),t.xp6(6),t.Q6J("appHasrole",t.DdM(7,gt)),t.xp6(1),t.Q6J("appHasrole",t.DdM(8,gt)),t.xp6(1),t.Q6J("appNothasrole",t.DdM(9,gt))}},directives:[A.d,h.O5,eo.F,no.P,R.M,et.D,J.lW,Q.I,Y.N,ct.b],pipes:[h.Ov,p.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}"]}),n})();var _o=d(8892),uo=d(3456);function fo(n,c){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-technical-data-no-perfil",9),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("extraccion",e.extraccion)("entityNameCiudadano",e.entityNameCiudadano)}}function go(n,c){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-technical-data-perfil",10),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)}}function ho(n,c){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-technic-data-no-perfil",9),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("extraccion",e.extraccion)("entityNameCiudadano",e.entityNameCiudadano)}}function bo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-technic-data-perfil",14),t.NdJ("newBombeoEvent",function(a){return t.CHM(e),t.oxw(4).newBombeo(a)})("editBombeoEvent",function(a){return t.CHM(e),t.oxw(4).editBombeo(a)})("newEntubacionEvent",function(a){return t.CHM(e),t.oxw(4).newEntubacion(a)})("editEntubacionEvent",function(a){return t.CHM(e),t.oxw(4).editEntubacion(a)})("newPerforacionEvent",function(a){return t.CHM(e),t.oxw(4).newPerforacion(a)})("editPerforacionEvent",function(a){return t.CHM(e),t.oxw(4).editPerforacion(a)}),t.qZA()}if(2&n){const e=t.oxw(4);t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)("combos",e.combosDatosTecnicos)}}function xo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-drilling-edit",18),t.NdJ("goBackEvent",function(a){return t.CHM(e),t.oxw(5).resetTab(a)}),t.qZA()}if(2&n){const e=t.oxw(5);t.Q6J("extraccion",e.extraccion)("perforacionItem",e.editedPerforacionItem)("combos",e.combosDatosTecnicos)}}function vo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-pump-edit",19),t.NdJ("goBackEvent",function(a){return t.CHM(e),t.oxw(5).resetTab(a)}),t.qZA()}if(2&n){const e=t.oxw(5);t.Q6J("extraccion",e.extraccion)("bombeoItem",e.editedBombeoItem)("combos",e.combosDatosTecnicos)}}function Co(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-intubation-edit",20),t.NdJ("goBackEvent",function(a){return t.CHM(e),t.oxw(5).resetTab(a)}),t.qZA()}if(2&n){const e=t.oxw(5);t.Q6J("extraccion",e.extraccion)("entubacionItem",e.editedEntubacionItem)("combos",e.combosDatosTecnicos)}}function To(n,c){if(1&n&&(t.YNc(0,xo,1,3,"app-drilling-edit",15),t.YNc(1,vo,1,3,"app-pump-edit",16),t.YNc(2,Co,1,3,"app-intubation-edit",17)),2&n){const e=t.oxw(4);t.Q6J("ngIf",e.editedPerforacionItem||e.newPerforacionItem),t.xp6(1),t.Q6J("ngIf",e.editedBombeoItem||e.newBombeoItem),t.xp6(1),t.Q6J("ngIf",e.editedEntubacionItem||e.newEntubacionItem)}}function Zo(n,c){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,bo,1,3,"app-technic-data-perfil",12),t.YNc(2,To,3,3,"ng-template",null,13,t.W1O),t.qZA()),2&n){const e=t.MAs(3),i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!(i.editedPerforacionItem||i.newPerforacionItem||i.editedBombeoItem||i.newBombeoItem||i.editedEntubacionItem||i.newEntubacionItem))("ngIfElse",e)}}const V=function(){return["4","2","7"]};function Ao(n,c){1&n&&(t.TgZ(0,"div",11),t.YNc(1,ho,2,2,"div",4),t.YNc(2,Zo,4,2,"div",5),t.qZA()),2&n&&(t.xp6(1),t.Q6J("appNothasrole",t.DdM(2,V)),t.xp6(1),t.Q6J("appHasrole",t.DdM(3,V)))}function Eo(n,c){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-uses",21),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("extraccion",e.extraccion)("entityNameCiudadano",e.entityNameCiudadano)("isProfile",!1)}}function Oo(n,c){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"app-uses",22),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)("isProfile",!0)}}function Do(n,c){1&n&&(t.YNc(0,Eo,2,3,"div",4),t.YNc(1,Oo,2,3,"div",5)),2&n&&(t.Q6J("appNothasrole",t.DdM(2,V)),t.xp6(1),t.Q6J("appHasrole",t.DdM(3,V)))}function No(n,c){if(1&n&&t._UZ(0,"app-related-elements",22),2&n){const e=t.oxw(3);t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)("isProfile",!0)}}function Io(n,c){1&n&&(t.TgZ(0,"div")(1,"mat-tab",3),t.ALo(2,"translate"),t.YNc(3,No,1,3,"ng-template",6),t.qZA()()),2&n&&(t.xp6(1),t.s9C("label",t.lcZ(2,1,"pestanas.elemRel")))}function yo(n,c){if(1&n&&t._UZ(0,"app-related-elements",21),2&n){const e=t.oxw(3);t.Q6J("extraccion",e.extraccion)("entityNameCiudadano",e.entityNameCiudadano)("isProfile",!1)}}function Mo(n,c){1&n&&(t.TgZ(0,"div")(1,"mat-tab",3),t.ALo(2,"translate"),t.YNc(3,yo,1,3,"ng-template",6),t.qZA()()),2&n&&(t.xp6(1),t.s9C("label",t.lcZ(2,1,"pestanas.elemRel")))}function Po(n,c){if(1&n&&(t.TgZ(0,"div")(1,"mat-tab",3),t.ALo(2,"translate"),t._UZ(3,"app-concesional-info-perfil",10),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(1),t.s9C("label",t.lcZ(2,3,"pestanas.infoConcesional")),t.xp6(2),t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)}}function qo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-related-photos",24),t.NdJ("coordinatesEvent",function(a){return t.CHM(e),t.oxw(3).addCoordinates(a)}),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("extraccion",e.extraccion)("entityNameCiudadano",e.entityNameCiudadano)}}function So(n,c){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,qo,1,2,"app-related-photos",23),t.qZA()),2&n){t.oxw();const e=t.MAs(20),i=t.oxw();
1t.xp6(1),t.Q6J("ngIf",0===i.coordinates.length)("ngIfElse",e)}}function Uo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-related-photos",26),t.NdJ("coordinatesEvent",function(a){return t.CHM(e),t.oxw(3).addCoordinates(a)}),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("extraccion",e.extraccion)("entityName",e.entityName)}}function wo(n,c){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,Uo,1,2,"app-related-photos",25),t.qZA()),2&n){t.oxw();const e=t.MAs(20),i=t.oxw();t.xp6(1),t.Q6J("ngIf",0===i.coordinates.length)("ngIfElse",e)}}function Lo(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-image-management",28),t.NdJ("associationEvent",function(a){return t.CHM(e),t.oxw(3).changeAssociation(a)}),t.qZA()}if(2&n){const e=t.oxw(3);t.Q6J("entityDetail",e.extraccion)("coords",e.coordinates)}}function Jo(n,c){if(1&n&&t.YNc(0,Lo,1,2,"app-image-management",27),2&n){t.oxw();const e=t.MAs(22),i=t.oxw();t.Q6J("ngIf",!i.imgAsociated)("ngIfElse",e)}}function Ro(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"app-photo-relationship",29),t.NdJ("validateEvent",function(a){return t.CHM(e),t.oxw(2).resetTab(a)}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("entityDetail",e.extraccion)("photoId",e.newPhotoid)}}function Vo(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-tab-group",2),t.NdJ("selectedTabChange",function(a){return t.CHM(e),t.oxw().tabChanged(a)}),t.TgZ(2,"mat-tab",3),t.ALo(3,"translate"),t.YNc(4,fo,2,2,"div",4),t.YNc(5,go,2,2,"div",5),t.qZA(),t.TgZ(6,"mat-tab",3),t.ALo(7,"translate"),t.YNc(8,Ao,3,4,"ng-template",6),t.qZA(),t.TgZ(9,"mat-tab",3),t.ALo(10,"translate"),t.YNc(11,Do,2,4,"ng-template",6),t.qZA(),t.YNc(12,Io,4,3,"div",5),t.YNc(13,Mo,4,3,"div",4),t.YNc(14,Po,4,5,"div",5),t.TgZ(15,"mat-tab",3),t.ALo(16,"translate"),t.YNc(17,So,2,2,"div",4),t.YNc(18,wo,2,2,"div",5),t.YNc(19,Jo,1,2,"ng-template",null,7,t.W1O),t.YNc(21,Ro,1,2,"ng-template",null,8,t.W1O),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(1),t.Q6J("selectedIndex",e.selectedTab),t.xp6(1),t.s9C("label",t.lcZ(3,12,"pestanas.datosGenerales")),t.xp6(2),t.Q6J("appNothasrole",t.DdM(20,V)),t.xp6(1),t.Q6J("appHasrole",t.DdM(21,V)),t.xp6(1),t.s9C("label",t.lcZ(7,14,"pestanas.datosTecnicos")),t.xp6(3),t.s9C("label",t.lcZ(10,16,"pestanas.usos")),t.xp6(3),t.Q6J("appHasrole",t.DdM(22,V)),t.xp6(1),t.Q6J("appNothasrole",t.DdM(23,V)),t.xp6(1),t.Q6J("appHasrole",t.DdM(24,V)),t.xp6(1),t.s9C("label",t.lcZ(16,18,"pestanas.fotos")),t.xp6(2),t.Q6J("appNothasrole",t.DdM(25,V)),t.xp6(1),t.Q6J("appHasrole",t.DdM(26,V))}}function Fo(n,c){1&n&&t._UZ(0,"app-spinner")}let Bo=(()=>{class n{constructor(e,i,a,o,l){var s;this.route=e,this.entityMenuService=i,this.extractionsService=a,this.selectedTabService=o,this.router=l,this.selectedTab=0,this.numRed=r.C.numRed,this.coordinates=[],this.entityName=r.C.grantingWaterExtractEntity,this.entityNameCiudadano=r.C.grantingWaterExtractEntity,this.stop$=new x.x,this.imgAsociated=!1,this.newBombeoItem=!1,this.newEntubacionItem=!1,this.newPerforacionItem=!1;let m=this.route.snapshot.paramMap.get("gid"),b=null===(s=this.router.getCurrentNavigation())||void 0===s?void 0:s.extras.state;null!=m&&(this.entityMenuService.submenuChange(!0),this.extractionsService.getExtraccion(Number(m)).pipe((0,T.R)(this.stop$)).subscribe(O=>{O.idTipo===r.C.TipoExtraccion.SUBTERRANEA?O.concesional?this.entityName=r.C.grantingWaterExtractSubConcesionalEntity:(this.entityName=r.C.grantingWaterExtractSubEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSubCiudadanoEntity):O.idTipo===r.C.TipoExtraccion.SUPERFICIAL&&(O.concesional?this.entityName=r.C.grantingWaterExtractSupConcesionalEntity:(this.entityName=r.C.grantingWaterExtractSupEntity,this.entityNameCiudadano=r.C.grantingWaterExtractSupCiudadanoEntity)),this.extractionsService.getCombosDatosTecnicos(Number(O.id),Number(O.idSubtipo)).pipe((0,T.R)(this.stop$)).subscribe(F=>{this.combosDatosTecnicos=F,u.c.isUndefined(b)||(b.hasOwnProperty("profundidadAspiracion")&&b.hasOwnProperty("tipoMotor")?this.editedBombeoItem=b:b.hasOwnProperty("idRelleno")&&b.hasOwnProperty("descRelleno")?this.editedEntubacionItem=b:b.hasOwnProperty("acuifero")&&b.hasOwnProperty("edad")&&(this.editedPerforacionItem=b)),this.extraccion=O})}),this.entityMenuService.gidEntitySubject$.next(m))}ngOnInit(){this.selectedTabService.tabIndexSubject$.pipe((0,T.R)(this.stop$)).subscribe(e=>{this.selectedTab=e})}tabChanged(e){this.selectedTabService.changeTab(e.index)}addCoordinates(e){this.coordinates=e}changeAssociation(e){this.imgAsociated=!u.c.isUndefined(e),this.newPhotoid=e}ngOnDestroy(){this.stop$.next(!0)}resetTab(e){e&&(this.coordinates=[],this.imgAsociated=!1,this.newBombeoItem=!1,this.editedBombeoItem=void 0,this.newEntubacionItem=!1,this.editedEntubacionItem=void 0,this.newPerforacionItem=!1,this.editedPerforacionItem=void 0)}newBombeo(e){this.newBombeoItem=e}editBombeo(e){this.editedBombeoItem=e}newEntubacion(e){this.newEntubacionItem=e}editEntubacion(e){this.editedEntubacionItem=e}newPerforacion(e){this.newPerforacionItem=e}editPerforacion(e){this.editedPerforacionItem=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.gz),t.Y36(lt.$),t.Y36(C.k),t.Y36(Z.O),t.Y36(v.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-technical-data"]],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["loading",""],[3,"selectedIndex","selectedTabChange"],[3,"label"],[4,"appNothasrole"],[4,"appHasrole"],["matTabContent",""],["imageManagement",""],["photoRelationship",""],[3,"extraccion","entityNameCiudadano"],[3,"extraccion","entityName"],[1,"container"],[3,"extraccion","entityName","combos","newBombeoEvent","editBombeoEvent","newEntubacionEvent","editEntubacionEvent","newPerforacionEvent","editPerforacionEvent",4,"ngIf","ngIfElse"],["editExtraction",""],[3,"extraccion","entityName","combos","newBombeoEvent","editBombeoEvent","newEntubacionEvent","editEntubacionEvent","newPerforacionEvent","editPerforacionEvent"],[3,"extraccion","perforacionItem","combos","goBackEvent",4,"ngIf"],[3,"extraccion","bombeoItem","combos","goBackEvent",4,"ngIf"],[3,"extraccion","entubacionItem","combos","goBackEvent",4,"ngIf"],[3,"extraccion","perforacionItem","combos","goBackEvent"],[3,"extraccion","bombeoItem","combos","goBackEvent"],[3,"extraccion","entubacionItem","combos","goBackEvent"],[3,"extraccion","entityNameCiudadano","isProfile"],[3,"extraccion","entityName","isProfile"],[3,"extraccion","entityNameCiudadano","coordinatesEvent",4,"ngIf","ngIfElse"],[3,"extraccion","entityNameCiudadano","coordinatesEvent"],[3,"extraccion","entityName","coordinatesEvent",4,"ngIf","ngIfElse"],[3,"extraccion","entityName","coordinatesEvent"],[3,"entityDetail","coords","associationEvent",4,"ngIf","ngIfElse"],[3,"entityDetail","coords","associationEvent"],[3,"entityDetail","photoId","validateEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,Vo,23,27,"ng-container",0),t.YNc(1,Fo,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(2);t.Q6J("ngIf",i.extraccion)("ngIfElse",a)}},directives:[h.O5,mt.SP,mt.uX,ct.b,an,Q.I,Cn,mt.Vc,Qn,qi,Qi,Xi,sa,ua,Sa,za,mo,_o.A,uo.C,I.O],pipes:[p.X$],styles:[""]}),n})();var Qo=d(4327);class Yo{constructor(c,e){this.camposInforme=c,this.parametrosBusqueda=e}}var ko=d(4239),Go=d(1889);function Ho(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).generateReport()}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&n&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"botones.generarInforme")))}function $o(n,c){1&n&&t._UZ(0,"app-generating-report-icon")}const zo=function(){return["../"]};function jo(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",3)(6,"div",4)(7,"div",5)(8,"app-pick-list-form",6),t.NdJ("newSelectionEvent",function(a){return t.CHM(e),t.oxw().addSelectedItems(a)}),t.qZA()()(),t.TgZ(9,"div",7)(10,"div",8)(11,"div",9),t.YNc(12,Ho,3,3,"button",10),t.YNc(13,$o,1,0,"ng-template",null,11,t.W1O),t.TgZ(15,"button",12),t._uU(16),t.ALo(17,"translate"),t.qZA()()()()(),t.BQk()}if(2&n){const e=c.ngIf,i=t.MAs(14),a=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,6,"informes.msgCampos")),t.xp6(5),t.Q6J("sourceList",e),t.xp6(4),t.Q6J("ngIf",!a.generatingReport)("ngIfElse",i),t.xp6(3),t.Q6J("routerLink",t.DdM(10,zo)),t.xp6(1),t.Oqu(t.lcZ(17,8,"botones.volver"))}}function Xo(n,c){1&n&&t._UZ(0,"app-spinner")}let Wo=(()=>{class n{constructor(e,i,a,o,l){var s;this.globalService=e,this.router=i,this.dialogModelService=a,this.translate=o,this.extractionsService=l,this.selectedItems=[],this.generatingReport=!1,this.formData=null===(s=this.router.getCurrentNavigation())||void 0===s?void 0:s.extras.state}ngOnInit(){this.parameterization$=this.globalService.getParametrizacionInforme(r.C.tipoEntidad.extraccionAguas)}addSelectedItems(e){this.selectedItems=e}generateReport(){if(this.selectedItems.length>0){this.generatingReport=!0;let e=Object.assign({},this.formData);u.c.convertFormattedNumberSearchForm(e,this.formData,["profundidad","volumen"]);let i=new Yo(this.selectedItems,e);this.extractionsService.generarInformeGeneral(i).subscribe(a=>{if(200===a.status){let o=u.c.toArrayBuffer(a.body.contenido);const l=new Blob([o],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),s=new File([l],a.body.nombre,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});(0,Qo.saveAs)(s)}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.informes.titulo"),this.translate.instant("dialogos.informes.informeError"));this.generatingReport=!1})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.informes.titulo"),this.translate.instant("dialogos.informes.seleccionCampos"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(W.U),t.Y36(v.F0),t.Y36(S.r),t.Y36(p.sK),t.Y36(C.k))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-report"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-text"],[1,"container"],[1,"row","mb-2"],[1,"col"],[3,"sourceList","newSelectionEvent"],[1,"row"],[1,"col-md-12"],[1,"float-end"],["type","button","mat-flat-button","","class","btn-first",3,"click",4,"ngIf","ngIfElse"],["generating",""],["type","button","mat-flat-button","",1,"btn-second",3,"routerLink"],["type","button","mat-flat-button","",1,"btn-first",3,"click"]],template:function(e,i){if(1&e&&(t.YNc(0,jo,18,11,"ng-container",0),t.ALo(1,"async"),t.YNc(2,Xo,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.parameterization$))("ngIfElse",a)}}
1,directives:[h.O5,ko.N,J.lW,Go.C,v.rH,I.O],pipes:[h.Ov,p.X$],styles:[".btn-first[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-first[_ngcontent-%COMP%]:hover, .btn-first[_ngcontent-%COMP%]:focus, .btn-first[_ngcontent-%COMP%]:active, .btn-first.active[_ngcontent-%COMP%]{background-color:#0b475d;color:#fff}.btn-first.disabled[_ngcontent-%COMP%]:hover, .btn-first.disabled[_ngcontent-%COMP%]:focus, .btn-first.disabled[_ngcontent-%COMP%]:active, .btn-first.disabled.active[_ngcontent-%COMP%], .btn-first[disabled][_ngcontent-%COMP%]:hover, .btn-first[disabled][_ngcontent-%COMP%]:focus, .btn-first[disabled][_ngcontent-%COMP%]:active, .btn-first[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-first[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-first.active[_ngcontent-%COMP%]{background-color:#1b576d;color:#fff}.btn-second[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff;margin:0 8px 8px 0;padding:0 28px;border-radius:unset}.btn-second[_ngcontent-%COMP%]:hover, .btn-second[_ngcontent-%COMP%]:focus, .btn-second[_ngcontent-%COMP%]:active, .btn-second.active[_ngcontent-%COMP%]{background-color:#0c6686;border-color:#002f45;color:#fff}.btn-second.disabled[_ngcontent-%COMP%]:hover, .btn-second.disabled[_ngcontent-%COMP%]:focus, .btn-second.disabled[_ngcontent-%COMP%]:active, .btn-second.disabled.active[_ngcontent-%COMP%], .btn-second[disabled][_ngcontent-%COMP%]:hover, .btn-second[disabled][_ngcontent-%COMP%]:focus, .btn-second[disabled][_ngcontent-%COMP%]:active, .btn-second[disabled].active[_ngcontent-%COMP%], fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:hover, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:focus, fieldset[disabled][_ngcontent-%COMP%] .btn-second[_ngcontent-%COMP%]:active, fieldset[disabled][_ngcontent-%COMP%] .btn-second.active[_ngcontent-%COMP%]{background-color:#1c7696;color:#fff}"]}),n})();var Ko=d(2941),tc=d(2367);function ec(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-historical-fields",3),t.NdJ("newSearchEvent",function(a){return t.CHM(e),t.oxw().searchChanges(a)}),t.qZA(),t.BQk()}if(2&n){const e=c.ngIf,i=t.oxw();t.xp6(1),t.Q6J("fields",e)("gid",i.gid)("itemData",i.itemDetail)("newRouterLink",i.routerLink)}}function nc(n,c){if(1&n&&(t.ynx(0),t._UZ(1,"app-historical-table",4),t.BQk()),2&n){const e=c.ngIf,i=t.oxw();t.xp6(1),t.Q6J("searchResult",e)("gid",i.gid)("searchField",i.selectedValueName)("tableColumns",i.tableConfiguration)}}let vt=(()=>{class n{constructor(e,i,a,o){var l;if(this.route=e,this.extractionsService=i,this.tableConfigurationService=a,this.router=o,this.gid="",this.tab="",this.name="",this.idEditedElement="0",this.selectedValueName="",this.routerLink="../../../../technical",this.gid=this.route.snapshot.paramMap.get("gid")||"",this.tab=this.route.snapshot.paramMap.get("tab")||"",this.name=this.route.snapshot.paramMap.get("name")||"",this.tableConfiguration=this.tableConfigurationService.getHistoricalTableConfiguration(),""!==this.tab&&(this.historicalFields$=this.extractionsService.getListadoCamposHistorico(Number(this.tab))),this.navigationData=null===(l=this.router.getCurrentNavigation())||void 0===l?void 0:l.extras.state,!u.c.isUndefined(this.navigationData)){u.c.isUndefined(this.navigationData.item)||(this.itemDetail=this.navigationData.item);let s=Number(this.tab),b=s===r.C.operacion.OPERACION_ENTUBACION_EXTRACCIONES,O=s===r.C.operacion.OPERACION_PERFORACION_EXTRACCIONES;(s===r.C.operacion.OPERACION_BOMBEO_EXTRACCIONES||b||O)&&(this.idEditedElement=this.itemDetail.id,this.name=this.navigationData.name,this.routerLink="../../../technical")}}ngOnInit(){}searchChanges(e){this.selectedValueName=e.nombreOriginal,""!==this.gid&&""!==this.tab&&(this.historical$=this.extractionsService.getHistoricoCampo(Number(this.gid),Number(this.tab),e.nombre,Number(this.idEditedElement)))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.gz),t.Y36(C.k),t.Y36(z.A),t.Y36(v.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-historical"]],decls:8,vars:8,consts:[[1,"container-title"],[1,"mb-2"],[4,"ngIf"],[3,"fields","gid","itemData","newRouterLink","newSearchEvent"],[3,"searchResult","gid","searchField","tableColumns"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"h2"),t._uU(2),t.qZA()(),t._UZ(3,"mat-divider",1),t.YNc(4,ec,2,4,"ng-container",2),t.ALo(5,"async"),t.YNc(6,nc,2,4,"ng-container",2),t.ALo(7,"async")),2&e&&(t.xp6(2),t.AsE("",i.gid," - ",i.name,""),t.xp6(2),t.Q6J("ngIf",t.lcZ(5,4,i.historicalFields$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(7,6,i.historical$)))},directives:[A.d,h.O5,Ko.f,tc.q],pipes:[h.Ov],styles:[""]}),n})();class Ct{constructor(c,e){this.extraccion=c,this.datosAdicionales=e}}var ht=d(1160);class ic extends ht.X{}class ac extends ht.X{}class oc extends ht.X{}var Tt=d(6159),bt=d(291);function cc(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"app-version-fields-form",4),t.NdJ("newSelectionEvent",function(a){return t.CHM(e),t.oxw().setSelectedItems(a)}),t.qZA(),t.TgZ(6,"app-aditional-data-form",5),t.NdJ("newAditionalDataEvent",function(a){return t.CHM(e),t.oxw().saveData(a)}),t.qZA(),t.BQk()}if(2&n){const e=c.ngIf,i=t.oxw();
1t.xp6(3),t.AsE("",e.id," - ",e.nombre,""),t.xp6(2),t.Q6J("modifiedData",i.modifiedData),t.xp6(1),t.Q6J("entityId",e.id)("guardando",i.guardando)("newRouterLink",i.routerLinkVolver)("itemData",i.itemDetail)}}function rc(n,c){1&n&&t._UZ(0,"app-spinner")}let sc=(()=>{class n{constructor(e,i,a,o,l){var s;this.router=e,this.extractionsService=i,this.activatedRoute=a,this.dialogModelService=o,this.translate=l,this.selectedItems=[],this.stop$=new x.x,this.routerLinkVolver="../../../technical",this.guardando=!1;let m=this.activatedRoute.snapshot.paramMap.get("gid");null!=m&&(this.extraccion$=this.extractionsService.getExtraccion(Number(m))),this.navigationData=null===(s=this.router.getCurrentNavigation())||void 0===s?void 0:s.extras.state,u.c.isUndefined(this.navigationData.item)||(this.itemDetail=this.navigationData.item),this.modifiedData=u.c.isUndefined(this.navigationData.comparedObject)?this.navigationData:this.navigationData.comparedObject}ngOnInit(){}setSelectedItems(e){this.selectedItems=e}saveData(e){let i=this.activatedRoute.snapshot.paramMap.get("tab"),a=Number(i),o=a===r.C.operacion.OPERACION_GENERAL,l=a===r.C.operacion.OPERACION_BOMBEO_EXTRACCIONES,s=a===r.C.operacion.OPERACION_ENTUBACION_EXTRACCIONES,m=a===r.C.operacion.OPERACION_PERFORACION_EXTRACCIONES,b=a===r.C.operacion.OPERACION_POZO_EXTRACCIONES,O=a===r.C.operacion.OPERACION_GALERIA_EXTRACCIONES,F=a===r.C.operacion.OPERACION_AZUD_EMBALSE_EXTRACCIONES,it=a===r.C.operacion.OPERACION_USOS,at=this.navigationData.operation?this.navigationData.operation:r.C.operacionRealizada.MODIFICADO;this.selectedItems.length>0?this.extraccion$.pipe((0,T.R)(this.stop$)).subscribe(ot=>{let q,y=ot;y.operacion=at,u.c.isUndefined(this.itemDetail)||(q=this.prepareData(this.itemDetail)),o?(y=this.prepareData(y),y.usosMod=null):l?(u.c.isUndefined(q)&&(q=this.prepareData(new oc(this.itemDetail))),y.bombeoDTecExtraccionesDtoMod=q):s?(u.c.isUndefined(q)&&(q=this.prepareData(new ac(this.itemDetail))),y.entubacionDatTecExtraccionesDtoMod=q):m?(u.c.isUndefined(q)&&(q=this.prepareData(new ic(this.itemDetail))),y.perforacionDatTecExtraccionesDtoMod=q):b?y.pantallaPerforacionEntubacionDatTecExtraccionesDtoMod=q:O?y.pantallaGaleriaDatTecExtraccionesDtoMod=q:F?y.pantallaAzudEmbalseMod=q:it&&(y.usosMod=q),this.save(y,e,i)}):(this.guardando=!this.guardando,this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.seleccionCampos")))}prepareData(e){let i=e;for(const a of this.selectedItems){let o=a.name,l=this.modifiedData.find(s=>s.name===o).value;i[o]=l}return i}save(e,i,a){if(null!=e){let o=new Ct(e,i);this.extractionsService.guardarVersionado(o).subscribe(l=>{this.manageResponse(l,a)})}}manageResponse(e,i){if(200===e.status){this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionCorrecta"));let a=this.activatedRoute.snapshot.paramMap.get("gid");null!=i&&(a=e.body.id),this.router.navigate([`${this.routerLinkVolver}/${a}`],{relativeTo:this.activatedRoute})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionError"))}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.F0),t.Y36(C.k),t.Y36(v.gz),t.Y36(S.r),t.Y36(p.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-fields-version"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title"],[1,"mb-2"],[3,"modifiedData","newSelectionEvent"],[3,"entityId","guardando","newRouterLink","itemData","newAditionalDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,cc,7,7,"ng-container",0),t.ALo(1,"async"),t.YNc(2,rc,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.extraccion$))("ngIfElse",a)}},directives:[h.O5,A.d,Tt.L,bt.T,I.O],pipes:[h.Ov],styles:[""]}),n})();var lc=d(7446);function dc(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"div",4)(6,"p"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"span")(10,"mat-checkbox",5),t.NdJ("change",function(a){return t.CHM(e),t.oxw().change(a.checked)}),t._uU(11),t.qZA()(),t.TgZ(12,"app-aditional-data-form",6),t.NdJ("newAditionalDataEvent",function(a){return t.CHM(e),t.oxw().saveData(a)}),t.qZA(),t.BQk()}if(2&n){const e=c.ngIf,i=t.oxw();
1t.xp6(3),t.AsE("",e.id," - ",e.nombre,""),t.xp6(4),t.Oqu(t.lcZ(8,8,"versionado.versionadoCampos")),t.xp6(3),t.Q6J("color",i.checkItems.color),t.xp6(1),t.hij(" ",i.checkItems.label," "),t.xp6(1),t.Q6J("entityId",e.id)("guardando",i.guardando)("newRouterLink",i.newRouterLink)}}function pc(n,c){1&n&&t._UZ(0,"app-spinner")}let mc=(()=>{class n{constructor(e,i,a,o,l){var s;this.router=e,this.extractionsService=i,this.activatedRoute=a,this.dialogModelService=o,this.translate=l,this.selectedItems=[],this.stop$=new x.x,this.newRouterLink="../../../technical",this.guardando=!1;let m=this.activatedRoute.snapshot.paramMap.get("gid");null!=m&&(this.extraccion$=this.extractionsService.getExtraccion(Number(m))),this.navigationData=null===(s=this.router.getCurrentNavigation())||void 0===s?void 0:s.extras.state}ngOnInit(){this.checkItems={label:this.translate.instant("delete.deleteRegistro"),name:"checkDelete",completed:!1,color:"primary"}}setSelectedItems(e){this.selectedItems=e}saveData(e){let i=this.activatedRoute.snapshot.paramMap.get("tab"),a=Number(i);this.extraccion$.pipe((0,T.R)(this.stop$)).subscribe(o=>{let l=o;if(this.checkItems.completed){let s=new Ct(l,e);switch(a){case r.C.operacion.OPERACION_BOMBEO_EXTRACCIONES:l.bombeoDTecExtraccionesDtoMod=this.navigationData;break;case r.C.operacion.OPERACION_ENTUBACION_EXTRACCIONES:l.entubacionDatTecExtraccionesDtoMod=this.navigationData;break;case r.C.operacion.OPERACION_PERFORACION_EXTRACCIONES:l.perforacionDatTecExtraccionesDtoMod=this.navigationData}l.operacion=r.C.operacionRealizada.ELIMINADO,this.extractionsService.guardarVersionado(s).subscribe(m=>{this.manageResponse(m)})}else this.guardando=!this.guardando,this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.seleccionCampos"))})}manageResponse(e){200===e.status?(this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionCorrecta")),this.router.navigate([`${this.newRouterLink}/${e.body.id}`],{relativeTo:this.activatedRoute})):this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionError"))}ngOnDestroy(){this.stop$.next(!0)}change(e){this.checkItems.completed=e}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.F0),t.Y36(C.k),t.Y36(v.gz),t.Y36(S.r),t.Y36(p.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-fields-version-delete"]],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title"],[1,"mb-2"],[1,"container-text"],[3,"color","change"],[3,"entityId","guardando","newRouterLink","newAditionalDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,dc,13,10,"ng-container",0),t.ALo(1,"async"),t.YNc(2,pc,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.extraccion$))("ngIfElse",a)}},directives:[h.O5,A.d,lc.oG,bt.T,I.O],pipes:[h.Ov,p.X$],styles:[""]}),n})();class _c{constructor(c,e){this.infoConcesional=c,this.datosAdicionales=e}}function uc(n,c){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",2)(2,"h2"),t._uU(3),t.qZA()(),t._UZ(4,"mat-divider",3),t.TgZ(5,"app-version-fields-form",4),t.NdJ("newSelectionEvent",function(a){return t.CHM(e),t.oxw().setSelectedItems(a)}),t.qZA(),t.TgZ(6,"app-aditional-data-form",5),t.NdJ("newAditionalDataEvent",function(a){return t.CHM(e),t.oxw().saveData(a)}),t.qZA(),t.BQk()}if(2&n){const e=c.ngIf,i=t.oxw();t.xp6(3),t.AsE("",e.id," - ",e.nombre,""),t.xp6(2),t.Q6J("modifiedData",i.modifiedData),t.xp6(1),t.Q6J("entityId",e.id)("guardando",i.guardando)("newRouterLink",i.routerLinkVolver)("itemData",i.itemDetail)}}function fc(n,c){1&n&&t._UZ(0,"app-spinner")}let gc=(()=>{class n{constructor(e,i,a,o,l){var s;this.router=e,this.extractionsService=i,this.activatedRoute=a,this.dialogModelService=o,this.translate=l,this.selectedItems=[],this.stop$=new x.x,this.routerLinkVolver="../../../technical",this.guardando=!1;let m=this.activatedRoute.snapshot.paramMap.get("gid");null!=m&&(this.infoConcesional$=this.extractionsService.getInformacionConcesional(Number(m))),this.navigationData=null===(s=this.router.getCurrentNavigation())||void 0===s?void 0:s.extras.state,u.c.isUndefined(this.navigationData.item)||(this.itemDetail=this.navigationData.item),this.modifiedData=u.c.isUndefined(this.navigationData.comparedObject)?this.navigationData:this.navigationData.comparedObject}ngOnInit(){}setSelectedItems(e){this.selectedItems=e}saveData(e){let i=this.activatedRoute.snapshot.paramMap.get("tab");this.selectedItems.length>0?this.infoConcesional$.pipe((0,T.R)(this.stop$)).subscribe(a=>{let o=a;o=this.prepareData(o),this.save(o,e,i)}):(this.guardando=!this.guardando,this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.seleccionCampos")))}prepareData(e){let i=e;for(const a of this.selectedItems){let o=a.name,l=this.modifiedData.find(s=>s.name===o).value;i[o]=l}return i}save(e,i,a){if(null!=e){let o=new _c(e,i);this.extractionsService.guardarInfoConcesionalVersionado(o).subscribe(l=>{this.manageResponse(l,a)})}}manageResponse(e,i){if(200===e.status){this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionCorrecta"));let a=this.activatedRoute.snapshot.paramMap.get("gid");null!=i&&(a=e.body.id),this.router.navigate([`${this.routerLinkVolver}/${a}`],{relativeTo:this.activatedRoute})}else this.dialogModelService.openMessageDialog(this.translate.instant("dialogos.guardarCambios.titulo"),this.translate.instant("dialogos.guardarCambios.operacionError"))}ngOnDestroy(){this.stop$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(v.F0),t.Y36(C.k),t.Y36(v.gz),t.Y36(S.r),t.Y36(p.sK))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-fields-version-uses"]
1],decls:4,vars:4,consts:[[4,"ngIf","ngIfElse"],["loading",""],[1,"container-title"],[1,"mb-2"],[3,"modifiedData","newSelectionEvent"],[3,"entityId","guardando","newRouterLink","itemData","newAditionalDataEvent"]],template:function(e,i){if(1&e&&(t.YNc(0,uc,7,7,"ng-container",0),t.ALo(1,"async"),t.YNc(2,fc,1,0,"ng-template",null,1,t.W1O)),2&e){const a=t.MAs(3);t.Q6J("ngIf",t.lcZ(1,2,i.infoConcesional$))("ngIfElse",a)}},directives:[h.O5,A.d,Tt.L,bt.T,I.O],pipes:[h.Ov],styles:[""]}),n})();var hc=d(3760);const bc=[{path:"",data:{breadcrumb:"bCExtractions"},component:_e,children:[{path:"",data:{breadcrumb:"null"},redirectTo:"data",pathMatch:"full"},{path:"data",data:{breadcrumb:"bCData"},component:de},{path:"search",data:{breadcrumb:"bCBusInf"},component:g.g,children:[{path:"",data:{breadcrumb:"null"},component:ae},{path:"general/:gid",data:{breadcrumb:"bCFichaGral"},component:Ve},{path:"technical/:gid",data:{breadcrumb:"bCFichaTec"},component:Bo},{path:"fieldsHistory/:gid/:tab",data:{breadcrumb:"bCHist"},component:vt},{path:"fieldsHistory/:gid/:tab/:name",data:{breadcrumb:"bCHist"},component:vt},{path:"fieldsVersion/:gid/:tab",data:{breadcrumb:"bCVers"},component:sc},{path:"fieldsVersionUses/:gid/:tab",data:{breadcrumb:"bCVers"},component:gc},{path:"fieldsVersionDelete/:gid/:tab",data:{breadcrumb:"bCVers"},component:mc},{path:"fieldsVersionRelation/:gid",data:{breadcrumb:"bCVers",profiles:["3","2","4","7","11","12"],authRequired:!0},component:hc.h},{path:"report",data:{breadcrumb:"bCInf"},component:Wo}]}]}];let xc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[[v.Bz.forChild(bc)],v.Bz]}),n})();function Zt(n){return new w.w(n,"./assets/i18n/extractions/",".json")}let vc=(()=>{class n{constructor(){}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({providers:[],imports:[[f.m,xc,p.aw.forChild({defaultLanguage:r.C.defaultLanguage,loader:{provide:p.Zw,useFactory:Zt,deps:[D.eN]},isolate:!1,extend:!0})]]}),n})()}}]);
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.