🎁 Sync 2026-10-09 12:18:17

This commit is contained in:
github-actions[bot] committed 2026-10-09 12:18:17 +08:00
1 parent c43003617d
commit 1ee3366de6
139 files changed
+1934 -500

No files matched your search

+4 -4
View File
@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gn
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
PKG_SOURCE_DATE:=2026-09-02
PKG_SOURCE_VERSION:=356ee8a865882bb3615422539ef262e32b102030
PKG_SOURCE_DATE:=2026-06-27
PKG_SOURCE_VERSION:=8d1b023dec36ab50138d427e807175fd99b5bb57
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=BSD 3-Clause
@@ -43,7 +43,7 @@ define Host/Configure
endef
define Host/Compile
+$(NINJA) -C $(HOST_BUILD_DIR)/out
+$(NINJA) -C $(HOST_BUILD_DIR)/out gn
endef
define Host/Install
@@ -1,32 +0,0 @@
--- a/src/gn/rust_project_writer.cc
+++ b/src/gn/rust_project_writer.cc
@@ -235,8 +235,13 @@ void AddTarget(const BuildSettings* buil
std::ranges::sort(include_dirs, [](const auto& lhs, const auto& rhs) {
return lhs.value() < rhs.value();
});
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13
+ include_dirs.erase(std::unique(include_dirs.begin(), include_dirs.end()),
+ include_dirs.end());
+#else
include_dirs.erase(std::ranges::unique(include_dirs).begin(),
include_dirs.end());
+#endif
Crate crate = Crate(crate_root, include_dirs, crate_id, crate_label,
edition.value_or("2015"));
--- a/src/gn/ninja_binary_target_writer.cc
+++ b/src/gn/ninja_binary_target_writer.cc
@@ -152,8 +152,13 @@ void NinjaBinaryTargetWriter::WritePriva
std::ranges::sort(deps, [](const Target* lhs, const Target* rhs) {
return lhs->module_name() < rhs->module_name();
});
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 13
+ auto dirty = std::unique(deps.begin(), deps.end());
+ deps.erase(dirty, deps.end());
+#else
auto dirty = std::ranges::unique(deps);
deps.erase(dirty.begin(), dirty.end());
+#endif
WriteModuleDeps(out, deps, base);
out << "}\n";
}
-71
View File
@@ -1,71 +0,0 @@
--- a/build/gen.py
+++ b/build/gen.py
@@ -254,6 +254,23 @@ def is_gcc(cxx):
return ret.returncode == 0 and "#define __GNUC__" in ret.stdout and not "#define __clang__" in ret.stdout
+
+def get_clang_major_version(cxx):
+ """Return Clang's major version, or None when cxx is not Clang."""
+ ret = subprocess.run(
+ f'{cxx} -dM -E -x c++ -',
+ shell=True,
+ stdin=subprocess.DEVNULL,
+ text=True,
+ capture_output=True)
+ if ret.returncode != 0 or "#define __clang__" not in ret.stdout:
+ return None
+
+ match = re.search(r'^#define __clang_major__\s+(\d+)$',
+ ret.stdout, re.MULTILINE)
+ return int(match.group(1)) if match else None
+
+
def GenerateLastCommitPosition(host, header):
ROOT_TAG = 'initial-commit'
if os.path.isdir(os.path.join(REPO_ROOT, '.git')):
@@ -553,6 +570,12 @@ def WriteGNNinja(path, platform, host, o
libs = []
if not platform.is_msvc():
+ clang_major = get_clang_major_version(cxx)
+ # Clang before 17 uses the draft spelling for C++23.
+ cxx_standard = ('-std=c++2b'
+ if clang_major is not None and clang_major < 17
+ else '-std=c++23')
+
if options.debug:
cflags.extend(['-O0', '-g'])
# Enable libc++ or libstdc++ assertions in debug mode.
@@ -625,9 +648,13 @@ def WriteGNNinja(path, platform, host, o
'-Wextra-semi',
'-Wundef',
- '-std=c++23'
+ cxx_standard
])
+ # Clang gained structured-binding lambda capture support in version 16.
+ if clang_major is not None and clang_major < 16:
+ cflags.append('-DGN_CLANG_BEFORE_16=1')
+
if is_gcc(cxx):
cflags.append('-Wno-redundant-move')
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104336
--- a/src/gn/command_suggest.cc
+++ b/src/gn/command_suggest.cc
@@ -566,7 +566,14 @@ SuggestResult OutputSuggestions(const st
}
return SuggestResult::kFailure;
}
+#if defined(GN_CLANG_BEFORE_16)
+ const auto& [structured_includer, structured_dep_kind] =
+ includer_targets.front();
+ const auto includer = structured_includer;
+ const auto dep_kind = structured_dep_kind;
+#else
const auto& [includer, dep_kind] = includer_targets.front();
+#endif
current_toolchain = includer->label().GetToolchainLabel();
std::string_view dep_field =
@@ -1,208 +0,0 @@
Subject: [PATCH] gn: support older standard libraries without std::expected
Provide a Result fallback including constrained value conversion, so lambda
returns can construct Result<std::function<...>> in one conversion.
Signed-off-by: coolsnowwolf <coolsnowwolf@gmail.com>
--- a/src/gn/err.h
+++ b/src/gn/err.h
@@ -5,10 +5,16 @@
#ifndef TOOLS_GN_ERR_H_
#define TOOLS_GN_ERR_H_
-#include <expected>
+#if defined(__has_include)
+# if __has_include(<expected>)
+# include <expected>
+# endif
+#endif
#include <memory>
#include <string>
+#include <type_traits>
#include <utility>
+#include <variant>
#include <vector>
#include "gn/label.h"
@@ -142,6 +148,7 @@ inline Err Ok() {
// std::expected does not allow implicit conversions because you can have
// std::expected<T, T>. Since that isn't a problem for us, we add the
// implicit conversions.
+#if defined(__cpp_lib_expected) && __cpp_lib_expected >= 202202L
template <typename T>
class Result : public std::expected<T, Err> {
static_assert(!std::is_void_v<T>, "Use Err instead of Result<void>");
@@ -187,6 +194,146 @@ class Result : public std::expected<T, E
return this->error().message();
}
};
+#else
+// This is a minimal fallback for GN's Result<T> abstraction.
+// It intentionally implements only the subset of std::expected
+// functionality currently used by GN and is not a general-purpose
+// std::expected replacement.
+template <typename T>
+class Result {
+ static_assert(!std::is_void_v<T>, "Use Err instead of Result<void>");
+ static_assert(!std::is_same_v<T, Err>, "Err cannot be the success case");
+
+ public:
+ // Implicit conversion from T (always creates a success state).
+ Result(const T& value) : storage_(value) {}
+
+ Result(T&& value) : storage_(std::move(value)) {}
+
+ // Match std::expected's converting constructor without requiring two
+ // user-defined conversions (for example, lambda -> std::function -> Result).
+ template <typename U>
+ requires(!std::is_same_v<std::remove_cvref_t<U>, Result> &&
+ !std::is_same_v<std::remove_cvref_t<U>, Err> &&
+ std::is_constructible_v<T, U&&>)
+ explicit(!std::is_convertible_v<U&&, T>) Result(U&& value)
+ : storage_(std::in_place_type<T>, std::forward<U>(value)) {}
+
+ // Implicit conversion from Err (always creates an error state).
+ Result(Err err) : storage_(std::move(err)) {
+ DCHECK(error().has_error());
+ }
+
+ bool has_value() const noexcept {
+ return std::holds_alternative<T>(storage_);
+ }
+
+ bool has_error() const noexcept {
+ return !has_value();
+ }
+
+ explicit operator bool() const noexcept {
+ return has_value();
+ }
+
+ T& operator*() & {
+ DCHECK(has_value());
+ return std::get<T>(storage_);
+ }
+
+ const T& operator*() const& {
+ DCHECK(has_value());
+ return std::get<T>(storage_);
+ }
+
+ T&& operator*() && {
+ DCHECK(has_value());
+ return std::get<T>(std::move(storage_));
+ }
+
+ const T&& operator*() const&& {
+ DCHECK(has_value());
+ return std::get<T>(std::move(storage_));
+ }
+
+ T* operator->() {
+ DCHECK(has_value());
+ return &std::get<T>(storage_);
+ }
+
+ const T* operator->() const {
+ DCHECK(has_value());
+ return &std::get<T>(storage_);
+ }
+
+ T& value() & {
+ DCHECK(has_value());
+ return std::get<T>(storage_);
+ }
+
+ const T& value() const& {
+ DCHECK(has_value());
+ return std::get<T>(storage_);
+ }
+
+ T&& value() && {
+ DCHECK(has_value());
+ return std::get<T>(std::move(storage_));
+ }
+
+ const T&& value() const&& {
+ DCHECK(has_value());
+ return std::get<T>(std::move(storage_));
+ }
+
+ Err& error() & {
+ DCHECK(has_error());
+ return std::get<Err>(storage_);
+ }
+
+ const Err& error() const& {
+ DCHECK(has_error());
+ return std::get<Err>(storage_);
+ }
+
+ Err&& error() && {
+ DCHECK(has_error());
+ return std::get<Err>(std::move(storage_));
+ }
+
+ const Err&& error() const&& {
+ DCHECK(has_error());
+ return std::get<Err>(std::move(storage_));
+ }
+
+ const std::string& message() const {
+ DCHECK(has_error());
+ return error().message();
+ }
+
+ // Keep the same API provided by the std::expected implementation above.
+ template <typename F>
+ Result<T> transform_error(F&& f) const& {
+ if (has_value())
+ return Result<T>(value());
+
+ return Result<T>(
+ std::forward<F>(f)(error()));
+ }
+
+ template <typename F>
+ Result<T> transform_error(F&& f) && {
+ if (has_value())
+ return Result<T>(std::move(value()));
+
+ return Result<T>(
+ std::forward<F>(f)(std::move(error())));
+ }
+
+ private:
+ std::variant<T, Err> storage_;
+};
+#endif
namespace internal {
@@ -198,6 +345,7 @@ inline Err GetError(Err&& err) {
return std::move(err);
}
+#if defined(__cpp_lib_expected) && __cpp_lib_expected >= 202202L
template <typename T, typename E>
inline E GetError(const std::expected<T, E>& exp) {
return exp.error();
@@ -207,6 +355,17 @@ template <typename T, typename E>
inline E GetError(std::expected<T, E>&& exp) {
return std::move(exp).error();
}
+#else
+template <typename T>
+inline Err GetError(const Result<T>& result) {
+ return result.error();
+}
+
+template <typename T>
+inline Err GetError(Result<T>&& result) {
+ return std::move(result).error();
+}
+#endif
} // namespace internal
@@ -1,15 +0,0 @@
--- a/build/gen.py
+++ b/build/gen.py
@@ -490,12 +490,6 @@
'check_all',
inputs=[
ninja.RunBinary(
- 'check_formatter',
- inputs=[ninja.source_file('tools/run_formatter.sh')],
- implicit_inputs=ninja.directory(ninja.source_file('src'), ['target']),
- args='--diff',
- ),
- ninja.RunBinary(
'check_reference',
inputs=[ninja.source_file('tools/update_reference.sh')],
implicit_inputs=[
+2 -2
View File
@@ -3,7 +3,7 @@
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 2552
#define LAST_COMMIT_POSITION "2552 (356ee8a86588)"
#define LAST_COMMIT_POSITION_NUM 2434
#define LAST_COMMIT_POSITION "2434 (8d1b023dec36)"
#endif // OUT_LAST_COMMIT_POSITION_H_
+5 -5
View File
@@ -3,17 +3,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=honk
PKG_VERSION:=2026.10.8_pre1
PKG_RELEASE:=13
PKG_VERSION:=2026.10.9_pre2
PKG_RELEASE:=14
# Raw upstream release tag. It keeps the dots in qualifiers (e.g. v0.0.1.beta.49)
# because that is what the GitHub release asset name uses.
HONK_RELEASE_TAG:=debug.2026.10.8.native-api.1
HONK_RELEASE_TAG:=debug.2026.10.9.native-api.2
HONK_ASSET_TAG:=debug
# SHA256 of each release tarball, kept in sync by scripts/update_honk_version.sh.
HONK_HASH_X86_64:=edf2ff65507e89bc32d3fe643c3efa89ac35537931e80f9bce882488a3f289f4
HONK_HASH_AARCH64:=11e6552df24fe9437903cdc00ac54334edf73f3aebce9c3f3e923ec1b690d4cb
HONK_HASH_X86_64:=d46eecc460ad9f9fdfad30b80828e4b64ec9f94bbcabff942b8fe68d3793f9b2
HONK_HASH_AARCH64:=b706100f6a9ba9879bf2c1e018f64072ebe66f128f8dcb8b8a11d803eefe8174
PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILE:=LICENSE
+1 -1
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-argon-config
PKG_VERSION:=1.0
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_MAINTAINER:=jerrykuku <jerrykuku@qq.com>
+8
View File
@@ -57,6 +57,14 @@ In **System → Argon Config**, choose **Classic sidebar** (default) or **Center
This feature requires a theme version supporting `login_style`. Update the theme and this plugin together. Existing configurations without this option continue to use the classic layout.
## Custom browser icon and login logo
Under **System → Argon Config → Custom branding**, upload a browser icon and login logo separately, or use one image for both. Each can be restored to its default. PNG images must be 16–1024 pixels per side and at most 1 MiB. Browser icons must be square; login logos retain their aspect ratio in both login layouts.
Update both the theme and configuration plugin. Uploads and resets apply immediately without saving other settings; reload open pages to update their icons. The custom browser icon also supplies the touch icon and web manifest. Existing home-screen shortcuts may need to be added again.
Files are stored in `/www/luci-static/argon/branding/` without replacing packaged assets. The configuration plugin includes this directory in `keep.d` backups for upgrades that preserve configuration. Upgrades without configuration preservation reset the icons.
## Branch Introduction
There are currently two main branches that are adapted to different versions of the **OpenWrt** source code.
+8
View File
@@ -55,6 +55,14 @@
此功能需要支持 `login_style` 的主题版本,请同时更新主题和本插件。已有配置未设置该选项时,继续使用经典布局。
## 自定义网站图标与登录 Logo
在 **系统 → Argon 主题设置 → 自定义图标** 中,可以分别上传网站图标和登录页 Logo,也可以将同一张图片同时用于两处;每项都可恢复默认。支持 PNG 格式,每边 16–1024 像素,最大 1 MiB。网站图标需为正方形;登录 Logo 按原比例缩放,兼容经典侧栏和居中卡片。
请同时更新主题和配置插件。上传或恢复后立即生效,无需保存其他设置;已打开的页面需要刷新才能更新图标。自定义网站图标也用于手机桌面图标和 manifest,已添加到桌面的快捷方式可能需要重新添加。
自定义文件保存在 `/www/luci-static/argon/branding/`,不会覆盖主题内置图标。配置插件通过 `keep.d` 将此目录纳入保留配置升级的备份;不保留配置时不会保留自定义图标。
## Branch Introduction
目前有两个主要的分支,适应于不同版本的**OpenWrt**源代码。
@@ -0,0 +1,118 @@
'use strict';
'require baseclass';
'require fs';
'require rpc';
'require ui';
var callGet = rpc.declare({ object: 'luci.argon_branding', method: 'get', expect: { '': {} }, raise: true });
var callSet = rpc.declare({ object: 'luci.argon_branding', method: 'set', params: ['target', 'token'], expect: { '': {} }, raise: true });
var callReset = rpc.declare({ object: 'luci.argon_branding', method: 'reset', params: ['target'], expect: { '': {} }, raise: true });
return baseclass.extend({
load: function() {
return callGet().catch(function() { return null; });
},
render: function(map, state) {
var busy = false;
var buttons = [];
var previews = {};
var defaults = {
favicon: L.resource('../argon/icon/favicon-32x32.png'),
logo: L.resource('../argon/img/argon.svg')
};
var labels = { favicon: _('Browser icon'), logo: _('Login logo') };
var available = state && state.result === 0;
function assetUrl(kind) {
return state && /^image-[0-9a-f]{64}\.png$/.test(state[kind] || '') ?
L.resource('../argon/branding/' + state[kind]) : defaults[kind];
}
function refresh() {
Object.keys(previews).forEach(function(kind) {
previews[kind].src = assetUrl(kind);
});
buttons.forEach(function(button) {
button.node.disabled = !!(map.readonly || busy || !available ||
(button.reset && !state[button.target]));
});
}
function update(target, upload) {
if (map.readonly || busy || !available)
return Promise.resolve();
busy = true;
refresh();
var file;
return Promise.resolve().then(function() {
if (!upload)
return callReset(target);
var token = Array.from(crypto.getRandomValues(new Uint32Array(4)), function(n) {
return ('00000000' + n.toString(16)).slice(-8);
}).join('');
file = '/tmp/argon_branding_' + token + '.png';
return ui.uploadFile(file).then(function() {
return callSet(target, token);
});
}).then(function(result) {
if (result.result === 2)
throw new Error(_('Invalid PNG image or dimensions.'));
if (result.result === 3)
throw new Error(_('Another update is running. Please try again.'));
if (result.result !== 0)
throw new Error(_('Unable to save custom branding.'));
state = result;
}).catch(function(error) {
ui.addNotification(null, E('p', {}, error.message), 'error');
}).finally(function() {
return (file ? L.resolveDefault(fs.remove(file)) : Promise.resolve()).finally(function() {
busy = false;
refresh();
});
});
}
function action(target, upload, label) {
var node = E('button', {
'type': 'button',
'class': 'btn cbi-button ' + (upload ? 'cbi-button-action' : 'cbi-button-reset'),
'style': 'max-width:100%;height:auto;white-space:normal',
'click': function() { return update(target, upload); }
}, label);
buttons.push({ node: node, target: target, reset: !upload });
return node;
}
var cards = Object.keys(labels).map(function(kind) {
var preview = E('img', {
'src': assetUrl(kind), 'alt': labels[kind], 'width': 64, 'height': 64,
'style': 'object-fit:contain;flex-shrink:0',
'error': function() { if (this.getAttribute('src') !== defaults[kind]) this.src = defaults[kind]; }
});
previews[kind] = preview;
return E('div', { 'style': 'flex:1 1 18rem;min-width:0' }, [
E('h4', { 'style': 'padding:0;margin:0 0 .75rem' }, labels[kind]),
E('div', { 'style': 'display:flex;align-items:center;flex-wrap:wrap;gap:1rem' }, [
preview,
E('div', { 'style': 'display:flex;flex-wrap:wrap;gap:.5rem' }, [
action(kind, true, _('Upload PNG...')),
action(kind, false, _('Restore default'))
])
])
]);
});
var content = E('div', { 'style': 'padding:0 1.25rem 1.25rem' }, [
E('p', { 'style': 'padding:0;margin:0 0 1rem;line-height:1.5' }, _('PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square.')),
E('div', { 'style': 'display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:1rem' }, cards),
action('both', true, _('Upload for both...')),
E('p', { 'style': 'padding:0;margin:1rem 0 0;line-height:1.5' }, _('Changes apply immediately. Reload open pages to update their icons.'))
]);
if (!available)
content.appendChild(E('p', { 'class': 'error', 'style': 'padding:0;margin:1rem 0 0' }, _('Unable to load custom branding. Update the theme and configuration packages.')));
refresh();
return E('div', { 'class': 'cbi-section', 'id': 'argon-branding' }, [
E('h3', {}, _('Custom branding')), content
]);
}
});
@@ -1,5 +1,6 @@
'use strict';
'require form';
'require argon.branding as branding';
'require fs';
'require rpc';
'require uci';
@@ -45,7 +46,8 @@ return view.extend({
fs.list(bg_path).catch(function(e) {
ui.addNotification(null, E('p', _('Failed to list background files: %s.').format(e.message)));
return [];
})
}),
branding.load()
]);
},
@@ -165,6 +167,9 @@ return view.extend({
});
};
s = m.section(form.TypedSection);
s.render = function() { return branding.render(this.map, data[3]); };
s = m.section(form.TypedSection, null, _('Upload background (available space: %1024.2mB)')
.format(data[1].avail * 1024),
_('You can upload files such as gif/jpg/mp4/png/webm/webp files, to change the login page background.'));
@@ -208,3 +208,51 @@ msgstr "بطاقة في المنتصف"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "يُطبّق عند فتح صفحة تسجيل الدخول في المرة القادمة."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "أيقونة المتصفح"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "شعار تسجيل الدخول"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "صورة PNG أو أبعاد غير صالحة."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "يوجد تحديث آخر قيد التنفيذ. يرجى المحاولة لاحقًا."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "تعذر حفظ الأيقونات المخصصة."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "رفع PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "استعادة الافتراضي"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "أيقونات مخصصة"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "صور PNG، من 16 إلى 1024 بكسل لكل جانب، وبحد أقصى 1 MiB. يجب أن تكون أيقونات المتصفح مربعة."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "رفع لكليهما…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "تُطبق التغييرات فورًا. أعد تحميل الصفحات المفتوحة لتحديث أيقوناتها."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "تعذر تحميل الأيقونات المخصصة. حدّث القالب وحزمة الإعدادات."
@@ -208,3 +208,51 @@ msgstr "Zentrierte Karte"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Wird beim nächsten Öffnen der Anmeldeseite angewendet."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Browser-Symbol"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Anmeldelogo"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Ungültiges PNG-Bild oder ungültige Abmessungen."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Eine andere Aktualisierung läuft. Bitte später erneut versuchen."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Benutzerdefinierte Symbole konnten nicht gespeichert werden."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "PNG hochladen…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Standard wiederherstellen"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Benutzerdefinierte Symbole"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "PNG-Bilder, 16–1024 Pixel pro Seite, maximal 1 MiB. Browser-Symbole müssen quadratisch sein."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Für beide hochladen…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Änderungen werden sofort wirksam. Laden Sie offene Seiten neu, um ihre Symbole zu aktualisieren."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Benutzerdefinierte Symbole konnten nicht geladen werden. Aktualisieren Sie das Theme und das Konfigurationspaket."
@@ -210,3 +210,51 @@ msgstr "Tarjeta centrada"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Se aplica la próxima vez que abra la página de inicio de sesión."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Icono del navegador"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logotipo de inicio de sesión"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Imagen PNG o dimensiones no válidas."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Hay otra actualización en curso. Inténtelo de nuevo más tarde."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "No se pueden guardar los iconos personalizados."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Subir PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Restaurar predeterminado"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Iconos personalizados"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Imágenes PNG, 16–1024 píxeles por lado, hasta 1 MiB. Los iconos del navegador deben ser cuadrados."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Subir para ambos…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Los cambios se aplican inmediatamente. Recargue las páginas abiertas para actualizar sus iconos."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "No se pueden cargar los iconos personalizados. Actualice el tema y el paquete de configuración."
@@ -208,3 +208,51 @@ msgstr "Carte centrée"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "S’applique à la prochaine ouverture de la page de connexion."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Icône du navigateur"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logo de connexion"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Image PNG ou dimensions non valides."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Une autre mise à jour est en cours. Veuillez réessayer plus tard."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Impossible de sauvegarder les icônes personnalisées."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Téléverser un PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Rétablir par défaut"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Icônes personnalisées"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Images PNG, 16–1024 pixels par côté, jusqu’à 1 MiB. Les icônes du navigateur doivent être carrées."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Téléverser pour les deux…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Les modifications sont immédiates. Rechargez les pages ouvertes pour actualiser leurs icônes."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Impossible de charger les icônes personnalisées. Mettez à jour le thème et le paquet de configuration."
@@ -208,3 +208,51 @@ msgstr "Scheda centrata"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Si applica alla prossima apertura della pagina di accesso."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Icona del browser"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logo di accesso"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Immagine PNG o dimensioni non valide."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Un altro aggiornamento è in corso. Riprova più tardi."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Impossibile salvare le icone personalizzate."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Carica PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Ripristina predefinito"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Icone personalizzate"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Immagini PNG, 16–1024 pixel per lato, fino a 1 MiB. Le icone del browser devono essere quadrate."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Carica per entrambi…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Le modifiche si applicano subito. Ricarica le pagine aperte per aggiornare le icone."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Impossibile caricare le icone personalizzate. Aggiorna il tema e il pacchetto di configurazione."
@@ -208,3 +208,51 @@ msgstr "中央カード"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "次にログインページを開いたときに適用されます。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "ブラウザーアイコン"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "ログインロゴ"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "PNG 画像またはサイズが無効です。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "別の更新が進行中です。後でもう一度お試しください。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "カスタムアイコンを保存できません。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "PNG をアップロード…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "既定値に戻す"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "カスタムアイコン"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "PNG 画像、各辺 16–1024 ピクセル、最大 1 MiB。ブラウザーアイコンは正方形にしてください。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "両方にアップロード…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "変更はすぐに適用されます。開いているページを再読み込みしてアイコンを更新してください。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "カスタムアイコンを読み込めません。テーマと設定パッケージを更新してください。"
@@ -208,3 +208,51 @@ msgstr "가운데 카드"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "다음에 로그인 페이지를 열 때 적용됩니다."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "브라우저 아이콘"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "로그인 로고"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "PNG 이미지 또는 크기가 올바르지 않습니다."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "다른 업데이트가 진행 중입니다. 나중에 다시 시도하세요."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "사용자 지정 아이콘을 저장할 수 없습니다."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "PNG 업로드…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "기본값 복원"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "사용자 지정 아이콘"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "PNG 이미지, 각 변 16–1024픽셀, 최대 1 MiB. 브라우저 아이콘은 정사각형이어야 합니다."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "두 곳 모두에 업로드…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "변경 사항은 즉시 적용됩니다. 열려 있는 페이지를 새로 고쳐 아이콘을 업데이트하세요."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "사용자 지정 아이콘을 불러올 수 없습니다. 테마와 설정 패키지를 업데이트하세요."
@@ -208,3 +208,51 @@ msgstr "Gecentreerde kaart"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Wordt toegepast wanneer u de aanmeldpagina opnieuw opent."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Browserpictogram"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Aanmeldlogo"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Ongeldige PNG-afbeelding of afmetingen."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Er wordt al een update uitgevoerd. Probeer het later opnieuw."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Aangepaste pictogrammen kunnen niet worden opgeslagen."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "PNG uploaden…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Standaard herstellen"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Aangepaste pictogrammen"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "PNG-afbeeldingen, 16–1024 pixels per zijde, maximaal 1 MiB. Browserpictogrammen moeten vierkant zijn."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Voor beide uploaden…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Wijzigingen worden direct toegepast. Herlaad geopende pagina’s om hun pictogrammen bij te werken."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Aangepaste pictogrammen kunnen niet worden geladen. Werk het thema en het configuratiepakket bij."
@@ -207,3 +207,51 @@ msgstr "Wyśrodkowana karta"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Zmiana zostanie zastosowana przy następnym otwarciu strony logowania."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Ikona przeglądarki"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logo logowania"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Nieprawidłowy obraz PNG lub wymiary."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Trwa inna aktualizacja. Spróbuj ponownie później."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Nie można zapisać niestandardowych ikon."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Prześlij PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Przywróć domyślne"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Niestandardowe ikony"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Obrazy PNG, 16–1024 pikseli na bok, maksymalnie 1 MiB. Ikony przeglądarki muszą być kwadratowe."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Prześlij dla obu…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Zmiany są stosowane natychmiast. Odśwież otwarte strony, aby zaktualizować ich ikony."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Nie można wczytać niestandardowych ikon. Zaktualizuj motyw i pakiet konfiguracji."
@@ -210,3 +210,51 @@ msgstr "Cartão centralizado"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Aplicado na próxima vez que você abrir a página de login."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Ícone do navegador"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logotipo de login"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Imagem PNG ou dimensões inválidas."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Outra atualização está em andamento. Tente novamente mais tarde."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Não foi possível salvar os ícones personalizados."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Enviar PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Restaurar padrão"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Ícones personalizados"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Imagens PNG, 16–1024 pixels por lado, até 1 MiB. Os ícones do navegador devem ser quadrados."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Enviar para ambos…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "As alterações são aplicadas imediatamente. Recarregue as páginas abertas para atualizar seus ícones."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Não foi possível carregar os ícones personalizados. Atualize o tema e o pacote de configuração."
@@ -207,3 +207,51 @@ msgstr "Карточка по центру"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Применяется при следующем открытии страницы входа."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Значок браузера"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Логотип входа"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Недопустимое изображение PNG или размеры."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Выполняется другое обновление. Повторите попытку позже."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Не удалось сохранить пользовательские значки."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Загрузить PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Восстановить по умолчанию"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Пользовательские значки"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Изображения PNG, 16–1024 пикселей на сторону, до 1 MiB. Значки браузера должны быть квадратными."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Загрузить для обоих…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Изменения применяются сразу. Перезагрузите открытые страницы, чтобы обновить их значки."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Не удалось загрузить пользовательские значки. Обновите тему и пакет настроек."
@@ -200,3 +200,51 @@ msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr ""
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr ""
@@ -208,3 +208,51 @@ msgstr "Ortalanmış kart"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Giriş sayfasını bir sonraki açışınızda uygulanır."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Tarayıcı simgesi"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Giriş logosu"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Geçersiz PNG görüntüsü veya boyutları."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Başka bir güncelleme sürüyor. Lütfen daha sonra tekrar deneyin."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Özel simgeler kaydedilemedi."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "PNG yükle…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Varsayılanı geri yükle"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Özel simgeler"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "PNG görüntüleri, her kenar 16–1024 piksel, en fazla 1 MiB. Tarayıcı simgeleri kare olmalıdır."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "İkisi için yükle…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Değişiklikler hemen uygulanır. Simgeleri güncellemek için açık sayfaları yeniden yükleyin."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Özel simgeler yüklenemedi. Temayı ve yapılandırma paketini güncelleyin."
@@ -208,3 +208,51 @@ msgstr "Картка по центру"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Застосовується під час наступного відкриття сторінки входу."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Піктограма браузера"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Логотип входу"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Неприпустиме зображення PNG або розміри."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Триває інше оновлення. Спробуйте пізніше."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Не вдалося зберегти власні піктограми."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Завантажити PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Відновити типові"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Власні піктограми"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Зображення PNG, 16–1024 пікселів на сторону, до 1 MiB. Піктограми браузера мають бути квадратними."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Завантажити для обох…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Зміни застосовуються одразу. Перезавантажте відкриті сторінки, щоб оновити їхні піктограми."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Не вдалося завантажити власні піктограми. Оновіть тему та пакет налаштувань."
@@ -208,3 +208,51 @@ msgstr "Thẻ ở giữa"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "Áp dụng vào lần tiếp theo bạn mở trang đăng nhập."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "Biểu tượng trình duyệt"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "Logo đăng nhập"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "Ảnh PNG hoặc kích thước không hợp lệ."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "Một bản cập nhật khác đang chạy. Vui lòng thử lại sau."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "Không thể lưu biểu tượng tùy chỉnh."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "Tải PNG lên…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "Khôi phục mặc định"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "Biểu tượng tùy chỉnh"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "Ảnh PNG, mỗi cạnh 16–1024 pixel, tối đa 1 MiB. Biểu tượng trình duyệt phải có dạng hình vuông."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "Tải lên cho cả hai…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "Thay đổi có hiệu lực ngay. Tải lại các trang đang mở để cập nhật biểu tượng."
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "Không thể tải biểu tượng tùy chỉnh. Hãy cập nhật giao diện và gói cấu hình."
@@ -209,3 +209,51 @@ msgstr "居中卡片"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "下次打开登录页时生效。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "网站图标"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "登录页 Logo"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "PNG 图片或尺寸不符合要求。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "有其他更新正在进行,请稍后重试。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "无法保存自定义图标。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "上传 PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "恢复默认"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "自定义图标"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "支持 PNG,每边 16–1024 像素,最大 1 MiB。网站图标须为正方形。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "同时用于两处…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "更改立即生效。请刷新已打开的页面以更新图标。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "无法加载自定义图标。请更新主题和配置插件。"
@@ -209,3 +209,51 @@ msgstr "置中卡片"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/view/argon-config.js
msgid "Applies the next time you open the login page."
msgstr "下次開啟登入頁面時生效。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Browser icon"
msgstr "網站圖示"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Login logo"
msgstr "登入頁 Logo"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Invalid PNG image or dimensions."
msgstr "PNG 圖片或尺寸不符合要求。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Another update is running. Please try again."
msgstr "有其他更新正在進行,請稍後重試。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to save custom branding."
msgstr "無法儲存自訂圖示。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload PNG..."
msgstr "上傳 PNG…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Restore default"
msgstr "恢復預設"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Custom branding"
msgstr "自訂圖示"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "PNG images, 16–1024 pixels per side, up to 1 MiB. Browser icons must be square."
msgstr "支援 PNG,每邊 16–1024 像素,最大 1 MiB。網站圖示須為正方形。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Upload for both..."
msgstr "同時用於兩處…"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Changes apply immediately. Reload open pages to update their icons."
msgstr "變更立即生效。請重新整理已開啟的頁面以更新圖示。"
#: applications/luci-app-argon-config/htdocs/luci-static/resources/argon/branding.js
msgid "Unable to load custom branding. Update the theme and configuration packages."
msgstr "無法載入自訂圖示。請更新主題和設定套件。"
@@ -0,0 +1 @@
/www/luci-static/argon/branding/
@@ -0,0 +1,132 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
readonly branding_dir='/www/luci-static/argon/branding'
readonly lock_dir='/tmp/argon_branding.lock'
readonly upload_prefix='/tmp/argon_branding_'
valid_destination() {
[ ! -L "$1" ] && { [ ! -e "$1" ] || [ -f "$1" ]; }
}
valid_asset() {
printf '%s\n' "$1" | grep -Eq '^image-[0-9a-f]{64}\.png$' &&
[ -f "$branding_dir/$1" ] && [ ! -L "$branding_dir/$1" ]
}
read_state() {
favicon=''
logo=''
[ -d "$branding_dir" ] && [ ! -L "$branding_dir" ] || return 0
if [ -f "$branding_dir/current.json" ] && [ ! -L "$branding_dir/current.json" ] &&
[ "$(wc -c < "$branding_dir/current.json")" -le 1024 ] &&
json_load "$(cat "$branding_dir/current.json")"; then
json_get_var favicon favicon
json_get_var logo logo
fi
valid_asset "$favicon" || favicon=''
valid_asset "$logo" || logo=''
}
status() {
json_init
json_add_int result "$1"
json_add_string favicon "$favicon"
json_add_string logo "$logo"
json_dump
}
# Check the PNG header, bounded dimensions, IDAT presence and complete IEND.
# Images are served as PNG only, never as user-supplied filenames or SVG/HTML.
validate_png() {
local size header ending
size="$(wc -c < "$1")"
[ "$size" -ge 67 ] && [ "$size" -le 1048576 ] || return 1
header="$(od -An -v -tu1 -N 29 "$1")"
set -- $header
[ "$#" -eq 29 ] || return 1
[ "$1 $2 $3 $4 $5 $6 $7 $8" = '137 80 78 71 13 10 26 10' ] || return 1
shift 8
[ "$1 $2 $3 $4 $5 $6 $7 $8" = '0 0 0 13 73 72 68 82' ] || return 1
shift 8
width=$(( $1 * 16777216 + $2 * 65536 + $3 * 256 + $4 ))
height=$(( $5 * 16777216 + $6 * 65536 + $7 * 256 + $8 ))
[ "$width" -ge 16 ] && [ "$height" -ge 16 ] &&
[ "$width" -le 1024 ] && [ "$height" -le 1024 ] || return 1
[ "$target" = logo ] || [ "$width" -eq "$height" ] || return 1
shift 8
case "$1:$2" in 1:0|2:0|4:0|8:0|16:0|8:2|16:2|1:3|2:3|4:3|8:3|8:4|16:4|8:6|16:6) ;; *) return 1 ;; esac
[ "$3 $4" = '0 0' ] && [ "$5" -le 1 ] || return 1
ending="$(tail -c 12 "$work/image.png" | od -An -v -tx1 | tr -d ' \n')"
[ "$ending" = '0000000049454e44ae426082' ] && LC_ALL=C grep -q 'IDAT' "$work/image.png"
}
cleanup() {
[ -z "$work" ] || rm -rf "$work"
rmdir "$lock_dir" 2>/dev/null
}
case "$1" in
list)
printf '%s\n' '{"get":{},"set":{"target":"","token":""},"reset":{"target":""}}'
;;
call)
method="$2"
case "$method" in
get) read_state; status 0; exit 0 ;;
set|reset) ;;
*) exit 1 ;;
esac
read -r input
json_load "$input" || { status 2; exit 0; }
json_get_var target target
json_get_var token token
case "$target" in favicon|logo|both) ;; *) status 2; exit 0 ;; esac
if [ "$method" = set ]; then
printf '%s\n' "$token" | grep -Eq '^[0-9a-f]{32}$' || { status 2; exit 0; }
upload="${upload_prefix}${token}.png"
[ -f "$upload" ] && [ ! -L "$upload" ] || { status 2; exit 0; }
fi
mkdir "$lock_dir" 2>/dev/null || { status 3; exit 0; }
work=''
trap cleanup EXIT
trap 'exit 1' HUP INT TERM
umask 077
[ ! -L "$branding_dir" ] && mkdir -p "$branding_dir" && chmod 0755 "$branding_dir" || { status 1; exit 0; }
work="$(mktemp -d "$branding_dir/.upload.XXXXXX")" || { status 1; exit 0; }
read_state
old_favicon="$favicon"
old_logo="$logo"
if [ "$method" = set ]; then
mv "$upload" "$work/image.png" || { status 1; exit 0; }
validate_png "$work/image.png" || { status 2; exit 0; }
hash="$(sha256sum "$work/image.png")"
hash="${hash%% *}"
printf '%s\n' "$hash" | grep -Eq '^[0-9a-f]{64}$' || { status 1; exit 0; }
asset="image-$hash.png"
manifest="image-$hash.webmanifest"
valid_destination "$branding_dir/$asset" && valid_destination "$branding_dir/$manifest" || { status 1; exit 0; }
printf '{"name":"OpenWrt","display":"standalone","icons":[{"src":"%s","sizes":"%sx%s","type":"image/png"}]}\n' "$asset" "$width" "$height" > "$work/manifest"
chmod 0644 "$work/image.png" "$work/manifest" &&
mv -f "$work/image.png" "$branding_dir/$asset" &&
mv -f "$work/manifest" "$branding_dir/$manifest" || { status 1; exit 0; }
else
asset=''
fi
case "$target" in favicon) favicon="$asset" ;; logo) logo="$asset" ;; both) favicon="$asset"; logo="$asset" ;; esac
json_init
json_add_string favicon "$favicon"
json_add_string logo "$logo"
json_dump > "$work/current.json"
valid_destination "$branding_dir/current.json" && chmod 0644 "$work/current.json" &&
mv -f "$work/current.json" "$branding_dir/current.json" || { status 1; exit 0; }
# Keep the active images and one previous generation for pages already open.
for file in "$branding_dir"/image-*.png; do
name="${file##*/}"
case "$name" in "$favicon"|"$logo"|"$old_favicon"|"$old_logo") continue ;; esac
rm -f "$file" "${file%.png}.webmanifest"
done
status 0
;;
esac
@@ -6,16 +6,19 @@
"/www/luci-static/argon/background/*": [ "list" ]
},
"ubus": {
"luci.argon": [ "avail" ]
"luci.argon": [ "avail" ],
"luci.argon_branding": [ "get" ]
},
"uci": [ "argon" ]
},
"write": {
"file": {
"/tmp/argon_background.tmp": [ "write" ]
"/tmp/argon_background.tmp": [ "write" ],
"/tmp/argon_branding_*.png": [ "write" ]
},
"ubus": {
"luci.argon": [ "remove", "rename" ]
"luci.argon": [ "remove", "rename" ],
"luci.argon_branding": [ "set", "reset" ]
},
"uci": [ "argon" ]
}
@@ -0,0 +1,102 @@
'use strict';
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
const test = require('node:test');
const { webcrypto } = require('node:crypto');
const source = fs.readFileSync(path.join(__dirname, '../htdocs/luci-static/resources/argon/branding.js'), 'utf8');
const image = 'image-' + 'a'.repeat(64) + '.png';
function fixture(options = {}) {
const state = { notifications: [], uploads: [], calls: [], cleanups: [], buttons: [], images: [], ...options };
let config = { result: 0, favicon: '', logo: '' };
const E = (tag, attrs, children) => {
const node = { tag, attrs, children, ...attrs, appendChild(child) { this.children.push(child); } };
if (tag === 'button') state.buttons.push(node);
if (tag === 'img') state.images.push(node);
return node;
};
const rpc = { declare: spec => async (...args) => {
assert.equal(spec.raise, true);
state.calls.push([spec.method, ...args]);
if (state.rpcError) throw new Error('permission denied');
if (state.result) return { result: state.result };
if (spec.method !== 'get') {
for (const kind of (args[0] === 'both' ? ['favicon', 'logo'] : [args[0]]))
config[kind] = spec.method === 'set' ? image : '';
}
return { ...config };
} };
const api = new Function('baseclass', 'fs', 'rpc', 'ui', 'L', 'E', '_', 'crypto', source)(
{ extend: obj => obj }, { remove: async file => { state.cleanups.push(file); } }, rpc,
{ uploadFile: async file => {
state.uploads.push(file);
if (state.uploadError) throw new Error('cancelled');
await state.pending;
}, addNotification: (title, node) => state.notifications.push(node.children) },
{ resource: value => '/luci-static/resources/' + value, resolveDefault: promise => promise.catch(() => {}) },
E, value => value, webcrypto
);
state.render = async () => api.render({ readonly: state.readonly }, await api.load());
state.click = index => state.buttons[index].click();
return state;
}
test('branding can be set independently, shared, and restored without reloading the form', async () => {
const state = fixture();
await state.render();
assert.equal(state.buttons[1].disabled, true);
await state.click(0);
assert.ok(state.images[0].src.endsWith(image));
assert.ok(state.images[1].src.endsWith('argon.svg'));
assert.equal(state.buttons[1].disabled, false);
await state.click(2);
await state.click(1);
assert.ok(state.images[0].src.endsWith('favicon-32x32.png'));
assert.ok(state.images[1].src.endsWith(image));
await state.click(4);
assert.ok(state.images.every(node => node.src.endsWith(image)));
assert.equal(state.notifications.length, 0);
assert.equal(new Set(state.uploads).size, 3);
assert.deepEqual(state.cleanups, state.uploads);
for (const file of state.uploads) assert.match(file, /^\/tmp\/argon_branding_[0-9a-f]{32}\.png$/);
});
test('failed uploads and RPC operations keep the previews and restore the controls', async () => {
for (const options of [{ uploadError: true }, { result: 2 }, { result: 3 }, { result: 1 }, { rpcError: true }]) {
const state = fixture();
await state.render();
Object.assign(state, options);
await state.click(0);
assert.ok(state.images[0].src.endsWith('favicon-32x32.png'));
assert.equal(state.notifications.length, 1);
assert.equal(state.buttons[0].disabled, false);
assert.deepEqual(state.cleanups, state.uploads);
if (options.uploadError) assert.equal(state.calls.length, 1);
}
});
test('read-only and unavailable backends never allow mutations', async () => {
for (const options of [{ readonly: true }, { rpcError: true }]) {
const state = fixture(options);
await state.render();
assert.ok(state.buttons.every(button => button.disabled));
for (let i = 0; i < state.buttons.length; i++) await state.click(i);
assert.deepEqual(state.calls, [['get']]);
assert.equal(state.uploads.length, 0);
}
});
test('pending uploads prevent overlapping updates and leave controls usable afterwards', async () => {
let finish;
const state = fixture({ pending: new Promise(resolve => { finish = resolve; }) });
await state.render();
const upload = state.click(4);
await Promise.resolve();
assert.ok(state.buttons.every(button => button.disabled));
await state.click(0);
assert.equal(state.uploads.length, 1);
finish();
await upload;
assert.ok(state.buttons.every(button => !button.disabled));
});
+3 -2
View File
@@ -69,10 +69,11 @@ function fixture(options = {}) {
remove(filename) { state.cleanups.push(filename); return Promise.resolve(); }
};
const L = { bind: (fn, context) => fn.bind(context), resolveDefault: (promise, value) => Promise.resolve(promise).catch(() => value), resource: name => '/luci-static/resources/' + name };
state.view = new Function('form', 'fs', 'rpc', 'uci', 'ui', 'view', 'L', 'E', '_', 'cbi_update_table', 'location', 'document', source)(
state.view = new Function('form', 'fs', 'rpc', 'uci', 'ui', 'view', 'L', 'E', '_', 'cbi_update_table', 'location', 'document', 'branding', source)(
form, fileApi, rpc, { load: () => Promise.resolve() }, ui, { extend: value => value }, L, E,
value => value, (table, rows) => { state.rows = rows; }, { reload() { state.reloads++; } },
{ getElementById: id => state.nodes[id] }
{ getElementById: id => state.nodes[id] },
{ load: () => Promise.resolve({ result: 0 }), render: () => E('div', {}, []) }
);
state.render = async () => state.view.render(await state.view.load());
state.button = name => state.map.options.find(option => option.name === name);
@@ -0,0 +1,175 @@
"""Exercise the actual branding RPC against an isolated filesystem and JSON shim."""
import hashlib
import json
import os
from pathlib import Path
import secrets
import shutil
import struct
import subprocess
import tempfile
import unittest
import zlib
ROOT = Path(__file__).resolve().parents[1]
def png(width=64, height=64, color=b'\x30\x70\xe0\xff'):
def chunk(kind, data):
return struct.pack('>I', len(data)) + kind + data + struct.pack('>I', zlib.crc32(kind + data))
return (b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', width, height, 8, 6, 0, 0, 0)) +
chunk(b'IDAT', zlib.compress((b'\0' + color * width) * height)) + chunk(b'IEND', b''))
class BrandingTests(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name)
self.directory = self.root / 'branding'
self.lock = self.root / 'lock'
self.prefix = str(self.root / 'upload_')
shim = self.root / 'jshn.sh'
shim.write_text('''json_load() {
FIXTURE_JSON=$1
printf '%s' "$FIXTURE_JSON" | python3 -c 'import json,sys; json.load(sys.stdin)' >/dev/null 2>&1
}
json_get_var() {
fixture_value=$(printf '%s' "$FIXTURE_JSON" | python3 -c 'import json,sys; v=json.load(sys.stdin); print(v.get(sys.argv[1], "") if isinstance(v,dict) else "")' "$2")
export "$1=$fixture_value"
}
json_init() { FIXTURE_JSON='{}'; }
json_add_string() {
FIXTURE_JSON=$(printf '%s' "$FIXTURE_JSON" | python3 -c 'import json,sys; v=json.load(sys.stdin); v[sys.argv[1]]=sys.argv[2]; print(json.dumps(v))' "$1" "$2")
}
json_add_int() {
FIXTURE_JSON=$(printf '%s' "$FIXTURE_JSON" | python3 -c 'import json,sys; v=json.load(sys.stdin); v[sys.argv[1]]=int(sys.argv[2]); print(json.dumps(v))' "$1" "$2")
}
json_dump() { printf '%s\\n' "$FIXTURE_JSON"; }
''')
source = (ROOT / 'root/usr/libexec/rpcd/luci.argon_branding').read_text()
self.script = self.root / 'rpc.sh'
self.script.write_text(source.replace('/usr/share/libubox/jshn.sh', str(shim))
.replace('/www/luci-static/argon/branding', str(self.directory))
.replace('/tmp/argon_branding.lock', str(self.lock))
.replace('/tmp/argon_branding_', self.prefix))
def call(self, method, args=None, env=None):
result = subprocess.run(['sh', str(self.script), 'call', method], input=json.dumps(args or {}) + '\n',
capture_output=True, text=True, check=True, env=env)
return json.loads(result.stdout)
def upload(self, target='both', data=None):
token = secrets.token_hex(16)
Path(self.prefix + token + '.png').write_bytes(data if data is not None else png())
result = self.call('set', {'target': target, 'token': token})
self.assertFalse(self.lock.exists())
self.assertFalse(list(self.directory.glob('.upload.*')))
return result
def test_independent_upload_reset_and_manifest(self):
self.assertEqual(self.call('get'), {'result': 0, 'favicon': '', 'logo': ''})
first = self.upload()
image = 'image-' + hashlib.sha256(png()).hexdigest() + '.png'
self.assertEqual(first, {'result': 0, 'favicon': image, 'logo': image})
self.assertEqual(self.call('get'), first)
manifest = json.loads((self.directory / image.replace('.png', '.webmanifest')).read_text())
self.assertEqual(manifest['icons'], [{'src': image, 'sizes': '64x64', 'type': 'image/png'}])
self.assertEqual((self.directory / image).stat().st_mode & 0o777, 0o644)
self.assertEqual(self.directory.stat().st_mode & 0o777, 0o755)
second = self.upload('logo', png(192, 48))
self.assertEqual(second['favicon'], image)
self.assertNotEqual(second['logo'], image)
reset = self.call('reset', {'target': 'favicon'})
self.assertEqual(reset['favicon'], '')
self.assertEqual(reset['logo'], second['logo'])
self.assertEqual(self.call('reset', {'target': 'both'}), {'result': 0, 'favicon': '', 'logo': ''})
def test_invalid_images_leave_current_state_intact(self):
first = self.upload()
invalid = [b'<svg onload="alert(1)"></svg>', png()[:-4], png(15, 64), png(1025, 64),
png(64, 32), png() + b'\0' * 1048576, png().replace(b'IDAT', b'ABCD')]
for data in invalid:
with self.subTest(size=len(data)):
self.assertEqual(self.upload(data=data)['result'], 2)
self.assertEqual(self.call('get'), first)
self.assertEqual(list(self.root.glob('upload_*')), [])
def test_changed_content_changes_urls_and_old_generations_are_bounded(self):
first = self.upload()
self.assertEqual(self.upload(), first)
for value in range(5):
current = self.upload(data=png(color=bytes([value, 60, 90, 255])))
self.assertNotEqual(current['favicon'], first['favicon'])
self.assertLessEqual(len(list(self.directory.glob('*.png'))), 2)
self.assertLessEqual(len(list(self.directory.glob('*.webmanifest'))), 2)
self.assertEqual(self.call('get'), current)
def test_invalid_targets_tokens_and_symlink_sources(self):
for args in [{'target': '../elsewhere', 'token': 'a'*32}, {'target': 'logo', 'token': '../../etc/config/argon'},
{'target': 'both', 'token': 'b'*32}, {'target': 'logo', 'token': ''}]:
self.assertEqual(self.call('set', args)['result'], 2)
outside = self.root / 'outside.png'
outside.write_bytes(png())
Path(self.prefix + 'a'*32 + '.png').symlink_to(outside)
self.assertEqual(self.call('set', {'target': 'logo', 'token': 'a'*32})['result'], 2)
self.assertEqual(outside.read_bytes(), png())
self.assertFalse(self.directory.exists())
def test_corrupt_state_and_symlink_assets_fall_back(self):
state = self.upload()
(self.directory / 'current.json').write_text('{broken')
self.assertEqual(self.call('get')['favicon'], '')
(self.directory / 'current.json').write_text(json.dumps({'favicon': '../outside.png', 'logo': state['logo']}))
self.assertEqual(self.call('get')['favicon'], '')
image = self.directory / state['logo']
image.unlink()
image.symlink_to(self.root / 'missing')
self.assertEqual(self.call('get')['logo'], '')
def test_symlink_directory_and_index_cannot_overwrite_other_files(self):
outside = self.root / 'outside'
outside.mkdir()
self.directory.symlink_to(outside)
self.assertEqual(self.upload()['result'], 1)
self.assertEqual(list(outside.iterdir()), [])
self.directory.unlink()
self.directory.mkdir()
sentinel = outside / 'sentinel'
sentinel.write_text('keep me')
(self.directory / 'current.json').symlink_to(sentinel)
self.assertEqual(self.upload()['result'], 1)
self.assertEqual(sentinel.read_text(), 'keep me')
def test_busy_and_failed_publication_preserve_state(self):
first = self.upload()
self.lock.mkdir()
self.assertEqual(self.call('reset', {'target': 'both'})['result'], 3)
self.lock.rmdir()
fakebin = self.root / 'bin'
fakebin.mkdir()
(fakebin / 'mv').write_text('#!/bin/sh\nexit 1\n')
(fakebin / 'mv').chmod(0o755)
env = dict(os.environ, PATH=str(fakebin) + os.pathsep + os.environ['PATH'])
self.assertEqual(self.call('reset', {'target': 'both'}, env=env)['result'], 1)
self.assertEqual(self.call('get'), first)
self.assertFalse(self.lock.exists())
def test_backup_directory_contains_all_state_and_assets(self):
first = self.upload()
keep = (ROOT / 'root/lib/upgrade/keep.d/luci-argon-branding').read_text().splitlines()
self.assertIn('/www/luci-static/argon/branding/', keep)
shutil.copytree(self.directory, self.root / 'backup')
shutil.rmtree(self.directory)
shutil.copytree(self.root / 'backup', self.directory)
self.assertEqual(self.call('get'), first)
self.assertTrue((self.directory / first['favicon']).is_file())
self.assertTrue((self.directory / first['favicon'].replace('.png', '.webmanifest')).is_file())
def test_read_acl_and_fixed_upload_scope(self):
acl = json.loads((ROOT / 'root/usr/share/rpcd/acl.d/luci-app-argon-config.json').read_text())['luci-app-argon-config']
self.assertEqual(acl['read']['ubus']['luci.argon_branding'], ['get'])
self.assertEqual(acl['write']['ubus']['luci.argon_branding'], ['set', 'reset'])
self.assertEqual(acl['write']['file']['/tmp/argon_branding_*.png'], ['write'])
self.assertFalse(any('branding' in name for name in acl['read']['file']))
self.assertFalse(any(name.startswith('/www') for name in acl['write']['file']))
@@ -188,7 +188,7 @@ fi
class TranslationTests(unittest.TestCase):
def test_catalogs_cover_current_messages_and_preserve_placeholders(self):
source = (ROOT / 'htdocs/luci-static/resources/view/argon-config.js').read_text()
source = '\n'.join(path.read_text() for path in (ROOT / 'htdocs/luci-static/resources').rglob('*.js'))
acl = json.loads((ROOT / 'root/usr/share/rpcd/acl.d/luci-app-argon-config.json').read_text())
messages = set(re.findall(r"_\('([^']*)'\)", source)) | {'Argon Config', acl['luci-app-argon-config']['description']}
catalogs = sorted((ROOT / 'po').glob('*/argon-config.po'))
+1 -1
View File
@@ -41,7 +41,7 @@ LUCI_DEPENDS:= \
PKG_NAME:=luci-app-homeproxy-pro
PKG_VERSION:=28.10.1.14
PKG_RELEASE:=26
PKG_RELEASE:=27
LUCI_BASENAME:=homeproxy-pro
@@ -132,20 +132,38 @@ hp_crontab_drop() {
# says nothing about the user wanting stale routing data, so the two are now
# scheduled independently.
#
# The hour is a constant rather than a setting. This is a maintenance job with
# nothing to configure, and adding an option for it is exactly the kind of
# switch that ends up defaulted and never touched. Two hours earlier than the
# subscription default (2) so the two runs of uclient-fetch do not collide.
# The schedule is a constant rather than a setting. This is a maintenance job
# with nothing to configure, and adding an option for it is exactly the kind of
# switch that ends up defaulted and never touched.
#
# Weekly (Monday 03:00), not daily, and the reason is the cost rather than the
# freshness. The upstream lists really do move most days - a Monday run on a
# router whose last run was the previous Monday typically finds something new -
# so a daily schedule meant a `fw4 reload` roughly every other day, and
# `fw4 reload` rewrites the whole ruleset: every connection in flight is
# dropped, and miniupnpd's mappings have to be reinstalled afterwards
# (hp_restore_upnp_mappings). Paying that once a week for routing data that
# drifts by a few hundred CIDRs a day is the right trade; a user who wants a
# fresher list can still press the update button in the LuCI status page, which
# runs the same script.
#
# 03:00 rather than the hour-2 default the subscription update uses, so the two
# runs of uclient-fetch do not land on the same minute.
#
# The entry runs update_resources_cron.sh, which reloads the service only when a
# list actually changed - so a day where the upstream lists did not move costs
# list actually changed - so a week where the upstream lists did not move costs
# one round of requests and no interruption.
#
# cron fields, for the record: `0 3 * * 1` is minute 0, hour 3, any day of the
# month, any month, day-of-week 1 = Monday. Times are the router's local time,
# which is the same clock the log lines above are stamped with.
HP_RESOURCE_CRON_HOUR=3
HP_RESOURCE_CRON_DOW=1
hp_sync_resource_cron() {
hp_crontab_drop "/etc/crontabs/root" "${CONF}_resource_cron" \
|| log "Warning: failed to drop the previous resource-update cron entry."
printf '0 %s * * * %s/scripts/update_resources_cron.sh #%s_resource_cron\n' \
"$HP_RESOURCE_CRON_HOUR" "$HP_DIR" "$CONF" >> "/etc/crontabs/root" \
printf '0 %s * * %s %s/scripts/update_resources_cron.sh #%s_resource_cron\n' \
"$HP_RESOURCE_CRON_HOUR" "$HP_RESOURCE_CRON_DOW" "$HP_DIR" "$CONF" >> "/etc/crontabs/root" \
|| log "Warning: failed to install the resource-update cron entry."
/etc/init.d/cron restart >"/dev/null" 2>&1 || log "Warning: failed to restart cron."
}
@@ -136,7 +136,7 @@ install_download() {
# puts in place. reload does not re-render it (measured on the device: the
# command returns 0, the file's mtime does not move, the set keeps its old
# elements). So the two halves would read the same file on different days,
# and the gap grows with every nightly update.
# and the gap grows with every update.
#
# The direction that matters is the one where the kernel is *ahead* of the
# file: a segment the list has since dropped still matches the set, and
@@ -155,7 +155,7 @@ install_download() {
#
# Every failure is non-fatal on purpose. A list that is installed but not yet
# in the firewall is the one state this script is allowed to leave behind:
# the next nightly run, or the next service start, closes it. Failing the
# the next scheduled run, or the next service start, closes it. Failing the
# update instead would turn a cosmetic lag into a resource that can never
# refresh.
sync_firewall_sets() {
@@ -4,8 +4,9 @@
# Refresh the four resource lists (china_ip4 / china_ip6 / gfw_list /
# china_list) and reload the service only when one of them actually moved.
#
# Scheduled unconditionally - see hp_sync_resource_cron() in runtime/service.sh
# for why this is not behind the subscription auto_update switch.
# Scheduled unconditionally, weekly on Monday 03:00 - see
# hp_sync_resource_cron() in runtime/service.sh for why this is not behind the
# subscription auto_update switch, and why it is not daily.
#
# Why a reload is needed at all, when the sing-box side reloads itself: the
# lists feed two consumers. update_resources.sh regenerates the sing-box
@@ -17,7 +18,7 @@
# disagreed. That window is invisible: mainland traffic still works, it just
# stops being mainland for whatever the new entries added.
#
# update_resources.sh exits 3 when a list is already current, so a day with no
# update_resources.sh exits 3 when a list is already current, so a week with no
# upstream movement costs one round of requests and no interruption.
SCRIPTS_DIR="/etc/homeproxy-pro/scripts"
+1 -1
View File
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-honk
PKG_VERSION:=1.1.4
PKG_RELEASE:=18
PKG_RELEASE:=19
LUCI_TITLE:=LuCI support for honk
LUCI_PKGARCH:=all
+3
View File
@@ -356,3 +356,6 @@ msgstr "未运行"
msgid "Zashboard"
msgstr "Zashboard"
msgid "Saved, but the panel files are not installed yet — download the panel first."
msgstr "配置已保存,但面板文件尚未安装,请先下载面板。"
@@ -1 +1 @@
import{j as r}from"./vendor-react-64fcanlc.js";import{I as a}from"./index-XeGFdFb3.js";function o(o){return r.jsx(a,{...o,children:r.jsx("path",{fill:"currentColor",d:"M10 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17m0 15.5a7 7 0 1 1 0-14 7 7 0 0 1 0 14m3.75-7.75h-3v-3a.75.75 0 0 0-1.5 0v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5"})})}export{o as A};
import{j as r}from"./vendor-react-64fcanlc.js";import{I as a}from"./index-HxEUeoab.js";function o(o){return r.jsx(a,{...o,children:r.jsx("path",{fill:"currentColor",d:"M10 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17m0 15.5a7 7 0 1 1 0-14 7 7 0 0 1 0 14m3.75-7.75h-3v-3a.75.75 0 0 0-1.5 0v3h-3a.75.75 0 0 0 0 1.5h3v3a.75.75 0 0 0 1.5 0v-3h3a.75.75 0 0 0 0-1.5"})})}export{o as A};
@@ -1 +1 @@
import{r as e,$ as s,j as l}from"./vendor-react-64fcanlc.js";import{cB as a,cA as n,cD as t,cC as c,fU as i,dZ as r,fV as o,cQ as d,cV as u,d3 as p,d2 as b,cU as h,eW as m,cl as f,fW as x,b7 as j,fX as v,fY as g,cn as C,bw as y,fZ as N,dh as k,f_ as A,di as P,co as S,u as M,b4 as D,f$ as w,bp as L,fr as q,g0 as I,fs as V,dj as $,fu as H,g1 as F,ft as E,T as O,I as z,bg as B,B as R,dV as T}from"./index-XeGFdFb3.js";import{a as K,b as U}from"./ItemText-Bvif-kkw.js";const W=e.createContext(null),Z=e.forwardRef(function(e,l){[e,l]=d(e,l,W);let m=e.href&&!e.isDisabled?"a":"span",{linkProps:f,isPressed:x}=function(e,s){let{elementType:l="a",onPress:d,onPressStart:u,onPressEnd:p,onPressChange:b,onClick:h,isDisabled:m,...f}=e,x={};"a"!==l&&(x={role:"link",tabIndex:m?void 0:0});let{focusableProps:j}=a(e,s),{pressProps:v,isPressed:g}=n({onPress:d,onPressStart:u,onPressEnd:p,onPressChange:b,onClick:h,isDisabled:m,ref:s}),C=t(f,{labelable:!0}),y=c(j,v),N=i(),k=r(e);return{isPressed:g,linkProps:c(C,k,{...y,...x,"aria-disabled":m||void 0,"aria-current":e["aria-current"],onClick:s=>{v.onClick?.(s),o(s,N,e.href,e.routerOptions)}})}}({...e,elementType:m},l),j=u[m],{hoverProps:v,isHovered:g}=p(e),{focusProps:C,isFocused:y,isFocusVisible:N}=b(),k=h({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:x,isHovered:g,isFocused:y,isFocusVisible:N}}),A=t(e,{global:!0});return delete A.onClick,s.createElement(j,{ref:l,slot:e.slot||void 0,...c(A,k,f,v,C),"data-focused":y||void 0,"data-hovered":g||void 0,"data-pressed":x||void 0,"data-focus-visible":N||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},k.children)});function _({external:e,layout:s,appearance:a,label:n,className:t,quiet:c,secondary:i,small:r,icon:o,accent:d,negative:u,size:p,...b}){const h="button"===a?m({quiet:c,secondary:i,small:r,icon:o,accent:d,negative:u}):`rp-${a}`,v=f(p);return l.jsx(Z,{target:e?"_blank":void 0,rel:e?"noreferrer":void 0,"aria-label":n,"data-layout":s,"data-size":v,...b,className:a?x(t,e=>j(h,e)):t})}const Q=e=>e>12,X=e=>s=>{if("all"===s)return;const l=[...s][0];null!=l&&e(String(l))};function Y({item:e,children:s,onAction:a}){return l.jsxs(E,{id:e.id,className:"rp-item",textValue:e.label,onAction:a,children:[l.jsx(K,{}),l.jsx(U,{i:e,children:s})]})}function G({children:s,content:a,label:n,quiet:t,small:c,size:i,chevron:r=!0,isDisabled:o,appearance:d,placement:u="bottom end",count:p,onIntent:b}){const h=p?l.jsx("span",{className:"rp-count","aria-hidden":"true",children:p}):null,x=g(o),[j,v]=e.useState(!1),M=f(i),D=e.useRef(null),w=l.jsxs(C,{ref:D,className:d?"rp-select":m({quiet:t,small:c,icon:!r}),"data-size":M,"aria-label":n,"aria-describedby":x?.id,isDisabled:o,onHoverStart:b,onFocus:b,children:[s,h,r&&l.jsx(y,{className:"rp-chev"})]});return l.jsxs(N,{children:[r&&!x?w:l.jsxs(k,{delay:400,isOpen:j,onOpenChange:v,children:[l.jsx(A,{children:l.jsx("span",{className:"rp-tipwrap",tabIndex:o?0:-1,"data-passive":o?void 0:"",onPointerDown:e=>{o&&"touch"===e.pointerType&&v(e=>!e)},children:w})}),l.jsx(P,{triggerRef:D,children:x?.text??n})]}),l.jsx(S,{className:"rp-popover rp-list-popover",placement:u,children:a})]})}function J({label:e,labelledBy:s,sections:a,headers:n=!0,focusedByCaller:t,onAction:c,searchLabel:i,actions:r=[]}){const o="function"==typeof a?a():a,d=!!i&&Q(ee(o)),u=l.jsxs(q,{"aria-label":e,"aria-labelledby":s??"",className:d?"rp-menu-scroll":void 0,autoFocus:!t&&void 0,children:[o.map(e=>l.jsxs(V,{"aria-label":n&&!e.hideHeader?void 0:e.title,selectionMode:e.selectionMode??"single",selectedKeys:[`/choice-${e.value}`],onSelectionChange:e.onChange&&X(s=>e.onChange(s.slice(8))),children:[n&&!e.hideHeader&&l.jsx($,{className:"rp-sec-h",children:e.title}),e.items.map(e=>l.jsx(Y,{item:{...e,id:`/choice-${e.id}`},onAction:c&&(()=>c(e.id))},e.id))]},e.title)),r.length>0&&l.jsx(H,{className:"rp-hrule"}),r.map(e=>l.jsx(le,{...e},e.label))]});return d?l.jsx(F,{label:i,children:u}):u}const ee=e=>e.reduce((e,s)=>e+s.items.length,0);function se(e,s){for(const l of e){const a=l.items.find(e=>e.id===l.value);if(a)return e.length>1&&!l.plain&&a.label!==l.title?s("ui.sectionChoice",{section:l.title,item:a.label}):a.label}return""}const le=({label:e,icon:s,onAction:a})=>l.jsxs(E,{className:"rp-item rp-subitem",textValue:e,onAction:a,shouldCloseOnSelect:!0,children:[l.jsx("span",{className:"ic",children:s}),l.jsx(O,{children:e})]}),ae=({id:e,label:s,icon:a,sections:n})=>{const t=M();return l.jsxs(E,{id:e,className:"rp-item rp-subitem",textValue:s,children:[l.jsx("span",{className:"ic",children:a}),l.jsx(O,{children:s}),l.jsxs("span",{className:"desc",children:[se(n,t),l.jsx(y,{className:"rp-chev-end"})]})]})};function ne({label:s,submenus:a,actions:n=[]}){const t="function"==typeof a?a():a,c=M(),i=D(w),[r,o]="rtl"===L().direction?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],[{open:d,left:u},p]=e.useState({open:null,left:null}),b=e.useRef(null),hLine truncated
import{r as e,$ as s,j as l}from"./vendor-react-64fcanlc.js";import{cB as a,cA as n,cD as t,cC as c,fU as i,dZ as r,fV as o,cQ as d,cV as u,d3 as p,d2 as b,cU as h,eW as m,cm as f,fW as x,b7 as j,fX as v,fY as g,cl as C,bw as y,fZ as N,dh as k,f_ as A,di as P,co as S,u as M,b4 as D,f$ as w,bp as L,fr as q,g0 as I,fs as V,dj as $,fu as H,g1 as F,ft as E,T as O,I as z,bg as B,B as R,dV as T}from"./index-HxEUeoab.js";import{a as K,b as U}from"./ItemText-DOD_75iR.js";const W=e.createContext(null),Z=e.forwardRef(function(e,l){[e,l]=d(e,l,W);let m=e.href&&!e.isDisabled?"a":"span",{linkProps:f,isPressed:x}=function(e,s){let{elementType:l="a",onPress:d,onPressStart:u,onPressEnd:p,onPressChange:b,onClick:h,isDisabled:m,...f}=e,x={};"a"!==l&&(x={role:"link",tabIndex:m?void 0:0});let{focusableProps:j}=a(e,s),{pressProps:v,isPressed:g}=n({onPress:d,onPressStart:u,onPressEnd:p,onPressChange:b,onClick:h,isDisabled:m,ref:s}),C=t(f,{labelable:!0}),y=c(j,v),N=i(),k=r(e);return{isPressed:g,linkProps:c(C,k,{...y,...x,"aria-disabled":m||void 0,"aria-current":e["aria-current"],onClick:s=>{v.onClick?.(s),o(s,N,e.href,e.routerOptions)}})}}({...e,elementType:m},l),j=u[m],{hoverProps:v,isHovered:g}=p(e),{focusProps:C,isFocused:y,isFocusVisible:N}=b(),k=h({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:x,isHovered:g,isFocused:y,isFocusVisible:N}}),A=t(e,{global:!0});return delete A.onClick,s.createElement(j,{ref:l,slot:e.slot||void 0,...c(A,k,f,v,C),"data-focused":y||void 0,"data-hovered":g||void 0,"data-pressed":x||void 0,"data-focus-visible":N||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},k.children)});function _({external:e,layout:s,appearance:a,label:n,className:t,quiet:c,secondary:i,small:r,icon:o,accent:d,negative:u,size:p,...b}){const h="button"===a?m({quiet:c,secondary:i,small:r,icon:o,accent:d,negative:u}):`rp-${a}`,v=f(p);return l.jsx(Z,{target:e?"_blank":void 0,rel:e?"noreferrer":void 0,"aria-label":n,"data-layout":s,"data-size":v,...b,className:a?x(t,e=>j(h,e)):t})}const Q=e=>e>12,X=e=>s=>{if("all"===s)return;const l=[...s][0];null!=l&&e(String(l))};function Y({item:e,children:s,onAction:a}){return l.jsxs(E,{id:e.id,className:"rp-item",textValue:e.label,onAction:a,children:[l.jsx(K,{}),l.jsx(U,{i:e,children:s})]})}function G({children:s,content:a,label:n,quiet:t,small:c,size:i,chevron:r=!0,isDisabled:o,appearance:d,placement:u="bottom end",count:p,onIntent:b}){const h=p?l.jsx("span",{className:"rp-count","aria-hidden":"true",children:p}):null,x=g(o),[j,v]=e.useState(!1),M=f(i),D=e.useRef(null),w=l.jsxs(C,{ref:D,className:d?"rp-select":m({quiet:t,small:c,icon:!r}),"data-size":M,"aria-label":n,"aria-describedby":x?.id,isDisabled:o,onHoverStart:b,onFocus:b,children:[s,h,r&&l.jsx(y,{className:"rp-chev"})]});return l.jsxs(N,{children:[r&&!x?w:l.jsxs(k,{delay:400,isOpen:j,onOpenChange:v,children:[l.jsx(A,{children:l.jsx("span",{className:"rp-tipwrap",tabIndex:o?0:-1,"data-passive":o?void 0:"",onPointerDown:e=>{o&&"touch"===e.pointerType&&v(e=>!e)},children:w})}),l.jsx(P,{triggerRef:D,children:x?.text??n})]}),l.jsx(S,{className:"rp-popover rp-list-popover",placement:u,children:a})]})}function J({label:e,labelledBy:s,sections:a,headers:n=!0,focusedByCaller:t,onAction:c,searchLabel:i,actions:r=[]}){const o="function"==typeof a?a():a,d=!!i&&Q(ee(o)),u=l.jsxs(q,{"aria-label":e,"aria-labelledby":s??"",className:d?"rp-menu-scroll":void 0,autoFocus:!t&&void 0,children:[o.map(e=>l.jsxs(V,{"aria-label":n&&!e.hideHeader?void 0:e.title,selectionMode:e.selectionMode??"single",selectedKeys:[`/choice-${e.value}`],onSelectionChange:e.onChange&&X(s=>e.onChange(s.slice(8))),children:[n&&!e.hideHeader&&l.jsx($,{className:"rp-sec-h",children:e.title}),e.items.map(e=>l.jsx(Y,{item:{...e,id:`/choice-${e.id}`},onAction:c&&(()=>c(e.id))},e.id))]},e.title)),r.length>0&&l.jsx(H,{className:"rp-hrule"}),r.map(e=>l.jsx(le,{...e},e.label))]});return d?l.jsx(F,{label:i,children:u}):u}const ee=e=>e.reduce((e,s)=>e+s.items.length,0);function se(e,s){for(const l of e){const a=l.items.find(e=>e.id===l.value);if(a)return e.length>1&&!l.plain&&a.label!==l.title?s("ui.sectionChoice",{section:l.title,item:a.label}):a.label}return""}const le=({label:e,icon:s,onAction:a})=>l.jsxs(E,{className:"rp-item rp-subitem",textValue:e,onAction:a,shouldCloseOnSelect:!0,children:[l.jsx("span",{className:"ic",children:s}),l.jsx(O,{children:e})]}),ae=({id:e,label:s,icon:a,sections:n})=>{const t=M();return l.jsxs(E,{id:e,className:"rp-item rp-subitem",textValue:s,children:[l.jsx("span",{className:"ic",children:a}),l.jsx(O,{children:s}),l.jsxs("span",{className:"desc",children:[se(n,t),l.jsx(y,{className:"rp-chev-end"})]})]})};function ne({label:s,submenus:a,actions:n=[]}){const t="function"==typeof a?a():a,c=M(),i=D(w),[r,o]="rtl"===L().direction?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],[{open:d,left:u},p]=e.useState({open:null,left:null}),b=e.useRef(null),hLine truncated
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{u as a,f as s,g2 as n,dr as o,g3 as l}from"./index-XeGFdFb3.js";import{a as i,aW as r,aX as c,aY as u,aZ as h,a_ as m,a$ as p,b0 as d,b1 as x}from"./activity-7OeQMmIs.js";import{G as f,C as M}from"./AreaCurve-DQSHOSpG.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./AppearanceControls-Q-jHRGz9.js";import"./ItemText-Bvif-kkw.js";import"./logs-DNePHVHd.js";import"./Select-OqnbuzuK.js";import"./array-C0VuvQyb.js";const g=[30,60,120,300,600,900,1800,3600,7200,21600,43200,86400].map(e=>1e3*e);function j(t,a){const[s,n]=e.useState([]),o=e.useRef("");return e.useLayoutEffect(()=>{const e=[a,...t].join("\0");if(e===o.current)return;o.current=e;const s=document.createElement("span");s.className="rp-area-tick",Object.assign(s.style,{position:"absolute",top:"-20000px",whiteSpace:"pre"}),document.body.appendChild(s),n(t.map(e=>{s.textContent=e;const{width:t,height:a}=s.getBoundingClientRect();return{width:t,height:a}})),s.remove()},[t,a]),s}function y({label:y,series:b,timestamps:v,fmt:w,locale:k,height:C=150,baseline:D="zero",window:$,fill:N,bare:S=!1,inset:A=2}){const L=a(),T=i(),B=e.useId(),[E,F]=s(Math.round,120),{tip:P,showAt:I,hide:K}=r(),[W,z]=e.useState(null),O=W&&W.index<v.length?W.index:null,R=$?$.until-$.since:v.length?v[v.length-1]-v[0]:0,_=$?.since,G=$?.until,H=e.useMemo(()=>void 0!==_&&void 0!==G?function(e,t){const a=t-e,s=g.find(e=>a/e<=6)??g[g.length-1],n=s>=864e5?6e4*new Date(t).getTimezoneOffset():0,o=[];for(let l=Math.ceil((e-n)/s)*s+n;l<=t;l+=s)l-e>=.04*a&&t-l>=.04*a&&o.push(l);return{ticks:o,step:s}}(_,G):void 0,[_,G]),X=H?H.step<6e4:R<18e4,Y=H?H.step>=864e5:R>1296e5,Z=e.useMemo(()=>Y?n(k):o(k,X),[k,X,Y]),{yDomain:q,yTicks:J}=e.useMemo(()=>{const e=b.flatMap(e=>e.values.filter(e=>null!==e));let t=0,a=(e=>{const t=Math.pow(10,Math.floor(Math.log10(e))),a=e/t;return([1,1.2,1.5,2,2.5,3,4,5,6,8,10].find(e=>a<=e)??10)*t})(1.08*Math.max(1,...e));if("auto"===D&&e.length){const s=Math.min(...e),n=Math.max(...e),o=(e=>{const t=Math.pow(10,Math.floor(Math.log10(Math.max(e,1e-9)))),a=e/t;return(a<=1?.2:a<=2?.5:a<=5?1:2)*t})(Math.max(n-s,.02*n,1));t=Math.max(0,Math.floor(s/o)*o-o),a=Math.ceil(n/o)*o+o}return{yDomain:[t,a],yTicks:"auto"===D?[t,(t+a)/2,a]:[a/2,a]}},[b,D]),Q=e.useMemo(()=>{const e=v.length-1;return H?H.ticks:[...new Set((X?[0,Math.round(e/2),e]:[0,Math.round(e/3),Math.round(2*e/3),e]).map(e=>v[e]))]},[H,X,v]),U=e.useMemo(()=>void 0!==_&&void 0!==G?[_,G]:[Math.min(...v),Math.max(...v)],[_,G,v]),V=F?.width??0,ee=F?.height??C,te=S?A:20,ae=S?2:8,se=ee-(S?2:30),ne=V-(S?A:64),oe=e.useMemo(()=>[Math.min(U[0],...v),Math.max(U[1],...v)],[U,v]),le=e.useCallback(e=>c(e,oe,[te,ne]),[oe,te,ne]),ie=e.useCallback(e=>c(e,q,[se,ae]),[q,se,ae]),re=e.useMemo(()=>v.map(le),[v,le]),ce=e.useMemo(()=>b.map(e=>v.map((t,a)=>null==e.values[a]?null:{x:re[a],y:ie(e.values[a])})),[b,v,re,ie]),ue={x:te,y:ae,width:ne-te,height:se-ae},he=(e,t)=>z({index:e,y:t}),me=()=>{z(null),K()};e.useLayoutEffect(()=>{null!==O&&b.some(e=>null!=e.values[O])?I({x:re[O],y:W?.y??(ae+se)/2,width:V,bounds:S&&E.current?u(E.current):ue,label:l(k).format(v[O]),lines:b.filter(e=>null!=e.values[O]).sort((e,t)=>e.label<t.label?-1:e.label>t.label?1:0).map(e=>L("ui.valuePair",{label:e.label,value:w(e.values[O])}))}):K()});const pe=h(v.length,he,me),de=e.useMemo(()=>Q.map(e=>Z.format(e)),[Q,Z]),xe=e.useMemo(()=>J.map(w),[J,w]),fe=j(de,k),Me=j(xe,k),ge=H?m(Q.map(le),fe.map(e=>e.width),0,V,16,!0):function(e,t,a){const s=a=>[e[a]-(t[a]??0)/2,e[a]+(t[a]??0)/2],n=e.length-1,o=[];let l=1/0;for(let i=n;i>=0;i--){const[t,r]=s(i);r+a>l||i>0&&i<n&&t<s(0)[1]+a||(o.unshift({index:i,position:e[i]}),l=t)}return o}(Q.map(le),fe.map(e=>e.width),8),je=m(J.map(ie),Me.map(e=>e.height),0,ee,5,!1),ye=[...new Set([...(S?J:je.map(e=>J[e.index])).map(ie),ae,se])];return t.jsx("div",{ref:E,style:{height:C,width:"100%",flex:N?"1 0 auto":void 0,position:"relative"},onPointerLeave:pe.onPointerLeave,children:v.length>0&&F&&t.jsxs(t.Fragment,{children:[t.jsx(p,{tip:P}),t.jsxs("svg",{className:"rp-activity-surface",width:V,height:ee,viewBox:`0 0 ${V} ${ee}`,style:{display:"block"},role:"application","aria-label":y,tabIndex:0,onFocus:pe.onFocus,onBlur:pe.onBlur,onKeyDown:pe.onKeyDown,onPointerMove:e=>{const{x:t,y:a}=d(e,e.currentTarget,{width:V,height:ee});if(t<te||t>ne||a<ae||a>se)return void me();const s=x(re,t);he(s,a)},children:[t.jsx("g",{className:"rp-area-grid",children:ye.map(e=>t.jsx("line",{x1:te,x2:ne,y1:e,y2:e,stroke:T["hl-med"],strokeDasharray:"2 4",fill:"none"},e))}),t.jsx("defs",{children:b.map((e,a)=>t.jsx(f,{id:B+a,color:e.color},e.label))}),b.map((e,a)=>t.jsx(M,{points:ce[a],baseline:ie(Math.max(0,q[0])),color:e.color,id:B+a,strokeWidth:2},e.label)),null!==O&&t.jsx("path",{d:`M${re[O]},${ae}L${re[O]},${se}`,stroke:T.subtle,strokeDasharray:"3 3",fill:"none",pointerEvents:"none"}),!S&&t.jsxs(t.Fragment,{children:[t.jsx("g",{children:ge.map(({index:e,position:a})=>t.jsx("text",{x:Line truncated
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{u as a,f as s,g2 as n,dr as o,g3 as l}from"./index-HxEUeoab.js";import{a as i,aW as r,aX as c,aY as u,aZ as h,a_ as m,a$ as p,b0 as d,b1 as x}from"./activity-yZTrGy-J.js";import{G as f,C as M}from"./AreaCurve-DQSHOSpG.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./AppearanceControls-sRy1p156.js";import"./ItemText-DOD_75iR.js";import"./logs-C4GIy4tX.js";import"./Select-D7_6MaHd.js";import"./array-C0VuvQyb.js";const g=[30,60,120,300,600,900,1800,3600,7200,21600,43200,86400].map(e=>1e3*e);function j(t,a){const[s,n]=e.useState([]),o=e.useRef("");return e.useLayoutEffect(()=>{const e=[a,...t].join("\0");if(e===o.current)return;o.current=e;const s=document.createElement("span");s.className="rp-area-tick",Object.assign(s.style,{position:"absolute",top:"-20000px",whiteSpace:"pre"}),document.body.appendChild(s),n(t.map(e=>{s.textContent=e;const{width:t,height:a}=s.getBoundingClientRect();return{width:t,height:a}})),s.remove()},[t,a]),s}function y({label:y,series:b,timestamps:v,fmt:w,locale:k,height:C=150,baseline:D="zero",window:$,fill:N,bare:S=!1,inset:A=2}){const L=a(),T=i(),B=e.useId(),[E,F]=s(Math.round,120),{tip:P,showAt:I,hide:K}=r(),[W,z]=e.useState(null),O=W&&W.index<v.length?W.index:null,R=$?$.until-$.since:v.length?v[v.length-1]-v[0]:0,_=$?.since,G=$?.until,H=e.useMemo(()=>void 0!==_&&void 0!==G?function(e,t){const a=t-e,s=g.find(e=>a/e<=6)??g[g.length-1],n=s>=864e5?6e4*new Date(t).getTimezoneOffset():0,o=[];for(let l=Math.ceil((e-n)/s)*s+n;l<=t;l+=s)l-e>=.04*a&&t-l>=.04*a&&o.push(l);return{ticks:o,step:s}}(_,G):void 0,[_,G]),X=H?H.step<6e4:R<18e4,Y=H?H.step>=864e5:R>1296e5,Z=e.useMemo(()=>Y?n(k):o(k,X),[k,X,Y]),{yDomain:q,yTicks:J}=e.useMemo(()=>{const e=b.flatMap(e=>e.values.filter(e=>null!==e));let t=0,a=(e=>{const t=Math.pow(10,Math.floor(Math.log10(e))),a=e/t;return([1,1.2,1.5,2,2.5,3,4,5,6,8,10].find(e=>a<=e)??10)*t})(1.08*Math.max(1,...e));if("auto"===D&&e.length){const s=Math.min(...e),n=Math.max(...e),o=(e=>{const t=Math.pow(10,Math.floor(Math.log10(Math.max(e,1e-9)))),a=e/t;return(a<=1?.2:a<=2?.5:a<=5?1:2)*t})(Math.max(n-s,.02*n,1));t=Math.max(0,Math.floor(s/o)*o-o),a=Math.ceil(n/o)*o+o}return{yDomain:[t,a],yTicks:"auto"===D?[t,(t+a)/2,a]:[a/2,a]}},[b,D]),Q=e.useMemo(()=>{const e=v.length-1;return H?H.ticks:[...new Set((X?[0,Math.round(e/2),e]:[0,Math.round(e/3),Math.round(2*e/3),e]).map(e=>v[e]))]},[H,X,v]),U=e.useMemo(()=>void 0!==_&&void 0!==G?[_,G]:[Math.min(...v),Math.max(...v)],[_,G,v]),V=F?.width??0,ee=F?.height??C,te=S?A:20,ae=S?2:8,se=ee-(S?2:30),ne=V-(S?A:64),oe=e.useMemo(()=>[Math.min(U[0],...v),Math.max(U[1],...v)],[U,v]),le=e.useCallback(e=>c(e,oe,[te,ne]),[oe,te,ne]),ie=e.useCallback(e=>c(e,q,[se,ae]),[q,se,ae]),re=e.useMemo(()=>v.map(le),[v,le]),ce=e.useMemo(()=>b.map(e=>v.map((t,a)=>null==e.values[a]?null:{x:re[a],y:ie(e.values[a])})),[b,v,re,ie]),ue={x:te,y:ae,width:ne-te,height:se-ae},he=(e,t)=>z({index:e,y:t}),me=()=>{z(null),K()};e.useLayoutEffect(()=>{null!==O&&b.some(e=>null!=e.values[O])?I({x:re[O],y:W?.y??(ae+se)/2,width:V,bounds:S&&E.current?u(E.current):ue,label:l(k).format(v[O]),lines:b.filter(e=>null!=e.values[O]).sort((e,t)=>e.label<t.label?-1:e.label>t.label?1:0).map(e=>L("ui.valuePair",{label:e.label,value:w(e.values[O])}))}):K()});const pe=h(v.length,he,me),de=e.useMemo(()=>Q.map(e=>Z.format(e)),[Q,Z]),xe=e.useMemo(()=>J.map(w),[J,w]),fe=j(de,k),Me=j(xe,k),ge=H?m(Q.map(le),fe.map(e=>e.width),0,V,16,!0):function(e,t,a){const s=a=>[e[a]-(t[a]??0)/2,e[a]+(t[a]??0)/2],n=e.length-1,o=[];let l=1/0;for(let i=n;i>=0;i--){const[t,r]=s(i);r+a>l||i>0&&i<n&&t<s(0)[1]+a||(o.unshift({index:i,position:e[i]}),l=t)}return o}(Q.map(le),fe.map(e=>e.width),8),je=m(J.map(ie),Me.map(e=>e.height),0,ee,5,!1),ye=[...new Set([...(S?J:je.map(e=>J[e.index])).map(ie),ae,se])];return t.jsx("div",{ref:E,style:{height:C,width:"100%",flex:N?"1 0 auto":void 0,position:"relative"},onPointerLeave:pe.onPointerLeave,children:v.length>0&&F&&t.jsxs(t.Fragment,{children:[t.jsx(p,{tip:P}),t.jsxs("svg",{className:"rp-activity-surface",width:V,height:ee,viewBox:`0 0 ${V} ${ee}`,style:{display:"block"},role:"application","aria-label":y,tabIndex:0,onFocus:pe.onFocus,onBlur:pe.onBlur,onKeyDown:pe.onKeyDown,onPointerMove:e=>{const{x:t,y:a}=d(e,e.currentTarget,{width:V,height:ee});if(t<te||t>ne||a<ae||a>se)return void me();const s=x(re,t);he(s,a)},children:[t.jsx("g",{className:"rp-area-grid",children:ye.map(e=>t.jsx("line",{x1:te,x2:ne,y1:e,y2:e,stroke:T["hl-med"],strokeDasharray:"2 4",fill:"none"},e))}),t.jsx("defs",{children:b.map((e,a)=>t.jsx(f,{id:B+a,color:e.color},e.label))}),b.map((e,a)=>t.jsx(M,{points:ce[a],baseline:ie(Math.max(0,q[0])),color:e.color,id:B+a,strokeWidth:2},e.label)),null!==O&&t.jsx("path",{d:`M${re[O]},${ae}L${re[O]},${se}`,stroke:T.subtle,strokeDasharray:"3 3",fill:"none",pointerEvents:"none"}),!S&&t.jsxs(t.Fragment,{children:[t.jsx("g",{children:ge.map(({index:e,position:a})=>t.jsx("text",{x:Line truncated
@@ -1 +1 @@
import{ez as e,g4 as t,cC as i,fj as a,cP as s,g5 as l,g6 as n,em as r,en as o,ep as d,eP as c,cL as u,ey as m,eo as f,cK as v,cQ as p,cR as g,cS as b,c$ as h,d0 as R,d1 as I,d2 as M,d3 as P,cU as y,cD as S,cV as C,aD as V}from"./index-XeGFdFb3.js";import{r as x,$ as D}from"./vendor-react-64fcanlc.js";function $(t,i){const a=x.useRef(!0),s=x.useRef(null);let l=e(t);x.useEffect(()=>(a.current=!0,()=>{a.current=!1}),[]),x.useEffect(()=>{let e=s.current;a.current?a.current=!1:e&&!i.some((t,i)=>!Object.is(t,e[i]))||l(),s.current=i},i)}function E(e,a,s){let{labelProps:l,inputProps:n,descriptionProps:r,errorMessageProps:o,isSelected:d,isPressed:c,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:v,validationDetails:p}=t(e,a,s),{isIndeterminate:g}=e;return x.useEffect(()=>{s.current&&(s.current.indeterminate=!!g)}),{labelProps:i(l,x.useMemo(()=>({onMouseDown:e=>e.preventDefault()}),[])),inputProps:n,descriptionProps:r,errorMessageProps:o,isSelected:d,isPressed:c,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:v,validationDetails:p}}const B=new WeakMap;var O;function k(e,t){let{getRowText:i=e=>t.collection.getTextValue?.(e)??t.collection.getItem(e)?.textValue}=e,a=o((s=O)&&s.__esModule?s.default:s,"@react-aria/grid");var s;let l=t.selectionManager.rawSelection,n=x.useRef(l),r=x.useCallback(()=>{if(!t.selectionManager.isFocused||l===n.current)return void(n.current=l);let e=F(l,n.current),s=F(n.current,l),r="replace"===t.selectionManager.selectionBehavior,o=[];if(1===t.selectionManager.selectedKeys.size&&r){let e=t.selectionManager.selectedKeys.keys().next().value;if(null!=e&&t.collection.getItem(e)){let t=i(e);t&&o.push(a.format("selectedItem",{item:t}))}}else if(1===e.size&&0===s.size){let t=e.keys().next().value;if(null!=t){let e=i(t);e&&o.push(a.format("selectedItem",{item:e}))}}else if(1===s.size&&0===e.size){let e=s.keys().next().value;if(null!=e&&t.collection.getItem(e)){let t=i(e);t&&o.push(a.format("deselectedItem",{item:t}))}}"multiple"===t.selectionManager.selectionMode&&(0===o.length||"all"===l||l.size>1||"all"===n.current||n.current?.size>1)&&o.push("all"===l?a.format("selectedAll"):a.format("selectedCount",{count:l.size})),o.length>0&&d(o.join(" ")),n.current=l},[l,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,i,a]);$(()=>{if(!t.selectionManager.isFocused){let e=requestAnimationFrame(r);return()=>cancelAnimationFrame(e)}r()},[l,t.selectionManager.isFocused])}function F(e,t){let i=new Set;if("all"===e||"all"===t)return i;for(let a of e.keys())t.has(a)||i.add(a);return i}function w(e,t){let i=t?.isDisabled,[a,s]=x.useState(!1);return c(()=>{if(e?.current&&!i){let t=()=>{if(e.current){let t=u(e.current,{tabbable:!0});s(!!t.nextNode())}};t();let i=new MutationObserver(t);return i.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{i.disconnect()}}}),!i&&a}function T(e){let t=o((i=O)&&i.__esModule?i.default:i,"@react-aria/grid");var i;let a=m(),s=("pointer"===a||"virtual"===a||null==a)&&"undefined"!=typeof window&&"ontouchstart"in window,l=x.useMemo(()=>{let i,a=e.selectionManager.selectionMode,l=e.selectionManager.selectionBehavior;return s&&(i=t.format("longPressToSelect")),"replace"===l&&"none"!==a&&e.hasItemActions?i:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,s]);return f(l)}function z(e,t){let{key:i}=e,a=t.selectionManager,s=v(),l=!t.selectionManager.canSelectItem(i),n=t.selectionManager.isSelected(i);var r;return{checkboxProps:{id:s,"aria-label":o((r=O)&&r.__esModule?r.default:r,"@react-aria/grid").format("select"),isSelected:n,isDisabled:l,onChange:()=>a.toggleSelection(i)}}}O={"ar-AE":r,"bg-BG":r,"cs-CZ":r,"da-DK":r,"de-DE":r,"el-GR":r,"en-US":{deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."},"es-ES":r,"et-EE":r,"fi-FI":r,"fr-FR":r,"he-IL":r,"hr-HR":r,"hu-HU":r,"it-IT":r,"ja-JP":r,"ko-KR":r,"lt-LT":r,"lv-LV":r,"nb-NO":r,"nl-NL":r,"pl-PL":r,"pt-BR":r,"pt-PT":r,"ro-RO":r,"ru-RU":r,"sk-SK":r,"sl-SI":r,"sr-SP":r,"sv-SE":r,"tr-TR":r,"uk-UA":r,"zh-CN":{deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`},"zh-TW":{deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>Line truncated
import{ez as e,g4 as t,cC as i,fj as a,cP as s,g5 as l,g6 as n,em as r,en as o,ep as d,eP as c,cL as u,ey as m,eo as f,cK as v,cQ as p,cR as g,cS as b,c$ as h,d0 as R,d1 as I,d2 as M,d3 as P,cU as y,cD as S,cV as C,aD as V}from"./index-HxEUeoab.js";import{r as x,$ as D}from"./vendor-react-64fcanlc.js";function $(t,i){const a=x.useRef(!0),s=x.useRef(null);let l=e(t);x.useEffect(()=>(a.current=!0,()=>{a.current=!1}),[]),x.useEffect(()=>{let e=s.current;a.current?a.current=!1:e&&!i.some((t,i)=>!Object.is(t,e[i]))||l(),s.current=i},i)}function E(e,a,s){let{labelProps:l,inputProps:n,descriptionProps:r,errorMessageProps:o,isSelected:d,isPressed:c,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:v,validationDetails:p}=t(e,a,s),{isIndeterminate:g}=e;return x.useEffect(()=>{s.current&&(s.current.indeterminate=!!g)}),{labelProps:i(l,x.useMemo(()=>({onMouseDown:e=>e.preventDefault()}),[])),inputProps:n,descriptionProps:r,errorMessageProps:o,isSelected:d,isPressed:c,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:v,validationDetails:p}}const B=new WeakMap;var O;function k(e,t){let{getRowText:i=e=>t.collection.getTextValue?.(e)??t.collection.getItem(e)?.textValue}=e,a=o((s=O)&&s.__esModule?s.default:s,"@react-aria/grid");var s;let l=t.selectionManager.rawSelection,n=x.useRef(l),r=x.useCallback(()=>{if(!t.selectionManager.isFocused||l===n.current)return void(n.current=l);let e=F(l,n.current),s=F(n.current,l),r="replace"===t.selectionManager.selectionBehavior,o=[];if(1===t.selectionManager.selectedKeys.size&&r){let e=t.selectionManager.selectedKeys.keys().next().value;if(null!=e&&t.collection.getItem(e)){let t=i(e);t&&o.push(a.format("selectedItem",{item:t}))}}else if(1===e.size&&0===s.size){let t=e.keys().next().value;if(null!=t){let e=i(t);e&&o.push(a.format("selectedItem",{item:e}))}}else if(1===s.size&&0===e.size){let e=s.keys().next().value;if(null!=e&&t.collection.getItem(e)){let t=i(e);t&&o.push(a.format("deselectedItem",{item:t}))}}"multiple"===t.selectionManager.selectionMode&&(0===o.length||"all"===l||l.size>1||"all"===n.current||n.current?.size>1)&&o.push("all"===l?a.format("selectedAll"):a.format("selectedCount",{count:l.size})),o.length>0&&d(o.join(" ")),n.current=l},[l,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,i,a]);$(()=>{if(!t.selectionManager.isFocused){let e=requestAnimationFrame(r);return()=>cancelAnimationFrame(e)}r()},[l,t.selectionManager.isFocused])}function F(e,t){let i=new Set;if("all"===e||"all"===t)return i;for(let a of e.keys())t.has(a)||i.add(a);return i}function w(e,t){let i=t?.isDisabled,[a,s]=x.useState(!1);return c(()=>{if(e?.current&&!i){let t=()=>{if(e.current){let t=u(e.current,{tabbable:!0});s(!!t.nextNode())}};t();let i=new MutationObserver(t);return i.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{i.disconnect()}}}),!i&&a}function T(e){let t=o((i=O)&&i.__esModule?i.default:i,"@react-aria/grid");var i;let a=m(),s=("pointer"===a||"virtual"===a||null==a)&&"undefined"!=typeof window&&"ontouchstart"in window,l=x.useMemo(()=>{let i,a=e.selectionManager.selectionMode,l=e.selectionManager.selectionBehavior;return s&&(i=t.format("longPressToSelect")),"replace"===l&&"none"!==a&&e.hasItemActions?i:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,s]);return f(l)}function z(e,t){let{key:i}=e,a=t.selectionManager,s=v(),l=!t.selectionManager.canSelectItem(i),n=t.selectionManager.isSelected(i);var r;return{checkboxProps:{id:s,"aria-label":o((r=O)&&r.__esModule?r.default:r,"@react-aria/grid").format("select"),isSelected:n,isDisabled:l,onChange:()=>a.toggleSelection(i)}}}O={"ar-AE":r,"bg-BG":r,"cs-CZ":r,"da-DK":r,"de-DE":r,"el-GR":r,"en-US":{deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."},"es-ES":r,"et-EE":r,"fi-FI":r,"fr-FR":r,"he-IL":r,"hr-HR":r,"hu-HU":r,"it-IT":r,"ja-JP":r,"ko-KR":r,"lt-LT":r,"lv-LV":r,"nb-NO":r,"nl-NL":r,"pl-PL":r,"pt-BR":r,"pt-PT":r,"ro-RO":r,"ru-RU":r,"sk-SK":r,"sl-SI":r,"sr-SP":r,"sv-SE":r,"tr-TR":r,"uk-UA":r,"zh-CN":{deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`},"zh-TW":{deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>Line truncated
@@ -1 +1 @@
import{r as e,j as r}from"./vendor-react-64fcanlc.js";import{bN as t,gr as o,bM as n,fl as a,bq as c,u as s,df as i,B as l,fr as d,ft as p}from"./index-XeGFdFb3.js";import{S as m,a as u,E as f,C as g,b,l as v,c as x,h,d as y,r as k,e as w,f as C,g as j,i as R,j as A,s as E,k as L,t as M,m as N,n as F,o as O,p as S,q as $,u as q,v as B,w as D,x as I,y as T,z as H,D as K,R as V,A as z,B as G,F as U,G as W,H as P,I as J,J as _,K as Q,L as X}from"./vendor-editor-BRV-W12m.js";import{d as Y,s as Z}from"./daeTokens-BVtuNnWZ.js";import{s as ee}from"./nodes-Bm1vmvln.js";import{M as re}from"./AppearanceControls-Q-jHRGz9.js";import{A as te,n as oe}from"./logs-DNePHVHd.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./index-DUM-iwa2.js";import"./ItemText-Bvif-kkw.js";import"./Select-OqnbuzuK.js";const ne=m.define({name:"dae",languageData:{commentTokens:{line:"#"},closeBrackets:{brackets:["(","{","'",'"']}},startState:Z,token:Y}),ae=["global","subscription","node","group","dns","routing"].map(e=>({label:e,type:"keyword"})),ce=n.map(e=>({label:e,type:"property",apply:e+": "})),se=["domain","dip","sip","dport","sport","l4proto","ipversion","pname","mac","dscp","qname","qtype","upstream"].map(e=>({label:e,type:"function",apply:e+"("})),ie=["geosite","geoip","suffix","full","keyword","regex"].map(e=>({label:e,type:"constant",apply:e+":"})),le=o.map(e=>({label:e,type:"constant"})),de=t.map(e=>({label:e,type:"keyword"})),pe=[{label:"fallback",type:"keyword",apply:"fallback: "},{label:"include",type:"keyword",apply:"include "}];function me(e){return u({override:[r=>function(e,r){const t=e.matchBefore(/[\w.-]*/);if(!t)return null;const o=e.state.doc.lineAt(e.pos),n=o.text.slice(0,e.pos-o.from),a=/->\s*[\w.-]*$/.test(n)||/^\s*fallback:\s*[\w.-]*$/.test(n);if(t.from===t.to&&!e.explicit&&!a)return null;const c=e.state.doc.sliceString(0,e.pos),{blocks:s,tokens:i}=ee(c),l=i.at(-1);if(l?.to===e.pos&&("quoted"===l.kind||"comment"===l.kind))return null;const d=s.find(r=>r.close===e.pos)?.name;let p;if(a)p=[...r().map(e=>({label:e.name,apply:e.written,type:"variable"})),...de];else if(/\b(domain|dip|sip|qname)\(\s*[\w.-]*$/.test(n))p=ie;else if(void 0===d)p=ae.map(e=>({...e,apply:(r,t,o,n)=>{const a=e.label+" {\n \n}";r.dispatch({changes:{from:o,to:n,insert:a},selection:{anchor:o+e.label.length+4}})}}));else if("routing"===d||"dns"===d)p=[...se,...pe];else if("global"===d)p=ce;else{if("group"!==d)return null;p=/\bpolicy\s*:\s*[\w.-]*$/.test(n)?le:[...le.map(e=>({...e,apply:"policy: "+e.label})),{label:"filter",type:"property",apply:"filter: "}]}return{from:t.from,options:p,validFor:/^[\w.-]*$/}}(r,e)]})}function ue(e){let r=!1;const t=r=>(r.state.readOnly&&e(),!1);return f.domEventHandlers({keydown:(e,r)=>function(e){return"Backspace"===e.key||"Delete"===e.key||"Enter"===e.key||1===[...e.key].length&&!e.ctrlKey&&!e.metaKey}(e)&&t(r),paste:(e,r)=>t(r),cut:(e,r)=>t(r),pointerdown:e=>(r="touch"===e.pointerType,!1),click:(e,o)=>r&&t(o)})}const fe=[["Completions","cm.completions"],["Find","cm.find"],["Replace","cm.replace"],["next","cm.next"],["previous","cm.previous"],["all","cm.all"],["match case","cm.matchCase"],["regexp","cm.regexp"],["by word","cm.byWord"],["replace","cm.replaceOne"],["replace all","cm.replaceAll"],["close","ui.close"],["Go to line","cm.gotoLine"],["go","cm.go"],["current match","cm.currentMatch"],["replaced $ matches","cm.replacedMatches"],["replaced match on line $","cm.replacedOnLine"],["on line","cm.onLine"],["Selection deleted","cm.selectionDeleted"],["Control character","cm.controlCharacter"]],ge=e=>b.phrases.of(Object.fromEntries(fe.map(([r,t])=>[r,e(t)]))),be=f.theme({"&":{backgroundColor:"var(--rp-base)",color:"var(--rp-text)",border:"1px solid var(--rp-hl-high)",borderRadius:"var(--rp-r-md)",fontSize:"var(--rp-text-sm)"},"&.cm-focused":{outline:"none",borderColor:"var(--rp-text)"},".cm-scroller":{fontFamily:"var(--rp-font-mono)",lineHeight:"var(--rp-line-body)",fontVariantLigatures:"none",borderRadius:"calc(var(--rp-r-md) - 1px)"},".cm-content":{padding:"var(--rp-space-2) 0",caretColor:"var(--rp-text)"},".cm-line":{padding:"0 var(--rp-space-3)"},".cm-gutters":{backgroundColor:"var(--rp-base)",color:"var(--rp-muted)",border:"none"},".cm-lineNumbers .cm-gutterElement":{padding:"0 var(--rp-space-2) 0 var(--rp-space-3)",minWidth:"40px"},".cm-activeLine, .cm-focusLine":{backgroundColor:"color-mix(in srgb, var(--rp-hl-med) 60%, transparent)"},".cm-activeLineGutter":{backgroundColor:"transparent",color:"var(--rp-text)"},".cm-selectionBackground, &.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"var(--rp-hl-high)"},".cm-cursor":{borderLeftColor:"var(--rp-text)"},".cm-matchingBracket":{backgroundColor:"color-mix(in srgb, var(--rp-accent) 20%, transparent)",outline:"none"},".cm-selectionMatch":{backgroundColor:"color-mix(in srgb, var(--rp-notice) 25%, transparent)"},".cm-gutter-lint":{width:"12px"},".cm-gutter-lint .cm-gutterElement":{padding:"0"},".cm-lint-marker":{width:"8px",height:"8px",marginLine truncated
import{r as e,j as r}from"./vendor-react-64fcanlc.js";import{bN as t,gr as o,bM as n,fl as a,bq as c,u as s,df as i,B as l,fr as d,ft as p}from"./index-HxEUeoab.js";import{S as m,a as u,E as f,C as g,b,l as v,c as x,h,d as y,r as k,e as w,f as C,g as j,i as R,j as A,s as E,k as L,t as M,m as N,n as F,o as O,p as S,q as $,u as q,v as B,w as D,x as I,y as T,z as H,D as K,R as V,A as z,B as G,F as U,G as W,H as P,I as J,J as _,K as Q,L as X}from"./vendor-editor-BRV-W12m.js";import{d as Y,s as Z}from"./daeTokens-BVtuNnWZ.js";import{s as ee}from"./nodes-6sIn2I0s.js";import{M as re}from"./AppearanceControls-sRy1p156.js";import{A as te,n as oe}from"./logs-C4GIy4tX.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./index-DUM-iwa2.js";import"./ItemText-DOD_75iR.js";import"./Select-D7_6MaHd.js";const ne=m.define({name:"dae",languageData:{commentTokens:{line:"#"},closeBrackets:{brackets:["(","{","'",'"']}},startState:Z,token:Y}),ae=["global","subscription","node","group","dns","routing"].map(e=>({label:e,type:"keyword"})),ce=n.map(e=>({label:e,type:"property",apply:e+": "})),se=["domain","dip","sip","dport","sport","l4proto","ipversion","pname","mac","dscp","qname","qtype","upstream"].map(e=>({label:e,type:"function",apply:e+"("})),ie=["geosite","geoip","suffix","full","keyword","regex"].map(e=>({label:e,type:"constant",apply:e+":"})),le=o.map(e=>({label:e,type:"constant"})),de=t.map(e=>({label:e,type:"keyword"})),pe=[{label:"fallback",type:"keyword",apply:"fallback: "},{label:"include",type:"keyword",apply:"include "}];function me(e){return u({override:[r=>function(e,r){const t=e.matchBefore(/[\w.-]*/);if(!t)return null;const o=e.state.doc.lineAt(e.pos),n=o.text.slice(0,e.pos-o.from),a=/->\s*[\w.-]*$/.test(n)||/^\s*fallback:\s*[\w.-]*$/.test(n);if(t.from===t.to&&!e.explicit&&!a)return null;const c=e.state.doc.sliceString(0,e.pos),{blocks:s,tokens:i}=ee(c),l=i.at(-1);if(l?.to===e.pos&&("quoted"===l.kind||"comment"===l.kind))return null;const d=s.find(r=>r.close===e.pos)?.name;let p;if(a)p=[...r().map(e=>({label:e.name,apply:e.written,type:"variable"})),...de];else if(/\b(domain|dip|sip|qname)\(\s*[\w.-]*$/.test(n))p=ie;else if(void 0===d)p=ae.map(e=>({...e,apply:(r,t,o,n)=>{const a=e.label+" {\n \n}";r.dispatch({changes:{from:o,to:n,insert:a},selection:{anchor:o+e.label.length+4}})}}));else if("routing"===d||"dns"===d)p=[...se,...pe];else if("global"===d)p=ce;else{if("group"!==d)return null;p=/\bpolicy\s*:\s*[\w.-]*$/.test(n)?le:[...le.map(e=>({...e,apply:"policy: "+e.label})),{label:"filter",type:"property",apply:"filter: "}]}return{from:t.from,options:p,validFor:/^[\w.-]*$/}}(r,e)]})}function ue(e){let r=!1;const t=r=>(r.state.readOnly&&e(),!1);return f.domEventHandlers({keydown:(e,r)=>function(e){return"Backspace"===e.key||"Delete"===e.key||"Enter"===e.key||1===[...e.key].length&&!e.ctrlKey&&!e.metaKey}(e)&&t(r),paste:(e,r)=>t(r),cut:(e,r)=>t(r),pointerdown:e=>(r="touch"===e.pointerType,!1),click:(e,o)=>r&&t(o)})}const fe=[["Completions","cm.completions"],["Find","cm.find"],["Replace","cm.replace"],["next","cm.next"],["previous","cm.previous"],["all","cm.all"],["match case","cm.matchCase"],["regexp","cm.regexp"],["by word","cm.byWord"],["replace","cm.replaceOne"],["replace all","cm.replaceAll"],["close","ui.close"],["Go to line","cm.gotoLine"],["go","cm.go"],["current match","cm.currentMatch"],["replaced $ matches","cm.replacedMatches"],["replaced match on line $","cm.replacedOnLine"],["on line","cm.onLine"],["Selection deleted","cm.selectionDeleted"],["Control character","cm.controlCharacter"]],ge=e=>b.phrases.of(Object.fromEntries(fe.map(([r,t])=>[r,e(t)]))),be=f.theme({"&":{backgroundColor:"var(--rp-base)",color:"var(--rp-text)",border:"1px solid var(--rp-hl-high)",borderRadius:"var(--rp-r-md)",fontSize:"var(--rp-text-sm)"},"&.cm-focused":{outline:"none",borderColor:"var(--rp-text)"},".cm-scroller":{fontFamily:"var(--rp-font-mono)",lineHeight:"var(--rp-line-body)",fontVariantLigatures:"none",borderRadius:"calc(var(--rp-r-md) - 1px)"},".cm-content":{padding:"var(--rp-space-2) 0",caretColor:"var(--rp-text)"},".cm-line":{padding:"0 var(--rp-space-3)"},".cm-gutters":{backgroundColor:"var(--rp-base)",color:"var(--rp-muted)",border:"none"},".cm-lineNumbers .cm-gutterElement":{padding:"0 var(--rp-space-2) 0 var(--rp-space-3)",minWidth:"40px"},".cm-activeLine, .cm-focusLine":{backgroundColor:"color-mix(in srgb, var(--rp-hl-med) 60%, transparent)"},".cm-activeLineGutter":{backgroundColor:"transparent",color:"var(--rp-text)"},".cm-selectionBackground, &.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"var(--rp-hl-high)"},".cm-cursor":{borderLeftColor:"var(--rp-text)"},".cm-matchingBracket":{backgroundColor:"color-mix(in srgb, var(--rp-accent) 20%, transparent)",outline:"none"},".cm-selectionMatch":{backgroundColor:"color-mix(in srgb, var(--rp-notice) 25%, transparent)"},".cm-gutter-lint":{width:"12px"},".cm-gutter-lint .cm-gutterElement":{padding:"0"},".cm-lint-marker":{width:"8px",height:"8px",marginLine truncated
@@ -1 +1 @@
import{r as s,j as e}from"./vendor-react-64fcanlc.js";import{$ as a}from"./Checkbox-BewExwKL.js";import{C as r}from"./ItemText-Bvif-kkw.js";import{da as i,I as l,cq as n,ch as c,B as d}from"./index-XeGFdFb3.js";function o({label:l,description:n,isSelected:c,onChange:d,isDisabled:o}){const t=s.useId(),h=s.useId(),x=i({isDisabled:o});return e.jsxs(a,{className:"rp-radio rp-checkbox",isSelected:c,onChange:d,isDisabled:x.isDisabled,"aria-labelledby":t,"aria-describedby":n?h:void 0,children:[e.jsx("span",{className:"rp-checkbox-mark",children:e.jsx(r,{})}),e.jsxs("span",{className:"rp-radio-text",children:[e.jsx("span",{id:t,children:l}),n&&e.jsx("span",{id:h,className:"rp-note",children:n})]})]})}function t(s){return e.jsx(l,{...s,children:e.jsx("path",{fill:"currentColor",d:"M17.78 1.757C16.51.716 14.555.858 13.33 2.08L3.079 12.334c-.32.32-.559.717-.69 1.15l-1.384 4.584c-.08.265-.007.552.188.747.142.143.334.22.53.22q.11 0 .217-.032l4.582-1.384c.434-.13.832-.368 1.151-.688L18.028 6.575c.648-.647.993-1.545.948-2.46s-.482-1.775-1.195-2.358M2.846 17.163l.98-3.246q.042-.135.113-.257l2.41 2.409q-.123.07-.259.114zM16.966 5.516l-9.525 9.526-2.475-2.476 9.425-9.425c.386-.387.896-.586 1.39-.586.38 0 .752.119 1.05.362.392.321.621.772.646 1.272.025.494-.161.977-.51 1.327"})})}function h({children:s}){return e.jsx("div",{className:"rp-toolbar",children:s})}function x({children:s,negate:a,onNegate:r,negateLabel:i,removeLabel:l,onRemove:o,isDisabled:t,removeDisabled:x}){return e.jsxs(n,{children:[s,e.jsxs(h,{children:[e.jsx(c,{isDisabled:t,isSelected:a,onChange:r,children:i}),e.jsx("span",{className:"rp-grow"}),e.jsx(d,{small:!0,isDisabled:t||x,onPress:o,children:l})]})]})}export{o as C,t as E,x as a,h as b};
import{r as s,j as e}from"./vendor-react-64fcanlc.js";import{$ as a}from"./Checkbox-CJt7u9-e.js";import{C as r}from"./ItemText-DOD_75iR.js";import{da as i,I as l,cq as n,ch as c,B as d}from"./index-HxEUeoab.js";function o({label:l,description:n,isSelected:c,onChange:d,isDisabled:o}){const t=s.useId(),h=s.useId(),x=i({isDisabled:o});return e.jsxs(a,{className:"rp-radio rp-checkbox",isSelected:c,onChange:d,isDisabled:x.isDisabled,"aria-labelledby":t,"aria-describedby":n?h:void 0,children:[e.jsx("span",{className:"rp-checkbox-mark",children:e.jsx(r,{})}),e.jsxs("span",{className:"rp-radio-text",children:[e.jsx("span",{id:t,children:l}),n&&e.jsx("span",{id:h,className:"rp-note",children:n})]})]})}function t(s){return e.jsx(l,{...s,children:e.jsx("path",{fill:"currentColor",d:"M17.78 1.757C16.51.716 14.555.858 13.33 2.08L3.079 12.334c-.32.32-.559.717-.69 1.15l-1.384 4.584c-.08.265-.007.552.188.747.142.143.334.22.53.22q.11 0 .217-.032l4.582-1.384c.434-.13.832-.368 1.151-.688L18.028 6.575c.648-.647.993-1.545.948-2.46s-.482-1.775-1.195-2.358M2.846 17.163l.98-3.246q.042-.135.113-.257l2.41 2.409q-.123.07-.259.114zM16.966 5.516l-9.525 9.526-2.475-2.476 9.425-9.425c.386-.387.896-.586 1.39-.586.38 0 .752.119 1.05.362.392.321.621.772.646 1.272.025.494-.161.977-.51 1.327"})})}function h({children:s}){return e.jsx("div",{className:"rp-toolbar",children:s})}function x({children:s,negate:a,onNegate:r,negateLabel:i,removeLabel:l,onRemove:o,isDisabled:t,removeDisabled:x}){return e.jsxs(n,{children:[s,e.jsxs(h,{children:[e.jsx(c,{isDisabled:t,isSelected:a,onChange:r,children:i}),e.jsx("span",{className:"rp-grow"}),e.jsx(d,{small:!0,isDisabled:t||x,onPress:o,children:l})]})]})}export{o as C,t as E,x as a,h as b};
@@ -1,2 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CodeEditor-B7e2c4Ke.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-XeGFdFb3.js","./index-BClYdby3.css","./vendor-editor-BRV-W12m.js","./index-DUM-iwa2.js","./daeTokens-BVtuNnWZ.js","./nodes-Bm1vmvln.js","./AppearanceControls-Q-jHRGz9.js","./ItemText-Bvif-kkw.js","./logs-DNePHVHd.js","./Select-OqnbuzuK.js"])))=>i.map(i=>d[i]);
import{r as e,j as n}from"./vendor-react-64fcanlc.js";import{h as i,u as s,al as a,l as r,q as t,r as o,x as l,c4 as c,w as d,c6 as u,Y as g,A as f,aK as p,c2 as m,cw as h,dk as b,dl as x,a1 as v,a0 as j,a9 as y,bO as w,z as k,cv as N,dm as S,t as D,aM as C,aV as T,B as P,aA as O,E as _,bk as R,ax as E,af as M,b5 as A,cq as L,aL as F,C as I,m as H,dn as q,bF as $,bG as K,df as V,a as W,b as U,v as B,aN as z,cs as G,p as J,aD as Q,aG as Y,d9 as X,_ as Z,av as ee,T as ne}from"./index-XeGFdFb3.js";import{a as ie,u as se,w as ae,e as re,c as te,H as oe,I as le,K as ce,D as de,L as ue,J as ge,S as fe}from"./logs-DNePHVHd.js";import{T as pe}from"./Tabs-BGWzF0yW.js";import{T as me}from"./Toolbar-CFyWgMbW.js";import{aL as he,a2 as be,aa as xe,aM as ve,y as je,aN as ye,a8 as we,D as ke}from"./activity-7OeQMmIs.js";import{s as Ne,N as Se,O as De,r as Ce,ag as Te,ah as Pe,ai as Oe,aj as _e,K as Re,ak as Ee}from"./nodes-Bm1vmvln.js";import{s as Me,c as Ae,r as Le,a as Fe,b as Ie,d as He,e as qe,f as $e,g as Ke,h as Ve,v as We,i as Ue,j as Be,k as ze,l as Ge,m as Je,n as Qe,o as Ye,w as Xe}from"./nav-B6IjqlWU.js";import{u as Ze,c as en}from"./flows-CjEC9Jxw.js";import{d as nn}from"./files-Dt8K7QfP.js";import{D as sn}from"./Table-DqqJleJD.js";import{T as an}from"./TimeCell-B6QtVZge.js";import{L as rn}from"./AppearanceControls-Q-jHRGz9.js";import{N as tn,t as on}from"./NumberField-Bo9iJ94r.js";import{A as ln}from"./AddCircle-7x8u9Pw1.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-OqnbuzuK.js";import"./ItemText-Bvif-kkw.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";function cn(e,n,s,a="main"){if(!s.daeText)return[];const{blocks:r,tokens:t}=Ne(e),o=s.globalSettings;return r.flatMap(s=>{if(s.name===o?.name){const a=r.filter(e=>e.name===o.name).indexOf(s),l=Se(e,s,t);return l.filter(e=>1===l.filter(n=>n.name===e.name).length&&o.fields.some(n=>n.key===e.name)).map(r=>({kind:s.name,from:r.from,to:r.to,label:r.name,line:e.slice(0,r.from).split("\n").length,href:i("config",{tab:"global",source:n,section:String(a),field:r.name})}))}const l=Me[s.name];return"subscription"===s.name?"main"!==a?[]:De(e).filter(e=>e.from>s.open&&e.to<=s.close).map(e=>({kind:s.name,from:e.from,to:e.to,label:e.tag,line:e.line,href:i("nodes",{editSubscriptionTag:e.tag})})):"dns"===s.name?s.children.filter(e=>"routing"===e.name).flatMap(e=>e.children.filter(e=>"request"===e.name||"response"===e.name).map(e=>({kind:s.name,from:e.from,to:e.to,label:e.name,line:e.line+1,href:l}))):l?[{kind:s.name,from:s.from,to:s.to,label:s.name,line:s.line+1,href:l}]:[]})}const dn=()=>{};const un=new Map;function gn({go:n,query:i}){const m=s(),h=a[r()],b=t(),x=b.data?.resources,v=se(o(x,"config",{whileLoading:!0})),j=function(n){const i=s(),a=ie(n),r=e.useMemo(()=>{const e=xe(a.error);return e?e.diagnostics??[]:null},[a.error]);return e.useEffect(()=>{if(a.error)if(r){const e=ve(r);f("negative",e?i("config.writeRestart",{n:e}):i("ui.writeInvalid",{n:r.filter(e=>"error"===e.level).length}))}else p(a.error,i,i("ui.writeFailed"))},[a.error,r,i]),{...a,diagnostics:r}}(v.refetch),y=e.useMemo(()=>new URLSearchParams(i),[i]),w=e.useMemo(()=>v.data?.sources??[],[v.data]),k=w.find(e=>"main"===e.kind)??null,N=w.find(e=>e.id===y.get("source"))??w[0]??null,S=N?.id??null,D=(e,s)=>n("config",d(i,{tab:"source",source:e,line:null===s?null:String(s)})),C=Number(y.get("line"))||null,T=v.data?.diagnostics??[],P=e.useMemo(()=>{const e=v.data?.diagnostics??[];return{error:e.filter(e=>"error"===e.level).length,warning:e.filter(e=>"warning"===e.level).length}},[v.data]),O=o(x,"config_validate",{whileLoading:!1})&&(x?.config_validate.modes??[]).includes("full"),_=!0===x?.config.writable,R=ae(w),E=l().data,M=e.useMemo(()=>re(E),[E]),A=Ae(!!M.globalSettings,b.data),L=N?Le(N,_,R(N),M,m):null,F=!!N&&!L,[I,H]=e.useState(un),[q,$]=e.useState(null),K=q??P.error,V=y.has("source")||void 0===k?.content?"source":"modules",W=c("validate"===y.get("tab")?d(i,{tab:"source"}):i,A.map(e=>e.id),V),U=N?{source:N,sources:w,open:D,diagnostics:T,canValidate:O&&("main"===N.kind||"include"===N.kind),canWrite:F,readOnly:L,isComplete:R,editor:j,focusLine:C,generation:v.data?.generation_id??"",focusDiagnostics:"validate"===y.get("tab"),diagnosticsChoice:I.get(N.id)??null,chooseDiagnostics:e=>H(n=>new Map(n).set(N.id,e)),reportErrors:$}:null,B=!0===x?.config.create&&!0===x.config.writable?{sources:w,refetch:v.refetch,open:e=>D(e,null)}:null;return{error:b.error??v.error,reload:()=>{b.refetch(),v.refetch()},loading:v.loading&&!v.data,ready:!!v.data,tabsReady:!!v.data||A.some(e=>"history"===e.id),metadata:v.data?Ie(v.data.revision,m):[],redacted:!!v.data?.secrets_redacted,tabs:A.map(e=>({id:e.id,label:"source"===e.id&&K?m("ui.aside",{text:m(e.titleKey),note:g(K,h)}):m(e.titleKey)})),tab:W,setTab:e=>n("config",d(u(i,e,null),{field:null})),selectedId:S??"",select:e=>n("config",d(i,{source:e,line:null})),sourceProps:U,newSourceProps:B,modulesProps:v.data?{config:v.data}:null,sourceModel:N?{...FeLine truncated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CodeEditor-DdrUcw42.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-HxEUeoab.js","./index-CcbWXWDN.css","./vendor-editor-BRV-W12m.js","./index-DUM-iwa2.js","./daeTokens-BVtuNnWZ.js","./nodes-6sIn2I0s.js","./AppearanceControls-sRy1p156.js","./ItemText-DOD_75iR.js","./logs-C4GIy4tX.js","./Select-D7_6MaHd.js"])))=>i.map(i=>d[i]);
import{r as e,j as n}from"./vendor-react-64fcanlc.js";import{h as i,u as s,al as a,l as r,q as t,r as o,x as l,c4 as c,w as d,c6 as u,Y as g,A as f,aK as p,c2 as m,cw as h,dk as b,dl as x,a1 as v,a0 as j,a9 as y,bO as w,z as k,cv as N,dm as S,t as D,aM as C,aV as T,B as P,aA as O,E as _,bk as R,ax as E,af as M,b5 as A,cq as L,aL as F,C as I,m as H,dn as q,bF as $,bG as K,df as V,a as W,b as U,v as B,aN as z,cs as G,p as J,aD as Q,aG as Y,d9 as X,_ as Z,av as ee,T as ne}from"./index-HxEUeoab.js";import{a as ie,u as se,w as ae,e as re,c as te,H as oe,I as le,K as ce,D as de,L as ue,J as ge,S as fe}from"./logs-C4GIy4tX.js";import{T as pe}from"./Tabs-DT6MQhIo.js";import{T as me}from"./Toolbar-BTFtduwD.js";import{aL as he,a2 as be,aa as xe,aM as ve,y as je,aN as ye,a8 as we,D as ke}from"./activity-yZTrGy-J.js";import{s as Ne,N as Se,O as De,r as Ce,ag as Te,ah as Pe,ai as Oe,aj as _e,K as Re,ak as Ee}from"./nodes-6sIn2I0s.js";import{s as Me,c as Ae,r as Le,a as Fe,b as Ie,d as He,e as qe,f as $e,g as Ke,h as Ve,v as We,i as Ue,j as Be,k as ze,l as Ge,m as Je,n as Qe,o as Ye,w as Xe}from"./nav-BMNMQSWb.js";import{u as Ze,c as en}from"./flows-dBNkBg79.js";import{d as nn}from"./files-Dt8K7QfP.js";import{D as sn}from"./Table-yWn0d3vL.js";import{T as an}from"./TimeCell-BIqfL3y_.js";import{L as rn}from"./AppearanceControls-sRy1p156.js";import{N as tn,t as on}from"./NumberField-q4-QmTAT.js";import{A as ln}from"./AddCircle-C6Jc7GCc.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-D7_6MaHd.js";import"./ItemText-DOD_75iR.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";function cn(e,n,s,a="main"){if(!s.daeText)return[];const{blocks:r,tokens:t}=Ne(e),o=s.globalSettings;return r.flatMap(s=>{if(s.name===o?.name){const a=r.filter(e=>e.name===o.name).indexOf(s),l=Se(e,s,t);return l.filter(e=>1===l.filter(n=>n.name===e.name).length&&o.fields.some(n=>n.key===e.name)).map(r=>({kind:s.name,from:r.from,to:r.to,label:r.name,line:e.slice(0,r.from).split("\n").length,href:i("config",{tab:"global",source:n,section:String(a),field:r.name})}))}const l=Me[s.name];return"subscription"===s.name?"main"!==a?[]:De(e).filter(e=>e.from>s.open&&e.to<=s.close).map(e=>({kind:s.name,from:e.from,to:e.to,label:e.tag,line:e.line,href:i("nodes",{editSubscriptionTag:e.tag})})):"dns"===s.name?s.children.filter(e=>"routing"===e.name).flatMap(e=>e.children.filter(e=>"request"===e.name||"response"===e.name).map(e=>({kind:s.name,from:e.from,to:e.to,label:e.name,line:e.line+1,href:l}))):l?[{kind:s.name,from:s.from,to:s.to,label:s.name,line:s.line+1,href:l}]:[]})}const dn=()=>{};const un=new Map;function gn({go:n,query:i}){const m=s(),h=a[r()],b=t(),x=b.data?.resources,v=se(o(x,"config",{whileLoading:!0})),j=function(n){const i=s(),a=ie(n),r=e.useMemo(()=>{const e=xe(a.error);return e?e.diagnostics??[]:null},[a.error]);return e.useEffect(()=>{if(a.error)if(r){const e=ve(r);f("negative",e?i("config.writeRestart",{n:e}):i("ui.writeInvalid",{n:r.filter(e=>"error"===e.level).length}))}else p(a.error,i,i("ui.writeFailed"))},[a.error,r,i]),{...a,diagnostics:r}}(v.refetch),y=e.useMemo(()=>new URLSearchParams(i),[i]),w=e.useMemo(()=>v.data?.sources??[],[v.data]),k=w.find(e=>"main"===e.kind)??null,N=w.find(e=>e.id===y.get("source"))??w[0]??null,S=N?.id??null,D=(e,s)=>n("config",d(i,{tab:"source",source:e,line:null===s?null:String(s)})),C=Number(y.get("line"))||null,T=v.data?.diagnostics??[],P=e.useMemo(()=>{const e=v.data?.diagnostics??[];return{error:e.filter(e=>"error"===e.level).length,warning:e.filter(e=>"warning"===e.level).length}},[v.data]),O=o(x,"config_validate",{whileLoading:!1})&&(x?.config_validate.modes??[]).includes("full"),_=!0===x?.config.writable,R=ae(w),E=l().data,M=e.useMemo(()=>re(E),[E]),A=Ae(!!M.globalSettings,b.data),L=N?Le(N,_,R(N),M,m):null,F=!!N&&!L,[I,H]=e.useState(un),[q,$]=e.useState(null),K=q??P.error,V=y.has("source")||void 0===k?.content?"source":"modules",W=c("validate"===y.get("tab")?d(i,{tab:"source"}):i,A.map(e=>e.id),V),U=N?{source:N,sources:w,open:D,diagnostics:T,canValidate:O&&("main"===N.kind||"include"===N.kind),canWrite:F,readOnly:L,isComplete:R,editor:j,focusLine:C,generation:v.data?.generation_id??"",focusDiagnostics:"validate"===y.get("tab"),diagnosticsChoice:I.get(N.id)??null,chooseDiagnostics:e=>H(n=>new Map(n).set(N.id,e)),reportErrors:$}:null,B=!0===x?.config.create&&!0===x.config.writable?{sources:w,refetch:v.refetch,open:e=>D(e,null)}:null;return{error:b.error??v.error,reload:()=>{b.refetch(),v.refetch()},loading:v.loading&&!v.data,ready:!!v.data,tabsReady:!!v.data||A.some(e=>"history"===e.id),metadata:v.data?Ie(v.data.revision,m):[],redacted:!!v.data?.secrets_redacted,tabs:A.map(e=>({id:e.id,label:"source"===e.id&&K?m("ui.aside",{text:m(e.titleKey),note:g(K,h)}):m(e.titleKey)})),tab:W,setTab:e=>n("config",d(u(i,e,null),{field:null})),selectedId:S??"",select:e=>n("config",d(i,{source:e,line:null})),sourceProps:U,newSourceProps:B,modulesProps:v.data?{config:v.data}:null,sourceModel:N?{...FeLine truncated
@@ -1 +1 @@
import{r as e,j as n}from"./vendor-react-64fcanlc.js";import{O as t}from"./OutboundTag-B01P-KVW.js";import{aU as o,u as s,al as l,l as a,a0 as i,o as r,aB as c,C as u,E as d,Y as p,a8 as m,s as b,M as h,bW as g,ax as f,N as w,T as v,bX as y,w as x,bY as j,U as _,bZ as k,b_ as C,Z as S,a1 as A,q as L,r as N,O as T,b$ as M,a6 as R,c0 as O,ah as P,G as F,c1 as U,b4 as W,c2 as q,bS as D,c3 as E,c4 as I,c5 as V,K as H,am as Q,c6 as B,A as K,c7 as G,aV as J,b9 as Y,c8 as Z,aM as X,c9 as z,bG as $,B as ee,ca as ne,bx as te,av as oe,p as se}from"./index-XeGFdFb3.js";import{R as le,u as ae,i as ie,o as re,h as ce,c as ue,S as de,L as pe,n as me,K as be}from"./logs-DNePHVHd.js";import{C as he}from"./AppearanceControls-Q-jHRGz9.js";import{T as ge}from"./Tabs-BGWzF0yW.js";import{T as fe}from"./Toolbar-CFyWgMbW.js";import{a as we,D as ve,U as ye,F as xe,S as je,c as _e,B as ke,L as Ce,t as Se,d as Ae,f as Le,g as Ne,p as Te,o as Me,k as Re,h as Oe}from"./activity-7OeQMmIs.js";import{S as Pe}from"./SearchSelect-BVGce3l_.js";import{D as Fe}from"./Table-DqqJleJD.js";import{T as Ue}from"./TimeCell-B6QtVZge.js";import{Q as We,u as qe,R as De}from"./useQuickRule-8yoKk9d5.js";import{u as Ee}from"./outbounds-UWplA2Qq.js";import{c as Ie,d as Ve,e as He}from"./files-Dt8K7QfP.js";import{w as Qe}from"./labels-D8xxfRTQ.js";import{u as Be}from"./flows-CjEC9Jxw.js";import{r as Ke}from"./rule-BUktGcKO.js";import{c as Ge}from"./nav-BO8viH9G.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Tag-BaZZD5o2.js";import"./Select-OqnbuzuK.js";import"./ItemText-Bvif-kkw.js";import"./nodes-Bm1vmvln.js";import"./Checkbox-BewExwKL.js";import"./SearchList-DWooTdFX.js";import"./Virtualizer-FvdVRagH.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-7x8u9Pw1.js";const Je=[0,2,3,1,4,5,6,7],Ye=e.memo(function({records:t,outbounds:p,latency:m,latencyError:b,retryLatency:h,truncated:g,uncounted:f,onSelect:w}){const v=s(),y=we(),x=l[a()],j=e.useCallback(e=>i(e,x),[x]),_=e.useMemo(()=>function(e,n){const t=new Map;let s=0;for(const o of e){if(null===o.upload_bytes||null===o.download_bytes){s++;continue}const e={id:o.id,up:Number(o.upload_bytes),down:Number(o.download_bytes),name:o.domain||o.dst||o.id},n=t.get(o.outbound);n?n.push(e):t.set(o.outbound,[e])}const l=[...t].map(([e,n])=>({outbound:e,points:n})).sort((e,t)=>o(n)(e.outbound??"",t.outbound??""));let a,i=-1n;for(const o of e){if(null===o.upload_bytes||null===o.download_bytes)continue;const e=BigInt(o.upload_bytes)+BigInt(o.download_bytes);e>i&&(i=e,a={id:o.id,up:Number(o.upload_bytes),down:Number(o.download_bytes),name:o.domain||o.dst||o.id,outbound:o.outbound})}return{series:l,unknown:s,heaviest:a,placed:e.length-s}}(t,x),[t,x]),k=e.useMemo(()=>{const e=p.filter(e=>"block"!==e);return _.series.map(n=>{return{id:n.outbound??"",label:r(n.outbound,v),color:(t=n.outbound,"block"===t?y.negative:y.cat[Je[Math.max(0,e.indexOf(t))%Je.length]]),points:n.points.map(e=>({id:e.id,x:e.up,y:e.down,name:e.name,detail:v("conn.chart.point",{download:j(e.down),upload:j(e.up)})}))};var t})},[_,p,y,v,j]),C=_.heaviest?[{label:v("conn.chart.busiest"),icon:n.jsx(c,{}),tint:"c3",value:_.heaviest.name,caption:r(_.heaviest.outbound,v)},{label:v("ui.download"),value:j(_.heaviest.down),icon:n.jsx(ve,{}),tint:"c1"},{label:v("ui.upload"),value:j(_.heaviest.up),icon:n.jsx(ye,{}),tint:"c4"}]:[],S=_.unknown?v("conn.chart.sampleUnknown",{n:t.length,unknown:_.unknown}):v("conn.chart.sample",{n:t.length});return n.jsxs("div",{className:"rp-chart-page",children:[n.jsx(xe,{facts:C,lead:!0}),n.jsxs(u,{title:v("conn.chart.title"),help:f?{title:v("conn.chart.title"),text:v("ui.trafficUncounted")}:void 0,note:S,children:[g&&n.jsx("p",{className:"rp-note",children:v("conn.truncated")}),_.placed>0&&n.jsxs(n.Fragment,{children:[n.jsx(je,{label:v("conn.chart.title"),series:k,fmt:j,onSelect:w,regions:{above:v("conn.chart.moreDown"),below:v("conn.chart.moreUp")}}),n.jsx(_e,{series:k}),n.jsx("p",{className:"rp-note",children:v("conn.chart.hint")})]})]}),m?n.jsx(Ze,{latency:m}):b&&n.jsx(u,{title:v("ui.nodeLatency"),children:n.jsx(d,{error:b,onRetry:h})})]})});function Ze({latency:e}){const t=s(),o=we(),i=e=>m(e,t),r=l[a()],c=n=>!e.chains||n?o.cat[0]:o.muted;return n.jsx(u,{title:t("ui.nodeLatency"),note:t("conn.latency.sample",{n:e.samples.length,missing:e.missing}),children:e.samples.length?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"rp-note",children:t("conn.latency.percentiles",{p50:i(e.p50),p90:i(e.p90)})}),null!==e.weightedP50&&n.jsx("p",{className:"rp-note",children:e.unplaced?t("conn.latency.weightedUnplaced",{p50:i(e.weightedP50),n:e.unplaced}):t("conn.latency.weighted",{p50:i(e.weightedP50)})}),n.jsx(ke,{label:t("ui.nodeLatency"),points:e.samples.map(e=>({id:e.node,nodeName:!0,value:e.value,color:c(e.connections>0),lines:[e.name,i(e.value),...e.connections?[t("conn.chart.sample",{n:e.connections})]:[]]})),fmt:i}),e.chains&&n.jsxs("div",{className:"rp-legend",children:[n.jsx(Ce,{swatch:c(!0),labeLine truncated
import{r as e,j as n}from"./vendor-react-64fcanlc.js";import{O as t}from"./OutboundTag-CO8Ndxdr.js";import{aU as o,u as s,al as l,l as a,a0 as i,o as r,aB as c,C as u,E as d,Y as p,a8 as m,s as b,M as h,bW as g,ax as f,N as w,T as v,bX as y,w as x,bY as j,U as _,bZ as k,b_ as C,Z as S,a1 as A,q as L,r as N,O as T,b$ as M,a6 as R,c0 as O,ah as P,G as F,c1 as U,b4 as W,c2 as q,bS as D,c3 as E,c4 as I,c5 as V,K as H,am as Q,c6 as B,A as K,c7 as G,aV as J,b9 as Y,c8 as Z,aM as X,c9 as z,bG as $,B as ee,ca as ne,bx as te,av as oe,p as se}from"./index-HxEUeoab.js";import{R as le,u as ae,i as ie,o as re,h as ce,c as ue,S as de,L as pe,n as me,K as be}from"./logs-C4GIy4tX.js";import{C as he}from"./AppearanceControls-sRy1p156.js";import{T as ge}from"./Tabs-DT6MQhIo.js";import{T as fe}from"./Toolbar-BTFtduwD.js";import{a as we,D as ve,U as ye,F as xe,S as je,c as _e,B as ke,L as Ce,t as Se,d as Ae,f as Le,g as Ne,p as Te,o as Me,k as Re,h as Oe}from"./activity-yZTrGy-J.js";import{S as Pe}from"./SearchSelect-BcScGUbQ.js";import{D as Fe}from"./Table-yWn0d3vL.js";import{T as Ue}from"./TimeCell-BIqfL3y_.js";import{Q as We,u as qe,R as De}from"./useQuickRule-DUEi6geL.js";import{u as Ee}from"./outbounds-Bbb6kdae.js";import{c as Ie,d as Ve,e as He}from"./files-Dt8K7QfP.js";import{w as Qe}from"./labels-D8xxfRTQ.js";import{u as Be}from"./flows-dBNkBg79.js";import{r as Ke}from"./rule-Bl9YOsFn.js";import{c as Ge}from"./nav-BO8viH9G.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Tag-SxASl3TF.js";import"./Select-D7_6MaHd.js";import"./ItemText-DOD_75iR.js";import"./nodes-6sIn2I0s.js";import"./Checkbox-CJt7u9-e.js";import"./SearchList-LjCruZYP.js";import"./Virtualizer-DMIKG2CD.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-C6Jc7GCc.js";const Je=[0,2,3,1,4,5,6,7],Ye=e.memo(function({records:t,outbounds:p,latency:m,latencyError:b,retryLatency:h,truncated:g,uncounted:f,onSelect:w}){const v=s(),y=we(),x=l[a()],j=e.useCallback(e=>i(e,x),[x]),_=e.useMemo(()=>function(e,n){const t=new Map;let s=0;for(const o of e){if(null===o.upload_bytes||null===o.download_bytes){s++;continue}const e={id:o.id,up:Number(o.upload_bytes),down:Number(o.download_bytes),name:o.domain||o.dst||o.id},n=t.get(o.outbound);n?n.push(e):t.set(o.outbound,[e])}const l=[...t].map(([e,n])=>({outbound:e,points:n})).sort((e,t)=>o(n)(e.outbound??"",t.outbound??""));let a,i=-1n;for(const o of e){if(null===o.upload_bytes||null===o.download_bytes)continue;const e=BigInt(o.upload_bytes)+BigInt(o.download_bytes);e>i&&(i=e,a={id:o.id,up:Number(o.upload_bytes),down:Number(o.download_bytes),name:o.domain||o.dst||o.id,outbound:o.outbound})}return{series:l,unknown:s,heaviest:a,placed:e.length-s}}(t,x),[t,x]),k=e.useMemo(()=>{const e=p.filter(e=>"block"!==e);return _.series.map(n=>{return{id:n.outbound??"",label:r(n.outbound,v),color:(t=n.outbound,"block"===t?y.negative:y.cat[Je[Math.max(0,e.indexOf(t))%Je.length]]),points:n.points.map(e=>({id:e.id,x:e.up,y:e.down,name:e.name,detail:v("conn.chart.point",{download:j(e.down),upload:j(e.up)})}))};var t})},[_,p,y,v,j]),C=_.heaviest?[{label:v("conn.chart.busiest"),icon:n.jsx(c,{}),tint:"c3",value:_.heaviest.name,caption:r(_.heaviest.outbound,v)},{label:v("ui.download"),value:j(_.heaviest.down),icon:n.jsx(ve,{}),tint:"c1"},{label:v("ui.upload"),value:j(_.heaviest.up),icon:n.jsx(ye,{}),tint:"c4"}]:[],S=_.unknown?v("conn.chart.sampleUnknown",{n:t.length,unknown:_.unknown}):v("conn.chart.sample",{n:t.length});return n.jsxs("div",{className:"rp-chart-page",children:[n.jsx(xe,{facts:C,lead:!0}),n.jsxs(u,{title:v("conn.chart.title"),help:f?{title:v("conn.chart.title"),text:v("ui.trafficUncounted")}:void 0,note:S,children:[g&&n.jsx("p",{className:"rp-note",children:v("conn.truncated")}),_.placed>0&&n.jsxs(n.Fragment,{children:[n.jsx(je,{label:v("conn.chart.title"),series:k,fmt:j,onSelect:w,regions:{above:v("conn.chart.moreDown"),below:v("conn.chart.moreUp")}}),n.jsx(_e,{series:k}),n.jsx("p",{className:"rp-note",children:v("conn.chart.hint")})]})]}),m?n.jsx(Ze,{latency:m}):b&&n.jsx(u,{title:v("ui.nodeLatency"),children:n.jsx(d,{error:b,onRetry:h})})]})});function Ze({latency:e}){const t=s(),o=we(),i=e=>m(e,t),r=l[a()],c=n=>!e.chains||n?o.cat[0]:o.muted;return n.jsx(u,{title:t("ui.nodeLatency"),note:t("conn.latency.sample",{n:e.samples.length,missing:e.missing}),children:e.samples.length?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"rp-note",children:t("conn.latency.percentiles",{p50:i(e.p50),p90:i(e.p90)})}),null!==e.weightedP50&&n.jsx("p",{className:"rp-note",children:e.unplaced?t("conn.latency.weightedUnplaced",{p50:i(e.weightedP50),n:e.unplaced}):t("conn.latency.weighted",{p50:i(e.weightedP50)})}),n.jsx(ke,{label:t("ui.nodeLatency"),points:e.samples.map(e=>({id:e.node,nodeName:!0,value:e.value,color:c(e.connections>0),lines:[e.name,i(e.value),...e.connections?[t("conn.chart.sample",{n:e.connections})]:[]]})),fmt:i}),e.chains&&n.jsxs("div",{className:"rp-legend",children:[n.jsx(Ce,{swatch:c(!0),labeLine truncated
@@ -1 +1 @@
import{r as c,j as r}from"./vendor-react-64fcanlc.js";import{u as s,dn as o,A as l,I as t}from"./index-XeGFdFb3.js";function a(){const r=s();return c.useCallback(async c=>{const s=await o(c);l(s?"positive":"negative",r(s?"ui.recordCopied":"ui.recordCopyFailed"))},[r])}function e(c){return r.jsxs(t,{...c,children:[r.jsx("path",{fill:"currentColor",d:"m11.75,18h-7.5c-1.24023,0-2.25-1.00977-2.25-2.25v-7.5c0-1.24023,1.00977-2.25,2.25-2.25.41406,0,.75.33594.75.75s-.33594.75-.75.75c-.41309,0-.75.33691-.75.75v7.5c0,.41309.33691.75.75.75h7.5c.41309,0,.75-.33691.75-.75,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,1.24023-1.00977,2.25-2.25,2.25Z"}),r.jsx("path",{fill:"currentColor",d:"m6.75,5c-.41406,0-.75-.33594-.75-.75,0-1.24023,1.00977-2.25,2.25-2.25.41406,0,.75.33594.75.75s-.33594.75-.75.75c-.41309,0-.75.33691-.75.75,0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m13,3.5h-2c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75h2c.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m13,14h-2c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75h2c.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m15.75,14c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75c.41309,0,.75-.33691.75-.75,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,1.24023-1.00977,2.25-2.25,2.25Z"}),r.jsx("path",{fill:"currentColor",d:"m17.25,5c-.41406,0-.75-.33594-.75-.75,0-.41309-.33691-.75-.75-.75-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75c1.24023,0,2.25,1.00977,2.25,2.25,0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m17.25,9.75c-.41406,0-.75-.33594-.75-.75v-2c0-.41406.33594-.75.75-.75s.75.33594.75.75v2c0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m6.75,9.75c-.41406,0-.75-.33594-.75-.75v-2c0-.41406.33594-.75.75-.75s.75.33594.75.75v2c0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m8.25,14c-1.24023,0-2.25-1.00977-2.25-2.25,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,.41309.33691.75.75.75.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"})]})}export{e as C,a as u};
import{r as c,j as r}from"./vendor-react-64fcanlc.js";import{u as s,dn as o,A as l,I as t}from"./index-HxEUeoab.js";function a(){const r=s();return c.useCallback(async c=>{const s=await o(c);l(s?"positive":"negative",r(s?"ui.recordCopied":"ui.recordCopyFailed"))},[r])}function e(c){return r.jsxs(t,{...c,children:[r.jsx("path",{fill:"currentColor",d:"m11.75,18h-7.5c-1.24023,0-2.25-1.00977-2.25-2.25v-7.5c0-1.24023,1.00977-2.25,2.25-2.25.41406,0,.75.33594.75.75s-.33594.75-.75.75c-.41309,0-.75.33691-.75.75v7.5c0,.41309.33691.75.75.75h7.5c.41309,0,.75-.33691.75-.75,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,1.24023-1.00977,2.25-2.25,2.25Z"}),r.jsx("path",{fill:"currentColor",d:"m6.75,5c-.41406,0-.75-.33594-.75-.75,0-1.24023,1.00977-2.25,2.25-2.25.41406,0,.75.33594.75.75s-.33594.75-.75.75c-.41309,0-.75.33691-.75.75,0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m13,3.5h-2c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75h2c.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m13,14h-2c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75h2c.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m15.75,14c-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75c.41309,0,.75-.33691.75-.75,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,1.24023-1.00977,2.25-2.25,2.25Z"}),r.jsx("path",{fill:"currentColor",d:"m17.25,5c-.41406,0-.75-.33594-.75-.75,0-.41309-.33691-.75-.75-.75-.41406,0-.75-.33594-.75-.75s.33594-.75.75-.75c1.24023,0,2.25,1.00977,2.25,2.25,0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m17.25,9.75c-.41406,0-.75-.33594-.75-.75v-2c0-.41406.33594-.75.75-.75s.75.33594.75.75v2c0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m6.75,9.75c-.41406,0-.75-.33594-.75-.75v-2c0-.41406.33594-.75.75-.75s.75.33594.75.75v2c0,.41406-.33594.75-.75.75Z"}),r.jsx("path",{fill:"currentColor",d:"m8.25,14c-1.24023,0-2.25-1.00977-2.25-2.25,0-.41406.33594-.75.75-.75s.75.33594.75.75c0,.41309.33691.75.75.75.41406,0,.75.33594.75.75s-.33594.75-.75.75Z"})]})}export{e as C,a as u};
@@ -1 +1 @@
import{ah as e,ak as l,U as r,u as a,T as s,p as n}from"./index-XeGFdFb3.js";import{j as o}from"./vendor-react-64fcanlc.js";const t={userspace_tcp:"flow.userspaceTcp",userspace_udp:"flow.userspaceUdp",kernel_direct:"flow.kernelDirect",kernel_block:"flow.kernelBlock",dns_intercept:"flow.dnsIntercept",kernel_bypass:"flow.kernelBypass"},p={full:"flow.full",partial:"flow.partialVisibility",none:"ui.none"};function c(a,s,n){const o=Object.entries(a.coverage).filter(([,e])=>"full"!==e),c=e(a.dropped_records),i=c?s("flow.dropped",{n:c}):null;return o.length||i?{summary:o.length?s("flow.coverageSummary",{n:o.length}):null,detail:l(n,o.map(([e,l])=>s("ui.valuePair",{label:r(t,e,s),value:r(p,l,s)}))),dropped:i}:null}function i({view:e}){const l=a();return o.jsxs("div",{className:"rp-cluster",role:"group","aria-label":l("flow.coverage"),children:[e.summary&&o.jsx(s,{text:e.detail,children:o.jsx(n,{small:!0,tone:"warn",children:e.summary})}),e.dropped&&o.jsx(n,{small:!0,tone:"warn",children:e.dropped})]})}export{i as C,c};
import{ah as e,ak as l,U as r,u as a,T as s,p as n}from"./index-HxEUeoab.js";import{j as o}from"./vendor-react-64fcanlc.js";const t={userspace_tcp:"flow.userspaceTcp",userspace_udp:"flow.userspaceUdp",kernel_direct:"flow.kernelDirect",kernel_block:"flow.kernelBlock",dns_intercept:"flow.dnsIntercept",kernel_bypass:"flow.kernelBypass"},p={full:"flow.full",partial:"flow.partialVisibility",none:"ui.none"};function c(a,s,n){const o=Object.entries(a.coverage).filter(([,e])=>"full"!==e),c=e(a.dropped_records),i=c?s("flow.dropped",{n:c}):null;return o.length||i?{summary:o.length?s("flow.coverageSummary",{n:o.length}):null,detail:l(n,o.map(([e,l])=>s("ui.valuePair",{label:r(t,e,s),value:r(p,l,s)}))),dropped:i}:null}function i({view:e}){const l=a();return o.jsxs("div",{className:"rp-cluster",role:"group","aria-label":l("flow.coverage"),children:[e.summary&&o.jsx(s,{text:e.detail,children:o.jsx(n,{small:!0,tone:"warn",children:e.summary})}),e.dropped&&o.jsx(n,{small:!0,tone:"warn",children:e.dropped})]})}export{i as C,c};
@@ -1 +1 @@
import{j as c}from"./vendor-react-64fcanlc.js";import{I as r}from"./index-XeGFdFb3.js";function l(l){return c.jsxs(r,{...l,children:[c.jsx("path",{fill:"currentColor",d:"M8.249 15.021c-.4 0-.733-.317-.748-.72l-.25-6.5c-.017-.414.307-.763.72-.779H8c.4 0 .733.317.748.72l.25 6.5c.017.414-.307.763-.72.778zM11.751 15.021h-.03c-.413-.016-.737-.365-.72-.779l.25-6.5c.015-.403.348-.72.748-.72h.03c.413.016.737.365.72.779l-.25 6.5c-.015.403-.348.72-.748.72"}),c.jsx("path",{fill:"currentColor",d:"M17 4h-3.5v-.75C13.5 2.01 12.49 1 11.25 1h-2.5C7.51 1 6.5 2.01 6.5 3.25V4H3c-.414 0-.75.336-.75.75s.336.75.75.75h.52l.422 10.342C3.99 17.052 4.98 18 6.19 18h7.62c1.211 0 2.2-.948 2.248-2.158L16.48 5.5H17c.414 0 .75-.336.75-.75S17.414 4 17 4m-9-.75c0-.413.337-.75.75-.75h2.5c.413 0 .75.337.75.75V4H8zm6.56 12.531c-.017.404-.346.719-.75.719H6.19c-.404 0-.733-.315-.75-.719L5.02 5.5h9.96z"})]})}export{l as D};
import{j as c}from"./vendor-react-64fcanlc.js";import{I as r}from"./index-HxEUeoab.js";function l(l){return c.jsxs(r,{...l,children:[c.jsx("path",{fill:"currentColor",d:"M8.249 15.021c-.4 0-.733-.317-.748-.72l-.25-6.5c-.017-.414.307-.763.72-.779H8c.4 0 .733.317.748.72l.25 6.5c.017.414-.307.763-.72.778zM11.751 15.021h-.03c-.413-.016-.737-.365-.72-.779l.25-6.5c.015-.403.348-.72.748-.72h.03c.413.016.737.365.72.779l-.25 6.5c-.015.403-.348.72-.748.72"}),c.jsx("path",{fill:"currentColor",d:"M17 4h-3.5v-.75C13.5 2.01 12.49 1 11.25 1h-2.5C7.51 1 6.5 2.01 6.5 3.25V4H3c-.414 0-.75.336-.75.75s.336.75.75.75h.52l.422 10.342C3.99 17.052 4.98 18 6.19 18h7.62c1.211 0 2.2-.948 2.248-2.158L16.48 5.5H17c.414 0 .75-.336.75-.75S17.414 4 17 4m-9-.75c0-.413.337-.75.75-.75h2.5c.413 0 .75.337.75.75V4H8zm6.56 12.531c-.017.404-.346.719-.75.719H6.19c-.404 0-.733-.315-.75-.719L5.02 5.5h9.96z"})]})}export{l as D};
@@ -0,0 +1 @@
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{M as a,U as t,a8 as n,a1 as r,Y as l,Q as i,ah as d,aM as c,u as o,a9 as u,q as m,c2 as h,z as p,c4 as x,r as g,w as y,h as f,c6 as b,al as j,l as v,cb as w,bS as _,cc as N,b4 as S,c8 as T,A as q,c9 as C,aV as k,cd as M,bR as R,az as L,af as A,E as F,ce as E,bh as D,cf as P,C as W,S as O,ae as U,ay as H,T as B,bu as K,bF as I,cg as Q,bG as $,ch as z,B as J,ci as V,ax as G,p as X,av as Y,bx as Z,ca as ee}from"./index-HxEUeoab.js";import{D as se}from"./Delete-CR2AtZsd.js";import{s as ae,l as te,a as ne,m as re,C as le,F as ie,B as de,L as ce,W as oe,n as ue,q as me,D as he}from"./activity-yZTrGy-J.js";import{u as pe,q as xe,k as ge,s as ye,t as fe,S as be,L as je,K as ve,A as we}from"./logs-C4GIy4tX.js";import{T as _e}from"./Tabs-DT6MQhIo.js";import{T as Ne}from"./Toolbar-BTFtduwD.js";import{D as Se}from"./Table-yWn0d3vL.js";import{T as Te}from"./TimeCell-BIqfL3y_.js";import{c as qe,d as Ce,e as ke}from"./files-Dt8K7QfP.js";import{d as Me}from"./nav-CBqYxt5v.js";import{a as Re}from"./rule-Bl9YOsFn.js";import{J as Le,u as Ae}from"./nodes-6sIn2I0s.js";import{u as Fe,R as Ee,Q as De}from"./useQuickRule-DUEi6geL.js";import{L as Pe}from"./AppearanceControls-sRy1p156.js";/* empty css */import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-DOD_75iR.js";import"./Select-D7_6MaHd.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-C6Jc7GCc.js";import"./SearchSelect-BcScGUbQ.js";import"./SearchList-LjCruZYP.js";import"./flows-dBNkBg79.js";function We(e,s,t,n,r){return{domain:e,dip:null,sip:(r&&a(r))??null,outbound:null,matched:null,dns:{type:s,answers:Re(t),upstream:n,query:{name:e,type:s}}}}const Oe=(e,s,a)=>({domain:null,dip:e,sip:null,outbound:null,matched:null,dns:{type:a,answers:[e],upstream:null,query:{name:s,type:a}}}),Ue={forced:"dns.route.forced","dns.routing":"dns.route.rules",default:"dns.route.default"};function He(e,s){return{fields:[[s("ui.state"),e.status],[s("ui.upstream"),e.upstream??"—"],[s("dns.routeSource"),t(Ue,e.route.source,s)],[s("dns.routeRule"),e.route.rule??"—"],[s("ui.elapsed"),n(e.elapsed_ms,s)]],answers:(e.answers??[]).map(e=>s("dns.answer",{name:e.name,type:e.type,ttl:e.ttl,data:e.data})),cacheText:s(e.cached?"dns.hit":"dns.miss"),cacheTone:e.cached?void 0:"warn"}}function Be(e,s,a){return e?a instanceof c&&503===a.status?"unavailable":s?"ready":a?"error":"loading":"unlisted"}const Ke=[{id:"full",label:"rule.kind.domain"},{id:"suffix",label:"rule.kind.domainSuffix"},{id:"keyword",label:"rule.kind.domainKeyword"},{id:"regex",label:"dns.matchRegex"}],Ie=e=>e.trim().toLowerCase().replace(/\.$/,"");function Qe(e,s){if(!s.trim())return()=>!0;if("regex"===e){const e=function(e){try{return new RegExp(e,"iu")}catch{return null}}(s);return e&&(s=>e.test(Ie(s)))}if("keyword"===e){const e=s.trim().toLowerCase();return s=>Ie(s).includes(e)}const a=Ie(s),t="suffix"===e&&a.startsWith("."),n=t?a.slice(1):a;return n?"full"===e?e=>Ie(e)===n:e=>{const s=Ie(e);return s.endsWith("."+n)||!t&&s===n}:null}function $e({go:s,query:a}){const t=o(),n=u(),r=m(),l=e.useMemo(()=>new URLSearchParams(a),[a]),[i,d]=e.useState(l.get("domain")??""),[c,j]=e.useState(l.get("type")??"A"),[v,w]=e.useState(!1);h(l.get("domain"),e=>d(e??"")),h(l.get("type"),e=>j(e??"A"));const[_,N]=e.useState(null),{busy:S,error:T,run:q}=p({rethrow:!0}),C=r.data?.resources,k=e.useMemo(()=>function(e,s,a,t,n,r){const l=s?.dns_query.record_types??[],i="all"===a?l.length>0:l.includes(a);return{types:l,choices:[...l.map(e=>({id:e,label:e})),{id:"all",label:r("dns.allTypes")}],disabled:n||!s?.dns_query.available||!i||!t.trim(),reason:!s||n?null:s.dns_query.available?i?null:r("all"===a?"dns.noTypes":"dns.typeUnsupported"):r("dns.queryUnavailable"),showCache:!!s?.dns_cache.available,cards:e?.results.map(s=>({id:s.type,title:`${e.domain} ${s.type}`,...He(s,r),seed:We(e.domain,s.type,s.answers??[],s.upstream,null),answerSeeds:(s.answers??[]).map(a=>Re([a]).length?{address:a.data,seed:Oe(a.data,e.domain,s.type)}:null)}))??[],tabs:Me(s).map(e=>({id:e.id,label:r(e.titleKey)}))}}(_,C,c,i,!!S,t),[_,C,c,i,S,t]),M=k.tabs.map(e=>e.id),R=l.has("domain")||l.has("device"),L=M.includes("log")?R?"log":"stats":M.includes("query")?"query":M[0]??"query",A=x(a,M,L),F=g(C,"config",{whileLoading:!1}),E=pe("query"===A&&F&&g(C,"dns_query",{whileLoading:!1})),D=e.useMemo(()=>F?function(e,s){const a=[...new Set((e??[]).flatMap(e=>e.content?Le(e.content).map(Ae):[]))];return a.length?[{id:"",label:s("dns.upstreamAuto")},...a.map(e=>({id:e,label:e}))]:[]}(E.data?.sources,t):[],[F,E.data,t]),[P,W]=e.useState(""),O=D.some(e=>e.id===P)?P:"";E.data&&P&&!O&&W("");const U=async(e={domain:i,type:c})=>{try{await q("query",async s=>{const a=await xe(n.dnsQuery,e.domain.trim(),"all"===e.type?k.types:[e.type],C?.dns_query.limits?.max_types_per_request??1,s,v?"bypass":"normal",O||void 0);return s.aborted||N(a),a})Line truncated
@@ -1 +0,0 @@
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{M as a,U as t,a8 as n,a1 as r,Y as l,Q as i,ah as d,aM as c,u as o,a9 as u,q as m,c2 as h,z as p,c4 as x,r as g,w as y,h as f,c6 as b,al as j,l as v,cb as w,bS as _,cc as N,b4 as S,c8 as T,A as q,c9 as C,aV as k,cd as M,bR as R,az as L,af as A,E as F,ce as E,bh as D,cf as P,C as W,S as O,ae as U,ay as H,T as B,bu as K,bF as I,cg as Q,bG as $,ch as z,B as J,ci as V,ax as G,p as X,av as Y,bx as Z,ca as ee}from"./index-XeGFdFb3.js";import{D as se}from"./Delete-BlpuXHjZ.js";import{s as ae,l as te,a as ne,m as re,C as le,F as ie,B as de,L as ce,W as oe,n as ue,q as me,D as he}from"./activity-7OeQMmIs.js";import{u as pe,q as xe,k as ge,s as ye,t as fe,S as be,L as je,K as ve,A as we}from"./logs-DNePHVHd.js";import{T as _e}from"./Tabs-BGWzF0yW.js";import{T as Ne}from"./Toolbar-CFyWgMbW.js";import{D as Se}from"./Table-DqqJleJD.js";import{T as Te}from"./TimeCell-B6QtVZge.js";import{c as qe,d as Ce,e as ke}from"./files-Dt8K7QfP.js";import{d as Me}from"./nav-BgyFg1Tl.js";import{a as Re}from"./rule-BUktGcKO.js";import{J as Le,u as Ae}from"./nodes-Bm1vmvln.js";import{u as Fe,R as Ee,Q as De}from"./useQuickRule-8yoKk9d5.js";import{L as Pe}from"./AppearanceControls-Q-jHRGz9.js";/* empty css */import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-Bvif-kkw.js";import"./Select-OqnbuzuK.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-7x8u9Pw1.js";import"./SearchSelect-BVGce3l_.js";import"./SearchList-DWooTdFX.js";import"./flows-CjEC9Jxw.js";function We(e,s,t,n,r){return{domain:e,dip:null,sip:(r&&a(r))??null,outbound:null,matched:null,dns:{type:s,answers:Re(t),upstream:n,query:{name:e,type:s}}}}const Oe=(e,s,a)=>({domain:null,dip:e,sip:null,outbound:null,matched:null,dns:{type:a,answers:[e],upstream:null,query:{name:s,type:a}}}),Ue={forced:"dns.route.forced","dns.routing":"dns.route.rules",default:"dns.route.default"};function He(e,s){return{fields:[[s("ui.state"),e.status],[s("ui.upstream"),e.upstream??"—"],[s("dns.routeSource"),t(Ue,e.route.source,s)],[s("dns.routeRule"),e.route.rule??"—"],[s("ui.elapsed"),n(e.elapsed_ms,s)]],answers:(e.answers??[]).map(e=>s("dns.answer",{name:e.name,type:e.type,ttl:e.ttl,data:e.data})),cacheText:s(e.cached?"dns.hit":"dns.miss"),cacheTone:e.cached?void 0:"warn"}}function Be(e,s,a){return e?a instanceof c&&503===a.status?"unavailable":s?"ready":a?"error":"loading":"unlisted"}const Ke=[{id:"full",label:"rule.kind.domain"},{id:"suffix",label:"rule.kind.domainSuffix"},{id:"keyword",label:"rule.kind.domainKeyword"},{id:"regex",label:"dns.matchRegex"}],Ie=e=>e.trim().toLowerCase().replace(/\.$/,"");function Qe(e,s){if(!s.trim())return()=>!0;if("regex"===e){const e=function(e){try{return new RegExp(e,"iu")}catch{return null}}(s);return e&&(s=>e.test(Ie(s)))}if("keyword"===e){const e=s.trim().toLowerCase();return s=>Ie(s).includes(e)}const a=Ie(s),t="suffix"===e&&a.startsWith("."),n=t?a.slice(1):a;return n?"full"===e?e=>Ie(e)===n:e=>{const s=Ie(e);return s.endsWith("."+n)||!t&&s===n}:null}function $e({go:s,query:a}){const t=o(),n=u(),r=m(),l=e.useMemo(()=>new URLSearchParams(a),[a]),[i,d]=e.useState(l.get("domain")??""),[c,j]=e.useState(l.get("type")??"A"),[v,w]=e.useState(!1);h(l.get("domain"),e=>d(e??"")),h(l.get("type"),e=>j(e??"A"));const[_,N]=e.useState(null),{busy:S,error:T,run:q}=p({rethrow:!0}),C=r.data?.resources,k=e.useMemo(()=>function(e,s,a,t,n,r){const l=s?.dns_query.record_types??[],i="all"===a?l.length>0:l.includes(a);return{types:l,choices:[...l.map(e=>({id:e,label:e})),{id:"all",label:r("dns.allTypes")}],disabled:n||!s?.dns_query.available||!i||!t.trim(),reason:!s||n?null:s.dns_query.available?i?null:r("all"===a?"dns.noTypes":"dns.typeUnsupported"):r("dns.queryUnavailable"),showCache:!!s?.dns_cache.available,cards:e?.results.map(s=>({id:s.type,title:`${e.domain} ${s.type}`,...He(s,r),seed:We(e.domain,s.type,s.answers??[],s.upstream,null),answerSeeds:(s.answers??[]).map(a=>Re([a]).length?{address:a.data,seed:Oe(a.data,e.domain,s.type)}:null)}))??[],tabs:Me(s).map(e=>({id:e.id,label:r(e.titleKey)}))}}(_,C,c,i,!!S,t),[_,C,c,i,S,t]),M=k.tabs.map(e=>e.id),R=l.has("domain")||l.has("device"),L=M.includes("log")?R?"log":"stats":M.includes("query")?"query":M[0]??"query",A=x(a,M,L),F=g(C,"config",{whileLoading:!1}),E=pe("query"===A&&F&&g(C,"dns_query",{whileLoading:!1})),D=e.useMemo(()=>F?function(e,s){const a=[...new Set((e??[]).flatMap(e=>e.content?Le(e.content).map(Ae):[]))];return a.length?[{id:"",label:s("dns.upstreamAuto")},...a.map(e=>({id:e,label:e}))]:[]}(E.data?.sources,t):[],[F,E.data,t]),[P,W]=e.useState(""),O=D.some(e=>e.id===P)?P:"";E.data&&P&&!O&&W("");const U=async(e={domain:i,type:c})=>{try{await q("query",async s=>{const a=await xe(n.dnsQuery,e.domain.trim(),"all"===e.type?k.types:[e.type],C?.dns_query.limits?.max_types_per_request??1,s,v?"bypass":"normal",O||void 0);return s.aborted||N(a),a})Line truncated
@@ -1 +1 @@
import{r as n,j as t}from"./vendor-react-64fcanlc.js";import{u as e,f as r}from"./index-XeGFdFb3.js";import{aW as o,b4 as a,aZ as i,a$ as l}from"./activity-7OeQMmIs.js";import{w as u,c,a as s}from"./array-C0VuvQyb.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./AppearanceControls-Q-jHRGz9.js";import"./ItemText-Bvif-kkw.js";import"./logs-DNePHVHd.js";import"./Select-OqnbuzuK.js";const f=Math.abs,h=Math.atan2,y=Math.cos,p=Math.max,d=Math.min,x=Math.sin,g=Math.sqrt,v=1e-12,m=Math.PI,M=m/2,A=2*m;function j(n){return n>=1?M:n<=-1?-M:Math.asin(n)}function w(n){return n.innerRadius}function b(n){return n.outerRadius}function P(n){return n.startAngle}function T(n){return n.endAngle}function R(n){return n&&n.padAngle}function L(n,t,e,r,o,a,i){var l=n-e,u=t-r,c=(i?a:-a)/g(l*l+u*u),s=c*u,f=-c*l,h=n+s,y=t+f,d=e+s,x=r+f,v=(h+d)/2,m=(y+x)/2,M=d-h,A=x-y,j=M*M+A*A,w=o-a,b=h*x-d*y,P=(A<0?-1:1)*g(p(0,w*w*j-b*b)),T=(b*A-M*P)/j,R=(-b*M-A*P)/j,L=(b*A+M*P)/j,$=(-b*M+A*P)/j,I=T-v,k=R-m,B=L-v,K=$-m;return I*I+k*k>B*B+K*K&&(T=L,R=$),{cx:T,cy:R,x01:-s,y01:-f,x11:T*(o/w-1),y11:R*(o/w-1)}}function $(){var n=w,t=b,e=c(0),r=null,o=P,a=T,i=R,l=null,s=u(p);function p(){var u,c,p,w=+n.apply(this,arguments),b=+t.apply(this,arguments),P=o.apply(this,arguments)-M,T=a.apply(this,arguments)-M,R=f(T-P),$=T>P;if(l||(l=u=s()),b<w&&(c=b,b=w,w=c),b>v)if(R>A-v)l.moveTo(b*y(P),b*x(P)),l.arc(0,0,b,P,T,!$),w>v&&(l.moveTo(w*y(T),w*x(T)),l.arc(0,0,w,T,P,$));else{var I,k,B=P,K=T,N=P,S=T,D=R,E=R,F=i.apply(this,arguments)/2,q=F>v&&(r?+r.apply(this,arguments):g(w*w+b*b)),C=d(f(b-w)/2,+e.apply(this,arguments)),H=C,V=C;if(q>v){var W=j(q/w*x(F)),Z=j(q/b*x(F));(D-=2*W)>v?(N+=W*=$?1:-1,S-=W):(D=0,N=S=(P+T)/2),(E-=2*Z)>v?(B+=Z*=$?1:-1,K-=Z):(E=0,B=K=(P+T)/2)}var _=b*y(B),z=b*x(B),G=w*y(S),J=w*x(S);if(C>v){var O,Q=b*y(K),U=b*x(K),X=w*y(N),Y=w*x(N);if(R<m)if(O=function(n,t,e,r,o,a,i,l){var u=e-n,c=r-t,s=i-o,f=l-a,h=f*u-s*c;if(!(h*h<v))return[n+(h=(s*(t-a)-f*(n-o))/h)*u,t+h*c]}(_,z,X,Y,Q,U,G,J)){var nn=_-O[0],tn=z-O[1],en=Q-O[0],rn=U-O[1],on=1/x(((p=(nn*en+tn*rn)/(g(nn*nn+tn*tn)*g(en*en+rn*rn)))>1?0:p<-1?m:Math.acos(p))/2),an=g(O[0]*O[0]+O[1]*O[1]);H=d(C,(w-an)/(on-1)),V=d(C,(b-an)/(on+1))}else H=V=0}E>v?V>v?(I=L(X,Y,_,z,b,V,$),k=L(Q,U,G,J,b,V,$),l.moveTo(I.cx+I.x01,I.cy+I.y01),V<C?l.arc(I.cx,I.cy,V,h(I.y01,I.x01),h(k.y01,k.x01),!$):(l.arc(I.cx,I.cy,V,h(I.y01,I.x01),h(I.y11,I.x11),!$),l.arc(0,0,b,h(I.cy+I.y11,I.cx+I.x11),h(k.cy+k.y11,k.cx+k.x11),!$),l.arc(k.cx,k.cy,V,h(k.y11,k.x11),h(k.y01,k.x01),!$))):(l.moveTo(_,z),l.arc(0,0,b,B,K,!$)):l.moveTo(_,z),w>v&&D>v?H>v?(I=L(G,J,Q,U,w,-H,$),k=L(_,z,X,Y,w,-H,$),l.lineTo(I.cx+I.x01,I.cy+I.y01),H<C?l.arc(I.cx,I.cy,H,h(I.y01,I.x01),h(k.y01,k.x01),!$):(l.arc(I.cx,I.cy,H,h(I.y01,I.x01),h(I.y11,I.x11),!$),l.arc(0,0,w,h(I.cy+I.y11,I.cx+I.x11),h(k.cy+k.y11,k.cx+k.x11),$),l.arc(k.cx,k.cy,H,h(k.y11,k.x11),h(k.y01,k.x01),!$))):l.arc(0,0,w,S,N,$):l.lineTo(G,J)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return p.centroid=function(){var e=(+n.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-m/2;return[y(r)*e,x(r)*e]},p.innerRadius=function(t){return arguments.length?(n="function"==typeof t?t:c(+t),p):n},p.outerRadius=function(n){return arguments.length?(t="function"==typeof n?n:c(+n),p):t},p.cornerRadius=function(n){return arguments.length?(e="function"==typeof n?n:c(+n),p):e},p.padRadius=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:c(+n),p):r},p.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:c(+n),p):o},p.endAngle=function(n){return arguments.length?(a="function"==typeof n?n:c(+n),p):a},p.padAngle=function(n){return arguments.length?(i="function"==typeof n?n:c(+n),p):i},p.context=function(n){return arguments.length?(l=null==n?null:n,p):l},p}function I(n,t){return t<n?-1:t>n?1:t>=n?0:NaN}function k(n){return n}function B({label:u,rows:f}){const h=e(),[y,p]=r(Math.round,120),{tip:d,showAt:x,hide:g}=o(),[v,m]=n.useState(null),M=f.filter(n=>null!==n.value&&n.value>0),j=p?.width??0,w=p?.height??0,b=a(M.map(n=>n.value)),P=function(){var n=k,t=I,e=null,r=c(0),o=c(A),a=c(0);function i(i){var l,u,c,f,h,y=(i=s(i)).length,p=0,d=new Array(y),x=new Array(y),g=+r.apply(this,arguments),v=Math.min(A,Math.max(-A,o.apply(this,arguments)-g)),m=Math.min(Math.abs(v)/y,a.apply(this,arguments)),M=m*(v<0?-1:1);for(l=0;l<y;++l)(h=x[d[l]=l]=+n(i[l],l,i))>0&&(p+=h);for(null!=t?d.sort(function(n,e){return t(x[n],x[e])}):null!=e&&d.sort(function(n,t){return e(i[n],i[t])}),l=0,c=p?(v-y*M)/p:0;l<y;++l,g=f)u=d[l],f=g+((h=x[u])>0?h*c:0)+M,x[u]={data:i[u],index:l,value:h,startAngle:g,endAngle:f,padAngle:m};return x}return i.value=function(t){return arguments.length?(n="function"==typeof t?t:c(+t),i):n},i.sortValues=function(n){return arguments.length?(t=n,e=null,i):t},i.sort=function(n){return arguments.length?(e=n,t=null,i):e},i.startAngle=function(n){return arguments.length?(r="function"==typeof n?n:c(+nLine truncated
import{r as n,j as t}from"./vendor-react-64fcanlc.js";import{u as e,f as r}from"./index-HxEUeoab.js";import{aW as o,b4 as a,aZ as i,a$ as l}from"./activity-yZTrGy-J.js";import{w as u,c,a as s}from"./array-C0VuvQyb.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./AppearanceControls-sRy1p156.js";import"./ItemText-DOD_75iR.js";import"./logs-C4GIy4tX.js";import"./Select-D7_6MaHd.js";const f=Math.abs,h=Math.atan2,y=Math.cos,p=Math.max,d=Math.min,x=Math.sin,g=Math.sqrt,v=1e-12,m=Math.PI,M=m/2,A=2*m;function j(n){return n>=1?M:n<=-1?-M:Math.asin(n)}function w(n){return n.innerRadius}function b(n){return n.outerRadius}function P(n){return n.startAngle}function T(n){return n.endAngle}function R(n){return n&&n.padAngle}function L(n,t,e,r,o,a,i){var l=n-e,u=t-r,c=(i?a:-a)/g(l*l+u*u),s=c*u,f=-c*l,h=n+s,y=t+f,d=e+s,x=r+f,v=(h+d)/2,m=(y+x)/2,M=d-h,A=x-y,j=M*M+A*A,w=o-a,b=h*x-d*y,P=(A<0?-1:1)*g(p(0,w*w*j-b*b)),T=(b*A-M*P)/j,R=(-b*M-A*P)/j,L=(b*A+M*P)/j,$=(-b*M+A*P)/j,I=T-v,k=R-m,B=L-v,K=$-m;return I*I+k*k>B*B+K*K&&(T=L,R=$),{cx:T,cy:R,x01:-s,y01:-f,x11:T*(o/w-1),y11:R*(o/w-1)}}function $(){var n=w,t=b,e=c(0),r=null,o=P,a=T,i=R,l=null,s=u(p);function p(){var u,c,p,w=+n.apply(this,arguments),b=+t.apply(this,arguments),P=o.apply(this,arguments)-M,T=a.apply(this,arguments)-M,R=f(T-P),$=T>P;if(l||(l=u=s()),b<w&&(c=b,b=w,w=c),b>v)if(R>A-v)l.moveTo(b*y(P),b*x(P)),l.arc(0,0,b,P,T,!$),w>v&&(l.moveTo(w*y(T),w*x(T)),l.arc(0,0,w,T,P,$));else{var I,k,B=P,K=T,N=P,S=T,D=R,E=R,F=i.apply(this,arguments)/2,q=F>v&&(r?+r.apply(this,arguments):g(w*w+b*b)),C=d(f(b-w)/2,+e.apply(this,arguments)),H=C,V=C;if(q>v){var W=j(q/w*x(F)),Z=j(q/b*x(F));(D-=2*W)>v?(N+=W*=$?1:-1,S-=W):(D=0,N=S=(P+T)/2),(E-=2*Z)>v?(B+=Z*=$?1:-1,K-=Z):(E=0,B=K=(P+T)/2)}var _=b*y(B),z=b*x(B),G=w*y(S),J=w*x(S);if(C>v){var O,Q=b*y(K),U=b*x(K),X=w*y(N),Y=w*x(N);if(R<m)if(O=function(n,t,e,r,o,a,i,l){var u=e-n,c=r-t,s=i-o,f=l-a,h=f*u-s*c;if(!(h*h<v))return[n+(h=(s*(t-a)-f*(n-o))/h)*u,t+h*c]}(_,z,X,Y,Q,U,G,J)){var nn=_-O[0],tn=z-O[1],en=Q-O[0],rn=U-O[1],on=1/x(((p=(nn*en+tn*rn)/(g(nn*nn+tn*tn)*g(en*en+rn*rn)))>1?0:p<-1?m:Math.acos(p))/2),an=g(O[0]*O[0]+O[1]*O[1]);H=d(C,(w-an)/(on-1)),V=d(C,(b-an)/(on+1))}else H=V=0}E>v?V>v?(I=L(X,Y,_,z,b,V,$),k=L(Q,U,G,J,b,V,$),l.moveTo(I.cx+I.x01,I.cy+I.y01),V<C?l.arc(I.cx,I.cy,V,h(I.y01,I.x01),h(k.y01,k.x01),!$):(l.arc(I.cx,I.cy,V,h(I.y01,I.x01),h(I.y11,I.x11),!$),l.arc(0,0,b,h(I.cy+I.y11,I.cx+I.x11),h(k.cy+k.y11,k.cx+k.x11),!$),l.arc(k.cx,k.cy,V,h(k.y11,k.x11),h(k.y01,k.x01),!$))):(l.moveTo(_,z),l.arc(0,0,b,B,K,!$)):l.moveTo(_,z),w>v&&D>v?H>v?(I=L(G,J,Q,U,w,-H,$),k=L(_,z,X,Y,w,-H,$),l.lineTo(I.cx+I.x01,I.cy+I.y01),H<C?l.arc(I.cx,I.cy,H,h(I.y01,I.x01),h(k.y01,k.x01),!$):(l.arc(I.cx,I.cy,H,h(I.y01,I.x01),h(I.y11,I.x11),!$),l.arc(0,0,w,h(I.cy+I.y11,I.cx+I.x11),h(k.cy+k.y11,k.cx+k.x11),$),l.arc(k.cx,k.cy,H,h(k.y11,k.x11),h(k.y01,k.x01),!$))):l.arc(0,0,w,S,N,$):l.lineTo(G,J)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return p.centroid=function(){var e=(+n.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-m/2;return[y(r)*e,x(r)*e]},p.innerRadius=function(t){return arguments.length?(n="function"==typeof t?t:c(+t),p):n},p.outerRadius=function(n){return arguments.length?(t="function"==typeof n?n:c(+n),p):t},p.cornerRadius=function(n){return arguments.length?(e="function"==typeof n?n:c(+n),p):e},p.padRadius=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:c(+n),p):r},p.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:c(+n),p):o},p.endAngle=function(n){return arguments.length?(a="function"==typeof n?n:c(+n),p):a},p.padAngle=function(n){return arguments.length?(i="function"==typeof n?n:c(+n),p):i},p.context=function(n){return arguments.length?(l=null==n?null:n,p):l},p}function I(n,t){return t<n?-1:t>n?1:t>=n?0:NaN}function k(n){return n}function B({label:u,rows:f}){const h=e(),[y,p]=r(Math.round,120),{tip:d,showAt:x,hide:g}=o(),[v,m]=n.useState(null),M=f.filter(n=>null!==n.value&&n.value>0),j=p?.width??0,w=p?.height??0,b=a(M.map(n=>n.value)),P=function(){var n=k,t=I,e=null,r=c(0),o=c(A),a=c(0);function i(i){var l,u,c,f,h,y=(i=s(i)).length,p=0,d=new Array(y),x=new Array(y),g=+r.apply(this,arguments),v=Math.min(A,Math.max(-A,o.apply(this,arguments)-g)),m=Math.min(Math.abs(v)/y,a.apply(this,arguments)),M=m*(v<0?-1:1);for(l=0;l<y;++l)(h=x[d[l]=l]=+n(i[l],l,i))>0&&(p+=h);for(null!=t?d.sort(function(n,e){return t(x[n],x[e])}):null!=e&&d.sort(function(n,t){return e(i[n],i[t])}),l=0,c=p?(v-y*M)/p:0;l<y;++l,g=f)u=d[l],f=g+((h=x[u])>0?h*c:0)+M,x[u]={data:i[u],index:l,value:h,startAngle:g,endAngle:f,padAngle:m};return x}return i.value=function(t){return arguments.length?(n="function"==typeof t?t:c(+t),i):n},i.sortValues=function(n){return arguments.length?(t=n,e=null,i):t},i.sort=function(n){return arguments.length?(e=n,t=null,i):e},i.startAngle=function(n){return arguments.length?(r="function"==typeof n?n:c(+nLine truncated
@@ -1 +1 @@
import{r as e,$ as t,a as r,j as n}from"./vendor-react-64fcanlc.js";import{ey as o,gi as i,ep as a,el as s,cN as l,gj as d,gk as c,gl as p,er as u,em as g,en as f,dv as m,eo as h,gb as y,gm as D,ez as v,eP as b,gn as w,go as x,eQ as T,ew as k,dx as E,bp as P,cK as K,cC as O,b7 as S,aD as C,cn as I,eW as j,az as A,bs as R,B as M,f as B,u as L,R as F,ch as $,q as z,d2 as N,bK as V,cw as X,df as Y,b5 as H,aL as q,gp as U,P as J,gq as W,A as _}from"./index-XeGFdFb3.js";import{b5 as G,b6 as Q,b7 as Z,b8 as ee,b9 as te,ba as re,bb as ne,bc as oe,bd as ie,be as ae,bf as se,bg as le,bh as de,bi as ce,bj as pe,bk as ue,bl as ge,bm as fe,bn as me,bo as he,bp as ye,bq as De,br as ve,bs as be,bt as we,bu as xe,bv as Te,bw as ke,bx as Ee,by as Pe,bz as Ke,bA as Oe,bB as Se,bC as Ce,bD as Ie,bE as je,bF as Ae}from"./activity-7OeQMmIs.js";import{$ as Re,a as Me}from"./GridList-wfRSpULl.js";import{m as Be}from"./Select-OqnbuzuK.js";import{D as Le}from"./Delete-BlpuXHjZ.js";import{S as Fe,c as $e,$ as ze}from"./logs-DNePHVHd.js";import{C as Ne}from"./AppearanceControls-Q-jHRGz9.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./ItemText-Bvif-kkw.js";import"./Checkbox-BewExwKL.js";var Ve=function(e){return e[e.none=0]="none",e[e.cancel=0]="cancel",e[e.move=1]="move",e[e.copy=2]="copy",e[e.link=4]="link",e[e.all=7]="all",e}({});const Xe={...Ve,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},Ye=Ue(Xe);Ye[7]="all";const He={none:"cancel",link:"link",copy:"copy",move:"move"},qe=Ue(He);function Ue(e){let t={};for(let r in e)t[e[r]]=r;return t}const Je=new Set(["text/plain","text/uri-list","text/html"]),We="application/vnd.react-aria.items+json",_e="application/octet-stream",Ge=new WeakMap,Qe=Symbol();function Ze(e){let t=new Set;for(let r of e)for(let e of Object.keys(r))t.add(e);return t}function et(e){return e||(e="virtual"),"pointer"===e&&(e="virtual"),"virtual"===e&&"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches&&(e="touch"),e}function tt(){return et(o())}function rt(){return et(i())}class nt{constructor(e){this.types=new Set;let t=!1;for(let r of e.items)r.type!==We&&("file"===r.kind&&(t=!0),r.type?this.types.add(r.type):this.types.add(_e));this.includesUnknownTypes=!t&&e.types.includes("Files")}has(e){if(Array.isArray(e))return e.some(e=>this.has(e));if(this.includesUnknownTypes||e===Qe&&this.types.has(_e)||"*/*"===e)return!0;if("string"==typeof e){if(e.endsWith("/*")){for(let t of this.types)if(t.startsWith(e.slice(0,-2)))return!0;return!1}return this.types.has(e)}return!1}}function ot(e){if(!e)throw new Error("No file provided");return{kind:"file",type:e.type||_e,name:e.name,getText:()=>{return"function"==typeof(t=e).text?t.text():new Promise((e,r)=>{let n=new FileReader;n.onload=()=>{e(n.result)},n.onerror=r,n.readAsText(t)});var t},getFile:()=>Promise.resolve(e)}}function it(e){return{kind:"directory",name:e.name,getEntries:()=>async function*(e){let t,r=e.createReader();do{t=await new Promise((e,t)=>{r.readEntries(e,t)});for(let e of t)if(e.isFile){let t=await at(e);yield ot(t)}else e.isDirectory&&(yield it(e))}while(t.length>0)}(e)}}function at(e){return new Promise((t,r)=>e.file(t,r))}let st,lt={draggingKeys:new Set};function dt(e){lt.dropCollectionRef=e}function ct(){lt={draggingKeys:new Set}}function pt(e){let{draggingCollectionRef:t,dropCollectionRef:r}=lt;return null!=t?.current&&t.current===(e?.current||r?.current)}function ut(e){st=e}let gt=Ve.none;function ft(e){gt=e}let mt=new Map,ht=new Map,yt=null,Dt=new Set;function vt(e){return mt.set(e.element,e),yt?.updateValidDropTargets(),()=>{mt.delete(e.element),yt?.updateValidDropTargets()}}function bt(){let[t,r]=e.useState(yt);return e.useEffect(()=>{let e=()=>r(yt);return Dt.add(e),()=>{Dt.delete(e)}},[]),t}function wt(){return!!yt}const xt=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],Tt=["pointerup","mouseup","touchend"],kt={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class Et{constructor(e,t){this.validDropTargets=[],this.currentDropTarget=null,this.currentDropItem=null,this.dropOperation=null,this.mutationObserver=null,this.restoreAriaHidden=null,this.isVirtualClick=!1,this.dragTarget=e,this.stringFormatter=t,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}setup(){document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("focus",this.onFocus,!0),window.addEventListener("blur",this.onBlur,!0),document.addELine truncated
import{r as e,$ as t,a as r,j as n}from"./vendor-react-64fcanlc.js";import{ey as o,gi as i,ep as a,el as s,cN as l,gj as d,gk as c,gl as p,er as u,em as g,en as f,dv as m,eo as h,gb as y,gm as D,ez as v,eP as b,gn as w,go as x,eQ as T,ew as k,dx as E,bp as P,cK as K,cC as O,b7 as S,aD as C,cl as I,eW as j,az as A,bs as R,B as M,f as B,u as L,R as F,ch as $,q as z,d2 as N,bK as V,cw as X,df as Y,b5 as H,aL as q,gp as U,P as J,gq as W,A as _}from"./index-HxEUeoab.js";import{b5 as G,b6 as Q,b7 as Z,b8 as ee,b9 as te,ba as re,bb as ne,bc as oe,bd as ie,be as ae,bf as se,bg as le,bh as de,bi as ce,bj as pe,bk as ue,bl as ge,bm as fe,bn as me,bo as he,bp as ye,bq as De,br as ve,bs as be,bt as we,bu as xe,bv as Te,bw as ke,bx as Ee,by as Pe,bz as Ke,bA as Oe,bB as Se,bC as Ce,bD as Ie,bE as je,bF as Ae}from"./activity-yZTrGy-J.js";import{$ as Re,a as Me}from"./GridList-D7qdplA5.js";import{m as Be}from"./Select-D7_6MaHd.js";import{D as Le}from"./Delete-CR2AtZsd.js";import{S as Fe,c as $e,$ as ze}from"./logs-C4GIy4tX.js";import{C as Ne}from"./AppearanceControls-sRy1p156.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./ItemText-DOD_75iR.js";import"./Checkbox-CJt7u9-e.js";var Ve=function(e){return e[e.none=0]="none",e[e.cancel=0]="cancel",e[e.move=1]="move",e[e.copy=2]="copy",e[e.link=4]="link",e[e.all=7]="all",e}({});const Xe={...Ve,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},Ye=Ue(Xe);Ye[7]="all";const He={none:"cancel",link:"link",copy:"copy",move:"move"},qe=Ue(He);function Ue(e){let t={};for(let r in e)t[e[r]]=r;return t}const Je=new Set(["text/plain","text/uri-list","text/html"]),We="application/vnd.react-aria.items+json",_e="application/octet-stream",Ge=new WeakMap,Qe=Symbol();function Ze(e){let t=new Set;for(let r of e)for(let e of Object.keys(r))t.add(e);return t}function et(e){return e||(e="virtual"),"pointer"===e&&(e="virtual"),"virtual"===e&&"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches&&(e="touch"),e}function tt(){return et(o())}function rt(){return et(i())}class nt{constructor(e){this.types=new Set;let t=!1;for(let r of e.items)r.type!==We&&("file"===r.kind&&(t=!0),r.type?this.types.add(r.type):this.types.add(_e));this.includesUnknownTypes=!t&&e.types.includes("Files")}has(e){if(Array.isArray(e))return e.some(e=>this.has(e));if(this.includesUnknownTypes||e===Qe&&this.types.has(_e)||"*/*"===e)return!0;if("string"==typeof e){if(e.endsWith("/*")){for(let t of this.types)if(t.startsWith(e.slice(0,-2)))return!0;return!1}return this.types.has(e)}return!1}}function ot(e){if(!e)throw new Error("No file provided");return{kind:"file",type:e.type||_e,name:e.name,getText:()=>{return"function"==typeof(t=e).text?t.text():new Promise((e,r)=>{let n=new FileReader;n.onload=()=>{e(n.result)},n.onerror=r,n.readAsText(t)});var t},getFile:()=>Promise.resolve(e)}}function it(e){return{kind:"directory",name:e.name,getEntries:()=>async function*(e){let t,r=e.createReader();do{t=await new Promise((e,t)=>{r.readEntries(e,t)});for(let e of t)if(e.isFile){let t=await at(e);yield ot(t)}else e.isDirectory&&(yield it(e))}while(t.length>0)}(e)}}function at(e){return new Promise((t,r)=>e.file(t,r))}let st,lt={draggingKeys:new Set};function dt(e){lt.dropCollectionRef=e}function ct(){lt={draggingKeys:new Set}}function pt(e){let{draggingCollectionRef:t,dropCollectionRef:r}=lt;return null!=t?.current&&t.current===(e?.current||r?.current)}function ut(e){st=e}let gt=Ve.none;function ft(e){gt=e}let mt=new Map,ht=new Map,yt=null,Dt=new Set;function vt(e){return mt.set(e.element,e),yt?.updateValidDropTargets(),()=>{mt.delete(e.element),yt?.updateValidDropTargets()}}function bt(){let[t,r]=e.useState(yt);return e.useEffect(()=>{let e=()=>r(yt);return Dt.add(e),()=>{Dt.delete(e)}},[]),t}function wt(){return!!yt}const xt=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],Tt=["pointerup","mouseup","touchend"],kt={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class Et{constructor(e,t){this.validDropTargets=[],this.currentDropTarget=null,this.currentDropItem=null,this.dropOperation=null,this.mutationObserver=null,this.restoreAriaHidden=null,this.isVirtualClick=!1,this.dragTarget=e,this.stringFormatter=t,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}setup(){document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("focus",this.onFocus,!0),window.addEventListener("blur",this.onBlur,!0),document.addELine truncated
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{U as n,a2 as s,a4 as r,a1 as a,h as i,a9 as o,u as l,al as d,l as c,q as m,c2 as u,ab as p,ac as v,dp as h,dq as j,T as f,av as x,B as b,p as g,E as w}from"./index-XeGFdFb3.js";import{L as k}from"./AppearanceControls-Q-jHRGz9.js";import{d as y,O as T,K as N,L as C}from"./logs-DNePHVHd.js";import{T as H}from"./Toolbar-CFyWgMbW.js";import{D as _}from"./Table-DqqJleJD.js";import{d as K,e as O}from"./files-Dt8K7QfP.js";import{j as S,D as W}from"./activity-7OeQMmIs.js";import{u as L,C as M}from"./Copy-Cix1qeo3.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-Bvif-kkw.js";import"./Select-OqnbuzuK.js";import"./nodes-Bm1vmvln.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";const R={buffer_overflow:["event.gap.overflow","event.gapHelp.overflow"],evicted:["event.gap.evicted","event.gapHelp.evicted"]};function q(e,t){const n="flow.gap"===e.event&&Object.hasOwn(R,e.data.reason)?R[e.data.reason]:void 0;return n&&{title:t(n[0]),text:t(n[1])}}function D(e,t){const n=e=>e?[{id:"flow",label:t("event.viewFlow"),href:i("flows",{tab:"records",id:e})}]:[];switch(e.event){case"flow.updated":return n(e.data.resource_id);case"flow.gap":return[...n(e.data.resource_id),{id:"recording",label:t("ui.recordingSettings"),href:S}];case"generation.changed":return[{id:"config",label:t("event.viewConfig"),href:i("config")}];default:return[]}}const F=new WeakMap;function I(e,t,i,o,l,d,c,m,u=!1,p=()=>!1){const v="without-runtime"===t||m.includes(t)?t:"all",h=e.filter(e=>"all"===v||("without-runtime"===v?"runtime.updated"!==e.event:e.event===v)).slice(0,l);return{kind:v,rows:h.map(e=>function(e,t,i,o){const l=F.get(e);if(l&&l.locale===t)return l.row;const d=o?{key:"event.lostHistory"}:r(e,i),c={id:y(e),timestamp:a(e.data.observed_at,t),iso:e.data.observed_at,kind:e.event,kindText:n(s,e.event,i),summary:i(d.key,d.params),help:q(e,i),links:D(e,i),event:e};return F.set(e,{locale:t,row:c}),c}(e,d,c,p(e))),kinds:[{id:"without-runtime",label:c("event.withoutRuntime")},{id:"all",label:c("event.allKinds")},...m.map(e=>({id:e,label:n(s,e,c)}))],status:u&&!1!==o?{tone:"err",text:c("event.disconnected")}:{tone:i?"ok":null===o?"muted":"warn",text:c(!1===o?"event.unavailable":i?"event.connected":null===o?"ui.loading":"event.reconnecting")},limitText:c("event.limit",{n:l}),shown:h}}function J(){const t=o(),n=l(),s=d[c()],r=m(),a=r.data?.resources.events.kinds,[i,f]=e.useState("without-runtime"),x="all"!==i&&"runtime.updated"!==i&&a?.includes(i),b=T("without-runtime"!==i&&!x),g=e.useMemo(()=>I(b.events,i,b.connected,b.available,j,s,n,a??[],!!b.error,h),[b.events,i,b.connected,b.available,b.error,s,n,a]);return u(g.kind,f),{...g,setKind:f,cursor:b.cursor,error:b.error,retry:()=>{p().then(()=>v(t))},loading:!b.error&&!b.connected&&!1!==b.available&&!b.events.length,export:()=>{return K(O("doona-events","json"),(e=g.shown,JSON.stringify(e,null,2)+"\n"),"application/json");var e}}}function P(){const n=l(),s=J(),r=L(),a=e.useMemo(()=>[{id:"t",label:n("ui.time"),minWidth:212,grow:0,drop:1,render:e=>t.jsx(f,{className:"rp-code",text:e.iso,children:e.timestamp})},{id:"k",label:n("event.kind"),minWidth:224,drop:2,render:e=>t.jsx(f,{text:e.kind,children:e.kindText})},{id:"m",label:n("event.summary"),minWidth:176,isRowHeader:!0,render:e=>t.jsx(x,{fill:!0,help:e.help,children:t.jsx(f,{children:e.summary})})},{id:"actions",actions:!0,label:n("ui.actions"),hideLabel:!0,minWidth:64,grow:0,render:e=>t.jsx(b,{small:!0,quiet:!0,icon:!0,label:n("ui.copyRecord"),onPress:()=>{r((e=>JSON.stringify(e,null,2))(e.event))},children:t.jsx(M,{})})}],[n,r]),i=e.useCallback(e=>t.jsxs(t.Fragment,{children:[t.jsx(N,{inline:!0,items:[[n("ui.time"),e.timestamp],[n("event.kind"),e.kindText],[n("event.summary"),e.summary]]}),e.links.length>0&&t.jsx("div",{className:"rp-cluster",children:e.links.map(e=>t.jsx(k,{appearance:"button",href:e.href,children:e.label},e.id))})]}),[n]);return t.jsxs("div",{className:"rp-page",children:[t.jsxs(H,{page:!0,children:[t.jsx(C,{label:n("event.kind"),side:!0,value:s.kind,onChange:s.setKind,items:s.kinds}),t.jsx(g,{small:!0,tone:s.status.tone,children:s.status.text}),s.cursor&&t.jsx(f,{text:s.cursor,children:t.jsx("span",{className:"rp-label",children:n("event.cursor")})}),t.jsx("span",{className:"rp-label",children:s.limitText}),t.jsx("span",{className:"rp-grow"}),t.jsxs(b,{isDisabled:!s.rows.length,onPress:s.export,children:[t.jsx(W,{}),n("event.export")]})]}),s.error&&t.jsx(w,{error:s.error,onRetry:s.retry}),t.jsx(_,{label:n("nav.events"),stream:!0,flow:!0,loading:s.loading,rows:s.rows,empty:n("event.empty"),cols:a,detail:i})]})}export{P as Events};
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{U as n,a2 as s,a4 as r,a1 as a,h as i,a9 as o,u as l,al as d,l as c,q as m,c2 as u,ab as p,ac as v,dp as h,dq as j,T as f,av as x,B as b,p as g,E as w}from"./index-HxEUeoab.js";import{L as k}from"./AppearanceControls-sRy1p156.js";import{d as y,O as T,K as N,L as C}from"./logs-C4GIy4tX.js";import{T as H}from"./Toolbar-BTFtduwD.js";import{D as _}from"./Table-yWn0d3vL.js";import{d as K,e as O}from"./files-Dt8K7QfP.js";import{j as S,D as W}from"./activity-yZTrGy-J.js";import{u as L,C as M}from"./Copy-CGFSe6tr.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-DOD_75iR.js";import"./Select-D7_6MaHd.js";import"./nodes-6sIn2I0s.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";const R={buffer_overflow:["event.gap.overflow","event.gapHelp.overflow"],evicted:["event.gap.evicted","event.gapHelp.evicted"]};function q(e,t){const n="flow.gap"===e.event&&Object.hasOwn(R,e.data.reason)?R[e.data.reason]:void 0;return n&&{title:t(n[0]),text:t(n[1])}}function D(e,t){const n=e=>e?[{id:"flow",label:t("event.viewFlow"),href:i("flows",{tab:"records",id:e})}]:[];switch(e.event){case"flow.updated":return n(e.data.resource_id);case"flow.gap":return[...n(e.data.resource_id),{id:"recording",label:t("ui.recordingSettings"),href:S}];case"generation.changed":return[{id:"config",label:t("event.viewConfig"),href:i("config")}];default:return[]}}const F=new WeakMap;function I(e,t,i,o,l,d,c,m,u=!1,p=()=>!1){const v="without-runtime"===t||m.includes(t)?t:"all",h=e.filter(e=>"all"===v||("without-runtime"===v?"runtime.updated"!==e.event:e.event===v)).slice(0,l);return{kind:v,rows:h.map(e=>function(e,t,i,o){const l=F.get(e);if(l&&l.locale===t)return l.row;const d=o?{key:"event.lostHistory"}:r(e,i),c={id:y(e),timestamp:a(e.data.observed_at,t),iso:e.data.observed_at,kind:e.event,kindText:n(s,e.event,i),summary:i(d.key,d.params),help:q(e,i),links:D(e,i),event:e};return F.set(e,{locale:t,row:c}),c}(e,d,c,p(e))),kinds:[{id:"without-runtime",label:c("event.withoutRuntime")},{id:"all",label:c("event.allKinds")},...m.map(e=>({id:e,label:n(s,e,c)}))],status:u&&!1!==o?{tone:"err",text:c("event.disconnected")}:{tone:i?"ok":null===o?"muted":"warn",text:c(!1===o?"event.unavailable":i?"event.connected":null===o?"ui.loading":"event.reconnecting")},limitText:c("event.limit",{n:l}),shown:h}}function J(){const t=o(),n=l(),s=d[c()],r=m(),a=r.data?.resources.events.kinds,[i,f]=e.useState("without-runtime"),x="all"!==i&&"runtime.updated"!==i&&a?.includes(i),b=T("without-runtime"!==i&&!x),g=e.useMemo(()=>I(b.events,i,b.connected,b.available,j,s,n,a??[],!!b.error,h),[b.events,i,b.connected,b.available,b.error,s,n,a]);return u(g.kind,f),{...g,setKind:f,cursor:b.cursor,error:b.error,retry:()=>{p().then(()=>v(t))},loading:!b.error&&!b.connected&&!1!==b.available&&!b.events.length,export:()=>{return K(O("doona-events","json"),(e=g.shown,JSON.stringify(e,null,2)+"\n"),"application/json");var e}}}function P(){const n=l(),s=J(),r=L(),a=e.useMemo(()=>[{id:"t",label:n("ui.time"),minWidth:212,grow:0,drop:1,render:e=>t.jsx(f,{className:"rp-code",text:e.iso,children:e.timestamp})},{id:"k",label:n("event.kind"),minWidth:224,drop:2,render:e=>t.jsx(f,{text:e.kind,children:e.kindText})},{id:"m",label:n("event.summary"),minWidth:176,isRowHeader:!0,render:e=>t.jsx(x,{fill:!0,help:e.help,children:t.jsx(f,{children:e.summary})})},{id:"actions",actions:!0,label:n("ui.actions"),hideLabel:!0,minWidth:64,grow:0,render:e=>t.jsx(b,{small:!0,quiet:!0,icon:!0,label:n("ui.copyRecord"),onPress:()=>{r((e=>JSON.stringify(e,null,2))(e.event))},children:t.jsx(M,{})})}],[n,r]),i=e.useCallback(e=>t.jsxs(t.Fragment,{children:[t.jsx(N,{inline:!0,items:[[n("ui.time"),e.timestamp],[n("event.kind"),e.kindText],[n("event.summary"),e.summary]]}),e.links.length>0&&t.jsx("div",{className:"rp-cluster",children:e.links.map(e=>t.jsx(k,{appearance:"button",href:e.href,children:e.label},e.id))})]}),[n]);return t.jsxs("div",{className:"rp-page",children:[t.jsxs(H,{page:!0,children:[t.jsx(C,{label:n("event.kind"),side:!0,value:s.kind,onChange:s.setKind,items:s.kinds}),t.jsx(g,{small:!0,tone:s.status.tone,children:s.status.text}),s.cursor&&t.jsx(f,{text:s.cursor,children:t.jsx("span",{className:"rp-label",children:n("event.cursor")})}),t.jsx("span",{className:"rp-label",children:s.limitText}),t.jsx("span",{className:"rp-grow"}),t.jsxs(b,{isDisabled:!s.rows.length,onPress:s.export,children:[t.jsx(W,{}),n("event.export")]})]}),s.error&&t.jsx(w,{error:s.error,onRetry:s.retry}),t.jsx(_,{label:n("nav.events"),stream:!0,flow:!0,loading:s.loading,rows:s.rows,empty:n("event.empty"),cols:a,detail:i})]})}export{P as Events};
@@ -1 +1 @@
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{u as a,l,ct as t,al as o,dg as i,b5 as n,B as r}from"./index-XeGFdFb3.js";import{S as c}from"./SearchSelect-BVGce3l_.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-OqnbuzuK.js";import"./ItemText-Bvif-kkw.js";import"./SearchList-DWooTdFX.js";import"./Virtualizer-FvdVRagH.js";function m({name:n,value:r,automaticFlag:m,onChange:d}){const f=a(),g=l(),p=e.useMemo(()=>t(o[g]),[g]),j=i(n),u=p.find(e=>e.flag===m),h=u?f("flags.detected",{region:u.label}):f("flags.automatic");return s.jsx("div",{className:"rp-list",children:s.jsx(c,{label:f("flags.region"),description:f(j?"flags.embedded":"flags.help"),isDisabled:j,searchLabel:f("flags.search"),value:j?"automatic":r,onChange:d,sections:[{id:"flags",items:[{id:"automatic",label:h,flag:m},{id:"none",label:f("flags.none"),flag:null},...p]}]})})}function d({name:e,onClose:l,...t}){const o=a();return s.jsxs(n,{narrow:!0,title:o("flags.edit"),isOpen:!0,onOpenChange:e=>{e||l()},footer:()=>s.jsx(r,{onPress:l,children:o("ui.close")}),children:[s.jsx("p",{className:"rp-note",children:e}),s.jsx(m,{name:e,...t})]})}export{m as FlagField,d as FlagPicker};
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{u as a,l,ct as t,al as o,dg as i,b5 as n,B as r}from"./index-HxEUeoab.js";import{S as c}from"./SearchSelect-BcScGUbQ.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-D7_6MaHd.js";import"./ItemText-DOD_75iR.js";import"./SearchList-LjCruZYP.js";import"./Virtualizer-DMIKG2CD.js";function m({name:n,value:r,automaticFlag:m,onChange:d}){const f=a(),g=l(),p=e.useMemo(()=>t(o[g]),[g]),j=i(n),u=p.find(e=>e.flag===m),h=u?f("flags.detected",{region:u.label}):f("flags.automatic");return s.jsx("div",{className:"rp-list",children:s.jsx(c,{label:f("flags.region"),description:f(j?"flags.embedded":"flags.help"),isDisabled:j,searchLabel:f("flags.search"),value:j?"automatic":r,onChange:d,sections:[{id:"flags",items:[{id:"automatic",label:h,flag:m},{id:"none",label:f("flags.none"),flag:null},...p]}]})})}function d({name:e,onClose:l,...t}){const o=a();return s.jsxs(n,{narrow:!0,title:o("flags.edit"),isOpen:!0,onOpenChange:e=>{e||l()},footer:()=>s.jsx(r,{onPress:l,children:o("ui.close")}),children:[s.jsx("p",{className:"rp-note",children:e}),s.jsx(m,{name:e,...t})]})}export{m as FlagField,d as FlagPicker};
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{O as n}from"./OutboundTag-B01P-KVW.js";import{l as a,p as o,c as s,h as r,R as l,S as i,L as d,K as u}from"./logs-DNePHVHd.js";import{a6 as c,M as p,a3 as m,H as f,G as g,c4 as w,c6 as h,w as b,bZ as v,U as j,b$ as x,c0 as y,al as k,a1 as _,h as M,ak as N,o as L,a8 as S,Y as T,u as C,l as P,i as O,B as F,N as R,b7 as E,ax as H,q,r as W,b4 as $,c8 as I,c3 as D,aG as A,E as U,T as B,aE as J,bx as K,S as Q,af as G,C as V}from"./index-XeGFdFb3.js";import{h as Z,f as z,i as X,o as Y,j as ee,d as te}from"./activity-7OeQMmIs.js";import{w as ne}from"./labels-D8xxfRTQ.js";import{c as ae,C as oe}from"./Coverage-fmBkVF9H.js";import{f as se}from"./nav-BIicxOIW.js";import{L as re}from"./AppearanceControls-Q-jHRGz9.js";import{T as le}from"./Tabs-BGWzF0yW.js";import{T as ie}from"./Toolbar-CFyWgMbW.js";import{D as de}from"./Table-DqqJleJD.js";import{T as ue}from"./TimeCell-B6QtVZge.js";import{a as ce,u as pe,b as me}from"./flows-CjEC9Jxw.js";import{u as fe}from"./outbounds-UWplA2Qq.js";import{u as ge,Q as we,R as he}from"./useQuickRule-8yoKk9d5.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Tag-BaZZD5o2.js";import"./Select-OqnbuzuK.js";import"./ItemText-Bvif-kkw.js";import"./nodes-Bm1vmvln.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-7x8u9Pw1.js";import"./SearchSelect-BVGce3l_.js";import"./SearchList-DWooTdFX.js";import"./rule-BUktGcKO.js";const be=["client","rule","outbound","node"];function ve(e,t){if(e.rule_id)return null!==e.rule_generation_id&&e.rule_generation_id===t?e.rule_id:e.rule_id+"\0"+e.rule_expression}function je(e,t,n,a){switch(t){case"client":{const t=p(e.input?.src??void 0);return{label:t??"unknown",unknown:!t}}case"rule":return e.rule_expression?{label:e.rule_expression,unknown:!1,key:ve(e,a)}:{label:"unknown",unknown:!0};case"outbound":return e.outbound?{label:e.outbound,unknown:!1}:{label:"unknown",unknown:!0};case"node":{if(c(e.outbound))return null;const t=e.chain.at(-1)??null;return t?{label:n.get(t)??t,unknown:!1,key:t}:{label:"unknown",unknown:!0}}}}const xe=(e,t)=>z(e,t.unknown?"":t.key??t.label),ye=e=>Z(e,be)?.kind,ke=new Map;function _e(e,t,n){const a=ye(t);return a?e.filter(e=>{const o=je(e,a,ke,n?.generation_id);return null!==o&&xe(a,o)===t}):[]}function Me(e,t,n,a){const o=Z(e,be);if(!o||""===o.value)return a(null);const{kind:s,value:r}=o;return"rule"===s?r.includes("\0")?r.slice(r.indexOf("\0")+1):t.find(e=>e.rule_id===r)?.expression??r:"node"===s?n.get(r)??r:"client"===s?r:a(r)}function Ne(e,t,n,a,o="rule"){const s=(e=>new Map(e.map(e=>[e.id,e.name])))(n),r=new Map(t.map(e=>[e.id,e])),l=new Map(t.map(e=>[e.name,e])),i=new Map(n.map(e=>[e.id,e])),d=new Map,u=new Map,p=new Map,w=new Map,h=(e,t)=>{const n=e+">"+t;let a=w.get(n);return a||w.set(n,a={source:e,target:t,count:0}),a},b=(e,t,n=!1)=>{const a=xe("node",{key:e,label:t,unknown:n});let o=p.get(a);if(!o){const s=n?void 0:i.get(e),r=s&&f(s);p.set(a,o={id:a,label:t,count:0,unknown:n||void 0,latency:g(r),unavailable:"unavailable"===r?.state})}return o},v=(e,t=!1)=>{const n=xe("outbound",{label:e,unknown:t});let a=u.get(n);if(a)return a;const o=t?void 0:l.get(e),d=t?{groups:[],member:null}:m(e,o?.selection.tcp_member_id?"tcp":"udp",l,r,i),p=d.groups.map(e=>({name:e.name,kind:e.policy.kind,policy:e.policy.native})),f=d.member;return a={id:n,label:e,count:0,unknown:t||void 0,kind:t?"unknown":c(e)?e:p.length?"group":"unknown",groups:p,node:f&&b(f,s.get(f)??f).id},u.set(n,a),a.node&&h(n,a.node),a},j=(e,t,n=!1)=>{let a=d.get(e);return a||d.set(e,a={id:e,label:t,count:0,unknown:n||void 0,outbound:null,must:!1}),a};if("rule"===o)for(const c of a?.rules??[]){const e=j(xe("rule",{key:c.rule_id,label:c.expression}),c.expression);e.must=c.must,c.outbound&&(e.outbound=v(c.outbound).id,h(e.id,e.outbound))}const x=[o,"outbound","node"];for(const c of e){let e;for(const t of x){const n=je(c,t,s,a?.generation_id);if(!n)break;const o="outbound"===t?v(n.label,n.unknown):"node"===t?b(n.key??n.label,n.label,n.unknown):j(xe(t,n),n.label,n.unknown);o.count++,e&&h(e.id,o.id).count++,e=o}}for(const c of t)v(c.name);const y=new Set([...d.values()].map(e=>e.outbound)),k=new Set([...u.values()].flatMap(e=>e.groups.slice(1).map(e=>e.name))),_=[...u.values()].filter(e=>e.count||y.has(e.id)||!k.has(e.label)),M=new Set(_.map(e=>e.id)),N=[...w.values()].filter(e=>M.has(e.source)||M.has(e.target)),L=new Set(N.map(e=>e.target));return{by:o,leaves:[...d.values()],outbounds:_,nodes:[...p.values()].filter(e=>L.has(e.id)),links:N}}const Le=new WeakMap;function Se(e){const t=Le.get(e);if(t)return t;const n=new Map,a=new Map,o=new Map;for(const l of e.links){for(const[e,t]of[[n,l.source],[a,l.target]]){let n=e.get(t);n||e.set(t,n=[]),n.push(l)}(!o.has(l.source)||o.get(l.source).count<l.count)&&o.set(l.source,l)}const s=new Map;for(const l of[...e.leaves,...e.outbounds]){const e=("groups"in l?l.node:l.outbound)??oLine truncated
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{O as n}from"./OutboundTag-CO8Ndxdr.js";import{l as a,p as o,c as s,h as r,R as l,S as i,L as d,K as u}from"./logs-C4GIy4tX.js";import{a6 as c,M as p,a3 as m,H as f,G as g,c4 as w,c6 as h,w as b,bZ as v,U as j,b$ as x,c0 as y,al as k,a1 as _,h as M,ak as N,o as L,a8 as S,Y as T,u as C,l as P,i as O,B as F,N as R,b7 as E,ax as H,q,r as W,b4 as $,c8 as I,c3 as D,aG as A,E as U,T as B,aE as J,bx as K,S as Q,af as G,C as V}from"./index-HxEUeoab.js";import{h as Z,f as z,i as X,o as Y,j as ee,d as te}from"./activity-yZTrGy-J.js";import{w as ne}from"./labels-D8xxfRTQ.js";import{c as ae,C as oe}from"./Coverage-8qg_JeNJ.js";import{f as se}from"./nav-CKRufMnz.js";import{L as re}from"./AppearanceControls-sRy1p156.js";import{T as le}from"./Tabs-DT6MQhIo.js";import{T as ie}from"./Toolbar-BTFtduwD.js";import{D as de}from"./Table-yWn0d3vL.js";import{T as ue}from"./TimeCell-BIqfL3y_.js";import{a as ce,u as pe,b as me}from"./flows-dBNkBg79.js";import{u as fe}from"./outbounds-Bbb6kdae.js";import{u as ge,Q as we,R as he}from"./useQuickRule-DUEi6geL.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Tag-SxASl3TF.js";import"./Select-D7_6MaHd.js";import"./ItemText-DOD_75iR.js";import"./nodes-6sIn2I0s.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./AddCircle-C6Jc7GCc.js";import"./SearchSelect-BcScGUbQ.js";import"./SearchList-LjCruZYP.js";import"./rule-Bl9YOsFn.js";const be=["client","rule","outbound","node"];function ve(e,t){if(e.rule_id)return null!==e.rule_generation_id&&e.rule_generation_id===t?e.rule_id:e.rule_id+"\0"+e.rule_expression}function je(e,t,n,a){switch(t){case"client":{const t=p(e.input?.src??void 0);return{label:t??"unknown",unknown:!t}}case"rule":return e.rule_expression?{label:e.rule_expression,unknown:!1,key:ve(e,a)}:{label:"unknown",unknown:!0};case"outbound":return e.outbound?{label:e.outbound,unknown:!1}:{label:"unknown",unknown:!0};case"node":{if(c(e.outbound))return null;const t=e.chain.at(-1)??null;return t?{label:n.get(t)??t,unknown:!1,key:t}:{label:"unknown",unknown:!0}}}}const xe=(e,t)=>z(e,t.unknown?"":t.key??t.label),ye=e=>Z(e,be)?.kind,ke=new Map;function _e(e,t,n){const a=ye(t);return a?e.filter(e=>{const o=je(e,a,ke,n?.generation_id);return null!==o&&xe(a,o)===t}):[]}function Me(e,t,n,a){const o=Z(e,be);if(!o||""===o.value)return a(null);const{kind:s,value:r}=o;return"rule"===s?r.includes("\0")?r.slice(r.indexOf("\0")+1):t.find(e=>e.rule_id===r)?.expression??r:"node"===s?n.get(r)??r:"client"===s?r:a(r)}function Ne(e,t,n,a,o="rule"){const s=(e=>new Map(e.map(e=>[e.id,e.name])))(n),r=new Map(t.map(e=>[e.id,e])),l=new Map(t.map(e=>[e.name,e])),i=new Map(n.map(e=>[e.id,e])),d=new Map,u=new Map,p=new Map,w=new Map,h=(e,t)=>{const n=e+">"+t;let a=w.get(n);return a||w.set(n,a={source:e,target:t,count:0}),a},b=(e,t,n=!1)=>{const a=xe("node",{key:e,label:t,unknown:n});let o=p.get(a);if(!o){const s=n?void 0:i.get(e),r=s&&f(s);p.set(a,o={id:a,label:t,count:0,unknown:n||void 0,latency:g(r),unavailable:"unavailable"===r?.state})}return o},v=(e,t=!1)=>{const n=xe("outbound",{label:e,unknown:t});let a=u.get(n);if(a)return a;const o=t?void 0:l.get(e),d=t?{groups:[],member:null}:m(e,o?.selection.tcp_member_id?"tcp":"udp",l,r,i),p=d.groups.map(e=>({name:e.name,kind:e.policy.kind,policy:e.policy.native})),f=d.member;return a={id:n,label:e,count:0,unknown:t||void 0,kind:t?"unknown":c(e)?e:p.length?"group":"unknown",groups:p,node:f&&b(f,s.get(f)??f).id},u.set(n,a),a.node&&h(n,a.node),a},j=(e,t,n=!1)=>{let a=d.get(e);return a||d.set(e,a={id:e,label:t,count:0,unknown:n||void 0,outbound:null,must:!1}),a};if("rule"===o)for(const c of a?.rules??[]){const e=j(xe("rule",{key:c.rule_id,label:c.expression}),c.expression);e.must=c.must,c.outbound&&(e.outbound=v(c.outbound).id,h(e.id,e.outbound))}const x=[o,"outbound","node"];for(const c of e){let e;for(const t of x){const n=je(c,t,s,a?.generation_id);if(!n)break;const o="outbound"===t?v(n.label,n.unknown):"node"===t?b(n.key??n.label,n.label,n.unknown):j(xe(t,n),n.label,n.unknown);o.count++,e&&h(e.id,o.id).count++,e=o}}for(const c of t)v(c.name);const y=new Set([...d.values()].map(e=>e.outbound)),k=new Set([...u.values()].flatMap(e=>e.groups.slice(1).map(e=>e.name))),_=[...u.values()].filter(e=>e.count||y.has(e.id)||!k.has(e.label)),M=new Set(_.map(e=>e.id)),N=[...w.values()].filter(e=>M.has(e.source)||M.has(e.target)),L=new Set(N.map(e=>e.target));return{by:o,leaves:[...d.values()],outbounds:_,nodes:[...p.values()].filter(e=>L.has(e.id)),links:N}}const Le=new WeakMap;function Se(e){const t=Le.get(e);if(t)return t;const n=new Map,a=new Map,o=new Map;for(const l of e.links){for(const[e,t]of[[n,l.source],[a,l.target]]){let n=e.get(t);n||e.set(t,n=[]),n.push(l)}(!o.has(l.source)||o.get(l.source).count<l.count)&&o.set(l.source,l)}const s=new Map;for(const l of[...e.leaves,...e.outbounds]){const e=("groups"in l?l.node:l.outbound)??oLine truncated
@@ -1 +1 @@
import{fG as e,cK as t,cD as r,cC as o,bp as a,fH as i,dY as l,eB as n,eC as s,eq as c,er as d,es as u,cL as p,et as g,ev as f,ew as y,cN as v,eu as b,el as h,e1 as m,fM as k,c$ as D,e6 as w,d3 as E,d2 as P,eA as M,cU as x,cV as S,cW as A,eN as K,cY as C,eb as T,eH as N,eJ as B,e2 as I,eO as F,cQ as L,e3 as R,e0 as V,ek as H,eI as U,eK as O,c_ as z,eT as $,eU as G,ea as W}from"./index-XeGFdFb3.js";import{b as _,a as j,c as q,e as Y,f as J,g as Q}from"./Checkbox-BewExwKL.js";import{k as X,f as Z,e as ee,l as te,g as re,i as oe,h as ae}from"./Select-OqnbuzuK.js";import{r as ie,$ as le}from"./vendor-react-64fcanlc.js";const ne=new WeakMap;function se(e,t){let{id:r}=ne.get(e)??{};if(!r)throw new Error("Unknown list");return`${r}-${function(e){return"string"==typeof e?e.replace(/\s*/g,""):""+e}(t)}`}const ce={ltr:"ArrowRight",rtl:"ArrowLeft"},de={ltr:"ArrowLeft",rtl:"ArrowRight"};function ue(e,t,r){let{node:m,isVirtualized:k,focusMode:D="row",allowsArrowNavigation:w}=e,{direction:E}=a(),{onAction:P,linkBehavior:M,keyboardNavigationBehavior:x,shouldSelectOnPressUp:S}=ne.get(t),A=i(),K=ie.useRef(null),C=()=>{if(null!==r.current){if("child"===D){if(c(r.current)&&r.current!==d(u(r.current)))return;let e=p(r.current,{tabbable:!0}).firstChild();if(e)return g(e),void f(e,{containingElement:y(e)})}(null!=K.current&&m.key!==K.current||!c(r.current))&&g(r.current)}},T={},N=e.hasChildItems,B=t.selectionManager.isLink(m.key);if(null!=m&&"expandedKeys"in t){let e=t.collection.getChildren?.(m.key);N=N||[...e??[]].length>1,null==P&&!B&&"none"===t.selectionManager.selectionMode&&N&&(P=()=>t.toggleKey(m.key));let r=N?t.expandedKeys.has(m.key):void 0,o=1,a=m.index;if(m.level>=0&&null!=m?.parentKey){let e=t.collection.getItem(m.parentKey);if(e){let r=function(e,t){let r=t.getChildren?.(e.key),o=r?Array.from(r):[],a=o.length>0?o[0]:null,i=[];for(;a;)i.push(a),a=null!=a.nextKey?t.getItem(a.nextKey):null;return i}(e,t.collection);o=[...r].filter(e=>"item"===e.type).length,a>0&&"item"!==r[0].type&&(a-=1)}}else o=[...t.collection].filter(e=>0===e.level&&"item"===e.type).length;T={"aria-expanded":r,"aria-level":m.level+1,"aria-posinset":a+1,"aria-setsize":o}}let{itemProps:I,...F}=l({selectionManager:t.selectionManager,key:m.key,ref:r,isVirtualized:k,shouldSelectOnPressUp:e.shouldSelectOnPressUp||S,onAction:P||m.props?.onAction?n(m.props?.onAction,P?()=>P(m.key):void 0):void 0,focus:C,linkBehavior:M}),L=s(m.props),R=F.hasAction?L:{},V=o(I,R,{role:"row",onKeyDownCapture:"arrow"===x||w?e=>{let o=d(u(r.current));if(!h(e.currentTarget,v(e))||!r.current||!o)return;let a=p(r.current);if(a.currentNode=o,!pe(e,t,m,N,E,o,r.current,w))switch(e.key){case"ArrowLeft":if("arrow"===x){let t="rtl"===E?a.nextNode():a.previousNode();if(t)e.preventDefault(),e.stopPropagation(),g(t),f(t,{containingElement:y(r.current)});else if(e.preventDefault(),e.stopPropagation(),"rtl"===E)g(r.current),f(r.current,{containingElement:y(r.current)});else{a.currentNode=r.current;let e=ge(a);e&&(g(e),f(e,{containingElement:y(r.current)}))}}break;case"ArrowRight":if("arrow"===x){let t="rtl"===E?a.previousNode():a.nextNode();if(t)e.preventDefault(),e.stopPropagation(),g(t),f(t,{containingElement:y(r.current)});else if(e.preventDefault(),e.stopPropagation(),"ltr"===E)g(r.current),f(r.current,{containingElement:y(r.current)});else{a.currentNode=r.current;let e=ge(a);e&&(g(e),f(e,{containingElement:y(r.current)}))}}break;case"ArrowUp":case"ArrowDown":!e.altKey&&h(r.current,v(e))&&(e.stopPropagation(),e.preventDefault(),r.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent)))}}:void 0,onFocus:e=>{K.current=m.key,v(e)===r.current?"child"===D&&e.relatedTarget&&h(r.current,e.relatedTarget)||requestAnimationFrame(()=>{"child"===D&&d(u(r.current))===r.current&&C()}):b()||t.selectionManager.setFocusedKey(m.key)},"aria-label":m["aria-label"]||m.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(m.key)?t.selectionManager.isSelected(m.key):void 0,"aria-disabled":t.selectionManager.isDisabled(m.key)||void 0,"aria-labelledby":A&&(m["aria-label"]||m.textValue)?`${se(t,m.key)} ${A}`:void 0,id:se(t,m.key)});"child"===D&&w&&"tab"===x&&(V.tabIndex=-1);let H=V.onKeyDown;if(V.onKeyDown=e=>{(e=>{let o=d(u(r.current));if(h(e.currentTarget,v(e))&&r.current&&o){if("tab"===x){if(v(e)!==r.current&&"Tab"!==e.key)return void e.stopPropagation();if(pe(e,t,m,N,E,o,r.current,w))return}if("Tab"===e.key&&"tab"===x){let t=p(r.current,{tabbable:!0});t.currentNode=o,(e.shiftKey?t.previousNode():t.nextNode())&&e.stopPropagation()}}})(e),e.isPropagationStopped()||H?.(e)},k){let{collection:e}=t,r=[...e];V["aria-rowindex"]=r.find(e=>"section"===e.type)?[...e.getKeys()].filter(t=>"section"!==e.getItem(t)?.type).findIndex(e=>e===m.key)+1:m.index+1}return{rowProps:{...o(V,T)},gridCellProps:{role:"gridcell","aria-colindex":1},descriptionProps:{id:A},...F}}function pe(e,t,r,o,a,i,l,n){if(!("expandedKeys"in t)||!n&&i!==l)return!1;if(e.key===ce[a]&&t.selectionManager.focusLine truncated
import{fG as e,cK as t,cD as r,cC as o,bp as a,fH as i,dY as l,eB as n,eC as s,eq as c,er as d,es as u,cL as p,et as g,ev as f,ew as y,cN as v,eu as b,el as h,e1 as m,fM as k,c$ as D,e6 as w,d3 as E,d2 as P,eA as M,cU as x,cV as S,cW as A,eN as K,cY as C,eb as T,eH as N,eJ as B,e2 as I,eO as F,cQ as L,e3 as R,e0 as V,ek as H,eI as U,eK as O,c_ as z,eT as $,eU as G,ea as W}from"./index-HxEUeoab.js";import{b as _,a as j,c as q,e as Y,f as J,g as Q}from"./Checkbox-CJt7u9-e.js";import{k as X,f as Z,e as ee,l as te,g as re,i as oe,h as ae}from"./Select-D7_6MaHd.js";import{r as ie,$ as le}from"./vendor-react-64fcanlc.js";const ne=new WeakMap;function se(e,t){let{id:r}=ne.get(e)??{};if(!r)throw new Error("Unknown list");return`${r}-${function(e){return"string"==typeof e?e.replace(/\s*/g,""):""+e}(t)}`}const ce={ltr:"ArrowRight",rtl:"ArrowLeft"},de={ltr:"ArrowLeft",rtl:"ArrowRight"};function ue(e,t,r){let{node:m,isVirtualized:k,focusMode:D="row",allowsArrowNavigation:w}=e,{direction:E}=a(),{onAction:P,linkBehavior:M,keyboardNavigationBehavior:x,shouldSelectOnPressUp:S}=ne.get(t),A=i(),K=ie.useRef(null),C=()=>{if(null!==r.current){if("child"===D){if(c(r.current)&&r.current!==d(u(r.current)))return;let e=p(r.current,{tabbable:!0}).firstChild();if(e)return g(e),void f(e,{containingElement:y(e)})}(null!=K.current&&m.key!==K.current||!c(r.current))&&g(r.current)}},T={},N=e.hasChildItems,B=t.selectionManager.isLink(m.key);if(null!=m&&"expandedKeys"in t){let e=t.collection.getChildren?.(m.key);N=N||[...e??[]].length>1,null==P&&!B&&"none"===t.selectionManager.selectionMode&&N&&(P=()=>t.toggleKey(m.key));let r=N?t.expandedKeys.has(m.key):void 0,o=1,a=m.index;if(m.level>=0&&null!=m?.parentKey){let e=t.collection.getItem(m.parentKey);if(e){let r=function(e,t){let r=t.getChildren?.(e.key),o=r?Array.from(r):[],a=o.length>0?o[0]:null,i=[];for(;a;)i.push(a),a=null!=a.nextKey?t.getItem(a.nextKey):null;return i}(e,t.collection);o=[...r].filter(e=>"item"===e.type).length,a>0&&"item"!==r[0].type&&(a-=1)}}else o=[...t.collection].filter(e=>0===e.level&&"item"===e.type).length;T={"aria-expanded":r,"aria-level":m.level+1,"aria-posinset":a+1,"aria-setsize":o}}let{itemProps:I,...F}=l({selectionManager:t.selectionManager,key:m.key,ref:r,isVirtualized:k,shouldSelectOnPressUp:e.shouldSelectOnPressUp||S,onAction:P||m.props?.onAction?n(m.props?.onAction,P?()=>P(m.key):void 0):void 0,focus:C,linkBehavior:M}),L=s(m.props),R=F.hasAction?L:{},V=o(I,R,{role:"row",onKeyDownCapture:"arrow"===x||w?e=>{let o=d(u(r.current));if(!h(e.currentTarget,v(e))||!r.current||!o)return;let a=p(r.current);if(a.currentNode=o,!pe(e,t,m,N,E,o,r.current,w))switch(e.key){case"ArrowLeft":if("arrow"===x){let t="rtl"===E?a.nextNode():a.previousNode();if(t)e.preventDefault(),e.stopPropagation(),g(t),f(t,{containingElement:y(r.current)});else if(e.preventDefault(),e.stopPropagation(),"rtl"===E)g(r.current),f(r.current,{containingElement:y(r.current)});else{a.currentNode=r.current;let e=ge(a);e&&(g(e),f(e,{containingElement:y(r.current)}))}}break;case"ArrowRight":if("arrow"===x){let t="rtl"===E?a.previousNode():a.nextNode();if(t)e.preventDefault(),e.stopPropagation(),g(t),f(t,{containingElement:y(r.current)});else if(e.preventDefault(),e.stopPropagation(),"ltr"===E)g(r.current),f(r.current,{containingElement:y(r.current)});else{a.currentNode=r.current;let e=ge(a);e&&(g(e),f(e,{containingElement:y(r.current)}))}}break;case"ArrowUp":case"ArrowDown":!e.altKey&&h(r.current,v(e))&&(e.stopPropagation(),e.preventDefault(),r.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent)))}}:void 0,onFocus:e=>{K.current=m.key,v(e)===r.current?"child"===D&&e.relatedTarget&&h(r.current,e.relatedTarget)||requestAnimationFrame(()=>{"child"===D&&d(u(r.current))===r.current&&C()}):b()||t.selectionManager.setFocusedKey(m.key)},"aria-label":m["aria-label"]||m.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(m.key)?t.selectionManager.isSelected(m.key):void 0,"aria-disabled":t.selectionManager.isDisabled(m.key)||void 0,"aria-labelledby":A&&(m["aria-label"]||m.textValue)?`${se(t,m.key)} ${A}`:void 0,id:se(t,m.key)});"child"===D&&w&&"tab"===x&&(V.tabIndex=-1);let H=V.onKeyDown;if(V.onKeyDown=e=>{(e=>{let o=d(u(r.current));if(h(e.currentTarget,v(e))&&r.current&&o){if("tab"===x){if(v(e)!==r.current&&"Tab"!==e.key)return void e.stopPropagation();if(pe(e,t,m,N,E,o,r.current,w))return}if("Tab"===e.key&&"tab"===x){let t=p(r.current,{tabbable:!0});t.currentNode=o,(e.shiftKey?t.previousNode():t.nextNode())&&e.stopPropagation()}}})(e),e.isPropagationStopped()||H?.(e)},k){let{collection:e}=t,r=[...e];V["aria-rowindex"]=r.find(e=>"section"===e.type)?[...e.getKeys()].filter(t=>"section"!==e.getItem(t)?.type).findIndex(e=>e===m.key)+1:m.index+1}return{rowProps:{...o(V,T)},gridCellProps:{role:"gridcell","aria-colindex":1},descriptionProps:{id:A},...F}}function pe(e,t,r,o,a,i,l,n){if(!("expandedKeys"in t)||!n&&i!==l)return!1;if(e.key===ce[a]&&t.selectionManager.focusLine truncated
@@ -1 +1 @@
import{j as s}from"./vendor-react-64fcanlc.js";import{I as e,d5 as a,N as l,T as c}from"./index-XeGFdFb3.js";function r(a){return s.jsx(e,{...a,children:s.jsx("path",{fill:"currentColor",d:"M7.864 15.734c-.222 0-.433-.098-.576-.27l-3.747-4.497c-.266-.319-.222-.792.096-1.057.317-.265.79-.223 1.056.096l3.154 3.786 7.44-9.469c.255-.326.728-.382 1.052-.127.326.256.383.728.127 1.053L8.454 15.447c-.14.179-.352.284-.579.287z"})})}const t=()=>s.jsx(r,{className:"rp-check-mark"}),i=({i:e,cut:a,reserveFlag:r=!1})=>{const t="path"===a?e.label.lastIndexOf("/")+1:0;return s.jsxs("span",{className:"rp-il",children:[(e.flag||r&&void 0!==e.flag)&&s.jsx("span",{className:"rp-node-flag","data-flag":e.flag,"aria-hidden":"true"}),e.icon&&s.jsx("span",{className:"ic",children:e.icon}),e.nodeName?s.jsx(l,{name:e.label,cut:"start"===a?a:void 0}):t?s.jsxs(c,{className:"rp-path",text:e.label,children:[s.jsx("span",{className:"rp-truncate rp-truncate-start",children:s.jsx("bdi",{children:e.label.slice(0,t)})}),s.jsx("bdi",{children:e.label.slice(t)})]}):s.jsx(c,{cut:"start"===a?a:void 0,tooltipText:e.label,children:e.label})]})},n=({i:e,children:l})=>s.jsxs("span",{className:"rp-item-text",children:[s.jsx(a,{slot:"label",elementType:"span",children:s.jsx(i,{i:e,reserveFlag:!0})}),l??(e.desc&&s.jsx(a,{slot:"description",className:e.aside?"desc aside":"desc",children:e.desc}))]});export{r as C,i as I,t as a,n as b};
import{j as s}from"./vendor-react-64fcanlc.js";import{I as e,d5 as a,N as l,T as c}from"./index-HxEUeoab.js";function r(a){return s.jsx(e,{...a,children:s.jsx("path",{fill:"currentColor",d:"M7.864 15.734c-.222 0-.433-.098-.576-.27l-3.747-4.497c-.266-.319-.222-.792.096-1.057.317-.265.79-.223 1.056.096l3.154 3.786 7.44-9.469c.255-.326.728-.382 1.052-.127.326.256.383.728.127 1.053L8.454 15.447c-.14.179-.352.284-.579.287z"})})}const t=()=>s.jsx(r,{className:"rp-check-mark"}),i=({i:e,cut:a,reserveFlag:r=!1})=>{const t="path"===a?e.label.lastIndexOf("/")+1:0;return s.jsxs("span",{className:"rp-il",children:[(e.flag||r&&void 0!==e.flag)&&s.jsx("span",{className:"rp-node-flag","data-flag":e.flag,"aria-hidden":"true"}),e.icon&&s.jsx("span",{className:"ic",children:e.icon}),e.nodeName?s.jsx(l,{name:e.label,cut:"start"===a?a:void 0}):t?s.jsxs(c,{className:"rp-path",text:e.label,children:[s.jsx("span",{className:"rp-truncate rp-truncate-start",children:s.jsx("bdi",{children:e.label.slice(0,t)})}),s.jsx("bdi",{children:e.label.slice(t)})]}):s.jsx(c,{cut:"start"===a?a:void 0,tooltipText:e.label,children:e.label})]})},n=({i:e,children:l})=>s.jsxs("span",{className:"rp-item-text",children:[s.jsx(a,{slot:"label",elementType:"span",children:s.jsx(i,{i:e,reserveFlag:!0})}),l??(e.desc&&s.jsx(a,{slot:"description",className:e.aside?"desc aside":"desc",children:e.desc}))]});export{r as C,i as I,t as a,n as b};
@@ -1 +1 @@
import{j as s}from"./vendor-react-64fcanlc.js";import{b7 as r}from"./index-XeGFdFb3.js";function e({className:e,...o}){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",className:r("rp-icon rp-link-out",e),...o,children:s.jsx("path",{fill:"currentColor",d:"m10.08887,1h-5.51074c-.50293,0-.91113.4082-.91113.91113s.4082.91113.91113.91113h3.31055L1.35547,9.35547c-.35645.35645-.35645.93262,0,1.28906.17773.17773.41113.2666.64453.2666s.4668-.08887.64453-.2666l6.5332-6.5332v3.31055c0,.50293.4082.91113.91113.91113s.91113-.4082.91113-.91113V1.91113c0-.50293-.4082-.91113-.91113-.91113Z"})})}export{e as L};
import{j as s}from"./vendor-react-64fcanlc.js";import{b7 as r}from"./index-HxEUeoab.js";function e({className:e,...o}){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",className:r("rp-icon rp-link-out",e),...o,children:s.jsx("path",{fill:"currentColor",d:"m10.08887,1h-5.51074c-.50293,0-.91113.4082-.91113.91113s.4082.91113.91113.91113h3.31055L1.35547,9.35547c-.35645.35645-.35645.93262,0,1.28906.17773.17773.41113.2666.64453.2666s.4668-.08887.64453-.2666l6.5332-6.5332v3.31055c0,.50293.4082.91113.91113.91113s.91113-.4082.91113-.91113V1.91113c0-.50293-.4082-.91113-.91113-.91113Z"})})}export{e as L};
@@ -0,0 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{u as n,l as r,by as s,m as o,aM as a,bz as i,aV as l,bA as c,bB as u,bC as d,bD as p,h as m,C as g,b6 as f,E as h,bE as x,bF as k,bk as w,bG as j,B as y}from"./index-HxEUeoab.js";import{D as b,s as v,d as T,a as S,o as E}from"./auth-CSMbhh2E.js";import{L as N,a as C,P as D,S as L}from"./AppearanceControls-sRy1p156.js";import{L as _}from"./LinkOut-D-cvJjm2.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-DOD_75iR.js";const A=/^[A-Za-z0-9_.-]{1,64}$/;async function q(e,t){try{return v(await T(e,t))}catch(n){if(!function(e){return e instanceof SyntaxError||e instanceof a&&(404===e.status||401===e.status&&(!e.code||"authentication_required"===e.code))}(n))throw n;return n instanceof a&&404===n.status?await S(e,t)?"token":"no-api":"token"}}function P(e,t,n){try{const{profiles:r,activeId:s}=u(),o=function(e,t,n,r){return e.some(e=>e.id===t&&p(e.api)===p(n))?e.map(e=>e.id===t?{...e,token:r.trim()}:e):null}(r,e,t,n);if(!o)return"login.stale";d({profiles:o,activeId:s})}catch{return"settings.saveError"}return null}async function I(e,t,n,r){let s;try{s=await E(t,n,r)}catch(o){return function(e,t){if(!(e instanceof a))return null;if("invalid_credentials"===e.code)return{key:"login.invalidCredentials"};if("setup_required"===e.code)return{key:"login.needsSetup",switchTo:"setup"};if("setup_already_completed"===e.code)return{key:"login.alreadySetUp",switchTo:"login"};if("permission_denied"===e.code&&"setup"===t)return{key:"login.setupPeer"};if("rate_limited"===e.code){const t=e.retryAfter??60;return{key:"login.rateLimited",params:{n:t},wait:t}}return null}(o,n)??{error:o}}try{c(e,t,s.token)}catch{return{key:"settings.saveError"}}return null}function R(e,t){const{kind:n,failure:r,attempt:s,ended:o,rejected:a}=e;return"no-api"===n?null:null!==r?{tone:"negative",text:"string"==typeof r?r:t(r.key,r.params),focus:!0,id:s}:o?{tone:"informative",text:t("login.sessionEnded"),focus:!1,id:0}:a&&"token"===n?{tone:"negative",text:t("login.rejected"),focus:!1,id:0}:null}const F=e=>"string"!=typeof e&&"login.rateLimited"===e.key;function H(t,a,c,u,d){const p=n(),m=r(),[g]=e.useState(()=>s(t,a)),[f,h]=e.useState(null),x=d?"no-api":f,[k,w]=e.useState({attempt:0,error:null});e.useEffect(()=>{if(d)return;const e=new AbortController;return q(a,e.signal).then(e=>h(e),t=>{e.signal.aborted||w(e=>({...e,error:t instanceof Error?t:new Error(String(t))}))}),()=>e.abort()},[a,k.attempt,d]);const[j,y]=e.useState(""),v=i(a),[T,S]=e.useState(v?b.username:""),[E,N]=e.useState(v?b.password:""),[C,D]=e.useState(""),[L,_]=e.useState(!1),[H,U]=e.useState(!1),[M,z]=e.useState({}),[B,O]=e.useState(null),[G,V]=e.useState(0),[Z,$]=e.useState(0),[J,K]=e.useState(Date.now);e.useEffect(()=>{if(Z<=J)return;const e=setTimeout(()=>K(Date.now()),(Z-J)%1e3||1e3);return()=>clearTimeout(e)},[Z,J]);const Q=function(e,t){return Math.max(0,Math.ceil((e-t)/1e3))}(Z,J),W=(e,t)=>n=>{t(n),M[e]&&z(({[e]:t,...n})=>n)},X=async e=>{const n=function(e,t,n,r){const s={};t?A.test(t)||(s.username="login.badUsername"):s.username="login.usernameRequired";const o=[...n].length;return o?"setup"===e&&o<8?s.password="login.passwordShort":o>128||(new TextEncoder).encode(n).length>512?s.password="login.passwordLong":"setup"===e&&n!==r&&(s.confirm="login.mismatch"):s.password="login.passwordRequired",s}(e,T,E,C);if(z(n),Object.keys(n).length)return;U(!0);const r=await I(t,a,e,{username:T,password:E});if(r)if(U(!1),"error"in r)O(p("login.failed",{error:l(r.error,p)}));else{if(r.wait){const e=Date.now();K(e),$(e+1e3*r.wait)}r.switchTo&&(h(r.switchTo),D("")),O(r)}else location.reload()},Y="setup"===x||"login"===x,ee=e=>M[e]?p(M[e]):void 0;return{kind:x,discoveryError:k.error,retryDiscovery:()=>w(e=>({attempt:e.attempt+1,error:null})),title:p("no-api"===x?"login.noApiTitle":"setup"===x?"login.setupTitle":"token"===x?"login.title":"login.passwordTitle"),note:"no-api"===x?p("login.noApiNote"):p("setup"===x?"login.setupNote":"login"===x?"login.connectedTo":"login.note",{backend:c}),demoNote:v&&"login"===x?p("login.demoNote",b):null,alert:R({kind:x,failure:B&&!Q&&F(B)?null:B,attempt:G,ended:g,rejected:u},p),busy:H,token:j,setToken:y,username:T,setUsername:W("username",S),usernameError:ee("username"),password:E,setPassword:W("password",N),passwordError:ee("password"),confirm:C,setConfirm:W("confirm",D),confirmError:ee("confirm"),submit:()=>{H||Q||null===x||"no-api"===x||(O(null),V(e=>e+1),Y?X(x):(()=>{if(!j.trim())return;const e=P(t,a,j);e?O({key:e}):location.reload()})())},canSubmit:null!==x&&"no-api"!==x&&!Q&&(Y||!!j.trim()),submitText:Q?p("login.retryIn",{n:Q}):p("setup"===x?"login.create":"login"===x?"login.signIn":"login.submit"),secretType:L?"text":"password",toggle:()=>_(e=>!e),toggleText:p(Y?L?"login.hidePassword":"login.showPassword":L?"settings.hideToken":"settings.showToken"),guideHref:o(m),requirementsHref:o(m,"no-native-api")}}function U({profileId:e,api:r,backend:s,rejected:o,missingApi:a,lang:i,pickLang:l,dark:c,thLine truncated
@@ -1 +0,0 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{u as n,l as r,by as s,m as o,aM as a,bz as i,aV as l,bA as c,bB as u,bC as d,bD as p,h as m,C as g,b6 as f,E as h,bE as x,bF as w,bk as k,bG as j,B as y}from"./index-XeGFdFb3.js";import{D as b,s as v,d as T,a as S,o as E}from"./auth-5ngSjiJI.js";import{L as N,a as C,P as D,S as L}from"./AppearanceControls-Q-jHRGz9.js";import{L as A}from"./LinkOut-BfQApT3z.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-Bvif-kkw.js";const _=/^[A-Za-z0-9_.-]{1,64}$/;async function q(e,t){try{return v(await T(e,t))}catch(n){if(!function(e){return e instanceof SyntaxError||e instanceof a&&(404===e.status||401===e.status&&(!e.code||"authentication_required"===e.code))}(n))throw n;return n instanceof a&&404===n.status?await S(e,t)?"token":"no-api":"token"}}function I(e,t,n){try{const{profiles:r,activeId:s}=u(),o=function(e,t,n,r){return e.some(e=>e.id===t&&p(e.api)===p(n))?e.map(e=>e.id===t?{...e,token:r.trim()}:e):null}(r,e,t,n);if(!o)return"login.stale";d({profiles:o,activeId:s})}catch{return"settings.saveError"}return null}async function P(e,t,n,r){let s;try{s=await E(t,n,r)}catch(o){return function(e){if(!(e instanceof a))return null;if("invalid_credentials"===e.code)return{key:"login.invalidCredentials"};if("setup_required"===e.code)return{key:"login.needsSetup",switchTo:"setup"};if("setup_already_completed"===e.code)return{key:"login.alreadySetUp",switchTo:"login"};if("rate_limited"===e.code){const t=e.retryAfter??60;return{key:"login.rateLimited",params:{n:t},wait:t}}return null}(o)??{error:o}}try{c(e,t,s.token)}catch{return{key:"settings.saveError"}}return null}function R(e,t){const{kind:n,failure:r,attempt:s,ended:o,rejected:a}=e;return"no-api"===n?null:null!==r?{tone:"negative",text:"string"==typeof r?r:t(r.key,r.params),focus:!0,id:s}:o?{tone:"informative",text:t("login.sessionEnded"),focus:!1,id:0}:a&&"token"===n?{tone:"negative",text:t("login.rejected"),focus:!1,id:0}:null}const F=e=>"string"!=typeof e&&"login.rateLimited"===e.key;function H(t,a,c,u,d){const p=n(),m=r(),[g]=e.useState(()=>s(t,a)),[f,h]=e.useState(null),x=d?"no-api":f,[w,k]=e.useState({attempt:0,error:null});e.useEffect(()=>{if(d)return;const e=new AbortController;return q(a,e.signal).then(e=>h(e),t=>{e.signal.aborted||k(e=>({...e,error:t instanceof Error?t:new Error(String(t))}))}),()=>e.abort()},[a,w.attempt,d]);const[j,y]=e.useState(""),v=i(a),[T,S]=e.useState(v?b.username:""),[E,N]=e.useState(v?b.password:""),[C,D]=e.useState(""),[L,A]=e.useState(!1),[H,U]=e.useState(!1),[M,z]=e.useState({}),[B,O]=e.useState(null),[G,V]=e.useState(0),[Z,$]=e.useState(0),[J,K]=e.useState(Date.now);e.useEffect(()=>{if(Z<=J)return;const e=setTimeout(()=>K(Date.now()),(Z-J)%1e3||1e3);return()=>clearTimeout(e)},[Z,J]);const Q=function(e,t){return Math.max(0,Math.ceil((e-t)/1e3))}(Z,J),W=(e,t)=>n=>{t(n),M[e]&&z(({[e]:t,...n})=>n)},X=async e=>{const n=function(e,t,n,r){const s={};t?_.test(t)||(s.username="login.badUsername"):s.username="login.usernameRequired";const o=[...n].length;return o?"setup"===e&&o<8?s.password="login.passwordShort":o>128||(new TextEncoder).encode(n).length>512?s.password="login.passwordLong":"setup"===e&&n!==r&&(s.confirm="login.mismatch"):s.password="login.passwordRequired",s}(e,T,E,C);if(z(n),Object.keys(n).length)return;U(!0);const r=await P(t,a,e,{username:T,password:E});if(r)if(U(!1),"error"in r)O(p("login.failed",{error:l(r.error,p)}));else{if(r.wait){const e=Date.now();K(e),$(e+1e3*r.wait)}r.switchTo&&(h(r.switchTo),D("")),O(r)}else location.reload()},Y="setup"===x||"login"===x,ee=e=>M[e]?p(M[e]):void 0;return{kind:x,discoveryError:w.error,retryDiscovery:()=>k(e=>({attempt:e.attempt+1,error:null})),title:p("no-api"===x?"login.noApiTitle":"setup"===x?"login.setupTitle":"token"===x?"login.title":"login.passwordTitle"),note:"no-api"===x?p("login.noApiNote"):p("setup"===x?"login.setupNote":"login"===x?"login.connectedTo":"login.note",{backend:c}),demoNote:v&&"login"===x?p("login.demoNote",b):null,alert:R({kind:x,failure:B&&!Q&&F(B)?null:B,attempt:G,ended:g,rejected:u},p),busy:H,token:j,setToken:y,username:T,setUsername:W("username",S),usernameError:ee("username"),password:E,setPassword:W("password",N),passwordError:ee("password"),confirm:C,setConfirm:W("confirm",D),confirmError:ee("confirm"),submit:()=>{H||Q||null===x||"no-api"===x||(O(null),V(e=>e+1),Y?X(x):(()=>{if(!j.trim())return;const e=I(t,a,j);e?O({key:e}):location.reload()})())},canSubmit:null!==x&&"no-api"!==x&&!Q&&(Y||!!j.trim()),submitText:Q?p("login.retryIn",{n:Q}):p("setup"===x?"login.create":"login"===x?"login.signIn":"login.submit"),secretType:L?"text":"password",toggle:()=>A(e=>!e),toggleText:p(Y?L?"login.hidePassword":"login.showPassword":L?"settings.hideToken":"settings.showToken"),guideHref:o(m),requirementsHref:o(m,"no-native-api")}}function U({profileId:e,api:r,backend:s,rejected:o,missingApi:a,lang:i,pickLang:l,dark:c,themeLabel:u,toggleScheme:d,palette:p,wordmark:b,error:v,onRetry:T}){const S=n(),Line truncated
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{bI as r,u as s,al as a,l,dr as o,bP as n,B as i,cf as c,ds as d,C as g,dt as m,U as u,a1 as p,q as h,x as f,cb as x,bT as v,T as j,p as b,bG as w,ch as y,E as M}from"./index-XeGFdFb3.js";import{aO as T,a as N,F as k,aP as C,D as $}from"./activity-7OeQMmIs.js";import{C as S}from"./ItemText-Bvif-kkw.js";import{P as A,Q as O,K as P,L as R,A as W}from"./logs-DNePHVHd.js";import{T as L}from"./Toolbar-CFyWgMbW.js";import{D}from"./Table-DqqJleJD.js";import{d as F,e as q}from"./files-Dt8K7QfP.js";import{r as B}from"./recorder-BHyqDNp5.js";import{u as E,C as H}from"./Copy-Cix1qeo3.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./AppearanceControls-Q-jHRGz9.js";import"./Select-OqnbuzuK.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";const I=new WeakMap;function _(e){let t=I.get(e);return void 0===t&&I.set(e,t=Date.parse(e.ts)),t}const J=[...r].reverse();function K({records:m,offered:u,minimum:p,setMinimum:h,waiting:f}){const x=s(),v=a[l()],j=N(),b=e.useMemo(()=>function(e,t,r,s=24){const a=r?J.indexOf(r):J.length-1,l=J.filter((e,r)=>t.includes(e)&&r<=a),o=e.map(_).filter(Number.isFinite);if(!o.length)return{rows:l.map(e=>({level:e,counts:[]})),buckets:[],width:0,busiest:null};const n=Math.min(...o),i=Math.max(...o),c=T(n,i,s),d=c.length>1?c[1]-c[0]:Math.max(i-n,6e4),g=new Map(l.map(e=>[e,new Array(c.length).fill(0)])),m=new Array(c.length).fill(0),u=new Array(c.length).fill(0);for(const x of e){const e=_(x),t=g.get(x.level);if(!t||!Number.isFinite(e))continue;const r=Math.min(c.length-1,Math.floor((e-c[0])/d));t[r]++,m[r]++,"error"===x.level&&u[r]++}const p=e=>e.reduce((t,r,s)=>r>e[t]?s:t,0),h=u.reduce((e,t)=>e+t,0),f=p(h?u:m);return{rows:l.map(e=>({level:e,counts:g.get(e)})),buckets:c,width:d,busiest:{start:c[f],count:h?u[f]:m[f],errors:h}}}(m,u,p),[m,u,p]),w=e.useMemo(()=>o(v),[v]),y=e.useCallback(e=>`${w.format(e)}–${w.format(e+b.width)}`,[w,b.width]),M=e.useMemo(()=>{const e=r.map(e=>{const r=x(n[e]);return[e,{text:r,label:t.jsxs(i,{quiet:!0,small:!0,className:e===p?"current":void 0,label:x(e===p?"log.chart.current":"log.chart.minimum",{level:r}),onPress:()=>h(e),children:[e===p&&t.jsx(S,{}),r]})}]});return new Map(e)},[p,h,x]),$=e.useMemo(()=>{const e={error:j.negative,warn:j.notice,info:j.info,debug:j.subtle,trace:j.muted},t=b.buckets.map(y);return{columns:b.buckets.map(e=>w.format(e)),rows:b.rows.map(r=>{const{text:s,label:a}=M.get(r.level);return{id:r.level,color:e[r.level],label:a,counts:r.counts,titles:r.counts.map((e,r)=>x("log.chart.cell",{time:t[r],level:s,n:e}))}})}},[b,y,w,M,j,x]);if(!m.length)return f?t.jsx(Q,{heads:M,levels:b.rows.map(e=>e.level),time:w.format(0)}):null;const A=b.busiest,O=A?A.errors?[{label:x("log.chart.errors"),value:x("log.chart.count",{n:A.errors}),icon:t.jsx(c,{}),tone:"negative"},{label:x("log.chart.peakErrors"),icon:t.jsx(d,{}),tint:"c1",value:y(A.start),caption:x("log.chart.count",{n:A.count})}]:[{label:x("log.chart.errors"),value:x("log.chart.count",{n:0}),icon:t.jsx(c,{}),tint:"c5"},{label:x("log.chart.peak"),icon:t.jsx(d,{}),tint:"c1",value:y(A.start),caption:x("log.chart.count",{n:A.count})}]:[];return t.jsxs("div",{className:"rp-chart-page",children:[t.jsx(k,{facts:O}),t.jsx(g,{title:x("log.chart.title"),note:x("log.chart.sample",{n:m.length}),children:t.jsx(C,{label:x("log.chart.title"),columns:$.columns,rows:$.rows})})]})}function Q({heads:e,levels:r,time:a}){const l=s(),o=[{label:l("log.chart.errors"),value:l("log.chart.count",{n:0}),icon:t.jsx(c,{}),tint:"c5"},{label:l("log.chart.peak"),icon:t.jsx(d,{}),tint:"c1",value:`${a}–${a}`,caption:l("log.chart.count",{n:0})}],n=r.map(t=>({id:t,color:"transparent",label:e.get(t).label,counts:[0],titles:[""]}));return t.jsxs("div",{className:"rp-chart-page",inert:!0,"aria-hidden":"true",children:[t.jsxs("div",{className:"rp-chart-hold",children:[t.jsx(k,{facts:o}),t.jsx(m,{})]}),t.jsxs("div",{className:"rp-chart-hold",children:[t.jsx(g,{title:l("log.chart.title"),note:l("log.chart.sample",{n:0}),children:t.jsx(C,{label:l("log.chart.title"),columns:[a],rows:n})}),t.jsx(m,{})]})]})}const U={trace:"muted",debug:"neutral",info:"info",warn:"warn",error:"err"},z=new WeakMap;function G(e,t,s,a,l,o=new Set,i){return{rows:e.flatMap(e=>{const t=function(e,t,r){const s=z.get(e);if(s&&s.locale===t)return s.row;const a={id:e.id,timestamp:p(e.ts,t),iso:e.ts,levelText:u(n,e.level,r),tone:U[e.level],target:e.target,gap:!1,record:e,message:e.message+(e.fields?" "+Object.entries(e.fields).map(([e,t])=>`${e}=${"string"==typeof t?t:JSON.stringify(t)}`).join(" "):"")};return z.set(e,{locale:t,row:a}),a}(e,a,l);return o.has(e)?[{...t,id:`gap ${e.id}`,timestamp:"",iso:"",levelText:"",target:"",gap:!0,message:l("log.gap")},t]:[t]}),levels:t.map(e=>{return{id:e,label:(t=e,i&&r.indexOf(t)<r.indexOf(i)?l("log.levelNotRecorded",{level:u(n,e,l)}):u(n,e,l))};var t}),recordedText:i?l("log.recorded",{level:u(n,i,l)}):null,exportBase:`${s||"engLine truncated
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{bI as r,u as s,al as a,l,dr as o,bP as n,B as i,cf as c,ds as d,C as g,dt as m,U as u,a1 as p,q as h,x as f,cb as x,bT as v,T as j,p as b,bG as w,ch as y,E as M}from"./index-HxEUeoab.js";import{aO as T,a as N,F as k,aP as C,D as $}from"./activity-yZTrGy-J.js";import{C as S}from"./ItemText-DOD_75iR.js";import{P as A,Q as O,K as P,L as R,A as W}from"./logs-C4GIy4tX.js";import{T as L}from"./Toolbar-BTFtduwD.js";import{D}from"./Table-yWn0d3vL.js";import{d as F,e as q}from"./files-Dt8K7QfP.js";import{r as B}from"./recorder-BHyqDNp5.js";import{u as E,C as H}from"./Copy-CGFSe6tr.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./AppearanceControls-sRy1p156.js";import"./Select-D7_6MaHd.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";const I=new WeakMap;function _(e){let t=I.get(e);return void 0===t&&I.set(e,t=Date.parse(e.ts)),t}const J=[...r].reverse();function K({records:m,offered:u,minimum:p,setMinimum:h,waiting:f}){const x=s(),v=a[l()],j=N(),b=e.useMemo(()=>function(e,t,r,s=24){const a=r?J.indexOf(r):J.length-1,l=J.filter((e,r)=>t.includes(e)&&r<=a),o=e.map(_).filter(Number.isFinite);if(!o.length)return{rows:l.map(e=>({level:e,counts:[]})),buckets:[],width:0,busiest:null};const n=Math.min(...o),i=Math.max(...o),c=T(n,i,s),d=c.length>1?c[1]-c[0]:Math.max(i-n,6e4),g=new Map(l.map(e=>[e,new Array(c.length).fill(0)])),m=new Array(c.length).fill(0),u=new Array(c.length).fill(0);for(const x of e){const e=_(x),t=g.get(x.level);if(!t||!Number.isFinite(e))continue;const r=Math.min(c.length-1,Math.floor((e-c[0])/d));t[r]++,m[r]++,"error"===x.level&&u[r]++}const p=e=>e.reduce((t,r,s)=>r>e[t]?s:t,0),h=u.reduce((e,t)=>e+t,0),f=p(h?u:m);return{rows:l.map(e=>({level:e,counts:g.get(e)})),buckets:c,width:d,busiest:{start:c[f],count:h?u[f]:m[f],errors:h}}}(m,u,p),[m,u,p]),w=e.useMemo(()=>o(v),[v]),y=e.useCallback(e=>`${w.format(e)}–${w.format(e+b.width)}`,[w,b.width]),M=e.useMemo(()=>{const e=r.map(e=>{const r=x(n[e]);return[e,{text:r,label:t.jsxs(i,{quiet:!0,small:!0,className:e===p?"current":void 0,label:x(e===p?"log.chart.current":"log.chart.minimum",{level:r}),onPress:()=>h(e),children:[e===p&&t.jsx(S,{}),r]})}]});return new Map(e)},[p,h,x]),$=e.useMemo(()=>{const e={error:j.negative,warn:j.notice,info:j.info,debug:j.subtle,trace:j.muted},t=b.buckets.map(y);return{columns:b.buckets.map(e=>w.format(e)),rows:b.rows.map(r=>{const{text:s,label:a}=M.get(r.level);return{id:r.level,color:e[r.level],label:a,counts:r.counts,titles:r.counts.map((e,r)=>x("log.chart.cell",{time:t[r],level:s,n:e}))}})}},[b,y,w,M,j,x]);if(!m.length)return f?t.jsx(Q,{heads:M,levels:b.rows.map(e=>e.level),time:w.format(0)}):null;const A=b.busiest,O=A?A.errors?[{label:x("log.chart.errors"),value:x("log.chart.count",{n:A.errors}),icon:t.jsx(c,{}),tone:"negative"},{label:x("log.chart.peakErrors"),icon:t.jsx(d,{}),tint:"c1",value:y(A.start),caption:x("log.chart.count",{n:A.count})}]:[{label:x("log.chart.errors"),value:x("log.chart.count",{n:0}),icon:t.jsx(c,{}),tint:"c5"},{label:x("log.chart.peak"),icon:t.jsx(d,{}),tint:"c1",value:y(A.start),caption:x("log.chart.count",{n:A.count})}]:[];return t.jsxs("div",{className:"rp-chart-page",children:[t.jsx(k,{facts:O}),t.jsx(g,{title:x("log.chart.title"),note:x("log.chart.sample",{n:m.length}),children:t.jsx(C,{label:x("log.chart.title"),columns:$.columns,rows:$.rows})})]})}function Q({heads:e,levels:r,time:a}){const l=s(),o=[{label:l("log.chart.errors"),value:l("log.chart.count",{n:0}),icon:t.jsx(c,{}),tint:"c5"},{label:l("log.chart.peak"),icon:t.jsx(d,{}),tint:"c1",value:`${a}–${a}`,caption:l("log.chart.count",{n:0})}],n=r.map(t=>({id:t,color:"transparent",label:e.get(t).label,counts:[0],titles:[""]}));return t.jsxs("div",{className:"rp-chart-page",inert:!0,"aria-hidden":"true",children:[t.jsxs("div",{className:"rp-chart-hold",children:[t.jsx(k,{facts:o}),t.jsx(m,{})]}),t.jsxs("div",{className:"rp-chart-hold",children:[t.jsx(g,{title:l("log.chart.title"),note:l("log.chart.sample",{n:0}),children:t.jsx(C,{label:l("log.chart.title"),columns:[a],rows:n})}),t.jsx(m,{})]})]})}const U={trace:"muted",debug:"neutral",info:"info",warn:"warn",error:"err"},z=new WeakMap;function G(e,t,s,a,l,o=new Set,i){return{rows:e.flatMap(e=>{const t=function(e,t,r){const s=z.get(e);if(s&&s.locale===t)return s.row;const a={id:e.id,timestamp:p(e.ts,t),iso:e.ts,levelText:u(n,e.level,r),tone:U[e.level],target:e.target,gap:!1,record:e,message:e.message+(e.fields?" "+Object.entries(e.fields).map(([e,t])=>`${e}=${"string"==typeof t?t:JSON.stringify(t)}`).join(" "):"")};return z.set(e,{locale:t,row:a}),a}(e,a,l);return o.has(e)?[{...t,id:`gap ${e.id}`,timestamp:"",iso:"",levelText:"",target:"",gap:!0,message:l("log.gap")},t]:[t]}),levels:t.map(e=>{return{id:e,label:(t=e,i&&r.indexOf(t)<r.indexOf(i)?l("log.levelNotRecorded",{level:u(n,e,l)}):u(n,e,l))};var t}),recordedText:i?l("log.recorded",{level:u(n,i,l)}):null,exportBase:`${s||"engLine truncated
@@ -1 +0,0 @@
import{j as e,r as n}from"./vendor-react-64fcanlc.js";import{T as a,ci as s,u as r,S as o,af as i,al as t,l,q as d,r as c,cc as u,c5 as m,E as p,a8 as g,ce as h,cf as v,C as b,ak as f,N as j,B as x,ax as y,p as k,cg as w,I as N,b4 as S,ap as P,db as A,aE as C,a as M,b as F,bG as T,dc as L,dd as G,b9 as R,A as D,aK as O,v as E,c9 as q,c2 as _,aU as I,h as B,aV as H,Y as Q,cv as U,cw as K,x as V,w as J,de as W,aa as z,c6 as $,c4 as X,cx as Y,aN as Z,ch as ee,av as ne,df as ae,b5 as se,cs as re,bF as oe,d8 as ie,aL as te}from"./index-XeGFdFb3.js";import{L as le,C as de,l as ce}from"./AppearanceControls-Q-jHRGz9.js";import{T as ue}from"./Tabs-BGWzF0yW.js";import{h as me,c as pe,g as ge,S as he,K as ve,n as be,A as fe,L as je,z as xe,v as ye,u as ke,B as we,E as Ne,e as Se,w as Pe}from"./logs-DNePHVHd.js";import{ad as Ae,a1 as Ce,ae as Me,af as Fe,C as Te,F as Le,ag as Ge,ah as Re,ai as De,aj as Oe,q as Ee,ak as qe,al as _e,am as Ie,an as Be,ao as He,ap as Qe,aq as Ue,ar as Ke,V as Ve,as as Je,at as We,au as ze,av as $e,aw as Xe,ax as Ye,ay as Ze,az as en,aA as nn,aB as an,aC as sn,aD as rn,aE as on,aF as tn,aG as ln,Q as dn,aH as cn,aI as un,aJ as mn,aK as pn}from"./activity-7OeQMmIs.js";import{T as gn}from"./Toolbar-CFyWgMbW.js";import{T as hn}from"./TimeCell-B6QtVZge.js";import{a as vn,$ as bn}from"./GridList-wfRSpULl.js";import{P as fn}from"./ProbeOptionsDialog-fRxfzbxN.js";import{D as jn,c as xn}from"./Table-DqqJleJD.js";import{F as yn,T as kn,L as wn}from"./Tag-BaZZD5o2.js";import{FlagField as Nn}from"./FlagPicker-YsJ19Gt1.js";import{S as Sn}from"./SearchSelect-BVGce3l_.js";import{u as Pn}from"./outbounds-UWplA2Qq.js";import{aa as An,z as Cn,ab as Mn,ac as Fn,A as Tn,ad as Ln,ae as Gn,m as Rn,O as Dn,r as On,v as En,l as qn,q as _n,af as In}from"./nodes-Bm1vmvln.js";import{$ as Bn}from"./SearchList-DWooTdFX.js";import{a as Hn,p as Qn}from"./probe-Bp5QvROd.js";import{n as Un}from"./nav-xz-AMjAg.js";import{N as Kn,t as Vn,n as Jn}from"./NumberField-Bo9iJ94r.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-Bvif-kkw.js";import"./Checkbox-BewExwKL.js";import"./Select-OqnbuzuK.js";import"./Virtualizer-FvdVRagH.js";function Wn({label:n,items:a,selected:s,onSelect:t,loading:l,empty:d,children:c}){const u=r();return e.jsx(bn,{className:"rp-cardview","aria-label":n,layout:"grid",items:a,dependencies:[c],selectionMode:"single",selectionBehavior:"replace",disallowEmptySelection:!0,selectedKeys:s?[s]:[],onSelectionChange:e=>{if("all"===e)return;const n=[...e][0];null!=n&&t(String(n))},renderEmptyState:()=>l?e.jsx(o,{shape:"cards",count:3,height:224,grid:!0}):e.jsx(i,{children:d??u("ui.empty")}),children:c})}function zn({id:n,title:r,titleFull:o,meta:i,actions:t,children:l}){return e.jsxs(vn,{id:n,textValue:r,className:s("rp-cardview-card"),children:[e.jsxs("div",{className:"rp-cardview-head",children:[e.jsx(a,{className:"rp-cardview-title",text:o,children:r}),t&&e.jsx("span",{className:"rp-cardview-actions",children:t})]}),i&&e.jsx("div",{className:"rp-cardview-meta",children:i}),l]})}function $n(a,s){return a.split("{names}").map((a,r)=>e.jsxs(n.Fragment,{children:[r>0&&s,a]},r))}function Xn(a,s,r,o){const i=f(s,["",""]),t=a.slice(0,6).map((a,s)=>e.jsxs(n.Fragment,{children:[s>0&&i,e.jsx(le,{appearance:"link",layout:"inline",href:o.get(a.id)??Oe([a.id]),children:e.jsx(j,{name:a.name})})]},a.id));if(a.length<=6)return t;const l=e.jsx(le,{appearance:"link",layout:"inline",href:Oe(a.map(e=>e.id)),children:r("nodes.latency.more",{n:a.length-6})});return r("nodes.latency.andMore",{names:"{names}",more:"{more}"}).split(/(\{names\}|\{more\})/).map((a,s)=>e.jsx(n.Fragment,{children:"{names}"===a?t:"{more}"===a?l:a},s))}const Yn=n=>[{label:n("nodes.latency.lowest"),icon:e.jsx(h,{}),tint:"c2",value:"",caption:" "},{label:n("nodes.latency.highest"),icon:e.jsx(Te,{}),tint:"c4",value:"",caption:" "},{label:n("ui.unavailable"),icon:e.jsx(v,{}),tint:"c5",value:""}];function Zn(){const a=r(),s=l(),{nodes:f,by:j,setBy:x,view:y,hrefs:k}=function(){const e=t[l()],a=d().data?.resources,s=me(c(a,"nodes",{whileLoading:!0})),r=pe(c(a,"groups",{whileLoading:!1})),o=ge(c(a,"providers",{whileLoading:!0})),[i,p]=n.useState("group"),g=u(),h=m(s.data,g),v=m(r.data,g),b=m(o.data,g),f=n.useMemo(()=>Ae(h??[],v,i,e),[h,v,i,e]),j=n.useMemo(()=>new Map((h??[]).map(e=>[e.id,Ce(e,b?.providers??[],!0)])),[h,b]);return{nodes:{...s,data:h},by:i,setBy:p,view:f,hrefs:j}}();if(f.error&&!f.data)return e.jsx(p,{error:f.error,onRetry:f.refetch});const w=!f.data;if(f.data&&!f.data.length)return e.jsx(i,{children:a("ui.empty")});const N=Me(y),{measured:S,down:P}=Fe(y),A=S[0],C=S.at(-1),M=A&&C?[{label:a("nodes.latency.lowest"),icon:e.jsx(h,{}),tint:"c2",value:A.name,nodeName:!0,valueRole:"name",caption:g(A.latest,a)},{label:a("nodes.latency.highest"),icon:e.jsx(Te,{}),tint:"c4",value:C.name,nodeName:!0,valueRole:"name",caption:g(C.latest,a)},{label:a("ui.unavailable"),value:a("nodes.latency.count",{n:P}),icon:e.jsx(v,{}),tint:"c5",tone:P?"negative":voidLine truncated
@@ -0,0 +1 @@
import{j as e,r as n}from"./vendor-react-64fcanlc.js";import{T as a,ci as s,u as r,S as o,af as i,al as t,l,q as d,r as c,cc as u,c5 as m,E as p,a8 as g,ce as h,cf as v,C as b,ak as f,N as j,B as x,ax as y,p as k,cg as w,I as N,b4 as S,ap as P,db as A,aE as C,a as M,b as F,bG as T,dc as L,dd as G,b9 as R,A as D,aK as O,v as E,c9 as q,c2 as _,aU as I,h as B,aV as H,Y as Q,cv as U,cw as K,x as V,w as J,de as W,aa as z,c6 as $,c4 as X,cx as Y,aN as Z,ch as ee,av as ne,df as ae,b5 as se,cs as re,bF as oe,d8 as ie,aL as te}from"./index-HxEUeoab.js";import{L as le,C as de,l as ce}from"./AppearanceControls-sRy1p156.js";import{T as ue}from"./Tabs-DT6MQhIo.js";import{h as me,c as pe,g as ge,S as he,K as ve,n as be,A as fe,L as je,z as xe,v as ye,u as ke,B as we,E as Ne,e as Se,w as Pe}from"./logs-C4GIy4tX.js";import{ad as Ae,a1 as Ce,ae as Me,af as Fe,C as Te,F as Le,ag as Ge,ah as Re,ai as De,aj as Oe,q as Ee,ak as qe,al as _e,am as Ie,an as Be,ao as He,ap as Qe,aq as Ue,ar as Ke,V as Ve,as as Je,at as We,au as ze,av as $e,aw as Xe,ax as Ye,ay as Ze,az as en,aA as nn,aB as an,aC as sn,aD as rn,aE as on,aF as tn,aG as ln,Q as dn,aH as cn,aI as un,aJ as mn,aK as pn}from"./activity-yZTrGy-J.js";import{T as gn}from"./Toolbar-BTFtduwD.js";import{T as hn}from"./TimeCell-BIqfL3y_.js";import{a as vn,$ as bn}from"./GridList-D7qdplA5.js";import{P as fn}from"./ProbeOptionsDialog-BynYQcxa.js";import{D as jn,c as xn}from"./Table-yWn0d3vL.js";import{F as yn,T as kn,L as wn}from"./Tag-SxASl3TF.js";import{FlagField as Nn}from"./FlagPicker-CiyGi8d1.js";import{S as Sn}from"./SearchSelect-BcScGUbQ.js";import{u as Pn}from"./outbounds-Bbb6kdae.js";import{aa as An,z as Cn,ab as Mn,ac as Fn,A as Tn,ad as Ln,ae as Gn,m as Rn,O as Dn,r as On,v as En,l as qn,q as _n,af as In}from"./nodes-6sIn2I0s.js";import{$ as Bn}from"./SearchList-LjCruZYP.js";import{a as Hn,p as Qn}from"./probe-Bj7oT3ox.js";import{n as Un}from"./nav-Bkujhswg.js";import{N as Kn,t as Vn,n as Jn}from"./NumberField-q4-QmTAT.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./ItemText-DOD_75iR.js";import"./Checkbox-CJt7u9-e.js";import"./Select-D7_6MaHd.js";import"./Virtualizer-DMIKG2CD.js";function Wn({label:n,items:a,selected:s,onSelect:t,loading:l,empty:d,children:c}){const u=r();return e.jsx(bn,{className:"rp-cardview","aria-label":n,layout:"grid",items:a,dependencies:[c],selectionMode:"single",selectionBehavior:"replace",disallowEmptySelection:!0,selectedKeys:s?[s]:[],onSelectionChange:e=>{if("all"===e)return;const n=[...e][0];null!=n&&t(String(n))},renderEmptyState:()=>l?e.jsx(o,{shape:"cards",count:3,height:224,grid:!0}):e.jsx(i,{children:d??u("ui.empty")}),children:c})}function zn({id:n,title:r,titleFull:o,meta:i,actions:t,children:l}){return e.jsxs(vn,{id:n,textValue:r,className:s("rp-cardview-card"),children:[e.jsxs("div",{className:"rp-cardview-head",children:[e.jsx(a,{className:"rp-cardview-title",text:o,children:r}),t&&e.jsx("span",{className:"rp-cardview-actions",children:t})]}),i&&e.jsx("div",{className:"rp-cardview-meta",children:i}),l]})}function $n(a,s){return a.split("{names}").map((a,r)=>e.jsxs(n.Fragment,{children:[r>0&&s,a]},r))}function Xn(a,s,r,o){const i=f(s,["",""]),t=a.slice(0,6).map((a,s)=>e.jsxs(n.Fragment,{children:[s>0&&i,e.jsx(le,{appearance:"link",layout:"inline",href:o.get(a.id)??Oe([a.id]),children:e.jsx(j,{name:a.name})})]},a.id));if(a.length<=6)return t;const l=e.jsx(le,{appearance:"link",layout:"inline",href:Oe(a.map(e=>e.id)),children:r("nodes.latency.more",{n:a.length-6})});return r("nodes.latency.andMore",{names:"{names}",more:"{more}"}).split(/(\{names\}|\{more\})/).map((a,s)=>e.jsx(n.Fragment,{children:"{names}"===a?t:"{more}"===a?l:a},s))}const Yn=n=>[{label:n("nodes.latency.lowest"),icon:e.jsx(h,{}),tint:"c2",value:"",caption:" "},{label:n("nodes.latency.highest"),icon:e.jsx(Te,{}),tint:"c4",value:"",caption:" "},{label:n("ui.unavailable"),icon:e.jsx(v,{}),tint:"c5",value:""}];function Zn(){const a=r(),s=l(),{nodes:f,by:j,setBy:x,view:y,hrefs:k}=function(){const e=t[l()],a=d().data?.resources,s=me(c(a,"nodes",{whileLoading:!0})),r=pe(c(a,"groups",{whileLoading:!1})),o=ge(c(a,"providers",{whileLoading:!0})),[i,p]=n.useState("group"),g=u(),h=m(s.data,g),v=m(r.data,g),b=m(o.data,g),f=n.useMemo(()=>Ae(h??[],v,i,e),[h,v,i,e]),j=n.useMemo(()=>new Map((h??[]).map(e=>[e.id,Ce(e,b?.providers??[],!0)])),[h,b]);return{nodes:{...s,data:h},by:i,setBy:p,view:f,hrefs:j}}();if(f.error&&!f.data)return e.jsx(p,{error:f.error,onRetry:f.refetch});const w=!f.data;if(f.data&&!f.data.length)return e.jsx(i,{children:a("ui.empty")});const N=Me(y),{measured:S,down:P}=Fe(y),A=S[0],C=S.at(-1),M=A&&C?[{label:a("nodes.latency.lowest"),icon:e.jsx(h,{}),tint:"c2",value:A.name,nodeName:!0,valueRole:"name",caption:g(A.latest,a)},{label:a("nodes.latency.highest"),icon:e.jsx(Te,{}),tint:"c4",value:C.name,nodeName:!0,valueRole:"name",caption:g(C.latest,a)},{label:a("ui.unavailable"),value:a("nodes.latency.count",{n:P}),icon:e.jsx(v,{}),tint:"c5",tone:P?"negative":voidLine truncated
@@ -1 +1 @@
import{r as e,a as t,$ as i,j as a}from"./vendor-react-64fcanlc.js";import{g7 as s,em as n,ez as r,g8 as l,cC as o,cN as u,fi as c,en as d,cJ as m,g9 as p,ep as v,dv as h,cK as f,fN as b,dA as g,cI as y,ga as N,ex as S,cD as x,g6 as P,cE as D,gb as w,eP as E,er as V,dw as M,dz as F,cO as R,cP as I,cQ as C,cR as B,cS as O,bp as T,cT as j,d1 as L,cU as k,cW as $,gc as U,gd as A,cX as q,eN as G,cY as K,cZ as W,cV as z,I as H,da as Y,u as Z,cl as _,d4 as X,fk as J,ge as Q,cn as ee,b7 as te,d5 as ie,gf as ae,cf as se,dC as ne}from"./index-XeGFdFb3.js";const re=new RegExp("^.*\\(.*\\).*$"),le=["latn","arab","hanidec","deva","beng","fullwide"];class oe{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return ce(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return ce(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return ce(this.locale,this.options,e).options.numberingSystem}}const ue=new Map;function ce(e,t,i){let a=de(e,t);if(!e.includes("-nu-")&&!a.isValidPartialNumber(i))for(let s of le)if(s!==a.options.numberingSystem){let a=de(e+(e.includes("-u-")?"-nu-":"-u-nu-")+s,t);if(a.isValidPartialNumber(i))return a}return a}function de(e,t){let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),a=ue.get(i);return a||(a=new me(e,t),ue.set(i,a)),a}class me{constructor(e,t={}){this.locale=e,1!==t.roundingIncrement&&null!=t.roundingIncrement&&(null==t.maximumFractionDigits&&null==t.minimumFractionDigits?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):null==t.maximumFractionDigits?t.maximumFractionDigits=t.minimumFractionDigits:null==t.minimumFractionDigits&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,i,a){let s=new Intl.NumberFormat(e,{...i,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:!0}),n=s.formatToParts(-10000.111),r=s.formatToParts(10000.111),l=ve.map(e=>s.formatToParts(e)),o=l.map((e,t)=>{let i=e.find(e=>"unit"===e.type);return i&&!e.some(e=>"integer"===e.type||"fraction"===e.type)?{unit:i.value,value:ve[t]}:null}).filter(e=>!!e),u=n.find(e=>"minusSign"===e.type)?.value??"-",c=r.find(e=>"plusSign"===e.type)?.value;c||"exceptZero"!==a?.signDisplay&&"always"!==a?.signDisplay||(c="+");let d=new Intl.NumberFormat(e,{...i,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),m=d.find(e=>"decimal"===e.type)?.value,p=n.find(e=>"group"===e.type)?.value,v=n.filter(e=>!pe.has(e.type)).map(e=>fe(e.value)),h=l.flatMap(e=>e.filter(e=>!pe.has(e.type)).map(e=>fe(e.value))),f=[...new Set([...v,...h])].sort((e,t)=>t.length-e.length),b=0===f.length?new RegExp("\\p{White_Space}|\\p{Cf}","gu"):new RegExp(`${f.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),g=[...new Intl.NumberFormat(i.locale,{useGrouping:!1}).format(9876543210)].reverse(),y=new Map(g.map((e,t)=>[e,t])),N=new RegExp(`[${g.join("")}]`,"g");return{minusSign:u,plusSign:c,decimal:m,group:p,literals:b,numeral:N,numerals:g,index:e=>String(y.get(e)),noNumeralUnits:o}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}parse(e){let t=this.formatter.resolvedOptions().useGrouping,i=this.sanitize(e);if(!t&&this.symbols.group&&i.includes(this.symbols.group))return NaN;if(this.symbols.group&&(i=i.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(i=i.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(i=i.replace(this.symbols.minusSign,"-")),i=i.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=i.indexOf("-");i=i.replace("-",""),i=i.replace("+","");let t=i.indexOf(".");-1===t&&(t=i.length),i=i.replace(".",""),i=t-2==0?`0.${i}`:t-2==-1?`0.0${i}`:t-2==-2?"0.00":`${i.slice(0,t-2)}.${i.slice(t-2)}`,e>-1&&(i=`-${i}`)}let a=i?+i:NaN;if(isNaN(a))return NaN;if("percent"===this.options.style){let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new oe(this.locale,e).parse(new s(this.locale,e).format(a))}return"accounting"===this.options.currencySign&&re.test(e)&&(a*=-1),a}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=he(e,",",this.symbols.decimal),e=he(e,String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&t&&(eLine truncated
import{r as e,a as t,$ as i,j as a}from"./vendor-react-64fcanlc.js";import{g7 as s,em as n,ez as r,g8 as l,cC as o,cN as u,fi as c,en as d,cJ as m,g9 as p,ep as v,dv as h,cK as f,fN as b,dA as g,cI as y,ga as N,ex as S,cD as x,g6 as P,cE as D,gb as w,eP as E,er as V,dw as M,dz as F,cO as R,cP as I,cQ as C,cR as B,cS as O,bp as T,cT as j,d1 as L,cU as k,cW as $,gc as U,gd as A,cX as q,eN as G,cY as K,cZ as W,cV as z,I as H,da as Y,u as Z,cm as _,d4 as X,fk as J,ge as Q,cl as ee,b7 as te,d5 as ie,gf as ae,cf as se,dC as ne}from"./index-HxEUeoab.js";const re=new RegExp("^.*\\(.*\\).*$"),le=["latn","arab","hanidec","deva","beng","fullwide"];class oe{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return ce(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,i){return ce(this.locale,this.options,e).isValidPartialNumber(e,t,i)}getNumberingSystem(e){return ce(this.locale,this.options,e).options.numberingSystem}}const ue=new Map;function ce(e,t,i){let a=de(e,t);if(!e.includes("-nu-")&&!a.isValidPartialNumber(i))for(let s of le)if(s!==a.options.numberingSystem){let a=de(e+(e.includes("-u-")?"-nu-":"-u-nu-")+s,t);if(a.isValidPartialNumber(i))return a}return a}function de(e,t){let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():""),a=ue.get(i);return a||(a=new me(e,t),ue.set(i,a)),a}class me{constructor(e,t={}){this.locale=e,1!==t.roundingIncrement&&null!=t.roundingIncrement&&(null==t.maximumFractionDigits&&null==t.minimumFractionDigits?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):null==t.maximumFractionDigits?t.maximumFractionDigits=t.minimumFractionDigits:null==t.minimumFractionDigits&&(t.minimumFractionDigits=t.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,t,i,a){let s=new Intl.NumberFormat(e,{...i,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:!0}),n=s.formatToParts(-10000.111),r=s.formatToParts(10000.111),l=ve.map(e=>s.formatToParts(e)),o=l.map((e,t)=>{let i=e.find(e=>"unit"===e.type);return i&&!e.some(e=>"integer"===e.type||"fraction"===e.type)?{unit:i.value,value:ve[t]}:null}).filter(e=>!!e),u=n.find(e=>"minusSign"===e.type)?.value??"-",c=r.find(e=>"plusSign"===e.type)?.value;c||"exceptZero"!==a?.signDisplay&&"always"!==a?.signDisplay||(c="+");let d=new Intl.NumberFormat(e,{...i,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001),m=d.find(e=>"decimal"===e.type)?.value,p=n.find(e=>"group"===e.type)?.value,v=n.filter(e=>!pe.has(e.type)).map(e=>fe(e.value)),h=l.flatMap(e=>e.filter(e=>!pe.has(e.type)).map(e=>fe(e.value))),f=[...new Set([...v,...h])].sort((e,t)=>t.length-e.length),b=0===f.length?new RegExp("\\p{White_Space}|\\p{Cf}","gu"):new RegExp(`${f.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),g=[...new Intl.NumberFormat(i.locale,{useGrouping:!1}).format(9876543210)].reverse(),y=new Map(g.map((e,t)=>[e,t])),N=new RegExp(`[${g.join("")}]`,"g");return{minusSign:u,plusSign:c,decimal:m,group:p,literals:b,numeral:N,numerals:g,index:e=>String(y.get(e)),noNumeralUnits:o}}(e,this.formatter,this.options,t),"percent"===this.options.style&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}parse(e){let t=this.formatter.resolvedOptions().useGrouping,i=this.sanitize(e);if(!t&&this.symbols.group&&i.includes(this.symbols.group))return NaN;if(this.symbols.group&&(i=i.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(i=i.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(i=i.replace(this.symbols.minusSign,"-")),i=i.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=i.indexOf("-");i=i.replace("-",""),i=i.replace("+","");let t=i.indexOf(".");-1===t&&(t=i.length),i=i.replace(".",""),i=t-2==0?`0.${i}`:t-2==-1?`0.0${i}`:t-2==-2?"0.00":`${i.slice(0,t-2)}.${i.slice(t-2)}`,e>-1&&(i=`-${i}`)}let a=i?+i:NaN;if(isNaN(a))return NaN;if("percent"===this.options.style){let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new oe(this.locale,e).parse(new s(this.locale,e).format(a))}return"accounting"===this.options.currencySign&&re.test(e)&&(a*=-1),a}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=he(e,",",this.symbols.decimal),e=he(e,String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&t&&(eLine truncated
@@ -1 +0,0 @@
import{j as r}from"./vendor-react-64fcanlc.js";import"./index-XeGFdFb3.js";import{L as e}from"./Tag-BaZZD5o2.js";function o({label:o,href:s}){return s?r.jsx(e,{href:s,children:o}):o}export{o as O};
@@ -0,0 +1 @@
import{j as r}from"./vendor-react-64fcanlc.js";import"./index-HxEUeoab.js";import{L as e}from"./Tag-SxASl3TF.js";function o({label:o,href:s}){return s?r.jsx(e,{href:s,children:o}):o}export{o as O};
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{ah as a,Q as s,aO as r,aZ as o,a_ as i,b0 as n,a1 as l,a0 as c,a5 as d,aX as p,X as u,h as v,Y as m,u as h,l as f,al as g,q as x,am as b,r as j,ao as y,an as w,x as k,bT as _,p as N,E as H,T as S,C as L,ax as R,bU as A,af as C,av as I,aD as V,S as D,P as E,B as P,bV as W}from"./index-XeGFdFb3.js";import{d as B,e as F}from"./files-Dt8K7QfP.js";import{r as q,e as M,u as O,b as T,D as K,R as U}from"./activity-7OeQMmIs.js";import{e as J,K as X,A as z}from"./logs-DNePHVHd.js";import{L as Q}from"./AppearanceControls-Q-jHRGz9.js";import{D as Y,t as Z}from"./Table-DqqJleJD.js";import{D as G}from"./DaeCode-DEjXqvav.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./ItemText-Bvif-kkw.js";import"./Select-OqnbuzuK.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";import"./daeTokens-BVtuNnWZ.js";const $={connections:v("connections",{tab:"list"}),flows:v("flows",{tab:"records"}),routing_trace:v("rules",{tab:"trace"}),dns_query:v("dns",{tab:"query"}),dns_cache:v("dns",{tab:"cache"}),dns_log:v("dns",{tab:"log"}),events:v("events"),probes:v("nodes",{tab:"latency"}),traffic_history:v("activity"),memory_history:v("activity"),runtime_outbounds:v("activity"),logs:v("logs"),providers:v("nodes"),rules:v("rules",{tab:"list"}),config:v("config"),config_validate:v("config",{tab:"source",panel:"diagnostics"}),runtime_settings:v("settings",{card:"runtime"}),geodata:v("settings",{card:"geodata"})},ee={ebpf:"ov.v.ebpf",userspace:"ov.v.userspace",mock:"ov.v.mock",active:"ov.v.active",degraded:"ov.v.degraded",detached:"ov.v.detached",failed:"ov.v.failed",disabled:"ov.v.disabled",full:"ov.v.full",partial:"ov.v.partial",none:"ov.v.none",real:"ov.v.real",loaded:"ov.v.loaded",not_loaded:"ov.v.notLoaded",attached:"ov.v.attached",partially_attached:"ov.v.partiallyAttached",published:"ov.v.published",not_published:"ov.v.notPublished",healthy:"ov.v.healthy",ready:"ov.v.ready",error:"ov.v.error",unknown:"ov.v.unknown",ingress:"ov.v.ingress",egress:"ov.v.egress"};function te(e,t){return ee[e]?t(ee[e]):e}function ae(e,t,a,s,r=!1,o=[]){const i=e.ebpf,n=i?.maps?.conn_state,l=(e,t)=>{const s=function(e,t,a){return"degraded"===e?{title:a("ov.v.degraded"),text:a(t?"ov.degradedHelp.runtime":"ov.degradedHelp.datapath")}:"unknown"===e?{title:a("ov.v.unknown"),text:a("ov.unknownHelp")}:void 0}(t,r,a);return s?{label:a(e),value:te(t,a),help:s}:[a(e),te(t,a)]},c=i?.maps?.state??"unknown",d=i&&function(e,t,a,s){if("unknown"!==e||!t.length)return;const r=new Intl.ListFormat(s,{type:"conjunction"}).format(t);return{title:a("ov.v.notVerified"),text:a("ov.notVerifiedHelp",{hooks:r})}}(i.hooks,o,a,s);return[l("ov.f.kind",e.kind),l("ov.f.state",e.state),..."partial"===e.visibility&&i?[]:[l("ov.f.visibility",e.visibility)],...i?[l("ov.f.backend",i.backend),l("ov.f.programs",i.programs),d?{label:a("ov.f.hooks"),value:a("ov.v.notVerified"),help:d}:l("ov.f.hooks",i.hooks),l("ov.f.routing",i.routing.state),l("ov.f.health",i.health),..."partial"===c&&n&&!n.occupancy_known?[[a("ov.f.maps"),a("ov.mapCapacity",{capacity:m(n.capacity,s)})]]:[l("ov.f.maps",c),[a("ov.f.connState"),n?.occupancy_known&&null!==n.occupancy?a("ui.fraction",{part:m(n.occupancy,s),whole:m(n.capacity,s)}):n?a("ov.occupancyUnknown",{capacity:m(n.capacity,s)}):t]]]:[]]}const se={service:"ov.v.cgroupService",shared:"ov.v.cgroupShared"},re={service:"ov.cgroupHelp.service",shared:"ov.cgroupHelp.shared"};function oe(e,t,s,r=[],o=!1){const i=e.cgroup?.scope,n=e=>{const t=a(e??null);return null===t?"—":m(t,s)},l=[["ov.f.rss",c(e.process?.rss_bytes??null,s)],["ov.f.cgroupCurrent",c(e.cgroup?.current_bytes??null,s)],["ov.f.cgroupLimit",o&&null===e.cgroup?.limit_bytes?t("ov.noLimit"):c(e.cgroup?.limit_bytes??null,s)],["ov.f.cgroupScope",i&&"unknown"!==i?t(se[i]):"—"],["ov.f.oomHigh",n(e.cgroup?.events?.high)],["ov.f.oom",n(e.cgroup?.events?.oom)],["ov.f.oomKill",n(e.cgroup?.events?.oom_kill)],["ov.f.ebpfBytes",c(e.kernel?.ebpf_bytes??null,s)]],d=[...r,..."unknown"===i?["ov.f.cgroupScope"]:[],...e.kernel?[]:["ov.f.ebpfBytes"]];return l.filter(([e])=>!d.includes(e)).map(([e,a])=>"ov.f.cgroupScope"===e&&i&&"unknown"!==i?{label:t(e),value:a,help:{title:t(e),text:t("ui.valuePair",{label:a,value:t(re[i])})}}:[t(e),a])}const ie={status:"overview-status",limits:"overview-limits",datapath:"overview-datapath"};function ne(t=""){const v=h(),N=f(),H=g[N],S=x(),L=S.data?.resources,R=b(j(L,"runtime",{whileLoading:!1})),A=y(j(L,"datapath",{whileLoading:!1})),C=w(j(L,"runtime_memory",{whileLoading:!1})),I=k(),V=_(j(L,"runtime_settings",{whileLoading:!1})),D=O(R.data,S.data,R.refetch),[E,P]=e.useState(!1),W=e.useMemo(()=>({capabilities:S.data,runtime:R.data,version:I.data,memory:C.data,datapath:A.data}),[S.data,R.data,I.data,C.data,A.data]),K=e.useMemo(()=>S.data?T(S.data,I.data,v,N,V.data?.recording):[],[S.data,I.data,v,N,V.data?.recording]),U=K.length>0,X=!!A.data,z=S.loading||R.loading||I.loading||C.loading||A.loadiLine truncated
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{ah as a,Q as s,aO as r,aZ as o,a_ as i,b0 as n,a1 as l,a0 as c,a5 as d,aX as p,X as u,h as v,Y as m,u as h,l as f,al as g,q as x,am as b,r as j,ao as y,an as w,x as k,bT as _,p as N,E as H,T as S,C as L,ax as R,bU as A,af as C,av as I,aD as V,S as D,P as E,B as P,bV as W}from"./index-HxEUeoab.js";import{d as B,e as F}from"./files-Dt8K7QfP.js";import{r as q,e as M,u as O,b as T,D as K,R as U}from"./activity-yZTrGy-J.js";import{e as J,K as X,A as z}from"./logs-C4GIy4tX.js";import{L as Q}from"./AppearanceControls-sRy1p156.js";import{D as Y,t as Z}from"./Table-yWn0d3vL.js";import{D as G}from"./DaeCode-DEjXqvav.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./ItemText-DOD_75iR.js";import"./Select-D7_6MaHd.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";import"./daeTokens-BVtuNnWZ.js";const $={connections:v("connections",{tab:"list"}),flows:v("flows",{tab:"records"}),routing_trace:v("rules",{tab:"trace"}),dns_query:v("dns",{tab:"query"}),dns_cache:v("dns",{tab:"cache"}),dns_log:v("dns",{tab:"log"}),events:v("events"),probes:v("nodes",{tab:"latency"}),traffic_history:v("activity"),memory_history:v("activity"),runtime_outbounds:v("activity"),logs:v("logs"),providers:v("nodes"),rules:v("rules",{tab:"list"}),config:v("config"),config_validate:v("config",{tab:"source",panel:"diagnostics"}),runtime_settings:v("settings",{card:"runtime"}),geodata:v("settings",{card:"geodata"})},ee={ebpf:"ov.v.ebpf",userspace:"ov.v.userspace",mock:"ov.v.mock",active:"ov.v.active",degraded:"ov.v.degraded",detached:"ov.v.detached",failed:"ov.v.failed",disabled:"ov.v.disabled",full:"ov.v.full",partial:"ov.v.partial",none:"ov.v.none",real:"ov.v.real",loaded:"ov.v.loaded",not_loaded:"ov.v.notLoaded",attached:"ov.v.attached",partially_attached:"ov.v.partiallyAttached",published:"ov.v.published",not_published:"ov.v.notPublished",healthy:"ov.v.healthy",ready:"ov.v.ready",error:"ov.v.error",unknown:"ov.v.unknown",ingress:"ov.v.ingress",egress:"ov.v.egress"};function te(e,t){return ee[e]?t(ee[e]):e}function ae(e,t,a,s,r=!1,o=[]){const i=e.ebpf,n=i?.maps?.conn_state,l=(e,t)=>{const s=function(e,t,a){return"degraded"===e?{title:a("ov.v.degraded"),text:a(t?"ov.degradedHelp.runtime":"ov.degradedHelp.datapath")}:"unknown"===e?{title:a("ov.v.unknown"),text:a("ov.unknownHelp")}:void 0}(t,r,a);return s?{label:a(e),value:te(t,a),help:s}:[a(e),te(t,a)]},c=i?.maps?.state??"unknown",d=i&&function(e,t,a,s){if("unknown"!==e||!t.length)return;const r=new Intl.ListFormat(s,{type:"conjunction"}).format(t);return{title:a("ov.v.notVerified"),text:a("ov.notVerifiedHelp",{hooks:r})}}(i.hooks,o,a,s);return[l("ov.f.kind",e.kind),l("ov.f.state",e.state),..."partial"===e.visibility&&i?[]:[l("ov.f.visibility",e.visibility)],...i?[l("ov.f.backend",i.backend),l("ov.f.programs",i.programs),d?{label:a("ov.f.hooks"),value:a("ov.v.notVerified"),help:d}:l("ov.f.hooks",i.hooks),l("ov.f.routing",i.routing.state),l("ov.f.health",i.health),..."partial"===c&&n&&!n.occupancy_known?[[a("ov.f.maps"),a("ov.mapCapacity",{capacity:m(n.capacity,s)})]]:[l("ov.f.maps",c),[a("ov.f.connState"),n?.occupancy_known&&null!==n.occupancy?a("ui.fraction",{part:m(n.occupancy,s),whole:m(n.capacity,s)}):n?a("ov.occupancyUnknown",{capacity:m(n.capacity,s)}):t]]]:[]]}const se={service:"ov.v.cgroupService",shared:"ov.v.cgroupShared"},re={service:"ov.cgroupHelp.service",shared:"ov.cgroupHelp.shared"};function oe(e,t,s,r=[],o=!1){const i=e.cgroup?.scope,n=e=>{const t=a(e??null);return null===t?"—":m(t,s)},l=[["ov.f.rss",c(e.process?.rss_bytes??null,s)],["ov.f.cgroupCurrent",c(e.cgroup?.current_bytes??null,s)],["ov.f.cgroupLimit",o&&null===e.cgroup?.limit_bytes?t("ov.noLimit"):c(e.cgroup?.limit_bytes??null,s)],["ov.f.cgroupScope",i&&"unknown"!==i?t(se[i]):"—"],["ov.f.oomHigh",n(e.cgroup?.events?.high)],["ov.f.oom",n(e.cgroup?.events?.oom)],["ov.f.oomKill",n(e.cgroup?.events?.oom_kill)],["ov.f.ebpfBytes",c(e.kernel?.ebpf_bytes??null,s)]],d=[...r,..."unknown"===i?["ov.f.cgroupScope"]:[],...e.kernel?[]:["ov.f.ebpfBytes"]];return l.filter(([e])=>!d.includes(e)).map(([e,a])=>"ov.f.cgroupScope"===e&&i&&"unknown"!==i?{label:t(e),value:a,help:{title:t(e),text:t("ui.valuePair",{label:a,value:t(re[i])})}}:[t(e),a])}const ie={status:"overview-status",limits:"overview-limits",datapath:"overview-datapath"};function ne(t=""){const v=h(),N=f(),H=g[N],S=x(),L=S.data?.resources,R=b(j(L,"runtime",{whileLoading:!1})),A=y(j(L,"datapath",{whileLoading:!1})),C=w(j(L,"runtime_memory",{whileLoading:!1})),I=k(),V=_(j(L,"runtime_settings",{whileLoading:!1})),D=O(R.data,S.data,R.refetch),[E,P]=e.useState(!1),W=e.useMemo(()=>({capabilities:S.data,runtime:R.data,version:I.data,memory:C.data,datapath:A.data}),[S.data,R.data,I.data,C.data,A.data]),K=e.useMemo(()=>S.data?T(S.data,I.data,v,N,V.data?.recording):[],[S.data,I.data,v,N,V.data?.recording]),U=K.length>0,X=!!A.data,z=S.loading||R.loading||I.loading||C.loading||A.loadiLine truncated
@@ -1 +0,0 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{P as n}from"./ProbeOptionsDialog-fRxfzbxN.js";import{C as i,a as s,b as r,E as l}from"./ConditionRow-mKWPcuZs.js";import{A as o}from"./AddCircle-7x8u9Pw1.js";import{T as a,R as d,j as c,s as u,u as p,w as m,l as h,k as g,U as f,V as b,S as y,O as v,Q as x,r as j,P as k}from"./nodes-Bm1vmvln.js";import{bp as w,u as S,h as N,I as C,N as M,w as _,aV as I,cj as E,U as D,G as O,aW as L,bQ as P,ck as R,b1 as z,aU as T,Y as $,al as q,l as K,b7 as A,i as F,af as H,bG as V,ch as G,cl as U,cm as J,cn as B,bw as Q,co as Y,cp as W,B as X,aE as Z,bk as ee,cq as te,b5 as ne,cr as ie,cs as se,aA as re,bF as le,c1 as oe,a9 as ae,ct as de,cu as ce,q as ue,r as pe,cv as me,cw as he,aR as ge,t as fe,A as be,aN as ye,aq as ve,H as xe,az as je,c2 as ke,v as we,cx as Se,E as Ne,cg as Ce,aG as Me,cy as _e,C as Ie,p as Ee,T as De,cz as Oe,ax as Le,av as Pe,b as Re,a as ze}from"./index-XeGFdFb3.js";import{T as Te,a as $e,L as qe}from"./Tag-BaZZD5o2.js";import{D as Ke}from"./DaeCode-DEjXqvav.js";import{N as Ae,p as Fe,L as He,D as Ve,K as Ge,h as Ue,g as Je,u as Be,c as Qe,v as Ye,w as We,m as Xe,x as Ze,S as et,n as tt}from"./logs-DNePHVHd.js";import{T as nt}from"./Toolbar-CFyWgMbW.js";import{C as it,L as st}from"./AppearanceControls-Q-jHRGz9.js";import{$ as rt,S as lt}from"./SearchList-DWooTdFX.js";import{i as ot,v as at,w as dt,x as ct,y as ut,z as pt,A as mt,E as ht,G as gt,H as ft,I as bt,J as yt,K as vt,M as xt,N as jt,O as kt,P as wt,Q as St,T as Nt,V as Ct,X as Mt,Y as _t,Z as It}from"./activity-7OeQMmIs.js";import{$ as Et,a as Dt}from"./GridList-wfRSpULl.js";import{$ as Ot,a as Lt,b as Pt,c as Rt,d as zt}from"./Virtualizer-FvdVRagH.js";import{$ as Tt,a as $t}from"./Select-OqnbuzuK.js";import{a as qt,b as Kt}from"./ItemText-Bvif-kkw.js";import{S as At}from"./SearchSelect-BVGce3l_.js";import{N as Ft,t as Ht,n as Vt}from"./NumberField-Bo9iJ94r.js";import{p as Gt}from"./probe-Bp5QvROd.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Checkbox-BewExwKL.js";import"./daeTokens-BVtuNnWZ.js";const Ut={minItemSize:new Lt(200,200),maxItemSize:new Lt(1/0,1/0),preserveAspectRatio:!1,minSpace:new Lt(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48};class Jt extends Ot{shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||Ut.minItemSize).equals(t.minItemSize||Ut.minItemSize)||!(e.maxItemSize||Ut.maxItemSize).equals(t.maxItemSize||Ut.maxItemSize)||!(e.minSpace||Ut.minSpace).equals(t.minSpace||Ut.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=Ut.minItemSize,maxItemSize:n=Ut.maxItemSize,preserveAspectRatio:i=Ut.preserveAspectRatio,minSpace:s=Ut.minSpace,maxHorizontalSpace:r=Ut.maxSpace,maxColumns:l=Ut.maxColumns,dropIndicatorThickness:o=Ut.dropIndicatorThickness,loaderHeight:a=Ut.loaderHeight,direction:d="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=o,this.direction=d;let c=this.virtualizer.size.width,u=Math.min(n.width,c),p=Number.isFinite(n.height)?n.height:Math.floor(t.height/t.width*u),m=Math.floor(c/(t.width+s.width)),h=Math.max(1,Math.min(l,m));this.numColumns=h;let g=c-s.width*Math.max(0,h),f=Math.floor(g/h);f=Math.max(t.width,Math.min(u,f));let b=(f-t.width)/Math.max(1,u-t.width),y=t.height+Math.floor((p-t.height)*b);y=Math.max(t.height,Math.min(p,y));let v=Math.min(Math.max(r,s.width),Math.floor((c-h*f)/(h+1)));this.gap=new Lt(v,s.height),this.margin=Math.floor((c-h*f-v*(h+1))/2);let x=this.virtualizer.collection,j=x.size,k=x.getLastKey();for(let E=0;E<2&&null!=k;E++){let e=x.getItem(k);if("skeleton"===e?.type){j++;break}k=x.getKeyBefore(k)}let w=Math.ceil(j/h),S=x[Symbol.iterator](),N=w>0?s.height:0,C=new Map,M=null,_=0;for(let E=0;E<w;E++){let t=0,n=[];for(let s=0;s<h;s++){let r=M||S.next().value;if(!r)break;if("loader"===r.type)continue;"skeleton"===r.type&&(M=r);let l=M?`${M.key}-${_++}`:r.key,o=this.layoutInfos.get(l),a=r;M&&(a=o&&o.content.key===l?o.content:{...M,key:l});let d=v+s*(f+v)+this.margin,c=y,u=!i;o&&u&&(c=o.rect.height,u=e.layoutOptionsChanged||e.sizeChanged||o.estimatedSize||o.content!==a);let p=new Rt(d,N,f,c),m=new Pt(r.type,l,p);m.estimatedSize=u,m.allowOverflow=!0,m.content=a,C.set(l,m),n.push(m),t=Math.max(t,m.rect.height)}for(let e of n)e.rect.height=t;N+=t+s.height,M&&E===w-1&&N<this.virtualizer.size.height&&w++}let I=x.getItem(x.getLastKey());if("loader"===I?.type){(_>0||!I.props.isLoading)&&(a=0);let e=new Rt(v,N,c-2*v,a),t=new Pt("loader",I.key,e);C.set(I.key,t),N=t.rect.maxY}this.layoutInfos=C,this.contentSize=new Lt(this.virtualizer.size.width,N)}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let n of this.layoutInfos.values())(n.rect.intersects(e)||this.virtualizer.isPersistedKey(n.key)||"loadeLine truncated
@@ -0,0 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{P as n}from"./ProbeOptionsDialog-BynYQcxa.js";import{C as i,a as s,b as r,E as l}from"./ConditionRow-B8Otz3rt.js";import{A as o}from"./AddCircle-C6Jc7GCc.js";import{T as a,R as d,j as c,s as u,u as p,w as m,l as h,k as g,U as f,V as b,S as y,O as v,Q as x,r as j,P as k}from"./nodes-6sIn2I0s.js";import{bp as w,u as S,h as N,I as C,N as M,w as _,aV as I,cj as E,U as D,G as O,aW as P,bQ as L,ck as R,b1 as z,aU as T,Y as $,al as q,l as K,cl as A,b7 as F,i as H,af as V,bG as G,ch as U,cm as B,cn as J,bw as Q,co as Y,cp as W,B as X,aE as Z,bk as ee,cq as te,b5 as ne,cr as ie,cs as se,aA as re,bF as le,c1 as oe,a9 as ae,ct as de,cu as ce,q as ue,r as pe,cv as me,cw as he,aR as ge,t as fe,A as be,aN as ye,aq as ve,H as xe,az as je,c2 as ke,v as we,cx as Se,E as Ne,cg as Ce,aG as Me,cy as _e,C as Ie,p as Ee,T as De,cz as Oe,ax as Pe,av as Le,b as Re,a as ze}from"./index-HxEUeoab.js";import{T as Te,a as $e,L as qe}from"./Tag-SxASl3TF.js";import{D as Ke}from"./DaeCode-DEjXqvav.js";import{N as Ae,L as Fe,D as He,K as Ve,h as Ge,g as Ue,u as Be,c as Je,v as Qe,w as Ye,m as We,x as Xe,S as Ze,n as et}from"./logs-C4GIy4tX.js";import{T as tt}from"./Toolbar-BTFtduwD.js";import{C as nt,L as it}from"./AppearanceControls-sRy1p156.js";import{$ as st,S as rt}from"./SearchList-LjCruZYP.js";import{i as lt,v as ot,w as at,x as dt,y as ct,z as ut,A as pt,E as mt,G as ht,H as gt,I as ft,J as bt,K as yt,M as vt,N as xt,O as jt,P as kt,Q as wt,T as St,V as Nt,X as Ct,Y as Mt,Z as _t}from"./activity-yZTrGy-J.js";import{$ as It,a as Et}from"./GridList-D7qdplA5.js";import{$ as Dt,a as Ot,b as Pt,c as Lt,d as Rt}from"./Virtualizer-DMIKG2CD.js";import{$ as zt,a as Tt}from"./Select-D7_6MaHd.js";import{a as $t,b as qt}from"./ItemText-DOD_75iR.js";import{S as Kt}from"./SearchSelect-BcScGUbQ.js";import{N as At,t as Ft,n as Ht}from"./NumberField-q4-QmTAT.js";import{p as Vt}from"./probe-Bj7oT3ox.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Checkbox-CJt7u9-e.js";import"./daeTokens-BVtuNnWZ.js";const Gt={minItemSize:new Ot(200,200),maxItemSize:new Ot(1/0,1/0),preserveAspectRatio:!1,minSpace:new Ot(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48};class Ut extends Dt{shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||Gt.minItemSize).equals(t.minItemSize||Gt.minItemSize)||!(e.maxItemSize||Gt.maxItemSize).equals(t.maxItemSize||Gt.maxItemSize)||!(e.minSpace||Gt.minSpace).equals(t.minSpace||Gt.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=Gt.minItemSize,maxItemSize:n=Gt.maxItemSize,preserveAspectRatio:i=Gt.preserveAspectRatio,minSpace:s=Gt.minSpace,maxHorizontalSpace:r=Gt.maxSpace,maxColumns:l=Gt.maxColumns,dropIndicatorThickness:o=Gt.dropIndicatorThickness,loaderHeight:a=Gt.loaderHeight,direction:d="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=o,this.direction=d;let c=this.virtualizer.size.width,u=Math.min(n.width,c),p=Number.isFinite(n.height)?n.height:Math.floor(t.height/t.width*u),m=Math.floor(c/(t.width+s.width)),h=Math.max(1,Math.min(l,m));this.numColumns=h;let g=c-s.width*Math.max(0,h),f=Math.floor(g/h);f=Math.max(t.width,Math.min(u,f));let b=(f-t.width)/Math.max(1,u-t.width),y=t.height+Math.floor((p-t.height)*b);y=Math.max(t.height,Math.min(p,y));let v=Math.min(Math.max(r,s.width),Math.floor((c-h*f)/(h+1)));this.gap=new Ot(v,s.height),this.margin=Math.floor((c-h*f-v*(h+1))/2);let x=this.virtualizer.collection,j=x.size,k=x.getLastKey();for(let E=0;E<2&&null!=k;E++){let e=x.getItem(k);if("skeleton"===e?.type){j++;break}k=x.getKeyBefore(k)}let w=Math.ceil(j/h),S=x[Symbol.iterator](),N=w>0?s.height:0,C=new Map,M=null,_=0;for(let E=0;E<w;E++){let t=0,n=[];for(let s=0;s<h;s++){let r=M||S.next().value;if(!r)break;if("loader"===r.type)continue;"skeleton"===r.type&&(M=r);let l=M?`${M.key}-${_++}`:r.key,o=this.layoutInfos.get(l),a=r;M&&(a=o&&o.content.key===l?o.content:{...M,key:l});let d=v+s*(f+v)+this.margin,c=y,u=!i;o&&u&&(c=o.rect.height,u=e.layoutOptionsChanged||e.sizeChanged||o.estimatedSize||o.content!==a);let p=new Lt(d,N,f,c),m=new Pt(r.type,l,p);m.estimatedSize=u,m.allowOverflow=!0,m.content=a,C.set(l,m),n.push(m),t=Math.max(t,m.rect.height)}for(let e of n)e.rect.height=t;N+=t+s.height,M&&E===w-1&&N<this.virtualizer.size.height&&w++}let I=x.getItem(x.getLastKey());if("loader"===I?.type){(_>0||!I.props.isLoading)&&(a=0);let e=new Lt(v,N,c-2*v,a),t=new Pt("loader",I.key,e);C.set(I.key,t),N=t.rect.maxY}this.layoutInfos=C,this.contentSize=new Ot(this.virtualizer.size.width,N)}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let n of this.layoutInfos.values())(n.rect.intersects(e)||this.virtualizer.isPersistedKey(n.key)||"loader"===n.tLine truncated
@@ -1 +1 @@
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{u as o,b5 as i,cr as c,ch as a,B as r}from"./index-XeGFdFb3.js";import{F as n,G as t,L as l}from"./logs-DNePHVHd.js";function d({model:d}){const h=o(),m=e.useId(),p=n(),[u,b]=e.useState(t(d.choices,p.choice)?.id??""),[j,x]=e.useState(p.cold),[f,g]=e.useState(p.leaves),v=d.busy||!d.choices.some(e=>e.id===u);return s.jsx(i,{narrow:!0,isOpen:!0,onOpenChange:e=>!e&&d.close(),title:h("probe.title"),description:d.name,footer:()=>s.jsxs(s.Fragment,{children:[s.jsx(r,{onPress:d.close,children:h("ui.cancel")}),s.jsx(r,{accent:!0,type:"submit",form:m,isDisabled:v,children:h("probe.submit")})]}),children:s.jsxs(c,{id:m,onSubmit:e=>{e.preventDefault(),v||d.submit({...p,choice:u,cold:j,leaves:f})},children:[s.jsx(l,{label:h("probe.kind"),value:u,onChange:b,items:d.choices.map(e=>({id:e.id,label:h(e.label)}))}),s.jsx(a,{isSelected:j,onChange:x,children:h("probe.cold")}),d.group&&s.jsx(a,{isSelected:f,onChange:g,children:h("probe.leaves")})]})})}export{d as P};
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{u as o,b5 as i,cr as c,ch as a,B as r}from"./index-HxEUeoab.js";import{F as n,G as t,L as l}from"./logs-C4GIy4tX.js";function d({model:d}){const h=o(),m=e.useId(),p=n(),[u,b]=e.useState(t(d.choices,p.choice)?.id??""),[j,x]=e.useState(p.cold),[f,g]=e.useState(p.leaves),v=d.busy||!d.choices.some(e=>e.id===u);return s.jsx(i,{narrow:!0,isOpen:!0,onOpenChange:e=>!e&&d.close(),title:h("probe.title"),description:d.name,footer:()=>s.jsxs(s.Fragment,{children:[s.jsx(r,{onPress:d.close,children:h("ui.cancel")}),s.jsx(r,{accent:!0,type:"submit",form:m,isDisabled:v,children:h("probe.submit")})]}),children:s.jsxs(c,{id:m,onSubmit:e=>{e.preventDefault(),v||d.submit({...p,choice:u,cold:j,leaves:f})},children:[s.jsx(l,{label:h("probe.kind"),value:u,onChange:b,items:d.choices.map(e=>({id:e.id,label:h(e.label)}))}),s.jsx(a,{isSelected:j,onChange:x,children:h("probe.cold")}),d.group&&s.jsx(a,{isSelected:f,onChange:g,children:h("probe.leaves")})]})})}export{d as P};
@@ -1,2 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Trace-Cq_wRvDo.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-XeGFdFb3.js","./index-BClYdby3.css","./flows-CjEC9Jxw.js","./logs-DNePHVHd.js","./Select-OqnbuzuK.js","./ItemText-Bvif-kkw.js","./AppearanceControls-Q-jHRGz9.js","./nodes-Bm1vmvln.js","./probe-Bp5QvROd.js","./useQuickRule-8yoKk9d5.js","./DaeCode-DEjXqvav.js","./daeTokens-BVtuNnWZ.js","./AddCircle-7x8u9Pw1.js","./SearchSelect-BVGce3l_.js","./SearchList-DWooTdFX.js","./Virtualizer-FvdVRagH.js","./Toolbar-CFyWgMbW.js","./rule-BUktGcKO.js","./activity-7OeQMmIs.js","./activity-Db7VRWAG.css","./NumberField-Bo9iJ94r.js","./Table-DqqJleJD.js","./Checkbox-BewExwKL.js","./Tabs-BGWzF0yW.js","./ConditionRow-mKWPcuZs.js","./Coverage-fmBkVF9H.js","./labels-D8xxfRTQ.js","./nav-4iHQTLCW.js","./recorder-BHyqDNp5.js","./geodataUpdate-Blcy6CRD.js","./LinkOut-BfQApT3z.js","./impact-B8feJDtJ.css"])))=>i.map(i=>d[i]);
import{cA as e,cB as n,cC as s,cD as i,cE as l,cF as a,cG as r,bp as t,cH as o,cI as d,cJ as u,cK as c,cL as p,cM as m,cN as f,cO as b,cP as h,cQ as g,cR as v,cS as x,cT as y,cU as k,cV as w,cW as j,cX as S,cY as _,cZ as C,c_ as N,c$ as D,d0 as M,d1 as P,d2 as R,d3 as I,aD as H,d4 as q,d5 as O,aA as E,b7 as L,c2 as A,c4 as F,al as T,Y as V,U as W,H as B,a8 as $,ak as U,a6 as Q,o as G,h as J,r as K,d6 as X,a1 as Y,w as Z,u as z,aK as ee,cw as ne,A as se,l as ie,q as le,bT as ae,aP as re,aQ as te,m as oe,x as de,aO as ue,aM as ce,ab as pe,C as me,bk as fe,bF as be,ch as he,B as ge,aL as ve,cr as xe,cq as ye,p as ke,d7 as we,bG as je,d8 as Se,E as _e,cy as Ce,ax as Ne,b8 as De,aE as Me,cg as Pe,av as Re,T as Ie,c3 as He,c6 as qe,L as Oe,aG as Ee,d9 as Le,_ as Ae}from"./index-XeGFdFb3.js";import{r as Fe,$ as Te,j as Ve}from"./vendor-react-64fcanlc.js";import{_ as We,$ as Be,a0 as $e,a1 as Ue,a2 as Qe,a3 as Ge,a4 as Je,a5 as Ke,a6 as Xe,a7 as Ye,a8 as Ze,a9 as ze,aa as en,ab as nn,ac as sn,s as ln}from"./activity-7OeQMmIs.js";import{T as an}from"./Tabs-BGWzF0yW.js";import{D as rn}from"./DaeCode-DEjXqvav.js";import{L as tn}from"./AppearanceControls-Q-jHRGz9.js";import{a as on,c as dn,u as un,y as cn,e as pn,w as mn,h as fn,D as bn,L as hn,S as gn}from"./logs-DNePHVHd.js";import{T as vn}from"./Toolbar-CFyWgMbW.js";import{D as xn}from"./Table-DqqJleJD.js";import{C as yn,a as kn,E as wn}from"./ConditionRow-mKWPcuZs.js";import{c as jn,C as Sn}from"./Coverage-fmBkVF9H.js";import{d as _n,b as Cn,c as Nn,e as Dn,B as Mn}from"./rule-BUktGcKO.js";import{u as Pn,a as Rn,c as In}from"./flows-CjEC9Jxw.js";import{W as Hn,s as qn,u as On,b as En,X as Ln,Y as An,f as Fn,c as Tn,Z as Vn,j as Wn,e as Bn,_ as $n,$ as Un,a0 as Qn,a1 as Gn,a2 as Jn,a3 as Kn,r as Xn,a4 as Yn,a5 as Zn,a6 as zn,a7 as es,d as ns,D as ss,a8 as is}from"./nodes-Bm1vmvln.js";import{w as ls}from"./labels-D8xxfRTQ.js";import{r as as}from"./nav-4iHQTLCW.js";import{r as rs}from"./recorder-BHyqDNp5.js";import{g as ts,a as os,b as ds}from"./geodataUpdate-Blcy6CRD.js";/* empty css */import{L as us}from"./LinkOut-BfQApT3z.js";import{S as cs}from"./SearchSelect-BVGce3l_.js";const ps=new WeakMap;let ms=Math.round(1e10*Math.random()),fs=0;const bs=Fe.createContext(null),hs=Fe.createContext(null),gs=Fe.createContext(null),vs=Fe.forwardRef(function(e,n){[e,n]=g(e,n,bs);let{validationBehavior:l}=v(x)||{},a=e.validationBehavior??l??"native",r=function(e){let n=Fe.useMemo(()=>e.name||`radio-group-${ms}-${++fs}`,[e.name]),[s,i]=b(e.value,e.defaultValue??null,e.onChange),[l]=Fe.useState(s),[a,r]=Fe.useState(null),t=h({...e,value:s}),o=t.displayValidation.isInvalid;return{...t,name:n,selectedValue:s,defaultSelectedValue:void 0!==e.value?l:e.defaultValue??null,setSelectedValue:n=>{e.isReadOnly||e.isDisabled||(i(n),t.commitValidation())},lastFocusedValue:a,setLastFocusedValue:r,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(o?"invalid":null),isInvalid:o}}({...e,validationBehavior:a}),[D,M]=y(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:P,labelProps:R,descriptionProps:I,errorMessageProps:H,...q}=function(e,n){let{name:l,form:a,isReadOnly:r,isRequired:b,isDisabled:h,orientation:g="vertical",validationBehavior:v="aria"}=e,{direction:x}=t(),{isInvalid:y,validationErrors:k,validationDetails:w}=n.displayValidation,{labelProps:j,fieldProps:S,descriptionProps:_,errorMessageProps:C}=o({...e,labelElementType:"span",isInvalid:n.isInvalid,errorMessage:e.errorMessage||k}),N=i(e,{labelable:!0}),{focusWithinProps:D}=d({onBlurWithin(s){e.onBlur?.(s),n.selectedValue||n.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function M(e,s){let i,l=p(s.currentTarget,{from:f(s),accept:e=>e instanceof m(e).HTMLInputElement&&"radio"===e.type});return"next"===e?(i=l.nextNode(),i||(l.currentNode=s.currentTarget,i=l.firstChild())):(i=l.previousNode(),i||(l.currentNode=s.currentTarget,i=l.lastChild())),!!i&&(i.focus(),n.setSelectedValue(i.value),!0)}let{keyboardProps:P}=u({shortcuts:{ArrowRight:e=>M("rtl"===x&&"vertical"!==g?"prev":"next",e),ArrowLeft:e=>M("rtl"===x&&"vertical"!==g?"next":"prev",e),ArrowDown:e=>M("next",e),ArrowUp:e=>M("prev",e)},allowRepeats:!0}),R=c(l);return ps.set(n,{name:R,form:a,descriptionId:_.id,errorMessageId:C.id,validationBehavior:v}),{radioGroupProps:s(N,{role:"radiogroup",...P,"aria-invalid":n.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":b||void 0,"aria-disabled":h||void 0,"aria-orientation":g,...S,...D}),labelProps:j,descriptionProps:_,errorMessageProps:C,isInvalid:y,validationErrors:k,validationDetails:w}}({...e,label:M,validationBehavior:a},r),O=k({...e,values:{orientation:e.orientation||"vertical",isDisabled:r.isDisabled,isReadOnly:r.isReadOnly,isRequired:r.isRequired,isInvalid:r.isInvalid,state:r},defaultClassName:"react-aria-RadioGroup"}),E=i(e,{global:!0});return Te.createElemeLine truncated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Trace-BZtIse5U.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-HxEUeoab.js","./index-CcbWXWDN.css","./flows-dBNkBg79.js","./logs-C4GIy4tX.js","./Select-D7_6MaHd.js","./ItemText-DOD_75iR.js","./AppearanceControls-sRy1p156.js","./nodes-6sIn2I0s.js","./probe-Bj7oT3ox.js","./useQuickRule-DUEi6geL.js","./DaeCode-DEjXqvav.js","./daeTokens-BVtuNnWZ.js","./AddCircle-C6Jc7GCc.js","./SearchSelect-BcScGUbQ.js","./SearchList-LjCruZYP.js","./Virtualizer-DMIKG2CD.js","./Toolbar-BTFtduwD.js","./rule-Bl9YOsFn.js","./activity-yZTrGy-J.js","./activity-Db7VRWAG.css","./NumberField-q4-QmTAT.js","./Table-yWn0d3vL.js","./Checkbox-CJt7u9-e.js","./Tabs-DT6MQhIo.js","./ConditionRow-B8Otz3rt.js","./Coverage-8qg_JeNJ.js","./labels-D8xxfRTQ.js","./nav-DG4JD5-H.js","./recorder-BHyqDNp5.js","./geodataUpdate-D9CXpIul.js","./LinkOut-D-cvJjm2.js","./impact-B8feJDtJ.css"])))=>i.map(i=>d[i]);
import{cA as e,cB as n,cC as s,cD as i,cE as l,cF as a,cG as r,bp as t,cH as o,cI as d,cJ as u,cK as c,cL as p,cM as m,cN as f,cO as b,cP as h,cQ as g,cR as v,cS as x,cT as y,cU as k,cV as w,cW as j,cX as S,cY as _,cZ as C,c_ as N,c$ as D,d0 as M,d1 as P,d2 as R,d3 as I,aD as H,d4 as q,d5 as O,aA as E,b7 as L,c2 as A,c4 as F,al as T,Y as V,U as W,H as B,a8 as $,ak as U,a6 as Q,o as G,h as J,r as K,d6 as X,a1 as Y,w as Z,u as z,aK as ee,cw as ne,A as se,l as ie,q as le,bT as ae,aP as re,aQ as te,m as oe,x as de,aO as ue,aM as ce,ab as pe,C as me,bk as fe,bF as be,ch as he,B as ge,aL as ve,cr as xe,cq as ye,p as ke,d7 as we,bG as je,d8 as Se,E as _e,cy as Ce,ax as Ne,b8 as De,aE as Me,cg as Pe,av as Re,T as Ie,c3 as He,c6 as qe,L as Oe,aG as Ee,d9 as Le,_ as Ae}from"./index-HxEUeoab.js";import{r as Fe,$ as Te,j as Ve}from"./vendor-react-64fcanlc.js";import{_ as We,$ as Be,a0 as $e,a1 as Ue,a2 as Qe,a3 as Ge,a4 as Je,a5 as Ke,a6 as Xe,a7 as Ye,a8 as Ze,a9 as ze,aa as en,ab as nn,ac as sn,s as ln}from"./activity-yZTrGy-J.js";import{T as an}from"./Tabs-DT6MQhIo.js";import{D as rn}from"./DaeCode-DEjXqvav.js";import{L as tn}from"./AppearanceControls-sRy1p156.js";import{a as on,c as dn,u as un,y as cn,e as pn,w as mn,h as fn,D as bn,L as hn,S as gn}from"./logs-C4GIy4tX.js";import{T as vn}from"./Toolbar-BTFtduwD.js";import{D as xn}from"./Table-yWn0d3vL.js";import{C as yn,a as kn,E as wn}from"./ConditionRow-B8Otz3rt.js";import{c as jn,C as Sn}from"./Coverage-8qg_JeNJ.js";import{d as _n,b as Cn,c as Nn,e as Dn,B as Mn}from"./rule-Bl9YOsFn.js";import{u as Pn,a as Rn,c as In}from"./flows-dBNkBg79.js";import{W as Hn,s as qn,u as On,b as En,X as Ln,Y as An,f as Fn,c as Tn,Z as Vn,j as Wn,e as Bn,_ as $n,$ as Un,a0 as Qn,a1 as Gn,a2 as Jn,a3 as Kn,r as Xn,a4 as Yn,a5 as Zn,a6 as zn,a7 as es,d as ns,D as ss,a8 as is}from"./nodes-6sIn2I0s.js";import{w as ls}from"./labels-D8xxfRTQ.js";import{r as as}from"./nav-DG4JD5-H.js";import{r as rs}from"./recorder-BHyqDNp5.js";import{g as ts,a as os,b as ds}from"./geodataUpdate-D9CXpIul.js";/* empty css */import{L as us}from"./LinkOut-D-cvJjm2.js";import{S as cs}from"./SearchSelect-BcScGUbQ.js";const ps=new WeakMap;let ms=Math.round(1e10*Math.random()),fs=0;const bs=Fe.createContext(null),hs=Fe.createContext(null),gs=Fe.createContext(null),vs=Fe.forwardRef(function(e,n){[e,n]=g(e,n,bs);let{validationBehavior:l}=v(x)||{},a=e.validationBehavior??l??"native",r=function(e){let n=Fe.useMemo(()=>e.name||`radio-group-${ms}-${++fs}`,[e.name]),[s,i]=b(e.value,e.defaultValue??null,e.onChange),[l]=Fe.useState(s),[a,r]=Fe.useState(null),t=h({...e,value:s}),o=t.displayValidation.isInvalid;return{...t,name:n,selectedValue:s,defaultSelectedValue:void 0!==e.value?l:e.defaultValue??null,setSelectedValue:n=>{e.isReadOnly||e.isDisabled||(i(n),t.commitValidation())},lastFocusedValue:a,setLastFocusedValue:r,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(o?"invalid":null),isInvalid:o}}({...e,validationBehavior:a}),[D,M]=y(!e["aria-label"]&&!e["aria-labelledby"]),{radioGroupProps:P,labelProps:R,descriptionProps:I,errorMessageProps:H,...q}=function(e,n){let{name:l,form:a,isReadOnly:r,isRequired:b,isDisabled:h,orientation:g="vertical",validationBehavior:v="aria"}=e,{direction:x}=t(),{isInvalid:y,validationErrors:k,validationDetails:w}=n.displayValidation,{labelProps:j,fieldProps:S,descriptionProps:_,errorMessageProps:C}=o({...e,labelElementType:"span",isInvalid:n.isInvalid,errorMessage:e.errorMessage||k}),N=i(e,{labelable:!0}),{focusWithinProps:D}=d({onBlurWithin(s){e.onBlur?.(s),n.selectedValue||n.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function M(e,s){let i,l=p(s.currentTarget,{from:f(s),accept:e=>e instanceof m(e).HTMLInputElement&&"radio"===e.type});return"next"===e?(i=l.nextNode(),i||(l.currentNode=s.currentTarget,i=l.firstChild())):(i=l.previousNode(),i||(l.currentNode=s.currentTarget,i=l.lastChild())),!!i&&(i.focus(),n.setSelectedValue(i.value),!0)}let{keyboardProps:P}=u({shortcuts:{ArrowRight:e=>M("rtl"===x&&"vertical"!==g?"prev":"next",e),ArrowLeft:e=>M("rtl"===x&&"vertical"!==g?"next":"prev",e),ArrowDown:e=>M("next",e),ArrowUp:e=>M("prev",e)},allowRepeats:!0}),R=c(l);return ps.set(n,{name:R,form:a,descriptionId:_.id,errorMessageId:C.id,validationBehavior:v}),{radioGroupProps:s(N,{role:"radiogroup",...P,"aria-invalid":n.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":b||void 0,"aria-disabled":h||void 0,"aria-orientation":g,...S,...D}),labelProps:j,descriptionProps:_,errorMessageProps:C,isInvalid:y,validationErrors:k,validationDetails:w}}({...e,label:M,validationBehavior:a},r),O=k({...e,values:{orientation:e.orientation||"vertical",isDisabled:r.isDisabled,isReadOnly:r.isReadOnly,isRequired:r.isRequired,isInvalid:r.isInvalid,state:r},defaultClassName:"react-aria-RadioGroup"}),E=i(e,{global:!0});return Te.createElemeLine truncated
@@ -1 +1 @@
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{r as s,f1 as a,w as i,f2 as r,K as n,bY as o,ak as l,U as d,Y as u,al as p,f3 as c,f4 as m,f5 as f,dH as h,u as g,l as y,q as b,x as j,f6 as v,b5 as K,eY as x,bG as w,B as M,aE as $,E as k,bE as q,af as L,dj as S}from"./index-XeGFdFb3.js";import{$ as _,d as C,a as N}from"./Select-OqnbuzuK.js";import{b as E}from"./ItemText-Bvif-kkw.js";import{i as I,h as Y,c as R,g as T,u as G,e as O}from"./logs-DNePHVHd.js";import{u as A,c as H}from"./flows-CjEC9Jxw.js";import{Y as P}from"./nodes-Bm1vmvln.js";import{c as Q,o as U,p as V,q as W}from"./nav-B6IjqlWU.js";import{d as z}from"./nav-BgyFg1Tl.js";import{r as B,a as F}from"./nav-4iHQTLCW.js";import{f as D}from"./nav-BIicxOIW.js";import{f as J,r as X,g as Z,h as ee}from"./nav-DxD_yNm9.js";import{aT as te,a1 as se,aU as ae}from"./activity-7OeQMmIs.js";import{c as ie}from"./nav-BO8viH9G.js";import{n as re,a as ne}from"./nav-xz-AMjAg.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./AppearanceControls-Q-jHRGz9.js";const oe=e=>s(e,"groups",{whileLoading:!1})&&!0===e?.config.writable?[{id:"policies:new",titleKey:"group.newGroup",parentKey:"nav.policies",route:"policies",params:{new:"1"},aliases:["group editor"]}]:[],le=e=>e.trim().toLowerCase().replace(/\s+/g," "),de=(e,t,s,a,i,r="",n)=>({hit:{id:t,label:s,description:a,route:i,query:r,...n&&{open:n}},keys:[...new Set(e.flatMap(e=>null==e?[]:[le(e)]))]}),ue=(e,t,s,a,i)=>{const{route:r,query:n}=h(i);return de(e,t,s,a,r,n)};function pe(e,t,s){const a=[{title:e(t),parent:s&&e(s)}];for(const i of c)m(i.id)&&a.push({title:f(i.id,t),parent:s&&f(i.id,s)});return a.flatMap(({title:e,parent:t})=>t?[e,t+" "+e]:[e])}function ce(e,t){let s=3;for(const a of e){if(a===t)return 0;a.startsWith(t)?s=1:3===s&&a.includes(t)&&(s=2)}return s}function me(t,m){const f=g(),h=y(),[K,x]=e.useState(""),w=b(),M=w.data?.resources,$=I(void 0,s(M,"connections",{whileLoading:!1})),k=Y(s(M,"nodes",{whileLoading:!1})),q=R(s(M,"groups",{whileLoading:!1})),L=T(s(M,"providers",{whileLoading:!1})),S=G(s(M,"config",{whileLoading:!1})),_=A(s(M,"rules",{whileLoading:!1})),C=H(s(M,"dns_rules",{whileLoading:!1})),N=[w,$,k,q,L,S,_,C],E=O(j().data),me=!!E.globalSettings,[fe,he]=e.useState(0);e.useEffect(()=>{let e=!0;for(const t of c)v(t.id).then(()=>e&&he(e=>e+1),()=>{});return()=>{e=!1}},[]);const ge=e.useMemo(()=>function(e,t,s){const n=t=>r(t,e),o=e?.resources,l=[...ie().map(e=>({path:"connections",params:{tab:e.id},titleKey:e.titleKey})),...re(o).map(e=>({path:"nodes",params:{tab:e.id},titleKey:e.titleKey})),...D(o).map(e=>({path:"flows",params:{tab:e.id},titleKey:e.titleKey})),...B(o).map(e=>({path:"rules",params:{tab:e.id},titleKey:e.titleKey})),...z(o).map(e=>({path:"dns",params:{tab:e.id},titleKey:e.titleKey})),...Q(s,e).map(e=>({path:"config",params:{tab:e.id},titleKey:e.titleKey,aliases:e.aliases})),...J(o).map(e=>({path:"settings",params:{card:e.id},titleKey:e.titleKey,aliases:e.aliases}))],d=e=>a.find(t=>t.path===e).nav.titleKey;return[...a.filter(e=>e.nav&&n(e.path)).map(e=>de(pe(t,e.nav.titleKey),`page:${e.path}?`,t(e.nav.titleKey),void 0,e.path)),...l.filter(e=>n(e.path)).map(e=>{const s=i("",e.params);return de([...pe(t,e.titleKey,d(e.path)),...e.aliases??[]],`page:${e.path}?${s}`,t(e.titleKey),t(d(e.path)),e.path,s)})]}(w.data,f,me),[w.data,f,me,fe]),ye=e.useMemo(()=>function(e,t){const s=e?.resources,a=new Map(J(s).map(e=>[e.id,e])),r=new Set(s?.runtime_settings.available?s.runtime_settings.fields??[]:[]),n=Object.entries(X).filter(([e])=>r.has(e)).map(([e,t])=>({id:e,labelKey:t,card:"runtime",aliases:void 0})),o=Z(s);return[...ee.filter(e=>!e.sources||o),...n].flatMap(e=>{const s=a.get(e.card);return s?[de([...pe(t,e.labelKey),...e.aliases??[]],`setting:${e.id}`,t(e.labelKey),t(s.titleKey),"settings",i("",{card:e.card,field:e.id}))]:[]})}(w.data,f),[w.data,f,fe]),be=e.useMemo(()=>function(e,t,a){return e&&s(t?.resources,"config",{whileLoading:!1})?e.fields.map(e=>de([...pe(a,e.label),e.key],`global:${e.key}`,a(e.label),a(U[e.group]),"config",i("",{tab:"global",field:e.key}))):[]}(E.globalSettings,w.data,f),[E.globalSettings,w.data,f,fe]),je=e.useMemo(()=>function(e,t){const s=e?.resources;return[...F(s),...oe(s),...ne(s),...V(e),...te].filter(t=>null===t.route||r(t.route,e)).map(e=>de([...pe(t,e.titleKey,e.parentKey),...(e.aliasKeys??[]).flatMap(e=>pe(t,e)),...e.aliases??[]],`feature:${e.id}`,t(e.titleKey),e.parentKey&&t(e.parentKey),e.route,i("",e.params??{}),e.open))}(w.data,f),[w.data,f,fe]),ve=e.useMemo(()=>function(e,t,s){return W(e,t,s).map(e=>ue([e.kind,e.summary],`module:${e.id}`,e.kind,e.range,e.href))}(S.data,E,f),[S.data,E,f]),Ke=e.useMemo(()=>function(e,t){return n(e).map(e=>de([e.domain,e.dst,e.src],`connection:${e.id}`,e.domain||e.dst||e.src||e.id,o(e,t),"connections",i("",{id:e.id})))}($.data,f),[$.data,f]),xe=e.useMemo(()=>function(e,t,s){const a=t?.providers??[];return(e??[]).map(e=>ue([e.name],`node:${e.id}`,e.name,l(s,e.group_ids)||void 0,se(e,a,!0)))}(k.data,L.dataLine truncated
import{r as e,j as t}from"./vendor-react-64fcanlc.js";import{r as s,f1 as a,w as i,f2 as r,K as n,bY as o,ak as l,U as d,Y as u,al as p,f3 as c,f4 as m,f5 as f,dH as h,u as g,l as y,q as b,x as j,f6 as v,b5 as K,eY as x,bG as w,B as M,aE as $,E as k,bE as q,af as L,dj as S}from"./index-HxEUeoab.js";import{$ as _,d as C,a as N}from"./Select-D7_6MaHd.js";import{b as E}from"./ItemText-DOD_75iR.js";import{i as I,h as Y,c as R,g as T,u as G,e as O}from"./logs-C4GIy4tX.js";import{u as A,c as H}from"./flows-dBNkBg79.js";import{Y as P}from"./nodes-6sIn2I0s.js";import{c as Q,o as U,p as V,q as W}from"./nav-BMNMQSWb.js";import{d as z}from"./nav-CBqYxt5v.js";import{r as B,a as F}from"./nav-DG4JD5-H.js";import{f as D}from"./nav-CKRufMnz.js";import{f as J,r as X,g as Z,h as ee}from"./nav-D8kaolOs.js";import{aT as te,a1 as se,aU as ae}from"./activity-yZTrGy-J.js";import{c as ie}from"./nav-BO8viH9G.js";import{n as re,a as ne}from"./nav-Bkujhswg.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./AppearanceControls-sRy1p156.js";const oe=e=>s(e,"groups",{whileLoading:!1})&&!0===e?.config.writable?[{id:"policies:new",titleKey:"group.newGroup",parentKey:"nav.policies",route:"policies",params:{new:"1"},aliases:["group editor"]}]:[],le=e=>e.trim().toLowerCase().replace(/\s+/g," "),de=(e,t,s,a,i,r="",n)=>({hit:{id:t,label:s,description:a,route:i,query:r,...n&&{open:n}},keys:[...new Set(e.flatMap(e=>null==e?[]:[le(e)]))]}),ue=(e,t,s,a,i)=>{const{route:r,query:n}=h(i);return de(e,t,s,a,r,n)};function pe(e,t,s){const a=[{title:e(t),parent:s&&e(s)}];for(const i of c)m(i.id)&&a.push({title:f(i.id,t),parent:s&&f(i.id,s)});return a.flatMap(({title:e,parent:t})=>t?[e,t+" "+e]:[e])}function ce(e,t){let s=3;for(const a of e){if(a===t)return 0;a.startsWith(t)?s=1:3===s&&a.includes(t)&&(s=2)}return s}function me(t,m){const f=g(),h=y(),[K,x]=e.useState(""),w=b(),M=w.data?.resources,$=I(void 0,s(M,"connections",{whileLoading:!1})),k=Y(s(M,"nodes",{whileLoading:!1})),q=R(s(M,"groups",{whileLoading:!1})),L=T(s(M,"providers",{whileLoading:!1})),S=G(s(M,"config",{whileLoading:!1})),_=A(s(M,"rules",{whileLoading:!1})),C=H(s(M,"dns_rules",{whileLoading:!1})),N=[w,$,k,q,L,S,_,C],E=O(j().data),me=!!E.globalSettings,[fe,he]=e.useState(0);e.useEffect(()=>{let e=!0;for(const t of c)v(t.id).then(()=>e&&he(e=>e+1),()=>{});return()=>{e=!1}},[]);const ge=e.useMemo(()=>function(e,t,s){const n=t=>r(t,e),o=e?.resources,l=[...ie().map(e=>({path:"connections",params:{tab:e.id},titleKey:e.titleKey})),...re(o).map(e=>({path:"nodes",params:{tab:e.id},titleKey:e.titleKey})),...D(o).map(e=>({path:"flows",params:{tab:e.id},titleKey:e.titleKey})),...B(o).map(e=>({path:"rules",params:{tab:e.id},titleKey:e.titleKey})),...z(o).map(e=>({path:"dns",params:{tab:e.id},titleKey:e.titleKey})),...Q(s,e).map(e=>({path:"config",params:{tab:e.id},titleKey:e.titleKey,aliases:e.aliases})),...J(o).map(e=>({path:"settings",params:{card:e.id},titleKey:e.titleKey,aliases:e.aliases}))],d=e=>a.find(t=>t.path===e).nav.titleKey;return[...a.filter(e=>e.nav&&n(e.path)).map(e=>de(pe(t,e.nav.titleKey),`page:${e.path}?`,t(e.nav.titleKey),void 0,e.path)),...l.filter(e=>n(e.path)).map(e=>{const s=i("",e.params);return de([...pe(t,e.titleKey,d(e.path)),...e.aliases??[]],`page:${e.path}?${s}`,t(e.titleKey),t(d(e.path)),e.path,s)})]}(w.data,f,me),[w.data,f,me,fe]),ye=e.useMemo(()=>function(e,t){const s=e?.resources,a=new Map(J(s).map(e=>[e.id,e])),r=new Set(s?.runtime_settings.available?s.runtime_settings.fields??[]:[]),n=Object.entries(X).filter(([e])=>r.has(e)).map(([e,t])=>({id:e,labelKey:t,card:"runtime",aliases:void 0})),o=Z(s);return[...ee.filter(e=>!e.sources||o),...n].flatMap(e=>{const s=a.get(e.card);return s?[de([...pe(t,e.labelKey),...e.aliases??[]],`setting:${e.id}`,t(e.labelKey),t(s.titleKey),"settings",i("",{card:e.card,field:e.id}))]:[]})}(w.data,f),[w.data,f,fe]),be=e.useMemo(()=>function(e,t,a){return e&&s(t?.resources,"config",{whileLoading:!1})?e.fields.map(e=>de([...pe(a,e.label),e.key],`global:${e.key}`,a(e.label),a(U[e.group]),"config",i("",{tab:"global",field:e.key}))):[]}(E.globalSettings,w.data,f),[E.globalSettings,w.data,f,fe]),je=e.useMemo(()=>function(e,t){const s=e?.resources;return[...F(s),...oe(s),...ne(s),...V(e),...te].filter(t=>null===t.route||r(t.route,e)).map(e=>de([...pe(t,e.titleKey,e.parentKey),...(e.aliasKeys??[]).flatMap(e=>pe(t,e)),...e.aliases??[]],`feature:${e.id}`,t(e.titleKey),e.parentKey&&t(e.parentKey),e.route,i("",e.params??{}),e.open))}(w.data,f),[w.data,f,fe]),ve=e.useMemo(()=>function(e,t,s){return W(e,t,s).map(e=>ue([e.kind,e.summary],`module:${e.id}`,e.kind,e.range,e.href))}(S.data,E,f),[S.data,E,f]),Ke=e.useMemo(()=>function(e,t){return n(e).map(e=>de([e.domain,e.dst,e.src],`connection:${e.id}`,e.domain||e.dst||e.src||e.id,o(e,t),"connections",i("",{id:e.id})))}($.data,f),[$.data,f]),xe=e.useMemo(()=>function(e,t,s){const a=t?.providers??[];return(e??[]).map(e=>ue([e.name],`node:${e.id}`,e.name,l(s,e.group_ids)||void 0,se(e,a,!0)))}(k.data,L.dataLine truncated
@@ -1 +1 @@
import{r as e,j as a}from"./vendor-react-64fcanlc.js";import{ek as t,eX as r,eY as s,bG as l}from"./index-XeGFdFb3.js";import{d as n,e as i}from"./Virtualizer-FvdVRagH.js";function o(a){let r=t({usage:"search",...a}),s=e.useCallback((e,a)=>0===a.length||(e=e.normalize("NFC"),a=a.normalize("NFC"),0===r.compare(e.slice(0,a.length),a)),[r]),l=e.useCallback((e,a)=>0===a.length||(e=e.normalize("NFC"),a=a.normalize("NFC"),0===r.compare(e.slice(-a.length),a)),[r]),n=e.useCallback((e,a)=>{if(0===a.length)return!0;e=e.normalize("NFC");let t=0,s=(a=a.normalize("NFC")).length;for(;t+s<=e.length;t++){let l=e.slice(t,t+s);if(0===r.compare(a,l))return!0}return!1},[r]);return e.useMemo(()=>({startsWith:s,endsWith:l,contains:n}),[s,l,n])}function c({label:e,children:t}){const{contains:c}=o({sensitivity:"base"});return a.jsx(r,{value:null,children:a.jsxs(s,{filter:c,children:[a.jsx(l,{search:!0,label:e,autoFocus:!0,className:"rp-menu-search"}),a.jsx(n,{layout:i,layoutOptions:{estimatedRowHeight:32,estimatedHeadingHeight:26},children:t})]})})}const u=Object.freeze(Object.defineProperty({__proto__:null,SearchList:c},Symbol.toStringTag,{value:"Module"}));export{o as $,c as S,u as a};
import{r as e,j as a}from"./vendor-react-64fcanlc.js";import{ek as t,eX as r,eY as s,bG as l}from"./index-HxEUeoab.js";import{d as n,e as i}from"./Virtualizer-DMIKG2CD.js";function o(a){let r=t({usage:"search",...a}),s=e.useCallback((e,a)=>0===a.length||(e=e.normalize("NFC"),a=a.normalize("NFC"),0===r.compare(e.slice(0,a.length),a)),[r]),l=e.useCallback((e,a)=>0===a.length||(e=e.normalize("NFC"),a=a.normalize("NFC"),0===r.compare(e.slice(-a.length),a)),[r]),n=e.useCallback((e,a)=>{if(0===a.length)return!0;e=e.normalize("NFC");let t=0,s=(a=a.normalize("NFC")).length;for(;t+s<=e.length;t++){let l=e.slice(t,t+s);if(0===r.compare(a,l))return!0}return!1},[r]);return e.useMemo(()=>({startsWith:s,endsWith:l,contains:n}),[s,l,n])}function c({label:e,children:t}){const{contains:c}=o({sensitivity:"base"});return a.jsx(r,{value:null,children:a.jsxs(s,{filter:c,children:[a.jsx(l,{search:!0,label:e,autoFocus:!0,className:"rp-menu-search"}),a.jsx(n,{layout:i,layoutOptions:{estimatedRowHeight:32,estimatedHeadingHeight:26},children:t})]})})}const u=Object.freeze(Object.defineProperty({__proto__:null,SearchList:c},Symbol.toStringTag,{value:"Module"}));export{o as $,c as S,u as a};
@@ -1 +1 @@
import{r as s,j as e}from"./vendor-react-64fcanlc.js";import{cl as a,d4 as l,cn as r,bw as i,d5 as c,co as t,dj as d,b7 as n}from"./index-XeGFdFb3.js";import{b as o,c as p,$ as m,d as j,a as x}from"./Select-OqnbuzuK.js";import{I as h,a as b,b as f}from"./ItemText-Bvif-kkw.js";import{S as u}from"./SearchList-DWooTdFX.js";const N=s=>e.jsxs(x,{id:s.id,className:"rp-item",textValue:s.keywords?`${s.label} ${s.keywords}`:s.label,children:[e.jsx(b,{}),e.jsx(f,{i:s,children:s.desc&&e.jsx(c,{slot:"description",className:n("desc",s.tone),children:s.desc})})]},s.id);function v({label:x,searchLabel:b,sections:f,value:v,onChange:S,isDisabled:g,description:y,side:k,size:w}){const R=s.useRef(null),$=s.useRef(null),z=a(w),C=f.flatMap(s=>s.items).find(s=>s.id===v);return e.jsxs(o,{className:n("rp-picker",k?"rp-cluster":"rp-field"),selectedKey:v,onSelectionChange:s=>{null!=s&&S(String(s))},isDisabled:g,children:[e.jsxs("div",{ref:R,className:k?"rp-cluster":"rp-field",children:[e.jsx(l,{className:k?"rp-label":"lbl",children:x}),e.jsxs(r,{ref:$,className:"rp-selectbtn","data-size":z,children:[e.jsx(p,{children:()=>C?e.jsx(h,{i:C}):v}),e.jsx(i,{})]})]}),y&&e.jsx(c,{slot:"description",className:"rp-label",children:y}),e.jsx(t,{className:"rp-popover rp-search-popover",placement:"bottom start",triggerRef:k?$:R,children:e.jsx(u,{label:b,children:e.jsx(m,{className:"rp-menu-scroll rp-overlay-scroll",children:f.map(s=>s.title?e.jsxs(j,{id:s.id,children:[e.jsx(d,{className:"rp-sec-h",children:s.title}),s.items.map(N)]},s.id):s.items.map(N))})})})]})}export{v as S};
import{r as s,j as e}from"./vendor-react-64fcanlc.js";import{cm as a,d4 as l,cl as r,bw as i,d5 as c,co as t,dj as d,b7 as n}from"./index-HxEUeoab.js";import{b as o,c as m,$ as p,d as j,a as x}from"./Select-D7_6MaHd.js";import{I as h,a as b,b as f}from"./ItemText-DOD_75iR.js";import{S as u}from"./SearchList-LjCruZYP.js";const N=s=>e.jsxs(x,{id:s.id,className:"rp-item",textValue:s.keywords?`${s.label} ${s.keywords}`:s.label,children:[e.jsx(b,{}),e.jsx(f,{i:s,children:s.desc&&e.jsx(c,{slot:"description",className:n("desc",s.tone),children:s.desc})})]},s.id);function v({label:x,searchLabel:b,sections:f,value:v,onChange:S,isDisabled:g,description:y,side:k,size:w}){const R=s.useRef(null),$=s.useRef(null),z=a(w),C=f.flatMap(s=>s.items).find(s=>s.id===v);return e.jsxs(o,{className:n("rp-picker",k?"rp-cluster":"rp-field"),selectedKey:v,onSelectionChange:s=>{null!=s&&S(String(s))},isDisabled:g,children:[e.jsxs("div",{ref:R,className:k?"rp-cluster":"rp-field",children:[e.jsx(l,{className:k?"rp-label":"lbl",children:x}),e.jsxs(r,{ref:$,className:"rp-selectbtn","data-size":z,children:[e.jsx(m,{children:()=>C?e.jsx(h,{i:C}):v}),e.jsx(i,{})]})]}),y&&e.jsx(c,{slot:"description",className:"rp-label",children:y}),e.jsx(t,{className:"rp-popover rp-search-popover",placement:"bottom start",triggerRef:k?$:R,children:e.jsx(u,{label:b,children:e.jsx(p,{className:"rp-menu-scroll rp-overlay-scroll",children:f.map(s=>s.title?e.jsxs(j,{id:s.id,children:[e.jsx(d,{className:"rp-sec-h",children:s.title}),s.items.map(N)]},s.id):s.items.map(N))})})})]})}export{v as S};
@@ -1 +1 @@
import{bp as e,cD as t,fG as l,cI as o,cK as a,du as s,cC as i,fH as r,fI as n,dY as c,eB as d,d3 as u,eu as p,dZ as g,ek as f,eI as y,fJ as v,cJ as m,fK as b,cH as h,el as D,dx as P,eA as M,cE as S,cF as K,cN as E,em as k,eD as C,eF as F,eE as B,cQ as x,e3 as I,e0 as R,eL as w,fL as A,e1 as V,fM as T,c$ as O,fN as U,cU as H,cV as L,cW as z,cY as N,e2 as q,eO as W,eH as _,e6 as j,d2 as $,eK as Z,fO as G,fP as J,c_ as Q,cT as Y,fQ as X,eT as ee,eU as te,ea as le,fR as oe,cO as ae,cP as se,e4 as ie,cR as re,en as ne,cS as ce,d1 as de,cX as ue,eN as pe,fS as ge,fT as fe,cZ as ye}from"./index-XeGFdFb3.js";import{r as ve,$ as me}from"./vendor-react-64fcanlc.js";const be=new WeakMap;function he(e,l,o){let{key:a}=e,s=be.get(l),f=e.isDisabled??l.selectionManager.isDisabled(a),y=e.isSelected??l.selectionManager.isSelected(a),v=e.shouldSelectOnPressUp??s?.shouldSelectOnPressUp,m=e.shouldFocusOnHover??s?.shouldFocusOnHover,b=e.shouldUseVirtualFocus??s?.shouldUseVirtualFocus,h=e.isVirtualized??s?.isVirtualized,D=r(),P=r(),M={role:"option","aria-disabled":f||void 0,"aria-selected":"none"!==l.selectionManager.selectionMode?y:void 0,"aria-label":e["aria-label"],"aria-labelledby":D,"aria-describedby":P},S=l.collection.getItem(a);if(h){let e=Number(S?.index);M["aria-posinset"]=Number.isNaN(e)?void 0:e+1,M["aria-setsize"]=n(l.collection)}let K=s?.onAction?()=>s?.onAction?.(a):void 0,E=function(e,t){let l=be.get(e);if(!l)throw new Error("Unknown list");return`${l.id}-option-${o=t,"string"==typeof o?o.replace(/\s*/g,""):""+o}`;var o}(l,a),{itemProps:k,isPressed:C,isFocused:F,hasAction:B,allowsSelection:x}=c({selectionManager:l.selectionManager,key:a,ref:o,shouldSelectOnPressUp:v,allowsDifferentPressOrigin:v&&m,isVirtualized:h,shouldUseVirtualFocus:b,isDisabled:f,onAction:K||S?.props?.onAction?d(S?.props?.onAction,K):void 0,linkBehavior:s?.linkBehavior,UNSTABLE_itemBehavior:s?.UNSTABLE_itemBehavior,id:E}),{hoverProps:I}=u({isDisabled:f||!m,onHoverStart(){p()||(l.selectionManager.setFocused(!0),l.selectionManager.setFocusedKey(a))}}),R=t(S?.props);delete R.id;let w=g(S?.props);return{optionProps:{...M,...i(R,k,I,w),id:E},labelProps:{id:D},descriptionProps:{id:P},isFocused:F,isFocusVisible:F&&l.selectionManager.isFocused&&p(),isSelected:y,isDisabled:f,isPressed:C,allowsSelection:x,hasAction:B}}const De=new WeakMap;function Pe(e){let{state:t,triggerRef:l,label:o,name:a,form:s,isDisabled:i}=e,r=ve.useRef(null),n=ve.useRef(null),{containerProps:c,selectProps:d}=function(e,t,l){let o=De.get(t)||{},{autoComplete:a,name:s=o.name,form:i=o.form,isDisabled:r=o.isDisabled}=e,{validationBehavior:n,isRequired:c}=o,{visuallyHiddenProps:d}=M({style:{position:"fixed",top:0,left:0}});S(e.selectRef,t.defaultValue,t.setValue),K({validationBehavior:n,focus:()=>l.current?.focus()},t,e.selectRef);let u=t.setValue,p=ve.useCallback(e=>{let t=E(e);t.multiple?u(Array.from(t.selectedOptions,e=>e.value)):u(e.currentTarget.value)},[u]);return{containerProps:{...d,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:a,disabled:r,multiple:"multiple"===t.selectionManager.selectionMode,required:"native"===n&&c,name:s,form:i,value:t.value??"",onChange:p,onInput:p}}}({...e,selectRef:t.collection.size<=300?r:n},t,l),u=Array.isArray(t.value)?t.value:[t.value];if(t.collection.size<=300)return me.createElement("div",{...c,"data-testid":"hidden-select-container"},me.createElement("label",null,o,me.createElement("select",{...d,ref:r},me.createElement("option",{value:"",label:" "}," "),[...t.collection.getKeys()].map(e=>{let l=t.collection.getItem(e);if(l&&"item"===l.type)return me.createElement("option",{key:l.key,value:l.key},l.textValue)}),0===t.collection.size&&a&&u.map((e,t)=>me.createElement("option",{key:t,value:e??""})))));if(a){let e=De.get(t)||{},{validationBehavior:l}=e;0===u.length&&(u=[null]);let o=u.map((e,t)=>{let o={type:"hidden",autoComplete:d.autoComplete,name:a,form:s,disabled:i,value:e??""};return"native"===l?me.createElement("input",{key:t,...o,ref:0===t?n:null,style:{display:"none"},type:"text",required:0===t&&d.required,onChange:()=>{}}):me.createElement("input",{key:t,...o,ref:0===t?n:null})});return me.createElement(me.Fragment,null,o)}return null}var Me;Me={"ar-AE":k,"bg-BG":k,"cs-CZ":k,"da-DK":k,"de-DE":k,"el-GR":k,"en-US":{selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"},"es-ES":k,"et-EE":k,"fi-FI":k,"fr-FR":k,"he-IL":k,"hr-HR":k,"hu-HU":k,"it-IT":k,"ja-JP":k,"ko-KR":k,"lt-LT":k,"lv-LV":k,"nb-NO":k,"nl-NL":k,"pl-PL":k,"pt-BR":k,"pt-PT":k,"ro-RO":k,"ru-RU":k,"sk-SK":k,"sl-SI":k,"sr-SP":k,"sv-SE":k,"tr-TR":k,"uk-UA":k,"zh-CN":{colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"},"zh-TW":{colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizeLine truncated
import{bp as e,cD as t,fG as l,cI as o,cK as a,du as s,cC as i,fH as r,fI as n,dY as c,eB as d,d3 as u,eu as p,dZ as g,ek as f,eI as y,fJ as v,cJ as m,fK as b,cH as h,el as D,dx as P,eA as M,cE as S,cF as K,cN as E,em as k,eD as C,eF as F,eE as B,cQ as x,e3 as I,e0 as R,eL as w,fL as A,e1 as V,fM as T,c$ as O,fN as U,cU as H,cV as L,cW as z,cY as N,e2 as q,eO as W,eH as _,e6 as j,d2 as $,eK as Z,fO as G,fP as J,c_ as Q,cT as Y,fQ as X,eT as ee,eU as te,ea as le,fR as oe,cO as ae,cP as se,e4 as ie,cR as re,en as ne,cS as ce,d1 as de,cX as ue,eN as pe,fS as ge,fT as fe,cZ as ye}from"./index-HxEUeoab.js";import{r as ve,$ as me}from"./vendor-react-64fcanlc.js";const be=new WeakMap;function he(e,l,o){let{key:a}=e,s=be.get(l),f=e.isDisabled??l.selectionManager.isDisabled(a),y=e.isSelected??l.selectionManager.isSelected(a),v=e.shouldSelectOnPressUp??s?.shouldSelectOnPressUp,m=e.shouldFocusOnHover??s?.shouldFocusOnHover,b=e.shouldUseVirtualFocus??s?.shouldUseVirtualFocus,h=e.isVirtualized??s?.isVirtualized,D=r(),P=r(),M={role:"option","aria-disabled":f||void 0,"aria-selected":"none"!==l.selectionManager.selectionMode?y:void 0,"aria-label":e["aria-label"],"aria-labelledby":D,"aria-describedby":P},S=l.collection.getItem(a);if(h){let e=Number(S?.index);M["aria-posinset"]=Number.isNaN(e)?void 0:e+1,M["aria-setsize"]=n(l.collection)}let K=s?.onAction?()=>s?.onAction?.(a):void 0,E=function(e,t){let l=be.get(e);if(!l)throw new Error("Unknown list");return`${l.id}-option-${o=t,"string"==typeof o?o.replace(/\s*/g,""):""+o}`;var o}(l,a),{itemProps:k,isPressed:C,isFocused:F,hasAction:B,allowsSelection:x}=c({selectionManager:l.selectionManager,key:a,ref:o,shouldSelectOnPressUp:v,allowsDifferentPressOrigin:v&&m,isVirtualized:h,shouldUseVirtualFocus:b,isDisabled:f,onAction:K||S?.props?.onAction?d(S?.props?.onAction,K):void 0,linkBehavior:s?.linkBehavior,UNSTABLE_itemBehavior:s?.UNSTABLE_itemBehavior,id:E}),{hoverProps:I}=u({isDisabled:f||!m,onHoverStart(){p()||(l.selectionManager.setFocused(!0),l.selectionManager.setFocusedKey(a))}}),R=t(S?.props);delete R.id;let w=g(S?.props);return{optionProps:{...M,...i(R,k,I,w),id:E},labelProps:{id:D},descriptionProps:{id:P},isFocused:F,isFocusVisible:F&&l.selectionManager.isFocused&&p(),isSelected:y,isDisabled:f,isPressed:C,allowsSelection:x,hasAction:B}}const De=new WeakMap;function Pe(e){let{state:t,triggerRef:l,label:o,name:a,form:s,isDisabled:i}=e,r=ve.useRef(null),n=ve.useRef(null),{containerProps:c,selectProps:d}=function(e,t,l){let o=De.get(t)||{},{autoComplete:a,name:s=o.name,form:i=o.form,isDisabled:r=o.isDisabled}=e,{validationBehavior:n,isRequired:c}=o,{visuallyHiddenProps:d}=M({style:{position:"fixed",top:0,left:0}});S(e.selectRef,t.defaultValue,t.setValue),K({validationBehavior:n,focus:()=>l.current?.focus()},t,e.selectRef);let u=t.setValue,p=ve.useCallback(e=>{let t=E(e);t.multiple?u(Array.from(t.selectedOptions,e=>e.value)):u(e.currentTarget.value)},[u]);return{containerProps:{...d,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:a,disabled:r,multiple:"multiple"===t.selectionManager.selectionMode,required:"native"===n&&c,name:s,form:i,value:t.value??"",onChange:p,onInput:p}}}({...e,selectRef:t.collection.size<=300?r:n},t,l),u=Array.isArray(t.value)?t.value:[t.value];if(t.collection.size<=300)return me.createElement("div",{...c,"data-testid":"hidden-select-container"},me.createElement("label",null,o,me.createElement("select",{...d,ref:r},me.createElement("option",{value:"",label:" "}," "),[...t.collection.getKeys()].map(e=>{let l=t.collection.getItem(e);if(l&&"item"===l.type)return me.createElement("option",{key:l.key,value:l.key},l.textValue)}),0===t.collection.size&&a&&u.map((e,t)=>me.createElement("option",{key:t,value:e??""})))));if(a){let e=De.get(t)||{},{validationBehavior:l}=e;0===u.length&&(u=[null]);let o=u.map((e,t)=>{let o={type:"hidden",autoComplete:d.autoComplete,name:a,form:s,disabled:i,value:e??""};return"native"===l?me.createElement("input",{key:t,...o,ref:0===t?n:null,style:{display:"none"},type:"text",required:0===t&&d.required,onChange:()=>{}}):me.createElement("input",{key:t,...o,ref:0===t?n:null})});return me.createElement(me.Fragment,null,o)}return null}var Me;Me={"ar-AE":k,"bg-BG":k,"cs-CZ":k,"da-DK":k,"de-DE":k,"el-GR":k,"en-US":{selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"},"es-ES":k,"et-EE":k,"fi-FI":k,"fr-FR":k,"he-IL":k,"hr-HR":k,"hu-HU":k,"it-IT":k,"ja-JP":k,"ko-KR":k,"lt-LT":k,"lv-LV":k,"nb-NO":k,"nl-NL":k,"pl-PL":k,"pt-BR":k,"pt-PT":k,"ro-RO":k,"ru-RU":k,"sk-SK":k,"sl-SI":k,"sr-SP":k,"sv-SE":k,"tr-TR":k,"uk-UA":k,"zh-CN":{colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"},"zh-TW":{colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizeLine truncated
@@ -1 +1 @@
import{r as e,$ as t,j as s,a}from"./vendor-react-64fcanlc.js";import{du as n,bp as i,dv as r,dw as l,dx as o,cC as d,dy as c,cJ as u,cB as g,cE as p,cN as m,dz as f,cO as h,cQ as b,dA as v,cT as x,cU as j,cD as y,cW as w,cX as k,cV as N,d3 as C,cR as S,d2 as P,aD as T,c$ as _,dB as D,dC as R,dj as I,d5 as E,B as F,cl as M,d4 as V,u as L,bk as H,ch as U,dD as O,a0 as A,ak as q,h as B,m as z,Y as K,aM as $,dE as W,dF as G,dG as Y,cw as X,de as J,bD as Q,bz as Z,A as ee,bB as te,dH as se,bK as ae,dI as ne,bC as ie,dJ as re,s as le,dK as oe,q as de,x as ce,ap as ue,dL as ge,dM as pe,dN as me,dO as fe,dP as he,c9 as be,al as ve,l as xe,bT as je,r as ye,bI as we,U as ke,bP as Ne,aK as Ce,C as Se,E as Pe,ae as Te,S as _e,a as De,b as Re,bF as Ie,p as Ee,cg as Fe,df as Me,aO as Ve,aZ as Le,dQ as He,dR as Ue,aA as Oe,T as Ae,aL as qe,bG as Be,bw as ze,dS as Ke,dT as $e,dU as We,dV as Ge,w as Ye}from"./index-XeGFdFb3.js";import{L as Xe}from"./AppearanceControls-Q-jHRGz9.js";import{$ as Je,e as Qe,L as Ze,y as et,c as tt,D as st,K as at,F as nt,T as it,U as rt,G as lt}from"./logs-DNePHVHd.js";import{T as ot}from"./Tabs-BGWzF0yW.js";import{T as dt}from"./Toolbar-CFyWgMbW.js";import{$ as ct,d as ut,a as gt}from"./Select-OqnbuzuK.js";import{C as pt}from"./ItemText-Bvif-kkw.js";import{u as mt,s as ft,M as ht,w as bt,D as vt}from"./wallpaper-CEC7gitM.js";import{d as xt,c as jt}from"./auth-5ngSjiJI.js";import{g as yt,r as wt,c as kt,s as Nt,a as Ct,b as St,d as Pt,e as Tt}from"./nav-DxD_yNm9.js";import{N as _t,t as Dt,n as Rt}from"./NumberField-Bo9iJ94r.js";import{aQ as It,aR as Et,aS as Ft}from"./activity-7OeQMmIs.js";import{D as Mt}from"./Table-DqqJleJD.js";import{T as Vt}from"./TimeCell-B6QtVZge.js";import{a as Lt}from"./geodataUpdate-Blcy6CRD.js";import{g as Ht,v as Ut}from"./geodata-X0pHz03D.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./Checkbox-BewExwKL.js";import"./Virtualizer-FvdVRagH.js";const Ot=new WeakMap;function At(e,t){let s=Ot.get(e);if(!s)throw new Error("Unknown slider state");return`${s.id}-${t}`}const qt=0,Bt=100,zt=1;function Kt(t){const{isDisabled:s=!1,minValue:a=qt,maxValue:n=Bt,numberFormatter:i,step:r=zt,orientation:o="horizontal"}=t;let d=e.useMemo(()=>{let e=(n-a)/10;return e=f(e,0,e+r,r),Math.max(e,r)},[r,n,a]),c=e.useCallback(e=>e?.map((t,s)=>{let i=0===s?a:e[s-1],l=s===e.length-1?n:e[s+1];return f(t,i,l,r)}),[a,n,r]),u=e.useMemo(()=>c(Wt(t.value)),[t.value,c]),g=e.useMemo(()=>c(Wt(t.defaultValue)??[a]),[t.defaultValue,a,c]),p=Gt(t.value,t.defaultValue,t.onChange),m=Gt(t.value,t.defaultValue,t.onChangeEnd);const[b,v]=h(u,g,p);let[x]=e.useState(b);const[j,y]=e.useState(new Array(b.length).fill(!1)),w=e.useRef(new Array(b.length).fill(!0)),[k,N]=e.useState(void 0),C=e.useRef(b),S=e.useRef(j);function P(e){return(e-a)/(n-a)}function T(e){return 0===e?a:b[e-1]}function _(e){return e===b.length-1?n:b[e+1]}function D(e){return w.current[e]}function R(e,t){if(s||!D(e))return;const a=T(e),n=_(e);t=f(t,a,n,r);let i=$t(C.current,e,t);var l;l=i,C.current=l,v(l)}let I=e.useRef(null);function E(e=b){switch("number"==typeof e&&(e=[e]),e.length){case 0:return"";case 1:return i.format(e[0]);case 2:return i.formatRange(e[0],e[1]);default:{let t=e.map(e=>i.format(e)),s=I.current;return s&&s.resolvedOptions().locale===i.resolvedOptions().locale||(s=I.current=new Intl.ListFormat(i.resolvedOptions().locale,{type:"unit"})),s.format(t)}}}function F(e){return l((t=e*(n-a)+a,Math.round((t-a)/r)*r+a),a,n);var t}return{values:b,defaultValues:void 0!==t.defaultValue?g:x,getThumbValue:e=>b[e],setThumbValue:R,setThumbPercent:function(e,t){R(e,F(t))},isThumbDragging:e=>j[e],setThumbDragging:function(e,t){if(s||!D(e))return;t&&(C.current=b);const a=S.current[e];var n;S.current=$t(S.current,e,t),n=S.current,S.current=n,y(n),m&&a&&!S.current.some(Boolean)&&m(C.current)},focusedThumb:k,setFocusedThumb:N,getThumbPercent:e=>P(b[e]),getValuePercent:P,getThumbValueLabel:e=>E(b[e]),getFormattedValue:E,getThumbMinValue:T,getThumbMaxValue:_,getPercentValue:F,isThumbEditable:D,setThumbEditable:function(e,t){w.current[e]=t},incrementThumb:function(e,t=1){let s=Math.max(t,r);R(e,f(b[e]+s,a,n,r))},decrementThumb:function(e,t=1){let s=Math.max(t,r);R(e,f(b[e]-s,a,n,r))},step:r,pageSize:d,orientation:o,isDisabled:s}}function $t(e,t,s){return e[t]===s?e:[...e.slice(0,t),s,...e.slice(t+1)]}function Wt(e){if(null!=e)return Array.isArray(e)?e:[e]}function Gt(e,t,s){return a=>{s?.("number"==typeof e||"number"==typeof t?a[0]:a)}}const Yt=e.createContext(null),Xt=e.createContext(null),Jt=e.createContext(null),Qt=e.createContext(null),Zt=e.forwardRef(function(s,a){[s,a]=b(s,a,Yt);let c=e.useRef(null),u=v(s.formatOptions),g=Kt({...s,numberFormatter:u}),[p,m]=x(!s["aria-label"]&&!s["aria-labelledby"]),{groupProps:f,trackProps:h,labelProps:C,outputProps:S}=function(t,s,a){let{labelProps:c,fieldProps:u}=n(t),g="vertical"===t.orientation;Ot.set(s,{id:c.id??u.id,"aria-describedby":t["aria-describedby"],"aria-details":t["Line truncated
import{r as e,$ as t,j as s,a}from"./vendor-react-64fcanlc.js";import{du as n,bp as i,dv as r,dw as l,dx as o,cC as d,dy as c,cJ as u,cB as g,cE as p,cN as m,dz as f,cO as h,cQ as b,dA as v,cT as x,cU as j,cD as y,cW as w,cX as k,cV as N,d3 as C,cR as S,d2 as P,aD as T,c$ as _,dB as D,dC as R,dj as I,d5 as E,B as F,cm as M,d4 as V,u as L,bk as H,ch as U,dD as O,a0 as A,ak as q,h as B,m as z,Y as K,aM as $,dE as W,dF as G,dG as Y,cw as X,de as J,bD as Q,bz as Z,A as ee,bB as te,dH as se,bK as ae,dI as ne,bC as ie,dJ as re,s as le,dK as oe,q as de,x as ce,ap as ue,dL as ge,dM as pe,dN as me,dO as fe,dP as he,c9 as be,al as ve,l as xe,bT as je,r as ye,bI as we,U as ke,bP as Ne,aK as Ce,C as Se,E as Pe,ae as Te,S as _e,a as De,b as Re,bF as Ie,p as Ee,cg as Fe,df as Me,aO as Ve,aZ as Le,dQ as He,dR as Ue,aA as Oe,T as Ae,aL as qe,bG as Be,bw as ze,dS as Ke,dT as $e,dU as We,dV as Ge,w as Ye}from"./index-HxEUeoab.js";import{L as Xe}from"./AppearanceControls-sRy1p156.js";import{$ as Je,e as Qe,L as Ze,y as et,c as tt,D as st,K as at,F as nt,T as it,U as rt,G as lt}from"./logs-C4GIy4tX.js";import{T as ot}from"./Tabs-DT6MQhIo.js";import{T as dt}from"./Toolbar-BTFtduwD.js";import{$ as ct,d as ut,a as gt}from"./Select-D7_6MaHd.js";import{C as pt}from"./ItemText-DOD_75iR.js";import{u as mt,s as ft,M as ht,w as bt,D as vt}from"./wallpaper-CEC7gitM.js";import{d as xt,c as jt}from"./auth-CSMbhh2E.js";import{g as yt,r as wt,c as kt,s as Nt,a as Ct,b as St,d as Pt,e as Tt}from"./nav-D8kaolOs.js";import{N as _t,t as Dt,n as Rt}from"./NumberField-q4-QmTAT.js";import{aQ as It,aR as Et,aS as Ft}from"./activity-yZTrGy-J.js";import{D as Mt}from"./Table-yWn0d3vL.js";import{T as Vt}from"./TimeCell-BIqfL3y_.js";import{a as Lt}from"./geodataUpdate-D9CXpIul.js";import{g as Ht,v as Ut}from"./geodata-X0pHz03D.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./Checkbox-CJt7u9-e.js";import"./Virtualizer-DMIKG2CD.js";const Ot=new WeakMap;function At(e,t){let s=Ot.get(e);if(!s)throw new Error("Unknown slider state");return`${s.id}-${t}`}const qt=0,Bt=100,zt=1;function Kt(t){const{isDisabled:s=!1,minValue:a=qt,maxValue:n=Bt,numberFormatter:i,step:r=zt,orientation:o="horizontal"}=t;let d=e.useMemo(()=>{let e=(n-a)/10;return e=f(e,0,e+r,r),Math.max(e,r)},[r,n,a]),c=e.useCallback(e=>e?.map((t,s)=>{let i=0===s?a:e[s-1],l=s===e.length-1?n:e[s+1];return f(t,i,l,r)}),[a,n,r]),u=e.useMemo(()=>c(Wt(t.value)),[t.value,c]),g=e.useMemo(()=>c(Wt(t.defaultValue)??[a]),[t.defaultValue,a,c]),p=Gt(t.value,t.defaultValue,t.onChange),m=Gt(t.value,t.defaultValue,t.onChangeEnd);const[b,v]=h(u,g,p);let[x]=e.useState(b);const[j,y]=e.useState(new Array(b.length).fill(!1)),w=e.useRef(new Array(b.length).fill(!0)),[k,N]=e.useState(void 0),C=e.useRef(b),S=e.useRef(j);function P(e){return(e-a)/(n-a)}function T(e){return 0===e?a:b[e-1]}function _(e){return e===b.length-1?n:b[e+1]}function D(e){return w.current[e]}function R(e,t){if(s||!D(e))return;const a=T(e),n=_(e);t=f(t,a,n,r);let i=$t(C.current,e,t);var l;l=i,C.current=l,v(l)}let I=e.useRef(null);function E(e=b){switch("number"==typeof e&&(e=[e]),e.length){case 0:return"";case 1:return i.format(e[0]);case 2:return i.formatRange(e[0],e[1]);default:{let t=e.map(e=>i.format(e)),s=I.current;return s&&s.resolvedOptions().locale===i.resolvedOptions().locale||(s=I.current=new Intl.ListFormat(i.resolvedOptions().locale,{type:"unit"})),s.format(t)}}}function F(e){return l((t=e*(n-a)+a,Math.round((t-a)/r)*r+a),a,n);var t}return{values:b,defaultValues:void 0!==t.defaultValue?g:x,getThumbValue:e=>b[e],setThumbValue:R,setThumbPercent:function(e,t){R(e,F(t))},isThumbDragging:e=>j[e],setThumbDragging:function(e,t){if(s||!D(e))return;t&&(C.current=b);const a=S.current[e];var n;S.current=$t(S.current,e,t),n=S.current,S.current=n,y(n),m&&a&&!S.current.some(Boolean)&&m(C.current)},focusedThumb:k,setFocusedThumb:N,getThumbPercent:e=>P(b[e]),getValuePercent:P,getThumbValueLabel:e=>E(b[e]),getFormattedValue:E,getThumbMinValue:T,getThumbMaxValue:_,getPercentValue:F,isThumbEditable:D,setThumbEditable:function(e,t){w.current[e]=t},incrementThumb:function(e,t=1){let s=Math.max(t,r);R(e,f(b[e]+s,a,n,r))},decrementThumb:function(e,t=1){let s=Math.max(t,r);R(e,f(b[e]-s,a,n,r))},step:r,pageSize:d,orientation:o,isDisabled:s}}function $t(e,t,s){return e[t]===s?e:[...e.slice(0,t),s,...e.slice(t+1)]}function Wt(e){if(null!=e)return Array.isArray(e)?e:[e]}function Gt(e,t,s){return a=>{s?.("number"==typeof e||"number"==typeof t?a[0]:a)}}const Yt=e.createContext(null),Xt=e.createContext(null),Jt=e.createContext(null),Qt=e.createContext(null),Zt=e.forwardRef(function(s,a){[s,a]=b(s,a,Yt);let c=e.useRef(null),u=v(s.formatOptions),g=Kt({...s,numberFormatter:u}),[p,m]=x(!s["aria-label"]&&!s["aria-labelledby"]),{groupProps:f,trackProps:h,labelProps:C,outputProps:S}=function(t,s,a){let{labelProps:c,fieldProps:u}=n(t),g="vertical"===t.orientation;Ot.set(s,{id:c.id??u.id,"aria-describedby":t["aria-describedby"],"aria-details":t["Line truncated
@@ -1 +1 @@
import{r as t,j as e}from"./vendor-react-64fcanlc.js";import{f as s,g3 as i}from"./index-XeGFdFb3.js";import{a,aW as r,aX as o,aY as l,a$ as n,b0 as h,b1 as d}from"./activity-7OeQMmIs.js";import{G as m,C as c}from"./AreaCurve-DQSHOSpG.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-Bm1vmvln.js";import"./AppearanceControls-Q-jHRGz9.js";import"./ItemText-Bvif-kkw.js";import"./logs-DNePHVHd.js";import"./Select-OqnbuzuK.js";import"./array-C0VuvQyb.js";function u({values:u,timestamps:p,color:x,fmt:j,locale:f,height:y=32,floor:g=0,inset:v=0,lines:w}){const M=t.useId(),b=a(),[k,C]=t.useState(null),[$,A]=s(Math.round,120),{tip:W,showAt:I,hide:L}=r(),P=t.useMemo(()=>u.filter(t=>null!==t),[u]),S=P.length>1,T=t.useMemo(()=>[g>0?0:.85*Math.min(...P),Math.max(1.05*Math.max(...P)||1,g)],[P,g]),B=A?.width??0,D=(A?.height??y)-2,E=t.useMemo(()=>{const t=[Math.min(...p),Math.max(...p)];return p.map(e=>o(e,t,[v,Math.max(v,B-v)]))},[p,B,v]),F=t.useCallback(t=>o(t,T,[D,2]),[T,D]),G=t.useMemo(()=>u.map((t,e)=>null===t?null:{x:E[e],y:F(t)}),[u,E,F]);return t.useLayoutEffect(()=>{null!==k&&null!=u[k]&&j&&f&&$.current&&A?I({x:E[k],y:F(u[k]),width:A.width,bounds:l($.current),label:i(f).format(p[k]),lines:w?.(k)??[j(u[k])]}):L()}),e.jsxs("div",{ref:$,style:{height:`var(--rp-spark-fill, ${y}px)`,width:"100%",position:"relative"},"aria-hidden":!!S||void 0,onPointerLeave:()=>C(null),children:[A&&!S&&e.jsx("svg",{"aria-hidden":!0,width:A.width,height:A.height,style:{display:"block",position:"absolute",inset:0},children:e.jsx("line",{x1:v,x2:A.width-v,y1:D,y2:D,stroke:b["hl-med"],strokeDasharray:"2 4"})}),S&&A&&e.jsxs(e.Fragment,{children:[e.jsx(n,{tip:W}),e.jsxs("svg",{className:"rp-activity-surface",width:A.width,height:A.height,viewBox:`0 0 ${A.width} ${A.height}`,style:{display:"block",position:"absolute",inset:0},onPointerMove:t=>{const e=h(t,t.currentTarget,A);C(e.x<0||e.x>A.width||e.y<2||e.y>A.height-2?null:d(E,e.x))},children:[e.jsx("defs",{children:e.jsx(m,{id:M,color:x})}),e.jsx(c,{points:G,baseline:F(Math.max(0,T[0])),color:x,id:M,strokeWidth:1.5}),null!==k&&null!=u[k]&&e.jsx("circle",{cx:E[k],cy:F(u[k]),r:4,fill:x,stroke:b.base,strokeWidth:2})]})]})]})}export{u as SparkPlot};
import{r as t,j as e}from"./vendor-react-64fcanlc.js";import{f as s,g3 as i}from"./index-HxEUeoab.js";import{a,aW as r,aX as o,aY as l,a$ as n,b0 as h,b1 as d}from"./activity-yZTrGy-J.js";import{G as m,C as c}from"./AreaCurve-DQSHOSpG.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./nodes-6sIn2I0s.js";import"./AppearanceControls-sRy1p156.js";import"./ItemText-DOD_75iR.js";import"./logs-C4GIy4tX.js";import"./Select-D7_6MaHd.js";import"./array-C0VuvQyb.js";function u({values:u,timestamps:p,color:x,fmt:j,locale:f,height:y=32,floor:g=0,inset:v=0,lines:w}){const M=t.useId(),b=a(),[k,C]=t.useState(null),[$,A]=s(Math.round,120),{tip:W,showAt:I,hide:L}=r(),P=t.useMemo(()=>u.filter(t=>null!==t),[u]),S=P.length>1,T=t.useMemo(()=>[g>0?0:.85*Math.min(...P),Math.max(1.05*Math.max(...P)||1,g)],[P,g]),B=A?.width??0,D=(A?.height??y)-2,E=t.useMemo(()=>{const t=[Math.min(...p),Math.max(...p)];return p.map(e=>o(e,t,[v,Math.max(v,B-v)]))},[p,B,v]),F=t.useCallback(t=>o(t,T,[D,2]),[T,D]),G=t.useMemo(()=>u.map((t,e)=>null===t?null:{x:E[e],y:F(t)}),[u,E,F]);return t.useLayoutEffect(()=>{null!==k&&null!=u[k]&&j&&f&&$.current&&A?I({x:E[k],y:F(u[k]),width:A.width,bounds:l($.current),label:i(f).format(p[k]),lines:w?.(k)??[j(u[k])]}):L()}),e.jsxs("div",{ref:$,style:{height:`var(--rp-spark-fill, ${y}px)`,width:"100%",position:"relative"},"aria-hidden":!!S||void 0,onPointerLeave:()=>C(null),children:[A&&!S&&e.jsx("svg",{"aria-hidden":!0,width:A.width,height:A.height,style:{display:"block",position:"absolute",inset:0},children:e.jsx("line",{x1:v,x2:A.width-v,y1:D,y2:D,stroke:b["hl-med"],strokeDasharray:"2 4"})}),S&&A&&e.jsxs(e.Fragment,{children:[e.jsx(n,{tip:W}),e.jsxs("svg",{className:"rp-activity-surface",width:A.width,height:A.height,viewBox:`0 0 ${A.width} ${A.height}`,style:{display:"block",position:"absolute",inset:0},onPointerMove:t=>{const e=h(t,t.currentTarget,A);C(e.x<0||e.x>A.width||e.y<2||e.y>A.height-2?null:d(E,e.x))},children:[e.jsx("defs",{children:e.jsx(m,{id:M,color:x})}),e.jsx(c,{points:G,baseline:F(Math.max(0,T[0])),color:x,id:M,strokeWidth:1.5}),null!==k&&null!=u[k]&&e.jsx("circle",{cx:E[k],cy:F(u[k]),r:4,fill:x,stroke:b.base,strokeWidth:2})]})]})]})}export{u as SparkPlot};
@@ -1 +1 @@
import{r as e,$ as t,b as l,j as n}from"./vendor-react-64fcanlc.js";import{ef as i,eg as o,eh as r,ei as s,ej as a,ek as d,bp as c,d_ as u,cK as h,cD as y,el as p,cN as f,cC as g,em as m,en as b,eo as w,ep as v,dY as x,cL as k,eq as C,er as K,es as I,et as S,eu as M,ev as E,ew as R,cA as z,cB as D,ex as P,cJ as N,ey as H,ez as W,eA as A,eB as T,d$ as F,eC as V,eD as L,eE as B,eF as j,cO as O,cQ as $,e0 as U,e3 as _,eG as q,eH as Y,c$ as X,d0 as G,e6 as J,eI as Q,d2 as Z,cU as ee,cW as te,eJ as le,eK as ne,c_ as ie,eL as oe,eM as re,d3 as se,e1 as ae,eb as de,cV as ce,eN as ue,e2 as he,eO as ye,eP as pe,eQ as fe,eR as ge,eS as me,e8 as be,eT as we,eU as ve,ea as xe,u as ke,i as Ce,b4 as Ke,eV as Ie,af as Se,cn as Me,aE as Ee,b9 as Re,aD as ze,bw as De,b7 as Pe,eW as Ne,T as He}from"./index-XeGFdFb3.js";import{b as We,a as Ae,c as Te,d as Fe,e as Ve,f as Le,g as Be}from"./Checkbox-BewExwKL.js";import{f as je,g as Oe,h as $e,i as Ue,j as _e}from"./Select-OqnbuzuK.js";import{$ as qe}from"./logs-DNePHVHd.js";import{e as Ye,a as Xe,c as Ge,b as Je,d as Qe}from"./Virtualizer-FvdVRagH.js";class Ze{constructor(e){if(this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||"all",this.direction=e.direction,this.collator=e.collator,!e.layout&&!e.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=e.layoutDelegate||(e.layout?new et(e.layout):new i(e.ref)),this.focusMode=e.focusMode??"row"}isCell(e){return"cell"===e.type}isRow(e){return"row"===e.type||"item"===e.type}isDisabled(e){return"all"===this.disabledBehavior&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&"selection"!==e.props?.disabledBehavior}findPreviousKey(e,t,l=!1){let n=null!=e?this.collection.getKeyBefore(e):this.collection.getLastKey();for(;null!=n;){let e=this.collection.getItem(n);if(!e)return null;if((l||!this.isDisabled(e))&&(!t||t(e)))return n;n=this.collection.getKeyBefore(n)}return null}findNextKey(e,t,l=!1){let n=null!=e?this.collection.getKeyAfter(e):this.collection.getFirstKey();for(;null!=n;){let e=this.collection.getItem(n);if(!e)return null;if((l||!this.isDisabled(e))&&(!t||t(e)))return n;if(n=this.collection.getKeyAfter(n),null==n)return null}return null}getKeyForItemInRowByIndex(e,t=0){if(t<0)return null;let l=this.collection.getItem(e);if(!l)return null;let n=0;for(let i of o(l,this.collection)){if(i.colSpan&&i.colSpan+n>t)return i.key??null;if(i.colSpan&&(n=n+i.colSpan-1),n===t)return i.key??null;n++}return null}getKeyBelow(e,t){let l=e,n=this.collection.getItem(l);if(!n)return null;if(this.isCell(n)&&(l=n.parentKey??null),null==l)return null;if(l=this.findNextKey(l,e=>"item"===e.type,t?.includeDisabled),null!=l){if(this.isCell(n)){let e=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(l,e)}if("row"===this.focusMode)return l}return null}getKeyAbove(e,t){let l=e,n=this.collection.getItem(l);if(!n)return null;if(this.isCell(n)&&(l=n.parentKey??null),null==l)return null;if(l=this.findPreviousKey(l,e=>"item"===e.type,t?.includeDisabled),null!=l){if(this.isCell(n)){let e=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(l,e)}if("row"===this.focusMode)return l}return null}getKeyRightOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=o(t,this.collection);return("rtl"===this.direction?r(e)?.key:s(e)?.key)??null}if(this.isCell(t)&&null!=t.parentKey){let l=this.collection.getItem(t.parentKey);if(!l)return null;let n=o(l,this.collection),i=("rtl"===this.direction?a(n,t.index-1):a(n,t.index+1))??null;return i?i.key??null:"row"===this.focusMode?t.parentKey??null:("rtl"===this.direction?this.getFirstKey(e):this.getLastKey(e))??null}return null}getKeyLeftOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=o(t,this.collection);return("rtl"===this.direction?s(e)?.key:r(e)?.key)??null}if(this.isCell(t)&&null!=t.parentKey){let l=this.collection.getItem(t.parentKey);if(!l)return null;let n=o(l,this.collection),i=("rtl"===this.direction?a(n,t.index+1):a(n,t.index-1))??null;return i?i.key??null:"row"===this.focusMode?t.parentKey??null:("rtl"===this.direction?this.getLastKey(e):this.getFirstKey(e))??null}return null}getFirstKey(e,t){let l,n=e??null;if(null!=n){if(l=this.collection.getItem(n),!l)return null;if(this.isCell(l)&&!t&&null!=l.parentKey){let e=this.collection.getItem(l.parentKey);return e?s(o(e,this.collection))?.key??null:null}}if(n=this.findNextKey(void 0,e=>"item"===e.type),null!=n&&(l&&this.isCell(l)&&t||"cell"===this.focusMode)){let e=this.collection.getItem(n);if(!e)return null;n=s(o(e,this.collection))?.key??null}return n}getLastKey(e,t){let l,n=e??null;if(null!=n){if(l=this.collection.getItem(n),!l)return null;if(this.isCell(l)&&!t&&null!=l.parentKey){let e=this.collection.getItem(l.parentKey);if(!e)return null;let t=o(e,this.collection);return r(t)?.key??null}}if(n=this.findPreviousKey(void 0,e=>"item"===e.type),null!=n&&(l&&this.isCell(l)&&t||"cell"===this.focLine truncated
import{r as e,$ as t,b as l,j as n}from"./vendor-react-64fcanlc.js";import{ef as i,eg as o,eh as r,ei as s,ej as a,ek as d,bp as c,d_ as u,cK as h,cD as y,el as p,cN as f,cC as g,em as m,en as b,eo as w,ep as v,dY as x,cL as k,eq as C,er as K,es as I,et as S,eu as M,ev as E,ew as R,cA as z,cB as D,ex as P,cJ as N,ey as H,ez as W,eA as T,eB as A,d$ as F,eC as V,eD as L,eE as B,eF as j,cO as O,cQ as $,e0 as U,e3 as _,eG as Y,eH as q,c$ as X,d0 as G,e6 as J,eI as Q,d2 as Z,cU as ee,cW as te,eJ as le,eK as ne,c_ as ie,eL as oe,eM as re,d3 as se,e1 as ae,eb as de,cV as ce,eN as ue,e2 as he,eO as ye,eP as pe,eQ as fe,eR as ge,eS as me,e8 as be,eT as we,eU as ve,ea as xe,u as ke,i as Ce,b4 as Ke,eV as Ie,af as Se,cl as Me,aE as Ee,b9 as Re,aD as ze,bw as De,b7 as Pe,eW as Ne,T as He}from"./index-HxEUeoab.js";import{b as We,a as Te,c as Ae,d as Fe,e as Ve,f as Le,g as Be}from"./Checkbox-CJt7u9-e.js";import{f as je,g as Oe,h as $e,i as Ue,j as _e}from"./Select-D7_6MaHd.js";import{$ as Ye}from"./logs-C4GIy4tX.js";import{e as qe,a as Xe,c as Ge,b as Je,d as Qe}from"./Virtualizer-DMIKG2CD.js";class Ze{constructor(e){if(this.collection=e.collection,this.disabledKeys=e.disabledKeys,this.disabledBehavior=e.disabledBehavior||"all",this.direction=e.direction,this.collator=e.collator,!e.layout&&!e.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=e.layoutDelegate||(e.layout?new et(e.layout):new i(e.ref)),this.focusMode=e.focusMode??"row"}isCell(e){return"cell"===e.type}isRow(e){return"row"===e.type||"item"===e.type}isDisabled(e){return"all"===this.disabledBehavior&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&"selection"!==e.props?.disabledBehavior}findPreviousKey(e,t,l=!1){let n=null!=e?this.collection.getKeyBefore(e):this.collection.getLastKey();for(;null!=n;){let e=this.collection.getItem(n);if(!e)return null;if((l||!this.isDisabled(e))&&(!t||t(e)))return n;n=this.collection.getKeyBefore(n)}return null}findNextKey(e,t,l=!1){let n=null!=e?this.collection.getKeyAfter(e):this.collection.getFirstKey();for(;null!=n;){let e=this.collection.getItem(n);if(!e)return null;if((l||!this.isDisabled(e))&&(!t||t(e)))return n;if(n=this.collection.getKeyAfter(n),null==n)return null}return null}getKeyForItemInRowByIndex(e,t=0){if(t<0)return null;let l=this.collection.getItem(e);if(!l)return null;let n=0;for(let i of o(l,this.collection)){if(i.colSpan&&i.colSpan+n>t)return i.key??null;if(i.colSpan&&(n=n+i.colSpan-1),n===t)return i.key??null;n++}return null}getKeyBelow(e,t){let l=e,n=this.collection.getItem(l);if(!n)return null;if(this.isCell(n)&&(l=n.parentKey??null),null==l)return null;if(l=this.findNextKey(l,e=>"item"===e.type,t?.includeDisabled),null!=l){if(this.isCell(n)){let e=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(l,e)}if("row"===this.focusMode)return l}return null}getKeyAbove(e,t){let l=e,n=this.collection.getItem(l);if(!n)return null;if(this.isCell(n)&&(l=n.parentKey??null),null==l)return null;if(l=this.findPreviousKey(l,e=>"item"===e.type,t?.includeDisabled),null!=l){if(this.isCell(n)){let e=n.colIndex?n.colIndex:n.index;return this.getKeyForItemInRowByIndex(l,e)}if("row"===this.focusMode)return l}return null}getKeyRightOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=o(t,this.collection);return("rtl"===this.direction?r(e)?.key:s(e)?.key)??null}if(this.isCell(t)&&null!=t.parentKey){let l=this.collection.getItem(t.parentKey);if(!l)return null;let n=o(l,this.collection),i=("rtl"===this.direction?a(n,t.index-1):a(n,t.index+1))??null;return i?i.key??null:"row"===this.focusMode?t.parentKey??null:("rtl"===this.direction?this.getFirstKey(e):this.getLastKey(e))??null}return null}getKeyLeftOf(e){let t=this.collection.getItem(e);if(!t)return null;if(this.isRow(t)){let e=o(t,this.collection);return("rtl"===this.direction?s(e)?.key:r(e)?.key)??null}if(this.isCell(t)&&null!=t.parentKey){let l=this.collection.getItem(t.parentKey);if(!l)return null;let n=o(l,this.collection),i=("rtl"===this.direction?a(n,t.index+1):a(n,t.index-1))??null;return i?i.key??null:"row"===this.focusMode?t.parentKey??null:("rtl"===this.direction?this.getLastKey(e):this.getFirstKey(e))??null}return null}getFirstKey(e,t){let l,n=e??null;if(null!=n){if(l=this.collection.getItem(n),!l)return null;if(this.isCell(l)&&!t&&null!=l.parentKey){let e=this.collection.getItem(l.parentKey);return e?s(o(e,this.collection))?.key??null:null}}if(n=this.findNextKey(void 0,e=>"item"===e.type),null!=n&&(l&&this.isCell(l)&&t||"cell"===this.focusMode)){let e=this.collection.getItem(n);if(!e)return null;n=s(o(e,this.collection))?.key??null}return n}getLastKey(e,t){let l,n=e??null;if(null!=n){if(l=this.collection.getItem(n),!l)return null;if(this.isCell(l)&&!t&&null!=l.parentKey){let e=this.collection.getItem(l.parentKey);if(!e)return null;let t=o(e,this.collection);return r(t)?.key??null}}if(n=this.findPreviousKey(void 0,e=>"item"===e.type),null!=n&&(l&&this.isCell(l)&&t||"cell"===this.focLine truncated
@@ -1 +1 @@
import{r as e,$ as t,j as s}from"./vendor-react-64fcanlc.js";import{dY as i,cD as l,dZ as a,cB as o,cC as n,bp as r,d_ as d,cK as c,d$ as u,cO as b,e0 as h,e1 as f,c$ as p,d2 as y,d3 as v,cU as g,cV as K,e2 as m,cQ as S,e3 as x,e4 as P,e5 as D,e6 as C,cR as E,c_ as w,e7 as F,e8 as M,cW as I,e9 as N,ea as j,eb as k,ec as R,ed as L,ee as H}from"./index-XeGFdFb3.js";import{a as V}from"./Checkbox-BewExwKL.js";import{e as T}from"./Select-OqnbuzuK.js";import{T as A}from"./Toolbar-CFyWgMbW.js";const O=new WeakMap;function $(e,t,s){if(!e)return"";return"string"==typeof t&&(t=t.replace(/\s+/g,"")),`${O.get(e)}-${s}-${t}`}class z{constructor(e,t,s,i=new Set){this.collection=e,this.flipDirection="rtl"===t,this.disabledKeys=i,this.tabDirection="horizontal"===s}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return null!=e&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return null!=e&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do{t=this.collection.getKeyAfter(t),null==t&&(t=this.collection.getFirstKey())}while(null!=t&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do{t=this.collection.getKeyBefore(t),null==t&&(t=this.collection.getLastKey())}while(null!=t&&this.isDisabled(t)&&t!==e);return t}}function B(t){let s=function(t){let[s,i]=b(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),l=e.useMemo(()=>null!=s?[s]:[],[s]),{collection:a,disabledKeys:o,selectionManager:n}=T({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:e=>{if("all"===e)return;let l=e.values().next().value??null;l===s&&t.onSelectionChange&&t.onSelectionChange(l),i(l)}}),r=null!=s?a.getItem(s):null;return{collection:a,disabledKeys:o,selectionManager:n,selectedKey:s,setSelectedKey:i,selectedItem:r}}({...t,onSelectionChange:t.onSelectionChange?e=>{null!=e&&t.onSelectionChange?.(e)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??W(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:i,collection:l,selectedKey:a}=s,o=e.useRef(a);return e.useEffect(()=>{let e=a;null!=t.selectedKey||!i.isEmpty&&null!=e&&l.getItem(e)||(e=W(l,s.disabledKeys),null!=e&&i.setSelectedKeys([e])),(null!=e&&null==i.focusedKey||!i.isFocused&&e!==o.current)&&i.setFocusedKey(e),o.current=e}),{...s,isDisabled:t.isDisabled||!1}}function W(e,t){let s=null;if(e){for(s=e.getFirstKey();null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s!==e.getLastKey();)s=e.getKeyAfter(s);null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s===e.getLastKey()&&(s=e.getFirstKey())}return s}const U=e.createContext(null),Q=e.createContext(null),_=e.forwardRef(function(s,i){[s,i]=S(s,i,U);let{children:l,orientation:a="horizontal"}=s;return l=e.useMemo(()=>"function"==typeof l?l({orientation:a,defaultChildren:null}):l,[l,a]),t.createElement(x,{content:l},e=>t.createElement(Y,{props:s,collection:e,tabsRef:i}))});function Y({props:s,tabsRef:i,collection:a}){let{orientation:o="horizontal"}=s,r=B({...s,collection:a,children:void 0}),{focusProps:d,isFocused:c,isFocusVisible:u}=y({within:!0}),b=e.useMemo(()=>({orientation:o,isFocusWithin:c,isFocusVisible:u}),[o,c,u]),h=g({...s,defaultClassName:"react-aria-Tabs",values:b}),f=l(s,{global:!0});return t.createElement(K.div,{...n(f,h,d),ref:i,slot:s.slot||void 0,"data-focused":c||void 0,"data-orientation":o,"data-focus-visible":u||void 0,"data-disabled":r.isDisabled||void 0},t.createElement(I,{values:[[U,s],[Q,r]]},h.children))}const Z=e.forwardRef(function(s,i){return e.useContext(Q)?t.createElement(q,{props:s,forwardedRef:i}):t.createElement(h,s)});function q({props:s,forwardedRef:i}){let a=e.useContext(Q),{CollectionRoot:o}=e.useContext(C),{orientation:b="horizontal",keyboardActivation:h="automatic"}=E(U),f=p(i),{tabListProps:y}=function(t,s,i){let{orientation:l="horizontal",keyboardActivation:a="automatic"}=t,{collection:o,selectionManager:b,disabledKeys:h}=s,{direction:f}=r(),p=e.useMemo(()=>new z(o,f,l,h),[o,h,l,f]),{collectionProps:y}=d({ref:i,selectionManager:b,keyboardDelegate:p,selectOnFocus:"automatic"===a,disallowEmptySelection:!0,scrollRef:i,linkBehavior:"selection"}),v=c();O.set(s,v);let g=u({...t,id:v});return{tabListProps:{...n(y,g),role:"tablist","aria-orientation":l,tabIndex:void 0}}}({...s,orientation:b,keyboardActivation:h},a,f),v=g({...s,children:null,defaultClassName:"react-aria-TabList",values:{orientation:b,state:a}}),m=l(s,{global:!0});return delete m.id,t.createElement(K.div,{...n(m,v,y),ref:f,"data-orientation":b||void 0Line truncated
import{r as e,$ as t,j as s}from"./vendor-react-64fcanlc.js";import{dY as i,cD as l,dZ as a,cB as o,cC as n,bp as r,d_ as d,cK as c,d$ as u,cO as b,e0 as h,e1 as f,c$ as p,d2 as y,d3 as v,cU as g,cV as K,e2 as m,cQ as S,e3 as x,e4 as P,e5 as D,e6 as C,cR as E,c_ as w,e7 as F,e8 as M,cW as I,e9 as N,ea as j,eb as k,ec as R,ed as L,ee as H}from"./index-HxEUeoab.js";import{a as V}from"./Checkbox-CJt7u9-e.js";import{e as T}from"./Select-D7_6MaHd.js";import{T as A}from"./Toolbar-BTFtduwD.js";const O=new WeakMap;function $(e,t,s){if(!e)return"";return"string"==typeof t&&(t=t.replace(/\s+/g,"")),`${O.get(e)}-${s}-${t}`}class z{constructor(e,t,s,i=new Set){this.collection=e,this.flipDirection="rtl"===t,this.disabledKeys=i,this.tabDirection="horizontal"===s}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return null!=e&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return null!=e&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do{t=this.collection.getKeyAfter(t),null==t&&(t=this.collection.getFirstKey())}while(null!=t&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do{t=this.collection.getKeyBefore(t),null==t&&(t=this.collection.getLastKey())}while(null!=t&&this.isDisabled(t)&&t!==e);return t}}function B(t){let s=function(t){let[s,i]=b(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),l=e.useMemo(()=>null!=s?[s]:[],[s]),{collection:a,disabledKeys:o,selectionManager:n}=T({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:e=>{if("all"===e)return;let l=e.values().next().value??null;l===s&&t.onSelectionChange&&t.onSelectionChange(l),i(l)}}),r=null!=s?a.getItem(s):null;return{collection:a,disabledKeys:o,selectionManager:n,selectedKey:s,setSelectedKey:i,selectedItem:r}}({...t,onSelectionChange:t.onSelectionChange?e=>{null!=e&&t.onSelectionChange?.(e)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??W(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:i,collection:l,selectedKey:a}=s,o=e.useRef(a);return e.useEffect(()=>{let e=a;null!=t.selectedKey||!i.isEmpty&&null!=e&&l.getItem(e)||(e=W(l,s.disabledKeys),null!=e&&i.setSelectedKeys([e])),(null!=e&&null==i.focusedKey||!i.isFocused&&e!==o.current)&&i.setFocusedKey(e),o.current=e}),{...s,isDisabled:t.isDisabled||!1}}function W(e,t){let s=null;if(e){for(s=e.getFirstKey();null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s!==e.getLastKey();)s=e.getKeyAfter(s);null!=s&&(t.has(s)||e.getItem(s)?.props?.isDisabled)&&s===e.getLastKey()&&(s=e.getFirstKey())}return s}const U=e.createContext(null),Q=e.createContext(null),_=e.forwardRef(function(s,i){[s,i]=S(s,i,U);let{children:l,orientation:a="horizontal"}=s;return l=e.useMemo(()=>"function"==typeof l?l({orientation:a,defaultChildren:null}):l,[l,a]),t.createElement(x,{content:l},e=>t.createElement(Y,{props:s,collection:e,tabsRef:i}))});function Y({props:s,tabsRef:i,collection:a}){let{orientation:o="horizontal"}=s,r=B({...s,collection:a,children:void 0}),{focusProps:d,isFocused:c,isFocusVisible:u}=y({within:!0}),b=e.useMemo(()=>({orientation:o,isFocusWithin:c,isFocusVisible:u}),[o,c,u]),h=g({...s,defaultClassName:"react-aria-Tabs",values:b}),f=l(s,{global:!0});return t.createElement(K.div,{...n(f,h,d),ref:i,slot:s.slot||void 0,"data-focused":c||void 0,"data-orientation":o,"data-focus-visible":u||void 0,"data-disabled":r.isDisabled||void 0},t.createElement(I,{values:[[U,s],[Q,r]]},h.children))}const Z=e.forwardRef(function(s,i){return e.useContext(Q)?t.createElement(q,{props:s,forwardedRef:i}):t.createElement(h,s)});function q({props:s,forwardedRef:i}){let a=e.useContext(Q),{CollectionRoot:o}=e.useContext(C),{orientation:b="horizontal",keyboardActivation:h="automatic"}=E(U),f=p(i),{tabListProps:y}=function(t,s,i){let{orientation:l="horizontal",keyboardActivation:a="automatic"}=t,{collection:o,selectionManager:b,disabledKeys:h}=s,{direction:f}=r(),p=e.useMemo(()=>new z(o,f,l,h),[o,h,l,f]),{collectionProps:y}=d({ref:i,selectionManager:b,keyboardDelegate:p,selectOnFocus:"automatic"===a,disallowEmptySelection:!0,scrollRef:i,linkBehavior:"selection"}),v=c();O.set(s,v);let g=u({...t,id:v});return{tabListProps:{...n(y,g),role:"tablist","aria-orientation":l,tabIndex:void 0}}}({...s,orientation:b,keyboardActivation:h},a,f),v=g({...s,children:null,defaultClassName:"react-aria-TabList",values:{orientation:b,state:a}}),m=l(s,{global:!0});return delete m.id,t.createElement(K.div,{...n(m,v,y),ref:f,"data-orientation":b||void 0Line truncated
@@ -1 +1 @@
import{r as e,j as n,a as t}from"./vendor-react-64fcanlc.js";import{l as r,ak as l,dh as s,cn as a,di as c,b7 as o}from"./index-XeGFdFb3.js";import{L as u}from"./AppearanceControls-Q-jHRGz9.js";function i({children:e,tone:t,action:r}){return n.jsxs("span",{className:o("rp-tag",t),children:[n.jsx("span",{className:"rp-tag-label",children:e}),r]})}function g({label:e,children:t}){return n.jsx("div",{className:"rp-tags",role:"group","aria-label":e,children:t})}function h({href:e,children:t}){return n.jsx(u,{href:e,className:"rp-tag rp-tag-link",children:n.jsx("span",{className:"rp-tag-label",children:t})})}function d(e,n,t,r){const l=e=>e<=t+.01,s=e.reduce((e,n)=>[...e,e[e.length-1]+n+r],[0]);if(l(s[e.length]-r))return e.length;let a=e.length-1;for(;a>0&&!l(s[a]+n(e.length-a));)a--;return a}function f({count:t,label:r,names:l}){const[o,u]=e.useState(!1);return n.jsxs(s,{delay:400,isOpen:o,onOpenChange:u,shouldCloseOnPress:!1,children:[n.jsx(a,{className:"rp-tag rp-tag-more","aria-label":r,onPress:e=>u(n=>"touch"!==e.pointerType||!n),children:n.jsxs("span",{className:"rp-tag-label",children:["+",t]})}),n.jsx(c,{children:l})]})}const p=e=>n=>e.more[String(n).length-1],m=new Map;let b=null;function j(e){const n=e.filter(e=>null!==e);n.length&&t.flushSync(()=>n.forEach(e=>e()))}function x({label:t,items:s,more:a}){const c=r(),o=e.useRef(null),u=e.useRef(null),i=e.useRef(new Set),g=`${c}\n${s.map(e=>e.label).join("\n")}`,[x,y]=e.useState({key:g,count:null}),w=x.key===g?x.count:null;e.useLayoutEffect(()=>{const e=o.current;if(null!==w||!e?.getClientRects().length)return;const n=[...e.children].map(e=>e.getBoundingClientRect().width),t={key:g,tags:n.slice(0,s.length),more:n.slice(s.length),gap:Number.parseFloat(getComputedStyle(e).columnGap)||0};u.current=t,y({key:g,count:d(t.tags,p(t),e.getBoundingClientRect().width,t.gap)})},[x,g,w,s.length]),e.useLayoutEffect(()=>{const e=o.current;if(!e)return;const n=()=>y({key:g,count:null});m.set(e,{remeasure:n,read:()=>{const t=u.current;if(!e.getClientRects().length)return null;const r=[...e.children].filter(e=>!e.classList.contains("rp-tag-more"));if(t?.key!==g||r.some((e,n)=>Math.abs(e.getBoundingClientRect().width-t.tags[n])>.5))return n;const l=d(t.tags,p(t),e.getBoundingClientRect().width,t.gap);return l===w?null:()=>y({key:g,count:l})}});const t=(b||(b=new ResizeObserver(e=>{j([...new Set(e.map(e=>e.target.closest(".rp-tags[data-fit]")))].map(e=>(e&&m.get(e)?.read())??null))}),document.fonts?.addEventListener("loadingdone",()=>j([...m.values()].map(e=>e.remeasure)))),b),r=new Set([e,...e.children]);for(const l of i.current)r.has(l)||t.unobserve(l);for(const l of r)i.current.has(l)||t.observe(l);i.current=r}),e.useLayoutEffect(()=>{const e=o.current,n=i;return()=>{e&&m.delete(e);for(const e of n.current)b?.unobserve(e);n.current=new Set}},[]);const C=l(c,s.map(e=>e.label)),R=null===w?0:s.length-w,S=null===w&&s.length?Array.from({length:String(s.length).length},(e,n)=>10**(n+1)-1):[];return n.jsxs("div",{ref:o,className:"rp-tags",role:"group","aria-label":t,"data-fit":"",children:[s.slice(0,w??s.length).map(e=>n.jsx(h,{href:e.href,children:e.label},e.id)),S.map(e=>n.jsx(f,{count:e,label:a(e),names:C},e)),R>0&&n.jsx(f,{count:R,label:a(R),names:C})]})}export{x as F,h as L,g as T,i as a};
import{r as e,j as n,a as t}from"./vendor-react-64fcanlc.js";import{l as r,ak as l,dh as s,cl as a,di as c,b7 as o}from"./index-HxEUeoab.js";import{L as u}from"./AppearanceControls-sRy1p156.js";function i({children:e,tone:t,action:r}){return n.jsxs("span",{className:o("rp-tag",t),children:[n.jsx("span",{className:"rp-tag-label",children:e}),r]})}function g({label:e,children:t}){return n.jsx("div",{className:"rp-tags",role:"group","aria-label":e,children:t})}function h({href:e,children:t}){return n.jsx(u,{href:e,className:"rp-tag rp-tag-link",children:n.jsx("span",{className:"rp-tag-label",children:t})})}function d(e,n,t,r){const l=e=>e<=t+.01,s=e.reduce((e,n)=>[...e,e[e.length-1]+n+r],[0]);if(l(s[e.length]-r))return e.length;let a=e.length-1;for(;a>0&&!l(s[a]+n(e.length-a));)a--;return a}function f({count:t,label:r,names:l}){const[o,u]=e.useState(!1);return n.jsxs(s,{delay:400,isOpen:o,onOpenChange:u,shouldCloseOnPress:!1,children:[n.jsx(a,{className:"rp-tag rp-tag-more","aria-label":r,onPress:e=>u(n=>"touch"!==e.pointerType||!n),children:n.jsxs("span",{className:"rp-tag-label",children:["+",t]})}),n.jsx(c,{children:l})]})}const p=e=>n=>e.more[String(n).length-1],m=new Map;let b=null;function j(e){const n=e.filter(e=>null!==e);n.length&&t.flushSync(()=>n.forEach(e=>e()))}function x({label:t,items:s,more:a}){const c=r(),o=e.useRef(null),u=e.useRef(null),i=e.useRef(new Set),g=`${c}\n${s.map(e=>e.label).join("\n")}`,[x,y]=e.useState({key:g,count:null}),w=x.key===g?x.count:null;e.useLayoutEffect(()=>{const e=o.current;if(null!==w||!e?.getClientRects().length)return;const n=[...e.children].map(e=>e.getBoundingClientRect().width),t={key:g,tags:n.slice(0,s.length),more:n.slice(s.length),gap:Number.parseFloat(getComputedStyle(e).columnGap)||0};u.current=t,y({key:g,count:d(t.tags,p(t),e.getBoundingClientRect().width,t.gap)})},[x,g,w,s.length]),e.useLayoutEffect(()=>{const e=o.current;if(!e)return;const n=()=>y({key:g,count:null});m.set(e,{remeasure:n,read:()=>{const t=u.current;if(!e.getClientRects().length)return null;const r=[...e.children].filter(e=>!e.classList.contains("rp-tag-more"));if(t?.key!==g||r.some((e,n)=>Math.abs(e.getBoundingClientRect().width-t.tags[n])>.5))return n;const l=d(t.tags,p(t),e.getBoundingClientRect().width,t.gap);return l===w?null:()=>y({key:g,count:l})}});const t=(b||(b=new ResizeObserver(e=>{j([...new Set(e.map(e=>e.target.closest(".rp-tags[data-fit]")))].map(e=>(e&&m.get(e)?.read())??null))}),document.fonts?.addEventListener("loadingdone",()=>j([...m.values()].map(e=>e.remeasure)))),b),r=new Set([e,...e.children]);for(const l of i.current)r.has(l)||t.unobserve(l);for(const l of r)i.current.has(l)||t.observe(l);i.current=r}),e.useLayoutEffect(()=>{const e=o.current,n=i;return()=>{e&&m.delete(e);for(const e of n.current)b?.unobserve(e);n.current=new Set}},[]);const C=l(c,s.map(e=>e.label)),R=null===w?0:s.length-w,S=null===w&&s.length?Array.from({length:String(s.length).length},(e,n)=>10**(n+1)-1):[];return n.jsxs("div",{ref:o,className:"rp-tags",role:"group","aria-label":t,"data-fit":"",children:[s.slice(0,w??s.length).map(e=>n.jsx(h,{href:e.href,children:e.label},e.id)),S.map(e=>n.jsx(f,{count:e,label:a(e),names:C},e)),R>0&&n.jsx(f,{count:R,label:a(R),names:C})]})}export{x as F,h as L,g as T,i as a};
@@ -1 +1 @@
import{j as a}from"./vendor-react-64fcanlc.js";import{al as s,l as r,dR as t,T as o,dQ as e,a1 as n}from"./index-XeGFdFb3.js";function d({at:d}){const i=s[r()],c=t();return a.jsx(o,{text:d?n(d,i):void 0,children:e(d,i,c)})}export{d as T};
import{j as a}from"./vendor-react-64fcanlc.js";import{al as s,l as r,dR as t,T as o,dQ as e,a1 as n}from"./index-HxEUeoab.js";function d({at:d}){const i=s[r()],c=t();return a.jsx(o,{text:d?n(d,i):void 0,children:e(d,i,c)})}export{d as T};
@@ -1 +1 @@
import{j as a}from"./vendor-react-64fcanlc.js";import{b7 as r}from"./index-XeGFdFb3.js";function o({page:o,className:e,children:s,...t}){return a.jsx("div",{...t,className:r("rp-toolbar",e),"data-page-toolbar":o||void 0,children:s})}export{o as T};
import{j as a}from"./vendor-react-64fcanlc.js";import{b7 as r}from"./index-HxEUeoab.js";function o({page:o,className:e,children:s,...t}){return a.jsx("div",{...t,className:r("rp-toolbar",e),"data-page-toolbar":o||void 0,children:s})}export{o as T};
@@ -1 +1 @@
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{bS as r,u as a,l as i,a9 as l,q as n,r as o,z as t,A as d,c9 as u,a6 as p,a3 as m,aK as c,p as j,bF as v,cg as b,bG as h,B as _,ci as f,T as x,C as y}from"./index-XeGFdFb3.js";import{u as g,r as k}from"./flows-CjEC9Jxw.js";import{c as w,h as N,z as q,g as C,q as M,R as A,L,D as T,K as D}from"./logs-DNePHVHd.js";import{e as R,t as S,c as V,n as E,d as F,q as P,a as I,b as O}from"./Rules-gNsJvc3i.js";import{a as Q,p as W}from"./probe-Bp5QvROd.js";import{u as z,R as K}from"./useQuickRule-8yoKk9d5.js";import{d as $}from"./activity-7OeQMmIs.js";import{L as H}from"./AppearanceControls-Q-jHRGz9.js";import{N as B,t as G,n as J}from"./NumberField-Bo9iJ94r.js";import{T as U}from"./Toolbar-CFyWgMbW.js";import{D as X}from"./Table-DqqJleJD.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-OqnbuzuK.js";import"./ItemText-Bvif-kkw.js";import"./nodes-Bm1vmvln.js";import"./Tabs-BGWzF0yW.js";import"./Checkbox-BewExwKL.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./ConditionRow-mKWPcuZs.js";import"./Coverage-fmBkVF9H.js";import"./rule-BUktGcKO.js";import"./labels-D8xxfRTQ.js";import"./nav-4iHQTLCW.js";import"./recorder-BHyqDNp5.js";import"./geodataUpdate-Blcy6CRD.js";/* empty css */import"./LinkOut-BfQApT3z.js";import"./SearchSelect-BVGce3l_.js";import"./SearchList-DWooTdFX.js";import"./Virtualizer-FvdVRagH.js";import"./AddCircle-7x8u9Pw1.js";const Y=e=>/^\d+$/.test(e)&&Number(e)>=1&&Number(e)<=65535,Z={none:"rule.resolveNone",live:"rule.resolveLive",query:"rule.resolveQuery"};function ee({form:s,setForm:j,advanced:v,setAdvanced:b,touched:h},_){const f=a(),x=i(),y=l(),A=n(),L=A.data?.resources,T=w(o(L,"groups",{whileLoading:!1})),D=N(o(L,"nodes",{whileLoading:!1})),K=g(o(L,"rules",{whileLoading:!1})),H=q(D.refetch),{choices:B}=H,G=z(_),J=e.useMemo(()=>new Map(T.data?.map(e=>[e.name,e])??[]),[T.data]),U=e.useMemo(()=>new Map(T.data?.map(e=>[e.id,e])??[]),[T.data]),X=e.useMemo(()=>new Map(D.data?.map(e=>[e.id,e])??[]),[D.data]),ee=e.useMemo(()=>new Map(K.data?.rules.map(e=>[e.rule_id,e])??[]),[K.data]),[se,re]=e.useState(null),ae=o(L,"providers",{whileLoading:!1}),ie=C(!!se&&ae),le=o(L,"groups",{whileLoading:!1}),{busy:ne,error:oe,run:te}=t(),de=oe??A.error,ue=e.useEffectEvent(e=>d("negative",f("rule.traceFailed"),u(e,f)));e.useEffect(()=>{de&&ue(de)},[de]);const pe=s.domain.trim()||s.dst_ip.trim()?s.dst_ip.trim()&&!r(s.dst_ip)?{field:"dst_ip",key:"ui.invalidIp"}:Y(s.dst_port)?s.src_ip.trim()&&!r(s.src_ip)?{field:"src_ip",key:"ui.invalidIp"}:s.src_port.trim()&&!Y(s.src_port)?{field:"src_port",key:"rule.invalidPort"}:!s.dscp.trim()||(me=s.dscp,/^\d+$/.test(me)&&Number(me)>=0&&Number(me)<=63)?"live"!==s.resolve&&"query"!==s.resolve||s.domain.trim()?"live"!==s.resolve&&"query"!==s.resolve||!s.dst_ip.trim()?null:{field:"dst_ip",key:"rule.invalidLive"}:{field:"domain",key:"rule.invalidLive"}:{field:"dscp",key:"rule.invalidDscp"}:{field:"dst_port",key:"rule.invalidPort"}:{field:"domain",key:"rule.invalidTarget"};var me;const ce=h?pe:null,je=A.data?.resources.routing_trace,ve=je?.resolve_modes??[],be=A.data?.resources.dns_query,he=be?.record_types,_e=e.useMemo(()=>(he??[]).filter(e=>"A"===e||"AAAA"===e),[he]),fe=be?.limits?.max_types_per_request??1,xe=[...ve,...!ve.includes("live")&&ve.includes("none")&&be?.available&&_e.length?["query"]:[]],ye=!1!==je?.available,ge=""!==s.domain.trim()&&!s.dst_ip.trim(),ke=s.resolve??(ge&&xe.includes("live")?"live":ge&&xe.includes("query")?"query":"none"),we=!pe&&ye&&xe.includes(ke),Ne=e.useCallback(async()=>{if(ne||!we)return;const e=function(e){const s=e=>r(e),a={network:e.network,dst_port:Number(e.dst_port),...e.domain.trim()?{domain:e.domain.trim()}:{dst_ip:s(e.dst_ip)}};return e.domain.trim()&&e.dst_ip.trim()&&(a.dst_ip=s(e.dst_ip)),e.src_ip.trim()&&(a.src_ip=s(e.src_ip)),e.src_port.trim()&&(a.src_port=Number(e.src_port)),e.pname.trim()&&(a.pname=e.pname.trim()),e.dscp.trim()&&(a.dscp=Number(e.dscp)),a}(s),a=await te("trace",s=>k({...y,dnsQuery:(e,r)=>M(y.dnsQuery,e,r,fe,s)},{input:e,resolve:ke,recordTypes:_e},s));re(a?{run:a,input:e}:null)},[y,ne,we,s,ke,_e,fe,te]),qe=K.data?.generation_id,Ce=e.useMemo(()=>se?.run.traces.flatMap(e=>e.evaluations.map(s=>({evaluation:s,traced:e.generation_id,current:qe===e.generation_id}))).map(({evaluation:e,traced:s,current:r},a)=>{const i=e.rules.find(e=>"matched"===e.result),l="determinate"!==e.decision&&!e.outbound&&r?(i&&ee.get(i.rule_id)?.outbound)??null:null,n=e.outbound??l,o=n&&!p(n)?m(n,se.input.network,J,U,X):null,t=R(e,a,se.input.domain??void 0,l,o,!!o?.node&&B(o.node).length>0,H.busy,f,x);return{...t,rows:t.rows.map(e=>({...e,href:$(e.id,r&&ee.has(e.id))})),links:V(o,le,ae?ie.data?.providers:[],f),seed:S(se.input,e,s)}})??[],[se,qe,ee,J,U,X,le,ae,ie.data,B,H.busy,f,x]),Me=e.useMemo(()=>se?{status:I(se.run.traces[0],se.run.query,f,x),query:se.run.query&&{...P(se.run.query,f,x),links:E(se.run.query.domain,L,f)},dns:se.run.traces.flatMap(e=>e.Line truncated
import{r as e,j as s}from"./vendor-react-64fcanlc.js";import{bS as r,u as a,l as i,a9 as l,q as n,r as o,z as t,A as d,c9 as u,a6 as p,a3 as m,aK as c,p as j,bF as v,cg as b,bG as h,B as _,ci as f,T as x,C as y}from"./index-HxEUeoab.js";import{u as g,r as k}from"./flows-dBNkBg79.js";import{c as w,h as N,z as q,g as C,q as M,R as A,L,D as T,K as D}from"./logs-C4GIy4tX.js";import{e as R,t as S,c as V,n as E,d as F,q as P,a as I,b as O}from"./Rules-BCWmv1Ss.js";import{a as Q,p as W}from"./probe-Bj7oT3ox.js";import{u as z,R as K}from"./useQuickRule-DUEi6geL.js";import{d as $}from"./activity-yZTrGy-J.js";import{L as H}from"./AppearanceControls-sRy1p156.js";import{N as B,t as G,n as J}from"./NumberField-q4-QmTAT.js";import{T as U}from"./Toolbar-BTFtduwD.js";import{D as X}from"./Table-yWn0d3vL.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./Select-D7_6MaHd.js";import"./ItemText-DOD_75iR.js";import"./nodes-6sIn2I0s.js";import"./Tabs-DT6MQhIo.js";import"./Checkbox-CJt7u9-e.js";import"./DaeCode-DEjXqvav.js";import"./daeTokens-BVtuNnWZ.js";import"./ConditionRow-B8Otz3rt.js";import"./Coverage-8qg_JeNJ.js";import"./rule-Bl9YOsFn.js";import"./labels-D8xxfRTQ.js";import"./nav-DG4JD5-H.js";import"./recorder-BHyqDNp5.js";import"./geodataUpdate-D9CXpIul.js";/* empty css */import"./LinkOut-D-cvJjm2.js";import"./SearchSelect-BcScGUbQ.js";import"./SearchList-LjCruZYP.js";import"./Virtualizer-DMIKG2CD.js";import"./AddCircle-C6Jc7GCc.js";const Y=e=>/^\d+$/.test(e)&&Number(e)>=1&&Number(e)<=65535,Z={none:"rule.resolveNone",live:"rule.resolveLive",query:"rule.resolveQuery"};function ee({form:s,setForm:j,advanced:v,setAdvanced:b,touched:h},_){const f=a(),x=i(),y=l(),A=n(),L=A.data?.resources,T=w(o(L,"groups",{whileLoading:!1})),D=N(o(L,"nodes",{whileLoading:!1})),K=g(o(L,"rules",{whileLoading:!1})),H=q(D.refetch),{choices:B}=H,G=z(_),J=e.useMemo(()=>new Map(T.data?.map(e=>[e.name,e])??[]),[T.data]),U=e.useMemo(()=>new Map(T.data?.map(e=>[e.id,e])??[]),[T.data]),X=e.useMemo(()=>new Map(D.data?.map(e=>[e.id,e])??[]),[D.data]),ee=e.useMemo(()=>new Map(K.data?.rules.map(e=>[e.rule_id,e])??[]),[K.data]),[se,re]=e.useState(null),ae=o(L,"providers",{whileLoading:!1}),ie=C(!!se&&ae),le=o(L,"groups",{whileLoading:!1}),{busy:ne,error:oe,run:te}=t(),de=oe??A.error,ue=e.useEffectEvent(e=>d("negative",f("rule.traceFailed"),u(e,f)));e.useEffect(()=>{de&&ue(de)},[de]);const pe=s.domain.trim()||s.dst_ip.trim()?s.dst_ip.trim()&&!r(s.dst_ip)?{field:"dst_ip",key:"ui.invalidIp"}:Y(s.dst_port)?s.src_ip.trim()&&!r(s.src_ip)?{field:"src_ip",key:"ui.invalidIp"}:s.src_port.trim()&&!Y(s.src_port)?{field:"src_port",key:"rule.invalidPort"}:!s.dscp.trim()||(me=s.dscp,/^\d+$/.test(me)&&Number(me)>=0&&Number(me)<=63)?"live"!==s.resolve&&"query"!==s.resolve||s.domain.trim()?"live"!==s.resolve&&"query"!==s.resolve||!s.dst_ip.trim()?null:{field:"dst_ip",key:"rule.invalidLive"}:{field:"domain",key:"rule.invalidLive"}:{field:"dscp",key:"rule.invalidDscp"}:{field:"dst_port",key:"rule.invalidPort"}:{field:"domain",key:"rule.invalidTarget"};var me;const ce=h?pe:null,je=A.data?.resources.routing_trace,ve=je?.resolve_modes??[],be=A.data?.resources.dns_query,he=be?.record_types,_e=e.useMemo(()=>(he??[]).filter(e=>"A"===e||"AAAA"===e),[he]),fe=be?.limits?.max_types_per_request??1,xe=[...ve,...!ve.includes("live")&&ve.includes("none")&&be?.available&&_e.length?["query"]:[]],ye=!1!==je?.available,ge=""!==s.domain.trim()&&!s.dst_ip.trim(),ke=s.resolve??(ge&&xe.includes("live")?"live":ge&&xe.includes("query")?"query":"none"),we=!pe&&ye&&xe.includes(ke),Ne=e.useCallback(async()=>{if(ne||!we)return;const e=function(e){const s=e=>r(e),a={network:e.network,dst_port:Number(e.dst_port),...e.domain.trim()?{domain:e.domain.trim()}:{dst_ip:s(e.dst_ip)}};return e.domain.trim()&&e.dst_ip.trim()&&(a.dst_ip=s(e.dst_ip)),e.src_ip.trim()&&(a.src_ip=s(e.src_ip)),e.src_port.trim()&&(a.src_port=Number(e.src_port)),e.pname.trim()&&(a.pname=e.pname.trim()),e.dscp.trim()&&(a.dscp=Number(e.dscp)),a}(s),a=await te("trace",s=>k({...y,dnsQuery:(e,r)=>M(y.dnsQuery,e,r,fe,s)},{input:e,resolve:ke,recordTypes:_e},s));re(a?{run:a,input:e}:null)},[y,ne,we,s,ke,_e,fe,te]),qe=K.data?.generation_id,Ce=e.useMemo(()=>se?.run.traces.flatMap(e=>e.evaluations.map(s=>({evaluation:s,traced:e.generation_id,current:qe===e.generation_id}))).map(({evaluation:e,traced:s,current:r},a)=>{const i=e.rules.find(e=>"matched"===e.result),l="determinate"!==e.decision&&!e.outbound&&r?(i&&ee.get(i.rule_id)?.outbound)??null:null,n=e.outbound??l,o=n&&!p(n)?m(n,se.input.network,J,U,X):null,t=R(e,a,se.input.domain??void 0,l,o,!!o?.node&&B(o.node).length>0,H.busy,f,x);return{...t,rows:t.rows.map(e=>({...e,href:$(e.id,r&&ee.has(e.id))})),links:V(o,le,ae?ie.data?.providers:[],f),seed:S(se.input,e,s)}})??[],[se,qe,ee,J,U,X,le,ae,ie.data,B,H.busy,f,x]),Me=e.useMemo(()=>se?{status:I(se.run.traces[0],se.run.query,f,x),query:se.run.query&&{...P(se.run.query,f,x),links:E(se.run.query.domain,L,f)},dns:se.run.traces.flatMap(e=>e.Line truncated
@@ -1 +1 @@
import{eg as t,bp as e,cN as i,el as n,eZ as s,e_ as o,es as r,ez as l,eP as a,eR as h,e$ as d,e6 as u,f0 as c}from"./index-XeGFdFb3.js";import{r as y,$ as g,a as f}from"./vendor-react-64fcanlc.js";class p{constructor(t=0,e=0){this.x=t,this.y=e}copy(){return new p(this.x,this.y)}equals(t){return this.x===t.x&&this.y===t.y}isOrigin(){return 0===this.x&&0===this.y}}class w{constructor(t=0,e=0,i=0,n=0){this.x=t,this.y=e,this.width=i,this.height=n}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new p(this.x,this.y)}get topRight(){return new p(this.maxX,this.y)}get bottomLeft(){return new p(this.x,this.maxY)}get bottomRight(){return new p(this.maxX,this.maxY)}intersects(t){return this.area>0&&t.area>0&&this.x<=t.x+t.width&&t.x<=this.x+this.width&&this.y<=t.y+t.height&&t.y<=this.y+this.height}containsRect(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.maxX&&this.maxY>=t.maxY}containsPoint(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.x&&this.maxY>=t.y}getCornerInRect(t){for(let e of["topLeft","topRight","bottomLeft","bottomRight"])if(t.containsPoint(this[e]))return e;return null}equals(t){return t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}pointEquals(t){return this.x===t.x&&this.y===t.y}sizeEquals(t){return this.width===t.width&&this.height===t.height}union(t){let e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),n=Math.max(this.maxX,t.maxX)-e,s=Math.max(this.maxY,t.maxY)-i;return new w(e,i,n,s)}intersection(t){if(!this.intersects(t))return new w(0,0,0,0);let e=Math.max(this.x,t.x),i=Math.max(this.y,t.y);return new w(e,i,Math.min(this.maxX,t.maxX)-e,Math.min(this.maxY,t.maxY)-i)}copy(){return new w(this.x,this.y,this.width,this.height)}}class z{constructor(t=0,e=0){this.width=Math.max(t,0),this.height=Math.max(e,0)}copy(){return new z(this.width,this.height)}equals(t){return this.width===t.width&&this.height===t.height}get area(){return this.width*this.height}}let v=0;class m{constructor(t,e){this.virtualizer=t,this.key=++v,this.viewType=e,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(t){let e=this.reusableViews.get(t);return e&&e.length>0?e.shift():new b(this.virtualizer,this,t)}reuseChild(t){t.prepareForReuse();let e=this.reusableViews.get(t.viewType);e||(e=[],this.reusableViews.set(t.viewType,e)),e.push(t)}}class S extends m{constructor(t){super(t,"root")}}class b extends m{constructor(t,e,i){super(t,i),this.parent=e}}class x{setVisibleRect(t){let e=performance.now()-this.startTime;e<500&&(t.x!==this.visibleRect.x&&e>0&&(this.velocity.x=(t.x-this.visibleRect.x)/e),t.y!==this.visibleRect.y&&e>0&&(this.velocity.y=(t.y-this.visibleRect.y)/e)),this.startTime=performance.now(),this.visibleRect=t}getOverscannedRect(){let t=this.visibleRect.copy(),e=this.visibleRect.height/3;t.height+=e,this.velocity.y<0&&(t.y-=e);let i=this.visibleRect.width/3;return t.width+=i,this.velocity.x<0&&(t.x-=i),t}constructor(){this.startTime=0,this.velocity=new p(0,0),this.visibleRect=new w}}function I(t){return"x"===t?"width":"height"}function R(t,e,i,n,s){if("start"===i)return t[n]<=s;let o=I(n);return e[o]-(t[n]+t[o])<=s}function C(t,e,i,n,s,o,r,l,a,h){let d=t=>"x"===e?new w(t,a.y,a.width,a.height):new w(a.x,t,a.width,a.height);if(i){let t=function(t,e,i,n,s){let o=i(t.key);if(!o)return null;let r=o.rect[t.corner][e]-n[e]-t.offset;if(0===r)return null;let l=n[e]+r,a=I(e),h=Math.max(0,s[a]-n[a]),d=Math.max(0,Math.min(h,l));return d!==n[e]?d:null}(i,e,l,a,h);if(null!=t)return d(t)}if(n&&!s&&(!o||r>0)){let i=d(function(t,e,i,n){if("start"===t)return 0;let s=I(e);return Math.max(0,i[s]-n[s])}(t,e,h,a));return i.equals(a)?null:i}return null}class k{reset(){this.hasSnappedToEdge=!1,this.hadEstimatedVisibleItems=!1,this.wasNearAnchorEdge=!1}captureBeforeLayout(t,e,i){return t?function(t,e,i,n,s=()=>!0){let o=I(e),r=null;for(let[l,a]of n){if(!a||!s(a))continue;let n=a.rect.intersection(i)[o];if(a.rect.area>0&&n>=4){let n=a.rect.getCornerInRect(i)??"topLeft",s=a.rect[n][e]-i[e];(!r||("end"===t?s<r.offset:s>r.offset))&&(r={key:l,corner:n,offset:s})}}return r}(t.edge,t.axis,i,e,t.isAnchorable):null}resolveAfterLayout(t){let{anchorInfo:e,anchor:i,postLayoutInfos:n,previousVisibleRect:s,previousContentSize:o,contentSize:r,itemSizeChanged:l,isScrolling:a,getLayoutInfo:h}=t;if(!e)return null;let d=this.hadEstimatedVisibleItems,u=this.wasNearAnchorEdge,c=!1;for(let z of n.values())if(z.estimatedSize){c=!0;break}if(this.hadEstimatedVisibleItems=c,d||(this.wasNearAnchorEdge=R(s,o,e.edge,e.axis,e.threshold)),0===s.area)return null;let y="x"===e.axis?"width":"height",g=r[y]-o[y],f=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=!0,!f&&0===g&&!l)return null;let p=f||d&&u||R(s,o,e.edge,e.axis,e.threshold);d||(this.wasNearAnchorEdge=p);let w=f||d&&u?null:i;return C(e.edge,e.axis,w,p,a,l,g,h,sLine truncated
import{eg as t,bp as e,cN as i,el as n,eZ as s,e_ as o,es as r,ez as l,eP as a,eR as h,e$ as d,e6 as u,f0 as c}from"./index-HxEUeoab.js";import{r as y,$ as g,a as f}from"./vendor-react-64fcanlc.js";class p{constructor(t=0,e=0){this.x=t,this.y=e}copy(){return new p(this.x,this.y)}equals(t){return this.x===t.x&&this.y===t.y}isOrigin(){return 0===this.x&&0===this.y}}class w{constructor(t=0,e=0,i=0,n=0){this.x=t,this.y=e,this.width=i,this.height=n}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new p(this.x,this.y)}get topRight(){return new p(this.maxX,this.y)}get bottomLeft(){return new p(this.x,this.maxY)}get bottomRight(){return new p(this.maxX,this.maxY)}intersects(t){return this.area>0&&t.area>0&&this.x<=t.x+t.width&&t.x<=this.x+this.width&&this.y<=t.y+t.height&&t.y<=this.y+this.height}containsRect(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.maxX&&this.maxY>=t.maxY}containsPoint(t){return this.x<=t.x&&this.y<=t.y&&this.maxX>=t.x&&this.maxY>=t.y}getCornerInRect(t){for(let e of["topLeft","topRight","bottomLeft","bottomRight"])if(t.containsPoint(this[e]))return e;return null}equals(t){return t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height}pointEquals(t){return this.x===t.x&&this.y===t.y}sizeEquals(t){return this.width===t.width&&this.height===t.height}union(t){let e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),n=Math.max(this.maxX,t.maxX)-e,s=Math.max(this.maxY,t.maxY)-i;return new w(e,i,n,s)}intersection(t){if(!this.intersects(t))return new w(0,0,0,0);let e=Math.max(this.x,t.x),i=Math.max(this.y,t.y);return new w(e,i,Math.min(this.maxX,t.maxX)-e,Math.min(this.maxY,t.maxY)-i)}copy(){return new w(this.x,this.y,this.width,this.height)}}class z{constructor(t=0,e=0){this.width=Math.max(t,0),this.height=Math.max(e,0)}copy(){return new z(this.width,this.height)}equals(t){return this.width===t.width&&this.height===t.height}get area(){return this.width*this.height}}let v=0;class m{constructor(t,e){this.virtualizer=t,this.key=++v,this.viewType=e,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null}getReusableView(t){let e=this.reusableViews.get(t);return e&&e.length>0?e.shift():new b(this.virtualizer,this,t)}reuseChild(t){t.prepareForReuse();let e=this.reusableViews.get(t.viewType);e||(e=[],this.reusableViews.set(t.viewType,e)),e.push(t)}}class S extends m{constructor(t){super(t,"root")}}class b extends m{constructor(t,e,i){super(t,i),this.parent=e}}class x{setVisibleRect(t){let e=performance.now()-this.startTime;e<500&&(t.x!==this.visibleRect.x&&e>0&&(this.velocity.x=(t.x-this.visibleRect.x)/e),t.y!==this.visibleRect.y&&e>0&&(this.velocity.y=(t.y-this.visibleRect.y)/e)),this.startTime=performance.now(),this.visibleRect=t}getOverscannedRect(){let t=this.visibleRect.copy(),e=this.visibleRect.height/3;t.height+=e,this.velocity.y<0&&(t.y-=e);let i=this.visibleRect.width/3;return t.width+=i,this.velocity.x<0&&(t.x-=i),t}constructor(){this.startTime=0,this.velocity=new p(0,0),this.visibleRect=new w}}function I(t){return"x"===t?"width":"height"}function R(t,e,i,n,s){if("start"===i)return t[n]<=s;let o=I(n);return e[o]-(t[n]+t[o])<=s}function C(t,e,i,n,s,o,r,l,a,h){let d=t=>"x"===e?new w(t,a.y,a.width,a.height):new w(a.x,t,a.width,a.height);if(i){let t=function(t,e,i,n,s){let o=i(t.key);if(!o)return null;let r=o.rect[t.corner][e]-n[e]-t.offset;if(0===r)return null;let l=n[e]+r,a=I(e),h=Math.max(0,s[a]-n[a]),d=Math.max(0,Math.min(h,l));return d!==n[e]?d:null}(i,e,l,a,h);if(null!=t)return d(t)}if(n&&!s&&(!o||r>0)){let i=d(function(t,e,i,n){if("start"===t)return 0;let s=I(e);return Math.max(0,i[s]-n[s])}(t,e,h,a));return i.equals(a)?null:i}return null}class k{reset(){this.hasSnappedToEdge=!1,this.hadEstimatedVisibleItems=!1,this.wasNearAnchorEdge=!1}captureBeforeLayout(t,e,i){return t?function(t,e,i,n,s=()=>!0){let o=I(e),r=null;for(let[l,a]of n){if(!a||!s(a))continue;let n=a.rect.intersection(i)[o];if(a.rect.area>0&&n>=4){let n=a.rect.getCornerInRect(i)??"topLeft",s=a.rect[n][e]-i[e];(!r||("end"===t?s<r.offset:s>r.offset))&&(r={key:l,corner:n,offset:s})}}return r}(t.edge,t.axis,i,e,t.isAnchorable):null}resolveAfterLayout(t){let{anchorInfo:e,anchor:i,postLayoutInfos:n,previousVisibleRect:s,previousContentSize:o,contentSize:r,itemSizeChanged:l,isScrolling:a,getLayoutInfo:h}=t;if(!e)return null;let d=this.hadEstimatedVisibleItems,u=this.wasNearAnchorEdge,c=!1;for(let z of n.values())if(z.estimatedSize){c=!0;break}if(this.hadEstimatedVisibleItems=c,d||(this.wasNearAnchorEdge=R(s,o,e.edge,e.axis,e.threshold)),0===s.area)return null;let y="x"===e.axis?"width":"height",g=r[y]-o[y],f=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=!0,!f&&0===g&&!l)return null;let p=f||d&&u||R(s,o,e.edge,e.axis,e.threshold);d||(this.wasNearAnchorEdge=p);let w=f||d&&u?null:i;return C(e.edge,e.axis,w,p,a,l,g,h,sLine truncated
@@ -1,2 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AreaChart-hPc0US1K.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-XeGFdFb3.js","./index-BClYdby3.css","./AreaCurve-DQSHOSpG.js","./array-C0VuvQyb.js","./nodes-Bm1vmvln.js","./AppearanceControls-Q-jHRGz9.js","./ItemText-Bvif-kkw.js","./logs-DNePHVHd.js","./Select-OqnbuzuK.js","./Sparkline-ByQBSxiF.js","./Donut-BMxkBF7W.js","./Editors-D7Xgy5vR.js","./GridList-wfRSpULl.js","./Checkbox-BewExwKL.js","./Delete-BlpuXHjZ.js","./Editors-rPgk_VZK.css","./index-BF-omOFK.js","./geodata-X0pHz03D.js","./auth-C2Jiec7E.js","./auth-5ngSjiJI.js"])))=>i.map(i=>d[i]);
import{r as e,a as t,j as n}from"./vendor-react-64fcanlc.js";import{d as s,h as a,n as r,o as i,w as o,s as l,R as c,S as d,a as u,b as m,I as h,L as p,u as f,_ as g,c as b,e as x,N as v,T as y,f as j,g as w,i as k,j as N,B as M,E as _,C as S,k as C,l as E,P as L,m as z,p as R,q as O,r as P,t as A,v as q,x as I,y as T,z as D,A as H,D as F,F as B,G as $,H as V,J as W,K as U,M as G,O as K,Q as J,U as X,V as Y,W as Q,X as Z,Y as ee,Z as te,$ as ne,a0 as se,a1 as ae,a2 as re,a3 as ie,a4 as oe,a5 as le,a6 as ce,a7 as de,a8 as ue,a9 as me,aa as he,ab as pe,ac as fe,ad as ge,ae as be,af as xe,ag as ve,ah as ye,ai as je,aj as we,ak as ke,al as Ne,am as Me,an as _e,ao as Se,ap as Ce,aq as Ee,ar as Le,as as ze,at as Re,au as Oe,av as Pe,aw as Ae,ax as qe,ay as Ie,az as Te,aA as De,aB as He,aC as Fe,aD as Be,aE as $e,aF as Ve,aG as We,aH as Ue,aI as Ge,aJ as Ke,aK as Je,aL as Xe,aM as Ye,aN as Qe,aO as Ze,aP as et,aQ as tt,aR as nt,aS as st,aT as at,aU as rt,aV as it,aW as ot,aX as lt,aY as ct,aZ as dt,a_ as ut,a$ as mt,b0 as ht,b1 as pt,b2 as ft,b3 as gt,b4 as bt,b5 as xt,b6 as vt,b7 as yt,b8 as jt,b9 as wt,ba as kt,bb as Nt,bc as Mt,bd as _t,be as St,bf as Ct,bg as Et,bh as Lt,bi as zt,bj as Rt,bk as Ot,bl as Pt,bm as At,bn as qt,bo as It,bp as Tt,bq as Dt,br as Ht,bs as Ft,bt as Bt,bu as $t,bv as Vt,bw as Wt,bx as Ut}from"./index-XeGFdFb3.js";import{r as Gt,c as Kt,s as Jt,h as Xt,d as Yt,i as Qt,a as Zt,b as en,e as tn,f as nn,g as sn,j as an,n as rn,u as on,k as ln,l as cn,p as dn,m as un,o as mn,q as hn,t as pn,v as fn,w as gn,x as bn,y as xn,z as vn,A as yn,B as jn}from"./nodes-Bm1vmvln.js";import{L as wn,C as kn,u as Nn,a as Mn,P as _n,S as Sn,T as Cn,b as En,c as Ln}from"./AppearanceControls-Q-jHRGz9.js";import{W as zn,S as Rn,u as On,a as Pn,b as An,c as qn,e as In,d as Tn,l as Dn,f as Hn,g as Fn,h as Bn,i as $n,V as Vn,C as Wn,r as Un,K as Gn,D as Kn,j as Jn,M as Xn,$ as Yn,k as Qn,m as Zn,n as es}from"./logs-DNePHVHd.js";import{I as ts,C as ns}from"./ItemText-Bvif-kkw.js";const ss={"missing-offline-dependency":"config.diagnostic.offlineMissing","offline-dependency-denied":"config.diagnostic.offlineDenied","invalid-offline-dependency":"config.diagnostic.offlineInvalid","unreadable-offline-dependency":"config.diagnostic.offlineUnreadable"},as=e=>Object.hasOwn(ss,e);function rs(e,t,n){return as(e.code)?{summary:t("config.diagnostic.offline",{reason:t(ss[e.code]),which:n?t("config.diagnostic.offlineGeodata",{files:n}):t("config.diagnostic.offlineUsual")})}:s(e,t)}const is=e=>[...new Set(e.flatMap(({item:e,message:t})=>e.message&&!t.includes(e.message)?[e.message]:[]))];function os(e,t){const n=e.map(e=>e.id===t?.id?t.content:e.content).flatMap(e=>void 0===e?[]:Gt(e));return[...new Map(n.map(({name:e,written:t})=>[t,{name:e,written:t}])).values()]}const ls=e=>"<redacted>"===e.path||""===e.path,cs=e=>ls(e)?"main"===e.kind?"config.dae":`${e.kind}-${e.id.slice(0,8)}.dae`:e.path.split("/").pop()||"config.dae";function ds(e,t){const n=e.find(e=>"main"===e.kind);if(!n)return null;const s=[n,...e.filter(e=>"include"===e.kind&&!ls(e))];return t&&!s.some(e=>e.id===t.id)?null:s.map(e=>({id:e.id,...ls(e)?{}:{path:e.path},content:e.id===t?.id?t.content:e.content}))}const us=e=>e.filter(e=>"error"===e.level&&"restart-required"===e.code).map(e=>({key:/\b[a-z][a-z0-9_]*(?:\.[a-z0-9_]+)+\b/.exec(e.message)?.[0]??(e.message||null),sourceId:e.source_id,line:e.line})),ms=e=>us(e).length,hs={main:"config.kind.main",include:"config.kind.include",subscription:"nodes.kind.subscription",generated:"config.kind.generated"},ps=(e,t)=>`${e}:${t}`;function fs(e,t){const n=e.indexOf(":"),s=e.slice(0,n);return n>0&&t.includes(s)?{kind:s,value:e.slice(n+1)}:null}const gs=(e,t)=>t&&e?a("rules",{tab:"list",rule:e}):void 0,bs=(e,t,n=!1)=>a("nodes",{provider:r(e,t),q:e.name,node:n?e.id??null:null});function xs(e,t){const n=e?.find(e=>e.name===t)?.id;return n?o("",{group:n}):""}function vs(e,t,n){const s=t?.find(t=>t.name===e);return s?{label:s.name,href:a("policies",{group:s.id})}:{label:i(e,n),href:null}}const ys=["network","domain","dst_ip","dst_port","src_ip","src_port","pname"],js=e=>o("",{tab:"trace",...Object.fromEntries(ys.map(t=>[t,e[t]||null]))});function ws(e){const t=new URLSearchParams(e),n=e=>t.get(e)??"";return n("domain")||n("dst_ip")?{network:"udp"===n("network")?"udp":"tcp",domain:n("domain"),dst_ip:n("dst_ip"),dst_port:n("dst_port"),src_ip:n("src_ip"),src_port:n("src_port"),pname:n("pname")}:null}const ks=a("settings",{card:"runtime"});function Ns(e,t=Kt){return e?fs(e,t):null}function Ms(e,t){const n=e.filter(e=>"main"===e.kind||"include"===e.kind);for(const s of n){const e=Jt(s.content).blocks.find(e=>e.name===t);if(e)return a("config",{tab:"source",source:s.id,line:String(e.line+1)})}return a("config",{tab:"source",source:n.find(e=>"main"===e.kind)?.id??null})}const _s=a("activity",{card:"mode"}),Ss=a("overview",{card:"limits"}),Cs=e=>a("nodes",{nodes:JSON.stringify(e)});let Es=!1;const Ls=new Set,zs={snapshot:()=>Es,set(e){Line truncated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AreaChart-CMjcgmpk.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-HxEUeoab.js","./index-CcbWXWDN.css","./AreaCurve-DQSHOSpG.js","./array-C0VuvQyb.js","./nodes-6sIn2I0s.js","./AppearanceControls-sRy1p156.js","./ItemText-DOD_75iR.js","./logs-C4GIy4tX.js","./Select-D7_6MaHd.js","./Sparkline-rgYPkbE4.js","./Donut-CLXBHnKk.js","./Editors-DQ5Z_NlY.js","./GridList-D7qdplA5.js","./Checkbox-CJt7u9-e.js","./Delete-CR2AtZsd.js","./Editors-rPgk_VZK.css","./index-B-vRbGlz.js","./geodata-X0pHz03D.js","./auth-BHtDKZwR.js","./auth-CSMbhh2E.js"])))=>i.map(i=>d[i]);
import{r as e,a as t,j as n}from"./vendor-react-64fcanlc.js";import{d as s,h as a,n as r,o as i,w as o,s as l,R as c,S as d,a as u,b as m,I as h,L as p,u as f,_ as g,c as b,e as x,N as v,T as y,f as j,g as w,i as k,j as N,B as M,E as _,C as S,k as C,l as E,P as L,m as z,p as R,q as O,r as P,t as A,v as q,x as I,y as T,z as D,A as H,D as F,F as B,G as $,H as V,J as W,K as U,M as G,O as K,Q as J,U as X,V as Y,W as Q,X as Z,Y as ee,Z as te,$ as ne,a0 as se,a1 as ae,a2 as re,a3 as ie,a4 as oe,a5 as le,a6 as ce,a7 as de,a8 as ue,a9 as me,aa as he,ab as pe,ac as fe,ad as ge,ae as be,af as xe,ag as ve,ah as ye,ai as je,aj as we,ak as ke,al as Ne,am as Me,an as _e,ao as Se,ap as Ce,aq as Ee,ar as Le,as as ze,at as Re,au as Oe,av as Pe,aw as Ae,ax as qe,ay as Ie,az as Te,aA as De,aB as He,aC as Fe,aD as Be,aE as $e,aF as Ve,aG as We,aH as Ue,aI as Ge,aJ as Ke,aK as Je,aL as Xe,aM as Ye,aN as Qe,aO as Ze,aP as et,aQ as tt,aR as nt,aS as st,aT as at,aU as rt,aV as it,aW as ot,aX as lt,aY as ct,aZ as dt,a_ as ut,a$ as mt,b0 as ht,b1 as pt,b2 as ft,b3 as gt,b4 as bt,b5 as xt,b6 as vt,b7 as yt,b8 as jt,b9 as wt,ba as kt,bb as Nt,bc as Mt,bd as _t,be as St,bf as Ct,bg as Et,bh as Lt,bi as zt,bj as Rt,bk as Ot,bl as Pt,bm as At,bn as qt,bo as It,bp as Tt,bq as Dt,br as Ht,bs as Ft,bt as Bt,bu as $t,bv as Vt,bw as Wt,bx as Ut}from"./index-HxEUeoab.js";import{r as Gt,c as Kt,s as Jt,h as Xt,d as Yt,i as Qt,a as Zt,b as en,e as tn,f as nn,g as sn,j as an,n as rn,u as on,k as ln,l as cn,p as dn,m as un,o as mn,q as hn,t as pn,v as fn,w as gn,x as bn,y as xn,z as vn,A as yn,B as jn}from"./nodes-6sIn2I0s.js";import{L as wn,C as kn,u as Nn,a as Mn,P as _n,S as Sn,T as Cn,b as En,c as Ln}from"./AppearanceControls-sRy1p156.js";import{W as zn,S as Rn,u as On,a as Pn,b as An,c as qn,e as In,d as Tn,l as Dn,f as Hn,g as Fn,h as Bn,i as $n,V as Vn,C as Wn,r as Un,K as Gn,D as Kn,j as Jn,M as Xn,$ as Yn,k as Qn,m as Zn,n as es}from"./logs-C4GIy4tX.js";import{I as ts,C as ns}from"./ItemText-DOD_75iR.js";const ss={"missing-offline-dependency":"config.diagnostic.offlineMissing","offline-dependency-denied":"config.diagnostic.offlineDenied","invalid-offline-dependency":"config.diagnostic.offlineInvalid","unreadable-offline-dependency":"config.diagnostic.offlineUnreadable"},as=e=>Object.hasOwn(ss,e);function rs(e,t,n){return as(e.code)?{summary:t("config.diagnostic.offline",{reason:t(ss[e.code]),which:n?t("config.diagnostic.offlineGeodata",{files:n}):t("config.diagnostic.offlineUsual")})}:s(e,t)}const is=e=>[...new Set(e.flatMap(({item:e,message:t})=>e.message&&!t.includes(e.message)?[e.message]:[]))];function os(e,t){const n=e.map(e=>e.id===t?.id?t.content:e.content).flatMap(e=>void 0===e?[]:Gt(e));return[...new Map(n.map(({name:e,written:t})=>[t,{name:e,written:t}])).values()]}const ls=e=>"<redacted>"===e.path||""===e.path,cs=e=>ls(e)?"main"===e.kind?"config.dae":`${e.kind}-${e.id.slice(0,8)}.dae`:e.path.split("/").pop()||"config.dae";function ds(e,t){const n=e.find(e=>"main"===e.kind);if(!n)return null;const s=[n,...e.filter(e=>"include"===e.kind&&!ls(e))];return t&&!s.some(e=>e.id===t.id)?null:s.map(e=>({id:e.id,...ls(e)?{}:{path:e.path},content:e.id===t?.id?t.content:e.content}))}const us=e=>e.filter(e=>"error"===e.level&&"restart-required"===e.code).map(e=>({key:/\b[a-z][a-z0-9_]*(?:\.[a-z0-9_]+)+\b/.exec(e.message)?.[0]??(e.message||null),sourceId:e.source_id,line:e.line})),ms=e=>us(e).length,hs={main:"config.kind.main",include:"config.kind.include",subscription:"nodes.kind.subscription",generated:"config.kind.generated"},ps=(e,t)=>`${e}:${t}`;function fs(e,t){const n=e.indexOf(":"),s=e.slice(0,n);return n>0&&t.includes(s)?{kind:s,value:e.slice(n+1)}:null}const gs=(e,t)=>t&&e?a("rules",{tab:"list",rule:e}):void 0,bs=(e,t,n=!1)=>a("nodes",{provider:r(e,t),q:e.name,node:n?e.id??null:null});function xs(e,t){const n=e?.find(e=>e.name===t)?.id;return n?o("",{group:n}):""}function vs(e,t,n){const s=t?.find(t=>t.name===e);return s?{label:s.name,href:a("policies",{group:s.id})}:{label:i(e,n),href:null}}const ys=["network","domain","dst_ip","dst_port","src_ip","src_port","pname"],js=e=>o("",{tab:"trace",...Object.fromEntries(ys.map(t=>[t,e[t]||null]))});function ws(e){const t=new URLSearchParams(e),n=e=>t.get(e)??"";return n("domain")||n("dst_ip")?{network:"udp"===n("network")?"udp":"tcp",domain:n("domain"),dst_ip:n("dst_ip"),dst_port:n("dst_port"),src_ip:n("src_ip"),src_port:n("src_port"),pname:n("pname")}:null}const ks=a("settings",{card:"runtime"});function Ns(e,t=Kt){return e?fs(e,t):null}function Ms(e,t){const n=e.filter(e=>"main"===e.kind||"include"===e.kind);for(const s of n){const e=Jt(s.content).blocks.find(e=>e.name===t);if(e)return a("config",{tab:"source",source:s.id,line:String(e.line+1)})}return a("config",{tab:"source",source:n.find(e=>"main"===e.kind)?.id??null})}const _s=a("activity",{card:"mode"}),Ss=a("overview",{card:"limits"}),Cs=e=>a("nodes",{nodes:JSON.stringify(e)});let Es=!1;const Ls=new Set,zs={snapshot:()=>Es,set(e){Line truncated
@@ -1 +1 @@
import{D as e}from"./auth-5ngSjiJI.js";import{aM as t,bK as o}from"./index-XeGFdFb3.js";import"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";const r="demo-session-";function n(){return{mode:"password",setup_required:!1}}const s={auth_setup:"/api/v1/auth/setup",auth_login:"/api/v1/auth/login"};function a(n,s){if("setup"===n)throw new t(409,"setup_already_completed","Setup already completed");if(s.username!==e.username||s.password!==e.password)throw new t(401,"invalid_credentials","Invalid credentials");return{token:r+o(),expires_at:new Date(Date.now()+432e5).toISOString()}}function i(e){return!!e?.startsWith(r)}function u(e){return{...e,discovery:async t=>{const o=await e.discovery(t);return"status"in o?{...o,links:{...o.links,...s,auth_logout:"/api/v1/auth/logout"},auth:{mode:"password",setup_required:!1,anonymous_loopback:!1}}:o}}}function d(e){const o=()=>Promise.reject(new t(401,"authentication_required","Authentication required")),r=async e=>(e?.throwIfAborted(),{name:"daeuniverse/native",api_major:1,links:{...s},auth:{mode:"password",setup_required:!1}});return new Proxy(e,{get:(e,t,n)=>"discovery"===t?r:"function"==typeof Reflect.get(e,t,n)?o:void 0})}export{n as mockDiscovery,a as mockOpenSession,i as mockSessionValid,d as refuseWithoutSession,u as withPasswordAuth};
import{D as e}from"./auth-CSMbhh2E.js";import{aM as t,bK as o}from"./index-HxEUeoab.js";import"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";const r="demo-session-";function n(){return{mode:"password",setup_required:!1}}const s={auth_setup:"/api/v1/auth/setup",auth_login:"/api/v1/auth/login"};function a(n,s){if("setup"===n)throw new t(409,"setup_already_completed","Setup already completed");if(s.username!==e.username||s.password!==e.password)throw new t(401,"invalid_credentials","Invalid credentials");return{token:r+o(),expires_at:new Date(Date.now()+432e5).toISOString()}}function i(e){return!!e?.startsWith(r)}function u(e){return{...e,discovery:async t=>{const o=await e.discovery(t);return"status"in o?{...o,links:{...o.links,...s,auth_logout:"/api/v1/auth/logout"},auth:{mode:"password",setup_required:!1,anonymous_loopback:!1}}:o}}}function d(e){const o=()=>Promise.reject(new t(401,"authentication_required","Authentication required")),r=async e=>(e?.throwIfAborted(),{name:"daeuniverse/native",api_major:1,links:{...s},auth:{mode:"password",setup_required:!1}});return new Proxy(e,{get:(e,t,n)=>"discovery"===t?r:"function"==typeof Reflect.get(e,t,n)?o:void 0})}export{n as mockDiscovery,a as mockOpenSession,i as mockSessionValid,d as refuseWithoutSession,u as withPasswordAuth};
@@ -1,2 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./auth-C2Jiec7E.js","./index-XeGFdFb3.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-BClYdby3.css"])))=>i.map(i=>d[i]);
import{bz as a,dW as t,dX as o,t as n,_ as e}from"./index-XeGFdFb3.js";const i=(a,t)=>new URL(a.replace(/\/+$/,"")+t,globalThis.location?.href),s=()=>e(()=>import("./auth-C2Jiec7E.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),r={username:"demo",password:"demo"};async function c(e,r){if(a(e))return(await s()).mockDiscovery();const c=await t(i(e,"/api"),{headers:{Accept:"application/json"},cache:"no-store",signal:r});if(!c.ok)throw await o(c);const p=await c.json();if("dae/honk-native"===p.name)throw new n("login.engineOutdated");return p.auth}async function p(a,o){return 404!==(await t(i(a,"/api/v1/capabilities"),{headers:{Accept:"application/json"},cache:"no-store",signal:o})).status}function u(a){return"password"!==a.mode?"token":a.setup_required?"setup":"login"}async function h(n,e,r,c){if(a(n))return(await s()).mockOpenSession(e,r);const p=await t(i(n,`/api/v1/auth/${e}`),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r),cache:"no-store",signal:c},"setup"===e);if(!p.ok)throw await o(p,"POST");return p.json()}async function d(n,e,s){if(a(n))return;const r=await t(i(n,"/api/v1/auth/logout"),{method:"POST",headers:{Accept:"application/json",Authorization:"Bearer "+e},cache:"no-store",signal:s});if(!r.ok&&401!==r.status)throw await o(r,"POST")}export{r as D,p as a,d as c,c as d,h as o,u as s};
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./auth-BHtDKZwR.js","./index-HxEUeoab.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./index-CcbWXWDN.css"])))=>i.map(i=>d[i]);
import{bz as a,dW as t,dX as o,t as n,_ as e}from"./index-HxEUeoab.js";const i=(a,t)=>new URL(a.replace(/\/+$/,"")+t,globalThis.location?.href),s=()=>e(()=>import("./auth-BHtDKZwR.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),r={username:"demo",password:"demo"};async function c(e,r){if(a(e))return(await s()).mockDiscovery();const c=await t(i(e,"/api"),{headers:{Accept:"application/json"},cache:"no-store",signal:r});if(!c.ok)throw await o(c);const p=await c.json();if("dae/honk-native"===p.name)throw new n("login.engineOutdated");return p.auth}async function p(a,o){return 404!==(await t(i(a,"/api/v1/capabilities"),{headers:{Accept:"application/json"},cache:"no-store",signal:o})).status}function u(a){return"password"!==a.mode?"token":a.setup_required?"setup":"login"}async function h(n,e,r,c){if(a(n))return(await s()).mockOpenSession(e,r);const p=await t(i(n,`/api/v1/auth/${e}`),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r),cache:"no-store",signal:c},"setup"===e);if(!p.ok)throw await o(p,"POST");return p.json()}async function d(n,e,s){if(a(n))return;const r=await t(i(n,"/api/v1/auth/logout"),{method:"POST",headers:{Accept:"application/json",Authorization:"Bearer "+e},cache:"no-store",signal:s});if(!r.ok&&401!==r.status)throw await o(r,"POST")}export{r as D,p as a,d as c,c as d,h as o,u as s};
@@ -1 +1 @@
import{a9 as e,f8 as n,q as t,f9 as s,fa as a,aq as r,fb as o,d6 as i,fc as l}from"./index-XeGFdFb3.js";async function u(e,{input:n,resolve:t,recordTypes:s},a){if("query"!==t)return{traces:[await e.routingTrace({input:n,resolve:t},a)],query:null};const r=await e.dnsQuery(n.domain,s,a),o=[...new Set(["A","AAAA"].flatMap(e=>r.results.filter(n=>n.type===e).map(i).find(Boolean)??[]))],u=[];for(const i of o.length?o:[null])u.push(await e.routingTrace({input:i?{...n,dst_ip:i}:n,resolve:"none"},a));if(u.some(e=>e.instance_id!==u[0].instance_id||e.generation_id!==u[0].generation_id))throw l(409,"snapshot_unavailable","The routing generation changed during simulation; retry the query","ui.errGenerationChanged");return{traces:u,query:r}}function c({connection_id:i,network:l="all",state:u="all"}={},c=!0,f=!1){const d=e(),{data:w,error:p}=t(),y=s(w,w?.resources.flows.max_page_size);return n({key:["flows",{connection_id:i,network:l,state:u,limit:y}],every:r.lists,fetch:e=>o(n=>d.flows({network:l,state:u,connection_id:i,cursor:n,limit:y,detail:"full"},e),(e,n)=>e?(e.flows.push(...n.flows),e):{...n,flows:[...n.flows]})},{...a(w,p,c),paused:f})}function f(t){const s=e();return n({key:["flow",{id:t}],fetch:e=>t?s.flow(t,e):Promise.resolve(null),acceptEvent:e=>"flow.updated"!==e.event||e.data.resource_id===t},{enabled:null!==t})}function d(t=!0){const s=e();return n({key:["rules"],every:0,fetch:e=>s.rules(e)},{enabled:t})}function w(t=!0){const s=e();return n({key:["dnsRules"],every:0,fetch:e=>s.dnsRules(e)},{enabled:t})}export{c as a,f as b,w as c,u as r,d as u};
import{a9 as e,f8 as n,q as t,f9 as s,fa as a,aq as r,fb as o,d6 as i,fc as l}from"./index-HxEUeoab.js";async function u(e,{input:n,resolve:t,recordTypes:s},a){if("query"!==t)return{traces:[await e.routingTrace({input:n,resolve:t},a)],query:null};const r=await e.dnsQuery(n.domain,s,a),o=[...new Set(["A","AAAA"].flatMap(e=>r.results.filter(n=>n.type===e).map(i).find(Boolean)??[]))],u=[];for(const i of o.length?o:[null])u.push(await e.routingTrace({input:i?{...n,dst_ip:i}:n,resolve:"none"},a));if(u.some(e=>e.instance_id!==u[0].instance_id||e.generation_id!==u[0].generation_id))throw l(409,"snapshot_unavailable","The routing generation changed during simulation; retry the query","ui.errGenerationChanged");return{traces:u,query:r}}function c({connection_id:i,network:l="all",state:u="all"}={},c=!0,f=!1){const d=e(),{data:w,error:p}=t(),y=s(w,w?.resources.flows.max_page_size);return n({key:["flows",{connection_id:i,network:l,state:u,limit:y}],every:r.lists,fetch:e=>o(n=>d.flows({network:l,state:u,connection_id:i,cursor:n,limit:y,detail:"full"},e),(e,n)=>e?(e.flows.push(...n.flows),e):{...n,flows:[...n.flows]})},{...a(w,p,c),paused:f})}function f(t){const s=e();return n({key:["flow",{id:t}],fetch:e=>t?s.flow(t,e):Promise.resolve(null),acceptEvent:e=>"flow.updated"!==e.event||e.data.resource_id===t},{enabled:null!==t})}function d(t=!0){const s=e();return n({key:["rules"],every:0,fetch:e=>s.rules(e)},{enabled:t})}function w(t=!0){const s=e();return n({key:["dnsRules"],every:0,fetch:e=>s.dnsRules(e)},{enabled:t})}export{c as a,f as b,w as c,u as r,d as u};
@@ -1 +1 @@
import{A as e,aK as s}from"./index-XeGFdFb3.js";import"./vendor-react-64fcanlc.js";import{s as t}from"./nodes-Bm1vmvln.js";function a(e){const{tokens:s}=t(e),a=t=>s[t]?e.slice(s[t].from,s[t].to):"",i=new Set(s.flatMap((e,s)=>"text"===e.kind&&e.parens>0&&":"===a(s+1)&&["(",","].includes(a(s-1))?[a(s)]:[]));return["geosite","geoip"].filter(e=>i.has(e))}function i(e,s,t){const a=s?.available?s.assets??[]:null,i=e=>t?.assets.some(s=>s.kind===e&&"0"===s.size_bytes)??!1,n=e&&a?e.filter(e=>!a.includes(e)||i(e)):(a??[]).filter(i),o=!!s?.can_update&&!!e?.length&&!!a&&e.every(e=>a.includes(e));return{missing:n.map(e=>`${e}.dat`),repair:o}}const n=(t,a)=>t.then(s=>(s&&e("positive",a("settings.geodataUpdated")),!!s),e=>(s(e,a,a("settings.geodataFailed")),!1));export{n as a,a as b,i as g};
import{A as e,aK as s}from"./index-HxEUeoab.js";import"./vendor-react-64fcanlc.js";import{s as t}from"./nodes-6sIn2I0s.js";function a(e){const{tokens:s}=t(e),a=t=>s[t]?e.slice(s[t].from,s[t].to):"",i=new Set(s.flatMap((e,s)=>"text"===e.kind&&e.parens>0&&":"===a(s+1)&&["(",","].includes(a(s-1))?[a(s)]:[]));return["geosite","geoip"].filter(e=>i.has(e))}function i(e,s,t){const a=s?.available?s.assets??[]:null,i=e=>t?.assets.some(s=>s.kind===e&&"0"===s.size_bytes)??!1,n=e&&a?e.filter(e=>!a.includes(e)||i(e)):(a??[]).filter(i),o=!!s?.can_update&&!!e?.length&&!!a&&e.every(e=>a.includes(e));return{missing:n.map(e=>`${e}.dat`),repair:o}}const n=(t,a)=>t.then(s=>(s&&e("positive",a("settings.geodataUpdated")),!!s),e=>(s(e,a,a("settings.geodataFailed")),!1));export{n as a,a as b,i as g};
@@ -0,0 +1 @@
import{bH as e,bI as t,aM as n,bJ as o,bK as r,bL as a,bM as s,bN as i,bO as l,bP as d,aT as c,bQ as u,aS as p,bR as _,M as m,bS as f}from"./index-HxEUeoab.js";import{C as g,D as h,s as b,u as w,E as v,F as y,G as k,H as x,I as S,J as I,r as A,K as q,L as M,M as N,n as $,N as O,O as D,P as C,Q as R,R as j,S as E,v as L}from"./nodes-6sIn2I0s.js";import{d as T,v as P,g as z}from"./geodata-X0pHz03D.js";import{mockSessionValid as U,withPasswordAuth as G,refuseWithoutSession as H}from"./auth-BHtDKZwR.js";import"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./auth-CSMbhh2E.js";const F=Date.now(),J=e=>new Date(F-1e3*e).toISOString(),B=e=>new Date(F+1e3*e).toISOString(),W=J(0),Q="mock-instance-1",V="40",K={"x-honk":{config_export:{available:!0},config_import:{available:!0,replace_required:!0},config_revisions:{available:!0,can_activate:!0,max_revisions:50}}},X={extensions:K,observed_at:W,profiles:["base","full_transparency"],limits:{max_request_target_bytes:4096,max_header_bytes:16384,max_json_body_bytes:65536},resources:{...K,runtime:{available:!0},runtime_memory:{available:!0,metrics:["process.rss_bytes","cgroup.current_bytes","cgroup.limit_bytes","cgroup.events.high","cgroup.events.oom","cgroup.events.oom_kill","kernel.ebpf_bytes"]},datapath:{available:!0,kinds:["ebpf"],details:["attachments","maps"]},runtime_outbounds:{available:!0},traffic_history:{available:!0,max_window_seconds:604800,max_points:360},memory_history:{available:!0,max_window_seconds:604800,max_points:720},nodes:{available:!0,can_manage:!0},providers:{available:!0,can_refresh:!0,can_manage:!0,create_options:{update_interval:86400,user_agent:"honk/0.0.1-alpha",cache:!0},max_page_size:1e3},geodata:{available:!0,can_update:!0,assets:["geosite","geoip"],configurable_sources:!0,checksum:"sha256sum",max_urls:4,interval_hours:{min:1,max:168,default:24},lifecycle:{file_values:"start",overrides_persist:!0}},rules:{available:!0,max_rules:4096},config:{available:!0,writable:!0,create:!0,max_bytes:1048576,max_sources:32},config_validate:{available:!0,modes:["syntax","full"],max_bytes:1048576,max_sources:32},logs:{available:!0,levels:[...t],filters:["level","target"],retention_seconds:86400,min_buffered_records:64,max_buffered_records:4096},dns_log:{available:!0,min_records:64,max_records:2048,max_page_size:500},dns_rules:{available:!0,max_rules:1024},runtime_settings:{available:!0,fields:["log.level","log.buffered_records","dns_log.max_records","flows.max_flows","flows.retention_seconds","record_flows","record_logs","record_dns_log","geodata"]},groups:{available:!0,config_patch:!0,selection:!0,max_patch_operations:32},probes:{available:!0,targets:["node","group"],kinds:["tcp_connect","http","dns"],transports:["tcp","udp"],ip_versions:["ipv4","ipv6"],limits:{max_members_per_job:64,max_results_per_job:256,max_active_jobs:4,max_queued_jobs:16,max_concurrent_per_target:1,job_timeout_ms:3e4,per_principal_requests_per_minute:60,global_requests_per_minute:120}},connections:{available:!0,can_close:!0,max_bulk_close:200},flows:{available:!0,recording:"auto",scopes:["userspace_tcp","userspace_udp","kernel_direct","kernel_block","dns_intercept","kernel_bypass"],min_flows:64,max_flows:4096,max_steps_per_flow:64,retention_seconds:300,snapshot_ttl_seconds:60,max_page_size:1e3},routing_trace:{available:!0,resolve_modes:["none","live"],max_addresses:16,max_rule_steps:128,timeout_ms:5e3,per_principal_requests_per_minute:60,global_requests_per_minute:120},events:{available:!0,kinds:[...e],retention_seconds:300,max_buffered_events:1024,max_clients:16,heartbeat_seconds:15},dns_query:{available:!0,record_types:["A","AAAA","HTTPS"],limits:{max_types_per_request:8,query_timeout_ms:5e3,max_response_bytes:65536,per_principal_requests_per_minute:60,global_requests_per_minute:120}},dns_cache:{available:!0,read:!0,delete_entry:!0,delete_name:!0,flush:!0,entry_kinds:["positive","negative"]},operations:{available:!0,retention_seconds:300},reload:{available:!0},suspend:{available:!0},resume:{available:!0}}},Y={...X.resources};delete Y["x-honk"];const Z={...X,extensions:{},profiles:["base"],resources:{...Y,groups:{...X.resources.groups,config_patch:!1},runtime_outbounds:{available:!1},traffic_history:{available:!1},memory_history:{available:!1},logs:{available:!1},dns_log:{available:!1},dns_rules:{available:!1},runtime_settings:{available:!1},geodata:{available:!1},rules:{available:!1},nodes:{available:!0,can_manage:!1},providers:{available:!0,can_refresh:!1,can_manage:!1,max_page_size:1e3},config:{available:!1,create:!1},config_validate:{available:!1},flows:{...X.resources.flows,available:!1},routing_trace:{...X.resources.routing_trace,available:!1},events:{...X.resources.events,available:!1}}},ee={...X,extensions:{},profiles:["base"],resources:{...Object.fromEntries(Object.keys(Y).map(e=>[e,{available:!1}])),runtime:{available:!0},connections:{available:!0,can_close:!1,max_bulk_close:1e3},config:{available:!1,create:!1}}},te=g("regions").filter(e=>!e.startsLine truncated
@@ -1 +0,0 @@
import{bH as e,bI as t,aM as n,bJ as o,bK as r,bL as a,bM as i,bN as s,bO as l,bP as d,aT as c,bQ as u,aS as p,bR as _,M as m,bS as f}from"./index-XeGFdFb3.js";import{C as g,D as h,s as b,u as w,E as v,F as y,G as k,H as x,I as S,J as I,r as A,K as q,L as M,M as N,n as $,N as O,O as D,P as C,Q as R,R as j,S as E,v as L}from"./nodes-Bm1vmvln.js";import{d as T,v as P,g as z}from"./geodata-X0pHz03D.js";import{mockSessionValid as U,withPasswordAuth as G,refuseWithoutSession as H}from"./auth-C2Jiec7E.js";import"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";import"./auth-5ngSjiJI.js";const F=Date.now(),J=e=>new Date(F-1e3*e).toISOString(),B=e=>new Date(F+1e3*e).toISOString(),W=J(0),Q="mock-instance-1",V="40",K={"x-honk":{config_export:{available:!0},config_import:{available:!0,replace_required:!0},config_revisions:{available:!0,can_activate:!0,max_revisions:50}}},X={extensions:K,observed_at:W,profiles:["base","full_transparency"],limits:{max_request_target_bytes:4096,max_header_bytes:16384,max_json_body_bytes:65536},resources:{...K,runtime:{available:!0},runtime_memory:{available:!0,metrics:["process.rss_bytes","cgroup.current_bytes","cgroup.limit_bytes","cgroup.events.high","cgroup.events.oom","cgroup.events.oom_kill","kernel.ebpf_bytes"]},datapath:{available:!0,kinds:["ebpf"],details:["attachments","maps"]},runtime_outbounds:{available:!0},traffic_history:{available:!0,max_window_seconds:604800,max_points:360},memory_history:{available:!0,max_window_seconds:604800,max_points:720},nodes:{available:!0,can_manage:!0},providers:{available:!0,can_refresh:!0,can_manage:!0,create_options:{update_interval:86400,user_agent:"honk/0.0.1-alpha",cache:!0},max_page_size:1e3},geodata:{available:!0,can_update:!0,assets:["geosite","geoip"],configurable_sources:!0,checksum:"sha256sum",max_urls:4,interval_hours:{min:1,max:168,default:24},lifecycle:{file_values:"start",overrides_persist:!0}},rules:{available:!0,max_rules:4096},config:{available:!0,writable:!0,create:!0,max_bytes:1048576,max_sources:32},config_validate:{available:!0,modes:["syntax","full"],max_bytes:1048576,max_sources:32},logs:{available:!0,levels:[...t],filters:["level","target"],retention_seconds:86400,min_buffered_records:64,max_buffered_records:4096},dns_log:{available:!0,min_records:64,max_records:2048,max_page_size:500},dns_rules:{available:!0,max_rules:1024},runtime_settings:{available:!0,fields:["log.level","log.buffered_records","dns_log.max_records","flows.max_flows","flows.retention_seconds","record_flows","record_logs","record_dns_log","geodata"]},groups:{available:!0,config_patch:!0,selection:!0,max_patch_operations:32},probes:{available:!0,targets:["node","group"],kinds:["tcp_connect","http","dns"],transports:["tcp","udp"],ip_versions:["ipv4","ipv6"],limits:{max_members_per_job:64,max_results_per_job:256,max_active_jobs:4,max_queued_jobs:16,max_concurrent_per_target:1,job_timeout_ms:3e4,per_principal_requests_per_minute:60,global_requests_per_minute:120}},connections:{available:!0,can_close:!0,max_bulk_close:200},flows:{available:!0,recording:"auto",scopes:["userspace_tcp","userspace_udp","kernel_direct","kernel_block","dns_intercept","kernel_bypass"],min_flows:64,max_flows:4096,max_steps_per_flow:64,retention_seconds:300,snapshot_ttl_seconds:60,max_page_size:1e3},routing_trace:{available:!0,resolve_modes:["none","live"],max_addresses:16,max_rule_steps:128,timeout_ms:5e3,per_principal_requests_per_minute:60,global_requests_per_minute:120},events:{available:!0,kinds:[...e],retention_seconds:300,max_buffered_events:1024,max_clients:16,heartbeat_seconds:15},dns_query:{available:!0,record_types:["A","AAAA","HTTPS"],limits:{max_types_per_request:8,query_timeout_ms:5e3,max_response_bytes:65536,per_principal_requests_per_minute:60,global_requests_per_minute:120}},dns_cache:{available:!0,read:!0,delete_entry:!0,delete_name:!0,flush:!0,entry_kinds:["positive","negative"]},operations:{available:!0,retention_seconds:300},reload:{available:!0},suspend:{available:!0},resume:{available:!0}}},Y={...X.resources};delete Y["x-honk"];const Z={...X,extensions:{},profiles:["base"],resources:{...Y,groups:{...X.resources.groups,config_patch:!1},runtime_outbounds:{available:!1},traffic_history:{available:!1},memory_history:{available:!1},logs:{available:!1},dns_log:{available:!1},dns_rules:{available:!1},runtime_settings:{available:!1},geodata:{available:!1},rules:{available:!1},nodes:{available:!0,can_manage:!1},providers:{available:!0,can_refresh:!1,can_manage:!1,max_page_size:1e3},config:{available:!1,create:!1},config_validate:{available:!1},flows:{...X.resources.flows,available:!1},routing_trace:{...X.resources.routing_trace,available:!1},events:{...X.resources.events,available:!1}}},ee={...X,extensions:{},profiles:["base"],resources:{...Object.fromEntries(Object.keys(Y).map(e=>[e,{available:!1}])),runtime:{available:!0},connections:{available:!0,can_close:!1,max_bulk_close:1e3},config:{available:!1,create:!1}}},te=g("regions").filter(e=>!e.startsLine truncated
@@ -1 +1 @@
@font-face{font-family:Twemoji Country Flags;src:url(./TwemojiCountryFlags-Bymva2JV.woff2)format("woff2");font-display:swap;unicode-range:U+1F1E6-1F1FF,U+1F3F4,U+E0061-E007A,U+E007F}:root{--rp-node-flag-edge:drop-shadow(0 0 .5px #00000059)}:root[data-scheme=dark]{--rp-node-flag-edge:none}.rp-truncate.rp-node-name{display:inline-block}.rp-node-flag{filter:var(--rp-node-flag-edge);-webkit-user-select:none;user-select:none;margin-inline-end:var(--rp-space-1);display:inline-block}.rp-node-flag:before{content:attr(data-flag)}.rp-il:has(>.rp-node-flag){gap:var(--rp-space-1)}.rp-il>.rp-node-flag{flex-shrink:0;inline-size:1.25em;margin-inline-end:0}:root,:root[data-family=rose-pine]{--rp-base:#faf4ed;--rp-surface:#fffaf3;--rp-overlay:#f2e9e1;--rp-muted:#9893a5;--rp-subtle:#797593;--rp-text:#464261;--rp-love:#b4637a;--rp-gold:#ea9d34;--rp-rose:#d7827e;--rp-pine:#286983;--rp-foam:#56949f;--rp-iris:#907aa9;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#f4ede8;--rp-hl-med:#dfdad9;--rp-hl-high:#cecacd;--rp-shadow:0 1px 2px #57527914}:root[data-family=rose-pine]{--rp-negative-text:var(--rp-text);--rp-notice-text:var(--rp-text);--rp-positive-text:var(--rp-text);--rp-accent-tile-text:var(--rp-text);--rp-info-tile-text:var(--rp-text);--rp-subtle-text:var(--rp-text)}:root[data-family=rose-pine][data-scheme=dark],:root[data-flavour=moon][data-scheme=dark]{--rp-base:#232136;--rp-surface:#2a273f;--rp-overlay:#393552;--rp-muted:#6e6a86;--rp-subtle:#908caa;--rp-text:#e0def4;--rp-love:#eb6f92;--rp-gold:#f6c177;--rp-rose:#ea9a97;--rp-pine:#3e8fb0;--rp-foam:#9ccfd8;--rp-iris:#c4a7e7;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#2a283e;--rp-hl-med:#44415a;--rp-hl-high:#56526e;--rp-shadow:0 1px 2px #0000004d;--rp-line:var(--rp-hl-med);--rp-fill:var(--rp-hl-med);--rp-on-accent:#191724;--rp-on-notice:var(--rp-on-accent);--rp-accent-text:var(--rp-text);--rp-negative-text:var(--rp-negative);--rp-notice-text:var(--rp-notice);--rp-positive-text:var(--rp-positive);--rp-info-text:var(--rp-text);--rp-negative-tile-text:var(--rp-text)}:root[data-flavour=main][data-scheme=dark]{--rp-base:#191724;--rp-surface:#1f1d2e;--rp-overlay:#26233a;--rp-muted:#6e6a86;--rp-subtle:#908caa;--rp-text:#e0def4;--rp-love:#eb6f92;--rp-gold:#f6c177;--rp-rose:#ebbcba;--rp-pine:#31748f;--rp-foam:#9ccfd8;--rp-iris:#c4a7e7;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#21202e;--rp-hl-med:#403d52;--rp-hl-high:#524f67;--rp-shadow:0 1px 2px #00000059;--rp-on-accent:#fff;--rp-on-positive:var(--rp-base);--rp-on-negative:var(--rp-base);--rp-on-notice:var(--rp-base);--rp-negative-tile-text:var(--rp-negative)}:root[data-family=catppuccin]{--rp-base:#e6e9ef;--rp-surface:#eff1f5;--rp-overlay:#dce0e8;--rp-muted:#9ca0b0;--rp-subtle:#6c6f85;--rp-text:#4c4f69;--rp-love:#d20f39;--rp-gold:#df8e1d;--rp-rose:#fe640b;--rp-pine:#1e66f5;--rp-foam:#179299;--rp-iris:#8839ef;--rp-c1:#1e66f5;--rp-c2:#179299;--rp-c3:#8839ef;--rp-c4:#fe640b;--rp-c5:#40a02b;--rp-c6:#ea76cb;--rp-c7:#df8e1d;--rp-c8:#d20f39;--rp-hl-low:#dce0e8;--rp-hl-med:#ccd0da;--rp-hl-high:#bcc0cc;--rp-shadow:0 1px 2px #4c4f691a;--rp-on-accent:#fff;--rp-accent-text:var(--rp-text);--rp-negative-text:var(--rp-text);--rp-notice-text:var(--rp-text);--rp-positive-text:var(--rp-text);--rp-info-text:var(--rp-text);--rp-subtle-text:var(--rp-text)}:root[data-family=catppuccin][data-scheme=dark],:root[data-flavour=mocha][data-scheme=dark]{--rp-base:#181825;--rp-surface:#1e1e2e;--rp-overlay:#313244;--rp-muted:#6c7086;--rp-subtle:#a6adc8;--rp-text:#cdd6f4;--rp-love:#f38ba8;--rp-gold:#f9e2af;--rp-rose:#fab387;--rp-pine:#89b4fa;--rp-foam:#94e2d5;--rp-iris:#cba6f7;--rp-c1:#89b4fa;--rp-c2:#94e2d5;--rp-c3:#cba6f7;--rp-c4:#fab387;--rp-c5:#a6e3a1;--rp-c6:#f5c2e7;--rp-c7:#f9e2af;--rp-c8:#f38ba8;--rp-hl-low:#313244;--rp-hl-med:#45475a;--rp-hl-high:#585b70;--rp-shadow:0 1px 2px #00000059;--rp-on-accent:var(--rp-surface);--rp-on-notice:var(--rp-on-accent);--rp-accent-text:var(--rp-accent);--rp-negative-text:var(--rp-negative);--rp-notice-text:var(--rp-notice);--rp-positive-text:var(--rp-positive);--rp-info-text:var(--rp-info);--rp-negative-tile-text:var(--rp-text);--rp-subtle-text:var(--rp-subtle)}:root[data-flavour=frappe][data-scheme=dark]{--rp-base:#292c3c;--rp-surface:#303446;--rp-overlay:#414559;--rp-muted:#737994;--rp-subtle:#a5adce;--rp-text:#c6d0f5;--rp-love:#e78284;--rp-gold:#e5c890;--rp-rose:#ef9f76;--rp-pine:#8caaee;--rp-foam:#81c8be;--rp-iris:#ca9ee6;--rp-c1:#8caaee;--rp-c2:#81c8be;--rp-c3:#ca9ee6;--rp-c4:#ef9f76;--rp-c5:#a6d189;--rp-c6:#f4b8e4;--rp-c7:#e5c890;--rp-c8:#e78284;--rp-hl-low:#414559;--Line truncated
@font-face{font-family:Twemoji Country Flags;src:url(./TwemojiCountryFlags-Bymva2JV.woff2)format("woff2");font-display:swap;unicode-range:U+1F1E6-1F1FF,U+1F3F4,U+E0061-E007A,U+E007F}:root{--rp-node-flag-edge:drop-shadow(0 0 .5px #00000059)}:root[data-scheme=dark]{--rp-node-flag-edge:none}.rp-truncate.rp-node-name{display:inline-block}.rp-node-flag{filter:var(--rp-node-flag-edge);-webkit-user-select:none;user-select:none;margin-inline-end:var(--rp-space-1);display:inline-block}.rp-node-flag:before{content:attr(data-flag)}.rp-il:has(>.rp-node-flag){gap:var(--rp-space-1)}.rp-il>.rp-node-flag{flex-shrink:0;inline-size:1.25em;margin-inline-end:0}:root,:root[data-family=rose-pine]{--rp-base:#faf4ed;--rp-surface:#fffaf3;--rp-overlay:#f2e9e1;--rp-muted:#9893a5;--rp-subtle:#797593;--rp-text:#464261;--rp-love:#b4637a;--rp-gold:#ea9d34;--rp-rose:#d7827e;--rp-pine:#286983;--rp-foam:#56949f;--rp-iris:#907aa9;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#f4ede8;--rp-hl-med:#dfdad9;--rp-hl-high:#cecacd;--rp-shadow:0 1px 2px #57527914}:root[data-family=rose-pine]{--rp-negative-text:var(--rp-text);--rp-notice-text:var(--rp-text);--rp-positive-text:var(--rp-text);--rp-accent-tile-text:var(--rp-text);--rp-info-tile-text:var(--rp-text);--rp-subtle-text:var(--rp-text)}:root[data-family=rose-pine][data-scheme=dark],:root[data-flavour=moon][data-scheme=dark]{--rp-base:#232136;--rp-surface:#2a273f;--rp-overlay:#393552;--rp-muted:#6e6a86;--rp-subtle:#908caa;--rp-text:#e0def4;--rp-love:#eb6f92;--rp-gold:#f6c177;--rp-rose:#ea9a97;--rp-pine:#3e8fb0;--rp-foam:#9ccfd8;--rp-iris:#c4a7e7;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#2a283e;--rp-hl-med:#44415a;--rp-hl-high:#56526e;--rp-shadow:0 1px 2px #0000004d;--rp-line:var(--rp-hl-med);--rp-fill:var(--rp-hl-med);--rp-on-accent:#191724;--rp-on-notice:var(--rp-on-accent);--rp-accent-text:var(--rp-text);--rp-negative-text:var(--rp-negative);--rp-notice-text:var(--rp-notice);--rp-positive-text:var(--rp-positive);--rp-info-text:var(--rp-text);--rp-negative-tile-text:var(--rp-text)}:root[data-flavour=main][data-scheme=dark]{--rp-base:#191724;--rp-surface:#1f1d2e;--rp-overlay:#26233a;--rp-muted:#6e6a86;--rp-subtle:#908caa;--rp-text:#e0def4;--rp-love:#eb6f92;--rp-gold:#f6c177;--rp-rose:#ebbcba;--rp-pine:#31748f;--rp-foam:#9ccfd8;--rp-iris:#c4a7e7;--rp-c1:var(--rp-pine);--rp-c2:var(--rp-foam);--rp-c3:var(--rp-iris);--rp-c4:var(--rp-gold);--rp-c5:var(--rp-rose);--rp-c6:var(--rp-love);--rp-c7:var(--rp-pine);--rp-c8:var(--rp-foam);--rp-hl-low:#21202e;--rp-hl-med:#403d52;--rp-hl-high:#524f67;--rp-shadow:0 1px 2px #00000059;--rp-on-accent:#fff;--rp-on-positive:var(--rp-base);--rp-on-negative:var(--rp-base);--rp-on-notice:var(--rp-base);--rp-negative-tile-text:var(--rp-negative)}:root[data-family=catppuccin]{--rp-base:#e6e9ef;--rp-surface:#eff1f5;--rp-overlay:#dce0e8;--rp-muted:#9ca0b0;--rp-subtle:#6c6f85;--rp-text:#4c4f69;--rp-love:#d20f39;--rp-gold:#df8e1d;--rp-rose:#fe640b;--rp-pine:#1e66f5;--rp-foam:#179299;--rp-iris:#8839ef;--rp-c1:#1e66f5;--rp-c2:#179299;--rp-c3:#8839ef;--rp-c4:#fe640b;--rp-c5:#40a02b;--rp-c6:#ea76cb;--rp-c7:#df8e1d;--rp-c8:#d20f39;--rp-hl-low:#dce0e8;--rp-hl-med:#ccd0da;--rp-hl-high:#bcc0cc;--rp-shadow:0 1px 2px #4c4f691a;--rp-on-accent:#fff;--rp-accent-text:var(--rp-text);--rp-negative-text:var(--rp-text);--rp-notice-text:var(--rp-text);--rp-positive-text:var(--rp-text);--rp-info-text:var(--rp-text);--rp-subtle-text:var(--rp-text)}:root[data-family=catppuccin][data-scheme=dark],:root[data-flavour=mocha][data-scheme=dark]{--rp-base:#181825;--rp-surface:#1e1e2e;--rp-overlay:#313244;--rp-muted:#6c7086;--rp-subtle:#a6adc8;--rp-text:#cdd6f4;--rp-love:#f38ba8;--rp-gold:#f9e2af;--rp-rose:#fab387;--rp-pine:#89b4fa;--rp-foam:#94e2d5;--rp-iris:#cba6f7;--rp-c1:#89b4fa;--rp-c2:#94e2d5;--rp-c3:#cba6f7;--rp-c4:#fab387;--rp-c5:#a6e3a1;--rp-c6:#f5c2e7;--rp-c7:#f9e2af;--rp-c8:#f38ba8;--rp-hl-low:#313244;--rp-hl-med:#45475a;--rp-hl-high:#585b70;--rp-shadow:0 1px 2px #00000059;--rp-on-accent:var(--rp-surface);--rp-on-notice:var(--rp-on-accent);--rp-accent-text:var(--rp-accent);--rp-negative-text:var(--rp-negative);--rp-notice-text:var(--rp-notice);--rp-positive-text:var(--rp-positive);--rp-info-text:var(--rp-info);--rp-negative-tile-text:var(--rp-text);--rp-subtle-text:var(--rp-subtle)}:root[data-flavour=frappe][data-scheme=dark]{--rp-base:#292c3c;--rp-surface:#303446;--rp-overlay:#414559;--rp-muted:#737994;--rp-subtle:#a5adce;--rp-text:#c6d0f5;--rp-love:#e78284;--rp-gold:#e5c890;--rp-rose:#ef9f76;--rp-pine:#8caaee;--rp-foam:#81c8be;--rp-iris:#ca9ee6;--rp-c1:#8caaee;--rp-c2:#81c8be;--rp-c3:#ca9ee6;--rp-c4:#ef9f76;--rp-c5:#a6d189;--rp-c6:#f4b8e4;--rp-c7:#e5c890;--rp-c8:#e78284;--rp-hl-low:#414559;--Line truncated
@@ -1,2 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./fonts-C5_wsAqZ.css","./fonts-sc-Dyn9aW84.css","./fonts-tc-D9rvq3k7.css","./SearchList-DWooTdFX.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./Virtualizer-FvdVRagH.js","./index-BF-omOFK.js","./nodes-Bm1vmvln.js","./geodata-X0pHz03D.js","./auth-C2Jiec7E.js","./auth-5ngSjiJI.js","./SearchDialog-mIEPMN0z.js","./Select-OqnbuzuK.js","./ItemText-Bvif-kkw.js","./logs-DNePHVHd.js","./AppearanceControls-Q-jHRGz9.js","./flows-CjEC9Jxw.js","./nav-B6IjqlWU.js","./activity-7OeQMmIs.js","./activity-Db7VRWAG.css","./nav-BgyFg1Tl.js","./nav-4iHQTLCW.js","./nav-BIicxOIW.js","./nav-DxD_yNm9.js","./nav-BO8viH9G.js","./nav-xz-AMjAg.js","./Overview-Drw6LT_U.js","./files-Dt8K7QfP.js","./Table-DqqJleJD.js","./Checkbox-BewExwKL.js","./DaeCode-DEjXqvav.js","./daeTokens-BVtuNnWZ.js","./Connections-D4_pDN1k.js","./OutboundTag-B01P-KVW.js","./Tag-BaZZD5o2.js","./Tabs-BGWzF0yW.js","./Toolbar-CFyWgMbW.js","./SearchSelect-BVGce3l_.js","./TimeCell-B6QtVZge.js","./useQuickRule-8yoKk9d5.js","./AddCircle-7x8u9Pw1.js","./rule-BUktGcKO.js","./outbounds-UWplA2Qq.js","./labels-D8xxfRTQ.js","./Flows-DlYoWpUG.js","./Coverage-fmBkVF9H.js","./Flows-B78_vhjx.css","./Dns-BhjuEpsD.js","./Delete-BlpuXHjZ.js","./impact-B8feJDtJ.css","./Policies-DaY31pHO.js","./ProbeOptionsDialog-fRxfzbxN.js","./ConditionRow-mKWPcuZs.js","./GridList-wfRSpULl.js","./NumberField-Bo9iJ94r.js","./probe-Bp5QvROd.js","./Rules-gNsJvc3i.js","./recorder-BHyqDNp5.js","./geodataUpdate-Blcy6CRD.js","./LinkOut-BfQApT3z.js","./Nodes-B55C7kXE.js","./FlagPicker-YsJ19Gt1.js","./Config-D4r3VSJ0.js","./Events-fDbWsOSi.js","./Copy-Cix1qeo3.js","./Logs-CFjmcBrv.js","./Settings-Bf16OoOZ.js","./wallpaper-CEC7gitM.js","./Settings-BVpmQMTB.css","./glass-DWGGOADV.js","./Login-CYtOUqQI.js"])))=>i.map(i=>d[i]);
import{r as e,$ as t,c as n,s as r,a as i,b as o,j as s,d as a}from"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const l={},c=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};const i=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),s=o?.nonce||o?.getAttribute("nonce");r=e(t.map(e=>{if(e=function(e,t){return new URL(e,t).href}(e,n),e in l)return;l[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(!!n)for(let n=i.length-1;n>=0;n--){const r=i[n];if(r.href===e&&(!t||"stylesheet"===r.rel))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,s&&o.setAttribute("nonce",s),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)})};class u{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}}class d extends u{filter(e,t,n){let[r,i]=y(e,t,this.firstChildKey,n),o=this.clone();return o.firstChildKey=r,o.lastChildKey=i,o}}class f extends u{static{this.type="header"}}class p extends u{static{this.type="loader"}}class h extends d{static{this.type="item"}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}}class m extends d{static{this.type="section"}filter(e,t,n){let r=super.filter(e,t,n);if(r&&null!==r.lastChildKey){let t=e.getItem(r.lastChildKey);if(t&&"header"!==t.type)return r}return null}}class g{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=null!=this.firstKey?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=null!=e.nextKey?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=null!=n?.firstChildKey?t.get(n.firstChildKey):null;for(;r;)yield r,r=null!=r.nextKey?t.get(r.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(null!=t.prevKey){for(t=this.keyMap.get(t.prevKey);t&&"item"!==t.type&&null!=t.lastChildKey;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if("item"!==t.type&&null!=t.firstChildKey)return t.firstChildKey;for(;t;){if(null!=t.nextKey)return t.nextKey;if(null==t.parentKey)return null;t=this.keyMap.get(t.parentKey)}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=null!=this.lastKey?this.keyMap.get(this.lastKey):null;for(;null!=e?.lastChildKey;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=new(0,this.constructor);return e.keyMap=new Map(this.keyMap),e.firstKey=this.firstKey,e.lastKey=this.lastKey,e.itemCount=this.itemCount,e}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");"item"===e.type&&null==this.keyMap.get(e.key)&&thisLine truncated
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./fonts-C5_wsAqZ.css","./fonts-sc-Dyn9aW84.css","./fonts-tc-D9rvq3k7.css","./SearchList-LjCruZYP.js","./vendor-react-64fcanlc.js","./_commonjsHelpers-CXUWDbkB.js","./Virtualizer-DMIKG2CD.js","./index-B-vRbGlz.js","./nodes-6sIn2I0s.js","./geodata-X0pHz03D.js","./auth-BHtDKZwR.js","./auth-CSMbhh2E.js","./SearchDialog-9DTpWveT.js","./Select-D7_6MaHd.js","./ItemText-DOD_75iR.js","./logs-C4GIy4tX.js","./AppearanceControls-sRy1p156.js","./flows-dBNkBg79.js","./nav-BMNMQSWb.js","./activity-yZTrGy-J.js","./activity-Db7VRWAG.css","./nav-CBqYxt5v.js","./nav-DG4JD5-H.js","./nav-CKRufMnz.js","./nav-D8kaolOs.js","./nav-BO8viH9G.js","./nav-Bkujhswg.js","./Overview-uWeDda-p.js","./files-Dt8K7QfP.js","./Table-yWn0d3vL.js","./Checkbox-CJt7u9-e.js","./DaeCode-DEjXqvav.js","./daeTokens-BVtuNnWZ.js","./Connections-DUegD4fy.js","./OutboundTag-CO8Ndxdr.js","./Tag-SxASl3TF.js","./Tabs-DT6MQhIo.js","./Toolbar-BTFtduwD.js","./SearchSelect-BcScGUbQ.js","./TimeCell-BIqfL3y_.js","./useQuickRule-DUEi6geL.js","./AddCircle-C6Jc7GCc.js","./rule-Bl9YOsFn.js","./outbounds-Bbb6kdae.js","./labels-D8xxfRTQ.js","./Flows-C_tb9jRq.js","./Coverage-8qg_JeNJ.js","./Flows-B78_vhjx.css","./Dns-BTZu7DCC.js","./Delete-CR2AtZsd.js","./impact-B8feJDtJ.css","./Policies-bhHTQ4Ln.js","./ProbeOptionsDialog-BynYQcxa.js","./ConditionRow-B8Otz3rt.js","./GridList-D7qdplA5.js","./NumberField-q4-QmTAT.js","./probe-Bj7oT3ox.js","./Rules-BCWmv1Ss.js","./recorder-BHyqDNp5.js","./geodataUpdate-D9CXpIul.js","./LinkOut-D-cvJjm2.js","./Nodes-BV5Yc4KB.js","./FlagPicker-CiyGi8d1.js","./Config-C2AJDYeV.js","./Events-ZfmwKzoO.js","./Copy-CGFSe6tr.js","./Logs-B3lfustY.js","./Settings-DFP_j9Wp.js","./wallpaper-CEC7gitM.js","./Settings-BVpmQMTB.css","./glass-DWGGOADV.js","./Login-BVyvQsKI.js"])))=>i.map(i=>d[i]);
import{r as e,$ as t,c as n,s as r,a as i,b as o,j as s,d as a}from"./vendor-react-64fcanlc.js";import"./_commonjsHelpers-CXUWDbkB.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const l={},c=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};const i=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),s=o?.nonce||o?.getAttribute("nonce");r=e(t.map(e=>{if(e=function(e,t){return new URL(e,t).href}(e,n),e in l)return;l[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(!!n)for(let n=i.length-1;n>=0;n--){const r=i[n];if(r.href===e&&(!t||"stylesheet"===r.rel))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,s&&o.setAttribute("nonce",s),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)})};class u{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}}class d extends u{filter(e,t,n){let[r,i]=y(e,t,this.firstChildKey,n),o=this.clone();return o.firstChildKey=r,o.lastChildKey=i,o}}class f extends u{static{this.type="header"}}class p extends u{static{this.type="loader"}}class h extends d{static{this.type="item"}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}}class m extends d{static{this.type="section"}filter(e,t,n){let r=super.filter(e,t,n);if(r&&null!==r.lastChildKey){let t=e.getItem(r.lastChildKey);if(t&&"header"!==t.type)return r}return null}}class g{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=null!=this.firstKey?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=null!=e.nextKey?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=null!=n?.firstChildKey?t.get(n.firstChildKey):null;for(;r;)yield r,r=null!=r.nextKey?t.get(r.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(null!=t.prevKey){for(t=this.keyMap.get(t.prevKey);t&&"item"!==t.type&&null!=t.lastChildKey;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if("item"!==t.type&&null!=t.firstChildKey)return t.firstChildKey;for(;t;){if(null!=t.nextKey)return t.nextKey;if(null==t.parentKey)return null;t=this.keyMap.get(t.parentKey)}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=null!=this.lastKey?this.keyMap.get(this.lastKey):null;for(;null!=e?.lastChildKey;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=new(0,this.constructor);return e.keyMap=new Map(this.keyMap),e.firstKey=this.firstKey,e.lastKey=this.lastKey,e.itemCount=this.itemCount,e}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");"item"===e.type&&null==this.keyMap.get(e.key)&&thisLine truncated
@@ -1 +0,0 @@
const e=JSON.parse('{"about.contract":"Contract commit","about.credits":"Fonts Noto Sans TC/SC (OFL); icons Adobe Spectrum (Apache-2.0); palettes from Rosé Pine, Catppuccin, Nord, Kary Pro Colors, Ant Design, Arco Design and Semi Design.","about.duck":"Pet me","about.license":"License","about.privacy":"doona talks only to the backend you connect it to. It collects no data and sends nothing anywhere else.","about.quack":"Honk!","about.tagline":"Web UI for {engine}","about.title":"About doona","act.active":"Active connections","act.cgroup":"cgroup used","act.chooseRoutingMode":"Choose a routing mode","act.cpu":"CPU usage","act.cpuHelp":"The share of one CPU core that the process uses. A value above 100% means it uses more than one core.","act.d7":"7 d","act.devices":"Devices","act.domains":"Domains","act.emptyHistory":"No history samples yet","act.global":"Global outbound","act.globalMissing":"Global mode needs an outbound","act.groupFollow":"Automatic","act.groupPickHelp":"By default, this card follows the group with the most connections; choosing a group changes only this card.","act.h1":"1 h","act.h24":"24 h","act.h6":"6 h","act.historyRange":"History range","act.issues":"Notifications","act.latency":"Latency","act.limited":{"one":"{n} feature is off","other":"{n} features are off"},"act.live":"Live","act.m10":"10 min","act.memory":"Memory","act.mode":"Outbound mode","act.modeApplied":"Outbound mode written to the configuration and reloaded: {mode}","act.modeInterleaved":"An ordinary rule comes before a must rule in the routing block. Move the must rules to the top of the routing block, then change the outbound mode.","act.modeNoRouting":"The main configuration has no routing section","act.modeReadOnly":"Read-only","act.modeReadOnlyAction":"Make the main file writable by honk and keep native_api in its own include file.","act.modeReadOnlyReason":"honk requires configuration writes and authenticated control. It marks the main config file read-only if it contains a secret field or nested block in native_api or clash_api, or an active listener secret.","act.modeUnavailable":"Not provided by this backend","act.modeWhyReadOnly":"Why is the mode read-only?","act.noConnections":"This backend does not provide connections","act.noHistory":"This backend does not provide history","act.noIssues":"No issues require attention","act.noOutbounds":"This backend does not provide outbound counters","act.noRoutingMode":"No routing rules configured","act.noSubscriptions":"No subscriptions yet","act.noticeGap":"{reason}, records dropped since recording started: {n}","act.noticeRepeat":{"one":"{n} time","other":"{n} times"},"act.outUsage":"Outbound downloads","act.rankingEmpty":"No connections to rank","act.rankingScope":"Ranked by download totals for visible connections. Shares use all visible data.","act.rankingTruncated":"The connection list is truncated. Rankings cover only the retrieved data.","act.readOnlyDocs":"Read-only config files","act.rss":"Resident memory","act.sampling":"Sampling","act.setup.checkConnection":"Check connection","act.setup.chooseRules":"Choose rules","act.setup.complete":"Complete","act.setup.connection":"Check the connection","act.setup.connectionHint":"Measure the selected node.","act.setup.dismiss":"Dismiss","act.setup.incomplete":"Incomplete","act.setup.nodes":"Add a subscription or nodes","act.setup.nodesHint":"Import proxy nodes.","act.setup.rules":"Choose routing rules","act.setup.rulesHint":"Select a routing template.","act.setup.title":"Getting started","act.since":"Since {time}","act.topDevices":"Top traffic","act.traffic":"Traffic","act.truncated":"Truncated","act.viewAll":"View all","act.viewDetails":"View details","cm.all":"All","cm.byWord":"By word","cm.commands":"Editing commands","cm.completions":"Completions","cm.controlCharacter":"Control character","cm.currentMatch":"Current match","cm.find":"Find","cm.findReplace":"Find and replace","cm.go":"Go","cm.gotoLine":"Go to line","cm.matchCase":"Match case","cm.next":"Next","cm.onLine":"On line","cm.previous":"Previous","cm.redo":"Redo","cm.regexp":"Regexp","cm.replace":"Replace","cm.replaceAll":"Replace all","cm.replaceOne":"Replace","cm.replacedMatches":"Matches replaced: $","cm.replacedOnLine":"Replaced match on line $","cm.selectionDeleted":"Selection deleted","cm.toggleComment":"Toggle comment","cm.undo":"Undo","config.acceptedDiagnostics":"Diagnostics kept for the accepted configuration (generation {generation})","config.atFile":"{file} line {line}: {message}","config.atLine":"Line {line}: {message}","config.backendDetail":"{text}. Backend message: {message}","config.backendText":"Details","config.backup.export":"Export configuration","config.backup.exportFailed":"Export failed: {error}","config.backup.exportHelp":"Exports accepted configuration. Listener secrets are omitted; other credentials may remain. Review before sharing.","config.backup.import":"Import server files","config.backup.importHelp":"Reads the file tree specified Line truncated
@@ -0,0 +1 @@
const e=JSON.parse('{"about.contract":"Contract commit","about.credits":"Fonts Noto Sans TC/SC (OFL); icons Adobe Spectrum (Apache-2.0); palettes from Rosé Pine, Catppuccin, Nord, Kary Pro Colors, Ant Design, Arco Design and Semi Design.","about.duck":"Pet me","about.license":"License","about.privacy":"doona talks only to the backend you connect it to. It collects no data and sends nothing anywhere else.","about.quack":"Honk!","about.tagline":"Web UI for {engine}","about.title":"About doona","act.active":"Active connections","act.cgroup":"cgroup used","act.chooseRoutingMode":"Choose a routing mode","act.cpu":"CPU usage","act.cpuHelp":"The share of one CPU core that the process uses. A value above 100% means it uses more than one core.","act.d7":"7 d","act.devices":"Devices","act.domains":"Domains","act.emptyHistory":"No history samples yet","act.global":"Global outbound","act.globalMissing":"Global mode needs an outbound","act.groupFollow":"Automatic","act.groupPickHelp":"By default, this card follows the group with the most connections; choosing a group changes only this card.","act.h1":"1 h","act.h24":"24 h","act.h6":"6 h","act.historyRange":"History range","act.issues":"Notifications","act.latency":"Latency","act.limited":{"one":"{n} feature is off","other":"{n} features are off"},"act.live":"Live","act.m10":"10 min","act.memory":"Memory","act.mode":"Outbound mode","act.modeApplied":"Outbound mode written to the configuration and reloaded: {mode}","act.modeInterleaved":"An ordinary rule comes before a must rule in the routing block. Move the must rules to the top of the routing block, then change the outbound mode.","act.modeNoRouting":"The main configuration has no routing section","act.modeReadOnly":"Read-only","act.modeReadOnlyAction":"Make the main file writable by honk and keep native_api in its own include file.","act.modeReadOnlyReason":"honk requires configuration writes and authenticated control. It marks the main config file read-only if it contains a secret field or nested block in native_api or clash_api, or an active listener secret.","act.modeUnavailable":"Not provided by this backend","act.modeWhyReadOnly":"Why is the mode read-only?","act.noConnections":"This backend does not provide connections","act.noHistory":"This backend does not provide history","act.noIssues":"No issues require attention","act.noOutbounds":"This backend does not provide outbound counters","act.noRoutingMode":"No routing rules configured","act.noSubscriptions":"No subscriptions yet","act.noticeGap":"{reason}, records dropped since recording started: {n}","act.noticeRepeat":{"one":"{n} time","other":"{n} times"},"act.outUsage":"Outbound downloads","act.rankingEmpty":"No connections to rank","act.rankingScope":"Ranked by download totals for visible connections. Shares use all visible data.","act.rankingTruncated":"The connection list is truncated. Rankings cover only the retrieved data.","act.readOnlyDocs":"Read-only config files","act.rss":"Resident memory","act.sampling":"Sampling","act.setup.checkConnection":"Check connection","act.setup.chooseRules":"Choose rules","act.setup.complete":"Complete","act.setup.connection":"Check the connection","act.setup.connectionHint":"Measure the selected node.","act.setup.dismiss":"Dismiss","act.setup.incomplete":"Incomplete","act.setup.nodes":"Add a subscription or nodes","act.setup.nodesHint":"Import proxy nodes.","act.setup.rules":"Choose routing rules","act.setup.rulesHint":"Select a routing template.","act.setup.title":"Getting started","act.since":"Since {time}","act.topDevices":"Top traffic","act.traffic":"Traffic","act.truncated":"Truncated","act.viewAll":"View all","act.viewDetails":"View details","cm.all":"All","cm.byWord":"By word","cm.commands":"Editing commands","cm.completions":"Completions","cm.controlCharacter":"Control character","cm.currentMatch":"Current match","cm.find":"Find","cm.findReplace":"Find and replace","cm.go":"Go","cm.gotoLine":"Go to line","cm.matchCase":"Match case","cm.next":"Next","cm.onLine":"On line","cm.previous":"Previous","cm.redo":"Redo","cm.regexp":"Regexp","cm.replace":"Replace","cm.replaceAll":"Replace all","cm.replaceOne":"Replace","cm.replacedMatches":"Matches replaced: $","cm.replacedOnLine":"Replaced match on line $","cm.selectionDeleted":"Selection deleted","cm.toggleComment":"Toggle comment","cm.undo":"Undo","config.acceptedDiagnostics":"Diagnostics kept for the accepted configuration (generation {generation})","config.atFile":"{file} line {line}: {message}","config.atLine":"Line {line}: {message}","config.backendDetail":"{text}. Backend message: {message}","config.backendText":"Details","config.backup.export":"Export configuration","config.backup.exportFailed":"Export failed: {error}","config.backup.exportHelp":"Exports accepted configuration. Listener secrets are omitted; other credentials may remain. Review before sharing.","config.backup.import":"Import server files","config.backup.importHelp":"Reads the file tree specified Line truncated
Loaded 100 of 139 files, more files were not shown because too many files have changed in this diff. Show more