1import{c as z,r as f,t as k,j as e,L as I,aJ as q,ap as E,aK as Q,ar as O,aq as B,z as Z,E as ee,y as te,aL as re,aM as ne,aN as se,aO as oe,aP as ie}from"./index-CNPx99w0.js";import{S as ae}from"./blog._slug-BST8KaoJ.js";import{P as le}from"./post-card-CEeX-DMj.js";import{r as $,b as ce,c as de,L as ue,v as K}from"./lead-form-modal-Cr7jN8wo.js";import{u as M,A as me}from"./article-context-BV9FOFTE.js";import{C as U}from"./check-B0rLrjhB.js";import{S as xe}from"./sparkles-BoCtkEVE.js";import{C as fe}from"./circle-x-DF2SoLA7.js";import{L as ge}from"./lightbulb-BP7MqpIu.js";import{T as be}from"./triangle-alert-C3KaaE20.js";import{C}from"./turnstile-widget-DDOzt9hi.js";import{C as he}from"./calendar-days-B7xM5BoD.js";import{R as pe}from"./refresh-cw-Vwli9kM_.js";import{S as ye}from"./share-2-DDlTIpAQ.js";import{E as je}from"./editorial-reveal-BTFX4ld-.js";import{R as W}from"./reveal-DYZq_ldA.js";import{R as A}from"./reveal-item-CtdyFJcs.js";import"./index-C2geAqjk.js";import"./utils-CTDkroN3.js";import"./crm-capture-AZmBxs2w.js";const we=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],ve=z("clock",we);const ke=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ne=z("info",ke);const Ce=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Y=z("link-2",Ce);function F({cta:t,placement:s,label:n,className:r,style:i,children:o,fallbackToLeadForm:a=!1}){const c=M(),[l,x]=f.useState(!1),u=$(t),d=u.kind==="none"&&a?{kind:"leadForm"}:u,m=ce({cta:t,placement:s,label:n,action:d,article:c}),g=de(m),b=f.useCallback(()=>{k("cta_click",g),x(j=>j||!0)},[JSON.stringify(g)]),p=f.useCallback(()=>{k("cta_click",g)},[JSON.stringify(g)]);if(d.kind==="none")return null;const y=o??n,h=["cta-motion cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",r??""].filter(Boolean).join(" ");return d.kind==="internal"?e.jsx(I,{to:d.path,onClick:p,"data-event":"cta_click","data-cta":m.ctaTrackingKey,className:h,style:i,children:y}):d.kind==="external"?e.jsx("a",{href:d.href,target:d.newTab?"_blank":void 0,rel:d.newTab?"noopener noreferrer":void 0,onClick:p,"data-event":"cta_click","data-cta":m.ctaTrackingKey,className:h,style:i,children:y}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:b,"data-event":"cta_click","data-cta":m.ctaTrackingKey,className:h,style:i,children:y}),e.jsx(ue,{open:l,onOpenChange:x,paginaCaptacao:c?.paginaCaptacao??"Site Salles Solutions",ctaOrigem:m.ctaTrackingKey,pageArea:"Blog Salles Solutions",variant:"area-interesse",submitLabel:"Solicitar contato da Salles",defaultAreaInteresse:m.solutionTitle??void 0,ctaContext:m})]})}const Ae={fontFamily:"'Space Grotesk Variable', 'Space Grotesk', sans-serif"};function _e({cta:t}){if(!t||!t.title&&!t.buttonLabel)return null;const s=t.variant==="secondary"||t.variant==="outline",n=K(t),r=t.buttonLabel??"",i=$(t).kind!=="none";return e.jsxs("aside",{className:"my-10 rounded-2xl border border-border bg-surface-muted p-6 sm:p-8",style:Ae,children:[t.title?e.jsx("h3",{className:"font-display text-xl font-semibold text-foreground sm:text-2xl",children:t.title}):null,n?e.jsx("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground sm:text-base",children:n}):null,r&&i?e.jsx(F,{cta:t,placement:"article_inline",label:r,className:"mt-6 inline-flex h-11 items-center justify-center rounded-xl px-6 text-sm font-semibold transition-all duration-200 hover:-translate-y-[2px]",style:s?{border:"1.5px solid #20b678",color:"#20b678",background:"transparent"}:{background:"#20b678",color:"#ffffff",boxShadow:"0 6px 18px -8px rgba(32,182,120,0.55)"}}):null]})}function G(t=2200){const[s,n]=f.useState(!1),r=f.useRef(null);f.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=f.useCallback(async o=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(o);else{const a=document.createElement("textarea");a.value=o,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}return n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),t),!0}catch{return n(!1),!1}},[t]);return{copied:s,copy:i}}function w(t){if(typeof t!="string")return null;const s=t.trim();return s.length>0?s:null}
1function v(t,s){s?console.warn(`[blog] tabela comparativa: ${t}`,s):console.warn(`[blog] tabela comparativa: ${t}`)}function _(t,s){const n=t,r=Array.isArray(n?.cells)?n?.cells:Array.isArray(n?.values)?n?.values:[];return r.length>s&&v("linha com mais células do que colunas â excedentes ignorados",{cells:r.length,columns:s}),Array.from({length:s},(i,o)=>w(r[o])??"")}function S(t){return t.some(s=>s.length>0)}function R(t,s){const n=(Array.isArray(t.directRows)?t.directRows[0]:null)??(Array.isArray(t.criteriaRows)?t.criteriaRows[0]:null)??(Array.isArray(t.rows)?t.rows[0]:null);v("bloco com colunas mas sem linhas normalizadas",{_key:t._key??null,tableMode:t.tableMode??null,columns:s,directRows:Array.isArray(t.directRows)?t.directRows.length:0,criteriaRows:Array.isArray(t.criteriaRows)?t.criteriaRows.length:0,rows:Array.isArray(t.rows)?t.rows.length:0,firstRowKeys:n&&typeof n=="object"?Object.keys(n):null})}function Se(t){if(!t||typeof t!="object")return null;const s=w(t.title),n=w(t.note),r=(Array.isArray(t.columns)?t.columns:[]).map(l=>w(l)).filter(l=>l!==null),i=t.tableMode,o=r.length;
1if(i==="direct"){if(o===0)return v("modo direct sem colunas",{_key:t._key??null}),null;const l=Array.isArray(t.directRows)?t.directRows:[],x=[];return l.forEach((u,d)=>{if(!u||typeof u!="object"){v("linha direct inválida ignorada",{_key:t._key??null,index:d});return}const m=_(u,o);S(m)&&x.push({key:u._key??`direct-${d}`,criterion:null,values:m})}),x.length===0?(R(t,o),null):{mode:"direct",title:s,headers:r,valueHeaders:r,rows:x,note:n}}if(i==="criteria"){if(o===0)return v("modo criteria sem colunas",{_key:t._key??null}),null;const l=w(t.criteriaColumnTitle)??"Critério",x=Array.isArray(t.criteriaRows)?t.criteriaRows:[],u=Array.isArray(t.rows)?t.rows:[],d=x.length===0&&u.length>0,m=d?u:x,g=[];return m.forEach((b,p)=>{if(!b||typeof b!="object"){v("linha criteria inválida ignorada",{_key:t._key??null,index:p});return}const y=_(b,o),h=w(d?b.label:b.criterion);!h&&!S(y)||g.push({key:b._key??`${d?"legacy":"criteria"}-${p}`,criterion:h??"â",values:y})}),g.length===0?(R(t,o),null):{mode:"criteria",title:s,headers:[l,...r],valueHeaders:r,rows:g,note:n}}const a=Array.isArray(t.rows)?t.rows:[];if(o===0||a.length===0)return(o>0||a.length>0)&&v("bloco legado incompleto",{_key:t._key??null,columns:o,rows:a.length}),null;const c=[];return a.forEach((l,x)=>{if(!l||typeof l!="object"){v("linha legada inválida ignorada",{_key:t._key??null,index:x});return}const u=_(l,o),d=w(l.label);!d&&!S(u)||c.push({key:l._key??`legacy-${x}`,criterion:d??"â",values:u})}),c.length===0?(R(t,o),null):{mode:"criteria",title:s,headers:["Critério",...r],valueHeaders:r,rows:c,note:n}}function V({value:t,components:s}){return t?typeof t=="string"?e.jsx("p",{className:"text-[16px] leading-[1.7] text-muted-foreground",children:t}):!Array.isArray(t)||t.length===0?null:e.jsx(q,{value:t,components:s}):null}const L={info:{label:"Informação",icon:Ne,accent:"border-l-primary/60",iconColor:"text-primary"},warning:{label:"Atenção",icon:be,accent:"border-l-amber-500/70",iconColor:"text-amber-600"},tip:{label:"Dica prática",icon:ge,accent:"border-l-accent-tech",iconColor:"text-blog-accent-strong"},danger:{label:"Erro comum",icon:fe,accent:"border-l-destructive/60",iconColor:"text-destructive"},success:{label:"Recomendação da Salles",icon:xe,accent:"border-l-accent-tech",iconColor:"text-blog-accent-strong"}},Re={informacao:"info",nota:"info",note:"info",atencao:"warning",alerta:"warning",caution:"warning",dica:"tip",erro:"danger",error:"danger",recomendacao:"success",recommendation:"success",salles:"success"};function Le({value:t,components:s}){const n=(t.variant??"info").toLowerCase(),r=L[n]?n:Re[n]??"info",i=L[r]??L.info,o=i.icon;return e.jsxs("aside",{className:`my-9 rounded-2xl border border-border/70 border-l-4 bg-surface-muted/60 p-5 sm:p-6 ${i.accent}`,children:[e.jsxs("p",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:[e.jsx(o,{size:15,"aria-hidden":"true",className:i.iconColor}),i.label]}),t.title?e.jsx("h4",{className:"mt-2 font-display text-lg font-semibold text-foreground",children:t.title}):null,e.jsx("div",{className:"mt-2",children:e.jsx(V,{value:t.body,components:s})})]})}function Te({value:t}){const s=(t.items??[]).filter(Boolean);return s.length===0&&!t.title?null:e.jsxs("section",{className:"my-9 rounded-2xl border border-border/70 bg-surface-muted/60 p-6 sm:p-7",children:[t.title?e.jsx("h4",{className:"font-display text-lg font-semibold text-foreground sm:text-xl",children:t.title}):null,t.intro?e.jsx("p",{className:"mt-2 text-[15px] leading-relaxed text-muted-foreground",children:t.intro}):null,e.jsx("ul",{className:"mt-5 space-y-4",children:s.map((n,r)=>e.jsxs("li",{className:"flex min-w-0 gap-3",children:[e.jsx("span",{"aria-hidden":"true",className:"mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded-full bg-blog-accent-soft text-blog-accent-strong",children:e.jsx(U,{size:12,strokeWidth:3})}),e.jsxs("div",{className:"min-w-0",children:[n.title?e.jsx("p",{className:"text-[16px] font-semibold leading-snug text-foreground",children:n.title}):null,n.description?e.jsx("p",{className:"mt-1 text-[15px] leading-[1.7] text-muted-foreground",children:n.description}):null]})]},n._key??r))})]})}function Ee({value:t}){const s=Se(t);if(!s)return null;const n=s.title??"Tabela comparativa",r=s.mode==="criteria";return e.jsxs("figure",{className:"my-10",children:[s.title?e.jsx("h4",{className:"mb-3 font-display text-lg font-semibold text-foreground sm:text-xl",children:s.title}):null,e.jsx("div",{className:"md:overflow-x-auto md:rounded-2xl md:border md:border-border/70",children:e.jsxs("table",{className:"w-full border-collapse text-left text-[15px]",children:[e.jsx("caption",{className:"sr-only",children:n}),e.jsx("thead",{className:"hidden md:table-header-group",children:e.jsx("tr",{className:"bg-surface-muted",children:s.headers.map((i,o)=>e.jsx("th",{scope:"col",className:"px-4 py-3 font-semibold text-foreground",children:i},o))})}),e.jsx("tbody",{className:"block md:table-row-group",children:s.rows.map((i,o)=>e.jsxs("tr",{className:`mb-3 block overflow-hidden rounded-2xl border border-border/70 bg-background last:mb-0 md:mb-0 md:table-row md:rounded-none md:border-0 md:border-t md:border-border/70 ${o%2===1?"md:bg-surface-muted/40":""}`,children:[r?e.jsx("th",{scope:"row",className:"block border-b border-border/70 bg-surface-muted px-4 py-3 text-left align-top font-semibold text-foreground [overflow-wrap:anywhere] md:table-cell md:border-b-0 md:bg-surface-muted/60",children:i.criterion}):null,i.values.map((a,c)=>e.jsx("td",{"data-label":s.valueHeaders[c]??"",className:"block border-b border-border/60 px-4 py-3 align-top text-foreground [overflow-wrap:anywhere] last:border-b-0 before:block before:text-xs before:font-semibold before:uppercase before:tracking-wide before:text-muted-foreground
1/80 before:content-[attr(data-label)] md:table-cell md:border-b-0 md:text-muted-foreground md:before:hidden",children:a||"â"},c))]},i.key))})]})}),s.note?e.jsx("figcaption",{className:"mt-3 text-xs text-muted-foreground",children:s.note}):null]})}function Be({value:t,components:s}){const n=(t.items??[]).filter(r=>r?.question);return n.length===0?null:e.jsxs("section",{className:"my-10",children:[t.title?e.jsx("h4",{className:"mb-4 font-display text-lg font-semibold text-foreground sm:text-xl",children:t.title}):null,e.jsx("div",{className:"divide-y divide-border/70 overflow-hidden rounded-2xl border border-border/70",children:n.map((r,i)=>e.jsxs("details",{className:"group bg-background",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-start justify-between gap-4 px-5 py-4 text-[16px] font-semibold text-foreground transition-colors hover:text-blog-accent-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60",children:[e.jsx("span",{className:"min-w-0",children:r.question}),e.jsx("span",{"aria-hidden":"true",className:"mt-1 shrink-0 text-muted-foreground transition-transform duration-200 group-open:rotate-180",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),e.jsx("div",{className:"faq-answer px-5 pb-5 text-[15px] leading-[1.7] text-muted-foreground",children:e.jsx(V,{value:r.answer,components:s})})]},r._key??i))})]})}function ze({value:t}){const{copied:s,copy:n}=G(),r=t.code??"";return r?e.jsxs("figure",{className:"my-9 overflow-hidden rounded-2xl border border-border/70 bg-brand-deep",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-white/10 px-4 py-2.5",children:[e.jsx("span",{className:"truncate text-xs font-semibold uppercase tracking-[0.14em] text-white/70",children:t.title||t.language||"Código"}),t.showCopyButton===!1?null:e.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("span",{"aria-live":"polite",className:"text-xs font-medium text-accent-tech",children:s?"Copiado":""}),e.jsx("button",{type:"button",onClick:()=>{n(r)},className:"rounded-lg border border-white/20 px-3 py-1 text-xs font-semibold text-white/80 transition-colors hover:border-accent-tech hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-tech",children:"Copiar"})]})]}),e.jsx("pre",{className:"overflow-x-auto px-4 py-4 text-[13.5px] leading-relaxed",children:e.jsx("code",{className:"whitespace-pre font-mono text-white/90",children:r})}),t.caption?e.jsx("figcaption",{className:"border-t border-white/10 px-4 py-2.5 text-xs text-white/60",children:t.caption}):null]}):null}class Ie extends f.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(s){const n=this.props.value;console.error("[blog] falha ao renderizar tabela comparativa",{_key:n?._key??null,tableMode:n?.tableMode??null,columns:Array.isArray(n?.columns)?n.columns.length:0,directRows:Array.isArray(n?.directRows)?n.directRows.length:0,criteriaRows:Array.isArray(n?.criteriaRows)?n.criteriaRows.length:0,rows:Array.isArray(n?.rows)?n.rows.length:0,errorType:s instanceof Error?s.name:typeof s})}render(){return this.state.failed?null:this.props.children}}function T(t){const s=t?.children;return Array.isArray(s)?s.map(n=>typeof n?.text=="string"?n.text:"").join("").trim():""}function H({id:t,label:s}){return e.jsx("a",{href:`#${t}`,"aria-label":`Link para a seção ${s}`,className:"ml-2 inline-flex translate-y-[-2px] align-middle text-muted-foreground opacity-0 transition-opacity duration-200 hover:text-blog-accent-strong focus-visible:opacity-100 focus-visible:outline-none group-hover:opacity-100",children:e.jsx(Y,{size:16,"aria-hidden":"true"})})}function $e(t){const s=r=>{const i=r?._key;return(i?t[i]:void 0)??Q(T(r))??""},n={block:{normal:({children:r})=>e.jsx("p",{className:"mb-6 text-[17px] leading-[1.75] text-muted-foreground sm:text-[18px] sm:leading-[1.8]",children:r}),h2:({children:r,value:i})=>{const o=s(i),a=T(i);return e.jsxs("h2",{id:o,className:"group mt-12 mb-4 scroll-mt-[calc(var(--article-header-h,84px)+2.5rem)] font-display text-[1.45rem] font-bold leading-tight text-foreground sm:text-[1.75rem]",children:[r,o?e.jsx(H,{id:o,label:a}):null]})},h3:({children:r,value:i})=>{const o=s(i),a=T(i);return e.jsxs("h3",{id:o,className:"group mt-9 mb-3 scroll-mt-[calc(var(--article-header-h,84px)+2.5rem)] font-display text-[1.2rem] font-semibold leading-snug text-foreground sm:text-[1.35rem]",children:[r,o?e.jsx(H,{id:o,label:a}):null]})},blockquote:({children:r})=>e.jsx("blockquote",{className:"my-9 border-l-4 border-accent-tech bg-surface-muted/60 px-6 py-5 font-display text-[18px] italic leading-[1.7] text-foreground sm:text-[19px]",children:r})},list:{bullet:({children:r})=>e.jsx("ul",{className:"mb-7 list-disc space-y-2.5 pl-6 text-[17px] leading-[1.75] text-muted-foreground marker:text-blog-accent-strong sm:text-[18px]",children:r}),number:({children:r})=>e.jsx("ol",{className:"mb-7 list-decimal space-y-2.5 pl-6 text-[17px] leading-[1.75] text-muted-foreground marker:font-semibold marker:text-blog-accent-strong sm:text-[18px]",children:r})},listItem:{bullet:({children:r})=>e.jsx("li",{className:"pl-1.5",children:r}),number:({children:r})=>e.jsx("li",{className:"pl-1.5",children:r})},marks:{strong:({children:r})=>e.jsx("strong",{className:"font-semibold text-foreground",children:r}),em:({children:r})=>e.jsx("em",{className:"italic",children:r}),code:({children:r})=>e.jsx("code",{className:"rounded bg-surface-muted px-1.5 py-0.5 font-mono text-[15px] text-foreground",children:r}),link:({children:r,value:i})=>{const o=i?.href??"#",a=o.startsWith("/")||o.includes("salles.solutions");return e.jsx("a",{href:o,target:a?void 0:"_blank",rel:a?void 0:"noopener noreferrer",className:"font-medium text-blog-accent-strong underline decoration-blog-accent/40 underline-offset-4 transition-colors hover:decoration-blog-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60",children:r})}},types:{imageWithAlt:({value:r})=>{const i=r,o=E(i,{width:1200,quality:85});return o?e.jsxs("figure",{className:"my-10",children:[e.jsx("img",{src:o,alt:i.alt??"",loading:"lazy",decoding:"async",className:"w-full rounded-2xl border border-border/70"}),i.caption?e.jsx("figcaption",{className:"mt-3 text-center text-sm text-muted-foreground",children:i.caption}):null]}):null},ctaBlock:({value:r})=>e.jsx(_e,{cta:r?.cta??null}),calloutBlock:({value:r})=>e.jsx(Le,{value:r,components:n}
1),checklistBlock:({value:r})=>e.jsx(Te,{value:r}),comparisonTableBlock:({value:r})=>{const i=r;return e.jsx(Ie,{value:i,children:e.jsx(Ee,{value:i})})},faqBlock:({value:r})=>e.jsx(Be,{value:r,components:n}),codeBlock:({value:r})=>e.jsx(ze,{value:r})}};return n}function Me({value:t,idsByKey:s}){const n=f.useMemo(()=>$e(s??{}),[s]);return!t||t.length===0?null:e.jsx("div",{className:"blog-content",children:e.jsx(q,{value:t,components:n})})}function Fe({post:t,readingMinutes:s}){const n=s??O(t),r=t.primaryCategory??t.categories?.[0]??null,i=B(t.publishedAt),o=B(t.updatedAt),a=!!(o&&o!==i),c=E(t.author?.image,{width:96,height:96}),l=E(t.mainImage,{width:1600,height:900});return e.jsx("header",{className:"border-b border-border/60 bg-surface-muted/50",children:e.jsxs("div",{className:"mx-auto grid w-full max-w-[80rem] items-center gap-8 px-6 pb-10 pt-8 sm:pb-12 sm:pt-10 xl:grid-cols-[1.4fr_1fr] xl:gap-12",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs(I,{to:"/blog",className:"group inline-flex items-center gap-2 rounded-lg text-sm font-semibold leading-none text-blog-accent-strong underline-offset-4 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(C,{size:16,className:"block shrink-0 rotate-180"}),"Voltar ao Blog"]}),r?.title?e.jsx("div",{className:"mt-5",children:e.jsx("span",{className:"rounded-full bg-blog-accent-soft px-3 py-1 text-xs font-semibold text-blog-accent-strong",children:r.title})}):null,e.jsx("h1",{className:"mt-4 max-w-[24ch] font-display text-[2rem] font-bold leading-[1.12] tracking-[-0.01em] text-foreground sm:text-[2.4rem] xl:text-[2.7rem]",children:t.title}),t.excerpt?e.jsx("p",{className:"mt-4 max-w-[62ch] text-[17px] leading-[1.6] text-muted-foreground",children:t.excerpt}):null,e.jsxs("div",{className:"mt-7 grid grid-cols-[auto_minmax(0,1fr)] items-center gap-3 border-t border-border/60 pt-5 sm:flex sm:flex-wrap sm:items-center sm:gap-x-5 sm:gap-y-2",children:[c?e.jsx("img",{src:c,alt:t.author?.name??"",width:40,height:40,decoding:"async",className:"h-10 w-10 shrink-0 rounded-full object-cover"}):e.jsx("span",{className:"h-10 w-10 shrink-0 rounded-full bg-border","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 sm:flex sm:flex-wrap sm:items-center sm:gap-x-5 sm:gap-y-1",children:[t.author?.name?e.jsxs("p",{className:"truncate text-sm font-semibold text-foreground",children:[t.author.name,t.author.role?e.jsxs("span",{className:"font-normal text-muted-foreground",children:[" · ",t.author.role]}):null]}):null,e.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:mt-0 sm:gap-x-4 sm:text-sm",children:[i?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(he,{size:14,"aria-hidden":"true",className:"shrink-0"}),e.jsx("time",{dateTime:t.publishedAt??void 0,children:i})]}):null,a?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(pe,{size:14,"aria-hidden":"true",className:"shrink-0"}),e.jsxs("span",{children:["Atualizado em ",e.jsx("time",{dateTime:t.updatedAt??void 0,children:o})]})]}):null,e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(ve,{size:14,"aria-hidden":"true",className:"shrink-0"}),n," min de leitura"]})]})]})]})]}),l?e.jsx("figure",{className:"min-w-0 overflow-hidden rounded-2xl border border-border/70 bg-background",children:e.jsx("img",{src:l,alt:t.mainImage?.alt??t.title??"",width:1600,height:900,fetchPriority:"high",decoding:"async",className:"mx-auto max-h-[22rem] w-full object-contain"})}):null]})})}function Pe({items:t}){const s=t.filter(n=>typeof n=="string"&&n.trim()).slice(0,5);return s.length<3?null:e.jsxs("section",{"aria-labelledby":"takeaways-titulo",className:"rounded-2xl border border-border/70 bg-surface-muted/60 p-6 sm:p-8",children:[e.jsx("h2",{id:"takeaways-titulo",className:"font-display text-lg font-semibold text-foreground sm:text-xl",children:"Principais conclusões"}),e.jsx("ul",{className:"mt-5 space-y-3.5",children:s.map((n,r)=>e.jsxs("li",{className:"flex min-w-0 gap-3",children:[e.jsx("span",{"aria-hidden":"true",className:"mt-[9px] h-1.5 w-1.5 shrink-0 rounded-full bg-accent-tech"}),e.jsx("span",{className:"min-w-0 text-[16px] leading-[1.65] text-muted-foreground",children:n})]},r))})]})}function He(t){const[s,n]=f.useState(t[0]?.id??null);return f.useEffect(()=>{if(t.length===0||typeof IntersectionObserver>"u")return;const r=new Set,i=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting?r.add(c.target.id):r.delete(c.target.id);const a=t.find(c=>r.has(c.id));a&&n(a.id)},{rootMargin:"-20% 0px -65% 0px",threshold:0});for(const o of t){const a=document.getElementById(o.id);a&&i.observe(a)}return()=>i.disconnect()},[t]),s}function J({items:t,active:s}){return e.jsx("ol",{className:"space-y-1.5 text-sm",children:t.map(n=>{const r=n.id===s;return e.jsx("li",{className:n.level===3?"pl-4":"",children:e.jsx("a",{href:`#${n.id}`,"aria-current":r?"location":void 0,className:`block min-w-0 border-l-2 py-1 pl-3 leading-snug transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background ${r?"border-accent-tech font-semibold text-foreground":"border-border text-muted-foreground hover:border-blog-accent/60 hover:text-foreground"}`,children:n.text})},n.id)})})}function De({items:t}){const s=He(t);return t.length<2?null:e.jsxs("nav",{"aria-labelledby":"sumario-titulo",className:"hidden min-w-0 xl:block",children:[e.jsx("p",{id:"sumario-titulo",className:"mb-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Neste artigo"}),e.jsx("div",{className:"max-h-[calc(100vh-var(--article-header-h,84px)-9rem)] overflow-y-auto pr-1",children:e.jsx(J,{items:t,active:s})})]})}function qe({items:t}){return t.length<2?null:e.jsxs("details",{className:"group mb-10 rounded-2xl border border-border/70 bg-surface-muted/60 xl:hidden",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-5 py-4 text-sm font-semibold text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60",children:["Neste artigo",e.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground transition-transform duration-200 group-open:rotate-180",children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),e.jsx("div",{className:"border-t border-border/70 px-5 py-4",children:e.jsx(J,{items:t,active:null})})]})}function Oe({size:t=16}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"})})}const N="inline-flex h-10 w-10 items-center justify-center rounded-xl border border-border text-muted-foreground transition-colors duration-200 hover:border-blog-accent/60 hover:text-blog-accent-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background";function Ke({url:t,title:s,compact:n=!1}){const{copied:r,copy:i}=G(),o=M(),a=d=>({method:d,article_slug:o?.articleSlug??"",article_title:o?.articleTitle??s,article_category:o?.articleCategory??""}),[c,l]=f.useState(!1);f.useEffect(()=>{l(typeof navigator<"u"&&typeof navigator.share=="function")},[]);const x=`https://wa.me/?text=${encodeURIComponent(`${s} ${t}`)}`,u=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`;return e.jsxs("div",{className:"min-w-0",children:[n?null:e.jsx("p",{className:"mb-3 text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Compartilhar"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?e.jsx("button",{type:"button","aria-label":"Compartilhar este artigo",onClick:()=>{k("share_click",a("web_share")),navigator.share({title:s,url:t}).catch(()=>{})},className:`${N} sm:hidden`,children:e.jsx(ye,{size:16,"aria-hidden":"true"})}):null,e.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer","aria-label":"Compartilhar no WhatsApp",onClick:()=>k("share_click",a("whatsapp")),className:N,children:e.jsx(Oe,{})}),e.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer","aria-label":"Compartilhar no LinkedIn",onClick:()=>k("share_click",a("linkedin")),className:N,children:e.jsx(Z,{size:16,"aria-hidden":"true"})}),e.jsx("button",{type:"button","aria-label":"Copiar link do artigo",onClick:()=>{k("share_click",a("copy_link")),i(t)},className:N,children:r?e.jsx(U,{size:16,"aria-hidden":"true",className:"text-blog-accent-strong"}):e.jsx(Y,{size:16,"aria-hidden":"true"})})]}),e.jsx("span",{"aria-live":"polite",className:"mt-2 block text-xs font-medium text-blog-accent-strong",children:r?"Link copiado":""})]})}function Ue({solution:t}){if(!t||t.active===!1||!t.title)return null;const s="Conhecer a solução",n=t.defaultCta,r=t.url?{_id:`${t._id}-url`,internalName:`solucao-${t.slug??t._id}`,trackingKey:`artigo-solucao-${t.slug??t._id}
1`,title:t.title,description:null,buttonLabel:s,variant:"link",actionType:null,formInterest:null,formContext:null,internalPath:null,externalUrl:null,openInNewTab:null,url:t.url}:null,i=n&&$(n).kind!=="none"?n:r;return e.jsxs("section",{"aria-labelledby":"solucao-relacionada",className:"min-w-0",children:[e.jsx("p",{id:"solucao-relacionada",className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Solução relacionada"}),e.jsx("h2",{className:"mt-2 font-display text-lg font-semibold text-foreground",children:t.title}),t.shortDescription?e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:t.shortDescription}):null,i?e.jsxs(F,{cta:i,placement:"article_related_solution",label:s,className:"group mt-4 inline-flex items-center gap-2 text-sm font-semibold text-blog-accent-strong underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[s,e.jsx(C,{size:16})]}):null]})}function We({sources:t}){const s=(t??[]).filter(n=>n?.title||n?.url);return s.length===0?null:e.jsxs("section",{"aria-labelledby":"fontes-titulo",className:"mt-14 border-t border-border/70 pt-8",children:[e.jsx("h2",{id:"fontes-titulo",className:"font-display text-xl font-semibold text-foreground",children:"Fontes consultadas"}),e.jsx("ol",{className:"mt-5 space-y-4",children:s.map((n,r)=>{const i=B(n.accessedAt),o=n.title??n.url??"";return e.jsxs("li",{className:"flex min-w-0 gap-3 text-sm",children:[e.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:String(r+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0",children:[n.url?e.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer nofollow",className:"inline-flex items-baseline gap-1.5 font-medium text-foreground underline decoration-border underline-offset-4 transition-colors hover:text-blog-accent-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60",children:[e.jsx("span",{className:"min-w-0 break-words",children:o}),e.jsx(ee,{size:13,"aria-hidden":"true",className:"shrink-0"})]}):e.jsx("span",{className:"font-medium text-foreground",children:o}),e.jsxs("p",{className:"mt-0.5 text-muted-foreground",children:[n.publisher??"",n.publisher&&i?" · ":"",i?`acesso em ${i}`:""]})]})]},n._key??r)})})]})}const Ye="Tecnologia precisa acompanhar a operação, não apenas reagir aos problemas.",Ge="Converse com a Salles para entender os próximos passos mais adequados à realidade da sua empresa.",Ve="Falar com um especialista";function Je({cta:t,articleTitle:s}){const n=t?.title||Ye,r=t?K(t):Ge,i=t?.buttonLabel||Ve,a=`group inline-flex h-12 w-full items-center justify-center gap-2 rounded-xl px-6 text-sm font-semibold transition-all duration-200 ease-out hover:-translate-y-[2px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:w-auto sm:min-w-[240px] ${t?.variant==="secondary"||t?.variant==="outline"?"border border-blog-accent/70 text-blog-accent-strong hover:bg-blog-accent-soft":"bg-blog-accent text-blog-accent-foreground hover:brightness-[1.05]"}`;return e.jsx(W,{duration:380,y:10,children:e.jsxs("section",{"aria-labelledby":"cta-final-titulo",className:"mt-14 overflow-hidden rounded-2xl border border-border/70 bg-surface-muted/60",children:[e.jsx("div",{className:"border-t-2 border-accent-tech","aria-hidden":"true"}),e.jsxs("div",{className:"p-6 sm:p-8",children:[e.jsx("h2",{id:"cta-final-titulo",className:"max-w-[36ch] font-display text-xl font-bold leading-snug text-foreground sm:text-2xl",children:n}),r?e.jsx("p",{className:"mt-3 max-w-[60ch] text-base leading-relaxed text-muted-foreground",children:r}):null,e.jsx("div",{className:"mt-6",children:e.jsxs(F,{cta:t,placement:"article_final",label:i,className:a,fallbackToLeadForm:!0,children:[i,e.jsx(C,{size:18})]})})]})]})})}const D=56;function Xe({title:t,sentinelId:s}){const[n,r]=f.useState(!1),[i,o]=f.useState(!1),[a,c]=f.useState(!1),l=f.useRef(null);f.useEffect(()=>{c(window.matchMedia("(prefers-reduced-motion: reduce)").matches);let u=0,d=window.scrollY;const m=()=>{u=0;const b=window.scrollY,p=document.getElementById(s),y=p?p.getBoundingClientRect().bottom+b-D:320,h=b>y;r(h);const j=l.current,X=!!(j&&j.contains(document.activeElement)),P=b-d;Math.abs(P)>6&&(X||o(P>0&&h),d=b)},g=()=>{u||(u=requestAnimationFrame(m))};return m(),window.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),()=>{u&&cancelAnimationFrame(u),window.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[s]);const x=n&&!i?"translateY(0)":"translateY(-100%)";return e.jsx("div",{ref:l,onFocus:()=>o(!1),"aria-hidden":!n,className:"fixed inset-x-0 top-0 z-40 border-b border-border/70 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",style:{height:`${D}px`,transform:x,transition:a?"none":"transform 220ms ease-out",visibility:n?"visible":"hidden",
1willChange:"transform"},children:e.jsxs("div",{className:"mx-auto flex h-full w-full max-w-[80rem] items-center gap-4 px-6",children:[e.jsx("a",{href:"/","aria-label":"Salles Solutions â página inicial",className:"shrink-0",tabIndex:n?0:-1,children:e.jsx(te,{style:{width:"112px",height:"auto",display:"block"}})}),e.jsxs(I,{to:"/blog",tabIndex:n?0:-1,className:"group inline-flex shrink-0 items-center gap-1.5 rounded-lg px-2 py-1 text-sm font-semibold leading-none text-blog-accent-strong transition-colors hover:bg-blog-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blog-accent/60 focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(C,{size:16,className:"block shrink-0 rotate-180"}),"Voltar ao Blog"]}),e.jsx("p",{className:"hidden min-w-0 flex-1 truncate text-sm text-muted-foreground lg:block",children:t})]})})}function Qe({targetId:t,offset:s="var(--article-header-h, 84px)"}){const n=f.useRef(null),[r,i]=f.useState(0);return f.useEffect(()=>{let o=0,a=0,c=1,l=-1;const x=()=>{const p=document.getElementById(t);if(!p)return;const y=p.getBoundingClientRect(),h=window.scrollY+y.top,j=h+p.offsetHeight;a=Math.max(0,h-window.innerHeight*.35),c=Math.max(a+1,j-window.innerHeight*.15)},u=()=>{o=0;const p=Math.min(1,Math.max(0,(window.scrollY-a)/(c-a))),y=n.current;y&&(y.style.transform=`scaleX(${p})`);const h=Math.round(p*100);h!==l&&(l=h,i(h))},d=()=>{o||(o=requestAnimationFrame(u))},m=()=>{x(),d()};x(),u(),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",m);const g=document.getElementById(t),b=g&&typeof ResizeObserver<"u"?new ResizeObserver(m):null;return g&&b&&b.observe(g),()=>{o&&cancelAnimationFrame(o),window.removeEventListener("scroll",d),window.removeEventListener("resize",m),b?.disconnect()}},[t]),e.jsx("div",{role:"progressbar","aria-label":"Progresso de leitura do artigo","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,className:"pointer-events-none fixed left-0 z-50 h-[3px] w-full bg-transparent",style:{top:s},children:e.jsx("div",{ref:n,className:"reading-progress-bar h-full w-full bg-accent-tech","aria-hidden":"true"})})}function Ze({targetId:t}){const s=M(),n=s?.articleSlug??"",r=s?.articleTitle??"",i=s?.articleCategory??"";return f.useEffect(()=>{const o={article_slug:n,article_title:r,article_category:i};k("article_view",o);const a=[50,90],c=new Set;let l=0;const x=()=>{l=0;const m=document.getElementById(t);if(!m)return;const g=m.getBoundingClientRect(),b=window.scrollY+g.top,p=Math.max(1,m.offsetHeight-window.innerHeight*.5),y=Math.min(1,Math.max(0,(window.scrollY-b)/p)),h=Math.round(y*100);for(const j of a)h>=j&&!c.has(j)&&(c.add(j),k("article_progress",{...o,percent_scrolled:j}));c.size===a.length&&d()},u=()=>{l||(l=requestAnimationFrame(x))};function d(){l&&cancelAnimationFrame(l),l=0,window.removeEventListener("scroll",u)}return window.addEventListener("scroll",u,{passive:!0}),x(),d},[t,n,r,i]),null}function jt(){const{post:t}=re.useLoaderData(),{items:s,idsByKey:n}=ne(t.body),r=O(t),i=t.keyTakeaways??[],o=(t.relatedPosts??[]).slice(0,3),a=`${se}/blog/${t.slug??""}`,c=t.title??"Blog Salles Solutions",l=oe(t.updatedAt),x=!!(l&&t.updatedAt&&t.publishedAt&&new Date(t.updatedAt).getTime()>new Date(t.publishedAt).getTime()),u=o.length>=3?"grid gap-6 sm:grid-cols-2 lg:grid-cols-3":o.length===2?"grid max-w-4xl gap-6 sm:grid-cols-2":"grid max-w-xl gap-6",d={pageType:"blog_article",articleId:t._id,articleTitle:t.title,articleSlug:t.slug,articleCategory:t.primaryCategory?.title??null,relatedSolution:t.relatedSolution?.title??null,paginaCaptacao:"Blog â Artigo"};return e.jsx(ae,{children:e.jsxs(me,{value:d,children:[e.jsx(Ze,{targetId:"artigo-conteudo"}),e.jsx(Qe,{targetId:"artigo-conteudo",offset:"0px"}),e.jsx(Xe,{title:c,sentinelId:"artigo-hero"}),e.jsxs("main",{id:"conteudo-principal",tabIndex:-1,children:[e.jsxs("article",{children:[e.jsx("div",{id:"artigo-hero",children:e.jsx(Fe,{post:t,readingMinutes:r})}),e.jsx("div",{className:"mx-auto w-full max-w-[80rem] bg-background px-6 py-12 sm:py-14",children:e.jsxs("div",{className:"grid gap-10 xl:grid-cols-[minmax(0,1fr)_17rem] xl:gap-14",children:[e.jsxs("div",{className:"min-w-0 xl:max-w-[46rem] xl:justify-self-center",children:[i.length>0?e.jsx("div",{className:"mb-10",children:e.jsx(Pe,{items:i})}):null,e.jsx(qe,{items:s}),e.jsx("div",{id:"artigo-conteudo",children:e.jsx(Me,{value:t.body??[],idsByKey:n})}),e.jsx(We,{sources:t.sources}),e.jsx(W,{duration:300,y:8,children:e.jsx("div",{className:"mt-10 border-t border-border/70 pt-6",children:e.jsx(Ke,{url:a,title:c})})}),e.jsx(A,{index:0,children:e.jsx(ie,{author:t.author,review:t.technicalReview})}),e.jsx(A,{index:1,children:e.jsx(Je,{cta:t.finalCta,articleTitle:c})}),x?e.jsxs("p",{className:"mt-10 border-t border-border/70 pt-6 text-xs text-muted-foreground",children:["Conteúdo revisado editorialmente pela Salles Solutions · última atualização em"," ",l,"."]}):null]}),e.jsx("aside",{className:"min-w-0",children:e.jsxs("div",{className:"space-y-8 xl:sticky xl:top-24",children:[e.jsx(De,{items:s}),t.relatedSolution?e.jsx("div",{className:"mt-12 border-t border-border/70 pt-6 xl:mt-0",children:e.jsx(Ue,{solution:t.relatedSolution})}):null]})})]})})]}),o.length>0?e.jsx("section",{"aria-labelledby":"relacionados-titulo",className:"border-t border-border/60 bg-surface-muted/50",children:e.jsxs("div",{className:"mx-auto w-full max-w-7xl px-6 py-14 lg:px-10 xl:px-12",children:[e.jsx(A,{index:0,children:e.jsx("h2",{id:"relacionados-titulo",className:"font-display text-2xl font-bold text-foreground",children:"Continue explorando"})}),e.jsx("div",{className:`mt-8 ${u}`,children:o.map((m,g)=>e.jsx(je,{index:g,className:"min-w-0",children:e.jsx(le,{post:m})},m._id))})]})}):null]})]})})}export{jt as component};
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.