Files
SHiNE-server/shine-UI/emoji-catalog-diagnostic.mjs
PixelandClaude Opus 4.8 266a74ef79 WIP: эмодзи-пикер (Telegram-набор) — чекпоинт незавершённой работы
- Эмодзи-пикер: js/components/emoji-picker.js + каталог telegram-emoji-*.js
  (smileys/people/animals_nature/food_drink/travel_places/activity/objects/
  symbols/flags) + 631 ассет в assets/emoji (7.2 МБ).
- Интеграция пикера: chat-view.js, app.js, index.html, styles/components.css.
- Дев-скрипты генерации превью + THIRD_PARTY_NOTICES.
- Работа НЕ завершена (WIP), сохранено как чекпоинт. С origin (+56) пока НЕ
  мержится — большой мерж будет после завершения, отдельным шагом.
- VERSION: client 1.2.263.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 21:28:45 +03:00

32 lines
1.2 KiB
JavaScript

import { TELEGRAM_EMOJI_GROUPS } from './js/components/telegram-emoji-catalog.js?diagnostic=202607151545';
const items = TELEGRAM_EMOJI_GROUPS.flatMap((group) =>
group.items.map((item) => ({ ...item, category: group.id })),
);
function duplicateValues(key) {
return Object.entries(
items.reduce((groups, item) => {
const value = item[key];
(groups[value] ||= []).push(item.file);
return groups;
}, {}),
)
.filter(([, files]) => files.length > 1)
.map(([value, files]) => ({ value, files }));
}
const missing = items
.filter((item) => !item.emoji || !item.file || !item.name || !item.category || !item.previewUrl || !item.animatedUrl)
.map((item) => ({ file: item.file, missing: ['emoji', 'file', 'name', 'category', 'previewUrl', 'animatedUrl'].filter((field) => !item[field]) }));
console.log(JSON.stringify({
categories: TELEGRAM_EMOJI_GROUPS.map((group) => ({ id: group.id, label: group.label, count: group.items.length })),
total: items.length,
uniqueUnicode: new Set(items.map((item) => item.emoji)).size,
uniqueUrl: new Set(items.map((item) => item.file)).size,
duplicateUnicode: duplicateValues('emoji'),
duplicateUrl: duplicateValues('file'),
missing,
}, null, 2));