1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4321],{28340:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/conteudos/niveis/criar-nivel",function(){return r(35861)}])},86409:function(e,s,r){"use strict";r.d(s,{Z:function(){return A}});var t=r(11527),n=r(59962),i=r.n(n),a=r(39148),l=r(50959),o=r(48330),c=r(90105),d=r(35994),u=r(33032),m=r(26453),f=r(69654),h=r(93578),x=r.n(h),p=r(97162),v=r.n(p),g=r(67286),j=r(6457),y=r(84031),N=r(64749),_=r(64539),b=r(37527),z=r(62211),I=r(56777),Z=r(72043);function w(){let{user:e,isAuthenticating:s,isAuthenticated:r}=(0,o.aC)(),{pathname:n,push:i}=(0,a.useRouter)(),[h,p]=(0,l.useState)((null==e?void 0:e.isAdmin)&&!!n.includes("admin")),w=s=>{if(p(s),s||!(null==e?void 0:e.isAdmin)){i(z.Z.admin.contents.courses.list(1));return}if(r){i(z.Z.STUDENT_HOME);return}i(z.Z.LANDING)};return(0,t.jsxs)("header",{className:"hidden h-[76px] w-full items-center justify-between border-b border-gray-200 px-5 py-2 shadow-sm lg:flex",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-10",children:[(0,t.jsx)(v(),{href:e?"/seu-progresso":z.Z.LANDING,className:"shrink-0",children:(0,t.jsx)(x(),{src:"/assets/rover-logo.png",alt:"Logo da Rover Aprendizagem",width:104,height:24,className:"hidden sm:block"})}),(0,t.jsxs)("nav",{className:"flex items-center justify-center gap-4",children:[(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.contents.courses.list(1),className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(g.Z,{}),isActive:n.includes("conteudos"),children:"Conte\xfado"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.users.list(1),className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(b.Z,{}),isActive:n.includes("usuarios"),children:"Usu\xe1rios"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.jobs.list(1),className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(j.Z,{}),isActive:n.includes("/admin/vagas"),children:"Vagas"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.support.list(1),className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(_.Z,{}),isActive:n.includes("/admin/suporte"),children:"Suporte"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.notifications.list(1),className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(f.Z,{size:16}),isActive:n.includes("/admin/comunicados"),children:"Comunicados"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.sales.subscriptions,className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(y.Z,{}),isActive:n.includes("vendas"),children:"Vendas"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.admin.config.banners,className:"text-sm font-medium",variant:"menu-primary",fontWeight:500,size:"sm",rightIcon:(0,t.jsx)(N.Z,{}),isActive:n.includes("admin/configuracoes"),children:"Configura\xe7\xf5es"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-8",children:[(null==e?void 0:e.isAdmin)&&(0,t.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,t.jsx)(d.u,{label:"Modo Admin",children:(0,t.jsx)("div",{children:(0,t.jsx)(u.r,{isChecked:h,onChange:e=>w(e.target.checked),size:"md"})})}),(0,t.jsx)("p",{className:"text-xs font-medium",children:"Modo Admin"})]}),s?(0,t.jsx)("div",{className:"flex w-[76px] items-center justify-center",children:(0,t.jsx)(m.$,{size:"sm",color:"primary.500"})}):(0,t.jsxs)("div",{className:"flex items-center gap-5",children:[!e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.z,{colorScheme:"primary",as:v(),href:z.Z.REGISTER(),fontSize:"sm",children:"Inscreva-se"}),(0,t.jsx)(c.z,{as:v(),href:z.Z.LOGIN(),variant:"outline",colorScheme:"gray",display:{base:"none",sm:"flex"},fontSize:"sm",children:"Entrar"})]}),e&&(0,t.jsx)(I.Z,{}),e&&(0,t.jsx)(Z.Z,{})]})]})]})}function A(e){let{children:s}=e,{user:r,isAuthenticated:n,isAuthenticating:c}=(0,o.aC)(),d=(0,a.useRouter)();return(0,l.useEffect)(()=>{c||(n||d.push("/autenticacao/login"),(null==r?void 0:r.isAdmin)||d.push("/cursos"))},[n,c,d]),(0,t.jsxs)("main",{children:[(0,t.jsx)(i(),{children:(0,t.jsx)("title",{children:"Admin - Rover Up"})}),(0,t.jsx)(w,{}),(0,t.jsx)("div",{className:"h-[calc(100vh-76px)] w-full",children:s})]})}},35861:function(e,s,r){"use strict";r.r(s),r.d(s,{default:function(){return z}});var t=r(11527),n=r(9068),i=r(3532),a=r(55956),l=r(8396),o=r(44551),c=r(99212),d=r(90105),u=r(50320),m=r(65964),f=r(55907),h=r(8983),x=r(21271),p=r(4986),v=r(97162),g=r.n(v),j=r(39148),y=r(39690),N=r(86409),_=r(9658),b=r(69821);function z(){var e;let s=(0,j.useRouter)(),r=(0,i.p)(),v=(0,p.D)(e=>b.Z.create(e),{onSuccess:async()=>{s.back()},onError:()=>{r({title:"Erro",description:"N\xe3o foi poss\xedvel adicionar o n\xedvel. Tente novamente mais tarde",status:"error",position:"top-right"})}}),z=(0,y.cI)({mode:"all",defaultValues:{title:""},resolver:(0,x.F)(_.Z)}),I=z.handleSubmit(async e=>{v.mutate(e)}
1);return(0,t.jsx)(N.Z,{children:(0,t.jsx)("div",{className:"flex size-full items-start justify-start",children:(0,t.jsxs)("form",{onSubmit:I,className:"flex h-[calc(100vh-65px)] w-full flex-col items-start justify-start gap-6 overflow-y-auto bg-gray-50 px-6 py-8",children:[(0,t.jsxs)(a.a,{spacing:"8px",separator:(0,t.jsx)(n.X,{color:"gray.500"}),children:[(0,t.jsx)(l.g,{children:(0,t.jsx)(o.A,{fontSize:"sm",color:"gray.700",href:"/admin/conteudos/cursos?page=1",as:g(),children:"Conte\xfados"})}),(0,t.jsx)(l.g,{children:(0,t.jsx)(o.A,{fontSize:"sm",color:"gray.700",href:"/admin/conteudos/niveis?page=1",as:g(),children:"N\xedveis"})}),(0,t.jsx)(l.g,{isCurrentPage:!0,children:(0,t.jsx)(o.A,{fontSize:"sm",color:"gray.500",children:"Novo n\xedvel"})})]}),(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsx)("p",{className:"text-3xl font-bold text-gray-800",children:"Criar novo n\xedvel"}),(0,t.jsxs)(c.h,{gap:4,children:[(0,t.jsx)(d.z,{as:g(),href:"/admin/conteudos/perguntas/filtros/",colorScheme:"gray",variant:"outline",children:"Descartar"}),(0,t.jsx)(d.z,{type:"submit",isLoading:v.isLoading,isDisabled:!z.formState.isDirty,children:"Criar n\xedvel"})]})]}),(0,t.jsx)("div",{className:"flex w-full flex-col gap-5 rounded-lg bg-white p-8 shadow-sm",children:(0,t.jsxs)(u.NI,{isInvalid:!!z.formState.errors.title,children:[(0,t.jsx)(m.l,{children:"Nome do n\xedvel"}),(0,t.jsx)(f.I,{placeholder:"Escreva o nome do n\xedvel",...z.register("title")}
1),(0,t.jsx)(h.J1,{children:null===(e=z.formState.errors.title)||void 0===e?void 0:e.message})]})})]})})})}},9658:function(e,s,r){"use strict";var t=r(61946),n=r(9466);let i=t.Ry({title:t.Z_().min(1,{message:n.H.REQUIRED_FIELD})});s.Z=i},69821:function(e,s,r){"use strict";var t=r(44862);s.Z={async findAll(){let{data:e}=await t.x1.get("/levels");return e},async findAdminPaginated(e,s){var r,n;let i=new URLSearchParams;return i.append("page",null!==(r=e.toString())&&void 0!==r?r:"1"),i.append("limit",null!==(n=null==s?void 0:s.limit.toString())&&void 0!==n?n:"10"),(null==s?void 0:s.searchKey)&&i.append("searchKey",s.searchKey),(await t.x1.get("/levels/admin/paginated?"+i)).data},async findOne(e){let{data:s}=await t.x1.get("/levels/".concat(e));return s},async create(e){let{data:s}=await t.x1.post("/levels",e);return s},async update(e,s){let{data:r}=await t.x1.patch("/levels/".concat(e),s);return r},async delete(e){let{data:s}=await t.x1.delete("/levels/".concat(e));return s}}},78563:function(e,s,r){"use strict";r.d(s,{W:function(){return t},w:function(){return n}});var[t,n]=(0,r(41235).k)({name:"BreadcrumbStylesContext",errorMessage:"useBreadcrumbStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<Breadcrumb />\" "})},55956:function(e,s,r){"use strict";r.d(s,{a:function(){return m}});var t=r(78563),n=r(24843),i=r(3350),a=r(34180),l=r(28955),o=r(96741),c=r(36441),d=r(50959),u=r(11527),m=(0,a.G)(function(e,s){let r=(0,l.jC)("Breadcrumb",e),{children:a,spacing:m="0.5rem",separator:f="/",className:h,listProps:x,...p}=(0,o.Lr)(e),v=(0,i.W)(a),g=v.length,j=v.map((e,s)=>(0,d.cloneElement)(e,{separator:f,spacing:m,isLastChild:g===s+1})),y=(0,n.cx)("chakra-breadcrumb",h);return(0,u.jsx)(c.m.nav,{ref:s,"aria-label":"breadcrumb",className:y,__css:r.container,...p,children:(0,u.jsx)(t.W,{value:r,children:(0,u.jsx)(c.m.ol,{className:"chakra-breadcrumb__list",...x,__css:{display:"flex",alignItems:"center",...r.list},children:j})})})});m.displayName="Breadcrumb"},8396:function(e,s,r){"use strict";r.d(s,{g:function(){return m}});var t=r(44551),n=r(78563),i=r(34180),a=r(36441),l=r(11527),o=(0,i.G)(function(e,s){let{spacing:r,...t}=e,i={mx:r,...(0,n.w)().separator};return(0,l.jsx)(a.m.span,{ref:s,role:"presentation",...t,__css:i})});o.displayName="BreadcrumbSeparator";var c=r(3350),d=r(24843),u=r(50959),m=(0,i.G)(function(e,s){let{isCurrentPage:r,separator:i,isLastChild:m,spacing:f,children:h,className:x,...p}=e,v=(0,c.W)(h).map(e=>e.type===t.A?(0,u.cloneElement)(e,{isCurrentPage:r}):e.type===o?(0,u.cloneElement)(e,{spacing:f,children:e.props.children||i}):e),g={display:"inline-flex",alignItems:"center",...(0,n.w)().item},j=(0,d.cx)("chakra-breadcrumb__list-item",x);return(0,l.jsxs)(a.m.li,{ref:s,className:j,...p,__css:g,children:[v,!m&&(0,l.jsx)(o,{spacing:f,children:i})]})});m.displayName="BreadcrumbItem"},44551:function(e,s,r){"use strict";r.d(s,{A:function(){return o}});var t=r(78563),n=r(34180),i=r(36441),a=r(24843),l=r(11527),o=(0,n.G)(function(e,s){let{isCurrentPage:r,as:n,className:o,href:c,...d}=e,u=(0,t.w)(),m={ref:s,as:n,className:(0,a.cx)("chakra-breadcrumb__link",o),...d};return r?(0,l.jsx)(i.m.span,{"aria-current":"page",__css:u.link,...m}):(0,l.jsx)(i.m.a,{__css:u.link,href:c,...m})});o.displayName="BreadcrumbLink"},99212:function(e,s,r){"use strict";r.d(s,{h:function(){return u}});var t=r(62823),n=r(34180),i=r(36441),a=r(24843),l=r(50959),o=r(11527),c={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},d={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},u=(0,n.G)(function(e,s){let{size:r,colorScheme:n,variant:u,className:m,spacing:f="0.5rem",isAttached:h,isDisabled:x,orientation:p="horizontal",...v}=e,g=(0,a.cx)("chakra-button__group",m),j=(0,l.useMemo)(()=>({size:r,colorScheme:n,variant:u,isDisabled:x}),[r,n,u,x]),y={display:"inline-flex",...h?c[p]:d[p](f)},N="vertical"===p;return(0,o.jsx)(t.D,{value:j,children:(0,o.jsx)(i.m.div,{ref:s,role:"group",__css:y,className:g,"data-attached":h?"":void 0,"data-orientation":p,flexDir:N?"column":void 0,...v})})});u.displayName="ButtonGroup"},65964:function(e,s,r){"use strict";r.d(s,{l:function(){return d}});var t=r(50320),n=r(34180),i=r(28955),a=r(96741),l=r(36441),o=r(24843),c=r(11527),d=(0,n.G)(function(e,s){var r;let n=(0,i.mq)("FormLabel",e),d=(0,a.Lr)(e),{className:m,children:f,requiredIndicator:h=(0,c.jsx)(u,{}),optionalIndicator:x=null,...p}=d,v=(0,t.NJ)(),g=null!=(r=null==v?void 0:v.getLabelProps(p,s))?r:{ref:s,...p};
1return(0,c.jsxs)(l.m.label,{...g,className:(0,o.cx)("chakra-form__label",d.className),__css:{display:"block",textAlign:"start",...n},children:[f,(null==v?void 0:v.isRequired)?h:x]})});d.displayName="FormLabel";var u=(0,n.G)(function(e,s){let r=(0,t.NJ)(),n=(0,t.e)();if(!(null==r?void 0:r.isRequired))return null;let i=(0,o.cx)("chakra-form__required-indicator",e.className);return(0,c.jsx)(l.m.span,{...null==r?void 0:r.getRequiredIndicatorProps(e,s),__css:n.requiredIndicator,className:i})});u.displayName="RequiredIndicator"},8983:function(e,s,r){"use strict";r.d(s,{J1:function(){return h}});var t=r(50320),n=r(1029),i=r(41235),a=r(34180),l=r(28955),o=r(96741),c=r(36441),d=r(24843),u=r(11527),[m,f]=(0,i.k)({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<FormError />\" "}),h=(0,a.G)((e,s)=>{let r=(0,l.jC)("FormError",e),n=(0,o.Lr)(e),i=(0,t.NJ)();return(null==i?void 0:i.isInvalid)?(0,u.jsx)(m,{value:r,children:(0,u.jsx)(c.m.div,{...null==i?void 0:i.getErrorMessageProps(n,s),className:(0,d.cx)("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...r.text}})}):null});h.displayName="FormErrorMessage",(0,a.G)((e,s)=>{let r=f(),i=(0,t.NJ)();if(!(null==i?void 0:i.isInvalid))return null;let a=(0,d.cx)("chakra-form__error-icon",e.className);
1return(0,u.jsx)(n.J,{ref:s,"aria-hidden":!0,...e,__css:r.icon,className:a,children:(0,u.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}).displayName="FormErrorIcon"},9068:function(e,s,r){"use strict";r.d(s,{X:function(){return t}});var t=(0,r(26493).I)({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"})},55907:function(e,s,r){"use strict";r.d(s,{I:function(){return d}});var t=r(53254),n=r(34180),i=r(28955),a=r(96741),l=r(36441),o=r(24843),c=r(11527),d=(0,n.G)(function(e,s){let{htmlSize:r,...n}=e,d=(0,i.jC)("Input",n),u=(0,a.Lr)(n),m=(0,t.Y)(u),f=(0,o.cx)("chakra-input",e.className);return(0,c.jsx)(l.m.input,{size:r,...m,__css:d.field,ref:s,className:f})});d.displayName="Input",d.id="Input"},69654:function(e,s,r){"use strict";r.d(s,{Z:function(){return t}});let t=(0,r(22297).Z)("megaphone",[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]])}},function(e){e.O(0,[3578,7162,1264,7423,5530,375,4312,3343,8088,2211,2183,9774,2888,179],function(){return e(e.s=28340)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.