\n password recovery link:
link\n
"}),requestNewPassword:(e,t)=>Io.post("auth/set-new-password",{password:e,resetPasswordToken:t})},Lo={updateData:e=>Io.put("auth/me",e)},zo={_id:"",email:"test@gmail.com",rememberMe:!1,isAdmin:!1,name:"test name",verified:!1,publicCardPacksCount:0,created:"",updated:"",__v:0,token:"",tokenDeathTime:0,avatar:""},Fo=(e,t,n,r,o)=>({type:"PROFILE/SET_USER_DATA",payload:{email:e,name:n,publicCardPacksCount:r,avatar:o,_id:t}}),Do=(e,t)=>({type:"PROFILE/UPDATE_USER_DATA",payload:{name:e,avatar:t}}),Bo={isLoggedIn:!1,id:""},Uo=(e,t)=>({type:"LOGIN/SET-IS-LOGGED-IN",payload:{isLoggedIn:e,id:t}}),Vo=e=>async t=>{t(Ho("loading"));try{const n=await Mo.login(e);t(Uo(!0,n.data._id));const{email:r,_id:o,name:a,publicCardPacksCount:i,avatar:l}=n.data;t(Fo(r,o,a,i,l||null))}catch(n){t(qo(n.response.data.error))}finally{t(Ho("idle"))}},Wo={status:"idle",isInitialized:!1,error:null,success:null},Ho=e=>({type:"APP/CHANGE-APP-STATUS",status:e}),qo=e=>({type:"APP/SET_ERROR",payload:{error:e}}),Ko=e=>({type:"APP/SET_SUCCESS",payload:{success:e}}),Go=e.forwardRef((function(e,t){return(0,Pt.jsx)(Pr,{elevation:6,ref:t,variant:"filled",...e})})),Xo=()=>{const e=Bt((e=>e.app.error)),t=Dt(),n=(e,n)=>{"clickaway"===n&&t(qo(null)),t(qo(null))};return(0,Pt.jsx)(Oo,{spacing:2,sx:{width:"100%"},children:(0,Pt.jsx)(fo,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:!!e,autoHideDuration:4e3,onClose:n,children:(0,Pt.jsx)(Go,{onClose:n,severity:"error",sx:{width:"100%"},children:e})})})},Yo=e.forwardRef((function(e,t){return(0,Pt.jsx)(Pr,{elevation:6,ref:t,variant:"filled",...e})})),Qo=()=>{const e=Bt((e=>e.app.success)),t=Dt(),n=(e,n)=>{"clickaway"===n&&t(Ko(null)),t(Ko(null))};return(0,Pt.jsx)(Oo,{spacing:2,sx:{width:"100%"},children:(0,Pt.jsx)(fo,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:!!e,autoHideDuration:4e3,onClose:n,children:(0,Pt.jsx)(Yo,{onClose:n,severity:"success",sx:{width:"100%"},children:e})})})};const Jo=n.p+"static/media/404.aa7265ded0f63be5eb452c8795fa265f.svg",$o=()=>{const e=Ce();return(0,Pt.jsx)("div",{className:"notFound",children:(0,Pt.jsxs)("div",{className:"notFound__container",children:[(0,Pt.jsxs)("div",{className:"notFound__elems",children:[(0,Pt.jsx)("div",{className:"notFound__title",children:"Oops!"}),(0,Pt.jsx)("div",{className:"notFound__descr",children:"Sorry! Page not found!"}),(0,Pt.jsx)(Vt,{callBack:()=>{e("/")},title:"Back to home page",submit:!1})]}),(0,Pt.jsx)("img",{src:Jo,alt:"error"})]})})};var ea=n(7394);const ta=n.p+"static/media/noCover.c5e2206e6049433f39f2.png",na=e.memo((t=>{let{cover:n,question:r,cardTitleCover:o}=t;const[a,i]=(0,e.useState)(!1);return(0,Pt.jsxs)("div",{"data-testid":"cover",className:"cover",children:[n&&(0,Pt.jsx)("img",{"data-testid":"cover-img",src:a?ta:n,alt:"deckCover",className:o?"pack__cover-big":"pack__cover",onError:()=>{i(!0)}}),"no question"!==r?(0,Pt.jsx)("div",{className:"cut",children:r}):null]})})),ra={getCards:(e,t)=>Io.get("cards/card?cardsPack_id=".concat(e),{params:{...t}}),postCard:e=>Io.post("cards/card",{card:e}),deleteCard:e=>Io.delete("cards/card",{params:e}),updateCard:e=>Io.put("cards/card",{card:e}),gradeCard:e=>Io.put("cards/grade",e)},oa={getPacks:e=>Io.get("cards/pack",{params:{...e}}),addPack:e=>Io.post("cards/pack",{cardsPack:e}),deletePack:e=>Io.delete("cards/pack",{params:e}),updatePack:e=>Io.put("cards/pack",{cardsPack:e}),getPacksOfCertainUser:e=>Io.get("/cards/pack?user_id=".concat(e))};let aa=function(e){return e.ASC_USER_NAME="1user_name",e.DES_USER_NAME="0user_name",e.ASC_NAME="1name",e.DES_NAME="0name",e.ASC_CARDS_COUNT="1cardsCount",e.DES_CARDS_COUNT="0cardsCount",e.ASC_CREATED="1created",e.DES_CREATED="0created",e.ASC_UPDATE="1updated",e.DES_UPDATE="0updated",e}({});const ia={cards:[{_id:"",cardsPack_id:"",user_id:"",answer:"",question:"",grade:0,shots:0,questionImg:"",answerImg:"",answerVideo:"",questionVideo:"",comments:"n",type:"",rating:0,more_id:"",created:"",updated:"",__v:0,card_id:""}],packUserId:"",page:1,pageCount:7,cardsTotalCount:1,minGrade:0,maxGrade:6,token:"",tokenDeathTime:null,params:{cardQuestion:"",page:1,pageCount:7,sortCards:aa.DES_UPDATE,cardsPack_id:void 0}},la=(e,t)=>({type:"CARDS/SET-PAGINATION",page:e,pageCount:t}),sa=(e,t)=>async(n,r)=>{n(Ho("loading"));try{const o=r().cards.params,a=await ra.getCards(e,{...o,pageCount:t});n({type:"CARDS/SET_CARDS",payload:{...a.data}})}catch(o){n(qo(o.response.data.error))}finally{n(Ho("idle"))}},ca=(e,t)=>async n=>{n(Ho("loading"));try{const a=await ra.gradeCard(t);n((r=a.data.updatedGrade,o=a.data.updatedGrade.card_id,{type:"CARDS/SET-UPDATED-CARD",payload:{updatedGrade:r,cardId:o}})),n(sa(e,1/0))}catch(a){n(qo(a.response.data.error))}var r,o};function ua(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function da(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(ua(e.value)&&""!==e.value||t&&ua(e.defaultValue)&&""!==e.defaultValue)}var pa=n(9103);const fa=e.createContext(void 0);function ma(e){return(0,xt.Z)("MuiFormControl",e)}(0,yt.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const ha=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],va=(0,bt.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,it.Z)({},t.root,t["margin".concat((0,vt.Z)(n.margin))],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,it.Z)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),ga=e.forwardRef((function(t,n){const r=(0,gt.Z)({props:t,name:"MuiFormControl"}),{children:o,className:a,color:i="primary",component:l="div",disabled:s=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:f="none",required:m=!1,size:h="medium",variant:v="outlined"}=r,g=(0,at.Z)(r,ha),b=(0,it.Z)({},r,{color:i,component:l,disabled:s,error:c,fullWidth:d,hiddenLabel:p,margin:f,required:m,size:h,variant:v}),y=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&"margin".concat((0,vt.Z)(n)),r&&"fullWidth"]};return(0,st.Z)(o,ma,t)})(b),[x,w]=e.useState((()=>{let t=!1;return o&&e.Children.forEach(o,(e=>{if(!(0,pa.Z)(e,["Input","Select"]))return;const n=(0,pa.Z)(e,["Select"])?e.props.input:e;n&&n.props.startAdornment&&(t=!0)})),t})),[S,k]=e.useState((()=>{let t=!1;return o&&e.Children.forEach(o,(e=>{(0,pa.Z)(e,["Input","Select"])&&(da(e.props,!0)||da(e.props.inputProps,!0))&&(t=!0)})),t})),[C,E]=e.useState(!1);s&&C&&E(!1);const P=void 0===u||s?C:u;let Z;const j=e.useMemo((()=>({adornedStart:x,setAdornedStart:w,color:i,disabled:s,error:c,filled:S,focused:P,fullWidth:d,hiddenLabel:p,size:h,onBlur:()=>{E(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{E(!0)},registerEffect:Z,required:m,variant:v})),[x,i,s,c,S,P,d,p,Z,m,h,v]);return(0,Pt.jsx)(fa.Provider,{value:j,children:(0,Pt.jsx)(va,(0,it.Z)({as:l,ownerState:b,className:(0,lt.Z)(y.root,a),ref:n},g,{children:o}))})}));function ba(){return e.useContext(fa)}function ya(e){return(0,xt.Z)("MuiTypography",e)}(0,yt.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const xa=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],wa=(0,bt.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,vt.Z)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,it.Z)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),Sa={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ka={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ca=e.forwardRef((function(e,t){const n=(0,gt.Z)({props:e,name:"MuiTypography"}),r=(e=>ka[e]||e)(n.color),o=So((0,it.Z)({},n,{color:r})),{align:a="inherit",className:i,component:l,gutterBottom:s=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Sa}=o,f=(0,at.Z)(o,xa),m=(0,it.Z)({},o,{align:a,color:r,className:i,component:l,gutterBottom:s,noWrap:c,paragraph:u,variant:d,variantMapping:p}),h=l||(u?"p":p[d]||Sa[d])||"span",v=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e,l={root:["root",a,"inherit"!==e.align&&"align".concat((0,vt.Z)(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,st.Z)(l,ya,i)})(m);return(0,Pt.jsx)(wa,(0,it.Z)({as:h,ref:t,ownerState:m,className:(0,lt.Z)(v.root,i)},f))}));function Ea(e){return(0,xt.Z)("MuiFormControlLabel",e)}const Pa=(0,yt.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function Za(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}const ja=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Ra=(0,bt.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Pa.label)]:t.label},t.root,t["labelPlacement".concat((0,vt.Z)(n.labelPlacement))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,it.Z)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(Pa.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(Pa.label)]:{["&.".concat(Pa.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),Aa=(0,bt.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Pa.error)]:{color:(t.vars||t).palette.error.main}}})),Na=e.forwardRef((function(t,n){var r,o;const a=(0,gt.Z)({props:t,name:"MuiFormControlLabel"}),{className:i,componentsProps:l={},control:s,disabled:c,disableTypography:u,label:d,labelPlacement:p="end",required:f,slotProps:m={}}=a,h=(0,at.Z)(a,ja),v=ba(),g=null!=(r=null!=c?c:s.props.disabled)?r:null==v?void 0:v.disabled,b=null!=f?f:s.props.required,y={disabled:g,required:b};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof s.props[e]&&"undefined"!==typeof a[e]&&(y[e]=a[e])}));const x=Za({props:a,muiFormControl:v,states:["error"]}),w=(0,it.Z)({},a,{disabled:g,labelPlacement:p,required:b,error:x.error}),S=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,i={root:["root",n&&"disabled","labelPlacement".concat((0,vt.Z)(r)),o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,st.Z)(i,Ea,t)})(w),k=null!=(o=m.typography)?o:l.typography;let C=d;return null==C||C.type===Ca||u||(C=(0,Pt.jsx)(Ca,(0,it.Z)({component:"span"},k,{className:(0,lt.Z)(S.label,null==k?void 0:k.className),children:C}))),(0,Pt.jsxs)(Ra,(0,it.Z)({className:(0,lt.Z)(S.root,i),ownerState:w,ref:n},h,{children:[e.cloneElement(s,y),b?(0,Pt.jsxs)(Oo,{display:"block",children:[C,(0,Pt.jsxs)(Aa,{ownerState:w,"aria-hidden":!0,className:S.asterisk,children:["\u2009","*"]})]}):C]}))}));function Ta(e){return(0,xt.Z)("MuiFormLabel",e)}const Oa=(0,yt.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_a=["children","className","color","component","disabled","error","filled","focused","required"],Ia=(0,bt.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,it.Z)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,it.Z)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Oa.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Oa.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Oa.error)]:{color:(t.vars||t).palette.error.main}})})),Ma=(0,bt.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Oa.error)]:{color:(t.vars||t).palette.error.main}}})),La=e.forwardRef((function(e,t){const n=(0,gt.Z)({props:e,name:"MuiFormLabel"}),{children:r,className:o,component:a="label"}=n,i=(0,at.Z)(n,_a),l=Za({props:n,muiFormControl:ba(),states:["color","required","focused","disabled","error","filled"]}),s=(0,it.Z)({},n,{color:l.color||"primary",component:a,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:i,required:l}=e,s={root:["root","color".concat((0,vt.Z)(n)),o&&"disabled",a&&"error",i&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return(0,st.Z)(s,Ta,t)})(s);return(0,Pt.jsxs)(Ia,(0,it.Z)({as:a,ownerState:s,className:(0,lt.Z)(c.root,o),ref:t},i,{children:[r,l.required&&(0,Pt.jsxs)(Ma,{ownerState:s,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))}));var za=n(8278);function Fa(e){return(0,xt.Z)("PrivateSwitchBase",e)}(0,yt.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Da=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ba=(0,bt.ZP)(sr)((e=>{let{ownerState:t}=e;return(0,it.Z)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),Ua=(0,bt.ZP)("input",{shouldForwardProp:bt.FO})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Va=e.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:a,defaultChecked:i,disabled:l,disableFocusRipple:s=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:m,onBlur:h,onChange:v,onFocus:g,readOnly:b,required:y=!1,tabIndex:x,type:w,value:S}=e,k=(0,at.Z)(e,Da),[C,E]=(0,za.Z)({controlled:r,default:Boolean(i),name:"SwitchBase",state:"checked"}),P=ba();let Z=l;P&&"undefined"===typeof Z&&(Z=P.disabled);const j="checkbox"===w||"radio"===w,R=(0,it.Z)({},e,{checked:C,disabled:Z,disableFocusRipple:s,edge:c}),A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,a={root:["root",n&&"checked",r&&"disabled",o&&"edge".concat((0,vt.Z)(o))],input:["input"]};return(0,st.Z)(a,Fa,t)})(R);return(0,Pt.jsxs)(Ba,(0,it.Z)({component:"span",className:(0,lt.Z)(A.root,a),centerRipple:!0,focusRipple:!s,disabled:Z,tabIndex:null,role:void 0,onFocus:e=>{g&&g(e),P&&P.onFocus&&P.onFocus(e)},onBlur:e=>{h&&h(e),P&&P.onBlur&&P.onBlur(e)},ownerState:R,ref:t},k,{children:[(0,Pt.jsx)(Ua,(0,it.Z)({autoFocus:n,checked:r,defaultChecked:i,className:A.input,disabled:Z,id:j?d:void 0,name:m,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;E(t),v&&v(e,t)},readOnly:b,ref:f,required:y,ownerState:R,tabIndex:x,type:w},"checkbox"===w&&void 0===S?{}:{value:S},p)),C?o:u]}))})),Wa=(0,mr.Z)((0,Pt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),Ha=(0,mr.Z)((0,Pt.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),qa=(0,bt.ZP)("span",{shouldForwardProp:bt.FO})({position:"relative",display:"flex"}),Ka=(0,bt.ZP)(Wa)({transform:"scale(1)"}),Ga=(0,bt.ZP)(Ha)((e=>{let{theme:t,ownerState:n}=e;return(0,it.Z)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));const Xa=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=(0,it.Z)({},e,{checked:t});return(0,Pt.jsxs)(qa,{className:n.root,ownerState:o,children:[(0,Pt.jsx)(Ka,{fontSize:r,className:n.background,ownerState:o}),(0,Pt.jsx)(Ga,{fontSize:r,className:n.dot,ownerState:o})]})};var Ya=n(1260);const Qa=e.createContext(void 0);function Ja(e){return(0,xt.Z)("MuiRadio",e)}const $a=(0,yt.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),ei=["checked","checkedIcon","color","icon","name","onChange","size","className"],ti=(0,bt.ZP)(Va,{shouldForwardProp:e=>(0,bt.FO)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t["size".concat((0,vt.Z)(n.size))],t["color".concat((0,vt.Z)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,it.Z)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,qt.Fq)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat($a.checked)]:{color:(t.vars||t).palette[n.color].main}},{["&.".concat($a.disabled)]:{color:(t.vars||t).palette.action.disabled}})}));const ni=(0,Pt.jsx)(Xa,{checked:!0}),ri=(0,Pt.jsx)(Xa,{}),oi=e.forwardRef((function(t,n){var r,o;const a=(0,gt.Z)({props:t,name:"MuiRadio"}),{checked:i,checkedIcon:l=ni,color:s="primary",icon:c=ri,name:u,onChange:d,size:p="medium",className:f}=a,m=(0,at.Z)(a,ei),h=(0,it.Z)({},a,{color:s,size:p}),v=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root","color".concat((0,vt.Z)(n)),"medium"!==r&&"size".concat((0,vt.Z)(r))]};return(0,it.Z)({},t,(0,st.Z)(o,Ja,t))})(h),g=e.useContext(Qa);let b=i;const y=(0,Ya.Z)(d,g&&g.onChange);let x=u;var w,S;return g&&("undefined"===typeof b&&(w=g.value,b="object"===typeof(S=a.value)&&null!==S?w===S:String(w)===String(S)),"undefined"===typeof x&&(x=g.name)),(0,Pt.jsx)(ti,(0,it.Z)({type:"radio",icon:e.cloneElement(c,{fontSize:null!=(r=ri.props.fontSize)?r:p}),checkedIcon:e.cloneElement(l,{fontSize:null!=(o=ni.props.fontSize)?o:p}),ownerState:h,classes:v,name:x,checked:b,onChange:y,ref:n,className:(0,lt.Z)(v.root,f)},m))}));function ai(e){return(0,xt.Z)("MuiFormGroup",e)}(0,yt.Z)("MuiFormGroup",["root","row","error"]);const ii=["className","row"],li=(0,bt.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})((e=>{let{ownerState:t}=e;return(0,it.Z)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})})),si=e.forwardRef((function(e,t){const n=(0,gt.Z)({props:e,name:"MuiFormGroup"}),{className:r,row:o=!1}=n,a=(0,at.Z)(n,ii),i=Za({props:n,muiFormControl:ba(),states:["error"]}),l=(0,it.Z)({},n,{row:o,error:i.error}),s=(e=>{const{classes:t,row:n,error:r}=e,o={root:["root",n&&"row",r&&"error"]};return(0,st.Z)(o,ai,t)})(l);return(0,Pt.jsx)(li,(0,it.Z)({className:(0,lt.Z)(s.root,r),ownerState:l,ref:t},a))}));var ci=n(7384);const ui=["actions","children","defaultValue","name","onChange","value"],di=e.forwardRef((function(t,n){const{actions:r,children:o,defaultValue:a,name:i,onChange:l,value:s}=t,c=(0,at.Z)(t,ui),u=e.useRef(null),[d,p]=(0,za.Z)({controlled:s,default:a,name:"RadioGroup"});e.useImperativeHandle(r,(()=>({focus:()=>{let e=u.current.querySelector("input:not(:disabled):checked");e||(e=u.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const f=(0,Rn.Z)(n,u),m=(0,ci.Z)(i),h=e.useMemo((()=>({name:m,onChange(e){p(e.target.value),l&&l(e,e.target.value)},value:d})),[m,l,p,d]);return(0,Pt.jsx)(Qa.Provider,{value:h,children:(0,Pt.jsx)(si,(0,it.Z)({role:"radiogroup",ref:f},c,{children:o}))})}));var pi,fi=new Uint8Array(16);function mi(){if(!pi&&!(pi="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pi(fi)}const hi=/^(?:[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;const vi=function(e){return"string"===typeof e&&hi.test(e)};for(var gi=[],bi=0;bi<256;++bi)gi.push((bi+256).toString(16).substr(1));const yi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(gi[e[t+0]]+gi[e[t+1]]+gi[e[t+2]]+gi[e[t+3]]+"-"+gi[e[t+4]]+gi[e[t+5]]+"-"+gi[e[t+6]]+gi[e[t+7]]+"-"+gi[e[t+8]]+gi[e[t+9]]+"-"+gi[e[t+10]]+gi[e[t+11]]+gi[e[t+12]]+gi[e[t+13]]+gi[e[t+14]]+gi[e[t+15]]).toLowerCase();if(!vi(n))throw TypeError("Stringified UUID is invalid");return n};var xi,wi,Si=0,ki=0;const Ci=function(e,t,n){var r=t&&n||0,o=t||new Array(16),a=(e=e||{}).node||xi,i=void 0!==e.clockseq?e.clockseq:wi;if(null==a||null==i){var l=e.random||(e.rng||mi)();null==a&&(a=xi=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==i&&(i=wi=16383&(l[6]<<8|l[7]))}var s=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:ki+1,u=s-Si+(c-ki)/1e4;if(u<0&&void 0===e.clockseq&&(i=i+1&16383),(u<0||s>Si)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Si=s,ki=c,wi=i;var d=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var p=s/4294967296*1e4&268435455;o[r++]=p>>>8&255,o[r++]=255&p,o[r++]=p>>>24&15|16,o[r++]=p>>>16&255,o[r++]=i>>>8|128,o[r++]=255&i;for(var f=0;f<6;++f)o[r+f]=a[f];return t||yi(o)},Ei=[{id:Ci(),value:1,label:"Did not know"},{id:Ci(),value:2,label:"Forgot"},{id:Ci(),value:3,label:"A lot of thought"},{id:Ci(),value:4,label:"Confused"},{id:Ci(),value:5,label:"Knew the answer"}],Pi=e.memo((e=>{let{setGrade:t}=e;return(0,Pt.jsx)("div",{className:"grades",children:(0,Pt.jsxs)(ga,{children:[(0,Pt.jsx)(La,{children:"Rate yourself:"}),(0,Pt.jsx)(di,{onChange:e=>{t(+e.target.value)},children:Ei.map((e=>(0,Pt.jsx)(Na,{value:e.value,control:(0,Pt.jsx)(oi,{}),label:e.label},e.id)))})]})})})),Zi=()=>{const[t,n]=(0,e.useState)(!1),[r,o]=(0,e.useState)(!0),[a,i]=(0,e.useState)(0),[l,s]=(0,e.useState)("disabled"),c=Ce(),u=Dt(),d=Se(),{id:p}=function(){let{matches:t}=e.useContext(ye),n=t[t.length-1];return n?n.params:{}}(),{packName:f}=d.state,m=Bt((e=>e.app.status)),h=Bt((e=>e.cards.cards)),[v,g]=(0,e.useState)({_id:"",cardsPack_id:"",user_id:"",answer:"",question:"",grade:0,shots:0,questionImg:"",answerImg:"",answerVideo:"",questionVideo:"",comments:"",type:"",rating:0,more_id:"",created:"",updated:"",__v:0,card_id:""});(0,e.useEffect)((()=>{r&&p&&(u(sa(p,1/0)),o(!1)),h.length>0&&g((e=>{const t=e.reduce(((e,t)=>e+(6-t.grade)*(6-t.grade)),0),n=Math.random()*t,r=e.reduce(((e,t,r)=>{const o=e.sum+(6-t.grade)*(6-t.grade);return{sum:o,id:o