From 29dedc1833a01dbe4ea89a5162b5b3ae86a15bc9 Mon Sep 17 00:00:00 2001 From: action Date: Thu, 25 Jun 2026 18:37:46 +0800 Subject: [PATCH] update 2026-06-25 18:37:46 --- luci-app-ddnsto/Makefile | 2 +- luci-app-ddnsto/luasrc/controller/ddnsto.lua | 395 +++++++++++++++++- .../root/www/luci-static/ddnsto/index.js | 56 ++- v2ray-geodata/Makefile | 4 +- 4 files changed, 430 insertions(+), 27 deletions(-) diff --git a/luci-app-ddnsto/Makefile b/luci-app-ddnsto/Makefile index 3326e6e9..77369c7a 100644 --- a/luci-app-ddnsto/Makefile +++ b/luci-app-ddnsto/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI support for ddnsto LUCI_DEPENDS:=+ddnsto +block-mount LUCI_PKGARCH:=all -PKG_VERSION:=4.0.3-r1 +PKG_VERSION:=4.2.2-r1 PKG_RELEASE:= include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-ddnsto/luasrc/controller/ddnsto.lua b/luci-app-ddnsto/luasrc/controller/ddnsto.lua index 56f4f49e..7ecb22b9 100644 --- a/luci-app-ddnsto/luasrc/controller/ddnsto.lua +++ b/luci-app-ddnsto/luasrc/controller/ddnsto.lua @@ -70,6 +70,17 @@ local function method_not_allowed() write_json({ ok = false, error = "method not allowed" }) end +local function conflict_request(msg, detail, code) + local http = require "luci.http" + http.status(409, msg or "conflict") + write_json({ + ok = false, + error = msg or "conflict", + detail = detail or "", + code = code or "conflict", + }) +end + local function read_json_body() local http = require "luci.http" local jsonc = require "luci.jsonc" @@ -123,6 +134,203 @@ local function fetch_device_id(index) return parse_device_id(get_command(cmd)) end +local function shell_quote(value) + local raw = tostring(value or "") + return "'" .. raw:gsub("'", [['"'"']]) .. "'" +end + +local function read_file(path, binary) + local mode = binary and "rb" or "r" + local fp = io.open(path, mode) + if not fp then + return nil + end + local data = fp:read("*a") + fp:close() + return data +end + +local function remove_file(path) + if path and #path > 0 then + os.remove(path) + end +end + +local function temp_path(suffix) + local random = tostring(math.random(100000, 999999)) + return string.format("/tmp/ddnsto-luci-%d-%s%s", os.time(), random, suffix or "") +end + +local function file_exists(path) + local fp = io.open(path, "rb") + if fp then + fp:close() + return true + end + return false +end + +local function service_running() + local sys = require "luci.sys" + local jsonc = require "luci.jsonc" + local raw = sys.exec([[ubus call service list '{"name":"ddnsto"}' 2>/dev/null]]) or "" + local ok, obj = pcall(jsonc.parse, raw) + if ok and type(obj) == "table" and type(obj.ddnsto) == "table" and type(obj.ddnsto.instances) == "table" then + for _, inst in pairs(obj.ddnsto.instances) do + if type(inst) == "table" and inst.running == true then + return true + end + end + end + return false +end + +local function read_identity_state() + local uci = require "luci.model.uci".cursor() + local state = { + router_id = "", + identity_mode = "", + device_uuid = "", + } + uci:foreach("ddnsto", "ddnsto", function(s) + state.router_id = s.router_id or state.router_id + state.identity_mode = s.identity_mode or state.identity_mode + state.device_uuid = s.device_uuid or state.device_uuid + end) + return state +end + +local function run_init_action(action) + local sys = require "luci.sys" + return sys.call(string.format("/etc/init.d/ddnsto %s >/dev/null 2>&1", shell_quote(action))) +end + +local function run_capture(cmd) + local sys = require "luci.sys" + local stdout_path = temp_path(".stdout") + local stderr_path = temp_path(".stderr") + local wrapped = string.format("%s >%s 2>%s", cmd, shell_quote(stdout_path), shell_quote(stderr_path)) + local rc = sys.call(wrapped) + local stdout = read_file(stdout_path, true) or "" + local stderr = read_file(stderr_path, true) or "" + remove_file(stdout_path) + remove_file(stderr_path) + return rc, stdout, stderr +end + +local function diagnostics_logs_via_cli(lines) + local jsonc = require "luci.jsonc" + local cmd = string.format("/usr/sbin/ddnsto diagnostics logs --tail %d", tonumber(lines) or 200) + local rc, stdout = run_capture(cmd) + if rc ~= 0 or stdout == "" then + return nil + end + local ok, parsed = pcall(jsonc.parse, stdout) + if not ok or type(parsed) ~= "table" or type(parsed.lines) ~= "table" then + return nil + end + return parsed.lines +end + +local function diagnostics_bundle_via_cli(output_path) + local cmd = string.format( + "/usr/sbin/ddnsto diagnostics bundle --output %s --reason %s", + shell_quote(output_path), + shell_quote("luci-support") + ) + local rc, stdout, stderr = run_capture(cmd) + if rc == 0 and file_exists(output_path) then + return true, stdout + end + return false, stderr ~= "" and stderr or stdout +end + +local function diagnostics_bundle_via_http(output_path) + local jsonc = require "luci.jsonc" + local request_body = [[{"reason":"luci-support","tail":500}]] + local request_cmd = string.format( + "curl -fsS -X POST -H 'Content-Type: application/json' --data %s %s", + shell_quote(request_body), + shell_quote("http://127.0.0.1:18333/diagnostics/bundle") + ) + local rc, stdout, stderr = run_capture(request_cmd) + if rc ~= 0 or stdout == "" then + return false, stderr ~= "" and stderr or stdout + end + + local ok, parsed = pcall(jsonc.parse, stdout) + local download_path = ok and type(parsed) == "table" and parsed.downloadPath or nil + if type(download_path) ~= "string" or download_path == "" then + return false, "missing downloadPath" + end + + local download_cmd = string.format( + "curl -fsS %s -o %s", + shell_quote("http://127.0.0.1:18333" .. download_path), + shell_quote(output_path) + ) + local download_rc, _, download_stderr = run_capture(download_cmd) + if download_rc == 0 and file_exists(output_path) then + return true, "http" + end + + return false, download_stderr ~= "" and download_stderr or "bundle download failed" +end + +local function offline_diagnosis_via_http() + local jsonc = require "luci.jsonc" + local cmd = string.format("curl -fsS %s", shell_quote("http://127.0.0.1:18333/offline-diagnosis")) + local rc, stdout, stderr = run_capture(cmd) + if rc ~= 0 or stdout == "" then + return nil, stderr ~= "" and stderr or stdout + end + + local ok, parsed = pcall(jsonc.parse, stdout) + if not ok or type(parsed) ~= "table" then + return nil, "invalid offline diagnosis response" + end + return parsed, "http_status" +end + +local function offline_diagnosis_via_cli() + local jsonc = require "luci.jsonc" + local rc, stdout, stderr = run_capture("/usr/sbin/ddnsto offline-diagnosis --json") + if rc ~= 0 or stdout == "" then + return nil, stderr ~= "" and stderr or stdout + end + + local ok, parsed = pcall(jsonc.parse, stdout) + if not ok or type(parsed) ~= "table" then + return nil, "invalid offline diagnosis response" + end + return parsed, "cli_fallback" +end + +local function stream_download(path, filename, content_type) + local http = require "luci.http" + local fp = io.open(path, "rb") + if not fp then + http.status(500, "open failed") + http.prepare_content("application/json") + http.write('{"ok":false,"error":"bundle open failed"}') + return + end + + http.header("Content-Disposition", string.format('attachment; filename="%s"', filename)) + http.header("Cache-Control", "no-store") + http.prepare_content(content_type or "application/octet-stream") + + while true do + local chunk = fp:read(8192) + if not chunk then + break + end + http.write(chunk) + end + + fp:close() +end + local function param(body, key) local http = require "luci.http" if type(body) == "table" and body[key] ~= nil then @@ -287,6 +495,7 @@ function index() -- entry({"admin", "ddnsto_dev"}, call("action_ddnsto_dev"), _("DDNSTO (Dev)"), 99).leaf = true entry({"admin", "services", "ddnsto", "api", "config"}, call("api_config")).leaf = true + entry({"admin", "services", "ddnsto", "api", "migrate_identity"}, call("api_migrate_identity")).leaf = true entry({"admin", "services", "ddnsto", "api", "service"}, call("api_service")).leaf = true entry({"admin", "services", "ddnsto", "api", "run"}, call("api_run")).leaf = true entry({"admin", "services", "ddnsto", "api", "restart"}, call("api_restart")).leaf = true @@ -296,6 +505,8 @@ function index() entry({"admin", "services", "ddnsto", "api", "connectivity"}, call("api_connectivity")).leaf = true entry({"admin", "services", "ddnsto", "api", "status"}, call("api_status")).leaf = true entry({"admin", "services", "ddnsto", "api", "logs"}, call("api_logs")).leaf = true + entry({"admin", "services", "ddnsto", "api", "offline_diagnosis"}, call("api_offline_diagnosis")).leaf = true + entry({"admin", "services", "ddnsto", "api", "support_bundle"}, call("api_support_bundle")).leaf = true end function action_page() @@ -427,6 +638,120 @@ function api_config() write_json({ ok = true }) end +function api_migrate_identity() + local http = require "luci.http" + local uci = require "luci.model.uci".cursor() + local method = http.getenv("REQUEST_METHOD") or "" + + if method ~= "POST" then + method_not_allowed() + return + end + + if not require_csrf() then return end + + local body = read_json_body() + local enabled = param(body, "enabled") + local ddnsto_token = param(body, "ddnsto_token") + local index = param(body, "index") + local logger = param(body, "logger") + local feat_enabled = param(body, "feat_enabled") + local feat_port = param(body, "feat_port") + local feat_username = param(body, "feat_username") + local feat_password = param(body, "feat_password") + local feat_disk_path_selected = param(body, "feat_disk_path_selected") + local confirm_reidentity = param(body, "confirm_reidentity") + + if confirm_reidentity ~= "1" then + return bad_request("missing identity migration confirmation") + end + if enabled and not is_bool01(enabled) then return bad_request("bad enabled") end + if logger and not is_bool01(logger) then return bad_request("bad logger") end + if feat_enabled and not is_bool01(feat_enabled) then return bad_request("bad feat_enabled") end + if ddnsto_token ~= nil and has_space(ddnsto_token) then + return bad_request("令牌勿包含空格") + end + if not is_uint(index) then + return bad_request("请填写正确的设备编号,仅允许数字") + end + local index_num = tonumber(index) + if index_num < 0 or index_num > 99 then + return bad_request("请填写正确的设备编号,仅允许数字") + end + + local enabled_on = enabled == "1" + local feat_on = feat_enabled == "1" + if enabled_on and is_empty(ddnsto_token) then + return bad_request("请填写正确用户Token(令牌)") + end + if feat_on then + if not is_uint(feat_port) then + return bad_request("请填写正确的端口") + end + local port_num = tonumber(feat_port) + if not port_num or port_num == 0 or port_num > 65535 then + return bad_request("请填写正确的端口") + end + if is_empty(feat_username) then + return bad_request("请填写授权用户名") + end + if has_space(feat_username) then + return bad_request("用户名请勿包含空格") + end + if is_empty(feat_password) then + return bad_request("请填写授权用户密码") + end + if has_space(feat_password) then + return bad_request("用户密码请勿包含空格") + end + if is_empty(feat_disk_path_selected) then + return bad_request("请填写共享磁盘路径") + end + end + + local old_identity = read_identity_state() + local current = read_config() + local old_index = tostring(current.index or "0") + local identity_missing = is_empty(old_identity.router_id) + if tostring(index) == old_index and not identity_missing then + return conflict_request("identity migration not required", "index unchanged", "identity_migration_not_required") + end + local sid = ensure_ddnsto_section() + + run_init_action("stop") + + if enabled then uci:set("ddnsto", sid, "enabled", enabled) end + if ddnsto_token ~= nil then uci:set("ddnsto", sid, "token", ddnsto_token) end + if index then uci:set("ddnsto", sid, "index", index) end + if logger then uci:set("ddnsto", sid, "logger", logger) end + if feat_enabled then uci:set("ddnsto", sid, "feat_enabled", feat_enabled) end + if feat_port then uci:set("ddnsto", sid, "feat_port", feat_port) end + if feat_username then uci:set("ddnsto", sid, "feat_username", feat_username) end + if feat_password then uci:set("ddnsto", sid, "feat_password", feat_password) end + if feat_disk_path_selected then uci:set("ddnsto", sid, "feat_disk_path_selected", feat_disk_path_selected) end + + uci:delete("ddnsto", sid, "router_id") + uci:delete("ddnsto", sid, "identity_mode") + uci:delete("ddnsto", sid, "device_uuid") + uci:commit("ddnsto") + + local restart_rc = 0 + if enabled ~= "0" then + restart_rc = run_init_action("start") + end + + write_json({ + ok = true, + data = { + old_index = old_index, + new_index = tostring(index), + old_router_id = old_identity.router_id or "", + service_started = restart_rc == 0 and enabled ~= "0" or false, + message = "设备身份已重置,服务正在使用新的设备编号重新生成设备 ID", + } + }) +end + -- ========== -- API: service -- ========== @@ -696,6 +1021,12 @@ function api_logs() if lines < 10 then lines = 10 end if lines > 2000 then lines = 2000 end + local cli_lines = diagnostics_logs_via_cli(lines) + if cli_lines ~= nil then + write_json({ ok = true, data = { lines = cli_lines, total = #cli_lines, source = "diagnostics_cli" } }) + return + end + local cmd = string.format("logread 2>/dev/null | grep -E 'ddnsto|ddnstod' | tail -n %d", lines) local out = sys.exec(cmd) or "" local arr = {} @@ -706,7 +1037,69 @@ function api_logs() end end - write_json({ ok = true, data = { lines = arr, total = #arr } }) + write_json({ ok = true, data = { lines = arr, total = #arr, source = "logread_fallback" } }) +end + +function api_offline_diagnosis() + local http = require "luci.http" + local method = http.getenv("REQUEST_METHOD") or "" + + if method ~= "GET" then + method_not_allowed() + return + end + + if not service_running() then + write_json({ + ok = false, + error = "offline diagnosis unavailable", + detail = "ddnsto not running", + code = "ddnsto_not_running", + }) + return + end + + local data, source = offline_diagnosis_via_http() + if data ~= nil then + write_json({ ok = true, data = data, source = source }) + return + end + + write_json({ ok = false, error = "offline diagnosis unavailable" }) +end + +function api_support_bundle() + local http = require "luci.http" + local method = http.getenv("REQUEST_METHOD") or "" + + if method ~= "GET" then + method_not_allowed() + return + end + + if not service_running() then + http.status(409, "ddnsto not running") + write_json({ + ok = false, + error = "diagnostics bundle unavailable", + detail = "ddnsto not running", + code = "ddnsto_not_running", + }) + return + end + + local output_path = temp_path(".zip") + local ok, err = diagnostics_bundle_via_http(output_path) + if not ok then + remove_file(output_path) + http.status(500, "bundle failed") + write_json({ ok = false, error = "diagnostics bundle unavailable", detail = err or "" }) + return + end + + local filename = string.format("ddnsto-openwrt-support-%d.zip", os.time()) + stream_download(output_path, filename, "application/zip") + remove_file(output_path) end function action_ddnsto_dev() diff --git a/luci-app-ddnsto/root/www/luci-static/ddnsto/index.js b/luci-app-ddnsto/root/www/luci-static/ddnsto/index.js index c80a5f66..63e156a6 100644 --- a/luci-app-ddnsto/root/www/luci-static/ddnsto/index.js +++ b/luci-app-ddnsto/root/www/luci-static/ddnsto/index.js @@ -1,4 +1,4 @@ -(function(){const E=document.createElement("link").relList;if(E&&E.supports&&E.supports("modulepreload"))return;for(const T of document.querySelectorAll('link[rel="modulepreload"]'))U(T);new MutationObserver(T=>{for(const L of T)if(L.type==="childList")for(const B of L.addedNodes)B.tagName==="LINK"&&B.rel==="modulepreload"&&U(B)}).observe(document,{childList:!0,subtree:!0});function d(T){const L={};return T.integrity&&(L.integrity=T.integrity),T.referrerPolicy&&(L.referrerPolicy=T.referrerPolicy),T.crossOrigin==="use-credentials"?L.credentials="include":T.crossOrigin==="anonymous"?L.credentials="omit":L.credentials="same-origin",L}function U(T){if(T.ep)return;T.ep=!0;const L=d(T);fetch(T.href,L)}})();function Vd(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var Mi={exports:{}},Nr={},Oi={exports:{}},J={};/** +(function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const I of document.querySelectorAll('link[rel="modulepreload"]'))V(I);new MutationObserver(I=>{for(const M of I)if(M.type==="childList")for(const Z of M.addedNodes)Z.tagName==="LINK"&&Z.rel==="modulepreload"&&V(Z)}).observe(document,{childList:!0,subtree:!0});function d(I){const M={};return I.integrity&&(M.integrity=I.integrity),I.referrerPolicy&&(M.referrerPolicy=I.referrerPolicy),I.crossOrigin==="use-credentials"?M.credentials="include":I.crossOrigin==="anonymous"?M.credentials="omit":M.credentials="same-origin",M}function V(I){if(I.ep)return;I.ep=!0;const M=d(I);fetch(I.href,M)}})();function Bd(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var Ii={exports:{}},Cr={},Oi={exports:{}},ne={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Iu;function Wd(){if(Iu)return J;Iu=1;var y=Symbol.for("react.element"),E=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),B=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),Q=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),W=Symbol.iterator;function H(u){return u===null||typeof u!="object"?null:(u=W&&u[W]||u["@@iterator"],typeof u=="function"?u:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ae=Object.assign,V={};function Y(u,v,M){this.props=u,this.context=v,this.refs=V,this.updater=M||q}Y.prototype.isReactComponent={},Y.prototype.setState=function(u,v){if(typeof u!="object"&&typeof u!="function"&&u!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,v,"setState")},Y.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function we(){}we.prototype=Y.prototype;function ze(u,v,M){this.props=u,this.context=v,this.refs=V,this.updater=M||q}var ke=ze.prototype=new we;ke.constructor=ze,ae(ke,Y.prototype),ke.isPureReactComponent=!0;var fe=Array.isArray,Ce=Object.prototype.hasOwnProperty,K={current:null},Re={key:!0,ref:!0,__self:!0,__source:!0};function he(u,v,M){var b,X={},O=null,re=null;if(v!=null)for(b in v.ref!==void 0&&(re=v.ref),v.key!==void 0&&(O=""+v.key),v)Ce.call(v,b)&&!Re.hasOwnProperty(b)&&(X[b]=v[b]);var ee=arguments.length-2;if(ee===1)X.children=M;else if(1>>1,v=x[u];if(0>>1;uT(X,g))OT(re,X)?(x[u]=re,x[O]=g,u=O):(x[u]=X,x[b]=g,u=b);else if(OT(re,g))x[u]=re,x[O]=g,u=O;else break e}}return I}function T(x,I){var g=x.sortIndex-I.sortIndex;return g!==0?g:x.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var L=performance;y.unstable_now=function(){return L.now()}}else{var B=Date,G=B.now();y.unstable_now=function(){return B.now()-G}}var A=[],Q=[],Z=1,W=null,H=3,q=!1,ae=!1,V=!1,Y=typeof setTimeout=="function"?setTimeout:null,we=typeof clearTimeout=="function"?clearTimeout:null,ze=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ke(x){for(var I=d(Q);I!==null;){if(I.callback===null)U(Q);else if(I.startTime<=x)U(Q),I.sortIndex=I.expirationTime,E(A,I);else break;I=d(Q)}}function fe(x){if(V=!1,ke(x),!ae)if(d(A)!==null)ae=!0,Ne(Ce);else{var I=d(Q);I!==null&&ie(fe,I.startTime-x)}}function Ce(x,I){ae=!1,V&&(V=!1,we(he),he=-1),q=!0;var g=H;try{for(ke(I),W=d(A);W!==null&&(!(W.expirationTime>I)||x&&!Qe());){var u=W.callback;if(typeof u=="function"){W.callback=null,H=W.priorityLevel;var v=u(W.expirationTime<=I);I=y.unstable_now(),typeof v=="function"?W.callback=v:W===d(A)&&U(A),ke(I)}else U(A);W=d(A)}if(W!==null)var M=!0;else{var b=d(Q);b!==null&&ie(fe,b.startTime-I),M=!1}return M}finally{W=null,H=g,q=!1}}var K=!1,Re=null,he=-1,xe=5,ue=-1;function Qe(){return!(y.unstable_now()-uex||125u?(x.sortIndex=g,E(Q,x),d(A)===null&&x===d(Q)&&(V?(we(he),he=-1):V=!0,ie(fe,g-u))):(x.sortIndex=v,E(A,x),ae||q||(ae=!0,Ne(Ce))),x},y.unstable_shouldYield=Qe,y.unstable_wrapCallback=function(x){var I=H;return function(){var g=H;H=I;try{return x.apply(this,arguments)}finally{H=g}}}})(bi)),bi}var bu;function Xd(){return bu||(bu=1,Fi.exports=Yd()),Fi.exports}/** + */var Du;function Xd(){return Du||(Du=1,(function(v){function N(E,L){var S=E.length;E.push(L);e:for(;0>>1,g=E[u];if(0>>1;uI(X,S))UI(j,X)?(E[u]=j,E[U]=S,u=U):(E[u]=X,E[H]=S,u=H);else if(UI(j,S))E[u]=j,E[U]=S,u=U;else break e}}return L}function I(E,L){var S=E.sortIndex-L.sortIndex;return S!==0?S:E.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var M=performance;v.unstable_now=function(){return M.now()}}else{var Z=Date,ee=Z.now();v.unstable_now=function(){return Z.now()-ee}}var R=[],Y=[],te=1,J=null,W=3,re=!1,fe=!1,Q=!1,q=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,Le=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function me(E){for(var L=d(Y);L!==null;){if(L.callback===null)V(Y);else if(L.startTime<=E)V(Y),L.sortIndex=L.expirationTime,N(R,L);else break;L=d(Y)}}function ce(E){if(Q=!1,me(E),!fe)if(d(R)!==null)fe=!0,ie(_e);else{var L=d(Y);L!==null&&oe(ce,L.startTime-E)}}function _e(E,L){fe=!1,Q&&(Q=!1,xe(je),je=-1),re=!0;var S=W;try{for(me(L),J=d(R);J!==null&&(!(J.expirationTime>L)||E&&!ze());){var u=J.callback;if(typeof u=="function"){J.callback=null,W=J.priorityLevel;var g=u(J.expirationTime<=L);L=v.unstable_now(),typeof g=="function"?J.callback=g:J===d(R)&&V(R),me(L)}else V(R);J=d(R)}if(J!==null)var F=!0;else{var H=d(Y);H!==null&&oe(ce,H.startTime-L),F=!1}return F}finally{J=null,W=S,re=!1}}var K=!1,Ee=null,je=-1,Ue=5,Ne=-1;function ze(){return!(v.unstable_now()-NeE||125u?(E.sortIndex=S,N(Y,E),d(R)===null&&E===d(Y)&&(Q?(xe(je),je=-1):Q=!0,oe(ce,S-u))):(E.sortIndex=g,N(R,E),fe||re||(fe=!0,ie(_e))),E},v.unstable_shouldYield=ze,v.unstable_wrapCallback=function(E){var L=W;return function(){var S=W;W=L;try{return E.apply(this,arguments)}finally{W=S}}}})(Fi)),Fi}var Fu;function Gd(){return Fu||(Fu=1,Di.exports=Xd()),Di.exports}/** * @license React * react-dom.production.min.js * @@ -30,73 +30,83 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Uu;function Gd(){if(Uu)return Je;Uu=1;var y=Ai(),E=Xd();function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),A=Object.prototype.hasOwnProperty,Q=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Z={},W={};function H(e){return A.call(W,e)?!0:A.call(Z,e)?!1:Q.test(e)?W[e]=!0:(Z[e]=!0,!1)}function q(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ae(e,t,n,r){if(t===null||typeof t>"u"||q(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function V(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Y[e]=new V(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Y[t]=new V(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Y[e]=new V(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Y[e]=new V(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Y[e]=new V(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Y[e]=new V(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Y[e]=new V(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Y[e]=new V(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Y[e]=new V(e,5,!1,e.toLowerCase(),null,!1,!1)});var we=/[\-:]([a-z])/g;function ze(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(we,ze);Y[t]=new V(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(we,ze);Y[t]=new V(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(we,ze);Y[t]=new V(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Y[e]=new V(e,1,!1,e.toLowerCase(),null,!1,!1)}),Y.xlinkHref=new V("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Y[e]=new V(e,1,!1,e.toLowerCase(),null,!0,!0)});function ke(e,t,n,r){var l=Y.hasOwnProperty(t)?Y[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R=Object.prototype.hasOwnProperty,Y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,te={},J={};function W(e){return R.call(J,e)?!0:R.call(te,e)?!1:Y.test(e)?J[e]=!0:(te[e]=!0,!1)}function re(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fe(e,t,n,r){if(t===null||typeof t>"u"||re(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Q(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){q[e]=new Q(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];q[t]=new Q(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){q[e]=new Q(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){q[e]=new Q(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){q[e]=new Q(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){q[e]=new Q(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){q[e]=new Q(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){q[e]=new Q(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){q[e]=new Q(e,5,!1,e.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function Le(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xe,Le);q[t]=new Q(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xe,Le);q[t]=new Q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xe,Le);q[t]=new Q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){q[e]=new Q(e,1,!1,e.toLowerCase(),null,!1,!1)}),q.xlinkHref=new Q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){q[e]=new Q(e,1,!1,e.toLowerCase(),null,!0,!0)});function me(e,t,n,r){var l=q.hasOwnProperty(t)?q[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=a);break}}}finally{M=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?v(e):""}function X(e){switch(e.tag){case 5:return v(e.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return e=b(e.type,!1),e;case 11:return e=b(e.type.render,!1),e;case 1:return e=b(e.type,!0),e;default:return""}}function O(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Re:return"Fragment";case K:return"Portal";case xe:return"Profiler";case he:return"StrictMode";case me:return"Suspense";case ge:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qe:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return t=e.displayName||null,t!==null?t:O(e.type)||"Memo";case Ne:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return O(t);case 8:return t===he?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ue(e){var t=oe(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fn(e){e._valueTracker||(e._valueTracker=Ue(e))}function Un(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=oe(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Tt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function An(e,t){var n=t.checked;return g({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Zt(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ee(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $i(e,t){t=t.checked,t!=null&&ke(e,"checked",t,!1)}function $l(e,t){$i(e,t);var n=ee(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hl(e,t.type,ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Hl(e,t,n){(t!=="number"||Tt(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function pn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ku=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Ku.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function Yi(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function Xi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Yi(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Yu=g({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bl(e,t){if(t){if(Yu[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(d(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(d(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(d(61))}if(t.style!=null&&typeof t.style!="object")throw Error(d(62))}}function Ql(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Kl=null;function Yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,hn=null,mn=null;function Gi(e){if(e=dr(e)){if(typeof Xl!="function")throw Error(d(280));var t=e.stateNode;t&&(t=Jr(t),Xl(e.stateNode,e.type,t))}}function Zi(e){hn?mn?mn.push(e):mn=[e]:hn=e}function Ji(){if(hn){var e=hn,t=mn;if(mn=hn=null,Gi(e),t)for(e=0;e>>=0,e===0?32:31-(oc(e)/ic|0)|0}var Mr=64,Or=4194304;function Kn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Kn(a):(o&=i,o!==0&&(r=Kn(o)))}else i=n&~l,i!==0?r=Kn(i):o!==0&&(r=Kn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=n}function cc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=nr),Na=" ",ja=!1;function za(e,t){switch(e){case"keyup":return bc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yn=!1;function Ac(e,t){switch(e){case"compositionend":return Pa(t);case"keypress":return t.which!==32?null:(ja=!0,Na);case"textInput":return e=t.data,e===Na&&ja?null:e;default:return null}}function $c(e,t){if(yn)return e==="compositionend"||!ho&&za(e,t)?(e=ka(),$r=ao=Ot=null,yn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Da(n)}}function ba(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ba(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ua(){for(var e=window,t=Tt();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tt(e.document)}return t}function vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Gc(e){var t=Ua(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ba(n.ownerDocument.documentElement,n)){if(r!==null&&vo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Fa(n,o);var i=Fa(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,wn=null,yo=null,ir=null,wo=!1;function Aa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wo||wn==null||wn!==Tt(r)||(r=wn,"selectionStart"in r&&vo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ir&&or(ir,r)||(ir=r,r=Xr(yo,"onSelect"),0En||(e.current=Ro[En],Ro[En]=null,En--)}function se(e,t){En++,Ro[En]=e.current,e.current=t}var Ut={},Ae=bt(Ut),Ke=bt(!1),en=Ut;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ye(e){return e=e.childContextTypes,e!=null}function qr(){de(Ke),de(Ae)}function ts(e,t,n){if(Ae.current!==Ut)throw Error(d(168));se(Ae,t),se(Ke,n)}function ns(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(d(108,re(e)||"Unknown",l));return g({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,en=Ae.current,se(Ae,e),se(Ke,Ke.current),!0}function rs(e,t,n){var r=e.stateNode;if(!r)throw Error(d(169));n?(e=ns(e,t,en),r.__reactInternalMemoizedMergedChildContext=e,de(Ke),de(Ae),se(Ae,e)):de(Ke),se(Ke,n)}var _t=null,tl=!1,Lo=!1;function ls(e){_t===null?_t=[e]:_t.push(e)}function sd(e){tl=!0,ls(e)}function At(){if(!Lo&&_t!==null){Lo=!0;var e=0,t=le;try{var n=_t;for(le=1;e>=i,l-=i,Et=1<<32-ut(t)+l|n<$?(De=F,F=null):De=F.sibling;var ne=w(f,F,p[$],_);if(ne===null){F===null&&(F=De);break}e&&F&&ne.alternate===null&&t(f,F),c=o(ne,c,$),D===null?R=ne:D.sibling=ne,D=ne,F=De}if($===p.length)return n(f,F),pe&&nn(f,$),R;if(F===null){for(;$$?(De=F,F=null):De=F.sibling;var Xt=w(f,F,ne.value,_);if(Xt===null){F===null&&(F=De);break}e&&F&&Xt.alternate===null&&t(f,F),c=o(Xt,c,$),D===null?R=Xt:D.sibling=Xt,D=Xt,F=De}if(ne.done)return n(f,F),pe&&nn(f,$),R;if(F===null){for(;!ne.done;$++,ne=p.next())ne=S(f,ne.value,_),ne!==null&&(c=o(ne,c,$),D===null?R=ne:D.sibling=ne,D=ne);return pe&&nn(f,$),R}for(F=r(f,F);!ne.done;$++,ne=p.next())ne=N(F,f,$,ne.value,_),ne!==null&&(e&&ne.alternate!==null&&F.delete(ne.key===null?$:ne.key),c=o(ne,c,$),D===null?R=ne:D.sibling=ne,D=ne);return e&&F.forEach(function(Hd){return t(f,Hd)}),pe&&nn(f,$),R}function Ee(f,c,p,_){if(typeof p=="object"&&p!==null&&p.type===Re&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ce:e:{for(var R=p.key,D=c;D!==null;){if(D.key===R){if(R=p.type,R===Re){if(D.tag===7){n(f,D.sibling),c=l(D,p.props.children),c.return=f,f=c;break e}}else if(D.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ne&&cs(R)===D.type){n(f,D.sibling),c=l(D,p.props),c.ref=fr(f,D,p),c.return=f,f=c;break e}n(f,D);break}else t(f,D);D=D.sibling}p.type===Re?(c=dn(p.props.children,f.mode,_,p.key),c.return=f,f=c):(_=Pl(p.type,p.key,p.props,null,f.mode,_),_.ref=fr(f,c,p),_.return=f,f=_)}return i(f);case K:e:{for(D=p.key;c!==null;){if(c.key===D)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=Pi(p,f.mode,_),c.return=f,f=c}return i(f);case Ne:return D=p._init,Ee(f,c,D(p._payload),_)}if($n(p))return z(f,c,p,_);if(I(p))return P(f,c,p,_);ol(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=zi(p,f.mode,_),c.return=f,f=c),i(f)):n(f,c)}return Ee}var Pn=ds(!0),fs=ds(!1),il=bt(null),al=null,Tn=null,bo=null;function Uo(){bo=Tn=al=null}function Ao(e){var t=il.current;de(il),e._currentValue=t}function $o(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rn(e,t){al=e,bo=Tn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Xe=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(bo!==e)if(e={context:e,memoizedValue:t,next:null},Tn===null){if(al===null)throw Error(d(308));Tn=e,al.dependencies={lanes:0,firstContext:e}}else Tn=Tn.next=e;return t}var rn=null;function Ho(e){rn===null?rn=[e]:rn.push(e)}function ps(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ho(t)):(n.next=l.next,l.next=n),t.interleaved=n,Nt(e,r)}function Nt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $t=!1;function Vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ht(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(te&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Nt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ho(r)):(t.next=l.next,l.next=t),r.interleaved=t,Nt(e,n)}function sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,no(e,n)}}function ms(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;$t=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var s=a,h=s.next;s.next=null,i===null?o=h:i.next=h,i=s;var k=e.alternate;k!==null&&(k=k.updateQueue,a=k.lastBaseUpdate,a!==i&&(a===null?k.firstBaseUpdate=h:a.next=h,k.lastBaseUpdate=s))}if(o!==null){var S=l.baseState;i=0,k=h=s=null,a=o;do{var w=a.lane,N=a.eventTime;if((r&w)===w){k!==null&&(k=k.next={eventTime:N,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var z=e,P=a;switch(w=t,N=n,P.tag){case 1:if(z=P.payload,typeof z=="function"){S=z.call(N,S,w);break e}S=z;break e;case 3:z.flags=z.flags&-65537|128;case 0:if(z=P.payload,w=typeof z=="function"?z.call(N,S,w):z,w==null)break e;S=g({},S,w);break e;case 2:$t=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,w=l.effects,w===null?l.effects=[a]:w.push(a))}else N={eventTime:N,lane:w,tag:a.tag,payload:a.payload,callback:a.callback,next:null},k===null?(h=k=N,s=S):k=k.next=N,i|=w;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;w=a,a=w.next,w.next=null,l.lastBaseUpdate=w,l.shared.pending=null}}while(!0);if(k===null&&(s=S),l.baseState=s,l.firstBaseUpdate=h,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);an|=i,e.lanes=i,e.memoizedState=S}}function gs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Yo.transition;Yo.transition={};try{e(!1),t()}finally{le=n,Yo.transition=r}}function Os(){return it().memoizedState}function fd(e,t,n){var r=Qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e))Fs(t,n);else if(n=ps(e,t,n,r),n!==null){var l=Be();mt(n,e,r,l),bs(n,t,r)}}function pd(e,t,n){var r=Qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Fs(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,ct(a,i)){var s=t.interleaved;s===null?(l.next=l,Ho(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ps(e,t,l,r),n!==null&&(l=Be(),mt(n,e,r,l),bs(n,t,r))}}function Ds(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Fs(e,t){gr=fl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bs(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,no(e,n)}}var ml={readContext:ot,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},hd={readContext:ot,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:js,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,pl(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return pl(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fd.bind(null,ye,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:Cs,useDebugValue:ti,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=Cs(!1),t=e[0];return e=dd.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ye,l=kt();if(pe){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),Oe===null)throw Error(d(349));(on&30)!==0||ks(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,js(Ss.bind(null,r,o,e),[e]),r.flags|=2048,wr(9,xs.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kt(),t=Oe.identifierPrefix;if(pe){var n=Ct,r=Et;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=a);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?g(e):""}function X(e){switch(e.tag){case 5:return g(e.type);case 16:return g("Lazy");case 13:return g("Suspense");case 19:return g("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1),e;case 11:return e=H(e.type.render,!1),e;case 1:return e=H(e.type,!0),e;default:return""}}function U(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ee:return"Fragment";case K:return"Portal";case Ue:return"Profiler";case je:return"StrictMode";case le:return"Suspense";case de:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ze:return(e.displayName||"Context")+".Consumer";case Ne:return(e._context.displayName||"Context")+".Provider";case ye:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return t=e.displayName||null,t!==null?t:U(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return U(e(t))}catch{}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===je?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function D(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pe(e){var t=_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function G(e){e._valueTracker||(e._valueTracker=pe(e))}function Re(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ve(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function An(e,t){var n=t.checked;return S({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qt(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=D(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $i(e,t){t=t.checked,t!=null&&me(e,"checked",t,!1)}function $l(e,t){$i(e,t);var n=D(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hl(e,t.type,D(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Hl(e,t,n){(t!=="number"||Ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function mn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yu=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Yu.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function Yi(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function Xi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Yi(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Xu=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wl(e,t){if(t){if(Xu[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(d(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(d(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(d(61))}if(t.style!=null&&typeof t.style!="object")throw Error(d(62))}}function Ql(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Kl=null;function Yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,hn=null,gn=null;function Gi(e){if(e=dr(e)){if(typeof Xl!="function")throw Error(d(280));var t=e.stateNode;t&&(t=Jr(t),Xl(e.stateNode,e.type,t))}}function Zi(e){hn?gn?gn.push(e):gn=[e]:hn=e}function Ji(){if(hn){var e=hn,t=gn;if(gn=hn=null,Gi(e),t)for(e=0;e>>=0,e===0?32:31-(ic(e)/ac|0)|0}var Ir=64,Or=4194304;function Kn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Kn(a):(o&=i,o!==0&&(r=Kn(o)))}else i=n&~l,i!==0?r=Kn(i):o!==0&&(r=Kn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=n}function dc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=nr),Ca=" ",ja=!1;function za(e,t){switch(e){case"keyup":return Uc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function $c(e,t){switch(e){case"compositionend":return Pa(t);case"keypress":return t.which!==32?null:(ja=!0,Ca);case"textInput":return e=t.data,e===Ca&&ja?null:e;default:return null}}function Hc(e,t){if(wn)return e==="compositionend"||!mo&&za(e,t)?(e=xa(),$r=ao=Ft=null,wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ma(n)}}function Fa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ua(){for(var e=window,t=Ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ve(e.document)}return t}function vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zc(e){var t=Ua(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fa(n.ownerDocument.documentElement,n)){if(r!==null&&vo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Da(n,o);var i=Da(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,xn=null,yo=null,ir=null,wo=!1;function Aa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wo||xn==null||xn!==Ve(r)||(r=xn,"selectionStart"in r&&vo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ir&&or(ir,r)||(ir=r,r=Xr(yo,"onSelect"),0Nn||(e.current=Lo[Nn],Lo[Nn]=null,Nn--)}function he(e,t){Nn++,Lo[Nn]=e.current,e.current=t}var Ht={},Be=$t(Ht),Ge=$t(!1),nn=Ht;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ze(e){return e=e.childContextTypes,e!=null}function qr(){ve(Ge),ve(Be)}function ts(e,t,n){if(Be.current!==Ht)throw Error(d(168));he(Be,t),he(Ge,n)}function ns(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(d(108,j(e)||"Unknown",l));return S({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,nn=Be.current,he(Be,e),he(Ge,Ge.current),!0}function rs(e,t,n){var r=e.stateNode;if(!r)throw Error(d(169));n?(e=ns(e,t,nn),r.__reactInternalMemoizedMergedChildContext=e,ve(Ge),ve(Be),he(Be,e)):ve(Ge),he(Ge,n)}var jt=null,tl=!1,Ro=!1;function ls(e){jt===null?jt=[e]:jt.push(e)}function ud(e){tl=!0,ls(e)}function Vt(){if(!Ro&&jt!==null){Ro=!0;var e=0,t=ue;try{var n=jt;for(ue=1;e>=i,l-=i,zt=1<<32-ft(t)+l|n<B?(Fe=$,$=null):Fe=$.sibling;var se=y(p,$,m[B],k);if(se===null){$===null&&($=Fe);break}e&&$&&se.alternate===null&&t(p,$),c=o(se,c,B),A===null?O=se:A.sibling=se,A=se,$=Fe}if(B===m.length)return n(p,$),we&&ln(p,B),O;if($===null){for(;BB?(Fe=$,$=null):Fe=$.sibling;var Jt=y(p,$,se.value,k);if(Jt===null){$===null&&($=Fe);break}e&&$&&Jt.alternate===null&&t(p,$),c=o(Jt,c,B),A===null?O=Jt:A.sibling=Jt,A=Jt,$=Fe}if(se.done)return n(p,$),we&&ln(p,B),O;if($===null){for(;!se.done;B++,se=m.next())se=x(p,se.value,k),se!==null&&(c=o(se,c,B),A===null?O=se:A.sibling=se,A=se);return we&&ln(p,B),O}for($=r(p,$);!se.done;B++,se=m.next())se=z($,p,B,se.value,k),se!==null&&(e&&se.alternate!==null&&$.delete(se.key===null?B:se.key),c=o(se,c,B),A===null?O=se:A.sibling=se,A=se);return e&&$.forEach(function(Vd){return t(p,Vd)}),we&&ln(p,B),O}function Te(p,c,m,k){if(typeof m=="object"&&m!==null&&m.type===Ee&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case _e:e:{for(var O=m.key,A=c;A!==null;){if(A.key===O){if(O=m.type,O===Ee){if(A.tag===7){n(p,A.sibling),c=l(A,m.props.children),c.return=p,p=c;break e}}else if(A.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===ie&&cs(O)===A.type){n(p,A.sibling),c=l(A,m.props),c.ref=fr(p,A,m),c.return=p,p=c;break e}n(p,A);break}else t(p,A);A=A.sibling}m.type===Ee?(c=pn(m.props.children,p.mode,k,m.key),c.return=p,p=c):(k=Pl(m.type,m.key,m.props,null,p.mode,k),k.ref=fr(p,c,m),k.return=p,p=k)}return i(p);case K:e:{for(A=m.key;c!==null;){if(c.key===A)if(c.tag===4&&c.stateNode.containerInfo===m.containerInfo&&c.stateNode.implementation===m.implementation){n(p,c.sibling),c=l(c,m.children||[]),c.return=p,p=c;break e}else{n(p,c);break}else t(p,c);c=c.sibling}c=Pi(m,p.mode,k),c.return=p,p=c}return i(p);case ie:return A=m._init,Te(p,c,A(m._payload),k)}if($n(m))return T(p,c,m,k);if(L(m))return b(p,c,m,k);ol(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,c!==null&&c.tag===6?(n(p,c.sibling),c=l(c,m),c.return=p,p=c):(n(p,c),c=zi(m,p.mode,k),c.return=p,p=c),i(p)):n(p,c)}return Te}var Tn=ds(!0),fs=ds(!1),il=$t(null),al=null,Ln=null,Fo=null;function Uo(){Fo=Ln=al=null}function Ao(e){var t=il.current;ve(il),e._currentValue=t}function $o(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rn(e,t){al=e,Fo=Ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Je=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(Fo!==e)if(e={context:e,memoizedValue:t,next:null},Ln===null){if(al===null)throw Error(d(308));Ln=e,al.dependencies={lanes:0,firstContext:e}}else Ln=Ln.next=e;return t}var on=null;function Ho(e){on===null?on=[e]:on.push(e)}function ps(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ho(t)):(n.next=l.next,l.next=n),t.interleaved=n,Tt(e,r)}function Tt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Bt=!1;function Vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ms(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Tt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ho(r)):(t.next=l.next,l.next=t),r.interleaved=t,Tt(e,n)}function sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,no(e,n)}}function hs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;Bt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var s=a,h=s.next;s.next=null,i===null?o=h:i.next=h,i=s;var w=e.alternate;w!==null&&(w=w.updateQueue,a=w.lastBaseUpdate,a!==i&&(a===null?w.firstBaseUpdate=h:a.next=h,w.lastBaseUpdate=s))}if(o!==null){var x=l.baseState;i=0,w=h=s=null,a=o;do{var y=a.lane,z=a.eventTime;if((r&y)===y){w!==null&&(w=w.next={eventTime:z,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var T=e,b=a;switch(y=t,z=n,b.tag){case 1:if(T=b.payload,typeof T=="function"){x=T.call(z,x,y);break e}x=T;break e;case 3:T.flags=T.flags&-65537|128;case 0:if(T=b.payload,y=typeof T=="function"?T.call(z,x,y):T,y==null)break e;x=S({},x,y);break e;case 2:Bt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,y=l.effects,y===null?l.effects=[a]:y.push(a))}else z={eventTime:z,lane:y,tag:a.tag,payload:a.payload,callback:a.callback,next:null},w===null?(h=w=z,s=x):w=w.next=z,i|=y;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;y=a,a=y.next,y.next=null,l.lastBaseUpdate=y,l.shared.pending=null}}while(!0);if(w===null&&(s=x),l.baseState=s,l.firstBaseUpdate=h,l.lastBaseUpdate=w,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);un|=i,e.lanes=i,e.memoizedState=x}}function gs(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Yo.transition;Yo.transition={};try{e(!1),t()}finally{ue=n,Yo.transition=r}}function Os(){return ut().memoizedState}function pd(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e))Ds(t,n);else if(n=ps(e,t,n,r),n!==null){var l=Xe();yt(n,e,r,l),Fs(n,t,r)}}function md(e,t,n){var r=Xt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ds(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,pt(a,i)){var s=t.interleaved;s===null?(l.next=l,Ho(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ps(e,t,l,r),n!==null&&(l=Xe(),yt(n,e,r,l),Fs(n,t,r))}}function Ms(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Ds(e,t){gr=fl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,no(e,n)}}var hl={readContext:st,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},hd={readContext:st,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:js,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,pl(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return pl(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pd.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:Ns,useDebugValue:ti,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=Ns(!1),t=e[0];return e=fd.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,l=_t();if(we){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),De===null)throw Error(d(349));(sn&30)!==0||xs(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,js(Ss.bind(null,r,o,e),[e]),r.flags|=2048,wr(9,ks.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=_t(),t=De.identifierPrefix;if(we){var n=Pt,r=zt;n=(r&~(1<<32-ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[yt]=t,e[cr]=r,lu(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ql(n,r),n){case"dialog":ce("cancel",e),ce("close",e),l=r;break;case"iframe":case"object":case"embed":ce("load",e),l=r;break;case"video":case"audio":for(l=0;lDn&&(t.flags|=128,r=!0,kr(o,!1),t.lanes=4194304)}else{if(!r)if(e=cl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!pe)return He(t),null}else 2*_e()-o.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,kr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=_e(),t.sibling=null,n=ve.current,se(ve,r?n&1|2:n&1),t):(He(t),null);case 22:case 23:return Ci(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(nt&1073741824)!==0&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),null;case 24:return null;case 25:return null}throw Error(d(156,t.tag))}function Sd(e,t){switch(Mo(t),t.tag){case 1:return Ye(t.type)&&qr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ln(),de(Ke),de(Ae),Ko(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Bo(t),null;case 13:if(de(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(ve),null;case 4:return Ln(),null;case 10:return Ao(t.type._context),null;case 22:case 23:return Ci(),null;case 24:return null;default:return null}}var wl=!1,Ve=!1,_d=typeof WeakSet=="function"?WeakSet:Set,j=null;function Mn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function pi(e,t,n){try{n()}catch(r){Se(e,t,r)}}var au=!1;function Ed(e,t){if(Co=Ur,e=Ua(),vo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,s=-1,h=0,k=0,S=e,w=null;t:for(;;){for(var N;S!==n||l!==0&&S.nodeType!==3||(a=i+l),S!==o||r!==0&&S.nodeType!==3||(s=i+r),S.nodeType===3&&(i+=S.nodeValue.length),(N=S.firstChild)!==null;)w=S,S=N;for(;;){if(S===e)break t;if(w===n&&++h===l&&(a=i),w===o&&++k===r&&(s=i),(N=S.nextSibling)!==null)break;S=w,w=S.parentNode}S=N}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(No={focusedElem:e,selectionRange:n},Ur=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var z=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(z!==null){var P=z.memoizedProps,Ee=z.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?P:ft(t.type,P),Ee);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(_){Se(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return z=au,au=!1,z}function xr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&pi(t,n,o)}l=l.next}while(l!==r)}}function kl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function hi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function su(e){var t=e.alternate;t!==null&&(e.alternate=null,su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[cr],delete t[To],delete t[id],delete t[ad])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uu(e){return e.tag===5||e.tag===3||e.tag===4}function cu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zr));else if(r!==4&&(e=e.child,e!==null))for(mi(e,t,n),e=e.sibling;e!==null;)mi(e,t,n),e=e.sibling}function gi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gi(e,t,n),e=e.sibling;e!==null;)gi(e,t,n),e=e.sibling}var Fe=null,pt=!1;function Vt(e,t,n){for(n=n.child;n!==null;)du(e,t,n),n=n.sibling}function du(e,t,n){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Ir,n)}catch{}switch(n.tag){case 5:Ve||Mn(n,t);case 6:var r=Fe,l=pt;Fe=null,Vt(e,t,n),Fe=r,pt=l,Fe!==null&&(pt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(pt?(e=Fe,n=n.stateNode,e.nodeType===8?Po(e.parentNode,n):e.nodeType===1&&Po(e,n),qn(e)):Po(Fe,n.stateNode));break;case 4:r=Fe,l=pt,Fe=n.stateNode.containerInfo,pt=!0,Vt(e,t,n),Fe=r,pt=l;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&((o&2)!==0||(o&4)!==0)&&pi(n,t,i),l=l.next}while(l!==r)}Vt(e,t,n);break;case 1:if(!Ve&&(Mn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,t,a)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,Vt(e,t,n),Ve=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function fu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _d),t.forEach(function(r){var l=Id.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nd(r/1960))-r,10e?16:e,Bt===null)var r=!1;else{if(e=Bt,Bt=null,Cl=0,(te&6)!==0)throw Error(d(331));var l=te;for(te|=4,j=e.current;j!==null;){var o=j,i=o.child;if((j.flags&16)!==0){var a=o.deletions;if(a!==null){for(var s=0;s_e()-wi?un(e,0):yi|=n),Ze(e,t)}function Cu(e,t){t===0&&((e.mode&1)===0?t=1:(t=Or,Or<<=1,(Or&130023424)===0&&(Or=4194304)));var n=Be();e=Nt(e,t),e!==null&&(Yn(e,t,n),Ze(e,n))}function Ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Cu(e,n)}function Id(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(d(314))}r!==null&&r.delete(t),Cu(e,n)}var Nu;Nu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Xe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Xe=!1,kd(e,t,n);Xe=(e.flags&131072)!==0}else Xe=!1,pe&&(t.flags&1048576)!==0&&os(t,rl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yl(e,t),e=t.pendingProps;var l=Cn(t,Ae.current);Rn(t,n),l=Go(null,t,r,e,l,n);var o=Zo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(o=!0,el(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Vo(t),l.updater=gl,t.stateNode=l,l._reactInternals=t,ri(t,r,e,n),t=ai(null,t,r,!0,o,n)):(t.tag=0,pe&&o&&Io(t),We(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Od(r),e=ft(r,e),l){case 0:t=ii(null,t,r,e,n);break e;case 1:t=Js(null,t,r,e,n);break e;case 11:t=Ks(null,t,r,e,n);break e;case 14:t=Ys(null,t,r,ft(r.type,e),n);break e}throw Error(d(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),ii(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),Js(e,t,r,l,n);case 3:e:{if(qs(t),e===null)throw Error(d(387));r=t.pendingProps,o=t.memoizedState,l=o.element,hs(e,t),ul(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=In(Error(d(423)),t),t=eu(e,t,r,n,l);break e}else if(r!==l){l=In(Error(d(424)),t),t=eu(e,t,r,n,l);break e}else for(tt=Ft(t.stateNode.containerInfo.firstChild),et=t,pe=!0,dt=null,n=fs(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===l){t=zt(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return vs(t),e===null&&Do(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,jo(r,l)?i=null:o!==null&&jo(r,o)&&(t.flags|=32),Zs(e,t),We(e,t,i,n),t.child;case 6:return e===null&&Do(t),null;case 13:return tu(e,t,n);case 4:return Wo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pn(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),Ks(e,t,r,l,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,se(il,r._currentValue),r._currentValue=i,o!==null)if(ct(o.value,i)){if(o.children===l.children&&!Ke.current){t=zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=jt(-1,n&-n),s.tag=2;var h=o.updateQueue;if(h!==null){h=h.shared;var k=h.pending;k===null?s.next=s:(s.next=k.next,k.next=s),h.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),$o(o.return,n,t),a.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(d(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),$o(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}We(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Rn(t,n),l=ot(l),r=r(l),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,l=ft(r,t.pendingProps),l=ft(r.type,l),Ys(e,t,r,l,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ft(r,l),yl(e,t),t.tag=1,Ye(r)?(e=!0,el(t)):e=!1,Rn(t,n),As(t,r,l),ri(t,r,l,n),ai(null,t,r,!0,e,n);case 19:return ru(e,t,n);case 22:return Gs(e,t,n)}throw Error(d(156,t.tag))};function ju(e,t){return ia(e,t)}function Md(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new Md(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Od(e){if(typeof e=="function")return ji(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Le)return 11;if(e===Ie)return 14}return 2}function Yt(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")ji(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Re:return dn(n.children,l,o,t);case he:i=8,l|=8;break;case xe:return e=st(12,n,t,l|2),e.elementType=xe,e.lanes=o,e;case me:return e=st(13,n,t,l),e.elementType=me,e.lanes=o,e;case ge:return e=st(19,n,t,l),e.elementType=ge,e.lanes=o,e;case ie:return Tl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:i=10;break e;case Qe:i=9;break e;case Le:i=11;break e;case Ie:i=14;break e;case Ne:i=16,r=null;break e}throw Error(d(130,e==null?e:typeof e,""))}return t=st(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function dn(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function Tl(e,t,n,r){return e=st(22,e,r,t),e.elementType=ie,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function Pi(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=to(0),this.expirationTimes=to(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=to(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,t,n,r,l,o,i,a,s){return e=new Dd(e,t,n,a,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=st(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vo(o),e}function Fd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y)}catch(E){console.error(E)}}return y(),Di.exports=Gd(),Di.exports}var $u;function Jd(){if($u)return Fl;$u=1;var y=Zd();return Fl.createRoot=y.createRoot,Fl.hydrateRoot=y.hydrateRoot,Fl}var qd=Jd();/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function li(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function oi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yd=typeof WeakMap=="function"?WeakMap:Map;function Hs(e,t,n){n=Lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_l||(_l=!0,xi=r),oi(e,t)},n}function Vs(e,t,n){n=Lt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){oi(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){oi(e,t),typeof r!="function"&&(Kt===null?Kt=new Set([this]):Kt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Bs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Rd.bind(null,e,t,n),t.then(e,e))}function Ws(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Qs(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Lt(-1,1),t.tag=2,Wt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var wd=ce.ReactCurrentOwner,Je=!1;function Ye(e,t,n,r){t.child=e===null?fs(t,null,n,r):Tn(t,e.child,n,r)}function Ks(e,t,n,r,l){n=n.render;var o=t.ref;return Rn(t,l),r=Go(e,t,n,r,o,l),n=Zo(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Rt(e,t,l)):(we&&n&&bo(t),t.flags|=1,Ye(e,t,r,l),t.child)}function Ys(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!ji(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Xs(e,t,o,r,l)):(e=Pl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&l)===0){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:or,n(i,r)&&e.ref===t.ref)return Rt(e,t,l)}return t.flags|=1,e=Zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Xs(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(or(o,r)&&e.ref===t.ref)if(Je=!1,t.pendingProps=r=o,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,Rt(e,t,l)}return ii(e,t,n,r,l)}function Gs(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(Mn,ot),ot|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(Mn,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,he(Mn,ot),ot|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,he(Mn,ot),ot|=r;return Ye(e,t,l,n),t.child}function Zs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ii(e,t,n,r,l){var o=Ze(n)?nn:Be.current;return o=Cn(t,o),Rn(t,l),n=Go(e,t,n,r,o,l),r=Zo(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Rt(e,t,l)):(we&&r&&bo(t),t.flags|=1,Ye(e,t,n,l),t.child)}function Js(e,t,n,r,l){if(Ze(n)){var o=!0;el(t)}else o=!1;if(Rn(t,l),t.stateNode===null)yl(e,t),As(t,n,r),ri(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var s=i.context,h=n.contextType;typeof h=="object"&&h!==null?h=st(h):(h=Ze(n)?nn:Be.current,h=Cn(t,h));var w=n.getDerivedStateFromProps,x=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function";x||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||s!==h)&&$s(t,i,r,h),Bt=!1;var y=t.memoizedState;i.state=y,ul(t,r,i,l),s=t.memoizedState,a!==r||y!==s||Ge.current||Bt?(typeof w=="function"&&(ni(t,n,w,r),s=t.memoizedState),(a=Bt||Us(t,n,a,r,y,s,h))?(x||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=h,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ms(e,t),a=t.memoizedProps,h=t.type===t.elementType?a:ht(t.type,a),i.props=h,x=t.pendingProps,y=i.context,s=n.contextType,typeof s=="object"&&s!==null?s=st(s):(s=Ze(n)?nn:Be.current,s=Cn(t,s));var z=n.getDerivedStateFromProps;(w=typeof z=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==x||y!==s)&&$s(t,i,r,s),Bt=!1,y=t.memoizedState,i.state=y,ul(t,r,i,l);var T=t.memoizedState;a!==x||y!==T||Ge.current||Bt?(typeof z=="function"&&(ni(t,n,z,r),T=t.memoizedState),(h=Bt||Us(t,n,h,r,y,T,s)||!1)?(w||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,T,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,T,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=T),i.props=r,i.state=T,i.context=s,r=h):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),r=!1)}return ai(e,t,n,r,o,l)}function ai(e,t,n,r,l,o){Zs(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&rs(t,n,!1),Rt(e,t,o);r=t.stateNode,wd.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Tn(t,e.child,null,o),t.child=Tn(t,null,a,o)):Ye(e,t,a,o),t.memoizedState=r.state,l&&rs(t,n,!0),t.child}function qs(e){var t=e.stateNode;t.pendingContext?ts(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ts(e,t.context,!1),Bo(e,t.containerInfo)}function eu(e,t,n,r,l){return Pn(),Do(l),t.flags|=256,Ye(e,t,n,r),t.child}var si={dehydrated:null,treeContext:null,retryLane:0};function ui(e){return{baseLanes:e,cachePool:null,transitions:null}}function tu(e,t,n){var r=t.pendingProps,l=ke.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),he(ke,l&1),e===null)return Mo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Tl(i,r,0,null),e=pn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ui(n),t.memoizedState=si,e):ci(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return xd(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var s={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Zt(l,s),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=Zt(a,o):(o=pn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?ui(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=si,r}return o=e.child,e=o.sibling,r=Zt(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ci(e,t){return t=Tl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vl(e,t,n,r){return r!==null&&Do(r),Tn(t,e.child,null,n),e=ci(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xd(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=li(Error(d(422))),vl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Tl({mode:"visible",children:r.children},l,0,null),o=pn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&Tn(t,e.child,null,i),t.child.memoizedState=ui(i),t.memoizedState=si,o);if((t.mode&1)===0)return vl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(d(419)),r=li(o,r,void 0),vl(e,t,i,r)}if(a=(i&e.childLanes)!==0,Je||a){if(r=De,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|i))!==0?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Tt(e,l),yt(r,e,l,-1))}return Ci(),r=li(Error(d(421))),vl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=bd.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,lt=At(l.nextSibling),rt=t,we=!0,mt=null,e!==null&&(it[at++]=zt,it[at++]=Pt,it[at++]=rn,zt=e.id,Pt=e.overflow,rn=t),t=ci(t,r.children),t.flags|=4096,t)}function nu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$o(e.return,t,n)}function di(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function ru(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Ye(e,t,r.children,n),r=ke.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nu(e,n,t);else if(e.tag===19)nu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(he(ke,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&cl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),di(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&cl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}di(t,!0,n,null,o);break;case"together":di(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),un|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=Zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kd(e,t,n){switch(t.tag){case 3:qs(t),Pn();break;case 5:vs(t);break;case 1:Ze(t.type)&&el(t);break;case 4:Bo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;he(il,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(he(ke,ke.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?tu(e,t,n):(he(ke,ke.current&1),e=Rt(e,t,n),e!==null?e.sibling:null);he(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return ru(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),he(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Gs(e,t,n)}return Rt(e,t,n)}var lu,fi,ou,iu;lu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},fi=function(){},ou=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,an(St.current);var o=null;switch(n){case"input":l=An(e,l),r=An(e,r),o=[];break;case"select":l=S({},l,{value:void 0}),r=S({},r,{value:void 0}),o=[];break;case"textarea":l=Vl(e,l),r=Vl(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zr)}Wl(n,r);var i;n=null;for(h in l)if(!r.hasOwnProperty(h)&&l.hasOwnProperty(h)&&l[h]!=null)if(h==="style"){var a=l[h];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else h!=="dangerouslySetInnerHTML"&&h!=="children"&&h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(I.hasOwnProperty(h)?o||(o=[]):(o=o||[]).push(h,null));for(h in r){var s=r[h];if(a=l?.[h],r.hasOwnProperty(h)&&s!==a&&(s!=null||a!=null))if(h==="style")if(a){for(i in a)!a.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in s)s.hasOwnProperty(i)&&a[i]!==s[i]&&(n||(n={}),n[i]=s[i])}else n||(o||(o=[]),o.push(h,n)),n=s;else h==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,a=a?a.__html:void 0,s!=null&&a!==s&&(o=o||[]).push(h,s)):h==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(h,""+s):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&(I.hasOwnProperty(h)?(s!=null&&h==="onScroll"&&ge("scroll",e),o||a===s||(o=[])):(o=o||[]).push(h,s))}n&&(o=o||[]).push("style",n);var h=o;(t.updateQueue=h)&&(t.flags|=4)}},iu=function(e,t,n,r){n!==r&&(t.flags|=4)};function xr(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Sd(e,t,n){var r=t.pendingProps;switch(Io(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return Ze(t.type)&&qr(),Qe(t),null;case 3:return r=t.stateNode,bn(),ve(Ge),ve(Be),Ko(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ll(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mt!==null&&(_i(mt),mt=null))),fi(e,t),Qe(t),null;case 5:Wo(t);var l=an(hr.current);if(n=t.type,e!==null&&t.stateNode!=null)ou(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(d(166));return Qe(t),null}if(e=an(St.current),ll(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[kt]=t,r[cr]=o,e=(t.mode&1)!==0,n){case"dialog":ge("cancel",r),ge("close",r);break;case"iframe":case"object":case"embed":ge("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[kt]=t,e[cr]=r,lu(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ql(n,r),n){case"dialog":ge("cancel",e),ge("close",e),l=r;break;case"iframe":case"object":case"embed":ge("load",e),l=r;break;case"video":case"audio":for(l=0;lDn&&(t.flags|=128,r=!0,xr(o,!1),t.lanes=4194304)}else{if(!r)if(e=cl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!we)return Qe(t),null}else 2*Pe()-o.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,xr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Pe(),t.sibling=null,n=ke.current,he(ke,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return Ni(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(d(156,t.tag))}function _d(e,t){switch(Io(t),t.tag){case 1:return Ze(t.type)&&qr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bn(),ve(Ge),ve(Be),Ko(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Wo(t),null;case 13:if(ve(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(ke),null;case 4:return bn(),null;case 10:return Ao(t.type._context),null;case 22:case 23:return Ni(),null;case 24:return null;default:return null}}var wl=!1,Ke=!1,Ed=typeof WeakSet=="function"?WeakSet:Set,P=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function pi(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var au=!1;function Nd(e,t){if(No=Ur,e=Ua(),vo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,s=-1,h=0,w=0,x=e,y=null;t:for(;;){for(var z;x!==n||l!==0&&x.nodeType!==3||(a=i+l),x!==o||r!==0&&x.nodeType!==3||(s=i+r),x.nodeType===3&&(i+=x.nodeValue.length),(z=x.firstChild)!==null;)y=x,x=z;for(;;){if(x===e)break t;if(y===n&&++h===l&&(a=i),y===o&&++w===r&&(s=i),(z=x.nextSibling)!==null)break;x=y,y=x.parentNode}x=z}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Co={focusedElem:e,selectionRange:n},Ur=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var T=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var b=T.memoizedProps,Te=T.memoizedState,p=t.stateNode,c=p.getSnapshotBeforeUpdate(t.elementType===t.type?b:ht(t.type,b),Te);p.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(d(163))}}catch(k){Ce(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return T=au,au=!1,T}function kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&pi(t,n,o)}l=l.next}while(l!==r)}}function xl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function su(e){var t=e.alternate;t!==null&&(e.alternate=null,su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[cr],delete t[To],delete t[ad],delete t[sd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uu(e){return e.tag===5||e.tag===3||e.tag===4}function cu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zr));else if(r!==4&&(e=e.child,e!==null))for(hi(e,t,n),e=e.sibling;e!==null;)hi(e,t,n),e=e.sibling}function gi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gi(e,t,n),e=e.sibling;e!==null;)gi(e,t,n),e=e.sibling}var $e=null,gt=!1;function Qt(e,t,n){for(n=n.child;n!==null;)du(e,t,n),n=n.sibling}function du(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(br,n)}catch{}switch(n.tag){case 5:Ke||On(n,t);case 6:var r=$e,l=gt;$e=null,Qt(e,t,n),$e=r,gt=l,$e!==null&&(gt?(e=$e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$e.removeChild(n.stateNode));break;case 18:$e!==null&&(gt?(e=$e,n=n.stateNode,e.nodeType===8?Po(e.parentNode,n):e.nodeType===1&&Po(e,n),qn(e)):Po($e,n.stateNode));break;case 4:r=$e,l=gt,$e=n.stateNode.containerInfo,gt=!0,Qt(e,t,n),$e=r,gt=l;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&((o&2)!==0||(o&4)!==0)&&pi(n,t,i),l=l.next}while(l!==r)}Qt(e,t,n);break;case 1:if(!Ke&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ce(n,t,a)}Qt(e,t,n);break;case 21:Qt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Qt(e,t,n),Ke=r):Qt(e,t,n);break;default:Qt(e,t,n)}}function fu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ed),t.forEach(function(r){var l=Id.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jd(r/1960))-r,10e?16:e,Yt===null)var r=!1;else{if(e=Yt,Yt=null,Nl=0,(ae&6)!==0)throw Error(d(331));var l=ae;for(ae|=4,P=e.current;P!==null;){var o=P,i=o.child;if((P.flags&16)!==0){var a=o.deletions;if(a!==null){for(var s=0;sPe()-wi?dn(e,0):yi|=n),et(e,t)}function Nu(e,t){t===0&&((e.mode&1)===0?t=1:(t=Or,Or<<=1,(Or&130023424)===0&&(Or=4194304)));var n=Xe();e=Tt(e,t),e!==null&&(Yn(e,t,n),et(e,n))}function bd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nu(e,n)}function Id(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(d(314))}r!==null&&r.delete(t),Nu(e,n)}var Cu;Cu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Je=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Je=!1,kd(e,t,n);Je=(e.flags&131072)!==0}else Je=!1,we&&(t.flags&1048576)!==0&&os(t,rl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yl(e,t),e=t.pendingProps;var l=Cn(t,Be.current);Rn(t,n),l=Go(null,t,r,e,l,n);var o=Zo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(o=!0,el(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Vo(t),l.updater=gl,t.stateNode=l,l._reactInternals=t,ri(t,r,e,n),t=ai(null,t,r,!0,o,n)):(t.tag=0,we&&o&&bo(t),Ye(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Md(r),e=ht(r,e),l){case 0:t=ii(null,t,r,e,n);break e;case 1:t=Js(null,t,r,e,n);break e;case 11:t=Ks(null,t,r,e,n);break e;case 14:t=Ys(null,t,r,ht(r.type,e),n);break e}throw Error(d(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),ii(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Js(e,t,r,l,n);case 3:e:{if(qs(t),e===null)throw Error(d(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ms(e,t),ul(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=In(Error(d(423)),t),t=eu(e,t,r,n,l);break e}else if(r!==l){l=In(Error(d(424)),t),t=eu(e,t,r,n,l);break e}else for(lt=At(t.stateNode.containerInfo.firstChild),rt=t,we=!0,mt=null,n=fs(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pn(),r===l){t=Rt(e,t,n);break e}Ye(e,t,r,n)}t=t.child}return t;case 5:return vs(t),e===null&&Mo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,jo(r,l)?i=null:o!==null&&jo(r,o)&&(t.flags|=32),Zs(e,t),Ye(e,t,i,n),t.child;case 6:return e===null&&Mo(t),null;case 13:return tu(e,t,n);case 4:return Bo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tn(t,null,r,n):Ye(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Ks(e,t,r,l,n);case 7:return Ye(e,t,t.pendingProps,n),t.child;case 8:return Ye(e,t,t.pendingProps.children,n),t.child;case 12:return Ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,he(il,r._currentValue),r._currentValue=i,o!==null)if(pt(o.value,i)){if(o.children===l.children&&!Ge.current){t=Rt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Lt(-1,n&-n),s.tag=2;var h=o.updateQueue;if(h!==null){h=h.shared;var w=h.pending;w===null?s.next=s:(s.next=w.next,w.next=s),h.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),$o(o.return,n,t),a.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(d(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),$o(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ye(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Rn(t,n),l=st(l),r=r(l),t.flags|=1,Ye(e,t,r,n),t.child;case 14:return r=t.type,l=ht(r,t.pendingProps),l=ht(r.type,l),Ys(e,t,r,l,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),yl(e,t),t.tag=1,Ze(r)?(e=!0,el(t)):e=!1,Rn(t,n),As(t,r,l),ri(t,r,l,n),ai(null,t,r,!0,e,n);case 19:return ru(e,t,n);case 22:return Gs(e,t,n)}throw Error(d(156,t.tag))};function ju(e,t){return ia(e,t)}function Od(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new Od(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Md(e){if(typeof e=="function")return ji(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ye)return 11;if(e===Ae)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")ji(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ee:return pn(n.children,l,o,t);case je:i=8,l|=8;break;case Ue:return e=dt(12,n,t,l|2),e.elementType=Ue,e.lanes=o,e;case le:return e=dt(13,n,t,l),e.elementType=le,e.lanes=o,e;case de:return e=dt(19,n,t,l),e.elementType=de,e.lanes=o,e;case oe:return Tl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ne:i=10;break e;case ze:i=9;break e;case ye:i=11;break e;case Ae:i=14;break e;case ie:i=16,r=null;break e}throw Error(d(130,e==null?e:typeof e,""))}return t=dt(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function pn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Tl(e,t,n,r){return e=dt(22,e,r,t),e.elementType=oe,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Pi(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=to(0),this.expirationTimes=to(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=to(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,t,n,r,l,o,i,a,s){return e=new Dd(e,t,n,a,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vo(o),e}function Fd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v)}catch(N){console.error(N)}}return v(),Mi.exports=Zd(),Mi.exports}var $u;function qd(){if($u)return Dl;$u=1;var v=Jd();return Dl.createRoot=v.createRoot,Dl.hydrateRoot=v.hydrateRoot,Dl}var ef=qd();/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ef=y=>y.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tf=y=>y.replace(/^([A-Z])|[\s-_]+(\w)/g,(E,d,U)=>U?U.toUpperCase():d.toLowerCase()),Hu=y=>{const E=tf(y);return E.charAt(0).toUpperCase()+E.slice(1)},Wu=(...y)=>y.filter((E,d,U)=>!!E&&E.trim()!==""&&U.indexOf(E)===d).join(" ").trim();/** + */const tf=v=>v.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nf=v=>v.replace(/^([A-Z])|[\s-_]+(\w)/g,(N,d,V)=>V?V.toUpperCase():d.toLowerCase()),Hu=v=>{const N=nf(v);return N.charAt(0).toUpperCase()+N.slice(1)},Wu=(...v)=>v.filter((N,d,V)=>!!N&&N.trim()!==""&&V.indexOf(N)===d).join(" ").trim();/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var nf={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"};/** + */var rf={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"};/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rf=C.forwardRef(({color:y="currentColor",size:E=24,strokeWidth:d=2,absoluteStrokeWidth:U,className:T="",children:L,iconNode:B,...G},A)=>C.createElement("svg",{ref:A,...nf,width:E,height:E,stroke:y,strokeWidth:U?Number(d)*24/Number(E):d,className:Wu("lucide",T),...G},[...B.map(([Q,Z])=>C.createElement(Q,Z)),...Array.isArray(L)?L:[L]]));/** + */const lf=C.forwardRef(({color:v="currentColor",size:N=24,strokeWidth:d=2,absoluteStrokeWidth:V,className:I="",children:M,iconNode:Z,...ee},R)=>C.createElement("svg",{ref:R,...rf,width:N,height:N,stroke:v,strokeWidth:V?Number(d)*24/Number(N):d,className:Wu("lucide",I),...ee},[...Z.map(([Y,te])=>C.createElement(Y,te)),...Array.isArray(M)?M:[M]]));/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Gt=(y,E)=>{const d=C.forwardRef(({className:U,...T},L)=>C.createElement(rf,{ref:L,iconNode:E,className:Wu(`lucide-${ef(Hu(y))}`,`lucide-${y}`,U),...T}));return d.displayName=Hu(y),d};/** + */const Nt=(v,N)=>{const d=C.forwardRef(({className:V,...I},M)=>C.createElement(lf,{ref:M,iconNode:N,className:Wu(`lucide-${tf(Hu(v))}`,`lucide-${v}`,V),...I}));return d.displayName=Hu(v),d};/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lf=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Bu=Gt("cloud",lf);/** + */const of=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Qu=Nt("cloud",of);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const of=[["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"}]],Al=Gt("external-link",of);/** + */const af=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],sf=Nt("download",af);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const af=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],sf=Gt("eye-off",af);/** + */const uf=[["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"}]],Al=Nt("external-link",uf);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uf=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],cf=Gt("eye",uf);/** + */const cf=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],df=Nt("eye-off",cf);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const df=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ff=Gt("folder-open",df);/** + */const ff=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pf=Nt("eye",ff);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pf=[["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"}]],hf=Gt("refresh-cw",pf);/** + */const mf=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],hf=Nt("folder-open",mf);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mf=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],gf=Gt("save",mf);/** + */const gf=[["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"}]],vf=Nt("refresh-cw",gf);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vf=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Vu=Gt("smartphone",vf);function yf(){return m.jsx("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:m.jsx("div",{className:"flex items-start",children:m.jsxs("div",{className:"flex-1",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[m.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-50 flex items-center justify-center",children:m.jsx(Bu,{className:"w-6 h-6 text-blue-600"})}),m.jsx("h2",{className:"text-slate-800",children:"DDNSTO 远程访问"})]}),m.jsx("p",{className:"text-slate-600 text-sm mb-2",children:"DDNSTO 远程访问,不需要公网 IP、不需要开放端口。只需一个链接,即可从任何地方安全访问您的 NAS、路由器和桌面。"}),m.jsxs("a",{href:"https://www.ddnsto.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline",children:["了解更多",m.jsx(Al,{className:"w-3 h-3"})]})]})})})}function wf({isRunning:y,isConfigured:E,hostname:d,address:U,deviceId:T,version:L,featEnabled:B,tunnelOk:G,onRefreshStatus:A}){const[Q,Z]=C.useState(!1),W={label:y?"运行中":"已停止",bgColor:y?"bg-green-100":"bg-slate-200",textColor:y?"text-green-700":"text-slate-600"},H=U&&U.trim().length>0?U:"未配置",q=Q,ae=G===!0,V=q?"检查中...":G===!0?"正常":G===!1?"无法连接服务器":"未知",Y=B==="1"||B===!0?"已开启":"未开启",we=T||"-",ze=async()=>{if(A){Z(!0);try{await A()}finally{Z(!1)}}};return m.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[m.jsx("h3",{className:"text-slate-800 mb-4",children:"运行状态"}),m.jsxs("div",{className:"flex items-center justify-between pb-6 border-b border-slate-100",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("span",{className:`px-3 py-1 rounded-full text-sm ${W.bgColor} ${W.textColor}`,children:W.label}),E&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-sm text-slate-500",children:"远程访问域名:"}),U&&U.trim().length>0?m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs("a",{href:H,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline flex items-center gap-1",children:[H,m.jsx(Al,{className:"w-3 h-3"})]}),m.jsx("span",{className:"text-xs text-amber-600",title:"如域名已失效,请重新运行快速向导",children:"(如失效请重新运行快速向导)"})]}):m.jsx("span",{className:"text-sm text-slate-500",children:H})]})]}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsxs("button",{onClick:ze,className:"px-3 py-2 rounded-md text-blue-600 text-sm hover:bg-blue-50 transition-colors flex items-center gap-1",children:[m.jsx(hf,{className:"w-4 h-4"}),"刷新状态"]})})]}),m.jsx("div",{className:"mt-6",children:m.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-700",children:[m.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),q&&m.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-slate-300 border-t-blue-600 animate-spin"}),m.jsxs("h4",{className:"text-sm text-slate-700",children:["服务器连接:",ae?m.jsx("span",{className:"text-green-600",children:V}):m.jsx("span",{children:V}),"| 设备 ID:",we," | 拓展功能:",Y,L?` | 版本:${L}`:""]})]})})]})}function Qu({checked:y,onChange:E,label:d,id:U,disabled:T,containerClassName:L,...B}){return m.jsxs("div",{className:`ddnsto-toggle-container ${L||""}`,children:[d&&m.jsx("label",{htmlFor:U,className:"text-sm text-slate-700 mr-3 whitespace-nowrap",children:d}),m.jsxs("label",{className:"ddnsto-toggle-switch","aria-label":d||"toggle",children:[m.jsx("input",{id:U,type:"checkbox",checked:y,disabled:T,onChange:G=>E(G.target.checked),...B}),m.jsx("span",{className:"ddnsto-toggle-slider","aria-hidden":!0})]})]})}function kf({onSave:y,isInTab:E,token:d,enabled:U,advancedConfig:T,onRegisterSave:L,onTokenChange:B,onEnabledChange:G}){const[A,Q]=C.useState(d||""),[Z,W]=C.useState(U);C.useEffect(()=>{Q(d||"")},[d]),C.useEffect(()=>{W(U)},[T,U]);const H=()=>{A.trim()&&y(A,Z?"1":"0",T)};return C.useEffect(()=>{L&&L(()=>H())},[L,A,Z,T]),m.jsxs("div",{className:E?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!E&&m.jsxs(m.Fragment,{children:[m.jsx("h3",{className:"text-slate-800 mb-2",children:"手动配置"}),m.jsx("p",{className:"text-xs text-slate-400 mb-6",children:"如果您已经在 DDNSTO 控制台获取了令牌,可以直接在此填写并启动插件。"})]}),m.jsxs("div",{className:"space-y-5",children:[m.jsx("div",{className:"pb-4",children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h4",{className:"text-sm text-slate-700",children:"启用 DDNSTO"}),m.jsx(Qu,{checked:Z,onChange:q=>{W(q),G?.(q)},"aria-label":"启用 DDNSTO",containerClassName:"ml-6"})]})}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[m.jsxs("label",{className:"text-sm text-slate-700",children:["用户令牌(Token) ",m.jsx("span",{className:"text-red-500",children:"*"})]}),m.jsxs("a",{href:"https://doc.ddnsto.com/zh/guide/ddnsto/quickstart/",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline flex items-center gap-1",children:["如何查看用户令牌",m.jsx(Al,{className:"w-3 h-3"})]})]}),m.jsx("div",{className:"relative",children:m.jsx("input",{type:"text",value:A,onChange:q=>{Q(q.target.value),B?.(q.target.value)},placeholder:"请输入您的 DDNSTO 令牌",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})}),m.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"令牌将保存在路由器本地,请勿泄露。"})]})]})]})}function xf({token:y,enabled:E,advancedConfig:d,onSave:U,isInTab:T,onRegisterSave:L}){const[B,G]=C.useState(d.feat_enabled==="1"),A=K=>K.feat_disk_path_selected?K.feat_disk_path_selected:K.mounts&&K.mounts.length>0?K.mounts[0]:"",[Q,Z]=C.useState(A(d)),[W,H]=C.useState(d.feat_port||"3033"),[q,ae]=C.useState(d.feat_username||"ddnsto"),[V,Y]=C.useState(d.feat_password||""),[we,ze]=C.useState(!1),[ke,fe]=C.useState(d.index||"");C.useEffect(()=>{G(d.feat_enabled==="1"),Z(A(d)),d.feat_port&&H(d.feat_port),d.feat_username&&ae(d.feat_username),d.feat_password&&Y(d.feat_password),d.index!==void 0&&fe(d.index)},[d]);const Ce=()=>{U(y,E?"1":"0",{feat_enabled:B?"1":"0",feat_port:W,feat_username:q,feat_password:V,feat_disk_path_selected:Q,mounts:d.mounts,index:ke})};return C.useEffect(()=>{L&&L(()=>Ce())},[L,y,E,B,Q,W,q,V,ke,d.mounts]),m.jsxs("div",{className:T?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!T&&m.jsx("h3",{className:"text-slate-800 mb-4",children:"高级功能"}),m.jsxs("div",{className:"space-y-5",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm text-slate-700 mb-2",children:"设备编号(可选)"}),m.jsx("input",{type:"text",value:ke,onChange:K=>fe(K.target.value),placeholder:"",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),m.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"如有多台设备id重复,请修改此编号(0~100),正常情况不需要修改"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h4",{className:"text-sm text-slate-700",children:"启用拓展功能"}),m.jsx(Qu,{checked:B,onChange:K=>G(K),"aria-label":"启用拓展功能",containerClassName:"ml-6"})]}),m.jsxs("div",{className:"flex items-center gap-2 -mt-2",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"启用后可支持控制台的「文件管理」及「远程开机」功能"}),m.jsxs("a",{href:"https://doc.ddnsto.com/zh/guide/ddnsto/scenarios/file-management.html",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline flex items-center gap-1 whitespace-nowrap",children:["查看教程",m.jsx(Al,{className:"w-3 h-3"})]})]}),B&&m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ff,{className:"w-4 h-4 text-slate-600"}),m.jsx("h5",{className:"text-sm text-slate-700",children:"WebDAV 服务配置"})]}),m.jsxs("div",{className:"space-y-4 pl-6",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"可访问的文件目录"}),m.jsx("select",{value:Q,onChange:K=>Z(K.target.value),className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white",children:d.mounts&&d.mounts.length>0?d.mounts.map(K=>m.jsx("option",{value:K,children:K},K)):m.jsx("option",{value:"",disabled:!0,children:"未检测到挂载点"})}),m.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"控制台上的文件管理将只能看到此目录及其子目录。"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"服务端口"}),m.jsx("input",{type:"text",value:W,onChange:K=>H(K.target.value),placeholder:"3033",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"授权用户名"}),m.jsx("input",{type:"text",value:q,onChange:K=>ae(K.target.value),placeholder:"ddnsto",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"授权用户密码"}),m.jsxs("div",{className:"relative",children:[m.jsx("input",{type:we?"text":"password",value:V,onChange:K=>Y(K.target.value),placeholder:"设置访问密码",className:"w-full px-3 py-2 pr-10 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),m.jsx("button",{type:"button",onClick:()=>ze(!we),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",children:we?m.jsx(sf,{className:"w-4 h-4"}):m.jsx(cf,{className:"w-4 h-4"})})]})]})]})]})]})]})}function Sf({ddnstoToken:y,ddnstoEnabled:E,advancedConfig:d,onSave:U,saveBanner:T}){const[L,B]=C.useState("basic"),G=C.useRef(null),A=C.useRef(),Q=C.useRef(),[Z,W]=C.useState(y||""),[H,q]=C.useState(E==="1");C.useEffect(()=>{W(y||"")},[y]),C.useEffect(()=>{q(E==="1")},[E]);const ae=()=>{L==="basic"?A.current?.():Q.current?.()};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 mb-4",children:[m.jsx("div",{className:"border-b border-slate-200 px-6",children:m.jsx("div",{className:"flex items-center justify-between",children:m.jsxs("div",{className:"flex items-center -mb-px",children:[m.jsx("button",{onClick:()=>B("basic"),className:`px-4 py-4 text-sm border-b-2 transition-colors ${L==="basic"?"border-blue-600 text-blue-600":"border-transparent text-slate-600 hover:text-slate-800"}`,children:"基础配置"}),m.jsx("button",{onClick:()=>B("advanced"),className:`px-4 py-4 text-sm border-b-2 transition-colors ${L==="advanced"?"border-blue-600 text-blue-600":"border-transparent text-slate-600 hover:text-slate-800"}`,children:"高级功能"})]})})}),m.jsxs("div",{ref:G,className:"p-6",children:[L==="basic"&&m.jsx(kf,{token:Z,enabled:H,advancedConfig:d,onSave:U,isInTab:!0,onRegisterSave:V=>{A.current=V},onTokenChange:W,onEnabledChange:q}),L==="advanced"&&m.jsx(xf,{token:Z,enabled:H,advancedConfig:d,onSave:U,isInTab:!0,onRegisterSave:V=>{Q.current=V}})]})]}),m.jsx("div",{className:"flex justify-end gap-3 mt-4",children:m.jsxs("button",{onClick:ae,disabled:!Z.trim(),className:"ddnsto-btn ddnsto-btn-primary",children:[m.jsx(gf,{className:"ddnsto-btn-icon"}),"保存配置并应用"]})}),T.state!=="idle"&&m.jsxs("div",{className:["mt-2 rounded-md border px-3 py-2 text-sm",T.state==="loading"?"bg-blue-50 border-blue-200 text-blue-800":"",T.state==="success"?"bg-emerald-50 border-emerald-200 text-emerald-800":"",T.state==="error"?"bg-red-50 border-red-200 text-red-800":""].join(" "),children:[m.jsx("div",{className:"font-medium",children:T.message}),T.description&&m.jsx("div",{className:"text-xs mt-1 opacity-80 break-words",children:T.description})]})]})}const bn={auth:0,starting:1,binding:2,domain:3,checking:4};function _f({apiBase:y,csrfToken:E,deviceId:d,onboardingBase:U,onComplete:T,onRefreshStatus:L,isInTab:B}){const[G,A]=C.useState(!1),[Q,Z]=C.useState(U||"https://www.kooldns.cn/bind"),[W,H]=C.useState(`${U||"https://www.kooldns.cn/bind"}/#/auth?send=1&source=openwrt&callback=*`),[q,ae]=C.useState("auth"),[V,Y]=C.useState(d||""),[we,ze]=C.useState(""),[ke,fe]=C.useState(""),[Ce,K]=C.useState(!1),[Re,he]=C.useState(null),xe=C.useRef("auth"),ue=E||(typeof window<"u"?window.ddnstoCsrfToken:""),Qe=C.useCallback(g=>{ae(u=>bn[g]>bn[u]?g:u)},[]);C.useEffect(()=>{xe.current=q},[q]),C.useEffect(()=>{console.log("Onboarding iframe url:",W)},[W]);const Le=C.useCallback(()=>{ae("auth"),ze(""),fe(""),he(null),Y(d||""),H(`${Q}/#/auth?send=1&source=openwrt&callback=*`)},[Qe,d,Q]);C.useEffect(()=>{const g="/#/auth?send=1&source=openwrt&callback=*",u=U||"https://www.kooldns.cn/bind";Z(u),H(`${u}${g}`)},[U]),C.useEffect(()=>{Y(d||"")},[d]);const me=C.useCallback(async()=>{for(let v=0;v<20;v+=1){const M=await fetch(`${y}/admin/services/ddnsto/api/status`,{credentials:"same-origin"});if(M.ok){const X=(await M.json())?.data||{},O=X.deviceId||X.device_id||"";if(O&&Y(O),X.running)return{running:!0,deviceId:O}}await new Promise(b=>setTimeout(b,2e3))}throw new Error("ddnsto not running")},[y]),ge=C.useCallback(async g=>{const u={url:g};ue&&(u.token=ue);const v=await fetch(`${y}/admin/services/ddnsto/api/onboarding/address`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",...ue?{"X-LuCI-Token":ue}:{}},body:JSON.stringify(u)});if(!v.ok)throw new Error(`HTTP ${v.status}`);const M=await v.json();if(!M?.ok)throw new Error(M?.error||"save address failed")},[y,ue]),Ie=C.useCallback(async(g,u)=>{K(!0),he(null);const v=V||d||"",M=`${Q}/#/bind?status=starting&token=${encodeURIComponent(g)}&sign=${encodeURIComponent(u)}${v?`&routerId=${encodeURIComponent(v)}`:""}`;H(M),Qe("starting");try{const b=await fetch(`${y}/admin/services/ddnsto/api/onboarding/start`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",...ue?{"X-LuCI-Token":ue}:{}},body:JSON.stringify({token:g})});if(!b.ok)throw new Error(`HTTP ${b.status}`);const X=await b.json();if(!X?.ok)throw new Error(X?.error||"start failed");L&&await L();const re=(await me())?.deviceId||V||d||"";if(bn[xe.current]>=bn.domain)return;const ee=`${Q}/#/bind?status=starting&routerId=${encodeURIComponent(re)}&token=${encodeURIComponent(g)}&sign=${encodeURIComponent(u)}`;H(ee),Qe("binding"),Y(re)}catch{he("启动失败,请稍后重试")}finally{K(!1)}},[Qe,y,d,ue,Q,L,me,Le,V]),Ne=C.useCallback(g=>{const u=g||V;if(!we||!ke||!u)return;const v=`${Q}/#/domain?sign=${encodeURIComponent(ke)}&token=${encodeURIComponent(we)}&routerId=${encodeURIComponent(u)}&netaddr=127.0.0.1&source=openwrt`;H(v),ae("domain")},[ke,we,Q,V]),ie=C.useCallback(async g=>{H(`${Q}/#/check?url=${encodeURIComponent(g)}`),ae("checking"),T();try{await ge(g),L&&await L()}catch{he("保存域名失败,请重试")}},[Q,T,L,ge]),x=C.useCallback(()=>{A(!0),Le()},[Le]);C.useEffect(()=>{const g=u=>{if(!G)return;console.log("Onboarding message:",u.data);const v=u.data;let M=v;if(typeof v=="string")try{M=JSON.parse(v)}catch{return}if(!M||typeof M!="object")return;const b=M.data,O=b&&typeof b=="object"?b:M;if((typeof O.auth=="string"?O.auth:"")!=="ddnsto")return;const ee=typeof O.sign=="string"?O.sign:"",oe=typeof O.token=="string"?O.token:"",Ue=typeof O.step=="string"?O.step:"",fn=typeof O.status=="string"?O.status:"",Un=typeof O.url=="string"?O.url:"",Tt=O.success,An=typeof Tt=="number"?Tt:Number(Tt);if(ee&&oe&&q==="auth"&&!Ce){ze(oe),fe(ee),Ie(oe,ee);return}if(Ue==="bind"&&fn==="success"){const Zt=typeof O.router_uid=="string"?O.router_uid:V;Zt&&Y(Zt),Ne(Zt);return}Ue==="domain"&&Un&&An===0&&bn[xe.current]window.removeEventListener("message",g)},[Ne,ie,Ce,Ie,G,q]);const I=()=>m.jsx("div",{className:"flex items-center justify-between mb-6",children:m.jsx("h3",{className:"text-slate-800",children:"快速向导"})});return G?m.jsxs("div",{className:B?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!B&&I(),m.jsx("div",{className:"rounded-lg border border-slate-200 overflow-hidden",children:m.jsx("iframe",{src:W,title:"快速向导",className:"w-full",style:{width:"100%",height:"70vh",maxHeight:"400px",border:0},loading:"lazy"})})]}):m.jsxs("div",{className:B?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!B&&I(),m.jsxs("div",{className:"text-center py-8",children:[m.jsx("div",{className:"mb-4 flex justify-center",children:m.jsx("div",{className:"w-16 h-16 rounded-full bg-blue-50 flex items-center justify-center",children:m.jsx(Vu,{className:"w-8 h-8 text-blue-600"})})}),m.jsx("h4",{className:"text-slate-800 mb-2",children:"欢迎使用 DDNSTO!"}),m.jsx("p",{className:"text-sm text-slate-600 mb-6 max-w-md mx-auto",children:"通过微信扫码登录,我们将引导您完成插件配置"}),m.jsxs("button",{onClick:x,className:"ddnsto-btn ddnsto-btn-primary",children:[m.jsx(Vu,{className:"ddnsto-btn-icon"}),"开始配置"]})]})]})}function Ef({config:y}){const[E,d]=C.useState(!1),[U,T]=C.useState(!1),[L,B]=C.useState("OpenWrt"),[G,A]=C.useState(""),[Q,Z]=C.useState(""),[W,H]=C.useState(""),[q,ae]=C.useState(""),[V,Y]=C.useState("1"),[we,ze]=C.useState({feat_enabled:"0",feat_port:"",feat_username:"",feat_password:"",feat_disk_path_selected:"",mounts:[],index:""}),[,ke]=C.useState(null),[fe,Ce]=C.useState(null),[K,Re]=C.useState({state:"idle",message:""}),he=C.useRef(),xe=(y?.api_base||"/cgi-bin/luci").replace(/\/$/,""),ue=y?.token||"",Qe=(y?.onboarding_base||"https://www.kooldns.cn/bind").replace(/\/$/,""),Le=C.useCallback((x,I,g,u)=>{he.current&&window.clearTimeout(he.current),Re({state:x,message:I,description:g}),u&&(he.current=window.setTimeout(()=>{Re({state:"idle",message:""})},u))},[]);C.useEffect(()=>()=>{he.current&&window.clearTimeout(he.current)},[]);const me=C.useCallback(async()=>{try{const x=await fetch(`${xe}/admin/services/ddnsto/api/config`,{credentials:"same-origin"});if(!x.ok)throw new Error(`HTTP ${x.status}`);const g=(await x.json())?.data||{};g.address&&A(g.address),g.device_id!==void 0?Z(g.device_id):g.deviceId!==void 0&&Z(g.deviceId),g.version!==void 0&&H(g.version),g.token&&ae(g.token),g.enabled!==void 0&&Y(g.enabled),ze({feat_enabled:g.feat_enabled||"0",feat_port:g.feat_port||"",feat_username:g.feat_username||"",feat_password:g.feat_password||"",feat_disk_path_selected:g.feat_disk_path_selected||"",mounts:g.mounts||[],index:g.index||""})}catch(x){console.error("Failed to fetch ddnsto config",x)}},[xe]),ge=C.useCallback(async()=>{try{const x=await fetch(`${xe}/admin/services/ddnsto/api/status`,{credentials:"same-origin"});if(!x.ok)throw new Error(`HTTP ${x.status}`);const g=(await x.json())?.data||{};d(!!g.running),g.token_set&&T(!0),g.hostname&&B(g.hostname),g.device_id!==void 0?Z(g.device_id):g.deviceId!==void 0&&Z(g.deviceId),g.address&&A(g.address),g.version!==void 0&&H(g.version),ke(null)}catch(x){console.error("Failed to fetch ddnsto status",x),ke("无法获取运行状态")}},[xe]),Ie=C.useCallback(async()=>{try{const x=await fetch(`${xe}/admin/services/ddnsto/api/connectivity`,{credentials:"same-origin"});if(!x.ok)throw new Error(`HTTP ${x.status}`);const g=(await x.json())?.data||{};g.tunnel_ok!==void 0&&g.tunnel_ok!==null?Ce(g.tunnel_ok===!0):Ce(null)}catch(x){console.error("Failed to fetch ddnsto connectivity",x),Ce(null)}},[xe]),Ne=C.useCallback(async()=>{await me(),await ge(),await Ie()},[me,ge,Ie]),ie=C.useCallback(async(x,I,g)=>{Le("loading","正在保存配置...","正在将配置写入路由器,请稍候");try{const u=new URLSearchParams;ue&&u.append("token",ue),u.append("ddnsto_token",x),u.append("enabled",I),u.append("feat_enabled",g.feat_enabled),u.append("feat_port",g.feat_port),u.append("feat_username",g.feat_username),u.append("feat_password",g.feat_password),u.append("feat_disk_path_selected",g.feat_disk_path_selected),u.append("index",g.index||"");const v=await fetch(`${xe}/admin/services/ddnsto/api/config`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded",...ue?{"X-LuCI-Token":ue}:{}},body:u});if(!v.ok)throw new Error(`HTTP ${v.status}`);const M=await v.json();if(!M?.ok)throw new Error(M?.error||"Save failed");Le("success","配置已保存并生效",void 0,3e3),T(!0),await me(),await ge()}catch(u){console.error("Failed to save config",u);const v=u instanceof Error?u.message:String(u);Le("error","保存失败,请重试",v,4e3)}},[xe,ue,me,ge]);return C.useEffect(()=>{me(),ge(),Ie()},[me,ge,Ie]),C.useEffect(()=>{const x=window.setInterval(ge,5e3);return()=>{window.clearInterval(x)}},[ge]),m.jsx("div",{className:"min-h-screen bg-slate-50",children:m.jsx("main",{children:m.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8",children:[m.jsx(yf,{}),m.jsx(wf,{isRunning:E,isConfigured:U,hostname:L,address:G,deviceId:Q,version:W,featEnabled:we.feat_enabled,tunnelOk:fe,onRefreshStatus:Ne}),m.jsx(_f,{apiBase:xe,csrfToken:ue,deviceId:Q,onboardingBase:Qe,onRefreshStatus:Ne,onComplete:()=>T(!0)}),m.jsx(Sf,{ddnstoToken:q,ddnstoEnabled:V,advancedConfig:we,onSave:ie,saveBanner:K})]})})})}const Cf='/*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */*,:before,:after,::backdrop{--tw-border-style: solid}@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-rotate-x: rotateX(0);--tw-rotate-y: rotateY(0);--tw-rotate-z: rotateZ(0);--tw-skew-x: skewX(0);--tw-skew-y: skewY(0);--tw-space-y-reverse: 0;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500: oklch(.637 .237 25.331);--color-amber-50: oklch(.987 .022 95.277);--color-amber-200: oklch(.924 .12 95.746);--color-amber-600: oklch(.666 .179 58.318);--color-green-50: oklch(.982 .018 155.826);--color-green-100: oklch(.962 .044 156.743);--color-green-200: oklch(.925 .084 155.995);--color-green-600: oklch(.627 .194 149.214);--color-green-700: oklch(.527 .154 150.069);--color-green-800: oklch(.448 .119 151.328);--color-blue-50: oklch(.97 .014 254.604);--color-blue-200: oklch(.882 .059 254.128);--color-blue-500: oklch(.623 .214 259.815);--color-blue-600: oklch(.546 .245 262.881);--color-blue-700: oklch(.488 .243 264.376);--color-slate-50: oklch(.984 .003 247.858);--color-slate-100: oklch(.968 .007 247.896);--color-slate-200: oklch(.929 .013 255.508);--color-slate-300: oklch(.869 .022 252.894);--color-slate-400: oklch(.704 .04 256.788);--color-slate-500: oklch(.554 .046 257.417);--color-slate-600: oklch(.446 .043 257.281);--color-slate-700: oklch(.372 .044 257.287);--color-slate-800: oklch(.279 .041 260.031);--color-white: #fff;--spacing: .25rem;--container-md: 28rem;--container-5xl: 64rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-lg: 1.125rem;--text-xl: 1.25rem;--text-2xl: 1.5rem;--font-weight-normal: 400;--font-weight-medium: 500;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-font-feature-settings: var(--font-sans--font-feature-settings);--default-font-variation-settings: var(--font-sans--font-variation-settings);--default-mono-font-family: var(--font-mono);--default-mono-font-feature-settings: var(--font-mono--font-feature-settings);--default-mono-font-variation-settings: var(--font-mono--font-variation-settings)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:currentColor}@supports (color: color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}body{background-color:var(--background);color:var(--foreground)}*{border-color:var(--border);outline-color:var(--ring)}@supports (color: color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-size:var(--text-2xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-size:var(--text-xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-size:var(--text-lg);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.right-2{right:calc(var(--spacing) * 2)}.z-10{z-index:10}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-40{width:calc(var(--spacing) * 40)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.translate-x-1{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x: calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-rows-8{grid-template-rows:repeat(8,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-amber-200{border-color:var(--color-amber-200)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-600{border-color:var(--color-blue-600)}.border-green-200{border-color:var(--color-green-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}@media(hover:hover){.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}}@media(hover:hover){.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}}@media(hover:hover){.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}}@media(hover:hover){.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}}@media(hover:hover){.hover\\:text-slate-600:hover{color:var(--color-slate-600)}}@media(hover:hover){.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}@media(hover:hover){.hover\\:underline:hover{text-decoration-line:underline}}.focus\\:ring-2:focus{--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color: var(--color-blue-500)}.focus\\:outline-none:focus{--tw-outline-style: none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}}:root,:host{--font-size: 16px;--background: #fff;--foreground: oklch(.145 0 0);--card: #fff;--card-foreground: oklch(.145 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.145 0 0);--primary: #030213;--primary-foreground: oklch(1 0 0);--secondary: oklch(.95 .0058 264.53);--secondary-foreground: #030213;--muted: #ececf0;--muted-foreground: #717182;--accent: #e9ebef;--accent-foreground: #030213;--destructive: #d4183d;--destructive-foreground: #fff;--border: #0000001a;--input: transparent;--input-background: #f3f3f5;--switch-background: #cbced4;--font-weight-medium: 500;--font-weight-normal: 400;--ring: oklch(.708 0 0);--chart-1: oklch(.646 .222 41.116);--chart-2: oklch(.6 .118 184.704);--chart-3: oklch(.398 .07 227.392);--chart-4: oklch(.828 .189 84.429);--chart-5: oklch(.769 .188 70.08);--radius: .625rem;--sidebar: oklch(.985 0 0);--sidebar-foreground: oklch(.145 0 0);--sidebar-primary: #030213;--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.97 0 0);--sidebar-accent-foreground: oklch(.205 0 0);--sidebar-border: oklch(.922 0 0);--sidebar-ring: oklch(.708 0 0)}.dark{--background: oklch(.145 0 0);--foreground: oklch(.985 0 0);--card: oklch(.145 0 0);--card-foreground: oklch(.985 0 0);--popover: oklch(.145 0 0);--popover-foreground: oklch(.985 0 0);--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--secondary: oklch(.269 0 0);--secondary-foreground: oklch(.985 0 0);--muted: oklch(.269 0 0);--muted-foreground: oklch(.708 0 0);--accent: oklch(.269 0 0);--accent-foreground: oklch(.985 0 0);--destructive: oklch(.396 .141 25.723);--destructive-foreground: oklch(.637 .237 25.331);--border: oklch(.269 0 0);--input: oklch(.269 0 0);--ring: oklch(.439 0 0);--font-weight-medium: 500;--font-weight-normal: 400;--chart-1: oklch(.488 .243 264.376);--chart-2: oklch(.696 .17 162.48);--chart-3: oklch(.769 .188 70.08);--chart-4: oklch(.627 .265 303.9);--chart-5: oklch(.645 .246 16.439);--sidebar: oklch(.205 0 0);--sidebar-foreground: oklch(.985 0 0);--sidebar-primary: oklch(.488 .243 264.376);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.269 0 0);--sidebar-accent-foreground: oklch(.985 0 0);--sidebar-border: oklch(.269 0 0);--sidebar-ring: oklch(.439 0 0)}html{font-size:var(--font-size);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-rotate-x{syntax: "*"; inherits: false; initial-value: rotateX(0);}@property --tw-rotate-y{syntax: "*"; inherits: false; initial-value: rotateY(0);}@property --tw-rotate-z{syntax: "*"; inherits: false; initial-value: rotateZ(0);}@property --tw-skew-x{syntax: "*"; inherits: false; initial-value: skewX(0);}@property --tw-skew-y{syntax: "*"; inherits: false; initial-value: skewY(0);}@property --tw-space-y-reverse{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false}@property --tw-shadow-alpha{syntax: ""; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false}@property --tw-inset-shadow-alpha{syntax: ""; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false}@property --tw-ring-offset-width{syntax: ""; inherits: false; initial-value: 0;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}:root,:host{--ddn-bg: #f8fafc;--ddn-surface: #ffffff;--ddn-surface-muted: #f1f5f9;--ddn-border: #e2e8f0;--ddn-border-strong: #cbd5e1;--ddn-text-primary: #0f172a;--ddn-text-secondary: #475569;--ddn-text-muted: #64748b;--ddn-primary: #2563eb;--ddn-primary-strong: #1d4ed8;--ddn-input-bg: #ffffff;--ddn-disabled-bg: #e2e8f0;--ddn-disabled-text: #94a3b8;--ddn-divider: #e2e8f0;--ddn-spinner: #94a3b8}[data-darkmode=true],:host([data-darkmode="true"]){--ddn-bg: #0f172a;--ddn-surface: #111827;--ddn-surface-muted: #1f2937;--ddn-border: #334155;--ddn-border-strong: #475569;--ddn-text-primary: #e5e7eb;--ddn-text-secondary: #cbd5e1;--ddn-text-muted: #94a3b8;--ddn-primary: #3b82f6;--ddn-primary-strong: #2563eb;--ddn-input-bg: #0b1220;--ddn-disabled-bg: #1f2937;--ddn-disabled-text: #64748b;--ddn-divider: #1f2937;--ddn-spinner: #cbd5e1}[data-darkmode=true],:host([data-darkmode="true"]){color:var(--ddn-text-primary)}[data-darkmode=true] .bg-slate-50,:host([data-darkmode="true"]) .bg-slate-50{background-color:var(--ddn-bg)!important}[data-darkmode=true] .bg-white,:host([data-darkmode="true"]) .bg-white{background-color:var(--ddn-surface)!important;color:var(--ddn-text-primary)}[data-darkmode=true] .border-slate-200,:host([data-darkmode="true"]) .border-slate-200,[data-darkmode=true] .border-slate-100,:host([data-darkmode="true"]) .border-slate-100{border-color:var(--ddn-border)!important}[data-darkmode=true] .border-slate-300,:host([data-darkmode="true"]) .border-slate-300{border-color:var(--ddn-border-strong)!important}[data-darkmode=true] .text-slate-800,:host([data-darkmode="true"]) .text-slate-800,[data-darkmode=true] .text-slate-700,:host([data-darkmode="true"]) .text-slate-700{color:var(--ddn-text-primary)!important}[data-darkmode=true] .text-slate-600,:host([data-darkmode="true"]) .text-slate-600,[data-darkmode=true] .text-slate-500,:host([data-darkmode="true"]) .text-slate-500{color:var(--ddn-text-secondary)!important}[data-darkmode=true] .text-slate-400,:host([data-darkmode="true"]) .text-slate-400{color:var(--ddn-text-muted)!important}[data-darkmode=true] .bg-blue-50,:host([data-darkmode="true"]) .bg-blue-50{background-color:#2563eb1f!important;color:var(--ddn-text-primary)}[data-darkmode=true] .bg-emerald-50,:host([data-darkmode="true"]) .bg-emerald-50{background-color:#10b98124!important;color:var(--ddn-text-primary)}[data-darkmode=true] .bg-red-50,:host([data-darkmode="true"]) .bg-red-50{background-color:#f871711f!important;color:var(--ddn-text-primary)}[data-darkmode=true] .border-b,:host([data-darkmode="true"]) .border-b{border-color:var(--ddn-divider)!important}[data-darkmode=true] input,:host([data-darkmode="true"]) input,[data-darkmode=true] select,:host([data-darkmode="true"]) select,[data-darkmode=true] textarea,:host([data-darkmode="true"]) textarea{background-color:var(--ddn-input-bg);color:var(--ddn-text-primary)}[data-darkmode=true] .animate-spin,:host([data-darkmode="true"]) .animate-spin{border-color:var(--ddn-spinner)!important}',Nf=".ddnsto-host{padding:16px 20px;background-color:#f8fafc;border-radius:16px;overflow:hidden}.ddnsto-host[data-darkmode=true]{background-color:#0b1220}.ddnsto-host #app{display:block}",jf='.ddnsto-toggle-container{display:inline-flex;align-items:center}.ddnsto-toggle-switch{position:relative;display:inline-block;width:44px;height:22px;cursor:pointer}.ddnsto-toggle-switch input{opacity:0;width:0;height:0;position:absolute;inset:0;margin:0}.ddnsto-toggle-slider{position:absolute;cursor:pointer;inset:0;background-color:#e5e7eb;transition:.2s ease;border-radius:22px;border:1px solid #cbd5e1;box-shadow:0 1px 2px #0000000a inset}.ddnsto-toggle-slider:before{position:absolute;content:"";height:16px;width:16px;left:2px;top:2px;background-color:#fff;transition:.2s ease;border-radius:50%;box-shadow:0 1px 2px #0003}.ddnsto-toggle-switch input:checked+.ddnsto-toggle-slider{background-color:#3b82f6;border-color:#3b82f6}.ddnsto-toggle-switch input:checked+.ddnsto-toggle-slider:before{transform:translate(22px)}.ddnsto-toggle-switch input:focus-visible+.ddnsto-toggle-slider{box-shadow:0 0 0 3px #3b82f640}.ddnsto-toggle-switch input:disabled+.ddnsto-toggle-slider{opacity:.6;cursor:not-allowed}',zf=".ddnsto-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease,border-color .15s ease;user-select:none}.ddnsto-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ddnsto-btn-primary{background-color:var(--ddn-primary);color:#fff;border-color:var(--ddn-primary-strong);box-shadow:0 1px 2px #00000014}.ddnsto-btn-primary:hover:not(:disabled){background-color:var(--ddn-primary-strong)}.ddnsto-btn-primary:active:not(:disabled){background-color:#1e3a8a}.ddnsto-btn:disabled,.ddnsto-btn[aria-disabled=true]{background-color:var(--ddn-disabled-bg);border-color:var(--ddn-border);color:var(--ddn-disabled-text);cursor:not-allowed;box-shadow:none}.ddnsto-btn-icon{width:1rem;height:1rem}",Pf="ddnsto-theme",Tf=y=>{const E=y.match(/\d+/g);if(E&&E.length>=3)return{r:parseInt(E[0],10),g:parseInt(E[1],10),b:parseInt(E[2],10)};if(y.startsWith("#")){const d=y.replace("#","");if(d.length===3)return{r:parseInt(d[0]+d[0],16),g:parseInt(d[1]+d[1],16),b:parseInt(d[2]+d[2],16)};if(d.length===6)return{r:parseInt(d.slice(0,2),16),g:parseInt(d.slice(2,4),16),b:parseInt(d.slice(4,6),16)}}return null},Rf=()=>{try{const y=localStorage.getItem(Pf);if(y==="dark"||y==="light")return y}catch{}if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";try{const y=getComputedStyle(document.body).backgroundColor,E=Tf(y);if(E)return .2126*E.r+.7152*E.g+.0722*E.b<128?"dark":"light"}catch{}return"light"},bl=(y,E)=>{y&&(E==="dark"?y.setAttribute("data-darkmode","true"):y.removeAttribute("data-darkmode"))},jr={token:"",prefix:"",api_base:"/cgi-bin/luci",lang:"zh-cn",onboarding_base:"https://web.ddnsto.com/openwrt-bind"},zr=typeof window<"u"&&window.ddnstoConfig||{},Lf={token:zr.token??jr.token,prefix:zr.prefix??jr.prefix,api_base:zr.api_base??jr.api_base,lang:zr.lang??jr.lang,onboarding_base:zr.onboarding_base??jr.onboarding_base},gt=document.getElementById("root")||document.getElementById("app"),If=()=>{if(!document.head.querySelector("style[data-ddnsto-host]")){const y=document.createElement("style");y.setAttribute("data-ddnsto-host","true"),y.textContent=Nf,document.head.appendChild(y)}},Mf=gt?.hasAttribute("data-ddnsto-shadow")||gt?.dataset.shadow==="true";let Ui=gt;const Ul=typeof window<"u"?Rf():"light";if(gt){If();const y=`${Cf} -${jf} -${zf}`;if(Mf&>.attachShadow){const E=gt.shadowRoot||gt.attachShadow({mode:"open"});if(!E.querySelector("style[data-ddnsto-style]")){const d=document.createElement("style");d.setAttribute("data-ddnsto-style","true"),d.textContent=y,E.appendChild(d)}Ui=E,bl(gt,Ul),bl(gt.parentElement,Ul)}else{if(!document.head.querySelector("style[data-ddnsto-style]")){const E=document.createElement("style");E.setAttribute("data-ddnsto-style","true"),E.textContent=y,document.head.appendChild(E)}bl(gt,Ul),bl(gt.parentElement,Ul)}Ui&&qd.createRoot(Ui).render(m.jsx(Kd.StrictMode,{children:m.jsx(Ef,{config:Lf})}))} + */const yf=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],wf=Nt("save",yf);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xf=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Vu=Nt("smartphone",xf);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kf=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Bu=Nt("triangle-alert",kf);function Sf(){return f.jsx("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:f.jsx("div",{className:"flex items-start",children:f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-50 flex items-center justify-center",children:f.jsx(Qu,{className:"w-6 h-6 text-blue-600"})}),f.jsx("h2",{className:"text-slate-800",children:"DDNSTO 远程访问"})]}),f.jsx("p",{className:"text-slate-600 text-sm mb-2",children:"DDNSTO 远程访问,不需要公网 IP、不需要开放端口。只需一个链接,即可从任何地方安全访问您的 NAS、路由器和桌面。"}),f.jsxs("a",{href:"https://www.ddnsto.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline",children:["了解更多",f.jsx(Al,{className:"w-3 h-3"})]})]})})})}function _f({isRunning:v,isConfigured:N,hostname:d,address:V,deviceId:I,version:M,featEnabled:Z,tunnelOk:ee,offlineDiagnosis:R,onRefreshStatus:Y,onDownloadSupportBundle:te,onOpenOfflineDiagnosis:J,onCloseOfflineDiagnosis:W}){const[re,fe]=C.useState(!1),[Q,q]=C.useState(!1),[xe,Le]=C.useState(!1),me={label:v?"运行中":"已停止",bgColor:v?"bg-green-100":"bg-slate-200",textColor:v?"text-green-700":"text-slate-600"},ce=V&&V.trim().length>0?V:"未配置",_e=re,K=ee===!0,Ee=_e?"检查中...":ee===!0?"正常":ee===!1?"无法连接服务器":"未知",je=Z==="1"||Z===!0?"已开启":"未开启",Ue=I||"-",Ne=R?.data?.severity||"unknown",ze={info:"bg-blue-50 text-blue-700 border-blue-200",warning:"bg-amber-50 text-amber-700 border-amber-200",error:"bg-rose-50 text-rose-700 border-rose-200",unknown:"bg-slate-50 text-slate-700 border-slate-200"}[Ne]||"bg-slate-50 text-slate-700 border-slate-200",ye={flex:"1 1 0",minWidth:0},le={flex:"1 1 0",minWidth:0,color:"#be123c",backgroundColor:"#fff1f2",borderColor:"#fecdd3"},de={flex:"1 1 0",minWidth:0,color:"#b45309",backgroundColor:"#fffbeb",borderColor:"#fde68a"},Ae={flex:"1 1 0",minWidth:0,color:"#1d4ed8",backgroundColor:"#eff6ff",borderColor:"#bfdbfe"},ie=async()=>{if(Y){fe(!0);try{await Y()}finally{fe(!1)}}},oe=async()=>{if(te){q(!0);try{await te()}finally{q(!1)}}},E=async()=>{if(J){Le(!0);try{await J()}finally{Le(!1)}}};return f.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[f.jsx("h3",{className:"text-slate-800 mb-4",children:"运行状态"}),f.jsxs("div",{className:"flex flex-col gap-5 pb-6 border-b border-slate-100",children:[f.jsxs("div",{className:"min-w-0 flex-1 space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:`px-3 py-1 rounded-full text-sm ${me.bgColor} ${me.textColor}`,children:me.label}),d?f.jsxs("span",{className:"text-sm text-slate-500",children:["设备:",d]}):null]}),N&&f.jsxs("div",{className:"rounded-xl border border-slate-200 bg-slate-50/80 px-4 py-3",children:[f.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-400",children:"远程访问域名"}),V&&V.trim().length>0?f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f.jsxs("a",{href:ce,target:"_blank",rel:"noopener noreferrer",className:"inline-flex max-w-full items-center gap-1 break-all text-sm font-medium text-blue-600 hover:underline",children:[ce,f.jsx(Al,{className:"w-3 h-3"})]}),f.jsx("span",{className:"text-xs text-amber-600",title:"如域名已失效,请重新运行快速向导",children:"(如失效请重新运行快速向导)"})]}):f.jsx("div",{className:"mt-2 text-sm text-slate-500",children:ce})]})]}),f.jsxs("div",{className:"flex w-full items-stretch gap-3",children:[f.jsx("button",{onClick:E,disabled:xe||!v,className:"inline-flex items-center justify-center gap-2 rounded-xl border px-4 py-3 text-sm font-medium shadow-sm transition-all duration-150 hover:brightness-95 active:translate-y-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",style:le,title:v?void 0:"DDNSTO 运行中才可使用离线诊断",children:f.jsxs("div",{className:"inline-flex w-full items-center justify-center gap-2",style:ye,children:[f.jsx(Bu,{className:"h-4 w-4 shrink-0"}),f.jsx("span",{className:"min-w-0 text-center",children:xe?"诊断中...":"离线诊断"})]})}),f.jsx("button",{onClick:oe,disabled:Q||!v,className:"inline-flex items-center justify-center gap-2 rounded-xl border px-4 py-3 text-sm font-medium shadow-sm transition-all duration-150 hover:brightness-95 active:translate-y-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",style:de,title:v?void 0:"DDNSTO 运行中才可导出诊断包",children:f.jsxs("div",{className:"inline-flex w-full items-center justify-center gap-2",style:ye,children:[f.jsx(sf,{className:"h-4 w-4 shrink-0"}),f.jsx("span",{className:"min-w-0 text-center",children:Q?"导出中...":"导出诊断包"})]})}),f.jsx("button",{onClick:ie,disabled:re,className:"inline-flex items-center justify-center gap-2 rounded-xl border px-4 py-3 text-sm font-medium shadow-sm transition-all duration-150 hover:brightness-95 active:translate-y-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",style:Ae,children:f.jsxs("div",{className:"inline-flex w-full items-center justify-center gap-2",style:ye,children:[f.jsx(vf,{className:"h-4 w-4 shrink-0"}),f.jsx("span",{className:"min-w-0 text-center",children:"刷新状态"})]})})]}),v?null:f.jsx("div",{className:"text-xs text-slate-500",children:"DDNSTO 未运行时,离线诊断和导出诊断包暂不可用。"})]}),f.jsx("div",{className:"mt-6",children:f.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-700",children:[f.jsx(Qu,{className:"w-4 h-4 text-slate-400"}),_e&&f.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-slate-300 border-t-blue-600 animate-spin"}),f.jsxs("h4",{className:"text-sm text-slate-700",children:["服务器连接:",K?f.jsx("span",{className:"text-green-600",children:Ee}):f.jsx("span",{children:Ee}),"| 设备 ID:",Ue," | 拓展功能:",je,M?` | 版本:${M}`:""]})]})}),R?.open?f.jsxs("div",{className:"mt-6 pt-6 border-t border-slate-100",children:[f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-700",children:[f.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),f.jsx("h4",{className:"text-sm text-slate-700",children:"离线诊断"})]}),f.jsx("button",{type:"button",onClick:W,className:"rounded-md px-3 py-1.5 text-xs text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:"关闭"})]}),R.loading?f.jsx("div",{className:"mt-3 rounded-lg border border-slate-200 bg-slate-50 p-4 text-sm text-slate-500",children:"正在生成离线诊断结果..."}):R.data?f.jsxs("div",{className:`mt-3 rounded-lg border p-4 ${ze}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",children:R.data.title||"已生成诊断结果"}),R.data.summary?f.jsx("p",{className:"mt-1 text-sm leading-6",children:R.data.summary}):null]}),R.data.code?f.jsx("span",{className:"shrink-0 rounded-full bg-white/70 px-2 py-1 text-xs uppercase tracking-wide",children:R.data.code}):null]}),R.data.suggestedActions&&R.data.suggestedActions.length>0?f.jsxs("div",{className:"mt-3",children:[f.jsx("div",{className:"text-sm font-medium",children:"建议操作"}),f.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm leading-6",children:R.data.suggestedActions.map(L=>f.jsx("li",{children:L},L))})]}):null,R.data.evidence&&R.data.evidence.length>0?f.jsx("div",{className:"mt-3 text-xs leading-5 opacity-80",children:R.data.evidence.map(L=>f.jsx("div",{children:L},L))}):null]}):f.jsx("div",{className:"mt-3 rounded-lg border border-rose-200 bg-rose-50 p-4 text-sm text-rose-700",children:R.error||"未获取到诊断结果,请稍后重试。"})]}):null]})}function Ku({checked:v,onChange:N,label:d,id:V,disabled:I,containerClassName:M,...Z}){return f.jsxs("div",{className:`ddnsto-toggle-container ${M||""}`,children:[d&&f.jsx("label",{htmlFor:V,className:"text-sm text-slate-700 mr-3 whitespace-nowrap",children:d}),f.jsxs("label",{className:"ddnsto-toggle-switch","aria-label":d||"toggle",children:[f.jsx("input",{id:V,type:"checkbox",checked:v,disabled:I,onChange:ee=>N(ee.target.checked),...Z}),f.jsx("span",{className:"ddnsto-toggle-slider","aria-hidden":!0})]})]})}function Ef({onSave:v,isInTab:N,token:d,enabled:V,advancedConfig:I,onRegisterSave:M,onTokenChange:Z,onEnabledChange:ee}){const[R,Y]=C.useState(d||""),[te,J]=C.useState(V);C.useEffect(()=>{Y(d||"")},[d]),C.useEffect(()=>{J(V)},[I,V]);const W=()=>{R.trim()&&v(R,te?"1":"0",I)};return C.useEffect(()=>{M&&M(()=>W())},[M,R,te,I]),f.jsxs("div",{className:N?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!N&&f.jsxs(f.Fragment,{children:[f.jsx("h3",{className:"text-slate-800 mb-2",children:"手动配置"}),f.jsx("p",{className:"text-xs text-slate-400 mb-6",children:"如果您已经在 DDNSTO 控制台获取了令牌,可以直接在此填写并启动插件。"})]}),f.jsxs("div",{className:"space-y-5",children:[f.jsx("div",{className:"pb-4",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h4",{className:"text-sm text-slate-700",children:"启用 DDNSTO"}),f.jsx(Ku,{checked:te,onChange:re=>{J(re),ee?.(re)},"aria-label":"启用 DDNSTO",containerClassName:"ml-6"})]})}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsxs("label",{className:"text-sm text-slate-700",children:["用户令牌(Token) ",f.jsx("span",{className:"text-red-500",children:"*"})]}),f.jsxs("a",{href:"https://doc.ddnsto.com/zh/guide/ddnsto/quickstart/",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline flex items-center gap-1",children:["如何查看用户令牌",f.jsx(Al,{className:"w-3 h-3"})]})]}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"text",value:R,onChange:re=>{Y(re.target.value),Z?.(re.target.value)},placeholder:"请输入您的 DDNSTO 令牌",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})}),f.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"令牌将保存在路由器本地,请勿泄露。"})]})]})]})}function Nf({token:v,enabled:N,advancedConfig:d,onSave:V,isInTab:I,onRegisterSave:M}){const[Z,ee]=C.useState(d.feat_enabled==="1"),R=K=>K.feat_disk_path_selected?K.feat_disk_path_selected:K.mounts&&K.mounts.length>0?K.mounts[0]:"",[Y,te]=C.useState(R(d)),[J,W]=C.useState(d.feat_port||"3033"),[re,fe]=C.useState(d.feat_username||"ddnsto"),[Q,q]=C.useState(d.feat_password||""),[xe,Le]=C.useState(!1),[me,ce]=C.useState(d.index||"");C.useEffect(()=>{ee(d.feat_enabled==="1"),te(R(d)),d.feat_port&&W(d.feat_port),d.feat_username&&fe(d.feat_username),d.feat_password&&q(d.feat_password),d.index!==void 0&&ce(d.index)},[d]);const _e=()=>{V(v,N?"1":"0",{feat_enabled:Z?"1":"0",feat_port:J,feat_username:re,feat_password:Q,feat_disk_path_selected:Y,mounts:d.mounts,index:me})};return C.useEffect(()=>{M&&M(()=>_e())},[M,v,N,Z,Y,J,re,Q,me,d.mounts]),f.jsxs("div",{className:I?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!I&&f.jsx("h3",{className:"text-slate-800 mb-4",children:"高级功能"}),f.jsxs("div",{className:"space-y-5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-700 mb-2",children:"设备编号(可选)"}),f.jsx("input",{type:"text",value:me,onChange:K=>ce(K.target.value),placeholder:"",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),f.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"如有多台设备id重复,请修改此编号(0~100),正常情况不需要修改"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h4",{className:"text-sm text-slate-700",children:"启用拓展功能"}),f.jsx(Ku,{checked:Z,onChange:K=>ee(K),"aria-label":"启用拓展功能",containerClassName:"ml-6"})]}),f.jsxs("div",{className:"flex items-center gap-2 -mt-2",children:[f.jsx("p",{className:"text-xs text-slate-400",children:"启用后可支持控制台的「文件管理」及「远程开机」功能"}),f.jsxs("a",{href:"https://doc.ddnsto.com/zh/guide/ddnsto/scenarios/file-management.html",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline flex items-center gap-1 whitespace-nowrap",children:["查看教程",f.jsx(Al,{className:"w-3 h-3"})]})]}),Z&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(hf,{className:"w-4 h-4 text-slate-600"}),f.jsx("h5",{className:"text-sm text-slate-700",children:"WebDAV 服务配置"})]}),f.jsxs("div",{className:"space-y-4 pl-6",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"可访问的文件目录"}),f.jsx("select",{value:Y,onChange:K=>te(K.target.value),className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white",children:d.mounts&&d.mounts.length>0?d.mounts.map(K=>f.jsx("option",{value:K,children:K},K)):f.jsx("option",{value:"",disabled:!0,children:"未检测到挂载点"})}),f.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"控制台上的文件管理将只能看到此目录及其子目录。"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"服务端口"}),f.jsx("input",{type:"text",value:J,onChange:K=>W(K.target.value),placeholder:"3033",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"授权用户名"}),f.jsx("input",{type:"text",value:re,onChange:K=>fe(K.target.value),placeholder:"ddnsto",className:"w-full px-3 py-2 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-600 mb-2",children:"授权用户密码"}),f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:xe?"text":"password",value:Q,onChange:K=>q(K.target.value),placeholder:"设置访问密码",className:"w-full px-3 py-2 pr-10 border border-slate-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),f.jsx("button",{type:"button",onClick:()=>Le(!xe),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",children:xe?f.jsx(df,{className:"w-4 h-4"}):f.jsx(pf,{className:"w-4 h-4"})})]})]})]})]})]})]})}function Cf({ddnstoToken:v,ddnstoEnabled:N,advancedConfig:d,onSave:V,saveBanner:I}){const[M,Z]=C.useState("basic"),ee=C.useRef(null),R=C.useRef(),Y=C.useRef(),[te,J]=C.useState(v||""),[W,re]=C.useState(N==="1");C.useEffect(()=>{J(v||"")},[v]),C.useEffect(()=>{re(N==="1")},[N]);const fe=()=>{M==="basic"?R.current?.():Y.current?.()};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 mb-4",children:[f.jsx("div",{className:"border-b border-slate-200 px-6",children:f.jsx("div",{className:"flex items-center justify-between",children:f.jsxs("div",{className:"flex items-center -mb-px",children:[f.jsx("button",{onClick:()=>Z("basic"),className:`px-4 py-4 text-sm border-b-2 transition-colors ${M==="basic"?"border-blue-600 text-blue-600":"border-transparent text-slate-600 hover:text-slate-800"}`,children:"基础配置"}),f.jsx("button",{onClick:()=>Z("advanced"),className:`px-4 py-4 text-sm border-b-2 transition-colors ${M==="advanced"?"border-blue-600 text-blue-600":"border-transparent text-slate-600 hover:text-slate-800"}`,children:"高级功能"})]})})}),f.jsxs("div",{ref:ee,className:"p-6",children:[M==="basic"&&f.jsx(Ef,{token:te,enabled:W,advancedConfig:d,onSave:V,isInTab:!0,onRegisterSave:Q=>{R.current=Q},onTokenChange:J,onEnabledChange:re}),M==="advanced"&&f.jsx(Nf,{token:te,enabled:W,advancedConfig:d,onSave:V,isInTab:!0,onRegisterSave:Q=>{Y.current=Q}})]})]}),f.jsx("div",{className:"flex justify-end gap-3 mt-4",children:f.jsxs("button",{onClick:fe,disabled:!te.trim(),className:"ddnsto-btn ddnsto-btn-primary",children:[f.jsx(wf,{className:"ddnsto-btn-icon"}),"保存配置并应用"]})}),I.state!=="idle"&&f.jsxs("div",{className:["mt-2 rounded-md border px-3 py-2 text-sm",I.state==="loading"?"bg-blue-50 border-blue-200 text-blue-800":"",I.state==="success"?"bg-emerald-50 border-emerald-200 text-emerald-800":"",I.state==="error"?"bg-red-50 border-red-200 text-red-800":""].join(" "),children:[f.jsx("div",{className:"font-medium",children:I.message}),I.description&&f.jsx("div",{className:"text-xs mt-1 opacity-80 break-words",children:I.description})]})]})}const Un={auth:0,starting:1,binding:2,domain:3,checking:4};function jf({apiBase:v,csrfToken:N,deviceId:d,onboardingBase:V,onComplete:I,onRefreshStatus:M,isInTab:Z}){const[ee,R]=C.useState(!1),[Y,te]=C.useState(V||"https://www.kooldns.cn/bind"),[J,W]=C.useState(`${V||"https://www.kooldns.cn/bind"}/#/auth?send=1&source=openwrt&callback=*`),[re,fe]=C.useState("auth"),[Q,q]=C.useState(d||""),[xe,Le]=C.useState(""),[me,ce]=C.useState(""),[_e,K]=C.useState(!1),[Ee,je]=C.useState(null),Ue=C.useRef("auth"),Ne=N||(typeof window<"u"?window.ddnstoCsrfToken:""),ze=C.useCallback(S=>{fe(u=>Un[S]>Un[u]?S:u)},[]);C.useEffect(()=>{Ue.current=re},[re]),C.useEffect(()=>{console.log("Onboarding iframe url:",J)},[J]);const ye=C.useCallback(()=>{fe("auth"),Le(""),ce(""),je(null),q(d||""),W(`${Y}/#/auth?send=1&source=openwrt&callback=*`)},[ze,d,Y]);C.useEffect(()=>{const S="/#/auth?send=1&source=openwrt&callback=*",u=V||"https://www.kooldns.cn/bind";te(u),W(`${u}${S}`)},[V]),C.useEffect(()=>{q(d||"")},[d]);const le=C.useCallback(async()=>{for(let g=0;g<20;g+=1){const F=await fetch(`${v}/admin/services/ddnsto/api/status`,{credentials:"same-origin"});if(F.ok){const X=(await F.json())?.data||{},U=X.deviceId||X.device_id||"";if(U&&q(U),X.running)return{running:!0,deviceId:U}}await new Promise(H=>setTimeout(H,2e3))}throw new Error("ddnsto not running")},[v]),de=C.useCallback(async S=>{const u={url:S};Ne&&(u.token=Ne);const g=await fetch(`${v}/admin/services/ddnsto/api/onboarding/address`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",...Ne?{"X-LuCI-Token":Ne}:{}},body:JSON.stringify(u)});if(!g.ok)throw new Error(`HTTP ${g.status}`);const F=await g.json();if(!F?.ok)throw new Error(F?.error||"save address failed")},[v,Ne]),Ae=C.useCallback(async(S,u)=>{K(!0),je(null);const g=Q||d||"",F=`${Y}/#/bind?status=starting&token=${encodeURIComponent(S)}&sign=${encodeURIComponent(u)}${g?`&routerId=${encodeURIComponent(g)}`:""}`;W(F),ze("starting");try{const H=await fetch(`${v}/admin/services/ddnsto/api/onboarding/start`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",...Ne?{"X-LuCI-Token":Ne}:{}},body:JSON.stringify({token:S})});if(!H.ok)throw new Error(`HTTP ${H.status}`);const X=await H.json();if(!X?.ok)throw new Error(X?.error||"start failed");M&&await M();const j=(await le())?.deviceId||Q||d||"";if(Un[Ue.current]>=Un.domain)return;const D=`${Y}/#/bind?status=starting&routerId=${encodeURIComponent(j)}&token=${encodeURIComponent(S)}&sign=${encodeURIComponent(u)}`;W(D),ze("binding"),q(j)}catch{je("启动失败,请稍后重试")}finally{K(!1)}},[ze,v,d,Ne,Y,M,le,ye,Q]),ie=C.useCallback(S=>{const u=S||Q;if(!xe||!me||!u)return;const g=`${Y}/#/domain?sign=${encodeURIComponent(me)}&token=${encodeURIComponent(xe)}&routerId=${encodeURIComponent(u)}&netaddr=127.0.0.1&source=openwrt`;W(g),fe("domain")},[me,xe,Y,Q]),oe=C.useCallback(async S=>{W(`${Y}/#/check?url=${encodeURIComponent(S)}`),fe("checking"),I();try{await de(S),M&&await M()}catch{je("保存域名失败,请重试")}},[Y,I,M,de]),E=C.useCallback(()=>{R(!0),ye()},[ye]);C.useEffect(()=>{const S=u=>{if(!ee)return;console.log("Onboarding message:",u.data);const g=u.data;let F=g;if(typeof g=="string")try{F=JSON.parse(g)}catch{return}if(!F||typeof F!="object")return;const H=F.data,U=H&&typeof H=="object"?H:F;if((typeof U.auth=="string"?U.auth:"")!=="ddnsto")return;const D=typeof U.sign=="string"?U.sign:"",_=typeof U.token=="string"?U.token:"",pe=typeof U.step=="string"?U.step:"",G=typeof U.status=="string"?U.status:"",Re=typeof U.url=="string"?U.url:"",Ve=U.success,An=typeof Ve=="number"?Ve:Number(Ve);if(D&&_&&re==="auth"&&!_e){Le(_),ce(D),Ae(_,D);return}if(pe==="bind"&&G==="success"){const qt=typeof U.router_uid=="string"?U.router_uid:Q;qt&&q(qt),ie(qt);return}pe==="domain"&&Re&&An===0&&Un[Ue.current]window.removeEventListener("message",S)},[ie,oe,_e,Ae,ee,re]);const L=()=>f.jsx("div",{className:"flex items-center justify-between mb-6",children:f.jsx("h3",{className:"text-slate-800",children:"快速向导"})});return ee?f.jsxs("div",{className:Z?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!Z&&L(),f.jsx("div",{className:"rounded-lg border border-slate-200 overflow-hidden",children:f.jsx("iframe",{src:J,title:"快速向导",className:"w-full",style:{width:"100%",height:"70vh",maxHeight:"400px",border:0},loading:"lazy"})})]}):f.jsxs("div",{className:Z?"":"bg-white rounded-lg border border-slate-200 p-6 mb-4",children:[!Z&&L(),f.jsxs("div",{className:"text-center py-8",children:[f.jsx("div",{className:"mb-4 flex justify-center",children:f.jsx("div",{className:"w-16 h-16 rounded-full bg-blue-50 flex items-center justify-center",children:f.jsx(Vu,{className:"w-8 h-8 text-blue-600"})})}),f.jsx("h4",{className:"text-slate-800 mb-2",children:"欢迎使用 DDNSTO!"}),f.jsx("p",{className:"text-sm text-slate-600 mb-6 max-w-md mx-auto",children:"通过微信扫码登录,我们将引导您完成插件配置"}),f.jsxs("button",{onClick:E,className:"ddnsto-btn ddnsto-btn-primary",children:[f.jsx(Vu,{className:"ddnsto-btn-icon"}),"开始配置"]})]})]})}function zf({config:v}){const[N,d]=C.useState(!1),[V,I]=C.useState(!1),[M,Z]=C.useState("OpenWrt"),[ee,R]=C.useState(""),[Y,te]=C.useState(""),[J,W]=C.useState(""),[re,fe]=C.useState(""),[Q,q]=C.useState("1"),[xe,Le]=C.useState({feat_enabled:"0",feat_port:"",feat_username:"",feat_password:"",feat_disk_path_selected:"",mounts:[],index:""}),[me,ce]=C.useState("0"),[,_e]=C.useState(null),[K,Ee]=C.useState(null),[je,Ue]=C.useState({state:"idle",message:""}),[Ne,ze]=C.useState({open:!1,loading:!1,error:"",data:null}),ye=C.useRef(),le=(v?.api_base||"/cgi-bin/luci").replace(/\/$/,""),de=v?.token||"",Ae=(v?.onboarding_base||"https://www.kooldns.cn/bind").replace(/\/$/,""),ie=C.useCallback((j,D,_,pe)=>{ye.current&&window.clearTimeout(ye.current),Ue({state:j,message:D,description:_}),pe&&(ye.current=window.setTimeout(()=>{Ue({state:"idle",message:""})},pe))},[]);C.useEffect(()=>()=>{ye.current&&window.clearTimeout(ye.current)},[]);const oe=C.useCallback(async()=>{try{const j=await fetch(`${le}/admin/services/ddnsto/api/config`,{credentials:"same-origin"});if(!j.ok)throw new Error(`HTTP ${j.status}`);const _=(await j.json())?.data||{};_.address&&R(_.address),_.device_id!==void 0?te(_.device_id):_.deviceId!==void 0&&te(_.deviceId),_.version!==void 0&&W(_.version),_.token&&fe(_.token),_.enabled!==void 0&&q(_.enabled),Le({feat_enabled:_.feat_enabled||"0",feat_port:_.feat_port||"",feat_username:_.feat_username||"",feat_password:_.feat_password||"",feat_disk_path_selected:_.feat_disk_path_selected||"",mounts:_.mounts||[],index:_.index||""}),ce(_.index||"0")}catch(j){console.error("Failed to fetch ddnsto config",j)}},[le]),E=C.useCallback(async()=>{try{const j=await fetch(`${le}/admin/services/ddnsto/api/status`,{credentials:"same-origin"});if(!j.ok)throw new Error(`HTTP ${j.status}`);const _=(await j.json())?.data||{};d(!!_.running),_.token_set&&I(!0),_.hostname&&Z(_.hostname),_.device_id!==void 0?te(_.device_id):_.deviceId!==void 0&&te(_.deviceId),_.address&&R(_.address),_.version!==void 0&&W(_.version),_e(null)}catch(j){console.error("Failed to fetch ddnsto status",j),_e("无法获取运行状态")}},[le]),L=C.useCallback(async()=>{try{const j=await fetch(`${le}/admin/services/ddnsto/api/connectivity`,{credentials:"same-origin"});if(!j.ok)throw new Error(`HTTP ${j.status}`);const _=(await j.json())?.data||{};_.tunnel_ok!==void 0&&_.tunnel_ok!==null?Ee(_.tunnel_ok===!0):Ee(null)}catch(j){console.error("Failed to fetch ddnsto connectivity",j),Ee(null)}},[le]),S=C.useCallback(async()=>{try{const j=await fetch(`${le}/admin/services/ddnsto/api/offline_diagnosis`,{credentials:"same-origin"}),D=await j.json();if(!j.ok)throw new Error(D?.detail||D?.error||`HTTP ${j.status}`);D?.ok&&D?.data?ze({open:!0,loading:!1,error:"",data:D.data}):ze({open:!0,loading:!1,error:D?.error||"未获取到诊断结果",data:null})}catch(j){console.error("Failed to fetch ddnsto offline diagnosis",j),ze({open:!0,loading:!1,error:j instanceof Error?j.message:String(j),data:null})}},[le]),u=C.useCallback(async()=>{await oe(),await E(),await L()},[oe,E,L]),g=C.useCallback(async()=>{if(!N){ze({open:!0,loading:!1,error:"DDNSTO 未运行,离线诊断当前不可用。",data:null});return}ze({open:!0,loading:!0,error:"",data:null});try{await S()}catch{}},[S,N]),F=C.useCallback(()=>{ze(j=>({...j,open:!1,loading:!1}))},[]),H=C.useCallback(async()=>{if(!N){ie("error","导出诊断包不可用","DDNSTO 未运行,请先启动服务后再导出。",4e3);return}ie("loading","正在生成诊断包...","请稍候,路由器正在准备日志与诊断信息");try{const j=await fetch(`${le}/admin/services/ddnsto/api/support_bundle`,{method:"GET",credentials:"same-origin"});if(!j.ok){let G=`HTTP ${j.status}`;try{const Re=await j.json();G=Re?.detail||Re?.error||G}catch{}throw new Error(G)}const D=await j.blob(),_=window.URL.createObjectURL(D),pe=document.createElement("a");pe.href=_,pe.download="ddnsto-openwrt-support.zip",document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),window.URL.revokeObjectURL(_),ie("success","诊断包已开始下载","请把下载得到的 zip 文件反馈给我们",4e3)}catch(j){console.error("Failed to download support bundle",j);const D=j instanceof Error?j.message:String(j);ie("error","诊断包导出失败,请重试",D,4e3)}},[le,N,ie]),X=C.useCallback(async(j,D,_)=>{if(!window.confirm("修改设备编号将重置当前设备身份,并生成新的设备 ID。原有设备在控制台中的在线状态和绑定记录不会自动保留。确认继续吗?"))return!1;ie("loading","正在重置设备身份...","将停止服务、重建设备身份并重新启动,请稍候");try{const G=new URLSearchParams;de&&G.append("token",de),G.append("ddnsto_token",j),G.append("enabled",D),G.append("feat_enabled",_.feat_enabled),G.append("feat_port",_.feat_port),G.append("feat_username",_.feat_username),G.append("feat_password",_.feat_password),G.append("feat_disk_path_selected",_.feat_disk_path_selected),G.append("index",_.index||""),G.append("confirm_reidentity","1");const Re=await fetch(`${le}/admin/services/ddnsto/api/migrate_identity`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded",...de?{"X-LuCI-Token":de}:{}},body:G}),Ve=await Re.json();if(!Re.ok||!Ve?.ok)throw new Error(Ve?.detail||Ve?.error||`HTTP ${Re.status}`);return ie("success","设备身份已重置",Ve?.data?.message||"新的设备 ID 将在服务启动后生效",4e3),await u(),!0}catch(G){console.error("Failed to migrate ddnsto identity",G);const Re=G instanceof Error?G.message:String(G);return ie("error","设备身份重置失败",Re,4e3),!1}},[le,de,u,ie]),U=C.useCallback(async(j,D,_)=>{if((_.index||"0")!==me){await X(j,D,_);return}ie("loading","正在保存配置...","正在将配置写入路由器,请稍候");try{const G=new URLSearchParams;de&&G.append("token",de),G.append("ddnsto_token",j),G.append("enabled",D),G.append("feat_enabled",_.feat_enabled),G.append("feat_port",_.feat_port),G.append("feat_username",_.feat_username),G.append("feat_password",_.feat_password),G.append("feat_disk_path_selected",_.feat_disk_path_selected),G.append("index",_.index||"");const Re=await fetch(`${le}/admin/services/ddnsto/api/config`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded",...de?{"X-LuCI-Token":de}:{}},body:G});if(!Re.ok)throw new Error(`HTTP ${Re.status}`);const Ve=await Re.json();if(!Ve?.ok)throw new Error(Ve?.error||"Save failed");ie("success","配置已保存并生效",void 0,3e3),I(!0),await oe(),await E()}catch(G){console.error("Failed to save config",G);const Re=G instanceof Error?G.message:String(G);ie("error","保存失败,请重试",Re,4e3)}},[le,de,oe,E,X,me,ie]);return C.useEffect(()=>{oe(),E(),L()},[oe,E,L]),C.useEffect(()=>{const j=window.setInterval(E,5e3);return()=>{window.clearInterval(j)}},[E]),f.jsx("div",{className:"min-h-screen bg-slate-50",children:f.jsx("main",{children:f.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8",children:[f.jsx(Sf,{}),f.jsx(_f,{isRunning:N,isConfigured:V,hostname:M,address:ee,deviceId:Y,version:J,featEnabled:xe.feat_enabled,tunnelOk:K,offlineDiagnosis:Ne,onRefreshStatus:u,onDownloadSupportBundle:H,onOpenOfflineDiagnosis:g,onCloseOfflineDiagnosis:F}),f.jsx(jf,{apiBase:le,csrfToken:de,deviceId:Y,onboardingBase:Ae,onRefreshStatus:u,onComplete:()=>I(!0)}),f.jsx(Cf,{ddnstoToken:re,ddnstoEnabled:Q,advancedConfig:xe,onSave:U,saveBanner:je})]})})})}const Pf='/*! tailwindcss v4.1.3 | MIT License | https://tailwindcss.com */*,:before,:after,::backdrop{--tw-border-style: solid}@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-rotate-x: rotateX(0);--tw-rotate-y: rotateY(0);--tw-rotate-z: rotateZ(0);--tw-skew-x: skewX(0);--tw-skew-y: skewY(0);--tw-space-y-reverse: 0;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500: oklch(.637 .237 25.331);--color-amber-50: oklch(.987 .022 95.277);--color-amber-200: oklch(.924 .12 95.746);--color-amber-600: oklch(.666 .179 58.318);--color-green-50: oklch(.982 .018 155.826);--color-green-100: oklch(.962 .044 156.743);--color-green-200: oklch(.925 .084 155.995);--color-green-600: oklch(.627 .194 149.214);--color-green-700: oklch(.527 .154 150.069);--color-green-800: oklch(.448 .119 151.328);--color-blue-50: oklch(.97 .014 254.604);--color-blue-200: oklch(.882 .059 254.128);--color-blue-500: oklch(.623 .214 259.815);--color-blue-600: oklch(.546 .245 262.881);--color-blue-700: oklch(.488 .243 264.376);--color-slate-50: oklch(.984 .003 247.858);--color-slate-100: oklch(.968 .007 247.896);--color-slate-200: oklch(.929 .013 255.508);--color-slate-300: oklch(.869 .022 252.894);--color-slate-400: oklch(.704 .04 256.788);--color-slate-500: oklch(.554 .046 257.417);--color-slate-600: oklch(.446 .043 257.281);--color-slate-700: oklch(.372 .044 257.287);--color-slate-800: oklch(.279 .041 260.031);--color-white: #fff;--spacing: .25rem;--container-md: 28rem;--container-5xl: 64rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-lg: 1.125rem;--text-xl: 1.25rem;--text-2xl: 1.5rem;--font-weight-normal: 400;--font-weight-medium: 500;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);--default-font-family: var(--font-sans);--default-font-feature-settings: var(--font-sans--font-feature-settings);--default-font-variation-settings: var(--font-sans--font-variation-settings);--default-mono-font-family: var(--font-mono);--default-mono-font-feature-settings: var(--font-mono--font-feature-settings);--default-mono-font-variation-settings: var(--font-mono--font-variation-settings)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:currentColor}@supports (color: color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}body{background-color:var(--background);color:var(--foreground)}*{border-color:var(--border);outline-color:var(--ring)}@supports (color: color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-size:var(--text-2xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-size:var(--text-xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-size:var(--text-lg);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.right-2{right:calc(var(--spacing) * 2)}.z-10{z-index:10}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-40{width:calc(var(--spacing) * 40)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.translate-x-1{--tw-translate-x: calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x: calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-rows-8{grid-template-rows:repeat(8,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse: 0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-amber-200{border-color:var(--color-amber-200)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-600{border-color:var(--color-blue-600)}.border-green-200{border-color:var(--color-green-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-600{background-color:var(--color-green-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-white{background-color:var(--color-white)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-red-500{color:var(--color-red-500)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}@media(hover:hover){.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}}@media(hover:hover){.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}}@media(hover:hover){.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}}@media(hover:hover){.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}}@media(hover:hover){.hover\\:text-slate-600:hover{color:var(--color-slate-600)}}@media(hover:hover){.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}@media(hover:hover){.hover\\:underline:hover{text-decoration-line:underline}}.focus\\:ring-2:focus{--tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color: var(--color-blue-500)}.focus\\:outline-none:focus{--tw-outline-style: none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}}:root,:host{--font-size: 16px;--background: #fff;--foreground: oklch(.145 0 0);--card: #fff;--card-foreground: oklch(.145 0 0);--popover: oklch(1 0 0);--popover-foreground: oklch(.145 0 0);--primary: #030213;--primary-foreground: oklch(1 0 0);--secondary: oklch(.95 .0058 264.53);--secondary-foreground: #030213;--muted: #ececf0;--muted-foreground: #717182;--accent: #e9ebef;--accent-foreground: #030213;--destructive: #d4183d;--destructive-foreground: #fff;--border: #0000001a;--input: transparent;--input-background: #f3f3f5;--switch-background: #cbced4;--font-weight-medium: 500;--font-weight-normal: 400;--ring: oklch(.708 0 0);--chart-1: oklch(.646 .222 41.116);--chart-2: oklch(.6 .118 184.704);--chart-3: oklch(.398 .07 227.392);--chart-4: oklch(.828 .189 84.429);--chart-5: oklch(.769 .188 70.08);--radius: .625rem;--sidebar: oklch(.985 0 0);--sidebar-foreground: oklch(.145 0 0);--sidebar-primary: #030213;--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.97 0 0);--sidebar-accent-foreground: oklch(.205 0 0);--sidebar-border: oklch(.922 0 0);--sidebar-ring: oklch(.708 0 0)}.dark{--background: oklch(.145 0 0);--foreground: oklch(.985 0 0);--card: oklch(.145 0 0);--card-foreground: oklch(.985 0 0);--popover: oklch(.145 0 0);--popover-foreground: oklch(.985 0 0);--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--secondary: oklch(.269 0 0);--secondary-foreground: oklch(.985 0 0);--muted: oklch(.269 0 0);--muted-foreground: oklch(.708 0 0);--accent: oklch(.269 0 0);--accent-foreground: oklch(.985 0 0);--destructive: oklch(.396 .141 25.723);--destructive-foreground: oklch(.637 .237 25.331);--border: oklch(.269 0 0);--input: oklch(.269 0 0);--ring: oklch(.439 0 0);--font-weight-medium: 500;--font-weight-normal: 400;--chart-1: oklch(.488 .243 264.376);--chart-2: oklch(.696 .17 162.48);--chart-3: oklch(.769 .188 70.08);--chart-4: oklch(.627 .265 303.9);--chart-5: oklch(.645 .246 16.439);--sidebar: oklch(.205 0 0);--sidebar-foreground: oklch(.985 0 0);--sidebar-primary: oklch(.488 .243 264.376);--sidebar-primary-foreground: oklch(.985 0 0);--sidebar-accent: oklch(.269 0 0);--sidebar-accent-foreground: oklch(.985 0 0);--sidebar-border: oklch(.269 0 0);--sidebar-ring: oklch(.439 0 0)}html{font-size:var(--font-size);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-rotate-x{syntax: "*"; inherits: false; initial-value: rotateX(0);}@property --tw-rotate-y{syntax: "*"; inherits: false; initial-value: rotateY(0);}@property --tw-rotate-z{syntax: "*"; inherits: false; initial-value: rotateZ(0);}@property --tw-skew-x{syntax: "*"; inherits: false; initial-value: skewX(0);}@property --tw-skew-y{syntax: "*"; inherits: false; initial-value: skewY(0);}@property --tw-space-y-reverse{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false}@property --tw-shadow-alpha{syntax: ""; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false}@property --tw-inset-shadow-alpha{syntax: ""; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false}@property --tw-ring-offset-width{syntax: ""; inherits: false; initial-value: 0;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}:root,:host{--ddn-bg: #f8fafc;--ddn-surface: #ffffff;--ddn-surface-muted: #f1f5f9;--ddn-border: #e2e8f0;--ddn-border-strong: #cbd5e1;--ddn-text-primary: #0f172a;--ddn-text-secondary: #475569;--ddn-text-muted: #64748b;--ddn-primary: #2563eb;--ddn-primary-strong: #1d4ed8;--ddn-input-bg: #ffffff;--ddn-disabled-bg: #e2e8f0;--ddn-disabled-text: #94a3b8;--ddn-divider: #e2e8f0;--ddn-spinner: #94a3b8}[data-darkmode=true],:host([data-darkmode="true"]){--ddn-bg: #0f172a;--ddn-surface: #111827;--ddn-surface-muted: #1f2937;--ddn-border: #334155;--ddn-border-strong: #475569;--ddn-text-primary: #e5e7eb;--ddn-text-secondary: #cbd5e1;--ddn-text-muted: #94a3b8;--ddn-primary: #3b82f6;--ddn-primary-strong: #2563eb;--ddn-input-bg: #0b1220;--ddn-disabled-bg: #1f2937;--ddn-disabled-text: #64748b;--ddn-divider: #1f2937;--ddn-spinner: #cbd5e1}[data-darkmode=true],:host([data-darkmode="true"]){color:var(--ddn-text-primary)}[data-darkmode=true] .bg-slate-50,:host([data-darkmode="true"]) .bg-slate-50{background-color:var(--ddn-bg)!important}[data-darkmode=true] .bg-white,:host([data-darkmode="true"]) .bg-white{background-color:var(--ddn-surface)!important;color:var(--ddn-text-primary)}[data-darkmode=true] .border-slate-200,:host([data-darkmode="true"]) .border-slate-200,[data-darkmode=true] .border-slate-100,:host([data-darkmode="true"]) .border-slate-100{border-color:var(--ddn-border)!important}[data-darkmode=true] .border-slate-300,:host([data-darkmode="true"]) .border-slate-300{border-color:var(--ddn-border-strong)!important}[data-darkmode=true] .text-slate-800,:host([data-darkmode="true"]) .text-slate-800,[data-darkmode=true] .text-slate-700,:host([data-darkmode="true"]) .text-slate-700{color:var(--ddn-text-primary)!important}[data-darkmode=true] .text-slate-600,:host([data-darkmode="true"]) .text-slate-600,[data-darkmode=true] .text-slate-500,:host([data-darkmode="true"]) .text-slate-500{color:var(--ddn-text-secondary)!important}[data-darkmode=true] .text-slate-400,:host([data-darkmode="true"]) .text-slate-400{color:var(--ddn-text-muted)!important}[data-darkmode=true] .bg-blue-50,:host([data-darkmode="true"]) .bg-blue-50{background-color:#2563eb1f!important;color:var(--ddn-text-primary)}[data-darkmode=true] .bg-emerald-50,:host([data-darkmode="true"]) .bg-emerald-50{background-color:#10b98124!important;color:var(--ddn-text-primary)}[data-darkmode=true] .bg-red-50,:host([data-darkmode="true"]) .bg-red-50{background-color:#f871711f!important;color:var(--ddn-text-primary)}[data-darkmode=true] .border-b,:host([data-darkmode="true"]) .border-b{border-color:var(--ddn-divider)!important}[data-darkmode=true] input,:host([data-darkmode="true"]) input,[data-darkmode=true] select,:host([data-darkmode="true"]) select,[data-darkmode=true] textarea,:host([data-darkmode="true"]) textarea{background-color:var(--ddn-input-bg);color:var(--ddn-text-primary)}[data-darkmode=true] .animate-spin,:host([data-darkmode="true"]) .animate-spin{border-color:var(--ddn-spinner)!important}',Tf=".ddnsto-host{padding:16px 20px;background-color:#f8fafc;border-radius:16px;overflow:hidden}.ddnsto-host[data-darkmode=true]{background-color:#0b1220}.ddnsto-host #app{display:block}",Lf='.ddnsto-toggle-container{display:inline-flex;align-items:center}.ddnsto-toggle-switch{position:relative;display:inline-block;width:44px;height:22px;cursor:pointer}.ddnsto-toggle-switch input{opacity:0;width:0;height:0;position:absolute;inset:0;margin:0}.ddnsto-toggle-slider{position:absolute;cursor:pointer;inset:0;background-color:#e5e7eb;transition:.2s ease;border-radius:22px;border:1px solid #cbd5e1;box-shadow:0 1px 2px #0000000a inset}.ddnsto-toggle-slider:before{position:absolute;content:"";height:16px;width:16px;left:2px;top:2px;background-color:#fff;transition:.2s ease;border-radius:50%;box-shadow:0 1px 2px #0003}.ddnsto-toggle-switch input:checked+.ddnsto-toggle-slider{background-color:#3b82f6;border-color:#3b82f6}.ddnsto-toggle-switch input:checked+.ddnsto-toggle-slider:before{transform:translate(22px)}.ddnsto-toggle-switch input:focus-visible+.ddnsto-toggle-slider{box-shadow:0 0 0 3px #3b82f640}.ddnsto-toggle-switch input:disabled+.ddnsto-toggle-slider{opacity:.6;cursor:not-allowed}',Rf=".ddnsto-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.625rem 1.25rem;border-radius:.5rem;border:1px solid transparent;font-size:.875rem;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease,border-color .15s ease;user-select:none}.ddnsto-btn:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ddnsto-btn-primary{background-color:var(--ddn-primary);color:#fff;border-color:var(--ddn-primary-strong);box-shadow:0 1px 2px #00000014}.ddnsto-btn-primary:hover:not(:disabled){background-color:var(--ddn-primary-strong)}.ddnsto-btn-primary:active:not(:disabled){background-color:#1e3a8a}.ddnsto-btn:disabled,.ddnsto-btn[aria-disabled=true]{background-color:var(--ddn-disabled-bg);border-color:var(--ddn-border);color:var(--ddn-disabled-text);cursor:not-allowed;box-shadow:none}.ddnsto-btn-icon{width:1rem;height:1rem}",bf="ddnsto-theme",If=v=>{const N=v.match(/\d+/g);if(N&&N.length>=3)return{r:parseInt(N[0],10),g:parseInt(N[1],10),b:parseInt(N[2],10)};if(v.startsWith("#")){const d=v.replace("#","");if(d.length===3)return{r:parseInt(d[0]+d[0],16),g:parseInt(d[1]+d[1],16),b:parseInt(d[2]+d[2],16)};if(d.length===6)return{r:parseInt(d.slice(0,2),16),g:parseInt(d.slice(2,4),16),b:parseInt(d.slice(4,6),16)}}return null},Of=()=>{try{const v=localStorage.getItem(bf);if(v==="dark"||v==="light")return v}catch{}if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";try{const v=getComputedStyle(document.body).backgroundColor,N=If(v);if(N)return .2126*N.r+.7152*N.g+.0722*N.b<128?"dark":"light"}catch{}return"light"},Fl=(v,N)=>{v&&(N==="dark"?v.setAttribute("data-darkmode","true"):v.removeAttribute("data-darkmode"))},jr={token:"",prefix:"",api_base:"/cgi-bin/luci",lang:"zh-cn",onboarding_base:"https://web.ddnsto.com/openwrt-bind"},zr=typeof window<"u"&&window.ddnstoConfig||{},Mf={token:zr.token??jr.token,prefix:zr.prefix??jr.prefix,api_base:zr.api_base??jr.api_base,lang:zr.lang??jr.lang,onboarding_base:zr.onboarding_base??jr.onboarding_base},wt=document.getElementById("root")||document.getElementById("app"),Df=()=>{if(!document.head.querySelector("style[data-ddnsto-host]")){const v=document.createElement("style");v.setAttribute("data-ddnsto-host","true"),v.textContent=Tf,document.head.appendChild(v)}},Ff=wt?.hasAttribute("data-ddnsto-shadow")||wt?.dataset.shadow==="true";let Ui=wt;const Ul=typeof window<"u"?Of():"light";if(wt){Df();const v=`${Pf} +${Lf} +${Rf}`;if(Ff&&wt.attachShadow){const N=wt.shadowRoot||wt.attachShadow({mode:"open"});if(!N.querySelector("style[data-ddnsto-style]")){const d=document.createElement("style");d.setAttribute("data-ddnsto-style","true"),d.textContent=v,N.appendChild(d)}Ui=N,Fl(wt,Ul),Fl(wt.parentElement,Ul)}else{if(!document.head.querySelector("style[data-ddnsto-style]")){const N=document.createElement("style");N.setAttribute("data-ddnsto-style","true"),N.textContent=v,document.head.appendChild(N)}Fl(wt,Ul),Fl(wt.parentElement,Ul)}Ui&&ef.createRoot(Ui).render(f.jsx(Yd.StrictMode,{children:f.jsx(zf,{config:Mf})}))} diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index 7375a8a0..2a23dfdc 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=a322dfb6bfd8987c83453c39582a07771c9deddf9f8f7d2d19c7927ebd5e76c8 endef -GEOSITE_VER:=20260623060549 +GEOSITE_VER:=20260625041655 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=fb8671dca2b1124d737a425a26c3c9165b201d395ecda0d3c09bd0889962a10d + HASH:=0a1abc2262b146e05052dc684939c8cb5649c9c044aad430284f89e9aac06c20 endef GEOSITE_IRAN_VER:=202606220211