diff --git a/dist/assets/calendar.a859ae72.svg b/dist/assets/calendar.a859ae72.svg
new file mode 100644
index 0000000..5fb5c12
--- /dev/null
+++ b/dist/assets/calendar.a859ae72.svg
@@ -0,0 +1,12 @@
+
diff --git a/dist/assets/index.1b579f52.css b/dist/assets/index.1b579f52.css
deleted file mode 100644
index d9c6976..0000000
--- a/dist/assets/index.1b579f52.css
+++ /dev/null
@@ -1 +0,0 @@
-@import"https://fonts.googleapis.com/css2?family=Lato&display=swap";*{font-family:Lato,sans-serif;margin:0;padding:0;box-sizing:border-box;scroll-behavior:smooth}.container{width:100%;padding:0 5rem;max-width:100%;margin:0 auto;height:100%}html{font-size:62.5%;height:100%}body{background-color:#222831;position:relative}body,#root,.App{height:100%}ul{list-style-type:none}input,button{background:none;outline:none;border:none}button:disabled{background:#d4d4d4!important;border:none!important;cursor:not-allowed!important}a{text-decoration:none}a,h1,h2,h3,h4,h5,h6,span,label,input,textarea,p{color:#f2f2f2}.green{color:#2fad8c;font-size:1.6rem;font-weight:700}.red{color:red;font-size:1.6rem;font-weight:700}input,textarea,select{transition:.1s all ease;border:.1rem #f2f2f2 solid;outline:#2fad8c 0rem solid}input:focus,textarea:focus,select:focus{transition:.1s all ease;border:.1rem #393e46 solid;outline:#2fad8c .3rem solid}::-webkit-scrollbar{width:1rem}::-webkit-scrollbar-track{background:#c9fce9}::-webkit-scrollbar-thumb{background:#2fad8c}::-webkit-scrollbar-thumb:hover{background:#268a6f}.login{height:100%}.login.inner{display:flex;align-items:center;justify-content:center}.login__wrapper{display:flex;flex-direction:column;gap:2.4rem}.login__header{text-align:center;font-size:2.8rem}.login__form{min-width:35rem;background:#393e46;padding:3.5rem;border:1px solid #222831;border-radius:.5rem;display:flex;flex-direction:column;gap:1.6rem}.login__form__error{overflow:hidden;height:0;color:red;font-size:1.4rem;font-weight:700;transition:.3s all ease}.login__form__error.active{transition:.3s all ease;height:2rem}.login__form__button{border-radius:.5rem;cursor:pointer;width:100%;padding:.6rem 1.2rem;color:#fff;font-size:1.6rem}.login__form__button--violet{background-color:#2fad8c;border:.1rem solid #2fad8c;transition:.3s all ease}.login__form__button--violet:hover{transition:.3s all ease;background-color:#268a6f;border:.1rem solid #268a6f}.login__form__block{display:flex;flex-direction:column;gap:.8rem}.login__form__block label{font-size:1.6rem}.login__form__block input{font-size:1.6rem;padding:.6rem 1.2rem;border-radius:.5rem}.login__form__block--check label{font-size:1.6rem;display:flex;align-items:center;gap:.6rem}.nav__dropdown{background:#393e46;z-index:5;border-radius:1rem;width:100%;opacity:0;overflow:hidden;position:absolute;transition:.3s all ease;top:calc(100% + 1rem);left:0;height:0;border:.1rem solid #222831}.nav__dropdown.active{height:14.7rem;opacity:1;transition:.3s all ease}.nav__dropdown__wrapper{display:flex;flex-direction:column}.nav__dropdown__wrapper li{display:flex;flex-direction:column;gap:.2rem}.nav__dropdown__wrapper li:nth-child(2n){padding-bottom:1rem}.nav__left{display:flex;align-items:center;justify-content:flex-start;gap:5%}.nav__right{justify-self:flex-end;max-width:10rem;display:flex;align-items:center}.nav__right__user{cursor:pointer;position:relative;background:#393e46;border:.1rem solid #222831;border-radius:1rem;padding:1rem;display:flex;align-items:center;gap:1.6rem;transition:.3s all ease}.nav__right__user:hover{transition:.3s all ease;border:.1rem solid #393e46;background:#222831}.nav__right__user button{border-top:.1rem solid #c8c8c8;padding:1rem 1rem .5rem;cursor:pointer;color:#25acda}.nav__right__user span{font-size:1.6rem}.nav__right__user p{font-size:1.2rem;padding:0 1rem}.nav__right__user__img{width:3rem;height:3rem}.nav__right__user__img img{width:3rem;height:3rem;object-fit:contain}.nav__right__user h2,.nav__right__user h3{padding:1rem 1rem .5rem;width:100%;font-size:1.4rem}.nav.inner{display:grid;grid-template-columns:1fr 1fr;gap:3rem;padding:2rem 0}.nav__img{width:7rem;height:5rem}.nav__img svg{width:7rem;height:5rem}.nav__btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:4.8rem;height:3.2rem;padding:.4rem 0;border:.1rem solid #393e46;border-radius:.5rem;transition:.3s all ease}.nav__btn img{width:4.8rem;height:3.2rem;object-fit:contain}.nav__btn:active{transition:.3s all ease;border:.3rem solid #393e46}.main__mid{padding:3rem 0;display:grid;grid-template-columns:auto 1fr}.aside{transition:.3s all ease;overflow:hidden;max-width:0;width:100%}.aside__img{width:3rem;height:3rem}.aside.active{max-width:25rem;transition:.3s all ease}.aside__list{width:100%;padding:1rem;display:flex;flex-direction:column;gap:1rem;background:#393e46}.aside__list__element{min-width:13.12rem;transition:.3s all ease;background:transparent;display:flex;gap:1.5rem;align-items:center;font-size:1.6rem;cursor:pointer}.aside__list__element a,.aside__list__element div{display:flex;align-items:center;justify-content:flex-start;gap:1.4rem;width:100%;padding:.8rem .4rem .8rem 1.2rem}.aside__list__element:hover{transition:.3s all ease;background:#222831}.aside__list__element__img{width:2rem;height:2rem}.aside__list__element__img img{width:2rem;height:2rem;object-fit:contain}.aside__list__element--title{cursor:default!important;background:transparent!important;font-size:1.4rem}.aside__list__element--title:not(:first-child){padding-top:1rem;margin-top:1rem}.aside__list__element--title svg{width:3rem;height:3rem}.posts__pagination{width:100%;display:flex;gap:3rem;align-items:center;justify-content:flex-end}.posts__pagination input{border-radius:.5rem;border:none!important;width:5%;text-align:center;font-weight:700}.posts__pagination button{transition:.3s all ease;cursor:pointer;color:#f2f2f2;font-size:1.6rem;width:15%;padding:1rem 2rem;border-radius:.5rem;background:#2fad8c}.posts__pagination button:hover{transition:.3s all ease;background:#268a6f}.posts__select{display:flex;flex-direction:column;gap:.8rem}.posts__select label{display:flex;gap:.8rem;font-size:1.4rem}.posts__select input{background:#393e46;color:#f2f2f2;font-size:1.6rem;padding:1rem 1.2rem;border-radius:.2rem;cursor:default;border-radius:.5rem}.posts__select__wrapper{display:flex;gap:1rem}.posts select{padding:1rem 1.2rem;color:#f2f2f2;background:#393e46;border-radius:.5rem}.posts.inner{display:flex;flex-direction:column;gap:4rem}.posts__table.disabled{pointer-events:none}.posts__table__head{min-height:unset!important;background:#393e46}.posts__table th{padding:.3rem;display:flex;align-items:center;justify-content:center;gap:.6rem;cursor:pointer;width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;transition:.3s all ease}.posts__table th input{padding:1rem 2rem;width:100%}.posts__table th span{width:100%;color:#f2f2f2;transition:.3s all ease}.posts__table th.active{background:#c9fce9;transition:.3s all ease}.posts__table th.active span{color:#222831;transition:.3s all ease}.posts__table .post-link{background:#222831}.posts__table .post-link:nth-child(2n){background:#c9fce9}.posts__table .post-link:nth-child(2n) td{color:#393e46}.posts__table .post-link:nth-child(2n) td svg{fill:#222831}.posts__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr 2fr 2.5fr 2fr 2.5fr 2.5fr 2.5fr;gap:1rem}.posts__table td{color:#f2f2f2;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.posts__table td a{width:100%;display:flex;align-items:center;justify-content:center}.posts__table td svg{width:2rem;height:2rem}.posts__table tbody{min-height:20rem;position:relative;display:flex;flex-direction:column}.posts__reset{color:#fff;max-width:30rem;font-size:1.6rem;border-radius:.5rem;background:#2fad8c;padding:.5rem 2rem;text-align:center;height:67%;min-width:20rem;cursor:pointer;transition:.3s all ease}.posts__reset:hover{transition:.3s all ease;background-color:#268a6f;border:.1rem solid #268a6f}.posts__reset__btn{display:flex;flex-direction:row;align-items:flex-end}.post{padding-bottom:4rem}.post.inner{display:flex;flex-direction:column;gap:4rem}.post h1{font-size:2.4rem}.post__head svg{width:5rem;height:5rem}.post__content{display:flex;flex-direction:column;gap:3rem}.post__content__btn{display:flex;align-items:center;gap:1rem;border-radius:.2rem;cursor:pointer;width:100%;padding:1rem 1.2rem;color:#f2f2f2;font-size:1.6rem;background-color:#2fad8c;transition:.3s all ease}.post__content__btn:hover{transition:.3s all ease;background-color:#268a6f}.post__content input{font-size:1.6rem;padding:.6rem 1.2rem;border-radius:.5rem;cursor:default;background:#393e46}.post__content textarea{background:#393e46;cursor:default;padding:.6rem 1.2rem;resize:none;font-size:1.6rem;border-radius:.5rem}.post__content__block{display:flex;flex-direction:column;gap:.8rem}.post__content__block h4{font-size:1.6rem}.post__content__table thead tr{min-height:unset!important;background:#393e46}.post__content__table th{width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;color:#f2f2f2;transition:.3s all ease}.post__content__table tr{background:#222831}.post__content__table tr:nth-child(2n){background:#c9fce9}.post__content__table tr:nth-child(2n) td{color:#393e46}.post__content__table tr:nth-child(2n) td svg{fill:#222831}.post__content__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr repeat(4,2fr);gap:1rem}.post__content__table td{color:#f2f2f2;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.post__content__table td a{width:100%;display:flex;align-items:center;justify-content:center}.post__content__table td svg{width:2rem;height:2rem}.post__content__table tbody{min-height:20rem;position:relative;display:flex;flex-direction:column}.table__empty{font-size:1.6rem;text-align:center}.details.inner{display:flex;flex-direction:column;gap:4rem}.details__data{display:grid;grid-template-columns:1fr 1fr;gap:3rem}.details__data__block{width:100%;display:flex;flex-direction:column;gap:.6rem}.details__data label{font-size:2rem}.details__data input{font-size:1.6rem;padding:1rem 1.2rem;border-radius:.5rem}.details__content,.category.inner{display:flex;flex-direction:column;gap:4rem}.category__head svg{width:4rem;height:4rem}.category th{cursor:pointer;width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;color:#f2f2f2;transition:.3s all ease}.category__form{display:flex;flex-direction:column;align-items:flex-start;gap:4rem}.category__form__block{width:100%;max-width:40rem;display:flex;flex-direction:column;gap:.6rem}.category__form__block label{font-size:2rem}.category__form__block input{padding:.7rem 1rem;border:.1rem solid #cccccc;border-radius:.5rem}.category__form button{display:flex;align-items:center;justify-content:center;gap:1rem;max-width:30rem;border-radius:.2rem;cursor:pointer;width:100%;padding:1rem 1.8rem;color:#fff;font-size:1.6rem;background-color:#7c69ef;border:.1rem solid #7c69ef;transition:.3s all ease}.category__form button:hover{transition:.3s all ease;background-color:#705ed6;border:.1rem solid #705ed6}.category__table__wrapper{display:flex;flex-direction:column;gap:1rem}.category__table__wrapper h3{font-size:2rem;font-weight:400}.category__table__head{cursor:default;min-height:unset!important;background:#393e46!important}.category__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr 2fr 3fr 4fr;gap:1rem;color:#f2f2f2;background:#222831}.category__table tr:nth-child(2n){background:#c9fce9}.category__table tr:nth-child(2n) td{color:#393e46}.category__table tr:nth-child(2n) td svg{fill:#222831}.category__table tr:nth-child(2n) td span{color:#222831;font-weight:700}.category__table td{text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.category__table tbody{max-height:70vh;overflow-y:auto;display:flex;flex-direction:column}.source-action{display:flex;gap:1rem;align-items:center;justify-content:center}.source-action__block button,.source-action__block a{cursor:pointer;display:flex;align-items:center;gap:.6rem}.source-action__block svg{width:1.5rem;height:1.5rem}.source-action__block span{font-size:1.6rem}.source__link{display:flex;align-items:center;gap:1rem;max-width:30rem;font-size:1.6rem;border-radius:.5rem;background:#2fad8c;padding:1rem 2rem;transition:.3s all ease;text-align:center}.source__link:hover{background:#268a6f;transition:.3s all ease}.source__head svg{width:4rem;height:4rem}.source__create.inner,.source__create__block{display:flex;flex-direction:column;gap:4rem}.dashboard__head{display:flex;align-items:center;gap:1rem}.dashboard__head h1{font-size:3.2rem}.dashboard__head svg{width:4rem;height:4rem}.source-edit.inner,.source-edit__content form{display:flex;flex-direction:column;gap:4rem}.source-edit__info,.source-edit__content{display:flex;flex-direction:column;gap:3rem;padding:1rem}.source-edit__info h2,.source-edit__content h2{font-weight:400;font-size:3rem}.source-edit__input{color:#f2f2f2;display:flex;flex-direction:column;gap:.8rem;font-size:1.6rem}.source-edit__input input{font-size:1.6rem;background:#393e46;padding:.6rem 1.2rem;border-radius:.5rem}.source-edit__submit{font-size:1.6rem;cursor:pointer;color:#f2f2f2;border-radius:.5rem;background:#2fad8c;transition:.3s all ease;padding:1.6rem 1.2rem}.source-edit__submit:hover{transition:.3s all ease;background:#268a6f}.loader{z-index:20;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(255,255,255,.4)}.loader.inner{opacity:1}.loader.inner img{width:100%;height:100%;max-width:10rem;max-height:10rem}.popup{opacity:0;left:4rem;bottom:2rem;border-radius:.6rem;z-index:30;position:absolute;width:35rem;height:6rem;display:flex;align-items:center;gap:3rem;padding:1.6rem;background:#393e46;transition:.3s all ease}.popup__wrapper{pointer-events:none;top:0;left:0;position:absolute;overflow:hidden;height:100vh;width:100%}.popup__wrapper__inner{width:100%;height:100%;position:relative}.popup span{font-size:1.6rem}.popup svg{width:3rem;height:3rem}.popup.active{transition:.3s all ease;animation:slideIn 2s ease-in-out 0s 1 forwards}@keyframes slideIn{0%{transform:translateY(3rem)}25%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(3rem)}}
diff --git a/dist/assets/index.e8886f83.js b/dist/assets/index.27ae2291.js
similarity index 92%
rename from dist/assets/index.e8886f83.js
rename to dist/assets/index.27ae2291.js
index 74b3211..7cb6706 100644
--- a/dist/assets/index.e8886f83.js
+++ b/dist/assets/index.27ae2291.js
@@ -56,4 +56,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 N1=N.exports,P1=Symbol.for("react.element"),R1=Symbol.for("react.fragment"),L1=Object.prototype.hasOwnProperty,O1=N1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,T1={key:!0,ref:!0,__self:!0,__source:!0};function uf(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)L1.call(t,r)&&!T1.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:P1,type:e,key:i,ref:o,props:l,_owner:O1.current}}ii.Fragment=R1;ii.jsx=uf;ii.jsxs=uf;(function(e){e.exports=ii})(Yu);const s=Yu.exports.jsx,x=Yu.exports.jsxs;var Ot=globalThis&&globalThis.__assign||function(){return Ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{pop:e,message:t,success:n}=N.exports.useContext(et).popupValue.popup;return s("div",{className:"popup__wrapper",children:s("div",{className:"popup__wrapper__inner",children:x("div",{className:e?"popup active":"popup",children:[n?s(F.Provider,{value:{color:"#8DD77F"},children:s(V1,{})}):s(F.Provider,{value:{color:"red"},children:s(B1,{})}),s("span",{children:n?t.success:t.failure})]})})})},_s={username:"admin",password:"admin@tps"},W1=()=>{const[e,t]=N.exports.useState({username:"",password:"",remember:!1,check:!1,valid:!1}),{user:n,setUser:r}=N.exports.useContext(Tr);return N.exports.useEffect(()=>{e.username===_s.username&&e.password===_s.password?t({...e,valid:!0}):t({...e,valid:!1})},[e.username,e.password]),s("main",{className:"login",children:s("div",{className:"container",children:s("div",{className:"login inner",children:x("div",{className:"login__wrapper",children:[s("h1",{className:"login__header",children:"Login"}),x("form",{className:"login__form",onSubmit:l=>{l.preventDefault()},children:[x("div",{className:"login__form__block",children:[s("label",{htmlFor:"username",children:"Username"}),s("input",{required:!0,autoComplete:"true",type:"text",id:"username",placeholder:"username",onChange:l=>{t({...e,username:l.target.value})}})]}),x("div",{className:"login__form__block",children:[s("label",{htmlFor:"password",children:"Password"}),s("input",{required:!0,autoComplete:"true",type:"password",id:"password",placeholder:"password",onChange:l=>{t({...e,password:l.target.value})}})]}),s("div",{className:"login__form__block--check",children:x("label",{children:[s("input",{type:"checkbox",name:"remember",id:"remember",onChange:l=>{t({...e,remember:l.target.checked})}}),s("span",{children:"Remember me"})]})}),s("span",{className:e.check&&!e.valid?"login__form__error active":"login__form__error",children:"Invalid credentials"}),s("button",{className:"login__form__button login__form__button--violet",onClick:()=>{if(t({...e,check:!0}),e.valid&&r({username:e.username,accessLevel:"admin"}),e.remember){const l={username:e.username,accessLevel:"admin"};localStorage.setItem("userData",JSON.stringify(l))}},children:"Login"})]})]})})})})};function Q1(e){return ee({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"}}]})(e)}const K1=({aside:e,setAside:t})=>{const{user:n,setUser:r}=N.exports.useContext(Tr),[l,i]=N.exports.useState(!1);return s("nav",{className:"nav",children:s("div",{className:"container",children:x("div",{className:"nav inner",children:[x("div",{className:"nav__left",children:[s(gt,{to:"/posts",className:"nav__img",onClick:()=>{localStorage.setItem("lastLocation","/dashboard")},children:s(F.Provider,{value:{color:"#8DD77F"},children:s(I1,{})})}),s(F.Provider,{value:{color:"#8DD77F"},children:s(Q1,{type:"button",className:"nav__btn",onClick:()=>t(!e)})})]}),s("div",{className:"nav__right",children:x("div",{className:"nav__right__user",onClick:()=>{i(!l)},children:[s(F.Provider,{value:{color:"#8DD77F"},children:s($1,{className:"nav__right__user__img"})}),s("span",{children:"Profile"}),s("div",{className:l?"nav__dropdown active":"nav__dropdown",children:x("ul",{className:"nav__dropdown__wrapper",children:[x("li",{children:[s("h2",{children:"Username:"}),s("p",{children:n.username})]}),x("li",{children:[s("h2",{children:"Access:"}),s("p",{children:n.accessLevel})]}),s("li",{children:s("button",{type:"button",onClick:()=>{localStorage.removeItem("userData"),r({username:"",accessLevel:""})},children:"Log out"})})]})})]})})]})})})};function q1(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01.1-.7.3-1.37.59-1.98-.22-.02-.44-.03-.67-.03-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2H4zM10 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM20.75 16c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}}]})(e)}const X1=({aside:e,setAside:t})=>{const{setUser:n}=N.exports.useContext(Tr);return s("aside",{className:e?"aside active":"aside",children:x("ul",{className:"aside__list",children:[x("li",{className:"aside__list__element aside__list__element--title",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(F1,{className:"aside__img"})}),s("h2",{children:"Posts"})]}),s("li",{className:"aside__list__element",children:x(gt,{to:"/posts",onClick:()=>localStorage.setItem("lastLocation","/posts"),children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(df,{className:"aside__list__element__img"})}),s("span",{children:"Posts"})]})}),x("li",{className:"aside__list__element aside__list__element--title",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(sf,{})}),s("h2",{children:"Source"})]}),s("li",{className:"aside__list__element",children:x(gt,{to:"/source",onClick:()=>localStorage.setItem("lastLocation","/source"),children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(M1,{className:"aside__list__element__img"})}),s("span",{children:"Source"})]})}),s("li",{className:"aside__list__element",children:x(gt,{to:"/source/create",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(Ju,{className:"aside__list__element__img"})}),s("span",{children:"Create source"})]})}),x("li",{className:"aside__list__element aside__list__element--title",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(q1,{className:"aside__img"})}),s("h2",{children:"Account"})]}),s("li",{className:"aside__list__element",children:x(gt,{to:"/user_details",onClick:()=>localStorage.setItem("lastLocation","/user_details"),children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(cf,{className:"aside__list__element__img"})}),s("span",{children:"Details"})]})}),s("li",{className:"aside__list__element",onClick:()=>{localStorage.removeItem("userData"),n({username:"",accessLevel:""})},children:x("div",{children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(U1,{className:"aside__list__element__img"})}),s("span",{children:"Log out"})]})})]})})},jt=({child:e})=>{const[t,n]=N.exports.useState(!0);return x("main",{className:"main",children:[s("div",{className:"main__top",children:s(K1,{aside:t,setAside:n})}),x("div",{className:"main__mid",children:[s(X1,{aside:t,setAside:n}),s("div",{className:"main-inner",children:e})]})]})};var br,Y1=new Uint8Array(16);function J1(){if(!br&&(br=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!br))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return br(Y1)}const G1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Z1(e){return typeof e=="string"&&G1.test(e)}var ie=[];for(var ji=0;ji<256;++ji)ie.push((ji+256).toString(16).substr(1));function b1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(ie[e[t+0]]+ie[e[t+1]]+ie[e[t+2]]+ie[e[t+3]]+"-"+ie[e[t+4]]+ie[e[t+5]]+"-"+ie[e[t+6]]+ie[e[t+7]]+"-"+ie[e[t+8]]+ie[e[t+9]]+"-"+ie[e[t+10]]+ie[e[t+11]]+ie[e[t+12]]+ie[e[t+13]]+ie[e[t+14]]+ie[e[t+15]]).toLowerCase();if(!Z1(n))throw TypeError("Stringified UUID is invalid");return n}function $l(e,t,n){e=e||{};var r=e.random||(e.rng||J1)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var l=0;l<16;++l)t[n+l]=r[l];return t}return b1(r)}function pf(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z"}},{tag:"path",attr:{d:"M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"}}]})(e)}var hf={exports:{}},Gu={exports:{}},mf=function(t,n){return function(){for(var l=new Array(arguments.length),i=0;i"u"}function t0(e){return e!==null&&!Bl(e)&&e.constructor!==null&&!Bl(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}var vf=nn("ArrayBuffer");function n0(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vf(e.buffer),t}function r0(e){return typeof e=="string"}function l0(e){return typeof e=="number"}function yf(e){return e!==null&&typeof e=="object"}function fl(e){if(bu(e)!=="object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var i0=nn("Date"),o0=nn("File"),u0=nn("Blob"),a0=nn("FileList");function ta(e){return Zu.call(e)==="[object Function]"}function s0(e){return yf(e)&&ta(e.pipe)}function c0(e){var t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Zu.call(e)===t||ta(e.toString)&&e.toString()===t)}var d0=nn("URLSearchParams");function f0(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function p0(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function na(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),ea(e))for(var n=0,r=e.length;n0;)i=r[l],o[i]||(t[i]=e[i],o[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function g0(e,t,n){e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return r!==-1&&r===n}function _0(e){if(!e)return null;var t=e.length;if(Bl(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n}var w0=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array)),se={isArray:ea,isArrayBuffer:vf,isBuffer:t0,isFormData:c0,isArrayBufferView:n0,isString:r0,isNumber:l0,isObject:yf,isPlainObject:fl,isUndefined:Bl,isDate:i0,isFile:o0,isBlob:u0,isFunction:ta,isStream:s0,isURLSearchParams:d0,isStandardBrowserEnv:p0,forEach:na,merge:Zo,extend:h0,trim:f0,stripBOM:m0,inherits:v0,toFlatObject:y0,kindOf:bu,kindOfTest:nn,endsWith:g0,toArray:_0,isTypedArray:w0,isFileList:a0},un=se;function ws(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var gf=function(t,n,r){if(!n)return t;var l;if(r)l=r(n);else if(un.isURLSearchParams(n))l=n.toString();else{var i=[];un.forEach(n,function(a,d){a===null||typeof a>"u"||(un.isArray(a)?d=d+"[]":a=[a],un.forEach(a,function(v){un.isDate(v)?v=v.toISOString():un.isObject(v)&&(v=JSON.stringify(v)),i.push(ws(d)+"="+ws(v))}))}),l=i.join("&")}if(l){var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t},S0=se;function oi(){this.handlers=[]}oi.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};oi.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};oi.prototype.forEach=function(t){S0.forEach(this.handlers,function(r){r!==null&&t(r)})};var k0=oi,x0=se,E0=function(t,n){x0.forEach(t,function(l,i){i!==n&&i.toUpperCase()===n.toUpperCase()&&(t[n]=l,delete t[i])})},_f=se;function Fn(e,t,n,r,l){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),l&&(this.response=l)}_f.inherits(Fn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var wf=Fn.prototype,Sf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(e){Sf[e]={value:e}});Object.defineProperties(Fn,Sf);Object.defineProperty(wf,"isAxiosError",{value:!0});Fn.from=function(e,t,n,r,l,i){var o=Object.create(wf);return _f.toFlatObject(e,o,function(a){return a!==Error.prototype}),Fn.call(o,e.message,t,n,r,l),o.name=e.name,i&&Object.assign(o,i),o};var jn=Fn,kf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Be=se;function C0(e,t){t=t||new FormData;var n=[];function r(i){return i===null?"":Be.isDate(i)?i.toISOString():Be.isArrayBuffer(i)||Be.isTypedArray(i)?typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function l(i,o){if(Be.isPlainObject(i)||Be.isArray(i)){if(n.indexOf(i)!==-1)throw Error("Circular reference detected in "+o);n.push(i),Be.forEach(i,function(a,d){if(!Be.isUndefined(a)){var h=o?o+"."+d:d,v;if(a&&!o&&typeof a=="object"){if(Be.endsWith(d,"{}"))a=JSON.stringify(a);else if(Be.endsWith(d,"[]")&&(v=Be.toArray(a))){v.forEach(function(c){!Be.isUndefined(c)&&t.append(h,r(c))});return}}l(a,h)}}),n.pop()}else t.append(o,r(i))}return l(e),t}var xf=C0,$i,Ss;function N0(){if(Ss)return $i;Ss=1;var e=jn;return $i=function(n,r,l){var i=l.config.validateStatus;!l.status||!i||i(l.status)?n(l):r(new e("Request failed with status code "+l.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))},$i}var Bi,ks;function P0(){if(ks)return Bi;ks=1;var e=se;return Bi=e.isStandardBrowserEnv()?function(){return{write:function(r,l,i,o,u,a){var d=[];d.push(r+"="+encodeURIComponent(l)),e.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),e.isString(o)&&d.push("path="+o),e.isString(u)&&d.push("domain="+u),a===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(r){var l=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Bi}var R0=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},L0=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},O0=R0,T0=L0,Ef=function(t,n){return t&&!O0(n)?T0(t,n):n},Vi,xs;function z0(){if(xs)return Vi;xs=1;var e=se,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Vi=function(r){var l={},i,o,u;return r&&e.forEach(r.split(`
-`),function(d){if(u=d.indexOf(":"),i=e.trim(d.substr(0,u)).toLowerCase(),o=e.trim(d.substr(u+1)),i){if(l[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?l[i]=(l[i]?l[i]:[]).concat([o]):l[i]=l[i]?l[i]+", "+o:o}}),l},Vi}var Hi,Es;function D0(){if(Es)return Hi;Es=1;var e=se;return Hi=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),l;function i(o){var u=o;return n&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return l=i(window.location.href),function(u){var a=e.isString(u)?i(u):u;return a.protocol===l.protocol&&a.host===l.host}}():function(){return function(){return!0}}(),Hi}var Wi,Cs;function ui(){if(Cs)return Wi;Cs=1;var e=jn,t=se;function n(r){e.call(this,r==null?"canceled":r,e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),Wi=n,Wi}var Qi,Ns;function F0(){return Ns||(Ns=1,Qi=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Qi}var Ki,Ps;function Rs(){if(Ps)return Ki;Ps=1;var e=se,t=N0(),n=P0(),r=gf,l=Ef,i=z0(),o=D0(),u=kf,a=jn,d=ui(),h=F0();return Ki=function(c){return new Promise(function(w,E){var M=c.data,f=c.headers,p=c.responseType,m;function _(){c.cancelToken&&c.cancelToken.unsubscribe(m),c.signal&&c.signal.removeEventListener("abort",m)}e.isFormData(M)&&e.isStandardBrowserEnv()&&delete f["Content-Type"];var g=new XMLHttpRequest;if(c.auth){var L=c.auth.username||"",S=c.auth.password?unescape(encodeURIComponent(c.auth.password)):"";f.Authorization="Basic "+btoa(L+":"+S)}var C=l(c.baseURL,c.url);g.open(c.method.toUpperCase(),r(C,c.params,c.paramsSerializer),!0),g.timeout=c.timeout;function z(){if(!!g){var H="getAllResponseHeaders"in g?i(g.getAllResponseHeaders()):null,ce=!p||p==="text"||p==="json"?g.responseText:g.response,ve={data:ce,status:g.status,statusText:g.statusText,headers:H,config:c,request:g};t(function(Mt){w(Mt),_()},function(Mt){E(Mt),_()},ve),g=null}}if("onloadend"in g?g.onloadend=z:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(z)},g.onabort=function(){!g||(E(new a("Request aborted",a.ECONNABORTED,c,g)),g=null)},g.onerror=function(){E(new a("Network Error",a.ERR_NETWORK,c,g,g)),g=null},g.ontimeout=function(){var ce=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",ve=c.transitional||u;c.timeoutErrorMessage&&(ce=c.timeoutErrorMessage),E(new a(ce,ve.clarifyTimeoutError?a.ETIMEDOUT:a.ECONNABORTED,c,g)),g=null},e.isStandardBrowserEnv()){var O=(c.withCredentials||o(C))&&c.xsrfCookieName?n.read(c.xsrfCookieName):void 0;O&&(f[c.xsrfHeaderName]=O)}"setRequestHeader"in g&&e.forEach(f,function(ce,ve){typeof M>"u"&&ve.toLowerCase()==="content-type"?delete f[ve]:g.setRequestHeader(ve,ce)}),e.isUndefined(c.withCredentials)||(g.withCredentials=!!c.withCredentials),p&&p!=="json"&&(g.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&g.addEventListener("progress",c.onDownloadProgress),typeof c.onUploadProgress=="function"&&g.upload&&g.upload.addEventListener("progress",c.onUploadProgress),(c.cancelToken||c.signal)&&(m=function(H){!g||(E(!H||H&&H.type?new d:H),g.abort(),g=null)},c.cancelToken&&c.cancelToken.subscribe(m),c.signal&&(c.signal.aborted?m():c.signal.addEventListener("abort",m))),M||(M=null);var j=h(C);if(j&&["http","https","file"].indexOf(j)===-1){E(new a("Unsupported protocol "+j+":",a.ERR_BAD_REQUEST,c));return}g.send(M)})},Ki}var qi,Ls;function A0(){return Ls||(Ls=1,qi=null),qi}var ne=se,Os=E0,Ts=jn,M0=kf,I0=xf,U0={"Content-Type":"application/x-www-form-urlencoded"};function zs(e,t){!ne.isUndefined(e)&&ne.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function j0(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Rs()),e}function $0(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var ai={transitional:M0,adapter:j0(),transformRequest:[function(t,n){if(Os(n,"Accept"),Os(n,"Content-Type"),ne.isFormData(t)||ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return zs(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r=ne.isObject(t),l=n&&n["Content-Type"],i;if((i=ne.isFileList(t))||r&&l==="multipart/form-data"){var o=this.env&&this.env.FormData;return I0(i?{"files[]":t}:t,o&&new o)}else if(r||l==="application/json")return zs(n,"application/json"),$0(t);return t}],transformResponse:[function(t){var n=this.transitional||ai.transitional,r=n&&n.silentJSONParsing,l=n&&n.forcedJSONParsing,i=!r&&this.responseType==="json";if(i||l&&ne.isString(t)&&t.length)try{return JSON.parse(t)}catch(o){if(i)throw o.name==="SyntaxError"?Ts.from(o,Ts.ERR_BAD_RESPONSE,this,null,this.response):o}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A0()},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ne.forEach(["delete","get","head"],function(t){ai.headers[t]={}});ne.forEach(["post","put","patch"],function(t){ai.headers[t]=ne.merge(U0)});var ra=ai,B0=se,V0=ra,H0=function(t,n,r){var l=this||V0;return B0.forEach(r,function(o){t=o.call(l,t,n)}),t},Xi,Ds;function Cf(){return Ds||(Ds=1,Xi=function(t){return!!(t&&t.__CANCEL__)}),Xi}var Fs=se,Yi=H0,W0=Cf(),Q0=ra,K0=ui();function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K0}var q0=function(t){Ji(t),t.headers=t.headers||{},t.data=Yi.call(t,t.data,t.headers,t.transformRequest),t.headers=Fs.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Fs.forEach(["delete","get","head","post","put","patch","common"],function(l){delete t.headers[l]});var n=t.adapter||Q0.adapter;return n(t).then(function(l){return Ji(t),l.data=Yi.call(t,l.data,l.headers,t.transformResponse),l},function(l){return W0(l)||(Ji(t),l&&l.response&&(l.response.data=Yi.call(t,l.response.data,l.response.headers,t.transformResponse))),Promise.reject(l)})},Pe=se,Nf=function(t,n){n=n||{};var r={};function l(h,v){return Pe.isPlainObject(h)&&Pe.isPlainObject(v)?Pe.merge(h,v):Pe.isPlainObject(v)?Pe.merge({},v):Pe.isArray(v)?v.slice():v}function i(h){if(Pe.isUndefined(n[h])){if(!Pe.isUndefined(t[h]))return l(void 0,t[h])}else return l(t[h],n[h])}function o(h){if(!Pe.isUndefined(n[h]))return l(void 0,n[h])}function u(h){if(Pe.isUndefined(n[h])){if(!Pe.isUndefined(t[h]))return l(void 0,t[h])}else return l(void 0,n[h])}function a(h){if(h in n)return l(t[h],n[h]);if(h in t)return l(void 0,t[h])}var d={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return Pe.forEach(Object.keys(t).concat(Object.keys(n)),function(v){var c=d[v]||i,y=c(v);Pe.isUndefined(y)&&c!==a||(r[v]=y)}),r},Gi,As;function Pf(){return As||(As=1,Gi={version:"0.27.2"}),Gi}var X0=Pf().version,mt=jn,la={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){la[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Ms={};la.transitional=function(t,n,r){function l(i,o){return"[Axios v"+X0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return function(i,o,u){if(t===!1)throw new mt(l(o," has been removed"+(n?" in "+n:"")),mt.ERR_DEPRECATED);return n&&!Ms[o]&&(Ms[o]=!0,console.warn(l(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,u):!0}};function Y0(e,t,n){if(typeof e!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),l=r.length;l-- >0;){var i=r[l],o=t[i];if(o){var u=e[i],a=u===void 0||o(u,i,e);if(a!==!0)throw new mt("option "+i+" must be "+a,mt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new mt("Unknown option "+i,mt.ERR_BAD_OPTION)}}var J0={assertOptions:Y0,validators:la},Rf=se,G0=gf,Is=k0,Us=q0,si=Nf,Z0=Ef,Lf=J0,an=Lf.validators;function An(e){this.defaults=e,this.interceptors={request:new Is,response:new Is}}An.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=si(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&Lf.assertOptions(r,{silentJSONParsing:an.transitional(an.boolean),forcedJSONParsing:an.transitional(an.boolean),clarifyTimeoutError:an.transitional(an.boolean)},!1);var l=[],i=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(i=i&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});var o=[];this.interceptors.response.forEach(function(y){o.push(y.fulfilled,y.rejected)});var u;if(!i){var a=[Us,void 0];for(Array.prototype.unshift.apply(a,l),a=a.concat(o),u=Promise.resolve(n);a.length;)u=u.then(a.shift(),a.shift());return u}for(var d=n;l.length;){var h=l.shift(),v=l.shift();try{d=h(d)}catch(c){v(c);break}}try{u=Us(d)}catch(c){return Promise.reject(c)}for(;o.length;)u=u.then(o.shift(),o.shift());return u};An.prototype.getUri=function(t){t=si(this.defaults,t);var n=Z0(t.baseURL,t.url);return G0(n,t.params,t.paramsSerializer)};Rf.forEach(["delete","get","head","options"],function(t){An.prototype[t]=function(n,r){return this.request(si(r||{},{method:t,url:n,data:(r||{}).data}))}});Rf.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,u){return this.request(si(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}An.prototype[t]=n(),An.prototype[t+"Form"]=n(!0)});var b0=An,Zi,js;function em(){if(js)return Zi;js=1;var e=ui();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(o){r=o});var l=this;this.promise.then(function(i){if(!!l._listeners){var o,u=l._listeners.length;for(o=0;o{e(!0),zr.get("http://95.85.124.41:8080/posts"+(n||"")).then(r=>{t(r.data.data)}).catch(r=>{}).finally(()=>e(!1))},um=(e,t,n,r)=>{zr.delete(`http://95.85.124.41:8080/link/delete/${r}`).then(l=>{e(!0),n({...t,success:!0,pop:!0}),setTimeout(()=>{n({...t,pop:!1})},2e3)}).catch(l=>{e(!1),n({...t,success:!1,pop:!0}),setTimeout(()=>{n({...t,pop:!1})},2e3)})},ci=e=>{zr.get("http://95.85.124.41:8080/links/all").then(t=>{e(t.data.data)}).catch(t=>{})},am=(e,t,n,r,l)=>{zr.post("http://95.85.124.41:8080/link/create",{name:n.name,source:n.source}).then(i=>{t({...e,success:!0,pop:!0}),r(),setTimeout(()=>{t({...e,pop:!1}),l()},2e3)}).catch(i=>{t({...e,success:!1,pop:!0}),setTimeout(()=>{t({...e,pop:!1})},2e3)})},sm=(e,t,n,r,l,i)=>{zr.put(`http://95.85.124.41:8080/link/update/${l}`,i).then(o=>{t({...e,success:!0,pop:!0}),n(),setTimeout(()=>{t({...e,pop:!1}),r()},2e3)}).catch(o=>{t({...e,success:!1,pop:!0}),setTimeout(()=>{t({...e,pop:!1})},2e3)})},pe=e=>{const t=e.toString().split("T"),n=t[0];let r,l;return t[1].includes(".")?(r=t[1].split("."),l=r[0]):(r=t[1],l=r.slice(0,r.length-1)),[n,l]},cm="/assets/loader.2016aa78.svg",dm=()=>s("div",{className:"loader",children:s("div",{className:"loader inner",children:s("img",{src:cm,alt:""})})}),fm=()=>{const[e,t]=N.exports.useState(!1),n=N.exports.useContext(et),{posts:r,setPosts:l}=n.postValue,{sources:i}=n.sourceValue,[o,u]=N.exports.useState(""),[a,d]=N.exports.useState("id"),[h,v]=N.exports.useState({perPage:10,pageNumber:1}),[c,y]=N.exports.useState({id:"asc",title:"asc",link:"asc",date:"asc",published:"asc",created:"asc",updated:"asc"}),[w,E]=N.exports.useState({fil_title:{name:"fil_title",value:""},fil_link:{name:"fil_link",value:""},fil_publish_date:{name:"fil_publish_date",value:""},fil_summary:{name:"fil_summary",value:""},fil_createdAt:{name:"fil_createdAt",value:""},fil_updatedAt:{name:"fil_updatedAt",value:""}}),M=N.exports.useCallback(()=>{let f="";return Object.keys(w).map(m=>{const _=m;w[_].value.length>0&&(f=f+`&${w[_].name}=${w[_].value}`)}),f},[w,E]);return N.exports.useEffect(()=>{const f=M();om(t,l,`?sortBy=${a}.${c[a]}&category=${o}&strLimit=${h.perPage}&strOffset=${h.pageNumber}${f}`)},[c,a,h,o,w]),s("main",{className:"posts",children:s("div",{className:"container",children:x("div",{className:"posts inner",children:[x("div",{className:"dashboard__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(df,{className:"dashboard__img"})}),s("h1",{children:"Posts"})]}),x("div",{className:"posts__select__wrapper",children:[x("div",{className:"posts__select",children:[s("label",{htmlFor:"category",children:"Source"}),x("select",{id:"category",value:o,onChange:f=>{f.target.value==="All"?u(""):u(f.target.value)},children:[s("option",{value:"All",defaultChecked:!0,children:"All"}),i?i.map(f=>s("option",{value:f.name,children:f.name},$l())):""]})]}),x("div",{className:"posts__select",children:[s("label",{htmlFor:"pp",children:"Per page"}),x("select",{id:"pp",value:h.perPage,onChange:f=>{v({...h,perPage:parseInt(f.target.value)})},children:[s("option",{value:"10",defaultChecked:!0,children:"10"}),s("option",{value:"15",children:"15"}),s("option",{value:"20",children:"20"}),s("option",{value:"30",children:"30"}),s("option",{value:"40",children:"40"}),s("option",{value:"60",children:"60"}),s("option",{value:"80",children:"80"}),s("option",{value:"100",children:"100"})]})]}),s("div",{className:"posts__select posts__reset__btn",children:s("button",{className:"posts__reset",onClick:()=>{u(""),v({perPage:10,pageNumber:1}),E({fil_title:{name:"fil_title",value:""},fil_link:{name:"fil_link",value:""},fil_publish_date:{name:"fil_publish_date",value:""},fil_summary:{name:"fil_summary",value:""},fil_createdAt:{name:"fil_createdAt",value:""},fil_updatedAt:{name:"fil_updatedAt",value:""}})},children:"Reset"})})]}),x("table",{className:e?"posts__table disabled":"posts__table",children:[x("thead",{children:[x("tr",{className:"posts__table__head",children:[x("th",{className:a==="id"?"active":"",onClick:()=>{d("id"),c.id!=="asc"?y({...c,id:"asc"}):y({...c,id:"desc"})},children:[a==="id"&&c.id==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="id"&&c.id==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"ID"})]}),s("th",{className:a==="category"?"active":"",children:s("span",{children:"Source"})}),x("th",{className:a==="title"?"active":"",onClick:()=>{d("title"),c.title!=="asc"?y({...c,title:"asc"}):y({...c,title:"desc"})},children:[a==="title"&&c.title==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="title"&&c.title==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Title"})]}),x("th",{className:a==="link"?"active":"",onClick:()=>{d("link"),c.link!=="asc"?y({...c,link:"asc"}):y({...c,link:"desc"})},children:[a==="link"&&c.link==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="link"&&c.link==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Link"})]}),x("th",{className:a==="published"?"active":"",onClick:()=>{d("published"),c.published!=="asc"?y({...c,published:"asc"}):y({...c,published:"desc"})},children:[a==="published"&&c.published==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="published"&&c.published==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Published"})]}),x("th",{className:a==="created"?"active":"",onClick:()=>{d("created"),c.created!=="asc"?y({...c,created:"asc"}):y({...c,created:"desc"})},children:[a==="created"&&c.created==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="created"&&c.created==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Created"})]}),x("th",{className:a==="updated"?"active":"",onClick:()=>{d("updated"),c.updated!=="asc"?y({...c,updated:"asc"}):y({...c,updated:"desc"})},children:[a==="updated"&&c.updated==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="updated"&&c.updated==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Updated"})]})]}),x("tr",{className:"posts__table__head posts__table__head--inputs",children:[s("th",{}),s("th",{}),s("th",{children:s("input",{placeholder:"Filter by title",id:"filter-title",type:"text",value:w.fil_title.value,onChange:f=>E({...w,fil_title:{...w.fil_title,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by link",id:"filter-link",type:"text",value:w.fil_link.value,onChange:f=>E({...w,fil_link:{...w.fil_link,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by published",id:"filter-published",type:"text",value:w.fil_publish_date.value,onChange:f=>E({...w,fil_publish_date:{...w.fil_publish_date,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by created",id:"filter-created",type:"text",value:w.fil_createdAt.value,onChange:f=>E({...w,fil_createdAt:{...w.fil_createdAt,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by updated",id:"filter-updated",type:"text",value:w.fil_updatedAt.value,onChange:f=>E({...w,fil_updatedAt:{...w.fil_updatedAt,value:f.target.value}})})})]})]}),x("tbody",{children:[e?s(dm,{}):null,r?r.length>0?r[0].id!==-1?r.map(f=>s(gt,{className:"post-link",to:`/posts/${f.id}`,children:x("tr",{children:[s("td",{children:f.id}),s("td",{children:f.category}),s("td",{children:f.title}),s("td",{children:s("a",{href:f.link,target:"_blank",rel:"noopener noreferrer",children:s(pf,{})})}),s("td",{children:`${pe(f.publish_date)[0]}, ${pe(f.publish_date)[1]}`}),s("td",{children:`${pe(f.createdAt)[0]}, ${pe(f.createdAt)[1]}`}),s("td",{children:`${pe(f.updatedAt)[0]}, ${pe(f.updatedAt)[1]}`})]})},$l())):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})}):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})}):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})})]})]}),x("div",{className:"posts__pagination",children:[s("button",{type:"button",disabled:h.pageNumber===1,onClick:()=>v({...h,pageNumber:h.pageNumber-1}),children:"Previous"}),s("input",{type:"text",value:h.pageNumber,readOnly:!0}),s("button",{disabled:!r,type:"button",onClick:()=>v({...h,pageNumber:h.pageNumber+1}),children:"Next"})]})]})})})},pm=()=>{const{user:e}=N.exports.useContext(Tr);return s("main",{className:"details",children:s("div",{className:"container",children:x("div",{className:"details inner",children:[x("div",{className:"dashboard__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(cf,{className:"dashboard__img"})}),s("h1",{children:"Details"})]}),s("div",{className:"details__content",children:x("form",{className:"details__data",children:[x("div",{className:"details__data__block",children:[s("label",{htmlFor:"user",children:"Username"}),s("input",{type:"text",id:"user",value:e.username,readOnly:!0})]}),x("div",{className:"details__data__block",children:[s("label",{htmlFor:"access",children:"Access"}),s("input",{type:"text",id:"access",value:e.accessLevel,readOnly:!0})]})]})})]})})})},hm=e=>e.charAt(0).toUpperCase()+e.slice(1),mm=()=>{const[e,t]=N.exports.useState(),{posts:n}=N.exports.useContext(et).postValue,{id:r}=tc();return N.exports.useEffect(()=>{n&&n[0].id!==-1&&n.map(l=>{l.id.toString()===r&&t(l)})},[n]),s("main",{className:"post",children:s("div",{className:"container",children:x("div",{className:"post inner",children:[x("div",{className:"dashboard__head post__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(A1,{className:"dashboard__img"})}),s("h1",{className:"post__head",children:e?e.title:""})]}),x("div",{className:"post__content",children:[x("div",{className:"post__content__block",children:[s("h4",{children:"ID"}),s("input",{type:"text",readOnly:!0,value:e?e.id:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Category"}),s("input",{type:"text",readOnly:!0,value:e?hm(e.category.toLowerCase()):""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Title"}),s("input",{type:"text",readOnly:!0,value:e?e.title:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Date"}),s("input",{type:"text",readOnly:!0,value:e?`${pe(e.publish_date)[0]}, ${pe(e.publish_date)[1]}`:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Summary"}),s("textarea",{readOnly:!0,rows:5,value:e?e.summary:""})]}),x("a",{className:"post__content__btn",href:e?e.link:"",target:"_blank",rel:"noopener noreferrer",children:[s(F.Provider,{value:{color:"#FFFFFF"},children:s(pf,{})}),s("span",{children:"Link"})]}),e&&e.HistoryList.length>0?x("div",{className:"post__content__block post__content__table",children:[s("h2",{children:"History List"}),x("table",{children:[s("thead",{children:x("tr",{children:[s("th",{children:"Post ID"}),s("th",{children:"Old published"}),s("th",{children:"New published"}),s("th",{children:"Created"}),s("th",{children:"Updated"})]})}),s("tbody",{children:e&&e.HistoryList.length>0?e.HistoryList.map(l=>x("tr",{children:[s("td",{children:l.PostID}),s("td",{children:`${pe(l.old_published_at)[0]}, ${pe(l.old_published_at)[1]}`}),s("td",{children:`${pe(l.new_published_at)[0]}, ${pe(l.new_published_at)[1]}`}),s("td",{children:`${pe(l.createdAt)[0]}, ${pe(l.createdAt)[1]}`}),s("td",{children:`${pe(l.updatedAt)[0]}, ${pe(l.updatedAt)[1]}`})]},$l())):""})]})]}):""]})]})})})},vm=()=>{const{sources:e,setSources:t}=N.exports.useContext(et).sourceValue,{popup:n,setPopup:r}=N.exports.useContext(et).popupValue,[l,i]=N.exports.useState(!1);return N.exports.useEffect(()=>{l&&setTimeout(()=>{i(!1),ci(t)},2e3)},[l,i]),s("main",{className:"category",children:s("div",{className:"container",children:x("div",{className:"category inner",children:[x("div",{className:"dashboard__head category__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(sf,{})}),s("h1",{children:"Source"})]}),x("div",{className:"category__table__wrapper",children:[s("h3",{children:"All sources"}),x("table",{className:"category__table",children:[s("thead",{children:x("tr",{className:"category__table__head",children:[s("th",{children:"ID"}),s("th",{children:"Name"}),s("th",{children:"Source"}),s("th",{children:"Actions"})]})}),s("tbody",{children:e?e.map(o=>x("tr",{children:[s("td",{children:o.id}),s("td",{children:o.name}),s("td",{className:"category__table__tab",children:o.source}),x("td",{className:"source-action",children:[s("div",{className:"source-action__block",children:x(gt,{to:`/source/edit/${o.id}`,children:[s("span",{children:"Edit"}),s(F.Provider,{value:{color:"#8DD77F"},children:s(ff,{})})]})}),s("div",{className:"source-action__block",children:x("button",{onClick:()=>{um(i,n,r,o.id)},children:[s("span",{children:"Delete"}),s(F.Provider,{value:{color:"#8DD77F"},children:s(j1,{})})]})})]})]},$l())):x("tr",{children:[s("td",{}),s("td",{}),s("td",{})]})})]})]}),x(gt,{to:"/source/create",className:"source__link",children:[s(Ju,{}),s("span",{children:"Create source"})]})]})})})},ym=()=>{const e=Hl(),{sources:t,setSources:n}=N.exports.useContext(et).sourceValue,{popup:r,setPopup:l}=N.exports.useContext(et).popupValue,[i,o]=N.exports.useState();N.exports.useEffect(()=>{t&&t.map(h=>{h.id.toString()===u&&o(h)})},[t]);const{id:u}=tc(),[a,d]=N.exports.useState({name:"",source:""});return s("main",{className:"source-edit",children:s("div",{className:"container",children:x("div",{className:"source-edit inner",children:[x("div",{className:"dashboard__head source-edit__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(ff,{className:"dashboard__img"})}),s("h1",{children:"Edit source"})]}),s("div",{className:"source-edit__content",children:x("form",{onSubmit:h=>{h.preventDefault()},children:[x("div",{className:"source-edit__info",children:[s("h2",{children:"Information"}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"id",children:"Source ID"}),s("input",{readOnly:!0,type:"text",id:"id",value:i?i.id:""})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"name",children:"Source old name"}),s("input",{readOnly:!0,type:"text",id:"name",value:i?i.name:""})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"source",children:"Source old link"}),s("input",{readOnly:!0,type:"text",id:"source",value:i?i.source:""})]})]}),x("div",{className:"source-edit__content",children:[s("h2",{children:"Edit"}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"new_name",children:"Source new name"}),s("input",{placeholder:"Enter new name",type:"text",id:"new_name",value:a.name,onChange:h=>{d({...a,name:h.target.value})}})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"new_source",children:"Source new link"}),s("input",{placeholder:"Enter new link",type:"text",id:"new_source",value:a.source,onChange:h=>{d({...a,source:h.target.value})}})]})]}),s("button",{disabled:!(a.name.length>0&&a.source.length>0),className:"source-edit__submit",onClick:()=>{sm(r,l,()=>e("/source"),()=>ci(n),u?parseInt(u):0,a)},children:"Update source"})]})})]})})})},gm=()=>{const{setSources:e}=N.exports.useContext(et).sourceValue,{popup:t,setPopup:n}=N.exports.useContext(et).popupValue,r=Hl(),[l,i]=N.exports.useState({name:"",source:""});return s("main",{className:"source__create",children:s("div",{className:"container",children:x("div",{className:"source__create inner",children:[x("div",{className:"dashboard__head source__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(Ju,{})}),s("h1",{children:"Create source"})]}),x("form",{onSubmit:o=>o.preventDefault(),className:"source__create__block",children:[x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"name",children:"Source name"}),s("input",{placeholder:"Enter name",type:"text",id:"name",value:l.name,onChange:o=>{i({...l,name:o.target.value})}})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"source",children:"Source link"}),s("input",{placeholder:"Enter link",type:"text",id:"source",value:l.source,onChange:o=>{i({...l,source:o.target.value})}})]}),s("button",{disabled:!(l.name.length>0&&l.source.length>0),className:"source-edit__submit",onClick:()=>{am(t,n,l,()=>r("/source"),()=>ci(e))},children:"Create new source"})]})]})})})},_m=()=>{const e=Hl(),[t,n]=N.exports.useState(),[r,l]=N.exports.useState({success:!1,pop:!1,message:{success:"Success",failure:"Failure"}}),[i,o]=N.exports.useState(),[u,a]=N.exports.useState({username:"",accessLevel:""});N.exports.useEffect(()=>{const y=localStorage.getItem("userData");y&&a(JSON.parse(y))},[]);const d=N.exports.useMemo(()=>({user:u,setUser:a}),[u,a]),h=N.exports.useMemo(()=>({posts:t,setPosts:n}),[t,n]),v=N.exports.useMemo(()=>({popup:r,setPopup:l}),[r,l]),c=N.exports.useMemo(()=>({sources:i,setSources:o}),[i,o]);return N.exports.useEffect(()=>{u.username?e(localStorage.getItem("lastLocation")||"/posts"):e("/login")},[u]),N.exports.useEffect(()=>{ci(o)},[]),s(et.Provider,{value:{postValue:h,sourceValue:c,popupValue:v},children:s(Tr.Provider,{value:d,children:x("div",{className:"App",children:[s(H1,{}),x(gp,{children:[s(tt,{path:"/",element:s(jt,{})}),s(tt,{path:"/posts",element:s(jt,{child:s(fm,{})})}),s(tt,{path:"/source",element:s(jt,{child:s(vm,{})})}),s(tt,{path:"/source/edit/:id",element:s(jt,{child:s(ym,{})})}),s(tt,{path:"/posts/:id",element:s(jt,{child:s(mm,{})})}),s(tt,{path:"/source/create",element:s(jt,{child:s(gm,{})})}),s(tt,{path:"/user_details",element:s(jt,{child:s(pm,{})})}),s(tt,{path:"/login",element:s(W1,{})})]})]})})})};lo.createRoot(document.getElementById("root")).render(s(hl.StrictMode,{children:s(Sp,{children:s(_m,{})})}));
+`),function(d){if(u=d.indexOf(":"),i=e.trim(d.substr(0,u)).toLowerCase(),o=e.trim(d.substr(u+1)),i){if(l[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?l[i]=(l[i]?l[i]:[]).concat([o]):l[i]=l[i]?l[i]+", "+o:o}}),l},Vi}var Hi,Es;function D0(){if(Es)return Hi;Es=1;var e=se;return Hi=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),l;function i(o){var u=o;return n&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return l=i(window.location.href),function(u){var a=e.isString(u)?i(u):u;return a.protocol===l.protocol&&a.host===l.host}}():function(){return function(){return!0}}(),Hi}var Wi,Cs;function ui(){if(Cs)return Wi;Cs=1;var e=jn,t=se;function n(r){e.call(this,r==null?"canceled":r,e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),Wi=n,Wi}var Qi,Ns;function F0(){return Ns||(Ns=1,Qi=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Qi}var Ki,Ps;function Rs(){if(Ps)return Ki;Ps=1;var e=se,t=N0(),n=P0(),r=gf,l=Ef,i=z0(),o=D0(),u=kf,a=jn,d=ui(),h=F0();return Ki=function(c){return new Promise(function(w,E){var M=c.data,f=c.headers,p=c.responseType,m;function _(){c.cancelToken&&c.cancelToken.unsubscribe(m),c.signal&&c.signal.removeEventListener("abort",m)}e.isFormData(M)&&e.isStandardBrowserEnv()&&delete f["Content-Type"];var g=new XMLHttpRequest;if(c.auth){var L=c.auth.username||"",S=c.auth.password?unescape(encodeURIComponent(c.auth.password)):"";f.Authorization="Basic "+btoa(L+":"+S)}var C=l(c.baseURL,c.url);g.open(c.method.toUpperCase(),r(C,c.params,c.paramsSerializer),!0),g.timeout=c.timeout;function z(){if(!!g){var H="getAllResponseHeaders"in g?i(g.getAllResponseHeaders()):null,ce=!p||p==="text"||p==="json"?g.responseText:g.response,ve={data:ce,status:g.status,statusText:g.statusText,headers:H,config:c,request:g};t(function(Mt){w(Mt),_()},function(Mt){E(Mt),_()},ve),g=null}}if("onloadend"in g?g.onloadend=z:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(z)},g.onabort=function(){!g||(E(new a("Request aborted",a.ECONNABORTED,c,g)),g=null)},g.onerror=function(){E(new a("Network Error",a.ERR_NETWORK,c,g,g)),g=null},g.ontimeout=function(){var ce=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",ve=c.transitional||u;c.timeoutErrorMessage&&(ce=c.timeoutErrorMessage),E(new a(ce,ve.clarifyTimeoutError?a.ETIMEDOUT:a.ECONNABORTED,c,g)),g=null},e.isStandardBrowserEnv()){var O=(c.withCredentials||o(C))&&c.xsrfCookieName?n.read(c.xsrfCookieName):void 0;O&&(f[c.xsrfHeaderName]=O)}"setRequestHeader"in g&&e.forEach(f,function(ce,ve){typeof M>"u"&&ve.toLowerCase()==="content-type"?delete f[ve]:g.setRequestHeader(ve,ce)}),e.isUndefined(c.withCredentials)||(g.withCredentials=!!c.withCredentials),p&&p!=="json"&&(g.responseType=c.responseType),typeof c.onDownloadProgress=="function"&&g.addEventListener("progress",c.onDownloadProgress),typeof c.onUploadProgress=="function"&&g.upload&&g.upload.addEventListener("progress",c.onUploadProgress),(c.cancelToken||c.signal)&&(m=function(H){!g||(E(!H||H&&H.type?new d:H),g.abort(),g=null)},c.cancelToken&&c.cancelToken.subscribe(m),c.signal&&(c.signal.aborted?m():c.signal.addEventListener("abort",m))),M||(M=null);var j=h(C);if(j&&["http","https","file"].indexOf(j)===-1){E(new a("Unsupported protocol "+j+":",a.ERR_BAD_REQUEST,c));return}g.send(M)})},Ki}var qi,Ls;function A0(){return Ls||(Ls=1,qi=null),qi}var ne=se,Os=E0,Ts=jn,M0=kf,I0=xf,U0={"Content-Type":"application/x-www-form-urlencoded"};function zs(e,t){!ne.isUndefined(e)&&ne.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function j0(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Rs()),e}function $0(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var ai={transitional:M0,adapter:j0(),transformRequest:[function(t,n){if(Os(n,"Accept"),Os(n,"Content-Type"),ne.isFormData(t)||ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return zs(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r=ne.isObject(t),l=n&&n["Content-Type"],i;if((i=ne.isFileList(t))||r&&l==="multipart/form-data"){var o=this.env&&this.env.FormData;return I0(i?{"files[]":t}:t,o&&new o)}else if(r||l==="application/json")return zs(n,"application/json"),$0(t);return t}],transformResponse:[function(t){var n=this.transitional||ai.transitional,r=n&&n.silentJSONParsing,l=n&&n.forcedJSONParsing,i=!r&&this.responseType==="json";if(i||l&&ne.isString(t)&&t.length)try{return JSON.parse(t)}catch(o){if(i)throw o.name==="SyntaxError"?Ts.from(o,Ts.ERR_BAD_RESPONSE,this,null,this.response):o}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A0()},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ne.forEach(["delete","get","head"],function(t){ai.headers[t]={}});ne.forEach(["post","put","patch"],function(t){ai.headers[t]=ne.merge(U0)});var ra=ai,B0=se,V0=ra,H0=function(t,n,r){var l=this||V0;return B0.forEach(r,function(o){t=o.call(l,t,n)}),t},Xi,Ds;function Cf(){return Ds||(Ds=1,Xi=function(t){return!!(t&&t.__CANCEL__)}),Xi}var Fs=se,Yi=H0,W0=Cf(),Q0=ra,K0=ui();function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K0}var q0=function(t){Ji(t),t.headers=t.headers||{},t.data=Yi.call(t,t.data,t.headers,t.transformRequest),t.headers=Fs.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Fs.forEach(["delete","get","head","post","put","patch","common"],function(l){delete t.headers[l]});var n=t.adapter||Q0.adapter;return n(t).then(function(l){return Ji(t),l.data=Yi.call(t,l.data,l.headers,t.transformResponse),l},function(l){return W0(l)||(Ji(t),l&&l.response&&(l.response.data=Yi.call(t,l.response.data,l.response.headers,t.transformResponse))),Promise.reject(l)})},Pe=se,Nf=function(t,n){n=n||{};var r={};function l(h,v){return Pe.isPlainObject(h)&&Pe.isPlainObject(v)?Pe.merge(h,v):Pe.isPlainObject(v)?Pe.merge({},v):Pe.isArray(v)?v.slice():v}function i(h){if(Pe.isUndefined(n[h])){if(!Pe.isUndefined(t[h]))return l(void 0,t[h])}else return l(t[h],n[h])}function o(h){if(!Pe.isUndefined(n[h]))return l(void 0,n[h])}function u(h){if(Pe.isUndefined(n[h])){if(!Pe.isUndefined(t[h]))return l(void 0,t[h])}else return l(void 0,n[h])}function a(h){if(h in n)return l(t[h],n[h]);if(h in t)return l(void 0,t[h])}var d={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return Pe.forEach(Object.keys(t).concat(Object.keys(n)),function(v){var c=d[v]||i,y=c(v);Pe.isUndefined(y)&&c!==a||(r[v]=y)}),r},Gi,As;function Pf(){return As||(As=1,Gi={version:"0.27.2"}),Gi}var X0=Pf().version,mt=jn,la={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){la[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Ms={};la.transitional=function(t,n,r){function l(i,o){return"[Axios v"+X0+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return function(i,o,u){if(t===!1)throw new mt(l(o," has been removed"+(n?" in "+n:"")),mt.ERR_DEPRECATED);return n&&!Ms[o]&&(Ms[o]=!0,console.warn(l(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,u):!0}};function Y0(e,t,n){if(typeof e!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),l=r.length;l-- >0;){var i=r[l],o=t[i];if(o){var u=e[i],a=u===void 0||o(u,i,e);if(a!==!0)throw new mt("option "+i+" must be "+a,mt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new mt("Unknown option "+i,mt.ERR_BAD_OPTION)}}var J0={assertOptions:Y0,validators:la},Rf=se,G0=gf,Is=k0,Us=q0,si=Nf,Z0=Ef,Lf=J0,an=Lf.validators;function An(e){this.defaults=e,this.interceptors={request:new Is,response:new Is}}An.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=si(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&Lf.assertOptions(r,{silentJSONParsing:an.transitional(an.boolean),forcedJSONParsing:an.transitional(an.boolean),clarifyTimeoutError:an.transitional(an.boolean)},!1);var l=[],i=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(i=i&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});var o=[];this.interceptors.response.forEach(function(y){o.push(y.fulfilled,y.rejected)});var u;if(!i){var a=[Us,void 0];for(Array.prototype.unshift.apply(a,l),a=a.concat(o),u=Promise.resolve(n);a.length;)u=u.then(a.shift(),a.shift());return u}for(var d=n;l.length;){var h=l.shift(),v=l.shift();try{d=h(d)}catch(c){v(c);break}}try{u=Us(d)}catch(c){return Promise.reject(c)}for(;o.length;)u=u.then(o.shift(),o.shift());return u};An.prototype.getUri=function(t){t=si(this.defaults,t);var n=Z0(t.baseURL,t.url);return G0(n,t.params,t.paramsSerializer)};Rf.forEach(["delete","get","head","options"],function(t){An.prototype[t]=function(n,r){return this.request(si(r||{},{method:t,url:n,data:(r||{}).data}))}});Rf.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,u){return this.request(si(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}An.prototype[t]=n(),An.prototype[t+"Form"]=n(!0)});var b0=An,Zi,js;function em(){if(js)return Zi;js=1;var e=ui();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(o){r=o});var l=this;this.promise.then(function(i){if(!!l._listeners){var o,u=l._listeners.length;for(o=0;o{e(!0),zr.get("http://95.85.124.41:8080/posts"+(n||"")).then(r=>{t(r.data.data)}).catch(r=>{}).finally(()=>e(!1))},um=(e,t,n,r)=>{zr.delete(`http://95.85.124.41:8080/link/delete/${r}`).then(l=>{e(!0),n({...t,success:!0,pop:!0}),setTimeout(()=>{n({...t,pop:!1})},2e3)}).catch(l=>{e(!1),n({...t,success:!1,pop:!0}),setTimeout(()=>{n({...t,pop:!1})},2e3)})},ci=e=>{zr.get("http://95.85.124.41:8080/links/all").then(t=>{e(t.data.data)}).catch(t=>{})},am=(e,t,n,r,l)=>{zr.post("http://95.85.124.41:8080/link/create",{name:n.name,source:n.source}).then(i=>{t({...e,success:!0,pop:!0}),r(),setTimeout(()=>{t({...e,pop:!1}),l()},2e3)}).catch(i=>{t({...e,success:!1,pop:!0}),setTimeout(()=>{t({...e,pop:!1})},2e3)})},sm=(e,t,n,r,l,i)=>{zr.put(`http://95.85.124.41:8080/link/update/${l}`,i).then(o=>{t({...e,success:!0,pop:!0}),n(),setTimeout(()=>{t({...e,pop:!1}),r()},2e3)}).catch(o=>{t({...e,success:!1,pop:!0}),setTimeout(()=>{t({...e,pop:!1})},2e3)})},pe=e=>{const t=e.toString().split("T"),n=t[0];let r,l;return t[1].includes(".")?(r=t[1].split("."),l=r[0]):(r=t[1],l=r.slice(0,r.length-1)),[n,l]},cm="/assets/loader.2016aa78.svg",dm=()=>s("div",{className:"loader",children:s("div",{className:"loader inner",children:s("img",{src:cm,alt:""})})}),fm=()=>{const[e,t]=N.exports.useState(!1),n=N.exports.useContext(et),{posts:r,setPosts:l}=n.postValue,{sources:i}=n.sourceValue,[o,u]=N.exports.useState(""),[a,d]=N.exports.useState("id"),[h,v]=N.exports.useState({perPage:10,pageNumber:1}),[c,y]=N.exports.useState({id:"desc",title:"asc",link:"asc",date:"asc",published:"asc",created:"asc",updated:"asc"}),[w,E]=N.exports.useState({fil_title:{name:"fil_title",value:""},fil_link:{name:"fil_link",value:""},fil_publish_date:{name:"fil_publish_date",value:""},fil_summary:{name:"fil_summary",value:""},fil_createdAt:{name:"fil_createdAt",value:""},fil_updatedAt:{name:"fil_updatedAt",value:""}}),M=N.exports.useCallback(()=>{let f="";return Object.keys(w).map(m=>{const _=m;w[_].value.length>0&&(f=f+`&${w[_].name}=${w[_].value}`)}),f},[w,E]);return N.exports.useEffect(()=>{const f=M();om(t,l,`?sortBy=${a}.${c[a]}&category=${o}&strLimit=${h.perPage}&strOffset=${h.pageNumber}${f}`)},[c,a,h,o,w]),s("main",{className:"posts",children:s("div",{className:"container",children:x("div",{className:"posts inner",children:[x("div",{className:"dashboard__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(df,{className:"dashboard__img"})}),s("h1",{children:"Posts"})]}),x("div",{className:"posts__select__wrapper",children:[x("div",{className:"posts__select",children:[s("label",{htmlFor:"category",children:"Source"}),x("select",{id:"category",value:o,onChange:f=>{f.target.value==="All"?u(""):u(f.target.value)},children:[s("option",{value:"All",defaultChecked:!0,children:"All"}),i?i.map(f=>s("option",{value:f.name,children:f.name},$l())):""]})]}),x("div",{className:"posts__select",children:[s("label",{htmlFor:"pp",children:"Per page"}),x("select",{id:"pp",value:h.perPage,onChange:f=>{v({...h,perPage:parseInt(f.target.value)})},children:[s("option",{value:"10",defaultChecked:!0,children:"10"}),s("option",{value:"15",children:"15"}),s("option",{value:"20",children:"20"}),s("option",{value:"30",children:"30"}),s("option",{value:"40",children:"40"}),s("option",{value:"60",children:"60"}),s("option",{value:"80",children:"80"}),s("option",{value:"100",children:"100"})]})]}),s("div",{className:"posts__select posts__reset__btn",children:s("button",{className:"posts__reset",onClick:()=>{u(""),v({perPage:10,pageNumber:1}),E({fil_title:{name:"fil_title",value:""},fil_link:{name:"fil_link",value:""},fil_publish_date:{name:"fil_publish_date",value:""},fil_summary:{name:"fil_summary",value:""},fil_createdAt:{name:"fil_createdAt",value:""},fil_updatedAt:{name:"fil_updatedAt",value:""}})},children:"Reset"})})]}),x("table",{className:e?"posts__table disabled":"posts__table",children:[x("thead",{children:[x("tr",{className:"posts__table__head",children:[x("th",{className:a==="id"?"active":"",onClick:()=>{d("id"),c.id!=="asc"?y({...c,id:"asc"}):y({...c,id:"desc"})},children:[a==="id"&&c.id==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="id"&&c.id==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"ID"})]}),s("th",{className:a==="category"?"active":"",children:s("span",{children:"Source"})}),x("th",{className:a==="title"?"active":"",onClick:()=>{d("title"),c.title!=="asc"?y({...c,title:"asc"}):y({...c,title:"desc"})},children:[a==="title"&&c.title==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="title"&&c.title==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Title"})]}),x("th",{className:a==="link"?"active":"",onClick:()=>{d("link"),c.link!=="asc"?y({...c,link:"asc"}):y({...c,link:"desc"})},children:[a==="link"&&c.link==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="link"&&c.link==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Link"})]}),x("th",{className:a==="published"?"active":"",onClick:()=>{d("published"),c.published!=="asc"?y({...c,published:"asc"}):y({...c,published:"desc"})},children:[a==="published"&&c.published==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="published"&&c.published==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Published"})]}),x("th",{className:a==="created"?"active":"",onClick:()=>{d("created"),c.created!=="asc"?y({...c,created:"asc"}):y({...c,created:"desc"})},children:[a==="created"&&c.created==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="created"&&c.created==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Created"})]}),x("th",{className:a==="updated"?"active":"",onClick:()=>{d("updated"),c.updated!=="asc"?y({...c,updated:"asc"}):y({...c,updated:"desc"})},children:[a==="updated"&&c.updated==="asc"?s(F.Provider,{value:{color:"#00785a"},children:s(on,{})}):null,a==="updated"&&c.updated==="desc"?s(F.Provider,{value:{color:"#00785a"},children:s(ln,{})}):null,s("span",{children:"Updated"})]})]}),x("tr",{className:"posts__table__head posts__table__head--inputs",children:[s("th",{}),s("th",{}),s("th",{children:s("input",{placeholder:"Filter by title",id:"filter-title",type:"text",value:w.fil_title.value,onChange:f=>E({...w,fil_title:{...w.fil_title,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by link",id:"filter-link",type:"text",value:w.fil_link.value,onChange:f=>E({...w,fil_link:{...w.fil_link,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by published",id:"filter-published",type:"date",value:w.fil_publish_date.value,onChange:f=>E({...w,fil_publish_date:{...w.fil_publish_date,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by created",id:"filter-created",type:"date",value:w.fil_createdAt.value,onChange:f=>E({...w,fil_createdAt:{...w.fil_createdAt,value:f.target.value}})})}),s("th",{children:s("input",{placeholder:"Filter by updated",id:"filter-updated",type:"date",value:w.fil_updatedAt.value,onChange:f=>E({...w,fil_updatedAt:{...w.fil_updatedAt,value:f.target.value}})})})]})]}),x("tbody",{children:[e?s(dm,{}):null,r?r.length>0?r[0].id!==-1?r.map(f=>s(gt,{className:"post-link",to:`/posts/${f.id}`,children:x("tr",{children:[s("td",{children:f.id}),s("td",{children:f.category}),s("td",{children:f.title}),s("td",{children:s("a",{href:f.link,target:"_blank",rel:"noopener noreferrer",children:s(pf,{})})}),s("td",{children:`${pe(f.publish_date)[0]}, ${pe(f.publish_date)[1]}`}),s("td",{children:`${pe(f.createdAt)[0]}, ${pe(f.createdAt)[1]}`}),s("td",{children:`${pe(f.updatedAt)[0]}, ${pe(f.updatedAt)[1]}`})]})},$l())):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})}):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})}):s("tr",{children:s("td",{className:"table__empty",colSpan:7,children:"No posts"})})]})]}),x("div",{className:"posts__pagination",children:[s("button",{type:"button",disabled:h.pageNumber===1,onClick:()=>v({...h,pageNumber:h.pageNumber-1}),children:"Previous"}),s("input",{type:"text",value:h.pageNumber,readOnly:!0}),s("button",{disabled:!r,type:"button",onClick:()=>v({...h,pageNumber:h.pageNumber+1}),children:"Next"})]})]})})})},pm=()=>{const{user:e}=N.exports.useContext(Tr);return s("main",{className:"details",children:s("div",{className:"container",children:x("div",{className:"details inner",children:[x("div",{className:"dashboard__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(cf,{className:"dashboard__img"})}),s("h1",{children:"Details"})]}),s("div",{className:"details__content",children:x("form",{className:"details__data",children:[x("div",{className:"details__data__block",children:[s("label",{htmlFor:"user",children:"Username"}),s("input",{type:"text",id:"user",value:e.username,readOnly:!0})]}),x("div",{className:"details__data__block",children:[s("label",{htmlFor:"access",children:"Access"}),s("input",{type:"text",id:"access",value:e.accessLevel,readOnly:!0})]})]})})]})})})},hm=e=>e.charAt(0).toUpperCase()+e.slice(1),mm=()=>{const[e,t]=N.exports.useState(),{posts:n}=N.exports.useContext(et).postValue,{id:r}=tc();return N.exports.useEffect(()=>{n&&n[0].id!==-1&&n.map(l=>{l.id.toString()===r&&t(l)})},[n]),s("main",{className:"post",children:s("div",{className:"container",children:x("div",{className:"post inner",children:[x("div",{className:"dashboard__head post__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(A1,{className:"dashboard__img"})}),s("h1",{className:"post__head",children:e?e.title:""})]}),x("div",{className:"post__content",children:[x("div",{className:"post__content__block",children:[s("h4",{children:"ID"}),s("input",{type:"text",readOnly:!0,value:e?e.id:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Category"}),s("input",{type:"text",readOnly:!0,value:e?hm(e.category.toLowerCase()):""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Title"}),s("input",{type:"text",readOnly:!0,value:e?e.title:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Date"}),s("input",{type:"text",readOnly:!0,value:e?`${pe(e.publish_date)[0]}, ${pe(e.publish_date)[1]}`:""})]}),x("div",{className:"post__content__block",children:[s("h4",{children:"Summary"}),s("textarea",{readOnly:!0,rows:5,value:e?e.summary:""})]}),x("a",{className:"post__content__btn",href:e?e.link:"",target:"_blank",rel:"noopener noreferrer",children:[s(F.Provider,{value:{color:"#FFFFFF"},children:s(pf,{})}),s("span",{children:"Link"})]}),e&&e.HistoryList.length>0?x("div",{className:"post__content__block post__content__table",children:[s("h2",{children:"History List"}),x("table",{children:[s("thead",{children:x("tr",{children:[s("th",{children:"Post ID"}),s("th",{children:"Old published"}),s("th",{children:"New published"}),s("th",{children:"Created"}),s("th",{children:"Updated"})]})}),s("tbody",{children:e&&e.HistoryList.length>0?e.HistoryList.map(l=>x("tr",{children:[s("td",{children:l.PostID}),s("td",{children:`${pe(l.old_published_at)[0]}, ${pe(l.old_published_at)[1]}`}),s("td",{children:`${pe(l.new_published_at)[0]}, ${pe(l.new_published_at)[1]}`}),s("td",{children:`${pe(l.createdAt)[0]}, ${pe(l.createdAt)[1]}`}),s("td",{children:`${pe(l.updatedAt)[0]}, ${pe(l.updatedAt)[1]}`})]},$l())):""})]})]}):""]})]})})})},vm=()=>{const{sources:e,setSources:t}=N.exports.useContext(et).sourceValue,{popup:n,setPopup:r}=N.exports.useContext(et).popupValue,[l,i]=N.exports.useState(!1);return N.exports.useEffect(()=>{l&&setTimeout(()=>{i(!1),ci(t)},2e3)},[l,i]),s("main",{className:"category",children:s("div",{className:"container",children:x("div",{className:"category inner",children:[x("div",{className:"dashboard__head category__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(sf,{})}),s("h1",{children:"Source"})]}),x("div",{className:"category__table__wrapper",children:[s("h3",{children:"All sources"}),x("table",{className:"category__table",children:[s("thead",{children:x("tr",{className:"category__table__head",children:[s("th",{children:"ID"}),s("th",{children:"Name"}),s("th",{children:"Source"}),s("th",{children:"Actions"})]})}),s("tbody",{children:e?e.map(o=>x("tr",{children:[s("td",{children:o.id}),s("td",{children:o.name}),s("td",{className:"category__table__tab",children:o.source}),x("td",{className:"source-action",children:[s("div",{className:"source-action__block",children:x(gt,{to:`/source/edit/${o.id}`,children:[s("span",{children:"Edit"}),s(F.Provider,{value:{color:"#8DD77F"},children:s(ff,{})})]})}),s("div",{className:"source-action__block",children:x("button",{onClick:()=>{um(i,n,r,o.id)},children:[s("span",{children:"Delete"}),s(F.Provider,{value:{color:"#8DD77F"},children:s(j1,{})})]})})]})]},$l())):x("tr",{children:[s("td",{}),s("td",{}),s("td",{})]})})]})]}),x(gt,{to:"/source/create",className:"source__link",children:[s(Ju,{}),s("span",{children:"Create source"})]})]})})})},ym=()=>{const e=Hl(),{sources:t,setSources:n}=N.exports.useContext(et).sourceValue,{popup:r,setPopup:l}=N.exports.useContext(et).popupValue,[i,o]=N.exports.useState();N.exports.useEffect(()=>{t&&t.map(h=>{h.id.toString()===u&&o(h)})},[t]);const{id:u}=tc(),[a,d]=N.exports.useState({name:"",source:""});return s("main",{className:"source-edit",children:s("div",{className:"container",children:x("div",{className:"source-edit inner",children:[x("div",{className:"dashboard__head source-edit__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(ff,{className:"dashboard__img"})}),s("h1",{children:"Edit source"})]}),s("div",{className:"source-edit__content",children:x("form",{onSubmit:h=>{h.preventDefault()},children:[x("div",{className:"source-edit__info",children:[s("h2",{children:"Information"}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"id",children:"Source ID"}),s("input",{readOnly:!0,type:"text",id:"id",value:i?i.id:""})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"name",children:"Source old name"}),s("input",{readOnly:!0,type:"text",id:"name",value:i?i.name:""})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"source",children:"Source old link"}),s("input",{readOnly:!0,type:"text",id:"source",value:i?i.source:""})]})]}),x("div",{className:"source-edit__content",children:[s("h2",{children:"Edit"}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"new_name",children:"Source new name"}),s("input",{placeholder:"Enter new name",type:"text",id:"new_name",value:a.name,onChange:h=>{d({...a,name:h.target.value})}})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"new_source",children:"Source new link"}),s("input",{placeholder:"Enter new link",type:"text",id:"new_source",value:a.source,onChange:h=>{d({...a,source:h.target.value})}})]})]}),s("button",{disabled:!(a.name.length>0&&a.source.length>0),className:"source-edit__submit",onClick:()=>{sm(r,l,()=>e("/source"),()=>ci(n),u?parseInt(u):0,a)},children:"Update source"})]})})]})})})},gm=()=>{const{setSources:e}=N.exports.useContext(et).sourceValue,{popup:t,setPopup:n}=N.exports.useContext(et).popupValue,r=Hl(),[l,i]=N.exports.useState({name:"",source:""});return s("main",{className:"source__create",children:s("div",{className:"container",children:x("div",{className:"source__create inner",children:[x("div",{className:"dashboard__head source__head",children:[s(F.Provider,{value:{color:"#8DD77F"},children:s(Ju,{})}),s("h1",{children:"Create source"})]}),x("form",{onSubmit:o=>o.preventDefault(),className:"source__create__block",children:[x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"name",children:"Source name"}),s("input",{placeholder:"Enter name",type:"text",id:"name",value:l.name,onChange:o=>{i({...l,name:o.target.value})}})]}),x("div",{className:"source-edit__input",children:[s("label",{htmlFor:"source",children:"Source link"}),s("input",{placeholder:"Enter link",type:"text",id:"source",value:l.source,onChange:o=>{i({...l,source:o.target.value})}})]}),s("button",{disabled:!(l.name.length>0&&l.source.length>0),className:"source-edit__submit",onClick:()=>{am(t,n,l,()=>r("/source"),()=>ci(e))},children:"Create new source"})]})]})})})},_m=()=>{const e=Hl(),[t,n]=N.exports.useState(),[r,l]=N.exports.useState({success:!1,pop:!1,message:{success:"Success",failure:"Failure"}}),[i,o]=N.exports.useState(),[u,a]=N.exports.useState({username:"",accessLevel:""});N.exports.useEffect(()=>{const y=localStorage.getItem("userData");y&&a(JSON.parse(y))},[]);const d=N.exports.useMemo(()=>({user:u,setUser:a}),[u,a]),h=N.exports.useMemo(()=>({posts:t,setPosts:n}),[t,n]),v=N.exports.useMemo(()=>({popup:r,setPopup:l}),[r,l]),c=N.exports.useMemo(()=>({sources:i,setSources:o}),[i,o]);return N.exports.useEffect(()=>{u.username?e(localStorage.getItem("lastLocation")||"/posts"):e("/login")},[u]),N.exports.useEffect(()=>{ci(o)},[]),s(et.Provider,{value:{postValue:h,sourceValue:c,popupValue:v},children:s(Tr.Provider,{value:d,children:x("div",{className:"App",children:[s(H1,{}),x(gp,{children:[s(tt,{path:"/",element:s(jt,{})}),s(tt,{path:"/posts",element:s(jt,{child:s(fm,{})})}),s(tt,{path:"/source",element:s(jt,{child:s(vm,{})})}),s(tt,{path:"/source/edit/:id",element:s(jt,{child:s(ym,{})})}),s(tt,{path:"/posts/:id",element:s(jt,{child:s(mm,{})})}),s(tt,{path:"/source/create",element:s(jt,{child:s(gm,{})})}),s(tt,{path:"/user_details",element:s(jt,{child:s(pm,{})})}),s(tt,{path:"/login",element:s(W1,{})})]})]})})})};lo.createRoot(document.getElementById("root")).render(s(hl.StrictMode,{children:s(Sp,{children:s(_m,{})})}));
diff --git a/dist/assets/index.67915d38.css b/dist/assets/index.67915d38.css
new file mode 100644
index 0000000..f824297
--- /dev/null
+++ b/dist/assets/index.67915d38.css
@@ -0,0 +1 @@
+@import"https://fonts.googleapis.com/css2?family=Lato&display=swap";*{font-family:Lato,sans-serif;margin:0;padding:0;box-sizing:border-box;scroll-behavior:smooth}.container{width:100%;padding:0 5rem;max-width:100%;margin:0 auto;height:100%}html{font-size:62.5%;height:100%}body{background-color:#222831;position:relative}body,#root,.App{height:100%}ul{list-style-type:none}input,button{background:none;outline:none;border:none}button:disabled{background:#d4d4d4!important;border:none!important;cursor:not-allowed!important}a{text-decoration:none}a,h1,h2,h3,h4,h5,h6,span,label,input,textarea,p{color:#f2f2f2}.green{color:#2fad8c;font-size:1.6rem;font-weight:700}.red{color:red;font-size:1.6rem;font-weight:700}input,textarea,select{transition:.1s all ease;border:.1rem #f2f2f2 solid;outline:#2fad8c 0rem solid}input:focus,textarea:focus,select:focus{transition:.1s all ease;border:.1rem #393e46 solid;outline:#2fad8c .3rem solid}input[type=date]::-webkit-calendar-picker-indicator{color:#0000;opacity:1;display:block;background:url(/assets/calendar.a859ae72.svg) no-repeat;border-width:thin}::-webkit-scrollbar{width:1rem}::-webkit-scrollbar-track{background:#c9fce9}::-webkit-scrollbar-thumb{background:#2fad8c}::-webkit-scrollbar-thumb:hover{background:#268a6f}.login{height:100%}.login.inner{display:flex;align-items:center;justify-content:center}.login__wrapper{display:flex;flex-direction:column;gap:2.4rem}.login__header{text-align:center;font-size:2.8rem}.login__form{min-width:35rem;background:#393e46;padding:3.5rem;border:1px solid #222831;border-radius:.5rem;display:flex;flex-direction:column;gap:1.6rem}.login__form__error{overflow:hidden;height:0;color:red;font-size:1.4rem;font-weight:700;transition:.3s all ease}.login__form__error.active{transition:.3s all ease;height:2rem}.login__form__button{border-radius:.5rem;cursor:pointer;width:100%;padding:.6rem 1.2rem;color:#fff;font-size:1.6rem}.login__form__button--violet{background-color:#2fad8c;border:.1rem solid #2fad8c;transition:.3s all ease}.login__form__button--violet:hover{transition:.3s all ease;background-color:#268a6f;border:.1rem solid #268a6f}.login__form__block{display:flex;flex-direction:column;gap:.8rem}.login__form__block label{font-size:1.6rem}.login__form__block input{font-size:1.6rem;padding:.6rem 1.2rem;border-radius:.5rem}.login__form__block--check label{font-size:1.6rem;display:flex;align-items:center;gap:.6rem}.nav__dropdown{background:#393e46;z-index:5;border-radius:1rem;width:100%;opacity:0;overflow:hidden;position:absolute;transition:.3s all ease;top:calc(100% + 1rem);left:0;height:0;border:.1rem solid #222831}.nav__dropdown.active{height:14.7rem;opacity:1;transition:.3s all ease}.nav__dropdown__wrapper{display:flex;flex-direction:column}.nav__dropdown__wrapper li{display:flex;flex-direction:column;gap:.2rem}.nav__dropdown__wrapper li:nth-child(2n){padding-bottom:1rem}.nav__left{display:flex;align-items:center;justify-content:flex-start;gap:5%}.nav__right{justify-self:flex-end;max-width:10rem;display:flex;align-items:center}.nav__right__user{cursor:pointer;position:relative;background:#393e46;border:.1rem solid #222831;border-radius:1rem;padding:1rem;display:flex;align-items:center;gap:1.6rem;transition:.3s all ease}.nav__right__user:hover{transition:.3s all ease;border:.1rem solid #393e46;background:#222831}.nav__right__user button{border-top:.1rem solid #c8c8c8;padding:1rem 1rem .5rem;cursor:pointer;color:#25acda}.nav__right__user span{font-size:1.6rem}.nav__right__user p{font-size:1.2rem;padding:0 1rem}.nav__right__user__img{width:3rem;height:3rem}.nav__right__user__img img{width:3rem;height:3rem;object-fit:contain}.nav__right__user h2,.nav__right__user h3{padding:1rem 1rem .5rem;width:100%;font-size:1.4rem}.nav.inner{display:grid;grid-template-columns:1fr 1fr;gap:3rem;padding:2rem 0}.nav__img{width:7rem;height:5rem}.nav__img svg{width:7rem;height:5rem}.nav__btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:4.8rem;height:3.2rem;padding:.4rem 0;border:.1rem solid #393e46;border-radius:.5rem;transition:.3s all ease}.nav__btn img{width:4.8rem;height:3.2rem;object-fit:contain}.nav__btn:active{transition:.3s all ease;border:.3rem solid #393e46}.main__mid{padding:3rem 0;display:grid;grid-template-columns:auto 1fr}.aside{transition:.3s all ease;overflow:hidden;max-width:0;width:100%}.aside__img{width:3rem;height:3rem}.aside.active{max-width:25rem;transition:.3s all ease}.aside__list{width:100%;padding:1rem;display:flex;flex-direction:column;gap:1rem;background:#393e46}.aside__list__element{min-width:13.12rem;transition:.3s all ease;background:transparent;display:flex;gap:1.5rem;align-items:center;font-size:1.6rem;cursor:pointer}.aside__list__element a,.aside__list__element div{display:flex;align-items:center;justify-content:flex-start;gap:1.4rem;width:100%;padding:.8rem .4rem .8rem 1.2rem}.aside__list__element:hover{transition:.3s all ease;background:#222831}.aside__list__element__img{width:2rem;height:2rem}.aside__list__element__img img{width:2rem;height:2rem;object-fit:contain}.aside__list__element--title{cursor:default!important;background:transparent!important;font-size:1.4rem}.aside__list__element--title:not(:first-child){padding-top:1rem;margin-top:1rem}.aside__list__element--title svg{width:3rem;height:3rem}.posts__pagination{width:100%;display:flex;gap:3rem;align-items:center;justify-content:flex-end}.posts__pagination input{border-radius:.5rem;border:none!important;width:5%;text-align:center;font-weight:700}.posts__pagination button{transition:.3s all ease;cursor:pointer;color:#f2f2f2;font-size:1.6rem;width:15%;padding:1rem 2rem;border-radius:.5rem;background:#2fad8c}.posts__pagination button:hover{transition:.3s all ease;background:#268a6f}.posts__select{display:flex;flex-direction:column;gap:.8rem}.posts__select label{display:flex;gap:.8rem;font-size:1.4rem}.posts__select input{background:#393e46;color:#f2f2f2;font-size:1.6rem;padding:1rem 1.2rem;border-radius:.2rem;cursor:default;border-radius:.5rem}.posts__select__wrapper{display:flex;gap:1rem}.posts select{padding:1rem 1.2rem;color:#f2f2f2;background:#393e46;border-radius:.5rem}.posts.inner{display:flex;flex-direction:column;gap:4rem}.posts__table.disabled{pointer-events:none}.posts__table__head{min-height:unset!important;background:#393e46}.posts__table th{padding:.3rem;display:flex;align-items:center;justify-content:center;gap:.6rem;cursor:pointer;width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;transition:.3s all ease}.posts__table th input{padding:1rem 2rem;width:100%}.posts__table th span{width:100%;color:#f2f2f2;transition:.3s all ease}.posts__table th.active{background:#c9fce9;transition:.3s all ease}.posts__table th.active span{color:#222831;transition:.3s all ease}.posts__table .post-link{background:#222831}.posts__table .post-link:nth-child(2n){background:#c9fce9}.posts__table .post-link:nth-child(2n) td{color:#393e46}.posts__table .post-link:nth-child(2n) td svg{fill:#222831}.posts__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr 2fr 2.5fr 2fr 2.5fr 2.5fr 2.5fr;gap:1rem}.posts__table td{color:#f2f2f2;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.posts__table td a{width:100%;display:flex;align-items:center;justify-content:center}.posts__table td svg{width:2rem;height:2rem}.posts__table tbody{min-height:20rem;position:relative;display:flex;flex-direction:column}.posts__reset{color:#fff;max-width:30rem;font-size:1.6rem;border-radius:.5rem;background:#2fad8c;padding:.5rem 2rem;text-align:center;height:67%;min-width:20rem;cursor:pointer;transition:.3s all ease}.posts__reset:hover{transition:.3s all ease;background-color:#268a6f;border:.1rem solid #268a6f}.posts__reset__btn{display:flex;flex-direction:row;align-items:flex-end}.post{padding-bottom:4rem}.post.inner{display:flex;flex-direction:column;gap:4rem}.post h1{font-size:2.4rem}.post__head svg{width:5rem;height:5rem}.post__content{display:flex;flex-direction:column;gap:3rem}.post__content__btn{display:flex;align-items:center;gap:1rem;border-radius:.2rem;cursor:pointer;width:100%;padding:1rem 1.2rem;color:#f2f2f2;font-size:1.6rem;background-color:#2fad8c;transition:.3s all ease}.post__content__btn:hover{transition:.3s all ease;background-color:#268a6f}.post__content input{font-size:1.6rem;padding:.6rem 1.2rem;border-radius:.5rem;cursor:default;background:#393e46}.post__content textarea{background:#393e46;cursor:default;padding:.6rem 1.2rem;resize:none;font-size:1.6rem;border-radius:.5rem}.post__content__block{display:flex;flex-direction:column;gap:.8rem}.post__content__block h4{font-size:1.6rem}.post__content__table thead tr{min-height:unset!important;background:#393e46}.post__content__table th{width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;color:#f2f2f2;transition:.3s all ease}.post__content__table tr{background:#222831}.post__content__table tr:nth-child(2n){background:#c9fce9}.post__content__table tr:nth-child(2n) td{color:#393e46}.post__content__table tr:nth-child(2n) td svg{fill:#222831}.post__content__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr repeat(4,2fr);gap:1rem}.post__content__table td{color:#f2f2f2;text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.post__content__table td a{width:100%;display:flex;align-items:center;justify-content:center}.post__content__table td svg{width:2rem;height:2rem}.post__content__table tbody{min-height:20rem;position:relative;display:flex;flex-direction:column}.table__empty{font-size:1.6rem;text-align:center}.details.inner{display:flex;flex-direction:column;gap:4rem}.details__data{display:grid;grid-template-columns:1fr 1fr;gap:3rem}.details__data__block{width:100%;display:flex;flex-direction:column;gap:.6rem}.details__data label{font-size:2rem}.details__data input{font-size:1.6rem;padding:1rem 1.2rem;border-radius:.5rem}.details__content,.category.inner{display:flex;flex-direction:column;gap:4rem}.category__head svg{width:4rem;height:4rem}.category th{cursor:pointer;width:100%;height:100%;text-align:center;font-size:1.6rem;justify-self:center;background:transparent;color:#f2f2f2;transition:.3s all ease}.category__form{display:flex;flex-direction:column;align-items:flex-start;gap:4rem}.category__form__block{width:100%;max-width:40rem;display:flex;flex-direction:column;gap:.6rem}.category__form__block label{font-size:2rem}.category__form__block input{padding:.7rem 1rem;border:.1rem solid #cccccc;border-radius:.5rem}.category__form button{display:flex;align-items:center;justify-content:center;gap:1rem;max-width:30rem;border-radius:.2rem;cursor:pointer;width:100%;padding:1rem 1.8rem;color:#fff;font-size:1.6rem;background-color:#7c69ef;border:.1rem solid #7c69ef;transition:.3s all ease}.category__form button:hover{transition:.3s all ease;background-color:#705ed6;border:.1rem solid #705ed6}.category__table__wrapper{display:flex;flex-direction:column;gap:1rem}.category__table__wrapper h3{font-size:2rem;font-weight:400}.category__table__head{cursor:default;min-height:unset!important;background:#393e46!important}.category__table tr{min-height:7rem;padding:1rem;display:grid;grid-template-columns:1fr 2fr 3fr 4fr;gap:1rem;color:#f2f2f2;background:#222831}.category__table tr:nth-child(2n){background:#c9fce9}.category__table tr:nth-child(2n) td{color:#393e46}.category__table tr:nth-child(2n) td svg{fill:#222831}.category__table tr:nth-child(2n) td span{color:#222831;font-weight:700}.category__table td{text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;justify-self:center;font-size:1.2rem;align-self:center}.category__table tbody{max-height:70vh;overflow-y:auto;display:flex;flex-direction:column}.source-action{display:flex;gap:1rem;align-items:center;justify-content:center}.source-action__block button,.source-action__block a{cursor:pointer;display:flex;align-items:center;gap:.6rem}.source-action__block svg{width:1.5rem;height:1.5rem}.source-action__block span{font-size:1.6rem}.source__link{display:flex;align-items:center;gap:1rem;max-width:30rem;font-size:1.6rem;border-radius:.5rem;background:#2fad8c;padding:1rem 2rem;transition:.3s all ease;text-align:center}.source__link:hover{background:#268a6f;transition:.3s all ease}.source__head svg{width:4rem;height:4rem}.source__create.inner,.source__create__block{display:flex;flex-direction:column;gap:4rem}.dashboard__head{display:flex;align-items:center;gap:1rem}.dashboard__head h1{font-size:3.2rem}.dashboard__head svg{width:4rem;height:4rem}.source-edit.inner,.source-edit__content form{display:flex;flex-direction:column;gap:4rem}.source-edit__info,.source-edit__content{display:flex;flex-direction:column;gap:3rem;padding:1rem}.source-edit__info h2,.source-edit__content h2{font-weight:400;font-size:3rem}.source-edit__input{color:#f2f2f2;display:flex;flex-direction:column;gap:.8rem;font-size:1.6rem}.source-edit__input input{font-size:1.6rem;background:#393e46;padding:.6rem 1.2rem;border-radius:.5rem}.source-edit__submit{font-size:1.6rem;cursor:pointer;color:#f2f2f2;border-radius:.5rem;background:#2fad8c;transition:.3s all ease;padding:1.6rem 1.2rem}.source-edit__submit:hover{transition:.3s all ease;background:#268a6f}.loader{z-index:20;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(255,255,255,.4)}.loader.inner{opacity:1}.loader.inner img{width:100%;height:100%;max-width:10rem;max-height:10rem}.popup{opacity:0;left:4rem;bottom:2rem;border-radius:.6rem;z-index:30;position:absolute;width:35rem;height:6rem;display:flex;align-items:center;gap:3rem;padding:1.6rem;background:#393e46;transition:.3s all ease}.popup__wrapper{pointer-events:none;top:0;left:0;position:absolute;overflow:hidden;height:100vh;width:100%}.popup__wrapper__inner{width:100%;height:100%;position:relative}.popup span{font-size:1.6rem}.popup svg{width:3rem;height:3rem}.popup.active{transition:.3s all ease;animation:slideIn 2s ease-in-out 0s 1 forwards}@keyframes slideIn{0%{transform:translateY(3rem)}25%{opacity:1;transform:translateY(0)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(3rem)}}
diff --git a/dist/index.html b/dist/index.html
index 67a99a7..ac8d951 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -5,8 +5,8 @@
Admin Panel
-
-
+
+