1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9647,3680],{24152:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/posts/[id]",function(){return r(51969)}])},94264:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var i=r(85893),n=r(96272),l=r(41664),a=r.n(l);let o=e=>{let{children:t,linkHref:r,...l}=e;return(0,i.jsx)(n.z,{as:a(),href:r,passHref:!0,size:"md",fontSize:"md",colorScheme:"green",...l,children:t})}},52824:function(e,t,r){"use strict";r.d(t,{_:function(){return u}});var i=r(85893),n=r(70654),l=r(96177),a=r(89056),o=r(30847),s=r(67294),d=r(87536);let c=e=>{let{name:t,label:r,placeholder:c,error:u=null,control:m,separator:x,...p}=e,[h,g]=(0,s.useState)(""),f=(0,s.useRef)(()=>{}),b=(0,s.useRef)([]),j=(e,t)=>{let{action:r}=t;if("input-change"!==r){g(e);return}if(x&&e.includes(x)){let t=e.split(x).map(e=>e.trim()).filter(Boolean);if(t.length>0){let e=t.map(e=>({label:e,value:e}));f.current([...b.current||[],...e])}g("")}else g(e)};return(0,i.jsx)(d.Qr,{control:m,name:t,render:e=>{let{field:{onChange:t,onBlur:s,value:d,name:m,ref:x}}=e;return f.current=t,b.current=d,(0,i.jsxs)(n.NI,{isInvalid:!!u,children:[!!r&&(0,i.jsx)(l.l,{w:"100%",htmlFor:m,display:"flex",alignItems:"center",fontWeight:"bold",children:r}),(0,i.jsx)(o.Z,{isMulti:!0,size:"lg",name:m,onChange:t,onBlur:s,value:d,inputValue:h,onInputChange:j,placeholder:c,noOptionsMessage:()=>"Digite para criar uma keyword",formatCreateLabel:e=>'Adicionar "'.concat(e,'"'),ref:x,...p}),u&&(0,i.jsx)(a.J1,{fontSize:"xs",children:u.message})]})}})},u=c},49778:function(e,t,r){"use strict";r.d(t,{$:function(){return m}});var i=r(85893),n=r(70654),l=r(96177),a=r(28129),o=r(89056),s=r(67294),d=r(8085),c=r(9216);let u=(e,t)=>{let{name:r,label:s,maxDate:u,minDate:m,hasMaxDate:x=!1,error:p=null,popoverDescription:h,popoverImage:g,...f}=e;return(0,i.jsxs)(n.NI,{isInvalid:!!p,children:[!!s&&(0,i.jsxs)(l.l,{w:"100%",htmlFor:r,display:"flex",alignItems:"center",fontWeight:"bold",children:[s,(!!h||!!g)&&(0,i.jsx)(c.T,{description:h,image:g})]}),(0,i.jsx)(a.I,{fontSize:{sm:"md",md:"lg"},id:r,name:r,size:"lg",variant:"outline",max:x?u||(0,d.Z)(new Date,"yyyy-MM-dd HH:mm"):"",min:m||"",type:"datetime-local",ref:t,...f}),p&&(0,i.jsx)(o.J1,{fontSize:"xs",children:p.message})]})},m=(0,s.forwardRef)(u)},33680:function(e,t,r){"use strict";r.d(t,{$:function(){return G}});var i=r(85893),n=r(12498),l=r(70654),a=r(96177),o=r(89056),s=r(67294),d=r(62286);function c(){let e=window.getSelection();return e&&0!==e.rangeCount?e.getRangeAt(0).cloneRange():null}var u=r(92752),m=r(31963),x=r(31948),p=r(44504),h=r(55819),g=r(73793),f=r(1004),b=r(56005),j=r(49394),v=r(80333),y=r(69558),S=r(76684),w=r(88911),_=r(81941),C=r(54641),I=r(96272),k=r(31708),z=r(16310),T=r(87536),A=r(57492),M=r(57843),P=r(95259),E=r(98053),F=r(35081),R=r(19694);let L=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),W=e=>{let{src:t,alt:r,caption:i,credit:n,creditUrl:l}=e,a=(null==l?void 0:l.trim())?'<a href="'.concat(L(l.trim()),'" rel="nofollow noopener" target="_blank">').concat(L(n),"</a>"):L(n);return['<figure class="article-image">','<img src="'.concat(L(t),'" alt="').concat(L(r),'" style="max-width:100%;height:auto;display:block;margin-left:auto;margin-right:auto;">'),'<figcaption style="text-align:center;">','<span class="image-caption">'.concat(L(i),"</span>"),'<span class="image-credit">'.concat(a,"</span>"),"</figcaption>","</figure>"].join("")},H=z.Ry().shape({altText:z.Z_().required("Texto alternativo obrigat\xf3rio.").typeError("Texto alternativo obrigat\xf3rio."),caption:z.Z_().required("Legenda obrigat\xf3ria.").typeError("Legenda obrigat\xf3ria."),credit:z.Z_().required("Cr\xe9dito obrigat\xf3rio.").typeError("Cr\xe9dito obrigat\xf3rio."),creditUrl:z.Z_().transform(e=>e||void 0).url("Informe uma URL v\xe1lida, come\xe7ando com http:// ou https://.").notRequired()}),N=e=>{let{isOpen:t,onClose:r,onConfirm:n,initialImageUrl:l}=e,[a,o]=(0,s.useState)(l),[d,c]=(0,s.useState)(""),z=(0,s.useRef)(!1),{register:L,formState:{errors:N},handleSubmit:O,watch:U,setValue:q}=(0,T.cI)({resolver:(0,A.X)(H)}),D=e=>{var t,r,i,n;z.current=!0,o(e.url),q("altText",null!==(t=e.altText)&&void 0!==t?t:""),q("caption",null!==(r=e.caption)&&void 0!==r?r:""),q("credit",null!==(i=e.credit)&&void 0!==i?i:""),q("creditUrl",null!==(n=e.creditUrl)&&void 0!==n?n:"")},B=()=>
1{if(!z.current){r();return}z.current=!1},V=()=>{d.trim()&&o(d.trim())},Z=e=>{if(!a)return;let t=W({src:a,alt:e.altText,caption:e.caption,credit:e.credit,creditUrl:e.creditUrl});r(),n(t)};return(0,i.jsxs)(u.u_,{isOpen:t,onClose:r,size:"xl",trapFocus:!1,children:[(0,i.jsx)(m.Z,{}),(0,i.jsxs)(x.h,{bg:"white",children:[(0,i.jsx)(p.x,{children:"Inserir imagem na mat\xe9ria"}),(0,i.jsx)(h.o,{}),(0,i.jsx)(g.f,{pb:"6",children:a?(0,i.jsxs)(S.K,{spacing:"4",children:[(0,i.jsx)(_.E,{src:a,alt:"Pr\xe9-visualiza\xe7\xe3o da imagem escolhida",maxH:"64",objectFit:"contain",rounded:"md",background:"blackAlpha.50"}),(0,i.jsx)(C.U,{justify:"flex-end",children:(0,i.jsx)(I.z,{size:"sm",variant:"ghost",onClick:()=>o(void 0),children:"Trocar imagem"})}),(0,i.jsx)(M.I,{label:"Texto alternativo da imagem *",error:N.altText,...L("altText")}),(0,i.jsx)(M.I,{label:"Legenda da imagem *",error:N.caption,...L("caption")}),(0,i.jsx)(M.I,{label:"Cr\xe9dito da imagem *",error:N.credit,...L("credit")}),(0,i.jsx)(M.I,{label:"URL do cr\xe9dito",placeholder:"https://exemplo.com/fonte-da-imagem",error:N.creditUrl,...L("creditUrl")}),(0,i.jsxs)(k.r,{gap:"5",gridTemplateColumns:"1fr 1fr",w:"100%",children:[(0,i.jsx)(E.$,{onClick:r,children:"Cancelar"}),(0,i.jsx)(P.G,{type:"button",onClick:O(Z),children:"Inserir imagem"})]})]}):(0,i.jsxs)(f.m,{isFitted:!0,isLazy:!0,children:[(0,i.jsxs)(b.t,{children:[(0,i.jsx)(j.O,{children:"Selecionar imagens"}),(0,i.jsx)(j.O,{children:"Fazer upload de imagem"}),(0,i.jsx)(j.O,{children:"URL da imagem"})]}),(0,i.jsxs)(v.n,{children:[(0,i.jsx)(y.x,{children:(0,i.jsx)(F.m,{name:"mediaSecureId",watch:U,setValue:q,onClose:B,onMediaSelected:D})}),(0,i.jsx)(y.x,{children:(0,i.jsx)(R.z,{name:"mediaSecureId",setValue:q,onClose:B,onMediaSelected:D})}),(0,i.jsx)(y.x,{children:(0,i.jsxs)(S.K,{spacing:"4",children:[(0,i.jsx)(M.I,{name:"externalUrl",label:"URL da imagem",placeholder:"https://exemplo.com/imagem.jpg",value:d,onChange:e=>c(e.target.value)}),(0,i.jsx)(w.x,{fontSize:"xs",color:"gray.500",children:"A imagem n\xe3o \xe9 cadastrada na biblioteca de m\xeddia â use quando ela estiver hospedada fora do portal."}),(0,i.jsx)(P.G,{type:"button",onClick:V,isDisabled:!d.trim(),children:"Utilizar esta URL"})]})})]})]})})]})]})},O=e=>{var t;let{url:r}=e,i=r.trim().match(/(?:shorts\/|v=|\/embed\/|youtu\.be\/|\/v\/|watch\?v=|&v=)([a-zA-Z0-9_-]{11})/);return null!==(t=null==i?void 0:i[1])&&void 0!==t?t:null},U=e=>{let{url:t}=e,r=O({url:t});if(!r)return null;let i=/\/shorts\//.test(t);return'<iframe width="'.concat(i?360:800,'" height="').concat(i?640:450,'" src="https://www.youtube.com/embed/').concat(r,'" style="display:block;margin-left:auto;margin-right:auto;" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="true"></iframe>')},q=e=>{let{isOpen:t,onClose:r,onConfirm:n}
1=e,[l,a]=(0,s.useState)(""),[o,d]=(0,s.useState)(),c=()=>{let e=U({url:l});if(!e){d({type:"manual",message:"URL inv\xe1lida! Cole um link do YouTube v\xe1lido (watch?v=, youtu.be/, shorts/, etc.)"});return}r(),n(e)},f=e=>{a(e),d(void 0)},b=e=>{"Enter"===e.key&&(e.preventDefault(),c())};return(0,i.jsxs)(u.u_,{isOpen:t,onClose:r,size:"xl",trapFocus:!1,children:[(0,i.jsx)(m.Z,{}),(0,i.jsxs)(x.h,{bg:"white",children:[(0,i.jsx)(p.x,{children:"Inserir V\xeddeo do YouTube"}),(0,i.jsx)(h.o,{}),(0,i.jsx)(g.f,{pb:"6",children:(0,i.jsxs)(S.K,{spacing:"4",children:[(0,i.jsx)(M.I,{name:"youtubeUrl",label:"Link do v\xeddeo",placeholder:"https://www.youtube.com/watch?v=...",value:l,onChange:e=>f(e.target.value),onKeyDown:b,error:o,autoComplete:"off",spellCheck:!1,"aria-label":"URL do v\xeddeo do YouTube"}),(0,i.jsx)(w.x,{fontSize:"xs",color:"gray.500",children:"Aceita: youtube.com/watch?v=, youtu.be/, youtube.com/shorts/"}),(0,i.jsxs)(k.r,{gap:"5",gridTemplateColumns:"1fr 1fr",w:"100%",children:[(0,i.jsx)(E.$,{onClick:r,children:"Cancelar"}),(0,i.jsx)(P.G,{type:"button",onClick:c,children:"Inserir"})]})]})})]})]})};var D=r(29273),B=r(1700);let V=(0,s.lazy)(()=>r.e(7661).then(r.t.bind(r,72911,23))),Z=(e,t)=>{let{name:r,label:u,error:m,initialTemplate:x,setValue:p,extraButtons:h=[],...g}=e,{colorMode:f}=(0,n.If)(),[b,j]=(0,s.useState)(!1),[v,y]=(0,s.useState)(!1),[S,w]=(0,s.useState)(),_=(0,s.useRef)(null),C=(0,s.useCallback)(e=>{_.current=e},[]),I=(0,s.useRef)(null),k=(0,s.useCallback)(e=>{I.current=e,w(void 0),j(!0)},[]),z=(0,s.useCallback)(e=>{I.current=e,y(!0)},[]),T=(0,s.useCallback)((e,t)=>{I.current=t,w(e),j(!0)},[]),A=e=>{let t=_.current;if(!t)return;let r=I.current;if(r){let e=window.getSelection();null==e||e.removeAllRanges(),null==e||e.addRange(r)}t.s.insertHTML(e)},M=(0,s.useMemo)(()=>{let e=(0,D.z)({html:x});return e?function(e){let t=(0,D.z)({html:e});if(!t)return"";let r=document.createElement("div");return r.innerHTML=t,r.querySelectorAll("style.embed-style").forEach(e=>e.remove()),r.querySelectorAll("iframe").forEach(e=>{let t=e.getAttribute("src");t&&e.setAttribute("src",(0,B.N)(t))}),r.querySelectorAll("div.embed-container").forEach(e=>{let t=e.querySelector("iframe");if(t&&e.parentNode){let r=parseInt(e.style.width)||560,i=Math.round(9*r/16),[n,l]=e.style.aspectRatio.split("/").map(e=>parseInt(e));n&&l&&(i=Math.round(r*l/n)),t.setAttribute("width",String(r)),t.setAttribute("height",String(i)),e.style.float&&(t.style.float=e.style.float),e.style.marginLeft&&(t.style.marginLeft=e.style.marginLeft),e.style.marginRight&&(t.style.marginRight=e.style.marginRight),e.parentNode.replaceChild(t,e)}}),(0,D.z)({html:r.innerHTML})}(e):""},[x,!1]);(0,s.useEffect)(()=>{""===M&&p(r,"")},[r,M,p]);let P=(0,d.parseCookies)(),E=(0,s.useMemo)(()=>h.map(e=>{if("exportPage"===e.name)return{name:e.name,tooltip:"PDF p\xe1gina",exec:e.exec,icon:"eye"}}),[h]),F=(0,s.useMemo)(()=>({theme:f,height:"20em",style:{fontSize:"18px",listStyle:"inside"},disablePlugins:["preview"],removeButtons:["file","image"],beautifyHTML:!1,uploader:{insertImageAsBase64URI:!1,format:"json",method:"POST",url:"".concat("https://api-samais.azurewebsites.net/","/v1/admin/uploads"),headers:{Authorization:"Bearer ".concat(P["@SAVarejo:token"])},prepareData:function(e){let t=e.getAll("files[0]")[0];return e.delete("files[0]"),e.append("file",t),e.delete("path"),e.delete("source"),e.append("name",t.name),e.append("altText","Imagem do editor"),e.append("tags","Imagem do editor"),e},isSuccess:function(e){return e.success||"success"===e.type},getMessage:function(e){return e.success?"Imagem enviada com sucesso!":"Erro ao enviar imagem!"},process:function(e){let t=e.url_file;return t},defaultHandlerSuccess:async function(e){T(e,c())}},controls:{fontsize:{list:[8,9,10,11,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,72,96]}},language:"pt_br",extraButtons:[function(e){let{onOpen:t}=e;return{name:"article_image",icon:"image",tooltip:"Inserir imagem",exec:()=>{t(c())}}}({onOpen:k}),function(e){let{onOpen:t}=e;return{name:"youtube_shorts",iconURL:"https://upload.wikimedia.org/wikipedia/commons/e/ef/Youtube_logo.png",tooltip:"Inserir YouTube (v\xeddeos e Shorts)",exec:()=>{t(c())}}}({onOpen:z}),...E],events:{afterSetMode:function(){let e=_.current;if(!e||1!==e.getRealMode())return;let t=e.__plugins,r=null==t?void 0:t.resizer;
1e.editor.querySelectorAll("iframe").forEach(e=>{var t;return null==r?void 0:null===(t=r.__bind)||void 0===t?void 0:t.call(r,e)});let i=e.editor.querySelectorAll("jodit[data-jodit_iframe_wrapper]");i.forEach(e=>{var t,r;let i=e.querySelector("iframe");if(!i)return;let n=parseInt(null!==(t=i.getAttribute("height"))&&void 0!==t?t:"0"),l=parseInt(null!==(r=i.getAttribute("width"))&&void 0!==r?r:"0");n>0&&(e.style.height="".concat(n,"px")),l>0&&(e.style.width="".concat(l,"px"))})},afterGetValueFromEditor:function(e){e.value=e.value.replace(/<span[^>]*data-jodit-selection_marker[^>]*>\s*<\/span>/gi,"")}}}),[]);return(0,i.jsxs)(l.NI,{isInvalid:!!m,children:[!!u&&(0,i.jsx)(a.l,{w:"100%",htmlFor:r,display:"flex",alignItems:"center",fontWeight:"bold",children:u}),(0,i.jsxs)(s.Suspense,{fallback:(0,i.jsx)("div",{children:"Loading RTE"}),children:[(0,i.jsx)(V,{ref:t,editorRef:C,value:M,config:F,onChange:e=>p(r,(0,D.z)({html:e}))}),m&&(0,i.jsx)(o.J1,{my:"0",ml:"2",fontSize:"xs",paddingTop:"2",children:m.message})]}),b&&(0,i.jsx)(N,{isOpen:b,onClose:()=>j(!1),onConfirm:A,initialImageUrl:S}),v&&(0,i.jsx)(q,{isOpen:v,onClose:()=>y(!1),onConfirm:A})]})},G=(0,s.forwardRef)(Z)},30905:function(e,t,r){"use strict";r.d(t,{X:function(){return N}});var i=r(85893),n=r(7335),l=r(23100),a=r(81941),o=r(204),s=r(70654),d=r(96177),c=r(96272),u=r(56877),m=r(89056),x=r(67294),p=r(87536),h=r(79352),g=r(91293),f=r(92752),b=r(31963),j=r(31948),v=r(44504),y=r(55819),S=r(73793),w=r(1004),_=r(56005),C=r(49394),I=r(80333),k=r(69558),z=r(19694),T=r(35081);let A=e=>{let{isOpen:t,onClose:r,setValue:n,watch:l,name:a,aspectCrop:o,circularCrop:s,handleGeneratePreview:d,defaultTags:c,isDisabled:u,onMediaSelected:m,requireCaptionAndCredit:x}=e;return(0,i.jsxs)(f.u_,{isOpen:t,onClose:r,size:"xl",children:[(0,i.jsx)(b.Z,{}),(0,i.jsxs)(j.h,{bg:"white",children:[(0,i.jsx)(v.x,{children:"Gerenciamento de imagens"}),(0,i.jsx)(y.o,{}),(0,i.jsx)(S.f,{children:(0,i.jsxs)(w.m,{isFitted:!0,children:[(0,i.jsxs)(_.t,{children:[(0,i.jsx)(C.O,{children:"Selecionar imagens"}),(0,i.jsx)(C.O,{children:"Fazer upload de imagem"})]}),(0,i.jsxs)(I.n,{children:[(0,i.jsx)(k.x,{children:(0,i.jsx)(T.m,{watch:l,name:a,setValue:n,onClose:r,isDisabled:u,onMediaSelected:m,requireCaptionAndCredit:x})}),(0,i.jsx)(k.x,{children:(0,i.jsx)(z.z,{name:a,setValue:n,onClose:r,aspectCrop:o,circularCrop:s,handleGeneratePreview:d,defaultTags:c,isDisabled:u,onMediaSelected:m})})]})]})})]})]})},M=e=>{var t;let{fields:r,media:i,setValue:n,watch:l}=e;if(!r)return;let a=e=>!String(null!==(t=l(e))&&void 0!==t?t:"").trim();r.title&&i.name&&a(r.title)&&n(r.title,i.name),r.alt&&i.altText&&a(r.alt)&&n(r.alt,i.altText)};var P=r(49850),E=r(87551),F=r(81872);let R=e=>{let{name:t,setValue:r,error:p,label:f,watch:b,clearErrors:j,uploadId:v,initialPreviewUrl:y,maxHeight:S="64",maxWidth:w,aspectCrop:_,circularCrop:C,handleGeneratePreview:I,defaultTags:k,showClearButton:z=!1,isDisabled:T,autoFillFromMedia:R,requireCaptionAndCredit:L=!1,onMissingCaptionAndCredit:W}=e,{isOpen:H,onClose:N,onOpen:O}=(0,n.q)(),[U,q]=(0,x.useState)(y),[D,B]=(0,x.useState)(!1),V=(0,x.useRef)(v),Z=(0,x.useCallback)(async()=>{try{let e=await g.h.get("/v1/admin/uploads/".concat(v));q(e.data.url),B(L&&(0,E.h)({media:e.data}))}catch(e){}},[v,L]),G=e=>M({fields:R,media:e,setValue:r,watch:b});return(0,x.useEffect)(()=>{if(!v){q(void 0),B(!1);return}if(j(),!L&&v===V.current&&y){q(y);return}Z()},[v,L]),(0,x.useEffect)(()=>{null==W||W(D)},[D]),(0,x.useEffect)(()=>{if(!D)return;let e=()=>Z();return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[D,Z]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l.xu,{background:"blackAlpha.50",rounded:"md",h:"64",maxW:w,maxH:S,position:"relative",w:"100%",children:[!!U&&(0,i.jsx)(a.E,{src:U,alt:"Pr\xe9-visualiza\xe7\xe3o da imagem selecionada",h:"100%",w:"100%",objectFit:"contain"}),z&&(0,i.jsx)(o.k,{rounded:"full",zIndex:2,position:"absolute",top:2,right:5,cursor:"pointer",onClick:()=>r(t,null),children:(0,i.jsx)(F.JLH,{size:28})}),(0,i.jsx)(o.k,{position:"absolute",top:"0",width:"100%",h:"100%",zIndex:"1",justify:"center",align:"center",children:(0,i.jsxs)(s.NI,{isInvalid:!!p,maxW:"20",children:[!!f&&(0,i.jsx)(d.l,{w:"100%",htmlFor:t,display:"flex",alignItems:"center",fontWeight:"bold",textStyle:"textMD",children:f}),(0,i.jsx)(c.z,{size:"80",colorScheme:"gray",padding:"5",onClick:O,border:p&&"1px dashed red",children:(0,i.jsx)(u.J,{as:h.KpO,fontSize:"50"})}),p&&(0,i.jsx)(m.J1,{my:"0",ml:"2",pt:"2",fontSize:"xs",children:p.message})]})})]}),D&&(0,i.jsx)(P.B,{mediaSecureId:v}),H&&(0,i.jsx)(A,{isOpen:H,onClose:N,setValue:r,name:t,watch:b,aspectCrop:_,cir
1cularCrop:C,handleGeneratePreview:I,defaultTags:k,isDisabled:T,onMediaSelected:G,requireCaptionAndCredit:L})]})},L=e=>{let t=e.watch(e.name);return(0,i.jsx)(R,{...e,uploadId:t})},W=e=>{let t=(0,p.qo)({control:e.control,name:e.name});return(0,i.jsx)(R,{...e,uploadId:t})},H=e=>e.control?(0,i.jsx)(W,{...e}):(0,i.jsx)(L,{...e}),N=(0,x.forwardRef)(H)},71904:function(e,t,r){"use strict";r.d(t,{f:function(){return m}});var i=r(85893),n=r(70654),l=r(96177),a=r(89056),o=r(88911),s=r(85223),d=r(87536),c=r(67294);let u=e=>{let{name:t,label:r,placeholder:u,options:m,error:x=null,control:p,comments:h,...g}=e,f=(0,d.cI)(),[b,j]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{j(!0)},[]),b)?(0,i.jsx)(d.RV,{...f,children:(0,i.jsx)(d.Qr,{control:p,name:t,render:e=>{let{field:{onChange:t,onBlur:d,value:c,name:x,ref:p},fieldState:{error:f}}=e;return(0,i.jsxs)(n.NI,{isInvalid:!!f,children:[!!r&&(0,i.jsx)(l.l,{w:"100%",htmlFor:x,display:"flex",alignItems:"center",fontWeight:"bold",children:r}),(0,i.jsx)(s.Z,{isMulti:!0,size:"lg",name:x,onChange:t,onBlur:d,value:c,options:b?m:[],placeholder:u,closeMenuOnSelect:!1,noOptionsMessage:()=>"Sem op\xe7\xf5es",loadingMessage:()=>"Carregando",ref:p,...g}),f&&(0,i.jsx)(a.J1,{fontSize:"xs",children:f.message}),h&&(0,i.jsx)(o.x,{fontSize:"sm",children:h})]})}})}):null},m=u},51969:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return eG},default:function(){return eJ}});var i=r(85893),n=r(93194),l=r(7335),a=r(91669),o=r(76684),s=r(39849),d=r(23100),c=r(54641),u=r(5284),m=r(36275),x=r(96272),p=r(70003),h=r(59200),g=r(56877),f=r(204),b=r(67294),j=r(87536),v=r(16310),y=r(47116),S=r(48228),w=r(39559),_=r(89198),C=r(33147),I=r(91293),k=r(6347),z=r(9076),T=r(53392),A=r(84920),M=r(80471),P=r(98053),E=r(94264),F=r(95259),R=r(57843),L=r(74127),W=r(49778),H=r(33680),N=r(30905),O=r(87551),U=r(16308),q=r(71904),D=r(60286),B=r(52824),V=r(28454),Z=r(39002),G=r(82340),J=r(1700),K=r(79352),$=r(31708),X=r(776),Q=r(81941),Y=r(88911),ee=r(41664),et=r.n(ee);function er(e){var t;let{footer_menu_left:r,footer_menu_right:n,socialMedias:l,customBackgroud:a,customLogo:o}=e;return(0,i.jsxs)(f.k,{as:"footer",w:"100%",minH:"26.25rem",bg:a||"backgroundHeader",direction:"column",alignItems:"center",p:"4",children:[(0,i.jsxs)($.r,{w:"100%",maxW:"1326px",paddingTop:"16",templateColumns:"repeat(12, 1fr)",gap:8,children:[(0,i.jsxs)(X.P,{colSpan:6,children:[(0,i.jsx)(et(),{href:"/",children:(0,i.jsx)(Q.E,{height:"110px",width:"336px",fit:"
1contain",src:o?o.url:"/logoSAplus.png",alt:null!==(t=null==o?void 0:o.alt_text)&&void 0!==t?t:"Logo SA"})}),(0,i.jsx)(Y.x,{marginTop:"4",as:"a",color:"#FFF",textStyle:"textSM",href:"mailto:[email protected]",children:"[email protected]"})]}),(0,i.jsx)(X.P,{colSpan:3,children:r.map(e=>(0,i.jsx)(et(),{href:e.url,passHref:!0,prefetch:!1,children:(0,i.jsx)(Y.x,{textStyle:"textSM",fontWeight:"medium",color:"#FFF",textTransform:"uppercase",children:e.title})},e.secure_id))}),(0,i.jsx)(X.P,{colSpan:3,children:n.map(e=>(0,i.jsx)(et(),{href:e.url,passHref:!0,prefetch:!1,children:(0,i.jsx)(Y.x,{textStyle:"textSM",fontWeight:"medium",color:"#FFF",textTransform:"uppercase",children:e.title})},e.secure_id))})]}),(0,i.jsx)(c.U,{spacing:1,maxW:"1326px",width:"100%",justify:"flex-start",mt:"6",children:null==l?void 0:l.map(e=>(0,i.jsx)(f.k,{fontSize:"sm",alignItems:"center",justify:"center",p:"5",w:"5",h:"5",rounded:"full",bg:e.background,children:(0,i.jsx)(Q.E,{src:e.icon.url,width:"LinkedIn"===e.name?20:25,height:"LinkedIn"===e.name?20:25,style:{maxWidth:"LinkedIn"===e.name?"20px":"25px",maxHeight:"LinkedIn"===e.name?"20px":"25px",objectFit:"contain"}})},e.secure_id))}),(0,i.jsx)(c.U,{position:"absolute",bottom:"14",right:"10",spacing:"10",children:(0,i.jsx)(Q.E,{src:"/cinva.png",alt:"Logo Cinva",height:"95px"})}),(0,i.jsx)(f.k,{marginTop:"14",children:(0,i.jsx)(Y.x,{color:"#FFF",fontWeight:"medium",children:"\xa9 Somos uma marca do CINVA (CENTRO DE INTELIGENCIA E NEGOCIOS DO VAREJO - CINVA LTDA). \xa9 2023 SA+ Ecossistema de Varejo. Todos os direitos Reservados"})})]})}var ei=r(97822),en=r(8085),el=r(25675),ea=r.n(el),eo=r(63750),es=r(89583),ed=r(51649),ec=r(37106);function eu(e){var t,r;let{menuMain:n,subMain:l,submenuVisibility:a,last_news:s}=e;return(0,i.jsxs)(f.k,{as:"header",w:"100%",h:{sm:"auto",xl:"26.25rem","3xl":"21.25rem"},bg:"backgroundHeader",direction:"column",alignItems:"center",children:[(0,i.jsxs)(c.U,{w:"100%",h:"3.125rem",minH:"3.125rem",bg:"backgroundSubHeader",px:5,justifyContent:"space-between",display:{sm:"none",xl:"flex"},children:[s&&s[0]&&(0,i.jsxs)(c.U,{spacing:4,children:[(0,i.jsx)(f.k,{rounded:"14",bg:"#de0045",maxH:"1.875rem",px:3,py:2,justifyContent:"center",align:"center",children:(0,i.jsx)(Y.x,{color:"#FFF",fontWeight:"bold",fontSize:"sm",pb:"3",children:"\xdaLTIMAS NOT\xcdCIAS"})}),(0,i.jsx)(Y.x,{as:et(),href:"/",color:"#FFF",fontSize:"sm",pb:"3",children:s[0].title})]}),(0,i.jsxs)(c.U,{children:[(0,i.jsx)(g.J,{as:es.fSQ,fontSize:"lg",color:"#fff"}),(0,i.jsx)(Y.x,{color:"#FFF",fontSize:"sm",pb:"3",children:(0,en.Z)(new Date,"dd/MM/yyyy")})]})]}),(0,i.jsxs)($.r,{w:"100%",h:"100%",px:"5",display:{sm:"none",xl:"grid"},gridTemplateColumns:{xl:"400px 1fr 400px","2xl":"440px 1fr 440px"},children:[(0,i.jsx)(f.k,{align:"center",children:(0,i.jsxs)(c.U,{align:"center",rounded:"3xl",justifyContent:"center",border:"2px solid #FFF",py:"1",w:"177px",maxWidth:"177px",children:[(0,i.jsx)(g.J,{as:es.SRX,fontSize:"lg",color:"white"}),(0,i.jsx)(Y.x,{mb:"10",pb:"4",color:"white",children:"NEWSLETTER"})]})}),(0,i.jsx)(ea(),{src:"https://cdn.samais.com.br/portal/logoSAplus.png",alt:"SA+ Ecossistema de Varejo",height:100,width:336,sizes:"(max-width: 170px) 100vw, (max-width: 400px) 50vw, 33vw",style:{maxHeight:"100px",objectFit:"contain",margin:"0 auto"}}),(0,i.jsxs)(c.U,{spacing:2,justify:"flex-end",children:[(0,i.jsx)(d.xu,{paddingLeft:2,children:(0,i.jsx)(c.U,{justify:"center",align:"center",rounded:"full",bg:"white",height:"48px",paddingX:0,border:"2px solid #EDF2F7",w:"48px",spacing:0,children:(0,i.jsx)(g.J,{as:K.Qcu,fontSize:"lg",color:"black"})})}),(0,i.jsx)(ei.i,{orientation:"vertical",h:"12",borderLeft:"2px",color:"white"}),(0,i.jsx)(f.k,{children:(0,i.jsxs)(c.U,{mr:{sm:2,"2xl":10},minW:"180px",children:[(0,i.jsx)(eo._Tb,{size:35,color:"#fff"}),(0,i.jsxs)(o.K,{gap:0,align:"flex-start",children:[(0,i.jsxs)(Y.x,{fontWeight:"bold",color:"#fff",mb:"-2",mt:-2,children:["Ol\xe1,"," ","fa\xe7a seu login"]}),(0,i.jsxs)(f.k,{align:"center",children:[(0,i.jsx)(Y.x,{maxW:"140px",color:"#fff",fontWeight:"600",mr:2,lineHeight:4,children:"ou cadastre-se"}),(0,i.jsx)(ed.OId,{size:12,color:"#fff"})]})]})]})})]})]}),(0,i.jsx)(d.xu,{w:"100%",h:"8px",bg:"#de1c47",filter:"brightness(0.5)",display:{sm:"none",xl:"block"}}),(0,i.jsx)(d.xu,{h:"8px"}),n.length?(0,i.jsx)($.r,{w:"100%",px:"5",gap:"3",maxW:"1366px",overflow:"hidden",bg:"backgroundHeader",display:{sm:"none",xl:"grid"},h:"100%",minH:"auto",templateColumns:{sm:"repeat(4, 1fr)","3xl":"repeat(5, 1fr)"},children:n.map((e,r)=>{var n,l,a,o,s,d,u,m,p,h;return(0,i.jsx)(x.z,{h:(null===(n=e.arm)||void 0===n?void 0:n.color_header)?"100%":void 0,size:"sm",fontSize:"md",variant:"ghost",color:"white",rounded:"0",px:(null===(l=e.arm)||void 0===l?void 0:l.color_header)?"8":0,borderBottomWidth:(null===(a=e.arm)||void 0===a?void 0:a.color_header)?(null===(o=e.arm)||void 0===o?void 0:o.color_header)===void 0&&0!==r?"2px":"16px":"2px",borderColor:{sm:0===r?"#de0045":"transparent",lg:(null===(s=e.arm)||void 0===s?void 0:s.color_header)?null===(d=e.arm)||void 0===d?void 0:d.color_header:0===r?"#de0045":"transparent"},bg:(null===(u=e.arm)||void 0===u?void 0:u.color_header)&&0===r?null===(m=e.arm)||void 0===m?void 0:m.color_header:"inherit",transform:(null===(p=e.arm)||void 0===p?void 0:p.color_header)?"skew(-25deg)":"none",children:(0,i.jsxs)(c.U,{transform:(null===(h=e.arm)||void 0===h?void 0:h.color_header)?"skew(25deg)":"none",children:[e.icon&&(0,i.jsx)(Q.E,{src:e.icon.url,alt:null!==(t=e.icon.alt_text)&&void 0!==t?t:e.title,width:"16px",height:"16px"}),(0,i.jsx)(Y.x,{as:"h2",fontWeight:"bold",fontSize:"md",mb:e.icon?"0.50rem":"0.25rem",children:e.title})]})},e.secure_id)})}):void 0,n.length&&"visible"===a?(0,i.jsx)(f.k,{bg:"#EDF2F7",w:"100%",justifyContent:"center",display:{sm:"none",xl:"flex"}
1,children:(0,i.jsx)($.r,{minH:"3.75rem",px:"5",bg:"#EDF2F7",gap:{sm:4,"3xl":5},alignContent:"center",justifyItems:"center",templateColumns:{sm:"repeat(5, 1fr)","3xl":"repeat(9, auto)"},children:l.map(e=>(0,i.jsx)(b.Fragment,{children:e.menusChildren.length?(0,i.jsx)(p.q,{border:"none",css:{"&>button:first-of-type":{boxShadow:"none"}},children:e.menusChildren.map(e=>(0,i.jsx)(h.s,{as:et(),href:e.url,children:e.title},e.secure_id))}):(0,i.jsxs)(c.U,{transform:"none",children:[e.icon&&(0,i.jsx)(Q.E,{src:e.icon.url,alt:null!==(r=e.icon.alt_text)&&void 0!==r?r:e.title,width:"16px",height:"16px"}),(0,i.jsx)(Y.x,{as:"h2",fontWeight:"bold",fontSize:"md",pb:5,children:e.title})]})},e.secure_id))})}):"backToHome"===a?(0,i.jsx)(f.k,{bg:"#EDF2F7",w:"100%",justifyContent:"center",display:{sm:"none",xl:"flex"},children:(0,i.jsx)(x.z,{size:"md",rightIcon:(0,i.jsx)(g.J,{as:ec.owl,fontWeight:"bold"}),onClick:()=>{},children:"Retornar ao Portal SA+"})}):(0,i.jsx)(i.Fragment,{})]})}var em=r(89594),ex=r(76901),ep=r(33838),eh=r(80552),eg=r(42699),ef=r(78420),eb=r(91831),ej=r(96167),ev=r(88252),ey=r(11059);let eS=e=>{let{icon:t,linkHref:r,sizeIcon:n,text:l,...a}=e;return(0,i.jsxs)(x.z,{as:et(),href:r,passHref:!0,size:"sm",fontSize:"sm",alignItems:"center",variant:"outline",color:"white",p:l?"6":"5",w:l?void 0:"5",h:l?void 0:"5",rounded:l?"3xl":"full",_hover:{bg:"#fff",color:"#7d4f62"},...a,children:[(0,i.jsx)(g.J,{as:t||es.SRX,fontSize:n||"lg"}),l&&(0,i.jsx)(Y.x,{mb:"-0.188rem",ml:"2",children:l})]})};function ew(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eS,{height:"48px",size:"lg",variant:"solid",bg:"black",linkHref:"/",target:"_blank",icon:K.Gh0,_hover:{bg:"#292728"}}),(0,i.jsx)(eS,{height:"48px",size:"lg",variant:"solid",colorScheme:"facebook",linkHref:"/",target:"_blank",icon:K.NqZ}),(0,i.jsx)(eS,{height:"48px",size:"lg",variant:"solid",colorScheme:"linkedin",linkHref:"/",target:"_blank",icon:K.ExP}),(0,i.jsx)(eS,{height:"48px",size:"lg",variant:"solid",colorScheme:"whatsapp",linkHref:"/",target:"_blank",icon:K.tdG}),(0,i.jsx)(eS,{height:"48px",size:"lg",variant:"solid",colorScheme:"telegram",linkHref:"/",target:"_blank",icon:K.jll})]})}var e_=r(63343),eC=r(24486);let eI=e=>{var t,r,n;let{post:l}=e,s=(0,e_.S)({base:!1,lg:!0});return(0,i.jsxs)(a.g,{as:et(),href:eC.Z.formatPostLink({post:l}),width:"100%",maxWidth:s?void 0:"405px",children:[(0,i.jsxs)(o.K,{width:"100%",position:"relative",children:[(0,i.jsx)(Q.E,{rounded:"lg",height:"150px",width:"100%",objectFit:"cover",src:null===(t=l.thumbnail)||void 0===t?void 0:t.url,alt:null!==(n=null===(r=l.thumbnail)||void 0===r?void 0:r.alt_text)&&void 0!==n?n:l.title}),!!l.tags&&l.tags.length>0&&(0,i.jsx)(em.Vp,{size:"md",borderRadius:"full",variant:"solid",position:"absolute",background:(0,ey.t)(0),right:"11px",top:"10px",children:(0,i.jsx)(em.Sn,{pb:"4",children:l.tags.split(",")[0]})})]}),(0,i.jsx)(Y.x,{as:"h3",textStyle:"headerXL",fontSize:"0.9rem",noOfLines:2,pb:"6",children:l.title})]})};var ek=r(5197),ez=r(11163),eT=r(70654),eA=r(96177),eM=r(28129),eP=r(89154);let eE=(e,t)=>{let{name:r,label:n,error:l=null,isHome:a=!1,background:o,placeholder:s}=e,d=!a;return(0,i.jsxs)(eT.NI,{isInvalid:!!l,children:[!!n&&(0,i.jsx)(eA.l,{w:"100%",htmlFor:r,display:"flex",alignItems:"center",fontWeight:"bold",children:n}),(0,i.jsxs)(c.U,{justify:d?"space-between":"center",align:"center",rounded:"full",bg:a?"white":o,height:"48px",paddingX:d?4:0,border:"2px solid #EDF2F7",w:d?void 0:"48px",spacing:d?2:0,children:[(0,i.jsx)(g.J,{as:K.Qcu,fontSize:"lg",color:"black"}),d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eM.I,{fontSize:{sm:"md",md:"lg",xl:"sm","2xl":"lg"},id:r,name:r,size:"lg",variant:"unstyled",ref:t,bg:"transparent",placeholder:s,height:"100%",minW:"30px"}),(0,i.jsx)(eP.h,{size:"xs","aria-label":"Icon Right",colorScheme:"pink",rounded:"full",icon:(0,i.jsx)(g.J,{as:K.wKp,fontSize:"xl"})})]})]})]})},eF=(0,b.forwardRef)(eE);function eR(e){let{text:t,heightImage:r,...n}=e;return(0,i.jsxs)(Y.x,{textTransform:"uppercase",width:"100%",fontSize:"2rem",fontWeight:"bold",lineHeight:"normal",color:"#000",display:"flex",...n,children:[(0,i.jsx)(Q.E,{src:"/iconTitles.png",alt:"\xcdcone",height:null!=r?r:"22px",marginRight:"3",mt:"4"})," ",t]})}let eL=e=>{var t;let{socialMedias:r,arm:n,showInputSearch:l=!0,notViewAds:a=!1}=e,o=(0,ez.useRouter)();return(0,b.useLayoutEffect)(()=>
1{if(!a){let e=o.asPath.includes("publicacoes")||o.asPath.includes("detalhe/reportagens")?"Publica\xe7\xf5es Lateral 390x300":o.asPath.includes("noticias")?"Noticias Lateral 390x300":o.asPath.includes("blog")?"Blog Lateral 390x300":"P\xe1ginas 390x300";"P\xe1ginas 390x300"===e&&o.query.slug?((0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112102742-0",[[390,300],[312,240]],["".concat(e," 1"),o.query.slug]),(0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112202742-0",[[390,300],[312,240]],["".concat(e," 2"),o.query.slug]),(0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112302742-0",[[390,300],[312,240]],["".concat(e," 3"),o.query.slug])):((0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112102742-0",[[390,300],[312,240]],["".concat(e," 1")]),(0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112202742-0",[[390,300],[312,240]],["".concat(e," 2")]),(0,ev.d)("/100074611/Bloco-390x300","div-gpt-ad-1711112302742-0",[[390,300],[312,240]],["".concat(e," 3")]))}},[]),(0,i.jsxs)(f.k,{width:"100%",flexDir:"column",align:"center",maxW:{sm:void 0,"2xl":"390px"},children:[l&&(0,i.jsx)(eF,{name:"search",arm:n}),!a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eb.U,{id:"div-gpt-ad-1711112102742-0",customStyle:{marginTop:"2.5rem"}}),(0,i.jsx)(eb.U,{id:"div-gpt-ad-1711112202742-0",customStyle:{marginTop:"2.5rem"}})]}),(0,i.jsxs)(f.k,{marginTop:"10",flexDir:"column",w:"100%",maxWidth:"350px",children:[(0,i.jsx)(eR,{text:"Siga-nos",fontSize:"x-large",heightImage:"20px",marginBottom:"4",as:"h3"}),(0,i.jsx)(ek.QI,{rounded:"md",borderWidth:"2px",borderColor:"gray.100",width:"100%",marginLeft:"0",padding:"1rem 1rem",spacing:"4",listStyleType:"none",children:r.map(e=>(0,i.jsxs)(ek.HC,{display:"flex",bg:e.background,rounded:"30px",alignItems:"center",padding:"0.6rem 1.2rem",as:et(),href:e.link,target:"_blank",passHref:!0,minH:"14",children:[(0,i.jsx)(Q.E,{src:e.icon.url,alt:null!==(t=e.icon.alt_text)&&void 0!==t?t:e.name,maxW:"25",objectFit:"contain"}),(0,i.jsx)(Y.x,{marginLeft:"2",pb:2,textStyle:"headerSM",color:"#FFF",fontWeight:"black",children:e.followers}),(0,i.jsx)(Y.x,{marginLeft:"3",pb:2,textStyle:"headerSM",color:"#FFF",fontWeight:"black",children:"SEGUIDORES"})]},e.secure_id))})]}),!a&&(0,i.jsx)(eb.U,{id:"div-gpt-ad-1711112302742-0",customStyle:{marginTop:"2.5rem"}})]})},eW=e=>{var t,r,n,l,u,m,x,p,h,j;let{socialMedias:v,post:y,relatedPosts:S,notViewSideAds:w=!1,notViewTopoAds:_=!1}=e,C=y.tags?y.tags.split(","):[];(0,b.useLayoutEffect)(()=>{_||(0,ev.d)("/100074611/Bloco-1160x170","div-gpt-ad-1711112002742-0",[[1160,170],[750,100],[468,60],[320,50]],["Publica\xe7\xf5es Topo 1160x170"])},[]);let I=(0,b.useCallback)(e=>{if(e.length>13){let t=e.substring(0,13).split(" ").slice(0,-1);return t.join(" ")+"..."}return e},[]);return(0,i.jsxs)(f.k,{flexDirection:"column",align:"center",as:"section",background:"#FFF",py:"6",px:24,pb:"20",children:[!_&&(0,i.jsx)(eb.U,{id:"div-gpt-ad-1711112002742-0"}),(0,i.jsxs)(f.k,{gap:"8",marginTop:"16",flexDirection:"row",children:[(0,i.jsxs)(a.g,{width:"100%",maxWidth:"950px",align:"flex-start",children:[!!y.tags&&y.tags.length&&(0,i.jsx)(s.M,{columns:{sm:3,lg:6},gap:"2",children:y.tags.split(",").slice(0,6).map((e,t)=>(0,i.jsx)(em.Vp,{size:"lg",borderRadius:"full",variant:"solid",background:(0,ey.t)(t),children:(0,i.jsx)(em.Sn,{pb:"4",lineHeight:"8",children:I(e)})},e+t))}),(0,i.jsx)(Y.x,{as:"h2",textStyle:"headerXL",fontSize:"2rem",children:y.title}),y&&(y.author||(null==y?void 0:y.is_produced))&&(0,i.jsxs)(c.U,{align:"center",children:[(0,i.jsx)(ex.q,{size:"xs",name:y.is_produced?y.produced:null==y?void 0:null===(t=y.author)||void 0===t?void 0:t.name,src:y.is_produced?"":null==y?void 0:null===(r=y.author)||void 0===r?void 0:null===(n=r.avatar)||void 0===n?void 0:n.url,mt:"4"}),(0,i.jsxs)(Y.x,{pt:"5px",textStyle:"textSM",color:"blackAlpha.700",textTransform:"uppercase",children:["POR ",y.is_produced?y.produced:null===(l=y.author)||void 0===l?void 0:l.name]}),!!y.is_sponsored&&!!y.sponsor&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.xu,{w:"1",h:"1",background:"gray.400",rounded:"full"}
1),(0,i.jsx)(Y.x,{pt:"5px",textStyle:"textSM",color:"blackAlpha.700",textTransform:"uppercase",children:y.sponsor.toLowerCase().includes("patrocinado")?y.sponsor:"PATROCINADO POR ".concat(y.sponsor)})]}),y.publish_at&&(0,i.jsxs)(Y.x,{pt:"5px",marginLeft:"2",mb:"-0.18rem",textStyle:"textSM",color:"blackAlpha.700",textTransform:"uppercase",children:["Publicado em:"," ",(0,i.jsx)("time",{dateTime:(0,z.a2)(y.publish_at),children:(0,z.YG)(y.publish_at)})]})]}),y&&y.thumbnail&&(!y.publish_at||(0,eg.Z)((0,ef.Z)(y.publish_at),(0,ef.Z)("2024-04-06")))&&(0,i.jsx)(Q.E,{src:y.thumbnail.url,alt:null!==(j=y.thumbnail.alt_text)&&void 0!==j?j:y.title,objectFit:"cover",w:"100%",maxH:"lg",rounded:"md"}),y.content&&(0,i.jsxs)(d.xu,{width:"100%",position:"relative",sx:{"@media (max-width: 600px)":{maxW:"360px"},"@media (max-width: 415px)":{maxW:"300px"}},children:[(0,i.jsx)(ej.V,{data:y.content,sx:{a:{color:"blue",textDecoration:"underline"},blockquote:{borderWidth:"1px !important",borderTopWidth:"3px !important",borderBottomWidth:"2px !important",borderRadius:"8px !important",":before":{lineHeight:"1.5rem"}}}}),(0,i.jsxs)(a.g,{position:"absolute",left:"-100",top:"0",sx:{"@media (max-width:768px)":{display:"none"}},children:[(0,i.jsx)(em.Vp,{size:"md",mb:"10",colorScheme:"whiteAlpha",color:"black",style:{transform:"rotate(-90deg)"},children:"COMPARTILHAR"}),(0,i.jsx)(ew,{})]})]}),y.tags&&(0,i.jsxs)(o.K,{py:"2",my:"6",w:"100%",borderY:"1px",borderColor:"gray.100",justify:"space-between",direction:{sm:"column",lg:C.length>=6?"column":"row"},children:[(0,i.jsxs)(d.xu,{children:[(0,i.jsx)(em.Vp,{as:"span",mr:"2",pb:"4",lineHeight:"8",size:"lg",bg:"black",color:"white",rounded:"full",children:"TAGS:"}),C.map((e,t)=>(0,i.jsx)(ep.r,{as:et(),href:"/buscar?q=".concat(e),children:"".concat(e).concat(t+1!==C.length?",":"")},"".concat(t,"_").concat(e)))]}),(0,i.jsxs)(c.U,{children:[(0,i.jsx)(em.Vp,{size:"lg",colorScheme:"whiteAlpha",color:"black",children:"COMPARTILHAR:"}),(0,i.jsx)(ew,{})]})]}),(0,i.jsx)(eR,{as:"h2",text:"Not\xedcias relacionadas",fontSize:"1rem",heightImage:"11px"}),(0,i.jsx)(s.M,{width:"100%",h:"min-content",columns:{sm:2,lg:4},spacing:"2",children:S.map(e=>(0,i.jsx)(eI,{post:e},e.secure_id))}),y.author&&!y.is_produced&&(0,i.jsxs)(c.U,{my:"20",w:"100%",alignItems:"center",children:[(0,i.jsx)(ex.q,{src:null===(u=y.author)||void 0===u?void 0:null===(m=u.avatar)||void 0===m?void 0:m.url,name:null===(x=y.author)||void 0===x?void 0:x.name,w:{sm:"32",lg:"48"},h:{sm:"32",lg:"48"},minW:{sm:"32",lg:"48"},minH:{sm:"32",lg:"48"},size:"2xl",border:"8px solid white",bg:"burlywood"}),(0,i.jsxs)(a.g,{w:"100%",bg:"gray.100",roundedRight:"md",justify:"center",align:"flex-start",py:{sm:"6",lg:"12"},px:{sm:"6",lg:"12"},pl:{sm:"24",lg:"32"},ml:"-20",children:[(0,i.jsx)(Y.x,{textStyle:"headerXL",children:null===(p=y.author)||void 0===p?void 0:p.name}),(0,i.jsx)(Y.x,{textStyle:"textLG",children:null===(h=y.author)||void 0===h?void 0:h.description})]})]}),(0,i.jsxs)(a.g,{w:"100%",spacing:"6",children:[(0,i.jsxs)(c.U,{w:"100%",mt:"2",children:[(0,i.jsx)(g.J,{as:K.M$9,color:"red.500",fontSize:"1.5rem"}),(0,i.jsx)(Y.x,{as:"h2",textStyle:"headerXL",color:"red.500",pb:6,children:"Coment\xe1rios 0"})]}),(0,i.jsx)(eR,{as:"h2",mt:"14",text:"Envie seu coment\xe1rio",fontSize:"1.5rem",heightImage:"22px"}),(0,i.jsxs)(a.g,{w:"100%",spacing:"4",align:"flex-end",children:[(0,i.jsxs)(eh.E,{w:"100%",spacing:"8",children:[(0,i.jsx)(eh.U,{w:{sm:"100%",xl:"calc(50% - 32px)"},children:(0,i.jsx)(D.g,{label:"Coment\xe1rio *",h:255,name:"comment"})}),(0,i.jsx)(eh.U,{w:{sm:"100%",xl:"calc(50% - 32px)"},children:(0,i.jsxs)(o.K,{spacing:"6",w:"100%",children:[(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(R.I,{label:"Nome *",name:"name"})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(R.I,{label:"E-mail *",name:"email"})})]})})]}),(0,i.jsx)(F.G,{colorScheme:"red",isDisabled:!0,pb:"4",children:"Enviar"})]})]})]}),(0,i.jsx)(eL,{socialMedias:v,notViewAds:w})]})]})};function eH(e){let{data:t}=e;return(0,i.jsxs)(d.xu,{bg:"white",children:[(0,i.jsx)(eu,{last_news:t.last_news,menuMain:t.menuMain,subMain:t.subMain,submenuVisibility:"visible"}),(0,i.jsx)(eW,{post:t.post,relatedPosts:t.relatedPosts,socialMedias:t.social_medias}),(0,i.jsx)(er,{footer_menu_left:t.footer_menu_left,footer_menu_right:t.footer_menu_right,socialMedias:t.social_medias})]})}var eN=r(61120),eO=r.n(eN),eU=r(91819);async function eq(e){return new Promise(t=>{setTimeout(t,e)})}let eD=null;async function eB(e){let{typeUpload:t,ref:r,title:i}=e;await eq(400),await document.fonts.ready;let n=r.current;if(!n)return;let l=function(){if(eD)return eD;let e=Array.from(document.fonts),t=e.find(e=>
1e.family.includes("League_Spartan")||e.family.includes("League Spartan"));if(t)return eD=t.family;let r=document.querySelectorAll('[class*="League_Spartan"], [class*="League Spartan"]');if(r.length>0){let e=window.getComputedStyle(r[0]),t=e.fontFamily,i=t.split(",").map(e=>e.trim().replace(/['"]/g,"")),n=i.find(e=>e.includes("League_Spartan")||e.includes("League Spartan"));if(n)return eD=n}let i=document.querySelectorAll("*");for(let e of i){let t=e.className;if("string"==typeof t&&t.includes("League_Spartan")){let t=window.getComputedStyle(e),r=t.fontFamily,i=r.split(",").map(e=>e.trim().replace(/['"]/g,"")),n=i.find(e=>e.includes("League_Spartan"));if(n)return eD=n}}return null}(),a=l?function(e){let t=e.replace("League_Spartan","League_Spartan_Fallback");return"".concat(e,", ").concat(t,", 'League Spartan', sans-serif")}(l):"'League Spartan', sans-serif",o=new Map,s=n.querySelectorAll("*");s.forEach(e=>{let t=e;o.set(e,t.style.fontFamily),t.style.fontFamily=a});let d=n,c=d.style.fontFamily;d.style.fontFamily=a,n.offsetHeight,await eq(300);let u=await eO()(n,{useCORS:!0,allowTaint:!0,letterRendering:!0,backgroundColor:"pdf"===t?"#ffffff":null,scale:2,windowWidth:n.scrollWidth,windowHeight:n.scrollHeight});if(s.forEach(e=>{let t=e;t.style.fontFamily=o.get(e)||""}),d.style.fontFamily=c,"pdf"===t){let e=u.toDataURL("image/jpeg"),t=new eU.ZP("p","mm","a4",!0),r=t.getImageProperties(e),n=t.internal.pageSize.getWidth(),l=r.height*n/r.width;t.internal.pageSize.height=l,t.addImage(e,"PNG",0,0,n,l),t.save("".concat(i,".pdf"))}else{let e=u.toDataURL("image/png"),t=document.createElement("a");t.href=e,t.download="".concat(i,".png"),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}let eV=v.Ry().shape({title:v.Z_().required("T\xedtulo obrigat\xf3rio.").typeError("T\xedtulo obrigat\xf3rio."),status:v.Z_().required("Status obrigat\xf3rio.").typeError("Status obrigat\xf3rio."),publishAt:v.Z_().required("Publicar em obrigat\xf3rio.").typeError("Publicar em obrigat\xf3rio."),isSponsored:v.O7(),sponsor:v.Z_().when("isSponsored",{is:e=>e,then:e=>e.required("Patrocinador obrigat\xf3rio.").typeError("Patrocinador obrigat\xf3rio.")}),isProduced:v.Z_(),produced:v.Z_().when("isProduced",{is:e=>"other"===e,then:e=>e.required("Quem produziu \xe9 obrigat\xf3rio.").typeError("Quem produziu \xe9 obrigat\xf3rio.")}),isProprietary:v.Z_()}),eZ=e=>{var t,r,v,$;let{categoriesOptions:X,armsOptions:Q,post:Y,segmentationsOptions:ee,dataPrint:et}=e,{register:er,formState:ei,formState:{errors:en},handleSubmit:el,watch:ea,setValue:eo,clearErrors:es,control:ed,setError:ec}=(0,j.cI)({resolver:(0,w._V)({schema:eV,location:"publication",ignoreSecureId:Y.secure_id}),defaultValues:{status:Y.status,slug:Y.slug,excerpt:Y.excerpt,thumbnailSecureId:Y.thumbnail?Y.thumbnail.secure_id:"",title:Y.title,publishAt:Y.publish_at?(0,z.q_)(Y.publish_at):(0,z.q_)(new Date().toISOString()),unpublishAt:Y.unpublish_at?(0,z.q_)(Y.unpublish_at):"",categorySecureIds:Y.categories.map(e=>({label:e.title,value:e.secure_id})),armSecureIds:Y.arms.map(e=>({label:e.title,value:e.secure_id})),segmentationSecureIds:Y.segmentations.map(e=>({label:e.name,value:e.secure_id})),content:Y.content,metaDescription:Y.meta_description,metaTitle:Y.meta_title,metaKeywords:null!==(r=null===(t=Y.meta_keywords)||void 0===t?void 0:t.split(",").map(e=>e.trim()).filter(Boolean).map(e=>({label:e,value:e})))&&void 0!==r?r:[],metaRobots:Y.meta_robots,tags:Y.tags?Y.tags.split(",").map(e=>({label:e,value:e})):[],isSponsored:String(Number(!!Y.is_sponsored)),sponsor:null!==(v=Y.sponsor)&&void 0!==v?v:"",isProduced:Y.is_produced&&"Reportagem SA+ Conte\xfado"===Y.produced?"sa":"SA+ Branded Content"===Y.produced?"sa_branded":Y.is_produced?"other":"author",produced:null!==($=Y.produced)&&void 0!==$?$:"",isProprietary:null===Y.is_proprietary||void 0===Y.is_proprietary?"":String(Number(Y.is_proprietary))}}),{user:eu}=(0,V.Eu)(),em=(0,n.p)(),[ex,ep]=(0,b.useState)(),[eh,eg]=(0,b.useState)(!1),ef=(0,C.p)({permissions:["posts_publish"]}),eb=(0,b.useRef)(null),{isOpen:ej,onOpen:ev,onClose:ey}=(0,l.q)(),eS=Boolean(Number(ea("isSponsored"))),ew=ea("isProduced"),e_=ea("produced"),eC=ea("tags"),eI=ea("status"),ek=ea("content"),ez=ea("title");(0,b.useEffect)(()=>{var e;eo("produced","author"===ew?null===(e=Y.author)||void 0===e?void 0:e.name:"sa"===ew?"Reportagem SA+ Conte\xfado":"sa_branded"===ew?"SA+ Branded Content":null!=e_?e_:"")},[ew]);let eT=async e=>{var t;let r=document.getElementById("box-image-thumb"),i=null===(t=null==r?void 0:r.querySelector("img"))||void 0===t?void 0:t.src,{data:n}=await I.h.get("/v1/posts",{params:{postSlug:Y.slug,status:"draft"}});if(n.post)ep({...n,post:{...n.post,content:ek,thumbnail:i&&n.post.thumbnail?{...n.post.thumbnail,url:i}:n.post.thumbnail}}),ev();else{let{data:e}=await I.h.get("/v1/posts",{params:{postSlug:Y.slug}});e.post&&(ep({...e,post:{...e.post,content:ek,thumbnail:i&&e.post.thumbnail?{...e.post.thumbnail,url:i}:e.post.thumbnail}}),ev())}await eB({ref:eb,title:ez,typeUpload:e}),ey()},eA=async e=>{let{data:t}=await I.h.get("v1/admin/list/tags",{params:{search:e.trim().replace(/\s{2,}/g," ")}}),r=t.map(e=>({label:e.name,value:e.name}));return r},eM=(0,S.D)(async e=>{var t;return await I.h.put("/v1/admin/posts/".concat(Y.secure_id),{...e,metaKeywords:(null===(t=e.metaKeywords)||void 0===t?void 0:t.map(e=>e.value).join(", "))||null,metaTitle:e.metaTitle||null,metaDescription:e.metaDescription||null,metaRobots:e.metaRobots||null,armSecureIds:e.armSecureIds?e.armSecureIds.map(e=>e.value):null,categorySecureIds:e.categorySecureIds?e.categorySecureIds.map(e=>e.value):null,segmentationSecureIds:e.segmentationSecureIds?e.segmentationSecureIds.map(e=>e.value):null,tags:e.tags.length?e.tags.map(e=>e.value).toString():null,isSponsored:Boolean(Number(e.isSponsored)),isProduced:"author"!==e.isProduced,produced:"author"===e.isProduced?null:"sa"===e.isProduced?"Reportagem SA+ Conte\xfado":"sa_branded"===e.isProduced?"SA+ Branded Content":e.produced,isProprietary:""===e.isProprietary?null:Boolean(Number(e.isProprietary)),content:(0,J.z)(e.content),slug:e.slug?(0,Z.a)(e.slug):void 0})},{onSuccess:e=>{var t;k.E.invalidateQueries(["PostsAdmin"]),k.E.invalidateQueries(["Portal","BlogPostsHome"]),em({title:(null===(t=e.data)||void 0===t?void 0:t.message)||"Publica\xe7\xe3o atualizada com sucesso!",position:"top-right",status:"success",isClosable:!0}),history.back()},onError:e=>{(0,_.P)({error:e,toast:em,fallbackMessage:"Ocorreu um problema ao atualizar publica\xe7\xe3o."})}}),eP=async e=>{if(!(0,O.S)({isMissing:eh,toast:em}))try{await eM.mutateAsync(e)}catch(e){}},eE=(0,b.useRef)(null),eF=(0,y.useReactToPrint)({content:()=>eE.current});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.g,{spacing:"4",layerStyle:"container",children:(0,i.jsxs)(o.K,{as:"form",width:"100%",align:"flex-start",direction:{sm:"column",md:"row"},onSubmit:el(eP),children:[(0,i.jsxs)(a.g,{w:"100%",children:[(0,i.jsxs)(a.g,{p:"4",w:"100%",spacing:"4",layerStyle:"card",children:[(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(R.I,{placeholder:"T\xedtulo *",label:"T\xedtulo *",error:en.title,comments:"*O uso de t\xedtulos longos podem ser cortados em determinadas \xe1reas do site.",...er("title")})}),(0,i.jsx)(R.I,{placeholder:"Slug *",label:"Slug *",isDisabled:!eu||!(0,G.h)({user:eu,permissions:["slug_post_edit"],roles:["MASTER","ADMIN"]}
1),error:en.slug,...(0,w.Ct)({register:er,field:"slug",location:"publication",ignoreSecureId:Y.secure_id,setError:ec,clearErrors:es})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(L.W,{name:"tags",label:"Tags da mat\xe9ria",placeholder:"Tags da mat\xe9ria",control:ed,handleSearch:eA,separator:","})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(D.g,{label:"Resumo",placeholder:"Resumo",error:en.excerpt,...er("excerpt")})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(H.$,{label:"Conte\xfado",name:"content",setValue:eo,initialTemplate:Y.content,extraButtons:et&&"draft"===eI?[{name:"exportPage",exec:eF}]:void 0})})]}),(0,i.jsxs)(a.g,{p:"4",w:"100%",spacing:"4",layerStyle:"card",children:[(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(R.I,{placeholder:"Meta t\xedtulo",label:"Meta t\xedtulo",error:en.metaTitle,...er("metaTitle")})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(D.g,{label:"Meta descri\xe7\xe3o",placeholder:"Meta descri\xe7\xe3o",error:en.metaDescription,...er("metaDescription")})}),(0,i.jsx)(B._,{name:"metaKeywords",label:"Meta keywords",placeholder:"Digite e pressione v\xedrgula para adicionar",control:ed,separator:",",error:en.metaKeywords}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(R.I,{placeholder:"index, follow, max-image-preview:large",label:"Meta Robot",error:en.metaRobots,...er("metaRobots")})})]})]}),(0,i.jsxs)(a.g,{p:"4",w:{sm:"100%",md:"35%"},spacing:"4",layerStyle:"card",children:[(0,i.jsx)(d.xu,{id:"box-image-thumb",w:"100%",children:(0,i.jsx)(N.X,{name:"thumbnailSecureId",label:"Thumbnail",watch:ea,setValue:eo,clearErrors:es,maxHeight:"40",defaultTags:eC,requireCaptionAndCredit:!0,onMissingCaptionAndCredit:eg})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(q.f,{name:"categorySecureIds",label:"Temas",placeholder:"Temas",options:X,control:ed})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(q.f,{name:"armSecureIds",label:"Bra\xe7os",placeholder:"Bra\xe7os",options:Q,control:ed})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(q.f,{name:"segmentationSecureIds",label:"Segmenta\xe7\xf5es",placeholder:"Segmenta\xe7\xf5es",options:ee,control:ed})}),(0,i.jsx)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:(0,i.jsx)(U.r,{label:"Propriet\xe1ria",name:"isProprietary",control:ed,options:[{label:"N\xe3o",value:String(Number(!1))},{label:"Sim",value:String(Number(!0))}],error:en.isProprietary})}),(0,i.jsxs)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:[(0,i.jsx)(U.r,{label:"Patrocinado",name:"isSponsored",control:ed,options:[{label:"N\xe3o",value:String(Number(!1))},{label:"Sim",value:String(Number(!0))}],error:en.isSponsored}),eS&&(0,i.jsx)(R.I,{placeholder:"Patrocinador *",label:"Patrocinador *",error:en.sponsor,...er("sponsor")})]}),(0,i.jsxs)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:[(0,i.jsx)(U.r,{label:"Publicado",name:"isProduced",control:ed,options:[{label:"Editor",value:"author"},{label:"Reportagem SA+ Conte\xfado",value:"sa"},{label:"SA+ Branded Content",value:"sa_branded"},{label:"Outro",value:"other"}],error:en.isProduced}),(0,i.jsx)(R.I,{placeholder:"Publicado por *",label:"Publicado por *",isDisabled:"other"!==ew,error:en.produced,...er("produced")})]}),(0,i.jsxs)(s.M,{w:"100%",spacing:6,minChildWidth:"180px",children:[ef&&(0,i.jsx)(U.r,{label:"Status",name:"status",control:ed,options:T.$,error:en.status}),"draft"===eI&&(0,i.jsxs)(c.U,{children:[(0,i.jsx)(d.xu,{children:(0,i.jsx)(E.Z,{w:"min",linkHref:"/post-admin-preview/".concat(Y.slug),target:"_blank",children:"P\xe1gina preview"})}),(0,i.jsx)(d.xu,{children:(0,i.jsxs)(u.v,{children:[(0,i.jsx)(m.j,{as:x.z,rightIcon:(0,i.jsx)(M.jtV,{}),isLoading:ej,children:"Baixar preview"}),(0,i.jsxs)(p.q,{children:[(0,i.jsx)(h.s,{onClick:()=>eT("pdf"),icon:(0,i.jsx)(g.J,{as:K.TbW,fontSize:"20"}),children:"PDF"}),(0,i.jsx)(h.s,{onClick:()=>eT("png"),icon:(0,i.jsx)(g.J,{as:K.PBv,fontSize:"20"}),children:"PNG"})]})]})})]}),(0,i.jsx)(W.$,{label:"Publicar em",placeholder:"Publicar em",...er("publishAt"),error:en.publishAt}),(0,i.jsx)(W.$,{label:"Publicar at\xe9",placeholder:"Publicar at\xe9",...er("unpublishAt"),error:en.unpublishAt})]}),(0,i.jsx)(f.k,{justify:"flex-end",w:"100%",children:(0,i.jsxs)(c.U,{spacing:"4",width:"20em",children:[(0,i.jsx)(P.$,{children:"Cancelar"}),(0,i.jsx)(F.G,{isLoading:ei.isSubmitting,children:"Salvar"})]})})]})]})}),et&&"draft"===eI&&(0,i.jsx)(d.xu,{display:"none",children:(0,i.jsx)(d.xu,{ref:eE,children:(0,i.jsx)(A.default,{data:et})})}
1),ex&&(0,i.jsx)(d.xu,{display:ej?"block":"none",position:"fixed",mt:"-50000000",w:"1920px",h:"auto",ref:eb,id:"div-para-foto",children:(0,i.jsx)(eH,{data:ex})})]})};var eG=!0,eJ=eZ},84920:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return c}});var i=r(85893),n=r(9008),l=r.n(n),a=r(88224),o=r(29123),s=r(90416);let d=e=>{var t,r,n,d,c,u,m;let{data:x}=e;return(0,i.jsxs)(i.Fragment,{children:[x.settings&&(0,i.jsxs)(l(),{children:[(0,i.jsx)("link",{rel:"shortcut icon",href:x.settings.favicon.url,type:"image/png"}),(0,i.jsx)("title",{children:x.settings.head_name}),(0,i.jsx)("meta",{name:"googlebot",content:"noindex"})]}),(0,i.jsx)(o.I,{news:x.last_news,menuMain:x.menuMain,subMain:x.subMain,socialMedias:x.social_medias,submenuVisibility:(null!==(m=null===(t=x.arm)||void 0===t?void 0:t.hide_submenu)&&void 0!==m?m:null!==(u=null===(r=x.post)||void 0===r?void 0:null===(n=r.pageArm)||void 0===n?void 0:n.hide_submenu)&&void 0!==u?u:null===(d=x.post)||void 0===d?void 0:d.hide_submenu)?"hidden":"visible"}),(0,i.jsx)(s.G,{post:x.post,relatedPosts:x.relatedPosts,socialMedias:x.social_medias}),(0,i.jsx)(a.$,{footer_menu_left:x.footer_menu_left,footer_menu_right:x.footer_menu_right,socialMedias:x.social_medias,emailContact:null===(c=x.settings)||void 0===c?void 0:c.email_contact})]})};var c=!0;t.default=d},39559:function(e,t,r){"use strict";let i;r.d(t,{Ct:function(){return j},_V:function(){return f}});var n=r(55851),l=r(57492),a=r(16310),o=r(91293),s=r(39002);let d=0,c=null;function u(){d+=1,i&&(clearTimeout(i),i=void 0)}function m(e){let{slug:t,location:r,ignoreSecureId:i}=e;if(c&&c.location===r&&c.ignoreSecureId===(null!=i?i:"")&&c.masked===(0,s.a)(t.trim()))return c}async function x(e){let{slug:t,location:r,ignoreSecureId:i}=e;try{return await o.h.post("/v1/admin/slug/availability",{slug:t,location:r,ignoreSecureId:i}),{kind:"available"}}catch(t){let e=function(e){var t,r;let{error:i}=e,n=null==i?void 0:i.response;if((null==n?void 0:n.status)!==422||(null===(t=n.data)||void 0===t?void 0:t.type)!=="warning")return;let l=null===(r=n.data)||void 0===r?void 0:r.message;if(l&&l.includes("com este slug"))return l}({error:t});if(e)return{kind:"taken",message:e};return{kind:"unknown"}}}async function p(e){let{slug:t,location:r,ignoreSecureId:i,setError:n,clearErrors:l,field:a}=e,o=d,u=(0,s.a)(t.trim());if(!u){h({generation:o,run:()=>g({clearErrors:l,field:a})});return}let m=await x({slug:u,location:r,ignoreSecureId:i});h({generation:o,run:()=>(function(e){let{outcome:t,slug:r,location:i,ignoreSecureId:n,setError:l,clearErrors:a,field:o}=e;if("unknown"!==t.kind){if("available"===t.kind){g({clearErrors:a,field:o});return}c={masked:(0,s.a)(r.trim()),location:i,ignoreSecureId:null!=n?n:"",message:t.message},l(o,{type:"validate",message:t.message},{shouldFocus:!1})}})({outcome:m,slug:t,location:r,ignoreSecureId:i,setError:n,clearErrors:l,field:a})})}function h(e){let{generation:t,run:r}=e;t===d&&r()}function g(e){let{clearErrors:t,field:r}=e;c=null,t(r)}function f(e){let{schema:t,location:r,ignoreSecureId:i}=e,o=(0,l.X)(function(e){let{schema:t,location:r,ignoreSecureId:i}=e;return t.concat(function(e){var t;let{location:r,ignoreSecureId:i}=e;return a.Ry({slug:a.Z_().test({name:"slug-taken",message:()=>null!==(t=null==c?void 0:c.message)&&void 0!==t?t:"J\xe1 existe um item com este slug",test:function(e){return!m({slug:function(e){let{value:t,parent:r}=e;return"string"==typeof t?t:r&&"object"==typeof r?b({values:r}):""}({value:e,parent:this.parent}),location:r,ignoreSecureId:i})}})})}({location:r,ignoreSecureId:i}))}({schema:t,location:r,ignoreSecureId:i}));return async(e,t,l)=>{let a=b({values:e}),s=await o(e,t,l);return function(e){let{yupResult:t,slug:r,location:i,ignoreSecureId:l,options:a}=e,o=m({slug:r,location:i,ignoreSecureId:l});if(!o)return t;let s=t.errors;if(s.slug)return t;let d={...s,slug:{type:"validate",message:o.message}};return{values:{},errors:(0,n.D)(d,a)}}({yupResult:s,slug:a,location:r,ignoreSecureId:i,options:l})}}function b(e){let{values:t}=e;return"string"==typeof t.slug?t.slug:""}function j(e){let{register:t,field:r,location:n,ignoreSecureId:l,setError:a,clearErrors:o}=e,s=t(r),d=e=>{let{slug:t}=e;return p({slug:t,location:n,ignoreSecureId:l,setError:a,clearErrors:o,field:r})};return{...s,onChange:function(e){let{registration:t,CheckCurrentSlug:r}=e;return e=>
1{t.onChange(e),function(e){let{run:t}=e;u(),i=setTimeout(t,1e3)}({run:()=>void r({slug:e.target.value})})}}({registration:s,CheckCurrentSlug:d}),onBlur:function(e){let{registration:t,CheckCurrentSlug:r}=e;return e=>{t.onBlur(e),function(e){let{run:t}=e;u(),t()}({run:()=>void r({slug:e.target.value})})}}({registration:s,CheckCurrentSlug:d})}}},29273:function(e,t,r){"use strict";r.d(t,{z:function(){return l}});let i=new Set(["","undefined","null"]);function n(e){let{html:t}=e;return i.has(t.trim())}function l(e){var t;let{html:r}=e;if(null==r||n({html:r}))return"";if("undefined"==typeof document)return r;let i=document.createElement("div");i.innerHTML=r,i.querySelectorAll("style.embed-style").forEach(e=>e.remove());let l=null!==(t=i.textContent)&&void 0!==t?t:"";return!i.querySelector("*")&&n({html:l})?"":r}},89198:function(e,t,r){"use strict";function i(e){var t,r,i,n;let{error:l,toast:a,fallbackMessage:o}=e;a({title:(null==l?void 0:null===(t=l.response)||void 0===t?void 0:null===(r=t.data)||void 0===r?void 0:r.message)||o,position:"top-right",status:function(e){let{type:t}=e;return"warning"===t||"error"===t||"success"===t||"info"===t?t:"error"}({type:null==l?void 0:null===(i=l.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.type}),isClosable:!0})}r.d(t,{P:function(){return i}})},39002:function(e,t,r){"use strict";function i(e){return e.toLowerCase().replace(/[à ÃáÃâÃãäÃÃ
åª]+/g,"a").replace(/[èÃéÃêÃëÃ]+/g,"e").replace(/[ìÃÃÃîÃïÃ]+/g,"i").replace(/[òÃóÃôÃõÃöú]+/g,"o").replace(/[ùÃúÃûÃüÃ]+/g,"u").replace(/[ýÃÿŸ]+/g,"y").replace(/[ñÃ]+/g,"n").replace(/[çÃ]+/g,"c").replace(/[Ã]+/g,"ss").replace(/[Ãæ]+/g,"ae").replace(/[ÃøÅ]+/g,"oe").replace(/[%]+/g,"pct").replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}r.d(t,{a:function(){return i}})},53392:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});let i=[{label:"Publicado",value:"publish"},{label:"Rascunho",value:"draft"}]},1700:function(e,t,r){"use strict";r.d(t,{N:function(){return n},z:function(){return l}});var i=r(29273);function n(e){return e.replace(/(youtube\.com\/embed)\/shorts\/([a-zA-Z0-9_-]{11})/,"$1/$2")}function l(e){let t=(0,i.z)({html:e});if(!t)return"";let r=document.createElement("div");r.innerHTML=t;let l=r.querySelectorAll("iframe");l.forEach(e=>{var t;let r=e.getAttribute("src");r&&e.setAttribute("src",n(r));let i=parseInt(e.getAttribute("width")||"")||560,l=parseInt(e.getAttribute("height")||"")||315,a=e.parentElement,o=null==a?void 0:a.classList.contains("embed-container"),s=o?a:document.createElement("div");o||(s.className="embed-container",null==a||a.insertBefore(s,e),s.appendChild(e)),s.style.width="".concat(i,"px"),s.style.aspectRatio="".concat(i," / ").concat(l),t=s,e.style.float&&(t.style.float=e.style.float),e.style.marginLeft&&(t.style.marginLeft=e.style.marginLeft),e.style.marginRight&&(t.style.marginRight=e.style.marginRight),e.removeAttribute("width"),e.removeAttribute("height")});let a=r.querySelector("style.embed-style"),o=a?r.innerHTML:'\n <style class="embed-style">\n .embed-container {\n position: relative;\n max-width: 100%;\n }\n .embed-container iframe,\n .embed-container object,\n .embed-container embed {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n border: 0;\n }\n </style>'+r.innerHTML;return o}}},function(e){e.O(0,[9774,260,994,2013,8907,955,7847,5443,9912,7536,5097,3828,8143,8085,8159,9438,5563,1505,6943,7346,9676,3072,5951,8747,2708,416,2888,179],function(){return e(e.s=24152)}),_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.