@fudrouter/fsrouter 0.6.75 → 0.6.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/open-sse/providers/registry/index.js +80 -74
- package/dist/open-sse/providers/registry/nous-research.js +312 -0
- package/dist/routes/headroom/extras/route.js +2 -2
- package/dist/shared/constants/providers.js +1 -1
- package/open-sse/providers/registry/index.js +80 -74
- package/open-sse/providers/registry/nous-research.js +312 -0
- package/package.json +1 -1
- package/public/assets/EndpointPageClient.Osv85Epz.js +6 -0
- package/public/assets/Loading.C4opFudF.js +1 -0
- package/public/assets/NoAuthProxyCard.DYzT0KlD.js +89 -0
- package/public/assets/index.BUwEfcda.js +89 -0
- package/public/assets/page.B1CLc4po.js +5 -0
- package/public/assets/page.B8YgkFHK.js +1 -0
- package/public/assets/page.B8kxZc2Y.js +64 -0
- package/public/assets/page.BFDSjQpd.js +1 -0
- package/public/assets/page.BFZp_qPq.js +1 -0
- package/public/assets/page.BG42OMpT.js +1 -0
- package/public/assets/page.BILXfXsW.js +1 -0
- package/public/assets/page.Bce00fwX.js +1 -0
- package/public/assets/page.BgTbepiA.js +1 -0
- package/public/assets/page.BpplqrTU.js +4 -0
- package/public/assets/page.By-A1n6z.js +1 -0
- package/public/assets/page.CDPEISSH.js +1 -0
- package/public/assets/page.CFYSnWK-.js +1 -0
- package/public/assets/page.CJHC8rlD.js +1 -0
- package/public/assets/page.CL24j_vl.js +1 -0
- package/public/assets/page.CVp9dx-p.js +1 -0
- package/public/assets/page.CWMQbyIX.js +1 -0
- package/public/assets/page.CXzpy7o7.js +2 -0
- package/public/assets/page.CZ5cK15O.js +1 -0
- package/public/assets/page.CcLeXz-1.js +1 -0
- package/public/assets/page.CmTVuMQi.js +1 -0
- package/public/assets/page.CvOd2GpF.js +5 -0
- package/public/assets/page.D2Smj9fq.js +1 -0
- package/public/assets/page.D5Kar16p.js +1 -0
- package/public/assets/page.D7I-i-ax.js +2 -0
- package/public/assets/page.D7fztYuT.js +31 -0
- package/public/assets/page.DHZbcbCI.js +1 -0
- package/public/assets/page.DZnaImDr.js +6 -0
- package/public/assets/page.Da6589dY.js +1 -0
- package/public/assets/page.DmWtn36o.js +1 -0
- package/public/assets/page.Do8LQFv0.js +1 -0
- package/public/assets/page.Lw1SQsqM.js +1 -0
- package/public/assets/page.duNVVU1K.js +23 -0
- package/public/assets/page.gNbjulUj.js +6 -0
- package/public/assets/page.lo-3-G3U.js +1 -0
- package/public/assets/page.uT-1kFm4.js +1 -0
- package/public/assets/page.vwT279sS.js +1 -0
- package/public/index.html +1 -1
|
@@ -26,79 +26,82 @@ import p23 from "./coqui.js";
|
|
|
26
26
|
import p24 from "./cursor.js";
|
|
27
27
|
import p25 from "./deepgram.js";
|
|
28
28
|
import p26 from "./deepseek.js";
|
|
29
|
-
import p27 from "./
|
|
30
|
-
import p28 from "./
|
|
31
|
-
import p29 from "./
|
|
32
|
-
import p30 from "./
|
|
33
|
-
import p31 from "./
|
|
34
|
-
import p32 from "./
|
|
35
|
-
import p33 from "./
|
|
36
|
-
import p34 from "./
|
|
37
|
-
import p35 from "./gemini.js";
|
|
38
|
-
import p36 from "./
|
|
39
|
-
import p37 from "./
|
|
40
|
-
import p38 from "./
|
|
41
|
-
import p39 from "./glm.js";
|
|
42
|
-
import p40 from "./
|
|
43
|
-
import p41 from "./google-
|
|
44
|
-
import p42 from "./
|
|
45
|
-
import p43 from "./grok-
|
|
46
|
-
import p44 from "./
|
|
47
|
-
import p45 from "./
|
|
48
|
-
import p46 from "./
|
|
49
|
-
import p47 from "./
|
|
50
|
-
import p48 from "./
|
|
51
|
-
import p49 from "./
|
|
52
|
-
import p50 from "./
|
|
53
|
-
import p51 from "./
|
|
54
|
-
import p52 from "./
|
|
55
|
-
import p53 from "./
|
|
56
|
-
import p54 from "./
|
|
57
|
-
import p55 from "./
|
|
58
|
-
import p56 from "./
|
|
59
|
-
import p57 from "./
|
|
60
|
-
import p58 from "./
|
|
61
|
-
import p59 from "./
|
|
62
|
-
import p60 from "./
|
|
63
|
-
import p61 from "./
|
|
64
|
-
import p62 from "./
|
|
65
|
-
import p63 from "./
|
|
66
|
-
import p64 from "./
|
|
67
|
-
import p65 from "./
|
|
68
|
-
import p66 from "./
|
|
69
|
-
import p67 from "./
|
|
70
|
-
import p68 from "./
|
|
71
|
-
import p69 from "./
|
|
72
|
-
import p70 from "./
|
|
73
|
-
import p71 from "./
|
|
74
|
-
import p72 from "./
|
|
75
|
-
import p73 from "./
|
|
76
|
-
import p74 from "./
|
|
77
|
-
import p75 from "./
|
|
78
|
-
import p76 from "./
|
|
79
|
-
import p77 from "./
|
|
80
|
-
import p78 from "./
|
|
81
|
-
import p79 from "./
|
|
82
|
-
import p80 from "./
|
|
83
|
-
import p81 from "./
|
|
84
|
-
import p82 from "./
|
|
85
|
-
import p83 from "./
|
|
86
|
-
import p84 from "./
|
|
87
|
-
import p85 from "./
|
|
88
|
-
import p86 from "./
|
|
89
|
-
import p87 from "./
|
|
90
|
-
import p88 from "./
|
|
91
|
-
import p89 from "./
|
|
92
|
-
import p90 from "./
|
|
93
|
-
import p91 from "./
|
|
94
|
-
import p92 from "./
|
|
95
|
-
import p93 from "./
|
|
96
|
-
import p94 from "./
|
|
97
|
-
import p95 from "./
|
|
98
|
-
import p96 from "./
|
|
99
|
-
import p97 from "./
|
|
100
|
-
import p98 from "./
|
|
101
|
-
import p99 from "./
|
|
29
|
+
import p27 from "./digitalocean.js";
|
|
30
|
+
import p28 from "./edge-tts.js";
|
|
31
|
+
import p29 from "./elevenlabs.js";
|
|
32
|
+
import p30 from "./exa.js";
|
|
33
|
+
import p31 from "./fal-ai.js";
|
|
34
|
+
import p32 from "./featherless.js";
|
|
35
|
+
import p33 from "./firecrawl.js";
|
|
36
|
+
import p34 from "./fireworks.js";
|
|
37
|
+
import p35 from "./gemini-cli.js";
|
|
38
|
+
import p36 from "./gemini.js";
|
|
39
|
+
import p37 from "./github.js";
|
|
40
|
+
import p38 from "./gitlab.js";
|
|
41
|
+
import p39 from "./glm-cn.js";
|
|
42
|
+
import p40 from "./glm.js";
|
|
43
|
+
import p41 from "./google-pse.js";
|
|
44
|
+
import p42 from "./google-tts.js";
|
|
45
|
+
import p43 from "./grok-cli.js";
|
|
46
|
+
import p44 from "./grok-web.js";
|
|
47
|
+
import p45 from "./groq.js";
|
|
48
|
+
import p46 from "./huggingface.js";
|
|
49
|
+
import p47 from "./hyperbolic.js";
|
|
50
|
+
import p48 from "./ibm-bob.js";
|
|
51
|
+
import p49 from "./iflow.js";
|
|
52
|
+
import p50 from "./inworld.js";
|
|
53
|
+
import p51 from "./jina-ai.js";
|
|
54
|
+
import p52 from "./jina-reader.js";
|
|
55
|
+
import p53 from "./kilocode.js";
|
|
56
|
+
import p54 from "./kimchi.js";
|
|
57
|
+
import p55 from "./kimi-coding.js";
|
|
58
|
+
import p56 from "./kimi.js";
|
|
59
|
+
import p57 from "./kiro.js";
|
|
60
|
+
import p58 from "./linkup.js";
|
|
61
|
+
import p59 from "./local-device.js";
|
|
62
|
+
import p60 from "./mimo-free.js";
|
|
63
|
+
import p61 from "./minimax-cn.js";
|
|
64
|
+
import p62 from "./minimax.js";
|
|
65
|
+
import p63 from "./mistral.js";
|
|
66
|
+
import p64 from "./mmf.js";
|
|
67
|
+
import p65 from "./nanobanana.js";
|
|
68
|
+
import p66 from "./nebius.js";
|
|
69
|
+
import p67 from "./nous-research.js";
|
|
70
|
+
import p68 from "./nvidia.js";
|
|
71
|
+
import p69 from "./ollama-local.js";
|
|
72
|
+
import p70 from "./ollama.js";
|
|
73
|
+
import p71 from "./openai.js";
|
|
74
|
+
import p72 from "./opencode-go.js";
|
|
75
|
+
import p73 from "./opencode.js";
|
|
76
|
+
import p74 from "./openrouter.js";
|
|
77
|
+
import p75 from "./perplexity-agent.js";
|
|
78
|
+
import p76 from "./perplexity-web.js";
|
|
79
|
+
import p77 from "./perplexity.js";
|
|
80
|
+
import p78 from "./playht.js";
|
|
81
|
+
import p79 from "./qoder.js";
|
|
82
|
+
import p80 from "./qwen.js";
|
|
83
|
+
import p81 from "./recraft.js";
|
|
84
|
+
import p82 from "./runwayml.js";
|
|
85
|
+
import p83 from "./sdwebui.js";
|
|
86
|
+
import p84 from "./searchapi.js";
|
|
87
|
+
import p85 from "./searxng.js";
|
|
88
|
+
import p86 from "./serper.js";
|
|
89
|
+
import p87 from "./siliconflow.js";
|
|
90
|
+
import p88 from "./stability-ai.js";
|
|
91
|
+
import p89 from "./tavily.js";
|
|
92
|
+
import p90 from "./together.js";
|
|
93
|
+
import p91 from "./topaz.js";
|
|
94
|
+
import p92 from "./tortoise.js";
|
|
95
|
+
import p93 from "./venice.js";
|
|
96
|
+
import p94 from "./vercel-ai-gateway.js";
|
|
97
|
+
import p95 from "./vertex-partner.js";
|
|
98
|
+
import p96 from "./vertex.js";
|
|
99
|
+
import p97 from "./volcengine-ark.js";
|
|
100
|
+
import p98 from "./voyage-ai.js";
|
|
101
|
+
import p99 from "./xai.js";
|
|
102
|
+
import p100 from "./xiaomi-mimo.js";
|
|
103
|
+
import p101 from "./xiaomi-tokenplan.js";
|
|
104
|
+
import p102 from "./youcom.js";
|
|
102
105
|
|
|
103
106
|
export default [
|
|
104
107
|
p0,
|
|
@@ -200,5 +203,8 @@ export default [
|
|
|
200
203
|
p96,
|
|
201
204
|
p97,
|
|
202
205
|
p98,
|
|
203
|
-
p99
|
|
206
|
+
p99,
|
|
207
|
+
p100,
|
|
208
|
+
p101,
|
|
209
|
+
p102
|
|
204
210
|
];
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: "nous-research",
|
|
3
|
+
priority: 100,
|
|
4
|
+
alias: "nous",
|
|
5
|
+
uiAlias: "nous",
|
|
6
|
+
display: {
|
|
7
|
+
name: "Nous Research",
|
|
8
|
+
icon: "hub",
|
|
9
|
+
color: "#2563EB",
|
|
10
|
+
textIcon: "NO",
|
|
11
|
+
website: "https://portal.nousresearch.com",
|
|
12
|
+
notice: {
|
|
13
|
+
text: "Free tier: 50 RPM, 500K TPM — no credit card.",
|
|
14
|
+
apiKeyUrl: "https://portal.nousresearch.com",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
category: "apikey",
|
|
18
|
+
authModes: ["apikey"],
|
|
19
|
+
transport: {
|
|
20
|
+
baseUrl: "https://inference-api.nousresearch.com/v1/chat/completions",
|
|
21
|
+
format: "openai",
|
|
22
|
+
auth: {
|
|
23
|
+
header: "Authorization",
|
|
24
|
+
scheme: "bearer",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
models: [
|
|
28
|
+
{ id: "moonshotai/kimi-k3", name: "MoonshotAI: Kimi K3" },
|
|
29
|
+
{ id: "kwaipilot/kat-coder-air-v2.5", name: "Kwaipilot: KAT-Coder-Air V2.5" },
|
|
30
|
+
{ id: "kwaipilot/kat-coder-pro-v2.5", name: "Kwaipilot: KAT-Coder-Pro V2.5" },
|
|
31
|
+
{ id: "openai/gpt-5.6-luna-pro", name: "OpenAI: GPT-5.6 Luna Pro" },
|
|
32
|
+
{ id: "openai/gpt-5.6-luna", name: "OpenAI: GPT-5.6 Luna" },
|
|
33
|
+
{ id: "openai/gpt-5.6-terra-pro", name: "OpenAI: GPT-5.6 Terra Pro" },
|
|
34
|
+
{ id: "openai/gpt-5.6-terra", name: "OpenAI: GPT-5.6 Terra" },
|
|
35
|
+
{ id: "openai/gpt-5.6-sol-pro", name: "OpenAI: GPT-5.6 Sol Pro" },
|
|
36
|
+
{ id: "openai/gpt-5.6-sol", name: "OpenAI: GPT-5.6 Sol" },
|
|
37
|
+
{ id: "x-ai/grok-4.5", name: "xAI: Grok 4.5" },
|
|
38
|
+
{ id: "~x-ai/grok-latest", name: "xAI: Grok Latest" },
|
|
39
|
+
{ id: "aion-labs/aion-3.0-mini", name: "AionLabs: Aion-3.0-Mini" },
|
|
40
|
+
{ id: "aion-labs/aion-3.0", name: "AionLabs: Aion-3.0" },
|
|
41
|
+
{ id: "tencent/hy3", name: "Tencent: Hy3" },
|
|
42
|
+
{ id: "tencent/hy3:free", name: "Tencent: Hy3" },
|
|
43
|
+
{ id: "poolside/laguna-xs-2.1", name: "Poolside: Laguna XS 2.1" },
|
|
44
|
+
{ id: "anthropic/claude-sonnet-5", name: "Anthropic: Claude Sonnet 5" },
|
|
45
|
+
{ id: "nex-agi/nex-n2-mini", name: "Nex AGI: Nex-N2-Mini" },
|
|
46
|
+
{ id: "sakana/fugu-ultra", name: "Sakana: Fugu Ultra" },
|
|
47
|
+
{ id: "google/gemini-3-pro-image", name: "Google: Nano Banana Pro (Gemini 3 Pro Image)", type: "image" },
|
|
48
|
+
{ id: "z-ai/glm-5.2", name: "Z.ai: GLM 5.2" },
|
|
49
|
+
{ id: "moonshotai/kimi-k2.7-code", name: "MoonshotAI: Kimi K2.7 Code" },
|
|
50
|
+
{ id: "~anthropic/claude-fable-latest", name: "Anthropic: Claude Fable Latest" },
|
|
51
|
+
{ id: "anthropic/claude-fable-5", name: "Anthropic: Claude Fable 5" },
|
|
52
|
+
{ id: "nex-agi/nex-n2-pro", name: "Nex AGI: Nex-N2-Pro" },
|
|
53
|
+
{ id: "nvidia/nemotron-3-ultra-550b-a55b", name: "NVIDIA: Nemotron 3 Ultra" },
|
|
54
|
+
{ id: "qwen/qwen3.7-plus", name: "Qwen: Qwen3.7 Plus" },
|
|
55
|
+
{ id: "minimax/minimax-m3", name: "MiniMax: MiniMax M3" },
|
|
56
|
+
{ id: "stepfun/step-3.7-flash", name: "StepFun: Step 3.7 Flash" },
|
|
57
|
+
{ id: "anthropic/claude-opus-4.8-fast", name: "Anthropic: Claude Opus 4.8 (Fast)" },
|
|
58
|
+
{ id: "anthropic/claude-opus-4.8", name: "Anthropic: Claude Opus 4.8" },
|
|
59
|
+
{ id: "qwen/qwen3.7-max", name: "Qwen: Qwen3.7 Max" },
|
|
60
|
+
{ id: "x-ai/grok-build-0.1", name: "xAI: Grok Build 0.1" },
|
|
61
|
+
{ id: "google/gemini-embedding-2", name: "Google: Gemini Embedding 2", type: "embedding" },
|
|
62
|
+
{ id: "google/gemini-3.5-flash", name: "Google: Gemini 3.5 Flash" },
|
|
63
|
+
{ id: "anthropic/claude-opus-4.7-fast", name: "Anthropic: Claude Opus 4.7 (Fast)" },
|
|
64
|
+
{ id: "inclusionai/ring-2.6-1t", name: "inclusionAI: Ring-2.6-1T" },
|
|
65
|
+
{ id: "google/gemini-3.1-flash-lite", name: "Google: Gemini 3.1 Flash Lite" },
|
|
66
|
+
{ id: "openai/gpt-chat-latest", name: "OpenAI: GPT Chat Latest" },
|
|
67
|
+
{ id: "x-ai/grok-4.3", name: "xAI: Grok 4.3" },
|
|
68
|
+
{ id: "ibm-granite/granite-4.1-8b", name: "IBM: Granite 4.1 8B" },
|
|
69
|
+
{ id: "mistralai/mistral-medium-3-5", name: "Mistral: Mistral Medium 3.5" },
|
|
70
|
+
{ id: "poolside/laguna-m.1", name: "Poolside: Laguna M.1" },
|
|
71
|
+
{ id: "~anthropic/claude-haiku-latest", name: "Anthropic Claude Haiku Latest" },
|
|
72
|
+
{ id: "~openai/gpt-mini-latest", name: "OpenAI GPT Mini Latest" },
|
|
73
|
+
{ id: "~google/gemini-pro-latest", name: "Google Gemini Pro Latest" },
|
|
74
|
+
{ id: "~moonshotai/kimi-latest", name: "MoonshotAI Kimi Latest" },
|
|
75
|
+
{ id: "~google/gemini-flash-latest", name: "Google Gemini Flash Latest" },
|
|
76
|
+
{ id: "~anthropic/claude-sonnet-latest", name: "Anthropic Claude Sonnet Latest" },
|
|
77
|
+
{ id: "~openai/gpt-latest", name: "OpenAI GPT Latest" },
|
|
78
|
+
{ id: "qwen/qwen3.5-plus-20260420", name: "Qwen: Qwen3.5 Plus 2026-04-20" },
|
|
79
|
+
{ id: "qwen/qwen3.6-flash", name: "Qwen: Qwen3.6 Flash" },
|
|
80
|
+
{ id: "qwen/qwen3.6-35b-a3b", name: "Qwen: Qwen3.6 35B A3B" },
|
|
81
|
+
{ id: "qwen/qwen3.6-max-preview", name: "Qwen: Qwen3.6 Max Preview" },
|
|
82
|
+
{ id: "qwen/qwen3.6-27b", name: "Qwen: Qwen3.6 27B" },
|
|
83
|
+
{ id: "openai/gpt-5.5-pro", name: "OpenAI: GPT-5.5 Pro" },
|
|
84
|
+
{ id: "openai/gpt-5.5", name: "OpenAI: GPT-5.5" },
|
|
85
|
+
{ id: "deepseek/deepseek-v4-pro", name: "DeepSeek: DeepSeek V4 Pro" },
|
|
86
|
+
{ id: "deepseek/deepseek-v4-flash", name: "DeepSeek: DeepSeek V4 Flash" },
|
|
87
|
+
{ id: "inclusionai/ling-2.6-1t", name: "inclusionAI: Ling-2.6-1T" },
|
|
88
|
+
{ id: "tencent/hy3-preview", name: "Tencent: Hy3 preview" },
|
|
89
|
+
{ id: "xiaomi/mimo-v2.5-pro", name: "Xiaomi: MiMo-V2.5-Pro" },
|
|
90
|
+
{ id: "xiaomi/mimo-v2.5", name: "Xiaomi: MiMo-V2.5" },
|
|
91
|
+
{ id: "inclusionai/ling-2.6-flash", name: "inclusionAI: Ling-2.6-flash" },
|
|
92
|
+
{ id: "~anthropic/claude-opus-latest", name: "Anthropic: Claude Opus Latest" },
|
|
93
|
+
{ id: "moonshotai/kimi-k2.6", name: "MoonshotAI: Kimi K2.6" },
|
|
94
|
+
{ id: "google/gemini-embedding-2-preview", name: "Google: Gemini Embedding 2 Preview", type: "embedding" },
|
|
95
|
+
{ id: "anthropic/claude-opus-4.7", name: "Anthropic: Claude Opus 4.7" },
|
|
96
|
+
{ id: "z-ai/glm-5.1", name: "Z.ai: GLM 5.1" },
|
|
97
|
+
{ id: "google/gemma-4-26b-a4b-it", name: "Google: Gemma 4 26B A4B " },
|
|
98
|
+
{ id: "google/gemma-4-31b-it", name: "Google: Gemma 4 31B" },
|
|
99
|
+
{ id: "qwen/qwen3.6-plus", name: "Qwen: Qwen3.6 Plus" },
|
|
100
|
+
{ id: "z-ai/glm-5v-turbo", name: "Z.ai: GLM 5V Turbo" },
|
|
101
|
+
{ id: "arcee-ai/trinity-large-thinking", name: "Arcee AI: Trinity Large Thinking" },
|
|
102
|
+
{ id: "x-ai/grok-4.20", name: "xAI: Grok 4.20" },
|
|
103
|
+
{ id: "kwaipilot/kat-coder-pro-v2", name: "Kwaipilot: KAT-Coder-Pro V2" },
|
|
104
|
+
{ id: "rekaai/reka-edge", name: "Reka Edge" },
|
|
105
|
+
{ id: "minimax/minimax-m2.7", name: "MiniMax: MiniMax M2.7" },
|
|
106
|
+
{ id: "openai/gpt-5.4-nano", name: "OpenAI: GPT-5.4 Nano" },
|
|
107
|
+
{ id: "openai/gpt-5.4-mini", name: "OpenAI: GPT-5.4 Mini" },
|
|
108
|
+
{ id: "mistralai/mistral-small-2603", name: "Mistral: Mistral Small 4" },
|
|
109
|
+
{ id: "perplexity/pplx-embed-v1-4b", name: "Perplexity: Embed V1 4B" },
|
|
110
|
+
{ id: "perplexity/pplx-embed-v1-0.6b", name: "Perplexity: Embed V1 0.6B" },
|
|
111
|
+
{ id: "z-ai/glm-5-turbo", name: "Z.ai: GLM 5 Turbo" },
|
|
112
|
+
{ id: "nvidia/nemotron-3-super-120b-a12b", name: "NVIDIA: Nemotron 3 Super" },
|
|
113
|
+
{ id: "bytedance-seed/seed-2.0-lite", name: "ByteDance Seed: Seed-2.0-Lite" },
|
|
114
|
+
{ id: "qwen/qwen3.5-9b", name: "Qwen: Qwen3.5-9B" },
|
|
115
|
+
{ id: "openai/gpt-5.4-pro", name: "OpenAI: GPT-5.4 Pro" },
|
|
116
|
+
{ id: "openai/gpt-5.4", name: "OpenAI: GPT-5.4" },
|
|
117
|
+
{ id: "inception/mercury-2", name: "Inception: Mercury 2" },
|
|
118
|
+
{ id: "openai/gpt-5.3-chat", name: "OpenAI: GPT-5.3 Chat" },
|
|
119
|
+
{ id: "google/gemini-3.1-flash-lite-preview", name: "Google: Gemini 3.1 Flash Lite Preview" },
|
|
120
|
+
{ id: "bytedance-seed/seed-2.0-mini", name: "ByteDance Seed: Seed-2.0-Mini" },
|
|
121
|
+
{ id: "qwen/qwen3.5-35b-a3b", name: "Qwen: Qwen3.5-35B-A3B" },
|
|
122
|
+
{ id: "qwen/qwen3.5-27b", name: "Qwen: Qwen3.5-27B" },
|
|
123
|
+
{ id: "qwen/qwen3.5-122b-a10b", name: "Qwen: Qwen3.5-122B-A10B" },
|
|
124
|
+
{ id: "qwen/qwen3.5-flash-02-23", name: "Qwen: Qwen3.5-Flash" },
|
|
125
|
+
{ id: "google/gemini-3.1-pro-preview-customtools", name: "Google: Gemini 3.1 Pro Preview Custom Tools" },
|
|
126
|
+
{ id: "openai/gpt-5.3-codex", name: "OpenAI: GPT-5.3-Codex" },
|
|
127
|
+
{ id: "aion-labs/aion-2.0", name: "AionLabs: Aion-2.0" },
|
|
128
|
+
{ id: "google/gemini-3.1-pro-preview", name: "Google: Gemini 3.1 Pro Preview" },
|
|
129
|
+
{ id: "anthropic/claude-sonnet-4.6", name: "Anthropic: Claude Sonnet 4.6" },
|
|
130
|
+
{ id: "qwen/qwen3.5-plus-02-15", name: "Qwen: Qwen3.5 Plus 2026-02-15" },
|
|
131
|
+
{ id: "qwen/qwen3.5-397b-a17b", name: "Qwen: Qwen3.5 397B A17B" },
|
|
132
|
+
{ id: "minimax/minimax-m2.5", name: "MiniMax: MiniMax M2.5" },
|
|
133
|
+
{ id: "z-ai/glm-5", name: "Z.ai: GLM 5" },
|
|
134
|
+
{ id: "qwen/qwen3-max-thinking", name: "Qwen: Qwen3 Max Thinking" },
|
|
135
|
+
{ id: "anthropic/claude-opus-4.6", name: "Anthropic: Claude Opus 4.6" },
|
|
136
|
+
{ id: "qwen/qwen3-coder-next", name: "Qwen: Qwen3 Coder Next" },
|
|
137
|
+
{ id: "stepfun/step-3.5-flash", name: "StepFun: Step 3.5 Flash" },
|
|
138
|
+
{ id: "moonshotai/kimi-k2.5", name: "MoonshotAI: Kimi K2.5" },
|
|
139
|
+
{ id: "upstage/solar-pro-3", name: "Upstage: Solar Pro 3" },
|
|
140
|
+
{ id: "openai/gpt-audio", name: "OpenAI: GPT Audio" },
|
|
141
|
+
{ id: "openai/gpt-audio-mini", name: "OpenAI: GPT Audio Mini" },
|
|
142
|
+
{ id: "z-ai/glm-4.7-flash", name: "Z.ai: GLM 4.7 Flash" },
|
|
143
|
+
{ id: "openai/gpt-5.2-codex", name: "OpenAI: GPT-5.2-Codex" },
|
|
144
|
+
{ id: "bytedance-seed/seed-1.6-flash", name: "ByteDance Seed: Seed 1.6 Flash" },
|
|
145
|
+
{ id: "bytedance-seed/seed-1.6", name: "ByteDance Seed: Seed 1.6" },
|
|
146
|
+
{ id: "minimax/minimax-m2.1", name: "MiniMax: MiniMax M2.1" },
|
|
147
|
+
{ id: "z-ai/glm-4.7", name: "Z.ai: GLM 4.7" },
|
|
148
|
+
{ id: "google/gemini-3-flash-preview", name: "Google: Gemini 3 Flash Preview" },
|
|
149
|
+
{ id: "nvidia/nemotron-3-nano-30b-a3b", name: "NVIDIA: Nemotron 3 Nano 30B A3B" },
|
|
150
|
+
{ id: "openai/gpt-5.2-chat", name: "OpenAI: GPT-5.2 Chat" },
|
|
151
|
+
{ id: "openai/gpt-5.2-pro", name: "OpenAI: GPT-5.2 Pro" },
|
|
152
|
+
{ id: "openai/gpt-5.2", name: "OpenAI: GPT-5.2" },
|
|
153
|
+
{ id: "mistralai/devstral-2512", name: "Mistral: Devstral 2 2512" },
|
|
154
|
+
{ id: "relace/relace-search", name: "Relace: Relace Search" },
|
|
155
|
+
{ id: "z-ai/glm-4.6v", name: "Z.ai: GLM 4.6V" },
|
|
156
|
+
{ id: "openai/gpt-5.1-codex-max", name: "OpenAI: GPT-5.1-Codex-Max" },
|
|
157
|
+
{ id: "amazon/nova-2-lite-v1", name: "Amazon: Nova 2 Lite" },
|
|
158
|
+
{ id: "mistralai/ministral-14b-2512", name: "Mistral: Ministral 3 14B 2512" },
|
|
159
|
+
{ id: "mistralai/ministral-8b-2512", name: "Mistral: Ministral 3 8B 2512" },
|
|
160
|
+
{ id: "mistralai/ministral-3b-2512", name: "Mistral: Ministral 3 3B 2512" },
|
|
161
|
+
{ id: "mistralai/mistral-large-2512", name: "Mistral: Mistral Large 3 2512" },
|
|
162
|
+
{ id: "deepseek/deepseek-v3.2", name: "DeepSeek: DeepSeek V3.2" },
|
|
163
|
+
{ id: "anthropic/claude-opus-4.5", name: "Anthropic: Claude Opus 4.5" },
|
|
164
|
+
{ id: "thenlper/gte-base", name: "Thenlper: GTE-Base" },
|
|
165
|
+
{ id: "thenlper/gte-large", name: "Thenlper: GTE-Large" },
|
|
166
|
+
{ id: "intfloat/e5-large-v2", name: "Intfloat: E5-Large-v2" },
|
|
167
|
+
{ id: "intfloat/e5-base-v2", name: "Intfloat: E5-Base-v2" },
|
|
168
|
+
{ id: "intfloat/multilingual-e5-large", name: "Intfloat: Multilingual-E5-Large" },
|
|
169
|
+
{ id: "sentence-transformers/paraphrase-minilm-l6-v2", name: "Sentence Transformers: paraphrase-MiniLM-L6-v2" },
|
|
170
|
+
{ id: "sentence-transformers/all-minilm-l12-v2", name: "Sentence Transformers: all-MiniLM-L12-v2" },
|
|
171
|
+
{ id: "baai/bge-base-en-v1.5", name: "BAAI: bge-base-en-v1.5" },
|
|
172
|
+
{ id: "sentence-transformers/multi-qa-mpnet-base-dot-v1", name: "Sentence Transformers: multi-qa-mpnet-base-dot-v1" },
|
|
173
|
+
{ id: "baai/bge-large-en-v1.5", name: "BAAI: bge-large-en-v1.5" },
|
|
174
|
+
{ id: "baai/bge-m3", name: "BAAI: bge-m3" },
|
|
175
|
+
{ id: "sentence-transformers/all-mpnet-base-v2", name: "Sentence Transformers: all-mpnet-base-v2" },
|
|
176
|
+
{ id: "sentence-transformers/all-minilm-l6-v2", name: "Sentence Transformers: all-MiniLM-L6-v2" },
|
|
177
|
+
{ id: "openai/gpt-5.1", name: "OpenAI: GPT-5.1" },
|
|
178
|
+
{ id: "openai/gpt-5.1-chat", name: "OpenAI: GPT-5.1 Chat" },
|
|
179
|
+
{ id: "openai/gpt-5.1-codex", name: "OpenAI: GPT-5.1-Codex" },
|
|
180
|
+
{ id: "openai/gpt-5.1-codex-mini", name: "OpenAI: GPT-5.1-Codex-Mini" },
|
|
181
|
+
{ id: "moonshotai/kimi-k2-thinking", name: "MoonshotAI: Kimi K2 Thinking" },
|
|
182
|
+
{ id: "amazon/nova-premier-v1", name: "Amazon: Nova Premier 1.0" },
|
|
183
|
+
{ id: "mistralai/mistral-embed-2312", name: "Mistral: Mistral Embed 2312" },
|
|
184
|
+
{ id: "google/gemini-embedding-001", name: "Google: Gemini Embedding 001", type: "embedding" },
|
|
185
|
+
{ id: "openai/text-embedding-ada-002", name: "OpenAI: Text Embedding Ada 002", type: "embedding" },
|
|
186
|
+
{ id: "mistralai/codestral-embed-2505", name: "Mistral: Codestral Embed 2505" },
|
|
187
|
+
{ id: "openai/text-embedding-3-large", name: "OpenAI: Text Embedding 3 Large", type: "embedding" },
|
|
188
|
+
{ id: "openai/text-embedding-3-small", name: "OpenAI: Text Embedding 3 Small", type: "embedding" },
|
|
189
|
+
{ id: "mistralai/voxtral-small-24b-2507", name: "Mistral: Voxtral Small 24B 2507" },
|
|
190
|
+
{ id: "openai/gpt-oss-safeguard-20b", name: "OpenAI: gpt-oss-safeguard-20b" },
|
|
191
|
+
{ id: "qwen/qwen3-embedding-8b", name: "Qwen: Qwen3 Embedding 8B", type: "embedding" },
|
|
192
|
+
{ id: "qwen/qwen3-embedding-4b", name: "Qwen: Qwen3 Embedding 4B", type: "embedding" },
|
|
193
|
+
{ id: "minimax/minimax-m2", name: "MiniMax: MiniMax M2" },
|
|
194
|
+
{ id: "qwen/qwen3-vl-32b-instruct", name: "Qwen: Qwen3 VL 32B Instruct" },
|
|
195
|
+
{ id: "anthropic/claude-haiku-4.5", name: "Anthropic: Claude Haiku 4.5" },
|
|
196
|
+
{ id: "qwen/qwen3-vl-8b-thinking", name: "Qwen: Qwen3 VL 8B Thinking" },
|
|
197
|
+
{ id: "qwen/qwen3-vl-8b-instruct", name: "Qwen: Qwen3 VL 8B Instruct" },
|
|
198
|
+
{ id: "openai/o3-deep-research", name: "OpenAI: o3 Deep Research" },
|
|
199
|
+
{ id: "openai/o4-mini-deep-research", name: "OpenAI: o4 Mini Deep Research" },
|
|
200
|
+
{ id: "nvidia/llama-3.3-nemotron-super-49b-v1.5", name: "NVIDIA: Llama 3.3 Nemotron Super 49B V1.5" },
|
|
201
|
+
{ id: "qwen/qwen3-vl-30b-a3b-thinking", name: "Qwen: Qwen3 VL 30B A3B Thinking" },
|
|
202
|
+
{ id: "qwen/qwen3-vl-30b-a3b-instruct", name: "Qwen: Qwen3 VL 30B A3B Instruct" },
|
|
203
|
+
{ id: "openai/gpt-5-pro", name: "OpenAI: GPT-5 Pro" },
|
|
204
|
+
{ id: "z-ai/glm-4.6", name: "Z.ai: GLM 4.6" },
|
|
205
|
+
{ id: "anthropic/claude-sonnet-4.5", name: "Anthropic: Claude Sonnet 4.5" },
|
|
206
|
+
{ id: "deepseek/deepseek-v3.2-exp", name: "DeepSeek: DeepSeek V3.2 Exp" },
|
|
207
|
+
{ id: "qwen/qwen3-vl-235b-a22b-thinking", name: "Qwen: Qwen3 VL 235B A22B Thinking" },
|
|
208
|
+
{ id: "qwen/qwen3-vl-235b-a22b-instruct", name: "Qwen: Qwen3 VL 235B A22B Instruct" },
|
|
209
|
+
{ id: "qwen/qwen3-max", name: "Qwen: Qwen3 Max" },
|
|
210
|
+
{ id: "qwen/qwen3-coder-plus", name: "Qwen: Qwen3 Coder Plus" },
|
|
211
|
+
{ id: "openai/gpt-5-codex", name: "OpenAI: GPT-5 Codex" },
|
|
212
|
+
{ id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek: DeepSeek V3.1 Terminus" },
|
|
213
|
+
{ id: "qwen/qwen3-coder-flash", name: "Qwen: Qwen3 Coder Flash" },
|
|
214
|
+
{ id: "qwen/qwen3-next-80b-a3b-thinking", name: "Qwen: Qwen3 Next 80B A3B Thinking" },
|
|
215
|
+
{ id: "qwen/qwen3-next-80b-a3b-instruct", name: "Qwen: Qwen3 Next 80B A3B Instruct" },
|
|
216
|
+
{ id: "qwen/qwen-plus-2025-07-28", name: "Qwen: Qwen Plus 0728" },
|
|
217
|
+
{ id: "qwen/qwen-plus-2025-07-28:thinking", name: "Qwen: Qwen Plus 0728 (thinking)" },
|
|
218
|
+
{ id: "moonshotai/kimi-k2-0905", name: "MoonshotAI: Kimi K2 0905" },
|
|
219
|
+
{ id: "qwen/qwen3-30b-a3b-thinking-2507", name: "Qwen: Qwen3 30B A3B Thinking 2507" },
|
|
220
|
+
{ id: "nousresearch/hermes-4-70b", name: "Nous: Hermes 4 70B" },
|
|
221
|
+
{ id: "nousresearch/hermes-4-405b", name: "Nous: Hermes 4 405B" },
|
|
222
|
+
{ id: "deepseek/deepseek-chat-v3.1", name: "DeepSeek: DeepSeek V3.1" },
|
|
223
|
+
{ id: "mistralai/mistral-medium-3.1", name: "Mistral: Mistral Medium 3.1" },
|
|
224
|
+
{ id: "z-ai/glm-4.5v", name: "Z.ai: GLM 4.5V" },
|
|
225
|
+
{ id: "ai21/jamba-large-1.7", name: "AI21: Jamba Large 1.7" },
|
|
226
|
+
{ id: "openai/gpt-5", name: "OpenAI: GPT-5" },
|
|
227
|
+
{ id: "openai/gpt-5-mini", name: "OpenAI: GPT-5 Mini" },
|
|
228
|
+
{ id: "openai/gpt-5-nano", name: "OpenAI: GPT-5 Nano" },
|
|
229
|
+
{ id: "openai/gpt-oss-120b", name: "OpenAI: gpt-oss-120b" },
|
|
230
|
+
{ id: "openai/gpt-oss-20b", name: "OpenAI: gpt-oss-20b" },
|
|
231
|
+
{ id: "anthropic/claude-opus-4.1", name: "Anthropic: Claude Opus 4.1" },
|
|
232
|
+
{ id: "mistralai/codestral-2508", name: "Mistral: Codestral 2508" },
|
|
233
|
+
{ id: "qwen/qwen3-coder-30b-a3b-instruct", name: "Qwen: Qwen3 Coder 30B A3B Instruct" },
|
|
234
|
+
{ id: "qwen/qwen3-30b-a3b-instruct-2507", name: "Qwen: Qwen3 30B A3B Instruct 2507" },
|
|
235
|
+
{ id: "z-ai/glm-4.5", name: "Z.ai: GLM 4.5" },
|
|
236
|
+
{ id: "z-ai/glm-4.5-air", name: "Z.ai: GLM 4.5 Air" },
|
|
237
|
+
{ id: "qwen/qwen3-235b-a22b-thinking-2507", name: "Qwen: Qwen3 235B A22B Thinking 2507" },
|
|
238
|
+
{ id: "qwen/qwen3-coder", name: "Qwen: Qwen3 Coder 480B A35B" },
|
|
239
|
+
{ id: "google/gemini-2.5-flash-lite", name: "Google: Gemini 2.5 Flash Lite" },
|
|
240
|
+
{ id: "qwen/qwen3-235b-a22b-2507", name: "Qwen: Qwen3 235B A22B Instruct 2507" },
|
|
241
|
+
{ id: "moonshotai/kimi-k2", name: "MoonshotAI: Kimi K2 0711" },
|
|
242
|
+
{ id: "mistralai/mistral-small-3.2-24b-instruct", name: "Mistral: Mistral Small 3.2 24B" },
|
|
243
|
+
{ id: "minimax/minimax-m1", name: "MiniMax: MiniMax M1" },
|
|
244
|
+
{ id: "google/gemini-2.5-flash", name: "Google: Gemini 2.5 Flash" },
|
|
245
|
+
{ id: "google/gemini-2.5-pro", name: "Google: Gemini 2.5 Pro" },
|
|
246
|
+
{ id: "openai/o3-pro", name: "OpenAI: o3 Pro" },
|
|
247
|
+
{ id: "google/gemini-2.5-pro-preview", name: "Google: Gemini 2.5 Pro Preview 06-05" },
|
|
248
|
+
{ id: "deepseek/deepseek-r1-0528", name: "DeepSeek: R1 0528" },
|
|
249
|
+
{ id: "anthropic/claude-opus-4", name: "Anthropic: Claude Opus 4" },
|
|
250
|
+
{ id: "anthropic/claude-sonnet-4", name: "Anthropic: Claude Sonnet 4" },
|
|
251
|
+
{ id: "mistralai/mistral-medium-3", name: "Mistral: Mistral Medium 3" },
|
|
252
|
+
{ id: "google/gemini-2.5-pro-preview-05-06", name: "Google: Gemini 2.5 Pro Preview 05-06" },
|
|
253
|
+
{ id: "arcee-ai/virtuoso-large", name: "Arcee AI: Virtuoso Large" },
|
|
254
|
+
{ id: "qwen/qwen3-30b-a3b", name: "Qwen: Qwen3 30B A3B" },
|
|
255
|
+
{ id: "qwen/qwen3-8b", name: "Qwen: Qwen3 8B" },
|
|
256
|
+
{ id: "qwen/qwen3-14b", name: "Qwen: Qwen3 14B" },
|
|
257
|
+
{ id: "qwen/qwen3-32b", name: "Qwen: Qwen3 32B" },
|
|
258
|
+
{ id: "qwen/qwen3-235b-a22b", name: "Qwen: Qwen3 235B A22B" },
|
|
259
|
+
{ id: "openai/o4-mini-high", name: "OpenAI: o4 Mini High" },
|
|
260
|
+
{ id: "openai/o3", name: "OpenAI: o3" },
|
|
261
|
+
{ id: "openai/o4-mini", name: "OpenAI: o4 Mini" },
|
|
262
|
+
{ id: "openai/gpt-4.1", name: "OpenAI: GPT-4.1" },
|
|
263
|
+
{ id: "openai/gpt-4.1-mini", name: "OpenAI: GPT-4.1 Mini" },
|
|
264
|
+
{ id: "openai/gpt-4.1-nano", name: "OpenAI: GPT-4.1 Nano" },
|
|
265
|
+
{ id: "meta-llama/llama-4-maverick", name: "Meta: Llama 4 Maverick" },
|
|
266
|
+
{ id: "meta-llama/llama-4-scout", name: "Meta: Llama 4 Scout" },
|
|
267
|
+
{ id: "deepseek/deepseek-chat-v3-0324", name: "DeepSeek: DeepSeek V3 0324" },
|
|
268
|
+
{ id: "google/gemma-3-12b-it", name: "Google: Gemma 3 12B" },
|
|
269
|
+
{ id: "google/gemma-3-27b-it", name: "Google: Gemma 3 27B" },
|
|
270
|
+
{ id: "mistralai/mistral-saba", name: "Mistral: Saba" },
|
|
271
|
+
{ id: "openai/o3-mini-high", name: "OpenAI: o3 Mini High" },
|
|
272
|
+
{ id: "qwen/qwen-plus", name: "Qwen: Qwen-Plus" },
|
|
273
|
+
{ id: "openai/o3-mini", name: "OpenAI: o3 Mini" },
|
|
274
|
+
{ id: "deepseek/deepseek-r1", name: "DeepSeek: R1" },
|
|
275
|
+
{ id: "deepseek/deepseek-chat", name: "DeepSeek: DeepSeek V3" },
|
|
276
|
+
{ id: "openai/o1", name: "OpenAI: o1" },
|
|
277
|
+
{ id: "meta-llama/llama-3.3-70b-instruct", name: "Meta: Llama 3.3 70B Instruct" },
|
|
278
|
+
{ id: "amazon/nova-lite-v1", name: "Amazon: Nova Lite 1.0" },
|
|
279
|
+
{ id: "amazon/nova-micro-v1", name: "Amazon: Nova Micro 1.0" },
|
|
280
|
+
{ id: "amazon/nova-pro-v1", name: "Amazon: Nova Pro 1.0" },
|
|
281
|
+
{ id: "openai/gpt-4o-2024-11-20", name: "OpenAI: GPT-4o (2024-11-20)" },
|
|
282
|
+
{ id: "mistralai/mistral-large-2407", name: "Mistral Large 2407" },
|
|
283
|
+
{ id: "thedrummer/unslopnemo-12b", name: "TheDrummer: UnslopNemo 12B" },
|
|
284
|
+
{ id: "qwen/qwen-2.5-7b-instruct", name: "Qwen: Qwen2.5 7B Instruct" },
|
|
285
|
+
{ id: "qwen/qwen-2.5-72b-instruct", name: "Qwen2.5 72B Instruct" },
|
|
286
|
+
{ id: "cohere/command-r-08-2024", name: "Cohere: Command R (08-2024)" },
|
|
287
|
+
{ id: "cohere/command-r-plus-08-2024", name: "Cohere: Command R+ (08-2024)" },
|
|
288
|
+
{ id: "sao10k/l3.1-euryale-70b", name: "Sao10K: Llama 3.1 Euryale 70B v2.2" },
|
|
289
|
+
{ id: "openai/gpt-4o-2024-08-06", name: "OpenAI: GPT-4o (2024-08-06)" },
|
|
290
|
+
{ id: "meta-llama/llama-3.1-70b-instruct", name: "Meta: Llama 3.1 70B Instruct" },
|
|
291
|
+
{ id: "meta-llama/llama-3.1-8b-instruct", name: "Meta: Llama 3.1 8B Instruct" },
|
|
292
|
+
{ id: "mistralai/mistral-nemo", name: "Mistral: Mistral Nemo" },
|
|
293
|
+
{ id: "openai/gpt-4o-mini", name: "OpenAI: GPT-4o-mini" },
|
|
294
|
+
{ id: "openai/gpt-4o-mini-2024-07-18", name: "OpenAI: GPT-4o-mini (2024-07-18)" },
|
|
295
|
+
{ id: "openai/gpt-4o", name: "OpenAI: GPT-4o" },
|
|
296
|
+
{ id: "openai/gpt-4o-2024-05-13", name: "OpenAI: GPT-4o (2024-05-13)" },
|
|
297
|
+
{ id: "mistralai/mixtral-8x22b-instruct", name: "Mistral: Mixtral 8x22B Instruct" },
|
|
298
|
+
{ id: "openai/gpt-4-turbo", name: "OpenAI: GPT-4 Turbo" },
|
|
299
|
+
{ id: "anthropic/claude-3-haiku", name: "Anthropic: Claude 3 Haiku" },
|
|
300
|
+
{ id: "mistralai/mistral-large", name: "Mistral Large" },
|
|
301
|
+
{ id: "openai/gpt-3.5-turbo-0613", name: "OpenAI: GPT-3.5 Turbo (older v0613)" },
|
|
302
|
+
{ id: "openai/gpt-4-turbo-preview", name: "OpenAI: GPT-4 Turbo Preview" },
|
|
303
|
+
{ id: "openai/gpt-3.5-turbo-16k", name: "OpenAI: GPT-3.5 Turbo 16k" },
|
|
304
|
+
{ id: "openai/gpt-3.5-turbo", name: "OpenAI: GPT-3.5 Turbo" },
|
|
305
|
+
{ id: "openai/gpt-4", name: "OpenAI: GPT-4" },
|
|
306
|
+
{ id: "stepfun/step-3.7-flash:free", name: "StepFun: Step 3.7 Flash" },
|
|
307
|
+
{ id: "zai/GLM-5.1:US", name: "zai/GLM-5.1" },
|
|
308
|
+
{ id: "meta/muse-spark-1.1", name: "meta/muse-spark-1.1" },
|
|
309
|
+
],
|
|
310
|
+
serviceKinds: ["llm"],
|
|
311
|
+
passthroughModels: true,
|
|
312
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{r as ct,v as rs,u as is,j as e,B as c,M as $,C as os,f as cs}from"./index.BUwEfcda.js";import{b as s}from"./router.Cjj1--8t.js";import{C as dt,I as te,T as Me}from"./NoAuthProxyCard.DYzT0KlD.js";import{C as ut}from"./Loading.C4opFudF.js";const ds=["zh-CN","zh-TW"],us=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],He=2e3,mt=3e5,ms=5e3,Fe=5,hs=1e4,xs=5e3;async function ht(h){if(!h)return!1;try{return(await fetch(`${h}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(xs)})).ok}catch{return!1}}async function ps(...h){const d=h.filter(Boolean).map(ht);return d.length?new Promise(x=>{let j=d.length;d.forEach(U=>U.then(b=>{b?x(!0):--j===0&&x(!1)}))}):!1}const Ke=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}];function fs({machineId:h}){const[d,x]=s.useState([]),[j,U]=s.useState(!0),[b,N]=s.useState(!1),[se,ae]=s.useState(""),[je,we]=s.useState(null),[w,z]=s.useState(null),[ne,We]=s.useState(!1),[B,xt]=s.useState(!0),[qe,pt]=s.useState(!0),[$e,ze]=s.useState(!1),[js,ft]=s.useState(!0),[ws,gt]=s.useState(!1),[Be,Ve]=s.useState("full"),[vs,bt]=s.useState(!1),[Je,Ge]=s.useState(""),[ks,yt]=s.useState(!1),[L,ve]=s.useState({installed:!1,running:!1,python:null,loading:!0}),[Ns,Cs]=s.useState(!1),[Ts,le]=s.useState(!1),[Ss,Xe]=s.useState(""),[Es,jt]=s.useState(!1),[Ps,wt]=s.useState("full"),[_s,vt]=s.useState(!1),[As,kt]=s.useState("full"),[Nt,Ye]=s.useState("en"),[Ct,ke]=s.useState(!0),[p,re]=s.useState(!1),[R,ie]=s.useState(!1),[I,oe]=s.useState(""),[D,Ne]=s.useState(""),[P,C]=s.useState(!1),[Tt,T]=s.useState(""),[ce,v]=s.useState(null),[St,V]=s.useState(!1),[Et,J]=s.useState(!1),[f,O]=s.useState(!1),[M,de]=s.useState(!1),[H,F]=s.useState(""),[_,G]=s.useState(!1),[Pt,A]=s.useState(""),[K,u]=s.useState(null),[Qe,Ze]=s.useState(""),[_t,et]=s.useState(""),[Ce,ue]=s.useState(null),[me,Te]=s.useState(!1),[Se,Ee]=s.useState([]),[At,tt]=s.useState(""),[Ut,Pe]=s.useState(!1),[Lt,W]=s.useState(!1),[Rt,X]=s.useState(!1),he=s.useRef(null),Y=s.useRef(0),Q=s.useRef(0),xe=s.useRef(!1),pe=s.useRef(!1),fe=s.useRef(!1),ge=s.useRef(!1),[It,_e]=s.useState(!1),[Dt,Ae]=s.useState(!1),[Ue,st]=s.useState(new Set),[Ot,Mt]=s.useState(!1);s.useEffect(()=>{typeof window<"u"&&Mt(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),s.useEffect(()=>(Ye(ct()),rs(()=>Ye(ct()))),[]);const Le=ds.includes(Nt);Le||Ke.filter(t=>!t.wenyan),s.useEffect(()=>{const t=Ke.find(a=>a.id===Be);t!=null&&t.wenyan&&!Le&&(Ve("ultra"),$t({cavemanLevel:"ultra"}))},[Le,Be]);const{copied:q,copy:Z}=is(),Ht=!B||!qe,Ft=B?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';s.useEffect(()=>{he.current&&(he.current.scrollTop=he.current.scrollHeight)},[Se]),s.useEffect(()=>{nt(),Kt()},[]),s.useEffect(()=>{if(!(p||f))return;const n=(!p||R)&&(!f||M),r=()=>{document.hidden||at()};if(document.addEventListener("visibilitychange",r),n)return()=>document.removeEventListener("visibilitychange",r);const o=setInterval(()=>{document.hidden||at()},ms);return()=>{clearInterval(o),document.removeEventListener("visibilitychange",r)}},[p,f,R,M]),s.useEffect(()=>{const t=async()=>{if(!document.hidden){if(p&&(I||D)){const o=await ps(D,I);xe.current=o,o?(Y.current=0,ie(!0),fe.current||(fe.current=!0,_e(!0))):(Y.current+=1,Y.current>=Fe&&ie(!1))}else xe.current=!1;if(f&&H){const o=await ht(H);pe.current=o,o?(Q.current=0,de(!0),ge.current||(ge.current=!0,Ae(!0))):(Q.current+=1,Q.current>=Fe&&de(!1))}else pe.current=!1}};if(!(p&&(I||D)||f&&H)||(t(),(!p||R)&&(!f||M)))return;const r=setInterval(t,hs);return()=>clearInterval(r)},[p,I,D,f,H,R,M]);const be=s.useCallback((t,a,l,n,r,o)=>{a.current?(l.current=0,n(!0),r.current||(r.current=!0,o(!0))):(l.current+=1,l.current>=Fe&&n(!1))},[]),at=async()=>{var t,a,l,n,r,o,m;try{const y=await fetch("/api/tunnel/status",{cache:"no-store"});if(!y.ok)return;const g=await y.json(),i=((t=g.tunnel)==null?void 0:t.settingsEnabled)??((a=g.tunnel)==null?void 0:a.enabled)??!1,E=((l=g.tunnel)==null?void 0:l.tunnelUrl)||"";oe(E),Ne(((n=g.tunnel)==null?void 0:n.publicUrl)||""),re(i),be(null,xe,Y,ie,fe,_e);const k=((r=g.tailscale)==null?void 0:r.settingsEnabled)??((o=g.tailscale)==null?void 0:o.enabled)??!1,Oe=((m=g.tailscale)==null?void 0:m.tunnelUrl)||"";F(Oe),O(k),be(null,pe,Q,de,ge,Ae)}catch{}},Kt=async()=>{var t,a,l,n,r,o,m;ke(!0);try{const[y,g]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(y.ok){const i=await y.json();We(i.requireApiKey||!1),xt(i.requireLogin!==!1),pt(i.hasPassword||!1),ze(i.tunnelDashboardAccess||!1),ft(i.rtkEnabled!==!1),gt(!!i.cavemanEnabled),Ve(i.cavemanLevel||"full"),bt(!!i.headroomEnabled),Ge(i.headroomUrl||""),yt(!!i.headroomCompressUserMessages),jt(!!i.ponytailEnabled),wt(i.ponytailLevel||"full"),vt(!!i.paleoEnabled),kt(i.paleoLevel||"full"),ee()}if(g.ok){const i=await g.json(),E=((t=i.tunnel)==null?void 0:t.settingsEnabled)??((a=i.tunnel)==null?void 0:a.enabled)??!1,k=((l=i.tunnel)==null?void 0:l.tunnelUrl)||"";oe(k),Ne(((n=i.tunnel)==null?void 0:n.publicUrl)||""),re(E),be(null,xe,Y,ie,fe,_e);const Oe=((r=i.tailscale)==null?void 0:r.settingsEnabled)??((o=i.tailscale)==null?void 0:o.enabled)??!1,ls=((m=i.tailscale)==null?void 0:m.tunnelUrl)||"";F(ls),O(Oe),be(null,pe,Q,de,ge,Ae)}}catch(y){console.log("Error loading settings:",y)}finally{ke(!1)}},Wt=async t=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:t})})).ok&&ze(t)}catch(a){console.log("Error updating tunnelDashboardAccess:",a)}},qt=async t=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:t})})).ok&&We(t)}catch(a){console.log("Error updating requireApiKey:",a)}},$t=async t=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(a){console.log("Error updating setting:",a)}},ee=s.useCallback(async()=>{ve(t=>({...t,loading:!0}));try{const a=await(await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}})).json();ve({...a,loading:!1}),a.url&&!Je&&Ge(a.url)}catch{ve({installed:!1,running:!1,python:null,loading:!1})}},[Je]);s.useCallback(async()=>{Xe(""),le(!0);try{const t=await fetch("/api/headroom/start",{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw new Error(a.error||"Failed to start proxy");await ee()}catch(t){Xe(t.message)}finally{le(!1)}},[ee]),s.useCallback(async()=>{le(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await ee()}finally{le(!1)}},[ee]);const nt=async()=>{try{const t=await fetch("/api/keys"),a=await t.json();t.ok&&x(a.keys||[])}catch(t){console.log("Error fetching data:",t)}finally{U(!1)}},zt=async(...t)=>{var n;C(!0),T("Waiting for tunnel ready...");const a=t.filter(Boolean).map(r=>`${r}/api/health`),l=Date.now();for(;Date.now()-l<mt;){if(await new Promise(o=>setTimeout(o,He)),await Promise.any(a.map(async o=>{if((await fetch(o,{mode:"cors",cache:"no-store"})).ok)return!0;throw new Error("not ready")})).catch(()=>!1))return re(!0),C(!1),T(""),!0;if((Date.now()-l)%1e4<He)try{const o=await fetch("/api/tunnel/status");if(o.ok&&!((n=(await o.json()).tunnel)!=null&&n.enabled))return v({type:"error",message:"Tunnel process stopped unexpectedly."}),C(!1),T(""),!1}catch{}}return v({type:"error",message:"Tunnel created but not reachable. Please try again."}),C(!1),T(""),!1},Bt=async()=>{V(!1),C(!0),v(null),T("Creating tunnel...");let t=!0;(async()=>{var l;for(;t;){try{const n=await fetch("/api/tunnel/status");if(n.ok){const r=await n.json();(l=r.download)!=null&&l.downloading?T(`Downloading cloudflared... ${r.download.progress}%`):t&&T("Creating tunnel...")}}catch{}await new Promise(n=>setTimeout(n,1e3))}})();try{const l=await fetch("/api/tunnel/enable",{method:"POST"});t=!1;const n=await l.json();if(!l.ok){v({type:"error",message:n.error||"Failed to enable tunnel"});return}const r=n.tunnelUrl;if(!r){v({type:"error",message:"No tunnel URL returned"});return}oe(r),Ne(n.publicUrl||""),await zt(n.publicUrl,r)}catch(l){v({type:"error",message:l.message})}finally{t=!1,C(!1),T("")}},Vt=async()=>{C(!0),v(null);try{const t=await fetch("/api/tunnel/disable",{method:"POST"}),a=await t.json();t.ok?(re(!1),oe(""),J(!1),v({type:"success",message:"Tunnel disabled"})):v({type:"error",message:a.error||"Failed to disable tunnel"})}catch(t){v({type:"error",message:t.message})}finally{C(!1)}},Jt=async()=>{ue(null);try{const t=await fetch("/api/tunnel/tailscale-check");if(t.ok){const a=await t.json();return ue(a.installed),a}}catch{}return ue(!1),{installed:!1}},Gt=async()=>{Te(!0),u(null),Ee([]);try{const t=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:At})});tt("");const a=t.body.getReader(),l=new TextDecoder;let n="";for(;;){const{done:r,value:o}=await a.read();if(r)break;n+=l.decode(o,{stream:!0});const m=n.split(`
|
|
2
|
+
|
|
3
|
+
`);n=m.pop()||"";for(const y of m){const g=y.split(`
|
|
4
|
+
`);let i="progress",E=null;for(const k of g)if(k.startsWith("event: ")&&(i=k.slice(7).trim()),k.startsWith("data: "))try{E=JSON.parse(k.slice(6))}catch{}if(E)if(i==="progress")Ee(k=>[...k.slice(-50),E.message]);else if(i==="done"){ue(!0),Te(!1),W(!1),Ie();return}else i==="error"&&u({type:"error",message:E.error||"Install failed"})}}}catch(t){u({type:"error",message:t.message})}finally{Te(!1)}},Re=async t=>{A("Waiting for Tailscale ready...");const a=`${t}/api/health`,l=Date.now();for(;Date.now()-l<mt;){await new Promise(n=>setTimeout(n,He));try{const n=await fetch(a,{mode:"no-cors",cache:"no-store"});if(n.ok||n.type==="opaque")return!0}catch{}}return!1},lt=(t,a)=>{Ze(t),et(a)},S=()=>{Ze(""),et("")},Ie=async()=>{W(!1),Pe(!0),G(!0),u(null),A("Connecting..."),S();try{const t=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),a=await t.json();if(t.ok&&a.success){F(a.tunnelUrl||"");const l=await Re(a.tunnelUrl);O(!0),u(l?null:{type:"warning",message:"Connected but not reachable yet."});return}if(a.needsLogin&&a.authUrl){lt(a.authUrl,"Open Login Page"),A('Login required — click "Open Login Page" to continue');for(let l=0;l<40;l++){await new Promise(n=>setTimeout(n,3e3));try{const n=await fetch("/api/tunnel/tailscale-check");if(n.ok&&(await n.json()).loggedIn){S(),A("Starting funnel...");const o=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),m=await o.json();if(o.ok&&m.success){F(m.tunnelUrl||"");const y=await Re(m.tunnelUrl);O(!0),u(y?null:{type:"warning",message:"Connected but not reachable yet."})}else m.funnelNotEnabled&&m.enableUrl?await rt(m.enableUrl):u({type:"error",message:m.error||"Failed to start funnel"});return}}catch{}}S(),u({type:"error",message:"Login timed out. Please try again."});return}if(a.funnelNotEnabled&&a.enableUrl){await rt(a.enableUrl);return}u({type:"error",message:a.error||"Failed to connect"})}catch(t){u({type:"error",message:t.message})}finally{G(!1),Pe(!1),A(""),S()}},rt=async t=>{lt(t,"Open Funnel Settings"),A('Click "Open Funnel Settings" to enable Funnel...');for(let a=0;a<40;a++){await new Promise(l=>setTimeout(l,3e3));try{const l=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),n=await l.json();if(l.ok&&n.success){S(),F(n.tunnelUrl||"");const r=await Re(n.tunnelUrl);O(!0),u(r?null:{type:"warning",message:"Connected but not reachable yet."});return}if(n.funnelNotEnabled)continue;if(n.error){S(),u({type:"error",message:n.error});return}}catch{}}S(),u({type:"error",message:"Timed out waiting for Funnel to be enabled."})},Xt=async()=>{G(!0),u(null);try{const t=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),a=await t.json();t.ok?(O(!1),F(""),X(!1),u({type:"success",message:"Tailscale disabled"})):u({type:"error",message:a.error||"Failed to disable Tailscale"})}catch(t){u({type:"error",message:t.message})}finally{G(!1)}},it=async()=>{u(null),Ee([]);const t=await Jt();t!=null&&t.installed&&(t!=null&&t.hasCachedPassword)?Ie():W(!0)},Yt=async()=>{if(se.trim())try{const t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:se})}),a=await t.json();t.ok&&(we(a.key),await nt(),ae(""),N(!1))}catch(t){console.log("Error creating key:",t)}},Qt=async t=>{z({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{z(null);try{(await fetch(`/api/keys/${t}`,{method:"DELETE"})).ok&&(x(d.filter(l=>l.id!==t)),st(l=>{const n=new Set(l);return n.delete(t),n}))}catch(a){console.log("Error deleting key:",a)}}})},ot=async(t,a)=>{try{(await fetch(`/api/keys/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})})).ok&&x(n=>n.map(r=>r.id===t?{...r,isActive:a}:r))}catch(l){console.log("Error toggling key:",l)}},Zt=t=>t?t.length>8?t.slice(0,8)+"...":t:"",es=t=>{st(a=>{const l=new Set(a);return l.has(t)?l.delete(t):l.add(t),l})},[ts,ss]=s.useState("/v1");if(s.useEffect(()=>{typeof window<"u"&&ss(`${window.location.origin}/v1`)},[]),j)return e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(ut,{}),e.jsx(ut,{})]});const as=ts,ns=!!L.running,De=L.localUrl!==!1;return L.canStart,De&&L.managedPid,L.loading||ns||De&&L.installed,e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsxs(dt,{children:[e.jsxs("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(gs,{label:"Local",url:as,copyId:"local_url",copied:q,onCopy:Z}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${p?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),p&&!P&&R?e.jsxs(e.Fragment,{children:[e.jsx(te,{value:`${D||I}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),e.jsx("button",{onClick:()=>Z(`${D||I}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:q==="tunnel_url"?"check":"content_copy"})}),e.jsx("button",{onClick:()=>J(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):p&&!P&&!R?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),It?"Tunnel reconnecting...":"Tunnel checking..."]}),e.jsx("button",{onClick:()=>J(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):P?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),Tt||"Creating tunnel..."]}),e.jsx("button",{onClick:()=>{C(!1),T("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(ce==null?void 0:ce.type)==="error"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"error"}),ce.message]}),e.jsx(c,{size:"sm",icon:"cloud_upload",onClick:()=>V(!0),children:"Enable"})]}):Ct?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),e.jsx("button",{onClick:()=>ke(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):e.jsx(c,{size:"sm",icon:"cloud_upload",onClick:()=>{V(!0)},children:"Enable"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${f?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),f&&!_&&M?e.jsxs(e.Fragment,{children:[e.jsx(te,{value:`${H}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),e.jsx("button",{onClick:()=>Z(`${H}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:q==="ts_url"?"check":"content_copy"})}),e.jsx("button",{onClick:()=>X(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):f&&!_&&!M?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),Dt?"Tailscale reconnecting...":"Tailscale checking..."]}),e.jsx("button",{onClick:()=>X(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):_||Ut?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),Pt||"Connecting..."]}),Qe&&e.jsx(c,{size:"sm",icon:"open_in_new",onClick:()=>window.open(Qe,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:_t||"Open"}),e.jsx("button",{onClick:()=>{G(!1),Pe(!1),A(""),S()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(K==null?void 0:K.type)==="error"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[e.jsx("span",{className:"material-symbols-outlined text-sm",children:"error"}),K.message]}),e.jsx(c,{size:"sm",icon:"vpn_lock",onClick:it,children:"Enable"})]}):e.jsx(c,{size:"sm",icon:"vpn_lock",onClick:()=>{it()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"})]})]}),Ht&&!p&&!f&&e.jsx("div",{className:"mt-4",children:e.jsx(ye,{message:Ft,action:{label:"Open settings",href:"/dashboard/profile"}})}),(p||f)&&e.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[!ne&&e.jsx(ye,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!B||!qe)&&e.jsx(ye,{message:B?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:B?"Change password":"Enable",href:"/dashboard/profile"}})]}),(p||f)&&e.jsxs("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[e.jsx(Me,{checked:$e,onChange:()=>Wt(!$e)}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),e.jsx(ys,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),e.jsxs(dt,{id:"require-api-key",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),e.jsx(c,{icon:"add",onClick:()=>N(!0),children:"Create Key"})]}),e.jsxs("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Require API key"}),e.jsx("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),e.jsx(Me,{checked:ne,onChange:()=>qt(!ne)})]}),Ot&&!ne&&e.jsx("div",{className:"mb-4 -mt-2",children:e.jsx(ye,{message:"Endpoint is exposed without an API key."})}),d.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:e.jsx("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),e.jsx("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),e.jsx("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),e.jsx(c,{icon:"add",onClick:()=>N(!0),children:"Create Key"})]}):e.jsx("div",{className:"flex flex-col",children:d.map(t=>e.jsxs("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${t.isActive===!1?"opacity-60":""}`,children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium",children:t.name}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("code",{className:"text-xs text-text-muted font-mono",children:Ue.has(t.id)?t.key:Zt(t.key)}),e.jsx("button",{onClick:()=>es(t.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:Ue.has(t.id)?"Hide key":"Show key",children:e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:Ue.has(t.id)?"visibility_off":"visibility"})}),e.jsx("button",{onClick:()=>Z(t.key,t.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:q===t.id?"check":"content_copy"})})]}),e.jsxs("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(t.createdAt).toLocaleDateString()]}),t.isActive===!1&&e.jsx("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Me,{size:"sm",checked:t.isActive??!0,onChange:a=>{t.isActive&&!a?z({title:"Pause API Key",message:`Pause API key "${t.name}"?
|
|
5
|
+
|
|
6
|
+
This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{z(null),ot(t.id,a)}}):ot(t.id,a)},title:t.isActive?"Pause key":"Resume key"}),e.jsx("button",{onClick:()=>Qt(t.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},t.id))})]}),e.jsx($,{isOpen:b,title:"Create API Key",onClose:()=>{N(!1),ae("")},children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(te,{label:"Key Name",value:se,onChange:t=>ae(t.target.value),placeholder:"Production Key"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:Yt,fullWidth:!0,disabled:!se.trim(),children:"Create"}),e.jsx(c,{onClick:()=>{N(!1),ae("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),e.jsx($,{isOpen:!!je,title:"API Key Created",onClose:()=>we(null),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),e.jsx("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(te,{value:je||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),e.jsx(c,{variant:"secondary",icon:q==="created_key"?"check":"content_copy",onClick:()=>Z(je,"created_key"),children:q==="created_key"?"Copied!":"Copy"})]}),e.jsx(c,{onClick:()=>we(null),fullWidth:!0,children:"Done"})]})}),e.jsx($,{isOpen:St,title:"Enable Tunnel",onClose:()=>V(!1),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),e.jsx("p",{className:"text-sm text-text-muted",children:"Expose your local FSRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:us.map(t=>e.jsxs("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[e.jsx("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:t.icon}),e.jsx("p",{className:"text-xs font-semibold",children:t.title}),e.jsx("p",{className:"text-xs text-text-muted",children:t.desc})]},t.title))}),e.jsx("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:Bt,fullWidth:!0,children:"Start Tunnel"}),e.jsx(c,{onClick:()=>V(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),e.jsx($,{isOpen:Et,title:"Disable Tunnel",onClose:()=>!P&&J(!1),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:Vt,fullWidth:!0,disabled:P,variant:"danger",children:P?"Disabling...":"Disable"}),e.jsx(c,{onClick:()=>J(!1),variant:"ghost",fullWidth:!0,disabled:P,children:"Cancel"})]})]})}),e.jsx($,{isOpen:Lt,title:"Tailscale Funnel",onClose:()=>{me||(W(!1),tt(""),u(null))},children:e.jsxs("div",{className:"flex flex-col gap-4",children:[Ce===null&&e.jsxs("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),Ce===!1&&!me&&e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:Gt,fullWidth:!0,children:"Install Tailscale"}),e.jsx(c,{onClick:()=>W(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),me&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[e.jsx("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),Se.length>0&&e.jsx("div",{ref:he,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:Se.map((t,a)=>e.jsx("div",{children:t},a))})]}),Ce===!0&&!me&&e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:()=>Ie(),fullWidth:!0,children:"Connect"}),e.jsx(c,{onClick:()=>W(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),K&&e.jsx(bs,{status:K})]})}),e.jsx($,{isOpen:Rt,title:"Disable Tailscale",onClose:()=>!_&&X(!1),children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{onClick:Xt,fullWidth:!0,disabled:_,variant:"danger",children:_?"Disabling...":"Disable"}),e.jsx(c,{onClick:()=>X(!1),variant:"ghost",fullWidth:!0,disabled:_,children:"Cancel"})]})]})}),e.jsx(os,{isOpen:!!w,onClose:()=>z(null),onConfirm:w==null?void 0:w.onConfirm,title:(w==null?void 0:w.title)||"Confirm",message:w==null?void 0:w.message,variant:"danger"})]})}function gs({label:h,url:d,copyId:x,copied:j,onCopy:U,badge:b,actions:N}){return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${b==="CF"||b==="TS"?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:h}),e.jsx(te,{value:d,readOnly:!0,className:"flex-1 font-mono text-sm"}),e.jsx("button",{onClick:()=>U(d,x),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:j===x?"check":"content_copy"})}),N]})}function bs({status:h,className:d=""}){const x=j=>j.split(/(https?:\/\/[^\s]+)/g).map((b,N)=>/^https?:\/\//.test(b)?e.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:b},N):b);return e.jsx("div",{className:`p-2 rounded text-sm ${d} ${h.type==="success"?"bg-green-500/10 text-green-600 dark:text-green-400":h.type==="warning"?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":h.type==="info"?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:x(h.message)})}function ys({text:h}){return e.jsxs("span",{className:"relative group inline-flex items-center",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),e.jsx("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:h})]})}function ye({message:h,action:d}){return e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),e.jsx("p",{className:"text-xs flex-1",children:h}),d&&e.jsx("a",{href:d.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:d.href.startsWith("#")?x=>{var j;x.preventDefault(),(j=document.getElementById(d.href.slice(1)))==null||j.scrollIntoView({behavior:"smooth"})}:void 0,children:d.label})]})}fs.propTypes={machineId:cs.string.isRequired};export{fs as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,n as t}from"./index.BUwEfcda.js";function r({size:n="md",className:s}){const i={sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"};return e.jsx("span",{className:t("material-symbols-outlined animate-spin text-brand-500",i[n],s),children:"progress_activity"})}function c({message:n="Loading..."}){return e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[e.jsx(r,{size:"xl"}),e.jsx("p",{className:"mt-4 text-text-muted",children:n})]})}function a({className:n,...s}){return e.jsx("div",{className:t("animate-pulse rounded-[10px] bg-surface-2",n),...s})}function d(){return e.jsxs("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(a,{className:"h-4 w-24"}),e.jsx(a,{className:"size-10 rounded-[10px]"})]}),e.jsx(a,{className:"h-8 w-16 mb-2"}),e.jsx(a,{className:"h-3 w-20"})]})}function x({type:n="spinner",...s}){switch(n){case"page":return e.jsx(c,{...s});case"skeleton":return e.jsx(a,{...s});case"card":return e.jsx(d,{...s});default:return e.jsx(r,{...s})}}export{d as C,x as L};
|