Autenticação de Acesso

Entre com seu usuário/e-mail e sua senha cadastrados para acessar o estúdio.

📢 VINHETA NO AR: Identificação ÁUDIO AO VIVO
Pronto para iniciar a transmissão
Selecione os estilos abaixo e clique em Gerar e Tocar
80%
Automação de Vinhetas MP3
📥
Adicionar Vinhetas em MP3
Arraste ou clique para selecionar áudios
Intervalo de Impressora (Loop):
Próxima vinheta em: 2 músicas Etapa 1 de 3
Áudios Cadastrados: 0
Nenhuma vinheta carregada.
Adicione seus áudios MP3 acima.

Seleção de Estilos Musicais • Nenhum selecionado

Adicionar Novas Músicas ao D1

Insira a URL de playlist ou links/IDs de vídeos. O SQLite D1 filtra e grava apenas as músicas inéditas.

Estatísticas do Acervo no SQLite D1
Vinhetas Ativas: 0 / 20
⏱️ Validade: 1 a 7 dias
A voz selecionada lerá essa mensagem durante a programação. 0 / 250
💡 Dica: Escolha um modelo acima para carregar exemplos
✨ Somente vozes neurais de alta fidelidade ativas (Zero robôs antigos).
Efeito de Locutor (Estúdio de Rádio): Ambientação sonora profissional durante a fala
Tom da Voz (Afinação): Natural
Velocidade de Leitura: 1.0x
Validade da Vinheta / Promoção: Tempo de permanência automática no banco (1 a 7 dias)
Encartes Ativos: 0 / 2
📝 Suporta vários produtos (até 4.000 chars)
0 produtos na base
0 / 4000
💡 Fala contínua sem cortes para textos longos.
🎵 Subir Música de Fundo Própria (MP3/WAV):
Nenhuma música enviada (usando batida embutida).
💡 Onde baixar músicas instrumentais grátis (sem voz e sem direitos autorais):
• Pixabay Music (pesquise "forro instrumental", "funk beat" ou "electronic background")
• Mixkit Free Music ou YouTube Audio Library (filtrar por "Sem atribuição").
🎨
ANUNCIOS GG • GERADOR DE ENCARTES VISUAIS
Impressão (A4, A3, Tabloide, Cartaz) & Redes Sociais (Feed, Stories, TV Indoor)
1. Formato, Impressora & Tema
2. Dados da Loja & Campanha
3. Base de Produtos (0 itens)
Carregando catálogo compartilhado...
4. Itens no Encarte (0)
Página 1 de 1 | A4 Vertical • 210×297mm
`); win.document.close(); setTimeout(() => { win.focus(); win.print(); }, 400); } async function exportCurrentPagePng() { const cfg = getLayoutConfig(); const themeKey = document.getElementById('vfThemeSelect')?.value || 'super_oferta'; const theme = VF_THEMES[themeKey] || VF_THEMES.super_oferta; const storeName = document.getElementById('vfStoreName')?.value || 'SUPERMERCADO MODELO'; const campaignTitle = document.getElementById('vfCampaignTitle')?.value || 'FESTIVAL DE OFERTAS'; const validity = document.getElementById('vfValidity')?.value || ''; const footerText = document.getElementById('vfFooterText')?.value || ''; const W = cfg.fmt.expW; const H = cfg.fmt.expH; const canvas = document.createElement('canvas'); canvas.width = W; canvas.height = H; const ctx = canvas.getContext('2d'); // Fundo ctx.fillStyle = theme.bg; ctx.fillRect(0, 0, W, H); // Header const headH = Math.round(H * 0.13); ctx.fillStyle = theme.footerBg; ctx.fillRect(0, 0, W, headH); ctx.fillStyle = theme.subText; ctx.font = `800 ${Math.round(W*0.022)}px Arial, sans-serif`; ctx.fillText(storeName.toUpperCase(), Math.round(W*0.04), Math.round(headH*0.38)); ctx.fillStyle = theme.headerText; ctx.font = `900 ${Math.round(W*0.042)}px Arial, sans-serif`; ctx.fillText(campaignTitle.toUpperCase(), Math.round(W*0.04), Math.round(headH*0.78)); // Grid const padX = Math.round(W * 0.03); const padY = Math.round(H * 0.02); const footH = Math.round(H * 0.05); const gridW = W - padX * 2; const gridH = H - headH - footH - padY * 2; const gap = Math.round(W * 0.015); const cellW = (gridW - gap * (cfg.cols - 1)) / cfg.cols; const cellH = (gridH - gap * (cfg.rows - 1)) / cfg.rows; const start = (state.page - 1) * cfg.perPage; const pageItems = state.items.slice(start, start + cfg.perPage); const loadImg = (src) => new Promise(res => { if (!src) return res(null); const im = new Image(); im.onload = () => res(im); im.onerror = () => res(null); im.src = src; }); for (let i = 0; i < pageItems.length; i++) { const it = pageItems[i]; const r = Math.floor(i / cfg.cols); const c = i % cfg.cols; const x = padX + c * (cellW + gap); const y = headH + padY + r * (cellH + gap); // Tile branco ctx.fillStyle = '#ffffff'; ctx.beginPath(); ctx.roundRect(x, y, cellW, cellH, 16); ctx.fill(); if (it.highlight) { ctx.strokeStyle = '#facc15'; ctx.lineWidth = 6; ctx.stroke(); } // Imagem ou icone const img = await loadImg(it.imageData); if (img) { const boxH = cellH * 0.45; const boxW = cellW * 0.85; const sc = Math.min(boxW / img.width, boxH / img.height); const dw = img.width * sc; const dh = img.height * sc; ctx.drawImage(img, x + (cellW - dw)/2, y + cellH*0.08 + (boxH - dh)/2, dw, dh); } else { ctx.font = `${Math.round(Math.min(cellW, cellH)*0.28)}px Arial`; ctx.textAlign = 'center'; ctx.fillText(getSectorIcon(it.categoria), x + cellW/2, y + cellH*0.36); } // Nome ctx.fillStyle = '#0f172a'; ctx.textAlign = 'center'; const nameFs = Math.max(16, Math.round(cellW * 0.075)); ctx.font = `800 ${nameFs}px Arial, sans-serif`; ctx.fillText((it.nome || '').slice(0, 32), x + cellW/2, y + cellH*0.64, cellW * 0.9); // Caixa de preco const pBoxH = cellH * 0.26; const pBoxY = y + cellH - pBoxH - cellH*0.04; ctx.fillStyle = theme.priceBg; ctx.beginPath(); ctx.roundRect(x + cellW*0.06, pBoxY, cellW*0.88, pBoxH, 12); ctx.fill(); ctx.fillStyle = theme.priceText; ctx.font = `900 ${Math.round(pBoxH*0.58)}px Arial, sans-serif`; ctx.fillText(`R$ ${it.preco}/${it.unidade}`, x + cellW/2, pBoxY + pBoxH*0.68, cellW * 0.82); ctx.textAlign = 'left'; } // Footer ctx.fillStyle = theme.footerBg; ctx.fillRect(0, H - footH, W, footH); ctx.fillStyle = theme.footerText; ctx.font = `700 ${Math.round(W*0.018)}px Arial, sans-serif`; ctx.fillText(`${footerText} | ${validity}`, Math.round(W*0.04), H - Math.round(footH*0.35)); const a = document.createElement('a'); a.download = `encarte-anunciosgg-p${state.page}.png`; a.href = canvas.toDataURL('image/png'); a.click(); } window.openVisualFlyerModal = function() { const m = document.getElementById('visualFlyerModal'); if (m) m.style.display = 'flex'; const logoRow = document.getElementById('vfLogoPreviewRow'); if (logoRow) logoRow.style.display = state.logoDataUrl ? 'flex' : 'none'; loadCatalog(false); renderPreview(); }; window.closeVisualFlyerModal = function() { const m = document.getElementById('visualFlyerModal'); if (m) m.style.display = 'none'; }; document.addEventListener('DOMContentLoaded', () => { const btnOpen = document.getElementById('btnOpenVisualFlyerModal'); if (btnOpen) btnOpen.addEventListener('click', window.openVisualFlyerModal); ['vfFormatSelect','vfGridSelect','vfThemeSelect','vfStoreName','vfCampaignTitle','vfValidity','vfFooterText'].forEach(id => { const el = document.getElementById(id); if (el) el.addEventListener('input', renderPreview); if (el) el.addEventListener('change', renderPreview); }); document.getElementById('vfSearchInput')?.addEventListener('input', renderCatalogResults); document.getElementById('vfSectorFilter')?.addEventListener('change', renderCatalogResults); document.getElementById('vfReloadCatalogBtn')?.addEventListener('click', () => loadCatalog(true)); document.getElementById('vfAddManualBtn')?.addEventListener('click', () => { const nm = (document.getElementById('vfManualName')?.value || '').trim().toUpperCase(); const pr = (document.getElementById('vfManualPrice')?.value || '0,00').trim() || '0,00'; if (!nm) return; state.items.push({ nome: nm, preco: pr, precoDe: '', unidade: 'UN', badge: 'OFERTA', categoria: 'Mercearia', highlight: false, imageData: '' }); document.getElementById('vfManualName').value = ''; renderSelectedItems(); renderPreview(); }); document.getElementById('vfClearItemsBtn')?.addEventListener('click', () => { state.items = []; state.page = 1; renderSelectedItems(); renderPreview(); }); document.getElementById('vfPrevPageBtn')?.addEventListener('click', () => { if (state.page > 1) { state.page--; renderPreview(); } }); document.getElementById('vfNextPageBtn')?.addEventListener('click', () => { const cfg = getLayoutConfig(); if (state.page < cfg.totalPages) { state.page++; renderPreview(); } }); document.getElementById('vfLogoInput')?.addEventListener('change', e => { const file = e.target.files?.[0]; if (!file) return; const r = new FileReader(); r.onload = ev => { state.logoDataUrl = ev.target.result; localStorage.setItem('vf_store_logo', state.logoDataUrl); document.getElementById('vfLogoPreviewRow').style.display = 'flex'; renderPreview(); }; r.readAsDataURL(file); }); document.getElementById('vfRemoveLogoBtn')?.addEventListener('click', () => { state.logoDataUrl = ''; localStorage.removeItem('vf_store_logo'); document.getElementById('vfLogoPreviewRow').style.display = 'none'; renderPreview(); }); // Suporte a Ctrl+V (Colar imagem direto da area de transferencia com remocao automatica de fundo branco) document.addEventListener('paste', async (e) => { const modal = document.getElementById('visualFlyerModal'); if (!modal || modal.style.display === 'none' || !modal.style.display) return; if (state.items.length === 0) return; const clipItems = e.clipboardData?.items || []; for (const ci of clipItems) { if (ci.type && ci.type.startsWith('image/')) { const blob = ci.getAsFile(); if (!blob) continue; const reader = new FileReader(); reader.onload = async (ev) => { const targetItem = state.items[state.items.length - 1]; try { targetItem.imageData = await removeWhiteBgCanvas(ev.target.result); } catch (_) { targetItem.imageData = ev.target.result; } renderSelectedItems(); renderPreview(); }; reader.readAsDataURL(blob); break; } } }); document.getElementById('vfBtnPrint')?.addEventListener('click', openPrintWindow); document.getElementById('vfBtnExportPng')?.addEventListener('click', exportCurrentPagePng); document.getElementById('vfBtnSendToRadio')?.addEventListener('click', () => { if (state.items.length === 0) { alert('Adicione pelo menos 1 item ao encarte.'); return; } window.closeVisualFlyerModal(); if (typeof window.openEncarteModal === 'function') window.openEncarteModal(); const ta = document.getElementById('encarteScriptText') || document.querySelector('#encarteModal textarea'); if (ta) { const lines = state.items.map(it => `${it.nome} por apenas R$ ${it.preco} ${it.unidade === 'KG' ? 'o quilo' : 'a unidade'}!`); ta.value = `Atenção clientes! Confira as ofertas imperdíveis! ` + lines.join(' '); ta.dispatchEvent(new Event('input')); } }); }); })();