1import{j as e}from"./vendor-motion-CPxq9Xvn.js";import{r as p}from"./vendor-i18n-CO3kK2bH.js";import{u as k,H as G,a as i,B as b,S as R,f as y,b0 as M,a4 as W,l as I,dJ as B,A as S,dK as _}from"./index-CFAvyuXu.js";import{G as O}from"./globe-D0MKCb1Y.js";import{P as K}from"./pen-DP6KqCyg.js";import"./vendor-react-CQmBMThG.js";const w={pt:{"como-escrever":"Como Escrever",autopublicacao:"Autopublicação","marketing-literario":"Marketing Literário","ia-para-autores":"IA para Autores","historias-de-sucesso":"Histórias de Sucesso","dicas-de-escrita":"Dicas de Escrita"},en:{"como-escrever":"How to Write",autopublicacao:"Self-Publishing","marketing-literario":"Book Marketing","ia-para-autores":"AI for Authors","historias-de-sucesso":"Success Stories","dicas-de-escrita":"Writing Tips"},es:{"como-escrever":"Cómo Escribir",autopublicacao:"Autopublicación","marketing-literario":"Marketing Literario","ia-para-autores":"IA para Autores","historias-de-sucesso":"Historias de Ãxito","dicas-de-escrita":"Consejos de Escritura"},fr:{"como-escrever":"Comment Ãcrire",autopublicacao:"Auto-édition","marketing-literario":"Marketing Littéraire","ia-para-autores":"IA pour Auteurs","historias-de-sucesso":"Histoires de Réussite","dicas-de-escrita":"Conseils d'Ãcriture"},de:{"como-escrever":"Wie man schreibt",autopublicacao:"Self-Publishing","marketing-literario":"Buchmarketing","ia-para-autores":"KI für Autoren","historias-de-sucesso":"Erfolgsgeschichten","dicas-de-escrita":"Schreibtipps"},it:{"como-escrever":"Come Scrivere",autopublicacao:"Autopubblicazione","marketing-literario":"Marketing Letterario","ia-para-autores":"IA per Autori","historias-de-sucesso":"Storie di Successo","dicas-de-escrita":"Consigli di Scrittura"},ja:{"como-escrever":"æ¸ãæ¹",autopublicacao:"ã»ã«ãåºç","marketing-literario":"æ¸ç±ãã¼ã±ãã£ã³ã°","ia-para-autores":"èè
åãAI","historias-de-sucesso":"æåäºä¾","dicas-de-escrita":"å·çã®ãã³ã"},ko:{"como-escrever":"ê¸ì°ê¸°",autopublicacao:"ì
í ì¶í","marketing-literario":"ëì ë§ì¼í
","ia-para-autores":"ìê°ë¥¼ ìí AI","historias-de-sucesso":"ì±ê³µ ì¬ë¡","dicas-de-escrita":"ê¸ì°ê¸° í"},zh:{"como-escrever":"å使¹æ³",autopublicacao:"èªå©åºç","marketing-literario":"å¾ä¹¦è¥é","ia-para-autores":"AIåä½","historias-de-sucesso":"æåæ¡ä¾","dicas-de-escrita":"å使巧"},ar:{"como-escrever":"ÙÙÙÙØ© اÙÙØªØ§Ø¨Ø©",autopublicacao:"اÙÙØ´Ø± Ø§ÙØ°Ø§ØªÙ","marketing-literario":"تسÙÙ٠اÙÙØªØ¨","ia-para-autores":"Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠ÙÙÙ
ؤÙÙÙÙ","historias-de-sucesso":"ÙØµØµ اÙÙØ¬Ø§Ø","dicas-de-escrita":"ÙØµØ§Ø¦Ø اÙÙØªØ§Ø¨Ø©"},hi:{"como-escrever":"à¤à¥à¤¸à¥ लिà¤à¥à¤",autopublicacao:"सà¥à¤µ-पà¥à¤°à¤à¤¾à¤¶à¤¨","marketing-literario":"पà¥à¤¸à¥à¤¤à¤ विपणन","ia-para-autores":"लà¥à¤à¤à¥à¤ à¤à¥ लिठAI","historias-de-sucesso":"सफलता à¤à¥ à¤à¤¹à¤¾à¤¨à¤¿à¤¯à¤¾à¤","dicas-de-escrita":"लà¥à¤à¤¨ यà¥à¤à¥à¤¤à¤¿à¤¯à¤¾à¤"}},j={"como-escrever":"bg-blue-500/20 text-blue-400 border-blue-500/30",autopublicacao:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30","marketing-literario":"bg-purple-500/20 text-purple-400 border-purple-500/30","ia-para-autores":"bg-amber-500/20 text-amber-400 border-amber-500/30","historias-de-sucesso":"bg-pink-500/20 text-pink-400 border-pink-500/30","dicas-de-escrita":"bg-cyan-500/20 text-cyan-400 border-cyan-500/30"},q={pt:{label:"Português",flag:"ð§ð·",nativeName:"Português"},en:{label:"English",flag:"ðºð¸",nativeName:"English"},es:{label:"Español",flag:"ðªð¸",nativeName:"Español"},fr:{label:"Français",flag:"ð«ð·",nativeName:"Français"},de:{label:"Deutsch",flag:"ð©ðª",nativeName:"Deutsch"},it:{label:"Italiano",flag:"ð®ð¹",nativeName:"Italiano"},ja:{label:"æ¥æ¬èª",flag:"ð¯ðµ",nativeName:"æ¥æ¬èª"},ko:{label:"íêµì´",flag:"ð°ð·",nativeName:"íêµì´"},zh:{label:"䏿",flag:"ð¨ð³",nativeName:"䏿"},ar:{label:"Ø§ÙØ¹Ø±Ø¨ÙØ©",flag:"ð¸ð¦",nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ©"},hi:{label:"हिनà¥à¤¦à¥",flag:"ð®ð³",nativeName:"हिनà¥à¤¦à¥"}},U=["pt","en","es","fr","de","it","ja","ko","zh","ar","hi"],P={pt:{badge:"Dicas exclusivas para autores independentes",title:"Blog SÃBHIA Books",desc:"Tudo o que você precisa saber para transformar sua ideia em livro publicado. Guias práticos, dicas de escrita e estratég
1ias de autopublicação.",lang:"Idioma",searchPlaceholder:"Buscar artigos...",all:"Todos",featured:"Destaque",readFull:"Ler artigo completo",readMore:"Ler mais",noArticles:"Nenhum artigo encontrado",newArticles:"Novos artigos são publicados diariamente.",ctaTitle:"Pronto para escrever seu livro?",ctaDesc:"Planejamento gratuito. Livro completo por R$ 49,99. Capas, ilustrações, tradução e publicação global.",ctaButton:"Comece Grátis Agora",startFree:"Comece Grátis",howItWorks:"Como Funciona",prev:"Anterior",next:"Próxima página",rights:"Todos os direitos reservados.",pricing:"Preços",terms:"Termos",privacy:"Privacidade"},en:{badge:"Exclusive tips for independent authors",title:"SÃBHIA Books Blog",desc:"Everything you need to know to turn your idea into a published book. Practical guides, writing tips and AI self-publishing strategies.",lang:"Language",searchPlaceholder:"Search articles...",all:"All",featured:"Featured",readFull:"Read full article",readMore:"Read more",noArticles:"No articles found",newArticles:"New articles are published regularly.",ctaTitle:"Ready to write your book?",ctaDesc:"Free planning. Complete book for $9.99. Covers, illustrations, translation and global publishing.",ctaButton:"Start Free Now",startFree:"Start Free",howItWorks:"How It Works",prev:"Previous",next:"Next page",rights:"All rights reserved.",pricing:"Pricing",terms:"Terms",privacy:"Privacy"},es:{badge:"Consejos exclusivos para autores independientes",title:"Blog SÃBHIA Books",desc:"Todo lo que necesitas saber para convertir tu idea en un libro publicado. GuÃas prácticas, consejos de escritura y estrategias de autopublicación con IA.",lang:"Idioma",searchPlaceholder:"Buscar artÃculos...",all:"Todos",featured:"Destacado",readFull:"Leer artÃculo completo",readMore:"Leer más",noArticles:"No se encontraron artÃculos",newArticles:"Se publican nuevos artÃculos regularmente.",ctaTitle:"¿Listo para escribir tu libro?",ctaDesc:"Planificación gratuita. Libro completo por $9.99. Portadas, ilustraciones, traducción y publicación global.",ctaButton:"Empieza Gratis Ahora",startFree:"Empieza Gratis",howItWorks:"Cómo Funciona",prev:"Anterior",next:"Página siguiente",rights:"Todos los derechos reservados.",pricing:"Precios",terms:"Términos",privacy:"Privacidad"},fr:{badge:"Conseils exclusifs pour auteurs indépendants",title:"Blog SÃBHIA Books",desc:"Tout ce que vous devez savoir pour transformer votre idée en livre publié. Guides pratiques, conseils d'écriture et stratégies d'auto-édition avec l'IA.",lang:"Langue",searchPlaceholder:"Rechercher des articles...",all:"Tous",featured:"à la une",readFull:"Lire l'article complet",readMore:"Lire la suite",noArticles:"Aucun article trouvé",newArticles:"De nouveaux articles sont publiés régulièrement.",ctaTitle:"Prêt à écrire votre livre ?",ctaDesc:"Planification gratuite. Livre complet pour 9,99 â¬. Couvertures, illustrations, traduction et publication mondiale.",ctaButton:"Commencez Gratuit",startFree:"Commencez Gratuit",howItWorks:"Comment ça marche",prev:"Précédent",next:"Page suivante",rights:"Tous droits réservés.",pricing:"Tarifs",terms:"Conditions",privacy:"Confidentialité"},de:{badge:"Exklusive Tipps für unabhängige Autoren",title:"SÃBHIA Books Blog",desc:"Alles, was Sie wissen müssen, um Ihre Idee in ein veröffentlichtes Buch zu verwandeln. Praktische Anleitungen, Schreibtipps und KI-Self-Publishing-Strategien.",lang:"Sprache",searchPlaceholder:"Artikel suchen...",all:"Alle",featured:"Empfohlen",readFull:"Vollständigen Artikel lesen",readMore:"Weiterlesen",noArticles:"Keine Artikel gefunden",newArticles:"Neue Artikel werden regelmäÃig veröffentlicht.",ctaTitle:"Bereit, Ihr Buch zu schreiben?",ctaDesc:"Kostenlose Planung. Komplettes Buch für 9,99 â¬. Cover, Illustrationen, Ãbersetzung und weltweite Veröffentlichung.",ctaButton:"Jetzt kostenlos starten",startFree:"Kostenlos starten",howItWorks:"Wie es funktioniert",prev:"Zurück",next:"Nächste Seite",rights:"Alle Rechte vorbehalten.",pricing:"Preise",terms:"AGB",privacy:"Datenschutz"},it:{badge:"Consigli esclusivi per autori indipendenti",title:"Blog SÃBHIA Books",desc:"Tutto ciò che devi sapere per trasformare la tua idea in un libro pubblicato. Guide pratiche, consigli di scrittura e strategie di auto
1pubblicazione con l'IA.",lang:"Lingua",searchPlaceholder:"Cerca articoli...",all:"Tutti",featured:"In evidenza",readFull:"Leggi l'articolo completo",readMore:"Leggi di più",noArticles:"Nessun articolo trovato",newArticles:"Nuovi articoli vengono pubblicati regolarmente.",ctaTitle:"Pronto a scrivere il tuo libro?",ctaDesc:"Pianificazione gratuita. Libro completo per â¬9,99. Copertine, illustrazioni, traduzione e pubblicazione globale.",ctaButton:"Inizia Gratis Ora",startFree:"Inizia Gratis",howItWorks:"Come Funziona",prev:"Precedente",next:"Pagina successiva",rights:"Tutti i diritti riservati.",pricing:"Prezzi",terms:"Termini",privacy:"Privacy"},ja:{badge:"ç¬ç«èè
ã®ããã®éå®ãã³ã",title:"SÃBHIA Books ããã°",desc:"ã¢ã¤ãã¢ãåºçãããæ¬ã«å¤ããããã«å¿
è¦ãªãã¹ã¦ãå®è·µçãªã¬ã¤ããå·çã®ãã³ããAIã»ã«ããããªãã·ã³ã°æ¦ç¥ã",lang:"è¨èª",searchPlaceholder:"è¨äºãæ¤ç´¢...",all:"ãã¹ã¦",featured:"注ç®",readFull:"è¨äºå
¨æãèªã",readMore:"ç¶ããèªã",noArticles:"è¨äºãè¦ã¤ããã¾ãã",newArticles:"æ°ããè¨äºã宿çã«å
¬éããã¾ãã",ctaTitle:"ããªãã®æ¬ãæ¸ãæºåã¯ã§ãã¾ãããï¼",ctaDesc:"ç¡æãã©ã³ãã³ã°ãå®å
¨ãªæ¬ã$9.99ãã«ãã¼ãã¤ã©ã¹ãã翻訳ãã°ãã¼ãã«åºçã",ctaButton:"ä»ããç¡æã§å§ãã",startFree:"ç¡æã§å§ãã",howItWorks:"ä»çµã¿",prev:"åã¸",next:"次ã®ãã¼ã¸",rights:"å
¨è使¨©ææã",pricing:"æé",terms:"å©ç¨è¦ç´",privacy:"ãã©ã¤ãã·ã¼"},ko:{badge:"ë
립 ì ì를 ìí ë
ì í",title:"SÃBHIA Books ë¸ë¡ê·¸",desc:"ìì´ëì´ë¥¼ ì¶íë ì±
ì¼ë¡ ë°ê¾¸ë ë° íìí 모ë ê². ì¤ì©ì ì¸ ê°ì´ë, ê¸ì°ê¸° í, AI ì
í í¼ë¸ë¦¬ì± ì ëµ.",lang:"ì¸ì´",searchPlaceholder:"ê¸°ì¬ ê²ì...",all:"ì ì²´",featured:"ì¶ì²",readFull:"ì ì²´ ê¸°ì¬ ì½ê¸°",readMore:"ë ì½ê¸°",noArticles:"기ì¬ë¥¼ ì°¾ì ì ììµëë¤",newArticles:"ìë¡ì´ 기ì¬ê° ì 기ì ì¼ë¡ ê²ìë©ëë¤.",ctaTitle:"ì±
ì ì¸ ì¤ë¹ê° ëì
¨ëì?",ctaDesc:"ë¬´ë£ ê¸°í. $9.99ì ìì±ë ì±
. íì§, ì½í, ë²ì ë° ê¸ë¡ë² ì¶í.",ctaButton:"ì§ê¸ 무ë£ë¡ ìì",startFree:"무ë£ë¡ ìì",howItWorks:"ìë ë°©ì",prev:"ì´ì ",next:"ë¤ì íì´ì§",rights:"모ë ê¶ë¦¬ ë³´ì .",pricing:"ê°ê²©",terms:"ì´ì©ì½ê´",privacy:"ê°ì¸ì ë³´"},zh:{badge:"ç¬ç«ä½è
çä¸å±æå·§",title:"SÃBHIA Books å客",desc:"å°æ¨çæ³æ³åæåºçä¹¦ç±æéçä¸åãå®ç¨æåãå使巧åAIèªå©åºççç¥ã",lang:"è¯è¨",searchPlaceholder:"æç´¢æç« ...",all:"å
¨é¨",featured:"ç²¾é",readFull:"é
读å
¨æ",readMore:"é
读æ´å¤",noArticles:"æªæ¾å°æç« ",newArticles:"æ°æç« å®æåå¸ã",ctaTitle:"åå¤å¥½åä½ ç书äºåï¼",ctaDesc:"å
è´¹è§åã宿´ä¹¦ç±ä»
é$9.99ãå°é¢ãæç»ãç¿»è¯åå
¨çåºçã",ctaButton:"ç«å³å
è´¹å¼å§",startFree:"å
è´¹å¼å§",howItWorks:"å·¥ä½åç",prev:"ä¸ä¸é¡µ",next:"ä¸ä¸é¡µ",rights:"çæææã",pricing:"ä»·æ ¼",terms:"æ¡æ¬¾",privacy:"éç§"},ar:{badge:"ÙØµØ§Ø¦Ø ØØµØ±ÙØ© ÙÙÙ
ؤÙÙÙ٠اÙÙ
ستÙÙÙÙ",title:"Ù
دÙÙØ© SÃBHIA Books",desc:"ÙÙ Ù
ا ØªØØªØ§Ø¬ Ù
Ø¹Ø±ÙØªÙ ÙØªØÙÙÙ ÙÙØ±ØªÙ Ø¥ÙÙ ÙØªØ§Ø¨ Ù
ÙØ´Ùر. Ø£Ø¯ÙØ© عÙ
ÙÙØ© ÙÙØµØ§Ø¦Ø ÙØªØ§Ø¨Ø© ÙØ§Ø³ØªØ±Ø§ØªÙØ¬ÙØ§Øª اÙÙØ´Ø± Ø§ÙØ°Ø§ØªÙ Ø¨Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ.",lang:"اÙÙØºØ©",searchPlaceholder:"Ø§ÙØ¨ØØ« Ù٠اÙÙ
ÙØ§Ùات...",all:"اÙÙÙ",featured:"Ù
Ù
ÙØ²",readFull:"Ø§ÙØ±Ø£ اÙÙ
ÙØ§Ù ÙØ§Ù
ÙØ§Ù",readMore:"Ø§ÙØ±Ø£ اÙÙ
Ø²ÙØ¯",noArticles:"ÙÙ
ÙØªÙ
Ø§ÙØ¹Ø«Ùر عÙÙ Ù
ÙØ§Ùات",newArticles:"ÙØªÙ
ÙØ´Ø± Ù
ÙØ§Ùات Ø¬Ø¯ÙØ¯Ø© Ø¨Ø§ÙØªØ¸Ø§Ù
.",ctaTitle:"Ù
ستعد ÙÙØªØ§Ø¨Ø© ÙØªØ§Ø¨ÙØ",ctaDesc:"ØªØ®Ø·ÙØ· Ù
جاÙÙ. ÙØªØ§Ø¨ ÙØ§Ù
٠ب٠$9.99. أغÙÙØ© ÙØ±Ø³ÙÙ
ØªÙØ¶ÙØÙØ© ÙØªØ±Ø¬Ù
Ø© ÙÙØ´Ø± عاÙÙ
Ù.",ctaButton:"ابدأ Ù
Ø¬Ø§ÙØ§Ù Ø§ÙØ¢Ù",startFree:"ابدأ Ù
Ø¬Ø§ÙØ§Ù",howItWorks:"ÙÙÙ ÙØ¹Ù
Ù",prev:"Ø§ÙØ³Ø§Ø¨Ù",next:"Ø§ÙØµÙØØ© Ø§ÙØªØ§ÙÙØ©",rights:"جÙ
ÙØ¹ Ø§ÙØÙÙÙ Ù
ØÙÙØ¸Ø©.",pricing:"Ø§ÙØ£Ø³Ø¹Ø§Ø±",terms:"Ø§ÙØ´Ø±ÙØ·",privacy:"Ø§ÙØ®ØµÙØµÙØ©"},hi:{badge:"सà¥à¤µà¤¤à¤à¤¤à¥à¤° लà¥à¤à¤à¥à¤ à¤à¥ लिठविशà¥à¤· सà¥à¤à¤¾à¤µ",title:"SÃBHIA Books बà¥à¤²à¥à¤",desc:"à¤
पनॠविà¤à¤¾à¤° à¤à¥ पà¥à¤°à¤à¤¾à¤¶à¤¿à¤¤ पà¥à¤¸à¥à¤¤à¤ मà¥à¤ बदलनॠà¤à¥ लिठà¤à¤µà¤¶à¥à¤¯à¤ सब à¤à¥à¤à¥¤ वà¥à¤¯à¤¾à¤µà¤¹à¤¾à¤°à¤¿à¤ à¤à¤¾à¤à¤¡, लà¥à¤à¤¨ यà¥à¤à¥à¤¤à¤¿à¤¯à¤¾à¤ à¤à¤° AI सà¥à¤µ-पà¥à¤°à¤à¤¾à¤¶à¤¨ रणनà¥à¤¤à¤¿à¤¯à¤¾à¤à¥¤",lang:"à¤à¤¾à¤·à¤¾",searchPlaceholder:"लà¥à¤ à¤à¥à¤à¥à¤...",all:"सà¤à¥",featured:"विशà¥à¤·",readFull:"पà¥à¤°à¤¾ लà¥à¤ पढ़à¥à¤",readMore:"à¤à¤° पढ़à¥à¤",noArticles:"à¤à¥à¤ लà¥à¤ नहà¥à¤ मिला",newArticles:"नठलà¥à¤ नियमित रà¥à¤ª सॠपà¥à¤°à¤à¤¾à¤¶à¤¿à¤¤ हà¥à¤¤à¥ हà¥à¤à¥¤",ctaTitle:"à¤
पनॠà¤à¤¿à¤¤à¤¾à¤¬ लिà¤à¤¨à¥ à¤à¥ लिठतà¥à¤¯à¤¾à¤° हà¥à¤?",ctaDesc:"मà¥à¤«à¥à¤¤ यà¥à¤à¤¨à¤¾à¥¤ $9.99 मà¥à¤ पà¥à¤°à¥à¤£ पà¥à¤¸à¥à¤¤à¤à¥¤ à¤à¤µà¤°, à¤à¤¿à¤¤à¥à¤°à¤£, à¤
नà¥à¤µà¤¾à¤¦ à¤à¤° वà¥à¤¶à¥à¤µà¤¿à¤ पà¥à¤°à¤à¤¾à¤¶à¤¨à¥¤",ctaButton:"à¤
à¤à¥ मà¥à¤«à¥à¤¤ शà¥à¤°à¥ à¤à¤°à¥à¤",startFree:"मà¥
1फà¥à¤¤ शà¥à¤°à¥ à¤à¤°à¥à¤",howItWorks:"à¤à¥à¤¸à¥ à¤à¤¾à¤® à¤à¤°à¤¤à¤¾ हà¥",prev:"पिà¤à¤²à¤¾",next:"à¤
à¤à¤²à¤¾ पà¥à¤",rights:"सरà¥à¤µà¤¾à¤§à¤¿à¤à¤¾à¤° सà¥à¤°à¤à¥à¤·à¤¿à¤¤à¥¤",pricing:"मà¥à¤²à¥à¤¯",terms:"शरà¥à¤¤à¥à¤",privacy:"à¤à¥à¤ªà¤¨à¥à¤¯à¤¤à¤¾"}},C=["from-amber-900/60 to-orange-900/40","from-blue-900/60 to-indigo-900/40","from-emerald-900/60 to-teal-900/40","from-purple-900/60 to-pink-900/40","from-rose-900/60 to-red-900/40","from-cyan-900/60 to-blue-900/40"];function L(s){const o=s.replace(/<[^>]+>/g,"").split(/\s+/).length;return Math.max(1,Math.ceil(o/200))}function F({post:s,className:c,iconSize:o="w-8 h-8"}){const n=s.imageUrl?_(s.imageUrl,"public_resource",{currentOrigin:typeof window<"u"?window.location.origin:void 0}):null;if(n?.ok)return e.jsx("img",{src:n.normalizedUrl,alt:s.imageAlt||s.title,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-500 ${c||""}`,loading:"lazy"});const x=s.id%C.length;return e.jsx("div",{className:`w-full h-full bg-gradient-to-br ${C[x]} flex items-center justify-center`,children:e.jsxs("div",{className:"text-center opacity-60",children:[e.jsx(K,{className:`${o} text-white/40 mx-auto mb-2`}),e.jsx("p",{className:"text-white/30 text-xs font-medium px-4 line-clamp-2",children:s.title})]})})}function T(s){return{pt:"pt-BR",en:"en-US",es:"es-ES",fr:"fr-FR",de:"de-DE",it:"it-IT",ja:"ja-JP",ko:"ko-KR",zh:"zh-CN",ar:"ar-SA",hi:"hi-IN"}[s]||"pt-BR"}function ee(){const[s,c]=p.useState(""),[o,n]=p.useState(null),[x,z]=p.useState("pt"),[u,f]=p.useState(0),{data:N={}}=k({queryKey:["/api/blog/languages"],queryFn:async()=>{const t=await fetch("/api/blog/languages");return t.ok?t.json():{}},staleTime:6e4}),m=U.filter(t=>(N[t]||0)>0),l=m.includes(x)?x:m.length>0?m[0]:"pt",r=P[l]||P.pt,v=w[l]||w.pt,{data:D=[],isLoading:$}=k({queryKey:["/api/blog/posts",u,l],queryFn:async()=>{const t=await fetch(`/api/blog/posts?limit=12&offset=${u*12}&lang=${l}`);if(!t.ok)throw new Error("Failed to fetch");return t.json()}}),d=D.filter(t=>{const h=!s||t.title.toLowerCase().includes(s.toLowerCase())||t.excerpt&&t.excerpt.toLowerCase().includes(s.toLowerCase()),g=!o||t.category===o;return h&&g}),E=Object.keys(w.pt),a=d.length>0?d[0]:null,A=d.length>1?d.slice(1):[];return e.jsxs("div",{className:"min-h-screen bg-[#0a0a0f]",children:[e.jsxs(G,{children:[e.jsxs("title",{children:[r.title," - SÃBHIA Books"]}),e.jsx("meta",{name:"description",content:r.desc}),e.jsx("meta",{property:"og:title",content:r.title}),e.jsx("meta",{property:"og:description",content:r.desc}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:"https://sabhia.ai/blog"}),e.jsx("html",{lang:l})]}),e.jsx("nav",{className:"border-b border-white/10 bg-[#0a0a0f]/80 backdrop-blur-xl sticky top-0 z-50",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[e.jsx(i,{href:"/",children:e.jsx("div",{className:"flex items-center gap-2 cursor-pointer","data-testid":"link-home",children:e.jsx("img",{src:"/logo.webp",alt:"SÃBHIA Books",className:"h-8 w-auto"})})}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(i,{href:"/blog",children:e.jsx("span",{className:"text-white/80 hover:text-white text-sm font-medium cursor-pointer","data-testid":"link-blog",children:"Blog"})}),e.jsx(i,{href:"/como-funciona",children:e.jsx("span",{className:"text-white/60 hover:text-white text-sm cursor-pointer","data-testid":"link-como-funciona",children:r.howItWorks})}),e.jsx(i,{href:"/login?utm_source=blog&utm_medium=listing&utm_campaign=blog_index&utm_content=nav_cta",children:e.jsx(b,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-black font-bold","data-testid":"button-login",children:r.startFree})})]})]})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 md:py-16",children:[e.jsxs("div",{className:"text-center mb-10 md:mb-14",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 text-xs font-medium mb-5",children:[e.jsx(R,{className:"w-3.5 h-3.5"}),r.badge]}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[e.jsx(y,{className:"w-6 h-6 md:w-8 md:h-8 text-amber-400"}),e.jsx("h1",{className:"text-2xl sm:text-4xl md:text-5xl font-bold text-white","data-testid":"text-blog-title",children:r.title})]}),e.jsx("p",{className:"text-sm md:text-lg text-white/60 max-w-2xl mx-auto leading-relaxed","data-testid":"text-blog-description",children:r.desc})]}),m.length>1&&e.jsxs("div",{className:"mb-8","data-testid":"section-language-tabs",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(O,{className:"w-4 h-4 text-white/40"}),e.jsx("span",{className:"text-sm text-white/40 font-medium",children:r.lang})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:m.map(t=>{const h=q[t];if(!h)return null;const g=t===l,H=N[t]||0;return e.jsxs("button",{onClick:()=>{z(t),f(0),c(""),n(null)},className:`group flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-medium border transition-all duration-200 ${g?"bg-amber-500/15 text-amber-300 border-amber-500/40 shadow-sm shadow-amber-500/10":"bg-white/[0.03] text-white/50 border-white/[0.08] hover:bg-white/[0.06] hover:text-white/70 hover:border-white/15"}`,"data-testid":`filter-lang-${t}`,children:[e.jsx("span",{className:"text-base",children:h.flag}),e.jsx("span",{children:h.nativeName}),e.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full ${g?"bg-amber-500/20 text-amber-400":"bg-white/10 text-white/30"}`,children:H})]},t)})})]}),e.jsx("div",{className:"flex flex-col sm:flex-row gap-4 mb-8",children:e.jsxs("div",{className:"relative flex-1",children:[e.jsx(M,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/40"}),e.jsx(W,{placeholder:r.searchPlaceholder,value:s,onChange:t=>c(t.target.value),className:"pl-10 bg-white/5 border-white/10 text-white placeholder:text-white/40","data-testid":"input-search-blog"})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-8",children:[e.jsx("button",{onClick:()=>n(null),className:`px-3 py-1.5 rounded-full text-xs font-medium border transition-colors ${o?"bg-white/5 text-white/60 border-white/10 hover:bg-white/10":"bg-white/20 text-white border-white/30"}`,"data-testid":"filter-category-all",children:r.all}),E.map(t=>e.jsx("button",{onClick:()=>n(o===t?null:t),className:`px-3 py-1.5 rounded-full text-xs font-medium border transition-colors ${o===t?j[t]||"bg-white/20 text-white border-white/30":"bg-white/5 text-white/60 border-white/10 hover:bg-white/10"}`,"data-testid":`filter-category-${t}`,children:v[t]||t},t))]}),$?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-amber-400 border-t-transparent roun
1ded-full animate-spin"})}):d.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx(y,{className:"w-12 h-12 text-white/20 mx-auto mb-4"}),e.jsx("p",{className:"text-white/40 text-lg",children:r.noArticles}),e.jsx("p",{className:"text-white/30 text-sm mt-2",children:r.newArticles})]}):e.jsxs(e.Fragment,{children:[a&&e.jsx(i,{href:`/blog/${a.slug}`,children:e.jsx("article",{className:"group bg-white/5 border border-white/10 rounded-2xl overflow-hidden hover:bg-white/[0.07] hover:border-amber-500/30 transition-all cursor-pointer mb-10","data-testid":`card-blog-post-${a.id}`,children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2",children:[e.jsx("div",{className:"aspect-video lg:aspect-auto lg:min-h-[360px] bg-white/5 overflow-hidden",children:e.jsx(F,{post:a,iconSize:"w-12 h-12"})}),e.jsxs("div",{className:"p-6 md:p-8 lg:p-10 flex flex-col justify-center",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",children:[e.jsxs("span",{className:"px-3 py-1 rounded-full text-[11px] font-bold bg-amber-500/20 text-amber-400 border border-amber-500/30",children:["⨠",r.featured]}),a.category&&e.jsx("span",{className:`px-2.5 py-0.5 rounded-full text-[10px] font-medium border ${j[a.category]||"bg-white/10 text-white/60 border-white/10"}`,children:v[a.category]||a.category}),e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-white/40",children:[e.jsx(I,{className:"w-3 h-3"}),L(a.content)," min"]})]}),e.jsx("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-white group-hover:text-amber-400 transition-colors mb-4 leading-tight","data-testid":`text-post-title-${a.id}`,children:a.title}),a.excerpt&&e.jsx("p",{className:"text-base text-white/50 mb-6 line-clamp-3 leading-relaxed","data-testid":`text-post-excerpt-${a.id}`,children:a.excerpt}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-4 border-t border-white/5",children:[a.publishedAt&&e.jsxs("span",{className:"flex items-center gap-1 text-[12px] text-white/40",children:[e.jsx(B,{className:"w-3.5 h-3.5"}),new Date(a.publishedAt).toLocaleDateString(T(l),{day:"numeric",month:"short",year:"numeric"})]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-amber-400 font-semibold group-hover:gap-3 transition-all",children:[r.readFull," ",e.jsx(S,{className:"w-4 h-4"})]})]})]})]})})}),A.length>0&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:A.map(t=>e.jsx(i,{href:`/blog/${t.slug}`,children:e.jsxs("article",{className:"group bg-white/5 border border-white/10 rounded-xl overflow-hidden hover:bg-white/[0.07] hover:border-white/20 transition-all cursor-pointer h-full flex flex-col","data-testid":`card-blog-post-${t.id}`,children:[e.jsx("div",{className:"aspect-video bg-white/5 overflow-hidden relative",children:e.jsx(F,{post:t})}),e.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[t.category&&e.jsx("span",{className:`px-2 py-0.5 rounded-full text-[10px] font-medium border ${j[t.category]||"bg-white/10 text-white/60 border-white/10"}`,children:v[t.category]||t.category}),e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-white/40",children:[e.jsx(I,{className:"w-3 h-3"}),L(t.content)," min"]})]}),e.jsx("h2",{className:"text-lg font-bold text-white group-hover:text-amber-400 transition-colors mb-2 line-clamp-2","data-testid":`text-post-title-${t.id}`,children:t.title}),t.excerpt&&e.jsx("p",{className:"text-sm text-white/50 mb-4 line-clamp-3 flex-1","data-testid":`text-post-excerpt-${t.id}`,children:t.excerpt}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-3 border-t border-white/5",children:[t.publishedAt&&e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-white/40",children:[e.jsx(B,{className:"w-3 h-3"}),new Date(t.publishedAt).toLocaleDateString(T(l),{day:"numeric",month:"short",year:"numeric"})]}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-400 font-medium group-hover:gap-2 transition-all",children:[r.readMore," ",e.jsx(S,{className:"w-3 h-3"})]})]})]})]})},t.id))})]}),d.length>=12&&e.jsxs("div",{className:"flex justify-center gap-3 mt-10",children:[u>0&&e.jsx(b,{variant:"outline",onClick:()=>f(u-1),className:"border-white/20 text-white hover:bg-white/10","data-testid":"button-prev-page",children:r.prev}),e.jsx(b,{variant:"outline",onClick:()=>f(u+1),className:"border-white/20 text-white hover:bg-white/10","data-testid":"button-next-page",children:r.next})]}),e.jsxs("div",{className:"mt-16 bg-gradient-to-r from-amber-500/10 to-orange-500/10 border border-amber-500/20 rounded-2xl p-8 text-center",children:[e.jsx("h2",{className:"text-2xl font-bold text-white mb-3",children:r.ctaTitle}),e.jsx("p",{className:"text-white/60 mb-6 max-w-lg mx-auto",children:r.ctaDesc}),e.jsx(i,{href:"/login?utm_source=blog&utm_medium=listing&utm_campaign=blog_index&utm_content=footer_cta",children:e.jsx(b,{size:"lg",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-black font-bold px-8","data-testid":"button-cta-blog",children:r.ctaButton})})]})]}),e.jsx("footer",{className:"border-t border-white/10 mt-20 py-8",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-white/40 text-sm",children:[e.jsxs("p",{children:["© ",new Date().getFullYear()," SÃBHIA Books. ",r.rights]}),e.jsxs("div",{className:"flex items-center justify-center gap-4 mt-3",children:[e.jsx(i,{href:"/",children:e.jsx("span",{className:"hover:text-white/60 cursor-pointer",children:"Home"})}),e.jsx(i,{href:"/como-funciona",children:e.jsx("span",{className:"hover:text-white/60 cursor-pointer",children:r.howItWorks})}),e.jsx(i,{href:"/precos",children:e.jsx("span",{className:"hover:text-white/60 cursor-pointer",children:r.pricing})}),e.jsx(i,{href:"/termos",children:e.jsx("span",{className:"hover:text-white/60 cursor-pointer",children:r.terms})}),e.jsx(i,{href:"/privacidade",children:e.jsx("span",{className:"hover:text-white/60 cursor-pointer",children:r.privacy})})]})]})})]})}export{ee 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.