From ff70c9f5f68463612ed811b2c864cd4d803eae71 Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 12 Aug 2026 20:23:44 -0500 Subject: [PATCH] Update Studio auto-dismiss to avoid synthetic clicks and add relay log charts. Prefer location.assign for endscreen leave, and ship hub analytics/charts plus host deploy helpers. Co-authored-by: Cursor --- d2ypp2/services/neko/policies/policies.json | 16 +- .../tampermonkey-provisioning.json | 2 +- .../youtube-studio-auto-dismiss.user.js | 247 +++++++++-- d2ypp2/src/hub_kv_store.py | 43 +- d2ypp2/src/hub_routes.py | 21 + d2ypp2/src/youtube_relay_log.py | 335 +++++++++++++++ d2ypp2/tests/test_hub_kv_store.py | 24 ++ d2ypp2/tests/test_neko_config.py | 6 + d2ypp2/tests/test_youtube_relay_log.py | 68 ++++ d2ypp2/tools/deploy_neko_hardening_host08.py | 95 +++++ .../deploy_relay_log_analytics_host08.py | 121 ++++++ d2ypp2/tools/redeploy_relay_charts_host08.py | 79 ++++ d2ypp2/tools/youtube_studio_dismiss_uia.ps1 | 125 ++++++ .../LiveYoutubeRelayLogCharts.tsx | 384 ++++++++++++++++++ .../live-product/LiveYoutubeRelayLogView.tsx | 300 ++++++++------ .../live-product/LiveYoutubeUnmannedView.tsx | 42 +- d2ypp2/web-console/lib/youtubeProChannels.ts | 24 ++ d2ypp2/web-console/out/404.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../static/chunks/371-3c69d09687afa990.js | 1 + .../static/chunks/371-bddad8b92b1ea180.js | 1 - .../page-44c22a5313590d69.js | 1 - .../page-ef6cbd6ed2424191.js | 1 + .../out/_next/static/css/7e3b6f8d9077dbc2.css | 3 + .../out/_next/static/css/f72551e7a5dadbbb.css | 3 - d2ypp2/web-console/out/android.html | 2 +- d2ypp2/web-console/out/android.txt | 2 +- d2ypp2/web-console/out/console.html | 2 +- d2ypp2/web-console/out/console.txt | 2 +- d2ypp2/web-console/out/index.html | 2 +- d2ypp2/web-console/out/index.txt | 4 +- d2ypp2/web-console/out/shellcrash.html | 2 +- d2ypp2/web-console/out/shellcrash.txt | 2 +- d2ypp2/web-console/out/youtube-events.html | 2 +- d2ypp2/web-console/out/youtube-events.txt | 4 +- d2ypp2/web-console/out/youtube-relay-log.html | 2 +- d2ypp2/web-console/out/youtube-relay-log.txt | 4 +- d2ypp2/web.py | 21 + 39 files changed, 1771 insertions(+), 224 deletions(-) create mode 100644 d2ypp2/tools/deploy_neko_hardening_host08.py create mode 100644 d2ypp2/tools/deploy_relay_log_analytics_host08.py create mode 100644 d2ypp2/tools/redeploy_relay_charts_host08.py create mode 100644 d2ypp2/tools/youtube_studio_dismiss_uia.ps1 create mode 100644 d2ypp2/web-console/components/live-product/LiveYoutubeRelayLogCharts.tsx rename d2ypp2/web-console/out/_next/static/{xYg2qS760UEpBRHWcTFN5 => 93noLwLTiZ-nO6dg8JRLS}/_buildManifest.js (100%) rename d2ypp2/web-console/out/_next/static/{xYg2qS760UEpBRHWcTFN5 => 93noLwLTiZ-nO6dg8JRLS}/_ssgManifest.js (100%) create mode 100644 d2ypp2/web-console/out/_next/static/chunks/371-3c69d09687afa990.js delete mode 100644 d2ypp2/web-console/out/_next/static/chunks/371-bddad8b92b1ea180.js delete mode 100644 d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-44c22a5313590d69.js create mode 100644 d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-ef6cbd6ed2424191.js create mode 100644 d2ypp2/web-console/out/_next/static/css/7e3b6f8d9077dbc2.css delete mode 100644 d2ypp2/web-console/out/_next/static/css/f72551e7a5dadbbb.css diff --git a/d2ypp2/services/neko/policies/policies.json b/d2ypp2/services/neko/policies/policies.json index 1dc20f2..850abb9 100644 --- a/d2ypp2/services/neko/policies/policies.json +++ b/d2ypp2/services/neko/policies/policies.json @@ -5,7 +5,9 @@ "ExtensionInstallBlocklist": [], "DownloadRestrictions": 0, "AllowFileSelectionDialogs": true, - "URLAllowlist": ["file:///home/neko/Downloads/*"], + "URLAllowlist": [ + "file:///home/neko/Downloads/*" + ], "DefaultCookiesSetting": 1, "RestoreOnStartup": 1, "AutoplayAllowed": true, @@ -13,8 +15,14 @@ "DefaultNotificationsSetting": 1, "VideoCaptureAllowed": true, "AudioCaptureAllowed": true, - "VideoCaptureAllowedUrls": ["https://*.google.com/*", "https://*.youtube.com/*"], - "AudioCaptureAllowedUrls": ["https://*.google.com/*", "https://*.youtube.com/*"], + "VideoCaptureAllowedUrls": [ + "https://*.google.com/*", + "https://*.youtube.com/*" + ], + "AudioCaptureAllowedUrls": [ + "https://*.google.com/*", + "https://*.youtube.com/*" + ], "DeveloperToolsAvailability": 1, "DefaultGeolocationSetting": 1, "3rdparty": { @@ -22,7 +30,7 @@ "dhdgffkkebhmkfjojejmpbldmpobfkfo": { "jsonImport": [ { - "hash": "1:3d96725f5c1273d7468c1d6007817449b2356c7a47f8dfd096e297ca65f348dd", + "hash": "1:b75c2df29e515233fce1ca146ab62fff6bcbbaa20f5d5a8c16aa8f8993b77b15", "url": "http://127.0.0.1:18080/tampermonkey-provisioning.json", "haltOnError": false, "installAsSystemScripts": false diff --git a/d2ypp2/services/neko/provisioning/tampermonkey-provisioning.json b/d2ypp2/services/neko/provisioning/tampermonkey-provisioning.json index 0487842..80193f8 100644 --- a/d2ypp2/services/neko/provisioning/tampermonkey-provisioning.json +++ b/d2ypp2/services/neko/provisioning/tampermonkey-provisioning.json @@ -4,7 +4,7 @@ { "name": "YouTube Studio Auto Dismiss", "file_url": "https://greasyfork.org/scripts/557378-youtube-studio-auto-dismiss/code/YouTube%20Studio%20Auto%20Dismiss.user.js", - "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBZb3VUdWJlIFN0dWRpbyBBdXRvIERpc21pc3MKLy8gQG5hbWVzcGFjZSAgICBodHRwOi8vdGFtcGVybW9ua2V5Lm5ldC8KLy8gQHZlcnNpb24gICAgICAxLjEKLy8gQGRlc2NyaXB0aW9uICDmr48156eS6Ieq5Yqo5qOA5rWL5bm254K55Ye7IFlvdVR1YmUgU3R1ZGlvIOebtOaSremhtemdoueahCBEaXNtaXNzIOaMiemSru+8jOaUr+aMgeW7tui/n+WKoOi9vQovLyBAYXV0aG9yICAgICAgIFlvdQovLyBAbWF0Y2ggICAgICAgIGh0dHBzOi8vc3R1ZGlvLnlvdXR1YmUuY29tL2NoYW5uZWwvKi9saXZlc3RyZWFtaW5nCi8vIEBtYXRjaCAgICAgICAgaHR0cHM6Ly9zdHVkaW8ueW91dHViZS5jb20vdmlkZW8vKi9saXZlc3RyZWFtaW5nCi8vIEBtYXRjaCAgICAgICAgaHR0cHM6Ly9zdHVkaW8ueW91dHViZS5jb20vKi9saXZlc3RyZWFtaW5nCi8vIEBsaWNlbnNlIE1JVAovLyBAZ3JhbnQgICAgICAgIG5vbmUKLy8gQGRvd25sb2FkVVJMICBodHRwczovL3VwZGF0ZS5ncmVhc3lmb3JrLm9yZy9zY3JpcHRzLzU1NzM3OC9Zb3VUdWJlJTIwU3R1ZGlvJTIwQXV0byUyMERpc21pc3MudXNlci5qcwovLyBAdXBkYXRlVVJMICAgIGh0dHBzOi8vdXBkYXRlLmdyZWFzeWZvcmsub3JnL3NjcmlwdHMvNTU3Mzc4L1lvdVR1YmUlMjBTdHVkaW8lMjBBdXRvJTIwRGlzbWlzcy5tZXRhLmpzCi8vID09L1VzZXJTY3JpcHQ9PQoKKGZ1bmN0aW9uICgpIHsKICAidXNlIHN0cmljdCI7CgogIGZ1bmN0aW9uIHRyaWdnZXJDbGljayhlbCkgewogICAgaWYgKCFlbCkgcmV0dXJuOwogICAgY29uc3QgZXZ0ID0gbmV3IE1vdXNlRXZlbnQoImNsaWNrIiwgewogICAgICB2aWV3OiB3aW5kb3csCiAgICAgIGJ1YmJsZXM6IHRydWUsCiAgICAgIGNhbmNlbGFibGU6IHRydWUsCiAgICB9KTsKICAgIGVsLmRpc3BhdGNoRXZlbnQoZXZ0KTsKICAgIGNvbnNvbGUubG9nKCJEaXNtaXNzIOaMiemSruW3sueCueWHuzoiLCBlbCwgIueItuWFg+e0oDoiLCBlbC5wYXJlbnRFbGVtZW50KTsKICB9CgogIGZ1bmN0aW9uIGZpbmREaXNtaXNzKHJvb3QgPSBkb2N1bWVudCkgewogICAgY29uc3QgYWxsRWxlbWVudHMgPSByb290LnF1ZXJ5U2VsZWN0b3JBbGwoImJ1dHRvbiIpOwogICAgZm9yIChjb25zdCBlbCBvZiBhbGxFbGVtZW50cykgewogICAgICB0cnkgewogICAgICAgIGNvbnN0IHRleHQgPSBlbC5pbm5lclRleHQgPyBlbC5pbm5lclRleHQudHJpbSgpIDogIiI7CiAgICAgICAgaWYgKHRleHQgPT09ICJEaXNtaXNzIiAmJiBpc0VsZW1lbnRWaXNpYmxlKGVsKSkgewogICAgICAgICAgY29uc29sZS5sb2coIuaJvuWIsCBEaXNtaXNzIOaMiemSrjoiLCBlbCk7CiAgICAgICAgICByZXR1cm4gZWw7CiAgICAgICAgfQoKICAgICAgICBpZiAoZWwuc2hhZG93Um9vdCkgewogICAgICAgICAgY29uc3Qgc2hhZG93QnRuID0gZmluZERpc21pc3MoZWwuc2hhZG93Um9vdCk7CiAgICAgICAgICBpZiAoc2hhZG93QnRuKSByZXR1cm4gc2hhZG93QnRuOwogICAgICAgIH0KICAgICAgfSBjYXRjaCAoZXJyb3IpIHsKICAgICAgICBjb25zb2xlLmxvZygi5qOA5p+l5YWD57Sg5pe25Ye66ZSZOiIsIGVycm9yKTsKICAgICAgfQogICAgfQogICAgcmV0dXJuIG51bGw7CiAgfQoKICBmdW5jdGlvbiBpc0VsZW1lbnRWaXNpYmxlKGVsKSB7CiAgICBjb25zdCBzdHlsZSA9IHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKGVsKTsKICAgIHJldHVybiBzdHlsZS5kaXNwbGF5ICE9PSAibm9uZSIgJiYgc3R5bGUudmlzaWJpbGl0eSAhPT0gImhpZGRlbiIgJiYgZWwub2Zmc2V0UGFyZW50ICE9PSBudWxsOwogIH0KCiAgZnVuY3Rpb24gY2hlY2tBbmRDbGljaygpIHsKICAgIGNvbnN0IGJ0biA9IGZpbmREaXNtaXNzKCk7CiAgICBpZiAoYnRuKSB7CiAgICAgIHRyaWdnZXJDbGljayhidG4pOwogICAgfSBlbHNlIHsKICAgICAgY29uc29sZS5sb2coIuacquaJvuWIsCBEaXNtaXNzIOaMiemSruaIluaMiemSruS4jeWPr+ingSIpOwogICAgfQogIH0KCiAgaWYgKGRvY3VtZW50LnJlYWR5U3RhdGUgPT09ICJjb21wbGV0ZSIpIHsKICAgIGNoZWNrQW5kQ2xpY2soKTsKICB9IGVsc2UgewogICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoImxvYWQiLCBjaGVja0FuZENsaWNrLCB7IG9uY2U6IHRydWUgfSk7CiAgfQoKICBzZXRJbnRlcnZhbChjaGVja0FuZENsaWNrLCA1MDAwKTsKfSkoKTsK", + "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBZb3VUdWJlIFN0dWRpbyBBdXRvIERpc21pc3MKLy8gQG5hbWVzcGFjZSAgICBodHRwOi8vdGFtcGVybW9ua2V5Lm5ldC8KLy8gQHZlcnNpb24gICAgICAyLjIuMAovLyBAZGVzY3JpcHRpb24gIOebtOaSree7k+adnyBlbmRzY3JlZW4g6Ieq5Yqo56a75byA77ya6K+7IGEjZGlzbWlzcy1saW5rIOW5tiBsb2NhdGlvbi5hc3NpZ27vvIzpgb/lhY0gTW91c2VFdmVudCDpo47mjqcKLy8gQGF1dGhvciAgICAgICBZb3UKLy8gQG1hdGNoICAgICAgICBodHRwczovL3N0dWRpby55b3V0dWJlLmNvbS8qCi8vIEBydW4tYXQgICAgICAgZG9jdW1lbnQtaWRsZQovLyBAbGljZW5zZSBNSVQKLy8gQGdyYW50ICAgICAgICBub25lCi8vIEBkb3dubG9hZFVSTCAgaHR0cHM6Ly91cGRhdGUuZ3JlYXN5Zm9yay5vcmcvc2NyaXB0cy81NTczNzgvWW91VHViZSUyMFN0dWRpbyUyMEF1dG8lMjBEaXNtaXNzLnVzZXIuanMKLy8gQHVwZGF0ZVVSTCAgICBodHRwczovL3VwZGF0ZS5ncmVhc3lmb3JrLm9yZy9zY3JpcHRzLzU1NzM3OC9Zb3VUdWJlJTIwU3R1ZGlvJTIwQXV0byUyMERpc21pc3MubWV0YS5qcwovLyA9PS9Vc2VyU2NyaXB0PT0KCihmdW5jdGlvbiAoKSB7CiAgInVzZSBzdHJpY3QiOwoKICAvLyDkuI3opoHnlKggPHNjcmlwdD4g5rOo5YWl77yaU3R1ZGlvIENTUCDluLjkvJrpnZnpu5jmi6bmiKrvvIzlr7zoh7TigJzohJrmnKzoo4XkuobkvYbkuI3ot5HigJ3jgIIKICAvLyBAZ3JhbnQgbm9uZSDkuIvnm7TmjqXot5HljbPlj6/mk43kvZwgRE9NIC8gbG9jYXRpb27jgIIKCiAgaWYgKHdpbmRvdy5fX3l0U3R1ZGlvQXV0b0Rpc21pc3NWMjJfXykgcmV0dXJuOwogIHdpbmRvdy5fX3l0U3R1ZGlvQXV0b0Rpc21pc3NWMjJfXyA9IHRydWU7CgogIGNvbnN0IENPT0xET1dOX01TID0gODAwMDsKICBjb25zdCBIVU1BTl9ERUxBWV9NSU4gPSA0MDA7CiAgY29uc3QgSFVNQU5fREVMQVlfTUFYID0gMTIwMDsKICBjb25zdCBQT0xMX01TID0gMTUwMDsKCiAgbGV0IGJ1c3kgPSBmYWxzZTsKICBsZXQgbGFzdEF0ID0gMDsKICBsZXQgbGFzdEhyZWZUcmllZCA9ICIiOwoKICBmdW5jdGlvbiBsb2coKSB7CiAgICB0cnkgewogICAgICBjb25zb2xlLmxvZy5hcHBseShjb25zb2xlLCBbIltZVCBBdXRvIERpc21pc3NdIl0uY29uY2F0KFtdLnNsaWNlLmNhbGwoYXJndW1lbnRzKSkpOwogICAgfSBjYXRjaCAoXykge30KICB9CgogIGZ1bmN0aW9uIHJhbmQobWluLCBtYXgpIHsKICAgIHJldHVybiBtaW4gKyBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAobWF4IC0gbWluICsgMSkpOwogIH0KCiAgZnVuY3Rpb24gc2xlZXAobXMpIHsKICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkgewogICAgICBzZXRUaW1lb3V0KHJlc29sdmUsIG1zKTsKICAgIH0pOwogIH0KCiAgZnVuY3Rpb24gdmlzaWJsZShlbCkgewogICAgaWYgKCFlbCB8fCAhZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KSByZXR1cm4gZmFsc2U7CiAgICB2YXIgcyA9IHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKGVsKTsKICAgIGlmIChzLmRpc3BsYXkgPT09ICJub25lIiB8fCBzLnZpc2liaWxpdHkgPT09ICJoaWRkZW4iIHx8IE51bWJlcihzLm9wYWNpdHkpID09PSAwKSByZXR1cm4gZmFsc2U7CiAgICB2YXIgciA9IGVsLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgcmV0dXJuIHIud2lkdGggPiAxICYmIHIuaGVpZ2h0ID4gMTsKICB9CgogIGZ1bmN0aW9uIHF1ZXJ5RGVlcChzZWxlY3Rvciwgcm9vdCkgewogICAgcm9vdCA9IHJvb3QgfHwgZG9jdW1lbnQ7CiAgICB0cnkgewogICAgICB2YXIgaGl0ID0gcm9vdC5xdWVyeVNlbGVjdG9yKHNlbGVjdG9yKTsKICAgICAgaWYgKGhpdCkgcmV0dXJuIGhpdDsKICAgIH0gY2F0Y2ggKF8pIHt9CiAgICB2YXIgbm9kZXMgPSBbXTsKICAgIHRyeSB7CiAgICAgIG5vZGVzID0gcm9vdC5xdWVyeVNlbGVjdG9yQWxsKCIqIik7CiAgICB9IGNhdGNoIChfKSB7CiAgICAgIHJldHVybiBudWxsOwogICAgfQogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBub2Rlcy5sZW5ndGg7IGkrKykgewogICAgICB2YXIgZWwgPSBub2Rlc1tpXTsKICAgICAgaWYgKCFlbC5zaGFkb3dSb290KSBjb250aW51ZTsKICAgICAgdmFyIG5lc3RlZCA9IHF1ZXJ5RGVlcChzZWxlY3RvciwgZWwuc2hhZG93Um9vdCk7CiAgICAgIGlmIChuZXN0ZWQpIHJldHVybiBuZXN0ZWQ7CiAgICB9CiAgICByZXR1cm4gbnVsbDsKICB9CgogIGZ1bmN0aW9uIGZpbmRFbmRzY3JlZW4oKSB7CiAgICByZXR1cm4gKAogICAgICBxdWVyeURlZXAoInl0bHMtc3RyZWFtLWVuZHNjcmVlbi1yZW5kZXJlciIpIHx8CiAgICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIGJveCA9IHF1ZXJ5RGVlcCgiI2VuZHNjcmVlbi1jb250YWluZXIiKTsKICAgICAgICByZXR1cm4gYm94ICYmIGJveC5jbG9zZXN0ID8gYm94LmNsb3Nlc3QoInl0bHMtc3RyZWFtLWVuZHNjcmVlbi1yZW5kZXJlciIpIDogbnVsbDsKICAgICAgfSkoKQogICAgKTsKICB9CgogIGZ1bmN0aW9uIGZpbmREaXNtaXNzVGFyZ2V0KCkgewogICAgdmFyIGhvc3QgPSBmaW5kRW5kc2NyZWVuKCk7CiAgICBpZiAoIWhvc3QgfHwgIXZpc2libGUoaG9zdCkpIHJldHVybiBudWxsOwoKICAgIHZhciBsaW5rID0KICAgICAgaG9zdC5xdWVyeVNlbGVjdG9yKCJhI2Rpc21pc3MtbGluayIpIHx8CiAgICAgIGhvc3QucXVlcnlTZWxlY3RvcigiI2Rpc21pc3MtbGluayIpIHx8CiAgICAgIGhvc3QucXVlcnlTZWxlY3RvcigiI2NvbXBsZXRpb24tYnV0dG9ucyBhW2hyZWZdIikgfHwKICAgICAgbnVsbDsKCiAgICB2YXIgYnRuID0KICAgICAgaG9zdC5xdWVyeVNlbGVjdG9yKCIjZGlzbWlzcy1idXR0b24gYnV0dG9uIikgfHwKICAgICAgaG9zdC5xdWVyeVNlbGVjdG9yKCJ5dGNwLWJ1dHRvbiNkaXNtaXNzLWJ1dHRvbiIpIHx8CiAgICAgIGhvc3QucXVlcnlTZWxlY3RvcigiI2Rpc21pc3MtYnV0dG9uIikgfHwKICAgICAgbnVsbDsKCiAgICBpZiAoIWxpbmsgJiYgIWJ0bikgcmV0dXJuIG51bGw7CiAgICBpZiAobGluayAmJiAhdmlzaWJsZShsaW5rKSAmJiBidG4gJiYgIXZpc2libGUoYnRuKSkgcmV0dXJuIG51bGw7CiAgICByZXR1cm4geyBob3N0OiBob3N0LCBsaW5rOiBsaW5rLCBidG46IGJ0biB9OwogIH0KCiAgZnVuY3Rpb24gcmVzb2x2ZUhyZWYobGluaykgewogICAgaWYgKCFsaW5rKSByZXR1cm4gIiI7CiAgICB2YXIgcmF3ID0gbGluay5ocmVmIHx8IGxpbmsuZ2V0QXR0cmlidXRlKCJocmVmIikgfHwgIiI7CiAgICBpZiAoIXJhdykgcmV0dXJuICIiOwogICAgdHJ5IHsKICAgICAgcmV0dXJuIG5ldyBVUkwocmF3LCBsb2NhdGlvbi5vcmlnaW4pLmhyZWY7CiAgICB9IGNhdGNoIChfKSB7CiAgICAgIHJldHVybiByYXc7CiAgICB9CiAgfQoKICBmdW5jdGlvbiBoaWRlRW5kc2NyZWVuKGhvc3QpIHsKICAgIHRyeSB7CiAgICAgIGhvc3Quc2V0QXR0cmlidXRlKCJoaWRkZW4iLCAiIik7CiAgICAgIGhvc3Quc3R5bGUuc2V0UHJvcGVydHkoImRpc3BsYXkiLCAibm9uZSIsICJpbXBvcnRhbnQiKTsKICAgICAgaWYgKGhvc3QucmVtb3ZlKSBob3N0LnJlbW92ZSgpOwogICAgICByZXR1cm4gdHJ1ZTsKICAgIH0gY2F0Y2ggKF8pIHsKICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogIH0KCiAgYXN5bmMgZnVuY3Rpb24gZGlzbWlzc09uY2UocmVhc29uKSB7CiAgICBpZiAoYnVzeSkgcmV0dXJuIGZhbHNlOwogICAgaWYgKERhdGUubm93KCkgLSBsYXN0QXQgPCBDT09MRE9XTl9NUykgcmV0dXJuIGZhbHNlOwoKICAgIHZhciB0YXJnZXQgPSBmaW5kRGlzbWlzc1RhcmdldCgpOwogICAgaWYgKCF0YXJnZXQpIHJldHVybiBmYWxzZTsKCiAgICB2YXIgaHJlZiA9IHJlc29sdmVIcmVmKHRhcmdldC5saW5rKTsKICAgIGlmIChocmVmICYmIGhyZWYgPT09IGxhc3RIcmVmVHJpZWQgJiYgRGF0ZS5ub3coKSAtIGxhc3RBdCA8IENPT0xET1dOX01TKSByZXR1cm4gZmFsc2U7CgogICAgYnVzeSA9IHRydWU7CiAgICBsYXN0QXQgPSBEYXRlLm5vdygpOwogICAgbGFzdEhyZWZUcmllZCA9IGhyZWYgfHwgbGFzdEhyZWZUcmllZDsKCiAgICB0cnkgewogICAgICBsb2cocmVhc29uIHx8ICJmb3VuZCBlbmRzY3JlZW4iLCB7CiAgICAgICAgaHJlZjogaHJlZiwKICAgICAgICBwYXRoOiBsb2NhdGlvbi5wYXRobmFtZSwKICAgICAgfSk7CiAgICAgIGF3YWl0IHNsZWVwKHJhbmQoSFVNQU5fREVMQVlfTUlOLCBIVU1BTl9ERUxBWV9NQVgpKTsKICAgICAgaWYgKCFmaW5kRGlzbWlzc1RhcmdldCgpKSB7CiAgICAgICAgbG9nKCJlbmRzY3JlZW4gZGlzYXBwZWFyZWQgYmVmb3JlIGFjdGlvbiIpOwogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQoKICAgICAgLy8gMSkg6aaW6YCJ77ya5oyJ5Y6f55SfIDxhIGlkPSJkaXNtaXNzLWxpbmsiPiDlr7zoiKrvvIjml6DlkIjmiJAgY2xpY2vvvIkKICAgICAgaWYgKGhyZWYpIHsKICAgICAgICB0cnkgewogICAgICAgICAgdmFyIHVybCA9IG5ldyBVUkwoaHJlZik7CiAgICAgICAgICBpZiAodXJsLm9yaWdpbiA9PT0gbG9jYXRpb24ub3JpZ2luKSB7CiAgICAgICAgICAgIGxvZygibG9jYXRpb24uYXNzaWduIiwgdXJsLmhyZWYpOwogICAgICAgICAgICBsb2NhdGlvbi5hc3NpZ24odXJsLmhyZWYpOwogICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICB9IGNhdGNoIChlcnIpIHsKICAgICAgICAgIGxvZygiYXNzaWduIGZhaWxlZCIsIFN0cmluZyhlcnIpKTsKICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8vIDIpIOaRmOaOiSBlbmRzY3JlZW4KICAgICAgaWYgKGhpZGVFbmRzY3JlZW4odGFyZ2V0Lmhvc3QpKSB7CiAgICAgICAgYXdhaXQgc2xlZXAoMzAwKTsKICAgICAgICBpZiAoIWZpbmREaXNtaXNzVGFyZ2V0KCkpIHsKICAgICAgICAgIGxvZygicmVtb3ZlZCBlbmRzY3JlZW4gbm9kZSIpOwogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQogICAgICB9CgogICAgICAvLyAzKSDlhZzlupXljp/nlJ8gY2xpY2vvvIjku4XpmZAgZW5kc2NyZWVuIOWGheaMiemSru+8iQogICAgICB2YXIgY2xpY2tFbCA9CiAgICAgICAgKHRhcmdldC5idG4gJiYgdGFyZ2V0LmJ0bi5xdWVyeVNlbGVjdG9yICYmIHRhcmdldC5idG4ucXVlcnlTZWxlY3RvcigiYnV0dG9uIikpIHx8CiAgICAgICAgdGFyZ2V0LmJ0biB8fAogICAgICAgIHRhcmdldC5saW5rOwogICAgICBpZiAoY2xpY2tFbCAmJiBjbGlja0VsLmNsaWNrKSB7CiAgICAgICAgbG9nKCJuYXRpdmUgY2xpY2sgZmFsbGJhY2siKTsKICAgICAgICBIVE1MRWxlbWVudC5wcm90b3R5cGUuY2xpY2suY2FsbChjbGlja0VsKTsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQogICAgICByZXR1cm4gZmFsc2U7CiAgICB9IGZpbmFsbHkgewogICAgICBidXN5ID0gZmFsc2U7CiAgICB9CiAgfQoKICBmdW5jdGlvbiB0aWNrKHJlYXNvbikgewogICAgZGlzbWlzc09uY2UocmVhc29uKS5jYXRjaChmdW5jdGlvbiAoZXJyKSB7CiAgICAgIGxvZygiZXJyb3IiLCBTdHJpbmcoZXJyKSk7CiAgICB9KTsKICB9CgogIHZhciBvYnNlcnZlciA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKGZ1bmN0aW9uICgpIHsKICAgIGNsZWFyVGltZW91dCh0aWNrLl90KTsKICAgIHRpY2suX3QgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgdGljaygibXV0YXRpb24iKTsKICAgIH0sIDIwMCk7CiAgfSk7CgogIHRyeSB7CiAgICBvYnNlcnZlci5vYnNlcnZlKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCwgewogICAgICBjaGlsZExpc3Q6IHRydWUsCiAgICAgIHN1YnRyZWU6IHRydWUsCiAgICAgIGF0dHJpYnV0ZXM6IHRydWUsCiAgICAgIGF0dHJpYnV0ZUZpbHRlcjogWyJzdHlsZSIsICJjbGFzcyIsICJoaWRkZW4iLCAiaHJlZiJdLAogICAgfSk7CiAgfSBjYXRjaCAoXykge30KCiAgLy8gU1BB77ya5LuOIGRhc2hib2FyZCDov5vnm7Tmkq3pobXml7YgdXNlcnNjcmlwdCDkuI3kuIDlrprph43ot5HvvIzpnaDova7or6LlhZzlupUKICBzZXRJbnRlcnZhbChmdW5jdGlvbiAoKSB7CiAgICB0aWNrKCJwb2xsIik7CiAgfSwgUE9MTF9NUyk7CgogIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCJ5dC1uYXZpZ2F0ZS1maW5pc2giLCBmdW5jdGlvbiAoKSB7CiAgICB0aWNrKCJ5dC1uYXZpZ2F0ZS1maW5pc2giKTsKICB9KTsKICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigicG9wc3RhdGUiLCBmdW5jdGlvbiAoKSB7CiAgICB0aWNrKCJwb3BzdGF0ZSIpOwogIH0pOwoKICBsb2coImluc3RhbGxlZCIsIGxvY2F0aW9uLmhyZWYpOwogIHRpY2soImJvb3QiKTsKfSkoKTsK", "enabled": true, "position": 1, "options": {} diff --git a/d2ypp2/services/neko/provisioning/youtube-studio-auto-dismiss.user.js b/d2ypp2/services/neko/provisioning/youtube-studio-auto-dismiss.user.js index 6918665..aaac918 100644 --- a/d2ypp2/services/neko/provisioning/youtube-studio-auto-dismiss.user.js +++ b/d2ypp2/services/neko/provisioning/youtube-studio-auto-dismiss.user.js @@ -1,12 +1,11 @@ // ==UserScript== // @name YouTube Studio Auto Dismiss // @namespace http://tampermonkey.net/ -// @version 1.1 -// @description 每5秒自动检测并点击 YouTube Studio 直播页面的 Dismiss 按钮,支持延迟加载 +// @version 2.2.0 +// @description 直播结束 endscreen 自动离开:读 a#dismiss-link 并 location.assign,避免 MouseEvent 风控 // @author You -// @match https://studio.youtube.com/channel/*/livestreaming -// @match https://studio.youtube.com/video/*/livestreaming -// @match https://studio.youtube.com/*/livestreaming +// @match https://studio.youtube.com/* +// @run-at document-idle // @license MIT // @grant none // @downloadURL https://update.greasyfork.org/scripts/557378/YouTube%20Studio%20Auto%20Dismiss.user.js @@ -16,57 +15,217 @@ (function () { "use strict"; - function triggerClick(el) { - if (!el) return; - const evt = new MouseEvent("click", { - view: window, - bubbles: true, - cancelable: true, - }); - el.dispatchEvent(evt); - console.log("Dismiss 按钮已点击:", el, "父元素:", el.parentElement); + // 不要用 404: This page could not be found.无人直播系统 · live.local

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.无人直播系统 · live.local

404

This page could not be found.

\ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/xYg2qS760UEpBRHWcTFN5/_buildManifest.js b/d2ypp2/web-console/out/_next/static/93noLwLTiZ-nO6dg8JRLS/_buildManifest.js similarity index 100% rename from d2ypp2/web-console/out/_next/static/xYg2qS760UEpBRHWcTFN5/_buildManifest.js rename to d2ypp2/web-console/out/_next/static/93noLwLTiZ-nO6dg8JRLS/_buildManifest.js diff --git a/d2ypp2/web-console/out/_next/static/xYg2qS760UEpBRHWcTFN5/_ssgManifest.js b/d2ypp2/web-console/out/_next/static/93noLwLTiZ-nO6dg8JRLS/_ssgManifest.js similarity index 100% rename from d2ypp2/web-console/out/_next/static/xYg2qS760UEpBRHWcTFN5/_ssgManifest.js rename to d2ypp2/web-console/out/_next/static/93noLwLTiZ-nO6dg8JRLS/_ssgManifest.js diff --git a/d2ypp2/web-console/out/_next/static/chunks/371-3c69d09687afa990.js b/d2ypp2/web-console/out/_next/static/chunks/371-3c69d09687afa990.js new file mode 100644 index 0000000..1f4055a --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/chunks/371-3c69d09687afa990.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[371],{3371:function(e,t,n){n.d(t,{Z:function(){return na}});var s=n(3890),l=n(3925),i=n(9013),a=n(8261),r=n(3802),o=n(2258),c=n(4543),d=n(6837),u=n(5017),x=n(5218),m=n(7165),p=n(7362),h=n(4081),g=n(3745),b=n(5576),f=n(8251),v=n(3215),y=n(9625),w=n(776),j=n(1975),N=n(7951),k=n(7742),_=n(6536),S=n(3031),z=n(7444),C=n(4771),R=n(283),L=n(419),P=n(476),T=n(2471),M=n(891),E=n(2245),U=n(4786),Z=n(8496),D=n(5653),I=n(4136),A=n(6623),O=n(5674),B=n(9535),F=n(3209),W=n(4520),K=n(1503),H=n(3237),Y=n(9588),G=n(7112),q=n(2227),J=n(2555),V=n(7169);class ${reset(){if(this.buf=new Uint8Array(0),this.sps=null,this.pps=null,this.configured=!1,this.configuring=!1,this.ts=0,this.decoder){try{this.decoder.close()}catch(e){}this.decoder=null}}push(e){let t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e)),this.buf=function(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}(this.buf,t),this.drainAvcc()}drainAvcc(){let e=this.buf,t=0;for(;t+4<=e.length;){var n;let s=e[n=t]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3];if(s<=0||s>6291456){this.buf=new Uint8Array(e.subarray(t+1)),t=0;continue}if(t+4+s>e.length)break;let l=e.subarray(t+4,t+4+s);t+=4+s,this.handleNal(l)}t>0&&(this.buf=new Uint8Array(e.subarray(t)))}handleNal(e){if(e.length<2)return;let t=31&e[0];if(7===t?this.sps=new Uint8Array(e):8===t&&(this.pps=new Uint8Array(e)),this.sps&&this.pps&&!this.configured&&!this.configuring&&this.configure(),!this.configured||!this.decoder||1!==t&&5!==t&&7!==t&&8!==t||7===t||8===t)return;let n=new Uint8Array(4+e.length);new DataView(n.buffer).setUint32(0,e.length,!1),n.set(e,4);try{let e=new EncodedVideoChunk({type:5===t?"key":"delta",timestamp:this.ts,data:n});this.ts+=33333,this.decoder.decode(e)}catch(e){this.onDecodeError(e.message||String(e))}}async configure(){if(this.sps&&this.pps&&!this.configured&&!this.configuring){this.configuring=!0;try{let e=function(e,t){let n=e.subarray(1),s=t.subarray(1),l=new Uint8Array(11+n.length+3+s.length),i=0;return l[i++]=1,l[i++]=e[1],l[i++]=e[2],l[i++]=e[3],l[i++]=255,l[i++]=225,l[i++]=n.length>>8&255,l[i++]=255&n.length,l.set(n,i),i+=n.length,l[i++]=1,l[i++]=s.length>>8&255,l[i++]=255&s.length,l.set(s,i),l}(this.sps,this.pps),t=function(e){let t=e=>e.toString(16).padStart(2,"0").toUpperCase();return"avc1.".concat(t(e[1])).concat(t(e[2])).concat(t(e[3]))}(this.sps),n=new VideoDecoder({output:e=>{var t;let n=this.canvas.getContext("2d");if(!n){e.close();return}(this.canvas.width!==e.displayWidth||this.canvas.height!==e.displayHeight)&&(this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight),n.drawImage(e,0,0),e.close(),null===(t=this.onFrame)||void 0===t||t.call(this)},error:e=>this.onDecodeError(String(e.message||e))});await n.configure({codec:t,description:e,optimizeForLatency:!0}),this.decoder=n,this.configured=!0}catch(e){this.onDecodeError(e.message||String(e))}finally{this.configuring=!1}}}constructor(e,t,n){this.canvas=e,this.onDecodeError=t,this.onFrame=n,this.buf=new Uint8Array(0),this.decoder=null,this.configured=!1,this.configuring=!1,this.ts=0,this.sps=null,this.pps=null}}function X(){return"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoFrame}let Q="live-hub-adb-bookmarks-v1";function ee(e,t,n){let s,l,i,a;let r=e.getBoundingClientRect(),o=e.width,c=e.height;if(!o||!c)return null;let d=r.width/r.height,u=o/c;u>d?(s=r.width,l=r.width/u,i=0,a=(r.height-l)/2):(l=r.height,s=r.height*u,i=(r.width-s)/2,a=0);let x=t-r.left-i,m=n-r.top-a;return x<0||m<0||x>s||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}function et(e,t,n){let s,l,i,a;let r=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c)return null;let d=r.width/r.height,u=o/c;u>d?(s=r.width,l=r.width/u,i=0,a=(r.height-l)/2):(l=r.height,s=r.height*u,i=(r.width-s)/2,a=0);let x=t-r.left-i,m=n-r.top-a;return x<0||m<0||x>s||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}let en=[0,280,450,700,1100];function es(e){switch(e){case"usb":return{Icon:B.Z,zh:"USB",en:"USB",cls:"bg-amber-500/20 text-amber-100 ring-amber-500/35"};case"tcp":return{Icon:E.Z,zh:"网络",en:"TCP",cls:"bg-cyan-500/20 text-cyan-100 ring-cyan-500/35"};case"emulator":return{Icon:R.Z,zh:"模拟器",en:"Emu",cls:"bg-fuchsia-500/20 text-fuchsia-100 ring-fuchsia-500/35"};default:return{Icon:d.Z,zh:"?",en:"?",cls:"bg-zinc-600/30 text-zinc-400"}}}let el="https://github.com/Genymobile/scrcpy",ei="https://github.com/viarotel-org/escrcpy";function ea(e,t){let n=t.startsWith("/")?t:"/".concat(t),s=(e||"").trim().replace(/\/$/,"");return s?"".concat(s).concat(n):n}function er(e){var t;let{t:n,apiBase:l,fetchJson:i,serial:a,devices:r,setSerial:o,adbAvailable:c,lock:u,overview:x,onAndroidAction:m,notify:h,onRefreshDevices:g}=e,[b,f]=(0,Z.useState)(0),[v,y]=(0,Z.useState)(450),[j,N]=(0,Z.useState)(!1),[k,_]=(0,Z.useState)(null),[S,z]=(0,Z.useState)(null),[C,R]=(0,Z.useState)(!0),[L,P]=(0,Z.useState)(""),[T,M]=(0,Z.useState)(""),[E,U]=(0,Z.useState)("37777"),[D,I]=(0,Z.useState)(""),[A,O]=(0,Z.useState)(!1),[B,er]=(0,Z.useState)([]),[eo,ec]=(0,Z.useState)(!1),[ed,eu]=(0,Z.useState)(null),[ex,em]=(0,Z.useState)(!1),[ep,eh]=(0,Z.useState)(null),[eg,eb]=(0,Z.useState)(null),[ef,ev]=(0,Z.useState)(!0),ey=(0,Z.useRef)(null),ew=(0,Z.useRef)(null),ej=(0,Z.useRef)(null),eN=(0,Z.useRef)(null),ek=(0,Z.useRef)(null),e_=(0,Z.useRef)(null),eS=(0,Z.useRef)(0),ez=(0,Z.useRef)(!1),eC=(0,Z.useRef)(null),eR=(0,Z.useRef)(!1),eL=null===(t=r.find(e=>e.serial===a))||void 0===t?void 0:t.transport,eP=v>0,eT=a?"".concat(ea(l,"/android/screenshot"),"?serial=").concat(encodeURIComponent(a),"&ts=").concat(b).concat(eP?"&fast=1":""):"",eM=(0,Z.useCallback)(()=>{f(e=>e+1)},[]),eE=(0,Z.useCallback)(()=>{null!=eC.current&&(window.clearTimeout(eC.current),eC.current=null)},[]);(0,Z.useEffect)(()=>{let e=()=>ev("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(Q);if(e){let t=JSON.parse(e);Array.isArray(t)&&er(t.map(String).filter(Boolean).slice(0,24))}}catch(e){}},[]);let eU=e=>{let t=e.trim();if(!t)return;let s=[t,...B.filter(e=>e!==t)].slice(0,16);er(s);try{window.localStorage.setItem(Q,JSON.stringify(s))}catch(e){}h(n("已保存快捷地址","Saved quick address"))};(0,Z.useEffect)(()=>{if(!a||!c){z(null);return}let e=!1;return(async()=>{try{let t=await (0,V.N)("".concat(ea(l,"/android/display_metrics"),"?serial=").concat(encodeURIComponent(a)));if(e)return;"number"==typeof t.width&&"number"==typeof t.height&&z({width:t.width,height:t.height})}catch(e){}})(),()=>{e=!0}},[l,c,a]),(0,Z.useEffect)(()=>{if(!c||!a||v<=0||eo||!ef)return;let e=window.setInterval(()=>f(e=>e+1),v);return()=>clearInterval(e)},[c,v,ef,a,eo]),(0,Z.useEffect)(()=>{ef&&c&&a&&!eo&&eM()},[c,eM,ef,a,eo]),(0,Z.useEffect)(()=>{if(!c){eb(null);return}let e=!1;return(async()=>{try{let t=await (0,V.N)(ea(l,"/android/scrcpy/info"));e||eb(t)}catch(e){}})(),()=>{e=!0}},[l,c]),(0,Z.useEffect)(()=>{eo||eh(null)},[eo]),(0,Z.useEffect)(()=>{eu(null),ez.current=!1},[a]),(0,Z.useEffect)(()=>{let e=r.find(e=>e.serial===a),t=!!(a&&ed===a);if(c&&a&&(null==e?void 0:e.state)==="device"&&(null==eg?void 0:eg.server_jar)&&X()&&!t){ec(!0),y(0);return}if(t||!a||!c||eg&&!eg.server_jar||!X()||e&&"device"!==e.state){ec(!1);return}},[a,r,c,eg,ed]),(0,Z.useEffect)(()=>{if(!eo||!a||!c){var e,t;eE(),ez.current=!0,eR.current=!1,null===(e=eN.current)||void 0===e||e.close(),eN.current=null,null===(t=ek.current)||void 0===t||t.reset(),ek.current=null,em(!1);return}if(!X()){eh(n("当前浏览器不支持 WebCodecs H.264","WebCodecs H.264 not supported in this browser")),ec(!1);return}let s=ej.current;if(!s)return;let i=e=>{var t;eE(),ez.current=!0,null===(t=eN.current)||void 0===t||t.close(),eh(e),ec(!1),y(450),eu(a),window.setTimeout(()=>eM(),120)},r=new $(s,e=>i("".concat(n("实时画面解码失败,已切回截图模式","Live stream decode failed, using screenshot mode"),": ").concat(e)),()=>{eR.current=!0,eE()});ek.current=r,ez.current=!1,eR.current=!1;let o=new WebSocket(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1920,s=(function(e){let t=(e||"").trim();if(t)try{let e=new URL(t,window.location.href),n="https:"===e.protocol?"wss:":"ws:";return"".concat(n,"//").concat(e.host)}catch(e){}let n=void 0!==J&&J.env.NEXT_PUBLIC_API_URL?String(J.env.NEXT_PUBLIC_API_URL).trim():"";if(n)try{let e=new URL(n,window.location.href),t="https:"===e.protocol?"wss:":"ws:";return"".concat(t,"//").concat(e.host)}catch(e){}let s=window.location.port;if("3000"===s||"3001"===s){let e=window.location.hostname||"127.0.0.1";return"ws://".concat(e,":").concat("8001")}let{protocol:l,host:i}=window.location;return"".concat("https:"===l?"wss:":"ws:","//").concat(i)})(e).replace(/\/$/,""),l=new URLSearchParams({serial:t,max_size:String(n)});return"".concat(s,"/android/scrcpy/ws?").concat(l.toString())}(l,a));return eN.current=o,o.binaryType="arraybuffer",o.onopen=()=>{em(!0),eh(null),eE(),eC.current=window.setTimeout(()=>{eR.current||i(n("实时画面无首帧,已切回截图模式","No first live frame, using screenshot mode"))},5200)},o.onmessage=e=>{var t;if("string"==typeof e.data){try{let t=JSON.parse(e.data);t.error&&eh(t.error)}catch(e){}return}null===(t=ek.current)||void 0===t||t.push(e.data)},o.onerror=()=>{eh(n("WebSocket 异常","WebSocket error"))},o.onclose=()=>{var e;em(!1),null===(e=ek.current)||void 0===e||e.reset(),ek.current=null,eE(),eo&&!ez.current&&i(n("实时画面连接失败,已切回截图模式","Live stream failed, using screenshot mode"))},()=>{eE(),ez.current=!0,eR.current=!1,o.close(),eN.current=null,r.reset(),ek.current===r&&(ek.current=null)}},[eo,a,c,l,eM,eE,n]),(0,Z.useEffect)(()=>{a&&c&&(eS.current=0,f(e=>e+1))},[a,c]);let eZ=async()=>{let e=L.trim();if(!e){h(n("填写 host:port","Enter host:port"));return}O(!0);try{let t=await i("/android/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});h(t.message||(t.ok?"OK":n("连接结果见日志","See message"))),g(),eM()}catch(e){h(e.message)}finally{O(!1)}},eD=async e=>{O(!0);try{let t=await i("/android/disconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});h(t.message||"OK"),g()}catch(e){h(e.message)}finally{O(!1)}},eI=async()=>{let e=T.trim(),t=parseInt(E,10)||37777,s=D.trim();if(!e||!s){h(n("填写配对 IP 与码","Host + code required"));return}O(!0);try{let l=await i("/android/pair",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:e,port:t,code:s})});h(l.message||(l.ok?n("配对成功后再点连接","Paired — now Connect"):"pair"))}catch(e){h(e.message)}finally{O(!1)}},eA=async e=>{if(!C||u||!c||!a)return;let t=ew.current;if(!t)return;let s=et(t,e.clientX,e.clientY);if(!s)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-s.x)&&28>Math.abs(i.y-s.y)?(ey.current=null,await m("double_tap",{x:s.x,y:s.y}),h(n("双击","Double tap"))):(ey.current={t:l,x:s.x,y:s.y},await m("tap",{x:s.x,y:s.y})),eM()},eO=async e=>{if(e.preventDefault(),u||!c||!a)return;let t=ew.current;if(!t)return;let s=et(t,e.clientX,e.clientY);s&&(await m("long_press",{x:s.x,y:s.y,duration:720}),h(n("长按","Long press")),eM())},eB=async e=>{if(!C||u||!c||!a)return;let t=ej.current;if(!t)return;let s=ee(t,e.clientX,e.clientY);if(!s)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-s.x)&&28>Math.abs(i.y-s.y)?(ey.current=null,await m("double_tap",{x:s.x,y:s.y}),h(n("双击","Double tap"))):(ey.current={t:l,x:s.x,y:s.y},await m("tap",{x:s.x,y:s.y})),eo||eM()},eF=async e=>{if(e.preventDefault(),u||!c||!a)return;let t=ej.current;if(!t)return;let s=ee(t,e.clientX,e.clientY);s&&(await m("long_press",{x:s.x,y:s.y,duration:720}),h(n("长按","Long press")),eo||eM())};if(!c)return(0,s.jsx)("div",{className:"rounded-2xl border border-amber-500/25 bg-amber-500/[0.06] p-6 text-center text-sm text-amber-200/90",children:n("宿主机未安装 adb,无法使用 Live 控制台。","adb is required for the Live console.")});let eW=es(eL),eK=eW.Icon;return(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-sky-500/20 bg-gradient-to-br from-sky-500/[0.08] via-zinc-950/80 to-zinc-900/90 p-4 ring-1 ring-white/[0.05]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,s.jsx)(F.Z,{className:"h-4 w-4 text-sky-400"}),(0,s.jsx)("h4",{className:"text-sm font-semibold text-white",children:n("链路管理","Link manager")}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500",children:n("USB / Redroid :5555 / 无线调试(先配对再连接)","USB \xb7 Redroid :5555 \xb7 wireless (pair then connect)")})]}),(0,s.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb connect"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("input",{className:"min-w-[12rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-3 py-2 font-mono text-xs text-zinc-200",placeholder:"192.168.1.10:5555",value:L,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&void eZ()}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eZ(),className:"rounded-lg bg-sky-500/25 px-3 py-2 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/40",children:A?"…":"Connect"}),(0,s.jsx)("button",{type:"button",disabled:A||u||!L.trim(),onClick:()=>eU(L),className:"rounded-lg border border-white/10 px-3 py-2 text-xs text-zinc-400 hover:text-zinc-200",children:n("存书签","Pin")})]}),B.length?(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:B.map(e=>(0,s.jsx)("button",{type:"button",className:"rounded-md bg-white/[0.06] px-2 py-0.5 font-mono text-[10px] text-zinc-400 hover:bg-white/10",onClick:()=>P(e),children:e},e))}):null,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 pt-2",children:[(0,s.jsx)("button",{type:"button",disabled:A||u||!a,onClick:()=>void eD(a),className:"rounded-lg border border-rose-500/30 bg-rose-500/10 px-2.5 py-1.5 text-[10px] text-rose-200",children:n("断开当前 TCP","Disconnect current")}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eD(""),className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-500 hover:text-zinc-300",children:n("断开全部 TCP","Disconnect all TCP")}),(0,s.jsxs)("button",{type:"button",disabled:A||u,onClick:()=>{g(),eM(),h(n("已刷新设备列表","Devices refreshed"))},className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-400",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3"}),"ADB list"]})]})]}),(0,s.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb pair(无线调试)"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("input",{className:"w-32 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"IP",value:T,onChange:e=>M(e.target.value)}),(0,s.jsx)("input",{className:"w-20 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"port",value:E,onChange:e=>U(e.target.value)}),(0,s.jsx)("input",{className:"min-w-[6rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs tracking-widest",placeholder:"123456",value:D,onChange:e=>I(e.target.value)}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eI(),className:"rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-400/35",children:"Pair"})]}),(0,s.jsx)("p",{className:"text-[10px] leading-relaxed text-zinc-600",children:n("手机上「无线调试」会显示配对端口与 6 位码;配对成功后用上方 connect 连接 adb 显示的 IP:5555。","Use the pairing port + 6-digit code from Wireless debugging; then connect to the listed adb IP:5555.")})]})]})]}),(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-emerald-500/25 bg-gradient-to-br from-emerald-500/[0.12] via-zinc-950/90 to-violet-500/[0.08] p-1 shadow-2xl shadow-emerald-900/20 ring-1 ring-white/[0.06]",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute -right-20 -top-20 h-56 w-56 rounded-full bg-emerald-500/10 blur-3xl","aria-hidden":!0}),(0,s.jsxs)("div",{className:"relative rounded-[1.35rem] border border-white/[0.06] bg-zinc-950/80 p-4 backdrop-blur-sm",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-emerald-400/30 to-violet-500/25 ring-1 ring-white/10",children:(0,s.jsx)(p.Z,{className:"h-6 w-6 text-emerald-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold tracking-tight text-white",children:n("无人直播系统 \xb7 ADB 云控台","Unmanned Live System \xb7 ADB farm console")}),(0,s.jsxs)("p",{className:"mt-1 max-w-xl text-[11px] leading-relaxed text-zinc-500",children:[n("统一适配 USB / Redroid / 无线 adb:已授权设备默认走官方 scrcpy-server 的 WebSocket H.264 真流(与桌面 ","USB / Redroid / wireless adb: authorized devices default to official scrcpy-server WebSocket H.264 (same stack as "),(0,s.jsx)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"escrcpy"}),n(" / "," / "),(0,s.jsx)("a",{href:el,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"scrcpy"}),n(");无 jar 或关闭真流时用截图。","); PNG screenshot when jar missing or stream off.")]})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-1.5 self-start sm:flex-row",children:[(0,s.jsxs)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["escrcpy",(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 opacity-70"})]}),(0,s.jsxs)("a",{href:el,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["scrcpy",(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 opacity-70"})]})]})]}),r.length>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsxs)("p",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:[(0,s.jsx)(K.Z,{className:"h-3.5 w-3.5"}),n("设备矩阵","Device matrix")]}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(e=>{let t="device"===e.state,l=a===e.serial,i=es(e.transport),r=i.Icon;return(0,s.jsxs)("button",{type:"button",onClick:()=>o(e.serial),className:"flex min-w-[9rem] flex-col rounded-xl border px-3 py-2 text-left transition ".concat(l?"border-emerald-500/50 bg-emerald-500/15 ring-1 ring-emerald-400/30":"border-white/10 bg-black/30 hover:border-white/20"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-zinc-200",children:[(0,s.jsx)(d.Z,{className:"h-3.5 w-3.5 text-emerald-400/80"}),(0,s.jsx)("span",{className:"truncate",children:e.model||e.serial.slice(0,10)})]}),(0,s.jsx)("span",{className:"mt-0.5 truncate font-mono text-[9px] text-zinc-600",children:e.serial}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[9px] font-semibold ring-1 ".concat(i.cls),children:[(0,s.jsx)(r,{className:"h-2.5 w-2.5"}),n(i.zh,i.en)]}),(0,s.jsx)("span",{className:"rounded-md px-1.5 py-0.5 text-[9px] font-semibold ".concat(t?"bg-emerald-500/20 text-emerald-200":"bg-zinc-600/30 text-zinc-500"),children:e.state})]})]},e.serial)})})]}):null,(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("div",{className:"xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:n("刷新间隔","Interval")}),en.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>y(e),className:"rounded-lg px-2.5 py-1 text-[10px] font-semibold transition ".concat(v===e?"bg-violet-500/25 text-violet-100 ring-1 ring-violet-400/35":"bg-black/30 text-zinc-500 hover:text-zinc-300"),children:0===e?n("手动","Manual"):"".concat(e,"ms")},e)),(0,s.jsxs)("span",{className:"ml-1 inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[9px] font-medium ring-1 ".concat(eW.cls),children:[(0,s.jsx)(eK,{className:"h-3 w-3"}),"tcp"===eL?n("建议 ≥450ms","Suggest ≥450ms"):n("可试 280ms","Try 280ms")]}),(0,s.jsxs)("button",{type:"button",disabled:u,onClick:()=>void eM(),className:"ml-auto inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-2.5 py-1 text-[10px] text-zinc-300 hover:bg-white/[0.08]",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3 ".concat(j?"animate-spin":"")}),n("下一帧","Next frame")]}),(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>void m("wake"),className:"rounded-lg bg-amber-500/20 px-2.5 py-1 text-[10px] font-semibold text-amber-100 ring-1 ring-amber-500/30",children:"Wake"}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-[10px] text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/50",checked:C,onChange:e=>R(e.target.checked)}),(0,s.jsx)(H.Z,{className:"h-3 w-3"}),n("点按穿透","Tap-through")]}),(0,s.jsxs)("button",{type:"button",disabled:u||!a||!(null==eg?void 0:eg.server_jar),title:eg&&!eg.server_jar&&eg.hint_zh?eg.hint_zh:n("官方 scrcpy-server + WebSocket H.264","Official scrcpy-server + WebSocket H.264"),onClick:()=>{ec(e=>{let t=!e;return t?(eu(null),h(n("已开启实时画面(H.264 WebSocket)","Live H.264 WebSocket stream on"))):(a&&eu(a),h(n("已关闭实时画面(将使用截图)","Live stream off — screenshot mode"))),t})},className:"inline-flex items-center gap-1 rounded-lg border px-2.5 py-1 text-[10px] font-semibold transition ".concat(eo?"border-cyan-400/50 bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/35":"border-white/10 bg-black/30 text-zinc-400 hover:text-zinc-200"),children:[(0,s.jsx)(Y.Z,{className:"h-3 w-3"}),eo?n("关闭真流","Stop WS"):n("实时画面","Live H.264")]})]}),eg&&!eg.server_jar?(0,s.jsxs)("p",{className:"mt-2 text-[10px] text-amber-200/80",children:[n("未检测到 scrcpy-server:启动时会自动拉取;内网可在 runtime.env 配置 SCRCPY_SERVER_DOWNLOAD_URL(支持 {tag})。","scrcpy-server missing: auto-fetched on startup; set SCRCPY_SERVER_DOWNLOAD_URL ({tag}) for mirrors."),eg.server_version?" (".concat(n("期望版本","version")," ").concat(eg.server_version,")"):null]}):null,(0,s.jsx)("p",{className:"mt-2 text-[10px] text-zinc-600",children:n("快捷键(镜像区聚焦时):H Home \xb7 B Back \xb7 R 多任务 \xb7 W 唤醒 \xb7 M 菜单","Hotkeys (mirror focused): H Home \xb7 B Back \xb7 R Recents \xb7 W Wake \xb7 M Menu")}),(0,s.jsxs)("div",{className:"relative mx-auto mt-4 max-h-[min(78vh,720px)] min-h-[280px]",children:[a?(0,s.jsxs)("div",{ref:e_,tabIndex:0,onKeyDown:e=>{if(!a||u)return;let t=e.target.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;let n={h:["key",{keycode:"3"}],b:["key",{keycode:"4"}],r:["key",{keycode:"187"}],w:["wake",void 0],m:["key",{keycode:"82"}]}[e.key.toLowerCase()];n&&(e.preventDefault(),(async()=>{await m(n[0],n[1]),eo||eM()})())},className:"relative flex justify-center outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/50",children:[(0,s.jsxs)("div",{className:"relative rounded-[2rem] border-[10px] border-zinc-800 bg-black shadow-inner shadow-black/80 ring-1 ring-white/10",style:{maxHeight:"min(72vh, 680px)"},children:[(0,s.jsx)("div",{className:"absolute left-1/2 top-0 z-10 h-5 w-24 -translate-x-1/2 rounded-b-xl bg-black/80"}),eo?(0,s.jsx)("canvas",{ref:ej,className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onClick:eB,onContextMenu:eF}):(0,s.jsx)("img",{ref:ew,src:eT||void 0,alt:"device",className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onLoadStart:()=>{N(!0)},onLoad:()=>{N(!1),eS.current=0,_(null)},onError:()=>{N(!1),eS.current+=1,eS.current<=3?(_(null),window.setTimeout(()=>eM(),380+200*eS.current)):_(n("截图连续失败:检查 USB 授权 / 无线是否断开 / Redroid 端口","Screenshot failed repeatedly"))},onClick:eA,onContextMenu:eO})]}),ex?(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-cyan-500/90 px-2 py-0.5 text-[9px] font-bold text-cyan-950 shadow-lg",children:[(0,s.jsx)(Y.Z,{className:"h-3 w-3"}),"SCRCPY\xb7WS"]}):v>0&&!eo?(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-emerald-500/90 px-2 py-0.5 text-[9px] font-bold text-emerald-950 shadow-lg",children:[(0,s.jsx)(G.Z,{className:"h-3 w-3"}),"LIVE"]}):eo?null:(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-zinc-700/90 px-2 py-0.5 text-[9px] font-bold text-zinc-200",children:[(0,s.jsx)(q.Z,{className:"h-3 w-3"}),n("单帧","Still")]})]}):(0,s.jsx)("p",{className:"py-16 text-center text-sm text-zinc-600",children:n("请选择或连接设备","Pick or connect a device")}),ep?(0,s.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:ep}):null,k&&!eo?(0,s.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:k}):null,(0,s.jsx)("p",{className:"mt-3 text-center text-[10px] text-zinc-600",children:n("左键单击 / 双击 \xb7 右键长按 \xb7 坐标对齐 PNG 像素","Left tap/double \xb7 right long-press \xb7 PNG pixel coords")})]})]}),(0,s.jsxs)("div",{className:"space-y-4 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-black/40 p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:n("遥测","Telemetry")}),x?(0,s.jsxs)("dl",{className:"mt-3 space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"device"}),(0,s.jsxs)("dd",{className:"text-right text-zinc-200",children:[x.brand," ",x.model]})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"Android"}),(0,s.jsxs)("dd",{className:"text-zinc-300",children:[x.android_version," (API ",x.sdk,")"]})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"wm size"}),(0,s.jsx)("dd",{className:"text-cyan-300/90",children:S?"".concat(S.width,"\xd7").concat(S.height):x.resolution||"—"})]}),(0,s.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:x.battery})]}):(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-600",children:n("在上方点「刷新设备信息」","Use Refresh device info above")})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/20 bg-gradient-to-b from-violet-500/[0.08] to-black/40 p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n("导航坞","Nav dock")}),(0,s.jsx)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[["3","Home"],["4","Back"],["187","Recents"]].map(e=>{let[t,n]=e;return(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:t}),eM()},className:"rounded-xl border border-white/10 bg-white/[0.06] py-3 text-xs font-semibold text-zinc-200 hover:bg-white/[0.1]",children:n},t)})}),(0,s.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:"24"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol+"}),(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:"25"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol−"})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-cyan-500/[0.05] p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-cyan-300/80",children:n("手势","Gestures")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("swipe",{direction:e}),eM()},className:"rounded-lg border border-white/10 bg-black/30 py-2 font-mono text-[10px] uppercase text-zinc-300",children:e},e))})]})]})]})]})]})]})}let eo=[{label:"getprop",cmd:"getprop ro.build.version.release"},{label:"top pkg",cmd:"dumpsys activity activities | grep -E 'mResumedActivity' | tail -n 1"},{label:"usb",cmd:"dumpsys usb | head -n 60"},{label:"surface",cmd:"dumpsys SurfaceFlinger | head -n 40"}];function ec(e,t,n){return e?(0,s.jsx)("span",{className:"rounded bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-200",children:t}):(0,s.jsx)("span",{className:"rounded bg-zinc-500/15 px-2 py-0.5 text-[10px] text-zinc-400",children:n})}function ed(e){var t,n,l,i,a,r,o,c,d,u,x,m,p,h,g;let{t:b,notify:f,fetchJson:v,apiBase:w,busy:j,androidSerial:N,setAndroidSerial:k,devices:_,adbAvailable:S,apkPath:z,setApkPath:C,onAndroidAction:R,onCopy:P,onRefreshDevices:T}=e,[E,U]=(0,Z.useState)(null),[D,B]=(0,Z.useState)(null),[F,W]=(0,Z.useState)(null),[K,H]=(0,Z.useState)(null),[Y,G]=(0,Z.useState)(""),[q,J]=(0,Z.useState)([]),[V,$]=(0,Z.useState)("getprop ro.product.model"),[X,Q]=(0,Z.useState)(""),[ee,et]=(0,Z.useState)("300"),[en,es]=(0,Z.useState)(""),[el,ei]=(0,Z.useState)(null),[ea,ed]=(0,Z.useState)([]),[eu,ex]=(0,Z.useState)(null),[em,ep]=(0,Z.useState)("https://"),[eh,eg]=(0,Z.useState)(""),[eb,ef]=(0,Z.useState)(!1),[ev,ey]=(0,Z.useState)(null),ew=!!(j||ev),ej=_.find(e=>e.serial===N)||null,eN=(0,Z.useCallback)(async()=>{if(!N||!S){U(null),B(null);return}ey("overview"),B(null);try{let e=await v("/android/overview?serial=".concat(encodeURIComponent(N)));U(e)}catch(e){U(null),B(e.message)}finally{ey(null)}},[S,N,v]),ek=(0,Z.useCallback)(async()=>{H(null);try{let e=await v("/redroid/summary");W(e)}catch(e){W(null),H(e.message)}},[v]);(0,Z.useEffect)(()=>{eN()},[eN]),(0,Z.useEffect)(()=>{ek()},[ek]);let e_=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("packages");try{let e=encodeURIComponent(Y.trim()),t=await v("/android/packages?serial=".concat(encodeURIComponent(N),"&query=").concat(e,"&limit=80"));J(t.packages||[])}catch(e){f(e.message),J([])}finally{ey(null)}},eS=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}let e=V.trim();if(e){ey("shell");try{var t,n;let s=await v("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"shell",serial:N,payload:{command:e}})});Q(null!==(n=null!==(t=s.output)&&void 0!==t?t:s.message)&&void 0!==n?n:"")}catch(e){Q(e.message)}finally{ey(null)}}},ez=(0,Z.useCallback)(async e=>{if(!N)return;let t=Math.min(3e3,Math.max(1,parseInt(ee,10)||200)),n=!!(null==e?void 0:e.silent);n||ey("logcat"),ei(null);try{var s;let e=await v("/android/logcat?serial=".concat(encodeURIComponent(N),"&lines=").concat(t));es(null!==(s=e.text)&&void 0!==s?s:"")}catch(e){es(""),ei(e.message)}finally{n||ey(null)}},[N,v,ee]);(0,Z.useEffect)(()=>{if(!eb||!N||!S)return;let e=window.setInterval(()=>void ez({silent:!0}),3e3);return ez({silent:!0}),()=>clearInterval(e)},[S,N,eb,ez]);let eC=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("ui"),ex(null);try{let e=await v("/android/ui?serial=".concat(encodeURIComponent(N),"&limit=100"));ed(e.nodes||[])}catch(e){ed([]),ex(e.message)}finally{ey(null)}},eR=async(e,t)=>{ey("redroid:".concat(e));try{let n=await v("/redroid/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,name:t||""})});n.summary&&W(n.summary),f(n.message||"OK"),await ek(),T()}catch(e){f(e.message)}finally{ey(null)}},eL=async e=>{await R("key",{keycode:e})},eP=async()=>{let e=eh.trim();if(!e){f(b("请输入文字","Enter text"));return}await R("text",{text:e})},eT=async()=>{let e=em.trim();if(!e||"https://"===e){f(b("请输入 URL","Enter URL"));return}await R("open_url",{url:e})};return(0,s.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安卓设备工作台","Android workstation")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("USB 真机与 Redroid 共用一套控制面,优先保证 USB 真机稳定。","USB phone and Redroid share one control surface.")})]}),S?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew||!N,onClick:()=>void eN(),className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新设备","Refresh device")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>{ek(),T()},className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新 Redroid","Refresh Redroid")})]}):(0,s.jsx)("span",{className:"text-xs text-amber-200/90",children:b("宿主机未检测到 adb","adb not found on host")})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:_.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>k(e.serial),className:"rounded-xl border px-4 py-2 text-left text-xs ".concat(N===e.serial?"border-violet-500/50 bg-violet-500/10 text-white":"border-white/10 bg-black/30 text-zinc-400"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-zinc-200",children:e.model||e.serial}),e.transport?(0,s.jsx)("span",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-zinc-500",children:e.transport}):null,e.kind?(0,s.jsx)("span",{className:"rounded bg-cyan-500/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-cyan-200",children:e.kind}):null]}),(0,s.jsx)("div",{className:"text-[10px] text-zinc-600",children:e.serial}),"device"!==(e.state||"").toLowerCase()?(0,s.jsx)("div",{className:"mt-1 text-[10px] font-medium text-amber-200/90",children:"unauthorized"===e.state?b("未授权,请在手机上允许 USB 调试。","Unauthorized, allow USB debugging on device."):"".concat(b("状态","State"),": ").concat(e.state)}):null]},e.serial))}),S&&0===_.length?(0,s.jsx)("p",{className:"mt-4 rounded-lg border border-amber-500/20 bg-amber-500/5 p-3 text-xs leading-relaxed text-amber-200/90",children:b("当前没有已授权设备。USB 真机请检查调试授权;Redroid 请先启动实例,再 adb connect 127.0.0.1:5555。","No authorized devices. For USB phones, confirm USB debugging. For Redroid, start an instance then adb connect 127.0.0.1:5555.")}):null]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/15 bg-zinc-950/50 p-5",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-violet-300/90",children:b("真机诊断","Phone diagnostics")}),D?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:D}):null,E?(0,s.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,s.jsxs)("dl",{className:"space-y-1.5 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"model"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.brand," ",E.model]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"android"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.android_version," (sdk ",E.sdk,")"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"kind"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.kind||(null==ej?void 0:ej.kind)||"unknown"," / ",E.transport||(null==ej?void 0:ej.transport)||"unknown"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"display"})," ",(0,s.jsx)("dd",{className:"inline text-zinc-300",children:E.resolution})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"rotation"})," ",(0,s.jsx)("dd",{className:"inline text-zinc-300",children:E.rotation})]}),(0,s.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:E.battery}),(0,s.jsx)("div",{className:"line-clamp-3 text-[10px] text-zinc-500",children:E.focus})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(t=E.diagnostics)||void 0===t?void 0:t.ready,b("已启动","Boot ready"),b("未完成启动","Boot pending")),ec(null===(n=E.diagnostics)||void 0===n?void 0:n.google_play,"Google Play","No Play"),ec(null===(l=E.diagnostics)||void 0===l?void 0:l.google_services,"GMS","No GMS"),ec(null===(i=E.diagnostics)||void 0===i?void 0:i.magisk,"Magisk","No Magisk"),ec(null===(a=E.diagnostics)||void 0===a?void 0:a.root,"Root","No root")]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{children:["boot_completed: ",(null===(r=E.diagnostics)||void 0===r?void 0:r.boot_completed)||"-"]}),(0,s.jsxs)("div",{children:["provisioned: ",(null===(o=E.diagnostics)||void 0===o?void 0:o.device_provisioned)||"-"]}),(0,s.jsxs)("div",{children:["setup_complete: ",(null===(c=E.diagnostics)||void 0===c?void 0:c.user_setup_complete)||"-"]}),(0,s.jsxs)("div",{children:["abi: ",(null===(d=E.diagnostics)||void 0===d?void 0:d.abi)||"-"]}),(0,s.jsxs)("div",{className:"truncate",children:["hardware: ",(null===(u=E.diagnostics)||void 0===u?void 0:u.hardware)||"-"]})]})]}):D?null:(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("加载中","Loading")})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-zinc-950/50 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:b("Redroid 板块","Redroid panel")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("启动默认实例","Start default")})]}),K?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:K}):null,F?(0,s.jsxs)("div",{className:"mt-3 space-y-3 text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsxs)("div",{children:["arch: ",F.arch||"-"]}),(0,s.jsxs)("div",{className:"truncate",children:["image: ",F.image||"-"]}),(0,s.jsxs)("div",{children:["profile: ",F.device_profile||"-"]}),(0,s.jsxs)("div",{children:["gpu: ",F.gpu_mode||"-"]}),(0,s.jsxs)("div",{children:["adb: 127.0.0.1:",F.default_port||5555]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(x=F.requirements)||void 0===x?void 0:x.docker_available,"Docker","No Docker"),ec(null===(m=F.requirements)||void 0===m?void 0:m.adb_available,"ADB","No ADB"),ec(null===(p=F.requirements)||void 0===p?void 0:p.kvm,"KVM","No KVM"),ec(null===(h=F.requirements)||void 0===h?void 0:h.binderfs,"binderfs","No binderfs")]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(F.instances||[]).map(e=>{var t,n,l,i;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium text-zinc-100",children:e.name}),(0,s.jsxs)("div",{className:"font-mono text-[10px] text-zinc-500",children:[e.port?"127.0.0.1:".concat(e.port):"-"," / ",e.status_text||"-"]})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start",e.name),className:"rounded bg-emerald-500/15 px-2 py-1 text-[10px] text-emerald-200",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("restart",e.name),className:"rounded bg-amber-500/15 px-2 py-1 text-[10px] text-amber-200",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("adb_connect",e.name),className:"rounded bg-cyan-500/15 px-2 py-1 text-[10px] text-cyan-200",children:"ADB"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("stop",e.name),className:"rounded bg-rose-500/15 px-2 py-1 text-[10px] text-rose-200",children:"Stop"})]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[ec(null===(t=e.diagnostics)||void 0===t?void 0:t.ready,b("系统就绪","System ready"),b("启动中","Booting")),ec(null===(n=e.diagnostics)||void 0===n?void 0:n.google_play,"Play","No Play"),ec(null===(l=e.diagnostics)||void 0===l?void 0:l.magisk,"Magisk","No Magisk"),ec(null===(i=e.diagnostics)||void 0===i?void 0:i.root,"Root","No root")]}),e.data_dir?(0,s.jsx)("div",{className:"mt-2 truncate font-mono text-[10px] text-zinc-500",children:e.data_dir}):null]},e.name)}),(null===(g=F.instances)||void 0===g?void 0:g.length)?null:(0,s.jsx)("p",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-xs text-zinc-500",children:b("当前没有 Redroid 实例。默认动作会创建 redroid13-1。","No Redroid instances yet. Default actions create redroid13-1.")})]})]}):(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("读取 Redroid 状态中","Loading Redroid status")})]})]}),(0,s.jsx)(er,{t:b,apiBase:w,fetchJson:v,serial:N,devices:_,setSerial:k,adbAvailable:S,lock:ew,overview:E,onAndroidAction:R,notify:f,onRefreshDevices:T}),S&&N?(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-300/90",children:b("快捷控制","Quick controls")}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("3"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Home"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("4"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Back"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("187"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Recents"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("wake"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Wake"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:"com.zhiliaoapp.musically"}),className:"rounded-lg bg-gradient-to-r from-pink-500/25 to-violet-500/25 px-3 py-1.5 text-xs ring-1 ring-white/10",children:"TikTok"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("24"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol+"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("25"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol-"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("66"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Enter"})]}),(0,s.jsx)("p",{className:"mt-3 text-[10px] text-zinc-600",children:b("滑动手势","Swipe gestures")}),(0,s.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:["up","down","left","right"].map(e=>(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("swipe",{direction:e}),className:"rounded-lg border border-white/10 bg-black/30 px-2.5 py-1 font-mono text-[10px] uppercase text-zinc-300",children:e},e))}),(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:b("ADB 文本输入","ADB text input")}),(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:eh,onChange:e=>eg(e.target.value),placeholder:"hello / 123",onKeyDown:e=>{"Enter"===e.key&&eP()}}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP(),className:"rounded-lg bg-emerald-500/20 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("发送","Send")})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:em,onChange:e=>ep(e.target.value),placeholder:"https://"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eT(),className:"rounded-lg bg-violet-500/20 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/30",children:b("打开链接","Open URL")})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsxs)("h4",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:[(0,s.jsx)(L.Z,{className:"h-4 w-4"}),b("USB 真机优化建议","USB optimization")]}),(0,s.jsxs)("ul",{className:"mt-3 space-y-2 text-xs leading-relaxed text-zinc-400",children:[(0,s.jsx)("li",{children:b("优先使用主板直连 USB,不要经过不稳的 HUB。","Prefer direct motherboard USB, not unstable hubs.")}),(0,s.jsx)("li",{children:b("开发板端固定 adb server,避免频繁 kill-server。","Keep adb server stable and avoid frequent kill-server.")}),(0,s.jsx)("li",{children:b("镜像页默认支持 scrcpy H.264 真流,截图模式作为回退。","Use scrcpy H.264 live stream first, screenshot mode as fallback.")}),(0,s.jsx)("li",{children:b("如果 TikTok / YouTube App 直播,要先确认屏幕常亮、分辨率稳定、USB 供电足够。","For TikTok / YouTube app live, keep screen on, resolution stable, and USB power sufficient.")})]})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(I.Z,{className:"h-4 w-4 text-emerald-400"}),b("包名搜索与启动","Packages")]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-xl border border-white/10 bg-black/40 px-4 py-2 text-sm",value:Y,onChange:e=>G(e.target.value),placeholder:"tiktok / musically / youtube",onKeyDown:e=>{"Enter"===e.key&&e_()}}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void e_(),className:"rounded-xl bg-emerald-500/20 px-4 py-2 text-sm text-emerald-100 ring-1 ring-emerald-500/30",children:b("搜索","Search")})]}),(0,s.jsxs)("ul",{className:"mt-4 max-h-48 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 font-mono text-[11px]",children:[q.map(e=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 py-1 text-zinc-400",children:[(0,s.jsx)("span",{className:"min-w-0 truncate text-zinc-300",children:e.package}),(0,s.jsxs)("span",{className:"flex shrink-0 gap-1",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:e.package}),className:"rounded bg-white/10 px-2 py-0.5 text-[10px] text-zinc-200",children:b("启动","Launch")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("force_stop",{package:e.package}),className:"rounded bg-rose-500/15 px-2 py-0.5 text-[10px] text-rose-200",children:b("停止","Stop")})]})]},e.package)),q.length?null:(0,s.jsx)("li",{className:"py-2 text-center text-zinc-600",children:b("暂无结果","No results")})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"grid gap-6 xl:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(A.Z,{className:"h-4 w-4 text-amber-400"}),"ADB shell"]}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:eo.map(e=>(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>$(e.cmd),className:"rounded-md border border-white/10 bg-white/[0.04] px-2 py-1 text-[10px] text-zinc-400 hover:text-zinc-200",children:e.label},e.label))}),(0,s.jsx)("textarea",{className:"mt-3 min-h-[100px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-3 font-mono text-xs text-zinc-200",value:V,onChange:e=>$(e.target.value),spellCheck:!1,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),eS())}}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eS(),className:"rounded-xl bg-amber-500/20 px-4 py-2 text-sm text-amber-100 ring-1 ring-amber-500/30",children:"shell"===ev?(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),"Run"]}):"Run"}),X?(0,s.jsxs)("button",{type:"button",disabled:!X,onClick:()=>P(X),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制输出","Copy")]}):null]}),X?(0,s.jsx)("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/40 p-3 font-mono text-[11px] text-zinc-400 xl:max-h-[min(24rem,50vh)]",children:X}):null]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("Logcat","Logcat")}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("input",{className:"w-24 rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:ee,onChange:e=>et(e.target.value)}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-[11px] text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eb,onChange:e=>ef(e.target.checked)}),b("每 3 秒自动刷新","Auto every 3s")]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void ez(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:b("拉取日志","Pull logs")}),en?(0,s.jsxs)("button",{type:"button",onClick:()=>P(en),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制","Copy")]}):null]}),el?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:el}):null,en?(0,s.jsx)("pre",{className:"mt-3 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/50 p-3 font-mono text-[10px] leading-tight text-zinc-500 xl:max-h-[min(24rem,50vh)]",children:en}):null]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(O.Z,{className:"h-4 w-4 text-fuchsia-400"}),b("界面节点","UI nodes")]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eC(),className:"mt-3 rounded-xl border border-fuchsia-500/30 bg-fuchsia-500/10 px-4 py-2 text-sm text-fuchsia-100",children:b("刷新节点","Refresh nodes")}),eu?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:eu}):null,(0,s.jsxs)("ul",{className:"mt-3 max-h-64 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 text-[11px]",children:[ea.map((e,t)=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.04] py-1.5 text-zinc-400 last:border-0",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"text-zinc-200",children:e.label}),e.resource_id?(0,s.jsx)("span",{className:"ml-2 font-mono text-[10px] text-zinc-600",children:e.resource_id}):null,(0,s.jsxs)("div",{className:"font-mono text-[10px] text-zinc-600",children:["(",e.center_x,", ",e.center_y,")",e.clickable?" click":""]})]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("tap",{x:e.center_x,y:e.center_y}),className:"shrink-0 rounded bg-white/10 px-2 py-1 text-[10px] text-zinc-200",children:"Tap"})]},"".concat(e.center_x,"-").concat(e.center_y,"-").concat(t))),ea.length||eu?null:(0,s.jsx)("li",{className:"py-4 text-center text-zinc-600",children:b("尚未加载","Not loaded")})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安装 APK","Install APK")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("先 adb push 到 /sdcard/ 再执行安装。","Push the APK to /sdcard/ first.")}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm",value:z,onChange:e=>C(e.target.value)}),(0,s.jsx)("button",{type:"button",disabled:ew||!S||!N,onClick:()=>void R("install_apk",{path:z}),className:"mt-3 rounded-xl bg-emerald-500/20 px-4 py-2 text-sm font-medium text-emerald-100 ring-1 ring-emerald-500/30",children:"pm install"})]}):null]})}var eu=n(9609),ex=n(918),em=n(5365),ep=n(8755);function eh(e){let{t,title:n,subtitle:l,steps:i,onNavigate:a}=e;return(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5 p-6 shadow-lg shadow-violet-900/10",children:[(0,s.jsx)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:n}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:l}),(0,s.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:flex-wrap sm:justify-center",children:i.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[e.openUrl||e.target&&a?(0,s.jsxs)("button",{type:"button",onClick:()=>{if(e.openUrl){window.open((0,ep.p)(e.openUrl),"_blank","noopener,noreferrer");return}e.target&&a&&a(e.target)},className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ring-2 ring-white/10 transition hover:ring-violet-400/50 hover:brightness-110 ".concat(e.gradient),children:[(0,s.jsx)("span",{children:e.label}),e.sub?(0,s.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}):(0,s.jsxs)("div",{className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ".concat(e.gradient),children:[(0,s.jsx)("span",{children:e.label}),e.sub?(0,s.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}),t1&&void 0!==arguments[1]&&arguments[1],n=e.replace(/kbits\/s/gi,"").replace(/x$/i,"").trim().match(/-?\d+(?:\.\d+)?/);if(!n)return;let s=t?parseInt(n[0],10):Number(n[0]);return Number.isFinite(s)?s:void 0}function ek(e){let t=e.toLowerCase();return!(t.includes("frame=")&&t.includes("speed="))&&(ej.some(e=>t.includes(e.toLowerCase()))||t.includes("error")||t.includes("failed"))}function e_(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=function(){let e;for(var t=arguments.length,n=Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:12,n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-t),s=-1,l="";for(let e=n.length-1;e>=0;e-=1){let t=n[e].toLowerCase();if(t.includes("frame=")&&t.includes("speed=")){s=e,l=n[e];break}}return s<0||n.slice(s+1).some(ek)?"":l}(n.filter(Boolean).join("\n").slice(-16e3)),i={};if(!l)return i;for(ew.lastIndex=0;null!==(e=ew.exec(l));){let t=e[1].toLowerCase(),n=e[2];if("frame"===t||"drop"===t||"dup"===t){let e=eN(n,!0);null!=e&&(i[t]=e)}else if("fps"===t||"speed"===t||"bitrate"===t){let e=eN(n);null!=e&&(i[t]=e)}}return i}(n),l=!!(null==e?void 0:e.is_pushing);return{frame:eS(null==e?void 0:e.ffmpeg_frame,null==t?void 0:t.frame,s.frame),fps:eS(null==t?void 0:t.fps,s.fps),speed:eS(null==e?void 0:e.ffmpeg_speed,null==t?void 0:t.speed,s.speed),bitrate:eS(null==t?void 0:t.bitrate,s.bitrate),drop:eS(null==t?void 0:t.drop,s.drop),dup:eS(null==t?void 0:t.dup,s.dup),speedLow:null==e?void 0:e.ffmpeg_speed_low,progressStalled:null==e?void 0:e.ffmpeg_progress_stalled,live:l}}function eS(){for(var e=arguments.length,t=Array(e),n=0;n=1e3?"".concat((e/1e3).toFixed(1)," Mbps"):"".concat(Math.round(e)," kbps")}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("number"!=typeof e||!Number.isFinite(e))return"—";let s=e>=100?String(Math.round(e)):e.toFixed(n).replace(/\.00$/,"");return"".concat(s).concat(t)}function eR(e,t){let n=["fps ".concat(eC(e.fps)),"speed ".concat(eC(e.speed,"x")),"frame ".concat(eC(e.frame,"",0))],s=ez(e.bitrate);return(s&&n.push(s),!(null==t?void 0:t.live)&&n.every(e=>e.endsWith("—")))?"":n.join(" \xb7 ")}function eL(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(e.startsWith("#")||!e)continue;let n=e.match(/^(?:key|stream_key)\s*=\s*(.+)$/i);if(n){let e=n[1].trim().split(/[#;]/)[0].trim();if(e&&!e.toLowerCase().startsWith("rtmp"))return e.length>8?e.slice(-8):e;if(e.includes("live2/")){let t=e.split("/"),n=t[t.length-1]||"";return n.length>8?n.slice(-8):n}}}let t=e.trim();return!t||t.includes("\n")||t.toLowerCase().startsWith("rtmp")?"":t.length>8?t.slice(-8):t}function eP(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let s=e.match(/(https?:\/\/live\.douyin\.com\/[a-zA-Z0-9_-]+)/i);if(s){t.push(s[1].replace(/^http:\/\//i,"https://"));continue}let l=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(l){t.push("https://live.douyin.com/".concat(l[1]));continue}let i=e.match(/(\d{8,})/);i&&t.push("https://live.douyin.com/".concat(i[1]))}return Array.from(new Set(t)).slice(0,16)}function eT(e){let t=(e||"").trim().replace(/^[\s"'`[\]()()【】]+|[\s"'`[\]()()【】]+$/g,"");return!(t=(t=(t=(t=t.replace(/^(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*/i,"")).replace(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/gi,"")).replace(/(?:等待直播|正在直播|直播中|已开播|开始推流|主播已下播|下播|录制中|推流中).*$/i,"")).trim().replace(/^[\s,,;;||\-—::]+|[\s,,;;||\-—::]+$/g,""))||/^[-—_无未知]+$/i.test(t)||/^(unknown|null|undefined|none|nan)$/i.test(t)||/live\.douyin\.com/i.test(t)||/^\d{5,}$/.test(t)||/^(监测|格式|错误|无录制任务)/.test(t)?"":t.slice(0,48)}function eM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!e||e.startsWith("#"))continue;let n=e.match(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/i);if(!n||null==n.index)continue;let s=eT(e.slice(n.index+n[0].length));if(s)return s;let l=e.split(/[,,||]/,2);if(l.length>1){let e=eT(l[1]);if(e)return e}}return""}(e),s=function(e){var t,n,s;let l=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),i=/(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*(.{1,80})/i,a=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,r=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e of[/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]\s*([^\[\r\n]{1,80})/i,/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:正在直播中|正在直播|直播中|已开播|开始推流|录制中|推流中)/i])for(let n=l.length-1;n>=0;n-=1){let s=eT((null===(t=l[n].match(e))||void 0===t?void 0:t[1])||"");if(s)return s}for(let e=l.length-1;e>=0;e-=1){if(r.test(l[e]))continue;let t=eT((null===(n=l[e].match(i))||void 0===n?void 0:n[1])||"");if(t)return t}for(let e=l.length-1;e>=0;e-=1){let t=eT((null===(s=l[e].match(a))||void 0===s?void 0:s[1])||"");if(t)return t}return""}(t),l=eP(e).length,i=function(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),n=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,s=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e=t.length-1;e>=0;e-=1){var l;if(s.test(t[e]))continue;let i=eT((null===(l=t[e].match(n))||void 0===l?void 0:l[1])||"");if(i)return i}return""}(t),a=/frame=.*speed=/i.test(t)||/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]/i.test(t);if(l>1&&s&&!a&&s===i&&n)return n;let r=n||s;if(r)return r;let o=eE(t)||eU(e)[0]||"";return o?"抖音直播间 ".concat(o):""}function eE(e){if(!e)return null;let t=null;for(let n of e.split(/\r?\n/)){let e=n.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);e&&(t=e[1]);let s=n.match(/https?:\/\/[^/\s]*douyin\.com\/(\d{8,})/i);s&&(t=s[1])}return t}function eU(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let s=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(s){t.push(s[1]);continue}let l=e.match(/(\d{8,})/);t.push(l?l[1]:e.slice(0,96))}return Array.from(new Set(t)).slice(0,12)}function eZ(e){let t="",n=!0,s="",l=!0,i=e.split(/\r?\n/),a=!1;for(let e of i){let i=e.trim();if(/^\[youtube\]/i.test(i)){a=!0;continue}if(/^\[/.test(i)){a=!1;continue}if(!a||!i||i.startsWith("#")||i.startsWith(";"))continue;let r=i.indexOf("=");if(r<0)continue;let o=i.slice(0,r).trim().toLowerCase(),c=i.slice(r+1).trim().split(/[#;]/)[0].trim();"key"===o||"stream_key"===o?t=c:"rtmps"===o?n=!/^(0|false|否)/i.test(c):"bitrate"===o?s=c:"fast_audio"===o&&(l=/^(1|true|yes|是|开|on)/i.test(c))}return{key:t,rtmps:n,bitrate:s,fastAudio:l}}function eD(e){return"URL_config.".concat(e.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")}function eI(e){let t=e.bitrate.trim()?"bitrate = ".concat(e.bitrate.trim()):"# bitrate = 4000";return"[youtube]\n# YouTube 推流 key(工作室 → 直播 → 串流密钥)\nkey = ".concat(e.key.trim(),"\n\n# 使用 RTMPS;填 否 则 RTMP\nrtmps = ").concat(e.rtmps?"是":"否","\n\n# 视频比特率 kbps(可选)\n").concat(t,"\n\n# 轻量音频链,减轻 CPU:1 / 是\nfast_audio = ").concat(e.fastAudio?"1":"0","\n")}function eA(e){if(e<60)return"".concat(e,"s");let t=Math.floor(e/60);return t<60?"".concat(t,"m ").concat(e%60,"s"):"".concat(Math.floor(t/60),"h ").concat(t%60,"m")}function eO(e){var t,n,l,i;let{t:a,currentProc:r,fetchJson:o,urlListText:c,keySuffixUi:d,showKeyRow:u=!0,pollMs:x=1e3,refreshToken:m=0,monitorRow:p,preferredTitle:h,hideStatusOverview:g=!1}=e,[b,f]=(0,Z.useState)(""),[v,y]=(0,Z.useState)(""),[j,N]=(0,Z.useState)(""),[k,_]=(0,Z.useState)(""),[S,z]=(0,Z.useState)(""),[C,R]=(0,Z.useState)([]),[L,P]=(0,Z.useState)(null),[T,M]=(0,Z.useState)(""),[E,U]=(0,Z.useState)(""),[D,I]=(0,Z.useState)(""),[A,O]=(0,Z.useState)(""),[B,F]=(0,Z.useState)(!1),[K,H]=(0,Z.useState)(!1),[Y,J]=(0,Z.useState)(!1),[V,$]=(0,Z.useState)(null),[X,Q]=(0,Z.useState)(null),[ee,et]=(0,Z.useState)(null),[en,es]=(0,Z.useState)(!1),[el,ei]=(0,Z.useState)(!1),[ea,er]=(0,Z.useState)(!1),[eo,ec]=(0,Z.useState)(null),[ed,eu]=(0,Z.useState)(0),[ex,em]=(0,Z.useState)(!0),ep=(0,Z.useRef)(null),eh=(0,Z.useRef)(null),eb=(0,Z.useRef)(!1),ef=(0,Z.useRef)(!1),ev=(0,Z.useRef)(!1),ey=(0,Z.useRef)(r),ew=(0,Z.useRef)(0),ej=eU(c),eN=eE(v),ek=eP(c),eS=null!==(n=ek[0])&&void 0!==n?n:"",eL=Y||["streaming","relay_slow"].includes(k.trim().toLowerCase()),eT=e_({ffmpeg_speed:null!=V?V:null==p?void 0:p.ffmpeg_speed,ffmpeg_frame:null!=X?X:null==p?void 0:p.ffmpeg_frame,ffmpeg_active:null==p?void 0:p.ffmpeg_active,is_pushing:eL,ffmpeg_speed_low:en||(null==p?void 0:p.ffmpeg_speed_low),ffmpeg_progress_stalled:el||(null==p?void 0:p.ffmpeg_progress_stalled)},void 0,"".concat(v,"\n").concat(j)),eZ="number"==typeof ee&&ee>0?eA(Math.max(0,Math.floor(ee))):null,eD=eR(eT,{live:eL}),eI=C.length?C.join(", "):eL?a("转推活跃(PID 未采集)","Relay active (PID n/a)"):a("无","none"),eO=B&&eL&&!K,eB=eO?"":E,eF=eO?"":D,eW=ek.length>1&&eL&&!eF&&!eB&&!eN&&(B||!!A||!!T),eK=eB||eN||(eW?null:null!==(l=null===(t=eS.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i))||void 0===t?void 0:t[1])&&void 0!==l?l:null),eH=eF||(eB?"https://live.douyin.com/".concat(eB):"")||(eN?"https://live.douyin.com/".concat(eN):"")||(eW?null:eS||null),eY=eO?eM("",v):eM(c,v),eG=(eO?"":A)||(eO?"":T)||eY||(null==h?void 0:h.trim())||(eK?"抖音直播间 ".concat(eK):""),eq=(null==h?void 0:h.trim())&&eG&&h.trim()!==eG?h.trim():"",eJ="youtube_key_rejected"===k.trim().toLowerCase(),eV=(0,Z.useCallback)(async()=>{let e=ey.current.trim();if(!e)return;if(ef.current){ev.current=!0;return}ef.current=!0;let t=++ew.current;try{let n=await o("/status?process=".concat(encodeURIComponent(e),"&light=1"));if(t!==ew.current||e!==ey.current.trim())return;let s=n.process_status||"unknown";f(s),y(n.recent_log||""),N(n.recent_error||""),_(n.business_status||""),z(n.business_note||""),R(Array.isArray(n.ffmpeg_pids)?n.ffmpeg_pids:[]),P("number"==typeof n.log_age_seconds?n.log_age_seconds:null),M(n.source_title||""),U(n.source_room_id||""),I(n.source_url||""),O(n.source_display||""),F(!!n.source_ambiguous),H(!!n.source_current),J(!!n.is_pushing),$("number"==typeof n.ffmpeg_speed?n.ffmpeg_speed:null),Q("number"==typeof n.ffmpeg_frame?n.ffmpeg_frame:null),et("number"==typeof n.ffmpeg_time_seconds?n.ffmpeg_time_seconds:null),es(!!n.ffmpeg_speed_low),ei(!!n.ffmpeg_progress_stalled);let l=!!(n.is_pushing||["streaming","relay_slow"].includes((n.business_status||"").trim().toLowerCase()));l&&!eb.current&&ec(Date.now()),l||ec(null),eb.current=l}catch(n){if(t!==ew.current||e!==ey.current.trim())return;f("error"),_("error"),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),eb.current=!1}finally{ef.current=!1,ev.current&&(ev.current=!1,window.setTimeout(()=>void eV(),0))}},[o]);(0,Z.useEffect)(()=>{if(ey.current=r,ew.current+=1,ev.current=!1,!r){f(""),y(""),N(""),_(""),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),ec(null),eb.current=!1;return}f(""),y(""),N(""),_(""),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),ec(null),eb.current=!1,eV()},[r,eV]),(0,Z.useEffect)(()=>{let e=()=>em("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{r&&eV()},[r,eV,m]),(0,Z.useEffect)(()=>{if(ea||!r||x<=0)return;let e=window.setInterval(()=>void eV(),x);return()=>clearInterval(e)},[ea,r,eV,x]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&eV()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[eV]),(0,Z.useEffect)(()=>{if(!eo)return;let e=window.setInterval(()=>eu(e=>e+1),1e3);return()=>clearInterval(e)},[eo]),(0,Z.useEffect)(()=>{if(ea||!ex)return;let e=ep.current;e&&(e.scrollTop=e.scrollHeight)},[v,ea,ex]),(0,Z.useEffect)(()=>{if(ea||!ex)return;let e=eh.current;e&&(e.scrollTop=e.scrollHeight)},[j,ea,ex]);let e$=null==eo?a("—(未检测到在线)","— (not online)"):eA(Math.max(0,Math.floor((Date.now()-eo)/1e3))),eX=ea?a("已暂停刷新","Paused"):x<=0?a("已暂停","Paused"):x>=3e4?a("约 30 秒","~30s"):x>=15e3?a("约 15 秒","~15s"):x>=12e3?a("约 12 秒","~12s"):x>=5e3?a("约 5 秒","~5s"):x>=2500?a("约 2.5 秒","~2.5s"):x>=2e3?a("约 2 秒","~2s"):x>=800?a("约 1 秒","~1s"):"".concat(x,"ms"),eQ=ea?"bg-amber-500/20 text-amber-100 ring-amber-500/35":x>=3e4?"bg-sky-500/15 text-sky-100 ring-sky-500/25":x>=4e3?"bg-zinc-500/15 text-zinc-200/90 ring-zinc-500/25":"bg-emerald-500/15 text-emerald-200/90 ring-emerald-500/25";return(0,s.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-b from-emerald-500/[0.07] to-zinc-950/80 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("span",{className:"sr-only","aria-hidden":!0,children:ed}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:a("当前直播日志","Live process log")}),eL&&!g?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-70"}),(0,s.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),a("推流中","Pushing")]}):null,(0,s.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-300 ring-1 ring-white/10",children:r||"—"}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(eQ),children:eX})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void eV(),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5"}),a("立即拉取","Refresh")]}),(0,s.jsxs)("button",{type:"button",onClick:()=>er(e=>!e),className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs ring-1 ".concat(ea?"bg-amber-500/20 text-amber-100 ring-amber-500/35":"border border-white/10 bg-black/30 text-zinc-300"),children:[ea?(0,s.jsx)(G.Z,{className:"h-3.5 w-3.5"}):(0,s.jsx)(q.Z,{className:"h-3.5 w-3.5"}),ea?a("继续自动刷新","Resume"):a("暂停自动刷新","Pause")]})]})]}),g?null:(0,s.jsxs)("div",{className:"mt-4 space-y-3 rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("进程状态","Process")}),(0,s.jsx)("span",{className:"mt-2 inline-flex rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"online"===t||"running"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"stopped"===t||"stopping"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"not_found"===t||"errored"===t||"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(b)),children:function(e,t){let n=(t||"unknown").toLowerCase();return"online"===n||"running"===n?e("运行中(PM2/进程在线)","Running (process online)"):"stopped"===n||"stopping"===n?e("已停止","Stopped"):"configured"===n?e("已配置(未启动)","Configured (not running)"):"not_found"===n||"errored"===n?e("未运行或未找到","Not running / not found"):"invalid"===n?e("无效进程名","Invalid process"):t||"—"}(a,b)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("业务状态","Business")}),(0,s.jsx)("span",{className:"mt-2 inline-flex max-w-full rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"ready"===t||"configured"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t||"relay_slow"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"waiting_source"===t||"monitoring"===t||"source_live"===t||"relay_starting"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t||"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(k)),title:function(e,t,n){let s=(t||"").toLowerCase();return"ready"===s||"configured"===s?e("已配置,等待启动","Configured and ready to start"):"inactive"===s?e("未运行","Inactive"):"streaming"===s?e("正在推流到 YouTube","Pushing to YouTube"):"relay_slow"===s?e("推流速度偏低","Relay running slowly"):"relay_starting"===s?e("转推 Worker 启动中,等待 FFmpeg 进度","Relay worker starting; waiting for FFmpeg progress"):"waiting_source"===s?e("等待上游直播源开播","Waiting for the upstream live source"):"source_live"===s?e("源站已开播,转推 Worker 未启动","Source live detected, but no active FFmpeg relay worker"):"monitoring"===s?e("进程在线,监控源站中","Process online and monitoring the source"):"misconfigured"===s?e("YouTube 密钥缺失或无效","YouTube key missing or invalid"):"youtube_key_rejected"===s?e("YouTube 推流失败:串流密钥无效、过期或不属于当前直播间","YouTube rejected the stream key"):"source_stalled"===s?e("上游源站卡住","Upstream source stalled"):"stale"===s?e("进程在线但日志心跳过期","Process online but the log heartbeat is stale"):"error"===s?e("检测到近期进程错误","Recent process error detected"):(null==n?void 0:n.trim())?n.trim():e("暂无业务状态","No business-state hint yet")}(a,k,S),children:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n)return e("推流中","Pushing");let s=(t||"").toLowerCase();return"ready"===s||"configured"===s?e("已配置","Ready"):"inactive"===s?e("未运行","Inactive"):"streaming"===s?e("推流中","Pushing"):"relay_slow"===s?e("低速","Slow"):"relay_starting"===s?e("启动中","Starting"):"waiting_source"===s?e("等源","Wait source"):"source_live"===s?e("源开播","Source live"):"monitoring"===s?e("监控中","Monitoring"):"misconfigured"===s?e("密钥异常","Key invalid"):"youtube_key_rejected"===s?e("密钥被拒","Key rejected"):"source_stalled"===s?e("源卡住","Stalled"):"stale"===s?e("心跳过期","Stale"):"error"===s?e("异常","Error"):e("未知","Unknown")}(a,k,eL)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:eL?a("推流时长(估算)","Relay duration (est.)"):a("进程在线时长(估算)","Process uptime (est.)")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm font-semibold text-cyan-200/90",children:e$}),eZ?(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[a("已编码","Encoded")," ",eZ]}):null]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("FFmpeg workers","FFmpeg workers")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm text-zinc-200",children:eI}),null!=L?(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[a("日志心跳","Log heartbeat")," ",eA(Math.max(0,Math.floor(L)))]}):null]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3 sm:col-span-2 xl:col-span-4",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("实时转推指标","Live relay metrics")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm ".concat(eT.speedLow?"text-amber-200":eT.progressStalled?"text-rose-200":"text-cyan-100"),children:eD||a("等待 FFmpeg 上报 fps / speed / frame","Waiting for FFmpeg fps / speed / frame")}),(0,s.jsxs)("div",{className:"mt-2 grid gap-2 sm:grid-cols-4 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"fps"}),eC(eT.fps)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"speed"}),eC(eT.speed,"x")]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"frame"}),eC(eT.frame,"",0)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:a("码率","Bitrate")}),null!==(i=ez(eT.bitrate))&&void 0!==i?i:"—"]})]})]})]}),eG?(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:eL&&(null==h?void 0:h.trim())?a("当前转播线路","Current relay lane"):a("当前转播源","Current relay source")}),(0,s.jsx)("p",{className:"mt-1 text-sm font-medium text-zinc-200",children:eG}),eq?(0,s.jsxs)("p",{className:"mt-1 text-xs text-zinc-500",children:[a("抖音源","Douyin"),": ",eq]}):null]}):null,u?(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-zinc-500",children:a("YouTube key 尾码(参考)","YT key suffix")}),(0,s.jsx)("span",{className:"font-mono text-zinc-300",children:d||"—"})]}):null,eJ?(0,s.jsx)("div",{className:"rounded-lg border border-rose-500/30 bg-rose-500/[0.10] px-3 py-2.5 text-xs text-rose-100 ring-1 ring-rose-500/15",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(eg.Z,{className:"mt-0.5 h-4 w-4 shrink-0 text-rose-300","aria-hidden":!0}),(0,s.jsx)("p",{children:a("YouTube 已拒绝本次 RTMPS 推流。请从 YouTube Studio 当前直播间复制完整串流密钥,保存到当前线路后重新开始;如果密钥确认无误,再检查到 YouTube RTMPS 的网络/代理。","YouTube rejected this RTMPS publish. Copy the full stream key for the current live event from YouTube Studio, save it to this lane, then start again; if the key is correct, check network/proxy access to YouTube RTMPS.")})]})}):null,eH?(0,s.jsxs)("div",{className:"rounded-lg border border-violet-500/20 bg-violet-500/[0.06] px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium text-zinc-400",children:eN?a("当前直播源站(日志)","Current source (from log)"):eL?a("配置中的源站地址","Configured source URL"):a("源站快捷入口","Source quick link")}),(0,s.jsxs)("a",{href:eH,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs font-medium text-violet-100 ring-1 ring-violet-500/35 transition hover:bg-violet-500/30",children:[(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 shrink-0 opacity-90"}),eG||a("打开抖音直播页","Open Douyin live")]})]}),eK&&eG&&!eG.includes(eK)?(0,s.jsxs)("p",{className:"mt-2 font-mono text-[10px] text-zinc-600",children:["room:",eK]}):null,ej.length>1&&eN?(0,s.jsxs)("p",{className:"mt-2 text-[10px] text-zinc-600",children:[a("配置中还有","Also in config:")," ",ej.filter(e=>e!==eK).slice(0,3).map(e=>(0,s.jsx)("a",{href:"https://live.douyin.com/".concat(e),target:"_blank",rel:"noreferrer",className:"ml-1 text-violet-400/90 underline-offset-2 hover:underline",children:e},e)),ej.length>4?"…":null]}):null]}):(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:a("(日志与地址列表中暂无抖音房间)","(No Douyin room in log or URL list)")})]}),"not_found"!==b&&"invalid"!==b?(0,s.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-emerald-400/90",children:a("进程输出(stdout / 合并日志)","Process output")}),(0,s.jsx)("pre",{ref:ep,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-emerald-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-emerald-100/95",children:v.trim()||a("(暂无)","(empty)")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-rose-400/90",children:a("异常信息(stderr)","Stderr")}),(0,s.jsx)("pre",{ref:eh,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-rose-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-rose-100/95",children:j.trim()||a("(暂无)","(empty)")})]})]}):(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:a("进程未在 PM2 / 本地注册表中运行,日志区域已隐藏。","Process not running — log panes hidden.")})]})}function eB(e){return/tiktok/i.test(e.script)||/tiktok/i.test(e.pm2)}let eF=[{id:"720p60",labelZh:"720p @ 60Hz",labelEn:"720p @ 60Hz",spec:"1280x720, 59.94/60Hz, RGB/YUV 有限",hintZh:"板端 HDMI 输出时序与显示端一致;下游画布建议 1280\xd7720。",hintEn:"Match SoC HDMI timing to the display; downstream canvas e.g. 1280\xd7720."},{id:"1080p30",labelZh:"1080p @ 30Hz",labelEn:"1080p @ 30Hz",spec:"1920x1080, 30Hz",hintZh:"带宽紧张时可优先 1080p30;检查线材与接口规格。",hintEn:"Prefer 1080p30 when bandwidth is tight; check cable and port specs."},{id:"1080p60",labelZh:"1080p @ 60Hz",labelEn:"1080p @ 60Hz",spec:"1920x1080, 60Hz, 高刷转播",hintZh:"两端均需稳定支持 1080p60;长时间运行注意散热。",hintEn:"Both ends need stable 1080p60; mind thermals for long runs."}],eW="live-hub-tiktok-hdmi-check-v1",eK="live-hub-tiktok-hdmi-notes-v1",eH="live-hub-tiktok-source-mode-v1";function eY(e){var t;let{t:n,busy:l,entries:i,currentProc:a,setCurrentProc:r,urlConfig:o,setUrlConfig:c,onRunProcess:d,onSaveUrlConfig:u,onReplayGoLive:x,onCopy:m,fetchJson:p,apiPrefix:h,quickLinks:g,hdmiStatus:b,notify:f,onNavigate:v}=e,y=(0,Z.useMemo)(()=>i.filter(eB),[i]),w=y.length?y:i,[j,N]=(0,Z.useState)("srs"),[k,_]=(0,Z.useState)([]),[S,z]=(0,Z.useState)(!1),[L,P]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)("1080p30"),[U,D]=(0,Z.useState)("1080p30"),[I,A]=(0,Z.useState)(!1),[O,B]=(0,Z.useState)(!0),[F,W]=(0,Z.useState)(null),K=(0,Z.useRef)(!1),H=(0,Z.useRef)(o),[G,q]=(0,Z.useState)(""),[J,$]=(0,Z.useState)({}),X=(0,Z.useCallback)(e=>{H.current=e,c(e)},[c]),Q=(0,Z.useCallback)(e=>{N(e);try{window.localStorage.setItem(eH,e)}catch(e){}},[]);(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eH);("ffmpeg"===e||"replay"===e||"srs"===e)&&("ffmpeg"!==e&&"replay"!==e?N(e):N("srs"))}catch(e){}},[]),(0,Z.useEffect)(()=>{K.current=!1},[a]),(0,Z.useEffect)(()=>{H.current=o},[o]);let ee=(0,Z.useCallback)(async()=>{if(a)try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),n=await p("/get_url_config?".concat(t));X(null!==(e=n.content)&&void 0!==e?e:"")}catch(e){}},[X,a,p]);(0,Z.useEffect)(()=>{if(!a||!O||"ffmpeg"!==j)return;let e=window.setInterval(()=>{K.current||ee()},8e3);return()=>clearInterval(e)},[a,O,ee,j]),(0,Z.useEffect)(()=>{"ffmpeg"===j&&a&&ee()},[j,a,ee]);let et=(0,Z.useCallback)(async()=>{if(a){z(!0);try{var e;let t=await p("/tiktok_replay/list?process=".concat(encodeURIComponent(a)));_(null!==(e=t.files)&&void 0!==e?e:[])}catch(e){f(e.message),_([])}finally{z(!1)}}},[a,p,f]);(0,Z.useEffect)(()=>{"replay"===j&&a&&et()},[j,a,et]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eW);e&&$(JSON.parse(e))}catch(e){}try{q(window.localStorage.getItem(eK)||"")}catch(e){}},[]);let en=(0,Z.useCallback)(e=>{$(e);try{window.localStorage.setItem(eW,JSON.stringify(e))}catch(e){}},[]),es=e=>{q(e);try{window.localStorage.setItem(eK,e)}catch(e){}},el=async()=>{if(a){A(!0),W(null),K.current=!1;try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),s=await p("/get_url_config?".concat(t));X(null!==(e=s.content)&&void 0!==e?e:""),W(n("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(e){W(e.message)}finally{A(!1)}}},ei=async()=>{try{await Promise.resolve(u(H.current)),K.current=!1}catch(e){}},ea=async e=>{if(a){P(!0);try{await p("/tiktok_replay/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:a,filename:e})}),f(n("已删除文件","File removed")),await et()}catch(e){f(e.message)}finally{P(!1)}}},er=async e=>{var t;let s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",s&&a){P(!0);try{let e=new FormData;e.append("file",s);let t=await (0,V.N)("".concat(h,"/tiktok_replay/upload?process=").concat(encodeURIComponent(a)),{method:"POST",body:e});f(t.message||n("上传成功","Uploaded")),await et()}catch(e){f(e.message)}finally{P(!1)}}},eo=l||I||L,ec=eF.find(e=>e.id===U),ed=!!(null==b?void 0:b.can_stream_hdmi),ep=(null==b?void 0:b.preferred_device)||(null==b?void 0:null===(t=b.video_devices)||void 0===t?void 0:t[0])||"";return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[v?(0,s.jsx)(eh,{t:n,title:n("TikTok HDMI 硬件链路","TikTok HDMI hardware chain"),subtitle:n("板端编码经 HDMI 到显示/下游设备;与「网络」页顶卡相同的箭头风格。","Encode on SoC → HDMI → display/downstream; same arrow style as Network header."),onNavigate:v,steps:[{label:"FFmpeg",sub:n("采集 / 推流","Capture"),gradient:"from-cyan-400 to-blue-500",target:"live_tiktok"},{label:"HDMI",sub:n("板载输出","SoC out"),gradient:"from-violet-500 to-fuchsia-500"},{label:"Android",sub:n("AOSP / 手机","AOSP"),gradient:"from-amber-400 to-orange-500",target:"android"}]}):null,(0,s.jsx)("div",{className:"rounded-2xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.14] via-zinc-950/80 to-fuchsia-500/10 p-6 shadow-xl shadow-cyan-900/10",children:(0,s.jsx)("div",{className:"flex flex-wrap items-start gap-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/35 to-fuchsia-600/25 ring-1 ring-white/10",children:(0,s.jsx)(R.Z,{className:"h-5 w-5 text-cyan-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:n("TikTok 无人直播(单路)","TikTok unmanned (single lane)")}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:n("布局对齐 YouTube 单频道:直播开关 + 源站 + URL_config;无 stream key,输出走 HDMI 硬件链路。","Same layout as YouTube single: controls + URLs; no stream key — HDMI hardware path.")})]})]})})}),(0,s.jsx)("div",{className:"rounded-2xl border border-cyan-500/20 bg-cyan-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:(0,s.jsx)("p",{className:"text-xs leading-relaxed text-cyan-100/90",children:n("HDMI 互斥:后端在「开始 / 重新开始」TikTok 或 obs*.sh(SRS 拉流上屏)时,会自动停止其它正在占用 HDMI 链路的同类进程;与 YouTube 推流互不干扰。","HDMI mutex: starting TikTok or obs*.sh stops other TikTok/OBS HDMI sinks; YouTube RTMP is unaffected.")})}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-300"}),n("X86 HDMI 采集状态","X86 HDMI capture status")]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("这里直接显示主机是否识别到采集卡和 /dev/video 设备,可用于验证 ARM HDMI 进 X86 的链路。","Shows whether the host sees the capture card and /dev/video nodes for ARM-to-X86 HDMI ingest.")})]}),(0,s.jsx)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ring-1 ".concat(ed?"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-rose-500/25"),children:ed?n("可推流","Ready"):n("未就绪","Not ready")})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"device: "}),(0,s.jsx)("span",{className:"font-mono text-zinc-200",children:ep||"—"})]}),(0,s.jsxs)("p",{className:"mt-2",children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"video nodes: "}),(0,s.jsx)("span",{className:"font-mono text-zinc-200",children:((null==b?void 0:b.video_devices)||[]).join(", ")||"—"})]}),(0,s.jsxs)("p",{className:"mt-2",children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"usb matches: "}),(0,s.jsx)("span",{className:"text-zinc-300",children:((null==b?void 0:b.usb_capture_matches)||[]).length||0})]})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,s.jsx)("p",{className:"text-zinc-600",children:n("建议 FFmpeg","Suggested FFmpeg")}),(0,s.jsx)("p",{className:"mt-2 break-all font-mono text-zinc-200",children:(null==b?void 0:b.suggested_ffmpeg_cmd)||"—"}),(null==b?void 0:b.suggested_ffmpeg_cmd)?(0,s.jsxs)("button",{type:"button",onClick:()=>m(b.suggested_ffmpeg_cmd||""),className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-medium text-cyan-100 ring-1 ring-cyan-500/25",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),n("复制命令","Copy command")]}):null]})]}),((null==b?void 0:b.issues)||[]).length?(0,s.jsx)("ul",{className:"mt-4 list-inside list-disc space-y-1 text-[11px] text-amber-200/85",children:((null==b?void 0:b.issues)||[]).map(e=>(0,s.jsx)("li",{children:e},e))}):null]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,s.jsx)(Y.Z,{className:"h-4 w-4"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("直播开关","Live control")})]}),(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:n("TikTok 进程(PM2)","TikTok PM2 process")}),(0,s.jsx)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:a,onChange:e=>r(e.target.value),children:w.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[e.label," (",e.pm2,")"]},e.pm2))}),(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:n("直播源","Video source")}),(0,s.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:j,onChange:e=>Q(e.target.value),children:[(0,s.jsx)("option",{value:"ffmpeg",hidden:!0,children:"FFmpeg(抖音 / TikTok 等直播间 URL)"}),(0,s.jsx)("option",{value:"replay",hidden:!0,children:n("录播素材(本地上传)","VOD upload")}),(0,s.jsx)("option",{value:"srs",children:n("SRS(OBS 推流)","SRS (OBS)")})]}),"srs"===j?(0,s.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-amber-200/85",children:n("此模式不显示 URL_config:请在 OBS 中填写下方 RTMP 推流地址;板端 SRS 拉流上屏仍可能占用 HDMI,与 TikTok 进程互斥规则不变。","URL_config is hidden: set the RTMP URL in OBS. SRS pull-to-HDMI may still mutex with TikTok per server rules.")}):null,(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[["start",n("开始直播","Start"),"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30"],["stop",n("停止直播","Stop"),"bg-rose-500/15 text-rose-200 ring-rose-500/25"],["restart",n("重新开始","Restart"),"bg-amber-500/15 text-amber-200 ring-amber-500/25"]].map(e=>{let[t,n,l]=e;return(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>d(t),className:"rounded-xl px-4 py-3 text-sm font-medium ring-1 ".concat(l),children:n},t)})}),(0,s.jsxs)("p",{className:"mt-3 text-center text-[11px] text-zinc-500",children:[n("当前 HDMI 预设(备忘)","HDMI preset (memo)"),":"," ",(0,s.jsx)("span",{className:"font-mono text-cyan-300/90",children:ec?n(ec.labelZh,ec.labelEn):U})]})]}),"replay"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(ex.Z,{className:"h-4 w-4 text-violet-300"}),n("录播素材","VOD library")]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-xl bg-violet-500/15 px-3 py-2 text-xs font-medium text-violet-100 ring-1 ring-violet-500/30",children:[(0,s.jsx)(em.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("上传视频","Upload")}),(0,s.jsx)("input",{type:"file",accept:".mp4,.mkv,.ts,.flv,.mov,.m4v,.webm",className:"hidden",onChange:er})]}),(0,s.jsx)("button",{type:"button",disabled:eo||!a,onClick:()=>void et(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-300",children:n("刷新列表","Refresh")})]})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:n("文件保存在服务器 config/tiktok_replay/对应进程目录;点「开始直播」会写入 replayfile 行并启动 PM2 进程。停播请用上方「停止直播」。","Files under config/tiktok_replay/. Go live writes replayfile + starts PM2. Use Stop above to stop.")}),S?(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:n("加载中…","Loading…")}):0===k.length?(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:n("暂无文件,请先上传。","No files yet.")}):(0,s.jsx)("ul",{className:"mt-4 space-y-2",children:k.map(e=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-white/10 bg-black/30 px-3 py-2 text-xs text-zinc-300",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",children:e.name}),(0,s.jsxs)("span",{className:"shrink-0 text-zinc-500",children:[(e.size/1048576).toFixed(1)," MB"]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void(async()=>{try{await Promise.resolve(x(e.replay_url,e.name))}catch(e){}})(),className:"rounded-lg bg-emerald-500/20 px-2 py-1 text-[11px] text-emerald-100 ring-1 ring-emerald-500/30",children:n("开始直播","Go live")}),(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>d("stop"),className:"rounded-lg bg-rose-500/15 px-2 py-1 text-[11px] text-rose-100 ring-1 ring-rose-500/25",children:n("停播","Stop")}),(0,s.jsxs)("button",{type:"button",disabled:eo,onClick:()=>void ea(e.name),className:"inline-flex items-center gap-1 rounded-lg bg-zinc-700/40 px-2 py-1 text-[11px] text-zinc-200",children:[(0,s.jsx)(C.Z,{className:"h-3 w-3"}),n("删除","Del")]})]})]},e.name))})]}):null,"srs"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-emerald-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("SRS / OBS 推流","SRS / OBS ingest")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("OBS:设置 → 推流 → 服务选「自定义」,服务器填 RTMP 地址;串流密钥可与 SRS 应用配置一致(默认 live/livestream)。","OBS → Stream → Custom: RTMP URL as server; stream key per SRS app (default live/livestream).")}),(0,s.jsxs)("dl",{className:"mt-4 space-y-3 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("RTMP 推流地址(OBS 服务器)","RTMP publish URL")}),(0,s.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-emerald-200/90",children:[(0,s.jsx)("span",{className:"break-all",children:g.srs_rtmp_publish||"—"}),g.srs_rtmp_publish?(0,s.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_rtmp_publish),children:(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("HTTP-FLV 预览","HTTP-FLV preview")}),(0,s.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-zinc-400",children:[(0,s.jsx)("span",{className:"break-all",children:g.srs_play_flv||g.srs_http||"—"}),g.srs_play_flv||g.srs_http?(0,s.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_play_flv||g.srs_http),children:(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("SRS 控制台","SRS web UI")}),(0,s.jsx)("dd",{className:"mt-1 font-mono text-zinc-400",children:(0,s.jsx)("a",{href:g.srs_http||"#",target:"_blank",rel:"noreferrer",className:"text-cyan-300 hover:underline",children:g.srs_http||"—"})})]})]})]}):null,(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-400"}),n("HDMI 硬件与时序","HDMI timing")]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("点选一路作为现场备忘;与板端 ffmpeg/OBS 采集参数对齐。","Pick a preset as field memo; match capture settings.")}),(0,s.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:eF.map(e=>{let t=T===e.id,l=U===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>{E(t?null:e.id),D(e.id)},className:"rounded-2xl border p-4 text-left transition ".concat(l?"border-cyan-500/50 ring-1 ring-cyan-500/20":""," ").concat(t?"border-cyan-500/40 bg-cyan-500/10":"border-white/[0.08] bg-zinc-950/50 hover:border-white/15"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-400"}),n(e.labelZh,e.labelEn)]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:e.spec}),t?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:n(e.hintZh,e.hintEn)}):null]},e.id)})}),(0,s.jsxs)("div",{className:"mt-6 rounded-xl border border-white/5 bg-black/25 p-4",children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-zinc-400",children:n("上线前检查清单(本地保存)","Pre-flight checklist (local)")}),(0,s.jsx)("ul",{className:"mt-3 space-y-2",children:[{id:"cable",zh:"HDMI 线材插紧、方向正确(如需转接头确认规格)",en:"HDMI cable seated; adapter specs OK"},{id:"thermal",zh:"长时间推流注意散热,过热会掉帧黑屏",en:"Thermal headroom for long runs"}].map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-xs text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-0.5 rounded border-white/20 bg-black/40",checked:!!J[e.id],onChange:t=>en({...J,[e.id]:t.target.checked})}),(0,s.jsx)("span",{children:n(e.zh,e.en)})]},e.id))}),(0,s.jsx)("label",{className:"mt-4 block text-[11px] text-zinc-500",children:n("HDMI / 走线备忘","HDMI / wiring notes")}),(0,s.jsx)("textarea",{className:"mt-1 min-h-[72px] w-full resize-y rounded-lg border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:G,onChange:e=>es(e.target.value),spellCheck:!1,placeholder:n("接口、线长、显示器型号…","Ports, cable length, display model…")})]})]}),"ffmpeg"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,s.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 text-xs text-cyan-300 hover:text-cyan-200",onClick:()=>m(o),children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),n("复制全文","Copy all")]})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("一行一个地址;可勾选自动从服务器刷新,或点「重新读取」手动同步。","One URL per line; enable auto-refresh or reload from server.")}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:O,onChange:e=>B(e.target.checked)}),n("每 8 秒自动从服务器刷新","Auto-refresh from server every 8s")]})}),F?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:F}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:o,onChange:e=>{K.current=!0,X(e.target.value)},spellCheck:!1}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void el(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-300",children:n("重新读取","Reload from server")}),(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void ei(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm font-medium text-cyan-100 ring-1 ring-cyan-500/30",children:n("保存 URL 配置","Save URL config")})]})]}):null,(0,s.jsx)(eO,{t:n,currentProc:a,fetchJson:p,urlListText:"ffmpeg"===j?o:"",keySuffixUi:"",showKeyRow:!1})]})}var eG=n(6843),eq=n(1458),eJ=n(5725);function eV(e){e.traverse(e=>{e.geometry&&e.geometry.dispose();let t=e.material;Array.isArray(t)?t.forEach(e=>e.dispose()):t&&t.dispose()})}function e$(e){let{tr:t,className:l="",liveActive:i=0,onOpenStudio:a}=e,r=(0,Z.useRef)(null),o=(0,Z.useRef)(null),[d,u]=(0,Z.useState)("idle"),[x,m]=(0,Z.useState)(0),h=(0,Z.useRef)(i);h.current=i;let g=(0,Z.useCallback)(()=>{u("idle"),m(e=>e+1)},[]);return(0,Z.useEffect)(()=>{let e;let t=o.current,s=r.current;if(!t||!s)return;let l=!1,i=0,a=null,c=!1,d=0,x=()=>{cancelAnimationFrame(i),cancelAnimationFrame(d),null==a||a.disconnect(),null==e||e(),e=void 0,t.replaceChildren()},m=()=>{if(l||c)return;let a=t.clientWidth,r=t.clientHeight;a<16||r<16||(c=!0,u("loading"),n.e(467).then(n.bind(n,8116)).then(t=>{let n;if(l||!o.current)return;let a=o.current,r=a.clientWidth,c=a.clientHeight,d=new t.Scene,x=new t.PerspectiveCamera(48,r/c,.1,80);x.position.set(0,1.1,7.2);try{n=new t.WebGLRenderer({antialias:!0,alpha:!0,powerPreference:"high-performance"})}catch(e){l||u("failed");return}n.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),n.setSize(r,c,!1),n.setClearColor(0,0);let m=n.domElement;m.style.display="block",m.style.width="100%",m.style.height="100%",a.replaceChildren(m);let p=new t.HemisphereLight(16762092,4482815,.85);d.add(p);let g=new t.DirectionalLight(16777215,.9);g.position.set(4,8,6),d.add(g);let b=new t.PointLight(8189439,.6,20);b.position.set(-3,2,-2),d.add(b);let f=new t.Group,v=new t.MeshStandardMaterial({color:2762048,metalness:.15,roughness:.55}),y=new t.MeshStandardMaterial({color:16724821,emissive:4456465,metalness:.35,roughness:.25}),w=new t.MeshStandardMaterial({color:16777215,emissive:2236962,metalness:.2,roughness:.3}),j=new t.MeshStandardMaterial({color:2487534,emissive:340024,metalness:.25,roughness:.35}),N=new t.MeshStandardMaterial({color:16657493,emissive:2229520,metalness:.2,roughness:.4}),k=new t.Mesh(new t.BoxGeometry(3.2,.35,2.2),v);k.position.y=-.85,f.add(k);let _=new t.Mesh(new t.TorusGeometry(.72,.09,12,48),y);_.rotation.x=Math.PI/2,_.position.set(-.85,.15,.2),f.add(_);let S=new t.Mesh(new t.ConeGeometry(.35,.5,3),w);S.rotation.z=-Math.PI/2,S.rotation.y=Math.PI,S.position.set(-.55,.18,.2),f.add(S);let z=new t.Mesh(new t.CylinderGeometry(.22,.28,.95,20),j);z.position.set(1.05,.35,-.15),z.rotation.z=.12,f.add(z);let C=new t.Mesh(new t.SphereGeometry(.26,16,16),N);C.position.set(1.05,.92,-.15),f.add(C);let R=new t.BufferGeometry,L=new Float32Array(360);for(let e=0;e<120;e++)L[3*e]=(Math.random()-.5)*14,L[3*e+1]=(Math.random()-.3)*8,L[3*e+2]=(Math.random()-.5)*8-2;R.setAttribute("position",new t.BufferAttribute(L,3));let P=new t.PointsMaterial({color:16777215,size:.06,transparent:!0,opacity:.7}),T=new t.Points(R,P);d.add(T),d.add(f);let M=0,E=0,U=e=>{let t=a.getBoundingClientRect();t.width&&t.height&&(M=((e.clientX-t.left)/t.width-.5)*2,E=((e.clientY-t.top)/t.height-.5)*2)},Z=()=>{M=0,E=0};s.addEventListener("pointermove",U),s.addEventListener("pointerleave",Z);let D=performance.now(),I=!document.hidden,A=()=>{I=!document.hidden};document.addEventListener("visibilitychange",A);let O=()=>{if(l||(i=requestAnimationFrame(O),!I))return;let e=(performance.now()-D)/1e3,t=h.current,s=t>0?.5+.5*Math.sin(4*e):0;f.rotation.y=.25*Math.sin(.35*e)+.12*e+.08*M,f.rotation.x=-.06*E,f.position.y=.06*Math.sin(.9*e),_.rotation.z=.4*e,T.rotation.y=.02*e,x.position.x+=(.35*M-x.position.x)*.06,x.position.y+=(1.1+-.2*E-x.position.y)*.06,x.lookAt(0,.1,0),t>0?(y.emissive.setHex(4456465),y.emissiveIntensity=.4+1.2*s,j.emissiveIntensity=.3+.5*s):(y.emissiveIntensity=1,j.emissiveIntensity=1),n.render(d,x)};O();let B=new ResizeObserver(()=>{if(!o.current||l)return;let e=o.current.clientWidth,t=o.current.clientHeight;e<16||t<16||(x.aspect=e/t,x.updateProjectionMatrix(),n.setSize(e,t,!1))});B.observe(a),l||u("ready"),e=()=>{var e;document.removeEventListener("visibilitychange",A),s.removeEventListener("pointermove",U),s.removeEventListener("pointerleave",Z),B.disconnect(),eV(f),eV(T),R.dispose(),P.dispose(),n.dispose(),null===(e=n.forceContextLoss)||void 0===e||e.call(n),a.replaceChildren()}}).catch(()=>{l||u("failed")}))},p=0,g=()=>{l||c||(p+=1,m(),!c&&p<120?d=requestAnimationFrame(g):!c&&p>=120&&u("failed"))};return(a=new ResizeObserver(()=>{c||m()})).observe(t),g(),()=>{l=!0,x()}},[x]),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col ".concat(l),children:[(0,s.jsxs)("div",{className:"mb-2 flex shrink-0 items-center justify-between gap-2 px-1",children:[(0,s.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wider text-fuchsia-200/80",children:t("直播工作室 \xb7 3D","Live studio \xb7 3D")}),i>0?(0,s.jsxs)("span",{className:"studio-live-badge inline-flex items-center gap-1 rounded-full bg-rose-500/20 px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide text-rose-100 ring-1 ring-rose-400/40",children:[(0,s.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-70"}),(0,s.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-rose-400"})]}),"LIVE \xd7",i]}):null]}),(0,s.jsxs)("div",{ref:r,className:"studio-scene-shell relative min-h-0 flex-1 overflow-hidden rounded-xl bg-gradient-to-b from-fuchsia-950/40 to-cyan-950/20 ring-1 ring-white/10",children:[(0,s.jsx)("div",{ref:o,className:"absolute inset-0","aria-hidden":!0}),"idle"===d||"loading"===d?(0,s.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,s.jsx)("div",{className:"studio-scene-shimmer absolute inset-0 opacity-60"}),(0,s.jsx)(p.Z,{className:"relative h-5 w-5 animate-pulse text-fuchsia-300/70"}),(0,s.jsx)("p",{className:"relative text-[10px] text-zinc-500",children:t("加载 3D 场景…","Loading 3D scene…")})]}):null,"failed"===d?(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 px-4 text-center",children:[(0,s.jsx)(c.Z,{className:"h-8 w-8 text-fuchsia-300/70"}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-400",children:t("WebGL 不可用,已显示占位预览","WebGL unavailable — showing placeholder")}),(0,s.jsxs)("button",{type:"button",onClick:g,className:"inline-flex items-center gap-1.5 rounded-lg border border-fuchsia-400/30 bg-fuchsia-500/10 px-3 py-1.5 text-[10px] font-semibold text-fuchsia-100 transition hover:bg-fuchsia-500/20",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3"}),t("重试","Retry")]})]}):null,a?(0,s.jsxs)("button",{type:"button",onClick:a,className:"absolute bottom-2 right-2 z-10 inline-flex items-center gap-1 rounded-lg border border-white/10 bg-black/45 px-2.5 py-1 text-[10px] font-semibold text-zinc-200 backdrop-blur-sm transition hover:border-fuchsia-400/35 hover:bg-black/60 hover:text-white",children:[(0,s.jsx)(p.Z,{className:"h-3 w-3 text-fuchsia-300"}),t("进入工作室","Open studio")]}):null]})]})}function eX(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],n=e,s=0;for(;n>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function eQ(e){let t=eX(e);return"—"===t?t:"".concat(t,"/s")}function e0(e,t){return t&&Number.isFinite(e)&&Number.isFinite(t)?Math.min(100,Math.max(0,Math.round(e/t*100))):0}function e1(e){return"online"===e||"running"===e||"streaming"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}let e5=[{id:"live_youtube",zh:"YouTube 无人直播",en:"YouTube Live",icon:Y.Z,accent:"from-rose-500/20 to-violet-500/10 text-rose-100 ring-rose-500/25"},{id:"live_tiktok",zh:"TikTok HDMI",en:"TikTok HDMI",icon:c.Z,accent:"from-cyan-500/20 to-sky-500/10 text-cyan-100 ring-cyan-500/25"},{id:"android",zh:"安卓投屏",en:"Android",icon:d.Z,accent:"from-emerald-500/20 to-teal-500/10 text-emerald-100 ring-emerald-500/25"},{id:"services",zh:"服务编排",en:"Services",icon:r.Z,accent:"from-indigo-500/20 to-violet-500/10 text-indigo-100 ring-indigo-500/25"},{id:"network",zh:"网络 / WG",en:"Network",icon:E.Z,accent:"from-amber-500/20 to-orange-500/10 text-amber-100 ring-amber-500/25"},{id:"studio",zh:"工作室",en:"Studio",icon:p.Z,accent:"from-fuchsia-500/20 to-pink-500/10 text-fuchsia-100 ring-fuchsia-500/25"}],e2=["control_plane","netdata","filebrowser","webtty","neko_browser","srs_http","youtube_events"];function e3(e){let{label:t,value:n,sub:l,pct:i,icon:a,theme:r}=e,o=2*Math.PI*18,c=null!=i?i/100*o:0;return(0,s.jsx)("div",{className:"group relative overflow-hidden rounded-2xl border p-3.5 transition hover:-translate-y-0.5 ".concat("light"===r?"border-slate-200/90 bg-white/90 shadow-sm shadow-slate-200/40":"border-white/[0.07] bg-gradient-to-br from-white/[0.06] to-transparent shadow-lg shadow-black/20"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a,{className:"h-4 w-4 shrink-0 ".concat("light"===r?"text-violet-600":"text-violet-300/90")}),(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:t})]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-xl font-bold leading-none ".concat("light"===r?"text-slate-900":"text-white"),children:n}),(0,s.jsx)("p",{className:"mt-1 text-[10px] text-zinc-500",children:l})]}),null!=i?(0,s.jsxs)("svg",{className:"h-11 w-11 shrink-0 -rotate-90",viewBox:"0 0 44 44","aria-hidden":!0,children:[(0,s.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"stroke-white/10",strokeWidth:"4"}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"".concat(i>=90?"stroke-rose-400":i>=75?"stroke-amber-400":"stroke-cyan-400"," transition-all duration-500"),strokeWidth:"4",strokeDasharray:"".concat(c," ").concat(o),strokeLinecap:"round"}),(0,s.jsxs)("text",{x:"22",y:"24",textAnchor:"middle",className:"fill-zinc-400 text-[8px] font-bold rotate-90 origin-center",children:[i,"%"]})]}):null]})})}function e4(e){let{id:t,title:n,subtitle:l,defaultOpen:i=!0,theme:a,children:r,badge:o}=e,[c,d]=(0,Z.useState)(i);return(0,s.jsxs)("section",{id:t,className:"overflow-hidden rounded-2xl border ".concat("light"===a?"border-slate-200/90 bg-white/80":"border-white/[0.07] bg-zinc-950/35"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex w-full items-center gap-3 px-4 py-3.5 text-left transition ".concat("light"===a?"hover:bg-slate-50":"hover:bg-white/[0.03]"),"aria-expanded":c,children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===a?"text-slate-900":"text-white"),children:n}),o]}),l?(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:l}):null]}),(0,s.jsx)(eG.Z,{className:"h-4 w-4 shrink-0 text-zinc-500 transition ".concat(c?"rotate-180":"")})]}),c?(0,s.jsx)("div",{className:"border-t border-white/[0.05] px-4 pb-4 pt-3",children:r}):null]})}function e6(e){let{theme:t}=e;return(0,s.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,s.jsx)("div",{className:"h-28 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")}),(0,s.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:Array.from({length:4}).map((e,n)=>(0,s.jsx)("div",{className:"h-24 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")},n))}),(0,s.jsx)("div",{className:"h-72 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")})]})}function e8(e){var t,n,i,c,d,u,x,m,p,h,g,b,f,v,y,w,j,N,k,S,z,C,R,L,T,M,U,D,I,A,O,B,F,K,H,Y,G,q,J,V,$,X,Q,ee,et,en,es,el,ei,ea,er,eo,ec,ed;let{dash:eu,deployCheck:ex,dashErr:em,loading:eh,theme:eg,t:eb,onNavigate:ef,nekoLinks:ev,nekoPortsLabel:ey,showStreamProbes:ew,quickLinks:ej}=e,eN=null!==(Q=null==eu?void 0:null===(t=eu.services)||void 0===t?void 0:t.filter(e=>e.running).length)&&void 0!==Q?Q:0,ek=null!==(ee=null==eu?void 0:null===(n=eu.services)||void 0===n?void 0:n.length)&&void 0!==ee?ee:0,e_=(null==eu?void 0:null===(c=eu.snapshot)||void 0===c?void 0:null===(i=c.memory)||void 0===i?void 0:i.total)||0,eS=null!==(en=null!==(et=null==eu?void 0:null===(u=eu.snapshot)||void 0===u?void 0:null===(d=u.memory)||void 0===d?void 0:d.available)&&void 0!==et?et:null==eu?void 0:null===(m=eu.snapshot)||void 0===m?void 0:null===(x=m.memory)||void 0===x?void 0:x.free)&&void 0!==en?en:0,ez=Math.max(0,e_-eS),eC=(null==eu?void 0:null===(h=eu.snapshot)||void 0===h?void 0:null===(p=h.disk)||void 0===p?void 0:p.total)||0,eR=(null==eu?void 0:null===(b=eu.snapshot)||void 0===b?void 0:null===(g=b.disk)||void 0===g?void 0:g.free)||0,eL=(null==eu?void 0:null===(f=eu.live)||void 0===f?void 0:f.processes)||[],eP=(null==eu?void 0:null===(v=eu.live_events)||void 0===v?void 0:v.process_digest)||[],eT=eP.filter(e=>{let t=(e.status||"").toLowerCase();return"online"===t||"running"===t||"streaming"===t}).length,eM=(0,Z.useMemo)(()=>e2.map(e=>({key:e,url:ej[e]})).filter(e=>e.url&&/^https?:\/\//i.test(e.url)),[ej]),eE=(0,Z.useMemo)(()=>((null==eu?void 0:eu.services)||[]).filter(e=>["live-console","live-edge","srs","neko","shellcrash"].some(t=>e.service_id.includes(t.replace("live-",""))||e.service_id===t)).slice(0,6),[null==eu?void 0:eu.services]);return eh&&!eu?(0,s.jsx)(e6,{theme:eg}):(0,s.jsxs)("div",{className:"space-y-5",children:[em?(0,s.jsxs)("div",{className:"rounded-2xl border border-rose-500/25 bg-rose-950/20 p-4 text-sm text-rose-200",children:[eb("无法加载仪表盘:","Dashboard error: "),em]}):null,(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"relative overflow-hidden rounded-2xl border p-4 sm:p-5 ".concat("light"===eg?"border-violet-200/80 bg-gradient-to-br from-violet-50 via-white to-cyan-50 shadow-sm":"border-violet-500/20 bg-gradient-to-br from-violet-600/10 via-zinc-950/80 to-cyan-500/10"),children:[(0,s.jsx)("div",{className:"pointer-events-none absolute -right-8 -top-8 h-40 w-40 rounded-full bg-fuchsia-500/15 blur-3xl"}),(0,s.jsx)("div",{className:"pointer-events-none absolute -bottom-10 left-1/3 h-32 w-32 rounded-full bg-cyan-500/10 blur-3xl"}),(0,s.jsxs)("div",{className:"relative flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-semibold text-emerald-200 ring-1 ring-emerald-500/30",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60"}),(0,s.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),(null==eu?void 0:null===(y=eu.stack)||void 0===y?void 0:y.hostname)||"live"]}),(null==ex?void 0:ex.ready)?(0,s.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-200 ring-1 ring-emerald-500/20",children:eb("交付就绪","Deploy ready")}):ex?(0,s.jsx)("span",{className:"rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-200 ring-1 ring-amber-500/20",children:eb("待验收","Needs checks")}):null,eT>0?(0,s.jsxs)("span",{className:"rounded-full bg-rose-500/15 px-2 py-0.5 text-[10px] font-semibold text-rose-100 ring-1 ring-rose-500/25",children:[eT," ",eb("路直播活跃","live lanes active")]}):null]}),(0,s.jsxs)("h2",{className:"mt-2 text-lg font-bold tracking-tight sm:text-xl ".concat("light"===eg?"text-slate-900":"text-white"),children:[(null==eu?void 0:null===(w=eu.stack)||void 0===w?void 0:w.mdns_host)||"live.local",(0,s.jsx)("span",{className:"ml-2 text-sm font-normal ".concat("light"===eg?"text-slate-500":"text-zinc-500"),children:((null==eu?void 0:null===(j=eu.stack)||void 0===j?void 0:j.ips)||[]).join(" \xb7 ")||"—"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[null==eu?void 0:null===(N=eu.stack)||void 0===N?void 0:N.machine," \xb7 ",null==eu?void 0:null===(k=eu.stack)||void 0===k?void 0:k.kernel," \xb7 Python ",(null==eu?void 0:null===(S=eu.stack)||void 0===S?void 0:S.python)||"—"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:eM.slice(0,4).map(e=>(0,s.jsxs)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border px-3 py-2 text-[11px] font-medium transition hover:-translate-y-0.5 ".concat("light"===eg?"border-slate-200 bg-white text-slate-700 shadow-sm":"border-white/10 bg-black/30 text-zinc-200 hover:bg-black/45"),children:[e.key.replace(/_/g," "),(0,s.jsx)(W.Z,{className:"h-3 w-3 opacity-60"})]},e.key))})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 xl:grid-cols-6",children:e5.map((e,t)=>(0,s.jsxs)(l.E.button,{type:"button",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},whileTap:{scale:.98},onClick:()=>ef(e.id),className:"flex items-center gap-2 rounded-xl border bg-gradient-to-br px-3 py-3 text-left text-[11px] font-semibold ring-1 transition ".concat(e.accent),children:[(0,s.jsx)(e.icon,{className:"h-4 w-4 shrink-0 opacity-90"}),(0,s.jsx)("span",{className:"line-clamp-2 leading-snug",children:eb(e.zh,e.en)}),(0,s.jsx)(_.Z,{className:"ml-auto h-3.5 w-3.5 shrink-0 opacity-50"})]},e.id))}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsx)(e3,{theme:eg,icon:eq.Z,label:eb("CPU 1m","CPU 1m"),value:null!==(es=null==eu?void 0:null===(R=eu.snapshot)||void 0===R?void 0:null===(C=R.cpu_load)||void 0===C?void 0:null===(z=C["1m"])||void 0===z?void 0:z.toFixed(2))&&void 0!==es?es:"—",sub:"5m ".concat(null!==(el=null==eu?void 0:null===(M=eu.snapshot)||void 0===M?void 0:null===(T=M.cpu_load)||void 0===T?void 0:null===(L=T["5m"])||void 0===L?void 0:L.toFixed(2))&&void 0!==el?el:"—"," \xb7 15m ").concat(null!==(ei=null==eu?void 0:null===(I=eu.snapshot)||void 0===I?void 0:null===(D=I.cpu_load)||void 0===D?void 0:null===(U=D["15m"])||void 0===U?void 0:U.toFixed(2))&&void 0!==ei?ei:"—")}),(0,s.jsx)(e3,{theme:eg,icon:a.Z,label:eb("内存","Memory"),value:eX(eS),sub:"/ ".concat(eX(e_)),pct:e_?e0(ez,e_):void 0}),(0,s.jsx)(e3,{theme:eg,icon:P.Z,label:eb("磁盘","Disk"),value:eX(eR),sub:eb("可用","free"),pct:eC?e0(Math.max(0,eC-eR),eC):void 0}),(0,s.jsx)(e3,{theme:eg,icon:r.Z,label:eb("服务","Services"),value:"".concat(eN,"/").concat(ek||"—"),sub:function(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),s=Math.floor(t%86400/3600),l=Math.floor(t%3600/60);return n>0?"".concat(n,"d ").concat(s,"h"):s>0?"".concat(s,"h ").concat(l,"m"):"".concat(l,"m")}(null==eu?void 0:null===(A=eu.snapshot)||void 0===A?void 0:A.uptime_seconds)+" "+eb("运行","uptime")})]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-5 xl:items-stretch",children:[(0,s.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-3 rounded-2xl border p-3 backdrop-blur-xl ".concat("light"===eg?"border-slate-200/90 bg-white/85":"border-white/[0.07] bg-zinc-950/40"),children:(0,s.jsx)(eJ.Z,{snapshot:null!==(ea=null==eu?void 0:eu.snapshot)&&void 0!==ea?ea:null,theme:eg,tr:eb,compact:!0})}),(0,s.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.05},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-2 rounded-2xl border p-3 ".concat("light"===eg?"border-fuchsia-200/80 bg-gradient-to-br from-fuchsia-50/90 via-white to-cyan-50/70":"border-fuchsia-500/20 bg-gradient-to-br from-fuchsia-500/10 via-zinc-950/60 to-cyan-500/10"),children:(0,s.jsx)(e$,{tr:eb,className:"h-full",liveActive:eT,onOpenStudio:()=>ef("studio")})})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-violet-200/70 bg-white/90":"border-violet-500/20 bg-gradient-to-br from-violet-500/[0.08] to-transparent"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:eb("直播进程","Live processes")}),(0,s.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-400",children:(null==eu?void 0:null===(O=eu.live)||void 0===O?void 0:O.backend_mode)||"—"})]}),(0,s.jsxs)("ul",{className:"mt-3 max-h-52 space-y-2 overflow-y-auto pr-1",children:[(eL.length?eL:eP).slice(0,8).map(e=>{let t="pm2"in e?e.pm2:"",n="label"in e&&e.label||t,l="process_status"in e&&e.process_status||"status"in e&&e.status||"",i="".concat(t," ").concat(n).toLowerCase(),a=i.includes("tiktok")||i.includes("hdmi")?"live_tiktok":i.includes("youtube")||i.includes("yt")?"live_youtube":null;return(0,s.jsxs)("li",{role:a?"button":void 0,tabIndex:a?0:void 0,onClick:a?()=>ef(a):void 0,onKeyDown:a?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ef(a))}:void 0,className:"flex items-center gap-3 rounded-xl border px-3 py-2 transition ".concat("light"===eg?"border-slate-200 bg-slate-50/80":"border-white/[0.06] bg-black/25 hover:border-violet-400/20"," ").concat(a?"cursor-pointer hover:-translate-y-px hover:border-violet-400/30":""),children:[(0,s.jsx)(o.Z,{className:"h-4 w-4 shrink-0 text-violet-300/80"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:n}),(0,s.jsx)("p",{className:"truncate font-mono text-[10px] text-zinc-600",children:t})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ".concat(e1(l||"")),children:function(e,t){let n=(e||"").trim().toLowerCase();return"online"===n||"running"===n||"streaming"===n?t("运行中","Running"):"configured"===n?t("已配置","Configured"):"not_found"===n?t("未注册","Unregistered"):"stopped"===n?t("已停止","Stopped"):"error"===n?t("异常","Error"):e||"—"}(l||"",eb)})]},t||n)}),eL.length||eP.length?null:(0,s.jsx)("li",{className:"py-6 text-center text-xs text-zinc-600",children:eb("暂无直播进程","No live processes")})]}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>ef("live_youtube"),className:"rounded-xl bg-violet-500/20 py-2 text-[11px] font-semibold text-violet-100 ring-1 ring-violet-500/30 transition hover:bg-violet-500/30",children:"YouTube"}),(0,s.jsx)("button",{type:"button",onClick:()=>ef("live_tiktok"),className:"rounded-xl bg-cyan-500/20 py-2 text-[11px] font-semibold text-cyan-100 ring-1 ring-cyan-500/30 transition hover:bg-cyan-500/30",children:"TikTok"})]})]}),(null==eu?void 0:null===(F=eu.network)||void 0===F?void 0:null===(B=F.interfaces)||void 0===B?void 0:B.length)?(0,s.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-cyan-200/70 bg-white/90":"border-cyan-500/15 bg-cyan-500/[0.05]"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:[(0,s.jsx)(E.Z,{className:"h-4 w-4 text-cyan-300"}),eb("网络吞吐","Network throughput")]}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↓ ",eb("下行","Down")]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eQ(eu.network.total_rx_bps)})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↑ ",eb("上行","Up")]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eQ(eu.network.total_tx_bps)})]})]}),(0,s.jsx)("div",{className:"mt-3 space-y-2",children:(eu.network.interfaces||[]).slice(0,3).map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2 font-mono text-[10px]",children:[(0,s.jsx)("span",{className:"font-semibold text-cyan-200/90",children:e.name}),(0,s.jsxs)("span",{className:"text-zinc-500",children:["↓ ",eQ(e.rx_bps)," \xb7 ↑ ",eQ(e.tx_bps)]})]},e.name))})]}):null]}),eE.length?(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:eE.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border px-3 py-2.5 ".concat("light"===eg?"border-slate-200 bg-white":"border-white/[0.06] bg-black/25"),children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.label}),(0,s.jsx)("p",{className:"truncate text-[10px] text-zinc-600",children:e.service_id})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(e1(e.running?"online":e.status)),children:e.running?eb("运行中","Running"):e.status})]},e.service_id))}):null,(0,s.jsxs)("div",{className:"space-y-3",children:[ex?(0,s.jsxs)(e4,{id:"deploy",theme:eg,title:eb("安装验收","Deployment health"),subtitle:eb("API / 边缘反代 / mDNS 可用性","API, edge proxy, mDNS"),defaultOpen:!ex.ready,badge:(0,s.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(ex.ready?"bg-emerald-500/15 text-emerald-200":"bg-amber-500/15 text-amber-200"),children:[ex.pass_count,"/",ex.total_count]}),children:[(0,s.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,s.jsx)("p",{className:"text-sm text-zinc-300",children:ex.ready?eb("必需检查已通过,控制面可交付。","Required checks passed."):eb("部分检查未通过,请查看失败项。","Some checks failed.")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ex.urls||{}).filter(e=>{let[,t]=e;return!!t}).slice(0,5).map(e=>{let[t,n]=e;return(0,s.jsx)("a",{href:(0,ep.p)(n),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-white/10 bg-white/5 px-2.5 py-1.5 text-[10px] text-zinc-300",children:t},t)})})]}),(ex.failing_checks||[]).length?(0,s.jsx)("ul",{className:"mt-3 space-y-1.5",children:ex.failing_checks.slice(0,4).map(e=>(0,s.jsxs)("li",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-100",children:[e.label,": ",e.detail||"—"]},e.id))}):null]}):null,(null==eu?void 0:eu.hardware)?(0,s.jsx)(e4,{id:"hardware",theme:eg,title:eb("硬件能力","Hardware profile"),subtitle:eb("GPU / NPU / FFmpeg 策略","GPU, NPU, FFmpeg"),defaultOpen:!1,children:(0,s.jsxs)("div",{className:"grid gap-3 font-mono text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,s.jsxs)("p",{children:["arch ",String(null!==(er=eu.hardware.arch)&&void 0!==er?er:"—")]}),(0,s.jsxs)("p",{children:["GPU ",eu.hardware.gpu&&"object"==typeof eu.hardware.gpu&&eu.hardware.gpu.present?eb("有","yes"):eb("无","no")]}),(0,s.jsxs)("p",{className:"sm:col-span-2",children:["hwaccels"," ",(eu.hardware.ffmpeg_hwaccels||[]).join(", ")||"—"]})]})}):null,(null==eu?void 0:null===(K=eu.stack)||void 0===K?void 0:K.neko_login)?(0,s.jsxs)(e4,{id:"neko",theme:eg,title:"Neko ".concat(eb("登录","sign-in")),subtitle:ey||eb("多实例","multi-instance"),defaultOpen:!1,children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.map(e=>(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-fuchsia-400/20 bg-black/25 px-3 py-2 text-[11px] text-fuchsia-100",children:[e.label," \xb7 ",e.accessLabel]},e.key))}),(0,s.jsx)("p",{className:"mt-3 text-[11px] text-amber-200/85",children:eb("昵称随意,密码须与环境变量一致(默认 12345678)。","Display name is free; password must match NEKO_* (default 12345678).")})]}):null,ew&&(null==eu?void 0:eu.probes)?(0,s.jsx)(e4,{id:"probes",theme:eg,title:eb("推流探针","Stream probes"),subtitle:"SRS \xb7 Neko",defaultOpen:!1,children:(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[eu.probes.srs?(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:"SRS"}),(0,s.jsxs)("p",{className:"mt-1 text-zinc-500",children:["API ",eu.probes.srs.api_ok?"OK":"—"," \xb7 :",eu.probes.srs.port," \xb7 RTT ",null!==(ec=null!==(eo=null===(H=eu.probes.srs.http)||void 0===H?void 0:H.latency_ms)&&void 0!==eo?eo:null===(Y=eu.probes.srs.tcp)||void 0===Y?void 0:Y.latency_ms)&&void 0!==ec?ec:"—"," ms"]}),(null===(G=eu.probes.srs.http)||void 0===G?void 0:G.error)?(0,s.jsx)("p",{className:"mt-1 text-amber-300/80",children:eu.probes.srs.http.error}):null]}):null,eu.probes.neko?(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:"Neko"}),(0,s.jsxs)("p",{className:"mt-1 text-zinc-500",children:[eu.probes.neko.running_count,"/",eu.probes.neko.required_count," ",eb("在线","online")," \xb7 HTTP ",null!==(ed=null===(q=eu.probes.neko.http)||void 0===q?void 0:q.http_code)&&void 0!==ed?ed:"—"]}),(null===(J=eu.probes.neko.http)||void 0===J?void 0:J.error)?(0,s.jsx)("p",{className:"mt-1 text-amber-300/80",children:eu.probes.neko.http.error}):null]}):null]})}):null,(null==eu?void 0:null===($=eu.live_events)||void 0===$?void 0:null===(V=$.pm2_tail)||void 0===V?void 0:V.length)||eP.length?(0,s.jsx)(e4,{id:"feeds",theme:eg,title:eb("事件流","Event feed"),defaultOpen:!1,children:(0,s.jsx)("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-lg border border-white/[0.05] bg-black/40 p-3 font-mono text-[10px] text-zinc-400",children:((null==eu?void 0:null===(X=eu.live_events)||void 0===X?void 0:X.pm2_tail)||[]).slice(-12).join("\n")||eb("暂无日志","No logs")})}):null]})]})}var e9=n(6322),e7=n(9781),te=n(8677),tt=n(1322),tn=n(8041),ts=n(7874),tl=n(2233),ti=n(4053),ta=n(2812);let tr="live-hub-youtube-pro-v2",to="youtube2__",tc=/[^a-zA-Z0-9_.-]+/g,td=new Set(["douyin_youtube","tiktok","obs","web"]);function tu(e,t){var n;let s=(e||"").trim();if(!function(e){let t=(e||"").trim();return!t||/\?{2,}/.test(t)||/?{2,}/.test(t)||/�/.test(t)||/锟|绾胯矾|çº|è·|Â/.test(t)||/^(undefined|null|nan)$/i.test(t)}(s))return s;let l=(null===(n=s.match(/\d+/))||void 0===n?void 0:n[0])||String(Math.max(0,t)+1);return"线路 ".concat(l)}function tx(e){return e.map((e,t)=>({...e,name:tu(e.name,t)}))}function tm(e){return(e||"").trim().replace(tc,"_")}function tp(e,t){let n=tm(e);return!n||td.has(n)||n===to?tN(t):"youtube"===n||n.startsWith(to)?n:tN(n)}function th(e){return tp(String(e.pm2Name||""),String(e.id||""))}function tg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"object"!=typeof e)return null;let n=String(e.id||"").trim();return n?{id:n,name:tu("string"==typeof e.name?e.name:"",t),streamKeySuffix:"string"==typeof e.streamKeySuffix?e.streamKeySuffix:void 0,streamKey:"string"==typeof e.streamKey?e.streamKey:void 0,urlLines:"string"==typeof e.urlLines?e.urlLines:void 0,pm2Name:tp("string"==typeof e.pm2Name?e.pm2Name:"",n),notes:"string"==typeof e.notes?e.notes:void 0}:null}function tb(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.map((e,t)=>tg(e,t)).filter(e=>null!==e);return tx(n)}catch(e){return[]}}function tf(e){window.localStorage.setItem(tr,JSON.stringify(tx(e)))}let tv=["/hub/youtube_pro_channels","/youtube_pro_channels"];async function ty(e){for(let n of tv)try{var t;let s=await e(n);return{fetched:!0,channels:(t=s.channels,Array.isArray(t)?tx(t.map((e,t)=>tg(e,t)).filter(e=>null!==e)):[])}}catch(e){}return{fetched:!1,channels:[]}}async function tw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=null,l=tx(t);for(let t of tv)try{var i;let a=await e(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channels:l,force:!!n.force})});if((null===(i=a.neko)||void 0===i?void 0:i.ok)===!1){let e=a.neko.desired?" desired=".concat(a.neko.desired):"",t=a.neko.current?" current=".concat(a.neko.current):"";s=Error("Neko capacity expansion failed:".concat(e).concat(t," ").concat(a.neko.reason||"unknown error").trim());break}return}catch(e){s=e instanceof Error?e:Error(String(e))}throw null!=s?s:Error("youtube_pro_channels sync failed")}function tj(){return"ch_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,7))}function tN(e){return"".concat(to).concat(tm(e)||"channel")}function tk(e){return/youtube/i.test(e.script)||/youtube/i.test(e.pm2)}function t_(e){return e.trim().toLowerCase().startsWith("youtube2__")}function tS(e){return(e.split("/").pop()||e).replace(/\.[^.]+$/,"")}function tz(e){var t;return!!e&&(/youtube/i.test(e.pm2)||/youtube/i.test(null!==(t=e.script)&&void 0!==t?t:""))}function tC(e,t){let n=((null==t?void 0:t.business_status)||"").trim().toLowerCase();return(null==t?void 0:t.is_pushing)||"streaming"===n?0:tO(null==t?void 0:t.process_status)?1:"youtube"===e.pm2.trim().toLowerCase()?2:"youtube"===tS(e.script).trim().toLowerCase()?3:10}let tR="live-hub-youtube-mode-v1",tL=new Set(["douyin_youtube","tiktok","obs","web"]);function tP(e){var t,n,s;return{name:e.name,streamKey:null!==(t=e.streamKey)&&void 0!==t?t:"",pm2Name:null!==(n=e.pm2Name)&&void 0!==n?n:tN(e.id),notes:null!==(s=e.notes)&&void 0!==s?s:""}}function tT(e){return Object.fromEntries(e.map(e=>[e.id,tP(e)]))}function tM(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return!!(null==e?void 0:e.is_pushing)||"streaming"===t||"relay_starting"===t}function tE(e){return tM(e)||tO(null==e?void 0:e.process_status)}function tU(e,t){let n=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"source_stalled"===n||"relay_slow"===n||"waiting_source"===n||"source_live"===n?tF(e,t):tM(e)?t("推流中","Pushing"):tF(e,t)}function tZ(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;return((null==s?void 0:s.source_display)||(null==s?void 0:s.source_title)||"").trim()||tI(t,n)||e.trim()}function tD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=tI(e,t).trim(),l=n.trim();return tM(e)&&l&&s&&l!==s?l:""}function tI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if((null==e?void 0:e.source_ambiguous)&&tM(e)&&!(null==e?void 0:e.source_current))return(n?eM("",n).trim():"")||"";{let t=((null==e?void 0:e.source_display)||(null==e?void 0:e.source_title)||"").trim();if(t)return t}let s=eM(t,n).trim();if(s)return s;let l=((null==e?void 0:e.source_room_id)||"").trim();return l?"抖音直播间 ".concat(l):""}function tA(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=((null==e?void 0:e.source_url)||"").trim();if(s)return s;let l=eP(n);return tM(e)&&((null==e?void 0:e.source_ambiguous)||(null==e?void 0:e.source_display)||(null==e?void 0:e.source_title))&&l.length>1?"":null!==(t=l[0])&&void 0!==t?t:""}function tO(e){return/^(online|running)$/i.test((e||"").trim())}function tB(e){let t=(e||"youtube").trim()||"youtube",n="/youtube-relay-log?process=".concat(encodeURIComponent(t));window.open(n,"_blank","noopener,noreferrer")}function tF(e,t){let n=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===n?t("已配置","Ready"):"streaming"===n?t("推流中","Pushing"):"source_stalled"===n?t("源卡住","Source stalled"):"relay_slow"===n?t("低速推流","Relay slow"):"relay_starting"===n?t("转推启动中","Relay starting"):"waiting_source"===n?t("等待上游","Waiting source"):"source_live"===n?t("源已开播,转推未起","Source live, relay down"):"monitoring"===n?t("监控中","Monitoring"):"misconfigured"===n?t("密钥异常","Key invalid"):"youtube_key_rejected"===n?t("密钥被 YouTube 拒绝","Key rejected"):"stale"===n?t("心跳过期","Stale"):"error"===n?t("异常","Error"):tO(null==e?void 0:e.process_status)?t("运行中","Running"):((null==e?void 0:e.process_status)||"").trim()||t("未运行","Idle")}function tW(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"relay_slow"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":"waiting_source"===t||"monitoring"===t||"relay_starting"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_live"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":tO(null==e?void 0:e.process_status)?"bg-zinc-500/15 text-zinc-200 ring-zinc-500/25":"bg-zinc-600/20 text-zinc-400 ring-zinc-500/25"}function tK(e){let t=Math.max(0,Math.floor(e||0));if(t<60)return"".concat(t,"s");let n=Math.floor(t/60);return n<60?"".concat(n,"m ").concat(t%60,"s"):"".concat(Math.floor(n/60),"h ").concat(n%60,"m")}function tH(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString()}catch(e){return"-"}}function tY(e){let t=(e||"").toLowerCase();return"active"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"ended"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function tG(e,t){let n=(e||"").toLowerCase();return"active"===n?t("直播中","Live"):"ended"===n?t("已结束","Ended"):"error"===n?t("异常","Problem"):"idle"===n?t("等待中","Waiting"):t("记录","Record")}function tq(e,t){return null==e?t?t("未知","Unknown"):"-":e.toLocaleString()}function tJ(e,t){return e?(e.source_title||e.channel_name||"").trim()||(e.source_room_id?t("抖音直播间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.process?t("直播线路 ".concat(e.process),"Relay lane ".concat(e.process)):t("直播事件 #".concat(e.id),"Live event #".concat(e.id))):t("未选择直播","No event selected")}function tV(e,t){return e?e.source_room_id?t("抖音房间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.source_url?e.source_url.replace(/^https?:\/\//,""):t("来源未识别","Unknown source"):"-"}function t$(e,t){let n=Math.max(0,Math.floor(e||0));if(n<60)return t("".concat(n," 秒"),"".concat(n,"s"));let s=Math.floor(n/60);if(s<60)return t("".concat(s," 分 ").concat(n%60," 秒"),"".concat(s,"m ").concat(n%60,"s"));let l=Math.floor(s/60),i=s%60;return t("".concat(l," 小时 ").concat(i," 分"),"".concat(l,"h ").concat(i,"m"))}function tX(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(e){return"-"}}function tQ(e,t){var n;if(!e)return"-";let s=(e.status||"").toLowerCase(),l="".concat(e.last_health||""," ").concat(e.last_live_status||""," ").concat(e.last_popup_text||"").toLowerCase();return"error"===s||/error|failed|poor|unstable|异常|错误|失败/.test(l)?t("需要处理","Needs attention"):e.last_popup_text?t("有弹窗","Popup seen"):(null!==(n=e.quality_score)&&void 0!==n?n:100)<50?t("质量偏低","Low quality"):t("正常","Normal")}function t0(e){let t=tQ(e,e=>e);return"需要处理"===t||"质量偏低"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"有弹窗"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25"}function t1(e){let t=Number(e||0);return t>=80?"text-emerald-200":t>=55?"text-amber-200":"text-rose-200"}function t5(e){let t=(e||"").toLowerCase();return"critical"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"warning"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"ok"===t?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function t2(e){let{label:t,value:n,helper:l,warn:i=!1,accent:a="cyan"}=e;return(0,s.jsxs)("div",{className:"group relative overflow-hidden rounded-xl border border-white/[0.06] bg-black/25 p-3 min-w-0 transition hover:border-white/12",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br ".concat("emerald"===a?"from-emerald-500/20 via-transparent to-cyan-500/10":"amber"===a?"from-amber-500/20 via-transparent to-rose-500/10":"violet"===a?"from-violet-500/20 via-transparent to-cyan-500/10":"from-cyan-500/20 via-transparent to-violet-500/10"," opacity-70")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:t}),(0,s.jsx)("p",{className:"mt-1 text-xl font-semibold tracking-tight ".concat(i?"text-amber-200":"text-white"),children:(0,s.jsx)("span",{className:i?"inline-flex animate-pulse":"",children:n})}),(0,s.jsx)("p",{className:"mt-1 text-[10px] text-zinc-600",children:l})]})]})}function t3(e,t){return e_(e,null==t?void 0:t.metrics,"")}function t4(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#"))}function t6(e,t){return t4(e).length>0&&0===t4(t).length}function t8(e){let{kind:t,busyKind:n,targetPm2:l,busy:i,online:a,pushing:r,label:o,className:c,baseLock:d,onRun:u,notify:x,t:m,compact:p}=e,h=function(e){if(!(null==e?void 0:e.startsWith("proc:")))return null;let t=e.slice(5),n=t.indexOf(":");if(n<=0)return null;let s=t.slice(0,n),l=t.slice(n+1);return l&&["start","stop","restart"].includes(s)?{action:s,pm2:l}:null}(i),g=h&&h.pm2===l,b=null!=n?n:t,f=!!(g&&h.action===b),v=!!(g&&h.action!==b),w="start"===t&&(r||a),j="stop"===t&&!a,N="restart"===t&&!a,k=w||j||N;return(0,s.jsxs)("button",{type:"button",onClick:()=>{if(!f){if(v){x(m("请等待当前操作完成","Wait for the current action to finish"));return}if(w){x(r?m("已在推流中,无需重复开始","Already pushing"):m("进程已在运行,请用「停止」或「重新开始」","Already running — use Stop or Restart"));return}if(j){x(m("当前未在直播,无法停止","Not live — cannot stop"));return}if(N){x(m("进程未运行时请使用「开始直播」","Use Start when the process is not running"));return}d||u()}},className:"relative overflow-hidden rounded-xl ring-1 transition ".concat(p?"min-h-[2rem] px-3 py-1.5 text-xs font-medium":"min-h-[2.75rem] px-4 py-3 text-sm font-medium"," ").concat(c," ").concat(k||d||f||v?"cursor-not-allowed":""," ").concat(k&&!f?"opacity-45":""," ").concat(v?"opacity-35":""," ").concat(f?"ring-violet-400/40":""),children:[f?(0,s.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/25 backdrop-blur-[2px]",children:(0,s.jsx)(y.Z,{className:"".concat(p?"h-4 w-4":"h-6 w-6"," animate-spin text-white")})}):null,(0,s.jsxs)("span",{className:"inline-flex items-center justify-center gap-1.5 ".concat(f?"invisible":""),children:[k?(0,s.jsx)(e9.Z,{className:"".concat(p?"h-3 w-3":"h-4 w-4"," shrink-0 opacity-90"),"aria-hidden":!0}):null,o]})]})}function t9(e){var t,n,l,i,r,o,d,u,x,m,p,h,g,b,f,v,j,N,k,_,S,z,R,L,P,T,M,E,U,D;let{t:I,busy:A,entries:O,currentProc:B,setCurrentProc:F,urlConfig:K,setUrlConfig:H,onRunProcess:q,onSaveUrlConfig:J,fetchJson:V,liveProcesses:$,notify:X,onNavigate:Q,onRefresh:ee,quickLinks:et}=e,en=(0,Z.useMemo)(()=>O.filter(tk),[O]),es=(0,Z.useMemo)(()=>(function(e,t){let n=e.filter(e=>tk(e)&&!t_(e.pm2)),s=n.filter(e=>tk(e)&&e.pm2.trim()===tS(e.script).trim()),l=s.length?[...s]:n.length?[...n]:[...e],i=new Set(l.map(e=>e.pm2.trim()));for(let e of t.filter(e=>tz(e)&&!t_(e.pm2))){var a,r,o,c;let t=e.pm2.trim();if(!t||i.has(t))continue;let s=(e.business_status||"").trim().toLowerCase();if(!e.is_pushing&&"streaming"!==s&&!tO(e.process_status))continue;let d=n.find(e=>e.pm2.trim()===t);l.push(null!=d?d:{pm2:t,script:null!==(o=null!==(r=e.script)&&void 0!==r?r:null===(a=n[0])||void 0===a?void 0:a.script)&&void 0!==o?o:"youtube.py",label:null!==(c=e.label)&&void 0!==c?c:t}),i.add(t)}return l})(en.length?en:O,$),[O,$,en]),el=(0,Z.useMemo)(()=>(function(e,t){if(!e.length)return"";let n=new Map(t.filter(tz).map(e=>[e.pm2.trim(),e])),s=e[0],l=tC(s,n.get(s.pm2.trim()));for(let t of e.slice(1)){let e=tC(t,n.get(t.pm2.trim()));e"youtube"===e.pm2.trim().toLowerCase());if(s)return s.pm2;let l=e.find(e=>"youtube"===tS(e.script).trim().toLowerCase());return l?l.pm2:null!==(n=null===(t=e[0])||void 0===t?void 0:t.pm2)&&void 0!==n?n:""}(es),[$,es]),[ei,ea]=(0,Z.useState)("single"),[er,eo]=(0,Z.useState)([]),[ec,ed]=(0,Z.useState)(""),[eu,ex]=(0,Z.useState)(K),[em,eb]=(0,Z.useState)(""),[ef,ew]=(0,Z.useState)({key:"",rtmps:!0,bitrate:"",fastAudio:!0}),[ej,eN]=(0,Z.useState)(null),[ek,e_]=(0,Z.useState)(!1),[eS,eT]=(0,Z.useState)(""),[eM,eE]=(0,Z.useState)(!0),[eU,eA]=(0,Z.useState)(!1),[eB,eF]=(0,Z.useState)(!1),[eW,eK]=(0,Z.useState)(null),[eH,eY]=(0,Z.useState)({}),[eG,eq]=(0,Z.useState)(!1),[eJ,eV]=(0,Z.useState)(null),[e$,eX]=(0,Z.useState)(0),[eQ,e0]=(0,Z.useState)(null),[e1,e5]=(0,Z.useState)(null),[e2,e3]=(0,Z.useState)(!1),[e4,e6]=(0,Z.useState)(null),[e8,e9]=(0,Z.useState)(!1),[to,tc]=(0,Z.useState)(!0),[td,tp]=(0,Z.useState)(null),[tg,tv]=(0,Z.useState)(null),t9=(0,Z.useRef)(!1),t7=(0,Z.useRef)(K),ne=(0,Z.useRef)(eS),nt=(0,Z.useRef)([]),nn=(0,Z.useRef)(B),ns=(0,Z.useRef)(0),nl=(0,Z.useRef)(0),ni=(0,Z.useRef)(0),na=(0,Z.useRef)(0),nr=(0,Z.useRef)({}),no=(0,Z.useRef)({}),nc=(0,Z.useCallback)(e=>{t7.current=e,ex(e),H(e)},[H]),nd=(0,Z.useCallback)(e=>{ne.current=e,eT(e)},[]),nu=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let n=nr.current[t];if(n)return n;let s=new URLSearchParams({process:t,_ts:String(Date.now())}),l=V("/get_url_config?".concat(s)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return nr.current[t]=l,l.then(()=>{nr.current[t]===l&&delete nr.current[t]},()=>{nr.current[t]===l&&delete nr.current[t]}),l},[V]),nx=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let n=no.current[t];if(n)return n;let s=new URLSearchParams({process:t,_ts:String(Date.now())}),l=V("/get_config?".concat(s)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return no.current[t]=l,l.then(()=>{no.current[t]===l&&delete no.current[t]},()=>{no.current[t]===l&&delete no.current[t]}),l},[V]),nm=(0,Z.useCallback)(()=>{let e=++ni.current;return eA(!0),e},[]),np=(0,Z.useCallback)(e=>{e===ni.current&&eA(!1)},[]),nh=(0,Z.useCallback)(()=>{let e=++na.current;return e_(!0),e},[]),ng=(0,Z.useCallback)(e=>{e===na.current&&e_(!1)},[]);(0,Z.useEffect)(()=>{let e=()=>tc("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{t9.current=!1},[B]),(0,Z.useEffect)(()=>{nn.current=B},[B]),(0,Z.useEffect)(()=>{"single"===ei&&(t7.current=K,ex(K))},[ei,K]),(0,Z.useEffect)(()=>{ne.current=eS},[eS]),(0,Z.useEffect)(()=>{nt.current=er},[er]),(0,Z.useEffect)(()=>{ns.current+=1,nl.current+=1,t9.current=!1,eK(null)},[ei,ec]);let nb=(0,Z.useCallback)(async()=>{let e=nn.current.trim();if(!e)return;if("pro"===ei){let t=nt.current.find(e=>e.id===ec);if(!t||th(t)!==e)return}let t=++ns.current;try{let l=await nu(e);if(t!==ns.current||e!==nn.current.trim()||t9.current)return;if("single"===ei)nc(l);else{var n,s;let e=null!==(s=null===(n=nt.current.find(e=>e.id===ec))||void 0===n?void 0:n.urlLines)&&void 0!==s?s:"";if(t6(e,l)){nd(e);return}nd(l)}}catch(e){}},[ec,nd,nc,ei,nu]),nf=(0,Z.useMemo)(()=>({pageVisible:to}).pageVisible?12e3:0,[to]);(0,Z.useEffect)(()=>{if(!B||!eM||nf<=0)return;let e=window.setInterval(()=>{t9.current||nb()},nf);return()=>clearInterval(e)},[B,eM,nb,nf]);let nv=async()=>{let e=nn.current.trim();if(!e)return;if("pro"===ei){let t=nt.current.find(e=>e.id===ec);if(!t||th(t)!==e)return}let t=nm();eK(null),t9.current=!1;let n=++ns.current;try{let t=await nu(e);if(n!==ns.current||e!==nn.current.trim())return;if(t9.current){eK(I("检测到本地未保存修改,已保留当前草稿","Kept the local unsaved draft"));return}if("single"===ei)nc(t);else{var s,l;let e=null!==(l=null===(s=nt.current.find(e=>e.id===ec))||void 0===s?void 0:s.urlLines)&&void 0!==l?l:"";if(t6(e,t)){nd(e),eK(I("服务器暂无已保存 URL,已保留本地草稿","Server has no saved URLs, kept the local draft"));return}nd(t)}eK(I("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(t){if(n!==ns.current||e!==nn.current.trim())return;eK(t.message)}finally{np(t)}};(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(tR);("pro"===e||"single"===e)&&ea(e)}catch(e){}},[]),(0,Z.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await ty(V);if(t.fetched&&t.channels.length&&!e){let e=tx(t.channels);nt.current=e,eo(e),eY(tT(e)),tf(e);return}}catch(e){}if(e)return;let t=function(){let e=window.localStorage.getItem(tr);if(!e&&(e=window.localStorage.getItem("live-hub-youtube-pro-v1"))){let t=tb(e);if(t.length)return window.localStorage.setItem(tr,JSON.stringify(t)),t}return tb(e)}(),n=tx(t.length>0?t:(()=>{let e=tj();return[{id:e,name:"线路 1",streamKey:"",urlLines:"",pm2Name:tN(e),notes:""}]})());nt.current=n,eo(n),eY(tT(n)),tf(n)})(),()=>{e=!0}},[V]),(0,Z.useEffect)(()=>{if(!er.length){ec&&ed("");return}ec&&er.some(e=>e.id===ec)||ed(er[0].id)},[er,ec]);let ny=er.find(e=>e.id===ec)||er[0],nw=(0,Z.useMemo)(()=>er.find(e=>th(e)===B),[er,B]),nj=(0,Z.useCallback)(e=>$.find(t=>t.pm2===e),[$]),nN=(0,Z.useCallback)(e=>{var t;return null===(t=nj(e))||void 0===t?void 0:t.process_status},[nj]),nk=nj(B),n_=nj(B);(0,Z.useEffect)(()=>{"single"===ei&&el&&!B&&(nn.current=el,F(el))},[B,ei,el,F]);let nS=(0,Z.useCallback)(e=>{let t=tx(e);nt.current=t,eo(t),tf(t)},[]),nz=(0,Z.useCallback)((e,t)=>{let n=e.trim();if(!n)return;let s=!1,l=nt.current.map(e=>th(e)!==n?e:(s=!0,{...e,...t}));s&&nS(l)},[nS]),nC=(0,Z.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};await tw(V,e,t)},[V]),nR=(0,Z.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};nS(e),nC(e,t).catch(e=>{X("".concat(I("多频道列表未同步到服务器","Channel list not saved on server"),": ").concat(e.message))})},[nS,X,nC,I]),nL=(0,Z.useMemo)(()=>{var e;return ny?null!==(e=eH[ny.id])&&void 0!==e?e:tP(ny):null},[ny,eH]);(0,Z.useEffect)(()=>{ny&&eY(e=>e[ny.id]?e:{...e,[ny.id]:tP(ny)})},[ny]),(0,Z.useEffect)(()=>{if(!ny||"youtube"!==th(ny))return;let e=ef.key.trim();e&&eY(t=>{var n;let s=null!==(n=t[ny.id])&&void 0!==n?n:tP(ny);return s.streamKey.trim()===e&&"youtube"===s.pm2Name||s.streamKey.trim()?t:{...t,[ny.id]:{...s,streamKey:e,pm2Name:"youtube"}}})},[ny,ef.key]),(0,Z.useEffect)(()=>{eV(null)},[ec]);let nP=(0,Z.useCallback)((e,t)=>{ny&&(eY(n=>{var s;return{...n,[ny.id]:{...null!==(s=n[ny.id])&&void 0!==s?s:tP(ny),[e]:t}}}),eV(null))},[ny]),nT=ny?th(ny):"",nM=ny&&nL?th({id:ny.id,pm2Name:nL.pm2Name}):"",nE=!!ny&&!!nL&&nM!==nT,nU=(0,Z.useMemo)(()=>{if(!ny||!nL)return{ok:!1,message:I("请选择线路","Pick a lane"),normalizedName:"",normalizedPm2:"",normalizedStreamKey:"",normalizedNotes:""};let e=er.findIndex(e=>e.id===ny.id),t=tu(nL.name,e>=0?e:0),n=th({id:ny.id,pm2Name:nL.pm2Name});return n?tL.has(n)?{ok:!1,message:I("该进程名保留给系统模块,请换一个","This PM2 name is reserved"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nL.streamKey.trim(),normalizedNotes:nL.notes.trim()}:er.find(e=>e.id!==ny.id&&th(e)===n)?{ok:!1,message:I("该进程名已被其它线路占用","Another lane already uses this PM2 name"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nL.streamKey.trim(),normalizedNotes:nL.notes.trim()}:{ok:!0,message:"",normalizedName:t,normalizedPm2:n,normalizedStreamKey:nL.streamKey.trim(),normalizedNotes:nL.notes.trim()}:{ok:!1,message:I("进程名不能为空","PM2 name is required"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nL.streamKey.trim(),normalizedNotes:nL.notes.trim()}},[ny,nL,er,I]),nZ=(0,Z.useMemo)(()=>{if(!ny||!nL)return!1;let e=tP(ny);return nL.name!==e.name||nL.streamKey!==e.streamKey||tm(nL.pm2Name)!==tm(e.pm2Name)||nL.notes!==e.notes},[ny,nL]),nD=(0,Z.useCallback)(async e=>{let t=e.trim();if(!t)return;let n=++ns.current,s=++nl.current;t9.current=!1;let l=nm(),i=nh();eK(I("正在同步单频道配置...","Syncing single-channel config...")),eN(null);try{let[e,l]=await Promise.allSettled([nu(t),nx(t)]);if(n===ns.current&&t===nn.current.trim()&&("fulfilled"===e.status?(nc(e.value),eK(I("单频道配置已实时同步","Single-channel config synced"))):eK(e.reason instanceof Error?e.reason.message:String(e.reason))),s===nl.current&&t===nn.current.trim()){if("fulfilled"===l.status){let e=l.value;eb(e),ew(eZ(e))}else eN(l.reason instanceof Error?l.reason.message:String(l.reason))}}finally{np(l),ng(i),t===nn.current.trim()&&eX(e=>e+1)}},[nc,nm,nh,np,ng,nu,nx,I]),nI=(0,Z.useCallback)(async e=>{let t=th(e).trim();if(!t)return;let n=++ns.current,s=++nl.current;t9.current=!1;let l=nm(),i=nh();eK(I("正在同步当前线路配置...","Syncing current lane config...")),eN(null);try{let[l,i]=await Promise.allSettled([nu(t),nx(t)]);if(n===ns.current&&t===nn.current.trim()){if("fulfilled"===l.status){var a;let n=l.value,s=null!==(a=e.urlLines)&&void 0!==a?a:"";t6(s,n)?(nd(s),nz(t,{urlLines:s}),eK(I("服务器暂无已保存 URL,已保留当前线路草稿","Server has no saved URLs, kept this lane draft"))):(nd(n),nz(t,{urlLines:n}),eK(I("当前线路地址已实时同步","Current lane URLs synced")))}else eK(l.reason instanceof Error?l.reason.message:String(l.reason))}if(s===nl.current&&t===nn.current.trim()){if("fulfilled"===i.status){let t=i.value,n=eZ(t);eb(t),ew(n),n.key.trim()&&eY(t=>{var s,l;let i=null!==(s=t[e.id])&&void 0!==s?s:tP(e);return i.streamKey.trim()&&i.streamKey.trim()!==(null!==(l=e.streamKey)&&void 0!==l?l:"").trim()||i.streamKey.trim()===n.key.trim()?t:{...t,[e.id]:{...i,streamKey:n.key.trim()}}})}else eN(i.reason instanceof Error?i.reason.message:String(i.reason))}}finally{np(l),ng(i),t===nn.current.trim()&&eX(e=>e+1)}},[nd,nm,nh,np,ng,nz,nu,nx,I]);(0,Z.useCallback)(async()=>{try{var e,t;let n=await ty(V);if(!n.fetched||!n.channels.length)return;let s=tx(n.channels);nt.current=s,eo(s),eY(tT(s)),tf(s);let l=null!==(e=s.find(e=>e.id===ec))&&void 0!==e?e:s[0];if(!l)return;ed(l.id),nd((null!==(t=l.urlLines)&&void 0!==t?t:"").trim());let i=th(l);nn.current=i,F(i),nI(l)}catch(e){}},[ec,nd,V,nI,F]);let nA=(0,Z.useCallback)(e=>{var t,n,s,l;if("pro"===e&&"single"===ei&&!ef.key.trim()){X(I("请先填写并保存 YouTube 推流 key,再切换到多频道 Pro","Fill and save the YouTube stream key before switching to Multi Pro"));return}if("single"===e){let e=nn.current.trim(),n=ny?th(ny):"",s="pro"===ei?n||e:e||el||(null===(t=es[0])||void 0===t?void 0:t.pm2)||"";s&&(nn.current=s,F(s),nD(s))}if("pro"===e&&er.length){let e=nn.current.trim(),t=null!==(s=null!==(n=er.find(t=>th(t)===e))&&void 0!==n?n:er.find(e=>e.id===ec))&&void 0!==s?s:er[0];if(nd((null!==(l=null==t?void 0:t.urlLines)&&void 0!==l?l:"").trim()),t){ed(t.id);let e=th(t);nn.current=e,F(e),nI(t)}}ea(e);try{window.localStorage.setItem(tR,e)}catch(e){}},[er,nd,ny,ec,ei,X,el,nI,nD,F,es,I,ef.key]),nO=(0,Z.useCallback)(e=>{var t;nd((null!==(t=e.urlLines)&&void 0!==t?t:"").trim()),ed(e.id);let n=th(e);nn.current=n,F(n),nI(e)},[nd,nI,F]);(0,Z.useEffect)(()=>{if("pro"!==ei||!ec)return;let e=er.find(e=>e.id===ec);if(!e)return;let t=th(e);nn.current=t,F(t)},[ei,ec,er,F]);let nB=(0,Z.useCallback)(async()=>{let e=nn.current.trim();if(!e)return;let t=++nl.current,n=nh();eN(null);try{let n=await nx(e);if(t!==nl.current||e!==nn.current.trim())return;eb(n),ew(eZ(n))}catch(n){if(t!==nl.current||e!==nn.current.trim())return;eN(n.message)}finally{ng(n)}},[nh,ng,nx]);(0,Z.useEffect)(()=>{if(B){if("pro"===ei){if(!ny||B!==th(ny))return;nb(),nB(),eX(e=>e+1);return}nD(B)}},[ny,ec,B,nB,ei,nb,nD]);let nF=(0,Z.useCallback)(async()=>{var e;if(!ny||!nL)throw Error(I("请选择线路","Pick a lane"));if(!nU.ok)throw Error(nU.message);let t=ne.current,n=er.map(e=>e.id===ny.id?{...e,name:nU.normalizedName,streamKey:nU.normalizedStreamKey,pm2Name:nU.normalizedPm2,notes:nU.normalizedNotes,urlLines:t}:e);return await nC(n,{force:!0}),nS(n),eY(e=>({...e,[ny.id]:{name:nU.normalizedName,streamKey:nU.normalizedStreamKey,pm2Name:nU.normalizedPm2,notes:nU.normalizedNotes}})),{next:n,savedLane:null!==(e=n.find(e=>e.id===ny.id))&&void 0!==e?e:{...ny,name:nU.normalizedName,streamKey:nU.normalizedStreamKey,pm2Name:nU.normalizedPm2,notes:nU.normalizedNotes,urlLines:t},pm2:nU.normalizedPm2}},[ny,nL,nU,nS,er,nC,I]),nW=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nn.current,n=t.trim();if(!n){eN(I("请选择进程","Pick a process"));return}nl.current+=1;let s=nh();eN(null);try{let t=new URLSearchParams({process:n});await V("/save_config?".concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}),eb(e),nz(n,{streamKey:eZ(e).key}),eN(I("youtube.ini 已保存","youtube.ini saved"))}catch(e){eN(e.message)}finally{ng(s)}},nK=(0,Z.useCallback)(async()=>{if(ny){eq(!0),eV(null);try{var e;let t=await nF();nn.current=t.pm2,F(t.pm2);let n=eZ(em||eI(ef)),s=null!==(e=eH[ny.id])&&void 0!==e?e:tP(ny),l=eI({key:(s.streamKey||nU.normalizedStreamKey||"").trim(),rtmps:n.rtmps,bitrate:n.bitrate,fastAudio:n.fastAudio});await nW(l,t.pm2),eV(I("线路设置与推流配置已保存","Lane settings and stream config saved"))}catch(t){let e=t.message;eV(e),X(e)}finally{eq(!1)}}},[ny,nU.normalizedStreamKey,eH,X,nF,F,I,em,ef]),nH=async()=>{let e=eI(ef);await nW(e)},nY=async()=>{nl.current+=1;let e=nh();eN(null);try{var t,n;let e=em||eI(ef),s=await V("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:(n=nn.current,"youtube.".concat(n.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")),content:e,action:"youtube_balanced_preset"})}),l=null!==(t=s.content)&&void 0!==t?t:e;eb(l),ew(eZ(l)),eN(s.message||I("已应用 YouTube 预设","Applied YouTube preset"))}catch(e){eN(e.message)}finally{ng(e)}},nG=(0,Z.useMemo)(()=>{var e,t;if("single"===ei)return eL("key = ".concat(ef.key));let n=null!==(t=null!==(e=null==nL?void 0:nL.streamKey)&&void 0!==e?e:null==ny?void 0:ny.streamKey)&&void 0!==t?t:"";return eL("key = ".concat(n))},[ei,null==ny?void 0:ny.streamKey,ef.key,null==nL?void 0:nL.streamKey]),nq=nG?"…".concat(nG):"—",nJ=async()=>{if(!ny){let e=I("请选择线路后再保存地址","Pick a lane before saving URLs");eV(e),X(e);return}if(sc){eV(sc),X(sc);return}try{eq(!0),eV(null),ns.current+=1;let e=ne.current,t=await nF();nn.current=t.pm2,F(t.pm2),await Promise.resolve(J(e,t.pm2)),t9.current=!1,eV(I("线路与地址已保存","Lane settings and URLs saved"))}catch(t){let e=t instanceof Error?t.message:String(t);eV(e),X(e)}finally{eq(!1)}},nV=async()=>{if(sc){X(sc);return}let e=nn.current.trim();if(!e){X(I("请选择进程","Pick a process"));return}try{ns.current+=1,await Promise.resolve(J(t7.current,e)),nz(e,{urlLines:t7.current}),t9.current=!1}catch(e){}},n$=async()=>{let e="single"===ei?t7.current:ne.current;eF(!0),eK(null);try{var t;let n=await V("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:eD(nn.current),content:e,action:"dedupe_urls"})}),s=null!==(t=n.content)&&void 0!==t?t:e;"single"===ei?nc(s):nd(s),t9.current=!0,eK(n.message||I("已去重当前 URL 列表","Deduplicated current URL list"))}catch(e){eK(e.message)}finally{eF(!1)}},nX=async()=>{if(!ny||!nL)return;let e=eZ(em||eI(ef)),t=eI({key:nL.streamKey.trim(),rtmps:e.rtmps,bitrate:e.bitrate,fastAudio:e.fastAudio});eq(!0),eV(null);try{let e=await nF();nn.current=e.pm2,F(e.pm2),await nW(t,e.pm2),eV(I("线路设置与 youtube.ini 已保存","Lane settings and youtube.ini saved"))}catch(t){let e=t.message;eV(e),X(e)}finally{eq(!1)}},nQ="single"===ei?eu:eS,n0=(0,Z.useMemo)(()=>t4(nQ).length,[nQ]),n1=(0,Z.useMemo)(()=>eP(nQ).length,[nQ]),n5=(0,Z.useMemo)(()=>(0,ta.O0)(et),[et]),n2=(0,Z.useMemo)(()=>(0,ta.U_)(n5,"pro"===ei&&ny?er.findIndex(e=>e.id===ny.id):0),[ny,er,ei,n5]),n3=n2.link?(0,ep.p)(n2.link.url):(0,ep.p)("http://live.local:9200/"),n4=(0,Z.useMemo)(()=>(0,ta.Tc)(n5),[n5]),n6=(0,Z.useMemo)(()=>{var e;return[null===(e=n2.link)||void 0===e?void 0:e.url,null==et?void 0:et.chromium_remote_debug,null==et?void 0:et.srs_api].filter(e=>!!e)},[et,null===(t=n2.link)||void 0===t?void 0:t.url]),n8=(0,Z.useCallback)(async(e,t)=>{if(!td&&("delete"!==t||window.confirm("".concat(e.label,": 删除容器?浏览器配置和登录数据会保留,之后点“启动”会自动重建。")))){tp("".concat(e.id,":").concat(t)),tv(null);try{let n=await V("/neko/instance_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,action:t})}),s=n.running?I("运行中","running"):n.exists?I("已停止","stopped"):I("容器不存在","missing"),l=n.message||"".concat(e.label,": ").concat(s);tv("".concat(l," \xb7 ").concat(s)),await (null==ee?void 0:ee())}catch(t){let e=t.message;tv(e),X(e)}finally{tp(null)}}},[V,td,X,ee,I]),n9=(0,Z.useCallback)(async e=>{let t=ny?th(ny):"";return ny&&e===t?await nF():(nS(er),await nC(er,{force:!0}),{next:er,savedLane:null!=ny?ny:null,pm2:e})},[ny,nS,er,nF,nC]),n7=(0,Z.useCallback)(async(e,t)=>{let n=!!ny&&th(ny)===t;if("stop"!==e){var s,l;let e=er,n=t;try{let s=await n9(t);e=s.next,n=s.pm2}catch(e){X("".concat(I("当前线路保存失败","Failed to save the active lane"),": ").concat(e.message));return}let i=e.find(e=>th(e)===n),a=null!==(s=null==i?void 0:i.urlLines)&&void 0!==s?s:"";if(!(null!==(l=null==i?void 0:i.streamKey)&&void 0!==l?l:"").trim()){X(I("请先填写当前线路的推流密钥","Fill the stream key before starting"));return}if(!t4(a).length){X(I("请先填写当前线路的直播地址","Fill the source URLs before starting"));return}t=n}n&&F(t),q(e,t)},[ny,er,n9,X,q,F,I]),se=(0,Z.useCallback)(async e=>{e3(!0);try{var t,n,s,l;let i=await V("/hub/youtube/live/summary");e0(i);let a=i.active||[],r=nn.current.trim(),o=null!==(l=null!==(s=null!=e?e:r?null===(t=a.find(e=>e.process===r))||void 0===t?void 0:t.id:void 0)&&void 0!==s?s:null===(n=a[0])||void 0===n?void 0:n.id)&&void 0!==l?l:null==e1?void 0:e1.id;if(o){let e=await V("/hub/youtube/live/events/".concat(encodeURIComponent(String(o))));e.event&&e5(e.event)}}catch(e){}finally{e3(!1)}},[V,null==e1?void 0:e1.id]),st=(0,Z.useCallback)(async e=>{e3(!0);try{let t=await V("/hub/youtube/live/events/".concat(encodeURIComponent(String(e))));e5(t.event||null)}catch(e){X(e.message)}finally{e3(!1)}},[V,X]),sn=null!==(u=null==eQ?void 0:null===(n=eQ.active)||void 0===n?void 0:n.length)&&void 0!==u?u:0,ss=(0,Z.useMemo)(()=>{var e;return(e={activeEvents:sn,pageVisible:to}).pageVisible?e.activeEvents>0?4e3:12e3:3e4},[sn,to]);(0,Z.useEffect)(()=>{},[ss,se]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&se(null)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[se]);let sl=(0,Z.useCallback)(async()=>{e9(!0);try{let e=await V("/hub/youtube/quality_guard");e6(e)}catch(e){}finally{e9(!1)}},[V]),si=null!==(x=null==e4?void 0:null===(l=e4.summary)||void 0===l?void 0:l.pushing_lanes)&&void 0!==x?x:0,sa=(0,Z.useMemo)(()=>{var e;return(e={pushingLanes:si,pageVisible:to}).pageVisible?e.pushingLanes>0?6e3:15e3:3e4},[si,to]);(0,Z.useEffect)(()=>{},[sa,sl]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&sl()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[sl]);let sr=!!A||ek||eU||eB||eG,so=!!A||eG,sc=ek?I("正在读取 youtube.ini,稍后再保存地址","youtube.ini is loading; save URLs after it finishes"):eU?I("正在重新读取地址列表,稍后再保存","URL list is reloading; save after it finishes"):eB?I("正在整理地址列表,稍后再保存","URL list is being optimized; save after it finishes"):A?I("正在执行其他操作,稍后再保存地址","Another operation is running; save URLs after it finishes"):"",sd="single"===ei?n_:nk,su=(0,Z.useMemo)(()=>"pro"===ei?ey($.filter(e=>tz(e))):ev(n_),[ei,$,n_]),sx=(0,Z.useMemo)(()=>(function(e){if(e.paused)return 0;if(!e.pageVisible)return 3e4;switch(e.activity){case"hot":return 800;case"warm":return 2e3;default:return 4e3}})({activity:su,pageVisible:to}),[su,to]),sm=tO(nN(B)),sp=tE(sd),sh=ny?tI(nj(th(ny)),eS||ny.urlLines||""):"",sg=tM(n_),sb=(0,Z.useMemo)(()=>{var e,t,n;let s=(null==eQ?void 0:eQ.active)||[],l=B.trim();return l?null!==(n=null!==(t=s.find(e=>e.process===l))&&void 0!==t?t:s[0])&&void 0!==n?n:null:null!==(e=s[0])&&void 0!==e?e:null},[B,null==eQ?void 0:eQ.active]),sf=(0,Z.useMemo)(()=>{var e;if("single"===ei)return eu;let t=er.find(e=>th(e)===B);return t&&t.id===(null==ny?void 0:ny.id)?eS:(null!==(e=null==t?void 0:t.urlLines)&&void 0!==e?e:"").trim()||eS},[null==ny?void 0:ny.id,er,ei,eS,B,eu]),sv="pro"===ei?er.find(e=>th(e)===B):null,sy=sv?er.findIndex(e=>e.id===sv.id):-1,sw=sv?tu(sv.name,sy>=0?sy:0):"",sj=tZ(sw,n_,sf),sN=tD(n_,sf,sw),sk=(tU(n_,I),tA(n_,sf)),s_=null==e4?void 0:null===(i=e4.lanes)||void 0===i?void 0:i.find(e=>e.process===B),sS=t3(n_,s_),sz=null!==(m=null==s_?void 0:s_.score)&&void 0!==m?m:null,sC="pro"===ei?$.filter(e=>tz(e)&&tM(e)).length:sg?1:0,sR=eC(sS.speed,"x"),sL=eC(sS.frame,"",0),sP=eC(sS.fps),sT=sS.live?ez(sS.bitrate):null,sM="number"==typeof(null==n_?void 0:n_.ffmpeg_time_seconds)?t$(n_.ffmpeg_time_seconds,I):null,sE=!nG||0===n1,sU=nG?ef.rtmps?"RTMPS":"RTMP":I("检查密钥","Check key"),sZ=e=>{var t;let n=(null===(t=n2.link)||void 0===t?void 0:t.id)===e.id,l=td==="".concat(e.id,":start"),i=td==="".concat(e.id,":stop"),a=td==="".concat(e.id,":delete"),r=!!td,o=e.id===n5.length&&n5.length>1,c=r||!o;return(0,s.jsxs)("div",{className:"flex min-h-[2.5rem] items-stretch overflow-hidden rounded-lg border text-xs ring-1 ".concat(n?"border-emerald-400/30 bg-emerald-500/15 text-emerald-50 ring-emerald-400/25":"border-white/10 bg-white/5 text-zinc-200 ring-white/10"),children:[(0,s.jsxs)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 px-3 py-2 hover:bg-white/[0.04]",children:[(0,s.jsx)("span",{className:"font-semibold",children:e.label}),(0,s.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-100",children:e.accessLabel}),(0,s.jsxs)("span",{className:"font-mono text-white/70",children:[e.host||"",e.port?":".concat(e.port):""]})]}),(0,s.jsxs)("div",{className:"flex border-l border-white/10",children:[(0,s.jsxs)("button",{type:"button",disabled:r,title:I("启动 Neko 容器","Start Neko container"),onClick:()=>void n8(e,"start"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 px-2 text-emerald-100 hover:bg-emerald-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[l?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(G.Z,{className:"h-3.5 w-3.5"}),I("启动","Start")]}),(0,s.jsxs)("button",{type:"button",disabled:r,title:I("停止 Neko 容器","Stop Neko container"),onClick:()=>void n8(e,"stop"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-amber-100 hover:bg-amber-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[i?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(e7.Z,{className:"h-3.5 w-3.5"}),I("停止","Stop")]}),(0,s.jsxs)("button",{type:"button",disabled:c,title:o?I("删除最后一个 Neko 实例,保留浏览器配置数据","Delete the last Neko instance and keep browser profile data"):I("只能删除最后一个 Neko 实例","Only the last Neko instance can be deleted"),onClick:()=>void n8(e,"delete"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-rose-100 hover:bg-rose-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[a?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),I("删除","Delete")]})]})]},e.key)},sD=(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eM,onChange:e=>eE(e.target.checked)}),I("后台自动从服务器刷新(空闲约 12 秒)","Auto-refresh from server (~12s when idle)")]}),(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>void nv(),className:"rounded-lg border border-white/10 px-3 py-1.5 text-zinc-200 hover:bg-white/5",children:I("手动重新读取","Reload from server")}),(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>void n$(),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-cyan-100 hover:bg-cyan-500/15",children:eB?I("去重中...","Deduplicating..."):I("智能去重","Deduplicate")})]}),sI=(null==eQ?void 0:eQ.active)||[],sA=(null==eQ?void 0:eQ.latest)||[],sO=(null==eQ?void 0:eQ.alerts)||[],sB=(null==eQ?void 0:eQ.stats)||{},sF=[{label:I("活动事件","Active"),value:null!==(p=sB.active_events)&&void 0!==p?p:sI.length,Icon:a.Z},{label:I("历史事件","History"),value:null!==(h=sB.total_events)&&void 0!==h?h:sA.length,Icon:te.Z},{label:I("采样点","Samples"),value:null!==(g=sB.sample_count)&&void 0!==g?g:0,Icon:tt.Z},{label:I("峰值在线","Viewer peak"),value:null!==(b=sB.viewer_peak)&&void 0!==b?b:0,Icon:tn.Z},{label:I("累计时长","Total duration"),value:tK(sB.total_duration_seconds),Icon:ts.Z}],sW=(tt.Z,I("直播事件中枢","Live event center"),I("事件、转播对象、时长、页面采集、弹窗和告警全部写入本地 SQLite,可追溯。","Events, source rooms, duration, browser telemetry, popups, and alerts are stored locally."),w.Z,I("刷新事件","Refresh events"),sF.map(e=>{let{label:t,value:n,Icon:l}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500",children:[(0,s.jsx)(l,{className:"h-3.5 w-3.5 text-cyan-300"}),t]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-lg font-semibold text-white",children:String(n)})]},t)}),I("正在转播","Active relay"),sI.length,(sI.length?sI:sA.slice(0,1)).map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>void st(e.id),className:"block w-full rounded-lg border border-white/[0.06] bg-white/[0.03] px-3 py-2 text-left transition hover:bg-white/[0.06]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.source_title||e.channel_name||e.source_room_id||e.process||"#".concat(e.id)}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tY(e.status)),children:e.status||"event"})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 font-mono text-[10px] text-zinc-500",children:[(0,s.jsx)("span",{children:e.process||"-"}),(0,s.jsx)("span",{children:e.source_room_id?"room:".concat(e.source_room_id):I("未知来源","unknown source")}),(0,s.jsx)("span",{children:tK(e.duration_seconds)}),(0,s.jsx)("span",{children:null!=e.last_viewer_count?"".concat(e.last_viewer_count," online"):""})]})]},e.id)),sI.length||sA.length||I("暂无事件;开始直播或打开 Neko 中的 YouTube Studio 后会自动生成。","No events yet. Start a relay or open YouTube Studio in Neko."),I("最近事件","Recent events"),sA.slice(0,8).map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>void st(e.id),className:"flex w-full items-center justify-between gap-3 py-2 text-left",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.source_title||e.source_room_id||e.channel_name||e.process||"#".concat(e.id)}),(0,s.jsxs)("p",{className:"mt-0.5 font-mono text-[10px] text-zinc-600",children:[tH(e.started_at)," \xb7 ",tK(e.duration_seconds)]})]}),(0,s.jsxs)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tY(e.status)),children:[null!==(t=e.quality_score)&&void 0!==t?t:0,"/100"]})]},e.id)}),I("事件详情页","Event detail"),e1&&(()=>e5(null),I("收起","Close")),e1?(0,s.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:e1.source_title||e1.source_room_id||e1.process}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tY(e1.status)),children:e1.status})]}),(0,s.jsxs)("div",{className:"mt-2 grid gap-2 text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Process:"})," ",e1.process||"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Room:"})," ",e1.source_room_id||"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Started:"})," ",tH(e1.started_at)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Duration:"})," ",tK(e1.duration_seconds)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Viewers:"})," ",null!==(f=e1.last_viewer_count)&&void 0!==f?f:"-"," / peak ",null!==(v=e1.viewer_peak)&&void 0!==v?v:0]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Health:"})," ",e1.last_health||e1.last_live_status||"-"]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[e1.source_url?(0,s.jsx)("a",{href:e1.source_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-[11px] text-violet-100 ring-1 ring-violet-500/25",children:I("打开源直播间","Open source")}):null,e1.last_page_url?(0,s.jsx)("a",{href:e1.last_page_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-[11px] text-cyan-100 ring-1 ring-cyan-500/25",children:I("打开 Studio 页面","Open Studio page")}):null]})]}),(e1.alerts||sO).slice(0,4).length?(0,s.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/[0.06] p-3",children:[(0,s.jsxs)("h5",{className:"flex items-center gap-2 text-xs font-semibold text-amber-100",children:[(0,s.jsx)(eg.Z,{className:"h-3.5 w-3.5"}),I("弹窗 / 告警","Popups / alerts")]}),(0,s.jsx)("div",{className:"mt-2 space-y-1",children:(e1.alerts||sO).slice(0,4).map((e,t)=>(0,s.jsxs)("p",{className:"text-[11px] text-amber-100/85",children:[e.title||e.severity||"alert",": ",e.message||"-"]},"".concat(e.id||t)))})]}):null,(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("h5",{className:"text-xs font-semibold text-zinc-300",children:I("采样时间线","Sample timeline")}),(0,s.jsxs)("div",{className:"mt-2 max-h-52 space-y-2 overflow-auto pr-1",children:[(e1.samples||[]).slice(0,12).map(e=>{var t;return(0,s.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-2 py-1.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 font-mono text-[10px] text-zinc-500",children:[(0,s.jsx)("span",{children:tH(e.ts)}),(0,s.jsx)("span",{children:e.source||"sample"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-300",children:[e.live_status||"-"," \xb7 ",e.health||"-"," \xb7 ",null!==(t=e.viewer_count)&&void 0!==t?t:"-"," online"]}),e.popup_text?(0,s.jsx)("p",{className:"mt-1 text-[10px] text-amber-100/80",children:e.popup_text}):null]},e.id)}),(e1.samples||[]).length?null:(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("暂无采样;Chrome 扩展或状态接口会自动写入。","No samples yet. The Chrome extension or status API will fill this.")})]})]})]}):(0,s.jsx)("p",{className:"mt-3 text-xs text-zinc-600",children:I("选择左侧事件查看完整详情。","Select an event to see details.")}),[...sI,...sA.filter(e=>!sI.some(t=>t.id===e.id))].slice(0,12)),sK=e1||sW[0]||null,sH=(null==sK?void 0:sK.samples)||[],sY=(null==sK?void 0:null===(r=sK.alerts)||void 0===r?void 0:r.length)?sK.alerts:sO,sG=[{label:I("正在直播","Live now"),value:String(null!==(j=sB.active_events)&&void 0!==j?j:sI.length),helper:I("当前仍在推流的场次","Events still pushing"),Icon:Y.Z,tone:"text-emerald-200"},{label:I("总场次","Total events"),value:String(null!==(N=sB.total_events)&&void 0!==N?N:sA.length),helper:I("本机数据库里的直播记录","Stored locally"),Icon:te.Z,tone:"text-cyan-200"},{label:I("累计时长","Total duration"),value:t$(sB.total_duration_seconds,I),helper:I("已结束场次累计","Ended events total"),Icon:ts.Z,tone:"text-violet-200"},{label:I("最高在线","Peak viewers"),value:tq(null!==(k=sB.viewer_peak)&&void 0!==k?k:0,I),helper:I("Chrome/Studio 采集峰值","Captured from Studio"),Icon:tn.Z,tone:"text-amber-200"}],sq=(tt.Z,I("直播事件中枢","Live event center"),I("这里按运营视角展示:谁在播、转播哪个直播间、播了多久、观众多少、Studio 是否弹窗、有没有异常。机器编号只放在详情底部。","Built for operators: what is live, source room, duration, viewers, Studio popups, and issues. Technical ids stay in the detail footer."),w.Z,I("刷新","Refresh"),sG.map(e=>{let{label:t,value:n,helper:l,Icon:i,tone:a}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.035] p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,s.jsx)(i,{className:"h-4 w-4 ".concat(a)})]}),(0,s.jsx)("p",{className:"mt-2 text-2xl font-semibold tracking-tight text-white",children:n}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-600",children:l})]},t)}),sI.length?I("正在直播","Live now"):I("最近直播记录","Recent live events"),sI.length?I("优先显示还在推流的场次。","Active relays are listed first."):I("当前没有正在直播的场次,下方是最近历史。","Nothing is live now; showing recent history."),sW.length,I("条记录","records"),sW.map(e=>{var t;let n=(null==sK?void 0:sK.id)===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>void st(e.id),className:"grid w-full gap-3 px-4 py-4 text-left transition md:grid-cols-[minmax(0,1fr)_8rem_7rem_7rem] ".concat(n?"bg-cyan-500/[0.08]":"hover:bg-white/[0.04]"),children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tY(e.status)),children:tG(e.status,I)}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(t0(e)),children:tQ(e,I)})]}),(0,s.jsx)("p",{className:"mt-2 truncate text-sm font-semibold text-white",children:tJ(e,I)}),(0,s.jsxs)("p",{className:"mt-1 truncate text-xs text-zinc-500",children:[tV(e,I)," ","->"," YouTube"]})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("开始","Started")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:tX(e.started_at)})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("时长","Duration")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:t$(e.duration_seconds,I)})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("在线/峰值","Viewers")}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-zinc-300",children:[tq(e.last_viewer_count,I)," / ",tq(null!==(t=e.viewer_peak)&&void 0!==t?t:0,I)]})]})]},e.id)}),sW.length||(c.Z,I("还没有直播记录","No live events yet"),I("启动转播或在 Neko 打开 YouTube Studio 后,这里会自动生成可追溯记录。","Start a relay or open YouTube Studio in Neko to create traceable records.")),sK?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs text-cyan-300",children:I("这场直播","Selected event")}),(0,s.jsx)("h4",{className:"mt-1 truncate text-lg font-semibold text-white",children:tJ(sK,I)}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-zinc-500",children:[tV(sK,I)," ","->"," YouTube"]})]}),(0,s.jsx)("span",{className:"rounded-full px-2.5 py-1 text-xs ring-1 ".concat(tY(sK.status)),children:tG(sK.status,I)})]})}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("直播时长","Duration")}),(0,s.jsx)("p",{className:"mt-1 text-lg font-semibold text-white",children:t$(sK.duration_seconds,I)}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:tH(sK.started_at)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("观众","Viewers")}),(0,s.jsxs)("p",{className:"mt-1 text-lg font-semibold text-white",children:[tq(sK.last_viewer_count,I),(0,s.jsxs)("span",{className:"ml-2 text-xs font-normal text-zinc-500",children:[I("峰值","peak")," ",tq(null!==(_=sK.viewer_peak)&&void 0!==_?_:0,I)]})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:I("来自 Chrome 插件/Studio 页面采集","Captured from Studio")})]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("h5",{className:"text-sm font-semibold text-white",children:I("Studio 状态","Studio status")}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(t0(sK)),children:tQ(sK,I)})]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2 text-sm text-zinc-300",children:[(0,s.jsx)("p",{children:sK.last_live_status||sK.last_health||I("暂未采集到 Studio 状态","No Studio status captured yet")}),sK.last_popup_text?(0,s.jsx)("p",{className:"rounded-md border border-amber-500/20 bg-amber-500/[0.08] px-3 py-2 text-xs text-amber-100",children:sK.last_popup_text}):(0,s.jsx)("p",{className:"text-xs text-zinc-600",children:I("没有记录到弹窗。","No popup recorded.")}),sK.last_page_title||sK.last_page_url?(0,s.jsx)("p",{className:"truncate text-xs text-zinc-500",children:sK.last_page_title||sK.last_page_url}):null]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[sK.source_url?(0,s.jsxs)("a",{href:sK.source_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/25",children:[I("打开源直播间","Open source")," ",(0,s.jsx)(W.Z,{className:"h-3 w-3"})]}):null,sK.last_page_url?(0,s.jsxs)("a",{href:sK.last_page_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-xs text-cyan-100 ring-1 ring-cyan-500/25",children:[I("打开 Studio","Open Studio")," ",(0,s.jsx)(W.Z,{className:"h-3 w-3"})]}):null]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("h5",{className:"text-sm font-semibold text-white",children:I("采样时间线","Telemetry timeline")}),(0,s.jsxs)("div",{className:"mt-3 max-h-64 space-y-2 overflow-auto pr-1",children:[sH.slice(0,10).map(e=>(0,s.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-zinc-400",children:tX(e.ts)}),(0,s.jsx)("span",{className:"text-zinc-600",children:e.source||I("采样","sample")})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-zinc-200",children:[e.live_status||e.health||I("状态未识别","Unknown status"),(0,s.jsxs)("span",{className:"ml-2 text-xs text-zinc-500",children:[I("在线","online")," ",tq(e.viewer_count,I)]})]}),e.popup_text?(0,s.jsx)("p",{className:"mt-1 text-xs text-amber-100",children:e.popup_text}):null]},e.id)),sH.length?null:(0,s.jsx)("p",{className:"rounded-md border border-white/[0.05] bg-black/20 px-3 py-3 text-xs text-zinc-500",children:e1?I("这场直播暂时没有采样明细。","No telemetry samples for this event yet."):I("点击左侧记录后加载完整采样明细。","Click a record on the left to load full telemetry samples.")})]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("h5",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eg.Z,{className:"h-4 w-4 text-amber-300"}),I("告警和弹窗","Alerts and popups")]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2",children:[sY.slice(0,4).map((e,t)=>(0,s.jsxs)("p",{className:"rounded-md border border-amber-500/15 bg-amber-500/[0.06] px-3 py-2 text-xs text-amber-100",children:[e.title||e.severity||I("提示","Notice"),": ",e.message||"-"]},"".concat(e.id||t))),sY.length?null:(0,s.jsx)("p",{className:"text-xs text-zinc-600",children:I("没有告警。","No alerts.")})]})]}),(0,s.jsxs)("p",{className:"truncate text-[11px] text-zinc-700",children:[I("技术标识","Technical id"),": #",sK.id," \xb7 ",sK.process||"-"," \xb7 ",sK.event_uuid||"-"]})]}):(0,s.jsxs)("div",{className:"flex min-h-[24rem] flex-col items-center justify-center text-center",children:[(0,s.jsx)(tt.Z,{className:"h-10 w-10 text-zinc-700"}),(0,s.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:I("等待第一场直播","Waiting for the first live event")}),(0,s.jsx)("p",{className:"mt-1 max-w-sm text-xs text-zinc-600",children:I("开始转播后,这里会变成这场直播的详情页。","After a relay starts, this panel becomes the event detail page.")})]}),(null==e4?void 0:e4.summary)||{}),sJ=(null==e4?void 0:e4.lanes)||[],sV=(null==e4?void 0:e4.recommendations)||[];return a.Z,I("算法友好质量守护","Algorithm-friendly quality guard"),I("目标不是刷数据,而是让直播信号长期稳定:不断流、不卡顿、Studio 状态可见、异常能追踪。","The goal is stable, policy-safe signal quality: no drops, no stalls, visible Studio state, and traceable issues."),w.Z,I("重新检测","Check now"),I("综合分","Score"),t1(null==e4?void 0:e4.score),S=null==e4?void 0:e4.score,I("80 以上适合长时间无人值守","80+ is suitable for long unattended runs"),[[I("推流线路","Lanes"),"".concat(null!==(z=sq.pushing_lanes)&&void 0!==z?z:0,"/").concat(null!==(R=sq.lanes)&&void 0!==R?R:0)],[I("活动事件","Active events"),String(null!==(L=sq.active_events)&&void 0!==L?L:0)],[I("Studio 采样","Studio samples"),String(null!==(P=sq.sample_count)&&void 0!==P?P:0)],[I("最高在线","Viewer peak"),tq(null!==(T=sq.viewer_peak)&&void 0!==T?T:0,I)]].map(e=>{let[t,n]=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,s.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,s.jsx)("p",{className:"mt-2 text-2xl font-semibold text-white",children:n})]},t)}),I("线路质量","Lane quality"),I("从进程、FFmpeg 日志、配置和事件采样综合判断。","Combined from process state, FFmpeg logs, config, and event telemetry."),sJ.map(e=>{var t,n,l,i,a,r,o;let c=(e.label||"").replace(/^YouTube Pro\s*·\s*/i,"").trim(),d=t3(nj(String(e.process||"")),e),u=(e.source_display||e.source_title||"").trim()||c||e.label||e.process||"-",x=e.is_pushing&&c&&u!==c?c:"",m=[e.label,e.process].filter(Boolean).join(" \xb7 ");return(0,s.jsxs)("div",{className:"grid gap-3 px-4 py-4 md:grid-cols-[minmax(0,1fr)_6rem_14rem]",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:u}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.is_pushing?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"),children:e.is_pushing?I("推流中","Pushing"):I("未推流","Idle")}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.rtmps?"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25":"bg-amber-500/15 text-amber-100 ring-amber-500/25"),children:e.rtmps?"RTMPS":I("非 RTMPS","No RTMPS")})]}),x&&x!==u?(0,s.jsx)("p",{className:"mt-0.5 truncate text-xs text-zinc-500",children:x}):null,(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:m||"-"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:(e.issues||[]).slice(0,3).map((e,t)=>(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(t5(e.level)),children:e.text||e.level},"".concat(e.text||t)))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("分数","Score")}),(0,s.jsx)("p",{className:"mt-1 text-2xl font-semibold ".concat(t1(e.score)),children:null!==(l=e.score)&&void 0!==l?l:0})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-2 font-mono text-[11px] text-zinc-300",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"fps"}),eC(d.fps)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"speed"}),(0,s.jsx)("span",{className:d.speedLow?"text-amber-300":"",children:eC(d.speed,"x")})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:I("码率","Bitrate")}),e.is_pushing&&null!==(i=ez(d.bitrate))&&void 0!==i?i:"—"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"frame"}),(0,s.jsx)("span",{className:d.progressStalled?"text-rose-300":"",children:eC(d.frame,"",0)})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"drop"}),null!==(a=null===(t=e.metrics)||void 0===t?void 0:t.drop)&&void 0!==a?a:"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"urls"}),null!==(r=e.url_count)&&void 0!==r?r:0]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"err"}),null!==(o=null===(n=e.metrics)||void 0===n?void 0:n.error_count)&&void 0!==o?o:0]})]})]},e.process||e.label)}),sJ.length||I("没有发现 YouTube 线路。","No YouTube lanes found."),I("下一步建议","Next actions"),sV.slice(0,6).map((e,t)=>(0,s.jsx)("p",{className:"rounded-lg px-3 py-2 text-xs ring-1 ".concat(t5(e.level)),children:e.text||"-"},"".concat(e.text||t))),sV.length||I("暂无建议。","No recommendations."),null==e4||null===(o=e4.ffmpeg_profile)||void 0===o||o.target,((null==e4?void 0:null===(d=e4.ffmpeg_profile)||void 0===d?void 0:d.guardrails)||[]).slice(0,4).map(e=>(0,s.jsxs)("li",{children:["- ",e]},e)),Y.Z,I("转播实况","Relay snapshot"),tW(n_),sj||I("未配置抖音直播源","No Douyin source configured"),sN&&sN!==sj&&I("抖音源","Douyin"),"pro"===ei&&sC>0&&" \xb7 ".concat(sC,"/").concat(er.length," ").concat(I("路推流中","lanes pushing")),sk&&(W.Z,I("打开源站","Open source")),n2.link&&(W.Z,I("Studio","Studio")),w.Z,I("刷新全局","Refresh"),[{label:I("FFmpeg 速度","FFmpeg speed"),value:sR,warn:sS.speedLow,helper:sS.live?sM?"".concat(I("已编码","Encoded")," ").concat(sM):I("实时倍速","Realtime multiplier"):I("等待进程上报","Waiting for metrics"),accent:sS.speedLow?"amber":"emerald"},{label:I("实时 FPS","Live FPS"),value:sP,warn:"number"==typeof sS.fps&&sS.fps>0&&sS.fps<24,helper:sS.live?I("FFmpeg 输出帧率","FFmpeg output fps"):I("未推流","Not pushing"),accent:"cyan"},{label:I("编码帧","Encoded frame"),value:sL,warn:sS.progressStalled,helper:(null==n_?void 0:n_.ffmpeg_active)?I("Worker 活跃","Worker active"):I("无活跃 Worker","No active worker"),accent:sS.progressStalled?"amber":"violet"},{label:I("码率","Bitrate"),value:null!=sT?sT:"—",warn:!1,helper:sS.live?I("实时输出码率","Live output bitrate"):I("停推后不显示","Hidden when idle"),accent:"cyan"},{label:I("质量分","Quality score"),value:null!=sz?String(sz):"—",warn:null!=sz&&sz<55,helper:I("当前线路综合评估","Current lane score"),accent:"violet"},{label:I("活动场次","Active events"),value:String(sn),warn:!1,helper:I("本地事件库","Local event store"),accent:"cyan"},{label:I("抖音地址","Douyin URLs"),value:String(n1),warn:0===n1,helper:"".concat(n0," ").concat(I("条有效地址","valid URLs")),accent:"cyan"},{label:I("密钥尾码","Key suffix"),value:nq,warn:!nG,helper:sU,accent:"violet"}].map(e=>{let{label:t,value:n,warn:l,helper:i,accent:a}=e;return(0,s.jsx)(t2,{label:t,value:n,warn:l,helper:i,accent:a},t)}),sb&&sg&&(I("本场直播","This event"),tY(sb.status),tG(sb.status,I),t0(sb),tQ(sb,I),I("观众","Viewers"),tq(sb.last_viewer_count,I),t$(sb.duration_seconds,I),sb.last_popup_text?(0,s.jsxs)("span",{className:"text-amber-200",children:[I("弹窗","Popup"),": ",sb.last_popup_text]}):null),(0,s.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[Q?(0,s.jsx)(eh,{t:I,title:I("YouTube 转播链路","YouTube relay chain"),subtitle:I("与「网络」页相同风格的链路示意:代理 → 编码推流 → 浏览器侧操作工作室。","Same visual language as Network: proxy → encode → browser studio."),onNavigate:Q,steps:[{label:"ShellCrash",sub:I("透明代理","Proxy"),gradient:"from-violet-500 to-fuchsia-500",target:"network"},{label:"FFmpeg",sub:I("推流 / 转码","Stream"),gradient:"from-cyan-400 to-blue-500",target:"live_youtube"},{label:"Neko",sub:n2.link?"".concat(I("Chromium 工作室","Chromium studio")," \xb7 ").concat(n2.link.label):I("Chromium 工作室","Chromium studio"),gradient:"from-emerald-400 to-teal-500",openUrl:n3}]}):null,(0,s.jsx)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/[0.12] via-zinc-950/80 to-cyan-500/5 p-6 shadow-xl shadow-violet-900/10",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-red-500/30 to-violet-600/30 ring-1 ring-white/10",children:(0,s.jsx)(c.Z,{className:"h-5 w-5 text-red-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:I("YouTube 无人直播","YouTube unmanned live")}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:I("单路一条流;多路时每条线路独立保存自己的密钥、URL 列表和 PM2 任务。填好后保存,再点「开始」。Neko 浏览器仅作辅助工作室,不再阻塞推流。","Single lane or multi-lane: every lane keeps its own key, URL list, and PM2 task. Save, then Start. Neko is optional browser tooling and no longer blocks streaming.")})]})]}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 self-start rounded-xl border border-white/10 bg-black/30 p-1 ".concat(""),"aria-hidden":!1,children:[(0,s.jsx)("button",{type:"button",onClick:()=>nA("single"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("single"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:I("单频道","Single")}),(0,s.jsx)("button",{type:"button",onClick:()=>nA("pro"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("pro"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:I("多频道 Pro","Multi Pro")})]})]})}),null,n6.length?(0,s.jsxs)("div",{className:"space-y-2",children:[tg?(0,s.jsx)("p",{className:"text-xs text-zinc-400",children:tg}):null,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[n2.link?(0,s.jsx)("a",{href:n3,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/20",children:I("打开当前线路 Neko 工作室","Open lane Neko studio")}):null,n5.length?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n5.map(e=>sZ(e))}):null,(null==et?void 0:et.chromium_remote_debug)?(0,s.jsx)("a",{href:(0,ep.p)(et.chromium_remote_debug),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:I("打开 Chromium 调试","Open Chromium debug")}):null,(null==et?void 0:et.srs_api)?(0,s.jsx)("a",{href:(0,ep.p)(et.srs_api),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-violet-500/20 bg-violet-500/10 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/20",children:I("打开 SRS API","Open SRS API")}):null]})]}):null,(0,s.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,s.jsx)(Y.Z,{className:"h-4 w-4"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播开关","Live control")})]}),"single"===ei?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:I("转播任务","Relay task")}),(0,s.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:B,onChange:e=>{let t=e.target.value;nn.current=t,F(t),nD(t)},children:[B&&!es.some(e=>e.pm2===B)?(0,s.jsxs)("option",{value:B,children:[nw?"".concat(nw.name||nw.id," (").concat(B,")"):B,nk?" (".concat(tF(nk,I),")"):""]}):null,es.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[function(e,t){let n=tS(e.script).toLowerCase();return n.startsWith("douyin_youtube")?t("抖音→YouTube","Douyin → YouTube"):n.startsWith("youtube")?t("YouTube","YouTube"):e.label}(e,I)," (",e.pm2,")"]},e.pm2))]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,s.jsx)(t8,{kind:"start",targetPm2:B,busy:A,online:sm,pushing:sp,label:I("开始直播","Start"),className:"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30",baseLock:!1,onRun:()=>q("start",B),notify:X,t:I}),(0,s.jsx)(t8,{kind:"stop",targetPm2:B,busy:A,online:sm,pushing:sp,label:I("停止直播","Stop"),className:"bg-rose-500/15 text-rose-200 ring-rose-500/25",baseLock:!1,onRun:()=>q("stop",B),notify:X,t:I}),(0,s.jsx)(t8,{kind:"restart",targetPm2:B,busy:A,online:sm,pushing:sp,label:I("重新开始","Restart"),className:"bg-amber-500/15 text-amber-200 ring-amber-500/25",baseLock:!1,onRun:()=>q("restart",B),notify:X,t:I}),(0,s.jsxs)("button",{type:"button",onClick:()=>tB(B),className:"inline-flex min-h-[2.75rem] items-center justify-center gap-1.5 rounded-xl bg-violet-500/15 px-3 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/25 transition hover:bg-violet-500/25",title:I("打开推流日志(新标签页)","Open relay log in a new tab"),children:[(0,s.jsx)(tl.Z,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),I("日志","Log")]})]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"rounded-full px-2.5 py-0.5 font-medium ring-1 ".concat(tW(sd)),children:tF(sd,I)}),"number"==typeof(null==sd?void 0:sd.ffmpeg_speed)?(0,s.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(sd.ffmpeg_speed_low?"text-amber-300":""),children:["speed ",sd.ffmpeg_speed.toFixed(2),"x"]}):null,"number"==typeof(null==sd?void 0:sd.ffmpeg_frame)?(0,s.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(sd.ffmpeg_progress_stalled?"text-rose-300":""),children:["frame ",sd.ffmpeg_frame]}):null]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.1] via-zinc-950/50 to-violet-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:I("Pro 转播实况","Pro relay status")}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:I("对齐桌面端:每路独立 URL / youtube 配置文件;点左侧信息切换编辑,右侧控制进程。","Per-lane config files like desktop; click row info to edit, use right-side controls for PM2.")}),n4?(0,s.jsxs)("p",{className:"mt-2 text-[11px] text-zinc-500",children:[I("Neko 实例","Neko instances"),": ",n4]}):null,(0,s.jsx)("div",{className:"mt-3 max-h-[min(24rem,55vh)] space-y-2 overflow-y-auto pr-1",children:er.map(e=>{var t,n,l,i,a,r,o;let c=th(e),d=nj(c),u=nN(c),x=ec===e.id,m=x?eS:(null!==(n=e.urlLines)&&void 0!==n?n:"").trim(),p=x?null!==(i=null!==(l=null==nL?void 0:nL.streamKey)&&void 0!==l?l:e.streamKey)&&void 0!==i?i:"":null!==(a=e.streamKey)&&void 0!==a?a:"",h=t4(m),g=eP(m),b=tA(d,m),f=eL("key = ".concat(p)),v=tO(u),y=tE(d),w=er.findIndex(t=>t.id===e.id),j=(0,ta.U_)(n5,w).link,N=tu(e.name,w>=0?w:0),k=null==e4?void 0:null===(t=e4.lanes)||void 0===t?void 0:t.find(e=>e.process===c),_=tZ(N,d,m,k),S=tD(d,m,N),z=tU(d,I),C=t3(d,k),R=eR(C,{live:C.live||tM(d)});return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border px-3 py-2.5 text-left text-xs transition sm:flex-nowrap ".concat(x?"border-violet-500/45 bg-violet-500/[0.1]":"border-white/10 bg-black/30 hover:border-white/18"),children:[(0,s.jsxs)("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:()=>{nn.current=th(e),nO(e)},children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"font-medium text-zinc-100",children:[(0,s.jsx)("span",{className:"mr-1.5","aria-hidden":!0,children:function(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"streaming"===t?"\uD83D\uDFE2":"relay_slow"===t?"\uD83D\uDFE1":"source_stalled"===t?"\uD83D\uDFE0":"relay_starting"===t?"\uD83D\uDD35":"youtube_key_rejected"===t||"error"===t?"\uD83D\uDD34":"source_live"===t?"\uD83D\uDD35":"waiting_source"===t?"⚪":"⚫"}(d)}),_||I("未配置抖音直播源","No Douyin source")]}),(0,s.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(tW(d)),children:z}),j?(0,s.jsxs)("span",{className:"shrink-0 rounded-md bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[j.label," \xb7 ",j.accessLabel]}):null]}),(0,s.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-[10px] text-zinc-500",children:[S&&S!==_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"truncate text-zinc-400",title:S,children:[I("抖音源","Douyin")," ",S]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"})]}):null,(0,s.jsxs)("span",{title:N,children:[I("线路","Lane")," ",N]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["key …",f||"—"]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsx)("span",{className:"truncate",title:c,children:c}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["URL ",h.length]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["DY ",g.length]}),R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsx)("span",{className:(r=C.speed,o=C.speedLow,C.progressStalled?"text-rose-300":o||"number"==typeof r&&r>0&&r<.95?"text-amber-200":"number"==typeof r&&r>=.95?"text-emerald-200":"text-cyan-100"),children:R})]}):null]}),b?(0,s.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",className:"mt-1 block max-w-full truncate text-cyan-300/90 underline-offset-2 hover:underline",onClick:e=>e.stopPropagation(),title:b,children:_?"".concat(I("打开源站","Open source")," \xb7 ").concat(b.replace(/^https?:\/\//,"")):b.replace(/^https?:\/\//,"")}):(0,s.jsx)("span",{className:"mt-1 block text-zinc-600",children:"—"})]}),(0,s.jsxs)("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,s.jsx)(t8,{kind:"start",targetPm2:c,busy:A,online:v,pushing:y,label:I("开始","Start"),className:"rounded-lg bg-emerald-500/20 text-emerald-100 ring-emerald-500/30",baseLock:!1,onRun:()=>void n7("start",c),notify:X,t:I,compact:!0}),(0,s.jsx)(t8,{kind:"stop",targetPm2:c,busy:A,online:v,pushing:y,label:I("停止","Stop"),className:"rounded-lg bg-rose-500/15 text-rose-100 ring-rose-500/25",baseLock:!1,onRun:()=>void n7("stop",c),notify:X,t:I,compact:!0}),(0,s.jsx)(t8,{kind:"restart",targetPm2:c,busy:A,online:v,pushing:y,label:I("重新开始","Restart"),className:"rounded-lg bg-amber-500/15 text-amber-100 ring-amber-500/25",baseLock:!1,onRun:()=>void n7("restart",c),notify:X,t:I,compact:!0}),(0,s.jsxs)("button",{type:"button",onClick:()=>tB(c),className:"inline-flex min-h-[2rem] items-center justify-center gap-1 rounded-lg border border-violet-500/25 bg-violet-500/10 px-2.5 py-1.5 text-violet-100 ring-1 ring-violet-500/20 transition hover:bg-violet-500/20",title:I("打开推流日志(新标签页)","Open relay log in a new tab"),children:[(0,s.jsx)(tl.Z,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),I("日志","Log")]}),j?(0,s.jsxs)("button",{type:"button",onClick:()=>{window.open((0,ep.p)(j.url),"_blank","noopener,noreferrer")},className:"inline-flex min-h-[2rem] items-center justify-center rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2.5 py-1.5 text-emerald-100 ring-1 ring-emerald-500/20 transition hover:bg-emerald-500/20",title:"".concat(I("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(j.label).concat(j.port?" :".concat(j.port):""),"aria-label":"".concat(I("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(j.label),children:[(0,s.jsx)("span",{className:"sr-only",children:I("打开该线路 Neko 工作室","Open this lane's Neko studio")}),(0,s.jsx)("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"\uD83D\uDC31"}),(0,s.jsx)(W.Z,{className:"ml-1 h-3.5 w-3.5 shrink-0","aria-hidden":!0})]}):null]})]},e.id)})})]})})]}),(0,s.jsx)(eO,{t:I,currentProc:B,fetchJson:V,urlListText:sf,keySuffixUi:nG,showKeyRow:!1,hideStatusOverview:!0,pollMs:sx,refreshToken:e$,monitorRow:null!=n_?n_:void 0,preferredTitle:"pro"===ei?sw:void 0}),null,null,(0,s.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 ring-1 ring-white/[0.03]",children:[(0,s.jsxs)("div",{className:"border-b border-white/[0.06] px-6 py-4",children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[I("配置与地址","Config and URLs"),sE?(0,s.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:I("待完善","Needs setup")}):null]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("密钥、youtube.ini、URL 列表","Keys, youtube.ini, URL list")})]}),(0,s.jsxs)("div",{className:"space-y-6 p-6 pt-4",children:["single"===ei?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("YouTube 相关设置","YouTube settings")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("串流参数写进 youtube.ini,无需 Google 登录。","Stream settings go to youtube.ini — no Google login.")}),(0,s.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,s.jsx)("label",{className:"block text-xs text-zinc-400",children:I("串流密钥","Stream key")}),(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm font-mono text-zinc-200",spellCheck:!1,autoComplete:"off",value:ef.key,onChange:e=>ew(t=>({...t,key:e.target.value})),placeholder:"xxxx-xxxx-xxxx-xxxx-xxxx"}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:["RTMPS",(0,s.jsxs)("select",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-sm text-white",value:ef.rtmps?"1":"0",onChange:e=>ew(t=>({...t,rtmps:"1"===e.target.value})),children:[(0,s.jsx)("option",{value:"1",children:I("是(默认)","Yes")}),(0,s.jsx)("option",{value:"0",children:I("否 → RTMP","No")})]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:[I("比特率 kbps","Bitrate kbps"),(0,s.jsx)("input",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",value:ef.bitrate,onChange:e=>ew(t=>({...t,bitrate:e.target.value})),placeholder:"4000"})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 pt-6 text-xs text-zinc-300",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:ef.fastAudio,onChange:e=>ew(t=>({...t,fastAudio:e.target.checked}))}),"fast_audio(",I("轻量音频","lighter audio"),")"]})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:sr,onClick:()=>void nB(),className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-200",children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(ek?"animate-spin":"")}),I("重新读取","Reload")]}),(0,s.jsxs)("button",{type:"button",disabled:sr,onClick:()=>void nH(),className:"inline-flex items-center gap-2 rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:[ek?(0,s.jsx)(y.Z,{className:"h-4 w-4 animate-spin"}):null,I("保存 youtube.ini","Save youtube.ini")]}),(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>void nY(),className:"rounded-xl border border-cyan-500/20 bg-cyan-500/10 px-4 py-2 text-sm text-cyan-100",children:I("平衡预设","Balanced preset")}),(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>{ew(eZ(em)),eN(I("已从下方原文同步到表单","Synced from raw"))},className:"rounded-xl border border-white/10 px-4 py-2 text-sm text-zinc-400",children:I("从原文同步表单","Parse raw")})]}),(0,s.jsxs)("details",{className:"mt-4 rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:I("高级:youtube.ini 原文","Raw youtube.ini")}),(0,s.jsx)("textarea",{className:"mt-2 h-36 w-full resize-y rounded-lg border border-white/10 bg-black/50 p-3 font-mono text-[11px] text-zinc-400",value:em,onChange:e=>eb(e.target.value),spellCheck:!1}),(0,s.jsx)("button",{type:"button",disabled:sr,className:"mt-2 rounded-lg bg-cyan-500/15 px-3 py-1.5 text-xs text-cyan-200",onClick:()=>void nW(em),children:I("保存原文","Save raw")})]}),ej?(0,s.jsx)("p",{className:"mt-2 font-mono text-xs text-zinc-500",children:ej}):null]}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[I("当前线路","Current lane"),ny?(0,s.jsxs)("span",{className:"ml-2 font-normal text-zinc-400",children:["\xb7 ",sh||I("未配置抖音直播源","No Douyin source")]}):null,nZ?(0,s.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:I("有未保存修改","Unsaved")}):null]}),ny?(0,s.jsxs)("p",{className:"mt-0.5 font-mono text-[11px] text-zinc-500",children:[I("配置名","Config"),": ",tu(ny.name,Math.max(0,er.findIndex(e=>e.id===ny.id)))," \xb7 PM2: ",nT,nE?" → ".concat(nM):""," \xb7 ","key ",I("尾码","suffix"),": ",nq]}):null]}),(0,s.jsxs)("button",{type:"button",disabled:so,className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/30",onClick:()=>{let e=tj(),t={id:e,name:"".concat(I("线路","Ch")," ").concat(er.length+1),streamKey:"",urlLines:"",pm2Name:tN(e),notes:""};eY(n=>({...n,[e]:tP(t)})),nR([...er,t],{force:!0}),ed(e),nn.current=th(t),F(nn.current),nd(""),ns.current+=1,nl.current+=1,t9.current=!1,eb(""),ew(eZ("")),eK(I("新线路已切换,地址列表为空","New lane selected with an empty URL list"))},children:[(0,s.jsx)(ti.Z,{className:"h-3.5 w-3.5"}),I("新增线路","Add lane")]})]}),ny?(0,s.jsxs)("div",{className:"mt-4 space-y-3 border-t border-white/5 pt-4",children:[(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 text-sm",value:null!==(M=null==nL?void 0:nL.name)&&void 0!==M?M:"",onChange:e=>nP("name",e.target.value),placeholder:I("线路名称","Lane name")}),(0,s.jsx)("label",{className:"block text-xs text-zinc-500",children:I("串流密钥","Stream key")}),(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",spellCheck:!1,value:null!==(E=null==nL?void 0:nL.streamKey)&&void 0!==E?E:"",onChange:e=>nP("streamKey",e.target.value),placeholder:"xxxx-xxxx… / rtmp(s)://…"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:so,onClick:()=>void nK(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-100",children:eG?I("保存中...","Saving..."):I("保存线路设置","Save lane")}),(0,s.jsx)("button",{type:"button",disabled:so,onClick:()=>void nX(),className:"rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:I("写入 youtube.ini","Write youtube.ini")})]}),nU.ok?null:(0,s.jsx)("p",{className:"text-xs text-rose-300",children:nU.message}),(0,s.jsxs)("details",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:I("高级:进程名","Advanced: process name")}),(0,s.jsx)("input",{className:"mt-2 w-full rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:null!==(U=null==nL?void 0:nL.pm2Name)&&void 0!==U?U:tN(ny.id),onChange:e=>nP("pm2Name",e.target.value),spellCheck:!1,placeholder:"youtube2__…"}),(0,s.jsxs)("p",{className:"mt-2 font-mono text-[11px] text-zinc-500",children:[I("实际生效","Effective"),": ",nM||"—"]}),nU.message&&!nU.ok?(0,s.jsx)("p",{className:"mt-2 text-[11px] text-rose-300",children:nU.message}):null]}),(0,s.jsx)("textarea",{className:"h-16 w-full resize-y rounded-xl border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:null!==(D=null==nL?void 0:nL.notes)&&void 0!==D?D:"",onChange:e=>nP("notes",e.target.value),placeholder:I("备注(可选)","Notes (optional)")}),eJ?(0,s.jsx)("p",{className:"text-xs text-zinc-400",children:eJ}):null,(0,s.jsxs)("button",{type:"button",disabled:sr||er.length<2,className:"inline-flex items-center gap-1 text-xs text-rose-300 hover:text-rose-200 disabled:opacity-30",onClick:()=>{var e,t;let n=er.filter(e=>e.id!==ny.id),s=null!==(e=n[0])&&void 0!==e?e:null;if(eY(e=>{let t={...e};return delete t[ny.id],t}),nR(n,{force:!0}),ed((null==s?void 0:s.id)||""),s){let e=th(s);nn.current=e,F(e),nd((null!==(t=s.urlLines)&&void 0!==t?t:"").trim()),nI(s)}else nn.current="",F(""),nd("")},children:[(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),I("删除此线路","Delete lane")]})]}):null]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播地址列表","URL list")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("每条线路独立写入自己的 URL_config..ini,不再复用或回填所谓“全局地址”。","Each lane writes to its own URL_config..ini with no shared global URL draft.")}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eD(B):"URL_config.ini"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,s.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[I("有效地址","Valid URLs"),": ",n0]}),(0,s.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",n1]})]}),sD,eW?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eW}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[160px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eS,onChange:e=>{t9.current=!0,nd(e.target.value)},spellCheck:!1,placeholder:"https://live.douyin.com/..."}),(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,s.jsx)("button",{type:"button",disabled:eG,title:sc||void 0,onClick:()=>void nJ(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:I("保存地址","Save URLs")})})]})]}),"single"===ei?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("一行一个地址;可自动刷新或手动重新读取。","One URL per line; auto-refresh or reload.")}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eD(B):"URL_config.ini"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,s.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[I("有效地址","Valid URLs"),": ",n0]}),(0,s.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",n1]})]}),sD,eW?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eW}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eu,onChange:e=>{t9.current=!0,nc(e.target.value)},spellCheck:!1}),(0,s.jsx)("button",{type:"button",disabled:eG,title:sc||void 0,onClick:()=>void nV(),className:"mt-3 rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:I("保存 URL 配置","Save URL config")})]}):null]})]})]})}var t7=n(2555);let ne=["dashboard","services","live_youtube","live_tiktok","android","studio","network","settings"],nt=()=>void 0!==t7&&t7.env.NEXT_PUBLIC_API_URL||"";function nn(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],n=e,s=0;for(;n>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function ns(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e));if(t<60)return"".concat(t,"s");let n=Math.floor(t/60);if(n<60)return"".concat(n,"m");let s=Math.floor(n/60);return s<48?"".concat(s,"h"):"".concat(Math.floor(s/24),"d")}function nl(e){return"online"===e||"running"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}function ni(e,t){let n=null!=t?t:(e,t)=>t||e,s=(e||"").trim().toLowerCase();return"connected"===s?n("高速可用","Ready"):"configured"===s?n("已配置","Configured"):"detected"===s?n("接口已起","Detected"):"idle"===s?n("等待握手","Idle"):"stale"===s?n("握手过期","Stale"):"down"===s?n("未连接","Down"):e||"—"}function na(){var e,t,n,R,I,A,O,B,F,W,K,H,Y,G,q,J,$,X,Q,ee,et,en,es,el,ei,ea,er,eo,ec,eu,ex,em,eh,eg,eb,ef,ev,ew,ej,eN,ek,e_,eS,ez,eC,eR,eL,eP,eT,eM,eE,eU,eZ,eD,eI,eA,eO,eB,eF,eW,eK,eH,eG,eq,eJ,eV,e$,eX,eQ,e0,e1,e5,e2,e3;let e4=nt(),[e6,e9]=(0,Z.useState)("zh"),[e7,te]=(0,Z.useState)("dark"),[tt,tn]=(0,Z.useState)("dashboard"),[ts,tl]=(0,Z.useState)(!1),[ti,tr]=(0,Z.useState)(!1),[to,tc]=(0,Z.useState)(null),[td,tu]=(0,Z.useState)(null),[tx,tm]=(0,Z.useState)(!0),[tp,th]=(0,Z.useState)(null),[tg,tb]=(0,Z.useState)(null),[tf,tv]=(0,Z.useState)(null),[ty,tw]=(0,Z.useState)(!0),[tj,tN]=(0,Z.useState)([]),[tk,t_]=(0,Z.useState)([]),[tS,tz]=(0,Z.useState)(""),[tC,tR]=(0,Z.useState)(""),[tL,tP]=(0,Z.useState)("/sdcard/app.apk"),[tT,tM]=(0,Z.useState)(""),[tE,tU]=(0,Z.useState)(null),[tZ,tD]=(0,Z.useState)(null),[tI,tA]=(0,Z.useState)(!0),[tO,tB]=(0,Z.useState)(!0),[tF,tW]=(0,Z.useState)("tencent-relay-wg0"),[tK,tH]=(0,Z.useState)(""),[tY,tG]=(0,Z.useState)(null),[tq,tJ]=(0,Z.useState)(null),[tV,t$]=(0,Z.useState)(null),[tX,tQ]=(0,Z.useState)(!1),[t0,t1]=(0,Z.useState)(!0),[t5,t2]=(0,Z.useState)("overlay"),[t3,t4]=(0,Z.useState)(""),[t6,t8]=(0,Z.useState)(""),[t7,na]=(0,Z.useState)(""),[nr,no]=(0,Z.useState)("255.255.255.255"),[nc,nd]=(0,Z.useState)("9"),[nu,nx]=(0,Z.useState)([]),[nm,np]=(0,Z.useState)(""),[nh,ng]=(0,Z.useState)(""),[nb,nf]=(0,Z.useState)(""),[nv,ny]=(0,Z.useState)([]),[nw,nj]=(0,Z.useState)(""),[nN,nk]=(0,Z.useState)("115200"),[n_,nS]=(0,Z.useState)("AT"),[nz,nC]=(0,Z.useState)(""),[nR,nL]=(0,Z.useState)(null),nP=(0,Z.useRef)(null),nT=(0,Z.useRef)(null),nM=(0,Z.useRef)(null),nE=(0,Z.useRef)(tS),nU=(0,Z.useRef)(0),nZ=(0,Z.useRef)(null),nD=(0,Z.useCallback)((e,t)=>"zh"===e6?e:t,[e6]),nI=(0,Z.useCallback)(e=>{tb(e),null!=nZ.current&&window.clearTimeout(nZ.current),nZ.current=window.setTimeout(()=>{tb(null),nZ.current=null},2800)},[]),nA=(0,Z.useCallback)(async(e,t)=>(0,V.N)("".concat(e4).concat(e),t),[e4]),nO=(0,Z.useCallback)(async()=>{if(nT.current)return nT.current;let e=(async()=>{try{let e=await nA("/stack/summary");tc(t=>({...null!=t?t:{},stack:e})),tu(null),tv(Date.now())}catch(e){tu(e.message)}finally{nT.current=null}})();return nT.current=e,e},[nA]),nB=(0,Z.useCallback)(async()=>{if(nP.current)return nP.current;let e=(async()=>{try{var e;let[t,n]=await Promise.allSettled([nA("/hub/dashboard"),nA("/deploy/check")]);if("fulfilled"!==t.status)throw t.reason;let s=t.value;tc(s),tu(null),tv(Date.now()),"fulfilled"===n.status?tD(n.value):tD(null);let l=(null===(e=s.android)||void 0===e?void 0:e.devices)||[];if(l.length&&!tT){let e=l.find(e=>"device"===(e.state||"").toLowerCase());tM((null!=e?e:l[0]).serial)}}catch(e){tu(e.message),tD(null)}finally{tm(!1),nP.current=null}})();return nP.current=e,e},[tT,nA]),nF=(0,Z.useMemo)(()=>{let e=new URLSearchParams({light:"1"});return"live_youtube"===tt?e.set("family","youtube"):"live_tiktok"===tt&&e.set("family","tiktok"),"/process_monitor?".concat(e.toString())},[tt]),nW=(0,Z.useMemo)(()=>ey(tk),[tk]),nK=(0,Z.useMemo)(()=>(function(e){if(!e.pageVisible)return 3e4;if("live_youtube"===e.view||"live_tiktok"===e.view)switch(e.activity){case"hot":return 800;case"warm":return 2500;default:return 5e3}return 4e3})({view:tt,activity:nW,pageVisible:ty}),[tt,nW,ty]),nH=(0,Z.useCallback)(async()=>{if(nM.current)return nM.current;let e=(async()=>{try{let e=(await nA(nF)).entries||[];t_(e),tN(e.map(e=>({pm2:e.pm2,script:e.script,label:e.label}))),tv(Date.now()),tz(t=>!e.length||t&&e.some(e=>e.pm2===t)?t:e[0].pm2)}catch(e){}finally{nM.current=null}})();return nM.current=e,e},[nA,nF]);(0,Z.useEffect)(()=>{tn(function(){let e=new URLSearchParams(window.location.search).get("view");return e&&ne.includes(e)?e:"/youtube-events"===window.location.pathname.replace(/\/$/,"")||"/youtube-relay-log"===window.location.pathname.replace(/\/$/,"")?"live_youtube":"dashboard"}()),tl(!0);let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&e9(e);let t=window.localStorage.getItem("live-hub-theme");("light"===t||"dark"===t)&&te(t)},[]),(0,Z.useEffect)(()=>{if(!ts)return;let e=new URL(window.location.href);"dashboard"===tt?e.searchParams.delete("view"):e.searchParams.set("view",tt),window.history.replaceState(null,"",e.toString())},[tt,ts]),(0,Z.useEffect)(()=>{window.localStorage.setItem("live-hub-lang",e6)},[e6]),(0,Z.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e7);try{window.localStorage.setItem("live-hub-theme",e7)}catch(e){}},[e7]),(0,Z.useEffect)(()=>{let e=()=>tw("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{if(!ti)return;let e=e=>{"Escape"===e.key&&tr(!1)};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[ti]),(0,Z.useEffect)(()=>()=>{null!=nZ.current&&window.clearTimeout(nZ.current)},[]),(0,Z.useEffect)(()=>{try{"0"===localStorage.getItem("livehub.autorefresh")&&tA(!1),"0"===localStorage.getItem("livehub.showStreamProbes")&&tB(!1)}catch(e){}},[]),(0,Z.useEffect)(()=>{if(ts){if("live_youtube"===tt||"live_tiktok"===tt){tm(!1),nO();return}nB()}},[nB,nO,tt,ts]),(0,Z.useEffect)(()=>{ts&&nH()},[nH,ts]),(0,Z.useEffect)(()=>{if(!ts||!tI||!ty||"live_youtube"===tt||"live_tiktok"===tt)return;let e=window.setInterval(()=>{nB()},1e4);return()=>clearInterval(e)},[tI,ty,nB,tt,ts]),(0,Z.useEffect)(()=>{if(!ts||!tI)return;let e=window.setInterval(()=>{nH()},nK);return()=>clearInterval(e)},[tI,nK,nH,ts]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&nH()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[nH]),(0,Z.useEffect)(()=>{nE.current=tS},[tS]),(0,Z.useEffect)(()=>{"settings"===tt&&(async()=>{try{let e=await nA("/hub/config");tU(e)}catch(e){tU(null)}})()},[nA,tt]);let nY=(0,Z.useMemo)(()=>{var e;let t=(null==to?void 0:null===(e=to.stack)||void 0===e?void 0:e.quick_links)||{},n={};for(let[e,s]of Object.entries(t))/^https?:\/\//i.test(s)?n[e]=(0,ep.p)(s):n[e]=s;return n},[null==to?void 0:null===(e=to.stack)||void 0===e?void 0:e.quick_links]),nG=(0,Z.useMemo)(()=>{let e=new Map;for(let t of(null==to?void 0:to.services)||[])e.set(t.service_id,t);return e},[null==to?void 0:to.services]),nq=(0,Z.useMemo)(()=>["homeassistant","frigate","ntfy","wol"].map(e=>nG.get(e)).filter(Boolean),[nG]),nJ=(null==nR?void 0:nR.playbooks)||[],nV=nG.get("wol"),n$=(0,Z.useMemo)(()=>(0,ta.O0)(nY),[nY]),nX=(0,Z.useMemo)(()=>(0,ta.Tc)(n$),[n$]),nQ=(0,Z.useMemo)(()=>((null==tq?void 0:tq.interfaces)||[]).flatMap(e=>e.peers||[]),[null==tq?void 0:tq.interfaces]),n0=(0,Z.useMemo)(()=>((null==tq?void 0:tq.interfaces)||[]).flatMap(e=>e.configured_peers||[]),[null==tq?void 0:tq.interfaces]),n1=(0,Z.useMemo)(()=>((null==tq?void 0:tq.repo_configs)||[]).flatMap(e=>e.peers||[]).map(e=>({...e,status_source:"config",config_source:"repo"})),[null==tq?void 0:tq.repo_configs]),n5=nQ[0]||n0[0]||n1[0]||null,n2=(0,Z.useMemo)(()=>{for(let e of[...nQ,...n0,...n1]){let t=e.endpoint_host||function(e){let t=(e||"").trim();if(!t)return"";if(t.startsWith("[")){let e=t.indexOf("]");return e>0?t.slice(1,e):""}let n=t.lastIndexOf(":");return n>0?t.slice(0,n):t}(e.endpoint);if(t)return t}return""},[n0,n1,nQ]),n3=(null==tY?void 0:null===(t=tY.windows_route_template)||void 0===t?void 0:t.endpoint_host)||(null==tY?void 0:null===(R=tY.peers)||void 0===R?void 0:null===(n=R.find(e=>e.endpoint_host))||void 0===n?void 0:n.endpoint_host)||n2||"",n4=(0,Z.useMemo)(()=>{if(!n3)return"";let e=t3.trim()||"",t=t6.trim()||"";return"route -p add ".concat(n3," mask 255.255.255.255 ").concat(e," metric 1 if ").concat(t)},[n3,t3,t6]),n6=(0,Z.useCallback)(async()=>{try{var e;let t=await nA("/hub/network/wireguard/status");tJ(null!==(e=t.wireguard)&&void 0!==e?e:null)}catch(e){tJ(null)}},[nA]),n8=(0,Z.useCallback)(async()=>{tQ(!0);try{let e=await nA("/hub/network/system_probe");t$(null!=e?e:null)}catch(e){t$(null)}finally{tQ(!1)}},[nA]);(0,Z.useEffect)(()=>{"network"===tt&&(n6(),n8())},[n8,n6,tt]);let n9=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=tK.trim();if(!t){nI(nD("请先选择或粘贴 WireGuard 配置","Pick or paste a WireGuard config first"));return}th(e?"wg:apply":"wg:save");try{var n;let s=await nA("/hub/network/wireguard/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:tF,content:t,route_mode:t5,apply:e})});tG(null!==(n=s.wireguard)&&void 0!==n?n:null),await n6(),nI(e?nD("WireGuard 配置已保存并应用","WireGuard config saved and applied"):nD("WireGuard 配置已保存","WireGuard config saved"))}catch(e){nI(e.message)}finally{th(null)}},n7=async e=>{th("wg:neko:".concat(e));try{await nA("/hub/network/wireguard/neko_access",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,restart:!0})}),await n6(),await nB(),nI("remote"===e?"Neko switched to WireGuard remote access":"Neko switched back to LAN")}catch(e){nI(e.message),await n6()}finally{th(null)}},se=async e=>{th("neko:proxy:".concat(e?"on":"off"));try{await nA("/hub/network/neko_browser_proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e,restart:!0})}),await n6(),await nB(),nI(e?nD("已开启 Neko 浏览器代理","Neko browser proxy enabled"):nD("已关闭 Neko 浏览器代理","Neko browser proxy disabled"))}catch(e){nI(e.message),await n6()}finally{th(null)}},st=async()=>{await n9(!1)},sn=async e=>{let t=(e||"").trim();if(t){th("wg:load:".concat(t));try{var n;let e=await nA("/hub/network/wireguard/config/".concat(encodeURIComponent(t)));tW(e.name||t),tH(e.content||""),tG(null!==(n=e.wireguard)&&void 0!==n?n:null),t1(!0),nI(nD("已载入 WireGuard 配置","WireGuard config loaded"))}catch(e){nI(e.message)}finally{th(null)}}},ss=async e=>{if(e)try{let t=await e.text();tH(t),tF.trim()||tW(e.name.replace(/\.conf$/i,""))}catch(e){nI(e.message)}},sl=async(e,t)=>{th("svc:".concat(e));try{let n=await nA("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});"error"===n.status?nI(n.detail||n.message||nD("操作失败","Action failed")):nI(n.message||"OK"),await nB()}catch(e){nI(e.message)}finally{th(null)}},si=async()=>{let e=t7.trim(),t=nr.trim()||"255.255.255.255",n=Number(nc.trim()||"9");if(!e){nI(nD("请输入 MAC 地址","Enter a MAC address"));return}if(!Number.isInteger(n)||n<1||n>65535){nI(nD("端口必须在 1-65535 之间","Port must be 1-65535"));return}th("wol:wake");try{let s=await nA("/studio/wol/wake",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e,broadcast:t,port:n})});nI(s.message||nD("唤醒包已发送","Wake packet sent"))}catch(e){nI(e.message)}finally{th(null)}},sa=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await nA(e?"/studio/wol/devices/probe":"/studio/wol/devices",e?{method:"POST"}:void 0);nx(t.devices||[])}catch(t){e&&nI(t.message)}},[nA,nI]),sr=async()=>{let e=t7.trim();if(!e){nI(nD("请输入 MAC 地址","Enter a MAC address"));return}th("wol:save");try{var t;let n=await nA("/studio/wol/devices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:nh,mac:e,ip:nb})});nx(n.devices||[]),np((null===(t=n.device)||void 0===t?void 0:t.mac)||e),nI(n.message||nD("设备已保存","Device saved"))}catch(e){nI(e.message)}finally{th(null)}},so=async()=>{let e=(nm||t7).trim();if(e){th("wol:delete");try{let t=await nA("/studio/wol/devices/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e})});nx(t.devices||[]),np(""),na(""),ng(""),nf(""),nI(nD("设备已删除","Device removed"))}catch(e){nI(e.message)}finally{th(null)}}},sc=(0,Z.useCallback)(async()=>{try{let e=(await nA("/studio/serial/ports")).ports||[];ny(e),nj(t=>{var n;return t&&e.some(e=>e.path===t)?t:(null===(n=e[0])||void 0===n?void 0:n.path)||t})}catch(e){ny([])}},[nA]),sd=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await nA("/studio/ops/summary".concat(e?"?refresh=1":""));nL(t)}catch(t){e&&nI(t.message)}},[nA,nI]),su=async()=>{th("studio:snapshot");try{let e=await nA("/studio/ops/snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"studio"})});await sd(!1),nI(e.message||nD("系统快照已创建","System snapshot created"))}catch(e){nI(e.message)}finally{th(null)}},sx=async e=>{let t=(e||"").trim();if(t){th("studio:playbook:".concat(t));try{var n;let e=await nA("/studio/ops/playbook",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({playbook_id:t})});e.summary?nL(e.summary):await sd(!1),await nB();let s=null!==(n=e.failed)&&void 0!==n?n:(e.actions||[]).filter(e=>"error"===e.status).length;nI(e.message||(s?nD("场景执行完成,但存在失败步骤","Playbook completed with failed steps"):nD("场景执行完成","Playbook completed")))}catch(e){nI(e.message)}finally{th(null)}}};(0,Z.useEffect)(()=>{if("studio"!==tt)return;sa(!0),sd(!0);let e=window.setInterval(()=>{sa(!0),sd(!1)},3e4);return()=>window.clearInterval(e)},[sc,sd,sa,tt]);let sm=async(e,t)=>{let n=(null!=t?t:tS).trim();if(n){th("proc:".concat(e,":").concat(n));try{let t=await nA("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:n})});nI(String(t.output||t.message||"OK")),await nH(),"live_youtube"===tt||"live_tiktok"===tt?nB():await nB()}catch(e){nI(e.message)}finally{th(null)}}},sp=async(e,t)=>{let n=(null!=t?t:tS).trim();if(!n)throw nI(nD("请选择要保存地址的进程","Pick a process before saving URLs")),Error(nD("请选择要保存地址的进程","Pick a process before saving URLs"));let s=null!=e?e:tC,l=++nU.current;th("save:url");try{let e=new URLSearchParams({process:n}),t=await nA("/save_url_config?".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})});l===nU.current&&n===nE.current.trim()&&tR(s),nI(t.path?nD("URL 配置已保存: ".concat(t.path),"URL config saved: ".concat(t.path)):nD("URL 配置已保存","URL config saved"))}catch(e){throw nI(e.message),e}finally{th(null)}},sh=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!tT){nI(nD("请选择设备","Pick a device"));return}th("adb:".concat(e));try{let n=await nA("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:tT,payload:t})});nI(n.message||"OK")}catch(e){nI(e.message)}finally{th(null)}},sg=[{id:"dashboard",icon:a.Z,labelZh:"总览",labelEn:"Dashboard"},{id:"services",icon:r.Z,labelZh:"服务",labelEn:"Services"},{id:"live_youtube",icon:o.Z,labelZh:"YouTube 无人直播",labelEn:"YouTube unmanned"},{id:"live_tiktok",icon:c.Z,labelZh:"TikTok 无人直播",labelEn:"TikTok unmanned"},{id:"android",icon:d.Z,labelZh:"安卓",labelEn:"Android"},{id:"studio",icon:u.Z,labelZh:"工作室",labelEn:"Studio"},{id:"network",icon:x.Z,labelZh:"网络",labelEn:"Network"},{id:"settings",icon:m.Z,labelZh:"设置",labelEn:"Settings"}],sb=e=>{(async()=>{var t;if(null===(t=navigator.clipboard)||void 0===t?void 0:t.writeText){await navigator.clipboard.writeText(e);return}let n=document.createElement("textarea");n.value=e,n.readOnly=!0,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove()})().then(()=>nI(nD("已复制","Copied")),()=>nI(nD("复制失败","Copy failed")))},sf=tf?new Date(tf).toLocaleTimeString("zh"===e6?"zh-CN":"en-US",{hour12:!1}):nD("未同步","Not synced"),sv=ty?nD("前台自动刷新","Auto refresh"):nD("后台已暂停刷新","Refresh paused in background");return(0,s.jsxs)("div",{className:"lp-root min-h-screen transition-colors duration-300 ".concat("light"===e7?"bg-slate-100 text-slate-900 selection:bg-violet-400/25":"bg-[#050508] text-zinc-100 selection:bg-violet-500/30"),children:[(0,s.jsx)("div",{className:"lp-noise pointer-events-none fixed inset-0 z-0 ".concat("light"===e7?"opacity-[0.06]":"opacity-[0.22]"),"aria-hidden":!0}),(0,s.jsx)("div",{className:"lp-aurora pointer-events-none fixed -left-1/4 top-0 h-[42rem] w-[42rem] rounded-full blur-[120px] ".concat("light"===e7?"bg-violet-400/15":"bg-violet-600/20"),"aria-hidden":!0}),(0,s.jsx)("div",{className:"lp-aurora2 pointer-events-none fixed bottom-0 right-0 h-[36rem] w-[36rem] rounded-full blur-[100px] ".concat("light"===e7?"bg-cyan-400/10":"bg-cyan-500/10"),"aria-hidden":!0}),tg?(0,s.jsx)(l.E.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},role:"status","aria-live":"polite","aria-atomic":"true",className:"fixed bottom-6 left-1/2 z-[100] max-w-md -translate-x-1/2 rounded-2xl border border-white/10 bg-zinc-950/95 px-5 py-3 text-center text-sm text-zinc-100 shadow-2xl shadow-black/50 backdrop-blur-xl",children:tg}):null,(0,s.jsxs)("div",{className:"relative z-10 flex min-h-screen",children:[(0,s.jsxs)("aside",{className:"hidden w-64 shrink-0 flex-col border-r px-4 py-6 backdrop-blur-2xl lg:flex ".concat("light"===e7?"border-slate-200/90 bg-white/70":"border-white/[0.06] bg-zinc-950/40"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500 to-cyan-400 shadow-lg shadow-violet-500/25",children:(0,s.jsx)(p.Z,{className:"h-4 w-4 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-[0.2em] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:"live.local"}),(0,s.jsx)("p",{className:"text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("无人直播系统","Unmanned Live System")})]})]}),(0,s.jsx)("nav",{className:"mt-10 flex flex-1 flex-col gap-1",children:sg.map(e=>{let t=e.icon,n=tt===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>tn(e.id),"aria-current":n?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm font-medium transition ".concat("light"===e7?n?"bg-violet-100/90 text-slate-900 shadow-inner shadow-violet-200/50":"text-slate-600 hover:bg-slate-200/60 hover:text-slate-900":n?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-200"),children:[(0,s.jsx)(t,{className:"h-4 w-4 ".concat("light"===e7?n?"text-violet-600":"text-slate-400":n?"text-violet-300":"text-zinc-600")}),nD(e.labelZh,e.labelEn),n?(0,s.jsx)(h.Z,{className:"ml-auto h-4 w-4 ".concat("light"===e7?"text-slate-400":"text-zinc-600")}):null]},e.id)})})]}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,s.jsxs)("header",{className:"sticky top-0 z-20 flex items-center justify-between gap-3 border-b px-4 py-3 backdrop-blur-xl lg:px-8 ".concat("light"===e7?"border-slate-200/80 bg-white/75 text-slate-900":"border-white/[0.06] bg-zinc-950/70 text-white"),children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("button",{type:"button",className:"rounded-xl border p-2 lg:hidden ".concat("light"===e7?"border-slate-200 bg-white/80":"border-white/10 bg-white/5"),onClick:()=>tr(!0),"aria-label":"Menu",children:(0,s.jsx)(g.Z,{className:"h-5 w-5"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"truncate text-lg font-semibold tracking-tight lg:text-xl ".concat("light"===e7?"text-slate-900":"text-white"),children:nD((null===(I=sg.find(e=>e.id===tt))||void 0===I?void 0:I.labelZh)||"",(null===(A=sg.find(e=>e.id===tt))||void 0===A?void 0:A.labelEn)||"")}),(0,s.jsxs)("p",{className:"truncate text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[(null==to?void 0:null===(O=to.stack)||void 0===O?void 0:O.mdns_host)||"live.local"," \xb7"," ","dark"===e7?nD("夜间","Dark mode"):nD("日间","Light mode")," \xb7 ",sv," \xb7"," ",nD("最后同步","Last sync")," ",sf]})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>te(e=>"dark"===e?"light":"dark"),className:"rounded-xl border p-2 transition ".concat("light"===e7?"border-slate-200 bg-white text-amber-500 shadow-sm":"border-white/10 bg-white/[0.06] text-violet-200"),title:"dark"===e7?nD("切换到日间","Switch to light"):nD("切换到夜间","Switch to dark"),"aria-label":"dark"===e7?nD("日间模式","Light mode"):nD("夜间模式","Dark mode"),"aria-pressed":"light"===e7,children:"dark"===e7?(0,s.jsx)(b.Z,{className:"h-5 w-5",strokeWidth:2}):(0,s.jsx)(f.Z,{className:"h-5 w-5",strokeWidth:2})}),(0,s.jsxs)("button",{type:"button",onClick:()=>e9(e=>"zh"===e?"en":"zh"),className:"relative rounded-xl border p-2 transition ".concat("light"===e7?"border-slate-200 bg-white text-cyan-600 shadow-sm":"border-white/10 bg-white/[0.06] text-cyan-200"),title:"zh"===e6?"English":"中文","aria-label":nD("切换语言","Toggle language"),"aria-pressed":"en"===e6,children:[(0,s.jsx)(v.Z,{className:"h-5 w-5",strokeWidth:2}),(0,s.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 min-w-[1rem] items-center justify-center rounded px-0.5 text-[9px] font-bold leading-none ".concat("light"===e7?"bg-cyan-100 text-cyan-800":"bg-cyan-500/30 text-cyan-100"),children:"zh"===e6?"中":"A"})]}),(0,s.jsxs)("button",{type:"button",disabled:!!tp,onClick:()=>void Promise.all([nB(),nH()]),className:"flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-medium transition disabled:opacity-40 ".concat("light"===e7?"border-slate-200 bg-white text-slate-700 hover:bg-slate-50":"border-white/10 bg-white/[0.04] text-zinc-300 hover:bg-white/[0.07]"),children:[tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:nD("刷新","Refresh")})]})]})]}),(0,s.jsx)("main",{className:"flex-1 px-4 py-6 lg:px-8 lg:py-8",children:(0,s.jsx)(i.M,{mode:"wait",children:(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.28,ease:[.22,1,.36,1]},children:["dashboard"===tt?(0,s.jsx)(e8,{dash:to,deployCheck:tZ,dashErr:td,loading:tx,theme:e7,t:nD,onNavigate:tn,nekoLinks:n$,nekoPortsLabel:nX,showStreamProbes:tO,quickLinks:nY}):null,"services"===tt?(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:[((null==to?void 0:to.services)||[]).map((e,t)=>(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},className:"rounded-2xl border border-white/[0.07] bg-gradient-to-b from-white/[0.05] to-transparent p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500 line-clamp-2",children:e.description})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(nl(e.running?"online":e.status)),children:e.running?nD("运行中","Running"):e.status})]}),e.detail?(0,s.jsx)("p",{className:"mt-2 text-[11px] leading-snug line-clamp-6 ".concat("skipped"===e.status?"text-slate-300/90":"text-amber-200/85"),children:e.detail}):null,"shellcrash"===e.service_id&&e.available&&!e.running?(0,s.jsx)("p",{className:"mt-2 text-[11px] text-zinc-500",children:nD("stopped 为常态:仅当需要透明代理 / 规则分流时再手动点 Start,不建议设置自启。","Stopped is normal; click Start manually only when the proxy is needed. Autostart stays off.")}):null,(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.url?(0,s.jsx)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-3 py-1.5 text-xs font-medium text-violet-200 ring-1 ring-violet-500/25",children:nD("打开面板","Open panel")}):null,(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs font-medium text-emerald-200 ring-1 ring-emerald-500/30 disabled:opacity-30",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"install"),className:"rounded-lg bg-sky-500/15 px-3 py-1.5 text-xs font-medium text-sky-200 ring-1 ring-sky-500/25 disabled:opacity-30",children:"Install"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-1.5 text-xs font-medium text-amber-200 ring-1 ring-amber-500/25 disabled:opacity-30",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"upgrade"),className:"rounded-lg bg-indigo-500/15 px-3 py-1.5 text-xs font-medium text-indigo-200 ring-1 ring-indigo-500/25 disabled:opacity-30",children:"Upgrade"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-1.5 text-xs font-medium text-rose-200 ring-1 ring-rose-500/25 disabled:opacity-30",children:"Stop"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"uninstall"),className:"rounded-lg bg-zinc-500/15 px-3 py-1.5 text-xs font-medium text-zinc-200 ring-1 ring-zinc-500/25 disabled:opacity-30",children:"Uninstall"})]})]},e.service_id)),(null==to?void 0:null===(B=to.services)||void 0===B?void 0:B.length)?null:(0,s.jsx)("p",{className:"text-sm text-zinc-500",children:nD("暂无服务数据","No services")})]}):null,"live_youtube"===tt?(0,s.jsx)(t9,{t:nD,busy:tp,entries:tj,currentProc:tS,setCurrentProc:tz,urlConfig:tC,setUrlConfig:tR,onRunProcess:(e,t)=>void sm(e,t),onSaveUrlConfig:(e,t)=>sp(e,t),fetchJson:nA,liveProcesses:tk.length?tk:null!==(eG=null==to?void 0:null===(F=to.live)||void 0===F?void 0:F.processes)&&void 0!==eG?eG:[],notify:nI,quickLinks:nY,onRefresh:()=>void Promise.all([nB(),nH()]),onNavigate:e=>tn(e)}):null,"live_tiktok"===tt?(0,s.jsx)(eY,{t:nD,busy:!!tp,entries:tj,currentProc:tS,setCurrentProc:tz,urlConfig:tC,setUrlConfig:tR,onRunProcess:e=>void sm(e),onSaveUrlConfig:e=>sp(e),onReplayGoLive:async(e,t)=>{let n=t.replace(/[,,|]/g,"_");await sp("原画,".concat(e,",主播: ").concat(n)),await sm("start")},onCopy:sb,fetchJson:nA,apiPrefix:e4,quickLinks:nY,hdmiStatus:null==to?void 0:to.hdmi,notify:nI,onNavigate:e=>tn(e)}):null,"android"===tt?(0,s.jsx)(ed,{t:nD,notify:nI,fetchJson:nA,apiBase:e4,busy:tp,androidSerial:tT,setAndroidSerial:tM,devices:(null==to?void 0:null===(W=to.android)||void 0===W?void 0:W.devices)||[],adbAvailable:!!(null==to?void 0:null===(K=to.android)||void 0===K?void 0:K.adb_available),apkPath:tL,setApkPath:tP,onAndroidAction:(e,t)=>sh(e,null!=t?t:{}),onCopy:sb,onRefreshDevices:()=>void nB()}):null,"studio"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-7xl space-y-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(u.Z,{className:"h-5 w-5 ".concat("light"===e7?"text-emerald-700":"text-emerald-300")}),nD("工作室","Studio")]}),(0,s.jsx)("p",{className:"mt-1 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Home Assistant / Frigate / WOL"})]}),(0,s.jsxs)("span",{className:"w-fit rounded-full px-3 py-1 text-[11px] font-semibold ".concat("light"===e7?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200":"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25"),children:[nq.filter(e=>null==e?void 0:e.running).length,"/",nq.length||4," online"]})]}),(0,s.jsx)("div",{className:"grid gap-3 lg:grid-cols-2 xl:grid-cols-3",children:nJ.map(e=>{var t,n;let i=e.id||"",a=tp==="studio:playbook:".concat(i),r=e.dependencies||(e.services||[]).map(e=>{let t=nG.get(e);return{service_id:e,label:(null==t?void 0:t.label)||e,running:!!(null==t?void 0:t.running),available:(null==t?void 0:t.available)!==!1,status:(null==t?void 0:t.status)||"unknown",detail:(null==t?void 0:t.detail)||""}}),c=null!==(t=e.required_count)&&void 0!==t?t:r.length,d=null!==(n=e.running_count)&&void 0!==n?n:r.filter(e=>e.running).length;return(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-sky-200/80 bg-white shadow-sky-100/40":"border-sky-400/15 bg-zinc-950/55 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-sky-700":"text-sky-300")}),(0,s.jsx)("span",{className:"line-clamp-1",children:e.title||i})]}),(0,s.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:e.description||e.category||"Playbook"})]}),(0,s.jsxs)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(nl(e.status||"ready")),children:[d,"/",c||0]})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-1.5",children:r.map(e=>{let t=e.service_id||"";return(0,s.jsxs)("span",{className:"rounded-full px-2 py-1 text-[10px] font-semibold ".concat(e.running?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":!1===e.available?"bg-rose-500/15 text-rose-200 ring-1 ring-rose-400/25":"light"===e7?"bg-slate-100 text-slate-700 ring-1 ring-slate-200":"bg-white/5 text-zinc-300 ring-1 ring-white/10"),children:[t||e.label||"service",":",e.running?"on":!1===e.available?"off":e.status||"idle"]},t)})}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:(e.actions||[]).slice(0,4).map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border px-3 py-2 text-[11px] ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:[(0,s.jsx)("span",{className:"min-w-0 truncate",children:e.label||e.service||"service"}),(0,s.jsx)("span",{className:"shrink-0 font-mono uppercase",children:e.action||"run"})]},"".concat(e.service||"service",":").concat(e.action||"action",":").concat(t)))}),(0,s.jsxs)("button",{type:"button",disabled:!!tp||!i,onClick:()=>void sx(i),className:"mt-5 inline-flex w-full items-center justify-center gap-2 rounded-lg bg-sky-500/18 px-3 py-2.5 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/30 transition hover:bg-sky-500/28 disabled:opacity-40",children:[a?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5"}),nD("鎵ц鍦烘櫙","Run playbook")]})]},i||e.title)})}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[[{id:"homeassistant",label:"Home Assistant",icon:u.Z,fallbackUrl:nY.homeassistant,iconClass:"light"===e7?"text-emerald-700":"text-emerald-300",openClass:"light"===e7?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200 hover:bg-emerald-100":"bg-emerald-500/15 text-emerald-100 ring-1 ring-emerald-400/25 hover:bg-emerald-500/25"},{id:"frigate",label:"Frigate NVR",icon:N.Z,fallbackUrl:nY.frigate,iconClass:"light"===e7?"text-cyan-700":"text-cyan-300",openClass:"light"===e7?"bg-cyan-50 text-cyan-800 ring-1 ring-cyan-200 hover:bg-cyan-100":"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-400/25 hover:bg-cyan-500/25"},{id:"ntfy",label:"ntfy",icon:k.Z,fallbackUrl:nY.ntfy,iconClass:"light"===e7?"text-violet-700":"text-violet-300",openClass:"light"===e7?"bg-violet-50 text-violet-800 ring-1 ring-violet-200 hover:bg-violet-100":"bg-violet-500/15 text-violet-100 ring-1 ring-violet-400/25 hover:bg-violet-500/25"}].map(e=>{let t=nG.get(e.id),n=e.icon,i=(null==t?void 0:t.url)||e.fallbackUrl||"",a=!!tp||(null==t?void 0:t.available)===!1;return(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(n,{className:"h-4 w-4 ".concat(e.iconClass)}),e.label]}),(0,s.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null==t?void 0:t.description)||("frigate"===e.id?"Camera NVR and detection console":"Local automation workspace")})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(nl((null==t?void 0:t.running)?"online":(null==t?void 0:t.status)||"unknown")),children:(null==t?void 0:t.running)?nD("运行中","Running"):(null==t?void 0:t.status)||"unknown"})]}),(null==t?void 0:t.detail)?(0,s.jsx)("p",{className:"mt-3 line-clamp-4 font-mono text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:t.detail}):null,(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[i?(0,s.jsxs)("a",{href:(0,ep.p)(i),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold transition ".concat(e.openClass),children:[(0,s.jsx)(_.Z,{className:"h-3.5 w-3.5"}),nD("打开","Open")]}):null,(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"start"),className:"rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-2 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/25 transition hover:bg-amber-500/25 disabled:opacity-40",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:"Stop"})]})]},e.id)}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(S.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-amber-700":"text-amber-300")}),nD("WOL 网络唤醒","WOL Network Wake")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null==nV?void 0:nV.detail)||"broadcast=255.255.255.255;port=9"})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(nl((null==nV?void 0:nV.status)||"ready")),children:(null==nV?void 0:nV.status)||"ready"})]}),(0,s.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("select",{value:nm,onChange:e=>{let t=e.target.value;np(t);let n=nu.find(e=>e.mac===t);n&&(na(n.mac),ng(n.name||""),nf(n.ip||""))},className:"min-w-0 flex-1 rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100"),children:[(0,s.jsx)("option",{value:"",children:nD("选择设备","Select device")}),nu.map(e=>(0,s.jsx)("option",{value:e.mac,children:(e.name||e.ip||e.mac)+(e.reachable?" \xb7 online":"")},e.mac))]}),(0,s.jsx)("button",{type:"button",disabled:"wol:probe"===tp,onClick:()=>{th("wol:probe"),sa(!0).finally(()=>th(null))},className:"inline-flex items-center justify-center rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/25 transition hover:bg-cyan-500/25 disabled:opacity-40",children:(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("wol:probe"===tp?"animate-spin":"")})})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("名称","Name")}),(0,s.jsx)("input",{value:nh,onChange:e=>ng(e.target.value),placeholder:"NAS / PC",className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"IP"}),(0,s.jsx)("input",{value:nb,onChange:e=>nf(e.target.value),placeholder:"10.0.0.10",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"MAC"}),(0,s.jsx)("input",{value:t7,onChange:e=>na(e.target.value),placeholder:"AA:BB:CC:DD:EE:FF",autoCapitalize:"characters",spellCheck:!1,className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Broadcast"}),(0,s.jsx)("input",{value:nr,onChange:e=>no(e.target.value),placeholder:"255.255.255.255",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Port"}),(0,s.jsx)("input",{value:nc,onChange:e=>nd(e.target.value),inputMode:"numeric",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,s.jsxs)("button",{type:"button",disabled:"wol:wake"===tp||(null==nV?void 0:nV.available)===!1,onClick:()=>void si(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500/18 px-3 py-2.5 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/30 transition hover:bg-amber-500/28 disabled:opacity-40",children:["wol:wake"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(S.Z,{className:"h-3.5 w-3.5"}),nD("唤醒","Wake")]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:"wol:save"===tp,onClick:()=>void sr(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wol:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(z.Z,{className:"h-3.5 w-3.5"}),nD("保存","Save")]}),(0,s.jsxs)("button",{type:"button",disabled:"wol:delete"===tp||!(nm||t7),onClick:()=>void so(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:["wol:delete"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),nD("删除","Delete")]})]})]})]})]}),null,(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(L.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-emerald-700":"text-emerald-300")}),"System Doctor"]}),(0,s.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[null!==(eq=null==nR?void 0:null===(H=nR.doctor)||void 0===H?void 0:H.services_running)&&void 0!==eq?eq:0,"/",null!==(eJ=null==nR?void 0:null===(Y=nR.doctor)||void 0===Y?void 0:Y.services_available)&&void 0!==eJ?eJ:0," services"]})]}),(0,s.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(nl((null==nR?void 0:null===(G=nR.doctor)||void 0===G?void 0:G.status)||"unknown")),children:[null!==(eV=null==nR?void 0:null===(q=nR.doctor)||void 0===q?void 0:q.score)&&void 0!==eV?eV:0,"/100"]})]}),(0,s.jsxs)("div",{className:"mt-4 space-y-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[(0,s.jsxs)("p",{children:[nD("严重","Critical"),": ",null!==(e$=null==nR?void 0:null===(J=nR.doctor)||void 0===J?void 0:J.critical)&&void 0!==e$?e$:0," / ",nD("警告","Warnings"),": ",null!==(eX=null==nR?void 0:null===($=nR.doctor)||void 0===$?void 0:$.warnings)&&void 0!==eX?eX:0]}),((null==nR?void 0:null===(X=nR.doctor)||void 0===X?void 0:X.recommendations)||[]).slice(0,2).map(e=>(0,s.jsxs)("p",{className:"line-clamp-2",children:["- ",e]},e))]})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(P.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-cyan-700":"text-cyan-300")}),nD("设备资产","Device inventory")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"LAN / USB"})]}),(0,s.jsx)("button",{type:"button",disabled:"studio:ops"===tp,onClick:()=>{th("studio:ops"),sd(!0).finally(()=>th(null))},className:"inline-flex items-center justify-center rounded-lg px-2.5 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("studio:ops"===tp?"animate-spin":"")})})]}),(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 text-center text-xs",children:[["WOL",null!==(eQ=null==nR?void 0:null===(ee=nR.inventory)||void 0===ee?void 0:null===(Q=ee.counts)||void 0===Q?void 0:Q.wol)&&void 0!==eQ?eQ:0],["Video",null!==(e0=null==nR?void 0:null===(en=nR.inventory)||void 0===en?void 0:null===(et=en.counts)||void 0===et?void 0:et.video)&&void 0!==e0?e0:0]].map(e=>{let[t,n]=e;return(0,s.jsxs)("div",{className:"rounded-lg border px-2 py-2 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:n}),(0,s.jsx)("p",{className:"light"===e7?"text-slate-500":"text-zinc-500",children:t})]},t)})})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(p.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-amber-700":"text-amber-300")}),nD("自动化配方","Automation recipes")]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:((null==nR?void 0:nR.recipes)||[]).slice(0,3).map(e=>(0,s.jsx)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"line-clamp-1 font-semibold",children:e.title}),(0,s.jsx)("span",{className:"ready"===e.status?"text-emerald-400":"text-amber-300",children:e.status})]})},e.id||e.title))})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(r.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-violet-700":"text-violet-300")}),nD("备份快照","Backup snapshots")]}),(0,s.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[((null==nR?void 0:null===(es=nR.backups)||void 0===es?void 0:es.snapshots)||[]).length," snapshots"]})]}),(0,s.jsxs)("button",{type:"button",disabled:"studio:snapshot"===tp,onClick:()=>void su(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-violet-500/15 px-3 py-2 text-xs font-semibold text-violet-100 ring-1 ring-violet-400/25 transition hover:bg-violet-500/25 disabled:opacity-40",children:["studio:snapshot"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("创建","Create")]})]}),(0,s.jsx)("p",{className:"mt-4 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null===(el=((null==nR?void 0:null===(ei=nR.backups)||void 0===ei?void 0:ei.snapshots)||[])[0])||void 0===el?void 0:el.name)||nD("暂无快照","No snapshots yet")})]})]})]}):null,"network"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[(0,s.jsxs)("div",{className:"rounded-2xl border p-6 shadow-xl ".concat("light"===e7?"border-cyan-200/90 bg-white shadow-cyan-100/50":"border-cyan-500/20 bg-zinc-950/55 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(L.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-cyan-700":"text-cyan-300")}),"WireGuard VPS"]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("导入 VPS wg-quick 配置,保存到受管配置目录,并生成 Windows 端点旁路路由命令。","Import a VPS wg-quick config, save it under managed config, and generate the Windows endpoint bypass route.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ".concat((null==tq?void 0:tq.active)?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":"bg-amber-500/15 text-amber-200 ring-1 ring-amber-400/25"),children:[ni(null==tq?void 0:null===(ea=tq.quality)||void 0===ea?void 0:ea.status,nD),"number"==typeof(null==tq?void 0:null===(er=tq.quality)||void 0===er?void 0:er.score)?" \xb7 ".concat(tq.quality.score,"/100"):""]}),(null==tY?void 0:tY.relative_path)?(0,s.jsx)("div",{className:"rounded-lg border px-3 py-2 text-[11px] ".concat("light"===e7?"border-cyan-200 bg-cyan-50 text-cyan-900":"border-cyan-400/20 bg-cyan-500/10 text-cyan-100"),children:tY.relative_path}):null,(0,s.jsxs)("button",{onClick:()=>{n6(),n8()},disabled:"wg:status"===tp||tX,className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tX?"animate-spin":"")}),tX?nD("探测中","Probing"):nD("刷新","Refresh")]})]})]}),(0,s.jsxs)("div",{className:"mt-5 grid gap-3 lg:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("当前接口","Active interfaces")}),(0,s.jsxs)("div",{className:"mt-2 rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-cyan-100 bg-white text-slate-700":"border-cyan-400/15 bg-cyan-500/10 text-cyan-100"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:ni(null==tq?void 0:null===(eo=tq.quality)||void 0===eo?void 0:eo.status,nD)}),(0,s.jsx)("span",{className:"font-mono",children:"number"==typeof(null==tq?void 0:null===(ec=tq.quality)||void 0===ec?void 0:ec.score)?"".concat(tq.quality.score,"/100"):"—"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e7?"text-slate-500":"text-cyan-100/75"),children:[nD("新鲜握手","Fresh peers"),": ",null!==(e1=null==tq?void 0:null===(eu=tq.quality)||void 0===eu?void 0:eu.fresh_peer_count)&&void 0!==e1?e1:0,"/",null!==(e5=null==tq?void 0:null===(ex=tq.quality)||void 0===ex?void 0:ex.peer_count)&&void 0!==e5?e5:0," \xb7 ",nD("最佳握手","Best handshake"),": ",ns(null==tq?void 0:null===(em=tq.quality)||void 0===em?void 0:em.best_handshake_age_seconds)]})]}),(0,s.jsx)("div",{className:"mt-2 space-y-2",children:((null==tq?void 0:tq.interfaces)||[]).length?((null==tq?void 0:tq.interfaces)||[]).map(e=>{var t,n,l;return(0,s.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:e.name||"wg"}),(0,s.jsx)("span",{className:(null===(t=e.systemd)||void 0===t?void 0:t.active)==="active"?"text-emerald-400":"text-amber-300",children:(null===(n=e.systemd)||void 0===n?void 0:n.active)||"active"})]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[11px]",children:(e.addresses||[]).join(", ")||"—"}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[e.details_available?nD("运行细节可读","Runtime details readable"):nD("运行细节受限","Runtime details limited"),(null===(l=e.configured_from)||void 0===l?void 0:l.name)?" \xb7 ".concat(nD("配置","Config"),": ").concat(e.configured_from.name):""]})]},e.name||"wg")}):(0,s.jsx)("p",{className:"text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("未发现 wg show 输出","No wg show output")})})]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("对端与流量","Peer and traffic")}),(()=>{var e;let t=(null==n5?void 0:n5.status_source)==="wg"?nD("运行态","Runtime"):(null==n5?void 0:n5.config_source)==="system"?nD("系统配置","System config"):(null==n5?void 0:n5.config_source)==="repo"?nD("受管配置","Managed config"):nD("配置态","Config");return n5?(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Source: ",t]}),(0,s.jsxs)("p",{children:["Endpoint: ",n5.endpoint||"—"]}),(0,s.jsxs)("p",{children:["AllowedIPs: ",(n5.allowed_ips||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["Handshake:"," ","config"===n5.status_source?nD("运行态需 root/CAP_NET_ADMIN","Runtime details need root/CAP_NET_ADMIN"):ns(n5.latest_handshake_age_seconds)]}),(0,s.jsxs)("p",{children:["RX/TX: ",nn(n5.transfer_rx_bytes)," / ",nn(n5.transfer_tx_bytes)]}),(0,s.jsxs)("p",{children:["Keepalive: ",null!==(e=n5.persistent_keepalive)&&void 0!==e?e:"—"]})]}):(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("暂无 peer 数据","No peer data yet")})})(),((null==tq?void 0:tq.endpoint_routes)||[]).length?(0,s.jsx)("div",{className:"mt-3 space-y-1 rounded-lg border px-3 py-2 font-mono text-[10px] ".concat("light"===e7?"border-slate-200 bg-white text-slate-600":"border-white/10 bg-zinc-950/60 text-zinc-400"),children:((null==tq?void 0:tq.endpoint_routes)||[]).slice(0,2).map(e=>(0,s.jsxs)("p",{className:e.uses_wireguard_interface?"text-amber-300":"",children:["route ",e.host||"endpoint",": ",e.route||(e.ok?"ok":"unavailable")]},e.host||e.route||"endpoint-route"))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("Neko 访问模式","Neko access mode")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===e7?"bg-slate-200/70":"bg-black/40"),children:["lan","remote"].map(e=>{var t,n;let l=((null==tq?void 0:null===(t=tq.neko_access)||void 0===t?void 0:t.mode)||"lan")===e,i=(null==tp?void 0:tp.startsWith("wg:neko"))||"remote"===e&&!(null==tq?void 0:null===(n=tq.neko_access)||void 0===n?void 0:n.remote_ready);return(0,s.jsx)("button",{onClick:()=>void n7(e),disabled:i,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(l?"light"===e7?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===e7?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:"lan"===e?nD("局域网","LAN"):nD("远控","Remote")},e)})}),(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["NAT1TO1: ",(null==tq?void 0:null===(eh=tq.neko_access)||void 0===eh?void 0:eh.nat1to1)||"-"]}),(0,s.jsxs)("p",{children:["LAN: ",(null==tq?void 0:null===(eg=tq.neko_access)||void 0===eg?void 0:eg.lan_host)||"-"]}),(0,s.jsxs)("p",{children:["WG: ",(null==tq?void 0:null===(eb=tq.neko_access)||void 0===eb?void 0:eb.wireguard_host)||"-"]}),(0,s.jsxs)("p",{children:["Target: ",(null==tq?void 0:null===(ef=tq.neko_access)||void 0===ef?void 0:ef.target_nat1to1)||"-"]}),(0,s.jsxs)("p",{children:["ShellCrash: ",(null==tq?void 0:null===(ev=tq.shellcrash)||void 0===ev?void 0:ev.running)?"running:".concat((null==tq?void 0:null===(ew=tq.shellcrash)||void 0===ew?void 0:ew.mixed_port)||"7890"):"stopped"]})]}),(0,s.jsxs)("div",{className:"mt-3 rounded-lg border px-3 py-2 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/20"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("Neko 浏览器代理","Neko browser proxy")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===e7?"bg-slate-200/70":"bg-black/40"),children:[!1,!0].map(e=>{var t;let n=!!(null==tq?void 0:null===(t=tq.neko_browser_proxy)||void 0===t?void 0:t.enabled)===e,l=null==tp?void 0:tp.startsWith("neko:proxy");return(0,s.jsx)("button",{onClick:()=>void se(e),disabled:l,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(n?"light"===e7?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===e7?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:e?nD("开启","On"):nD("关闭","Off")},e?"on":"off")})}),(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:[nD("当前","Current"),": ",(null==tq?void 0:null===(ej=tq.neko_browser_proxy)||void 0===ej?void 0:ej.resolved_proxy)||nD("直连","direct")]}),(0,s.jsxs)("p",{children:[nD("节点","Node"),": ",(null==tq?void 0:null===(eN=tq.neko_browser_proxy)||void 0===eN?void 0:eN.shellcrash_node)||"-"," \xb7 :",(null==tq?void 0:null===(ek=tq.neko_browser_proxy)||void 0===ek?void 0:ek.shellcrash_port)||"7894"]}),null==tV||null===(e_=tV.shellcrash_policy)||void 0===e_||!e_.neko_browser_proxy_recommended||(null==tq?void 0:null===(eS=tq.neko_browser_proxy)||void 0===eS?void 0:eS.enabled)||(null==tq?void 0:null===(ez=tq.neko_browser_proxy)||void 0===ez?void 0:ez.manual)?null:(0,s.jsx)("p",{className:"light"===e7?"text-cyan-700":"text-cyan-200",children:nD("直连不可用且 ShellCrash 代理正常,将自动开启浏览器代理","Direct egress failed; ShellCrash proxy is healthy — browser proxy will auto-enable")})]})]}),((null==tq?void 0:null===(eC=tq.neko_access)||void 0===eC?void 0:eC.remote_urls)||[]).length?(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tq?void 0:null===(eR=tq.neko_access)||void 0===eR?void 0:eR.remote_urls)||[]).slice(0,4).map(e=>(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg px-2.5 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e7?"bg-white text-cyan-800 ring-cyan-100 hover:bg-cyan-50":"bg-cyan-500/10 text-cyan-100 ring-cyan-400/20 hover:bg-cyan-500/15"),children:["Neko ",e.id||1," \xb7 ",e.kind||"remote"]},"".concat(e.kind||"remote","-").concat(e.id||0,"-").concat(e.url||"")))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:"Google / Douyin"}),(0,s.jsx)("div",{className:"mt-2 space-y-2",children:["google","youtube","douyin"].map(e=>{let t=((null==tV?void 0:tV.direct)||[]).find(t=>t.target===e),n=!!(null==t?void 0:t.ok),l=!t,i=tX&&l,a=(null==t?void 0:t.label)||("google"===e?"Google":"youtube"===e?"YouTube":"Douyin");return(0,s.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:a}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(i?"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-500/25":l?"bg-zinc-500/15 text-zinc-300 ring-1 ring-zinc-500/25":n?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:[i?(0,s.jsx)(y.Z,{className:"h-3 w-3 animate-spin"}):null,i?nD("探测中","Probing"):l?nD("等待结果","Waiting"):n?"OK":"FAIL"]})]}),(0,s.jsxs)("p",{className:"mt-1 font-mono text-[10px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[(null==t?void 0:t.elapsed_ms)!=null?"".concat(t.elapsed_ms," ms"):i?nD("正在连接 ".concat(a,"..."),"Connecting ".concat(a,"...")):nD("等待探测结果","Waiting for probe result"),(null==t?void 0:t.status)?" \xb7 HTTP ".concat(t.status):""]}),!n&&(null==t?void 0:t.error)?(0,s.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:t.error}):null]},e)})}),(0,s.jsxs)("div",{className:"mt-3 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Mode: ",tX?nD("正在探测直连链路与代理链路","Probing direct/proxy paths"):(null==tV?void 0:tV.mode)||"-"]}),(0,s.jsxs)("p",{children:["ShellCrash: ",(null==tV?void 0:null===(eL=tV.shellcrash)||void 0===eL?void 0:eL.running)?"running:".concat((null==tV?void 0:null===(eP=tV.shellcrash)||void 0===eP?void 0:eP.mixed_port)||"7890"):"manual/stopped"]}),(0,s.jsxs)("p",{children:["Autostart: ",(null==tV?void 0:null===(eT=tV.shellcrash_policy)||void 0===eT?void 0:eT.autostart_on_direct_fail)?"on direct fail":"off"]}),(0,s.jsxs)("p",{children:["Neko attach: ",(null==tV?void 0:null===(eM=tV.shellcrash_policy)||void 0===eM?void 0:eM.attach_neko)||"auto"]}),(0,s.jsxs)("p",{children:["Neko proxy switch: ",(null==tV?void 0:null===(eE=tV.shellcrash_policy)||void 0===eE?void 0:eE.enable_neko_browser_proxy)?"on":"off"]})]}),tX?(0,s.jsxs)("p",{className:"mt-3 inline-flex items-center gap-2 text-xs ".concat("light"===e7?"text-cyan-700":"text-cyan-200"),children:[(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),nD("正在探测 Google / YouTube / Douyin,请等待结果返回。","Probing Google / YouTube / Douyin. Waiting for results.")]}):(null==tV?void 0:tV.summary)?(0,s.jsx)("p",{className:"mt-3 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-500"),children:tV.summary}):null]})]}),(null==tq?void 0:null===(eU=tq.recommendations)||void 0===eU?void 0:eU.length)?(0,s.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e7?"border-amber-200 bg-amber-50 text-amber-800":"border-amber-400/20 bg-amber-500/10 text-amber-100"),children:(tq.recommendations||[]).join(" \xb7 ")}):null,(null==tq?void 0:null===(eD=tq.quality)||void 0===eD?void 0:null===(eZ=eD.reasons)||void 0===eZ?void 0:eZ.length)?(0,s.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-black/25 text-zinc-300"),children:(tq.quality.reasons||[]).slice(0,4).join(" \xb7 ")}):null,(0,s.jsxs)("div",{className:"mt-5 grid gap-4 lg:grid-cols-[minmax(0,1fr)_22rem]",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[14rem_minmax(0,1fr)]",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("配置名","Config name")}),(0,s.jsx)("input",{value:tF,onChange:e=>tW(e.target.value),className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-white text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/30 text-zinc-100 focus:border-cyan-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("配置文件","Config file")}),(0,s.jsx)("input",{type:"file",accept:".conf,.txt,text/plain",onChange:e=>{var t;ss(null===(t=e.target.files)||void 0===t?void 0:t[0])},className:"mt-1 w-full rounded-lg border px-3 py-2 text-xs file:mr-3 file:rounded-md file:border-0 file:px-3 file:py-1.5 file:text-xs file:font-semibold ".concat("light"===e7?"border-slate-200 bg-white text-slate-700 file:bg-cyan-50 file:text-cyan-800":"border-white/10 bg-black/30 text-zinc-300 file:bg-cyan-500/15 file:text-cyan-100")})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border px-3 py-2 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/25"),children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("保存模式","Save mode")}),["overlay","preserve"].map(e=>(0,s.jsx)("button",{onClick:()=>t2(e),className:"rounded-md px-2.5 py-1 text-[11px] font-semibold transition ".concat(t5===e?"bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/30":"light"===e7?"bg-white text-slate-600 ring-1 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-300 ring-1 ring-white/10 hover:bg-white/10"),children:"overlay"===e?nD("组网不接管默认路由","Overlay only"):nD("保留原路由","Preserve routes")},e)),(0,s.jsx)("button",{onClick:()=>t1(e=>!e),className:"ml-auto inline-flex items-center gap-2 rounded-lg px-3 py-1.5 text-xs font-semibold ring-1 transition ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:t0?nD("锁定","Lock"):nD("编辑","Edit")}),(0,s.jsxs)("button",{onClick:()=>void n9(!1),disabled:"wg:save"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-1.5 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("保存","Save")]}),(0,s.jsxs)("button",{onClick:()=>void n9(!0),disabled:"wg:apply"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-1.5 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wg:apply"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5"}),nD("保存并应用","Save & apply")]})]}),(0,s.jsx)("textarea",{value:tK,onChange:e=>tH(e.target.value),readOnly:!t0,spellCheck:!1,placeholder:"[Interface] Address = 10.88.0.6/32 PrivateKey = ... [Peer] Endpoint = 129.204.21.129:51820 AllowedIPs = 10.88.0.0/24",className:"min-h-56 w-full resize-y rounded-xl border p-3 font-mono text-xs leading-relaxed outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/40 text-zinc-100 focus:border-cyan-400/60"," ").concat(t0?"":"opacity-75")}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{onClick:()=>void st(),disabled:"wg:save"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("解析并保存","Parse & save")]}),(null==tY?void 0:tY.redacted_config)?(0,s.jsxs)("button",{onClick:()=>sb(tY.redacted_config||""),className:"inline-flex items-center gap-2 rounded-lg bg-zinc-500/15 px-3 py-2 text-xs font-semibold text-zinc-100 ring-1 ring-white/10 transition hover:bg-zinc-500/25",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),nD("复制脱敏配置","Copy redacted")]}):null]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("解析结果","Parsed config")}),(0,s.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat("light"===e7?"bg-cyan-100 text-cyan-800":"bg-cyan-500/15 text-cyan-200"),children:[null!==(e2=null==tY?void 0:tY.peer_count)&&void 0!==e2?e2:0," peers"]})]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Address: ",((null==tY?void 0:null===(eI=tY.interface)||void 0===eI?void 0:eI.addresses)||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["Endpoint: ",(null==tY?void 0:null===(eO=tY.peers)||void 0===eO?void 0:null===(eA=eO[0])||void 0===eA?void 0:eA.endpoint)||"—"]}),(0,s.jsxs)("p",{children:["AllowedIPs: ",((null==tY?void 0:null===(eF=tY.peers)||void 0===eF?void 0:null===(eB=eF[0])||void 0===eB?void 0:eB.allowed_ips)||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["MTU: ",null!==(e3=null==tY?void 0:null===(eW=tY.interface)||void 0===eW?void 0:eW.mtu)&&void 0!==e3?e3:"—"]})]}),(null==tY?void 0:null===(eK=tY.warnings)||void 0===eK?void 0:eK.length)?(0,s.jsx)("ul",{className:"mt-3 space-y-1 text-[11px] ".concat("light"===e7?"text-amber-700":"text-amber-200"),children:tY.warnings.map(e=>(0,s.jsx)("li",{children:e},e))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("已保存配置","Saved configs")}),(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tq?void 0:tq.repo_configs)||[]).length?((null==tq?void 0:tq.repo_configs)||[]).map(e=>(0,s.jsx)("button",{onClick:()=>void sn(e.name),className:"rounded-lg px-3 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e7?"bg-slate-50 text-slate-700 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-200 ring-white/10 hover:bg-white/10"),children:e.name||e.relative_path},e.name||e.relative_path||"wireguard-config")):(0,s.jsx)("span",{className:"text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("暂无受管配置","No managed configs")})})]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,s.jsxs)("p",{className:"flex items-center gap-2 text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(j.Z,{className:"h-3.5 w-3.5"}),nD("Windows 端点路由","Windows endpoint route")]}),(0,s.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-1",children:[(0,s.jsx)("input",{value:t3,onChange:e=>t4(e.target.value),placeholder:nD("网关,如 192.168.2.1","Gateway, e.g. 192.168.2.1"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")}),(0,s.jsx)("input",{value:t6,onChange:e=>t8(e.target.value),placeholder:nD("接口 ifIndex,如 21","Interface ifIndex, e.g. 21"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")})]}),(0,s.jsx)("code",{className:"mt-3 block break-all rounded-lg border p-3 text-[11px] ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-800":"border-white/10 bg-black/40 text-zinc-200"),children:n4||"route -p add mask 255.255.255.255 metric 1 if "}),(0,s.jsxs)("button",{onClick:()=>sb(n4),disabled:!n4,className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),nD("复制命令","Copy command")]})]})]})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border p-6 ".concat("light"===e7?"border-violet-200/90 bg-gradient-to-br from-violet-50 via-white to-fuchsia-50/80":"border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(E.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-violet-600":"text-violet-300")}),nD("ShellCrash 网络面板","ShellCrash panel")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("透明代理与规则分流直接在本页完成,无需跳转;流媒体与其它系统服务请在「服务」页管理。","Proxy rules and YAML editing are embedded here. Use Services for SRS/Neko/Chromium, etc.")}),(0,s.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:justify-center",children:[{tx:nD("互联网","Internet"),c:"from-cyan-400 to-blue-500"},{tx:"ShellCrash",c:"from-violet-500 to-fuchsia-500"},{tx:nD("本机 / 安卓","Host / Android"),c:"from-emerald-400 to-teal-500"}].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"flex h-16 w-28 items-center justify-center rounded-2xl bg-gradient-to-br ".concat(e.c," text-xs font-bold text-white shadow-lg"),children:e.tx}),t<2?(0,s.jsx)(h.Z,{className:"hidden h-5 w-5 sm:block ".concat("light"===e7?"text-slate-400":"text-zinc-600")}):null]},e.tx))})]}),(0,s.jsx)("div",{className:"overflow-hidden rounded-2xl border shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:(0,s.jsx)("div",{className:"max-h-[min(78vh,56rem)] min-h-[22rem] overflow-y-auto overflow-x-hidden",children:(0,s.jsx)(D.d,{embeddedShellCrash:!0,portalLang:e6})})})]}):null,"settings"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-lg space-y-6",children:[(0,s.jsx)("p",{className:"text-sm ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("常用选项(本机偏好);完整文件与 JSON 编辑见下方链接。","Local preferences; full file/JSON editor via the link below.")}),(0,s.jsxs)("div",{className:"space-y-4 rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-white",children:nD("总览自动刷新","Auto-refresh dashboard")}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:"10s"})]}),(0,s.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tI,onChange:e=>{let t=e.target.checked;tA(t);try{localStorage.setItem("livehub.autorefresh",t?"1":"0")}catch(e){}nI(t?nD("已开启刷新","Auto refresh on"):nD("已暂停刷新","Paused"))}})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4 border-t border-white/[0.06] pt-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-white",children:nD("总览显示 SRS / Neko 探针","Show SRS/Neko probes")}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:nD("关闭可精简首页","Hide stream probe cards")})]}),(0,s.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tO,onChange:e=>{let t=e.target.checked;tB(t);try{localStorage.setItem("livehub.showStreamProbes",t?"1":"0")}catch(e){}}})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/40 p-5",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-500",children:nD("配置快照","Config snapshot")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:String((null==tE?void 0:tE.config_root)||"—")}),(0,s.jsxs)("p",{className:"mt-3 text-sm text-zinc-300",children:[nD("主机名","Hostname"),":"," ",(0,s.jsx)("span",{className:"font-mono text-violet-200",children:(()=>{var e,t,n;let s=null==tE?void 0:tE.system;return(null==s?void 0:null===(t=s.identity)||void 0===t?void 0:null===(e=t.hostname_alias)||void 0===e?void 0:e.trim())||((null==to?void 0:null===(n=to.stack)||void 0===n?void 0:n.mdns_host)||"").replace(/\.local$/i,"")||"—"})()})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:null==tE?void 0:null===(eH=tE.services)||void 0===eH?void 0:eH.slice(0,8).map(e=>(0,s.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-medium ".concat(e.enabled?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-zinc-500/15 text-zinc-400"),children:[e.id," ",e.enabled?"ON":"off"]},e.id))})]}),(0,s.jsxs)("a",{href:"/console?tab=config",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border py-3 text-sm transition ".concat("light"===e7?"border-slate-200 bg-slate-50 text-violet-700 hover:bg-slate-100":"border-white/10 bg-white/[0.05] text-violet-200 hover:bg-white/[0.08]"),children:[nD("完整配置中心(文件 / JSON)","Full config center (files / JSON)"),(0,s.jsx)(_.Z,{className:"h-4 w-4"})]})]}):null]},tt)})})]})]}),(0,s.jsx)(i.M,{children:ti?(0,s.jsx)(l.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>tr(!1),children:(0,s.jsxs)(l.E.aside,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",damping:28,stiffness:320},className:"absolute left-0 top-0 h-full w-[min(88vw,280px)] border-r border-white/10 bg-zinc-950 p-4 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("button",{type:"button",onClick:()=>tr(!1),className:"rounded-lg p-2",children:(0,s.jsx)(U.Z,{className:"h-5 w-5"})})}),(0,s.jsx)("nav",{className:"mt-4 flex flex-col gap-1",children:sg.map(e=>{let t=e.icon,n=tt===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>{tn(e.id),tr(!1)},"aria-current":n?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-3 text-left text-sm transition ".concat(n?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-300 hover:bg-white/[0.04]"),children:[(0,s.jsx)(t,{className:"h-4 w-4 ".concat(n?"text-violet-300":"text-violet-400")}),nD(e.labelZh,e.labelEn)]},e.id)})})]})}):null})]})}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/371-bddad8b92b1ea180.js b/d2ypp2/web-console/out/_next/static/chunks/371-bddad8b92b1ea180.js deleted file mode 100644 index a953390..0000000 --- a/d2ypp2/web-console/out/_next/static/chunks/371-bddad8b92b1ea180.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[371],{3371:function(e,t,n){n.d(t,{Z:function(){return ni}});var s=n(3890),l=n(3925),i=n(9013),a=n(8261),r=n(3802),o=n(2258),c=n(4543),d=n(6837),u=n(5017),x=n(5218),m=n(7165),p=n(7362),h=n(4081),g=n(3745),b=n(5576),f=n(8251),v=n(3215),y=n(9625),w=n(776),j=n(1975),N=n(7951),k=n(7742),_=n(6536),S=n(3031),z=n(7444),C=n(4771),R=n(283),L=n(419),P=n(476),T=n(2471),M=n(891),E=n(2245),U=n(4786),Z=n(8496),D=n(5653),I=n(4136),A=n(6623),O=n(5674),B=n(9535),F=n(3209),W=n(4520),K=n(1503),H=n(3237),Y=n(9588),G=n(7112),q=n(2227),J=n(2555),V=n(7169);class ${reset(){if(this.buf=new Uint8Array(0),this.sps=null,this.pps=null,this.configured=!1,this.configuring=!1,this.ts=0,this.decoder){try{this.decoder.close()}catch(e){}this.decoder=null}}push(e){let t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e)),this.buf=function(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}(this.buf,t),this.drainAvcc()}drainAvcc(){let e=this.buf,t=0;for(;t+4<=e.length;){var n;let s=e[n=t]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3];if(s<=0||s>6291456){this.buf=new Uint8Array(e.subarray(t+1)),t=0;continue}if(t+4+s>e.length)break;let l=e.subarray(t+4,t+4+s);t+=4+s,this.handleNal(l)}t>0&&(this.buf=new Uint8Array(e.subarray(t)))}handleNal(e){if(e.length<2)return;let t=31&e[0];if(7===t?this.sps=new Uint8Array(e):8===t&&(this.pps=new Uint8Array(e)),this.sps&&this.pps&&!this.configured&&!this.configuring&&this.configure(),!this.configured||!this.decoder||1!==t&&5!==t&&7!==t&&8!==t||7===t||8===t)return;let n=new Uint8Array(4+e.length);new DataView(n.buffer).setUint32(0,e.length,!1),n.set(e,4);try{let e=new EncodedVideoChunk({type:5===t?"key":"delta",timestamp:this.ts,data:n});this.ts+=33333,this.decoder.decode(e)}catch(e){this.onDecodeError(e.message||String(e))}}async configure(){if(this.sps&&this.pps&&!this.configured&&!this.configuring){this.configuring=!0;try{let e=function(e,t){let n=e.subarray(1),s=t.subarray(1),l=new Uint8Array(11+n.length+3+s.length),i=0;return l[i++]=1,l[i++]=e[1],l[i++]=e[2],l[i++]=e[3],l[i++]=255,l[i++]=225,l[i++]=n.length>>8&255,l[i++]=255&n.length,l.set(n,i),i+=n.length,l[i++]=1,l[i++]=s.length>>8&255,l[i++]=255&s.length,l.set(s,i),l}(this.sps,this.pps),t=function(e){let t=e=>e.toString(16).padStart(2,"0").toUpperCase();return"avc1.".concat(t(e[1])).concat(t(e[2])).concat(t(e[3]))}(this.sps),n=new VideoDecoder({output:e=>{var t;let n=this.canvas.getContext("2d");if(!n){e.close();return}(this.canvas.width!==e.displayWidth||this.canvas.height!==e.displayHeight)&&(this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight),n.drawImage(e,0,0),e.close(),null===(t=this.onFrame)||void 0===t||t.call(this)},error:e=>this.onDecodeError(String(e.message||e))});await n.configure({codec:t,description:e,optimizeForLatency:!0}),this.decoder=n,this.configured=!0}catch(e){this.onDecodeError(e.message||String(e))}finally{this.configuring=!1}}}constructor(e,t,n){this.canvas=e,this.onDecodeError=t,this.onFrame=n,this.buf=new Uint8Array(0),this.decoder=null,this.configured=!1,this.configuring=!1,this.ts=0,this.sps=null,this.pps=null}}function X(){return"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoFrame}let Q="live-hub-adb-bookmarks-v1";function ee(e,t,n){let s,l,i,a;let r=e.getBoundingClientRect(),o=e.width,c=e.height;if(!o||!c)return null;let d=r.width/r.height,u=o/c;u>d?(s=r.width,l=r.width/u,i=0,a=(r.height-l)/2):(l=r.height,s=r.height*u,i=(r.width-s)/2,a=0);let x=t-r.left-i,m=n-r.top-a;return x<0||m<0||x>s||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}function et(e,t,n){let s,l,i,a;let r=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c)return null;let d=r.width/r.height,u=o/c;u>d?(s=r.width,l=r.width/u,i=0,a=(r.height-l)/2):(l=r.height,s=r.height*u,i=(r.width-s)/2,a=0);let x=t-r.left-i,m=n-r.top-a;return x<0||m<0||x>s||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}let en=[0,280,450,700,1100];function es(e){switch(e){case"usb":return{Icon:B.Z,zh:"USB",en:"USB",cls:"bg-amber-500/20 text-amber-100 ring-amber-500/35"};case"tcp":return{Icon:E.Z,zh:"网络",en:"TCP",cls:"bg-cyan-500/20 text-cyan-100 ring-cyan-500/35"};case"emulator":return{Icon:R.Z,zh:"模拟器",en:"Emu",cls:"bg-fuchsia-500/20 text-fuchsia-100 ring-fuchsia-500/35"};default:return{Icon:d.Z,zh:"?",en:"?",cls:"bg-zinc-600/30 text-zinc-400"}}}let el="https://github.com/Genymobile/scrcpy",ei="https://github.com/viarotel-org/escrcpy";function ea(e,t){let n=t.startsWith("/")?t:"/".concat(t),s=(e||"").trim().replace(/\/$/,"");return s?"".concat(s).concat(n):n}function er(e){var t;let{t:n,apiBase:l,fetchJson:i,serial:a,devices:r,setSerial:o,adbAvailable:c,lock:u,overview:x,onAndroidAction:m,notify:h,onRefreshDevices:g}=e,[b,f]=(0,Z.useState)(0),[v,y]=(0,Z.useState)(450),[j,N]=(0,Z.useState)(!1),[k,_]=(0,Z.useState)(null),[S,z]=(0,Z.useState)(null),[C,R]=(0,Z.useState)(!0),[L,P]=(0,Z.useState)(""),[T,M]=(0,Z.useState)(""),[E,U]=(0,Z.useState)("37777"),[D,I]=(0,Z.useState)(""),[A,O]=(0,Z.useState)(!1),[B,er]=(0,Z.useState)([]),[eo,ec]=(0,Z.useState)(!1),[ed,eu]=(0,Z.useState)(null),[ex,em]=(0,Z.useState)(!1),[ep,eh]=(0,Z.useState)(null),[eg,eb]=(0,Z.useState)(null),[ef,ev]=(0,Z.useState)(!0),ey=(0,Z.useRef)(null),ew=(0,Z.useRef)(null),ej=(0,Z.useRef)(null),eN=(0,Z.useRef)(null),ek=(0,Z.useRef)(null),e_=(0,Z.useRef)(null),eS=(0,Z.useRef)(0),ez=(0,Z.useRef)(!1),eC=(0,Z.useRef)(null),eR=(0,Z.useRef)(!1),eL=null===(t=r.find(e=>e.serial===a))||void 0===t?void 0:t.transport,eP=v>0,eT=a?"".concat(ea(l,"/android/screenshot"),"?serial=").concat(encodeURIComponent(a),"&ts=").concat(b).concat(eP?"&fast=1":""):"",eM=(0,Z.useCallback)(()=>{f(e=>e+1)},[]),eE=(0,Z.useCallback)(()=>{null!=eC.current&&(window.clearTimeout(eC.current),eC.current=null)},[]);(0,Z.useEffect)(()=>{let e=()=>ev("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(Q);if(e){let t=JSON.parse(e);Array.isArray(t)&&er(t.map(String).filter(Boolean).slice(0,24))}}catch(e){}},[]);let eU=e=>{let t=e.trim();if(!t)return;let s=[t,...B.filter(e=>e!==t)].slice(0,16);er(s);try{window.localStorage.setItem(Q,JSON.stringify(s))}catch(e){}h(n("已保存快捷地址","Saved quick address"))};(0,Z.useEffect)(()=>{if(!a||!c){z(null);return}let e=!1;return(async()=>{try{let t=await (0,V.N)("".concat(ea(l,"/android/display_metrics"),"?serial=").concat(encodeURIComponent(a)));if(e)return;"number"==typeof t.width&&"number"==typeof t.height&&z({width:t.width,height:t.height})}catch(e){}})(),()=>{e=!0}},[l,c,a]),(0,Z.useEffect)(()=>{if(!c||!a||v<=0||eo||!ef)return;let e=window.setInterval(()=>f(e=>e+1),v);return()=>clearInterval(e)},[c,v,ef,a,eo]),(0,Z.useEffect)(()=>{ef&&c&&a&&!eo&&eM()},[c,eM,ef,a,eo]),(0,Z.useEffect)(()=>{if(!c){eb(null);return}let e=!1;return(async()=>{try{let t=await (0,V.N)(ea(l,"/android/scrcpy/info"));e||eb(t)}catch(e){}})(),()=>{e=!0}},[l,c]),(0,Z.useEffect)(()=>{eo||eh(null)},[eo]),(0,Z.useEffect)(()=>{eu(null),ez.current=!1},[a]),(0,Z.useEffect)(()=>{let e=r.find(e=>e.serial===a),t=!!(a&&ed===a);if(c&&a&&(null==e?void 0:e.state)==="device"&&(null==eg?void 0:eg.server_jar)&&X()&&!t){ec(!0),y(0);return}if(t||!a||!c||eg&&!eg.server_jar||!X()||e&&"device"!==e.state){ec(!1);return}},[a,r,c,eg,ed]),(0,Z.useEffect)(()=>{if(!eo||!a||!c){var e,t;eE(),ez.current=!0,eR.current=!1,null===(e=eN.current)||void 0===e||e.close(),eN.current=null,null===(t=ek.current)||void 0===t||t.reset(),ek.current=null,em(!1);return}if(!X()){eh(n("当前浏览器不支持 WebCodecs H.264","WebCodecs H.264 not supported in this browser")),ec(!1);return}let s=ej.current;if(!s)return;let i=e=>{var t;eE(),ez.current=!0,null===(t=eN.current)||void 0===t||t.close(),eh(e),ec(!1),y(450),eu(a),window.setTimeout(()=>eM(),120)},r=new $(s,e=>i("".concat(n("实时画面解码失败,已切回截图模式","Live stream decode failed, using screenshot mode"),": ").concat(e)),()=>{eR.current=!0,eE()});ek.current=r,ez.current=!1,eR.current=!1;let o=new WebSocket(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1920,s=(function(e){let t=(e||"").trim();if(t)try{let e=new URL(t,window.location.href),n="https:"===e.protocol?"wss:":"ws:";return"".concat(n,"//").concat(e.host)}catch(e){}let n=void 0!==J&&J.env.NEXT_PUBLIC_API_URL?String(J.env.NEXT_PUBLIC_API_URL).trim():"";if(n)try{let e=new URL(n,window.location.href),t="https:"===e.protocol?"wss:":"ws:";return"".concat(t,"//").concat(e.host)}catch(e){}let s=window.location.port;if("3000"===s||"3001"===s){let e=window.location.hostname||"127.0.0.1";return"ws://".concat(e,":").concat("8001")}let{protocol:l,host:i}=window.location;return"".concat("https:"===l?"wss:":"ws:","//").concat(i)})(e).replace(/\/$/,""),l=new URLSearchParams({serial:t,max_size:String(n)});return"".concat(s,"/android/scrcpy/ws?").concat(l.toString())}(l,a));return eN.current=o,o.binaryType="arraybuffer",o.onopen=()=>{em(!0),eh(null),eE(),eC.current=window.setTimeout(()=>{eR.current||i(n("实时画面无首帧,已切回截图模式","No first live frame, using screenshot mode"))},5200)},o.onmessage=e=>{var t;if("string"==typeof e.data){try{let t=JSON.parse(e.data);t.error&&eh(t.error)}catch(e){}return}null===(t=ek.current)||void 0===t||t.push(e.data)},o.onerror=()=>{eh(n("WebSocket 异常","WebSocket error"))},o.onclose=()=>{var e;em(!1),null===(e=ek.current)||void 0===e||e.reset(),ek.current=null,eE(),eo&&!ez.current&&i(n("实时画面连接失败,已切回截图模式","Live stream failed, using screenshot mode"))},()=>{eE(),ez.current=!0,eR.current=!1,o.close(),eN.current=null,r.reset(),ek.current===r&&(ek.current=null)}},[eo,a,c,l,eM,eE,n]),(0,Z.useEffect)(()=>{a&&c&&(eS.current=0,f(e=>e+1))},[a,c]);let eZ=async()=>{let e=L.trim();if(!e){h(n("填写 host:port","Enter host:port"));return}O(!0);try{let t=await i("/android/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});h(t.message||(t.ok?"OK":n("连接结果见日志","See message"))),g(),eM()}catch(e){h(e.message)}finally{O(!1)}},eD=async e=>{O(!0);try{let t=await i("/android/disconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});h(t.message||"OK"),g()}catch(e){h(e.message)}finally{O(!1)}},eI=async()=>{let e=T.trim(),t=parseInt(E,10)||37777,s=D.trim();if(!e||!s){h(n("填写配对 IP 与码","Host + code required"));return}O(!0);try{let l=await i("/android/pair",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:e,port:t,code:s})});h(l.message||(l.ok?n("配对成功后再点连接","Paired — now Connect"):"pair"))}catch(e){h(e.message)}finally{O(!1)}},eA=async e=>{if(!C||u||!c||!a)return;let t=ew.current;if(!t)return;let s=et(t,e.clientX,e.clientY);if(!s)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-s.x)&&28>Math.abs(i.y-s.y)?(ey.current=null,await m("double_tap",{x:s.x,y:s.y}),h(n("双击","Double tap"))):(ey.current={t:l,x:s.x,y:s.y},await m("tap",{x:s.x,y:s.y})),eM()},eO=async e=>{if(e.preventDefault(),u||!c||!a)return;let t=ew.current;if(!t)return;let s=et(t,e.clientX,e.clientY);s&&(await m("long_press",{x:s.x,y:s.y,duration:720}),h(n("长按","Long press")),eM())},eB=async e=>{if(!C||u||!c||!a)return;let t=ej.current;if(!t)return;let s=ee(t,e.clientX,e.clientY);if(!s)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-s.x)&&28>Math.abs(i.y-s.y)?(ey.current=null,await m("double_tap",{x:s.x,y:s.y}),h(n("双击","Double tap"))):(ey.current={t:l,x:s.x,y:s.y},await m("tap",{x:s.x,y:s.y})),eo||eM()},eF=async e=>{if(e.preventDefault(),u||!c||!a)return;let t=ej.current;if(!t)return;let s=ee(t,e.clientX,e.clientY);s&&(await m("long_press",{x:s.x,y:s.y,duration:720}),h(n("长按","Long press")),eo||eM())};if(!c)return(0,s.jsx)("div",{className:"rounded-2xl border border-amber-500/25 bg-amber-500/[0.06] p-6 text-center text-sm text-amber-200/90",children:n("宿主机未安装 adb,无法使用 Live 控制台。","adb is required for the Live console.")});let eW=es(eL),eK=eW.Icon;return(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-sky-500/20 bg-gradient-to-br from-sky-500/[0.08] via-zinc-950/80 to-zinc-900/90 p-4 ring-1 ring-white/[0.05]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,s.jsx)(F.Z,{className:"h-4 w-4 text-sky-400"}),(0,s.jsx)("h4",{className:"text-sm font-semibold text-white",children:n("链路管理","Link manager")}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500",children:n("USB / Redroid :5555 / 无线调试(先配对再连接)","USB \xb7 Redroid :5555 \xb7 wireless (pair then connect)")})]}),(0,s.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb connect"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("input",{className:"min-w-[12rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-3 py-2 font-mono text-xs text-zinc-200",placeholder:"192.168.1.10:5555",value:L,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&void eZ()}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eZ(),className:"rounded-lg bg-sky-500/25 px-3 py-2 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/40",children:A?"…":"Connect"}),(0,s.jsx)("button",{type:"button",disabled:A||u||!L.trim(),onClick:()=>eU(L),className:"rounded-lg border border-white/10 px-3 py-2 text-xs text-zinc-400 hover:text-zinc-200",children:n("存书签","Pin")})]}),B.length?(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:B.map(e=>(0,s.jsx)("button",{type:"button",className:"rounded-md bg-white/[0.06] px-2 py-0.5 font-mono text-[10px] text-zinc-400 hover:bg-white/10",onClick:()=>P(e),children:e},e))}):null,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 pt-2",children:[(0,s.jsx)("button",{type:"button",disabled:A||u||!a,onClick:()=>void eD(a),className:"rounded-lg border border-rose-500/30 bg-rose-500/10 px-2.5 py-1.5 text-[10px] text-rose-200",children:n("断开当前 TCP","Disconnect current")}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eD(""),className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-500 hover:text-zinc-300",children:n("断开全部 TCP","Disconnect all TCP")}),(0,s.jsxs)("button",{type:"button",disabled:A||u,onClick:()=>{g(),eM(),h(n("已刷新设备列表","Devices refreshed"))},className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-400",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3"}),"ADB list"]})]})]}),(0,s.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb pair(无线调试)"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("input",{className:"w-32 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"IP",value:T,onChange:e=>M(e.target.value)}),(0,s.jsx)("input",{className:"w-20 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"port",value:E,onChange:e=>U(e.target.value)}),(0,s.jsx)("input",{className:"min-w-[6rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs tracking-widest",placeholder:"123456",value:D,onChange:e=>I(e.target.value)}),(0,s.jsx)("button",{type:"button",disabled:A||u,onClick:()=>void eI(),className:"rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-400/35",children:"Pair"})]}),(0,s.jsx)("p",{className:"text-[10px] leading-relaxed text-zinc-600",children:n("手机上「无线调试」会显示配对端口与 6 位码;配对成功后用上方 connect 连接 adb 显示的 IP:5555。","Use the pairing port + 6-digit code from Wireless debugging; then connect to the listed adb IP:5555.")})]})]})]}),(0,s.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-emerald-500/25 bg-gradient-to-br from-emerald-500/[0.12] via-zinc-950/90 to-violet-500/[0.08] p-1 shadow-2xl shadow-emerald-900/20 ring-1 ring-white/[0.06]",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute -right-20 -top-20 h-56 w-56 rounded-full bg-emerald-500/10 blur-3xl","aria-hidden":!0}),(0,s.jsxs)("div",{className:"relative rounded-[1.35rem] border border-white/[0.06] bg-zinc-950/80 p-4 backdrop-blur-sm",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-emerald-400/30 to-violet-500/25 ring-1 ring-white/10",children:(0,s.jsx)(p.Z,{className:"h-6 w-6 text-emerald-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold tracking-tight text-white",children:n("无人直播系统 \xb7 ADB 云控台","Unmanned Live System \xb7 ADB farm console")}),(0,s.jsxs)("p",{className:"mt-1 max-w-xl text-[11px] leading-relaxed text-zinc-500",children:[n("统一适配 USB / Redroid / 无线 adb:已授权设备默认走官方 scrcpy-server 的 WebSocket H.264 真流(与桌面 ","USB / Redroid / wireless adb: authorized devices default to official scrcpy-server WebSocket H.264 (same stack as "),(0,s.jsx)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"escrcpy"}),n(" / "," / "),(0,s.jsx)("a",{href:el,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"scrcpy"}),n(");无 jar 或关闭真流时用截图。","); PNG screenshot when jar missing or stream off.")]})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-1.5 self-start sm:flex-row",children:[(0,s.jsxs)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["escrcpy",(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 opacity-70"})]}),(0,s.jsxs)("a",{href:el,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["scrcpy",(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 opacity-70"})]})]})]}),r.length>0?(0,s.jsxs)("div",{className:"mt-5",children:[(0,s.jsxs)("p",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:[(0,s.jsx)(K.Z,{className:"h-3.5 w-3.5"}),n("设备矩阵","Device matrix")]}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(e=>{let t="device"===e.state,l=a===e.serial,i=es(e.transport),r=i.Icon;return(0,s.jsxs)("button",{type:"button",onClick:()=>o(e.serial),className:"flex min-w-[9rem] flex-col rounded-xl border px-3 py-2 text-left transition ".concat(l?"border-emerald-500/50 bg-emerald-500/15 ring-1 ring-emerald-400/30":"border-white/10 bg-black/30 hover:border-white/20"),children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-zinc-200",children:[(0,s.jsx)(d.Z,{className:"h-3.5 w-3.5 text-emerald-400/80"}),(0,s.jsx)("span",{className:"truncate",children:e.model||e.serial.slice(0,10)})]}),(0,s.jsx)("span",{className:"mt-0.5 truncate font-mono text-[9px] text-zinc-600",children:e.serial}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[9px] font-semibold ring-1 ".concat(i.cls),children:[(0,s.jsx)(r,{className:"h-2.5 w-2.5"}),n(i.zh,i.en)]}),(0,s.jsx)("span",{className:"rounded-md px-1.5 py-0.5 text-[9px] font-semibold ".concat(t?"bg-emerald-500/20 text-emerald-200":"bg-zinc-600/30 text-zinc-500"),children:e.state})]})]},e.serial)})})]}):null,(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("div",{className:"xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:n("刷新间隔","Interval")}),en.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>y(e),className:"rounded-lg px-2.5 py-1 text-[10px] font-semibold transition ".concat(v===e?"bg-violet-500/25 text-violet-100 ring-1 ring-violet-400/35":"bg-black/30 text-zinc-500 hover:text-zinc-300"),children:0===e?n("手动","Manual"):"".concat(e,"ms")},e)),(0,s.jsxs)("span",{className:"ml-1 inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[9px] font-medium ring-1 ".concat(eW.cls),children:[(0,s.jsx)(eK,{className:"h-3 w-3"}),"tcp"===eL?n("建议 ≥450ms","Suggest ≥450ms"):n("可试 280ms","Try 280ms")]}),(0,s.jsxs)("button",{type:"button",disabled:u,onClick:()=>void eM(),className:"ml-auto inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-2.5 py-1 text-[10px] text-zinc-300 hover:bg-white/[0.08]",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3 ".concat(j?"animate-spin":"")}),n("下一帧","Next frame")]}),(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>void m("wake"),className:"rounded-lg bg-amber-500/20 px-2.5 py-1 text-[10px] font-semibold text-amber-100 ring-1 ring-amber-500/30",children:"Wake"}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-[10px] text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/50",checked:C,onChange:e=>R(e.target.checked)}),(0,s.jsx)(H.Z,{className:"h-3 w-3"}),n("点按穿透","Tap-through")]}),(0,s.jsxs)("button",{type:"button",disabled:u||!a||!(null==eg?void 0:eg.server_jar),title:eg&&!eg.server_jar&&eg.hint_zh?eg.hint_zh:n("官方 scrcpy-server + WebSocket H.264","Official scrcpy-server + WebSocket H.264"),onClick:()=>{ec(e=>{let t=!e;return t?(eu(null),h(n("已开启实时画面(H.264 WebSocket)","Live H.264 WebSocket stream on"))):(a&&eu(a),h(n("已关闭实时画面(将使用截图)","Live stream off — screenshot mode"))),t})},className:"inline-flex items-center gap-1 rounded-lg border px-2.5 py-1 text-[10px] font-semibold transition ".concat(eo?"border-cyan-400/50 bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/35":"border-white/10 bg-black/30 text-zinc-400 hover:text-zinc-200"),children:[(0,s.jsx)(Y.Z,{className:"h-3 w-3"}),eo?n("关闭真流","Stop WS"):n("实时画面","Live H.264")]})]}),eg&&!eg.server_jar?(0,s.jsxs)("p",{className:"mt-2 text-[10px] text-amber-200/80",children:[n("未检测到 scrcpy-server:启动时会自动拉取;内网可在 runtime.env 配置 SCRCPY_SERVER_DOWNLOAD_URL(支持 {tag})。","scrcpy-server missing: auto-fetched on startup; set SCRCPY_SERVER_DOWNLOAD_URL ({tag}) for mirrors."),eg.server_version?" (".concat(n("期望版本","version")," ").concat(eg.server_version,")"):null]}):null,(0,s.jsx)("p",{className:"mt-2 text-[10px] text-zinc-600",children:n("快捷键(镜像区聚焦时):H Home \xb7 B Back \xb7 R 多任务 \xb7 W 唤醒 \xb7 M 菜单","Hotkeys (mirror focused): H Home \xb7 B Back \xb7 R Recents \xb7 W Wake \xb7 M Menu")}),(0,s.jsxs)("div",{className:"relative mx-auto mt-4 max-h-[min(78vh,720px)] min-h-[280px]",children:[a?(0,s.jsxs)("div",{ref:e_,tabIndex:0,onKeyDown:e=>{if(!a||u)return;let t=e.target.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;let n={h:["key",{keycode:"3"}],b:["key",{keycode:"4"}],r:["key",{keycode:"187"}],w:["wake",void 0],m:["key",{keycode:"82"}]}[e.key.toLowerCase()];n&&(e.preventDefault(),(async()=>{await m(n[0],n[1]),eo||eM()})())},className:"relative flex justify-center outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/50",children:[(0,s.jsxs)("div",{className:"relative rounded-[2rem] border-[10px] border-zinc-800 bg-black shadow-inner shadow-black/80 ring-1 ring-white/10",style:{maxHeight:"min(72vh, 680px)"},children:[(0,s.jsx)("div",{className:"absolute left-1/2 top-0 z-10 h-5 w-24 -translate-x-1/2 rounded-b-xl bg-black/80"}),eo?(0,s.jsx)("canvas",{ref:ej,className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onClick:eB,onContextMenu:eF}):(0,s.jsx)("img",{ref:ew,src:eT||void 0,alt:"device",className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onLoadStart:()=>{N(!0)},onLoad:()=>{N(!1),eS.current=0,_(null)},onError:()=>{N(!1),eS.current+=1,eS.current<=3?(_(null),window.setTimeout(()=>eM(),380+200*eS.current)):_(n("截图连续失败:检查 USB 授权 / 无线是否断开 / Redroid 端口","Screenshot failed repeatedly"))},onClick:eA,onContextMenu:eO})]}),ex?(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-cyan-500/90 px-2 py-0.5 text-[9px] font-bold text-cyan-950 shadow-lg",children:[(0,s.jsx)(Y.Z,{className:"h-3 w-3"}),"SCRCPY\xb7WS"]}):v>0&&!eo?(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-emerald-500/90 px-2 py-0.5 text-[9px] font-bold text-emerald-950 shadow-lg",children:[(0,s.jsx)(G.Z,{className:"h-3 w-3"}),"LIVE"]}):eo?null:(0,s.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-zinc-700/90 px-2 py-0.5 text-[9px] font-bold text-zinc-200",children:[(0,s.jsx)(q.Z,{className:"h-3 w-3"}),n("单帧","Still")]})]}):(0,s.jsx)("p",{className:"py-16 text-center text-sm text-zinc-600",children:n("请选择或连接设备","Pick or connect a device")}),ep?(0,s.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:ep}):null,k&&!eo?(0,s.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:k}):null,(0,s.jsx)("p",{className:"mt-3 text-center text-[10px] text-zinc-600",children:n("左键单击 / 双击 \xb7 右键长按 \xb7 坐标对齐 PNG 像素","Left tap/double \xb7 right long-press \xb7 PNG pixel coords")})]})]}),(0,s.jsxs)("div",{className:"space-y-4 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-black/40 p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:n("遥测","Telemetry")}),x?(0,s.jsxs)("dl",{className:"mt-3 space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"device"}),(0,s.jsxs)("dd",{className:"text-right text-zinc-200",children:[x.brand," ",x.model]})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"Android"}),(0,s.jsxs)("dd",{className:"text-zinc-300",children:[x.android_version," (API ",x.sdk,")"]})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,s.jsx)("dt",{className:"text-zinc-600",children:"wm size"}),(0,s.jsx)("dd",{className:"text-cyan-300/90",children:S?"".concat(S.width,"\xd7").concat(S.height):x.resolution||"—"})]}),(0,s.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:x.battery})]}):(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-600",children:n("在上方点「刷新设备信息」","Use Refresh device info above")})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/20 bg-gradient-to-b from-violet-500/[0.08] to-black/40 p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n("导航坞","Nav dock")}),(0,s.jsx)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[["3","Home"],["4","Back"],["187","Recents"]].map(e=>{let[t,n]=e;return(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:t}),eM()},className:"rounded-xl border border-white/10 bg-white/[0.06] py-3 text-xs font-semibold text-zinc-200 hover:bg-white/[0.1]",children:n},t)})}),(0,s.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:"24"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol+"}),(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("key",{keycode:"25"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol−"})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-cyan-500/[0.05] p-4",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-cyan-300/80",children:n("手势","Gestures")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,s.jsx)("button",{type:"button",disabled:u||!a,onClick:()=>{m("swipe",{direction:e}),eM()},className:"rounded-lg border border-white/10 bg-black/30 py-2 font-mono text-[10px] uppercase text-zinc-300",children:e},e))})]})]})]})]})]})]})}let eo=[{label:"getprop",cmd:"getprop ro.build.version.release"},{label:"top pkg",cmd:"dumpsys activity activities | grep -E 'mResumedActivity' | tail -n 1"},{label:"usb",cmd:"dumpsys usb | head -n 60"},{label:"surface",cmd:"dumpsys SurfaceFlinger | head -n 40"}];function ec(e,t,n){return e?(0,s.jsx)("span",{className:"rounded bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-200",children:t}):(0,s.jsx)("span",{className:"rounded bg-zinc-500/15 px-2 py-0.5 text-[10px] text-zinc-400",children:n})}function ed(e){var t,n,l,i,a,r,o,c,d,u,x,m,p,h,g;let{t:b,notify:f,fetchJson:v,apiBase:w,busy:j,androidSerial:N,setAndroidSerial:k,devices:_,adbAvailable:S,apkPath:z,setApkPath:C,onAndroidAction:R,onCopy:P,onRefreshDevices:T}=e,[E,U]=(0,Z.useState)(null),[D,B]=(0,Z.useState)(null),[F,W]=(0,Z.useState)(null),[K,H]=(0,Z.useState)(null),[Y,G]=(0,Z.useState)(""),[q,J]=(0,Z.useState)([]),[V,$]=(0,Z.useState)("getprop ro.product.model"),[X,Q]=(0,Z.useState)(""),[ee,et]=(0,Z.useState)("300"),[en,es]=(0,Z.useState)(""),[el,ei]=(0,Z.useState)(null),[ea,ed]=(0,Z.useState)([]),[eu,ex]=(0,Z.useState)(null),[em,ep]=(0,Z.useState)("https://"),[eh,eg]=(0,Z.useState)(""),[eb,ef]=(0,Z.useState)(!1),[ev,ey]=(0,Z.useState)(null),ew=!!(j||ev),ej=_.find(e=>e.serial===N)||null,eN=(0,Z.useCallback)(async()=>{if(!N||!S){U(null),B(null);return}ey("overview"),B(null);try{let e=await v("/android/overview?serial=".concat(encodeURIComponent(N)));U(e)}catch(e){U(null),B(e.message)}finally{ey(null)}},[S,N,v]),ek=(0,Z.useCallback)(async()=>{H(null);try{let e=await v("/redroid/summary");W(e)}catch(e){W(null),H(e.message)}},[v]);(0,Z.useEffect)(()=>{eN()},[eN]),(0,Z.useEffect)(()=>{ek()},[ek]);let e_=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("packages");try{let e=encodeURIComponent(Y.trim()),t=await v("/android/packages?serial=".concat(encodeURIComponent(N),"&query=").concat(e,"&limit=80"));J(t.packages||[])}catch(e){f(e.message),J([])}finally{ey(null)}},eS=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}let e=V.trim();if(e){ey("shell");try{var t,n;let s=await v("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"shell",serial:N,payload:{command:e}})});Q(null!==(n=null!==(t=s.output)&&void 0!==t?t:s.message)&&void 0!==n?n:"")}catch(e){Q(e.message)}finally{ey(null)}}},ez=(0,Z.useCallback)(async e=>{if(!N)return;let t=Math.min(3e3,Math.max(1,parseInt(ee,10)||200)),n=!!(null==e?void 0:e.silent);n||ey("logcat"),ei(null);try{var s;let e=await v("/android/logcat?serial=".concat(encodeURIComponent(N),"&lines=").concat(t));es(null!==(s=e.text)&&void 0!==s?s:"")}catch(e){es(""),ei(e.message)}finally{n||ey(null)}},[N,v,ee]);(0,Z.useEffect)(()=>{if(!eb||!N||!S)return;let e=window.setInterval(()=>void ez({silent:!0}),3e3);return ez({silent:!0}),()=>clearInterval(e)},[S,N,eb,ez]);let eC=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("ui"),ex(null);try{let e=await v("/android/ui?serial=".concat(encodeURIComponent(N),"&limit=100"));ed(e.nodes||[])}catch(e){ed([]),ex(e.message)}finally{ey(null)}},eR=async(e,t)=>{ey("redroid:".concat(e));try{let n=await v("/redroid/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,name:t||""})});n.summary&&W(n.summary),f(n.message||"OK"),await ek(),T()}catch(e){f(e.message)}finally{ey(null)}},eL=async e=>{await R("key",{keycode:e})},eP=async()=>{let e=eh.trim();if(!e){f(b("请输入文字","Enter text"));return}await R("text",{text:e})},eT=async()=>{let e=em.trim();if(!e||"https://"===e){f(b("请输入 URL","Enter URL"));return}await R("open_url",{url:e})};return(0,s.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安卓设备工作台","Android workstation")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("USB 真机与 Redroid 共用一套控制面,优先保证 USB 真机稳定。","USB phone and Redroid share one control surface.")})]}),S?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew||!N,onClick:()=>void eN(),className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新设备","Refresh device")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>{ek(),T()},className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新 Redroid","Refresh Redroid")})]}):(0,s.jsx)("span",{className:"text-xs text-amber-200/90",children:b("宿主机未检测到 adb","adb not found on host")})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:_.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>k(e.serial),className:"rounded-xl border px-4 py-2 text-left text-xs ".concat(N===e.serial?"border-violet-500/50 bg-violet-500/10 text-white":"border-white/10 bg-black/30 text-zinc-400"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-zinc-200",children:e.model||e.serial}),e.transport?(0,s.jsx)("span",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-zinc-500",children:e.transport}):null,e.kind?(0,s.jsx)("span",{className:"rounded bg-cyan-500/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-cyan-200",children:e.kind}):null]}),(0,s.jsx)("div",{className:"text-[10px] text-zinc-600",children:e.serial}),"device"!==(e.state||"").toLowerCase()?(0,s.jsx)("div",{className:"mt-1 text-[10px] font-medium text-amber-200/90",children:"unauthorized"===e.state?b("未授权,请在手机上允许 USB 调试。","Unauthorized, allow USB debugging on device."):"".concat(b("状态","State"),": ").concat(e.state)}):null]},e.serial))}),S&&0===_.length?(0,s.jsx)("p",{className:"mt-4 rounded-lg border border-amber-500/20 bg-amber-500/5 p-3 text-xs leading-relaxed text-amber-200/90",children:b("当前没有已授权设备。USB 真机请检查调试授权;Redroid 请先启动实例,再 adb connect 127.0.0.1:5555。","No authorized devices. For USB phones, confirm USB debugging. For Redroid, start an instance then adb connect 127.0.0.1:5555.")}):null]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/15 bg-zinc-950/50 p-5",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-violet-300/90",children:b("真机诊断","Phone diagnostics")}),D?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:D}):null,E?(0,s.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,s.jsxs)("dl",{className:"space-y-1.5 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"model"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.brand," ",E.model]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"android"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.android_version," (sdk ",E.sdk,")"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"kind"})," ",(0,s.jsxs)("dd",{className:"inline text-zinc-300",children:[E.kind||(null==ej?void 0:ej.kind)||"unknown"," / ",E.transport||(null==ej?void 0:ej.transport)||"unknown"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"display"})," ",(0,s.jsx)("dd",{className:"inline text-zinc-300",children:E.resolution})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"inline text-zinc-600",children:"rotation"})," ",(0,s.jsx)("dd",{className:"inline text-zinc-300",children:E.rotation})]}),(0,s.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:E.battery}),(0,s.jsx)("div",{className:"line-clamp-3 text-[10px] text-zinc-500",children:E.focus})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(t=E.diagnostics)||void 0===t?void 0:t.ready,b("已启动","Boot ready"),b("未完成启动","Boot pending")),ec(null===(n=E.diagnostics)||void 0===n?void 0:n.google_play,"Google Play","No Play"),ec(null===(l=E.diagnostics)||void 0===l?void 0:l.google_services,"GMS","No GMS"),ec(null===(i=E.diagnostics)||void 0===i?void 0:i.magisk,"Magisk","No Magisk"),ec(null===(a=E.diagnostics)||void 0===a?void 0:a.root,"Root","No root")]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{children:["boot_completed: ",(null===(r=E.diagnostics)||void 0===r?void 0:r.boot_completed)||"-"]}),(0,s.jsxs)("div",{children:["provisioned: ",(null===(o=E.diagnostics)||void 0===o?void 0:o.device_provisioned)||"-"]}),(0,s.jsxs)("div",{children:["setup_complete: ",(null===(c=E.diagnostics)||void 0===c?void 0:c.user_setup_complete)||"-"]}),(0,s.jsxs)("div",{children:["abi: ",(null===(d=E.diagnostics)||void 0===d?void 0:d.abi)||"-"]}),(0,s.jsxs)("div",{className:"truncate",children:["hardware: ",(null===(u=E.diagnostics)||void 0===u?void 0:u.hardware)||"-"]})]})]}):D?null:(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("加载中","Loading")})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-zinc-950/50 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:b("Redroid 板块","Redroid panel")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("启动默认实例","Start default")})]}),K?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:K}):null,F?(0,s.jsxs)("div",{className:"mt-3 space-y-3 text-[11px] text-zinc-400",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsxs)("div",{children:["arch: ",F.arch||"-"]}),(0,s.jsxs)("div",{className:"truncate",children:["image: ",F.image||"-"]}),(0,s.jsxs)("div",{children:["profile: ",F.device_profile||"-"]}),(0,s.jsxs)("div",{children:["gpu: ",F.gpu_mode||"-"]}),(0,s.jsxs)("div",{children:["adb: 127.0.0.1:",F.default_port||5555]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(x=F.requirements)||void 0===x?void 0:x.docker_available,"Docker","No Docker"),ec(null===(m=F.requirements)||void 0===m?void 0:m.adb_available,"ADB","No ADB"),ec(null===(p=F.requirements)||void 0===p?void 0:p.kvm,"KVM","No KVM"),ec(null===(h=F.requirements)||void 0===h?void 0:h.binderfs,"binderfs","No binderfs")]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(F.instances||[]).map(e=>{var t,n,l,i;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium text-zinc-100",children:e.name}),(0,s.jsxs)("div",{className:"font-mono text-[10px] text-zinc-500",children:[e.port?"127.0.0.1:".concat(e.port):"-"," / ",e.status_text||"-"]})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start",e.name),className:"rounded bg-emerald-500/15 px-2 py-1 text-[10px] text-emerald-200",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("restart",e.name),className:"rounded bg-amber-500/15 px-2 py-1 text-[10px] text-amber-200",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("adb_connect",e.name),className:"rounded bg-cyan-500/15 px-2 py-1 text-[10px] text-cyan-200",children:"ADB"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("stop",e.name),className:"rounded bg-rose-500/15 px-2 py-1 text-[10px] text-rose-200",children:"Stop"})]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[ec(null===(t=e.diagnostics)||void 0===t?void 0:t.ready,b("系统就绪","System ready"),b("启动中","Booting")),ec(null===(n=e.diagnostics)||void 0===n?void 0:n.google_play,"Play","No Play"),ec(null===(l=e.diagnostics)||void 0===l?void 0:l.magisk,"Magisk","No Magisk"),ec(null===(i=e.diagnostics)||void 0===i?void 0:i.root,"Root","No root")]}),e.data_dir?(0,s.jsx)("div",{className:"mt-2 truncate font-mono text-[10px] text-zinc-500",children:e.data_dir}):null]},e.name)}),(null===(g=F.instances)||void 0===g?void 0:g.length)?null:(0,s.jsx)("p",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-xs text-zinc-500",children:b("当前没有 Redroid 实例。默认动作会创建 redroid13-1。","No Redroid instances yet. Default actions create redroid13-1.")})]})]}):(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("读取 Redroid 状态中","Loading Redroid status")})]})]}),(0,s.jsx)(er,{t:b,apiBase:w,fetchJson:v,serial:N,devices:_,setSerial:k,adbAvailable:S,lock:ew,overview:E,onAndroidAction:R,notify:f,onRefreshDevices:T}),S&&N?(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-300/90",children:b("快捷控制","Quick controls")}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("3"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Home"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("4"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Back"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("187"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Recents"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("wake"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Wake"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:"com.zhiliaoapp.musically"}),className:"rounded-lg bg-gradient-to-r from-pink-500/25 to-violet-500/25 px-3 py-1.5 text-xs ring-1 ring-white/10",children:"TikTok"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("24"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol+"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("25"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol-"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("66"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Enter"})]}),(0,s.jsx)("p",{className:"mt-3 text-[10px] text-zinc-600",children:b("滑动手势","Swipe gestures")}),(0,s.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:["up","down","left","right"].map(e=>(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("swipe",{direction:e}),className:"rounded-lg border border-white/10 bg-black/30 px-2.5 py-1 font-mono text-[10px] uppercase text-zinc-300",children:e},e))}),(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:b("ADB 文本输入","ADB text input")}),(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:eh,onChange:e=>eg(e.target.value),placeholder:"hello / 123",onKeyDown:e=>{"Enter"===e.key&&eP()}}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP(),className:"rounded-lg bg-emerald-500/20 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("发送","Send")})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:em,onChange:e=>ep(e.target.value),placeholder:"https://"}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eT(),className:"rounded-lg bg-violet-500/20 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/30",children:b("打开链接","Open URL")})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsxs)("h4",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:[(0,s.jsx)(L.Z,{className:"h-4 w-4"}),b("USB 真机优化建议","USB optimization")]}),(0,s.jsxs)("ul",{className:"mt-3 space-y-2 text-xs leading-relaxed text-zinc-400",children:[(0,s.jsx)("li",{children:b("优先使用主板直连 USB,不要经过不稳的 HUB。","Prefer direct motherboard USB, not unstable hubs.")}),(0,s.jsx)("li",{children:b("开发板端固定 adb server,避免频繁 kill-server。","Keep adb server stable and avoid frequent kill-server.")}),(0,s.jsx)("li",{children:b("镜像页默认支持 scrcpy H.264 真流,截图模式作为回退。","Use scrcpy H.264 live stream first, screenshot mode as fallback.")}),(0,s.jsx)("li",{children:b("如果 TikTok / YouTube App 直播,要先确认屏幕常亮、分辨率稳定、USB 供电足够。","For TikTok / YouTube app live, keep screen on, resolution stable, and USB power sufficient.")})]})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(I.Z,{className:"h-4 w-4 text-emerald-400"}),b("包名搜索与启动","Packages")]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{className:"min-w-0 flex-1 rounded-xl border border-white/10 bg-black/40 px-4 py-2 text-sm",value:Y,onChange:e=>G(e.target.value),placeholder:"tiktok / musically / youtube",onKeyDown:e=>{"Enter"===e.key&&e_()}}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void e_(),className:"rounded-xl bg-emerald-500/20 px-4 py-2 text-sm text-emerald-100 ring-1 ring-emerald-500/30",children:b("搜索","Search")})]}),(0,s.jsxs)("ul",{className:"mt-4 max-h-48 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 font-mono text-[11px]",children:[q.map(e=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 py-1 text-zinc-400",children:[(0,s.jsx)("span",{className:"min-w-0 truncate text-zinc-300",children:e.package}),(0,s.jsxs)("span",{className:"flex shrink-0 gap-1",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:e.package}),className:"rounded bg-white/10 px-2 py-0.5 text-[10px] text-zinc-200",children:b("启动","Launch")}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("force_stop",{package:e.package}),className:"rounded bg-rose-500/15 px-2 py-0.5 text-[10px] text-rose-200",children:b("停止","Stop")})]})]},e.package)),q.length?null:(0,s.jsx)("li",{className:"py-2 text-center text-zinc-600",children:b("暂无结果","No results")})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"grid gap-6 xl:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(A.Z,{className:"h-4 w-4 text-amber-400"}),"ADB shell"]}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:eo.map(e=>(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>$(e.cmd),className:"rounded-md border border-white/10 bg-white/[0.04] px-2 py-1 text-[10px] text-zinc-400 hover:text-zinc-200",children:e.label},e.label))}),(0,s.jsx)("textarea",{className:"mt-3 min-h-[100px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-3 font-mono text-xs text-zinc-200",value:V,onChange:e=>$(e.target.value),spellCheck:!1,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),eS())}}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eS(),className:"rounded-xl bg-amber-500/20 px-4 py-2 text-sm text-amber-100 ring-1 ring-amber-500/30",children:"shell"===ev?(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),"Run"]}):"Run"}),X?(0,s.jsxs)("button",{type:"button",disabled:!X,onClick:()=>P(X),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制输出","Copy")]}):null]}),X?(0,s.jsx)("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/40 p-3 font-mono text-[11px] text-zinc-400 xl:max-h-[min(24rem,50vh)]",children:X}):null]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("Logcat","Logcat")}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("input",{className:"w-24 rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:ee,onChange:e=>et(e.target.value)}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-[11px] text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eb,onChange:e=>ef(e.target.checked)}),b("每 3 秒自动刷新","Auto every 3s")]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void ez(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:b("拉取日志","Pull logs")}),en?(0,s.jsxs)("button",{type:"button",onClick:()=>P(en),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制","Copy")]}):null]}),el?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:el}):null,en?(0,s.jsx)("pre",{className:"mt-3 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/50 p-3 font-mono text-[10px] leading-tight text-zinc-500 xl:max-h-[min(24rem,50vh)]",children:en}):null]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(O.Z,{className:"h-4 w-4 text-fuchsia-400"}),b("界面节点","UI nodes")]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eC(),className:"mt-3 rounded-xl border border-fuchsia-500/30 bg-fuchsia-500/10 px-4 py-2 text-sm text-fuchsia-100",children:b("刷新节点","Refresh nodes")}),eu?(0,s.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:eu}):null,(0,s.jsxs)("ul",{className:"mt-3 max-h-64 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 text-[11px]",children:[ea.map((e,t)=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.04] py-1.5 text-zinc-400 last:border-0",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"text-zinc-200",children:e.label}),e.resource_id?(0,s.jsx)("span",{className:"ml-2 font-mono text-[10px] text-zinc-600",children:e.resource_id}):null,(0,s.jsxs)("div",{className:"font-mono text-[10px] text-zinc-600",children:["(",e.center_x,", ",e.center_y,")",e.clickable?" click":""]})]}),(0,s.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("tap",{x:e.center_x,y:e.center_y}),className:"shrink-0 rounded bg-white/10 px-2 py-1 text-[10px] text-zinc-200",children:"Tap"})]},"".concat(e.center_x,"-").concat(e.center_y,"-").concat(t))),ea.length||eu?null:(0,s.jsx)("li",{className:"py-4 text-center text-zinc-600",children:b("尚未加载","Not loaded")})]})]}):null,S&&N?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安装 APK","Install APK")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("先 adb push 到 /sdcard/ 再执行安装。","Push the APK to /sdcard/ first.")}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm",value:z,onChange:e=>C(e.target.value)}),(0,s.jsx)("button",{type:"button",disabled:ew||!S||!N,onClick:()=>void R("install_apk",{path:z}),className:"mt-3 rounded-xl bg-emerald-500/20 px-4 py-2 text-sm font-medium text-emerald-100 ring-1 ring-emerald-500/30",children:"pm install"})]}):null]})}var eu=n(9609),ex=n(918),em=n(5365),ep=n(8755);function eh(e){let{t,title:n,subtitle:l,steps:i,onNavigate:a}=e;return(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5 p-6 shadow-lg shadow-violet-900/10",children:[(0,s.jsx)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:n}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:l}),(0,s.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:flex-wrap sm:justify-center",children:i.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[e.openUrl||e.target&&a?(0,s.jsxs)("button",{type:"button",onClick:()=>{if(e.openUrl){window.open((0,ep.p)(e.openUrl),"_blank","noopener,noreferrer");return}e.target&&a&&a(e.target)},className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ring-2 ring-white/10 transition hover:ring-violet-400/50 hover:brightness-110 ".concat(e.gradient),children:[(0,s.jsx)("span",{children:e.label}),e.sub?(0,s.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}):(0,s.jsxs)("div",{className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ".concat(e.gradient),children:[(0,s.jsx)("span",{children:e.label}),e.sub?(0,s.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}),t1&&void 0!==arguments[1]&&arguments[1],n=e.replace(/kbits\/s/gi,"").replace(/x$/i,"").trim().match(/-?\d+(?:\.\d+)?/);if(!n)return;let s=t?parseInt(n[0],10):Number(n[0]);return Number.isFinite(s)?s:void 0}function ek(e){let t=e.toLowerCase();return!(t.includes("frame=")&&t.includes("speed="))&&(ej.some(e=>t.includes(e.toLowerCase()))||t.includes("error")||t.includes("failed"))}function e_(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=function(){let e;for(var t=arguments.length,n=Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:12,n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-t),s=-1,l="";for(let e=n.length-1;e>=0;e-=1){let t=n[e].toLowerCase();if(t.includes("frame=")&&t.includes("speed=")){s=e,l=n[e];break}}return s<0||n.slice(s+1).some(ek)?"":l}(n.filter(Boolean).join("\n").slice(-16e3)),i={};if(!l)return i;for(ew.lastIndex=0;null!==(e=ew.exec(l));){let t=e[1].toLowerCase(),n=e[2];if("frame"===t||"drop"===t||"dup"===t){let e=eN(n,!0);null!=e&&(i[t]=e)}else if("fps"===t||"speed"===t||"bitrate"===t){let e=eN(n);null!=e&&(i[t]=e)}}return i}(n),l=!!(null==e?void 0:e.is_pushing);return{frame:eS(null==e?void 0:e.ffmpeg_frame,null==t?void 0:t.frame,s.frame),fps:eS(null==t?void 0:t.fps,s.fps),speed:eS(null==e?void 0:e.ffmpeg_speed,null==t?void 0:t.speed,s.speed),bitrate:eS(null==t?void 0:t.bitrate,s.bitrate),drop:eS(null==t?void 0:t.drop,s.drop),dup:eS(null==t?void 0:t.dup,s.dup),speedLow:null==e?void 0:e.ffmpeg_speed_low,progressStalled:null==e?void 0:e.ffmpeg_progress_stalled,live:l}}function eS(){for(var e=arguments.length,t=Array(e),n=0;n=1e3?"".concat((e/1e3).toFixed(1)," Mbps"):"".concat(Math.round(e)," kbps")}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("number"!=typeof e||!Number.isFinite(e))return"—";let s=e>=100?String(Math.round(e)):e.toFixed(n).replace(/\.00$/,"");return"".concat(s).concat(t)}function eR(e,t){let n=["fps ".concat(eC(e.fps)),"speed ".concat(eC(e.speed,"x")),"frame ".concat(eC(e.frame,"",0))],s=ez(e.bitrate);return(s&&n.push(s),!(null==t?void 0:t.live)&&n.every(e=>e.endsWith("—")))?"":n.join(" \xb7 ")}function eL(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(e.startsWith("#")||!e)continue;let n=e.match(/^(?:key|stream_key)\s*=\s*(.+)$/i);if(n){let e=n[1].trim().split(/[#;]/)[0].trim();if(e&&!e.toLowerCase().startsWith("rtmp"))return e.length>8?e.slice(-8):e;if(e.includes("live2/")){let t=e.split("/"),n=t[t.length-1]||"";return n.length>8?n.slice(-8):n}}}let t=e.trim();return!t||t.includes("\n")||t.toLowerCase().startsWith("rtmp")?"":t.length>8?t.slice(-8):t}function eP(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let s=e.match(/(https?:\/\/live\.douyin\.com\/[a-zA-Z0-9_-]+)/i);if(s){t.push(s[1].replace(/^http:\/\//i,"https://"));continue}let l=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(l){t.push("https://live.douyin.com/".concat(l[1]));continue}let i=e.match(/(\d{8,})/);i&&t.push("https://live.douyin.com/".concat(i[1]))}return Array.from(new Set(t)).slice(0,16)}function eT(e){let t=(e||"").trim().replace(/^[\s"'`[\]()()【】]+|[\s"'`[\]()()【】]+$/g,"");return!(t=(t=(t=(t=t.replace(/^(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*/i,"")).replace(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/gi,"")).replace(/(?:等待直播|正在直播|直播中|已开播|开始推流|主播已下播|下播|录制中|推流中).*$/i,"")).trim().replace(/^[\s,,;;||\-—::]+|[\s,,;;||\-—::]+$/g,""))||/^[-—_无未知]+$/i.test(t)||/^(unknown|null|undefined|none|nan)$/i.test(t)||/live\.douyin\.com/i.test(t)||/^\d{5,}$/.test(t)||/^(监测|格式|错误|无录制任务)/.test(t)?"":t.slice(0,48)}function eM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!e||e.startsWith("#"))continue;let n=e.match(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/i);if(!n||null==n.index)continue;let s=eT(e.slice(n.index+n[0].length));if(s)return s;let l=e.split(/[,,||]/,2);if(l.length>1){let e=eT(l[1]);if(e)return e}}return""}(e),s=function(e){var t,n,s;let l=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),i=/(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*(.{1,80})/i,a=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,r=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e of[/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]\s*([^\[\r\n]{1,80})/i,/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:正在直播中|正在直播|直播中|已开播|开始推流|录制中|推流中)/i])for(let n=l.length-1;n>=0;n-=1){let s=eT((null===(t=l[n].match(e))||void 0===t?void 0:t[1])||"");if(s)return s}for(let e=l.length-1;e>=0;e-=1){if(r.test(l[e]))continue;let t=eT((null===(n=l[e].match(i))||void 0===n?void 0:n[1])||"");if(t)return t}for(let e=l.length-1;e>=0;e-=1){let t=eT((null===(s=l[e].match(a))||void 0===s?void 0:s[1])||"");if(t)return t}return""}(t),l=eP(e).length,i=function(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),n=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,s=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e=t.length-1;e>=0;e-=1){var l;if(s.test(t[e]))continue;let i=eT((null===(l=t[e].match(n))||void 0===l?void 0:l[1])||"");if(i)return i}return""}(t),a=/frame=.*speed=/i.test(t)||/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]/i.test(t);if(l>1&&s&&!a&&s===i&&n)return n;let r=n||s;if(r)return r;let o=eE(t)||eU(e)[0]||"";return o?"抖音直播间 ".concat(o):""}function eE(e){if(!e)return null;let t=null;for(let n of e.split(/\r?\n/)){let e=n.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);e&&(t=e[1]);let s=n.match(/https?:\/\/[^/\s]*douyin\.com\/(\d{8,})/i);s&&(t=s[1])}return t}function eU(e){let t=[];for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let s=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(s){t.push(s[1]);continue}let l=e.match(/(\d{8,})/);t.push(l?l[1]:e.slice(0,96))}return Array.from(new Set(t)).slice(0,12)}function eZ(e){let t="",n=!0,s="",l=!0,i=e.split(/\r?\n/),a=!1;for(let e of i){let i=e.trim();if(/^\[youtube\]/i.test(i)){a=!0;continue}if(/^\[/.test(i)){a=!1;continue}if(!a||!i||i.startsWith("#")||i.startsWith(";"))continue;let r=i.indexOf("=");if(r<0)continue;let o=i.slice(0,r).trim().toLowerCase(),c=i.slice(r+1).trim().split(/[#;]/)[0].trim();"key"===o||"stream_key"===o?t=c:"rtmps"===o?n=!/^(0|false|否)/i.test(c):"bitrate"===o?s=c:"fast_audio"===o&&(l=/^(1|true|yes|是|开|on)/i.test(c))}return{key:t,rtmps:n,bitrate:s,fastAudio:l}}function eD(e){return"URL_config.".concat(e.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")}function eI(e){let t=e.bitrate.trim()?"bitrate = ".concat(e.bitrate.trim()):"# bitrate = 4000";return"[youtube]\n# YouTube 推流 key(工作室 → 直播 → 串流密钥)\nkey = ".concat(e.key.trim(),"\n\n# 使用 RTMPS;填 否 则 RTMP\nrtmps = ").concat(e.rtmps?"是":"否","\n\n# 视频比特率 kbps(可选)\n").concat(t,"\n\n# 轻量音频链,减轻 CPU:1 / 是\nfast_audio = ").concat(e.fastAudio?"1":"0","\n")}function eA(e){if(e<60)return"".concat(e,"s");let t=Math.floor(e/60);return t<60?"".concat(t,"m ").concat(e%60,"s"):"".concat(Math.floor(t/60),"h ").concat(t%60,"m")}function eO(e){var t,n,l,i;let{t:a,currentProc:r,fetchJson:o,urlListText:c,keySuffixUi:d,showKeyRow:u=!0,pollMs:x=1e3,refreshToken:m=0,monitorRow:p,preferredTitle:h,hideStatusOverview:g=!1}=e,[b,f]=(0,Z.useState)(""),[v,y]=(0,Z.useState)(""),[j,N]=(0,Z.useState)(""),[k,_]=(0,Z.useState)(""),[S,z]=(0,Z.useState)(""),[C,R]=(0,Z.useState)([]),[L,P]=(0,Z.useState)(null),[T,M]=(0,Z.useState)(""),[E,U]=(0,Z.useState)(""),[D,I]=(0,Z.useState)(""),[A,O]=(0,Z.useState)(""),[B,F]=(0,Z.useState)(!1),[K,H]=(0,Z.useState)(!1),[Y,J]=(0,Z.useState)(!1),[V,$]=(0,Z.useState)(null),[X,Q]=(0,Z.useState)(null),[ee,et]=(0,Z.useState)(null),[en,es]=(0,Z.useState)(!1),[el,ei]=(0,Z.useState)(!1),[ea,er]=(0,Z.useState)(!1),[eo,ec]=(0,Z.useState)(null),[ed,eu]=(0,Z.useState)(0),[ex,em]=(0,Z.useState)(!0),ep=(0,Z.useRef)(null),eh=(0,Z.useRef)(null),eb=(0,Z.useRef)(!1),ef=(0,Z.useRef)(!1),ev=(0,Z.useRef)(!1),ey=(0,Z.useRef)(r),ew=(0,Z.useRef)(0),ej=eU(c),eN=eE(v),ek=eP(c),eS=null!==(n=ek[0])&&void 0!==n?n:"",eL=Y||["streaming","relay_slow"].includes(k.trim().toLowerCase()),eT=e_({ffmpeg_speed:null!=V?V:null==p?void 0:p.ffmpeg_speed,ffmpeg_frame:null!=X?X:null==p?void 0:p.ffmpeg_frame,ffmpeg_active:null==p?void 0:p.ffmpeg_active,is_pushing:eL,ffmpeg_speed_low:en||(null==p?void 0:p.ffmpeg_speed_low),ffmpeg_progress_stalled:el||(null==p?void 0:p.ffmpeg_progress_stalled)},void 0,"".concat(v,"\n").concat(j)),eZ="number"==typeof ee&&ee>0?eA(Math.max(0,Math.floor(ee))):null,eD=eR(eT,{live:eL}),eI=C.length?C.join(", "):eL?a("转推活跃(PID 未采集)","Relay active (PID n/a)"):a("无","none"),eO=B&&eL&&!K,eB=eO?"":E,eF=eO?"":D,eW=ek.length>1&&eL&&!eF&&!eB&&!eN&&(B||!!A||!!T),eK=eB||eN||(eW?null:null!==(l=null===(t=eS.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i))||void 0===t?void 0:t[1])&&void 0!==l?l:null),eH=eF||(eB?"https://live.douyin.com/".concat(eB):"")||(eN?"https://live.douyin.com/".concat(eN):"")||(eW?null:eS||null),eY=eO?eM("",v):eM(c,v),eG=(eO?"":A)||(eO?"":T)||eY||(null==h?void 0:h.trim())||(eK?"抖音直播间 ".concat(eK):""),eq=(null==h?void 0:h.trim())&&eG&&h.trim()!==eG?h.trim():"",eJ="youtube_key_rejected"===k.trim().toLowerCase(),eV=(0,Z.useCallback)(async()=>{let e=ey.current.trim();if(!e)return;if(ef.current){ev.current=!0;return}ef.current=!0;let t=++ew.current;try{let n=await o("/status?process=".concat(encodeURIComponent(e),"&light=1"));if(t!==ew.current||e!==ey.current.trim())return;let s=n.process_status||"unknown";f(s),y(n.recent_log||""),N(n.recent_error||""),_(n.business_status||""),z(n.business_note||""),R(Array.isArray(n.ffmpeg_pids)?n.ffmpeg_pids:[]),P("number"==typeof n.log_age_seconds?n.log_age_seconds:null),M(n.source_title||""),U(n.source_room_id||""),I(n.source_url||""),O(n.source_display||""),F(!!n.source_ambiguous),H(!!n.source_current),J(!!n.is_pushing),$("number"==typeof n.ffmpeg_speed?n.ffmpeg_speed:null),Q("number"==typeof n.ffmpeg_frame?n.ffmpeg_frame:null),et("number"==typeof n.ffmpeg_time_seconds?n.ffmpeg_time_seconds:null),es(!!n.ffmpeg_speed_low),ei(!!n.ffmpeg_progress_stalled);let l=!!(n.is_pushing||["streaming","relay_slow"].includes((n.business_status||"").trim().toLowerCase()));l&&!eb.current&&ec(Date.now()),l||ec(null),eb.current=l}catch(n){if(t!==ew.current||e!==ey.current.trim())return;f("error"),_("error"),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),eb.current=!1}finally{ef.current=!1,ev.current&&(ev.current=!1,window.setTimeout(()=>void eV(),0))}},[o]);(0,Z.useEffect)(()=>{if(ey.current=r,ew.current+=1,ev.current=!1,!r){f(""),y(""),N(""),_(""),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),ec(null),eb.current=!1;return}f(""),y(""),N(""),_(""),z(""),R([]),P(null),M(""),U(""),I(""),O(""),F(!1),H(!1),J(!1),$(null),Q(null),et(null),es(!1),ei(!1),ec(null),eb.current=!1,eV()},[r,eV]),(0,Z.useEffect)(()=>{let e=()=>em("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{r&&eV()},[r,eV,m]),(0,Z.useEffect)(()=>{if(ea||!r||x<=0)return;let e=window.setInterval(()=>void eV(),x);return()=>clearInterval(e)},[ea,r,eV,x]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&eV()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[eV]),(0,Z.useEffect)(()=>{if(!eo)return;let e=window.setInterval(()=>eu(e=>e+1),1e3);return()=>clearInterval(e)},[eo]),(0,Z.useEffect)(()=>{if(ea||!ex)return;let e=ep.current;e&&(e.scrollTop=e.scrollHeight)},[v,ea,ex]),(0,Z.useEffect)(()=>{if(ea||!ex)return;let e=eh.current;e&&(e.scrollTop=e.scrollHeight)},[j,ea,ex]);let e$=null==eo?a("—(未检测到在线)","— (not online)"):eA(Math.max(0,Math.floor((Date.now()-eo)/1e3))),eX=ea?a("已暂停刷新","Paused"):x<=0?a("已暂停","Paused"):x>=3e4?a("约 30 秒","~30s"):x>=15e3?a("约 15 秒","~15s"):x>=12e3?a("约 12 秒","~12s"):x>=5e3?a("约 5 秒","~5s"):x>=2500?a("约 2.5 秒","~2.5s"):x>=2e3?a("约 2 秒","~2s"):x>=800?a("约 1 秒","~1s"):"".concat(x,"ms"),eQ=ea?"bg-amber-500/20 text-amber-100 ring-amber-500/35":x>=3e4?"bg-sky-500/15 text-sky-100 ring-sky-500/25":x>=4e3?"bg-zinc-500/15 text-zinc-200/90 ring-zinc-500/25":"bg-emerald-500/15 text-emerald-200/90 ring-emerald-500/25";return(0,s.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-b from-emerald-500/[0.07] to-zinc-950/80 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("span",{className:"sr-only","aria-hidden":!0,children:ed}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:a("当前直播日志","Live process log")}),eL&&!g?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-70"}),(0,s.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),a("推流中","Pushing")]}):null,(0,s.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-300 ring-1 ring-white/10",children:r||"—"}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(eQ),children:eX})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void eV(),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5"}),a("立即拉取","Refresh")]}),(0,s.jsxs)("button",{type:"button",onClick:()=>er(e=>!e),className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs ring-1 ".concat(ea?"bg-amber-500/20 text-amber-100 ring-amber-500/35":"border border-white/10 bg-black/30 text-zinc-300"),children:[ea?(0,s.jsx)(G.Z,{className:"h-3.5 w-3.5"}):(0,s.jsx)(q.Z,{className:"h-3.5 w-3.5"}),ea?a("继续自动刷新","Resume"):a("暂停自动刷新","Pause")]})]})]}),g?null:(0,s.jsxs)("div",{className:"mt-4 space-y-3 rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("进程状态","Process")}),(0,s.jsx)("span",{className:"mt-2 inline-flex rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"online"===t||"running"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"stopped"===t||"stopping"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"not_found"===t||"errored"===t||"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(b)),children:function(e,t){let n=(t||"unknown").toLowerCase();return"online"===n||"running"===n?e("运行中(PM2/进程在线)","Running (process online)"):"stopped"===n||"stopping"===n?e("已停止","Stopped"):"configured"===n?e("已配置(未启动)","Configured (not running)"):"not_found"===n||"errored"===n?e("未运行或未找到","Not running / not found"):"invalid"===n?e("无效进程名","Invalid process"):t||"—"}(a,b)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("业务状态","Business")}),(0,s.jsx)("span",{className:"mt-2 inline-flex max-w-full rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"ready"===t||"configured"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t||"relay_slow"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"waiting_source"===t||"monitoring"===t||"source_live"===t||"relay_starting"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t||"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(k)),title:function(e,t,n){let s=(t||"").toLowerCase();return"ready"===s||"configured"===s?e("已配置,等待启动","Configured and ready to start"):"inactive"===s?e("未运行","Inactive"):"streaming"===s?e("正在推流到 YouTube","Pushing to YouTube"):"relay_slow"===s?e("推流速度偏低","Relay running slowly"):"relay_starting"===s?e("转推 Worker 启动中,等待 FFmpeg 进度","Relay worker starting; waiting for FFmpeg progress"):"waiting_source"===s?e("等待上游直播源开播","Waiting for the upstream live source"):"source_live"===s?e("源站已开播,转推 Worker 未启动","Source live detected, but no active FFmpeg relay worker"):"monitoring"===s?e("进程在线,监控源站中","Process online and monitoring the source"):"misconfigured"===s?e("YouTube 密钥缺失或无效","YouTube key missing or invalid"):"youtube_key_rejected"===s?e("YouTube 推流失败:串流密钥无效、过期或不属于当前直播间","YouTube rejected the stream key"):"source_stalled"===s?e("上游源站卡住","Upstream source stalled"):"stale"===s?e("进程在线但日志心跳过期","Process online but the log heartbeat is stale"):"error"===s?e("检测到近期进程错误","Recent process error detected"):(null==n?void 0:n.trim())?n.trim():e("暂无业务状态","No business-state hint yet")}(a,k,S),children:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n)return e("推流中","Pushing");let s=(t||"").toLowerCase();return"ready"===s||"configured"===s?e("已配置","Ready"):"inactive"===s?e("未运行","Inactive"):"streaming"===s?e("推流中","Pushing"):"relay_slow"===s?e("低速","Slow"):"relay_starting"===s?e("启动中","Starting"):"waiting_source"===s?e("等源","Wait source"):"source_live"===s?e("源开播","Source live"):"monitoring"===s?e("监控中","Monitoring"):"misconfigured"===s?e("密钥异常","Key invalid"):"youtube_key_rejected"===s?e("密钥被拒","Key rejected"):"source_stalled"===s?e("源卡住","Stalled"):"stale"===s?e("心跳过期","Stale"):"error"===s?e("异常","Error"):e("未知","Unknown")}(a,k,eL)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:eL?a("推流时长(估算)","Relay duration (est.)"):a("进程在线时长(估算)","Process uptime (est.)")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm font-semibold text-cyan-200/90",children:e$}),eZ?(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[a("已编码","Encoded")," ",eZ]}):null]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("FFmpeg workers","FFmpeg workers")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm text-zinc-200",children:eI}),null!=L?(0,s.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[a("日志心跳","Log heartbeat")," ",eA(Math.max(0,Math.floor(L)))]}):null]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3 sm:col-span-2 xl:col-span-4",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:a("实时转推指标","Live relay metrics")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-sm ".concat(eT.speedLow?"text-amber-200":eT.progressStalled?"text-rose-200":"text-cyan-100"),children:eD||a("等待 FFmpeg 上报 fps / speed / frame","Waiting for FFmpeg fps / speed / frame")}),(0,s.jsxs)("div",{className:"mt-2 grid gap-2 sm:grid-cols-4 font-mono text-[11px] text-zinc-400",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"fps"}),eC(eT.fps)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"speed"}),eC(eT.speed,"x")]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"frame"}),eC(eT.frame,"",0)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:a("码率","Bitrate")}),null!==(i=ez(eT.bitrate))&&void 0!==i?i:"—"]})]})]})]}),eG?(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:eL&&(null==h?void 0:h.trim())?a("当前转播线路","Current relay lane"):a("当前转播源","Current relay source")}),(0,s.jsx)("p",{className:"mt-1 text-sm font-medium text-zinc-200",children:eG}),eq?(0,s.jsxs)("p",{className:"mt-1 text-xs text-zinc-500",children:[a("抖音源","Douyin"),": ",eq]}):null]}):null,u?(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-zinc-500",children:a("YouTube key 尾码(参考)","YT key suffix")}),(0,s.jsx)("span",{className:"font-mono text-zinc-300",children:d||"—"})]}):null,eJ?(0,s.jsx)("div",{className:"rounded-lg border border-rose-500/30 bg-rose-500/[0.10] px-3 py-2.5 text-xs text-rose-100 ring-1 ring-rose-500/15",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(eg.Z,{className:"mt-0.5 h-4 w-4 shrink-0 text-rose-300","aria-hidden":!0}),(0,s.jsx)("p",{children:a("YouTube 已拒绝本次 RTMPS 推流。请从 YouTube Studio 当前直播间复制完整串流密钥,保存到当前线路后重新开始;如果密钥确认无误,再检查到 YouTube RTMPS 的网络/代理。","YouTube rejected this RTMPS publish. Copy the full stream key for the current live event from YouTube Studio, save it to this lane, then start again; if the key is correct, check network/proxy access to YouTube RTMPS.")})]})}):null,eH?(0,s.jsxs)("div",{className:"rounded-lg border border-violet-500/20 bg-violet-500/[0.06] px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium text-zinc-400",children:eN?a("当前直播源站(日志)","Current source (from log)"):eL?a("配置中的源站地址","Configured source URL"):a("源站快捷入口","Source quick link")}),(0,s.jsxs)("a",{href:eH,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs font-medium text-violet-100 ring-1 ring-violet-500/35 transition hover:bg-violet-500/30",children:[(0,s.jsx)(W.Z,{className:"h-3.5 w-3.5 shrink-0 opacity-90"}),eG||a("打开抖音直播页","Open Douyin live")]})]}),eK&&eG&&!eG.includes(eK)?(0,s.jsxs)("p",{className:"mt-2 font-mono text-[10px] text-zinc-600",children:["room:",eK]}):null,ej.length>1&&eN?(0,s.jsxs)("p",{className:"mt-2 text-[10px] text-zinc-600",children:[a("配置中还有","Also in config:")," ",ej.filter(e=>e!==eK).slice(0,3).map(e=>(0,s.jsx)("a",{href:"https://live.douyin.com/".concat(e),target:"_blank",rel:"noreferrer",className:"ml-1 text-violet-400/90 underline-offset-2 hover:underline",children:e},e)),ej.length>4?"…":null]}):null]}):(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:a("(日志与地址列表中暂无抖音房间)","(No Douyin room in log or URL list)")})]}),"not_found"!==b&&"invalid"!==b?(0,s.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-emerald-400/90",children:a("进程输出(stdout / 合并日志)","Process output")}),(0,s.jsx)("pre",{ref:ep,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-emerald-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-emerald-100/95",children:v.trim()||a("(暂无)","(empty)")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-rose-400/90",children:a("异常信息(stderr)","Stderr")}),(0,s.jsx)("pre",{ref:eh,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-rose-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-rose-100/95",children:j.trim()||a("(暂无)","(empty)")})]})]}):(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:a("进程未在 PM2 / 本地注册表中运行,日志区域已隐藏。","Process not running — log panes hidden.")})]})}function eB(e){return/tiktok/i.test(e.script)||/tiktok/i.test(e.pm2)}let eF=[{id:"720p60",labelZh:"720p @ 60Hz",labelEn:"720p @ 60Hz",spec:"1280x720, 59.94/60Hz, RGB/YUV 有限",hintZh:"板端 HDMI 输出时序与显示端一致;下游画布建议 1280\xd7720。",hintEn:"Match SoC HDMI timing to the display; downstream canvas e.g. 1280\xd7720."},{id:"1080p30",labelZh:"1080p @ 30Hz",labelEn:"1080p @ 30Hz",spec:"1920x1080, 30Hz",hintZh:"带宽紧张时可优先 1080p30;检查线材与接口规格。",hintEn:"Prefer 1080p30 when bandwidth is tight; check cable and port specs."},{id:"1080p60",labelZh:"1080p @ 60Hz",labelEn:"1080p @ 60Hz",spec:"1920x1080, 60Hz, 高刷转播",hintZh:"两端均需稳定支持 1080p60;长时间运行注意散热。",hintEn:"Both ends need stable 1080p60; mind thermals for long runs."}],eW="live-hub-tiktok-hdmi-check-v1",eK="live-hub-tiktok-hdmi-notes-v1",eH="live-hub-tiktok-source-mode-v1";function eY(e){var t;let{t:n,busy:l,entries:i,currentProc:a,setCurrentProc:r,urlConfig:o,setUrlConfig:c,onRunProcess:d,onSaveUrlConfig:u,onReplayGoLive:x,onCopy:m,fetchJson:p,apiPrefix:h,quickLinks:g,hdmiStatus:b,notify:f,onNavigate:v}=e,y=(0,Z.useMemo)(()=>i.filter(eB),[i]),w=y.length?y:i,[j,N]=(0,Z.useState)("srs"),[k,_]=(0,Z.useState)([]),[S,z]=(0,Z.useState)(!1),[L,P]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)("1080p30"),[U,D]=(0,Z.useState)("1080p30"),[I,A]=(0,Z.useState)(!1),[O,B]=(0,Z.useState)(!0),[F,W]=(0,Z.useState)(null),K=(0,Z.useRef)(!1),H=(0,Z.useRef)(o),[G,q]=(0,Z.useState)(""),[J,$]=(0,Z.useState)({}),X=(0,Z.useCallback)(e=>{H.current=e,c(e)},[c]),Q=(0,Z.useCallback)(e=>{N(e);try{window.localStorage.setItem(eH,e)}catch(e){}},[]);(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eH);("ffmpeg"===e||"replay"===e||"srs"===e)&&("ffmpeg"!==e&&"replay"!==e?N(e):N("srs"))}catch(e){}},[]),(0,Z.useEffect)(()=>{K.current=!1},[a]),(0,Z.useEffect)(()=>{H.current=o},[o]);let ee=(0,Z.useCallback)(async()=>{if(a)try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),n=await p("/get_url_config?".concat(t));X(null!==(e=n.content)&&void 0!==e?e:"")}catch(e){}},[X,a,p]);(0,Z.useEffect)(()=>{if(!a||!O||"ffmpeg"!==j)return;let e=window.setInterval(()=>{K.current||ee()},8e3);return()=>clearInterval(e)},[a,O,ee,j]),(0,Z.useEffect)(()=>{"ffmpeg"===j&&a&&ee()},[j,a,ee]);let et=(0,Z.useCallback)(async()=>{if(a){z(!0);try{var e;let t=await p("/tiktok_replay/list?process=".concat(encodeURIComponent(a)));_(null!==(e=t.files)&&void 0!==e?e:[])}catch(e){f(e.message),_([])}finally{z(!1)}}},[a,p,f]);(0,Z.useEffect)(()=>{"replay"===j&&a&&et()},[j,a,et]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eW);e&&$(JSON.parse(e))}catch(e){}try{q(window.localStorage.getItem(eK)||"")}catch(e){}},[]);let en=(0,Z.useCallback)(e=>{$(e);try{window.localStorage.setItem(eW,JSON.stringify(e))}catch(e){}},[]),es=e=>{q(e);try{window.localStorage.setItem(eK,e)}catch(e){}},el=async()=>{if(a){A(!0),W(null),K.current=!1;try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),s=await p("/get_url_config?".concat(t));X(null!==(e=s.content)&&void 0!==e?e:""),W(n("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(e){W(e.message)}finally{A(!1)}}},ei=async()=>{try{await Promise.resolve(u(H.current)),K.current=!1}catch(e){}},ea=async e=>{if(a){P(!0);try{await p("/tiktok_replay/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:a,filename:e})}),f(n("已删除文件","File removed")),await et()}catch(e){f(e.message)}finally{P(!1)}}},er=async e=>{var t;let s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",s&&a){P(!0);try{let e=new FormData;e.append("file",s);let t=await (0,V.N)("".concat(h,"/tiktok_replay/upload?process=").concat(encodeURIComponent(a)),{method:"POST",body:e});f(t.message||n("上传成功","Uploaded")),await et()}catch(e){f(e.message)}finally{P(!1)}}},eo=l||I||L,ec=eF.find(e=>e.id===U),ed=!!(null==b?void 0:b.can_stream_hdmi),ep=(null==b?void 0:b.preferred_device)||(null==b?void 0:null===(t=b.video_devices)||void 0===t?void 0:t[0])||"";return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[v?(0,s.jsx)(eh,{t:n,title:n("TikTok HDMI 硬件链路","TikTok HDMI hardware chain"),subtitle:n("板端编码经 HDMI 到显示/下游设备;与「网络」页顶卡相同的箭头风格。","Encode on SoC → HDMI → display/downstream; same arrow style as Network header."),onNavigate:v,steps:[{label:"FFmpeg",sub:n("采集 / 推流","Capture"),gradient:"from-cyan-400 to-blue-500",target:"live_tiktok"},{label:"HDMI",sub:n("板载输出","SoC out"),gradient:"from-violet-500 to-fuchsia-500"},{label:"Android",sub:n("AOSP / 手机","AOSP"),gradient:"from-amber-400 to-orange-500",target:"android"}]}):null,(0,s.jsx)("div",{className:"rounded-2xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.14] via-zinc-950/80 to-fuchsia-500/10 p-6 shadow-xl shadow-cyan-900/10",children:(0,s.jsx)("div",{className:"flex flex-wrap items-start gap-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/35 to-fuchsia-600/25 ring-1 ring-white/10",children:(0,s.jsx)(R.Z,{className:"h-5 w-5 text-cyan-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:n("TikTok 无人直播(单路)","TikTok unmanned (single lane)")}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:n("布局对齐 YouTube 单频道:直播开关 + 源站 + URL_config;无 stream key,输出走 HDMI 硬件链路。","Same layout as YouTube single: controls + URLs; no stream key — HDMI hardware path.")})]})]})})}),(0,s.jsx)("div",{className:"rounded-2xl border border-cyan-500/20 bg-cyan-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:(0,s.jsx)("p",{className:"text-xs leading-relaxed text-cyan-100/90",children:n("HDMI 互斥:后端在「开始 / 重新开始」TikTok 或 obs*.sh(SRS 拉流上屏)时,会自动停止其它正在占用 HDMI 链路的同类进程;与 YouTube 推流互不干扰。","HDMI mutex: starting TikTok or obs*.sh stops other TikTok/OBS HDMI sinks; YouTube RTMP is unaffected.")})}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-300"}),n("X86 HDMI 采集状态","X86 HDMI capture status")]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("这里直接显示主机是否识别到采集卡和 /dev/video 设备,可用于验证 ARM HDMI 进 X86 的链路。","Shows whether the host sees the capture card and /dev/video nodes for ARM-to-X86 HDMI ingest.")})]}),(0,s.jsx)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ring-1 ".concat(ed?"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-rose-500/25"),children:ed?n("可推流","Ready"):n("未就绪","Not ready")})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"device: "}),(0,s.jsx)("span",{className:"font-mono text-zinc-200",children:ep||"—"})]}),(0,s.jsxs)("p",{className:"mt-2",children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"video nodes: "}),(0,s.jsx)("span",{className:"font-mono text-zinc-200",children:((null==b?void 0:b.video_devices)||[]).join(", ")||"—"})]}),(0,s.jsxs)("p",{className:"mt-2",children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"usb matches: "}),(0,s.jsx)("span",{className:"text-zinc-300",children:((null==b?void 0:b.usb_capture_matches)||[]).length||0})]})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,s.jsx)("p",{className:"text-zinc-600",children:n("建议 FFmpeg","Suggested FFmpeg")}),(0,s.jsx)("p",{className:"mt-2 break-all font-mono text-zinc-200",children:(null==b?void 0:b.suggested_ffmpeg_cmd)||"—"}),(null==b?void 0:b.suggested_ffmpeg_cmd)?(0,s.jsxs)("button",{type:"button",onClick:()=>m(b.suggested_ffmpeg_cmd||""),className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-medium text-cyan-100 ring-1 ring-cyan-500/25",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),n("复制命令","Copy command")]}):null]})]}),((null==b?void 0:b.issues)||[]).length?(0,s.jsx)("ul",{className:"mt-4 list-inside list-disc space-y-1 text-[11px] text-amber-200/85",children:((null==b?void 0:b.issues)||[]).map(e=>(0,s.jsx)("li",{children:e},e))}):null]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,s.jsx)(Y.Z,{className:"h-4 w-4"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("直播开关","Live control")})]}),(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:n("TikTok 进程(PM2)","TikTok PM2 process")}),(0,s.jsx)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:a,onChange:e=>r(e.target.value),children:w.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[e.label," (",e.pm2,")"]},e.pm2))}),(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:n("直播源","Video source")}),(0,s.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:j,onChange:e=>Q(e.target.value),children:[(0,s.jsx)("option",{value:"ffmpeg",hidden:!0,children:"FFmpeg(抖音 / TikTok 等直播间 URL)"}),(0,s.jsx)("option",{value:"replay",hidden:!0,children:n("录播素材(本地上传)","VOD upload")}),(0,s.jsx)("option",{value:"srs",children:n("SRS(OBS 推流)","SRS (OBS)")})]}),"srs"===j?(0,s.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-amber-200/85",children:n("此模式不显示 URL_config:请在 OBS 中填写下方 RTMP 推流地址;板端 SRS 拉流上屏仍可能占用 HDMI,与 TikTok 进程互斥规则不变。","URL_config is hidden: set the RTMP URL in OBS. SRS pull-to-HDMI may still mutex with TikTok per server rules.")}):null,(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[["start",n("开始直播","Start"),"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30"],["stop",n("停止直播","Stop"),"bg-rose-500/15 text-rose-200 ring-rose-500/25"],["restart",n("重新开始","Restart"),"bg-amber-500/15 text-amber-200 ring-amber-500/25"]].map(e=>{let[t,n,l]=e;return(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>d(t),className:"rounded-xl px-4 py-3 text-sm font-medium ring-1 ".concat(l),children:n},t)})}),(0,s.jsxs)("p",{className:"mt-3 text-center text-[11px] text-zinc-500",children:[n("当前 HDMI 预设(备忘)","HDMI preset (memo)"),":"," ",(0,s.jsx)("span",{className:"font-mono text-cyan-300/90",children:ec?n(ec.labelZh,ec.labelEn):U})]})]}),"replay"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(ex.Z,{className:"h-4 w-4 text-violet-300"}),n("录播素材","VOD library")]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-xl bg-violet-500/15 px-3 py-2 text-xs font-medium text-violet-100 ring-1 ring-violet-500/30",children:[(0,s.jsx)(em.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:n("上传视频","Upload")}),(0,s.jsx)("input",{type:"file",accept:".mp4,.mkv,.ts,.flv,.mov,.m4v,.webm",className:"hidden",onChange:er})]}),(0,s.jsx)("button",{type:"button",disabled:eo||!a,onClick:()=>void et(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-300",children:n("刷新列表","Refresh")})]})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:n("文件保存在服务器 config/tiktok_replay/对应进程目录;点「开始直播」会写入 replayfile 行并启动 PM2 进程。停播请用上方「停止直播」。","Files under config/tiktok_replay/. Go live writes replayfile + starts PM2. Use Stop above to stop.")}),S?(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:n("加载中…","Loading…")}):0===k.length?(0,s.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:n("暂无文件,请先上传。","No files yet.")}):(0,s.jsx)("ul",{className:"mt-4 space-y-2",children:k.map(e=>(0,s.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-white/10 bg-black/30 px-3 py-2 text-xs text-zinc-300",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",children:e.name}),(0,s.jsxs)("span",{className:"shrink-0 text-zinc-500",children:[(e.size/1048576).toFixed(1)," MB"]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void(async()=>{try{await Promise.resolve(x(e.replay_url,e.name))}catch(e){}})(),className:"rounded-lg bg-emerald-500/20 px-2 py-1 text-[11px] text-emerald-100 ring-1 ring-emerald-500/30",children:n("开始直播","Go live")}),(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>d("stop"),className:"rounded-lg bg-rose-500/15 px-2 py-1 text-[11px] text-rose-100 ring-1 ring-rose-500/25",children:n("停播","Stop")}),(0,s.jsxs)("button",{type:"button",disabled:eo,onClick:()=>void ea(e.name),className:"inline-flex items-center gap-1 rounded-lg bg-zinc-700/40 px-2 py-1 text-[11px] text-zinc-200",children:[(0,s.jsx)(C.Z,{className:"h-3 w-3"}),n("删除","Del")]})]})]},e.name))})]}):null,"srs"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-emerald-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("SRS / OBS 推流","SRS / OBS ingest")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("OBS:设置 → 推流 → 服务选「自定义」,服务器填 RTMP 地址;串流密钥可与 SRS 应用配置一致(默认 live/livestream)。","OBS → Stream → Custom: RTMP URL as server; stream key per SRS app (default live/livestream).")}),(0,s.jsxs)("dl",{className:"mt-4 space-y-3 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("RTMP 推流地址(OBS 服务器)","RTMP publish URL")}),(0,s.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-emerald-200/90",children:[(0,s.jsx)("span",{className:"break-all",children:g.srs_rtmp_publish||"—"}),g.srs_rtmp_publish?(0,s.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_rtmp_publish),children:(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("HTTP-FLV 预览","HTTP-FLV preview")}),(0,s.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-zinc-400",children:[(0,s.jsx)("span",{className:"break-all",children:g.srs_play_flv||g.srs_http||"—"}),g.srs_play_flv||g.srs_http?(0,s.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_play_flv||g.srs_http),children:(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:n("SRS 控制台","SRS web UI")}),(0,s.jsx)("dd",{className:"mt-1 font-mono text-zinc-400",children:(0,s.jsx)("a",{href:g.srs_http||"#",target:"_blank",rel:"noreferrer",className:"text-cyan-300 hover:underline",children:g.srs_http||"—"})})]})]})]}):null,(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-400"}),n("HDMI 硬件与时序","HDMI timing")]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("点选一路作为现场备忘;与板端 ffmpeg/OBS 采集参数对齐。","Pick a preset as field memo; match capture settings.")}),(0,s.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:eF.map(e=>{let t=T===e.id,l=U===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>{E(t?null:e.id),D(e.id)},className:"rounded-2xl border p-4 text-left transition ".concat(l?"border-cyan-500/50 ring-1 ring-cyan-500/20":""," ").concat(t?"border-cyan-500/40 bg-cyan-500/10":"border-white/[0.08] bg-zinc-950/50 hover:border-white/15"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eu.Z,{className:"h-4 w-4 text-cyan-400"}),n(e.labelZh,e.labelEn)]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:e.spec}),t?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:n(e.hintZh,e.hintEn)}):null]},e.id)})}),(0,s.jsxs)("div",{className:"mt-6 rounded-xl border border-white/5 bg-black/25 p-4",children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-zinc-400",children:n("上线前检查清单(本地保存)","Pre-flight checklist (local)")}),(0,s.jsx)("ul",{className:"mt-3 space-y-2",children:[{id:"cable",zh:"HDMI 线材插紧、方向正确(如需转接头确认规格)",en:"HDMI cable seated; adapter specs OK"},{id:"thermal",zh:"长时间推流注意散热,过热会掉帧黑屏",en:"Thermal headroom for long runs"}].map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-xs text-zinc-400",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-0.5 rounded border-white/20 bg-black/40",checked:!!J[e.id],onChange:t=>en({...J,[e.id]:t.target.checked})}),(0,s.jsx)("span",{children:n(e.zh,e.en)})]},e.id))}),(0,s.jsx)("label",{className:"mt-4 block text-[11px] text-zinc-500",children:n("HDMI / 走线备忘","HDMI / wiring notes")}),(0,s.jsx)("textarea",{className:"mt-1 min-h-[72px] w-full resize-y rounded-lg border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:G,onChange:e=>es(e.target.value),spellCheck:!1,placeholder:n("接口、线长、显示器型号…","Ports, cable length, display model…")})]})]}),"ffmpeg"===j?(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:n("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,s.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 text-xs text-cyan-300 hover:text-cyan-200",onClick:()=>m(o),children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),n("复制全文","Copy all")]})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:n("一行一个地址;可勾选自动从服务器刷新,或点「重新读取」手动同步。","One URL per line; enable auto-refresh or reload from server.")}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:O,onChange:e=>B(e.target.checked)}),n("每 8 秒自动从服务器刷新","Auto-refresh from server every 8s")]})}),F?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:F}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:o,onChange:e=>{K.current=!0,X(e.target.value)},spellCheck:!1}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void el(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-300",children:n("重新读取","Reload from server")}),(0,s.jsx)("button",{type:"button",disabled:eo,onClick:()=>void ei(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm font-medium text-cyan-100 ring-1 ring-cyan-500/30",children:n("保存 URL 配置","Save URL config")})]})]}):null,(0,s.jsx)(eO,{t:n,currentProc:a,fetchJson:p,urlListText:"ffmpeg"===j?o:"",keySuffixUi:"",showKeyRow:!1})]})}var eG=n(6843),eq=n(1458),eJ=n(5725);function eV(e){e.traverse(e=>{e.geometry&&e.geometry.dispose();let t=e.material;Array.isArray(t)?t.forEach(e=>e.dispose()):t&&t.dispose()})}function e$(e){let{tr:t,className:l="",liveActive:i=0,onOpenStudio:a}=e,r=(0,Z.useRef)(null),o=(0,Z.useRef)(null),[d,u]=(0,Z.useState)("idle"),[x,m]=(0,Z.useState)(0),h=(0,Z.useRef)(i);h.current=i;let g=(0,Z.useCallback)(()=>{u("idle"),m(e=>e+1)},[]);return(0,Z.useEffect)(()=>{let e;let t=o.current,s=r.current;if(!t||!s)return;let l=!1,i=0,a=null,c=!1,d=0,x=()=>{cancelAnimationFrame(i),cancelAnimationFrame(d),null==a||a.disconnect(),null==e||e(),e=void 0,t.replaceChildren()},m=()=>{if(l||c)return;let a=t.clientWidth,r=t.clientHeight;a<16||r<16||(c=!0,u("loading"),n.e(467).then(n.bind(n,8116)).then(t=>{let n;if(l||!o.current)return;let a=o.current,r=a.clientWidth,c=a.clientHeight,d=new t.Scene,x=new t.PerspectiveCamera(48,r/c,.1,80);x.position.set(0,1.1,7.2);try{n=new t.WebGLRenderer({antialias:!0,alpha:!0,powerPreference:"high-performance"})}catch(e){l||u("failed");return}n.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),n.setSize(r,c,!1),n.setClearColor(0,0);let m=n.domElement;m.style.display="block",m.style.width="100%",m.style.height="100%",a.replaceChildren(m);let p=new t.HemisphereLight(16762092,4482815,.85);d.add(p);let g=new t.DirectionalLight(16777215,.9);g.position.set(4,8,6),d.add(g);let b=new t.PointLight(8189439,.6,20);b.position.set(-3,2,-2),d.add(b);let f=new t.Group,v=new t.MeshStandardMaterial({color:2762048,metalness:.15,roughness:.55}),y=new t.MeshStandardMaterial({color:16724821,emissive:4456465,metalness:.35,roughness:.25}),w=new t.MeshStandardMaterial({color:16777215,emissive:2236962,metalness:.2,roughness:.3}),j=new t.MeshStandardMaterial({color:2487534,emissive:340024,metalness:.25,roughness:.35}),N=new t.MeshStandardMaterial({color:16657493,emissive:2229520,metalness:.2,roughness:.4}),k=new t.Mesh(new t.BoxGeometry(3.2,.35,2.2),v);k.position.y=-.85,f.add(k);let _=new t.Mesh(new t.TorusGeometry(.72,.09,12,48),y);_.rotation.x=Math.PI/2,_.position.set(-.85,.15,.2),f.add(_);let S=new t.Mesh(new t.ConeGeometry(.35,.5,3),w);S.rotation.z=-Math.PI/2,S.rotation.y=Math.PI,S.position.set(-.55,.18,.2),f.add(S);let z=new t.Mesh(new t.CylinderGeometry(.22,.28,.95,20),j);z.position.set(1.05,.35,-.15),z.rotation.z=.12,f.add(z);let C=new t.Mesh(new t.SphereGeometry(.26,16,16),N);C.position.set(1.05,.92,-.15),f.add(C);let R=new t.BufferGeometry,L=new Float32Array(360);for(let e=0;e<120;e++)L[3*e]=(Math.random()-.5)*14,L[3*e+1]=(Math.random()-.3)*8,L[3*e+2]=(Math.random()-.5)*8-2;R.setAttribute("position",new t.BufferAttribute(L,3));let P=new t.PointsMaterial({color:16777215,size:.06,transparent:!0,opacity:.7}),T=new t.Points(R,P);d.add(T),d.add(f);let M=0,E=0,U=e=>{let t=a.getBoundingClientRect();t.width&&t.height&&(M=((e.clientX-t.left)/t.width-.5)*2,E=((e.clientY-t.top)/t.height-.5)*2)},Z=()=>{M=0,E=0};s.addEventListener("pointermove",U),s.addEventListener("pointerleave",Z);let D=performance.now(),I=!document.hidden,A=()=>{I=!document.hidden};document.addEventListener("visibilitychange",A);let O=()=>{if(l||(i=requestAnimationFrame(O),!I))return;let e=(performance.now()-D)/1e3,t=h.current,s=t>0?.5+.5*Math.sin(4*e):0;f.rotation.y=.25*Math.sin(.35*e)+.12*e+.08*M,f.rotation.x=-.06*E,f.position.y=.06*Math.sin(.9*e),_.rotation.z=.4*e,T.rotation.y=.02*e,x.position.x+=(.35*M-x.position.x)*.06,x.position.y+=(1.1+-.2*E-x.position.y)*.06,x.lookAt(0,.1,0),t>0?(y.emissive.setHex(4456465),y.emissiveIntensity=.4+1.2*s,j.emissiveIntensity=.3+.5*s):(y.emissiveIntensity=1,j.emissiveIntensity=1),n.render(d,x)};O();let B=new ResizeObserver(()=>{if(!o.current||l)return;let e=o.current.clientWidth,t=o.current.clientHeight;e<16||t<16||(x.aspect=e/t,x.updateProjectionMatrix(),n.setSize(e,t,!1))});B.observe(a),l||u("ready"),e=()=>{var e;document.removeEventListener("visibilitychange",A),s.removeEventListener("pointermove",U),s.removeEventListener("pointerleave",Z),B.disconnect(),eV(f),eV(T),R.dispose(),P.dispose(),n.dispose(),null===(e=n.forceContextLoss)||void 0===e||e.call(n),a.replaceChildren()}}).catch(()=>{l||u("failed")}))},p=0,g=()=>{l||c||(p+=1,m(),!c&&p<120?d=requestAnimationFrame(g):!c&&p>=120&&u("failed"))};return(a=new ResizeObserver(()=>{c||m()})).observe(t),g(),()=>{l=!0,x()}},[x]),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col ".concat(l),children:[(0,s.jsxs)("div",{className:"mb-2 flex shrink-0 items-center justify-between gap-2 px-1",children:[(0,s.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wider text-fuchsia-200/80",children:t("直播工作室 \xb7 3D","Live studio \xb7 3D")}),i>0?(0,s.jsxs)("span",{className:"studio-live-badge inline-flex items-center gap-1 rounded-full bg-rose-500/20 px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide text-rose-100 ring-1 ring-rose-400/40",children:[(0,s.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-70"}),(0,s.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-rose-400"})]}),"LIVE \xd7",i]}):null]}),(0,s.jsxs)("div",{ref:r,className:"studio-scene-shell relative min-h-0 flex-1 overflow-hidden rounded-xl bg-gradient-to-b from-fuchsia-950/40 to-cyan-950/20 ring-1 ring-white/10",children:[(0,s.jsx)("div",{ref:o,className:"absolute inset-0","aria-hidden":!0}),"idle"===d||"loading"===d?(0,s.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,s.jsx)("div",{className:"studio-scene-shimmer absolute inset-0 opacity-60"}),(0,s.jsx)(p.Z,{className:"relative h-5 w-5 animate-pulse text-fuchsia-300/70"}),(0,s.jsx)("p",{className:"relative text-[10px] text-zinc-500",children:t("加载 3D 场景…","Loading 3D scene…")})]}):null,"failed"===d?(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 px-4 text-center",children:[(0,s.jsx)(c.Z,{className:"h-8 w-8 text-fuchsia-300/70"}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-400",children:t("WebGL 不可用,已显示占位预览","WebGL unavailable — showing placeholder")}),(0,s.jsxs)("button",{type:"button",onClick:g,className:"inline-flex items-center gap-1.5 rounded-lg border border-fuchsia-400/30 bg-fuchsia-500/10 px-3 py-1.5 text-[10px] font-semibold text-fuchsia-100 transition hover:bg-fuchsia-500/20",children:[(0,s.jsx)(w.Z,{className:"h-3 w-3"}),t("重试","Retry")]})]}):null,a?(0,s.jsxs)("button",{type:"button",onClick:a,className:"absolute bottom-2 right-2 z-10 inline-flex items-center gap-1 rounded-lg border border-white/10 bg-black/45 px-2.5 py-1 text-[10px] font-semibold text-zinc-200 backdrop-blur-sm transition hover:border-fuchsia-400/35 hover:bg-black/60 hover:text-white",children:[(0,s.jsx)(p.Z,{className:"h-3 w-3 text-fuchsia-300"}),t("进入工作室","Open studio")]}):null]})]})}function eX(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],n=e,s=0;for(;n>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function eQ(e){let t=eX(e);return"—"===t?t:"".concat(t,"/s")}function e0(e,t){return t&&Number.isFinite(e)&&Number.isFinite(t)?Math.min(100,Math.max(0,Math.round(e/t*100))):0}function e1(e){return"online"===e||"running"===e||"streaming"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}let e5=[{id:"live_youtube",zh:"YouTube 无人直播",en:"YouTube Live",icon:Y.Z,accent:"from-rose-500/20 to-violet-500/10 text-rose-100 ring-rose-500/25"},{id:"live_tiktok",zh:"TikTok HDMI",en:"TikTok HDMI",icon:c.Z,accent:"from-cyan-500/20 to-sky-500/10 text-cyan-100 ring-cyan-500/25"},{id:"android",zh:"安卓投屏",en:"Android",icon:d.Z,accent:"from-emerald-500/20 to-teal-500/10 text-emerald-100 ring-emerald-500/25"},{id:"services",zh:"服务编排",en:"Services",icon:r.Z,accent:"from-indigo-500/20 to-violet-500/10 text-indigo-100 ring-indigo-500/25"},{id:"network",zh:"网络 / WG",en:"Network",icon:E.Z,accent:"from-amber-500/20 to-orange-500/10 text-amber-100 ring-amber-500/25"},{id:"studio",zh:"工作室",en:"Studio",icon:p.Z,accent:"from-fuchsia-500/20 to-pink-500/10 text-fuchsia-100 ring-fuchsia-500/25"}],e2=["control_plane","netdata","filebrowser","webtty","neko_browser","srs_http","youtube_events"];function e3(e){let{label:t,value:n,sub:l,pct:i,icon:a,theme:r}=e,o=2*Math.PI*18,c=null!=i?i/100*o:0;return(0,s.jsx)("div",{className:"group relative overflow-hidden rounded-2xl border p-3.5 transition hover:-translate-y-0.5 ".concat("light"===r?"border-slate-200/90 bg-white/90 shadow-sm shadow-slate-200/40":"border-white/[0.07] bg-gradient-to-br from-white/[0.06] to-transparent shadow-lg shadow-black/20"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a,{className:"h-4 w-4 shrink-0 ".concat("light"===r?"text-violet-600":"text-violet-300/90")}),(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:t})]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-xl font-bold leading-none ".concat("light"===r?"text-slate-900":"text-white"),children:n}),(0,s.jsx)("p",{className:"mt-1 text-[10px] text-zinc-500",children:l})]}),null!=i?(0,s.jsxs)("svg",{className:"h-11 w-11 shrink-0 -rotate-90",viewBox:"0 0 44 44","aria-hidden":!0,children:[(0,s.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"stroke-white/10",strokeWidth:"4"}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"".concat(i>=90?"stroke-rose-400":i>=75?"stroke-amber-400":"stroke-cyan-400"," transition-all duration-500"),strokeWidth:"4",strokeDasharray:"".concat(c," ").concat(o),strokeLinecap:"round"}),(0,s.jsxs)("text",{x:"22",y:"24",textAnchor:"middle",className:"fill-zinc-400 text-[8px] font-bold rotate-90 origin-center",children:[i,"%"]})]}):null]})})}function e4(e){let{id:t,title:n,subtitle:l,defaultOpen:i=!0,theme:a,children:r,badge:o}=e,[c,d]=(0,Z.useState)(i);return(0,s.jsxs)("section",{id:t,className:"overflow-hidden rounded-2xl border ".concat("light"===a?"border-slate-200/90 bg-white/80":"border-white/[0.07] bg-zinc-950/35"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex w-full items-center gap-3 px-4 py-3.5 text-left transition ".concat("light"===a?"hover:bg-slate-50":"hover:bg-white/[0.03]"),"aria-expanded":c,children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===a?"text-slate-900":"text-white"),children:n}),o]}),l?(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:l}):null]}),(0,s.jsx)(eG.Z,{className:"h-4 w-4 shrink-0 text-zinc-500 transition ".concat(c?"rotate-180":"")})]}),c?(0,s.jsx)("div",{className:"border-t border-white/[0.05] px-4 pb-4 pt-3",children:r}):null]})}function e6(e){let{theme:t}=e;return(0,s.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,s.jsx)("div",{className:"h-28 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")}),(0,s.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:Array.from({length:4}).map((e,n)=>(0,s.jsx)("div",{className:"h-24 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")},n))}),(0,s.jsx)("div",{className:"h-72 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")})]})}function e8(e){var t,n,i,c,d,u,x,m,p,h,g,b,f,v,y,w,j,N,k,S,z,C,R,L,T,M,U,D,I,A,O,B,F,K,H,Y,G,q,J,V,$,X,Q,ee,et,en,es,el,ei,ea,er,eo,ec,ed;let{dash:eu,deployCheck:ex,dashErr:em,loading:eh,theme:eg,t:eb,onNavigate:ef,nekoLinks:ev,nekoPortsLabel:ey,showStreamProbes:ew,quickLinks:ej}=e,eN=null!==(Q=null==eu?void 0:null===(t=eu.services)||void 0===t?void 0:t.filter(e=>e.running).length)&&void 0!==Q?Q:0,ek=null!==(ee=null==eu?void 0:null===(n=eu.services)||void 0===n?void 0:n.length)&&void 0!==ee?ee:0,e_=(null==eu?void 0:null===(c=eu.snapshot)||void 0===c?void 0:null===(i=c.memory)||void 0===i?void 0:i.total)||0,eS=null!==(en=null!==(et=null==eu?void 0:null===(u=eu.snapshot)||void 0===u?void 0:null===(d=u.memory)||void 0===d?void 0:d.available)&&void 0!==et?et:null==eu?void 0:null===(m=eu.snapshot)||void 0===m?void 0:null===(x=m.memory)||void 0===x?void 0:x.free)&&void 0!==en?en:0,ez=Math.max(0,e_-eS),eC=(null==eu?void 0:null===(h=eu.snapshot)||void 0===h?void 0:null===(p=h.disk)||void 0===p?void 0:p.total)||0,eR=(null==eu?void 0:null===(b=eu.snapshot)||void 0===b?void 0:null===(g=b.disk)||void 0===g?void 0:g.free)||0,eL=(null==eu?void 0:null===(f=eu.live)||void 0===f?void 0:f.processes)||[],eP=(null==eu?void 0:null===(v=eu.live_events)||void 0===v?void 0:v.process_digest)||[],eT=eP.filter(e=>{let t=(e.status||"").toLowerCase();return"online"===t||"running"===t||"streaming"===t}).length,eM=(0,Z.useMemo)(()=>e2.map(e=>({key:e,url:ej[e]})).filter(e=>e.url&&/^https?:\/\//i.test(e.url)),[ej]),eE=(0,Z.useMemo)(()=>((null==eu?void 0:eu.services)||[]).filter(e=>["live-console","live-edge","srs","neko","shellcrash"].some(t=>e.service_id.includes(t.replace("live-",""))||e.service_id===t)).slice(0,6),[null==eu?void 0:eu.services]);return eh&&!eu?(0,s.jsx)(e6,{theme:eg}):(0,s.jsxs)("div",{className:"space-y-5",children:[em?(0,s.jsxs)("div",{className:"rounded-2xl border border-rose-500/25 bg-rose-950/20 p-4 text-sm text-rose-200",children:[eb("无法加载仪表盘:","Dashboard error: "),em]}):null,(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"relative overflow-hidden rounded-2xl border p-4 sm:p-5 ".concat("light"===eg?"border-violet-200/80 bg-gradient-to-br from-violet-50 via-white to-cyan-50 shadow-sm":"border-violet-500/20 bg-gradient-to-br from-violet-600/10 via-zinc-950/80 to-cyan-500/10"),children:[(0,s.jsx)("div",{className:"pointer-events-none absolute -right-8 -top-8 h-40 w-40 rounded-full bg-fuchsia-500/15 blur-3xl"}),(0,s.jsx)("div",{className:"pointer-events-none absolute -bottom-10 left-1/3 h-32 w-32 rounded-full bg-cyan-500/10 blur-3xl"}),(0,s.jsxs)("div",{className:"relative flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-semibold text-emerald-200 ring-1 ring-emerald-500/30",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60"}),(0,s.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),(null==eu?void 0:null===(y=eu.stack)||void 0===y?void 0:y.hostname)||"live"]}),(null==ex?void 0:ex.ready)?(0,s.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-200 ring-1 ring-emerald-500/20",children:eb("交付就绪","Deploy ready")}):ex?(0,s.jsx)("span",{className:"rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-200 ring-1 ring-amber-500/20",children:eb("待验收","Needs checks")}):null,eT>0?(0,s.jsxs)("span",{className:"rounded-full bg-rose-500/15 px-2 py-0.5 text-[10px] font-semibold text-rose-100 ring-1 ring-rose-500/25",children:[eT," ",eb("路直播活跃","live lanes active")]}):null]}),(0,s.jsxs)("h2",{className:"mt-2 text-lg font-bold tracking-tight sm:text-xl ".concat("light"===eg?"text-slate-900":"text-white"),children:[(null==eu?void 0:null===(w=eu.stack)||void 0===w?void 0:w.mdns_host)||"live.local",(0,s.jsx)("span",{className:"ml-2 text-sm font-normal ".concat("light"===eg?"text-slate-500":"text-zinc-500"),children:((null==eu?void 0:null===(j=eu.stack)||void 0===j?void 0:j.ips)||[]).join(" \xb7 ")||"—"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[null==eu?void 0:null===(N=eu.stack)||void 0===N?void 0:N.machine," \xb7 ",null==eu?void 0:null===(k=eu.stack)||void 0===k?void 0:k.kernel," \xb7 Python ",(null==eu?void 0:null===(S=eu.stack)||void 0===S?void 0:S.python)||"—"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:eM.slice(0,4).map(e=>(0,s.jsxs)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border px-3 py-2 text-[11px] font-medium transition hover:-translate-y-0.5 ".concat("light"===eg?"border-slate-200 bg-white text-slate-700 shadow-sm":"border-white/10 bg-black/30 text-zinc-200 hover:bg-black/45"),children:[e.key.replace(/_/g," "),(0,s.jsx)(W.Z,{className:"h-3 w-3 opacity-60"})]},e.key))})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 xl:grid-cols-6",children:e5.map((e,t)=>(0,s.jsxs)(l.E.button,{type:"button",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},whileTap:{scale:.98},onClick:()=>ef(e.id),className:"flex items-center gap-2 rounded-xl border bg-gradient-to-br px-3 py-3 text-left text-[11px] font-semibold ring-1 transition ".concat(e.accent),children:[(0,s.jsx)(e.icon,{className:"h-4 w-4 shrink-0 opacity-90"}),(0,s.jsx)("span",{className:"line-clamp-2 leading-snug",children:eb(e.zh,e.en)}),(0,s.jsx)(_.Z,{className:"ml-auto h-3.5 w-3.5 shrink-0 opacity-50"})]},e.id))}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsx)(e3,{theme:eg,icon:eq.Z,label:eb("CPU 1m","CPU 1m"),value:null!==(es=null==eu?void 0:null===(R=eu.snapshot)||void 0===R?void 0:null===(C=R.cpu_load)||void 0===C?void 0:null===(z=C["1m"])||void 0===z?void 0:z.toFixed(2))&&void 0!==es?es:"—",sub:"5m ".concat(null!==(el=null==eu?void 0:null===(M=eu.snapshot)||void 0===M?void 0:null===(T=M.cpu_load)||void 0===T?void 0:null===(L=T["5m"])||void 0===L?void 0:L.toFixed(2))&&void 0!==el?el:"—"," \xb7 15m ").concat(null!==(ei=null==eu?void 0:null===(I=eu.snapshot)||void 0===I?void 0:null===(D=I.cpu_load)||void 0===D?void 0:null===(U=D["15m"])||void 0===U?void 0:U.toFixed(2))&&void 0!==ei?ei:"—")}),(0,s.jsx)(e3,{theme:eg,icon:a.Z,label:eb("内存","Memory"),value:eX(eS),sub:"/ ".concat(eX(e_)),pct:e_?e0(ez,e_):void 0}),(0,s.jsx)(e3,{theme:eg,icon:P.Z,label:eb("磁盘","Disk"),value:eX(eR),sub:eb("可用","free"),pct:eC?e0(Math.max(0,eC-eR),eC):void 0}),(0,s.jsx)(e3,{theme:eg,icon:r.Z,label:eb("服务","Services"),value:"".concat(eN,"/").concat(ek||"—"),sub:function(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),s=Math.floor(t%86400/3600),l=Math.floor(t%3600/60);return n>0?"".concat(n,"d ").concat(s,"h"):s>0?"".concat(s,"h ").concat(l,"m"):"".concat(l,"m")}(null==eu?void 0:null===(A=eu.snapshot)||void 0===A?void 0:A.uptime_seconds)+" "+eb("运行","uptime")})]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-5 xl:items-stretch",children:[(0,s.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-3 rounded-2xl border p-3 backdrop-blur-xl ".concat("light"===eg?"border-slate-200/90 bg-white/85":"border-white/[0.07] bg-zinc-950/40"),children:(0,s.jsx)(eJ.Z,{snapshot:null!==(ea=null==eu?void 0:eu.snapshot)&&void 0!==ea?ea:null,theme:eg,tr:eb,compact:!0})}),(0,s.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.05},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-2 rounded-2xl border p-3 ".concat("light"===eg?"border-fuchsia-200/80 bg-gradient-to-br from-fuchsia-50/90 via-white to-cyan-50/70":"border-fuchsia-500/20 bg-gradient-to-br from-fuchsia-500/10 via-zinc-950/60 to-cyan-500/10"),children:(0,s.jsx)(e$,{tr:eb,className:"h-full",liveActive:eT,onOpenStudio:()=>ef("studio")})})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-violet-200/70 bg-white/90":"border-violet-500/20 bg-gradient-to-br from-violet-500/[0.08] to-transparent"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:eb("直播进程","Live processes")}),(0,s.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-400",children:(null==eu?void 0:null===(O=eu.live)||void 0===O?void 0:O.backend_mode)||"—"})]}),(0,s.jsxs)("ul",{className:"mt-3 max-h-52 space-y-2 overflow-y-auto pr-1",children:[(eL.length?eL:eP).slice(0,8).map(e=>{let t="pm2"in e?e.pm2:"",n="label"in e&&e.label||t,l="process_status"in e&&e.process_status||"status"in e&&e.status||"",i="".concat(t," ").concat(n).toLowerCase(),a=i.includes("tiktok")||i.includes("hdmi")?"live_tiktok":i.includes("youtube")||i.includes("yt")?"live_youtube":null;return(0,s.jsxs)("li",{role:a?"button":void 0,tabIndex:a?0:void 0,onClick:a?()=>ef(a):void 0,onKeyDown:a?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ef(a))}:void 0,className:"flex items-center gap-3 rounded-xl border px-3 py-2 transition ".concat("light"===eg?"border-slate-200 bg-slate-50/80":"border-white/[0.06] bg-black/25 hover:border-violet-400/20"," ").concat(a?"cursor-pointer hover:-translate-y-px hover:border-violet-400/30":""),children:[(0,s.jsx)(o.Z,{className:"h-4 w-4 shrink-0 text-violet-300/80"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:n}),(0,s.jsx)("p",{className:"truncate font-mono text-[10px] text-zinc-600",children:t})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ".concat(e1(l||"")),children:function(e,t){let n=(e||"").trim().toLowerCase();return"online"===n||"running"===n||"streaming"===n?t("运行中","Running"):"configured"===n?t("已配置","Configured"):"not_found"===n?t("未注册","Unregistered"):"stopped"===n?t("已停止","Stopped"):"error"===n?t("异常","Error"):e||"—"}(l||"",eb)})]},t||n)}),eL.length||eP.length?null:(0,s.jsx)("li",{className:"py-6 text-center text-xs text-zinc-600",children:eb("暂无直播进程","No live processes")})]}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>ef("live_youtube"),className:"rounded-xl bg-violet-500/20 py-2 text-[11px] font-semibold text-violet-100 ring-1 ring-violet-500/30 transition hover:bg-violet-500/30",children:"YouTube"}),(0,s.jsx)("button",{type:"button",onClick:()=>ef("live_tiktok"),className:"rounded-xl bg-cyan-500/20 py-2 text-[11px] font-semibold text-cyan-100 ring-1 ring-cyan-500/30 transition hover:bg-cyan-500/30",children:"TikTok"})]})]}),(null==eu?void 0:null===(F=eu.network)||void 0===F?void 0:null===(B=F.interfaces)||void 0===B?void 0:B.length)?(0,s.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-cyan-200/70 bg-white/90":"border-cyan-500/15 bg-cyan-500/[0.05]"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:[(0,s.jsx)(E.Z,{className:"h-4 w-4 text-cyan-300"}),eb("网络吞吐","Network throughput")]}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↓ ",eb("下行","Down")]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eQ(eu.network.total_rx_bps)})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,s.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↑ ",eb("上行","Up")]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eQ(eu.network.total_tx_bps)})]})]}),(0,s.jsx)("div",{className:"mt-3 space-y-2",children:(eu.network.interfaces||[]).slice(0,3).map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2 font-mono text-[10px]",children:[(0,s.jsx)("span",{className:"font-semibold text-cyan-200/90",children:e.name}),(0,s.jsxs)("span",{className:"text-zinc-500",children:["↓ ",eQ(e.rx_bps)," \xb7 ↑ ",eQ(e.tx_bps)]})]},e.name))})]}):null]}),eE.length?(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:eE.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border px-3 py-2.5 ".concat("light"===eg?"border-slate-200 bg-white":"border-white/[0.06] bg-black/25"),children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.label}),(0,s.jsx)("p",{className:"truncate text-[10px] text-zinc-600",children:e.service_id})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(e1(e.running?"online":e.status)),children:e.running?eb("运行中","Running"):e.status})]},e.service_id))}):null,(0,s.jsxs)("div",{className:"space-y-3",children:[ex?(0,s.jsxs)(e4,{id:"deploy",theme:eg,title:eb("安装验收","Deployment health"),subtitle:eb("API / 边缘反代 / mDNS 可用性","API, edge proxy, mDNS"),defaultOpen:!ex.ready,badge:(0,s.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(ex.ready?"bg-emerald-500/15 text-emerald-200":"bg-amber-500/15 text-amber-200"),children:[ex.pass_count,"/",ex.total_count]}),children:[(0,s.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,s.jsx)("p",{className:"text-sm text-zinc-300",children:ex.ready?eb("必需检查已通过,控制面可交付。","Required checks passed."):eb("部分检查未通过,请查看失败项。","Some checks failed.")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ex.urls||{}).filter(e=>{let[,t]=e;return!!t}).slice(0,5).map(e=>{let[t,n]=e;return(0,s.jsx)("a",{href:(0,ep.p)(n),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-white/10 bg-white/5 px-2.5 py-1.5 text-[10px] text-zinc-300",children:t},t)})})]}),(ex.failing_checks||[]).length?(0,s.jsx)("ul",{className:"mt-3 space-y-1.5",children:ex.failing_checks.slice(0,4).map(e=>(0,s.jsxs)("li",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-100",children:[e.label,": ",e.detail||"—"]},e.id))}):null]}):null,(null==eu?void 0:eu.hardware)?(0,s.jsx)(e4,{id:"hardware",theme:eg,title:eb("硬件能力","Hardware profile"),subtitle:eb("GPU / NPU / FFmpeg 策略","GPU, NPU, FFmpeg"),defaultOpen:!1,children:(0,s.jsxs)("div",{className:"grid gap-3 font-mono text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,s.jsxs)("p",{children:["arch ",String(null!==(er=eu.hardware.arch)&&void 0!==er?er:"—")]}),(0,s.jsxs)("p",{children:["GPU ",eu.hardware.gpu&&"object"==typeof eu.hardware.gpu&&eu.hardware.gpu.present?eb("有","yes"):eb("无","no")]}),(0,s.jsxs)("p",{className:"sm:col-span-2",children:["hwaccels"," ",(eu.hardware.ffmpeg_hwaccels||[]).join(", ")||"—"]})]})}):null,(null==eu?void 0:null===(K=eu.stack)||void 0===K?void 0:K.neko_login)?(0,s.jsxs)(e4,{id:"neko",theme:eg,title:"Neko ".concat(eb("登录","sign-in")),subtitle:ey||eb("多实例","multi-instance"),defaultOpen:!1,children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.map(e=>(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-fuchsia-400/20 bg-black/25 px-3 py-2 text-[11px] text-fuchsia-100",children:[e.label," \xb7 ",e.accessLabel]},e.key))}),(0,s.jsx)("p",{className:"mt-3 text-[11px] text-amber-200/85",children:eb("昵称随意,密码须与环境变量一致(默认 12345678)。","Display name is free; password must match NEKO_* (default 12345678).")})]}):null,ew&&(null==eu?void 0:eu.probes)?(0,s.jsx)(e4,{id:"probes",theme:eg,title:eb("推流探针","Stream probes"),subtitle:"SRS \xb7 Neko",defaultOpen:!1,children:(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[eu.probes.srs?(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:"SRS"}),(0,s.jsxs)("p",{className:"mt-1 text-zinc-500",children:["API ",eu.probes.srs.api_ok?"OK":"—"," \xb7 :",eu.probes.srs.port," \xb7 RTT ",null!==(ec=null!==(eo=null===(H=eu.probes.srs.http)||void 0===H?void 0:H.latency_ms)&&void 0!==eo?eo:null===(Y=eu.probes.srs.tcp)||void 0===Y?void 0:Y.latency_ms)&&void 0!==ec?ec:"—"," ms"]}),(null===(G=eu.probes.srs.http)||void 0===G?void 0:G.error)?(0,s.jsx)("p",{className:"mt-1 text-amber-300/80",children:eu.probes.srs.http.error}):null]}):null,eu.probes.neko?(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:"Neko"}),(0,s.jsxs)("p",{className:"mt-1 text-zinc-500",children:[eu.probes.neko.running_count,"/",eu.probes.neko.required_count," ",eb("在线","online")," \xb7 HTTP ",null!==(ed=null===(q=eu.probes.neko.http)||void 0===q?void 0:q.http_code)&&void 0!==ed?ed:"—"]}),(null===(J=eu.probes.neko.http)||void 0===J?void 0:J.error)?(0,s.jsx)("p",{className:"mt-1 text-amber-300/80",children:eu.probes.neko.http.error}):null]}):null]})}):null,(null==eu?void 0:null===($=eu.live_events)||void 0===$?void 0:null===(V=$.pm2_tail)||void 0===V?void 0:V.length)||eP.length?(0,s.jsx)(e4,{id:"feeds",theme:eg,title:eb("事件流","Event feed"),defaultOpen:!1,children:(0,s.jsx)("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-lg border border-white/[0.05] bg-black/40 p-3 font-mono text-[10px] text-zinc-400",children:((null==eu?void 0:null===(X=eu.live_events)||void 0===X?void 0:X.pm2_tail)||[]).slice(-12).join("\n")||eb("暂无日志","No logs")})}):null]})]})}var e9=n(6322),e7=n(9781),te=n(8677),tt=n(1322),tn=n(8041),ts=n(7874),tl=n(2233),ti=n(4053),ta=n(2812);let tr="live-hub-youtube-pro-v2",to="youtube2__",tc=/[^a-zA-Z0-9_.-]+/g,td=new Set(["douyin_youtube","tiktok","obs","web"]);function tu(e,t){var n;let s=(e||"").trim();if(!function(e){let t=(e||"").trim();return!t||/\?{2,}/.test(t)||/?{2,}/.test(t)||/�/.test(t)||/锟|绾胯矾|çº|è·|Â/.test(t)||/^(undefined|null|nan)$/i.test(t)}(s))return s;let l=(null===(n=s.match(/\d+/))||void 0===n?void 0:n[0])||String(Math.max(0,t)+1);return"线路 ".concat(l)}function tx(e){return e.map((e,t)=>({...e,name:tu(e.name,t)}))}function tm(e){return(e||"").trim().replace(tc,"_")}function tp(e,t){let n=tm(e);return!n||td.has(n)||n===to?tN(t):"youtube"===n||n.startsWith(to)?n:tN(n)}function th(e){return tp(String(e.pm2Name||""),String(e.id||""))}function tg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"object"!=typeof e)return null;let n=String(e.id||"").trim();return n?{id:n,name:tu("string"==typeof e.name?e.name:"",t),streamKeySuffix:"string"==typeof e.streamKeySuffix?e.streamKeySuffix:void 0,streamKey:"string"==typeof e.streamKey?e.streamKey:void 0,urlLines:"string"==typeof e.urlLines?e.urlLines:void 0,pm2Name:tp("string"==typeof e.pm2Name?e.pm2Name:"",n),notes:"string"==typeof e.notes?e.notes:void 0}:null}function tb(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.map((e,t)=>tg(e,t)).filter(e=>null!==e);return tx(n)}catch(e){return[]}}function tf(e){window.localStorage.setItem(tr,JSON.stringify(tx(e)))}let tv=["/hub/youtube_pro_channels","/youtube_pro_channels"];async function ty(e){for(let n of tv)try{var t;let s=await e(n);return{fetched:!0,channels:(t=s.channels,Array.isArray(t)?tx(t.map((e,t)=>tg(e,t)).filter(e=>null!==e)):[])}}catch(e){}return{fetched:!1,channels:[]}}async function tw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=null,l=tx(t);for(let t of tv)try{var i;let a=await e(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channels:l,force:!!n.force})});if((null===(i=a.neko)||void 0===i?void 0:i.ok)===!1){let e=a.neko.desired?" desired=".concat(a.neko.desired):"",t=a.neko.current?" current=".concat(a.neko.current):"";s=Error("Neko capacity expansion failed:".concat(e).concat(t," ").concat(a.neko.reason||"unknown error").trim());break}return}catch(e){s=e instanceof Error?e:Error(String(e))}throw null!=s?s:Error("youtube_pro_channels sync failed")}function tj(){return"ch_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,7))}function tN(e){return"".concat(to).concat(tm(e)||"channel")}function tk(e){return/youtube/i.test(e.script)||/youtube/i.test(e.pm2)}function t_(e){return e.trim().toLowerCase().startsWith("youtube2__")}function tS(e){return(e.split("/").pop()||e).replace(/\.[^.]+$/,"")}function tz(e){var t;return!!e&&(/youtube/i.test(e.pm2)||/youtube/i.test(null!==(t=e.script)&&void 0!==t?t:""))}function tC(e,t){let n=((null==t?void 0:t.business_status)||"").trim().toLowerCase();return(null==t?void 0:t.is_pushing)||"streaming"===n?0:tA(null==t?void 0:t.process_status)?1:"youtube"===e.pm2.trim().toLowerCase()?2:"youtube"===tS(e.script).trim().toLowerCase()?3:10}let tR="live-hub-youtube-mode-v1",tL=new Set(["douyin_youtube","tiktok","obs","web"]);function tP(e){var t,n,s;return{name:e.name,streamKey:null!==(t=e.streamKey)&&void 0!==t?t:"",pm2Name:null!==(n=e.pm2Name)&&void 0!==n?n:tN(e.id),notes:null!==(s=e.notes)&&void 0!==s?s:""}}function tT(e){return Object.fromEntries(e.map(e=>[e.id,tP(e)]))}function tM(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return!!(null==e?void 0:e.is_pushing)||"streaming"===t||"relay_starting"===t}function tE(e,t){let n=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"source_stalled"===n||"relay_slow"===n||"waiting_source"===n||"source_live"===n?tB(e,t):tM(e)?t("推流中","Pushing"):tB(e,t)}function tU(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;return((null==s?void 0:s.source_display)||(null==s?void 0:s.source_title)||"").trim()||tD(t,n)||e.trim()}function tZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=tD(e,t).trim(),l=n.trim();return tM(e)&&l&&s&&l!==s?l:""}function tD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if((null==e?void 0:e.source_ambiguous)&&tM(e)&&!(null==e?void 0:e.source_current))return(n?eM("",n).trim():"")||"";{let t=((null==e?void 0:e.source_display)||(null==e?void 0:e.source_title)||"").trim();if(t)return t}let s=eM(t,n).trim();if(s)return s;let l=((null==e?void 0:e.source_room_id)||"").trim();return l?"抖音直播间 ".concat(l):""}function tI(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=((null==e?void 0:e.source_url)||"").trim();if(s)return s;let l=eP(n);return tM(e)&&((null==e?void 0:e.source_ambiguous)||(null==e?void 0:e.source_display)||(null==e?void 0:e.source_title))&&l.length>1?"":null!==(t=l[0])&&void 0!==t?t:""}function tA(e){return/^(online|running)$/i.test((e||"").trim())}function tO(e){let t=(e||"youtube").trim()||"youtube",n="/youtube-relay-log?process=".concat(encodeURIComponent(t));window.open(n,"_blank","noopener,noreferrer")}function tB(e,t){let n=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===n?t("已配置","Ready"):"streaming"===n?t("推流中","Pushing"):"source_stalled"===n?t("源卡住","Source stalled"):"relay_slow"===n?t("低速推流","Relay slow"):"relay_starting"===n?t("转推启动中","Relay starting"):"waiting_source"===n?t("等待上游","Waiting source"):"source_live"===n?t("源已开播,转推未起","Source live, relay down"):"monitoring"===n?t("监控中","Monitoring"):"misconfigured"===n?t("密钥异常","Key invalid"):"youtube_key_rejected"===n?t("密钥被 YouTube 拒绝","Key rejected"):"stale"===n?t("心跳过期","Stale"):"error"===n?t("异常","Error"):tA(null==e?void 0:e.process_status)?t("运行中","Running"):((null==e?void 0:e.process_status)||"").trim()||t("未运行","Idle")}function tF(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"relay_slow"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":"waiting_source"===t||"monitoring"===t||"relay_starting"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_live"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":tA(null==e?void 0:e.process_status)?"bg-zinc-500/15 text-zinc-200 ring-zinc-500/25":"bg-zinc-600/20 text-zinc-400 ring-zinc-500/25"}function tW(e){let t=Math.max(0,Math.floor(e||0));if(t<60)return"".concat(t,"s");let n=Math.floor(t/60);return n<60?"".concat(n,"m ").concat(t%60,"s"):"".concat(Math.floor(n/60),"h ").concat(n%60,"m")}function tK(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString()}catch(e){return"-"}}function tH(e){let t=(e||"").toLowerCase();return"active"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"ended"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function tY(e,t){let n=(e||"").toLowerCase();return"active"===n?t("直播中","Live"):"ended"===n?t("已结束","Ended"):"error"===n?t("异常","Problem"):"idle"===n?t("等待中","Waiting"):t("记录","Record")}function tG(e,t){return null==e?t?t("未知","Unknown"):"-":e.toLocaleString()}function tq(e,t){return e?(e.source_title||e.channel_name||"").trim()||(e.source_room_id?t("抖音直播间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.process?t("直播线路 ".concat(e.process),"Relay lane ".concat(e.process)):t("直播事件 #".concat(e.id),"Live event #".concat(e.id))):t("未选择直播","No event selected")}function tJ(e,t){return e?e.source_room_id?t("抖音房间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.source_url?e.source_url.replace(/^https?:\/\//,""):t("来源未识别","Unknown source"):"-"}function tV(e,t){let n=Math.max(0,Math.floor(e||0));if(n<60)return t("".concat(n," 秒"),"".concat(n,"s"));let s=Math.floor(n/60);if(s<60)return t("".concat(s," 分 ").concat(n%60," 秒"),"".concat(s,"m ").concat(n%60,"s"));let l=Math.floor(s/60),i=s%60;return t("".concat(l," 小时 ").concat(i," 分"),"".concat(l,"h ").concat(i,"m"))}function t$(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(e){return"-"}}function tX(e,t){var n;if(!e)return"-";let s=(e.status||"").toLowerCase(),l="".concat(e.last_health||""," ").concat(e.last_live_status||""," ").concat(e.last_popup_text||"").toLowerCase();return"error"===s||/error|failed|poor|unstable|异常|错误|失败/.test(l)?t("需要处理","Needs attention"):e.last_popup_text?t("有弹窗","Popup seen"):(null!==(n=e.quality_score)&&void 0!==n?n:100)<50?t("质量偏低","Low quality"):t("正常","Normal")}function tQ(e){let t=tX(e,e=>e);return"需要处理"===t||"质量偏低"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"有弹窗"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25"}function t0(e){let t=Number(e||0);return t>=80?"text-emerald-200":t>=55?"text-amber-200":"text-rose-200"}function t1(e){let t=(e||"").toLowerCase();return"critical"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"warning"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"ok"===t?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function t5(e){let{label:t,value:n,helper:l,warn:i=!1,accent:a="cyan"}=e;return(0,s.jsxs)("div",{className:"group relative overflow-hidden rounded-xl border border-white/[0.06] bg-black/25 p-3 min-w-0 transition hover:border-white/12",children:[(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br ".concat("emerald"===a?"from-emerald-500/20 via-transparent to-cyan-500/10":"amber"===a?"from-amber-500/20 via-transparent to-rose-500/10":"violet"===a?"from-violet-500/20 via-transparent to-cyan-500/10":"from-cyan-500/20 via-transparent to-violet-500/10"," opacity-70")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:t}),(0,s.jsx)("p",{className:"mt-1 text-xl font-semibold tracking-tight ".concat(i?"text-amber-200":"text-white"),children:(0,s.jsx)("span",{className:i?"inline-flex animate-pulse":"",children:n})}),(0,s.jsx)("p",{className:"mt-1 text-[10px] text-zinc-600",children:l})]})]})}function t2(e,t){return e_(e,null==t?void 0:t.metrics,"")}function t3(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#"))}function t4(e,t){return t3(e).length>0&&0===t3(t).length}function t6(e){let{kind:t,busyKind:n,targetPm2:l,busy:i,online:a,pushing:r,label:o,className:c,baseLock:d,onRun:u,notify:x,t:m,compact:p}=e,h=function(e){if(!(null==e?void 0:e.startsWith("proc:")))return null;let t=e.slice(5),n=t.indexOf(":");if(n<=0)return null;let s=t.slice(0,n),l=t.slice(n+1);return l&&["start","stop","restart"].includes(s)?{action:s,pm2:l}:null}(i),g=h&&h.pm2===l,b=null!=n?n:t,f=!!(g&&h.action===b),v=!!(g&&h.action!==b),w="start"===t&&r,j="stop"===t&&!a,N="restart"===t&&!a,k=w||j||N;return(0,s.jsxs)("button",{type:"button",onClick:()=>{if(!f){if(v){x(m("请等待当前操作完成","Wait for the current action to finish"));return}if(w){x(m("已在推流中,无需重复开始","Already pushing"));return}if(j){x(m("当前未在直播,无法停止","Not live — cannot stop"));return}if(N){x(m("进程未运行时请使用「开始直播」","Use Start when the process is not running"));return}d||u()}},className:"relative overflow-hidden rounded-xl ring-1 transition ".concat(p?"min-h-[2rem] px-3 py-1.5 text-xs font-medium":"min-h-[2.75rem] px-4 py-3 text-sm font-medium"," ").concat(c," ").concat(k||d||f||v?"cursor-not-allowed":""," ").concat(k&&!f?"opacity-45":""," ").concat(v?"opacity-35":""," ").concat(f?"ring-violet-400/40":""),children:[f?(0,s.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/25 backdrop-blur-[2px]",children:(0,s.jsx)(y.Z,{className:"".concat(p?"h-4 w-4":"h-6 w-6"," animate-spin text-white")})}):null,(0,s.jsxs)("span",{className:"inline-flex items-center justify-center gap-1.5 ".concat(f?"invisible":""),children:[k?(0,s.jsx)(e9.Z,{className:"".concat(p?"h-3 w-3":"h-4 w-4"," shrink-0 opacity-90"),"aria-hidden":!0}):null,o]})]})}function t8(e){var t,n,l,i,r,o,d,u,x,m,p,h,g,b,f,v,j,N,k,_,S,z,R,L,P,T,M,E,U,D;let{t:I,busy:A,entries:O,currentProc:B,setCurrentProc:F,urlConfig:K,setUrlConfig:H,onRunProcess:q,onSaveUrlConfig:J,fetchJson:V,liveProcesses:$,notify:X,onNavigate:Q,onRefresh:ee,quickLinks:et}=e,en=(0,Z.useMemo)(()=>O.filter(tk),[O]),es=(0,Z.useMemo)(()=>(function(e,t){let n=e.filter(e=>tk(e)&&!t_(e.pm2)),s=n.filter(e=>tk(e)&&e.pm2.trim()===tS(e.script).trim()),l=s.length?[...s]:n.length?[...n]:[...e],i=new Set(l.map(e=>e.pm2.trim()));for(let e of t.filter(e=>tz(e)&&!t_(e.pm2))){var a,r,o,c;let t=e.pm2.trim();if(!t||i.has(t))continue;let s=(e.business_status||"").trim().toLowerCase();if(!e.is_pushing&&"streaming"!==s&&!tA(e.process_status))continue;let d=n.find(e=>e.pm2.trim()===t);l.push(null!=d?d:{pm2:t,script:null!==(o=null!==(r=e.script)&&void 0!==r?r:null===(a=n[0])||void 0===a?void 0:a.script)&&void 0!==o?o:"youtube.py",label:null!==(c=e.label)&&void 0!==c?c:t}),i.add(t)}return l})(en.length?en:O,$),[O,$,en]),el=(0,Z.useMemo)(()=>(function(e,t){if(!e.length)return"";let n=new Map(t.filter(tz).map(e=>[e.pm2.trim(),e])),s=e[0],l=tC(s,n.get(s.pm2.trim()));for(let t of e.slice(1)){let e=tC(t,n.get(t.pm2.trim()));e"youtube"===e.pm2.trim().toLowerCase());if(s)return s.pm2;let l=e.find(e=>"youtube"===tS(e.script).trim().toLowerCase());return l?l.pm2:null!==(n=null===(t=e[0])||void 0===t?void 0:t.pm2)&&void 0!==n?n:""}(es),[$,es]),[ei,ea]=(0,Z.useState)("single"),[er,eo]=(0,Z.useState)([]),[ec,ed]=(0,Z.useState)(""),[eu,ex]=(0,Z.useState)(K),[em,eb]=(0,Z.useState)(""),[ef,ew]=(0,Z.useState)({key:"",rtmps:!0,bitrate:"",fastAudio:!0}),[ej,eN]=(0,Z.useState)(null),[ek,e_]=(0,Z.useState)(!1),[eS,eT]=(0,Z.useState)(""),[eM,eE]=(0,Z.useState)(!0),[eU,eA]=(0,Z.useState)(!1),[eB,eF]=(0,Z.useState)(!1),[eW,eK]=(0,Z.useState)(null),[eH,eY]=(0,Z.useState)({}),[eG,eq]=(0,Z.useState)(!1),[eJ,eV]=(0,Z.useState)(null),[e$,eX]=(0,Z.useState)(0),[eQ,e0]=(0,Z.useState)(null),[e1,e5]=(0,Z.useState)(null),[e2,e3]=(0,Z.useState)(!1),[e4,e6]=(0,Z.useState)(null),[e8,e9]=(0,Z.useState)(!1),[to,tc]=(0,Z.useState)(!0),[td,tp]=(0,Z.useState)(null),[tg,tv]=(0,Z.useState)(null),t8=(0,Z.useRef)(!1),t9=(0,Z.useRef)(K),t7=(0,Z.useRef)(eS),ne=(0,Z.useRef)([]),nt=(0,Z.useRef)(B),nn=(0,Z.useRef)(0),ns=(0,Z.useRef)(0),nl=(0,Z.useRef)(0),ni=(0,Z.useRef)(0),na=(0,Z.useRef)({}),nr=(0,Z.useRef)({}),no=(0,Z.useCallback)(e=>{t9.current=e,ex(e),H(e)},[H]),nc=(0,Z.useCallback)(e=>{t7.current=e,eT(e)},[]),nd=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let n=na.current[t];if(n)return n;let s=new URLSearchParams({process:t,_ts:String(Date.now())}),l=V("/get_url_config?".concat(s)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return na.current[t]=l,l.then(()=>{na.current[t]===l&&delete na.current[t]},()=>{na.current[t]===l&&delete na.current[t]}),l},[V]),nu=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let n=nr.current[t];if(n)return n;let s=new URLSearchParams({process:t,_ts:String(Date.now())}),l=V("/get_config?".concat(s)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return nr.current[t]=l,l.then(()=>{nr.current[t]===l&&delete nr.current[t]},()=>{nr.current[t]===l&&delete nr.current[t]}),l},[V]),nx=(0,Z.useCallback)(()=>{let e=++nl.current;return eA(!0),e},[]),nm=(0,Z.useCallback)(e=>{e===nl.current&&eA(!1)},[]),np=(0,Z.useCallback)(()=>{let e=++ni.current;return e_(!0),e},[]),nh=(0,Z.useCallback)(e=>{e===ni.current&&e_(!1)},[]);(0,Z.useEffect)(()=>{let e=()=>tc("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{t8.current=!1},[B]),(0,Z.useEffect)(()=>{nt.current=B},[B]),(0,Z.useEffect)(()=>{"single"===ei&&(t9.current=K,ex(K))},[ei,K]),(0,Z.useEffect)(()=>{t7.current=eS},[eS]),(0,Z.useEffect)(()=>{ne.current=er},[er]),(0,Z.useEffect)(()=>{nn.current+=1,ns.current+=1,t8.current=!1,eK(null)},[ei,ec]);let ng=(0,Z.useCallback)(async()=>{let e=nt.current.trim();if(!e)return;if("pro"===ei){let t=ne.current.find(e=>e.id===ec);if(!t||th(t)!==e)return}let t=++nn.current;try{let l=await nd(e);if(t!==nn.current||e!==nt.current.trim()||t8.current)return;if("single"===ei)no(l);else{var n,s;let e=null!==(s=null===(n=ne.current.find(e=>e.id===ec))||void 0===n?void 0:n.urlLines)&&void 0!==s?s:"";if(t4(e,l)){nc(e);return}nc(l)}}catch(e){}},[ec,nc,no,ei,nd]),nb=(0,Z.useMemo)(()=>({pageVisible:to}).pageVisible?12e3:0,[to]);(0,Z.useEffect)(()=>{if(!B||!eM||nb<=0)return;let e=window.setInterval(()=>{t8.current||ng()},nb);return()=>clearInterval(e)},[B,eM,ng,nb]);let nf=async()=>{let e=nt.current.trim();if(!e)return;if("pro"===ei){let t=ne.current.find(e=>e.id===ec);if(!t||th(t)!==e)return}let t=nx();eK(null),t8.current=!1;let n=++nn.current;try{let t=await nd(e);if(n!==nn.current||e!==nt.current.trim())return;if(t8.current){eK(I("检测到本地未保存修改,已保留当前草稿","Kept the local unsaved draft"));return}if("single"===ei)no(t);else{var s,l;let e=null!==(l=null===(s=ne.current.find(e=>e.id===ec))||void 0===s?void 0:s.urlLines)&&void 0!==l?l:"";if(t4(e,t)){nc(e),eK(I("服务器暂无已保存 URL,已保留本地草稿","Server has no saved URLs, kept the local draft"));return}nc(t)}eK(I("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(t){if(n!==nn.current||e!==nt.current.trim())return;eK(t.message)}finally{nm(t)}};(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(tR);("pro"===e||"single"===e)&&ea(e)}catch(e){}},[]),(0,Z.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await ty(V);if(t.fetched&&t.channels.length&&!e){let e=tx(t.channels);ne.current=e,eo(e),eY(tT(e)),tf(e);return}}catch(e){}if(e)return;let t=function(){let e=window.localStorage.getItem(tr);if(!e&&(e=window.localStorage.getItem("live-hub-youtube-pro-v1"))){let t=tb(e);if(t.length)return window.localStorage.setItem(tr,JSON.stringify(t)),t}return tb(e)}(),n=tx(t.length>0?t:(()=>{let e=tj();return[{id:e,name:"线路 1",streamKey:"",urlLines:"",pm2Name:tN(e),notes:""}]})());ne.current=n,eo(n),eY(tT(n)),tf(n)})(),()=>{e=!0}},[V]),(0,Z.useEffect)(()=>{if(!er.length){ec&&ed("");return}ec&&er.some(e=>e.id===ec)||ed(er[0].id)},[er,ec]);let nv=er.find(e=>e.id===ec)||er[0],ny=(0,Z.useMemo)(()=>er.find(e=>th(e)===B),[er,B]),nw=(0,Z.useCallback)(e=>$.find(t=>t.pm2===e),[$]),nj=(0,Z.useCallback)(e=>{var t;return null===(t=nw(e))||void 0===t?void 0:t.process_status},[nw]),nN=nw(B),nk=nw(B);(0,Z.useEffect)(()=>{"single"===ei&&el&&!B&&(nt.current=el,F(el))},[B,ei,el,F]);let n_=(0,Z.useCallback)(e=>{let t=tx(e);ne.current=t,eo(t),tf(t)},[]),nS=(0,Z.useCallback)((e,t)=>{let n=e.trim();if(!n)return;let s=!1,l=ne.current.map(e=>th(e)!==n?e:(s=!0,{...e,...t}));s&&n_(l)},[n_]),nz=(0,Z.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};await tw(V,e,t)},[V]),nC=(0,Z.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n_(e),nz(e,t).catch(e=>{X("".concat(I("多频道列表未同步到服务器","Channel list not saved on server"),": ").concat(e.message))})},[n_,X,nz,I]),nR=(0,Z.useMemo)(()=>{var e;return nv?null!==(e=eH[nv.id])&&void 0!==e?e:tP(nv):null},[nv,eH]);(0,Z.useEffect)(()=>{nv&&eY(e=>e[nv.id]?e:{...e,[nv.id]:tP(nv)})},[nv]),(0,Z.useEffect)(()=>{if(!nv||"youtube"!==th(nv))return;let e=ef.key.trim();e&&eY(t=>{var n;let s=null!==(n=t[nv.id])&&void 0!==n?n:tP(nv);return s.streamKey.trim()===e&&"youtube"===s.pm2Name||s.streamKey.trim()?t:{...t,[nv.id]:{...s,streamKey:e,pm2Name:"youtube"}}})},[nv,ef.key]),(0,Z.useEffect)(()=>{eV(null)},[ec]);let nL=(0,Z.useCallback)((e,t)=>{nv&&(eY(n=>{var s;return{...n,[nv.id]:{...null!==(s=n[nv.id])&&void 0!==s?s:tP(nv),[e]:t}}}),eV(null))},[nv]),nP=nv?th(nv):"",nT=nv&&nR?th({id:nv.id,pm2Name:nR.pm2Name}):"",nM=!!nv&&!!nR&&nT!==nP,nE=(0,Z.useMemo)(()=>{if(!nv||!nR)return{ok:!1,message:I("请选择线路","Pick a lane"),normalizedName:"",normalizedPm2:"",normalizedStreamKey:"",normalizedNotes:""};let e=er.findIndex(e=>e.id===nv.id),t=tu(nR.name,e>=0?e:0),n=th({id:nv.id,pm2Name:nR.pm2Name});return n?tL.has(n)?{ok:!1,message:I("该进程名保留给系统模块,请换一个","This PM2 name is reserved"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nR.streamKey.trim(),normalizedNotes:nR.notes.trim()}:er.find(e=>e.id!==nv.id&&th(e)===n)?{ok:!1,message:I("该进程名已被其它线路占用","Another lane already uses this PM2 name"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nR.streamKey.trim(),normalizedNotes:nR.notes.trim()}:{ok:!0,message:"",normalizedName:t,normalizedPm2:n,normalizedStreamKey:nR.streamKey.trim(),normalizedNotes:nR.notes.trim()}:{ok:!1,message:I("进程名不能为空","PM2 name is required"),normalizedName:t,normalizedPm2:n,normalizedStreamKey:nR.streamKey.trim(),normalizedNotes:nR.notes.trim()}},[nv,nR,er,I]),nU=(0,Z.useMemo)(()=>{if(!nv||!nR)return!1;let e=tP(nv);return nR.name!==e.name||nR.streamKey!==e.streamKey||tm(nR.pm2Name)!==tm(e.pm2Name)||nR.notes!==e.notes},[nv,nR]),nZ=(0,Z.useCallback)(async e=>{let t=e.trim();if(!t)return;let n=++nn.current,s=++ns.current;t8.current=!1;let l=nx(),i=np();eK(I("正在同步单频道配置...","Syncing single-channel config...")),eN(null);try{let[e,l]=await Promise.allSettled([nd(t),nu(t)]);if(n===nn.current&&t===nt.current.trim()&&("fulfilled"===e.status?(no(e.value),eK(I("单频道配置已实时同步","Single-channel config synced"))):eK(e.reason instanceof Error?e.reason.message:String(e.reason))),s===ns.current&&t===nt.current.trim()){if("fulfilled"===l.status){let e=l.value;eb(e),ew(eZ(e))}else eN(l.reason instanceof Error?l.reason.message:String(l.reason))}}finally{nm(l),nh(i),t===nt.current.trim()&&eX(e=>e+1)}},[no,nx,np,nm,nh,nd,nu,I]),nD=(0,Z.useCallback)(async e=>{let t=th(e).trim();if(!t)return;let n=++nn.current,s=++ns.current;t8.current=!1;let l=nx(),i=np();eK(I("正在同步当前线路配置...","Syncing current lane config...")),eN(null);try{let[l,i]=await Promise.allSettled([nd(t),nu(t)]);if(n===nn.current&&t===nt.current.trim()){if("fulfilled"===l.status){var a;let n=l.value,s=null!==(a=e.urlLines)&&void 0!==a?a:"";t4(s,n)?(nc(s),nS(t,{urlLines:s}),eK(I("服务器暂无已保存 URL,已保留当前线路草稿","Server has no saved URLs, kept this lane draft"))):(nc(n),nS(t,{urlLines:n}),eK(I("当前线路地址已实时同步","Current lane URLs synced")))}else eK(l.reason instanceof Error?l.reason.message:String(l.reason))}if(s===ns.current&&t===nt.current.trim()){if("fulfilled"===i.status){let t=i.value,n=eZ(t);eb(t),ew(n),n.key.trim()&&eY(t=>{var s,l;let i=null!==(s=t[e.id])&&void 0!==s?s:tP(e);return i.streamKey.trim()&&i.streamKey.trim()!==(null!==(l=e.streamKey)&&void 0!==l?l:"").trim()||i.streamKey.trim()===n.key.trim()?t:{...t,[e.id]:{...i,streamKey:n.key.trim()}}})}else eN(i.reason instanceof Error?i.reason.message:String(i.reason))}}finally{nm(l),nh(i),t===nt.current.trim()&&eX(e=>e+1)}},[nc,nx,np,nm,nh,nS,nd,nu,I]);(0,Z.useCallback)(async()=>{try{var e,t;let n=await ty(V);if(!n.fetched||!n.channels.length)return;let s=tx(n.channels);ne.current=s,eo(s),eY(tT(s)),tf(s);let l=null!==(e=s.find(e=>e.id===ec))&&void 0!==e?e:s[0];if(!l)return;ed(l.id),nc((null!==(t=l.urlLines)&&void 0!==t?t:"").trim());let i=th(l);nt.current=i,F(i),nD(l)}catch(e){}},[ec,nc,V,nD,F]);let nI=(0,Z.useCallback)(e=>{var t,n,s,l;if("pro"===e&&"single"===ei&&!ef.key.trim()){X(I("请先填写并保存 YouTube 推流 key,再切换到多频道 Pro","Fill and save the YouTube stream key before switching to Multi Pro"));return}if("single"===e){let e=nt.current.trim(),n=nv?th(nv):"",s="pro"===ei?n||e:e||el||(null===(t=es[0])||void 0===t?void 0:t.pm2)||"";s&&(nt.current=s,F(s),nZ(s))}if("pro"===e&&er.length){let e=nt.current.trim(),t=null!==(s=null!==(n=er.find(t=>th(t)===e))&&void 0!==n?n:er.find(e=>e.id===ec))&&void 0!==s?s:er[0];if(nc((null!==(l=null==t?void 0:t.urlLines)&&void 0!==l?l:"").trim()),t){ed(t.id);let e=th(t);nt.current=e,F(e),nD(t)}}ea(e);try{window.localStorage.setItem(tR,e)}catch(e){}},[er,nc,nv,ec,ei,X,el,nD,nZ,F,es,I,ef.key]),nA=(0,Z.useCallback)(e=>{var t;nc((null!==(t=e.urlLines)&&void 0!==t?t:"").trim()),ed(e.id);let n=th(e);nt.current=n,F(n),nD(e)},[nc,nD,F]);(0,Z.useEffect)(()=>{if("pro"!==ei||!ec)return;let e=er.find(e=>e.id===ec);if(!e)return;let t=th(e);nt.current=t,F(t)},[ei,ec,er,F]);let nO=(0,Z.useCallback)(async()=>{let e=nt.current.trim();if(!e)return;let t=++ns.current,n=np();eN(null);try{let n=await nu(e);if(t!==ns.current||e!==nt.current.trim())return;eb(n),ew(eZ(n))}catch(n){if(t!==ns.current||e!==nt.current.trim())return;eN(n.message)}finally{nh(n)}},[np,nh,nu]);(0,Z.useEffect)(()=>{if(B){if("pro"===ei){if(!nv||B!==th(nv))return;ng(),nO(),eX(e=>e+1);return}nZ(B)}},[nv,ec,B,nO,ei,ng,nZ]);let nB=(0,Z.useCallback)(async()=>{var e;if(!nv||!nR)throw Error(I("请选择线路","Pick a lane"));if(!nE.ok)throw Error(nE.message);let t=t7.current,n=er.map(e=>e.id===nv.id?{...e,name:nE.normalizedName,streamKey:nE.normalizedStreamKey,pm2Name:nE.normalizedPm2,notes:nE.normalizedNotes,urlLines:t}:e);return await nz(n,{force:!0}),n_(n),eY(e=>({...e,[nv.id]:{name:nE.normalizedName,streamKey:nE.normalizedStreamKey,pm2Name:nE.normalizedPm2,notes:nE.normalizedNotes}})),{next:n,savedLane:null!==(e=n.find(e=>e.id===nv.id))&&void 0!==e?e:{...nv,name:nE.normalizedName,streamKey:nE.normalizedStreamKey,pm2Name:nE.normalizedPm2,notes:nE.normalizedNotes,urlLines:t},pm2:nE.normalizedPm2}},[nv,nR,nE,n_,er,nz,I]),nF=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt.current,n=t.trim();if(!n){eN(I("请选择进程","Pick a process"));return}ns.current+=1;let s=np();eN(null);try{let t=new URLSearchParams({process:n});await V("/save_config?".concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}),eb(e),nS(n,{streamKey:eZ(e).key}),eN(I("youtube.ini 已保存","youtube.ini saved"))}catch(e){eN(e.message)}finally{nh(s)}},nW=(0,Z.useCallback)(async()=>{if(nv){eq(!0),eV(null);try{var e;let t=await nB();nt.current=t.pm2,F(t.pm2);let n=eZ(em||eI(ef)),s=null!==(e=eH[nv.id])&&void 0!==e?e:tP(nv),l=eI({key:(s.streamKey||nE.normalizedStreamKey||"").trim(),rtmps:n.rtmps,bitrate:n.bitrate,fastAudio:n.fastAudio});await nF(l,t.pm2),eV(I("线路设置与推流配置已保存","Lane settings and stream config saved"))}catch(t){let e=t.message;eV(e),X(e)}finally{eq(!1)}}},[nv,nE.normalizedStreamKey,eH,X,nB,F,I,em,ef]),nK=async()=>{let e=eI(ef);await nF(e)},nH=async()=>{ns.current+=1;let e=np();eN(null);try{var t,n;let e=em||eI(ef),s=await V("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:(n=nt.current,"youtube.".concat(n.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")),content:e,action:"youtube_balanced_preset"})}),l=null!==(t=s.content)&&void 0!==t?t:e;eb(l),ew(eZ(l)),eN(s.message||I("已应用 YouTube 预设","Applied YouTube preset"))}catch(e){eN(e.message)}finally{nh(e)}},nY=(0,Z.useMemo)(()=>{var e,t;if("single"===ei)return eL("key = ".concat(ef.key));let n=null!==(t=null!==(e=null==nR?void 0:nR.streamKey)&&void 0!==e?e:null==nv?void 0:nv.streamKey)&&void 0!==t?t:"";return eL("key = ".concat(n))},[ei,null==nv?void 0:nv.streamKey,ef.key,null==nR?void 0:nR.streamKey]),nG=nY?"…".concat(nY):"—",nq=async()=>{if(!nv){let e=I("请选择线路后再保存地址","Pick a lane before saving URLs");eV(e),X(e);return}if(so){eV(so),X(so);return}try{eq(!0),eV(null),nn.current+=1;let e=t7.current,t=await nB();nt.current=t.pm2,F(t.pm2),await Promise.resolve(J(e,t.pm2)),t8.current=!1,eV(I("线路与地址已保存","Lane settings and URLs saved"))}catch(t){let e=t instanceof Error?t.message:String(t);eV(e),X(e)}finally{eq(!1)}},nJ=async()=>{if(so){X(so);return}let e=nt.current.trim();if(!e){X(I("请选择进程","Pick a process"));return}try{nn.current+=1,await Promise.resolve(J(t9.current,e)),nS(e,{urlLines:t9.current}),t8.current=!1}catch(e){}},nV=async()=>{let e="single"===ei?t9.current:t7.current;eF(!0),eK(null);try{var t;let n=await V("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:eD(nt.current),content:e,action:"dedupe_urls"})}),s=null!==(t=n.content)&&void 0!==t?t:e;"single"===ei?no(s):nc(s),t8.current=!0,eK(n.message||I("已去重当前 URL 列表","Deduplicated current URL list"))}catch(e){eK(e.message)}finally{eF(!1)}},n$=async()=>{if(!nv||!nR)return;let e=eZ(em||eI(ef)),t=eI({key:nR.streamKey.trim(),rtmps:e.rtmps,bitrate:e.bitrate,fastAudio:e.fastAudio});eq(!0),eV(null);try{let e=await nB();nt.current=e.pm2,F(e.pm2),await nF(t,e.pm2),eV(I("线路设置与 youtube.ini 已保存","Lane settings and youtube.ini saved"))}catch(t){let e=t.message;eV(e),X(e)}finally{eq(!1)}},nX="single"===ei?eu:eS,nQ=(0,Z.useMemo)(()=>t3(nX).length,[nX]),n0=(0,Z.useMemo)(()=>eP(nX).length,[nX]),n1=(0,Z.useMemo)(()=>(0,ta.O0)(et),[et]),n5=(0,Z.useMemo)(()=>(0,ta.U_)(n1,"pro"===ei&&nv?er.findIndex(e=>e.id===nv.id):0),[nv,er,ei,n1]),n2=n5.link?(0,ep.p)(n5.link.url):(0,ep.p)("http://live.local:9200/"),n3=(0,Z.useMemo)(()=>(0,ta.Tc)(n1),[n1]),n4=(0,Z.useMemo)(()=>{var e;return[null===(e=n5.link)||void 0===e?void 0:e.url,null==et?void 0:et.chromium_remote_debug,null==et?void 0:et.srs_api].filter(e=>!!e)},[et,null===(t=n5.link)||void 0===t?void 0:t.url]),n6=(0,Z.useCallback)(async(e,t)=>{if(!td&&("delete"!==t||window.confirm("".concat(e.label,": 删除容器?浏览器配置和登录数据会保留,之后点“启动”会自动重建。")))){tp("".concat(e.id,":").concat(t)),tv(null);try{let n=await V("/neko/instance_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,action:t})}),s=n.running?I("运行中","running"):n.exists?I("已停止","stopped"):I("容器不存在","missing"),l=n.message||"".concat(e.label,": ").concat(s);tv("".concat(l," \xb7 ").concat(s)),await (null==ee?void 0:ee())}catch(t){let e=t.message;tv(e),X(e)}finally{tp(null)}}},[V,td,X,ee,I]),n8=(0,Z.useCallback)(async e=>{let t=nv?th(nv):"";return nv&&e===t?await nB():(n_(er),await nz(er,{force:!0}),{next:er,savedLane:null!=nv?nv:null,pm2:e})},[nv,n_,er,nB,nz]),n9=(0,Z.useCallback)(async(e,t)=>{let n=!!nv&&th(nv)===t;if("stop"!==e){var s,l;let e=er,n=t;try{let s=await n8(t);e=s.next,n=s.pm2}catch(e){X("".concat(I("当前线路保存失败","Failed to save the active lane"),": ").concat(e.message));return}let i=e.find(e=>th(e)===n),a=null!==(s=null==i?void 0:i.urlLines)&&void 0!==s?s:"";if(!(null!==(l=null==i?void 0:i.streamKey)&&void 0!==l?l:"").trim()){X(I("请先填写当前线路的推流密钥","Fill the stream key before starting"));return}if(!t3(a).length){X(I("请先填写当前线路的直播地址","Fill the source URLs before starting"));return}t=n}n&&F(t),q(e,t)},[nv,er,n8,X,q,F,I]),n7=(0,Z.useCallback)(async e=>{e3(!0);try{var t,n,s,l;let i=await V("/hub/youtube/live/summary");e0(i);let a=i.active||[],r=nt.current.trim(),o=null!==(l=null!==(s=null!=e?e:r?null===(t=a.find(e=>e.process===r))||void 0===t?void 0:t.id:void 0)&&void 0!==s?s:null===(n=a[0])||void 0===n?void 0:n.id)&&void 0!==l?l:null==e1?void 0:e1.id;if(o){let e=await V("/hub/youtube/live/events/".concat(encodeURIComponent(String(o))));e.event&&e5(e.event)}}catch(e){}finally{e3(!1)}},[V,null==e1?void 0:e1.id]),se=(0,Z.useCallback)(async e=>{e3(!0);try{let t=await V("/hub/youtube/live/events/".concat(encodeURIComponent(String(e))));e5(t.event||null)}catch(e){X(e.message)}finally{e3(!1)}},[V,X]),st=null!==(u=null==eQ?void 0:null===(n=eQ.active)||void 0===n?void 0:n.length)&&void 0!==u?u:0,sn=(0,Z.useMemo)(()=>{var e;return(e={activeEvents:st,pageVisible:to}).pageVisible?e.activeEvents>0?4e3:12e3:3e4},[st,to]);(0,Z.useEffect)(()=>{},[sn,n7]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&n7(null)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[n7]);let ss=(0,Z.useCallback)(async()=>{e9(!0);try{let e=await V("/hub/youtube/quality_guard");e6(e)}catch(e){}finally{e9(!1)}},[V]),sl=null!==(x=null==e4?void 0:null===(l=e4.summary)||void 0===l?void 0:l.pushing_lanes)&&void 0!==x?x:0,si=(0,Z.useMemo)(()=>{var e;return(e={pushingLanes:sl,pageVisible:to}).pageVisible?e.pushingLanes>0?6e3:15e3:3e4},[sl,to]);(0,Z.useEffect)(()=>{},[si,ss]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&ss()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[ss]);let sa=!!A||ek||eU||eB||eG,sr=!!A||eG,so=ek?I("正在读取 youtube.ini,稍后再保存地址","youtube.ini is loading; save URLs after it finishes"):eU?I("正在重新读取地址列表,稍后再保存","URL list is reloading; save after it finishes"):eB?I("正在整理地址列表,稍后再保存","URL list is being optimized; save after it finishes"):A?I("正在执行其他操作,稍后再保存地址","Another operation is running; save URLs after it finishes"):"",sc="single"===ei?nk:nN,sd=(0,Z.useMemo)(()=>"pro"===ei?ey($.filter(e=>tz(e))):ev(nk),[ei,$,nk]),su=(0,Z.useMemo)(()=>(function(e){if(e.paused)return 0;if(!e.pageVisible)return 3e4;switch(e.activity){case"hot":return 800;case"warm":return 2e3;default:return 4e3}})({activity:sd,pageVisible:to}),[sd,to]),sx=tA(nj(B)),sm=tM(sc),sp=nv?tD(nw(th(nv)),eS||nv.urlLines||""):"",sh=tM(nk),sg=(0,Z.useMemo)(()=>{var e,t,n;let s=(null==eQ?void 0:eQ.active)||[],l=B.trim();return l?null!==(n=null!==(t=s.find(e=>e.process===l))&&void 0!==t?t:s[0])&&void 0!==n?n:null:null!==(e=s[0])&&void 0!==e?e:null},[B,null==eQ?void 0:eQ.active]),sb=(0,Z.useMemo)(()=>{var e;if("single"===ei)return eu;let t=er.find(e=>th(e)===B);return t&&t.id===(null==nv?void 0:nv.id)?eS:(null!==(e=null==t?void 0:t.urlLines)&&void 0!==e?e:"").trim()||eS},[null==nv?void 0:nv.id,er,ei,eS,B,eu]),sf="pro"===ei?er.find(e=>th(e)===B):null,sv=sf?er.findIndex(e=>e.id===sf.id):-1,sy=sf?tu(sf.name,sv>=0?sv:0):"",sw=tU(sy,nk,sb),sj=tZ(nk,sb,sy),sN=(tE(nk,I),tI(nk,sb)),sk=null==e4?void 0:null===(i=e4.lanes)||void 0===i?void 0:i.find(e=>e.process===B),s_=t2(nk,sk),sS=null!==(m=null==sk?void 0:sk.score)&&void 0!==m?m:null,sz="pro"===ei?$.filter(e=>tz(e)&&tM(e)).length:sh?1:0,sC=eC(s_.speed,"x"),sR=eC(s_.frame,"",0),sL=eC(s_.fps),sP=s_.live?ez(s_.bitrate):null,sT="number"==typeof(null==nk?void 0:nk.ffmpeg_time_seconds)?tV(nk.ffmpeg_time_seconds,I):null,sM=!nY||0===n0,sE=nY?ef.rtmps?"RTMPS":"RTMP":I("检查密钥","Check key"),sU=e=>{var t;let n=(null===(t=n5.link)||void 0===t?void 0:t.id)===e.id,l=td==="".concat(e.id,":start"),i=td==="".concat(e.id,":stop"),a=td==="".concat(e.id,":delete"),r=!!td,o=e.id===n1.length&&n1.length>1,c=r||!o;return(0,s.jsxs)("div",{className:"flex min-h-[2.5rem] items-stretch overflow-hidden rounded-lg border text-xs ring-1 ".concat(n?"border-emerald-400/30 bg-emerald-500/15 text-emerald-50 ring-emerald-400/25":"border-white/10 bg-white/5 text-zinc-200 ring-white/10"),children:[(0,s.jsxs)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 px-3 py-2 hover:bg-white/[0.04]",children:[(0,s.jsx)("span",{className:"font-semibold",children:e.label}),(0,s.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-100",children:e.accessLabel}),(0,s.jsxs)("span",{className:"font-mono text-white/70",children:[e.host||"",e.port?":".concat(e.port):""]})]}),(0,s.jsxs)("div",{className:"flex border-l border-white/10",children:[(0,s.jsxs)("button",{type:"button",disabled:r,title:I("启动 Neko 容器","Start Neko container"),onClick:()=>void n6(e,"start"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 px-2 text-emerald-100 hover:bg-emerald-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[l?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(G.Z,{className:"h-3.5 w-3.5"}),I("启动","Start")]}),(0,s.jsxs)("button",{type:"button",disabled:r,title:I("停止 Neko 容器","Stop Neko container"),onClick:()=>void n6(e,"stop"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-amber-100 hover:bg-amber-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[i?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(e7.Z,{className:"h-3.5 w-3.5"}),I("停止","Stop")]}),(0,s.jsxs)("button",{type:"button",disabled:c,title:o?I("删除最后一个 Neko 实例,保留浏览器配置数据","Delete the last Neko instance and keep browser profile data"):I("只能删除最后一个 Neko 实例","Only the last Neko instance can be deleted"),onClick:()=>void n6(e,"delete"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-rose-100 hover:bg-rose-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[a?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),I("删除","Delete")]})]})]},e.key)},sZ=(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eM,onChange:e=>eE(e.target.checked)}),I("后台自动从服务器刷新(空闲约 12 秒)","Auto-refresh from server (~12s when idle)")]}),(0,s.jsx)("button",{type:"button",disabled:sa,onClick:()=>void nf(),className:"rounded-lg border border-white/10 px-3 py-1.5 text-zinc-200 hover:bg-white/5",children:I("手动重新读取","Reload from server")}),(0,s.jsx)("button",{type:"button",disabled:sa,onClick:()=>void nV(),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-cyan-100 hover:bg-cyan-500/15",children:eB?I("去重中...","Deduplicating..."):I("智能去重","Deduplicate")})]}),sD=(null==eQ?void 0:eQ.active)||[],sI=(null==eQ?void 0:eQ.latest)||[],sA=(null==eQ?void 0:eQ.alerts)||[],sO=(null==eQ?void 0:eQ.stats)||{},sB=[{label:I("活动事件","Active"),value:null!==(p=sO.active_events)&&void 0!==p?p:sD.length,Icon:a.Z},{label:I("历史事件","History"),value:null!==(h=sO.total_events)&&void 0!==h?h:sI.length,Icon:te.Z},{label:I("采样点","Samples"),value:null!==(g=sO.sample_count)&&void 0!==g?g:0,Icon:tt.Z},{label:I("峰值在线","Viewer peak"),value:null!==(b=sO.viewer_peak)&&void 0!==b?b:0,Icon:tn.Z},{label:I("累计时长","Total duration"),value:tW(sO.total_duration_seconds),Icon:ts.Z}],sF=(tt.Z,I("直播事件中枢","Live event center"),I("事件、转播对象、时长、页面采集、弹窗和告警全部写入本地 SQLite,可追溯。","Events, source rooms, duration, browser telemetry, popups, and alerts are stored locally."),w.Z,I("刷新事件","Refresh events"),sB.map(e=>{let{label:t,value:n,Icon:l}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500",children:[(0,s.jsx)(l,{className:"h-3.5 w-3.5 text-cyan-300"}),t]}),(0,s.jsx)("p",{className:"mt-2 font-mono text-lg font-semibold text-white",children:String(n)})]},t)}),I("正在转播","Active relay"),sD.length,(sD.length?sD:sI.slice(0,1)).map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>void se(e.id),className:"block w-full rounded-lg border border-white/[0.06] bg-white/[0.03] px-3 py-2 text-left transition hover:bg-white/[0.06]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.source_title||e.channel_name||e.source_room_id||e.process||"#".concat(e.id)}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tH(e.status)),children:e.status||"event"})]}),(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 font-mono text-[10px] text-zinc-500",children:[(0,s.jsx)("span",{children:e.process||"-"}),(0,s.jsx)("span",{children:e.source_room_id?"room:".concat(e.source_room_id):I("未知来源","unknown source")}),(0,s.jsx)("span",{children:tW(e.duration_seconds)}),(0,s.jsx)("span",{children:null!=e.last_viewer_count?"".concat(e.last_viewer_count," online"):""})]})]},e.id)),sD.length||sI.length||I("暂无事件;开始直播或打开 Neko 中的 YouTube Studio 后会自动生成。","No events yet. Start a relay or open YouTube Studio in Neko."),I("最近事件","Recent events"),sI.slice(0,8).map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>void se(e.id),className:"flex w-full items-center justify-between gap-3 py-2 text-left",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.source_title||e.source_room_id||e.channel_name||e.process||"#".concat(e.id)}),(0,s.jsxs)("p",{className:"mt-0.5 font-mono text-[10px] text-zinc-600",children:[tK(e.started_at)," \xb7 ",tW(e.duration_seconds)]})]}),(0,s.jsxs)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tH(e.status)),children:[null!==(t=e.quality_score)&&void 0!==t?t:0,"/100"]})]},e.id)}),I("事件详情页","Event detail"),e1&&(()=>e5(null),I("收起","Close")),e1?(0,s.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:e1.source_title||e1.source_room_id||e1.process}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tH(e1.status)),children:e1.status})]}),(0,s.jsxs)("div",{className:"mt-2 grid gap-2 text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Process:"})," ",e1.process||"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Room:"})," ",e1.source_room_id||"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Started:"})," ",tK(e1.started_at)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Duration:"})," ",tW(e1.duration_seconds)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Viewers:"})," ",null!==(f=e1.last_viewer_count)&&void 0!==f?f:"-"," / peak ",null!==(v=e1.viewer_peak)&&void 0!==v?v:0]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"Health:"})," ",e1.last_health||e1.last_live_status||"-"]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[e1.source_url?(0,s.jsx)("a",{href:e1.source_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-[11px] text-violet-100 ring-1 ring-violet-500/25",children:I("打开源直播间","Open source")}):null,e1.last_page_url?(0,s.jsx)("a",{href:e1.last_page_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-[11px] text-cyan-100 ring-1 ring-cyan-500/25",children:I("打开 Studio 页面","Open Studio page")}):null]})]}),(e1.alerts||sA).slice(0,4).length?(0,s.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/[0.06] p-3",children:[(0,s.jsxs)("h5",{className:"flex items-center gap-2 text-xs font-semibold text-amber-100",children:[(0,s.jsx)(eg.Z,{className:"h-3.5 w-3.5"}),I("弹窗 / 告警","Popups / alerts")]}),(0,s.jsx)("div",{className:"mt-2 space-y-1",children:(e1.alerts||sA).slice(0,4).map((e,t)=>(0,s.jsxs)("p",{className:"text-[11px] text-amber-100/85",children:[e.title||e.severity||"alert",": ",e.message||"-"]},"".concat(e.id||t)))})]}):null,(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("h5",{className:"text-xs font-semibold text-zinc-300",children:I("采样时间线","Sample timeline")}),(0,s.jsxs)("div",{className:"mt-2 max-h-52 space-y-2 overflow-auto pr-1",children:[(e1.samples||[]).slice(0,12).map(e=>{var t;return(0,s.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-2 py-1.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 font-mono text-[10px] text-zinc-500",children:[(0,s.jsx)("span",{children:tK(e.ts)}),(0,s.jsx)("span",{children:e.source||"sample"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-300",children:[e.live_status||"-"," \xb7 ",e.health||"-"," \xb7 ",null!==(t=e.viewer_count)&&void 0!==t?t:"-"," online"]}),e.popup_text?(0,s.jsx)("p",{className:"mt-1 text-[10px] text-amber-100/80",children:e.popup_text}):null]},e.id)}),(e1.samples||[]).length?null:(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("暂无采样;Chrome 扩展或状态接口会自动写入。","No samples yet. The Chrome extension or status API will fill this.")})]})]})]}):(0,s.jsx)("p",{className:"mt-3 text-xs text-zinc-600",children:I("选择左侧事件查看完整详情。","Select an event to see details.")}),[...sD,...sI.filter(e=>!sD.some(t=>t.id===e.id))].slice(0,12)),sW=e1||sF[0]||null,sK=(null==sW?void 0:sW.samples)||[],sH=(null==sW?void 0:null===(r=sW.alerts)||void 0===r?void 0:r.length)?sW.alerts:sA,sY=[{label:I("正在直播","Live now"),value:String(null!==(j=sO.active_events)&&void 0!==j?j:sD.length),helper:I("当前仍在推流的场次","Events still pushing"),Icon:Y.Z,tone:"text-emerald-200"},{label:I("总场次","Total events"),value:String(null!==(N=sO.total_events)&&void 0!==N?N:sI.length),helper:I("本机数据库里的直播记录","Stored locally"),Icon:te.Z,tone:"text-cyan-200"},{label:I("累计时长","Total duration"),value:tV(sO.total_duration_seconds,I),helper:I("已结束场次累计","Ended events total"),Icon:ts.Z,tone:"text-violet-200"},{label:I("最高在线","Peak viewers"),value:tG(null!==(k=sO.viewer_peak)&&void 0!==k?k:0,I),helper:I("Chrome/Studio 采集峰值","Captured from Studio"),Icon:tn.Z,tone:"text-amber-200"}],sG=(tt.Z,I("直播事件中枢","Live event center"),I("这里按运营视角展示:谁在播、转播哪个直播间、播了多久、观众多少、Studio 是否弹窗、有没有异常。机器编号只放在详情底部。","Built for operators: what is live, source room, duration, viewers, Studio popups, and issues. Technical ids stay in the detail footer."),w.Z,I("刷新","Refresh"),sY.map(e=>{let{label:t,value:n,helper:l,Icon:i,tone:a}=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.035] p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,s.jsx)(i,{className:"h-4 w-4 ".concat(a)})]}),(0,s.jsx)("p",{className:"mt-2 text-2xl font-semibold tracking-tight text-white",children:n}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-600",children:l})]},t)}),sD.length?I("正在直播","Live now"):I("最近直播记录","Recent live events"),sD.length?I("优先显示还在推流的场次。","Active relays are listed first."):I("当前没有正在直播的场次,下方是最近历史。","Nothing is live now; showing recent history."),sF.length,I("条记录","records"),sF.map(e=>{var t;let n=(null==sW?void 0:sW.id)===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>void se(e.id),className:"grid w-full gap-3 px-4 py-4 text-left transition md:grid-cols-[minmax(0,1fr)_8rem_7rem_7rem] ".concat(n?"bg-cyan-500/[0.08]":"hover:bg-white/[0.04]"),children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tH(e.status)),children:tY(e.status,I)}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tQ(e)),children:tX(e,I)})]}),(0,s.jsx)("p",{className:"mt-2 truncate text-sm font-semibold text-white",children:tq(e,I)}),(0,s.jsxs)("p",{className:"mt-1 truncate text-xs text-zinc-500",children:[tJ(e,I)," ","->"," YouTube"]})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("开始","Started")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:t$(e.started_at)})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("时长","Duration")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:tV(e.duration_seconds,I)})]}),(0,s.jsxs)("div",{className:"self-center",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("在线/峰值","Viewers")}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-zinc-300",children:[tG(e.last_viewer_count,I)," / ",tG(null!==(t=e.viewer_peak)&&void 0!==t?t:0,I)]})]})]},e.id)}),sF.length||(c.Z,I("还没有直播记录","No live events yet"),I("启动转播或在 Neko 打开 YouTube Studio 后,这里会自动生成可追溯记录。","Start a relay or open YouTube Studio in Neko to create traceable records.")),sW?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs text-cyan-300",children:I("这场直播","Selected event")}),(0,s.jsx)("h4",{className:"mt-1 truncate text-lg font-semibold text-white",children:tq(sW,I)}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-zinc-500",children:[tJ(sW,I)," ","->"," YouTube"]})]}),(0,s.jsx)("span",{className:"rounded-full px-2.5 py-1 text-xs ring-1 ".concat(tH(sW.status)),children:tY(sW.status,I)})]})}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("直播时长","Duration")}),(0,s.jsx)("p",{className:"mt-1 text-lg font-semibold text-white",children:tV(sW.duration_seconds,I)}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:tK(sW.started_at)})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("观众","Viewers")}),(0,s.jsxs)("p",{className:"mt-1 text-lg font-semibold text-white",children:[tG(sW.last_viewer_count,I),(0,s.jsxs)("span",{className:"ml-2 text-xs font-normal text-zinc-500",children:[I("峰值","peak")," ",tG(null!==(_=sW.viewer_peak)&&void 0!==_?_:0,I)]})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:I("来自 Chrome 插件/Studio 页面采集","Captured from Studio")})]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("h5",{className:"text-sm font-semibold text-white",children:I("Studio 状态","Studio status")}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tQ(sW)),children:tX(sW,I)})]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2 text-sm text-zinc-300",children:[(0,s.jsx)("p",{children:sW.last_live_status||sW.last_health||I("暂未采集到 Studio 状态","No Studio status captured yet")}),sW.last_popup_text?(0,s.jsx)("p",{className:"rounded-md border border-amber-500/20 bg-amber-500/[0.08] px-3 py-2 text-xs text-amber-100",children:sW.last_popup_text}):(0,s.jsx)("p",{className:"text-xs text-zinc-600",children:I("没有记录到弹窗。","No popup recorded.")}),sW.last_page_title||sW.last_page_url?(0,s.jsx)("p",{className:"truncate text-xs text-zinc-500",children:sW.last_page_title||sW.last_page_url}):null]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[sW.source_url?(0,s.jsxs)("a",{href:sW.source_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/25",children:[I("打开源直播间","Open source")," ",(0,s.jsx)(W.Z,{className:"h-3 w-3"})]}):null,sW.last_page_url?(0,s.jsxs)("a",{href:sW.last_page_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-xs text-cyan-100 ring-1 ring-cyan-500/25",children:[I("打开 Studio","Open Studio")," ",(0,s.jsx)(W.Z,{className:"h-3 w-3"})]}):null]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsx)("h5",{className:"text-sm font-semibold text-white",children:I("采样时间线","Telemetry timeline")}),(0,s.jsxs)("div",{className:"mt-3 max-h-64 space-y-2 overflow-auto pr-1",children:[sK.slice(0,10).map(e=>(0,s.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-zinc-400",children:t$(e.ts)}),(0,s.jsx)("span",{className:"text-zinc-600",children:e.source||I("采样","sample")})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-zinc-200",children:[e.live_status||e.health||I("状态未识别","Unknown status"),(0,s.jsxs)("span",{className:"ml-2 text-xs text-zinc-500",children:[I("在线","online")," ",tG(e.viewer_count,I)]})]}),e.popup_text?(0,s.jsx)("p",{className:"mt-1 text-xs text-amber-100",children:e.popup_text}):null]},e.id)),sK.length?null:(0,s.jsx)("p",{className:"rounded-md border border-white/[0.05] bg-black/20 px-3 py-3 text-xs text-zinc-500",children:e1?I("这场直播暂时没有采样明细。","No telemetry samples for this event yet."):I("点击左侧记录后加载完整采样明细。","Click a record on the left to load full telemetry samples.")})]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,s.jsxs)("h5",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,s.jsx)(eg.Z,{className:"h-4 w-4 text-amber-300"}),I("告警和弹窗","Alerts and popups")]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2",children:[sH.slice(0,4).map((e,t)=>(0,s.jsxs)("p",{className:"rounded-md border border-amber-500/15 bg-amber-500/[0.06] px-3 py-2 text-xs text-amber-100",children:[e.title||e.severity||I("提示","Notice"),": ",e.message||"-"]},"".concat(e.id||t))),sH.length?null:(0,s.jsx)("p",{className:"text-xs text-zinc-600",children:I("没有告警。","No alerts.")})]})]}),(0,s.jsxs)("p",{className:"truncate text-[11px] text-zinc-700",children:[I("技术标识","Technical id"),": #",sW.id," \xb7 ",sW.process||"-"," \xb7 ",sW.event_uuid||"-"]})]}):(0,s.jsxs)("div",{className:"flex min-h-[24rem] flex-col items-center justify-center text-center",children:[(0,s.jsx)(tt.Z,{className:"h-10 w-10 text-zinc-700"}),(0,s.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:I("等待第一场直播","Waiting for the first live event")}),(0,s.jsx)("p",{className:"mt-1 max-w-sm text-xs text-zinc-600",children:I("开始转播后,这里会变成这场直播的详情页。","After a relay starts, this panel becomes the event detail page.")})]}),(null==e4?void 0:e4.summary)||{}),sq=(null==e4?void 0:e4.lanes)||[],sJ=(null==e4?void 0:e4.recommendations)||[];return a.Z,I("算法友好质量守护","Algorithm-friendly quality guard"),I("目标不是刷数据,而是让直播信号长期稳定:不断流、不卡顿、Studio 状态可见、异常能追踪。","The goal is stable, policy-safe signal quality: no drops, no stalls, visible Studio state, and traceable issues."),w.Z,I("重新检测","Check now"),I("综合分","Score"),t0(null==e4?void 0:e4.score),S=null==e4?void 0:e4.score,I("80 以上适合长时间无人值守","80+ is suitable for long unattended runs"),[[I("推流线路","Lanes"),"".concat(null!==(z=sG.pushing_lanes)&&void 0!==z?z:0,"/").concat(null!==(R=sG.lanes)&&void 0!==R?R:0)],[I("活动事件","Active events"),String(null!==(L=sG.active_events)&&void 0!==L?L:0)],[I("Studio 采样","Studio samples"),String(null!==(P=sG.sample_count)&&void 0!==P?P:0)],[I("最高在线","Viewer peak"),tG(null!==(T=sG.viewer_peak)&&void 0!==T?T:0,I)]].map(e=>{let[t,n]=e;return(0,s.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,s.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,s.jsx)("p",{className:"mt-2 text-2xl font-semibold text-white",children:n})]},t)}),I("线路质量","Lane quality"),I("从进程、FFmpeg 日志、配置和事件采样综合判断。","Combined from process state, FFmpeg logs, config, and event telemetry."),sq.map(e=>{var t,n,l,i,a,r,o;let c=(e.label||"").replace(/^YouTube Pro\s*·\s*/i,"").trim(),d=t2(nw(String(e.process||"")),e),u=(e.source_display||e.source_title||"").trim()||c||e.label||e.process||"-",x=e.is_pushing&&c&&u!==c?c:"",m=[e.label,e.process].filter(Boolean).join(" \xb7 ");return(0,s.jsxs)("div",{className:"grid gap-3 px-4 py-4 md:grid-cols-[minmax(0,1fr)_6rem_14rem]",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:u}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.is_pushing?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"),children:e.is_pushing?I("推流中","Pushing"):I("未推流","Idle")}),(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.rtmps?"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25":"bg-amber-500/15 text-amber-100 ring-amber-500/25"),children:e.rtmps?"RTMPS":I("非 RTMPS","No RTMPS")})]}),x&&x!==u?(0,s.jsx)("p",{className:"mt-0.5 truncate text-xs text-zinc-500",children:x}):null,(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:m||"-"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:(e.issues||[]).slice(0,3).map((e,t)=>(0,s.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(t1(e.level)),children:e.text||e.level},"".concat(e.text||t)))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:I("分数","Score")}),(0,s.jsx)("p",{className:"mt-1 text-2xl font-semibold ".concat(t0(e.score)),children:null!==(l=e.score)&&void 0!==l?l:0})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-2 font-mono text-[11px] text-zinc-300",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"fps"}),eC(d.fps)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"speed"}),(0,s.jsx)("span",{className:d.speedLow?"text-amber-300":"",children:eC(d.speed,"x")})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:I("码率","Bitrate")}),e.is_pushing&&null!==(i=ez(d.bitrate))&&void 0!==i?i:"—"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"frame"}),(0,s.jsx)("span",{className:d.progressStalled?"text-rose-300":"",children:eC(d.frame,"",0)})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"drop"}),null!==(a=null===(t=e.metrics)||void 0===t?void 0:t.drop)&&void 0!==a?a:"-"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"urls"}),null!==(r=e.url_count)&&void 0!==r?r:0]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"block text-zinc-600",children:"err"}),null!==(o=null===(n=e.metrics)||void 0===n?void 0:n.error_count)&&void 0!==o?o:0]})]})]},e.process||e.label)}),sq.length||I("没有发现 YouTube 线路。","No YouTube lanes found."),I("下一步建议","Next actions"),sJ.slice(0,6).map((e,t)=>(0,s.jsx)("p",{className:"rounded-lg px-3 py-2 text-xs ring-1 ".concat(t1(e.level)),children:e.text||"-"},"".concat(e.text||t))),sJ.length||I("暂无建议。","No recommendations."),null==e4||null===(o=e4.ffmpeg_profile)||void 0===o||o.target,((null==e4?void 0:null===(d=e4.ffmpeg_profile)||void 0===d?void 0:d.guardrails)||[]).slice(0,4).map(e=>(0,s.jsxs)("li",{children:["- ",e]},e)),Y.Z,I("转播实况","Relay snapshot"),tF(nk),sw||I("未配置抖音直播源","No Douyin source configured"),sj&&sj!==sw&&I("抖音源","Douyin"),"pro"===ei&&sz>0&&" \xb7 ".concat(sz,"/").concat(er.length," ").concat(I("路推流中","lanes pushing")),sN&&(W.Z,I("打开源站","Open source")),n5.link&&(W.Z,I("Studio","Studio")),w.Z,I("刷新全局","Refresh"),[{label:I("FFmpeg 速度","FFmpeg speed"),value:sC,warn:s_.speedLow,helper:s_.live?sT?"".concat(I("已编码","Encoded")," ").concat(sT):I("实时倍速","Realtime multiplier"):I("等待进程上报","Waiting for metrics"),accent:s_.speedLow?"amber":"emerald"},{label:I("实时 FPS","Live FPS"),value:sL,warn:"number"==typeof s_.fps&&s_.fps>0&&s_.fps<24,helper:s_.live?I("FFmpeg 输出帧率","FFmpeg output fps"):I("未推流","Not pushing"),accent:"cyan"},{label:I("编码帧","Encoded frame"),value:sR,warn:s_.progressStalled,helper:(null==nk?void 0:nk.ffmpeg_active)?I("Worker 活跃","Worker active"):I("无活跃 Worker","No active worker"),accent:s_.progressStalled?"amber":"violet"},{label:I("码率","Bitrate"),value:null!=sP?sP:"—",warn:!1,helper:s_.live?I("实时输出码率","Live output bitrate"):I("停推后不显示","Hidden when idle"),accent:"cyan"},{label:I("质量分","Quality score"),value:null!=sS?String(sS):"—",warn:null!=sS&&sS<55,helper:I("当前线路综合评估","Current lane score"),accent:"violet"},{label:I("活动场次","Active events"),value:String(st),warn:!1,helper:I("本地事件库","Local event store"),accent:"cyan"},{label:I("抖音地址","Douyin URLs"),value:String(n0),warn:0===n0,helper:"".concat(nQ," ").concat(I("条有效地址","valid URLs")),accent:"cyan"},{label:I("密钥尾码","Key suffix"),value:nG,warn:!nY,helper:sE,accent:"violet"}].map(e=>{let{label:t,value:n,warn:l,helper:i,accent:a}=e;return(0,s.jsx)(t5,{label:t,value:n,warn:l,helper:i,accent:a},t)}),sg&&sh&&(I("本场直播","This event"),tH(sg.status),tY(sg.status,I),tQ(sg),tX(sg,I),I("观众","Viewers"),tG(sg.last_viewer_count,I),tV(sg.duration_seconds,I),sg.last_popup_text?(0,s.jsxs)("span",{className:"text-amber-200",children:[I("弹窗","Popup"),": ",sg.last_popup_text]}):null),(0,s.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[Q?(0,s.jsx)(eh,{t:I,title:I("YouTube 转播链路","YouTube relay chain"),subtitle:I("与「网络」页相同风格的链路示意:代理 → 编码推流 → 浏览器侧操作工作室。","Same visual language as Network: proxy → encode → browser studio."),onNavigate:Q,steps:[{label:"ShellCrash",sub:I("透明代理","Proxy"),gradient:"from-violet-500 to-fuchsia-500",target:"network"},{label:"FFmpeg",sub:I("推流 / 转码","Stream"),gradient:"from-cyan-400 to-blue-500",target:"live_youtube"},{label:"Neko",sub:n5.link?"".concat(I("Chromium 工作室","Chromium studio")," \xb7 ").concat(n5.link.label):I("Chromium 工作室","Chromium studio"),gradient:"from-emerald-400 to-teal-500",openUrl:n2}]}):null,(0,s.jsx)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/[0.12] via-zinc-950/80 to-cyan-500/5 p-6 shadow-xl shadow-violet-900/10",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-red-500/30 to-violet-600/30 ring-1 ring-white/10",children:(0,s.jsx)(c.Z,{className:"h-5 w-5 text-red-200"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:I("YouTube 无人直播","YouTube unmanned live")}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:I("单路一条流;多路时每条线路独立保存自己的密钥、URL 列表和 PM2 任务。填好后保存,再点「开始」。Neko 浏览器仅作辅助工作室,不再阻塞推流。","Single lane or multi-lane: every lane keeps its own key, URL list, and PM2 task. Save, then Start. Neko is optional browser tooling and no longer blocks streaming.")})]})]}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 self-start rounded-xl border border-white/10 bg-black/30 p-1 ".concat(""),"aria-hidden":!1,children:[(0,s.jsx)("button",{type:"button",onClick:()=>nI("single"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("single"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:I("单频道","Single")}),(0,s.jsx)("button",{type:"button",onClick:()=>nI("pro"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("pro"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:I("多频道 Pro","Multi Pro")})]})]})}),null,n4.length?(0,s.jsxs)("div",{className:"space-y-2",children:[tg?(0,s.jsx)("p",{className:"text-xs text-zinc-400",children:tg}):null,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[n5.link?(0,s.jsx)("a",{href:n2,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/20",children:I("打开当前线路 Neko 工作室","Open lane Neko studio")}):null,n1.length?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n1.map(e=>sU(e))}):null,(null==et?void 0:et.chromium_remote_debug)?(0,s.jsx)("a",{href:(0,ep.p)(et.chromium_remote_debug),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:I("打开 Chromium 调试","Open Chromium debug")}):null,(null==et?void 0:et.srs_api)?(0,s.jsx)("a",{href:(0,ep.p)(et.srs_api),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-violet-500/20 bg-violet-500/10 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/20",children:I("打开 SRS API","Open SRS API")}):null]})]}):null,(0,s.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,s.jsx)(Y.Z,{className:"h-4 w-4"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播开关","Live control")})]}),"single"===ei?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:I("转播任务","Relay task")}),(0,s.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:B,onChange:e=>{let t=e.target.value;nt.current=t,F(t),nZ(t)},children:[B&&!es.some(e=>e.pm2===B)?(0,s.jsxs)("option",{value:B,children:[ny?"".concat(ny.name||ny.id," (").concat(B,")"):B,nN?" (".concat(tB(nN,I),")"):""]}):null,es.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[function(e,t){let n=tS(e.script).toLowerCase();return n.startsWith("douyin_youtube")?t("抖音→YouTube","Douyin → YouTube"):n.startsWith("youtube")?t("YouTube","YouTube"):e.label}(e,I)," (",e.pm2,")"]},e.pm2))]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,s.jsx)(t6,{kind:"start",targetPm2:B,busy:A,online:sx,pushing:sm,label:I("开始直播","Start"),className:"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30",baseLock:!1,onRun:()=>q("start",B),notify:X,t:I}),(0,s.jsx)(t6,{kind:"stop",targetPm2:B,busy:A,online:sx,pushing:sm,label:I("停止直播","Stop"),className:"bg-rose-500/15 text-rose-200 ring-rose-500/25",baseLock:!1,onRun:()=>q("stop",B),notify:X,t:I}),(0,s.jsx)(t6,{kind:"restart",targetPm2:B,busy:A,online:sx,pushing:sm,label:I("重新开始","Restart"),className:"bg-amber-500/15 text-amber-200 ring-amber-500/25",baseLock:!1,onRun:()=>q("restart",B),notify:X,t:I}),(0,s.jsxs)("button",{type:"button",onClick:()=>tO(B),className:"inline-flex min-h-[2.75rem] items-center justify-center gap-1.5 rounded-xl bg-violet-500/15 px-3 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/25 transition hover:bg-violet-500/25",title:I("打开推流日志(新标签页)","Open relay log in a new tab"),children:[(0,s.jsx)(tl.Z,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),I("日志","Log")]})]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"rounded-full px-2.5 py-0.5 font-medium ring-1 ".concat(tF(sc)),children:tB(sc,I)}),"number"==typeof(null==sc?void 0:sc.ffmpeg_speed)?(0,s.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(sc.ffmpeg_speed_low?"text-amber-300":""),children:["speed ",sc.ffmpeg_speed.toFixed(2),"x"]}):null,"number"==typeof(null==sc?void 0:sc.ffmpeg_frame)?(0,s.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(sc.ffmpeg_progress_stalled?"text-rose-300":""),children:["frame ",sc.ffmpeg_frame]}):null]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.1] via-zinc-950/50 to-violet-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:[(0,s.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:I("Pro 转播实况","Pro relay status")}),(0,s.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:I("对齐桌面端:每路独立 URL / youtube 配置文件;点左侧信息切换编辑,右侧控制进程。","Per-lane config files like desktop; click row info to edit, use right-side controls for PM2.")}),n3?(0,s.jsxs)("p",{className:"mt-2 text-[11px] text-zinc-500",children:[I("Neko 实例","Neko instances"),": ",n3]}):null,(0,s.jsx)("div",{className:"mt-3 max-h-[min(24rem,55vh)] space-y-2 overflow-y-auto pr-1",children:er.map(e=>{var t,n,l,i,a,r,o;let c=th(e),d=nw(c),u=nj(c),x=ec===e.id,m=x?eS:(null!==(n=e.urlLines)&&void 0!==n?n:"").trim(),p=x?null!==(i=null!==(l=null==nR?void 0:nR.streamKey)&&void 0!==l?l:e.streamKey)&&void 0!==i?i:"":null!==(a=e.streamKey)&&void 0!==a?a:"",h=t3(m),g=eP(m),b=tI(d,m),f=eL("key = ".concat(p)),v=tA(u),y=tM(d),w=er.findIndex(t=>t.id===e.id),j=(0,ta.U_)(n1,w).link,N=tu(e.name,w>=0?w:0),k=null==e4?void 0:null===(t=e4.lanes)||void 0===t?void 0:t.find(e=>e.process===c),_=tU(N,d,m,k),S=tZ(d,m,N),z=tE(d,I),C=t2(d,k),R=eR(C,{live:C.live||tM(d)});return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border px-3 py-2.5 text-left text-xs transition sm:flex-nowrap ".concat(x?"border-violet-500/45 bg-violet-500/[0.1]":"border-white/10 bg-black/30 hover:border-white/18"),children:[(0,s.jsxs)("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:()=>{nt.current=th(e),nA(e)},children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"font-medium text-zinc-100",children:[(0,s.jsx)("span",{className:"mr-1.5","aria-hidden":!0,children:function(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"streaming"===t?"\uD83D\uDFE2":"relay_slow"===t?"\uD83D\uDFE1":"source_stalled"===t?"\uD83D\uDFE0":"relay_starting"===t?"\uD83D\uDD35":"youtube_key_rejected"===t||"error"===t?"\uD83D\uDD34":"source_live"===t?"\uD83D\uDD35":"waiting_source"===t?"⚪":"⚫"}(d)}),_||I("未配置抖音直播源","No Douyin source")]}),(0,s.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(tF(d)),children:z}),j?(0,s.jsxs)("span",{className:"shrink-0 rounded-md bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[j.label," \xb7 ",j.accessLabel]}):null]}),(0,s.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-[10px] text-zinc-500",children:[S&&S!==_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"truncate text-zinc-400",title:S,children:[I("抖音源","Douyin")," ",S]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"})]}):null,(0,s.jsxs)("span",{title:N,children:[I("线路","Lane")," ",N]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["key …",f||"—"]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsx)("span",{className:"truncate",title:c,children:c}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["URL ",h.length]}),(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsxs)("span",{children:["DY ",g.length]}),R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,s.jsx)("span",{className:(r=C.speed,o=C.speedLow,C.progressStalled?"text-rose-300":o||"number"==typeof r&&r>0&&r<.95?"text-amber-200":"number"==typeof r&&r>=.95?"text-emerald-200":"text-cyan-100"),children:R})]}):null]}),b?(0,s.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",className:"mt-1 block max-w-full truncate text-cyan-300/90 underline-offset-2 hover:underline",onClick:e=>e.stopPropagation(),title:b,children:_?"".concat(I("打开源站","Open source")," \xb7 ").concat(b.replace(/^https?:\/\//,"")):b.replace(/^https?:\/\//,"")}):(0,s.jsx)("span",{className:"mt-1 block text-zinc-600",children:"—"})]}),(0,s.jsxs)("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,s.jsx)(t6,{kind:"start",targetPm2:c,busy:A,online:v,pushing:y,label:I("开始","Start"),className:"rounded-lg bg-emerald-500/20 text-emerald-100 ring-emerald-500/30",baseLock:!1,onRun:()=>void n9("start",c),notify:X,t:I,compact:!0}),(0,s.jsx)(t6,{kind:"stop",targetPm2:c,busy:A,online:v,pushing:y,label:I("停止","Stop"),className:"rounded-lg bg-rose-500/15 text-rose-100 ring-rose-500/25",baseLock:!1,onRun:()=>void n9("stop",c),notify:X,t:I,compact:!0}),(0,s.jsx)(t6,{kind:"restart",targetPm2:c,busy:A,online:v,pushing:y,label:I("重新开始","Restart"),className:"rounded-lg bg-amber-500/15 text-amber-100 ring-amber-500/25",baseLock:!1,onRun:()=>void n9("restart",c),notify:X,t:I,compact:!0}),(0,s.jsxs)("button",{type:"button",onClick:()=>tO(c),className:"inline-flex min-h-[2rem] items-center justify-center gap-1 rounded-lg border border-violet-500/25 bg-violet-500/10 px-2.5 py-1.5 text-violet-100 ring-1 ring-violet-500/20 transition hover:bg-violet-500/20",title:I("打开推流日志(新标签页)","Open relay log in a new tab"),children:[(0,s.jsx)(tl.Z,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),I("日志","Log")]}),j?(0,s.jsxs)("button",{type:"button",onClick:()=>{window.open((0,ep.p)(j.url),"_blank","noopener,noreferrer")},className:"inline-flex min-h-[2rem] items-center justify-center rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2.5 py-1.5 text-emerald-100 ring-1 ring-emerald-500/20 transition hover:bg-emerald-500/20",title:"".concat(I("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(j.label).concat(j.port?" :".concat(j.port):""),"aria-label":"".concat(I("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(j.label),children:[(0,s.jsx)("span",{className:"sr-only",children:I("打开该线路 Neko 工作室","Open this lane's Neko studio")}),(0,s.jsx)("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"\uD83D\uDC31"}),(0,s.jsx)(W.Z,{className:"ml-1 h-3.5 w-3.5 shrink-0","aria-hidden":!0})]}):null]})]},e.id)})})]})})]}),(0,s.jsx)(eO,{t:I,currentProc:B,fetchJson:V,urlListText:sb,keySuffixUi:nY,showKeyRow:!1,hideStatusOverview:!0,pollMs:su,refreshToken:e$,monitorRow:null!=nk?nk:void 0,preferredTitle:"pro"===ei?sy:void 0}),null,null,(0,s.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 ring-1 ring-white/[0.03]",children:[(0,s.jsxs)("div",{className:"border-b border-white/[0.06] px-6 py-4",children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[I("配置与地址","Config and URLs"),sM?(0,s.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:I("待完善","Needs setup")}):null]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("密钥、youtube.ini、URL 列表","Keys, youtube.ini, URL list")})]}),(0,s.jsxs)("div",{className:"space-y-6 p-6 pt-4",children:["single"===ei?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("YouTube 相关设置","YouTube settings")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("串流参数写进 youtube.ini,无需 Google 登录。","Stream settings go to youtube.ini — no Google login.")}),(0,s.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,s.jsx)("label",{className:"block text-xs text-zinc-400",children:I("串流密钥","Stream key")}),(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm font-mono text-zinc-200",spellCheck:!1,autoComplete:"off",value:ef.key,onChange:e=>ew(t=>({...t,key:e.target.value})),placeholder:"xxxx-xxxx-xxxx-xxxx-xxxx"}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:["RTMPS",(0,s.jsxs)("select",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-sm text-white",value:ef.rtmps?"1":"0",onChange:e=>ew(t=>({...t,rtmps:"1"===e.target.value})),children:[(0,s.jsx)("option",{value:"1",children:I("是(默认)","Yes")}),(0,s.jsx)("option",{value:"0",children:I("否 → RTMP","No")})]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:[I("比特率 kbps","Bitrate kbps"),(0,s.jsx)("input",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",value:ef.bitrate,onChange:e=>ew(t=>({...t,bitrate:e.target.value})),placeholder:"4000"})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 pt-6 text-xs text-zinc-300",children:[(0,s.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:ef.fastAudio,onChange:e=>ew(t=>({...t,fastAudio:e.target.checked}))}),"fast_audio(",I("轻量音频","lighter audio"),")"]})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:sa,onClick:()=>void nO(),className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-200",children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(ek?"animate-spin":"")}),I("重新读取","Reload")]}),(0,s.jsxs)("button",{type:"button",disabled:sa,onClick:()=>void nK(),className:"inline-flex items-center gap-2 rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:[ek?(0,s.jsx)(y.Z,{className:"h-4 w-4 animate-spin"}):null,I("保存 youtube.ini","Save youtube.ini")]}),(0,s.jsx)("button",{type:"button",disabled:sa,onClick:()=>void nH(),className:"rounded-xl border border-cyan-500/20 bg-cyan-500/10 px-4 py-2 text-sm text-cyan-100",children:I("平衡预设","Balanced preset")}),(0,s.jsx)("button",{type:"button",disabled:sa,onClick:()=>{ew(eZ(em)),eN(I("已从下方原文同步到表单","Synced from raw"))},className:"rounded-xl border border-white/10 px-4 py-2 text-sm text-zinc-400",children:I("从原文同步表单","Parse raw")})]}),(0,s.jsxs)("details",{className:"mt-4 rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:I("高级:youtube.ini 原文","Raw youtube.ini")}),(0,s.jsx)("textarea",{className:"mt-2 h-36 w-full resize-y rounded-lg border border-white/10 bg-black/50 p-3 font-mono text-[11px] text-zinc-400",value:em,onChange:e=>eb(e.target.value),spellCheck:!1}),(0,s.jsx)("button",{type:"button",disabled:sa,className:"mt-2 rounded-lg bg-cyan-500/15 px-3 py-1.5 text-xs text-cyan-200",onClick:()=>void nF(em),children:I("保存原文","Save raw")})]}),ej?(0,s.jsx)("p",{className:"mt-2 font-mono text-xs text-zinc-500",children:ej}):null]}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[I("当前线路","Current lane"),nv?(0,s.jsxs)("span",{className:"ml-2 font-normal text-zinc-400",children:["\xb7 ",sp||I("未配置抖音直播源","No Douyin source")]}):null,nU?(0,s.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:I("有未保存修改","Unsaved")}):null]}),nv?(0,s.jsxs)("p",{className:"mt-0.5 font-mono text-[11px] text-zinc-500",children:[I("配置名","Config"),": ",tu(nv.name,Math.max(0,er.findIndex(e=>e.id===nv.id)))," \xb7 PM2: ",nP,nM?" → ".concat(nT):""," \xb7 ","key ",I("尾码","suffix"),": ",nG]}):null]}),(0,s.jsxs)("button",{type:"button",disabled:sr,className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/30",onClick:()=>{let e=tj(),t={id:e,name:"".concat(I("线路","Ch")," ").concat(er.length+1),streamKey:"",urlLines:"",pm2Name:tN(e),notes:""};eY(n=>({...n,[e]:tP(t)})),nC([...er,t],{force:!0}),ed(e),nt.current=th(t),F(nt.current),nc(""),nn.current+=1,ns.current+=1,t8.current=!1,eb(""),ew(eZ("")),eK(I("新线路已切换,地址列表为空","New lane selected with an empty URL list"))},children:[(0,s.jsx)(ti.Z,{className:"h-3.5 w-3.5"}),I("新增线路","Add lane")]})]}),nv?(0,s.jsxs)("div",{className:"mt-4 space-y-3 border-t border-white/5 pt-4",children:[(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 text-sm",value:null!==(M=null==nR?void 0:nR.name)&&void 0!==M?M:"",onChange:e=>nL("name",e.target.value),placeholder:I("线路名称","Lane name")}),(0,s.jsx)("label",{className:"block text-xs text-zinc-500",children:I("串流密钥","Stream key")}),(0,s.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",spellCheck:!1,value:null!==(E=null==nR?void 0:nR.streamKey)&&void 0!==E?E:"",onChange:e=>nL("streamKey",e.target.value),placeholder:"xxxx-xxxx… / rtmp(s)://…"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>void nW(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-100",children:eG?I("保存中...","Saving..."):I("保存线路设置","Save lane")}),(0,s.jsx)("button",{type:"button",disabled:sr,onClick:()=>void n$(),className:"rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:I("写入 youtube.ini","Write youtube.ini")})]}),nE.ok?null:(0,s.jsx)("p",{className:"text-xs text-rose-300",children:nE.message}),(0,s.jsxs)("details",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:I("高级:进程名","Advanced: process name")}),(0,s.jsx)("input",{className:"mt-2 w-full rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:null!==(U=null==nR?void 0:nR.pm2Name)&&void 0!==U?U:tN(nv.id),onChange:e=>nL("pm2Name",e.target.value),spellCheck:!1,placeholder:"youtube2__…"}),(0,s.jsxs)("p",{className:"mt-2 font-mono text-[11px] text-zinc-500",children:[I("实际生效","Effective"),": ",nT||"—"]}),nE.message&&!nE.ok?(0,s.jsx)("p",{className:"mt-2 text-[11px] text-rose-300",children:nE.message}):null]}),(0,s.jsx)("textarea",{className:"h-16 w-full resize-y rounded-xl border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:null!==(D=null==nR?void 0:nR.notes)&&void 0!==D?D:"",onChange:e=>nL("notes",e.target.value),placeholder:I("备注(可选)","Notes (optional)")}),eJ?(0,s.jsx)("p",{className:"text-xs text-zinc-400",children:eJ}):null,(0,s.jsxs)("button",{type:"button",disabled:sa||er.length<2,className:"inline-flex items-center gap-1 text-xs text-rose-300 hover:text-rose-200 disabled:opacity-30",onClick:()=>{var e,t;let n=er.filter(e=>e.id!==nv.id),s=null!==(e=n[0])&&void 0!==e?e:null;if(eY(e=>{let t={...e};return delete t[nv.id],t}),nC(n,{force:!0}),ed((null==s?void 0:s.id)||""),s){let e=th(s);nt.current=e,F(e),nc((null!==(t=s.urlLines)&&void 0!==t?t:"").trim()),nD(s)}else nt.current="",F(""),nc("")},children:[(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),I("删除此线路","Delete lane")]})]}):null]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播地址列表","URL list")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("每条线路独立写入自己的 URL_config..ini,不再复用或回填所谓“全局地址”。","Each lane writes to its own URL_config..ini with no shared global URL draft.")}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eD(B):"URL_config.ini"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,s.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[I("有效地址","Valid URLs"),": ",nQ]}),(0,s.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",n0]})]}),sZ,eW?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eW}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[160px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eS,onChange:e=>{t8.current=!0,nc(e.target.value)},spellCheck:!1,placeholder:"https://live.douyin.com/..."}),(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,s.jsx)("button",{type:"button",disabled:eG,title:so||void 0,onClick:()=>void nq(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:I("保存地址","Save URLs")})})]})]}),"single"===ei?(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-white",children:I("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:I("一行一个地址;可自动刷新或手动重新读取。","One URL per line; auto-refresh or reload.")}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eD(B):"URL_config.ini"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,s.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[I("有效地址","Valid URLs"),": ",nQ]}),(0,s.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",n0]})]}),sZ,eW?(0,s.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eW}):null,(0,s.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eu,onChange:e=>{t8.current=!0,no(e.target.value)},spellCheck:!1}),(0,s.jsx)("button",{type:"button",disabled:eG,title:so||void 0,onClick:()=>void nJ(),className:"mt-3 rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:I("保存 URL 配置","Save URL config")})]}):null]})]})]})}var t9=n(2555);let t7=["dashboard","services","live_youtube","live_tiktok","android","studio","network","settings"],ne=()=>void 0!==t9&&t9.env.NEXT_PUBLIC_API_URL||"";function nt(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],n=e,s=0;for(;n>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function nn(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e));if(t<60)return"".concat(t,"s");let n=Math.floor(t/60);if(n<60)return"".concat(n,"m");let s=Math.floor(n/60);return s<48?"".concat(s,"h"):"".concat(Math.floor(s/24),"d")}function ns(e){return"online"===e||"running"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}function nl(e,t){let n=null!=t?t:(e,t)=>t||e,s=(e||"").trim().toLowerCase();return"connected"===s?n("高速可用","Ready"):"configured"===s?n("已配置","Configured"):"detected"===s?n("接口已起","Detected"):"idle"===s?n("等待握手","Idle"):"stale"===s?n("握手过期","Stale"):"down"===s?n("未连接","Down"):e||"—"}function ni(){var e,t,n,R,I,A,O,B,F,W,K,H,Y,G,q,J,$,X,Q,ee,et,en,es,el,ei,ea,er,eo,ec,eu,ex,em,eh,eg,eb,ef,ev,ew,ej,eN,ek,e_,eS,ez,eC,eR,eL,eP,eT,eM,eE,eU,eZ,eD,eI,eA,eO,eB,eF,eW,eK,eH,eG,eq,eJ,eV,e$,eX,eQ,e0,e1,e5,e2,e3;let e4=ne(),[e6,e9]=(0,Z.useState)("zh"),[e7,te]=(0,Z.useState)("dark"),[tt,tn]=(0,Z.useState)("dashboard"),[ts,tl]=(0,Z.useState)(!1),[ti,tr]=(0,Z.useState)(!1),[to,tc]=(0,Z.useState)(null),[td,tu]=(0,Z.useState)(null),[tx,tm]=(0,Z.useState)(!0),[tp,th]=(0,Z.useState)(null),[tg,tb]=(0,Z.useState)(null),[tf,tv]=(0,Z.useState)(null),[ty,tw]=(0,Z.useState)(!0),[tj,tN]=(0,Z.useState)([]),[tk,t_]=(0,Z.useState)([]),[tS,tz]=(0,Z.useState)(""),[tC,tR]=(0,Z.useState)(""),[tL,tP]=(0,Z.useState)("/sdcard/app.apk"),[tT,tM]=(0,Z.useState)(""),[tE,tU]=(0,Z.useState)(null),[tZ,tD]=(0,Z.useState)(null),[tI,tA]=(0,Z.useState)(!0),[tO,tB]=(0,Z.useState)(!0),[tF,tW]=(0,Z.useState)("tencent-relay-wg0"),[tK,tH]=(0,Z.useState)(""),[tY,tG]=(0,Z.useState)(null),[tq,tJ]=(0,Z.useState)(null),[tV,t$]=(0,Z.useState)(null),[tX,tQ]=(0,Z.useState)(!1),[t0,t1]=(0,Z.useState)(!0),[t5,t2]=(0,Z.useState)("overlay"),[t3,t4]=(0,Z.useState)(""),[t6,t9]=(0,Z.useState)(""),[ni,na]=(0,Z.useState)(""),[nr,no]=(0,Z.useState)("255.255.255.255"),[nc,nd]=(0,Z.useState)("9"),[nu,nx]=(0,Z.useState)([]),[nm,np]=(0,Z.useState)(""),[nh,ng]=(0,Z.useState)(""),[nb,nf]=(0,Z.useState)(""),[nv,ny]=(0,Z.useState)([]),[nw,nj]=(0,Z.useState)(""),[nN,nk]=(0,Z.useState)("115200"),[n_,nS]=(0,Z.useState)("AT"),[nz,nC]=(0,Z.useState)(""),[nR,nL]=(0,Z.useState)(null),nP=(0,Z.useRef)(null),nT=(0,Z.useRef)(null),nM=(0,Z.useRef)(null),nE=(0,Z.useRef)(tS),nU=(0,Z.useRef)(0),nZ=(0,Z.useRef)(null),nD=(0,Z.useCallback)((e,t)=>"zh"===e6?e:t,[e6]),nI=(0,Z.useCallback)(e=>{tb(e),null!=nZ.current&&window.clearTimeout(nZ.current),nZ.current=window.setTimeout(()=>{tb(null),nZ.current=null},2800)},[]),nA=(0,Z.useCallback)(async(e,t)=>(0,V.N)("".concat(e4).concat(e),t),[e4]),nO=(0,Z.useCallback)(async()=>{if(nT.current)return nT.current;let e=(async()=>{try{let e=await nA("/stack/summary");tc(t=>({...null!=t?t:{},stack:e})),tu(null),tv(Date.now())}catch(e){tu(e.message)}finally{nT.current=null}})();return nT.current=e,e},[nA]),nB=(0,Z.useCallback)(async()=>{if(nP.current)return nP.current;let e=(async()=>{try{var e;let[t,n]=await Promise.allSettled([nA("/hub/dashboard"),nA("/deploy/check")]);if("fulfilled"!==t.status)throw t.reason;let s=t.value;tc(s),tu(null),tv(Date.now()),"fulfilled"===n.status?tD(n.value):tD(null);let l=(null===(e=s.android)||void 0===e?void 0:e.devices)||[];if(l.length&&!tT){let e=l.find(e=>"device"===(e.state||"").toLowerCase());tM((null!=e?e:l[0]).serial)}}catch(e){tu(e.message),tD(null)}finally{tm(!1),nP.current=null}})();return nP.current=e,e},[tT,nA]),nF=(0,Z.useMemo)(()=>{let e=new URLSearchParams({light:"1"});return"live_youtube"===tt?e.set("family","youtube"):"live_tiktok"===tt&&e.set("family","tiktok"),"/process_monitor?".concat(e.toString())},[tt]),nW=(0,Z.useMemo)(()=>ey(tk),[tk]),nK=(0,Z.useMemo)(()=>(function(e){if(!e.pageVisible)return 3e4;if("live_youtube"===e.view||"live_tiktok"===e.view)switch(e.activity){case"hot":return 800;case"warm":return 2500;default:return 5e3}return 4e3})({view:tt,activity:nW,pageVisible:ty}),[tt,nW,ty]),nH=(0,Z.useCallback)(async()=>{if(nM.current)return nM.current;let e=(async()=>{try{let e=(await nA(nF)).entries||[];t_(e),tN(e.map(e=>({pm2:e.pm2,script:e.script,label:e.label}))),tv(Date.now()),tz(t=>!e.length||t&&e.some(e=>e.pm2===t)?t:e[0].pm2)}catch(e){}finally{nM.current=null}})();return nM.current=e,e},[nA,nF]);(0,Z.useEffect)(()=>{tn(function(){let e=new URLSearchParams(window.location.search).get("view");return e&&t7.includes(e)?e:"/youtube-events"===window.location.pathname.replace(/\/$/,"")||"/youtube-relay-log"===window.location.pathname.replace(/\/$/,"")?"live_youtube":"dashboard"}()),tl(!0);let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&e9(e);let t=window.localStorage.getItem("live-hub-theme");("light"===t||"dark"===t)&&te(t)},[]),(0,Z.useEffect)(()=>{if(!ts)return;let e=new URL(window.location.href);"dashboard"===tt?e.searchParams.delete("view"):e.searchParams.set("view",tt),window.history.replaceState(null,"",e.toString())},[tt,ts]),(0,Z.useEffect)(()=>{window.localStorage.setItem("live-hub-lang",e6)},[e6]),(0,Z.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e7);try{window.localStorage.setItem("live-hub-theme",e7)}catch(e){}},[e7]),(0,Z.useEffect)(()=>{let e=()=>tw("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{if(!ti)return;let e=e=>{"Escape"===e.key&&tr(!1)};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[ti]),(0,Z.useEffect)(()=>()=>{null!=nZ.current&&window.clearTimeout(nZ.current)},[]),(0,Z.useEffect)(()=>{try{"0"===localStorage.getItem("livehub.autorefresh")&&tA(!1),"0"===localStorage.getItem("livehub.showStreamProbes")&&tB(!1)}catch(e){}},[]),(0,Z.useEffect)(()=>{if(ts){if("live_youtube"===tt||"live_tiktok"===tt){tm(!1),nO();return}nB()}},[nB,nO,tt,ts]),(0,Z.useEffect)(()=>{ts&&nH()},[nH,ts]),(0,Z.useEffect)(()=>{if(!ts||!tI||!ty||"live_youtube"===tt||"live_tiktok"===tt)return;let e=window.setInterval(()=>{nB()},1e4);return()=>clearInterval(e)},[tI,ty,nB,tt,ts]),(0,Z.useEffect)(()=>{if(!ts||!tI)return;let e=window.setInterval(()=>{nH()},nK);return()=>clearInterval(e)},[tI,nK,nH,ts]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&nH()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[nH]),(0,Z.useEffect)(()=>{nE.current=tS},[tS]),(0,Z.useEffect)(()=>{"settings"===tt&&(async()=>{try{let e=await nA("/hub/config");tU(e)}catch(e){tU(null)}})()},[nA,tt]);let nY=(0,Z.useMemo)(()=>{var e;let t=(null==to?void 0:null===(e=to.stack)||void 0===e?void 0:e.quick_links)||{},n={};for(let[e,s]of Object.entries(t))/^https?:\/\//i.test(s)?n[e]=(0,ep.p)(s):n[e]=s;return n},[null==to?void 0:null===(e=to.stack)||void 0===e?void 0:e.quick_links]),nG=(0,Z.useMemo)(()=>{let e=new Map;for(let t of(null==to?void 0:to.services)||[])e.set(t.service_id,t);return e},[null==to?void 0:to.services]),nq=(0,Z.useMemo)(()=>["homeassistant","frigate","ntfy","wol"].map(e=>nG.get(e)).filter(Boolean),[nG]),nJ=(null==nR?void 0:nR.playbooks)||[],nV=nG.get("wol"),n$=(0,Z.useMemo)(()=>(0,ta.O0)(nY),[nY]),nX=(0,Z.useMemo)(()=>(0,ta.Tc)(n$),[n$]),nQ=(0,Z.useMemo)(()=>((null==tq?void 0:tq.interfaces)||[]).flatMap(e=>e.peers||[]),[null==tq?void 0:tq.interfaces]),n0=(0,Z.useMemo)(()=>((null==tq?void 0:tq.interfaces)||[]).flatMap(e=>e.configured_peers||[]),[null==tq?void 0:tq.interfaces]),n1=(0,Z.useMemo)(()=>((null==tq?void 0:tq.repo_configs)||[]).flatMap(e=>e.peers||[]).map(e=>({...e,status_source:"config",config_source:"repo"})),[null==tq?void 0:tq.repo_configs]),n5=nQ[0]||n0[0]||n1[0]||null,n2=(0,Z.useMemo)(()=>{for(let e of[...nQ,...n0,...n1]){let t=e.endpoint_host||function(e){let t=(e||"").trim();if(!t)return"";if(t.startsWith("[")){let e=t.indexOf("]");return e>0?t.slice(1,e):""}let n=t.lastIndexOf(":");return n>0?t.slice(0,n):t}(e.endpoint);if(t)return t}return""},[n0,n1,nQ]),n3=(null==tY?void 0:null===(t=tY.windows_route_template)||void 0===t?void 0:t.endpoint_host)||(null==tY?void 0:null===(R=tY.peers)||void 0===R?void 0:null===(n=R.find(e=>e.endpoint_host))||void 0===n?void 0:n.endpoint_host)||n2||"",n4=(0,Z.useMemo)(()=>{if(!n3)return"";let e=t3.trim()||"",t=t6.trim()||"";return"route -p add ".concat(n3," mask 255.255.255.255 ").concat(e," metric 1 if ").concat(t)},[n3,t3,t6]),n6=(0,Z.useCallback)(async()=>{try{var e;let t=await nA("/hub/network/wireguard/status");tJ(null!==(e=t.wireguard)&&void 0!==e?e:null)}catch(e){tJ(null)}},[nA]),n8=(0,Z.useCallback)(async()=>{tQ(!0);try{let e=await nA("/hub/network/system_probe");t$(null!=e?e:null)}catch(e){t$(null)}finally{tQ(!1)}},[nA]);(0,Z.useEffect)(()=>{"network"===tt&&(n6(),n8())},[n8,n6,tt]);let n9=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=tK.trim();if(!t){nI(nD("请先选择或粘贴 WireGuard 配置","Pick or paste a WireGuard config first"));return}th(e?"wg:apply":"wg:save");try{var n;let s=await nA("/hub/network/wireguard/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:tF,content:t,route_mode:t5,apply:e})});tG(null!==(n=s.wireguard)&&void 0!==n?n:null),await n6(),nI(e?nD("WireGuard 配置已保存并应用","WireGuard config saved and applied"):nD("WireGuard 配置已保存","WireGuard config saved"))}catch(e){nI(e.message)}finally{th(null)}},n7=async e=>{th("wg:neko:".concat(e));try{await nA("/hub/network/wireguard/neko_access",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,restart:!0})}),await n6(),await nB(),nI("remote"===e?"Neko switched to WireGuard remote access":"Neko switched back to LAN")}catch(e){nI(e.message),await n6()}finally{th(null)}},se=async e=>{th("neko:proxy:".concat(e?"on":"off"));try{await nA("/hub/network/neko_browser_proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e,restart:!0})}),await n6(),await nB(),nI(e?nD("已开启 Neko 浏览器代理","Neko browser proxy enabled"):nD("已关闭 Neko 浏览器代理","Neko browser proxy disabled"))}catch(e){nI(e.message),await n6()}finally{th(null)}},st=async()=>{await n9(!1)},sn=async e=>{let t=(e||"").trim();if(t){th("wg:load:".concat(t));try{var n;let e=await nA("/hub/network/wireguard/config/".concat(encodeURIComponent(t)));tW(e.name||t),tH(e.content||""),tG(null!==(n=e.wireguard)&&void 0!==n?n:null),t1(!0),nI(nD("已载入 WireGuard 配置","WireGuard config loaded"))}catch(e){nI(e.message)}finally{th(null)}}},ss=async e=>{if(e)try{let t=await e.text();tH(t),tF.trim()||tW(e.name.replace(/\.conf$/i,""))}catch(e){nI(e.message)}},sl=async(e,t)=>{th("svc:".concat(e));try{let n=await nA("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});"error"===n.status?nI(n.detail||n.message||nD("操作失败","Action failed")):nI(n.message||"OK"),await nB()}catch(e){nI(e.message)}finally{th(null)}},si=async()=>{let e=ni.trim(),t=nr.trim()||"255.255.255.255",n=Number(nc.trim()||"9");if(!e){nI(nD("请输入 MAC 地址","Enter a MAC address"));return}if(!Number.isInteger(n)||n<1||n>65535){nI(nD("端口必须在 1-65535 之间","Port must be 1-65535"));return}th("wol:wake");try{let s=await nA("/studio/wol/wake",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e,broadcast:t,port:n})});nI(s.message||nD("唤醒包已发送","Wake packet sent"))}catch(e){nI(e.message)}finally{th(null)}},sa=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await nA(e?"/studio/wol/devices/probe":"/studio/wol/devices",e?{method:"POST"}:void 0);nx(t.devices||[])}catch(t){e&&nI(t.message)}},[nA,nI]),sr=async()=>{let e=ni.trim();if(!e){nI(nD("请输入 MAC 地址","Enter a MAC address"));return}th("wol:save");try{var t;let n=await nA("/studio/wol/devices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:nh,mac:e,ip:nb})});nx(n.devices||[]),np((null===(t=n.device)||void 0===t?void 0:t.mac)||e),nI(n.message||nD("设备已保存","Device saved"))}catch(e){nI(e.message)}finally{th(null)}},so=async()=>{let e=(nm||ni).trim();if(e){th("wol:delete");try{let t=await nA("/studio/wol/devices/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e})});nx(t.devices||[]),np(""),na(""),ng(""),nf(""),nI(nD("设备已删除","Device removed"))}catch(e){nI(e.message)}finally{th(null)}}},sc=(0,Z.useCallback)(async()=>{try{let e=(await nA("/studio/serial/ports")).ports||[];ny(e),nj(t=>{var n;return t&&e.some(e=>e.path===t)?t:(null===(n=e[0])||void 0===n?void 0:n.path)||t})}catch(e){ny([])}},[nA]),sd=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await nA("/studio/ops/summary".concat(e?"?refresh=1":""));nL(t)}catch(t){e&&nI(t.message)}},[nA,nI]),su=async()=>{th("studio:snapshot");try{let e=await nA("/studio/ops/snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"studio"})});await sd(!1),nI(e.message||nD("系统快照已创建","System snapshot created"))}catch(e){nI(e.message)}finally{th(null)}},sx=async e=>{let t=(e||"").trim();if(t){th("studio:playbook:".concat(t));try{var n;let e=await nA("/studio/ops/playbook",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({playbook_id:t})});e.summary?nL(e.summary):await sd(!1),await nB();let s=null!==(n=e.failed)&&void 0!==n?n:(e.actions||[]).filter(e=>"error"===e.status).length;nI(e.message||(s?nD("场景执行完成,但存在失败步骤","Playbook completed with failed steps"):nD("场景执行完成","Playbook completed")))}catch(e){nI(e.message)}finally{th(null)}}};(0,Z.useEffect)(()=>{if("studio"!==tt)return;sa(!0),sd(!0);let e=window.setInterval(()=>{sa(!0),sd(!1)},3e4);return()=>window.clearInterval(e)},[sc,sd,sa,tt]);let sm=async(e,t)=>{let n=(null!=t?t:tS).trim();if(n){th("proc:".concat(e,":").concat(n));try{let t=await nA("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:n})});nI(String(t.output||t.message||"OK")),await nH(),"live_youtube"===tt||"live_tiktok"===tt?nB():await nB()}catch(e){nI(e.message)}finally{th(null)}}},sp=async(e,t)=>{let n=(null!=t?t:tS).trim();if(!n)throw nI(nD("请选择要保存地址的进程","Pick a process before saving URLs")),Error(nD("请选择要保存地址的进程","Pick a process before saving URLs"));let s=null!=e?e:tC,l=++nU.current;th("save:url");try{let e=new URLSearchParams({process:n}),t=await nA("/save_url_config?".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})});l===nU.current&&n===nE.current.trim()&&tR(s),nI(t.path?nD("URL 配置已保存: ".concat(t.path),"URL config saved: ".concat(t.path)):nD("URL 配置已保存","URL config saved"))}catch(e){throw nI(e.message),e}finally{th(null)}},sh=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!tT){nI(nD("请选择设备","Pick a device"));return}th("adb:".concat(e));try{let n=await nA("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:tT,payload:t})});nI(n.message||"OK")}catch(e){nI(e.message)}finally{th(null)}},sg=[{id:"dashboard",icon:a.Z,labelZh:"总览",labelEn:"Dashboard"},{id:"services",icon:r.Z,labelZh:"服务",labelEn:"Services"},{id:"live_youtube",icon:o.Z,labelZh:"YouTube 无人直播",labelEn:"YouTube unmanned"},{id:"live_tiktok",icon:c.Z,labelZh:"TikTok 无人直播",labelEn:"TikTok unmanned"},{id:"android",icon:d.Z,labelZh:"安卓",labelEn:"Android"},{id:"studio",icon:u.Z,labelZh:"工作室",labelEn:"Studio"},{id:"network",icon:x.Z,labelZh:"网络",labelEn:"Network"},{id:"settings",icon:m.Z,labelZh:"设置",labelEn:"Settings"}],sb=e=>{(async()=>{var t;if(null===(t=navigator.clipboard)||void 0===t?void 0:t.writeText){await navigator.clipboard.writeText(e);return}let n=document.createElement("textarea");n.value=e,n.readOnly=!0,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove()})().then(()=>nI(nD("已复制","Copied")),()=>nI(nD("复制失败","Copy failed")))},sf=tf?new Date(tf).toLocaleTimeString("zh"===e6?"zh-CN":"en-US",{hour12:!1}):nD("未同步","Not synced"),sv=ty?nD("前台自动刷新","Auto refresh"):nD("后台已暂停刷新","Refresh paused in background");return(0,s.jsxs)("div",{className:"lp-root min-h-screen transition-colors duration-300 ".concat("light"===e7?"bg-slate-100 text-slate-900 selection:bg-violet-400/25":"bg-[#050508] text-zinc-100 selection:bg-violet-500/30"),children:[(0,s.jsx)("div",{className:"lp-noise pointer-events-none fixed inset-0 z-0 ".concat("light"===e7?"opacity-[0.06]":"opacity-[0.22]"),"aria-hidden":!0}),(0,s.jsx)("div",{className:"lp-aurora pointer-events-none fixed -left-1/4 top-0 h-[42rem] w-[42rem] rounded-full blur-[120px] ".concat("light"===e7?"bg-violet-400/15":"bg-violet-600/20"),"aria-hidden":!0}),(0,s.jsx)("div",{className:"lp-aurora2 pointer-events-none fixed bottom-0 right-0 h-[36rem] w-[36rem] rounded-full blur-[100px] ".concat("light"===e7?"bg-cyan-400/10":"bg-cyan-500/10"),"aria-hidden":!0}),tg?(0,s.jsx)(l.E.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},role:"status","aria-live":"polite","aria-atomic":"true",className:"fixed bottom-6 left-1/2 z-[100] max-w-md -translate-x-1/2 rounded-2xl border border-white/10 bg-zinc-950/95 px-5 py-3 text-center text-sm text-zinc-100 shadow-2xl shadow-black/50 backdrop-blur-xl",children:tg}):null,(0,s.jsxs)("div",{className:"relative z-10 flex min-h-screen",children:[(0,s.jsxs)("aside",{className:"hidden w-64 shrink-0 flex-col border-r px-4 py-6 backdrop-blur-2xl lg:flex ".concat("light"===e7?"border-slate-200/90 bg-white/70":"border-white/[0.06] bg-zinc-950/40"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500 to-cyan-400 shadow-lg shadow-violet-500/25",children:(0,s.jsx)(p.Z,{className:"h-4 w-4 text-white"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-[0.2em] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:"live.local"}),(0,s.jsx)("p",{className:"text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("无人直播系统","Unmanned Live System")})]})]}),(0,s.jsx)("nav",{className:"mt-10 flex flex-1 flex-col gap-1",children:sg.map(e=>{let t=e.icon,n=tt===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>tn(e.id),"aria-current":n?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm font-medium transition ".concat("light"===e7?n?"bg-violet-100/90 text-slate-900 shadow-inner shadow-violet-200/50":"text-slate-600 hover:bg-slate-200/60 hover:text-slate-900":n?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-200"),children:[(0,s.jsx)(t,{className:"h-4 w-4 ".concat("light"===e7?n?"text-violet-600":"text-slate-400":n?"text-violet-300":"text-zinc-600")}),nD(e.labelZh,e.labelEn),n?(0,s.jsx)(h.Z,{className:"ml-auto h-4 w-4 ".concat("light"===e7?"text-slate-400":"text-zinc-600")}):null]},e.id)})})]}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,s.jsxs)("header",{className:"sticky top-0 z-20 flex items-center justify-between gap-3 border-b px-4 py-3 backdrop-blur-xl lg:px-8 ".concat("light"===e7?"border-slate-200/80 bg-white/75 text-slate-900":"border-white/[0.06] bg-zinc-950/70 text-white"),children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("button",{type:"button",className:"rounded-xl border p-2 lg:hidden ".concat("light"===e7?"border-slate-200 bg-white/80":"border-white/10 bg-white/5"),onClick:()=>tr(!0),"aria-label":"Menu",children:(0,s.jsx)(g.Z,{className:"h-5 w-5"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"truncate text-lg font-semibold tracking-tight lg:text-xl ".concat("light"===e7?"text-slate-900":"text-white"),children:nD((null===(I=sg.find(e=>e.id===tt))||void 0===I?void 0:I.labelZh)||"",(null===(A=sg.find(e=>e.id===tt))||void 0===A?void 0:A.labelEn)||"")}),(0,s.jsxs)("p",{className:"truncate text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[(null==to?void 0:null===(O=to.stack)||void 0===O?void 0:O.mdns_host)||"live.local"," \xb7"," ","dark"===e7?nD("夜间","Dark mode"):nD("日间","Light mode")," \xb7 ",sv," \xb7"," ",nD("最后同步","Last sync")," ",sf]})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>te(e=>"dark"===e?"light":"dark"),className:"rounded-xl border p-2 transition ".concat("light"===e7?"border-slate-200 bg-white text-amber-500 shadow-sm":"border-white/10 bg-white/[0.06] text-violet-200"),title:"dark"===e7?nD("切换到日间","Switch to light"):nD("切换到夜间","Switch to dark"),"aria-label":"dark"===e7?nD("日间模式","Light mode"):nD("夜间模式","Dark mode"),"aria-pressed":"light"===e7,children:"dark"===e7?(0,s.jsx)(b.Z,{className:"h-5 w-5",strokeWidth:2}):(0,s.jsx)(f.Z,{className:"h-5 w-5",strokeWidth:2})}),(0,s.jsxs)("button",{type:"button",onClick:()=>e9(e=>"zh"===e?"en":"zh"),className:"relative rounded-xl border p-2 transition ".concat("light"===e7?"border-slate-200 bg-white text-cyan-600 shadow-sm":"border-white/10 bg-white/[0.06] text-cyan-200"),title:"zh"===e6?"English":"中文","aria-label":nD("切换语言","Toggle language"),"aria-pressed":"en"===e6,children:[(0,s.jsx)(v.Z,{className:"h-5 w-5",strokeWidth:2}),(0,s.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 min-w-[1rem] items-center justify-center rounded px-0.5 text-[9px] font-bold leading-none ".concat("light"===e7?"bg-cyan-100 text-cyan-800":"bg-cyan-500/30 text-cyan-100"),children:"zh"===e6?"中":"A"})]}),(0,s.jsxs)("button",{type:"button",disabled:!!tp,onClick:()=>void Promise.all([nB(),nH()]),className:"flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-medium transition disabled:opacity-40 ".concat("light"===e7?"border-slate-200 bg-white text-slate-700 hover:bg-slate-50":"border-white/10 bg-white/[0.04] text-zinc-300 hover:bg-white/[0.07]"),children:[tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:nD("刷新","Refresh")})]})]})]}),(0,s.jsx)("main",{className:"flex-1 px-4 py-6 lg:px-8 lg:py-8",children:(0,s.jsx)(i.M,{mode:"wait",children:(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.28,ease:[.22,1,.36,1]},children:["dashboard"===tt?(0,s.jsx)(e8,{dash:to,deployCheck:tZ,dashErr:td,loading:tx,theme:e7,t:nD,onNavigate:tn,nekoLinks:n$,nekoPortsLabel:nX,showStreamProbes:tO,quickLinks:nY}):null,"services"===tt?(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:[((null==to?void 0:to.services)||[]).map((e,t)=>(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},className:"rounded-2xl border border-white/[0.07] bg-gradient-to-b from-white/[0.05] to-transparent p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-zinc-500 line-clamp-2",children:e.description})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(ns(e.running?"online":e.status)),children:e.running?nD("运行中","Running"):e.status})]}),e.detail?(0,s.jsx)("p",{className:"mt-2 text-[11px] leading-snug line-clamp-6 ".concat("skipped"===e.status?"text-slate-300/90":"text-amber-200/85"),children:e.detail}):null,"shellcrash"===e.service_id&&e.available&&!e.running?(0,s.jsx)("p",{className:"mt-2 text-[11px] text-zinc-500",children:nD("stopped 为常态:仅当需要透明代理 / 规则分流时再手动点 Start,不建议设置自启。","Stopped is normal; click Start manually only when the proxy is needed. Autostart stays off.")}):null,(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.url?(0,s.jsx)("a",{href:(0,ep.p)(e.url),target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-3 py-1.5 text-xs font-medium text-violet-200 ring-1 ring-violet-500/25",children:nD("打开面板","Open panel")}):null,(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs font-medium text-emerald-200 ring-1 ring-emerald-500/30 disabled:opacity-30",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"install"),className:"rounded-lg bg-sky-500/15 px-3 py-1.5 text-xs font-medium text-sky-200 ring-1 ring-sky-500/25 disabled:opacity-30",children:"Install"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-1.5 text-xs font-medium text-amber-200 ring-1 ring-amber-500/25 disabled:opacity-30",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"upgrade"),className:"rounded-lg bg-indigo-500/15 px-3 py-1.5 text-xs font-medium text-indigo-200 ring-1 ring-indigo-500/25 disabled:opacity-30",children:"Upgrade"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-1.5 text-xs font-medium text-rose-200 ring-1 ring-rose-500/25 disabled:opacity-30",children:"Stop"}),(0,s.jsx)("button",{type:"button",disabled:!!tp||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?nD("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||nD("当前不可操作","Unavailable"),onClick:()=>void sl(e.service_id,"uninstall"),className:"rounded-lg bg-zinc-500/15 px-3 py-1.5 text-xs font-medium text-zinc-200 ring-1 ring-zinc-500/25 disabled:opacity-30",children:"Uninstall"})]})]},e.service_id)),(null==to?void 0:null===(B=to.services)||void 0===B?void 0:B.length)?null:(0,s.jsx)("p",{className:"text-sm text-zinc-500",children:nD("暂无服务数据","No services")})]}):null,"live_youtube"===tt?(0,s.jsx)(t8,{t:nD,busy:tp,entries:tj,currentProc:tS,setCurrentProc:tz,urlConfig:tC,setUrlConfig:tR,onRunProcess:(e,t)=>void sm(e,t),onSaveUrlConfig:(e,t)=>sp(e,t),fetchJson:nA,liveProcesses:tk.length?tk:null!==(eG=null==to?void 0:null===(F=to.live)||void 0===F?void 0:F.processes)&&void 0!==eG?eG:[],notify:nI,quickLinks:nY,onRefresh:()=>void Promise.all([nB(),nH()]),onNavigate:e=>tn(e)}):null,"live_tiktok"===tt?(0,s.jsx)(eY,{t:nD,busy:!!tp,entries:tj,currentProc:tS,setCurrentProc:tz,urlConfig:tC,setUrlConfig:tR,onRunProcess:e=>void sm(e),onSaveUrlConfig:e=>sp(e),onReplayGoLive:async(e,t)=>{let n=t.replace(/[,,|]/g,"_");await sp("原画,".concat(e,",主播: ").concat(n)),await sm("start")},onCopy:sb,fetchJson:nA,apiPrefix:e4,quickLinks:nY,hdmiStatus:null==to?void 0:to.hdmi,notify:nI,onNavigate:e=>tn(e)}):null,"android"===tt?(0,s.jsx)(ed,{t:nD,notify:nI,fetchJson:nA,apiBase:e4,busy:tp,androidSerial:tT,setAndroidSerial:tM,devices:(null==to?void 0:null===(W=to.android)||void 0===W?void 0:W.devices)||[],adbAvailable:!!(null==to?void 0:null===(K=to.android)||void 0===K?void 0:K.adb_available),apkPath:tL,setApkPath:tP,onAndroidAction:(e,t)=>sh(e,null!=t?t:{}),onCopy:sb,onRefreshDevices:()=>void nB()}):null,"studio"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-7xl space-y-5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(u.Z,{className:"h-5 w-5 ".concat("light"===e7?"text-emerald-700":"text-emerald-300")}),nD("工作室","Studio")]}),(0,s.jsx)("p",{className:"mt-1 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Home Assistant / Frigate / WOL"})]}),(0,s.jsxs)("span",{className:"w-fit rounded-full px-3 py-1 text-[11px] font-semibold ".concat("light"===e7?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200":"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25"),children:[nq.filter(e=>null==e?void 0:e.running).length,"/",nq.length||4," online"]})]}),(0,s.jsx)("div",{className:"grid gap-3 lg:grid-cols-2 xl:grid-cols-3",children:nJ.map(e=>{var t,n;let i=e.id||"",a=tp==="studio:playbook:".concat(i),r=e.dependencies||(e.services||[]).map(e=>{let t=nG.get(e);return{service_id:e,label:(null==t?void 0:t.label)||e,running:!!(null==t?void 0:t.running),available:(null==t?void 0:t.available)!==!1,status:(null==t?void 0:t.status)||"unknown",detail:(null==t?void 0:t.detail)||""}}),c=null!==(t=e.required_count)&&void 0!==t?t:r.length,d=null!==(n=e.running_count)&&void 0!==n?n:r.filter(e=>e.running).length;return(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-sky-200/80 bg-white shadow-sky-100/40":"border-sky-400/15 bg-zinc-950/55 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(j.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-sky-700":"text-sky-300")}),(0,s.jsx)("span",{className:"line-clamp-1",children:e.title||i})]}),(0,s.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:e.description||e.category||"Playbook"})]}),(0,s.jsxs)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(ns(e.status||"ready")),children:[d,"/",c||0]})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-1.5",children:r.map(e=>{let t=e.service_id||"";return(0,s.jsxs)("span",{className:"rounded-full px-2 py-1 text-[10px] font-semibold ".concat(e.running?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":!1===e.available?"bg-rose-500/15 text-rose-200 ring-1 ring-rose-400/25":"light"===e7?"bg-slate-100 text-slate-700 ring-1 ring-slate-200":"bg-white/5 text-zinc-300 ring-1 ring-white/10"),children:[t||e.label||"service",":",e.running?"on":!1===e.available?"off":e.status||"idle"]},t)})}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:(e.actions||[]).slice(0,4).map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border px-3 py-2 text-[11px] ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:[(0,s.jsx)("span",{className:"min-w-0 truncate",children:e.label||e.service||"service"}),(0,s.jsx)("span",{className:"shrink-0 font-mono uppercase",children:e.action||"run"})]},"".concat(e.service||"service",":").concat(e.action||"action",":").concat(t)))}),(0,s.jsxs)("button",{type:"button",disabled:!!tp||!i,onClick:()=>void sx(i),className:"mt-5 inline-flex w-full items-center justify-center gap-2 rounded-lg bg-sky-500/18 px-3 py-2.5 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/30 transition hover:bg-sky-500/28 disabled:opacity-40",children:[a?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5"}),nD("鎵ц鍦烘櫙","Run playbook")]})]},i||e.title)})}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[[{id:"homeassistant",label:"Home Assistant",icon:u.Z,fallbackUrl:nY.homeassistant,iconClass:"light"===e7?"text-emerald-700":"text-emerald-300",openClass:"light"===e7?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200 hover:bg-emerald-100":"bg-emerald-500/15 text-emerald-100 ring-1 ring-emerald-400/25 hover:bg-emerald-500/25"},{id:"frigate",label:"Frigate NVR",icon:N.Z,fallbackUrl:nY.frigate,iconClass:"light"===e7?"text-cyan-700":"text-cyan-300",openClass:"light"===e7?"bg-cyan-50 text-cyan-800 ring-1 ring-cyan-200 hover:bg-cyan-100":"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-400/25 hover:bg-cyan-500/25"},{id:"ntfy",label:"ntfy",icon:k.Z,fallbackUrl:nY.ntfy,iconClass:"light"===e7?"text-violet-700":"text-violet-300",openClass:"light"===e7?"bg-violet-50 text-violet-800 ring-1 ring-violet-200 hover:bg-violet-100":"bg-violet-500/15 text-violet-100 ring-1 ring-violet-400/25 hover:bg-violet-500/25"}].map(e=>{let t=nG.get(e.id),n=e.icon,i=(null==t?void 0:t.url)||e.fallbackUrl||"",a=!!tp||(null==t?void 0:t.available)===!1;return(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(n,{className:"h-4 w-4 ".concat(e.iconClass)}),e.label]}),(0,s.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null==t?void 0:t.description)||("frigate"===e.id?"Camera NVR and detection console":"Local automation workspace")})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(ns((null==t?void 0:t.running)?"online":(null==t?void 0:t.status)||"unknown")),children:(null==t?void 0:t.running)?nD("运行中","Running"):(null==t?void 0:t.status)||"unknown"})]}),(null==t?void 0:t.detail)?(0,s.jsx)("p",{className:"mt-3 line-clamp-4 font-mono text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:t.detail}):null,(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[i?(0,s.jsxs)("a",{href:(0,ep.p)(i),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold transition ".concat(e.openClass),children:[(0,s.jsx)(_.Z,{className:"h-3.5 w-3.5"}),nD("打开","Open")]}):null,(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"start"),className:"rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:"Start"}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-2 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/25 transition hover:bg-amber-500/25 disabled:opacity-40",children:"Restart"}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void sl(e.id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:"Stop"})]})]},e.id)}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(S.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-amber-700":"text-amber-300")}),nD("WOL 网络唤醒","WOL Network Wake")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null==nV?void 0:nV.detail)||"broadcast=255.255.255.255;port=9"})]}),(0,s.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(ns((null==nV?void 0:nV.status)||"ready")),children:(null==nV?void 0:nV.status)||"ready"})]}),(0,s.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("select",{value:nm,onChange:e=>{let t=e.target.value;np(t);let n=nu.find(e=>e.mac===t);n&&(na(n.mac),ng(n.name||""),nf(n.ip||""))},className:"min-w-0 flex-1 rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100"),children:[(0,s.jsx)("option",{value:"",children:nD("选择设备","Select device")}),nu.map(e=>(0,s.jsx)("option",{value:e.mac,children:(e.name||e.ip||e.mac)+(e.reachable?" \xb7 online":"")},e.mac))]}),(0,s.jsx)("button",{type:"button",disabled:"wol:probe"===tp,onClick:()=>{th("wol:probe"),sa(!0).finally(()=>th(null))},className:"inline-flex items-center justify-center rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/25 transition hover:bg-cyan-500/25 disabled:opacity-40",children:(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("wol:probe"===tp?"animate-spin":"")})})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("名称","Name")}),(0,s.jsx)("input",{value:nh,onChange:e=>ng(e.target.value),placeholder:"NAS / PC",className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"IP"}),(0,s.jsx)("input",{value:nb,onChange:e=>nf(e.target.value),placeholder:"10.0.0.10",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"MAC"}),(0,s.jsx)("input",{value:ni,onChange:e=>na(e.target.value),placeholder:"AA:BB:CC:DD:EE:FF",autoCapitalize:"characters",spellCheck:!1,className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Broadcast"}),(0,s.jsx)("input",{value:nr,onChange:e=>no(e.target.value),placeholder:"255.255.255.255",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"Port"}),(0,s.jsx)("input",{value:nc,onChange:e=>nd(e.target.value),inputMode:"numeric",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,s.jsxs)("button",{type:"button",disabled:"wol:wake"===tp||(null==nV?void 0:nV.available)===!1,onClick:()=>void si(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500/18 px-3 py-2.5 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/30 transition hover:bg-amber-500/28 disabled:opacity-40",children:["wol:wake"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(S.Z,{className:"h-3.5 w-3.5"}),nD("唤醒","Wake")]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:"wol:save"===tp,onClick:()=>void sr(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wol:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(z.Z,{className:"h-3.5 w-3.5"}),nD("保存","Save")]}),(0,s.jsxs)("button",{type:"button",disabled:"wol:delete"===tp||!(nm||ni),onClick:()=>void so(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:["wol:delete"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(C.Z,{className:"h-3.5 w-3.5"}),nD("删除","Delete")]})]})]})]})]}),null,(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(L.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-emerald-700":"text-emerald-300")}),"System Doctor"]}),(0,s.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[null!==(eq=null==nR?void 0:null===(H=nR.doctor)||void 0===H?void 0:H.services_running)&&void 0!==eq?eq:0,"/",null!==(eJ=null==nR?void 0:null===(Y=nR.doctor)||void 0===Y?void 0:Y.services_available)&&void 0!==eJ?eJ:0," services"]})]}),(0,s.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(ns((null==nR?void 0:null===(G=nR.doctor)||void 0===G?void 0:G.status)||"unknown")),children:[null!==(eV=null==nR?void 0:null===(q=nR.doctor)||void 0===q?void 0:q.score)&&void 0!==eV?eV:0,"/100"]})]}),(0,s.jsxs)("div",{className:"mt-4 space-y-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[(0,s.jsxs)("p",{children:[nD("严重","Critical"),": ",null!==(e$=null==nR?void 0:null===(J=nR.doctor)||void 0===J?void 0:J.critical)&&void 0!==e$?e$:0," / ",nD("警告","Warnings"),": ",null!==(eX=null==nR?void 0:null===($=nR.doctor)||void 0===$?void 0:$.warnings)&&void 0!==eX?eX:0]}),((null==nR?void 0:null===(X=nR.doctor)||void 0===X?void 0:X.recommendations)||[]).slice(0,2).map(e=>(0,s.jsxs)("p",{className:"line-clamp-2",children:["- ",e]},e))]})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(P.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-cyan-700":"text-cyan-300")}),nD("设备资产","Device inventory")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:"LAN / USB"})]}),(0,s.jsx)("button",{type:"button",disabled:"studio:ops"===tp,onClick:()=>{th("studio:ops"),sd(!0).finally(()=>th(null))},className:"inline-flex items-center justify-center rounded-lg px-2.5 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("studio:ops"===tp?"animate-spin":"")})})]}),(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 text-center text-xs",children:[["WOL",null!==(eQ=null==nR?void 0:null===(ee=nR.inventory)||void 0===ee?void 0:null===(Q=ee.counts)||void 0===Q?void 0:Q.wol)&&void 0!==eQ?eQ:0],["Video",null!==(e0=null==nR?void 0:null===(en=nR.inventory)||void 0===en?void 0:null===(et=en.counts)||void 0===et?void 0:et.video)&&void 0!==e0?e0:0]].map(e=>{let[t,n]=e;return(0,s.jsxs)("div",{className:"rounded-lg border px-2 py-2 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:n}),(0,s.jsx)("p",{className:"light"===e7?"text-slate-500":"text-zinc-500",children:t})]},t)})})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(p.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-amber-700":"text-amber-300")}),nD("自动化配方","Automation recipes")]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:((null==nR?void 0:nR.recipes)||[]).slice(0,3).map(e=>(0,s.jsx)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"line-clamp-1 font-semibold",children:e.title}),(0,s.jsx)("span",{className:"ready"===e.status?"text-emerald-400":"text-amber-300",children:e.status})]})},e.id||e.title))})]}),(0,s.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(r.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-violet-700":"text-violet-300")}),nD("备份快照","Backup snapshots")]}),(0,s.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:[((null==nR?void 0:null===(es=nR.backups)||void 0===es?void 0:es.snapshots)||[]).length," snapshots"]})]}),(0,s.jsxs)("button",{type:"button",disabled:"studio:snapshot"===tp,onClick:()=>void su(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-violet-500/15 px-3 py-2 text-xs font-semibold text-violet-100 ring-1 ring-violet-400/25 transition hover:bg-violet-500/25 disabled:opacity-40",children:["studio:snapshot"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("创建","Create")]})]}),(0,s.jsx)("p",{className:"mt-4 line-clamp-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:(null===(el=((null==nR?void 0:null===(ei=nR.backups)||void 0===ei?void 0:ei.snapshots)||[])[0])||void 0===el?void 0:el.name)||nD("暂无快照","No snapshots yet")})]})]})]}):null,"network"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[(0,s.jsxs)("div",{className:"rounded-2xl border p-6 shadow-xl ".concat("light"===e7?"border-cyan-200/90 bg-white shadow-cyan-100/50":"border-cyan-500/20 bg-zinc-950/55 shadow-black/30"),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(L.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-cyan-700":"text-cyan-300")}),"WireGuard VPS"]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("导入 VPS wg-quick 配置,保存到受管配置目录,并生成 Windows 端点旁路路由命令。","Import a VPS wg-quick config, save it under managed config, and generate the Windows endpoint bypass route.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ".concat((null==tq?void 0:tq.active)?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":"bg-amber-500/15 text-amber-200 ring-1 ring-amber-400/25"),children:[nl(null==tq?void 0:null===(ea=tq.quality)||void 0===ea?void 0:ea.status,nD),"number"==typeof(null==tq?void 0:null===(er=tq.quality)||void 0===er?void 0:er.score)?" \xb7 ".concat(tq.quality.score,"/100"):""]}),(null==tY?void 0:tY.relative_path)?(0,s.jsx)("div",{className:"rounded-lg border px-3 py-2 text-[11px] ".concat("light"===e7?"border-cyan-200 bg-cyan-50 text-cyan-900":"border-cyan-400/20 bg-cyan-500/10 text-cyan-100"),children:tY.relative_path}):null,(0,s.jsxs)("button",{onClick:()=>{n6(),n8()},disabled:"wg:status"===tp||tX,className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:[(0,s.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tX?"animate-spin":"")}),tX?nD("探测中","Probing"):nD("刷新","Refresh")]})]})]}),(0,s.jsxs)("div",{className:"mt-5 grid gap-3 lg:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("当前接口","Active interfaces")}),(0,s.jsxs)("div",{className:"mt-2 rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-cyan-100 bg-white text-slate-700":"border-cyan-400/15 bg-cyan-500/10 text-cyan-100"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:nl(null==tq?void 0:null===(eo=tq.quality)||void 0===eo?void 0:eo.status,nD)}),(0,s.jsx)("span",{className:"font-mono",children:"number"==typeof(null==tq?void 0:null===(ec=tq.quality)||void 0===ec?void 0:ec.score)?"".concat(tq.quality.score,"/100"):"—"})]}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e7?"text-slate-500":"text-cyan-100/75"),children:[nD("新鲜握手","Fresh peers"),": ",null!==(e1=null==tq?void 0:null===(eu=tq.quality)||void 0===eu?void 0:eu.fresh_peer_count)&&void 0!==e1?e1:0,"/",null!==(e5=null==tq?void 0:null===(ex=tq.quality)||void 0===ex?void 0:ex.peer_count)&&void 0!==e5?e5:0," \xb7 ",nD("最佳握手","Best handshake"),": ",nn(null==tq?void 0:null===(em=tq.quality)||void 0===em?void 0:em.best_handshake_age_seconds)]})]}),(0,s.jsx)("div",{className:"mt-2 space-y-2",children:((null==tq?void 0:tq.interfaces)||[]).length?((null==tq?void 0:tq.interfaces)||[]).map(e=>{var t,n,l;return(0,s.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:e.name||"wg"}),(0,s.jsx)("span",{className:(null===(t=e.systemd)||void 0===t?void 0:t.active)==="active"?"text-emerald-400":"text-amber-300",children:(null===(n=e.systemd)||void 0===n?void 0:n.active)||"active"})]}),(0,s.jsx)("p",{className:"mt-1 font-mono text-[11px]",children:(e.addresses||[]).join(", ")||"—"}),(0,s.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[e.details_available?nD("运行细节可读","Runtime details readable"):nD("运行细节受限","Runtime details limited"),(null===(l=e.configured_from)||void 0===l?void 0:l.name)?" \xb7 ".concat(nD("配置","Config"),": ").concat(e.configured_from.name):""]})]},e.name||"wg")}):(0,s.jsx)("p",{className:"text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("未发现 wg show 输出","No wg show output")})})]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("对端与流量","Peer and traffic")}),(()=>{var e;let t=(null==n5?void 0:n5.status_source)==="wg"?nD("运行态","Runtime"):(null==n5?void 0:n5.config_source)==="system"?nD("系统配置","System config"):(null==n5?void 0:n5.config_source)==="repo"?nD("受管配置","Managed config"):nD("配置态","Config");return n5?(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Source: ",t]}),(0,s.jsxs)("p",{children:["Endpoint: ",n5.endpoint||"—"]}),(0,s.jsxs)("p",{children:["AllowedIPs: ",(n5.allowed_ips||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["Handshake:"," ","config"===n5.status_source?nD("运行态需 root/CAP_NET_ADMIN","Runtime details need root/CAP_NET_ADMIN"):nn(n5.latest_handshake_age_seconds)]}),(0,s.jsxs)("p",{children:["RX/TX: ",nt(n5.transfer_rx_bytes)," / ",nt(n5.transfer_tx_bytes)]}),(0,s.jsxs)("p",{children:["Keepalive: ",null!==(e=n5.persistent_keepalive)&&void 0!==e?e:"—"]})]}):(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("暂无 peer 数据","No peer data yet")})})(),((null==tq?void 0:tq.endpoint_routes)||[]).length?(0,s.jsx)("div",{className:"mt-3 space-y-1 rounded-lg border px-3 py-2 font-mono text-[10px] ".concat("light"===e7?"border-slate-200 bg-white text-slate-600":"border-white/10 bg-zinc-950/60 text-zinc-400"),children:((null==tq?void 0:tq.endpoint_routes)||[]).slice(0,2).map(e=>(0,s.jsxs)("p",{className:e.uses_wireguard_interface?"text-amber-300":"",children:["route ",e.host||"endpoint",": ",e.route||(e.ok?"ok":"unavailable")]},e.host||e.route||"endpoint-route"))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("Neko 访问模式","Neko access mode")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===e7?"bg-slate-200/70":"bg-black/40"),children:["lan","remote"].map(e=>{var t,n;let l=((null==tq?void 0:null===(t=tq.neko_access)||void 0===t?void 0:t.mode)||"lan")===e,i=(null==tp?void 0:tp.startsWith("wg:neko"))||"remote"===e&&!(null==tq?void 0:null===(n=tq.neko_access)||void 0===n?void 0:n.remote_ready);return(0,s.jsx)("button",{onClick:()=>void n7(e),disabled:i,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(l?"light"===e7?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===e7?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:"lan"===e?nD("局域网","LAN"):nD("远控","Remote")},e)})}),(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["NAT1TO1: ",(null==tq?void 0:null===(eh=tq.neko_access)||void 0===eh?void 0:eh.nat1to1)||"-"]}),(0,s.jsxs)("p",{children:["LAN: ",(null==tq?void 0:null===(eg=tq.neko_access)||void 0===eg?void 0:eg.lan_host)||"-"]}),(0,s.jsxs)("p",{children:["WG: ",(null==tq?void 0:null===(eb=tq.neko_access)||void 0===eb?void 0:eb.wireguard_host)||"-"]}),(0,s.jsxs)("p",{children:["Target: ",(null==tq?void 0:null===(ef=tq.neko_access)||void 0===ef?void 0:ef.target_nat1to1)||"-"]}),(0,s.jsxs)("p",{children:["ShellCrash: ",(null==tq?void 0:null===(ev=tq.shellcrash)||void 0===ev?void 0:ev.running)?"running:".concat((null==tq?void 0:null===(ew=tq.shellcrash)||void 0===ew?void 0:ew.mixed_port)||"7890"):"stopped"]})]}),(0,s.jsxs)("div",{className:"mt-3 rounded-lg border px-3 py-2 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/20"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("Neko 浏览器代理","Neko browser proxy")}),(0,s.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===e7?"bg-slate-200/70":"bg-black/40"),children:[!1,!0].map(e=>{var t;let n=!!(null==tq?void 0:null===(t=tq.neko_browser_proxy)||void 0===t?void 0:t.enabled)===e,l=null==tp?void 0:tp.startsWith("neko:proxy");return(0,s.jsx)("button",{onClick:()=>void se(e),disabled:l,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(n?"light"===e7?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===e7?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:e?nD("开启","On"):nD("关闭","Off")},e?"on":"off")})}),(0,s.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:[nD("当前","Current"),": ",(null==tq?void 0:null===(ej=tq.neko_browser_proxy)||void 0===ej?void 0:ej.resolved_proxy)||nD("直连","direct")]}),(0,s.jsxs)("p",{children:[nD("节点","Node"),": ",(null==tq?void 0:null===(eN=tq.neko_browser_proxy)||void 0===eN?void 0:eN.shellcrash_node)||"-"," \xb7 :",(null==tq?void 0:null===(ek=tq.neko_browser_proxy)||void 0===ek?void 0:ek.shellcrash_port)||"7894"]}),null==tV||null===(e_=tV.shellcrash_policy)||void 0===e_||!e_.neko_browser_proxy_recommended||(null==tq?void 0:null===(eS=tq.neko_browser_proxy)||void 0===eS?void 0:eS.enabled)||(null==tq?void 0:null===(ez=tq.neko_browser_proxy)||void 0===ez?void 0:ez.manual)?null:(0,s.jsx)("p",{className:"light"===e7?"text-cyan-700":"text-cyan-200",children:nD("直连不可用且 ShellCrash 代理正常,将自动开启浏览器代理","Direct egress failed; ShellCrash proxy is healthy — browser proxy will auto-enable")})]})]}),((null==tq?void 0:null===(eC=tq.neko_access)||void 0===eC?void 0:eC.remote_urls)||[]).length?(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tq?void 0:null===(eR=tq.neko_access)||void 0===eR?void 0:eR.remote_urls)||[]).slice(0,4).map(e=>(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg px-2.5 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e7?"bg-white text-cyan-800 ring-cyan-100 hover:bg-cyan-50":"bg-cyan-500/10 text-cyan-100 ring-cyan-400/20 hover:bg-cyan-500/15"),children:["Neko ",e.id||1," \xb7 ",e.kind||"remote"]},"".concat(e.kind||"remote","-").concat(e.id||0,"-").concat(e.url||"")))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:"Google / Douyin"}),(0,s.jsx)("div",{className:"mt-2 space-y-2",children:["google","youtube","douyin"].map(e=>{let t=((null==tV?void 0:tV.direct)||[]).find(t=>t.target===e),n=!!(null==t?void 0:t.ok),l=!t,i=tX&&l,a=(null==t?void 0:t.label)||("google"===e?"Google":"youtube"===e?"YouTube":"Douyin");return(0,s.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:a}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(i?"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-500/25":l?"bg-zinc-500/15 text-zinc-300 ring-1 ring-zinc-500/25":n?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:[i?(0,s.jsx)(y.Z,{className:"h-3 w-3 animate-spin"}):null,i?nD("探测中","Probing"):l?nD("等待结果","Waiting"):n?"OK":"FAIL"]})]}),(0,s.jsxs)("p",{className:"mt-1 font-mono text-[10px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:[(null==t?void 0:t.elapsed_ms)!=null?"".concat(t.elapsed_ms," ms"):i?nD("正在连接 ".concat(a,"..."),"Connecting ".concat(a,"...")):nD("等待探测结果","Waiting for probe result"),(null==t?void 0:t.status)?" \xb7 HTTP ".concat(t.status):""]}),!n&&(null==t?void 0:t.error)?(0,s.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:t.error}):null]},e)})}),(0,s.jsxs)("div",{className:"mt-3 space-y-1 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Mode: ",tX?nD("正在探测直连链路与代理链路","Probing direct/proxy paths"):(null==tV?void 0:tV.mode)||"-"]}),(0,s.jsxs)("p",{children:["ShellCrash: ",(null==tV?void 0:null===(eL=tV.shellcrash)||void 0===eL?void 0:eL.running)?"running:".concat((null==tV?void 0:null===(eP=tV.shellcrash)||void 0===eP?void 0:eP.mixed_port)||"7890"):"manual/stopped"]}),(0,s.jsxs)("p",{children:["Autostart: ",(null==tV?void 0:null===(eT=tV.shellcrash_policy)||void 0===eT?void 0:eT.autostart_on_direct_fail)?"on direct fail":"off"]}),(0,s.jsxs)("p",{children:["Neko attach: ",(null==tV?void 0:null===(eM=tV.shellcrash_policy)||void 0===eM?void 0:eM.attach_neko)||"auto"]}),(0,s.jsxs)("p",{children:["Neko proxy switch: ",(null==tV?void 0:null===(eE=tV.shellcrash_policy)||void 0===eE?void 0:eE.enable_neko_browser_proxy)?"on":"off"]})]}),tX?(0,s.jsxs)("p",{className:"mt-3 inline-flex items-center gap-2 text-xs ".concat("light"===e7?"text-cyan-700":"text-cyan-200"),children:[(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),nD("正在探测 Google / YouTube / Douyin,请等待结果返回。","Probing Google / YouTube / Douyin. Waiting for results.")]}):(null==tV?void 0:tV.summary)?(0,s.jsx)("p",{className:"mt-3 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-500"),children:tV.summary}):null]})]}),(null==tq?void 0:null===(eU=tq.recommendations)||void 0===eU?void 0:eU.length)?(0,s.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e7?"border-amber-200 bg-amber-50 text-amber-800":"border-amber-400/20 bg-amber-500/10 text-amber-100"),children:(tq.recommendations||[]).join(" \xb7 ")}):null,(null==tq?void 0:null===(eD=tq.quality)||void 0===eD?void 0:null===(eZ=eD.reasons)||void 0===eZ?void 0:eZ.length)?(0,s.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e7?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-black/25 text-zinc-300"),children:(tq.quality.reasons||[]).slice(0,4).join(" \xb7 ")}):null,(0,s.jsxs)("div",{className:"mt-5 grid gap-4 lg:grid-cols-[minmax(0,1fr)_22rem]",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[14rem_minmax(0,1fr)]",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("配置名","Config name")}),(0,s.jsx)("input",{value:tF,onChange:e=>tW(e.target.value),className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e7?"border-slate-200 bg-white text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/30 text-zinc-100 focus:border-cyan-400/60")})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("配置文件","Config file")}),(0,s.jsx)("input",{type:"file",accept:".conf,.txt,text/plain",onChange:e=>{var t;ss(null===(t=e.target.files)||void 0===t?void 0:t[0])},className:"mt-1 w-full rounded-lg border px-3 py-2 text-xs file:mr-3 file:rounded-md file:border-0 file:px-3 file:py-1.5 file:text-xs file:font-semibold ".concat("light"===e7?"border-slate-200 bg-white text-slate-700 file:bg-cyan-50 file:text-cyan-800":"border-white/10 bg-black/30 text-zinc-300 file:bg-cyan-500/15 file:text-cyan-100")})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border px-3 py-2 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/25"),children:[(0,s.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("保存模式","Save mode")}),["overlay","preserve"].map(e=>(0,s.jsx)("button",{onClick:()=>t2(e),className:"rounded-md px-2.5 py-1 text-[11px] font-semibold transition ".concat(t5===e?"bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/30":"light"===e7?"bg-white text-slate-600 ring-1 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-300 ring-1 ring-white/10 hover:bg-white/10"),children:"overlay"===e?nD("组网不接管默认路由","Overlay only"):nD("保留原路由","Preserve routes")},e)),(0,s.jsx)("button",{onClick:()=>t1(e=>!e),className:"ml-auto inline-flex items-center gap-2 rounded-lg px-3 py-1.5 text-xs font-semibold ring-1 transition ".concat("light"===e7?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:t0?nD("锁定","Lock"):nD("编辑","Edit")}),(0,s.jsxs)("button",{onClick:()=>void n9(!1),disabled:"wg:save"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-1.5 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("保存","Save")]}),(0,s.jsxs)("button",{onClick:()=>void n9(!0),disabled:"wg:apply"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-1.5 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wg:apply"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5"}),nD("保存并应用","Save & apply")]})]}),(0,s.jsx)("textarea",{value:tK,onChange:e=>tH(e.target.value),readOnly:!t0,spellCheck:!1,placeholder:"[Interface] Address = 10.88.0.6/32 PrivateKey = ... [Peer] Endpoint = 129.204.21.129:51820 AllowedIPs = 10.88.0.0/24",className:"min-h-56 w-full resize-y rounded-xl border p-3 font-mono text-xs leading-relaxed outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/40 text-zinc-100 focus:border-cyan-400/60"," ").concat(t0?"":"opacity-75")}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{onClick:()=>void st(),disabled:"wg:save"===tp,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tp?(0,s.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.Z,{className:"h-3.5 w-3.5"}),nD("解析并保存","Parse & save")]}),(null==tY?void 0:tY.redacted_config)?(0,s.jsxs)("button",{onClick:()=>sb(tY.redacted_config||""),className:"inline-flex items-center gap-2 rounded-lg bg-zinc-500/15 px-3 py-2 text-xs font-semibold text-zinc-100 ring-1 ring-white/10 transition hover:bg-zinc-500/25",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),nD("复制脱敏配置","Copy redacted")]}):null]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("解析结果","Parsed config")}),(0,s.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat("light"===e7?"bg-cyan-100 text-cyan-800":"bg-cyan-500/15 text-cyan-200"),children:[null!==(e2=null==tY?void 0:tY.peer_count)&&void 0!==e2?e2:0," peers"]})]}),(0,s.jsxs)("div",{className:"mt-3 space-y-2 font-mono text-[11px] ".concat("light"===e7?"text-slate-700":"text-zinc-300"),children:[(0,s.jsxs)("p",{children:["Address: ",((null==tY?void 0:null===(eI=tY.interface)||void 0===eI?void 0:eI.addresses)||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["Endpoint: ",(null==tY?void 0:null===(eO=tY.peers)||void 0===eO?void 0:null===(eA=eO[0])||void 0===eA?void 0:eA.endpoint)||"—"]}),(0,s.jsxs)("p",{children:["AllowedIPs: ",((null==tY?void 0:null===(eF=tY.peers)||void 0===eF?void 0:null===(eB=eF[0])||void 0===eB?void 0:eB.allowed_ips)||[]).join(", ")||"—"]}),(0,s.jsxs)("p",{children:["MTU: ",null!==(e3=null==tY?void 0:null===(eW=tY.interface)||void 0===eW?void 0:eW.mtu)&&void 0!==e3?e3:"—"]})]}),(null==tY?void 0:null===(eK=tY.warnings)||void 0===eK?void 0:eK.length)?(0,s.jsx)("ul",{className:"mt-3 space-y-1 text-[11px] ".concat("light"===e7?"text-amber-700":"text-amber-200"),children:tY.warnings.map(e=>(0,s.jsx)("li",{children:e},e))}):null]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,s.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:nD("已保存配置","Saved configs")}),(0,s.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tq?void 0:tq.repo_configs)||[]).length?((null==tq?void 0:tq.repo_configs)||[]).map(e=>(0,s.jsx)("button",{onClick:()=>void sn(e.name),className:"rounded-lg px-3 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e7?"bg-slate-50 text-slate-700 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-200 ring-white/10 hover:bg-white/10"),children:e.name||e.relative_path},e.name||e.relative_path||"wireguard-config")):(0,s.jsx)("span",{className:"text-[11px] ".concat("light"===e7?"text-slate-500":"text-zinc-500"),children:nD("暂无受管配置","No managed configs")})})]}),(0,s.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e7?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,s.jsxs)("p",{className:"flex items-center gap-2 text-xs font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(j.Z,{className:"h-3.5 w-3.5"}),nD("Windows 端点路由","Windows endpoint route")]}),(0,s.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-1",children:[(0,s.jsx)("input",{value:t3,onChange:e=>t4(e.target.value),placeholder:nD("网关,如 192.168.2.1","Gateway, e.g. 192.168.2.1"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")}),(0,s.jsx)("input",{value:t6,onChange:e=>t9(e.target.value),placeholder:nD("接口 ifIndex,如 21","Interface ifIndex, e.g. 21"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")})]}),(0,s.jsx)("code",{className:"mt-3 block break-all rounded-lg border p-3 text-[11px] ".concat("light"===e7?"border-slate-200 bg-slate-50 text-slate-800":"border-white/10 bg-black/40 text-zinc-200"),children:n4||"route -p add mask 255.255.255.255 metric 1 if "}),(0,s.jsxs)("button",{onClick:()=>sb(n4),disabled:!n4,className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:[(0,s.jsx)(M.Z,{className:"h-3.5 w-3.5"}),nD("复制命令","Copy command")]})]})]})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border p-6 ".concat("light"===e7?"border-violet-200/90 bg-gradient-to-br from-violet-50 via-white to-fuchsia-50/80":"border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5"),children:[(0,s.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e7?"text-slate-900":"text-white"),children:[(0,s.jsx)(E.Z,{className:"h-4 w-4 ".concat("light"===e7?"text-violet-600":"text-violet-300")}),nD("ShellCrash 网络面板","ShellCrash panel")]}),(0,s.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("透明代理与规则分流直接在本页完成,无需跳转;流媒体与其它系统服务请在「服务」页管理。","Proxy rules and YAML editing are embedded here. Use Services for SRS/Neko/Chromium, etc.")}),(0,s.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:justify-center",children:[{tx:nD("互联网","Internet"),c:"from-cyan-400 to-blue-500"},{tx:"ShellCrash",c:"from-violet-500 to-fuchsia-500"},{tx:nD("本机 / 安卓","Host / Android"),c:"from-emerald-400 to-teal-500"}].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"flex h-16 w-28 items-center justify-center rounded-2xl bg-gradient-to-br ".concat(e.c," text-xs font-bold text-white shadow-lg"),children:e.tx}),t<2?(0,s.jsx)(h.Z,{className:"hidden h-5 w-5 sm:block ".concat("light"===e7?"text-slate-400":"text-zinc-600")}):null]},e.tx))})]}),(0,s.jsx)("div",{className:"overflow-hidden rounded-2xl border shadow-xl ".concat("light"===e7?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:(0,s.jsx)("div",{className:"max-h-[min(78vh,56rem)] min-h-[22rem] overflow-y-auto overflow-x-hidden",children:(0,s.jsx)(D.d,{embeddedShellCrash:!0,portalLang:e6})})})]}):null,"settings"===tt?(0,s.jsxs)("div",{className:"mx-auto max-w-lg space-y-6",children:[(0,s.jsx)("p",{className:"text-sm ".concat("light"===e7?"text-slate-600":"text-zinc-400"),children:nD("常用选项(本机偏好);完整文件与 JSON 编辑见下方链接。","Local preferences; full file/JSON editor via the link below.")}),(0,s.jsxs)("div",{className:"space-y-4 rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-white",children:nD("总览自动刷新","Auto-refresh dashboard")}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:"10s"})]}),(0,s.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tI,onChange:e=>{let t=e.target.checked;tA(t);try{localStorage.setItem("livehub.autorefresh",t?"1":"0")}catch(e){}nI(t?nD("已开启刷新","Auto refresh on"):nD("已暂停刷新","Paused"))}})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4 border-t border-white/[0.06] pt-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-white",children:nD("总览显示 SRS / Neko 探针","Show SRS/Neko probes")}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-500",children:nD("关闭可精简首页","Hide stream probe cards")})]}),(0,s.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tO,onChange:e=>{let t=e.target.checked;tB(t);try{localStorage.setItem("livehub.showStreamProbes",t?"1":"0")}catch(e){}}})]})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/40 p-5",children:[(0,s.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-500",children:nD("配置快照","Config snapshot")}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:String((null==tE?void 0:tE.config_root)||"—")}),(0,s.jsxs)("p",{className:"mt-3 text-sm text-zinc-300",children:[nD("主机名","Hostname"),":"," ",(0,s.jsx)("span",{className:"font-mono text-violet-200",children:(()=>{var e,t,n;let s=null==tE?void 0:tE.system;return(null==s?void 0:null===(t=s.identity)||void 0===t?void 0:null===(e=t.hostname_alias)||void 0===e?void 0:e.trim())||((null==to?void 0:null===(n=to.stack)||void 0===n?void 0:n.mdns_host)||"").replace(/\.local$/i,"")||"—"})()})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:null==tE?void 0:null===(eH=tE.services)||void 0===eH?void 0:eH.slice(0,8).map(e=>(0,s.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-medium ".concat(e.enabled?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-zinc-500/15 text-zinc-400"),children:[e.id," ",e.enabled?"ON":"off"]},e.id))})]}),(0,s.jsxs)("a",{href:"/console?tab=config",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border py-3 text-sm transition ".concat("light"===e7?"border-slate-200 bg-slate-50 text-violet-700 hover:bg-slate-100":"border-white/10 bg-white/[0.05] text-violet-200 hover:bg-white/[0.08]"),children:[nD("完整配置中心(文件 / JSON)","Full config center (files / JSON)"),(0,s.jsx)(_.Z,{className:"h-4 w-4"})]})]}):null]},tt)})})]})]}),(0,s.jsx)(i.M,{children:ti?(0,s.jsx)(l.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>tr(!1),children:(0,s.jsxs)(l.E.aside,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",damping:28,stiffness:320},className:"absolute left-0 top-0 h-full w-[min(88vw,280px)] border-r border-white/10 bg-zinc-950 p-4 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("button",{type:"button",onClick:()=>tr(!1),className:"rounded-lg p-2",children:(0,s.jsx)(U.Z,{className:"h-5 w-5"})})}),(0,s.jsx)("nav",{className:"mt-4 flex flex-col gap-1",children:sg.map(e=>{let t=e.icon,n=tt===e.id;return(0,s.jsxs)("button",{type:"button",onClick:()=>{tn(e.id),tr(!1)},"aria-current":n?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-3 text-left text-sm transition ".concat(n?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-300 hover:bg-white/[0.04]"),children:[(0,s.jsx)(t,{className:"h-4 w-4 ".concat(n?"text-violet-300":"text-violet-400")}),nD(e.labelZh,e.labelEn)]},e.id)})})]})}):null})]})}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-44c22a5313590d69.js b/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-44c22a5313590d69.js deleted file mode 100644 index 5d0628e..0000000 --- a/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-44c22a5313590d69.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{5328:function(e,t,r){Promise.resolve().then(r.bind(r,3211))},3211:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return m}});var s=r(3890),a=r(9625),n=r(776);let l=(0,r(2352).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var c=r(4520),i=r(8496),o=r(7169);function d(e,t,r){return"zh"===e?t:r}function u(e,t){let r=Math.max(0,Math.floor(Number(e)||0)),s=Math.floor(r/3600),a=Math.floor(r%3600/60),n=r%60;return s>0?"".concat(s).concat(d(t,"小时","h")).concat(a).concat(d(t,"分","m")).concat(n).concat(d(t,"秒","s")):a>0?"".concat(a).concat(d(t,"分","m")).concat(n).concat(d(t,"秒","s")):"".concat(n).concat(d(t,"秒","s"))}function h(e,t){if(!e)return"—";try{return new Date(1e3*e).toLocaleString("zh"===t?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(t){return String(e)}}function x(e){var t;return(null===(t=e.source_url)||void 0===t?void 0:t.includes("live.douyin.com"))?e.source_url:e.source_room_id?"https://live.douyin.com/".concat(e.source_room_id):e.source_url||""}var m=function(){let[e]=(0,i.useState)(()=>"en"===window.localStorage.getItem("live.lang")?"en":"zh"),t=new URLSearchParams(window.location.search).get("process")||"youtube",[r,m]=(0,i.useState)(t),[p,f]=(0,i.useState)(""),[b,g]=(0,i.useState)(""),[y,j]=(0,i.useState)(""),[v,N]=(0,i.useState)(""),[w,k]=(0,i.useState)([]),[_,z]=(0,i.useState)(0),[S,C]=(0,i.useState)(!1),[M,L]=(0,i.useState)(!1),[T,R]=(0,i.useState)(""),[E,A]=(0,i.useState)(null),[P,Z]=(0,i.useState)(0),U=(0,i.useCallback)((t,r)=>d(e,t,r),[e]),O=(0,i.useMemo)(()=>{let e=new URLSearchParams;return r.trim()&&e.set("process",r.trim()),p.trim()&&e.set("q",p.trim()),b&&e.set("date_from",b),y&&e.set("date_to",y),v&&e.set("status",v),e.set("limit",String(50)),e.set("offset",String(P)),e.toString()},[r,p,b,y,v,P]),Y=(0,i.useCallback)(async()=>{C(!0),R("");try{let e=await (0,o.N)("/hub/youtube/relay/sessions?".concat(O));k(e.sessions||[]),z(Number(e.total)||0)}catch(e){R(e.message)}finally{C(!1)}},[O]);(0,i.useEffect)(()=>{Y()},[Y]);let q=(0,i.useCallback)(async()=>{L(!0),R("");try{await (0,o.N)("/hub/youtube/relay/sessions/import-log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:r.trim()||"youtube",replace_imported:!0})}),Z(0),await Y()}catch(e){R(e.message)}finally{L(!1)}},[Y,r]);return(0,s.jsxs)("div",{className:"min-h-screen bg-zinc-950 text-zinc-100",children:[(0,s.jsxs)("div",{className:"mx-auto max-w-7xl px-4 py-6 sm:px-6",children:[(0,s.jsxs)("div",{className:"mb-6 flex flex-wrap items-start justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:U("YouTube 推流日志","YouTube relay log")}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:U("记录每次抖音源转播到 YouTube 的时段、主播昵称、直播间 URL 与开播截图,便于追溯音乐版权等问题。","Track each Douyin-to-YouTube relay with anchor, room URL, timing, and start snapshot for copyright tracing.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void Y(),disabled:S,className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm hover:bg-white/10 disabled:opacity-50",children:[S?(0,s.jsx)(a.Z,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(n.Z,{className:"h-4 w-4"}),U("刷新","Refresh")]}),(0,s.jsxs)("button",{type:"button",onClick:()=>void q(),disabled:M,className:"inline-flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-100 hover:bg-amber-500/20 disabled:opacity-50",children:[M?(0,s.jsx)(a.Z,{className:"h-4 w-4 animate-spin"}):null,U("从 PM2 日志导入历史","Import history from PM2 log")]})]})]}),(0,s.jsxs)("div",{className:"mb-4 grid gap-3 rounded-xl border border-white/10 bg-black/30 p-4 md:grid-cols-2 xl:grid-cols-6",children:[(0,s.jsxs)("label",{className:"block text-xs text-zinc-400 xl:col-span-1",children:[U("线路 / 进程","Lane / process"),(0,s.jsx)("input",{value:r,onChange:e=>{Z(0),m(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm",placeholder:"youtube"})]}),(0,s.jsxs)("label",{className:"block text-xs text-zinc-400 xl:col-span-2",children:[U("检索(昵称 / URL / 房间号)","Search nickname / URL / room id"),(0,s.jsxs)("div",{className:"relative mt-1",children:[(0,s.jsx)(l,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-zinc-500"}),(0,s.jsx)("input",{value:p,onChange:e=>{Z(0),f(e.target.value)},className:"w-full rounded-lg border border-white/10 bg-zinc-900 py-2 pl-9 pr-3 text-sm",placeholder:U("例如:柠檬茶、745277409780","e.g. lemon tea, room id")})]})]}),(0,s.jsxs)("label",{className:"block text-xs text-zinc-400",children:[U("开始日期","From date"),(0,s.jsx)("input",{type:"date",value:b,onChange:e=>{Z(0),g(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm"})]}),(0,s.jsxs)("label",{className:"block text-xs text-zinc-400",children:[U("结束日期","To date"),(0,s.jsx)("input",{type:"date",value:y,onChange:e=>{Z(0),j(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm"})]}),(0,s.jsxs)("label",{className:"block text-xs text-zinc-400",children:[U("状态","Status"),(0,s.jsxs)("select",{value:v,onChange:e=>{Z(0),N(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm",children:[(0,s.jsx)("option",{value:"",children:U("全部","All")}),(0,s.jsx)("option",{value:"active",children:U("进行中","Active")}),(0,s.jsx)("option",{value:"ended",children:U("已结束","Ended")})]})]})]}),T?(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-100",children:T}):null,(0,s.jsx)("div",{className:"overflow-hidden rounded-xl border border-white/10 bg-black/20",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"bg-white/5 text-xs uppercase tracking-wide text-zinc-400",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-3",children:U("截图","Cover")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("主播昵称","Anchor")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("直播间 URL","Room URL")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("推流开始","Started")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("推流结束","Ended")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("总时长","Duration")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("推流日期","Date")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("YT 密钥","YT key")}),(0,s.jsx)("th",{className:"px-3 py-3",children:U("线路","Lane")})]})}),(0,s.jsxs)("tbody",{children:[w.map(t=>{let r=x(t);return(0,s.jsxs)("tr",{className:"cursor-pointer border-t border-white/5 hover:bg-white/[0.03]",onClick:()=>A(t),children:[(0,s.jsx)("td",{className:"px-3 py-3",children:t.cover_url?(0,s.jsx)("img",{src:"".concat(t.cover_url,"?ts=").concat(t.started_at||0),alt:t.anchor_name||"cover",className:"h-16 w-10 rounded object-cover ring-1 ring-white/10"}):(0,s.jsx)("div",{className:"flex h-16 w-10 items-center justify-center rounded bg-zinc-900 text-[10px] text-zinc-500 ring-1 ring-white/10",children:"N/A"})}),(0,s.jsx)("td",{className:"px-3 py-3 font-medium text-zinc-100",children:t.anchor_name||"—"}),(0,s.jsx)("td",{className:"max-w-[14rem] truncate px-3 py-3 font-mono text-xs text-cyan-300/90",children:r?(0,s.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"hover:underline",onClick:e=>e.stopPropagation(),children:r.replace(/^https?:\/\//,"")}):"—"}),(0,s.jsx)("td",{className:"whitespace-nowrap px-3 py-3 text-zinc-300",children:h(t.started_at,e)}),(0,s.jsx)("td",{className:"whitespace-nowrap px-3 py-3 text-zinc-300",children:t.ended_at?h(t.ended_at,e):U("进行中","Active")}),(0,s.jsx)("td",{className:"whitespace-nowrap px-3 py-3 font-mono text-zinc-200",children:u(t.duration_seconds,e)}),(0,s.jsx)("td",{className:"whitespace-nowrap px-3 py-3",children:t.push_date||"—"}),(0,s.jsx)("td",{className:"whitespace-nowrap px-3 py-3 font-mono text-xs text-amber-200/90",children:t.youtube_key_suffix?"…".concat(t.youtube_key_suffix):"—"}),(0,s.jsx)("td",{className:"px-3 py-3 text-xs text-zinc-400",children:t.channel_name||t.process||"—"})]},t.id)}),S||0!==w.length?null:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-3 py-10 text-center text-zinc-500",children:U("暂无推流记录。可先点击「从 PM2 日志导入历史」。","No relay sessions yet. Try importing PM2 logs first.")})})]})]})})}),(0,s.jsxs)("div",{className:"mt-4 flex items-center justify-between text-sm text-zinc-400",children:[(0,s.jsxs)("span",{children:[U("共","Total")," ",_," ",U("条","records")," \xb7 ",U("第","Page")," ",Math.floor(P/50)+1,"/",Math.max(1,Math.ceil(_/50))]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:P<=0||S,onClick:()=>Z(Math.max(0,P-50)),className:"rounded-lg border border-white/10 px-3 py-1.5 disabled:opacity-40",children:U("上一页","Prev")}),(0,s.jsx)("button",{type:"button",disabled:P+50>=_||S,onClick:()=>Z(P+50),className:"rounded-lg border border-white/10 px-3 py-1.5 disabled:opacity-40",children:U("下一页","Next")})]})]})]}),E?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:()=>A(null),children:(0,s.jsxs)("div",{className:"max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl border border-white/10 bg-zinc-950 p-5 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:E.anchor_name||U("推流详情","Relay detail")}),(0,s.jsx)("p",{className:"mt-1 text-sm text-zinc-400",children:E.stream_title||"—"})]}),(0,s.jsx)("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200",onClick:()=>A(null),children:"✕"})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-[8rem_1fr]",children:[E.cover_url?(0,s.jsx)("img",{src:"".concat(E.cover_url,"?ts=").concat(E.started_at||0),alt:E.anchor_name||"cover",className:"h-36 w-full rounded-lg object-cover ring-1 ring-white/10"}):null,(0,s.jsxs)("dl",{className:"grid gap-2 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("直播间 URL","Room URL")}),(0,s.jsx)("dd",{className:"break-all font-mono text-cyan-300",children:x(E)?(0,s.jsxs)("a",{href:x(E),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:[x(E)," ",(0,s.jsx)(c.Z,{className:"h-3.5 w-3.5"})]}):"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("房间号","Room id")}),(0,s.jsx)("dd",{children:E.source_room_id||"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("推流开始","Started")}),(0,s.jsx)("dd",{children:h(E.started_at,e)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("推流结束","Ended")}),(0,s.jsx)("dd",{children:E.ended_at?h(E.ended_at,e):U("进行中","Active")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("总时长","Duration")}),(0,s.jsx)("dd",{children:u(E.duration_seconds,e)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("推流日期","Push date")}),(0,s.jsx)("dd",{children:E.push_date||"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("线路 / 进程","Lane / process")}),(0,s.jsxs)("dd",{children:[E.channel_name?"".concat(E.channel_name," \xb7 "):"",E.process||"—"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("结束原因","End reason")}),(0,s.jsx)("dd",{children:E.end_reason||"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-zinc-500",children:U("YouTube 推流密钥(后6位)","YouTube stream key (last 6)")}),(0,s.jsx)("dd",{className:"font-mono",children:E.youtube_key_suffix?"…".concat(E.youtube_key_suffix):"—"})]})]})]})]})}):null]})}},7169:function(e,t,r){"use strict";function s(e){let t=e.replace(/\s+/g," ").trim();return t?t.length<=240?t:"".concat(t.slice(0,237),"..."):""}function a(e,t,r){return"string"==typeof(null==r?void 0:r.error)&&r.error.trim()||"string"==typeof(null==r?void 0:r.message)&&r.message.trim()||function(e){if("string"==typeof e)return e.trim();if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return e.trim();if(e&&"object"==typeof e&&"msg"in e){var t;return String(null!==(t=e.msg)&&void 0!==t?t:"").trim()}return""}).filter(Boolean).join("; ");if(e&&"object"==typeof e)try{return s(JSON.stringify(e))}catch(e){}return""}(null==r?void 0:r.detail)||s(t)||function(e){var t;let r=(null===(t=e.statusText)||void 0===t?void 0:t.trim())?" ".concat(e.statusText.trim()):"";return"HTTP ".concat(e.status).concat(r)}(e)}async function n(e,t){let r;try{r=await fetch(e,{cache:"no-store",...t})}catch(r){let t=r instanceof Error&&r.message.trim()?r.message:"Network request failed";throw Error("Failed to fetch ".concat(e,": ").concat(t))}let s=(await r.text()).trim(),n=null;if(s)try{n=JSON.parse(s)}catch(t){if(!r.ok)throw Error(a(r,s,null));throw Error("Invalid JSON response from ".concat(e))}if(!r.ok)throw Error(a(r,s,n));return null!==n?n:{}}async function l(e){let t="";try{t=(await e.text()).trim()}catch(e){t=""}let r=null;if(t)try{r=JSON.parse(t)}catch(e){r=null}return a(e,t,r)}r.d(t,{N:function(){return n},e:function(){return l}})},2352:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var s=r(8496);let a=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),c=e=>{let t=l(e);return t.charAt(0).toUpperCase()+t.slice(1)};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},d=(0,s.createContext)({}),u=()=>(0,s.useContext)(d),h=(0,s.forwardRef)((e,t)=>{var r,n,l;let{color:c,size:d,strokeWidth:h,absoluteStrokeWidth:x,className:m="",children:p,iconNode:f,...b}=e,{size:g=24,strokeWidth:y=2,absoluteStrokeWidth:j=!1,color:v="currentColor",className:N=""}=null!==(r=u())&&void 0!==r?r:{},w=(null!=x?x:j)?24*Number(null!=h?h:y)/Number(null!=d?d:g):null!=h?h:y;return(0,s.createElement)("svg",{ref:t,...i,width:null!==(n=null!=d?d:g)&&void 0!==n?n:i.width,height:null!==(l=null!=d?d:g)&&void 0!==l?l:i.height,stroke:null!=c?c:v,strokeWidth:w,className:a("lucide",N,m),...!p&&!o(b)&&{"aria-hidden":"true"},...b},[...f.map(e=>{let[t,r]=e;return(0,s.createElement)(t,r)}),...Array.isArray(p)?p:[p]])}),x=(e,t)=>{let r=(0,s.forwardRef)((r,l)=>{let{className:i,...o}=r;return(0,s.createElement)(h,{ref:l,iconNode:t,className:a("lucide-".concat(n(c(e))),"lucide-".concat(e),i),...o})});return r.displayName=c(e),r}},4520:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2352).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},9625:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2352).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},776:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2352).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])}},function(e){e.O(0,[649,945,744],function(){return e(e.s=5328)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-ef6cbd6ed2424191.js b/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-ef6cbd6ed2424191.js new file mode 100644 index 0000000..1b2c63a --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/chunks/app/youtube-relay-log/page-ef6cbd6ed2424191.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{5328:function(e,t,s){Promise.resolve().then(s.bind(s,673))},673:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return f}});var a=s(3890),r=s(9625),l=s(776);let n=(0,s(2352).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var i=s(4520),o=s(8496);function c(e,t){let r=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(!r.current||!e)return;let t=!1,a=null,l=()=>null==a?void 0:a.resize();return s.e(214).then(s.bind(s,5214)).then(s=>{!t&&r.current&&((a=s.init(r.current,void 0,{renderer:"canvas"})).setOption(e,!0),window.addEventListener("resize",l))}),()=>{t=!0,window.removeEventListener("resize",l),null==a||a.dispose()}},[e]),(0,a.jsx)("div",{ref:r,style:{height:t},className:"w-full"})}let d="#f4f4f5",u="#a1a1aa",x="rgba(255,255,255,0.06)",h={backgroundColor:"#18181b",borderColor:x,textStyle:{color:d,fontSize:12}};function m(e){var t,s,r,l,n,i,m,p,b,y;let{stats:g,lang:v,t:f}=e,j=null==g?void 0:g.overview,N="zh"===v?(null==g?void 0:null===(t=g.by_weekday)||void 0===t?void 0:t.labels_zh)||(null==g?void 0:null===(s=g.by_weekday)||void 0===s?void 0:s.labels):null==g?void 0:null===(r=g.by_weekday)||void 0===r?void 0:r.labels,w="zh"===v?(null==g?void 0:null===(l=g.heatmap)||void 0===l?void 0:l.weekday_labels_zh)||(null==g?void 0:null===(n=g.heatmap)||void 0===n?void 0:n.weekday_labels):null==g?void 0:null===(i=g.heatmap)||void 0===i?void 0:i.weekday_labels,_=(0,o.useMemo)(()=>{let e=(null==g?void 0:g.by_date)||[];return e.length?{color:["#22d3ee","#a78bfa"],textStyle:{color:d},tooltip:{...h,trigger:"axis"},legend:{data:[f("场次","Sessions"),f("时长(小时)","Hours")],textStyle:{color:u}},grid:{left:48,right:48,top:40,bottom:48},xAxis:{type:"category",data:e.map(e=>e.date.slice(5)),axisLabel:{color:u,rotate:e.length>14?45:0},axisLine:{lineStyle:{color:x}}},yAxis:[{type:"value",name:f("场次","Sessions"),nameTextStyle:{color:u},axisLabel:{color:u},splitLine:{lineStyle:{color:x}}},{type:"value",name:f("小时","Hours"),nameTextStyle:{color:u},axisLabel:{color:u},splitLine:{show:!1}}],series:[{name:f("场次","Sessions"),type:"bar",data:e.map(e=>e.sessions),barMaxWidth:18},{name:f("时长(小时)","Hours"),type:"line",yAxisIndex:1,smooth:!0,data:e.map(e=>Number(e.hours.toFixed(2)))}]}:null},[null==g?void 0:g.by_date,f]),k=(0,o.useMemo)(()=>{let e=((null==g?void 0:g.top_anchors)||[]).slice(0,12).reverse();return e.length?{color:["#34d399","#38bdf8"],textStyle:{color:d},tooltip:{...h,trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:[f("场次","Sessions"),f("累计小时","Hours")],textStyle:{color:u}},grid:{left:110,right:48,top:36,bottom:28},xAxis:{type:"value",axisLabel:{color:u},splitLine:{lineStyle:{color:x}}},yAxis:{type:"category",data:e.map(e=>(e.anchor_name||"—").slice(0,14)),axisLabel:{color:u,fontSize:11},axisLine:{lineStyle:{color:x}}},series:[{name:f("场次","Sessions"),type:"bar",data:e.map(e=>e.sessions||0),barMaxWidth:14},{name:f("累计小时","Hours"),type:"bar",data:e.map(e=>Number((e.hours_total||0).toFixed(2))),barMaxWidth:14}]}:null},[null==g?void 0:g.top_anchors,f]),S=(0,o.useMemo)(()=>{var e,t,s;let a=(null==g?void 0:null===(e=g.by_hour)||void 0===e?void 0:e.starts)||[],r=(null==g?void 0:null===(t=g.by_hour)||void 0===t?void 0:t.minutes)||[];return a.some(e=>e>0)||r.some(e=>e>0)?{color:["#fbbf24","#fb7185"],textStyle:{color:d},tooltip:{...h,trigger:"axis"},legend:{data:[f("开播次数","Starts"),f("在播分钟","On-air minutes")],textStyle:{color:u}},grid:{left:48,right:48,top:40,bottom:36},xAxis:{type:"category",data:(null==g?void 0:null===(s=g.by_hour)||void 0===s?void 0:s.labels)||Array.from({length:24},(e,t)=>"".concat(String(t).padStart(2,"0"),":00")),axisLabel:{color:u,fontSize:10},axisLine:{lineStyle:{color:x}}},yAxis:[{type:"value",axisLabel:{color:u},splitLine:{lineStyle:{color:x}}},{type:"value",axisLabel:{color:u},splitLine:{show:!1}}],series:[{name:f("开播次数","Starts"),type:"bar",data:a,barMaxWidth:12},{name:f("在播分钟","On-air minutes"),type:"line",yAxisIndex:1,smooth:!0,areaStyle:{opacity:.12},data:r.map(e=>Number(e.toFixed(1)))}]}:null},[null==g?void 0:g.by_hour,f]),z=(0,o.useMemo)(()=>{var e;let t=(null==g?void 0:null===(e=g.by_weekday)||void 0===e?void 0:e.starts)||[];return t.some(e=>e>0)?{color:["#818cf8"],textStyle:{color:d},tooltip:{...h,trigger:"axis"},grid:{left:48,right:16,top:28,bottom:36},xAxis:{type:"category",data:N||[],axisLabel:{color:u},axisLine:{lineStyle:{color:x}}},yAxis:{type:"value",axisLabel:{color:u},splitLine:{lineStyle:{color:x}}},series:[{type:"bar",data:t,barMaxWidth:28,name:f("开播场次","Starts")}]}:null},[null==g?void 0:g.by_weekday,N,f]),L=(0,o.useMemo)(()=>{var e,t;let s=(null==g?void 0:null===(e=g.heatmap)||void 0===e?void 0:e.starts)||[];if(!s.length)return null;let a=[],r=0;return(s.forEach((e,t)=>{e.forEach((e,s)=>{a.push([s,t,e]),e>r&&(r=e)})}),r<=0)?null:{textStyle:{color:d},tooltip:{...h,formatter:e=>{let t=e.data;if(!t)return"";let s=t[0],a=t[1],r=(w||[])[a]||String(a);return"".concat(r," ").concat(s.toString().padStart(2,"0"),":00
").concat(f("开播","Starts"),": ").concat(t[2],"")}},grid:{left:56,right:24,top:16,bottom:40},xAxis:{type:"category",data:(null==g?void 0:null===(t=g.heatmap)||void 0===t?void 0:t.hour_labels)||Array.from({length:24},(e,t)=>"".concat(t)),splitArea:{show:!0},axisLabel:{color:u,fontSize:10}},yAxis:{type:"category",data:w||[],splitArea:{show:!0},axisLabel:{color:u}},visualMap:{min:0,max:Math.max(1,r),calculable:!0,orient:"horizontal",left:"center",bottom:0,textStyle:{color:u},inRange:{color:["#18181b","#0e7490","#22d3ee","#fbbf24","#fb7185"]}},series:[{type:"heatmap",data:a,label:{show:!1},emphasis:{itemStyle:{shadowBlur:8,shadowColor:"rgba(0,0,0,0.4)"}}}]}},[null==g?void 0:g.heatmap,w,f]),M=(0,o.useMemo)(()=>{let e=(null==g?void 0:g.duration_buckets)||{},t=Object.keys(e);return t.length&&Object.values(e).some(e=>e>0)?{color:["#2dd4bf"],textStyle:{color:d},tooltip:{...h,trigger:"item"},series:[{type:"pie",radius:["42%","68%"],center:["50%","52%"],data:t.map(t=>({name:t,value:e[t]})),label:{color:u,formatter:"{b}\n{c}"}}]}:null},[null==g?void 0:g.duration_buckets]),A=c(_,280),C=c(k,340),E=c(S,280),P=c(z,240),R=c(L,300),T=c(M,260);if(!g||!(null==j?void 0:j.sessions))return(0,a.jsx)("div",{className:"mb-4 rounded-xl border border-dashed border-white/10 bg-black/20 px-4 py-8 text-center text-sm text-zinc-500",children:f("暂无统计数据。导入或积累推流记录后,这里会显示主播频率与时段规律。","No analytics yet. Import or accumulate relay sessions to see patterns.")});let O=e=>{let t=Math.max(0,Math.floor(Number(e)||0)),s=Math.floor(t/3600),a=Math.floor(t%3600/60);return s>0?"".concat(s).concat(f("小时","h")).concat(a).concat(f("分","m")):"".concat(a).concat(f("分","m"))};return(0,a.jsxs)("div",{className:"mb-6 space-y-4",children:[(0,a.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-6",children:[[f("总场次","Sessions"),String(null!==(p=null==j?void 0:j.sessions)&&void 0!==p?p:0)],[f("主播数","Anchors"),String(null!==(b=null==j?void 0:j.unique_anchors)&&void 0!==b?b:0)],[f("累计时长","Total hours"),"".concat(Number((null==j?void 0:j.total_hours)||0).toFixed(1),"h")],[f("平均场长","Avg length"),O(null==j?void 0:j.avg_duration_seconds)],[f("中位场长","Median"),O(null==j?void 0:j.median_duration_seconds)],[f("进行中","Active"),String(null!==(y=null==j?void 0:j.active_sessions)&&void 0!==y?y:0)]].map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"rounded-xl border border-white/10 bg-gradient-to-br from-white/[0.06] to-transparent px-4 py-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-zinc-500",children:t}),(0,a.jsx)("div",{className:"mt-1 text-xl font-semibold tabular-nums text-zinc-50",children:s})]},t)})}),(null===(m=g.insights)||void 0===m?void 0:m.length)?(0,a.jsxs)("div",{className:"rounded-xl border border-cyan-500/20 bg-cyan-500/5 px-4 py-3 text-sm text-cyan-50/90",children:[(0,a.jsx)("div",{className:"mb-1 text-xs font-medium uppercase tracking-wide text-cyan-300/80",children:f("规律速览","Pattern snapshot")}),(0,a.jsx)("ul",{className:"space-y-1 text-zinc-200",children:g.insights.map((e,t)=>(0,a.jsxs)("li",{children:["\xb7 ","zh"===v?e.zh:e.en]},t))})]}):null,(0,a.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("每日推流频率与时长","Daily session frequency & hours")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("柱:当天开播场次;线:当天累计推流小时。","Bars: sessions/day; line: total hours/day.")}),A]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("主播排行(场次 / 累计小时)","Anchor ranking (sessions / hours)")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("看谁最常被转、谁播得最久。","Who is relayed most often and longest.")}),C]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("一天内时段分布","Time-of-day distribution")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("开播次数 vs 实际在播占用(分钟)。","Start counts vs on-air occupancy (minutes).")}),E]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("星期分布","Weekday distribution")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("哪天更容易开播。","Which weekdays see more starts.")}),P]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4 xl:col-span-2",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("星期 \xd7 小时 热力图(开播次数)","Weekday \xd7 hour heatmap (starts)")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("颜色越亮表示该时段开播越频繁,适合找固定档期。","Brighter = more frequent starts; useful for spotting fixed slots.")}),R]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-medium text-zinc-200",children:f("单场时长分布","Duration distribution")}),(0,a.jsx)("p",{className:"mb-2 text-xs text-zinc-500",children:f("短场/长场比例。","Short vs long session mix.")}),T]}),(0,a.jsxs)("section",{className:"rounded-xl border border-white/10 bg-black/25 p-4",children:[(0,a.jsx)("h3",{className:"mb-3 text-sm font-medium text-zinc-200",children:f("主播明细(可对照图表)","Anchor detail")}),(0,a.jsx)("div",{className:"max-h-[260px] overflow-auto",children:(0,a.jsxs)("table",{className:"min-w-full text-left text-xs",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-zinc-950 text-zinc-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-2 py-2",children:f("主播","Anchor")}),(0,a.jsx)("th",{className:"px-2 py-2",children:f("场次","N")}),(0,a.jsx)("th",{className:"px-2 py-2",children:f("小时","Hours")}),(0,a.jsx)("th",{className:"px-2 py-2",children:f("日均场","/day")}),(0,a.jsx)("th",{className:"px-2 py-2",children:f("峰值","Peak")}),(0,a.jsx)("th",{className:"px-2 py-2",children:f("间隔","Gap")})]})}),(0,a.jsx)("tbody",{children:(g.top_anchors||[]).map(e=>{var t,s;return(0,a.jsxs)("tr",{className:"border-t border-white/5 text-zinc-300",children:[(0,a.jsx)("td",{className:"px-2 py-2 font-medium text-zinc-100",children:e.anchor_name||"—"}),(0,a.jsx)("td",{className:"px-2 py-2 tabular-nums",children:null!==(t=e.sessions)&&void 0!==t?t:0}),(0,a.jsx)("td",{className:"px-2 py-2 tabular-nums",children:Number(e.hours_total||0).toFixed(1)}),(0,a.jsx)("td",{className:"px-2 py-2 tabular-nums",children:Number(e.sessions_per_active_day||0).toFixed(2)}),(0,a.jsxs)("td",{className:"px-2 py-2",children:[String(null!==(s=e.peak_hour)&&void 0!==s?s:0).padStart(2,"0"),":00",e.peak_weekday_label?" \xb7 ".concat(e.peak_weekday_label):""]}),(0,a.jsx)("td",{className:"px-2 py-2 tabular-nums",children:null==e.avg_gap_hours?"—":"".concat(Number(e.avg_gap_hours).toFixed(1),"h")})]},"".concat(e.anchor_name,"-").concat(e.source_room_id))})})]})})]})]})]})}var p=s(7169);function b(e,t,s){return"zh"===e?t:s}function y(e,t){let s=Math.max(0,Math.floor(Number(e)||0)),a=Math.floor(s/3600),r=Math.floor(s%3600/60),l=s%60;return a>0?"".concat(a).concat(b(t,"小时","h")).concat(r).concat(b(t,"分","m")).concat(l).concat(b(t,"秒","s")):r>0?"".concat(r).concat(b(t,"分","m")).concat(l).concat(b(t,"秒","s")):"".concat(l).concat(b(t,"秒","s"))}function g(e,t){if(!e)return"—";try{return new Date(1e3*e).toLocaleString("zh"===t?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch(t){return String(e)}}function v(e){var t;return(null===(t=e.source_url)||void 0===t?void 0:t.includes("live.douyin.com"))?e.source_url:e.source_room_id?"https://live.douyin.com/".concat(e.source_room_id):e.source_url||""}var f=function(){let[e]=(0,o.useState)(()=>"en"===window.localStorage.getItem("live.lang")?"en":"zh"),t=new URLSearchParams(window.location.search).get("process")||"",[s,c]=(0,o.useState)(t),[d,u]=(0,o.useState)(""),[x,h]=(0,o.useState)(""),[f,j]=(0,o.useState)(""),[N,w]=(0,o.useState)(""),[_,k]=(0,o.useState)([]),[S,z]=(0,o.useState)(null),[L,M]=(0,o.useState)(0),[A,C]=(0,o.useState)(!1),[E,P]=(0,o.useState)(!1),[R,T]=(0,o.useState)(""),[O,W]=(0,o.useState)(null),[Z,U]=(0,o.useState)(0),[q,F]=(0,o.useState)("charts"),H=(0,o.useCallback)((t,s)=>b(e,t,s),[e]),D=(0,o.useMemo)(()=>{let e=new URLSearchParams;return s.trim()&&e.set("process",s.trim()),d.trim()&&e.set("q",d.trim()),x&&e.set("date_from",x),f&&e.set("date_to",f),N&&e.set("status",N),e},[s,d,x,f,N]),I=(0,o.useMemo)(()=>{let e=new URLSearchParams(D);return e.set("limit",String(50)),e.set("offset",String(Z)),e.toString()},[D,Z]),Y=(0,o.useMemo)(()=>{let e=new URLSearchParams(D);return e.set("top_anchors","25"),e.toString()},[D]),B=(0,o.useCallback)(async()=>{C(!0),T("");try{let[e,t]=await Promise.all([(0,p.N)("/hub/youtube/relay/sessions?".concat(I)),(0,p.N)("/hub/youtube/relay/sessions/stats?".concat(Y))]);k(e.sessions||[]),M(Number(e.total)||0),z(t||null)}catch(e){T(e.message)}finally{C(!1)}},[I,Y]);(0,o.useEffect)(()=>{B()},[B]);let J=(0,o.useCallback)(async()=>{P(!0),T("");try{await (0,p.N)("/hub/youtube/relay/sessions/import-log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:s.trim()||void 0,replace_imported:!0})}),U(0),await B()}catch(e){T(e.message)}finally{P(!1)}},[B,s]),$=Math.max(1,Math.ceil(L/50));return(0,a.jsxs)("div",{className:"min-h-screen bg-zinc-950 text-zinc-100",children:[(0,a.jsxs)("div",{className:"mx-auto max-w-7xl px-4 py-6 sm:px-6",children:[(0,a.jsxs)("div",{className:"mb-6 flex flex-wrap items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:H("YouTube 推流日志","YouTube relay log")}),(0,a.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:H("图表展示每位主播的开播频率、时段规律与累计时长;列表保留逐场明细与截图,便于版权追溯。","Charts show per-anchor frequency, time-of-day patterns, and hours; the table keeps per-session detail and covers for tracing.")})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>void B(),disabled:A,className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm hover:bg-white/10 disabled:opacity-50",children:[A?(0,a.jsx)(r.Z,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(l.Z,{className:"h-4 w-4"}),H("刷新","Refresh")]}),(0,a.jsxs)("button",{type:"button",onClick:()=>void J(),disabled:E,className:"inline-flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-100 hover:bg-amber-500/20 disabled:opacity-50",children:[E?(0,a.jsx)(r.Z,{className:"h-4 w-4 animate-spin"}):null,H("从 PM2 日志导入历史","Import history from PM2 log")]})]})]}),(0,a.jsxs)("div",{className:"mb-4 grid gap-3 rounded-xl border border-white/10 bg-black/30 p-4 md:grid-cols-2 xl:grid-cols-6",children:[(0,a.jsxs)("label",{className:"block text-xs text-zinc-400 xl:col-span-1",children:[H("线路 / 进程","Lane / process"),(0,a.jsx)("input",{value:s,onChange:e=>{U(0),c(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm",placeholder:H("全部线路(留空)","All lanes (empty)")})]}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400 xl:col-span-2",children:[H("检索(昵称 / URL / 房间号)","Search nickname / URL / room id"),(0,a.jsxs)("div",{className:"relative mt-1",children:[(0,a.jsx)(n,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-zinc-500"}),(0,a.jsx)("input",{value:d,onChange:e=>{U(0),u(e.target.value)},className:"w-full rounded-lg border border-white/10 bg-zinc-900 py-2 pl-9 pr-3 text-sm",placeholder:H("例如:柠檬茶、745277409780","e.g. lemon tea, room id")})]})]}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400",children:[H("开始日期","From date"),(0,a.jsx)("input",{type:"date",value:x,onChange:e=>{U(0),h(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm"})]}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400",children:[H("结束日期","To date"),(0,a.jsx)("input",{type:"date",value:f,onChange:e=>{U(0),j(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm"})]}),(0,a.jsxs)("label",{className:"block text-xs text-zinc-400",children:[H("状态","Status"),(0,a.jsxs)("select",{value:N,onChange:e=>{U(0),w(e.target.value)},className:"mt-1 w-full rounded-lg border border-white/10 bg-zinc-900 px-3 py-2 text-sm",children:[(0,a.jsx)("option",{value:"",children:H("全部","All")}),(0,a.jsx)("option",{value:"active",children:H("进行中","Active")}),(0,a.jsx)("option",{value:"ended",children:H("已结束","Ended")})]})]})]}),R?(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-100",children:R}):null,(0,a.jsxs)("div",{className:"mb-4 flex gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F("charts"),className:"rounded-lg px-3 py-1.5 text-sm ".concat("charts"===q?"bg-white/15 text-white":"bg-white/5 text-zinc-400 hover:bg-white/10"),children:H("可视化分析","Analytics")}),(0,a.jsxs)("button",{type:"button",onClick:()=>F("list"),className:"rounded-lg px-3 py-1.5 text-sm ".concat("list"===q?"bg-white/15 text-white":"bg-white/5 text-zinc-400 hover:bg-white/10"),children:[H("场次列表","Session list")," (",L,")"]})]}),"charts"===q?(0,a.jsx)(m,{stats:S,lang:e,t:H}):null,"list"===q?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"overflow-hidden rounded-xl border border-white/10 bg-black/20",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"min-w-full text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-white/5 text-xs uppercase tracking-wide text-zinc-400",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-3",children:H("截图","Cover")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("主播昵称","Anchor")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("直播间 URL","Room URL")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("推流开始","Started")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("推流结束","Ended")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("总时长","Duration")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("推流日期","Date")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("YT 密钥","YT key")}),(0,a.jsx)("th",{className:"px-3 py-3",children:H("线路","Lane")})]})}),(0,a.jsxs)("tbody",{children:[_.map(t=>{let s=v(t);return(0,a.jsxs)("tr",{className:"cursor-pointer border-t border-white/5 hover:bg-white/[0.03]",onClick:()=>W(t),children:[(0,a.jsx)("td",{className:"px-3 py-3",children:t.cover_url?(0,a.jsx)("img",{src:"".concat(t.cover_url,"?ts=").concat(t.started_at||0),alt:t.anchor_name||"cover",className:"h-16 w-10 rounded object-cover ring-1 ring-white/10"}):(0,a.jsx)("div",{className:"flex h-16 w-10 items-center justify-center rounded bg-zinc-900 text-[10px] text-zinc-500 ring-1 ring-white/10",children:"N/A"})}),(0,a.jsx)("td",{className:"px-3 py-3 font-medium text-zinc-100",children:t.anchor_name||"—"}),(0,a.jsx)("td",{className:"max-w-[14rem] truncate px-3 py-3 font-mono text-xs text-cyan-300/90",children:s?(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"hover:underline",onClick:e=>e.stopPropagation(),children:s.replace(/^https?:\/\//,"")}):"—"}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-3 text-zinc-300",children:g(t.started_at,e)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-3 text-zinc-300",children:t.ended_at?g(t.ended_at,e):H("进行中","Active")}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-3 font-mono text-zinc-200",children:y(t.duration_seconds,e)}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-3",children:t.push_date||"—"}),(0,a.jsx)("td",{className:"whitespace-nowrap px-3 py-3 font-mono text-xs text-amber-200/90",children:t.youtube_key_suffix?"…".concat(t.youtube_key_suffix):"—"}),(0,a.jsx)("td",{className:"px-3 py-3 text-xs text-zinc-400",children:t.channel_name||t.process||"—"})]},t.id)}),A||0!==_.length?null:(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:9,className:"px-3 py-10 text-center text-zinc-500",children:H("暂无推流记录。可先点击「从 PM2 日志导入历史」。","No relay sessions yet. Try importing PM2 logs first.")})})]})]})})}),(0,a.jsxs)("div",{className:"mt-4 flex items-center justify-between text-sm text-zinc-400",children:[(0,a.jsxs)("span",{children:[H("共","Total")," ",L," ",H("条","records")," \xb7 ",H("第","Page")," ",Math.floor(Z/50)+1,"/",$]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",disabled:Z<=0||A,onClick:()=>U(Math.max(0,Z-50)),className:"rounded-lg border border-white/10 px-3 py-1.5 disabled:opacity-40",children:H("上一页","Prev")}),(0,a.jsx)("button",{type:"button",disabled:Z+50>=L||A,onClick:()=>U(Z+50),className:"rounded-lg border border-white/10 px-3 py-1.5 disabled:opacity-40",children:H("下一页","Next")})]})]})]}):null]}),O?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:()=>W(null),children:(0,a.jsxs)("div",{className:"max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl border border-white/10 bg-zinc-950 p-5 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:O.anchor_name||H("推流详情","Relay detail")}),(0,a.jsx)("p",{className:"mt-1 text-sm text-zinc-400",children:O.stream_title||"—"})]}),(0,a.jsx)("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200",onClick:()=>W(null),children:"✕"})]}),(0,a.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-[8rem_1fr]",children:[O.cover_url?(0,a.jsx)("img",{src:"".concat(O.cover_url,"?ts=").concat(O.started_at||0),alt:O.anchor_name||"cover",className:"h-36 w-full rounded-lg object-cover ring-1 ring-white/10"}):null,(0,a.jsxs)("dl",{className:"grid gap-2 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("直播间 URL","Room URL")}),(0,a.jsx)("dd",{className:"break-all font-mono text-cyan-300",children:v(O)?(0,a.jsxs)("a",{href:v(O),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:[v(O)," ",(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5"})]}):"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("房间号","Room id")}),(0,a.jsx)("dd",{children:O.source_room_id||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("推流开始","Started")}),(0,a.jsx)("dd",{children:g(O.started_at,e)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("推流结束","Ended")}),(0,a.jsx)("dd",{children:O.ended_at?g(O.ended_at,e):H("进行中","Active")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("总时长","Duration")}),(0,a.jsx)("dd",{children:y(O.duration_seconds,e)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("推流日期","Push date")}),(0,a.jsx)("dd",{children:O.push_date||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("线路 / 进程","Lane / process")}),(0,a.jsxs)("dd",{children:[O.channel_name?"".concat(O.channel_name," \xb7 "):"",O.process||"—"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("结束原因","End reason")}),(0,a.jsx)("dd",{children:O.end_reason||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("dt",{className:"text-zinc-500",children:H("YouTube 推流密钥(后6位)","YouTube stream key (last 6)")}),(0,a.jsx)("dd",{className:"font-mono",children:O.youtube_key_suffix?"…".concat(O.youtube_key_suffix):"—"})]})]})]})]})}):null]})}},7169:function(e,t,s){"use strict";function a(e){let t=e.replace(/\s+/g," ").trim();return t?t.length<=240?t:"".concat(t.slice(0,237),"..."):""}function r(e,t,s){return"string"==typeof(null==s?void 0:s.error)&&s.error.trim()||"string"==typeof(null==s?void 0:s.message)&&s.message.trim()||function(e){if("string"==typeof e)return e.trim();if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return e.trim();if(e&&"object"==typeof e&&"msg"in e){var t;return String(null!==(t=e.msg)&&void 0!==t?t:"").trim()}return""}).filter(Boolean).join("; ");if(e&&"object"==typeof e)try{return a(JSON.stringify(e))}catch(e){}return""}(null==s?void 0:s.detail)||a(t)||function(e){var t;let s=(null===(t=e.statusText)||void 0===t?void 0:t.trim())?" ".concat(e.statusText.trim()):"";return"HTTP ".concat(e.status).concat(s)}(e)}async function l(e,t){let s;try{s=await fetch(e,{cache:"no-store",...t})}catch(s){let t=s instanceof Error&&s.message.trim()?s.message:"Network request failed";throw Error("Failed to fetch ".concat(e,": ").concat(t))}let a=(await s.text()).trim(),l=null;if(a)try{l=JSON.parse(a)}catch(t){if(!s.ok)throw Error(r(s,a,null));throw Error("Invalid JSON response from ".concat(e))}if(!s.ok)throw Error(r(s,a,l));return null!==l?l:{}}async function n(e){let t="";try{t=(await e.text()).trim()}catch(e){t=""}let s=null;if(t)try{s=JSON.parse(t)}catch(e){s=null}return r(e,t,s)}s.d(t,{N:function(){return l},e:function(){return n}})},2352:function(e,t,s){"use strict";s.d(t,{Z:function(){return h}});var a=s(8496);let r=function(){for(var e=arguments.length,t=Array(e),s=0;s!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim()},l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase()),i=e=>{let t=n(e);return t.charAt(0).toUpperCase()+t.slice(1)};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},d=(0,a.createContext)({}),u=()=>(0,a.useContext)(d),x=(0,a.forwardRef)((e,t)=>{var s,l,n;let{color:i,size:d,strokeWidth:x,absoluteStrokeWidth:h,className:m="",children:p,iconNode:b,...y}=e,{size:g=24,strokeWidth:v=2,absoluteStrokeWidth:f=!1,color:j="currentColor",className:N=""}=null!==(s=u())&&void 0!==s?s:{},w=(null!=h?h:f)?24*Number(null!=x?x:v)/Number(null!=d?d:g):null!=x?x:v;return(0,a.createElement)("svg",{ref:t,...o,width:null!==(l=null!=d?d:g)&&void 0!==l?l:o.width,height:null!==(n=null!=d?d:g)&&void 0!==n?n:o.height,stroke:null!=i?i:j,strokeWidth:w,className:r("lucide",N,m),...!p&&!c(y)&&{"aria-hidden":"true"},...y},[...b.map(e=>{let[t,s]=e;return(0,a.createElement)(t,s)}),...Array.isArray(p)?p:[p]])}),h=(e,t)=>{let s=(0,a.forwardRef)((s,n)=>{let{className:o,...c}=s;return(0,a.createElement)(x,{ref:n,iconNode:t,className:r("lucide-".concat(l(i(e))),"lucide-".concat(e),o),...c})});return s.displayName=i(e),s}},4520:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(2352).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},9625:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(2352).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},776:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(2352).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])}},function(e){e.O(0,[649,945,744],function(){return e(e.s=5328)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/css/7e3b6f8d9077dbc2.css b/d2ypp2/web-console/out/_next/static/css/7e3b6f8d9077dbc2.css new file mode 100644 index 0000000..d4abeab --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/css/7e3b6f8d9077dbc2.css @@ -0,0 +1,3 @@ +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* +! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-10{bottom:-2.5rem}.-left-1\/4{left:-25%}.-right-0\.5{right:-.125rem}.-right-20{right:-5rem}.-right-8{right:-2rem}.-top-0\.5{top:-.125rem}.-top-20{top:-5rem}.-top-8{top:-2rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-24{bottom:6rem}.bottom-3{bottom:.75rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-1\/3{left:33.333333%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-2\.5{top:.625rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-3{-webkit-line-clamp:3}.line-clamp-3,.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-4{-webkit-line-clamp:4}.line-clamp-6{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[168px\]{height:168px}.h-\[248px\]{height:248px}.h-\[30rem\]{height:30rem}.h-\[36rem\]{height:36rem}.h-\[42rem\]{height:42rem}.h-\[min\(72vh\2c 40rem\)\]{height:min(72vh,40rem)}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[260px\]{max-height:260px}.max-h-\[28rem\]{max-height:28rem}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(22rem\2c 42vh\)\]{max-height:min(22rem,42vh)}.max-h-\[min\(24rem\2c 55vh\)\]{max-height:min(24rem,55vh)}.max-h-\[min\(70vh\2c 48rem\)\]{max-height:min(70vh,48rem)}.max-h-\[min\(72vh\2c 680px\)\]{max-height:min(72vh,680px)}.max-h-\[min\(78vh\2c 56rem\)\]{max-height:min(78vh,56rem)}.max-h-\[min\(78vh\2c 720px\)\]{max-height:min(78vh,720px)}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-24{min-height:6rem}.min-h-56{min-height:14rem}.min-h-\[100px\]{min-height:100px}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[160px\]{min-height:160px}.min-h-\[18rem\]{min-height:18rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[2\.75rem\]{min-height:2.75rem}.min-h-\[200px\]{min-height:200px}.min-h-\[22rem\]{min-height:22rem}.min-h-\[24rem\]{min-height:24rem}.min-h-\[280px\]{min-height:280px}.min-h-\[2rem\]{min-height:2rem}.min-h-\[32rem\]{min-height:32rem}.min-h-\[3rem\]{min-height:3rem}.min-h-\[4rem\]{min-height:4rem}.min-h-\[6rem\]{min-height:6rem}.min-h-\[72px\]{min-height:72px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[36rem\]{width:36rem}.w-\[42rem\]{width:42rem}.w-\[min\(88vw\2c 280px\)\]{width:min(88vw,280px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-\[1rem\]{min-width:1rem}.min-w-\[3\.75rem\]{min-width:3.75rem}.min-w-\[6rem\]{min-width:6rem}.min-w-\[7rem\]{min-width:7rem}.min-w-\[9rem\]{min-width:9rem}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[14rem\]{max-width:14rem}.max-w-\[min\(92vw\2c 28rem\)\]{max-width:min(92vw,28rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-center{transform-origin:center}.-translate-x-1\/2{--tw-translate-x:-50%}.-rotate-90,.-translate-x-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/\[0\.06\]>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.06)}.self-start{align-self:flex-start}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.35rem\]{border-radius:1.35rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-400\/20{border-color:rgba(251,191,36,.2)}.border-amber-400\/50{border-color:rgba(251,191,36,.5)}.border-amber-500\/15{border-color:rgba(245,158,11,.15)}.border-amber-500\/20{border-color:rgba(245,158,11,.2)}.border-amber-500\/25{border-color:rgba(245,158,11,.25)}.border-amber-500\/30{border-color:rgba(245,158,11,.3)}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-200\/70{border-color:rgba(165,243,252,.7)}.border-cyan-200\/90{border-color:rgba(165,243,252,.9)}.border-cyan-400\/15{border-color:rgba(34,211,238,.15)}.border-cyan-400\/20{border-color:rgba(34,211,238,.2)}.border-cyan-400\/50{border-color:rgba(34,211,238,.5)}.border-cyan-500\/15{border-color:rgba(6,182,212,.15)}.border-cyan-500\/20{border-color:rgba(6,182,212,.2)}.border-cyan-500\/25{border-color:rgba(6,182,212,.25)}.border-cyan-500\/30{border-color:rgba(6,182,212,.3)}.border-cyan-500\/40{border-color:rgba(6,182,212,.4)}.border-cyan-500\/50{border-color:rgba(6,182,212,.5)}.border-emerald-400\/30{border-color:rgba(52,211,153,.3)}.border-emerald-500\/15{border-color:rgba(16,185,129,.15)}.border-emerald-500\/20{border-color:rgba(16,185,129,.2)}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/30{border-color:rgba(16,185,129,.3)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-fuchsia-200\/80{border-color:rgba(245,208,254,.8)}.border-fuchsia-400\/20{border-color:rgba(232,121,249,.2)}.border-fuchsia-400\/30{border-color:rgba(232,121,249,.3)}.border-fuchsia-500\/20{border-color:rgba(217,70,239,.2)}.border-fuchsia-500\/30{border-color:rgba(217,70,239,.3)}.border-indigo-400\/50{border-color:rgba(129,140,248,.5)}.border-rose-500\/15{border-color:rgba(244,63,94,.15)}.border-rose-500\/20{border-color:rgba(244,63,94,.2)}.border-rose-500\/25{border-color:rgba(244,63,94,.25)}.border-rose-500\/30{border-color:rgba(244,63,94,.3)}.border-sky-200\/80{border-color:rgba(186,230,253,.8)}.border-sky-400\/15{border-color:rgba(56,189,248,.15)}.border-sky-400\/20{border-color:rgba(56,189,248,.2)}.border-sky-500\/20{border-color:rgba(14,165,233,.2)}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-200\/80{border-color:rgba(226,232,240,.8)}.border-slate-200\/90{border-color:rgba(226,232,240,.9)}.border-slate-500\/30{border-color:rgba(100,116,139,.3)}.border-slate-700\/30{border-color:rgba(51,65,85,.3)}.border-violet-200\/70{border-color:rgba(221,214,254,.7)}.border-violet-200\/80{border-color:rgba(221,214,254,.8)}.border-violet-200\/90{border-color:rgba(221,214,254,.9)}.border-violet-500\/15{border-color:rgba(139,92,246,.15)}.border-violet-500\/20{border-color:rgba(139,92,246,.2)}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-500\/30{border-color:rgba(139,92,246,.3)}.border-violet-500\/35{border-color:rgba(139,92,246,.35)}.border-violet-500\/45{border-color:rgba(139,92,246,.45)}.border-violet-500\/50{border-color:rgba(139,92,246,.5)}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/15{border-color:hsla(0,0%,100%,.15)}.border-white\/20{border-color:hsla(0,0%,100%,.2)}.border-white\/5{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.04\]{border-color:hsla(0,0%,100%,.04)}.border-white\/\[0\.05\]{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.06\]{border-color:hsla(0,0%,100%,.06)}.border-white\/\[0\.07\]{border-color:hsla(0,0%,100%,.07)}.border-white\/\[0\.08\]{border-color:hsla(0,0%,100%,.08)}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.bg-\[\#050508\]{--tw-bg-opacity:1;background-color:rgb(5 5 8/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgba(245,158,11,.1)}.bg-amber-500\/15{background-color:rgba(245,158,11,.15)}.bg-amber-500\/20{background-color:rgba(245,158,11,.2)}.bg-amber-500\/5{background-color:rgba(245,158,11,.05)}.bg-amber-500\/\[0\.06\]{background-color:rgba(245,158,11,.06)}.bg-amber-500\/\[0\.08\]{background-color:rgba(245,158,11,.08)}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/10{background-color:rgba(0,0,0,.1)}.bg-black\/20{background-color:rgba(0,0,0,.2)}.bg-black\/25{background-color:rgba(0,0,0,.25)}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-black\/35{background-color:rgba(0,0,0,.35)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/45{background-color:rgba(0,0,0,.45)}.bg-black\/5{background-color:rgba(0,0,0,.05)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-black\/55{background-color:rgba(0,0,0,.55)}.bg-black\/60{background-color:rgba(0,0,0,.6)}.bg-black\/70{background-color:rgba(0,0,0,.7)}.bg-black\/75{background-color:rgba(0,0,0,.75)}.bg-black\/80{background-color:rgba(0,0,0,.8)}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-400\/10{background-color:rgba(34,211,238,.1)}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500\/10{background-color:rgba(6,182,212,.1)}.bg-cyan-500\/15{background-color:rgba(6,182,212,.15)}.bg-cyan-500\/20{background-color:rgba(6,182,212,.2)}.bg-cyan-500\/25{background-color:rgba(6,182,212,.25)}.bg-cyan-500\/30{background-color:rgba(6,182,212,.3)}.bg-cyan-500\/5{background-color:rgba(6,182,212,.05)}.bg-cyan-500\/90{background-color:rgba(6,182,212,.9)}.bg-cyan-500\/\[0\.05\]{background-color:rgba(6,182,212,.05)}.bg-cyan-500\/\[0\.06\]{background-color:rgba(6,182,212,.06)}.bg-cyan-500\/\[0\.08\]{background-color:rgba(6,182,212,.08)}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-600\/80{background-color:rgba(8,145,178,.8)}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgba(16,185,129,.1)}.bg-emerald-500\/15{background-color:rgba(16,185,129,.15)}.bg-emerald-500\/20{background-color:rgba(16,185,129,.2)}.bg-emerald-500\/90{background-color:rgba(16,185,129,.9)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-fuchsia-500\/10{background-color:rgba(217,70,239,.1)}.bg-fuchsia-500\/15{background-color:rgba(217,70,239,.15)}.bg-fuchsia-500\/20{background-color:rgba(217,70,239,.2)}.bg-indigo-500\/15{background-color:rgba(99,102,241,.15)}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-500\/10{background-color:rgba(244,63,94,.1)}.bg-rose-500\/15{background-color:rgba(244,63,94,.15)}.bg-rose-500\/20{background-color:rgba(244,63,94,.2)}.bg-rose-500\/\[0\.10\]{background-color:rgba(244,63,94,.1)}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-950\/20{background-color:rgba(76,5,25,.2)}.bg-rose-950\/25{background-color:rgba(76,5,25,.25)}.bg-sky-500\/10{background-color:rgba(14,165,233,.1)}.bg-sky-500\/15{background-color:rgba(14,165,233,.15)}.bg-sky-500\/25{background-color:rgba(14,165,233,.25)}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200\/70{background-color:rgba(226,232,240,.7)}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-50\/80{background-color:rgba(248,250,252,.8)}.bg-slate-500\/10{background-color:rgba(100,116,139,.1)}.bg-slate-500\/15{background-color:rgba(100,116,139,.15)}.bg-slate-800\/50{background-color:rgba(30,41,59,.5)}.bg-slate-950\/30{background-color:rgba(2,6,23,.3)}.bg-slate-950\/50{background-color:rgba(2,6,23,.5)}.bg-slate-950\/60{background-color:rgba(2,6,23,.6)}.bg-slate-950\/80{background-color:rgba(2,6,23,.8)}.bg-slate-950\/95{background-color:rgba(2,6,23,.95)}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-100\/90{background-color:rgba(237,233,254,.9)}.bg-violet-400\/15{background-color:rgba(167,139,250,.15)}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500\/10{background-color:rgba(139,92,246,.1)}.bg-violet-500\/15{background-color:rgba(139,92,246,.15)}.bg-violet-500\/20{background-color:rgba(139,92,246,.2)}.bg-violet-500\/25{background-color:rgba(139,92,246,.25)}.bg-violet-500\/\[0\.06\]{background-color:rgba(139,92,246,.06)}.bg-violet-500\/\[0\.1\]{background-color:rgba(139,92,246,.1)}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-600\/20{background-color:rgba(124,58,237,.2)}.bg-violet-600\/70{background-color:rgba(124,58,237,.7)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/15{background-color:hsla(0,0%,100%,.15)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-white\/70{background-color:hsla(0,0%,100%,.7)}.bg-white\/75{background-color:hsla(0,0%,100%,.75)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-white\/85{background-color:hsla(0,0%,100%,.85)}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.bg-white\/\[0\.035\]{background-color:hsla(0,0%,100%,.035)}.bg-white\/\[0\.03\]{background-color:hsla(0,0%,100%,.03)}.bg-white\/\[0\.04\]{background-color:hsla(0,0%,100%,.04)}.bg-white\/\[0\.05\]{background-color:hsla(0,0%,100%,.05)}.bg-white\/\[0\.06\]{background-color:hsla(0,0%,100%,.06)}.bg-white\/\[0\.08\]{background-color:hsla(0,0%,100%,.08)}.bg-zinc-500\/15{background-color:hsla(240,4%,46%,.15)}.bg-zinc-600\/20{background-color:rgba(82,82,91,.2)}.bg-zinc-600\/30{background-color:rgba(82,82,91,.3)}.bg-zinc-700\/40{background-color:rgba(63,63,70,.4)}.bg-zinc-700\/90{background-color:rgba(63,63,70,.9)}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-zinc-950\/35{background-color:rgba(9,9,11,.35)}.bg-zinc-950\/40{background-color:rgba(9,9,11,.4)}.bg-zinc-950\/50{background-color:rgba(9,9,11,.5)}.bg-zinc-950\/55{background-color:rgba(9,9,11,.55)}.bg-zinc-950\/60{background-color:rgba(9,9,11,.6)}.bg-zinc-950\/70{background-color:rgba(9,9,11,.7)}.bg-zinc-950\/80{background-color:rgba(9,9,11,.8)}.bg-zinc-950\/90{background-color:rgba(9,9,11,.9)}.bg-zinc-950\/95{background-color:rgba(9,9,11,.95)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:#fbbf24 var(--tw-gradient-from-position);--tw-gradient-to:rgba(251,191,36,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-50\/90{--tw-gradient-from:rgba(255,251,235,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(255,251,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/20{--tw-gradient-from:rgba(245,158,11,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/35{--tw-gradient-from:rgba(245,158,11,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.07\]{--tw-gradient-from:rgba(245,158,11,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.12\]{--tw-gradient-from:rgba(245,158,11,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from:rgba(6,182,212,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/35{--tw-gradient-from:rgba(6,182,212,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.08\]{--tw-gradient-from:rgba(6,182,212,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.14\]{--tw-gradient-from:rgba(6,182,212,.14) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.1\]{--tw-gradient-from:rgba(6,182,212,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400{--tw-gradient-from:#34d399 var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400\/30{--tw-gradient-from:rgba(52,211,153,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/20{--tw-gradient-from:rgba(16,185,129,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.07\]{--tw-gradient-from:rgba(16,185,129,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.08\]{--tw-gradient-from:rgba(16,185,129,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.12\]{--tw-gradient-from:rgba(16,185,129,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-50\/90{--tw-gradient-from:rgba(253,244,255,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(253,244,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/10{--tw-gradient-from:rgba(217,70,239,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/20{--tw-gradient-from:rgba(217,70,239,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-950\/40{--tw-gradient-from:rgba(74,4,78,.4) var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,4,78,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-indigo-500\/20{--tw-gradient-from:rgba(99,102,241,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(99,102,241,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500\/25{--tw-gradient-from:rgba(236,72,153,.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500\/30{--tw-gradient-from:rgba(239,68,68,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-rose-500\/20{--tw-gradient-from:rgba(244,63,94,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(244,63,94,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-500\/\[0\.08\]{--tw-gradient-from:rgba(14,165,233,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(14,165,233,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-50{--tw-gradient-from:#f5f3ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,243,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from:#8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from:rgba(139,92,246,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/20{--tw-gradient-from:rgba(139,92,246,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.08\]{--tw-gradient-from:rgba(139,92,246,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.12\]{--tw-gradient-from:rgba(139,92,246,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-600\/10{--tw-gradient-from:rgba(124,58,237,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(124,58,237,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.05\]{--tw-gradient-from:hsla(0,0%,100%,.05) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.06\]{--tw-gradient-from:hsla(0,0%,100%,.06) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-zinc-950\/95{--tw-gradient-from:rgba(9,9,11,.95) var(--tw-gradient-from-position);--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/25{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(0,0,0,.25) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),transparent var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-white{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/40{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.4) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/50{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.5) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/60{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.6) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/90{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.9) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-black\/40{--tw-gradient-to:rgba(0,0,0,.4) var(--tw-gradient-to-position)}.to-blue-500{--tw-gradient-to:#3b82f6 var(--tw-gradient-to-position)}.to-cyan-400{--tw-gradient-to:#22d3ee var(--tw-gradient-to-position)}.to-cyan-50{--tw-gradient-to:#ecfeff var(--tw-gradient-to-position)}.to-cyan-50\/70{--tw-gradient-to:rgba(236,254,255,.7) var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to:rgba(6,182,212,.1) var(--tw-gradient-to-position)}.to-cyan-500\/5{--tw-gradient-to:rgba(6,182,212,.05) var(--tw-gradient-to-position)}.to-cyan-500\/\[0\.06\]{--tw-gradient-to:rgba(6,182,212,.06) var(--tw-gradient-to-position)}.to-cyan-950\/20{--tw-gradient-to:rgba(8,51,68,.2) var(--tw-gradient-to-position)}.to-emerald-500\/\[0\.05\]{--tw-gradient-to:rgba(16,185,129,.05) var(--tw-gradient-to-position)}.to-fuchsia-50\/80{--tw-gradient-to:rgba(253,244,255,.8) var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to:#d946ef var(--tw-gradient-to-position)}.to-fuchsia-500\/10{--tw-gradient-to:rgba(217,70,239,.1) var(--tw-gradient-to-position)}.to-fuchsia-500\/5{--tw-gradient-to:rgba(217,70,239,.05) var(--tw-gradient-to-position)}.to-fuchsia-600\/25{--tw-gradient-to:rgba(192,38,211,.25) var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to:#f97316 var(--tw-gradient-to-position)}.to-orange-500\/10{--tw-gradient-to:rgba(249,115,22,.1) var(--tw-gradient-to-position)}.to-pink-500\/10{--tw-gradient-to:rgba(236,72,153,.1) var(--tw-gradient-to-position)}.to-rose-500\/10{--tw-gradient-to:rgba(244,63,94,.1) var(--tw-gradient-to-position)}.to-sky-500\/10{--tw-gradient-to:rgba(14,165,233,.1) var(--tw-gradient-to-position)}.to-slate-50{--tw-gradient-to:#f8fafc var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.to-teal-500\/10{--tw-gradient-to:rgba(20,184,166,.1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to:rgba(139,92,246,.1) var(--tw-gradient-to-position)}.to-violet-500\/25{--tw-gradient-to:rgba(139,92,246,.25) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.06\]{--tw-gradient-to:rgba(139,92,246,.06) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.08\]{--tw-gradient-to:rgba(139,92,246,.08) var(--tw-gradient-to-position)}.to-violet-600\/25{--tw-gradient-to:rgba(124,58,237,.25) var(--tw-gradient-to-position)}.to-violet-600\/30{--tw-gradient-to:rgba(124,58,237,.3) var(--tw-gradient-to-position)}.to-zinc-900\/90{--tw-gradient-to:rgba(24,24,27,.9) var(--tw-gradient-to-position)}.to-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,.8) var(--tw-gradient-to-position)}.fill-zinc-400{fill:#a1a1aa}.stroke-amber-400{stroke:#fbbf24}.stroke-cyan-400{stroke:#22d3ee}.stroke-rose-400{stroke:#fb7185}.stroke-white\/10{stroke:hsla(0,0%,100%,.1)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-5{padding-left:1.25rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[color\:var\(--text\)\]{color:var(--text)}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-100\/80{color:hsla(48,96%,89%,.8)}.text-amber-100\/85{color:hsla(48,96%,89%,.85)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-200\/80{color:hsla(48,97%,77%,.8)}.text-amber-200\/85{color:hsla(48,97%,77%,.85)}.text-amber-200\/90{color:hsla(48,97%,77%,.9)}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-300\/80{color:rgba(252,211,77,.8)}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-400\/95{color:rgba(251,191,36,.95)}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-100\/75{color:rgba(207,250,254,.75)}.text-cyan-100\/90{color:rgba(207,250,254,.9)}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-200\/90{color:rgba(165,243,252,.9)}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-300\/70{color:rgba(103,232,249,.7)}.text-cyan-300\/80{color:rgba(103,232,249,.8)}.text-cyan-300\/90{color:rgba(103,232,249,.9)}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-400\/90{color:rgba(34,211,238,.9)}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-50\/90{color:rgba(236,254,255,.9)}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-100\/95{color:rgba(209,250,229,.95)}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-200\/90{color:rgba(167,243,208,.9)}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-300\/90{color:rgba(110,231,183,.9)}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-400\/80{color:rgba(52,211,153,.8)}.text-emerald-400\/90{color:rgba(52,211,153,.9)}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200\/80{color:rgba(245,208,254,.8)}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-300\/70{color:rgba(240,171,252,.7)}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-100\/95{color:rgba(255,228,230,.95)}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400\/90{color:rgba(251,113,133,.9)}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-100\/80{color:rgba(224,242,254,.8)}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-300\/90{color:rgba(203,213,225,.9)}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-300\/80{color:rgba(196,181,253,.8)}.text-violet-300\/90{color:rgba(196,181,253,.9)}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-400\/90{color:rgba(167,139,250,.9)}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/70{color:hsla(0,0%,100%,.7)}.text-white\/80{color:hsla(0,0%,100%,.8)}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-200\/90{color:hsla(240,6%,90%,.9)}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-violet-500{accent-color:#8b5cf6}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-\[0\.06\]{opacity:.06}.opacity-\[0\.22\]{opacity:.22}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-inner,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.shadow-black\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/30{--tw-shadow-color:rgba(0,0,0,.3);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/50{--tw-shadow-color:rgba(0,0,0,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/80{--tw-shadow-color:rgba(0,0,0,.8);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-100\/50{--tw-shadow-color:rgba(207,250,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-900\/10{--tw-shadow-color:rgba(22,78,99,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-emerald-900\/20{--tw-shadow-color:rgba(6,78,59,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-sky-100\/40{--tw-shadow-color:rgba(224,242,254,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-200\/40{--tw-shadow-color:rgba(226,232,240,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-200\/50{--tw-shadow-color:rgba(221,214,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-500\/25{--tw-shadow-color:rgba(139,92,246,.25);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-900\/10{--tw-shadow-color:rgba(76,29,149,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-white\/5{--tw-shadow-color:hsla(0,0%,100%,.05);--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-400\/25{--tw-ring-color:rgba(251,191,36,.25)}.ring-amber-400\/30{--tw-ring-color:rgba(251,191,36,.3)}.ring-amber-500\/20{--tw-ring-color:rgba(245,158,11,.2)}.ring-amber-500\/25{--tw-ring-color:rgba(245,158,11,.25)}.ring-amber-500\/30{--tw-ring-color:rgba(245,158,11,.3)}.ring-amber-500\/35{--tw-ring-color:rgba(245,158,11,.35)}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-400\/20{--tw-ring-color:rgba(34,211,238,.2)}.ring-cyan-400\/25{--tw-ring-color:rgba(34,211,238,.25)}.ring-cyan-400\/30{--tw-ring-color:rgba(34,211,238,.3)}.ring-cyan-400\/35{--tw-ring-color:rgba(34,211,238,.35)}.ring-cyan-500\/10{--tw-ring-color:rgba(6,182,212,.1)}.ring-cyan-500\/20{--tw-ring-color:rgba(6,182,212,.2)}.ring-cyan-500\/25{--tw-ring-color:rgba(6,182,212,.25)}.ring-cyan-500\/30{--tw-ring-color:rgba(6,182,212,.3)}.ring-cyan-500\/35{--tw-ring-color:rgba(6,182,212,.35)}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-400\/25{--tw-ring-color:rgba(52,211,153,.25)}.ring-emerald-400\/30{--tw-ring-color:rgba(52,211,153,.3)}.ring-emerald-500\/20{--tw-ring-color:rgba(16,185,129,.2)}.ring-emerald-500\/25{--tw-ring-color:rgba(16,185,129,.25)}.ring-emerald-500\/30{--tw-ring-color:rgba(16,185,129,.3)}.ring-fuchsia-500\/25{--tw-ring-color:rgba(217,70,239,.25)}.ring-fuchsia-500\/35{--tw-ring-color:rgba(217,70,239,.35)}.ring-indigo-400\/30{--tw-ring-color:rgba(129,140,248,.3)}.ring-indigo-500\/25{--tw-ring-color:rgba(99,102,241,.25)}.ring-rose-400\/25{--tw-ring-color:rgba(251,113,133,.25)}.ring-rose-400\/40{--tw-ring-color:rgba(251,113,133,.4)}.ring-rose-500\/15{--tw-ring-color:rgba(244,63,94,.15)}.ring-rose-500\/25{--tw-ring-color:rgba(244,63,94,.25)}.ring-rose-500\/30{--tw-ring-color:rgba(244,63,94,.3)}.ring-rose-500\/35{--tw-ring-color:rgba(244,63,94,.35)}.ring-sky-400\/30{--tw-ring-color:rgba(56,189,248,.3)}.ring-sky-400\/40{--tw-ring-color:rgba(56,189,248,.4)}.ring-sky-500\/25{--tw-ring-color:rgba(14,165,233,.25)}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-500\/30{--tw-ring-color:rgba(100,116,139,.3)}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-400\/25{--tw-ring-color:rgba(167,139,250,.25)}.ring-violet-400\/35{--tw-ring-color:rgba(167,139,250,.35)}.ring-violet-400\/40{--tw-ring-color:rgba(167,139,250,.4)}.ring-violet-500\/20{--tw-ring-color:rgba(139,92,246,.2)}.ring-violet-500\/25{--tw-ring-color:rgba(139,92,246,.25)}.ring-violet-500\/30{--tw-ring-color:rgba(139,92,246,.3)}.ring-violet-500\/35{--tw-ring-color:rgba(139,92,246,.35)}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-white\/\[0\.03\]{--tw-ring-color:hsla(0,0%,100%,.03)}.ring-white\/\[0\.04\]{--tw-ring-color:hsla(0,0%,100%,.04)}.ring-white\/\[0\.05\]{--tw-ring-color:hsla(0,0%,100%,.05)}.ring-white\/\[0\.06\]{--tw-ring-color:hsla(0,0%,100%,.06)}.ring-zinc-500\/25{--tw-ring-color:hsla(240,4%,46%,.25)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.blur-\[100px\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur:blur(100px)}.blur-\[120px\]{--tw-blur:blur(120px)}.blur-\[120px\],.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(40px)}.backdrop-blur-2xl,.backdrop-blur-\[2px\]{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px)}.backdrop-blur-lg{--tw-backdrop-blur:blur(16px)}.backdrop-blur-lg,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-blur-xl{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur:blur(24px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.glass{border-width:1px;border-color:hsla(0,0%,100%,.08);--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:rgba(0,0,0,.4);--tw-shadow:var(--tw-shadow-colored);background:var(--bg-card);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:border-color .25s ease,box-shadow .25s ease,background .25s ease}html[data-theme=light] .glass{border-color:rgba(226,232,240,.9);--tw-shadow-color:rgba(148,163,184,.15);--tw-shadow:var(--tw-shadow-colored)}.section-title{font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:var(--text)}.section-lead{margin-top:.5rem}.meta-chip,.section-lead{font-size:.75rem;line-height:1rem;line-height:1.625;color:var(--muted)}.meta-chip{border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.22)}html[data-theme=light] .meta-chip{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.72);color:var(--muted)}.tab-strip{margin-left:-.25rem;margin-right:-.25rem;display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.375rem;padding-top:.125rem}@media (min-width:768px){.tab-strip{flex-wrap:wrap;overflow:visible}}.tab-strip{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.tab-btn{flex-shrink:0;scroll-snap-align:start;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.tab-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.tab-btn{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.12);background:rgba(0,0,0,.22);color:#cbd5e1}.tab-btn:hover{border-color:rgba(34,211,238,.25);color:#e2e8f0}.tab-btn-active{border-color:rgba(34,211,238,.45)!important;background:rgba(34,211,238,.12)!important;color:#cffafe!important}html[data-theme=light] .tab-btn{border-color:#e2e8f0;background:hsla(0,0%,100%,.75);color:#475569}html[data-theme=light] .tab-btn:hover{border-color:rgba(6,182,212,.45);color:#0f766e}html[data-theme=light] .tab-btn-active{border-color:rgba(6,182,212,.55)!important;background:rgba(207,250,254,.55)!important;color:#0e7490!important}.link-tile{display:block;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.link-tile:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.link-tile{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.2);color:#f1f5f9}.link-tile:hover{border-color:rgba(34,211,238,.35)}html[data-theme=light] .link-tile{border-color:#e2e8f0;background:hsla(0,0%,100%,.65);color:#1e293b}.link-tile-accent{border-color:rgba(34,211,238,.28);background:rgba(34,211,238,.1);color:#ecfeff}.link-tile-accent:hover{border-color:rgba(34,211,238,.55)}html[data-theme=light] .link-tile-accent{border-color:rgba(6,182,212,.35);background:rgba(207,250,254,.65);color:#0e7490}.link-tile-warn{border-color:rgba(251,191,36,.25);background:rgba(251,191,36,.1);color:#fefce8}html[data-theme=light] .link-tile-warn{border-color:rgba(251,191,36,.45);background:hsla(55,92%,95%,.9);color:#78350f}.service-card{border-radius:1.5rem;border-width:1px;padding:1.25rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2)}.service-card:hover{box-shadow:0 12px 40px -24px rgba(34,211,238,.35)}html[data-theme=light] .service-card{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.55)}.panel-inset{border-radius:1rem;border-width:1px;padding:1rem;font-size:.875rem;line-height:1.25rem;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2);color:#cbd5e1}html[data-theme=light] .panel-inset{border-color:rgba(226,232,240,.85);background:hsla(0,0%,100%,.5);color:#334155}.field-select{width:100%;border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-color:hsla(0,0%,100%,.12);background:rgba(2,6,23,.55);color:#f8fafc}html[data-theme=light] .field-select{border-color:#e2e8f0;background:hsla(0,0%,100%,.9);color:#0f172a}.btn-focus:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.btn-focus{--tw-ring-offset-color:var(--ring-offset)}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--bg-deep:#060912;--bg-card:rgba(16,22,36,.78);--accent:#22d3ee;--accent2:#a78bfa;--danger:#f43f5e;--ok:#34d399;--text:#e8edf7;--muted:#94a3b8;--ring-offset:#060912;color-scheme:dark}html[data-theme=light]{--bg-deep:#f1f5f9;--bg-card:hsla(0,0%,100%,.88);--text:#0f172a;--muted:#64748b;--ring-offset:#f1f5f9;color-scheme:light}html{scroll-behavior:smooth}body{color:var(--text);background:var(--bg-deep);min-height:100vh;font-family:var(--font-geist-sans),system-ui,sans-serif;overflow-x:hidden;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transition:background-color .35s ease,color .25s ease}*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px}::-webkit-scrollbar-track{background:transparent}.app-bg-layer{position:fixed;inset:0;z-index:-1;opacity:.92;pointer-events:none;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(34,211,238,.22),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(167,139,250,.18),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.12),transparent);transition:opacity .35s ease}html[data-theme=light] .app-bg-layer{opacity:.75;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(14,165,233,.12),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(139,92,246,.1),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.08),transparent)}html[data-theme=light] .chart-surface{border-color:rgba(15,23,42,.12)!important;background:hsla(0,0%,100%,.65)!important}::selection{background:rgba(34,211,238,.25)}.safe-pb-nav{padding-bottom:calc(5.5rem + env(safe-area-inset-bottom, 0px))}@media (min-width:768px){.safe-pb-nav{padding-bottom:4rem}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%)}}.animate-toast-in{animation:toast-in .35s ease-out both}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.65}}.animate-pulse-soft{animation:pulse-soft 2s ease-in-out infinite}.log-scroll{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}.log-scroll::-webkit-scrollbar{width:6px;height:6px}.log-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:6px}.portal-grid-bg{background-image:linear-gradient(hsla(0,0%,100%,.05) 1px,transparent 0),linear-gradient(90deg,hsla(0,0%,100%,.05) 1px,transparent 0);background-size:28px 28px}.lp-noise{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E")}.studio-scene-shell{perspective:800px}.studio-scene-shimmer{background:linear-gradient(105deg,transparent 40%,rgba(244,114,182,.12) 50%,transparent 60%);background-size:200% 100%;animation:studio-shimmer 1.8s ease-in-out infinite}@keyframes studio-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.studio-live-badge{animation:studio-live-glow 2.4s ease-in-out infinite}@keyframes studio-live-glow{0%,to{box-shadow:0 0 0 0 rgba(244,63,94,0)}50%{box-shadow:0 0 12px 2px rgba(244,63,94,.25)}}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.selection\:bg-violet-400\/25 ::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30 ::selection{background-color:rgba(139,92,246,.3)}.selection\:bg-violet-400\/25::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30::selection{background-color:rgba(139,92,246,.3)}.file\:mr-3::file-selector-button{margin-right:.75rem}.file\:rounded-md::file-selector-button{border-radius:.375rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-cyan-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.file\:bg-cyan-500\/15::file-selector-button{background-color:rgba(6,182,212,.15)}.file\:px-3::file-selector-button{padding-left:.75rem;padding-right:.75rem}.file\:py-1\.5::file-selector-button{padding-top:.375rem;padding-bottom:.375rem}.file\:text-xs::file-selector-button{font-size:.75rem;line-height:1rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-cyan-100::file-selector-button{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.file\:text-cyan-800::file-selector-button{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.hover\:-translate-y-0\.5:hover{--tw-translate-y:-0.125rem}.hover\:-translate-y-0\.5:hover,.hover\:-translate-y-px:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-px:hover{--tw-translate-y:-1px}.hover\:border-fuchsia-400\/35:hover{border-color:rgba(232,121,249,.35)}.hover\:border-violet-400\/20:hover{border-color:rgba(167,139,250,.2)}.hover\:border-violet-400\/30:hover{border-color:rgba(167,139,250,.3)}.hover\:border-white\/15:hover{border-color:hsla(0,0%,100%,.15)}.hover\:border-white\/20:hover{border-color:hsla(0,0%,100%,.2)}.hover\:bg-amber-500\/15:hover{background-color:rgba(245,158,11,.15)}.hover\:bg-amber-500\/20:hover{background-color:rgba(245,158,11,.2)}.hover\:bg-amber-500\/25:hover{background-color:rgba(245,158,11,.25)}.hover\:bg-black\/45:hover{background-color:rgba(0,0,0,.45)}.hover\:bg-black\/60:hover{background-color:rgba(0,0,0,.6)}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500\/15:hover{background-color:rgba(6,182,212,.15)}.hover\:bg-cyan-500\/25:hover{background-color:rgba(6,182,212,.25)}.hover\:bg-cyan-500\/30:hover{background-color:rgba(6,182,212,.3)}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500\/15:hover{background-color:rgba(16,185,129,.15)}.hover\:bg-emerald-500\/20:hover{background-color:rgba(16,185,129,.2)}.hover\:bg-emerald-500\/25:hover{background-color:rgba(16,185,129,.25)}.hover\:bg-fuchsia-500\/20:hover{background-color:rgba(217,70,239,.2)}.hover\:bg-rose-500\/15:hover{background-color:rgba(244,63,94,.15)}.hover\:bg-rose-500\/25:hover{background-color:rgba(244,63,94,.25)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200\/60:hover{background-color:rgba(226,232,240,.6)}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-500\/15:hover{background-color:rgba(139,92,246,.15)}.hover\:bg-violet-500\/20:hover{background-color:rgba(139,92,246,.2)}.hover\:bg-violet-500\/25:hover{background-color:rgba(139,92,246,.25)}.hover\:bg-violet-500\/30:hover{background-color:rgba(139,92,246,.3)}.hover\:bg-white\/10:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-white\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\:bg-white\/60:hover{background-color:hsla(0,0%,100%,.6)}.hover\:bg-white\/\[0\.03\]:hover{background-color:hsla(0,0%,100%,.03)}.hover\:bg-white\/\[0\.04\]:hover{background-color:hsla(0,0%,100%,.04)}.hover\:bg-white\/\[0\.06\]:hover{background-color:hsla(0,0%,100%,.06)}.hover\:bg-white\/\[0\.07\]:hover{background-color:hsla(0,0%,100%,.07)}.hover\:bg-white\/\[0\.08\]:hover{background-color:hsla(0,0%,100%,.08)}.hover\:bg-white\/\[0\.1\]:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-zinc-500\/25:hover{background-color:hsla(240,4%,46%,.25)}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:ring-violet-400\/50:hover{--tw-ring-color:rgba(167,139,250,.5)}.hover\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-amber-400:focus{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.focus\:border-amber-400\/60:focus{border-color:rgba(251,191,36,.6)}.focus\:border-cyan-400:focus{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.focus\:border-cyan-400\/60:focus{border-color:rgba(34,211,238,.6)}.focus\:border-indigo-400:focus{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.focus\:border-indigo-400\/60:focus{border-color:rgba(129,140,248,.6)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-emerald-500\/50:focus-visible{--tw-ring-color:rgba(16,185,129,.5)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[14rem_minmax\(0\2c 1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.sm\:grid-cols-\[minmax\(0\2c 1fr\)_7rem\]{grid-template-columns:minmax(0,1fr) 7rem}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:p-5{padding:1.25rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\:bottom-6{bottom:1.5rem}.md\:hidden{display:none}.md\:h-56{height:14rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[12rem_minmax\(0\2c 1fr\)\]{grid-template-columns:12rem minmax(0,1fr)}.md\:grid-cols-\[8rem_1fr\]{grid-template-columns:8rem 1fr}.md\:grid-cols-\[minmax\(0\2c 1fr\)_6rem_14rem\]{grid-template-columns:minmax(0,1fr) 6rem 14rem}.md\:grid-cols-\[minmax\(0\2c 1fr\)_8rem_7rem_7rem\]{grid-template-columns:minmax(0,1fr) 8rem 7rem 7rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_8rem\]{grid-template-columns:minmax(0,1fr) 8rem}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-top:2rem;padding-bottom:2rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:col-span-1{grid-column:span 1/span 1}.xl\:col-span-12{grid-column:span 12/span 12}.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:max-h-\[min\(24rem\2c 50vh\)\]{max-height:min(24rem,50vh)}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[0\.95fr\2c 1\.05fr\]{grid-template-columns:.95fr 1.05fr}.xl\:grid-cols-\[1\.1fr_0\.9fr\]{grid-template-columns:1.1fr .9fr}.xl\:grid-cols-\[18rem\2c 1fr\]{grid-template-columns:18rem 1fr}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(20rem\2c 0\.8fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(20rem,.8fr)}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(25rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(25rem,.9fr)}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(22rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1fr) minmax(22rem,.9fr)}.xl\:items-stretch{align-items:stretch}}@media (min-width:1536px){.\32xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-cyan-600\/25{border-color:rgba(8,145,178,.25)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-slate-200\/60{border-color:rgba(226,232,240,.6)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/90{background-color:hsla(0,0%,100%,.9)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/95{background-color:hsla(0,0%,100%,.95)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))} \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/css/f72551e7a5dadbbb.css b/d2ypp2/web-console/out/_next/static/css/f72551e7a5dadbbb.css deleted file mode 100644 index f3800a2..0000000 --- a/d2ypp2/web-console/out/_next/static/css/f72551e7a5dadbbb.css +++ /dev/null @@ -1,3 +0,0 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* -! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com -*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-10{bottom:-2.5rem}.-left-1\/4{left:-25%}.-right-0\.5{right:-.125rem}.-right-20{right:-5rem}.-right-8{right:-2rem}.-top-0\.5{top:-.125rem}.-top-20{top:-5rem}.-top-8{top:-2rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-24{bottom:6rem}.bottom-3{bottom:.75rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-1\/3{left:33.333333%}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-2\.5{top:.625rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-3{-webkit-line-clamp:3}.line-clamp-3,.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-4{-webkit-line-clamp:4}.line-clamp-6{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[168px\]{height:168px}.h-\[248px\]{height:248px}.h-\[30rem\]{height:30rem}.h-\[36rem\]{height:36rem}.h-\[42rem\]{height:42rem}.h-\[min\(72vh\2c 40rem\)\]{height:min(72vh,40rem)}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[28rem\]{max-height:28rem}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(22rem\2c 42vh\)\]{max-height:min(22rem,42vh)}.max-h-\[min\(24rem\2c 55vh\)\]{max-height:min(24rem,55vh)}.max-h-\[min\(70vh\2c 48rem\)\]{max-height:min(70vh,48rem)}.max-h-\[min\(72vh\2c 680px\)\]{max-height:min(72vh,680px)}.max-h-\[min\(78vh\2c 56rem\)\]{max-height:min(78vh,56rem)}.max-h-\[min\(78vh\2c 720px\)\]{max-height:min(78vh,720px)}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-24{min-height:6rem}.min-h-56{min-height:14rem}.min-h-\[100px\]{min-height:100px}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[160px\]{min-height:160px}.min-h-\[18rem\]{min-height:18rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[2\.75rem\]{min-height:2.75rem}.min-h-\[200px\]{min-height:200px}.min-h-\[22rem\]{min-height:22rem}.min-h-\[24rem\]{min-height:24rem}.min-h-\[280px\]{min-height:280px}.min-h-\[2rem\]{min-height:2rem}.min-h-\[32rem\]{min-height:32rem}.min-h-\[3rem\]{min-height:3rem}.min-h-\[4rem\]{min-height:4rem}.min-h-\[6rem\]{min-height:6rem}.min-h-\[72px\]{min-height:72px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[36rem\]{width:36rem}.w-\[42rem\]{width:42rem}.w-\[min\(88vw\2c 280px\)\]{width:min(88vw,280px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-\[1rem\]{min-width:1rem}.min-w-\[3\.75rem\]{min-width:3.75rem}.min-w-\[6rem\]{min-width:6rem}.min-w-\[7rem\]{min-width:7rem}.min-w-\[9rem\]{min-width:9rem}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[14rem\]{max-width:14rem}.max-w-\[min\(92vw\2c 28rem\)\]{max-width:min(92vw,28rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-center{transform-origin:center}.-translate-x-1\/2{--tw-translate-x:-50%}.-rotate-90,.-translate-x-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/\[0\.06\]>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.06)}.self-start{align-self:flex-start}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.35rem\]{border-radius:1.35rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-400\/20{border-color:rgba(251,191,36,.2)}.border-amber-400\/50{border-color:rgba(251,191,36,.5)}.border-amber-500\/15{border-color:rgba(245,158,11,.15)}.border-amber-500\/20{border-color:rgba(245,158,11,.2)}.border-amber-500\/25{border-color:rgba(245,158,11,.25)}.border-amber-500\/30{border-color:rgba(245,158,11,.3)}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-200\/70{border-color:rgba(165,243,252,.7)}.border-cyan-200\/90{border-color:rgba(165,243,252,.9)}.border-cyan-400\/15{border-color:rgba(34,211,238,.15)}.border-cyan-400\/20{border-color:rgba(34,211,238,.2)}.border-cyan-400\/50{border-color:rgba(34,211,238,.5)}.border-cyan-500\/15{border-color:rgba(6,182,212,.15)}.border-cyan-500\/20{border-color:rgba(6,182,212,.2)}.border-cyan-500\/25{border-color:rgba(6,182,212,.25)}.border-cyan-500\/30{border-color:rgba(6,182,212,.3)}.border-cyan-500\/40{border-color:rgba(6,182,212,.4)}.border-cyan-500\/50{border-color:rgba(6,182,212,.5)}.border-emerald-400\/30{border-color:rgba(52,211,153,.3)}.border-emerald-500\/15{border-color:rgba(16,185,129,.15)}.border-emerald-500\/20{border-color:rgba(16,185,129,.2)}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/30{border-color:rgba(16,185,129,.3)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-fuchsia-200\/80{border-color:rgba(245,208,254,.8)}.border-fuchsia-400\/20{border-color:rgba(232,121,249,.2)}.border-fuchsia-400\/30{border-color:rgba(232,121,249,.3)}.border-fuchsia-500\/20{border-color:rgba(217,70,239,.2)}.border-fuchsia-500\/30{border-color:rgba(217,70,239,.3)}.border-indigo-400\/50{border-color:rgba(129,140,248,.5)}.border-rose-500\/15{border-color:rgba(244,63,94,.15)}.border-rose-500\/20{border-color:rgba(244,63,94,.2)}.border-rose-500\/25{border-color:rgba(244,63,94,.25)}.border-rose-500\/30{border-color:rgba(244,63,94,.3)}.border-sky-200\/80{border-color:rgba(186,230,253,.8)}.border-sky-400\/15{border-color:rgba(56,189,248,.15)}.border-sky-400\/20{border-color:rgba(56,189,248,.2)}.border-sky-500\/20{border-color:rgba(14,165,233,.2)}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-200\/80{border-color:rgba(226,232,240,.8)}.border-slate-200\/90{border-color:rgba(226,232,240,.9)}.border-slate-500\/30{border-color:rgba(100,116,139,.3)}.border-slate-700\/30{border-color:rgba(51,65,85,.3)}.border-violet-200\/70{border-color:rgba(221,214,254,.7)}.border-violet-200\/80{border-color:rgba(221,214,254,.8)}.border-violet-200\/90{border-color:rgba(221,214,254,.9)}.border-violet-500\/15{border-color:rgba(139,92,246,.15)}.border-violet-500\/20{border-color:rgba(139,92,246,.2)}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-500\/30{border-color:rgba(139,92,246,.3)}.border-violet-500\/35{border-color:rgba(139,92,246,.35)}.border-violet-500\/45{border-color:rgba(139,92,246,.45)}.border-violet-500\/50{border-color:rgba(139,92,246,.5)}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/15{border-color:hsla(0,0%,100%,.15)}.border-white\/20{border-color:hsla(0,0%,100%,.2)}.border-white\/5{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.04\]{border-color:hsla(0,0%,100%,.04)}.border-white\/\[0\.05\]{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.06\]{border-color:hsla(0,0%,100%,.06)}.border-white\/\[0\.07\]{border-color:hsla(0,0%,100%,.07)}.border-white\/\[0\.08\]{border-color:hsla(0,0%,100%,.08)}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.bg-\[\#050508\]{--tw-bg-opacity:1;background-color:rgb(5 5 8/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgba(245,158,11,.1)}.bg-amber-500\/15{background-color:rgba(245,158,11,.15)}.bg-amber-500\/20{background-color:rgba(245,158,11,.2)}.bg-amber-500\/5{background-color:rgba(245,158,11,.05)}.bg-amber-500\/\[0\.06\]{background-color:rgba(245,158,11,.06)}.bg-amber-500\/\[0\.08\]{background-color:rgba(245,158,11,.08)}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/10{background-color:rgba(0,0,0,.1)}.bg-black\/20{background-color:rgba(0,0,0,.2)}.bg-black\/25{background-color:rgba(0,0,0,.25)}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-black\/35{background-color:rgba(0,0,0,.35)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/45{background-color:rgba(0,0,0,.45)}.bg-black\/5{background-color:rgba(0,0,0,.05)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-black\/55{background-color:rgba(0,0,0,.55)}.bg-black\/60{background-color:rgba(0,0,0,.6)}.bg-black\/70{background-color:rgba(0,0,0,.7)}.bg-black\/75{background-color:rgba(0,0,0,.75)}.bg-black\/80{background-color:rgba(0,0,0,.8)}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-400\/10{background-color:rgba(34,211,238,.1)}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500\/10{background-color:rgba(6,182,212,.1)}.bg-cyan-500\/15{background-color:rgba(6,182,212,.15)}.bg-cyan-500\/20{background-color:rgba(6,182,212,.2)}.bg-cyan-500\/25{background-color:rgba(6,182,212,.25)}.bg-cyan-500\/30{background-color:rgba(6,182,212,.3)}.bg-cyan-500\/90{background-color:rgba(6,182,212,.9)}.bg-cyan-500\/\[0\.05\]{background-color:rgba(6,182,212,.05)}.bg-cyan-500\/\[0\.06\]{background-color:rgba(6,182,212,.06)}.bg-cyan-500\/\[0\.08\]{background-color:rgba(6,182,212,.08)}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-600\/80{background-color:rgba(8,145,178,.8)}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgba(16,185,129,.1)}.bg-emerald-500\/15{background-color:rgba(16,185,129,.15)}.bg-emerald-500\/20{background-color:rgba(16,185,129,.2)}.bg-emerald-500\/90{background-color:rgba(16,185,129,.9)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-fuchsia-500\/10{background-color:rgba(217,70,239,.1)}.bg-fuchsia-500\/15{background-color:rgba(217,70,239,.15)}.bg-fuchsia-500\/20{background-color:rgba(217,70,239,.2)}.bg-indigo-500\/15{background-color:rgba(99,102,241,.15)}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-500\/10{background-color:rgba(244,63,94,.1)}.bg-rose-500\/15{background-color:rgba(244,63,94,.15)}.bg-rose-500\/20{background-color:rgba(244,63,94,.2)}.bg-rose-500\/\[0\.10\]{background-color:rgba(244,63,94,.1)}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-950\/20{background-color:rgba(76,5,25,.2)}.bg-rose-950\/25{background-color:rgba(76,5,25,.25)}.bg-sky-500\/10{background-color:rgba(14,165,233,.1)}.bg-sky-500\/15{background-color:rgba(14,165,233,.15)}.bg-sky-500\/25{background-color:rgba(14,165,233,.25)}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200\/70{background-color:rgba(226,232,240,.7)}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-50\/80{background-color:rgba(248,250,252,.8)}.bg-slate-500\/10{background-color:rgba(100,116,139,.1)}.bg-slate-500\/15{background-color:rgba(100,116,139,.15)}.bg-slate-800\/50{background-color:rgba(30,41,59,.5)}.bg-slate-950\/30{background-color:rgba(2,6,23,.3)}.bg-slate-950\/50{background-color:rgba(2,6,23,.5)}.bg-slate-950\/60{background-color:rgba(2,6,23,.6)}.bg-slate-950\/80{background-color:rgba(2,6,23,.8)}.bg-slate-950\/95{background-color:rgba(2,6,23,.95)}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-100\/90{background-color:rgba(237,233,254,.9)}.bg-violet-400\/15{background-color:rgba(167,139,250,.15)}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500\/10{background-color:rgba(139,92,246,.1)}.bg-violet-500\/15{background-color:rgba(139,92,246,.15)}.bg-violet-500\/20{background-color:rgba(139,92,246,.2)}.bg-violet-500\/25{background-color:rgba(139,92,246,.25)}.bg-violet-500\/\[0\.06\]{background-color:rgba(139,92,246,.06)}.bg-violet-500\/\[0\.1\]{background-color:rgba(139,92,246,.1)}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-600\/20{background-color:rgba(124,58,237,.2)}.bg-violet-600\/70{background-color:rgba(124,58,237,.7)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-white\/70{background-color:hsla(0,0%,100%,.7)}.bg-white\/75{background-color:hsla(0,0%,100%,.75)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-white\/85{background-color:hsla(0,0%,100%,.85)}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.bg-white\/\[0\.035\]{background-color:hsla(0,0%,100%,.035)}.bg-white\/\[0\.03\]{background-color:hsla(0,0%,100%,.03)}.bg-white\/\[0\.04\]{background-color:hsla(0,0%,100%,.04)}.bg-white\/\[0\.05\]{background-color:hsla(0,0%,100%,.05)}.bg-white\/\[0\.06\]{background-color:hsla(0,0%,100%,.06)}.bg-white\/\[0\.08\]{background-color:hsla(0,0%,100%,.08)}.bg-zinc-500\/15{background-color:hsla(240,4%,46%,.15)}.bg-zinc-600\/20{background-color:rgba(82,82,91,.2)}.bg-zinc-600\/30{background-color:rgba(82,82,91,.3)}.bg-zinc-700\/40{background-color:rgba(63,63,70,.4)}.bg-zinc-700\/90{background-color:rgba(63,63,70,.9)}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-zinc-950\/35{background-color:rgba(9,9,11,.35)}.bg-zinc-950\/40{background-color:rgba(9,9,11,.4)}.bg-zinc-950\/50{background-color:rgba(9,9,11,.5)}.bg-zinc-950\/55{background-color:rgba(9,9,11,.55)}.bg-zinc-950\/60{background-color:rgba(9,9,11,.6)}.bg-zinc-950\/70{background-color:rgba(9,9,11,.7)}.bg-zinc-950\/80{background-color:rgba(9,9,11,.8)}.bg-zinc-950\/90{background-color:rgba(9,9,11,.9)}.bg-zinc-950\/95{background-color:rgba(9,9,11,.95)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:#fbbf24 var(--tw-gradient-from-position);--tw-gradient-to:rgba(251,191,36,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-50\/90{--tw-gradient-from:rgba(255,251,235,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(255,251,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/20{--tw-gradient-from:rgba(245,158,11,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/35{--tw-gradient-from:rgba(245,158,11,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.07\]{--tw-gradient-from:rgba(245,158,11,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.12\]{--tw-gradient-from:rgba(245,158,11,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from:rgba(6,182,212,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/35{--tw-gradient-from:rgba(6,182,212,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.08\]{--tw-gradient-from:rgba(6,182,212,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.14\]{--tw-gradient-from:rgba(6,182,212,.14) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.1\]{--tw-gradient-from:rgba(6,182,212,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400{--tw-gradient-from:#34d399 var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400\/30{--tw-gradient-from:rgba(52,211,153,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/20{--tw-gradient-from:rgba(16,185,129,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.07\]{--tw-gradient-from:rgba(16,185,129,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.08\]{--tw-gradient-from:rgba(16,185,129,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.12\]{--tw-gradient-from:rgba(16,185,129,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-50\/90{--tw-gradient-from:rgba(253,244,255,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(253,244,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/10{--tw-gradient-from:rgba(217,70,239,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/20{--tw-gradient-from:rgba(217,70,239,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-950\/40{--tw-gradient-from:rgba(74,4,78,.4) var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,4,78,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-indigo-500\/20{--tw-gradient-from:rgba(99,102,241,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(99,102,241,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500\/25{--tw-gradient-from:rgba(236,72,153,.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500\/30{--tw-gradient-from:rgba(239,68,68,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-rose-500\/20{--tw-gradient-from:rgba(244,63,94,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(244,63,94,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-500\/\[0\.08\]{--tw-gradient-from:rgba(14,165,233,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(14,165,233,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-50{--tw-gradient-from:#f5f3ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,243,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from:#8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from:rgba(139,92,246,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/20{--tw-gradient-from:rgba(139,92,246,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.08\]{--tw-gradient-from:rgba(139,92,246,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.12\]{--tw-gradient-from:rgba(139,92,246,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-600\/10{--tw-gradient-from:rgba(124,58,237,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(124,58,237,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.05\]{--tw-gradient-from:hsla(0,0%,100%,.05) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.06\]{--tw-gradient-from:hsla(0,0%,100%,.06) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-zinc-950\/95{--tw-gradient-from:rgba(9,9,11,.95) var(--tw-gradient-from-position);--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/25{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(0,0,0,.25) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),transparent var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-white{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/40{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.4) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/50{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.5) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/60{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.6) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/90{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.9) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-black\/40{--tw-gradient-to:rgba(0,0,0,.4) var(--tw-gradient-to-position)}.to-blue-500{--tw-gradient-to:#3b82f6 var(--tw-gradient-to-position)}.to-cyan-400{--tw-gradient-to:#22d3ee var(--tw-gradient-to-position)}.to-cyan-50{--tw-gradient-to:#ecfeff var(--tw-gradient-to-position)}.to-cyan-50\/70{--tw-gradient-to:rgba(236,254,255,.7) var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to:rgba(6,182,212,.1) var(--tw-gradient-to-position)}.to-cyan-500\/5{--tw-gradient-to:rgba(6,182,212,.05) var(--tw-gradient-to-position)}.to-cyan-500\/\[0\.06\]{--tw-gradient-to:rgba(6,182,212,.06) var(--tw-gradient-to-position)}.to-cyan-950\/20{--tw-gradient-to:rgba(8,51,68,.2) var(--tw-gradient-to-position)}.to-emerald-500\/\[0\.05\]{--tw-gradient-to:rgba(16,185,129,.05) var(--tw-gradient-to-position)}.to-fuchsia-50\/80{--tw-gradient-to:rgba(253,244,255,.8) var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to:#d946ef var(--tw-gradient-to-position)}.to-fuchsia-500\/10{--tw-gradient-to:rgba(217,70,239,.1) var(--tw-gradient-to-position)}.to-fuchsia-500\/5{--tw-gradient-to:rgba(217,70,239,.05) var(--tw-gradient-to-position)}.to-fuchsia-600\/25{--tw-gradient-to:rgba(192,38,211,.25) var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to:#f97316 var(--tw-gradient-to-position)}.to-orange-500\/10{--tw-gradient-to:rgba(249,115,22,.1) var(--tw-gradient-to-position)}.to-pink-500\/10{--tw-gradient-to:rgba(236,72,153,.1) var(--tw-gradient-to-position)}.to-rose-500\/10{--tw-gradient-to:rgba(244,63,94,.1) var(--tw-gradient-to-position)}.to-sky-500\/10{--tw-gradient-to:rgba(14,165,233,.1) var(--tw-gradient-to-position)}.to-slate-50{--tw-gradient-to:#f8fafc var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.to-teal-500\/10{--tw-gradient-to:rgba(20,184,166,.1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to:rgba(139,92,246,.1) var(--tw-gradient-to-position)}.to-violet-500\/25{--tw-gradient-to:rgba(139,92,246,.25) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.06\]{--tw-gradient-to:rgba(139,92,246,.06) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.08\]{--tw-gradient-to:rgba(139,92,246,.08) var(--tw-gradient-to-position)}.to-violet-600\/25{--tw-gradient-to:rgba(124,58,237,.25) var(--tw-gradient-to-position)}.to-violet-600\/30{--tw-gradient-to:rgba(124,58,237,.3) var(--tw-gradient-to-position)}.to-zinc-900\/90{--tw-gradient-to:rgba(24,24,27,.9) var(--tw-gradient-to-position)}.to-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,.8) var(--tw-gradient-to-position)}.fill-zinc-400{fill:#a1a1aa}.stroke-amber-400{stroke:#fbbf24}.stroke-cyan-400{stroke:#22d3ee}.stroke-rose-400{stroke:#fb7185}.stroke-white\/10{stroke:hsla(0,0%,100%,.1)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-5{padding-left:1.25rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-3{padding-right:.75rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[color\:var\(--text\)\]{color:var(--text)}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-100\/80{color:hsla(48,96%,89%,.8)}.text-amber-100\/85{color:hsla(48,96%,89%,.85)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-200\/80{color:hsla(48,97%,77%,.8)}.text-amber-200\/85{color:hsla(48,97%,77%,.85)}.text-amber-200\/90{color:hsla(48,97%,77%,.9)}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-300\/80{color:rgba(252,211,77,.8)}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-400\/95{color:rgba(251,191,36,.95)}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-100\/75{color:rgba(207,250,254,.75)}.text-cyan-100\/90{color:rgba(207,250,254,.9)}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-200\/90{color:rgba(165,243,252,.9)}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-300\/70{color:rgba(103,232,249,.7)}.text-cyan-300\/80{color:rgba(103,232,249,.8)}.text-cyan-300\/90{color:rgba(103,232,249,.9)}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-400\/90{color:rgba(34,211,238,.9)}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-100\/95{color:rgba(209,250,229,.95)}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-200\/90{color:rgba(167,243,208,.9)}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-300\/90{color:rgba(110,231,183,.9)}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-400\/80{color:rgba(52,211,153,.8)}.text-emerald-400\/90{color:rgba(52,211,153,.9)}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200\/80{color:rgba(245,208,254,.8)}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-300\/70{color:rgba(240,171,252,.7)}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-100\/95{color:rgba(255,228,230,.95)}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400\/90{color:rgba(251,113,133,.9)}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-100\/80{color:rgba(224,242,254,.8)}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-300{--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-sky-700{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-300\/90{color:rgba(203,213,225,.9)}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-300\/80{color:rgba(196,181,253,.8)}.text-violet-300\/90{color:rgba(196,181,253,.9)}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-400\/90{color:rgba(167,139,250,.9)}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/70{color:hsla(0,0%,100%,.7)}.text-white\/80{color:hsla(0,0%,100%,.8)}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-200\/90{color:hsla(240,6%,90%,.9)}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-violet-500{accent-color:#8b5cf6}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-\[0\.06\]{opacity:.06}.opacity-\[0\.22\]{opacity:.22}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-black\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/30{--tw-shadow-color:rgba(0,0,0,.3);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/50{--tw-shadow-color:rgba(0,0,0,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/80{--tw-shadow-color:rgba(0,0,0,.8);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-100\/50{--tw-shadow-color:rgba(207,250,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-900\/10{--tw-shadow-color:rgba(22,78,99,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-emerald-900\/20{--tw-shadow-color:rgba(6,78,59,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-sky-100\/40{--tw-shadow-color:rgba(224,242,254,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-200\/40{--tw-shadow-color:rgba(226,232,240,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-200\/50{--tw-shadow-color:rgba(221,214,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-500\/25{--tw-shadow-color:rgba(139,92,246,.25);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-900\/10{--tw-shadow-color:rgba(76,29,149,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-white\/5{--tw-shadow-color:hsla(0,0%,100%,.05);--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-400\/25{--tw-ring-color:rgba(251,191,36,.25)}.ring-amber-400\/30{--tw-ring-color:rgba(251,191,36,.3)}.ring-amber-500\/20{--tw-ring-color:rgba(245,158,11,.2)}.ring-amber-500\/25{--tw-ring-color:rgba(245,158,11,.25)}.ring-amber-500\/30{--tw-ring-color:rgba(245,158,11,.3)}.ring-amber-500\/35{--tw-ring-color:rgba(245,158,11,.35)}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-400\/20{--tw-ring-color:rgba(34,211,238,.2)}.ring-cyan-400\/25{--tw-ring-color:rgba(34,211,238,.25)}.ring-cyan-400\/30{--tw-ring-color:rgba(34,211,238,.3)}.ring-cyan-400\/35{--tw-ring-color:rgba(34,211,238,.35)}.ring-cyan-500\/10{--tw-ring-color:rgba(6,182,212,.1)}.ring-cyan-500\/20{--tw-ring-color:rgba(6,182,212,.2)}.ring-cyan-500\/25{--tw-ring-color:rgba(6,182,212,.25)}.ring-cyan-500\/30{--tw-ring-color:rgba(6,182,212,.3)}.ring-cyan-500\/35{--tw-ring-color:rgba(6,182,212,.35)}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-400\/25{--tw-ring-color:rgba(52,211,153,.25)}.ring-emerald-400\/30{--tw-ring-color:rgba(52,211,153,.3)}.ring-emerald-500\/20{--tw-ring-color:rgba(16,185,129,.2)}.ring-emerald-500\/25{--tw-ring-color:rgba(16,185,129,.25)}.ring-emerald-500\/30{--tw-ring-color:rgba(16,185,129,.3)}.ring-fuchsia-500\/25{--tw-ring-color:rgba(217,70,239,.25)}.ring-fuchsia-500\/35{--tw-ring-color:rgba(217,70,239,.35)}.ring-indigo-400\/30{--tw-ring-color:rgba(129,140,248,.3)}.ring-indigo-500\/25{--tw-ring-color:rgba(99,102,241,.25)}.ring-rose-400\/25{--tw-ring-color:rgba(251,113,133,.25)}.ring-rose-400\/40{--tw-ring-color:rgba(251,113,133,.4)}.ring-rose-500\/15{--tw-ring-color:rgba(244,63,94,.15)}.ring-rose-500\/25{--tw-ring-color:rgba(244,63,94,.25)}.ring-rose-500\/30{--tw-ring-color:rgba(244,63,94,.3)}.ring-rose-500\/35{--tw-ring-color:rgba(244,63,94,.35)}.ring-sky-400\/30{--tw-ring-color:rgba(56,189,248,.3)}.ring-sky-400\/40{--tw-ring-color:rgba(56,189,248,.4)}.ring-sky-500\/25{--tw-ring-color:rgba(14,165,233,.25)}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-500\/30{--tw-ring-color:rgba(100,116,139,.3)}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-400\/25{--tw-ring-color:rgba(167,139,250,.25)}.ring-violet-400\/35{--tw-ring-color:rgba(167,139,250,.35)}.ring-violet-400\/40{--tw-ring-color:rgba(167,139,250,.4)}.ring-violet-500\/20{--tw-ring-color:rgba(139,92,246,.2)}.ring-violet-500\/25{--tw-ring-color:rgba(139,92,246,.25)}.ring-violet-500\/30{--tw-ring-color:rgba(139,92,246,.3)}.ring-violet-500\/35{--tw-ring-color:rgba(139,92,246,.35)}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-white\/\[0\.03\]{--tw-ring-color:hsla(0,0%,100%,.03)}.ring-white\/\[0\.04\]{--tw-ring-color:hsla(0,0%,100%,.04)}.ring-white\/\[0\.05\]{--tw-ring-color:hsla(0,0%,100%,.05)}.ring-white\/\[0\.06\]{--tw-ring-color:hsla(0,0%,100%,.06)}.ring-zinc-500\/25{--tw-ring-color:hsla(240,4%,46%,.25)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.blur-\[100px\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur:blur(100px)}.blur-\[120px\]{--tw-blur:blur(120px)}.blur-\[120px\],.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(40px)}.backdrop-blur-2xl,.backdrop-blur-\[2px\]{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px)}.backdrop-blur-lg{--tw-backdrop-blur:blur(16px)}.backdrop-blur-lg,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-blur-xl{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur:blur(24px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.glass{border-width:1px;border-color:hsla(0,0%,100%,.08);--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:rgba(0,0,0,.4);--tw-shadow:var(--tw-shadow-colored);background:var(--bg-card);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:border-color .25s ease,box-shadow .25s ease,background .25s ease}html[data-theme=light] .glass{border-color:rgba(226,232,240,.9);--tw-shadow-color:rgba(148,163,184,.15);--tw-shadow:var(--tw-shadow-colored)}.section-title{font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:var(--text)}.section-lead{margin-top:.5rem}.meta-chip,.section-lead{font-size:.75rem;line-height:1rem;line-height:1.625;color:var(--muted)}.meta-chip{border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.22)}html[data-theme=light] .meta-chip{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.72);color:var(--muted)}.tab-strip{margin-left:-.25rem;margin-right:-.25rem;display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.375rem;padding-top:.125rem}@media (min-width:768px){.tab-strip{flex-wrap:wrap;overflow:visible}}.tab-strip{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.tab-btn{flex-shrink:0;scroll-snap-align:start;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.tab-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.tab-btn{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.12);background:rgba(0,0,0,.22);color:#cbd5e1}.tab-btn:hover{border-color:rgba(34,211,238,.25);color:#e2e8f0}.tab-btn-active{border-color:rgba(34,211,238,.45)!important;background:rgba(34,211,238,.12)!important;color:#cffafe!important}html[data-theme=light] .tab-btn{border-color:#e2e8f0;background:hsla(0,0%,100%,.75);color:#475569}html[data-theme=light] .tab-btn:hover{border-color:rgba(6,182,212,.45);color:#0f766e}html[data-theme=light] .tab-btn-active{border-color:rgba(6,182,212,.55)!important;background:rgba(207,250,254,.55)!important;color:#0e7490!important}.link-tile{display:block;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.link-tile:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.link-tile{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.2);color:#f1f5f9}.link-tile:hover{border-color:rgba(34,211,238,.35)}html[data-theme=light] .link-tile{border-color:#e2e8f0;background:hsla(0,0%,100%,.65);color:#1e293b}.link-tile-accent{border-color:rgba(34,211,238,.28);background:rgba(34,211,238,.1);color:#ecfeff}.link-tile-accent:hover{border-color:rgba(34,211,238,.55)}html[data-theme=light] .link-tile-accent{border-color:rgba(6,182,212,.35);background:rgba(207,250,254,.65);color:#0e7490}.link-tile-warn{border-color:rgba(251,191,36,.25);background:rgba(251,191,36,.1);color:#fefce8}html[data-theme=light] .link-tile-warn{border-color:rgba(251,191,36,.45);background:hsla(55,92%,95%,.9);color:#78350f}.service-card{border-radius:1.5rem;border-width:1px;padding:1.25rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2)}.service-card:hover{box-shadow:0 12px 40px -24px rgba(34,211,238,.35)}html[data-theme=light] .service-card{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.55)}.panel-inset{border-radius:1rem;border-width:1px;padding:1rem;font-size:.875rem;line-height:1.25rem;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2);color:#cbd5e1}html[data-theme=light] .panel-inset{border-color:rgba(226,232,240,.85);background:hsla(0,0%,100%,.5);color:#334155}.field-select{width:100%;border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-color:hsla(0,0%,100%,.12);background:rgba(2,6,23,.55);color:#f8fafc}html[data-theme=light] .field-select{border-color:#e2e8f0;background:hsla(0,0%,100%,.9);color:#0f172a}.btn-focus:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.btn-focus{--tw-ring-offset-color:var(--ring-offset)}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--bg-deep:#060912;--bg-card:rgba(16,22,36,.78);--accent:#22d3ee;--accent2:#a78bfa;--danger:#f43f5e;--ok:#34d399;--text:#e8edf7;--muted:#94a3b8;--ring-offset:#060912;color-scheme:dark}html[data-theme=light]{--bg-deep:#f1f5f9;--bg-card:hsla(0,0%,100%,.88);--text:#0f172a;--muted:#64748b;--ring-offset:#f1f5f9;color-scheme:light}html{scroll-behavior:smooth}body{color:var(--text);background:var(--bg-deep);min-height:100vh;font-family:var(--font-geist-sans),system-ui,sans-serif;overflow-x:hidden;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transition:background-color .35s ease,color .25s ease}*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px}::-webkit-scrollbar-track{background:transparent}.app-bg-layer{position:fixed;inset:0;z-index:-1;opacity:.92;pointer-events:none;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(34,211,238,.22),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(167,139,250,.18),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.12),transparent);transition:opacity .35s ease}html[data-theme=light] .app-bg-layer{opacity:.75;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(14,165,233,.12),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(139,92,246,.1),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.08),transparent)}html[data-theme=light] .chart-surface{border-color:rgba(15,23,42,.12)!important;background:hsla(0,0%,100%,.65)!important}::selection{background:rgba(34,211,238,.25)}.safe-pb-nav{padding-bottom:calc(5.5rem + env(safe-area-inset-bottom, 0px))}@media (min-width:768px){.safe-pb-nav{padding-bottom:4rem}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%)}}.animate-toast-in{animation:toast-in .35s ease-out both}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.65}}.animate-pulse-soft{animation:pulse-soft 2s ease-in-out infinite}.log-scroll{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}.log-scroll::-webkit-scrollbar{width:6px;height:6px}.log-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:6px}.portal-grid-bg{background-image:linear-gradient(hsla(0,0%,100%,.05) 1px,transparent 0),linear-gradient(90deg,hsla(0,0%,100%,.05) 1px,transparent 0);background-size:28px 28px}.lp-noise{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E")}.studio-scene-shell{perspective:800px}.studio-scene-shimmer{background:linear-gradient(105deg,transparent 40%,rgba(244,114,182,.12) 50%,transparent 60%);background-size:200% 100%;animation:studio-shimmer 1.8s ease-in-out infinite}@keyframes studio-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.studio-live-badge{animation:studio-live-glow 2.4s ease-in-out infinite}@keyframes studio-live-glow{0%,to{box-shadow:0 0 0 0 rgba(244,63,94,0)}50%{box-shadow:0 0 12px 2px rgba(244,63,94,.25)}}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.selection\:bg-violet-400\/25 ::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30 ::selection{background-color:rgba(139,92,246,.3)}.selection\:bg-violet-400\/25::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30::selection{background-color:rgba(139,92,246,.3)}.file\:mr-3::file-selector-button{margin-right:.75rem}.file\:rounded-md::file-selector-button{border-radius:.375rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-cyan-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.file\:bg-cyan-500\/15::file-selector-button{background-color:rgba(6,182,212,.15)}.file\:px-3::file-selector-button{padding-left:.75rem;padding-right:.75rem}.file\:py-1\.5::file-selector-button{padding-top:.375rem;padding-bottom:.375rem}.file\:text-xs::file-selector-button{font-size:.75rem;line-height:1rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-cyan-100::file-selector-button{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.file\:text-cyan-800::file-selector-button{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.hover\:-translate-y-0\.5:hover{--tw-translate-y:-0.125rem}.hover\:-translate-y-0\.5:hover,.hover\:-translate-y-px:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-px:hover{--tw-translate-y:-1px}.hover\:border-fuchsia-400\/35:hover{border-color:rgba(232,121,249,.35)}.hover\:border-violet-400\/20:hover{border-color:rgba(167,139,250,.2)}.hover\:border-violet-400\/30:hover{border-color:rgba(167,139,250,.3)}.hover\:border-white\/15:hover{border-color:hsla(0,0%,100%,.15)}.hover\:border-white\/20:hover{border-color:hsla(0,0%,100%,.2)}.hover\:bg-amber-500\/15:hover{background-color:rgba(245,158,11,.15)}.hover\:bg-amber-500\/20:hover{background-color:rgba(245,158,11,.2)}.hover\:bg-amber-500\/25:hover{background-color:rgba(245,158,11,.25)}.hover\:bg-black\/45:hover{background-color:rgba(0,0,0,.45)}.hover\:bg-black\/60:hover{background-color:rgba(0,0,0,.6)}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500\/15:hover{background-color:rgba(6,182,212,.15)}.hover\:bg-cyan-500\/25:hover{background-color:rgba(6,182,212,.25)}.hover\:bg-cyan-500\/30:hover{background-color:rgba(6,182,212,.3)}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500\/15:hover{background-color:rgba(16,185,129,.15)}.hover\:bg-emerald-500\/20:hover{background-color:rgba(16,185,129,.2)}.hover\:bg-emerald-500\/25:hover{background-color:rgba(16,185,129,.25)}.hover\:bg-fuchsia-500\/20:hover{background-color:rgba(217,70,239,.2)}.hover\:bg-rose-500\/15:hover{background-color:rgba(244,63,94,.15)}.hover\:bg-rose-500\/25:hover{background-color:rgba(244,63,94,.25)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200\/60:hover{background-color:rgba(226,232,240,.6)}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-500\/15:hover{background-color:rgba(139,92,246,.15)}.hover\:bg-violet-500\/20:hover{background-color:rgba(139,92,246,.2)}.hover\:bg-violet-500\/25:hover{background-color:rgba(139,92,246,.25)}.hover\:bg-violet-500\/30:hover{background-color:rgba(139,92,246,.3)}.hover\:bg-white\/10:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-white\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\:bg-white\/60:hover{background-color:hsla(0,0%,100%,.6)}.hover\:bg-white\/\[0\.03\]:hover{background-color:hsla(0,0%,100%,.03)}.hover\:bg-white\/\[0\.04\]:hover{background-color:hsla(0,0%,100%,.04)}.hover\:bg-white\/\[0\.06\]:hover{background-color:hsla(0,0%,100%,.06)}.hover\:bg-white\/\[0\.07\]:hover{background-color:hsla(0,0%,100%,.07)}.hover\:bg-white\/\[0\.08\]:hover{background-color:hsla(0,0%,100%,.08)}.hover\:bg-white\/\[0\.1\]:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-zinc-500\/25:hover{background-color:hsla(240,4%,46%,.25)}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:ring-violet-400\/50:hover{--tw-ring-color:rgba(167,139,250,.5)}.hover\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-amber-400:focus{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.focus\:border-amber-400\/60:focus{border-color:rgba(251,191,36,.6)}.focus\:border-cyan-400:focus{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.focus\:border-cyan-400\/60:focus{border-color:rgba(34,211,238,.6)}.focus\:border-indigo-400:focus{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.focus\:border-indigo-400\/60:focus{border-color:rgba(129,140,248,.6)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-emerald-500\/50:focus-visible{--tw-ring-color:rgba(16,185,129,.5)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[14rem_minmax\(0\2c 1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.sm\:grid-cols-\[minmax\(0\2c 1fr\)_7rem\]{grid-template-columns:minmax(0,1fr) 7rem}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:p-5{padding:1.25rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\:bottom-6{bottom:1.5rem}.md\:hidden{display:none}.md\:h-56{height:14rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[12rem_minmax\(0\2c 1fr\)\]{grid-template-columns:12rem minmax(0,1fr)}.md\:grid-cols-\[8rem_1fr\]{grid-template-columns:8rem 1fr}.md\:grid-cols-\[minmax\(0\2c 1fr\)_6rem_14rem\]{grid-template-columns:minmax(0,1fr) 6rem 14rem}.md\:grid-cols-\[minmax\(0\2c 1fr\)_8rem_7rem_7rem\]{grid-template-columns:minmax(0,1fr) 8rem 7rem 7rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_8rem\]{grid-template-columns:minmax(0,1fr) 8rem}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-top:2rem;padding-bottom:2rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:col-span-1{grid-column:span 1/span 1}.xl\:col-span-12{grid-column:span 12/span 12}.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:max-h-\[min\(24rem\2c 50vh\)\]{max-height:min(24rem,50vh)}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[0\.95fr\2c 1\.05fr\]{grid-template-columns:.95fr 1.05fr}.xl\:grid-cols-\[1\.1fr_0\.9fr\]{grid-template-columns:1.1fr .9fr}.xl\:grid-cols-\[18rem\2c 1fr\]{grid-template-columns:18rem 1fr}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(20rem\2c 0\.8fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(20rem,.8fr)}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(25rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(25rem,.9fr)}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(22rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1fr) minmax(22rem,.9fr)}.xl\:items-stretch{align-items:stretch}}@media (min-width:1536px){.\32xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-cyan-600\/25{border-color:rgba(8,145,178,.25)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-slate-200\/60{border-color:rgba(226,232,240,.6)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/90{background-color:hsla(0,0%,100%,.9)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/95{background-color:hsla(0,0%,100%,.95)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))} \ No newline at end of file diff --git a/d2ypp2/web-console/out/android.html b/d2ypp2/web-console/out/android.html index 025344a..dce3916 100644 --- a/d2ypp2/web-console/out/android.html +++ b/d2ypp2/web-console/out/android.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/android.txt b/d2ypp2/web-console/out/android.txt index e12c47b..32d9613 100644 --- a/d2ypp2/web-console/out/android.txt +++ b/d2ypp2/web-console/out/android.txt @@ -2,6 +2,6 @@ 3:I[7588,["335","static/chunks/335-15aa194ced88957b.js","653","static/chunks/653-15975e374f8e28da.js","357","static/chunks/app/android/page-6fdeef4fee9d1d0a.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["android",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["android",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","android","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["android",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["android",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","android","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/console.html b/d2ypp2/web-console/out/console.html index 5bdf9de..1b7dcb4 100644 --- a/d2ypp2/web-console/out/console.html +++ b/d2ypp2/web-console/out/console.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/console.txt b/d2ypp2/web-console/out/console.txt index 61d3ca6..228ba19 100644 --- a/d2ypp2/web-console/out/console.txt +++ b/d2ypp2/web-console/out/console.txt @@ -2,6 +2,6 @@ 3:I[8422,["335","static/chunks/335-15aa194ced88957b.js","653","static/chunks/653-15975e374f8e28da.js","443","static/chunks/app/console/page-a3e7b4f0539e497a.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["console",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["console",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","console","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["console",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["console",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","console","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/index.html b/d2ypp2/web-console/out/index.html index 6ef24e1..c8961f4 100644 --- a/d2ypp2/web-console/out/index.html +++ b/d2ypp2/web-console/out/index.html @@ -1 +1 @@ -无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file +无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file diff --git a/d2ypp2/web-console/out/index.txt b/d2ypp2/web-console/out/index.txt index 25436b5..0dcea06 100644 --- a/d2ypp2/web-console/out/index.txt +++ b/d2ypp2/web-console/out/index.txt @@ -1,7 +1,7 @@ 2:I[7523,[],"ClientPageRoot"] -3:I[3372,["335","static/chunks/335-15aa194ced88957b.js","270","static/chunks/270-ee064b8a2cee7977.js","653","static/chunks/653-15975e374f8e28da.js","371","static/chunks/371-bddad8b92b1ea180.js","931","static/chunks/app/page-da87e47f3337d8f4.js"],"default",1] +3:I[3372,["335","static/chunks/335-15aa194ced88957b.js","270","static/chunks/270-ee064b8a2cee7977.js","653","static/chunks/653-15975e374f8e28da.js","371","static/chunks/371-3c69d09687afa990.js","931","static/chunks/app/page-da87e47f3337d8f4.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/shellcrash.html b/d2ypp2/web-console/out/shellcrash.html index 6065e9b..6d857fd 100644 --- a/d2ypp2/web-console/out/shellcrash.html +++ b/d2ypp2/web-console/out/shellcrash.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/shellcrash.txt b/d2ypp2/web-console/out/shellcrash.txt index 67273f6..79bdd98 100644 --- a/d2ypp2/web-console/out/shellcrash.txt +++ b/d2ypp2/web-console/out/shellcrash.txt @@ -2,6 +2,6 @@ 3:I[4825,["335","static/chunks/335-15aa194ced88957b.js","653","static/chunks/653-15975e374f8e28da.js","6","static/chunks/app/shellcrash/page-af8576bff9fa13fc.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["shellcrash",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shellcrash",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shellcrash","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["shellcrash",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shellcrash",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shellcrash","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/youtube-events.html b/d2ypp2/web-console/out/youtube-events.html index 063eaa5..679a1d4 100644 --- a/d2ypp2/web-console/out/youtube-events.html +++ b/d2ypp2/web-console/out/youtube-events.html @@ -1 +1 @@ -无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file +无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file diff --git a/d2ypp2/web-console/out/youtube-events.txt b/d2ypp2/web-console/out/youtube-events.txt index aa850bc..835b4ec 100644 --- a/d2ypp2/web-console/out/youtube-events.txt +++ b/d2ypp2/web-console/out/youtube-events.txt @@ -1,7 +1,7 @@ 2:I[7523,[],"ClientPageRoot"] -3:I[8307,["335","static/chunks/335-15aa194ced88957b.js","270","static/chunks/270-ee064b8a2cee7977.js","653","static/chunks/653-15975e374f8e28da.js","371","static/chunks/371-bddad8b92b1ea180.js","851","static/chunks/app/youtube-events/page-6cfcc966a308c73f.js"],"default",1] +3:I[8307,["335","static/chunks/335-15aa194ced88957b.js","270","static/chunks/270-ee064b8a2cee7977.js","653","static/chunks/653-15975e374f8e28da.js","371","static/chunks/371-3c69d09687afa990.js","851","static/chunks/app/youtube-events/page-6cfcc966a308c73f.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["youtube-events",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-events",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-events","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["youtube-events",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-events",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-events","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/youtube-relay-log.html b/d2ypp2/web-console/out/youtube-relay-log.html index bc9ac7e..d586fd2 100644 --- a/d2ypp2/web-console/out/youtube-relay-log.html +++ b/d2ypp2/web-console/out/youtube-relay-log.html @@ -1 +1 @@ -无人直播系统 · live.local

YouTube 推流日志

记录每次抖音源转播到 YouTube 的时段、主播昵称、直播间 URL 与开播截图,便于追溯音乐版权等问题。

截图主播昵称直播间 URL推流开始推流结束总时长推流日期YT 密钥线路
暂无推流记录。可先点击「从 PM2 日志导入历史」。
共 0 条 · 第 1/1
\ No newline at end of file +无人直播系统 · live.local

YouTube 推流日志

图表展示每位主播的开播频率、时段规律与累计时长;列表保留逐场明细与截图,便于版权追溯。

暂无统计数据。导入或积累推流记录后,这里会显示主播频率与时段规律。
\ No newline at end of file diff --git a/d2ypp2/web-console/out/youtube-relay-log.txt b/d2ypp2/web-console/out/youtube-relay-log.txt index d4e582f..8a269b2 100644 --- a/d2ypp2/web-console/out/youtube-relay-log.txt +++ b/d2ypp2/web-console/out/youtube-relay-log.txt @@ -1,7 +1,7 @@ 2:I[7523,[],"ClientPageRoot"] -3:I[3211,["614","static/chunks/app/youtube-relay-log/page-44c22a5313590d69.js"],"default",1] +3:I[673,["614","static/chunks/app/youtube-relay-log/page-ef6cbd6ed2424191.js"],"default",1] 4:I[176,[],""] 5:I[9414,[],""] -0:["xYg2qS760UEpBRHWcTFN5",[[["",{"children":["youtube-relay-log",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-relay-log",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-relay-log","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/f72551e7a5dadbbb.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["93noLwLTiZ-nO6dg8JRLS",[[["",{"children":["youtube-relay-log",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-relay-log",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-relay-log","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/27b4d6b789fddb24.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/7e3b6f8d9077dbc2.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web.py b/d2ypp2/web.py index 713c104..657b068 100644 --- a/d2ypp2/web.py +++ b/d2ypp2/web.py @@ -112,6 +112,7 @@ from src.youtube_relay_log import ( get_relay_session, import_relay_sessions_for_process, list_relay_sessions, + summarize_relay_sessions, sync_relay_from_recent_log, ) from src.youtube_quality_guard import build_youtube_quality_guard_report @@ -2314,6 +2315,26 @@ async def hub_youtube_relay_sessions( ) +@app.get("/hub/youtube/relay/sessions/stats", include_in_schema=False) +async def hub_youtube_relay_sessions_stats( + process: str = "", + q: str = "", + date_from: str = "", + date_to: str = "", + status: str = "", + top_anchors: int = 20, +): + return await asyncio.to_thread( + summarize_relay_sessions, + process=process, + q=q, + date_from=date_from, + date_to=date_to, + status=status, + top_anchors=top_anchors, + ) + + @app.get("/hub/youtube/relay/sessions/{session_id}", include_in_schema=False) async def hub_youtube_relay_session_detail(session_id: str): session = await asyncio.to_thread(get_relay_session, session_id)