Actualizar automatizaciones.html

This commit is contained in:
2026-02-13 21:48:39 +00:00
parent b0b30292b2
commit 2519e2671a

View File

@@ -9,219 +9,187 @@
<style> <style>
.fade-in { animation: fadeIn 0.3s ease-in-out; } .fade-in { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Forzamos el ancho del sidebar para que no colapse */ .no-scrollbar::-webkit-scrollbar { display: none; }
#layout-sidebar { width: 260px; height: 100vh; shrink: 0; } .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.service-card { transition: all 0.2s ease; border-left-width: 6px; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
</style> </style>
</head> </head>
<body class="bg-gray-50 text-gray-800 font-sans h-screen overflow-hidden flex"> <body class="bg-gray-50 text-gray-800 font-sans antialiased overflow-hidden">
<div id="layout-sidebar" class="h-full"></div> <div class="flex h-screen overflow-hidden">
<div id="sidebar-container" class="h-full shrink-0"></div>
<div class="flex-1 flex flex-col h-full relative min-w-0"> <div class="flex-1 flex flex-col overflow-hidden relative">
<div id="header-container"></div>
<div id="layout-header"></div> <main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-50 p-6 relative">
<main class="flex-1 overflow-hidden flex flex-col relative"> <div id="automationView" class="fade-in">
<div class="flex justify-between items-center mb-6">
<div class="bg-white border-b border-gray-200 p-6 shrink-0 shadow-sm z-10">
<div class="flex flex-col md:flex-row justify-between items-center gap-4">
<div> <div>
<h2 class="text-2xl font-extrabold text-gray-800 flex items-center gap-3"> <h2 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
<span class="bg-blue-600 p-2 rounded-lg text-white"> <i data-lucide="bot" class="text-blue-600"></i> Buzón de Automatizaciones
<i data-lucide="bot" class="w-6 h-6"></i>
</span>
Buzón de Automatizaciones
</h2> </h2>
<p class="text-sm text-gray-500 mt-1">Valida e importa los expedientes capturados por los robots.</p> <p class="text-sm text-gray-500 mt-1">Valida e importa servicios de Multiasistencia y HomeServe.</p>
</div> </div>
<button onclick="loadInbox()" class="bg-blue-600 hover:bg-blue-700 text-white px-5 py-2.5 rounded-xl shadow-lg flex items-center gap-2 font-medium transition-all transform hover:scale-105">
<button onclick="loadInbox()" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg shadow-blue-200 active:scale-95"> <i data-lucide="refresh-cw" class="w-5 h-5"></i> Actualizar Buzón
<i data-lucide="refresh-cw" class="w-4 h-4"></i> Actualizar Listado
</button> </button>
</div> </div>
</div>
<div class="flex-1 overflow-y-auto p-6 space-y-4 bg-slate-50/50" id="inboxContainer"> <div class="space-y-4" id="inboxContainer">
<div class="p-12 text-center text-gray-400 bg-white rounded-xl border border-gray-100 shadow-sm">
Cargando expedientes de los robots...
</div>
</div>
</div> </div>
</main> </main>
</div> </div>
</div>
<div id="importModal" class="fixed inset-0 bg-slate-900/60 hidden z-[999] flex items-center justify-center backdrop-blur-md p-4"> <div id="importModal" class="fixed inset-0 bg-black bg-opacity-50 hidden z-50 flex items-center justify-center backdrop-blur-sm p-4">
<div class="bg-white rounded-2xl shadow-2xl w-full max-w-2xl overflow-hidden animate-slide-in flex flex-col max-h-[95vh]"> <div class="bg-white rounded-xl shadow-2xl w-full max-w-2xl p-6 animate-slide-in flex flex-col max-h-[90vh] overflow-y-auto no-scrollbar">
<div class="bg-slate-800 text-white p-6 flex justify-between items-center"> <div class="flex justify-between items-center mb-6 border-b pb-4">
<div> <h3 class="text-xl font-bold text-gray-800 flex items-center gap-2">
<h3 class="text-xl font-bold flex items-center gap-2"> <i data-lucide="file-check" class="text-green-600"></i> Validar Datos para Importar
<i data-lucide="file-edit" class="text-blue-400"></i> Revisar Expediente
</h3> </h3>
<p class="text-slate-400 text-xs mt-1">Verifica la información antes de enviarla al CRM.</p> <button onclick="closeModal()" class="text-gray-400 hover:text-gray-600"><i data-lucide="x" class="w-6 h-6"></i></button>
</div>
<button onclick="closeModal()" class="text-slate-400 hover:text-white transition-colors">
<i data-lucide="x" class="w-6 h-6"></i>
</button>
</div> </div>
<form id="importForm" onsubmit="handleFinalImport(event)" class="p-8 space-y-6 overflow-y-auto"> <form id="importForm" onsubmit="handleImportSubmit(event)" class="space-y-6">
<input type="hidden" id="impScrapedId"> <input type="hidden" id="scrapedId">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div class="bg-gray-50 p-4 rounded-lg border border-gray-200 grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Nombre del Cliente</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Nombre del Cliente</label>
<input type="text" id="impName" required class="w-full border-2 border-slate-100 bg-slate-50 p-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all"> <input type="text" id="imp_name" required class="w-full border p-2.5 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none font-medium">
</div> </div>
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Teléfono Principal</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Teléfono</label>
<input type="text" id="impPhone" required class="w-full border-2 border-slate-100 bg-slate-50 p-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all"> <input type="text" id="imp_phone" required class="w-full border p-2.5 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none font-medium">
</div> </div>
</div> </div>
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Dirección de Trabajo</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Dirección de la Reparación</label>
<div class="relative"> <div class="relative">
<i data-lucide="map-pin" class="w-4 h-4 absolute left-4 top-3.5 text-slate-400"></i> <i data-lucide="map-pin" class="absolute left-3 top-3 w-4 h-4 text-gray-400"></i>
<input type="text" id="impAddress" required class="w-full border-2 border-slate-100 bg-slate-50 pl-11 pr-4 py-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all"> <input type="text" id="imp_address" required class="w-full pl-10 pr-3 py-2.5 border rounded-lg focus:ring-2 focus:ring-blue-500 outline-none text-sm">
</div> </div>
</div> </div>
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Descripción de Daños / Trabajos</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Descripción de Daños (Detectado)</label>
<textarea id="impDesc" rows="5" class="w-full border-2 border-slate-100 bg-slate-50 p-4 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all" placeholder="Escribe aquí los detalles..."></textarea> <textarea id="imp_desc" rows="5" class="w-full border p-3 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none bg-yellow-50/30 border-yellow-100" placeholder="Escribe aquí los detalles..."></textarea>
</div> </div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6"> <div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Ref. Robot</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Referencia</label>
<input type="text" id="impRef" class="w-full border-2 border-slate-100 bg-slate-100 p-3 rounded-xl text-sm font-bold text-slate-600" readonly> <input type="text" id="imp_ref" class="w-full border p-2.5 rounded-lg text-sm bg-gray-100 font-mono text-gray-500" readonly>
</div> </div>
<div class="space-y-1"> <div>
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Proveedor</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Compañía</label>
<input type="text" id="impCompany" class="w-full border-2 border-slate-100 bg-slate-100 p-3 rounded-xl text-sm font-bold text-slate-600" readonly> <input type="text" id="imp_company" class="w-full border p-2.5 rounded-lg text-sm bg-gray-100 text-gray-500" readonly>
</div> </div>
<div class="space-y-1"> <div class="col-span-2 md:col-span-1">
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Urgencia</label> <label class="block text-xs font-bold text-gray-500 uppercase mb-1 tracking-wider">Prioridad</label>
<select id="impUrgent" class="w-full border-2 border-slate-100 bg-white p-3 rounded-xl text-sm font-bold outline-none focus:border-blue-500 transition-all"> <select id="imp_urgent" class="w-full border p-2.5 rounded-lg text-sm bg-white outline-none">
<option value="false">Servicio Normal</option> <option value="false">Normal</option>
<option value="true">⚠️ URGENTE</option> <option value="true">🚨 URGENTE</option>
</select> </select>
</div> </div>
</div> </div>
<div class="pt-4"> <div class="pt-4">
<button type="submit" class="w-full bg-emerald-600 text-white py-4 rounded-2xl font-black text-sm hover:bg-emerald-700 shadow-xl shadow-emerald-100 flex items-center justify-center gap-3 transition-all active:scale-95"> <button type="submit" id="btnImport" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 rounded-xl shadow-lg shadow-blue-500/30 text-lg transition-all flex justify-center items-center gap-3 active:scale-95">
<i data-lucide="cloud-upload" class="w-5 h-5"></i> IMPORTAR AL CRM AHORA <i data-lucide="download-cloud" class="w-6 h-6"></i> IMPORTAR AL CRM
</button> </button>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div id="toast" class="fixed bottom-8 right-8 bg-slate-900 text-white px-8 py-4 rounded-2xl shadow-2xl hidden z-[1000] border border-slate-700 animate-bounce-in"> <div id="toast" class="fixed bottom-5 right-5 bg-slate-800 text-white px-6 py-3 rounded-lg shadow-2xl hidden z-[60]"><span id="toastMsg"></span></div>
<span id="toastMsg" class="font-bold text-sm"></span>
</div>
<script src="js/layout.js"></script> <script src="js/layout.js"></script>
<script> <script>
let globalMappings = []; let mappings = [];
let allScraped = []; let scrapedData = [];
document.addEventListener('DOMContentLoaded', async () => { document.addEventListener("DOMContentLoaded", () => {
if (!localStorage.getItem("token")) window.location.href = "index.html"; if (!localStorage.getItem("token")) window.location.href = "index.html";
// Damos un pequeño tiempo para que layout.js termine de pintar
setTimeout(() => {
loadInbox(); loadInbox();
lucide.createIcons();
}, 100);
}); });
async function loadInbox() { async function loadInbox() {
const container = document.getElementById('inboxContainer'); const container = document.getElementById('inboxContainer');
container.innerHTML = '<div class="flex flex-col items-center justify-center py-20 text-blue-600"><div class="animate-spin rounded-full h-10 w-10 border-b-2 border-current mb-4"></div><p class="font-bold text-slate-400">Leyendo a los robots...</p></div>';
try { try {
const [svcRes, mapRes] = await Promise.all([ const [resSvc, resMap] = await Promise.all([
fetch(`${API_URL}/providers/scraped`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }), fetch(`${API_URL}/providers/scraped`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }),
fetch(`${API_URL}/discovery/mappings`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }) fetch(`${API_URL}/discovery/mappings`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } })
]); ]);
const svcData = await svcRes.json(); const dataSvc = await resSvc.json();
globalMappings = await mapRes.json(); mappings = await resMap.json();
allScraped = svcData.services || []; scrapedData = dataSvc.services || [];
if (allScraped.length === 0) { if(scrapedData.length === 0) {
container.innerHTML = `<div class="bg-white p-12 rounded-3xl border-2 border-dashed border-slate-200 text-center flex flex-col items-center"> container.innerHTML = '<div class="p-12 text-center text-gray-400 bg-white rounded-xl border border-dashed border-gray-200">No hay servicios pendientes en los robots.</div>';
<div class="bg-green-50 text-green-500 p-4 rounded-full mb-4"><i data-lucide="check-circle-2" class="w-10 h-10"></i></div>
<h3 class="text-xl font-black text-slate-800">¡Buzón Limpio!</h3>
<p class="text-slate-400 mt-2">No hay nuevos expedientes para procesar.</p>
</div>`;
lucide.createIcons();
return; return;
} }
container.innerHTML = ''; container.innerHTML = "";
allScraped.forEach(svc => { scrapedData.forEach(svc => {
const raw = svc.raw_data || {}; const raw = svc.raw_data || {};
const myMap = globalMappings.filter(m => m.provider === svc.provider); const myMap = mappings.filter(m => m.provider === svc.provider);
const name = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || "Nombre no identificado"; // Mapeo dinámico para el resumen de la tarjeta
const name = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || "Desconocido";
const addr = raw[myMap.find(m => m.target_key === 'address')?.original_key] || "Sin dirección"; const addr = raw[myMap.find(m => m.target_key === 'address')?.original_key] || "Sin dirección";
const phone = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || "S/T"; const phone = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || "S/T";
const card = document.createElement('div'); const card = document.createElement('div');
card.className = "service-card bg-white p-5 rounded-2xl border border-slate-200 flex items-center gap-6 fade-in shadow-sm"; card.className = "bg-white p-5 rounded-xl border border-gray-100 shadow-sm flex items-center justify-between hover:border-blue-200 transition-all fade-in";
card.style.borderLeftColor = svc.provider === 'homeserve' ? '#ef4444' : '#3b82f6';
card.innerHTML = ` card.innerHTML = `
<div class="w-20 h-20 rounded-2xl flex flex-col items-center justify-center shrink-0 ${svc.provider === 'homeserve' ? 'bg-red-50 text-red-600' : 'bg-blue-50 text-blue-600'}"> <div class="flex items-center gap-6 min-w-0">
<span class="text-[9px] font-black uppercase tracking-widest mb-1">${svc.provider}</span> <div class="w-16 h-16 rounded-xl flex flex-col items-center justify-center shrink-0 ${svc.provider === 'homeserve' ? 'bg-red-50 text-red-600' : 'bg-blue-50 text-blue-600'}">
<i data-lucide="${svc.provider === 'homeserve' ? 'home' : 'briefcase'}" class="w-7 h-7"></i> <span class="text-[10px] font-black uppercase tracking-tighter">${svc.provider}</span>
<span class="text-[10px] font-black mt-1">#${svc.service_ref.slice(-4)}</span> <i data-lucide="file-text" class="w-5 h-5 mt-1"></i>
</div> </div>
<div class="flex-1 min-w-0"> <div class="min-w-0">
<div class="flex items-center gap-2"> <h3 class="font-bold text-gray-900 truncate text-lg">${name}</h3>
<h4 class="font-black text-slate-800 text-lg truncate">${name}</h4> <p class="text-xs text-gray-500 flex items-center gap-1.5 mt-0.5 truncate"><i data-lucide="map-pin" class="w-3.5 h-3.5"></i> ${addr}</p>
${svc.raw_data.Urgente === 'Sí' ? '<span class="bg-red-100 text-red-600 text-[9px] font-black px-2 py-0.5 rounded-full">URGENTE</span>' : ''} <div class="mt-2 flex gap-2">
</div> <span class="text-[10px] bg-gray-100 text-gray-600 px-2 py-0.5 rounded font-bold border border-gray-200">REF: ${svc.service_ref}</span>
<p class="text-sm text-slate-500 flex items-center gap-1.5 mt-1 truncate"> <span class="text-[10px] bg-blue-50 text-blue-600 px-2 py-0.5 rounded font-bold border border-blue-100"><i data-lucide="phone" class="w-2.5 h-2.5 inline mr-1"></i>${phone}</span>
<i data-lucide="map-pin" class="w-3.5 h-3.5 text-slate-400"></i> ${addr}
</p>
<div class="flex gap-3 mt-3">
<span class="flex items-center gap-1.5 text-xs font-bold text-slate-600 bg-slate-100 px-3 py-1 rounded-lg">
<i data-lucide="phone" class="w-3 h-3 text-slate-400"></i> ${phone}
</span>
<span class="text-xs font-bold text-slate-400 flex items-center gap-1.5">
<i data-lucide="clock" class="w-3 h-3"></i> Detectado: ${new Date(svc.created_at).toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}
</span>
</div> </div>
</div> </div>
<button onclick="openEditor(${svc.id})" class="bg-emerald-500 hover:bg-emerald-600 text-white p-4 rounded-2xl shadow-lg shadow-emerald-100 transition-all active:scale-90"> </div>
<i data-lucide="arrow-right-circle" class="w-7 h-7"></i> <button onclick="openEditor(${svc.id})" class="bg-white border-2 border-blue-600 text-blue-600 hover:bg-blue-600 hover:text-white p-3 rounded-xl transition-all shadow-md active:scale-95 group">
<i data-lucide="arrow-right" class="w-6 h-6"></i>
</button> </button>
`; `;
container.appendChild(card); container.appendChild(card);
}); });
lucide.createIcons(); lucide.createIcons();
} catch (e) { } catch (e) { showToast("Error de conexión", true); }
showToast("Error al conectar con la API", true);
}
} }
function openEditor(scrapedId) { function openEditor(scrapedId) {
const svc = allScraped.find(s => s.id === scrapedId); const svc = scrapedData.find(s => s.id === scrapedId);
if(!svc) return; if(!svc) return;
const raw = svc.raw_data; const raw = svc.raw_data;
const myMap = globalMappings.filter(m => m.provider === svc.provider); const myMap = mappings.filter(m => m.provider === svc.provider);
document.getElementById('impScrapedId').value = scrapedId; document.getElementById('scrapedId').value = scrapedId;
document.getElementById('impName').value = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || ""; document.getElementById('imp_name').value = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || "";
document.getElementById('impPhone').value = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || ""; document.getElementById('imp_phone').value = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || "";
document.getElementById('impAddress').value = raw[myMap.find(m => m.target_key === 'address')?.original_key] || ""; document.getElementById('imp_address').value = raw[myMap.find(m => m.target_key === 'address')?.original_key] || "";
document.getElementById('impRef').value = svc.service_ref; document.getElementById('imp_ref').value = svc.service_ref;
document.getElementById('impCompany').value = raw[myMap.find(m => m.target_key === 'compania')?.original_key] || svc.provider.toUpperCase(); document.getElementById('imp_company').value = raw[myMap.find(m => m.target_key === 'compania')?.original_key] || svc.provider.toUpperCase();
document.getElementById('impDesc').value = raw[myMap.find(m => m.target_key === 'descripcion')?.original_key] || raw['Descripción'] || ""; document.getElementById('imp_desc').value = raw[myMap.find(m => m.target_key === 'descripcion')?.original_key] || raw['Descripción'] || "";
document.getElementById('impUrgent').value = (raw['Urgente'] === 'Sí' || raw['Urgente'] === 'true').toString(); document.getElementById('imp_urgent').value = (raw['Urgente'] === 'Sí').toString();
document.getElementById('importModal').classList.remove('hidden'); document.getElementById('importModal').classList.remove('hidden');
lucide.createIcons(); lucide.createIcons();
@@ -229,16 +197,19 @@
function closeModal() { document.getElementById('importModal').classList.add('hidden'); } function closeModal() { document.getElementById('importModal').classList.add('hidden'); }
async function handleFinalImport(e) { async function handleImportSubmit(e) {
e.preventDefault(); e.preventDefault();
const id = document.getElementById('impScrapedId').value; const btn = document.getElementById('btnImport');
btn.disabled = true; btn.innerText = "IMPORTANDO...";
const id = document.getElementById('scrapedId').value;
const payload = { const payload = {
name: document.getElementById('impName').value, name: document.getElementById('imp_name').value,
phone: document.getElementById('impPhone').value, phone: document.getElementById('imp_phone').value,
address: document.getElementById('impAddress').value, address: document.getElementById('imp_address').value,
description: document.getElementById('impDesc').value, description: document.getElementById('imp_desc').value,
company_ref: document.getElementById('impRef').value, company_ref: document.getElementById('imp_ref').value,
is_urgent: document.getElementById('impUrgent').value === 'true' is_urgent: document.getElementById('imp_urgent').value === 'true'
}; };
try { try {
@@ -247,22 +218,20 @@
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('token')}` }, headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('token')}` },
body: JSON.stringify(payload) body: JSON.stringify(payload)
}); });
if((await res.json()).ok) {
if (res.ok) { showToast("✅ Importado con éxito");
showToast("🚀 ¡Expediente enviado al CRM!");
closeModal(); closeModal();
loadInbox(); loadInbox();
} else { } else { showToast("Error al importar", true); }
showToast("Error al guardar", true); } catch (e) { showToast("Error conexión", true); }
} finally { btn.disabled = false; btn.innerText = "IMPORTAR AL CRM"; }
} catch (e) { showToast("Error de conexión", true); }
} }
function showToast(msg, isError = false) { function showToast(msg, isError = false) {
const t = document.getElementById('toast'), m = document.getElementById('toastMsg'); const t = document.getElementById('toast'), m = document.getElementById('toastMsg');
t.className = `fixed bottom-8 right-8 px-8 py-4 rounded-2xl shadow-2xl z-[1000] flex items-center gap-3 transition-all ${isError ? 'bg-red-600' : 'bg-slate-900'} text-white border border-white/10`; t.className = `fixed bottom-5 right-5 px-6 py-3 rounded-lg shadow-2xl z-[60] flex items-center gap-3 ${isError ? 'bg-red-600' : 'bg-slate-800'} text-white font-medium`;
m.innerText = msg; t.classList.remove('hidden'); m.innerText = msg; t.classList.remove('hidden');
setTimeout(() => t.classList.add('hidden'), 4000); setTimeout(() => t.classList.add('hidden'), 3000);
} }
</script> </script>
</body> </body>