mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
117 KiB
JavaScript
1 line
117 KiB
JavaScript
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[1858,6527,5763,2417,3756,6055,5457,1087,4413,5183,5802,9391,1485,9074,4176,9406],{42482:function(e,t,n){var o,i,a;!function(r){if("object"==typeof e.exports){var s=r(0,t);void 0!==s&&(e.exports=s)}else i=[n,t],void 0===(a="function"==typeof(o=r)?o.apply(t,i):o)||(e.exports=a)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=void 0;t.default=["pt",[["AM","PM"],n,n],n,[["D","S","T","Q","Q","S","S"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xe1b."],["domingo","segunda-feira","ter\xe7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xe1bado"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xe1b."]],n,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],["janeiro","fevereiro","mar\xe7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]],n,[["a.C.","d.C."],n,["antes de Cristo","depois de Cristo"]],0,[6,0],["dd/MM/y","d 'de' MMM 'de' y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",n,n,n],[",",".",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4\xa0#,##0.00","#E0"],"BRL","R$","Real brasileiro",{AUD:["AU$","$"],JPY:["JP\xa5","\xa5"],PTE:["Esc."],RON:[n,"L"],SYP:[n,"S\xa3"],THB:["\u0e3f"],TWD:["NT$"],USD:["US$","$"]},"ltr",function(e){var t=Math.floor(Math.abs(e));return t===Math.floor(t)&&t>=0&&t<=1?1:5}]})},61858:function(e,t,n){"use strict";n.r(t),n.d(t,{AgendaPageModule:function(){return an}});var o=n(37716),i=n(38583),a=n(3679),r=n(35957),s=n(39895),c=n(64762),d=n(87732),l=n(86807),p=n(44940),g=n(32743),h=n(59326),m=n(313),v=n(90104);let u=(()=>{class e extends m.m${dayViewHour({date:e,locale:t}){return(0,i.p6)(e,"HH",t)}weekViewHour({date:e,locale:t}){return this.dayViewHour({date:e,locale:t})}}return e.\u0275fac=function(){let t;return function(n){return(t||(t=o.n5z(e)))(n||e)}}(),e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac}),e})();var f=n(56410);class C{constructor(){}EventEndDateTreatment({startTime:e,endTime:t}){const n=new Date(e).toLocaleDateString(),o=new Date(t).toLocaleDateString(),i=new Date(t).getMinutes(),a=new Date(t).getHours();return n<o&&i+a==0?((t=new Date(t)).setSeconds(t.getSeconds()-1),new Date(t)):new Date(t)}filterProfile(e,t){return e.filter(e=>e.profile==t)}getEventInsideRange(e,t,n){return e.filter(e=>new Date(t).getTime()<=new Date(e.startTime).getTime()&&new Date(n).getTime()>=new Date(e.endTime).getTime())}daysBetween(){}list(e,t,n,o,i){return"all"!=t&&(e=this.filterProfile(e,t)),e=this.getEventInsideRange(e,n,o),e=this.encapsulation(e,"md"==t?"mdgpr":"pr"),this.display(e)}display(e){let t={};return e.forEach((e,n)=>{var o=new Date(e.start),i=this.EventEndDateTreatment({startTime:o,endTime:e.end});const a=new Date(e.start).getDate().toString().padStart(2,"0");if(e.manyDays=!1,e.todayOnly=new Date(e.start).toLocaleDateString()==new Date(e.end).toLocaleDateString(),t.hasOwnProperty(a)||(t[a]=[]),new Date(o).toLocaleDateString()!=new Date(i).toLocaleDateString()){const n=Math.abs(i-o),r=Math.ceil(n/864e5);if(r<=150&&!e.event.IsAllDayEvent)if(r>=1){const n=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},startMany:!0,endMany:!1,middle:!1});t[a].push(n);let r=1;for(;o.getFullYear()!=i.getFullYear()||o.getMonth()!=i.getMonth()||o.getDate()!=i.getDate();){const n=o.setDate(o.getDate()+r);let a=new Date(n).getDate().toString().padStart(2,"0");if(e.other=!0,e.start=n,t.hasOwnProperty(a)||(t[a]=[]),o.getFullYear()==i.getFullYear()&&o.getMonth()==i.getMonth()&&o.getDate()==i.getDate()){const n=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},Subject:e.Subject,startMany:!1,endMany:!0,middle:!1});t[a].push(n)}else{const n=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},Subject:e.Subject,startMany:!1,endMany:!0,middle:!0});t[a].push(n)}}}else t[a].push(e);else t[a].push(e)}t[a].push(e)}),setTimeout(()=>{document.querySelectorAll(".EventListBox-container .EventListBox").forEach(e=>{e.parentElement.style.display=0==e.childElementCount?"none":"block"})},10),t}encapsulation(e,t){let n=[];return e.forEach((e,o)=>{n.push({start:new Date(e.StartDate||e.startTime),end:new Date(e.EndDate||e.endTime),color:{primary:"#0000",secondary:"#0000"},id:e.EventId||e.id,index:o,profile:t,CalendarName:e.calendarName,event:e.event})}),n}}var x=n(80106),w=n(25970),M=n(39075),Z=n(37556),b=n(72458),P=n(84465),A=n(2527),E=n(66096);let _=(()=>{class e{constructor(e){this.localstoreService=e,this._eventSource=[],this.keyName=(0,A.SHA1)(this.constructor.name+"eventSource").toString();let t=e.get(this.keyName,[]);setTimeout(()=>{t.forEach((e,t)=>{this._eventSource.push({title:e.title,startTime:new Date(e.startTime),endTime:new Date(e.endTime),allDay:e.allDay,event:e.event,calendarName:e.calendarName,profile:e.profile,id:e.id})})},10)}ResetList(e){this._eventSource=e,setTimeout(()=>{this.localstoreService.set(this.keyName,this._eventSource)},10)}get eventSource(){return this._eventSource}removeRange(e,t,n){this._eventSource=this._eventSource.filter(o=>!(new Date(e).getTime()<=new Date(o.startTime).getTime()&&new Date(t).getTime()>=new Date(o.endTime).getTime()&&o.profile==n))}pushEvent(e,t){let n=[];e.forEach((e,o)=>{n.push({title:e.Subject,startTime:new Date(e.StartDate),endTime:new Date(e.EndDate),allDay:!1,event:e,calendarName:e.CalendarName,profile:t,id:e.EventId})});let o=this._eventSource.concat(n);const i=o.map(e=>e.id),a=o.filter(({id:e},t)=>!i.includes(e,t+1));this._eventSource=a,setTimeout(()=>{this.localstoreService.set(this.keyName,this._eventSource)},10)}}return e.\u0275fac=function(t){return new(t||e)(o.LFG(E.L))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var T=n(962),O=n(30105),y=n(94575),D=n(4528),S=n(16738),q=n(20985),k=n(98295),I=n(67441),N=n(49983),J=n(25653),U=n(43220);const L=["picker"],Y=["fim"],H=["inicio"],Q=["picker1"];function R(e,t){1&e&&o._UZ(0,"ion-progress-bar",69)}function F(e,t){1&e&&(o.TgZ(0,"div"),o._uU(1," Campo obrigat\xf3rio. "),o.qZA())}function j(e,t){1&e&&(o.TgZ(0,"div"),o._uU(1," O campo deve ter pelo menos 4 caracteres. "),o.qZA())}function G(e,t){if(1&e&&(o.TgZ(0,"div",71),o.YNc(1,F,2,0,"div",10),o.YNc(2,j,2,0,"div",10),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Q6J("ngIf",null==e.Form.get("Subject").errors?null:e.Form.get("Subject").errors.required),o.xp6(1),o.Q6J("ngIf",null==e.Form.get("Subject").errors?null:e.Form.get("Subject").errors.minlength)}}function B(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,G,3,2,"div",70),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngIf",e.Form.get("Subject").invalid)}}function z(e,t){1&e&&(o.TgZ(0,"div"),o._uU(1," Campo obrigat\xf3rio. "),o.qZA())}function $(e,t){1&e&&(o.TgZ(0,"div"),o._uU(1," O campo deve ter pelo menos 4 caracteres. "),o.qZA())}function V(e,t){if(1&e&&(o.TgZ(0,"div",71),o.YNc(1,z,2,0,"div",10),o.YNc(2,$,2,0,"div",10),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Q6J("ngIf",null==e.Form.get("Location").errors?null:e.Form.get("Location").errors.required),o.xp6(1),o.Q6J("ngIf",null==e.Form.get("Location").errors?null:e.Form.get("Location").errors.minlength)}}function W(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,V,3,2,"div",70),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngIf",e.Form.get("Location").invalid)}}function X(e,t){if(1&e&&(o.TgZ(0,"mat-option",72),o._uU(1),o.qZA()),2&e){const e=t.$implicit;o.s9C("value",e.Code),o.xp6(1),o.hij(" ",e.Description," ")}}function K(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",73),o.TgZ(1,"div",55),o.TgZ(2,"div",13),o._UZ(3,"ion-icon",17),o.qZA(),o.TgZ(4,"div",74),o.NdJ("click",function(){return o.CHM(e),o.oxw().openLastOccurrence()}),o.TgZ(5,"mat-form-field",75),o._UZ(6,"input",76),o._UZ(7,"mat-datepicker-toggle",77),o._UZ(8,"ngx-mat-datetime-picker",31,78),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.MAs(9),t=o.oxw();o.xp6(6),o.Q6J("ngxMatDatetimePicker",e)("formControl",t.dateControlOccurrence)("disabled",t.disabled),o.xp6(1),o.Q6J("for",e),o.xp6(1),o.Q6J("showSpinners",t.showSpinners)("showSeconds",t.showSeconds)("stepHour",t.stepHour)("stepMinute",t.stepMinute)("stepSecond",t.stepSecond)("touchUi",t.touchUi)}}function ee(e,t){1&e&&(o.TgZ(0,"ion-label",79),o._uU(1,"Adicionar intervenientes"),o.qZA())}function te(e,t){if(1&e&&(o.TgZ(0,"ion-label"),o._uU(1),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Oqu(e.Name)}}function ne(e,t){1&e&&(o.TgZ(0,"ion-label",79),o._uU(1,"Com conhecimento"),o.qZA())}function oe(e,t){if(1&e&&(o.TgZ(0,"ion-label"),o._uU(1),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Oqu(e.Name)}}function ie(e,t){1&e&&(o.TgZ(0,"span",91),o._uU(1," Correspondencia "),o.qZA())}function ae(e,t){1&e&&(o.TgZ(0,"span",91),o._uU(1," AccoesPresidenciais "),o.qZA())}function re(e,t){1&e&&(o.TgZ(0,"span",91),o._uU(1," ArquivoDespachoElect "),o.qZA())}function se(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"ion-list",82),o.TgZ(1,"ion-item",83),o.TgZ(2,"ion-label",83),o.TgZ(3,"p",84),o.TgZ(4,"span",85),o._uU(5),o.qZA(),o.YNc(6,ie,2,0,"span",86),o.YNc(7,ae,2,0,"span",86),o.YNc(8,re,2,0,"span",86),o.TgZ(9,"span",87),o.NdJ("click",function(){o.CHM(e);const t=o.oxw(),n=t.$implicit,i=t.index;return o.oxw().deleteAttachment(n.Id,i)}),o._UZ(10,"ion-icon",88),o.qZA(),o.qZA(),o.TgZ(11,"p"),o.TgZ(12,"span",89),o._uU(13),o.qZA(),o.TgZ(14,"span",90),o._uU(15),o.ALo(16,"date"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw().$implicit;o.xp6(5),o.Oqu(e.SourceName),o.xp6(1),o.Q6J("ngIf","8"==e.ApplicationId),o.xp6(1),o.Q6J("ngIf","386"==e.ApplicationId),o.xp6(1),o.Q6J("ngIf","361"==e.ApplicationId),o.xp6(5),o.Oqu(e.Stakeholders),o.xp6(2),o.hij(" ",o.xi3(16,6,e.CreateDate,"dd-MM-yyyy HH:mm")," ")}}function ce(e,t){if(1&e&&(o.TgZ(0,"div",80),o.YNc(1,se,17,9,"ion-list",81),o.qZA()),2&e){const e=t.$implicit;o.xp6(1),o.Q6J("ngIf",!e.remove)}}let de=(()=>{class e{constructor(e,t,n,i,r){this.modalController=e,this.eventsService=t,this.alertController=n,this.attachmentsService=i,this.toastService=r,this.segment="true",this.loadedEventAttachments=[],this.dateControlOccurrence=new a.NI(S("DD MM YYYY hh")),this.disabled=!1,this.showSpinners=!0,this.showSeconds=!1,this.touchUi=!1,this.enableMeridian=!1,this.minDate=(new Date).toISOString().slice(0,10),this.endMinDate=new Date((new Date).getTime()+9e5).toISOString().slice(0,10),this.stepHour=1,this.stepMinute=5,this.stepSecond=5,this.validateFrom=!1,this.clearContact=new o.vpe,this.openAttendeesComponent=new o.vpe,this.closeComponent=new o.vpe,this.setIntervenient=new o.vpe,this.setIntervenientCC=new o.vpe,this.clearPostEvent=new o.vpe,this.dateControlStart=new a.NI(S("DD MM YYYY hh")),this.dateControlEnd=new a.NI(S("DD MM YYYY hh")),this.showLoader=!1,this.options=[{value:!0,label:"True"},{value:!1,label:"False"}],this.listColors=["primary","accent","warn"],this.stepHours=[1,2,3,4,5],this.stepMinutes=[1,5,10,15,20,25],this.stepSeconds=[1,5,10,15,20,25]}get dateStart(){return this.dateControlStart.value}get dateEnd(){return this.dateControlEnd.value}get dateOccurrence(){return this.dateControlOccurrence.value}ngOnInit(){this.dateControlOccurrence=new a.NI(S(this.postEvent.EventRecurrence.LastOccurrence)),this.restoreTemporaryData()||(this.postEvent&&this.postEvent.Body&&"string"==typeof this.postEvent.Body.Text&&(this.postEvent.Body.Text=this.postEvent.Body.Text.replace(/<[^>]+>/g,"")),null!=this.postEvent.Attendees&&this.postEvent.Attendees.forEach(e=>{e.IsRequired?this.taskParticipants.push(e):this.taskParticipantsCc.push(e)}),this.taskParticipants=(0,p.removeDuplicate)(this.taskParticipants),this.taskParticipantsCc=(0,p.removeDuplicate)(this.taskParticipantsCc),this.setIntervenient.emit(this.taskParticipants),this.setIntervenientCC.emit(this.taskParticipantsCc),this.isEventEdited=!1,this.isRecurring=0==this.postEvent.IsRecurring?"N\xe3o se repete":"Repete"),this.getAttachments(this.postEvent.EventId),this.restoreDatepickerData(),this.getRecurrenceTypes(),this.postEvent.EventRecurrence.Type=this.postEvent.EventRecurrence.Type.toString(),setTimeout(()=>{this.postEvent.EventRecurrence.Type=this.postEvent.EventRecurrence.Type.toString(),console.log(this.postEvent.EventRecurrence.Type)},1e3)}close(){this.closeComponent.emit(),this.setIntervenient.emit([]),this.setIntervenientCC.emit([]),this.clearContact.emit(),this.deleteTemporaryData()}getRecurrenceTypes(){this.eventsService.getRecurrenceTypes().subscribe(e=>{console.log(e),this.recurringTypes=e})}runValidation(){this.validateFrom=!0}injectValidation(){if("number"==typeof this.postEvent.EventRecurrence.Type){const e=this.postEvent.EventRecurrence.Type.toString();this.postEvent.EventRecurrence.Type=e}this.Form=new a.cw({Subject:new a.NI(this.postEvent.Subject,[a.kI.required]),Location:new a.NI(this.postEvent.Location,[a.kI.required]),CalendarName:new a.NI(this.postEvent.CalendarName),Categories:new a.NI(this.postEvent.Category,[a.kI.required]),dateStart:new a.NI(this.dateStart,[a.kI.required]),dateEnd:new a.NI(this.dateEnd,[a.kI.required]),dateOccurrence:new a.NI(this.dateOccurrence,[a.kI.required]),participantes:new a.NI(this.taskParticipants,[]),Date:new a.NI(new Date(this.dateControlStart.value).toLocaleString()<new Date(this.dateControlEnd.value).toLocaleString()?"ok":null,[a.kI.required])})}openInicio(){let e=document.querySelector("#new-inicio");e&&(console.log(e),e.click())}openFim(){let e=document.querySelector("#new-fim");e&&e.click()}openLastOccurrence(){let e=document.querySelector("#last-occurrence");e&&e.click()}onSelectedRecurringChanged(e){console.log(e),e.length>1&&(console.log(e.filter(e=>"-1"!=e)),this.postEvent.EventRecurrence.Type=e.filter(e=>"-1"!=e)),0==e.length&&(this.postEvent.EventRecurrence.Type="-1")}save(){return(0,c.mG)(this,void 0,void 0,function*(){if(this.injectValidation(),this.runValidation(),this.Form.invalid)return!1;this.getDatepickerData(),this.postEvent.Attendees=this.taskParticipants.concat(this.taskParticipantsCc),this.postEvent.EventRecurrence.hasOwnProperty("Type")||(this.postEvent.EventRecurrence.Type="-1"),null==this.postEvent.EventRecurrence.Type&&(this.postEvent.EventRecurrence.Type="-1"),this.showLoader=!0,yield this.eventsService.editEvent(this.postEvent,2,3).subscribe(()=>(0,c.mG)(this,void 0,void 0,function*(){if(this.initCalendarName!=this.postEvent.CalendarName){let t={EventId:this.postEvent.EventId,CalendarDestinationName:this.postEvent.CalendarName};try{yield this.eventsService.changeAgenda(t).toPromise()}catch(e){}}this.showLoader=!1,this.toastService.successMessage()}),e=>{this.showLoader=!1,this.toastService.badRequest()}),this.clearPostEvent.emit(),this.deleteTemporaryData(),this.close(),this.saveDocument()})}saveDocument(){this.loadedEventAttachments.forEach(e=>{const t=e.remove;if("add"==e.Id){const t={SourceTitle:e.SourceName,ParentId:this.postEvent.EventId,Source:"1",SourceId:e.SourceId,ApplicationId:e.ApplicationId.toString(),Id:"0",Link:"",SerialNumber:""};this.attachmentsService.setEventAttachmentById(t).subscribe(()=>{this.getAttachments(this.postEvent.EventId)})}else t&&this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe(e=>{})})}addParticipants(){return(0,c.mG)(this,void 0,void 0,function*(){this.saveTemporaryData(),this.openAttendeesComponent.emit({type:"intervenient"}),this.clearContact.emit()})}addParticipantsCc(){return(0,c.mG)(this,void 0,void 0,function*(){this.saveTemporaryData(),this.openAttendeesComponent.emit({type:"CC"}),this.clearContact.emit()})}getDatepickerData(){this.postEvent&&(this.postEvent.StartDate=this.dateStart,this.postEvent.EndDate=this.dateEnd,this.postEvent.EventRecurrence.LastOccurrence=this.dateOccurrence)}restoreDatepickerData(){this.postEvent&&(this.dateControlStart=new a.NI(S(this.postEvent.StartDate)),this.dateControlEnd=new a.NI(S(this.postEvent.EndDate)))}saveTemporaryData(){this.getDatepickerData(),window["temp.path:/home/agenda/edit-event.component.ts"]={postEvent:this.postEvent,eventBody:this.eventBody,segment:this.segment}}restoreTemporaryData(){const e=window["temp.path:/home/agenda/edit-event.component.ts"];return"{}"!=JSON.stringify(e)&&null!=e&&(this.postEvent=e.postEvent,this.eventBody=e.eventBody,this.segment=e.segment,this.restoreDatepickerData(),!0)}deleteTemporaryData(){window["temp.path:/home/agenda/edit-event.component.ts"]={}}getAttachments(e){this.attachmentsService.getAttachmentsById(e).subscribe(e=>{this.loadedEventAttachments=e,console.log("res",e)})}deleteAttachment(e,t){"add"==this.loadedEventAttachments[t].Id?this.loadedEventAttachments=this.loadedEventAttachments.filter((e,n)=>n!=t):this.loadedEventAttachments[t].remove=!0}getDoc(){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:D.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});yield e.present(),e.onDidDismiss().then(e=>(0,c.mG)(this,void 0,void 0,function*(){if(e){const t=e.data,n={SourceName:t.selected.Assunto,ParentId:this.postEvent.EventId,SourceId:t.selected.Id,Stakeholders:!1,ApplicationId:t.selected.ApplicationType.toString(),CreateDate:!1,Id:"add",SourceTitle:t.selected.Assunto,Source:"1",Link:"",SerialNumber:""};console.log(this.loadedEventAttachments),this.loadedEventAttachments.push(n)}}))})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(r.IN),o.Y36(x.n),o.Y36(r.Br),o.Y36(q.o),o.Y36(P.k))},e.\u0275cmp=o.Xpm({type:e,selectors:[["app-edit-event"]],viewQuery:function(e,t){if(1&e&&(o.Gf(L,5),o.Gf(Y,5),o.Gf(H,5),o.Gf(Q,5)),2&e){let e;o.iGM(e=o.CRH())&&(t.picker=e.first),o.iGM(e=o.CRH())&&(t.fim=e.first),o.iGM(e=o.CRH())&&(t.inicio=e.first),o.iGM(e=o.CRH())&&(t.picker1=e.first)}},inputs:{taskParticipants:"taskParticipants",taskParticipantsCc:"taskParticipantsCc",profile:"profile",selectedSegment:"selectedSegment",postEvent:"postEvent"},outputs:{clearContact:"clearContact",openAttendeesComponent:"openAttendeesComponent",closeComponent:"closeComponent",setIntervenient:"setIntervenient",setIntervenientCC:"setIntervenientCC",clearPostEvent:"clearPostEvent"},decls:126,vars:53,consts:[[1,"ion-no-border"],[1,"header-toolbar"],[1,"main-header"],[1,"title-content"],[1,"middle"],[1,"title"],["class","calendar-progress-bar","type","indeterminate",4,"ngIf"],[1,"main-content"],[1,"ion-item-container"],["placeholder","Assunto*",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"container-div"],[1,"ion-item-class-2","width-100","d-flex"],[1,"ion-icon-class"],["slot","start","src","assets/images/icons-location.svg"],[1,"ion-input-class","flex-grow-1"],["placeholder","Localiza\xe7\xe3o*",3,"ngModel","ngModelChange"],["slot","start","src","assets/images/icons-calendar.svg"],["appearance","none","floatLabel","never",1,"width-100"],["placeholder","Selecione agenda*",3,"ngModel","ngModelChange"],["value","Oficial"],["value","Pessoal"],["appearance","none","floatLabel","never","required","",1,"width-100"],["placeholder","Selecione o tipo de evento*","matInput","",3,"ngModel","ngModelChange"],["value","Reuni\xe3o"],["value","Viagem"],["value","Confer\xeancia"],["value","Encontro"],["appearance","none","floatLabel","never",1,"date-hour-picker"],["matInput","","placeholder","Choose a date",3,"ngxMatDatetimePicker","formControl","min","max","disabled"],["id","new-inicio","matSuffix","",3,"for"],[3,"showSpinners","showSeconds","stepHour","stepMinute","stepSecond","touchUi"],["picker1",""],["appearance","none","floatLabel","never","floatLabel","never",1,"date-hour-picker"],["id","new-fim","matSuffix","",3,"for"],[3,"showSpinners","showSeconds","stepHour","stepMinute","stepSecond"],["fim",""],[1,"container-div","d-flex"],["slot","start","src","assets/images/icons-refresh.svg"],["appearance","none","floatLabel","never","value","false","interface","action-sheet","required","",1,"width-100"],["placeholder","Selecione repeti\xe7\xe3o*",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","container-div width-100",4,"ngIf"],[1,"d-flex","width-100"],[1,"ion-item-class-2","width-100"],["slot","start","src","assets/images/icons-person.svg"],[1,"ion-input-class-no-height"],[1,"list-people"],["lines","none"],["class","list-people-title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"add-people"],[1,"btn-no-color","cursor-pointer",3,"click"],["slot","start","src","assets/images/icons-arrow-forward.svg",1,"font-35"],["slot","start","src","assets/images/icons-people-cc.svg"],[1,"ion-item-class-2","d-flex"],["slot","start","src","assets/images/icons-description.svg"],[1,"ion-input-class-no-height","width-100"],["placeholder","Detalhes","rows","6","cols","20",3,"ngModel","ngModelChange"],[1,"d-flex","container-div","width-100","ion-item-container-no-border","cursor-pointer",3,"click"],[1,"attach-icon"],["src","assets/images/icons-attach-doc.svg"],[1,"attach-document"],["class","d-flex container-div width-100",4,"ngFor","ngForOf"],[1,"width-100","d-flex","justify-space-between","px-20"],["slot","start"],["fill","clear","color","#061b52",1,"btn-cancel",3,"click"],["slot","end"],["fill","clear","color","#fff",1,"btn-ok",3,"click"],["type","indeterminate",1,"calendar-progress-bar"],["class","input-errror-message",4,"ngIf"],[1,"input-errror-message"],[3,"value"],[1,"container-div","width-100"],[1,"ion-input-class","flex-grow-1",3,"click"],[1,"date-hour-picker"],["matInput","","placeholder","Choose a date",3,"ngxMatDatetimePicker","formControl","disabled"],["id","last-occurrence","matSuffix","",3,"for"],["occurrrence",""],[1,"list-people-title"],[1,"d-flex","container-div","width-100"],["class","width-100 list",4,"ngIf"],[1,"width-100","list"],[1,"width-100"],[1,"d-flex","ion-justify-content-between"],[1,"attach-title-item"],["class","app-name",4,"ngIf"],[1,"close-button","text-black","cursor-pointer",3,"click"],["src","assets/images/icons-delete-25.svg",1,"font-20"],[1,"span-left"],[1,"span-right"],[1,"app-name"]],template:function(e,t){if(1&e&&(o.TgZ(0,"ion-header",0),o.TgZ(1,"ion-toolbar",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o.TgZ(4,"div",4),o.TgZ(5,"ion-label",5),o._uU(6,"Editar Evento"),o.qZA(),o.qZA(),o.qZA(),o.YNc(7,R,1,0,"ion-progress-bar",6),o.qZA(),o.qZA(),o.qZA(),o.TgZ(8,"ion-content"),o.TgZ(9,"div",7),o.TgZ(10,"div",8),o.TgZ(11,"ion-input",9),o.NdJ("ngModelChange",function(e){return t.postEvent.Subject=e}),o.qZA(),o.qZA(),o.YNc(12,B,2,1,"div",10),o.TgZ(13,"div",11),o.TgZ(14,"div",12),o.TgZ(15,"div",13),o._UZ(16,"ion-icon",14),o.qZA(),o.TgZ(17,"div",15),o.TgZ(18,"ion-input",16),o.NdJ("ngModelChange",function(e){return t.postEvent.Location=e}),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(19,W,2,1,"div",10),o.TgZ(20,"div",11),o.TgZ(21,"div",12),o.TgZ(22,"div",13),o._UZ(23,"ion-icon",17),o.qZA(),o.TgZ(24,"div",15),o.TgZ(25,"mat-form-field",18),o.TgZ(26,"mat-select",19),o.NdJ("ngModelChange",function(e){return t.postEvent.CalendarName=e}),o.TgZ(27,"mat-option",20),o._uU(28," Oficial "),o.qZA(),o.TgZ(29,"mat-option",21),o._uU(30," Pessoal "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(31,"div",11),o.TgZ(32,"div",12),o.TgZ(33,"div",13),o._UZ(34,"ion-icon",17),o.qZA(),o.TgZ(35,"div",15),o.TgZ(36,"mat-form-field",22),o.TgZ(37,"mat-select",23),o.NdJ("ngModelChange",function(e){return t.postEvent.Category=e}),o.TgZ(38,"mat-option",24),o._uU(39," Reuni\xe3o "),o.qZA(),o.TgZ(40,"mat-option",25),o._uU(41," Viagem "),o.qZA(),o.TgZ(42,"mat-option",26),o._uU(43," Confer\xeancia "),o.qZA(),o.TgZ(44,"mat-option",27),o._uU(45," Encontro "),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(46,"div",11),o.TgZ(47,"div",12),o.TgZ(48,"div",13),o._UZ(49,"ion-icon",17),o.qZA(),o.TgZ(50,"div",15),o.TgZ(51,"mat-form-field",28),o._UZ(52,"input",29),o._UZ(53,"mat-datepicker-toggle",30),o._UZ(54,"ngx-mat-datetime-picker",31,32),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(56,"div",11),o.TgZ(57,"div",12),o.TgZ(58,"div",13),o._UZ(59,"ion-icon",17),o.qZA(),o.TgZ(60,"div",15),o.TgZ(61,"mat-form-field",33),o._UZ(62,"input",29),o._UZ(63,"mat-datepicker-toggle",34),o._UZ(64,"ngx-mat-datetime-picker",35,36),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(66,"div",37),o.TgZ(67,"div",12),o.TgZ(68,"div",13),o._UZ(69,"ion-icon",38),o.qZA(),o.TgZ(70,"div",15),o.TgZ(71,"mat-form-field",39),o.TgZ(72,"mat-select",40),o.NdJ("ngModelChange",function(e){return t.postEvent.EventRecurrence.Type=e})("ngModelChange",function(e){return t.onSelectedRecurringChanged(e)}),o.YNc(73,X,2,2,"mat-option",41),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(74,K,10,10,"div",42),o.TgZ(75,"div",43),o.TgZ(76,"div",44),o.TgZ(77,"div",13),o._UZ(78,"ion-icon",45),o.qZA(),o.TgZ(79,"div",46),o.TgZ(80,"div",47),o.TgZ(81,"ion-item",48),o.TgZ(82,"ion-list"),o.YNc(83,ee,2,0,"ion-label",49),o.YNc(84,te,2,1,"ion-label",50),o.qZA(),o.qZA(),o.qZA(),o.TgZ(85,"div",51),o.TgZ(86,"button",52),o.NdJ("click",function(){return t.addParticipants()}),o._UZ(87,"ion-icon",53),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(88,"div",43),o.TgZ(89,"div",44),o.TgZ(90,"div",13),o._UZ(91,"ion-icon",54),o.qZA(),o.TgZ(92,"div",46),o.TgZ(93,"div",47),o.TgZ(94,"ion-item",48),o.TgZ(95,"ion-list"),o.YNc(96,ne,2,0,"ion-label",49),o.YNc(97,oe,2,1,"ion-label",50),o.qZA(),o.qZA(),o.qZA(),o.TgZ(98,"div",51),o.TgZ(99,"button",52),o.NdJ("click",function(){return t.addParticipantsCc()}),o._UZ(100,"ion-icon",53),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(101,"div",11),o.TgZ(102,"div",55),o.TgZ(103,"div",13),o._UZ(104,"ion-icon",56),o.qZA(),o.TgZ(105,"div",57),o.TgZ(106,"ion-textarea",58),o.NdJ("ngModelChange",function(e){return t.postEvent.Body.Text=e}),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(107,"div",59),o.NdJ("click",function(){return t.getDoc()}),o.TgZ(108,"ion-label"),o.TgZ(109,"div",60),o._UZ(110,"ion-icon",61),o.qZA(),o.TgZ(111,"div",62),o.TgZ(112,"ion-label"),o._uU(113,"Adicionar documentos"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.YNc(114,ce,2,1,"div",63),o.qZA(),o.qZA(),o.TgZ(115,"ion-footer",0),o.TgZ(116,"ion-toolbar",64),o.TgZ(117,"ion-buttons",65),o.TgZ(118,"button",66),o.NdJ("click",function(){return t.close()}),o.TgZ(119,"ion-label"),o._uU(120,"Cancelar"),o.qZA(),o.qZA(),o.qZA(),o._UZ(121,"ion-title"),o.TgZ(122,"ion-buttons",67),o.TgZ(123,"button",68),o.NdJ("click",function(){return t.save()}),o.TgZ(124,"ion-label"),o._uU(125,"Gravar"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.MAs(55),n=o.MAs(65);let i,a,r,s,c,d,l;o.xp6(7),o.Q6J("ngIf",t.showLoader),o.xp6(3),o.ekj("input-error",(null==t.Form||null==(i=t.Form.get("Subject"))?null:i.invalid)&&t.validateFrom),o.xp6(1),o.Q6J("ngModel",t.postEvent.Subject),o.xp6(1),o.Q6J("ngIf",t.Form&&t.validateFrom),o.xp6(5),o.ekj("input-error",(null==t.Form||null==(a=t.Form.get("Location"))?null:a.invalid)&&t.validateFrom),o.xp6(1),o.Q6J("ngModel",t.postEvent.Location),o.xp6(1),o.Q6J("ngIf",t.Form&&t.validateFrom),o.xp6(7),o.Q6J("ngModel",t.postEvent.CalendarName),o.xp6(9),o.ekj("input-error",(null==t.Form||null==(r=t.Form.get("Categories"))?null:r.invalid)&&t.validateFrom),o.xp6(2),o.Q6J("ngModel",t.postEvent.Category),o.xp6(13),o.ekj("input-error",(null==t.Form||null==(s=t.Form.get("Date"))?null:s.invalid)&&t.validateFrom),o.xp6(2),o.Q6J("ngxMatDatetimePicker",e)("formControl",t.dateControlStart)("min",t.minDate)("max",t.maxDate)("disabled",t.disabled),o.xp6(1),o.Q6J("for",e),o.xp6(1),o.Q6J("showSpinners",t.showSpinners)("showSeconds",t.showSeconds)("stepHour",t.stepHour)("stepMinute",t.stepMinute)("stepSecond",t.stepSecond)("touchUi",t.touchUi),o.xp6(6),o.ekj("input-error",(null==t.Form||null==(c=t.Form.get("Date"))?null:c.invalid)&&t.validateFrom),o.xp6(2),o.Q6J("ngxMatDatetimePicker",n)("formControl",t.dateControlEnd)("min",t.minDate)("max",t.maxDate)("disabled",t.disabled),o.xp6(1),o.Q6J("for",n),o.xp6(1),o.Q6J("showSpinners",t.showSpinners)("showSeconds",t.showSeconds)("stepHour",t.stepHour)("stepMinute",t.stepMinute)("stepSecond",t.stepSecond),o.xp6(8),o.Q6J("ngModel",t.postEvent.EventRecurrence.Type),o.xp6(1),o.Q6J("ngForOf",t.recurringTypes),o.xp6(1),o.Q6J("ngIf","-1"!=t.postEvent.EventRecurrence.Type),o.xp6(5),o.ekj("input-error",(null==t.Form||null==(d=t.Form.get("participantes"))?null:d.invalid)&&t.validateFrom),o.xp6(4),o.Q6J("ngIf",(null==t.taskParticipants?null:t.taskParticipants.length)<1),o.xp6(1),o.Q6J("ngForOf",t.taskParticipants),o.xp6(8),o.ekj("input-error",(null==t.Form||null==(l=t.Form.get("participantes"))?null:l.invalid)&&t.validateFrom),o.xp6(4),o.Q6J("ngIf",(null==t.taskParticipantsCc?null:t.taskParticipantsCc.length)<1),o.xp6(1),o.Q6J("ngForOf",t.taskParticipantsCc),o.xp6(9),o.Q6J("ngModel",t.postEvent.Body.Text),o.xp6(8),o.Q6J("ngForOf",t.loadedEventAttachments)}},directives:[r.Gu,r.sr,r.Q$,i.O5,r.W2,r.pK,r.j9,a.JJ,a.On,r.gu,k.KE,I.gD,b.ey,N.Nt,J.g2,a.Fj,a.oH,U.nW,k.R9,J.AB,i.sg,r.Ie,r.q_,r.g2,r.fr,r.Sm,r.wd,r.X7],pipes:[i.uU],styles:[".header-toolbar[_ngcontent-%COMP%], ion-content[_ngcontent-%COMP%]{--background:transparent}.header-toolbar[_ngcontent-%COMP%]{--opacity:1}.main-header[_ngcontent-%COMP%]{width:100%;height:100%;font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:hidden;padding:30px 20px 0;color:#000;transform:translate3d(0,1px,0)}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%]{margin:0 auto;padding:0!important;background:#fff}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%]{padding:0!important;float:left;margin:2.5px 0 0 5px}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px}.main-content[_ngcontent-%COMP%]{width:100%;height:100%;font-family:Roboto;margin:0 auto;background-color:#fff;padding:15px 20px 0}.main-content[_ngcontent-%COMP%] .ion-item-container[_ngcontent-%COMP%]{margin:15px auto;border:1px solid #ebebeb;border-radius:5px;padding-left:10px}.main-content[_ngcontent-%COMP%] .ion-item-container-no-border[_ngcontent-%COMP%]{width:100%;margin:0 auto;padding:0!important}.main-content[_ngcontent-%COMP%] .container-div[_ngcontent-%COMP%]{margin-bottom:15px}.main-content[_ngcontent-%COMP%] .ion-item-class-2[_ngcontent-%COMP%]{margin:0 auto}.main-content[_ngcontent-%COMP%] .ion-icon-class[_ngcontent-%COMP%]{width:45px;height:45px;float:left;padding:10px;font-size:25px}.main-content[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{padding-left:5px;margin-left:0}.main-content[_ngcontent-%COMP%] .ion-input-class[_ngcontent-%COMP%]{height:45px;border:1px solid #ebebeb;border-radius:5px;padding-left:5px;padding-right:10px;float:left}.main-content[_ngcontent-%COMP%] .ion-input-class-no-height[_ngcontent-%COMP%]{height:auto!important;border:1px solid #ebebeb;border-radius:5px;margin-bottom:15px;overflow:auto}.main-content[_ngcontent-%COMP%] .list-people[_ngcontent-%COMP%]{float:left}.main-content[_ngcontent-%COMP%] .add-people[_ngcontent-%COMP%]{width:45px;float:right;font-size:25px;padding:10px}.main-content[_ngcontent-%COMP%] .list-people-title[_ngcontent-%COMP%]{color:#a3a3a3}.main-content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.main-content[_ngcontent-%COMP%] .attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.main-content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{width:100%;font-size:15px;color:#0d89d1}.main-content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.main-content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.main-content[_ngcontent-%COMP%] .container-footer[_ngcontent-%COMP%]{margin:0 auto}.main-content[_ngcontent-%COMP%] .button-cancel[_ngcontent-%COMP%]{--background:#e0e9ee;--color:#061b52}.main-content[_ngcontent-%COMP%] .button-cancel[_ngcontent-%COMP%], .main-content[_ngcontent-%COMP%] .button-save[_ngcontent-%COMP%]{width:170px;height:44px;border-radius:22.5px;margin:10px}.main-content[_ngcontent-%COMP%] .button-save[_ngcontent-%COMP%]{--background:#42b9fe;--color:#fff}.main-content[_ngcontent-%COMP%] .text-input[_ngcontent-%COMP%]{width:100%;border:1px solid #ebebeb;margin:0 15px 15px 0;padding:0!important;border-radius:5px}.main-content[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{color:red;font-size:12px;font-weight:700;padding-bottom:20px}.main-content[_ngcontent-%COMP%] .span-color[_ngcontent-%COMP%]{color:red}.app-name[_ngcontent-%COMP%]{background:#42b9f2;border-radius:18px;text-align:center;display:flex;align-items:center;padding:0 5px;color:#fff;font-size:9pt;font-weight:500;height:19px;-webkit-border-radius:18px;-moz-border-radius:18px;-ms-border-radius:18px;-o-border-radius:18px}.close-button[_ngcontent-%COMP%]{display:none}.list[_ngcontent-%COMP%]:hover .app-name[_ngcontent-%COMP%]{display:none}.list[_ngcontent-%COMP%]:hover .close-button[_ngcontent-%COMP%]{display:block!important}.materia-top[_ngcontent-%COMP%]{padding-top:7px}"]}),e})();var le=n(18119),pe=n(23066),ge=n(97047),he=n(53760),me=n(28621);function ve(e,t){if(1&e&&(o.TgZ(0,"span",23),o._uU(1),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Oqu(e.loadedEvent.CalendarName)}}function ue(e,t){if(1&e&&(o.TgZ(0,"span",24),o._uU(1),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Oqu(e.loadedEvent.CalendarName)}}function fe(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,ve,2,1,"span",21),o.YNc(2,ue,2,1,"span",22),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngIf","Oficial"==e.loadedEvent.CalendarName),o.xp6(1),o.Q6J("ngIf","Pessoal"==e.loadedEvent.CalendarName)}}function Ce(e,t){if(1&e&&(o.TgZ(0,"span",27),o._uU(1),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Oqu(e.loadedEvent.CalendarName)}}function xe(e,t){if(1&e&&(o.TgZ(0,"span",28),o._uU(1),o.qZA()),2&e){const e=o.oxw(2);o.xp6(1),o.Oqu(e.loadedEvent.CalendarName)}}function we(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,Ce,2,1,"span",25),o.YNc(2,xe,2,1,"span",26),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngIf","Oficial"==e.loadedEvent.CalendarName),o.xp6(1),o.Q6J("ngIf","Pessoal"==e.loadedEvent.CalendarName)}}function Me(e,t){if(1&e&&(o.TgZ(0,"p"),o._uU(1),o.ALo(2,"date"),o.ALo(3,"date"),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.AsE("das ",o.xi3(2,2,e.loadedEvent.StartDate,"HH:mm")," \xe0s ",o.xi3(3,5,e.loadedEvent.EndDate,"HH:mm"),"")}}function Ze(e,t){if(1&e&&(o.TgZ(0,"p"),o._uU(1),o.ALo(2,"date"),o.ALo(3,"date"),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.AsE("",o.xi3(2,2,e.loadedEvent.StartDate,"d/M/yy")," - ",o.xi3(3,5,e.loadedEvent.StartDate,"dd/M/yy")," ")}}function be(e,t){1&e&&(o.TgZ(0,"p"),o._uU(1,"(N\xe3o se repete)"),o.qZA())}function Pe(e,t){1&e&&(o.TgZ(0,"p"),o._uU(1,"Repete"),o.qZA())}function Ae(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"p"),o._uU(2),o.qZA(),o.qZA()),2&e){const e=t.$implicit;o.xp6(2),o.Oqu(e.Name)}}function Ee(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"h5"),o._uU(2,"Intervenientes"),o.qZA(),o.TgZ(3,"ion-item",29),o.TgZ(4,"ion-label"),o.YNc(5,Ae,3,1,"div",30),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(5),o.Q6J("ngForOf",e.loadedEvent.Attendees)}}function _e(e,t){if(1&e&&(o.TgZ(0,"div"),o.TgZ(1,"h5"),o._uU(2,"Detalhes"),o.qZA(),o.TgZ(3,"ion-item",31),o._UZ(4,"div",32),o.qZA(),o._UZ(5,"div",18),o.qZA()),2&e){const e=o.oxw();o.xp6(4),o.Q6J("innerHTML",e.loadedEvent.Body.Text,o.oJD)}}function Te(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"li",36),o.TgZ(1,"ion-label",37),o.TgZ(2,"p",38),o.NdJ("click",function(){const t=o.CHM(e).$implicit;return o.oxw(2).viewDocument(t.SourceId)}),o.TgZ(3,"span",39),o._uU(4),o.qZA(),o.TgZ(5,"span",40),o._uU(6),o.qZA(),o.qZA(),o.TgZ(7,"div",41),o.TgZ(8,"span",42),o._uU(9),o.ALo(10,"date"),o.qZA(),o.qZA(),o.TgZ(11,"div",43),o.NdJ("click",function(){const t=o.CHM(e).index,n=o.oxw(2);return n.docIndex(t),n.openTaskOptions()}),o._UZ(12,"ion-icon",44),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=t.$implicit;o.xp6(4),o.Oqu(e.SourceName),o.xp6(2),o.Oqu(e.Stakeholders),o.xp6(3),o.Oqu(o.xi3(10,3,e.CreateDate,"dd-MM-yyyy HH:mm"))}}function Oe(e,t){if(1&e&&(o.TgZ(0,"div",33),o.TgZ(1,"h5"),o._uU(2,"Documentos Anexados"),o.qZA(),o.TgZ(3,"ion-list",34),o.YNc(4,Te,13,6,"li",35),o.qZA(),o.qZA()),2&e){const e=o.oxw();o.xp6(4),o.Q6J("ngForOf",e.loadedAttachments)}}let ye=(()=>{class e{constructor(e,t,n,i,a,r,s,c){this.eventsService=e,this.attachmentsService=t,this.alertController=n,this.iab=i,this.processes=a,this.modalController=r,this.popoverController=s,this.toastService=c,this.months=["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this.days=["Domingo","Segunda-feira","Ter\xe7a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S\xe1bado"],this.documents=[],this.dicIndex=0,this.viewEventDetailDismiss=new o.vpe,this.isEventEdited=!1,this.loadedEvent=new le.j,this.eventBody={BodyType:"1",Text:""},this.loadedEvent.Body=this.eventBody}ngOnInit(){this.loadEvent()}ngOnChanges(e){this.loadedAttachments=null,this.loadEvent()}toDateString(e){return new Date(e).toDateString()}openOptions(){}docIndex(e){this.dicIndex=e}close(){console.log(this.isEventEdited),this.viewEventDetailDismiss.emit({type:"close"})}loadEvent(){this.eventsService.getEvent(this.eventId).subscribe(e=>{console.log(e),this.loadedEvent=e,this.today=new Date(e.StartDate),this.customDate=this.days[this.today.getDay()]+", "+this.today.getDate()+" de "+this.months[this.today.getMonth()],this.getAttachments(this.loadedEvent.EventId)},e=>{console.log("errer"),this.viewEventDetailDismiss.emit({type:"close"}),this.toastService.badRequest(0==e.status?"N\xe3o \xe9 poss\xedvel visualizar este evento no modo offline":"Este evento j\xe1 n\xe3o existe na sua agenda")})}deleteEvent(){return(0,c.mG)(this,void 0,void 0,function*(){this.loadedEvent.IsRecurring||this.eventsService.deleteEvent(this.loadedEvent.EventId,0).subscribe(()=>(0,c.mG)(this,void 0,void 0,function*(){this.toastService.successMessage("Evento apagado"),this.close()}))})}deleteRecurringEvent(){return(0,c.mG)(this,void 0,void 0,function*(){const e=yield this.modalController.create({component:ge.L,componentProps:{},cssClass:"discart-expedient-modal"});yield e.present(),e.onDidDismiss().then(e=>{})})}getAttachments(e){this.attachmentsService.getAttachmentsById(e).subscribe(e=>{this.loadedAttachments=e,console.log(e)})}editEvent(){return(0,c.mG)(this,void 0,void 0,function*(){this.viewEventDetailDismiss.emit({type:"edit",event:this.loadedEvent})})}viewDocument(e){this.processes.GetDocumentUrl(e,"8").subscribe(e=>{console.log(e);const t=e.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");this.iab.create(t,"_blank").show()})}openTaskOptions(){return(0,c.mG)(this,void 0,void 0,function*(){const e=this.loadedAttachments[this.dicIndex];let t;361==e.ApplicationID||361==e.ApplicationId?t={serialNumber:e.DispatchNumber,taskStartDate:e.DateDispatch,isEvent:!0,workflowInstanceDataFields:{FsId:e.ApplicationID,FolderID:null,DocId:e.DispatchNumber,Subject:e.Assunto}}:8!=e.ApplicationID&&8!=e.ApplicationId||(t={serialNumber:e.DocId,taskStartDate:e.DocDate,isEvent:!0,workflowInstanceDataFields:{FsId:e.ApplicationID||e.ApplicationId,FolderID:null,DocId:e.DocId,Subject:e.Assunto}}),console.log(e),t.Status="";const n=yield this.modalController.create({component:pe.M,cssClass:"model aside-modal search-submodal",componentProps:{fulltask:t,task:t}});return yield n.present()})}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(x.n),o.Y36(q.o),o.Y36(r.Br),o.Y36(he.i),o.Y36(me.$),o.Y36(r.IN),o.Y36(r.Dh),o.Y36(P.k))},e.\u0275cmp=o.Xpm({type:e,selectors:[["app-view-event"]],inputs:{profile:"profile",eventId:"eventId"},outputs:{viewEventDetailDismiss:"viewEventDetailDismiss"},features:[o.TTD],decls:36,vars:12,consts:[[1,"ion-no-border"],[1,"header-toolbar"],[1,"main-header","px-20",2,"overflow","unset !important"],[1,"title-content","d-flex"],[1,"left"],[1,"btn-no-color",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"middle",3,"click"],[1,"title"],[1,"div-icon","d-flex","align-base"],["slot","end","src","assets/images/icons-edit.svg",1,"edit"],["name","trash-sharp",1,"delete"],[1,"main-content"],[1,"upper-content"],[1,"content-location"],[1,"date"],[4,"ngIf"],[1,"content-details"],[1,"line"],[1,"middle-content"],["class","bottom-content width-100",4,"ngIf"],["class","label","style","background-color: #99e47b;",4,"ngIf"],["class","label","style","background-color: #958bfc;",4,"ngIf"],[1,"label",2,"background-color","#99e47b"],[1,"label",2,"background-color","#958bfc"],["class","label","style","background-color: #ffb703;",4,"ngIf"],["class","label","style","background-color: #f05d5e;",4,"ngIf"],[1,"label",2,"background-color","#ffb703"],[1,"label",2,"background-color","#f05d5e"],[1,"ion-no-margin","ion-no-padding"],[4,"ngFor","ngForOf"],["lines","none",1,"ion-no-margin","ion-no-padding"],[3,"innerHTML"],[1,"bottom-content","width-100"],[1,"width-100"],["class","width-100","lines","none","class","ion-no-margin ion-no-padding pa-0",4,"ngFor","ngForOf"],["lines","none",1,"ion-no-margin","ion-no-padding","pa-0"],[1,"width-100","d-flex","align-center"],[1,"flex-grow-1",3,"click"],[1,"attach-title-item","d-block"],[1,"span-left","d-block"],[1,"d-flex","pr-10"],[1,"span-right"],[1,"doc-options",3,"click"],["src","assets/images/icons-menu.svg"]],template:function(e,t){1&e&&(o.TgZ(0,"ion-header",0),o.TgZ(1,"ion-toolbar",1),o.TgZ(2,"div",2),o.TgZ(3,"div",3),o.TgZ(4,"div",4),o.TgZ(5,"button",5),o.NdJ("click",function(){return t.close()}),o._UZ(6,"ion-icon",6),o.qZA(),o.qZA(),o.TgZ(7,"div",7),o.NdJ("click",function(){return t.openOptions()}),o.TgZ(8,"p",8),o._uU(9),o.qZA(),o.qZA(),o.TgZ(10,"div",9),o.TgZ(11,"button",5),o.NdJ("click",function(){return t.editEvent()}),o._UZ(12,"ion-icon",10),o.qZA(),o.TgZ(13,"button",5),o.NdJ("click",function(){return t.deleteEvent()}),o._UZ(14,"ion-icon",11),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(15,"ion-content"),o.TgZ(16,"div",12),o.TgZ(17,"div",13),o.TgZ(18,"div",14),o.TgZ(19,"span",15),o._uU(20),o.qZA(),o.YNc(21,fe,3,2,"div",16),o.YNc(22,we,3,2,"div",16),o.qZA(),o.TgZ(23,"div",17),o.TgZ(24,"ion-label"),o.TgZ(25,"p"),o._uU(26),o.qZA(),o.YNc(27,Me,4,8,"p",16),o.YNc(28,Ze,4,8,"p",16),o.YNc(29,be,2,0,"p",16),o.YNc(30,Pe,2,0,"p",16),o.qZA(),o.qZA(),o.qZA(),o._UZ(31,"div",18),o.TgZ(32,"div",19),o.YNc(33,Ee,6,1,"div",16),o.YNc(34,_e,6,1,"div",16),o.qZA(),o.YNc(35,Oe,5,1,"div",20),o.qZA(),o.qZA()),2&e&&(o.xp6(9),o.Oqu(t.loadedEvent.Subject),o.xp6(11),o.Oqu(t.loadedEvent.Location),o.xp6(1),o.Q6J("ngIf","Agenda do Presidente da Rep\xfablica"==t.loadedEvent.Organizer.Name),o.xp6(1),o.Q6J("ngIf","Agenda do Ministro e Director do Gabinete do PR"==t.loadedEvent.Organizer.Name),o.xp6(4),o.Oqu(t.customDate),o.xp6(1),o.Q6J("ngIf",t.toDateString(t.loadedEvent.StartDate)==t.toDateString(t.loadedEvent.EndDate)),o.xp6(1),o.Q6J("ngIf",t.toDateString(t.loadedEvent.StartDate)!=t.toDateString(t.loadedEvent.EndDate)),o.xp6(1),o.Q6J("ngIf",!t.loadedEvent.IsRecurring),o.xp6(1),o.Q6J("ngIf",t.loadedEvent.IsRecurring),o.xp6(3),o.Q6J("ngIf",t.loadedEvent.Attendees),o.xp6(1),o.Q6J("ngIf",t.loadedEvent.Body.Text),o.xp6(1),o.Q6J("ngIf",t.loadedAttachments))},directives:[r.Gu,r.sr,r.gu,r.W2,i.O5,r.Q$,r.Ie,i.sg,r.q_],pipes:[i.uU],styles:["ion-content[_ngcontent-%COMP%]{--background:transparent;--padding-top:0px;--padding-start:20px;--padding-end:20px;font-size:18px;overflow:auto}.header-toolbar[_ngcontent-%COMP%]{--background:transparent;--opacity:1}.main-header[_ngcontent-%COMP%]{width:100%;height:100%;font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;padding:30px 0 0;color:#000;transform:translate3d(0,1px,0);overflow:auto}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%]{width:100%!important;margin:0 auto;padding:0!important;background:#fff;overflow:auto}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{width:37px;float:left;font-size:35px}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%]{width:calc(100% - 138.5px)!important;padding:0!important;float:left;margin:0!important;overflow:auto}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .header-icon-right[_ngcontent-%COMP%]{width:45px;font-size:45px;float:right}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%]{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:flex;align-items:flex-start;justify-content:flex-start;float:right;padding:1px!important;top:0!important;margin:0 0 0 15px!important}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{font-size:35px;float:left}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{padding:7px;font-size:21px;color:#fff;background:#d30606;border-radius:20px;margin-left:10px}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px}.main-content[_ngcontent-%COMP%]{width:100%;font-family:Roboto;margin:0 auto;background-color:#fff;padding:15px 0 0;overflow:auto!important}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%]{width:calc(100%-50px);margin-left:50px;font-size:18px;overflow:auto}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .content-location[_ngcontent-%COMP%]{width:100%;margin:0 auto!important;padding:0!important;overflow:auto}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .content-location[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{width:calc(100% - 105px);float:left}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .content-location[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-radius:20px;background:#ffb703;float:right!important;padding:5px 13.5px;color:#fff}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .location-detail[_ngcontent-%COMP%]{font-weight:700;font-size:18px;float:left;margin:5px 5px 5px 0}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-calendar-type[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:25px}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-edit-event[_ngcontent-%COMP%]{width:140px;height:44px;border-radius:22.5px;--background:#e0e9ee;--color:#061b52}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.main-content[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{width:100%!important;margin-top:15px;border-top:1px solid #d8d8d8}.main-content[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%]{width:100%!important;overflow:auto}.main-content[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .main-content[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%]{margin:0 auto}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;margin:0 0 0 10px}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{width:100%;font-size:15px;color:#0d89d1}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.main-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.chat-popover[_ngcontent-%COMP%] .popover-content[_ngcontent-%COMP%]{width:100%!important;left:0!important;bottom:0!important;right:0!important;top:calc(100% - 160px)!important;max-height:160px;min-height:160px}.doc-options[_ngcontent-%COMP%]{cursor:pointer;display:flex;justify-content:center;width:35px;height:41px;align-items:center}"]}),e})();var De=n(3541),Se=n(17071),qe=n(17352);function ke(e,t){1&e&&o._UZ(0,"ion-progress-bar",48)}function Ie(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",49),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeProfile()}),o._UZ(1,"ion-icon",50),o.qZA()}}function Ne(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeProfile()}),o._UZ(1,"ion-icon",51),o.qZA()}}function Je(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){return o.CHM(e),o.oxw().viewEventsToApprove()}),o._UZ(1,"ion-icon",52),o.qZA()}}function Ue(e,t){if(1&e&&(o.TgZ(0,"div",53),o.TgZ(1,"div",54),o.TgZ(2,"div",55),o.TgZ(3,"div",56),o._uU(4),o.qZA(),o.qZA(),o.qZA(),o.qZA()),2&e){const e=t.view,n=t.row,i=t.col,a=o.oxw();o.xp6(1),o.ekj("with-event",e.dates[7*n+i].events.length),o.Q6J("className",a.currentDayEventDisplayBorder(e.dates,7*n+i)),o.xp6(3),o.hij(" ",e.dates[7*n+i].label,"")}}function Le(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){o.CHM(e);const t=o.oxw();return t.calendarHeight="75px",t.showCalendar=!1}),o._UZ(1,"ion-icon",57),o.qZA()}}function Ye(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",function(){o.CHM(e);const t=o.oxw();return t.calendarHeight="320px",t.showCalendar=!0}),o._UZ(1,"ion-icon",58),o.qZA()}}function He(e,t){1&e&&(o.TgZ(0,"span"),o._uU(1,"Hoje, \xa0"),o.qZA())}function Qe(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"ul"),o.TgZ(1,"li",59),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeSegment("Combinado")}),o._uU(2,"Todos"),o.qZA(),o.TgZ(3,"li",59),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeSegment("Oficial")}),o._uU(4,"Oficial"),o.qZA(),o.TgZ(5,"li",59),o.NdJ("click",function(){return o.CHM(e),o.oxw().changeSegment("Pessoal")}),o._uU(6,"Pessoal"),o.qZA(),o.qZA()}if(2&e){const e=o.oxw();o.xp6(1),o.ekj("active","Combinado"==e.segment),o.xp6(2),o.ekj("active","Oficial"==e.segment),o.xp6(2),o.ekj("active","Pessoal"==e.segment)}}function Re(e,t){1&e&&(o.TgZ(0,"div",60),o.TgZ(1,"div",61),o.TgZ(2,"div"),o._uU(3,"Pr\xf3pria"),o.qZA(),o.qZA(),o.TgZ(4,"div",62),o.TgZ(5,"div",61),o.TgZ(6,"div"),o._uU(7,"Presidente da Rep\xfablica"),o.qZA(),o.qZA(),o.qZA(),o.qZA())}function Fe(e,t){if(1&e&&(o.TgZ(0,"div",67),o._uU(1),o.qZA()),2&e){const e=o.oxw(2).$implicit,t=o.oxw();o.xp6(1),o.hij(" ",t.TimelineDayEvent(e.key)," ")}}function je(e,t){if(1&e&&(o.TgZ(0,"div",78),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.StartDate,"HH:mm"))}}function Ge(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1,"--"),o.qZA())}function Be(e,t){if(1&e&&(o.TgZ(0,"div",79),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.EndDate,"HH:mm"))}}function ze(e,t){1&e&&(o.TgZ(0,"div",79),o._uU(1," -- "),o.qZA())}function $e(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1," Todo "),o.qZA())}function Ve(e,t){1&e&&(o.TgZ(0,"div",80),o._uU(1," o dia "),o.qZA())}function We(e,t){if(1&e&&(o.TgZ(0,"div",74),o.YNc(1,je,3,4,"div",75),o.YNc(2,Ge,2,0,"div",75),o.YNc(3,Be,3,4,"div",76),o.YNc(4,ze,2,0,"div",76),o.YNc(5,$e,2,0,"div",75),o.YNc(6,Ve,2,0,"div",77),o.qZA()),2&e){const e=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf",!e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",!e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.middle),o.xp6(1),o.Q6J("ngIf",e.middle)}}function Xe(e,t){1&e&&(o.TgZ(0,"div",74),o.TgZ(1,"div",78),o._uU(2,"Todo"),o.qZA(),o.TgZ(3,"div",80),o._uU(4,"o dia"),o.qZA(),o.qZA())}function Ke(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",59),o.NdJ("click",function(){o.CHM(e);const t=o.oxw().$implicit;return o.oxw(3).eventClicked(t)}),o.YNc(1,We,7,6,"div",70),o.YNc(2,Xe,5,0,"div",70),o.TgZ(3,"div",71),o._uU(4),o.TgZ(5,"div",72),o._uU(6),o.qZA(),o.TgZ(7,"div",73),o.TgZ(8,"p"),o._uU(9),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw().$implicit;o.MT6("d-flex content-",e.profile,"-",e.event.CalendarName," mt-10 cursor-pointer width-100 "),o.xp6(1),o.Q6J("ngIf",!e.event.IsAllDayEvent),o.xp6(1),o.Q6J("ngIf",e.event.IsAllDayEvent),o.xp6(2),o.hij(" ",e.event.CalendarName," "),o.xp6(2),o.Oqu(e.event.Location),o.xp6(3),o.Oqu(e.event.Subject)}}function et(e,t){if(1&e&&(o.TgZ(0,"div",68),o.YNc(1,Ke,10,9,"div",69),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngIf",n.viewEventMonth<=n.dateMonth(e)&&n.showEventBox(e))}}function tt(e,t){if(1&e&&(o.TgZ(0,"div",64),o.YNc(1,Fe,2,1,"div",65),o.YNc(2,et,2,1,"div",66),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.shoeEventDay(e.value)),o.xp6(1),o.Q6J("ngForOf",e.value)}}function nt(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,tt,3,2,"div",63),o.qZA()),2&e){const e=t.$implicit,n=o.oxw();o.xp6(1),o.Q6J("ngIf",n.CalendarCurrentDay<=e.key)}}function ot(e,t){if(1&e&&(o.TgZ(0,"div",83),o._uU(1),o.qZA()),2&e){const e=o.oxw(2).$implicit,t=o.oxw(2);o.xp6(1),o.hij(" ",t.TimelineDayEvent(e.key)," ")}}function it(e,t){if(1&e&&(o.TgZ(0,"div",78),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.StartDate,"HH:mm"))}}function at(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1,"--"),o.qZA())}function rt(e,t){if(1&e&&(o.TgZ(0,"div",79),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.EndDate,"HH:mm"))}}function st(e,t){1&e&&(o.TgZ(0,"div",79),o._uU(1," -- "),o.qZA())}function ct(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1," Todo "),o.qZA())}function dt(e,t){1&e&&(o.TgZ(0,"div",80),o._uU(1," o dia "),o.qZA())}function lt(e,t){if(1&e&&(o.TgZ(0,"div",74),o.YNc(1,it,3,4,"div",75),o.YNc(2,at,2,0,"div",75),o.YNc(3,rt,3,4,"div",76),o.YNc(4,st,2,0,"div",76),o.YNc(5,ct,2,0,"div",75),o.YNc(6,dt,2,0,"div",77),o.qZA()),2&e){const e=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf",!e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",!e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.middle),o.xp6(1),o.Q6J("ngIf",e.middle)}}function pt(e,t){1&e&&(o.TgZ(0,"div",74),o.TgZ(1,"div",78),o._uU(2,"Todo"),o.qZA(),o.TgZ(3,"div",79),o._uU(4,"o dia"),o.qZA(),o.qZA())}function gt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",59),o.NdJ("click",function(){o.CHM(e);const t=o.oxw().$implicit;return o.oxw(4).eventClicked(t)}),o.YNc(1,lt,7,6,"div",70),o.YNc(2,pt,5,0,"div",70),o.TgZ(3,"div",71),o.TgZ(4,"div",72),o._uU(5),o.qZA(),o.TgZ(6,"div",73),o.TgZ(7,"p"),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw().$implicit;o.Gre("d-flex content-mdgpr-",e.event.CalendarName," mt-10 cursor-pointer"),o.xp6(1),o.Q6J("ngIf",!e.event.IsAllDayEvent),o.xp6(1),o.Q6J("ngIf",e.event.IsAllDayEvent),o.xp6(3),o.Oqu(e.event.Location),o.xp6(3),o.Oqu(e.event.Subject)}}function ht(e,t){if(1&e&&(o.TgZ(0,"div",68),o.YNc(1,gt,9,7,"div",69),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(4);o.xp6(1),o.Q6J("ngIf",n.viewEventMonth<=n.dateMonth(e)&&n.showEventBox(e))}}function mt(e,t){if(1&e&&(o.TgZ(0,"div",64),o.YNc(1,ot,2,1,"div",82),o.YNc(2,ht,2,1,"div",66),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.shoeEventDay(e.value)),o.xp6(1),o.Q6J("ngForOf",e.value)}}function vt(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,mt,3,2,"div",63),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(2);o.xp6(1),o.Q6J("ngIf",n.CalendarCurrentDay<=e.key)}}function ut(e,t){if(1&e&&(o.TgZ(0,"div",81),o.YNc(1,vt,2,1,"div",36),o.ALo(2,"keyvalue"),o.qZA()),2&e){const e=o.oxw();o.xp6(1),o.Q6J("ngForOf",o.lcZ(2,1,e.TimelineMDList))}}function ft(e,t){if(1&e&&(o.TgZ(0,"div",67),o._uU(1),o.qZA()),2&e){const e=o.oxw(2).$implicit,t=o.oxw();o.xp6(1),o.hij(" ",t.TimelineDayEvent(e.key)," ")}}function Ct(e,t){if(1&e&&(o.TgZ(0,"div",78),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.StartDate,"HH:mm"))}}function xt(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1,"--"),o.qZA())}function wt(e,t){if(1&e&&(o.TgZ(0,"div",79),o._uU(1),o.ALo(2,"date"),o.qZA()),2&e){const e=o.oxw(3).$implicit;o.xp6(1),o.Oqu(o.xi3(2,1,e.event.EndDate,"HH:mm"))}}function Mt(e,t){1&e&&(o.TgZ(0,"div",79),o._uU(1," -- "),o.qZA())}function Zt(e,t){1&e&&(o.TgZ(0,"div",78),o._uU(1," Todo "),o.qZA())}function bt(e,t){1&e&&(o.TgZ(0,"div",80),o._uU(1," o dia "),o.qZA())}function Pt(e,t){if(1&e&&(o.TgZ(0,"div",74),o.YNc(1,Ct,3,4,"div",75),o.YNc(2,xt,2,0,"div",75),o.YNc(3,wt,3,4,"div",76),o.YNc(4,Mt,2,0,"div",76),o.YNc(5,Zt,2,0,"div",75),o.YNc(6,bt,2,0,"div",77),o.qZA()),2&e){const e=o.oxw(2).$implicit;o.xp6(1),o.Q6J("ngIf",!e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.endMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",!e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.startMany&&!e.middle),o.xp6(1),o.Q6J("ngIf",e.middle),o.xp6(1),o.Q6J("ngIf",e.middle)}}function At(e,t){1&e&&(o.TgZ(0,"div",74),o.TgZ(1,"div",78),o._uU(2,"Todo"),o.qZA(),o.TgZ(3,"div",79),o._uU(4,"o dia"),o.qZA(),o.qZA())}function Et(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"div",59),o.NdJ("click",function(){o.CHM(e);const t=o.oxw().$implicit;return o.oxw(3).eventClicked(t)}),o.YNc(1,Pt,7,6,"div",70),o.YNc(2,At,5,0,"div",70),o.TgZ(3,"div",71),o.TgZ(4,"div",72),o._uU(5),o.qZA(),o.TgZ(6,"div",73),o.TgZ(7,"p"),o._uU(8),o.qZA(),o.qZA(),o.qZA(),o.qZA()}if(2&e){const e=o.oxw().$implicit;o.Gre("d-flex content-pr-",e.event.CalendarName," mt-10 cursor-pointer"),o.xp6(1),o.Q6J("ngIf",!e.event.IsAllDayEvent),o.xp6(1),o.Q6J("ngIf",e.event.IsAllDayEvent),o.xp6(3),o.Oqu(e.event.Location),o.xp6(3),o.Oqu(e.event.Subject)}}function _t(e,t){if(1&e&&(o.TgZ(0,"div",68),o.YNc(1,Et,9,7,"div",69),o.qZA()),2&e){const e=t.$implicit,n=o.oxw(3);o.xp6(1),o.Q6J("ngIf",n.viewEventMonth<=n.dateMonth(e)&&n.showEventBox(e))}}function Tt(e,t){if(1&e&&(o.TgZ(0,"div",64),o.YNc(1,ft,2,1,"div",65),o.YNc(2,_t,2,1,"div",66),o.qZA()),2&e){const e=o.oxw().$implicit,t=o.oxw();o.xp6(1),o.Q6J("ngIf",t.shoeEventDay(e.value)),o.xp6(1),o.Q6J("ngForOf",e.value)}}function Ot(e,t){if(1&e&&(o.TgZ(0,"div"),o.YNc(1,Tt,3,2,"div",63),o.qZA()),2&e){const e=t.$implicit,n=o.oxw();o.xp6(1),o.Q6J("ngIf",n.CalendarCurrentDay<=e.key)}}function yt(e,t){1&e&&(o.TgZ(0,"div",84),o._uU(1," Nenhum evento selecionado "),o.qZA())}function Dt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-new-event",85),o.NdJ("onAddEvent",function(t){return o.CHM(e),o.oxw().openAddEventDismiss(t)})("openAttendeesComponent",function(t){return o.CHM(e),o.oxw().openAttendeesComponent(t)})("cloneAllmobileComponent",function(){return o.CHM(e),o.oxw().cloneAllmobileComponent()})("clearContact",function(){return o.CHM(e),o.oxw().clearContact()})("setContact",function(t){return o.CHM(e),o.oxw().setContact(t)})("setIntervenient",function(t){return o.CHM(e),o.oxw().setIntervenient(t)})("setIntervenientCC",function(t){return o.CHM(e),o.oxw().setIntervenientCC(t)}),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("profile",e.profile)("selectedSegment",e.segment)("taskParticipants",e.taskParticipants)("taskParticipantsCc",e.taskParticipantsCc)("selectedDate",e.eventSelectedDate)("eventAttendees",e.contacts)}}function St(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-edit-event",86),o.NdJ("clearPostEvent",function(){return o.CHM(e),o.oxw().clearPostEvent})("clearContact",function(){return o.CHM(e),o.oxw().clearContact()})("openAttendeesComponent",function(t){return o.CHM(e),o.oxw().openAttendeesComponent(t)})("setContact",function(t){return o.CHM(e),o.oxw().setContact(t)})("closeComponent",function(){return o.CHM(e),o.oxw().closeComponentEditEventOrAdd()})("setIntervenient",function(t){return o.CHM(e),o.oxw().setIntervenient(t)})("setIntervenientCC",function(t){return o.CHM(e),o.oxw().setIntervenientCC(t)}),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("taskParticipants",e.taskParticipants)("taskParticipantsCc",e.taskParticipantsCc)("profile",e.profile)("selectedSegment",e.segment)("postEvent",e.postEvent)}}function qt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-view-event",87),o.NdJ("viewEventDetailDismiss",function(t){return o.CHM(e),o.oxw().viewEventDetailDismiss(t)}),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("profile",e.profile)("eventId",e.selectedEventId)("eventAttendees",e.contacts)}}function kt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-approve-event",88),o.NdJ("cloneAllmobileComponent",function(t){return o.CHM(e),o.oxw().viewEventDetailDismiss(t)})("closeEventToApprove",function(){return o.CHM(e),o.oxw().closeEventToApproveGoBack()})("AproveEventEditEvent",function(t){return o.CHM(e),o.oxw().AproveEventEditEvent(t)})("EditApproveEventDismiss",function(){return o.CHM(e),o.oxw().EditApproveEventDismiss()}),o.qZA()}if(2&e){const e=o.oxw();o.Udp("display",e.mobileComponent.transparentEventToApprove?"flex":"none"),o.Q6J("showComponent",e.mobileComponent.showEventToApprove)("componentTransparent",e.mobileComponent.transparentEventToApprove)("serialNumber",e.eventToaprove.serialNumber)("InstanceId",e.eventToaprove.InstanceId)("saveData",e.eventToaprove.saveData)("eventAttendees",e.contacts)}}function It(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-edit-event-to-approve",89),o.NdJ("setContact",function(t){return o.CHM(e),o.oxw().setContact(t)})("clearContact",function(){return o.CHM(e),o.oxw().clearContact()})("openAttendeesComponent",function(t){return o.CHM(e),o.oxw().openAttendeesComponent(t)})("closeComponent",function(){return o.CHM(e),o.oxw().approveEventDismissGoBack()})("setIntervenient",function(t){return o.CHM(e),o.oxw().setIntervenient(t)})("setIntervenientCC",function(t){return o.CHM(e),o.oxw().setIntervenientCC(t)})("closeEventToApprove",function(){return o.CHM(e),o.oxw().closeEventToApproveGoBack()}),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("taskParticipants",e.taskParticipants)("taskParticipantsCc",e.taskParticipantsCc)("saveData",e.eventToaprove.saveData)("serialNumber",e.eventToaprove.serialNumber)}}function Nt(e,t){if(1&e){const e=o.EpF();o.TgZ(0,"app-attendee-modal",90),o.NdJ("closeComponent",function(){return o.CHM(e),o.oxw().GoBackEditOrAdd()})("setContact",function(t){return o.CHM(e),o.oxw().setContact(t)})("setIntervenient",function(t){return o.CHM(e),o.oxw().setIntervenient(t)})("setIntervenientCC",function(t){return o.CHM(e),o.oxw().setIntervenientCC(t)}),o.qZA()}if(2&e){const e=o.oxw();o.Q6J("footer",!0)("adding",e.adding)("taskParticipants",e.taskParticipants)("taskParticipantsCc",e.taskParticipantsCc)}}const Jt=[{path:"",component:(()=>{class e{constructor(e,t,n,o,i,a,r,s,c,d,p){this.alertCtrl=e,this.locale=t,this.modalCtrl=n,this.eventService=o,this.router=i,this.alertController=a,this.sanitizer=r,this.dateAdapter=c,this.toastService=d,this.calendarService=p,this.view=m.wr.Day,this.viewDate=new Date,this.weekStartsOn=v.sb.MONDAY,this.weekendDays=[v.sb.FRIDAY,v.sb.SATURDAY],this.CalendarView=m.wr,this.events=[],this.TimelinePR=[],this.TimelinePRList={},this.TimelineMD=[],this.TimelineMDList={},this.showTimelinePR=!1,this.showTimelineMD=!1,this.timelineFilterState="Todos",this.showTimeline=!0,this.eventSource=[],this.calendar={mode:"month",currentDate:new Date},this.eventSelectedDate=new Date,this.taskParticipants=[],this.taskParticipantsCc=[],this.adding="intervenient",this.segment="Combinado",this.showEventEditOrOpen="",this.eventListBoxComponent=new C,this.mobileComponent={showAddNewEvent:!1,showEditEvent:!1,showEventDetails:!1,showEventList:!1,transparentEventList:!1,transparentEventToApprove:!1,showEventToApprove:!1,showAttendees:!1,showAttendeeModal:!1,showEditEventToApprove:!1},this.eventToaprove={back:!1,serialNumber:"",saveData:{}},this.onCurrentChanged=e=>{this.timelineDate=(0,l.momentG)(new Date(e),"dd MMMM yyyy"),this.viewDate=new Date(e),this.eventSelectedDate=new Date(e)},this.onTimeSelected=e=>{this.eventSelectedDate2=e.selectedTime},this.dateAdapter.setLocale("es"),this.locale="pt",this.loggeduser=s.ValidatedUser,this.calendarHeight="320px",this.showCalendar=!0,this.timelineDate=(0,l.momentG)(new Date,"dd MMMM yyyy"),this.showLoader=!1,this.showTimelineFilterState=!1,this.showTimeline=!1,"MDGPR"==this.loggeduser.Profile&&(this.mobileComponent.showEventList=!0),setTimeout(()=>{try{this.myCal.update(),this.myCal.loadEvents()}catch(e){}this.updateEventListBox()},1e3)}setView(e){this.view=e}ngOnInit(){this.profile="mdgpr";const e=window.location.pathname;let t=0;this.router.events.forEach(n=>{n instanceof s.m2&&n.url==e&&(null==this.segment&&(this.segment="Combinado"),0!=t&&this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate),t++)}),window.onresize=e=>{window.innerWidth<=1024&&this.cloneAllmobileComponent()}}next(){this.myCal.slideNext(),this.myCal.loadEvents(),this.myCal.update()}back(){this.myCal.slidePrev(),this.myCal.loadEvents(),this.myCal.update()}onViewTitleChanged(e){this.viewTitle=e}eventClicked(e){this.setIntervenient([]),this.setIntervenientCC([]),this.clearPostEvent(),this.IsEvent="view",this.viewingEventObject=e,this.eventSelectedDate=e.start,this.selectedEventId=e.id,this.cloneAllmobileComponent(),this.showEventEditOrOpen="edit",window.innerWidth<=1024?this.viewEventDetail(e.id):(this.cloneAllmobileComponent(),this.mobileComponent.showEventDetails=!0)}onEventSelected(e){return(0,c.mG)(this,void 0,void 0,function*(){this.router.navigate(["/home/agenda",e.event.EventId,"agenda"])})}dropDownChangeDate(e){}onRangeChanged(e){this.rangeStartDate=e.startTime,this.rangeEndDate=e.endTime,this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate);try{this.myCal.update(),this.myCal.loadEvents()}catch(t){}this.updateEventListBox()}currentDayEventDisplayBorder(e,t){const n=e[t].events;if(0==n.length)return"";if(n.length>=1){let e=[];return n.forEach(t=>{e.push(`calendar-event-border calendar-${"md"==t.profile?"mdgpr":"pr"}-event-type-${t.event.CalendarName}`)}),e.join(" ")}return""}get CalendarCurrentDay(){return this.viewDate.getDate()}timelineIsCurrentDate(){return(0,l.momentG)(new Date,"dd MMMM yyyy","pt")==(0,l.momentG)(this.eventSelectedDate,"dd MMMM yyyy","pt")}momentG(e,t,n){return(0,l.momentG)(e,t,n)}timelineFilter(e,t,n){this.timelineFilterState=e;let o=[];return this.showTimelineFilterState=!1,t.forEach((e,t)=>{const i=new Date(e.StartDate).getHours().toLocaleString(),a=new Date(e.EndDate).getHours().toLocaleString();o.push({start:(0,g.Z)((0,h.Z)(new Date(e.StartDate),0),parseInt(i)),end:(0,g.Z)((0,h.Z)(new Date(e.EndDate),0),parseInt(a)),color:{primary:"#0000",secondary:"#0000"},id:e.EventId,index:t,profile:n,CalendarName:e.CalendarName,event:e,Subject:e.Subject})}),o}eventFilter(){}TimelineDayEvent(e){return e.padStart(2,"0")+" "+this.viewTitle}get calendarDay(){return new Date(this.timelineDate).getDate().toString().padStart(2,"0")}EventTretment({startTime:e,endTime:t}){const n=new Date(e).toLocaleDateString(),o=new Date(t).toLocaleDateString(),i=new Date(t).getMinutes(),a=new Date(t).getHours();return n<o&&i+a==0?((t=new Date(t)).setSeconds(t.getSeconds()-1),new Date(t)):new Date(t)}loadRangeEvents(e,t){if(this.showLoader=!0,window.innerWidth<800)switch(this.segment){case"Combinado":"mdgpr"==this.profile&&"MDGPR"==this.loggeduser.Profile?this.eventService.getAllMdEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{console.log(n),this.calendarService.removeRange(e,t,"md"),this.calendarService.pushEvent(n,"md"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1}):"pr"==this.profile&&"MDGPR"==this.loggeduser.Profile?this.eventService.getAllSharedEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"pr"),this.calendarService.pushEvent(n,"pr"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1}):"PR"==this.loggeduser.Profile&&this.eventService.getAllPrEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"pr"),this.calendarService.pushEvent(n,"pr"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1});break;case"Pessoal":"mdgpr"==this.profile&&"MDGPR"==this.loggeduser.Profile?this.eventService.getAllMdPessoalEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"md");const o=n.filter(e=>"Pessoal"==e.CalendarName);this.calendarService.pushEvent(o,"md"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1}):this.eventService.getAllPrEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"pr");const o=n.filter(e=>"Pessoal"==e.CalendarName);this.calendarService.pushEvent(o,"pr"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1});break;case"Oficial":"mdgpr"==this.profile&&"MDGPR"==this.loggeduser.Profile?this.eventService.getAllMdEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"md");const o=n.filter(e=>"Oficial"==e.CalendarName);this.calendarService.pushEvent(o,"md"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1}):this.eventService.getAllPrEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(n=>{this.calendarService.removeRange(e,t,"pr");const o=n.filter(e=>"Oficial"==e.CalendarName);this.calendarService.pushEvent(o,"pr"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showLoader=!1,this.showTimeline=!0}).finally(()=>{this.showLoader=!1})}else{let n=0;"MDGPR"==this.loggeduser.Profile?(this.eventService.getAllMdEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(o=>{let i=o;this.calendarService.removeRange(e,t,"md"),this.calendarService.pushEvent(i,"md"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showTimelineMD=!0,n++,2==n&&(this.showLoader=!1)}).finally(()=>{n++,2==n&&(this.showLoader=!1)}),this.eventService.getAllSharedEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(o=>{let i=o;this.calendarService.removeRange(e,t,"pr"),this.calendarService.pushEvent(i,"pr"),this.TimelinePRList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showTimelinePR=!0,n++,2!=n&&"PR"!=this.loggeduser.Profile||(this.showLoader=!1)}).finally(()=>{n++,2==n&&(this.showLoader=!1)})):this.eventService.getAllPrEvents((0,l.momentG)(new Date(e),"yyyy-MM-dd HH:mm:ss"),(0,l.momentG)(new Date(t),"yyyy-MM-dd 23:59:59")).then(o=>{let i;i="Oficial"==this.segment?o.filter(e=>"Oficial"==e.CalendarName):"Pessoal"==this.segment?o.filter(e=>"Pessoal"==e.CalendarName):o,this.calendarService.removeRange(e,t,"pr"),this.calendarService.pushEvent(i,"pr"),this.TimelinePRList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.myCal.update(),this.myCal.loadEvents(),this.showTimelinePR=!0,n++,1!=n&&"PR"!=this.loggeduser.Profile||(this.showLoader=!1)}).finally(()=>{1!=n&&"PR"!=this.loggeduser.Profile||(this.showLoader=!1)})}}updateEventListBox(){this.TimelinePRList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date"),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date")}eventListBox(e,t){let n={};return e.forEach(e=>{var t=new Date(e.start),o=this.EventTretment({startTime:t,endTime:e.end});const i=new Date(e.start).getDate().toString().padStart(2,"0");if(e.manyDays=!1,e.todayOnly=new Date(e.start).toLocaleDateString()==new Date(e.end).toLocaleDateString(),n.hasOwnProperty(i)||(n[i]=[]),new Date(t).toLocaleDateString()!=new Date(o).toLocaleDateString()){const a=Math.abs(o-t),r=Math.ceil(a/864e5);if(r<=150&&!e.event.IsAllDayEvent)if(r>=1){const a=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},startMany:!0,endMany:!1,middle:!1});n[i].push(a);let r=1;for(;t.getFullYear()!=o.getFullYear()||t.getMonth()!=o.getMonth()||t.getDate()!=o.getDate();){const i=t.setDate(t.getDate()+r);let a=new Date(i).getDate().toString().padStart(2,"0");if(e.other=!0,e.start=i,n.hasOwnProperty(a)||(n[a]=[]),t.getFullYear()==o.getFullYear()&&t.getMonth()==o.getMonth()&&t.getDate()==o.getDate()){const t=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},Subject:e.Subject,startMany:!1,endMany:!0,middle:!1});n[a].push(t)}else{const t=Object.assign({},{title:e.title,start:e.start,end:e.end,color:e.color,id:e.id,index:e.index,profile:e.profile,CalendarName:e.CalendarName,event:{Subject:e.event.Subject,StartDate:e.event.StartDate,EndDate:e.event.EndDate,Location:e.event.Location,EventId:e.event.EventId,CalendarName:e.event.CalendarName},Subject:e.Subject,startMany:!1,endMany:!0,middle:!0});n[a].push(t)}}}else n[i].push(e);else n[i].push(e)}n[i].push(e)}),setTimeout(()=>{document.querySelectorAll(".EventListBox-container .EventListBox").forEach(e=>{e.parentElement.style.display=0==e.childElementCount?"none":"block"})},10),n}get viewEventMonth(){return this.viewDate.getMonth()}dateMonth(e){return new Date(e.start).getMonth()}eventListVisible(e){return(0,l.momentG)(e,"MMMM yyyy")==(0,l.momentG)(this.calendar.currentDate,"MMMM yyyy")}actions(){}doRefresh(e){this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate),setTimeout(()=>{e.target.complete()},250)}showAlert(){this.alertController.presentAlert("Funcionalidade em desenvolvimento.")}changeProfile(){"mdgpr"==this.profile?(this.profile="pr",this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"pr",this.rangeStartDate,this.rangeEndDate,"date")):(this.profile="mdgpr",this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate),this.TimelineMDList=this.eventListBoxComponent.list(this.calendarService.eventSource,"md",this.rangeStartDate,this.rangeEndDate,"date"))}openAddEvent(){return(0,c.mG)(this,void 0,void 0,function*(){if(yield this.cloneAllmobileComponent(),this.showEventEditOrOpen="add",this.IsEvent="add",window.innerWidth<=1024){const e=yield this.modalCtrl.create({component:f.h,componentProps:{segment:this.segment,profile:this.profile,eventSelectedDate:this.eventSelectedDate},cssClass:"modal modal-desktop",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>{this.openAddEventDismiss(e.data)})}else this.mobileComponent.showAddNewEvent=!0})}openEditEvent(){this.showEventEditOrOpen="edit"}openAddEventDismiss(e){null!=e.Subject&&(this.myCal.update(),this.myCal.loadEvents(),this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate)),this.cloneAllmobileComponent()}viewEventDetail(e){return(0,c.mG)(this,void 0,void 0,function*(){this.router.navigate(["/home/agenda",e,"agenda"])})}viewEventDetailDismiss(e){return(0,c.mG)(this,void 0,void 0,function*(){yield this.cloneAllmobileComponent(),"edit"==e.type&&(this.selectedEvent=e.event,this.postEvent=e.event,this.mobileComponent.showEditEvent=!0),this.loadRangeEvents(this.rangeStartDate,this.rangeEndDate)})}viewEventsToApprove(){return(0,c.mG)(this,void 0,void 0,function*(){yield this.cloneAllmobileComponent(),window.innerWidth<=801?this.router.navigate(["/home/agenda/event-list"]):(this.cloneAllmobileComponent(),this.mobileComponent.transparentEventList=!1,this.mobileComponent.showEventList=!0)})}approveEventDismissGoBack(){window["temp.path:/shared/agenda/edit-event-to-approve.ts"]={},this.cloneAllmobileComponent(),this.mobileComponent.showEventToApprove=!0,this.mobileComponent.showEditEventToApprove=!1}approveEventDismiss({saveData:e,serialNumber:t,action:n}){window["temp.path:/shared/agenda/edit-event-to-approve.ts"]={},"Aprovar"==n&&(this.eventToaprove={back:!0,saveData:e,serialNumber:t,action:n,InstanceId:e.workflowInstanceDataFields.InstanceId||""},this.mobileComponent.showEventToApprove=!0,this.mobileComponent.showEventList=!1),this.showEventEditOrOpen="eventoToApprove"}closeEventToApprove(){1==this.eventToaprove.back&&1==this.mobileComponent.showEventList?(this.mobileComponent.transparentEventList=!1,this.mobileComponent.showEventToApprove=!1,this.eventToaprove.back=!1):(this.mobileComponent.showEventToApprove=!1,this.mobileComponent.showEventList=!1)}closeEventToApproveGoBack(){window.innerWidth<=801?this.router.navigate(["/home/agenda/event-list"]):(this.cloneAllmobileComponent(),this.mobileComponent.transparentEventList=!1,this.mobileComponent.showEventList=!0)}EditApproveEventDismiss(){this.cloneAllmobileComponent(),this.mobileComponent.showEditEventToApprove=!0}cloneAllmobileComponent(){return(0,c.mG)(this,void 0,void 0,function*(){this.mobileComponent.showAddNewEvent=!1,this.mobileComponent.showEditEvent=!1,this.mobileComponent.showEventDetails=!1,this.mobileComponent.showEventList=!1,this.mobileComponent.showEventToApprove=!1,this.mobileComponent.showAttendees=!1,this.mobileComponent.showAttendeeModal=!1,this.mobileComponent.showEditEventToApprove=!1,this.closeEventToApprove()})}AproveEventEditEvent(e){return(0,c.mG)(this,void 0,void 0,function*(){this.postEvent=e,this.mobileComponent.transparentEventToApprove=!0,this.mobileComponent.showAddNewEvent=!0})}openAttendeesComponent(e){return(0,c.mG)(this,void 0,void 0,function*(){this.adding=e.type,this.cloneAllmobileComponent(),this.mobileComponent.showAttendees=!0})}clearContact(){return(0,c.mG)(this,void 0,void 0,function*(){this.contacts=[]})}setContact(e){return(0,c.mG)(this,void 0,void 0,function*(){this.contacts=e})}openAttendeeModal(){return(0,c.mG)(this,void 0,void 0,function*(){this.cloneAllmobileComponent(),this.mobileComponent.showAttendeeModal=!0})}GoBackEditOrAdd(){return(0,c.mG)(this,void 0,void 0,function*(){"edit"==this.showEventEditOrOpen?(this.cloneAllmobileComponent(),this.mobileComponent.showEditEvent=!0):"add"==this.showEventEditOrOpen?(this.cloneAllmobileComponent(),this.mobileComponent.showAddNewEvent=!0):"eventoToApprove"==this.showEventEditOrOpen&&(this.cloneAllmobileComponent(),this.mobileComponent.showEditEventToApprove=!0)})}closeComponentEditEventOrAdd(){return(0,c.mG)(this,void 0,void 0,function*(){(this.IsEvent="edit")?this.eventClicked(this.viewingEventObject):(this.IsEvent="add")&&this.cloneAllmobileComponent()})}EventToApproveGoBack(){return(0,c.mG)(this,void 0,void 0,function*(){})}setIntervenient(e){return(0,c.mG)(this,void 0,void 0,function*(){this.taskParticipants=(0,p.removeDuplicate)(e)})}setIntervenientCC(e){return(0,c.mG)(this,void 0,void 0,function*(){this.taskParticipantsCc=(0,p.removeDuplicate)(e)})}setAdding(e="intervenient"){return(0,c.mG)(this,void 0,void 0,function*(){this.adding=e})}clearPostEvent(){return(0,c.mG)(this,void 0,void 0,function*(){this.postEvent=!1})}changeSegment(e){return(0,c.mG)(this,void 0,void 0,function*(){this.segment=e,this.timelineFilterState="Combinado"==e?"Todos":e,this.showTimelineFilterState=!1,setTimeout(()=>{document.querySelectorAll(".EventListBox-container .EventListBox").forEach(e=>{e.parentElement.style.display=0==e.childElementCount?"none":"block"})},10),setTimeout(()=>{document.querySelectorAll(".EventListBox-container .EventListBox").forEach(e=>{e.parentElement.style.display=0==e.childElementCount?"none":"block"})},100)})}showEventBox(e){return(0,c.mG)(this,void 0,void 0,function*(){return e.event.CalendarName==this.segment||"Combinado"==this.segment})}shoeEventDay(e){return"Combinado"==this.segment||0!=e.filter(e=>e.CalendarName==this.segment).length}}return e.\u0275fac=function(t){return new(t||e)(o.Y36(r.Br),o.Y36(o.soG),o.Y36(r.IN),o.Y36(x.n),o.Y36(s.F0),o.Y36(w.c),o.Y36(M.H7),o.Y36(Z.e),o.Y36(b._A),o.Y36(P.k),o.Y36(_))},e.\u0275cmp=o.Xpm({type:e,selectors:[["app-agenda"]],viewQuery:function(e,t){if(1&e&&o.Gf(d.eV,5),2&e){let e;o.iGM(e=o.CRH())&&(t.myCal=e.first)}},features:[o._Bn([{provide:m.m$,useClass:u}])],decls:81,vars:44,consts:[[1,"ion-no-border"],["name","refresher","slot","fixed",3,"ionRefresh"],["id","timeline-conteiner agenda-container",1,"timeline"],[1,"d-flex","container-wrapper"],[1,"calendar-timeline","d-flex","flex-column","height-100","bg-blue"],[1,"calendar-wrapper"],[1,"main-content"],["type","indeterminate",4,"ngIf"],[1,"calendar-container"],[1,"ion-justify-content-between","calendar-tool-tip"],[1,"ion-align-items-center"],[1,"arrow"],[1,"btn-no-color",3,"click"],["slot","icon-only","src","assets/images/icons-calendar-arrow-left.svg"],[1,"capitaliseText"],[1,"arrow",3,"click"],["slot","icon-only","src","assets/images/icons-calendar-arrow-right.svg"],["class","d-md-none btn-no-color",3,"click",4,"ngIf"],["class","btn-no-color",3,"click",4,"ngIf"],[1,"btn-no-color","cy-add-event",3,"click"],["src","assets/images/icons-add-new-event.svg",1,"right-icons"],[1,"custom-calendar-header"],["queryMode","remote","startHour","6","endHour","20","step","30","startingDayMonth","1","noEventsLabel","Sem Eventos","allDayLabel","Todo o dia",1,"calendar-component",3,"eventSource","calendarMode","currentDate","monthviewDisplayEventTemplate","onEventSelected","onTitleChanged","onRangeChanged","onCurrentDateChanged"],["template",""],[1,"calendar-border"],[1,"timeline-header","pb-0","ion-justify-content-between","ion-align-items-center","currente-date-timelien"],[1,"timeline-date","align-center"],[4,"ngIf"],[1,"filter","ion-align-items-center"],[1,"filter-name"],[1,"arrow-down","btn-no-color",3,"click"],["src","assets/images/icons-arrow-arrow-down.svg"],["class","d-none d-md-flex",4,"ngIf"],[1,"timeline-wrapper","flex-grow-1","height-100"],[1,"height-100"],[1,"ss-timeline","timeline-mobile","flex-grow-1","d-md-none","text-black","height-100","width-100","overflow-y-auto"],[4,"ngFor","ngForOf"],["class","fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto",4,"ngIf"],[1,"sd-timeline","flex-grow-1","d-none","d-md-block","timeline-md","text-black","pl-20","pr-20","width-100","height-100","overflow-y-auto"],[1,"event-details","bg-blue"],["class","text-black nothing-to-show",4,"ngIf"],[3,"profile","selectedSegment","taskParticipants","taskParticipantsCc","selectedDate","eventAttendees","onAddEvent","openAttendeesComponent","cloneAllmobileComponent","clearContact","setContact","setIntervenient","setIntervenientCC",4,"ngIf"],[3,"taskParticipants","taskParticipantsCc","profile","selectedSegment","postEvent","clearPostEvent","clearContact","openAttendeesComponent","setContact","closeComponent","setIntervenient","setIntervenientCC",4,"ngIf"],[3,"profile","eventId","eventAttendees","viewEventDetailDismiss",4,"ngIf"],[3,"profile","showComponent","approveEventDismiss","cloneAllmobileComponent"],["class","d-flex flex-column",3,"display","showComponent","componentTransparent","serialNumber","InstanceId","saveData","eventAttendees","cloneAllmobileComponent","closeEventToApprove","AproveEventEditEvent","EditApproveEventDismiss",4,"ngIf"],["class","d-flex flex-column height-100",3,"taskParticipants","taskParticipantsCc","saveData","serialNumber","setContact","clearContact","openAttendeesComponent","closeComponent","setIntervenient","setIntervenientCC","closeEventToApprove",4,"ngIf"],["class","d-flex flex-column height-100",3,"footer","adding","taskParticipants","taskParticipantsCc","closeComponent","setContact","setIntervenient","setIntervenientCC",4,"ngIf"],["type","indeterminate"],[1,"d-md-none","btn-no-color",3,"click"],["src","assets/images/icons-profile-calendar-md.svg",1,"right-icons"],["src","assets/images/icons-profile-calendar-pr.svg",1,"right-icons","d-md-none"],["src","assets/images/icons-received-event.svg",1,"right-icons"],[1,"day-container"],[1,"d-flex","justify-center","align-center",3,"className"],[1,"day"],[1,"number"],["src","assets/images/icons-collaps-up.svg",1,"collaps","btn-no-color"],["src","assets/images/icons-collaps-down.svg",1,"collaps","btn-no-color"],[3,"click"],[1,"d-none","d-md-flex"],[1,"flex-grow-1","text-grey","d-flex","justify-center","align-center"],[1,"flex-grow-1","text-black"],["class","EventListBox-container",4,"ngIf"],[1,"EventListBox-container"],["class","day mt-10",4,"ngIf"],["class","EventListBox",4,"ngFor","ngForOf"],[1,"day","mt-10"],[1,"EventListBox"],[3,"class","click",4,"ngIf"],["class","schedule-time",4,"ngIf"],[1,"schedule-details"],[1,"location"],[1,"description"],[1,"schedule-time"],["class","time-start",4,"ngIf"],["class","time-end",4,"ngIf"],["class","time-end text-center",4,"ngIf"],[1,"time-start"],[1,"time-end"],[1,"time-end","text-center"],[1,"fs-timeline","flex-grow-1","d-none","d-md-block","d-md-block","text-black","pr-20","width-100","height-100","overflow-y-auto"],["class","day EventListBox-day mt-10",4,"ngIf"],[1,"day","EventListBox-day","mt-10"],[1,"text-black","nothing-to-show"],[3,"profile","selectedSegment","taskParticipants","taskParticipantsCc","selectedDate","eventAttendees","onAddEvent","openAttendeesComponent","cloneAllmobileComponent","clearContact","setContact","setIntervenient","setIntervenientCC"],[3,"taskParticipants","taskParticipantsCc","profile","selectedSegment","postEvent","clearPostEvent","clearContact","openAttendeesComponent","setContact","closeComponent","setIntervenient","setIntervenientCC"],[3,"profile","eventId","eventAttendees","viewEventDetailDismiss"],[1,"d-flex","flex-column",3,"showComponent","componentTransparent","serialNumber","InstanceId","saveData","eventAttendees","cloneAllmobileComponent","closeEventToApprove","AproveEventEditEvent","EditApproveEventDismiss"],[1,"d-flex","flex-column","height-100",3,"taskParticipants","taskParticipantsCc","saveData","serialNumber","setContact","clearContact","openAttendeesComponent","closeComponent","setIntervenient","setIntervenientCC","closeEventToApprove"],[1,"d-flex","flex-column","height-100",3,"footer","adding","taskParticipants","taskParticipantsCc","closeComponent","setContact","setIntervenient","setIntervenientCC"]],template:function(e,t){if(1&e&&(o.TgZ(0,"ion-header",0),o._UZ(1,"app-header"),o.qZA(),o.TgZ(2,"ion-refresher",1),o.NdJ("ionRefresh",function(e){return t.doRefresh(e)}),o._UZ(3,"ion-refresher-content"),o.qZA(),o.TgZ(4,"ion-content",2),o.TgZ(5,"div",3),o.TgZ(6,"div",4),o.TgZ(7,"div",5),o.TgZ(8,"div",6),o.YNc(9,ke,1,0,"ion-progress-bar",7),o.TgZ(10,"div"),o.TgZ(11,"div"),o.TgZ(12,"div",8),o.TgZ(13,"ion-row",9),o.TgZ(14,"ion-row",10),o.TgZ(15,"div",11),o.TgZ(16,"button",12),o.NdJ("click",function(){return t.back()}),o._UZ(17,"ion-icon",13),o.qZA(),o.qZA(),o.TgZ(18,"h2",14),o._uU(19),o.qZA(),o.TgZ(20,"div",15),o.NdJ("click",function(){return t.next()}),o._UZ(21,"ion-icon",16),o.qZA(),o.qZA(),o.TgZ(22,"ion-row",10),o.YNc(23,Ie,2,0,"button",17),o.YNc(24,Ne,2,0,"button",18),o.YNc(25,Je,2,0,"button",18),o.TgZ(26,"button",19),o.NdJ("click",function(){return t.clearContact(),t.openAddEvent()}),o._UZ(27,"ion-icon",20),o.qZA(),o.qZA(),o.qZA(),o.TgZ(28,"table",21),o.TgZ(29,"thead"),o.TgZ(30,"th"),o._uU(31,"S"),o.qZA(),o.TgZ(32,"th"),o._uU(33,"T"),o.qZA(),o.TgZ(34,"th"),o._uU(35,"Q"),o.qZA(),o.TgZ(36,"th"),o._uU(37,"Q"),o.qZA(),o.TgZ(38,"th"),o._uU(39,"S"),o.qZA(),o.TgZ(40,"th"),o._uU(41,"S"),o.qZA(),o.TgZ(42,"th"),o._uU(43,"D"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(44,"calendar",22),o.NdJ("onEventSelected",function(e){return t.onEventSelected(e)})("onTitleChanged",function(e){return t.onViewTitleChanged(e)})("onRangeChanged",function(e){return t.onRangeChanged(e)})("onCurrentDateChanged",function(e){return t.onCurrentChanged(e)}),o.qZA(),o.YNc(45,Ue,5,4,"ng-template",null,23,o.W1O),o.qZA(),o.qZA(),o._UZ(47,"div",24),o.TgZ(48,"ion-row",25),o.TgZ(49,"ion-row",26),o.YNc(50,Le,2,0,"button",18),o.YNc(51,Ye,2,0,"button",18),o.qZA(),o.TgZ(52,"ion-row",26),o.YNc(53,He,2,0,"span",27),o._uU(54),o.qZA(),o.TgZ(55,"ion-row",28),o.TgZ(56,"div",29),o._uU(57),o.qZA(),o.TgZ(58,"button",30),o.NdJ("click",function(){return t.showTimelineFilterState=!t.showTimelineFilterState}),o._UZ(59,"ion-icon",31),o.qZA(),o.YNc(60,Qe,7,6,"ul",27),o.qZA(),o.qZA(),o.YNc(61,Re,8,0,"div",32),o.qZA(),o.qZA(),o.qZA(),o.TgZ(62,"div",33),o.TgZ(63,"div",34),o.TgZ(64,"div"),o.TgZ(65,"div",35),o.YNc(66,nt,2,1,"div",36),o.ALo(67,"keyvalue"),o.qZA(),o.YNc(68,ut,3,3,"div",37),o.TgZ(69,"div",38),o.YNc(70,Ot,2,1,"div",36),o.ALo(71,"keyvalue"),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.qZA(),o.TgZ(72,"div",39),o.YNc(73,yt,2,0,"div",40),o.YNc(74,Dt,1,6,"app-new-event",41),o.YNc(75,St,1,5,"app-edit-event",42),o.YNc(76,qt,1,3,"app-view-event",43),o.TgZ(77,"app-event-list",44),o.NdJ("approveEventDismiss",function(e){return t.approveEventDismiss(e)})("cloneAllmobileComponent",function(e){return t.viewEventDetailDismiss(e)}),o.qZA(),o.YNc(78,kt,1,8,"app-approve-event",45),o.YNc(79,It,1,4,"app-edit-event-to-approve",46),o.YNc(80,Nt,1,4,"app-attendee-modal",47),o.qZA(),o.qZA(),o.qZA()),2&e){const e=o.MAs(46);o.xp6(9),o.Q6J("ngIf",t.showLoader),o.xp6(2),o.Gre("calendar-segment-",t.profile,""),o.ekj("calendar-segment-pr-force","PR"==t.loggeduser.Profile),o.xp6(1),o.Udp("height",t.calendarHeight),o.xp6(7),o.Oqu(t.viewTitle),o.xp6(4),o.Q6J("ngIf","mdgpr"==t.profile&&"MDGPR"==t.loggeduser.Profile),o.xp6(1),o.Q6J("ngIf","pr"==t.profile&&"MDGPR"==t.loggeduser.Profile),o.xp6(1),o.Q6J("ngIf","MDGPR"==t.loggeduser.Profile),o.xp6(19),o.Q6J("eventSource",t.calendarService.eventSource)("calendarMode",t.calendar.mode)("currentDate",t.calendar.currentDate)("monthviewDisplayEventTemplate",e),o.xp6(6),o.Q6J("ngIf",t.showCalendar),o.xp6(1),o.Q6J("ngIf",!t.showCalendar),o.xp6(2),o.Q6J("ngIf",t.timelineIsCurrentDate()),o.xp6(1),o.hij(" ",t.timelineDate," "),o.xp6(3),o.Oqu(t.timelineFilterState),o.xp6(3),o.Q6J("ngIf",t.showTimelineFilterState),o.xp6(1),o.Q6J("ngIf","MDGPR"==t.loggeduser.Profile),o.xp6(3),o.Gre("timeline-container height-100 d-flex pt-20 pl-20 pl-20 filter-",t.segment,""),o.xp6(2),o.Q6J("ngForOf",o.lcZ(67,40,t.TimelineMDList)),o.xp6(2),o.Q6J("ngIf","MDGPR"==t.loggeduser.Profile),o.xp6(2),o.Q6J("ngForOf",o.lcZ(71,42,t.TimelinePRList)),o.xp6(3),o.Q6J("ngIf",0==t.mobileComponent.showAddNewEvent&&0==t.mobileComponent.showEditEvent&&0==t.mobileComponent.showEventDetails&&0==t.mobileComponent.showEventList&&0==t.mobileComponent.showEventToApprove&&0==t.mobileComponent.showAttendees&&0==t.mobileComponent.showAttendeeModal&&0==t.mobileComponent.showEditEventToApprove),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showAddNewEvent),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showEditEvent),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showEventDetails),o.xp6(1),o.Udp("display",t.mobileComponent.showEventList?"flex":"none"),o.Q6J("profile",t.profile)("showComponent",t.mobileComponent.showEventList),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showEventToApprove),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showEditEventToApprove),o.xp6(1),o.Q6J("ngIf",t.mobileComponent.showAttendees)}},directives:[r.Gu,T.E,r.nJ,r.Wo,r.W2,i.O5,r.Nd,r.gu,d.eV,i.sg,O.r,r.X7,y.h,de,ye,De.c,Se.I,qe.Y],pipes:[i.Nd,i.uU],styles:['.event-indicator[_ngcontent-%COMP%]{background:#333;width:5px;height:5px;border-radius:5px;display:table-cell}[_nghost-%COMP%] .monthview-current{border-bottom:1px solid #87cefa!important}[_nghost-%COMP%] .item{text-transform:capitalize}[_nghost-%COMP%] .input-wrapper{border-left:red!important;margin-left:1px solid red}.main-header[_ngcontent-%COMP%]{width:100%;height:100%;font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:hidden;padding:15px 5px 0;color:#000;transform:translate3d(0,1px,0)}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%]{width:360px;margin:0 auto;padding:0!important;background:#ecf8ff}.main-header[_ngcontent-%COMP%] .div-title[_ngcontent-%COMP%]{padding:0!important;float:left}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px}.main-header[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%]{width:40px;float:right;font-size:35px;overflow:auto;padding:1px}.main-header[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right;padding-left:20px}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:90px;height:34px;float:right;right:-4px!important;margin:20px 20px 0 0}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#fff;border:1px solid #e16817;color:#e16817;transition:.4s}.slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:23.5px;width:24px;left:4px;bottom:4px;background-color:#fff;transition:.4s}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:#e16817}input[_ngcontent-%COMP%]:focus + .slider[_ngcontent-%COMP%]{box-shadow:0 0 1px #2196f3}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translateX(55px)}.pr[_ngcontent-%COMP%]{display:none;text-align:left!important;left:25px!important;color:#fff}.mdgpr[_ngcontent-%COMP%]{left:58px!important;color:#e16817}.mdgpr[_ngcontent-%COMP%], .pr[_ngcontent-%COMP%]{position:absolute;transform:translate(-50%,-50%);top:50%;left:50%;font-size:12px;font-family:Verdana,sans-serif}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%] .pr[_ngcontent-%COMP%]{display:block;background:#e16817}input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%] .mdgpr[_ngcontent-%COMP%]{display:none}.slider.round[_ngcontent-%COMP%]{border-radius:34px}.slider.round[_ngcontent-%COMP%]:before{border-radius:50%;border:1px solid #e16817}.toggleBox[_ngcontent-%COMP%]{margin:20px 12px 7px 0}input[type=checkbox][_ngcontent-%COMP%]{position:relative;width:96px;height:34px;background:#fff;-webkit-appearance:none;border-radius:20px;outline:none;transition:.4s;cursor:pointer;border:1px solid #e16817}input[_ngcontent-%COMP%]:checked[type=checkbox]{background:#e16817}input[type=checkbox][_ngcontent-%COMP%]:before{z-index:2;position:absolute;content:"";left:0;width:30px;height:30px;background:#fff;border-radius:50%;box-shadow:inset 0 2px 5px rgba(0,0,0,.2);border:1px solid #e16817}input[_ngcontent-%COMP%]:checked[type=checkbox]:before{left:65px}.toggle[_ngcontent-%COMP%]{position:relative;display:block;font-family:Montserrat,sans-serif;text-align:center}label[_ngcontent-%COMP%]{position:absolute;color:#fff;font-weight:600;font-size:12px;pointer-events:none}.onbtn[_ngcontent-%COMP%]{left:15px}.ofbtn[_ngcontent-%COMP%], .onbtn[_ngcontent-%COMP%]{top:10px;bottom:15px}.ofbtn[_ngcontent-%COMP%]{right:14px;color:#e16817}td.monthview-primary-with-event[_ngcontent-%COMP%]{background-color:#fff!important}.header-title[_ngcontent-%COMP%]{font-family:Roboto;font-size:25px;margin:0 5px 0 25px;padding:0;color:#000}.div-top-header[_ngcontent-%COMP%]{width:400px;margin:0 auto;background-color:#0782c9;padding-top:15px;border:0!important}.div-top-header[_ngcontent-%COMP%] .div-search[_ngcontent-%COMP%]{font-size:45px;float:left;margin:0 0 0 10px}.div-top-header[_ngcontent-%COMP%] .div-logo[_ngcontent-%COMP%]{background:transparent;width:140px;margin:5px 0 0 71px;float:left}.div-top-header[_ngcontent-%COMP%] .div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.div-top-header[_ngcontent-%COMP%] .div-profile[_ngcontent-%COMP%]{font-size:45px;float:right;margin-right:10px}.main-content[_ngcontent-%COMP%]{width:100%;height:100%;font-family:Roboto;margin:0 auto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:auto;color:#000!important}.cal-hour-segment[_ngcontent-%COMP%]{border-bottom:none!important}.cal-current-time-marker[_ngcontent-%COMP%]{background-color:#42b9fe!important}.calendar-tool-tip[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:35px}.calendar-tool-tip[_ngcontent-%COMP%] .arrow-down[_ngcontent-%COMP%]{font-size:28px}.drop-down[_ngcontent-%COMP%] .drop-down-container[_ngcontent-%COMP%]{display:none;border-top:2px solid #42b9fe;position:absolute;background:#fff;z-index:100000;box-shadow:0 4px 9px 0 rgba(0,0,0,.3);border-bottom-right-radius:5px;border-bottom-left-radius:5px;margin-left:-122px;padding:4px 15px}.drop-down[_ngcontent-%COMP%] .drop-down-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0}.drop-down[_ngcontent-%COMP%] .drop-down-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;height:35px;display:flex;align-items:center}.capitaliseText[_ngcontent-%COMP%]{min-width:155px;text-align:center;font-weight:400;padding:0;margin:0}.arrow[_ngcontent-%COMP%]{padding:0}.calendar-profile[_ngcontent-%COMP%], .right-icons[_ngcontent-%COMP%]{padding:0 9px}.capitaliseText[_ngcontent-%COMP%]{font-size:20px}.calendar-tool-tip[_ngcontent-%COMP%]{padding:30px 10px 20px}.custom-calendar-header[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}.custom-calendar-header[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:flex;justify-content:space-around}.custom-calendar-header[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-family:Roboto;font-size:15px;color:rgba(52,72,94,.54);font-weight:400}.currente-date-timelien[_ngcontent-%COMP%]{padding:10px 20px}.currente-date-timelien[_ngcontent-%COMP%] .timeline-date[_ngcontent-%COMP%]{font-size:15px;font-weight:700}.currente-date-timelien[_ngcontent-%COMP%] .collaps[_ngcontent-%COMP%]{font-size:26px;padding-right:8px}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{font-size:15px;font-weight:400}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:35px;color:#0d89d1}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] .filter-name[_ngcontent-%COMP%]{color:#0d89d1;font-family:Roboto;font-size:15px;margin-right:25px;width:55px}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{background-color:#fff!important;position:absolute;list-style:none;margin:140px 0 0;padding:0;box-shadow:0 0 10px gray!important;border-radius:5px;width:96px;z-index:1000000}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:5px 10px;font-size:15px;font-weight:400}.currente-date-timelien[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background-color:rgba(66,185,254,.1)}.showcalendar[_ngcontent-%COMP%]{display:none}.timeline-header[_ngcontent-%COMP%]{z-index:1000000;width:100%;background-color:#fff}.timeline-container[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]{font-weight:700;color:#2e2e2e!important;font-size:13px}.timeline-container[_ngcontent-%COMP%] .EventListBoxBorder[_ngcontent-%COMP%]{padding-bottom:5px;border-bottom:1px solid #d8d8d8}.timeline-container[_ngcontent-%COMP%] .content-mdgpr-Oficial[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .content-mdgpr-Pessoal[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .content-pr-Oficial[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .content-pr-Pessoal[_ngcontent-%COMP%]{width:100%!important;padding:0 10px!important}.timeline-container[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{margin-right:10px;min-width:33px}.timeline-container[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .time-end[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .time-start[_ngcontent-%COMP%]{color:#797979!important;font-family:Roboto;font-size:13px}.timeline-container[_ngcontent-%COMP%] .schedule-date[_ngcontent-%COMP%]{margin-right:10px;width:22%;color:#797979!important;font-size:13px}.timeline-container[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;width:100%;overflow:auto}.timeline-container[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%] .location[_ngcontent-%COMP%]{width:100%;font-family:Roboto;font-size:13px;color:#000}.timeline-container[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{width:100%;font-family:Roboto;font-size:15px;font-weight:700;color:#0d89d1}.timeline-container[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis!important}.timeline-container[_ngcontent-%COMP%] .color[_ngcontent-%COMP%]{width:5px;height:40px;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#f05d5e}.timeline-container[_ngcontent-%COMP%] .div-content-Oficial[_ngcontent-%COMP%]{width:85%;float:left;border-left:4px solid #cab0dc;padding:0 0 0 12px}.timeline-container[_ngcontent-%COMP%] .div-content-Pessoal[_ngcontent-%COMP%]{width:85%;float:left;border-left:4px solid #cbeecb;padding:0 0 0 12px}.timeline-container[_ngcontent-%COMP%] .div-content-Oficial[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .div-content-Pessoal[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14pt}.timeline-container[_ngcontent-%COMP%] .div-content-Oficial[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .timeline-container[_ngcontent-%COMP%] .div-content-Pessoal[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12pt;color:#5e5c5c;padding:0!important;margin:0!important}.timeline-container[_ngcontent-%COMP%] .content-pr-Pessoal[_ngcontent-%COMP%]{background-color:var(--white);border-radius:5px;border-right:5px solid #958bfc;overflow:auto}.timeline-container[_ngcontent-%COMP%] .content-mdgpr-Oficial[_ngcontent-%COMP%]{border-radius:5px;border-right:5px solid #ffb703;overflow:auto}.timeline-container[_ngcontent-%COMP%] .content-mdgpr-Pessoal[_ngcontent-%COMP%]{border-radius:5px;border-right:5px solid #f05d5e;overflow:auto}.calendar-timeline[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-top-left-radius:25px}.calendar-border[_ngcontent-%COMP%]{background:#ebebeb;margin:13px 20px;height:2px}.calendar-progress-bar[_ngcontent-%COMP%]{position:absolute;width:100%;margin-left:10px}.agenda-container[_ngcontent-%COMP%]{overflow:hidden}.container-wrapper[_ngcontent-%COMP%]{height:100%;overflow:hidden}.container-wrapper[_ngcontent-%COMP%] .calendar-timeline[_ngcontent-%COMP%]{border-top-right-radius:24px;width:calc(100%);overflow:hidden}.container-wrapper[_ngcontent-%COMP%] .calendar-timeline[_ngcontent-%COMP%] .calendar-wrapper[_ngcontent-%COMP%]{width:100%}.container-wrapper[_ngcontent-%COMP%] .calendar-timeline[_ngcontent-%COMP%] .timeline-wrapper[_ngcontent-%COMP%]{width:100%;overflow:auto}.event-details[_ngcontent-%COMP%]{width:40%;background:#fff;border-top-right-radius:25px;display:none}@media only screen and (min-width: 1024px){.container-wrapper[_ngcontent-%COMP%]{height:100%}.container-wrapper[_ngcontent-%COMP%] .calendar-timeline[_ngcontent-%COMP%]{border-top-right-radius:0;width:calc(100% - 40%);border-right:1px solid #d8d8d8;display:flex;flex-direction:column;height:100%;flex-wrap:unset}.event-details[_ngcontent-%COMP%]{display:block}}app-view-event[_ngcontent-%COMP%]{flex-wrap:wrap-reverse}app-edit-event[_ngcontent-%COMP%], app-new-event[_ngcontent-%COMP%], app-view-event[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;z-index:1000}app-new-event[_ngcontent-%COMP%]{flex-wrap:wrap}app-event-list[_ngcontent-%COMP%]{flex-wrap:wrap-reverse}app-approve-event[_ngcontent-%COMP%], app-event-list[_ngcontent-%COMP%]{flex-direction:column;height:100%;z-index:1000}app-approve-event[_ngcontent-%COMP%]{display:flex}.transparent[_ngcontent-%COMP%]{position:absolute;z-index:0;opacity:0}.nothing-to-show[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center;height:100%}.fs-timeline[_ngcontent-%COMP%]{border-right:1px solid #909090}.filter-Oficial[_ngcontent-%COMP%] .content-md-Pessoal[_ngcontent-%COMP%], .filter-Oficial[_ngcontent-%COMP%] .content-mdgpr-Pessoal[_ngcontent-%COMP%], .filter-Oficial[_ngcontent-%COMP%] .content-pr-Pessoal[_ngcontent-%COMP%], .filter-Pessoal[_ngcontent-%COMP%] .content-md-Pessoal[_ngcontent-%COMP%], .filter-Pessoal[_ngcontent-%COMP%] .content-mdgpr-Oficial[_ngcontent-%COMP%], .filter-Pessoal[_ngcontent-%COMP%] .content-pr-Oficial[_ngcontent-%COMP%]{display:none!important}']}),e})()},{path:"approve-event-modal",loadChildren:()=>Promise.all([n.e(8195),n.e(8592)]).then(n.bind(n,6834)).then(e=>e.ApproveEventModalPageModule)},{path:"event-actions-popover",loadChildren:()=>n.e(4192).then(n.bind(n,94192)).then(e=>e.EventActionsPopoverPageModule)},{path:"emend-message-modal",loadChildren:()=>n.e(8654).then(n.bind(n,58654)).then(e=>e.EmendMessageModalPageModule)},{path:"new-event",loadChildren:()=>n.e(1372).then(n.bind(n,1372)).then(e=>e.NewEventPageModule)},{path:"edit-event",loadChildren:()=>n.e(8592).then(n.bind(n,97404)).then(e=>e.EditEventPageModule)},{path:"view-event",loadChildren:()=>n.e(8592).then(n.bind(n,91796)).then(e=>e.ViewEventPageModule)}];let Ut=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[s.Bz.forChild(Jt)],s.Bz]}),e})();var Lt=n(42482),Yt=n.n(Lt),Ht=n(67671),Qt=n(2142),Rt=n(6527);const Ft=[{path:"",component:ye}];let jt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[s.Bz.forChild(Ft)],s.Bz]}),e})(),Gt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[i.ez,a.u5,r.Pc,jt]]}),e})();var Bt=n(668),zt=n(52138),$t=n(28497),Vt=n(93556);const Wt=[{path:"",component:de}];let Xt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({imports:[[s.Bz.forChild(Wt)],s.Bz]}),e})();var Kt=n(51095),en=n(94881),tn=n(22238);let nn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[{provide:b.Ad,useValue:"pt"}],imports:[[i.ez,a.u5,r.Pc,Xt,U.FA,N.c,b.XK,J.EC,J.Yy,J.K,en._W,I.LD,Kt.ot,a.UX,tn.Is]]}),e})();var on=n(85895);(0,i.qS)(Yt());let an=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=o.oAB({type:e}),e.\u0275inj=o.cJS({providers:[{provide:o.soG,useValue:"pt-PT"}],imports:[[i.ez,a.u5,r.Pc,m._8.forRoot({provide:m._A,useFactory:Ht.x}),Ut,d.S4,Rt.a,Gt,Qt.AttendeeModalPageModule,$t.EventsToApprovePageModule,Bt.ApproveEventPageModule,zt.NewEventPageModule,Vt.EventListPageModule,nn,on.EditEventToApprovePageModule]]}),e})()},6527:function(e,t,n){"use strict";n.d(t,{a:function(){return p}});var o=n(38583),i=n(3679),a=n(35957),r=n(39895),s=n(962),c=n(37716);const d=[{path:"",component:s.E}];let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=c.oAB({type:e}),e.\u0275inj=c.cJS({imports:[[r.Bz.forChild(d)],r.Bz]}),e})(),p=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=c.oAB({type:e}),e.\u0275inj=c.cJS({imports:[[o.ez,i.u5,a.Pc,l]]}),e})()},962:function(e,t,n){"use strict";n.d(t,{E:function(){return C}});var o=n(64762),i=n(4528),a=n(33559),r=n(37716),s=n(39895),c=n(35957),d=n(37556),l=n(38583),p=n(3679);function g(e,t){if(1&e){const e=r.EpF();r.TgZ(0,"div",21),r.TgZ(1,"div",22),r.NdJ("click",function(){return r.CHM(e),r.oxw().openSearch()}),r._UZ(2,"ion-icon",23),r.qZA(),r.qZA()}}function h(e,t){if(1&e){const e=r.EpF();r.TgZ(0,"div",28),r.NdJ("click",function(){r.CHM(e);const t=r.oxw(2);return t.openSearch(),t.showSearch=!0}),r._UZ(1,"ion-icon",23),r.qZA()}}function m(e,t){if(1&e){const e=r.EpF();r.TgZ(0,"button",29),r.NdJ("click",function(){r.CHM(e);const t=r.oxw(2);return t.closeSearch(),t.showSearch=!1,t.searchSubject=""}),r._UZ(1,"ion-icon",30),r.qZA()}}function v(e,t){if(1&e){const e=r.EpF();r.TgZ(0,"div",32),r.TgZ(1,"div",33),r.NdJ("click",function(){return r.CHM(e),r.oxw(3).basicSearch()}),r._UZ(2,"ion-icon",34),r.qZA(),r.TgZ(3,"div",35),r.TgZ(4,"ion-input",36),r.NdJ("keyup.enter",function(){return r.CHM(e),r.oxw(3).basicSearch()})("ngModelChange",function(t){return r.CHM(e),r.oxw(3).searchSubject=t})("ngModelChange",function(){return r.CHM(e),r.oxw(3).dynamicSearch()}),r.qZA(),r.qZA(),r.TgZ(5,"div",33),r.NdJ("click",function(){return r.CHM(e),r.oxw(3).clearSearchInput()}),r._UZ(6,"ion-icon",37),r.qZA(),r.qZA()}if(2&e){const e=r.oxw(3);r.xp6(4),r.Q6J("ngModel",e.searchSubject)}}function u(e,t){if(1&e&&(r.TgZ(0,"div"),r.YNc(1,v,7,1,"div",31),r.qZA()),2&e){const e=r.oxw(2);r.xp6(1),r.Q6J("ngIf",e.showSearch)}}function f(e,t){if(1&e&&(r.TgZ(0,"div",24),r.YNc(1,h,2,0,"div",25),r.YNc(2,m,2,0,"button",26),r.YNc(3,u,2,1,"div",27),r.qZA()),2&e){const e=r.oxw();r.xp6(1),r.Q6J("ngIf",!e.showSearch),r.xp6(1),r.Q6J("ngIf",e.showSearch),r.xp6(1),r.Q6J("ngIf",e.showSearch)}}let C=(()=>{class e{constructor(e,t,n,o){this.router=e,this.modalController=t,this.animationController=n,this.searchSubject="",this.showSearch=!1,this.hideSearchBtn=!1,this.loggeduser=o.ValidatedUser,e.events.subscribe(e=>{this.showSearch=!1})}ngOnInit(){this.hideSearch()}hideSearch(){"/home/events"!=this.router.url&&"/home/chat"!=this.router.url||(this.hideSearchBtn=!0)}locationPathname(){return window.location.pathname}openSearch(){return(0,o.mG)(this,void 0,void 0,function*(){let e,t,n;window.innerWidth<1366?(e="modal modal-width-100",t=!0):(e="modal modal-desktop desktop-search",t=!1),window.location.pathname.startsWith("/home/agenda")?n="Agenda":window.location.pathname.startsWith("/home/gabinete-digital")?n="AccoesPresidenciais & ArquivoDespachoElect":window.location.pathname.startsWith("/home/publications")&&(n="AccoesPresidenciais");const o=yield this.modalController.create({component:i.Z,cssClass:e,componentProps:{type:n,showSearchInput:t,select:!1}});return yield o.present()})}changeRoute(e){this.router.navigateByUrl(e)}openProfile(){return(0,o.mG)(this,void 0,void 0,function*(){const e=e=>{const t=this.animationController.create().addElement(e.querySelector("ion-backdrop")).fromTo("opacity","0.01","var(--backdrop-opacity)"),n=this.animationController.create().addElement(e.querySelector(".modal-wrapper")).keyframes([{offset:0,opacity:"1",right:"-100%"},{offset:1,opacity:"1",right:"0px"}]);return this.animationController.create().addElement(e).easing("ease-out").duration(500).addAnimation([t,n])},t=yield this.modalController.create({enterAnimation:e,leaveAnimation:t=>e(t).direction("reverse"),component:a.G,cssClass:"model profile-modal search-submodal",componentProps:{}});return yield t.present()})}dynamicSearch(){return(0,o.mG)(this,void 0,void 0,function*(){window.dynamicSearch(this.searchSubject)})}closeSearch(){return(0,o.mG)(this,void 0,void 0,function*(){this.modalController.dismiss()})}clearSearchInput(){this.searchSubject="",window.dynamicSearch(this.searchSubject)}basicSearch(){return(0,o.mG)(this,void 0,void 0,function*(){window.searchTriger()})}profileLabel(e){return"MDGPR"==e?"MD":"PR"==e?e:"UN"}}return e.\u0275fac=function(t){return new(t||e)(r.Y36(s.F0),r.Y36(c.IN),r.Y36(c.vB),r.Y36(d.e))},e.\u0275cmp=r.Xpm({type:e,selectors:[["app-header"]],decls:40,vars:14,consts:[[1,"pb-10","ion-toolbar","text-white"],[1,"mobile","d-flex","div-top-header","justify-space-between"],["class","div-search",4,"ngIf"],[1,"div-logo","height-fit-content"],["src","assets/images/logo-no-bg.png","alt","logo"],[1,"div-profile","cursor-pointer",3,"click"],["src","assets/images/icons-profile.svg",1,"icon"],[1,"profile-text"],[1,"desktop","mx-20"],[1,"d-flex","justify-space-between","align-center"],["tab","events",1,"div-logo","height-fit-content"],[1,"d-flex","flex-1","pr-20","pl-50"],[1,"tab","mr-20","d-flex","align-center","cursor-pointer",3,"click"],["src","assets/images/icons-nav-home-active.svg",1,"font-40"],["src","assets/images/icons-nav-agenda-inactive.svg",1,"font-40"],["src","assets/images/icons-nav-home-dk.svg",1,"font-40"],["src","assets/images/icons-nav-a-es-inactive.svg",1,"font-40"],["src","assets/images/icons-nav-grupos-inactive-dk-white.svg",1,"font-40"],[1,"header-btns","d-flex"],["class","mr-10 d-flex align-center cursor-pointer",4,"ngIf"],[1,"div-profile","d-flex","cursor-pointer",3,"click"],[1,"div-search"],[3,"click"],["src","assets/images/icons-search.svg",1,"font-45"],[1,"mr-10","d-flex","align-center","cursor-pointer"],["style","padding-top: 5px;",3,"click",4,"ngIf"],["class","btn-no-color",3,"click",4,"ngIf"],[4,"ngIf"],[2,"padding-top","5px",3,"click"],[1,"btn-no-color",3,"click"],["name","restaurant-outline","src","assets/images/icons-search-close.svg",1,"font-40"],["class","d-flex search-input-container ml-10 justify-between",4,"ngIf"],[1,"d-flex","search-input-container","ml-10","justify-between"],[1,"icon",3,"click"],["slot","end","name","search",1,"icon-z"],[1,"input-text","d-flex","ion-align-items-center"],["type","search","placeholder","Pesquisar",1,"search-input","text-black",3,"ngModel","keyup.enter","ngModelChange"],["name","restaurant-outline","src","assets/images/icons-search-close.svg"]],template:function(e,t){1&e&&(r.TgZ(0,"div",0),r.TgZ(1,"div",1),r.YNc(2,g,3,0,"div",2),r.TgZ(3,"div",3),r._UZ(4,"img",4),r.qZA(),r.TgZ(5,"div",5),r.NdJ("click",function(){return t.openProfile()}),r._UZ(6,"ion-icon",6),r.TgZ(7,"ion-label",7),r._uU(8),r.qZA(),r.qZA(),r.qZA(),r.TgZ(9,"div",8),r.TgZ(10,"div",9),r.TgZ(11,"div",10),r._UZ(12,"img",4),r.qZA(),r.TgZ(13,"div",11),r.TgZ(14,"div",12),r.NdJ("click",function(){return t.changeRoute("/home/events")}),r._UZ(15,"ion-icon",13),r.TgZ(16,"span"),r._uU(17,"In\xedcio"),r.qZA(),r.qZA(),r.TgZ(18,"div",12),r.NdJ("click",function(){return t.changeRoute("/home/agenda")}),r._UZ(19,"ion-icon",14),r.TgZ(20,"span"),r._uU(21,"Agenda"),r.qZA(),r.qZA(),r.TgZ(22,"div",12),r.NdJ("click",function(){return t.changeRoute("/home/gabinete-digital")}),r._UZ(23,"ion-icon",15),r.TgZ(24,"span"),r._uU(25,"Gabinete"),r.qZA(),r.qZA(),r.TgZ(26,"div",12),r.NdJ("click",function(){return t.changeRoute("/home/publications")}),r._UZ(27,"ion-icon",16),r.TgZ(28,"span"),r._uU(29,"Ac\xe7\xf5es"),r.qZA(),r.qZA(),r.TgZ(30,"div",12),r.NdJ("click",function(){return t.changeRoute("/home/chat")}),r._UZ(31,"ion-icon",17),r.TgZ(32,"span"),r._uU(33,"Chat"),r.qZA(),r.qZA(),r.qZA(),r.TgZ(34,"div",18),r.YNc(35,f,4,3,"div",19),r.TgZ(36,"div",20),r.NdJ("click",function(){return t.openProfile()}),r._UZ(37,"ion-icon",6),r.TgZ(38,"ion-label",7),r._uU(39),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA(),r.qZA()),2&e&&(r.xp6(2),r.Q6J("ngIf",!t.hideSearchBtn),r.xp6(6),r.Oqu(t.loggeduser.Profile),r.xp6(6),r.ekj("active","/home/events"==t.locationPathname()),r.xp6(4),r.ekj("active","/home/agenda"==t.locationPathname()),r.xp6(4),r.ekj("active","/home/gabinete-digital"==t.locationPathname()),r.xp6(4),r.ekj("active","/home/publications"==t.locationPathname()),r.xp6(4),r.ekj("active","/home/chat"==t.locationPathname()),r.xp6(5),r.Q6J("ngIf",!t.hideSearchBtn),r.xp6(4),r.Oqu(t.profileLabel(t.loggeduser.Profile)))},directives:[l.O5,c.gu,c.Q$,c.pK,c.j9,p.JJ,p.On],styles:[".div-top-header[_ngcontent-%COMP%]{margin:0 1.25em;padding-top:.9375em;border:0!important}.div-logo[_ngcontent-%COMP%]{background:transparent;width:8.75em;justify-content:center;display:flex}.div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;margin:0 auto}.header-btns[_ngcontent-%COMP%]{justify-content:center;align-items:center}.div-profile[_ngcontent-%COMP%]{width:90px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;font-size:45px;justify-content:flex-end;display:flex;background-color:transparent;justify-content:center;align-items:center;overflow:auto}.div-profile[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{position:relative;border:none!important}.div-profile[_ngcontent-%COMP%] .profile-text[_ngcontent-%COMP%]{font-size:20px;font-weight:300;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:absolute}.desktop[_ngcontent-%COMP%]{display:none}@media only screen and (min-width: 1366px){.mobile[_ngcontent-%COMP%]{display:none!important}.desktop[_ngcontent-%COMP%]{display:block}}.tab[_ngcontent-%COMP%]{height:65px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.active[_ngcontent-%COMP%]{border-top:7px solid #fff}.search-input-container[_ngcontent-%COMP%]{background-color:#fff;border-radius:27.5px;border:1px solid #ebebeb}.search-input-container[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{color:#797979;width:45px;height:45px;display:flex;justify-content:center;font-size:25px;align-items:center}.search-input-container[_ngcontent-%COMP%] .input-text[_ngcontent-%COMP%]{width:100%}.search-input-container[_ngcontent-%COMP%] .icon-z[_ngcontent-%COMP%]{width:20px}"]}),e})()}}]); |