Current Path : /home/ncdcgo/admin.ncdc.go.ug/static/js/ |
Current File : /home/ncdcgo/admin.ncdc.go.ug/static/js/main.b115404d.chunk.js |
(this["webpackJsonpncdc-admin"]=this["webpackJsonpncdc-admin"]||[]).push([[1],{117:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var s=n(19),r=n(2),a={sm:"h-4 w-4",md:"h-8 w-8",lg:"h-16 w-16",xl:"h-24 w-24"},c={light:"text-white",primary:"text-blue-600"},i=function(e){var t=e.size,n=void 0===t?"md":t,i=e.variant,l=void 0===i?"primary":i,o=e.className,d=void 0===o?"":o;return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsxs)("svg",{className:Object(s.a)("animate-spin",a[n],c[l],d),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading",children:[Object(r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Object(r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Object(r.jsx)("span",{className:"sr-only",children:"Loading"})]})}},118:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var s=n(17),r=n(21),a=n(19),c=n(0),i=(n(173),n(2)),l={sm:"max-w-md",md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-7xl",full:"max-w-full"},o=function(e){var t=e.title,n=e.children,o=e.isOpen,d=e.onClose,u=e.renderFooter,j=e.size,x=void 0===j?"md":j;return Object(i.jsx)(s.c.Root,{show:o,as:c.Fragment,children:Object(i.jsx)(s.a,{as:"div",static:!0,className:"fixed inset-0 overflow-hidden z-40",open:o,onClose:d,children:Object(i.jsxs)("div",{className:"absolute inset-0 overflow-hidden",children:[Object(i.jsx)(s.a.Overlay,{className:"absolute inset-0"}),Object(i.jsx)("div",{className:"fixed inset-y-0 right-0 pl-10 max-w-full flex",children:Object(i.jsx)(s.c.Child,{as:c.Fragment,enter:"transform transition ease-in-out duration-300 sm:duration-300",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-300 sm:duration-300",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:Object(i.jsx)("div",{className:Object(a.a)("w-screen",l[x]),children:Object(i.jsxs)("div",{className:"h-full divide-y divide-gray-200 flex flex-col bg-white shadow-xl",children:[Object(i.jsxs)("div",{className:"min-h-0 flex-1 flex flex-col py-6 overflow-y-scroll",children:[Object(i.jsx)("div",{className:"px-4 sm:px-6",children:Object(i.jsxs)("div",{className:"flex items-start justify-between",children:[Object(i.jsx)(s.a.Title,{className:"text-lg font-medium text-gray-900",children:t}),Object(i.jsx)("div",{className:"ml-3 h-7 flex items-center",children:Object(i.jsxs)("button",{className:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:d,children:[Object(i.jsx)("span",{className:"sr-only",children:"Close panel"}),Object(i.jsx)(r.n,{className:"h-6 w-6","aria-hidden":"true"})]})})]})}),Object(i.jsx)("div",{className:"mt-6 relative flex-1 px-4 sm:px-6",children:n})]}),Object(i.jsx)("div",{className:"flex-shrink-0 px-4 py-4 flex justify-end space-x-2",children:u()})]})})})})]})})})}},119:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var s=n(28),r=n(0),a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=r.useState(e),n=Object(s.a)(t,2),a=n[0],c=n[1],i=r.useCallback((function(){return c(!0)}),[]),l=r.useCallback((function(){return c(!1)}),[]),o=r.useCallback((function(){return c((function(e){return!e}))}),[]);return{isOpen:a,open:i,close:l,toggle:o}}},123:function(e,t,n){"use strict";n.r(t),n.d(t,"Landing",(function(){return u})),n.d(t,"NotFound",(function(){return x})),n.d(t,"Dashboard",(function(){return S}));var s=n.p+"static/media/jasttech-logo.6bbbefa6.svg",r=n(72),a=n(29),c=n(61),i=n(33),l=n(724),o=n(15),d=n(2),u=function(){var e=Object(o.i)(),t=Object(i.b)().user;return Object(d.jsxs)(d.Fragment,{children:[Object(d.jsx)(c.a,{description:"NCDC Admin"}),Object(d.jsx)("div",{className:"bg-white dark:bg-gray-900 h-[90vh] flex items-center",children:Object(d.jsxs)("div",{className:"max-w-7xl mx-auto text-center py-12 px-4 sm:px-6 lg:py-16 lg:px-8",children:[Object(d.jsx)("div",{className:"flex flex-row justify-center my-4",children:Object(d.jsx)("img",{src:r.a,alt:"react",className:"h-20 w-auto"})}),Object(d.jsx)("p",{className:"dark:text-white",children:"Official use for the NCDC Team."}),Object(d.jsx)("div",{className:"mt-8 flex justify-center",children:Object(d.jsx)("div",{className:"inline-flex rounded-md shadow",children:Object(d.jsx)(a.a,{onClick:function(){e(t?"/app":"/auth/login")},startIcon:Object(d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Object(d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),children:"Go to Login"})})})]})}),Object(d.jsx)("div",{className:"h-12 flex items-center justify-center",children:Object(d.jsxs)("p",{className:"text-center text-xs text-gray-500 flex flex-row items-center space-x-1 dark:text-gray-400",children:[Object(d.jsxs)("span",{className:"flex flex-row items-center",children:[Object(d.jsx)(l.a,{className:"h-3 text-green-600"}),Object(d.jsx)("span",{children:"Data Secured by "})," "]}),Object(d.jsx)("a",{href:"https://jast-tech.com",target:"_blank",rel:"noreferrer",children:Object(d.jsx)("img",{src:s,alt:"Jastech",className:"h-4"})})]})})]})},j=n(20),x=function(){return Object(d.jsx)(d.Fragment,{children:Object(d.jsx)("div",{className:"px-40 py-20 bg-white h-full rounded-md",children:Object(d.jsxs)("div",{className:"flex flex-col items-center",children:[Object(d.jsx)("h1",{className:"font-bold text-green-600 text-9xl",children:"404"}),Object(d.jsxs)("h6",{className:"mb-2 text-2xl font-bold text-center text-gray-800 md:text-3xl",children:[Object(d.jsx)("span",{className:"text-red-500",children:"Oops!"})," Page not found"]}),Object(d.jsx)("p",{className:"mb-8 text-center text-gray-500 md:text-lg",children:"The page you\u2019re looking for doesn\u2019t exist."}),Object(d.jsx)(j.b,{to:"./",className:"px-6 py-2 text-sm font-semibold text-blue-800 bg-blue-100",children:"Back to Dashboard"})]})})})},b=n(28),m=n(96),h=n(306),f=n.n(h),O=n(0),p=n(726),g=n(729),v=n(727),y=n(730),w=n(728),N=n(725),k=n(18),C=n(47),F=n(721),R=function(){return C.a.get("/analytics/dashboard")},S=function(){var e=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).config;return Object(F.a)(Object(k.a)(Object(k.a)({},e),{},{queryKey:["dashboardAnalytics"],queryFn:function(){return R()}}))}();console.log(e.data);var t=Object(O.useState)(""),n=Object(b.a)(t,2),s=n[0],r=n[1];return Object(O.useEffect)((function(){r(f()(new Date))}),[]),e.isLoading?Object(d.jsx)("div",{className:"w-full h-48 flex justify-center items-center",children:Object(d.jsx)(a.e,{size:"lg"})}):e.data?Object(d.jsxs)(m.a,{title:"Dashboard",children:[s," \ud83d\udc4b\ud83c\udffc",Object(d.jsxs)("div",{className:"grid col-auto lg:grid-cols-3 gap-4 mt-6",children:[Object(d.jsx)(j.b,{to:"./ads",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"ADS"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.ads})]}),Object(d.jsx)("div",{children:Object(d.jsx)(p.a,{className:"h-10 w-10 text-gray-300"})})]})}),Object(d.jsx)(j.b,{to:"./users",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"USERS"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.users})]}),Object(d.jsx)("div",{children:Object(d.jsx)(g.a,{className:"h-10 w-10 text-gray-300"})})]})}),Object(d.jsx)(j.b,{to:"./resources",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"RESOURCES"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.resources})]}),Object(d.jsx)("div",{children:Object(d.jsx)(v.a,{className:"h-10 w-10 text-gray-300"})})]})}),Object(d.jsx)(j.b,{to:"./careers",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"CAREERS"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.jobs})]}),Object(d.jsx)("div",{children:Object(d.jsx)(y.a,{className:"h-10 w-10 text-gray-300"})})]})}),Object(d.jsx)(j.b,{to:"./messages",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"MESSAGES"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.departments})]}),Object(d.jsx)("div",{children:Object(d.jsx)(w.a,{className:"h-10 w-10 text-gray-300"})})]})}),Object(d.jsx)(j.b,{to:"./blog",className:"bg-white p-6 border border-gray-200 shadow-md rounded",children:Object(d.jsxs)("div",{className:"flex items-center justify-between",children:[Object(d.jsxs)("div",{children:[Object(d.jsx)("h1",{className:"text-blue-600 text-sm font-bold",children:"POSTS"}),Object(d.jsx)("h1",{className:"font-bold text-2xl text-gray-700",children:e.data.posts})]}),Object(d.jsx)("div",{children:Object(d.jsx)(N.a,{className:"h-10 w-10 text-gray-300"})})]})})]})]}):null}},126:function(e,t,n){"use strict";n.r(t),n.d(t,"getUser",(function(){return r})),n.d(t,"loginWithEmailAndPassword",(function(){return a})),n.d(t,"registerWithEmailAndPassword",(function(){return c})),n.d(t,"AuthRoutes",(function(){return y}));var s=n(47),r=function(){return s.a.get("/auth/validate-token")},a=function(e){var t=s.a.post("/auth/login",e);return console.log(t),t},c=function(e){return s.a.post("/users/create",e)},i=n(15),l=n(72),o=n(29),d=n(61),u=n(2),j=function(e){var t=e.children,n=e.title;return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(d.a,{title:n}),Object(u.jsxs)("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col justify-center py-12 sm:px-6 lg:px-8",children:[Object(u.jsxs)("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:[Object(u.jsx)("div",{className:"flex justify-center",children:Object(u.jsx)(o.c,{className:"flex items-center text-white",to:"/",children:Object(u.jsx)("img",{className:"h-24 w-auto",src:l.a,alt:"Workflow"})})}),Object(u.jsx)("h2",{className:"mt-3 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:n})]}),Object(u.jsx)("div",{className:"mt-8 sm:mx-auto sm:w-full sm:max-w-md",children:Object(u.jsx)("div",{className:"bg-white dark:bg-gray-800 py-8 px-4 shadow sm:rounded-lg sm:px-10",children:t})})]})]})},x=n(13),b=n.n(x),m=n(23),h=n(98),f=n(33),O=n(97),p=O.a({email:O.b().min(1,"Required"),password:O.b().min(1,"Required")}),g=function(e){var t=e.onSuccess,n=Object(f.b)(),s=n.login,r=n.isLoggingIn;return Object(u.jsx)("div",{children:Object(u.jsx)(h.b,{onSubmit:function(){var e=Object(m.a)(b.a.mark((function e(n){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s(n);case 2:t();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),schema:p,children:function(e){var t=e.register,n=e.formState;return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(h.d,{type:"email",label:"Email Address",error:n.errors.email,registration:t("email")}),Object(u.jsx)(h.d,{type:"password",label:"Password",error:n.errors.password,registration:t("password")}),Object(u.jsx)("div",{children:Object(u.jsx)(o.a,{isLoading:r,type:"submit",className:"w-full",children:"Log in"})})]})}})})},v=function(){var e=Object(i.i)();return Object(u.jsx)(j,{title:"Log in to your account",children:Object(u.jsx)(g,{onSuccess:function(){return e("/app")}})})},y=function(){return Object(u.jsx)(i.e,{children:Object(u.jsx)(i.c,{path:"login",element:Object(u.jsx)(v,{})})})}},171:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var s=new(n(720).a)({defaultOptions:{queries:{useErrorBoundary:!0,refetchOnWindowFocus:!1,retry:!1}}})},172:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r}));var s="https://ncdc-api-rf5pq.ondigitalocean.app/api",r="https://ncdc-api-rf5pq.ondigitalocean.app/uploads"},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return s.a})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return N.a})),n.d(t,"f",(function(){return k}));var s=n(70),r=n(17),a=n(0),c=(n(173),n(2)),i=r.a.Title,l=(r.a.Description,function(e){var t=e.isOpen,n=e.onClose,s=e.children,i=e.initialFocus;return Object(c.jsx)(c.Fragment,{children:Object(c.jsx)(r.c.Root,{show:t,as:a.Fragment,children:Object(c.jsx)(r.a,{as:"div",static:!0,className:"fixed z-10 inset-0 overflow-y-auto",open:t,onClose:n,initialFocus:i,children:Object(c.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[Object(c.jsx)(r.c.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(c.jsx)(r.a.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),Object(c.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"\u200b"}),Object(c.jsx)(r.c.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:s})]})})})})}),o=n(119),d=n(21),u=function(e){var t=e.triggerButton,n=e.confirmButton,r=e.title,u=e.body,j=void 0===u?"":u,x=e.cancelButtonText,b=void 0===x?"Cancel":x,m=e.icon,h=void 0===m?"danger":m,f=e.isDone,O=void 0!==f&&f,p=Object(o.a)(),g=p.close,v=p.open,y=p.isOpen,w=a.useRef(null);a.useEffect((function(){O&&g()}),[O,g]);var N=a.cloneElement(t,{onClick:v});return Object(c.jsxs)(c.Fragment,{children:[N,Object(c.jsx)(l,{isOpen:y,onClose:g,initialFocus:w,children:Object(c.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6",children:[Object(c.jsxs)("div",{className:"sm:flex sm:items-start",children:["danger"===h&&Object(c.jsx)("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:Object(c.jsx)(d.d,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})}),"info"===h&&Object(c.jsx)("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10",children:Object(c.jsx)(d.g,{className:"h-6 w-6 text-blue-600","aria-hidden":"true"})}),Object(c.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[Object(c.jsx)(i,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:r}),j&&Object(c.jsx)("div",{className:"mt-2",children:Object(c.jsx)("p",{className:"text-sm text-gray-500",children:j})})]})]}),Object(c.jsxs)("div",{className:"mt-4 flex space-x-2 justify-end",children:[Object(c.jsx)(s.a,{type:"button",variant:"inverse",className:"w-full inline-flex justify-center rounded-md border focus:ring-1 focus:ring-offset-1 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:g,ref:w,children:b}),n]})]})})]})},j=(n(118),n(18)),x=n(73),b=n(19),m=n(20),h=["className","children"],f=function(e){var t=e.className,n=e.children,s=Object(x.a)(e,h);return Object(c.jsx)(m.b,Object(j.a)(Object(j.a)({className:Object(b.a)("text-indigo-600 hover:text-indigo-900",t)},s),{},{children:n}))},O=n(287),p=n.n(O),g=n(288),v=n.n(g),y=p()(window),w=function(e){var t=e.value,n=void 0===t?"":t;return Object(c.jsx)("div",{className:"p-2 w-full prose prose-indigo",dangerouslySetInnerHTML:{__html:y.sanitize(v()(n))}})},N=n(117),k=function(e){var t=e.data,n=e.columns;return(null===t||void 0===t?void 0:t.length)?Object(c.jsx)("div",{className:"flex flex-col",children:Object(c.jsx)("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:Object(c.jsx)("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Object(c.jsx)("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Object(c.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[Object(c.jsx)("thead",{className:"bg-gray-50",children:Object(c.jsx)("tr",{children:n.map((function(e,t){return Object(c.jsx)("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e.title},e.title+t)}))})}),Object(c.jsx)("tbody",{children:t.map((function(e,t){return Object(c.jsx)("tr",{className:t%2===0?"bg-white":"bg-gray-100",children:n.map((function(t,n){var s=t.Cell,r=t.field,a=t.title;return Object(c.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:s?Object(c.jsx)(s,{entry:e}):e[r]},a+n)}))},(null===e||void 0===e?void 0:e.id)||t)}))})]})})})})}):Object(c.jsxs)("div",{className:"bg-white text-gray-500 h-80 flex justify-center items-center flex-col",children:[Object(c.jsx)(d.a,{className:"h-16 w-16"}),Object(c.jsx)("h4",{children:"No Entries Found"})]})},C=n(52);C.StyleSheet.create({page:{flexDirection:"row",backgroundColor:"#E4E4E4"},section:{margin:10,padding:10,flexGrow:1}})},313:function(e,t,n){},321:function(e,t){},323:function(e,t){},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return g}));var s=n(13),r=n.n(s),a=n(23),c=n(29),i=n(126),l=n(76),o=n(303),d=n(2);function u(e){return j.apply(this,arguments)}function j(){return(j=Object(a.a)(r.a.mark((function e(t){var n,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.jwt,s=t.user,l.a.setToken(n),e.abrupt("return",s);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){return(x=Object(a.a)(r.a.mark((function e(){var t;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.a.getToken()){e.next=5;break}return e.next=3,Object(i.getUser)();case 3:return t=e.sent,e.abrupt("return",t);case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(){return(b=Object(a.a)(r.a.mark((function e(t){var n,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.loginWithEmailAndPassword)(t);case 2:return n=e.sent,e.next=5,u(n);case 5:return s=e.sent,e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=Object(a.a)(r.a.mark((function e(t){var n,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(i.registerWithEmailAndPassword)(t);case 2:return n=e.sent,e.next=5,u(n);case 5:return s=e.sent,e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=Object(a.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l.a.clearToken(),window.location.assign(window.location.origin);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f={loadUser:function(){return x.apply(this,arguments)},loginFn:function(e){return b.apply(this,arguments)},registerFn:function(e){return m.apply(this,arguments)},logoutFn:function(){return h.apply(this,arguments)},LoaderComponent:function(){return Object(d.jsx)("div",{className:"w-screen h-screen flex justify-center items-center",children:Object(d.jsx)(c.e,{size:"xl"})})}},O=Object(o.a)(f),p=O.AuthProvider,g=O.useAuth},359:function(e,t){},360:function(e,t){},442:function(e,t){},47:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var s=n(172),r=n(95),a=n(76),c=n(299),i=n.n(c),l=n(6),o=n.n(l);function d(e){var t=a.a.getToken();return t&&(e.headers.authorization="Bearer ".concat(t)),e.headers.Accept="application/json",e}d.propTypes={config:o.a.any};var u=i.a.create({baseURL:s.a});u.interceptors.request.use(d),u.interceptors.response.use((function(e){return e.data}),(function(e){var t,n,s=(null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message)||e.message;return r.a.getState().addNotification({type:"error",title:"Error",message:s}),Promise.reject(e)}))},48:function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return o}));var s=n(0),r=n(33),a=n(2),c={ADMIN:"ADMIN",USER:"USER"},i={"comment:delete":function(e,t){return"ADMIN"===e.role||"USER"===e.role&&t.authorId===e.id}},l=function(){var e=Object(r.b)().user;if(!e)throw Error("User does not exist!");return{checkAccess:s.useCallback((function(t){var n=t.allowedRoles;return!(n&&n.length>0)||(null===n||void 0===n?void 0:n.includes(e.role))}),[e.role]),role:e.role}},o=function(e){var t=e.policyCheck,n=e.allowedRoles,s=e.forbiddenFallback,r=void 0===s?null:s,c=e.children,i=l().checkAccess,o=!1;return n&&(o=i({allowedRoles:n})),"undefined"!==typeof t&&(o=t),Object(a.jsx)(a.Fragment,{children:o?c:r})}},61:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var s=n(121),r=n(2),a=function(e){var t=e.title,n=void 0===t?"":t,a=e.description,c=void 0===a?"":a;return Object(r.jsx)(s.a,{title:n?"".concat(n," | NCDC"):void 0,defaultTitle:"NCDC Admin",children:Object(r.jsx)("meta",{name:"description",content:c})})}},70:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var s=n(18),r=n(73),a=n(117),c=n(19),i=n(0),l=n(2),o=["type","className","variant","size","isLoading","startIcon","endIcon"],d={primary:"bg-blue-600 dark:bg-blue-900 text-white hover:bg-gray-50:text-blue-600",inverse:"bg-white text-blue-600 hover:bg-blue-600:text-white",danger:"bg-red-600 text-white hover:bg-red-50:text-red-600"},u={sm:"py-2 px-4 text-sm",md:"py-2 px-6 text-md",lg:"py-3 px-8 text-lg"},j=i.forwardRef((function(e,t){var n=e.type,i=void 0===n?"button":n,j=e.className,x=void 0===j?"":j,b=e.variant,m=void 0===b?"primary":b,h=e.size,f=void 0===h?"md":h,O=e.isLoading,p=void 0!==O&&O,g=e.startIcon,v=e.endIcon,y=Object(r.a)(e,o);return Object(l.jsxs)("button",Object(s.a)(Object(s.a)({ref:t,type:i,className:Object(c.a)("flex justify-center items-center border border-gray-300 dark:border-none disabled:opacity-70 disabled:cursor-not-allowed rounded-md shadow-sm font-medium focus:outline-none",d[m],u[f],x)},y),{},{children:[p&&Object(l.jsx)(a.a,{size:"sm",className:"text-current"}),!p&&g,Object(l.jsx)("span",{className:"mx-2",children:y.children})," ",!p&&v]}))}));j.displayName="Button"},719:function(e,t,n){"use strict";n.r(t);var s=n(0),r=n(90),a=n.n(r),c=(n(313),n(29)),i=n(95),l=n(17),o=n(21),d=n(99),u=n(2),j={info:Object(u.jsx)(o.g,{className:"h-6 w-6 text-blue-500","aria-hidden":"true"}),success:Object(u.jsx)(o.b,{className:"h-6 w-6 text-green-500","aria-hidden":"true"}),warning:Object(u.jsx)(o.c,{className:"h-6 w-6 text-yellow-500","aria-hidden":"true"}),error:Object(u.jsx)(o.m,{className:"h-6 w-6 text-red-500","aria-hidden":"true"})},x=function(e){var t=e.notification,n=t.id,r=t.type,a=t.title,c=t.message,i=e.onDismiss;return Object(s.useEffect)((function(){setTimeout((function(){i(n)}),4e3)}),[n,i]),Object(u.jsx)("div",{className:"w-full flex flex-col items-center space-y-4 sm:items-end",children:Object(u.jsx)(l.c,{show:!0,as:s.Fragment,enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(u.jsx)("div",{className:"max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden",children:Object(u.jsx)("div",{className:"p-4",role:"alert","aria-label":a,children:Object(u.jsxs)("div",{className:"flex items-start",children:[Object(u.jsx)("div",{className:"flex-shrink-0",children:j[r]}),Object(u.jsxs)("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[Object(u.jsx)("p",{className:"text-sm font-medium text-gray-900",children:a}),Object(u.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:c})]}),Object(u.jsx)("div",{className:"ml-4 flex-shrink-0 flex",children:Object(u.jsxs)("button",{className:"bg-white rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",onClick:function(){i(n)},children:[Object(u.jsx)("span",{className:"sr-only",children:"Close"}),Object(u.jsx)(d.c,{className:"h-5 w-5","aria-hidden":"true"})]})})]})})})})})},b=function(){var e=Object(i.a)(),t=e.notifications,n=e.dismissNotification;return Object(u.jsx)("div",{"aria-live":"assertive",className:"z-50 flex flex-col fixed inset-0 space-y-4 items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start",children:t.map((function(e){return Object(u.jsx)(x,{notification:e,onDismiss:n},e.id)}))})},m=n(33),h=n(171),f=n(305),O=n(121),p=n(92),g=n(304),v=n(20),y=function(){return Object(u.jsxs)("div",{className:"text-red-500 w-screen h-screen flex flex-col justify-center items-center",role:"alert",children:[Object(u.jsx)("h2",{className:"text-lg font-semibold",children:"Ooops, something went wrong :( "}),Object(u.jsx)(c.a,{className:"mt-4",onClick:function(){localStorage.removeItem("msw-dbtoken"),window.location.assign(window.location.origin)},children:"Refresh"})]})},w=function(e){var t=e.children;return Object(u.jsx)(s.Suspense,{fallback:Object(u.jsx)("div",{className:"flex items-center justify-center w-screen h-screen",children:Object(u.jsx)(c.e,{size:"xl"})}),children:Object(u.jsx)(f.ErrorBoundary,{FallbackComponent:y,children:Object(u.jsx)(O.b,{children:Object(u.jsxs)(p.a,{client:h.a,children:[Object(u.jsx)(g.ReactQueryDevtools,{}),Object(u.jsx)(b,{}),Object(u.jsx)(m.a,{children:Object(u.jsx)(v.a,{children:t})})]})})})})},N=n(22),k=n(123),C=n(15),F=n(96),R=n(45),S=n(6),T=n.n(S);function A(e,t){return Object.create(Object(R.a)({},t,s.lazy((function(){return e().then((function(e){return{default:e[t]}}))}))))}A.propTypes={factory:T.a.func.isRequired,name:T.a.string.isRequired};var D=A((function(){return n.e(10).then(n.bind(null,741))}),"ResourcesRoutes").ResourcesRoutes,E=A((function(){return n.e(9).then(n.bind(null,743))}),"MessagesRoutes").MessagesRoutes,I=A((function(){return n.e(6).then(n.bind(null,735))}),"PostsRoutes").PostsRoutes,z=A((function(){return n.e(4).then(n.bind(null,744))}),"ApplicationsRoutes").ApplicationsRoutes,B=A((function(){return n.e(13).then(n.bind(null,736))}),"FaqsRoutes").FaqsRoutes,M=A((function(){return n.e(7).then(n.bind(null,737))}),"JobsRoutes").JobsRoutes,L=A((function(){return n.e(5).then(n.bind(null,738))}),"AdsRoutes").AdsRoutes,P=A((function(){return n.e(8).then(n.bind(null,739))}),"ManagersRoutes").ManagersRoutes,q=A((function(){return n.e(11).then(n.bind(null,740))}),"ServicesRoutes").ServicesRoutes,U=A((function(){return n.e(12).then(n.bind(null,746))}),"ComingSoon").ComingSoon,W=A((function(){return n.e(14).then(n.bind(null,745))}),"Settings").Settings,J=A((function(){return Promise.resolve().then(n.bind(null,123))}),"Dashboard").Dashboard,V=A((function(){return n.e(0).then(n.bind(null,742))}),"Profile").Profile,G=A((function(){return n.e(0).then(n.bind(null,742))}),"Users").Users,_=function(){return Object(u.jsx)(F.b,{children:Object(u.jsx)(s.Suspense,{fallback:Object(u.jsx)("div",{className:"h-full w-full flex items-center justify-center",children:Object(u.jsx)(c.e,{size:"xl"})}),children:Object(u.jsx)(C.b,{})})})},H=[{path:"/app",element:Object(u.jsx)(_,{}),children:[{path:"/career/*",element:Object(u.jsx)(M,{})},{path:"/blog/*",element:Object(u.jsx)(I,{})},{path:"/services/*",element:Object(u.jsx)(q,{})},{path:"/messages/*",element:Object(u.jsx)(E,{})},{path:"/resources/*",element:Object(u.jsx)(D,{})},{path:"/management/*",element:Object(u.jsx)(P,{})},{path:"/applications/*",element:Object(u.jsx)(z,{})},{path:"/faqs/*",element:Object(u.jsx)(B,{})},{path:"/ads/*",element:Object(u.jsx)(L,{})},{path:"/users",element:Object(u.jsx)(G,{})},{path:"/settings",element:Object(u.jsx)(W,{})},{path:"/profile",element:Object(u.jsx)(V,{})},{path:"/coming-soon",element:Object(u.jsx)(U,{})},{path:"/",element:Object(u.jsx)(J,{})},{path:"*",element:Object(u.jsx)(k.NotFound,{})}]}],K=A((function(){return Promise.resolve().then(n.bind(null,126))}),"AuthRoutes").AuthRoutes,Q=[{path:"/auth/*",element:Object(u.jsx)(K,{})}],Y=function(){var e=Object(m.b)(),t=[{path:"/",element:Object(u.jsx)(k.Landing,{})}],n=e.user?H:Q,s=Object(C.l)([].concat(Object(N.a)(n),t));return Object(u.jsx)(u.Fragment,{children:s})};var X=function(){return Object(u.jsx)(w,{children:Object(u.jsx)(Y,{})})},Z=function(e){e&&e instanceof Function&&n.e(15).then(n.bind(null,734)).then((function(t){var n=t.getCLS,s=t.getFID,r=t.getFCP,a=t.getLCP,c=t.getTTFB;n(e),s(e),r(e),a(e),c(e)}))};a.a.render(Object(u.jsx)(s.StrictMode,{children:Object(u.jsx)(X,{})}),document.getElementById("root")),Z()},72:function(e,t,n){"use strict";t.a=n.p+"static/media/logo.642cd8ae.png"},76:function(e,t,n){"use strict";var s="msw-db",r={getToken:function(){return JSON.parse(window.localStorage.getItem("".concat(s,"token")))},setToken:function(e){window.localStorage.setItem("".concat(s,"token"),JSON.stringify(e))},clearToken:function(){window.localStorage.removeItem("".concat(s,"token"))}};t.a=r},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var s=n(18),r=n(22),a=n(307),c=n(298),i=Object(c.a)((function(e){return{notifications:[],addNotification:function(t){return e((function(e){return{notifications:[].concat(Object(r.a)(e.notifications),[Object(s.a)({id:Object(a.a)()},t)])}}))},dismissNotification:function(t){return e((function(e){return{notifications:e.notifications.filter((function(e){return e.id!==t}))}}))}}}))},96:function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return k}));var s=n(28),r=n(72),a=n(33),c=n(48),i=n(17),l=n(21),o=n(99),d=n(19),u=n(0),j=n(725),x=n(726),b=n(727),m=n(728),h=n(20),f=n(2),O=function(){var e=Object(c.d)().checkAccess,t=[{name:"Dashboard",to:".",icon:l.f},{name:"Blog",to:"./blog",icon:j.a},e({allowedRoles:[c.c.ADMIN]})&&{name:"Users",to:"./users",icon:l.l},e({allowedRoles:[c.c.ADMIN]})&&{name:"Careers",to:"./careers",icon:l.e},e({allowedRoles:[c.c.ADMIN]})&&{name:"Banner Ads",to:"./ads",icon:x.a},e({allowedRoles:[c.c.ADMIN]})&&{name:"Job Applications",to:"./applications",icon:o.b},e({allowedRoles:[c.c.ADMIN]})&&{name:"Resources",to:"./resources",icon:b.a},e({allowedRoles:[c.c.ADMIN]})&&{name:"Messages",to:"./messages",icon:m.a},{name:"Faqs",to:"./faqs",icon:l.g}].filter(Boolean);return Object(f.jsx)(f.Fragment,{children:t.map((function(e,t){return Object(f.jsxs)(h.c,{end:0===t,to:e.to,className:Object(d.a)("text-gray-300 hover:bg-green-700 hover:text-white","group flex items-center px-2 py-2 text-base font-medium rounded-md"),activeClassName:"bg-green-900 text-white",children:[Object(f.jsx)(e.icon,{className:Object(d.a)("text-gray-400 group-hover:text-gray-300","mr-4 flex-shrink-0 h-6 w-6"),"aria-hidden":"true"}),e.name]},e.name)}))})},p=function(){var e=Object(a.b)().logout,t=[{name:"Your Profile",to:"./profile"},{name:"Sign out",to:"",onClick:function(){e()}}].filter(Boolean);return Object(f.jsx)(i.b,{as:"div",className:"ml-3 relative",children:function(e){var n=e.open;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)("div",{children:Object(f.jsxs)(i.b.Button,{className:"max-w-xs bg-gray-200 p-2 flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:[Object(f.jsx)("span",{className:"sr-only",children:"Open user menu"}),Object(f.jsx)(l.k,{className:"h-8 w-8 rounded-full"})]})}),Object(f.jsx)(i.c,{show:n,as:u.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:Object(f.jsx)(i.b.Items,{static:!0,className:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",children:t.map((function(e){return Object(f.jsx)(i.b.Item,{children:function(t){var n=t.active;return Object(f.jsx)(h.b,{onClick:e.onClick,to:e.to,className:Object(d.a)(n?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700"),children:e.name})}},e.name)}))})})]})}})},g=function(e){var t=e.sidebarOpen,n=e.setSidebarOpen;return Object(f.jsx)(i.c.Root,{show:t,as:u.Fragment,children:Object(f.jsxs)(i.a,{as:"div",static:!0,className:"fixed inset-0 flex z-40 md:hidden",open:t,onClose:n,children:[Object(f.jsx)(i.c.Child,{as:u.Fragment,enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(f.jsx)(i.a.Overlay,{className:"fixed inset-0 bg-gray-600 bg-opacity-75"})}),Object(f.jsx)(i.c.Child,{as:u.Fragment,enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-x-full",enterTo:"translate-x-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-x-0",leaveTo:"-translate-x-full",children:Object(f.jsxs)("div",{className:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-gray-800",children:[Object(f.jsx)(i.c.Child,{as:u.Fragment,enter:"ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(f.jsx)("div",{className:"absolute top-0 right-0 -mr-12 pt-2",children:Object(f.jsxs)("button",{className:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:function(){return n(!1)},children:[Object(f.jsx)("span",{className:"sr-only",children:"Close sidebar"}),Object(f.jsx)(l.n,{className:"h-6 w-6 text-white","aria-hidden":"true"})]})})}),Object(f.jsx)("div",{className:"flex-shrink-0 flex items-center px-4",children:Object(f.jsx)(y,{})}),Object(f.jsx)("div",{className:"mt-5 flex-1 h-0 overflow-y-auto",children:Object(f.jsx)("nav",{className:"px-2 space-y-1",children:Object(f.jsx)(O,{})})})]})}),Object(f.jsx)("div",{className:"flex-shrink-0 w-14","aria-hidden":"true"})]})})},v=function(){return Object(f.jsx)("div",{className:"hidden md:flex md:flex-shrink-0",children:Object(f.jsx)("div",{className:"flex flex-col w-64",children:Object(f.jsxs)("div",{className:"flex flex-col h-0 flex-1",children:[Object(f.jsx)("div",{className:"flex items-center h-16 flex-shrink-0 px-4 bg-white",children:Object(f.jsx)(y,{})}),Object(f.jsx)("div",{className:"flex-1 flex flex-col overflow-y-auto",children:Object(f.jsx)("nav",{className:"flex-1 px-2 py-4 bg-green-800 space-y-1",children:Object(f.jsx)(O,{})})})]})})})},y=function(){return Object(f.jsx)(h.b,{className:"flex items-center text-white",to:".",children:Object(f.jsx)("img",{className:"h-8 w-auto",src:r.a,alt:"Workflow"})})},w=function(e){var t=e.children,n=u.useState(!1),r=Object(s.a)(n,2),a=r[0],c=r[1];return Object(f.jsxs)("div",{className:"h-screen flex overflow-hidden bg-gray-100",children:[Object(f.jsx)(g,{sidebarOpen:a,setSidebarOpen:c}),Object(f.jsx)(v,{}),Object(f.jsxs)("div",{className:"flex flex-col w-0 flex-1 overflow-hidden",children:[Object(f.jsxs)("div",{className:"relative z-10 flex-shrink-0 flex h-16 bg-white dark:bg-gray-900 shadow",children:[Object(f.jsxs)("button",{className:"px-4 border-r border-gray-200 text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500 md:hidden",onClick:function(){return c(!0)},children:[Object(f.jsx)("span",{className:"sr-only",children:"Open sidebar"}),Object(f.jsx)(l.h,{className:"h-6 w-6","aria-hidden":"true"})]}),Object(f.jsx)("div",{className:"flex-1 px-4 flex justify-end",children:Object(f.jsx)("div",{className:"ml-4 flex items-center md:ml-6",children:Object(f.jsx)(p,{})})})]}),Object(f.jsx)("main",{className:"flex-1 relative overflow-y-auto focus:outline-none dark:bg-gray-700",children:t})]})]})},N=n(61),k=function(e){var t=e.children,n=e.title,s=e.button;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(N.a,{title:n}),Object(f.jsxs)("div",{className:"py-6",children:[Object(f.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 md:px-8",children:Object(f.jsxs)("div",{className:"flex flex-row justify-between",children:[Object(f.jsx)("div",{className:"w-[60vw]",children:Object(f.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-400",children:n})}),Object(f.jsx)("div",{children:s})]})}),Object(f.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 md:px-8",children:t})]})]})}},98:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return w})),n.d(t,"a",(function(){return N}));var s=n(18),r=n(73),a=n(308),c=n(19),i=n(58),l=n(2),o=["onSubmit","children","className","options","id","schema","encType"],d=function(e){var t=e.onSubmit,n=e.children,d=e.className,u=e.options,j=e.id,x=e.schema,b=e.encType,m=Object(r.a)(e,o),h=Object(i.d)(Object(s.a)(Object(s.a)({},u),{},{resolver:x&&Object(a.a)(x)}));return Object(l.jsx)("form",Object(s.a)(Object(s.a)({className:Object(c.a)("space-y-6",d),onSubmit:h.handleSubmit(t),encType:b,id:j},m),{},{children:n(h)}))},u=n(119),j=n(0),x=n(70),b=n(118),m=function(e){var t=e.title,n=e.children,s=e.isDone,r=e.triggerButton,a=e.submitButton,c=e.size,i=void 0===c?"md":c,o=Object(u.a)(),d=o.close,m=o.open,h=o.isOpen;return j.useEffect((function(){s&&d()}),[s,d]),Object(l.jsxs)(l.Fragment,{children:[j.cloneElement(r,{onClick:m}),Object(l.jsx)(b.a,{isOpen:h,onClose:d,title:t,size:i,renderFooter:function(){return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)(x.a,{variant:"inverse",size:"sm",onClick:d,children:"Cancel"}),a]})},children:n})]})},h=function(e){var t=e.label,n=e.className,s=e.error,r=e.children;return Object(l.jsxs)("div",{children:[Object(l.jsxs)("label",{className:Object(c.a)("block text-sm font-medium text-gray-700 dark:text-gray-400",n),children:[t,Object(l.jsx)("div",{className:"mt-1",children:r})]}),(null===s||void 0===s?void 0:s.message)&&Object(l.jsx)("div",{role:"alert","aria-label":s.message,className:"text-sm font-semibold text-red-500",children:s.message})]})},f=function(e){var t=e.type,n=void 0===t?"text":t,r=e.label,a=e.className,i=e.disabled,o=e.value,d=e.registration,u=e.onChange,j=e.error;return Object(l.jsx)(h,{label:r,error:j,children:Object(l.jsx)("input",Object(s.a)(Object(s.a)({type:n,className:Object(c.a)("appearance-none block w-full px-3 py-2 border dark:bg-gray-700 dark:border-none border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",a),disabled:i,value:o},d),{},{onChange:u}))})},O=function(e){var t=e.label,n=e.options,r=e.error,a=e.className,i=e.defaultValue,o=e.registration,d=e.placeholder;return Object(l.jsx)(h,{label:t,error:r,children:Object(l.jsx)("select",Object(s.a)(Object(s.a)({placeholder:d,name:"location",className:Object(c.a)("mt-1 block w-full pl-3 pr-10 py-2 text-base border dark:border-none dark:bg-gray-700 border-gray-600 focus:outline-none sm:text-sm rounded-md",a),defaultValue:i},o),{},{children:n.map((function(e){var t=e.label,n=e.value;return Object(l.jsx)("option",{value:n,children:t},null===t||void 0===t?void 0:t.toString())}))}))})},p=n(302),g=n.n(p),v=(n(718),function(e){var t=e.label,n=e.className,s=e.value,r=e.placeholder,a=e.error,i=e.setValue,o=e.editorContent;return Object(l.jsx)(h,{label:t,error:a,children:Object(l.jsx)(g.a,{theme:"snow",placeholder:r,className:Object(c.a)("appearance-none block w-full border-none placeholder-gray-400 focus:outline-none sm:text-sm",n),value:o||"",onChange:function(e){i(s,e)}})})}),y=n(723),w=function(e){var t=e.title,n=e.subTitle,s=e.x,r=e.y,a=e.onChange,c=e.preview,i=void 0===c?"":c;return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)("h1",{className:"text-center font-bold text-lg",children:t}),Object(l.jsx)("div",{className:"text-center",children:Object(l.jsx)("span",{className:"text-gray-500 text-sm",children:n})}),Object(l.jsx)(l.Fragment,{children:i?Object(l.jsx)(l.Fragment,{children:Object(l.jsx)("div",{className:"border border-dotted rounded p-2 flex flex-col items-center justify-center",children:Object(l.jsx)("img",{src:i,className:"w-100",alt:"uploaded to server"})})}):Object(l.jsxs)("div",{className:"border border-dotted rounded p-10 flex flex-col items-center justify-center mt-4",children:[Object(l.jsx)(y.a,{className:"text-gray-300 h-20 w-20"}),Object(l.jsxs)("span",{className:"text-gray-500 text-sm",children:[s," x ",r," or higher recommended."]}),Object(l.jsxs)("label",{className:"",children:[Object(l.jsxs)("span",{className:"mt-2 text-base leading-normal",children:[Object(l.jsx)("span",{className:"text-red-500 cursor-pointer",children:"Browse"})," for image."]}),Object(l.jsx)("input",{type:"file",accept:"image/*",name:"file",className:"hidden",onChange:a})]})]})})]})},N=function(e){var t=e.onChange,n=e.label,s=e.accept;return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)("label",{htmlFor:"file-upload",className:"block text-gray-700 text-sm font-bold",children:n}),Object(l.jsx)("input",{type:"file",accept:s,name:"file",className:"form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none",onChange:t})]})}}},[[719,2,3]]]); //# sourceMappingURL=main.b115404d.chunk.js.map