PageSourceSearch

https://nivano.app/8120.bc125d9a59fd6457.js

js nivano.app collected 2026-10-02 01:16:00 UTC 48,875 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknivano_web=self.webpackChunknivano_web||[]).push([[8120],{68120:(at,R,r)=>{r.r(R),r.d(R,{BoiteMailModule:()=>st});var g=r(52168),w=r(2137),Y=r(24520),X=r(82143),b=r(32886),y=r(21413),V=r(983),U=r(1807),x=r(7673),h=r(25558),F=r(99437),E=r(56977),C=r(96354),z=r(77048),j=r(88141),J=r(23294),Q=r(5964),H=r(99172),T=r(34951),O=r(93800),u=function(i){return i.MARQUER_LU="MARQUER_LU",i.MARQUER_NON_LU="MARQUER_NON_LU",i.SUPPRIMER="SUPPRIMER",i.DEPLACER="DEPLACER",i.SIGNALER_SPAM="SIGNALER_SPAM",i.PAS_SPAM="PAS_SPAM",i}(u||{});function P(i){return i!==u.MARQUER_LU&&i!==u.MARQUER_NON_LU}var d=function(i){return i.BOITE_RECEPTION="BOITE_RECEPTION",i.ENVOYES="ENVOYES",i.BROUILLONS="BROUILLONS",i.CORBEILLE="CORBEILLE",i.SPAM="SPAM",i.AUTRE="AUTRE",i}(d||{});const M={[d.BOITE_RECEPTION]:"fa-inbox",[d.ENVOYES]:"fa-paper-plane",[d.BROUILLONS]:"fa-file-lines",[d.CORBEILLE]:"fa-trash",[d.SPAM]:"fa-shield-halved",[d.AUTRE]:"fa-folder"};var e=r(17705),A=r(2019),q=r(41173);const v="(Sans objet)";var S=r(47852),k=r(79988),I=r(10181),W=r(29139),m=r(60177),f=r(46879),K=r(17279),G=r(86600),D=r(97586);let Z=(()=>{class i{transform(t){if(!t)return"";const n=D(t).locale("fr");if(!n.isValid())return"";const s=D();if(n.isSame(s,"day"))return n.format("HH:mm");if(n.isAfter(s.clone().subtract(7,"days"))){const a=n.format("dddd");return`${a.charAt(0).toUpperCase()}${a.slice(1)} - ${n.format("HH:mm")}`}return n.isSame(s,"year")?n.format("DD/MM"):n.format("DD/MM/YYYY")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=e.EJ8({name:"dateMessageMail",type:i,pure:!0})}}return i})();function ee(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",11)(1,"mat-checkbox",12),e.bIt("change",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.toggleToutSelectionner())}),e.EFF(2,"Tout s\xe9lectionner"),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(1),e.Y8G("checked",t.toutSelectionne)}}function te(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",25),e.bIt("click",function(){const a=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.appliquerAction(c.ActionMessageEntrant.DEPLACER,a.id))}),e.nrm(1,"i",26),e.EFF(2),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.R7$(1),e.Y8G("ngClass",n.ICONES_PAR_TYPE[t.type]||"fa-folder"),e.R7$(1),e.SpI("",t.nomAffiche," ")}}function ne(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.appliquerAction(s.ActionMessageEntrant.SIGNALER_SPAM))}),e.nrm(1,"i",27),e.EFF(2,"Spam "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.actionEnCours)}}function ie(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.appliquerAction(s.ActionMessageEntrant.PAS_SPAM))}),e.nrm(1,"i",28),e.EFF(2,"Pas un spam "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.actionEnCours)}}function se(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",13)(1,"span",14)(2,"strong"),e.EFF(3),e.k0s(),e.EFF(4," message(s) s\xe9lectionn\xe9(s) "),e.k0s(),e.j41(5,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.appliquerAction(s.ActionMessageEntrant.MARQUER_LU))}),e.nrm(6,"i",16),e.EFF(7,"Lu "),e.k0s(),e.j41(8,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.appliquerAction(s.ActionMessageEntrant.MARQUER_NON_LU))}),e.nrm(9,"i",17),e.EFF(10,"Non lu "),e.k0s(),e.j41(11,"button",18),e.nrm(12,"i",19),e.EFF(13,"D\xe9placer "),e.k0s(),e.j41(14,"mat-menu",null,20),e.DNE(16,te,3,2,"button",21),e.k0s(),e.DNE(17,ne,3,1,"button",22),e.DNE(18,ie,3,1,"button",22),e.j41(19,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.supprimerSelection())}),e.nrm(20,"i",23),e.EFF(21,"Supprimer "),e.k0s(),e.j41(22,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.selectionIds.clear())}),e.nrm(23,"i",24),e.EFF(24,"Annuler "),e.k0s()()}if(2&i){const t=e.sdS(15),n=e.XpG();e.R7$(3),e.JRh(n.selectionIds.size),e.R7$(2),e.Y8G("disabled",n.actionEnCours),e.R7$(3),e.Y8G("disabled",n.actionEnCours),e.R7$(3),e.Y8G("disabled",n.actionEnCours||!n.dossiersCibles.length)("matMenuTriggerFor",t),e.R7$(5),e.Y8G("ngForOf",n.dossiersCibles)("ngForTrackBy",n.trackById),e.R7$(1),e.Y8G("ngIf",!n.estDossierSpam&&n.dossierSpamExiste),e.R7$(1),e.Y8G("ngIf",n.estDossierSpam),e.R7$(1),e.Y8G("disabled",n.actionEnCours),e.R7$(3),e.Y8G("disabled",n.actionEnCours)}}function ae(i,o){1&i&&(e.j41(0,"div",29),e.nrm(1,"i",30),e.j41(2,"span"),e.EFF(3,"Aucun message dans ce dossier."),e.k0s()())}function oe(i,o){if(1&i&&(e.j41(0,"span",47),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.SpI("<",t.expediteurAdresse,">")}}function re(i,o){1&i&&e.nrm(0,"i",48)}function ce(i,o){1&i&&e.nrm(0,"span",49)}function le(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",33),e.bIt("click",function(){const a=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.select(a))})("keydown.enter",function(){const a=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.select(a))}),e.j41(1,"mat-checkbox",34),e.bIt("change",function(){const a=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggleSelection(a))})("click",function(s){return s.stopPropagation()})("keydown.enter",function(s){return s.stopPropagation()}),e.k0s(),e.j41(2,"div",35)(3,"span",36),e.nrm(4,"i",37),e.k0s()(),e.j41(5,"div",38)(6,"div",39)(7,"span",40),e.EFF(8),e.DNE(9,oe,2,1,"span",41),e.k0s(),e.j41(10,"span",42),e.EFF(11),e.nI1(12,"dateMessageMail"),e.k0s()(),e.j41(13,"div",43)(14,"span",44),e.EFF(15),e.k0s(),e.DNE(16,re,1,0,"i",45),e.DNE(17,ce,1,0,"span",46),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.AVh("selected",t.id===n.selectedMessageId)("unread",!t.lu),e.R7$(1),e.Y8G("checked",n.selectionIds.has(t.id))("aria-label","S\xe9lectionner le message "+(t.sujet||n.LIBELLE_SANS_OBJET)),e.R7$(7),e.SpI(" ",t.expediteurNom||t.expediteurAdresse||t.expediteur," "),e.R7$(1),e.Y8G("ngIf",t.expediteurNom&&t.expediteurAdresse),e.R7$(2),e.JRh(e.bMT(12,12,t.dateEnvoi)),e.R7$(4),e.JRh(t.sujet||n.LIBELLE_SANS_OBJET),e.R7$(1),e.Y8G("ngIf",t.aPieceJointe),e.R7$(1),e.Y8G("ngIf",!t.lu)}}function de(i,o){if(1&i&&(e.qex(0),e.j41(1,"div",31),e.EFF(2),e.k0s(),e.DNE(3,le,18,14,"div",32),e.bVm()),2&i){const t=o.$implicit,n=e.XpG();e.R7$(2),e.JRh(t.label),e.R7$(1),e.Y8G("ngForOf",t.items)("ngForTrackBy",n.trackById)}}function pe(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",50),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.chargerPlus())}),e.nrm(1,"i",26),e.EFF(2," Charger plus de messages "),e.k0s()}if(2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngClass",t.loading?"fa-spinner fa-pulse":"fa-chevron-down")}}let N=(()=>
1{class i{static{this.TAILLE_PAGE=25}constructor(t,n,s){this.messageEntrantService=t,this.dialog=n,this.jarvysService=s,this.dossiers=[],this.dossierSelected=new e.bkB,this.messageSelected=new e.bkB,this.actionsEffectuees=new e.bkB,this.ActionMessageEntrant=u,this.ICONES_PAR_TYPE=M,this.LIBELLE_SANS_OBJET=v,this.messages=[],this.temporalGroups=[],this.filterTabs=[],this.loading=!1,this.chargementPlusDisponible=!1,this.selectionIds=new Set,this.actionEnCours=!1,this.dossiersCibles=[],this.estDossierSpam=!1,this.dossierSpamExiste=!1,this.chargement=null}ngOnChanges(t){t.dossiers&&this.buildFilterTabs(),(t.dossiers||t.dossierActif)&&this.calculerDossiers(),t.dossierActif&&this.dossierActif&&t.dossierActif.previousValue?.id!==this.dossierActif.id&&(this.selectionIds.clear(),this.recharger())}ngOnDestroy(){this.chargement?.unsubscribe()}get toutSelectionne(){return this.messages.length>0&&this.messages.every(t=>this.selectionIds.has(t.id))}recharger(){this.chargerMessages()}appliquerLocalement(t){if(!P(t.action))return void this.marquerLu(t.ids,t.action===u.MARQUER_LU);const n=new Set(t.ids);this.messages=this.messages.filter(s=>!n.has(s.id)),this.buildTemporalGroups()}marquerLu(t,n){const s=new Set(t);this.messages.filter(a=>s.has(a.id)).forEach(a=>a.lu=n)}toggleSelection(t){this.selectionIds.has(t.id)?this.selectionIds.delete(t.id):this.selectionIds.add(t.id)}toggleToutSelectionner(){this.toutSelectionne?this.selectionIds.clear():this.messages.forEach(t=>this.selectionIds.add(t.id))}supprimerSelection(){this.dialog.open(A.u,{panelClass:"nivano-dialog",data:{title:"Supprimer des emails",message:`Voulez-vous supprimer ${this.selectionIds.size} email(s) ? Ils seront d\xe9plac\xe9s vers la corbeille de votre messagerie.`}}).afterClosed().subscribe(t=>{!0===t&&this.appliquerAction(u.SUPPRIMER)})}appliquerAction(t,n){const s=[...this.selectionIds];this.actionEnCours=!0,this.messageEntrantService.appliquerAction(s,t,n).subscribe({next:()=>{this.actionEnCours=!1,this.selectionIds.clear(),this.appliquerLocalement({ids:s,action:t}),this.actionsEffectuees.emit({ids:s,action:t})},error:a=>{this.actionEnCours=!1,this.jarvysService.erreur(a)}})}setFilterTab(t){const n=this.dossiers.find(s=>String(s.id)===t);n&&this.dossierSelected.emit(n)}select(t){this.messageSelected.emit(t)}chargerPlus(){this.chargerMessages(!0)}trackByGroupe(t,n){return n.label}trackById(t,n){return n.id}openSearch(){this.dialog.open(q.j,{panelClass:"nv-search-modal-dialog",data:{placeholder:"Rechercher dans les messages charg\xe9s\u2026",emptyIcon:"fa-envelope",emptyTitle:"Aucun message trouv\xe9",searchFn:n=>(0,x.of)(this.rechercherLocalement(n))}}).afterClosed().subscribe(n=>{if(!n)return;const s=this.messages.find(a=>a.id===n.id);s&&this.select(s)})}calculerDossiers(){this.dossiersCibles=this.dossiers.filter(t=>t.id!==this.dossierActif?.id),this.estDossierSpam=this.dossierActif?.type===d.SPAM,this.dossierSpamExiste=this.dossiers.some(t=>t.type===d.SPAM)}rechercherLocalement(t){const n=t.toLowerCase();return this.messages.filter(s=>s.sujet?.toLowerCase().includes(n)||s.expediteur?.toLowerCase().includes(n)).map(s=>({id:s.id,title:s.sujet||v,subtitle:s.expediteurNom||s.expediteurAdresse||s.expediteur,meta:s.dateEnvoi?new Date(s.dateEnvoi).toLocaleDateString("fr-FR"):"",iconClass:"fa-envelope",data:s}))}buildFilterTabs(){this.filterTabs=this.dossiers.map(t=>({key:String(t.id),label:t.nomAffiche,icon:M[t.type]??"fa-folder",count:t.nonLus||void 0}))}chargerMessages(t=!1){if(!this.dossierActif)return;this.chargement?.unsubscribe(),this.loading=!0;const n=t?Math.floor(this.messages.length/i.TAILLE_PAGE):0;this.chargement=this.messageEntrantService.lister(this.dossierActif.id,n,i.TAILLE_PAGE).subscribe({next:s=>{this.messages=t?this.ajouterSansDoublon(s.content):s.content,this.chargementPlusDisponible=!s.last,this.loading=!1,this.buildTemporalGroups()},error:()=>this.loading=!1})}ajouterSansDoublon(t){const n=new Set(this.messages.map(s=>s.id));return[...this.messages,...t.filter(s=>!n.has(s.id))]}buildTemporalGroups(){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),s=new Date(n);s.setDate(s.getDate()-1);const a=new Date(n);a.setDate(a.getDate()-7);const c={"Aujourd'hui":[],Hier:[],"Cette semaine":[],"Plus ancien":[]};for(const l of this.messages){const p=l.dateEnvoi?new Date(l.dateEnvoi):null;if(!p){c["Plus ancien"].push(l);continue}const _=new Date(p.getFullYear(),p.getMonth(),p.getDate());_>=n?c["Aujourd'hui"].push(l):_>=s?c.Hier.push(l):_>=a?c["Cette semaine"].push(l):c["Plus ancien"].push(l)}this.temporalGroups=Object.entries(c).filter(([,l])=>l.length>0).map(([l,p])=>({label:l,items:p}))}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(S.b),e.rXU(k.ef),e.rXU(I.L))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["boite-mail-list"]],inputs:{dossiers:"dossiers",dossierActif:"dossierActif",selectedMessageId:"selectedMessageId"},outputs:{dossierSelected:"dossierSelected",messageSelected:"messageSelected",actionsEffectuees:"actionsEffectuees"},features:[e.OA$],decls:12,vars:8,consts:[[1,"bml-wrapper"],["role","button","tabindex","0","aria-label","Rechercher dans les messages",1,"search-bar",3,"click","keydown.enter"],[1,"fas","fa-search","search-icon"],[1,"search-placeholder"],["activeColor","#4a6fa5",3,"tabs","activeTab","tabChange"],["class","px-3 py-1 small flex-shrink-0",4,"ngIf"],["class","selection-bar",4,"ngIf"],[1,"conv-list"],["class","empty-state",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button","class","btn-charger-plus",3,"click",4,"ngIf"],[1,"px-3","py-1","small","flex-shrink-0"],[3,"checked","change"],[1,"selection-bar"],[1,"w-100"],["type","button",1,"nivano-btn","nivano-btn-sm","nivano-btn-ghost",3,"disabled","click"],[1,"fas","fa-envelope-open","me-1"],[1,"fas","fa-envelope","me-1"],["type","button",1,"nivano-btn","nivano-btn-sm","nivano-btn-ghost",3,"disabled","matMenuTriggerFor"],[1,"fas","fa-folder-open","me-1"],["menuDeplacer","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["type","button","class","nivano-btn nivano-btn-sm nivano-btn-ghost",3,"disabled","click",4,"ngIf"],[1,"fas","fa-tras
1h","me-1"],[1,"fas","fa-xmark","me-1"],["mat-menu-item","",3,"click"],[1,"fas","me-2",3,"ngClass"],[1,"fas","fa-shield-halved","me-1"],[1,"fas","fa-shield-check","me-1"],[1,"empty-state"],[1,"fad","fa-envelope-open","empty-icon"],[1,"group-label"],["class","conv-item","role","button","tabindex","0","matRipple","",3,"selected","unread","click","keydown.enter",4,"ngFor","ngForOf","ngForTrackBy"],["role","button","tabindex","0","matRipple","",1,"conv-item",3,"click","keydown.enter"],[3,"checked","aria-label","change","click","keydown.enter"],[1,"avatar-wrap"],[1,"support-badge","sup-email"],[1,"fa-solid","fa-envelope"],[1,"conv-body"],[1,"conv-header-row"],[1,"conv-name"],["class","conv-name-adresse",4,"ngIf"],[1,"conv-time"],[1,"conv-footer-row"],[1,"conv-preview"],["class","fa-solid fa-paperclip attach-icon",4,"ngIf"],["class","unread-dot",4,"ngIf"],[1,"conv-name-adresse"],[1,"fa-solid","fa-paperclip","attach-icon"],[1,"unread-dot"],["type","button",1,"btn-charger-plus",3,"click"]],template:function(n,s){1&n&&(e.j41(0,"div",0)(1,"div",1),e.bIt("click",function(){return s.openSearch()})("keydown.enter",function(){return s.openSearch()}
1),e.nrm(2,"i",2),e.j41(3,"span",3),e.EFF(4,"Rechercher\u2026"),e.k0s()(),e.j41(5,"nv-filter-tabs",4),e.bIt("tabChange",function(c){return s.setFilterTab(c)}),e.k0s(),e.DNE(6,ee,3,1,"div",5),e.DNE(7,se,25,11,"div",6),e.j41(8,"div",7),e.DNE(9,ae,4,0,"div",8),e.DNE(10,de,4,3,"ng-container",9),e.DNE(11,pe,3,1,"button",10),e.k0s()()),2&n&&(e.R7$(5),e.Y8G("tabs",s.filterTabs)("activeTab",null==s.dossierActif||null==s.dossierActif.id?null:s.dossierActif.id.toString()),e.R7$(1),e.Y8G("ngIf",s.messages.length>0),e.R7$(1),e.Y8G("ngIf",s.selectionIds.size>0),e.R7$(2),e.Y8G("ngIf",!s.loading&&0===s.messages.length),e.R7$(1),e.Y8G("ngForOf",s.temporalGroups)("ngForTrackBy",s.trackByGroupe),e.R7$(1),e.Y8G("ngIf",s.chargementPlusDisponible))},dependencies:[W.a,m.YU,m.Sq,m.bT,f.pI,f.gy,f.fS,K.NZ,G.r6,Z],styles:['[_nghost-%COMP%]{display:block;width:100%;height:100%}.bml-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;background:white}.search-bar[_ngcontent-%COMP%]{display:flex;align-items:center;margin:10px 10px 4px;padding:8px 12px;background:#F7F2EE;border:1px solid transparent;border-radius:7px;cursor:pointer;gap:8px;font-size:13px;color:#8a847d;transition:all .15s;-webkit-user-select:none;user-select:none;flex-shrink:0}.search-bar[_ngcontent-%COMP%]:hover{background:#F0ECE6}.search-bar[_ngcontent-%COMP%]   .search-icon[_ngcontent-%COMP%]{font-size:12px}.search-bar[_ngcontent-%COMP%]   .search-placeholder[_ngcontent-%COMP%]{flex:1}.selection-bar[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex-shrink:0;margin:0 10px 6px;padding:8px 10px;background:#FDF5F8;border:1px solid #E592B5;border-radius:8px;font-size:12.5px;color:#b85580}.conv-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;overflow-x:hidden}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 20px;color:#b5afa7;font-size:13px;text-align:center;gap:8px}.empty-state[_ngcontent-%COMP%]   .empty-icon[_ngcontent-%COMP%]{font-size:28px}.group-label[_ngcontent-%COMP%]{padding:8px 16px 4px;font-size:10px;font-weight:700;color:#b5afa7;text-transform:uppercase;letter-spacing:.6px}.conv-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 14px;cursor:pointer;gap:10px;transition:background .12s;border-bottom:1px solid rgba(0,0,0,.04);position:relative}.conv-item[_ngcontent-%COMP%]:hover{background:#FDF8F5}.conv-item.unread[_ngcontent-%COMP%]{background:#E8F1FF}.conv-item.unread[_ngcontent-%COMP%]   .conv-name[_ngcontent-%COMP%]{font-weight:600}.conv-item.selected[_ngcontent-%COMP%]{background:#EEF3F9}.conv-item.selected[_ngcontent-%COMP%]:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#4a6fa5;border-radius:0 2px 2px 0}.avatar-wrap[_ngcontent-%COMP%]{flex-shrink:0;align-self:center;position:relative}.support-badge[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.support-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:13px;color:#fff}.support-badge.sup-email[_ngcontent-%COMP%]{background:#4a6fa5}.conv-body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.conv-header-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.conv-name[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:13px;font-weight:500;color:#14110f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conv-name-adresse[_ngcontent-%COMP%]{font-weight:400;color:#8a847d}.conv-time[_ngcontent-%COMP%]{flex-shrink:0;font-size:11px;color:#8a847d}.conv-footer-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.conv-preview[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:12px;color:#8a847d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attach-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:11px;color:#8a847d}.unread-dot[_ngcontent-%COMP%]{flex-shrink:0;width:8px;height:8px;border-radius:50%;background:#4a6fa5}.btn-charger-plus[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc(100% - 20px);margin:8px 10px 12px;padding:8px;background:#F7F2EE;border:1px solid #F0ECE6;border-radius:7px;color:#8a847d;font-size:12.5px;cursor:pointer}.btn-charger-plus[_ngcontent-%COMP%]:hover{background:#F0ECE6}']})}}return i})();var ue=r(3748),me=r(98051),ge=r(78582),L=r(66737),fe=r(96904),_e=r(80086),he=r(69623),ve=r(29326),be=r(5455),xe=r(38126),Ee=r(7639),Ce=r(60247);function Me(i,o){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" \xb7 \xc0 : ",t.message.destinataires,"")}}function Se(i,o){if(1&i&&(e.j41(0,"div",7),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" ",e.i5U(2,1,t.message.dateEnvoi,"EEEE dd MMMM yyyy \xe0 HH:mm")," ")}}function ke(i,o){if(1&i&&(e.j41(0,"button",31),e.nrm(1,"i",32),e.EFF(2,"D\xe9placer vers "),e.k0s()),2&i){e.XpG();const t=e.sdS(33);e.Y8G("matMenuTriggerFor",t)}}function Ie(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.appliquerAction(s.ActionMessageEntrant.SIGNALER_SPAM))}),e.nrm(1,"i",33),e.EFF(2,"Signaler comme spam "),e.k0s()}}function Re(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.appliquerAction(s.ActionMessageEntrant.PAS_SPAM))}),e.nrm(1,"i",34),e.EFF(2,"Pas un spam "),e.k0s()}}function ye(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){const a=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.appliquerAction(c.ActionMessageEntrant.DEPLACER,a.id))}),e.nrm(1,"i",35),e.EFF(2),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.R7$(1),e.Y8G("ngClass",n.ICONES_PAR_TYPE[t.type]||"fa-folder"),e.R7$(1),e.SpI("",t.nomAffiche," ")}}function Fe(i,o){1&i&&(e.j41(0,"div",36),e.nrm(1,"i",37),e.j41(2,"span"),e.EFF(3,"Exp\xe9diteur non v\xe9rifi\xe9 : ce message pourrait usurper l'adresse affich\xe9e."),e.k0s()())}function je(i,o){1&i&&(e.j41(0,"span",44),e.EFF(1,"(adresse reconnue, exp\xe9diteur non v\xe9rifi\xe9)"),e.k0s())}function Te(i,o){if(1&i&&(e.qex(0),e.nrm(1,"i",35),e.j41(2,"a",42),e.EFF(3),e.k0s(),e.DNE(4,je,2,0,"span",43),e.bVm()),2&i){const t=e.XpG(4);e.R7$(1),e.Y8G("ngClass",!1===t.message.expediteurAuthentifie?"fa-triangle-exclamation":"fa-address-card"),e.R7$(1),e.Y8G("routerLink",t.routeExpediteur),e.R7$(1),e.JRh(t.expediteur.libelle),e.R7$(1),e.Y8G("ngIf",!1===t.message.expediteurAuthentifie)}}function Oe(i,o){1&i&&(e.j41(0,"span",44),e.EFF(1,"(adresse reconnue, exp\xe9diteur non v\xe9rifi\xe9)"),e.k0s())}function Pe(i,o){if(1&i&&(e.qex(0),e.nrm(1,"i",35),e.EFF(2,"Exp\xe9diteur connu dans Nivano "),e.DNE(3,Oe,2,0,"span",43),e.bVm()),2&i){const t=e.XpG(4);e.R7$(1),e.Y8G("ngClass",!1===t.message.expediteurAuthentifie?"fa-triangle-exclamation":"fa-address-card"),e.R7$(2),e.Y8G("ngIf",!1===t.message.expediteurAuthentifie)}}function Ae(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",47),e.bIt("click",function(){e.eBV(t);const s=e.XpG(5);return e.Njj(s.creerContact())}),e.nrm(1,"i",48),e.EFF(2,"Cr\xe9er le contact "),e.k0s()}}const Ge=function(i){return{module:i}};function De(i,o){if(1&i&&(e.qex(0),e.nrm(1,"i",45),e.EFF(2,"Exp\xe9diteur inconnu dans Nivano "),e.DNE(3,Ae,3,0,"button",46),e.bVm()),2&i){const t=e.XpG(4);e.R7$(3),e.Y8G("moduleRestricted",e.eq3(1,Ge,t.ModuleEnum.CONTACTS))}}function Ne(i,o){if(1&i&&(e.j41(0,"div",41),e.DNE(1,Te,5,4,"ng-container",8),e.DNE(2,Pe,4,2,"ng-container",8),e.DNE(3,De,4,3,"ng-container",8),e.k0s()),2&i){const t=e.XpG(3);e.AVh("text-danger",t.expediteur.typeContact&&!1===t.message.expediteurAuthentifie),e.R7$(1),e.Y8G("ngIf",t.expediteur.typeContact&&t.expediteur.accessible),e.R7$(1),e.Y8G("ngIf",t.expediteur.typeContact&&!t.expediteur.accessible),e.R7$(1),e.Y8G("ngIf",!t.expediteur.typeContact&&t.expediteur.adresse)}}function Le(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",49)(1,"button",50),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.resumer())}),e.nrm(2,"i",51),e.EFF(3,"R\xe9sumer "),e.k0s(),e.j41(4,"button",50),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.creerTache())}),e.nrm(5,"i",51),e.EFF(6,"Cr\xe9er une t\xe2che "),e.k0s()()}if(2&i){const t=e.XpG(3);e.R7$(1),e.Y8G("disabled",t.resumeEnCours),e.R7$(1),e.Y8G("ngClass",t.resumeEnCours?"fa-spinner fa-pulse":"fa-wand-magic-sparkles"),e.R7$(2),e.Y8G("disabled",t.preparationTacheEnCours),e.R7$(1),e.Y8G("ngClass",t.preparationTacheEnCours?"fa-spinner fa-pulse":"fa-list-check")}}function Be(i,o){if(1&i&&(e.j41(0,"div",38),e.DNE(1,Ne,4,5,"div",39),e.DNE(2,Le,7,4,"div",40),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.expediteur),e.R7$(1),e.Y8G("ngIf",t.assistantActif)}}function $e(i,o){if(1&i&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.JRh(t)}}function we(i,o){if(1&i&&(e.qex(0),e.j41(1,"div",58),e.EFF(2,"Actions \xe0 mener"),e.k0s(),e.j41(3,"ul",59),e.DNE(4,$e,2,1,"li",60),e.k0s(),e.bVm()),2&i){const t=e.XpG(3);e.R7$(4),e.Y8G("ngForOf",t.resume.actions)}}function Ye(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",52)(1,"div",53)(2,"div",54),e.EFF(3,"R\xe9sum\xe9"),e.k0s(),e.j41(4,"button",55),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.fermerResume())}),e.nrm(5,"i",56),e.k0s()(),e.j41(6,"p",57),e.EFF(7),e.k0s(),e.DNE(8,we,5,1,"ng-container",8),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(7),e.JRh(t.resume.resume),e.R7$(1),e.Y8G("ngIf",null==t.resume.actions?null:t.resume.actions.length)}}function Xe(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",61),e.nrm(1,"i",62),e.j41(2,"span",63),e.EFF(3,"Les images distantes de ce message ont \xe9t\xe9 masqu\xe9es pour prot\xe9ger votre confidentialit\xe9."),e.k0s(),e.j41(4,"button",64),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.afficherImages())}),e.nrm(5,"i",65),e.EFF(6,"Afficher les images "),e.k0s()()}}function Ve(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",71),e.bIt("click",function(){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.telechargerPieceJointe(s))}),e.nrm(1,"i",72),e.j41(2,"span",73),e.EFF(3),e.k0s(),e.nrm(4,"i",74),e.k0s()}if(2&i){const t=e.XpG().$implicit;
1e.BMQ("aria-label","T\xe9l\xe9charger "+t.nomFichier),e.R7$(3),e.JRh(t.nomFichier)}}function Ue(i,o){if(1&i&&(e.j41(0,"div",75),e.nrm(1,"i",72),e.j41(2,"span",73),e.EFF(3),e.k0s(),e.j41(4,"span",76),e.EFF(5,"Trop volumineuse"),e.k0s()()),2&i){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t.nomFichier)}}function ze(i,o){if(1&i&&(e.qex(0),e.DNE(1,Ve,5,2,"button",69),e.DNE(2,Ue,6,1,"div",70),e.bVm()),2&i){const t=o.$implicit;e.R7$(1),e.Y8G("ngIf",t.telechargeable),e.R7$(1),e.Y8G("ngIf",!t.telechargeable)}}function Je(i,o){if(1&i&&(e.j41(0,"div",66)(1,"div",67),e.nrm(2,"i",68),e.EFF(3),e.k0s(),e.DNE(4,ze,3,2,"ng-container",60),e.k0s()),2&i){const t=e.XpG(2);e.R7$(3),e.SpI("",t.message.piecesJointes.length," pi\xe8ce(s) jointe(s) "),e.R7$(1),e.Y8G("ngForOf",t.message.piecesJointes)}}function Qe(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3),e.nrm(3,"i",4),e.k0s(),e.j41(4,"div",5)(5,"div",6),e.EFF(6),e.k0s(),e.j41(7,"div",7)(8,"span"),e.EFF(9),e.k0s(),e.DNE(10,Me,2,1,"span",8),e.k0s(),e.DNE(11,Se,3,4,"div",9),e.k0s(),e.j41(12,"div",10)(13,"button",11),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.repondre())}),e.nrm(14,"i",12),e.EFF(15,"R\xe9pondre "),e.k0s(),e.j41(16,"button",11),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.transferer())}),e.nrm(17,"i",13),e.EFF(18,"Transf\xe9rer "),e.k0s(),e.j41(19,"button",11),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.supprimer())}),e.nrm(20,"i",14),e.EFF(21,"Supprimer "),e.k0s(),e.j41(22,"button",15),e.nrm(23,"i",16),e.k0s(),e.j41(24,"mat-menu",null,17)(26,"button",18),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.marquerNonLu())}),e.nrm(27,"i",19),e.EFF(28,"Marquer comme non lu "),e.k0s(),e.DNE(29,ke,3,1,"button",20),e.DNE(30,Ie,3,0,"button",21),e.DNE(31,Re,3,0,"button",21),e.k0s(),e.j41(32,"mat-menu",null,22),e.DNE(34,ye,3,2,"button",23),e.k0s()()(),e.DNE(35,Fe,4,0,"div",24),e.DNE(36,Be,3,2,"div",25),e.DNE(37,Ye,9,2,"div",26),e.DNE(38,Xe,7,0,"div",27),e.j41(39,"div",28)(40,"iframe",29),e.bIt("load",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.onCorpsCharge(s))}),e.nI1(41,"safeHtml"),e.k0s()(),e.DNE(42,Je,5,2,"div",30),e.k0s()}if(2&i){const t=e.sdS(25),n=e.XpG();e.R7$(6),e.JRh(n.message.sujet||n.LIBELLE_SANS_OBJET),e.R7$(3),e.SpI("De : ",n.message.expediteur,""),e.R7$(1),e.Y8G("ngIf",n.message.destinataires),e.R7$(1),e.Y8G("ngIf",n.message.dateEnvoi),e.R7$(11),e.Y8G("matMenuTriggerFor",t),e.R7$(7),e.Y8G("ngIf",n.dossiersCibles.length),e.R7$(1),e.Y8G("ngIf",!n.estDansSpam&&n.dossierSpamExiste),e.R7$(1),e.Y8G("ngIf",n.estDansSpam),e.R7$(3),e.Y8G("ngForOf",n.dossiersCibles),e.R7$(1),e.Y8G("ngIf",!1===n.message.expediteurAuthentifie),e.R7$(1),e.Y8G("ngIf",n.expediteur||n.assistantActif),e.R7$(1),e.Y8G("ngIf",n.resume),e.R7$(1),e.Y8G("ngIf",n.contientImagesDistantes&&!n.imagesDistantesAffichees),e.R7$(2),e.Y8G("srcdoc",e.bMT(41,15,n.corpsIframe),e.npT),e.R7$(2),e.Y8G("ngIf",null==n.message.piecesJointes?null:n.message.piecesJointes.length)}}let He=(()=>{class i{static{this.RESSOURCES_DISTANTES=/\b(?:src|srcset|background|poster)\s*=\s*["']?\s*(?:https?:)?\/\/|url\(\s*["']?\s*(?:https?:)?\/\//i}static{this.CSP_IMAGES_BLOQUEES="<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; img-src data: cid: blob:; style-src 'unsafe-inline'; font-src data:\">"}static{this.STYLE_CORPS='<base target="_blank"><style>body{margin:0;font-family:Arial,Helvetica,sans-serif;font-size:13.5px;line-height:1.6;color:#14110F;word-break:break-word;}img{max-width:100%;height:auto;}</style>'}static{this.PROTOCOLES_ONGLET=["http:","https:"]}static{this.PROTOCOLES_APPLICATION=["mailto:","tel:"]}constructor(t,n,s,a,c,l,p){this.messageEntrantService=t,this.dialog=n,this.jarvysService=s,this.reglagesService=a,this.contactsService=c,this.tachesActionsService=l,this.router=p,this.dossiers=[],this.retire=new e.bkB,this.ActionMessageEntrant=u,this.ModuleEnum=b.Qv,this.ICONES_PAR_TYPE=M,this.LIBELLE_SANS_OBJET=v,this.expediteur=null,this.resume=null,this.resumeEnCours=!1,this.preparationTacheEnCours=!1,this.corpsIframe="",this.contientImagesDistantes=!1,this.imagesDistantesAffichees=!1,this.dossiersCibles=[],this.estDansSpam=!1,this.dossierSpamExiste=!1}ngOnChanges(t){t.message&&(this.expediteur=null,this.resume=null,this.imagesDistantesAffichees=!1,this.contientImagesDistantes=i.RESSOURCES_DISTANTES.test(this.message?.corps??""),this.construireCorpsIframe(),this.chargerExpediteur()),(t.message||t.dossiers)&&this.calculerDossiers()}get assistantActif(){return"true"===this.reglagesService.reglages?.autre?.assistant?.valeur}get routeExpediteur(){return this.contactsService.getContactRoute(Object.assign(new _e.K,{id:this.expediteur.idContact,typeContact:this.expediteur.typeContact,etatClient:this.expediteur.etatClient}))}afficherImages(){this.imagesDistantesAffichees=!0,this.construireCorpsIframe()}onCorpsCharge(t){const n=t.target,s=n.contentDocument;s&&(n.style.height=s.documentElement.scrollHeight+"px",s.addEventListener("click",a=>this.ouvrirLien(a)),s.addEventListener("auxclick",a=>this.ouvrirLien(a)))}telechargerPieceJointe(t){this.messageEntrantService.telechargerPieceJointe(this.message.id,t).subscribe({error:()=>this.jarvysService.erreur("La pi\xe8ce jointe n'a pas pu \xeatre t\xe9l\xe9charg\xe9e.")})}repondre(){this.ouvrirDialogReponse("repondre")}transferer(){this.ouvrirDialogReponse("transferer")}supprimer(){this.dialog.open(A.u,{panelClass:"nivano-dialog",data:{title:this.message.sujet||v,message:"Voulez-vous supprimer cet email ? Il sera d\xe9plac\xe9 vers la corbeille de votre messagerie."}}).afterClosed().subscribe(t=>{!0===t&&this.messageEntrantService.supprimer(this.message.id).subscribe({next:()=>this.retire.emit(u.SUPPRIMER),error:n=>this.jarvysService.erreur(n)})})}marquerNonLu(){this.messageEntrantService.marquerLu(this.message.id,!1).subscribe({next:()=>this.retire.emit(u.MARQUER_NON_LU),error:t=>this.jarvysService.erreur(t)})}appliquerAction(t,n){this.messageEntrantService.appliquerAction([this.message.id],t,n).subscribe({next:()=>this.retire.emit(t),error:s=>this.jarvysService.erreur(s)})}creerContact(){this.router.navigate(["/clients/nouveau"],{queryParams:{email:this.expediteur.adresse,nom:this.expediteur.nom}})}resumer(){const t=this.message.id;this.resumeEnCours=!0,this.messageEntrantService.resumer(t).subscribe({next:n=>{this.resumeEnCours=!1,t===this.message?.id&&(this.resume=n)},error:n=>{this.resumeEnCours=!1,this.jarvysService.erreur(n)}})}fermerResume(){this.resume=null}creerTache(){this.preparationTacheEnCours=!0,this.messageEntrantService.preparerTache(this.message.id).subscribe({next:t=>{this.preparationTacheEnCours=!1,this.tachesActionsService.openTacheInPopup(this.construireTache(t),null)},error:t=>{this.preparationTacheEnCours=!1,this.jarvysService.erreur(t)}})}construireCorpsIframe(){this.corpsIframe=(this.imagesDistantesAffichees?"":i.CSP_IMAGES_BLOQUEES)+i.STYLE_CORPS+(this.message?.corps??"")}
1ouvrirLien(t){const n=t.target?.closest?.("a[href]");n&&(t.preventDefault(),i.PROTOCOLES_ONGLET.includes(n.protocol)?window.open(n.href,"_blank","noopener,noreferrer"):i.PROTOCOLES_APPLICATION.includes(n.protocol)&&window.location.assign(n.href))}calculerDossiers(){const t=this.message?.dossierImapId;this.dossiersCibles=this.dossiers.filter(n=>n.id!==t),this.estDansSpam=this.dossiers.find(n=>n.id===t)?.type===d.SPAM,this.dossierSpamExiste=this.dossiers.some(n=>n.type===d.SPAM)}chargerExpediteur(){if(!this.message)return;const t=this.message.id;this.messageEntrantService.getExpediteur(t).subscribe(n=>{t===this.message?.id&&(this.expediteur=n)})}construireTache(t){const n=new he.K;return n.description=t.description||"",n.priorite=t.priorite||null,n.rappel=t.rappel||!1,t.echeance&&(n.echeance=new Date(t.echeance)),t.contexteIdObjet&&(n.idObjet=t.contexteIdObjet,n.typeObjet=t.contexteTypeObjet,n.titleObjet=t.contexteTitleObjet),n}ouvrirDialogReponse(t){const n={waitForSend:!1,title:"repondre"===t?"R\xe9pondre":"Transf\xe9rer",email:new O.P(null,"",""),messageSource:this.message,modeReponse:t,hideCc:!1};this.dialog.open(T.p,{autoFocus:!1,panelClass:"nivano-dialog",data:n})}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(S.b),e.rXU(k.ef),e.rXU(I.L),e.rXU(ve.s),e.rXU(be.F),e.rXU(xe.$),e.rXU(g.Ix))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["message-mail"]],inputs:{message:"message",dossiers:"dossiers"},outputs:{retire:"retire"},features:[e.OA$],decls:1,vars:1,consts:[["class","message-card",4,"ngIf"],[1,"message-card"],[1,"card-header"],[1,"support-icon"],[1,"fa-solid","fa-envelope-open-text"],[1,"card-info"],[1,"card-title"],[1,"card-submeta"],[4,"ngIf"],["class","card-submeta",4,"ngIf"],[1,"card-actions"],["type","button",1,"nivano-btn","nivano-btn-ghost",3,"click"],[1,"fas","fa-reply","me-2"],[1,"fas","fa-share","me-2"],[1,"fas","fa-trash","me-2"],["type","button","matTooltip","Plus d'actions","aria-label","Plus d'actions",1,"nivano-btn","nivano-btn-ghost",3,"matMenuTriggerFor"],[1,"fas","fa-ellipsis-vertical"],["menuActions","matMenu"],["mat-menu-item","",3,"click"],[1,"fas","fa-envelope","me-2"],["mat-menu-item","",3,"matMenuTriggerFor",4,"ngIf"],["mat-menu-item","",3,"click",4,"ngIf"],["menuDossiers","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["class","mc-inline-alert warn mx-3 mt-3",4,"ngIf"],["class","card-expediteur d-flex align-items-center gap-2",4,"ngIf"],["class","card-resume",4,"ngIf"],["class","d-flex align-items-center gap-2 px-3 pt-3 small text-muted",4,"ngIf"],[1,"card-body"],["title","Contenu du message","sandbox","allow-same-origin allow-popups",1,"corps-mail",3,"srcdoc","load"],["class","card-attachments",4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor"],[1,"fas","fa-folder-open","me-2"],[1,"fas","fa-shield-halved","me-2"],[1,"fas","fa-shield-check","me-2"],[1,"fas","me-2",3,"ngClass"],[1,"mc-inline-alert","warn","mx-3","mt-3"],[1,"fas","fa-triangle-exclamation"],[1,"card-expediteur","d-flex","align-items-center","gap-2"],["class","d-flex align-items-center flex-grow-1 min-w-0",3,"text-danger",4,"ngIf"],["class","d-flex gap-2 ms-auto",4,"ngIf"],[1,"d-flex","align-items-center","flex-grow-1","min-w-0"],[3,"routerLink"],["class","ms-1",4,"ngIf"],[1,"ms-1"],[1,"fas","fa-user-question","me-2"],["type","button","class","nivano-btn nivano-btn-ghost ms-2",3,"click",4,"moduleRestricted"],["type","button",1,"nivano-btn","nivano-btn-ghost","ms-2",3,"click"],[1,"fas","fa-user-plus"],[1,"d-flex","gap-2","ms-auto"],["type","button",1,"nivano-btn","nivano-btn-ghost",3,"disabled","click"],[1,"fas",3,"ngClass"],[1,"card-resume"],[1,"d-flex","align-items-center","justify-content-between"],[1,"attachments-title","mb-0"],["type","button","matTooltip","Fermer","aria-label","Fermer le r\xe9sum\xe9",1,"nivano-btn","nivano-btn-ghost",3,"click"],[1,"fas","fa-xmark"],[1,"mb-0"],[1,"attachments-title","mt-3","mb-1"],[1,"mb-0","ps-3"],[4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","gap-2","px-3","pt-3","small","text-muted"],[1,"fas","fa-image-slash"],[1,"flex-grow-1"],["type","button",1,"nivano-btn","nivano-btn-sm","nivano-btn-ghost",3,"click"],[1,"fas","fa-image","me-1"],[1,"card-attachments"],[1,"attachments-title"],[1,"fas","fa-paperclip","me-2"],["type","button","class","attachment-item",3,"click",4,"ngIf"],["class","attachment-item attachment-indisponible",4,"ngIf"],["type","button",1,"attachment-item",3,"click"],[1,"fas","fa-file"],[1,"attachment-name"],[1,"fas","fa-download","attachment-download"],[1,"attachment-item","attachment-indisponible"],[1,"attachment-download"]],template:function(n,s){1&n&&e.DNE(0,Qe,43,17,"div",0),2&n&&e.Y8G("ngIf",s.message)},dependencies:[m.YU,m.Sq,m.bT,g.Wk,f.pI,f.gy,f.fS,L.PD,Ee.h,m.vh,Ce.$],styles:[".message-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.card-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:18px;border-bottom:1px solid #E8E4DF}.support-icon[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:10px;background:#4a6fa5;display:flex;align-items:center;justify-content:center;flex-shrink:0}.support-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:17px;color:#fff}.card-info[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#14110f;line-height:1.3;word-break:break-word}.card-submeta[_ngcontent-%COMP%]{font-size:12.5px;color:#8a847d;word-break:break-word}.card-actions[_ngcontent-%COMP%]{display:flex;gap:8px;flex-shrink:0}.card-expediteur[_ngcontent-%COMP%]{padding:6px 18px;border-bottom:1px solid #E8E4DF;font-size:13px;color:#8a847d}.card-resume[_ngcontent-%COMP%]{margin:14px 18px 0;padding:10px 14px;border:1px solid #E8E4DF;border-radius:8px;background:#F7F2EE;font-size:13.5px;color:#14110f}.card-expediteur[_ngcontent-%COMP%]   .nivano-btn[_ngcontent-%COMP%], .card-resume[_ngcontent-%COMP%]   .nivano-btn[_ngcontent-%COMP%]{padding:4px 10px;font-size:13px}.card-body[_ngcontent-%COMP%]{flex:1;padding:18px;font-size:13.5px;color:#14110f;word-break:break-word;line-height:1.6;overflow-x:auto}.corps-mail[_ngcontent-%COMP%]{width:100%;border:0;display:block}
1.card-attachments[_ngcontent-%COMP%]{padding:14px 18px;border-top:1px solid #E8E4DF}.attachments-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#8a847d;text-transform:uppercase;letter-spacing:.4px;margin-bottom:8px}.attachment-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #E8E4DF;border-radius:8px;margin-bottom:6px;cursor:pointer;font-size:13px;color:#14110f;transition:background .12s}.attachment-item[_ngcontent-%COMP%]:hover{background:#F7F2EE}.attachment-item[_ngcontent-%COMP%]   .attachment-name[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.attachment-item[_ngcontent-%COMP%]   .attachment-download[_ngcontent-%COMP%]{color:#8a847d}button.attachment-item[_ngcontent-%COMP%]{width:100%;background:transparent}.attachment-item.attachment-indisponible[_ngcontent-%COMP%]{cursor:default}.attachment-item.attachment-indisponible[_ngcontent-%COMP%]:hover{background:transparent}"]})}}return i})();function qe(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",7),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.actualiser())}),e.nrm(1,"i",8),e.EFF(2," Actualiser "),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("disabled",t.actualisation),e.R7$(1),e.Y8G("ngClass",t.actualisation?"fa-spinner fa-pulse":"fa-arrows-rotate")}}const B=function(){return["/","mon-compte"]},$=function(){return{tab:"emails"}};function We(i,o){1&i&&(e.j41(0,"div",12),e.nrm(1,"i",13),e.j41(2,"p"),e.EFF(3," La configuration du serveur de messagerie de votre entreprise a chang\xe9 : ressaisissez votre mot de passe dans "),e.j41(4,"a",14),e.EFF(5,"Mon compte > Emails"),e.k0s(),e.EFF(6," pour r\xe9activer la r\xe9ception et l'envoi. "),e.k0s()()),2&i&&(e.R7$(4),e.Y8G("routerLink",e.lJ4(2,B))("queryParams",e.lJ4(3,$)))}function Ke(i,o){1&i&&(e.j41(0,"div",12),e.nrm(1,"i",15),e.j41(2,"p"),e.EFF(3," La r\xe9ception de vos emails dans Nivano n'est pas activ\xe9e. Rendez-vous dans "),e.j41(4,"a",14),e.EFF(5,"Mon compte"),e.k0s(),e.EFF(6," pour l'activer \u2014 elle n'est possible que si votre entreprise utilise son propre serveur de messagerie. "),e.k0s()()),2&i&&(e.R7$(4),e.Y8G("routerLink",e.lJ4(2,B))("queryParams",e.lJ4(3,$)))}function Ze(i,o){if(1&i){const t=e.RV6();e.j41(0,"message-mail",20),e.bIt("retire",function(s){e.eBV(t);const a=e.XpG(3);return e.Njj(a.messageRetire(s))}),e.k0s()}if(2&i){const t=e.XpG(3);e.Y8G("message",t.messageSelectionne)("dossiers",t.dossiers)}}function et(i,o){1&i&&(e.j41(0,"div",21),e.nrm(1,"i",22),e.j41(2,"p"),e.EFF(3,"S\xe9lectionnez un message pour en consulter le contenu."),e.k0s()())}function tt(i,o){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"boite-mail-list",16),e.bIt("dossierSelected",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.selectionnerDossier(s))})("messageSelected",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.selectionnerMessage(s))})("actionsEffectuees",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.actionsEffectuees(s))}),e.k0s(),e.j41(2,"div",17),e.DNE(3,Ze,1,2,"message-mail",18),e.DNE(4,et,4,0,"div",19),e.k0s(),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("dossiers",t.dossiers)("dossierActif",t.dossierActif)("selectedMessageId",null==t.messageSelectionne?null:t.messageSelectionne.id),e.R7$(2),e.Y8G("ngIf",t.messageSelectionne),e.R7$(1),e.Y8G("ngIf",!t.messageSelectionne)}}function nt(i,o){if(1&i&&(e.j41(0,"div",9),e.DNE(1,We,7,4,"div",10),e.DNE(2,Ke,7,4,"div",10),e.DNE(3,tt,5,5,"ng-container",11),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.motDePasseARessaisir),e.R7$(1),e.Y8G("ngIf",!t.imapConfigure&&!t.motDePasseARessaisir),e.R7$(1),e.Y8G("ngIf",t.imapConfigure)}}const it=[{path:"",component:(()=>{class i{static{this.DELAI_SONDAGE_MS=5e3}static{this.MAX_SONDAGES=60}static{this.SYNCHRONISATION_DEJA_EN_COURS="Une synchronisation est d\xe9j\xe0 en cours : r\xe9essayez dans quelques instants."}constructor(t,n,s,a,c,l,p,_){this.compteMailService=t,this.dossierImapService=n,this.messageEntrantService=s,this.route=a,this.router=c,this.dialog=l,this.jarvysService=p,this.serverNotificationService=_,this.chargementCompte=!0,this.imapConfigure=!1,this.motDePasseARessaisir=!1,this.actualisation=!1,this.derniereSynchro=null,this.dossiers=[],this.destroy$=new y.B,this.rechargementDossiers$=new y.B}ngOnInit(){this.rechargementDossiers$.pipe((0,h.n)(()=>this.dossierImapService.get().pipe((0,F.W)(()=>V.w))),(0,E.Q)(this.destroy$)).subscribe(t=>this.appliquerDossiers(t,this.dossierActif?.id)),this.compteMailService.obtenirMonCompte().subscribe({next:t=>{this.derniereSynchro=t?.derniereSynchro??null,this.motDePasseARessaisir=!0===t?.motDePasseARessaisir,this.imapConfigure=!0===t?.receptionActive&&!this.motDePasseARessaisir,this.chargementCompte=!1,this.imapConfigure&&this.chargerDossiers()},error:()=>this.chargementCompte=!1})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}selectionnerDossier(t){this.router.navigate(["/","boite-mail",t.id])}selectionnerMessage(t){this.router.navigate(["/","boite-mail",this.dossierActif.id,t.id])}actualiser(){this.actualisation=!0,this.compteMailService.synchroniser().subscribe({next:()=>this.suivreSynchronisation(),error:t=>{this.actualisation=!1,429===t.status?this.jarvysService.message(this.messageSynchronisationRefusee(t),void 0,"warning"):this.jarvysService.erreur("La synchronisation n'a pas pu \xeatre lanc\xe9e.")}})}nouveauMessage(){const t={waitForSend:!1,title:"Nouveau message",email:new O.P(null,"",""),hideCc:!1};this.dialog.open(T.p,{autoFocus:!1,panelClass:"nivano-dialog",data:t})}messageRetire(t){this.liste?.appliquerLocalement({ids:[this.messageSelectionne.id],action:t}),this.fermerMessage()}actionsEffectuees(t){P(t.action)&&t.ids.includes(this.messageSelectionne?.id)?this.fermerMessage():this.rechargementDossiers$.next()}suivreSynchronisation(){(0,U.O)(0,i.DELAI_SONDAGE_MS).pipe((0,h.n)(()=>this.compteMailService.obtenirMonCompte()),(0,C.T)((t,n)=>({compte:t,dernier:this.synchronisationTerminee(t)||n>
1=i.MAX_SONDAGES-1})),(0,z.v)(t=>!t.dernier,!0),(0,E.Q)(this.destroy$)).subscribe({next:t=>{t.dernier&&this.terminerSynchronisation(t.compte)},error:()=>this.actualisation=!1})}messageSynchronisationRefusee(t){return t.error?.message??("string"==typeof t.error&&t.error?t.error:i.SYNCHRONISATION_DEJA_EN_COURS)}synchronisationTerminee(t){return!t||!!t.messageDerniereErreur||t.derniereSynchro!==this.derniereSynchro}terminerSynchronisation(t){this.actualisation=!1,t?.messageDerniereErreur&&this.jarvysService.erreur("La synchronisation a \xe9chou\xe9 : "+t.messageDerniereErreur),this.derniereSynchro=t?.derniereSynchro??this.derniereSynchro,this.rechargementDossiers$.next(),this.liste?.recharger()}chargerDossiers(){this.dossierImapService.get().pipe((0,j.M)(t=>this.dossiers=t),(0,h.n)(()=>this.paramsRoute()),(0,j.M)(t=>this.appliquerDossiers(this.dossiers,t.dossierId?+t.dossierId:null)),(0,C.T)(t=>t.messageId?+t.messageId:null),(0,J.F)(),(0,h.n)(t=>this.chargerMessage(t)),(0,E.Q)(this.destroy$)).subscribe(t=>this.afficherMessage(t))}paramsRoute(){return this.router.events.pipe((0,Q.p)(t=>t instanceof g.wF),(0,H.Z)(null),(0,C.T)(()=>this.route.firstChild?.snapshot.params??{}))}appliquerDossiers(t,n){this.dossiers=t,this.dossierActif=t.find(s=>s.id===n)??t.find(s=>s.type===d.BOITE_RECEPTION)??t[0]}fermerMessage(){this.messageSelectionne=null,this.router.navigate(["/","boite-mail",this.dossierActif.id]),this.rechargementDossiers$.next()}chargerMessage(t){return t?this.messageEntrantService.getById(t).pipe((0,F.W)(n=>(this.jarvysService.erreur(n),(0,x.of)(null)))):(0,x.of)(null)}afficherMessage(t){this.messageSelectionne=t,t&&!t.lu&&this.marquerLu(t)}marquerLu(t){this.messageEntrantService.marquerLu(t.id).subscribe({next:()=>{t.lu=!0,this.liste?.marquerLu([t.id],!0);const n=this.dossiers.map(s=>s.id===t.dossierImapId&&s.nonLus>0?{...s,nonLus:s.nonLus-1}:s);this.appliquerDossiers(n,this.dossierActif?.id)},error:()=>this.jarvysService.erreur("Le message n'a pas pu \xeatre marqu\xe9 comme lu.")}),this.serverNotificationService.markAsSeenBySource(b.Qv.TACHES,"centreNotification",t.id).subscribe()}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(ue.J),e.rXU(me.c),e.rXU(S.b),e.rXU(g.nX),e.rXU(g.Ix),e.rXU(k.ef),e.rXU(I.L),e.rXU(ge.M))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["boite-mail"]],viewQuery:function(n,s){if(1&n&&e.GBs(N,5),2&n){let a;e.mGM(a=e.lsd())&&(s.liste=a.first)}},decls:9,vars:2,consts:[[1,"communication-menu"],[1,"header-title"],["title",""],[1,"header-buttons"],["matRipple","","role","button","tabindex","0",1,"btn-entete","btn-entete-plus",3,"click","keydown.enter"],["matRipple","","type","button","class","btn-entete-custom","matTooltip","Synchroniser la bo\xeete de r\xe9ception",3,"disabled","click",4,"ngIf"],["class","boite-mail-layout",4,"ngIf"],["matRipple","","type","button","matTooltip","Synchroniser la bo\xeete de r\xe9ception",1,"btn-entete-custom",3,"disabled","click"],[1,"fas","me-2",3,"ngClass"],[1,"boite-mail-layout"],["class","panel-empty full-panel",4,"ngIf"],[4,"ngIf"],[1,"panel-empty","full-panel"],[1,"fad","fa-key","empty-icon"],[3,"routerLink","queryParams"],[1,"fad","fa-inbox","empty-icon"],[3,"dossiers","dossierActif","selectedMessageId","dossierSelected","messageSelected","actionsEffectuees"],[1,"message-panel"],[3,"message","dossiers","retire",4,"ngIf"],["class","panel-empty",4,"ngIf"],[3,"message","dossiers","retire"],[1,"panel-empty"],[1,"fad","fa-envelope-open-text","empty-icon"]],template:function(n,s){1&n&&(e.j41(0,"navbar",0)(1,"span",1,2),e.EFF(3,"Bo\xeete de r\xe9ception"),e.k0s(),e.j41(4,"div",3)(5,"a",4),e.bIt("click",function(){return s.nouveauMessage()})("keydown.enter",function(){return s.nouveauMessage()}),e.EFF(6," Email "),e.k0s(),e.DNE(7,qe,3,2,"button",5),e.k0s()(),e.DNE(8,nt,4,3,"div",6)),2&n&&(e.R7$(7),e.Y8G("ngIf",s.imapConfigure),e.R7$(1),e.Y8G("ngIf",!s.chargementCompte))},dependencies:[m.YU,m.bT,g.Wk,L.PD,G.r6,fe._,N,He],styles:[".boite-mail-layout[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 140px);width:100%;background:#FBF5F3;display:flex;gap:14px;padding:0 16px}.boite-mail-layout[_ngcontent-%COMP%]   boite-mail-list[_ngcontent-%COMP%]{flex-shrink:0;width:max(340px,28%);height:100%;border-radius:12px;box-shadow:0 1px 3px #1a0e140a,0 4px 12px #1a0e1408;overflow:hidden}.boite-mail-layout[_ngcontent-%COMP%]   .message-panel[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%;border-radius:12px;box-shadow:0 1px 3px #1a0e140a,0 4px 12px #1a0e1408;background:white;overflow:auto}.boite-mail-layout[_ngcontent-%COMP%]   .message-panel[_ngcontent-%COMP%]   message-mail[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.boite-mail-layout.full-panel[_ngcontent-%COMP%], .boite-mail-layout[_ngcontent-%COMP%]   .full-panel[_ngcontent-%COMP%]{width:100%}.panel-empty[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#b5afa7;gap:12px;padding:24px;text-align:center}.panel-empty[_ngcontent-%COMP%]   .empty-icon[_ngcontent-%COMP%]{font-size:40px}.panel-empty[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:14px;margin:0;max-width:340px}"]})}}return i})(),canActivate:[Y.q,X.c],data:{modules:[b.Qv.COMMUNICATIONS]},children:[{path:"",pathMatch:"full",children:[]},{path:":dossierId",children:[]},{path:":dossierId/:messageId",children:[]}]}];let st=(()=>
1{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[w.G,g.iI.forChild(it)]})}}return i})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.