% layout("/en/panel/stations/history/layout", { title: it.meteostanica.name }) %>
<%~ include("/en/panel/partials/navbar") %>
<% const backIcon = `
` %>
<%~ include("/en/panel/stations/partials/details", { meteostanica: it.meteostanica }) %>
no data :( send some using your websocket key above.
<% } %>
<% function serializeToCode(obj) { %>
<% // Handle null/primitive types %>
<% if (obj === null) return 'null'; %>
<% if (typeof obj === 'string') return `'${obj.replace(/'/g, "\\'")}'`; %>
<% if (typeof obj !== 'object') return obj.toString(); %>
<% // Handle Arrays %>
<% if (Array.isArray(obj)) { %>
<% return `[${obj.map(item => serializeToCode(item)).join(',')}]`; %>
<% } %>
<% // Handle Objects %>
<% const entries = Object.entries(obj).map(([key, value]) => { %>
<% // Ensure keys are safe (quoted if they contain special characters) %>
<% const safeKey = /^[a-z$_][a-z0-9$_]*$/i.test(key) ? key : `'${key}'`; %>
<% return `${safeKey}: ${serializeToCode(value)}`; %>
<% }); %>
<% return `{${entries.join(',')}}`; %>
<% } %>