From a6a9974141c0d9687bfaa0bb9e2a685f6bd00355 Mon Sep 17 00:00:00 2001 From: Kostya Bats Date: Fri, 8 Sep 2023 10:33:26 +0300 Subject: [PATCH] basic support visual config file --- src/backend/build.gradle.kts | 3 +- .../main/kotlin/org/icpclive/Application.kt | 10 + .../src/main/kotlin/org/icpclive/Config.kt | 7 +- .../main/kotlin/org/icpclive/data/DataBus.kt | 1 + .../kotlin/org/icpclive/overlay/Routing.kt | 3 + src/frontend/overlay/package.json | 3 +- src/frontend/overlay/src/config.jsx | 249 +++++++------ src/frontend/overlay/vite.config.js | 11 +- src/frontend/package-lock.json | 352 ++++++++++++++++++ 9 files changed, 514 insertions(+), 125 deletions(-) diff --git a/src/backend/build.gradle.kts b/src/backend/build.gradle.kts index 9b98913d2..84faa68d9 100644 --- a/src/backend/build.gradle.kts +++ b/src/backend/build.gradle.kts @@ -31,6 +31,7 @@ tasks { project.properties["live.dev.widgetPositionsFile"]?.let { "--widget-positions=$it" }, project.properties["live.dev.contest"]?.let { "--config-directory=$it" }, project.properties["live.dev.analyticsTemplatesFile"]?.let { "--analytics-template=$it" }, + project.properties["live.dev.visualConfigFile"]?.let { "--visual-config=$it" }, ) this.workingDir = rootDir.resolve("config") } @@ -71,4 +72,4 @@ dependencies { testImplementation(libs.kotlin.junit) testImplementation(libs.ktor.server.tests) -} \ No newline at end of file +} diff --git a/src/backend/src/main/kotlin/org/icpclive/Application.kt b/src/backend/src/main/kotlin/org/icpclive/Application.kt index 4d5e5148a..5e0a6062b 100644 --- a/src/backend/src/main/kotlin/org/icpclive/Application.kt +++ b/src/backend/src/main/kotlin/org/icpclive/Application.kt @@ -16,6 +16,8 @@ import io.ktor.server.routing.* import io.ktor.server.util.* import io.ktor.server.websocket.* import kotlinx.coroutines.CoroutineExceptionHandler +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch import org.icpclive.admin.configureAdminApiRouting @@ -144,6 +146,14 @@ fun Application.module() { .addFirstToSolves() + DataBus.visualConfigFlow.completeOrThrow( + config.visualConfigFile?.let { + fileJsonContentFlow>(it, logger).stateIn(this, SharingStarted.Eagerly, emptyMap()) + } ?: MutableStateFlow(mutableMapOf("one" to "two")) + ) + launchServices(loader) } } + +private val logger = getLogger(Application::class) diff --git a/src/backend/src/main/kotlin/org/icpclive/Config.kt b/src/backend/src/main/kotlin/org/icpclive/Config.kt index 70798fda4..5d2f01995 100644 --- a/src/backend/src/main/kotlin/org/icpclive/Config.kt +++ b/src/backend/src/main/kotlin/org/icpclive/Config.kt @@ -57,6 +57,11 @@ object Config : CliktCommand(name = "java -jar live-v3.jar", printHelpOnEmptyArg help = "File with localization of analytics messages" ).path(canBeFile = true, canBeDir = false, mustExist = true) + val visualConfigFile by option( + "--visual-config", + help = "File with localization of analytics messages" + ).path(canBeFile = true, canBeDir = false, mustExist = true) + override fun run() { defaultWidgetPositions = widgetPositions presetsDirectory.toFile().mkdirs() @@ -72,4 +77,4 @@ object Config : CliktCommand(name = "java -jar live-v3.jar", printHelpOnEmptyArg } -val config: Config get() = Config \ No newline at end of file +val config: Config get() = Config diff --git a/src/backend/src/main/kotlin/org/icpclive/data/DataBus.kt b/src/backend/src/main/kotlin/org/icpclive/data/DataBus.kt index 6ca9e74c7..7498c451f 100644 --- a/src/backend/src/main/kotlin/org/icpclive/data/DataBus.kt +++ b/src/backend/src/main/kotlin/org/icpclive/data/DataBus.kt @@ -44,6 +44,7 @@ object DataBus { val teamInterestingScoreRequestFlow = CompletableDeferred>() val teamInterestingFlow = CompletableDeferred>>() val socialEvents = CompletableDeferred>() + val visualConfigFlow = CompletableDeferred>>() fun setScoreboardEvents(level: OptimismLevel, flow: Flow) { scoreboardFlow[level.ordinal].completeOrThrow(flow) } suspend fun getScoreboardEvents(level: OptimismLevel) = scoreboardFlow[level.ordinal].await() diff --git a/src/backend/src/main/kotlin/org/icpclive/overlay/Routing.kt b/src/backend/src/main/kotlin/org/icpclive/overlay/Routing.kt index f37262edd..f875a2ab3 100644 --- a/src/backend/src/main/kotlin/org/icpclive/overlay/Routing.kt +++ b/src/backend/src/main/kotlin/org/icpclive/overlay/Routing.kt @@ -1,5 +1,7 @@ package org.icpclive.overlay +import io.ktor.server.application.call +import io.ktor.server.response.respond import io.ktor.server.routing.* import io.ktor.server.websocket.* import kotlinx.coroutines.flow.* @@ -35,4 +37,5 @@ fun Route.configureOverlayRouting() { route("/svgAchievement"){ configureSvgAtchievementRouting(Config.mediaDirectory) } + get("/visualConfig.json") { call.respond(DataBus.visualConfigFlow.await().value) } } diff --git a/src/frontend/overlay/package.json b/src/frontend/overlay/package.json index bf453a7f3..c498ad7bc 100644 --- a/src/frontend/overlay/package.json +++ b/src/frontend/overlay/package.json @@ -23,12 +23,13 @@ "socket.io-client": "^4.5.2", "styled-components": "^5.3.3", "stylelint": "^14.8.2", + "stylelint-config-idiomatic-order": "^9.0.0", "stylelint-config-recommended": "^7.0.0", "stylelint-config-styled-components": "^0.1.1", "stylelint-no-unsupported-browser-features": "^5.0.3", "stylelint-processor-styled-components": "^1.10.0", - "stylelint-config-idiomatic-order": "^9.0.0", "vite": "^4.4.3", + "vite-plugin-top-level-await": "^1.3.1", "web-vitals": "^1.1.2" }, "scripts": { diff --git a/src/frontend/overlay/src/config.jsx b/src/frontend/overlay/src/config.jsx index 5f286a123..c294dc791 100644 --- a/src/frontend/overlay/src/config.jsx +++ b/src/frontend/overlay/src/config.jsx @@ -2,163 +2,170 @@ const WS_PROTO = window.location.protocol === "https:" ? "wss://" : "ws://"; const WS_PORT = import.meta.env.VITE_WEBSOCKET_PORT ?? window.location.port; export const BASE_URL_WS = import.meta.env.VITE_WEBSOCKET_URL ?? WS_PROTO + window.location.hostname + ":" + WS_PORT + "/api/overlay"; +export const VISUAL_CONFIG_URL = import.meta.env.VITE_VISUAL_CONFIG_URL ?? `${window.location.protocol}//${window.location.hostname}:${WS_PORT}/api/overlay/visualConfig.json`; -const CONTEST_COLOR = "#4C83C3" +const visualConfig = await fetch(VISUAL_CONFIG_URL) + .then(r => r.json()) + .catch((e) => console.error("failed to load visual config: " + e)) ?? {}; + +// to generate next consts use replace `export const ([\w]*) = ([^visual])` to `export const $1 = visualConfig\["$1"\] ?? $2` + +const CONTEST_COLOR = visualConfig["CONTEST_COLOR"] ?? "#4C83C3"; // Non Styling configs -export const WEBSOCKET_RECONNECT_TIME = 5000; // ms -export const QUEUE_TITLE = "Queue"; -export const QUEUE_CAPTION = "46th"; +export const WEBSOCKET_RECONNECT_TIME = visualConfig["WEBSOCKET_RECONNECT_TIME"] ?? 5000; // ms +export const QUEUE_TITLE = visualConfig["QUEUE_TITLE"] ?? "Queue"; +export const QUEUE_CAPTION = visualConfig[""] ?? "46th"; -export const SCOREBOARD_CAPTION = "46th"; -export const SCOREBOARD_TABLE_HEADER_BACKGROUND_COLOR = CONTEST_COLOR; -export const SCOREBOARD_TABLE_HEADER_DIVIDER_COLOR = "#242425" -export const SCOREBOARD_TABLE_ROWS_DIVIDER_COLOR = CONTEST_COLOR; +export const SCOREBOARD_CAPTION = visualConfig["SCOREBOARD_CAPTION"] ?? "46th"; +export const SCOREBOARD_TABLE_HEADER_BACKGROUND_COLOR = visualConfig["SCOREBOARD_TABLE_HEADER_BACKGROUND_COLOR"] ?? CONTEST_COLOR; +export const SCOREBOARD_TABLE_HEADER_DIVIDER_COLOR = visualConfig["SCOREBOARD_TABLE_HEADER_DIVIDER_COLOR"] ?? "#242425" +export const SCOREBOARD_TABLE_ROWS_DIVIDER_COLOR = visualConfig["SCOREBOARD_TABLE_ROWS_DIVIDER_COLOR"] ?? CONTEST_COLOR; // Behaviour -export const TICKER_SCOREBOARD_REPEATS = 1; -export const QUEUE_MAX_ROWS = 12; +export const TICKER_SCOREBOARD_REPEATS = visualConfig["TICKER_SCOREBOARD_REPEATS"] ?? 1; +export const QUEUE_MAX_ROWS = visualConfig["QUEUE_MAX_ROWS"] ?? 12; // Timings -export const WIDGET_TRANSITION_TIME = 300; // ms -export const QUEUE_ROW_TRANSITION_TIME = 1000; // ms -export const QUEUE_ROW_APPEAR_TIME = QUEUE_ROW_TRANSITION_TIME; // ms -export const QUEUE_ROW_FEATURED_RUN_APPEAR_TIME = 500; // ms -export const QUEUE_ROW_FEATURED_RUN_ADDITIONAL_DELAY = 5000; // ms -export const QUEUE_ROW_FTS_TRANSITION_TIME = 3000; // ms -export const SCOREBOARD_ROW_TRANSITION_TIME = 1000; // ms -export const SCOREBOARD_SCROLL_INTERVAL = 20000; // ms -export const PICTURES_APPEAR_TIME = 1000; // ms -export const SVG_APPEAR_TIME = 1000; // ms -export const VIDEO_APPEAR_TIME = 100; // ms -export const TEAM_VIEW_APPEAR_TIME = 1000; // ms -export const PVP_APPEAR_TIME = 1000; // ms -export const TICKER_SCROLL_TRANSITION_TIME = 1000; //ms -export const TICKER_SCOREBOARD_SCROLL_TRANSITION_TIME = 300; //ms -export const STATISTICS_CELL_MORPH_TIME = 200; //ms -export const CELL_FLASH_PERIOD = 500; //ms +export const WIDGET_TRANSITION_TIME = visualConfig["WIDGET_TRANSITION_TIME"] ?? 300; // ms +export const QUEUE_ROW_TRANSITION_TIME = visualConfig["QUEUE_ROW_TRANSITION_TIME"] ?? 1000; // ms +export const QUEUE_ROW_APPEAR_TIME = visualConfig["QUEUE_ROW_APPEAR_TIME"] ?? QUEUE_ROW_TRANSITION_TIME; // ms +export const QUEUE_ROW_FEATURED_RUN_APPEAR_TIME = visualConfig["QUEUE_ROW_FEATURED_RUN_APPEAR_TIME"] ?? 500; // ms +export const QUEUE_ROW_FEATURED_RUN_ADDITIONAL_DELAY = visualConfig["QUEUE_ROW_FEATURED_RUN_ADDITIONAL_DELAY"] ?? 5000; // ms +export const QUEUE_ROW_FTS_TRANSITION_TIME = visualConfig["QUEUE_ROW_FTS_TRANSITION_TIME"] ?? 3000; // ms +export const SCOREBOARD_ROW_TRANSITION_TIME = visualConfig["SCOREBOARD_ROW_TRANSITION_TIME"] ?? 1000; // ms +export const SCOREBOARD_SCROLL_INTERVAL = visualConfig["SCOREBOARD_SCROLL_INTERVAL"] ?? 20000; // ms +export const PICTURES_APPEAR_TIME = visualConfig["PICTURES_APPEAR_TIME"] ?? 1000; // ms +export const SVG_APPEAR_TIME = visualConfig["SVG_APPEAR_TIME"] ?? 1000; // ms +export const VIDEO_APPEAR_TIME = visualConfig["VIDEO_APPEAR_TIME"] ?? 100; // ms +export const TEAM_VIEW_APPEAR_TIME = visualConfig["TEAM_VIEW_APPEAR_TIME"] ?? 1000; // ms +export const PVP_APPEAR_TIME = visualConfig["PVP_APPEAR_TIME"] ?? 1000; // ms +export const TICKER_SCROLL_TRANSITION_TIME = visualConfig["TICKER_SCROLL_TRANSITION_TIME"] ?? 1000; //ms +export const TICKER_SCOREBOARD_SCROLL_TRANSITION_TIME = visualConfig["TICKER_SCOREBOARD_SCROLL_TRANSITION_TIME"] ?? 300; //ms +export const STATISTICS_CELL_MORPH_TIME = visualConfig["STATISTICS_CELL_MORPH_TIME"] ?? 200; //ms +export const CELL_FLASH_PERIOD = visualConfig["CELL_FLASH_PERIOD"] ?? 500; //ms // Behaviour // Styles -export const GLOBAL_DEFAULT_FONT_FAMILY = "Helvetica, serif"; // css-property -export const GLOBAL_DEFAULT_FONT_SIZE = "18px"; // css-property -export const GLOBAL_DEFAULT_FONT = GLOBAL_DEFAULT_FONT_SIZE + " " + GLOBAL_DEFAULT_FONT_FAMILY; // css property MUST HAVE FONT SIZE - -export const VERDICT_OK = "#1b8041"; -export const VERDICT_NOK = "#881f1b"; -export const VERDICT_UNKNOWN = "#a59e0c"; -export const VERDICT_OK2 = "#3bba6b"; -export const VERDICT_NOK2 = "#CB2E28"; -export const VERDICT_UNKNOWN2 = "#F3BE4B"; - - -export const QUEUE_ROW_HEIGHT = 41; // px -export const QUEUE_ROW_HEIGHT2 = 25; // px -export const QUEUE_FTS_PADDING = QUEUE_ROW_HEIGHT / 2; // px -export const QUEUE_OPACITY = 0.95; -export const QUEUE_FEATURED_RUN_ASPECT = 16 / 9; -export const QUEUE_BACKGROUND_COLOR = CONTEST_COLOR; - -export const SCOREBOARD_RANK_WIDTH = "80px"; // px -export const SCOREBOARD_RANK_WIDTH2 = "50px"; // px -export const SCOREBOARD_NAME_WIDTH = "300px"; // px -export const SCOREBOARD_NAME_WIDTH2 = "350px"; // px -export const SCOREBOARD_SUM_PEN_WIDTH = "80px"; // px -export const SCOREBOARD_HEADER_TITLE_BG_COLOR = VERDICT_NOK; -export const SCOREBOARD_HEADER_TITLE_BG_GREEN_COLOR = VERDICT_OK; -export const SCOREBOARD_HEADER_TITLE_FONT_SIZE = "30px"; -export const SCOREBOARD_HEADER_BG_COLOR = "#000000"; -export const SCOREBOARD_OPACITY = 0.95; - -export const SCORE_NONE_TEXT = "."; +export const GLOBAL_DEFAULT_FONT_FAMILY = visualConfig["GLOBAL_DEFAULT_FONT_FAMILY"] ?? "Helvetica, serif"; // css-property +export const GLOBAL_DEFAULT_FONT_SIZE = visualConfig["GLOBAL_DEFAULT_FONT_SIZE"] ?? "18px"; // css-property +export const GLOBAL_DEFAULT_FONT = visualConfig["GLOBAL_DEFAULT_FONT"] ?? GLOBAL_DEFAULT_FONT_SIZE + " " + GLOBAL_DEFAULT_FONT_FAMILY; // css property MUST HAVE FONT SIZE + +export const VERDICT_OK = visualConfig["VERDICT_OK"] ?? "#1b8041"; +export const VERDICT_NOK = visualConfig["VERDICT_NOK"] ?? "#881f1b"; +export const VERDICT_UNKNOWN = visualConfig["VERDICT_UNKNOWN"] ?? "#a59e0c"; +export const VERDICT_OK2 = visualConfig["VERDICT_OK2"] ?? "#3bba6b"; +export const VERDICT_NOK2 = visualConfig["VERDICT_NOK2"] ?? "#CB2E28"; +export const VERDICT_UNKNOWN2 = visualConfig["VERDICT_UNKNOWN2"] ?? "#F3BE4B"; + + +export const QUEUE_ROW_HEIGHT = visualConfig["QUEUE_ROW_HEIGHT"] ?? 41; // px +export const QUEUE_ROW_HEIGHT2 = visualConfig["QUEUE_ROW_HEIGHT2"] ?? 25; // px +export const QUEUE_FTS_PADDING = visualConfig["QUEUE_FTS_PADDING"] ?? QUEUE_ROW_HEIGHT / 2; // px +export const QUEUE_OPACITY = visualConfig["QUEUE_OPACITY"] ?? 0.95; +export const QUEUE_FEATURED_RUN_ASPECT = visualConfig["QUEUE_FEATURED_RUN_ASPECT"] ?? 16 / 9; +export const QUEUE_BACKGROUND_COLOR = visualConfig["QUEUE_BACKGROUND_COLOR"] ?? CONTEST_COLOR; + +export const SCOREBOARD_RANK_WIDTH = visualConfig["SCOREBOARD_RANK_WIDTH"] ?? "80px"; // px +export const SCOREBOARD_RANK_WIDTH2 = visualConfig["SCOREBOARD_RANK_WIDTH2"] ?? "50px"; // px +export const SCOREBOARD_NAME_WIDTH = visualConfig["SCOREBOARD_NAME_WIDTH"] ?? "300px"; // px +export const SCOREBOARD_NAME_WIDTH2 = visualConfig["SCOREBOARD_NAME_WIDTH2"] ?? "350px"; // px +export const SCOREBOARD_SUM_PEN_WIDTH = visualConfig["SCOREBOARD_SUM_PEN_WIDTH"] ?? "80px"; // px +export const SCOREBOARD_HEADER_TITLE_BG_COLOR = visualConfig["SCOREBOARD_HEADER_TITLE_BG_COLOR"] ?? VERDICT_NOK; +export const SCOREBOARD_HEADER_TITLE_BG_GREEN_COLOR = visualConfig["SCOREBOARD_HEADER_TITLE_BG_GREEN_COLOR"] ?? VERDICT_OK; +export const SCOREBOARD_HEADER_TITLE_FONT_SIZE = visualConfig["SCOREBOARD_HEADER_TITLE_FONT_SIZE"] ?? "30px"; +export const SCOREBOARD_HEADER_BG_COLOR = visualConfig["SCOREBOARD_HEADER_BG_COLOR"] ?? "#000000"; +export const SCOREBOARD_OPACITY = visualConfig["SCOREBOARD_OPACITY"] ?? 0.95; + +export const SCORE_NONE_TEXT = visualConfig["SCORE_NONE_TEXT"] ?? "."; // export const PVP_OPACITY = 0.95; // export const TEAM_VIEW_OPACITY = 0.95; -export const STATISTICS_TITLE_FONT_SIZE = "30px"; -export const STATISTICS_OPACITY = 0.95; -export const STATISTICS_BG_COLOR = "#000000"; -export const STATISTICS_TITLE_COLOR = "#FFFFFF"; -export const STATISTICS_STATS_VALUE_FONT_SIZE = "24pt"; -export const STATISTICS_STATS_VALUE_FONT_FAMILY = GLOBAL_DEFAULT_FONT_FAMILY; -export const STATISTICS_STATS_VALUE_COLOR = "#FFFFFF"; - - -export const CELL_FONT_FAMILY = GLOBAL_DEFAULT_FONT_FAMILY; -export const CELL_FONT_SIZE = "18px"; -export const CELL_TEXT_COLOR = "#FFFFFF"; -export const CELL_TEXT_COLOR_INVERSE = "#000000"; -export const CELL_BG_COLOR = "#000000"; -export const CELL_BG_COLOR_ODD = "rgba(1, 1, 1, 0.9)"; -export const CELL_BG_COLOR2 = "#1E1E1E"; -export const CELL_BG_COLOR_ODD2 = "#242424"; - -export const CELL_PROBLEM_LINE_WIDTH = "5px"; // css property -export const CELL_QUEUE_VERDICT_WIDTH = "80px"; // css property -export const CELL_QUEUE_VERDICT_WIDTH2 = "20px"; // css property -export const CELL_QUEUE_RANK_WIDTH = "50px"; // css property -export const CELL_QUEUE_RANK_WIDTH2 = "30px"; // css property -export const CELL_QUEUE_TOTAL_SCORE_WIDTH = "50px"; // css property -export const CELL_QUEUE_TASK_WIDTH = "50px"; // css property - -export const CELL_NAME_LEFT_PADDING = "5px"; // css property -export const CELL_NAME_RIGHT_PADDING = CELL_NAME_LEFT_PADDING; // css property - -export const TICKER_SMALL_SIZE = "12%"; // css property +export const STATISTICS_TITLE_FONT_SIZE = visualConfig["STATISTICS_TITLE_FONT_SIZE"] ?? "30px"; +export const STATISTICS_OPACITY = visualConfig["STATISTICS_OPACITY"] ?? 0.95; +export const STATISTICS_BG_COLOR = visualConfig["STATISTICS_BG_COLOR"] ?? "#000000"; +export const STATISTICS_TITLE_COLOR = visualConfig["STATISTICS_TITLE_COLOR"] ?? "#FFFFFF"; +export const STATISTICS_STATS_VALUE_FONT_SIZE = visualConfig["STATISTICS_STATS_VALUE_FONT_SIZE"] ?? "24pt"; +export const STATISTICS_STATS_VALUE_FONT_FAMILY = visualConfig["STATISTICS_STATS_VALUE_FONT_FAMILY"] ?? GLOBAL_DEFAULT_FONT_FAMILY; +export const STATISTICS_STATS_VALUE_COLOR = visualConfig["STATISTICS_STATS_VALUE_COLOR"] ?? "#FFFFFF"; + + +export const CELL_FONT_FAMILY = visualConfig["CELL_FONT_FAMILY"] ?? GLOBAL_DEFAULT_FONT_FAMILY; +export const CELL_FONT_SIZE = visualConfig["CELL_FONT_SIZE"] ?? "18px"; +export const CELL_TEXT_COLOR = visualConfig["CELL_TEXT_COLOR"] ?? "#FFFFFF"; +export const CELL_TEXT_COLOR_INVERSE = visualConfig["CELL_TEXT_COLOR_INVERSE"] ?? "#000000"; +export const CELL_BG_COLOR = visualConfig["CELL_BG_COLOR"] ?? "#000000"; +export const CELL_BG_COLOR_ODD = visualConfig["CELL_BG_COLOR_ODD"] ?? "rgba(1, 1, 1, 0.9)"; +export const CELL_BG_COLOR2 = visualConfig["CELL_BG_COLOR2"] ?? "#1E1E1E"; +export const CELL_BG_COLOR_ODD2 = visualConfig["CELL_BG_COLOR_ODD2"] ?? "#242424"; + +export const CELL_PROBLEM_LINE_WIDTH = visualConfig["CELL_PROBLEM_LINE_WIDTH"] ?? "5px"; // css property +export const CELL_QUEUE_VERDICT_WIDTH = visualConfig["CELL_QUEUE_VERDICT_WIDTH"] ?? "80px"; // css property +export const CELL_QUEUE_VERDICT_WIDTH2 = visualConfig["CELL_QUEUE_VERDICT_WIDTH2"] ?? "20px"; // css property +export const CELL_QUEUE_RANK_WIDTH = visualConfig["CELL_QUEUE_RANK_WIDTH"] ?? "50px"; // css property +export const CELL_QUEUE_RANK_WIDTH2 = visualConfig["CELL_QUEUE_RANK_WIDTH2"] ?? "30px"; // css property +export const CELL_QUEUE_TOTAL_SCORE_WIDTH = visualConfig["CELL_QUEUE_TOTAL_SCORE_WIDTH"] ?? "50px"; // css property +export const CELL_QUEUE_TASK_WIDTH = visualConfig["CELL_QUEUE_TASK_WIDTH"] ?? "50px"; // css property + +export const CELL_NAME_LEFT_PADDING = visualConfig["CELL_NAME_LEFT_PADDING"] ?? "5px"; // css property +export const CELL_NAME_RIGHT_PADDING = visualConfig["CELL_NAME_RIGHT_PADDING"] ?? CELL_NAME_LEFT_PADDING; // css property + +export const TICKER_SMALL_SIZE = visualConfig["TICKER_SMALL_SIZE"] ?? "12%"; // css property export const TICKER_SMALL_BACKGROUND = VERDICT_NOK; -export const TICKER_BACKGROUND = CELL_BG_COLOR; -export const TICKER_OPACITY = 0.95; -export const TICKER_FONT_COLOR = "#FFFFFF"; -export const TICKER_FONT_FAMILY = "Helvetica, serif"; -export const TICKER_TEXT_FONT_SIZE = "32px"; // css property -export const TICKER_TEXT_MARGIN_LEFT = "16px"; // css property -export const TICKER_CLOCK_FONT_SIZE = "32px"; // css property -export const TICKER_CLOCK_MARGIN_LEFT = "10px"; // css property -export const TICKER_SCOREBOARD_RANK_WIDTH = "50px"; // css property -export const TICKER_LIVE_ICON_SIZE = "32px"; +export const TICKER_BACKGROUND = visualConfig["TICKER_BACKGROUND"] ?? CELL_BG_COLOR; +export const TICKER_OPACITY = visualConfig["TICKER_OPACITY"] ?? 0.95; +export const TICKER_FONT_COLOR = visualConfig["TICKER_FONT_COLOR"] ?? "#FFFFFF"; +export const TICKER_FONT_FAMILY = visualConfig["TICKER_FONT_FAMILY"] ?? "Helvetica, serif"; +export const TICKER_TEXT_FONT_SIZE = visualConfig["TICKER_TEXT_FONT_SIZE"] ?? "32px"; // css property +export const TICKER_TEXT_MARGIN_LEFT = visualConfig["TICKER_TEXT_MARGIN_LEFT"] ?? "16px"; // css property +export const TICKER_CLOCK_FONT_SIZE = visualConfig["TICKER_CLOCK_FONT_SIZE"] ?? "32px"; // css property +export const TICKER_CLOCK_MARGIN_LEFT = visualConfig["TICKER_CLOCK_MARGIN_LEFT"] ?? "10px"; // css property +export const TICKER_SCOREBOARD_RANK_WIDTH = visualConfig["TICKER_SCOREBOARD_RANK_WIDTH"] ?? "50px"; // css property +export const TICKER_LIVE_ICON_SIZE = visualConfig["TICKER_LIVE_ICON_SIZE"] ?? "32px"; -export const TEAMVIEW_SMALL_FACTOR = "50%"; // css property +export const TEAMVIEW_SMALL_FACTOR = visualConfig["TEAMVIEW_SMALL_FACTOR"] ?? "50%"; // css property -export const FULL_SCREEN_CLOCK_FONT_SIZE = "400px"; -export const FULL_SCREEN_CLOCK_COLOR = "#eeeeee"; -export const FULL_SCREEN_CLOCK_FONT_FAMILY = "Helvetica, monospace"; +export const FULL_SCREEN_CLOCK_FONT_SIZE = visualConfig["FULL_SCREEN_CLOCK_FONT_SIZE"] ?? "400px"; +export const FULL_SCREEN_CLOCK_COLOR = visualConfig["FULL_SCREEN_CLOCK_COLOR"] ?? "#eeeeee"; +export const FULL_SCREEN_CLOCK_FONT_FAMILY = visualConfig["FULL_SCREEN_CLOCK_FONT_FAMILY"] ?? "Helvetica, monospace"; -export const STAR_SIZE = 20; // px +export const STAR_SIZE = visualConfig["STAR_SIZE"] ?? 20; // px -export const QUEUE_PROBLEM_LABEL_FONT_SIZE = "14px"; +export const QUEUE_PROBLEM_LABEL_FONT_SIZE = visualConfig["QUEUE_PROBLEM_LABEL_FONT_SIZE"] ?? "14px"; // Medals -export const MEDAL_COLORS = Object.freeze({ +export const MEDAL_COLORS = visualConfig["MEDAL_COLORS"] ?? Object.freeze({ "gold": "#F9A80D", "silver": "#ACACAC", "bronze": "#E27B5A" }); // Debug Behaviour -export const LOG_LINES = 300; +export const LOG_LINES = visualConfig["LOG_LINES"] ?? 300; -export const GLOBAL_BACKGROUND_COLOR = "#242425"; +export const GLOBAL_BACKGROUND_COLOR = visualConfig["GLOBAL_BACKGROUND_COLOR"] ?? "#242425"; -export const SCOREBOARD_BACKGROUND_COLOR = GLOBAL_BACKGROUND_COLOR; +export const SCOREBOARD_BACKGROUND_COLOR = visualConfig["SCOREBOARD_BACKGROUND_COLOR"] ?? GLOBAL_BACKGROUND_COLOR; -export const CONTESTER_ROW_OPACITY = 0.95; -export const CONTESTER_BACKGROUND_COLOR = "#4C83C3"; +export const CONTESTER_ROW_OPACITY = visualConfig["CONTESTER_ROW_OPACITY"] ?? 0.95; +export const CONTESTER_BACKGROUND_COLOR = visualConfig["CONTESTER_BACKGROUND_COLOR"] ?? "#4C83C3"; -export const CONTESTER_ROW_BORDER_RADIUS = "16px"; -export const CONTESTER_ROW_HEIGHT = "25px"; -export const CONTESTER_NAME_WIDTH = "150px"; -export const CONTESTER_ROW_VERDICT_FONT_SIZE2 = "16px"; // css-property +export const CONTESTER_ROW_BORDER_RADIUS = visualConfig["CONTESTER_ROW_BORDER_RADIUS"] ?? "16px"; +export const CONTESTER_ROW_HEIGHT = visualConfig["CONTESTER_ROW_HEIGHT"] ?? "25px"; +export const CONTESTER_NAME_WIDTH = visualConfig["CONTESTER_NAME_WIDTH"] ?? "150px"; +export const CONTESTER_ROW_VERDICT_FONT_SIZE2 = visualConfig["CONTESTER_ROW_VERDICT_FONT_SIZE2"] ?? "16px"; // css-property -export const QUEUE_PER_COLUMNS_PADDING2 = "5px"; // css property -export const QUEUE_VERDICT_PADDING_LEFT2 = "6px"; // css property -export const CIRCLE_PROBLEM_SIZE = "28px"; -export const GLOBAL_BORDER_RADIUS = "16px"; -export const CIRCLE_PROBLEM_LINE_WIDTH = "3.5px"; +export const QUEUE_PER_COLUMNS_PADDING2 = visualConfig["QUEUE_PER_COLUMNS_PADDING2"] ?? "5px"; // css property +export const QUEUE_VERDICT_PADDING_LEFT2 = visualConfig["QUEUE_VERDICT_PADDING_LEFT2"] ?? "6px"; // css property +export const CIRCLE_PROBLEM_SIZE = visualConfig["CIRCLE_PROBLEM_SIZE"] ?? "28px"; +export const GLOBAL_BORDER_RADIUS = visualConfig["GLOBAL_BORDER_RADIUS"] ?? "16px"; +export const CIRCLE_PROBLEM_LINE_WIDTH = visualConfig["CIRCLE_PROBLEM_LINE_WIDTH"] ?? "3.5px"; -export const CELL_INFO_VERDICT_WIDTH = "100px"; // css property +export const CELL_INFO_VERDICT_WIDTH = visualConfig["CELL_INFO_VERDICT_WIDTH"] ?? "100px"; // css property // layers (z-indexes) -export const QUEUE_BASIC_ZINDEX = 20; +export const QUEUE_BASIC_ZINDEX = visualConfig["QUEUE_BASIC_ZINDEX"] ?? 20; diff --git a/src/frontend/overlay/vite.config.js b/src/frontend/overlay/vite.config.js index cb148c000..98ba9e459 100644 --- a/src/frontend/overlay/vite.config.js +++ b/src/frontend/overlay/vite.config.js @@ -1,9 +1,18 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +import topLevelAwait from "vite-plugin-top-level-await"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + topLevelAwait({ + // The export name of top-level await promise for each chunk module + promiseExportName: "__tla", + // The function to generate import names of top-level await promise in each chunk module + promiseImportName: i => `__tla_${i}` + }) + ], base: process.env.PUBLIC_URL ?? "/", build: { outDir: process.env.BUILD_PATH ?? "dist", diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index dd650d97b..4680afdbb 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -4477,6 +4477,22 @@ "rollup": "^1.20.0 || ^2.0.0" } }, + "node_modules/@rollup/plugin-virtual": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-virtual/-/plugin-virtual-3.0.1.tgz", + "integrity": "sha512-fK8O0IL5+q+GrsMLuACVNk2x21g3yaw+sG2qn16SnUd3IlBsQyvWxLMGHmCmXRMecPjGRSZ/1LmZB4rjQm68og==", + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -4755,6 +4771,203 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/core": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.88.tgz", + "integrity": "sha512-kaJ5t6Fg/DmJPNeI+jdtCEt7NVKxhUYToq7PF2fMRPFPLKSJzJCZajcp6/gZNcEUCVWaK6pWi/XL79Tzz1FqzQ==", + "hasInstallScript": true, + "dependencies": { + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.88", + "@swc/core-darwin-x64": "1.3.88", + "@swc/core-linux-arm-gnueabihf": "1.3.88", + "@swc/core-linux-arm64-gnu": "1.3.88", + "@swc/core-linux-arm64-musl": "1.3.88", + "@swc/core-linux-x64-gnu": "1.3.88", + "@swc/core-linux-x64-musl": "1.3.88", + "@swc/core-win32-arm64-msvc": "1.3.88", + "@swc/core-win32-ia32-msvc": "1.3.88", + "@swc/core-win32-x64-msvc": "1.3.88" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.88.tgz", + "integrity": "sha512-Nb7kKydSQK3FE90pw/GPRFmAkquDQcTixLijNcki2xFBXh/DcGdFUPE/GShQjk8gtQelj2vqZrsGs/GZPGA1mA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.88.tgz", + "integrity": "sha512-RcCrnjkmLXL1izSHPYLaJKVaxwd64LYiYLqjX2jXG4U50D6LOlmuLeqTJ8aAnENZP19gNpsY9ggY9jD5UQqHAw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.88.tgz", + "integrity": "sha512-/H7QhpgbWX4xe6jbkgPrhjY543oCCmbPRvBMvZ3iuLb81bEtOFiEp9LYe/95ZW/BTz2z9a6fQtQMqkhAjcrV5w==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.88.tgz", + "integrity": "sha512-ar/oQJxisjn/Su9rsg+XcBqA54Ylh1SyrZiLslv37OnGr785Xw+C//rw+JGoFmCZSjhGAU5hriOiHJd2S8mtqA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.88.tgz", + "integrity": "sha512-ZyUtCk1Y4GpOajbHcnm2JwkFm/m8M/wP3I8iaAm/0yAPIYwQInVdD0Hn++eig2Y+nLJ7gT0QI82fFUDPEIP6Jw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.88.tgz", + "integrity": "sha512-VrwGCzKLwimL0Js1yWRQNpcJCLGYkETku9mEI9sM4yF6kzT/jwfOe94udBe9O4GGUv24QkzHXRk+EnGR2LFSOQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.88.tgz", + "integrity": "sha512-cur5h0JmNfF4ZHb+FBPLePX86lu3FUjxltObWUhqO4QiXzHxWfde6g+pgdqfUAer0cd9VEEjEKGA5OQncXqyCQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.88.tgz", + "integrity": "sha512-f9OVuWrey7X0gjCZlVD4d5/9/d0yyxu8KFUOEjyjJ2Kd+pvzRys1U3E0FE1PiiDOng3qrfdOt4HQxyAy2jts9Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.88.tgz", + "integrity": "sha512-7KCeTVe8wWRbuiuAwXoHKBkr9nugCAHQe/JGxoevHXxn2h+WwBuWHog1AbS6PvRWSKK8dVhKAAPDNWwdEltA5A==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.88.tgz", + "integrity": "sha512-x0wr9kCS2Hmpx7H6gvJHA17G0DnvwToqWDSO1VmePt5hQZZfLzxiHHDHKFv4YYsVPbAU283q4Wa39QSPZeJbTA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.1.tgz", + "integrity": "sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw==" + }, + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==" + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -19891,6 +20104,31 @@ } } }, + "node_modules/vite-plugin-top-level-await": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/vite-plugin-top-level-await/-/vite-plugin-top-level-await-1.3.1.tgz", + "integrity": "sha512-55M1h4NAwkrpxPNOJIBzKZFihqLUzIgnElLSmPNPMR2Fn9+JHKaNg3sVX1Fq+VgvuBksQYxiD3OnwQAUu7kaPQ==", + "dependencies": { + "@rollup/plugin-virtual": "^3.0.1", + "@swc/core": "^1.3.10", + "uuid": "^9.0.0" + }, + "peerDependencies": { + "vite": ">=2.8" + } + }, + "node_modules/vite-plugin-top-level-await/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/vite/node_modules/rollup": { "version": "3.26.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.2.tgz", @@ -20901,6 +21139,7 @@ "stylelint-no-unsupported-browser-features": "^5.0.3", "stylelint-processor-styled-components": "^1.10.0", "vite": "^4.4.3", + "vite-plugin-top-level-await": "^1.3.1", "web-vitals": "^1.1.2" } } @@ -23802,6 +24041,12 @@ "magic-string": "^0.25.7" } }, + "@rollup/plugin-virtual": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-virtual/-/plugin-virtual-3.0.1.tgz", + "integrity": "sha512-fK8O0IL5+q+GrsMLuACVNk2x21g3yaw+sG2qn16SnUd3IlBsQyvWxLMGHmCmXRMecPjGRSZ/1LmZB4rjQm68og==", + "requires": {} + }, "@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -23973,6 +24218,95 @@ "loader-utils": "^2.0.0" } }, + "@swc/core": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.88.tgz", + "integrity": "sha512-kaJ5t6Fg/DmJPNeI+jdtCEt7NVKxhUYToq7PF2fMRPFPLKSJzJCZajcp6/gZNcEUCVWaK6pWi/XL79Tzz1FqzQ==", + "requires": { + "@swc/core-darwin-arm64": "1.3.88", + "@swc/core-darwin-x64": "1.3.88", + "@swc/core-linux-arm-gnueabihf": "1.3.88", + "@swc/core-linux-arm64-gnu": "1.3.88", + "@swc/core-linux-arm64-musl": "1.3.88", + "@swc/core-linux-x64-gnu": "1.3.88", + "@swc/core-linux-x64-musl": "1.3.88", + "@swc/core-win32-arm64-msvc": "1.3.88", + "@swc/core-win32-ia32-msvc": "1.3.88", + "@swc/core-win32-x64-msvc": "1.3.88", + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + } + }, + "@swc/core-darwin-arm64": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.88.tgz", + "integrity": "sha512-Nb7kKydSQK3FE90pw/GPRFmAkquDQcTixLijNcki2xFBXh/DcGdFUPE/GShQjk8gtQelj2vqZrsGs/GZPGA1mA==", + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.88.tgz", + "integrity": "sha512-RcCrnjkmLXL1izSHPYLaJKVaxwd64LYiYLqjX2jXG4U50D6LOlmuLeqTJ8aAnENZP19gNpsY9ggY9jD5UQqHAw==", + "optional": true + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.88.tgz", + "integrity": "sha512-/H7QhpgbWX4xe6jbkgPrhjY543oCCmbPRvBMvZ3iuLb81bEtOFiEp9LYe/95ZW/BTz2z9a6fQtQMqkhAjcrV5w==", + "optional": true + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.88.tgz", + "integrity": "sha512-ar/oQJxisjn/Su9rsg+XcBqA54Ylh1SyrZiLslv37OnGr785Xw+C//rw+JGoFmCZSjhGAU5hriOiHJd2S8mtqA==", + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.88.tgz", + "integrity": "sha512-ZyUtCk1Y4GpOajbHcnm2JwkFm/m8M/wP3I8iaAm/0yAPIYwQInVdD0Hn++eig2Y+nLJ7gT0QI82fFUDPEIP6Jw==", + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.88.tgz", + "integrity": "sha512-VrwGCzKLwimL0Js1yWRQNpcJCLGYkETku9mEI9sM4yF6kzT/jwfOe94udBe9O4GGUv24QkzHXRk+EnGR2LFSOQ==", + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.88.tgz", + "integrity": "sha512-cur5h0JmNfF4ZHb+FBPLePX86lu3FUjxltObWUhqO4QiXzHxWfde6g+pgdqfUAer0cd9VEEjEKGA5OQncXqyCQ==", + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.88.tgz", + "integrity": "sha512-f9OVuWrey7X0gjCZlVD4d5/9/d0yyxu8KFUOEjyjJ2Kd+pvzRys1U3E0FE1PiiDOng3qrfdOt4HQxyAy2jts9Q==", + "optional": true + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.88.tgz", + "integrity": "sha512-7KCeTVe8wWRbuiuAwXoHKBkr9nugCAHQe/JGxoevHXxn2h+WwBuWHog1AbS6PvRWSKK8dVhKAAPDNWwdEltA5A==", + "optional": true + }, + "@swc/core-win32-x64-msvc": { + "version": "1.3.88", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.88.tgz", + "integrity": "sha512-x0wr9kCS2Hmpx7H6gvJHA17G0DnvwToqWDSO1VmePt5hQZZfLzxiHHDHKFv4YYsVPbAU283q4Wa39QSPZeJbTA==", + "optional": true + }, + "@swc/counter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.1.tgz", + "integrity": "sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw==" + }, + "@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==" + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -28198,6 +28532,7 @@ "stylelint-no-unsupported-browser-features": "^5.0.3", "stylelint-processor-styled-components": "^1.10.0", "vite": "^4.4.3", + "vite-plugin-top-level-await": "*", "web-vitals": "^1.1.2" } }, @@ -35056,6 +35391,23 @@ } } }, + "vite-plugin-top-level-await": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/vite-plugin-top-level-await/-/vite-plugin-top-level-await-1.3.1.tgz", + "integrity": "sha512-55M1h4NAwkrpxPNOJIBzKZFihqLUzIgnElLSmPNPMR2Fn9+JHKaNg3sVX1Fq+VgvuBksQYxiD3OnwQAUu7kaPQ==", + "requires": { + "@rollup/plugin-virtual": "^3.0.1", + "@swc/core": "^1.3.10", + "uuid": "^9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + } + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",