-- -- Astra: Web Interface -- https://cesbo.com/astra/ -- -- Copyright (C) 2020, Andrey Dyldin -- log.info("Load UI bundle") astra_storage["/"] = [==[ Astra Control Panel ]==] astra_storage["/app.js"] = base64.decode([==[ LyoKICogQXN0cmE6IFdlYiBJbnRlcmZhY2UKICogaHR0cHM6Ly9jZXNiby5jb20vYXN0cmEvCiAqCiAqIENvcHlyaWdodCAoQykgMjAyMCwgQW5kcmV5IER5bGRpbiA8YW5kQGNlc2JvLmNvbT4KICovCgooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7d2luZG93LiQ9ZnVuY3Rpb24oeCl7aWYodHlwZW9mIHg9PT0ic3RyaW5nIil7cmV0dXJuIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoeCl9ZWxzZSBpZih0eXBlb2YgeD09PSJmdW5jdGlvbiIpe2RvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoIkRPTUNvbnRlbnRMb2FkZWQiLChmdW5jdGlvbiB3KCl7ZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcigiRE9NQ29udGVudExvYWRlZCIsdyxmYWxzZSk7eCgpfSkpfX07U3RyaW5nLnByb3RvdHlwZS50b1VwcGVyQ2FzZUZpcnN0PWZ1bmN0aW9uKCl7cmV0dXJuIHRoaXMuY2hhckF0KDApLnRvVXBwZXJDYXNlKCkrdGhpcy5zbGljZSgxKX07aWYoIVN0cmluZy5wcm90b3R5cGUuZm9ybWF0KVN0cmluZy5wcm90b3R5cGUuZm9ybWF0PWZ1bmN0aW9uKCl7dmFyIGFyZ3M9YXJndW1lbnRzO3JldHVybiB0aGlzLnJlcGxhY2UoL3soXGQrKX0vZywoZnVuY3Rpb24obWF0Y2gsbnVtYmVyKXtyZXR1cm4gdHlwZW9mIGFyZ3NbbnVtYmVyXSE9InVuZGVmaW5lZCI/YXJnc1tudW1iZXJdOm1hdGNofSkpfTtpZighU3RyaW5nLnByb3RvdHlwZS50cmltKVN0cmluZy5wcm90b3R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