File: /var/www/web.enelar.com.co/dist/browser/chunk-ER22UE33.js
import{b as Ve}from"./chunk-VHOG3UI6.js";import{a as Oe}from"./chunk-PVD42JTF.js";import{a as we,b as De,c as _e,d as Pe}from"./chunk-2DV2IJZ3.js";import{a as ye,b as Se}from"./chunk-UGKVLYDY.js";import"./chunk-4T6JHK7T.js";import{b as J}from"./chunk-NOX4BB7Y.js";import"./chunk-FJX52BFR.js";import{a as B,b as k}from"./chunk-M2XGXZBH.js";import{a as Q,g as K,j as X}from"./chunk-YZB5RIY6.js";import{a as F}from"./chunk-FWIIQLPA.js";import{a as C}from"./chunk-J5MNQ3LA.js";import{a as xe,b as Fe,l as Ee,m as Me,n as Re,o as Ie,p as Ae,t as Te}from"./chunk-3PWCL6RG.js";import{a as G,b as D}from"./chunk-JXCDAXMV.js";import"./chunk-O3VRXXRR.js";import"./chunk-ATMY62X3.js";import{b as me}from"./chunk-ZUNNDRPI.js";import"./chunk-KDH6VC4N.js";import{d as oe,f as de,g as ue,i as fe,j as ge,k as he,l as ve,n as be,p as Ce}from"./chunk-FB5LCIVC.js";import"./chunk-RP3BBTTB.js";import{A as w,n as pe}from"./chunk-VJI6KQJL.js";import{A as H,Ab as se,C as h,D as v,Fa as l,Ga as d,Ha as R,I as A,Ia as re,J as T,Nb as ce,Oa as O,Pa as q,Q as ae,Y as s,Ya as V,Z as u,Za as N,h as L,ha as M,ja as m,lb as W,ma as te,mb as j,na as ie,nb as ne,pa as n,qa as r,ra as c,va as P,vb as b,wa as y,x as Y,xa as S,y as g,yb as le}from"./chunk-MDSVL5BJ.js";import"./chunk-ODN5LVDJ.js";var Z=class o{static fromApiToDomain(e){return{data:Array.isArray(e.data)?e.data.map(p=>o.dataMapper(p)):o.dataMapper(e.data),message:e.message,summary:e.summary,totalRecords:e.totalRecords,rows:e.rows}}static dataMapper(e){return{_id:e._id,codigo:e.codigo,barrio:e.barrio,municipio:e.municipio,perdidaTotal:e.perdidaTotal,sectorSinEnergia:e.sectorSinEnergia,tacosDisparados:e.tacosDisparados,celularReporta:e.celularReporta,nombreReporta:e.nombreReporta,dejarComentario:e.dejarComentario,comentario:e.comentario,createdAt:e.createdAt}}static fromDomainToApi(e){return{_id:e._id,codigo:e.codigo,barrio:e.barrio,municipio:e.municipio,perdidaTotal:e.perdidaTotal,sectorSinEnergia:e.sectorSinEnergia,tacosDisparados:e.tacosDisparados,celularReporta:e.celularReporta,nombreReporta:e.nombreReporta,dejarComentario:e.dejarComentario,comentario:e.comentario,createdAt:e.createdAt}}};var $=class o{static fromApiToDomain(e){return{data:Array.isArray(e.data)?e.data.map(p=>o.dataMapper(p)):o.dataMapper(e.data),message:e.message,summary:e.summary,totalRecords:e.totalRecords,rows:e.rows}}static dataMapper(e){return{labels:e.labels,dataReportes:e.dataReportes,dataInactividad:e.dataInactividad}}static fromDomainToApi(e){return{labels:e.labels,dataReportes:e.dataReportes,dataInactividad:e.dataInactividad}}};var Ne=(()=>{let e=class e{constructor(t){this.http=t}getReporteFallas(t,i){let a=new le().set("page",t.toString()).set("pageSize",i.toString());return this.http.get(`${C.apiDevWeb}bot/reporte-fallas`,{params:a}).pipe(L(Z.fromApiToDomain))}getGraficaDias(t){return this.http.get(`${C.apiDevWeb}bot/reporte-fallas/grafica-dias/${t}`).pipe(L($.fromApiToDomain))}getGraficaMeses(t){return this.http.get(`${C.apiDevWeb}bot/reporte-fallas/grafica-meses/${t}`).pipe(L($.fromApiToDomain))}getGraficaMunicipios(t){return this.http.post(`${C.apiDevWeb}bot/reporte-fallas/grafica-municipios`,t).pipe(L($.fromApiToDomain))}pingApiMiEnelar(t){return this.http.post(`${C.apiMiEnelar}${t}`,{codsus:"0000"})}pingApiBot(){return this.http.get(`${C.apiBot}`)}};e.\u0275fac=function(i){return new(i||e)(H(se))},e.\u0275prov=Y({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();var E=(()=>{let e=class e{constructor(t){this.reporteFallasService=t}getReporteFallas(t,i){return this.reporteFallasService.getReporteFallas(t,i)}getGraficaDias(t){return this.reporteFallasService.getGraficaDias(t)}getGraficaMeses(t){return this.reporteFallasService.getGraficaMeses(t)}getGraficaMunicipios(t){return this.reporteFallasService.getGraficaMunicipios(t)}pingApiMiEnelar(t){return this.reporteFallasService.pingApiMiEnelar(t)}pingApiBot(){return this.reporteFallasService.pingApiBot()}};e.\u0275fac=function(i){return new(i||e)(H(Ne))},e.\u0275prov=Y({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();var at=()=>({"min-width":"150rem"}),rt=()=>[5,10,20,30];function nt(o,e){o&1&&(n(0,"div",5)(1,"h5",6),l(2,"Lista de reporte de fallas"),r()())}function lt(o,e){o&1&&(n(0,"tr")(1,"th",7),l(2,"C\xF3digo"),c(3,"p-sortIcon",8),r(),n(4,"th",9),l(5,"Municipio"),c(6,"p-sortIcon",10),r(),n(7,"th",11),l(8,"Barrio"),c(9,"p-sortIcon",12),r(),n(10,"th",13),l(11,"P\xE9rdida Total"),c(12,"p-sortIcon",14),r(),n(13,"th",15),l(14,"Sector sin Energ\xEDa"),c(15,"p-sortIcon",16),r(),n(16,"th",17),l(17,"Tacos Disparados"),c(18,"p-sortIcon",18),r(),n(19,"th",19),l(20,"Celular Reporta"),c(21,"p-sortIcon",20),r(),n(22,"th",21),l(23,"Nombre Reporta"),c(24,"p-sortIcon",22),r(),n(25,"th",23),l(26,"Dejar Comentario"),c(27,"p-sortIcon",24),r(),n(28,"th",25),l(29,"Comentario"),c(30,"p-sortIcon",26),r(),n(31,"th",27),l(32,"Fecha Creaci\xF3n"),c(33,"p-sortIcon",28),r(),n(34,"th",27),l(35,"Hora Creaci\xF3n"),c(36,"p-sortIcon",28),r()())}function st(o,e){if(o&1&&(n(0,"tr")(1,"td"),l(2),r(),n(3,"td"),l(4),r(),n(5,"td"),l(6),r(),n(7,"td"),l(8),r(),n(9,"td"),l(10),r(),n(11,"td"),l(12),r(),n(13,"td"),l(14),r(),n(15,"td"),l(16),r(),n(17,"td"),l(18),r(),n(19,"td"),l(20),r(),n(21,"td"),l(22),V(23,"dateFormat"),r(),n(24,"td"),l(25),V(26,"horaFormat"),r()()),o&2){let p=e.$implicit;s(2),d(p.codigo),s(2),d(p.municipio),s(2),d(p.barrio),s(2),d(p.perdidaTotal),s(2),d(p.sectorSinEnergia),s(2),d(p.tacosDisparados),s(2),d(p.celularReporta),s(2),d(p.nombreReporta),s(2),d(p.dejarComentario),s(2),d(p.comentario),s(2),d(N(23,12,p.createdAt)),s(3),d(N(26,14,p.createdAt))}}function pt(o,e){if(o&1){let p=P();n(0,"p-paginator",29),y("onPageChange",function(i){A(p);let a=S();return T(a.paginate(i))}),r(),n(1,"div",30),l(2),r()}if(o&2){let p=S();m("rows",p.rows)("totalRecords",p.totalRecords)("rowsPerPageOptions",O(4,rt)),s(2),R(" En total son ",p.totalRecords," registros ")}}var je=(()=>{let e=class e{constructor(){this.reporteFallas=[],this.setPaginate=new ae,this.globalFilterFields=["fechaReporteFalla"],this.isLoading=!1,this.isLoadingTable=!1,this.first=0,this.rows=C.pageSize}set getLoadingTable(t){this.isLoadingTable=t}paginate(t){this.setPaginate.emit(t)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=h({type:e,selectors:[["app-table-reporte-fallas"]],inputs:{reporteFallas:"reporteFallas",totalRecords:"totalRecords",getLoadingTable:"getLoadingTable"},outputs:{setPaginate:"setPaginate"},decls:5,vars:6,consts:[[3,"value","globalFilterFields","loading","showCurrentPageReport","tableStyle"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","summary"],[1,"flex","align-items-center","justify-content-between"],[1,"m-0"],["width","100px","pSortableColumn","codigo"],["field","codigo"],["pSortableColumn","municipio"],["field","municipio"],["pSortableColumn","barrio"],["field","barrio"],["width","135px","pSortableColumn","perdidaTotal"],["field","perdidaTotal"],["width","135px","pSortableColumn","sectorSinEnergia"],["field","sectorSinEnergia"],["width","135px","pSortableColumn","tacosDisparados"],["field","tacosDisparados"],["pSortableColumn","celularReporta"],["field","celularReporta"],["pSortableColumn","nombreReporta"],["field","nombreReporta"],["pSortableColumn","dejarComentario"],["field","dejarComentario"],["width","250px","pSortableColumn","comentario"],["field","comentario"],["pSortableColumn","createdAt"],["field","createdAt"],[3,"onPageChange","rows","totalRecords","rowsPerPageOptions"],[1,"flex","align-items-center","justify-content-between","mt-3"]],template:function(i,a){i&1&&(n(0,"p-table",0),M(1,nt,3,0,"ng-template",1)(2,lt,37,0,"ng-template",2)(3,st,27,16,"ng-template",3)(4,pt,3,5,"ng-template",4),r()),i&2&&m("value",a.reporteFallas)("globalFilterFields",a.globalFilterFields)("loading",a.isLoadingTable)("showCurrentPageReport",!0)("tableStyle",O(5,at))},dependencies:[Re,pe,Ie,Ae,Ee,Q,K],styles:["tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background-color:#f0f0f0!important}"]});let o=e;return o})();var Be=()=>({width:"100%"}),$e=(()=>{let e=class e{constructor(t,i,a){this.reporteFallaRepository=t,this.manageResponse=i,this.formBuilder=a}ngOnInit(){this.crearFormulario(),this.getFechaInicioYFinMesActual()}crearFormulario(){this.formulario=this.formBuilder.group({fechaInicio:["",oe.required],fechaFin:["",oe.required]})}getChartData(){let t=this.formulario.value;this.reporteFallaRepository.getGraficaMunicipios(t).subscribe({next:i=>{let a=getComputedStyle(document.documentElement),x=a.getPropertyValue("--text-color");this.data={labels:["Arauca","Arauquita","Cravo norte","Fortul","Puerto Rond\xF3n","Saravena","Tame"],datasets:[{data:i.data.dataReportes,backgroundColor:[a.getPropertyValue("--blue-500"),a.getPropertyValue("--yellow-500"),a.getPropertyValue("--red-500"),a.getPropertyValue("--purple-500"),a.getPropertyValue("--orange-500"),a.getPropertyValue("--pink-500"),a.getPropertyValue("--green-500")],hoverBackgroundColor:[a.getPropertyValue("--blue-400"),a.getPropertyValue("--yellow-400"),a.getPropertyValue("--red-400"),a.getPropertyValue("--purple-400"),a.getPropertyValue("--orange-400"),a.getPropertyValue("--pink-400"),a.getPropertyValue("--green-400")],datalabels:{color:"white"}}]},this.options={plugins:{legend:{labels:{usePointStyle:!0,color:x}}}}},error:i=>{this.manageResponse.error(i)}})}getFechaInicioYFinMesActual(){let t=new Date,i=t.getFullYear(),a=t.getMonth()+1,x=new Date(i,a-1,1),I=new Date(i,a,0),_=z=>{let Ze=z.getFullYear().toString(),et=(z.getMonth()+1).toString().padStart(2,"0");return`${z.getDate().toString().padStart(2,"0")}/${et}/${Ze}`};this.formulario.patchValue({fechaInicio:_(x),fechaFin:_(I)}),this.getChartData()}};e.\u0275fac=function(i){return new(i||e)(u(E),u(F),u(ve))},e.\u0275cmp=h({type:e,selectors:[["app-grafica-municipios"]],decls:15,vars:13,consts:[[1,"card"],[3,"formGroup"],[1,"grid","p-fluid"],[1,"field","col-6","md:col-6"],["for","float-input-invalid"],["formControlName","fechaInicio","placeholder","Seleccione la fecha de inicio","dateFormat","dd/mm/yy","showIcon","true","inputId","fechaInicio",3,"onSelect","appendTo"],["campo","fechaInicio",3,"formulario"],["formControlName","fechaFin","placeholder","Seleccione la fecha fin","dateFormat","dd/mm/yy","showIcon","true","inputId","fechaFin",3,"onSelect","appendTo"],["campo","fechaFin",3,"formulario"],["type","polarArea",3,"data","options"]],template:function(i,a){i&1&&(n(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"label",4),l(5,"Fecha inicio"),r(),n(6,"p-calendar",5),y("onSelect",function(){return a.getChartData()}),r(),c(7,"app-validations-input",6),r(),n(8,"div",3)(9,"label",4),l(10,"Fecha fin"),r(),n(11,"p-calendar",7),y("onSelect",function(){return a.getChartData()}),r(),c(12,"app-validations-input",8),r()()(),c(13,"p-divider")(14,"p-chart",9),r()),i&2&&(s(),m("formGroup",a.formulario),s(5),te(O(11,Be)),m("appendTo","body"),s(),m("formulario",a.formulario),s(4),te(O(12,Be)),m("appendTo","body"),s(),m("formulario",a.formulario),s(2),m("data",a.data)("options",a.options))},dependencies:[G,xe,fe,de,ue,ge,he,ye,B]});let o=e;return o})();var dt=o=>({"chip-seleccionado":o});function ut(o,e){if(o&1){let p=P();n(0,"div",4),y("click",function(){let i=A(p).$implicit,a=S();return T(a.getChartData(i))})("keydown",function(){let i=A(p).$implicit,a=S();return T(a.getChartData(i))}),l(1),r()}if(o&2){let p=e.$implicit;m("ngClass",q(2,dt,p.seleccionado)),s(),R(" ",p.label," ")}}var Ue=(()=>{let e=class e{constructor(t,i){this.reporteFallaRepository=t,this.manageResponse=i,this.isLoading=!1,this.municipios=[{label:"General",value:"TODOS",seleccionado:!0},{label:"Arauca",value:"ARAUCA",seleccionado:!1},{label:"Arauquita",value:"ARAUQUITA",seleccionado:!1},{label:"Cravo Norte",value:"CRAVO NORTE",seleccionado:!1},{label:"Fortul",value:"FORTUL",seleccionado:!1},{label:"Puerto Rond\xF3n",value:"PUERTO RONDON",seleccionado:!1},{label:"Saravena",value:"SARAVENA",seleccionado:!1},{label:"Tame",value:"TAME",seleccionado:!1}]}ngOnInit(){this.getChartData({label:"General",value:"TODOS",seleccionado:!0})}getChartData(t){t.seleccionado||(this.municipios.forEach(i=>i.seleccionado=!1),t.seleccionado=!0),this.municipio=t.label,this.isLoading=!0,this.reporteFallaRepository.getGraficaMeses(t.value).subscribe({next:i=>{let a=getComputedStyle(document.documentElement);this.data={labels:i.data.labels,datasets:[{label:"Reportes",backgroundColor:a.getPropertyValue("--green-500"),data:i.data.dataReportes,datalabels:{color:"white"}},{label:"Inactividad",backgroundColor:a.getPropertyValue("--red-500"),data:i.data.dataInactividad,datalabels:{color:"white"}}]},this.isLoading=!1},error:i=>{this.manageResponse.error(i),this.isLoading=!1}})}};e.\u0275fac=function(i){return new(i||e)(u(E),u(F))},e.\u0275cmp=h({type:e,selectors:[["app-grafica-meses"]],decls:9,vars:3,consts:[[1,"card"],[1,"chips"],["class","chip","tabindex","0",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["type","bar",3,"data"],["tabindex","0",1,"chip",3,"click","keydown","ngClass"]],template:function(i,a){i&1&&(n(0,"div",0)(1,"div",1),M(2,ut,2,4,"div",2),r(),c(3,"p-divider"),n(4,"h4"),l(5,"Reportes: "),n(6,"b"),l(7),r()(),c(8,"p-chart",3),r()),i&2&&(s(2),m("ngForOf",a.municipios),s(5),d(a.municipio),s(),m("data",a.data))},dependencies:[W,j,G,B],styles:[".chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.chip[_ngcontent-%COMP%]{background-color:#e0e0e0;padding:8px 16px;margin:4px;border-radius:16px;cursor:pointer}.chip-seleccionado[_ngcontent-%COMP%]{background-color:#074c91;color:#fff}"]});let o=e;return o})();var gt=o=>({"chip-seleccionado":o});function ht(o,e){if(o&1){let p=P();n(0,"div",4),y("click",function(){let i=A(p).$implicit,a=S();return T(a.getChartData(i))})("keydown",function(){let i=A(p).$implicit,a=S();return T(a.getChartData(i))}),l(1),r()}if(o&2){let p=e.$implicit;m("ngClass",q(2,gt,p.seleccionado)),s(),R(" ",p.label," ")}}var ze=(()=>{let e=class e{constructor(t,i){this.reporteFallaRepository=t,this.manageResponse=i,this.isLoading=!1,this.municipios=[{label:"General",value:"TODOS",seleccionado:!0},{label:"Arauca",value:"ARAUCA",seleccionado:!1},{label:"Arauquita",value:"ARAUQUITA",seleccionado:!1},{label:"Cravo Norte",value:"CRAVO NORTE",seleccionado:!1},{label:"Fortul",value:"FORTUL",seleccionado:!1},{label:"Puerto Rond\xF3n",value:"PUERTO RONDON",seleccionado:!1},{label:"Saravena",value:"SARAVENA",seleccionado:!1},{label:"Tame",value:"TAME",seleccionado:!1}]}ngOnInit(){this.getChartData({label:"General",value:"TODOS",seleccionado:!0})}getChartData(t){t.seleccionado||(this.municipios.forEach(i=>i.seleccionado=!1),t.seleccionado=!0),this.municipio=t.label,this.isLoading=!0,this.reporteFallaRepository.getGraficaDias(t.value).subscribe({next:i=>{let a=getComputedStyle(document.documentElement),x=a.getPropertyValue("--text-color"),I=a.getPropertyValue("--text-color-secondary"),_=a.getPropertyValue("--surface-border");this.data={labels:i.data.labels,datasets:[{label:"Reporte",backgroundColor:a.getPropertyValue("--green-500"),borderColor:a.getPropertyValue("--green-500"),data:i.data.dataReportes,datalabels:{color:"white"}},{label:"Inactividad",backgroundColor:a.getPropertyValue("--red-500"),borderColor:a.getPropertyValue("--red-500"),data:i.data.dataInactividad,datalabels:{color:"white"}}]},this.options={indexAxis:"y",maintainAspectRatio:!1,aspectRatio:.8,plugins:{legend:{labels:{color:x}}},scales:{x:{ticks:{color:I,font:{weight:500}},grid:{color:_,drawBorder:!1}},y:{ticks:{color:I},grid:{color:_,drawBorder:!1}}}},this.isLoading=!1},error:i=>{this.manageResponse.error(i),this.isLoading=!1}})}};e.\u0275fac=function(i){return new(i||e)(u(E),u(F))},e.\u0275cmp=h({type:e,selectors:[["app-grafica-dias"]],decls:9,vars:4,consts:[[1,"card"],[1,"chips"],["class","chip","tabindex","0",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["type","bar",3,"data","options"],["tabindex","0",1,"chip",3,"click","keydown","ngClass"]],template:function(i,a){i&1&&(n(0,"div",0)(1,"div",1),M(2,ht,2,4,"div",2),r(),c(3,"p-divider"),n(4,"h4"),l(5,"Reportes: "),n(6,"b"),l(7),r()(),c(8,"p-chart",3),r()),i&2&&(s(2),m("ngForOf",a.municipios),s(5),d(a.municipio),s(),m("data",a.data)("options",a.options))},dependencies:[W,j,G,B],styles:[".chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.chip[_ngcontent-%COMP%]{background-color:#e0e0e0;padding:8px 16px;margin:4px;border-radius:16px;cursor:pointer}.chip-seleccionado[_ngcontent-%COMP%]{background-color:#074c91;color:#fff}"]});let o=e;return o})();function bt(o,e){if(o&1&&(n(0,"div"),l(1),r()),o&2){let p=e.$implicit;s(),d(p.message)}}function Ct(o,e){if(o&1&&(n(0,"div",9),M(1,bt,2,1,"div",10),r()),o&2){let p=S();s(),m("ngForOf",p.messagesConsole)}}var Ye=(()=>{let e=class e{constructor(t,i){this.reporteFallaRepository=t,this.manageResponse=i,this.apiBotActivo=!0,this.apiMiEnelarActivo=!0,this.messagesConsole=[],this.getEstadoPago=!1,this.getEstadoSuspencion=!1}ngOnInit(){this.pingApiBot(),this.pingApiMiEnelar("getEstadoPago"),this.pingApiMiEnelar("getEstadoSuspencion"),this.cargarDatosCadaMinuto()}cargarDatosCadaMinuto(){setInterval(()=>{this.messagesConsole=[],this.pingApiBot(),this.pingApiMiEnelar("getEstadoPago"),this.pingApiMiEnelar("getEstadoSuspencion"),this.getFechaActualFormato()},6e4)}pingApiMiEnelar(t){this.reporteFallaRepository.pingApiMiEnelar(t).subscribe({next:i=>{i.status===200&&(t==="getEstadoPago"?this.getEstadoPago=!0:this.getEstadoSuspencion=!0,this.getEstadoPago&&this.getEstadoSuspencion&&(this.apiMiEnelarActivo=!0,this.messagesConsole=[]))},error:i=>{console.log(i),t==="getEstadoPago"?this.messagesConsole.push({message:"Error al obtener estado de pago"}):this.messagesConsole.push({message:"Error al obtener estado de suspensi\xF3n"}),this.apiMiEnelarActivo=!1,this.manageResponse.error(i)}})}pingApiBot(){this.reporteFallaRepository.pingApiBot().subscribe({next:t=>{t.status===200&&(this.apiBotActivo=!0)},error:t=>{t.status===404?this.apiBotActivo=!0:(this.apiBotActivo=!1,this.manageResponse.error(t))}})}getFechaActualFormato(){let t=new Date,i=t.getFullYear().toString(),a=(t.getMonth()+1).toString().padStart(2,"0"),x=t.getDate().toString().padStart(2,"0"),I=t.getHours().toString().padStart(2,"0"),_=t.getMinutes().toString().padStart(2,"0");return`${i}-${a}-${x} ${I}:${_}`}};e.\u0275fac=function(i){return new(i||e)(u(E),u(F))},e.\u0275cmp=h({type:e,selectors:[["app-actividad-bot"]],decls:29,vars:13,consts:[[1,"grid"],[1,"col-3","md:col-3"],[1,"card"],["src","assets/images/bot/EnerBot.png","alt","EnerBot","id","enerbot",1,"responsive-image"],[1,"status"],["class","console",4,"ngIf"],[1,"col-9","md:col-9"],[1,"col-5","md:col-5"],[1,"col-7","md:col-7"],[1,"console"],[4,"ngFor","ngForOf"]],template:function(i,a){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"h5")(4,"b"),l(5),V(6,"dateFormat"),V(7,"horaFormat"),r()(),c(8,"img",3),n(9,"div",4),c(10,"span"),n(11,"p")(12,"b"),l(13,"ENERBOT"),r(),l(14),r()(),n(15,"div",4),c(16,"span"),n(17,"p")(18,"b"),l(19,"MiEnelar"),r(),l(20),r()(),M(21,Ct,2,1,"div",5),r()(),n(22,"div",6),c(23,"app-grafica-dias"),r()(),n(24,"div",0)(25,"div",7),c(26,"app-grafica-municipios"),r(),n(27,"div",8),c(28,"app-grafica-meses"),r()()),i&2&&(s(5),re("",N(6,9,a.getFechaActualFormato())," - ",N(7,11,a.getFechaActualFormato()),""),s(5),ie(a.apiBotActivo?"circle-online":"circle-offline"),s(4),R(" ",a.apiBotActivo?"EN LINEA":"FUERA DE SERVICIO",""),s(2),ie(a.apiMiEnelarActivo?"circle-online":"circle-offline"),s(4),R(" ",a.apiMiEnelarActivo?"EN LINEA":"FUERA DE SERVICIO",""),s(),m("ngIf",a.messagesConsole.length>0))},dependencies:[j,ne,$e,Ue,ze,Q,K],styles:[".responsive-image[_ngcontent-%COMP%]{width:100%;object-fit:cover;background-color:#fff;border-radius:8px}.status[_ngcontent-%COMP%]{display:flex;align-items:center}.circle-online[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:50%;background-color:green;margin-right:5px}.circle-offline[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:50%;background-color:red;margin-right:5px}.console[_ngcontent-%COMP%]{background-color:#333;color:green;border-radius:5px;padding:10px;margin-top:8px}"]});let o=e;return o})();var He=(()=>{let e=class e{constructor(t,i){this.reporteFallaRepository=t,this.manageResponse=i,this.page=C.page,this.pageSize=C.pageSize,this.loadingTable=!1}ngOnInit(){this.getReporteFallas(),this.inizialize()}inizialize(){this.items=[{label:"Bot"},{label:"Reporte de fallas"}],this.home={icon:"pi pi-home",routerLink:"/"}}getReporteFallas(){this.loadingTable=!0,this.reporteFallaRepository.getReporteFallas(this.page,this.pageSize).subscribe({next:t=>{this.reporteFallas=t.data,this.totalRecords=t.totalRecords,this.loadingTable=!1},error:t=>{this.manageResponse.error(t),this.loadingTable=!1}})}paginate(t){this.page=t.page+1,this.pageSize=t.rows,this.getReporteFallas()}};e.\u0275fac=function(i){return new(i||e)(u(E),u(F))},e.\u0275cmp=h({type:e,selectors:[["app-reporte-fallas"]],decls:7,vars:5,consts:[[3,"model","home"],[1,"card","mt-5","p-3"],[1,"mt-3"],[3,"setPaginate","reporteFallas","totalRecords","getLoadingTable"]],template:function(i,a){i&1&&(c(0,"p-toast")(1,"p-breadcrumb",0),n(2,"div",1),c(3,"app-actividad-bot"),r(),n(4,"div",1)(5,"div",2)(6,"app-table-reporte-fallas",3),y("setPaginate",function(I){return a.paginate(I)}),r()()()),i&2&&(s(),m("model",a.items)("home",a.home),s(5),m("reporteFallas",a.reporteFallas)("totalRecords",a.totalRecords)("getLoadingTable",a.loadingTable))},dependencies:[we,_e,je,Ye]});let o=e;return o})();var St=[{path:"",component:He}],qe=ce.forChild(St);var We=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,Te,Ce,w,Me,me,X,J,Ve]});let o=e;return o})();var Qe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,D,Fe,be,Se,k]});let o=e;return o})();var Je=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,D,w,k]});let o=e;return o})();var Ke=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,D,w,k]});let o=e;return o})();var Xe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,D,w,Qe,Je,Ke,X]});let o=e;return o})();var Ki=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=v({type:e}),e.\u0275inj=g({imports:[b,qe,J,De,Oe,Pe,We,Xe]});let o=e;return o})();export{Ki as ReporteFallasModule};