(value)
| 866 | } |
| 867 | |
| 868 | function formatSourceLabel(value) { |
| 869 | const text = String(value || "").trim(); |
| 870 | if (!text) return ""; |
| 871 | const normalized = text.toLowerCase(); |
| 872 | const labels = { |
| 873 | arxiv: "arXiv", |
| 874 | openreview: "OpenReview", |
| 875 | journal: "Journal", |
| 876 | local_pdf: "Local PDF", |
| 877 | }; |
| 878 | return labels[normalized] || text; |
| 879 | } |
| 880 | |
| 881 | function categoryBadgeClass(value) { |
| 882 | const normalized = String(value || "").trim().toLowerCase(); |