%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/
Upload File :
Create Path :
Current File : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/150.20aa5374.chunk.js

(this["webpackJsonpfuse-react-app"]=this["webpackJsonpfuse-react-app"]||[]).push([[150],{1137:function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var l=a(39),c=a(1072),i=a(5),r=a(0),s=a(43),n=a(1099),o=a(27),d=a(6),j=a(1);var b=function(e){const t=Object(s.a)(),a=Object(d.c)(Object(o.c)(t.palette.primary.main));return Object(j.jsx)("div",{className:e.classes.header,children:e.header&&Object(j.jsx)(n.a,{theme:a,children:e.header})})},m=a(94),p=a(1121),h=a(1125);var x=function(e){const t=Object(s.a)(),a=Object(d.c)(Object(o.c)(t.palette.primary.main)),{classes:c}=e;return Object(j.jsxs)(j.Fragment,{children:[e.header&&Object(j.jsx)(n.a,{theme:a,children:Object(j.jsx)("div",{className:Object(i.a)(c.sidebarHeader,e.variant),children:e.header})}),e.content&&Object(j.jsx)(l.a,{className:c.sidebarContent,enable:e.innerScroll,children:e.content})]})};function O(e,t){const[a,l]=Object(r.useState)(!1),{classes:c}=e;Object(r.useImperativeHandle)(t,(()=>({toggleSidebar:s})));const s=()=>{l(!a)};return Object(j.jsxs)(j.Fragment,{children:[Object(j.jsx)(p.a,{lgUp:"permanent"===e.variant,children:Object(j.jsx)(h.a,{variant:"temporary",anchor:e.position,open:a,onOpen:e=>{},onClose:e=>s(),disableSwipeToOpen:!0,classes:{root:Object(i.a)(c.sidebarWrapper,e.variant),paper:Object(i.a)(c.sidebar,e.variant,"left"===e.position?c.leftSidebar:c.rightSidebar)},ModalProps:{keepMounted:!0},container:e.rootRef.current,BackdropProps:{classes:{root:c.backdrop}},style:{position:"absolute"},children:Object(j.jsx)(x,{...e})})}),"permanent"===e.variant&&Object(j.jsx)(p.a,{mdDown:!0,children:Object(j.jsx)(m.a,{variant:"permanent",className:Object(i.a)(c.sidebarWrapper,e.variant),open:a,classes:{paper:Object(i.a)(c.sidebar,e.variant,"left"===e.position?c.leftSidebar:c.rightSidebar)},children:Object(j.jsx)(x,{...e})})})]})}var u=Object(r.forwardRef)(O);const f=200,g=Object(c.a)((e=>({"@global":{"#fuse-main":{height:e=>e.innerScroll&&"100vh"}},root:{display:"flex",flexDirection:"row",minWidth:0,minHeight:"100%",position:"relative",flex:"1 1 auto",height:"auto",backgroundColor:e.palette.background.default},innerScroll:{height:"100%"},topBg:{position:"absolute",left:0,right:0,top:0,height:f,background:"linear-gradient(to right, ".concat(e.palette.primary.dark," 0%, ").concat(e.palette.primary.main," 100%)"),backgroundSize:"cover",pointerEvents:"none"},contentWrapper:{display:"flex",flexDirection:"column",padding:"0 3.2rem",flex:"1 1 100%",zIndex:2,maxWidth:"100%",minWidth:0,minHeight:0,[e.breakpoints.down("xs")]:{padding:"0 1.6rem"}},header:{height:136,minHeight:136,maxHeight:136,display:"flex",color:e.palette.primary.contrastText},headerSidebarToggleButton:{color:e.palette.primary.contrastText},contentCard:{display:"flex",flex:"1 1 100%",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",minHeight:0,borderRadius:"20px 20px 0 0"},toolbar:{height:64,minHeight:64,display:"flex",alignItems:"center",borderBottom:"1px solid ".concat(e.palette.divider)},content:{flex:"1 1 auto",height:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"},sidebarWrapper:{position:"absolute",backgroundColor:"transparent",zIndex:5,overflow:"hidden","&.permanent":{[e.breakpoints.up("lg")]:{zIndex:1,position:"relative"}}},sidebar:{position:"absolute","&.permanent":{[e.breakpoints.up("lg")]:{backgroundColor:"transparent",position:"relative",border:"none",overflow:"hidden"}},width:240,height:"100%"},leftSidebar:{},rightSidebar:{},sidebarHeader:{height:f,minHeight:f,color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark,"&.permanent":{[e.breakpoints.up("lg")]:{backgroundColor:"transparent"}}},sidebarContent:{display:"flex",flex:"1 1 auto",flexDirection:"column",backgroundColor:e.palette.background.default,color:e.palette.text.primary,[e.breakpoints.up("lg")]:{overflow:"auto","-webkit-overflow-scrolling":"touch"}},backdrop:{position:"absolute"}}))),v=Object(r.forwardRef)(((e,t)=>{const a=Object(r.useRef)(null),c=Object(r.useRef)(null),s=Object(r.useRef)(null),n=g(e),o=e.rightSidebarHeader||e.rightSidebarContent,d=e.leftSidebarHeader||e.leftSidebarContent;return Object(r.useImperativeHandle)(t,(()=>({rootRef:s,toggleLeftSidebar:()=>{a.current.toggleSidebar()},toggleRightSidebar:()=>{c.current.toggleSidebar()}}))),Object(j.jsxs)("div",{className:Object(i.a)(n.root,e.innerScroll&&n.innerScroll),ref:s,children:[Object(j.jsx)("div",{className:n.topBg}),Object(j.jsxs)("div",{className:"flex container w-full",children:[d&&Object(j.jsx)(u,{position:"left",header:e.leftSidebarHeader,content:e.leftSidebarContent,variant:e.leftSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:n,ref:a,rootRef:s}),Object(j.jsxs)("div",{className:Object(i.a)(n.contentWrapper,d&&(void 0===e.leftSidebarVariant||"permanent"===e.leftSidebarVariant)&&"lg:ltr:pl-0 lg:rtl:pr-0",o&&(void 0===e.rightSidebarVariant||"permanent"===e.rightSidebarVariant)&&"lg:pr-0"),children:[Object(j.jsx)(b,{header:e.header,classes:n}),Object(j.jsxs)("div",{className:Object(i.a)(n.contentCard,e.innerScroll&&"inner-scroll"),children:[e.contentToolbar&&Object(j.jsx)("div",{className:n.toolbar,children:e.contentToolbar}),e.content&&Object(j.jsx)(l.a,{className:n.content,enable:e.innerScroll,scrollToTopOnRouteChange:e.innerScroll,children:e.content})]})]}),o&&Object(j.jsx)(u,{position:"right",header:e.rightSidebarHeader,content:e.rightSidebarContent,variant:e.rightSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:n,ref:c,rootRef:s})]})]})}));v.defaultProps={};var y=Object(r.memo)(v)},2698:function(e,t,a){"use strict";a.r(t);var l=a(1137),c=a(133),i=a(0),r=a(6),s=a(49),n=a(10),o=a(1124),d=a(1108),j=a(1090),b=a(1028),m=a(194),p=a(1118),h=a(89),x=a(1072),O=a(5),u=a(1);const f=Object(x.a)((e=>({root:{display:"flex",alignItems:"center",height:20,borderRadius:10,padding:"0 6px",fontSize:10,backgroundColor:"rgba(0,0,0,.08);"},color:{width:8,height:8,marginRight:4,borderRadius:"50%"}})));var g=function(e){const t=f();return Object(u.jsxs)("div",{className:Object(O.a)(t.root,e.className),children:[Object(u.jsx)("div",{className:t.color,style:{backgroundColor:e.color}}),Object(u.jsx)("div",{children:e.title})]})},v=a(19),y=a(50),N=a.n(y);const S=Object(v.b)("mailApp/labels/getLabels",(async()=>{const e=await N.a.get("/api/mail-app/labels");return await e.data})),w=Object(v.c)({}),{selectAll:k,selectEntities:C,selectById:A}=w.getSelectors((e=>e.mailApp.labels));var I=Object(v.d)({name:"mailApp/labels",initialState:w.getInitialState(null),reducers:{},extraReducers:{[S.fulfilled]:w.setAll}}).reducer,M=a(45);const R=Object(v.b)("mailApp/mail/getMail",(async e=>{const t=await N.a.get("/api/mail-app/mail",{params:e});return await t.data})),T=Object(v.b)("mailApp/mail/updateMail",(async(e,t)=>{let{getState:a,dispatch:l}=t;const{id:c}=a().mailApp.mail,i=await N.a.post("/api/mail-app/update-mail",{id:c,...e}),r=await i.data;return l(Object(M.c)({message:"Mail Saved"})),r}));var E=Object(v.d)({name:"mailApp/mail",initialState:null,reducers:{},extraReducers:{[R.fulfilled]:(e,t)=>t.payload,[T.fulfilled]:(e,t)=>({...e,...t.payload})}}).reducer;var H=Object(s.k)((function(e){const t=Object(r.b)(),a=Object(r.c)((e=>{let{mailApp:t}=e;return t.mail})),l=Object(r.c)(C),c=Object(s.j)(),[x,O]=Object(i.useState)(!1);return Object(h.b)((()=>{t(R(c))}),[t,c]),a?Object(u.jsxs)("div",{className:"p-16 sm:p-24",children:[Object(u.jsx)("div",{className:"flex items-center justify-between overflow-hidden",children:Object(u.jsxs)("div",{className:"flex flex-col",children:[Object(u.jsx)(p.a.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.1}},children:Object(u.jsx)(m.a,{variant:"subtitle1",className:"flex",children:a.subject})}),!n.a.isEmpty(l)&&a.labels.length>0&&Object(u.jsx)("div",{className:"flex flex-wrap mt-8 -mx-2",children:a.labels.map((e=>Object(u.jsx)(g,{className:"mt-4 mx-2",title:l[e].title,color:l[e].color},e)))})]})}),Object(u.jsx)(d.a,{className:"my-24"}),Object(u.jsxs)(p.a.div,{initial:{y:50,opacity:0},animate:{y:0,opacity:1,transition:{delay:.2}},children:[Object(u.jsxs)("div",{className:"flex items-start justify-between",children:[Object(u.jsxs)("div",{className:"flex items-center justify-start",children:[a.from.avatar?Object(u.jsx)(o.a,{alt:a.from.name,src:a.from.avatar}):Object(u.jsx)(o.a,{children:a.from.name[0]}),Object(u.jsxs)("div",{className:"flex flex-col mx-8",children:[Object(u.jsx)("span",{children:a.from.name}),Object(u.jsxs)(m.a,{component:"div",color:"textSecondary",variant:"body1",className:"flex items-center justify-start",children:[Object(u.jsx)("div",{children:"to"}),Object(u.jsx)("div",{className:"mx-4",children:a.to[0].name})]})]})]}),Object(u.jsx)(b.a,{children:Object(u.jsx)(j.a,{children:"more_vert"})})]}),Object(u.jsxs)("div",{className:"my-16",children:[Object(u.jsx)(m.a,{color:"primary",className:"cursor-pointer underline mb-8",onClick:()=>{O(!x)},children:x?Object(u.jsx)("span",{children:"Hide Details"}):Object(u.jsx)("span",{children:"Show Details"})}),x&&Object(u.jsxs)("div",{className:"flex",children:[Object(u.jsxs)(m.a,{variant:"body2",className:"flex flex-col",children:[Object(u.jsx)("span",{children:"From:"}),Object(u.jsx)("span",{children:"To:"}),Object(u.jsx)("span",{children:"Date:"})]}),Object(u.jsxs)(m.a,{variant:"body2",color:"textSecondary",className:"px-4 flex flex-col",children:[Object(u.jsx)("span",{children:a.from.email}),Object(u.jsx)("span",{children:a.to[0].email}),Object(u.jsx)("span",{children:a.time})]})]})]}),Object(u.jsx)(m.a,{className:"text-14 my-24 leading-normal",variant:"body2",dangerouslySetInnerHTML:{__html:a.message}}),Object(u.jsx)(d.a,{className:"my-24"}),a.attachments&&Object(u.jsxs)("div",{children:[Object(u.jsxs)(m.a,{variant:"subtitle1",className:"mb-16",children:[Object(u.jsx)("span",{className:"mx-4 font-medium",children:"Attachments"}),Object(u.jsxs)("span",{children:["(",a.attachments.length,")"]})]}),Object(u.jsx)("div",{className:"flex flex-wrap -mx-8",children:a.attachments.map((e=>Object(u.jsxs)("div",{className:"w-128 px-8 pb-16",children:[Object(u.jsx)("img",{className:"w-full rounded-16",src:e.preview,alt:e.fileName}),Object(u.jsxs)("div",{className:"flex flex-col pt-8",children:[Object(u.jsx)(m.a,{color:"primary",className:"hover:underline cursor-pointer",onClick:e=>e.preventDefault(),children:"View"}),Object(u.jsx)(m.a,{color:"primary",className:"hover:underline cursor-pointer",onClick:e=>e.preventDefault(),children:"Download"}),Object(u.jsxs)(m.a,{className:"text-12",children:["(",e.size,")"]})]})]},e.fileName)))})]})]})]}):null})),B=a(43);const L=a(1385);var P=Object(s.k)((function(e){const t=Object(r.b)(),a=Object(r.c)((e=>{let{mailApp:t}=e;return t.mail})),l=Object(B.a)(),c=L.compile(e.match.path),i={...Object(s.j)()};delete i.mailId;const n=c(i);return a?Object(u.jsxs)("div",{className:"flex flex-1 items-center justify-between overflow-hidden sm:px-16",children:[Object(u.jsx)(b.a,{onClick:()=>e.history.push(n),children:Object(u.jsx)(j.a,{children:"ltr"===l.direction?"arrow_back":"arrow_forward"})}),Object(u.jsxs)("div",{className:"flex items-center justify-start","aria-label":"Toggle star",children:[Object(u.jsx)(p.a.div,{initial:{scale:0},animate:{scale:1,transition:{delay:.1}},children:Object(u.jsx)(b.a,{onClick:()=>t(T({starred:!a.starred})),children:a.starred?Object(u.jsx)(j.a,{children:"star"}):Object(u.jsx)(j.a,{children:"star_border"})})}),Object(u.jsx)(p.a.div,{initial:{scale:0},animate:{scale:1,transition:{delay:.1}},children:Object(u.jsx)(b.a,{onClick:()=>t(T({important:!a.important})),children:a.important?Object(u.jsx)(j.a,{children:"label"}):Object(u.jsx)(j.a,{children:"label_off"})})})]})]}):null})),W=a(1121),D=a(548),z=a(193),_=a(1099),F=a(2713),V=a(27);const U=Object(v.b)("mailApp/mails/getMails",(async(e,t)=>{let{getState:a}=t;e=e||a().mailApp.mails.routeParams;const l=await N.a.get("/api/mail-app/mails",{params:e});return{data:await l.data,routeParams:e}})),q=Object(v.b)("mailApp/mails/setFolderOnSelectedMails",(async(e,t)=>{let{dispatch:a,getState:l}=t;const{selectedMailIds:c}=l().mailApp.mails,i=await N.a.post("/api/mail-app/set-folder",{selectedMailIds:c,folderId:e}),r=await i.data;return a(U()),r})),J=Object(v.b)("mailApp/mails/toggleLabelOnSelectedMails",(async(e,t)=>{let{dispatch:a,getState:l}=t;const{selectedMailIds:c}=l().mailApp.mails,i=await N.a.post("/api/mail-app/toggle-label",{selectedMailIds:c,labelId:e}),r=await i.data;return a(U()),r})),Y=Object(v.c)({}),{selectAll:G,selectById:K}=Y.getSelectors((e=>e.mailApp.mails)),Q=Object(v.d)({name:"mailApp/mails",initialState:Y.getInitialState({searchText:"",routeParams:{},selectedMailIds:[]}),reducers:{setMailsSearchText:{reducer:(e,t)=>{e.searchText=t.payload},prepare:e=>({payload:e.target.value||""})},selectAllMails:(e,t)=>{e.selectedMailIds=e.ids},deselectAllMails:(e,t)=>{e.selectedMailIds=[]},selectMailsByParameter:(e,t)=>{const[a,l]=t.payload;e.selectedMailIds=e.ids.filter((t=>e.entities[t][a]===l))},toggleInSelectedMails:(e,t)=>{const a=t.payload;e.selectedMailIds=e.selectedMailIds.includes(a)?e.selectedMailIds.filter((e=>e!==a)):[...e.selectedMailIds,a]}},extraReducers:{[U.fulfilled]:(e,t)=>{const{data:a,routeParams:l}=t.payload;Y.setAll(e,a),e.routeParams=l,e.selectedMailIds=[]}}}),{setMailsSearchText:X,selectAllMails:Z,deselectAllMails:$,selectMailsByParameter:ee,toggleInSelectedMails:te}=Q.actions;var ae=Q.reducer;var le=function(e){const t=Object(r.b)(),a=Object(r.c)((e=>{let{mailApp:t}=e;return t.mails.searchText})),l=Object(r.c)(V.e),{t:c}=Object(F.a)("mailApp");return Object(u.jsx)(_.a,{theme:l,children:Object(u.jsx)("div",{className:"flex flex-1",children:Object(u.jsxs)(z.a,{className:"flex items-center w-full h-48 sm:h-56 p-16 ltr:pl-4 lg:ltr:pl-16 rtl:pr-4 lg:rtl:pr-16 shadow",children:[Object(u.jsx)(W.a,{lgUp:!0,children:Object(u.jsx)(b.a,{onClick:t=>e.pageLayout.current.toggleLeftSidebar(),"aria-label":"open left sidebar",children:Object(u.jsx)(j.a,{children:"menu"})})}),Object(u.jsx)(j.a,{color:"action",children:"search"}),Object(u.jsx)(D.a,{placeholder:c("SEARCH_PLACEHOLDER"),className:"px-16",disableUnderline:!0,fullWidth:!0,value:a,inputProps:{"aria-label":"Search"},onChange:e=>t(X(e))})]})})})},ce=a(75),ie=a(1033),re=a(1034),se=a(1103),ne=a(1107),oe=a(131),de=a(1100),je=a(1098),be=a(1085),me=a(1196),pe=a(1194),he=a(1096),xe=a(1101),Oe=a(32),ue=a(57),fe=a(1386),ge=a(1599),ve=a(1600),ye=a.n(ve);a(1601);const Ne=Object(x.a)({root:{"& .rdw-dropdown-selectedtext":{color:"inherit"}},toolbar:{borderWidth:"0 0 1px 0!important",margin:"0!important"},wrapper:{},editor:{padding:"8px 12px",height:"".concat(256,"px!important")}});var Se=Object(i.forwardRef)(((e,t)=>{const a=Ne(),[l,c]=Object(i.useState)(fe.EditorState.createEmpty());return Object(u.jsx)("div",{className:Object(O.a)(a.root,"rounded-4 border-1 overflow-hidden w-full",e.className),ref:t,children:Object(u.jsx)(ge.Editor,{editorState:l,toolbarClassName:a.toolbar,wrapperClassName:a.wrapper,editorClassName:a.editor,onEditorStateChange:function(t){return c(t),e.onChange(ye()(Object(fe.convertToRaw)(t.getCurrentContent())))}})})}));const we=Object(x.a)({root:{fontSize:13,backgroundColor:"rgba(0, 0, 0, 0.08)",border:"1px solid rgba(0, 0, 0, 0.16)",paddingLeft:16,marginBottom:8,borderRadius:2,display:"flex",justifyContent:"space-between",alignItems:"center"},filename:{fontWeight:600},size:{marginLeft:8,fontWeight:300}});var ke=function(e){const t=we();return Object(u.jsxs)("div",{className:Object(O.a)(t.root,e.className),children:[Object(u.jsxs)("div",{className:"flex",children:[Object(u.jsx)(m.a,{variant:"caption",className:t.filename,children:e.fileName}),Object(u.jsxs)(m.a,{variant:"caption",className:t.size,children:["(",e.size,")"]})]}),Object(u.jsx)(b.a,{children:Object(u.jsx)(j.a,{className:"text-16",children:"close"})})]})};const Ce=ue.d().shape({to:ue.f().required("You must enter an e-mail").email("You must enter a valid e-mail.")});var Ae=function(){const[e,t]=Object(i.useState)(!1),{watch:a,handleSubmit:l,formState:c,control:r}=Object(Oe.f)({mode:"onChange",defaultValues:{from:"johndoe@creapond.com",to:"",cc:"",bcc:"",subject:"",message:""},resolver:Object(oe.a)(Ce)}),{isValid:s,dirtyFields:o,errors:d}=c,{t:p}=Object(F.a)("mailApp");return Object(u.jsxs)("div",{className:"p-24 pb-8",children:[Object(u.jsx)(je.a,{variant:"contained",color:"secondary",className:"w-full",onClick:function(){t(!0)},children:p("COMPOSE")}),Object(u.jsxs)(be.a,{open:e,onClose:function(){t(!1)},"aria-labelledby":"form-dialog-title",children:[Object(u.jsx)(de.a,{position:"static",elevation:0,children:Object(u.jsx)(xe.a,{className:"flex w-full",children:Object(u.jsx)(m.a,{variant:"subtitle1",color:"inherit",children:"New Message"})})}),Object(u.jsxs)("form",{noValidate:!0,onSubmit:l((function(e){console.info(e),t(!1)})),className:"flex flex-col",children:[Object(u.jsxs)(pe.a,{classes:{root:"p-16 pb-0 sm:p-24 sm:pb-0"},children:[Object(u.jsx)(Oe.a,{name:"from",control:r,render:e=>{let{field:t}=e;return Object(u.jsx)(he.a,{...t,className:"mt-8 mb-16",label:"From",id:"from",variant:"outlined",fullWidth:!0,inputProps:{readOnly:!0}})}}),Object(u.jsx)(Oe.a,{name:"to",control:r,render:e=>{var t;let{field:a}=e;return Object(u.jsx)(he.a,{...a,className:"mt-8 mb-16",label:"To",autoFocus:!0,id:"to",error:!!d.to,helperText:null===d||void 0===d||null===(t=d.to)||void 0===t?void 0:t.message,variant:"outlined",fullWidth:!0,required:!0})}}),Object(u.jsx)(Oe.a,{name:"cc",control:r,render:e=>{let{field:t}=e;return Object(u.jsx)(he.a,{...t,className:"mt-8 mb-16",label:"Cc",id:"cc",variant:"outlined",fullWidth:!0})}}),Object(u.jsx)(Oe.a,{name:"bcc",control:r,render:e=>{let{field:t}=e;return Object(u.jsx)(he.a,{...t,className:"mt-8 mb-16",label:"Bcc",id:"bcc",name:"bcc",variant:"outlined",fullWidth:!0})}}),Object(u.jsx)(Oe.a,{name:"subject",control:r,render:e=>{let{field:t}=e;return Object(u.jsx)(he.a,{...t,className:"mt-8 mb-16",label:"Subject",id:"subject",name:"subject",variant:"outlined",fullWidth:!0})}}),Object(u.jsx)(Oe.a,{className:"mt-8 mb-16",render:e=>{let{field:t}=e;return Object(u.jsx)(Se,{...t})},name:"message",control:r}),Object(u.jsxs)("div",{className:"pt-8",children:[Object(u.jsx)(ke,{fileName:"attachment-2.doc",size:"12 kb"}),Object(u.jsx)(ke,{fileName:"attachment-1.jpg",size:"350 kb"})]})]}),Object(u.jsxs)(me.a,{className:"justify-between px-8 py-16",children:[Object(u.jsxs)("div",{className:"px-16",children:[Object(u.jsx)(je.a,{variant:"contained",color:"primary",type:"submit",disabled:n.a.isEmpty(o)||!s,children:"Send"}),Object(u.jsx)(b.a,{children:Object(u.jsx)(j.a,{children:"attach_file"})})]}),Object(u.jsx)(b.a,{onClick:function(){t(!1)},children:Object(u.jsx)(j.a,{children:"delete"})})]})]})]})]})};const Ie=Object(v.b)("mailApp/filters/getFilters",(async()=>{const e=await N.a.get("/api/mail-app/filters");return await e.data})),Me=Object(v.c)({}),{selectAll:Re,selectById:Te}=Me.getSelectors((e=>e.mailApp.filters));var Ee=Object(v.d)({name:"mailApp/filters",initialState:Me.getInitialState({}),reducers:{},extraReducers:{[Ie.fulfilled]:Me.setAll}}).reducer;const He=Object(v.b)("mailApp/folders/getFolders",(async()=>{const e=await N.a.get("/api/mail-app/folders");return await e.data})),Be=Object(v.c)({}),{selectAll:Le,selectById:Pe}=Be.getSelectors((e=>e.mailApp.folders));var We=Object(v.d)({name:"mailApp/folders",initialState:Be.getInitialState({}),reducers:{},extraReducers:{[He.fulfilled]:Be.setAll}}).reducer;const De=Object(x.a)((e=>({listItem:{color:"inherit!important",textDecoration:"none!important",height:40,width:"100%",borderRadius:6,paddingLeft:12,paddingRight:12,marginBottom:4,"&.active":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, .05)!important":"rgba(255, 255, 255, .1)!important",pointerEvents:"none","& .list-item-icon":{color:"inherit"}},"& .list-item-icon":{fontSize:16,width:16,height:16,marginRight:16}},listSubheader:{paddingLeft:12}})));var ze=function(e){const t=Object(r.c)(Le),a=Object(r.c)(k),l=Object(r.c)(Re),c=De(),{t:i}=Object(F.a)("mailApp");return Object(u.jsxs)(p.a.div,{initial:{y:50,opacity:0},animate:{y:0,opacity:1,transition:{delay:.4}},className:"flex-auto border-l-1",children:[Object(u.jsx)(Ae,{}),Object(u.jsxs)("div",{className:"px-12",children:[Object(u.jsxs)(ie.a,{children:[Object(u.jsx)(ne.a,{className:c.listSubheader,disableSticky:!0,children:i("FOLDERS")}),t.length>0&&t.map((e=>Object(u.jsxs)(re.a,{button:!0,component:ce.a,to:"/apps/mail/".concat(e.handle),activeClassName:"active",className:c.listItem,children:[Object(u.jsx)(j.a,{className:"list-item-icon",color:"action",children:e.icon}),Object(u.jsx)(se.a,{primary:e.translate?i(e.translate):e.title,disableTypography:!0})]},e.id)))]}),Object(u.jsxs)(ie.a,{children:[Object(u.jsx)(ne.a,{className:c.listSubheader,disableSticky:!0,children:i("FILTERS")}),l.length>0&&l.map((e=>Object(u.jsxs)(re.a,{button:!0,component:ce.a,to:"/apps/mail/filter/".concat(e.handle),activeClassName:"active",className:c.listItem,children:[Object(u.jsx)(j.a,{className:"list-item-icon",color:"action",children:e.icon}),Object(u.jsx)(se.a,{primary:e.translate?i(e.translate):e.title,disableTypography:!0})]},e.id)))]}),Object(u.jsxs)(ie.a,{children:[Object(u.jsx)(ne.a,{className:c.listSubheader,disableSticky:!0,children:i("LABELS")}),a&&a.map((e=>Object(u.jsxs)(re.a,{button:!0,component:ce.a,to:"/apps/mail/label/".concat(e.handle),className:c.listItem,children:[Object(u.jsx)(j.a,{className:"list-item-icon",style:{color:e.color},color:"action",children:"label"}),Object(u.jsx)(se.a,{primary:e.title,disableTypography:!0})]},e.id)))]})]})]})},_e=a(1092);const Fe={creapond:"johndoe@creapond.com",withinpixels:"johndoe@withinpixels.com"};var Ve=function(e){const[t,a]=Object(i.useState)("creapond"),{t:l}=Object(F.a)("mailApp");return Object(u.jsxs)("div",{className:"flex flex-col justify-center h-full p-24",children:[Object(u.jsxs)("div",{className:"flex items-center flex-1",children:[Object(u.jsx)(j.a,{component:p.a.span,initial:{scale:0},animate:{scale:1,transition:{delay:.2}},className:"text-24 md:text-32",children:"mail"}),Object(u.jsx)(m.a,{component:p.a.span,initial:{x:-20},animate:{x:0,transition:{delay:.2}},delay:300,className:"text-16 md:text-24 mx-12 font-semibold",children:l("APP_TITLE")})]}),Object(u.jsx)(p.a.div,{initial:{y:20,opacity:.8},animate:{y:0,opacity:1,transition:{delay:.3}},children:Object(u.jsx)(he.a,{className:"w-full",id:"account-selection",select:!0,label:t,value:t,onChange:function(e){a(e.target.value)},placeholder:"Select Account",margin:"normal",variant:"filled",children:Object.keys(Fe).map(((e,t)=>Object(u.jsx)(_e.a,{value:e,children:Fe[e]},e)))})})]})},Ue=a(52),qe=a(1165);const Je=a(1385),Ye=Object(x.a)((e=>({mailItem:{"&.unread":{background:"rgba(0,0,0,0.03)"},"&.selected":{"&::after":{content:'""',position:"absolute",top:0,left:0,display:"block",height:"100%",width:3,backgroundColor:e.palette.primary.main}}},avatar:{backgroundColor:e.palette.primary[500]}})));var Ge=Object(s.k)((e=>{const t=Object(r.b)(),a=Object(r.c)((e=>{let{mailApp:t}=e;return t.mails.selectedMailIds})),l=Object(r.c)(C),c=Object(s.j)(),i=Ye(e),d=Je.compile(e.match.path),j=a.length>0&&void 0!==a.find((t=>t===e.mail.id));return Object(u.jsxs)(re.a,{dense:!0,button:!0,onClick:()=>e.history.push(d({...c,mailId:e.mail.id})),className:Object(O.a)(i.mailItem,j&&"selected",!e.mail.read&&"unread","items-start py-20 px-0 md:px-8 relative"),children:[Object(u.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-start",children:[Object(u.jsx)(qe.a,{tabIndex:-1,disableRipple:!0,checked:j,onChange:()=>t(te(e.mail.id)),onClick:e=>e.stopPropagation()}),Object(u.jsx)("div",{className:"px-8 order-first sm:order-none",children:e.mail.from.avatar?Object(u.jsx)(o.a,{alt:e.mail.from.name,src:e.mail.from.avatar}):Object(u.jsx)(o.a,{className:i.avatar,children:e.mail.from.name[0]})})]}),Object(u.jsxs)("div",{className:"flex flex-1 flex-col relative overflow-hidden px-8",children:[Object(u.jsx)(m.a,{className:"font-medium",children:e.mail.from.name}),Object(u.jsxs)("div",{className:"flex flex-col py-4",children:[Object(u.jsx)(m.a,{className:"truncate text-14 pb-2",children:e.mail.subject}),Object(u.jsx)(m.a,{color:"textSecondary",className:"truncate",children:n.a.truncate(e.mail.message.replace(/<(?:.|\n)*?>/gm,""),{length:180})})]}),Object(u.jsx)("div",{className:"flex -mx-2",children:!n.a.isEmpty(l)&&e.mail.labels.map((e=>Object(u.jsx)(g,{className:"mx-2 mt-4",title:l[e].title,color:l[e].color},e)))})]}),Object(u.jsx)("div",{className:"px-8",children:Object(u.jsx)(m.a,{className:"text-12",color:"textSecondary",children:e.mail.time})})]})}));var Ke=Object(s.k)((function(e){const t=Object(r.b)(),a=Object(r.c)(G),l=Object(r.c)((e=>{let{mailApp:t}=e;return t.mails.searchText})),c=Object(s.j)(),[n,o]=Object(i.useState)(null),{t:d}=Object(F.a)("mailApp");if(Object(h.b)((()=>{t(U(c))}),[t,c]),Object(i.useEffect)((()=>{a&&o(0===l.length?a:Ue.a.filterArrayByString(a,l))}),[a,l]),!n)return null;if(0===n.length)return Object(u.jsx)(p.a.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.1}},className:"flex flex-1 items-center justify-center h-full",children:Object(u.jsx)(m.a,{color:"textSecondary",variant:"h5",children:d("NO_MESSAGES")})});const j={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return Object(u.jsx)(ie.a,{className:"p-0",children:Object(u.jsx)(p.a.div,{variants:{show:{transition:{staggerChildren:.1}}},initial:"hidden",animate:"show",v:!0,children:n.map((e=>Object(u.jsx)(p.a.div,{variants:j,children:Object(u.jsx)(Ge,{mail:e})},e.id)))})})})),Qe=a(536);var Xe=function(e){const t=Object(r.b)(),a=Object(r.c)((e=>{let{mailApp:t}=e;return t.mails.selectedMailIds})),l=Object(r.c)(G),c=Object(r.c)(k),s=Object(r.c)(Le),[n,o]=Object(i.useState)({selectMenu:null,foldersMenu:null,labelsMenu:null});function d(e,t){o({...t,[t]:e.currentTarget})}function m(e,t){o({...t,[t]:null})}return Object(u.jsxs)("div",{className:"flex flex-1 items-center sm:px-8",children:[Object(u.jsx)(qe.a,{onChange:function(e){return e.target.checked?t(Z()):t($())},checked:a.length===Object.keys(l).length&&a.length>0,indeterminate:a.length!==Object.keys(l).length&&a.length>0}),Object(u.jsx)(b.a,{className:"",size:"small","aria-label":"More","aria-owns":n.select?"select-menu":null,"aria-haspopup":"true",onClick:e=>d(e,"select"),children:Object(u.jsx)(j.a,{children:"arrow_drop_down"})}),Object(u.jsxs)(Qe.a,{id:"select-menu",anchorEl:n.select,open:Boolean(n.select),onClose:e=>m(0,"select"),children:[Object(u.jsx)(_e.a,{onClick:e=>{t(Z()),m(0,"select")},children:"All"}),Object(u.jsx)(_e.a,{onClick:e=>{t($()),m(0,"select")},children:"None"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["read",!0])),m(0,"select")},children:"Read"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["read",!1])),m(0,"select")},children:"Unread"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["starred",!0])),m(0,"select")},children:"Starred"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["starred",!1])),m(0,"select")},children:"Unstarred"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["important",!0])),m(0,"select")},children:"Important"}),Object(u.jsx)(_e.a,{onClick:e=>{t(ee(["important",!1])),m(0,"select")},children:"Unimportant"})]}),a.length>0&&Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)("div",{className:"border-r-1 h-48 w-1 mx-12 my-0"}),Object(u.jsx)(b.a,{onClick:e=>t(q(4)),"aria-label":"Delete",children:Object(u.jsx)(j.a,{children:"delete"})}),Object(u.jsx)(b.a,{"aria-label":"More","aria-owns":n.folders?"folders-menu":null,"aria-haspopup":"true",onClick:e=>d(e,"folders"),children:Object(u.jsx)(j.a,{children:"folder"})}),Object(u.jsx)(Qe.a,{id:"folders-menu",anchorEl:n.folders,open:Boolean(n.folders),onClose:e=>m(0,"folders"),children:s.length>0&&s.map((e=>Object(u.jsx)(_e.a,{onClick:a=>{t(q(e.id)),m(0,"folders")},children:e.title},e.id)))}),Object(u.jsx)(b.a,{"aria-label":"More","aria-owns":n.labels?"labels-menu":null,"aria-haspopup":"true",onClick:e=>d(e,"labels"),children:Object(u.jsx)(j.a,{children:"label"})}),Object(u.jsx)(Qe.a,{id:"folders-menu",anchorEl:n.labels,open:Boolean(n.labels),onClose:e=>m(0,"labels"),children:c.length>0&&c.map((e=>Object(u.jsx)(_e.a,{onClick:a=>{t(J(e.id)),m(0,"labels")},children:e.title},e.id)))})]})]})},Ze=a(112);var $e=Object(Ze.c)({mails:ae,mail:E,folders:We,labels:I,filters:Ee});t.default=Object(c.a)("mailApp",$e)((function(e){const t=Object(r.b)(),a=Object(i.useRef)(null),c=Object(s.j)();return Object(i.useEffect)((()=>{t(Ie()),t(He()),t(S())}),[t]),Object(u.jsx)(l.a,{classes:{root:"w-full",content:"flex flex-col",header:"items-center min-h-72 h-72 sm:h-136 sm:min-h-136"},header:Object(u.jsx)(le,{pageLayout:a}),contentToolbar:c.mailId?Object(u.jsx)(P,{}):Object(u.jsx)(Xe,{}),content:c.mailId?Object(u.jsx)(H,{}):Object(u.jsx)(Ke,{}),leftSidebarHeader:Object(u.jsx)(Ve,{}),leftSidebarContent:Object(u.jsx)(ze,{}),ref:a,innerScroll:!0})}))}}]);

Zerion Mini Shell 1.0