From a68fed7012fb8d6e6d20e0bd4c31fc8488203225 Mon Sep 17 00:00:00 2001 From: gsd Date: Wed, 3 Jun 2026 20:29:15 +0300 Subject: [PATCH] init --- .gitignore | 4 + .idea/.gitignore | 8 + .idea/jsLibraryMappings.xml | 6 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + ChartJsSSR.iml | 8 + Dockerfile | 8 + chartGenerator.js | 143 ++ chartWebServer.js | 38 + docker-compose.yaml | 12 + package.json | 11 + trash/start.js | 76 ++ trash/test1.js | 37 + trash/testData.js | 2448 +++++++++++++++++++++++++++++++++++ utils.js | 46 + 16 files changed, 2865 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/jsLibraryMappings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 ChartJsSSR.iml create mode 100644 Dockerfile create mode 100644 chartGenerator.js create mode 100644 chartWebServer.js create mode 100644 docker-compose.yaml create mode 100644 package.json create mode 100644 trash/start.js create mode 100644 trash/test1.js create mode 100644 trash/testData.js create mode 100644 utils.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73aeeeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/node_modules/ +chart.png +package-lock.json +image.svg \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..d23208f --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b8b663b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ChartJsSSR.iml b/ChartJsSSR.iml new file mode 100644 index 0000000..80cc739 --- /dev/null +++ b/ChartJsSSR.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..482e156 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:18.18-bullseye +WORKDIR /app +USER node + +COPY ./ /app +RUN npm install --reg https://nexus.pblr-nyk.pro/repository/npm/ +EXPOSE 3000 +CMD ["nodejs", "chartWebServer.js"] \ No newline at end of file diff --git a/chartGenerator.js b/chartGenerator.js new file mode 100644 index 0000000..108650c --- /dev/null +++ b/chartGenerator.js @@ -0,0 +1,143 @@ +const { createCanvas, registerFont } = require('canvas'); +const Chart = require('chart.js/auto'); + +const {testData} = require("./trash/testData"); +const {formatSeconds} = require("./utils"); +const moment = require('moment'); +const fs = require("fs"); + +function prepareData(data) { + const result = []; + + const grabFirstValue = (container) => { + if (!container) return 0; + for (const mapName of Object.keys(container)) { + return container[mapName]; + } + return 0; + } + + const grabMapName = (container) => { + if (!container) return ""; + for (const mapName of Object.keys(container)) { + return mapName; + } + return ""; + } + //console.log(data) + for (const srvId of Object.keys(data.lastplay)) { + const obj = {} + obj["srv_id"] = srvId; + obj["server_name"] = data.servers[srvId].name; + obj["lastplay"] = grabFirstValue(data.lastplay[srvId]) + obj["lastplay_moment"] = moment.unix(obj["lastplay"]).format("DD-MM-YYYY HH:mm") + obj["gametime"] = grabFirstValue(data.gametime[srvId]) + obj["map_name"] = grabMapName(data.lastplay[srvId]) + result.push(obj); + } + return result; +} + +function generateChartData(d) { + const maxGametime = d.sort((a, b) => a.gametime - b.gametime).at(d.length - 1)["gametime"] + console.log(maxGametime) + + let gametimeDelimiter = 1; + for (const delimiter of [60, 3600, 3600 * 24]) { + if (maxGametime > delimiter) + gametimeDelimiter = delimiter; + } + console.log(gametimeDelimiter) + + const chartData = { + labels: [], + datasets: [] + } + const data = [] + d.sort((a, b) => b.gametime - a.gametime).forEach( + (val) => { + chartData.labels.push(`${val['server_name']}\n${val['lastplay_moment']}\nНаиграно: ${formatSeconds(val['gametime'])}`) + data.push(val['gametime'] / gametimeDelimiter) + } + ) + chartData.datasets.push({ + label: "Наиграно времени", + data: data, + }) + + const chartConfig = { + type: 'radar', + data: chartData, + options: { + responsive: false, + maintainAspectRatio: false, + + borderColor: '#bd3b3b', + //backgroundColor: '#FFFFFF', + + plugins: { + legend: { + position: 'top', + display: false + }, + title: { + display: false, + text: 'Chart.js Polar Area Chart With Centered Point Labels' + } + }, + scales: { + r: { + grid: { + color: '#ef9849' + }, + angleLines: { + color: '#f08149' + }, + pointLabels: { + display: true, + //centerPointLabels: true, + padding: 44, + font: { + size: 16 + }, + backdropColor: "#395c78", + backdropPadding: "1", + color: "#f5e7de" + }, + + } + } + }, + }; + return chartConfig; +} + +function createChartOnData(testData) { + +// Create a canvas and chart + const width = 800; + const height = 800; + + const canvas = createCanvas(width, height); + const ctx = canvas.getContext('2d'); + + const d = prepareData(testData); + const chartConfig = generateChartData(d); + + new Chart(ctx, chartConfig); + + return canvas.createPNGStream(); +} + +module.exports = {createChartOnData} + +function test() { + const stream = createChartOnData(testData); +// Save the chart image as a file + const fs = require('fs'); + const out = fs.createWriteStream('chart.png'); + stream.pipe(out); + out.on('finish', () => console.log('The chart image was saved.')); +} + + diff --git a/chartWebServer.js b/chartWebServer.js new file mode 100644 index 0000000..0171e18 --- /dev/null +++ b/chartWebServer.js @@ -0,0 +1,38 @@ +const express = require('express'); +const {createChartOnData} = require("./chartGenerator"); + +const app = express(); +const PORT = process.env.PORT || 3000; + +// Middleware для парсинга JSON тела запроса +app.use(express.json({ limit: '10mb' })); +//ai sloooop moment +app.post('/api/chart/:id.png', async (req, res) => { + const { id } = req.params; + const payload = req.body; + + // Проверяем, что тело запроса не пустое + if (!payload || (typeof payload === 'object' && Object.keys(payload).length === 0)) { + return res.status(400).send('Bad Request: request body is required'); + } + + try { + // Получаем PNG поток из пользовательской функции + const pngStream = createChartOnData(payload, id); + + // Устанавливаем заголовок ответа + res.setHeader('Content-Type', 'image/png'); + + // Отправляем поток в ответ + pngStream.pipe(res); + } catch (err) { + console.error('Error generating PNG:', err); + res.status(500).send('Internal Server Error: could not generate image'); + } +}); + +// Запуск сервера +app.listen(PORT, () => { + console.log(`Server is running on http://localhost:${PORT}`); + console.log(`Endpoint: POST /api/chart/:id.png`); +}); \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..4520cff --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,12 @@ +services: + chartjs_ssr: + build: ./ + container_name: chartjs_ssr + restart: always + ports: + - 3000:3000 + deploy: + resources: + limits: + cpus: 1.0 + memory: 512M \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0ca6d13 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "ChartJsSSR", + "version": "1.0.0", + "dependencies": { + "chart.js": "^4.4.8", + "chartjs-node-canvas": "^5.0.0", + "express": "^5.2.1", + "moment": "^2.30.1", + "sharp": "^0.34.5" + } +} diff --git a/trash/start.js b/trash/start.js new file mode 100644 index 0000000..ce5ed89 --- /dev/null +++ b/trash/start.js @@ -0,0 +1,76 @@ +let { Buffer } = require("buffer"); +const {ChartJSNodeCanvas} = require("chartjs-node-canvas"); + +const dependencies = { + chartJS: require("chartjs-node-canvas") +}; + +const constants = { + TYPES: ['PNG', 'SVG'], + smalll: { + height: 400, + width: 400 + }, + medium: { + height: 500, + width: 500 + } +}; + +(async () => { + console.log("Creating Chart Object"); + const { CanvasRenderService } = dependencies.chartJS; + const { height, width } = constants.medium; + const renderService = new ChartJSNodeCanvas({ type: 'svg', width: 800, height: 600 }); + /*let renderService = new CanvasRenderService(width, height, (ChartJS) => { + ChartJS.defaults.global.animation = false; + ChartJS.defaults.global.responsive = false; + }, 'SVG'); //Tried SVG and svg*/ + try { + let buffer = await renderService.renderToBufferSync({ + type: 'bar', + data: { + labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'], + datasets: [{ + label: '# of Votes', + data: [12, 19, 3, 5, 2, 3], + backgroundColor: [ + 'rgba(255, 99, 132, 0.2)', + 'rgba(54, 162, 235, 0.2)', + 'rgba(255, 206, 86, 0.2)', + 'rgba(75, 192, 192, 0.2)', + 'rgba(153, 102, 255, 0.2)', + 'rgba(255, 159, 64, 0.2)' + ], + borderColor: [ + 'rgba(255, 99, 132, 1)', + 'rgba(54, 162, 235, 1)', + 'rgba(255, 206, 86, 1)', + 'rgba(75, 192, 192, 1)', + 'rgba(153, 102, 255, 1)', + 'rgba(255, 159, 64, 1)' + ], + borderWidth: 1 + }] + }, + options: { + /*scales: { + yAxes: [{ + ticks: { + beginAtZero: true + } + }] + }*/ + } + }, 'image/svg+xml'); + //When I run this I dont get anthing below this to print out + console.log("Finished"); + console.log(); + const fs = require('node:fs'); + fs.writeFileSync('image.svg', buffer, 'utf8'); + //let base64Str = Buffer.from(buffer).toString("base64"); + //console.log(base64Str); + } catch (e) { + console.log(e); + } +})(); \ No newline at end of file diff --git a/trash/test1.js b/trash/test1.js new file mode 100644 index 0000000..07bb8c5 --- /dev/null +++ b/trash/test1.js @@ -0,0 +1,37 @@ +const { createCanvas, registerFont } = require('canvas'); +const Chart = require('chart.js/auto'); + +// Create a canvas and chart +const width = 800; +const height = 400; + +const canvas = createCanvas(width, height); +const ctx = canvas.getContext('2d'); + +const chartConfig = { + type: 'bar', + data: { + labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'], + datasets: [ + { + label: 'My First Dataset', + data: [12, 19, 3, 5, 2, 3], + backgroundColor: ['red', 'blue', 'yellow', 'green', 'purple', 'orange'], + }, + ], + }, + options: { + responsive: false, + maintainAspectRatio: false, + }, +}; + +new Chart(ctx, chartConfig); + +// Save the chart image as a file +const fs = require('fs'); +const out = fs.createWriteStream('chart.png'); +const stream = canvas.createPNGStream(); + +stream.pipe(out); +out.on('finish', () => console.log('The chart image was saved.')); \ No newline at end of file diff --git a/trash/testData.js b/trash/testData.js new file mode 100644 index 0000000..61e2176 --- /dev/null +++ b/trash/testData.js @@ -0,0 +1,2448 @@ +const testData = { + utc: 3 * 3600, + servers: { + "srv5": { + "server_id": "srv5", + "name": "Завод ULTIMATE", + "description": "Эйййй заходи, поднимай россию быдло", + "address": "tf2.pblr-nyk.pro:27005", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1646594327298079340/6B510A6CF3CAF5BFC213A2CBB0F709CEE89EA46A/?imw=512&imh=512", + "player_count": 27, + "max_players": 32, + "status": true, + "map": "workshop/zavod_redux_v2.ugc3736124323", + "color": "#CFB53B", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2328576235", + "naming": [ + "РАБОЧИЙ", + "РАБОЧИХ", + "РАБОЧИХ" + ], + "uniq": { + "total": 79988, + "month": 503, + "year": 9609, + "day": 245 + }, + "players": [ + { + "name": "yakIGX", + "score": 2, + "id": 452, + "duration": "00:19:49", + "loss": 0, + "ping": 159, + "state": "active", + "steam2": "[U:1:1174283169]", + "clz": 6, + "team": 2, + "deads": 13, + "duration_seconds": 1189, + "pos": [ + 1704.626, + 1929.559, + -255.96875 + ], + "steam": { + "steam3": "[U:1:1174283169]", + "steam2": "STEAM_0:1:587141584", + "steam64": "76561199134548897", + "community_url": "https://steamcommunity.com/profiles/76561199134548897", + "account_id": 1174283169 + } + }, + { + "name": "po_rox)", + "score": 49, + "id": 423, + "duration": "00:42:28", + "loss": 0, + "ping": 49, + "state": "active", + "steam2": "[U:1:1870441232]", + "clz": 3, + "team": 2, + "deads": 31, + "duration_seconds": 2548, + "pos": [ + 2876.171, + 1779.9242, + -271.90375 + ], + "steam": { + "steam3": "[U:1:1870441232]", + "steam2": "STEAM_0:0:935220616", + "steam64": "76561199830706960", + "community_url": "https://steamcommunity.com/profiles/76561199830706960", + "account_id": 1870441232 + } + }, + { + "name": "EnØt_", + "score": 0, + "id": 463, + "duration": "00:15:15", + "loss": 0, + "ping": 64, + "state": "active", + "steam2": "[U:1:1111254340]", + "clz": 7, + "team": 2, + "deads": 0, + "duration_seconds": 915, + "pos": [ + -3648.693, + -60.290283, + -495.96875 + ], + "steam": { + "steam3": "[U:1:1111254340]", + "steam2": "STEAM_0:0:555627170", + "steam64": "76561199071520068", + "community_url": "https://steamcommunity.com/profiles/76561199071520068", + "account_id": 1111254340 + } + }, + { + "name": "gromila", + "score": 34, + "id": 410, + "duration": "00:53:36", + "loss": 0, + "ping": 93, + "state": "active", + "steam2": "[U:1:1268781783]", + "clz": 6, + "team": 2, + "deads": 36, + "duration_seconds": 3216, + "pos": [ + 1688.1824, + 2183.9688, + -295.8776 + ], + "steam": { + "steam3": "[U:1:1268781783]", + "steam2": "STEAM_0:1:634390891", + "steam64": "76561199229047511", + "community_url": "https://steamcommunity.com/profiles/76561199229047511", + "account_id": 1268781783 + } + }, + { + "name": "Паша жнiц", + "score": 25, + "id": 411, + "duration": "00:53:21", + "loss": 0, + "ping": 62, + "state": "active", + "steam2": "[U:1:1850489858]", + "clz": 7, + "team": 3, + "deads": 4, + "duration_seconds": 3201, + "pos": [ + -3698.9014, + -605.51306, + 263.43213 + ], + "steam": { + "steam3": "[U:1:1850489858]", + "steam2": "STEAM_0:0:925244929", + "steam64": "76561199810755586", + "community_url": "https://steamcommunity.com/profiles/76561199810755586", + "account_id": 1850489858 + } + }, + { + "name": "perdyn3448", + "score": 12, + "id": 414, + "duration": "00:51:03", + "loss": 0, + "ping": 93, + "state": "active", + "steam2": "[U:1:805010966]", + "clz": 4, + "team": 3, + "deads": 51, + "duration_seconds": 3063, + "pos": [ + 1337.6683, + 496.45233, + 0.03125 + ], + "steam": { + "steam3": "[U:1:805010966]", + "steam2": "STEAM_0:0:402505483", + "steam64": "76561198765276694", + "community_url": "https://steamcommunity.com/profiles/76561198765276694", + "account_id": 805010966 + } + }, + { + "name": "Zavek41", + "score": 2, + "id": 425, + "duration": "00:40:43", + "loss": 0, + "ping": 138, + "state": "active", + "steam2": "[U:1:1546497551]", + "clz": 7, + "team": 2, + "deads": 12, + "duration_seconds": 2443, + "pos": [ + 2128.3264, + 1560.4059, + -319.96875 + ], + "steam": { + "steam3": "[U:1:1546497551]", + "steam2": "STEAM_0:1:773248775", + "steam64": "76561199506763279", + "community_url": "https://steamcommunity.com/profiles/76561199506763279", + "account_id": 1546497551 + } + }, + { + "name": "Лимончик", + "score": 3, + "id": 337, + "duration": "01:20:01", + "loss": 0, + "ping": 122, + "state": "active", + "steam2": "[U:1:1189050140]", + "clz": 5, + "team": 3, + "deads": 18, + "duration_seconds": 4801, + "pos": [ + 2194.3716, + 1440.1282, + -319.96875 + ], + "steam": { + "steam3": "[U:1:1189050140]", + "steam2": "STEAM_0:0:594525070", + "steam64": "76561199149315868", + "community_url": "https://steamcommunity.com/profiles/76561199149315868", + "account_id": 1189050140 + } + }, + { + "name": "0", + "score": 2, + "id": 429, + "duration": "00:38:42", + "loss": 0, + "ping": 56, + "state": "active", + "steam2": "[U:1:777716673]", + "clz": 8, + "team": 2, + "deads": 12, + "duration_seconds": 2322, + "pos": [ + 2769.0706, + -750.3272, + -479.96875 + ], + "steam": { + "steam3": "[U:1:777716673]", + "steam2": "STEAM_0:1:388858336", + "steam64": "76561198737982401", + "community_url": "https://steamcommunity.com/profiles/76561198737982401", + "account_id": 777716673 + } + }, + { + "name": "xreyxxxde", + "score": 4, + "id": 441, + "duration": "00:30:31", + "loss": 0, + "ping": 104, + "state": "active", + "steam2": "[U:1:799637944]", + "clz": 5, + "team": 2, + "deads": 15, + "duration_seconds": 1831, + "pos": [ + 3136.0312, + 1712.2341, + -319.96875 + ], + "steam": { + "steam3": "[U:1:799637944]", + "steam2": "STEAM_0:0:399818972", + "steam64": "76561198759903672", + "community_url": "https://steamcommunity.com/profiles/76561198759903672", + "account_id": 799637944 + } + }, + { + "name": "UnexarT", + "score": 127, + "id": 341, + "duration": "01:15:34", + "loss": 0, + "ping": 74, + "state": "active", + "steam2": "[U:1:198071974]", + "clz": 4, + "team": 2, + "deads": 91, + "duration_seconds": 4534, + "pos": [ + 2067.695, + 1876.5905, + -255.96875 + ], + "steam": { + "steam3": "[U:1:198071974]", + "steam2": "STEAM_0:0:99035987", + "steam64": "76561198158337702", + "community_url": "https://steamcommunity.com/profiles/76561198158337702", + "account_id": 198071974 + } + }, + { + "name": "ChasMegaBoom", + "score": 9, + "id": 448, + "duration": "00:23:19", + "loss": 7, + "ping": 137, + "state": "active", + "steam2": "[U:1:423379758]", + "clz": 9, + "team": 3, + "deads": 4, + "duration_seconds": 1399, + "pos": [ + -425.64685, + -3115.276, + 0.03125 + ], + "steam": { + "steam3": "[U:1:423379758]", + "steam2": "STEAM_0:0:211689879", + "steam64": "76561198383645486", + "community_url": "https://steamcommunity.com/profiles/76561198383645486", + "account_id": 423379758 + } + }, + { + "name": "Малышка как дела", + "score": 0, + "id": 471, + "duration": "00:06:20", + "loss": 0, + "ping": 48, + "state": "active", + "steam2": "[U:1:264683108]", + "clz": 4, + "team": 3, + "deads": 1, + "duration_seconds": 380, + "pos": [ + -484.5092, + -2772.2917, + 0.03125 + ], + "steam": { + "steam3": "[U:1:264683108]", + "steam2": "STEAM_0:0:132341554", + "steam64": "76561198224948836", + "community_url": "https://steamcommunity.com/profiles/76561198224948836", + "account_id": 264683108 + } + }, + { + "name": "skrayxxze", + "score": 13, + "id": 443, + "duration": "00:29:28", + "loss": 0, + "ping": 73, + "state": "active", + "steam2": "[U:1:1592937026]", + "clz": 2, + "team": 3, + "deads": 11, + "duration_seconds": 1768, + "pos": [ + 2557.329, + 503.38885, + 0.03125 + ], + "steam": { + "steam3": "[U:1:1592937026]", + "steam2": "STEAM_0:0:796468513", + "steam64": "76561199553202754", + "community_url": "https://steamcommunity.com/profiles/76561199553202754", + "account_id": 1592937026 + } + }, + { + "name": "Тайлер Дёрден", + "score": 28, + "id": 413, + "duration": "00:52:26", + "loss": 0, + "ping": 103, + "state": "active", + "steam2": "[U:1:1791611696]", + "clz": 6, + "team": 3, + "deads": 37, + "duration_seconds": 3146, + "pos": [ + 1983.0009, + 1693.962, + -255.96875 + ], + "steam": { + "steam3": "[U:1:1791611696]", + "steam2": "STEAM_0:0:895805848", + "steam64": "76561199751877424", + "community_url": "https://steamcommunity.com/profiles/76561199751877424", + "account_id": 1791611696 + } + }, + { + "name": "z0vesy", + "score": 0, + "id": 470, + "duration": "00:12:42", + "loss": 0, + "ping": 118, + "state": "active", + "steam2": "[U:1:801983050]", + "clz": 6, + "team": 3, + "deads": 3, + "duration_seconds": 762, + "pos": [ + 2713.317, + 2228.836, + -273.81375 + ], + "steam": { + "steam3": "[U:1:801983050]", + "steam2": "STEAM_0:0:400991525", + "steam64": "76561198762248778", + "community_url": "https://steamcommunity.com/profiles/76561198762248778", + "account_id": 801983050 + } + }, + { + "name": "Курсы лоботомии", + "score": 9, + "id": 331, + "duration": "01:27:11", + "loss": 0, + "ping": 98, + "state": "active", + "steam2": "[U:1:773423010]", + "clz": 4, + "team": 3, + "deads": 31, + "duration_seconds": 5231, + "pos": [ + 1688.3192, + 1574.275, + -282.44873 + ], + "steam": { + "steam3": "[U:1:773423010]", + "steam2": "STEAM_0:0:386711505", + "steam64": "76561198733688738", + "community_url": "https://steamcommunity.com/profiles/76561198733688738", + "account_id": 773423010 + } + }, + { + "name": "Jeffrey", + "score": 1, + "id": 442, + "duration": "00:29:58", + "loss": 0, + "ping": 81, + "state": "active", + "steam2": "[U:1:786159865]", + "clz": 5, + "team": 2, + "deads": 2, + "duration_seconds": 1798, + "pos": [ + 2390.0586, + -476.04346, + -472.81787 + ], + "steam": { + "steam3": "[U:1:786159865]", + "steam2": "STEAM_0:1:393079932", + "steam64": "76561198746425593", + "community_url": "https://steamcommunity.com/profiles/76561198746425593", + "account_id": 786159865 + } + }, + { + "name": "Unknown", + "score": 10, + "id": 355, + "duration": "01:09:57", + "loss": 0, + "ping": 74, + "state": "active", + "steam2": "[U:1:1197753952]", + "clz": 6, + "team": 3, + "deads": 69, + "duration_seconds": 4197, + "pos": [ + -406.85794, + -2730.779, + 0.03125 + ], + "steam": { + "steam3": "[U:1:1197753952]", + "steam2": "STEAM_0:0:598876976", + "steam64": "76561199158019680", + "community_url": "https://steamcommunity.com/profiles/76561199158019680", + "account_id": 1197753952 + } + }, + { + "name": "Shadow", + "score": 1, + "id": 458, + "duration": "00:17:25", + "loss": 3, + "ping": 99, + "state": "active", + "steam2": "[U:1:1628087561]", + "clz": 8, + "team": 2, + "deads": 8, + "duration_seconds": 1045, + "pos": [ + 1411.4376, + 1808.7617, + -319.96875 + ], + "steam": { + "steam3": "[U:1:1628087561]", + "steam2": "STEAM_0:1:814043780", + "steam64": "76561199588353289", + "community_url": "https://steamcommunity.com/profiles/76561199588353289", + "account_id": 1628087561 + } + }, + { + "name": "Лайухлен", + "score": 2, + "id": 461, + "duration": "00:16:35", + "loss": 0, + "ping": 73, + "state": "active", + "steam2": "[U:1:1862389669]", + "clz": 3, + "team": 3, + "deads": 11, + "duration_seconds": 995, + "pos": [ + 1909.2256, + 1703.1259, + -255.96875 + ], + "steam": { + "steam3": "[U:1:1862389669]", + "steam2": "STEAM_0:1:931194834", + "steam64": "76561199822655397", + "community_url": "https://steamcommunity.com/profiles/76561199822655397", + "account_id": 1862389669 + } + }, + { + "name": "цыпцыпчик", + "score": 54, + "id": 347, + "duration": "01:12:59", + "loss": 0, + "ping": 110, + "state": "active", + "steam2": "[U:1:1892179575]", + "clz": 9, + "team": 2, + "deads": 99, + "duration_seconds": 4379, + "pos": [ + 2070.3975, + 1593.2139, + -191.96875 + ], + "steam": { + "steam3": "[U:1:1892179575]", + "steam2": "STEAM_0:1:946089787", + "steam64": "76561199852445303", + "community_url": "https://steamcommunity.com/profiles/76561199852445303", + "account_id": 1892179575 + } + }, + { + "name": "Yi Xi", + "score": 45, + "id": 356, + "duration": "01:09:22", + "loss": 0, + "ping": 71, + "state": "active", + "steam2": "[U:1:1510629857]", + "clz": 4, + "team": 3, + "deads": 44, + "duration_seconds": 4162, + "pos": [ + 2548.0774, + 1532.0903, + 12.856235 + ], + "steam": { + "steam3": "[U:1:1510629857]", + "steam2": "STEAM_0:1:755314928", + "steam64": "76561199470895585", + "community_url": "https://steamcommunity.com/profiles/76561199470895585", + "account_id": 1510629857 + } + }, + { + "name": "мне похуй я мопс", + "score": 0, + "id": 400, + "duration": "00:58:26", + "loss": 0, + "ping": 108, + "state": "active", + "steam2": "[U:1:300262693]", + "clz": 9, + "team": 2, + "deads": 10, + "duration_seconds": 3506, + "pos": [ + 1906.0361, + 1852.9102, + -255.96875 + ], + "steam": { + "steam3": "[U:1:300262693]", + "steam2": "STEAM_0:1:150131346", + "steam64": "76561198260528421", + "community_url": "https://steamcommunity.com/profiles/76561198260528421", + "account_id": 300262693 + } + }, + { + "name": "Jdunok", + "score": 136, + "id": 284, + "duration": "02:12:27", + "loss": 0, + "ping": 80, + "state": "active", + "steam2": "[U:1:809681483]", + "clz": 6, + "team": 2, + "deads": 165, + "duration_seconds": 7947, + "pos": [ + 2141.7458, + 1922.2688, + -303.84375 + ], + "steam": { + "steam3": "[U:1:809681483]", + "steam2": "STEAM_0:1:404840741", + "steam64": "76561198769947211", + "community_url": "https://steamcommunity.com/profiles/76561198769947211", + "account_id": 809681483 + } + }, + { + "name": "cnyuk", + "score": 1, + "id": 438, + "duration": "00:31:56", + "loss": 0, + "ping": 99, + "state": "active", + "steam2": "[U:1:1613291583]", + "clz": 1, + "team": 2, + "deads": 7, + "duration_seconds": 1916, + "pos": [ + 1631.9688, + 1970.3477, + -319.96875 + ], + "steam": { + "steam3": "[U:1:1613291583]", + "steam2": "STEAM_0:1:806645791", + "steam64": "76561199573557311", + "community_url": "https://steamcommunity.com/profiles/76561199573557311", + "account_id": 1613291583 + } + }, + { + "name": "Stulker69", + "score": 15, + "id": 373, + "duration": "01:05:18", + "loss": 0, + "ping": 99, + "state": "active", + "steam2": "[U:1:1883138797]", + "clz": 6, + "team": 3, + "deads": 72, + "duration_seconds": 3918, + "pos": [ + 2078.0876, + 1721.898, + -287.96875 + ], + "steam": { + "steam3": "[U:1:1883138797]", + "steam2": "STEAM_0:1:941569398", + "steam64": "76561199843404525", + "community_url": "https://steamcommunity.com/profiles/76561199843404525", + "account_id": 1883138797 + } + } + ], + "last_update": 1780401425, + "dockerStats": { + "cpu": { + "percent": 110.06 + }, + "mem": { + "percent": 39.07, + "usage": 1678102530, + "limit": 4294967300 + }, + "net": { + "input": 30824603600, + "output": 124899893000 + }, + "io": { + "input": 73728, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27005", + "city_pos": [ + 54.93688, + 73.27434 + ], + "workshopId": 3736124323 + }, + "srv6": { + "server_id": "srv6", + "name": "Завод корбал", + "description": "Некоторые работяги с завода бывают и архитекторами, но не пельмень", + "address": "tf2.pblr-nyk.pro:27006", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/784113153112258679/7EA2112BBA1200F8C6DBA965D6D647AA5DF3F9A5/?imw=512&imh=512", + "player_count": 7, + "max_players": 32, + "status": true, + "map": "workshop/world_of_korbal.ugc2734601245", + "color": "#03C03C", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=1868606313", + "naming": [ + "РАБОЧИЙ", + "РАБОЧИХ", + "РАБОЧИХ" + ], + "uniq": { + "total": 18466, + "month": 79, + "year": 3212, + "day": 15 + }, + "players": [ + { + "name": "Gabriel The Judge Of Hell", + "score": 23, + "id": 36, + "duration": "00:11:44", + "loss": 0, + "ping": 48, + "state": "active", + "steam2": "[U:1:1003417369]", + "clz": 5, + "team": 3, + "deads": 21, + "duration_seconds": 704, + "pos": [ + -2987.8757, + 2213.5137, + 40.03125 + ], + "steam": { + "steam3": "[U:1:1003417369]", + "steam2": "STEAM_0:1:501708684", + "steam64": "76561198963683097", + "community_url": "https://steamcommunity.com/profiles/76561198963683097", + "account_id": 1003417369 + } + }, + { + "name": "Tikhon [Belarus]", + "score": 0, + "id": 38, + "duration": "00:04:08", + "loss": 0, + "ping": 53, + "state": "active", + "steam2": "[U:1:1839168000]", + "clz": 7, + "team": 2, + "deads": 2, + "duration_seconds": 248, + "pos": [ + -2331.7188, + 2495.9688, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1839168000]", + "steam2": "STEAM_0:0:919584000", + "steam64": "76561199799433728", + "community_url": "https://steamcommunity.com/profiles/76561199799433728", + "account_id": 1839168000 + } + }, + { + "name": "Питух228", + "score": 16, + "id": 20, + "duration": "01:17:15", + "loss": 0, + "ping": 45, + "state": "active", + "steam2": "[U:1:818831906]", + "clz": 3, + "team": 3, + "deads": 125, + "duration_seconds": 4635, + "pos": [ + -3339.7188, + 2439.9487, + 40.03125 + ], + "steam": { + "steam3": "[U:1:818831906]", + "steam2": "STEAM_0:0:409415953", + "steam64": "76561198779097634", + "community_url": "https://steamcommunity.com/profiles/76561198779097634", + "account_id": 818831906 + } + }, + { + "name": "SUPER GAY", + "score": 220, + "id": 21, + "duration": "01:12:09", + "loss": 0, + "ping": 68, + "state": "active", + "steam2": "[U:1:1105944923]", + "clz": 6, + "team": 2, + "deads": 75, + "duration_seconds": 4329, + "pos": [ + -2962.8762, + -1808.442, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1105944923]", + "steam2": "STEAM_0:1:552972461", + "steam64": "76561199066210651", + "community_url": "https://steamcommunity.com/profiles/76561199066210651", + "account_id": 1105944923 + } + }, + { + "name": "Нико ВанШот", + "score": 29, + "id": 22, + "duration": "01:09:31", + "loss": 0, + "ping": 60, + "state": "active", + "steam2": "[U:1:786320782]", + "clz": 2, + "team": 3, + "deads": 109, + "duration_seconds": 4171, + "pos": [ + -2585.5754, + 1671.3732, + 32.03125 + ], + "steam": { + "steam3": "[U:1:786320782]", + "steam2": "STEAM_0:0:393160391", + "steam64": "76561198746586510", + "community_url": "https://steamcommunity.com/profiles/76561198746586510", + "account_id": 786320782 + } + }, + { + "name": "MGE/АНТОН КОРНЕПЛО", + "score": 36, + "id": 25, + "duration": "00:58:44", + "loss": 0, + "ping": 84, + "state": "active", + "steam2": "[U:1:790352164]", + "clz": 6, + "team": 3, + "deads": 104, + "duration_seconds": 3524, + "pos": [ + -3282.9688, + 2063.7942, + 40.03125 + ], + "steam": { + "steam3": "[U:1:790352164]", + "steam2": "STEAM_0:0:395176082", + "steam64": "76561198750617892", + "community_url": "https://steamcommunity.com/profiles/76561198750617892", + "account_id": 790352164 + } + }, + { + "name": "Cука го ларпить", + "score": 96, + "id": 31, + "duration": "00:45:53", + "loss": 0, + "ping": 102, + "state": "active", + "steam2": "[U:1:1855008353]", + "clz": 5, + "team": 2, + "deads": 75, + "duration_seconds": 2753, + "pos": [ + -2877.7002, + -1815.024, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1855008353]", + "steam2": "STEAM_0:1:927504176", + "steam64": "76561199815274081", + "community_url": "https://steamcommunity.com/profiles/76561199815274081", + "account_id": 1855008353 + } + } + ], + "last_update": 1780401421, + "dockerStats": { + "cpu": { + "percent": 45.55 + }, + "mem": { + "percent": 26.39, + "usage": 1133416450, + "limit": 4294967300 + }, + "net": { + "input": 3441546750, + "output": 25274968100 + }, + "io": { + "input": 237568, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27006", + "city_pos": [ + 60.7035, + 28.8061 + ], + "workshopId": 2734601245 + }, + "srv3": { + "server_id": "srv3", + "name": "Донбасс", + "description": "Спецоперация была придумана задолго до этого...", + "address": "tf2.pblr-nyk.pro:27003", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1615093337609334914/AA4C88284655092150B7C6455AE2C105F7B2FF8B/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/donbassborn_open.ugc2604412271", + "color": "#A6CAF0", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2604412271", + "naming": [ + "ЖИТЕЛЬ", + "ЖИТЕЛЯ", + "ЖИТЕЛЕЙ" + ], + "uniq": { + "total": 17741, + "month": 15, + "year": 598, + "day": 2 + }, + "players": [], + "last_update": 1780401423, + "dockerStats": { + "cpu": { + "percent": 5.52 + }, + "mem": { + "percent": 20.02, + "usage": 859881470, + "limit": 4294967300 + }, + "net": { + "input": 948460740, + "output": 702727170 + }, + "io": { + "input": 10807078900, + "output": 1123696640 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27003", + "city_pos": [ + 48.5593, + 39.3102 + ], + "workshopId": 2604412271 + }, + "srv4": { + "server_id": "srv4", + "name": "Дача путина", + "description": "Геленджик прекрасен летом...", + "address": "tf2.pblr-nyk.pro:27004", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1244631126936460472/D0AEC9DC6F555591D8789AF5A72AF97666B88371/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/dacha_putina.ugc1990930202", + "color": "#465945", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2137388620", + "naming": [ + "ПОСЕТИТЕЛЬ", + "ПОСЕТИТЕЛЯ", + "ПОСЕТИТЕЛЕЙ" + ], + "uniq": { + "total": 14531, + "month": 5, + "year": 779, + "day": 3 + }, + "players": [], + "last_update": 1780401421, + "dockerStats": { + "cpu": { + "percent": 6.18 + }, + "mem": { + "percent": 21.1, + "usage": 906207230, + "limit": 4294967300 + }, + "net": { + "input": 635826620, + "output": 210459280 + }, + "io": { + "input": 10295177200, + "output": 1095282690 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27004", + "city_pos": [ + 44.41919, + 38.20552 + ], + "workshopId": 1990930202 + }, + "srv1": { + "server_id": "srv1", + "name": "Пивоварня", + "description": "Ароматы хмельного пойла для быдла веет по району, заходи...", + "address": "tf2.pblr-nyk.pro:27001", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1687145459779168019/67B0388F7B770034078312F8C1EAD8EF6EA65AD4/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/brewery_ultimate_open.ugc2550711393", + "color": "#A5260A", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2550711393", + "naming": [ + "ТРУДЯГА", + "ТРУДЯГ", + "ТРУДЯГ" + ], + "uniq": { + "total": 17412, + "month": 4, + "year": 1078, + "day": 1 + }, + "players": [], + "last_update": 1780401422, + "dockerStats": { + "cpu": { + "percent": 12.19 + }, + "mem": { + "percent": 20.37, + "usage": 874938370, + "limit": 4294967300 + }, + "net": { + "input": 749648060, + "output": 561614460 + }, + "io": { + "input": 10179956700, + "output": 1085714430 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27001", + "city_pos": [ + 54.18572, + 37.53024 + ], + "workshopId": 2550711393 + }, + "srv2": { + "server_id": "srv2", + "name": "Лобня", + "description": "Пригород фактовска, здесь как известно стас какает просто", + "address": "tf2.pblr-nyk.pro:27002", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1849294297236728329/4A5E928023054D1625182FBB66EE47D49F490450/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/trade_terpilsk_r_f.ugc3194042144", + "color": "#FFBCAD", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2758046198", + "naming": [ + "ГРАЖДАНИН", + "ГРАЖДАН", + "ГРАЖДАН" + ], + "uniq": { + "total": 44121, + "month": 58, + "year": 3226, + "day": 20 + }, + "players": [], + "last_update": 1780401425, + "dockerStats": { + "cpu": { + "percent": 5.39 + }, + "mem": { + "percent": 22.06, + "usage": 947642370, + "limit": 4294967300 + }, + "net": { + "input": 3587228930, + "output": 12202587100 + }, + "io": { + "input": 118784, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27002", + "city_pos": [ + 56.0328, + 37.4695 + ], + "workshopId": 3194042144 + }, + "srv12": { + "server_id": "srv12", + "name": "Niggers Vs Machine", + "description": "Роботы наступают, смогут ли кучка негров разграбить их", + "address": "tf2.pblr-nyk.pro:26001", + "preview": "https://media.discordapp.net/attachments/684684947247988748/718119209401450556/FuMPrndsMvc.png", + "player_count": 25, + "max_players": 32, + "status": true, + "map": "mvm_ghost_town", + "color": null, + "workshop": "", + "naming": [ + "ЧЕРНОЖОПЫЙ", + "ЧЕРНОЖОПА", + "ЧЕРНОЖОПЫХ" + ], + "uniq": { + "total": 7356, + "month": 17, + "year": 1144, + "day": 3 + }, + "players": [ + { + "name": "vanyabazov2012", + "score": 43, + "id": 27, + "duration": "00:27:18", + "loss": 0, + "ping": 67, + "state": "active", + "steam2": "[U:1:806437952]", + "clz": 9, + "team": 2, + "deads": 15, + "duration_seconds": 1638, + "pos": [ + 458.29077, + -2577.6677, + 524.0625 + ], + "steam": { + "steam3": "[U:1:806437952]", + "steam2": "STEAM_0:0:403218976", + "steam64": "76561198766703680", + "community_url": "https://steamcommunity.com/profiles/76561198766703680", + "account_id": 806437952 + } + }, + { + "name": "Билли Бутчер", + "score": 62, + "id": 50, + "duration": "00:17:21", + "loss": 0, + "ping": 50, + "state": "active", + "steam2": "[U:1:825252811]", + "clz": 7, + "team": 2, + "deads": 6, + "duration_seconds": 1041, + "pos": [ + -1235.6525, + -1973.2872, + 640.03125 + ], + "steam": { + "steam3": "[U:1:825252811]", + "steam2": "STEAM_0:1:412626405", + "steam64": "76561198785518539", + "community_url": "https://steamcommunity.com/profiles/76561198785518539", + "account_id": 825252811 + } + }, + { + "name": "lykiman214", + "score": 0, + "id": 52, + "duration": "00:01:27", + "loss": 0, + "ping": 331, + "state": "active", + "steam2": "[U:1:1914729343]", + "clz": 6, + "team": 2, + "deads": 0, + "duration_seconds": 87, + "pos": [ + 540.7683, + -2606.1543, + 512.03125 + ], + "steam": { + "steam3": "[U:1:1914729343]", + "steam2": "STEAM_0:1:957364671", + "steam64": "76561199874995071", + "community_url": "https://steamcommunity.com/profiles/76561199874995071", + "account_id": 1914729343 + } + } + ], + "last_update": 1780401421, + "dockerStats": { + "cpu": { + "percent": 58.25 + }, + "mem": { + "percent": 21.33, + "usage": 915988480, + "limit": 4294967300 + }, + "net": { + "input": 982255810, + "output": 1492292860 + }, + "io": { + "input": 110592, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:26001", + "city_pos": [ + 43.6239, + 39.8268 + ], + "workshopId": null + }, + "srv13": { + "server_id": "srv13", + "name": "Niggers Vs White", + "description": "100 игроков на одной карты, не плохо, а вы были на донбассе?", + "address": "tf2.pblr-nyk.pro:26005", + "preview": "https://media.discordapp.net/attachments/684684947247988748/718119209401450556/FuMPrndsMvc.png", + "player_count": 0, + "max_players": 100, + "status": true, + "map": "workshop/koth_donbass.ugc3013875368", + "color": null, + "workshop": "", + "naming": [ + "БОЕЦ", + "БОЙЦОВ", + "БОЙЦОВ" + ], + "uniq": { + "total": 1822, + "month": 3, + "year": 382, + "day": 0 + }, + "players": [], + "last_update": 1780401424, + "dockerStats": { + "cpu": { + "percent": 4.43 + }, + "mem": { + "percent": 10, + "usage": 858763260, + "limit": 8589934600 + }, + "net": { + "input": 806486210, + "output": 370700384 + }, + "io": { + "input": 10471473200, + "output": 1148657660 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:26005", + "city_pos": [ + 47.4613, + 37.6823 + ], + "workshopId": 3013875368 + }, + "srv9": { + "server_id": "srv9", + "name": "Норильск 2019", + "description": "Военный городок который так всем полюбился", + "address": "tf2.pblr-nyk.pro:27009", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1615094320279527486/A8EAA83FD900CBE9894ED30576C5202EE7724CCC/?imw=512&imh=512", + "player_count": 8, + "max_players": 32, + "status": true, + "map": "workshop/norilsk_nickel_v2.ugc3327210504", + "color": "#06A77D", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2613092459", + "naming": [ + "СЕВЕРЯНИН", + "СЕВЕРЯНИНА", + "СЕВЕРЯН" + ], + "uniq": { + "total": 22761, + "month": 154, + "year": 6574, + "day": 54 + }, + "players": [ + { + "name": "изумрудный дрист", + "score": 7, + "id": 92, + "duration": "00:13:57", + "loss": 0, + "ping": 82, + "state": "active", + "steam2": "[U:1:1756099576]", + "clz": 5, + "team": 3, + "deads": 8, + "duration_seconds": 837, + "pos": [ + 1046.1536, + -879.40063, + 14.137061 + ], + "steam": { + "steam3": "[U:1:1756099576]", + "steam2": "STEAM_0:0:878049788", + "steam64": "76561199716365304", + "community_url": "https://steamcommunity.com/profiles/76561199716365304", + "account_id": 1756099576 + } + }, + { + "name": "bulls3y3", + "score": 59, + "id": 84, + "duration": "00:31:08", + "loss": 0, + "ping": 54, + "state": "active", + "steam2": "[U:1:800201297]", + "clz": 1, + "team": 2, + "deads": 12, + "duration_seconds": 1868, + "pos": [ + 771.72784, + -2682.596, + 32.03125 + ], + "steam": { + "steam3": "[U:1:800201297]", + "steam2": "STEAM_0:1:400100648", + "steam64": "76561198760467025", + "community_url": "https://steamcommunity.com/profiles/76561198760467025", + "account_id": 800201297 + } + }, + { + "name": "pro porn watcher", + "score": 0, + "id": 93, + "duration": "00:05:54", + "loss": 0, + "ping": 129, + "state": "active", + "steam2": "[U:1:1536668532]", + "clz": 7, + "team": 2, + "deads": 2, + "duration_seconds": 354, + "pos": [ + 1115.4634, + -343.23352, + 154.33195 + ], + "steam": { + "steam3": "[U:1:1536668532]", + "steam2": "STEAM_0:0:768334266", + "steam64": "76561199496934260", + "community_url": "https://steamcommunity.com/profiles/76561199496934260", + "account_id": 1536668532 + } + }, + { + "name": "ᴏᴋᴛɪᴀɴ", + "score": 82, + "id": 28, + "duration": "04:11:12", + "loss": 0, + "ping": 76, + "state": "active", + "steam2": "[U:1:1616292283]", + "clz": 2, + "team": 2, + "deads": 89, + "duration_seconds": 15072, + "pos": [ + 603.16296, + -2582.6526, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1616292283]", + "steam2": "STEAM_0:1:808146141", + "steam64": "76561199576558011", + "community_url": "https://steamcommunity.com/profiles/76561199576558011", + "account_id": 1616292283 + } + }, + { + "name": "venomkolobok2", + "score": 25, + "id": 79, + "duration": "00:51:31", + "loss": 0, + "ping": 52, + "state": "active", + "steam2": "[U:1:805514910]", + "clz": 4, + "team": 3, + "deads": 36, + "duration_seconds": 3091, + "pos": [ + 1082.6241, + 1086.8512, + -2.4385676 + ], + "steam": { + "steam3": "[U:1:805514910]", + "steam2": "STEAM_0:0:402757455", + "steam64": "76561198765780638", + "community_url": "https://steamcommunity.com/profiles/76561198765780638", + "account_id": 805514910 + } + }, + { + "name": "Geckich1", + "score": 19, + "id": 89, + "duration": "00:24:04", + "loss": 0, + "ping": 59, + "state": "active", + "steam2": "[U:1:1593518331]", + "clz": 7, + "team": 2, + "deads": 41, + "duration_seconds": 1444, + "pos": [ + 653.8946, + -2786.431, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1593518331]", + "steam2": "STEAM_0:1:796759165", + "steam64": "76561199553784059", + "community_url": "https://steamcommunity.com/profiles/76561199553784059", + "account_id": 1593518331 + } + }, + { + "name": "marozik", + "score": 13, + "id": 87, + "duration": "00:24:51", + "loss": 2, + "ping": 77, + "state": "active", + "steam2": "[U:1:764523638]", + "clz": 1, + "team": 3, + "deads": 20, + "duration_seconds": 1491, + "pos": [ + 1157.6235, + -1095.1791, + 154.5667 + ], + "steam": { + "steam3": "[U:1:764523638]", + "steam2": "STEAM_0:0:382261819", + "steam64": "76561198724789366", + "community_url": "https://steamcommunity.com/profiles/76561198724789366", + "account_id": 764523638 + } + }, + { + "name": "gitler", + "score": 9, + "id": 90, + "duration": "00:24:04", + "loss": 0, + "ping": 111, + "state": "active", + "steam2": "[U:1:1806422390]", + "clz": 9, + "team": 3, + "deads": 26, + "duration_seconds": 1444, + "pos": [ + 1681.4457, + 27.493795, + 32.03125 + ], + "steam": { + "steam3": "[U:1:1806422390]", + "steam2": "STEAM_0:0:903211195", + "steam64": "76561199766688118", + "community_url": "https://steamcommunity.com/profiles/76561199766688118", + "account_id": 1806422390 + } + } + ], + "last_update": 1780401423, + "dockerStats": { + "cpu": { + "percent": 55.69 + }, + "mem": { + "percent": 27.7, + "usage": 1189855230, + "limit": 4294967300 + }, + "net": { + "input": 8716010500, + "output": 118427943000 + }, + "io": { + "input": 16384, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27009", + "city_pos": [ + 69.3648, + 88.1203 + ], + "workshopId": 3327210504 + }, + "srv7": { + "server_id": "srv7", + "name": "Мухосранск", + "description": "Господи.... как же русичи любят комиблоки и говно под окнами", + "address": "tf2.pblr-nyk.pro:27007", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1797474801465224429/09AB9590F09F68180E76D1FE585B6A405524DD62/?imw=512&imh=512", + "player_count": 14, + "max_players": 32, + "status": true, + "map": "workshop/muhosransk_fix3.ugc3455829840", + "color": "#9A998C", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2454853587", + "naming": [ + "ГРАДЖАНИН", + "ГРАЖДАН", + "ГРАЖДАН" + ], + "uniq": { + "total": 31870, + "month": 245, + "year": 6868, + "day": 97 + }, + "players": [ + { + "name": "Dreamy", + "score": 10, + "id": 155, + "duration": "00:28:18", + "loss": 0, + "ping": 84, + "state": "active", + "steam2": "[U:1:1608445605]", + "clz": 5, + "team": 3, + "deads": 58, + "duration_seconds": 1698, + "pos": [ + -14.670122, + -2806.0784, + -15.96875 + ], + "steam": { + "steam3": "[U:1:1608445605]", + "steam2": "STEAM_0:1:804222802", + "steam64": "76561199568711333", + "community_url": "https://steamcommunity.com/profiles/76561199568711333", + "account_id": 1608445605 + } + }, + { + "name": "Волшебник говна", + "score": 45, + "id": 136, + "duration": "00:57:23", + "loss": 0, + "ping": 56, + "state": "active", + "steam2": "[U:1:767157572]", + "clz": 7, + "team": 3, + "deads": 128, + "duration_seconds": 3443, + "pos": [ + 743.96875, + -2255.9243, + 0.03125 + ], + "steam": { + "steam3": "[U:1:767157572]", + "steam2": "STEAM_0:0:383578786", + "steam64": "76561198727423300", + "community_url": "https://steamcommunity.com/profiles/76561198727423300", + "account_id": 767157572 + } + }, + { + "name": "The Observer", + "score": 13, + "id": 164, + "duration": "00:10:30", + "loss": 0, + "ping": 69, + "state": "active", + "steam2": "[U:1:1903995631]", + "clz": 3, + "team": 2, + "deads": 18, + "duration_seconds": 630, + "pos": [ + -83.94955, + -2568.7554, + 163.82123 + ], + "steam": { + "steam3": "[U:1:1903995631]", + "steam2": "STEAM_0:1:951997815", + "steam64": "76561199864261359", + "community_url": "https://steamcommunity.com/profiles/76561199864261359", + "account_id": 1903995631 + } + }, + { + "name": "VentiX", + "score": 19, + "id": 158, + "duration": "00:22:56", + "loss": 0, + "ping": 58, + "state": "active", + "steam2": "[U:1:1681292674]", + "clz": 7, + "team": 3, + "deads": 35, + "duration_seconds": 1376, + "pos": [ + -85.74202, + -2370.6223, + -15.96875 + ], + "steam": { + "steam3": "[U:1:1681292674]", + "steam2": "STEAM_0:0:840646337", + "steam64": "76561199641558402", + "community_url": "https://steamcommunity.com/profiles/76561199641558402", + "account_id": 1681292674 + } + }, + { + "name": "два", + "score": 24, + "id": 165, + "duration": "00:08:55", + "loss": 0, + "ping": 75, + "state": "active", + "steam2": "[U:1:1672443540]", + "clz": 8, + "team": 3, + "deads": 15, + "duration_seconds": 535, + "pos": [ + 1040, + -3792, + 0.17500818 + ], + "steam": { + "steam3": "[U:1:1672443540]", + "steam2": "STEAM_0:0:836221770", + "steam64": "76561199632709268", + "community_url": "https://steamcommunity.com/profiles/76561199632709268", + "account_id": 1672443540 + } + }, + { + "name": "bee", + "score": 357, + "id": 82, + "duration": "02:45:38", + "loss": 0, + "ping": 56, + "state": "active", + "steam2": "[U:1:1883365386]", + "clz": 3, + "team": 2, + "deads": 303, + "duration_seconds": 9938, + "pos": [ + 838.52545, + -2756.5918, + 64.03125 + ], + "steam": { + "steam3": "[U:1:1883365386]", + "steam2": "STEAM_0:0:941682693", + "steam64": "76561199843631114", + "community_url": "https://steamcommunity.com/profiles/76561199843631114", + "account_id": 1883365386 + } + }, + { + "name": "умнейший", + "score": 6, + "id": 162, + "duration": "00:14:06", + "loss": 0, + "ping": 77, + "state": "active", + "steam2": "[U:1:88907359]", + "clz": 3, + "team": 2, + "deads": 9, + "duration_seconds": 846, + "pos": [ + 302.33008, + -2441.6396, + 0.03125 + ], + "steam": { + "steam3": "[U:1:88907359]", + "steam2": "STEAM_0:1:44453679", + "steam64": "76561198049173087", + "community_url": "https://steamcommunity.com/profiles/76561198049173087", + "account_id": 88907359 + } + }, + { + "name": "Soldier Boy", + "score": 33, + "id": 160, + "duration": "00:18:40", + "loss": 0, + "ping": 60, + "state": "active", + "steam2": "[U:1:368384542]", + "clz": 2, + "team": 3, + "deads": 26, + "duration_seconds": 1120, + "pos": [ + -1123.8982, + -3044.95, + 12.03125 + ], + "steam": { + "steam3": "[U:1:368384542]", + "steam2": "STEAM_0:0:184192271", + "steam64": "76561198328650270", + "community_url": "https://steamcommunity.com/profiles/76561198328650270", + "account_id": 368384542 + } + }, + { + "name": "сынище королевы", + "score": 5, + "id": 167, + "duration": "00:08:44", + "loss": 0, + "ping": 74, + "state": "active", + "steam2": "[U:1:1852031291]", + "clz": 6, + "team": 3, + "deads": 2, + "duration_seconds": 524, + "pos": [ + 1255.4316, + -1576.2988, + -4.5162525 + ], + "steam": { + "steam3": "[U:1:1852031291]", + "steam2": "STEAM_0:1:926015645", + "steam64": "76561199812297019", + "community_url": "https://steamcommunity.com/profiles/76561199812297019", + "account_id": 1852031291 + } + }, + { + "name": "rezinka2007", + "score": 5, + "id": 169, + "duration": "00:08:38", + "loss": 0, + "ping": 62, + "state": "active", + "steam2": "[U:1:1624893061]", + "clz": 4, + "team": 2, + "deads": 4, + "duration_seconds": 518, + "pos": [ + -471.96875, + 77.03125, + 92.03125 + ], + "steam": { + "steam3": "[U:1:1624893061]", + "steam2": "STEAM_0:1:812446530", + "steam64": "76561199585158789", + "community_url": "https://steamcommunity.com/profiles/76561199585158789", + "account_id": 1624893061 + } + }, + { + "name": "Незнающий побед", + "score": 51, + "id": 153, + "duration": "00:31:58", + "loss": 0, + "ping": 39, + "state": "active", + "steam2": "[U:1:1254914175]", + "clz": 6, + "team": 2, + "deads": 30, + "duration_seconds": 1918, + "pos": [ + 180.95839, + -2953.2292, + -15.96875 + ], + "steam": { + "steam3": "[U:1:1254914175]", + "steam2": "STEAM_0:1:627457087", + "steam64": "76561199215179903", + "community_url": "https://steamcommunity.com/profiles/76561199215179903", + "account_id": 1254914175 + } + }, + { + "name": "Ancouser", + "score": 6, + "id": 170, + "duration": "00:08:28", + "loss": 0, + "ping": 152, + "state": "active", + "steam2": "[U:1:1841886393]", + "clz": 3, + "team": 3, + "deads": 9, + "duration_seconds": 508, + "pos": [ + -1194.0054, + -1128.8577, + 0.780138 + ], + "steam": { + "steam3": "[U:1:1841886393]", + "steam2": "STEAM_0:1:920943196", + "steam64": "76561199802152121", + "community_url": "https://steamcommunity.com/profiles/76561199802152121", + "account_id": 1841886393 + } + }, + { + "name": "tora", + "score": 0, + "id": 171, + "duration": "00:06:37", + "loss": 0, + "ping": 30, + "state": "active", + "steam2": "[U:1:782952883]", + "clz": 3, + "team": 3, + "deads": 1, + "duration_seconds": 397, + "pos": [ + 469.92444, + -1321.7231, + 44.911236 + ], + "steam": { + "steam3": "[U:1:782952883]", + "steam2": "STEAM_0:1:391476441", + "steam64": "76561198743218611", + "community_url": "https://steamcommunity.com/profiles/76561198743218611", + "account_id": 782952883 + } + }, + { + "name": "куколдиарий", + "score": 0, + "id": 172, + "duration": "00:02:59", + "loss": 0, + "ping": 92, + "state": "active", + "steam2": "[U:1:1928512747]", + "clz": 9, + "team": 2, + "deads": 0, + "duration_seconds": 179, + "pos": [ + 855.96875, + -3528.7485, + 128.03125 + ], + "steam": { + "steam3": "[U:1:1928512747]", + "steam2": "STEAM_0:1:964256373", + "steam64": "76561199888778475", + "community_url": "https://steamcommunity.com/profiles/76561199888778475", + "account_id": 1928512747 + } + } + ], + "last_update": 1780401423, + "dockerStats": { + "cpu": { + "percent": 58.01 + }, + "mem": { + "percent": 30.36, + "usage": 1303928830, + "limit": 4294967300 + }, + "net": { + "input": 12254948400, + "output": 37644026000 + }, + "io": { + "input": 77824, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27007", + "city_pos": [ + 53.346, + 83.7698 + ], + "workshopId": 3455829840 + }, + "srv8": { + "server_id": "srv8", + "name": "Ельцин Центр", + "description": "Был построен после того как ельцин решил умереть...", + "address": "tf2.pblr-nyk.pro:27008", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/784113153112258679/7EA2112BBA1200F8C6DBA965D6D647AA5DF3F9A5/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/alkashplaza.ugc2935866422", + "color": "#F8B225", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=1868606313", + "naming": [ + "ПОСЕТИТЕЛЬ", + "ПОСЕТИТЕЛЕЙ", + "ПИСЕТИТЕЛЕЙ" + ], + "uniq": { + "total": 17503, + "month": 17, + "year": 1285, + "day": 1 + }, + "players": [], + "last_update": 1780401424, + "dockerStats": { + "cpu": { + "percent": 8.4 + }, + "mem": { + "percent": 21.71, + "usage": 932593660, + "limit": 4294967300 + }, + "net": { + "input": 1181812860, + "output": 3313574910 + }, + "io": { + "input": 16384, + "output": 0 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27008", + "city_pos": [ + 56.84479, + 60.5916 + ], + "workshopId": 2935866422 + }, + "srv10": { + "server_id": "srv10", + "name": "Курорт ебатория", + "description": "Отдыхаем", + "address": "tf2.pblr-nyk.pro:27010", + "preview": "https://images.steamusercontent.com/ugc/14463717712050677925/B2B333585AA7F1C89AD8EE36556C1340D68F2011/?imw=512&imh=512", + "player_count": 6, + "max_players": 32, + "status": true, + "map": "workshop/dm_ebatoria_fix.ugc3615262485", + "color": "#99C1B9", + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=3615262485", + "naming": [ + "ОТДЫХАЮЩИЙ,", + "ОТДЫХАЮЩИХ", + "ОТДЫХАЮЩИХ" + ], + "uniq": { + "total": 30231, + "month": 128, + "year": 3496, + "day": 38 + }, + "players": [ + { + "name": "Никитка", + "score": 1, + "id": 49, + "duration": "01:40:02", + "loss": 0, + "ping": 81, + "state": "active", + "steam2": "[U:1:1477981708]", + "clz": 3, + "team": 2, + "deads": 20, + "duration_seconds": 6002, + "pos": [ + -2470.2207, + 256.57214, + 192.03125 + ], + "steam": { + "steam3": "[U:1:1477981708]", + "steam2": "STEAM_0:0:738990854", + "steam64": "76561199438247436", + "community_url": "https://steamcommunity.com/profiles/76561199438247436", + "account_id": 1477981708 + } + }, + { + "name": "double_cross42", + "score": 17, + "id": 58, + "duration": "01:00:58", + "loss": 0, + "ping": 73, + "state": "active", + "steam2": "[U:1:1111517378]", + "clz": 6, + "team": 3, + "deads": 25, + "duration_seconds": 3658, + "pos": [ + -1790.262, + -1147.5425, + 0.03125 + ], + "steam": { + "steam3": "[U:1:1111517378]", + "steam2": "STEAM_0:0:555758689", + "steam64": "76561199071783106", + "community_url": "https://steamcommunity.com/profiles/76561199071783106", + "account_id": 1111517378 + } + }, + { + "name": "ШАУРМА! С ГАВЯДИН", + "score": 1, + "id": 75, + "duration": "00:15:14", + "loss": 0, + "ping": 68, + "state": "active", + "steam2": "[U:1:765529232]", + "clz": 5, + "team": 3, + "deads": 3, + "duration_seconds": 914, + "pos": [ + -2654.301, + 202.18329, + 192.03125 + ], + "steam": { + "steam3": "[U:1:765529232]", + "steam2": "STEAM_0:0:382764616", + "steam64": "76561198725794960", + "community_url": "https://steamcommunity.com/profiles/76561198725794960", + "account_id": 765529232 + } + }, + { + "name": "✘ᶜᴿᴬᶻᵞ✘", + "score": 10, + "id": 61, + "duration": "00:50:52", + "loss": 0, + "ping": 58, + "state": "active", + "steam2": "[U:1:81709334]", + "clz": 9, + "team": 2, + "deads": 25, + "duration_seconds": 3052, + "pos": [ + -2371.992, + 319.3505, + 192.03125 + ], + "steam": { + "steam3": "[U:1:81709334]", + "steam2": "STEAM_0:0:40854667", + "steam64": "76561198041975062", + "community_url": "https://steamcommunity.com/profiles/76561198041975062", + "account_id": 81709334 + } + }, + { + "name": "ALTOT_LAN", + "score": 1, + "id": 70, + "duration": "00:39:02", + "loss": 0, + "ping": 65, + "state": "active", + "steam2": "[U:1:181555893]", + "clz": 1, + "team": 3, + "deads": 21, + "duration_seconds": 2342, + "pos": [ + -2481.3604, + 208.5409, + 192.03125 + ], + "steam": { + "steam3": "[U:1:181555893]", + "steam2": "STEAM_0:1:90777946", + "steam64": "76561198141821621", + "community_url": "https://steamcommunity.com/profiles/76561198141821621", + "account_id": 181555893 + } + }, + { + "name": "dj.lemon", + "score": 2, + "id": 74, + "duration": "00:27:03", + "loss": 0, + "ping": 65, + "state": "active", + "steam2": "[U:1:770264672]", + "clz": 5, + "team": 2, + "deads": 9, + "duration_seconds": 1623, + "pos": [ + -2433.329, + 204.3582, + 192.03125 + ], + "steam": { + "steam3": "[U:1:770264672]", + "steam2": "STEAM_0:0:385132336", + "steam64": "76561198730530400", + "community_url": "https://steamcommunity.com/profiles/76561198730530400", + "account_id": 770264672 + } + } + ], + "last_update": 1780401423, + "dockerStats": { + "cpu": { + "percent": 31.96 + }, + "mem": { + "percent": 26.39, + "usage": 1133555710, + "limit": 4294967300 + }, + "net": { + "input": 7317701600, + "output": 26278465500 + }, + "io": { + "input": 15297105900, + "output": 1204224000 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:27010", + "city_pos": [ + 69.3341, + 88.231 + ], + "workshopId": 3615262485 + }, + "srv11": { + "server_id": "srv11", + "name": "МГЕ БРАТ", + "description": "Хочешь подолбится в сраку или просто отдахнуть, ТЕБЕ СЮДА", + "address": "tf2.pblr-nyk.pro:26003", + "preview": "https://steamuserimages-a.akamaihd.net/ugc/1844794463034551146/011D59A5FF30F4721817E6F4A4C61BF1E1AA574D/?imw=512&imh=512", + "player_count": 0, + "max_players": 32, + "status": true, + "map": "workshop/iwantmge.ugc2964733614", + "color": null, + "workshop": "https://steamcommunity.com/sharedfiles/filedetails/?id=2786475581", + "naming": [ + "БРАТ", + "БРАТЬЕВ", + "БРАТЬЕВ" + ], + "uniq": { + "total": 6026, + "month": 0, + "year": 0, + "day": 0 + }, + "players": [], + "last_update": 1780401421, + "dockerStats": { + "cpu": { + "percent": 3.53 + }, + "mem": { + "percent": 18.62, + "usage": 799686660, + "limit": 4294967300 + }, + "net": { + "input": 851783100, + "output": 447405920 + }, + "io": { + "input": 9338007600, + "output": 1133682690 + }, + "utime": 1780401410 + }, + "ip": "tf2.pblr-nyk.pro:26003", + "city_pos": [ + 48.51908, + 135.13773 + ], + "workshopId": 2964733614 + } + }, + lastplay: { + "srv5": { + "workshop/zavod_redux_v2.ugc3736124323": 1780254984 + }, + "srv6": { + "workshop/world_of_korbal.ugc2734601245": 1764437336 + }, + "srv3": { + "workshop/donbassborn_open.ugc2604412271": 1631959606 + }, + "srv4": { + "workshop/dacha_putina.ugc1990930202": 1779807109 + }, + "srv1": { + "workshop/brewery_ultimate_open.ugc2550711393": 1648997371 + }, + "srv2": { + "workshop/trade_terpilsk_r_f.ugc3194042144": 1731344604 + }, + "srv12": { + "mvm_ghost_town": 1710021565 + }, + "srv13": { + "workshop/koth_donbass.ugc3013875368": 1722288252 + }, + "srv9": { + "workshop/norilsk_nickel_v2.ugc3327210504": 1778263346 + }, + "srv7": { + "workshop/muhosransk_fix3.ugc3455829840": 1778341856 + }, + "srv8": { + "workshop/alkashplaza.ugc2935866422": 1778096531 + }, + "srv10": { + "workshop/dm_ebatoria_fix.ugc3615262485": 1778343862 + }, + "srv11": { + "workshop/iwantmge.ugc2964733614": 1682766891 + } + }, + gametime: { + "srv5": { + "workshop/zavod_redux_v2.ugc3736124323": 242854 + }, + "srv6": { + "workshop/world_of_korbal.ugc2734601245": 21207 + }, + "srv3": { + "workshop/donbassborn_open.ugc2604412271": 14093 + }, + "srv4": { + "workshop/dacha_putina.ugc1990930202": 78110 + }, + "srv1": { + "workshop/brewery_ultimate_open.ugc2550711393": 51047 + }, + "srv2": { + "workshop/trade_terpilsk_r_f.ugc3194042144": 13992 + }, + "srv12": { + "mvm_ghost_town": 44 + }, + "srv13": { + "workshop/koth_donbass.ugc3013875368": 2098 + }, + "srv9": { + "workshop/norilsk_nickel_v2.ugc3327210504": 16812 + }, + "srv7": { + "workshop/muhosransk_fix3.ugc3455829840": 30404 + }, + "srv8": { + "workshop/alkashplaza.ugc2935866422": 19092 + }, + "srv10": { + "workshop/dm_ebatoria_fix.ugc3615262485": 450 + }, + "srv11": { + "workshop/iwantmge.ugc2964733614": 4174 + } + } +} + +module.exports = {testData}; \ No newline at end of file diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..4a98a57 --- /dev/null +++ b/utils.js @@ -0,0 +1,46 @@ +/** + * Преобразует секунды в формат "дни ЧЧ:ММ:СС" (если дни > 0) + * или просто "ЧЧ:ММ:СС" (если дней нет). + * @param {number} totalSeconds - количество секунд (целое неотрицательное число) + * @returns {string} отформатированная строка + */ +function formatSeconds(totalSeconds) { + if (totalSeconds < 0) return "0 00:00:00"; + + const days = Math.floor(totalSeconds / 86400); + let remainder = totalSeconds % 86400; + + const hours = Math.floor(remainder / 3600); + remainder %= 3600; + + const minutes = Math.floor(remainder / 60); + const seconds = remainder % 60; + + // Форматируем часы, минуты, секунды с ведущими нулями + const timePart = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; + + if (days === 0) { + return timePart; + } + + // Склонение слова "день" + let dayWord; + const lastDigit = days % 10; + const lastTwoDigits = days % 100; + + if (lastTwoDigits >= 11 && lastTwoDigits <= 14) { + dayWord = "дней"; + } else { + switch (lastDigit) { + case 1: dayWord = "день"; break; + case 2: + case 3: + case 4: dayWord = "дня"; break; + default: dayWord = "дней"; + } + } + + return `${days} ${dayWord} ${timePart}`; +} + +module.exports = {formatSeconds} \ No newline at end of file