!function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n0)}}function g(t,e){if(1&t){var n=s.EpF();s.TgZ(0,"ion-list"),s.TgZ(1,"ion-item"),s.TgZ(2,"ion-label"),s.TgZ(3,"p",22),s.TgZ(4,"span",23),s._uU(5),s.qZA(),s.TgZ(6,"span",24),s._uU(7),s.qZA(),s.TgZ(8,"span",25),s.NdJ("click",function(){var t=s.CHM(n).index;return s.oxw().removeAttachment(t)}),s._UZ(9,"ion-icon",26),s.qZA(),s.qZA(),s.TgZ(10,"p"),s.TgZ(11,"span",27),s._uU(12),s.qZA(),s.TgZ(13,"span",28),s._uU(14),s.ALo(15,"date"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&t){var o=e.$implicit;s.xp6(5),s.Oqu(o.Assunto),s.xp6(2),s.Oqu(o.appName),s.xp6(5),s.Oqu(o.EntidadeOrganicaNome),s.xp6(2),s.hij(" ",s.xi3(15,4,o.Data,"dd-MM-yyyy HH:mm")," ")}}var h=function(){var e=function(){function e(n,o,i){t(this,e),this.modalController=n,this.animationController=o,this.navParams=i,this.note="",this.documents=[],this.hideThisFeature=!0,this.note="",this.hideThisFeature=this.navParams.get("showAttachmentBtn")}return n(e,[{key:"ngOnInit",value:function(){console.log(this.navParams),console.log(this.hideThisFeature)}},{key:"close",value:function(){this.modalController.dismiss("")}},{key:"save",value:function(){this.modalController.dismiss({note:this.note,documents:this.documents})}},{key:"getDoc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:r.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){t&&n.documents.push(t.data.selected)});case 6:case"end":return t.stop()}},t,this)}))}},{key:"removeAttachment",value:function(t){this.documents=this.documents.filter(function(e,n){return t!=n})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(s.Y36(c.IN),s.Y36(c.vB),s.Y36(c.X1))},e.\u0275cmp=s.Xpm({type:e,selectors:[["app-add-note"]],decls:20,vars:4,consts:[[1,"ion-no-border","width-100"],[1,"header-content","pb-20","width-100"],[1,"header-title","width-100"],[1,"ion-input-class-no-height"],["placeholder","Detalhes","rows","6","cols","20",3,"ngModel","ngModelChange"],["class","ion-item-container-no-border",4,"ngIf"],[1,"content","width-100","overflow-y-auto","height-100"],[1,"list"],[4,"ngFor","ngForOf"],["hidden","","lines","none"],["rows","4","cols","20","placeholder","Adicionar um coment\xe1rio para execu\xe7\xe3o...",3,"ngModel","ngModelChange"],[1,"ion-no-border"],[1,"buttons","width-100"],["shape","round",1,"btn-cancel","cursor-pointer",3,"click"],["shape","round",1,"btn-ok","cursor-pointer",3,"click"],[1,"ion-item-container-no-border"],[1,"attach-wrapper","d-flex","align-center",3,"click"],[1,"btn-no-color"],[1,"attach-icon"],["src","assets/images/icons-attach-doc.svg"],[1,"attach-document","pl-10"],[4,"ngIf"],[1,"d-flex","ion-justify-content-between"],[1,"attach-title-item"],[1,"app-name"],[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"]],template:function(t,e){1&t&&(s.TgZ(0,"ion-header",0),s.TgZ(1,"div",1),s.TgZ(2,"div",2),s.TgZ(3,"label"),s._uU(4,"Adicionar coment\xe1rio"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",3),s.TgZ(6,"ion-textarea",4),s.NdJ("ngModelChange",function(t){return e.note=t}),s.qZA(),s.qZA(),s.YNc(7,p,9,1,"div",5),s.qZA(),s.TgZ(8,"ion-content"),s.TgZ(9,"div",6),s.TgZ(10,"div",7),s.YNc(11,g,16,7,"ion-list",8),s.qZA(),s.TgZ(12,"ion-item",9),s.TgZ(13,"ion-textarea",10),s.NdJ("ngModelChange",function(t){return e.note=t}),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(14,"ion-footer",11),s.TgZ(15,"div",12),s.TgZ(16,"button",13),s.NdJ("click",function(){return e.close()}),s._uU(17,"Cancelar"),s.qZA(),s.TgZ(18,"button",14),s.NdJ("click",function(){return e.save()}),s._uU(19,"Gravar"),s.qZA(),s.qZA(),s.qZA()),2&t&&(s.xp6(6),s.Q6J("ngModel",e.note),s.xp6(1),s.Q6J("ngIf",e.hideThisFeature),s.xp6(4),s.Q6J("ngForOf",e.documents),s.xp6(2),s.Q6J("ngModel",e.note))},directives:[c.Gu,c.g2,c.j9,d.JJ,d.On,l.O5,c.W2,l.sg,c.Ie,c.fr,c.Q$,c.gu,c.q_],pipes:[l.uU],styles:[".header-content[_ngcontent-%COMP%]{width:100%!important;padding:30px 20px 0!important;margin-bottom:20px!important;float:left}.header-title[_ngcontent-%COMP%]{font-family:Roboto;font-size:25px;padding:0;color:#000;float:left}.ion-item-container-no-border[_ngcontent-%COMP%]{margin:5px 20px 0!important;padding:0!important;overflow:auto}.list[_ngcontent-%COMP%]{overflow:auto!important;margin:5px 20px 0!important}.ion-item-class-2[_ngcontent-%COMP%]{margin:0 auto}.ion-icon-class[_ngcontent-%COMP%]{width:45px;height:45px;float:left;padding:10px;font-size:25px}ion-select[_ngcontent-%COMP%]{padding-left:5px;margin-left:0}.ion-input-class[_ngcontent-%COMP%]{width:calc(100% - 45px);height:45px;border:1px solid #ebebeb;border-radius:5px;padding-left:5px;padding-right:10px;float:left}.list-people[_ngcontent-%COMP%]{width:256px;float:left}.add-people[_ngcontent-%COMP%]{width:45px;float:right;overflow:auto;font-size:25px;padding:10px}.list-people-title[_ngcontent-%COMP%]{color:#797979}.attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.attach-title-item[_ngcontent-%COMP%]{width:100%;font-size:15px;color:#0d89d1}.span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.container-footer[_ngcontent-%COMP%]{margin:0 auto;overflow:auto}.button-cancel[_ngcontent-%COMP%]{--background:#e0e9ee;--color:#061b52}.button-cancel[_ngcontent-%COMP%], .button-save[_ngcontent-%COMP%]{width:170px;height:44px;border-radius:22.5px;margin:10px}.button-save[_ngcontent-%COMP%]{--background:#42b9fe;--color:#fff}.text-input[_ngcontent-%COMP%]{width:100%;border:1px solid #ebebeb;margin:0 15px 15px 0;padding:0!important;border-radius:5px}.error[_ngcontent-%COMP%]{font-size:12px;font-weight:700;padding-bottom:20px}.error[_ngcontent-%COMP%], .span-color[_ngcontent-%COMP%]{color:red}.buttons[_ngcontent-%COMP%]{display:flex;width:100%!important;justify-content:space-between;padding:15px 0;overflow:auto}.ion-input-class-no-height[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:5px;overflow:auto;margin:5px 20px 0!important}"]}),e}()},33289:function(e,o,i){"use strict";i.d(o,{j:function(){return I}});var a=i(64762),r=i(32379),s=i(84943),c=i(18057),d=i(37716),l=i(35957),u=i(25970),p=i(28621),g=i(53760),h=i(96529),m=i(38583),f=i(23890);function v(t,e){if(1&t&&(d.TgZ(0,"span",24),d._uU(1),d.qZA()),2&t){var n=d.oxw(2);d.xp6(1),d.Oqu(n.LoadedDocument.Nature)}}function x(t,e){1&t&&(d.TgZ(0,"h5"),d._uU(1,"Intervenientes"),d.qZA())}function Z(t,e){1&t&&(d.TgZ(0,"h5"),d._uU(1,"Remetente"),d.qZA())}function b(t,e){1&t&&(d.TgZ(0,"h5"),d._uU(1,"Status"),d.qZA())}function C(t,e){if(1&t&&(d.TgZ(0,"ion-item",21),d.TgZ(1,"p"),d._uU(2),d.qZA(),d.qZA()),2&t){var n=d.oxw(2);d.xp6(2),d.Oqu(n.LoadedDocument.Status)}}function M(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"ion-label",27),d.NdJ("click",function(){return d.CHM(n),d.oxw(3).viewDocument()}),d.TgZ(1,"div",28),d._uU(2),d.qZA(),d.TgZ(3,"div",29),d.TgZ(4,"span",30),d._uU(5),d.qZA(),d.TgZ(6,"span",31),d._uU(7),d.ALo(8,"date"),d.qZA(),d.qZA(),d.qZA()}if(2&t){var o=d.oxw(3);d.xp6(2),d.hij(" ",o.LoadedDocument.Assunto," "),d.xp6(3),d.Oqu(o.LoadedDocument.Sender),d.xp6(2),d.Oqu(d.xi3(8,3,o.LoadedDocument.DocDate,"dd-MM-yyyy HH:mm"))}}function w(t,e){if(1&t&&(d.TgZ(0,"div",29),d.TgZ(1,"span",30),d._uU(2),d.qZA(),d.TgZ(3,"span",31),d._uU(4),d.ALo(5,"date"),d.qZA(),d.qZA()),2&t){var n=d.oxw().$implicit;d.xp6(2),d.Oqu(n.Sender),d.xp6(2),d.Oqu(d.xi3(5,2,n.DocDate,"dd-MM-yyyy HH:mm"))}}function k(t,e){if(1&t&&(d.TgZ(0,"div"),d.TgZ(1,"div",28),d._uU(2),d.qZA(),d.YNc(3,w,6,5,"div",33),d.qZA()),2&t){var n=e.$implicit;d.xp6(2),d.hij(" ",n.Assunto," "),d.xp6(1),d.Q6J("ngIf",n.Sender)}}function P(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"ion-label",27),d.NdJ("click",function(){return d.CHM(n),d.oxw(3).viewDocument()}),d.YNc(1,k,4,2,"div",32),d.qZA()}if(2&t){var o=d.oxw(3);d.xp6(1),d.Q6J("ngForOf",o.LoadedDocument.Documents)}}function A(t,e){if(1&t&&(d.TgZ(0,"div",25),d.TgZ(1,"ion-list"),d.TgZ(2,"h5"),d._uU(3,"Documentos Anexados"),d.qZA(),d.TgZ(4,"ion-item",21),d.YNc(5,M,9,6,"ion-label",26),d.YNc(6,P,2,1,"ion-label",26),d.qZA(),d.qZA(),d.qZA()),2&t){var n=d.oxw(2);d.xp6(5),d.Q6J("ngIf",8==n.LoadedDocument.ApplicationId||8==n.LoadedDocument.ApplicationID),d.xp6(1),d.Q6J("ngIf",361==n.LoadedDocument.ApplicationId||361==n.LoadedDocument.ApplicationID)}}function T(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"div",7),d.TgZ(1,"div",8),d.TgZ(2,"div",9),d._UZ(3,"app-btn-modal-dismiss"),d.TgZ(4,"div",10),d.TgZ(5,"ion-label",11),d._uU(6),d.qZA(),d.qZA(),d.TgZ(7,"div",12),d.NdJ("click",function(){return d.CHM(n),d.oxw().openOptions()}),d._UZ(8,"ion-icon",13),d.qZA(),d.qZA(),d.qZA(),d.TgZ(9,"div",14),d.TgZ(10,"div",15),d.TgZ(11,"ion-label"),d.TgZ(12,"p"),d.TgZ(13,"span",16),d._uU(14),d.qZA(),d.YNc(15,v,2,1,"span",17),d.qZA(),d.qZA(),d.qZA(),d.qZA(),d._UZ(16,"div",18),d.TgZ(17,"div",19),d.YNc(18,x,2,0,"h5",20),d.YNc(19,Z,2,0,"h5",20),d.TgZ(20,"ion-item",21),d.TgZ(21,"ion-label"),d.TgZ(22,"div"),d.TgZ(23,"p"),d._uU(24),d.qZA(),d.qZA(),d.qZA(),d.qZA(),d.YNc(25,b,2,0,"h5",20),d.YNc(26,C,3,1,"ion-item",22),d.qZA(),d.YNc(27,A,7,2,"div",23),d.qZA()}if(2&t){var o=d.oxw();d.xp6(6),d.Oqu(o.LoadedDocument.Assunto),d.xp6(8),d.Oqu(o.customDate),d.xp6(1),d.Q6J("ngIf",o.LoadedDocument.Nature),d.xp6(3),d.Q6J("ngIf",361==o.LoadedDocument.ApplicationId||361==o.LoadedDocument.ApplicationID),d.xp6(1),d.Q6J("ngIf",8==o.LoadedDocument.ApplicationId||8==o.LoadedDocument.ApplicationID),d.xp6(5),d.Oqu(o.LoadedDocument.Interveners||o.LoadedDocument.Sender),d.xp6(1),d.Q6J("ngIf",361==o.LoadedDocument.ApplicationId||361==o.LoadedDocument.ApplicationID),d.xp6(1),d.Q6J("ngIf",361==o.LoadedDocument.ApplicationId||361==o.LoadedDocument.ApplicationID),d.xp6(1),d.Q6J("ngIf",o.LoadedDocument)}}function _(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"button",40),d.NdJ("click",function(){return d.CHM(n),d.oxw(2).openExpedientActionsModal("0")}),d._uU(1,"Efetuar Despacho"),d.qZA()}}function O(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"button",40),d.NdJ("click",function(){return d.CHM(n),d.oxw(2).openExpedientActionsModal("0")}),d._uU(1,"Efetuar Despacho"),d.qZA()}}function q(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"button",38),d.NdJ("click",function(){return d.CHM(n),d.oxw(2).openExpedientActionsModal("2")}),d._uU(1,"Pedido de Deferimento"),d.qZA()}}var y=function(){return["PR"]};function D(t,e){if(1&t){var n=d.EpF();d.TgZ(0,"div",34),d.TgZ(1,"div",35),d.YNc(2,_,2,0,"button",36),d.YNc(3,O,2,0,"button",36),d._UZ(4,"div",37),d.TgZ(5,"button",38),d.NdJ("click",function(){return d.CHM(n),d.oxw().openExpedientActionsModal("1")}),d._uU(6,"Solicitar Parecer"),d.qZA(),d.YNc(7,q,2,0,"button",39),d.TgZ(8,"button",38),d.NdJ("click",function(){return d.CHM(n),d.oxw().openBookMeetingModal()}),d._uU(9,"Marcar Reuni\xe3o"),d.qZA(),d.qZA(),d.qZA()}if(2&t){var o=d.oxw();d.xp6(2),d.Q6J("ngIf",o.p.userRole(d.DdM(3,y))),d.xp6(1),d.Q6J("ngIf",!o.p.userRole(d.DdM(4,y))),d.xp6(4),d.Q6J("ngIf",!o.p.userRole(d.DdM(5,y)))}}var I=function(){var e=function(){function e(n,o,i,a,r,s,c,d){t(this,e),this.navParams=n,this.modalController=o,this.alertService=i,this.processes=a,this.menu=r,this.iab=s,this.p=c,this.popoverController=d,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.LoadedDocument=null,this.task={},this.docId=this.navParams.get("docId"),this.applicationId=this.navParams.get("applicationId")}return n(e,[{key:"ngOnInit",value:function(){this.LoadDocumentDetails()}},{key:"LoadDocumentDetails",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.processes.GetDocumentDetails(this.docId,this.applicationId).subscribe(function(t){e.LoadedDocument=t,e.LoadedDocument.Subject=e.LoadedDocument.Assunto;var n,o=new Date(e.LoadedDocument.DateDispatch||e.LoadedDocument.DocDate);console.log(t),e.customDate=e.days[o.getDay()]+", "+o.getDate()+" de "+e.months[o.getMonth()];var i=e.LoadedDocument,a=e.LoadedDocument;361==e.LoadedDocument.ApplicationID||361==e.LoadedDocument.ApplicationId?n={serialNumber:a.DispatchNumber,taskStartDate:a.DateDispatch,isEvent:!0,workflowInstanceDataFields:{FsId:a.ApplicationID||a.ApplicationId,FolderID:a.FolderId||a.FolderID||a.folderId,DocId:a.DispatchNumber,Subject:a.Assunto}}:8==i.ApplicationID||8==i.ApplicationId?n={serialNumber:i.DocId,taskStartDate:i.DocDate,isEvent:!0,workflowInstanceDataFields:{FsId:i.ApplicationID||i.ApplicationId,FolderID:null,DocId:i.DocId||i.DocID,Subject:i.Assunto}}:console.log("unexpected ApplicationID"),e.task=n,console.log("this.task = task",e.task)});case 1:case"end":return t.stop()}},t,this)}))}},{key:"viewDocument",value:function(){var t=this;this.processes.GetDocumentUrl(this.docId,"8").subscribe(function(e){console.log(e);var n=e.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");t.iab.create(n,"_blank").show()})}},{key:"openMenu",value:function(){this.menu.open(),this.modalController.dismiss()}},{key:"close",value:function(){this.modalController.dismiss()}},{key:"notImplemented",value:function(){this.alertService.presentAlert("Funcionalidade em desenvolvimento")}},{key:"openExpedientActionsModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",e.next=3,this.modalController.create({component:r.F,componentProps:{taskAction:t,task:this.task,seachDocuments:this.LoadedDocument,aplicationId:this.LoadedDocument.ApplicationId||this.LoadedDocument.ApplicationID},cssClass:n});case 3:return o=e.sent,e.next=6,o.present();case 6:o.onDidDismiss().then(function(t){return(0,a.mG)(i,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}))});case 7:case"end":return e.stop()}},e,this)}))}},{key:"openBookMeetingModal",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions",t.next=3,this.modalController.create({component:s.l,componentProps:{task:this.task,document:this.LoadedDocument},cssClass:e,backdropDismiss:!1});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss();case 7:case"end":return t.stop()}},t,this)}))}},{key:"openOptions",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.popoverController.create({component:c.S,cssClass:"exp-options",componentProps:{task:this.task,LoadedDocument:this.LoadedDocument},translucent:!0});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){"openBookMeetingModal"==t.data.component?n.openBookMeetingModal():"openExpedientActionsModal"==t.data.component?n.openExpedientActionsModal(t.data.taskAction):(console.log(t.data),console.log("component not found"))});case 6:case"end":return t.stop()}},t,this)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(d.Y36(l.X1),d.Y36(l.IN),d.Y36(u.c),d.Y36(p.$),d.Y36(l._q),d.Y36(g.i),d.Y36(h.$),d.Y36(l.Dh))},e.\u0275cmp=d.Xpm({type:e,selectors:[["app-document-detail"]],decls:29,vars:2,consts:[[1,"main-content","d-flex","height-100"],["class","content d-flex flex-column",4,"ngIf"],["class","aside-right flex-column height-100",4,"ngIf"],["hidden",""],["animated","",2,"width","50%"],["animated","",2,"width","80%"],["color","medium","shape","round","expand","block"],[1,"content","d-flex","flex-column"],[1,"main-header"],[1,"title-content","width-100","d-flex","align-center"],[1,"middle","flex-grow-1"],[1,"title"],[1,"div-icon",3,"click"],["src","assets/images/icons-menu.svg",1,"font-25","cursor-pointer"],[1,"upper-content"],[1,"content-details"],[1,"date"],["class","label",4,"ngIf"],[1,"line"],[1,"middle-content"],[4,"ngIf"],[1,"ion-no-margin","ion-no-padding"],["class","ion-no-margin ion-no-padding",4,"ngIf"],["class","bottom-content width-100",4,"ngIf"],[1,"label"],[1,"bottom-content","width-100"],[3,"click",4,"ngIf"],[3,"click"],[1,"attach-title-item"],[1,"d-flex","justify-between",2,"justify-content","space-between"],[1,"span-left"],[1,"span-right"],[4,"ngFor","ngForOf"],["class","d-flex justify-between","style","justify-content: space-between",4,"ngIf"],[1,"aside-right","flex-column","height-100"],[1,"buttons"],["class","btn-ok","shape","round",3,"click",4,"ngIf"],[1,"solid"],["shape","round",1,"btn-cancel",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["shape","round",1,"btn-ok",3,"click"]],template:function(t,e){1&t&&(d.TgZ(0,"ion-content"),d.TgZ(1,"div",0),d.YNc(2,T,28,9,"div",1),d.YNc(3,D,10,6,"div",2),d.TgZ(4,"div",3),d.TgZ(5,"ion-list"),d.TgZ(6,"ion-list-header"),d.TgZ(7,"ion-label"),d._UZ(8,"ion-skeleton-text",4),d.qZA(),d.qZA(),d.TgZ(9,"ion-item"),d.TgZ(10,"ion-label"),d.TgZ(11,"h3"),d._UZ(12,"ion-skeleton-text",4),d.qZA(),d.TgZ(13,"p"),d._UZ(14,"ion-skeleton-text",5),d.qZA(),d.qZA(),d.qZA(),d.TgZ(15,"ion-item"),d.TgZ(16,"ion-label"),d.TgZ(17,"h3"),d._UZ(18,"ion-skeleton-text",4),d.qZA(),d.TgZ(19,"p"),d._UZ(20,"ion-skeleton-text",5),d.qZA(),d.qZA(),d.qZA(),d.TgZ(21,"ion-item"),d.TgZ(22,"ion-label"),d.TgZ(23,"h3"),d._UZ(24,"ion-skeleton-text",4),d.qZA(),d.TgZ(25,"p"),d._UZ(26,"ion-skeleton-text",5),d.qZA(),d.qZA(),d.qZA(),d.TgZ(27,"ion-button",6),d._UZ(28,"ion-skeleton-text",4),d.qZA(),d.qZA(),d.qZA(),d.qZA(),d.qZA()),2&t&&(d.xp6(2),d.Q6J("ngIf",e.LoadedDocument),d.xp6(1),d.Q6J("ngIf",e.LoadedDocument))},directives:[l.W2,m.O5,l.q_,l.yh,l.Q$,l.CK,l.Ie,l.YG,f.E,l.gu,m.sg],pipes:[m.uU],styles:[".content[_ngcontent-%COMP%]{padding:30px 20px 0!important;margin:0;float:left}.color-red[_ngcontent-%COMP%]{font-weight:500;color:#d30a0a!important}.btn-size[_ngcontent-%COMP%]{font-size:18px!important}.main-header[_ngcontent-%COMP%]{font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:auto;color:#000;transform:translate3d(0,1px,0)}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%]{width:360px;margin:0 auto;overflow:auto;padding:0!important;background:#fff}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%]{padding:0!important;float:left;width:280px;margin:2.5px 0 0 5px;display:flex;align-items:center}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{padding:0!important;float:right;font-size:25px;color:#0782c9;margin:5px 0 0}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%]{width:310px;overflow:auto;margin:0 auto}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-icon[_ngcontent-%COMP%]{width:30px;font-size:25px;float:left;padding:2px}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-contacts[_ngcontent-%COMP%]{width:275px;font-size:15px;color:#797979;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;float:left;padding:5px;margin:1px}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px;overflow:auto;float:left;padding-top:4px;padding-left:5px}.main-header[_ngcontent-%COMP%] .div-icon[_ngcontent-%COMP%]{width:40px;float:right;font-size:35px;overflow:auto;padding:1px}ion-item-group[_ngcontent-%COMP%]{margin:15px}ion-button[_ngcontent-%COMP%]{display:block;width:80%;margin:20px auto}.upper-content[_ngcontent-%COMP%]{font-family:Roboto;margin-left:41px;overflow:auto;font-size:18px}.upper-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:20px;background:#ffb703;float:right;padding:5px 13.5px;color:#fff}.upper-content[_ngcontent-%COMP%] .button-calendar-type[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:25px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%]{font-size:17px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{color:#797979}.middle-conten[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.bottom-content[_ngcontent-%COMP%]{margin:0 auto}.bottom-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;margin:0 0 0 10px}.bottom-content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{font-size:18px;width:100%;color:#0d89d1;padding-bottom:5px}.bottom-content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:14px;color:#666!important}.bottom-content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:14px;color:#666!important}.aside-right[_ngcontent-%COMP%]{padding:30px 20px 0!important}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:20px}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-delete[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-ok[_ngcontent-%COMP%]{height:auto!important;font-size:16px!important;font-weight:600!important;width:100%!important;margin-bottom:10px!important;padding:15px!important}.aside-right[_ngcontent-%COMP%] .solid[_ngcontent-%COMP%]{display:block;width:90%;border-top:1px solid #ebebeb;margin:0 auto 10px!important}@media only screen and (max-width: 800px){.content[_ngcontent-%COMP%]{width:100%!important}.aside-right[_ngcontent-%COMP%]{display:none}}@media only screen and (min-width: 801px){.div-icon[_ngcontent-%COMP%]{display:none}.content[_ngcontent-%COMP%]{width:65%;border-right:1px solid #d8d8d8}.aside-right[_ngcontent-%COMP%]{width:35%}}@media only screen and (min-width: 1024px){.content[_ngcontent-%COMP%]{width:70%}.aside-right[_ngcontent-%COMP%]{width:30%}}@media only screen and (min-width: 1140px){.content[_ngcontent-%COMP%]{width:75%}.aside-right[_ngcontent-%COMP%]{width:25%}}"]}),e}()},84943:function(e,o,i){"use strict";i.d(o,{l:function(){return B}});var a=i(64762),r=i(18119),s=i(4528),c=i(55199),d=i(3679),l=i(16738),u=i(25653),p=i(84393),g=i(37716),h=i(35957),m=i(39895),f=i(28621),v=i(37556),x=i(84465),Z=function(){var e=function(){function e(n){t(this,e),this.processes=n}return n(e,[{key:"setUpMeeting",value:function(t){return this.processes.documentSetUpMeeting(t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(g.LFG(f.$))},e.\u0275prov=g.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),b=i(80106),C=i(38583),M=i(98295),w=i(67441),k=i(72458),P=i(49983),A=i(43220),T=i(1491),_=i(17352),O=["picker"],q=["fim"],y=["inicio"],D=["picker1"];function I(t,e){1&t&&(g.TgZ(0,"div"),g._uU(1," Campo obrigat\xf3rio. "),g.qZA())}function S(t,e){1&t&&(g.TgZ(0,"div"),g._uU(1," O campo deve ter pelo menos 4 caracteres. "),g.qZA())}function N(t,e){if(1&t&&(g.TgZ(0,"div",70),g.YNc(1,I,2,0,"div",7),g.YNc(2,S,2,0,"div",7),g.qZA()),2&t){var n=g.oxw(2);g.xp6(1),g.Q6J("ngIf",null==n.Form.get("Subject").errors?null:n.Form.get("Subject").errors.required),g.xp6(1),g.Q6J("ngIf",null==n.Form.get("Subject").errors?null:n.Form.get("Subject").errors.minlength)}}function F(t,e){if(1&t&&(g.TgZ(0,"div"),g.YNc(1,N,3,2,"div",69),g.qZA()),2&t){var n=g.oxw();g.xp6(1),g.Q6J("ngIf",n.Form.get("Subject").invalid)}}function U(t,e){if(1&t&&(g.TgZ(0,"mat-option",71),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.s9C("value",n.Code),g.xp6(1),g.hij(" ",n.Description," ")}}function E(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"div",8),g.TgZ(1,"div",40),g.TgZ(2,"div",10),g._UZ(3,"ion-icon",16),g.qZA(),g.TgZ(4,"div",35),g.TgZ(5,"mat-form-field",72),g.TgZ(6,"input",73),g.NdJ("ngModelChange",function(t){return g.CHM(n),g.oxw().Occurrence=t}),g.qZA(),g._UZ(7,"mat-datepicker-toggle",74),g._UZ(8,"ngx-mat-datetime-picker",33,75),g.qZA(),g.qZA(),g.qZA(),g.qZA()}if(2&t){var o=g.MAs(9),i=g.oxw();g.xp6(6),g.Q6J("ngxMatDatetimePicker",o)("ngModel",i.Occurrence)("disabled",i.disabled),g.xp6(1),g.Q6J("for",o),g.xp6(1),g.Q6J("showSpinners",i.showSpinners)("showSeconds",i.showSeconds)("stepHour",i.stepHour)("stepMinute",i.stepMinute)("stepSecond",i.stepSecond)("touchUi",i.touchUi)}}function J(t,e){1&t&&(g.TgZ(0,"ion-label",76),g._uU(1,"Adicionar intervenientes*"),g.qZA())}function R(t,e){if(1&t&&(g.TgZ(0,"ion-label"),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.xp6(1),g.Oqu(n.Name)}}function Y(t,e){1&t&&(g.TgZ(0,"ion-label",76),g._uU(1,"Com conhecimento"),g.qZA())}function Q(t,e){if(1&t&&(g.TgZ(0,"ion-label"),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.xp6(1),g.Oqu(n.Name)}}function L(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"div",77),g.TgZ(1,"ion-list"),g.TgZ(2,"ion-item"),g.TgZ(3,"ion-label"),g.TgZ(4,"p",78),g.TgZ(5,"span",79),g._uU(6),g.qZA(),g.TgZ(7,"span",80),g._uU(8),g.qZA(),g.TgZ(9,"span",81),g.NdJ("click",function(){var t=g.CHM(n).index;return g.oxw().removeAttachment(t)}),g._UZ(10,"ion-icon",82),g.qZA(),g.qZA(),g.TgZ(11,"p"),g.TgZ(12,"span",83),g._uU(13),g.qZA(),g.TgZ(14,"span",84),g._uU(15),g.ALo(16,"date"),g.qZA(),g.qZA(),g.qZA(),g.qZA(),g.qZA(),g.qZA()}if(2&t){var o=e.$implicit;g.xp6(6),g.Oqu(o.Assunto),g.xp6(2),g.Oqu(o.appName),g.xp6(5),g.Oqu(o.EntidadeOrganicaNome),g.xp6(2),g.hij(" ",g.xi3(16,4,o.Data,"dd-MM-yyyy HH:mm")," ")}}function z(t,e){if(1&t&&g._UZ(0,"app-empty-container",85),2&t){var n=g.oxw();g.Q6J("texto",n.emptyTextDescription)}}function j(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"app-attendee-modal",86),g.NdJ("dynamicSetIntervenient",function(t){return g.CHM(n),g.oxw().dynamicSetIntervenient(t)}),g.qZA()}if(2&t){var o=g.oxw();g.Q6J("footer",!1)("taskParticipants",o.taskParticipants)("taskParticipantsCc",o.taskParticipantsCc)("adding",o.adding)}}var H=l||l,G={parse:{dateInput:"YYYY-MMMM-DD HH:mm"},display:{dateInput:"DD MMM YYYY H:mm",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},B=function(){var e=function(){function e(n,o,i,a,s,c,l,u){t(this,e),this.modalController=n,this.router=o,this.navParams=i,this.processes=a,this.toastService=c,this.documentService=l,this.calendarService=u,this.disabled=!1,this.showSpinners=!0,this.showSeconds=!1,this.touchUi=!1,this.enableMeridian=!1,this.minDate=new Date,this.stepHour=1,this.stepMinute=5,this.stepSecond=5,this.dateControlStart=new d.NI(H("DD MM YYYY hh")),this.dateControlEnd=new d.NI(H("DD MM YYYY hh")),this.p={},this.validateFrom=!1,this.recurringTypes=[],this.Occurrence=new Date,this.EventRecurrenceType="-1",this.showLoader=!1,this.taskParticipants=[],this.taskParticipantsCc=[],this.documents=[],this.attachments=[],this.adding="intervenient",this.formLocationSatus=!1,this.showAttendees=!1,this.emptyTextDescription="Sem intervenientes selecionados",this.searchDocumentPipe=p.G,this.loggeduser=s.ValidatedUser,this.task=this.navParams.get("task"),this.document=this.navParams.get("document"),this.postData=new r.j,this.postData.Body={BodyType:"1",Text:""},this.postData.Subject=this.task.workflowInstanceDataFields.Subject,this.postData.CalendarName="Oficial",this.postData.Category="Reuni\xe3o"}return n(e,[{key:"dateStart",get:function(){return window.innerWidth<801?this.postData.StartDate:this.dateControlStart.value}},{key:"dateEnd",get:function(){return window.innerWidth<801?this.postData.EndDate:this.dateControlEnd.value}},{key:"ngOnInit",value:function(){this.adding="intervenient",console.log(this.task),this.setDefaultTime(),this.getRecurrenceTypes()}},{key:"getRecurrenceTypes",value:function(){var t=this;this.calendarService.getRecurrenceTypes().subscribe(function(e){t.recurringTypes=e})}},{key:"setDefaultTime",value:function(){this.postData.StartDate=new Date,this.postData.EndDate=new Date((new Date).getTime()+9e5)}},{key:"close",value:function(){this.modalController.dismiss(null)}},{key:"goBack",value:function(){this.modalController.dismiss(null)}},{key:"runValidation",value:function(){this.validateFrom=!0}},{key:"dateValid",get:function(){return window.innerWidth<=800?this.postData.StartDate]+>/g,"")),null==this.postEvent.Attendees?this.taskParticipants=[]:this.postEvent.Attendees.forEach(function(t){t.IsRequired?l.taskParticipants.push(t):l.taskParticipantsCc.push(t)}),this.isRecurring=0==this.postEvent.IsRecurring?"N\xe3o se repete":"Repete",this.getAttachments(this.postEvent.EventId)}return n(e,[{key:"ngOnInit",value:function(){var t=this;window.onresize=function(e){window.innerWidth>=1024&&t.modalController.dismiss()},window.innerWidth>800&&(this.showAttendees=!0),this.getRecurrenceTypes(),setTimeout(function(){t.selectedRecurringType=t.postEvent.EventRecurrence.Type.toString()},500)}},{key:"close",value:function(){this.modalController.dismiss()}},{key:"goBack",value:function(){console.log(this.caller),this.router.navigate(["/home",this.caller])}},{key:"getRecurrenceTypes",value:function(){var t=this;this.eventsService.getRecurrenceTypes().subscribe(function(e){console.log(e),t.recurringTypes=e})}},{key:"onSelectedRecurringChanged",value:function(t){console.log(t),t.length>1&&(console.log(t.filter(function(t){return"-1"!=t})),this.selectedRecurringType=t.filter(function(t){return"-1"!=t})),0==t.length&&(this.selectedRecurringType="-1")}},{key:"runValidation",value:function(){this.validateFrom=!0}},{key:"injectValidation",value:function(){this.Form=new r.cw({Subject:new r.NI(this.postEvent.Subject,[r.kI.required]),Location:new r.NI(this.postEvent.Location,[r.kI.required]),CalendarName:new r.NI(this.postEvent.CalendarName,[r.kI.required]),Categories:new r.NI(this.postEvent.Category,[r.kI.required]),IsRecurring:new r.NI(this.postEvent.IsRecurring,[r.kI.required]),Date:new r.NI(new Date(this.postEvent.StartDate).getTime()801)){t.next=4;break}this.showAttendees=!0,t.next=10;break;case 4:return t.next=6,this.modalController.create({component:c.V,componentProps:{adding:this.adding,taskParticipants:this.taskParticipants,taskParticipantsCc:this.taskParticipantsCc},cssClass:"attendee",backdropDismiss:!1});case 6:return e=t.sent,t.next=9,e.present();case 9:e.onDidDismiss().then(function(t){if(t){var e=(t=t.data).taskParticipantsCc;n.setIntervenient(t.taskParticipants),n.setIntervenientCC(e)}});case 10:case"end":return t.stop()}},t,this)}))}},{key:"setIntervenient",value:function(t){this.taskParticipants=t,this.postEvent.Attendees=t}},{key:"setIntervenientCC",value:function(t){this.taskParticipantsCc=t}},{key:"addParticipants",value:function(){this.adding="intervenient",this.openAttendees()}},{key:"addParticipantsCC",value:function(){this.adding="CC",this.openAttendees()}},{key:"dynamicSetIntervenient",value:function(t){var e=t.taskParticipants,n=t.taskParticipantsCc;this.taskParticipants=e,this.taskParticipantsCc=n}},{key:"getAttachments",value:function(t){var e=this;this.attachmentsService.getAttachmentsById(t).subscribe(function(t){e.loadedEventAttachments=t,console.log("res",t)})}},{key:"deleteAttachment",value:function(t,e){"add"==this.loadedEventAttachments[e].Id?this.loadedEventAttachments=this.loadedEventAttachments.filter(function(t,n){return n!=e}):this.loadedEventAttachments[e].remove=!0}},{key:"getDoc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:d.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){return(0,a.mG)(n,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t&&(n=t.data,o={SourceName:n.selected.Assunto,ParentId:this.postEvent.EventId,SourceId:n.selected.Id,Stakeholders:!1,ApplicationId:n.selected.ApplicationType.toString(),CreateDate:!1,Id:"add",SourceTitle:n.selected.Assunto,Source:"1",Link:"",SerialNumber:""},console.log(this.loadedEventAttachments),this.loadedEventAttachments.push(o));case 1:case"end":return e.stop()}},e,this)}))});case 6:case"end":return t.stop()}},t,this)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(l.Y36(u.IN),l.Y36(u.X1),l.Y36(p.n),l.Y36(u.Br),l.Y36(g.o),l.Y36(h.k),l.Y36(m.F0))},e.\u0275cmp=l.Xpm({type:e,selectors:[["app-edit-event"]],decls:112,vars:34,consts:[[1,"main-content","height-100"],[1,"content","d-flex","flex-column","width-md-100","height-100"],[1,"main-header","pt-30","px-20","background-white","pb-15"],[1,"title-content"],[1,"middle"],[1,"title"],[1,"overflow-y-auto"],[1,"px-20"],[1,"ion-item-container","width-100"],["placeholder","Assunto*",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"container-div","width-100"],[1,"ion-item-class-2"],[1,"ion-icon-class"],["slot","start","src","assets/images/icons-location.svg"],[1,"ion-input-class"],["placeholder","Localiza\xe7\xe3o*",3,"ngModel","ngModelChange"],["slot","start","src","assets/images/icons-calendar.svg"],["placeholder","Selecione agenda*","interface","action-sheet","Cancel-text","Cancelar","required","",3,"selectedText","ngModel","ngModelChange"],["value","Oficial"],["value","Pessoal"],["placeholder","Selecione tipo de evento*","interface","action-sheet","Cancel-text","Cancelar","required","",3,"ngModel","selectedText","ngModelChange"],["value","Reuni\xe3o"],["value","Viagem"],["value","Confer\xeancia"],["value","Encontro"],[1,"ion-item-class-2","width-100"],[1,"ion-input-class","width-100"],["placeholder","In\xedcio","displayFormat","D MMM YYYY H:mm","minuteValues","0,15,30,45","monthShortNames","Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez","max","2025",3,"ngModel","min","ngModelChange"],["placeholder","Fim","displayFormat","D MMM YYYY H:mm","minuteValues","0,15,30,45","monthShortNames","Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez","max","2025",3,"ngModel","min","ngModelChange"],["slot","start","src","assets/images/icons-refresh.svg"],["placeholder","Selecione a repeti\xe7\xe3o*","interface","action-sheet","Cancel-text","Cancelar","required","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","container-div width-100",4,"ngIf"],[1,"ion-item-class-2","cursor-pointer",3,"click"],["slot","start","src","assets/images/icons-person.svg"],[1,"ion-input-class-no-height","d-flex"],[1,"list-people","flex-grow-1"],["lines","none"],["class","list-people-title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"add-people"],["slot","start","src","assets/images/icons-arrow-forward.svg"],[1,"ion-item-class-2","d-flex","width-100"],[1,"ion-icon-class","d-flex"],["slot","start","src","assets/images/icons-description.svg"],[1,"ion-input-class-no-height","width-100","flex-grow-1"],["placeholder","Detalhes",3,"ngModel","ngModelChange"],[1,"d-flex","container-div","width-100","ion-item-container-no-border"],[1,"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"],["class","aside-right flex-column height-100 d-none d-md-flex pt-10",3,"footer","taskParticipants","taskParticipantsCc","adding","dynamicSetIntervenient",4,"ngIf"],[1,"background-whit"],[1,"buttons"],["shape","round",1,"btn-cancel","cursor-pointer",3,"click"],["shape","round",1,"btn-ok","cursor-pointer",3,"click"],["class","input-errror-message",4,"ngIf"],[1,"input-errror-message"],[3,"value"],["placeholder","\xdaltima ocorr\xeancia","displayFormat","D MMM YYYY H:mm","minuteValues","0,15,30,45","monthShortNames","Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez","min","2021","max","2025",3,"ngModel","ngModelChange"],[1,"list-people-title"],[1,"d-flex","container-div","width-100"],["class","width-100 list",4,"ngIf"],[1,"width-100","list"],[1,"width-100","ion-no-border","ion-no-padding"],[1,"width-100"],[1,"p-item-title","d-flex","ion-justify-content-between"],[1,"attach-title-item"],[1,"close-button","text-black",3,"click"],["src","assets/images/icons-delete-25.svg",1,"font-20"],["class","app-name span-left",4,"ngIf"],[1,"app-name","span-left"],[1,"aside-right","flex-column","height-100","d-none","d-md-flex","pt-10",3,"footer","taskParticipants","taskParticipantsCc","adding","dynamicSetIntervenient"]],template:function(t,e){var n,o,i,a,r;(1&t&&(l.TgZ(0,"ion-content"),l.TgZ(1,"div",0),l.TgZ(2,"div",1),l.TgZ(3,"div",2),l.TgZ(4,"ion-header"),l.TgZ(5,"div",3),l.TgZ(6,"div",4),l.TgZ(7,"ion-label",5),l._uU(8,"Editar Evento"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(9,"ion-item-sliding",6),l.TgZ(10,"div",7),l.TgZ(11,"div",8),l.TgZ(12,"ion-input",9),l.NdJ("ngModelChange",function(t){return e.postEvent.Subject=t}),l.qZA(),l.qZA(),l.YNc(13,C,2,1,"div",10),l.TgZ(14,"div",11),l.TgZ(15,"div",12),l.TgZ(16,"div",13),l._UZ(17,"ion-icon",14),l.qZA(),l.TgZ(18,"div",15),l.TgZ(19,"ion-input",16),l.NdJ("ngModelChange",function(t){return e.postEvent.Location=t}),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.YNc(20,P,2,1,"div",10),l.TgZ(21,"div",11),l.TgZ(22,"div",12),l.TgZ(23,"div",13),l._UZ(24,"ion-icon",17),l.qZA(),l.TgZ(25,"div",15),l.TgZ(26,"ion-select",18),l.NdJ("ngModelChange",function(t){return e.postEvent.CalendarName=t}),l.TgZ(27,"ion-select-option",19),l._uU(28,"Oficial"),l.qZA(),l.TgZ(29,"ion-select-option",20),l._uU(30,"Pessoal"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.YNc(31,_,2,1,"div",10),l.TgZ(32,"div",11),l.TgZ(33,"div",12),l.TgZ(34,"div",13),l._UZ(35,"ion-icon",17),l.qZA(),l.TgZ(36,"div",15),l.TgZ(37,"ion-select",21),l.NdJ("ngModelChange",function(t){return e.postEvent.Category=t}),l.TgZ(38,"ion-select-option",22),l._uU(39,"Reuni\xe3o"),l.qZA(),l.TgZ(40,"ion-select-option",23),l._uU(41,"Viagem"),l.qZA(),l.TgZ(42,"ion-select-option",24),l._uU(43,"Confer\xeancia"),l.qZA(),l.TgZ(44,"ion-select-option",25),l._uU(45,"Encontro"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.YNc(46,y,2,1,"div",10),l.TgZ(47,"div",11),l.TgZ(48,"div",26),l.TgZ(49,"div",13),l._UZ(50,"ion-icon",17),l.qZA(),l.TgZ(51,"div",27),l.TgZ(52,"ion-datetime",28),l.NdJ("ngModelChange",function(t){return e.postEvent.StartDate=t}),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(53,"div",11),l.TgZ(54,"div",12),l.TgZ(55,"div",13),l._UZ(56,"ion-icon",17),l.qZA(),l.TgZ(57,"div",15),l.TgZ(58,"ion-datetime",29),l.NdJ("ngModelChange",function(t){return e.postEvent.EndDate=t}),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(59,"div",11),l.TgZ(60,"div",12),l.TgZ(61,"div",13),l._UZ(62,"ion-icon",30),l.qZA(),l.TgZ(63,"div",15),l.TgZ(64,"ion-select",31),l.NdJ("ngModelChange",function(t){return e.selectedRecurringType=t})("ngModelChange",function(t){return e.onSelectedRecurringChanged(t)}),l.YNc(65,D,2,2,"ion-select-option",32),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.YNc(66,I,6,1,"div",33),l.TgZ(67,"div",11),l.TgZ(68,"div",34),l.NdJ("click",function(){return e.addParticipants()}),l.TgZ(69,"div",13),l._UZ(70,"ion-icon",35),l.qZA(),l.TgZ(71,"div",36),l.TgZ(72,"div",37),l.TgZ(73,"ion-item",38),l.TgZ(74,"ion-list"),l.YNc(75,S,2,0,"ion-label",39),l.YNc(76,N,2,1,"ion-label",40),l.qZA(),l.qZA(),l.qZA(),l.TgZ(77,"div",41),l._UZ(78,"ion-icon",42),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(79,"div",11),l.TgZ(80,"div",34),l.NdJ("click",function(){return e.addParticipantsCC()}),l.TgZ(81,"div",13),l._UZ(82,"ion-icon",35),l.qZA(),l.TgZ(83,"div",36),l.TgZ(84,"div",37),l.TgZ(85,"ion-item",38),l.TgZ(86,"ion-list"),l.YNc(87,F,2,0,"ion-label",39),l.YNc(88,U,2,1,"ion-label",40),l.qZA(),l.qZA(),l.qZA(),l.TgZ(89,"div",41),l._UZ(90,"ion-icon",42),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(91,"div",11),l.TgZ(92,"div",43),l.TgZ(93,"div",44),l._UZ(94,"ion-icon",45),l.qZA(),l.TgZ(95,"div",46),l.TgZ(96,"ion-textarea",47),l.NdJ("ngModelChange",function(t){return e.postEvent.Body.Text=t}),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(97,"div",48),l.TgZ(98,"ion-label",49),l.NdJ("click",function(){return e.getDoc()}),l.TgZ(99,"div",50),l._UZ(100,"ion-icon",51),l.qZA(),l.TgZ(101,"div",52),l.TgZ(102,"ion-label"),l._uU(103,"Adicionar documentos"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.YNc(104,Q,2,1,"div",53),l.qZA(),l.qZA(),l.qZA(),l.YNc(105,L,1,5,"app-attendee-modal",54),l.qZA(),l.qZA(),l.TgZ(106,"ion-footer",55),l.TgZ(107,"div",56),l.TgZ(108,"button",57),l.NdJ("click",function(){return e.close()}),l._uU(109,"Cancelar"),l.qZA(),l.TgZ(110,"button",58),l.NdJ("click",function(){return e.save()}),l._uU(111,"Gravar"),l.qZA(),l.qZA(),l.qZA()),2&t)&&(l.xp6(11),l.ekj("input-error",(null==e.Form||null==(n=e.Form.get("Subject"))?null:n.invalid)&&e.validateFrom),l.xp6(1),l.Q6J("ngModel",e.postEvent.Subject),l.xp6(1),l.Q6J("ngIf",e.Form&&e.validateFrom),l.xp6(5),l.ekj("input-error",(null==e.Form||null==(o=e.Form.get("Location"))?null:o.invalid)&&e.validateFrom),l.xp6(1),l.Q6J("ngModel",e.postEvent.Location),l.xp6(1),l.Q6J("ngIf",e.Form&&e.validateFrom),l.xp6(6),l.s9C("selectedText",e.postEvent.CalendarName),l.Q6J("ngModel",e.postEvent.CalendarName),l.xp6(5),l.Q6J("ngIf",e.Form&&e.validateFrom),l.xp6(5),l.ekj("input-error",(null==e.Form||null==(i=e.Form.get("Categories"))?null:i.invalid)&&e.validateFrom),l.xp6(1),l.s9C("selectedText",e.postEvent.Category),l.Q6J("ngModel",e.postEvent.Category),l.xp6(9),l.Q6J("ngIf",e.Form&&e.validateFrom),l.xp6(5),l.ekj("input-error",(null==e.Form||null==(a=e.Form.get("Date"))?null:a.invalid)&&e.validateFrom),l.xp6(1),l.s9C("min",e.minDate),l.Q6J("ngModel",e.postEvent.StartDate),l.xp6(5),l.ekj("input-error",(null==e.Form||null==(r=e.Form.get("Date"))?null:r.invalid)&&e.validateFrom),l.xp6(1),l.s9C("min",e.minDate),l.Q6J("ngModel",e.postEvent.EndDate),l.xp6(6),l.Q6J("ngModel",e.selectedRecurringType),l.xp6(1),l.Q6J("ngForOf",e.recurringTypes),l.xp6(1),l.Q6J("ngIf","-1"!=e.selectedRecurringType),l.xp6(9),l.Q6J("ngIf",(null==e.taskParticipants?null:e.taskParticipants.length)<1),l.xp6(1),l.Q6J("ngForOf",e.taskParticipants),l.xp6(11),l.Q6J("ngIf",(null==e.taskParticipantsCc?null:e.taskParticipantsCc.length)<1),l.xp6(1),l.Q6J("ngForOf",e.taskParticipantsCc),l.xp6(8),l.Q6J("ngModel",e.postEvent.Body.Text),l.xp6(8),l.Q6J("ngForOf",e.loadedEventAttachments),l.xp6(1),l.Q6J("ngIf",e.showAttendees))},directives:[u.W2,u.Gu,u.Q$,u.td,u.pK,u.j9,r.JJ,r.On,f.O5,u.gu,u.t9,u.QI,r.Q7,u.n0,u.x4,f.sg,u.Ie,u.q_,u.g2,u.fr,v.Y],styles:[".header-md[_ngcontent-%COMP%]:after, .title-content[_ngcontent-%COMP%]:after{display:none}.content[_ngcontent-%COMP%]{margin:0;float:left;border-left:1px solid #d8d8d8!important}.main-header[_ngcontent-%COMP%]{font-family:Roboto;background-color:#fff;overflow:hidden;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}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px}.ion-item-container[_ngcontent-%COMP%]{margin:15px auto;border:1px solid #ebebeb;border-radius:5px;padding-left:10px}.ion-item-container-no-border[_ngcontent-%COMP%]{width:100%;margin:0 auto;padding:0!important}.container-div[_ngcontent-%COMP%]{margin-bottom:15px;float:left}.ion-item-class-2[_ngcontent-%COMP%]{margin:0 auto}.ion-icon-class[_ngcontent-%COMP%]{width:45px;height:45px;float:left;padding:10px;font-size:25px}ion-select[_ngcontent-%COMP%]{padding-left:5px;margin-left:0}.ion-input-class[_ngcontent-%COMP%]{height:45px;padding-left:5px;padding-right:10px;float:left}.ion-input-class[_ngcontent-%COMP%], .ion-input-class-no-height[_ngcontent-%COMP%]{width:calc(100% - 45px);border:1px solid #ebebeb;border-radius:5px}.list-people[_ngcontent-%COMP%]{float:left}.add-people[_ngcontent-%COMP%]{width:45px;float:right;overflow:auto;font-size:25px;padding:10px}.list-people-title[_ngcontent-%COMP%]{color:#a3a3a3}.attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.attach-title-item[_ngcontent-%COMP%]{width:100%;font-size:15px;color:#0d89d1}.span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.container-footer[_ngcontent-%COMP%]{margin:0 auto;overflow:auto}.button-cancel[_ngcontent-%COMP%]{--background:#e0e9ee;--color:#061b52}.button-cancel[_ngcontent-%COMP%], .button-save[_ngcontent-%COMP%]{width:170px;height:44px;border-radius:22.5px;margin:10px}.button-save[_ngcontent-%COMP%]{--background:#42b9fe;--color:#fff}.text-input[_ngcontent-%COMP%]{width:100%;border:1px solid #ebebeb;margin:0 15px 15px 0;padding:0!important;border-radius:5px}.error[_ngcontent-%COMP%]{font-size:12px;font-weight:700;padding-bottom:20px}.error[_ngcontent-%COMP%], .span-color[_ngcontent-%COMP%]{color:red}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:20px;overflow:auto}.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}"]}),e}()},75008:function(e,o,i){"use strict";i.d(o,{u:function(){return A}});var a=i(64762),r=i(18119),s=i(97049),c=i(23066),d=i(97047),l=i(37716),u=i(35957),p=i(80106),g=i(20985),h=i(53760),m=i(28621),f=i(39895),v=i(84465),x=i(38583);function Z(t,e){1&t&&(l.TgZ(0,"p"),l._uU(1,"(N\xe3o se repete)"),l.qZA())}function b(t,e){1&t&&(l.TgZ(0,"p"),l._uU(1,"Repete"),l.qZA())}function C(t,e){if(1&t&&(l.TgZ(0,"div"),l.TgZ(1,"p"),l._uU(2),l.qZA(),l.qZA()),2&t){var n=e.$implicit;l.xp6(2),l.Oqu(n.Name)}}function M(t,e){if(1&t&&(l.TgZ(0,"div"),l.TgZ(1,"h5"),l._uU(2,"Intervenientes"),l.qZA(),l.TgZ(3,"ion-item",30),l.TgZ(4,"ion-label"),l.YNc(5,C,3,1,"div",31),l.qZA(),l.qZA(),l.qZA()),2&t){var n=l.oxw();l.xp6(5),l.Q6J("ngForOf",n.loadedEvent.Attendees)}}function w(t,e){if(1&t&&(l.TgZ(0,"div"),l.TgZ(1,"h5"),l._uU(2,"Detalhes"),l.qZA(),l.TgZ(3,"ion-item",32),l._UZ(4,"div",33),l.qZA(),l._UZ(5,"div",22),l.qZA()),2&t){var n=l.oxw();l.xp6(4),l.Q6J("innerHTML",n.loadedEvent.Body.Text,l.oJD)}}function k(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"ion-item",30),l.TgZ(1,"ion-label",37),l.TgZ(2,"p",38),l.NdJ("click",function(){var t=l.CHM(n).$implicit;return l.oxw(2).viewDocument(t.SourceId)}),l.TgZ(3,"span",39),l._uU(4),l.qZA(),l.TgZ(5,"span",40),l._uU(6),l.qZA(),l.qZA(),l.TgZ(7,"div",41),l.TgZ(8,"span",42),l._uU(9),l.ALo(10,"date"),l.qZA(),l.qZA(),l.TgZ(11,"div",43),l.NdJ("click",function(){var t=l.CHM(n).index,e=l.oxw(2);return e.docIndex(t),e.openTaskOptions()}),l._UZ(12,"ion-icon",44),l.qZA(),l.qZA(),l.qZA()}if(2&t){var o=e.$implicit;l.xp6(4),l.Oqu(o.SourceName),l.xp6(2),l.Oqu(o.Stakeholders),l.xp6(3),l.Oqu(l.xi3(10,3,o.CreateDate,"dd-MM-yyyy HH:mm"))}}function P(t,e){if(1&t&&(l.TgZ(0,"div",34),l.TgZ(1,"h5"),l._uU(2,"Documentos Anexados"),l.qZA(),l.TgZ(3,"ion-list",35),l.YNc(4,k,13,6,"ion-item",36),l.qZA(),l.qZA()),2&t){var n=l.oxw();l.xp6(4),l.Q6J("ngForOf",n.loadedAttachments)}}var A=function(){var e=function(){function e(n,o,i,a,s,c,d,l,u,p,g){var h=this;t(this,e),this.modalController=n,this.eventsService=o,this.attachmentsService=i,this.alertController=a,this.iab=s,this.processes=c,this.popoverController=d,this.activatedRoute=l,this.router=u,this.toastService=p,this.location=g,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.dicIndex=0,this.isModal=!1,this.isEventEdited=!1,this.loadedEvent=new r.j,this.eventBody={BodyType:"1",Text:""},this.loadedEvent.Body=this.eventBody,this.activatedRoute.paramMap.subscribe(function(t){h.eventId=t.params.eventId,t.params.caller&&(h.caller=t.params.caller),t.params.isModal&&(h.isModal=t.params.isModal)})}return n(e,[{key:"ngOnInit",value:function(){var t=this;this.loadEvent(),this.getAttachments(),window.onresize=function(e){window.innerWidth>=1024&&t.modalController.dismiss(t.isEventEdited)}}},{key:"close",value:function(){this.modalController.dismiss(this.isEventEdited)}},{key:"goBack",value:function(){var t=this;this.isModal?this.close():this.activatedRoute.paramMap.subscribe(function(e){"expediente"==e.params.caller?window.history.back():t.router.navigate(["/home",e.params.caller])})}},{key:"loadEvent",value:function(){var t=this,e=this.toastService.loading();this.eventsService.getEvent(this.eventId).subscribe(function(n){t.loadedEvent=n,e.remove()},function(n){t.toastService.badRequest(0==n.status?"n\xe3o \xe9 poss\xedvel vizualizar este event no modo offline":"Este evento j\xe1 n\xe3o existe na sua agenda"),e.remove(),t.modalController.dismiss("Eevent not Foud"),t.location.back()})}},{key:"deleteEvent",value:function(){var t=this;this.eventsService.deleteEvent(this.loadedEvent.EventId,0).subscribe(function(){return(0,a.mG)(t,void 0,void 0,regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.alertController.create({cssClass:"my-custom-class",header:"Evento removido",buttons:["OK"]});case 2:e=t.sent,setTimeout(function(){e.dismiss()},1500),this.goBack(),this.toastService.successMessage("Evento apagado");case 4:case"end":return t.stop()}},t,this)}))})}},{key:"OpenDeleteEventModal",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:d.L,componentProps:{eventId:this.loadedEvent.EventId,caller:this.caller},cssClass:"discart-expedient-modal"});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){console.log(t),t&&(setTimeout(function(){n.loadEvent(),n.getAttachments()},250),n.isEventEdited=!0)});case 6:case"end":return t.stop()}},t,this)}))}},{key:"getAttachments",value:function(){var t=this,e=this.toastService.loading();try{this.attachmentsService.getAttachmentsById(this.eventId).subscribe(function(e){t.loadedAttachments=e,console.log(e)})}catch(n){}finally{e.remove()}}},{key:"editEventDetail",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(this.caller),t.next=3,this.modalController.create({component:s.f,componentProps:{eventId:this.loadedEvent.EventId,caller:this.caller},cssClass:"modal modal-desktop"});case 3:return e=t.sent,t.next=6,e.present();case 6:e.onDidDismiss().then(function(t){console.log(t),t&&(setTimeout(function(){n.loadEvent(),n.getAttachments()},250),n.isEventEdited=!0)});case 7:case"end":return t.stop()}},t,this)}))}},{key:"editEvent",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(this.loadedEvent),e=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",t.next=3,this.modalController.create({component:s.f,componentProps:{event:this.loadedEvent,caller:this.caller},cssClass:e});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){console.log(t),t&&(setTimeout(function(){o.loadEvent(),o.getAttachments()},250),o.isEventEdited=!0)});case 7:case"end":return t.stop()}},t,this)}))}},{key:"viewDocument",value:function(t){var e=this;this.processes.GetDocumentUrl(t,"8").subscribe(function(t){var n=t.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");e.iab.create(n,"_blank").show()})}},{key:"openTaskOptions",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.loadedAttachments[this.dicIndex],n={serialNumber:e.SourceId,taskStartDate:e.CreateDate,isEvent:!0,workflowInstanceDataFields:{FsId:e.ApplicationId,FolderID:null,DocId:e.SourceId,Subject:e.SourceName}},t.next=4,this.popoverController.create({component:c.M,cssClass:"exp-options",componentProps:{fulltask:n,task:n},translucent:!0});case 4:return o=t.sent,t.next=7,o.present();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}},t,this)}))}},{key:"docIndex",value:function(t){this.dicIndex=t}}]),e}();return e.\u0275fac=function(t){return new(t||e)(l.Y36(u.IN),l.Y36(p.n),l.Y36(g.o),l.Y36(u.Br),l.Y36(h.i),l.Y36(m.$),l.Y36(u.Dh),l.Y36(f.gz),l.Y36(f.F0),l.Y36(v.k),l.Y36(x.Ye))},e.\u0275cmp=l.Xpm({type:e,selectors:[["app-view-event"]],decls:49,vars:20,consts:[[1,"ion-no-border"],[1,"main-content-l","height-100","white"],[1,"main-content","d-flex","height-100",3,"className"],[1,"content","d-flex","flex-column","width-100"],[1,"main-header","d-flex"],[1,"title-content","d-flex","justify-between","width-100"],[1,"left"],[1,"btn-no-color","d-flex","align-center",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"middle"],[1,"title"],[1,"menu-options","d-flex"],[1,"btn-no-color",3,"click"],["slot","end","src","assets/images/icons-edit.svg",1,"edit"],["name","trash-sharp",1,"delete"],[1,"overflow-y-auto"],[1,"upper-content","ml-45"],[1,"content-location"],[1,"date"],[1,"label"],[1,"content-details"],[4,"ngIf"],[1,"line"],[1,"middle-content"],["class","bottom-content width-100",4,"ngIf"],[1,"aside-right","flex-column","height-100"],[1,"buttons"],["full","","shape","round",1,"btn-ok",3,"click"],[1,"solid"],["full","","shape","round",1,"btn-delete",3,"click"],[1,"ion-no-margin","ion-no-padding"],[4,"ngFor","ngForOf"],["lines","none",1,"ion-no-margin","ion-no-padding"],["disabled","","rows","6",1,"width-100",3,"innerHTML"],[1,"bottom-content","width-100"],[1,"width-100"],["class","width-100","class","ion-no-margin ion-no-padding",4,"ngFor","ngForOf"],[1,"width-100","d-flex"],[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"],["autoHide","false",1,"cursor-pointer",2,"width","35px","height","41px",3,"click"],["src","assets/images/icons-menu.svg"]],template:function(t,e){1&t&&(l.TgZ(0,"ion-header",0),l._UZ(1,"app-header"),l.qZA(),l.TgZ(2,"ion-content",1),l.TgZ(3,"div",2),l.TgZ(4,"div",3),l.TgZ(5,"div",4),l.TgZ(6,"div",5),l.TgZ(7,"div",6),l.TgZ(8,"button",7),l.NdJ("click",function(){return e.goBack()}),l._UZ(9,"ion-icon",8),l.qZA(),l.qZA(),l.TgZ(10,"div",9),l.TgZ(11,"p",10),l.TgZ(12,"span"),l._uU(13),l.qZA(),l.qZA(),l.qZA(),l.TgZ(14,"div",11),l.TgZ(15,"button",12),l.NdJ("click",function(){return e.editEvent()}),l._UZ(16,"ion-icon",13),l.qZA(),l.TgZ(17,"button",12),l.NdJ("click",function(){return e.deleteEvent()}),l._UZ(18,"ion-icon",14),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(19,"div",15),l.TgZ(20,"div",16),l.TgZ(21,"div",17),l.TgZ(22,"p"),l.TgZ(23,"span",18),l._uU(24),l.qZA(),l.TgZ(25,"span",19),l._uU(26),l.qZA(),l.qZA(),l.qZA(),l.TgZ(27,"div",20),l.TgZ(28,"ion-label"),l.TgZ(29,"p"),l._uU(30),l.qZA(),l.TgZ(31,"p"),l._uU(32),l.ALo(33,"date"),l.ALo(34,"date"),l.qZA(),l.YNc(35,Z,2,0,"p",21),l.YNc(36,b,2,0,"p",21),l.qZA(),l.qZA(),l.qZA(),l._UZ(37,"div",22),l.TgZ(38,"div",23),l.YNc(39,M,6,1,"div",21),l.YNc(40,w,6,1,"div",21),l.qZA(),l.YNc(41,P,5,1,"div",24),l.qZA(),l.qZA(),l.TgZ(42,"div",25),l.TgZ(43,"div",26),l.TgZ(44,"button",27),l.NdJ("click",function(){return e.editEvent()}),l._uU(45,"Editar"),l.qZA(),l._UZ(46,"div",28),l.TgZ(47,"button",29),l.NdJ("click",function(){return e.deleteEvent()}),l._uU(48,"Eliminar"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA()),2&t&&(l.ekj("d-md-none",e.isModal),l.xp6(3),l.Q6J("className",e.isModal?"_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white":"main-content d-flex height-100"),l.xp6(10),l.Oqu(e.loadedEvent.Subject),l.xp6(11),l.Oqu(e.loadedEvent.Location),l.xp6(2),l.Oqu(e.loadedEvent.CalendarName),l.xp6(4),l.Oqu(e.customDate),l.xp6(2),l.AsE("das ",l.xi3(33,14,e.loadedEvent.StartDate,"HH:mm")," \xe0s ",l.xi3(34,17,e.loadedEvent.EndDate,"HH:mm"),""),l.xp6(3),l.Q6J("ngIf",!e.loadedEvent.IsRecurring),l.xp6(1),l.Q6J("ngIf",e.loadedEvent.IsRecurring),l.xp6(3),l.Q6J("ngIf",e.loadedEvent.Attendees),l.xp6(1),l.Q6J("ngIf",e.loadedEvent.Body.Text),l.xp6(1),l.Q6J("ngIf",e.loadedAttachments))},styles:["ion-content[_ngcontent-%COMP%]{--background:transparent;overflow:auto}ion-menu[_ngcontent-%COMP%]{--height:225px}.header-toolbar[_ngcontent-%COMP%]{--background:transparent;--opacity:1}.main-header[_ngcontent-%COMP%]{width:100%;font-family:Roboto;background-color:#fff;color:#000;transform:translate3d(0,1px,0)}.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%] .menu-options[_ngcontent-%COMP%]{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;align-items:flex-start;justify-content:flex-start;float:right;padding:1px;margin-left:15px}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .menu-options[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{font-size:35px;float:left}.main-header[_ngcontent-%COMP%] .title-content[_ngcontent-%COMP%] .menu-options[_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;background-color:#fff!important;border-top-left-radius:25px;border-top-right-radius:25px;overflow:auto}.main-content[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:30px 20px 0!important;margin:0;float:left}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%]{width:calc(100%-50px);margin-left:50px;overflow:auto;font-size:18px}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .content-location[_ngcontent-%COMP%]{width:100%;margin:0 auto;padding:0;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%]{border-radius:20px;background:#ffb703;float:right;padding:5px 13.5px;color:#fff}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .location-detail[_ngcontent-%COMP%]{width:210px;font-weight:700;font-size:18px;float:left;margin:5px 5px 5px 0}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-mdgpr-Oficial[_ngcontent-%COMP%]{width:91px;--border-radius:20px;--background:#ffb703;margin-left:5px;float:left}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-mdgpr-Pessoal[_ngcontent-%COMP%]{width:91px;--border-radius:20px;--background:#f05d5e;margin-left:5px;float:left}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-pr-Oficial[_ngcontent-%COMP%]{width:91px;--border-radius:20px;--background:#cbeecb;margin-left:5px;float:left}.main-content[_ngcontent-%COMP%] .upper-content[_ngcontent-%COMP%] .button-pr-Pessoal[_ngcontent-%COMP%]{width:91px;--border-radius:20px;--background:#cab0dc;margin-left:5px;float:left}.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-conten[_ngcontent-%COMP%]{width:100%!important;overflow:auto}.main-content[_ngcontent-%COMP%] .middle-conten[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .main-content[_ngcontent-%COMP%] .middle-conten[_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}.aside-right[_ngcontent-%COMP%]{padding:30px 20px 0!important}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:20px}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-delete[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-ok[_ngcontent-%COMP%]{height:auto!important;font-size:16px!important;font-weight:600!important;width:100%!important;margin-bottom:10px!important;padding:15px!important}.aside-right[_ngcontent-%COMP%] .solid[_ngcontent-%COMP%]{display:block;width:90%;border-top:1px solid #ebebeb;margin:0 auto 10px!important}textarea[_ngcontent-%COMP%]{border:none;--background:#fff!important}@media only screen and (max-width: 800px){.content[_ngcontent-%COMP%]{width:100%!important}.aside-right[_ngcontent-%COMP%]{display:none}}@media only screen and (min-width: 801px){.menu-options[_ngcontent-%COMP%]{display:none!important}.content[_ngcontent-%COMP%]{width:65%;border-right:1px solid #d8d8d8}.aside-right[_ngcontent-%COMP%]{width:35%}}@media only screen and (min-width: 1024px){.content[_ngcontent-%COMP%]{width:70%}.aside-right[_ngcontent-%COMP%]{width:30%}}@media only screen and (min-width: 1140px){.content[_ngcontent-%COMP%]{width:75%}.aside-right[_ngcontent-%COMP%]{width:25%}}"]}),e}()},83189:function(e,o,i){"use strict";i.d(o,{k:function(){return B}});var a=i(64762),r=i(18119),s=i(45896),c=i(4528),d=i(55199),l=i(3679),u=i(16738),p=i(25653),g=i(37716),h=i(35957),m=i(39895),f=i(28621),v=i(20985),x=i(80106),Z=i(37556),b=i(84465),C=i(38583),M=i(98295),w=i(67441),k=i(72458),P=i(49983),A=i(43220),T=i(1491),_=i(17352),O=["picker"],q=["fim"],y=["inicio"],D=["picker1"];function I(t,e){1&t&&(g.TgZ(0,"div"),g._uU(1," Campo obrigat\xf3rio. "),g.qZA())}function S(t,e){1&t&&(g.TgZ(0,"div"),g._uU(1," O campo deve ter pelo menos 4 caracteres. "),g.qZA())}function N(t,e){if(1&t&&(g.TgZ(0,"div",71),g.YNc(1,I,2,0,"div",7),g.YNc(2,S,2,0,"div",7),g.qZA()),2&t){var n=g.oxw(2);g.xp6(1),g.Q6J("ngIf",null==n.Form.get("Subject").errors?null:n.Form.get("Subject").errors.required),g.xp6(1),g.Q6J("ngIf",null==n.Form.get("Subject").errors?null:n.Form.get("Subject").errors.minlength)}}function F(t,e){if(1&t&&(g.TgZ(0,"div"),g.YNc(1,N,3,2,"div",70),g.qZA()),2&t){var n=g.oxw();g.xp6(1),g.Q6J("ngIf",n.Form.get("Subject").invalid)}}function U(t,e){if(1&t&&(g.TgZ(0,"mat-option",72),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.s9C("value",n.Code),g.xp6(1),g.hij(" ",n.Description," ")}}function E(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"div",8),g.TgZ(1,"div",41),g.TgZ(2,"div",10),g._UZ(3,"ion-icon",16),g.qZA(),g.TgZ(4,"div",73),g.NdJ("click",function(){return g.CHM(n),g.oxw().openLastOccurrence()}),g.TgZ(5,"mat-form-field",74),g.TgZ(6,"input",75),g.NdJ("ngModelChange",function(t){return g.CHM(n),g.oxw().Occurrence=t}),g.qZA(),g._UZ(7,"mat-datepicker-toggle",76),g._UZ(8,"ngx-mat-datetime-picker",33,77),g.qZA(),g.qZA(),g.qZA(),g.qZA()}if(2&t){var o=g.MAs(9),i=g.oxw();g.xp6(6),g.Q6J("ngxMatDatetimePicker",o)("ngModel",i.Occurrence)("disabled",i.disabled),g.xp6(1),g.Q6J("for",o),g.xp6(1),g.Q6J("showSpinners",i.showSpinners)("showSeconds",i.showSeconds)("stepHour",i.stepHour)("stepMinute",i.stepMinute)("stepSecond",i.stepSecond)("touchUi",i.touchUi)}}function J(t,e){1&t&&(g.TgZ(0,"ion-label",78),g._uU(1,"Adicionar intervenientes*"),g.qZA())}function R(t,e){if(1&t&&(g.TgZ(0,"ion-label"),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.xp6(1),g.Oqu(n.Name)}}function Y(t,e){1&t&&(g.TgZ(0,"ion-label",78),g._uU(1,"Com conhecimento"),g.qZA())}function Q(t,e){if(1&t&&(g.TgZ(0,"ion-label"),g._uU(1),g.qZA()),2&t){var n=e.$implicit;g.xp6(1),g.Oqu(n.Name)}}function L(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"div",79),g.TgZ(1,"ion-list"),g.TgZ(2,"ion-item"),g.TgZ(3,"ion-label"),g.TgZ(4,"p",80),g.TgZ(5,"span",81),g._uU(6),g.qZA(),g.TgZ(7,"span",82),g._uU(8),g.qZA(),g.TgZ(9,"span",83),g.NdJ("click",function(){var t=g.CHM(n).index;return g.oxw().removeAttachment(t)}),g._UZ(10,"ion-icon",84),g.qZA(),g.qZA(),g.TgZ(11,"p"),g.TgZ(12,"span",85),g._uU(13),g.qZA(),g.TgZ(14,"span",86),g._uU(15),g.ALo(16,"date"),g.qZA(),g.qZA(),g.qZA(),g.qZA(),g.qZA(),g.qZA()}if(2&t){var o=e.$implicit;g.xp6(6),g.Oqu(o.Assunto),g.xp6(2),g.Oqu(o.appName),g.xp6(5),g.Oqu(o.EntidadeOrganicaNome),g.xp6(2),g.hij(" ",g.xi3(16,4,o.Data,"dd-MM-yyyy HH:mm")," ")}}function z(t,e){if(1&t&&g._UZ(0,"app-empty-container",87),2&t){var n=g.oxw();g.Q6J("texto",n.emptyTextDescription)}}function j(t,e){if(1&t){var n=g.EpF();g.TgZ(0,"app-attendee-modal",88),g.NdJ("dynamicSetIntervenient",function(t){return g.CHM(n),g.oxw().dynamicSetIntervenient(t)}),g.qZA()}if(2&t){var o=g.oxw();g.Q6J("footer",!1)("taskParticipants",o.taskParticipants)("taskParticipantsCc",o.taskParticipantsCc)("adding",o.adding)}}var H=u||u,G={parse:{dateInput:"YYYY-MMMM-DD HH:mm"},display:{dateInput:"DD MMM YYYY H:mm",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},B=function(){var e=function(){function e(n,o,i,a,s,c,d,u,p,g){t(this,e),this.modalController=n,this.router=o,this.navParams=i,this.processes=a,this.attachmentsService=s,this.calendarService=c,this.animationController=u,this.toastService=p,this.activatedRoute=g,this.disabled=!1,this.showSpinners=!0,this.showSeconds=!1,this.touchUi=!1,this.enableMeridian=!1,this.minDate=new Date,this.ionicMinDate=(new Date).toISOString().slice(0,10),this.endMinDate=new Date((new Date).getTime()+9e5),this.stepHour=1,this.stepMinute=5,this.stepSecond=5,this.dateControlStart=new l.NI(H("DD MM YYYY hh")),this.dateControlEnd=new l.NI(H("DD MM YYYY hh")),this.validateFrom=!1,this.recurringTypes=[],this.Occurrence=new Date,this.EventRecurrenceType="-1",this.showLoader=!1,this.taskParticipantsCc=[],this.documents=[],this.adding="intervenient",this.formLocationSatus=!1,this.showAttendees=!1,this.emptyTextDescription="Sem intervenientes selecionados",this.taskParticipants=[],this.loggeduser=d.ValidatedUser,this.task=this.navParams.get("task"),console.log(this.task),this.postData=new r.j,this.eventBody={BodyType:"1",Text:""},this.postData.Body=this.eventBody,this.postData.Subject=this.task.Folio,this.postData.CalendarName="Oficial",this.dateControlStart=new l.NI(H(new Date)),this.dateControlEnd=new l.NI(H(new Date((new Date).getTime()+9e5))),this.postData.Category="Reuni\xe3o"}return n(e,[{key:"dateStart",get:function(){return window.innerWidth<801?this.postData.StartDate:this.dateControlStart.value}},{key:"dateEnd",get:function(){return window.innerWidth<801?this.postData.EndDate:this.dateControlEnd.value}},{key:"ngOnInit",value:function(){this.adding="intervenient",console.log(this.task),this.getAttachments(),this.setDefaultTime(),this.getRecurrenceTypes()}},{key:"getRecurrenceTypes",value:function(){var t=this;this.calendarService.getRecurrenceTypes().subscribe(function(e){t.recurringTypes=e})}},{key:"setDefaultTime",value:function(){this.postData.StartDate=new Date,this.postData.EndDate=new Date((new Date).getTime()+9e5)}},{key:"getAttachments",value:function(){var t=this;this.attachmentsService.getAttachmentsBySerial(this.task.SerialNumber).subscribe(function(e){t.loadedAttachments=e})}},{key:"close",value:function(){this.modalController.dismiss(null)}},{key:"goBack",value:function(){this.modalController.dismiss(null),window.history.back()}},{key:"runValidation",value:function(){this.validateFrom=!0}},{key:"dateValid",get:function(){return window.innerWidth<=800?this.postData.StartDate1&&(console.log(t.filter(function(t){return"99999850"!=t})),this.selectedTypes=t.filter(function(t){return"99999850"!=t})),0==t.length&&(this.selectedTypes=["99999850"])}},{key:"close",value:function(){this.router.navigate(["/home/gabinete-digital/expediente"]),this.modalController.dismiss(null)}},{key:"getSubjectType",value:function(){var t=this;this.processes.GetSubjectType().subscribe(function(e){console.log(e),t.subjectTypes=e})}},{key:"cancelTask",value:function(){this.modalController.dismiss(null)}},{key:"runValidation",value:function(){this.validateFrom=!0}},{key:"injectValidation",value:function(){this.Form=new u.cw({Subject:new u.NI(this.postData.DispatchFolder.Subject,[u.kI.required]),Location:new u.NI(this.postData.DispatchFolder.Message,[u.kI.required]),selectedTypes:new u.NI(this.selectedTypes,[u.kI.required]),Priority:new u.NI(this.postData.Priority,[u.kI.required]),participantes:new u.NI(this.taskParticipants,[u.kI.required])})}},{key:"saveTask",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o,i,a,r,s,c,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("MDGPR"!=this.loggeduser.Profile||(this.injectValidation(),this.runValidation(),!this.Form.invalid)){t.next=2;break}return t.abrupt("return",!1);case 2:"99999861"==this.postData.Priority?this.dispatchFolder.DeadlineType="Normal":"99999862"==this.postData.Priority?this.dispatchFolder.DeadlineType="Urgente":"99999863"==this.postData.Priority?this.dispatchFolder.DeadlineType="Muito Urgente":"99999864"==this.postData.Priority&&(this.dispatchFolder.DeadlineType="Urgent\xedssimo"),e=(e=this.taskParticipants.concat(this.taskParticipantsCc)).map(function(t){return{UserEmail:t.EmailAddress,UserType:t.IsRequired?"I":"CC"}}),n={ProcessInstanceID:"",Attachments:[]},o=this.documents.map(function(t){return{ApplicationId:t.ApplicationType,SourceId:t.Id}}),n.Attachments=o,this.SearchFolder&&(this.SearchFolder.Documents?this.SearchFolder.Documents.forEach(function(t){n.Attachments.push({ApplicationId:361,Source:1,SourceId:t.docID||t.docId||t.DocId,SourceName:t.Assunto})}):n.Attachments.push({ApplicationId:8,Source:1,SourceId:this.SearchFolder.docID||this.SearchFolder.docId||this.SearchFolder.DocId,SourceName:this.SearchFolder.Assunto})),this.dispatchFolder.SubjectTypes=this.selectedTypes,i=this.toastService.loading(),t.t0=this.loggeduser.Profile,t.next="MDGPR"===t.t0?12:"PR"===t.t0?78:119;break;case 12:if(!(this.taskParticipants.length>0)){t.next=76;break}t.t1=this.taskType,t.next="0"===t.t1?16:"1"===t.t1?37:"2"===t.t1?56:74;break;case 16:return this.postData={DistributionType:"Paralelo",CountryCode:"AO",Priority:this.postData.Priority,UserEmail:this.loggeduser.Email,UsersSelected:e,DispatchFolder:this.dispatchFolder,AttachmentList:n},a={serialNumber:this.task.serialNumber,action:"Tratado",ActionTypeId:94,dataFields:{Note:""}},console.log(this.postData),t.prev=19,t.next=22,this.processes.postDespatcho(this.postData).toPromise();case 22:return this.taskResult=t.sent,t.next=25,this.toastService.successMessage("Processo efetuado");case 25:this.modalController.dismiss(a),t.next=32;break;case 28:return t.prev=28,t.t2=t.catch(19),t.next=32,this.toastService.badRequest("Processo n\xe3o efetuado");case 32:return t.prev=32,i.remove(),t.finish(32);case 35:return console.log("this.taskResult",this.taskResult),t.abrupt("break",74);case 37:return this.postData={DistributionType:"Paralelo",CountryCode:"AO",Priority:this.postData.Priority,UserEmail:this.loggeduser.Email,UsersSelected:e,DispatchFolder:this.dispatchFolder,AttachmentList:n},r={serialNumber:this.task.serialNumber,action:"Tratado",ActionTypeId:92,dataFields:{Note:""}},t.prev=39,t.next=42,this.processes.postParecer(this.postData).toPromise();case 42:return this.taskResult=t.sent,t.next=45,this.toastService.successMessage("Pedido enviado");case 45:this.modalController.dismiss(r),t.next=52;break;case 48:return t.prev=48,t.t3=t.catch(39),t.next=52,this.toastService.badRequest("Processo n\xe3o efetuado");case 52:return t.prev=52,i.remove(),t.finish(52);case 55:return t.abrupt("break",74);case 56:return this.postData={DistributionType:"Paralelo",CountryCode:"AO",Priority:this.postData.Priority,UserEmail:this.loggeduser.Email,UsersSelected:e,DispatchFolder:this.dispatchFolder,AttachmentList:n},s={serialNumber:this.task.serialNumber,action:"Tratado",ActionTypeId:93,dataFields:{Note:""}},t.prev=58,t.next=61,this.processes.postDeferimento(this.postData).toPromise();case 61:this.taskResult=t.sent,this.toastService.successMessage("Processo efetuado"),this.modalController.dismiss(s),t.next=70;break;case 66:return t.prev=66,t.t4=t.catch(58),t.next=70,this.toastService.badRequest("Processo n\xe3o efetuado");case 70:return t.prev=70,i.remove(),t.finish(70);case 73:console.log("this.taskResult",this.taskResult);case 74:t.next=77;break;case 76:this.alertController.presentAlert("Lista de i-ntervenientes vazia. Por favor, adicione 1 ou mais intervenientes.");case 77:return t.abrupt("break",119);case 78:t.t5=this.taskType,t.next="0"===t.t5?81:"1"===t.t5?101:119;break;case 81:return this.postData={DistributionType:"Paralelo",CountryCode:"AO",Priority:this.postData.Priority,UserEmail:this.loggeduser.Email,UsersSelected:e,DispatchFolder:this.dispatchFolder,AttachmentList:n},console.log(this.postData),c={serialNumber:this.task.serialNumber,action:"Tratado",ActionTypeId:99999881,dataFields:{Note:""}},t.prev=83,t.next=86,this.despachoService.createDespacho(this.postData).toPromise();case 86:return this.taskResult=t.sent,t.next=89,this.toastService.successMessage("Processo efetuado");case 89:this.modalController.dismiss(c),t.next=96;break;case 92:return t.prev=92,t.t6=t.catch(83),t.next=96,this.toastService.badRequest("Processo n\xe3o efetuado");case 96:return t.prev=96,i.remove(),t.finish(96);case 99:return console.log("this.taskResult",this.taskResult),t.abrupt("break",119);case 101:return this.postData={DistributionType:"Paralelo",CountryCode:"AO",Priority:this.postData.Priority,UserEmail:this.loggeduser.Email,UsersSelected:e,DispatchFolder:this.dispatchFolder,AttachmentList:n},d={serialNumber:this.task.serialNumber,action:"Tratado",ActionTypeId:99999881,dataFields:{Note:""}},t.prev=103,t.next=106,this.processes.postParecerPr(this.postData).toPromise();case 106:return this.taskResult=t.sent,t.next=109,this.toastService.successMessage("Pedido enviado");case 109:this.modalController.dismiss(d),t.next=116;break;case 112:return t.prev=112,t.t7=t.catch(103),t.next=116,this.toastService.badRequest("Processo n\xe3o efetuado");case 116:return t.prev=116,i.remove(),t.finish(116);case 119:case"end":return t.stop()}},t,this,[[19,28,32,35],[39,48,52,55],[58,66,70,73],[83,92,96,99],[103,112,116,119]])}))}},{key:"getAttachments",value:function(){var t=this;this.attachmentsService.getAttachmentsBySerial(this.task.serialNumber).subscribe(function(e){t.loadedAttachments=e,console.log(e)})}},{key:"openAttendees",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(window.innerWidth<=1024)){t.next=9;break}return t.next=3,this.modalController.create({component:l.V,componentProps:{adding:this.adding,taskParticipants:this.taskParticipants,taskParticipantsCc:this.taskParticipantsCc},cssClass:"attendee modal modal-desktop",backdropDismiss:!1});case 3:return e=t.sent,t.next=6,e.present();case 6:e.onDidDismiss().then(function(t){if(t){var e=(t=t.data).taskParticipantsCc;n.setIntervenient(t.taskParticipants),n.setIntervenientCC(e)}}),t.next=10;break;case 9:this.showAttendees=!0;case 10:case"end":return t.stop()}},t,this)}))}},{key:"setIntervenient",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.taskParticipants=t;case 1:case"end":return e.stop()}},e,this)}))}},{key:"setIntervenientCC",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.taskParticipantsCc=t;case 1:case"end":return e.stop()}},e,this)}))}},{key:"addParticipants",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.adding="intervenient",this.openAttendees();case 1:case"end":return t.stop()}},t,this)}))}},{key:"addParticipantsCc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.adding="CC",this.openAttendees();case 1:case"end":return t.stop()}},t,this)}))}},{key:"dynamicSetIntervenient",value:function(t){var e=t.taskParticipants,n=t.taskParticipantsCc;this.taskParticipants=e,this.taskParticipantsCc=n}},{key:"distartExpedientModal",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:s.Q,componentProps:{serialNumber:this.task.serialNumber,folderId:this.task.workflowInstanceDataFields.FolderID,action:"complete"},cssClass:"discart-expedient-modal",backdropDismiss:!1});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){"close"==t.data&&(console.log("Expedient Discard closed"),n.modalController.dismiss(t.data))});case 6:case"end":return t.stop()}},t,this)}))}},{key:"setContact",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:"intervenient"==this.adding?this.taskParticipants=t:"CC"==this.adding&&(this.taskParticipantsCc=t);case 1:case"end":return e.stop()}},e,this)}))}},{key:"closeComponent",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.showAttendees=!1;case 1:case"end":return t.stop()}},t,this)}))}},{key:"viewExpedientDetail",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(this.profile),e=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",t.next=3,this.modalController.create({component:c.C,componentProps:{serialNumber:this.task.serialNumber,profile:this.profile},cssClass:e,backdropDismiss:!1});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){});case 7:case"end":return t.stop()}},t,this)}))}},{key:"getDoc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:d.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){t&&n.documents.push(t.data.selected)});case 6:case"end":return t.stop()}},t,this)}))}},{key:"removeAttachment",value:function(t){this.documents=this.documents.filter(function(e,n){return t!=n})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(h.Y36(m.IN),h.Y36(f.F0),h.Y36(v.$),h.Y36(x.o),h.Y36(m.X1),h.Y36(Z.c),h.Y36(b.e),h.Y36(b.e),h.Y36(m.vB),h.Y36(C.k),h.Y36(M.K))},e.\u0275cmp=h.Xpm({type:e,selectors:[["app-expedient-task-modal"]],features:[h._Bn([{provide:p.ab,useValue:V}])],decls:105,vars:26,consts:[[1,"height-100"],[1,"main-content","d-flex","height-100"],[1,"content","d-flex","flex-column","width-100"],["lines","none"],[1,"title"],[1,"ion-item-container","width-100"],["placeholder","Assunto*",3,"ngModel","ngModelChange"],[4,"ngIf"],[1,"d-flex","flex-column","height-100","overflow-y-auto"],[1,"container-div","width-100"],[1,"ion-item-class-2"],[1,"ion-icon-class"],["slot","start","src","assets/images/icons-description.svg"],[1,"ion-input-class","flex-grow-1"],["placeholder","Descri\xe7\xe3o",1,"add-border",3,"ngModel","ngModelChange"],[1,"ion-item-class-2","width-100"],["slot","start","name","time-outline",1,"icon-time"],[1,"ion-input-class"],["placeholder","Prazo*","interface","action-sheet","Cancel-text","Cancelar","required","",1,"d-block","d-md-none",3,"ngModel","ngModelChange"],["value","99999861"],["value","99999862"],["value","99999863"],["value","99999864"],["appearance","fill","floatLabel","never","appearance","none",1,"width-100","d-none","d-md-block"],["placeholder","Prazo*",3,"ngModel","ngModelChange"],[1,"container-div"],["floatLabel","never","appearance","fill","appearance","none",1,"width-100","d-block"],["multiple","","placeholder","Selecione o tipo de evento*",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["slot","start","src","assets/images/icons-person.svg"],[1,"ion-input-class-no-height"],[1,"list-people"],["class","list-people-title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"add-people",3,"click"],["slot","start","src","assets/images/icons-arrow-forward.svg"],["slot","start","src","assets/images/icons-people-cc.svg"],[1,"ion-item-container-no-border",3,"click"],[1,"d-flex","align-center"],[1,"attach-icon","d-flex","align-center"],["src","assets/images/icons-attach-doc.svg"],[1,"attach-document","pl-10"],["class","list ",4,"ngFor","ngForOf"],["class","aside-right flex-column height-100",4,"ngIf"],[1,"buttons"],["shape","round",1,"btn-cancel",3,"click"],["shape","round",1,"btn-ok",3,"click"],["class","input-errror-message",4,"ngIf"],[1,"input-errror-message"],[3,"value"],[1,"list-people-title"],[1,"list"],[1,"d-flex","ion-justify-content-between"],[1,"attach-title-item"],[1,"app-name"],[1,"close-button","text-black",3,"click"],["src","assets/images/icons-delete-25.svg",1,"font-20"],[1,"span-left"],[1,"span-right"],[1,"aside-right","flex-column","height-100"],["class","d-flex height-100 flex-column",3,"texto",4,"ngIf"],["class","d-flex flex-column height-100 hide-footer",3,"adding","footer","taskParticipants","taskParticipantsCc","closeComponent","setIntervenient","setIntervenientCC","setContact","dynamicSetIntervenient",4,"ngIf"],[1,"d-flex","height-100","flex-column",3,"texto"],[1,"d-flex","flex-column","height-100","hide-footer",3,"adding","footer","taskParticipants","taskParticipantsCc","closeComponent","setIntervenient","setIntervenientCC","setContact","dynamicSetIntervenient"]],template:function(t,e){var n,o,i,a,r;(1&t&&(h.TgZ(0,"ion-content",0),h.TgZ(1,"div",1),h.TgZ(2,"div",2),h.TgZ(3,"ion-item",3),h.TgZ(4,"ion-label",4),h._uU(5),h.qZA(),h.qZA(),h.TgZ(6,"div",5),h.TgZ(7,"ion-input",6),h.NdJ("ngModelChange",function(t){return e.postData.DispatchFolder.Subject=t}),h.qZA(),h.qZA(),h.YNc(8,D,2,1,"div",7),h.TgZ(9,"div",8),h.TgZ(10,"div",9),h.TgZ(11,"div",10),h.TgZ(12,"div",11),h._UZ(13,"ion-icon",12),h.qZA(),h.TgZ(14,"div",13),h.TgZ(15,"ion-textarea",14),h.NdJ("ngModelChange",function(t){return e.postData.DispatchFolder.Message=t}),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.TgZ(16,"div",9),h.TgZ(17,"div",15),h.TgZ(18,"div",11),h._UZ(19,"ion-icon",16),h.qZA(),h.TgZ(20,"div",17),h.TgZ(21,"ion-select",18),h.NdJ("ngModelChange",function(t){return e.postData.Priority=t}),h.TgZ(22,"ion-select-option",19),h.TgZ(23,"b"),h._uU(24,"Normal"),h.qZA(),h._uU(25," (4 dias para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(26,"ion-select-option",20),h.TgZ(27,"b"),h._uU(28,"Urgente"),h.qZA(),h._uU(29," (2 dias para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(30,"ion-select-option",21),h.TgZ(31,"b"),h._uU(32,"Muito Urgente"),h.qZA(),h._uU(33," (1 dia para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(34,"ion-select-option",22),h.TgZ(35,"b"),h._uU(36,"Urgent\xedssimo"),h.qZA(),h._uU(37," (8 horas para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.qZA(),h.TgZ(38,"mat-form-field",23),h.TgZ(39,"mat-select",24),h.NdJ("ngModelChange",function(t){return e.postData.Priority=t}),h.TgZ(40,"mat-option",19),h.TgZ(41,"b"),h._uU(42,"Normal"),h.qZA(),h._uU(43," (4 dias para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(44,"mat-option",20),h.TgZ(45,"b"),h._uU(46,"Urgente"),h.qZA(),h._uU(47," (2 dias para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(48,"mat-option",21),h.TgZ(49,"b"),h._uU(50,"Muito Urgente"),h.qZA(),h._uU(51," (1 dia para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.TgZ(52,"mat-option",22),h.TgZ(53,"b"),h._uU(54,"Urgent\xedssimo"),h.qZA(),h._uU(55," (8 horas para a execu\xe7\xe3o da tarefa)"),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.YNc(56,F,2,1,"div",7),h.TgZ(57,"div",25),h.TgZ(58,"div",10),h.TgZ(59,"div",11),h._UZ(60,"ion-icon",12),h.qZA(),h.TgZ(61,"div",17),h.TgZ(62,"mat-form-field",26),h.TgZ(63,"mat-select",27),h.NdJ("ngModelChange",function(t){return e.selectedTypes=t}),h.YNc(64,U,2,2,"mat-option",28),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.YNc(65,Y,2,1,"div",7),h.TgZ(66,"div",25),h.TgZ(67,"div",10),h.TgZ(68,"div",11),h._UZ(69,"ion-icon",29),h.qZA(),h.TgZ(70,"div",30),h.TgZ(71,"div",31),h.TgZ(72,"ion-item",3),h.TgZ(73,"ion-list"),h.YNc(74,Q,2,0,"ion-label",32),h.YNc(75,L,2,1,"ion-label",33),h.qZA(),h.qZA(),h.qZA(),h.TgZ(76,"div",34),h.NdJ("click",function(){return e.addParticipants()}),h._UZ(77,"ion-icon",35),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.TgZ(78,"div",25),h.TgZ(79,"div",10),h.TgZ(80,"div",11),h._UZ(81,"ion-icon",36),h.qZA(),h.TgZ(82,"div",30),h.TgZ(83,"div",31),h.TgZ(84,"ion-item",3),h.TgZ(85,"ion-list"),h.YNc(86,z,2,0,"ion-label",32),h.YNc(87,j,2,1,"ion-label",33),h.qZA(),h.qZA(),h.qZA(),h.TgZ(88,"div",34),h.NdJ("click",function(){return e.addParticipantsCc()}),h._UZ(89,"ion-icon",35),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.TgZ(90,"div",37),h.NdJ("click",function(){return e.getDoc()}),h.TgZ(91,"ion-label",38),h.TgZ(92,"div",39),h._UZ(93,"ion-icon",40),h.qZA(),h.TgZ(94,"div",41),h.TgZ(95,"ion-label"),h._uU(96,"Anexar Documentos"),h.qZA(),h.qZA(),h.qZA(),h.qZA(),h.YNc(97,H,17,7,"div",42),h.qZA(),h.qZA(),h.YNc(98,W,3,2,"div",43),h.qZA(),h.qZA(),h.TgZ(99,"ion-footer"),h.TgZ(100,"div",44),h.TgZ(101,"button",45),h.NdJ("click",function(){return e.cancelTask()}),h._uU(102,"Cancelar"),h.qZA(),h.TgZ(103,"button",46),h.NdJ("click",function(){return e.saveTask()}),h._uU(104,"Gravar"),h.qZA(),h.qZA(),h.qZA()),2&t)&&(h.xp6(5),h.Oqu(e.modalTitle[e.taskType]),h.xp6(1),h.ekj("input-error",(null==e.Form||null==(n=e.Form.get("Subject"))?null:n.invalid)&&e.validateFrom),h.xp6(1),h.Q6J("ngModel",e.postData.DispatchFolder.Subject),h.xp6(1),h.Q6J("ngIf",e.Form&&e.validateFrom),h.xp6(6),h.ekj("input-error",(null==e.Form||null==(o=e.Form.get("Location"))?null:o.invalid)&&e.validateFrom),h.xp6(1),h.Q6J("ngModel",e.postData.DispatchFolder.Message),h.xp6(5),h.ekj("input-error",(null==e.Form||null==(i=e.Form.get("Priority"))?null:i.invalid)&&e.validateFrom),h.xp6(1),h.Q6J("ngModel",e.postData.Priority),h.xp6(18),h.Q6J("ngModel",e.postData.Priority),h.xp6(17),h.Q6J("ngIf",e.Form&&e.validateFrom),h.xp6(5),h.ekj("input-error",(null==e.Form||null==(a=e.Form.get("selectedTypes"))?null:a.invalid)&&e.validateFrom),h.xp6(2),h.Q6J("ngModel",e.selectedTypes),h.xp6(1),h.Q6J("ngForOf",e.subjectTypes),h.xp6(1),h.Q6J("ngIf",e.Form&&e.validateFrom),h.xp6(5),h.ekj("input-error",(null==e.Form||null==(r=e.Form.get("participantes"))?null:r.invalid)&&e.validateFrom),h.xp6(4),h.Q6J("ngIf",(null==e.taskParticipants?null:e.taskParticipants.length)<1),h.xp6(1),h.Q6J("ngForOf",e.taskParticipants),h.xp6(11),h.Q6J("ngIf",(null==e.taskParticipantsCc?null:e.taskParticipantsCc.length)<1),h.xp6(1),h.Q6J("ngForOf",e.taskParticipantsCc),h.xp6(10),h.Q6J("ngForOf",e.documents),h.xp6(1),h.Q6J("ngIf",e.postData))},directives:[m.W2,m.Ie,m.Q$,m.pK,m.j9,u.JJ,u.On,w.O5,m.gu,m.g2,m.t9,m.QI,u.Q7,m.n0,k.KE,P.gD,A.ey,w.sg,m.q_,m.fr,T.M,_.Y],pipes:[w.uU],styles:[".content[_ngcontent-%COMP%]{padding:30px 20px 0!important;margin:0;float:left}.content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto;font-size:25px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#000}.content[_ngcontent-%COMP%] .container-div[_ngcontent-%COMP%]{margin-bottom:15px}.content[_ngcontent-%COMP%] .ion-item-container[_ngcontent-%COMP%]{margin:15px auto;border:1px solid #ebebeb;border-radius:5px;padding-left:5px}.content[_ngcontent-%COMP%] .ion-item-class-2[_ngcontent-%COMP%]{margin:0 auto;overflow:auto}.content[_ngcontent-%COMP%] .ion-icon-class[_ngcontent-%COMP%]{width:45px;height:45px;float:left;padding:10px;font-size:25px}.content[_ngcontent-%COMP%] ion-select[_ngcontent-%COMP%]{margin-left:0}.content[_ngcontent-%COMP%] .ion-input-class[_ngcontent-%COMP%]{width:calc(100% - 45px);border:1px solid #ebebeb;border-radius:5px;padding-left:5px;padding-right:10px;float:left;overflow:hidden;flex:1;min-height:44px}.content[_ngcontent-%COMP%] .ion-input-class-no-height[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:5px;overflow:auto}.content[_ngcontent-%COMP%] .list-people[_ngcontent-%COMP%]{width:256px;float:left}.content[_ngcontent-%COMP%] .add-people[_ngcontent-%COMP%]{width:45px;float:right;overflow:auto;font-size:25px;padding:10px}.content[_ngcontent-%COMP%] .list-people-title[_ngcontent-%COMP%]{color:#a3a3a3}.content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1}.content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{width:100%}.content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.container-footer[_ngcontent-%COMP%]{margin:0 auto;overflow:auto}.container-footer[_ngcontent-%COMP%] .button-cancel[_ngcontent-%COMP%]{width:170px;height:44px;border-radius:22.5px;--background:#e0e9ee;--color:#061b52;margin:10px}.container-footer[_ngcontent-%COMP%] .button-save[_ngcontent-%COMP%]{width:170px;height:44px;border-radius:22.5px;--background:#42b9fe;--color:#fff;margin:10px}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:20px;overflow:auto}@media only screen and (min-width: 1024px){.aside-content[_ngcontent-%COMP%]{display:block}}.attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.attach-title-item[_ngcontent-%COMP%]{width:100%;font-size:15px;color:#0d89d1}.span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.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}.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}.icon-time[_ngcontent-%COMP%]{color:#797979b0} .mat-form-field-appearance-fill .mat-form-field-flex{background-color:#fff}"]}),e}()},11055:function(e,o,i){"use strict";i.d(o,{C:function(){return R}});var a=i(64762),r=i(32379),s=i(83189),c=i(75008),d=i(86807),l=i(45896),u=i(23066),p=i(4528),g=i(320),h=i(84393),m=i(37716),f=i(28621),v=i(53760),x=i(80106),Z=i(39895),b=i(35957),C=i(84465),M=i(38583),w=i(20985),k=i(96529),P=function(){var e=function(){function e(n,o){t(this,e),this.processes=n,this.iab=o}return n(e,[{key:"viewDocument",value:function(t){var e=this,n=t.DocId,o=t.ApplicationId;this.processes.GetDocumentUrl(n,o).subscribe(function(t){var n=t.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");e.iab.create(n,"_blank").show()})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(m.LFG(f.$),m.LFG(v.i))},e.\u0275prov=m.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),A=function(){var e=function(){function e(n,o,i){t(this,e),this.iab=n,this.processDocumentService=o,this.processes=i}return n(e,[{key:"viewDocument",value:function(t){var e=t.DocId,n=t.ApplicationId;this.processDocumentService.viewDocument({DocId:e,ApplicationId:n})}},{key:"CompleteTask",value:function(t){var e=t.body;return this.processes.CompleteTask(e)}},{key:"UpdateTaskStatus",value:function(t){var e=t.FolderId;return this.processes.UpdateTaskStatus(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(m.LFG(v.i),m.LFG(P),m.LFG(f.$))},e.\u0275prov=m.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();function T(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"p"),m._uU(2),m.qZA(),m.qZA()),2&t){var n=e.$implicit;m.xp6(2),m.Oqu(n.Name)}}function _(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"h5"),m._uU(2,"Com conhecimento"),m.qZA(),m.TgZ(3,"ion-item",23),m.TgZ(4,"ion-label"),m.YNc(5,T,3,1,"div",27),m.qZA(),m.qZA(),m.qZA()),2&t){var n=m.oxw(2);m.xp6(5),m.Q6J("ngForOf",n.cc)}}function O(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"ion-item",28),m.TgZ(1,"ion-label",29),m.NdJ("click",function(){var t=m.CHM(n).$implicit;return m.oxw(2).viewDocument(t.DocId)}),m.TgZ(2,"p",30),m._uU(3),m.TgZ(4,"span",31),m._UZ(5,"ion-icon",32),m.qZA(),m.qZA(),m.TgZ(6,"p"),m.TgZ(7,"span",33),m._uU(8),m.qZA(),m.TgZ(9,"span",34),m._uU(10),m.ALo(11,"date"),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){var o=e.$implicit;m.xp6(3),m.Oqu(o.Assunto),m.xp6(5),m.Oqu(o.Sender),m.xp6(2),m.Oqu(m.xi3(11,3,o.DocDate,"dd/MM/yyyy HH:mm"))}}function q(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"ion-item",39),m.NdJ("click",function(){var t=m.CHM(n).$implicit;return m.oxw(4).goToEvent(t.EventId)}),m.TgZ(1,"div"),m.TgZ(2,"div",40),m.TgZ(3,"div",41),m._uU(4),m.ALo(5,"date"),m.qZA(),m.TgZ(6,"div",42),m._uU(7),m.ALo(8,"date"),m.qZA(),m.qZA(),m.TgZ(9,"div",43),m.TgZ(10,"div",44),m._uU(11),m.qZA(),m.TgZ(12,"div",45),m._uU(13),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){var o=e.$implicit,i=m.oxw(4);m.xp6(1),m.MT6("d-flex content-",i.profile,"-",o.CalendarName,""),m.xp6(3),m.Oqu(m.xi3(5,8,o.StartDate,"HH:mm")),m.xp6(3),m.Oqu(m.xi3(8,11,o.EndDate,"HH:mm")),m.xp6(4),m.Oqu(o.Location),m.xp6(2),m.Oqu(o.Subject)}}function y(t,e){if(1&t&&(m.TgZ(0,"div",37),m.TgZ(1,"ion-list"),m.YNc(2,q,14,14,"ion-item",38),m.qZA(),m.qZA()),2&t){var n=m.oxw(3);m.xp6(2),m.Q6J("ngForOf",n.eventsList)}}function D(t,e){if(1&t&&(m.TgZ(0,"div"),m.TgZ(1,"h5",35),m._uU(2,"Eventos Associados"),m.qZA(),m.TgZ(3,"ion-list"),m.YNc(4,y,3,1,"div",36),m.qZA(),m.qZA()),2&t){var n=m.oxw(2);m.xp6(4),m.Q6J("ngIf",n.eventsList)}}function I(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",5),m.TgZ(1,"div",6),m.TgZ(2,"div",7),m.TgZ(3,"div",8),m.NdJ("click",function(){return m.CHM(n),m.oxw().goBack()}),m._UZ(4,"ion-icon",9),m.qZA(),m.TgZ(5,"div",10),m.TgZ(6,"ion-label",11),m._uU(7),m.qZA(),m.qZA(),m.TgZ(8,"div",12),m.TgZ(9,"button",13),m.NdJ("click",function(){return m.CHM(n),m.oxw().openOptions()}),m._UZ(10,"ion-icon",14),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.TgZ(11,"div",15),m.TgZ(12,"div",16),m.TgZ(13,"ion-label"),m.TgZ(14,"p"),m.TgZ(15,"span",17),m._uU(16),m.qZA(),m.TgZ(17,"span",18),m._uU(18),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m.qZA(),m._UZ(19,"div",19),m.TgZ(20,"div",20),m.TgZ(21,"div",21),m.YNc(22,_,6,1,"div",22),m.TgZ(23,"h5"),m._uU(24,"Detalhes"),m.qZA(),m.TgZ(25,"ion-item",23),m._UZ(26,"p",24),m.qZA(),m.qZA(),m.TgZ(27,"div",25),m.TgZ(28,"ion-list"),m.TgZ(29,"h5"),m._uU(30,"Documentos Anexados"),m.qZA(),m.YNc(31,O,12,6,"ion-item",26),m.qZA(),m.qZA(),m.YNc(32,D,5,1,"div",22),m.qZA(),m.qZA()}if(2&t){var o=m.oxw();m.xp6(7),m.Oqu(o.task.Folio),m.xp6(9),m.Oqu(o.customDate),m.xp6(2),m.Oqu(o.task.WorkflowName),m.xp6(4),m.Q6J("ngIf",o.cc.length>0),m.xp6(4),m.Q6J("innerHTML",o.task.Note,m.oJD),m.xp6(5),m.Q6J("ngForOf",o.fulltask.Documents),m.xp6(1),m.Q6J("ngIf",o.eventsList)}}function S(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw(2).attachDocument()}),m._uU(1,"Anexar Documentos"),m.qZA()}}function N(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"button",54),m.NdJ("click",function(){return m.CHM(n),m.oxw(2).sendExpedienteToPending()}),m._uU(1,"Enviar para pendentes"),m.qZA()}}var F=function(){return["PR"]};function U(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",46),m.TgZ(1,"div",47),m.TgZ(2,"div",48),m.TgZ(3,"div"),m._uU(4,"Enviar para o PR"),m.qZA(),m.qZA(),m.TgZ(5,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw().openAddNoteModal("Aprovar")}),m._uU(6,"Avalia\xe7\xe3o Superior"),m.qZA(),m.TgZ(7,"div",48),m.TgZ(8,"div"),m._uU(9,"Solicitar revis\xe3o"),m.qZA(),m.qZA(),m.TgZ(10,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw().openAddNoteModal("Revis\xe3o")}),m._uU(11,"Mandar para Revis\xe3o"),m.qZA(),m.TgZ(12,"div",48),m.TgZ(13,"div"),m._uU(14,"Outras op\xe7\xf5es"),m.qZA(),m.qZA(),m.TgZ(15,"button",50),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openExpedientActionsModal("0",t.fulltask)}),m._uU(16,"Efetuar Despacho"),m.qZA(),m.TgZ(17,"button",49),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openExpedientActionsModal("1",t.fulltask)}),m._uU(18,"Solicitar Parecer"),m.qZA(),m.TgZ(19,"button",49),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openExpedientActionsModal("2",t.fulltask)}),m._uU(20,"Pedido de Deferimento"),m.qZA(),m.TgZ(21,"button",49),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openBookMeetingModal(t.task)}),m._uU(22,"Marcar Reuni\xe3o"),m.qZA(),m.YNc(23,S,2,0,"button",51),m.TgZ(24,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw().distartExpedientModal("descartar")}),m._uU(25,"Descartar"),m.qZA(),m.YNc(26,N,2,0,"button",52),m._UZ(27,"div",53),m.qZA(),m.qZA()}if(2&t){var o=m.oxw();m.xp6(23),m.Q6J("ngIf",!o.p.userRole(m.DdM(2,F))),m.xp6(3),m.Q6J("ngIf","Pending"!=o.task.Status)}}function E(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw(2).sendExpedienteToPending()}),m._uU(1,"Enviar para Pendentes"),m.qZA()}}function J(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",46),m.TgZ(1,"div",47),m.TgZ(2,"button",50),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openExpedientActionsModal("0",t.fulltask)}),m._uU(3,"Efetuar Despacho"),m.qZA(),m.TgZ(4,"button",49),m.NdJ("click",function(){return m.CHM(n),m.oxw().distartExpedientModal("descartar")}),m._uU(5,"Descartar"),m.qZA(),m._UZ(6,"div",53),m.TgZ(7,"button",49),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openExpedientActionsModal("1",t.fulltask)}),m._uU(8,"Solicitar Parecer"),m.qZA(),m.TgZ(9,"button",49),m.NdJ("click",function(){m.CHM(n);var t=m.oxw();return t.openBookMeetingModal(t.task)}),m._uU(10,"Marcar Reuni\xe3o"),m.qZA(),m.YNc(11,E,2,0,"button",51),m._UZ(12,"div",55),m.TgZ(13,"button",56),m._uU(14,"Delegar"),m.qZA(),m.qZA(),m.qZA()}if(2&t){var o=m.oxw();m.xp6(11),m.Q6J("ngIf","Pending"!=o.task.Status)}}var R=function(){var e=function(){function e(n,o,i,a,r,s,c,d,l,u,p,g){var m=this;t(this,e),this.processes=n,this.iab=o,this.events=i,this.router=a,this.modalController=r,this.popoverController=s,this.activatedRoute=c,this.toastService=d,this.location=l,this.attachmentsService=u,this.p=p,this.expedientesService=g,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.cc=[],this.documents=[],this.hideSendToPendentes=!0,this.searchDocumentPipe=new h.G,this.activatedRoute.paramMap.subscribe(function(t){t.params.SerialNumber&&(m.serialNumber=t.params.SerialNumber),t.params.caller&&(m.caller=t.params.caller)})}return n(e,[{key:"ngOnInit",value:function(){this.LoadTaskDetail(this.serialNumber)}},{key:"close",value:function(){this.modalController.dismiss()}},{key:"showToast",value:function(){this.toastService.presentToast('N\xe3o foi poss\xedvel fazer login"')}},{key:"approve",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={serialNumber:this.serialNumber,action:"Aprovar",ActionTypeId:100000004,dataFields:{ReviewUserComment:t},AttachmentList:e},console.log(o),i=this.toastService.loading(),n.prev=3,n.next=6,this.processes.CompleteTask(o).toPromise();case 6:this.close(),this.toastService.successMessage("Processo aprovado"),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(3),this.toastService.badRequest("Processo n\xe3o aprovado");case 13:return n.prev=13,i.remove(),n.finish(13);case 16:case"end":return n.stop()}},n,this,[[3,10,13,16]])}))}},{key:"sendToReview",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={serialNumber:this.serialNumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:t},AttachmentList:e},i=this.toastService.loading(),n.prev=2,n.next=5,this.processes.CompleteTask(o).toPromise();case 5:this.close(),this.toastService.successMessage(),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this.toastService.badRequest();case 12:return n.prev=12,i.remove(),n.finish(12);case 15:case"end":return n.stop()}},n,this,[[2,9,12,15]])}))}},{key:"openAddNoteModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=window.innerWidth<801?"modal modal-desktop":"add-note-modal",e.next=3,this.modalController.create({component:g.C,componentProps:{showAttachmentBtn:!1},cssClass:n});case 3:return o=e.sent,e.next=6,o.present();case 6:o.onDidDismiss().then(function(e){if(console.log(e),e.data){var n={ProcessInstanceID:"",Attachments:e.data.documents.map(function(t){return{ApplicationId:t.ApplicationType,SourceId:t.Id}})};"Aprovar"==t?i.approve(e.data.note,n):"Revis\xe3o"==t&&i.sendToReview(e.data.note,n),i.goBack()}});case 7:case"end":return e.stop()}},e,this)}))}},{key:"goBack",value:function(){this.location.back()}},{key:"sendExpedienteToPending",value:function(){var t=this;this.processes.SetTaskToPending(this.serialNumber).subscribe(function(e){console.log(e),t.toastService.successMessage("Processo enviado para pendentes"),t.goBack()},function(e){t.toastService.badRequest("Processo n\xe3o enviado para pendentes")})}},{key:"LoadTaskDetail",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.processes.GetTask(t).subscribe(function(t){console.log(t),n.task={SerialNumber:t.serialNumber,Folio:t.workflowInstanceDataFields.Subject,Senders:t.originator.email,CreateDate:(0,d.momentG)(new Date(t.taskStartDate),"yyyy-MM-dd HH:mm:ss"),DocumentURL:t.workflowInstanceDataFields.ViewerRequest,Remetente:t.workflowInstanceDataFields.Sender,Note:t.workflowInstanceDataFields.TaskMessage||t.workflowInstanceDataFields.Note,FolderId:t.workflowInstanceDataFields.FolderID,FsId:t.workflowInstanceDataFields.FsId,DocId:t.workflowInstanceDataFields.DocID,WorkflowName:t.workflowDisplayName,Status:t.workflowInstanceDataFields.Status,DispatchNumber:t.workflowInstanceDataFields.DispatchNumber,AttachmentsProcessLastInstanceID:t.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,InstanceID:t.workflowInstanceDataFields.InstanceID},n.fulltask=t;var e=new Date(n.task.CreateDate);n.customDate=n.days[e.getDay()]+", "+e.getDate()+" de "+n.months[e.getMonth()],n.processes.GetTaskParticipants(n.task.FolderId).subscribe(function(t){n.intervenientes=t.filter(function(t){return"I"==t.Type}),n.cc=t.filter(function(t){return"CC"==t.Type})}),console.log("this.task",n.task.InstanceID),console.log("this.task.DocumentURL",n.task.DocumentURL)},function(t){try{n.toastService.badRequest("Processo n\xe3o encontrado"),n.goBack()}catch(e){window.history.back()}finally{n.toastService.badRequest(0==t.status?"N\xe3o \xe9 poss\xedvel visualizar este processo no modo offline":"Processo n\xe3o encontrado")}});case 1:case"end":return e.stop()}},e,this)}))}},{key:"LoadRelatedEvents",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}))}},{key:"viewDocument",value:function(t){this.expedientesService.viewDocument({ApplicationId:"361",DocId:t})}},{key:"getAttachments",value:function(t){var e=this;console.log(t),this.attachmentsService.getAttachmentsBySerial(t).subscribe(function(t){e.attachments=t,console.log("res",t)})}},{key:"attachDocument",value:function(){this.getDoc()}},{key:"getDoc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:p.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){return(0,a.mG)(n,void 0,void 0,regeneratorRuntime.mark(function e(){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t&&(this.documents.push(t.data.selected),this.documents.forEach(function(t){var e={InstanceID:n.task.InstanceID,WorkflowDisplayName:n.task.WorkflowName,FolderID:n.task.FolderId,DispatchNumber:n.task.DispatchNumber,AttachmentsProcessLastInstanceID:n.task.AttachmentsProcessLastInstanceID,Attachments:[]},o=n.searchDocumentPipe.transformToAttachment(t);e.Attachments=o;var i=n.toastService.loading();n.attachmentsService.AddAttachment(e).subscribe(function(t){n.toastService.successMessage()},function(){n.toastService.badRequest()},function(){i.remove()})}));case 1:case"end":return e.stop()}},e,this)}))});case 6:case"end":return t.stop()}},t,this)}))}},{key:"openExpedientActionsModal",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i,s=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",n.next=3,this.modalController.create({component:r.F,componentProps:{taskAction:t,task:e,profile:this.profile},cssClass:o});case 3:return i=n.sent,n.next=6,i.present();case 6:i.onDidDismiss().then(function(t){return(0,a.mG)(s,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.data,!t.data){e.next=18;break}return o=this.toastService.loading(),e.prev=3,e.next=6,this.processes.CompleteTask(n).toPromise();case 6:this.toastService.successMessage("Processo descartado"),this.goBack(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),this.toastService.badRequest("Processo n\xe3o descartado");case 13:return e.prev=13,o.remove(),e.finish(13);case 16:e.next=19;break;case 18:this.close();case 19:case"end":return e.stop()}},e,this,[[3,10,13,16]])}))});case 7:case"end":return n.stop()}},n,this)}))}},{key:"distartExpedientModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.modalController.create({component:l.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});case 2:return n=e.sent,e.next=5,n.present();case 5:n.onDidDismiss().then(function(e){return(0,a.mG)(o,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i,a,r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(e.data),"descartar"!=t){n.next=19;break}if("Yes"!=e.data){n.next=17;break}return o={serialNumber:this.task.SerialNumber,action:"Passivo",ActionTypeId:99999877,dataFields:{Note:""}},i=this.toastService.loading(),n.prev=4,n.next=7,this.processes.CompleteTask(o);case 7:this.toastService.successMessage("Processo descartado"),this.goBack(),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(4),this.toastService.badRequest("Processo n\xe3o descartado");case 14:return n.prev=14,i.remove(),n.finish(14);case 17:n.next=51;break;case 19:if("Yes"!=e.data){n.next=35;break}return a=this.toastService.loading(),n.prev=21,n.next=24,this.expedientesService.CompleteTask(t).toPromise();case 24:this.goBack(),n.next=30;break;case 27:n.prev=27,n.t1=n.catch(21),this.toastService.badRequest("Processo n\xe3o descartado");case 30:return n.prev=30,a.remove(),n.finish(30);case 33:n.next=51;break;case 35:if("No"!=e.data){n.next=51;break}return console.log("Update"),r=this.toastService.loading(),n.prev=38,n.next=41,this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();case 41:this.toastService.successMessage(),this.goBack(),n.next=48;break;case 45:n.prev=45,n.t2=n.catch(38),this.toastService.badRequest();case 48:return n.prev=48,r.remove(),n.finish(48);case 51:case"end":return n.stop()}},n,this,[[4,11,14,17],[21,27,30,33],[38,45,48,51]])}))});case 6:case"end":return e.stop()}},e,this)}))}},{key:"openBookMeetingModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),n=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions",e.next=3,this.modalController.create({component:s.k,componentProps:{task:this.task},cssClass:n,backdropDismiss:!1});case 3:return o=e.sent,e.next=6,o.present();case 6:o.onDidDismiss().then(function(t){i.goBack()});case 7:case"end":return e.stop()}},e,this)}))}},{key:"goToEvent",value:function(t){this.router.navigate(["/home/events",t,"expediente"])}},{key:"viewEventDetail",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(this.profile),e.next=3,this.modalController.create({component:c.u,componentProps:{eventId:t,profile:this.profile},cssClass:"modal modal-desktop",backdropDismiss:!1});case 3:return n=e.sent,e.next=6,n.present();case 6:n.onDidDismiss().then(function(t){});case 7:case"end":return e.stop()}},e,this)}))}},{key:"openOptions",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.popoverController.create({component:u.M,cssClass:"exp-options",componentProps:{task:this.task,fulltask:this.fulltask,taskAction:t},translucent:!0});case 2:return n=e.sent,e.next=5,n.present();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}},e,this)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(m.Y36(f.$),m.Y36(v.i),m.Y36(x.n),m.Y36(Z.F0),m.Y36(b.IN),m.Y36(b.Dh),m.Y36(Z.gz),m.Y36(C.k),m.Y36(M.Ye),m.Y36(w.o),m.Y36(k.$),m.Y36(A))},e.\u0275cmp=m.Xpm({type:e,selectors:[["app-expediente-detail"]],decls:9,vars:5,consts:[[1,"ion-no-border"],["id","main-content",1,"ion-page","d-none"],[1,"main-content","d-flex","height-100","overflow-hidden"],["class","content d-flex flex-column",4,"ngIf"],["class","aside-right flex-column height-100 overflow-y-auto",4,"ngIf"],[1,"content","d-flex","flex-column"],[1,"main-header",2,"overflow","unset !important"],[1,"title-content","width-100","d-flex","justify-between"],["defaultHref","#",1,"font-30","cursor-pointer",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"middle","flex-grow-1"],[1,"title"],[1,"menu-ptions"],[1,"btn-no-color",3,"click"],["src","assets/images/icons-menu.svg"],[1,"upper-content",2,"overflow","unset !important"],[1,"content-details"],[1,"date"],[1,"label"],[1,"line"],[1,"overflow-y-auto"],[1,"middle-content"],[4,"ngIf"],[1,"ion-no-margin","ion-no-padding"],[3,"innerHTML"],[1,"bottom-content","width-100"],["class","ion-no-margin ion-no-padding cursor-pointer",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"ion-no-margin","ion-no-padding","cursor-pointer"],[1,"d-block",3,"click"],[1,"attach-title-item"],[1,"span-right","color-red","btn-size"],["hidden","","name","close"],[1,"span-left"],[1,"span-right"],[1,"h3-event-title"],["class","content-items width-100",4,"ngIf"],[1,"content-items","width-100"],["class"," ion-no-padding width-100 cursor-pointer","lines","none",3,"click",4,"ngFor","ngForOf"],["lines","none",1,"ion-no-padding","width-100","cursor-pointer",3,"click"],[1,"schedule-time"],[1,"time-start"],[1,"time-end"],[1,"schedule-details"],[1,"location"],[1,"description"],[1,"aside-right","flex-column","height-100","overflow-y-auto"],[1,"buttons"],[1,"option-desc"],["shape","round",1,"btn-cancel",3,"click"],["shape","round",1,"btn-ok",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["full","","class","btn-ok","shape","round",3,"click",4,"ngIf"],[1,"solid"],["full","","shape","round",1,"btn-ok",3,"click"],["hidden","",1,"solid"],["hidden","","shape","round",1,"btn-cancel"]],template:function(t,e){1&t&&(m.TgZ(0,"ion-header",0),m._UZ(1,"app-header"),m.qZA(),m.TgZ(2,"div",1),m._UZ(3,"ion-menu-button"),m.qZA(),m.TgZ(4,"ion-content"),m.TgZ(5,"div",2),m.YNc(6,I,33,7,"div",3),m.YNc(7,U,28,3,"div",4),m.YNc(8,J,15,1,"div",4),m.qZA(),m.qZA()),2&t&&(m.xp6(6),m.Q6J("ngIf",e.task),m.xp6(1),m.Q6J("ngIf",e.task&&!e.p.userRole(m.DdM(3,F))),m.xp6(1),m.Q6J("ngIf",e.task&&e.p.userRole(m.DdM(4,F))))},styles:[".main-content[_ngcontent-%COMP%]{background-color:#fff!important;border-top-left-radius:25px;border-top-right-radius:25px}.content[_ngcontent-%COMP%]{padding:30px 20px 0!important;margin:0;float:left}.color-red[_ngcontent-%COMP%]{font-weight:500;color:#d30a0a!important}.btn-size[_ngcontent-%COMP%]{font-size:18px!important}.main-header[_ngcontent-%COMP%]{font-family:Roboto;border-top-left-radius:25px;border-top-right-radius:25px;background-color:#fff;overflow:auto;color:#000;transform:translate3d(0,1px,0)}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%]{width:360px;margin:0 auto;overflow:auto;padding:0!important;background:#fff}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .middle[_ngcontent-%COMP%]{padding:0!important;float:left;width:280px;margin:2.5px 0 0 5px;display:flex;align-items:center}.main-header[_ngcontent-%COMP%] .header-top[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{padding:0!important;float:right;font-size:25px;color:#0782c9;margin:5px 0 0}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%]{width:310px;overflow:auto;margin:0 auto}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-icon[_ngcontent-%COMP%]{width:30px;font-size:25px;float:left;padding:2px}.main-header[_ngcontent-%COMP%] .header-bottom[_ngcontent-%COMP%] .header-bottom-contacts[_ngcontent-%COMP%]{width:275px;font-size:15px;color:#797979;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;float:left;padding:5px;margin:1px}.main-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:25px;overflow:auto;float:left;padding-top:4px;padding-left:5px}.main-header[_ngcontent-%COMP%] .btn-no-color[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{font-size:15px;border:1px solid red}ion-item-group[_ngcontent-%COMP%]{margin:15px}ion-button[_ngcontent-%COMP%]{display:block;width:80%;margin:20px auto}.upper-content[_ngcontent-%COMP%]{font-family:Roboto;margin-left:41px;overflow:auto;font-size:18px}.upper-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{border-radius:20px;background:#ffb703;float:right;padding:5px 13.5px;color:#fff}.upper-content[_ngcontent-%COMP%] .button-calendar-type[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{height:25px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%]{font-size:17px}.upper-content[_ngcontent-%COMP%] .content-details[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{color:#797979}.middle-conten[_ngcontent-%COMP%] .middle-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px}.bottom-content[_ngcontent-%COMP%]{margin:0 auto}.bottom-content[_ngcontent-%COMP%] .bottom-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;margin:0 0 0 10px}.bottom-content[_ngcontent-%COMP%] .attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 5px 10px;padding:5px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.bottom-content[_ngcontent-%COMP%] .attach-title-item[_ngcontent-%COMP%]{font-size:18px;width:100%;color:#0d89d1;padding-bottom:5px}.bottom-content[_ngcontent-%COMP%] .span-left[_ngcontent-%COMP%]{float:left;font-size:15x}.bottom-content[_ngcontent-%COMP%] .span-right[_ngcontent-%COMP%]{text-align:right;float:right;font-size:13px}.aside-right[_ngcontent-%COMP%]{padding:0 20px;margin:20px 0}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:20px}.aside-right[_ngcontent-%COMP%] .arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-between}.aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-delete[_ngcontent-%COMP%], .aside-right[_ngcontent-%COMP%] .buttons[_ngcontent-%COMP%] .btn-ok[_ngcontent-%COMP%]{height:auto!important;font-size:16px!important;font-weight:600!important;width:100%!important;margin-bottom:10px!important;padding:15px!important}.aside-right[_ngcontent-%COMP%] .solid[_ngcontent-%COMP%]{display:block;width:90%;border-top:1px solid #ebebeb;margin:0 auto 10px!important}.content-items[_ngcontent-%COMP%] .item-exp[_ngcontent-%COMP%]{overflow:auto;padding-top:5px;padding-bottom:5px}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%]{padding:0;margin:0}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between;align-items:center}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]{padding-bottom:5px;margin-top:5px;border-bottom:1px solid #ebebeb;display:flex;justify-content:space-between;align-items:center}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{margin-right:10px}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .time-end[_ngcontent-%COMP%], .content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .time-start[_ngcontent-%COMP%]{color:#797979!important;font-family:Roboto;font-size:13px}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-date[_ngcontent-%COMP%]{margin-right:10px;width:22%;color:#797979!important;font-size:13px}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;width:100%}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%] .location[_ngcontent-%COMP%]{font-family:Roboto;font-size:13px;color:#000;width:100%}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .schedule-details[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-family:Roboto;font-size:15px;font-weight:700;color:#0d89d1}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%] .color[_ngcontent-%COMP%]{width:5px;height:40px;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:#f05d5e}.content-items[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%] ion-item[_ngcontent-%COMP%]:last-child{border-bottom:unset!important;padding-bottom:unset!important}@media only screen and (max-width: 800px){.content[_ngcontent-%COMP%]{width:100%!important}.aside-right[_ngcontent-%COMP%]{display:none}}@media only screen and (min-width: 801px){.menu-ptions[_ngcontent-%COMP%]{display:none}.content[_ngcontent-%COMP%]{width:65%;border-right:1px solid #d8d8d8}.aside-right[_ngcontent-%COMP%]{width:35%}}@media only screen and (min-width: 1024px){.content[_ngcontent-%COMP%]{width:70%}.aside-right[_ngcontent-%COMP%]{width:30%}}@media only screen and (min-width: 1140px){.content[_ngcontent-%COMP%]{width:75%}.aside-right[_ngcontent-%COMP%]{width:25%}}.option-desc[_ngcontent-%COMP%]{display:flex;color:#828282;width:100%;justify-content:space-between;align-items:center;font-size:11pt}.option-desc[_ngcontent-%COMP%] .option-desc-line[_ngcontent-%COMP%]{height:1px;flex-grow:1;background-color:#e0e0e0;padding-left:4px}"]}),e}()},58970:function(e,o,i){"use strict";i.d(o,{e:function(){return s}});var a=i(37716),r=i(35957),s=function(){var e=function(){function e(n,o){t(this,e),this.modalController=n,this.navParams=o,this.imageUrl=this.navParams.get("imageUrl")}return n(e,[{key:"ngOnInit",value:function(){}},{key:"zoom",value:function(t){}},{key:"close",value:function(){this.modalController.dismiss()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(r.IN),a.Y36(r.X1))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-image-modal"]],decls:9,vars:1,consts:[["fullscreen",""],["lines","none","text-center","",1,"close"],["fill","clear",3,"click"],["name","close","slot","start"],[1,"swipper-zoom-container"],[3,"src"]],template:function(t,e){1&t&&(a.TgZ(0,"ion-content",0),a.TgZ(1,"ion-item",1),a.TgZ(2,"ion-button",2),a.NdJ("click",function(){return e.close()}),a.TgZ(3,"ion-icon",3),a._uU(4,"Fechar"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(5,"ion-slides"),a.TgZ(6,"ion-slide"),a.TgZ(7,"div",4),a._UZ(8,"img",5),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.xp6(8),a.s9C("src",e.imageUrl,a.LSH))},directives:[r.W2,r.Ie,r.YG,r.gu,r.Hr,r.A$],styles:[".close[_ngcontent-%COMP%]{--background:transparent;margin-top:40px}.close[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:2rem}ion-content[_ngcontent-%COMP%]{--background:#ccc}ion-slides[_ngcontent-%COMP%]{height:80%}"]}),e}()},29777:function(e,o,i){"use strict";i.d(o,{i:function(){return b}});var a=i(64762),r=i(45470),s=i(82316),c=i(3679),d=i(86807),l=i(37716),u=i(35957),p=i(61957),g=i(86704),h=i(84267),m=i(84465),f=i(38583);function v(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"div",19),l.TgZ(1,"ion-input",20),l.NdJ("ngModelChange",function(t){return l.CHM(n),l.oxw().pub.Title=t}),l.qZA(),l.qZA()}if(2&t){var o,i=l.oxw();l.ekj("input-error",(null==i.Form||null==(o=i.Form.get("Subject"))?null:o.invalid)&&i.validateFrom),l.xp6(1),l.Q6J("ngModel",i.pub.Title)}}function x(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"div",21),l.TgZ(1,"div",22),l.TgZ(2,"div",23),l._UZ(3,"ion-icon",24),l.qZA(),l.TgZ(4,"div",25),l.TgZ(5,"ion-textarea",26),l.NdJ("ngModelChange",function(t){return l.CHM(n),l.oxw().pub.Message=t}),l.qZA(),l.qZA(),l.qZA(),l.qZA()}if(2&t){var o,i=l.oxw();l.xp6(4),l.ekj("input-error",(null==i.Form||null==(o=i.Form.get("Message"))?null:o.invalid)&&i.validateFrom),l.xp6(1),l.Q6J("ngModel",i.pub.Message)}}function Z(t,e){if(1&t){var n=l.EpF();l.TgZ(0,"div",7),l.TgZ(1,"ion-label",27),l._uU(2,"Fotografia Anexada"),l.qZA(),l.TgZ(3,"ion-item",28),l.TgZ(4,"ion-thumbnail",15),l.TgZ(5,"ion-img",29),l.NdJ("ngModelChange",function(t){return l.CHM(n),l.oxw().capturedImage=t}),l.qZA(),l.qZA(),l.TgZ(6,"ion-label"),l.TgZ(7,"p"),l._uU(8),l.qZA(),l.TgZ(9,"p",30),l._uU(10,"size"),l.qZA(),l.qZA(),l.TgZ(11,"ion-icon",31),l.NdJ("click",function(){return l.CHM(n),l.oxw().clear()}),l.qZA(),l.qZA(),l.qZA()}if(2&t){var o=l.oxw();l.xp6(5),l.Q6J("ngModel",o.capturedImage)("src","data:image/png;base64,"+o.capturedImage),l.xp6(3),l.Oqu(o.capturedImageTitle)}}var b=function(){var e=function(){function e(n,o,i,a,c,d){t(this,e),this.modalController=n,this.photoService=o,this.navParams=i,this.publications=a,this.camera=c,this.toastService=d,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),this.stepHour=1,this.stepMinute=5,this.stepSecond=5,this.color="primary",this.validateFrom=!1,this.pub=new r.S,this.image=new s.E,this.Defaultimage="",this.publicationType=this.navParams.get("publicationType"),this.folderId=this.navParams.get("folderId"),this.publicationTitle="Nova Publica\xe7\xe3o"}return n(e,[{key:"ngOnInit",value:function(){this.setTitle(),this.clear()}},{key:"takePicture",value:function(){var t=this;this.camera.getPicture({quality:90,destinationType:this.camera.DestinationType.DATA_URL,encodingType:this.camera.EncodingType.JPEG,mediaType:this.camera.MediaType.PICTURE,targetWidth:720,targetHeight:720}).then(function(e){t.capturedImage=e,t.capturedImageTitle=(new Date).getTime()+".jpeg"},function(t){})}},{key:"getPicture",value:function(){var t=this;this.camera.getPicture({quality:90,sourceType:this.camera.PictureSourceType.PHOTOLIBRARY,destinationType:this.camera.DestinationType.DATA_URL,encodingType:this.camera.EncodingType.JPEG,mediaType:this.camera.MediaType.PICTURE,targetWidth:720,targetHeight:720}).then(function(e){t.capturedImage=e,t.capturedImageTitle=(new Date).getTime()+".jpeg"},function(t){})}},{key:"runValidation",value:function(){this.validateFrom=!0}},{key:"injectValidation",value:function(){this.Form=new c.cw({Subject:new c.NI(this.pub.Title,[]),capturedImage:new c.NI(this.capturedImage,[]),Message:new c.NI(this.pub.Message,[c.kI.maxLength(1e3)])})}},{key:"save",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o,i,a;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.injectValidation(),this.runValidation(),!this.Form.invalid){t.next=2;break}return t.abrupt("return",!1);case 2:if("3"!=this.publicationType){t.next=58;break}if(console.log(this.navParams.get("publication")),""==this.capturedImage){t.next=22;break}return this.publication={DateIndex:this.publication.DateIndex,DocumentId:this.publication.DocumentId,ProcessId:this.publication.ProcessId,Title:this.pub.Title,Message:this.pub.Message,DatePublication:this.publication.DatePublication,OriginalFileName:this.capturedImageTitle,FileBase64:this.capturedImage,FileExtension:"jpeg"},e=this.toastService.loading(),t.prev=6,console.log(this.publication),t.next=10,this.publications.UpdatePublication(this.publication.ProcessId,this.publication).toPromise();case 10:this.toastService.successMessage("Publica\xe7\xe3o criado"),this.close(),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(6),this.toastService.badRequest("Publica\xe7\xe3o n\xe3o criado");case 17:return t.prev=17,e.remove(),t.finish(17);case 20:t.next=56;break;case 22:if(!this.publication.OriginalFileName){t.next=40;break}return this.publication={DateIndex:this.publication.DateIndex,DocumentId:this.publication.DocumentId,ProcessId:this.publication.ProcessId,Title:this.pub.Title,Message:this.pub.Message,DatePublication:this.publication.DatePublication,OriginalFileName:this.capturedImageTitle,FileBase64:this.capturedImage,FileExtension:"jpeg"},console.log("Edit change image"),console.log(this.publication),n=this.toastService.loading(),t.prev=25,t.next=28,this.publications.UpdatePublication(this.publication.ProcessId,this.publication).toPromise();case 28:this.toastService.successMessage("Publica\xe7\xe3o criado"),this.close(),t.next=35;break;case 32:t.prev=32,t.t1=t.catch(25),this.toastService.badRequest("Publica\xe7\xe3o n\xe3o criado");case 35:return t.prev=35,n.remove(),t.finish(35);case 38:t.next=56;break;case 40:return this.publication={DateIndex:this.publication.DateIndex,DocumentId:this.publication.DocumentId,ProcessId:this.publication.ProcessId,Title:this.pub.Title,Message:this.pub.Message,DatePublication:this.publication.DatePublication},o=this.toastService.loading(),t.prev=42,console.log(this.publication),t.next=46,this.publications.UpdatePublication(this.publication.ProcessId,this.publication).toPromise();case 46:this.toastService.successMessage("Publica\xe7\xe3o criado"),this.close(),t.next=53;break;case 50:t.prev=50,t.t2=t.catch(42),this.toastService.badRequest("Publica\xe7\xe3o n\xe3o criado");case 53:return t.prev=53,o.remove(),t.finish(53);case 56:t.next=76;break;case 58:return i=(0,d.formatDate)(new Date,"yyyy-MM-dd HH:mm:ss"),console.log(i),this.publication={DateIndex:i,DocumentId:null,ProcessId:this.folderId,Title:this.pub.Title,Message:this.pub.Message,DatePublication:i,OriginalFileName:this.capturedImageTitle,FileBase64:this.capturedImage,FileExtension:"jpeg"},a=this.toastService.loading(),t.prev=61,console.log(this.publication),t.next=65,this.publications.CreatePublication(this.folderId,this.publication).toPromise();case 65:this.close(),this.toastService.successMessage("Publica\xe7\xe3o criado"),this.close(),t.next=73;break;case 70:t.prev=70,t.t3=t.catch(61),this.toastService.badRequest("Publica\xe7\xe3o n\xe3o criado");case 73:return t.prev=73,a.remove(),t.finish(73);case 76:case"end":return t.stop()}},t,this,[[6,14,17,20],[25,32,35,38],[42,50,53,56],[61,70,73,76]])}))}},{key:"close",value:function(){var t=this;this.modalController.dismiss().then(function(){t.showLoader=!0})}},{key:"clear",value:function(){this.capturedImage=""}},{key:"setTitle",value:function(){"1"==this.publicationType?this.publicationTitle="Nova Publica\xe7\xe3o R\xe1pida":"2"==this.publicationType?this.publicationTitle="Nova Publica\xe7\xe3o":"3"==this.publicationType&&(this.publicationTitle="Editar Publica\xe7\xe3o",this.pub=this.navParams.get("publication"),console.log(this.pub,"pub"))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(l.Y36(u.IN),l.Y36(p.T),l.Y36(u.X1),l.Y36(g.H),l.Y36(h.V1),l.Y36(m.k))},e.\u0275cmp=l.Xpm({type:e,selectors:[["app-new-publication"]],decls:33,vars:4,consts:[[1,"content-container"],[1,"title-content","width-100"],[1,"div-title"],[1,"title"],["class","ion-item-container",3,"input-error",4,"ngIf"],["class","container-div",4,"ngIf"],["class","ion-item-container-no-border",4,"ngIf"],[1,"ion-item-container-no-border"],[3,"click"],[1,"attach-icon"],["src","assets/images/icons-add-photo.svg"],[1,"attach-document"],["src","assets/images/icons-add-photos.svg"],[1,"ion-no-border"],[1,"footer-toolbar"],["slot","start"],["fill","clear","color","#061b52",1,"btn-cancel",3,"click"],["slot","end"],["fill","clear","color","#fff",1,"btn-ok",3,"click"],[1,"ion-item-container"],["name","title","ngDefaultControl","","placeholder","T\xedtulo",3,"ngModel","ngModelChange"],[1,"container-div"],[1,"ion-item-class-2"],[1,"ion-icon-class"],["slot","start","src","assets/images/icons-description.svg"],[1,"ion-textarea-class"],["name","description","ngDefaultControl","","rows","12","cols","20","placeholder","Corpo de texto...",3,"ngModel","ngModelChange"],[1,"attached-title"],["lines","none"],["name","image","ngDefaultControl","",3,"ngModel","src","ngModelChange"],["hidden",""],["name","close",3,"click"]],template:function(t,e){1&t&&(l.TgZ(0,"ion-content"),l.TgZ(1,"div",0),l.TgZ(2,"div",1),l.TgZ(3,"div",2),l.TgZ(4,"ion-label",3),l._uU(5),l.qZA(),l.qZA(),l.qZA(),l.YNc(6,v,2,3,"div",4),l.YNc(7,x,6,3,"div",5),l.YNc(8,Z,12,3,"div",6),l.TgZ(9,"div",7),l.TgZ(10,"ion-label",8),l.NdJ("click",function(){return e.takePicture()}),l.TgZ(11,"div",9),l._UZ(12,"ion-icon",10),l.qZA(),l.TgZ(13,"div",11),l.TgZ(14,"ion-label"),l._uU(15,"Tirar Fotografia"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(16,"div",7),l.TgZ(17,"ion-label",8),l.NdJ("click",function(){return e.getPicture()}),l.TgZ(18,"div",9),l._UZ(19,"ion-icon",12),l.qZA(),l.TgZ(20,"div",11),l.TgZ(21,"ion-label"),l._uU(22,"Anexar Fotografia"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.TgZ(23,"ion-footer",13),l.TgZ(24,"ion-toolbar",14),l.TgZ(25,"ion-buttons",15),l.TgZ(26,"ion-button",16),l.NdJ("click",function(){return e.close()}),l.TgZ(27,"ion-label"),l._uU(28,"Cancelar"),l.qZA(),l.qZA(),l.qZA(),l.TgZ(29,"ion-buttons",17),l.TgZ(30,"ion-button",18),l.NdJ("click",function(){return e.save()}),l.TgZ(31,"ion-label"),l._uU(32,"Gravar"),l.qZA(),l.qZA(),l.qZA(),l.qZA(),l.qZA()),2&t&&(l.xp6(5),l.Oqu(e.publicationTitle),l.xp6(1),l.Q6J("ngIf","1"!=e.publicationType),l.xp6(1),l.Q6J("ngIf","1"!=e.publicationType),l.xp6(1),l.Q6J("ngIf",""!=e.capturedImage))},directives:[u.W2,u.Q$,f.O5,u.gu,u.fr,u.sr,u.Sm,u.YG,u.pK,u.j9,c.Fj,c.JJ,c.On,u.g2,u.Ie,u.Bs,u.Xz],styles:["[_nghost-%COMP%]{background:#0782c9}ion-content[_ngcontent-%COMP%]{--background:transparent;transform:translate3d(0,5px,0);--border-radius:30px}ion-footer[_ngcontent-%COMP%]{background:#fff}ion-toolbar[_ngcontent-%COMP%]{border-width:0!important}.div-top-header[_ngcontent-%COMP%]{margin:0 auto;background-color:#0782c9;overflow:auto;padding-top:15px;border:0!important}.div-search[_ngcontent-%COMP%]{font-size:45px;float:left;margin:0 0 0 10px}.div-logo[_ngcontent-%COMP%]{background:transparent;width:140px;margin:5px 0 0 71px;float:left}.div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.div-profile[_ngcontent-%COMP%]{font-size:45px;float:right;margin-right:10px}.content-top[_ngcontent-%COMP%]{background:#f3f2f2;height:20px}.content-container[_ngcontent-%COMP%], .content-top[_ngcontent-%COMP%]{margin:0 auto;border-top-left-radius:25px;border-top-right-radius:25px}.content-container[_ngcontent-%COMP%]{width:100%;background:#fff;height:100%;box-shadow:0 0 18px rgba(0,0,0,.6);padding:25px 20px 0;overflow:auto}.title-content[_ngcontent-%COMP%]{margin:0 auto;overflow:auto;padding:0!important}.div-title[_ngcontent-%COMP%]{width:270px;float:left;margin:2.5px 0 0 5px}.title[_ngcontent-%COMP%]{font-size:25px}.container-div[_ngcontent-%COMP%]{margin-bottom:15px;overflow:auto}.ion-item-container[_ngcontent-%COMP%]{margin:15px auto;border:1px solid #ebebeb;border-radius:5px;padding-left:10px}.ion-item-container-no-border[_ngcontent-%COMP%]{width:100%;margin:0 auto;padding:0!important;overflow:auto}.ion-item-class-2[_ngcontent-%COMP%]{margin:0 auto;display:flex}.ion-icon-class[_ngcontent-%COMP%]{width:45px;height:45px;float:left;padding:10px;font-size:25px}.ion-textarea-class[_ngcontent-%COMP%]{width:315px;height:auto;border:1px solid #ebebeb;border-radius:5px;padding-left:5px;padding-right:10px;flex:1}.ion-input-class-no-height[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:5px;overflow:auto}.attach-document[_ngcontent-%COMP%]{font-size:15px;color:#0d89d1;margin:5px 5px 20px 10px;padding:5px;float:left}.attach-icon[_ngcontent-%COMP%]{width:37px;font-size:35px;float:left}.attached-title[_ngcontent-%COMP%]{font-family:Roboto;font-size:15px;font-weight:700;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#000}"]}),e}()},51230:function(e,o,i){"use strict";i.d(o,{e:function(){return x}});var a=i(64762),r=i(58970),s=i(29777),c=i(37716),d=i(35957),l=i(86704),u=i(84465),p=i(39895);function g(t,e){1&t&&c._UZ(0,"ion-progress-bar",10)}function h(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",21),c.TgZ(1,"img",22),c.NdJ("click",function(){c.CHM(n);var t=c.oxw(2);return t.openPreview(t.publication.FileBase64)}),c.qZA(),c.qZA()}if(2&t){var o=c.oxw(2);c.xp6(1),c.s9C("src",o.publication.FileBase64,c.LSH)}}function m(t,e){1&t&&(c.TgZ(0,"div",21),c._UZ(1,"img",23),c.qZA())}function f(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",11),c.TgZ(1,"div",12),c.TgZ(2,"div",13),c.NdJ("click",function(){return c.CHM(n),c.oxw().goBack()}),c._UZ(3,"ion-icon",14),c.qZA(),c.TgZ(4,"div",15),c.TgZ(5,"ion-label",16),c._uU(6),c.qZA(),c.TgZ(7,"p",17),c._uU(8),c.ALo(9,"date"),c.qZA(),c.qZA(),c.qZA(),c.TgZ(10,"div",18),c.YNc(11,h,2,1,"div",19),c.YNc(12,m,2,0,"div",19),c.TgZ(13,"div",20),c.TgZ(14,"p"),c._uU(15),c.qZA(),c.qZA(),c.qZA(),c.qZA()}if(2&t){var o=c.oxw();c.xp6(6),c.hij(" ",o.publication.Title,""),c.xp6(2),c.Oqu(c.xi3(9,5,o.publication.DatePublication,"dd-MM-yy | h:mm")),c.xp6(3),c.Q6J("ngIf",o.publication.FileBase64.length>30),c.xp6(1),c.Q6J("ngIf",o.publication.FileBase64.length<30),c.xp6(3),c.Oqu(o.publication.Message)}}function v(t,e){if(1&t){var n=c.EpF();c.TgZ(0,"div",11),c.TgZ(1,"div",24),c.TgZ(2,"div",25),c.TgZ(3,"ion-icon",26),c.NdJ("click",function(){return c.CHM(n),c.oxw().close()}),c.qZA(),c.qZA(),c.TgZ(4,"div",15),c.TgZ(5,"ion-label",16),c._UZ(6,"ion-skeleton-text",27),c.qZA(),c.TgZ(7,"p",17),c._UZ(8,"ion-skeleton-text",28),c.qZA(),c.qZA(),c.qZA(),c.TgZ(9,"div",18),c.TgZ(10,"div",21),c._UZ(11,"img",23),c.qZA(),c.TgZ(12,"div",29),c.TgZ(13,"p"),c._UZ(14,"ion-skeleton-text",30),c.qZA(),c.TgZ(15,"p"),c._UZ(16,"ion-skeleton-text",30),c.qZA(),c.qZA(),c.qZA(),c.qZA()}}var x=function(){var e=function(){function e(n,o,i,a,r,s){var c=this;t(this,e),this.modalController=n,this.publications=o,this.animationController=i,this.toastService=a,this.activatedRoute=r,this.router=s,this.isModal=!1,this.activatedRoute.paramMap.subscribe(function(t){console.log(t),t.params&&(c.folderId=t.params.folderId,c.publicationId=t.params.publicationId,console.log(t.params))}),this.publication={DateIndex:null,DocumentId:"",ProcessId:"",Title:"",Message:"",DatePublication:null,FileBase64:"",OriginalFileName:"",FileExtension:""}}return n(e,[{key:"ngOnInit",value:function(){this.getPublicationDetail()}},{key:"doRefresh",value:function(t){this.getPublicationDetail(),setTimeout(function(){t.target.complete()},2e3)}},{key:"getPublicationDetail",value:function(){var t=this;this.showLoader=!0,console.log(this.publicationId),this.publications.GetPublicationById(this.publicationId).subscribe(function(e){console.log(e),t.publication={DateIndex:e.DateIndex,DocumentId:e.DocumentId,ProcessId:e.ProcessId,Title:e.Title,Message:e.Message,DatePublication:e.DatePublication,FileBase64:"data:image/jpg;base64,"+e.FileBase64,OriginalFileName:e.OriginalFileName,FileExtension:"jpeg"},t.showLoader=!1})}},{key:"close",value:function(){this.modalController.dismiss()}},{key:"goBack",value:function(){this.isModal?this.close():this.router.navigate(["/home/publications",this.folderId])}},{key:"deletePost",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.toastService.loading(),t.prev=1,t.next=4,this.publications.DeletePublication(this.folderId,this.publicationId).toPromise();case 4:this.toastService.successMessage("Publica\xe7ao eliminado"),this.close(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),this.toastService.badRequest("Publica\xe7ao n\xe3o eliminado");case 11:return t.prev=11,e.remove(),t.finish(11);case 14:case"end":return t.stop()}},t,this,[[1,8,11,14]])}))}},{key:"editPost",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(this.publication),e.next=3,this.modalController.create({component:s.i,componentProps:{publicationType:t,publication:this.publication,folderId:this.folderId},cssClass:"new-publication modal modal-desktop",backdropDismiss:!1});case 3:return n=e.sent,e.next=6,n.present();case 6:n.onDidDismiss().then(function(){setTimeout(function(){o.getPublicationDetail()},5e3)});case 7:case"end":return e.stop()}},e,this)}))}},{key:"openPreview",value:function(t){this.modalController.create({component:r.e,componentProps:{imageUrl:t}}).then(function(t){return t.present()})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.Y36(d.IN),c.Y36(l.H),c.Y36(d.vB),c.Y36(u.k),c.Y36(p.gz),c.Y36(p.F0))},e.\u0275cmp=c.Xpm({type:e,selectors:[["app-publication-detail"]],decls:19,vars:3,consts:[[1,"ion-no-border","d-md-none"],["name","refresher","slot","fixed",3,"ionRefresh"],["type","indeterminate",4,"ngIf"],[1,"content-container"],["class","d-flex flex-column",4,"ngIf"],[1,"footer-toolbar"],["slot","start"],["fill","clear","color","#ffe0e0",1,"btn-delete",3,"click"],["slot","end"],["fill","clear","color","#fff",1,"btn-ok",3,"click"],["type","indeterminate"],[1,"d-flex","flex-column"],[1,"title-content","px-20","width-100"],[1,"back-icon","cursor-pointer",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"],[1,"div-title"],[1,"title"],[1,"post-data"],[1,"post-item","overflow-y-auto"],["class","post-img",4,"ngIf"],[1,"post-description","px-20"],[1,"post-img"],["alt","image","tappable","",3,"src","click"],["src","/assets/icon/icon-no-image.svg","alt","image"],[1,"title-content","width-100"],[1,"back-icon","cursor-pointer"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg",3,"click"],["animated","",2,"width","60%"],["animated","",2,"width","20%"],[1,"post-description"],["animated",""]],template:function(t,e){1&t&&(c.TgZ(0,"ion-header",0),c._UZ(1,"app-header"),c.qZA(),c.TgZ(2,"ion-content"),c.TgZ(3,"ion-refresher",1),c.NdJ("ionRefresh",function(t){return e.doRefresh(t)}),c.YNc(4,g,1,0,"ion-progress-bar",2),c._UZ(5,"ion-refresher-content"),c.qZA(),c.TgZ(6,"div",3),c.YNc(7,f,16,8,"div",4),c.YNc(8,v,17,0,"div",4),c.qZA(),c.qZA(),c.TgZ(9,"ion-footer"),c.TgZ(10,"ion-toolbar",5),c.TgZ(11,"ion-buttons",6),c.TgZ(12,"ion-button",7),c.NdJ("click",function(){return e.deletePost()}),c.TgZ(13,"ion-label"),c._uU(14,"Eliminar"),c.qZA(),c.qZA(),c.qZA(),c.TgZ(15,"ion-buttons",8),c.TgZ(16,"ion-button",9),c.NdJ("click",function(){return e.editPost("3")}),c.TgZ(17,"ion-label"),c._uU(18,"Editar"),c.qZA(),c.qZA(),c.qZA(),c.qZA(),c.qZA()),2&t&&(c.xp6(4),c.Q6J("ngIf",e.showLoader),c.xp6(3),c.Q6J("ngIf",""!=e.publication.Title),c.xp6(1),c.Q6J("ngIf",""==e.publication.Title))},styles:["ion-content[_ngcontent-%COMP%]{--background:transparent;transform:translate3d(0,5px,0);--border-radius:30px}ion-footer[_ngcontent-%COMP%]{background:#fff}ion-toolbar[_ngcontent-%COMP%]{border-width:0!important}.div-top-header[_ngcontent-%COMP%]{margin:0 auto;background-color:#0782c9;overflow:auto;padding-top:15px;border:0!important}.div-search[_ngcontent-%COMP%]{font-size:45px;float:left;margin:0 0 0 10px}.div-logo[_ngcontent-%COMP%]{background:transparent;width:140px;margin:5px 0 0 71px;float:left}.div-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.div-profile[_ngcontent-%COMP%]{font-size:45px;float:right;margin-right:10px}.content-top[_ngcontent-%COMP%]{background:#f3f2f2;height:20px}.content-container[_ngcontent-%COMP%], .content-top[_ngcontent-%COMP%]{margin:0 auto;border-top-left-radius:25px;border-top-right-radius:25px}.content-container[_ngcontent-%COMP%]{width:100%;background:#fff;height:100%;box-shadow:0 0 18px rgba(0,0,0,.6);padding:25px 0 0;overflow:auto}.title-content[_ngcontent-%COMP%]{margin:0 auto;overflow:auto}.back-icon[_ngcontent-%COMP%]{width:auto;float:left;font-size:35px;overflow:auto}.div-title[_ngcontent-%COMP%]{float:left;margin:2.5px 0 0 5px}.title[_ngcontent-%COMP%]{font-size:25px}.post-img[_ngcontent-%COMP%]{width:100%;height:400px;margin:0 auto;border-radius:0!important;overflow:hidden}.post-img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.post-description[_ngcontent-%COMP%]{margin:0 auto 35px}"]}),e}()},57363:function(e,o,i){"use strict";i.d(o,{k:function(){return h}});var a=i(37716),r=i(35957),s=i(91841),c=i(92340),d=i(37556),l=function(){var e=function(){function e(n,o){t(this,e),this.http=n,this.authheader={},this.loggeduser=o.ValidatedUser,this.headers=new s.WM,this.headers=this.headers.set("Authorization",this.loggeduser.BasicAuthKey)}return n(e,[{key:"getOrganicEntity",value:function(){return this.http.get(c.N.apiURL+"ecm/organic",{headers:this.headers})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.LFG(s.eN),a.LFG(d.e))},e.\u0275prov=a.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),u=i(3679),p=i(38583);function g(t,e){if(1&t){var n=a.EpF();a.TgZ(0,"li",9),a.NdJ("click",function(){var t=a.CHM(n).$implicit;return a.oxw().selectOrganicEntidy(t.Description)}),a._uU(1),a.qZA()}if(2&t){var o=e.$implicit;a.xp6(1),a.hij(" ",o.Description," ")}}var h=function(){var e=function(){function e(n,o){t(this,e),this.modalController=n,this.OrganicEntityService=o}return n(e,[{key:"ngOnInit",value:function(){this.getOrganicEntity()}},{key:"getOrganicEntity",value:function(){var t=this;this.OrganicEntityService.getOrganicEntity().subscribe(function(e){console.log(e),t.organicEntities=e,t.showOrganicEntities=e})}},{key:"filterContact",value:function(){var t=this.findEntity.toLowerCase(),e=this.organicEntities.filter(function(e){if(0==e.Description.toLowerCase().indexOf(t))return!0});this.showOrganicEntities=e}},{key:"selectOrganicEntidy",value:function(t){this.modalController.dismiss(t)}},{key:"close",value:function(){this.modalController.dismiss()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(r.IN),a.Y36(l))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-organic-entity"]],decls:14,vars:2,consts:[[1,"main-header"],[1,"main-header","d-flex"],[1,"d-flex","align-center"],[1,"icon",3,"click"],["src","assets/images/icons-arrow-arrow-left.svg",2,"font-size","35px"],[1,"main-container"],[1,"input-text","d-flex","ion-align-items-center"],["type","search","placeholder","Pesquisar",1,"search-input",3,"ngModel","ngModelChange"],[3,"click",4,"ngFor","ngForOf"],[3,"click"]],template:function(t,e){1&t&&(a._UZ(0,"ion-header",0),a.TgZ(1,"ion-toolbar",1),a.TgZ(2,"div",2),a.TgZ(3,"div",3),a.NdJ("click",function(){return e.close()}),a._UZ(4,"ion-icon",4),a.qZA(),a.TgZ(5,"div"),a.TgZ(6,"ion-title"),a._uU(7,"Entidade Org\xe2nica"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.TgZ(8,"ion-content"),a.TgZ(9,"div",5),a.TgZ(10,"div",6),a.TgZ(11,"ion-input",7),a.NdJ("ngModelChange",function(t){return e.findEntity=t})("ngModelChange",function(){return e.filterContact()}),a.qZA(),a.qZA(),a.TgZ(12,"ul"),a.YNc(13,g,2,1,"li",8),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.xp6(11),a.Q6J("ngModel",e.findEntity),a.xp6(2),a.Q6J("ngForOf",e.showOrganicEntities))},directives:[r.Gu,r.sr,r.gu,r.wd,r.W2,r.pK,r.j9,u.JJ,u.On,p.sg],styles:[".icon[_ngcontent-%COMP%], .main-header[_ngcontent-%COMP%]{display:flex;align-items:center}.icon[_ngcontent-%COMP%]{color:#797979;width:45px;height:45px;justify-content:center;font-size:25px}.main-container[_ngcontent-%COMP%]{padding:0 20px}.main-container[_ngcontent-%COMP%] .input-text[_ngcontent-%COMP%]{margin-top:20px;width:100%;height:45px;border-radius:5px;border:1px solid #ebebeb}.main-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:10px 0 0}.main-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-top:10px;margin:0;padding-bottom:10px;border-bottom:1px solid #ebebeb;list-style:none;font-family:Roboto;font-size:15px}"]}),e}()},4528:function(e,o,i){"use strict";i.d(o,{Z:function(){return Y}});var a=i(64762),r=i(38583),s=i(35161),c=i(57363),d=i(27538),l=i.n(d),u=i(75008),p=i(51230),g=i(33289),h=i(23066),m=i(37716),f=i(35957),v=i(91841),x=i(92340),Z=i(37556),b=function(){var e=function(){function e(n,o){t(this,e),this.http=n,this.authheader={},this.categories=Array,this.loggeduser=o.ValidatedUser,this.headers=new v.WM,this.headers=this.headers.set("Authorization",this.loggeduser.BasicAuthKey)}return n(e,[{key:"basicSearch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5?arguments[5]:void 0,r=x.N.apiURL+"search",s=new v.LE;return console.log(t),s=(s=(s=(s=(s=(s=s.set("assunto",t)).set("data",e)).set("remetente",n)).set("entidadeOrganica",o)).set("docTypeId",i)).set("applicationType",a),this.http.get("".concat(r),{headers:this.headers,params:s})}},{key:"mostSeachWord",value:function(t){var e=this.loggeduser.UserId.toString(),n=x.N.apiURL+"Processes/GetHitsByUserId",o=new v.LE;return o=(o=o.set("userId",e)).set("size",t),this.http.get("".concat(n),{headers:this.headers,params:o})}},{key:"searchForDoc",value:function(t,e,n,o,i,a){var r=x.N.apiURL+"search/attachment?",s=new v.LE;return console.log(t),s=(s=(s=(s=(s=(s=s.set("assunto",t)).set("data",e)).set("remetente",n)).set("entidadeOrganica",o)).set("docTypeId",i)).set("applicationType",a),this.http.get("".concat(r),{headers:this.headers,params:s})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(m.LFG(v.eN),m.LFG(Z.e))},e.\u0275prov=m.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),C=i(3679);function M(t,e){1&t&&m._UZ(0,"ion-progress-bar",23)}function w(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",24),m.NdJ("click",function(){return m.CHM(n),m.oxw().showHideAdvanceSearch(!0)}),m._UZ(1,"ion-icon",25),m.qZA()}}function k(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",26),m.NdJ("click",function(){return m.CHM(n),m.oxw().showHideAdvanceSearch(!1)}),m._UZ(1,"ion-icon",27),m.qZA()}}function P(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",28),m.TgZ(1,"button",5),m.NdJ("click",function(){return m.CHM(n),m.oxw().close()}),m._UZ(2,"ion-icon",29),m.qZA(),m.qZA()}}function A(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",30),m.TgZ(1,"li",31),m.TgZ(2,"div",32),m._UZ(3,"ion-icon",33),m.qZA(),m.TgZ(4,"div",34),m.TgZ(5,"ion-datetime",35),m.NdJ("ngModelChange",function(t){return m.CHM(n),m.oxw().searchDocumentDate=t}),m.qZA(),m.TgZ(6,"div",36),m.NdJ("click",function(){return m.CHM(n),m.oxw().clearInputDocumentDate()}),m._UZ(7,"ion-icon",37),m.qZA(),m.qZA(),m.qZA(),m.TgZ(8,"li",31),m.TgZ(9,"div",32),m._UZ(10,"ion-icon",38),m.qZA(),m.TgZ(11,"div",34),m.TgZ(12,"ion-input",39),m.NdJ("ngModelChange",function(t){return m.CHM(n),m.oxw().searchSender=t})("click",function(){return m.CHM(n),m.oxw().openAdvanceSearchSelection()}),m.qZA(),m.TgZ(13,"div",36),m.NdJ("click",function(){return m.CHM(n),m.oxw().clearInputRemetente()}),m._UZ(14,"ion-icon",37),m.qZA(),m.qZA(),m.qZA(),m.TgZ(15,"li",31),m.TgZ(16,"div",32),m._UZ(17,"ion-icon",40),m.qZA(),m.TgZ(18,"div",34),m.TgZ(19,"ion-input",41),m.NdJ("ngModelChange",function(t){return m.CHM(n),m.oxw().searchOrganicEntiry=t})("click",function(){return m.CHM(n),m.oxw().openOrganicEntitySelection()}),m.qZA(),m.TgZ(20,"div",36),m.NdJ("click",function(){return m.CHM(n),m.oxw().clearInputOrganicEntity()}),m._UZ(21,"ion-icon",37),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){var o=m.oxw();m.xp6(5),m.Q6J("ngModel",o.searchDocumentDate),m.xp6(7),m.Q6J("ngModel",o.searchSender),m.xp6(7),m.Q6J("ngModel",o.searchOrganicEntiry)}}var T=function(t){return{"active-category":t}};function _(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",47),m.NdJ("click",function(){var t=m.CHM(n).$implicit;return m.oxw(2).filterDocList(t.Name)})("click",function(){var t=m.CHM(n).index;return m.oxw(2).activeCategoty(t)}),m.TgZ(1,"span"),m._uU(2),m.qZA(),m.TgZ(3,"ion-label",48),m._uU(4),m.qZA(),m.qZA()}if(2&t){var o=e.$implicit;m.Q6J("ngClass",m.VKq(3,T,o.Active)),m.xp6(2),m.Oqu(o.Name),m.xp6(2),m.Oqu(o.Qtd)}}function O(t,e){if(1&t&&(m.TgZ(0,"div",42),m.TgZ(1,"div",43),m.TgZ(2,"div",44),m.YNc(3,_,5,5,"div",45),m.qZA(),m.TgZ(4,"button",46),m._UZ(5,"ion-icon",25),m.qZA(),m.qZA(),m.qZA()),2&t){var n=m.oxw();m.xp6(3),m.Q6J("ngForOf",n.searchCategories)}}function q(t,e){1&t&&(m.TgZ(0,"div",49),m.TgZ(1,"div",50),m.TgZ(2,"p",51),m._uU(3,"Assuntos mais recebidos"),m.qZA(),m._UZ(4,"div",52),m.qZA(),m.qZA())}function y(t,e){1&t&&(m.TgZ(0,"span",62),m._uU(1,"Mais Recentes"),m.qZA())}function D(t,e){1&t&&(m.TgZ(0,"span",62),m._uU(1,"Mais Antigos"),m.qZA())}function I(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",63),m.NdJ("click",function(){return m.CHM(n),m.oxw(2).reorderList("recent")}),m._UZ(1,"ion-icon",64),m.qZA()}}function S(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"div",63),m.NdJ("click",function(){return m.CHM(n),m.oxw(2).reorderList("old")}),m._UZ(1,"ion-icon",65),m.qZA()}}function N(t,e){1&t&&m._UZ(0,"ion-icon",76)}function F(t,e){1&t&&m._UZ(0,"ion-icon",77)}function U(t,e){1&t&&m._UZ(0,"ion-icon",78)}function E(t,e){if(1&t&&(m.TgZ(0,"span",79),m._uU(1),m.qZA()),2&t){var n=m.oxw().$implicit;m.xp6(1),m.Oqu(n.appName)}}function J(t,e){if(1&t){var n=m.EpF();m.TgZ(0,"li",66),m.NdJ("click",function(){var t=m.CHM(n).$implicit,e=m.oxw(2);return e.viewDetail(t),e.selectItem(t)}),m.TgZ(1,"div",4),m.YNc(2,N,1,0,"ion-icon",67),m.YNc(3,F,1,0,"ion-icon",68),m.YNc(4,U,1,0,"ion-icon",69),m.qZA(),m.TgZ(5,"div",70),m.TgZ(6,"div",71),m.TgZ(7,"span",72),m._uU(8),m.qZA(),m.YNc(9,E,2,1,"span",73),m.qZA(),m.TgZ(10,"div",71),m.TgZ(11,"span",74),m._uU(12),m.qZA(),m.TgZ(13,"span",75),m._uU(14),m.qZA(),m.qZA(),m.qZA(),m.qZA()}if(2&t){var o=e.$implicit,i=m.oxw(2);m.xp6(2),m.Q6J("ngIf","AccoesPresidenciais & ArquivoDespachoElect"==i.itemIcons()),m.xp6(1),m.Q6J("ngIf","Agenda"==i.itemIcons()),m.xp6(1),m.Q6J("ngIf","AccoesPresidenciais"==i.itemIcons()),m.xp6(4),m.Oqu(o.Assunto),m.xp6(1),m.Q6J("ngIf","AccoesPresidenciais & ArquivoDespachoElect"==i.itemIcons()),m.xp6(3),m.Oqu(o.EntidadeOrganicaNome),m.xp6(2),m.Oqu(i.formateIsoDate(o.Data))}}function R(t,e){if(1&t&&(m.TgZ(0,"div",53),m.TgZ(1,"div"),m.TgZ(2,"div",54),m.TgZ(3,"div",55),m.TgZ(4,"div",56),m.TgZ(5,"div",57),m.TgZ(6,"p"),m.TgZ(7,"span",58),m._uU(8,"Order por:"),m.qZA(),m.YNc(9,y,2,0,"span",59),m.YNc(10,D,2,0,"span",59),m.qZA(),m.qZA(),m.TgZ(11,"div"),m.YNc(12,I,2,0,"div",60),m.YNc(13,S,2,0,"div",60),m.qZA(),m.qZA(),m.qZA(),m.TgZ(14,"ul"),m.YNc(15,J,15,7,"li",61),m.qZA(),m.qZA(),m.qZA(),m.qZA()),2&t){var n=m.oxw();m.xp6(9),m.Q6J("ngIf","recent"==n.ordinance),m.xp6(1),m.Q6J("ngIf","old"==n.ordinance),m.xp6(2),m.Q6J("ngIf","old"==n.ordinance),m.xp6(1),m.Q6J("ngIf","recent"==n.ordinance),m.xp6(2),m.Q6J("ngForOf",n.showSearchDocuments)}}var Y=function(){var e=function(){function e(n,o,i,a){t(this,e),this.modalController=n,this.search=o,this.modalCtrl=i,this.navParams=a,this.searchCategories=[],this.showSearchDocuments=[],this.searchDocuments=[],this.showDocuments=!1,this.showAdvanceSearch=!1,this.slideOpts={slidesPerView:parseInt(""+window.innerWidth/147,10),initialSlide:0,speed:400},this.list=[],this.type="Agenda",this.select=!1,this.showSearchInput=!1,this.ordinance="recent",this.currentPath=window.location.pathname,this.type=this.navParams.get("type"),this.type=this.navParams.get("type"),this.select=this.navParams.get("select"),this.showSearchInput=this.navParams.get("showSearchInput"),null!=this.type&&null!=this.type||("/home/agenda"==this.currentPath?this.type="Agenda":"/home/gabinete-digital"==this.currentPath?this.type="AccoesPresidenciais & ArquivoDespachoElect":"/home/publications"==this.currentPath?this.type="AccoesPresidenciais":console.log("search bug!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"))}return n(e,[{key:"selectItem",value:function(t){return this.select&&this.modalController.dismiss({selected:t}),this.select}},{key:"ngOnInit",value:function(){var t=this;this.wordCloud(),window.onresize=function(e){t.windowWidth=window.innerWidth,t.loadWordCloud()},this.windowWidth=window.innerWidth,window.dynamicSearch=function(e){t.searchSubject=e},window.searchTriger=function(){t.basicSearch()}}},{key:"wordCloud",value:function(){var t=this;this.search.mostSeachWord("15").subscribe(function(e){document.querySelector(".seach-wrapper");var n=e[e.length-1].Hits,o=(e[0].Hits-n)/100,i=[];e.forEach(function(t){var e=Object.values(t);e[1]=(e[1]-n)/o*55/100+9,i.push(e)}),t.list=i,console.log(t.list);var a=document.documentElement.querySelector(".most-searched-word-container");setTimeout(function(){l()(a,{list:t.list,Family:"Times, serif",gridSize:15})},300)})}},{key:"loadWordCloud",value:function(){var t=this;setTimeout(function(){var e=document.documentElement.querySelector(".most-searched-word-container");l()(e,{list:t.list,Family:"Times, serif",gridSize:15})},100)}},{key:"close",value:function(){this.modalController.dismiss()}},{key:"reorderList",value:function(t){this.ordinance=t,this.showSearchDocuments="recent"==this.ordinance?this.sortArrayISODate(this.searchDocuments).reverse():this.sortArrayISODate(this.searchDocuments)}},{key:"sortArrayISODate",value:function(t){return t.sort(function(t,e){return t.Datae.Data?1:0})}},{key:"basicSearch",value:function(){var t=this;if("Agenda"==this.type)this.showLoader=!0,this.search.basicSearch(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"0").subscribe(function(e){console.log(e),e.Categories.forEach(function(t){t.Active=!1}),t.searchCategories=e.Categories,t.searchDocuments=t.sortArrayISODate(e.Documents),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,t.showLoader=!1,t.loadWordCloud()});else if("AccoesPresidenciais & ArquivoDespachoElect"==this.type)if(this.showLoader=!0,this.searchCategories=[],this.searchDocuments=[],this.showSearchDocuments=[],this.select){var e=0;this.search.searchForDoc(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"8").subscribe(function(n){n.Categories.forEach(function(e){e.Active=!1,t.searchCategories.push(e)}),t.sortArrayISODate(n.Documents).forEach(function(e){e.appName="Correspondencia",t.searchDocuments.push(e)}),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,2==++e&&(t.showLoader=!1),t.loadWordCloud()}),this.search.searchForDoc(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"361").subscribe(function(n){n.Categories.forEach(function(e){e.Active=!1,t.searchCategories.push(e)}),t.sortArrayISODate(n.Documents).forEach(function(e){e.appName="ArquivoDespachoElect",t.searchDocuments.push(e)}),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,t.loadWordCloud(),2==++e&&(t.showLoader=!1)})}else{var n=0;this.search.basicSearch(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"8").subscribe(function(e){e.Categories.forEach(function(e){e.Active=!1,t.searchCategories.push(e)}),t.sortArrayISODate(e.Documents).forEach(function(e){e.appName="Correspondencia",t.searchDocuments.push(e)}),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,2==++n&&(t.showLoader=!1),t.loadWordCloud()}),this.search.basicSearch(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"361").subscribe(function(e){e.Categories.forEach(function(e){e.Active=!1,t.searchCategories.push(e)}),t.sortArrayISODate(e.Documents).forEach(function(e){e.appName="ArquivoDespachoElect",t.searchDocuments.push(e)}),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,2==++n&&(t.showLoader=!1),t.loadWordCloud()})}else"AccoesPresidenciais"==this.type&&(this.showLoader=!0,this.search.basicSearch(this.searchSubject,this.searchDocumentDate,this.searchSender,this.searchOrganicEntiry,this.searchDocTypeId,"386").subscribe(function(e){console.log(e),e.Categories.forEach(function(t){t.Active=!1}),t.searchCategories=e.Categories,t.searchDocuments=t.sortArrayISODate(e.Documents),t.reorderList(t.ordinance),t.showDocuments=t.searchDocuments.length>=1,t.showLoader=!1,t.loadWordCloud()}))}},{key:"clearSearchInput",value:function(){this.searchSubject="",this.searchCategories=[],this.searchDocuments=[],this.showDocuments=!1,this.wordCloud()}},{key:"formateIsoDate",value:function(t){var e=new Date(t);return(0,r.p6)(e,"dd/MM/yyyy","pt")}},{key:"activeCategoty",value:function(t){this.searchCategories.forEach(function(e,n){t!=n&&(e.Active=!1)}),this.searchCategories[t].Active=!this.searchCategories[t].Active}},{key:"clearInputRemetente",value:function(){this.searchSender=""}},{key:"clearInputDocumentDate",value:function(){this.searchDocumentDate=""}},{key:"clearInputOrganicEntity",value:function(){this.searchOrganicEntiry=""}},{key:"showHideAdvanceSearch",value:function(t){this.showAdvanceSearch=t}},{key:"openAdvanceSearchSelection",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=window.innerWidth<=1024?"modal modal-desktop":"search-desktop-modal search-submodal",t.next=3,this.modalController.create({component:s.$,cssClass:e,componentProps:{}});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){o.searchSender=t.data});case 7:case"end":return t.stop()}},t,this)}))}},{key:"openOrganicEntitySelection",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=window.innerWidth<=1024?"modal modal-desktop":"search-desktop-modal search-submodal",t.next=3,this.modalController.create({component:c.k,cssClass:e,componentProps:{}});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss().then(function(t){o.searchOrganicEntiry=t.data});case 7:case"end":return t.stop()}},t,this)}))}},{key:"filterDocList",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.showSearchDocuments=this.showCategory==t?this.searchDocuments:this.searchDocuments.filter(function(e){return e.DocTypeDesc==t}),this.showCategory=t;case 1:case"end":return e.stop()}},e,this)}))}},{key:"itemIcons",value:function(){return this.type}},{key:"viewDocument",value:function(){this.loadedAttachments.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1")}},{key:"viewDetail",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.ApplicationType.toString(),o=t.Id,0!=this.select){e.next=12;break}if("Agenda"!=this.type){e.next=11;break}return e.next=5,this.modalCtrl.create({component:u.u,componentProps:{eventId:o,isModal:!0},cssClass:"modal modal-desktop"});case 5:return i=e.sent,e.next=8,i.present();case 8:i.onDidDismiss().then(function(t){}),e.next=12;break;case 11:"AccoesPresidenciais"==this.type?this.viewPublicationDetail(o):"AccoesPresidenciais & ArquivoDespachoElect"==this.type&&("8"!=n&&"361"!=n||this.viewDocumentDetail(o,n));case 12:case"end":return e.stop()}},e,this)}))}},{key:"viewPublicationDetail",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.modalController.create({component:p.e,componentProps:{publicationId:t,isModal:!0},cssClass:"publication-detail modal modal-desktop "});case 2:return n=e.sent,e.next=5,n.present();case 5:n.onDidDismiss().then(function(){});case 6:case"end":return e.stop()}},e,this)}))}},{key:"viewDocumentDetail",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",n.next=3,this.modalController.create({component:g.j,componentProps:{docId:t,applicationId:e},cssClass:o});case 3:return i=n.sent,n.next=6,i.present();case 6:i.onDidDismiss().then(function(t){});case 7:case"end":return n.stop()}},n,this)}))}},{key:"openExpedientActionsModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={serialNumber:t.SourceId,taskStartDate:t.CreateDate,isEvent:!0,workflowInstanceDataFields:{FsId:t.ApplicationId,FolderID:null,DocId:t.SourceId,Subject:t.SourceName}},e.next=3,this.modalController.create({component:h.M,cssClass:"model aside-modal search-submodal",componentProps:{fulltask:n,task:n}});case 3:return o=e.sent,e.next=6,o.present();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}},e,this)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(m.Y36(f.IN),m.Y36(b),m.Y36(f.IN),m.Y36(f.X1))},e.\u0275cmp=m.Xpm({type:e,selectors:[["app-search"]],decls:24,vars:11,consts:[[1,"ion-no-border","header-main","d-md-flex","flex-md-row-reverse"],["type","indeterminate","class","loader",4,"ngIf"],[1,"top-box","d-flex","ion-justify-content-between"],[1,"d-flex","search-input-container","ion-justify-content-between"],[1,"icon"],[1,"btn-no-color",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",3,"ngModel","keyup.enter","ngModelChange"],[1,"d-flex","align-center","icon",3,"click"],["name","restaurant-outline","src","assets/images/icons-search-close.svg",1,"font-25"],["class","icon-z icon-most-searched-word-open",3,"click",4,"ngIf"],["class","icon-z icon-most-searched-word-open align-md-baseline pl-10",3,"click",4,"ngIf"],[1,"profile"],["src","assets/images/icons-profile.svg",1,"icon"],["class","btn-modal-dismiss",4,"ngIf"],["class","advance-search pa-0 pt-10 flex-md-grow-1",4,"ngIf"],["class","options flex-md-grow-1 ","style","border-bottom: 1px solid #f3f3f3;width: unset",4,"ngIf"],[1,"main-content"],[1,"height-100"],[1,"d-flex","seach-wrapper","height-100","flex-row","justify-space-between"],["class","d-flex height-100 overflow-y-auto flex-1","style","border-right: 1px solid #ddd7d7;",4,"ngIf"],["class"," height-100 overflow-y-auto flex-1",4,"ngIf"],["type","indeterminate",1,"loader"],[1,"icon-z","icon-most-searched-word-open",3,"click"],["src","assets/images/icons-most-searched-words-open.svg","slot","end",1,"icon"],[1,"icon-z","icon-most-searched-word-open","align-md-baseline","pl-10",3,"click"],["src","assets/images/advance-search-show-modal.svg","slot","end",1,"icon"],[1,"btn-modal-dismiss"],["src","assets/images/icons-search-close.svg",1,"icon"],[1,"advance-search","pa-0","pt-10","flex-md-grow-1"],[1,"d-flex","date-container","ion-justify-content-between"],[1,"icon-mer","icon"],["name","restaurant-outline","src","assets/images/icons-advance-search-document.svg"],[1,"input-container","d-flex","ion-align-items-center"],["placeholder","Data","display-timezone","utc",3,"ngModel","ngModelChange"],[1,"icon",3,"click"],["name","restaurant-outline","src","assets/images/icons-search-close.svg"],["name","restaurant-outline","src","assets/images/icons-advance-search-sender.svg"],["type","search","placeholder","Remetentes",1,"search-input",3,"ngModel","ngModelChange","click"],["name","restaurant-outline","src","assets/images/icons-arrow-arrow-down-25-copy.svg"],["type","search","placeholder","Entidade Org\xe2nica",1,"search-input",3,"ngModel","ngModelChange","click"],[1,"options","flex-md-grow-1",2,"border-bottom","1px solid #f3f3f3","width","unset"],[1,"container"],[1,"d-flex","overflow-x-auto"],["class","d-flex py-10","style","width:0px","class","button",3,"ngClass","click",4,"ngFor","ngForOf"],["ion-button","","icon-only","",1,"icon-z","icon-most-searched-word-open"],[1,"button",2,"width","0px",3,"ngClass","click"],[1,"label"],[1,"d-flex","height-100","overflow-y-auto","flex-1",2,"border-right","1px solid #ddd7d7"],[1,"most-searched-words","d-md-flex","flex-md-column"],[1,"title","ion-text-center"],[1,"most-searched-word-container","height-100","overflow-y-auto"],[1,"height-100","overflow-y-auto","flex-1"],[1,"search-result"],[1,"header"],[1,"d-flex","ion-justify-content-between","ion-align-items-center"],[1,"d-flex","sort-by","ion-justify-content-center"],[1,"order"],["class","order-labal",4,"ngIf"],[3,"click",4,"ngIf"],["class","d-flex cursor-pointer",3,"click",4,"ngFor","ngForOf"],[1,"order-labal"],[3,"click"],["src","assets/images/icons-arrow-arrow-up.svg"],["src","assets/images/icons-arrow-arrow-down-25.svg"],[1,"d-flex","cursor-pointer",3,"click"],["src","assets/images/icons-search-document.svg",4,"ngIf"],["src","assets/images/icons-default-agenda.svg",4,"ngIf"],["src","assets/images/icons-viagem.svg",4,"ngIf"],[1,"content","ion-align-items-center"],[1,"d-flex","ion-justify-content-between"],[1,"result-name"],["class","app-name",4,"ngIf"],[1,"organic-entity"],[1,"documente-date"],["src","assets/images/icons-search-document.svg"],["src","assets/images/icons-default-agenda.svg"],["src","assets/images/icons-viagem.svg"],[1,"app-name"]],template:function(t,e){1&t&&(m.TgZ(0,"ion-header",0),m.YNc(1,M,1,0,"ion-progress-bar",1),m.TgZ(2,"div",2),m.TgZ(3,"ion-form"),m.TgZ(4,"div",3),m.TgZ(5,"div",4),m.TgZ(6,"button",5),m.NdJ("click",function(){return e.basicSearch()}),m._UZ(7,"ion-icon",6),m.qZA(),m.qZA(),m.TgZ(8,"div",7),m.TgZ(9,"ion-input",8),m.NdJ("keyup.enter",function(){return e.basicSearch()})("ngModelChange",function(t){return e.searchSubject=t}),m.qZA(),m.qZA(),m.TgZ(10,"div",9),m.NdJ("click",function(){return e.clearSearchInput()}),m._UZ(11,"ion-icon",10),m.qZA(),m.qZA(),m.qZA(),m.YNc(12,w,2,0,"div",11),m.YNc(13,k,2,0,"div",12),m.TgZ(14,"div",13),m._UZ(15,"ion-icon",14),m.qZA(),m.YNc(16,P,3,0,"div",15),m.qZA(),m.YNc(17,A,22,3,"div",16),m.YNc(18,O,6,1,"div",17),m.qZA(),m.TgZ(19,"ion-content",18),m.TgZ(20,"div",19),m.TgZ(21,"div",20),m.YNc(22,q,5,0,"div",21),m.YNc(23,R,16,5,"div",22),m.qZA(),m.qZA(),m.qZA()),2&t&&(m.xp6(1),m.Q6J("ngIf",e.showLoader),m.xp6(2),m.ekj("d-none",!e.showSearchInput),m.xp6(6),m.Q6J("ngModel",e.searchSubject),m.xp6(3),m.Q6J("ngIf",!e.showAdvanceSearch),m.xp6(1),m.Q6J("ngIf",e.showAdvanceSearch),m.xp6(3),m.Q6J("ngIf",e.showSearchInput),m.xp6(1),m.Q6J("ngIf",e.showAdvanceSearch),m.xp6(1),m.Q6J("ngIf",e.showDocuments),m.xp6(4),m.Q6J("ngIf",!e.showDocuments||e.windowWidth>=1024),m.xp6(1),m.Q6J("ngIf",e.showDocuments))},directives:[f.Gu,r.O5,f.gu,f.pK,f.j9,C.JJ,C.On,f.W2,f.X7,f.x4,f.QI,r.sg,r.mk,f.Q$],styles:[".top-box[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;justify-content:center}.header-main[_ngcontent-%COMP%]{padding:25px 18px 2px}.header-main[_ngcontent-%COMP%] ion-form[_ngcontent-%COMP%]{width:100%;padding-right:10px}.header-main[_ngcontent-%COMP%] .btn-modal-dismiss[_ngcontent-%COMP%]{display:flex;width:50px!important;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0!important;margin:5px 0 0 25px!important;align-content:center;align-items:center}.header-main[_ngcontent-%COMP%] .btn-modal-dismiss[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:32pt!important}.header-main[_ngcontent-%COMP%] .ion-align-content-center[_ngcontent-%COMP%]{align-content:center}.header-main[_ngcontent-%COMP%] .search-input-container[_ngcontent-%COMP%]{background-color:#fff;border-radius:27.5px;border:1px solid #ebebeb}.header-main[_ngcontent-%COMP%] .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}.header-main[_ngcontent-%COMP%] .search-input-container[_ngcontent-%COMP%] .input-text[_ngcontent-%COMP%]{width:100%}.header-main[_ngcontent-%COMP%] .search-input-container[_ngcontent-%COMP%] .icon-z[_ngcontent-%COMP%]{width:20px}.header-main[_ngcontent-%COMP%] .icon-z[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:45px}.header-main[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{display:none;font-size:45px}ion-slide[_ngcontent-%COMP%]{padding-top:5px}.options[_ngcontent-%COMP%]{margin-top:10px}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{width:100%}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{min-width:116px;border:1px solid #e9e9e9;margin:0 5px 10px;padding:5px 20px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border-radius:15px}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0;margin:0;font-family:Roboto;color:#0d89d1;font-size:15px;text-align:center}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100%;font-family:Roboto;font-size:13px;font-weight:300;color:#797979;text-align:center}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .active-category[_ngcontent-%COMP%]{background-color:#42b9fe;color:#fff}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .active-category[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%] .active-category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:none;width:45px;height:45px;justify-content:center;align-items:center}.options[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:25px}.d-flex[_ngcontent-%COMP%]{display:flex}.search-result[_ngcontent-%COMP%]{width:100%;border-bottom:unset;padding:0 20px}.search-result[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .sort-by[_ngcontent-%COMP%]{width:100%}.search-result[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .sort-by[_ngcontent-%COMP%] .order[_ngcontent-%COMP%]{font-family:Roboto;font-size:13px;font-weight:300;color:#797979}.search-result[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .sort-by[_ngcontent-%COMP%] .order-labal[_ngcontent-%COMP%]{font-family:Roboto;font-size:15px;color:#0d89d1;margin-left:20px}.search-result[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:25px}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0;margin:0}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px;border-top:1px solid #ebebeb;display:flex;align-items:center}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:35px;align-items:center;display:flex}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;margin-left:10px}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .result-name[_ngcontent-%COMP%]{margin:0;width:100%;font-family:Roboto;font-size:15px;color:#0d89d1;line-height:1.67}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-family:Roboto;font-size:13px;font-weight:300;color:#797979}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .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}.search-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] span.organic-entity[_ngcontent-%COMP%]{width:100%}.most-searched-words[_ngcontent-%COMP%]{width:100%!important}.most-searched-words[_ngcontent-%COMP%] p.title[_ngcontent-%COMP%]{width:100%;height:24px;font-family:Roboto;font-size:20px;text-align:center;color:#000}.most-searched-words[_ngcontent-%COMP%] .most-searched-word-container[_ngcontent-%COMP%]{height:400px}@media only screen and (min-width: 1024px){.advance-search[_ngcontent-%COMP%]{max-width:47%}}.advance-search[_ngcontent-%COMP%]{padding:14px 20px 20px}.advance-search[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{color:#797979;width:45px;height:45px;display:flex;justify-content:center;font-size:25px;align-items:center}.advance-search[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{margin-bottom:15px;width:100%;border-radius:5px;border:1px solid #ebebeb}.advance-search[_ngcontent-%COMP%] .date-container[_ngcontent-%COMP%] .icon-mer[_ngcontent-%COMP%]{margin-right:10px}.advance-search[_ngcontent-%COMP%] ion-datetime[_ngcontent-%COMP%]{width:100%}.loader[_ngcontent-%COMP%]{position:absolute;margin-top:-14px;width:calc(100% - 39px)}.swiper-container[_ngcontent-%COMP%]{width:100%}"]}),e}()},35161:function(e,o,i){"use strict";i.d(o,{$:function(){return u}});var a=i(37716),r=i(35957),s=i(30407),c=i(3679),d=i(38583);function l(t,e){if(1&t){var n=a.EpF();a.TgZ(0,"li",8),a.NdJ("click",function(){var t=a.CHM(n).$implicit;return a.oxw().selectUser(t.Name)}),a._uU(1),a.qZA()}if(2&t){var o=e.$implicit;a.xp6(1),a.hij(" ",o.Name," ")}}var u=function(){var e=function(){function e(n,o){t(this,e),this.modalController=n,this.ContactsService=o}return n(e,[{key:"ngOnInit",value:function(){this.getSender()}},{key:"getSender",value:function(){var t=this;this.ContactsService.getContacts("").subscribe(function(e){t.contacts=e,t.showContacts=e})}},{key:"filterContact",value:function(t){var e=this.sender.toLowerCase(),n=this.contacts.filter(function(t){if(0==t.Name.toLowerCase().indexOf(e))return!0});this.showContacts=n}},{key:"selectUser",value:function(t){console.log(t),this.selectedUser=t,this.close(this.selectedUser)}},{key:"close",value:function(t){this.modalController.dismiss(t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(r.IN),a.Y36(s.P))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-sender"]],decls:13,vars:2,consts:[[1,"main-header","d-flex"],[1,"d-flex","align-center"],[1,"icon",3,"click"],["src","assets/images/icons-arrow-arrow-left.svg",2,"font-size","35px"],[1,"main-container"],[1,"input-text","d-flex","ion-align-items-center"],["type","search","placeholder","Pesquisar",1,"search-input",3,"ngModel","ngModelChange"],[3,"click",4,"ngFor","ngForOf"],[3,"click"]],template:function(t,e){1&t&&(a.TgZ(0,"ion-toolbar",0),a.TgZ(1,"div",1),a.TgZ(2,"div",2),a.NdJ("click",function(){return e.close()}),a._UZ(3,"ion-icon",3),a.qZA(),a.TgZ(4,"div"),a.TgZ(5,"ion-title"),a._uU(6,"Remetentes"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.TgZ(7,"ion-content"),a.TgZ(8,"div",4),a.TgZ(9,"div",5),a.TgZ(10,"ion-input",6),a.NdJ("ngModelChange",function(t){return e.sender=t})("ngModelChange",function(t){return e.filterContact(t)}),a.qZA(),a.qZA(),a.TgZ(11,"ul"),a.YNc(12,l,2,1,"li",7),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.xp6(10),a.Q6J("ngModel",e.sender),a.xp6(2),a.Q6J("ngForOf",e.showContacts))},directives:[r.sr,r.gu,r.wd,r.W2,r.pK,r.j9,c.JJ,c.On,d.sg],styles:[".icon[_ngcontent-%COMP%], .main-header[_ngcontent-%COMP%]{display:flex;align-items:center}.icon[_ngcontent-%COMP%]{color:#797979;width:45px;height:45px;justify-content:center;font-size:25px}.main-container[_ngcontent-%COMP%]{padding:0 20px}.main-container[_ngcontent-%COMP%] .input-text[_ngcontent-%COMP%]{margin-top:20px;width:100%;height:45px;border-radius:5px;border:1px solid #ebebeb}.main-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:10px 0 0}.main-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-top:10px;margin:0;padding-bottom:10px;border-bottom:1px solid #ebebeb;list-style:none;font-family:Roboto;font-size:15px}"]}),e}()},84393:function(e,o,i){"use strict";i.d(o,{G:function(){return r}});var a=i(37716),r=function(){var e=function(){function e(){t(this,e)}return n(e,[{key:"transform",value:function(t){return null}},{key:"transformToAttachment",value:function(t){var e=[];return 361==t.ApplicationType?e.push({ApplicationId:361,Source:1,SourceId:t.docID||t.docId||t.DocId||t.Id,SourceName:t.Assunto,SourceType:"FOLDER"}):8==t.ApplicationType&&e.push({ApplicationId:8,Source:1,SourceId:t.docID||t.docId||t.DocId||t.Id,SourceName:t.Assunto,SourceType:"WEBTRIX"}),e}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=a.Yjl({name:"searchDocument",type:e,pure:!0}),e}()},61957:function(e,o,i){"use strict";i.d(o,{T:function(){return c}});var a=i(64762),r=i(37716),s=i(35957),c=function(){var e=function(){function e(n){t(this,e),this.photos=[],this.PHOTO_STORAGE="photos",this.platform=n}return n(e,[{key:"takePicture",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.LFG(s.t4))},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},86704:function(e,o,i){"use strict";i.d(o,{H:function(){return l}});var a=i(91841),r=i(92340),s=i(40205),c=i(37716),d=i(37556),l=function(){var e=function(){function e(n,o){t(this,e),this.http=n,this.authheader={},this.loggeduser=o.ValidatedUser,this.headers=new a.WM,this.headers=this.headers.set("Authorization",this.loggeduser.BasicAuthKey)}return n(e,[{key:"GetPublicationFolderList",value:function(){return this.http.get(r.N.apiURL+"presidentialActions",{headers:this.headers})}},{key:"GetPresidentialAction",value:function(t){return this.http.get(r.N.apiURL+"presidentialActions/"+t,{headers:this.headers})}},{key:"UpdatePresidentialAction",value:function(t){return this.http.put(r.N.apiURL+"presidentialActions",t,{headers:this.headers})}},{key:"CreatePublicationFolder",value:function(t){return this.http.post(r.N.apiURL+"presidentialActions",t,{headers:this.headers})}},{key:"UpdatePublicationFolder",value:function(t){return this.http.put(r.N.apiURL+"presidentialActions",t,{headers:this.headers}).toPromise().then(function(t){console.log(t)})}},{key:"DeletePresidentialAction",value:function(t){return this.http.delete(r.N.apiURL+"presidentialActions/"+t,{headers:this.headers})}},{key:"GetPublications",value:function(t){var e=r.N.apiURL+"presidentialActions/"+t+"/posts",n=new a.LE;return n=n.set("folderId",t),this.http.get("".concat(e),{headers:this.headers,params:n})}},{key:"GetPublicationById",value:function(t){var e=r.N.apiURL+"presidentialActions/posts/"+t;return new a.LE,this.http.get("".concat(e),{headers:this.headers})}},{key:"CreatePublication",value:function(t,e){var n=r.N.apiURL+"presidentialActions/"+t+"/posts",o=new a.LE;return o=o.set("folderId",t),this.http.post("".concat(n),e,{headers:this.headers})}},{key:"UpdatePublication",value:function(t,e){var n=r.N.apiURL+"presidentialActions/"+t+"/posts",o=new a.LE;return o=o.set("folderId",t),this.http.put("".concat(n),e,{headers:this.headers})}},{key:"DeletePublication",value:function(t,e){var n=r.N.apiURL+"presidentialActions/"+t+"/posts/"+e,o=new a.LE;return o=(o=o.set("folderId",t)).set("id",e),this.http.delete("".concat(n),{headers:this.headers})}},{key:"handleError",value:function(t){return(0,s._)(t||"Server Error")}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(a.eN),c.LFG(d.e))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},23890:function(e,o,i){"use strict";i.d(o,{E:function(){return s}});var a=i(37716),r=i(35957),s=function(){var e=function(){function e(n){t(this,e),this.modalController=n}return n(e,[{key:"ngOnInit",value:function(){}},{key:"close",value:function(){this.modalController.dismiss()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(r.IN))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-btn-modal-dismiss"]],decls:3,vars:0,consts:[[1,"btn-modal-dismiss"],[1,"btn-no-color",3,"click"],["slot","end","src","assets/images/icons-arrow-arrow-left.svg"]],template:function(t,e){1&t&&(a.TgZ(0,"div",0),a.TgZ(1,"button",1),a.NdJ("click",function(){return e.close()}),a._UZ(2,"ion-icon",2),a.qZA(),a.qZA())},directives:[r.gu],styles:[".btn-modal-dismiss[_ngcontent-%COMP%]{width:37px;float:left;font-size:35px;overflow:hidden}"]}),e}()},1491:function(e,o,i){"use strict";i.d(o,{M:function(){return s}});var a=i(37716),r=i(35957),s=function(){var e=function(){function e(){t(this,e)}return n(e,[{key:"ngOnInit",value:function(){}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-empty-container"]],inputs:{texto:"texto"},decls:4,vars:1,consts:[[1,"center","height-100"]],template:function(t,e){1&t&&(a.TgZ(0,"ion-content"),a.TgZ(1,"div",0),a.TgZ(2,"p"),a._uU(3),a.qZA(),a.qZA(),a.qZA()),2&t&&(a.xp6(3),a.Oqu(e.texto))},directives:[r.W2],styles:[".center[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]}),e}()},23066:function(e,o,i){"use strict";i.d(o,{M:function(){return A}});var a=i(64762),r=i(320),s=i(45896),c=i(83189),d=i(32379),l=i(4528),u=i(84393),p=i(37716),g=i(35957),h=i(28621),m=i(84465),f=i(39895),v=i(96529),x=i(20985),Z=i(38583);function b(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).attachDocument()}),p._uU(1,"Anexar Documentos"),p.qZA()}}function C(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"button",15),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).sendExpedienteToPending()}),p._uU(1,"Enviar para pendentes"),p.qZA()}}var M=function(){return["PR"]};function w(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"div",8),p.TgZ(1,"div",9),p.TgZ(2,"button",10),p._uU(3," Enviar para o PR "),p.qZA(),p.TgZ(4,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().openAddNoteModal("Aprovar")}),p._uU(5,"Avalia\xe7\xe3o Superior"),p.qZA(),p.TgZ(6,"button",10),p._uU(7," Solicitar revis\xe3o "),p.qZA(),p.TgZ(8,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().openAddNoteModal("Revis\xe3o")}),p._uU(9,"Mandar para Revis\xe3o"),p.qZA(),p.TgZ(10,"button",10),p._uU(11,"Outras op\xe7\xf5es "),p.qZA(),p.TgZ(12,"button",12),p.NdJ("click",function(){p.CHM(n);var t=p.oxw();return t.openExpedientActionsModal("0",t.fulltask)}),p._uU(13,"Efetuar Despacho"),p.qZA(),p.qZA(),p.TgZ(14,"div",9),p.TgZ(15,"button",11),p.NdJ("click",function(){p.CHM(n);var t=p.oxw();return t.openExpedientActionsModal("1",t.fulltask)}),p._uU(16,"Solicitar Parecer"),p.qZA(),p.TgZ(17,"button",11),p.NdJ("click",function(){p.CHM(n);var t=p.oxw();return t.openExpedientActionsModal("2",t.fulltask)}),p._uU(18,"Pedido de Deferimento"),p.qZA(),p.TgZ(19,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().openBookMeetingModal()}),p._uU(20,"Marcar Reuni\xe3o"),p.qZA(),p.YNc(21,b,2,0,"button",13),p.TgZ(22,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().distartExpedientModal("descartar")}),p._uU(23,"Descartar"),p.qZA(),p.YNc(24,C,2,0,"button",14),p.qZA(),p.qZA()}if(2&t){var o=p.oxw();p.xp6(21),p.Q6J("ngIf",!o.p.userRole(p.DdM(2,M))),p.xp6(3),p.Q6J("ngIf","Pending"!=o.task.Status)}}function k(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw(2).sendExpedienteToPending()}),p._uU(1,"Enviar para Pendentes"),p.qZA()}}function P(t,e){if(1&t){var n=p.EpF();p.TgZ(0,"div",8),p.TgZ(1,"div",9),p.TgZ(2,"button",12),p.NdJ("click",function(){p.CHM(n);var t=p.oxw();return t.openExpedientActionsModal("0",t.fulltask)}),p._uU(3,"Efetuar Despacho"),p.qZA(),p.TgZ(4,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().distartExpedientModal("descartar")}),p._uU(5,"Descartar"),p.qZA(),p._UZ(6,"div",6),p.TgZ(7,"button",11),p.NdJ("click",function(){p.CHM(n);var t=p.oxw();return t.openExpedientActionsModal("1",t.fulltask)}),p._uU(8,"Solicitar Parecer"),p.qZA(),p.TgZ(9,"button",11),p.NdJ("click",function(){return p.CHM(n),p.oxw().openBookMeetingModal()}),p._uU(10,"Marcar Reuni\xe3o"),p.qZA(),p.YNc(11,k,2,0,"button",13),p._UZ(12,"div",16),p.TgZ(13,"button",17),p._uU(14,"Delegar"),p.qZA(),p.qZA(),p.qZA()}if(2&t){var o=p.oxw();p.xp6(11),p.Q6J("ngIf","Pending"!=o.task.Status)}}var A=function(){var e=function(){function e(n,o,i,a,r,s,c,d,l){t(this,e),this.popoverController=n,this.modalController=o,this.navParams=i,this.processes=a,this.toastService=r,this.router=s,this.activatedRoute=c,this.p=d,this.attachmentsService=l,this.showEnviarPendentes=!1,this.searchDocumentPipe=new u.G,this.documents=[],this.task=this.navParams.get("task"),this.fulltask=this.navParams.get("fulltask"),"Pending"!=this.task.Status&&(this.showEnviarPendentes=!0)}return n(e,[{key:"ngOnInit",value:function(){var t=this;window.onresize=function(e){window.innerWidth>=800&&t.popoverController.dismiss()}}},{key:"close",value:function(){window,this.popoverController.dismiss()}},{key:"goBack",value:function(){"Pending"==this.task.Status&&"events"!=this.caller?window.innerWidth<=800?this.router.navigate(["/home/gabinete-digital/pendentes"]):this.router.navigate(["/home/gabinete-digital"],{queryParams:{pendentes:!0}}):window.history.back()}},{key:"attachDocument",value:function(){this.getDoc()}},{key:"getDoc",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.modalController.create({component:l.Z,cssClass:"modal-width-100-width-background modal",componentProps:{type:"AccoesPresidenciais & ArquivoDespachoElect",showSearchInput:!0,select:!0}});case 2:return e=t.sent,t.next=5,e.present();case 5:e.onDidDismiss().then(function(t){return(0,a.mG)(n,void 0,void 0,regeneratorRuntime.mark(function e(){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t&&(this.documents.push(t.data.selected),this.documents.forEach(function(t){var e={InstanceID:n.task.InstanceID,WorkflowDisplayName:n.task.WorkflowName,FolderID:n.task.FolderId,DispatchNumber:n.task.DispatchNumber,AttachmentsProcessLastInstanceID:n.task.AttachmentsProcessLastInstanceID,Attachments:[]},o=n.searchDocumentPipe.transformToAttachment(t);e.Attachments=o;var i=n.toastService.loading();n.attachmentsService.AddAttachment(e).subscribe(function(t){n.toastService.successMessage()},function(){n.toastService.badRequest()},function(){i.remove()})}),this.popoverController.dismiss());case 1:case"end":return e.stop()}},e,this)}))});case 6:case"end":return t.stop()}},t,this)}))}},{key:"openAddNoteModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=window.innerWidth<801?"modal modal-desktop":"add-note-modal",e.next=3,this.modalController.create({component:r.C,componentProps:{showAttachmentBtn:!1},cssClass:n});case 3:return o=e.sent,e.next=6,o.present();case 6:o.onDidDismiss().then(function(e){return(0,a.mG)(i,void 0,void 0,regeneratorRuntime.mark(function n(){var o;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(e),!e.data){n.next=13;break}if(o={ProcessInstanceID:"",Attachments:e.data.documents.map(function(t){return{ApplicationId:t.ApplicationType,SourceId:t.Id}})},"Aprovar"!=t){n.next=7;break}return n.next=5,this.approve(e.data.note,o);case 5:n.next=11;break;case 7:if(n.t0="Revis\xe3o"==t,!n.t0){n.next=11;break}return n.next=11,this.sendToReview(e.data.note,o);case 11:this.popoverController.dismiss(),this.goBack();case 13:case"end":return n.stop()}},n,this)}))});case 7:case"end":return e.stop()}},e,this)}))}},{key:"sendToReview",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={serialNumber:this.task.serialnumber||this.task.SerialNumber,action:"Retificar",ActionTypeId:99999877,dataFields:{ReviewUserComment:t},AttachmentList:e},i=this.toastService.loading(),n.prev=2,n.next=5,this.processes.CompleteTask(o).toPromise();case 5:this.close(),this.toastService.successMessage(),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this.toastService.badRequest();case 12:return n.prev=12,i.remove(),n.finish(12);case 15:case"end":return n.stop()}},n,this,[[2,9,12,15]])}))}},{key:"sendExpedienteToPending",value:function(){var t=this;this.close(),this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(function(e){t.goBack()},function(){t.toastService.badRequest("Processo n\xe3o encontrado")})}},{key:"approve",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o={serialNumber:this.task.serialnumber||this.task.SerialNumber,action:"Aprovar",ActionTypeId:100000004,dataFields:{ReviewUserComment:t},AttachmentList:e},console.log(o),i=this.toastService.loading(),n.prev=3,n.next=6,this.processes.CompleteTask(o).toPromise();case 6:this.close(),this.toastService.successMessage("Processo aprovado"),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(3),this.toastService.badRequest("Processo n\xe3o aprovado");case 13:return n.prev=13,i.remove(),n.finish(13);case 16:case"end":return n.stop()}},n,this,[[3,10,13,16]])}))}},{key:"openBookMeetingModal",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.close(),e=window.innerWidth<=800?"book-meeting-modal modal modal-desktop":"modal modal-desktop showAsideOptions",t.next=3,this.modalController.create({component:c.k,componentProps:{task:this.task},cssClass:e,backdropDismiss:!1});case 3:return n=t.sent,t.next=6,n.present();case 6:n.onDidDismiss();case 7:case"end":return t.stop()}},t,this)}))}},{key:"openExpedientActionsModal",value:function(t,e){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i,r=this;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(t,e),this.close(),o=window.innerWidth<=800?"modal modal-desktop":"modal modal-desktop showAsideOptions",n.next=3,this.modalController.create({component:d.F,componentProps:{taskAction:t,task:e},cssClass:o});case 3:return i=n.sent,n.next=6,i.present();case 6:i.onDidDismiss().then(function(t){return(0,a.mG)(r,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(t.data),n=t.data,!t.data){e.next=20;break}return console.log("open discart"),o=this.toastService.loading(),e.prev=5,e.next=8,this.processes.CompleteTask(n).toPromise();case 8:this.toastService.successMessage("Processo descartado"),this.goBack(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),this.toastService.badRequest("Processo n\xe3o descartado");case 15:return e.prev=15,o.remove(),e.finish(15);case 18:e.next=21;break;case 20:console.log("Not open");case 21:case"end":return e.stop()}},e,this,[[5,12,15,18]])}))});case 7:case"end":return n.stop()}},n,this)}))}},{key:"distartExpedientModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.close(),e.next=3,this.modalController.create({component:s.Q,componentProps:{},cssClass:"discart-expedient-modal",backdropDismiss:!1});case 3:return n=e.sent,e.next=6,n.present();case 6:n.onDidDismiss().then(function(e){return(0,a.mG)(o,void 0,void 0,regeneratorRuntime.mark(function n(){var o,i,a,r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(console.log(e.data),"descartar"!=t){n.next=19;break}if("Yes"!=e.data){n.next=17;break}return o={serialNumber:this.task.SerialNumber,action:"Passivo",ActionTypeId:99999877,dataFields:{Note:""}},i=this.toastService.loading(),n.prev=4,n.next=7,this.processes.CompleteTask(o).toPromise();case 7:this.toastService.successMessage("Processo descartado"),this.goBack(),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(4),this.toastService.badRequest("Processo n\xe3o descartado");case 14:return n.prev=14,i.remove(),n.finish(14);case 17:n.next=53;break;case 19:if("Yes"!=e.data){n.next=37;break}return a=this.toastService.loading(),n.prev=21,n.next=24,this.processes.CompleteTask(t).toPromise();case 24:this.toastService.successMessage("Processo descartado"),this.goBack(),n.next=31;break;case 28:n.prev=28,n.t1=n.catch(21),this.toastService.badRequest("Processo n\xe3o descartado");case 31:return n.prev=31,a.remove(),n.finish(31);case 34:this.goBack(),n.next=53;break;case 37:if("No"!=e.data){n.next=53;break}return console.log("Update"),r=this.toastService.loading(),n.prev=40,n.next=43,this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();case 43:this.toastService.successMessage(),this.goBack(),n.next=50;break;case 47:n.prev=47,n.t2=n.catch(40),this.toastService.badRequest();case 50:return n.prev=50,r.remove(),n.finish(50);case 53:case"end":return n.stop()}},n,this,[[4,11,14,17],[21,28,31,34],[40,47,50,53]])}))});case 7:case"end":return e.stop()}},e,this)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(p.Y36(g.Dh),p.Y36(g.IN),p.Y36(g.X1),p.Y36(h.$),p.Y36(m.k),p.Y36(f.F0),p.Y36(f.gz),p.Y36(v.$),p.Y36(x.o))},e.\u0275cmp=p.Xpm({type:e,selectors:[["app-opts-expediente"]],decls:10,vars:4,consts:[[1,"container","width-100"],[1,"arrow-right",3,"click"],[1,"btn-no-color"],["slot","end","src","assets/images/icons-arrow-arrow-right.svg",1,"arrow-right-icon"],[1,"width-100"],["class","d-flex width-100",4,"ngIf"],[1,"solid"],["full","","shape","round",1,"btn-cancel",3,"click"],[1,"d-flex","width-100"],[1,"flex-grow-1"],["shape","round",1,"btn-cancel","desk"],["shape","round",1,"btn-cancel",3,"click"],["shape","round",1,"btn-ok",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["full","","class","btn-ok","shape","round",3,"click",4,"ngIf"],["full","","shape","round",1,"btn-ok",3,"click"],["hidden","",1,"solid"],["hidden","","shape","round",1,"btn-cancel"]],template:function(t,e){1&t&&(p.TgZ(0,"ion-content",0),p.TgZ(1,"div",1),p.NdJ("click",function(){return e.close()}),p.TgZ(2,"button",2),p._UZ(3,"ion-icon",3),p.qZA(),p.qZA(),p.TgZ(4,"div",4),p.YNc(5,w,25,3,"div",5),p.YNc(6,P,15,1,"div",5),p._UZ(7,"div",6),p.TgZ(8,"button",7),p.NdJ("click",function(){return e.close()}),p._uU(9,"Cancelar"),p.qZA(),p.qZA(),p.qZA()),2&t&&(p.xp6(5),p.Q6J("ngIf",e.task&&!e.p.userRole(p.DdM(2,M))),p.xp6(1),p.Q6J("ngIf",e.task&&e.p.userRole(p.DdM(3,M))))},directives:[g.W2,g.gu,Z.O5],styles:[".container[_ngcontent-%COMP%]{--padding-top:20px!important;--padding-bottom:20px!important;--padding-start:20px!important;--padding-end:20px!important;width:100%}.arrow-right[_ngcontent-%COMP%]{display:none;margin-bottom:20px}.arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-around}.solid[_ngcontent-%COMP%]{display:none;width:90%;border-top:1px solid #bbb;margin:0 auto!important}.btn-cancel[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-bottom:5px!important;margin-top:5px!important}@media only screen and (max-width: 800px){.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!important}}@media only screen and (min-width: 1024px){.arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.btn-cancel[_ngcontent-%COMP%]{display:none}.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!important;margin-bottom:10px!important}.btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-top:10px!important}}.desk[_ngcontent-%COMP%]{text-align:left;background-color:#fff}"]}),e}()},18057:function(e,o,i){"use strict";i.d(o,{S:function(){return h}});var a=i(64762),r=i(37716),s=i(35957),c=i(96529),d=i(38583);function l(t,e){if(1&t){var n=r.EpF();r.TgZ(0,"button",6),r.NdJ("click",function(){return r.CHM(n),r.oxw().openExpedientActionsModal("0")}),r._uU(1,"Efetuar Despacho"),r.qZA()}}function u(t,e){if(1&t){var n=r.EpF();r.TgZ(0,"button",6),r.NdJ("click",function(){return r.CHM(n),r.oxw().openExpedientActionsModal("0")}),r._uU(1,"Efetuar Despacho"),r.qZA()}}function p(t,e){if(1&t){var n=r.EpF();r.TgZ(0,"button",4),r.NdJ("click",function(){return r.CHM(n),r.oxw().openExpedientActionsModal("2")}),r._uU(1,"Pedido de Deferimento"),r.qZA()}}var g=function(){return["PR"]},h=function(){var e=function(){function e(n,o,i,a){t(this,e),this.popoverController=n,this.modalController=o,this.navParams=i,this.p=a}return n(e,[{key:"ngOnInit",value:function(){this.task=this.navParams.get("task"),this.LoadedDocument=this.navParams.get("LoadedDocument")}},{key:"close",value:function(){this.popoverController.dismiss()}},{key:"goBack",value:function(){this.popoverController.dismiss()}},{key:"openBookMeetingModal",value:function(){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.popoverController.dismiss({component:"openBookMeetingModal",taskAction:""});case 1:case"end":return t.stop()}},t,this)}))}},{key:"openExpedientActionsModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.popoverController.dismiss({component:"openExpedientActionsModal",taskAction:t});case 1:case"end":return e.stop()}},e,this)}))}},{key:"distartExpedientModal",value:function(t){return(0,a.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t)}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Y36(s.Dh),r.Y36(s.IN),r.Y36(s.X1),r.Y36(c.$))},e.\u0275cmp=r.Xpm({type:e,selectors:[["app-searched-document-options"]],decls:10,vars:6,consts:[[1,"container","width-100"],[1,"buttons"],["class","btn-ok","shape","round",3,"click",4,"ngIf"],[1,"solid"],["shape","round",1,"btn-cancel",3,"click"],["class","btn-cancel","shape","round",3,"click",4,"ngIf"],["shape","round",1,"btn-ok",3,"click"]],template:function(t,e){1&t&&(r.TgZ(0,"ion-content",0),r.TgZ(1,"div",1),r.YNc(2,l,2,0,"button",2),r.YNc(3,u,2,0,"button",2),r._UZ(4,"div",3),r.TgZ(5,"button",4),r.NdJ("click",function(){return e.openExpedientActionsModal("0")}),r._uU(6,"Solicitar Parecer"),r.qZA(),r.YNc(7,p,2,0,"button",5),r.TgZ(8,"button",4),r.NdJ("click",function(){return e.openBookMeetingModal()}),r._uU(9,"Marcar Reuni\xe3o"),r.qZA(),r.qZA(),r.qZA()),2&t&&(r.xp6(2),r.Q6J("ngIf",e.p.userRole(r.DdM(3,g))),r.xp6(1),r.Q6J("ngIf",!e.p.userRole(r.DdM(4,g))),r.xp6(4),r.Q6J("ngIf",!e.p.userRole(r.DdM(5,g))))},directives:[s.W2,d.O5],styles:[".container[_ngcontent-%COMP%]{--padding-top:20px!important;--padding-bottom:20px!important;--padding-start:20px!important;--padding-end:20px!important;width:100%}.arrow-right[_ngcontent-%COMP%]{display:none;margin-bottom:20px}.arrow-right[_ngcontent-%COMP%] .arrow-right-icon[_ngcontent-%COMP%]{width:37px;float:right;font-size:35px;overflow:hidden}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:space-around}.solid[_ngcontent-%COMP%]{display:none;width:90%;border-top:1px solid #bbb;margin:0 auto!important}.btn-cancel[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-bottom:5px!important;margin-top:5px!important}@media only screen and (max-width: 800px){.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!important}}@media only screen and (min-width: 1024px){.arrow-right[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.btn-cancel[_ngcontent-%COMP%]{display:none}.btn-cancel[_ngcontent-%COMP%], .btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{width:100%!important;margin-bottom:10px!important}.btn-delete[_ngcontent-%COMP%], .btn-ok[_ngcontent-%COMP%]{margin-top:10px!important}}.desk[_ngcontent-%COMP%]{text-align:left;background-color:#fff}"]}),e}()},86807:function(e){var o=["Janeiro","Fevereiro","Mar\xe7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],i=new Array("Domingo","Segunda","Ter\xe7a","Quarta","Quinta","Sexta","S\xe1bado"),a=new Array("Do","Seg","Ter\xe7","Qua","Qui","Sex","S\xe1b");e.exports={momentG:function(){function e(){t(this,e)}return n(e,null,[{key:"run",value:function(t,e,n){if("function"!=typeof t.getMonth&&!(t=new Date(t))instanceof Date)throw new UserException("Invalid date formate momentG");var r={},s={d:t.getDate().toString(),M:t.getMonth().toString(),ss:t.getSeconds().toString().padStart(2,"0"),mm:t.getMinutes().toString().padStart(2,"0"),dd:t.getDate().toString().padStart(2,"0"),MM:(t.getMonth()+1).toString().padStart(2,"0"),HH:t.getHours().toString().padStart(2,"0"),yy:t.getFullYear().toString().slice(2,4).padStart(2,"0"),EEEE:i[t.getDay()].padStart(2,"0"),EEEEV:a[t.getDay()].padStart(2,"0"),MMMM:o[t.getMonth()],yyyy:t.getFullYear()};for(var c in Object.keys(s).reverse().forEach(function(t,n){r[n]=s[t];var o=new RegExp(t,"g");e=e.replace(o,"___".concat(n,"___"))}),r){var d=new RegExp("___".concat(c,"___"),"g");e=e.replace(d,r[c])}return e}}]),e}().run,formatDate:function(t,e){e||(e="M/d/yyyy");var n=t.getDate(),o=t.getMonth(),i=t.getFullYear(),a=t.getHours(),d=t.getMinutes(),l=t.getSeconds(),u=t.getMilliseconds(),p=a%12,g=c(p),h=c(a),m=c(d),f=c(l),v=a<12?"AM":"PM",x=s[t.getDay()],Z=x.substr(0,3),b=c(n),C=o+1,M=c(C),w=r[o],k=w.substr(0,3),P=i+"",A=P.substr(2,2);return(e=e.replace("hh",g).replace("h",p).replace("HH",h).replace("H",a).replace("mm",m).replace("m",d).replace("ss",f).replace("s",l).replace("S",u).replace("dd",b).replace("d",n).replace("EEEE",x).replace("EEE",Z).replace("yyyy",P).replace("yy",A).replace("aaa",v)).indexOf("MMM")>-1?e.replace("MMMM",w).replace("MMM",k):e.replace("MM",M).replace("M",C)}};var r=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function c(t){return t<10?"0"+t:t}},27538:function(t,e){"use strict";var n,o,i,a,r;window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";return window.addEventListener("message",function(n){if("string"==typeof n.data&&n.data.substr(0,e.length)===e){n.stopImmediatePropagation();var o=parseInt(n.data.substr(e.length),36);t[o]&&(t[o](),t[o]=void 0)}},!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(n){var o=t.length;return t.push(n),window.postMessage(e+o.toString(36),"*"),o}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}),o=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!(e&&e.getImageData&&e.fillText&&Array.prototype.some&&Array.prototype.push)}(),i=function(){if(o){for(var t,e,n=document.createElement("canvas").getContext("2d"),i=20;i;){if(n.font=i.toString(10)+"px sans-serif",n.measureText("\uff37").width===t&&n.measureText("m").width===e)return i+1;t=n.measureText("\uff37").width,e=n.measureText("m").width,i--}return 0}}(),a=function(t){for(var e,n,o=t.length;o;)e=Math.floor(Math.random()*o),n=t[--o],t[o]=t[e],t[e]=n;return t},(r=function(t,e){if(o){Array.isArray(t)||(t=[t]),t.forEach(function(e,n){if("string"==typeof e){if(t[n]=document.getElementById(e),!t[n])throw new Error("The element id specified is not found.")}else if(!e.tagName&&!e.appendChild)throw new Error("You must pass valid HTML elements, or ID of the element.")});var n={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "\u5fae\u8edf\u6b63\u9ed1\u9ad4", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationSteps:0,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(e)for(var r in e)r in n&&(n[r]=e[r]);if("function"!=typeof n.weightFactor){var s=n.weightFactor;n.weightFactor=function(t){return t*s}}if("function"!=typeof n.shape)switch(n.shape){case"circle":default:n.shape="circle";break;case"cardioid":n.shape=function(t){return 1-Math.sin(t)};break;case"diamond":n.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"square":n.shape=function(t){return Math.min(1/Math.abs(Math.cos(t)),1/Math.abs(Math.sin(t)))};break;case"triangle-forward":n.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-upright":n.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":n.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":n.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}n.gridSize=Math.max(Math.floor(n.gridSize),4);var c,d,l,u,p,g,h,m,f=n.gridSize,v=f-n.maskGapWidth,x=Math.abs(n.maxRotation-n.minRotation),Z=Math.abs(Math.floor(n.rotationSteps)),b=Math.min(n.maxRotation,n.minRotation);switch(n.color){case"random-dark":h=function(){return S(10,50)};break;case"random-light":h=function(){return S(50,90)};break;default:"function"==typeof n.color&&(h=n.color)}"function"==typeof n.fontWeight&&(m=n.fontWeight);var C=null;"function"==typeof n.classes&&(C=n.classes);var M,w=!1,k=[],P=function(t){var e,n,o=t.currentTarget,i=o.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY);var a=n-i.top,r=Math.floor((e-i.left)*(o.width/i.width||1)/f),s=Math.floor(a*(o.height/i.height||1)/f);return k[r][s]},A=function(t){var e=P(t);M!==e&&(M=e,e?n.hover(e.item,e.dimension,t):n.hover(void 0,void 0,t))},T=function(t){var e=P(t);e&&(n.click(e.item,e.dimension,t),t.preventDefault())},_=[],O=function(t){if(_[t])return _[t];var e=8*t,o=e,i=[];for(0===t&&i.push([u[0],u[1],0]);o--;){var a=1;"circle"!==n.shape&&(a=n.shape(o/e*2*Math.PI)),i.push([u[0]+t*a*Math.cos(-o/e*2*Math.PI),u[1]+t*a*Math.sin(-o/e*2*Math.PI)*n.ellipticity,o/e*2*Math.PI])}return _[t]=i,i},q=function(){return n.abortThreshold>0&&(new Date).getTime()-g>n.abortThreshold},y=function(e,n,o,i,a){e>=d||n>=l||e<0||n<0||(c[e][n]=!1,o&&t[0].getContext("2d").fillRect(e*f,n*f,v,v),w&&(k[e][n]={item:a,dimension:i}))},D=function e(o){var r,s,u;Array.isArray(o)?(r=o[0],s=o[1]):(r=o.word,s=o.weight,u=o.attributes);var g=0===n.rotateRatio||Math.random()>n.rotateRatio?0:0===x?b:Z>0?b+Math.floor(Math.random()*Z)*x/(Z-1):b+Math.random()*x,v=function(t,e,o){var a=n.weightFactor(e);if(a<=n.minSize)return!1;var r,s=1;ay[1]&&(y[1]=O),Py[2]&&(y[2]=P);break t}}return{mu:s,occupied:_,bounds:y,gw:C,gh:b,fillTextOffsetX:x,fillTextOffsetY:Z,fillTextWidth:l,fillTextHeight:u,fontSize:a}}(r,s,g);if(!v)return!1;if(q())return!1;if(!n.drawOutOfBound&&!n.shrinkToFit){var M=v.bounds;if(M[1]-M[3]+1>d||M[2]-M[0]+1>l)return!1}for(var k=p+1,P=function(e){var i=Math.floor(e[0]-v.gw/2),a=Math.floor(e[1]-v.gh/2);return!!function(t,e,o,i,a){for(var r=a.length;r--;){var s=t+a[r][0],u=e+a[r][1];if(s>=d||u>=l||s<0||u<0){if(!n.drawOutOfBound)return!1}else if(!c[s][u])return!1}return!0}(i,a,0,0,v.occupied)&&(function(e,o,i,a,r,s,c,d,l){var u,p,g,v=i.fontSize;u=h?h(a,r,v,s,c):n.color,p=m?m(a,r,v):n.fontWeight,g=C?C(a,r,v):n.classes,t.forEach(function(t){if(t.getContext){var r=t.getContext("2d"),s=i.mu;r.save(),r.scale(1/s,1/s),r.font=p+" "+(v*s).toString(10)+"px "+n.fontFamily,r.fillStyle=u,r.translate((e+i.gw/2)*f*s,(o+i.gh/2)*f*s),0!==d&&r.rotate(-d),r.textBaseline="middle",r.fillText(a,i.fillTextOffsetX*s,(i.fillTextOffsetY+.5*v)*s),r.restore()}else{var c=document.createElement("span"),h="";h="rotate("+-d/Math.PI*180+"deg) ",1!==i.mu&&(h+="translateX(-"+i.fillTextWidth/4+"px) scale("+1/i.mu+")");var m={position:"absolute",display:"block",font:p+" "+v*i.mu+"px "+n.fontFamily,left:(e+i.gw/2)*f+i.fillTextOffsetX+"px",top:(o+i.gh/2)*f+i.fillTextOffsetY+"px",width:i.fillTextWidth+"px",height:i.fillTextHeight+"px",lineHeight:v+"px",whiteSpace:"nowrap",transform:h,webkitTransform:h,msTransform:h,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var x in u&&(m.color=u),c.textContent=a,m)c.style[x]=m[x];if(l)for(var Z in l)c.setAttribute(Z,l[Z]);g&&(c.className+=g),t.appendChild(c)}})}(i,a,v,r,s,p-k,e[2],g,u),function(e,o,i,a,r,s){var c,u,p=r.occupied,g=n.drawMask;if(g&&((c=t[0].getContext("2d")).save(),c.fillStyle=n.maskColor),w){var h=r.bounds;u={x:(e+h[3])*f,y:(o+h[0])*f,w:(h[1]-h[3]+1)*f,h:(h[2]-h[0]+1)*f}}for(var m=p.length;m--;){var v=e+p[m][0],x=o+p[m][1];v>=d||x>=l||v<0||x<0||y(v,x,g,u,s)}g&&c.restore()}(i,a,0,0,v,o),!0)};k--;){var A=O(p-k);if(n.shuffle&&(A=[].concat(A),a(A)),A.some(P))return!0}return!!n.shrinkToFit&&(Array.isArray(o)?o[1]=3*o[1]/4:o.weight=3*o.weight/4,e(o))},I=function(e,n,o){if(n)return!t.some(function(t){var n=new CustomEvent(e,{detail:o||{}});return!t.dispatchEvent(n)},this);t.forEach(function(t){var n=new CustomEvent(e,{detail:o||{}});t.dispatchEvent(n)},this)};!function(){var e=t[0];if(e.getContext)d=Math.ceil(e.width/f),l=Math.ceil(e.height/f);else{var o=e.getBoundingClientRect();d=Math.ceil(o.width/f),l=Math.ceil(o.height/f)}if(I("wordcloudstart",!0)){var i,a,r,s,h;if(u=n.origin?[n.origin[0]/f,n.origin[1]/f]:[d/2,l/2],p=Math.floor(Math.sqrt(d*d+l*l)),c=[],!e.getContext||n.clearCanvas)for(t.forEach(function(t){if(t.getContext){var e=t.getContext("2d");e.fillStyle=n.backgroundColor,e.clearRect(0,0,d*(f+1),l*(f+1)),e.fillRect(0,0,d*(f+1),l*(f+1))}else t.textContent="",t.style.backgroundColor=n.backgroundColor,t.style.position="relative"}),i=d;i--;)for(c[i]=[],a=l;a--;)c[i][a]=!0;else{var m=document.createElement("canvas").getContext("2d");m.fillStyle=n.backgroundColor,m.fillRect(0,0,1,1);var v,x,Z=m.getImageData(0,0,1,1).data,b=e.getContext("2d").getImageData(0,0,d*f,l*f).data;for(i=d;i--;)for(c[i]=[],a=l;a--;){x=f;t:for(;x--;)for(v=f;v--;)for(r=4;r--;)if(b[4*((a*f+x)*d*f+(i*f+v))+r]!==Z[r]){c[i][a]=!1;break t}!1!==c[i][a]&&(c[i][a]=!0)}b=m=Z=void 0}if(n.hover||n.click){for(w=!0,i=d+1;i--;)k[i]=[];n.hover&&e.addEventListener("mousemove",A),n.click&&(e.addEventListener("click",T),e.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),e.addEventListener("wordcloudstart",function t(){e.removeEventListener("wordcloudstart",t),e.removeEventListener("mousemove",A),e.removeEventListener("click",T),M=void 0})}r=0,0!==n.wait?(s=window.setTimeout,h=window.clearTimeout):(s=window.setImmediate,h=window.clearImmediate);var C=function(e,n){t.forEach(function(t){t.removeEventListener(e,n)},this)},P=function t(){C("wordcloudstart",t),h(_)};!function(e,n){t.forEach(function(t){t.addEventListener("wordcloudstart",n)},this)}(0,P);var _=s(function t(){if(r>=n.list.length)return h(_),I("wordcloudstop",!1),void C("wordcloudstart",P);g=(new Date).getTime();var e=D(n.list[r]),o=!I("wordclouddrawn",!0,{item:n.list[r],drawn:e});if(q()||o)return h(_),n.abort(),I("wordcloudabort",!1),I("wordcloudstop",!1),void C("wordcloudstart",P);r++,_=s(t,n.wait)},n.wait)}}()}function S(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}}).isSupported=o,r.minFontSize=i,this.WordCloud=r,void 0===(n=(function(){return r}).apply(e,[]))||(t.exports=n)}}])}();