diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 1e5f266..16b6e90 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -7,8 +7,8 @@ namespace Core { using std::string; -ConfigManager::ConfigManager(Logger& logger, vector& parameters) : - _logger(logger), +ConfigManager::ConfigManager(vector& parameters) : + _logger(Logger::getInstance()), _parameters(parameters) { // move this to a function that can return an error code? diff --git a/src/core/EventBus.cpp b/src/core/EventBus.cpp index c8e784b..a6e10ea 100644 --- a/src/core/EventBus.cpp +++ b/src/core/EventBus.cpp @@ -5,8 +5,8 @@ namespace Core { // ============================== EventBus Class ============================== -EventBus::EventBus(Logger& logger) : - _logger(logger) +EventBus::EventBus() : + _logger(Logger::getInstance()) { _logger.debug.ln ("Starting Event Bus..."); //_thread = thread(&EventBus::run, this); diff --git a/src/core/Logger.cpp b/src/core/Logger.cpp index 1a4cbd5..92608d4 100644 --- a/src/core/Logger.cpp +++ b/src/core/Logger.cpp @@ -9,6 +9,12 @@ using std::cout; using std::cerr; using std::endl; +// Static method to get the single instance of the class +Logger& Logger::getInstance() { + static Logger instance; + return instance; +} + Logger::Logger(enum Level logLevel) : _logLevel(logLevel), debug(DEBUG, *this), @@ -28,6 +34,8 @@ Logger::Logger(enum Level logLevel) : } } +Logger::Logger() : Logger(Level::FATAL) {} + Logger::~Logger() { _output->close(); delete _output; diff --git a/src/core/include/ConfigManager.hpp b/src/core/include/ConfigManager.hpp index eaff010..080c0f2 100644 --- a/src/core/include/ConfigManager.hpp +++ b/src/core/include/ConfigManager.hpp @@ -13,7 +13,7 @@ using std::string; class ConfigManager { public: - ConfigManager(Logger& logger, vector& parameters); + ConfigManager(vector& parameters); private: Logger& _logger; diff --git a/src/core/include/EventBus.hpp b/src/core/include/EventBus.hpp index da3d8ea..2942eaf 100644 --- a/src/core/include/EventBus.hpp +++ b/src/core/include/EventBus.hpp @@ -37,7 +37,7 @@ class Event { class EventBus { public: - EventBus(Logger& logger); + EventBus(); ~EventBus(); Event& registerEvent(const string& eventID); void run(); diff --git a/src/core/include/Logger.hpp b/src/core/include/Logger.hpp index 84eab39..4f96908 100644 --- a/src/core/include/Logger.hpp +++ b/src/core/include/Logger.hpp @@ -28,8 +28,12 @@ using std::mutex; class Logger { public: enum Level { DEBUG, INFO, WARN, FATAL }; - Logger(Level logLevel); - ~Logger(); + // Static method to get the single instance of the class + static Logger& getInstance(); + // Delete copy constructor and assignment operator to prevent copying + Logger(const Logger&) = delete; + Logger& operator=(const Logger&) = delete; + void setLogLevel(Level level); void log(Level lvl, const char* msg); void log(Level lvl, const string& msg); @@ -58,6 +62,9 @@ class Logger { Sink debug, info, warn, fatal; private: + Logger(Level logLevel); + Logger(); + ~Logger(); enum Level _logLevel; ofstream* _output; mutex _mutex; diff --git a/src/core/main.cpp b/src/core/main.cpp index 1ecdc18..2f51354 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -13,41 +13,28 @@ using std::vector; using std::string; void signalHandler( int ); -void shutdown(); - -// Provide global hooks for signal handler -Logger* globalLogger; -ConfigManager* globalConfigManager; -EventBus* globalEventBus; -UI::Server* globalUIServer; -Resolver::Server* globalResolver; int main(int args, char **argv) { - Logger logger(Logger::DEBUG); - - logger.info.ln ("Starting Plains..."); - - vector arguments; - for ( unsigned index = 0; index < args; ++index ) { - arguments.push_back (argv[index]); - } + Logger& logger = Logger::getInstance(); + logger.setLogLevel(Logger::Level::DEBUG); // Handle signals - signal(SIGINT, signalHandler); + signal(SIGINT, signalHandler); try { - ConfigManager configManager(logger, arguments); - EventBus eventBus(logger); - UI::Server uIServer(logger, eventBus); - Resolver::Server resolver(logger, eventBus); + logger.info.ln ("Starting Plains..."); - // Pass objects to global scope for signal handler - globalLogger = &logger; - globalConfigManager = &configManager; - globalEventBus = &eventBus; - globalUIServer = &uIServer; - globalResolver = &resolver; + vector arguments; + for ( unsigned index = 0; index < args; ++index ) { + arguments.push_back (argv[index]); + } + + EventBus eventBus; + ConfigManager configManager(arguments); + + UI::Server uIServer(eventBus); + Resolver::Server resolver(eventBus); /* // Some test code below: @@ -76,21 +63,21 @@ int main(int args, char **argv) { logger.info.ln ("Plains successfully started."); //shutdown(); - eventBus.run(); + //eventBus.run(); } catch (Exception& e) { logger.fatal << "Uncaught Exception: " << e.what() << Logger::commit; - shutdown(); + //shutdown(); return 1; } catch (std::system_error& e) { logger.fatal << "Uncaught system_error exception: " << e.what() << Logger::commit; - shutdown(); + //shutdown(); return 1; } catch (int e) { logger.fatal << "Uncaught Exception with error code " << e << Logger::commit; - shutdown(); + //shutdown(); return 1; } return 0; @@ -102,20 +89,21 @@ void signalHandler( int signalNumber ) { static auto firstCall = true; if(firstCall) { firstCall = false; - shutdown(); + //shutdown(); exit(0); } - else exit(1); + else exit(1); break; } } - +/* void shutdown() { - globalLogger->info << "Shutting down Plains..." << Logger::commit; + Logger::getInstance().info << "Shutting down Plains..." << Logger::commit; globalResolver->~Server(); globalUIServer->~Server(); globalEventBus->~EventBus(); globalConfigManager->~ConfigManager(); - globalLogger->info.ln ("Plains shut down."); - globalLogger->~Logger(); + Logger::getInstance().info.ln ("Plains shut down."); + //globalLogger->~Logger(); } +*/ diff --git a/src/resolver/Server.cpp b/src/resolver/Server.cpp index 36dcab3..5ec300b 100644 --- a/src/resolver/Server.cpp +++ b/src/resolver/Server.cpp @@ -22,8 +22,8 @@ namespace Resolver { //using asio::ip::udp; //using asio::ip::tcp; -Server::Server(Logger& logger, EventBus& eventBus) - : _logger(logger), +Server::Server(EventBus& eventBus) + : _logger(Logger::getInstance()), _eventBus(eventBus) { _logger.debug.ln ("Starting Resolver..."); diff --git a/src/resolver/include/Server.hpp b/src/resolver/include/Server.hpp index e0cc7c6..da54b8f 100644 --- a/src/resolver/include/Server.hpp +++ b/src/resolver/include/Server.hpp @@ -14,14 +14,14 @@ using Core::Logger; using Core::Exception; using std::thread; -#define PORT 5353 +#define PORT 5355 class Server { public: - Server(Logger& logger, EventBus& eventBus); + Server(EventBus& eventBus); ~Server(); private: diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index bd62c9d..077f2b6 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -2,5 +2,6 @@ add_library(UI OBJECT Server.cpp) target_include_directories(UI PUBLIC include) +target_include_directories(UI PRIVATE files) target_link_libraries(UI PRIVATE Core DNS PUBLIC Asio HTTPLib) diff --git a/src/ui/Server.cpp b/src/ui/Server.cpp index 8bf4dff..6876b4a 100644 --- a/src/ui/Server.cpp +++ b/src/ui/Server.cpp @@ -1,26 +1,30 @@ #include "Server.hpp" +#include "index.htm.h" +#include "style.css.h" namespace Plains { namespace UI { using asio::ip::tcp; -Server::Server(Logger& logger, EventBus& eventBus) - : _logger(logger), +Server::Server(EventBus& eventBus) + : _logger(Logger::getInstance()), _eventBus(eventBus) { _logger.debug.ln ("Starting UI Webserver..."); _server = new httplib::Server; - //Set static file directory - auto ret = _server->set_mount_point("/", "./static/ui"); - if (!ret) { - _logger.fatal.ln ("UI static file directory static/ui not found!"); - } - //Redirecto / to index.htm _server->Get("/", [this](const auto& req, auto& res) { res.set_redirect("/index.htm"); }); + + _server->Get("/index.htm", [this](const httplib::Request& req, httplib::Response& res) { + res.set_content((const char*)index_htm, "text/html"); + }); + + _server->Get("/style.css", [this](const httplib::Request& req, httplib::Response& res) { + res.set_content((const char*)style_css, "text/css"); + }); _server->set_logger([this](const auto& req, const auto& res) { //your_logger(req, res); diff --git a/src/ui/files/index.htm.h b/src/ui/files/index.htm.h new file mode 100644 index 0000000..6dbfed1 --- /dev/null +++ b/src/ui/files/index.htm.h @@ -0,0 +1,204 @@ +const unsigned char index_htm[] = { + 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, + 0x6d, 0x6c, 0x3e, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x20, + 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x50, 0x6c, 0x61, 0x69, 0x6e, + 0x73, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x50, 0x61, + 0x6e, 0x65, 0x6c, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, + 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2d, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x2c, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x2d, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x3d, 0x31, 0x2e, 0x30, + 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, + 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, + 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, + 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x63, 0x73, + 0x73, 0x22, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3d, 0x22, 0x61, 0x6c, + 0x6c, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x68, 0x65, + 0x61, 0x64, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6e, 0x61, 0x76, 0x5f, 0x74, 0x6f, + 0x70, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x75, + 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, + 0x3c, 0x70, 0x3e, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x3c, + 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, + 0x3e, 0x3c, 0x70, 0x3e, 0x4c, 0x6f, 0x67, 0x73, 0x3c, 0x2f, 0x70, 0x3e, + 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x70, 0x3e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3c, 0x2f, 0x70, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, + 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x6c, 0x69, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, + 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x70, 0x3e, 0x5a, 0x6f, 0x6e, 0x65, 0x3c, 0x2f, 0x70, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, + 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x4e, 0x65, 0x77, + 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, + 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, + 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, + 0x48, 0x43, 0x50, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, + 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, + 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x70, 0x3e, + 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, + 0x3c, 0x70, 0x3e, 0x41, 0x50, 0x49, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x52, 0x75, 0x6e, + 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, + 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x70, 0x3e, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x3c, 0x2f, 0x70, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, + 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, + 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x3d, 0x22, + 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x50, 0x6c, 0x41, + 0x49, 0x4e, 0x53, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, 0x3e, 0x41, + 0x62, 0x6f, 0x75, 0x74, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, + 0x69, 0x3e, 0x3c, 0x61, 0x3e, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x3e, 0x3c, 0x61, + 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x3c, + 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x2f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x50, 0x6c, + 0x61, 0x69, 0x6e, 0x73, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x20, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, + 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, + 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, + 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, + 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, 0x3e, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, 0x72, + 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x62, + 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, + 0x62, 0x72, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, + 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x73, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x73, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, + 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x73, 0x20, + 0x76, 0x30, 0x2e, 0x30, 0x34, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x3c, 0x2f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3e, + 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, + 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a +}; +unsigned int index_htm_len = 2407; diff --git a/src/ui/files/style.css.h b/src/ui/files/style.css.h new file mode 100644 index 0000000..2f6bebd --- /dev/null +++ b/src/ui/files/style.css.h @@ -0,0 +1,292 @@ +const unsigned char style_css[] = { + 0x23, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x2a, 0x20, 0x7b, + 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x78, 0x2d, 0x73, 0x69, 0x7a, 0x69, 0x6e, + 0x67, 0x3a, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x62, 0x6f, + 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, + 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x3a, 0x20, 0x35, 0x30, 0x70, 0x78, 0x20, 0x30, 0x20, 0x30, 0x20, 0x31, + 0x30, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, + 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x62, 0x61, + 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x3a, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x2d, 0x67, + 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x28, 0x39, 0x30, 0x64, 0x65, + 0x67, 0x2c, 0x20, 0x23, 0x32, 0x30, 0x32, 0x30, 0x32, 0x30, 0x2c, 0x20, + 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, + 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, + 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2a, 0x63, 0x6f, 0x6c, 0x6f, 0x72, + 0x3a, 0x20, 0x23, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3b, 0x2a, 0x2f, + 0x0a, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x65, + 0x65, 0x65, 0x65, 0x65, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, + 0x74, 0x2d, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x3a, 0x20, 0x54, 0x61, + 0x68, 0x6f, 0x6d, 0x61, 0x2c, 0x20, 0x56, 0x65, 0x72, 0x64, 0x61, 0x6e, + 0x61, 0x2c, 0x20, 0x41, 0x72, 0x69, 0x61, 0x6c, 0x2c, 0x20, 0x73, 0x61, + 0x6e, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x69, 0x66, 0x3b, 0x0a, 0x20, 0x20, + 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x20, 0x31, + 0x36, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x69, 0x6e, 0x2d, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x38, 0x30, 0x30, 0x70, 0x78, 0x3b, + 0x0a, 0x7d, 0x0a, 0x0a, 0x70, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x77, 0x6f, + 0x72, 0x64, 0x2d, 0x77, 0x72, 0x61, 0x70, 0x3a, 0x20, 0x62, 0x72, 0x65, + 0x61, 0x6b, 0x2d, 0x77, 0x6f, 0x72, 0x64, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, + 0x23, 0x70, 0x61, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, + 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, + 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x31, 0x35, 0x70, 0x78, + 0x20, 0x33, 0x30, 0x70, 0x78, 0x20, 0x33, 0x30, 0x70, 0x78, 0x20, 0x33, + 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x30, 0x3b, + 0x20, 0x2f, 0x2a, 0x54, 0x68, 0x69, 0x73, 0x20, 0x68, 0x61, 0x73, 0x20, + 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x68, 0x69, 0x67, + 0x68, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, + 0x6f, 0x70, 0x20, 0x73, 0x6f, 0x20, 0x6e, 0x61, 0x76, 0x2d, 0x74, 0x6f, + 0x70, 0x20, 0x64, 0x6f, 0x73, 0x65, 0x73, 0x6e, 0x74, 0x20, 0x6f, 0x76, + 0x65, 0x72, 0x6c, 0x61, 0x70, 0x20, 0x61, 0x73, 0x20, 0x69, 0x74, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x73, 0x61, 0x6d, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x2f, 0x0a, + 0x20, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x30, 0x3b, 0x0a, + 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x31, 0x30, + 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, + 0x23, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x6f, + 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x20, 0x68, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, + 0x5f, 0x74, 0x6f, 0x70, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, + 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x61, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, + 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x65, + 0x66, 0x74, 0x3a, 0x20, 0x31, 0x30, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, + 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3a, 0x20, 0x35, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, + 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, + 0x2d, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x28, 0x39, 0x30, + 0x64, 0x65, 0x67, 0x2c, 0x20, 0x23, 0x32, 0x30, 0x32, 0x30, 0x32, 0x30, + 0x2c, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x3b, 0x0a, + 0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x32, 0x30, 0x32, + 0x30, 0x32, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x3a, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x3b, 0x0a, 0x20, + 0x20, 0x7a, 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x20, 0x31, 0x3b, + 0x0a, 0x20, 0x20, 0x6d, 0x69, 0x6e, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3a, 0x20, 0x36, 0x30, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, + 0x3a, 0x20, 0x31, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x20, + 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, + 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, 0x6f, 0x70, 0x20, 0x75, 0x6c, 0x20, + 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x3b, 0x0a, + 0x20, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x66, + 0x6c, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x2d, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x72, + 0x6f, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x2d, 0x77, + 0x72, 0x61, 0x70, 0x3a, 0x20, 0x6e, 0x6f, 0x77, 0x72, 0x61, 0x70, 0x3b, + 0x0a, 0x20, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x79, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x2d, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, + 0x6f, 0x70, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x7b, 0x0a, 0x20, + 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, + 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, + 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, + 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x74, + 0x65, 0x78, 0x74, 0x2d, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2d, 0x74, + 0x79, 0x70, 0x65, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, + 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, + 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, + 0x20, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x66, + 0x6c, 0x65, 0x78, 0x3a, 0x20, 0x32, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, + 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x20, 0x62, 0x6f, 0x6c, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3b, + 0x0a, 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x2d, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, + 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, + 0x20, 0x31, 0x32, 0x30, 0x25, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, + 0x61, 0x76, 0x5f, 0x74, 0x6f, 0x70, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, + 0x3a, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x33, 0x30, 0x33, 0x30, 0x33, 0x30, + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, 0x6f, + 0x70, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x70, 0x20, 0x7b, 0x0a, + 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, + 0x0a, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, + 0x30, 0x20, 0x32, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, + 0x2a, 0x20, 0x53, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x2a, + 0x2f, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, 0x6f, 0x70, 0x20, 0x75, + 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x75, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, + 0x65, 0x3b, 0x20, 0x2f, 0x2a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, + 0x74, 0x6f, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x20, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x20, 0x64, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2a, + 0x2f, 0x0a, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x3a, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x31, 0x30, 0x30, 0x25, 0x3b, + 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x66, + 0x69, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3b, 0x0a, + 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x2d, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x2d, 0x77, 0x72, 0x61, + 0x70, 0x3a, 0x20, 0x6e, 0x6f, 0x77, 0x72, 0x61, 0x70, 0x3b, 0x0a, 0x20, + 0x20, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x79, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x0a, + 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x2d, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, + 0x2f, 0x2a, 0x70, 0x6f, 0x70, 0x75, 0x70, 0x20, 0x73, 0x75, 0x62, 0x2d, + 0x6d, 0x65, 0x6e, 0x75, 0x2a, 0x2f, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, + 0x74, 0x6f, 0x70, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x3a, 0x68, 0x6f, + 0x76, 0x65, 0x72, 0x20, 0x3e, 0x20, 0x75, 0x6c, 0x20, 0x7b, 0x0a, 0x20, + 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x69, 0x6e, + 0x68, 0x65, 0x72, 0x69, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, + 0x61, 0x76, 0x5f, 0x74, 0x6f, 0x70, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, + 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, + 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, + 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x31, 0x35, 0x70, + 0x78, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3a, 0x20, 0x31, 0x30, 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3b, + 0x0a, 0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x33, 0x30, + 0x33, 0x30, 0x33, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x64, + 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x6e, + 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2d, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, + 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, + 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x74, + 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, + 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3a, 0x20, + 0x32, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, + 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x62, 0x6f, 0x6c, + 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x3a, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x61, 0x6c, + 0x69, 0x67, 0x6e, 0x2d, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x20, 0x63, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, + 0x74, 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x20, 0x38, 0x30, 0x25, 0x3b, + 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x74, 0x6f, 0x70, + 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, + 0x3a, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x62, + 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x34, 0x30, 0x34, 0x30, 0x34, 0x30, + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, + 0x66, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, + 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a, + 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, + 0x20, 0x31, 0x30, 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x3a, 0x20, 0x31, 0x30, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, + 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, + 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, + 0x3a, 0x20, 0x23, 0x32, 0x30, 0x32, 0x30, 0x32, 0x30, 0x3b, 0x0a, 0x20, + 0x20, 0x7a, 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x20, 0x31, 0x3b, + 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x3a, 0x20, 0x31, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, + 0x69, 0x64, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, + 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, 0x74, + 0x20, 0x75, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, + 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x6c, + 0x65, 0x66, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x3a, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20, + 0x66, 0x6c, 0x65, 0x78, 0x2d, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x3b, 0x0a, + 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x2d, 0x77, 0x72, 0x61, 0x70, 0x3a, + 0x20, 0x6e, 0x6f, 0x77, 0x72, 0x61, 0x70, 0x3b, 0x0a, 0x20, 0x20, 0x6a, + 0x75, 0x73, 0x74, 0x69, 0x66, 0x79, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, + 0x20, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x69, 0x6e, 0x68, + 0x65, 0x72, 0x69, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, + 0x6e, 0x2d, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x20, 0x63, 0x65, 0x6e, + 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x74, 0x74, 0x6f, + 0x6d, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x3b, + 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, + 0x74, 0x20, 0x75, 0x6c, 0x20, 0x6c, 0x69, 0x20, 0x7b, 0x0a, 0x20, 0x20, + 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, + 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x31, 0x35, + 0x70, 0x78, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3a, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x3b, + 0x0a, 0x20, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x31, 0x30, + 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x64, + 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x6e, + 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2d, + 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, + 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, + 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x65, 0x78, 0x3a, 0x20, + 0x32, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, + 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x62, 0x6f, 0x6c, + 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, + 0x7a, 0x65, 0x3a, 0x20, 0x31, 0x30, 0x30, 0x25, 0x3b, 0x0a, 0x7d, 0x0a, + 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x68, + 0x31, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, + 0x3a, 0x20, 0x31, 0x32, 0x70, 0x78, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, + 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, + 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, + 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, + 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x6d, 0x6f, 0x64, 0x65, + 0x3a, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x2d, 0x6c, + 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x73, 0x69, + 0x7a, 0x65, 0x3a, 0x20, 0x35, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, + 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x2d, 0x73, 0x70, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x3a, 0x20, 0x33, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, + 0x0a, 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x61, + 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, + 0x20, 0x31, 0x30, 0x70, 0x78, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x70, + 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, + 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, + 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, + 0x23, 0x6e, 0x61, 0x76, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x75, 0x6c, + 0x20, 0x6c, 0x69, 0x3a, 0x68, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x7b, 0x0a, + 0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x2d, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x33, 0x30, 0x33, + 0x30, 0x33, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x66, 0x6f, 0x6f, + 0x74, 0x65, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, + 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x3a, 0x20, 0x35, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, + 0x20, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x79, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3b, 0x0a, + 0x20, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x66, + 0x6c, 0x65, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, + 0x2d, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x3a, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x30, + 0x3b, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3a, 0x20, + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2a, 0x62, 0x61, 0x63, 0x6b, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3a, + 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x2d, 0x67, 0x72, 0x61, 0x64, + 0x69, 0x65, 0x6e, 0x74, 0x28, 0x39, 0x30, 0x64, 0x65, 0x67, 0x2c, 0x20, + 0x23, 0x32, 0x30, 0x32, 0x30, 0x32, 0x30, 0x2c, 0x20, 0x23, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x29, 0x3b, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x2f, + 0x2a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, + 0x72, 0x2d, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x28, 0x39, + 0x30, 0x64, 0x65, 0x67, 0x2c, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x2c, 0x20, 0x23, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0x2c, 0x20, + 0x23, 0x36, 0x30, 0x30, 0x30, 0x42, 0x30, 0x2c, 0x20, 0x23, 0x30, 0x30, + 0x30, 0x30, 0x33, 0x30, 0x29, 0x3b, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x31, + 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x20, 0x23, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x66, 0x6f, + 0x6f, 0x74, 0x65, 0x72, 0x20, 0x70, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, + 0x6f, 0x6e, 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, + 0x62, 0x6f, 0x6c, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, + 0x2d, 0x73, 0x69, 0x7a, 0x65, 0x3a, 0x20, 0x31, 0x33, 0x30, 0x25, 0x3b, + 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x32, + 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x7d, 0x0a +}; +unsigned int style_css_len = 3463; diff --git a/src/ui/include/Server.hpp b/src/ui/include/Server.hpp index b3de38c..15dacd9 100644 --- a/src/ui/include/Server.hpp +++ b/src/ui/include/Server.hpp @@ -26,7 +26,7 @@ class Server void run(); public: - Server(Logger& logger, EventBus& eventBus); + Server(EventBus& eventBus); ~Server(); }; diff --git a/static/ui/index.htm b/static/ui/index.htm deleted file mode 100644 index ef4ffd8..0000000 --- a/static/ui/index.htm +++ /dev/null @@ -1,126 +0,0 @@ - - - - Plains Control Panel - - - - - - -
-

Plains Control Panel

-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
- - - diff --git a/static/ui/style.css b/static/ui/style.css deleted file mode 100644 index 2314f27..0000000 --- a/static/ui/style.css +++ /dev/null @@ -1,200 +0,0 @@ -#wrapper * { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -body { - margin: 50px 0 0 100px; - padding: 0; - background-image: linear-gradient(90deg, #202020, #000000); - background-color: #000000; - /*color: #EEEEEE;*/ - color: #eeeeee; - font-family: Tahoma, Verdana, Arial, sans-serif; - font-size: 16px; - min-width: 800px; -} - -p { - word-wrap: break-word; -} - -#page { - margin: 0; - padding: 15px 30px 30px 30px; - position: relative; - top: 0; /*This has to match hight of #nav_top so nav-top dosesnt overlap as its not in the same flow*/ - right: 0; - height: 100%; - background-color: #101010; - overflow: hidden; -} - -#nav_top { - margin: 0; - padding: 0; - top: 0; - right: 0; - left: 100px; - position: fixed; - height: 50px; - background-image: linear-gradient(90deg, #202020, #000000); - background-color: #202020; - display: block; - z-index: 1; - min-width: 600px; - border-bottom: 1px solid #000000; -} - -#nav_top ul { - margin: 0; - padding: 0; - height: inherit; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - justify-content: center; - align-items: center; -} - -#nav_top ul li { - margin: 0; - padding: 0; - height: inherit; - text-decoration: none; - list-style-type: none; - text-align: left; - vertical-align: middle; - flex: 20px; - font-weight: bold; - display: flex; - align-items: center; - font-size: 120%; -} - -#nav_top ul li:hover { - background-color: #303030; -} - -#nav_top ul li p { - margin: 0; - padding: 0 20px; -} - -/* Sub-menu */ -#nav_top ul li ul { - display: none; /*change to none after debugging*/ - position: absolute; - top: 100%; - height: fit-content; - flex-direction: column; - flex-wrap: nowrap; - justify-content: left; - align-items: left; -} - -/*popup sub-menu*/ -#nav_top ul li:hover > ul { - display: inherit; -} - -#nav_top ul li ul li { - margin: 0; - padding: 15px 0; - width: 100%; - display: flex; - background-color: #303030; - position: relative; - text-decoration: none; - list-style-type: none; - text-align: left; - vertical-align: middle; - flex: 20px; - font-weight: bold; - display: flex; - align-items: center; - font-size: 80%; -} - -#nav_top ul li ul li:hover { - background-color: #404040; -} - -#nav_left { - margin: 0; - top: 0; - left: 0; - height: 100%; - width: 100px; - position: fixed; - background-color: #202020; - z-index: 1; - border-right: 1px solid #000000; -} - -#nav_left ul { - margin: 0; - padding: 0; - text-align: left; - display: flex; - flex-direction: column; - flex-wrap: nowrap; - justify-content: center; - width: inherit; - align-items: center; - bottom: 0; - position: fixed; -} - -#nav_left ul li { - margin: 0; - padding: 15px 0; - height: inherit; - width: 100%; - text-decoration: none; - list-style-type: none; - text-align: center; - flex: 20px; - font-weight: bold; - font-size: 100%; -} - -#nav_left h1 { - margin: 12px 0; - padding: 0; - text-align: center; - writing-mode: vertical-lr; - font-size: 50px; - letter-spacing: 30px; -} - -#nav_left a { - margin: 10px 0; - padding: 0; - text-align: center; -} - -#nav_left ul li:hover { - background-color: #303030; -} - -#footer { - margin: 0; - height: 50px; - justify-content: left; - display: flex; - align-items: center; - position: relative; - right: 0; - bottom: 0; - /*background-image: linear-gradient(90deg, #202020, #000000);*/ - /*background-image: linear-gradient(90deg, #000000, #000030, #6000B0, #000030);*/ - border-top: 1px solid #000000; -} - -#footer p { - font-weight: bold; - font-size: 130%; - margin: 20px; -}