1import{j as e}from"./ui-vendor-l3m2ybtK.js";import{r as l,L as P}from"./react-vendor-K10ikprH.js";import{B as d,s as F,J as I,I as D,K as L}from"./index-Djx_aEal.js";import{S as k}from"./SiteNavbar-q4Kikrej.js";import{S as z}from"./SiteFooter-DPJV_Af9.js";import{B as x}from"./badge-B0F_SDBg.js";import{B as u}from"./BlogCard-Dv6FEcn3.js";import{F as _,S as T}from"./search-C3pIAZlW.js";import{N as E}from"./NewsletterForm-A16n38lv.js";import{N as V}from"./NewsletterPopup-DSAGRBPd.js";import{T as j}from"./trending-up-DPKLePna.js";import{F as A}from"./folder-open-HmDjn4nF.js";import"./supabase-CuRhUxB9.js";import"./charts-CkzgfkdG.js";import"./query-B53Uv_EO.js";import"./avatar-CNl7pqnb.js";import"./calendar-BsDCC8pn.js";import"./clock-A0EG4oh6.js";import"./pt-BR-BDFmZftg.js";const O=({categories:o,tags:p,selectedCategory:i,selectedTag:m,onCategoryChange:a,onTagChange:n})=>e.jsxs("div",{className:"mb-8 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(_,{className:"h-4 w-4 text-primary"}),e.jsx("h3",{className:"font-semibold",children:"Categorias"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(d,{variant:i==="all"?"default":"outline",size:"sm",onClick:()=>a("all"),children:"Todos"}),o.map(t=>e.jsx(d,{variant:i===t?"default":"outline",size:"sm",onClick:()=>a(t),children:t},t))]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-4",children:"Tags Populares"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(x,{variant:m==="all"?"default":"secondary",className:"cursor-pointer hover:bg-primary hover:text-primary-foreground transition-smooth",onClick:()=>n("all"),children:"Todos"}),p.map(t=>e.jsx(x,{variant:m===t?"default":"secondary",className:"cursor-pointer hover:bg-primary hover:text-primary-foreground transition-smooth",onClick:()=>n(t),children:t},t))]})]})]}),oe=()=>{const[o,p]=l.useState([]),[i,m]=l.useState([]),[a,n]=l.useState(""),[t,g]=l.useState("all"),[c,h]=l.useState("all"),[b,y]=l.useState(!0);l.useEffect(()=>{N()},[]),l.useEffect(()=>{v()},[o,a,t,c]);const N=async()=>{try{const{data:s,error:r}=await F.from("blog_posts").select("*").eq("published",!0).order("published_at",{ascending:!1});if(r)throw r;p(s||[])}catch(s){console.error("Error fetching posts:",s)}finally{y(!1)}},v=()=>{let s=[...o];a&&(s=s.filter(r=>r.title.toLowerCase().includes(a.toLowerCase())||r.excerpt.toLowerCase().includes(a.toLowerCase())||r.tags.some(S=>S.toLowerCase().includes(a.toLowerCase())))),t!=="all"&&(s=s.filter(r=>r.category===t)),c!=="all"&&(s=s.filter(r=>r.tags.includes(c))),m(s)},w=Array.from(new Set(o.map(s=>s.category))),B=Array.from(new Set(o.flatMap(s=>s.tags))),f=o.find(s=>s.featured),C={"@context":"https://schema.org","@type":"Blog",name:"Blog FlyNows - Vendas B2B & Análise DISC",description:"Conteúdo estratégico sobre personalização de vendas, análise de perfil comportamental e técnicas avançadas para profissionais B2B",url:"https://flynows.com.br/blog",publisher:{"@type":"Organization",name:"FlyNows",logo:{"@type":"ImageObject",url:"https://flynows.com.br/favicon.png"}},blogPost:o.slice(0,10).map(s=>({"@type":"BlogPosting",headline:s.title,description:s.excerpt,url:`https://flynows.com.br/blog/${s.slug}`,datePublished:s.published_at,author:{"@type":"Person",name:s.author_name},image:s.cover_image||"https://flynows.com.br/og-image.jpg"}))};return e.jsxs("div",{className:"min-h-screen",children:[e.jsxs(I,{children:[e.jsx("title",{children:"Blog FlyNows - Vendas B2B, DISC & Personalização | flynows.com.br"}),e.jsx("meta",{name:"description",content:"Conteúdo estratégico sobre personalização de vendas, análise de perfil comportamental DISC e técnicas avançadas para profissionais B2B."}),e.jsx("meta",{name:"keywords",content:"vendas B2B, DISC, análise comportamental, personalização vendas, prospecção, SDR, BDR"}),e.jsx("link",{rel:"canonical",href:"https://flynows.com.br/blog"}),e.jsx("meta",{property:"og:title",content:"Blog FlyNows - Vendas B2B & Análise DISC"}),e.jsx("meta",{property:"og:description",content:"Conteúdo estratég
1ico sobre personalização de vendas e análise de perfil comportamental DISC."}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://flynows.com.br/blog"}),e.jsx("meta",{property:"og:image",content:"https://flynows.com.br/og-image.jpg"}),e.jsx("meta",{property:"og:locale",content:"pt_BR"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Blog FlyNows - Vendas B2B & Análise DISC"}),e.jsx("meta",{name:"twitter:description",content:"Conteúdo estratégico sobre personalização de vendas e análise DISC."}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(C)})]}),e.jsx(k,{}),e.jsx(V,{}),e.jsxs("main",{className:"pt-24",children:[e.jsx("section",{className:"gradient-hero py-20 border-b border-border",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto text-center space-y-6",children:[e.jsxs(x,{className:"mb-4",children:[e.jsx(j,{className:"h-3 w-3 mr-1"}),"Blog & Insights"]}),e.jsx("h1",{className:"text-4xl md:text-6xl font-bold bg-gradient-to-r from-primary to-purple-600 bg-clip-text text-transparent",children:"Venda Mais com Inteligência de Perfil"}),e.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"Conteúdo estratégico sobre personalização de vendas, análise de perfil comportamental e técnicas avançadas para profissionais B2B"}),e.jsxs("div",{className:"relative max-w-2xl mx-auto mt-8",children:[e.jsx(T,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),e.jsx(D,{type:"text",placeholder:"Buscar artigos, tópicos ou tags...",value:a,onChange:s=>n(s.target.value),className:"pl-12 h-14 text-lg border-2 focus-visible:ring-primary"})]}),e.jsx("div",{className:"flex justify-center mt-6",children:e.jsx(P,{to:"/blog/categorias",children:e.jsxs(d,{variant:"outline",className:"gap-2",children:[e.jsx(A,{className:"h-4 w-4"}),"Ver todas as categorias"]})})})]})})}),f&&!a&&t==="all"&&c==="all"&&e.jsx("section",{className:"py-12 border-b border-border bg-muted/30",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("h2",{className:"text-2xl font-bold mb-6 flex items-center gap-2",children:[e.jsx(j,{className:"h-6 w-6 text-primary"}),"Destaque da Semana"]}),e.jsx(u,{post:f,featured:!0})]})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"grid lg:grid-cols-[1fr_320px] gap-8",children:[e.jsxs("div",{children:[e.jsx(O,{categories:w,tags:B,selectedCategory:t,selectedTag:c,onCategoryChange:g,onTagChange:h}),b?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"Carregando artigos..."})]}):i.length>0?e.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:i.map(s=>e.jsx(u,{post:s},s.id))}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx("p",{className:"text-lg text-muted-foreground",children:"Nenhum artigo encontrado com os filtros selecionados."}),e.jsx(d,{variant:"outline",className:"mt-4",onClick:()=>{n(""),g("all"),h("all")},children:"Limpar Filtros"})]})]}),e.jsx("aside",{className:"space-y-8 lg:sticky lg:top-24 lg:self-start",children:e.jsx(E,{variant:"sidebar",source:"blog_sidebar"})})]})})})]}),e.jsx(z,{}),e.jsx(L,{})]})};export{oe as default};
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.