From f199e588921395b477f482945d496090a502db6c Mon Sep 17 00:00:00 2001 From: Ranga Raja R Date: Sat, 25 May 2024 13:37:48 +0530 Subject: [PATCH] Updates --- assets/index-CZVjMRuW.css | 1 - assets/{index-DWmhQL6U.js => index-DDqJmMM9.js} | 4 ++-- assets/index-FjOQDOVe.css | 1 + index.html | 10 ++++++---- 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 assets/index-CZVjMRuW.css rename assets/{index-DWmhQL6U.js => index-DDqJmMM9.js} (80%) create mode 100644 assets/index-FjOQDOVe.css diff --git a/assets/index-CZVjMRuW.css b/assets/index-CZVjMRuW.css deleted file mode 100644 index efd79f9..0000000 --- a/assets/index-CZVjMRuW.css +++ /dev/null @@ -1 +0,0 @@ -.logo{display:flex;justify-content:center;align-content:center;margin:2px;flex-shrink:0}.homePage{flex:1;display:flex;justify-content:center;align-content:center}.signInPage{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;flex:1}.signInPage form{display:flex;flex-direction:column;align-items:center;gap:12px}.signInPage input{width:300px;height:30px;border:1px solid rgb(var(--second));border-radius:5px;background-color:rgb(var(--prime));padding:0 10px}.signInPage input:focus{outline:none}.signInPage button{width:300px;height:30px}.signInPage .error{color:red;font-size:12px}.signInPage a{text-decoration:none}.signInPage a:hover{text-decoration:underline}.signUpPage{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;flex:1}.signUpPage form{display:flex;flex-direction:column;align-items:center;gap:12px}.signUpPage input:not([type=checkbox]){width:300px;height:30px;border:1px solid rgb(var(--second));border-radius:5px;background-color:rgb(var(--prime));padding:0 10px}.signUpPage input:not([type=checkbox]):focus{outline:none}.signUpPage button{width:300px;height:30px}.signUpPage .error{color:red;font-size:12px;margin:0}.signUpPage a{text-decoration:none}.signUpPage a:hover{text-decoration:underline}.private{display:flex}.private p{margin:0}.sidebar{position:fixed;left:-250px;width:250px;height:calc(100% - 100px);background-color:rgba(var(--first),.9);transition:left .6s ease;text-align:center;text-transform:capitalize;display:flex;flex-direction:column;justify-content:space-between}.sidebar__logo{width:50px;height:50px;display:flex;justify-content:center;align-items:center}.sidebar__options{flex-direction:column;justify-content:start;align-items:center;padding:16px 8px}.sidebar__option{padding:8px 16px;border-radius:8px;cursor:pointer}.active{background-color:rgb(var(--prime));color:rgb(var(--second))}.navbar{padding:10px;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--second));border-bottom:solid 1px rgba(var(--second),.5)}.navbar .projectTitle{display:flex;align-items:center}.navbar .projectTitle .sidebar__logo{cursor:pointer}.navbar .projectTitle .logo{width:50px;height:50px}.navbar .projectTitle a{text-decoration:none;color:rgb(var(--second));font:36px bolder}.navbar .sign{display:flex;align-items:center;text-align:center;justify-content:space-between;gap:16px}.navbar .sign a{text-decoration:none}.navbar .user{display:flex;align-items:center;gap:16px}.navbar .user #user-name{text-decoration:none;font:20px bolder;padding-right:12px}.navbar .user #user-name:first-letter{text-transform:capitalize}.notes{position:fixed;bottom:25px;right:25px;z-index:100;background-color:#ffff0080;padding:8px 12px;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-content:center}.notes .notes-options{cursor:default;display:flex;justify-content:end}.notes textarea{width:90%;height:100px;font-size:16px;line-height:17px;background:repeating-linear-gradient(transparent,transparent 16px,rgba(0,0,0,.5) 16px,rgba(0,0,0,.5) 17px);outline:none;border:none;padding:0}.task-page{display:flex;flex-direction:column;flex:1}.create-task{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.create-task form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;border:solid 1px rgb(var(--second));border-radius:8px;padding:64px 32px}.create-task form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left}.tasks-title{font-size:1.2rem;font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:rgb(var(--prime));border-bottom:2px solid rgb(var(--second))}.task-table-container{display:flex;justify-content:center;align-content:center}.task-table{width:100%;border-collapse:collapse;text-align:center}.task-table th{background-color:rgba(var(--second),.2);text-transform:capitalize}.task-table th,td{border:1px solid rgba(var(--second),.3);padding:8px 12px}.task-table td:nth-child(2){text-align:left}.create-project-task{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.create-project-task form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;text-align:left;border:solid 1px rgb(var(--second));border-radius:8px;padding:48px 32px 64px}.create-project-task form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left;width:320px}.create-project-task form .additional{cursor:pointer;display:flex;justify-content:space-between;padding:0 24px}.project-item-grid{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:.5fr 1fr 1fr 1fr 1fr;grid-gap:16px;width:100%;flex:1}.project-task-title{padding:8px 16px;display:flex;font-size:1rem;text-transform:capitalize;border-bottom:solid 1px rgba(var(--second),.1)}.project-task-list{display:flex;flex-direction:column;grid-row:2/6;overflow:scroll}.project-task-item{text-align:left;width:80%;margin:12px auto;height:100px;background-color:rgba(var(--second),.1);padding:8px;border-radius:8px;cursor:grab}.task-title{display:flex;justify-content:space-between;font-size:1.2rem;font-weight:600}.task-title .title{text-transform:capitalize}.task-title .deadline{color:rgba(var(--second),.8);font-size:.8rem}.task-bottom{height:50px;display:flex;justify-content:space-between;align-items:end}.task-bottom .description{margin-top:10px;font-size:1rem;text-overflow:ellipsis;overflow:hidden;color:rgba(var(--second),.8)}.task-bottom .assign{font-size:.8rem}.project-task-list:has(:active)~.project-task-delete{animation:shake infinite 1s ease-in-out;color:red;text-shadow:0 0 0px 20px rgb(var(--high))}.project-task-item:active{cursor:grabbing;opacity:.5}.project-task-options{grid-row:6;grid-column:3;display:flex;justify-content:center;gap:16px}.project-task-delete{grid-row:-1;justify-self:center;width:100%;text-align:center}@keyframes shake{0%{transform:rotate(0)}10%{transform:rotate(5deg)}20%{transform:rotate(0)}30%{transform:rotate(-5deg)}40%{transform:rotate(0)}}.projectListTitle{font-size:1.2rem;font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:rgb(var(--prime));border-bottom:2px solid rgb(var(--second))}.projectList{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.projectList .project{margin:10px;background-color:#ffffff4d;display:flex;flex-direction:column;justify-content:space-between;padding:10px;border:1px solid rgba(var(--second),.2);border-radius:5px}.projectList .project .project-title{display:flex;justify-content:space-between;font-size:1.2rem;font-weight:600}.projectList .project .project-title .title{text-transform:capitalize}.projectList .project .project-title .deadline{color:rgba(var(--second),.8);font-size:.8rem}.projectList .project .project-description{margin-top:10px;font-size:1rem;height:150px;text-overflow:ellipsis;overflow:hidden;color:rgba(var(--second),.8)}.projectList .project:hover{box-shadow:0 0 10px rgba(var(--second),.2)}.project-modify{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.project-modify form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;align-content:start;text-align:left;border:solid 1px rgb(var(--second));border-radius:8px;padding:64px 32px}.project-modify form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left}.project-modify form li:hover{cursor:url(https://img.icons8.com/?size=20&id=11997&format=png&color=000000),auto}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{display:flex;flex-direction:column;margin:0;--prime: 189, 151, 207;--first: 227, 227, 225;--second: 0, 0, 0;--high: 255, 55, 95;--medium: 255, 201, 38;--low: 63, 202, 125;background-color:rgb(var(--first));color:rgb(var(--second));height:100vh}#root{height:100%;display:flex;flex-direction:column;flex:1}.dark{--prime: 160, 64, 206;--first: 0, 0, 0;--second: 227, 227, 225}button{padding:6px 12px;font-size:16px;border-radius:6px}button:hover{cursor:pointer}.primary-button{background-color:rgb(var(--second));border:rgb(var(--second)) 1px solid;color:rgb(var(--first))}.primary-button a{color:rgb(var(--first))}.secondary-button{background-color:rgb(var(--prime));border:rgb(var(--first)) 1px solid;color:#000}.secondary-button a{color:#000}.tertiary-button{background:transparent;border:none;color:rgb(var(--second))}.tertiary-button a,a{color:rgb(var(--second))}h1{text-transform:capitalize}input:not([type=checkbox]){width:300px;height:30px;border:1px solid rgb(var(--second));border-radius:5px;background-color:rgba(var(--prime),.2);padding:0 10px}input:not([type=checkbox]):focus{outline:none}input[type=range]{width:100%;height:10px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:15px;padding:0;opacity:.7}input[type=range]::-webkit-slider-thumb,input[type=range]::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background-color:rgba(var(--prime));border:1px solid rgb(var(--prime))}textarea{width:300px;height:100px;border:1px solid rgb(var(--second));border-radius:5px;background-color:rgba(var(--prime),.2);padding:10px;font-size:.9rem}textarea:focus{outline:none}ul{list-style:none;margin:0;padding:0}li{padding-left:24px}select{height:30px;border:1px solid rgb(var(--second));background-color:rgba(var(--prime),.2);border-radius:5px;width:100%} diff --git a/assets/index-DWmhQL6U.js b/assets/index-DDqJmMM9.js similarity index 80% rename from assets/index-DWmhQL6U.js rename to assets/index-DDqJmMM9.js index 302fa44..7abbfd7 100644 --- a/assets/index-DWmhQL6U.js +++ b/assets/index-DDqJmMM9.js @@ -69,7 +69,7 @@ Error generating stack: `+i.message+` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[yc]=this[yc]={accessors:{}}).accessors,o=this.prototype;function i(l){const s=bn(l);r[s]||(zy(o,l),r[s]=!0)}return x.isArray(t)?t.forEach(i):i(t),this}}De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(De);function yl(e,t){const n=this||Wr,r=t||n,o=De.from(r.headers);let i=r.data;return x.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function xp(e){return!!(e&&e.__CANCEL__)}function Kr(e,t,n){z.call(this,e??"canceled",z.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(Kr,z,{__CANCEL__:!0});function Fy(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z("Request failed with status code "+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Iy=Ge.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const l=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),x.isString(r)&&l.push("path="+r),x.isString(o)&&l.push("domain="+o),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uy(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $y(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cp(e,t){return e&&!Uy(t)?$y(e,t):t}const By=Ge.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const s=x.isString(l)?o(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Hy(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vy(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),f=r[i];l||(l=a),n[o]=u,r[o]=a;let c=i,g=0;for(;c!==o;)g+=n[c++],c=c%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),a-l{const i=o.loaded,l=o.lengthComputable?o.total:void 0,s=i-n,u=r(s),a=i<=l;n=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&a?(l-i)/u:void 0,event:o};f[t?"download":"upload"]=!0,e(f)}}const Wy=typeof XMLHttpRequest<"u",Ky=Wy&&function(e){return new Promise(function(n,r){let o=e.data;const i=De.from(e.headers).normalize();let{responseType:l,withXSRFToken:s}=e,u;function a(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let f;if(x.isFormData(o)){if(Ge.hasStandardBrowserEnv||Ge.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[m,...S]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...S].join("; "))}}let c=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+S))}const g=Cp(e.baseURL,e.url);c.open(e.method.toUpperCase(),vp(g,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function w(){if(!c)return;const m=De.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),y={data:!l||l==="text"||l==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:e,request:c};Fy(function(v){n(v),a()},function(v){r(v),a()},y),c=null}if("onloadend"in c?c.onloadend=w:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(w)},c.onabort=function(){c&&(r(new z("Request aborted",z.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new z("Network Error",z.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let S=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||gp;e.timeoutErrorMessage&&(S=e.timeoutErrorMessage),r(new z(S,y.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,c)),c=null},Ge.hasStandardBrowserEnv&&(s&&x.isFunction(s)&&(s=s(e)),s||s!==!1&&By(g))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&Iy.read(e.xsrfCookieName);m&&i.set(e.xsrfHeaderName,m)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&x.forEach(i.toJSON(),function(S,y){c.setRequestHeader(y,S)}),x.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",vc(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",vc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=m=>{c&&(r(!m||m.type?new Kr(null,e,c):m),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const d=Hy(g);if(d&&Ge.protocols.indexOf(d)===-1){r(new z("Unsupported protocol "+d+":",z.ERR_BAD_REQUEST,e));return}c.send(o||null)})},Es={http:yy,xhr:Ky};x.forEach(Es,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gc=e=>`- ${e}`,Qy=e=>x.isFunction(e)||e===null||e===!1,Ep={getAdapter:e=>{e=x.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : `+i.map(gc).join(` `):" "+gc(i[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:Es};function vl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kr(null,e)}function wc(e){return vl(e),e.headers=De.from(e.headers),e.data=yl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ep.getAdapter(e.adapter||Wr.adapter)(e).then(function(r){return vl(e),r.data=yl.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return xp(r)||(vl(e),r&&r.response&&(r.response.data=yl.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const Sc=e=>e instanceof De?{...e}:e;function An(e,t){t=t||{};const n={};function r(a,f,c){return x.isPlainObject(a)&&x.isPlainObject(f)?x.merge.call({caseless:c},a,f):x.isPlainObject(f)?x.merge({},f):x.isArray(f)?f.slice():f}function o(a,f,c){if(x.isUndefined(f)){if(!x.isUndefined(a))return r(void 0,a,c)}else return r(a,f,c)}function i(a,f){if(!x.isUndefined(f))return r(void 0,f)}function l(a,f){if(x.isUndefined(f)){if(!x.isUndefined(a))return r(void 0,a)}else return r(void 0,f)}function s(a,f,c){if(c in t)return r(a,f);if(c in e)return r(void 0,a)}const u={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(a,f)=>o(Sc(a),Sc(f),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(f){const c=u[f]||o,g=c(e[f],t[f],f);x.isUndefined(g)&&c!==s||(n[f]=g)}),n}const kp="1.6.8",Mu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xc={};Mu.transitional=function(t,n,r){function o(i,l){return"[Axios v"+kp+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,s)=>{if(t===!1)throw new z(o(l," has been removed"+(n?" in "+n:"")),z.ERR_DEPRECATED);return n&&!xc[l]&&(xc[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,s):!0}};function Zy(e,t,n){if(typeof e!="object")throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const s=e[i],u=s===void 0||l(s,i,e);if(u!==!0)throw new z("option "+i+" must be "+u,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z("Unknown option "+i,z.ERR_BAD_OPTION)}}const ks={assertOptions:Zy,validators:Mu},pt=ks.validators;class Gt{constructor(t){this.defaults=t,this.interceptors={request:new mc,response:new mc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=An(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ks.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),o!=null&&(x.isFunction(o)?n.paramsSerializer={serialize:o}:ks.assertOptions(o,{encode:pt.function,serialize:pt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&x.merge(i.common,i[n.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=De.concat(l,i);const s=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const a=[];this.interceptors.response.forEach(function(m){a.push(m.fulfilled,m.rejected)});let f,c=0,g;if(!u){const d=[wc.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,a),g=d.length,f=Promise.resolve(n);c{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(s=>{r.subscribe(s),i=s}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,s){r.reason||(r.reason=new Kr(i,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Du(function(o){t=o}),cancel:t}}}function Jy(e){return function(n){return e.apply(null,n)}}function qy(e){return x.isObject(e)&&e.isAxiosError===!0}const _s={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_s).forEach(([e,t])=>{_s[t]=e});function _p(e){const t=new Gt(e),n=ip(Gt.prototype.request,t);return x.extend(n,Gt.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return _p(An(e,o))},n}const M=_p(Wr);M.Axios=Gt;M.CanceledError=Kr;M.CancelToken=Du;M.isCancel=xp;M.VERSION=kp;M.toFormData=Ni;M.AxiosError=z;M.Cancel=M.CanceledError;M.all=function(t){return Promise.all(t)};M.spread=Jy;M.isAxiosError=qy;M.mergeConfig=An;M.AxiosHeaders=De;M.formToJSON=e=>Sp(x.isHTMLForm(e)?new FormData(e):e);M.getAdapter=Ep.getAdapter;M.HttpStatusCode=_s;M.default=M;class Gy{constructor(){this.base="https://project-manager-jqsq.onrender.com/user",this.axios=M.create({withCredentials:!0})}getAll(t){return this.axios.get(`${this.base}/all?from=${t}`)}isLoggedIn(){return this.axios.get(`${this.base}/`)}signUp(t){return this.axios.post(`${this.base}/register`,t)}signIn(t){return this.axios.post(`${this.base}/login`,t)}signOut(){return this.axios.post(`${this.base}/logout`)}delete(){return this.axios.delete(`${this.base}/delete`)}}const Qr=new Gy,jp="SIGN_IN",Pp="SIGN_UP",Np="SIGN_OUT",Tp="USER",Rp="USERS",Xy="DELETE",zn="ERROR",Au=()=>async(e,t)=>{const n=t().auth.user,o=(await Qr.getAll(n.id)).data;e({type:Rp,payload:o.map(i=>n.id!=i.id?i:{...i,name:"myself"})})},zu=()=>async e=>{const t=await Qr.isLoggedIn();t.data.message!=="success"?e({type:zn,payload:t.data.message}):e({type:Tp,payload:t.data.user})},Yy=e=>async t=>{const n=await Qr.signIn(e);n.data.message!=="success"?t({type:zn,payload:n.data.message}):(t({type:jp,payload:n.data}),await t(zu()))},by=e=>async t=>{e.name=="myself"&&t({type:zn,payload:"'myself' can not be a username"});const n=await Qr.signUp(e);n.data.message!=="success"?t({type:zn,payload:n.data.message}):(t({type:Pp,payload:n.data}),await t(zu()))},ev=()=>async e=>{const t=await Qr.signOut();t.data.message!=="success"?e({type:zn,payload:t.data.message}):e({type:Np,payload:t.data})};var Op={exports:{}},Lp={};/** +`+i):r.stack=i}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=An(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ks.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),o!=null&&(x.isFunction(o)?n.paramsSerializer={serialize:o}:ks.assertOptions(o,{encode:pt.function,serialize:pt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&x.merge(i.common,i[n.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=De.concat(l,i);const s=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const a=[];this.interceptors.response.forEach(function(m){a.push(m.fulfilled,m.rejected)});let f,c=0,g;if(!u){const d=[wc.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,a),g=d.length,f=Promise.resolve(n);c{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(s=>{r.subscribe(s),i=s}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,s){r.reason||(r.reason=new Kr(i,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Du(function(o){t=o}),cancel:t}}}function Jy(e){return function(n){return e.apply(null,n)}}function qy(e){return x.isObject(e)&&e.isAxiosError===!0}const _s={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_s).forEach(([e,t])=>{_s[t]=e});function _p(e){const t=new Gt(e),n=ip(Gt.prototype.request,t);return x.extend(n,Gt.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return _p(An(e,o))},n}const M=_p(Wr);M.Axios=Gt;M.CanceledError=Kr;M.CancelToken=Du;M.isCancel=xp;M.VERSION=kp;M.toFormData=Ni;M.AxiosError=z;M.Cancel=M.CanceledError;M.all=function(t){return Promise.all(t)};M.spread=Jy;M.isAxiosError=qy;M.mergeConfig=An;M.AxiosHeaders=De;M.formToJSON=e=>Sp(x.isHTMLForm(e)?new FormData(e):e);M.getAdapter=Ep.getAdapter;M.HttpStatusCode=_s;M.default=M;class Gy{constructor(){this.base="https://project-manager-jqsq.onrender.com/user",this.axios=M.create({withCredentials:!0})}getAll(t){return this.axios.get(`${this.base}/all?from=${t}`)}isLoggedIn(){return this.axios.get(`${this.base}/`)}signUp(t){return this.axios.post(`${this.base}/register`,t)}signIn(t){return this.axios.post(`${this.base}/login`,t)}signOut(){return this.axios.post(`${this.base}/logout`)}delete(){return this.axios.delete(`${this.base}/delete`)}}const Qr=new Gy,jp="SIGN_IN",Pp="SIGN_UP",Np="SIGN_OUT",Tp="USER",Rp="USERS",Xy="DELETE",zn="ERROR",Au=()=>async(e,t)=>{const n=t().auth.user,o=(await Qr.getAll(n.id)).data;e({type:Rp,payload:o.map(i=>n.id!=i.id?i:{...i,name:"myself"})})},zu=()=>async e=>{const t=await Qr.isLoggedIn();t.data.message!=="success"?e({type:zn,payload:t.data.message}):e({type:Tp,payload:t.data.user})},Yy=e=>async t=>{const n=await Qr.signIn(e);n.data.message!=="success"?t({type:zn,payload:n.data.message}):(t({type:jp,payload:n.data}),await t(zu()))},by=e=>async t=>{e.name=="myself"&&t({type:zn,payload:"'myself' can not be a username"});const n=await Qr.signUp(e);console.log(n),n.data.message!=="success"?t({type:zn,payload:n.data.message}):(t({type:Pp,payload:n.data}),await t(zu()))},ev=()=>async e=>{const t=await Qr.signOut();t.data.message!=="success"?e({type:zn,payload:t.data.message}):e({type:Np,payload:t.data})};var Op={exports:{}},Lp={};/** * @license React * use-sync-external-store-with-selector.production.min.js * @@ -77,4 +77,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Zr=E;function tv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nv=typeof Object.is=="function"?Object.is:tv,rv=Zr.useSyncExternalStore,ov=Zr.useRef,iv=Zr.useEffect,lv=Zr.useMemo,sv=Zr.useDebugValue;Lp.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=ov(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=lv(function(){function u(w){if(!a){if(a=!0,f=w,w=r(w),o!==void 0&&l.hasValue){var d=l.value;if(o(d,w))return c=d}return c=w}if(d=c,nv(f,w))return d;var m=r(w);return o!==void 0&&o(d,m)?d:(f=w,c=m)}var a=!1,f,c,g=n===void 0?null:n;return[function(){return u(t())},g===null?void 0:function(){return u(g())}]},[t,n,r,o]);var s=rv(e,i[0],i[1]);return iv(function(){l.hasValue=!0,l.value=s},[s]),sv(s),s};Op.exports=Lp;var uv=Op.exports,Ce="default"in kl?Zc:kl,Cc=Symbol.for("react-redux-context"),Ec=typeof globalThis<"u"?globalThis:{};function av(){if(!Ce.createContext)return{};const e=Ec[Cc]??(Ec[Cc]=new Map);let t=e.get(Ce.createContext);return t||(t=Ce.createContext(null),e.set(Ce.createContext,t)),t}var Mt=av(),cv=()=>{throw new Error("uSES not initialized!")};function Fu(e=Mt){return function(){return Ce.useContext(e)}}var Mp=Fu(),Dp=cv,fv=e=>{Dp=e},dv=(e,t)=>e===t;function pv(e=Mt){const t=e===Mt?Mp:Fu(e),n=(r,o={})=>{const{equalityFn:i=dv,devModeChecks:l={}}=typeof o=="function"?{equalityFn:o}:o,{store:s,subscription:u,getServerState:a,stabilityCheck:f,identityFunctionCheck:c}=t();Ce.useRef(!0);const g=Ce.useCallback({[r.name](d){return r(d)}}[r.name],[r,f,l.stabilityCheck]),w=Dp(u.addNestedSub,s.getState,a||s.getState,g,i);return Ce.useDebugValue(w),w};return Object.assign(n,{withTypes:()=>n}),n}var Ae=pv();function hv(e){e()}function mv(){let e=null,t=null;return{clear(){e=null,t=null},notify(){hv(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var kc={notify(){},get:()=>[]};function yv(e,t){let n,r=kc,o=0,i=!1;function l(m){f();const S=r.subscribe(m);let y=!1;return()=>{y||(y=!0,S(),c())}}function s(){r.notify()}function u(){d.onStateChange&&d.onStateChange()}function a(){return i}function f(){o++,n||(n=e.subscribe(u),r=mv())}function c(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=kc)}function g(){i||(i=!0,f())}function w(){i&&(i=!1,c())}const d={addNestedSub:l,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:a,trySubscribe:g,tryUnsubscribe:w,getListeners:()=>r};return d}var vv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gv=typeof navigator<"u"&&navigator.product==="ReactNative",wv=vv||gv?Ce.useLayoutEffect:Ce.useEffect;function Sv({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const l=Ce.useMemo(()=>{const a=yv(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),s=Ce.useMemo(()=>e.getState(),[e]);wv(()=>{const{subscription:a}=l;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),s!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[l,s]);const u=t||Mt;return Ce.createElement(u.Provider,{value:l},n)}var xv=Sv;function Ap(e=Mt){const t=e===Mt?Mp:Fu(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Cv=Ap();function Ev(e=Mt){const t=e===Mt?Cv:Ap(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ft=Ev();fv(uv.useSyncExternalStoreWithSelector);function Iu({scale:e=1}){return p.jsx("div",{className:"logo",children:p.jsxs("svg",{width:`${52*e}`,height:`${53*e}`,viewBox:"0 0 52 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M41.0208 9.46202L41.4655 6.18356C41.5941 5.1578 40.9466 3.9206 39.9727 3.78519L38.3528 3.37342C37.9196 2.20635 37.2257 1.50963 36.1294 1.5C35.1555 1.5 34.3718 2.08429 33.906 2.90506L32.0374 2.68189C31.0635 2.54648 30.1319 3.56414 30.0034 4.5899L29.5587 7.86836L41.0208 9.46202Z",fill:"url(#paint0_linear_129_70)"}),p.jsx("path",{d:"M36.5741 3.37342C36.5741 3.63208 36.375 3.84177 36.1294 3.84177C35.8838 3.84177 35.6847 3.63208 35.6847 3.37342C35.6847 3.11475 35.8838 2.90506 36.1294 2.90506C36.375 2.90506 36.5741 3.11475 36.5741 3.37342Z",fill:"url(#paint1_linear_129_70)"}),p.jsx("path",{d:"M16.7317 47.7987L43.1829 51.4755C44.6437 51.6786 45.9843 50.5959 46.1771 49.0572L50.9768 10.7529C51.1696 9.21426 50.1416 7.80233 48.6807 7.59926L22.2296 3.92245C20.7687 3.71938 19.4281 4.80209 19.2353 6.34073C18.9276 8.79672 18.642 11.0755 18.3714 13.2354M25.9379 11.9733L43.7692 14.4525M42.8799 19.136L27.7656 17.0346M42.8799 23.8196L31.9302 22.2971M41.9905 28.5031L33.6265 27.3402M41.1012 33.1866L33.8335 32.1762M40.2118 37.8702L32.7851 36.8376M39.3225 42.5537L30.4068 41.3141M18.0819 18.864L18.2933 16.0627M28.0619 31.6424L30.7216 31.865M16.1403 44.5296L16.3517 41.7283M3.67566 29.6298L6.33533 29.8525M32.7851 36.8376C30.3922 43.2934 24.4297 47.867 17.453 47.867C8.36626 47.867 1 40.1085 1 30.5379C1 20.9674 8.36626 13.2088 17.453 13.2088C17.7612 13.2088 18.0674 13.2178 18.3714 13.2354M32.7851 36.8376C33.3289 35.3705 33.6883 33.8061 33.8335 32.1762M33.8335 32.1762C33.8815 31.6369 33.906 31.0904 33.906 30.5379C33.906 29.4455 33.81 28.3766 33.6265 27.3402M33.6265 27.3402C33.3088 25.5467 32.7289 23.8504 31.9302 22.2971M31.9302 22.2971C30.8844 20.2635 29.4637 18.475 27.7656 17.0346M27.7656 17.0346C25.1671 14.8303 21.919 13.441 18.3714 13.2354M41.4655 6.18356L41.0208 9.46202L29.5587 7.86836L30.0034 4.5899C30.1319 3.56414 31.0635 2.54648 32.0374 2.68189L33.906 2.90506C34.3718 2.08429 35.1555 1.5 36.1294 1.5C37.2257 1.50963 37.9196 2.20635 38.3528 3.37342L39.9727 3.78519C40.9466 3.9206 41.5941 5.1578 41.4655 6.18356ZM36.5741 3.37342C36.5741 3.63208 36.375 3.84177 36.1294 3.84177C35.8838 3.84177 35.6847 3.63208 35.6847 3.37342C35.6847 3.11475 35.8838 2.90506 36.1294 2.90506C36.375 2.90506 36.5741 3.11475 36.5741 3.37342ZM12.1169 29.1329L12.5616 29.2977C12.5616 29.2977 15.1394 32.1283 16.7317 33.8164L27.6805 23.981L28.5699 23.8196L16.8963 35.4702L12.1169 29.1329Z",stroke:"url(#paint2_linear_129_70)",strokeWidth:"1.9"}),p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"paint0_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]}),p.jsxs("linearGradient",{id:"paint1_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]}),p.jsxs("linearGradient",{id:"paint2_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]})]})]})})}function kv({loggedIn:e=!1}){const t=Ae(s=>s.auth.error),n=Ut(),[r,o]=E.useState({email:"",password:""}),i=ft(),l=s=>{s.preventDefault(),i(Yy(r))};return E.useEffect(()=>{e&&setTimeout(()=>{n(-1)},1e3)},[e]),e?p.jsx("p",{children:"please sign out first"}):p.jsxs("div",{className:"signInPage",children:[p.jsx(Iu,{scale:3}),p.jsx("h1",{children:"TaskMaster"}),p.jsxs("form",{onSubmit:l,children:[p.jsx("input",{type:"email",value:r.email,placeholder:"Email",onChange:s=>o({...r,email:s.target.value})}),p.jsx("input",{type:"password",value:r.password,placeholder:"Password",onChange:s=>o({...r,password:s.target.value})}),p.jsx("p",{className:"error",children:t}),p.jsx("button",{className:"primary-button",type:"submit",children:"sign in"}),p.jsx(hr,{to:"/sign-up",children:" don't have an account? sign up"})]})]})}function _v({loggedIn:e=!1}){const t=Ae(s=>s.auth.error),n=Ut(),[r,o]=E.useState({name:"",email:"",password:"",private:!1}),i=ft(),l=s=>{s.preventDefault(),i(by(r))};return E.useEffect(()=>{e&&setTimeout(()=>{n(-1)},2e3)},[e]),e?p.jsx("p",{children:"please sign out first"}):p.jsxs("div",{className:"signUpPage",children:[p.jsx(Iu,{scale:3}),p.jsx("h1",{children:"TaskMaster"}),p.jsxs("form",{onSubmit:l,children:[p.jsx("input",{type:"text",value:r.name,placeholder:"Name",onChange:s=>{o({...r,name:s.target.value})},required:!0}),p.jsx("input",{type:"email",value:r.email,placeholder:"Email",onChange:s=>o({...r,email:s.target.value}),required:!0}),p.jsx("input",{type:"password",value:r.password,placeholder:"Password",minLength:8,onChange:s=>o({...r,password:s.target.value}),required:!0}),p.jsxs("div",{className:"private",children:[p.jsx("input",{type:"checkbox",checked:r.private,onClick:s=>{o({...r,private:!r.private})}}),p.jsx("p",{children:"keep your account private?"})]}),p.jsx("p",{className:"error",children:t}),p.jsx("button",{className:"primary-button",type:"submit",children:"sign in"}),p.jsx(hr,{to:"/sign-in",children:" already have an account? sign in"})]})]})}function re(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jv=typeof Symbol=="function"&&Symbol.observable||"@@observable",_c=jv,gl=()=>Math.random().toString(36).substring(7).split("").join("."),Pv={INIT:`@@redux/INIT${gl()}`,REPLACE:`@@redux/REPLACE${gl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${gl()}`},ri=Pv;function Uu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function zp(e,t,n){if(typeof e!="function")throw new Error(re(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(re(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(re(1));return n(zp)(e,t)}let r=e,o=t,i=new Map,l=i,s=0,u=!1;function a(){l===i&&(l=new Map,i.forEach((S,y)=>{l.set(y,S)}))}function f(){if(u)throw new Error(re(3));return o}function c(S){if(typeof S!="function")throw new Error(re(4));if(u)throw new Error(re(5));let y=!0;a();const h=s++;return l.set(h,S),function(){if(y){if(u)throw new Error(re(6));y=!1,a(),l.delete(h),i=null}}}function g(S){if(!Uu(S))throw new Error(re(7));if(typeof S.type>"u")throw new Error(re(8));if(typeof S.type!="string")throw new Error(re(17));if(u)throw new Error(re(9));try{u=!0,o=r(o,S)}finally{u=!1}return(i=l).forEach(h=>{h()}),S}function w(S){if(typeof S!="function")throw new Error(re(10));r=S,g({type:ri.REPLACE})}function d(){const S=c;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(re(11));function h(){const C=y;C.next&&C.next(f())}return h(),{unsubscribe:S(h)}},[_c](){return this}}}return g({type:ri.INIT}),{dispatch:g,subscribe:c,getState:f,replaceReducer:w,[_c]:d}}function Nv(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:ri.INIT})>"u")throw new Error(re(12));if(typeof n(void 0,{type:ri.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(re(13))})}function Fp(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw s&&s.type,new Error(re(14));a[c]=d,u=u||d!==w}return u=u||r.length!==Object.keys(l).length,u?a:l}}function oi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Tv(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(re(15))};const l={getState:o.getState,dispatch:(u,...a)=>i(u,...a)},s=e.map(u=>u(l));return i=oi(...s)(o.dispatch),{...o,dispatch:i}}}function Rv(e){return Uu(e)&&"type"in e&&typeof e.type=="string"}class Ov{constructor(){this.base="https://project-manager-jqsq.onrender.com/user/task"}create(t){return M.post(`${this.base}/create`,t)}all(t){return M.get(`${this.base}/list?owner=${t}`)}one(t){return M.get(`${this.base}/details?id=${t}`)}update(t){return M.put(`${this.base}/update`,t)}delete(t){return M.delete(`${this.base}/delete?id=${t}`)}}const Ti=new Ov,Ip="CREATE_TASK",Lv="UPDATE_TASK",Mv="DELETE_TASK",Up="ALL_TASK",$p="LOAD_TASK",Dv=e=>async(t,n)=>{try{const r=n().auth.user.id;e.deadline==""&&(e.deadline=null);const o=await Ti.create({...e,owner:r});return t({type:Ip,payload:o.data}),await t(Ar()),Promise.resolve(o.data)}catch(r){return Promise.reject(r)}},Ar=()=>async(e,t)=>{try{e({type:$p});const n=t().auth.user.id,r=await Ti.all(n);return e({type:Up,payload:r.data}),Promise.resolve(r.data)}catch(n){return Promise.reject(n)}},Av=e=>async t=>{try{e.deadline==""&&(e.deadline=null);const n=await Ti.update(e);return t({type:Lv,payload:n.data}),Ar()}catch(n){return Promise.reject(n)}},zv=e=>async t=>{try{const n=await Ti.delete(e);return t({type:Mv,payload:n.data}),Ar()}catch(n){return Promise.reject(n)}},jc={tasks:[],loading:!1};function Bp(e=jc,t){switch(t.type){case Ip:return{...e,tasks:[...e.tasks,t.payload]};case Up:return{...e,tasks:t.payload,loading:!1};case $p:return{...e,loading:!0};case qr:return jc;default:return e}}const Fv={user:null,error:null,all:[]};function Hp(e=Fv,t){switch(t.type){case Rp:return{...e,all:t.payload};case Pp:return{...e,user:t.payload};case jp:return{...e,user:t.payload,error:null};case Np:return{...e,user:null};case Tp:return{...e,user:t.payload,error:null};case Xy:return{...e,user:null};case zn:return{...e,error:t.payload};default:return e}}class Iv{constructor(){this.base="https://project-manager-jqsq.onrender.com/notes"}get(t){return M.get(`${this.base}/?owner=${t}`)}update(t){return console.log(t),M.post(`${this.base}/update`,t)}}const Vp=new Iv,$u="UPDATE",Uv=()=>async(e,t)=>{try{const n=t().auth.user.id,r=await Vp.get(n);e({type:$u,payload:r.data})}catch(n){console.log(n)}},$v=e=>async(t,n)=>{try{const r=n().auth.user.id,o=await Vp.update({...e,owner:r});t({type:$u,payload:o.data})}catch(r){console.log(r)}},Pc={content:""};function Wp(e=Pc,t){switch(t.type){case $u:return t.payload;case qr:return Pc;default:return e}}class Bv{constructor(){this.base="https://project-manager-jqsq.onrender.com/project"}getProjects(t){return M.get(`${this.base}/get-owned?owner=${t}`)}getProject(t){return M.get(`${this.base}/get?id=${t}`)}createProject(t){return M.post(`${this.base}/create`,t)}deleteProject(t){return M.delete(`${this.base}/delete?id=${t}`)}updateProject(t){return M.put(`${this.base}/update`,t)}}const Ri=new Bv;class Hv{constructor(){this.base="https://project-manager-jqsq.onrender.com/project/task"}create(t){return M.post(`${this.base}/create`,t)}all(t){return M.get(`${this.base}/list?owner=${t}`)}one(t){return M.get(`${this.base}/details?id=${t}`)}update(t){return M.put(`${this.base}/update`,t)}delete(t){return M.delete(`${this.base}/delete?id=${t}`)}status(t,n){return M.put(`${this.base}/status?id=${t}&status=${n}`)}}const Oi=new Hv,Kp="ALL_PROJECT_TASK",Vv="LOAD_PROJECT_TASK",Wv=(e,t)=>async n=>{try{const r=Object.keys(t).reduce((i,l)=>(t[l]!==null&&(i[l]=t[l]),i),{});r.deadline==""&&(r.deadline=null);const o=await Oi.create({...r,owner:e});await n(Jr())}catch(r){console.log(r)}},Jr=()=>async(e,t)=>{try{e({type:Vv});const n=t().project.one.id,r=await Oi.all(n);return e({type:Kp,payload:r.data}),Promise.resolve(r.data)}catch(n){console.log(n)}},Kv=e=>async t=>{try{const n=await Oi.delete(e);await t(Jr())}catch(n){console.log(n)}},wl=(e,t)=>async n=>{try{const r=await Oi.status(e,t);await n(Jr())}catch(r){console.log(r)}},Qp="CREATE_PROJECT",Zp="FETCH_PROJECTS",Bu="FETCH_PROJECT",Hu="LOADING_PROJECT",Qv=e=>async(t,n)=>{try{const r=n().auth.user.id;t({type:Hu,payload:!0}),e.due==""&&(e.due=null);const o=await Ri.createProject({...e,owner:r});t({type:Qp,payload:o.data})}catch(r){console.log(r)}},Vu=()=>async(e,t)=>{try{const n=t().auth.user.id;e({type:Hu,payload:!0});const r=await Ri.getProjects(n);e({type:Zp,payload:r.data}),r.data&&(e({type:Bu,payload:r.data[0]}),e(Jr()))}catch(n){console.log(n)}},Zv=e=>async t=>{const n=await Ri.getProject(e);n.data.due==null&&(n.data.due=""),t({type:Bu,payload:n.data})},Jv=e=>async t=>{e.due==""&&(e.due=null),await Ri.updateProject(e),await t(Vu())},Nc={projects:[],loading:!1,one:null};function Jp(e=Nc,t){switch(t.type){case Hu:return{...e,loading:t.payload};case Qp:return{...e,projects:[...e.projects,t.payload]};case Zp:return{...e,projects:t.payload,loading:!1};case Bu:return{...e,one:t.payload};case qr:return Nc;default:return e}}const Tc={tasks:[]};function qp(e=Tc,t){switch(t.type){case Kp:return{...e,tasks:t.payload};case qr:return Tc;default:return e}}const qr="CLEAR";Fp({task:Bp,auth:Hp,note:Wp,project:Jp,projectTask:qp});const qv=()=>p.jsx("svg",{width:"24",height:"28",viewBox:"0 0 24 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M19.5 22V21H19.4741L19.4483 21.0013L19.5 22ZM5 7C4.44772 7 4 7.44772 4 8C4 8.55228 4.44772 9 5 9V7ZM19 9C19.5523 9 20 8.55228 20 8C20 7.44772 19.5523 7 19 7V9ZM5 12C4.44772 12 4 12.4477 4 13C4 13.5523 4.44772 14 5 14V12ZM19 14C19.5523 14 20 13.5523 20 13C20 12.4477 19.5523 12 19 12V14ZM5 17C4.44772 17 4 17.4477 4 18C4 18.5523 4.44772 19 5 19V17ZM19 19C19.5523 19 20 18.5523 20 18C20 17.4477 19.5523 17 19 17V19ZM17.5 27V28C17.7652 28 18.0196 27.8946 18.2071 27.7071L17.5 27ZM22.5 22L23.2071 22.7071C23.3946 22.5196 23.5 22.2652 23.5 22H22.5ZM3.5 2H20.5V0H3.5V2ZM2.5 25V3H0.5V25H2.5ZM3.5 26C2.94772 26 2.5 25.5523 2.5 25H0.5C0.5 26.6569 1.84315 28 3.5 28V26ZM19.4483 21.0013C17.8806 21.0825 16.3657 22.306 16.503 24.0773L18.497 23.9227C18.468 23.5481 18.8103 23.0371 19.5517 22.9987L19.4483 21.0013ZM20.5 2C21.0523 2 21.5 2.44772 21.5 3H23.5C23.5 1.34315 22.1569 0 20.5 0V2ZM3.5 0C1.84315 0 0.5 1.34315 0.5 3H2.5C2.5 2.44771 2.94772 2 3.5 2V0ZM5 9H19V7H5V9ZM5 14H19V12H5V14ZM5 19H19V17H5V19ZM16.5 24V27H18.5V24H16.5ZM17.5 26H3.5V28H17.5V26ZM21.5 3V22H23.5V3H21.5ZM22.5 21H19.5V23H22.5V21ZM21.7929 21.2929L16.7929 26.2929L18.2071 27.7071L23.2071 22.7071L21.7929 21.2929ZM17.8714 24.9285L22.8714 22.9285L22.1286 21.0715L17.1286 23.0715L17.8714 24.9285ZM18.5715 21.6286L16.5715 26.6286L18.4285 27.3714L20.4285 22.3714L18.5715 21.6286Z",fill:"black"})}),Gv=()=>p.jsx("svg",{width:"20",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M1.30608 0.598877L22.5193 21.8121M0.598999 21.8121L21.8122 0.5989",stroke:"#FF375F","stroke-width":"2"})}),Xv=()=>p.jsx("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M22.1765 17.4545C22.7288 17.4545 23.1765 17.0068 23.1765 16.4545C23.1765 15.9023 22.7288 15.4545 22.1765 15.4545V17.4545ZM0.292893 15.7474C-0.0976311 16.138 -0.0976311 16.7711 0.292893 17.1617L6.65685 23.5256C7.04738 23.9161 7.68054 23.9161 8.07107 23.5256C8.46159 23.1351 8.46159 22.5019 8.07107 22.1114L2.41421 16.4545L8.07107 10.7977C8.46159 10.4072 8.46159 9.774 8.07107 9.38348C7.68054 8.99295 7.04738 8.99295 6.65685 9.38348L0.292893 15.7474ZM9.70588 11.9091C9.70588 12.4614 10.1536 12.9091 10.7059 12.9091C11.2582 12.9091 11.7059 12.4614 11.7059 11.9091H9.70588ZM11.7059 21C11.7059 20.4477 11.2582 20 10.7059 20C10.1536 20 9.70588 20.4477 9.70588 21H11.7059ZM13.3529 2H28.3529V0H13.3529V2ZM30 3.72727V28.2727H32V3.72727H30ZM28.3529 30H13.3529V32H28.3529V30ZM13.3529 30C12.4712 30 11.7059 29.255 11.7059 28.2727H9.70588C9.70588 30.3029 11.3108 32 13.3529 32V30ZM30 28.2727C30 29.255 29.2347 30 28.3529 30V32C30.3951 32 32 30.3029 32 28.2727H30ZM28.3529 2C29.2347 2 30 2.74498 30 3.72727H32C32 1.69711 30.3951 0 28.3529 0V2ZM13.3529 0C11.3108 0 9.70588 1.69711 9.70588 3.72727H11.7059C11.7059 2.74498 12.4712 2 13.3529 2V0ZM22.1765 15.4545H10.7059V17.4545H22.1765V15.4545ZM10.7059 15.4545H1V17.4545H10.7059V15.4545ZM11.7059 11.9091V3.72727H9.70588V11.9091H11.7059ZM11.7059 28.2727V21H9.70588V28.2727H11.7059Z",fill:"#FF375F"})}),Sl=()=>p.jsx("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M14 4V1C14 0.734784 14.1054 0.48043 14.2929 0.292893C14.4804 0.105357 14.7348 0 15 0C15.2652 0 15.5196 0.105357 15.7071 0.292893C15.8946 0.48043 16 0.734784 16 1V4C16 4.26522 15.8946 4.51957 15.7071 4.70711C15.5196 4.89464 15.2652 5 15 5C14.7348 5 14.4804 4.89464 14.2929 4.70711C14.1054 4.51957 14 4.26522 14 4ZM15 7C13.4177 7 11.871 7.46919 10.5554 8.34824C9.23984 9.22729 8.21447 10.4767 7.60896 11.9385C7.00346 13.4003 6.84504 15.0089 7.15372 16.5607C7.4624 18.1126 8.22433 19.538 9.34315 20.6569C10.462 21.7757 11.8874 22.5376 13.4393 22.8463C14.9911 23.155 16.5997 22.9965 18.0615 22.391C19.5233 21.7855 20.7727 20.7602 21.6518 19.4446C22.5308 18.129 23 16.5823 23 15C22.9977 12.879 22.1541 10.8455 20.6543 9.3457C19.1545 7.84591 17.121 7.00232 15 7ZM6.2925 7.7075C6.48014 7.89514 6.73464 8.00056 7 8.00056C7.26536 8.00056 7.51986 7.89514 7.7075 7.7075C7.89514 7.51986 8.00056 7.26536 8.00056 7C8.00056 6.73464 7.89514 6.48014 7.7075 6.2925L5.7075 4.2925C5.51986 4.10486 5.26536 3.99944 5 3.99944C4.73464 3.99944 4.48014 4.10486 4.2925 4.2925C4.10486 4.48014 3.99944 4.73464 3.99944 5C3.99944 5.26536 4.10486 5.51986 4.2925 5.7075L6.2925 7.7075ZM6.2925 22.2925L4.2925 24.2925C4.10486 24.4801 3.99944 24.7346 3.99944 25C3.99944 25.2654 4.10486 25.5199 4.2925 25.7075C4.48014 25.8951 4.73464 26.0006 5 26.0006C5.26536 26.0006 5.51986 25.8951 5.7075 25.7075L7.7075 23.7075C7.80041 23.6146 7.87411 23.5043 7.92439 23.3829C7.97468 23.2615 8.00056 23.1314 8.00056 23C8.00056 22.8686 7.97468 22.7385 7.92439 22.6171C7.87411 22.4957 7.80041 22.3854 7.7075 22.2925C7.61459 22.1996 7.50429 22.1259 7.3829 22.0756C7.2615 22.0253 7.13139 21.9994 7 21.9994C6.86861 21.9994 6.7385 22.0253 6.6171 22.0756C6.49571 22.1259 6.38541 22.1996 6.2925 22.2925ZM23 8C23.1314 8.0001 23.2615 7.97432 23.3829 7.92414C23.5042 7.87395 23.6146 7.80033 23.7075 7.7075L25.7075 5.7075C25.8951 5.51986 26.0006 5.26536 26.0006 5C26.0006 4.73464 25.8951 4.48014 25.7075 4.2925C25.5199 4.10486 25.2654 3.99944 25 3.99944C24.7346 3.99944 24.4801 4.10486 24.2925 4.2925L22.2925 6.2925C22.1525 6.43236 22.0571 6.61061 22.0185 6.80469C21.9798 6.99878 21.9996 7.19997 22.0754 7.38279C22.1511 7.56561 22.2794 7.72185 22.444 7.83172C22.6086 7.94159 22.8021 8.00016 23 8ZM23.7075 22.2925C23.5199 22.1049 23.2654 21.9994 23 21.9994C22.7346 21.9994 22.4801 22.1049 22.2925 22.2925C22.1049 22.4801 21.9994 22.7346 21.9994 23C21.9994 23.2654 22.1049 23.5199 22.2925 23.7075L24.2925 25.7075C24.3854 25.8004 24.4957 25.8741 24.6171 25.9244C24.7385 25.9747 24.8686 26.0006 25 26.0006C25.1314 26.0006 25.2615 25.9747 25.3829 25.9244C25.5043 25.8741 25.6146 25.8004 25.7075 25.7075C25.8004 25.6146 25.8741 25.5043 25.9244 25.3829C25.9747 25.2615 26.0006 25.1314 26.0006 25C26.0006 24.8686 25.9747 24.7385 25.9244 24.6171C25.8741 24.4957 25.8004 24.3854 25.7075 24.2925L23.7075 22.2925ZM5 15C5 14.7348 4.89464 14.4804 4.70711 14.2929C4.51957 14.1054 4.26522 14 4 14H1C0.734784 14 0.48043 14.1054 0.292893 14.2929C0.105357 14.4804 0 14.7348 0 15C0 15.2652 0.105357 15.5196 0.292893 15.7071C0.48043 15.8946 0.734784 16 1 16H4C4.26522 16 4.51957 15.8946 4.70711 15.7071C4.89464 15.5196 5 15.2652 5 15ZM15 25C14.7348 25 14.4804 25.1054 14.2929 25.2929C14.1054 25.4804 14 25.7348 14 26V29C14 29.2652 14.1054 29.5196 14.2929 29.7071C14.4804 29.8946 14.7348 30 15 30C15.2652 30 15.5196 29.8946 15.7071 29.7071C15.8946 29.5196 16 29.2652 16 29V26C16 25.7348 15.8946 25.4804 15.7071 25.2929C15.5196 25.1054 15.2652 25 15 25ZM29 14H26C25.7348 14 25.4804 14.1054 25.2929 14.2929C25.1054 14.4804 25 14.7348 25 15C25 15.2652 25.1054 15.5196 25.2929 15.7071C25.4804 15.8946 25.7348 16 26 16H29C29.2652 16 29.5196 15.8946 29.7071 15.7071C29.8946 15.5196 30 15.2652 30 15C30 14.7348 29.8946 14.4804 29.7071 14.2929C29.5196 14.1054 29.2652 14 29 14Z",fill:"#A040CE"})}),xl=()=>p.jsx("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M12.5 25C19.4037 25 25 19.4037 25 12.5C25 11.9213 24.1325 11.825 23.8337 12.3213C23.1966 13.3767 22.3275 14.2733 21.2925 14.9431C20.2575 15.6129 19.0836 16.0384 17.8598 16.1874C16.636 16.3363 15.3943 16.2048 14.2288 15.8028C13.0633 15.4009 12.0046 14.7389 11.1329 13.8671C10.2611 12.9954 9.59915 11.9367 9.19715 10.7712C8.79516 9.60571 8.66366 8.36404 8.81262 7.14021C8.96158 5.91638 9.38709 4.7425 10.0569 3.70748C10.7267 2.67246 11.6233 1.80344 12.6787 1.16625C13.175 0.86625 13.0787 0 12.5 0C5.59625 0 0 5.59625 0 12.5C0 19.4037 5.59625 25 12.5 25Z",fill:"#A040CE"})});function Yv({setOpen:e,open:t,user:n}){const r=["home","projects","tasks"],o=ct(),i=Ut(),l=ft(),s=a=>{i(a.target.id),e()},u=()=>{l({type:qr}),l(ev())};return p.jsxs("div",{className:"sidebar",style:{left:t?0:""},children:[p.jsx("div",{className:"sidebar__options",children:r.map((a,f)=>p.jsx("div",{onClick:s,id:a,className:o.pathname.includes(a)?"sidebar__option active":"sidebar__option",children:a},f))}),n&&p.jsx("div",{onClick:u,color:"red",children:p.jsx(Xv,{})})]})}function bv({user:e,dark:t,isDark:n}){const r=ct(),[o,i]=E.useState(!1),l=Ae(s=>s.auth.error);return E.useEffect(()=>{console.log(n)},[n]),r.pathname=="/sign-in"||r.pathname=="/sign-up"?p.jsx("div",{className:"navbar",style:{position:"fixed",border:"none"},onClick:()=>t(),children:n?p.jsx(xl,{onClick:()=>t()}):p.jsx(Sl,{onClick:()=>t()})}):p.jsxs("div",{className:o?"top":"top over",children:[p.jsxs("nav",{className:"navbar",children:[p.jsxs("div",{className:"projectTitle",children:[p.jsx("div",{className:"sidebar__logo",onClick:()=>i(!o),children:"☰"}),p.jsx(Iu,{}),p.jsxs(hr,{to:"",children:["TaskMaster",l]})]}),e!=null?p.jsxs("div",{className:"user",children:[p.jsx("div",{onClick:()=>t(),children:n?p.jsx(xl,{onClick:t}):p.jsx(Sl,{onClick:()=>t()})}),p.jsx("div",{children:p.jsx("p",{id:"user-name",children:e.name})})]}):p.jsxs("div",{className:"sign",children:[p.jsx("div",{onClick:()=>t(),children:n?p.jsx(xl,{onClick:()=>t()}):p.jsx(Sl,{onClick:()=>t()})}),p.jsx("button",{className:"tertiary-button signIn",children:p.jsx(hr,{to:"/sign-in",children:"Sign In"})}),p.jsx("button",{className:"secondary-button signUp",children:p.jsx(hr,{to:"/sign-up",children:"Sign Up"})})]})]}),p.jsx(Yv,{setOpen:()=>i(!o),open:o,user:e!=null})]})}function e2(){return p.jsx("div",{className:"homePage",children:p.jsx("h1",{children:"Welcome to TaskMaster"})})}function t2({note:e,save:t,loggedIn:n}){const r=ct(),[o,i]=E.useState(e.content),[l,s]=E.useState(!1);return E.useEffect(()=>{i(e.content);const u=a=>{a.key==="Escape"?(s(!1),t(o)):a.shiftKey&&a.key==="n"&&s(!0)};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[e]),r.pathname=="/sign-in"||r.pathname=="/sign-up"?p.jsx(p.Fragment,{}):l?p.jsxs("div",{className:"notes",children:[p.jsx("div",{className:"notes-options",children:p.jsx(Gv,{onClick:()=>{s(!1),t(o)}})}),p.jsx("textarea",{disabled:!n,value:o,onChange:u=>i(u.target.value)})]}):p.jsx("div",{className:"notes",style:{height:"35px",border:"1px solid rgb(var(--second))"},onClick:()=>s(!0),children:p.jsx(qv,{})})}function n2({loggedIn:e}){const t=ft(),n=Ae(f=>f.task.tasks),[r,o]=E.useState(!1),[i,l]=E.useState(!1),[s,u]=E.useState({task:"",description:"",completion:0,deadline:""}),a=f=>{f.preventDefault(),console.log(s),r?(t(Av(s)).then(()=>{t(Ar())}),o(!1)):t(Dv(s)),l(!1)};return E.useEffect(()=>{e&&t(Ar())},[e]),p.jsxs("div",{className:"task-page",children:[p.jsxs("div",{className:"tasks-title",children:[p.jsx("h1",{children:"Tasks"}),p.jsx("div",{className:"task-add",children:p.jsx("button",{className:"secondary-button",onClick:()=>l(!i),children:"New"})})]}),i&&p.jsx("div",{className:"create-task",children:p.jsxs("form",{onSubmit:a,children:[p.jsx("input",{type:"text",value:s.task,onChange:f=>u({...s,task:f.target.value}),placeholder:"Task Name",required:!0}),p.jsx("textarea",{type:"text",value:s.description,onChange:f=>u({...s,description:f.target.value}),placeholder:"Task Description"}),p.jsxs("div",{className:"task-completion",children:[p.jsxs("output",{for:"completion",onforminput:"value = completion.valueAsNumber;",children:["Completion: ",s.completion,"%"]}),p.jsx("input",{type:"range",min:0,max:100,value:s.completion,onChange:f=>u({...s,completion:f.target.value}),name:"completion"})]}),p.jsx("input",{type:"date",min:new Date().toISOString().split("T")[0],value:s.deadline,onChange:f=>u({...s,deadline:f.target.value})}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>{o(!1),l(!1),u({task:"",description:"",completion:0,deadline:""})},children:"cancel"}),p.jsx("button",{type:"submit",children:r?"Update":"Create"})]})]})}),p.jsx("div",{className:"task-table-container",children:p.jsxs("table",{className:"task-table",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Task"}),p.jsx("th",{children:"description"}),p.jsx("th",{children:"progress"}),p.jsx("th",{children:"deadline"}),p.jsx("th",{children:"Actions"})]})}),p.jsx("tbody",{children:n.map(f=>p.jsxs("tr",{style:{backgroundColor:`rgba(var(--low), ${f.completion/100})`},children:[p.jsx("td",{children:f.task}),p.jsx("td",{children:f.description}),p.jsxs("td",{children:[f.completion,"%"]}),p.jsx("td",{children:f.deadline&&f.deadline}),p.jsxs("td",{children:[p.jsx("button",{onClick:()=>{u({...f,deadline:f.deadline!=null?f.deadline:""}),l(!0),o(!0)},children:"update"}),p.jsx("button",{onClick:()=>t(zv(index)),children:"delete"})]})]},f.id))})]})})]})}function r2({tasks:e=[],newTask:t,users:n=[]}){const[r,o]=E.useState([]),[i,l]=E.useState([]),[s,u]=E.useState([]),a=ft(),f=()=>{try{r.map(d=>{e.find(m=>m.id==d.id).status!="To Do"&&a(wl(d.id,"To Do"))}),i.map(d=>{e.find(m=>m.id==d.id).status!="In Progress"&&a(wl(d.id,"In Progress"))}),s.map(d=>{e.find(m=>m.id==d.id).status!="Completed"&&a(wl(d.id,"Completed"))})}catch(d){console.log(d)}},c=(d,m)=>{d.dataTransfer.setData("from",m.from),d.dataTransfer.setData("id",m.id)},g=(d,m)=>{if(m=="delete"){a(Kv(d.dataTransfer.getData("id")));return}const S=d.dataTransfer.getData("from"),y=d.dataTransfer.getData("id");if(S==m)return;let h=null;S=="todo"?(h=r.find(v=>v.id==y),o(r.filter(v=>v.id!=y))):S=="in progress"?(h=i.find(v=>v.id==y),l(i.filter(v=>v.id!=y))):S=="completed"&&(h=s.find(v=>v.id==y),u(s.filter(v=>v.id!=y))),m=="todo"?o([...r,h]):m=="in progress"?l([...i,h]):m=="completed"&&u([...s,h])},w=d=>{d.preventDefault()};return E.useEffect(()=>(e.map(d=>{d.status==="To Do"?o(m=>[...m,d]):d.status==="In Progress"?l(m=>[...m,d]):d.status==="Completed"&&u(m=>[...m,d])}),()=>{o([]),l([]),u([])}),[e]),p.jsx(p.Fragment,{children:p.jsxs("div",{className:"project-item-grid",children:[p.jsx("div",{className:"project-task-title",children:"todo"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"todo"),children:r.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"todo",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-title",children:"inprogress"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"in progress"),children:i.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"in progress",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-title",children:"completed"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"completed"),children:s.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"completed",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-delete",onDragOver:w,onDrop:d=>g(d,"delete"),children:"delete"}),p.jsxs("div",{className:"project-task-options",children:[p.jsx("button",{onClick:t,children:"add Task"}),p.jsx("button",{onClick:()=>f(),children:"save changes"})]})]})})}function o2({close:e}){const t=ft(),n=Ut(),r=Ae(m=>m.auth.all),o=Ae(m=>m.project.one),i=Ae(m=>m.projectTask.tasks),[l,s]=E.useState(!1),[u,a]=E.useState(!1),[f,c]=E.useState({title:"",description:"",deadline:"",priority:null,difficulty:null,assigned_to:null}),g=()=>{n("/projects/modify",{state:{edit:!0}})},w=m=>{m.preventDefault(),console.log("created"),t(Wv(o.id,f)),c({title:"",description:"",completion:0,deadline:"",priority:null,difficulty:null,assigned_to:null}),s(!1)},d=()=>{u&&c({priority:null,difficulty:null,assigned_to:null}),a(!u)};return E.useEffect(()=>{t(Jr(o.id)),t(Au());const m=S=>{console.log(S.key),S.key==="Escape"&&e()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[]),r==null||o==null||i==null?p.jsx("h1",{children:"Loading"}):p.jsxs(p.Fragment,{children:[o&&p.jsxs("div",{className:"projectListTitle",children:[p.jsx("h1",{children:o.title}),p.jsx("div",{className:"projectListTitle--add",children:p.jsx("button",{className:"secondary-button",onClick:g,children:"edit"})})]}),l&&p.jsx("div",{className:"create-project-task",children:p.jsxs("form",{onSubmit:w,children:[p.jsx("input",{type:"text",value:f.title,onChange:m=>c({...f,title:m.target.value}),placeholder:"Task Title",required:!0}),p.jsx("textarea",{type:"text",value:f.description,onChange:m=>c({...f,description:m.target.value}),placeholder:"Task Description",required:!0}),p.jsx("input",{type:"date",min:new Date().toISOString().split("T")[0],value:f.deadline,onChange:m=>c({...f,deadline:m.target.value})}),p.jsxs("div",{className:"additional",onClick:d,children:[p.jsx("div",{children:"additional details"}),p.jsx("div",{children:u?"-":"+"})]}),u&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"element",children:[p.jsx("label",{for:"priority",children:"Priority"}),p.jsxs("select",{id:"priority",defaultValue:"default",onChange:m=>c({...f,priority:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"default"}),p.jsx("option",{value:"High",children:"High"}),p.jsx("option",{value:"Medium",children:"Medium"}),p.jsx("option",{value:"Low",children:"Low"})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("label",{htmlFor:"difficulty",children:"difficulty"}),p.jsxs("select",{id:"difficulty",defaultValue:"default",onChange:m=>c({...f,difficulty:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"default"}),p.jsx("option",{value:"High",children:"High"}),p.jsx("option",{value:"Medium",children:"Medium"}),p.jsx("option",{value:"Low",children:"Low"})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("label",{htmlFor:"assign",children:"Assign to"}),p.jsxs("select",{id:"assign",defaultValue:"Select",onChange:m=>c({...f,assigned_to:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"Select"}),r.map((m,S)=>m.name!="myself"?p.jsxs("option",{value:m.id,children:[m.name," -"," ",m.email]},S):p.jsx("option",{value:m.id,children:m.name},S))]})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>s(!1),children:"cancel"}),p.jsx("button",{type:"submit",children:"Create"})]})]})}),p.jsx(r2,{tasks:i,newTask:()=>s(!0),users:r})]})}function i2({loggedIn:e}){const t=ft(),n=Ae(s=>s.project),r=Ut(),[o,i]=E.useState(!1);E.useEffect(()=>{e&&t(Vu())},[e]);const l=s=>t(Zv(s)).then(()=>{i(!0)});return o?p.jsx(o2,{close:()=>i(!1)}):p.jsxs("div",{children:[p.jsxs("div",{className:"projectListTitle",children:[p.jsx("h1",{children:"Projects"}),p.jsx("div",{className:"projectListTitle--add",children:p.jsx("button",{className:"secondary-button",onClick:()=>r("/projects/modify"),children:"new"})})]}),n.loading?p.jsx("p",{children:"loading"}):p.jsx("div",{className:"projectList",children:n.projects.map((s,u)=>p.jsxs("div",{className:"project",onClick:()=>{l(s.id)},children:[p.jsxs("div",{className:"project-title",children:[p.jsx("div",{className:"title",children:s.title}),p.jsx("div",{className:"deadline",children:s.deadline&&s.deadline})]}),p.jsxs("div",{className:"project-description",children:["Description: ",p.jsx("br",{}),s.description||"empty"]})]},u))})]})}function l2(){const e=Ae(d=>d.auth.all),t=ft(),n=new Date().toISOString().split("T")[0],[r,o]=E.useState(null),[i,l]=E.useState([]),s=Ut(),u=ct(),a=Ae(d=>d.project.one),{edit:f}=u.state||!1,[c,g]=E.useState({title:"",description:"",due:"",group:!1,members:[]}),w=d=>{d.preventDefault(),f?(d.preventDefault(),t(Jv(c)).then(()=>{s("/projects")})):t(Qv(c)).then(()=>{t(Vu())}).then(()=>{s("/projects")})};return E.useEffect(()=>{if(t(Au()),f){g(a);const d=e.map(m=>{if(c.members.includes(m.id))return m.name}).filter(Boolean);l(d)}},[]),p.jsx("div",{className:"project-modify",children:p.jsxs("form",{onSubmit:w,children:[p.jsx("h2",{children:"Project"}),p.jsx("input",{type:"text",value:c.title,onChange:d=>g({...c,title:d.target.value}),required:!0,placeholder:"Project Title"}),p.jsx("textarea",{value:c.description,onChange:d=>g({...c,description:d.target.value}),required:!0,placeholder:"Project Description"}),p.jsx("input",{type:"date",value:c.due,min:n,onChange:d=>g({...c,due:d.target.value})}),p.jsxs("div",{children:["is this a group project?",p.jsx("input",{type:"checkbox",checked:c.group,onClick:d=>{g({...c,group:!c.group}),c.group||(l([]),o(null))}})]}),c.group?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsxs("select",{defaultValue:"Select",onChange:d=>o(d.target.value),children:[p.jsx("option",{disabled:!0,children:"Select"}),e.map((d,m)=>{if(d.name!="myself")return p.jsxs("option",{value:m,children:[d.name," - ",d.email]},m)})]}),p.jsx("button",{type:"button",onClick:()=>{const d=e[r];r&&(!c.members.includes(d.id)||!i.includes(d.name))&&(g({...c,members:[...c.members,d.id]}),l([...i,d.name]))},children:"add member"})]}),p.jsxs("ul",{children:["members:",i.length==0?" None":"",i.map((d,m)=>p.jsx("li",{onClick:()=>{const S=i.filter((h,v)=>v!==m);l(S);const y=c.members.filter((h,v)=>v!=m);g({...c,members:y})},children:d},m))]})]}):p.jsx(p.Fragment,{}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>s("/projects"),children:"Cancel"}),p.jsx("button",{type:"submit",children:f?"Update":"Create"})]})]})})}function s2(){const e=Ae(l=>l.auth.user),t=Ae(l=>l.note),n=ft(),[r,o]=E.useState(document.body.classList.contains("dark")),i=()=>{document.body.classList.contains("dark")?(document.body.classList.remove("dark"),o(!1)):(document.body.classList.add("dark"),o(!0))};return E.useEffect(()=>{let l=!0;return window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches&&l&&(o(!0),document.body.classList.add("dark")),document.cookie.match("(^|;)\\s*user\\s*=\\s*([^;]+)")&&(n(zu()).then(()=>{n(Uv())}),n(Au())),()=>l=!1},[]),p.jsxs(L0,{children:[p.jsx(bv,{user:e,dark:i,isDark:r}),p.jsx(t2,{note:e==null?{content:""}:t,loggedIn:e!=null,save:l=>{t.content!=l&&n($v({...t,content:l}))}}),p.jsxs(_0,{children:[p.jsx(ht,{index:!0,path:"/home",element:p.jsx(e2,{})}),p.jsx(ht,{path:"/sign-in",element:p.jsx(kv,{loggedIn:e!=null})}),p.jsx(ht,{path:"/sign-up",element:p.jsx(_v,{loggedIn:e!=null})}),p.jsx(ht,{path:"/tasks",element:p.jsx(n2,{loggedIn:e!=null})}),p.jsx(ht,{path:"/projects",element:p.jsx(i2,{loggedIn:e!=null})}),p.jsx(ht,{path:"/projects/modify",element:p.jsx(l2,{})}),p.jsx(ht,{path:"*",element:p.jsx(E0,{to:"/home",replace:!0})})]})]})}var Gp=Symbol.for("immer-nothing"),Rc=Symbol.for("immer-draftable"),_e=Symbol.for("immer-state");function Ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fn=Object.getPrototypeOf;function nn(e){return!!e&&!!e[_e]}function rn(e){var t;return e?Xp(e)||Array.isArray(e)||!!e[Rc]||!!((t=e.constructor)!=null&&t[Rc])||Mi(e)||Di(e):!1}var u2=Object.prototype.constructor.toString();function Xp(e){if(!e||typeof e!="object")return!1;const t=Fn(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===u2}function ii(e,t){Li(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Li(e){const t=e[_e];return t?t.type_:Array.isArray(e)?1:Mi(e)?2:Di(e)?3:0}function js(e,t){return Li(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yp(e,t,n){const r=Li(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function a2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Mi(e){return e instanceof Map}function Di(e){return e instanceof Set}function Wt(e){return e.copy_||e.base_}function Ps(e,t){if(Mi(e))return new Map(e);if(Di(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Xp(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[_e];let o=Reflect.ownKeys(r);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=c2),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Wu(r,!0))),e}function c2(){Ve(2)}function Ai(e){return Object.isFrozen(e)}var f2={};function on(e){const t=f2[e];return t||Ve(0,e),t}var zr;function bp(){return zr}function d2(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Oc(e,t){t&&(on("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ns(e){Ts(e),e.drafts_.forEach(p2),e.drafts_=null}function Ts(e){e===zr&&(zr=e.parent_)}function Lc(e){return zr=d2(zr,e)}function p2(e){const t=e[_e];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[_e].modified_&&(Ns(t),Ve(4)),rn(e)&&(e=li(t,e),t.parent_||si(t,e)),t.patches_&&on("Patches").generateReplacementPatches_(n[_e].base_,e,t.patches_,t.inversePatches_)):e=li(t,n,[]),Ns(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gp?e:void 0}function li(e,t,n){if(Ai(t))return t;const r=t[_e];if(!r)return ii(t,(o,i)=>Dc(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return si(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,l=!1;r.type_===3&&(i=new Set(o),o.clear(),l=!0),ii(i,(s,u)=>Dc(e,r,o,s,u,n,l)),si(e,o,!1),n&&e.patches_&&on("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Dc(e,t,n,r,o,i,l){if(nn(o)){const s=i&&t&&t.type_!==3&&!js(t.assigned_,r)?i.concat(r):void 0,u=li(e,o,s);if(Yp(n,r,u),nn(u))e.canAutoFreeze_=!1;else return}else l&&n.add(o);if(rn(o)&&!Ai(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;li(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&si(e,o)}}function si(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wu(t,n)}function h2(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Ku;n&&(o=[r],i=Fr);const{revoke:l,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=l,s}var Ku={get(e,t){if(t===_e)return e;const n=Wt(e);if(!js(n,t))return m2(e,n,t);const r=n[t];return e.finalized_||!rn(r)?r:r===Cl(e.base_,t)?(El(e),e.copy_[t]=Os(r,e)):r},has(e,t){return t in Wt(e)},ownKeys(e){return Reflect.ownKeys(Wt(e))},set(e,t,n){const r=eh(Wt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Cl(Wt(e),t),i=o==null?void 0:o[_e];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(a2(n,o)&&(n!==void 0||js(e.base_,t)))return!0;El(e),Rs(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Cl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,El(e),Rs(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ve(11)},getPrototypeOf(e){return Fn(e.base_)},setPrototypeOf(){Ve(12)}},Fr={};ii(Ku,(e,t)=>{Fr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fr.deleteProperty=function(e,t){return Fr.set.call(this,e,t,void 0)};Fr.set=function(e,t,n){return Ku.set.call(this,e[0],t,n,e[0])};function Cl(e,t){const n=e[_e];return(n?Wt(n):e)[t]}function m2(e,t,n){var o;const r=eh(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function eh(e,t){if(!(t in e))return;let n=Fn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Fn(n)}}function Rs(e){e.modified_||(e.modified_=!0,e.parent_&&Rs(e.parent_))}function El(e){e.copy_||(e.copy_=Ps(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const l=this;return function(u=i,...a){return l.produce(u,f=>n.call(this,f,...a))}}typeof n!="function"&&Ve(6),r!==void 0&&typeof r!="function"&&Ve(7);let o;if(rn(t)){const i=Lc(this),l=Os(t,void 0);let s=!0;try{o=n(l),s=!1}finally{s?Ns(i):Ts(i)}return Oc(i,r),Mc(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Gp&&(o=void 0),this.autoFreeze_&&Wu(o,!0),r){const i=[],l=[];on("Patches").generateReplacementPatches_(t,o,i,l),r(i,l)}return o}else Ve(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...s)=>this.produceWithPatches(l,u=>t(u,...s));let r,o;return[this.produce(t,n,(l,s)=>{r=l,o=s}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){rn(e)||Ve(8),nn(e)&&(e=th(e));const t=Lc(this),n=Os(e,void 0);return n[_e].isManual_=!0,Ts(t),n}finishDraft(e,t){const n=e&&e[_e];(!n||!n.isManual_)&&Ve(9);const{scope_:r}=n;return Oc(r,t),Mc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=on("Patches").applyPatches_;return nn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Os(e,t){const n=Mi(e)?on("MapSet").proxyMap_(e,t):Di(e)?on("MapSet").proxySet_(e,t):h2(e,t);return(t?t.scope_:bp()).drafts_.push(n),n}function th(e){return nn(e)||Ve(10,e),nh(e)}function nh(e){if(!rn(e)||Ai(e))return e;const t=e[_e];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ps(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ps(e,!0);return ii(n,(r,o)=>{Yp(n,r,nh(o))}),t&&(t.finalized_=!1),n}var je=new y2;je.produce;je.produceWithPatches.bind(je);je.setAutoFreeze.bind(je);je.setUseStrictShallowCopy.bind(je);je.applyPatches.bind(je);je.createDraft.bind(je);je.finishDraft.bind(je);function v2(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function g2(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function w2(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ac=e=>Array.isArray(e)?e:[e];function S2(e){const t=Array.isArray(e[0])?e[0]:e;return w2(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function x2(e,t){const n=[],{length:r}=e;for(let o=0;o{n=yo(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function rh(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,l=0,s,u={},a=o.pop();typeof a=="object"&&(u=a,a=o.pop()),v2(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const f={...n,...u},{memoize:c,memoizeOptions:g=[],argsMemoize:w=Qu,argsMemoizeOptions:d=[],devModeChecks:m={}}=f,S=Ac(g),y=Ac(d),h=S2(o),v=c(function(){return i++,a.apply(null,arguments)},...S),C=w(function(){l++;const N=x2(h,arguments);return s=v.apply(null,N),s},...y);return Object.assign(C,{resultFunc:a,memoizedResultFunc:v,dependencies:h,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:c,argsMemoize:w})};return Object.assign(r,{withTypes:()=>r}),r}var _2=rh(Qu),j2=Object.assign((e,t=_2)=>{g2(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((l,s,u)=>(l[n[u]]=s,l),{}))},{withTypes:()=>j2});function oh(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var ih=oh(),P2=oh,N2=(...e)=>{const t=rh(...e),n=Object.assign((...r)=>{const o=t(...r),i=(l,...s)=>o(nn(l)?th(l):l,...s);return Object.assign(i,o),i},{withTypes:()=>n});return n};N2(Qu);var T2=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?oi:oi.apply(null,arguments)};function zi(e,t){function n(...r){return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Rv(r)&&r.type===e,n}var lh=class or extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,or.prototype)}static get[Symbol.species](){return or}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new or(...t[0].concat(this)):new or(...t.concat(this))}};function R2(e){return typeof e=="boolean"}var O2=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let l=new lh;return n&&(R2(n)?l.push(ih):l.push(P2(n.extraArgument))),l},L2="RTK_autoBatch",sh=e=>t=>{setTimeout(t,e)},M2=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sh(10),D2=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,l=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?M2:e.type==="callback"?e.queueNotification:sh(e.timeout),a=()=>{l=!1,i&&(i=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const c=()=>o&&f(),g=r.subscribe(c);return s.add(f),()=>{g(),s.delete(f)}},dispatch(f){var c;try{return o=!((c=f==null?void 0:f.meta)!=null&&c[L2]),i=!o,i&&(l||(l=!0,u(a))),r.dispatch(f)}finally{o=!0}}})},A2=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new lh(e);return r&&o.push(D2(typeof r=="object"?r:void 0)),o},z2=!0;function F2(e){const t=O2(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:l=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(Uu(n))s=Fp(n);else throw new Error(Fi(1));let u;typeof r=="function"?u=r(t):u=t();let a=oi;o&&(a=T2({trace:!z2,...typeof o=="object"&&o}));const f=Tv(...u),c=A2(f);let g=typeof l=="function"?l(c):c();const w=a(...g);return zp(s,i,w)}var I2="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",U2=(e=21)=>{let t="",n=e;for(;n--;)t+=I2[Math.random()*64|0];return t},$2=(e,t)=>{if(typeof e!="function")throw new Error(Fi(32))},Zu="listenerMiddleware",B2=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=zi(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Fi(21));return $2(i),{predicate:o,type:t,effect:i}},H2=Object.assign(e=>{const{type:t,predicate:n,effect:r}=B2(e);return{id:U2(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Fi(22))}}},{withTypes:()=>H2}),V2=Object.assign(zi(`${Zu}/add`),{withTypes:()=>V2});zi(`${Zu}/removeAll`);var W2=Object.assign(zi(`${Zu}/remove`),{withTypes:()=>W2});function Fi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const K2=F2({reducer:{task:Bp,auth:Hp,note:Wp,project:Jp,projectTask:qp},middleware:e=>e().concat(ih)});_l.createRoot(document.getElementById("root")).render(p.jsx(xv,{store:K2,children:p.jsx(s2,{})})); + */var Zr=E;function tv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nv=typeof Object.is=="function"?Object.is:tv,rv=Zr.useSyncExternalStore,ov=Zr.useRef,iv=Zr.useEffect,lv=Zr.useMemo,sv=Zr.useDebugValue;Lp.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=ov(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=lv(function(){function u(w){if(!a){if(a=!0,f=w,w=r(w),o!==void 0&&l.hasValue){var d=l.value;if(o(d,w))return c=d}return c=w}if(d=c,nv(f,w))return d;var m=r(w);return o!==void 0&&o(d,m)?d:(f=w,c=m)}var a=!1,f,c,g=n===void 0?null:n;return[function(){return u(t())},g===null?void 0:function(){return u(g())}]},[t,n,r,o]);var s=rv(e,i[0],i[1]);return iv(function(){l.hasValue=!0,l.value=s},[s]),sv(s),s};Op.exports=Lp;var uv=Op.exports,Ce="default"in kl?Zc:kl,Cc=Symbol.for("react-redux-context"),Ec=typeof globalThis<"u"?globalThis:{};function av(){if(!Ce.createContext)return{};const e=Ec[Cc]??(Ec[Cc]=new Map);let t=e.get(Ce.createContext);return t||(t=Ce.createContext(null),e.set(Ce.createContext,t)),t}var Mt=av(),cv=()=>{throw new Error("uSES not initialized!")};function Fu(e=Mt){return function(){return Ce.useContext(e)}}var Mp=Fu(),Dp=cv,fv=e=>{Dp=e},dv=(e,t)=>e===t;function pv(e=Mt){const t=e===Mt?Mp:Fu(e),n=(r,o={})=>{const{equalityFn:i=dv,devModeChecks:l={}}=typeof o=="function"?{equalityFn:o}:o,{store:s,subscription:u,getServerState:a,stabilityCheck:f,identityFunctionCheck:c}=t();Ce.useRef(!0);const g=Ce.useCallback({[r.name](d){return r(d)}}[r.name],[r,f,l.stabilityCheck]),w=Dp(u.addNestedSub,s.getState,a||s.getState,g,i);return Ce.useDebugValue(w),w};return Object.assign(n,{withTypes:()=>n}),n}var Ae=pv();function hv(e){e()}function mv(){let e=null,t=null;return{clear(){e=null,t=null},notify(){hv(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var kc={notify(){},get:()=>[]};function yv(e,t){let n,r=kc,o=0,i=!1;function l(m){f();const S=r.subscribe(m);let y=!1;return()=>{y||(y=!0,S(),c())}}function s(){r.notify()}function u(){d.onStateChange&&d.onStateChange()}function a(){return i}function f(){o++,n||(n=e.subscribe(u),r=mv())}function c(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=kc)}function g(){i||(i=!0,f())}function w(){i&&(i=!1,c())}const d={addNestedSub:l,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:a,trySubscribe:g,tryUnsubscribe:w,getListeners:()=>r};return d}var vv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gv=typeof navigator<"u"&&navigator.product==="ReactNative",wv=vv||gv?Ce.useLayoutEffect:Ce.useEffect;function Sv({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:i="once"}){const l=Ce.useMemo(()=>{const a=yv(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:i}},[e,r,o,i]),s=Ce.useMemo(()=>e.getState(),[e]);wv(()=>{const{subscription:a}=l;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),s!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[l,s]);const u=t||Mt;return Ce.createElement(u.Provider,{value:l},n)}var xv=Sv;function Ap(e=Mt){const t=e===Mt?Mp:Fu(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Cv=Ap();function Ev(e=Mt){const t=e===Mt?Cv:Ap(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ft=Ev();fv(uv.useSyncExternalStoreWithSelector);function Iu({scale:e=1}){return p.jsx("div",{className:"logo",children:p.jsxs("svg",{width:`${52*e}`,height:`${53*e}`,viewBox:"0 0 52 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M41.0208 9.46202L41.4655 6.18356C41.5941 5.1578 40.9466 3.9206 39.9727 3.78519L38.3528 3.37342C37.9196 2.20635 37.2257 1.50963 36.1294 1.5C35.1555 1.5 34.3718 2.08429 33.906 2.90506L32.0374 2.68189C31.0635 2.54648 30.1319 3.56414 30.0034 4.5899L29.5587 7.86836L41.0208 9.46202Z",fill:"url(#paint0_linear_129_70)"}),p.jsx("path",{d:"M36.5741 3.37342C36.5741 3.63208 36.375 3.84177 36.1294 3.84177C35.8838 3.84177 35.6847 3.63208 35.6847 3.37342C35.6847 3.11475 35.8838 2.90506 36.1294 2.90506C36.375 2.90506 36.5741 3.11475 36.5741 3.37342Z",fill:"url(#paint1_linear_129_70)"}),p.jsx("path",{d:"M16.7317 47.7987L43.1829 51.4755C44.6437 51.6786 45.9843 50.5959 46.1771 49.0572L50.9768 10.7529C51.1696 9.21426 50.1416 7.80233 48.6807 7.59926L22.2296 3.92245C20.7687 3.71938 19.4281 4.80209 19.2353 6.34073C18.9276 8.79672 18.642 11.0755 18.3714 13.2354M25.9379 11.9733L43.7692 14.4525M42.8799 19.136L27.7656 17.0346M42.8799 23.8196L31.9302 22.2971M41.9905 28.5031L33.6265 27.3402M41.1012 33.1866L33.8335 32.1762M40.2118 37.8702L32.7851 36.8376M39.3225 42.5537L30.4068 41.3141M18.0819 18.864L18.2933 16.0627M28.0619 31.6424L30.7216 31.865M16.1403 44.5296L16.3517 41.7283M3.67566 29.6298L6.33533 29.8525M32.7851 36.8376C30.3922 43.2934 24.4297 47.867 17.453 47.867C8.36626 47.867 1 40.1085 1 30.5379C1 20.9674 8.36626 13.2088 17.453 13.2088C17.7612 13.2088 18.0674 13.2178 18.3714 13.2354M32.7851 36.8376C33.3289 35.3705 33.6883 33.8061 33.8335 32.1762M33.8335 32.1762C33.8815 31.6369 33.906 31.0904 33.906 30.5379C33.906 29.4455 33.81 28.3766 33.6265 27.3402M33.6265 27.3402C33.3088 25.5467 32.7289 23.8504 31.9302 22.2971M31.9302 22.2971C30.8844 20.2635 29.4637 18.475 27.7656 17.0346M27.7656 17.0346C25.1671 14.8303 21.919 13.441 18.3714 13.2354M41.4655 6.18356L41.0208 9.46202L29.5587 7.86836L30.0034 4.5899C30.1319 3.56414 31.0635 2.54648 32.0374 2.68189L33.906 2.90506C34.3718 2.08429 35.1555 1.5 36.1294 1.5C37.2257 1.50963 37.9196 2.20635 38.3528 3.37342L39.9727 3.78519C40.9466 3.9206 41.5941 5.1578 41.4655 6.18356ZM36.5741 3.37342C36.5741 3.63208 36.375 3.84177 36.1294 3.84177C35.8838 3.84177 35.6847 3.63208 35.6847 3.37342C35.6847 3.11475 35.8838 2.90506 36.1294 2.90506C36.375 2.90506 36.5741 3.11475 36.5741 3.37342ZM12.1169 29.1329L12.5616 29.2977C12.5616 29.2977 15.1394 32.1283 16.7317 33.8164L27.6805 23.981L28.5699 23.8196L16.8963 35.4702L12.1169 29.1329Z",stroke:"url(#paint2_linear_129_70)",strokeWidth:"1.9"}),p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"paint0_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]}),p.jsxs("linearGradient",{id:"paint1_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]}),p.jsxs("linearGradient",{id:"paint2_linear_129_70",x1:"29.3381",y1:"1.5",x2:"22.6619",y2:"51.5",gradientUnits:"userSpaceOnUse",children:[p.jsx("stop",{stopColor:"#786cd8"}),p.jsx("stop",{offset:"0.8",stopColor:"#7A5CB9"}),p.jsx("stop",{offset:"1",stopColor:"#7A5CB9"})]})]})]})})}function kv({loggedIn:e=!1}){const t=Ae(a=>a.auth.error),n=Ut(),[r,o]=E.useState(!1),[i,l]=E.useState({email:"",password:""}),s=ft(),u=a=>{a.preventDefault(),s(Yy(i))};return E.useEffect(()=>{e&&setTimeout(()=>{n(-1)},1e3)},[e]),e?p.jsx("p",{children:"please sign out first"}):p.jsxs("div",{className:"signInPage",children:[p.jsx(Iu,{scale:3}),p.jsx("h1",{children:"TaskMaster"}),p.jsxs("form",{onSubmit:u,children:[p.jsx("input",{type:"email",value:i.email,placeholder:"Email",onChange:a=>l({...i,email:a.target.value})}),p.jsxs("div",{className:"pass",children:[p.jsx("input",{type:r?"text":"password",value:i.password,placeholder:"Password",onChange:a=>l({...i,password:a.target.value})}),r?p.jsx("span",{className:"material-symbols-outlined",onClick:()=>o(!r),children:"visibility"}):p.jsx("span",{className:"material-symbols-outlined",onClick:()=>o(!r),children:"visibility_off"})]}),p.jsx("p",{className:"error",children:t}),p.jsx("button",{className:"primary-button",type:"submit",children:"sign in"}),p.jsx(hr,{to:"/sign-up",children:" don't have an account? sign up"})]})]})}function _v({loggedIn:e=!1}){const t=Ae(a=>a.auth.error),n=Ut(),[r,o]=E.useState(!1),[i,l]=E.useState({name:"",email:"",password:"",private:!1}),s=ft(),u=a=>{a.preventDefault(),s(by(i))};return E.useEffect(()=>{e&&setTimeout(()=>{n("home")},500)},[e]),e?p.jsx("p",{children:"please sign out first"}):p.jsxs("div",{className:"signUpPage",children:[p.jsx(Iu,{scale:3}),p.jsx("h1",{children:"TaskMaster"}),p.jsxs("form",{onSubmit:u,children:[p.jsx("input",{type:"text",value:i.name,placeholder:"Name",onChange:a=>{l({...i,name:a.target.value})},required:!0}),p.jsx("input",{type:"email",value:i.email,placeholder:"Email",onChange:a=>l({...i,email:a.target.value}),required:!0}),p.jsxs("div",{className:"pass",children:[p.jsx("input",{type:r?"text":"password",value:i.password,placeholder:"Password",onChange:a=>l({...i,password:a.target.value})}),r?p.jsx("span",{className:"material-symbols-outlined",onClick:()=>o(!r),children:"visibility"}):p.jsx("span",{className:"material-symbols-outlined",onClick:()=>o(!r),children:"visibility_off"})]}),p.jsxs("div",{className:"private",children:[p.jsx("input",{type:"checkbox",checked:i.private,onChange:a=>{l({...i,private:!i.private})}}),p.jsx("p",{children:"keep your account private?"})]}),p.jsx("p",{className:"error",children:t}),p.jsx("button",{className:"primary-button",type:"submit",children:"sign up"}),p.jsx(hr,{to:"/sign-in",children:" already have an account? sign in"})]})]})}function re(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jv=typeof Symbol=="function"&&Symbol.observable||"@@observable",_c=jv,gl=()=>Math.random().toString(36).substring(7).split("").join("."),Pv={INIT:`@@redux/INIT${gl()}`,REPLACE:`@@redux/REPLACE${gl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${gl()}`},ri=Pv;function Uu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function zp(e,t,n){if(typeof e!="function")throw new Error(re(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(re(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(re(1));return n(zp)(e,t)}let r=e,o=t,i=new Map,l=i,s=0,u=!1;function a(){l===i&&(l=new Map,i.forEach((S,y)=>{l.set(y,S)}))}function f(){if(u)throw new Error(re(3));return o}function c(S){if(typeof S!="function")throw new Error(re(4));if(u)throw new Error(re(5));let y=!0;a();const h=s++;return l.set(h,S),function(){if(y){if(u)throw new Error(re(6));y=!1,a(),l.delete(h),i=null}}}function g(S){if(!Uu(S))throw new Error(re(7));if(typeof S.type>"u")throw new Error(re(8));if(typeof S.type!="string")throw new Error(re(17));if(u)throw new Error(re(9));try{u=!0,o=r(o,S)}finally{u=!1}return(i=l).forEach(h=>{h()}),S}function w(S){if(typeof S!="function")throw new Error(re(10));r=S,g({type:ri.REPLACE})}function d(){const S=c;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(re(11));function h(){const C=y;C.next&&C.next(f())}return h(),{unsubscribe:S(h)}},[_c](){return this}}}return g({type:ri.INIT}),{dispatch:g,subscribe:c,getState:f,replaceReducer:w,[_c]:d}}function Nv(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:ri.INIT})>"u")throw new Error(re(12));if(typeof n(void 0,{type:ri.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(re(13))})}function Fp(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw s&&s.type,new Error(re(14));a[c]=d,u=u||d!==w}return u=u||r.length!==Object.keys(l).length,u?a:l}}function oi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Tv(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(re(15))};const l={getState:o.getState,dispatch:(u,...a)=>i(u,...a)},s=e.map(u=>u(l));return i=oi(...s)(o.dispatch),{...o,dispatch:i}}}function Rv(e){return Uu(e)&&"type"in e&&typeof e.type=="string"}class Ov{constructor(){this.base="https://project-manager-jqsq.onrender.com/user/task"}create(t){return M.post(`${this.base}/create`,t)}all(t){return M.get(`${this.base}/list?owner=${t}`)}one(t){return M.get(`${this.base}/details?id=${t}`)}update(t){return M.put(`${this.base}/update`,t)}delete(t){return M.delete(`${this.base}/delete?id=${t}`)}}const Ti=new Ov,Ip="CREATE_TASK",Lv="UPDATE_TASK",Mv="DELETE_TASK",Up="ALL_TASK",$p="LOAD_TASK",Dv=e=>async(t,n)=>{try{const r=n().auth.user.id;e.deadline==""&&(e.deadline=null);const o=await Ti.create({...e,owner:r});return t({type:Ip,payload:o.data}),await t(Ar()),Promise.resolve(o.data)}catch(r){return Promise.reject(r)}},Ar=()=>async(e,t)=>{try{e({type:$p});const n=t().auth.user.id,r=await Ti.all(n);return e({type:Up,payload:r.data}),Promise.resolve(r.data)}catch(n){return Promise.reject(n)}},Av=e=>async t=>{try{e.deadline==""&&(e.deadline=null);const n=await Ti.update(e);return t({type:Lv,payload:n.data}),Ar()}catch(n){return Promise.reject(n)}},zv=e=>async t=>{try{const n=await Ti.delete(e);return t({type:Mv,payload:n.data}),Ar()}catch(n){return Promise.reject(n)}},jc={tasks:[],loading:!1};function Bp(e=jc,t){switch(t.type){case Ip:return{...e,tasks:[...e.tasks,t.payload]};case Up:return{...e,tasks:t.payload,loading:!1};case $p:return{...e,loading:!0};case qr:return jc;default:return e}}const Fv={user:null,error:null,all:[]};function Hp(e=Fv,t){switch(t.type){case Rp:return{...e,all:t.payload};case Pp:return{...e,user:t.payload};case jp:return{...e,user:t.payload,error:null};case Np:return{...e,user:null};case Tp:return{...e,user:t.payload,error:null};case Xy:return{...e,user:null};case zn:return{...e,error:t.payload};default:return e}}class Iv{constructor(){this.base="https://project-manager-jqsq.onrender.com/notes"}get(t){return M.get(`${this.base}/?owner=${t}`)}update(t){return console.log(t),M.post(`${this.base}/update`,t)}}const Vp=new Iv,$u="UPDATE",Uv=()=>async(e,t)=>{try{const n=t().auth.user.id,r=await Vp.get(n);e({type:$u,payload:r.data})}catch(n){console.log(n)}},$v=e=>async(t,n)=>{try{const r=n().auth.user.id,o=await Vp.update({...e,owner:r});t({type:$u,payload:o.data})}catch(r){console.log(r)}},Pc={content:""};function Wp(e=Pc,t){switch(t.type){case $u:return t.payload;case qr:return Pc;default:return e}}class Bv{constructor(){this.base="https://project-manager-jqsq.onrender.com/project"}getProjects(t){return M.get(`${this.base}/get-owned?owner=${t}`)}getProject(t){return M.get(`${this.base}/get?id=${t}`)}createProject(t){return M.post(`${this.base}/create`,t)}deleteProject(t){return M.delete(`${this.base}/delete?id=${t}`)}updateProject(t){return M.put(`${this.base}/update`,t)}}const Ri=new Bv;class Hv{constructor(){this.base="https://project-manager-jqsq.onrender.com/project/task"}create(t){return M.post(`${this.base}/create`,t)}all(t){return M.get(`${this.base}/list?owner=${t}`)}one(t){return M.get(`${this.base}/details?id=${t}`)}update(t){return M.put(`${this.base}/update`,t)}delete(t){return M.delete(`${this.base}/delete?id=${t}`)}status(t,n){return M.put(`${this.base}/status?id=${t}&status=${n}`)}}const Oi=new Hv,Kp="ALL_PROJECT_TASK",Vv="LOAD_PROJECT_TASK",Wv=(e,t)=>async n=>{try{const r=Object.keys(t).reduce((i,l)=>(t[l]!==null&&(i[l]=t[l]),i),{});r.deadline==""&&(r.deadline=null);const o=await Oi.create({...r,owner:e});await n(Jr())}catch(r){console.log(r)}},Jr=()=>async(e,t)=>{try{e({type:Vv});const n=t().project.one.id,r=await Oi.all(n);return e({type:Kp,payload:r.data}),Promise.resolve(r.data)}catch(n){console.log(n)}},Kv=e=>async t=>{try{const n=await Oi.delete(e);await t(Jr())}catch(n){console.log(n)}},wl=(e,t)=>async n=>{try{const r=await Oi.status(e,t);await n(Jr())}catch(r){console.log(r)}},Qp="CREATE_PROJECT",Zp="FETCH_PROJECTS",Bu="FETCH_PROJECT",Hu="LOADING_PROJECT",Qv=e=>async(t,n)=>{try{const r=n().auth.user.id;t({type:Hu,payload:!0}),e.due==""&&(e.due=null);const o=await Ri.createProject({...e,owner:r});t({type:Qp,payload:o.data})}catch(r){console.log(r)}},Vu=()=>async(e,t)=>{try{const n=t().auth.user.id;e({type:Hu,payload:!0});const r=await Ri.getProjects(n);e({type:Zp,payload:r.data}),r.data&&(e({type:Bu,payload:r.data[0]}),e(Jr()))}catch(n){console.log(n)}},Zv=e=>async t=>{const n=await Ri.getProject(e);n.data.due==null&&(n.data.due=""),t({type:Bu,payload:n.data})},Jv=e=>async t=>{e.due==""&&(e.due=null),await Ri.updateProject(e),await t(Vu())},Nc={projects:[],loading:!1,one:null};function Jp(e=Nc,t){switch(t.type){case Hu:return{...e,loading:t.payload};case Qp:return{...e,projects:[...e.projects,t.payload]};case Zp:return{...e,projects:t.payload,loading:!1};case Bu:return{...e,one:t.payload};case qr:return Nc;default:return e}}const Tc={tasks:[]};function qp(e=Tc,t){switch(t.type){case Kp:return{...e,tasks:t.payload};case qr:return Tc;default:return e}}const qr="CLEAR";Fp({task:Bp,auth:Hp,note:Wp,project:Jp,projectTask:qp});const qv=()=>p.jsx("svg",{width:"24",height:"28",viewBox:"0 0 24 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M19.5 22V21H19.4741L19.4483 21.0013L19.5 22ZM5 7C4.44772 7 4 7.44772 4 8C4 8.55228 4.44772 9 5 9V7ZM19 9C19.5523 9 20 8.55228 20 8C20 7.44772 19.5523 7 19 7V9ZM5 12C4.44772 12 4 12.4477 4 13C4 13.5523 4.44772 14 5 14V12ZM19 14C19.5523 14 20 13.5523 20 13C20 12.4477 19.5523 12 19 12V14ZM5 17C4.44772 17 4 17.4477 4 18C4 18.5523 4.44772 19 5 19V17ZM19 19C19.5523 19 20 18.5523 20 18C20 17.4477 19.5523 17 19 17V19ZM17.5 27V28C17.7652 28 18.0196 27.8946 18.2071 27.7071L17.5 27ZM22.5 22L23.2071 22.7071C23.3946 22.5196 23.5 22.2652 23.5 22H22.5ZM3.5 2H20.5V0H3.5V2ZM2.5 25V3H0.5V25H2.5ZM3.5 26C2.94772 26 2.5 25.5523 2.5 25H0.5C0.5 26.6569 1.84315 28 3.5 28V26ZM19.4483 21.0013C17.8806 21.0825 16.3657 22.306 16.503 24.0773L18.497 23.9227C18.468 23.5481 18.8103 23.0371 19.5517 22.9987L19.4483 21.0013ZM20.5 2C21.0523 2 21.5 2.44772 21.5 3H23.5C23.5 1.34315 22.1569 0 20.5 0V2ZM3.5 0C1.84315 0 0.5 1.34315 0.5 3H2.5C2.5 2.44771 2.94772 2 3.5 2V0ZM5 9H19V7H5V9ZM5 14H19V12H5V14ZM5 19H19V17H5V19ZM16.5 24V27H18.5V24H16.5ZM17.5 26H3.5V28H17.5V26ZM21.5 3V22H23.5V3H21.5ZM22.5 21H19.5V23H22.5V21ZM21.7929 21.2929L16.7929 26.2929L18.2071 27.7071L23.2071 22.7071L21.7929 21.2929ZM17.8714 24.9285L22.8714 22.9285L22.1286 21.0715L17.1286 23.0715L17.8714 24.9285ZM18.5715 21.6286L16.5715 26.6286L18.4285 27.3714L20.4285 22.3714L18.5715 21.6286Z",fill:"black"})}),Gv=()=>p.jsx("svg",{width:"20",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M1.30608 0.598877L22.5193 21.8121M0.598999 21.8121L21.8122 0.5989",stroke:"#FF375F","stroke-width":"2"})}),Xv=()=>p.jsx("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M22.1765 17.4545C22.7288 17.4545 23.1765 17.0068 23.1765 16.4545C23.1765 15.9023 22.7288 15.4545 22.1765 15.4545V17.4545ZM0.292893 15.7474C-0.0976311 16.138 -0.0976311 16.7711 0.292893 17.1617L6.65685 23.5256C7.04738 23.9161 7.68054 23.9161 8.07107 23.5256C8.46159 23.1351 8.46159 22.5019 8.07107 22.1114L2.41421 16.4545L8.07107 10.7977C8.46159 10.4072 8.46159 9.774 8.07107 9.38348C7.68054 8.99295 7.04738 8.99295 6.65685 9.38348L0.292893 15.7474ZM9.70588 11.9091C9.70588 12.4614 10.1536 12.9091 10.7059 12.9091C11.2582 12.9091 11.7059 12.4614 11.7059 11.9091H9.70588ZM11.7059 21C11.7059 20.4477 11.2582 20 10.7059 20C10.1536 20 9.70588 20.4477 9.70588 21H11.7059ZM13.3529 2H28.3529V0H13.3529V2ZM30 3.72727V28.2727H32V3.72727H30ZM28.3529 30H13.3529V32H28.3529V30ZM13.3529 30C12.4712 30 11.7059 29.255 11.7059 28.2727H9.70588C9.70588 30.3029 11.3108 32 13.3529 32V30ZM30 28.2727C30 29.255 29.2347 30 28.3529 30V32C30.3951 32 32 30.3029 32 28.2727H30ZM28.3529 2C29.2347 2 30 2.74498 30 3.72727H32C32 1.69711 30.3951 0 28.3529 0V2ZM13.3529 0C11.3108 0 9.70588 1.69711 9.70588 3.72727H11.7059C11.7059 2.74498 12.4712 2 13.3529 2V0ZM22.1765 15.4545H10.7059V17.4545H22.1765V15.4545ZM10.7059 15.4545H1V17.4545H10.7059V15.4545ZM11.7059 11.9091V3.72727H9.70588V11.9091H11.7059ZM11.7059 28.2727V21H9.70588V28.2727H11.7059Z",fill:"#FF375F"})}),Sl=()=>p.jsx("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M14 4V1C14 0.734784 14.1054 0.48043 14.2929 0.292893C14.4804 0.105357 14.7348 0 15 0C15.2652 0 15.5196 0.105357 15.7071 0.292893C15.8946 0.48043 16 0.734784 16 1V4C16 4.26522 15.8946 4.51957 15.7071 4.70711C15.5196 4.89464 15.2652 5 15 5C14.7348 5 14.4804 4.89464 14.2929 4.70711C14.1054 4.51957 14 4.26522 14 4ZM15 7C13.4177 7 11.871 7.46919 10.5554 8.34824C9.23984 9.22729 8.21447 10.4767 7.60896 11.9385C7.00346 13.4003 6.84504 15.0089 7.15372 16.5607C7.4624 18.1126 8.22433 19.538 9.34315 20.6569C10.462 21.7757 11.8874 22.5376 13.4393 22.8463C14.9911 23.155 16.5997 22.9965 18.0615 22.391C19.5233 21.7855 20.7727 20.7602 21.6518 19.4446C22.5308 18.129 23 16.5823 23 15C22.9977 12.879 22.1541 10.8455 20.6543 9.3457C19.1545 7.84591 17.121 7.00232 15 7ZM6.2925 7.7075C6.48014 7.89514 6.73464 8.00056 7 8.00056C7.26536 8.00056 7.51986 7.89514 7.7075 7.7075C7.89514 7.51986 8.00056 7.26536 8.00056 7C8.00056 6.73464 7.89514 6.48014 7.7075 6.2925L5.7075 4.2925C5.51986 4.10486 5.26536 3.99944 5 3.99944C4.73464 3.99944 4.48014 4.10486 4.2925 4.2925C4.10486 4.48014 3.99944 4.73464 3.99944 5C3.99944 5.26536 4.10486 5.51986 4.2925 5.7075L6.2925 7.7075ZM6.2925 22.2925L4.2925 24.2925C4.10486 24.4801 3.99944 24.7346 3.99944 25C3.99944 25.2654 4.10486 25.5199 4.2925 25.7075C4.48014 25.8951 4.73464 26.0006 5 26.0006C5.26536 26.0006 5.51986 25.8951 5.7075 25.7075L7.7075 23.7075C7.80041 23.6146 7.87411 23.5043 7.92439 23.3829C7.97468 23.2615 8.00056 23.1314 8.00056 23C8.00056 22.8686 7.97468 22.7385 7.92439 22.6171C7.87411 22.4957 7.80041 22.3854 7.7075 22.2925C7.61459 22.1996 7.50429 22.1259 7.3829 22.0756C7.2615 22.0253 7.13139 21.9994 7 21.9994C6.86861 21.9994 6.7385 22.0253 6.6171 22.0756C6.49571 22.1259 6.38541 22.1996 6.2925 22.2925ZM23 8C23.1314 8.0001 23.2615 7.97432 23.3829 7.92414C23.5042 7.87395 23.6146 7.80033 23.7075 7.7075L25.7075 5.7075C25.8951 5.51986 26.0006 5.26536 26.0006 5C26.0006 4.73464 25.8951 4.48014 25.7075 4.2925C25.5199 4.10486 25.2654 3.99944 25 3.99944C24.7346 3.99944 24.4801 4.10486 24.2925 4.2925L22.2925 6.2925C22.1525 6.43236 22.0571 6.61061 22.0185 6.80469C21.9798 6.99878 21.9996 7.19997 22.0754 7.38279C22.1511 7.56561 22.2794 7.72185 22.444 7.83172C22.6086 7.94159 22.8021 8.00016 23 8ZM23.7075 22.2925C23.5199 22.1049 23.2654 21.9994 23 21.9994C22.7346 21.9994 22.4801 22.1049 22.2925 22.2925C22.1049 22.4801 21.9994 22.7346 21.9994 23C21.9994 23.2654 22.1049 23.5199 22.2925 23.7075L24.2925 25.7075C24.3854 25.8004 24.4957 25.8741 24.6171 25.9244C24.7385 25.9747 24.8686 26.0006 25 26.0006C25.1314 26.0006 25.2615 25.9747 25.3829 25.9244C25.5043 25.8741 25.6146 25.8004 25.7075 25.7075C25.8004 25.6146 25.8741 25.5043 25.9244 25.3829C25.9747 25.2615 26.0006 25.1314 26.0006 25C26.0006 24.8686 25.9747 24.7385 25.9244 24.6171C25.8741 24.4957 25.8004 24.3854 25.7075 24.2925L23.7075 22.2925ZM5 15C5 14.7348 4.89464 14.4804 4.70711 14.2929C4.51957 14.1054 4.26522 14 4 14H1C0.734784 14 0.48043 14.1054 0.292893 14.2929C0.105357 14.4804 0 14.7348 0 15C0 15.2652 0.105357 15.5196 0.292893 15.7071C0.48043 15.8946 0.734784 16 1 16H4C4.26522 16 4.51957 15.8946 4.70711 15.7071C4.89464 15.5196 5 15.2652 5 15ZM15 25C14.7348 25 14.4804 25.1054 14.2929 25.2929C14.1054 25.4804 14 25.7348 14 26V29C14 29.2652 14.1054 29.5196 14.2929 29.7071C14.4804 29.8946 14.7348 30 15 30C15.2652 30 15.5196 29.8946 15.7071 29.7071C15.8946 29.5196 16 29.2652 16 29V26C16 25.7348 15.8946 25.4804 15.7071 25.2929C15.5196 25.1054 15.2652 25 15 25ZM29 14H26C25.7348 14 25.4804 14.1054 25.2929 14.2929C25.1054 14.4804 25 14.7348 25 15C25 15.2652 25.1054 15.5196 25.2929 15.7071C25.4804 15.8946 25.7348 16 26 16H29C29.2652 16 29.5196 15.8946 29.7071 15.7071C29.8946 15.5196 30 15.2652 30 15C30 14.7348 29.8946 14.4804 29.7071 14.2929C29.5196 14.1054 29.2652 14 29 14Z",fill:"#A040CE"})}),xl=()=>p.jsx("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M12.5 25C19.4037 25 25 19.4037 25 12.5C25 11.9213 24.1325 11.825 23.8337 12.3213C23.1966 13.3767 22.3275 14.2733 21.2925 14.9431C20.2575 15.6129 19.0836 16.0384 17.8598 16.1874C16.636 16.3363 15.3943 16.2048 14.2288 15.8028C13.0633 15.4009 12.0046 14.7389 11.1329 13.8671C10.2611 12.9954 9.59915 11.9367 9.19715 10.7712C8.79516 9.60571 8.66366 8.36404 8.81262 7.14021C8.96158 5.91638 9.38709 4.7425 10.0569 3.70748C10.7267 2.67246 11.6233 1.80344 12.6787 1.16625C13.175 0.86625 13.0787 0 12.5 0C5.59625 0 0 5.59625 0 12.5C0 19.4037 5.59625 25 12.5 25Z",fill:"#A040CE"})});function Yv({setOpen:e,open:t,user:n}){const r=["home","projects","tasks"],o=ct(),i=Ut(),l=ft(),s=a=>{i(a.target.id),e()},u=()=>{l({type:qr}),l(ev())};return p.jsxs("div",{className:"sidebar",style:{left:t?0:""},children:[p.jsx("div",{className:"sidebar__options",children:r.map((a,f)=>p.jsx("div",{onClick:s,id:a,className:o.pathname.includes(a)?"sidebar__option active":"sidebar__option",children:a},f))}),n&&p.jsx("div",{onClick:u,color:"red",children:p.jsx(Xv,{})})]})}function bv({user:e,dark:t,isDark:n}){const r=ct(),[o,i]=E.useState(!1),l=Ae(s=>s.auth.error);return E.useEffect(()=>{},[n]),r.pathname=="/sign-in"||r.pathname=="/sign-up"?p.jsx("div",{className:"navbar",style:{position:"fixed",border:"none"},onClick:()=>t(),children:n?p.jsx(xl,{onClick:()=>t()}):p.jsx(Sl,{onClick:()=>t()})}):p.jsxs("div",{className:o?"top":"top over",children:[p.jsxs("nav",{className:"navbar",children:[p.jsxs("div",{className:"projectTitle",children:[p.jsx("div",{className:"sidebar__logo",onClick:()=>i(!o),children:"☰"}),p.jsx(Iu,{}),p.jsxs(hr,{to:"",children:["TaskMaster",l]})]}),e!=null?p.jsxs("div",{className:"user",children:[p.jsx("div",{onClick:()=>t(),children:n?p.jsx(xl,{onClick:t}):p.jsx(Sl,{onClick:()=>t()})}),p.jsx("div",{children:p.jsx("p",{id:"user-name",children:e.name})})]}):p.jsxs("div",{className:"sign",children:[p.jsx("div",{onClick:()=>t(),children:n?p.jsx(xl,{onClick:()=>t()}):p.jsx(Sl,{onClick:()=>t()})}),p.jsx("button",{className:"tertiary-button signIn",children:p.jsx(hr,{to:"/sign-in",children:"Sign In"})}),p.jsx("button",{className:"secondary-button signUp",children:p.jsx(hr,{to:"/sign-up",children:"Sign Up"})})]})]}),p.jsx(Yv,{setOpen:()=>i(!o),open:o,user:e!=null})]})}function e2(){return p.jsx("div",{className:"homePage",children:p.jsx("h1",{children:"Welcome to TaskMaster"})})}function t2({note:e,save:t,loggedIn:n}){const r=ct(),[o,i]=E.useState(e.content),[l,s]=E.useState(!1);return E.useEffect(()=>{i(e.content);const u=a=>{a.key==="Escape"?(s(!1),t(o)):a.shiftKey&&a.key==="n"&&s(!0)};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[e]),r.pathname=="/sign-in"||r.pathname=="/sign-up"?p.jsx(p.Fragment,{}):l?p.jsxs("div",{className:"notes",children:[p.jsx("div",{className:"notes-options",onClick:()=>{s(!1),t(o)},children:p.jsx(Gv,{})}),p.jsx("textarea",{disabled:!n,value:o,onChange:u=>i(u.target.value)})]}):p.jsx("div",{className:"notes",style:{height:"35px",border:"1px solid rgb(var(--second))"},onClick:()=>s(!0),children:p.jsx(qv,{})})}function n2({loggedIn:e}){const t=ft(),n=Ae(f=>f.task.tasks),[r,o]=E.useState(!1),[i,l]=E.useState(!1),[s,u]=E.useState({task:"",description:"",completion:0,deadline:""}),a=f=>{f.preventDefault(),console.log(s),r?(t(Av(s)).then(()=>{t(Ar())}),o(!1)):t(Dv(s)),l(!1)};return E.useEffect(()=>{e&&t(Ar())},[e]),p.jsxs("div",{className:"task-page",children:[p.jsxs("div",{className:"tasks-title",children:[p.jsx("h1",{children:"Tasks"}),p.jsx("div",{className:"task-add",children:p.jsx("button",{className:"secondary-button",onClick:()=>l(!i),children:"New"})})]}),i&&p.jsx("div",{className:"create-task",children:p.jsxs("form",{onSubmit:a,children:[p.jsx("input",{type:"text",value:s.task,onChange:f=>u({...s,task:f.target.value}),placeholder:"Task Name",required:!0}),p.jsx("textarea",{type:"text",value:s.description,onChange:f=>u({...s,description:f.target.value}),placeholder:"Task Description"}),p.jsxs("div",{className:"task-completion",children:[p.jsxs("output",{for:"completion",onforminput:"value = completion.valueAsNumber;",children:["Completion: ",s.completion,"%"]}),p.jsx("input",{type:"range",min:0,max:100,value:s.completion,onChange:f=>u({...s,completion:f.target.value}),name:"completion"})]}),p.jsx("input",{type:"date",min:new Date().toISOString().split("T")[0],value:s.deadline,onChange:f=>u({...s,deadline:f.target.value})}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>{o(!1),l(!1),u({task:"",description:"",completion:0,deadline:""})},children:"cancel"}),p.jsx("button",{type:"submit",children:r?"Update":"Create"})]})]})}),p.jsx("div",{className:"task-table-container",children:p.jsxs("table",{className:"task-table",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Task"}),p.jsx("th",{children:"description"}),p.jsx("th",{children:"progress"}),p.jsx("th",{children:"deadline"}),p.jsx("th",{children:"Actions"})]})}),p.jsx("tbody",{children:n.map(f=>p.jsxs("tr",{style:{backgroundColor:`rgba(var(--low), ${f.completion/100})`},children:[p.jsx("td",{children:f.task}),p.jsx("td",{children:f.description}),p.jsxs("td",{children:[f.completion,"%"]}),p.jsx("td",{children:f.deadline&&f.deadline}),p.jsxs("td",{children:[p.jsx("button",{onClick:()=>{u({...f,deadline:f.deadline!=null?f.deadline:""}),l(!0),o(!0)},children:"update"}),p.jsx("button",{onClick:()=>t(zv(index)),children:"delete"})]})]},f.id))})]})})]})}function r2({tasks:e=[],newTask:t,users:n=[]}){const[r,o]=E.useState([]),[i,l]=E.useState([]),[s,u]=E.useState([]),a=ft(),f=()=>{try{r.map(d=>{e.find(m=>m.id==d.id).status!="To Do"&&a(wl(d.id,"To Do"))}),i.map(d=>{e.find(m=>m.id==d.id).status!="In Progress"&&a(wl(d.id,"In Progress"))}),s.map(d=>{e.find(m=>m.id==d.id).status!="Completed"&&a(wl(d.id,"Completed"))})}catch(d){console.log(d)}},c=(d,m)=>{d.dataTransfer.setData("from",m.from),d.dataTransfer.setData("id",m.id)},g=(d,m)=>{if(m=="delete"){a(Kv(d.dataTransfer.getData("id")));return}const S=d.dataTransfer.getData("from"),y=d.dataTransfer.getData("id");if(S==m)return;let h=null;S=="todo"?(h=r.find(v=>v.id==y),o(r.filter(v=>v.id!=y))):S=="in progress"?(h=i.find(v=>v.id==y),l(i.filter(v=>v.id!=y))):S=="completed"&&(h=s.find(v=>v.id==y),u(s.filter(v=>v.id!=y))),m=="todo"?o([...r,h]):m=="in progress"?l([...i,h]):m=="completed"&&u([...s,h])},w=d=>{d.preventDefault()};return E.useEffect(()=>(e.map(d=>{d.status==="To Do"?o(m=>[...m,d]):d.status==="In Progress"?l(m=>[...m,d]):d.status==="Completed"&&u(m=>[...m,d])}),()=>{o([]),l([]),u([])}),[e]),p.jsx(p.Fragment,{children:p.jsxs("div",{className:"project-item-grid",children:[p.jsx("div",{className:"project-task-title",children:"todo"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"todo"),children:r.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"todo",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-title",children:"inprogress"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"in progress"),children:i.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"in progress",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-title",children:"completed"}),p.jsx("div",{className:"project-task-list",onDragOver:w,onDrop:d=>g(d,"completed"),children:s.map((d,m)=>p.jsxs("div",{className:"project-task-item",draggable:!0,onDragStart:S=>c(S,{from:"completed",id:d.id}),style:{borderBottom:`solid 4px rgb(var(--${d.difficulty.toLowerCase()}))`,backgroundImage:d.priority=="default"?"":`linear-gradient(rgba(var(--${d.priority.toLowerCase()}), 0.6), rgba(var(--${d.priority.toLowerCase()}), 0.3))`},children:[p.jsxs("div",{className:"task-title",children:[p.jsx("div",{className:"title",children:d.title}),p.jsx("div",{className:"deadline",children:d.deadline})]}),p.jsxs("div",{className:"task-bottom",children:[p.jsx("div",{className:"description",children:d.description}),p.jsx("div",{className:"assign",children:n&&d.assigned_to&&n[n.findIndex(S=>S.id===d.assigned_to)].name})]})]},m))}),p.jsx("div",{className:"project-task-delete",onDragOver:w,onDrop:d=>g(d,"delete"),children:"delete"}),p.jsxs("div",{className:"project-task-options",children:[p.jsx("button",{onClick:t,children:"add Task"}),p.jsx("button",{onClick:()=>f(),children:"save changes"})]})]})})}function o2({close:e}){const t=ft(),n=Ut(),r=Ae(m=>m.auth.all),o=Ae(m=>m.project.one),i=Ae(m=>m.projectTask.tasks),[l,s]=E.useState(!1),[u,a]=E.useState(!1),[f,c]=E.useState({title:"",description:"",deadline:"",priority:null,difficulty:null,assigned_to:null}),g=()=>{n("/projects/modify",{state:{edit:!0}})},w=m=>{m.preventDefault(),console.log("created"),t(Wv(o.id,f)),c({title:"",description:"",completion:0,deadline:"",priority:null,difficulty:null,assigned_to:null}),s(!1)},d=()=>{u&&c({priority:null,difficulty:null,assigned_to:null}),a(!u)};return E.useEffect(()=>{t(Jr(o.id)),t(Au());const m=S=>{console.log(S.key),S.key==="Escape"&&e()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[]),r==null||o==null||i==null?p.jsx("h1",{children:"Loading"}):p.jsxs(p.Fragment,{children:[o&&p.jsxs("div",{className:"projectListTitle",children:[p.jsx("h1",{children:o.title}),p.jsx("div",{className:"projectListTitle--add",children:p.jsx("button",{className:"secondary-button",onClick:g,children:"edit"})})]}),l&&p.jsx("div",{className:"create-project-task",children:p.jsxs("form",{onSubmit:w,children:[p.jsx("input",{type:"text",value:f.title,onChange:m=>c({...f,title:m.target.value}),placeholder:"Task Title",required:!0}),p.jsx("textarea",{type:"text",value:f.description,onChange:m=>c({...f,description:m.target.value}),placeholder:"Task Description",required:!0}),p.jsx("input",{type:"date",min:new Date().toISOString().split("T")[0],value:f.deadline,onChange:m=>c({...f,deadline:m.target.value})}),p.jsxs("div",{className:"additional",onClick:d,children:[p.jsx("div",{children:"additional details"}),p.jsx("div",{children:u?"-":"+"})]}),u&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"element",children:[p.jsx("label",{for:"priority",children:"Priority"}),p.jsxs("select",{id:"priority",defaultValue:"default",onChange:m=>c({...f,priority:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"default"}),p.jsx("option",{value:"High",children:"High"}),p.jsx("option",{value:"Medium",children:"Medium"}),p.jsx("option",{value:"Low",children:"Low"})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("label",{htmlFor:"difficulty",children:"difficulty"}),p.jsxs("select",{id:"difficulty",defaultValue:"default",onChange:m=>c({...f,difficulty:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"default"}),p.jsx("option",{value:"High",children:"High"}),p.jsx("option",{value:"Medium",children:"Medium"}),p.jsx("option",{value:"Low",children:"Low"})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("label",{htmlFor:"assign",children:"Assign to"}),p.jsxs("select",{id:"assign",defaultValue:"Select",onChange:m=>c({...f,assigned_to:m.target.value.toLowerCase()}),children:[p.jsx("option",{disabled:!0,children:"Select"}),r.map((m,S)=>m.name!="myself"?p.jsxs("option",{value:m.id,children:[m.name," -"," ",m.email]},S):p.jsx("option",{value:m.id,children:m.name},S))]})]})]}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>s(!1),children:"cancel"}),p.jsx("button",{type:"submit",children:"Create"})]})]})}),p.jsx(r2,{tasks:i,newTask:()=>s(!0),users:r})]})}function i2({loggedIn:e}){const t=ft(),n=Ae(s=>s.project),r=Ut(),[o,i]=E.useState(!1);E.useEffect(()=>{e&&t(Vu())},[e]);const l=s=>t(Zv(s)).then(()=>{i(!0)});return o?p.jsx(o2,{close:()=>i(!1)}):p.jsxs("div",{children:[p.jsxs("div",{className:"projectListTitle",children:[p.jsx("h1",{children:"Projects"}),p.jsx("div",{className:"projectListTitle--add",children:p.jsx("button",{className:"secondary-button",onClick:()=>r("/projects/modify"),children:"new"})})]}),n.loading?p.jsx("p",{children:"loading"}):p.jsx("div",{className:"projectList",children:n.projects.map((s,u)=>p.jsxs("div",{className:"project",onClick:()=>{l(s.id)},children:[p.jsxs("div",{className:"project-title",children:[p.jsx("div",{className:"title",children:s.title}),p.jsx("div",{className:"deadline",children:s.deadline&&s.deadline})]}),p.jsxs("div",{className:"project-description",children:["Description: ",p.jsx("br",{}),s.description||"empty"]})]},u))})]})}function l2(){const e=Ae(d=>d.auth.all),t=ft(),n=new Date().toISOString().split("T")[0],[r,o]=E.useState(null),[i,l]=E.useState([]),s=Ut(),u=ct(),a=Ae(d=>d.project.one),{edit:f}=u.state||!1,[c,g]=E.useState({title:"",description:"",due:"",group:!1,members:[]}),w=d=>{d.preventDefault(),f?(d.preventDefault(),t(Jv(c)).then(()=>{s("/projects")})):t(Qv(c)).then(()=>{t(Vu())}).then(()=>{s("/projects")})};return E.useEffect(()=>{if(t(Au()),f){g(a);const d=e.map(m=>{if(c.members.includes(m.id))return m.name}).filter(Boolean);l(d)}},[]),p.jsx("div",{className:"project-modify",children:p.jsxs("form",{onSubmit:w,children:[p.jsx("h2",{children:"Project"}),p.jsx("input",{type:"text",value:c.title,onChange:d=>g({...c,title:d.target.value}),required:!0,placeholder:"Project Title"}),p.jsx("textarea",{value:c.description,onChange:d=>g({...c,description:d.target.value}),required:!0,placeholder:"Project Description"}),p.jsx("input",{type:"date",value:c.due,min:n,onChange:d=>g({...c,due:d.target.value})}),p.jsxs("div",{children:["is this a group project?",p.jsx("input",{type:"checkbox",checked:c.group,onClick:d=>{g({...c,group:!c.group}),c.group||(l([]),o(null))}})]}),c.group?p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsxs("select",{defaultValue:"Select",onChange:d=>o(d.target.value),children:[p.jsx("option",{disabled:!0,children:"Select"}),e.map((d,m)=>{if(d.name!="myself")return p.jsxs("option",{value:m,children:[d.name," - ",d.email]},m)})]}),p.jsx("button",{type:"button",onClick:()=>{const d=e[r];r&&(!c.members.includes(d.id)||!i.includes(d.name))&&(g({...c,members:[...c.members,d.id]}),l([...i,d.name]))},children:"add member"})]}),p.jsxs("ul",{children:["members:",i.length==0?" None":"",i.map((d,m)=>p.jsx("li",{onClick:()=>{const S=i.filter((h,v)=>v!==m);l(S);const y=c.members.filter((h,v)=>v!=m);g({...c,members:y})},children:d},m))]})]}):p.jsx(p.Fragment,{}),p.jsxs("div",{className:"element",children:[p.jsx("button",{onClick:()=>s("/projects"),children:"Cancel"}),p.jsx("button",{type:"submit",children:f?"Update":"Create"})]})]})})}function s2(){const e=Ae(l=>l.auth.user),t=Ae(l=>l.note),n=ft(),[r,o]=E.useState(document.body.classList.contains("dark")),i=()=>{document.body.classList.contains("dark")?(document.body.classList.remove("dark"),o(!1)):(document.body.classList.add("dark"),o(!0))};return E.useEffect(()=>{let l=!0;return window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches&&l&&(o(!0),document.body.classList.add("dark")),document.cookie.match("(^|;)\\s*user\\s*=\\s*([^;]+)")&&(n(zu()).then(()=>{n(Uv())}),n(Au())),()=>l=!1},[]),p.jsxs(L0,{children:[p.jsx(bv,{user:e,dark:i,isDark:r}),p.jsx(t2,{note:e==null?{content:""}:t,loggedIn:e!=null,save:l=>{t.content!=l&&n($v({...t,content:l}))}}),p.jsxs(_0,{children:[p.jsx(ht,{index:!0,path:"/home",element:p.jsx(e2,{})}),p.jsx(ht,{path:"/sign-in",element:p.jsx(kv,{loggedIn:e!=null})}),p.jsx(ht,{path:"/sign-up",element:p.jsx(_v,{loggedIn:e!=null})}),p.jsx(ht,{path:"/tasks",element:p.jsx(n2,{loggedIn:e!=null})}),p.jsx(ht,{path:"/projects",element:p.jsx(i2,{loggedIn:e!=null})}),p.jsx(ht,{path:"/projects/modify",element:p.jsx(l2,{})}),p.jsx(ht,{path:"*",element:p.jsx(E0,{to:"/home",replace:!0})})]})]})}var Gp=Symbol.for("immer-nothing"),Rc=Symbol.for("immer-draftable"),_e=Symbol.for("immer-state");function Ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fn=Object.getPrototypeOf;function nn(e){return!!e&&!!e[_e]}function rn(e){var t;return e?Xp(e)||Array.isArray(e)||!!e[Rc]||!!((t=e.constructor)!=null&&t[Rc])||Mi(e)||Di(e):!1}var u2=Object.prototype.constructor.toString();function Xp(e){if(!e||typeof e!="object")return!1;const t=Fn(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===u2}function ii(e,t){Li(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Li(e){const t=e[_e];return t?t.type_:Array.isArray(e)?1:Mi(e)?2:Di(e)?3:0}function js(e,t){return Li(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yp(e,t,n){const r=Li(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function a2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Mi(e){return e instanceof Map}function Di(e){return e instanceof Set}function Wt(e){return e.copy_||e.base_}function Ps(e,t){if(Mi(e))return new Map(e);if(Di(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Xp(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[_e];let o=Reflect.ownKeys(r);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=c2),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Wu(r,!0))),e}function c2(){Ve(2)}function Ai(e){return Object.isFrozen(e)}var f2={};function on(e){const t=f2[e];return t||Ve(0,e),t}var zr;function bp(){return zr}function d2(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Oc(e,t){t&&(on("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ns(e){Ts(e),e.drafts_.forEach(p2),e.drafts_=null}function Ts(e){e===zr&&(zr=e.parent_)}function Lc(e){return zr=d2(zr,e)}function p2(e){const t=e[_e];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[_e].modified_&&(Ns(t),Ve(4)),rn(e)&&(e=li(t,e),t.parent_||si(t,e)),t.patches_&&on("Patches").generateReplacementPatches_(n[_e].base_,e,t.patches_,t.inversePatches_)):e=li(t,n,[]),Ns(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gp?e:void 0}function li(e,t,n){if(Ai(t))return t;const r=t[_e];if(!r)return ii(t,(o,i)=>Dc(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return si(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,l=!1;r.type_===3&&(i=new Set(o),o.clear(),l=!0),ii(i,(s,u)=>Dc(e,r,o,s,u,n,l)),si(e,o,!1),n&&e.patches_&&on("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Dc(e,t,n,r,o,i,l){if(nn(o)){const s=i&&t&&t.type_!==3&&!js(t.assigned_,r)?i.concat(r):void 0,u=li(e,o,s);if(Yp(n,r,u),nn(u))e.canAutoFreeze_=!1;else return}else l&&n.add(o);if(rn(o)&&!Ai(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;li(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&si(e,o)}}function si(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wu(t,n)}function h2(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Ku;n&&(o=[r],i=Fr);const{revoke:l,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=l,s}var Ku={get(e,t){if(t===_e)return e;const n=Wt(e);if(!js(n,t))return m2(e,n,t);const r=n[t];return e.finalized_||!rn(r)?r:r===Cl(e.base_,t)?(El(e),e.copy_[t]=Os(r,e)):r},has(e,t){return t in Wt(e)},ownKeys(e){return Reflect.ownKeys(Wt(e))},set(e,t,n){const r=eh(Wt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Cl(Wt(e),t),i=o==null?void 0:o[_e];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(a2(n,o)&&(n!==void 0||js(e.base_,t)))return!0;El(e),Rs(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Cl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,El(e),Rs(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ve(11)},getPrototypeOf(e){return Fn(e.base_)},setPrototypeOf(){Ve(12)}},Fr={};ii(Ku,(e,t)=>{Fr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fr.deleteProperty=function(e,t){return Fr.set.call(this,e,t,void 0)};Fr.set=function(e,t,n){return Ku.set.call(this,e[0],t,n,e[0])};function Cl(e,t){const n=e[_e];return(n?Wt(n):e)[t]}function m2(e,t,n){var o;const r=eh(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function eh(e,t){if(!(t in e))return;let n=Fn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Fn(n)}}function Rs(e){e.modified_||(e.modified_=!0,e.parent_&&Rs(e.parent_))}function El(e){e.copy_||(e.copy_=Ps(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var y2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const l=this;return function(u=i,...a){return l.produce(u,f=>n.call(this,f,...a))}}typeof n!="function"&&Ve(6),r!==void 0&&typeof r!="function"&&Ve(7);let o;if(rn(t)){const i=Lc(this),l=Os(t,void 0);let s=!0;try{o=n(l),s=!1}finally{s?Ns(i):Ts(i)}return Oc(i,r),Mc(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Gp&&(o=void 0),this.autoFreeze_&&Wu(o,!0),r){const i=[],l=[];on("Patches").generateReplacementPatches_(t,o,i,l),r(i,l)}return o}else Ve(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...s)=>this.produceWithPatches(l,u=>t(u,...s));let r,o;return[this.produce(t,n,(l,s)=>{r=l,o=s}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){rn(e)||Ve(8),nn(e)&&(e=th(e));const t=Lc(this),n=Os(e,void 0);return n[_e].isManual_=!0,Ts(t),n}finishDraft(e,t){const n=e&&e[_e];(!n||!n.isManual_)&&Ve(9);const{scope_:r}=n;return Oc(r,t),Mc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=on("Patches").applyPatches_;return nn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Os(e,t){const n=Mi(e)?on("MapSet").proxyMap_(e,t):Di(e)?on("MapSet").proxySet_(e,t):h2(e,t);return(t?t.scope_:bp()).drafts_.push(n),n}function th(e){return nn(e)||Ve(10,e),nh(e)}function nh(e){if(!rn(e)||Ai(e))return e;const t=e[_e];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ps(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ps(e,!0);return ii(n,(r,o)=>{Yp(n,r,nh(o))}),t&&(t.finalized_=!1),n}var je=new y2;je.produce;je.produceWithPatches.bind(je);je.setAutoFreeze.bind(je);je.setUseStrictShallowCopy.bind(je);je.applyPatches.bind(je);je.createDraft.bind(je);je.finishDraft.bind(je);function v2(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function g2(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function w2(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ac=e=>Array.isArray(e)?e:[e];function S2(e){const t=Array.isArray(e[0])?e[0]:e;return w2(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function x2(e,t){const n=[],{length:r}=e;for(let o=0;o{n=yo(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function rh(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,l=0,s,u={},a=o.pop();typeof a=="object"&&(u=a,a=o.pop()),v2(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const f={...n,...u},{memoize:c,memoizeOptions:g=[],argsMemoize:w=Qu,argsMemoizeOptions:d=[],devModeChecks:m={}}=f,S=Ac(g),y=Ac(d),h=S2(o),v=c(function(){return i++,a.apply(null,arguments)},...S),C=w(function(){l++;const N=x2(h,arguments);return s=v.apply(null,N),s},...y);return Object.assign(C,{resultFunc:a,memoizedResultFunc:v,dependencies:h,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:c,argsMemoize:w})};return Object.assign(r,{withTypes:()=>r}),r}var _2=rh(Qu),j2=Object.assign((e,t=_2)=>{g2(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((l,s,u)=>(l[n[u]]=s,l),{}))},{withTypes:()=>j2});function oh(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var ih=oh(),P2=oh,N2=(...e)=>{const t=rh(...e),n=Object.assign((...r)=>{const o=t(...r),i=(l,...s)=>o(nn(l)?th(l):l,...s);return Object.assign(i,o),i},{withTypes:()=>n});return n};N2(Qu);var T2=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?oi:oi.apply(null,arguments)};function zi(e,t){function n(...r){return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Rv(r)&&r.type===e,n}var lh=class or extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,or.prototype)}static get[Symbol.species](){return or}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new or(...t[0].concat(this)):new or(...t.concat(this))}};function R2(e){return typeof e=="boolean"}var O2=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{};let l=new lh;return n&&(R2(n)?l.push(ih):l.push(P2(n.extraArgument))),l},L2="RTK_autoBatch",sh=e=>t=>{setTimeout(t,e)},M2=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sh(10),D2=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,l=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?M2:e.type==="callback"?e.queueNotification:sh(e.timeout),a=()=>{l=!1,i&&(i=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const c=()=>o&&f(),g=r.subscribe(c);return s.add(f),()=>{g(),s.delete(f)}},dispatch(f){var c;try{return o=!((c=f==null?void 0:f.meta)!=null&&c[L2]),i=!o,i&&(l||(l=!0,u(a))),r.dispatch(f)}finally{o=!0}}})},A2=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new lh(e);return r&&o.push(D2(typeof r=="object"?r:void 0)),o},z2=!0;function F2(e){const t=O2(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:l=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(Uu(n))s=Fp(n);else throw new Error(Fi(1));let u;typeof r=="function"?u=r(t):u=t();let a=oi;o&&(a=T2({trace:!z2,...typeof o=="object"&&o}));const f=Tv(...u),c=A2(f);let g=typeof l=="function"?l(c):c();const w=a(...g);return zp(s,i,w)}var I2="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",U2=(e=21)=>{let t="",n=e;for(;n--;)t+=I2[Math.random()*64|0];return t},$2=(e,t)=>{if(typeof e!="function")throw new Error(Fi(32))},Zu="listenerMiddleware",B2=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=zi(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Fi(21));return $2(i),{predicate:o,type:t,effect:i}},H2=Object.assign(e=>{const{type:t,predicate:n,effect:r}=B2(e);return{id:U2(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Fi(22))}}},{withTypes:()=>H2}),V2=Object.assign(zi(`${Zu}/add`),{withTypes:()=>V2});zi(`${Zu}/removeAll`);var W2=Object.assign(zi(`${Zu}/remove`),{withTypes:()=>W2});function Fi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const K2=F2({reducer:{task:Bp,auth:Hp,note:Wp,project:Jp,projectTask:qp},middleware:e=>e().concat(ih)});_l.createRoot(document.getElementById("root")).render(p.jsx(xv,{store:K2,children:p.jsx(s2,{})})); diff --git a/assets/index-FjOQDOVe.css b/assets/index-FjOQDOVe.css new file mode 100644 index 0000000..bbd8cbe --- /dev/null +++ b/assets/index-FjOQDOVe.css @@ -0,0 +1 @@ +.logo{display:flex;justify-content:center;align-content:center;margin:2px;flex-shrink:0}.homePage{flex:1;display:flex;justify-content:center;align-content:center}.signInPage{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;flex:1}.signInPage form{display:flex;flex-direction:column;align-items:center;gap:12px}.signInPage button{width:300px;height:30px}.signInPage .error{color:red;font-size:12px}.signInPage a{text-decoration:none}.signInPage a:hover{text-decoration:underline}.signInPage p{align-self:self-end;margin:0}.signInPage .pass{display:flex;background-color:rgba(var(--prime),.2);border:1px solid rgb(var(--second));align-content:center;width:300px;height:30px;border-radius:5px;padding:0 10px}.signInPage .pass input:not([type=checkbox]){background-color:transparent;border:none;width:270px;padding:0}.signInPage .pass span:hover{text-align:center;cursor:pointer}.signUpPage{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;flex:1}.signUpPage form{display:flex;flex-direction:column;align-items:center;gap:12px}.signUpPage button{width:300px;height:30px}.signUpPage .error{color:red;font-size:12px;margin:0}.signUpPage a{text-decoration:none}.signUpPage a:hover{text-decoration:underline}.private{display:flex}.private p{margin:0}.signUpPage .pass{display:flex;background-color:rgba(var(--prime),.2);border:1px solid rgb(var(--second));align-content:center;width:300px;height:30px;border-radius:5px;padding:0 10px}.signUpPage .pass input:not([type=checkbox]){background-color:transparent;border:none;width:270px;padding:0}.signUpPage .pass span:hover{text-align:center;cursor:pointer}.sidebar{position:fixed;left:-250px;width:250px;height:calc(100% - 100px);background-color:rgba(var(--first),.9);transition:left .6s ease;text-align:center;text-transform:capitalize;display:flex;flex-direction:column;justify-content:space-between}.sidebar__logo{width:50px;height:50px;display:flex;justify-content:center;align-items:center}.sidebar__options{flex-direction:column;justify-content:start;align-items:center;padding:16px 8px}.sidebar__option{padding:8px 16px;border-radius:8px;cursor:pointer}.active{background-color:rgb(var(--prime));color:rgb(var(--second))}.navbar{padding:10px;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--second));border-bottom:solid 1px rgba(var(--second),.5)}.navbar .projectTitle{display:flex;align-items:center}.navbar .projectTitle .sidebar__logo{cursor:pointer}.navbar .projectTitle .logo{width:50px;height:50px}.navbar .projectTitle a{text-decoration:none;color:rgb(var(--second));font:36px bolder}.navbar .sign{display:flex;align-items:center;text-align:center;justify-content:space-between;gap:16px}.navbar .sign a{text-decoration:none}.navbar .user{display:flex;align-items:center;gap:16px}.navbar .user #user-name{text-decoration:none;font:20px bolder;padding-right:12px}.navbar .user #user-name:first-letter{text-transform:capitalize}.notes{position:fixed;bottom:25px;right:25px;z-index:100;background-color:#ffff0080;padding:8px 12px;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-content:center}.notes .notes-options{cursor:default;display:flex;justify-content:end}.notes textarea{width:90%;height:100px;font-size:16px;line-height:17px;background:repeating-linear-gradient(transparent,transparent 16px,rgba(0,0,0,.5) 16px,rgba(0,0,0,.5) 17px);outline:none;border:none;padding:0}.task-page{display:flex;flex-direction:column;flex:1}.create-task{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.create-task form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;border:solid 1px rgb(var(--second));border-radius:8px;padding:64px 32px}.create-task form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left}.tasks-title{font-size:1.2rem;font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:rgb(var(--prime));border-bottom:2px solid rgb(var(--second))}.task-table-container{display:flex;justify-content:center;align-content:center}.task-table{width:100%;border-collapse:collapse;text-align:center}.task-table th{background-color:rgba(var(--second),.2);text-transform:capitalize}.task-table th,td{border:1px solid rgba(var(--second),.3);padding:8px 12px}.task-table td:nth-child(2){text-align:left}.create-project-task{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.create-project-task form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;text-align:left;border:solid 1px rgb(var(--second));border-radius:8px;padding:48px 32px 64px}.create-project-task form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left;width:320px}.create-project-task form .additional{cursor:pointer;display:flex;justify-content:space-between;padding:0 24px}.project-item-grid{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:.5fr 1fr 1fr 1fr 1fr;grid-gap:16px;width:100%;flex:1}.project-task-title{padding:8px 16px;display:flex;font-size:1rem;text-transform:capitalize;border-bottom:solid 1px rgba(var(--second),.1)}.project-task-list{display:flex;flex-direction:column;grid-row:2/6;overflow:scroll}.project-task-item{text-align:left;width:80%;margin:12px auto;height:100px;background-color:rgba(var(--second),.1);padding:8px;border-radius:8px;cursor:grab}.task-title{display:flex;justify-content:space-between;font-size:1.2rem;font-weight:600}.task-title .title{text-transform:capitalize}.task-title .deadline{color:rgba(var(--second),.8);font-size:.8rem}.task-bottom{height:50px;display:flex;justify-content:space-between;align-items:end}.task-bottom .description{margin-top:10px;font-size:1rem;text-overflow:ellipsis;overflow:hidden;color:rgba(var(--second),.8)}.task-bottom .assign{font-size:.8rem}.project-task-list:has(:active)~.project-task-delete{animation:shake infinite 1s ease-in-out;color:red;text-shadow:0 0 0px 20px rgb(var(--high))}.project-task-item:active{cursor:grabbing;opacity:.5}.project-task-options{grid-row:6;grid-column:3;display:flex;justify-content:center;gap:16px}.project-task-delete{grid-row:-1;justify-self:center;width:100%;text-align:center}@keyframes shake{0%{transform:rotate(0)}10%{transform:rotate(5deg)}20%{transform:rotate(0)}30%{transform:rotate(-5deg)}40%{transform:rotate(0)}}.projectListTitle{font-size:1.2rem;font-weight:600;display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:rgb(var(--prime));border-bottom:2px solid rgb(var(--second))}.projectList{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.projectList .project{margin:10px;background-color:#ffffff4d;display:flex;flex-direction:column;justify-content:space-between;padding:10px;border:1px solid rgba(var(--second),.2);border-radius:5px}.projectList .project .project-title{display:flex;justify-content:space-between;font-size:1.2rem;font-weight:600}.projectList .project .project-title .title{text-transform:capitalize}.projectList .project .project-title .deadline{color:rgba(var(--second),.8);font-size:.8rem}.projectList .project .project-description{margin-top:10px;font-size:1rem;height:150px;text-overflow:ellipsis;overflow:hidden;color:rgba(var(--second),.8)}.projectList .project:hover{box-shadow:0 0 10px rgba(var(--second),.2)}.project-modify{display:flex;justify-content:center;align-items:center;position:fixed;top:0;background-color:rgba(var(--first),.9);height:100%;width:100%;z-index:100;text-align:center}.project-modify form{background-color:rgb(var(--first));display:flex;flex-direction:column;gap:16px;justify-content:center;align-content:start;text-align:left;border:solid 1px rgb(var(--second));border-radius:8px;padding:64px 32px}.project-modify form .element{display:grid;grid-template-columns:1fr 1fr;gap:4px;text-align:left}.project-modify form li:hover{cursor:url(https://img.icons8.com/?size=20&id=11997&format=png&color=000000),auto}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{display:flex;flex-direction:column;margin:0;--prime: 189, 151, 207;--first: 227, 227, 225;--second: 0, 0, 0;--high: 255, 55, 95;--medium: 255, 201, 38;--low: 63, 202, 125;background-color:rgb(var(--first));color:rgb(var(--second));height:100vh}#root{height:100%;display:flex;flex-direction:column;flex:1}.dark{--prime: 160, 64, 206;--first: 0, 0, 0;--second: 227, 227, 225}button{padding:6px 12px;font-size:16px;border-radius:6px}button:hover{cursor:pointer}.primary-button{background-color:rgb(var(--second));border:rgb(var(--second)) 1px solid;color:rgb(var(--first))}.primary-button a{color:rgb(var(--first))}.secondary-button{background-color:rgb(var(--prime));border:rgb(var(--first)) 1px solid;color:#000}.secondary-button a{color:#000}.tertiary-button{background:transparent;border:none;color:rgb(var(--second))}.tertiary-button a,a{color:rgb(var(--second))}h1{text-transform:capitalize}input:not([type=checkbox]){width:300px;height:30px;border-radius:5px;border:1px solid rgb(var(--second));background-color:rgba(var(--prime),.2);color:rgb(var(--second));padding:0 10px}input:not([type=checkbox]):focus{outline:none}input[type=range]{width:100%;height:10px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:15px;padding:0;opacity:.7}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:rgb(var(--second));transition:background-color 5000s ease-in-out 0s}input[type=range]::-webkit-slider-thumb,input[type=range]::-moz-range-thumb{width:15px;height:15px;border-radius:50%;background-color:rgba(var(--prime));border:1px solid rgb(var(--prime))}textarea{width:300px;height:100px;border:1px solid rgb(var(--second));border-radius:5px;background-color:rgba(var(--prime),.2);padding:10px;font-size:.9rem}textarea:focus{outline:none}ul{list-style:none;margin:0;padding:0}li{padding-left:24px}select{height:30px;border:1px solid rgb(var(--second));background-color:rgba(var(--prime),.2);border-radius:5px;width:100%} diff --git a/index.html b/index.html index 9741e05..e8d0cf3 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,13 @@ - + + - Vite + React - - + TaskMaster + +