PageSourceSearch

https://www.centurio.com.br/_next/static/chunks/pages/resumoAulaBase-c361762d37063e24.js

js centurio.com.br collected 2026-10-02 01:21:55 UTC 8,542 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8481],{41796:function(e,t,r){"use strict";r.d(t,{Fq:function(){return s},_j:function(){return u}});var n=r(62047),o=r(63819);function l(e,t=0,r=1){return(0,o.Z)(e,t,r)}function a(e){let t;if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map(e=>e+e)),r?`rgb${4===r.length?"a":""}(${r.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let r=e.indexOf("("),o=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(o))throw Error((0,n.Z)(9,e));let l=e.substring(r+1,e.length-1);if("color"===o){if(t=(l=l.split(" ")).shift(),4===l.length&&"/"===l[3].charAt(0)&&(l[3]=l[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(t))throw Error((0,n.Z)(10,t))}else l=l.split(",");return{type:o,values:l=l.map(e=>parseFloat(e)),colorSpace:t}}function i(e){let{type:t,colorSpace:r}=e,{values:n}=e;return -1!==t.indexOf("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==t.indexOf("color")?`${r} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function s(e,t){return e=a(e),t=l(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,i(e)}function u(e,t){if(e=a(e),t=l(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return i(e)}},40823:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/resumoAulaBase",function(){return r(90711)}])},80483:function(e,t,r){"use strict";var n=r(64836);t.Z=void 0;var o=n(r(33651)),l=r(85893);t.Z=(0,o.default)((0,l.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},19231:function(e,t,r){"use strict";var n=r(85893),o=r(67294),l=r(18745),a=r(87415),i=r(25837),s=r(26541),u=r(30303);let c=e=>e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase(),d=e=>e.split("*").map(e=>c(e.trim())).filter(Boolean),p=(e,t)=>{if(0===t.length)return!0;let r=c(e),n=0;for(let e of t){let t=r.indexOf(e,n);if(t<0)return!1;n=t+e.length}return!0},f=(e,t)=>{if(0===t.length)return[];let r=[],n=[],o=[];for(let t=0;t<e.length;t++)for(let r of e[t].normalize("NFD"))/[̀-ͯ]/.test(r)||(n.push(r.toLowerCase()),o.push(t));let l=n.join(""),a=0;for(let e of t){let t=l.indexOf(e,a);if(t<0)break;let n=o[t],i=o[t+e.length-1]+1;r.push([n,i]),a=t+e.length}return r},h=(e,t)=>{let r=f(e,t);if(0===r.length)return e;r.sort((e,t)=>e[0]-t[0]);let o=[];for(let e of r)o.length&&e[0]<=o[o.length-1][1]?o[o.length-1][1]=Math.max(o[o.length-1][1],e[1]):o.push([e[0],e[1]]);let l=[],a=0;return o.forEach((t,r)=>{let[o,i]=t;o>a&&l.push((0,n.jsx)("span",{children:e.slice(a,o)},"t-".concat(r))),l.push((0,n.jsx)("mark",{style:{backgroundColor:"#fff176",color:"#333",borderRadius:2,padding:"0 2px",fontWeight:700},children:e.slice(o,i)},"m-".concat(r))),a=i}),a<e.length&&l.push((0,n.jsx)("span",{children:e.slice(a)},"t-end")),(0,n.jsx)(n.Fragment,{children:l})};t.Z=e=>{let{label:t,options:r,selectedValue:c,width:f="100%",onChange:m,helperText:x,renderOption:g}=e,v=r.find(e=>e.value===c)||null,b=(0,l.Z)();(0,u.TV)(b.palette.mode);let j=(0,a.D)();return(0,n.jsx)(i.Z,{options:r,groupBy:e=>e.group||"",getOptionLabel:e=>e.label||"",getOptionDisabled:e=>!0===e.disabled,value:v,onChange:(e,t)=>
1m(t?t.value:""),isOptionEqualToValue:(e,t)=>e.value===t.value,filterOptions:(e,t)=>{let r=t.inputValue;if(!r.includes("*"))return j(e,t);let n=d(r);return 0===n.length?e:e.filter(e=>p(e.label||"",n))},sx:{width:f},noOptionsText:"Sem op\xe7\xf5es",renderGroup:e=>(0,n.jsxs)("li",{children:[(0,n.jsx)("div",{style:{fontWeight:600,padding:"8px 14px",backgroundColor:"rgba(0,0,0,0.04)",borderTop:"1px solid #ccc",marginTop:4},children:e.group}),(0,n.jsx)("ul",{style:{paddingLeft:0},children:e.children})]},e.key),renderInput:e=>(0,n.jsx)(s.Z,{...e,label:t,variant:"filled",helperText:x,InputProps:{...e.InputProps,disableUnderline:!0},sx:{"& .MuiFilledInput-root":{borderBottom:"none",borderRadius:"17px"}}}),renderOption:null!=g?g:(e,t,r)=>{let n=r.inputValue.includes("*")?d(r.inputValue):d(r.inputValue.replace(/\s+/g,"*"));return(0,o.createElement)("li",{...e,key:t.value},h(t.label||"",n))}})}},90711:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return j}});var n=r(85893),o=r(67294),l=r(18745),a=r(60990),i=r(96788),s=r(68573),u=r(20680),c=r(77575),d=r(26541),p=r(84677),f=r(97182),h=r(80483),m=r(81512),x=r(99671),g=r(30303),v=r(55678),b=r(19231),j=!0;t.default=e=>{let{listaAulasBase:t,listaEstilos:r}=e,j=(0,l.Z)(),y=(0,g.TV)(j.palette.mode),{setTitle:Z,setSubtitle:O}=(0,m.T)();(0,o.useEffect)(()=>{Z("Resumo da Aula Base"),O("Selecione uma aula base e cole o HTML do resumo. Ele ser\xe1 salvo como o corpo da miss\xe3o.")},[Z,O]);let[_,A]=(0,o.useState)(""),[E,C]=(0,o.useState)(""),[R,S]=(0,o.useState)(!1),[T,w]=(0,o.useState)(!1),[P,k]=(0,o.useState)("enxuto"),D=async e=>{var t;e.preventDefault(),e.stopPropagation(),w(!1);let r=null===(t=e.dataTransfer.files)||void 0===t?void 0:t[0];if(r){try{let e=await r.text();C(e),v.Am.success('Arquivo "'.concat(r.name,'" carregado.'))}catch(e){v.Am.error("Erro ao ler o arquivo.")}return}let n=e.dataTransfer.getData("text/html"),o=e.dataTransfer.getData("text/plain"),l=n||o;l&&C(l)},I=e=>{e.preventDefault(),e.stopPropagation(),T||w(!0)},$=(0,o.useMemo)(()=>t.map(e=>({value:e.id,label:e.nome_oficial})),[t]),M="enxuto"===P?"Resumo do Assunto":"Resumo Interativo",V=(0,o.useMemo)(()=>r.find(e=>e.nome_estilo===M),[r,M]),q=async()=>{if(!_){v.Am.error("Selecione uma aula base.");return}if(!E.trim()){v.Am.error("Cole o HTML do resumo.");return}if(!V){v.Am.error('Estilo "'.concat(M,'" n\xe3o encontrado no banco.'));return}S(!0);try{let e=(0,x.R)(),{data:t}=await e.post("/corpoMissao",{corpo:E,id_estilo:V.id});await e.post("/missaoPorAssuntoOficial",{id_assunto_oficial:_,id_corpo:t.id}),v.Am.success("Resumo salvo com sucesso!"),C(""),A("")}catch(r){var e,t;v.Am.error((null==r?void 0:null===(t=r.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.error)||"Erro ao salvar resumo.")}finally{S(!1)}};return(0,n.jsx)(a.Z,{m:"20px",sx:{"& *":{transition:"none !important"}},children:(0,n.jsxs)(a.Z,{sx:{p:3,borderRadius:2,border:"1px solid ".concat(y.grey[700]),backgroundColor:y.primary[400]},children:[(0,n.jsx)(i.Z,{variant:"h5",fontWeight:"bold",mb:2,children:"Salvar Resumo da Aula Base"}),(0,n.jsxs)(s.ZP,{container:!0,spacing:2,children:[(0,n.jsx)(s.ZP,{item:!0,xs:12,children:(0,n.jsxs)(u.Z,{value:P,exclusive:!0,onChange:(e,t)=>
1t&&k(t),size:"small",color:"secondary",children:[(0,n.jsx)(c.Z,{value:"enxuto",children:"Resumo enxuto"}),(0,n.jsx)(c.Z,{value:"interativo",children:"Resumo interativo"})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,children:(0,n.jsx)(b.Z,{label:"Aula Base *",options:$,selectedValue:_,onChange:e=>A(e),width:"100%"})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,children:(0,n.jsxs)(a.Z,{onDrop:D,onDragOver:I,onDragEnter:I,onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),w(!1)},sx:{position:"relative",borderRadius:1,outline:T?"2px dashed ".concat(y.greenAccent[500]):"none",outlineOffset:"-2px",transition:"outline 0.1s"},children:[(0,n.jsx)(d.Z,{label:"HTML do Resumo *",value:E,onChange:e=>C(e.target.value),multiline:!0,minRows:14,fullWidth:!0,placeholder:"<p>Cole, digite ou arraste um arquivo .html aqui...</p>",InputProps:{sx:{fontFamily:"monospace",fontSize:"0.9rem"}}}),T&&(0,n.jsx)(a.Z,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.35)",borderRadius:1,pointerEvents:"none",color:y.greenAccent[300],fontWeight:"bold"},children:"Solte o arquivo .html para carregar"})]})}),(0,n.jsx)(s.ZP,{item:!0,xs:12,display:"flex",justifyContent:"flex-end",children:(0,n.jsx)(p.Z,{variant:"contained",color:"secondary",onClick:q,disabled:R||!_||!E.trim(),startIcon:R?(0,n.jsx)(f.Z,{size:18}):(0,n.jsx)(h.Z,{}),sx:{height:48,fontWeight:"bold",minWidth:160},children:R?"Salvando...":"Salvar Resumo"})})]}),!V&&(0,n.jsxs)(i.Z,{color:"error",mt:2,variant:"body2",children:['Aviso: o estilo "',M,'" n\xe3o foi encontrado. O salvamento ficar\xe1 desabilitado at\xe9 que ele exista.']})]})})}}},function(e){e.O(0,[1423,7412,6541,1873,8573,5837,9320,2888,9774,179],function(){return e(e.s=40823)}),_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.