1"use strict";(self.webpackChunktektime=self.webpackChunktektime||[]).push([[5233,8577],{37761:(e,i,s)=>{s.r(i),s.d(i,{default:()=>ti});var t=s(65043),n=s(73216),l=s(74117),o=s(52815),a=s(85369),r=s(3784),d=s(92387),c=s(91957),h=s(4768),x=s(15492),m=s(70494),u=s(24595),f=s(8918),p=s(62918),g=s(56403),v=s(28402),y=s(64038),j=s(14524),b=s(11983),A=s(61399),_=s(13312),w=s(89379),C=s(86178),S=s.n(C),k=s(91686),E=s(34135),N=s(37490),T=s(57560),I=s(28468),R=s(70579);const{Text:P}=d.A,z=e=>{if(!e)return"";const i=S()(e),s=S()();return i.isSame(s,"day")?i.format("HH:mm"):i.isSame(s.clone().subtract(1,"day"),"day")?"Hier":i.format("DD/MM")},M=e=>{let{searchTerm:i,isActive:s,userData:n}=e;const[l,o]=(0,t.useState)([]),[a,r]=(0,t.useState)(null),[d,x]=(0,t.useState)([]),[m,f]=(0,t.useState)({destinations:!0,meetings:!1}),[p,g]=(0,t.useState)({currentPage:1,lastPage:1,loadingMore:!1}),[v,y]=(0,t.useState)({currentPage:1,lastPage:1,loadingMore:!1}),[j,b]=(0,t.useState)(window.innerWidth<768);(0,t.useEffect)(()=>{const e=()=>b(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const A=async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;try{1===i?f(e=>(0,w.A)((0,w.A)({},e),{},{meetings:!0})):y(e=>(0,w.A)((0,w.A)({},e),{},{loadingMore:!0}));const s=await(0,I.dP)(e,i),t=null===s||void 0===s?void 0:s.data;let n=[],l=1;t&&(Array.isArray(t)?n=t:t.data&&Array.isArray(t.data)&&(n=t.data,l=t.last_page||1)),1===i?(x(n),y({currentPage:1,lastPage:l,loadingMore:!1})):(x(e=>{const i=new Set(e.map(e=>e.id)),s=n.filter(e=>!i.has(e.id));return[...e,...s]}),y({currentPage:i,lastPage:l,loadingMore:!1}))}catch(s){console.error("Error fetching meetings:",s),1===i&&x([]),y(e=>(0,w.A)((0,w.A)({},e),{},{loadingMore:!1}))}finally{1===i&&f(e=>(0,w.A)((0,w.A)({},e),{},{meetings:!1}))}},_=async()=>{v.loadingMore||v.currentPage>=v.lastPage||a&&await A(a,v.currentPage+1)};(0,t.useEffect)(()=>{if(!s)return;(async()=>{f(e=>(0,w.A)((0,w.A)({},e),{},{destinations:!0}));try{const e=await(0,I.XI)(1),i=null===e||void 0===e?void 0:e.data;let s=[],t=1;if(i&&(Array.isArray(i)?s=i:i.data&&Array.isArray(i.data)&&(s=i.data,t=i.last_page||1)),o(s),g({currentPage:1,lastPage:t,loadingMore:!1}),s.length>0){const e=s[0].id;r(e.toString()),await A(e)}}catch(e){console.error("Error fetching initial data:",e)}finally{f(e=>(0,w.A)((0,w.A)({},e),{},{destinations:!1}))}})()},[s]);const C=async()=>{if(!(p.loadingMore||p.currentPage>=p.lastPage)){g(e=>(0,w.A)((0,w.A)({},e),{},{loadingMore:!0}));try{const e=p.currentPage+1,i=await(0,I.XI)(e),s=null===i||void 0===i?void 0:i.data;let t=[],n=p.lastPage;s&&(Array.isArray(s)?t=s:s.data&&Array.isArray(s.data)&&(t=s.data,n=s.last_page||n)),o(e=>{const i=new Set(e.map(e=>e.id)),s=t.filter(e=>!i.has(e.id));return[...e,...s]}),g({currentPage:e,lastPage:n,loadingMore:!1})}catch(e){console.error("Error loading more destinations:",e),g(e=>(0,w.A)((0,w.A)({},e),{},{loadingMore:!1}))}}},S=e=>{r(e),x([]),A(e)},M=(0,t.useMemo)(()=>{if(!i)return l;const e=i.toLowerCase();return l.filter(i=>{var s,t,n;return(null===(s=i.destination_name)||void 0===s?void 0:s.toLowerCase().includes(e))||(null===(t=i.clients)||void 0===t||null===(n=t.client_name)||void 0===n?void 0:n.toLowerCase().includes(e))})},[l,i]),L=t.useRef(a);(0,t.useEffect)(()=>{L.current=a},[a]);const D=(0,t.useCallback)(e=>{x(i=>{const s=i.map(i=>{const s=e.find(e=>e.id===i.id);return s?(0,w.A)((0,w.A)({},i),s):i}),t=s.reduce((e,i)=>e+(i.unread_messages_count||0),0),n=s.reduce((e,i)=>{const s=i.last_message_date||i.updated_at;return e?s&&new Date(s)>new Date(e)?s:e:s},null);return o(e=>e.map(e=>e.id.toString()===L.current?(0,w.A)((0,w.A)({},e),{},{unread_messages_count:t,last_message_date:n}):e)),s})},[]);return s?(0,R.jsx)("div",{className:"h-100 d-flex flex-column bg-white",children:m.destinations?(0,R.jsx)("div",{className:"d-flex justify-content-center align-items-center flex-grow-1",children:(0,R.jsx)(k.A,{size:"large",tip:"Loading Missions..."})}):0===l.length?(0,R.jsx)("div",{className:"d-flex justify-content-center align-items-center flex-grow-1",children:(0,R.jsx)(E.Ay,{status:"info",title:"No Missions available"})}):(0,R.jsxs)(R.Fragment,{children:[j&&(0,R.jsx)("div",{className:"px-3 border-bottom shadow-sm bg-white",children:(0,R.jsx)("div",{className:"py-2",children:(0,R.jsx)(u.A,{value:a,onChange:S,className:"w-100",size:"middle",dropdownStyle:{zIndex:1e4},dropdownRender:e=>(0,R.jsxs)(R.Fragment,{children:[e,p.currentPage<p.lastPage&&(0,R.jsx)("div",{className:"text-center py-2 border-top cursor-pointer bg-light",style:{color:"#1890ff",fontSize:"12px",fontWeight:500},onClick:e=>{e.preventDefault(),e.stopPropagation(),C()},children:p.loadingMore?(0,R.jsx)(k.A,{size:"small"}):"Charger plus..."})]}),children:M.map(e=>{var i,s;return(0,R.jsx)(u.A.Option,{value:e.id.toString(),children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",style:{backgroundColor:"#87d068"},children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0).toUpperCase()}),e.destination_name,(0,R.jsx)(P,{type:"secondary",style:{fontSize:"10px",marginLeft:"auto"},children:z(e.last_message_date||e.updated_at)}),e.unread_messages_count>0&&(0,R.jsx)(N.A,{count:e.unread_messages_count,size:"small"})]})},e.id.toString())})})})}),(0,R.jsxs)("div",{className:"flex-grow-1 overflow-hidden position-relative",children:[m.meetings?(0,R.jsx)("div",{className:"d-flex justify-content-center align-items-center h-100 bg-light bg-opacity-50 position-absolute w-100 z-index-1",style:{zIndex:10},children:(0,R.jsx)(k.A,{tip:"Loading discussions..."})}):null,(0,R.jsx)("div",{className:"h-100",children:d.length>0?(0,R.jsx)(T.A,{meetingId:d[0].id,meetingsData:d,onMeetingsUpdate:D,isOutlook:!1,userData:n,missionsData:j?null:M,selectedMissionId:a,onMissionSelect:S,onLoadMoreMissions:C,hasMoreMissions:p.currentPage<p.lastPage,isLoadingMoreMissions:p.loadingMore,onLoadMore:_,hasMore:v.currentPage<v.lastPage,isLoadingMore:v.loadingMore}):(0,R.jsx)("div",{className:"h-100 d-flex justify-content-center align-items-center p-4",children:(0,R.jsxs)("div",{className:"w-100 h-100 d-flex flex-column",children:[!j&&(0,R.jsx)(T.A,{meetingId:null,meetingsData:[],missionsData:j?null:M,selectedMissionId:a,onMissionSelect:S,userData:n,onLoadMoreMissions:C,hasMoreMissions:p.currentPage<p.lastPage,isLoadingMoreMissions:p.loadingMore,onLoadMore:_,hasMore:v.currentPage<v.lastPage,isLoadingMore:v.loadingMore}),j&&(0,R.jsx)(P,{type:"secondary",children:"Aucun message dans cette mission"})]})})})]})]})}):null};var L=s(98964);const D=function(e,i,s){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const[l,o]=(0,t.useState)([]),[a,r]=(0,t.useState)(null),[d,c]=(0,t.useState)(!1),[h,x]=(0,t.useState)({current_page:1,last_page:1,total:0}),[m,u]=(0,t.useState)(1),f=(0,t.useRef)(m);(0,t.useEffect)(()=>{f.current=m},[m]);const p=(0,t.useCallback)(async function(i){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(i)try{var l;1!==s||t||n||c(!0);const d=await e(i,s);let h=[],m={current_page:1,last_page:1,total:0};if(null!==d&&void 0!==d&&null!==(l=d.data)&&void 0!==l&&l.current_page&&Array.isArray(d.data.data)?(h=d.data.data,m={current_page:d.data.current_page,last_page:d.data.last_page,total:d.data.total}):null!==d&&void 0!==d&&d.current_page&&Array.isArray(d.data)?(h=d.data,m={current_page:d.current_page,last_page:d.last_page,total:d.total}):h=Array.isArray(null===d||void 0===d?void 0:d.data)?d.data:[],1===s)o(h),h.length>0?r(h[0].id):r(null);else{var a;const e=(null===d||void 0===d||null===(a=d.data)||void 0===a?void 0:a.per_page)||10;o(i=>{const t=[...i],n=(s-1)*e;return n<t.length?t.splice(n,e,...h):t.push(...h),t})}x(m),m.current_page!==s&&u(m.current_page)}catch(d){console.error("Error fetching meetings:",d)}finally{1!==s||t||n||c(!1)}},[e,n]),g=(0,t.useCallback)(()=>{i&&p(i,f.current,!0)},[i,p]);return(0,t.useEffect)(()=>{s&&i&&p(i,1,!1)},[s,i,p]),(0,t.useEffect)(()=>
1{if(!s||!i)return;const e=setInterval(()=>{p(i,f.current,!0)},6e4);return()=>clearInterval(e)},[s,i,p,n]),{meetings:l,setMeetings:o,activeMeeting:a,setActiveMeeting:r,loading:d,pagination:h,currentPage:m,handleLoadMore:()=>{if(h.current_page<h.last_page){const e=h.current_page+1;u(e),p(i,e,!1)}},refetch:g}};var O=s(68051);const{Text:H}=d.A,{Content:V}=L.A,W=e=>{let{searchTerm:i,isActive:s,userData:n,refreshTrigger:o,onShowCompose:r,openMeetingId:d}=e;const[m]=(0,l.Bd)("global"),[f,p]=(0,t.useState)([]),[g,v]=(0,t.useState)(null),[y,j]=(0,t.useState)(!0),[b,A]=(0,t.useState)("inbox"),_=(0,t.useCallback)((e,s)=>(0,I.bd)(e,s,b,i),[b,i]),{meetings:C,setMeetings:S,activeMeeting:E,loading:P,pagination:z,handleLoadMore:M,refetch:L}=D(_,g,s,!!i),W=(0,t.useCallback)(async()=>{try{const e=await(0,I.fg)(),i=(null===e||void 0===e?void 0:e.data)||[];p(i),i.length>0&&!g&&v(i[0].id.toString())}catch(e){console.error(e)}finally{j(!1)}},[]);(0,t.useEffect)(()=>{if(s){W();const e=setInterval(W,3e4);return()=>clearInterval(e)}},[s,W,o]),(0,t.useEffect)(()=>{if(!s||null===n||void 0===n||!n.id)return;const e=(0,O.T)().subscribe("user.".concat(n.id)),i=()=>{W(),L()};return e.bind("discussion.mail-received",i),()=>e.unbind("discussion.mail-received",i)},[s,null===n||void 0===n?void 0:n.id,W,L]);const U=(0,t.useMemo)(()=>{if(!i)return f;const e=i.toLowerCase();return f.filter(i=>{var s,t,n;return(null===(s=i.destination_name)||void 0===s?void 0:s.toLowerCase().includes(e))||(null===(t=i.clients)||void 0===t||null===(n=t.client_name)||void 0===n?void 0:n.toLowerCase().includes(e))})},[f,i]),B=(0,t.useCallback)(e=>{S(e);const i=e.reduce((e,i)=>e+(i.unread_messages_count||0),0);p(e=>e.map(e=>e.id.toString()===g?(0,w.A)((0,w.A)({},e),{},{unread_messages_count:i}):e))},[g]);(0,t.useMemo)(()=>U.map(e=>{var i,s;return{key:e.id.toString(),label:(0,R.jsx)(N.A,{count:e.unread_messages_count,offset:[10,0],size:"small",children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),(0,R.jsx)(H,{ellipsis:!0,style:{maxWidth:120},children:e.destination_name})]})})}}),[U]);return s?(0,R.jsx)("div",{className:"h-100 d-flex flex-column bg-white",children:y?(0,R.jsx)("div",{className:"p-5 text-center",children:(0,R.jsx)(k.A,{})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{className:"px-2 px-md-3 border-bottom d-flex ".concat(window.innerWidth<768?"flex-column gap-2 py-2":"align-items-center justify-content-end gap-3"," bg-light bg-opacity-10 shadow-sm"),children:[window.innerWidth<768&&(0,R.jsx)(u.A,{value:g,onChange:v,className:"w-100",size:"middle",placeholder:"Select Destination",children:U.map(e=>{var i,s;return(0,R.jsx)(u.A.Option,{value:e.id.toString(),children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),e.destination_name]})},e.id.toString())})}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 ".concat(window.innerWidth<768?"w-100 justify-content-between":"py-2"),children:[(0,R.jsx)(x.Ay,{type:"primary",size:"small",icon:(0,R.jsx)(a.OiG,{}),onClick:r,className:"flex-shrink-0",children:m("Compose","Nouveau")}),(0,R.jsx)(u.A,{value:b,onChange:A,style:{width:window.innerWidth<768?"100%":150},variant:window.innerWidth<768?"outlined":"borderless",className:"fw-bold",options:[{value:"inbox",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.opL,{className:"text-primary"})," ",m("header.inbox","Bo\xeete de r\xe9ception")]})},{value:"sent",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.Cer,{className:"text-primary"})," ",m("header.sentMessages","Messages envoy\xe9s")]})}]})]})]}),(0,R.jsxs)(V,{className:"flex-grow-1 overflow-hidden position-relative",children:[P&&(0,R.jsx)("div",{className:"position-absolute w-100 h-100 d-flex justify-content-center align-items-center bg-white bg-opacity-75 z-index-1",style:{zIndex:5},children:(0,R.jsx)(k.A,{tip:"Chargement des e-mails..."})}),(0,R.jsx)("div",{className:"h-100",children:E||window.innerWidth>=768?(0,R.jsx)(T.A,{meetingId:E,meetingsData:C,onMeetingsUpdate:B,isOutlook:!0,onLoadMore:M,hasMore:z.current_page<z.last_page,userData:n,folder:b,searchTerm:i,missionsData:U,selectedMissionId:g,onMissionSelect:v,forceOpenMeetingId:d}):(0,R.jsx)("div",{className:"p-5 text-center text-muted",children:"Aucun message trouv\xe9"})})]})]})}):null},{Text:U}=d.A,{Content:B}=L.A,F=e=>{let{searchTerm:i,isActive:s,userData:n,refreshTrigger:o,onShowCompose:r,openMeetingId:d}=e;const[m]=(0,l.Bd)("global"),[f,p]=(0,t.useState)([]),[g,v]=(0,t.useState)(null),[y,j]=(0,t.useState)(!0),[b,A]=(0,t.useState)("inbox"),_=(0,t.useCallback)((e,s)=>(0,I.re)(e,s,b,i),[b,i]),{meetings:C,setMeetings:S,activeMeeting:E,loading:P,pagination:z,handleLoadMore:M,refetch:L}=D(_,g,s,!!i),H=(0,t.useCallback)(async()=>{try{var e,i;const s=0===(null===n||void 0===n||null===(e=n.gmail_suite)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.first_sync)?"first_sync=true":"sync=true",t=await(0,I.$T)(s),l=(null===t||void 0===t?void 0:t.data)||[];p(l),l.length>0&&!g&&v(l[0].id.toString())}catch(s){console.error(s)}finally{j(!1)}},[n]);(0,t.useEffect)(()=>
1{if(s){H();const e=setInterval(H,3e4);return()=>clearInterval(e)}},[s,H,o]),(0,t.useEffect)(()=>{if(!s||null===n||void 0===n||!n.id)return;const e=(0,O.T)().subscribe("user.".concat(n.id)),i=()=>{H(),L&&L()};return e.bind("discussion.mail-received",i),()=>e.unbind("discussion.mail-received",i)},[s,null===n||void 0===n?void 0:n.id,H,L]);const V=(0,t.useMemo)(()=>{if(!i)return f;const e=i.toLowerCase();return f.filter(i=>{var s,t,n;return(null===(s=i.destination_name)||void 0===s?void 0:s.toLowerCase().includes(e))||(null===(t=i.clients)||void 0===t||null===(n=t.client_name)||void 0===n?void 0:n.toLowerCase().includes(e))})},[f,i]),W=(0,t.useCallback)(e=>{S(e);const i=e.reduce((e,i)=>e+(i.unread_messages_count||0),0);p(e=>e.map(e=>e.id.toString()===g?(0,w.A)((0,w.A)({},e),{},{unread_messages_count:i}):e))},[g]);(0,t.useMemo)(()=>V.map(e=>{var i,s;return{key:e.id.toString(),label:(0,R.jsx)(N.A,{count:e.unread_messages_count,offset:[10,0],size:"small",children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),(0,R.jsx)(U,{ellipsis:!0,style:{maxWidth:120},children:e.destination_name})]})})}}),[V]);return s?(0,R.jsx)("div",{className:"h-100 d-flex flex-column bg-white",children:y?(0,R.jsx)("div",{className:"p-5 text-center",children:(0,R.jsx)(k.A,{})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{className:"px-2 px-md-3 border-bottom d-flex ".concat(window.innerWidth<768?"flex-column gap-2 py-2":"align-items-center justify-content-end gap-3"," bg-light bg-opacity-10 shadow-sm"),children:[window.innerWidth<768&&(0,R.jsx)(u.A,{value:g,onChange:v,className:"w-100",size:"middle",placeholder:"Select Destination",children:V.map(e=>{var i,s;return(0,R.jsx)(u.A.Option,{value:e.id.toString(),children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),e.destination_name]})},e.id.toString())})}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 ".concat(window.innerWidth<768?"w-100 justify-content-between":"py-2"),children:[(0,R.jsx)(x.Ay,{type:"primary",size:"small",icon:(0,R.jsx)(a.OiG,{}),onClick:r,className:"flex-shrink-0",children:m("Compose","Nouveau")}),(0,R.jsx)(u.A,{value:b,onChange:A,style:{width:window.innerWidth<768?"100%":150},variant:window.innerWidth<768?"outlined":"borderless",className:"fw-bold",options:[{value:"inbox",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.opL,{className:"text-primary"})," ",m("header.inbox","Bo\xeete de r\xe9ception")]})},{value:"sent",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.Cer,{className:"text-primary"})," ",m("header.sentMessages","Messages envoy\xe9s")]})}]})]})]}),(0,R.jsxs)(B,{className:"flex-grow-1 overflow-hidden position-relative",children:[P&&(0,R.jsx)("div",{className:"position-absolute w-100 h-100 d-flex justify-content-center align-items-center bg-white bg-opacity-75 z-index-1",style:{zIndex:5},children:(0,R.jsx)(k.A,{tip:"Chargement des e-mails..."})}),(0,R.jsx)("div",{className:"h-100",children:E||window.innerWidth>=768?(0,R.jsx)(T.A,{meetingId:E,meetingsData:C,onMeetingsUpdate:W,isGmail:!0,onLoadMore:M,hasMore:z.current_page<z.last_page,userData:n,folder:b,searchTerm:i,missionsData:V,selectedMissionId:g,onMissionSelect:v,forceOpenMeetingId:d}):(0,R.jsx)("div",{className:"p-5 text-center text-muted",children:"Aucun message trouv\xe9"})})]})]})}):null},{Text:G}=d.A,{Content:Y}=L.A,K=e=>{let{searchTerm:i,isActive:s,userData:n,refreshTrigger:o,refreshUser:r,onShowCompose:d,openMeetingId:m}=e;const[f]=(0,l.Bd)("global"),[p,g]=(0,t.useState)([]),[v,y]=(0,t.useState)(null),[j,b]=(0,t.useState)(!0),[A,_]=(0,t.useState)("inbox"),w=(0,t.useCallback)((e,s)=>(0,I.j7)(e,s,A,i),[A,i]),{meetings:C,setMeetings:S,activeMeeting:E,loading:P,pagination:z,handleLoadMore:M,refetch:L}=D(w,v,s,!!i),H=(0,t.useCallback)(async()=>{try{var e,i;const s=0===(null===n||void 0===n||null===(e=n.ionos_links)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.first_sync)?"first_sync=true":"sync=true",t=await(0,I.xD)(s),l=(null===t||void 0===t?void 0:t.data)||[];g(l),l.length>0&&!v&&y(l[0].id.toString())}catch(s){console.error(s)}finally{b(!1)}},[n]);(0,t.useEffect)(()=>{s&&r()},[s,r]),(0,t.useEffect)(()=>
1{if(s){H();const e=setInterval(H,3e4);return()=>clearInterval(e)}},[s,H,o]),(0,t.useEffect)(()=>{if(!s||null===n||void 0===n||!n.id)return;const e=(0,O.T)().subscribe("user.".concat(n.id)),i=()=>{H(),L&&L()};return e.bind("discussion.mail-received",i),()=>e.unbind("discussion.mail-received",i)},[s,null===n||void 0===n?void 0:n.id,H,L]);const V=(0,t.useMemo)(()=>{if(!i)return p;const e=i.toLowerCase();return p.filter(i=>{var s,t,n;return(null===(s=i.destination_name)||void 0===s?void 0:s.toLowerCase().includes(e))||(null===(t=i.clients)||void 0===t||null===(n=t.client_name)||void 0===n?void 0:n.toLowerCase().includes(e))})},[p,i]);(0,t.useMemo)(()=>V.map(e=>{var i,s;return{key:e.id.toString(),label:(0,R.jsx)(N.A,{count:e.unread_messages_count,offset:[10,0],size:"small",children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),(0,R.jsx)(G,{ellipsis:!0,style:{maxWidth:120},children:e.destination_name})]})})}}),[V]);return s?(0,R.jsx)("div",{className:"h-100 d-flex flex-column bg-white",children:j?(0,R.jsx)("div",{className:"p-5 text-center",children:(0,R.jsx)(k.A,{})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{className:"px-2 px-md-3 border-bottom d-flex ".concat(window.innerWidth<768?"flex-column gap-2 py-2":"align-items-center justify-content-end gap-3"," bg-light bg-opacity-10 shadow-sm"),children:[window.innerWidth<768&&(0,R.jsx)(u.A,{value:v,onChange:y,className:"w-100",size:"middle",placeholder:"Select Destination",children:V.map(e=>{var i,s;return(0,R.jsx)(u.A.Option,{value:e.id.toString(),children:(0,R.jsxs)(c.A,{children:[null!==(i=e.clients)&&void 0!==i&&i.client_logo?(0,R.jsx)(h.A,{size:"small",src:e.clients.client_logo}):(0,R.jsx)(h.A,{size:"small",children:null===(s=e.destination_name)||void 0===s?void 0:s.charAt(0)}),e.destination_name]})},e.id.toString())})}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 ".concat(window.innerWidth<768?"w-100 justify-content-between":"py-2"),children:[(0,R.jsx)(x.Ay,{type:"primary",size:"small",icon:(0,R.jsx)(a.OiG,{}),onClick:d,className:"flex-shrink-0",children:f("Compose","Nouveau")}),(0,R.jsx)(u.A,{value:A,onChange:_,style:{width:window.innerWidth<768?"100%":150},variant:window.innerWidth<768?"outlined":"borderless",className:"fw-bold",options:[{value:"inbox",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.opL,{className:"text-primary"})," ",f("header.inbox","Bo\xeete de r\xe9ception")]})},{value:"sent",label:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(a.Cer,{className:"text-primary"})," ",f("header.sentMessages","Messages envoy\xe9s")]})}]})]})]}),(0,R.jsxs)(Y,{className:"flex-grow-1 overflow-hidden position-relative",children:[P&&(0,R.jsx)("div",{className:"position-absolute w-100 h-100 d-flex justify-content-center align-items-center bg-white bg-opacity-75 z-index-1",style:{zIndex:5},children:(0,R.jsx)(k.A,{tip:"Chargement des e-mails..."})}),(0,R.jsx)("div",{className:"h-100",children:E||window.innerWidth>=768?(0,R.jsx)(T.A,{meetingId:E,meetingsData:C,onMeetingsUpdate:S,isIonos:!0,onLoadMore:M,hasMore:z.current_page<z.last_page,userData:n,folder:A,searchTerm:i,missionsData:V,selectedMissionId:v,onMissionSelect:y,forceOpenMeetingId:m}):(0,R.jsx)("div",{className:"p-5 text-center text-muted",children:"Aucun message trouv\xe9"})})]})]})}):null};var X=s(9906);const{Text:Z}=d.A;const J=function(e){let{selectedMoment:i,isCollapsed:s=!1}=e;const t=null===i||void 0===i?void 0:i.participants,n=[...Array.isArray(t)?t:t?[t]:[],...(null===i||void 0===i?void 0:i.user_with_participants)||[]].reduce((e,i)=>{const s=i.email||i.id;return s&&!e.find(e=>(e.email||e.id)===s)&&e.push(i),e},[]);if(!n.length)return(0,R.jsx)("div",{className:"p-4 text-center",style:{color:"#8c8c8c"},children:!s&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(r.IFv,{size:28,style:{opacity:.25,marginBottom:8}}),(0,R.jsx)(Z,{type:"secondary",className:"d-block",style:{fontSize:"12px"},children:"S\xe9lectionnez une conversation"})]})});const l=(e,i)=>{const t=(e=>{const i=e.participant_image||e.image;return i?i.startsWith("http")?i:"".concat(j.SD,"/").concat(i.replace(/^\//,"")):null})(e),n=e.full_name||e.name||"Utilisateur",l=e.post||e.role||e.email||"",o=e.email||"",r=e.isOrganizer||0===i;return(0,R.jsxs)("div",{className:"p-2 d-flex align-items-center gap-3 ".concat(s?"justify-content-center":""),style:{padding:"10px 14px",transition:"background 0.15s",borderRadius:6,cursor:"default"},onMouseEnter:e=>e.currentTarget.style.background="#fafafa",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,R.jsx)(N.A,{count:r?(0,R.jsx)(a.gt3,{style:{color:"#fadb14",fontSize:"10px"}}):0,offset:[-2,s?28:36],children:(0,R.jsx)(h.A,{size:s?"small":"large",src:t,style:{border:r?"2px solid #1890ff":"1px solid #e9ecef",backgroundColor:"#e6f7ff",color:"#1890ff",flexShrink:0},children:n.charAt(0).toUpperCase()})}),!s&&(0,R.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(Z,{strong:!0,ellipsis:!0,style:{fontSize:"13px",color:"#1a1a1a"},children:n}),r&&(0,R.jsx)(N.A,{status:"success",text:(0,R.jsx)(Z,{type:"success",style:{fontSize:"10px",fontWeight:600},children:"Org"})})]}),l&&(0,R.jsx)(Z,{type:"secondary",ellipsis:!0,className:"d-block",style:{fontSize:"11px",marginTop:1},children:l}),o&&l!==o&&(0,R.jsx)(Z,{type:"secondary",ellipsis:!0,className:"d-block",style:{fontSize:"10px",color:"#aaa",marginTop:1},children:o})]})]},e.email||e.id||i)};return(0,R.jsxs)("div",{className:"h-100 bg-white",children:[!s&&(0,R.jsx)("div",{className:"px-3 py-2 border-bottom",style:{background:"#fafafa"},children:(0,R.jsxs)(Z,{type:"secondary",strong:!0,style:{fontSize:"11px",letterSpacing:"0.05em"},children:["PARTICIPANTS (",n.length,")"]})}),(0,R.jsx)("div",{className:"overflow-auto",style:{height:s?"100%":"calc(100% - 38px)"},children:n.map((e,i)=>l(e,i))})]})},{Sider:q,Content:Q}=L.A,{Text:$,Title:ee}=d.A,ie=e=>{if(!e)return"";const i=S()(e),s=S()();return i.isSame(s,"day")?i.format("HH:mm"):i.isSame(s.clone().subtract(1,"day"),"day")?"Hier":i.format("DD/MM")},se=e=>{var i;let{item:s,isSelected:t,onClick:n}=e;const l=s.title||"Conversation",o=(null===s||void 0===s||null===(i=s.destination)||void 0===i?void 0:i.destination_name)||"Chatbot";return(0,R.jsxs)("div",{onClick:n,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&n(),style:{margin:"6px 10px",padding:"12px 14px",borderRadius:"10px",backgroundColor:t?"#f0f7ff":"#fff",border:t?"1px solid #1890ff":"1px solid #f0f
10f0",boxShadow:t?"0 4px 12px rgba(24,144,255,0.1)":"0 1px 4px rgba(0,0,0,0.03)",transition:"all 0.2s ease",position:"relative",cursor:"pointer"},className:t?"":"chatbot-list-item",children:[t&&(0,R.jsx)("div",{style:{position:"absolute",left:0,top:"20%",bottom:"20%",width:"3px",backgroundColor:"#1890ff",borderRadius:"0 4px 4px 0"}}),(0,R.jsxs)("div",{className:"d-flex gap-3 align-items-start w-100 overflow-hidden",children:[(0,R.jsx)(h.A,{size:34,icon:(0,R.jsx)(r.IFv,{size:16}),style:{backgroundColor:t?"#1890ff":"#e6f7ff",color:t?"#fff":"#1890ff",flexShrink:0}}),(0,R.jsxs)("div",{className:"flex-grow-1 overflow-hidden",style:{minWidth:0},children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-start gap-1 mb-1",children:[(0,R.jsx)($,{strong:!0,ellipsis:!0,style:{fontSize:"13px",fontWeight:600,color:t?"#1890ff":"#1a1a1a",flex:1},children:l}),(0,R.jsx)($,{type:"secondary",style:{fontSize:"10px",whiteSpace:"nowrap",marginTop:2},children:ie(s.date||s.updated_at)})]}),(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,R.jsx)($,{type:"secondary",ellipsis:!0,style:{fontSize:"11px",flex:1},children:o}),s.unread_messages_count>0&&(0,R.jsx)(N.A,{count:s.unread_messages_count,size:"small",style:{backgroundColor:"#1890ff",marginLeft:6,flexShrink:0}})]})]})]})]})},te=e=>{var i,s,t;let{message:n}=e;const l="bot"===(null===n||void 0===n||null===(i=n.sender)||void 0===i?void 0:i.type),o=(null===n||void 0===n||null===(s=n.sender)||void 0===s?void 0:s.name)||(l?"Assistant":"User"),a=null===n||void 0===n||null===(t=n.sender)||void 0===t?void 0:t.image,r=a?a.startsWith("http")?a:"".concat(j.SD,"/").concat(a):null,d=o.split(" ").filter(Boolean).map(e=>e[0]).join("").slice(0,2).toUpperCase(),c=n.created_at?S().utc(n.created_at).local().format("DD/MM/YYYY HH:mm"):"";return(0,R.jsx)("div",{className:"d-flex justify-content-start",style:{width:"100%",overflow:"hidden",marginBottom:14},children:(0,R.jsxs)("div",{className:"d-flex gap-2 flex-row",style:{maxWidth:"85%",minWidth:0,overflow:"hidden",alignItems:"flex-start"},children:[(0,R.jsx)("div",{style:{width:30,flexShrink:0,alignSelf:"flex-start"},children:(0,R.jsx)(h.A,{size:"small",src:r,className:"shadow-sm",children:d})}),(0,R.jsxs)("div",{className:"d-flex flex-column align-items-start",style:{minWidth:0,overflow:"hidden",flex:1},children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)($,{strong:!0,style:{fontSize:"12px",color:l?"#1890ff":"#262626",whiteSpace:"nowrap"},children:o}),(0,R.jsx)($,{type:"secondary",style:{fontSize:"10px",whiteSpace:"nowrap"},children:c})]}),(0,R.jsxs)("div",{className:"p-3 rounded-4 shadow-sm border",style:{lineHeight:"1.5",fontSize:"14px",position:"relative",minWidth:"60px",maxWidth:"100%",overflow:"hidden",wordBreak:"break-word",overflowWrap:"break-word",backgroundColor:l?"#e6f7ff":"#fff",borderColor:l?"#91d5ff":"#e8e8e8"},children:[(0,R.jsx)("div",{dangerouslySetInnerHTML:{__html:n.message},className:"text-dark",style:{overflowX:"auto",maxWidth:"100%",wordBreak:"break-word",overflowWrap:"break-word"}}),(0,R.jsx)("div",{className:"text-end",style:{marginTop:"4px",opacity:.5},children:(0,R.jsx)($,{type:"secondary",style:{fontSize:"9px"},children:c})})]})]})]})})},ne=e=>{let{meetingsData:i,destination:s}=e;const[n,o]=(0,t.useState)(null),[d,f]=(0,t.useState)([]),[p,v]=(0,t.useState)(!1),[y,b]=(0,t.useState)(!1),[A,_]=(0,t.useState)(window.innerWidth<768),[w,C]=(0,t.useState)(!1),S=(0,t.useRef)(null),[E]=(0,l.Bd)("global");(0,t.useEffect)(()=>{const e=()=>_(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,t.useEffect)(()=>{null!==n&&void 0!==n&&n.id&&T(n.id)},[null===n||void 0===n?void 0:n.id]),(0,t.useEffect)(()=>{var e;null===(e=S.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[d]);const T=(0,t.useCallback)(async e=>{v(!0),f([]);try{var i,s;const t=X.A.get("token"),n=await g.A.get("".concat(j.JR,"/chatbot_conversation_logs/").concat(e),{headers:{Authorization:"Bearer ".concat(t)}});f((null===(i=n.data)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.logs)||[])}catch(t){console.error(t),f([])}finally{v(!1)}},[]),I=()=>{b(!1),o(null),f([])},P=i||[];var z;return y?(0,R.jsxs)(L.A,{className:"position-fixed top-0 start-0 w-100 h-100 bg-white",style:{zIndex:1e4,overflow:"hidden",height:"100dvh"},children:[(0,R.jsxs)("div",{style:{width:A?"100%":"300px",flex:A?"0 0 auto":"0 0 300px",flexShrink:0,display:A&&n?"none":"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRight:"1px solid #f0f
10f0",backgroundColor:"#fff"},children:[(0,R.jsxs)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"linear-gradient(to right, #fafafa, #fff)"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:30,height:30,borderRadius:8,backgroundColor:"#e6f7ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.w_X,{color:"#1890ff",size:14})}),(0,R.jsx)($,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:"MOMENTS"})]}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(N.A,{count:P.length,showZero:!0,color:"#1890ff"}),(0,R.jsx)(x.Ay,{type:"text",size:"small",icon:(0,R.jsx)(a.QCr,{size:12}),onClick:I})]})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0},children:P.map(e=>(0,R.jsx)(se,{item:e,isSelected:(null===n||void 0===n?void 0:n.id)===e.id,onClick:()=>o(e)},e.id))})]}),(0,R.jsxs)(Q,{className:"d-flex flex-column h-100 overflow-hidden bg-white ".concat(A&&!n?"d-none":""),children:[(0,R.jsxs)("div",{style:{flexShrink:0,zIndex:10,display:"flex",alignItems:"center",padding:A?"8px 12px":"12px 16px",gap:8,overflow:"hidden",borderBottom:"1px solid #f0f0f0",boxShadow:"0 1px 4px rgba(0,0,0,0.06)"},children:[(0,R.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[A&&n&&(0,R.jsx)(x.Ay,{type:"text",icon:(0,R.jsx)(a._Jj,{}),style:{flexShrink:0},onClick:I}),(0,R.jsx)(h.A,{icon:(0,R.jsx)(r.IFv,{}),size:A?36:44,style:{backgroundColor:"#1890ff",flexShrink:0,boxShadow:"0 4px 12px rgba(24,144,255,0.2)"}}),(0,R.jsxs)("div",{style:{minWidth:0,overflow:"hidden"},children:[(0,R.jsx)(ee,{level:5,className:"m-0",ellipsis:{tooltip:(null===n||void 0===n?void 0:n.title)||"Chatbot"},style:{marginBottom:0,fontSize:A?"14px":"16px",fontWeight:700},children:(null===n||void 0===n?void 0:n.title)||"Chatbot"}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(N.A,{status:"success"}),(0,R.jsx)($,{type:"secondary",style:{fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null===n||void 0===n||null===(z=n.destination)||void 0===z?void 0:z.destination_name)||"Conversation active"})]})]})]}),(0,R.jsxs)(c.A,{style:{flexShrink:0},children:[(0,R.jsx)(m.A,{title:"Rafra\xeechir",children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.KP4,{size:13,className:"text-muted"}),onClick:()=>(null===n||void 0===n?void 0:n.id)&&T(n.id),loading:p})}),(0,R.jsx)(m.A,{title:"Fermer",children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.Wsx,{size:13,className:"text-muted"}),onClick:I})})]})]}),(0,R.jsx)("div",{className:"flex-grow-1 p-2 p-md-4",style:{overflowY:"auto",overflowX:"hidden",scrollBehavior:"smooth",backgroundColor:"#fafafa"},children:n?p?(0,R.jsx)("div",{className:"h-100 d-flex align-items-center justify-content-center",children:(0,R.jsx)(k.A,{size:"large",tip:"Chargement..."})}):d.length>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"d-flex flex-column",children:d.map(e=>(0,R.jsx)(te,{message:e},e.id))}),(0,R.jsx)("div",{ref:S})]}):(0,R.jsxs)("div",{className:"h-100 d-flex flex-column align-items-center justify-content-center text-muted opacity-50",children:[(0,R.jsx)(a.y8Q,{size:48,className:"mb-3"}),(0,R.jsx)($,{children:"Aucun message pour cette conversation"})]}):(0,R.jsxs)("div",{className:"h-100 d-flex flex-column align-items-center justify-content-center text-muted opacity-50",children:[(0,R.jsx)(a.uN,{size:48,className:"mb-3"}),(0,R.jsx)($,{children:"S\xe9lectionnez une conversation pour commencer"})]})})]}),(0,R.jsx)(q,{width:w?70:260,theme:"light",className:"border-start d-none d-lg-block",style:{overflow:"hidden",transition:"width 0.15s ease"},children:(0,R.jsxs)("div",{className:"h-100 d-flex flex-column overflow-hidden",children:[(0,R.jsxs)("div",{className:"border-bottom d-flex ".concat(w?"justify-content-center":"justify-content-between"," align-items-center"),style:{flexShrink:0,padding:"16px",background:"linear-gradient(to left, #fafafa, #fff)"},children:[!w&&(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:30,height:30,borderRadius:8,backgroundColor:"#f6ffed",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.YXz,{color:"#52c41a",size:14})}),(0,R.jsx)($,{strong:!0,style:{fontSize:"13px",color:"#262626"},children:"PARTICIPANTS"})]}),(0,R.jsx)(x.Ay,{type:"text",icon:w?(0,R.jsx)(a.YXz,{}):(0,R.jsx)(a.QCr,{}),onClick:()=>C(!w),style:{borderRadius:8}})]}),(0,R.jsx)("div",{className:"flex-grow-1",style:{overflowY:"auto"},children:!w&&(0,R.jsx)(J,{selectedMoment:n,isCollapsed:w})})]})}),(0,R.jsx)("style",{children:"\n .chatbot-list-item:hover {\n background-color: #fafafa !important;\n border-color: #d9d9d9 !important;\n transform: translateY(-1px);\n box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;\n }\n "})]}):(0,R.jsxs)("div",{className:"h-100 bg-white ".concat(A?"d-flex flex-column":"d-flex"),style:{overflow:"hidden"},children:[A?(0,R.jsxs)("div",{className:"p-3 border-bottom bg-light bg-opacity-10",children:[(0,R.jsx)($,{strong:!0,type:"secondary",style:{fontSize:"11px",display:"block",marginBottom:8},children:"MISSIONS"}),(0,R.jsx)(u.A,{className:"w-100",value:"chatbot",style:{height:"44px"},dropdownStyle:{borderRadius:"8px"},children:(0,R.jsx)(u.A.Option,{value:"chatbot",children:(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(h.A,{size:"small",icon:(0,R.jsx)(r.IFv,{}),style:{backgroundColor:"#1890ff"}}),(0,R.jsx)($,{strong:!0,style:{color:"#1890ff"},children:(null===s||void 0===s?void 0:s.destination_name)||"Chatbot"})]})})})]}):(0,R.jsxs)("div",{style:{width:"300px",flexShrink:0,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRight:"1px solid #f0f
10f0",backgroundColor:"#fff"},children:[(0,R.jsxs)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"linear-gradient(to right, #fafafa, #fff)"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:30,height:30,borderRadius:8,backgroundColor:"#e6f7ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.svy,{color:"#1890ff",size:14})}),(0,R.jsx)($,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:"MISSIONS"})]}),(0,R.jsx)(N.A,{count:s?1:0,showZero:!0,color:"#1890ff"})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"10px"},children:s?(0,R.jsxs)("div",{style:{padding:"14px",borderRadius:"10px",backgroundColor:"#f0f7ff",border:"1px solid #1890ff",boxShadow:"0 4px 12px rgba(24,144,255,0.1)",position:"relative"},children:[(0,R.jsx)("div",{style:{position:"absolute",left:0,top:"20%",bottom:"20%",width:"3px",backgroundColor:"#1890ff",borderRadius:"0 4px 4px 0"}}),(0,R.jsxs)("div",{className:"d-flex gap-3 align-items-center",children:[(0,R.jsx)(h.A,{size:36,icon:(0,R.jsx)(r.IFv,{size:16}),style:{backgroundColor:"#1890ff",flexShrink:0}}),(0,R.jsxs)("div",{style:{minWidth:0},children:[(0,R.jsx)($,{strong:!0,ellipsis:!0,style:{fontSize:"13px",color:"#1890ff",display:"block"},children:s.destination_name||"Chatbot"}),(0,R.jsxs)($,{type:"secondary",style:{fontSize:"11px"},children:[P.length," conversation",1!==P.length?"s":""]})]})]})]}):(0,R.jsxs)("div",{className:"p-3 text-center text-muted",children:[(0,R.jsx)(r.IFv,{size:24,className:"mb-2 opacity-25"}),(0,R.jsx)($,{type:"secondary",className:"d-block",style:{fontSize:"12px"},children:"Aucune mission"})]})})]}),(0,R.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",backgroundColor:"#fff"},children:[(0,R.jsxs)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"#fff"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:"#52c41a"}}),(0,R.jsx)($,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:"MOMENTS"})]}),(0,R.jsx)(N.A,{count:P.length,showZero:!0,color:"#1890ff"})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:A?"8px 0":0},children:0===P.length?(0,R.jsxs)("div",{className:"p-5 text-center text-muted",children:[(0,R.jsx)(a.y8Q,{size:32,className:"mb-3 opacity-25"}),(0,R.jsx)($,{type:"secondary",children:"Aucune conversation trouv\xe9e"})]}):P.map(e=>(0,R.jsx)(se,{item:e,isSelected:!1,onClick:()=>(o(e),void b(!0))},e.id))})]}),(0,R.jsx)("style",{children:"\n .chatbot-list-item:hover {\n background-color: #fafafa !important;\n border-color: #d9d9d9 !important;\n transform: translateY(-1px);\n box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;\n }\n "})]})},le=e=>{var i;let{isActive:s}=e;const[n,l]=(0,t.useState)(null),[o,a]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{if(!s)return;(async()=>{try{var e;const i=JSON.parse(X.A.get("user")),s=await(0,I.oE)(null===i||void 0===i||null===(e=i.enterprise)||void 0===e?void 0:e.id);l(null===s||void 0===s?void 0:s.data)}catch(i){console.error("Error fetching chatbot data:",i)}finally{a(!1)}})()},[s]),s?(0,R.jsx)("div",{className:"h-100 d-flex flex-column bg-white",children:o?(0,R.jsx)("div",{className:"p-5 text-center",children:(0,R.jsx)(k.A,{size:"large",tip:"Chargement de l'assistant..."})}):(null===n||void 0===n||null===(i=n.conversations)||void 0===i?void 0:i.length)>0?(0,R.jsx)(ne,{meetingsData:n.conversations,destination:n.destination}):(0,R.jsx)("div",{className:"p-5 text-center text-muted",children:"Aucune conversation trouv\xe9e"})}):null};var oe=s(89073),ae=s(76399);const{Sider:re,Content:de}=L.A,{Text:ce,Title:he}=d.A,xe=(e,i)=>{if(!e)return"";const s=S()(e),t=S()();return s.isSame(t,"day")?s.format("HH:mm"):s.isSame(t.clone().subtract(1,"day"),"day")?i?i("completedMeetings.filters.YESTE
1RDAY","Yesterday"):"Hier":s.format("DD/MM HH:mm")},me=e=>{let{item:i,isSelected:s,onClick:t,t:n}=e;return(0,R.jsxs)("div",{onClick:t,role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.key&&t(),style:{margin:"6px 10px",padding:"12px 14px",borderRadius:"10px",backgroundColor:s?"#f0f7ff":"#fff",border:s?"1px solid #1890ff":"1px solid #f0f0f0",boxShadow:s?"0 4px 12px rgba(24,144,255,0.1)":"0 1px 4px rgba(0,0,0,0.03)",transition:"all 0.2s ease",position:"relative",cursor:"pointer"},className:s?"":"search-list-item",children:[s&&(0,R.jsx)("div",{style:{position:"absolute",left:0,top:"20%",bottom:"20%",width:"3px",backgroundColor:"#1890ff",borderRadius:"0 4px 4px 0"}}),(0,R.jsxs)("div",{className:"d-flex gap-3 align-items-start w-100 overflow-hidden",children:[(0,R.jsx)(h.A,{size:34,icon:(0,R.jsx)(a.KSO,{size:14}),style:{backgroundColor:s?"#1890ff":"#e6f7ff",color:s?"#fff":"#1890ff",flexShrink:0}}),(0,R.jsxs)("div",{className:"flex-grow-1 overflow-hidden",style:{minWidth:0},children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-start gap-1 mb-1",children:[(0,R.jsx)(ce,{strong:!0,ellipsis:!0,style:{fontSize:"13px",fontWeight:600,color:s?"#1890ff":"#1a1a1a",flex:1},children:i.question}),(0,R.jsx)(ce,{type:"secondary",style:{fontSize:"10px",whiteSpace:"nowrap",marginTop:2},children:xe(i.created_at,n)})]}),(0,R.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:(0,R.jsxs)(ce,{type:"secondary",ellipsis:!0,style:{fontSize:"11px",flex:1},children:[i.country||(n?n("searches.unknown","Unknown"):"Inconnu")," ",i.ip_address?"(".concat(i.ip_address,")"):""]})})]})]})]})},ue=e=>{let{isActive:i}=e;const{t:s}=(0,l.Bd)("global"),[n,o]=(0,t.useState)([]),[r,d]=(0,t.useState)(!0),[f,p]=(0,t.useState)(!1),[v,y]=(0,t.useState)(null),[b,A]=(0,t.useState)(!1),[_,w]=(0,t.useState)(window.innerWidth<768),C=(0,t.useRef)(null),[E,T]=(0,t.useState)(1),[I,P]=(0,t.useState)(0),[z,M]=(0,t.useState)(15),[D,O]=(0,t.useState)(!0),[H,V]=(0,t.useState)(!1);(0,t.useEffect)(()=>{const e=()=>w(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const W=(0,t.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s?V(!0):i?p(!0):d(!0);try{const i=await g.A.get("".concat(j.JR,"/google-search-history?page=").concat(e));if(i.data&&i.data.success){var t,n,l,a,r,c;const d=(null===(t=i.data.data)||void 0===t?void 0:t.data)||[];if(o(s?e=>[...e,...d]:d),T((null===(n=i.data.data)||void 0===n?void 0:n.current_page)||e),P((null===(l=i.data.data)||void 0===l?void 0:l.total)||0),M((null===(a=i.data.data)||void 0===a?void 0:a.per_page)||15),O(((null===(r=i.data.data)||void 0===r?void 0:r.current_page)||e)<((null===(c=i.data.data)||void 0===c?void 0:c.last_page)||1)),v){const e=d.find(e=>e.id===v.id);e&&y(e)}}}catch(h){console.error("Error fetching google search history:",h)}finally{d(!1),p(!1),V(!1)}},[v]);(0,t.useEffect)(()=>{i&&W(1)},[i]),(0,t.useEffect)(()=>{var e;null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[v]);const U=()=>{!D||r||H||f||W(E+1,!0,!0)},B=e=>{y(e),A(!0)},F=()=>{A(!1),y(null)};if(!i)return null;if(r&&0===n.length)return(0,R.jsx)("div",{className:"h-100 d-flex align-items-center justify-content-center bg-white",style:{minHeight:"300px"},children:(0,R.jsx)(k.A,{size:"large",tip:s("searches.loading","Loading search history...")})});const G=()=>{if(!v)return null;const e=v.created_at?S()(v.created_at).format("DD/MM/YYYY HH:mm"):"";let i=[];if(Array.isArray(v.answer))i=v.answer;else if("string"===typeof v.answer)try{i=JSON.parse(v.answer)}catch(t){console.error("Failed to parse answers string:",t)}return(0,R.jsxs)("div",{className:"d-flex flex-column gap-4 p-2 p-md-4",children:[(0,R.jsx)("div",{className:"d-flex justify-content-start",style:{width:"100%"},children:(0,R.jsxs)("div",{className:"d-flex gap-3 align-items-start",style:{maxWidth:"85%"},children:[(0,R.jsx)(h.A,{size:"default",style:{backgroundColor:"#8c8c8c",flexShrink:0},children:"U"}),(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)(ce,{strong:!0,style:{fontSize:"12px",color:"#262626"},children:s("searches.userLabel","User")}),(0,R.jsx)(ce,{type:"secondary",style:{fontSize:"10px"},children:e})]}),(0,R.jsxs)("div",{className:"p-3 rounded-4 shadow-sm border bg-white",style:{lineHeight:"1.5",fontSize:"14px",wordBreak:"break-word",borderColor:"#e8e8e8"},children:[(0,R.jsx)("div",{className:"fw-bold text-dark mb-2",children:s("searches.question","Question:")}),(0,R.jsx)("div",{className:"text-dark fs-5",children:v.question}),(0,R.jsx)("div",{className:"mt-3 pt-2 border-top text-muted",style:{fontSize:"11px"},children:(0,R.jsxs)("div",{className:"d-flex flex-wrap gap-3",children:[v.ip_address&&(0,R.jsxs)("span",{children:[(0,R.jsx)("strong",{children:"IP:"})," ",v.ip_address]}),v.country&&(0,R.jsxs)("span",{children:[(0,R.jsxs)("strong",{children:[s("searches.unknown","Country"),":"]})," ",v.country]}),v.user_agent&&(0,R.jsxs)("span",{className:"w-100 mt-1",children:[(0,R.jsx)("strong",{children:"Client:"})," ",v.user_agent]})]})})]})]})]})}),(0,R.jsx)("div",{className:"d-flex justify-content-start",style:{width:"100%"},children:(0,R.jsxs)("div",{className:"d-flex gap-3 align-items-start",style:{maxWidth:"90%",width:"100%"},children:[(0,R.jsx)(h.A,{size:"default",icon:(0,R.jsx)(a.KSO,{size:14}),style:{backgroundColor:"#1890ff",color:"#fff",flexShrink:0}}),(0,R.jsxs)("div",{className:"w-100",children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)(ce,{strong:!0,style:{fontSize:"12px",color:"#1890ff"},children:s("searches.assistantLabel","Search Assistant")}),(0,R.jsx)(ce,{type:"secondary",style:{fontSize:"10px"},children:e})]}),(0,R.jsxs)("div",{className:"p-3 rounded-4 shadow-sm border w-100",style:{lineHeight:"1.5",fontSize:"14px",backgroundColor:"#fcfcff",borderColor:"#91d5ff"},children:[(0,R.jsx)(ce,{className:"d-block mb-3 text-secondary",children:s("searches.resultsIntro","Here are the relevant results found for this search:")}),(0,R.jsx)("div",{className:"d-flex flex-column gap-3",children:i.length>0?i.map((e,i)=>(0,R.jsxs)(oe.A,{hoverable:!0,size:"small",className:"shadow-sm border-0 rounded-3",style:{background:"#ffffff",border:"1px solid #f0f
10f0"},bodyStyle:{padding:"16px"},children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-start flex-wrap gap-2 mb-2",children:[(0,R.jsxs)("div",{children:[(0,R.jsxs)(he,{level:5,className:"m-0 text-primary d-flex align-items-center gap-2",children:[e.title,e.gate_name&&(0,R.jsx)(ae.A,{color:"blue",className:"text-uppercase",style:{fontSize:"10px"},children:e.gate_name})]}),e.subtitle&&(0,R.jsx)(ce,{type:"secondary",className:"d-block mt-1",style:{fontSize:"12px",lineHeight:"1.3"},children:e.subtitle})]}),e.website_link&&(0,R.jsx)(x.Ay,{type:"link",icon:(0,R.jsx)(a.EQc,{size:12}),href:e.website_link,target:"_blank",rel:"noopener noreferrer",className:"p-0",children:s("searches.visitSite","Visit site")})]}),e.hero_title&&(0,R.jsxs)("div",{className:"mt-3 p-2 bg-light rounded-3",children:[(0,R.jsx)(ce,{strong:!0,className:"d-block text-dark",style:{fontSize:"13px"},children:e.hero_title}),e.hero_subtitle&&(0,R.jsx)(ce,{type:"secondary",style:{fontSize:"12px"},children:e.hero_subtitle})]}),e.hero_benefits&&e.hero_benefits.length>0&&(0,R.jsxs)("div",{className:"mt-3",children:[(0,R.jsx)(ce,{strong:!0,style:{fontSize:"12px"},children:s("searches.advantages","Benefits:")}),(0,R.jsx)("div",{className:"d-flex flex-column gap-1 mt-1",children:e.hero_benefits.map((e,i)=>(0,R.jsxs)("div",{className:"d-flex align-items-start gap-2",children:[(0,R.jsx)(a.A7C,{color:"#52c41a",size:12,className:"mt-1 flex-shrink-0"}),(0,R.jsx)(ce,{style:{fontSize:"12px"},children:e})]},i))})]}),e.features&&e.features.length>0&&(0,R.jsxs)("div",{className:"mt-3",children:[(0,R.jsx)(ce,{strong:!0,style:{fontSize:"12px"},children:s("searches.features","Features:")}),(0,R.jsx)("div",{className:"d-flex flex-wrap gap-1 mt-1",children:e.features.map((e,i)=>(0,R.jsx)(ae.A,{color:"default",className:"rounded-pill",children:e},i))})]})]},i)):(0,R.jsx)("div",{className:"text-center p-3 text-muted",children:s("searches.emptyList","No searches found")})}),v.citation&&(0,R.jsxs)("div",{className:"mt-3 pt-2 border-top d-flex align-items-center gap-2",children:[(0,R.jsx)(a.__w,{color:"#1890ff"}),(0,R.jsxs)(ce,{type:"secondary",style:{fontSize:"11px"},children:[s("searches.originalSource","Original source:")," ",(0,R.jsx)("a",{href:v.citation,target:"_blank",rel:"noopener noreferrer",children:v.citation})]})]})]})]})]})}),(0,R.jsx)("div",{ref:C})]})};return b?(0,R.jsxs)(L.A,{hasSider:!0,className:"position-fixed top-0 start-0 w-100 h-100 bg-white",style:{zIndex:1e4,overflow:"hidden",height:"100dvh",flexDirection:"row"},children:[(0,R.jsxs)("div",{style:{width:_?"100%":"320px",flex:_?"0 0 auto":"0 0 320px",flexShrink:0,display:_&&v?"none":"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRight:"1px solid #f0f0f0",backgroundColor:"#fff"},children:[(0,R.jsxs)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"linear-gradient(to right, #fafafa, #fff)"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:30,height:30,borderRadius:8,backgroundColor:"#e6f7ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.w_X,{color:"#1890ff",size:14})}),(0,R.jsx)(ce,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:s("searches.header","RECHERCHES")})]}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(N.A,{count:I,showZero:!0,color:"#1890ff"}),(0,R.jsx)(x.Ay,{type:"text",size:"small",icon:(0,R.jsx)(a.QCr,{size:12}),onClick:F})]})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0},children:n.map(e=>(0,R.jsx)(me,{item:e,isSelected:(null===v||void 0===v?void 0:v.id)===e.id,onClick:()=>y(e),t:s},e.id))}),D&&(0,R.jsx)("div",{style:{padding:"12px",borderTop:"1px solid #f0f0f0",display:"flex",justifyContent:"center",background:"#fff",flexShrink:0},children:H?(0,R.jsx)(k.A,{size:"small"}):(0,R.jsx)(x.Ay,{type:"link",onClick:U,children:s("searches.loadM
1ore","Charger plus")})})]}),(0,R.jsxs)(de,{className:"d-flex flex-column h-100 overflow-hidden bg-white ".concat(_&&!v?"d-none":""),children:[(0,R.jsxs)("div",{style:{flexShrink:0,zIndex:10,display:"flex",alignItems:"center",padding:_?"8px 12px":"12px 16px",gap:8,overflow:"hidden",borderBottom:"1px solid #f0f0f0",boxShadow:"0 1px 4px rgba(0,0,0,0.06)"},children:[(0,R.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[_&&v&&(0,R.jsx)(x.Ay,{type:"text",icon:(0,R.jsx)(a._Jj,{}),style:{flexShrink:0},onClick:F}),(0,R.jsx)(h.A,{icon:(0,R.jsx)(a.KSO,{size:14}),size:_?36:44,style:{backgroundColor:"#1890ff",color:"#fff",flexShrink:0,boxShadow:"0 4px 12px rgba(0,0,0,0.05)"}}),(0,R.jsxs)("div",{style:{minWidth:0,overflow:"hidden"},children:[(0,R.jsx)(he,{level:5,className:"m-0",ellipsis:{tooltip:(null===v||void 0===v?void 0:v.question)||s("searches.tabTitle","Searches")},style:{marginBottom:0,fontSize:_?"14px":"16px",fontWeight:700},children:(null===v||void 0===v?void 0:v.question)||s("searches.tabTitle","Searches")}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(N.A,{status:"processing"}),(0,R.jsx)(ce,{type:"secondary",style:{fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null===v||void 0===v?void 0:v.country)||"Session Active"})]})]})]}),(0,R.jsxs)(c.A,{style:{flexShrink:0},children:[(0,R.jsx)(m.A,{title:s("searches.refresh","Refresh"),children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.KP4,{size:13,className:"text-muted"}),onClick:()=>W(E,!0),loading:f})}),(0,R.jsx)(m.A,{title:s("searches.close","Close"),children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.Wsx,{size:13,className:"text-muted"}),onClick:F})})]})]}),(0,R.jsx)("div",{className:"flex-grow-1",style:{overflowY:"auto",overflowX:"hidden",scrollBehavior:"smooth",backgroundColor:"#fafafa"},children:G()})]}),(0,R.jsx)("style",{children:"\n .search-list-item:hover {\n background-color: #fafafa !important;\n border-color: #d9d9d9 !important;\n transform: translateY(-1px);\n box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;\n }\n "})]}):(0,R.jsxs)("div",{className:"h-100 bg-white ".concat(_?"d-flex flex-column":"d-flex"),style:{overflow:"hidden"},children:[_?(0,R.jsxs)("div",{className:"p-3 border-bottom bg-light bg-opacity-10",children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-2",children:[(0,R.jsx)(ce,{strong:!0,type:"secondary",style:{fontSize:"11px"},children:s("searches.header","RECHERCHES")}),(0,R.jsx)(x.Ay,{type:"text",size:"small",icon:(0,R.jsx)(a.KP4,{size:12}),onClick:()=>W(E,!0),loading:f,children:s("searches.refresh","Refresh")})]}),(0,R.jsx)(u.A,{className:"w-100",value:"",placeholder:s("searches.selectPlaceholder","Select a search..."),onChange:e=>{const i=n.find(i=>String(i.id)===String(e));i&&B(i)},style:{height:"44px"},dropdownStyle:{borderRadius:"8px"},children:n.map(e=>(0,R.jsx)(u.A.Option,{value:e.id,children:(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(h.A,{size:"small",icon:(0,R.jsx)(a.KSO,{size:10}),style:{backgroundColor:"#1890ff",color:"#fff"}}),(0,R.jsx)(ce,{ellipsis:!0,style:{flex:1},children:e.question})]})},e.id))}),D&&(0,R.jsx)("div",{style:{padding:"8px 0 0 0",display:"flex",justifyContent:"center"},children:H?(0,R.jsx)(k.A,{size:"small"}):(0,R.jsx)(x.Ay,{type:"link",onClick:U,size:"small",children:s("searches.loadM
1ore","Charger plus")})})]}):(0,R.jsxs)("div",{style:{width:"320px",flexShrink:0,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",borderRight:"1px solid #f0f0f0",backgroundColor:"#fff"},children:[(0,R.jsxs)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"linear-gradient(to right, #fafafa, #fff)"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:30,height:30,borderRadius:8,backgroundColor:"#e6f7ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.svy,{color:"#1890ff",size:14})}),(0,R.jsx)(ce,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:s("searches.header","RECHERCHES")})]}),(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2",children:[(0,R.jsx)(N.A,{count:I,showZero:!0,color:"#1890ff"}),(0,R.jsx)(m.A,{title:s("searches.refresh","Refresh"),children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.KP4,{size:12}),onClick:()=>W(E,!0),loading:f})})]})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"10px"},children:0===n.length?(0,R.jsxs)("div",{className:"p-3 text-center text-muted",children:[(0,R.jsx)(a.KSO,{size:24,className:"mb-2 opacity-25"}),(0,R.jsx)(ce,{type:"secondary",className:"d-block",style:{fontSize:"12px"},children:s("searches.emptyList","No searches found")})]}):n.map(e=>(0,R.jsx)(me,{item:e,isSelected:!1,onClick:()=>B(e),t:s},e.id))}),D&&(0,R.jsx)("div",{style:{padding:"12px",borderTop:"1px solid #f0f0f0",display:"flex",justifyContent:"center",background:"#fff",flexShrink:0},children:H?(0,R.jsx)(k.A,{size:"small"}):(0,R.jsx)(x.Ay,{type:"link",onClick:U,children:s("searches.loadM
1ore","Charger plus")})})]}),(0,R.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",backgroundColor:"#fff"},children:[(0,R.jsx)("div",{style:{padding:"16px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #f0f0f0",background:"#fff"},children:(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:"#52c41a"}}),(0,R.jsx)(ce,{strong:!0,style:{fontSize:"13px",color:"#262626",letterSpacing:"0.02em"},children:s("searches.detailsHeader","SEARCH DETAILS")})]})}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden"},children:(0,R.jsxs)("div",{className:"h-100 d-flex flex-column align-items-center justify-content-center text-muted opacity-50 p-5",children:[(0,R.jsx)(a.uN,{size:48,className:"mb-3"}),(0,R.jsx)(ce,{children:s("searches.emptyDetails","Select a search from the list to display conversation details")})]})})]}),(0,R.jsx)("style",{children:"\n .search-list-item:hover {\n background-color: #fafafa !important;\n border-color: #d9d9d9 !important;\n transform: translateY(-1px);\n box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;\n }\n "})]})};var fe=s(18205),pe=s(81097),ge=s(99472),ve=s(93751),ye=s(77466);s(64859),s(80721);const{Text:je,Title:be}=d.A,{Sider:Ae,Content:_e}=L.A,{useBreakpoint:we}=fe.Ay,Ce=[{id:"All",label:"Tous",icon:(0,R.jsx)(ve.V6P,{})},{id:"Need Response",label:"A R\xe9pondre",icon:(0,R.jsx)(ve.qjH,{})},{id:"To Do",label:"A faire",icon:(0,R.jsx)(ve.udA,{})},{id:"To Plan",label:"A planifier",icon:(0,R.jsx)(ve.a9f,{})},{id:"For Information",label:"Pour info",icon:(0,R.jsx)(ve.aUu,{})},{id:"Waiting for Response",label:"En attente de r\xe9ponse",icon:(0,R.jsx)(ve.oCe,{})},{id:"Marketing",label:"Marketing",icon:(0,R.jsx)(ve.nyV,{})},{id:"Meeting Invitation",label:"Invitation r\xe9union",icon:(0,R.jsx)(ve.XwK,{})},{id:"Notification",label:"Notifications",icon:(0,R.jsx)(ve.Bwk,{})}],Se=[{id:"All",label:"All",color:"#8c8c8c"},{id:"High",label:"High",color:"#f5222d"},{id:"Medium",label:"Medium",color:"#faad14"},{id:"Low",label:"Low",color:"#52c41a"}],ke=e=>{var i;let{message:s,t:t,onClick:n}=e;const l=Ce.find(e=>e.id===s.categoryId)||{},o=Se.find(e=>e.id===s.criticity)||{};return(0,R.jsxs)("div",{className:"card border-0 shadow-sm p-3 rounded-4 hover-shadow transition-all ".concat(s.isRead?"":"border-start border-4 border-primary"),style:{cursor:"pointer",transition:"all 0.3s"},onClick:n,children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-start mb-2 gap-2",children:[(0,R.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,R.jsxs)(c.A,{align:"center",size:8,wrap:!0,children:[o.color&&(0,R.jsx)(N.A,{color:o.color,text:(0,R.jsx)("span",{children:t("header.messagesToHandle.criticityLevels.".concat(o.id),o.label)})}),(0,R.jsx)(Ee,{meeting:s.originalMeeting,t:t}),(0,R.jsx)(je,{strong:!s.isRead,ellipsis:!0,style:{fontSize:"15px"},children:s.momentTitle}),!s.isRead&&(0,R.jsx)(N.A,{status:"processing",color:"#1890ff"})]}),(0,R.jsxs)("div",{className:"mt-1 d-flex align-items-center gap-2 flex-wrap",children:[(0,R.jsx)(je,{type:"secondary",style:{fontSize:"13px"},children:s.sender}),(0,R.jsx)(ae.A,{icon:l.icon,bordered:!1,style:{fontSize:"11px"},children:t("header.messagesToHandle.categories.".concat(l.id),l.label)})]})]}),(0,R.jsxs)("div",{className:"text-end",children:[(0,R.jsx)(je,{type:"secondary",style:{fontSize:"11px",display:"block"},children:new Date(s.date).toLocaleDateString()}),(0,R.jsx)(je,{type:"secondary",style:{fontSize:"11px"},children:new Date(s.date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),(0,R.jsx)("div",{className:"mt-2 text-muted fw-light",style:{fontSize:"13px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},dangerouslySetInnerHTML:{__html:null===(i=s.content)||void 0===i?void 0:i.replace(/<[^>]*>?/gm,"")}})]})},Ee=e=>{let{meeting:i,t:s}=e;if(!i)return null;const t=i.type;return"Conversation Outlook"===t?(0,R.jsx)(o.PMk,{color:"#0A66C2",size:20}):"Conversation IONOS"===t?(0,R.jsx)(r.L6p,{size:20,color:"#003D8F"}):"Conversation Gmail"===t?(0,R.jsx)(h.A,{size:18,src:"https://upload.wikimedia.org/wikipedia/commons/7/7e/Gmail_icon_%282020%29.svg",style:{backgroundColor:"transparent"}}):(0,R.jsx)(ve.qjH,{size:20})},Ne=e=>{var i;let{isActive:s,searchTerm:n,userData:o}=e;const a=!we().md,[r]=(0,l.Bd)("global"),[d,h]=(0,t.useState)("All"),[m,f]=(0,t.useState)("High"),[g,v]=(0,t.useState)([]),[j,b]=(0,t.useState)({}),[A,_]=(0,t.useState)(!1),[C,S]=(0,t.useState)(null),[E,P]=(0,t.useState)(!1),[z,M]=(0,t.useState)(1),[D,O]=(0,t.useState)(!0),[H,V]=(0,t.useState)(!1),[W,U]=(0,t.useState)(null),{open:B,handleCloseModal:F}=(0,y.xW)(),G=(0,t.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i?P(!0):_(!0);try{const t={user_id:(null===o||void 0===o?void 0:o.id)||X.A.get("user_id"),category:"All"===d?"All":d,periorty:m,page:e},n=await(0,I.h_)(t,e);if(n&&n.data){var s;const t=null===(s=n.data.messages)||void 0===s?void 0:s.map(e=>{const i=e.meeting,s=null===i||void 0===i?void 0:i.destination;let t="Unknown";if(null!==s&&void 0!==s&&s.destination_name){const e=s.destination_name.split("/");t=e.length>1?e[1].trim():s.destination_name}else null!==e&&void 0!==e&&e.from_email&&(t=e.from_email);return{id:null===e||void 0===e?void 0:e.id,categoryId:(null===e||void 0===e?void 0:e.category)||"Need Response",missionTitle:(null===i||void 0===i?void 0:i.objective)||"No Title",momentTitle:(null===i||void 0===i?void 0:i.title)||"Unknown Moment",sender:(null===e||void 0===e?void 0:e.from_email)||t,date:(null===e||void 0===e?void 0:e.received_date_time)||(null===e||void 0===e?void 0:e.created_at),content:null===e||void 0===e?void 0:e.message,criticity:(null===e||void 0===e?void 0:e.priority)||"Medium",meetingId:null===e||void 0===e?void 0:e.meeting_id,destinationId:null===s||void 0===s?void 0:s.id,isRead:1===(null===e||void 0===e?void 0:e.is_read)||!0===(null===e||void 0===e?void 0:e.is_read),originalMessage:e,originalMeeting:i}});v(i?e=>[...e,...t]:t),O(t.length>0),M(e),b(n.data.unseen_category_counts||{})}else i||(v([]),b({})),O(!1)}catch(t){console.error("Error fetching messages:",t)}finally{_(!1),P(!1)}},[o,d,m]);(0,t.useEffect)(()=>{s&&(M(1),O(!0),G(1,!1))},[s,d,m,G]);(0,t.useRef)();const Y=(0,t.useRef)(),K=(0,t.useCallback)(e=>{const[i]=e;i.isIntersecting&&D&&!E&&!A&&s&&G(z+1,!0)},[G,z,D,E,A,s]);(0,t.useEffect)(()=>{const e=new IntersectionObserver(K,{root:null,rootMargin:"200px",threshold:.1});return Y.current&&e.observe(Y.current),()=>{Y.current&&e.unobserve(Y.current)}},[K]);const Z=(0,t.useMemo)(()=>(g||[]).filter(e=>{var i;return("All"===d||e.categoryId===d)&&(("All"===m||e.criticity===m)&&!(n&&(null===(i=e.missionTitle)||void 0===i||!i.toLowerCase().includes(n.toLowerCase()))))}).sort((e,i)=>new Date(i.date)-new Date(e.date)),[g,d,m,n]);return s?(0,R.jsxs)(L.A,{className:"bg-white h-100",style:{overflow:"hidden"},children:[!a&&(0,R.jsxs)(Ae,{width:260,theme:"light",className:"border-end overflow-auto",children:[(0,R.jsx)("div",{className:"p-3 border-bottom bg-light bg-opacity-10",children:(0,R.jsx)(je,{strong:!0,type:"secondary",children:r("header.messagesToHandle.folder","Dossiers")})}),(0,R.jsx)("div",{className:"p-2",children:Ce.map(e=>(0,R.jsxs)(x.Ay,{type:d===e.id?"primary":"text",block:!0,className:"d-flex align-items-center justify-content-between mb-1",style:{height:"40px",textAlign:"left"},onClick:()=>{h(e.id),"All"===e.id?f("High"):f("All")},children:[(0,R.jsxs)(c.A,{children:[(0,R.jsx)("span",{className:"fs-5",children:e.icon}),(0,R.jsx)(je,{ellipsis:!0,strong:d===e.id,style:{color:d===e.id?"#fff":"inherit"},children:r("header.messagesToHandle.categories.".concat(e.id),e.label)})]}),(0,R.jsx)(N.A,{count:j[e.id]||0,style:{backgroundColor:d===e.id?"#fff":"#1890ff",color:d===e.id?"#1890ff":"#fff"},size:"small"})]},e.id))})]}),(0,R.jsx)(L.A,{className:"bg-white h-100",children:(0,R.jsxs)(_e,{className:"d-flex flex-column h-100",children:[(0,R.jsx)("div",{className:"p-3 border-bottom d-flex align-items-center justify-content-between flex-wrap gap-2",children:(0,R.jsxs)(c.A,{wrap:!0,size:[8,8],align:"center",children:[a&&(0,R.jsx)(u.A,{value:d,onChange:h,style:{width:"min(160px, 40vw)"},options:Ce.map(e=>({value:e.id,label:(0,R.jsxs)(c.A,{children:[e.icon," ",r("header.messagesToHandle.categories.".concat(e.id),e.label)]})}))}),(0,R.jsxs)(je,{strong:!0,style:{whiteSpace:"nowrap"},children:[r("header.messagesToHandle.criticity","Criticity"),":"]})," ",Se.map(e=>(0,R.jsx)(ae.A.CheckableTag,{checked:m===e.id,onChange:()=>f(e.id),style:{border:"1px solid ".concat(e.color),color:m===e.id?"#fff":e.color,backgroundColor:m===e.id?e.color:"transparent",curs
1or:"pointer"},children:r("header.messagesToHandle.criticityLevels.".concat(e.id),e.label)},e.id))]})}),(0,R.jsx)("div",{className:"p-3 p-md-4 bg-light bg-opacity-25",style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",scrollbarWidth:"thin"},children:A?(0,R.jsx)("div",{className:"d-flex justify-content-center align-items-center h-100",children:(0,R.jsx)(k.A,{size:"large",tip:"Chargement des messages..."})}):Z.length>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(pe.A,{grid:{gutter:16,xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},dataSource:Z,renderItem:e=>(0,R.jsx)(pe.A.Item,{className:"p-0 mb-3 border-0",children:(0,R.jsx)(ke,{message:e,t:r,onClick:()=>(async e=>{if(["Need Response","For Information","info","To Do","To Plan"].includes(e.categoryId)){_(!0);try{var i,s,t,n;let d=[];const c=!(null===e||void 0===e||null===(i=e.originalMessage)||void 0===i||!i.outlook_email_id),h=!(null===e||void 0===e||null===(s=e.originalMessage)||void 0===s||!s.ionos_email_id),x=!(null===e||void 0===e||null===(t=e.originalMessage)||void 0===t||!t.gmail_id);if(e.destinationId){var l,o,a;let i;i=c?await(0,I.bd)(e.destinationId):h?await(0,I.j7)(e.destinationId):x?await(0,I.re)(e.destinationId):await(0,I.dP)(e.destinationId),d=Array.isArray(null===(l=i)||void 0===l?void 0:l.data)?i.data:Array.isArray(null===(o=i)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.data)?i.data.data:Array.isArray(i)?i:[]}var r;Array.isArray(d)&&0!==d.length||(d=[{id:null===e||void 0===e?void 0:e.meetingId,title:(null===e||void 0===e?void 0:e.momentTitle)||"Conversation",type:(null===e||void 0===e||null===(r=e.originalMeeting)||void 0===r?void 0:r.type)||"Conversation",start_time:null===e||void 0===e?void 0:e.date,updated_at:null===e||void 0===e?void 0:e.date,unread_messages_count:0,last_message_date:null===e||void 0===e?void 0:e.date,objective:null===e||void 0===e?void 0:e.missionTitle}]),U({meetingId:e.meetingId,messageId:e.id,meetings:d,isIonos:h,isOutlook:c,isGmail:x,initialMessage:(null===e||void 0===e||null===(n=e.originalMessage)||void 0===n?void 0:n.ai_assist)||""}),V(!0)}catch(d){console.error("Error fetching context for message:",d)}finally{_(!1)}}else S(e);e.isRead||(0,I.E5)(null,e.id,e.meetingId).then(()=>{v(i=>i.map(i=>i.id===e.id?(0,w.A)((0,w.A)({},i),{},{isRead:!0}):i)),b(i=>(0,w.A)((0,w.A)({},i),{},{[e.categoryId]:Math.max(0,(i[e.categoryId]||0)-1),All:Math.max(0,(i.All||0)-1)}))}).catch(e=>console.error("Error marking as read:",e))})(e)})},e.id)}),(0,R.jsx)("div",{ref:Y,style:{height:"20px",width:"100%"}}),E&&(0,R.jsx)("div",{className:"text-center p-3",children:(0,R.jsx)(k.A,{size:"small",tip:"Loading more..."})})]}):(0,R.jsx)(ge.A,{image:ge.A.PRESENTED_IMAGE_SIMPLE,description:r("header.messagesToHandle.noMessages","Aucun message dans cette cat\xe9gorie"),className:"mt-5"})})]})}),(0,R.jsx)(p.A,{open:H,onCancel:()=>V(!1),footer:null,width:"100%",className:"full-screen-modal",style:{top:0,padding:0},bodyStyle:{height:"100vh",padding:0},closeIcon:null,destroyOnClose:!0,children:W&&(0,R.jsx)(T.A,{meetingId:W.meetingId,messageId:W.messageId,meetingsData:W.meetings,onMeetingsUpdate:()=>{},isOutlook:W.isOutlook,isIonos:W.isIonos,isGmail:W.isGmail,userData:o,defaultFullScreen:!0,onCloseFullScreen:()=>V(!1),initialMessage:W.initialMessage})}),(0,R.jsx)(p.A,{title:(0,R.jsxs)(c.A,{children:[(0,R.jsx)(Ee,{meeting:null===C||void 0===C?void 0:C.originalMeeting,t:r}),(0,R.jsx)(je,{strong:!0,children:null===C||void 0===C?void 0:C.momentTitle})]}),open:!!C,onCancel:()=>S(null),footer:[(0,R.jsx)(x.Ay,{onClick:()=>S(null),children:"Fermer"},"close")],width:a?"96%":800,centered:!0,children:C&&(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:"mb-3 border-bottom pb-2 d-flex justify-content-between align-items-center",children:[(0,R.jsxs)(c.A,{direction:"vertical",size:0,children:[(0,R.jsx)(je,{strong:!0,children:C.sender}),(0,R.jsx)(je,{type:"secondary",size:"small",children:new Date(C.date).toLocaleString()})]}),(0,R.jsx)(ae.A,{color:"blue",children:null===(i=Ce.find(e=>e.id===C.categoryId))||void 0===i?void 0:i.label})]}),(0,R.jsx)("div",{style:{maxHeight:"60vh",overflowY:"auto"},dangerouslySetInnerHTML:{__html:C.content}})]})}),B&&(0,R.jsx)(ye.default,{open:B,closeModal:F,openedFrom:"destination"})]}):null};var Te=s(80229),Ie=s(17455),Re=s(57316),Pe=s(46759);const{Content:ze,Sider:Me}=L.A,{Text:Le,Title:De}
1=d.A,{useBreakpoint:Oe}=fe.Ay,He=e=>{let{isActive:i,assistantName:s="",assistantLogo:o}=e;const[r]=(0,l.Bd)("global"),d=(0,n.Zp)(),u=!Oe().md,[f,p]=(0,t.useState)([]),[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)(null),[A,_]=(0,t.useState)({destinations:!1,messages:!1,participants:!1}),[C,S]=(0,t.useState)([]),[E,T]=(0,t.useState)(!1),[P,z]=(0,t.useState)("conversation"),[M,D]=(0,t.useState)(!1),[O,H]=(0,t.useState)(!1),[V,W]=(0,t.useState)(null),[U,B]=(0,t.useState)([]),F=(0,t.useRef)(null),G=(0,t.useRef)(null);(0,t.useEffect)(()=>{u&&z("conversation")},[u]);const Y=JSON.parse(X.A.get("user")),K=JSON.parse(X.A.get("assistant_profile")||"{}"),Z=s||K.name||"TekTime",J=o||K.logo?(o||K.logo).startsWith("http")?o||K.logo:"".concat(j.SD,"/").concat((o||K.logo).replace(/^\//,"")):"/Assets/sidebar-invite-logo.svg",q=(0,t.useCallback)(async()=>{_(e=>(0,w.A)((0,w.A)({},e),{},{destinations:!0}));try{const e=await(0,I.NZ)();if(null!==e&&void 0!==e&&e.data){const i=e.data.map(e=>(0,w.A)((0,w.A)({},e),{},{title:e.destination_name,last_message_date:e.last_assistant_message_at||e.destination_end_date_time,unread_messages_count:e.unread_messages_count||0}));v(i),i.length>0&&!y&&!u&&b(i[0].id)}}catch(e){console.error(e)}finally{_(e=>(0,w.A)((0,w.A)({},e),{},{destinations:!1}))}},[u]),Q=(0,t.useCallback)(async e=>{if(e){_(e=>(0,w.A)((0,w.A)({},e),{},{messages:!0}));try{var i;const s=await(0,I.Vz)(e),t=((null===s||void 0===s?void 0:s.assistant_messages)||(null===s||void 0===s||null===(i=s.data)||void 0===i?void 0:i.assistant_messages)||[]).flatMap(e=>[e.question&&{id:"q-".concat(e.id),role:"user",content:e.question,created_at:e.created_at},e.answer&&{id:"a-".concat(e.id),role:"assistant",content:e.answer,created_at:e.updated_at||e.created_at}].filter(Boolean));p(t)}catch(s){console.error(s)}finally{_(e=>(0,w.A)((0,w.A)({},e),{},{messages:!1}))}}},[]),$=(0,t.useCallback)(async e=>{if(e){_(e=>(0,w.A)((0,w.A)({},e),{},{participants:!0}));try{const i=await(0,I.nX)(e);null!==i&&void 0!==i&&i.data?S(i.data):Array.isArray(i)&&S(i)}catch(i){console.error("Error fetching participants:",i)}finally{_(e=>(0,w.A)((0,w.A)({},e),{},{participants:!1}))}}},[]);(0,t.useEffect)(()=>{i&&q()},[i,q]),(0,t.useEffect)(()=>{i&&y&&(Q(y),$(y))},[i,y,Q,$]);if((0,t.useEffect)(()=>{var e;null===(e=G.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[f]),!i)return null;const ee=g.find(e=>e.id===y);return(0,R.jsxs)("div",{className:"bg-white d-flex flex-column ".concat(M||y&&u?"position-fixed top-0 start-0 w-100 h-100":""),style:{zIndex:M||y&&u?1e4:1,height:"100%",minHeight:0,overflow:"hidden"},children:[(0,R.jsxs)(L.A,{className:"bg-white",style:{height:"100%",minHeight:0,display:"flex",flexDirection:"row",overflow:"hidden"},children:[M?null:(0,R.jsxs)("div",{className:"border-end bg-white ".concat(u&&y?"d-none":""),style:{width:u?"100%":y?"300px":"100%",flexShrink:0,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",transition:"all 0.3s ease"},children:[(0,R.jsxs)("div",{className:"p-4 border-bottom",style:{flexShrink:0,background:"linear-gradient(to right, #fafafa, #fff)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,R.jsx)("div",{style:{width:"32px",height:"32px",borderRadius:"8px",backgroundColor:"#e6f7ff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,R.jsx)(a.svy,{color:"#1890ff",size:16})}),(0,R.jsx)(Le,{strong:!0,style:{fontSize:"14px",color:"#262626",letterSpacing:"0.02em"},children:"MISSIONS & CONVERSATIONS"})]}),(0,R.jsx)(N.A,{count:g.length,showZero:!0,color:"#1890ff",style:{boxShadow:"0 2px 4px rgba(24, 144, 255, 0.2)"}})]}),(0,R.jsx)("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",minHeight:0},children:A.destinations?(0,R.jsx)("div",{className:"p-5 text-center",children:(0,R.jsx)(k.A,{})}):(0,R.jsx)(Ie.A,{meetingsData:g,isMissionList:!0,selectedMoment:ee,onMomentSelect:e=>{b(e.id),u&&(D(!1),z("conversation"))}})})]}),(0,R.jsxs)(ze,{className:"".concat(u&&!y?"d-none":"d-flex"),style:{display:u&&!y||!M&&!u&&!y?"none":"flex",flexDirection:"column",flex:1,height:"100%",minHeight:0,overflow:"hidden"},children:[(0,R.jsxs)("div",{className:"px-3 border-bottom bg-white shadow-sm",style:{flexShrink:0,minHeight:"64px",display:"flex",alignItems:"center",gap:"8px",overflow:"hidden"},children:[(0,R.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:"8px",overflow:"hidden"},children:[u&&y||M&&!u?(0,R.jsx)(x.Ay,{icon:(0,R.jsx)(a._Jj,{}),type:"text",style:{flexShrink:0},onClick:()=>M?D(!1):b(null)}):null,(0,R.jsx)(h.A,{src:J,size:"large",style:{flexShrink:0}}),(0,R.jsxs)("div",{style:{minWidth:0,overflow:"hidden"},children:[(0,R.jsx)(De,{level:5,className:"m-0",ellipsis:{tooltip:(null===ee||void 0===ee?void 0:ee.destination_name)||Z},style:{marginBottom:0,maxWidth:"100%"},children:(null===ee||void 0===ee?void 0:ee.destination_name)||Z}),(0,R.jsx)(Le,{type:"secondary",style:{fontSize:"11px"},children:"Assistant IA"})]})]}),(0,R.jsxs)(c.A,{style:{flexShrink:0},children:[(0,R.jsx)(m.A,{title:"Rafra\xeechir",children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.KP4,{size:14,className:"text-muted"}),onClick:()=>y&&Q(y),loading:A.messages})}),(0,R.jsx)(m.A,{title:"conversation"===P?"Vue Liste":"Vue Conversation",children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:"conversation"===P?(0,R.jsx)(a.svy,{size:14,className:"text-muted"}):(0,R.jsx)(a.uN,{size:16,className:"text-muted"}),onClick:()=>z("conversation"===P?"list":"conversation")})}),ee&&(0,R.jsx)(m.A,{title:"Acc\xe9der \xe0 la mission",children:(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:(0,R.jsx)(a.EQc,{size:14,className:"text-primary"}),onClick:()=>{var e;const i=null===(e=ee.status||ee.meeting_status||ee.destination_status||"")||void 0===e?void 0:e.toLowerCase();["active","in_progress","todo","to_finish"].some(e=>i.includes(e))?d("/invite/".concat(ee.id)):["abort","cancle","cancel","closed"].some(e=>i.includes(e))?d("/present/invite/".concat(ee.id)):d("/invite/".concat(ee.id))}})}),(0,R.jsx)(x.Ay,{type:"text",shape:"circle",icon:M?(0,R.jsx)(a.Wsx,{size:14}):(0,R.jsx)(a._AH,{size:14}),onClick:()=>D(!M),className:"d-none d-sm-inline-flex"})]})]}),(0,R.jsxs)("div",{className:"p-3 p-md-4 bg-light bg-opacity-10",style:{flex:u||M?1:" ",minHeight:0,overflowY:"auto",overflowX:"hidden",backgroundImage:"radial-gradient(#eee 1px, transparent 1px)",backgroundSize:"20px 20px",height:!u&&!M&&"500px"},children:[A.messages?(0,R.jsx)("div",{style:{height:"100%"},className:"d-flex justify-content-center align-items-center",children:(0,R.jsx)(k.A,{tip:"Chargement de l'historique..."})}):"list"===P?(0,R.jsx)("div",{className:"bg-white rounded-3 shadow-sm p-0",children:f.map((e,i)=>{var t,n;const l="user"===e.role,o=l?(null===Y||void 0===Y?void 0:Y.full_name)||"Moi":s,m=l?null!==(t=(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image))&&void 0!==t&&t.toString().startsWith("http")?(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image):"".concat(j.SD,"/").concat(null===(n=(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image))||void 0===n?void 0:n.toString().replace(/^\//,"")):J;return(0,R.jsxs)("div",{className:"p-3 p-md-4 ".concat(i!==f.length-1?"border-bottom":""),children:[(0,R.jsxs)("div",{className:"d-flex justify-content-between align-items-start mb-2",children:[(0,R.jsxs)(c.A,{align:"start",size:"middle",children:[(0,R.jsx)(h.A,{size:40,src:m,className:"shadow-sm",children:null===o||void 0===o?void 0:o.charAt(0).toUpperCase()}),(0,R.jsx)("div",{children:(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)(Le,{strong:!0,style:{fontSize:"14px"},children:o}),(0,R.jsx)(Le,{type:"secondary",style:{fontSize:"12px"}
1,children:new Date(e.created_at).toLocaleString()})]})})]}),e.redirect_url&&(0,R.jsx)(x.Ay,{type:"link",icon:(0,R.jsx)(a.EQc,{size:10}),onClick:()=>d(e.redirect_url),className:"fw-bold",children:r("Voir l'action")})]}),(0,R.jsx)("div",{className:"ms-5 ps-2 text-dark",style:{fontSize:"14px",lineHeight:"1.6"},children:(0,Te.Ay)(e.content)})]},e.id)})}):(0,R.jsx)(pe.A,{dataSource:f,split:!1,renderItem:e=>{var i,t;return(0,R.jsx)("div",{className:"d-flex mb-4 ".concat("user"===e.role?"justify-content-end":"justify-content-start"),style:{width:"100%",overflow:"hidden"},children:(0,R.jsxs)("div",{className:"d-flex ".concat("user"===e.role?"flex-row-reverse":"flex-row"," gap-2"),style:{maxWidth:"calc(100% - 8px)",minWidth:0,overflow:"hidden"},children:[(0,R.jsx)(h.A,{src:"user"===e.role?null!==(i=(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image))&&void 0!==i&&i.toString().startsWith("http")?(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image):"".concat(j.SD,"/").concat(null===(t=(null===Y||void 0===Y?void 0:Y.image)||(null===Y||void 0===Y?void 0:Y.user_image))||void 0===t?void 0:t.toString().replace(/^\//,"")):J,style:{flexShrink:0,flexGrow:0}}),(0,R.jsxs)("div",{className:"d-flex flex-column ".concat("user"===e.role?"align-items-end":"align-items-start"),style:{minWidth:0,overflow:"hidden",flex:1},children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",style:{maxWidth:"100%",overflow:"hidden"},children:[(0,R.jsx)(Le,{strong:!0,style:{fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:"user"===e.role?(null===Y||void 0===Y?void 0:Y.full_name)||(null===Y||void 0===Y?void 0:Y.name)||"Moi":s}),(0,R.jsxs)(Le,{type:"secondary",style:{fontSize:"10px",whiteSpace:"nowrap"},children:[new Date(e.created_at).toLocaleDateString([],{day:"2-digit",month:"short"})," ",new Date(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),(0,R.jsx)(oe.A,{size:"small",className:"border-0 shadow-sm ".concat("user"===e.role?"bg-primary text-white rounded-start":"bg-white rounded-end"),style:{maxWidth:"100%",minWidth:0,overflow:"hidden"},bodyStyle:{padding:"10px 15px",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"pre-wrap",minWidth:0,overflow:"hidden"},children:(0,R.jsx)("div",{className:"user"===e.role?"text-white":"text-dark",style:{fontSize:"14px",overflowWrap:"break-word",wordBreak:"break-word",overflow:"hidden",maxWidth:"100%"},children:(0,Te.Ay)(e.content)})})]})]})})}}),E&&(0,R.jsx)("div",{className:"mb-4 ".concat("list"===P?"bg-white p-3 p-md-4 rounded-3 shadow-sm mt-3":"d-flex justify-content-start"),style:{width:"100%",overflow:"hidden"},children:(0,R.jsx)("div",{className:"d-flex ".concat("list"===P?"align-items-start":"flex-row gap-2"),style:{maxWidth:"calc(100% - 8px)",minWidth:0},children:"list"===P?(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(c.A,{align:"start",size:"middle",children:[(0,R.jsx)(h.A,{size:40,src:J,className:"shadow-sm",children:"A"}),(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)(Le,{strong:!0,style:{fontSize:"14px"},children:s||"Assistant IA"}),(0,R.jsx)(Le,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"est en train d'\xe9crire..."})]}),(0,R.jsx)("div",{className:"text-dark mt-2",style:{fontSize:"14px",lineHeight:"1.6"},children:(0,R.jsxs)("div",{className:"d-flex gap-1 align-items-center",style:{height:"20px",paddingLeft:"1px"},children:[(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both"}}),(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both",animationDelay:"0.2s"}}),(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both",animationDelay:"0.4s"}})]})})]})]})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(h.A,{src:J,style:{flexShrink:0}}),(0,R.jsxs)("div",{className:"d-flex flex-column align-items-start",style:{minWidth:0,flex:1},children:[(0,R.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[(0,R.jsx)(Le,{strong:!0,style:{fontSize:"12px",whiteSpace:"nowrap"},children:s||"Assistant IA"}),(0,R.jsx)(Le,{type:"secondary",style:{fontSize:"10px",whiteSpace:"nowrap",fontStyle:"italic"},children:"est en train d'\xe9crire..."})]}),(0,R.jsx)(oe.A,{size:"small",className:"border-0 shadow-sm bg-white rounded-end",bodyStyle:{padding:"10px 15px",height:"42px",display:"flex",alignItems:"center"},children:(0,R.jsxs)("div",{className:"d-flex gap-1 align-items-center",style:{height:"100%"},children:[(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both"}}),(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both",animationDelay:"0.2s"}}),(0,R.jsx)("span",{style:{width:6,height:6,backgroundColor:"#adb5bd",borderRadius:"50%",animation:"typing-pulse 1.4s infinite ease-in-out both",animationDelay:"0.4s"}})]})})]})]})})}),(0,R.jsx)("div",{ref:G})]}),(0,R.jsx)("div",{className:"bg-white border-top",style:{flexShrink:0},children:y&&(0,R.jsx)(Re.A,{onSendMessage:async e=>{let{message:i}=e;if(null===i||void 0===i||!i.trim()||E)return;const s=i,t=/<span [^>]*class="mention"[^>]*>([\s\S]*?)<\/span>/g,n=[];let l;for(;null!==(l=t.exec(s));){const e=l[0],i=l[1].replace(/^@/,"").trim(),s=e.match(/data-id="([^"]+)"/),t=s?s[1]:null,o=C.find(e=>{var s,n;if(t)return(null===(s=e.id)||void 0===s?void 0:s.toString())===t||(null===(n=e.user_id)||void 0===n?void 0:n.toString())===t;return(e.full_name||e.name||e.email||"").trim().toLowerCase()===i.toLowerCase()});o&&!n.some(e=>e.id===o.id)&&n.push(o)}const o=n.length>0?n:U;n.length>0&&B(n),T(!0),p(e=>[...e,{id:Date.now(),role:"user",content:s,created_at:(new Date).toISOString()}]);try{const e=await(0,I.z)(s,y,o);e&&(e.answer&&p(i=>[...i,{id:"resp-".concat(Date.now()),role:"assistant",content:e.answer,created_at:(new Date).toISOString()}]),F.current&&F.current.setContent(""),e.participants&&Array.isArray(e.participants)&&e.participants.length>0&&B(e.participants),"plan_confirmed"===e.type&&e.meeting_data&&(W(e.meeting_data),H(!0)))}catch(a){console.error(a)}finally{T(!1)}},disabled:E,editorRef:F,isSending:E,attachments:[],onFileUpload:()=>{},onRemoveAttachment:()=>{},isEditing:!1,onCancelEdit:()=>{},initialValue:"",participants:C})})]})]}),O&&(0,R.jsx)(Pe.A,{show:O,onClose:()=>{H(!1),W(null)},openedFrom:"assistant",destination:ee,meetingData:V}),(0,R.jsx)("style",{children:"\n @keyframes typing-pulse {\n 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }\n 40% { transform: scale(1.2); opacity: 1; }\n }\n "})]})};var Ve=s(43801),We=s(27210),Ue=s(91036);const{Title:Be,Text:Fe}=d.A,{Option:Ge}=u.A,Ye=e=>{let{handleClose:i,triggerRefresh:s}=e;const[n,l]=(0,t.useState)(!1),[o]=Ve.A.useForm();return(0,R.jsx)("div",{className:"p-2",children:(0,R.jsxs)(Ve.A,{form:o,layout:"vertical",onFinish:async e=>{l(!0);if(!parseInt(X.A.get("user_id"),10))return Ue.oR.error("User ID not found"),void l(!1);const t={username:e.username,password:e.password,host:"imap.ionos.".concat(e.domain)};try{const e=await fetch("".concat(j.JR,"/ionos-emails/add-account"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(X.A.get("token"))},body:JSON.stringify(t)});if(!e.ok){const i=await e.json().catch(()=>({}));throw new Error(i.message||"API error")}Ue.oR.success("Compte ajout\xe9 avec succ\xe8s !"),null===i||void 0===i||i(),null===s||void 0===s||s(),o.resetFields()}catch(n){Ue.oR.error(n.message||"\xc9chec de l'ajout du compte")}finally{l(!1)}},initialValues:{domain:"com"},children:[(0,R.jsx)(Ve.A.Item,{label:"Domaine Host",name:"domain",required:!0,children:(0,R.jsxs)(u.A,{children:[(0,R.jsx)(Ge,{value:"com",children:"imap.ionos.com"}),(0,R.jsx)(Ge,{value:"us",children:"imap.ionos.us"}),(0,R.jsx)(Ge,{value:"fr",children:"imap.ionos.fr"}),(0,R.jsx)(Ge,{value:"eu",children:"imap.ionos.eu"}),(0,R.jsx)(Ge,{value:"it",children:"imap.ionos.it"}),(0,R.jsx)(Ge,{value:"es",children:"imap.ionos.es"})]})}
1),(0,R.jsx)(Ve.A.Item,{label:"Nom d'utilisateur",name:"username",rules:[{required:!0,message:"Veuillez entrer votre nom d'utilisateur"}],children:(0,R.jsx)(We.A,{placeholder:"[email protected]",size:"large"})}),(0,R.jsx)(Ve.A.Item,{label:"Mot de passe",name:"password",rules:[{required:!0,message:"Veuillez entrer votre mot de passe"}],children:(0,R.jsx)(We.A.Password,{placeholder:"Votre mot de passe",size:"large"})}),(0,R.jsxs)("div",{className:"d-flex justify-content-end gap-2 mt-4",children:[(0,R.jsx)(x.Ay,{onClick:i,disabled:n,children:"Annuler"}),(0,R.jsx)(x.Ay,{type:"primary",htmlType:"submit",loading:n,size:"large",children:n?"Validation...":"Valider"})]})]})})},{Title:Ke,Text:Xe}=d.A,Ze=(0,R.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("path",{d:"M2 11.9556C2 8.47078 2 6.7284 2.67818 5.39739C3.27473 4.22661 4.22661 3.27473 5.39739 2.67818C6.7284 2 8.47078 2 11.9556 2H20.0444C23.5292 2 25.2716 2 26.6026 2.67818C27.7734 3.27473 28.7253 4.22661 29.3218 5.39739C30 6.7284 30 8.47078 30 11.9556V20.0444C30 23.5292 30 25.2716 29.3218 26.6026C28.7253 27.7734 27.7734 28.7253 26.6026 29.3218C25.2716 30 23.5292 30 20.0444 30H11.9556C8.47078 30 6.7284 30 5.39739 29.3218C4.22661 28.7253 3.27473 27.7734 2.67818 26.6026C2 25.2716 2 23.5292 2 20.0444V11.9556Z",fill:"white"}),(0,R.jsx)("path",{d:"M22.0515 8.52295L16.0644 13.1954L9.94043 8.52295V8.52421L9.94783 8.53053V15.0732L15.9954 19.8466L22.0515 15.2575V8.52295Z",fill:"#EA4335"}),(0,R.jsx)("path",{d:"M23.6231 7.38639L22.0508 8.52292V15.2575L26.9983 11.459V9.17074C26.9983 9.17074 26.3978 5.90258 23.6231 7.38639Z",fill:"#FBBC05"}),(0,R.jsx)("path",{d:"M22.0508 15.2575V23.9924H25.8428C25.8428 23.9924 26.9219 23.8813 26.9995 22.6513V11.459L22.0508 15.2575Z",fill:"#34A853"}),(0,R.jsx)("path",{d:"M9.94811 24.0001V15.0732L9.94043 15.0669L9.94811 24.0001Z",fill:"#C5221F"}),(0,R.jsx)("path",{d:"M9.94014 8.52404L8.37646 7.39382C5.60179 5.91001 5 9.17692 5 9.17692V11.4651L9.94014 15.0667V8.52404Z",fill:"#C5221F"}),(0,R.jsx)("path",{d:"M9.94043 8.52441V15.0671L9.94811 15.0734V8.53073L9.94043 8.52441Z",fill:"#C5221F"}),(0,R.jsx)("path",{d:"M5 11.4668V22.6591C5.07646 23.8904 6.15673 24.0003 6.15673 24.0003H9.94877L9.94014 15.0671L5 11.4668Z",fill:"#4285F4"})]}),Je=e=>{let{show:i,onHide:s,onSelect:t,connectedServices:n={}}=e;const l=[{key:"gmail",label:"Gmail",icon:Ze,description:"Connectez votre compte personnalise\u0301 Gmail",connected:n.gmail},{key:"outlook",label:"Outlook",icon:(0,R.jsx)(o.PMk,{color:"#0A66C2",size:24}),description:"Connectez votre compte Microsoft Outlook",connected:n.outlook},{key:"ionos",label:"Ionos",icon:(0,R.jsx)(r.L6p,{color:"#003D8F",size:32}),description:"Connectez votre compte Ionos Business",connected:n.ionos}];return(0,R.jsx)(p.A,{open:i,onCancel:s,footer:null,title:(0,R.jsx)(Ke,{level:4,children:"Ajouter un compte"}),centered:!0,width:450,children:(0,R.jsx)("div",{className:"py-2",children:(0,R.jsx)(c.A,{direction:"vertical",className:"w-100",size:"middle",children:l.map(e=>(0,R.jsx)(oe.A,{hoverable:!0,className:"cursor-pointer transition-all hover-bg-primary-light",onClick:()=>t(e.key),bodyStyle:{padding:"16px"},children:(0,R.jsxs)("div",{className:"d-flex align-items-center gap-3",children:[(0,R.jsx)("div",{className:"flex-shrink-0",children:e.icon}),(0,R.jsxs)("div",{className:"flex-grow-1",children:[(0,R.jsx)(Xe,{strong:!0,"d-block":!0,className:"fs-6",children:e.label}),(0,R.jsx)(Xe,{type:"secondary",size:"small",className:"d-block",style:{fontSize:"12px"},children:e.description})]}),e.connected&&(0,R.jsx)(N.A,{status:"success",text:"Connect\xe9"})]})},e.key))})})})};var qe=s(67233);const Qe=e=>{let{onSuccess:i}=e;const[s,n]=(0,t.useState)(!1),{setUser:l,user:o,setCallUser:a}=(0,v.p)(),r=async()=>new Promise((e,s)=>{try{const t=600,n=700,r=window.screenX+(window.innerWidth-t)/2,d=window.screenY+(window.innerHeight-n)/2,c=window.open("".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"muhammad-zubair-k
1han",REACT_APP_FIREBASE_SENDER_ID:"221855587819",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_FIREBASE_PROJECT_ID:"tektime-be9b8",REACT_APP_VERCEL_PROJECT_ID:"prj_JeGXW4VaczqJaXUOywO5zew7AFFk",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"91c23943eef77667/script.js","viewEndpoint":"91c23943eef77667/view","eventEndpoint":"91c23943eef77667/event","sessionEndpoint":"91c23943eef77667/session"},"speedInsights":{"scriptSrc":"7478b70b1defcb53/script.js","endpoint":"7478b70b1defcb53/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"tektime-stage-git-main-tektime.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"fix(ui/mobile): improve mobile responsiveness & avatar fallback handling\n- Fix runtime crash in CreateUsers.jsx caused by chaining .filter on setTeams return value.\n- Add UI Avatars API (background=EBF4FF&color=7F9CF5) fallback & onError handling for broken profile images in UserRoadmap.jsx, UserTabs.jsx, and TeamCard.jsx.\n- Apply object-fit: cover and object-position: top on member avatar images to prevent head cropping.\n- Convert roadmap view modes to mobile dropdown selector and replace navigation text buttons with chevron icons.\n- Add sticky team member column on mobile roadmap horizontal scrolling for improved UX.\n- Make CreateUsers.jsx and UpdateUser.jsx user forms fully responsive on mobile viewports.\n- Update header demo request buttons (TeamTabs, SolutionTabs) to render icon-only on mobile devices.",REACT_APP_PUSHER_APP_KEY:"a2ed9945973142358902",REACT_APP_PUSHER_APP_CLUSTER:"ap2",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-3M1L4Y208Z",REACT_APP_PUSHER_APP_SECRET:"4cdd2b5c99ce5d59f872",REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_GfawtDP2H3TJhfTwNh4ZZtpzkj9z",REACT_APP_VERCEL_GIT_REPO_SLUG:"Tektime-Stage",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_FIREBASE_STORAGE_BUCKET:"http://tektime-be9b8.appspot.com",REACT_APP_VERCEL_GIT_COMMIT_SHA:"fe969ad2ae0411e5ca9369f5d2ffb15827302828",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_PUSHER_APP_ID:"2164606",REACT_APP_CONTRACT_ID:"3",REACT_APP_FIREBASE_AUTH_DOMAIN:"tektime-be9b8.firebaseapp.com",REACT_APP_VERCEL_URL:"tektime-stage-m9mk37r6b-tektime.vercel.app",REACT_APP_TINYMCE_API:"ezrlsdfo2hlxrznvzmjtdebv3gsbuhn2o1ptmpnc5n8oj7xz",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"tektime-stage-omega.vercel.app",REACT_APP_FIREBASE_API_KEY:"AIzaSyCGvHv2sXo2BET8soCidUcjbxhGo5YBjBk",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"841831269",REACT_APP_FIREBASE_APP_ID:"1:221855587819:web:c93cc2c7e2732009714dae",REACT_APP_FIREBASE_VAPID_KEY:"BIID5Npe6zPx0sPIHIT6GC1zkg3kwP6-KnMlVCbwCsXkQjOrxdWSKS752UhNB_0ALAIQfAXjQqi1tj6yp5pcwqg",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"muhammad-zubair-khan",REACT_APP_VERCEL_GIT_REPO_OWNER:"bissoft"}.REACT_APP_API_BASE_URL,"/outlook-login?user_id=").concat(X.A.get("user_id")),"Outlook Login","width=".concat(t,",height=").concat(n,",top=").concat(d,",left=").concat(r));if(!c)return Ue.oR.error("Popup was blocked. Please allow popups for this site."),void s(new Error("Popup blocked"));const h=async t=>{if(t.origin!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"muhammad-zubair-khan",REACT_APP_FIREBASE_SENDER_ID:"221855587819",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_FIREBASE_PROJECT_ID:"tektime-be9b8",REACT_APP_VERCEL_PROJECT_ID:"prj_JeGXW4VaczqJaXUOywO5zew7AFFk",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"91c23943eef77667/script.js","viewEndpoint":"91c23943eef77667/view","eventEndpoint":"91c23943eef77667/event","sessionEndpoint":"91c23943eef77667/session"},"speedInsights":{"scriptSrc":"7478b70b1defcb53/script.js","endpoint":"7478b70b1defcb53/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"tektime-stage-git-main-tektime.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"fix(ui/mobile): improve mobile responsiveness & avatar fallback handling\n- Fix runtime crash in CreateUsers.jsx caused by chaining .filter on setTeams return value.\n- Add UI Avatars API (background=EBF4FF&color=7F9CF5) fallback & onError handling for broken profile images in UserRoadmap.jsx, UserTabs.jsx, and TeamCard.jsx.\n- Apply object-fit: cover and object-position: top on member avatar images to prevent head cropping.\n- Convert roadmap view modes to mobile dropdown selector and replace navigation text buttons with chevron icons.\n- Add sticky team member column on mobile roadmap horizontal scrolling for improved UX.\n- Make CreateUsers.jsx and UpdateUser.jsx user forms fully responsive on mobile viewports.\n- Update header demo request buttons (TeamTabs, SolutionTabs) to render icon-only on mobile devices.",REACT_APP_PUSHER_APP_KEY:"a2ed9945973142358902",REACT_APP_PUSHER_APP_CLUSTER:"ap2",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-3M1L4Y208Z",REACT_APP_PUSHER_APP_SECRET:"4cdd2b5c99ce5d59f872",REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_GfawtDP2H3TJhfTwNh4ZZtpzkj9z",REACT_APP_VERCEL_GIT_REPO_SLUG:"Tektime-Stage",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_FIREBASE_STORAGE_BUCKET:"http://tektime-be9b8.appspot.com",REACT_APP_VERCEL_GIT_COMMIT_SHA:"fe969ad2ae0411e5ca9369f5d2ffb15827302828",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_PUSHER_APP_ID:"2164606",REACT_APP_CONTRACT_ID:"3",REACT_APP_FIREBASE_AUTH_DOMAIN:"tektime-be9b8.firebaseapp.com",REACT_APP_VERCEL_URL:"tektime-stage-m9mk37r6b-tektime.vercel.app",REACT_APP_TINYMCE_API:"ezrlsdfo2hlxrznvzmjtdebv3gsbuhn2o1ptmpnc5n8oj7xz",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"tektime-stage-omega.vercel.app",REACT_APP_FIREBASE_API_KEY:"AIzaSyCGvHv2sXo2BET8soCidUcjbxhGo5YBjBk",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"841831269",REACT_APP_FIREBASE_APP_ID:"1:221855587819:web:c93cc2c7e2732009714dae",REACT_APP_FIREBASE_VAPID_KEY:"BIID5Npe6zPx0sPIHIT6GC1zkg3kwP6-KnMlVCbwCsXkQjOrxdWSKS752UhNB_0ALAIQfAXjQqi1tj6yp5pcwqg",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"muhammad-zubair-k
1han",REACT_APP_VERCEL_GIT_REPO_OWNER:"bissoft"}.REACT_APP_API_BASE_URL)return;const{type:n}=t.data||{};if("outlook-login-success"===n){window.removeEventListener("message",h),clearInterval(x),c.closed||c.close();try{await(async()=>{try{var e,s,t,n,r,d,c,h,x,m;const u=X.A.get("user_id"),f=X.A.get("token");if(!u||!f)return void Ue.oR.error("User session not found.");const p=null===(e=(await g.A.get("".concat(j.JR,"/users/").concat(u),{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(f)}})).data)||void 0===e?void 0:e.data;if(console.log("\u2705 User data fetched after Outlook login:",p),!p)return void Ue.oR.error("User data not found.");const{mail:v,displayName:y}=(null===p||void 0===p?void 0:p.outlook_user_info)||{};if(!v||!y)return void Ue.oR.error("Incomplete Outlook user information.");const b=(0,w.A)((0,w.A)({},o),{},{integration_links:[...o.integration_links.filter(e=>"Outlook Agenda"!==e.platform),{platform:"Outlook Agenda",value:y}],visioconference_links:[...o.visioconference_links.filter(e=>"Microsoft Teams"!==e.platform),{platform:"Microsoft Teams",value:y}],email_links:[...o.email_links.filter(e=>"Outlook"!==e.platform),{platform:"Outlook",value:v}]});l(b);const A=new FormData;if(A.append("_method","PUT"),A.append("title",(null===o||void 0===o?void 0:o.title)||""),A.append("name",(null===o||void 0===o?void 0:o.name)||""),A.append("last_name",(null===o||void 0===o?void 0:o.last_name)||""),A.append("email",(null===o||void 0===o?void 0:o.email)||""),A.append("phoneNumber",(null===o||void 0===o?void 0:o.phoneNumber)||""),A.append("enterprise_id",(null===o||void 0===o||null===(s=o.enterprise)||void 0===s?void 0:s.id)||""),A.append("bio",(null===o||void 0===o?void 0:o.bio)||""),A.append("post",(null===o||void 0===o?void 0:o.post)||""),A.append("role_id",(null===o||void 0===o?void 0:o.role_id)||""),A.append("timezone",qe.nn||"Europe/Paris"),A.append("visibility",(null===o||void 0===o?void 0:o.visibility)||"public"),null===o||void 0===o||null===(t=o.social_links)||void 0===t||t.forEach((e,i)=>{e.id&&A.append("social_links[".concat(i,"][id]"),e.id),A.append("social_links[".concat(i,"][platform]"),e.platform),A.append("social_links[".concat(i,"][link]"),e.link)}),null===o||void 0===o||null===(n=o.websites)||void 0===n||n.forEach((e,i)=>{e.id&&A.append("websites[".concat(i,"][id]"),e.id),A.append("websites[".concat(i,"][title]"),e.title),A.append("websites[".concat(i,"][link]"),e.link)}),null===o||void 0===o||null===(r=o.affiliation_links)||void 0===r||r.forEach((e,i)=>{e.id&&A.append("affiliation_links[".concat(i,"][id]"),e.id),A.append("affiliation_links[".concat(i,"][title]"),e.title),A.append("affiliation_links[".concat(i,"][link]"),e.link)}),b.integration_links.forEach((e,i)=>{e.id&&A.append("integration_links[".concat(i,"][id]"),e.id),A.append("integration_links[".concat(i,"][platform]"),e.platform),A.append("integration_links[".concat(i,"][value]"),e.value)}),b.visioconference_links.forEach((e,i)=>{e.id&&A.append("visioconference_links[".concat(i,"][id]"),e.id),A.append("visioconference_links[".concat(i,"][platform]"),e.platform),A.append("visioconference_links[".concat(i,"][value]"),e.value)}),b.email_links.forEach((e,i)=>{e.id&&A.append("email_links[".concat(i,"][id]"),e.id),A.append("email_links[".concat(i,"][platform]"),e.platform),A.append("email_links[".concat(i,"][value]"),e.value)}),null===o||void 0===o||null===(d=o.teams)||void 0===d||d.forEach(e=>{A.append("team_id[]",e.id)}),null!==o&&void 0!==o&&null!==(c=o.image)&&void 0!==c&&c.startsWith("data:image/")){const e=await(await fetch(o.image)).blob();A.append("image",e,"profile-image.jpg")}else null!==o&&void 0!==o&&o.image&&A.append("image",o.image);if(null!==o&&void 0!==o&&null!==(h=o.profile_banner)&&void 0!==h&&h.startsWith("data:image/")){const e=await(await fetch(o.profile_banner)).blob();A.append("profile_banner",e,"profile-banner.jpg")}else null!==o&&void 0!==o&&o.profile_banner&&A.append("profile_banner",o.profile_banner);if(null!==o&&void 0!==o&&null!==(x=o.video)&&void 0!==x&&x.startsWith("blob:")){const e=await(await fetch(o.video)).blob();A.append("video",e,"video-preview.mp4")}else null!==o&&void 0!==o&&o.video&&A.append("video",o.video);const _=await fetch("".concat(j.JR,"/users/").concat(u),{method:"POST",body:A,headers:{Authorization:"Bearer ".concat(X.A.get("token"))}});if(!_.ok)throw new Error("Failed to update user profile: ".concat(_.status));const C=await _.json();l((null===C||void 0===C||null===(m=C.data)||void 0===m?void 0:m.data)||b),a(e=>!e),sessionStorage.setItem("outlook_access_token",null===p||void 0===p?void 0:p.outlook_access_token),sessionStorage.setItem("outlook_refresh_token",null===p||void 0===p?void 0:p.outlook_refresh_token),X.A.set("outlook_access_token",null===p||void 0===p?void 0:p.outlook_access_token),X.A.set("outlook_refresh_token",null===p||void 0===p?void 0:p.outlook_refresh_token),i&&i()}catch(u){console.error("Post-connexion Outlook (non bloquant) :",u)}})(),e()}catch(r){s(r)}}else"outlook-login-failed"===n&&(window.removeEventListener("message",h),clearInterval(x),c.closed||c.close(),Ue.oR.error("Connexion Outlook \xe9chou\xe9e"),s(new Error("Login failed")))};window.addEventListener("message",h);const x=setInterval(()=>{c.closed&&(clearInterval(x),window.removeEventListener("message",h),s(new Error("Popup closed by user")))},500);setTimeout(()=>{c.closed||(s(new Error("Login timeout")),c.close())},3e5)}catch(t){s(t)}});return{loginOutlookAndSaveProfileData:async()=>{n(!0);try{await r(),Ue.oR.success("Outlook synchronis\xe9 avec succ\xe8s!")}catch(e){console.error("Outlook sync failed:",e),Ue.oR.error("\xc9chec de la synchronisation Outlook")}finally{n(!1)}},isOutlookSyncing:s}};var $e=s(71910);const{Title:ei,Text:ii}=d.A,si=(0,R.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("path",{d:"M2 11.9556C2 8.47078 2 6.7284 2.67818 5.39739C3.27473 4.22661 4.22661 3.27473 5.39739 2.67818C6.7284 2 8.47078 2 11.9556 2H20.0444C23.5292 2 25.2716 2 26.6026 2.67818C27.7734 3.27473 28.7253 4.22661 29.3218 5.39739C30 6.7284 30 8.47078 30 11.9556V20.0444C30 23.5292 30 25.2716 29.3218 26.6026C28.7253 27.7734 27.7734 28.7253 26.6026 29.3218C25.2716 30 23.5292 30 20.0444 30H11.9556C8.47078 30 6.7284 30 5.39739 29.3218C4.22661 28.7253 3.27473 27.7734 2.67818 26.6026C2 25.2716 2 23.5292 2 20.0444V11.9556Z",fill:"white"}),(0,R.jsx)("path",{d:"M22.0515 8.52295L16.0644 13.1954L9.94043 8.52295V8.52421L9.94783 8.53053V15.0732L15.9954 19.8466L22.0515 15.2575V8.52295Z",fill:"#EA4335"}),(0,R.jsx)("path",{d:"M23.6231 7.38639L22.0508 8.52292V15.2575L26.9983 11.459V9.17074C26.9983 9.17074 26.3978 5.90258 23.6231 7.38639Z",fill:"#FBBC05"}),(0,R.jsx)("path",{d:"M22.0508 15.2575V23.9924H25.8428C25.8428 23.9924 26.9219 23.8813 26.9995 22.6513V11.459L22.0508 15.2575Z",fill:"#34A853"}),(0,R.jsx)("path",{d:"M9.94811 24.0001V15.0732L9.94043 15.0669L9.94811 24.0001Z",fill:"#C5221F"}),(0,R.jsx)("path",{d:"M9.94014 8.52404L8.37646 7.39382C5.60179 5.91001 5 9.17692 5 9.17692V11.4651L9.94014 15.0667V8.52404Z",fill:"#C5221F"}
1),(0,R.jsx)("path",{d:"M9.94043 8.52441V15.0671L9.94811 15.0734V8.53073L9.94043 8.52441Z",fill:"#C5221F"}),(0,R.jsx)("path",{d:"M5 11.4668V22.6591C5.07646 23.8904 6.15673 24.0003 6.15673 24.0003H9.94877L9.94014 15.0671L5 11.4668Z",fill:"#4285F4"})]}),ti=()=>{var e,i,s,d,y,w,C,S;const{searchTerm:k}=(0,n.KC)(),[E]=(0,l.Bd)("global"),{setUser:N,user:T}=(0,v.p)(),[P,z]=(0,t.useState)("assistant"),L=(null===(e=(0,n.zy)().state)||void 0===e?void 0:e.openMail)||null;(0,t.useEffect)(()=>{null!==L&&void 0!==L&&L.platform&&z(L.platform)},[null===L||void 0===L?void 0:L.platform,null===L||void 0===L?void 0:L.meetingId]);const[D,O]=(0,t.useState)(null),[H,V]=(0,t.useState)(!1),[U,B]=(0,t.useState)(0),[G,Y]=(0,t.useState)(!1),[Z,J]=(0,t.useState)({name:"TekTime",logo:null}),[q,Q]=(0,t.useState)(!1),[$,ee]=(0,t.useState)(!1),[ie,se]=(0,t.useState)(window.innerWidth<768);(0,t.useEffect)(()=>{const e=()=>se(window.innerWidth<768);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const[te,ne]=(0,t.useState)(!1),[oe,ae]=(0,t.useState)(!1),[re,de]=(0,t.useState)(!1),[ce,he]=(0,t.useState)(!1),[xe,me]=(0,t.useState)(!1),fe=(0,t.useCallback)(()=>B(e=>e+1),[]),{loginOutlookAndSaveProfileData:pe,isOutlookSyncing:ge}=Qe({onSuccess:()=>{z("outlook"),ve(),fe()}}),ve=(0,t.useCallback)(async()=>{try{const e=await g.A.get("".concat(j.JR,"/users/").concat(X.A.get("user_id")),{headers:{Authorization:"Bearer ".concat(X.A.get("token"))}});200===e.status&&(O(e.data.data),N(e.data.data))}catch(e){console.error(e)}},[N]);(0,t.useEffect)(()=>{ve();(async()=>{try{const e=await(0,I._r)();null!==e&&void 0!==e&&e.data&&J({name:e.data.name||"TekTime",logo:e.data.logo})}catch(e){console.error(e)}})();(async()=>{try{var e,i,s;const t=JSON.parse(X.A.get("user")),n=await(0,I.oE)(null===t||void 0===t||null===(e=t.enterprise)||void 0===e?void 0:e.id);(null===n||void 0===n||null===(i=n.data)||void 0===i||null===(s=i.conversations)||void 0===s?void 0:s.length)>0&&Q(!0)}catch(t){console.error(t)}})()},[]);const ye=null===D||void 0===D||null===(i=D.email_links)||void 0===i?void 0:i.some(e=>"Outlook"===e.platform),je=(null===D||void 0===D||null===(s=D.ionos_links)||void 0===s?void 0:s.length)>0,be=(null===D||void 0===D||null===(d=D.gmail_suit)||void 0===d?void 0:d.length)>0,Ae=!0===(null===D||void 0===D||null===(y=D.enterprise)||void 0===y||null===(w=y.contract)||void 0===w?void 0:w.mission_need)&&(null===D||void 0===D||null===(C=D.user_needs)||void 0===C?void 0:C.some(e=>"mission_need"===e.need)),_e="MasterAdmin"===X.A.get("type"),we=(0,t.useMemo)(()=>[{key:"assistant",label:(0,R.jsxs)(c.A,{align:"center",size:8,style:{padding:"4px 0"},children:[(0,R.jsx)(h.A,{size:"small",src:Z.logo?Z.logo.startsWith("http")?Z.logo:"".concat(j.SD,"/").concat(Z.logo.replace(/^\//,"")):"/Assets/sidebar-invite-logo.svg"}),(0,R.jsx)("span",{style:{lineHeight:"1"},children:Z.name})]}),mobileLabel:Z.name,children:(0,R.jsx)(He,{isActive:"assistant"===P,assistantName:Z.name,assistantLogo:Z.logo})},{key:"handle",label:E("header.messagesToHandle.tabTitle","Messages \xe0 g\xe9rer"),mobileLabel:E("header.messagesToHandle.tabTitle","Messages \xe0 g\xe9rer"),children:(0,R.jsx)(Ne,{isActive:"handle"===P,searchTerm:k,userData:D})},Ae&&{key:"missions",label:"Missions",mobileLabel:"Missions",children:(0,R.jsx)(M,{isActive:"missions"===P,searchTerm:k,userData:D})},ye&&{key:"outlook",label:(0,R.jsxs)(c.A,{align:"center",style:{padding:"4px 0"},children:[(0,R.jsx)(o.PMk,{color:"#0A66C2",size:18})," Outlook"]}),mobileLabel:"Outlook",children:(0,R.jsx)(W,{isActive:"outlook"===P,searchTerm:k,userData:D,refreshTrigger:U,onShowCompose:()=>ae(!0),openMeetingId:"outlook"===(null===L||void 0===L?void 0:L.platform)?null===L||void 0===L?void 0:L.meetingId:void 0})},be&&{key:"gmail",label:(0,R.jsxs)(c.A,{align:"center",style:{padding:"4px 0"},children:[si," Gmail"]}),mobileLabel:"Gmail",children:(0,R.jsx)(F,{isActive:"gmail"===P,searchTerm:k,userData:D,refreshTrigger:U,onShowCompose:()=>de(!0),openMeetingId:"gmail"===(null===L||void 0===L?void 0:L.platform)?null===L||void 0===L?void 0:L.meetingId:void 0})},je&&{key:"ionos",label:(0,R.jsx)(c.A,{align:"center",style:{padding:"4px 0"},children:(0,R.jsx)(r.L6p,{color:"#003D8F",size:24})}),mobileLabel:"Ionos",children:(0,R.jsx)(K,{isActive:"ionos"===P,searchTerm:k,userData:D,refreshTrigger:U,refreshUser:ve,onShowCompose:()=>me(!0),openMeetingId:"ionos"===(null===L||void 0===L?void 0:L.platform)?null===L||void 0===L?void 0:L.meetingId:void 0})},q&&{key:"chatbot",label:(0,R.jsxs)(c.A,{align:"center",style:{padding:"4px 0"},children:[(0,R.jsx)(r.IFv,{size:18})," Chatbot"]}),mobileLabel:"Chatbot",children:(0,R.jsx)(le,{isActive:"chatbot"===P})},_e&&{key:"searches",label:(0,R.jsxs)(c.A,{align:"center",style:{padding:"4px 0"},children:[(0,R.jsx)(a.KSO,{size:14})," ",E("searches.tabTitle","Searches")]}),mobileLabel:E("searches.tabTitle","Searches"),children:(0,R.jsx)(ue,{isActive:"searches"===P})}
1].filter(Boolean),[P,Z,q,be,je,ye,k,Ae,E,D,U,_e,null===L||void 0===L?void 0:L.platform,null===L||void 0===L?void 0:L.meetingId]);return(0,R.jsxs)("div",{className:"d-flex flex-column bg-white ".concat(G?"position-fixed top-0 start-0 w-100 h-100 z-index-1000":""),style:{height:G?"100dvh":"calc(100dvh - 125px)",zIndex:G?2e3:1,overflow:"hidden"},children:[(0,R.jsxs)("div",{className:"p-3 border-bottom d-flex align-items-center justify-content-between bg-white shadow-sm",style:{flexShrink:0},children:[(0,R.jsxs)(c.A,{direction:"vertical",size:0,children:[(0,R.jsx)(ei,{level:4,className:"m-0",style:{fontSize:"clamp(16px, 4vw, 24px)"},children:"Discussions"}),(0,R.jsx)(ii,{type:"secondary",style:{fontSize:"11px"},className:"d-none d-sm-block",children:"G\xe9rez vos missions et messages"})]}),(0,R.jsxs)(c.A,{wrap:!0,children:[(0,R.jsx)(x.Ay,{type:"primary",icon:(0,R.jsx)(a.OiG,{}),onClick:()=>V(!0),loading:ge,size:window.innerWidth<576?"small":"middle",children:(0,R.jsx)("span",{className:"d-none d-sm-inline",children:E("discussion.Add Email")})}),("outlook"===P||"gmail"===P||"ionos"===P)&&(0,R.jsx)(m.A,{title:"Rafra\xeechir",children:(0,R.jsx)(x.Ay,{icon:(0,R.jsx)(a.KP4,{}),onClick:async()=>{ee(!0);try{"outlook"===P?await(0,I.fg)():"ionos"===P?await(0,I.xD)("sync=true"):"gmail"===P&&await(0,I.$T)(),fe(),ve()}catch(e){console.error(e)}finally{ee(!1)}},loading:$,size:window.innerWidth<576?"small":"middle"})}),(0,R.jsx)(x.Ay,{icon:G?(0,R.jsx)(a.Wsx,{}):(0,R.jsx)(a._AH,{}),onClick:()=>Y(!G),size:window.innerWidth<576?"small":"middle"})]})]}),(0,R.jsx)("div",{className:"flex-grow-1 d-flex flex-column overflow-hidden",style:{minHeight:0},children:ie?(0,R.jsxs)("div",{className:"d-flex flex-column h-100 overflow-hidden bg-white",children:[(0,R.jsx)("div",{className:"p-2 border-bottom bg-light",children:(0,R.jsx)(u.A,{value:P,onChange:z,className:"w-100",size:"large",dropdownStyle:{zIndex:1e4},children:we.map(e=>(0,R.jsx)(u.A.Option,{value:e.key,children:e.mobileLabel||e.label},e.key))})}),(0,R.jsx)("div",{className:"flex-grow-1",style:{position:"relative",overflow:"hidden",minHeight:0},children:(0,R.jsx)("div",{className:"w-100 h-100 d-flex flex-column",children:null===(S=we.find(e=>e.key===P))||void 0===S?void 0:S.children})})]}):(0,R.jsx)(f.A,{activeKey:P,onChange:z,items:we,className:"discussion-tabs",tabBarStyle:{background:"#fff",margin:0,padding:"4px 16px",borderBottom:"1px solid #f0f0f0",zIndex:5},destroyInactiveTabPane:!0})}),(0,R.jsx)("style",{children:"\n .discussion-tabs { height: 100%; display: flex; flex-direction: column; margin-top: 4px; }\n .discussion-tabs .ant-tabs-nav { margin-bottom: 0 !important; padding-top: 12px !important; }\n .discussion-tabs .ant-tabs-tab { padding-top: 10px !important; padding-bottom: 10px !important; }\n .discussion-tabs .ant-tabs-content-holder { flex: 1; overflow: hidden; min-height: 0; }\n .discussion-tabs .ant-tabs-content { height: 100%; }\n .discussion-tabs .ant-tabs-tabpane { height: 100%; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }\n "}),(0,R.jsx)(Je,{show:H,onHide:()=>V(!1),connectedServices:{gmail:be,outlook:ye,ionos:je},onSelect:e=>{V(!1),"outlook"===e?pe():"ionos"===e?ne(!0):"gmail"===e&&(be?de(!0):he(!0))}}),(0,R.jsx)(p.A,{open:te,onCancel:()=>ne(!1),footer:null,title:"Ajouter Compte Ionos",children:(0,R.jsx)(Ye,{handleClose:()=>ne(!1),triggerRefresh:ve})}),(0,R.jsx)(p.A,{open:ce,onCancel:()=>he(!1),footer:null,width:700,centered:!0,destroyOnClose:!0,children:(0,R.jsx)($e.A,{user:D,onUpdate:()=>{he(!1),ve(),fe()}})}),(0,R.jsx)(b.A,{show:oe,onClose:()=>ae(!1),onEmailAdded:fe}),(0,R.jsx)(A.A,{show:re,onClose:()=>de(!1),onEmailAdded:fe}),(0,R.jsx)(_.A,{show:xe,onClose:()=>me(!1),onEmailAdded:fe})]})}}}]); 2//# sourceMappingURL=5233.aae24a0a.chunk.js.map
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.