diff --git a/.trae-html-share-packages/admin-web/frontend/index.html.zip b/.trae-html-share-packages/admin-web/frontend/index.html.zip
new file mode 100644
index 0000000..9ccf8dc
Binary files /dev/null and b/.trae-html-share-packages/admin-web/frontend/index.html.zip differ
diff --git a/.trae-html-share-packages/server_go/web/index.html.zip b/.trae-html-share-packages/server_go/web/index.html.zip
new file mode 100644
index 0000000..b680ee9
Binary files /dev/null and b/.trae-html-share-packages/server_go/web/index.html.zip differ
diff --git a/.trae-html-share-packages/server_python/web/index.html.zip b/.trae-html-share-packages/server_python/web/index.html.zip
new file mode 100644
index 0000000..5014a18
Binary files /dev/null and b/.trae-html-share-packages/server_python/web/index.html.zip differ
diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md
index 11d67ff..33d2a6b 100644
--- a/DEPLOYMENT.md
+++ b/DEPLOYMENT.md
@@ -4,22 +4,27 @@
```
OpenYCP/
-├── server_python/ # Python Flask 实现
-│ ├── app.py # 主应用
+├── server_python/ # Python Flask 实现(含 Web 管理面板)
+│ ├── app.py # 主应用(授权 API + Web 面板 API + 静态文件)
│ ├── requirements.txt # Python 依赖
-│ ├── Dockerfile # Docker 镜像
+│ ├── Dockerfile # Docker 镜像(多阶段:自动构建前端)
+│ ├── web/ # 前端构建产物(npm run build 生成)
│ └── README_CN.md # Python 版文档
-├── server_go/ # Go Gin 实现(高性能)
-│ ├── main.go # 主应用
+├── server_go/ # Go Gin 实现(高性能,含 Web 管理面板)
+│ ├── main.go # 主应用(授权 API + Web 面板 API + embed 前端)
│ ├── go.mod # Go 依赖
-│ ├── Dockerfile # Docker 镜像
+│ ├── Dockerfile # Docker 镜像(多阶段:自动构建前端)
+│ ├── web/ # 前端构建产物(embed 嵌入二进制)
│ └── README_CN.md # Go 版文档
+├── admin-web/ # Web 管理面板前端源码(React,构建后嵌入服务器)
├── nginx/ # Nginx 反向代理配置
│ └── nginx.conf
├── docker-compose.yml # Docker Compose 编排
└── DEPLOYMENT.md # 本文档
```
+> **Web 管理面板已内置**: 启动任一授权服务器后,浏览器访问 `http://localhost:13337/` 即可使用 Web 管理面板(登录页点 "First time? Initialize admin" 初始化账号,与原生协议共用同一账号体系)。
+
---
## 🚀 快速开始(3 种方式)
diff --git a/admin-web/README.md b/admin-web/README.md
index 1293283..8d0b24b 100644
--- a/admin-web/README.md
+++ b/admin-web/README.md
@@ -2,6 +2,12 @@
Modern web-based administration panel for YCPPlus license key management.
+> **已整合进授权服务器**: 自 2026-08 起,此前独立的 Spring Boot 后端已移植进 `server_go`(Gin)与 `server_python`(Flask),前端构建产物直接嵌入服务器。**无需再单独部署本目录的 backend/frontend**,启动任一授权服务器后访问 `http://localhost:13337/` 即可使用 Web 管理面板。
+>
+> 本目录现仅作为前端源码(`frontend/`)与原型参考保留。重新构建前端:`cd frontend && npm install && npm run build`,然后将 `dist/` 内容分别拷贝到 `server_go/web/` 与 `server_python/web/`。开发模式下 `npm run dev` 会将 `/api` 代理到 `http://localhost:13337`。
+>
+> 与独立版的差异:账号密码与原生协议统一(SHA256 哈希、共用 `applications`/`keys` 表),即 Web 面板、原生 Admin Panel(Java GUI)、native `/login` 客户端验证共用同一套数据。
+
## Architecture
- **Backend**: Spring Boot 3.2 + JWT Authentication
diff --git a/admin-web/frontend/vite.config.js b/admin-web/frontend/vite.config.js
index d6e56f7..31b5cfd 100644
--- a/admin-web/frontend/vite.config.js
+++ b/admin-web/frontend/vite.config.js
@@ -7,7 +7,7 @@ export default defineConfig({
port: 5173,
proxy: {
'/api': {
- target: 'http://localhost:8080',
+ target: 'http://localhost:13337',
changeOrigin: true
}
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 012c07d..5e7a993 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,11 +1,11 @@
version: '3.8'
services:
- # Python 版本授权服务器
+ # Python 版本授权服务器(含 Web 管理面板)
ycp-auth-python:
build:
- context: ./server_python
- dockerfile: Dockerfile
+ context: .
+ dockerfile: server_python/Dockerfile
container_name: ycp-auth-python
ports:
- "13337:13337"
@@ -15,11 +15,11 @@ services:
environment:
- FLASK_ENV=production
- # Go 版本授权服务器(高性能)
+ # Go 版本授权服务器(高性能,含 Web 管理面板)
ycp-auth-go:
build:
- context: ./server_go
- dockerfile: Dockerfile
+ context: .
+ dockerfile: server_go/Dockerfile
container_name: ycp-auth-go
ports:
- "13338:13337" # 使用不同端口避免冲突
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/YumeCloudProtection.java b/obfuscator/src/main/java/com/yumegod/obfuscator/YumeCloudProtection.java
index 74b7c0c..8032747 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/YumeCloudProtection.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/YumeCloudProtection.java
@@ -19,7 +19,6 @@
import com.yumegod.obfuscator.utils.cfg.annotations.ConfigSection;
import com.yumegod.obfuscator.utils.cfg.annotations.StaticConfigReceiver;
import com.yumegod.obfuscator.utils.filter.marker.Marker;
-import com.yumegod.obfuscator.utils.protection.QQUtils;
import org.apache.commons.io.FileUtils;
import org.objectweb.asm.*;
import org.objectweb.asm.commons.ClassRemapper;
@@ -56,8 +55,9 @@ public class YumeCloudProtection {
public static String applicationName;
@ConfigSection("native.auth")
public static boolean auth = true;
-// @ConfigSection("auth_url")
- public static String authorizationURL = "http://protection.yumegod.com:13337/";
+ // 自建授权服务器地址(server_go / server_python 均提供 /login 端点)
+ @ConfigSection("native.auth_url")
+ public static String authorizationURL = "http://127.0.0.1:13337/";
@ConfigSection("misc.safe_mode")
public static boolean safeMode = false;
@@ -162,12 +162,6 @@ public void processWithConfig(File configFile) throws Exception {
@SuppressWarnings("BusyWait")
private static Thread getWaitingThread() {
Thread thread = new Thread(() -> {
- try {
- if (QQUtils.isStupidUser()) {
- Runtime.getRuntime().halt(0);
- return;
- }
- } catch (Exception ignored) {}
char[] chars = {'|', '/', '-', '\\'};
try {
int i = 0;
@@ -387,16 +381,16 @@ public void process(File inputJarFile, File outputJarFile, Path outputDir, List<
Util.copyResource("sources/native_jvm.hpp", cppDir);
Util.copyResource("sources/native_jvm_output.hpp", cppDir);
- Util.copyResource("sources/Authorization.h", cppDir);
- Util.copyResource("sources/Authorization.lib", cppDir);
- Util.copyResource("sources/Authorization.dll", cppDir);
-
+ // VMProtect SDK 桩(开源版 no-op 实现;持有商业授权时可用官方头文件覆盖)
Util.copyResource("sources/VMProtectSDK.h", cppDir);
- Util.copyResource("sources/VMProtectSDK64.lib", cppDir);
- Util.copyResource("sources/VMProtectSDK64.dll", cppDir);
- Util.copyResource("sources/vmp.exe", cppDir);
- Util.copyResource("sources/YumeCloud_NativeLibrary.vmp", cppDir);
- Util.copyResource("sources/YumeCloud_NativeLibrary_NoAuth.vmp", cppDir);
+
+ // VMProtect 为可选商业组件:仅在 resources 中存在时复制,
+ // 缺省(开源分发)自动降级为未加壳构建
+ Util.copyResourceIfExists("sources/VMProtectSDK64.lib", cppDir);
+ Util.copyResourceIfExists("sources/VMProtectSDK64.dll", cppDir);
+ Util.copyResourceIfExists("sources/vmp.exe", cppDir);
+ Util.copyResourceIfExists("sources/YumeCloud_NativeLibrary.vmp", cppDir);
+ Util.copyResourceIfExists("sources/YumeCloud_NativeLibrary_NoAuth.vmp", cppDir);
for (ClassNode hiddenClass : hiddenMethodsPool.getClasses()) {
String hiddenClassFileName = "data_" + Util.escapeCppNameString(hiddenClass.name.replace('/', '_'));
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/ClassSourceBuilder.java b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/ClassSourceBuilder.java
index 5759c88..d99a9e6 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/ClassSourceBuilder.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/ClassSourceBuilder.java
@@ -39,7 +39,6 @@ public ClassSourceBuilder(Path cppOutputDir, String className, int classIndex) t
public void addHeader(int strings, int classes, int methods, int fields) throws IOException {
cppWriter.append("#include \"../native_jvm.hpp\"\n");
- cppWriter.append("#include \"../Authorization.h\"\n");
cppWriter.append("#include \"../VMProtectSDK.h\"\n");
cppWriter.append("#include \n");
cppWriter.append("#include \"").append(getHppFilename()).append("\"\n");
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/MainSourceBuilder.java b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/MainSourceBuilder.java
index daa1a2e..0818277 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/MainSourceBuilder.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/source/MainSourceBuilder.java
@@ -1,11 +1,9 @@
package com.yumegod.obfuscator.j2c.source;
-import com.yumegod.obfuscator.Main;
import com.yumegod.obfuscator.YumeCloudProtection;
import com.yumegod.obfuscator.utils.Util;
import java.io.IOException;
-import java.io.InputStream;
import java.util.Base64;
public class MainSourceBuilder {
@@ -39,32 +37,19 @@ public void registerDefine(String stringPooledClassName, String classFileName) {
public String build(String nativeDir, int classCount) throws IOException {
String template = Util.readResource("sources/native_jvm_output.cpp");
+ // 授权客户端已内置于 native_jvm.cpp(开放实现),验证失败时返回 JNI_ERR 终止加载
+ String authorization = "";
if (YumeCloudProtection.auth) {
- includes.append("#include \"Authorization.h\"");
- }
- StringBuilder dllBytes = new StringBuilder();
- if (YumeCloudProtection.auth) {
- dllBytes.append("unsigned char dllBytes[] = {");
- InputStream dll = MainSourceBuilder.class.getResourceAsStream("/sources/Authorization.dll");
- byte[] buffer = new byte[1024];
- int bytesRead;
- while ((bytesRead = dll.read(buffer)) != -1) {
- for (int j = 0; j < bytesRead; j++) {
- dllBytes.append((int) buffer[j] & 0xFF).append(",");
- }
- }
- dllBytes.append("};").append("\n");
- dllBytes.append("size_t dllSize = sizeof(dllBytes);").append("\n");
+ authorization = " if (!native_jvm::utils::auth(VMProtectDecryptStringA(\"" + YumeCloudProtection.applicationName
+ + "\"), VMProtectDecryptStringA(\"" + YumeCloudProtection.authorizationURL + "login\"))) return JNI_ERR;\n";
}
return Util.dynamicFormat(template, Util.createMap(
- "watermark", new String(Base64.getDecoder().decode("ICAgICAgICBzdGQ6OmNvdXQgPDwKICAgICAgICAiXG49PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIKICAgICAgICAiIF9fICAgICBfXyAgICAgICAgICAgICAgICAgICAgX19fX18gXyAgICAgICAgICAgICAgICAgXyBcbiIKICAgICAgICAiIFxcIFxcICAgLyAvICAgICAgICAgICAgICAgICAgIC8gX19fX3wgfCAgICAgICAgICAgICAgIHwgfFxuIgogICAgICAgICIgIFxcIFxcXy8gLyAgIF8gXyBfXyBfX18gICBfX198IHwgICAgfCB8IF9fXyAgXyAgIF8gIF9ffCB8XG4iCiAgICAgICAgIiAgIFxcICAgLyB8IHwgfCAnXyBgIF8gXFwgLyBfIFxcIHwgICAgfCB8LyBfIFxcfCB8IHwgfC8gX2AgfFxuIgogICAgICAgICIgICAgfCB8fCB8X3wgfCB8IHwgfCB8IHwgIF9fLyB8X19fX3wgfCAoXykgfCB8X3wgfCAoX3wgfFxuIgogICAgICAgICIgICAgfF98IFxcX18sX3xffCB8X3wgfF98XFxfX198XFxfX19fX3xffFxcX19fLyBcXF9fLF98XFxfXyxfXG4iCiAgICAgICAgIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIgogICAgICAgICJUaGlzIGFwcGxpY2F0aW9uIGlzIHByb3RlY3RlZCBieSBZdW1lQ2xvdWRcbiIKICAgICAgICA8PCBzdGQ6OmVuZGw7")),
+ "watermark", new String(Base64.getDecoder().decode("ICAgICAgICBzdGQ6OmNvdXQgPDwKICAgICAgICAiXG49PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIKICAgICAgICAiIF9fICAgICBfXyAgICAgICAgICAgICAgICAgICAgX19fX18gXyAgICAgICAgICAgICAgICAgXyBcbiIKICAgICAgICAiIFxcIFxcICAgLyAvICAgICAgICAgICAgICAgICAgIC8gX19fX3wgfCAgICAgICAgICAgICAgIHwgfFxuIgogICAgICAgICIgIFxcIFxcXy8gLyAgIF8gXyBfXyBfX8KgICAgX19fX3wgfCAgICB8IHwgX19fICBfICAgXyAgXyAgXyAgXyAgX3wgfFwuciIKICAgICAgICAiICAgXFwgICAvIHwgfCAnXyBgIF8gXFwgLyBfIFxcIHwgICAgfCB8LyBfIFxcfCB8IHwgfC8gX2AgfFxuIgogICAgICAgICIgICB8IHx8IHx3fCB8IHwgfCB8IHwgIF9fLyB8X19fX3wgfCAoXykgfCB8X3wgfCAoX3wgfFxuIgogICAgICAgICIgICB8X3wgXFxfXyxffCB8X3wgfF98XFxfX198XFxfX19fX3xffFxcX19fLyBcXF9fLF98XFxfXyxfXG4iCiAgICAgICAgIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIgogICAgICAgICJUaGlzIGFwcGxpY2F0aW9uIGlzIHByb3RlY3RlZCBieSBZdW1lQ2xvdWRcbiIKICAgICAgICA8PCBzdGQ6OmVuZGw7")),
"register_code", registerMethods,
- "auth_library", YumeCloudProtection.auth ? " native_jvm::utils::init_auth(dllBytes, dllSize);\n" : "",
- "dllBytes", dllBytes.toString(),
"includes", includes,
"native_dir", nativeDir,
"class_count", classCount,
- "authorization", YumeCloudProtection.auth ? " native_jvm::utils::auth(VMProtectDecryptStringA(\"" + YumeCloudProtection.applicationName + "\"), VMProtectDecryptStringA(\"" + YumeCloudProtection.authorizationURL + "login\"));\n" : ""
+ "authorization", authorization
));
}
-}
\ No newline at end of file
+}
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Compile.java b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Compile.java
index 87652b6..0348425 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Compile.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Compile.java
@@ -42,8 +42,12 @@ public static void compile(Path cppDir, Path outputDir, boolean hotSpot) {
command.append("@" + sources.getAbsolutePath()).append(" ");
command.append("-L\"" + cppDir.toAbsolutePath()).append("\" ");
- command.append("-lAuthorization").append(" ");
- command.append("-lVMProtectSDK64").append(" ");
+ // WinSock2:开放授权客户端的 HTTP 通信所需(原由闭源 Authorization.lib 传递链接)
+ command.append("-lws2_32").append(" ");
+ // VMProtect SDK 为可选组件:仅当用户在 resources 中提供了官方 lib 时链接(默认使用内置 no-op 桩)
+ if (Files.exists(cppDir.resolve("VMProtectSDK64.lib"))) {
+ command.append("-lVMProtectSDK64").append(" ");
+ }
command.append("-shared");
// For debugging
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Protect.java b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Protect.java
index 606d393..9bf1da3 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Protect.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/j2c/tasks/Protect.java
@@ -22,15 +22,25 @@ public class Protect {
private static final Logger logger = LoggerFactory.getLogger(Protect.class);
public static void protect(Path cppDir, Path outputDir) {
- logger.info("Start protecting native library...");
- try {
- String protectCommand = "vmp.exe ";
+ String project = YumeCloudProtection.auth ? "YumeCloud_NativeLibrary.vmp" : "YumeCloud_NativeLibrary_NoAuth.vmp";
- if (YumeCloudProtection.auth) {
- protectCommand += "YumeCloud_NativeLibrary.vmp";
- } else {
- protectCommand += "YumeCloud_NativeLibrary_NoAuth.vmp";
+ // VMProtect 为可选商业组件:vmp.exe 或对应 .vmp 工程缺失时跳过加壳,直接打包未加壳的原生库
+ if (!Files.exists(cppDir.resolve("vmp.exe")) || !Files.exists(cppDir.resolve(project))) {
+ logger.info("VMProtect not found (vmp.exe or {} missing). Skipping protection, shipping the unprotected native library.", project);
+ try {
+ Path library = cppDir.resolve("YumeCloud_NativeLibrary.dll");
+ if (!Files.exists(library)) library = cppDir.resolve("YumeCloud_NativeLibrary");
+ Util.addFileToZip("YumeCloudProtection/YCVM",
+ Files.readAllBytes(library), new File(outputDir.toAbsolutePath().toString()));
+ } catch (IOException e) {
+ logger.error("Failed to package the unprotected native library.", e);
}
+ return;
+ }
+
+ logger.info("Start protecting native library...");
+ try {
+ String protectCommand = "vmp.exe " + project;
ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command("cmd", "/c", protectCommand);
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/jobf/transformer/Transformer.java b/obfuscator/src/main/java/com/yumegod/obfuscator/jobf/transformer/Transformer.java
index d06330e..efb1cb8 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/jobf/transformer/Transformer.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/jobf/transformer/Transformer.java
@@ -3,7 +3,6 @@
import com.yumegod.obfuscator.jobf.protection.Protector;
import com.yumegod.obfuscator.jobf.transformer.impl.*;
import com.yumegod.obfuscator.jobf.transformer.impl.flow.ControlFlowObfuscator;
-import com.yumegod.obfuscator.jobf.transformer.impl.flow.v2.FlowObfuscator;
import com.yumegod.obfuscator.jobf.transformer.impl.fun.DeadCodeRemover;
import com.yumegod.obfuscator.jobf.transformer.impl.fun.DirectoryClassFileTransformer;
import com.yumegod.obfuscator.jobf.transformer.impl.fun.WatermarkTransformer;
diff --git a/obfuscator/src/main/java/com/yumegod/obfuscator/utils/Util.java b/obfuscator/src/main/java/com/yumegod/obfuscator/utils/Util.java
index d592056..70d5272 100644
--- a/obfuscator/src/main/java/com/yumegod/obfuscator/utils/Util.java
+++ b/obfuscator/src/main/java/com/yumegod/obfuscator/utils/Util.java
@@ -90,6 +90,15 @@ public static void copyResource(String from, Path to) throws IOException {
}
}
+ // 资源存在时复制并返回 true,缺失时静默跳过(用于可选的 VMProtect 商业组件)
+ public static boolean copyResourceIfExists(String from, Path to) throws IOException {
+ try (InputStream in = YumeCloudProtection.class.getClassLoader().getResourceAsStream(from)) {
+ if (in == null) return false;
+ Files.copy(in, to.resolve(Paths.get(from).getFileName()), StandardCopyOption.REPLACE_EXISTING);
+ return true;
+ }
+ }
+
private static String writeStreamToString(InputStream stream) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -156,6 +165,27 @@ public static String escapeCommentString(String value) {
return result.toString();
}
+ // 转义为合法 C++ 字符串字面量(用于生成的 .cpp 源码中的字符串常量)
+ public static String escapeString(String value) {
+ StringBuilder result = new StringBuilder(value.length());
+ for (char c : value.toCharArray()) {
+ switch (c) {
+ case '\\': result.append("\\\\"); break;
+ case '"': result.append("\\\""); break;
+ case '\n': result.append("\\n"); break;
+ case '\r': result.append("\\r"); break;
+ case '\t': result.append("\\t"); break;
+ default:
+ if (c >= 32 && c <= 126) {
+ result.append(c);
+ } else {
+ result.append(String.format("\\x%02x\"\"", (int) c & 0xFF));
+ }
+ }
+ }
+ return result.toString();
+ }
+
private static String unicodify(String string) {
StringBuilder result = new StringBuilder();
for (char c : string.toCharArray()) {
diff --git a/obfuscator/src/main/resources/default-config.json b/obfuscator/src/main/resources/default-config.json
index 571c972..50889c4 100644
--- a/obfuscator/src/main/resources/default-config.json
+++ b/obfuscator/src/main/resources/default-config.json
@@ -14,6 +14,7 @@
},
"native": {
"auth": true,
+ "auth_url": "http://127.0.0.1:13337/",
"app_name": "MyApplication",
"platform": "HOTSPOT",
"call_encryption": false,
diff --git a/obfuscator/src/main/resources/sources/Authorization.dll b/obfuscator/src/main/resources/sources/Authorization.dll
deleted file mode 100644
index 25e520a..0000000
Binary files a/obfuscator/src/main/resources/sources/Authorization.dll and /dev/null differ
diff --git a/obfuscator/src/main/resources/sources/Authorization.h b/obfuscator/src/main/resources/sources/Authorization.h
deleted file mode 100644
index e73f506..0000000
--- a/obfuscator/src/main/resources/sources/Authorization.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifdef YumeCloud_EXPORTS
-#define EXPORTS __declspec(dllexport)
-#else
-#define EXPORTS __declspec(dllimport)
-#endif
-
-extern "C" EXPORTS const char* authorization(const char* ApplicationName, const char* serverURL);
\ No newline at end of file
diff --git a/obfuscator/src/main/resources/sources/Authorization.lib b/obfuscator/src/main/resources/sources/Authorization.lib
deleted file mode 100644
index 2dec11f..0000000
Binary files a/obfuscator/src/main/resources/sources/Authorization.lib and /dev/null differ
diff --git a/obfuscator/src/main/resources/sources/VMProtectSDK.h b/obfuscator/src/main/resources/sources/VMProtectSDK.h
index 8c05846..c5313be 100644
--- a/obfuscator/src/main/resources/sources/VMProtectSDK.h
+++ b/obfuscator/src/main/resources/sources/VMProtectSDK.h
@@ -1,105 +1,40 @@
+// VMProtect SDK 兼容桩(开源版)
+//
+// 本仓库不随源码分发商业版 VMProtect SDK 与 vmp.exe。此头文件提供与官方
+// VMProtectSDK.h 同名 API 的空实现,其行为与"未经 VMProtect 处理的官方 SDK"
+// 完全一致:保护标记为空操作,字符串解密原样返回,检测函数恒返回安全值。
+//
+// 如需启用真实的 VMProtect 保护:购买授权后用官方 SDK 的 VMProtectSDK.h
+// 覆盖本文件,并将 VMProtectSDK64.lib、VMProtectSDK64.dll、vmp.exe 及
+// YumeCloud_NativeLibrary.vmp 工程文件放入 src/main/resources/sources/。
+// 构建流程会自动检测这些文件:存在时链接 SDK 并执行加壳,缺失时跳过。
#pragma once
-#if defined(__APPLE__) || defined(__unix__)
-#define VMP_IMPORT
-#define VMP_API
-#define VMP_WCHAR unsigned short
-#else
-#define VMP_IMPORT __declspec(dllimport)
-#define VMP_API __stdcall
-#define VMP_WCHAR wchar_t
-#ifdef _M_IX86
-#pragma comment(lib, "VMProtectSDK32.lib")
-#elif _M_X64
-#pragma comment(lib, "VMProtectSDK64.lib")
-#elif _M_ARM64
-#pragma comment(lib, "VMProtectARM64.lib")
-#else
-#error "Unsupported target architecture"
-#endif
-#endif // __APPLE__ || __unix__
-
#ifdef __cplusplus
extern "C" {
#endif
-// protection
-VMP_IMPORT void VMP_API VMProtectBegin(const char *);
-VMP_IMPORT void VMP_API VMProtectBeginVirtualization(const char *);
-VMP_IMPORT void VMP_API VMProtectBeginMutation(const char *);
-VMP_IMPORT void VMP_API VMProtectBeginUltra(const char *);
-VMP_IMPORT void VMP_API VMProtectBeginVirtualizationLockByKey(const char *);
-VMP_IMPORT void VMP_API VMProtectBeginUltraLockByKey(const char *);
-VMP_IMPORT void VMP_API VMProtectEnd(void);
-
-// utils
-VMP_IMPORT bool VMP_API VMProtectIsProtected();
-VMP_IMPORT bool VMP_API VMProtectIsDebuggerPresent(bool);
-VMP_IMPORT bool VMP_API VMProtectIsVirtualMachinePresent(void);
-VMP_IMPORT bool VMP_API VMProtectIsValidImageCRC(void);
-VMP_IMPORT const char * VMP_API VMProtectDecryptStringA(const char *value);
-VMP_IMPORT const VMP_WCHAR * VMP_API VMProtectDecryptStringW(const VMP_WCHAR *value);
-VMP_IMPORT bool VMP_API VMProtectFreeString(const void *value);
-
-// licensing
-enum VMProtectSerialStateFlags
-{
- SERIAL_STATE_SUCCESS = 0,
- SERIAL_STATE_FLAG_CORRUPTED = 0x00000001,
- SERIAL_STATE_FLAG_INVALID = 0x00000002,
- SERIAL_STATE_FLAG_BLACKLISTED = 0x00000004,
- SERIAL_STATE_FLAG_DATE_EXPIRED = 0x00000008,
- SERIAL_STATE_FLAG_RUNNING_TIME_OVER = 0x00000010,
- SERIAL_STATE_FLAG_BAD_HWID = 0x00000020,
- SERIAL_STATE_FLAG_MAX_BUILD_EXPIRED = 0x00000040,
-};
-
-#pragma pack(push, 1)
-typedef struct
-{
- unsigned short wYear;
- unsigned char bMonth;
- unsigned char bDay;
-} VMProtectDate;
-
-typedef struct
-{
- int nState; // VMProtectSerialStateFlags
- VMP_WCHAR wUserName[256]; // user name
- VMP_WCHAR wEMail[256]; // email
- VMProtectDate dtExpire; // date of serial number expiration
- VMProtectDate dtMaxBuild; // max date of build, that will accept this key
- int bRunningTime; // running time in minutes
- unsigned char nUserDataLength; // length of user data in bUserData
- unsigned char bUserData[255]; // up to 255 bytes of user data
-} VMProtectSerialNumberData;
-#pragma pack(pop)
-
-VMP_IMPORT int VMP_API VMProtectSetSerialNumber(const char *serial);
-VMP_IMPORT int VMP_API VMProtectGetSerialNumberState();
-VMP_IMPORT bool VMP_API VMProtectGetSerialNumberData(VMProtectSerialNumberData *data, int size);
-VMP_IMPORT int VMP_API VMProtectGetCurrentHWID(char *hwid, int size);
-
-// activation
-enum VMProtectActivationFlags
-{
- ACTIVATION_OK = 0,
- ACTIVATION_SMALL_BUFFER,
- ACTIVATION_NO_CONNECTION,
- ACTIVATION_BAD_REPLY,
- ACTIVATION_BANNED,
- ACTIVATION_CORRUPTED,
- ACTIVATION_BAD_CODE,
- ACTIVATION_ALREADY_USED,
- ACTIVATION_SERIAL_UNKNOWN,
- ACTIVATION_EXPIRED,
- ACTIVATION_NOT_AVAILABLE
-};
-
-VMP_IMPORT int VMP_API VMProtectActivateLicense(const char *code, char *serial, int size);
-VMP_IMPORT int VMP_API VMProtectDeactivateLicense(const char *serial);
-VMP_IMPORT int VMP_API VMProtectGetOfflineActivationString(const char *code, char *buf, int size);
-VMP_IMPORT int VMP_API VMProtectGetOfflineDeactivationString(const char *serial, char *buf, int size);
+// protection markers: no-op without VMProtect processing
+static inline void VMProtectBegin(const char *marker) { (void) marker; }
+static inline void VMProtectBeginVirtualization(const char *marker) { (void) marker; }
+static inline void VMProtectBeginMutation(const char *marker) { (void) marker; }
+static inline void VMProtectBeginUltra(const char *marker) { (void) marker; }
+static inline void VMProtectBeginVirtualizationLockByKey(const char *marker) { (void) marker; }
+static inline void VMProtectBeginUltraLockByKey(const char *marker) { (void) marker; }
+static inline void VMProtectEnd(void) {}
+
+// utils: pass-through without VMProtect processing
+static inline int VMProtectIsProtected(void) { return 0; }
+static inline int VMProtectIsDebuggerPresent(int detectVirtualPC) { (void) detectVirtualPC; return 0; }
+static inline int VMProtectIsVirtualMachinePresent(void) { return 0; }
+static inline int VMProtectIsValidImageCRC(void) { return 1; }
+static inline const char *VMProtectDecryptStringA(const char *value) { return value; }
+#ifdef _WIN32
+static inline const wchar_t *VMProtectDecryptStringW(const wchar_t *value) { return value; }
+#else
+static inline const unsigned short *VMProtectDecryptStringW(const unsigned short *value) { return value; }
+#endif
+static inline int VMProtectFreeString(const void *value) { (void) value; return 1; }
#ifdef __cplusplus
}
diff --git a/obfuscator/src/main/resources/sources/VMProtectSDK64.dll b/obfuscator/src/main/resources/sources/VMProtectSDK64.dll
deleted file mode 100644
index b2cf106..0000000
Binary files a/obfuscator/src/main/resources/sources/VMProtectSDK64.dll and /dev/null differ
diff --git a/obfuscator/src/main/resources/sources/VMProtectSDK64.lib b/obfuscator/src/main/resources/sources/VMProtectSDK64.lib
deleted file mode 100644
index d4e1c1a..0000000
Binary files a/obfuscator/src/main/resources/sources/VMProtectSDK64.lib and /dev/null differ
diff --git a/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary.vmp b/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary.vmp
deleted file mode 100644
index 9d023e3..0000000
--- a/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary.vmp
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary_NoAuth.vmp b/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary_NoAuth.vmp
deleted file mode 100644
index 9d023e3..0000000
--- a/obfuscator/src/main/resources/sources/YumeCloud_NativeLibrary_NoAuth.vmp
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/obfuscator/src/main/resources/sources/native_jvm.cpp b/obfuscator/src/main/resources/sources/native_jvm.cpp
index 8156f1a..b879c8a 100644
--- a/obfuscator/src/main/resources/sources/native_jvm.cpp
+++ b/obfuscator/src/main/resources/sources/native_jvm.cpp
@@ -1,42 +1,353 @@
#include "native_jvm.hpp"
#include
-#include
#include
#include
+#include
+#include
+#include
+#include
+
+#ifdef _WIN32
+#include
+#include
+#include
#include "VMProtectSDK.h"
+#else
+// POSIX 构建仅用于开发与测试授权客户端(正式产物始终面向 Windows)
+#include
+#include
+#include
+#include
+#endif
namespace native_jvm::utils {
- typedef const char* (*authorization)(const char*, const char*);
- authorization auth = NULL;
- void init_auth(const unsigned char* dllBytes, size_t dllSize) {
- char pp[MAX_PATH] = {0}, f[MAX_PATH] = {0}, df[MAX_PATH] = {0};
+ // ===== 开放授权客户端(替代闭源 Authorization.dll)=====
+ // 协议与自建授权服务器对齐:POST 表单 app=<应用名>&key=<密钥>,响应体 "success" 即通过
+ // 密钥来源优先级:环境变量 YCP_LICENSE_KEY → 工作目录 license.key 文件 → 交互式输入(Windows 为密钥对话框)
+
+#ifdef _WIN32
+#define YCP_STR(s) VMProtectDecryptStringA(s)
+#define YCP_PROTECT_BEGIN() VMProtectBeginUltra("authorization")
+#define YCP_PROTECT_END() VMProtectEnd()
+#else
+#define YCP_STR(s) (s)
+#define YCP_PROTECT_BEGIN() ((void) 0)
+#define YCP_PROTECT_END() ((void) 0)
+#endif
+
+ struct ParsedURL {
+ std::string host;
+ int port = 80;
+ std::string path = "/";
+ bool valid = false;
+ };
+
+ // 解析 http://host[:port]/path 形式的授权地址
+ static ParsedURL parse_url(const std::string &url) {
+ ParsedURL out;
+ std::string rest;
+ if (url.rfind("http://", 0) == 0) rest = url.substr(7);
+ else if (url.rfind("https://", 0) == 0) return out; // 与原实现一致:仅明文 HTTP
+ else rest = url;
+
+ size_t slash = rest.find('/');
+ if (slash == std::string::npos) out.host = rest;
+ else {
+ out.host = rest.substr(0, slash);
+ out.path = rest.substr(slash);
+ }
+ size_t colon = out.host.rfind(':');
+ if (colon != std::string::npos) {
+ out.port = atoi(out.host.substr(colon + 1).c_str());
+ out.host = out.host.substr(0, colon);
+ }
+ out.valid = !out.host.empty() && out.port > 0 && out.port < 65536;
+ return out;
+ }
+
+ static std::string url_encode(const std::string &value) {
+ static const char *hex = "0123456789ABCDEF";
+ std::string result;
+ result.reserve(value.size() * 3);
+ for (unsigned char c : value) {
+ if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
+ result += (char) c;
+ } else {
+ result += '%';
+ result += hex[c >> 4];
+ result += hex[c & 0xF];
+ }
+ }
+ return result;
+ }
+
+ static std::string &trim_inplace(std::string &s) {
+ size_t b = s.find_first_not_of(" \t\r\n");
+ if (b == std::string::npos) { s.clear(); return s; }
+ size_t e = s.find_last_not_of(" \t\r\n");
+ s = s.substr(b, e - b + 1);
+ return s;
+ }
+
+ // 简易 chunked 解码(gunicorn 等服务器可能启用分块传输)
+ static std::string decode_chunked(const std::string &in) {
+ std::string out;
+ size_t pos = 0;
+ while (pos < in.size()) {
+ size_t eol = in.find("\r\n", pos);
+ if (eol == std::string::npos) break;
+ unsigned long size = strtoul(in.substr(pos, eol - pos).c_str(), nullptr, 16);
+ if (size == 0) break;
+ size_t data_start = eol + 2;
+ if (data_start + size > in.size()) break;
+ out.append(in, data_start, size);
+ pos = data_start + size + 2;
+ }
+ return out;
+ }
+
+ // 跨平台 HTTP POST(Windows: WinSock2 / POSIX: socket,用于开发测试)
+ static bool http_post(const ParsedURL &url, const std::string &body, int timeout_seconds, std::string &response) {
+#ifdef _WIN32
+ WSADATA wsa;
+ static bool wsa_ready = false;
+ if (!wsa_ready) {
+ if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0) return false;
+ wsa_ready = true;
+ }
+#endif
+ struct addrinfo hints{}, *res = nullptr;
+ hints.ai_family = AF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ if (getaddrinfo(url.host.c_str(), std::to_string(url.port).c_str(), &hints, &res) != 0 || !res)
+ return false;
+
+ int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+ if (fd < 0) { freeaddrinfo(res); return false; }
+
+#ifdef _WIN32
+ DWORD timeout_ms = timeout_seconds * 1000;
+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (const char *) &timeout_ms, sizeof(timeout_ms));
+ setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (const char *) &timeout_ms, sizeof(timeout_ms));
+#else
+ struct timeval tv{};
+ tv.tv_sec = timeout_seconds;
+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
+ setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
+#endif
+
+ bool ok = connect(fd, res->ai_addr, (int) res->ai_addrlen) == 0;
+ freeaddrinfo(res);
+ if (!ok) {
+#ifdef _WIN32
+ closesocket(fd);
+#else
+ close(fd);
+#endif
+ return false;
+ }
+
+ std::string request;
+ request += "POST " + url.path + " HTTP/1.1\r\n";
+ request += "Host: " + url.host + (url.port != 80 ? ":" + std::to_string(url.port) : "") + "\r\n";
+ request += "Content-Type: application/x-www-form-urlencoded\r\n";
+ request += "Content-Length: " + std::to_string(body.size()) + "\r\n";
+ request += "Connection: close\r\n\r\n";
+ request += body;
+
+ ok = send(fd, request.c_str(), (int) request.size(), 0) == (int) request.size();
+
+ std::string raw;
+ if (ok) {
+ char buf[4096];
+ int n;
+ while ((n = recv(fd, buf, sizeof(buf), 0)) > 0)
+ raw.append(buf, (size_t) n);
+ }
+
+#ifdef _WIN32
+ closesocket(fd);
+#else
+ close(fd);
+#endif
+ if (!ok || raw.empty()) return false;
- if (!GetTempPathA(MAX_PATH, pp) || !pp[0]) { printf(VMProtectDecryptStringA("Temp path error")); return; }
- if (!GetTempFileNameA(pp, "DLL", 0, f)) { printf(VMProtectDecryptStringA("Temp file error")); return; }
+ size_t header_end = raw.find("\r\n\r\n");
+ if (header_end == std::string::npos) return false;
+ std::string headers = raw.substr(0, header_end);
+ std::string content = raw.substr(header_end + 4);
- #if defined(_MSC_VER)
- _snprintf_s(df, MAX_PATH, _TRUNCATE, "%s.dll", f);
- #else
- snprintf(df, MAX_PATH, "%s.dll", f);
- #endif
+ std::string lower;
+ lower.reserve(headers.size());
+ for (char c : headers) lower += (char) std::tolower((unsigned char) c);
+ if (lower.find("transfer-encoding: chunked") != std::string::npos)
+ content = decode_chunked(content);
- if (!MoveFileA(f, df) && !MoveFileExA(f, df, MOVEFILE_REPLACE_EXISTING)) {
- printf(VMProtectDecryptStringA("Rename to .dll failed")); DeleteFileA(f); return;
+ response = content;
+ return true;
+ }
+
+ // 从工作目录 license.key 读取密钥(支持 BOM 与首尾空白)
+ static std::string read_key_from_file() {
+ FILE *f = fopen(YCP_STR("license.key"), "rb");
+ if (!f) return "";
+ std::string key;
+ char buf[512];
+ size_t n;
+ while ((n = fread(buf, 1, sizeof(buf), f)) > 0) key.append(buf, n);
+ fclose(f);
+ if (key.size() >= 3 && (unsigned char) key[0] == 0xEF && (unsigned char) key[1] == 0xBB && (unsigned char) key[2] == 0xBF)
+ key = key.substr(3);
+ return trim_inplace(key);
+ }
+
+#ifdef _WIN32
+ // —— 无资源文件的密钥输入对话框(内存构造 DLGTEMPLATE)——
+ struct KeyDialogCtx {
+ char key[512];
+ char title[160];
+ };
+
+ static INT_PTR CALLBACK key_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) {
+ switch (msg) {
+ case WM_INITDIALOG: {
+ KeyDialogCtx *ctx = (KeyDialogCtx *) lp;
+ SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR) ctx);
+ SetWindowTextA(hwnd, ctx->title);
+ return TRUE;
+ }
+ case WM_COMMAND:
+ if (LOWORD(wp) == IDOK || LOWORD(wp) == IDCANCEL) {
+ KeyDialogCtx *ctx = (KeyDialogCtx *) GetWindowLongPtrA(hwnd, GWLP_USERDATA);
+ if (LOWORD(wp) == IDOK) GetDlgItemTextA(hwnd, 101, ctx->key, sizeof(ctx->key));
+ EndDialog(hwnd, LOWORD(wp) == IDOK ? 1 : 0);
+ return TRUE;
+ }
+ break;
+ case WM_CLOSE:
+ EndDialog(hwnd, 0);
+ return TRUE;
}
+ return FALSE;
+ }
- FILE* fp = fopen(df, "wb");
- if (!fp) { printf(VMProtectDecryptStringA("Open temp .dll failed")); DeleteFileA(df); return; }
- if (fwrite(dllBytes, 1, dllSize, fp) != dllSize) {
- fclose(fp); printf(VMProtectDecryptStringA("Write .dll failed")); DeleteFileA(df); return;
+ static std::vector build_key_dlg_template() {
+ std::vector buf;
+ auto put = [&buf](const void *data, size_t len) {
+ const BYTE *p = (const BYTE *) data;
+ buf.insert(buf.end(), p, p + len);
+ };
+ auto align4 = [&buf]() { while (buf.size() % sizeof(DWORD)) buf.push_back(0); };
+ auto put_word = [&buf](WORD w) { buf.push_back((BYTE) w); buf.push_back((BYTE) (w >> 8)); };
+ auto put_wstr = [&buf, &align4, &put_word](const wchar_t *s) {
+ align4();
+ while (*s) { put_word((WORD) *s); s++; }
+ put_word(0);
+ };
+
+ DLGTEMPLATE dt{};
+ dt.style = WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_CENTER;
+ dt.cdit = 3;
+ dt.cx = 240;
+ dt.cy = 76;
+ put(&dt, sizeof(dt));
+ put_word(0); // 菜单:无
+ put_word(0); // 窗口类:预定义对话框类
+ put_wstr(L"YumeCloudProtection");
+
+ // 依次注册 Static(提示) / Edit(输入) / Button(确定),类原子 0x0082/0x0081/0x0080
+ auto item = [&](DWORD style, WORD x, WORD y, WORD cx, WORD cy, WORD id, WORD class_atom, const wchar_t *title) {
+ align4();
+ DLGITEMTEMPLATE it{};
+ it.style = style;
+ it.x = x; it.y = y; it.cx = cx; it.cy = cy;
+ it.id = id;
+ put(&it, sizeof(it));
+ put_word(class_atom);
+ put_wstr(title);
+ put_word(0); // creation data:无
+ };
+
+ item(WS_CHILD | WS_VISIBLE | SS_LEFT, 10, 10, 220, 8, (WORD) -1, 0x0082, L"Please enter your license key:");
+ item(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL, 10, 24, 220, 14, 101, 0x0081, L"");
+ item(WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON, 90, 48, 60, 14, IDOK, 0x0080, L"OK");
+ return buf;
+ }
+
+ static std::string prompt_key_dialog(const char *application_name) {
+ KeyDialogCtx ctx{};
+ snprintf(ctx.title, sizeof(ctx.title), "%s - License", application_name);
+ std::vector tmpl = build_key_dlg_template();
+ INT_PTR r = DialogBoxIndirectParamA((HINSTANCE) GetModuleHandleA(nullptr),
+ (LPCDLGTEMPLATE) tmpl.data(), nullptr, key_dlg_proc, (LPARAM) &ctx);
+ if (r == 1 && ctx.key[0]) return std::string(ctx.key);
+ return "";
+ }
+#endif
+
+ static std::string prompt_key(const char *application_name) {
+#ifdef _WIN32
+ return prompt_key_dialog(application_name);
+#else
+ fprintf(stderr, "[%s] %s", application_name, YCP_STR("please enter your license key: "));
+ char buf[512] = {0};
+ if (!fgets(buf, sizeof(buf), stdin)) return "";
+ std::string key(buf);
+ return trim_inplace(key);
+#endif
+ }
+
+ static void notify_invalid_key(const char *application_name) {
+#ifdef _WIN32
+ MessageBoxA(nullptr, YCP_STR("Invalid or expired license key."), application_name, MB_ICONERROR | MB_OK);
+#else
+ fprintf(stderr, "[%s] %s\n", application_name, YCP_STR("invalid or expired license key"));
+#endif
+ }
+
+ bool auth(const char *applicationName, const char *serverURL) {
+ YCP_PROTECT_BEGIN();
+
+ ParsedURL url = parse_url(serverURL);
+ if (!url.valid) {
+ fprintf(stderr, "[YumeCloudProtection] %s: %s\n", YCP_STR("invalid authorization server URL"), serverURL);
+ YCP_PROTECT_END();
+ return false;
}
- fclose(fp);
- HMODULE g_hLib = LoadLibraryA(df);
- if (!g_hLib) { printf(VMProtectDecryptStringA("Failed to load authorization library")); DeleteFileA(df); return; }
+ // 非交互来源:环境变量 → license.key 文件
+ std::string key;
+ const char *env = getenv(YCP_STR("YCP_LICENSE_KEY"));
+ if (env && *env) { key = env; trim_inplace(key); }
+ if (key.empty()) key = read_key_from_file();
+
+ // 交互模式(弹窗/控制台输入)最多尝试 3 次;非交互密钥只验证 1 次
+ bool interactive = key.empty();
+ int max_attempts = interactive ? 3 : 1;
+
+ for (int attempt = 0; attempt < max_attempts; attempt++) {
+ if (interactive)
+ key = prompt_key(applicationName);
+ if (key.empty())
+ break; // 用户取消
+
+ std::string body = std::string(YCP_STR("app=")) + url_encode(applicationName)
+ + YCP_STR("&key=") + url_encode(key);
+ std::string response;
+ if (http_post(url, body, 10, response) && trim_inplace(response) == YCP_STR("success")) {
+ YCP_PROTECT_END();
+ return true;
+ }
+
+ if (attempt + 1 < max_attempts)
+ notify_invalid_key(applicationName);
+ key.clear();
+ }
- auth = (authorization)GetProcAddress(g_hLib, VMProtectDecryptStringA("authorization"));
- if (!auth) { printf(VMProtectDecryptStringA("Failed to locate authorization function")); FreeLibrary(g_hLib); DeleteFileA(df); return; }
+ fprintf(stderr, "[YumeCloudProtection] %s\n", YCP_STR("license validation failed"));
+ YCP_PROTECT_END();
+ return false;
}
jclass boolean_array_class;
diff --git a/obfuscator/src/main/resources/sources/native_jvm.hpp b/obfuscator/src/main/resources/sources/native_jvm.hpp
index 675bcb5..e45c47b 100644
--- a/obfuscator/src/main/resources/sources/native_jvm.hpp
+++ b/obfuscator/src/main/resources/sources/native_jvm.hpp
@@ -12,10 +12,10 @@
#define NATIVE_JVM_HPP_GUARD
namespace native_jvm::utils {
- using authorization = const char* (*)(const char*, const char*);
- extern authorization auth;
-
- void init_auth(const unsigned char* dllBytes, std::size_t dllSize);
+ // 开放授权客户端:直接向授权服务器 POST /login 验证密钥(替代闭源 Authorization.dll)
+ // 密钥来源优先级:环境变量 YCP_LICENSE_KEY → 工作目录 license.key → 交互输入(Windows 为密钥对话框)
+ // 验证失败返回 false,由 JNI_OnLoad 返回 JNI_ERR 终止加载
+ bool auth(const char* applicationName, const char* serverURL);
void init_utils(JNIEnv *env);
diff --git a/obfuscator/src/main/resources/sources/native_jvm_output.cpp b/obfuscator/src/main/resources/sources/native_jvm_output.cpp
index 939cebd..1a5dad2 100644
--- a/obfuscator/src/main/resources/sources/native_jvm_output.cpp
+++ b/obfuscator/src/main/resources/sources/native_jvm_output.cpp
@@ -33,11 +33,8 @@ namespace native_jvm {
}
}
-$dllBytes
-
extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
$watermark
-$auth_library
$authorization
JNIEnv *env = nullptr;
vm->GetEnv((void **)&env, JNI_VERSION_1_8);
diff --git a/obfuscator/src/main/resources/sources/vmp.exe b/obfuscator/src/main/resources/sources/vmp.exe
deleted file mode 100644
index 016b741..0000000
Binary files a/obfuscator/src/main/resources/sources/vmp.exe and /dev/null differ
diff --git a/server_go/Dockerfile b/server_go/Dockerfile
index 4808622..004f70f 100644
--- a/server_go/Dockerfile
+++ b/server_go/Dockerfile
@@ -1,3 +1,13 @@
+# ===== 阶段 1: 构建前端(admin-web) =====
+FROM node:20-alpine AS frontend
+
+WORKDIR /web
+COPY admin-web/frontend/package.json admin-web/frontend/package-lock.json ./
+RUN npm ci --no-audit --no-fund
+COPY admin-web/frontend/ ./
+RUN npm run build
+
+# ===== 阶段 2: 编译 Go 服务器(嵌入前端) =====
FROM golang:1.21-alpine AS builder
# 安装编译依赖
@@ -6,14 +16,16 @@ RUN apk add --no-cache gcc musl-dev sqlite-dev
WORKDIR /build
# 复制依赖文件
-COPY go.mod go.sum ./
+COPY server_go/go.mod server_go/go.sum ./
RUN go mod download
-# 复制源码并编译
-COPY main.go ./
+# 复制源码与前端构建产物(embed 需要 web/ 目录)
+COPY server_go/main.go ./
+COPY --from=frontend /web/dist ./web
+
RUN CGO_ENABLED=1 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ycp-auth .
-# 最终镜像
+# ===== 阶段 3: 运行镜像 =====
FROM alpine:latest
# 安装运行时依赖
@@ -21,13 +33,13 @@ RUN apk --no-cache add ca-certificates sqlite-libs
WORKDIR /app
-# 从构建阶段复制二进制文件
+# 从构建阶段复制二进制文件(前端已嵌入)
COPY --from=builder /build/ycp-auth .
# 创建数据目录
RUN mkdir -p /app/data
-# 暴露端口
+# 暴露端口(授权协议 + Web 管理面板同端口)
EXPOSE 13337
# 运行应用
diff --git a/server_go/go.mod b/server_go/go.mod
index 73a1b76..d69b910 100644
--- a/server_go/go.mod
+++ b/server_go/go.mod
@@ -7,3 +7,32 @@ require (
github.com/google/uuid v1.6.0
github.com/mattn/go-sqlite3 v1.14.22
)
+
+require (
+ github.com/bytedance/sonic v1.11.6 // indirect
+ github.com/bytedance/sonic/loader v0.1.1 // indirect
+ github.com/cloudwego/base64x v0.1.4 // indirect
+ github.com/cloudwego/iasm v0.2.0 // indirect
+ github.com/gabriel-vasile/mimetype v1.4.3 // indirect
+ github.com/gin-contrib/sse v0.1.0 // indirect
+ github.com/go-playground/locales v0.14.1 // indirect
+ github.com/go-playground/universal-translator v0.18.1 // indirect
+ github.com/go-playground/validator/v10 v10.20.0 // indirect
+ github.com/goccy/go-json v0.10.2 // indirect
+ github.com/json-iterator/go v1.1.12 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+ github.com/leodido/go-urn v1.4.0 // indirect
+ github.com/mattn/go-isatty v0.0.20 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.2 // indirect
+ github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+ github.com/ugorji/go/codec v1.2.12 // indirect
+ golang.org/x/arch v0.8.0 // indirect
+ golang.org/x/crypto v0.23.0 // indirect
+ golang.org/x/net v0.25.0 // indirect
+ golang.org/x/sys v0.20.0 // indirect
+ golang.org/x/text v0.15.0 // indirect
+ google.golang.org/protobuf v1.34.1 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/server_go/go.sum b/server_go/go.sum
new file mode 100644
index 0000000..e72b78b
--- /dev/null
+++ b/server_go/go.sum
@@ -0,0 +1,93 @@
+github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
+github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
+github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
+github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
+github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
+github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
+github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
+github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
+github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
+github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
+github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
+github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
+github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
+github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
+github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
+github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
+github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
+github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
+github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
+github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
+github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
+github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
+github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
+golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
+golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
+google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
diff --git a/server_go/main.go b/server_go/main.go
index dc31d09..e798aa0 100644
--- a/server_go/main.go
+++ b/server_go/main.go
@@ -1,12 +1,23 @@
package main
import (
+ "crypto/hmac"
+ "crypto/rand"
"crypto/sha256"
"database/sql"
+ "embed"
+ "encoding/base64"
"encoding/hex"
+ "encoding/json"
"fmt"
+ "io/fs"
"log"
+ "math"
+ "math/big"
+ "mime"
"net/http"
+ "os"
+ "path/filepath"
"strconv"
"strings"
"time"
@@ -18,15 +29,30 @@ import (
var db *sql.DB
+// 前端构建产物(admin-web/frontend npm run build 后拷贝到 web/)
+//
+//go:embed web
+var webFS embed.FS
+
+const dbTimeLayout = "2006-01-02 15:04:05"
+const jwtExpiration = 86400 // 24 小时(秒)
+
+var jwtSecret []byte
+
// 初始化数据库
func initDB() error {
+ dbPath := os.Getenv("YCP_DB_PATH")
+ if dbPath == "" {
+ dbPath = "./ycp_auth.db"
+ }
+
var err error
- db, err = sql.Open("sqlite3", "./ycp_auth.db")
+ db, err = sql.Open("sqlite3", dbPath)
if err != nil {
return err
}
- // 应用表
+ // 应用表(管理员账号,Web 面板与原生协议共用)
_, err = db.Exec(`CREATE TABLE IF NOT EXISTS applications (
app_name TEXT PRIMARY KEY,
password_hash TEXT NOT NULL,
@@ -44,25 +70,122 @@ func initDB() error {
is_banned INTEGER DEFAULT 0,
last_login TEXT,
created_at TEXT NOT NULL,
+ login_count INTEGER DEFAULT 0,
FOREIGN KEY (app_name) REFERENCES applications(app_name)
)`)
+ if err != nil {
+ return err
+ }
+
+ // 旧库迁移:补充 login_count 列(已存在时报错可忽略)
+ _, _ = db.Exec("ALTER TABLE keys ADD COLUMN login_count INTEGER DEFAULT 0")
+
+ // 设置表(存 JWT 密钥,保证重启/多实例后 token 仍有效)
+ _, err = db.Exec(`CREATE TABLE IF NOT EXISTS settings (
+ name TEXT PRIMARY KEY,
+ value TEXT NOT NULL
+ )`)
return err
}
-// 密码哈希
+// 加载或生成 JWT 密钥(持久化到数据库)
+func loadOrCreateJWTSecret() error {
+ var secret string
+ err := db.QueryRow("SELECT value FROM settings WHERE name='jwt_secret'").Scan(&secret)
+ if err == sql.ErrNoRows {
+ b := make([]byte, 32)
+ if _, err := rand.Read(b); err != nil {
+ return err
+ }
+ secret = hex.EncodeToString(b)
+ if _, err := db.Exec("INSERT INTO settings (name, value) VALUES ('jwt_secret', ?)", secret); err != nil {
+ return err
+ }
+ } else if err != nil {
+ return err
+ }
+ jwtSecret = []byte(secret)
+ return nil
+}
+
+// 密码哈希(与原生协议一致:SHA256)
func hashPassword(password string) string {
hash := sha256.Sum256([]byte(password))
return hex.EncodeToString(hash[:])
}
-// 生成密钥
+// 生成密钥(原生命令格式:app_uuid)
func generateKey(appName string, days int) (string, string) {
keyID := fmt.Sprintf("%s_%s", appName, uuid.New().String())
- expireDate := time.Now().AddDate(0, 0, days).Format("2006-01-02 15:04:05")
+ expireDate := time.Now().AddDate(0, 0, days).Format(dbTimeLayout)
return keyID, expireDate
}
-// 认证中间件
+// ===== JWT (HS256) =====
+
+func b64url(data []byte) string {
+ return base64.RawURLEncoding.EncodeToString(data)
+}
+
+func generateJWT(appName string) string {
+ now := time.Now().Unix()
+ header, _ := json.Marshal(map[string]string{"alg": "HS256", "typ": "JWT"})
+ payload, _ := json.Marshal(map[string]interface{}{
+ "sub": appName,
+ "iat": now,
+ "exp": now + jwtExpiration,
+ })
+ signingInput := b64url(header) + "." + b64url(payload)
+ mac := hmac.New(sha256.New, jwtSecret)
+ mac.Write([]byte(signingInput))
+ return signingInput + "." + b64url(mac.Sum(nil))
+}
+
+func validateJWT(token string) (string, bool) {
+ parts := strings.Split(token, ".")
+ if len(parts) != 3 {
+ return "", false
+ }
+ signingInput := parts[0] + "." + parts[1]
+ mac := hmac.New(sha256.New, jwtSecret)
+ mac.Write([]byte(signingInput))
+ expected := b64url(mac.Sum(nil))
+ if !hmac.Equal([]byte(expected), []byte(parts[2])) {
+ return "", false
+ }
+ payload, err := base64.RawURLEncoding.DecodeString(parts[1])
+ if err != nil {
+ return "", false
+ }
+ var claims struct {
+ Sub string `json:"sub"`
+ Exp int64 `json:"exp"`
+ }
+ if err := json.Unmarshal(payload, &claims); err != nil {
+ return "", false
+ }
+ if time.Now().Unix() >= claims.Exp {
+ return "", false
+ }
+ return claims.Sub, true
+}
+
+// JWT 认证中间件(Web 面板 REST API 用)
+func requireJWT() gin.HandlerFunc {
+ return func(c *gin.Context) {
+ authHeader := c.GetHeader("Authorization")
+ token := strings.TrimPrefix(authHeader, "Bearer ")
+ appName, ok := validateJWT(token)
+ if !ok {
+ c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"error": "Invalid or expired token"})
+ return
+ }
+ c.Set("app_name", appName)
+ c.Next()
+ }
+}
+
+// 表单认证中间件(原生协议用)
func requireAuth() gin.HandlerFunc {
return func(c *gin.Context) {
appName := c.PostForm("app")
@@ -87,7 +210,9 @@ func requireAuth() gin.HandlerFunc {
}
}
-// 管理员登录
+// ===== 原生协议 API =====
+
+// 管理员登录(表单)
func adminLogin(c *gin.Context) {
appName := c.PostForm("app")
password := c.PostForm("password")
@@ -102,7 +227,7 @@ func adminLogin(c *gin.Context) {
}
}
-// 管理命令
+// 管理命令(表单)
func adminCommand(c *gin.Context) {
command := c.PostForm("command")
appName := c.GetString("app_name")
@@ -135,7 +260,7 @@ func adminCommand(c *gin.Context) {
for i := 0; i < amount; i++ {
keyID, expireDate := generateKey(appName, days)
_, err := db.Exec("INSERT INTO keys (key_id, app_name, expire_date, created_at) VALUES (?, ?, ?, ?)",
- keyID, appName, expireDate, time.Now().Format("2006-01-02 15:04:05"))
+ keyID, appName, expireDate, time.Now().Format(dbTimeLayout))
if err != nil {
c.String(http.StatusInternalServerError, "Database error")
return
@@ -172,7 +297,7 @@ func adminCommand(c *gin.Context) {
return
}
- result, err := db.Exec("UPDATE keys SET last_login=NULL WHERE key_id=? AND app_name=?", parts[1], appName)
+ result, err := db.Exec("UPDATE keys SET last_login=NULL, login_count=0 WHERE key_id=? AND app_name=?", parts[1], appName)
if err != nil {
c.String(http.StatusInternalServerError, "Database error")
return
@@ -208,7 +333,7 @@ func adminCommand(c *gin.Context) {
}
}
-// 客户端登录验证
+// 客户端登录验证(C++ Native 层调用)
func clientLogin(c *gin.Context) {
appName := c.PostForm("app")
key := c.PostForm("key")
@@ -232,19 +357,19 @@ func clientLogin(c *gin.Context) {
return
}
- expireDT, _ := time.Parse("2006-01-02 15:04:05", expireDate)
+ expireDT, _ := time.Parse(dbTimeLayout, expireDate)
if time.Now().After(expireDT) {
c.String(http.StatusForbidden, "Key expired")
return
}
- // 更新最后登录时间
- _, _ = db.Exec("UPDATE keys SET last_login=? WHERE key_id=?", time.Now().Format("2006-01-02 15:04:05"), key)
+ // 更新最后登录时间和登录次数
+ _, _ = db.Exec("UPDATE keys SET last_login=?, login_count=login_count+1 WHERE key_id=?", time.Now().Format(dbTimeLayout), key)
c.String(http.StatusOK, "success")
}
-// 初始化管理员
+// 初始化管理员(表单)
func initAdmin(c *gin.Context) {
appName := c.PostForm("app")
password := c.PostForm("password")
@@ -262,7 +387,7 @@ func initAdmin(c *gin.Context) {
}
_, err = db.Exec("INSERT INTO applications (app_name, password_hash, created_at) VALUES (?, ?, ?)",
- appName, hashPassword(password), time.Now().Format("2006-01-02 15:04:05"))
+ appName, hashPassword(password), time.Now().Format(dbTimeLayout))
if err != nil {
c.String(http.StatusInternalServerError, "Database error")
@@ -272,6 +397,331 @@ func initAdmin(c *gin.Context) {
c.String(http.StatusOK, "Admin created successfully")
}
+// ===== Web 管理面板 REST API (JSON) =====
+
+type loginRequest struct {
+ AppName string `json:"appName"`
+ Password string `json:"password"`
+}
+
+// Web 面板:初始化管理员
+func apiInit(c *gin.Context) {
+ var req loginRequest
+ if err := c.ShouldBindJSON(&req); err != nil || req.AppName == "" || req.Password == "" {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Missing parameters"})
+ return
+ }
+
+ var exists int
+ err := db.QueryRow("SELECT 1 FROM applications WHERE app_name=?", req.AppName).Scan(&exists)
+ if err == nil {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Admin already exists for app: " + req.AppName})
+ return
+ }
+
+ _, err = db.Exec("INSERT INTO applications (app_name, password_hash, created_at) VALUES (?, ?, ?)",
+ req.AppName, hashPassword(req.Password), time.Now().Format(dbTimeLayout))
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+
+ c.JSON(http.StatusOK, gin.H{"message": "Admin initialized successfully"})
+}
+
+// Web 面板:登录,返回 JWT
+func apiLogin(c *gin.Context) {
+ var req loginRequest
+ if err := c.ShouldBindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid credentials"})
+ return
+ }
+
+ var passwordHash string
+ err := db.QueryRow("SELECT password_hash FROM applications WHERE app_name=?", req.AppName).Scan(&passwordHash)
+ if err != nil || passwordHash != hashPassword(req.Password) {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid credentials"})
+ return
+ }
+
+ c.JSON(http.StatusOK, gin.H{
+ "token": generateJWT(req.AppName),
+ "appName": req.AppName,
+ "expiresIn": jwtExpiration,
+ })
+}
+
+// keyInfo 从数据库行读取的密钥信息
+type keyInfo struct {
+ KeyID string
+ ExpireDate string
+ IsBanned bool
+ LastLogin sql.NullString
+ CreatedAt string
+ LoginCount int
+}
+
+func fetchKeys(appName string) ([]keyInfo, error) {
+ rows, err := db.Query(`SELECT key_id, expire_date, is_banned, last_login, created_at, login_count
+ FROM keys WHERE app_name=? ORDER BY created_at DESC`, appName)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+
+ var keys []keyInfo
+ for rows.Next() {
+ var k keyInfo
+ var banned int
+ if err := rows.Scan(&k.KeyID, &k.ExpireDate, &banned, &k.LastLogin, &k.CreatedAt, &k.LoginCount); err != nil {
+ return nil, err
+ }
+ k.IsBanned = banned == 1
+ keys = append(keys, k)
+ }
+ return keys, rows.Err()
+}
+
+// dbTimeToISO: "2006-01-02 15:04:05" → "2006-01-02T15:04:05"(前端 new Date() 可解析)
+func dbTimeToISO(s string) string {
+ return strings.Replace(s, " ", "T", 1)
+}
+
+func (k keyInfo) expired() bool {
+ expireDT, err := time.Parse(dbTimeLayout, k.ExpireDate)
+ return err == nil && time.Now().After(expireDT)
+}
+
+func (k keyInfo) daysUntilExpiry() int64 {
+ expireDT, err := time.Parse(dbTimeLayout, k.ExpireDate)
+ if err != nil {
+ return -1
+ }
+ return int64(math.Floor(time.Until(expireDT).Hours() / 24))
+}
+
+// Web 面板:仪表盘统计
+func apiStats(c *gin.Context) {
+ appName := c.GetString("app_name")
+ keys, err := fetchKeys(appName)
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+
+ var stats struct {
+ TotalKeys int64 `json:"totalKeys"`
+ ActiveKeys int64 `json:"activeKeys"`
+ ExpiredKeys int64 `json:"expiredKeys"`
+ BannedKeys int64 `json:"bannedKeys"`
+ ExpiringSoon int64 `json:"expiringSoon"`
+ TotalLogins int64 `json:"totalLogins"`
+ }
+
+ for _, k := range keys {
+ stats.TotalKeys++
+ if k.IsBanned {
+ stats.BannedKeys++
+ }
+ if k.expired() {
+ stats.ExpiredKeys++
+ }
+ if !k.IsBanned && !k.expired() {
+ stats.ActiveKeys++
+ }
+ if d := k.daysUntilExpiry(); d >= 0 && d <= 7 {
+ stats.ExpiringSoon++
+ }
+ stats.TotalLogins += int64(k.LoginCount)
+ }
+
+ c.JSON(http.StatusOK, stats)
+}
+
+// Web 面板:密钥列表
+func apiListKeys(c *gin.Context) {
+ appName := c.GetString("app_name")
+ keys, err := fetchKeys(appName)
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+
+ result := make([]gin.H, 0, len(keys))
+ for _, k := range keys {
+ status := "active"
+ if k.IsBanned {
+ status = "banned"
+ } else if k.expired() {
+ status = "expired"
+ }
+
+ var lastLogin interface{}
+ if k.LastLogin.Valid {
+ lastLogin = dbTimeToISO(k.LastLogin.String)
+ }
+
+ result = append(result, gin.H{
+ "key": k.KeyID,
+ "status": status,
+ "createdAt": dbTimeToISO(k.CreatedAt),
+ "expiresAt": dbTimeToISO(k.ExpireDate),
+ "lastLogin": lastLogin,
+ "loginCount": k.LoginCount,
+ "daysUntilExpiry": k.daysUntilExpiry(),
+ })
+ }
+
+ c.JSON(http.StatusOK, result)
+}
+
+type generateKeysRequest struct {
+ Amount int `json:"amount"`
+ Days int `json:"days"`
+ Prefix string `json:"prefix"`
+}
+
+const keyCharset = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789" // 排除易混淆字符
+
+func randomKeyPart() string {
+ b := make([]byte, 4)
+ for i := range b {
+ n, err := rand.Int(rand.Reader, big.NewInt(int64(len(keyCharset))))
+ if err != nil {
+ // 极端情况下退化为时间熵
+ b[i] = keyCharset[time.Now().UnixNano()%int64(len(keyCharset))]
+ continue
+ }
+ b[i] = keyCharset[n.Int64()]
+ }
+ return string(b)
+}
+
+// Web 面板:生成密钥(格式 PREFIX-XXXX-XXXX-XXXX)
+func apiGenerateKeys(c *gin.Context) {
+ appName := c.GetString("app_name")
+
+ var req generateKeysRequest
+ if err := c.ShouldBindJSON(&req); err != nil {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request"})
+ return
+ }
+
+ if req.Amount < 1 || req.Amount > 50 {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Amount must be between 1 and 50"})
+ return
+ }
+ if req.Days < 1 || req.Days > 9999 {
+ c.JSON(http.StatusBadRequest, gin.H{"error": "Days must be between 1 and 9999"})
+ return
+ }
+
+ prefix := "YCP"
+ if p := strings.ToUpper(strings.TrimSpace(req.Prefix)); p != "" {
+ prefix = p
+ }
+
+ now := time.Now()
+ expireDate := now.AddDate(0, 0, req.Days).Format(dbTimeLayout)
+
+ keys := make([]string, 0, req.Amount)
+ for i := 0; i < req.Amount; i++ {
+ key := fmt.Sprintf("%s-%s-%s-%s", prefix, randomKeyPart(), randomKeyPart(), randomKeyPart())
+ _, err := db.Exec("INSERT INTO keys (key_id, app_name, expire_date, created_at) VALUES (?, ?, ?, ?)",
+ key, appName, expireDate, now.Format(dbTimeLayout))
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+ keys = append(keys, key)
+ }
+
+ c.JSON(http.StatusOK, gin.H{"keys": keys})
+}
+
+// Web 面板:封禁/解封密钥
+func apiSetBan(banned bool) gin.HandlerFunc {
+ return func(c *gin.Context) {
+ appName := c.GetString("app_name")
+ key := c.Param("key")
+
+ value := 0
+ if banned {
+ value = 1
+ }
+ _, err := db.Exec("UPDATE keys SET is_banned=? WHERE key_id=? AND app_name=?", value, key, appName)
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+
+ if banned {
+ c.JSON(http.StatusOK, gin.H{"message": "Key banned"})
+ } else {
+ c.JSON(http.StatusOK, gin.H{"message": "Key unbanned"})
+ }
+ }
+}
+
+// Web 面板:删除密钥
+func apiDeleteKey(c *gin.Context) {
+ appName := c.GetString("app_name")
+ key := c.Param("key")
+
+ _, err := db.Exec("DELETE FROM keys WHERE key_id=? AND app_name=?", key, appName)
+ if err != nil {
+ c.JSON(http.StatusInternalServerError, gin.H{"error": "Database error"})
+ return
+ }
+
+ c.JSON(http.StatusOK, gin.H{"message": "Key deleted"})
+}
+
+// Web 面板:密钥指纹(SHA256 前 4 字节十六进制)
+func apiFingerprint(c *gin.Context) {
+ key := c.Param("key")
+ hash := sha256.Sum256([]byte(key))
+ c.JSON(http.StatusOK, gin.H{"fingerprint": strings.ToUpper(hex.EncodeToString(hash[:4]))})
+}
+
+// ===== 前端静态文件(SPA)=====
+
+func serveWeb(c *gin.Context) {
+ // API 路径未匹配到时返回 404 JSON
+ if strings.HasPrefix(c.Request.URL.Path, "/api") {
+ c.JSON(http.StatusNotFound, gin.H{"error": "Not found"})
+ return
+ }
+
+ sub, err := fs.Sub(webFS, "web")
+ if err != nil {
+ c.String(http.StatusInternalServerError, "web resources missing")
+ return
+ }
+
+ path := strings.TrimPrefix(c.Request.URL.Path, "/")
+ if path == "" {
+ path = "index.html"
+ }
+
+ // 直接读取文件内容返回,绕过 http.FileServer 对 index.html 的 301 重定向
+ data, err := fs.ReadFile(sub, path)
+ if err != nil {
+ // SPA fallback:任何未知路径回退到 index.html
+ path = "index.html"
+ if data, err = fs.ReadFile(sub, path); err != nil {
+ c.String(http.StatusNotFound, "web resources missing")
+ return
+ }
+ }
+
+ contentType := mime.TypeByExtension(filepath.Ext(path))
+ if contentType == "" {
+ contentType = http.DetectContentType(data)
+ }
+ c.Data(http.StatusOK, contentType, data)
+}
+
func main() {
// 初始化数据库
if err := initDB(); err != nil {
@@ -279,18 +729,52 @@ func main() {
}
defer db.Close()
+ if err := loadOrCreateJWTSecret(); err != nil {
+ log.Fatal("JWT secret initialization failed:", err)
+ }
+
// 配置 Gin
gin.SetMode(gin.ReleaseMode)
r := gin.Default()
- // 路由
+ // CORS(同端口部署本不需要,便于开发时前端 dev server 直连)
+ r.Use(func(c *gin.Context) {
+ c.Header("Access-Control-Allow-Origin", "*")
+ c.Header("Access-Control-Allow-Headers", "Authorization, Content-Type")
+ c.Header("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS")
+ if c.Request.Method == http.MethodOptions {
+ c.AbortWithStatus(http.StatusNoContent)
+ return
+ }
+ c.Next()
+ })
+
+ // 原生协议路由(表单,供 Admin Panel / Native 客户端调用)
r.POST("/admin_login", adminLogin)
r.POST("/admin", requireAuth(), adminCommand)
r.POST("/login", clientLogin)
r.POST("/init_admin", initAdmin)
+ // Web 管理面板 REST API(JSON + JWT)
+ api := r.Group("/api")
+ {
+ api.POST("/init", apiInit)
+ api.POST("/login", apiLogin)
+ api.GET("/dashboard/stats", requireJWT(), apiStats)
+ api.GET("/keys", requireJWT(), apiListKeys)
+ api.POST("/keys/generate", requireJWT(), apiGenerateKeys)
+ api.POST("/keys/:key/ban", requireJWT(), apiSetBan(true))
+ api.POST("/keys/:key/unban", requireJWT(), apiSetBan(false))
+ api.DELETE("/keys/:key", requireJWT(), apiDeleteKey)
+ api.GET("/keys/:key/fingerprint", apiFingerprint)
+ }
+
+ // 前端静态资源(SPA fallback)
+ r.NoRoute(serveWeb)
+
// 启动服务器
log.Println("YumeCloud Protection Auth Server started on :13337")
+ log.Println("Admin Web Panel: http://localhost:13337/")
if err := r.Run(":13337"); err != nil {
log.Fatal("Server failed to start:", err)
}
diff --git a/server_go/web/assets/index-BA-PQFIO.js b/server_go/web/assets/index-BA-PQFIO.js
new file mode 100644
index 0000000..98a0a15
--- /dev/null
+++ b/server_go/web/assets/index-BA-PQFIO.js
@@ -0,0 +1,75 @@
+function tp(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ba={exports:{}},io={},ec={exports:{}},I={};/**
+ * @license React
+ * react.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var $r=Symbol.for("react.element"),rp=Symbol.for("react.portal"),lp=Symbol.for("react.fragment"),op=Symbol.for("react.strict_mode"),ip=Symbol.for("react.profiler"),sp=Symbol.for("react.provider"),up=Symbol.for("react.context"),ap=Symbol.for("react.forward_ref"),cp=Symbol.for("react.suspense"),fp=Symbol.for("react.memo"),dp=Symbol.for("react.lazy"),hu=Symbol.iterator;function pp(e){return e===null||typeof e!="object"?null:(e=hu&&e[hu]||e["@@iterator"],typeof e=="function"?e:null)}var tc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nc=Object.assign,rc={};function Qn(e,t,n){this.props=e,this.context=t,this.refs=rc,this.updater=n||tc}Qn.prototype.isReactComponent={};Qn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Qn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lc(){}lc.prototype=Qn.prototype;function ss(e,t,n){this.props=e,this.context=t,this.refs=rc,this.updater=n||tc}var us=ss.prototype=new lc;us.constructor=ss;nc(us,Qn.prototype);us.isPureReactComponent=!0;var mu=Array.isArray,oc=Object.prototype.hasOwnProperty,as={current:null},ic={key:!0,ref:!0,__self:!0,__source:!0};function sc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)oc.call(t,r)&&!ic.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,$=O[F];if(0>>1;Fl(mn,L))U<$&&0>l(ue,mn)?(O[F]=ue,O[U]=L,F=U):(O[F]=mn,O[Le]=L,F=Le);else if(U<$&&0>l(ue,L))O[F]=ue,O[U]=L,F=U;else break e}}return D}function l(O,D){var L=O.sortIndex-D.sortIndex;return L!==0?L:O.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var u=[],a=[],f=1,p=null,m=3,g=!1,w=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(O){for(var D=n(a);D!==null;){if(D.callback===null)r(a);else if(D.startTime<=O)r(a),D.sortIndex=D.expirationTime,t(u,D);else break;D=n(a)}}function S(O){if(v=!1,h(O),!w)if(n(u)!==null)w=!0,ut(k);else{var D=n(a);D!==null&&Wt(S,D.startTime-O)}}function k(O,D){w=!1,v&&(v=!1,c(j),j=-1),g=!0;var L=m;try{for(h(D),p=n(u);p!==null&&(!(p.expirationTime>D)||O&&!b());){var F=p.callback;if(typeof F=="function"){p.callback=null,m=p.priorityLevel;var $=F(p.expirationTime<=D);D=e.unstable_now(),typeof $=="function"?p.callback=$:p===n(u)&&r(u),h(D)}else r(u);p=n(u)}if(p!==null)var qe=!0;else{var Le=n(a);Le!==null&&Wt(S,Le.startTime-D),qe=!1}return qe}finally{p=null,m=L,g=!1}}var C=!1,N=null,j=-1,V=5,A=-1;function b(){return!(e.unstable_now()-AO||125F?(O.sortIndex=L,t(a,O),n(u)===null&&O===n(a)&&(v?(c(j),j=-1):v=!0,Wt(S,L-F))):(O.sortIndex=$,t(u,O),w||g||(w=!0,ut(k))),O},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(O){var D=m;return function(){var L=m;m=D;try{return O.apply(this,arguments)}finally{m=L}}}})(pc);dc.exports=pc;var Cp=dc.exports;/**
+ * @license React
+ * react-dom.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var Rp=R,Ie=Cp;function x(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"),ui=Object.prototype.hasOwnProperty,Pp=/^[: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]*$/,gu={},vu={};function Np(e){return ui.call(vu,e)?!0:ui.call(gu,e)?!1:Pp.test(e)?vu[e]=!0:(gu[e]=!0,!1)}function Op(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 Tp(e,t,n,r){if(t===null||typeof t>"u"||Op(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 xe(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 pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new xe(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){pe[e]=new xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var fs=/[\-:]([a-z])/g;function ds(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(fs,ds);pe[t]=new xe(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(fs,ds);pe[t]=new xe(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(fs,ds);pe[t]=new xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new xe(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ps(e,t,n,r){var l=pe.hasOwnProperty(t)?pe[t]:null;(l!==null?l.type!==0:r||!(2s||l[i]!==o[s]){var u=`
+`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=s);break}}}finally{To=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function jp(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=jo(e.type,!1),e;case 11:return e=jo(e.type.render,!1),e;case 1:return e=jo(e.type,!0),e;default:return""}}function di(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 Sn:return"Fragment";case wn:return"Portal";case ai:return"Profiler";case hs:return"StrictMode";case ci:return"Suspense";case fi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yc:return(e.displayName||"Context")+".Consumer";case mc:return(e._context.displayName||"Context")+".Provider";case ms:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ys:return t=e.displayName||null,t!==null?t:di(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return di(e(t))}catch{}}return null}function Lp(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 di(t);case 8:return t===hs?"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 Mt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ap(e){var t=vc(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 tl(e){e._valueTracker||(e._valueTracker=Ap(e))}function wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Al(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 pi(e,t){var n=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Su(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mt(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 Sc(e,t){t=t.checked,t!=null&&ps(e,"checked",t,!1)}function hi(e,t){Sc(e,t);var n=Mt(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")?mi(e,t.type,n):t.hasOwnProperty("defaultValue")&&mi(e,t.type,Mt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Eu(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 mi(e,t,n){(t!=="number"||Al(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ar=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dr={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},Dp=["Webkit","ms","Moz","O"];Object.keys(dr).forEach(function(e){Dp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dr[t]=dr[e]})});function kc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dr.hasOwnProperty(e)&&dr[e]?(""+t).trim():t+"px"}function Cc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=kc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var zp=J({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 vi(e,t){if(t){if(zp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function wi(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 Si=null;function gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ei=null,Ln=null,An=null;function ku(e){if(e=Wr(e)){if(typeof Ei!="function")throw Error(x(280));var t=e.stateNode;t&&(t=fo(t),Ei(e.stateNode,e.type,t))}}function Rc(e){Ln?An?An.push(e):An=[e]:Ln=e}function Pc(){if(Ln){var e=Ln,t=An;if(An=Ln=null,ku(e),t)for(e=0;e>>=0,e===0?32:31-(Kp(e)/qp|0)|0}var rl=64,ll=4194304;function cr(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 Il(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 s=i&~l;s!==0?r=cr(s):(o&=i,o!==0&&(r=cr(o)))}else i=n&~l,i!==0?r=cr(i):o!==0&&(r=cr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=n}function Yp(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=hr),Au=" ",Du=!1;function qc(e,t){switch(e){case"keyup":return Ch.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function Ph(e,t){switch(e){case"compositionend":return Xc(t);case"keypress":return t.which!==32?null:(Du=!0,Au);case"textInput":return e=t.data,e===Au&&Du?null:e;default:return null}}function Nh(e,t){if(En)return e==="compositionend"||!Cs&&qc(e,t)?(e=Qc(),El=_s=Nt=null,En=!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=Uu(n)}}function Zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bc(){for(var e=window,t=Al();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Al(e.document)}return t}function Rs(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 Ih(e){var t=bc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zc(n.ownerDocument.documentElement,n)){if(r!==null&&Rs(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=Mu(n,o);var i=Mu(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,_n=null,Pi=null,yr=null,Ni=!1;function Bu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ni||_n==null||_n!==Al(r)||(r=_n,"selectionStart"in r&&Rs(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}),yr&&Nr(yr,r)||(yr=r,r=Bl(Pi,"onSelect"),0Cn||(e.current=Di[Cn],Di[Cn]=null,Cn--)}function H(e,t){Cn++,Di[Cn]=e.current,e.current=t}var Bt={},we=Ht(Bt),Pe=Ht(!1),nn=Bt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Bt;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 Ne(e){return e=e.childContextTypes,e!=null}function Hl(){Q(Pe),Q(we)}function qu(e,t,n){if(we.current!==Bt)throw Error(x(168));H(we,t),H(Pe,n)}function af(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(x(108,Lp(e)||"Unknown",l));return J({},n,r)}function Vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,nn=we.current,H(we,e),H(Pe,Pe.current),!0}function Xu(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=af(e,t,nn),r.__reactInternalMemoizedMergedChildContext=e,Q(Pe),Q(we),H(we,e)):Q(Pe),H(Pe,n)}var dt=null,po=!1,Qo=!1;function cf(e){dt===null?dt=[e]:dt.push(e)}function Jh(e){po=!0,cf(e)}function Vt(){if(!Qo&&dt!==null){Qo=!0;var e=0,t=B;try{var n=dt;for(B=1;e>=i,l-=i,pt=1<<32-Ze(t)+l|n<j?(V=N,N=null):V=N.sibling;var A=m(c,N,h[j],S);if(A===null){N===null&&(N=V);break}e&&N&&A.alternate===null&&t(c,N),d=o(A,d,j),C===null?k=A:C.sibling=A,C=A,N=V}if(j===h.length)return n(c,N),K&&Kt(c,j),k;if(N===null){for(;jj?(V=N,N=null):V=N.sibling;var b=m(c,N,A.value,S);if(b===null){N===null&&(N=V);break}e&&N&&b.alternate===null&&t(c,N),d=o(b,d,j),C===null?k=b:C.sibling=b,C=b,N=V}if(A.done)return n(c,N),K&&Kt(c,j),k;if(N===null){for(;!A.done;j++,A=h.next())A=p(c,A.value,S),A!==null&&(d=o(A,d,j),C===null?k=A:C.sibling=A,C=A);return K&&Kt(c,j),k}for(N=r(c,N);!A.done;j++,A=h.next())A=g(N,c,j,A.value,S),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?j:A.key),d=o(A,d,j),C===null?k=A:C.sibling=A,C=A);return e&&N.forEach(function(tt){return t(c,tt)}),K&&Kt(c,j),k}function E(c,d,h,S){if(typeof h=="object"&&h!==null&&h.type===Sn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case el:e:{for(var k=h.key,C=d;C!==null;){if(C.key===k){if(k=h.type,k===Sn){if(C.tag===7){n(c,C.sibling),d=l(C,h.props.children),d.return=c,c=d;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Yu(k)===C.type){n(c,C.sibling),d=l(C,h.props),d.ref=rr(c,C,h),d.return=c,c=d;break e}n(c,C);break}else t(c,C);C=C.sibling}h.type===Sn?(d=bt(h.props.children,c.mode,S,h.key),d.return=c,c=d):(S=Ol(h.type,h.key,h.props,null,c.mode,S),S.ref=rr(c,d,h),S.return=c,c=S)}return i(c);case wn:e:{for(C=h.key;d!==null;){if(d.key===C)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(c,d.sibling),d=l(d,h.children||[]),d.return=c,c=d;break e}else{n(c,d);break}else t(c,d);d=d.sibling}d=bo(h,c.mode,S),d.return=c,c=d}return i(c);case kt:return C=h._init,E(c,d,C(h._payload),S)}if(ar(h))return w(c,d,h,S);if(Zn(h))return v(c,d,h,S);fl(c,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(c,d.sibling),d=l(d,h),d.return=c,c=d):(n(c,d),d=Zo(h,c.mode,S),d.return=c,c=d),i(c)):n(c,d)}return E}var Bn=hf(!0),mf=hf(!1),Kl=Ht(null),ql=null,Nn=null,Ts=null;function js(){Ts=Nn=ql=null}function Ls(e){var t=Kl.current;Q(Kl),e._currentValue=t}function Ii(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 zn(e,t){ql=e,Ts=Nn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Ts!==e)if(e={context:e,memoizedValue:t,next:null},Nn===null){if(ql===null)throw Error(x(308));Nn=e,ql.dependencies={lanes:0,firstContext:e}}else Nn=Nn.next=e;return t}var Jt=null;function As(e){Jt===null?Jt=[e]:Jt.push(e)}function yf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,As(t)):(n.next=l.next,l.next=n),t.interleaved=n,vt(e,r)}function vt(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 Ct=!1;function Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gf(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 mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,vt(e,n)}return l=r.interleaved,l===null?(t.next=t,As(r)):(t.next=l.next,l.next=t),r.interleaved=t,vt(e,n)}function xl(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,ws(e,n)}}function Zu(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 Xl(e,t,n,r){var l=e.updateQueue;Ct=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,a=u.next;u.next=null,i===null?o=a:i.next=a,i=u;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==i&&(s===null?f.firstBaseUpdate=a:s.next=a,f.lastBaseUpdate=u))}if(o!==null){var p=l.baseState;i=0,f=a=u=null,s=o;do{var m=s.lane,g=s.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,v=s;switch(m=t,g=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){p=w.call(g,p,m);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,m=typeof w=="function"?w.call(g,p,m):w,m==null)break e;p=J({},p,m);break e;case 2:Ct=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[s]:m.push(s))}else g={eventTime:g,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(a=f=g,u=p):f=f.next=g,i|=m;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;m=s,s=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(f===null&&(u=p),l.baseState=u,l.firstBaseUpdate=a,l.lastBaseUpdate=f,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);on|=i,e.lanes=i,e.memoizedState=p}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=qo.transition;qo.transition={};try{e(!1),t()}finally{B=n,qo.transition=r}}function Df(){return Qe().memoizedState}function bh(e,t,n){var r=It(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zf(e))Ff(t,n);else if(n=yf(e,t,n,r),n!==null){var l=Ee();be(n,e,r,l),If(n,t,r)}}function em(e,t,n){var r=It(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zf(e))Ff(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,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,et(s,i)){var u=t.interleaved;u===null?(l.next=l,As(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=yf(e,t,l,r),n!==null&&(l=Ee(),be(n,e,r,l),If(n,t,r))}}function zf(e){var t=e.alternate;return e===X||t!==null&&t===X}function Ff(e,t){gr=Gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function If(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ws(e,n)}}var Yl={readContext:We,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},tm={readContext:We,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:ta,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,Of.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rt();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=bh.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:ea,useDebugValue:Hs,useDeferredValue:function(e){return rt().memoizedState=e},useTransition:function(){var e=ea(!1),t=e[0];return e=Zh.bind(null,e[1]),rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,l=rt();if(K){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),se===null)throw Error(x(349));ln&30||Ef(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,ta(xf.bind(null,r,o,e),[e]),r.flags|=2048,Fr(9,_f.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=rt(),t=se.identifierPrefix;if(K){var n=ht,r=pt;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dr++,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[ot]=t,e[jr]=r,qf(e,t,!1,!1),t.stateNode=e;e:{switch(i=wi(n,r),n){case"dialog":W("cancel",e),W("close",e),l=r;break;case"iframe":case"object":case"embed":W("load",e),l=r;break;case"video":case"audio":for(l=0;lVn&&(t.flags|=128,r=!0,lr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Jl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!K)return me(t),null}else 2*Y()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,lr(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=Y(),t.sibling=null,n=q.current,H(q,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return Xs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function am(e,t){switch(Ns(t),t.tag){case 1:return Ne(t.type)&&Hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(),Q(Pe),Q(we),Is(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fs(t),null;case 13:if(Q(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(q),null;case 4:return $n(),null;case 10:return Ls(t.type._context),null;case 22:case 23:return Xs(),null;case 24:return null;default:return null}}var pl=!1,ge=!1,cm=typeof WeakSet=="function"?WeakSet:Set,T=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function Ki(e,t,n){try{n()}catch(r){G(e,t,r)}}var da=!1;function fm(e,t){if(Oi=Ul,e=bc(),Rs(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,s=-1,u=-1,a=0,f=0,p=e,m=null;t:for(;;){for(var g;p!==n||l!==0&&p.nodeType!==3||(s=i+l),p!==o||r!==0&&p.nodeType!==3||(u=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(g=p.firstChild)!==null;)m=p,p=g;for(;;){if(p===e)break t;if(m===n&&++a===l&&(s=i),m===o&&++f===r&&(u=i),(g=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=g}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ti={focusedElem:e,selectionRange:n},Ul=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,E=w.memoizedState,c=t.stateNode,d=c.getSnapshotBeforeUpdate(t.elementType===t.type?v:Je(t.type,v),E);c.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(S){G(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return w=da,da=!1,w}function vr(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&&Ki(t,n,o)}l=l.next}while(l!==r)}}function yo(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 qi(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 Gf(e){var t=e.alternate;t!==null&&(e.alternate=null,Gf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[jr],delete t[Ai],delete t[qh],delete t[Xh])),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 Yf(e){return e.tag===5||e.tag===3||e.tag===4}function pa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yf(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 Xi(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=$l));else if(r!==4&&(e=e.child,e!==null))for(Xi(e,t,n),e=e.sibling;e!==null;)Xi(e,t,n),e=e.sibling}function Ji(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(Ji(e,t,n),e=e.sibling;e!==null;)Ji(e,t,n),e=e.sibling}var ce=null,Ge=!1;function xt(e,t,n){for(n=n.child;n!==null;)Zf(e,t,n),n=n.sibling}function Zf(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(so,n)}catch{}switch(n.tag){case 5:ge||On(n,t);case 6:var r=ce,l=Ge;ce=null,xt(e,t,n),ce=r,Ge=l,ce!==null&&(Ge?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Ge?(e=ce,n=n.stateNode,e.nodeType===8?Wo(e.parentNode,n):e.nodeType===1&&Wo(e,n),Rr(e)):Wo(ce,n.stateNode));break;case 4:r=ce,l=Ge,ce=n.stateNode.containerInfo,Ge=!0,xt(e,t,n),ce=r,Ge=l;break;case 0:case 11:case 14:case 15:if(!ge&&(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||o&4)&&Ki(n,t,i),l=l.next}while(l!==r)}xt(e,t,n);break;case 1:if(!ge&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){G(n,t,s)}xt(e,t,n);break;case 21:xt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,xt(e,t,n),ge=r):xt(e,t,n);break;default:xt(e,t,n)}}function ha(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cm),t.forEach(function(r){var l=Sm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Y()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pm(r/1960))-r,10e?16:e,Ot===null)var r=!1;else{if(e=Ot,Ot=null,eo=0,M&6)throw Error(x(331));var l=M;for(M|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uY()-Ks?Zt(e,0):Qs|=n),Oe(e,t)}function id(e,t){t===0&&(e.mode&1?(t=ll,ll<<=1,!(ll&130023424)&&(ll=4194304)):t=1);var n=Ee();e=vt(e,t),e!==null&&(Hr(e,t,n),Oe(e,n))}function wm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function Sm(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(x(314))}r!==null&&r.delete(t),id(e,n)}var sd;sd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,sm(e,t,n);Re=!!(e.flags&131072)}else Re=!1,K&&t.flags&1048576&&ff(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rl(e,t),e=t.pendingProps;var l=Un(t,we.current);zn(t,n),l=Ms(null,t,r,e,l,n);var o=Bs();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,Ne(r)?(o=!0,Vl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ds(t),l.updater=mo,t.stateNode=l,l._reactInternals=t,Mi(t,r,e,n),t=Hi(null,t,r,!0,o,n)):(t.tag=0,K&&o&&Ps(t),Se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=_m(r),e=Je(r,e),l){case 0:t=$i(null,t,r,e,n);break e;case 1:t=aa(null,t,r,e,n);break e;case 11:t=sa(null,t,r,e,n);break e;case 14:t=ua(null,t,r,Je(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),$i(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),aa(e,t,r,l,n);case 3:e:{if(Wf(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,l=o.element,gf(e,t),Xl(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=Hn(Error(x(423)),t),t=ca(e,t,r,n,l);break e}else if(r!==l){l=Hn(Error(x(424)),t),t=ca(e,t,r,n,l);break e}else for(ze=Dt(t.stateNode.containerInfo.firstChild),Fe=t,K=!0,Ye=null,n=mf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),r===l){t=wt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return vf(t),e===null&&Fi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ji(r,l)?i=null:o!==null&&ji(r,o)&&(t.flags|=32),Vf(e,t),Se(e,t,i,n),t.child;case 6:return e===null&&Fi(t),null;case 13:return Qf(e,t,n);case 4:return zs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),sa(e,t,r,l,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(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,H(Kl,r._currentValue),r._currentValue=i,o!==null)if(et(o.value,i)){if(o.children===l.children&&!Pe.current){t=wt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=mt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ii(o.return,n,t),s.lanes|=n;break}u=u.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(x(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ii(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}Se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,zn(t,n),l=We(l),r=r(l),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),ua(e,t,r,l,n);case 15:return $f(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Rl(e,t),t.tag=1,Ne(r)?(e=!0,Vl(t)):e=!1,zn(t,n),Uf(t,r,l),Mi(t,r,l,n),Hi(null,t,r,!0,e,n);case 19:return Kf(e,t,n);case 22:return Hf(e,t,n)}throw Error(x(156,t.tag))};function ud(e,t){return Dc(e,t)}function Em(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 He(e,t,n,r){return new Em(e,t,n,r)}function Gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _m(e){if(typeof e=="function")return Gs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ms)return 11;if(e===ys)return 14}return 2}function Ut(e,t){var n=e.alternate;return n===null?(n=He(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 Ol(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Gs(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Sn:return bt(n.children,l,o,t);case hs:i=8,l|=8;break;case ai:return e=He(12,n,t,l|2),e.elementType=ai,e.lanes=o,e;case ci:return e=He(13,n,t,l),e.elementType=ci,e.lanes=o,e;case fi:return e=He(19,n,t,l),e.elementType=fi,e.lanes=o,e;case gc:return vo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mc:i=10;break e;case yc:i=9;break e;case ms:i=11;break e;case ys:i=14;break e;case kt:i=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=He(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function bt(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function vo(e,t,n,r){return e=He(22,e,r,t),e.elementType=gc,e.lanes=n,e.stateNode={isHidden:!1},e}function Zo(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function bo(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xm(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=Ao(0),this.expirationTimes=Ao(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ao(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ys(e,t,n,r,l,o,i,s,u){return e=new xm(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=He(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ds(o),e}function km(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dd)}catch(e){console.error(e)}}dd(),fc.exports=Ue;var Om=fc.exports,_a=Om;si.createRoot=_a.createRoot,si.hydrateRoot=_a.hydrateRoot;/**
+ * @remix-run/router v1.23.4
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Ur(){return Ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function pd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jm(){return Math.random().toString(36).substr(2,8)}function ka(e,t){return{usr:e.state,key:e.key,idx:t}}function es(e,t,n,r){return n===void 0&&(n=null),Ur({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xn(t):t,{state:n,key:t&&t.key||r||jm()})}function hd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Xn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Lm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,s=Tt.Pop,u=null,a=f();a==null&&(a=0,i.replaceState(Ur({},i.state,{idx:a}),""));function f(){return(i.state||{idx:null}).idx}function p(){s=Tt.Pop;let E=f(),c=E==null?null:E-a;a=E,u&&u({action:s,location:v.location,delta:c})}function m(E,c){s=Tt.Push;let d=es(v.location,E,c);a=f()+1;let h=ka(d,a),S=v.createHref(d);try{i.pushState(h,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;l.location.assign(S)}o&&u&&u({action:s,location:v.location,delta:1})}function g(E,c){s=Tt.Replace;let d=es(v.location,E,c);a=f();let h=ka(d,a),S=v.createHref(d);i.replaceState(h,"",S),o&&u&&u({action:s,location:v.location,delta:0})}function w(E){let c=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof E=="string"?E:hd(E);return d=d.replace(/ $/,"%20"),te(c,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,c)}let v={get action(){return s},get location(){return e(l,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(xa,p),u=E,()=>{l.removeEventListener(xa,p),u=null}},createHref(E){return t(l,E)},createURL:w,encodeLocation(E){let c=w(E);return{pathname:c.pathname,search:c.search,hash:c.hash}},push:m,replace:g,go(E){return i.go(E)}};return v}var Ca;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ca||(Ca={}));function Am(e,t,n){return n===void 0&&(n="/"),Dm(e,t,n)}function Dm(e,t,n,r){let l=typeof t=="string"?Xn(t):t,o=gd(l.pathname||"/",n);if(o==null)return null;let i=md(e);zm(i);let s=null,u=qm(o);for(let a=0;s==null&&a{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(te(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=en([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(te(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),md(o.children,t,f,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:Hm(a,o.index),routesMeta:f})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))l(o,i);else for(let u of yd(o.path))l(o,i,u)}),t}function yd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=yd(r.join("/")),s=[];return s.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&s.push(...i),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function zm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Vm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Fm=/^:[\w-]+$/,Im=3,Um=2,Mm=1,Bm=10,$m=-2,Ra=e=>e==="*";function Hm(e,t){let n=e.split("/"),r=n.length;return n.some(Ra)&&(r+=$m),t&&(r+=Um),n.filter(l=>!Ra(l)).reduce((l,o)=>l+(Fm.test(o)?Im:o===""?Mm:Bm),r)}function Vm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Wm(e,t,n){let{routesMeta:r}=e,l={},o="/",i=[];for(let s=0;s{let{paramName:m,isOptional:g}=f;if(m==="*"){let v=s[p]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const w=s[p];return g&&!w?a[m]=void 0:a[m]=(w||"").replace(/%2F/g,"/"),a},{}),pathname:o,pathnameBase:i,pattern:e}}function Km(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),pd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function qm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Xm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Xn(e):e,o;return n?(n=Sd(n),n.startsWith("/")?o=Pa(n.substring(1),"/"):o=Pa(n,t)):o=t,{pathname:o,search:Ym(r),hash:Zm(l)}}function Pa(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function ei(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Jm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vd(e,t){let n=Jm(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wd(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Xn(e):(l=Ur({},e),te(!l.pathname||!l.pathname.includes("?"),ei("?","pathname","search",l)),te(!l.pathname||!l.pathname.includes("#"),ei("#","pathname","hash",l)),te(!l.search||!l.search.includes("#"),ei("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,s;if(i==null)s=n;else{let p=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),p-=1;l.pathname=m.join("/")}s=p>=0?t[p]:"/"}let u=Xm(l,s),a=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||f)&&(u.pathname+="/"),u}const Sd=e=>e.replace(/\/\/+/g,"/"),en=e=>Sd(e.join("/")),Gm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ym=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function bm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ed=["post","put","patch","delete"];new Set(Ed);const ey=["get",...Ed];new Set(ey);/**
+ * React Router v6.30.6
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),R.useCallback(function(a,f){if(f===void 0&&(f={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let p=wd(a,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:en([t,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[t,r,i,o,e])}function ly(e,t){return oy(e,t)}function oy(e,t,n,r){qr()||te(!1);let{navigator:l}=R.useContext(Kr),{matches:o}=R.useContext(pn),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let a=nu(),f;if(t){var p;let E=typeof t=="string"?Xn(t):t;u==="/"||(p=E.pathname)!=null&&p.startsWith(u)||te(!1),f=E}else f=a;let m=f.pathname||"/",g=m;if(u!=="/"){let E=u.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Am(e,{pathname:g}),v=cy(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:en([u,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:en([u,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&v?R.createElement(xo.Provider,{value:{location:Mr({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Tt.Pop}},v):v}function iy(){let e=hy(),t=bm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:l},n):null,null)}const sy=R.createElement(iy,null);class uy extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?R.createElement(pn.Provider,{value:this.props.routeContext},R.createElement(_d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ay(e){let{routeContext:t,match:n,children:r}=e,l=R.useContext(tu);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(pn.Provider,{value:t},r)}function cy(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=(l=n)==null?void 0:l.errors;if(s!=null){let f=i.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);f>=0||te(!1),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((f,p,m)=>{let g,w=!1,v=null,E=null;n&&(g=s&&p.route.id?s[p.route.id]:void 0,v=p.route.errorElement||sy,u&&(a<0&&m===0?(yy("route-fallback"),w=!0,E=null):a===m&&(w=!0,E=p.route.hydrateFallbackElement||null)));let c=t.concat(i.slice(0,m+1)),d=()=>{let h;return g?h=v:w?h=E:p.route.Component?h=R.createElement(p.route.Component,null):p.route.element?h=p.route.element:h=f,R.createElement(ay,{match:p,routeContext:{outlet:f,matches:c,isDataRoute:n!=null},children:h})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?R.createElement(uy,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}var kd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(kd||{}),Cd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cd||{});function fy(e){let t=R.useContext(tu);return t||te(!1),t}function dy(e){let t=R.useContext(ty);return t||te(!1),t}function py(e){let t=R.useContext(pn);return t||te(!1),t}function Rd(e){let t=py(),n=t.matches[t.matches.length-1];return n.route.id||te(!1),n.route.id}function hy(){var e;let t=R.useContext(_d),n=dy(),r=Rd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function my(){let{router:e}=fy(kd.UseNavigateStable),t=Rd(Cd.UseNavigateStable),n=R.useRef(!1);return xd(()=>{n.current=!0}),R.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Mr({fromRouteId:t},o)))},[e,t])}const Na={};function yy(e,t,n){Na[e]||(Na[e]=!0)}function gy(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Oa(e){let{to:t,replace:n,state:r,relative:l}=e;qr()||te(!1);let{future:o,static:i}=R.useContext(Kr),{matches:s}=R.useContext(pn),{pathname:u}=nu(),a=ny(),f=wd(t,vd(s,o.v7_relativeSplatPath),u,l==="path"),p=JSON.stringify(f);return R.useEffect(()=>a(JSON.parse(p),{replace:n,state:r,relative:l}),[a,p,l,n,r]),null}function ts(e){te(!1)}function vy(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Tt.Pop,navigator:o,static:i=!1,future:s}=e;qr()&&te(!1);let u=t.replace(/^\/*/,"/"),a=R.useMemo(()=>({basename:u,navigator:o,static:i,future:Mr({v7_relativeSplatPath:!1},s)}),[u,s,o,i]);typeof r=="string"&&(r=Xn(r));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:w="default"}=r,v=R.useMemo(()=>{let E=gd(f,u);return E==null?null:{location:{pathname:E,search:p,hash:m,state:g,key:w},navigationType:l}},[u,f,p,m,g,w,l]);return v==null?null:R.createElement(Kr.Provider,{value:a},R.createElement(xo.Provider,{children:n,value:v}))}function wy(e){let{children:t,location:n}=e;return ly(ns(t),n)}new Promise(()=>{});function ns(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,l)=>{if(!R.isValidElement(r))return;let o=[...t,l];if(r.type===R.Fragment){n.push.apply(n,ns(r.props.children,o));return}r.type!==ts&&te(!1),!r.props.index||!r.props.children||te(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=ns(r.props.children,o)),n.push(i)}),n}/**
+ * React Router DOM v6.30.6
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */const Sy="6";try{window.__reactRouterVersion=Sy}catch{}const Ey="startTransition",Ta=vp[Ey];function _y(e){let{basename:t,children:n,future:r,window:l}=e,o=R.useRef();o.current==null&&(o.current=Tm({window:l,v5Compat:!0}));let i=o.current,[s,u]=R.useState({action:i.action,location:i.location}),{v7_startTransition:a}=r||{},f=R.useCallback(p=>{a&&Ta?Ta(()=>u(p)):u(p)},[u,a]);return R.useLayoutEffect(()=>i.listen(f),[i,f]),R.useEffect(()=>gy(r),[r]),R.createElement(vy,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}var ja;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ja||(ja={}));var La;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(La||(La={}));function Pd(e,t){return function(){return e.apply(t,arguments)}}const{toString:xy}=Object.prototype,{getPrototypeOf:Wn}=Object,{iterator:Xr,toStringTag:Nd}=Symbol,ro=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Br=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),ro(n,t))return!0;n=Wn(n)}return!1},ky=(e,t)=>e!=null&&Br(e,t)?e[t]:void 0,ru=(e=>t=>{const n=xy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=e=>(e=e.toLowerCase(),t=>ru(t)===e),ko=e=>t=>typeof t===e,{isArray:un}=Array,an=ko("undefined");function Jn(e){return e!==null&&!an(e)&&e.constructor!==null&&!an(e.constructor)&&Te(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Od=Ke("ArrayBuffer");function Cy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Od(e.buffer),t}const Ry=ko("string"),Te=ko("function"),Td=ko("number"),Gn=e=>e!==null&&typeof e=="object",Py=e=>e===!0||e===!1,Tl=e=>{if(!Gn(e))return!1;const t=Wn(e);return(t===null||t===Object.prototype||Wn(t)===null)&&!Br(e,Nd)&&!Br(e,Xr)},Ny=e=>{if(!Gn(e)||Jn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Oy=Ke("Date"),Ty=Ke("File"),jy=e=>!!(e&&typeof e.uri<"u"),Ly=e=>e&&typeof e.getParts<"u",Ay=Ke("Blob"),Dy=Ke("FileList"),zy=Ke("Set"),Fy=e=>Gn(e)&&Te(e.pipe);function Iy(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Aa=Iy(),Da=typeof Aa.FormData<"u"?Aa.FormData:void 0,Uy=e=>{if(!e)return!1;if(Da&&e instanceof Da)return!0;const t=Wn(e);if(!t||t===Object.prototype||!Te(e.append))return!1;const n=ru(e);return n==="formdata"||n==="object"&&Te(e.toString)&&e.toString()==="[object FormData]"},My=Ke("URLSearchParams"),[By,$y,Hy,Vy]=["ReadableStream","Request","Response","Headers"].map(Ke),Wy=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),un(e))for(r=0,l=e.length;r0;)if(l=n[r],t===l.toLowerCase())return l;return null}const Yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ld=e=>!an(e)&&e!==Yt;function rs(...e){const{caseless:t,skipUndefined:n}=Ld(this)&&this||{},r={},l=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=t&&typeof i=="string"&&jd(r,i)||i,u=ro(r,s)?r[s]:void 0;Tl(u)&&Tl(o)?r[s]=rs(u,o):Tl(o)?r[s]=rs({},o):un(o)?r[s]=o.slice():(!n||!an(o))&&(r[s]=o)};for(let o=0,i=e.length;o(Jr(t,(l,o)=>{n&&Te(l)?Object.defineProperty(e,o,{__proto__:null,value:Pd(l,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ky=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qy=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Xy=(e,t,n,r)=>{let l,o,i;const s={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),o=l.length;o-- >0;)i=l[o],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&Wn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jy=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Gy=e=>{if(!e)return null;if(un(e))return e;let t=e.length;if(!Td(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yy=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wn(Uint8Array)),Zy=(e,t)=>{const r=(e&&e[Xr]).call(e);let l;for(;(l=r.next())&&!l.done;){const o=l.value;t.call(e,o[0],o[1])}},by=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},eg=Ke("HTMLFormElement"),tg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,l){return r.toUpperCase()+l}),{propertyIsEnumerable:ng}=Object.prototype,rg=Ke("RegExp"),Ad=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jr(n,(l,o)=>{let i;(i=t(l,o,e))!==!1&&(r[o]=i||l)}),Object.defineProperties(e,r)},lg=e=>{Ad(e,(t,n)=>{if(Te(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Te(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},og=(e,t)=>{const n={},r=l=>{l.forEach(o=>{n[o]=!0})};return un(e)?r(e):r(String(e).split(t)),n},ig=()=>{},sg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ug(e){return!!(e&&Te(e.append)&&e[Nd]==="FormData"&&e[Xr])}const ag=e=>{const t=new WeakSet,n=r=>{if(Gn(r)){if(t.has(r))return;if(Jn(r))return r;if(!("toJSON"in r)){t.add(r);let l;if(zy(r)){l=[];for(const o of r){const i=n(o);!an(i)&&l.push(i)}}else l=un(r)?[]:{},Jr(r,(o,i)=>{const s=n(o);!an(s)&&(l[i]=s)});return t.delete(r),l}}return r};return n(e)},cg=Ke("AsyncFunction"),fg=e=>e&&(Gn(e)||Te(e))&&Te(e.then)&&Te(e.catch),Dd=((e,t)=>e?setImmediate:t?((n,r)=>(Yt.addEventListener("message",({source:l,data:o})=>{l===Yt&&o===n&&r.length&&r.shift()()},!1),l=>{r.push(l),Yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Te(Yt.postMessage)),dg=typeof queueMicrotask<"u"?queueMicrotask.bind(Yt):typeof process<"u"&&process.nextTick||Dd,zd=e=>e!=null&&Te(e[Xr]),pg=e=>e!=null&&Br(e,Xr)&&zd(e),y={isArray:un,isArrayBuffer:Od,isBuffer:Jn,isFormData:Uy,isArrayBufferView:Cy,isString:Ry,isNumber:Td,isBoolean:Py,isObject:Gn,isPlainObject:Tl,isEmptyObject:Ny,isReadableStream:By,isRequest:$y,isResponse:Hy,isHeaders:Vy,isUndefined:an,isDate:Oy,isFile:Ty,isReactNativeBlob:jy,isReactNative:Ly,isBlob:Ay,isRegExp:rg,isFunction:Te,isStream:Fy,isURLSearchParams:My,isTypedArray:Yy,isFileList:Dy,forEach:Jr,merge:rs,extend:Qy,trim:Wy,stripBOM:Ky,inherits:qy,toFlatObject:Xy,kindOf:ru,kindOfTest:Ke,endsWith:Jy,toArray:Gy,forEachEntry:Zy,matchAll:by,isHTMLForm:eg,hasOwnProperty:ro,hasOwnProp:ro,hasOwnInPrototypeChain:Br,getSafeProp:ky,reduceDescriptors:Ad,freezeMethods:lg,toObjectSet:og,toCamelCase:tg,noop:ig,toFiniteNumber:sg,findKey:jd,global:Yt,isContextDefined:Ld,isSpecCompliantForm:ug,toJSONObject:ag,isAsyncFn:cg,isThenable:fg,setImmediate:Dd,asap:dg,isIterable:zd,isSafeIterable:pg},hg=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mg=e=>{const t={};let n,r,l;return e&&e.split(`
+`).forEach(function(i){l=i.indexOf(":"),n=i.substring(0,l).trim().toLowerCase(),r=i.substring(l+1).trim();const s=y.hasOwnProp(t,n);!n||s&&y.hasOwnProp(hg,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function yg(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const gg=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),vg=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function lu(e,t){return y.isArray(e)?e.map(n=>lu(n,t)):yg(String(e).replace(t,""))}const wg=e=>lu(e,gg),Sg=e=>lu(e,vg);function Fd(e){const t=Object.create(null);return y.forEach(e.toJSON(),(n,r)=>{t[r]=Sg(n)}),t}const za=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function jl(e){return e===!1||e==null?e:y.isArray(e)?e.map(jl):wg(String(e))}function Eg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _g=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ti(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function xg(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function kg(e){const t=Object.create(null),n=String(e);let r=0,l=!1,o=!1;function i(s){const u=ti(n.slice(r,s)),a=u.indexOf("=");if(a<1)return;const f=ti(u.slice(0,a));if(!_g.test(f))return;const p=f.toLowerCase();if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=ti(u.slice(a+1));t[p]=xg(m)}for(let s=0;s/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ni(e,t,n,r,l){if(y.isFunction(r))return r.call(this,t,n);if(l&&(t=n),!!y.isString(t)){if(y.isString(r))return t.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(t)}}function Rg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Pg(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(l,o,i){return this[r].call(this,t,l,o,i)},configurable:!0})})}let ve=class{constructor(t){t&&this.set(t)}set(t,n,r){const l=this;function o(s,u,a){const f=ir(u);if(!f)return;const p=y.findKey(l,f);(!p||l[p]===void 0||a===!0||a===void 0&&l[p]!==!1)&&(l[p||u]=jl(s))}const i=(s,u)=>y.forEach(s,(a,f)=>o(a,f,u));if(y.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(y.isString(t)&&(t=t.trim())&&!Cg(t))i(mg(t),n);else if(y.isObject(t)&&y.isSafeIterable(t)){let s=Object.create(null),u,a;for(const f of t){if(!y.isArray(f))throw new TypeError("Object iterator must return a key-value pair");a=f[0],y.hasOwnProp(s,a)?(u=s[a],s[a]=y.isArray(u)?[...u,f[1]]:[u,f[1]]):s[a]=f[1]}i(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ir(t),t){const r=y.findKey(this,t);if(r){const l=this[r];if(!n)return l;if(n===!0)return Eg(l);if(y.isFunction(n))return n.call(this,l,r);if(y.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const r=y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ni(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let l=!1;function o(i){if(i=ir(i),i){const s=y.findKey(r,i);s&&(!n||ni(r,r[s],s,n))&&(delete r[s],l=!0)}}return y.isArray(t)?t.forEach(o):o(t),l}clear(t){const n=Object.keys(this);let r=n.length,l=!1;for(;r--;){const o=n[r];(!t||ni(this,this[o],o,t,!0))&&(delete this[o],l=!0)}return l}normalize(t){const n=this,r={};return y.forEach(this,(l,o)=>{const i=y.findKey(r,o);if(i){n[i]=jl(l),delete n[o];return}const s=t?Rg(o):String(o).trim();s!==o&&delete n[o],n[s]=jl(l),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=t&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
+`)}getSetCookie(){const t=this.get("set-cookie");return y.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return kg(t)}static concat(t,...n){const r=new this(t);return n.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[za]=this[za]={accessors:{}}).accessors,l=this.prototype;function o(i){const s=ir(i);r[s]||(Pg(l,i),r[s]=!0)}return y.isArray(t)?t.forEach(o):o(t),this}};ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(ve.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});y.freezeMethods(ve);const lo="[REDACTED ****]";function Ng(e){if(y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Og(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],l=o=>{if(o===null||typeof o!="object"||y.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof ve&&(o=o.toJSON()),r.push(o);let i;if(y.isArray(o))i=[],o.forEach((s,u)=>{const a=l(s);y.isUndefined(a)||(i[u]=a)});else{if(!y.isPlainObject(o)&&Ng(o))return r.pop(),o;i=Object.create(null);for(const[s,u]of Object.entries(o)){const a=n.has(s.toLowerCase())?lo:l(u);y.isUndefined(a)||(i[s]=a)}}return r.pop(),i};return l(e)}function Fa(e){try{return String(e)}catch{return""}}function Tg(e){return e.errors.map(n=>{try{return n&&n.message?Fa(n.message):Fa(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let P=class Id extends Error{static from(t,n,r,l,o,i){let s=t.message;!s&&y.isArray(t.errors)&&t.errors.length&&(s=Tg(t));const u=new Id(s,n||t.code,r,l,o);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),i&&Object.assign(u,i),u}constructor(t,n,r,l,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),l&&(this.request=l),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&y.hasOwnProp(t,"redact")?t.redact:void 0,r=y.isArray(n)&&n.length>0?Og(t,n):y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};P.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";P.ERR_BAD_OPTION="ERR_BAD_OPTION";P.ECONNABORTED="ECONNABORTED";P.ETIMEDOUT="ETIMEDOUT";P.ECONNREFUSED="ECONNREFUSED";P.ERR_NETWORK="ERR_NETWORK";P.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";P.ERR_DEPRECATED="ERR_DEPRECATED";P.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";P.ERR_BAD_REQUEST="ERR_BAD_REQUEST";P.ERR_CANCELED="ERR_CANCELED";P.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";P.ERR_INVALID_URL="ERR_INVALID_URL";P.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jg=null,Ud=100;function ls(e){return y.isPlainObject(e)||y.isArray(e)}function Md(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function ri(e,t,n){return e?e.concat(t).map(function(l,o){return l=Md(l),!n&&o?"["+l+"]":l}).join(n?".":""):t}function Lg(e){return y.isArray(e)&&!e.some(ls)}const Ag=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function Co(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,h){return!y.isUndefined(h[d])});const r=n.metaTokens,l=n.visitor||w,o=n.dots,i=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?Ud:n.maxDepth,a=s&&y.isSpecCompliantForm(t),f=[];if(!y.isFunction(l))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(y.isDate(c))return c.toISOString();if(y.isBoolean(c))return c.toString();if(!a&&y.isBlob(c))throw new P("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(c)||y.isTypedArray(c)){if(a&&typeof s=="function")return new s([c]);throw new P("Blob is not supported. Use a Buffer instead.",P.ERR_NOT_SUPPORT)}return c}function m(c){if(c>u)throw new P("Object is too deeply nested ("+c+" levels). Max depth: "+u,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(c,d){if(u===1/0)return JSON.stringify(c);const h=[];return JSON.stringify(c,function(k,C){if(!y.isObject(C))return C;for(;h.length&&h[h.length-1]!==this;)h.pop();return h.push(C),m(d+h.length-1),C})}function w(c,d,h){let S=c;if(y.isReactNative(t)&&y.isReactNativeBlob(c))return t.append(ri(h,d,o),p(c)),!1;if(c&&!h&&typeof c=="object"){if(y.endsWith(d,"{}"))d=r?d:d.slice(0,-2),c=g(c,1);else if(y.isArray(c)&&Lg(c)||(y.isFileList(c)||y.endsWith(d,"[]"))&&(S=y.toArray(c)))return d=Md(d),S.forEach(function(C,N){!(y.isUndefined(C)||C===null)&&t.append(i===!0?ri([d],N,o):i===null?d:d+"[]",p(C))}),!1}return ls(c)?!0:(t.append(ri(h,d,o),p(c)),!1)}const v=Object.assign(Ag,{defaultVisitor:w,convertValue:p,isVisitable:ls});function E(c,d,h=0){if(!y.isUndefined(c)){if(m(h),f.indexOf(c)!==-1)throw new Error("Circular reference detected in "+d.join("."));f.push(c),y.forEach(c,function(k,C){(!(y.isUndefined(k)||k===null)&&l.call(t,k,y.isString(C)?C.trim():C,d,v))===!0&&E(k,d?d.concat(C):[C],h+1)}),f.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Ia(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ou(e,t){this._pairs=[],e&&Co(e,this,t)}const Bd=ou.prototype;Bd.append=function(t,n){this._pairs.push([t,n])};Bd.toString=function(t){const n=t?r=>t.call(this,r,Ia):Ia;return this._pairs.map(function(l){return n(l[0])+"="+n(l[1])},"").join("&")};function Dg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $d(e,t,n){if(!t)return e;e=e||"";const r=y.isFunction(n)?{serialize:n}:n,l=y.getSafeProp(r,"encode")||Dg,o=y.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=y.isURLSearchParams(t)?t.toString():new ou(t,r).toString(l),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ua{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const iu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},zg=typeof URLSearchParams<"u"?URLSearchParams:ou,Fg=typeof FormData<"u"?FormData:null,Ig=typeof Blob<"u"?Blob:null,Ug={isBrowser:!0,classes:{URLSearchParams:zg,FormData:Fg,Blob:Ig},protocols:["http","https","file","blob","url","data"]},su=typeof window<"u"&&typeof document<"u",os=typeof navigator=="object"&&navigator||void 0,Mg=su&&(!os||["ReactNative","NativeScript","NS"].indexOf(os.product)<0),Bg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$g=su&&window.location.href||"http://localhost",Hg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:su,hasStandardBrowserEnv:Mg,hasStandardBrowserWebWorkerEnv:Bg,navigator:os,origin:$g},Symbol.toStringTag,{value:"Module"})),fe={...Hg,...Ug};function Vg(e,t){return Co(e,new fe.classes.URLSearchParams,{visitor:function(n,r,l,o){return fe.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Ma=Ud;function Hd(e){if(e>Ma)throw new P("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ma,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wg(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Hd(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Qg(e){const t={},n=Object.keys(e);let r;const l=n.length;let o;for(r=0;r=n.length;return i=!i&&y.isArray(l)?l.length:i,u?(y.hasOwnProp(l,i)?l[i]=y.isArray(l[i])?l[i].concat(r):[l[i],r]:l[i]=r,!s):((!y.hasOwnProp(l,i)||!y.isObject(l[i]))&&(l[i]=[]),t(n,r,l[i],o)&&y.isArray(l[i])&&(l[i]=Qg(l[i])),!s)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,l)=>{t(Wg(r),l,n,0)}),n}return null}const gn=(e,t)=>e!=null&&y.hasOwnProp(e,t)?e[t]:void 0;function Kg(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gr={transitional:iu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",l=r.indexOf("application/json")>-1,o=y.isObject(t);if(o&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return l?JSON.stringify(Vd(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const u=gn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vg(t,u).toString();if((s=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=gn(this,"env"),f=a&&a.FormData;return Co(s?{"files[]":t}:t,f&&new f,u)}}return o||l?(n.setContentType("application/json",!1),Kg(t)):t}],transformResponse:[function(t){const n=gn(this,"transitional")||Gr.transitional,r=n&&n.forcedJSONParsing,l=gn(this,"responseType"),o=l==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!l||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,gn(this,"parseReviver"))}catch(u){if(s)throw u.name==="SyntaxError"?P.from(u,P.ERR_BAD_RESPONSE,this,null,gn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],e=>{Gr.headers[e]={}});function li(e,t){const n=this||Gr,r=t||n,l=ve.from(r.headers);let o=r.data;return y.forEach(e,function(s){o=s.call(n,o,l.normalize(),t?t.status:void 0)}),l.normalize(),o}function Wd(e){return!!(e&&e.__CANCEL__)}let Yr=class extends P{constructor(t,n,r){super(t??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Qd(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new P("Request failed with status code "+n.status,n.status>=400&&n.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,n.config,n.request,n))}function qg(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Xg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let l=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),f=r[o];i||(i=a),n[l]=u,r[l]=a;let p=o,m=0;for(;p!==l;)m+=n[p++],p=p%e;if(l=(l+1)%e,l===o&&(o=(o+1)%e),a-i{n=f,l=null,o&&(clearTimeout(o),o=null),e(...a)};return[(...a)=>{const f=Date.now(),p=f-n;p>=r?i(a,f):(l=a,o||(o=setTimeout(()=>{o=null,i(l)},r-p)))},()=>l&&i(l)]}const oo=(e,t,n=3)=>{let r=0;const l=Xg(50,250);return Jg(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=Math.max(0,s!=null?Math.min(i,s):i),a=Math.max(0,u-r),f=l(a);r=Math.max(r,u);const p={loaded:u,total:s,progress:s?u/s:void 0,bytes:a,rate:f||void 0,estimated:f&&s?(s-u)/f:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(p)},n)},Ba=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$a=(e,t=y.asap)=>(...n)=>t(()=>e(...n)),Gg=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Yg=fe.hasStandardBrowserEnv?{write(e,t,n,r,l,o,i){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];y.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),y.isString(r)&&s.push(`path=${r}`),y.isString(l)&&s.push(`domain=${l}`),o===!0&&s.push("secure"),y.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const ev=/^https?:(?!\/\/)/i,tv=/[\t\n\r]/g;function nv(e){let t=0;for(;t`${n}${r}${lo}`)}function ov(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${lo}@`),n=t.indexOf("#"),l=(n===-1?t:t.slice(0,n)).replace(/([?&][^=]*=)[^]*/g,`$1${lo}`);return n===-1?l:`${l}#${lv(t.slice(n+1))}`}function Ha(e,t){if(typeof e=="string"){const n=rv(e);if(ev.test(n))throw new P(`Invalid URL ${JSON.stringify(ov(n))}: missing "//" after protocol`,P.ERR_INVALID_URL,t)}}function Kd(e,t,n,r){Ha(t,r);let l=!Zg(t);return e&&(l||n===!1)?(Ha(e,r),bg(e,t)):t}const Va=e=>e instanceof ve?{...e}:e,iv=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function cn(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,m,g){return y.isPlainObject(f)&&y.isPlainObject(p)?y.merge.call({caseless:g},f,p):y.isPlainObject(p)?y.merge({},p):y.isArray(p)?p.slice():p}function l(f,p,m,g){if(y.isUndefined(p)){if(!y.isUndefined(f))return r(void 0,f,m,g)}else return r(f,p,m,g)}function o(f,p){if(!y.isUndefined(p))return r(void 0,p)}function i(f,p){if(y.isUndefined(p)){if(!y.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function s(f){const p=y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!y.isUndefined(p))if(y.isPlainObject(p)){if(y.hasOwnProp(p,f))return p[f]}else return;const m=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(y.isPlainObject(m)&&y.hasOwnProp(m,f))return m[f]}function u(f,p,m){if(y.hasOwnProp(t,m))return r(f,p);if(y.hasOwnProp(e,m))return r(void 0,f)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:u,headers:(f,p,m)=>l(Va(f),Va(p),m,!0)};return y.forEach(iv({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=y.hasOwnProp(a,p)?a[p]:l,g=y.hasOwnProp(e,p)?e[p]:void 0,w=y.hasOwnProp(t,p)?t[p]:void 0,v=m(g,w,p);y.isUndefined(v)&&m!==u||(n[p]=v)}),y.hasOwnProp(t,"validateStatus")&&y.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const sv=["content-type","content-length"];function uv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,l])=>{sv.includes(r.toLowerCase())&&e.set(r,l)})}const av=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function qd(e){const t=cn({},e),n=m=>y.hasOwnProp(t,m)?t[m]:void 0,r=n("data");let l=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let s=n("headers");const u=n("auth"),a=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=s=ve.from(s),t.url=$d(Kd(a,p,f,t),n("params"),n("paramsSerializer")),u){const m=y.getSafeProp(u,"username")||"",g=y.getSafeProp(u,"password")||"";try{s.set("Authorization","Basic "+btoa(m+":"+(g?av(g):"")))}catch(w){throw P.from(w,P.ERR_BAD_OPTION_VALUE,e)}}if(y.isFormData(r)&&(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv||y.isReactNative(r)?s.setContentType(void 0):y.isFunction(r.getHeaders)&&uv(s,r.getHeaders(),n("formDataHeaderPolicy"))),fe.hasStandardBrowserEnv&&(y.isFunction(l)&&(l=l(t)),l===!0||l==null&&Gg(t.url))){const g=o&&i&&Yg.read(i);g&&s.set(o,g)}return t}const cv=typeof XMLHttpRequest<"u",fv=cv&&function(e){return new Promise(function(n,r){const l=qd(e);let o=l.data;const i=ve.from(l.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:a}=l,f,p,m,g,w;function v(){g&&g(),w&&w(),l.cancelToken&&l.cancelToken.unsubscribe(f),l.signal&&l.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function c(){if(!E)return;const h=ve.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:h,config:e,request:E};Qd(function(N){n(N),v()},function(N){r(N),v()},k),E=null}"onloadend"in E?E.onloadend=c:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(c)},E.onabort=function(){E&&(r(new P("Request aborted",P.ECONNABORTED,e,E)),v(),E=null)},E.onerror=function(S){const k=S&&S.message?S.message:"Network Error",C=new P(k,P.ERR_NETWORK,e,E);C.event=S||null,r(C),v(),E=null},E.ontimeout=function(){let S=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const k=l.transitional||iu;l.timeoutErrorMessage&&(S=l.timeoutErrorMessage),r(new P(S,k.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,E)),v(),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&y.forEach(Fd(i),function(S,k){E.setRequestHeader(k,S)}),y.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),s&&s!=="json"&&(E.responseType=l.responseType),a&&([m,w]=oo(a,!0),E.addEventListener("progress",m)),u&&E.upload&&([p,g]=oo(u),E.upload.addEventListener("progress",p),E.upload.addEventListener("loadend",g)),(l.cancelToken||l.signal)&&(f=h=>{E&&(r(!h||h.type?new Yr(null,e,E):h),E.abort(),v(),E=null)},l.cancelToken&&l.cancelToken.subscribe(f),l.signal&&(l.signal.aborted?f():l.signal.addEventListener("abort",f)));const d=qg(l.url);if(d&&!fe.protocols.includes(d)){r(new P("Unsupported protocol "+d+":",P.ERR_BAD_REQUEST,e)),v();return}E.send(o||null)})},dv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const l=function(u){if(!r){r=!0,i();const a=u instanceof Error?u:this.reason;n.abort(a instanceof P?a:new Yr(a instanceof Error?a.message:a))}};let o=t&&setTimeout(()=>{o=null,l(new P(`timeout of ${t}ms exceeded`,P.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(l):u.removeEventListener("abort",l)}),e=null)};e.forEach(u=>{if(!r){if(u.aborted){l.call(u);return}u.addEventListener("abort",l,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>y.asap(i),s},pv=function*(e,t){let n=e.byteLength;if(n{const l=hv(e,t);let o=0,i,s=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:f}=await l.next();if(a){s(),u.close();return}let p=f.byteLength;if(n){let m=o+=p;n(m)}u.enqueue(new Uint8Array(f))}catch(a){throw s(a),a}},cancel(u){return s(u),l.return()}},{highWaterMark:2})},Qa=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Xd=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,yv=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,gv=e=>e===9||e===10||e===12||e===13||e===32,vv=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},wv=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Sv=e=>{const t=e.length;let n=0,r=0,l=!1;for(let o=0;o0){l=!0;continue}n++}}return l||r>2||r>0&&(n+r)%4!==0||n%4===1?wv(e):vv(n)},Ev=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),l=e.slice(n+1);if(/;base64/i.test(r))return t(l);let i=0;for(let s=0,u=l.length;s=55296&&a<=56319&&s+1=56320&&f<=57343?(i+=4,s++):i+=3}else i+=3}return i};function _v(e){const t=typeof e=="string"?e.indexOf("#"):-1;return Ev(t===-1?e:e.slice(0,t),Sv)}const uu="1.19.0",qa=64*1024,{isFunction:yl}=y,xv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Xa=e=>{if(!y.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Ja=(e,...t)=>{try{return!!e(...t)}catch{return!1}},kv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Cv=e=>{const t=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:l,Request:o,Response:i}=e,s=l?yl(l):typeof fetch=="function",u=yl(o),a=yl(i);if(!s)return!1;const f=s&&yl(n),p=s&&(typeof r=="function"?(c=>d=>c.encode(d))(new r):async c=>new Uint8Array(await new o(c).arrayBuffer())),m=u&&f&&Ja(()=>{let c=!1;const d=new o(fe.origin,{body:new n,method:"POST",get duplex(){return c=!0,"half"}}),h=d.headers.has("Content-Type");return d.body!=null&&d.body.cancel(),c&&!h}),g=a&&f&&Ja(()=>y.isReadableStream(new i("").body)),w={stream:g&&(c=>c.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(c=>{!w[c]&&(w[c]=(d,h)=>{let S=d&&d[c];if(S)return S.call(d);throw new P(`Response type '${c}' is not supported`,P.ERR_NOT_SUPPORT,h)})});const v=async c=>{if(c==null)return 0;if(y.isBlob(c))return c.size;if(y.isSpecCompliantForm(c))return(await new o(fe.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(y.isArrayBufferView(c)||y.isArrayBuffer(c))return c.byteLength;if(y.isURLSearchParams(c)&&(c=c+""),y.isString(c))return(await p(c)).byteLength},E=async(c,d)=>{const h=y.toFiniteNumber(c.getContentLength());return h??v(d)};return async c=>{let{url:d,method:h,data:S,signal:k,cancelToken:C,timeout:N,onDownloadProgress:j,onUploadProgress:V,responseType:A,headers:b,withCredentials:tt="same-origin",fetchOptions:Et,maxContentLength:je,maxBodyLength:hn}=qd(c);const ut=y.isNumber(je)&&je>-1,Wt=y.isNumber(hn)&&hn>-1,O=U=>y.hasOwnProp(c,U)?c[U]:void 0;let D=l||fetch;A=A?(A+"").toLowerCase():"text";let L=dv([k,C&&C.toAbortSignal()],N),F=null;const $=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let qe,Le=null;const mn=()=>new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,c,F);try{let U;const ue=O("auth");if(ue){const z=y.getSafeProp(ue,"username")||"",Ae=y.getSafeProp(ue,"password")||"";U={username:z,password:Ae}}if(kv(d)){const z=new URL(d,fe.origin);if(!U&&(z.username||z.password)){const Ae=Xa(z.username),_t=Xa(z.password);U={username:Ae,password:_t}}(z.username||z.password)&&(z.username="",z.password="",d=z.href)}if(U&&(b.delete("authorization"),b.set("Authorization","Basic "+btoa(xv((U.username||"")+":"+(U.password||""))))),ut&&typeof d=="string"&&d.startsWith("data:")&&_v(d)>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F);if(Wt&&h!=="get"&&h!=="head"){const z=await v(S);if(typeof z=="number"&&isFinite(z)&&(qe=z,z>hn))throw mn()}const Zr=Wt&&(y.isReadableStream(S)||y.isStream(S)),cu=(z,Ae,_t)=>Wa(z,qa,Qt=>{if(Wt&&Qt>hn)throw Le=mn();Ae&&Ae(Qt)},_t);if(m&&h!=="get"&&h!=="head"&&(V||Zr)){if(qe=qe??await E(b,S),qe!==0||Zr){let z=new o(d,{method:"POST",body:S,duplex:"half"}),Ae;if(y.isFormData(S)&&(Ae=z.headers.get("content-type"))&&b.setContentType(Ae),z.body){const[_t,Qt]=V&&Ba(qe,oo($a(V)))||[];S=cu(z.body,_t,Qt)}}}else if(Zr&&!u&&f&&h!=="get"&&h!=="head")S=cu(S);else if(Zr&&u&&!m&&h!=="get"&&h!=="head")throw new P("Stream request bodies are not supported by the current fetch implementation",P.ERR_NOT_SUPPORT,c,F);y.isString(tt)||(tt=tt?"include":"omit");const bd=u&&"credentials"in o.prototype;if(y.isFormData(S)){const z=b.getContentType();z&&/^multipart\/form-data/i.test(z)&&!/boundary=/i.test(z)&&b.delete("content-type")}b.set("User-Agent","axios/"+uu,!1);const fu={...Et,signal:L,method:h.toUpperCase(),headers:Fd(b.normalize()),body:S,duplex:"half",credentials:bd?tt:void 0};F=u&&new o(d,fu);let at=await(u?D(F,Et):D(d,fu));const du=ve.from(at.headers);if(ut){const z=y.toFiniteNumber(du.getContentLength());if(z!=null&&z>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F)}const Po=g&&(A==="stream"||A==="response");if(g&&at.body&&(j||ut||Po&&$)){const z={};["status","statusText","headers"].forEach(Yn=>{z[Yn]=at[Yn]});const Ae=y.toFiniteNumber(du.getContentLength()),[_t,Qt]=j&&Ba(Ae,oo($a(j),!0))||[];let pu=0;const ep=Yn=>{if(ut&&(pu=Yn,pu>je))throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F);_t&&_t(Yn)};at=new i(Wa(at.body,qa,ep,()=>{Qt&&Qt(),$&&$()}),z)}A=A||"text";let ct=await w[y.findKey(w,A)||"text"](at,c);if(ut&&!g&&!Po){let z;if(ct!=null&&(typeof ct.byteLength=="number"?z=ct.byteLength:typeof ct.size=="number"?z=ct.size:typeof ct=="string"&&(z=typeof r=="function"?new r().encode(ct).byteLength:ct.length)),typeof z=="number"&&z>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F)}return!Po&&$&&$(),await new Promise((z,Ae)=>{Qd(z,Ae,{data:ct,headers:ve.from(at.headers),status:at.status,statusText:at.statusText,config:c,request:F})})}catch(U){if($&&$(),L&&L.aborted&&L.reason instanceof P){const ue=L.reason;throw ue.config=c,F&&(ue.request=F),U!==ue&&Object.defineProperty(ue,"cause",{__proto__:null,value:U,writable:!0,enumerable:!1,configurable:!0}),ue}if(Le)throw F&&!Le.request&&(Le.request=F),Le;if(U instanceof P)throw F&&!U.request&&(U.request=F),U;if(U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)){const ue=new P("Network Error",P.ERR_NETWORK,c,F,U&&U.response);throw Object.defineProperty(ue,"cause",{__proto__:null,value:U.cause||U,writable:!0,enumerable:!1,configurable:!0}),ue}throw P.from(U,U&&U.code,c,F,U&&U.response)}}},Rv=new Map,Jd=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:l}=t,o=[r,l,n];let i=o.length,s=i,u,a,f=Rv;for(;s--;)u=o[s],a=f.get(u),a===void 0&&f.set(u,a=s?new Map:Cv(t)),f=a;return a};Jd();const au={http:jg,xhr:fv,fetch:{get:Jd}};y.forEach(au,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ga=e=>`- ${e}`,Pv=e=>y.isFunction(e)||e===null||e===!1;function Nv(e,t){e=y.isArray(e)?e:[e];const{length:n}=e;let r,l;const o={};for(let i=0;i`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let s=n?i.length>1?`since :
+`+i.map(Ga).join(`
+`):" "+Ga(i[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+s,P.ERR_NOT_SUPPORT)}return l}const Gd={getAdapter:Nv,adapters:au};function oi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yr(null,e)}function ii(e){return oi(e),e.headers=ve.from(e.headers),e.data=li.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gd.getAdapter(e.adapter||Gr.adapter,e)(e).then(function(r){oi(e),e.response=r;try{r.data=li.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=ve.from(r.headers),r},function(r){if(!Wd(r)&&(oi(e),r&&r.response)){e.response=r.response;try{r.response.data=li.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=ve.from(r.response.headers)}return Promise.reject(r)})}const Ro={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ro[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ya={};Ro.transitional=function(t,n,r){function l(o,i){return"[Axios v"+uu+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,s)=>{if(t===!1)throw new P(l(i," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!Ya[i]&&(Ya[i]=!0,console.warn(l(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,s):!0}};Ro.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ov(e,t,n){if(typeof e!="object"||e===null)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const o=r[l],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const s=e[o],u=s===void 0||i(s,o,e);if(u!==!0)throw new P("option "+o+" must be "+u,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+o,P.ERR_BAD_OPTION)}}const Ll={assertOptions:Ov,validators:Ro},ye=Ll.validators;let tn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ua,response:new Ua}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const o=(()=>{if(!l.stack)return"";const i=l.stack.indexOf(`
+`);return i===-1?"":l.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
+`),s=i===-1?-1:o.indexOf(`
+`,i+1),u=s===-1?"":o.slice(s+1);String(r.stack).endsWith(u)||(r.stack+=`
+`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cn(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:o}=n;r!==void 0&&Ll.assertOptions(r,{silentJSONParsing:ye.transitional(ye.boolean),forcedJSONParsing:ye.transitional(ye.boolean),clarifyTimeoutError:ye.transitional(ye.boolean),legacyInterceptorReqResOrdering:ye.transitional(ye.boolean),advertiseZstdAcceptEncoding:ye.transitional(ye.boolean),validateStatusUndefinedResolves:ye.transitional(ye.boolean)},!1),l!=null&&(y.isFunction(l)?n.paramsSerializer={serialize:l}:Ll.assertOptions(l,{encode:ye.function,serialize:ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ll.assertOptions(n,{baseUrl:ye.spelling("baseURL"),withXsrfToken:ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&y.merge(o.common,o[n.method]);o&&y.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete o[w]}),n.headers=ve.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;u=u&&v.synchronous;const E=n.transitional||iu;E&&E.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});const a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!u){const w=[ii.bind(this),void 0];for(w.unshift(...s),w.push(...a),m=w.length,f=Promise.resolve(n);pii.call(this,g)))}catch(c){f=Promise.reject(c)}break}}if(!f)try{f=ii.call(this,g)}catch(w){f=Promise.reject(w)}for(p=0,m=a.length;p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](l);r._listeners=null}),this.promise.then=l=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(l);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new Yr(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Yd(function(l){t=l}),cancel:t}}};function jv(e){return function(n){return e.apply(null,n)}}function Lv(e){return y.isObject(e)&&e.isAxiosError===!0}const is={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(is).forEach(([e,t])=>{is[t]=e});function Zd(e){const t=new tn(e),n=Pd(tn.prototype.request,t);return y.extend(n,tn.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return Zd(cn(e,l))},n}const Z=Zd(Gr);Z.Axios=tn;Z.CanceledError=Yr;Z.CancelToken=Tv;Z.isCancel=Wd;Z.VERSION=uu;Z.toFormData=Co;Z.AxiosError=P;Z.Cancel=Z.CanceledError;Z.all=function(t){return Promise.all(t)};Z.spread=jv;Z.isAxiosError=Lv;Z.mergeConfig=cn;Z.AxiosHeaders=ve;Z.formToJSON=e=>Vd(y.isHTMLForm(e)?new FormData(e):e);Z.getAdapter=Gd.getAdapter;Z.HttpStatusCode=is;Z.default=Z;const{Axios:J0,AxiosError:G0,CanceledError:Y0,isCancel:Z0,CancelToken:b0,VERSION:e1,all:t1,Cancel:n1,isAxiosError:r1,spread:l1,toFormData:o1,AxiosHeaders:i1,HttpStatusCode:s1,formToJSON:u1,getAdapter:a1,mergeConfig:c1,create:f1}=Z,lt=Z.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});lt.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const Za={init:(e,t)=>lt.post("/init",{appName:e,password:t}),login:(e,t)=>lt.post("/login",{appName:e,password:t})},Av={getStats:()=>lt.get("/dashboard/stats")},sr={getAll:()=>lt.get("/keys"),generate:(e,t,n)=>lt.post("/keys/generate",{amount:e,days:t,prefix:n}),ban:e=>lt.post(`/keys/${e}/ban`),unban:e=>lt.post(`/keys/${e}/unban`),delete:e=>lt.delete(`/keys/${e}`),getFingerprint:e=>lt.get(`/keys/${e}/fingerprint`)},Dv="_container_abujx_1",zv="_scanlines_abujx_11",Fv="_card_abujx_25",Iv="_header_abujx_36",Uv="_logo_abujx_40",Mv="_logoIcon_abujx_47",Bv="_title_abujx_58",$v="_subtitle_abujx_65",Hv="_form_abujx_70",Vv="_field_abujx_76",Wv="_label_abujx_82",Qv="_input_abujx_88",Kv="_submit_abujx_109",qv="_toggle_abujx_134",Xv="_error_abujx_145",le={container:Dv,scanlines:zv,card:Fv,header:Iv,logo:Uv,logoIcon:Mv,title:Bv,subtitle:$v,form:Hv,field:Vv,label:Wv,input:Qv,submit:Kv,toggle:qv,error:Xv};function Jv({onLogin:e}){const[t,n]=R.useState(!1),[r,l]=R.useState(""),[o,i]=R.useState(""),[s,u]=R.useState(""),[a,f]=R.useState(!1),p=async m=>{var g,w;m.preventDefault(),u(""),f(!0);try{const v=t?await Za.init(r,o):await Za.login(r,o);t?(n(!1),u("Admin initialized. Please log in."),i("")):(localStorage.setItem("appName",r),e(v.data.token))}catch(v){u(((w=(g=v.response)==null?void 0:g.data)==null?void 0:w.error)||"An error occurred")}finally{f(!1)}};return _.jsxs("div",{className:le.container,children:[_.jsxs("div",{className:le.card,children:[_.jsxs("div",{className:le.header,children:[_.jsxs("div",{className:le.logo,children:[_.jsx("div",{className:le.logoIcon,children:"⚡"}),_.jsx("h1",{className:le.title,children:"YCPPlus"})]}),_.jsx("p",{className:le.subtitle,children:t?"Initialize Admin Account":"Authorization Management"})]}),_.jsxs("form",{onSubmit:p,className:le.form,children:[_.jsxs("div",{className:le.field,children:[_.jsx("label",{htmlFor:"appName",className:le.label,children:"Application Name"}),_.jsx("input",{id:"appName",type:"text",value:r,onChange:m=>l(m.target.value),className:le.input,placeholder:"MyApp",required:!0,autoFocus:!0})]}),_.jsxs("div",{className:le.field,children:[_.jsx("label",{htmlFor:"password",className:le.label,children:"Password"}),_.jsx("input",{id:"password",type:"password",value:o,onChange:m=>i(m.target.value),className:le.input,placeholder:"••••••••",required:!0})]}),s&&_.jsx("div",{className:le.error,children:s}),_.jsx("button",{type:"submit",className:le.submit,disabled:a,children:a?"Please wait...":t?"Initialize":"Sign In"}),_.jsx("button",{type:"button",className:le.toggle,onClick:()=>{n(!t),u("")},children:t?"Already have an account? Sign in":"First time? Initialize admin"})]})]}),_.jsx("div",{className:le.scanlines})]})}const Gv="_container_1iyjz_1",Yv="_header_1iyjz_6",Zv="_headerLeft_1iyjz_18",bv="_logo_1iyjz_24",e0="_logoIcon_1iyjz_30",t0="_appBadge_1iyjz_47",n0="_logout_1iyjz_56",r0="_main_1iyjz_68",l0="_stats_1iyjz_74",o0="_actions_1iyjz_81",i0="_primaryAction_1iyjz_88",s0="_secondaryAction_1iyjz_107",u0="_loading_1iyjz_123",a0="_spinner_1iyjz_133",ke={container:Gv,header:Yv,headerLeft:Zv,logo:bv,logoIcon:e0,appBadge:t0,logout:n0,main:r0,stats:l0,actions:o0,primaryAction:i0,secondaryAction:s0,loading:u0,spinner:a0},c0="_card_ce5lp_1",f0="_safe_ce5lp_20",d0="_alert_ce5lp_24",p0="_label_ce5lp_28",h0="_hint_ce5lp_40",m0="_value_ce5lp_48",vn={card:c0,safe:f0,alert:d0,label:p0,hint:h0,value:m0};function gl({label:e,value:t,variant:n="neutral",hint:r}){const l=vn[n]||vn.neutral;return _.jsxs("div",{className:`${vn.card} ${l}`,children:[_.jsxs("div",{className:vn.label,children:[e,r&&_.jsx("span",{className:vn.hint,children:r})]}),_.jsx("div",{className:vn.value,children:t})]})}const y0="_container_23vhe_1",g0="_tableWrapper_23vhe_8",v0="_table_23vhe_8",w0="_selected_23vhe_42",S0="_keyCode_23vhe_56",E0="_status_23vhe_65",_0="_date_23vhe_76",x0="_daysHint_23vhe_81",k0="_centered_23vhe_88",C0="_actions_23vhe_92",R0="_actionBtn_23vhe_97",P0="_danger_23vhe_113",N0="_empty_23vhe_118",O0="_emptyHint_23vhe_128",ae={container:y0,tableWrapper:g0,table:v0,selected:w0,keyCode:S0,status:E0,date:_0,daysHint:x0,centered:k0,actions:C0,actionBtn:R0,danger:P0,empty:N0,emptyHint:O0};function T0({keys:e,onBan:t,onUnban:n,onDelete:r}){const[l,o]=R.useState(null),i=a=>{switch(a){case"active":return"var(--cipher-safe)";case"expired":return"var(--text-dim)";case"banned":return"var(--cipher-alert)";default:return"var(--text-dim)"}},s=a=>a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—",u=a=>a<0?"Expired":a===0?"Today":a===1?"1 day":`${a} days`;return e.length===0?_.jsxs("div",{className:ae.empty,children:[_.jsx("p",{children:"No keys generated yet"}),_.jsx("p",{className:ae.emptyHint,children:'Click "Generate Keys" to create your first license key'})]}):_.jsx("div",{className:ae.container,children:_.jsx("div",{className:ae.tableWrapper,children:_.jsxs("table",{className:ae.table,children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Key"}),_.jsx("th",{children:"Status"}),_.jsx("th",{children:"Created"}),_.jsx("th",{children:"Expires"}),_.jsx("th",{children:"Logins"}),_.jsx("th",{children:"Actions"})]})}),_.jsx("tbody",{children:e.map(a=>_.jsxs("tr",{className:l===a.key?ae.selected:"",onClick:()=>o(a.key===l?null:a.key),children:[_.jsx("td",{children:_.jsx("code",{className:ae.keyCode,children:a.key})}),_.jsx("td",{children:_.jsx("span",{className:ae.status,style:{color:i(a.status),borderColor:i(a.status)},children:a.status})}),_.jsx("td",{className:ae.date,children:s(a.createdAt)}),_.jsxs("td",{className:ae.date,children:[s(a.expiresAt),_.jsx("span",{className:ae.daysHint,children:u(a.daysUntilExpiry)})]}),_.jsx("td",{className:ae.centered,children:a.loginCount}),_.jsx("td",{children:_.jsxs("div",{className:ae.actions,children:[a.status==="banned"?_.jsx("button",{onClick:f=>{f.stopPropagation(),n(a.key)},className:ae.actionBtn,title:"Unban",children:"Unban"}):_.jsx("button",{onClick:f=>{f.stopPropagation(),t(a.key)},className:ae.actionBtn,title:"Ban",children:"Ban"}),_.jsx("button",{onClick:f=>{f.stopPropagation(),r(a.key)},className:`${ae.actionBtn} ${ae.danger}`,title:"Delete",children:"Delete"})]})})]},a.key))})]})})})}const j0="_overlay_12ns8_1",L0="_modal_12ns8_23",A0="_header_12ns8_43",D0="_close_12ns8_57",z0="_form_12ns8_74",F0="_field_12ns8_78",I0="_hint_12ns8_92",U0="_input_12ns8_98",M0="_error_12ns8_115",B0="_actions_12ns8_125",$0="_cancel_12ns8_131",H0="_submit_12ns8_132",oe={overlay:j0,modal:L0,header:A0,close:D0,form:z0,field:F0,hint:I0,input:U0,error:M0,actions:B0,cancel:$0,submit:H0};function V0({onGenerate:e,onClose:t}){const[n,r]=R.useState(1),[l,o]=R.useState(30),[i,s]=R.useState(""),[u,a]=R.useState(!1),[f,p]=R.useState(""),m=async g=>{var w,v;if(g.preventDefault(),p(""),n<1||n>50){p("Amount must be between 1 and 50");return}if(l<1||l>9999){p("Days must be between 1 and 9999");return}a(!0);try{await e(n,l,i),t()}catch(E){p(((v=(w=E.response)==null?void 0:w.data)==null?void 0:v.error)||"Failed to generate keys")}finally{a(!1)}};return _.jsx("div",{className:oe.overlay,onClick:t,children:_.jsxs("div",{className:oe.modal,onClick:g=>g.stopPropagation(),children:[_.jsxs("div",{className:oe.header,children:[_.jsx("h2",{children:"Generate License Keys"}),_.jsx("button",{onClick:t,className:oe.close,children:"×"})]}),_.jsxs("form",{onSubmit:m,className:oe.form,children:[_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"amount",children:["Amount",_.jsx("span",{className:oe.hint,children:"1-50 keys"})]}),_.jsx("input",{id:"amount",type:"number",min:"1",max:"50",value:n,onChange:g=>r(parseInt(g.target.value)),className:oe.input,required:!0})]}),_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"days",children:["Validity Period (days)",_.jsx("span",{className:oe.hint,children:"1-9999 days"})]}),_.jsx("input",{id:"days",type:"number",min:"1",max:"9999",value:l,onChange:g=>o(parseInt(g.target.value)),className:oe.input,required:!0})]}),_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"prefix",children:["Custom Prefix",_.jsx("span",{className:oe.hint,children:"Optional, default: YCP"})]}),_.jsx("input",{id:"prefix",type:"text",value:i,onChange:g=>s(g.target.value.toUpperCase()),className:oe.input,placeholder:"YCP",maxLength:"10"})]}),f&&_.jsx("div",{className:oe.error,children:f}),_.jsxs("div",{className:oe.actions,children:[_.jsx("button",{type:"button",onClick:t,className:oe.cancel,children:"Cancel"}),_.jsx("button",{type:"submit",className:oe.submit,disabled:u,children:u?"Generating...":"Generate"})]})]})]})})}function W0({onLogout:e}){const[t,n]=R.useState(null),[r,l]=R.useState([]),[o,i]=R.useState(!0),[s,u]=R.useState(!1),a=localStorage.getItem("appName")||"Admin",f=async()=>{var v;try{const[E,c]=await Promise.all([Av.getStats(),sr.getAll()]);n(E.data),l(c.data)}catch(E){console.error("Failed to load data:",E),((v=E.response)==null?void 0:v.status)===401&&e()}finally{i(!1)}};R.useEffect(()=>{f()},[]);const p=async(v,E,c)=>{await sr.generate(v,E,c),await f()},m=async v=>{await sr.ban(v),await f()},g=async v=>{await sr.unban(v),await f()},w=async v=>{confirm(`Delete key ${v}?`)&&(await sr.delete(v),await f())};return o?_.jsxs("div",{className:ke.loading,children:[_.jsx("div",{className:ke.spinner}),_.jsx("p",{children:"Loading dashboard..."})]}):_.jsxs("div",{className:ke.container,children:[_.jsxs("header",{className:ke.header,children:[_.jsxs("div",{className:ke.headerLeft,children:[_.jsxs("div",{className:ke.logo,children:[_.jsx("div",{className:ke.logoIcon,children:"⚡"}),_.jsx("h1",{children:"YCPPlus"})]}),_.jsx("div",{className:ke.appBadge,children:a})]}),_.jsx("button",{onClick:e,className:ke.logout,children:"Sign Out"})]}),_.jsxs("main",{className:ke.main,children:[_.jsxs("section",{className:ke.stats,children:[_.jsx(gl,{label:"Total Keys",value:t.totalKeys,variant:"neutral"}),_.jsx(gl,{label:"Active",value:t.activeKeys,variant:"safe"}),_.jsx(gl,{label:"Expiring Soon",value:t.expiringSoon,variant:"alert",hint:"within 7 days"}),_.jsx(gl,{label:"Total Logins",value:t.totalLogins,variant:"neutral"})]}),_.jsxs("section",{className:ke.actions,children:[_.jsx("button",{onClick:()=>u(!0),className:ke.primaryAction,children:"Generate Keys"}),_.jsx("button",{onClick:f,className:ke.secondaryAction,children:"Refresh"})]}),_.jsx(T0,{keys:r,onBan:m,onUnban:g,onDelete:w})]}),s&&_.jsx(V0,{onGenerate:p,onClose:()=>u(!1)})]})}function Q0(){const[e,t]=R.useState(!1),[n,r]=R.useState(!0);R.useEffect(()=>{const i=localStorage.getItem("token");t(!!i),r(!1)},[]);const l=i=>{localStorage.setItem("token",i),t(!0)},o=()=>{localStorage.removeItem("token"),localStorage.removeItem("appName"),t(!1)};return n?_.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--text-dim)"},children:"Loading..."}):_.jsx(_y,{children:_.jsxs(wy,{children:[_.jsx(ts,{path:"/login",element:e?_.jsx(Oa,{to:"/",replace:!0}):_.jsx(Jv,{onLogin:l})}),_.jsx(ts,{path:"/",element:e?_.jsx(W0,{onLogout:o}):_.jsx(Oa,{to:"/login",replace:!0})})]})})}si.createRoot(document.getElementById("root")).render(_.jsx(ac.StrictMode,{children:_.jsx(Q0,{})}));
diff --git a/server_go/web/assets/index-mKCh-jFT.css b/server_go/web/assets/index-mKCh-jFT.css
new file mode 100644
index 0000000..0503e19
--- /dev/null
+++ b/server_go/web/assets/index-mKCh-jFT.css
@@ -0,0 +1 @@
+._container_abujx_1{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;position:relative;background:var(--vault-deep)}._scanlines_abujx_11{position:fixed;top:0;right:0;bottom:0;left:0;background:repeating-linear-gradient(0deg,rgba(255,255,255,.01) 0px,rgba(255,255,255,.01) 1px,transparent 1px,transparent 2px);pointer-events:none;opacity:.3}._card_abujx_25{position:relative;z-index:1;width:100%;max-width:420px;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:12px;padding:clamp(2rem,4vw,3rem)}._header_abujx_36{margin-bottom:2rem}._logo_abujx_40{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}._logoIcon_abujx_47{width:40px;height:40px;background:linear-gradient(135deg,var(--cipher-blue),var(--cipher-safe));border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:1.5rem}._title_abujx_58{font-size:clamp(1.5rem,3vw,2rem);font-weight:700;color:var(--text-primary);letter-spacing:-.02em}._subtitle_abujx_65{color:var(--text-dim);font-size:.9375rem}._form_abujx_70{display:flex;flex-direction:column;gap:1.25rem}._field_abujx_76{display:flex;flex-direction:column;gap:.5rem}._label_abujx_82{font-size:.875rem;font-weight:500;color:var(--text-primary)}._input_abujx_88{padding:.75rem 1rem;background:var(--vault-deep);border:1px solid var(--vault-border);border-radius:8px;color:var(--text-primary);font-size:.9375rem;transition:all .2s}._input_abujx_88:focus{outline:none;border-color:var(--cipher-blue);box-shadow:0 0 0 3px #4a90e21a}._input_abujx_88::placeholder{color:var(--text-dim);opacity:.5}._submit_abujx_109{margin-top:.5rem;padding:.875rem 1.5rem;background:var(--cipher-blue);color:#fff;font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._submit_abujx_109:hover:not(:disabled){background:#3a7bc8;transform:translateY(-1px)}._submit_abujx_109:active:not(:disabled){transform:translateY(0)}._submit_abujx_109:disabled{opacity:.6;cursor:not-allowed}._toggle_abujx_134{color:var(--text-dim);font-size:.875rem;padding:.5rem;transition:color .2s}._toggle_abujx_134:hover{color:var(--cipher-blue)}._error_abujx_145{padding:.75rem 1rem;background:#e8b3391a;border:1px solid var(--cipher-alert);border-radius:8px;color:var(--cipher-alert);font-size:.875rem}@media (max-width: 480px){._container_abujx_1{padding:1rem}._card_abujx_25{padding:1.5rem}}._container_1iyjz_1{min-height:100vh;background:var(--vault-deep)}._header_1iyjz_6{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:1rem clamp(1rem,4vw,2rem);background:var(--vault-surface);border-bottom:1px solid var(--vault-border)}._headerLeft_1iyjz_18{display:flex;align-items:center;gap:1rem}._logo_1iyjz_24{display:flex;align-items:center;gap:.5rem}._logoIcon_1iyjz_30{width:32px;height:32px;background:linear-gradient(135deg,var(--cipher-blue),var(--cipher-safe));border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:1.25rem}._logo_1iyjz_24 h1{font-size:1.25rem;font-weight:700;letter-spacing:-.02em}._appBadge_1iyjz_47{padding:.375rem .75rem;background:var(--vault-accent);border-radius:999px;font-size:.8125rem;font-weight:500;color:var(--text-primary)}._logout_1iyjz_56{padding:.5rem 1rem;color:var(--text-dim);font-size:.875rem;font-weight:500;transition:color .2s}._logout_1iyjz_56:hover{color:var(--text-primary)}._main_1iyjz_68{padding:clamp(1.5rem,4vw,2.5rem) clamp(1rem,4vw,2rem);max-width:1400px;margin:0 auto}._stats_1iyjz_74{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-bottom:2rem}._actions_1iyjz_81{display:flex;gap:.75rem;margin-bottom:1.5rem;flex-wrap:wrap}._primaryAction_1iyjz_88{padding:.75rem 1.5rem;background:var(--cipher-blue);color:#fff;font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._primaryAction_1iyjz_88:hover{background:#3a7bc8;transform:translateY(-1px)}._primaryAction_1iyjz_88:active{transform:translateY(0)}._secondaryAction_1iyjz_107{padding:.75rem 1.5rem;background:var(--vault-surface);border:1px solid var(--vault-border);color:var(--text-primary);font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._secondaryAction_1iyjz_107:hover{border-color:var(--vault-accent);background:var(--vault-accent)}._loading_1iyjz_123{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;color:var(--text-dim)}._spinner_1iyjz_133{width:40px;height:40px;border:3px solid var(--vault-border);border-top-color:var(--cipher-blue);border-radius:50%;animation:_spin_1iyjz_133 .8s linear infinite}@keyframes _spin_1iyjz_133{to{transform:rotate(360deg)}}@media (max-width: 640px){._headerLeft_1iyjz_18{gap:.5rem}._logo_1iyjz_24 h1{font-size:1.125rem}._appBadge_1iyjz_47{font-size:.75rem;padding:.25rem .625rem}._stats_1iyjz_74{grid-template-columns:repeat(2,1fr);gap:.75rem}}._card_ce5lp_1{padding:1.25rem;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:10px;position:relative;overflow:hidden}._card_ce5lp_1:before{content:"";position:absolute;top:0;left:0;width:100%;height:2px;background:var(--vault-border)}._card_ce5lp_1._safe_ce5lp_20:before{background:var(--cipher-safe)}._card_ce5lp_1._alert_ce5lp_24:before{background:var(--cipher-alert)}._label_ce5lp_28{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;font-weight:500;color:var(--text-dim);margin-bottom:.5rem;text-transform:uppercase;letter-spacing:.05em}._hint_ce5lp_40{font-size:.75rem;color:var(--text-dim);opacity:.6;text-transform:none;letter-spacing:normal}._value_ce5lp_48{font-size:clamp(1.75rem,3vw,2.25rem);font-weight:700;color:var(--text-primary);letter-spacing:-.02em}@media (max-width: 640px){._card_ce5lp_1{padding:1rem}._value_ce5lp_48{font-size:1.5rem}}._container_23vhe_1{background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:10px;overflow:hidden}._tableWrapper_23vhe_8{overflow-x:auto}._table_23vhe_8{width:100%;border-collapse:collapse}._table_23vhe_8 thead{background:var(--vault-deep);border-bottom:1px solid var(--vault-border)}._table_23vhe_8 th{padding:.875rem 1rem;text-align:left;font-size:.8125rem;font-weight:600;color:var(--text-dim);text-transform:uppercase;letter-spacing:.05em}._table_23vhe_8 tbody tr{border-bottom:1px solid var(--vault-border);transition:background .15s;cursor:pointer}._table_23vhe_8 tbody tr:hover,._table_23vhe_8 tbody tr._selected_23vhe_42{background:var(--vault-accent)}._table_23vhe_8 tbody tr:last-child{border-bottom:none}._table_23vhe_8 td{padding:1rem;font-size:.875rem;color:var(--text-primary)}._keyCode_23vhe_56{font-family:JetBrains Mono,monospace;font-size:.8125rem;color:var(--cipher-blue);background:var(--vault-deep);padding:.25rem .5rem;border-radius:4px}._status_23vhe_65{display:inline-block;padding:.25rem .625rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;border:1px solid currentColor;border-radius:999px}._date_23vhe_76{color:var(--text-dim);white-space:nowrap}._daysHint_23vhe_81{display:block;font-size:.75rem;opacity:.6;margin-top:.125rem}._centered_23vhe_88{text-align:center}._actions_23vhe_92{display:flex;gap:.5rem}._actionBtn_23vhe_97{padding:.375rem .75rem;font-size:.8125rem;font-weight:500;background:var(--vault-deep);border:1px solid var(--vault-border);color:var(--text-primary);border-radius:6px;transition:all .15s}._actionBtn_23vhe_97:hover{border-color:var(--cipher-blue);color:var(--cipher-blue)}._actionBtn_23vhe_97._danger_23vhe_113:hover{border-color:var(--cipher-alert);color:var(--cipher-alert)}._empty_23vhe_118{padding:3rem 2rem;text-align:center;color:var(--text-dim)}._empty_23vhe_118 p{margin-bottom:.5rem}._emptyHint_23vhe_128{font-size:.875rem;opacity:.7}@media (max-width: 768px){._table_23vhe_8 th,._table_23vhe_8 td{padding:.75rem .5rem}._actions_23vhe_92{flex-direction:column}._actionBtn_23vhe_97{font-size:.75rem;padding:.25rem .5rem}}._overlay_12ns8_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0a1628d9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:1rem;z-index:100;animation:_fadeIn_12ns8_1 .2s}@keyframes _fadeIn_12ns8_1{0%{opacity:0}to{opacity:1}}._modal_12ns8_23{width:100%;max-width:480px;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:12px;animation:_slideUp_12ns8_1 .25s}@keyframes _slideUp_12ns8_1{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}._header_12ns8_43{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--vault-border)}._header_12ns8_43 h2{font-size:1.25rem;font-weight:700;color:var(--text-primary)}._close_12ns8_57{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:1.75rem;color:var(--text-dim);border-radius:6px;transition:all .15s}._close_12ns8_57:hover{background:var(--vault-accent);color:var(--text-primary)}._form_12ns8_74{padding:1.5rem}._field_12ns8_78{margin-bottom:1.25rem}._field_12ns8_78 label{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}._hint_12ns8_92{font-size:.75rem;color:var(--text-dim);font-weight:400}._input_12ns8_98{width:100%;padding:.75rem 1rem;background:var(--vault-deep);border:1px solid var(--vault-border);border-radius:8px;color:var(--text-primary);font-size:.9375rem;transition:all .2s}._input_12ns8_98:focus{outline:none;border-color:var(--cipher-blue);box-shadow:0 0 0 3px #4a90e21a}._error_12ns8_115{padding:.75rem 1rem;background:#e8b3391a;border:1px solid var(--cipher-alert);border-radius:8px;color:var(--cipher-alert);font-size:.875rem;margin-bottom:1rem}._actions_12ns8_125{display:flex;gap:.75rem;justify-content:flex-end}._cancel_12ns8_131,._submit_12ns8_132{padding:.75rem 1.5rem;font-size:.9375rem;font-weight:500;border-radius:8px;transition:all .2s}._cancel_12ns8_131{background:var(--vault-deep);border:1px solid var(--vault-border);color:var(--text-primary)}._cancel_12ns8_131:hover{border-color:var(--vault-accent);background:var(--vault-accent)}._submit_12ns8_132{background:var(--cipher-blue);color:#fff}._submit_12ns8_132:hover:not(:disabled){background:#3a7bc8;transform:translateY(-1px)}._submit_12ns8_132:disabled{opacity:.6;cursor:not-allowed}@media (max-width: 480px){._header_12ns8_43,._form_12ns8_74{padding:1rem}}:root{--vault-deep: #0A1628;--vault-surface: #132340;--vault-border: #1E3A5F;--vault-accent: #2D5A8C;--cipher-blue: #4A90E2;--cipher-alert: #E8B339;--cipher-safe: #5FBC8E;--text-primary: #E8ECF1;--text-dim: #8A9AB0;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{margin:0;padding:0;box-sizing:border-box}body{margin:0;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-size:clamp(.875rem,.8rem + .25vw,1rem);line-height:1.6;background:var(--vault-deep);color:var(--text-primary)}#root{min-height:100vh;display:flex;flex-direction:column}code,.mono{font-family:JetBrains Mono,Courier New,monospace}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}input,textarea{font-family:inherit;color:inherit}a{color:var(--cipher-blue);text-decoration:none}a:hover{text-decoration:underline}::selection{background:var(--cipher-blue);color:var(--vault-deep)}
diff --git a/server_go/web/index.html b/server_go/web/index.html
new file mode 100644
index 0000000..9bcffd3
--- /dev/null
+++ b/server_go/web/index.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ YCPPlus Admin
+
+
+
+
+
+
+
+
+
+
diff --git a/server_go/web/vault.svg b/server_go/web/vault.svg
new file mode 100644
index 0000000..9c30c3f
--- /dev/null
+++ b/server_go/web/vault.svg
@@ -0,0 +1,11 @@
+
diff --git a/server_python/Dockerfile b/server_python/Dockerfile
index 906252a..4cec976 100644
--- a/server_python/Dockerfile
+++ b/server_python/Dockerfile
@@ -1,18 +1,26 @@
+# ===== 阶段 1: 构建前端(admin-web) =====
+FROM node:20-alpine AS frontend
+
+WORKDIR /web
+COPY admin-web/frontend/package.json admin-web/frontend/package-lock.json ./
+RUN npm ci --no-audit --no-fund
+COPY admin-web/frontend/ ./
+RUN npm run build
+
+# ===== 阶段 2: 运行镜像 =====
FROM python:3.11-slim
WORKDIR /app
# 安装依赖
-COPY requirements.txt .
+COPY server_python/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
-# 复制应用
-COPY app.py .
-
-# 创建数据目录
-RUN mkdir -p /app/data
+# 复制应用与前端构建产物
+COPY server_python/app.py .
+COPY --from=frontend /web/dist ./web
-# 暴露端口
+# 暴露端口(授权协议 + Web 管理面板同端口)
EXPOSE 13337
# 使用 Gunicorn 运行
diff --git a/server_python/app.py b/server_python/app.py
index 9991970..503ccc3 100644
--- a/server_python/app.py
+++ b/server_python/app.py
@@ -1,18 +1,33 @@
-from flask import Flask, request, jsonify
+from flask import Flask, request, jsonify, send_from_directory
+from functools import wraps
import sqlite3
import hashlib
+import hmac
+import base64
+import json
+import math
+import os
import secrets
import datetime
-from functools import wraps
-app = Flask(__name__)
+DB_PATH = os.environ.get('YCP_DB_PATH', 'ycp_auth.db')
+WEB_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'web')
+JWT_EXPIRATION = 86400 # 24 小时(秒)
+
+app = Flask(__name__, static_folder=WEB_DIR, static_url_path='')
+
+
+# ===== 数据库 =====
+
+def get_conn():
+ return sqlite3.connect(DB_PATH)
+
-# 数据库初始化
def init_db():
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
- # 应用表(管理员账号)
+ # 应用表(管理员账号,Web 面板与原生协议共用)
c.execute('''CREATE TABLE IF NOT EXISTS applications
(app_name TEXT PRIMARY KEY,
password_hash TEXT NOT NULL,
@@ -26,22 +41,103 @@ def init_db():
is_banned INTEGER DEFAULT 0,
last_login TEXT,
created_at TEXT NOT NULL,
+ login_count INTEGER DEFAULT 0,
FOREIGN KEY (app_name) REFERENCES applications(app_name))''')
+ # 旧库迁移:补充 login_count 列(已存在时报错可忽略)
+ try:
+ c.execute("ALTER TABLE keys ADD COLUMN login_count INTEGER DEFAULT 0")
+ except sqlite3.OperationalError:
+ pass
+
+ # 设置表(存 JWT 密钥,保证重启/多 worker 后 token 仍有效)
+ c.execute('''CREATE TABLE IF NOT EXISTS settings
+ (name TEXT PRIMARY KEY,
+ value TEXT NOT NULL)''')
+
conn.commit()
conn.close()
-# 密码哈希
+
def hash_password(password):
return hashlib.sha256(password.encode()).hexdigest()
-# 生成密钥
+
def generate_key(app_name, days):
key = f"{app_name}_{secrets.token_urlsafe(32)}"
expire_date = (datetime.datetime.now() + datetime.timedelta(days=days)).strftime('%Y-%m-%d %H:%M:%S')
return key, expire_date
-# 认证装饰器
+
+# ===== JWT (HS256,标准库实现) =====
+
+def _b64url(data: bytes) -> str:
+ return base64.urlsafe_b64encode(data).rstrip(b'=').decode()
+
+
+def _b64url_decode(data: str) -> bytes:
+ padding = '=' * (-len(data) % 4)
+ return base64.urlsafe_b64decode(data + padding)
+
+
+def get_jwt_secret() -> str:
+ conn = get_conn()
+ c = conn.cursor()
+ c.execute("SELECT value FROM settings WHERE name='jwt_secret'")
+ row = c.fetchone()
+ if row is None:
+ secret = secrets.token_hex(32)
+ c.execute("INSERT INTO settings (name, value) VALUES ('jwt_secret', ?)", (secret,))
+ conn.commit()
+ else:
+ secret = row[0]
+ conn.close()
+ return secret
+
+
+def generate_jwt(app_name: str) -> str:
+ now = int(datetime.datetime.now().timestamp())
+ header = _b64url(json.dumps({"alg": "HS256", "typ": "JWT"}).encode())
+ payload = _b64url(json.dumps({
+ "sub": app_name,
+ "iat": now,
+ "exp": now + JWT_EXPIRATION,
+ }).encode())
+ signing_input = f"{header}.{payload}"
+ sig = hmac.new(get_jwt_secret().encode(), signing_input.encode(), hashlib.sha256).digest()
+ return f"{signing_input}.{_b64url(sig)}"
+
+
+def validate_jwt(token: str):
+ """校验通过返回 app_name,否则返回 None"""
+ parts = token.split('.')
+ if len(parts) != 3:
+ return None
+ signing_input = f"{parts[0]}.{parts[1]}"
+ expected = _b64url(hmac.new(get_jwt_secret().encode(), signing_input.encode(), hashlib.sha256).digest())
+ if not hmac.compare_digest(expected, parts[2]):
+ return None
+ try:
+ claims = json.loads(_b64url_decode(parts[1]))
+ except (ValueError, json.JSONDecodeError):
+ return None
+ if datetime.datetime.now().timestamp() >= claims.get('exp', 0):
+ return None
+ return claims.get('sub')
+
+
+# ===== CORS =====
+
+@app.after_request
+def add_cors_headers(response):
+ response.headers['Access-Control-Allow-Origin'] = '*'
+ response.headers['Access-Control-Allow-Headers'] = 'Authorization, Content-Type'
+ response.headers['Access-Control-Allow-Methods'] = 'GET, POST, DELETE, OPTIONS'
+ return response
+
+
+# ===== 原生协议 API(表单) =====
+
def require_auth(f):
@wraps(f)
def decorated_function(*args, **kwargs):
@@ -51,7 +147,7 @@ def decorated_function(*args, **kwargs):
if not app_name or not password:
return "Missing credentials", 403
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
c.execute("SELECT password_hash FROM applications WHERE app_name=?", (app_name,))
result = c.fetchone()
@@ -63,15 +159,14 @@ def decorated_function(*args, **kwargs):
return f(*args, **kwargs)
return decorated_function
-# ===== API 端点 =====
@app.route('/admin_login', methods=['POST'])
def admin_login():
- """管理员登录"""
+ """管理员登录(表单,供原生 Admin Panel 调用)"""
app_name = request.form.get('app')
password = request.form.get('password')
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
c.execute("SELECT password_hash FROM applications WHERE app_name=?", (app_name,))
result = c.fetchone()
@@ -81,14 +176,15 @@ def admin_login():
return "success"
return "Invalid app name or password"
+
@app.route('/admin', methods=['POST'])
@require_auth
def admin_command():
- """管理命令统一入口"""
+ """管理命令统一入口(表单)"""
command = request.form.get('command', '')
app_name = request.form.get('app')
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
try:
@@ -107,7 +203,7 @@ def admin_command():
for _ in range(amount):
key, expire_date = generate_key(app_name, days)
c.execute("INSERT INTO keys (key_id, app_name, expire_date, created_at) VALUES (?, ?, ?, ?)",
- (key, app_name, expire_date, datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
+ (key, app_name, expire_date, datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
keys.append(key)
conn.commit()
@@ -123,7 +219,7 @@ def admin_command():
elif action == 'Reset':
# 重置密钥: Reset
key = parts[1]
- c.execute("UPDATE keys SET last_login=NULL WHERE key_id=? AND app_name=?", (key, app_name))
+ c.execute("UPDATE keys SET last_login=NULL, login_count=0 WHERE key_id=? AND app_name=?", (key, app_name))
conn.commit()
return "success" if c.rowcount > 0 else "Key not found"
@@ -144,6 +240,7 @@ def admin_command():
finally:
conn.close()
+
@app.route('/login', methods=['POST'])
def client_login():
"""客户端授权验证 (C++ Native 层调用)"""
@@ -153,10 +250,9 @@ def client_login():
if not app_name or not key:
return "Missing parameters", 400
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
- # 验证密钥
c.execute("""SELECT expire_date, is_banned
FROM keys
WHERE key_id=? AND app_name=?""", (key, app_name))
@@ -168,53 +264,302 @@ def client_login():
expire_date, is_banned = result
- # 检查封禁状态
if is_banned:
conn.close()
return "Key banned", 403
- # 检查过期
expire_dt = datetime.datetime.strptime(expire_date, '%Y-%m-%d %H:%M:%S')
if datetime.datetime.now() > expire_dt:
conn.close()
return "Key expired", 403
- # 更新最后登录时间
+ # 更新最后登录时间和登录次数
now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
- c.execute("UPDATE keys SET last_login=? WHERE key_id=?", (now, key))
+ c.execute("UPDATE keys SET last_login=?, login_count=login_count+1 WHERE key_id=?", (now, key))
conn.commit()
conn.close()
return "success"
-# 初始化脚本
+
@app.route('/init_admin', methods=['POST'])
def init_admin():
- """初始化管理员账号 (仅用于首次部署)"""
+ """初始化管理员账号(表单,仅用于首次部署)"""
app_name = request.form.get('app')
password = request.form.get('password')
if not app_name or not password:
return "Missing parameters"
- conn = sqlite3.connect('ycp_auth.db')
+ conn = get_conn()
c = conn.cursor()
- # 检查是否已存在
c.execute("SELECT 1 FROM applications WHERE app_name=?", (app_name,))
if c.fetchone():
conn.close()
return "App already exists"
- # 插入管理员账号
c.execute("INSERT INTO applications (app_name, password_hash, created_at) VALUES (?, ?, ?)",
- (app_name, hash_password(password), datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
+ (app_name, hash_password(password), datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
conn.commit()
conn.close()
return "Admin created successfully"
+
+# ===== Web 管理面板 REST API (JSON + JWT) =====
+
+def require_jwt(f):
+ @wraps(f)
+ def decorated_function(*args, **kwargs):
+ auth_header = request.headers.get('Authorization', '')
+ token = auth_header.replace('Bearer ', '')
+ app_name = validate_jwt(token)
+ if not app_name:
+ return jsonify({"error": "Invalid or expired token"}), 401
+ request.jwt_app_name = app_name
+ return f(*args, **kwargs)
+ return decorated_function
+
+
+def fetch_keys(app_name):
+ """查询某应用全部密钥,按创建时间倒序"""
+ conn = get_conn()
+ c = conn.cursor()
+ c.execute("""SELECT key_id, expire_date, is_banned, last_login, created_at, login_count
+ FROM keys WHERE app_name=? ORDER BY created_at DESC""", (app_name,))
+ rows = c.fetchall()
+ conn.close()
+ keys = []
+ for row in rows:
+ expire_dt = datetime.datetime.strptime(row[1], '%Y-%m-%d %H:%M:%S')
+ keys.append({
+ 'key': row[0],
+ 'expire_date': row[1],
+ 'expire_dt': expire_dt,
+ 'banned': row[2] == 1,
+ 'last_login': row[3],
+ 'created_at': row[4],
+ 'login_count': row[5],
+ })
+ return keys
+
+
+def db_time_to_iso(s):
+ """'2024-08-20 19:30:15' → '2024-08-20T19:30:15'(前端 new Date() 可解析)"""
+ return s.replace(' ', 'T', 1) if s else None
+
+
+def key_to_response(k):
+ now = datetime.datetime.now()
+ expired = k['expire_dt'] < now
+ days_until_expiry = math.floor((k['expire_dt'] - now).total_seconds() / 86400)
+
+ if k['banned']:
+ status = 'banned'
+ elif expired:
+ status = 'expired'
+ else:
+ status = 'active'
+
+ return {
+ 'key': k['key'],
+ 'status': status,
+ 'createdAt': db_time_to_iso(k['created_at']),
+ 'expiresAt': db_time_to_iso(k['expire_date']),
+ 'lastLogin': db_time_to_iso(k['last_login']),
+ 'loginCount': k['login_count'],
+ 'daysUntilExpiry': days_until_expiry,
+ }
+
+
+@app.route('/api/init', methods=['POST'])
+def api_init():
+ """Web 面板:初始化管理员"""
+ data = request.get_json(silent=True) or {}
+ app_name = data.get('appName', '')
+ password = data.get('password', '')
+
+ if not app_name or not password:
+ return jsonify({"error": "Missing parameters"}), 400
+
+ conn = get_conn()
+ c = conn.cursor()
+ c.execute("SELECT 1 FROM applications WHERE app_name=?", (app_name,))
+ if c.fetchone():
+ conn.close()
+ return jsonify({"error": f"Admin already exists for app: {app_name}"}), 400
+
+ c.execute("INSERT INTO applications (app_name, password_hash, created_at) VALUES (?, ?, ?)",
+ (app_name, hash_password(password), datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')))
+ conn.commit()
+ conn.close()
+
+ return jsonify({"message": "Admin initialized successfully"})
+
+
+@app.route('/api/login', methods=['POST'])
+def api_login():
+ """Web 面板:登录,返回 JWT"""
+ data = request.get_json(silent=True) or {}
+ app_name = data.get('appName', '')
+ password = data.get('password', '')
+
+ conn = get_conn()
+ c = conn.cursor()
+ c.execute("SELECT password_hash FROM applications WHERE app_name=?", (app_name,))
+ result = c.fetchone()
+ conn.close()
+
+ if not result or result[0] != hash_password(password):
+ return jsonify({"error": "Invalid credentials"}), 400
+
+ return jsonify({
+ "token": generate_jwt(app_name),
+ "appName": app_name,
+ "expiresIn": JWT_EXPIRATION,
+ })
+
+
+@app.route('/api/dashboard/stats', methods=['GET'])
+@require_jwt
+def api_stats():
+ """Web 面板:仪表盘统计"""
+ app_name = request.jwt_app_name
+ keys = fetch_keys(app_name)
+ now = datetime.datetime.now()
+
+ stats = {
+ 'totalKeys': len(keys),
+ 'activeKeys': sum(1 for k in keys if not k['banned'] and k['expire_dt'] > now),
+ 'expiredKeys': sum(1 for k in keys if k['expire_dt'] <= now),
+ 'bannedKeys': sum(1 for k in keys if k['banned']),
+ 'expiringSoon': sum(1 for k in keys
+ if 0 <= math.floor((k['expire_dt'] - now).total_seconds() / 86400) <= 7),
+ 'totalLogins': sum(k['login_count'] for k in keys),
+ }
+ return jsonify(stats)
+
+
+@app.route('/api/keys', methods=['GET'])
+@require_jwt
+def api_list_keys():
+ """Web 面板:密钥列表"""
+ keys = fetch_keys(request.jwt_app_name)
+ return jsonify([key_to_response(k) for k in keys])
+
+
+KEY_CHARSET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789" # 排除易混淆字符
+
+
+@app.route('/api/keys/generate', methods=['POST'])
+@require_jwt
+def api_generate_keys():
+ """Web 面板:生成密钥(格式 PREFIX-XXXX-XXXX-XXXX)"""
+ data = request.get_json(silent=True) or {}
+ amount = data.get('amount', 0)
+ days = data.get('days', 0)
+ prefix = (data.get('prefix') or '').strip().upper()
+
+ if not isinstance(amount, int) or not (1 <= amount <= 50):
+ return jsonify({"error": "Amount must be between 1 and 50"}), 400
+ if not isinstance(days, int) or not (1 <= days <= 9999):
+ return jsonify({"error": "Days must be between 1 and 9999"}), 400
+
+ prefix = prefix if prefix else "YCP"
+
+ now = datetime.datetime.now()
+ expire_date = (now + datetime.timedelta(days=days)).strftime('%Y-%m-%d %H:%M:%S')
+
+ conn = get_conn()
+ c = conn.cursor()
+ keys = []
+ try:
+ for _ in range(amount):
+ parts = [''.join(secrets.choice(KEY_CHARSET) for _ in range(4)) for _ in range(3)]
+ key = f"{prefix}-{'-'.join(parts)}"
+ c.execute("INSERT INTO keys (key_id, app_name, expire_date, created_at) VALUES (?, ?, ?, ?)",
+ (key, request.jwt_app_name, expire_date, now.strftime('%Y-%m-%d %H:%M:%S')))
+ keys.append(key)
+ conn.commit()
+ except Exception:
+ conn.close()
+ return jsonify({"error": "Database error"}), 500
+ conn.close()
+
+ return jsonify({"keys": keys})
+
+
+@app.route('/api/keys//ban', methods=['POST'])
+@require_jwt
+def api_ban_key(key):
+ """Web 面板:封禁密钥"""
+ conn = get_conn()
+ c = conn.cursor()
+ try:
+ c.execute("UPDATE keys SET is_banned=1 WHERE key_id=? AND app_name=?", (key, request.jwt_app_name))
+ conn.commit()
+ finally:
+ conn.close()
+ return jsonify({"message": "Key banned"})
+
+
+@app.route('/api/keys//unban', methods=['POST'])
+@require_jwt
+def api_unban_key(key):
+ """Web 面板:解封密钥"""
+ conn = get_conn()
+ c = conn.cursor()
+ try:
+ c.execute("UPDATE keys SET is_banned=0 WHERE key_id=? AND app_name=?", (key, request.jwt_app_name))
+ conn.commit()
+ finally:
+ conn.close()
+ return jsonify({"message": "Key unbanned"})
+
+
+@app.route('/api/keys/', methods=['DELETE'])
+@require_jwt
+def api_delete_key(key):
+ """Web 面板:删除密钥"""
+ conn = get_conn()
+ c = conn.cursor()
+ try:
+ c.execute("DELETE FROM keys WHERE key_id=? AND app_name=?", (key, request.jwt_app_name))
+ conn.commit()
+ finally:
+ conn.close()
+ return jsonify({"message": "Key deleted"})
+
+
+@app.route('/api/keys//fingerprint', methods=['GET'])
+def api_fingerprint(key):
+ """Web 面板:密钥指纹(SHA256 前 4 字节十六进制)"""
+ fingerprint = hashlib.sha256(key.encode()).hexdigest()[:8].upper()
+ return jsonify({"fingerprint": fingerprint})
+
+
+# ===== 前端静态文件(SPA) =====
+
+@app.route('/')
+def web_index():
+ return send_from_directory(WEB_DIR, 'index.html')
+
+
+@app.errorhandler(404)
+def web_fallback(e):
+ """非 /api 路径回退到 SPA index.html"""
+ if not request.path.startswith('/api'):
+ try:
+ return send_from_directory(WEB_DIR, 'index.html')
+ except FileNotFoundError:
+ return "Admin web panel is not built yet. Run: cd admin-web/frontend && npm install && npm run build, then copy dist/ into server_python/web/.", 404
+ return jsonify({"error": "Not found"}), 404
+
+
+# 模块导入时初始化数据库(gunicorn 多 worker 下 __main__ 不会执行)
+init_db()
+
if __name__ == '__main__':
- init_db()
# 生产环境使用 gunicorn: gunicorn -w 4 -b 0.0.0.0:13337 app:app
app.run(host='0.0.0.0', port=13337, debug=False)
diff --git a/server_python/web/assets/index-BA-PQFIO.js b/server_python/web/assets/index-BA-PQFIO.js
new file mode 100644
index 0000000..98a0a15
--- /dev/null
+++ b/server_python/web/assets/index-BA-PQFIO.js
@@ -0,0 +1,75 @@
+function tp(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ba={exports:{}},io={},ec={exports:{}},I={};/**
+ * @license React
+ * react.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var $r=Symbol.for("react.element"),rp=Symbol.for("react.portal"),lp=Symbol.for("react.fragment"),op=Symbol.for("react.strict_mode"),ip=Symbol.for("react.profiler"),sp=Symbol.for("react.provider"),up=Symbol.for("react.context"),ap=Symbol.for("react.forward_ref"),cp=Symbol.for("react.suspense"),fp=Symbol.for("react.memo"),dp=Symbol.for("react.lazy"),hu=Symbol.iterator;function pp(e){return e===null||typeof e!="object"?null:(e=hu&&e[hu]||e["@@iterator"],typeof e=="function"?e:null)}var tc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nc=Object.assign,rc={};function Qn(e,t,n){this.props=e,this.context=t,this.refs=rc,this.updater=n||tc}Qn.prototype.isReactComponent={};Qn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Qn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lc(){}lc.prototype=Qn.prototype;function ss(e,t,n){this.props=e,this.context=t,this.refs=rc,this.updater=n||tc}var us=ss.prototype=new lc;us.constructor=ss;nc(us,Qn.prototype);us.isPureReactComponent=!0;var mu=Array.isArray,oc=Object.prototype.hasOwnProperty,as={current:null},ic={key:!0,ref:!0,__self:!0,__source:!0};function sc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)oc.call(t,r)&&!ic.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,$=O[F];if(0>>1;Fl(mn,L))U<$&&0>l(ue,mn)?(O[F]=ue,O[U]=L,F=U):(O[F]=mn,O[Le]=L,F=Le);else if(U<$&&0>l(ue,L))O[F]=ue,O[U]=L,F=U;else break e}}return D}function l(O,D){var L=O.sortIndex-D.sortIndex;return L!==0?L:O.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var u=[],a=[],f=1,p=null,m=3,g=!1,w=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(O){for(var D=n(a);D!==null;){if(D.callback===null)r(a);else if(D.startTime<=O)r(a),D.sortIndex=D.expirationTime,t(u,D);else break;D=n(a)}}function S(O){if(v=!1,h(O),!w)if(n(u)!==null)w=!0,ut(k);else{var D=n(a);D!==null&&Wt(S,D.startTime-O)}}function k(O,D){w=!1,v&&(v=!1,c(j),j=-1),g=!0;var L=m;try{for(h(D),p=n(u);p!==null&&(!(p.expirationTime>D)||O&&!b());){var F=p.callback;if(typeof F=="function"){p.callback=null,m=p.priorityLevel;var $=F(p.expirationTime<=D);D=e.unstable_now(),typeof $=="function"?p.callback=$:p===n(u)&&r(u),h(D)}else r(u);p=n(u)}if(p!==null)var qe=!0;else{var Le=n(a);Le!==null&&Wt(S,Le.startTime-D),qe=!1}return qe}finally{p=null,m=L,g=!1}}var C=!1,N=null,j=-1,V=5,A=-1;function b(){return!(e.unstable_now()-AO||125F?(O.sortIndex=L,t(a,O),n(u)===null&&O===n(a)&&(v?(c(j),j=-1):v=!0,Wt(S,L-F))):(O.sortIndex=$,t(u,O),w||g||(w=!0,ut(k))),O},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(O){var D=m;return function(){var L=m;m=D;try{return O.apply(this,arguments)}finally{m=L}}}})(pc);dc.exports=pc;var Cp=dc.exports;/**
+ * @license React
+ * react-dom.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var Rp=R,Ie=Cp;function x(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"),ui=Object.prototype.hasOwnProperty,Pp=/^[: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]*$/,gu={},vu={};function Np(e){return ui.call(vu,e)?!0:ui.call(gu,e)?!1:Pp.test(e)?vu[e]=!0:(gu[e]=!0,!1)}function Op(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 Tp(e,t,n,r){if(t===null||typeof t>"u"||Op(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 xe(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 pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new xe(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){pe[e]=new xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var fs=/[\-:]([a-z])/g;function ds(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(fs,ds);pe[t]=new xe(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(fs,ds);pe[t]=new xe(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(fs,ds);pe[t]=new xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new xe(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ps(e,t,n,r){var l=pe.hasOwnProperty(t)?pe[t]:null;(l!==null?l.type!==0:r||!(2s||l[i]!==o[s]){var u=`
+`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=s);break}}}finally{To=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function jp(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=jo(e.type,!1),e;case 11:return e=jo(e.type.render,!1),e;case 1:return e=jo(e.type,!0),e;default:return""}}function di(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 Sn:return"Fragment";case wn:return"Portal";case ai:return"Profiler";case hs:return"StrictMode";case ci:return"Suspense";case fi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yc:return(e.displayName||"Context")+".Consumer";case mc:return(e._context.displayName||"Context")+".Provider";case ms:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ys:return t=e.displayName||null,t!==null?t:di(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return di(e(t))}catch{}}return null}function Lp(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 di(t);case 8:return t===hs?"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 Mt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ap(e){var t=vc(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 tl(e){e._valueTracker||(e._valueTracker=Ap(e))}function wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=vc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Al(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 pi(e,t){var n=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Su(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mt(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 Sc(e,t){t=t.checked,t!=null&&ps(e,"checked",t,!1)}function hi(e,t){Sc(e,t);var n=Mt(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")?mi(e,t.type,n):t.hasOwnProperty("defaultValue")&&mi(e,t.type,Mt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Eu(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 mi(e,t,n){(t!=="number"||Al(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ar=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dr={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},Dp=["Webkit","ms","Moz","O"];Object.keys(dr).forEach(function(e){Dp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dr[t]=dr[e]})});function kc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dr.hasOwnProperty(e)&&dr[e]?(""+t).trim():t+"px"}function Cc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=kc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var zp=J({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 vi(e,t){if(t){if(zp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function wi(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 Si=null;function gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ei=null,Ln=null,An=null;function ku(e){if(e=Wr(e)){if(typeof Ei!="function")throw Error(x(280));var t=e.stateNode;t&&(t=fo(t),Ei(e.stateNode,e.type,t))}}function Rc(e){Ln?An?An.push(e):An=[e]:Ln=e}function Pc(){if(Ln){var e=Ln,t=An;if(An=Ln=null,ku(e),t)for(e=0;e>>=0,e===0?32:31-(Kp(e)/qp|0)|0}var rl=64,ll=4194304;function cr(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 Il(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 s=i&~l;s!==0?r=cr(s):(o&=i,o!==0&&(r=cr(o)))}else i=n&~l,i!==0?r=cr(i):o!==0&&(r=cr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=n}function Yp(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=hr),Au=" ",Du=!1;function qc(e,t){switch(e){case"keyup":return Ch.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function Ph(e,t){switch(e){case"compositionend":return Xc(t);case"keypress":return t.which!==32?null:(Du=!0,Au);case"textInput":return e=t.data,e===Au&&Du?null:e;default:return null}}function Nh(e,t){if(En)return e==="compositionend"||!Cs&&qc(e,t)?(e=Qc(),El=_s=Nt=null,En=!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=Uu(n)}}function Zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bc(){for(var e=window,t=Al();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Al(e.document)}return t}function Rs(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 Ih(e){var t=bc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zc(n.ownerDocument.documentElement,n)){if(r!==null&&Rs(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=Mu(n,o);var i=Mu(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,_n=null,Pi=null,yr=null,Ni=!1;function Bu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ni||_n==null||_n!==Al(r)||(r=_n,"selectionStart"in r&&Rs(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}),yr&&Nr(yr,r)||(yr=r,r=Bl(Pi,"onSelect"),0Cn||(e.current=Di[Cn],Di[Cn]=null,Cn--)}function H(e,t){Cn++,Di[Cn]=e.current,e.current=t}var Bt={},we=Ht(Bt),Pe=Ht(!1),nn=Bt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Bt;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 Ne(e){return e=e.childContextTypes,e!=null}function Hl(){Q(Pe),Q(we)}function qu(e,t,n){if(we.current!==Bt)throw Error(x(168));H(we,t),H(Pe,n)}function af(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(x(108,Lp(e)||"Unknown",l));return J({},n,r)}function Vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,nn=we.current,H(we,e),H(Pe,Pe.current),!0}function Xu(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=af(e,t,nn),r.__reactInternalMemoizedMergedChildContext=e,Q(Pe),Q(we),H(we,e)):Q(Pe),H(Pe,n)}var dt=null,po=!1,Qo=!1;function cf(e){dt===null?dt=[e]:dt.push(e)}function Jh(e){po=!0,cf(e)}function Vt(){if(!Qo&&dt!==null){Qo=!0;var e=0,t=B;try{var n=dt;for(B=1;e>=i,l-=i,pt=1<<32-Ze(t)+l|n<j?(V=N,N=null):V=N.sibling;var A=m(c,N,h[j],S);if(A===null){N===null&&(N=V);break}e&&N&&A.alternate===null&&t(c,N),d=o(A,d,j),C===null?k=A:C.sibling=A,C=A,N=V}if(j===h.length)return n(c,N),K&&Kt(c,j),k;if(N===null){for(;jj?(V=N,N=null):V=N.sibling;var b=m(c,N,A.value,S);if(b===null){N===null&&(N=V);break}e&&N&&b.alternate===null&&t(c,N),d=o(b,d,j),C===null?k=b:C.sibling=b,C=b,N=V}if(A.done)return n(c,N),K&&Kt(c,j),k;if(N===null){for(;!A.done;j++,A=h.next())A=p(c,A.value,S),A!==null&&(d=o(A,d,j),C===null?k=A:C.sibling=A,C=A);return K&&Kt(c,j),k}for(N=r(c,N);!A.done;j++,A=h.next())A=g(N,c,j,A.value,S),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?j:A.key),d=o(A,d,j),C===null?k=A:C.sibling=A,C=A);return e&&N.forEach(function(tt){return t(c,tt)}),K&&Kt(c,j),k}function E(c,d,h,S){if(typeof h=="object"&&h!==null&&h.type===Sn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case el:e:{for(var k=h.key,C=d;C!==null;){if(C.key===k){if(k=h.type,k===Sn){if(C.tag===7){n(c,C.sibling),d=l(C,h.props.children),d.return=c,c=d;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Yu(k)===C.type){n(c,C.sibling),d=l(C,h.props),d.ref=rr(c,C,h),d.return=c,c=d;break e}n(c,C);break}else t(c,C);C=C.sibling}h.type===Sn?(d=bt(h.props.children,c.mode,S,h.key),d.return=c,c=d):(S=Ol(h.type,h.key,h.props,null,c.mode,S),S.ref=rr(c,d,h),S.return=c,c=S)}return i(c);case wn:e:{for(C=h.key;d!==null;){if(d.key===C)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(c,d.sibling),d=l(d,h.children||[]),d.return=c,c=d;break e}else{n(c,d);break}else t(c,d);d=d.sibling}d=bo(h,c.mode,S),d.return=c,c=d}return i(c);case kt:return C=h._init,E(c,d,C(h._payload),S)}if(ar(h))return w(c,d,h,S);if(Zn(h))return v(c,d,h,S);fl(c,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(c,d.sibling),d=l(d,h),d.return=c,c=d):(n(c,d),d=Zo(h,c.mode,S),d.return=c,c=d),i(c)):n(c,d)}return E}var Bn=hf(!0),mf=hf(!1),Kl=Ht(null),ql=null,Nn=null,Ts=null;function js(){Ts=Nn=ql=null}function Ls(e){var t=Kl.current;Q(Kl),e._currentValue=t}function Ii(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 zn(e,t){ql=e,Ts=Nn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function We(e){var t=e._currentValue;if(Ts!==e)if(e={context:e,memoizedValue:t,next:null},Nn===null){if(ql===null)throw Error(x(308));Nn=e,ql.dependencies={lanes:0,firstContext:e}}else Nn=Nn.next=e;return t}var Jt=null;function As(e){Jt===null?Jt=[e]:Jt.push(e)}function yf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,As(t)):(n.next=l.next,l.next=n),t.interleaved=n,vt(e,r)}function vt(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 Ct=!1;function Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gf(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 mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,vt(e,n)}return l=r.interleaved,l===null?(t.next=t,As(r)):(t.next=l.next,l.next=t),r.interleaved=t,vt(e,n)}function xl(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,ws(e,n)}}function Zu(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 Xl(e,t,n,r){var l=e.updateQueue;Ct=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,a=u.next;u.next=null,i===null?o=a:i.next=a,i=u;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==i&&(s===null?f.firstBaseUpdate=a:s.next=a,f.lastBaseUpdate=u))}if(o!==null){var p=l.baseState;i=0,f=a=u=null,s=o;do{var m=s.lane,g=s.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,v=s;switch(m=t,g=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){p=w.call(g,p,m);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,m=typeof w=="function"?w.call(g,p,m):w,m==null)break e;p=J({},p,m);break e;case 2:Ct=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[s]:m.push(s))}else g={eventTime:g,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(a=f=g,u=p):f=f.next=g,i|=m;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;m=s,s=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(f===null&&(u=p),l.baseState=u,l.firstBaseUpdate=a,l.lastBaseUpdate=f,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);on|=i,e.lanes=i,e.memoizedState=p}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=qo.transition;qo.transition={};try{e(!1),t()}finally{B=n,qo.transition=r}}function Df(){return Qe().memoizedState}function bh(e,t,n){var r=It(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zf(e))Ff(t,n);else if(n=yf(e,t,n,r),n!==null){var l=Ee();be(n,e,r,l),If(n,t,r)}}function em(e,t,n){var r=It(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zf(e))Ff(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,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,et(s,i)){var u=t.interleaved;u===null?(l.next=l,As(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=yf(e,t,l,r),n!==null&&(l=Ee(),be(n,e,r,l),If(n,t,r))}}function zf(e){var t=e.alternate;return e===X||t!==null&&t===X}function Ff(e,t){gr=Gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function If(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ws(e,n)}}var Yl={readContext:We,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},tm={readContext:We,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:ta,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,Of.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rt();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=bh.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:ea,useDebugValue:Hs,useDeferredValue:function(e){return rt().memoizedState=e},useTransition:function(){var e=ea(!1),t=e[0];return e=Zh.bind(null,e[1]),rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,l=rt();if(K){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),se===null)throw Error(x(349));ln&30||Ef(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,ta(xf.bind(null,r,o,e),[e]),r.flags|=2048,Fr(9,_f.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=rt(),t=se.identifierPrefix;if(K){var n=ht,r=pt;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dr++,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[ot]=t,e[jr]=r,qf(e,t,!1,!1),t.stateNode=e;e:{switch(i=wi(n,r),n){case"dialog":W("cancel",e),W("close",e),l=r;break;case"iframe":case"object":case"embed":W("load",e),l=r;break;case"video":case"audio":for(l=0;lVn&&(t.flags|=128,r=!0,lr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Jl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!K)return me(t),null}else 2*Y()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,lr(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=Y(),t.sibling=null,n=q.current,H(q,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return Xs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function am(e,t){switch(Ns(t),t.tag){case 1:return Ne(t.type)&&Hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(),Q(Pe),Q(we),Is(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fs(t),null;case 13:if(Q(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(q),null;case 4:return $n(),null;case 10:return Ls(t.type._context),null;case 22:case 23:return Xs(),null;case 24:return null;default:return null}}var pl=!1,ge=!1,cm=typeof WeakSet=="function"?WeakSet:Set,T=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function Ki(e,t,n){try{n()}catch(r){G(e,t,r)}}var da=!1;function fm(e,t){if(Oi=Ul,e=bc(),Rs(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,s=-1,u=-1,a=0,f=0,p=e,m=null;t:for(;;){for(var g;p!==n||l!==0&&p.nodeType!==3||(s=i+l),p!==o||r!==0&&p.nodeType!==3||(u=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(g=p.firstChild)!==null;)m=p,p=g;for(;;){if(p===e)break t;if(m===n&&++a===l&&(s=i),m===o&&++f===r&&(u=i),(g=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=g}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ti={focusedElem:e,selectionRange:n},Ul=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,E=w.memoizedState,c=t.stateNode,d=c.getSnapshotBeforeUpdate(t.elementType===t.type?v:Je(t.type,v),E);c.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(S){G(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return w=da,da=!1,w}function vr(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&&Ki(t,n,o)}l=l.next}while(l!==r)}}function yo(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 qi(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 Gf(e){var t=e.alternate;t!==null&&(e.alternate=null,Gf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[jr],delete t[Ai],delete t[qh],delete t[Xh])),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 Yf(e){return e.tag===5||e.tag===3||e.tag===4}function pa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yf(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 Xi(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=$l));else if(r!==4&&(e=e.child,e!==null))for(Xi(e,t,n),e=e.sibling;e!==null;)Xi(e,t,n),e=e.sibling}function Ji(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(Ji(e,t,n),e=e.sibling;e!==null;)Ji(e,t,n),e=e.sibling}var ce=null,Ge=!1;function xt(e,t,n){for(n=n.child;n!==null;)Zf(e,t,n),n=n.sibling}function Zf(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(so,n)}catch{}switch(n.tag){case 5:ge||On(n,t);case 6:var r=ce,l=Ge;ce=null,xt(e,t,n),ce=r,Ge=l,ce!==null&&(Ge?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Ge?(e=ce,n=n.stateNode,e.nodeType===8?Wo(e.parentNode,n):e.nodeType===1&&Wo(e,n),Rr(e)):Wo(ce,n.stateNode));break;case 4:r=ce,l=Ge,ce=n.stateNode.containerInfo,Ge=!0,xt(e,t,n),ce=r,Ge=l;break;case 0:case 11:case 14:case 15:if(!ge&&(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||o&4)&&Ki(n,t,i),l=l.next}while(l!==r)}xt(e,t,n);break;case 1:if(!ge&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){G(n,t,s)}xt(e,t,n);break;case 21:xt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,xt(e,t,n),ge=r):xt(e,t,n);break;default:xt(e,t,n)}}function ha(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cm),t.forEach(function(r){var l=Sm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Y()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pm(r/1960))-r,10e?16:e,Ot===null)var r=!1;else{if(e=Ot,Ot=null,eo=0,M&6)throw Error(x(331));var l=M;for(M|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uY()-Ks?Zt(e,0):Qs|=n),Oe(e,t)}function id(e,t){t===0&&(e.mode&1?(t=ll,ll<<=1,!(ll&130023424)&&(ll=4194304)):t=1);var n=Ee();e=vt(e,t),e!==null&&(Hr(e,t,n),Oe(e,n))}function wm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function Sm(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(x(314))}r!==null&&r.delete(t),id(e,n)}var sd;sd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,sm(e,t,n);Re=!!(e.flags&131072)}else Re=!1,K&&t.flags&1048576&&ff(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rl(e,t),e=t.pendingProps;var l=Un(t,we.current);zn(t,n),l=Ms(null,t,r,e,l,n);var o=Bs();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,Ne(r)?(o=!0,Vl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ds(t),l.updater=mo,t.stateNode=l,l._reactInternals=t,Mi(t,r,e,n),t=Hi(null,t,r,!0,o,n)):(t.tag=0,K&&o&&Ps(t),Se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=_m(r),e=Je(r,e),l){case 0:t=$i(null,t,r,e,n);break e;case 1:t=aa(null,t,r,e,n);break e;case 11:t=sa(null,t,r,e,n);break e;case 14:t=ua(null,t,r,Je(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),$i(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),aa(e,t,r,l,n);case 3:e:{if(Wf(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,l=o.element,gf(e,t),Xl(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=Hn(Error(x(423)),t),t=ca(e,t,r,n,l);break e}else if(r!==l){l=Hn(Error(x(424)),t),t=ca(e,t,r,n,l);break e}else for(ze=Dt(t.stateNode.containerInfo.firstChild),Fe=t,K=!0,Ye=null,n=mf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),r===l){t=wt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return vf(t),e===null&&Fi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ji(r,l)?i=null:o!==null&&ji(r,o)&&(t.flags|=32),Vf(e,t),Se(e,t,i,n),t.child;case 6:return e===null&&Fi(t),null;case 13:return Qf(e,t,n);case 4:return zs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),sa(e,t,r,l,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(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,H(Kl,r._currentValue),r._currentValue=i,o!==null)if(et(o.value,i)){if(o.children===l.children&&!Pe.current){t=wt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=mt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ii(o.return,n,t),s.lanes|=n;break}u=u.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(x(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ii(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}Se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,zn(t,n),l=We(l),r=r(l),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,l=Je(r,t.pendingProps),l=Je(r.type,l),ua(e,t,r,l,n);case 15:return $f(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Je(r,l),Rl(e,t),t.tag=1,Ne(r)?(e=!0,Vl(t)):e=!1,zn(t,n),Uf(t,r,l),Mi(t,r,l,n),Hi(null,t,r,!0,e,n);case 19:return Kf(e,t,n);case 22:return Hf(e,t,n)}throw Error(x(156,t.tag))};function ud(e,t){return Dc(e,t)}function Em(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 He(e,t,n,r){return new Em(e,t,n,r)}function Gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _m(e){if(typeof e=="function")return Gs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ms)return 11;if(e===ys)return 14}return 2}function Ut(e,t){var n=e.alternate;return n===null?(n=He(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 Ol(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Gs(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Sn:return bt(n.children,l,o,t);case hs:i=8,l|=8;break;case ai:return e=He(12,n,t,l|2),e.elementType=ai,e.lanes=o,e;case ci:return e=He(13,n,t,l),e.elementType=ci,e.lanes=o,e;case fi:return e=He(19,n,t,l),e.elementType=fi,e.lanes=o,e;case gc:return vo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mc:i=10;break e;case yc:i=9;break e;case ms:i=11;break e;case ys:i=14;break e;case kt:i=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=He(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function bt(e,t,n,r){return e=He(7,e,r,t),e.lanes=n,e}function vo(e,t,n,r){return e=He(22,e,r,t),e.elementType=gc,e.lanes=n,e.stateNode={isHidden:!1},e}function Zo(e,t,n){return e=He(6,e,null,t),e.lanes=n,e}function bo(e,t,n){return t=He(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xm(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=Ao(0),this.expirationTimes=Ao(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ao(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ys(e,t,n,r,l,o,i,s,u){return e=new xm(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=He(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ds(o),e}function km(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dd)}catch(e){console.error(e)}}dd(),fc.exports=Ue;var Om=fc.exports,_a=Om;si.createRoot=_a.createRoot,si.hydrateRoot=_a.hydrateRoot;/**
+ * @remix-run/router v1.23.4
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Ur(){return Ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function pd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jm(){return Math.random().toString(36).substr(2,8)}function ka(e,t){return{usr:e.state,key:e.key,idx:t}}function es(e,t,n,r){return n===void 0&&(n=null),Ur({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xn(t):t,{state:n,key:t&&t.key||r||jm()})}function hd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Xn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Lm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,s=Tt.Pop,u=null,a=f();a==null&&(a=0,i.replaceState(Ur({},i.state,{idx:a}),""));function f(){return(i.state||{idx:null}).idx}function p(){s=Tt.Pop;let E=f(),c=E==null?null:E-a;a=E,u&&u({action:s,location:v.location,delta:c})}function m(E,c){s=Tt.Push;let d=es(v.location,E,c);a=f()+1;let h=ka(d,a),S=v.createHref(d);try{i.pushState(h,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;l.location.assign(S)}o&&u&&u({action:s,location:v.location,delta:1})}function g(E,c){s=Tt.Replace;let d=es(v.location,E,c);a=f();let h=ka(d,a),S=v.createHref(d);i.replaceState(h,"",S),o&&u&&u({action:s,location:v.location,delta:0})}function w(E){let c=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof E=="string"?E:hd(E);return d=d.replace(/ $/,"%20"),te(c,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,c)}let v={get action(){return s},get location(){return e(l,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(xa,p),u=E,()=>{l.removeEventListener(xa,p),u=null}},createHref(E){return t(l,E)},createURL:w,encodeLocation(E){let c=w(E);return{pathname:c.pathname,search:c.search,hash:c.hash}},push:m,replace:g,go(E){return i.go(E)}};return v}var Ca;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ca||(Ca={}));function Am(e,t,n){return n===void 0&&(n="/"),Dm(e,t,n)}function Dm(e,t,n,r){let l=typeof t=="string"?Xn(t):t,o=gd(l.pathname||"/",n);if(o==null)return null;let i=md(e);zm(i);let s=null,u=qm(o);for(let a=0;s==null&&a{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(te(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=en([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(te(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),md(o.children,t,f,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:Hm(a,o.index),routesMeta:f})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))l(o,i);else for(let u of yd(o.path))l(o,i,u)}),t}function yd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=yd(r.join("/")),s=[];return s.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&s.push(...i),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function zm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Vm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Fm=/^:[\w-]+$/,Im=3,Um=2,Mm=1,Bm=10,$m=-2,Ra=e=>e==="*";function Hm(e,t){let n=e.split("/"),r=n.length;return n.some(Ra)&&(r+=$m),t&&(r+=Um),n.filter(l=>!Ra(l)).reduce((l,o)=>l+(Fm.test(o)?Im:o===""?Mm:Bm),r)}function Vm(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function Wm(e,t,n){let{routesMeta:r}=e,l={},o="/",i=[];for(let s=0;s{let{paramName:m,isOptional:g}=f;if(m==="*"){let v=s[p]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const w=s[p];return g&&!w?a[m]=void 0:a[m]=(w||"").replace(/%2F/g,"/"),a},{}),pathname:o,pathnameBase:i,pattern:e}}function Km(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),pd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function qm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Xm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Xn(e):e,o;return n?(n=Sd(n),n.startsWith("/")?o=Pa(n.substring(1),"/"):o=Pa(n,t)):o=t,{pathname:o,search:Ym(r),hash:Zm(l)}}function Pa(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function ei(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Jm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vd(e,t){let n=Jm(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wd(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Xn(e):(l=Ur({},e),te(!l.pathname||!l.pathname.includes("?"),ei("?","pathname","search",l)),te(!l.pathname||!l.pathname.includes("#"),ei("#","pathname","hash",l)),te(!l.search||!l.search.includes("#"),ei("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,s;if(i==null)s=n;else{let p=t.length-1;if(!r&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),p-=1;l.pathname=m.join("/")}s=p>=0?t[p]:"/"}let u=Xm(l,s),a=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||f)&&(u.pathname+="/"),u}const Sd=e=>e.replace(/\/\/+/g,"/"),en=e=>Sd(e.join("/")),Gm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ym=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function bm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ed=["post","put","patch","delete"];new Set(Ed);const ey=["get",...Ed];new Set(ey);/**
+ * React Router v6.30.6
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),R.useCallback(function(a,f){if(f===void 0&&(f={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let p=wd(a,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:en([t,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[t,r,i,o,e])}function ly(e,t){return oy(e,t)}function oy(e,t,n,r){qr()||te(!1);let{navigator:l}=R.useContext(Kr),{matches:o}=R.useContext(pn),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let a=nu(),f;if(t){var p;let E=typeof t=="string"?Xn(t):t;u==="/"||(p=E.pathname)!=null&&p.startsWith(u)||te(!1),f=E}else f=a;let m=f.pathname||"/",g=m;if(u!=="/"){let E=u.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Am(e,{pathname:g}),v=cy(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:en([u,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:en([u,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&v?R.createElement(xo.Provider,{value:{location:Mr({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Tt.Pop}},v):v}function iy(){let e=hy(),t=bm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:l},n):null,null)}const sy=R.createElement(iy,null);class uy extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?R.createElement(pn.Provider,{value:this.props.routeContext},R.createElement(_d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ay(e){let{routeContext:t,match:n,children:r}=e,l=R.useContext(tu);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(pn.Provider,{value:t},r)}function cy(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=(l=n)==null?void 0:l.errors;if(s!=null){let f=i.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);f>=0||te(!1),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((f,p,m)=>{let g,w=!1,v=null,E=null;n&&(g=s&&p.route.id?s[p.route.id]:void 0,v=p.route.errorElement||sy,u&&(a<0&&m===0?(yy("route-fallback"),w=!0,E=null):a===m&&(w=!0,E=p.route.hydrateFallbackElement||null)));let c=t.concat(i.slice(0,m+1)),d=()=>{let h;return g?h=v:w?h=E:p.route.Component?h=R.createElement(p.route.Component,null):p.route.element?h=p.route.element:h=f,R.createElement(ay,{match:p,routeContext:{outlet:f,matches:c,isDataRoute:n!=null},children:h})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?R.createElement(uy,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}var kd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(kd||{}),Cd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cd||{});function fy(e){let t=R.useContext(tu);return t||te(!1),t}function dy(e){let t=R.useContext(ty);return t||te(!1),t}function py(e){let t=R.useContext(pn);return t||te(!1),t}function Rd(e){let t=py(),n=t.matches[t.matches.length-1];return n.route.id||te(!1),n.route.id}function hy(){var e;let t=R.useContext(_d),n=dy(),r=Rd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function my(){let{router:e}=fy(kd.UseNavigateStable),t=Rd(Cd.UseNavigateStable),n=R.useRef(!1);return xd(()=>{n.current=!0}),R.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Mr({fromRouteId:t},o)))},[e,t])}const Na={};function yy(e,t,n){Na[e]||(Na[e]=!0)}function gy(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Oa(e){let{to:t,replace:n,state:r,relative:l}=e;qr()||te(!1);let{future:o,static:i}=R.useContext(Kr),{matches:s}=R.useContext(pn),{pathname:u}=nu(),a=ny(),f=wd(t,vd(s,o.v7_relativeSplatPath),u,l==="path"),p=JSON.stringify(f);return R.useEffect(()=>a(JSON.parse(p),{replace:n,state:r,relative:l}),[a,p,l,n,r]),null}function ts(e){te(!1)}function vy(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Tt.Pop,navigator:o,static:i=!1,future:s}=e;qr()&&te(!1);let u=t.replace(/^\/*/,"/"),a=R.useMemo(()=>({basename:u,navigator:o,static:i,future:Mr({v7_relativeSplatPath:!1},s)}),[u,s,o,i]);typeof r=="string"&&(r=Xn(r));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:w="default"}=r,v=R.useMemo(()=>{let E=gd(f,u);return E==null?null:{location:{pathname:E,search:p,hash:m,state:g,key:w},navigationType:l}},[u,f,p,m,g,w,l]);return v==null?null:R.createElement(Kr.Provider,{value:a},R.createElement(xo.Provider,{children:n,value:v}))}function wy(e){let{children:t,location:n}=e;return ly(ns(t),n)}new Promise(()=>{});function ns(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,l)=>{if(!R.isValidElement(r))return;let o=[...t,l];if(r.type===R.Fragment){n.push.apply(n,ns(r.props.children,o));return}r.type!==ts&&te(!1),!r.props.index||!r.props.children||te(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=ns(r.props.children,o)),n.push(i)}),n}/**
+ * React Router DOM v6.30.6
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */const Sy="6";try{window.__reactRouterVersion=Sy}catch{}const Ey="startTransition",Ta=vp[Ey];function _y(e){let{basename:t,children:n,future:r,window:l}=e,o=R.useRef();o.current==null&&(o.current=Tm({window:l,v5Compat:!0}));let i=o.current,[s,u]=R.useState({action:i.action,location:i.location}),{v7_startTransition:a}=r||{},f=R.useCallback(p=>{a&&Ta?Ta(()=>u(p)):u(p)},[u,a]);return R.useLayoutEffect(()=>i.listen(f),[i,f]),R.useEffect(()=>gy(r),[r]),R.createElement(vy,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}var ja;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ja||(ja={}));var La;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(La||(La={}));function Pd(e,t){return function(){return e.apply(t,arguments)}}const{toString:xy}=Object.prototype,{getPrototypeOf:Wn}=Object,{iterator:Xr,toStringTag:Nd}=Symbol,ro=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Br=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),ro(n,t))return!0;n=Wn(n)}return!1},ky=(e,t)=>e!=null&&Br(e,t)?e[t]:void 0,ru=(e=>t=>{const n=xy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=e=>(e=e.toLowerCase(),t=>ru(t)===e),ko=e=>t=>typeof t===e,{isArray:un}=Array,an=ko("undefined");function Jn(e){return e!==null&&!an(e)&&e.constructor!==null&&!an(e.constructor)&&Te(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Od=Ke("ArrayBuffer");function Cy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Od(e.buffer),t}const Ry=ko("string"),Te=ko("function"),Td=ko("number"),Gn=e=>e!==null&&typeof e=="object",Py=e=>e===!0||e===!1,Tl=e=>{if(!Gn(e))return!1;const t=Wn(e);return(t===null||t===Object.prototype||Wn(t)===null)&&!Br(e,Nd)&&!Br(e,Xr)},Ny=e=>{if(!Gn(e)||Jn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Oy=Ke("Date"),Ty=Ke("File"),jy=e=>!!(e&&typeof e.uri<"u"),Ly=e=>e&&typeof e.getParts<"u",Ay=Ke("Blob"),Dy=Ke("FileList"),zy=Ke("Set"),Fy=e=>Gn(e)&&Te(e.pipe);function Iy(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Aa=Iy(),Da=typeof Aa.FormData<"u"?Aa.FormData:void 0,Uy=e=>{if(!e)return!1;if(Da&&e instanceof Da)return!0;const t=Wn(e);if(!t||t===Object.prototype||!Te(e.append))return!1;const n=ru(e);return n==="formdata"||n==="object"&&Te(e.toString)&&e.toString()==="[object FormData]"},My=Ke("URLSearchParams"),[By,$y,Hy,Vy]=["ReadableStream","Request","Response","Headers"].map(Ke),Wy=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,l;if(typeof e!="object"&&(e=[e]),un(e))for(r=0,l=e.length;r0;)if(l=n[r],t===l.toLowerCase())return l;return null}const Yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ld=e=>!an(e)&&e!==Yt;function rs(...e){const{caseless:t,skipUndefined:n}=Ld(this)&&this||{},r={},l=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=t&&typeof i=="string"&&jd(r,i)||i,u=ro(r,s)?r[s]:void 0;Tl(u)&&Tl(o)?r[s]=rs(u,o):Tl(o)?r[s]=rs({},o):un(o)?r[s]=o.slice():(!n||!an(o))&&(r[s]=o)};for(let o=0,i=e.length;o(Jr(t,(l,o)=>{n&&Te(l)?Object.defineProperty(e,o,{__proto__:null,value:Pd(l,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ky=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qy=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Xy=(e,t,n,r)=>{let l,o,i;const s={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),o=l.length;o-- >0;)i=l[o],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&Wn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jy=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Gy=e=>{if(!e)return null;if(un(e))return e;let t=e.length;if(!Td(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yy=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wn(Uint8Array)),Zy=(e,t)=>{const r=(e&&e[Xr]).call(e);let l;for(;(l=r.next())&&!l.done;){const o=l.value;t.call(e,o[0],o[1])}},by=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},eg=Ke("HTMLFormElement"),tg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,l){return r.toUpperCase()+l}),{propertyIsEnumerable:ng}=Object.prototype,rg=Ke("RegExp"),Ad=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jr(n,(l,o)=>{let i;(i=t(l,o,e))!==!1&&(r[o]=i||l)}),Object.defineProperties(e,r)},lg=e=>{Ad(e,(t,n)=>{if(Te(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Te(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},og=(e,t)=>{const n={},r=l=>{l.forEach(o=>{n[o]=!0})};return un(e)?r(e):r(String(e).split(t)),n},ig=()=>{},sg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ug(e){return!!(e&&Te(e.append)&&e[Nd]==="FormData"&&e[Xr])}const ag=e=>{const t=new WeakSet,n=r=>{if(Gn(r)){if(t.has(r))return;if(Jn(r))return r;if(!("toJSON"in r)){t.add(r);let l;if(zy(r)){l=[];for(const o of r){const i=n(o);!an(i)&&l.push(i)}}else l=un(r)?[]:{},Jr(r,(o,i)=>{const s=n(o);!an(s)&&(l[i]=s)});return t.delete(r),l}}return r};return n(e)},cg=Ke("AsyncFunction"),fg=e=>e&&(Gn(e)||Te(e))&&Te(e.then)&&Te(e.catch),Dd=((e,t)=>e?setImmediate:t?((n,r)=>(Yt.addEventListener("message",({source:l,data:o})=>{l===Yt&&o===n&&r.length&&r.shift()()},!1),l=>{r.push(l),Yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Te(Yt.postMessage)),dg=typeof queueMicrotask<"u"?queueMicrotask.bind(Yt):typeof process<"u"&&process.nextTick||Dd,zd=e=>e!=null&&Te(e[Xr]),pg=e=>e!=null&&Br(e,Xr)&&zd(e),y={isArray:un,isArrayBuffer:Od,isBuffer:Jn,isFormData:Uy,isArrayBufferView:Cy,isString:Ry,isNumber:Td,isBoolean:Py,isObject:Gn,isPlainObject:Tl,isEmptyObject:Ny,isReadableStream:By,isRequest:$y,isResponse:Hy,isHeaders:Vy,isUndefined:an,isDate:Oy,isFile:Ty,isReactNativeBlob:jy,isReactNative:Ly,isBlob:Ay,isRegExp:rg,isFunction:Te,isStream:Fy,isURLSearchParams:My,isTypedArray:Yy,isFileList:Dy,forEach:Jr,merge:rs,extend:Qy,trim:Wy,stripBOM:Ky,inherits:qy,toFlatObject:Xy,kindOf:ru,kindOfTest:Ke,endsWith:Jy,toArray:Gy,forEachEntry:Zy,matchAll:by,isHTMLForm:eg,hasOwnProperty:ro,hasOwnProp:ro,hasOwnInPrototypeChain:Br,getSafeProp:ky,reduceDescriptors:Ad,freezeMethods:lg,toObjectSet:og,toCamelCase:tg,noop:ig,toFiniteNumber:sg,findKey:jd,global:Yt,isContextDefined:Ld,isSpecCompliantForm:ug,toJSONObject:ag,isAsyncFn:cg,isThenable:fg,setImmediate:Dd,asap:dg,isIterable:zd,isSafeIterable:pg},hg=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mg=e=>{const t={};let n,r,l;return e&&e.split(`
+`).forEach(function(i){l=i.indexOf(":"),n=i.substring(0,l).trim().toLowerCase(),r=i.substring(l+1).trim();const s=y.hasOwnProp(t,n);!n||s&&y.hasOwnProp(hg,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function yg(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const gg=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),vg=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function lu(e,t){return y.isArray(e)?e.map(n=>lu(n,t)):yg(String(e).replace(t,""))}const wg=e=>lu(e,gg),Sg=e=>lu(e,vg);function Fd(e){const t=Object.create(null);return y.forEach(e.toJSON(),(n,r)=>{t[r]=Sg(n)}),t}const za=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function jl(e){return e===!1||e==null?e:y.isArray(e)?e.map(jl):wg(String(e))}function Eg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _g=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ti(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function xg(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function kg(e){const t=Object.create(null),n=String(e);let r=0,l=!1,o=!1;function i(s){const u=ti(n.slice(r,s)),a=u.indexOf("=");if(a<1)return;const f=ti(u.slice(0,a));if(!_g.test(f))return;const p=f.toLowerCase();if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=ti(u.slice(a+1));t[p]=xg(m)}for(let s=0;s/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ni(e,t,n,r,l){if(y.isFunction(r))return r.call(this,t,n);if(l&&(t=n),!!y.isString(t)){if(y.isString(r))return t.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(t)}}function Rg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Pg(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(l,o,i){return this[r].call(this,t,l,o,i)},configurable:!0})})}let ve=class{constructor(t){t&&this.set(t)}set(t,n,r){const l=this;function o(s,u,a){const f=ir(u);if(!f)return;const p=y.findKey(l,f);(!p||l[p]===void 0||a===!0||a===void 0&&l[p]!==!1)&&(l[p||u]=jl(s))}const i=(s,u)=>y.forEach(s,(a,f)=>o(a,f,u));if(y.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(y.isString(t)&&(t=t.trim())&&!Cg(t))i(mg(t),n);else if(y.isObject(t)&&y.isSafeIterable(t)){let s=Object.create(null),u,a;for(const f of t){if(!y.isArray(f))throw new TypeError("Object iterator must return a key-value pair");a=f[0],y.hasOwnProp(s,a)?(u=s[a],s[a]=y.isArray(u)?[...u,f[1]]:[u,f[1]]):s[a]=f[1]}i(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ir(t),t){const r=y.findKey(this,t);if(r){const l=this[r];if(!n)return l;if(n===!0)return Eg(l);if(y.isFunction(n))return n.call(this,l,r);if(y.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const r=y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ni(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let l=!1;function o(i){if(i=ir(i),i){const s=y.findKey(r,i);s&&(!n||ni(r,r[s],s,n))&&(delete r[s],l=!0)}}return y.isArray(t)?t.forEach(o):o(t),l}clear(t){const n=Object.keys(this);let r=n.length,l=!1;for(;r--;){const o=n[r];(!t||ni(this,this[o],o,t,!0))&&(delete this[o],l=!0)}return l}normalize(t){const n=this,r={};return y.forEach(this,(l,o)=>{const i=y.findKey(r,o);if(i){n[i]=jl(l),delete n[o];return}const s=t?Rg(o):String(o).trim();s!==o&&delete n[o],n[s]=jl(l),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=t&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
+`)}getSetCookie(){const t=this.get("set-cookie");return y.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return kg(t)}static concat(t,...n){const r=new this(t);return n.forEach(l=>r.set(l)),r}static accessor(t){const r=(this[za]=this[za]={accessors:{}}).accessors,l=this.prototype;function o(i){const s=ir(i);r[s]||(Pg(l,i),r[s]=!0)}return y.isArray(t)?t.forEach(o):o(t),this}};ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(ve.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});y.freezeMethods(ve);const lo="[REDACTED ****]";function Ng(e){if(y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Og(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],l=o=>{if(o===null||typeof o!="object"||y.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof ve&&(o=o.toJSON()),r.push(o);let i;if(y.isArray(o))i=[],o.forEach((s,u)=>{const a=l(s);y.isUndefined(a)||(i[u]=a)});else{if(!y.isPlainObject(o)&&Ng(o))return r.pop(),o;i=Object.create(null);for(const[s,u]of Object.entries(o)){const a=n.has(s.toLowerCase())?lo:l(u);y.isUndefined(a)||(i[s]=a)}}return r.pop(),i};return l(e)}function Fa(e){try{return String(e)}catch{return""}}function Tg(e){return e.errors.map(n=>{try{return n&&n.message?Fa(n.message):Fa(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let P=class Id extends Error{static from(t,n,r,l,o,i){let s=t.message;!s&&y.isArray(t.errors)&&t.errors.length&&(s=Tg(t));const u=new Id(s,n||t.code,r,l,o);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),i&&Object.assign(u,i),u}constructor(t,n,r,l,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),l&&(this.request=l),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&y.hasOwnProp(t,"redact")?t.redact:void 0,r=y.isArray(n)&&n.length>0?Og(t,n):y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};P.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";P.ERR_BAD_OPTION="ERR_BAD_OPTION";P.ECONNABORTED="ECONNABORTED";P.ETIMEDOUT="ETIMEDOUT";P.ECONNREFUSED="ECONNREFUSED";P.ERR_NETWORK="ERR_NETWORK";P.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";P.ERR_DEPRECATED="ERR_DEPRECATED";P.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";P.ERR_BAD_REQUEST="ERR_BAD_REQUEST";P.ERR_CANCELED="ERR_CANCELED";P.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";P.ERR_INVALID_URL="ERR_INVALID_URL";P.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const jg=null,Ud=100;function ls(e){return y.isPlainObject(e)||y.isArray(e)}function Md(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function ri(e,t,n){return e?e.concat(t).map(function(l,o){return l=Md(l),!n&&o?"["+l+"]":l}).join(n?".":""):t}function Lg(e){return y.isArray(e)&&!e.some(ls)}const Ag=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function Co(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,h){return!y.isUndefined(h[d])});const r=n.metaTokens,l=n.visitor||w,o=n.dots,i=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?Ud:n.maxDepth,a=s&&y.isSpecCompliantForm(t),f=[];if(!y.isFunction(l))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(y.isDate(c))return c.toISOString();if(y.isBoolean(c))return c.toString();if(!a&&y.isBlob(c))throw new P("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(c)||y.isTypedArray(c)){if(a&&typeof s=="function")return new s([c]);throw new P("Blob is not supported. Use a Buffer instead.",P.ERR_NOT_SUPPORT)}return c}function m(c){if(c>u)throw new P("Object is too deeply nested ("+c+" levels). Max depth: "+u,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(c,d){if(u===1/0)return JSON.stringify(c);const h=[];return JSON.stringify(c,function(k,C){if(!y.isObject(C))return C;for(;h.length&&h[h.length-1]!==this;)h.pop();return h.push(C),m(d+h.length-1),C})}function w(c,d,h){let S=c;if(y.isReactNative(t)&&y.isReactNativeBlob(c))return t.append(ri(h,d,o),p(c)),!1;if(c&&!h&&typeof c=="object"){if(y.endsWith(d,"{}"))d=r?d:d.slice(0,-2),c=g(c,1);else if(y.isArray(c)&&Lg(c)||(y.isFileList(c)||y.endsWith(d,"[]"))&&(S=y.toArray(c)))return d=Md(d),S.forEach(function(C,N){!(y.isUndefined(C)||C===null)&&t.append(i===!0?ri([d],N,o):i===null?d:d+"[]",p(C))}),!1}return ls(c)?!0:(t.append(ri(h,d,o),p(c)),!1)}const v=Object.assign(Ag,{defaultVisitor:w,convertValue:p,isVisitable:ls});function E(c,d,h=0){if(!y.isUndefined(c)){if(m(h),f.indexOf(c)!==-1)throw new Error("Circular reference detected in "+d.join("."));f.push(c),y.forEach(c,function(k,C){(!(y.isUndefined(k)||k===null)&&l.call(t,k,y.isString(C)?C.trim():C,d,v))===!0&&E(k,d?d.concat(C):[C],h+1)}),f.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Ia(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ou(e,t){this._pairs=[],e&&Co(e,this,t)}const Bd=ou.prototype;Bd.append=function(t,n){this._pairs.push([t,n])};Bd.toString=function(t){const n=t?r=>t.call(this,r,Ia):Ia;return this._pairs.map(function(l){return n(l[0])+"="+n(l[1])},"").join("&")};function Dg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $d(e,t,n){if(!t)return e;e=e||"";const r=y.isFunction(n)?{serialize:n}:n,l=y.getSafeProp(r,"encode")||Dg,o=y.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=y.isURLSearchParams(t)?t.toString():new ou(t,r).toString(l),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ua{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const iu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},zg=typeof URLSearchParams<"u"?URLSearchParams:ou,Fg=typeof FormData<"u"?FormData:null,Ig=typeof Blob<"u"?Blob:null,Ug={isBrowser:!0,classes:{URLSearchParams:zg,FormData:Fg,Blob:Ig},protocols:["http","https","file","blob","url","data"]},su=typeof window<"u"&&typeof document<"u",os=typeof navigator=="object"&&navigator||void 0,Mg=su&&(!os||["ReactNative","NativeScript","NS"].indexOf(os.product)<0),Bg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$g=su&&window.location.href||"http://localhost",Hg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:su,hasStandardBrowserEnv:Mg,hasStandardBrowserWebWorkerEnv:Bg,navigator:os,origin:$g},Symbol.toStringTag,{value:"Module"})),fe={...Hg,...Ug};function Vg(e,t){return Co(e,new fe.classes.URLSearchParams,{visitor:function(n,r,l,o){return fe.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Ma=Ud;function Hd(e){if(e>Ma)throw new P("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ma,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Wg(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Hd(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Qg(e){const t={},n=Object.keys(e);let r;const l=n.length;let o;for(r=0;r=n.length;return i=!i&&y.isArray(l)?l.length:i,u?(y.hasOwnProp(l,i)?l[i]=y.isArray(l[i])?l[i].concat(r):[l[i],r]:l[i]=r,!s):((!y.hasOwnProp(l,i)||!y.isObject(l[i]))&&(l[i]=[]),t(n,r,l[i],o)&&y.isArray(l[i])&&(l[i]=Qg(l[i])),!s)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,l)=>{t(Wg(r),l,n,0)}),n}return null}const gn=(e,t)=>e!=null&&y.hasOwnProp(e,t)?e[t]:void 0;function Kg(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gr={transitional:iu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",l=r.indexOf("application/json")>-1,o=y.isObject(t);if(o&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return l?JSON.stringify(Vd(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const u=gn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vg(t,u).toString();if((s=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=gn(this,"env"),f=a&&a.FormData;return Co(s?{"files[]":t}:t,f&&new f,u)}}return o||l?(n.setContentType("application/json",!1),Kg(t)):t}],transformResponse:[function(t){const n=gn(this,"transitional")||Gr.transitional,r=n&&n.forcedJSONParsing,l=gn(this,"responseType"),o=l==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!l||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,gn(this,"parseReviver"))}catch(u){if(s)throw u.name==="SyntaxError"?P.from(u,P.ERR_BAD_RESPONSE,this,null,gn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],e=>{Gr.headers[e]={}});function li(e,t){const n=this||Gr,r=t||n,l=ve.from(r.headers);let o=r.data;return y.forEach(e,function(s){o=s.call(n,o,l.normalize(),t?t.status:void 0)}),l.normalize(),o}function Wd(e){return!!(e&&e.__CANCEL__)}let Yr=class extends P{constructor(t,n,r){super(t??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Qd(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new P("Request failed with status code "+n.status,n.status>=400&&n.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,n.config,n.request,n))}function qg(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Xg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let l=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),f=r[o];i||(i=a),n[l]=u,r[l]=a;let p=o,m=0;for(;p!==l;)m+=n[p++],p=p%e;if(l=(l+1)%e,l===o&&(o=(o+1)%e),a-i{n=f,l=null,o&&(clearTimeout(o),o=null),e(...a)};return[(...a)=>{const f=Date.now(),p=f-n;p>=r?i(a,f):(l=a,o||(o=setTimeout(()=>{o=null,i(l)},r-p)))},()=>l&&i(l)]}const oo=(e,t,n=3)=>{let r=0;const l=Xg(50,250);return Jg(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=Math.max(0,s!=null?Math.min(i,s):i),a=Math.max(0,u-r),f=l(a);r=Math.max(r,u);const p={loaded:u,total:s,progress:s?u/s:void 0,bytes:a,rate:f||void 0,estimated:f&&s?(s-u)/f:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(p)},n)},Ba=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$a=(e,t=y.asap)=>(...n)=>t(()=>e(...n)),Gg=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Yg=fe.hasStandardBrowserEnv?{write(e,t,n,r,l,o,i){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];y.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),y.isString(r)&&s.push(`path=${r}`),y.isString(l)&&s.push(`domain=${l}`),o===!0&&s.push("secure"),y.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const ev=/^https?:(?!\/\/)/i,tv=/[\t\n\r]/g;function nv(e){let t=0;for(;t`${n}${r}${lo}`)}function ov(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${lo}@`),n=t.indexOf("#"),l=(n===-1?t:t.slice(0,n)).replace(/([?&][^=]*=)[^]*/g,`$1${lo}`);return n===-1?l:`${l}#${lv(t.slice(n+1))}`}function Ha(e,t){if(typeof e=="string"){const n=rv(e);if(ev.test(n))throw new P(`Invalid URL ${JSON.stringify(ov(n))}: missing "//" after protocol`,P.ERR_INVALID_URL,t)}}function Kd(e,t,n,r){Ha(t,r);let l=!Zg(t);return e&&(l||n===!1)?(Ha(e,r),bg(e,t)):t}const Va=e=>e instanceof ve?{...e}:e,iv=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function cn(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,p,m,g){return y.isPlainObject(f)&&y.isPlainObject(p)?y.merge.call({caseless:g},f,p):y.isPlainObject(p)?y.merge({},p):y.isArray(p)?p.slice():p}function l(f,p,m,g){if(y.isUndefined(p)){if(!y.isUndefined(f))return r(void 0,f,m,g)}else return r(f,p,m,g)}function o(f,p){if(!y.isUndefined(p))return r(void 0,p)}function i(f,p){if(y.isUndefined(p)){if(!y.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function s(f){const p=y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!y.isUndefined(p))if(y.isPlainObject(p)){if(y.hasOwnProp(p,f))return p[f]}else return;const m=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(y.isPlainObject(m)&&y.hasOwnProp(m,f))return m[f]}function u(f,p,m){if(y.hasOwnProp(t,m))return r(f,p);if(y.hasOwnProp(e,m))return r(void 0,f)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:u,headers:(f,p,m)=>l(Va(f),Va(p),m,!0)};return y.forEach(iv({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=y.hasOwnProp(a,p)?a[p]:l,g=y.hasOwnProp(e,p)?e[p]:void 0,w=y.hasOwnProp(t,p)?t[p]:void 0,v=m(g,w,p);y.isUndefined(v)&&m!==u||(n[p]=v)}),y.hasOwnProp(t,"validateStatus")&&y.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const sv=["content-type","content-length"];function uv(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,l])=>{sv.includes(r.toLowerCase())&&e.set(r,l)})}const av=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function qd(e){const t=cn({},e),n=m=>y.hasOwnProp(t,m)?t[m]:void 0,r=n("data");let l=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let s=n("headers");const u=n("auth"),a=n("baseURL"),f=n("allowAbsoluteUrls"),p=n("url");if(t.headers=s=ve.from(s),t.url=$d(Kd(a,p,f,t),n("params"),n("paramsSerializer")),u){const m=y.getSafeProp(u,"username")||"",g=y.getSafeProp(u,"password")||"";try{s.set("Authorization","Basic "+btoa(m+":"+(g?av(g):"")))}catch(w){throw P.from(w,P.ERR_BAD_OPTION_VALUE,e)}}if(y.isFormData(r)&&(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv||y.isReactNative(r)?s.setContentType(void 0):y.isFunction(r.getHeaders)&&uv(s,r.getHeaders(),n("formDataHeaderPolicy"))),fe.hasStandardBrowserEnv&&(y.isFunction(l)&&(l=l(t)),l===!0||l==null&&Gg(t.url))){const g=o&&i&&Yg.read(i);g&&s.set(o,g)}return t}const cv=typeof XMLHttpRequest<"u",fv=cv&&function(e){return new Promise(function(n,r){const l=qd(e);let o=l.data;const i=ve.from(l.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:a}=l,f,p,m,g,w;function v(){g&&g(),w&&w(),l.cancelToken&&l.cancelToken.unsubscribe(f),l.signal&&l.signal.removeEventListener("abort",f)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function c(){if(!E)return;const h=ve.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:h,config:e,request:E};Qd(function(N){n(N),v()},function(N){r(N),v()},k),E=null}"onloadend"in E?E.onloadend=c:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.startsWith("file:"))||setTimeout(c)},E.onabort=function(){E&&(r(new P("Request aborted",P.ECONNABORTED,e,E)),v(),E=null)},E.onerror=function(S){const k=S&&S.message?S.message:"Network Error",C=new P(k,P.ERR_NETWORK,e,E);C.event=S||null,r(C),v(),E=null},E.ontimeout=function(){let S=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const k=l.transitional||iu;l.timeoutErrorMessage&&(S=l.timeoutErrorMessage),r(new P(S,k.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,E)),v(),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&y.forEach(Fd(i),function(S,k){E.setRequestHeader(k,S)}),y.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),s&&s!=="json"&&(E.responseType=l.responseType),a&&([m,w]=oo(a,!0),E.addEventListener("progress",m)),u&&E.upload&&([p,g]=oo(u),E.upload.addEventListener("progress",p),E.upload.addEventListener("loadend",g)),(l.cancelToken||l.signal)&&(f=h=>{E&&(r(!h||h.type?new Yr(null,e,E):h),E.abort(),v(),E=null)},l.cancelToken&&l.cancelToken.subscribe(f),l.signal&&(l.signal.aborted?f():l.signal.addEventListener("abort",f)));const d=qg(l.url);if(d&&!fe.protocols.includes(d)){r(new P("Unsupported protocol "+d+":",P.ERR_BAD_REQUEST,e)),v();return}E.send(o||null)})},dv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const l=function(u){if(!r){r=!0,i();const a=u instanceof Error?u:this.reason;n.abort(a instanceof P?a:new Yr(a instanceof Error?a.message:a))}};let o=t&&setTimeout(()=>{o=null,l(new P(`timeout of ${t}ms exceeded`,P.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(l):u.removeEventListener("abort",l)}),e=null)};e.forEach(u=>{if(!r){if(u.aborted){l.call(u);return}u.addEventListener("abort",l,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>y.asap(i),s},pv=function*(e,t){let n=e.byteLength;if(n{const l=hv(e,t);let o=0,i,s=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:f}=await l.next();if(a){s(),u.close();return}let p=f.byteLength;if(n){let m=o+=p;n(m)}u.enqueue(new Uint8Array(f))}catch(a){throw s(a),a}},cancel(u){return s(u),l.return()}},{highWaterMark:2})},Qa=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Xd=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,yv=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,gv=e=>e===9||e===10||e===12||e===13||e===32,vv=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},wv=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Sv=e=>{const t=e.length;let n=0,r=0,l=!1;for(let o=0;o0){l=!0;continue}n++}}return l||r>2||r>0&&(n+r)%4!==0||n%4===1?wv(e):vv(n)},Ev=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),l=e.slice(n+1);if(/;base64/i.test(r))return t(l);let i=0;for(let s=0,u=l.length;s=55296&&a<=56319&&s+1=56320&&f<=57343?(i+=4,s++):i+=3}else i+=3}return i};function _v(e){const t=typeof e=="string"?e.indexOf("#"):-1;return Ev(t===-1?e:e.slice(0,t),Sv)}const uu="1.19.0",qa=64*1024,{isFunction:yl}=y,xv=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Xa=e=>{if(!y.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Ja=(e,...t)=>{try{return!!e(...t)}catch{return!1}},kv=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Cv=e=>{const t=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:l,Request:o,Response:i}=e,s=l?yl(l):typeof fetch=="function",u=yl(o),a=yl(i);if(!s)return!1;const f=s&&yl(n),p=s&&(typeof r=="function"?(c=>d=>c.encode(d))(new r):async c=>new Uint8Array(await new o(c).arrayBuffer())),m=u&&f&&Ja(()=>{let c=!1;const d=new o(fe.origin,{body:new n,method:"POST",get duplex(){return c=!0,"half"}}),h=d.headers.has("Content-Type");return d.body!=null&&d.body.cancel(),c&&!h}),g=a&&f&&Ja(()=>y.isReadableStream(new i("").body)),w={stream:g&&(c=>c.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(c=>{!w[c]&&(w[c]=(d,h)=>{let S=d&&d[c];if(S)return S.call(d);throw new P(`Response type '${c}' is not supported`,P.ERR_NOT_SUPPORT,h)})});const v=async c=>{if(c==null)return 0;if(y.isBlob(c))return c.size;if(y.isSpecCompliantForm(c))return(await new o(fe.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(y.isArrayBufferView(c)||y.isArrayBuffer(c))return c.byteLength;if(y.isURLSearchParams(c)&&(c=c+""),y.isString(c))return(await p(c)).byteLength},E=async(c,d)=>{const h=y.toFiniteNumber(c.getContentLength());return h??v(d)};return async c=>{let{url:d,method:h,data:S,signal:k,cancelToken:C,timeout:N,onDownloadProgress:j,onUploadProgress:V,responseType:A,headers:b,withCredentials:tt="same-origin",fetchOptions:Et,maxContentLength:je,maxBodyLength:hn}=qd(c);const ut=y.isNumber(je)&&je>-1,Wt=y.isNumber(hn)&&hn>-1,O=U=>y.hasOwnProp(c,U)?c[U]:void 0;let D=l||fetch;A=A?(A+"").toLowerCase():"text";let L=dv([k,C&&C.toAbortSignal()],N),F=null;const $=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let qe,Le=null;const mn=()=>new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,c,F);try{let U;const ue=O("auth");if(ue){const z=y.getSafeProp(ue,"username")||"",Ae=y.getSafeProp(ue,"password")||"";U={username:z,password:Ae}}if(kv(d)){const z=new URL(d,fe.origin);if(!U&&(z.username||z.password)){const Ae=Xa(z.username),_t=Xa(z.password);U={username:Ae,password:_t}}(z.username||z.password)&&(z.username="",z.password="",d=z.href)}if(U&&(b.delete("authorization"),b.set("Authorization","Basic "+btoa(xv((U.username||"")+":"+(U.password||""))))),ut&&typeof d=="string"&&d.startsWith("data:")&&_v(d)>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F);if(Wt&&h!=="get"&&h!=="head"){const z=await v(S);if(typeof z=="number"&&isFinite(z)&&(qe=z,z>hn))throw mn()}const Zr=Wt&&(y.isReadableStream(S)||y.isStream(S)),cu=(z,Ae,_t)=>Wa(z,qa,Qt=>{if(Wt&&Qt>hn)throw Le=mn();Ae&&Ae(Qt)},_t);if(m&&h!=="get"&&h!=="head"&&(V||Zr)){if(qe=qe??await E(b,S),qe!==0||Zr){let z=new o(d,{method:"POST",body:S,duplex:"half"}),Ae;if(y.isFormData(S)&&(Ae=z.headers.get("content-type"))&&b.setContentType(Ae),z.body){const[_t,Qt]=V&&Ba(qe,oo($a(V)))||[];S=cu(z.body,_t,Qt)}}}else if(Zr&&!u&&f&&h!=="get"&&h!=="head")S=cu(S);else if(Zr&&u&&!m&&h!=="get"&&h!=="head")throw new P("Stream request bodies are not supported by the current fetch implementation",P.ERR_NOT_SUPPORT,c,F);y.isString(tt)||(tt=tt?"include":"omit");const bd=u&&"credentials"in o.prototype;if(y.isFormData(S)){const z=b.getContentType();z&&/^multipart\/form-data/i.test(z)&&!/boundary=/i.test(z)&&b.delete("content-type")}b.set("User-Agent","axios/"+uu,!1);const fu={...Et,signal:L,method:h.toUpperCase(),headers:Fd(b.normalize()),body:S,duplex:"half",credentials:bd?tt:void 0};F=u&&new o(d,fu);let at=await(u?D(F,Et):D(d,fu));const du=ve.from(at.headers);if(ut){const z=y.toFiniteNumber(du.getContentLength());if(z!=null&&z>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F)}const Po=g&&(A==="stream"||A==="response");if(g&&at.body&&(j||ut||Po&&$)){const z={};["status","statusText","headers"].forEach(Yn=>{z[Yn]=at[Yn]});const Ae=y.toFiniteNumber(du.getContentLength()),[_t,Qt]=j&&Ba(Ae,oo($a(j),!0))||[];let pu=0;const ep=Yn=>{if(ut&&(pu=Yn,pu>je))throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F);_t&&_t(Yn)};at=new i(Wa(at.body,qa,ep,()=>{Qt&&Qt(),$&&$()}),z)}A=A||"text";let ct=await w[y.findKey(w,A)||"text"](at,c);if(ut&&!g&&!Po){let z;if(ct!=null&&(typeof ct.byteLength=="number"?z=ct.byteLength:typeof ct.size=="number"?z=ct.size:typeof ct=="string"&&(z=typeof r=="function"?new r().encode(ct).byteLength:ct.length)),typeof z=="number"&&z>je)throw new P("maxContentLength size of "+je+" exceeded",P.ERR_BAD_RESPONSE,c,F)}return!Po&&$&&$(),await new Promise((z,Ae)=>{Qd(z,Ae,{data:ct,headers:ve.from(at.headers),status:at.status,statusText:at.statusText,config:c,request:F})})}catch(U){if($&&$(),L&&L.aborted&&L.reason instanceof P){const ue=L.reason;throw ue.config=c,F&&(ue.request=F),U!==ue&&Object.defineProperty(ue,"cause",{__proto__:null,value:U,writable:!0,enumerable:!1,configurable:!0}),ue}if(Le)throw F&&!Le.request&&(Le.request=F),Le;if(U instanceof P)throw F&&!U.request&&(U.request=F),U;if(U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)){const ue=new P("Network Error",P.ERR_NETWORK,c,F,U&&U.response);throw Object.defineProperty(ue,"cause",{__proto__:null,value:U.cause||U,writable:!0,enumerable:!1,configurable:!0}),ue}throw P.from(U,U&&U.code,c,F,U&&U.response)}}},Rv=new Map,Jd=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:l}=t,o=[r,l,n];let i=o.length,s=i,u,a,f=Rv;for(;s--;)u=o[s],a=f.get(u),a===void 0&&f.set(u,a=s?new Map:Cv(t)),f=a;return a};Jd();const au={http:jg,xhr:fv,fetch:{get:Jd}};y.forEach(au,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ga=e=>`- ${e}`,Pv=e=>y.isFunction(e)||e===null||e===!1;function Nv(e,t){e=y.isArray(e)?e:[e];const{length:n}=e;let r,l;const o={};for(let i=0;i`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let s=n?i.length>1?`since :
+`+i.map(Ga).join(`
+`):" "+Ga(i[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+s,P.ERR_NOT_SUPPORT)}return l}const Gd={getAdapter:Nv,adapters:au};function oi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yr(null,e)}function ii(e){return oi(e),e.headers=ve.from(e.headers),e.data=li.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gd.getAdapter(e.adapter||Gr.adapter,e)(e).then(function(r){oi(e),e.response=r;try{r.data=li.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=ve.from(r.headers),r},function(r){if(!Wd(r)&&(oi(e),r&&r.response)){e.response=r.response;try{r.response.data=li.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=ve.from(r.response.headers)}return Promise.reject(r)})}const Ro={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ro[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ya={};Ro.transitional=function(t,n,r){function l(o,i){return"[Axios v"+uu+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,s)=>{if(t===!1)throw new P(l(i," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!Ya[i]&&(Ya[i]=!0,console.warn(l(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,s):!0}};Ro.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ov(e,t,n){if(typeof e!="object"||e===null)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let l=r.length;for(;l-- >0;){const o=r[l],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const s=e[o],u=s===void 0||i(s,o,e);if(u!==!0)throw new P("option "+o+" must be "+u,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+o,P.ERR_BAD_OPTION)}}const Ll={assertOptions:Ov,validators:Ro},ye=Ll.validators;let tn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ua,response:new Ua}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const o=(()=>{if(!l.stack)return"";const i=l.stack.indexOf(`
+`);return i===-1?"":l.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
+`),s=i===-1?-1:o.indexOf(`
+`,i+1),u=s===-1?"":o.slice(s+1);String(r.stack).endsWith(u)||(r.stack+=`
+`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cn(this.defaults,n);const{transitional:r,paramsSerializer:l,headers:o}=n;r!==void 0&&Ll.assertOptions(r,{silentJSONParsing:ye.transitional(ye.boolean),forcedJSONParsing:ye.transitional(ye.boolean),clarifyTimeoutError:ye.transitional(ye.boolean),legacyInterceptorReqResOrdering:ye.transitional(ye.boolean),advertiseZstdAcceptEncoding:ye.transitional(ye.boolean),validateStatusUndefinedResolves:ye.transitional(ye.boolean)},!1),l!=null&&(y.isFunction(l)?n.paramsSerializer={serialize:l}:Ll.assertOptions(l,{encode:ye.function,serialize:ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ll.assertOptions(n,{baseUrl:ye.spelling("baseURL"),withXsrfToken:ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&y.merge(o.common,o[n.method]);o&&y.forEach(["delete","get","head","post","put","patch","query","common"],w=>{delete o[w]}),n.headers=ve.concat(i,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;u=u&&v.synchronous;const E=n.transitional||iu;E&&E.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});const a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!u){const w=[ii.bind(this),void 0];for(w.unshift(...s),w.push(...a),m=w.length,f=Promise.resolve(n);pii.call(this,g)))}catch(c){f=Promise.reject(c)}break}}if(!f)try{f=ii.call(this,g)}catch(w){f=Promise.reject(w)}for(p=0,m=a.length;p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](l);r._listeners=null}),this.promise.then=l=>{let o;const i=new Promise(s=>{r.subscribe(s),o=s}).then(l);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,s){r.reason||(r.reason=new Yr(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Yd(function(l){t=l}),cancel:t}}};function jv(e){return function(n){return e.apply(null,n)}}function Lv(e){return y.isObject(e)&&e.isAxiosError===!0}const is={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(is).forEach(([e,t])=>{is[t]=e});function Zd(e){const t=new tn(e),n=Pd(tn.prototype.request,t);return y.extend(n,tn.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(l){return Zd(cn(e,l))},n}const Z=Zd(Gr);Z.Axios=tn;Z.CanceledError=Yr;Z.CancelToken=Tv;Z.isCancel=Wd;Z.VERSION=uu;Z.toFormData=Co;Z.AxiosError=P;Z.Cancel=Z.CanceledError;Z.all=function(t){return Promise.all(t)};Z.spread=jv;Z.isAxiosError=Lv;Z.mergeConfig=cn;Z.AxiosHeaders=ve;Z.formToJSON=e=>Vd(y.isHTMLForm(e)?new FormData(e):e);Z.getAdapter=Gd.getAdapter;Z.HttpStatusCode=is;Z.default=Z;const{Axios:J0,AxiosError:G0,CanceledError:Y0,isCancel:Z0,CancelToken:b0,VERSION:e1,all:t1,Cancel:n1,isAxiosError:r1,spread:l1,toFormData:o1,AxiosHeaders:i1,HttpStatusCode:s1,formToJSON:u1,getAdapter:a1,mergeConfig:c1,create:f1}=Z,lt=Z.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});lt.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const Za={init:(e,t)=>lt.post("/init",{appName:e,password:t}),login:(e,t)=>lt.post("/login",{appName:e,password:t})},Av={getStats:()=>lt.get("/dashboard/stats")},sr={getAll:()=>lt.get("/keys"),generate:(e,t,n)=>lt.post("/keys/generate",{amount:e,days:t,prefix:n}),ban:e=>lt.post(`/keys/${e}/ban`),unban:e=>lt.post(`/keys/${e}/unban`),delete:e=>lt.delete(`/keys/${e}`),getFingerprint:e=>lt.get(`/keys/${e}/fingerprint`)},Dv="_container_abujx_1",zv="_scanlines_abujx_11",Fv="_card_abujx_25",Iv="_header_abujx_36",Uv="_logo_abujx_40",Mv="_logoIcon_abujx_47",Bv="_title_abujx_58",$v="_subtitle_abujx_65",Hv="_form_abujx_70",Vv="_field_abujx_76",Wv="_label_abujx_82",Qv="_input_abujx_88",Kv="_submit_abujx_109",qv="_toggle_abujx_134",Xv="_error_abujx_145",le={container:Dv,scanlines:zv,card:Fv,header:Iv,logo:Uv,logoIcon:Mv,title:Bv,subtitle:$v,form:Hv,field:Vv,label:Wv,input:Qv,submit:Kv,toggle:qv,error:Xv};function Jv({onLogin:e}){const[t,n]=R.useState(!1),[r,l]=R.useState(""),[o,i]=R.useState(""),[s,u]=R.useState(""),[a,f]=R.useState(!1),p=async m=>{var g,w;m.preventDefault(),u(""),f(!0);try{const v=t?await Za.init(r,o):await Za.login(r,o);t?(n(!1),u("Admin initialized. Please log in."),i("")):(localStorage.setItem("appName",r),e(v.data.token))}catch(v){u(((w=(g=v.response)==null?void 0:g.data)==null?void 0:w.error)||"An error occurred")}finally{f(!1)}};return _.jsxs("div",{className:le.container,children:[_.jsxs("div",{className:le.card,children:[_.jsxs("div",{className:le.header,children:[_.jsxs("div",{className:le.logo,children:[_.jsx("div",{className:le.logoIcon,children:"⚡"}),_.jsx("h1",{className:le.title,children:"YCPPlus"})]}),_.jsx("p",{className:le.subtitle,children:t?"Initialize Admin Account":"Authorization Management"})]}),_.jsxs("form",{onSubmit:p,className:le.form,children:[_.jsxs("div",{className:le.field,children:[_.jsx("label",{htmlFor:"appName",className:le.label,children:"Application Name"}),_.jsx("input",{id:"appName",type:"text",value:r,onChange:m=>l(m.target.value),className:le.input,placeholder:"MyApp",required:!0,autoFocus:!0})]}),_.jsxs("div",{className:le.field,children:[_.jsx("label",{htmlFor:"password",className:le.label,children:"Password"}),_.jsx("input",{id:"password",type:"password",value:o,onChange:m=>i(m.target.value),className:le.input,placeholder:"••••••••",required:!0})]}),s&&_.jsx("div",{className:le.error,children:s}),_.jsx("button",{type:"submit",className:le.submit,disabled:a,children:a?"Please wait...":t?"Initialize":"Sign In"}),_.jsx("button",{type:"button",className:le.toggle,onClick:()=>{n(!t),u("")},children:t?"Already have an account? Sign in":"First time? Initialize admin"})]})]}),_.jsx("div",{className:le.scanlines})]})}const Gv="_container_1iyjz_1",Yv="_header_1iyjz_6",Zv="_headerLeft_1iyjz_18",bv="_logo_1iyjz_24",e0="_logoIcon_1iyjz_30",t0="_appBadge_1iyjz_47",n0="_logout_1iyjz_56",r0="_main_1iyjz_68",l0="_stats_1iyjz_74",o0="_actions_1iyjz_81",i0="_primaryAction_1iyjz_88",s0="_secondaryAction_1iyjz_107",u0="_loading_1iyjz_123",a0="_spinner_1iyjz_133",ke={container:Gv,header:Yv,headerLeft:Zv,logo:bv,logoIcon:e0,appBadge:t0,logout:n0,main:r0,stats:l0,actions:o0,primaryAction:i0,secondaryAction:s0,loading:u0,spinner:a0},c0="_card_ce5lp_1",f0="_safe_ce5lp_20",d0="_alert_ce5lp_24",p0="_label_ce5lp_28",h0="_hint_ce5lp_40",m0="_value_ce5lp_48",vn={card:c0,safe:f0,alert:d0,label:p0,hint:h0,value:m0};function gl({label:e,value:t,variant:n="neutral",hint:r}){const l=vn[n]||vn.neutral;return _.jsxs("div",{className:`${vn.card} ${l}`,children:[_.jsxs("div",{className:vn.label,children:[e,r&&_.jsx("span",{className:vn.hint,children:r})]}),_.jsx("div",{className:vn.value,children:t})]})}const y0="_container_23vhe_1",g0="_tableWrapper_23vhe_8",v0="_table_23vhe_8",w0="_selected_23vhe_42",S0="_keyCode_23vhe_56",E0="_status_23vhe_65",_0="_date_23vhe_76",x0="_daysHint_23vhe_81",k0="_centered_23vhe_88",C0="_actions_23vhe_92",R0="_actionBtn_23vhe_97",P0="_danger_23vhe_113",N0="_empty_23vhe_118",O0="_emptyHint_23vhe_128",ae={container:y0,tableWrapper:g0,table:v0,selected:w0,keyCode:S0,status:E0,date:_0,daysHint:x0,centered:k0,actions:C0,actionBtn:R0,danger:P0,empty:N0,emptyHint:O0};function T0({keys:e,onBan:t,onUnban:n,onDelete:r}){const[l,o]=R.useState(null),i=a=>{switch(a){case"active":return"var(--cipher-safe)";case"expired":return"var(--text-dim)";case"banned":return"var(--cipher-alert)";default:return"var(--text-dim)"}},s=a=>a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—",u=a=>a<0?"Expired":a===0?"Today":a===1?"1 day":`${a} days`;return e.length===0?_.jsxs("div",{className:ae.empty,children:[_.jsx("p",{children:"No keys generated yet"}),_.jsx("p",{className:ae.emptyHint,children:'Click "Generate Keys" to create your first license key'})]}):_.jsx("div",{className:ae.container,children:_.jsx("div",{className:ae.tableWrapper,children:_.jsxs("table",{className:ae.table,children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Key"}),_.jsx("th",{children:"Status"}),_.jsx("th",{children:"Created"}),_.jsx("th",{children:"Expires"}),_.jsx("th",{children:"Logins"}),_.jsx("th",{children:"Actions"})]})}),_.jsx("tbody",{children:e.map(a=>_.jsxs("tr",{className:l===a.key?ae.selected:"",onClick:()=>o(a.key===l?null:a.key),children:[_.jsx("td",{children:_.jsx("code",{className:ae.keyCode,children:a.key})}),_.jsx("td",{children:_.jsx("span",{className:ae.status,style:{color:i(a.status),borderColor:i(a.status)},children:a.status})}),_.jsx("td",{className:ae.date,children:s(a.createdAt)}),_.jsxs("td",{className:ae.date,children:[s(a.expiresAt),_.jsx("span",{className:ae.daysHint,children:u(a.daysUntilExpiry)})]}),_.jsx("td",{className:ae.centered,children:a.loginCount}),_.jsx("td",{children:_.jsxs("div",{className:ae.actions,children:[a.status==="banned"?_.jsx("button",{onClick:f=>{f.stopPropagation(),n(a.key)},className:ae.actionBtn,title:"Unban",children:"Unban"}):_.jsx("button",{onClick:f=>{f.stopPropagation(),t(a.key)},className:ae.actionBtn,title:"Ban",children:"Ban"}),_.jsx("button",{onClick:f=>{f.stopPropagation(),r(a.key)},className:`${ae.actionBtn} ${ae.danger}`,title:"Delete",children:"Delete"})]})})]},a.key))})]})})})}const j0="_overlay_12ns8_1",L0="_modal_12ns8_23",A0="_header_12ns8_43",D0="_close_12ns8_57",z0="_form_12ns8_74",F0="_field_12ns8_78",I0="_hint_12ns8_92",U0="_input_12ns8_98",M0="_error_12ns8_115",B0="_actions_12ns8_125",$0="_cancel_12ns8_131",H0="_submit_12ns8_132",oe={overlay:j0,modal:L0,header:A0,close:D0,form:z0,field:F0,hint:I0,input:U0,error:M0,actions:B0,cancel:$0,submit:H0};function V0({onGenerate:e,onClose:t}){const[n,r]=R.useState(1),[l,o]=R.useState(30),[i,s]=R.useState(""),[u,a]=R.useState(!1),[f,p]=R.useState(""),m=async g=>{var w,v;if(g.preventDefault(),p(""),n<1||n>50){p("Amount must be between 1 and 50");return}if(l<1||l>9999){p("Days must be between 1 and 9999");return}a(!0);try{await e(n,l,i),t()}catch(E){p(((v=(w=E.response)==null?void 0:w.data)==null?void 0:v.error)||"Failed to generate keys")}finally{a(!1)}};return _.jsx("div",{className:oe.overlay,onClick:t,children:_.jsxs("div",{className:oe.modal,onClick:g=>g.stopPropagation(),children:[_.jsxs("div",{className:oe.header,children:[_.jsx("h2",{children:"Generate License Keys"}),_.jsx("button",{onClick:t,className:oe.close,children:"×"})]}),_.jsxs("form",{onSubmit:m,className:oe.form,children:[_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"amount",children:["Amount",_.jsx("span",{className:oe.hint,children:"1-50 keys"})]}),_.jsx("input",{id:"amount",type:"number",min:"1",max:"50",value:n,onChange:g=>r(parseInt(g.target.value)),className:oe.input,required:!0})]}),_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"days",children:["Validity Period (days)",_.jsx("span",{className:oe.hint,children:"1-9999 days"})]}),_.jsx("input",{id:"days",type:"number",min:"1",max:"9999",value:l,onChange:g=>o(parseInt(g.target.value)),className:oe.input,required:!0})]}),_.jsxs("div",{className:oe.field,children:[_.jsxs("label",{htmlFor:"prefix",children:["Custom Prefix",_.jsx("span",{className:oe.hint,children:"Optional, default: YCP"})]}),_.jsx("input",{id:"prefix",type:"text",value:i,onChange:g=>s(g.target.value.toUpperCase()),className:oe.input,placeholder:"YCP",maxLength:"10"})]}),f&&_.jsx("div",{className:oe.error,children:f}),_.jsxs("div",{className:oe.actions,children:[_.jsx("button",{type:"button",onClick:t,className:oe.cancel,children:"Cancel"}),_.jsx("button",{type:"submit",className:oe.submit,disabled:u,children:u?"Generating...":"Generate"})]})]})]})})}function W0({onLogout:e}){const[t,n]=R.useState(null),[r,l]=R.useState([]),[o,i]=R.useState(!0),[s,u]=R.useState(!1),a=localStorage.getItem("appName")||"Admin",f=async()=>{var v;try{const[E,c]=await Promise.all([Av.getStats(),sr.getAll()]);n(E.data),l(c.data)}catch(E){console.error("Failed to load data:",E),((v=E.response)==null?void 0:v.status)===401&&e()}finally{i(!1)}};R.useEffect(()=>{f()},[]);const p=async(v,E,c)=>{await sr.generate(v,E,c),await f()},m=async v=>{await sr.ban(v),await f()},g=async v=>{await sr.unban(v),await f()},w=async v=>{confirm(`Delete key ${v}?`)&&(await sr.delete(v),await f())};return o?_.jsxs("div",{className:ke.loading,children:[_.jsx("div",{className:ke.spinner}),_.jsx("p",{children:"Loading dashboard..."})]}):_.jsxs("div",{className:ke.container,children:[_.jsxs("header",{className:ke.header,children:[_.jsxs("div",{className:ke.headerLeft,children:[_.jsxs("div",{className:ke.logo,children:[_.jsx("div",{className:ke.logoIcon,children:"⚡"}),_.jsx("h1",{children:"YCPPlus"})]}),_.jsx("div",{className:ke.appBadge,children:a})]}),_.jsx("button",{onClick:e,className:ke.logout,children:"Sign Out"})]}),_.jsxs("main",{className:ke.main,children:[_.jsxs("section",{className:ke.stats,children:[_.jsx(gl,{label:"Total Keys",value:t.totalKeys,variant:"neutral"}),_.jsx(gl,{label:"Active",value:t.activeKeys,variant:"safe"}),_.jsx(gl,{label:"Expiring Soon",value:t.expiringSoon,variant:"alert",hint:"within 7 days"}),_.jsx(gl,{label:"Total Logins",value:t.totalLogins,variant:"neutral"})]}),_.jsxs("section",{className:ke.actions,children:[_.jsx("button",{onClick:()=>u(!0),className:ke.primaryAction,children:"Generate Keys"}),_.jsx("button",{onClick:f,className:ke.secondaryAction,children:"Refresh"})]}),_.jsx(T0,{keys:r,onBan:m,onUnban:g,onDelete:w})]}),s&&_.jsx(V0,{onGenerate:p,onClose:()=>u(!1)})]})}function Q0(){const[e,t]=R.useState(!1),[n,r]=R.useState(!0);R.useEffect(()=>{const i=localStorage.getItem("token");t(!!i),r(!1)},[]);const l=i=>{localStorage.setItem("token",i),t(!0)},o=()=>{localStorage.removeItem("token"),localStorage.removeItem("appName"),t(!1)};return n?_.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",color:"var(--text-dim)"},children:"Loading..."}):_.jsx(_y,{children:_.jsxs(wy,{children:[_.jsx(ts,{path:"/login",element:e?_.jsx(Oa,{to:"/",replace:!0}):_.jsx(Jv,{onLogin:l})}),_.jsx(ts,{path:"/",element:e?_.jsx(W0,{onLogout:o}):_.jsx(Oa,{to:"/login",replace:!0})})]})})}si.createRoot(document.getElementById("root")).render(_.jsx(ac.StrictMode,{children:_.jsx(Q0,{})}));
diff --git a/server_python/web/assets/index-mKCh-jFT.css b/server_python/web/assets/index-mKCh-jFT.css
new file mode 100644
index 0000000..0503e19
--- /dev/null
+++ b/server_python/web/assets/index-mKCh-jFT.css
@@ -0,0 +1 @@
+._container_abujx_1{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;position:relative;background:var(--vault-deep)}._scanlines_abujx_11{position:fixed;top:0;right:0;bottom:0;left:0;background:repeating-linear-gradient(0deg,rgba(255,255,255,.01) 0px,rgba(255,255,255,.01) 1px,transparent 1px,transparent 2px);pointer-events:none;opacity:.3}._card_abujx_25{position:relative;z-index:1;width:100%;max-width:420px;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:12px;padding:clamp(2rem,4vw,3rem)}._header_abujx_36{margin-bottom:2rem}._logo_abujx_40{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}._logoIcon_abujx_47{width:40px;height:40px;background:linear-gradient(135deg,var(--cipher-blue),var(--cipher-safe));border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:1.5rem}._title_abujx_58{font-size:clamp(1.5rem,3vw,2rem);font-weight:700;color:var(--text-primary);letter-spacing:-.02em}._subtitle_abujx_65{color:var(--text-dim);font-size:.9375rem}._form_abujx_70{display:flex;flex-direction:column;gap:1.25rem}._field_abujx_76{display:flex;flex-direction:column;gap:.5rem}._label_abujx_82{font-size:.875rem;font-weight:500;color:var(--text-primary)}._input_abujx_88{padding:.75rem 1rem;background:var(--vault-deep);border:1px solid var(--vault-border);border-radius:8px;color:var(--text-primary);font-size:.9375rem;transition:all .2s}._input_abujx_88:focus{outline:none;border-color:var(--cipher-blue);box-shadow:0 0 0 3px #4a90e21a}._input_abujx_88::placeholder{color:var(--text-dim);opacity:.5}._submit_abujx_109{margin-top:.5rem;padding:.875rem 1.5rem;background:var(--cipher-blue);color:#fff;font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._submit_abujx_109:hover:not(:disabled){background:#3a7bc8;transform:translateY(-1px)}._submit_abujx_109:active:not(:disabled){transform:translateY(0)}._submit_abujx_109:disabled{opacity:.6;cursor:not-allowed}._toggle_abujx_134{color:var(--text-dim);font-size:.875rem;padding:.5rem;transition:color .2s}._toggle_abujx_134:hover{color:var(--cipher-blue)}._error_abujx_145{padding:.75rem 1rem;background:#e8b3391a;border:1px solid var(--cipher-alert);border-radius:8px;color:var(--cipher-alert);font-size:.875rem}@media (max-width: 480px){._container_abujx_1{padding:1rem}._card_abujx_25{padding:1.5rem}}._container_1iyjz_1{min-height:100vh;background:var(--vault-deep)}._header_1iyjz_6{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:1rem clamp(1rem,4vw,2rem);background:var(--vault-surface);border-bottom:1px solid var(--vault-border)}._headerLeft_1iyjz_18{display:flex;align-items:center;gap:1rem}._logo_1iyjz_24{display:flex;align-items:center;gap:.5rem}._logoIcon_1iyjz_30{width:32px;height:32px;background:linear-gradient(135deg,var(--cipher-blue),var(--cipher-safe));border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:1.25rem}._logo_1iyjz_24 h1{font-size:1.25rem;font-weight:700;letter-spacing:-.02em}._appBadge_1iyjz_47{padding:.375rem .75rem;background:var(--vault-accent);border-radius:999px;font-size:.8125rem;font-weight:500;color:var(--text-primary)}._logout_1iyjz_56{padding:.5rem 1rem;color:var(--text-dim);font-size:.875rem;font-weight:500;transition:color .2s}._logout_1iyjz_56:hover{color:var(--text-primary)}._main_1iyjz_68{padding:clamp(1.5rem,4vw,2.5rem) clamp(1rem,4vw,2rem);max-width:1400px;margin:0 auto}._stats_1iyjz_74{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-bottom:2rem}._actions_1iyjz_81{display:flex;gap:.75rem;margin-bottom:1.5rem;flex-wrap:wrap}._primaryAction_1iyjz_88{padding:.75rem 1.5rem;background:var(--cipher-blue);color:#fff;font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._primaryAction_1iyjz_88:hover{background:#3a7bc8;transform:translateY(-1px)}._primaryAction_1iyjz_88:active{transform:translateY(0)}._secondaryAction_1iyjz_107{padding:.75rem 1.5rem;background:var(--vault-surface);border:1px solid var(--vault-border);color:var(--text-primary);font-weight:500;font-size:.9375rem;border-radius:8px;transition:all .2s}._secondaryAction_1iyjz_107:hover{border-color:var(--vault-accent);background:var(--vault-accent)}._loading_1iyjz_123{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;color:var(--text-dim)}._spinner_1iyjz_133{width:40px;height:40px;border:3px solid var(--vault-border);border-top-color:var(--cipher-blue);border-radius:50%;animation:_spin_1iyjz_133 .8s linear infinite}@keyframes _spin_1iyjz_133{to{transform:rotate(360deg)}}@media (max-width: 640px){._headerLeft_1iyjz_18{gap:.5rem}._logo_1iyjz_24 h1{font-size:1.125rem}._appBadge_1iyjz_47{font-size:.75rem;padding:.25rem .625rem}._stats_1iyjz_74{grid-template-columns:repeat(2,1fr);gap:.75rem}}._card_ce5lp_1{padding:1.25rem;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:10px;position:relative;overflow:hidden}._card_ce5lp_1:before{content:"";position:absolute;top:0;left:0;width:100%;height:2px;background:var(--vault-border)}._card_ce5lp_1._safe_ce5lp_20:before{background:var(--cipher-safe)}._card_ce5lp_1._alert_ce5lp_24:before{background:var(--cipher-alert)}._label_ce5lp_28{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;font-weight:500;color:var(--text-dim);margin-bottom:.5rem;text-transform:uppercase;letter-spacing:.05em}._hint_ce5lp_40{font-size:.75rem;color:var(--text-dim);opacity:.6;text-transform:none;letter-spacing:normal}._value_ce5lp_48{font-size:clamp(1.75rem,3vw,2.25rem);font-weight:700;color:var(--text-primary);letter-spacing:-.02em}@media (max-width: 640px){._card_ce5lp_1{padding:1rem}._value_ce5lp_48{font-size:1.5rem}}._container_23vhe_1{background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:10px;overflow:hidden}._tableWrapper_23vhe_8{overflow-x:auto}._table_23vhe_8{width:100%;border-collapse:collapse}._table_23vhe_8 thead{background:var(--vault-deep);border-bottom:1px solid var(--vault-border)}._table_23vhe_8 th{padding:.875rem 1rem;text-align:left;font-size:.8125rem;font-weight:600;color:var(--text-dim);text-transform:uppercase;letter-spacing:.05em}._table_23vhe_8 tbody tr{border-bottom:1px solid var(--vault-border);transition:background .15s;cursor:pointer}._table_23vhe_8 tbody tr:hover,._table_23vhe_8 tbody tr._selected_23vhe_42{background:var(--vault-accent)}._table_23vhe_8 tbody tr:last-child{border-bottom:none}._table_23vhe_8 td{padding:1rem;font-size:.875rem;color:var(--text-primary)}._keyCode_23vhe_56{font-family:JetBrains Mono,monospace;font-size:.8125rem;color:var(--cipher-blue);background:var(--vault-deep);padding:.25rem .5rem;border-radius:4px}._status_23vhe_65{display:inline-block;padding:.25rem .625rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;border:1px solid currentColor;border-radius:999px}._date_23vhe_76{color:var(--text-dim);white-space:nowrap}._daysHint_23vhe_81{display:block;font-size:.75rem;opacity:.6;margin-top:.125rem}._centered_23vhe_88{text-align:center}._actions_23vhe_92{display:flex;gap:.5rem}._actionBtn_23vhe_97{padding:.375rem .75rem;font-size:.8125rem;font-weight:500;background:var(--vault-deep);border:1px solid var(--vault-border);color:var(--text-primary);border-radius:6px;transition:all .15s}._actionBtn_23vhe_97:hover{border-color:var(--cipher-blue);color:var(--cipher-blue)}._actionBtn_23vhe_97._danger_23vhe_113:hover{border-color:var(--cipher-alert);color:var(--cipher-alert)}._empty_23vhe_118{padding:3rem 2rem;text-align:center;color:var(--text-dim)}._empty_23vhe_118 p{margin-bottom:.5rem}._emptyHint_23vhe_128{font-size:.875rem;opacity:.7}@media (max-width: 768px){._table_23vhe_8 th,._table_23vhe_8 td{padding:.75rem .5rem}._actions_23vhe_92{flex-direction:column}._actionBtn_23vhe_97{font-size:.75rem;padding:.25rem .5rem}}._overlay_12ns8_1{position:fixed;top:0;right:0;bottom:0;left:0;background:#0a1628d9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:1rem;z-index:100;animation:_fadeIn_12ns8_1 .2s}@keyframes _fadeIn_12ns8_1{0%{opacity:0}to{opacity:1}}._modal_12ns8_23{width:100%;max-width:480px;background:var(--vault-surface);border:1px solid var(--vault-border);border-radius:12px;animation:_slideUp_12ns8_1 .25s}@keyframes _slideUp_12ns8_1{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}._header_12ns8_43{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--vault-border)}._header_12ns8_43 h2{font-size:1.25rem;font-weight:700;color:var(--text-primary)}._close_12ns8_57{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:1.75rem;color:var(--text-dim);border-radius:6px;transition:all .15s}._close_12ns8_57:hover{background:var(--vault-accent);color:var(--text-primary)}._form_12ns8_74{padding:1.5rem}._field_12ns8_78{margin-bottom:1.25rem}._field_12ns8_78 label{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--text-primary)}._hint_12ns8_92{font-size:.75rem;color:var(--text-dim);font-weight:400}._input_12ns8_98{width:100%;padding:.75rem 1rem;background:var(--vault-deep);border:1px solid var(--vault-border);border-radius:8px;color:var(--text-primary);font-size:.9375rem;transition:all .2s}._input_12ns8_98:focus{outline:none;border-color:var(--cipher-blue);box-shadow:0 0 0 3px #4a90e21a}._error_12ns8_115{padding:.75rem 1rem;background:#e8b3391a;border:1px solid var(--cipher-alert);border-radius:8px;color:var(--cipher-alert);font-size:.875rem;margin-bottom:1rem}._actions_12ns8_125{display:flex;gap:.75rem;justify-content:flex-end}._cancel_12ns8_131,._submit_12ns8_132{padding:.75rem 1.5rem;font-size:.9375rem;font-weight:500;border-radius:8px;transition:all .2s}._cancel_12ns8_131{background:var(--vault-deep);border:1px solid var(--vault-border);color:var(--text-primary)}._cancel_12ns8_131:hover{border-color:var(--vault-accent);background:var(--vault-accent)}._submit_12ns8_132{background:var(--cipher-blue);color:#fff}._submit_12ns8_132:hover:not(:disabled){background:#3a7bc8;transform:translateY(-1px)}._submit_12ns8_132:disabled{opacity:.6;cursor:not-allowed}@media (max-width: 480px){._header_12ns8_43,._form_12ns8_74{padding:1rem}}:root{--vault-deep: #0A1628;--vault-surface: #132340;--vault-border: #1E3A5F;--vault-accent: #2D5A8C;--cipher-blue: #4A90E2;--cipher-alert: #E8B339;--cipher-safe: #5FBC8E;--text-primary: #E8ECF1;--text-dim: #8A9AB0;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{margin:0;padding:0;box-sizing:border-box}body{margin:0;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-size:clamp(.875rem,.8rem + .25vw,1rem);line-height:1.6;background:var(--vault-deep);color:var(--text-primary)}#root{min-height:100vh;display:flex;flex-direction:column}code,.mono{font-family:JetBrains Mono,Courier New,monospace}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}input,textarea{font-family:inherit;color:inherit}a{color:var(--cipher-blue);text-decoration:none}a:hover{text-decoration:underline}::selection{background:var(--cipher-blue);color:var(--vault-deep)}
diff --git a/server_python/web/index.html b/server_python/web/index.html
new file mode 100644
index 0000000..9bcffd3
--- /dev/null
+++ b/server_python/web/index.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ YCPPlus Admin
+
+
+
+
+
+
+
+
+
+
diff --git a/server_python/web/vault.svg b/server_python/web/vault.svg
new file mode 100644
index 0000000..9c30c3f
--- /dev/null
+++ b/server_python/web/vault.svg
@@ -0,0 +1,11 @@
+