1"use strict";(globalThis.webpackChunk_archive_intel_client_ui||=[]).push([[1849],{51849(e,s,t){t.r(s),t.d(s,{default:()=>y});var a=t(50016),l=t(40763),i=t(40013),n=t(92658),d=t(7630),r=t(75248),c=t(76211),o=t(84351),x=t(12213),m=t(24944);var h=t(9431),j=t(51746),u=t(80474),v=t(66628),p=t(6733),b=t(13161),N=t(65732),g=t(90076);const A=e=>{var s,t,a;const l=e.data;return(0,g.jsxs)(o.A.Body,{className:"px-0 py-3",children:[(0,g.jsxs)("div",{className:"px-3",children:[(0,g.jsx)("div",{className:"d-flex justify-content-between",children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{children:v.A.truncate(null===l||void 0===l?void 0:l.subject,50)}),message:null===l||void 0===l?void 0:l.subject,position:"top",id:"c_btn"})}),(0,g.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-3",children:(0,g.jsx)("p",{className:"font-12 text-secondary mb-0",children:v.A.getFormatedDateForDetail(null!==(s=null===l||void 0===l?void 0:l.dateTime)&&void 0!==s?s:null===l||void 0===l?void 0:l.objectDateTime)})}),(0,g.jsx)("div",{className:"px-0",children:(0,g.jsxs)(b.A,{className:"border-0",children:[(0,g.jsxs)("div",{className:"mb-0 col-12 d-flex gap-2",children:[(0,g.jsx)("p",{className:"text-secondary mb-0 font-12",children:" From: "}),(0,g.jsx)("span",{className:"font-14 mb-0",children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{children:v.A.truncate(null===l||void 0===l?void 0:l.sender,45)}),message:null===l||void 0===l?void 0:l.sender,position:"top",id:"c_btn"})})]}),(0,g.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[(0,g.jsx)("p",{className:"text-secondary mb-0 font-12",children:" To:"}),(0,g.jsx)("span",{className:"font-14 d-flex justify-content-between",children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{children:v.A.truncate(null===l||void 0===l?void 0:l.receiver,45)}),message:null===l||void 0===l?void 0:l.receiver,position:"top",id:"c_btn"})})," "]})]})})]}),(0,g.jsx)("hr",{className:"border-secondary-subtle"}),(0,g.jsx)("div",{className:"px-3",children:(0,g.jsx)("iframe",{title:"historical-email-body",className:"px-3 mb-3 w-100",style:{minHeight:"500px"},srcDoc:`<base target="_blank">${null!==(t=null===l||void 0===l?void 0:l.body)&&void 0!==t?t:""}`})}),(0,g.jsx)("hr",{className:" border-secondary-subtle"}),(0,g.jsx)("div",{className:"px-3",children:null===l||void 0===l||null===(a=l.attachments)||void 0===a?void 0:a.map((e,s)=>(0,g.jsxs)("div",{className:"d-flex gap-2 align-items-center mb-3",children:[(0,g.jsx)("div",{className:"text-primary",children:(0,g.jsx)(N.jtL,{size:18})}),(0,g.jsx)("div",{className:" text-primary font-14 attachments",style:{cursor:"pointer"},onClick:()=>(null===e||void 0===e?void 0:e.url)&&window.open(e.url),children:null===e||void 0===e?void 0:e.name})]},`hist_att_${s}`))})]})};var f=t(10519),w=t(54011);const y=()=>{const e=(0,h.d4)(e=>e.tI.tenantId),s=(0,h.d4)(e=>e.aT.aT),[t,b]=(0,a.useState)(!1),[N,y]=(0,a.useState)([]),[_,S]=(0,a.useState)(1),[C,k]=(0,a.useState)("object_date_time"),[D,E]=(0,a.useState)("DESC"),[T,F]=(0,a.useState)(0),[L,I]=(0,a.useState)(!1),[$,P]=(0,a.useState)(null),[z,H]=(0,a.useState)(""),[R,B]=(0,a.useState)(""),[K,M]=(0,a.useState)(""),[W,U]=(0,a.useState)(""),[Y,q]=(0,a.useState)([]),[G,J]=(0,a.useState)(!1);(0,a.useEffect)(()=>{Q()},[D,_,C,z,R,K,W]);const O=e=>({sender:z||null,receiver:R||null,dateFrom:K||null,dateTo:W||null,idList:e&&Y.length>0?Y:null}),Q=()=>{const t={page:_.toString(),sort_by:C,order_by:D};b(!0);var a=new URLSearchParams(t).toString();return j.A.postAPI({action:"historical-data/file/list?"+a,body:O(!1),isShowError:!0,access_token:s,t_id:e}).then(e=>{y(e.list),F(null===e||void 0===e?void 0:e.count),b(!1)}).catch(e=>(b(!1),e))},V=e=>{C===e?E("ASC"===D?"DESC":"ASC"):(k(e),E("object_date_time"===e?"DESC":"ASC")),S(1)},X=e=>C===e?"ASC"===D?" \u25b2":" \u25bc":"",Z=t=>{const a="all"===t?{}:"filter"===t?O(!1):{idList:Y};"selection"!==t||0!==Y.length?(J(!0),j.A.postAPI({action:"historical-data/export",body:a,isShowError:!0,access_token:s,t_id:e}).then(e=>{var s;x.oR.success(null!==(s=null===e||void 0===e?void 0:e.message)&&void 0!==s?s:"Export started. Check the Download Manager for the file."),J(!1)}).catch(()=>{J(!1)})):x.oR.warn("Select at least one file to export")};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"page-contetn page-flagging page-review-list",children:[(0,g.jsxs)(l.A,{className:"filter-row mb
1-3 align-items-center justify-content-end",children:[(0,g.jsx)(i.A,{className:"page-title",children:(0,g.jsx)(m.A,{Title:`Historical data (${null!==T&&void 0!==T?T:0})`})}),(0,g.jsx)(i.A,{lg:6,xxl:6,className:"d-flex justify-content-end gap-2 align-items-center",children:(0,g.jsxs)(n.A,{children:[(0,g.jsx)(n.A.Toggle,{className:"btn-brand-light text-nowrap",disabled:G,children:G?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d.A,{size:"sm",className:"me-1"}),"Starting..."]}):"Export"}),(0,g.jsxs)(n.A.Menu,{children:[(0,g.jsx)(n.A.Item,{onClick:()=>Z("all"),children:"Export all"}),(0,g.jsx)(n.A.Item,{onClick:()=>Z("filter"),children:"Export filtered"}),(0,g.jsxs)(n.A.Item,{onClick:()=>Z("selection"),children:["Export selected (",Y.length,")"]})]})]})})]}),(0,g.jsxs)(l.A,{className:"mb-3 g-2 align-items-end",children:[(0,g.jsxs)(i.A,{md:3,children:[(0,g.jsx)(r.A.Label,{className:"font-12 mb-1",children:"Sender"}),(0,g.jsx)(r.A.Control,{size:"sm",placeholder:"Filter by sender",onKeyDown:e=>{"Enter"===e.key&&(H(e.currentTarget.value),S(1))}})]}),(0,g.jsxs)(i.A,{md:3,children:[(0,g.jsx)(r.A.Label,{className:"font-12 mb-1",children:"Receiver"}),(0,g.jsx)(r.A.Control,{size:"sm",placeholder:"Filter by receiver",onKeyDown:e=>{"Enter"===e.key&&(B(e.currentTarget.value),S(1))}})]}),(0,g.jsxs)(i.A,{md:2,children:[(0,g.jsx)(r.A.Label,{className:"font-12 mb-1",children:"From"}),(0,g.jsx)(r.A.Control,{size:"sm",type:"date",value:K,onChange:e=>{M(e.target.value),S(1)}})]}),(0,g.jsxs)(i.A,{md:2,children:[(0,g.jsx)(r.A.Label,{className:"font-12 mb-1",children:"To"}),(0,g.jsx)(r.A.Control,{size:"sm",type:"date",value:W,onChange:e=>{U(e.target.value),S(1)}})]})]}),(0,g.jsx)("div",{className:"collapse-page",children:(0,g.jsxs)("div",{className:"data-container historical-data-grid",children:[t?(0,g.jsx)("div",{className:"mb-0 table-wrap position-relative w-100",children:(0,g.jsxs)("div",{className:"dashboard-loader",children:[(0,g.jsx)("div",{className:"loader"}),(0,g.jsx)("br",{})]})}):N.length?(0,g.jsx)("div",{className:"table-card table-container mb-4",children:(0,g.jsxs)(c.A,{className:"table-style",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{style:{width:"32px"}}),(0,g.jsxs)("th",{className:"d-flex text-nowrap",children:[(0,g.jsx)("span",{className:"me-2"}),(0,g.jsx)("span",{children:"File Name"})]}),(0,g.jsxs)("th",{className:"text-nowrap cursor-pointer",onClick:()=>V("sender"),children:["From",X("sender")]}),(0,g.jsxs)("th",{className:"text-nowrap cursor-pointer",onClick:()=>V("receiver"),children:["To",X("receiver")]}),(0,g.jsx)("th",{children:"Subject"}),(0,g.jsx)("th",{className:"text-nowrap",children:"Attachments"}),(0,g.jsxs)("th",{className:"text-nowrap cursor-pointer",style:{minWidth:"190px"},onClick:()=>V("object_date_time"),children:["Date",X("object_date_time")]})]})}),(0,g.jsx)("tbody",{children:N.map((t,a)=>(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:(0,g.jsx)(r.A.Check,{type:"checkbox","aria-label":"Select file for export",checked:Y.includes(t.id),onChange:e=>{return s=t.id,a=e.target.checked,void q(e=>a?[...e.filter(e=>e!==s),s]:e.filter(e=>e!==s));var s,a}})}),(0,g.jsx)("td",{className:"d-flex text-nowrap",children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{id:`card_${t.id}`,className:"text-primary cursor-pointer",onClick:()=>(t=>{var a;if((null!==(a=null===t||void 0===t?void 0:t.fileName)&&void 0!==a?a:"").toLowerCase().endsWith(".eml"))return j.A.addLoader(`card_${t.id}`),j.A.getAPI({action:`historical-data/file/details?id=${t.id}`,body:null,isShowError:!0,access_token:s,t_id:e}).then(e=>{P(e),I(!0),j.A.removeLoader(`card_${t.id}`)}).catch(e=>(j.A.removeLoader(`card_${t.id}`),e));window.open(null===t||void 0===t?void 0:t.filePath)})(t),children:v.A.truncate(null===t||void 0===t?void 0:t.fileName,35)}),message:(0,g.jsx)("span",{children:null===t||void 0===t?void 0:t.fileName}),position:"top",id:"c_btn"})}),(0,g.jsx)("td",{children:v.A.truncate(null===t||void 0===t?void 0:t.sender,40)}),(0,g.jsx)("td",{children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{children:v.A.truncate(null===t||void 0===t?void 0:t.receiver,40)}),message:(0,g.jsx)("span",{children:null===t||void 0===t?void 0:t.receiver}),position:"top",id:"c_btn"})}),(0,g.jsx)("td",{children:(0,g.jsx)(u.t,{st:(0,g.jsx)("span",{className:"cursor-pointer",onClick:()=>{window.open(null===t||void 0===t?void 0:t.filePath)},children:v.A.truncate(null===t||void 0===t?void 0:t.subject,50)}),message:(0,g.jsx)("span",{children:null===t||void 0===t?void 0:t.subject}),position:"top",id:"c_btn"})}),(0,g.jsx)("td",{className:"text-nowrap",children:(null===t||void 0===t?void 0:t.attachmentCount)>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f.Y4x,{className:"me-1"}),null===t||void 0===t?void 0:t.attachmentCount]})}),(0,g.jsx)("td",{className:"text-nowrap",children:v.A.getFormatedDateForDetail((null===t||void 0===t?void 0:t.objectDateTime)||(null===t||void 0===t?void 0:t.uploadedDate))})]},`file_row_${a}`))})]})}):(0,g.jsx)("div",{className:"table-wrap position-relative table-container card",children:(0,g.jsx)("div",{className:"no-data-flound bg-white py-5 rounded-4",children:(0,g.jsxs)("div",{className:"text-center",children:[(0,g.jsx)("img",{alt:"",src:w.A,width:110,className:"mb-3"}),(0,g.jsx)("h3",{className:"text-secondary font-12",children:"No data found"})]})})}),!t&&(0,g.jsx)(p.A,{className:"justify-content-end",pagination:100,totalItems:T,changePage:e=>{S(e)},changeCurrentPage:_})]})})]}),(0,g.jsxs)(o.A,{show:L,onHide:()=>I(!1),placement:"end",className:"w-40",children:[(0,g.jsx)(o.A.Header,{closeButton:!0,children:(0,g.jsx)(o.A.Title,{className:"font-16",children:"Email"})}),(0,g.jsx)(A,{data:$})]})]})}}}]);
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.