%PDF- %PDF-
Direktori : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/ |
Current File : /home/opti/public_html/ezone-accounting.optisoft.com.ng/static/js/126.48d62b5e.chunk.js |
(this["webpackJsonpfuse-react-app"]=this["webpackJsonpfuse-react-app"]||[]).push([[126],{1137:function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var r=a(39),o=a(1072),n=a(5),l=a(0),c=a(43),i=a(1099),s=a(27),d=a(6),b=a(1);var p=function(e){const t=Object(c.a)(),a=Object(d.c)(Object(s.c)(t.palette.primary.main));return Object(b.jsx)("div",{className:e.classes.header,children:e.header&&Object(b.jsx)(i.a,{theme:a,children:e.header})})},j=a(94),m=a(1121),u=a(1125);var h=function(e){const t=Object(c.a)(),a=Object(d.c)(Object(s.c)(t.palette.primary.main)),{classes:o}=e;return Object(b.jsxs)(b.Fragment,{children:[e.header&&Object(b.jsx)(i.a,{theme:a,children:Object(b.jsx)("div",{className:Object(n.a)(o.sidebarHeader,e.variant),children:e.header})}),e.content&&Object(b.jsx)(r.a,{className:o.sidebarContent,enable:e.innerScroll,children:e.content})]})};function O(e,t){const[a,r]=Object(l.useState)(!1),{classes:o}=e;Object(l.useImperativeHandle)(t,(()=>({toggleSidebar:c})));const c=()=>{r(!a)};return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(m.a,{lgUp:"permanent"===e.variant,children:Object(b.jsx)(u.a,{variant:"temporary",anchor:e.position,open:a,onOpen:e=>{},onClose:e=>c(),disableSwipeToOpen:!0,classes:{root:Object(n.a)(o.sidebarWrapper,e.variant),paper:Object(n.a)(o.sidebar,e.variant,"left"===e.position?o.leftSidebar:o.rightSidebar)},ModalProps:{keepMounted:!0},container:e.rootRef.current,BackdropProps:{classes:{root:o.backdrop}},style:{position:"absolute"},children:Object(b.jsx)(h,{...e})})}),"permanent"===e.variant&&Object(b.jsx)(m.a,{mdDown:!0,children:Object(b.jsx)(j.a,{variant:"permanent",className:Object(n.a)(o.sidebarWrapper,e.variant),open:a,classes:{paper:Object(n.a)(o.sidebar,e.variant,"left"===e.position?o.leftSidebar:o.rightSidebar)},children:Object(b.jsx)(h,{...e})})})]})}var g=Object(l.forwardRef)(O);const x=200,f=Object(o.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:x,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:x,minHeight:x,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"}}))),y=Object(l.forwardRef)(((e,t)=>{const a=Object(l.useRef)(null),o=Object(l.useRef)(null),c=Object(l.useRef)(null),i=f(e),s=e.rightSidebarHeader||e.rightSidebarContent,d=e.leftSidebarHeader||e.leftSidebarContent;return Object(l.useImperativeHandle)(t,(()=>({rootRef:c,toggleLeftSidebar:()=>{a.current.toggleSidebar()},toggleRightSidebar:()=>{o.current.toggleSidebar()}}))),Object(b.jsxs)("div",{className:Object(n.a)(i.root,e.innerScroll&&i.innerScroll),ref:c,children:[Object(b.jsx)("div",{className:i.topBg}),Object(b.jsxs)("div",{className:"flex container w-full",children:[d&&Object(b.jsx)(g,{position:"left",header:e.leftSidebarHeader,content:e.leftSidebarContent,variant:e.leftSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:i,ref:a,rootRef:c}),Object(b.jsxs)("div",{className:Object(n.a)(i.contentWrapper,d&&(void 0===e.leftSidebarVariant||"permanent"===e.leftSidebarVariant)&&"lg:ltr:pl-0 lg:rtl:pr-0",s&&(void 0===e.rightSidebarVariant||"permanent"===e.rightSidebarVariant)&&"lg:pr-0"),children:[Object(b.jsx)(p,{header:e.header,classes:i}),Object(b.jsxs)("div",{className:Object(n.a)(i.contentCard,e.innerScroll&&"inner-scroll"),children:[e.contentToolbar&&Object(b.jsx)("div",{className:i.toolbar,children:e.contentToolbar}),e.content&&Object(b.jsx)(r.a,{className:i.content,enable:e.innerScroll,scrollToTopOnRouteChange:e.innerScroll,children:e.content})]})]}),s&&Object(b.jsx)(g,{position:"right",header:e.rightSidebarHeader,content:e.rightSidebarContent,variant:e.rightSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:i,ref:o,rootRef:c})]})]})}));y.defaultProps={};var v=Object(l.memo)(y)},1192:function(e,t,a){"use strict";var r=a(2),o=a(7),n=a(0),l=a(8),c=a(85),i=Object(c.a)(n.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),s=a(11),d=a(31),b=a(25),p=a(15),j=a(221);function m(e){return"Backspace"===e.key||"Delete"===e.key}var u=n.forwardRef((function(e,t){var a=e.avatar,c=e.classes,s=e.className,d=e.clickable,u=e.color,h=void 0===u?"default":u,O=e.component,g=e.deleteIcon,x=e.disabled,f=void 0!==x&&x,y=e.icon,v=e.label,S=e.onClick,C=e.onDelete,w=e.onKeyDown,k=e.onKeyUp,N=e.size,T=void 0===N?"medium":N,D=e.variant,E=void 0===D?"default":D,I=Object(o.a)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),R=n.useRef(null),P=Object(b.a)(R,t),A=function(e){e.stopPropagation(),C&&C(e)},H=!(!1===d||!S)||d,z="small"===T,L=O||(H?j.a:"div"),V=L===j.a?{component:"div"}:{},$=null;if(C){var B=Object(l.a)("default"!==h&&("default"===E?c["deleteIconColor".concat(Object(p.a)(h))]:c["deleteIconOutlinedColor".concat(Object(p.a)(h))]),z&&c.deleteIconSmall);$=g&&n.isValidElement(g)?n.cloneElement(g,{className:Object(l.a)(g.props.className,c.deleteIcon,B),onClick:A}):n.createElement(i,{className:Object(l.a)(c.deleteIcon,B),onClick:A})}var M=null;a&&n.isValidElement(a)&&(M=n.cloneElement(a,{className:Object(l.a)(c.avatar,a.props.className,z&&c.avatarSmall,"default"!==h&&c["avatarColor".concat(Object(p.a)(h))])}));var W=null;return y&&n.isValidElement(y)&&(W=n.cloneElement(y,{className:Object(l.a)(c.icon,y.props.className,z&&c.iconSmall,"default"!==h&&c["iconColor".concat(Object(p.a)(h))])})),n.createElement(L,Object(r.a)({role:H||C?"button":void 0,className:Object(l.a)(c.root,s,"default"!==h&&[c["color".concat(Object(p.a)(h))],H&&c["clickableColor".concat(Object(p.a)(h))],C&&c["deletableColor".concat(Object(p.a)(h))]],"default"!==E&&[c.outlined,{primary:c.outlinedPrimary,secondary:c.outlinedSecondary}[h]],f&&c.disabled,z&&c.sizeSmall,H&&c.clickable,C&&c.deletable),"aria-disabled":!!f||void 0,tabIndex:H||C?0:void 0,onClick:S,onKeyDown:function(e){e.currentTarget===e.target&&m(e)&&e.preventDefault(),w&&w(e)},onKeyUp:function(e){e.currentTarget===e.target&&(C&&m(e)?C(e):"Escape"===e.key&&R.current&&R.current.blur()),k&&k(e)},ref:P},V,I),M||W,n.createElement("span",{className:Object(l.a)(c.label,z&&c.labelSmall)},v),$)}));t.a=Object(s.a)((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],a=Object(d.a)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:Object(d.d)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:Object(d.d)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:Object(d.d)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:Object(d.d)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:Object(d.d)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:Object(d.d)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(d.a)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(d.a)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Object(d.a)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:a,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Object(d.a)(a,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:Object(d.a)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:Object(d.a)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:Object(d.a)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:Object(d.a)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(u)},1312:function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var r=a(20),o=a(0),n=a.n(o),l=(a(553),a(1056)),c=(a(1167),a(2),a(7),a(1072)),i=a(43),s=a(1216),d=(a(1215),a(550)),b=(a(64),a(1217)),p=(a(88),a(34),a(164),a(196),a(197),a(1255)),j=a(1172),m=a(1117),u=a(1119),h=a(193),O=function(e){return"date"===e||"year"===e?"date":"time"},g=Object(c.a)((function(e){var t="light"===e.palette.type?e.palette.primary.main:e.palette.background.default;return{tabs:{color:e.palette.getContrastText(t),backgroundColor:t}}}),{name:"MuiPickerDTTabs"}),x=function(e){var t=e.view,a=e.onChange,r=e.dateRangeIcon,n=e.timeIcon,l=g(),c="light"===Object(i.a)().palette.type?"secondary":"primary";return Object(o.createElement)(h.a,null,Object(o.createElement)(u.a,{variant:"fullWidth",value:O(t),onChange:function(e,r){r!==O(t)&&a("date"===r?"date":"hours")},className:l.tabs,indicatorColor:c},Object(o.createElement)(m.a,{value:"date",icon:Object(o.createElement)(o.Fragment,null,r)}),Object(o.createElement)(m.a,{value:"time",icon:Object(o.createElement)(o.Fragment,null,n)})))};x.defaultProps={dateRangeIcon:Object(o.createElement)((function(e){return n.a.createElement(d.a,e,n.a.createElement("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),n.a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}),null),timeIcon:Object(o.createElement)((function(e){return n.a.createElement(d.a,e,n.a.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),n.a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),n.a.createElement("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}))}),null)};var f=Object(c.a)((function(e){return{toolbar:{paddingLeft:16,paddingRight:16,justifyContent:"space-around"},separator:{margin:"0 4px 0 2px",cursor:"default"}}}),{name:"MuiPickerDTToolbar"}),y=function(e){var t=e.date,a=e.openView,r=e.setOpenView,n=e.ampm,c=e.hideTabs,d=e.dateRangeIcon,b=e.timeIcon,m=e.onChange,u=Object(l.b)(),h=f(),O=!c&&"undefined"!==typeof window&&window.innerHeight>667,g=Object(p.b)(t,n,m),y=g.meridiemMode,v=g.handleMeridiemChange,S="rtl"===Object(i.a)().direction;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(s.b,{isLandscape:!1,className:h.toolbar},Object(o.createElement)(j.a,{container:!0,justify:"center",wrap:"nowrap"},Object(o.createElement)(j.a,{item:!0,container:!0,xs:5,justify:"flex-start",direction:"column"},Object(o.createElement)("div",null,Object(o.createElement)(s.c,{variant:"subtitle1",onClick:function(){return r("year")},selected:"year"===a,label:u.getYearText(t)})),Object(o.createElement)("div",null,Object(o.createElement)(s.c,{variant:"h4",onClick:function(){return r("date")},selected:"date"===a,label:u.getDateTimePickerHeaderText(t)}))),Object(o.createElement)(j.a,{item:!0,container:!0,xs:6,justify:"center",alignItems:"flex-end",direction:S?"row-reverse":"row"},Object(o.createElement)(s.c,{variant:"h3",onClick:function(){return r("hours")},selected:"hours"===a,label:u.getHourText(t,n)}),Object(o.createElement)(s.f,{variant:"h3",label:":",className:h.separator}),Object(o.createElement)(s.c,{variant:"h3",onClick:function(){return r("minutes")},selected:"minutes"===a,label:u.getMinuteText(t)})),n&&Object(o.createElement)(j.a,{item:!0,container:!0,xs:1,direction:"column",justify:"flex-end"},Object(o.createElement)(s.c,{variant:"subtitle1",selected:"am"===y,label:u.getMeridiemText("am"),onClick:function(){return v("am")}}),Object(o.createElement)(s.c,{variant:"subtitle1",selected:"pm"===y,label:u.getMeridiemText("pm"),onClick:function(){return v("pm")}})))),O&&Object(o.createElement)(x,{dateRangeIcon:d,timeIcon:b,view:a,onChange:r}))};function v(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}var S=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?v(a,!0).forEach((function(t){Object(r.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):v(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},b.b,{wider:!0,orientation:"portrait",openTo:"date",views:["year","date","hours","minutes"]});function C(e){var t=Object(l.b)();if("portrait"!==e.orientation)throw new Error("We are not supporting custom orientation for DateTimePicker yet :(");return{getDefaultFormat:function(){return Object(s.h)(e.format,e.ampm,{"12h":t.dateTime12hFormat,"24h":t.dateTime24hFormat})}}}var w=Object(s.g)({useOptions:C,Input:s.d,useState:s.i,DefaultToolbarComponent:y}),k=Object(s.g)({useOptions:C,Input:s.a,useState:s.e,DefaultToolbarComponent:y,getCustomProps:function(e){return{refuse:e.ampm?/[^\dap]+/gi:/[^\d]+/gi}}});w.defaultProps=S,k.defaultProps=S},2699:function(e,t,a){"use strict";a.r(t);var r=a(1137),o=a(133),n=a(0),l=a(6),c=a(49),i=a(89),s=a(112),d=a(19),b=a(50),p=a.n(b);const j=Object(d.b)("todoApp/filters/getFilters",(async()=>{const e=await p.a.get("/api/todo-app/filters");return await e.data})),m=Object(d.c)({}),{selectAll:u,selectById:h}=m.getSelectors((e=>e.todoApp.filters));var O=Object(d.d)({name:"todoApp/filters",initialState:m.getInitialState({}),reducers:{},extraReducers:{[j.fulfilled]:m.setAll}}).reducer;const g=Object(d.b)("todoApp/folders/getFolders",(async()=>{const e=await p.a.get("/api/todo-app/folders");return await e.data})),x=Object(d.c)({}),{selectAll:f,selectById:y}=x.getSelectors((e=>e.todoApp.folders));var v=Object(d.d)({name:"todoApp/folders",initialState:x.getInitialState({}),reducers:{},extraReducers:{[g.fulfilled]:x.setAll}}).reducer;const S=Object(d.b)("todoApp/labels/getLabels",(async()=>{const e=await p.a.get("/api/todo-app/labels");return await e.data})),C=Object(d.c)({}),{selectAll:w,selectEntities:k,selectById:N}=C.getSelectors((e=>e.todoApp.labels));var T=Object(d.d)({name:"todoApp/labels",initialState:C.getInitialState(null),reducers:{},extraReducers:{[S.fulfilled]:C.setAll}}).reducer;const D=Object(d.b)("todoApp/todos/getTodos",(async(e,t)=>{let{getState:a}=t;e=e||a().todoApp.todos.routeParams;const r=await p.a.get("/api/todo-app/todos",{params:e});return{data:await r.data,routeParams:e}})),E=Object(d.b)("todoApp/todos/addTodo",(async(e,t)=>{let{dispatch:a,getState:r}=t;const o=await p.a.post("/api/todo-app/new-todo",e),n=await o.data;return a(D()),n})),I=Object(d.b)("todoApp/todos/updateTodo",(async(e,t)=>{let{dispatch:a,getState:r}=t;const o=await p.a.post("/api/todo-app/update-todo",e),n=await o.data;return a(D()),n})),R=Object(d.b)("todoApp/todos/removeTodo",(async(e,t)=>{let{dispatch:a,getState:r}=t;const o=await p.a.post("/api/todo-app/remove-todo",e),n=await o.data;return a(D()),n})),P=Object(d.c)({}),{selectAll:A,selectById:H}=P.getSelectors((e=>e.todoApp.todos)),z=Object(d.d)({name:"todoApp/todos",initialState:P.getInitialState({searchText:"",orderBy:"",orderDescending:!1,routeParams:{},todoDialog:{type:"new",props:{open:!1},data:null}}),reducers:{setTodosSearchText:{reducer:(e,t)=>{e.searchText=t.payload},prepare:e=>({payload:e.target.value||""})},toggleOrderDescending:(e,t)=>{e.orderDescending=!e.orderDescending},changeOrder:(e,t)=>{e.orderBy=t.payload},openNewTodoDialog:(e,t)=>{e.todoDialog={type:"new",props:{open:!0},data:null}},closeNewTodoDialog:(e,t)=>{e.todoDialog={type:"new",props:{open:!1},data:null}},openEditTodoDialog:(e,t)=>{e.todoDialog={type:"edit",props:{open:!0},data:t.payload}},closeEditTodoDialog:(e,t)=>{e.todoDialog={type:"edit",props:{open:!1},data:null}}},extraReducers:{[I.fulfilled]:P.upsertOne,[E.fulfilled]:P.addOne,[D.fulfilled]:(e,t)=>{const{data:a,routeParams:r}=t.payload;P.setAll(e,a),e.routeParams=r,e.searchText=""}}}),{setTodosSearchText:L,toggleOrderDescending:V,changeOrder:$,openNewTodoDialog:B,closeNewTodoDialog:M,openEditTodoDialog:W,closeEditTodoDialog:F}=z.actions;var _=z.reducer;var U=Object(s.c)({todos:_,folders:v,labels:T,filters:O}),K=a(131),q=a(1312),Y=a(32),J=a(52),G=a(10),Q=a(1100),X=a(1124),Z=a(1098),ee=a(1192),te=a(180),ae=a(356),re=a(1085),oe=a(1196),ne=a(1194),le=a(1108),ce=a(1035),ie=a(1090),se=a(1028),de=a(1112),be=a(1103),pe=a(536),je=a(1092),me=a(1096),ue=a(1101),he=a(194),Oe=a(57),ge=a(1);const xe={id:"",title:"",notes:"",startDate:new Date,dueDate:new Date,completed:!1,starred:!1,important:!1,deleted:!1,labels:[]},fe=Oe.d().shape({title:Oe.f().required("You must enter a title")});var ye=function(e){const t=Object(l.b)(),a=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.todoDialog})),r=Object(l.c)(w),[o,c]=Object(n.useState)(null),{watch:i,handleSubmit:s,formState:d,reset:b,control:p,setValue:j}=Object(Y.f)({mode:"onChange",defaultValues:xe,resolver:Object(K.a)(fe)}),{errors:m,isValid:u,dirtyFields:h}=d,O=i("id"),g=i("labels"),x=i("deuDate"),f=i("startDate"),y=Object(n.useCallback)((()=>{"edit"===a.type&&a.data&&b({...a.data}),"new"===a.type&&b({...xe,...a.data})}),[a.data,a.type,b]);function v(){return"edit"===a.type?t(F()):t(M())}return Object(n.useEffect)((()=>{a.props.open&&y()}),[a.props.open,y]),Object(ge.jsxs)(re.a,{...a.props,onClose:v,fullWidth:!0,maxWidth:"sm",children:[Object(ge.jsx)(Q.a,{position:"static",elevation:0,children:Object(ge.jsx)(ue.a,{className:"flex w-full",children:Object(ge.jsx)(he.a,{variant:"subtitle1",color:"inherit",children:"new"===a.type?"New Todo":"Edit Todo"})})}),Object(ge.jsxs)("form",{onSubmit:s((function(e){"new"===a.type?t(E({id:J.a.generateGUID(),...e})):t(I({...a.data,...e})),v()})),children:[Object(ge.jsxs)(ne.a,{classes:{root:"p-0"},children:[Object(ge.jsxs)("div",{className:"mb-16",children:[Object(ge.jsxs)("div",{className:"flex items-center justify-between p-12",children:[Object(ge.jsx)("div",{className:"flex",children:Object(ge.jsx)(Y.a,{name:"completed",control:p,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(se.a,{tabIndex:-1,disableRipple:!0,onClick:e=>t(!a),children:a?Object(ge.jsx)(ie.a,{color:"secondary",children:"check_circle"}):Object(ge.jsx)(ie.a,{color:"action",children:"radio_button_unchecked"})})}})}),Object(ge.jsxs)("div",{className:"flex items-center justify-start",children:[Object(ge.jsx)(Y.a,{name:"important",control:p,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(se.a,{onClick:()=>t(!a),children:a?Object(ge.jsx)(ie.a,{style:{color:te.a[500]},children:"error"}):Object(ge.jsx)(ie.a,{children:"error_outline"})})}}),Object(ge.jsx)(Y.a,{name:"starred",control:p,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(se.a,{onClick:()=>t(!a),children:a?Object(ge.jsx)(ie.a,{style:{color:ae.a[500]},children:"star"}):Object(ge.jsx)(ie.a,{children:"star_outline"})})}}),Object(ge.jsxs)("div",{children:[Object(ge.jsx)(se.a,{"aria-owns":o?"label-menu":null,"aria-haspopup":"true",onClick:e=>c(e.currentTarget),children:Object(ge.jsx)(ie.a,{children:"label"})}),Object(ge.jsx)(Y.a,{name:"labels",control:p,render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(pe.a,{id:"label-menu",anchorEl:o,open:Boolean(o),onClose:()=>c(null),children:r.length>0&&r.map((e=>Object(ge.jsxs)(je.a,{onClick:r=>t(G.a.xor(a,[e.id])),children:[Object(ge.jsx)(de.a,{className:"min-w-24",children:Object(ge.jsx)(ie.a,{color:"action",children:a.includes(e.id)?"check_box":"check_box_outline_blank"})}),Object(ge.jsx)(be.a,{className:"mx-8",primary:e.title,disableTypography:!0}),Object(ge.jsx)(de.a,{className:"min-w-24",children:Object(ge.jsx)(ie.a,{style:{color:e.color},color:"action",children:"label"})})]},e.id)))})}})]})]})]}),Object(ge.jsx)(le.a,{className:"mx-24"})]}),g.length>0&&Object(ge.jsx)("div",{className:"flex flex-wrap w-full px-12 sm:px-20 mb-16",children:g.map((e=>{const t=G.a.find(r,{id:e});return Object(ge.jsx)(ee.a,{avatar:Object(ge.jsx)(X.a,{classes:{colorDefault:"bg-transparent"},children:Object(ge.jsx)(ie.a,{className:"text-20",style:{color:t.color},children:"label"})}),label:t.title,onDelete:t=>j("labels",g.filter((t=>e!==t))),className:"mx-4 my-4",classes:{label:"px-8"}},e)}))}),Object(ge.jsxs)("div",{className:"px-16 sm:px-24",children:[Object(ge.jsx)(ce.a,{className:"mt-8 mb-16",required:!0,fullWidth:!0,children:Object(ge.jsx)(Y.a,{name:"title",control:p,render:e=>{var t;let{field:a}=e;return Object(ge.jsx)(me.a,{...a,label:"Title",autoFocus:!0,error:!!m.title,helperText:null===m||void 0===m||null===(t=m.title)||void 0===t?void 0:t.message,required:!0,variant:"outlined"})}})}),Object(ge.jsx)(ce.a,{className:"mt-8 mb-16",required:!0,fullWidth:!0,children:Object(ge.jsx)(Y.a,{name:"notes",control:p,render:e=>{let{field:t}=e;return Object(ge.jsx)(me.a,{...t,label:"Notes",multiline:!0,rows:"6",variant:"outlined"})}})}),Object(ge.jsxs)("div",{className:"flex -mx-4",children:[Object(ge.jsx)(Y.a,{name:"startDate",control:p,defaultValue:"",render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(q.a,{label:"Start Date",inputVariant:"outlined",value:a,onChange:t,className:"mt-8 mb-16 mx-4",maxDate:x})}}),Object(ge.jsx)(Y.a,{name:"dueDate",control:p,defaultValue:"",render:e=>{let{field:{onChange:t,value:a}}=e;return Object(ge.jsx)(q.a,{label:"Due Date",inputVariant:"outlined",value:a,onChange:t,className:"mt-8 mb-16 mx-4",minDate:f})}})]})]})]}),"new"===a.type?Object(ge.jsx)(oe.a,{className:"justify-between px-8 py-16",children:Object(ge.jsx)("div",{className:"px-16",children:Object(ge.jsx)(Z.a,{type:"submit",variant:"contained",color:"secondary",disabled:G.a.isEmpty(h)||!u,children:"Add"})})}):Object(ge.jsxs)(oe.a,{className:"justify-between px-8 py-16",children:[Object(ge.jsx)("div",{className:"px-16",children:Object(ge.jsx)(Z.a,{type:"submit",variant:"contained",color:"secondary",disabled:G.a.isEmpty(h)||!u,children:"Save"})}),Object(ge.jsx)(se.a,{className:"min-w-auto",onClick:function(){t(R(O)).then((()=>{v()}))},children:Object(ge.jsx)(ie.a,{children:"delete"})})]})]})]})},ve=a(1121),Se=a(548),Ce=a(193),we=a(1099),ke=a(27);var Ne=function(e){const t=Object(l.b)(),a=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.searchText})),r=Object(l.c)(ke.e);return Object(ge.jsx)(we.a,{theme:r,children:Object(ge.jsx)("div",{className:"flex flex-1",children:Object(ge.jsxs)(Ce.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(ge.jsx)(ve.a,{lgUp:!0,children:Object(ge.jsx)(se.a,{onClick:t=>e.pageLayout.current.toggleLeftSidebar(),"aria-label":"open left sidebar",children:Object(ge.jsx)(ie.a,{children:"menu"})})}),Object(ge.jsx)(ie.a,{color:"action",children:"search"}),Object(ge.jsx)(Se.a,{placeholder:"Search",className:"px-16",disableUnderline:!0,fullWidth:!0,value:a,inputProps:{"aria-label":"Search"},onChange:e=>t(L(e))})]})})})},Te=a(1033),De=a(1118),Ee=a(1034),Ie=a(1072),Re=a(5);const Pe=Object(Ie.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 Ae=function(e){const t=Pe();return Object(ge.jsxs)("div",{className:Object(Re.a)(t.root,e.className),children:[Object(ge.jsx)("div",{className:t.color,style:{backgroundColor:e.color}}),Object(ge.jsx)("div",{children:e.title})]})};const He=Object(Ie.a)({todoItem:{"&.completed":{background:"rgba(0,0,0,0.03)","& .todo-title, & .todo-notes":{textDecoration:"line-through"}}}});var ze=function(e){const t=Object(l.b)(),a=Object(l.c)(k),r=He(e);return Object(ge.jsxs)(Ee.a,{className:Object(Re.a)(r.todoItem,{completed:e.todo.completed},"py-20 px-0 sm:px-8"),onClick:a=>{a.preventDefault(),t(W(e.todo))},dense:!0,button:!0,children:[Object(ge.jsx)(se.a,{tabIndex:-1,disableRipple:!0,onClick:a=>{a.stopPropagation(),t(I({...e.todo,completed:!e.todo.completed}))},children:e.todo.completed?Object(ge.jsx)(ie.a,{color:"secondary",children:"check_circle"}):Object(ge.jsx)(ie.a,{color:"action",children:"radio_button_unchecked"})}),Object(ge.jsxs)("div",{className:"flex flex-1 flex-col relative overflow-hidden px-8",children:[Object(ge.jsx)(he.a,{className:"todo-title truncate text-14 font-medium",color:e.todo.completed?"textSecondary":"inherit",children:e.todo.title}),Object(ge.jsx)(he.a,{color:"textSecondary",className:"todo-notes truncate",children:G.a.truncate(e.todo.notes.replace(/<(?:.|\n)*?>/gm,""),{length:180})}),Object(ge.jsx)("div",{className:Object(Re.a)(r.labels,"flex -mx-2 mt-8"),children:e.todo.labels.map((e=>Object(ge.jsx)(Ae,{className:"mx-2 mt-4",title:a[e].title,color:a[e].color},e)))})]}),Object(ge.jsxs)("div",{className:"px-8",children:[Object(ge.jsx)(se.a,{onClick:a=>{a.preventDefault(),a.stopPropagation(),t(I({...e.todo,important:!e.todo.important}))},children:e.todo.important?Object(ge.jsx)(ie.a,{style:{color:te.a[500]},children:"error"}):Object(ge.jsx)(ie.a,{children:"error_outline"})}),Object(ge.jsx)(se.a,{onClick:a=>{a.preventDefault(),a.stopPropagation(),t(I({...e.todo,starred:!e.todo.starred}))},children:e.todo.starred?Object(ge.jsx)(ie.a,{style:{color:ae.a[500]},children:"star"}):Object(ge.jsx)(ie.a,{children:"star_outline"})})]})]})};var Le=function(e){const t=Object(l.c)(A),a=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.searchText})),r=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.orderBy})),o=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.orderDescending})),[c,i]=Object(n.useState)(null);if(Object(n.useEffect)((()=>{var e;t&&i(G.a.orderBy(0===(e=a).length?t:J.a.filterArrayByString(t,e),[r],[o?"desc":"asc"]))}),[t,a,r,o]),!c)return null;if(0===c.length)return Object(ge.jsx)(De.a.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.1}},className:"flex flex-1 items-center justify-center h-full",children:Object(ge.jsx)(he.a,{color:"textSecondary",variant:"h5",children:"There are no todos!"})});const s={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return Object(ge.jsx)(Te.a,{className:"p-0",children:Object(ge.jsx)(De.a.div,{variants:{show:{transition:{staggerChildren:.1}}},initial:"hidden",animate:"show",children:c.map((e=>Object(ge.jsx)(De.a.div,{variants:s,children:Object(ge.jsx)(ze,{todo:e})},e.id)))})})},Ve=a(75),$e=a(1107);const Be=Object(Ie.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 Me=function(e){const t=Object(l.b)(),a=Object(l.c)(w),r=Object(l.c)(f),o=Object(l.c)(u),n=Be(e);return Object(ge.jsxs)(De.a.div,{initial:{y:50,opacity:0},animate:{y:0,opacity:1,transition:{delay:.4}},className:"flex-auto border-l-1 border-solid",children:[Object(ge.jsx)("div",{className:"p-24 pb-16",children:Object(ge.jsx)(Z.a,{onClick:()=>{t(B())},variant:"contained",color:"secondary",className:"w-full",children:"Add task"})}),Object(ge.jsxs)("div",{className:"px-12",children:[Object(ge.jsx)(Te.a,{children:r.length>0&&r.map((e=>Object(ge.jsxs)(Ee.a,{button:!0,component:Ve.a,to:"/apps/todo/".concat(e.handle),activeClassName:"active",className:n.listItem,children:[Object(ge.jsx)(ie.a,{className:"list-item-icon",color:"action",children:e.icon}),Object(ge.jsx)(be.a,{primary:e.title,disableTypography:!0})]},e.id)))}),Object(ge.jsxs)(Te.a,{children:[Object(ge.jsx)($e.a,{className:n.listSubheader,disableSticky:!0,children:"FILTERS"}),o.length>0&&o.map((e=>Object(ge.jsxs)(Ee.a,{button:!0,component:Ve.a,to:"/apps/todo/filter/".concat(e.handle),activeClassName:"active",className:n.listItem,children:[Object(ge.jsx)(ie.a,{className:"list-item-icon",color:"action",children:e.icon}),Object(ge.jsx)(be.a,{primary:e.title,disableTypography:!0})]},e.id)))]}),Object(ge.jsxs)(Te.a,{children:[Object(ge.jsx)($e.a,{className:n.listSubheader,disableSticky:!0,children:"LABELS"}),a.length>0&&a.map((e=>Object(ge.jsxs)(Ee.a,{button:!0,component:Ve.a,to:"/apps/todo/label/".concat(e.handle),className:n.listItem,children:[Object(ge.jsx)(ie.a,{className:"list-item-icon",style:{color:e.color},color:"action",children:"label"}),Object(ge.jsx)(be.a,{primary:e.title,disableTypography:!0})]},e.id)))]})]})]})};const We={creapond:"johndoe@creapond.com",withinpixels:"johndoe@withinpixels.com"};var Fe=function(){const[e,t]=Object(n.useState)("creapond");return Object(ge.jsxs)("div",{className:"flex flex-col justify-center h-full p-24",children:[Object(ge.jsxs)("div",{className:"flex items-center flex-1",children:[Object(ge.jsx)(ie.a,{component:De.a.span,initial:{scale:0},animate:{scale:1,transition:{delay:.2}},className:"text-24 md:text-32",children:"check_box"}),Object(ge.jsx)(he.a,{component:De.a.span,initial:{x:-20},animate:{x:0,transition:{delay:.2}},delay:300,className:"text-16 md:text-24 mx-12 font-semibold",children:"To-Do"})]}),Object(ge.jsx)(De.a.div,{initial:{y:20,opacity:.8},animate:{y:0,opacity:1,transition:{delay:.3}},children:Object(ge.jsx)(me.a,{id:"account-selection",select:!0,label:e,value:e,onChange:function(e){t(e.target.value)},placeholder:"Select Account",margin:"normal",variant:"filled",children:Object.keys(We).map(((e,t)=>Object(ge.jsx)(je.a,{value:e,children:We[e]},e)))})})]})},_e=a(1044);var Ue=function(e){const t=Object(l.b)(),a=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.orderBy})),r=Object(l.c)((e=>{let{todoApp:t}=e;return t.todos.orderDescending}));return Object(ge.jsxs)("div",{className:"flex justify-between w-full",children:[Object(ge.jsx)("div",{className:"flex"}),Object(ge.jsxs)("div",{className:"flex items-center",children:[Object(ge.jsx)(ce.a,{className:"",children:Object(ge.jsxs)(_e.a,{value:a,onChange:function(e){t($(e.target.value))},displayEmpty:!0,name:"filter",className:"",children:[Object(ge.jsx)(je.a,{value:"",children:Object(ge.jsx)("em",{children:"Order by"})}),Object(ge.jsx)(je.a,{value:"startDate",children:"Start Date"}),Object(ge.jsx)(je.a,{value:"dueDate",children:"Due Date"}),Object(ge.jsx)(je.a,{value:"title",children:"Title"})]})}),Object(ge.jsx)(se.a,{onClick:e=>t(V()),children:Object(ge.jsx)(ie.a,{style:{transform:r?"scaleY(-1)":"scaleY(1)"},children:"sort"})})]})]})};t.default=Object(o.a)("todoApp",U)((function(e){const t=Object(l.b)(),a=Object(n.useRef)(null),o=Object(c.j)();return Object(n.useEffect)((()=>{t(j()),t(g()),t(S())}),[t]),Object(i.b)((()=>{t(D(o))}),[t,o]),Object(ge.jsxs)(ge.Fragment,{children:[Object(ge.jsx)(r.a,{classes:{root:"w-full",header:"items-center min-h-72 h-72 sm:h-136 sm:min-h-136"},header:Object(ge.jsx)(Ne,{pageLayout:a}),contentToolbar:Object(ge.jsx)(Ue,{}),content:Object(ge.jsx)(Le,{}),leftSidebarHeader:Object(ge.jsx)(Fe,{}),leftSidebarContent:Object(ge.jsx)(Me,{}),ref:a,innerScroll:!0}),Object(ge.jsx)(ye,{})]})}))}}]);