refactor: update web UI asset serving and embedding mechanism.
This commit is contained in:
1 parent
190881f13a
commit
888a0e6bff
17 files changed
+149
-748
No files matched your search
@@ -54,6 +54,10 @@ DS2API_ADMIN_KEY=admin
|
||||
# Built admin static assets directory
|
||||
# DS2API_STATIC_ADMIN_DIR=static/admin
|
||||
|
||||
# Auto-build WebUI on startup when static/admin is missing.
|
||||
# Default: enabled on local/Docker, disabled on Vercel.
|
||||
# DS2API_AUTO_BUILD_WEBUI=true
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Vercel sync integration (optional)
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
+2
-1
@@ -64,7 +64,8 @@ pnpm-lock.yaml
|
||||
*.tsbuildinfo
|
||||
.cache/
|
||||
.parcel-cache/
|
||||
# static/admin build output is versioned for serverless deployments
|
||||
static/admin/
|
||||
internal/webui/assets/admin/
|
||||
|
||||
# Environment
|
||||
.env.local
|
||||
|
||||
+8
-1
@@ -35,6 +35,9 @@ Build WebUI if `/admin` reports missing assets:
|
||||
|
||||
```bash
|
||||
./scripts/build-webui.sh
|
||||
|
||||
# Or rely on startup auto-build (enabled locally by default)
|
||||
# DS2API_AUTO_BUILD_WEBUI=true go run ./cmd/ds2api
|
||||
```
|
||||
|
||||
## 2. Docker Deployment
|
||||
@@ -62,7 +65,7 @@ Notes:
|
||||
|
||||
- Serverless entry: `api/index.go`
|
||||
- Rewrites and cache headers: `vercel.json`
|
||||
- Legacy `builds` has been removed to avoid the `unused-build-settings` warning
|
||||
- Build stage runs `npm ci --prefix webui && npm run build --prefix webui` automatically
|
||||
|
||||
Minimum environment variables:
|
||||
|
||||
@@ -79,6 +82,10 @@ Optional:
|
||||
|
||||
Recommended concurrency is computed dynamically as `account_count * per_account_inflight_limit` (default is `account_count * 2`).
|
||||
|
||||
Notes:
|
||||
- `static/admin` build output is not committed
|
||||
- Vercel/Docker generate WebUI assets during build
|
||||
|
||||
After deploy, verify:
|
||||
|
||||
- `/healthz`
|
||||
|
||||
@@ -35,6 +35,9 @@ go run ./cmd/ds2api
|
||||
|
||||
```bash
|
||||
./scripts/build-webui.sh
|
||||
|
||||
# 或依赖自动构建(默认本地开启)
|
||||
# DS2API_AUTO_BUILD_WEBUI=true go run ./cmd/ds2api
|
||||
```
|
||||
|
||||
## 2. Docker 部署
|
||||
@@ -62,7 +65,7 @@ docker-compose up -d --build
|
||||
|
||||
- serverless 入口:`api/index.go`
|
||||
- 路由与缓存头:`vercel.json`
|
||||
- 已移除 legacy `builds` 字段,避免 `unused-build-settings` 警告
|
||||
- 构建阶段会自动执行 `npm ci --prefix webui && npm run build --prefix webui`
|
||||
|
||||
至少配置环境变量:
|
||||
|
||||
@@ -79,6 +82,10 @@ docker-compose up -d --build
|
||||
|
||||
并发建议值会动态按 `账号数量 × 每账号并发上限` 计算(默认即 `账号数量 × 2`)。
|
||||
|
||||
说明:
|
||||
- 仓库不提交 `static/admin` 构建产物
|
||||
- Vercel / Docker 构建阶段自动生成 WebUI 静态文件
|
||||
|
||||
部署后建议先访问:
|
||||
|
||||
- `/healthz`
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
语言 / Language: [中文](README.MD) | [English](README.en.md)
|
||||
|
||||
将 DeepSeek Web 对话能力转换为 OpenAI 与 Claude 兼容 API。当前仓库后端为 **Go 全量实现**,前端保留 React WebUI(构建产物托管于 `static/admin`)。
|
||||
将 DeepSeek Web 对话能力转换为 OpenAI 与 Claude 兼容 API。当前仓库后端为 **Go 全量实现**,前端保留 React WebUI(源码在 `webui/`,部署时自动构建到 `static/admin`)。
|
||||
|
||||
## 当前实现边界
|
||||
|
||||
@@ -65,7 +65,8 @@ go run ./cmd/ds2api
|
||||
|
||||
默认地址:`http://localhost:5001`
|
||||
|
||||
如果访问 `/admin` 提示未构建 WebUI,请执行:
|
||||
本地默认会在启动时自动尝试构建 WebUI(需要本机有 Node.js/npm)。
|
||||
若你想手动构建,也可执行:
|
||||
|
||||
```bash
|
||||
./scripts/build-webui.sh
|
||||
@@ -85,12 +86,12 @@ docker-compose logs -f
|
||||
|
||||
- 入口:`api/index.go`
|
||||
- 路由重写:`vercel.json`
|
||||
- `vercel.json` 会在构建阶段自动执行 `npm ci --prefix webui && npm run build --prefix webui`
|
||||
- 至少配置:
|
||||
- `DS2API_ADMIN_KEY`
|
||||
- `DS2API_CONFIG_JSON`(JSON 字符串或 Base64)
|
||||
|
||||
说明:`vercel.json` 已移除 legacy `builds` 配置,避免部署时出现
|
||||
`unused-build-settings` 警告,并使用当前推荐的函数路由模式。
|
||||
说明:仓库不提交 `static/admin` 构建产物,Vercel 构建时自动生成并打包。
|
||||
|
||||
## Release 自动构建产物(GitHub Actions)
|
||||
|
||||
@@ -162,6 +163,7 @@ cp config.example.json config.json
|
||||
| `DS2API_CONFIG_JSON` | 直接注入配置(JSON 或 Base64) |
|
||||
| `DS2API_WASM_PATH` | PoW wasm 文件路径 |
|
||||
| `DS2API_STATIC_ADMIN_DIR` | 管理台静态文件目录 |
|
||||
| `DS2API_AUTO_BUILD_WEBUI` | 启动时缺失 WebUI 时是否自动执行 npm build(默认:本地开启,Vercel 关闭) |
|
||||
| `VERCEL_TOKEN` | Vercel 同步 token(可选) |
|
||||
| `VERCEL_PROJECT_ID` | Vercel 项目 ID(可选) |
|
||||
| `VERCEL_TEAM_ID` | Vercel 团队 ID(可选) |
|
||||
|
||||
+6
-4
@@ -8,7 +8,7 @@
|
||||
|
||||
Language: [中文](README.MD) | [English](README.en.md)
|
||||
|
||||
DS2API converts DeepSeek Web chat capability into OpenAI-compatible and Claude-compatible APIs. The current repository is **Go backend only** with the existing React WebUI kept as static assets under `static/admin`.
|
||||
DS2API converts DeepSeek Web chat capability into OpenAI-compatible and Claude-compatible APIs. The current repository is **Go backend only** with the existing React WebUI source in `webui/` and build output generated to `static/admin` during deployment.
|
||||
|
||||
## Implementation Boundary
|
||||
|
||||
@@ -65,7 +65,8 @@ go run ./cmd/ds2api
|
||||
|
||||
Default URL: `http://localhost:5001`
|
||||
|
||||
If `/admin` says WebUI not built:
|
||||
By default, local startup will auto-build WebUI when `static/admin` is missing (Node.js/npm required).
|
||||
If you prefer manual build:
|
||||
|
||||
```bash
|
||||
./scripts/build-webui.sh
|
||||
@@ -85,12 +86,12 @@ docker-compose logs -f
|
||||
|
||||
- Entrypoint: `api/index.go`
|
||||
- Rewrites: `vercel.json`
|
||||
- `vercel.json` runs `npm ci --prefix webui && npm run build --prefix webui` during build
|
||||
- Minimum env vars:
|
||||
- `DS2API_ADMIN_KEY`
|
||||
- `DS2API_CONFIG_JSON` (raw JSON or Base64)
|
||||
|
||||
Note: legacy `builds` has been removed from `vercel.json` to avoid
|
||||
the `unused-build-settings` warning and to follow the current function routing model.
|
||||
Note: build artifacts under `static/admin` are not committed; Vercel generates them during build.
|
||||
|
||||
## Release Artifact Automation (GitHub Actions)
|
||||
|
||||
@@ -162,6 +163,7 @@ cp config.example.json config.json
|
||||
| `DS2API_CONFIG_JSON` | Inline config (JSON or Base64) |
|
||||
| `DS2API_WASM_PATH` | PoW wasm path |
|
||||
| `DS2API_STATIC_ADMIN_DIR` | Admin static assets dir |
|
||||
| `DS2API_AUTO_BUILD_WEBUI` | Auto run npm build on startup when WebUI assets are missing (default: enabled locally, disabled on Vercel) |
|
||||
| `VERCEL_TOKEN` | Vercel sync token (optional) |
|
||||
| `VERCEL_PROJECT_ID` | Vercel project ID (optional) |
|
||||
| `VERCEL_TEAM_ID` | Vercel team ID (optional) |
|
||||
|
||||
@@ -7,9 +7,11 @@ import (
|
||||
|
||||
"ds2api/internal/config"
|
||||
"ds2api/internal/server"
|
||||
"ds2api/internal/webui"
|
||||
)
|
||||
|
||||
func main() {
|
||||
webui.EnsureBuiltOnStartup()
|
||||
app := server.NewApp()
|
||||
port := strings.TrimSpace(os.Getenv("PORT"))
|
||||
if port == "" {
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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 lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vu={exports:{}},Vl={},xu={exports:{}},z={};/**
|
||||
* @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"),of=Symbol.for("react.portal"),sf=Symbol.for("react.fragment"),af=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),cf=Symbol.for("react.provider"),df=Symbol.for("react.context"),ff=Symbol.for("react.forward_ref"),pf=Symbol.for("react.suspense"),mf=Symbol.for("react.memo"),hf=Symbol.for("react.lazy"),Wa=Symbol.iterator;function gf(e){return e===null||typeof e!="object"?null:(e=Wa&&e[Wa]||e["@@iterator"],typeof e=="function"?e:null)}var wu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ku=Object.assign,Su={};function Rn(e,t,n){this.props=e,this.context=t,this.refs=Su,this.updater=n||wu}Rn.prototype.isReactComponent={};Rn.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")};Rn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nu(){}Nu.prototype=Rn.prototype;function Bs(e,t,n){this.props=e,this.context=t,this.refs=Su,this.updater=n||wu}var Vs=Bs.prototype=new Nu;Vs.constructor=Bs;ku(Vs,Rn.prototype);Vs.isPureReactComponent=!0;var Qa=Array.isArray,ju=Object.prototype.hasOwnProperty,Ks={current:null},Cu={key:!0,ref:!0,__self:!0,__source:!0};function Eu(e,t,n){var r,l={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)ju.call(t,r)&&!Cu.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:_r,type:e,key:o,ref:s,props:l,_owner:Ks.current}}function yf(e,t){return{$$typeof:_r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Hs(e){return typeof e=="object"&&e!==null&&e.$$typeof===_r}function vf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ja=/\/+/g;function po(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vf(""+e.key):t.toString(36)}function rl(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case _r:case of:s=!0}}if(s)return s=e,l=l(s),e=r===""?"."+po(s,0):r,Qa(l)?(n="",e!=null&&(n=e.replace(Ja,"$&/")+"/"),rl(l,t,n,"",function(c){return c})):l!=null&&(Hs(l)&&(l=yf(l,n+(!l.key||s&&s.key===l.key?"":(""+l.key).replace(Ja,"$&/")+"/")+e)),t.push(l)),1;if(s=0,r=r===""?".":r+":",Qa(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+po(o,a);s+=rl(o,t,n,u,l)}else if(u=gf(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+po(o,a++),s+=rl(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Fr(e,t,n){if(e==null)return e;var r=[],l=0;return rl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function xf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var xe={current:null},ll={transition:null},wf={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:ll,ReactCurrentOwner:Ks};function _u(){throw Error("act(...) is not supported in production builds of React.")}z.Children={map:Fr,forEach:function(e,t,n){Fr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fr(e,function(){t++}),t},toArray:function(e){return Fr(e,function(t){return t})||[]},only:function(e){if(!Hs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Component=Rn;z.Fragment=sf;z.Profiler=uf;z.PureComponent=Bs;z.StrictMode=af;z.Suspense=pf;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wf;z.act=_u;z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ku({},e.props),l=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ks.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)ju.call(t,u)&&!Cu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:_r,type:e.type,key:l,ref:o,props:r,_owner:s}};z.createContext=function(e){return e={$$typeof:df,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.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 Sf=y,Nf=Symbol.for("react.element"),jf=Symbol.for("react.fragment"),Cf=Object.prototype.hasOwnProperty,Ef=Sf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_f={key:!0,ref:!0,__self:!0,__source:!0};function Pu(e,t,n){var r,l={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Cf.call(t,r)&&!_f.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Nf,type:e,key:o,ref:s,props:l,_owner:Ef.current}}Vl.Fragment=jf;Vl.jsx=Pu;Vl.jsxs=Pu;vu.exports=Vl;var i=vu.exports,Bo={},bu={exports:{}},Le={},Tu={exports:{}},Ru={};/**
|
||||
* @license React
|
||||
* scheduler.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.
|
||||
*/(function(e){function t(_,L){var I=_.length;_.push(L);e:for(;0<I;){var B=I-1>>>1,$=_[B];if(0<l($,L))_[B]=L,_[I]=$,I=B;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var L=_[0],I=_.pop();if(I!==L){_[0]=I;e:for(var B=0,$=_.length,ke=$>>>1;B<ke;){var Ae=2*(B+1)-1,wt=_[Ae],Oe=Ae+1,ot=_[Oe];if(0>l(wt,I))Oe<$&&0>l(ot,wt)?(_[B]=ot,_[Oe]=I,B=Oe):(_[B]=wt,_[Ae]=I,B=Ae);else if(Oe<$&&0>l(ot,I))_[B]=ot,_[Oe]=I,B=Oe;else break e}}return L}function l(_,L){var I=_.sortIndex-L.sortIndex;return I!==0?I:_.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],h=1,m=null,g=3,v=!1,k=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,p=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 f(_){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=_)r(c),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(c)}}function x(_){if(w=!1,f(_),!k)if(n(u)!==null)k=!0,Ve(S);else{var L=n(c);L!==null&<(x,L.startTime-_)}}function S(_,L){k=!1,w&&(w=!1,p(b),b=-1),v=!0;var I=g;try{for(f(L),m=n(u);m!==null&&(!(m.expirationTime>L)||_&&!ge());){var B=m.callback;if(typeof B=="function"){m.callback=null,g=m.priorityLevel;var $=B(m.expirationTime<=L);L=e.unstable_now(),typeof $=="function"?m.callback=$:m===n(u)&&r(u),f(L)}else r(u);m=n(u)}if(m!==null)var ke=!0;else{var Ae=n(c);Ae!==null&<(x,Ae.startTime-L),ke=!1}return ke}finally{m=null,g=I,v=!1}}var C=!1,E=null,b=-1,O=5,R=-1;function ge(){return!(e.unstable_now()-R<O)}function xt(){if(E!==null){var _=e.unstable_now();R=_;var L=!0;try{L=E(!0,_)}finally{L?se():(C=!1,E=null)}}else C=!1}var se;if(typeof d=="function")se=function(){d(xt)};else if(typeof MessageChannel<"u"){var rn=new MessageChannel,zn=rn.port2;rn.port1.onmessage=xt,se=function(){zn.postMessage(null)}}else se=function(){N(xt,0)};function Ve(_){E=_,C||(C=!0,se())}function lt(_,L){b=N(function(){_(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,Ve(S))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(_){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var I=g;g=L;try{return _()}finally{g=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,L){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=g;g=_;try{return L()}finally{g=I}},e.unstable_scheduleCallback=function(_,L,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,_){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=I+$,_={id:h++,callback:L,priorityLevel:_,startTime:I,expirationTime:$,sortIndex:-1},I>B?(_.sortIndex=I,t(c,_),n(u)===null&&_===n(c)&&(w?(p(b),b=-1):w=!0,lt(x,I-B))):(_.sortIndex=$,t(u,_),k||v||(k=!0,Ve(S))),_},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(_){var L=g;return function(){var I=g;g=L;try{return _.apply(this,arguments)}finally{g=I}}}})(Ru);Tu.exports=Ru;var Pf=Tu.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 bf=y,Re=Pf;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lu=new Set,ur={};function tn(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(ur[e]=t,e=0;e<t.length;e++)Lu.add(t[e])}var ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vo=Object.prototype.hasOwnProperty,Tf=/^[: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]*$/,Ga={},Ya={};function Rf(e){return Vo.call(Ya,e)?!0:Vo.call(Ga,e)?!1:Tf.test(e)?Ya[e]=!0:(Ga[e]=!0,!1)}function Lf(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 If(e,t,n,r){if(t===null||typeof t>"u"||Lf(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 we(e,t,n,r,l,o,s){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=s}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new we(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){de[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ws=/[\-:]([a-z])/g;function Qs(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(Ws,Qs);de[t]=new we(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(Ws,Qs);de[t]=new we(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(Ws,Qs);de[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function Js(e,t,n,r){var l=de.hasOwnProperty(t)?de[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+mo+e}var ho=!1;function go(e,t){if(!e||ho)return"";ho=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
|
||||
`),o=r.stack.split(`
|
||||
`),s=l.length-1,a=o.length-1;1<=s&&0<=a&&l[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(l[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||l[s]!==o[a]){var u=`
|
||||
`+l[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{ho=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yn(e):""}function Mf(e){switch(e.tag){case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 2:case 15:return e=go(e.type,!1),e;case 11:return e=go(e.type.render,!1),e;case 1:return e=go(e.type,!0),e;default:return""}}function Qo(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 on:return"Portal";case Ko:return"Profiler";case Gs:return"StrictMode";case Ho:return"Suspense";case Wo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mu:return(e.displayName||"Context")+".Consumer";case Iu:return(e._context.displayName||"Context")+".Provider";case Ys:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qs:return t=e.displayName||null,t!==null?t:Qo(e.type)||"Memo";case Nt:t=e._payload,e=e._init;try{return Qo(e(t))}catch{}}return null}function Af(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 Qo(t);case 8:return t===Gs?"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 zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ou(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Of(e){var t=Ou(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(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ur(e){e._valueTracker||(e._valueTracker=Of(e))}function zu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ou(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yl(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 Jo(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zt(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 Du(e,t){t=t.checked,t!=null&&Js(e,"checked",t,!1)}function Go(e,t){Du(e,t);var n=zt(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")?Yo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yo(e,t.type,zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Za(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 Yo(e,t,n){(t!=="number"||yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function qo(e,t){if(t.dang
Line truncated
|
||||
`).replace(Wp,"")}function Gr(e,t,n){if(t=Si(t),Si(e)!==t&&n)throw Error(j(425))}function Cl(){}var cs=null,ds=null;function fs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ps=typeof setTimeout=="function"?setTimeout:void 0,Qp=typeof clearTimeout=="function"?clearTimeout:void 0,Ni=typeof Promise=="function"?Promise:void 0,Jp=typeof queueMicrotask=="function"?queueMicrotask:typeof Ni<"u"?function(e){return Ni.resolve(null).then(e).catch(Gp)}:ps;function Gp(e){setTimeout(function(){throw e})}function bo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),mr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);mr(t)}function Lt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ji(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var In=Math.random().toString(36).slice(2),et="__reactFiber$"+In,xr="__reactProps$"+In,pt="__reactContainer$"+In,ms="__reactEvents$"+In,Yp="__reactListeners$"+In,qp="__reactHandles$"+In;function Ht(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ji(e);e!==null;){if(n=e[et])return n;e=ji(e)}return t}e=n,n=e.parentNode}return null}function Tr(e){return e=e[et]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function dn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Jl(e){return e[xr]||null}var hs=[],fn=-1;function $t(e){return{current:e}}function Q(e){0>fn||(e.current=hs[fn],hs[fn]=null,fn--)}function V(e,t){fn++,hs[fn]=e.current,e.current=t}var Dt={},he=$t(Dt),je=$t(!1),Yt=Dt;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Dt;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 Ce(e){return e=e.childContextTypes,e!=null}function El(){Q(je),Q(he)}function Ci(e,t,n){if(he.current!==Dt)throw Error(j(168));V(he,t),V(je,n)}function Ec(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(j(108,Af(e)||"Unknown",l));return X({},n,r)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dt,Yt=he.current,V(he,e),V(je,je.current),!0}function Ei(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Ec(e,t,Yt),r.__reactInternalMemoizedMergedChildContext=e,Q(je),Q(he),V(he,e)):Q(je),V(je,n)}var at=null,Gl=!1,To=!1;function _c(e){at===null?at=[e]:at.push(e)}function Xp(e){Gl=!0,_c(e)}function Ut(){if(!To&&at!==null){To=!0;var e=0,t=U;try{var n=at;for(U=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}at=null,Gl=!1}catch(l){throw at!==null&&(at=at.slice(e+1)),Xu(Zs,Ut),l}finally{U=t,To=!1}}return null}var pn=[],mn=0,Pl=null,bl=0,ze=[],De=0,qt=null,it=1,ut="";function Vt(e,t){pn[mn++]=bl,pn[mn++]=Pl,Pl=e,bl=t}function Pc(e,t,n){ze[De++]=it,ze[De++]=ut,ze[De++]=qt,qt=e;var r=it;e=ut;var l=32-Je(r)-1;r&=~(1<<l),n+=1;var o=32-Je(t)+l;if(30<o){var s=l-l%5;o=(r&(1<<s)-1).toString(32),r>>=s,l-=s,it=1<<32-Je(t)+l|n<<l|r,ut=o+e}else it=1<<o|n<<l|r,ut=e}function ia(e){e.return!==null&&(Vt(e,1),Pc(e,1,0))}function ua(e){for(;e===Pl;)Pl=pn[--mn],pn[mn]=null,bl=pn[--mn],pn[mn]=null;for(;e===qt;)qt=ze[--De],ze[De]=null,ut=ze[--De],ze[De]=null,it=ze[--De],ze[De]=null}var Te=null,be=null,J=!1,Qe=null;function bc(e,t){var n=Fe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _i(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Te=e,be=Lt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Te=e,be=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qt!==null?{id:it,overflow:ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Fe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Te=e,be=null,!0):!1;default:return!1}}function gs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ys(e){if(J){var t=be;if(t){var n=t;if(!_i(e,t)){if(gs(e))throw Error(j(418));t=Lt(n.nextSibling);var r=Te;t&&_i(e,t)?bc(r,n):(e.flags=e.flags&-4097|2,J=!1,Te=e)}}else{if(gs(e))throw Error(j(418));e.flags=e.flags&-4097|2,J=!1,Te=e}}}function Pi(e){for(e=e.return;e!==null&&e.t
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Ao(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ks(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var am=typeof WeakMap=="function"?WeakMap:Map;function nd(e,t,n){n=ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zl||(zl=!0,Rs=r),ks(e,t)},n}function rd(e,t,n){n=ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ks(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ks(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Oi(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new am;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=km.bind(null,e,t,n),t.then(e,e))}function zi(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Di(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ct(-1,1),t.tag=2,It(n,t,1))),n.lanes|=1),e)}var im=yt.ReactCurrentOwner,Ne=!1;function ye(e,t,n,r){t.child=e===null?Lc(t,null,n,r):_n(t,e.child,n,r)}function Fi(e,t,n,r,l){n=n.render;var o=t.ref;return Sn(t,l),r=wa(e,t,n,r,o,l),n=ka(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ht(e,t,l)):(J&&n&&ia(t),t.flags|=1,ye(e,t,r,l),t.child)}function $i(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Ra(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ld(e,t,o,r,l)):(e=ml(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:gr,n(s,r)&&e.ref===t.ref)return ht(e,t,l)}return t.flags|=1,e=Ot(o,r),e.ref=t.ref,e.return=t,t.child=e}function ld(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(gr(o,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,ht(e,t,l)}return Ss(e,t,n,r,l)}function od(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},V(yn,Pe),Pe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,V(yn,Pe),Pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,V(yn,Pe),Pe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,V(yn,Pe),Pe|=r;return ye(e,t,l,n),t.child}function sd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,l){var o=Ce(n)?Yt:he.current;return o=Cn(t,o),Sn(t,l),n=wa(e,t,n,r,o,l),r=ka(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ht(e,t,l)):(J&&r&&ia(t),t.flags|=1,ye(e,t,n,l),t.child)}function Ui(e,t,n,r,l){if(Ce(n)){var o=!0;_l(t)}else o=!1;if(Sn(t,l),t.stateNode===null)dl(e,t),td(t,n,r),ws(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ue(c):(c=Ce(n)?Yt:he.current,c=Cn(t,c));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==c)&&Ai(t,s,r,c),jt=!1;var g=t.memoizedState;s.state=g,Ll(t,r,s,l),u=t.memoizedState,a!==r||g!==u||je.current||jt?(typeof h=="function"&&(xs(t,n,h,r),u=t.memoizedState),(a=jt||Mi(t,n,a,r,g,u,c))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Mc(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:He(t.type,a),s.props=c,m=t.pendingProps,g=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ue(u):(u=Ce(n)?Yt:he.current,u=Cn(t,u));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==m||g!==u)&&Ai(t,s,r,u),jt=!1,g=t.memoizedState,s.state=g,Ll(t,r,s,l);var k=t.memoizedState;a
Line truncated
|
||||
* react-router v7.13.0
|
||||
*
|
||||
* 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
|
||||
*/var tu="popstate";function Im(e={}){function t(r,l){let{pathname:o,search:s,hash:a}=r.location;return As("",{pathname:o,search:s,hash:a},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Er(l)}return Am(t,n,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mm(){return Math.random().toString(36).substring(2,10)}function nu(e,t){return{usr:e.state,key:e.key,idx:t}}function As(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mn(t):t,state:n,key:t&&t.key||r||Mm()}}function Er({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Mn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Am(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,s=l.history,a="POP",u=null,c=h();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function h(){return(s.state||{idx:null}).idx}function m(){a="POP";let N=h(),p=N==null?null:N-c;c=N,u&&u({action:a,location:w.location,delta:p})}function g(N,p){a="PUSH";let d=As(w.location,N,p);c=h()+1;let f=nu(d,c),x=w.createHref(d);try{s.pushState(f,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;l.location.assign(x)}o&&u&&u({action:a,location:w.location,delta:1})}function v(N,p){a="REPLACE";let d=As(w.location,N,p);c=h();let f=nu(d,c),x=w.createHref(d);s.replaceState(f,"",x),o&&u&&u({action:a,location:w.location,delta:0})}function k(N){return Om(N)}let w={get action(){return a},get location(){return e(l,s)},listen(N){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(tu,m),u=N,()=>{l.removeEventListener(tu,m),u=null}},createHref(N){return t(l,N)},createURL:k,encodeLocation(N){let p=k(N);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:g,replace:v,go(N){return s.go(N)}};return w}function Om(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),G(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Er(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Td(e,t,n="/"){return zm(e,t,n,!1)}function zm(e,t,n,r){let l=typeof t=="string"?Mn(t):t,o=gt(l.pathname||"/",n);if(o==null)return null;let s=Rd(e);Dm(s);let a=null;for(let u=0;a==null&&u<s.length;++u){let c=Gm(o);a=Qm(s[u],c,r)}return a}function Rd(e,t=[],n=[],r="",l=!1){let o=(s,a,u=l,c)=>{let h={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&u)return;G(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=dt([r,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(G(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Rd(s.children,t,g,m,u)),!(s.path==null&&!s.index)&&t.push({path:m,score:Hm(m,s.index),routesMeta:g})};return e.forEach((s,a)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))o(s,a);else for(let c of Ld(s.path))o(s,a,!0,c)}),t}function Ld(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 s=Ld(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Dm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Wm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Fm=/^:[\w-]+$/,$m=3,Um=2,Bm=1,Vm=10,Km=-2,ru=e=>e==="*";function Hm(e,t){let n=e.split("/"),r=n.length;return n.some(ru)&&(r+=Km),t&&(r+=Um),n.filter(l=>!ru(l)).reduce((l,o)=>l+(Fm.test(o)?$m:o===""?Bm:Vm),r)}function Wm(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 Qm(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",s=[];for(let a=0;a<r.length;++a){let u=r[a],c=a===r.length-1,h=o==="/"?t:t.slice(o.length)||"/",m=Ul({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},h),g=u.route;if(!m&&c&&n&&!r[r.length-1].route.index&&(m=Ul({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!m)return null;Object.assign(l,m.params),s.push({params:l,pathname:dt([o,m.pathname]),pathnameBase:Zm(dt([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=dt([o,m.pathnameBase]))}return s}function Ul(e,t){typeof e=="string"&&(e={path:e,c
Line truncated
|
||||
|
||||
Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let g=vt(),v;if(t){let f=typeof t=="string"?Mn(t):t;G(h==="/"||((d=f.pathname)==null?void 0:d.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${f.pathname}" was given in the \`location\` prop.`),v=f}else v=g;let k=v.pathname||"/",w=k;if(h!=="/"){let f=h.replace(/^\//,"").split("/");w="/"+k.replace(/^\//,"").split("/").slice(f.length).join("/")}let N=Td(e,{pathname:w});qe(m||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qe(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=wh(N&&N.map(f=>Object.assign({},f,{params:Object.assign({},u,f.params),pathname:dt([h,o.encodeLocation?o.encodeLocation(f.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?h:dt([h,o.encodeLocation?o.encodeLocation(f.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),s,n,r,l);return t&&p?y.createElement(Lr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},p):p}function gh(){let e=Ch(),t=rh(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:o},"ErrorBoundary")," or"," ",y.createElement("code",{style:o},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:l},n):null,s)}var yh=y.createElement(gh,null),Ud=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=fh(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(rt.Provider,{value:this.props.routeContext},y.createElement(Da.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(vh,{error:e},t):t}};Ud.contextType=sh;var $o=new WeakMap;function vh({children:e,error:t}){let{basename:n}=y.useContext(Me);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=dh(t.digest);if(r){let l=$o.get(t);if(l)throw l;let o=Md(r.location,n);if(Id&&!$o.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw $o.set(t,s),s}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function xh({routeContext:e,match:t,children:n}){let r=y.useContext(An);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(rt.Provider,{value:e},n)}function wh(e,t=[],n=null,r=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n==null?void 0:n.errors;if(s!=null){let h=o.findIndex(m=>m.route.id&&(s==null?void 0:s[m.route.id])!==void 0);G(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let a=!1,u=-1;if(n)for(let h=0;h<o.length;h++){let m=o[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=h),m.route.id){let{loaderData:g,errors:v}=n,k=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||Line truncated
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jd=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const dg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const au=e=>{const t=dg(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var fg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const pg=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const mg=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:s,...a},u)=>y.createElement("svg",{ref:u,...fg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jd("lucide",l),...!o&&!pg(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,h])=>y.createElement(c,h)),...Array.isArray(o)?o:[o]]));/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const A=(e,t)=>{const n=y.forwardRef(({className:r,...l},o)=>y.createElement(mg,{ref:o,iconNode:t,className:Jd(`lucide-${cg(au(e))}`,`lucide-${e}`,r),...l}));return n.displayName=au(e),n};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const hg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Gd=A("arrow-right",hg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gg=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],yg=A("bot",gg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bl=A("check",vg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ds=A("chevron-down",xg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const wg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],kg=A("chevron-left",wg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Sg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ng=A("chevron-right",Sg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const jg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Fs=A("circle-check",jg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Cg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Eg=A("circle-x",Cg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const _g=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Yd=A("cloud",_g);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Pg=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qd=A("copy",Pg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const bg=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Tg=A("cpu",bg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Rg=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Lg=A("download",Rg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ig=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],iu=A("external-link",Ig);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Mg=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Ag=A("file-code",Mg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Og=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zg=A("info",Og);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Dg=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Fg=A("key",Dg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $g=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],uu=A("layout-dashboard",$g);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ug=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bg=A("loader-circle",Ug);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Vg=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Kg=A("lock",Vg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Hg=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Wg=A("log-out",Hg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qg=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Jg=A("menu",Qg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Gg=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Yg=A("message-square",Gg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const qg=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xg=A("play",qg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],cu=A("plus",Zg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ey=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ty=A("refresh-cw",ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ny=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],du=A("search",ny);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ry=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ly=A("send",ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oy=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Xd=A("server",oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const sy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Zd=A("shield-check",sy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ay=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],iy=A("square",ay);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const uy=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],cy=A("terminal",uy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const dy=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],fy=A("toggle-left",dy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const py=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],my=A("toggle-right",py);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const hy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],fu=A("trash-2",hy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gy=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],yy=A("triangle-alert",gy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vy=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ef=A("upload",vy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xy=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],wy=A("user",xy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ky=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Sy=A("users",ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ny=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$s=A("x",Ny);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const jy=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pu=A("zap",jy);function tf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=tf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=tf(e))&&(r&&(r+=" "),r+=t);return r}const Cy={label:"Language",english:"English",chinese:"中文"},Ey={accounts:{label:"Account Management",desc:"Manage the DeepSeek account pool"},test:{label:"API Test",desc:"Test API connectivity and responses"},import:{label:"Batch Import",desc:"Bulk import account configuration"},vercel:{label:"Vercel Sync",desc:"Sync configuration to Vercel"}},_y={onlineAdminConsole:"Online Admin Console",systemStatus:"System Status",statusOnline:"Online",accounts:"Accounts",keys:"Keys",signOut:"Sign out"},Py={expired:"Authentication expired. Please sign in again.",checking:"Checking authentication status..."},by={fetchConfig:"Failed to fetch configuration: {error}"},Ty={cancel:"Cancel",add:"Add",delete:"Delete",copy:"Copy",generate:"Generate",test:"Test",testing:"Testing...",loading:"Loading..."},Ry={deleted:"Deleted successfully",deleteFailed:"Delete failed",failedToAdd:"Failed to add",networkError:"Network error.",requestFailed:"Request failed.",generationStopped:"Generation stopped.",invalidJson:"Invalid JSON format.",importFailed:"Import failed.",copyFailed:"Copy failed."},Ly={adminConsole:"Admin Console",apiStatus:"API Status",features:{compatibility:{title:"Full Compatibility",desc:"OpenAI & Claude format support"},loadBalancing:{title:"Load Balancing",desc:"Smart rotation with stable throughput"},reasoning:{title:"Deep Reasoning",desc:"Expose reasoning traces when enabled"},search:{title:"Web Search",desc:"Integrated native web search"}}},Iy={addKeySuccess:"API key added successfully.",addAccountSuccess:"Account added successfully.",requiredFields:"Password and email/mobile are required.",deleteKeyConfirm:"Are you sure you want to delete this API key?",deleteAccountConfirm:"Are you sure you want to delete this account?",testAllConfirm:"Test API connectivity for all accounts?",testAllCompleted:"Completed: {success}/{total} available",testFailed:"Test failed: {error}",available:"Available",inUse:"In use",totalPool:"Total pool",accountsUnit:"accounts",threadsUnit:"threads",apiKeysTitle:"API Keys",apiKeysDesc:"Manage the API access key pool",addKey:"Add key",copied:"Copied",copyKeyTitle:"Copy key",deleteKeyTitle:"Delete key",noApiKeys:"No API keys found.",accountsTitle:"DeepSeek Accounts",accountsDesc:"Manage the DeepSeek account pool",testAll:"Test all",addAccount:"Add account",testingAllAccounts:"Testing all accounts...",sessionActive:"Session active",reauthRequired:"Re-auth required",noAccounts:"No accounts found.",modalAddKeyTitle:"Add API key",newKeyLabel:"New key value",newKeyPlaceholder:"Enter a custom API key",generate:"Generate",generateHint:"Click Generate to create a random key.",addKeyLoading:"Adding...",addKeyAction:"Add key",modalAddAccountTitle:"Add DeepSeek account",emailOptional:"Email (optional)",mobileOptional:"Mobile (optional)",passwordLabel:"Password",passwordPlaceholder:"Account password",addAccountLoading:"Adding...",addAccountAction:"Add account",pageInfo:"Page {current}/{total}, {count} accounts total"},My={defaultMessage:"Hello, please introduce yourself in one sentence.",models:{chat:"Non-reasoning model",reasoner:"Reasoning model",chatSearch:"Non-reasoning model (with search)",reasonerSearch:"Reasoning model (with search)"},missingApiKey:"Please provide an API key.",requestFailed:"Request failed.",networkError:"Network error: {error}",testSuccess:"{account}: Test successful ({time}ms)",config:"Configuration",modelLabel:"Model",streamMode:"Streaming",accountSelector:"Account",autoRandom:"🤖 Auto / Random",apiKeyOptional:"API Key (optional)",apiKeyDefault:"Default: ...{suffix}",apiKeyPlaceholder:"Enter a custom key",modeManaged:"Managed key mode (uses account pool).",modeDirect:"Direct token mode (requires a valid DeepSeek token).",statusError:"Error",reasoningTrace:"Reasoning Trace",generating:"Generating response...",enterMessage:"Enter a message...",adminConsoleLabel:"DeepSeek admin console"},Ay={templates:{full:{name:"Full configuration template",desc:"Includes keys, accounts, and model mapping"},emailOnly:{name:"Email-only accounts",desc:"Batch import accounts using email login"},mobileOnly:{name:"Mobile-only accounts",desc:"Batch import accounts using mobile login"},keysOnly:{name:"API keys only",desc:"Add API access keys only"}},enterJson:"Please provide JSON configuration content.",importSuccess:"Import successful: {keys} keys, {accounts} accounts",templateLoaded:"Template loaded: {name}",currentConfigLoaded:"CurrentLine truncated
|
||||
`);$n=Ka.pop()||"";for(const rf of Ka){const uo=rf.trim();if(!uo||!uo.startsWith("data: "))continue;const co=uo.slice(6);if(co!=="[DONE]")try{const zr=(M=JSON.parse(co).choices)==null?void 0:M[0];if(zr!=null&&zr.delta){const Dr=zr.delta;Dr.reasoning_content&&x(fo=>fo+Dr.reasoning_content),Dr.content&&d(fo=>fo+Dr.content)}}catch(Ha){console.error("Invalid JSON hunk:",co,Ha)}}}}else{const K=await _e.json();k({success:!0,status_code:_e.status,...K}),t("success",r("apiTester.testSuccess",{account:m||"Auto",time:"N/A"}))}}catch(ne){ne.name==="AbortError"?t("info",r("messages.generationStopped")):(t("error",r("apiTester.networkError",{error:ne.message})),k({error:ne.message,success:!1}))}finally{N(!1),C(!1),O.current=null}}};return y.useEffect(()=>{u(M=>M===R.current?s:M),R.current=s},[s]),i.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-12 gap-6 h-[calc(100vh-140px)]",children:[i.jsx("div",{className:W("lg:col-span-3 flex flex-col transition-all duration-300 ease-in-out z-20",se?"h-auto":"h-14 lg:h-full"),children:i.jsxs("div",{className:"bg-card border border-border rounded-xl flex flex-col h-full shadow-sm",children:[i.jsxs("button",{onClick:()=>rn(!se),className:"lg:hidden flex items-center justify-between p-4 w-full bg-muted/20 hover:bg-muted/30 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2.5 font-medium text-sm text-foreground",children:[i.jsx("div",{className:"p-1.5 rounded-md bg-transparent text-foreground",children:i.jsx(cy,{className:"w-4 h-4"})}),i.jsx("span",{children:r("apiTester.config")})]}),i.jsx("div",{className:W("transition-transform duration-300 text-muted-foreground",se?"rotate-180":""),children:i.jsx(Ds,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:W("p-4 space-y-6 overflow-y-auto custom-scrollbar flex-1",!se&&"hidden lg:block"),children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.modelLabel")}),i.jsx("div",{className:"grid grid-cols-1 gap-2",children:$.map(M=>{const ne=M.icon;return i.jsxs("button",{onClick:()=>o(M.id),className:W("group relative flex items-start gap-3 p-3 rounded-lg border text-left transition-all duration-200",l===M.id?"bg-secondary border-primary/50 shadow-sm":"bg-transparent border-transparent hover:bg-muted"),children:[i.jsx("div",{className:W("p-1.5 rounded-md shrink-0 transition-colors",l===M.id?M.color:"text-muted-foreground group-hover:text-foreground"),children:i.jsx(ne,{className:"w-4 h-4"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:W("font-medium text-sm",l===M.id?"text-foreground":"text-foreground/80"),children:M.name}),i.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:M.desc})]}),l===M.id&&i.jsx("div",{className:W("absolute top-3 right-3",M.color),children:i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-current"})})]},M.id)})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.streamMode")}),i.jsxs("button",{onClick:()=>b(!E),className:W("w-full flex items-center justify-between px-3 py-2 rounded-lg border transition-all duration-200",E?"bg-primary/10 border-primary/50 text-foreground":"bg-background border-border text-muted-foreground hover:bg-muted/50"),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:W("p-1.5 rounded-md",E?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:i.jsx(pu,{className:"w-4 h-4"})}),i.jsx("span",{className:"text-sm font-medium",children:r("apiTester.streamMode")})]}),E?i.jsx(my,{className:"w-5 h-5 text-primary"}):i.jsx(fy,{className:"w-5 h-5 text-muted-foreground"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.accountSelector")}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{className:"w-full h-10 pl-3 pr-8 bg-secondary border border-border rounded-lg text-sm appearance-none focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all cursor-pointer hover:bg-muted",value:m,onChange:M=>g(M.target.value),children:[i.jsx("option",{value:"",className:"bg-popover text-popover-foreground",children:r("apiTester.autoRandom")}),zn.map((M,ne)=>i.jsxs("option",{value:M.email||M.mobile,className:"bg-popover text-popover-foreground",children:["👤 ",M.email||M.mobile]},ne))]}),i.jsx(Ds,{className:"absolute right-2.5 top-3 w-4 h-4 text-muted-foreground pointer-events-none"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.apiKeyOptional")}),i.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,className:
Line truncated
|
||||
"keys": ["your-api-key"],
|
||||
"accounts": [
|
||||
{"email": "...", "password": "...", "token": ""}
|
||||
]
|
||||
}`,spellCheck:!1})}),u&&i.jsx("div",{className:W("p-4 border-t",u.imported_keys||u.imported_accounts?"bg-emerald-500/10 border-emerald-500/20":"bg-destructive/10 border-destructive/20"),children:i.jsxs("div",{className:"flex items-start gap-3",children:[u.imported_keys||u.imported_accounts?i.jsx(Bl,{className:"w-5 h-5 text-emerald-500 mt-0.5"}):i.jsx(yy,{className:"w-5 h-5 text-destructive mt-0.5"}),i.jsxs("div",{children:[i.jsx("h4",{className:W("font-medium",u.imported_keys||u.imported_accounts?"text-emerald-500":"text-destructive"),children:r("batchImport.importComplete")}),i.jsx("p",{className:"text-sm opacity-80 mt-1",children:r("batchImport.importSummary",{keys:u.imported_keys,accounts:u.imported_accounts})})]})]})})]})]})}function lv({onMessage:e,authFetch:t}){const{t:n}=Bt(),[r,l]=y.useState(""),[o,s]=y.useState(""),[a,u]=y.useState(""),[c,h]=y.useState(!1),[m,g]=y.useState(null),[v,k]=y.useState(null),[w,N]=y.useState(null),p=t||fetch,d=y.useCallback(async()=>{try{const x=await p("/admin/vercel/status");if(x.ok){const S=await x.json();N(S)}}catch(x){console.error("Failed to fetch sync status:",x)}},[p]);y.useEffect(()=>{(async()=>{try{const C=await p("/admin/vercel/config");if(C.ok){const E=await C.json();k(E),E.project_id&&s(E.project_id),E.team_id&&u(E.team_id)}}catch(C){console.error("Failed to load preconfig:",C)}})(),d();const S=setInterval(d,15e3);return()=>clearInterval(S)},[d]);const f=async()=>{const x=v!=null&&v.has_token&&!r?"__USE_PRECONFIG__":r;if(!x&&!(v!=null&&v.has_token)){e("error",n("vercel.tokenRequired"));return}if(!o){e("error",n("vercel.projectRequired"));return}h(!0),g(null);try{const S=await p("/admin/vercel/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vercel_token:x,project_id:o,team_id:a||void 0})}),C=await S.json();S.ok?(g({...C,success:!0}),e("success",C.message),d()):(g({...C,success:!1}),e("error",C.detail||n("vercel.syncFailed")))}catch{e("error",n("vercel.networkError"))}finally{h(!1)}};return i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto h-[calc(100vh-140px)]",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm p-6 space-y-6",children:[i.jsxs("div",{className:"border-b border-border pb-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[i.jsx(Yd,{className:"w-6 h-6 text-primary"}),n("vercel.title")]}),w&&i.jsxs("div",{className:W("flex items-center gap-1.5 text-xs font-semibold px-2.5 py-1 rounded-full border transition-colors",w.synced?"text-emerald-500 bg-emerald-500/10 border-emerald-500/20":w.has_synced_before?"text-amber-500 bg-amber-500/10 border-amber-500/20":"text-muted-foreground bg-muted/50 border-border"),children:[i.jsx("span",{className:W("w-1.5 h-1.5 rounded-full",w.synced?"bg-emerald-500":w.has_synced_before?"bg-amber-500 animate-pulse":"bg-muted-foreground")}),w.synced?n("vercel.statusSynced"):w.has_synced_before?n("vercel.statusNotSynced"):n("vercel.statusNeverSynced")]})]}),i.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:n("vercel.description")}),(w==null?void 0:w.last_sync_time)&&i.jsxs("p",{className:"text-xs text-muted-foreground/60 mt-1.5 flex items-center gap-1",children:[i.jsx(ty,{className:"w-3 h-3"}),n("vercel.lastSyncTime",{time:new Date(w.last_sync_time*1e3).toLocaleString()})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"text-sm font-medium flex items-center justify-between",children:[n("vercel.tokenLabel"),i.jsxs("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:[n("vercel.getToken")," ",i.jsx(iu,{className:"w-3 h-3"})]})]}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all pr-10",placeholder:v!=null&&v.has_token?n("vercel.tokenPlaceholderPreconfig"):n("vercel.tokenPlaceholder"),value:r,onChange:x=>l(x.target.value)}),(v==null?void 0:v.has_token)&&!r&&i.jsx("div",{className:"absolute right-3 top-2.5 text-emerald-500",children:i.jsx(Fs,{className:"w-5 h-5"})})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium",children:n("vercel.projectIdLabel")}),i.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"prj_xxxxxxxxxxxx or Project Name",value:o,onChange:x=>s(x.target.value)}),i.jsx("p",{className:"text-xs text-muted-foreground",children:n("vercel.projectIdHint")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{c
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relLine truncated
|
||||
@@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- SEO Meta Tags -->
|
||||
<title>DS2API - 管理面板 / Admin Console</title>
|
||||
<meta name="description" content="DS2API 管理面板:管理 DeepSeek 账号、测试 API、同步 Vercel 配置 / Admin console for accounts, API tests, and Vercel sync." />
|
||||
<meta name="keywords" content="DeepSeek, API, OpenAI, 管理面板, admin console, DS2API" />
|
||||
<meta name="author" content="CJackHwang" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
|
||||
<!-- Open Graph / Social -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="DS2API - 管理面板 / Admin Console" />
|
||||
<meta property="og:description" content="Manage DeepSeek accounts, test the API, and sync Vercel configuration." />
|
||||
<meta property="og:site_name" content="DS2API" />
|
||||
|
||||
<!-- PWA / Mobile -->
|
||||
<meta name="theme-color" content="#f59e0b" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="DS2API" />
|
||||
|
||||
<!-- Favicon - using data URI for orange-yellow gradient icon -->
|
||||
<link rel="icon" type="image/svg+xml"
|
||||
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23f59e0b'/%3E%3Cstop offset='100%25' stop-color='%23ef4444'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect rx='20' width='100' height='100' fill='url(%23g)'/%3E%3Ctext x='50' y='68' font-family='Arial,sans-serif' font-size='48' font-weight='bold' fill='white' text-anchor='middle'%3EDS%3C/text%3E%3C/svg%3E" />
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/admin/assets/index-BZnWnZUg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/admin/assets/index-Dd4LAu0y.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,103 @@
|
||||
package webui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ds2api/internal/config"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultBuildTimeout = 5 * time.Minute
|
||||
)
|
||||
|
||||
func EnsureBuiltOnStartup() {
|
||||
if !shouldAutoBuild() {
|
||||
return
|
||||
}
|
||||
staticDir := resolveStaticAdminDir(config.StaticAdminDir())
|
||||
if hasBuiltUI(staticDir) {
|
||||
return
|
||||
}
|
||||
if err := buildWebUI(staticDir); err != nil {
|
||||
config.Logger.Warn("[webui] auto build failed", "error", err)
|
||||
return
|
||||
}
|
||||
if hasBuiltUI(staticDir) {
|
||||
config.Logger.Info("[webui] auto build completed", "dir", staticDir)
|
||||
return
|
||||
}
|
||||
config.Logger.Warn("[webui] auto build finished but output missing", "dir", staticDir)
|
||||
}
|
||||
|
||||
func shouldAutoBuild() bool {
|
||||
raw := strings.TrimSpace(os.Getenv("DS2API_AUTO_BUILD_WEBUI"))
|
||||
if raw == "" {
|
||||
return !config.IsVercel()
|
||||
}
|
||||
switch strings.ToLower(raw) {
|
||||
case "1", "true", "yes", "on":
|
||||
return true
|
||||
case "0", "false", "no", "off":
|
||||
return false
|
||||
default:
|
||||
return !config.IsVercel()
|
||||
}
|
||||
}
|
||||
|
||||
func hasBuiltUI(staticDir string) bool {
|
||||
if strings.TrimSpace(staticDir) == "" {
|
||||
return false
|
||||
}
|
||||
indexPath := filepath.Join(staticDir, "index.html")
|
||||
st, err := os.Stat(indexPath)
|
||||
return err == nil && !st.IsDir()
|
||||
}
|
||||
|
||||
func buildWebUI(staticDir string) error {
|
||||
if _, err := exec.LookPath("npm"); err != nil {
|
||||
return fmt.Errorf("npm not found in PATH: %w", err)
|
||||
}
|
||||
if strings.TrimSpace(staticDir) == "" {
|
||||
return errors.New("static admin dir is empty")
|
||||
}
|
||||
|
||||
config.Logger.Info("[webui] static files missing, running npm build")
|
||||
ctx, cancel := context.WithTimeout(context.Background(), defaultBuildTimeout)
|
||||
defer cancel()
|
||||
|
||||
if _, err := os.Stat(filepath.Join("webui", "node_modules")); err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
installCmd := exec.CommandContext(ctx, "npm", "ci", "--prefix", "webui")
|
||||
installCmd.Stdout = os.Stdout
|
||||
installCmd.Stderr = os.Stderr
|
||||
if err := installCmd.Run(); err != nil {
|
||||
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
|
||||
return fmt.Errorf("webui npm ci timed out after %s", defaultBuildTimeout)
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(staticDir, 0o755); err != nil {
|
||||
return err
|
||||
}
|
||||
cmd := exec.CommandContext(ctx, "npm", "run", "build", "--prefix", "webui", "--", "--outDir", staticDir, "--emptyOutDir")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
|
||||
return fmt.Errorf("webui build timed out after %s", defaultBuildTimeout)
|
||||
}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package webui
|
||||
|
||||
import "embed"
|
||||
|
||||
// embeddedAdminFS bundles the built admin webui so serverless runtime does not
|
||||
// depend on function includeFiles behavior.
|
||||
//
|
||||
//go:embed assets/admin
|
||||
var embeddedAdminFS embed.FS
|
||||
@@ -1,10 +1,8 @@
|
||||
package webui
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -20,17 +18,10 @@ const welcomeHTML = `<!DOCTYPE html>
|
||||
|
||||
type Handler struct {
|
||||
StaticDir string
|
||||
embeddedAdmin fs.FS
|
||||
hasEmbeddedUI bool
|
||||
}
|
||||
|
||||
func NewHandler() *Handler {
|
||||
h := &Handler{StaticDir: resolveStaticAdminDir(config.StaticAdminDir())}
|
||||
if sub, err := fs.Sub(embeddedAdminFS, "assets/admin"); err == nil {
|
||||
h.embeddedAdmin = sub
|
||||
h.hasEmbeddedUI = true
|
||||
}
|
||||
return h
|
||||
return &Handler{StaticDir: resolveStaticAdminDir(config.StaticAdminDir())}
|
||||
}
|
||||
|
||||
func RegisterRoutes(r chi.Router, h *Handler) {
|
||||
@@ -61,11 +52,6 @@ func (h *Handler) admin(w http.ResponseWriter, r *http.Request) {
|
||||
h.serveFromDisk(w, r, staticDir)
|
||||
return
|
||||
}
|
||||
if h.hasEmbeddedUI {
|
||||
if h.serveFromFS(w, r, h.embeddedAdmin) {
|
||||
return
|
||||
}
|
||||
}
|
||||
http.Error(w, "WebUI not built. Run `cd webui && npm run build` first.", http.StatusNotFound)
|
||||
}
|
||||
|
||||
@@ -100,6 +86,9 @@ func (h *Handler) serveFromDisk(w http.ResponseWriter, r *http.Request, staticDi
|
||||
}
|
||||
|
||||
func resolveStaticAdminDir(preferred string) string {
|
||||
if strings.TrimSpace(os.Getenv("DS2API_STATIC_ADMIN_DIR")) != "" {
|
||||
return filepath.Clean(preferred)
|
||||
}
|
||||
candidates := []string{preferred}
|
||||
if wd, err := os.Getwd(); err == nil {
|
||||
candidates = append(candidates, filepath.Join(wd, "static/admin"))
|
||||
@@ -130,34 +119,3 @@ func resolveStaticAdminDir(preferred string) string {
|
||||
}
|
||||
return filepath.Clean(preferred)
|
||||
}
|
||||
|
||||
func (h *Handler) serveFromFS(w http.ResponseWriter, r *http.Request, rootFS fs.FS) bool {
|
||||
rel := strings.TrimPrefix(r.URL.Path, "/admin")
|
||||
rel = strings.TrimPrefix(rel, "/")
|
||||
safe := strings.TrimPrefix(path.Clean("/"+rel), "/")
|
||||
if strings.HasPrefix(safe, "../") {
|
||||
http.NotFound(w, r)
|
||||
return true
|
||||
}
|
||||
|
||||
if safe != "" && strings.Contains(safe, ".") {
|
||||
if _, err := fs.Stat(rootFS, safe); err != nil {
|
||||
http.NotFound(w, r)
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(safe, "assets/") {
|
||||
w.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
|
||||
} else {
|
||||
w.Header().Set("Cache-Control", "no-store, must-revalidate")
|
||||
}
|
||||
http.ServeFileFS(w, r, rootFS, safe)
|
||||
return true
|
||||
}
|
||||
|
||||
if _, err := fs.Stat(rootFS, "index.html"); err != nil {
|
||||
return false
|
||||
}
|
||||
w.Header().Set("Cache-Control", "no-store, must-revalidate")
|
||||
http.ServeFileFS(w, r, rootFS, "index.html")
|
||||
return true
|
||||
}
|
||||
@@ -1,297 +0,0 @@
|
||||
(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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 lf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vu={exports:{}},Vl={},xu={exports:{}},z={};/**
|
||||
* @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"),of=Symbol.for("react.portal"),sf=Symbol.for("react.fragment"),af=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),cf=Symbol.for("react.provider"),df=Symbol.for("react.context"),ff=Symbol.for("react.forward_ref"),pf=Symbol.for("react.suspense"),mf=Symbol.for("react.memo"),hf=Symbol.for("react.lazy"),Wa=Symbol.iterator;function gf(e){return e===null||typeof e!="object"?null:(e=Wa&&e[Wa]||e["@@iterator"],typeof e=="function"?e:null)}var wu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ku=Object.assign,Su={};function Rn(e,t,n){this.props=e,this.context=t,this.refs=Su,this.updater=n||wu}Rn.prototype.isReactComponent={};Rn.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")};Rn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nu(){}Nu.prototype=Rn.prototype;function Bs(e,t,n){this.props=e,this.context=t,this.refs=Su,this.updater=n||wu}var Vs=Bs.prototype=new Nu;Vs.constructor=Bs;ku(Vs,Rn.prototype);Vs.isPureReactComponent=!0;var Qa=Array.isArray,ju=Object.prototype.hasOwnProperty,Ks={current:null},Cu={key:!0,ref:!0,__self:!0,__source:!0};function Eu(e,t,n){var r,l={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)ju.call(t,r)&&!Cu.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:_r,type:e,key:o,ref:s,props:l,_owner:Ks.current}}function yf(e,t){return{$$typeof:_r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Hs(e){return typeof e=="object"&&e!==null&&e.$$typeof===_r}function vf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ja=/\/+/g;function po(e,t){return typeof e=="object"&&e!==null&&e.key!=null?vf(""+e.key):t.toString(36)}function rl(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case _r:case of:s=!0}}if(s)return s=e,l=l(s),e=r===""?"."+po(s,0):r,Qa(l)?(n="",e!=null&&(n=e.replace(Ja,"$&/")+"/"),rl(l,t,n,"",function(c){return c})):l!=null&&(Hs(l)&&(l=yf(l,n+(!l.key||s&&s.key===l.key?"":(""+l.key).replace(Ja,"$&/")+"/")+e)),t.push(l)),1;if(s=0,r=r===""?".":r+":",Qa(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+po(o,a);s+=rl(o,t,n,u,l)}else if(u=gf(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+po(o,a++),s+=rl(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Fr(e,t,n){if(e==null)return e;var r=[],l=0;return rl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function xf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var xe={current:null},ll={transition:null},wf={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:ll,ReactCurrentOwner:Ks};function _u(){throw Error("act(...) is not supported in production builds of React.")}z.Children={map:Fr,forEach:function(e,t,n){Fr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fr(e,function(){t++}),t},toArray:function(e){return Fr(e,function(t){return t})||[]},only:function(e){if(!Hs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};z.Component=Rn;z.Fragment=sf;z.Profiler=uf;z.PureComponent=Bs;z.StrictMode=af;z.Suspense=pf;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wf;z.act=_u;z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ku({},e.props),l=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ks.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)ju.call(t,u)&&!Cu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:_r,type:e.type,key:l,ref:o,props:r,_owner:s}};z.createContext=function(e){return e={$$typeof:df,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.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 Sf=y,Nf=Symbol.for("react.element"),jf=Symbol.for("react.fragment"),Cf=Object.prototype.hasOwnProperty,Ef=Sf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_f={key:!0,ref:!0,__self:!0,__source:!0};function Pu(e,t,n){var r,l={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Cf.call(t,r)&&!_f.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Nf,type:e,key:o,ref:s,props:l,_owner:Ef.current}}Vl.Fragment=jf;Vl.jsx=Pu;Vl.jsxs=Pu;vu.exports=Vl;var i=vu.exports,Bo={},bu={exports:{}},Le={},Tu={exports:{}},Ru={};/**
|
||||
* @license React
|
||||
* scheduler.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.
|
||||
*/(function(e){function t(_,L){var I=_.length;_.push(L);e:for(;0<I;){var B=I-1>>>1,$=_[B];if(0<l($,L))_[B]=L,_[I]=$,I=B;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var L=_[0],I=_.pop();if(I!==L){_[0]=I;e:for(var B=0,$=_.length,ke=$>>>1;B<ke;){var Ae=2*(B+1)-1,wt=_[Ae],Oe=Ae+1,ot=_[Oe];if(0>l(wt,I))Oe<$&&0>l(ot,wt)?(_[B]=ot,_[Oe]=I,B=Oe):(_[B]=wt,_[Ae]=I,B=Ae);else if(Oe<$&&0>l(ot,I))_[B]=ot,_[Oe]=I,B=Oe;else break e}}return L}function l(_,L){var I=_.sortIndex-L.sortIndex;return I!==0?I:_.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],h=1,m=null,g=3,v=!1,k=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,p=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 f(_){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=_)r(c),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(c)}}function x(_){if(w=!1,f(_),!k)if(n(u)!==null)k=!0,Ve(S);else{var L=n(c);L!==null&<(x,L.startTime-_)}}function S(_,L){k=!1,w&&(w=!1,p(b),b=-1),v=!0;var I=g;try{for(f(L),m=n(u);m!==null&&(!(m.expirationTime>L)||_&&!ge());){var B=m.callback;if(typeof B=="function"){m.callback=null,g=m.priorityLevel;var $=B(m.expirationTime<=L);L=e.unstable_now(),typeof $=="function"?m.callback=$:m===n(u)&&r(u),f(L)}else r(u);m=n(u)}if(m!==null)var ke=!0;else{var Ae=n(c);Ae!==null&<(x,Ae.startTime-L),ke=!1}return ke}finally{m=null,g=I,v=!1}}var C=!1,E=null,b=-1,O=5,R=-1;function ge(){return!(e.unstable_now()-R<O)}function xt(){if(E!==null){var _=e.unstable_now();R=_;var L=!0;try{L=E(!0,_)}finally{L?se():(C=!1,E=null)}}else C=!1}var se;if(typeof d=="function")se=function(){d(xt)};else if(typeof MessageChannel<"u"){var rn=new MessageChannel,zn=rn.port2;rn.port1.onmessage=xt,se=function(){zn.postMessage(null)}}else se=function(){N(xt,0)};function Ve(_){E=_,C||(C=!0,se())}function lt(_,L){b=N(function(){_(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,Ve(S))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(_){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var I=g;g=L;try{return _()}finally{g=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,L){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=g;g=_;try{return L()}finally{g=I}},e.unstable_scheduleCallback=function(_,L,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,_){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=I+$,_={id:h++,callback:L,priorityLevel:_,startTime:I,expirationTime:$,sortIndex:-1},I>B?(_.sortIndex=I,t(c,_),n(u)===null&&_===n(c)&&(w?(p(b),b=-1):w=!0,lt(x,I-B))):(_.sortIndex=$,t(u,_),k||v||(k=!0,Ve(S))),_},e.unstable_shouldYield=ge,e.unstable_wrapCallback=function(_){var L=g;return function(){var I=g;g=L;try{return _.apply(this,arguments)}finally{g=I}}}})(Ru);Tu.exports=Ru;var Pf=Tu.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 bf=y,Re=Pf;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lu=new Set,ur={};function tn(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(ur[e]=t,e=0;e<t.length;e++)Lu.add(t[e])}var ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vo=Object.prototype.hasOwnProperty,Tf=/^[: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]*$/,Ga={},Ya={};function Rf(e){return Vo.call(Ya,e)?!0:Vo.call(Ga,e)?!1:Tf.test(e)?Ya[e]=!0:(Ga[e]=!0,!1)}function Lf(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 If(e,t,n,r){if(t===null||typeof t>"u"||Lf(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 we(e,t,n,r,l,o,s){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=s}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new we(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){de[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ws=/[\-:]([a-z])/g;function Qs(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(Ws,Qs);de[t]=new we(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(Ws,Qs);de[t]=new we(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(Ws,Qs);de[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function Js(e,t,n,r){var l=de.hasOwnProperty(t)?de[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+mo+e}var ho=!1;function go(e,t){if(!e||ho)return"";ho=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
|
||||
`),o=r.stack.split(`
|
||||
`),s=l.length-1,a=o.length-1;1<=s&&0<=a&&l[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(l[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||l[s]!==o[a]){var u=`
|
||||
`+l[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{ho=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yn(e):""}function Mf(e){switch(e.tag){case 5:return Yn(e.type);case 16:return Yn("Lazy");case 13:return Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 2:case 15:return e=go(e.type,!1),e;case 11:return e=go(e.type.render,!1),e;case 1:return e=go(e.type,!0),e;default:return""}}function Qo(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 on:return"Portal";case Ko:return"Profiler";case Gs:return"StrictMode";case Ho:return"Suspense";case Wo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mu:return(e.displayName||"Context")+".Consumer";case Iu:return(e._context.displayName||"Context")+".Provider";case Ys:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qs:return t=e.displayName||null,t!==null?t:Qo(e.type)||"Memo";case Nt:t=e._payload,e=e._init;try{return Qo(e(t))}catch{}}return null}function Af(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 Qo(t);case 8:return t===Gs?"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 zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ou(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Of(e){var t=Ou(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(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ur(e){e._valueTracker||(e._valueTracker=Of(e))}function zu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ou(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yl(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 Jo(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zt(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 Du(e,t){t=t.checked,t!=null&&Js(e,"checked",t,!1)}function Go(e,t){Du(e,t);var n=zt(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")?Yo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yo(e,t.type,zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Za(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 Yo(e,t,n){(t!=="number"||yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function qo(e,t){if(t.dang
Line truncated
|
||||
`).replace(Wp,"")}function Gr(e,t,n){if(t=Si(t),Si(e)!==t&&n)throw Error(j(425))}function Cl(){}var cs=null,ds=null;function fs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ps=typeof setTimeout=="function"?setTimeout:void 0,Qp=typeof clearTimeout=="function"?clearTimeout:void 0,Ni=typeof Promise=="function"?Promise:void 0,Jp=typeof queueMicrotask=="function"?queueMicrotask:typeof Ni<"u"?function(e){return Ni.resolve(null).then(e).catch(Gp)}:ps;function Gp(e){setTimeout(function(){throw e})}function bo(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),mr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);mr(t)}function Lt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ji(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var In=Math.random().toString(36).slice(2),et="__reactFiber$"+In,xr="__reactProps$"+In,pt="__reactContainer$"+In,ms="__reactEvents$"+In,Yp="__reactListeners$"+In,qp="__reactHandles$"+In;function Ht(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ji(e);e!==null;){if(n=e[et])return n;e=ji(e)}return t}e=n,n=e.parentNode}return null}function Tr(e){return e=e[et]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function dn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Jl(e){return e[xr]||null}var hs=[],fn=-1;function $t(e){return{current:e}}function Q(e){0>fn||(e.current=hs[fn],hs[fn]=null,fn--)}function V(e,t){fn++,hs[fn]=e.current,e.current=t}var Dt={},he=$t(Dt),je=$t(!1),Yt=Dt;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Dt;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 Ce(e){return e=e.childContextTypes,e!=null}function El(){Q(je),Q(he)}function Ci(e,t,n){if(he.current!==Dt)throw Error(j(168));V(he,t),V(je,n)}function Ec(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(j(108,Af(e)||"Unknown",l));return X({},n,r)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dt,Yt=he.current,V(he,e),V(je,je.current),!0}function Ei(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Ec(e,t,Yt),r.__reactInternalMemoizedMergedChildContext=e,Q(je),Q(he),V(he,e)):Q(je),V(je,n)}var at=null,Gl=!1,To=!1;function _c(e){at===null?at=[e]:at.push(e)}function Xp(e){Gl=!0,_c(e)}function Ut(){if(!To&&at!==null){To=!0;var e=0,t=U;try{var n=at;for(U=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}at=null,Gl=!1}catch(l){throw at!==null&&(at=at.slice(e+1)),Xu(Zs,Ut),l}finally{U=t,To=!1}}return null}var pn=[],mn=0,Pl=null,bl=0,ze=[],De=0,qt=null,it=1,ut="";function Vt(e,t){pn[mn++]=bl,pn[mn++]=Pl,Pl=e,bl=t}function Pc(e,t,n){ze[De++]=it,ze[De++]=ut,ze[De++]=qt,qt=e;var r=it;e=ut;var l=32-Je(r)-1;r&=~(1<<l),n+=1;var o=32-Je(t)+l;if(30<o){var s=l-l%5;o=(r&(1<<s)-1).toString(32),r>>=s,l-=s,it=1<<32-Je(t)+l|n<<l|r,ut=o+e}else it=1<<o|n<<l|r,ut=e}function ia(e){e.return!==null&&(Vt(e,1),Pc(e,1,0))}function ua(e){for(;e===Pl;)Pl=pn[--mn],pn[mn]=null,bl=pn[--mn],pn[mn]=null;for(;e===qt;)qt=ze[--De],ze[De]=null,ut=ze[--De],ze[De]=null,it=ze[--De],ze[De]=null}var Te=null,be=null,J=!1,Qe=null;function bc(e,t){var n=Fe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _i(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Te=e,be=Lt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Te=e,be=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qt!==null?{id:it,overflow:ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Fe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Te=e,be=null,!0):!1;default:return!1}}function gs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ys(e){if(J){var t=be;if(t){var n=t;if(!_i(e,t)){if(gs(e))throw Error(j(418));t=Lt(n.nextSibling);var r=Te;t&&_i(e,t)?bc(r,n):(e.flags=e.flags&-4097|2,J=!1,Te=e)}}else{if(gs(e))throw Error(j(418));e.flags=e.flags&-4097|2,J=!1,Te=e}}}function Pi(e){for(e=e.return;e!==null&&e.t
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Ao(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ks(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var am=typeof WeakMap=="function"?WeakMap:Map;function nd(e,t,n){n=ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zl||(zl=!0,Rs=r),ks(e,t)},n}function rd(e,t,n){n=ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ks(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ks(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Oi(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new am;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=km.bind(null,e,t,n),t.then(e,e))}function zi(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Di(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ct(-1,1),t.tag=2,It(n,t,1))),n.lanes|=1),e)}var im=yt.ReactCurrentOwner,Ne=!1;function ye(e,t,n,r){t.child=e===null?Lc(t,null,n,r):_n(t,e.child,n,r)}function Fi(e,t,n,r,l){n=n.render;var o=t.ref;return Sn(t,l),r=wa(e,t,n,r,o,l),n=ka(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ht(e,t,l)):(J&&n&&ia(t),t.flags|=1,ye(e,t,r,l),t.child)}function $i(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Ra(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ld(e,t,o,r,l)):(e=ml(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:gr,n(s,r)&&e.ref===t.ref)return ht(e,t,l)}return t.flags|=1,e=Ot(o,r),e.ref=t.ref,e.return=t,t.child=e}function ld(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(gr(o,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,ht(e,t,l)}return Ss(e,t,n,r,l)}function od(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},V(yn,Pe),Pe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,V(yn,Pe),Pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,V(yn,Pe),Pe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,V(yn,Pe),Pe|=r;return ye(e,t,l,n),t.child}function sd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,l){var o=Ce(n)?Yt:he.current;return o=Cn(t,o),Sn(t,l),n=wa(e,t,n,r,o,l),r=ka(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ht(e,t,l)):(J&&r&&ia(t),t.flags|=1,ye(e,t,n,l),t.child)}function Ui(e,t,n,r,l){if(Ce(n)){var o=!0;_l(t)}else o=!1;if(Sn(t,l),t.stateNode===null)dl(e,t),td(t,n,r),ws(t,n,r,l),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ue(c):(c=Ce(n)?Yt:he.current,c=Cn(t,c));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==c)&&Ai(t,s,r,c),jt=!1;var g=t.memoizedState;s.state=g,Ll(t,r,s,l),u=t.memoizedState,a!==r||g!==u||je.current||jt?(typeof h=="function"&&(xs(t,n,h,r),u=t.memoizedState),(a=jt||Mi(t,n,a,r,g,u,c))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Mc(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:He(t.type,a),s.props=c,m=t.pendingProps,g=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ue(u):(u=Ce(n)?Yt:he.current,u=Cn(t,u));var v=n.getDerivedStateFromProps;(h=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==m||g!==u)&&Ai(t,s,r,u),jt=!1,g=t.memoizedState,s.state=g,Ll(t,r,s,l);var k=t.memoizedState;a
Line truncated
|
||||
* react-router v7.13.0
|
||||
*
|
||||
* 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
|
||||
*/var tu="popstate";function Im(e={}){function t(r,l){let{pathname:o,search:s,hash:a}=r.location;return As("",{pathname:o,search:s,hash:a},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Er(l)}return Am(t,n,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mm(){return Math.random().toString(36).substring(2,10)}function nu(e,t){return{usr:e.state,key:e.key,idx:t}}function As(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mn(t):t,state:n,key:t&&t.key||r||Mm()}}function Er({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Mn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Am(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,s=l.history,a="POP",u=null,c=h();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function h(){return(s.state||{idx:null}).idx}function m(){a="POP";let N=h(),p=N==null?null:N-c;c=N,u&&u({action:a,location:w.location,delta:p})}function g(N,p){a="PUSH";let d=As(w.location,N,p);c=h()+1;let f=nu(d,c),x=w.createHref(d);try{s.pushState(f,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;l.location.assign(x)}o&&u&&u({action:a,location:w.location,delta:1})}function v(N,p){a="REPLACE";let d=As(w.location,N,p);c=h();let f=nu(d,c),x=w.createHref(d);s.replaceState(f,"",x),o&&u&&u({action:a,location:w.location,delta:0})}function k(N){return Om(N)}let w={get action(){return a},get location(){return e(l,s)},listen(N){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(tu,m),u=N,()=>{l.removeEventListener(tu,m),u=null}},createHref(N){return t(l,N)},createURL:k,encodeLocation(N){let p=k(N);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:g,replace:v,go(N){return s.go(N)}};return w}function Om(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),G(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Er(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Td(e,t,n="/"){return zm(e,t,n,!1)}function zm(e,t,n,r){let l=typeof t=="string"?Mn(t):t,o=gt(l.pathname||"/",n);if(o==null)return null;let s=Rd(e);Dm(s);let a=null;for(let u=0;a==null&&u<s.length;++u){let c=Gm(o);a=Qm(s[u],c,r)}return a}function Rd(e,t=[],n=[],r="",l=!1){let o=(s,a,u=l,c)=>{let h={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&u)return;G(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=dt([r,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(G(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Rd(s.children,t,g,m,u)),!(s.path==null&&!s.index)&&t.push({path:m,score:Hm(m,s.index),routesMeta:g})};return e.forEach((s,a)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))o(s,a);else for(let c of Ld(s.path))o(s,a,!0,c)}),t}function Ld(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 s=Ld(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Dm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Wm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Fm=/^:[\w-]+$/,$m=3,Um=2,Bm=1,Vm=10,Km=-2,ru=e=>e==="*";function Hm(e,t){let n=e.split("/"),r=n.length;return n.some(ru)&&(r+=Km),t&&(r+=Um),n.filter(l=>!ru(l)).reduce((l,o)=>l+(Fm.test(o)?$m:o===""?Bm:Vm),r)}function Wm(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 Qm(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",s=[];for(let a=0;a<r.length;++a){let u=r[a],c=a===r.length-1,h=o==="/"?t:t.slice(o.length)||"/",m=Ul({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},h),g=u.route;if(!m&&c&&n&&!r[r.length-1].route.index&&(m=Ul({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!m)return null;Object.assign(l,m.params),s.push({params:l,pathname:dt([o,m.pathname]),pathnameBase:Zm(dt([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=dt([o,m.pathnameBase]))}return s}function Ul(e,t){typeof e=="string"&&(e={path:e,c
Line truncated
|
||||
|
||||
Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let g=vt(),v;if(t){let f=typeof t=="string"?Mn(t):t;G(h==="/"||((d=f.pathname)==null?void 0:d.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${f.pathname}" was given in the \`location\` prop.`),v=f}else v=g;let k=v.pathname||"/",w=k;if(h!=="/"){let f=h.replace(/^\//,"").split("/");w="/"+k.replace(/^\//,"").split("/").slice(f.length).join("/")}let N=Td(e,{pathname:w});qe(m||N!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qe(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=wh(N&&N.map(f=>Object.assign({},f,{params:Object.assign({},u,f.params),pathname:dt([h,o.encodeLocation?o.encodeLocation(f.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?h:dt([h,o.encodeLocation?o.encodeLocation(f.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),s,n,r,l);return t&&p?y.createElement(Lr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},p):p}function gh(){let e=Ch(),t=rh(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:o},"ErrorBoundary")," or"," ",y.createElement("code",{style:o},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:l},n):null,s)}var yh=y.createElement(gh,null),Ud=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=fh(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(rt.Provider,{value:this.props.routeContext},y.createElement(Da.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(vh,{error:e},t):t}};Ud.contextType=sh;var $o=new WeakMap;function vh({children:e,error:t}){let{basename:n}=y.useContext(Me);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=dh(t.digest);if(r){let l=$o.get(t);if(l)throw l;let o=Md(r.location,n);if(Id&&!$o.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw $o.set(t,s),s}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function xh({routeContext:e,match:t,children:n}){let r=y.useContext(An);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(rt.Provider,{value:e},n)}function wh(e,t=[],n=null,r=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n==null?void 0:n.errors;if(s!=null){let h=o.findIndex(m=>m.route.id&&(s==null?void 0:s[m.route.id])!==void 0);G(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let a=!1,u=-1;if(n)for(let h=0;h<o.length;h++){let m=o[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=h),m.route.id){let{loaderData:g,errors:v}=n,k=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||Line truncated
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Jd=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const cg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const dg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const au=e=>{const t=dg(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/var fg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const pg=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const mg=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:s,...a},u)=>y.createElement("svg",{ref:u,...fg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jd("lucide",l),...!o&&!pg(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,h])=>y.createElement(c,h)),...Array.isArray(o)?o:[o]]));/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const A=(e,t)=>{const n=y.forwardRef(({className:r,...l},o)=>y.createElement(mg,{ref:o,iconNode:t,className:Jd(`lucide-${cg(au(e))}`,`lucide-${e}`,r),...l}));return n.displayName=au(e),n};/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const hg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Gd=A("arrow-right",hg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gg=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],yg=A("bot",gg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bl=A("check",vg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ds=A("chevron-down",xg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const wg=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],kg=A("chevron-left",wg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Sg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ng=A("chevron-right",Sg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const jg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Fs=A("circle-check",jg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Cg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Eg=A("circle-x",Cg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const _g=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Yd=A("cloud",_g);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Pg=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qd=A("copy",Pg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const bg=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Tg=A("cpu",bg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Rg=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Lg=A("download",Rg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ig=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],iu=A("external-link",Ig);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Mg=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Ag=A("file-code",Mg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Og=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zg=A("info",Og);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Dg=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Fg=A("key",Dg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const $g=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],uu=A("layout-dashboard",$g);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ug=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bg=A("loader-circle",Ug);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Vg=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Kg=A("lock",Vg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Hg=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Wg=A("log-out",Hg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Qg=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Jg=A("menu",Qg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Gg=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Yg=A("message-square",Gg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const qg=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xg=A("play",qg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Zg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],cu=A("plus",Zg);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ey=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ty=A("refresh-cw",ey);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ny=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],du=A("search",ny);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ry=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ly=A("send",ry);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const oy=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Xd=A("server",oy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const sy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Zd=A("shield-check",sy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ay=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],iy=A("square",ay);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const uy=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],cy=A("terminal",uy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const dy=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],fy=A("toggle-left",dy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const py=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],my=A("toggle-right",py);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const hy=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],fu=A("trash-2",hy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const gy=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],yy=A("triangle-alert",gy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const vy=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ef=A("upload",vy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const xy=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],wy=A("user",xy);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const ky=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Sy=A("users",ky);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const Ny=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$s=A("x",Ny);/**
|
||||
* @license lucide-react v0.563.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const jy=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pu=A("zap",jy);function tf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=tf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=tf(e))&&(r&&(r+=" "),r+=t);return r}const Cy={label:"Language",english:"English",chinese:"中文"},Ey={accounts:{label:"Account Management",desc:"Manage the DeepSeek account pool"},test:{label:"API Test",desc:"Test API connectivity and responses"},import:{label:"Batch Import",desc:"Bulk import account configuration"},vercel:{label:"Vercel Sync",desc:"Sync configuration to Vercel"}},_y={onlineAdminConsole:"Online Admin Console",systemStatus:"System Status",statusOnline:"Online",accounts:"Accounts",keys:"Keys",signOut:"Sign out"},Py={expired:"Authentication expired. Please sign in again.",checking:"Checking authentication status..."},by={fetchConfig:"Failed to fetch configuration: {error}"},Ty={cancel:"Cancel",add:"Add",delete:"Delete",copy:"Copy",generate:"Generate",test:"Test",testing:"Testing...",loading:"Loading..."},Ry={deleted:"Deleted successfully",deleteFailed:"Delete failed",failedToAdd:"Failed to add",networkError:"Network error.",requestFailed:"Request failed.",generationStopped:"Generation stopped.",invalidJson:"Invalid JSON format.",importFailed:"Import failed.",copyFailed:"Copy failed."},Ly={adminConsole:"Admin Console",apiStatus:"API Status",features:{compatibility:{title:"Full Compatibility",desc:"OpenAI & Claude format support"},loadBalancing:{title:"Load Balancing",desc:"Smart rotation with stable throughput"},reasoning:{title:"Deep Reasoning",desc:"Expose reasoning traces when enabled"},search:{title:"Web Search",desc:"Integrated native web search"}}},Iy={addKeySuccess:"API key added successfully.",addAccountSuccess:"Account added successfully.",requiredFields:"Password and email/mobile are required.",deleteKeyConfirm:"Are you sure you want to delete this API key?",deleteAccountConfirm:"Are you sure you want to delete this account?",testAllConfirm:"Test API connectivity for all accounts?",testAllCompleted:"Completed: {success}/{total} available",testFailed:"Test failed: {error}",available:"Available",inUse:"In use",totalPool:"Total pool",accountsUnit:"accounts",threadsUnit:"threads",apiKeysTitle:"API Keys",apiKeysDesc:"Manage the API access key pool",addKey:"Add key",copied:"Copied",copyKeyTitle:"Copy key",deleteKeyTitle:"Delete key",noApiKeys:"No API keys found.",accountsTitle:"DeepSeek Accounts",accountsDesc:"Manage the DeepSeek account pool",testAll:"Test all",addAccount:"Add account",testingAllAccounts:"Testing all accounts...",sessionActive:"Session active",reauthRequired:"Re-auth required",noAccounts:"No accounts found.",modalAddKeyTitle:"Add API key",newKeyLabel:"New key value",newKeyPlaceholder:"Enter a custom API key",generate:"Generate",generateHint:"Click Generate to create a random key.",addKeyLoading:"Adding...",addKeyAction:"Add key",modalAddAccountTitle:"Add DeepSeek account",emailOptional:"Email (optional)",mobileOptional:"Mobile (optional)",passwordLabel:"Password",passwordPlaceholder:"Account password",addAccountLoading:"Adding...",addAccountAction:"Add account",pageInfo:"Page {current}/{total}, {count} accounts total"},My={defaultMessage:"Hello, please introduce yourself in one sentence.",models:{chat:"Non-reasoning model",reasoner:"Reasoning model",chatSearch:"Non-reasoning model (with search)",reasonerSearch:"Reasoning model (with search)"},missingApiKey:"Please provide an API key.",requestFailed:"Request failed.",networkError:"Network error: {error}",testSuccess:"{account}: Test successful ({time}ms)",config:"Configuration",modelLabel:"Model",streamMode:"Streaming",accountSelector:"Account",autoRandom:"🤖 Auto / Random",apiKeyOptional:"API Key (optional)",apiKeyDefault:"Default: ...{suffix}",apiKeyPlaceholder:"Enter a custom key",modeManaged:"Managed key mode (uses account pool).",modeDirect:"Direct token mode (requires a valid DeepSeek token).",statusError:"Error",reasoningTrace:"Reasoning Trace",generating:"Generating response...",enterMessage:"Enter a message...",adminConsoleLabel:"DeepSeek admin console"},Ay={templates:{full:{name:"Full configuration template",desc:"Includes keys, accounts, and model mapping"},emailOnly:{name:"Email-only accounts",desc:"Batch import accounts using email login"},mobileOnly:{name:"Mobile-only accounts",desc:"Batch import accounts using mobile login"},keysOnly:{name:"API keys only",desc:"Add API access keys only"}},enterJson:"Please provide JSON configuration content.",importSuccess:"Import successful: {keys} keys, {accounts} accounts",templateLoaded:"Template loaded: {name}",currentConfigLoaded:"CurrentLine truncated
|
||||
`);$n=Ka.pop()||"";for(const rf of Ka){const uo=rf.trim();if(!uo||!uo.startsWith("data: "))continue;const co=uo.slice(6);if(co!=="[DONE]")try{const zr=(M=JSON.parse(co).choices)==null?void 0:M[0];if(zr!=null&&zr.delta){const Dr=zr.delta;Dr.reasoning_content&&x(fo=>fo+Dr.reasoning_content),Dr.content&&d(fo=>fo+Dr.content)}}catch(Ha){console.error("Invalid JSON hunk:",co,Ha)}}}}else{const K=await _e.json();k({success:!0,status_code:_e.status,...K}),t("success",r("apiTester.testSuccess",{account:m||"Auto",time:"N/A"}))}}catch(ne){ne.name==="AbortError"?t("info",r("messages.generationStopped")):(t("error",r("apiTester.networkError",{error:ne.message})),k({error:ne.message,success:!1}))}finally{N(!1),C(!1),O.current=null}}};return y.useEffect(()=>{u(M=>M===R.current?s:M),R.current=s},[s]),i.jsxs("div",{className:"flex flex-col lg:grid lg:grid-cols-12 gap-6 h-[calc(100vh-140px)]",children:[i.jsx("div",{className:W("lg:col-span-3 flex flex-col transition-all duration-300 ease-in-out z-20",se?"h-auto":"h-14 lg:h-full"),children:i.jsxs("div",{className:"bg-card border border-border rounded-xl flex flex-col h-full shadow-sm",children:[i.jsxs("button",{onClick:()=>rn(!se),className:"lg:hidden flex items-center justify-between p-4 w-full bg-muted/20 hover:bg-muted/30 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2.5 font-medium text-sm text-foreground",children:[i.jsx("div",{className:"p-1.5 rounded-md bg-transparent text-foreground",children:i.jsx(cy,{className:"w-4 h-4"})}),i.jsx("span",{children:r("apiTester.config")})]}),i.jsx("div",{className:W("transition-transform duration-300 text-muted-foreground",se?"rotate-180":""),children:i.jsx(Ds,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:W("p-4 space-y-6 overflow-y-auto custom-scrollbar flex-1",!se&&"hidden lg:block"),children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.modelLabel")}),i.jsx("div",{className:"grid grid-cols-1 gap-2",children:$.map(M=>{const ne=M.icon;return i.jsxs("button",{onClick:()=>o(M.id),className:W("group relative flex items-start gap-3 p-3 rounded-lg border text-left transition-all duration-200",l===M.id?"bg-secondary border-primary/50 shadow-sm":"bg-transparent border-transparent hover:bg-muted"),children:[i.jsx("div",{className:W("p-1.5 rounded-md shrink-0 transition-colors",l===M.id?M.color:"text-muted-foreground group-hover:text-foreground"),children:i.jsx(ne,{className:"w-4 h-4"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:W("font-medium text-sm",l===M.id?"text-foreground":"text-foreground/80"),children:M.name}),i.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:M.desc})]}),l===M.id&&i.jsx("div",{className:W("absolute top-3 right-3",M.color),children:i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-current"})})]},M.id)})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.streamMode")}),i.jsxs("button",{onClick:()=>b(!E),className:W("w-full flex items-center justify-between px-3 py-2 rounded-lg border transition-all duration-200",E?"bg-primary/10 border-primary/50 text-foreground":"bg-background border-border text-muted-foreground hover:bg-muted/50"),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:W("p-1.5 rounded-md",E?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:i.jsx(pu,{className:"w-4 h-4"})}),i.jsx("span",{className:"text-sm font-medium",children:r("apiTester.streamMode")})]}),E?i.jsx(my,{className:"w-5 h-5 text-primary"}):i.jsx(fy,{className:"w-5 h-5 text-muted-foreground"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.accountSelector")}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{className:"w-full h-10 pl-3 pr-8 bg-secondary border border-border rounded-lg text-sm appearance-none focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring transition-all cursor-pointer hover:bg-muted",value:m,onChange:M=>g(M.target.value),children:[i.jsx("option",{value:"",className:"bg-popover text-popover-foreground",children:r("apiTester.autoRandom")}),zn.map((M,ne)=>i.jsxs("option",{value:M.email||M.mobile,className:"bg-popover text-popover-foreground",children:["👤 ",M.email||M.mobile]},ne))]}),i.jsx(Ds,{className:"absolute right-2.5 top-3 w-4 h-4 text-muted-foreground pointer-events-none"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider ml-0.5",children:r("apiTester.apiKeyOptional")}),i.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,className:
Line truncated
|
||||
"keys": ["your-api-key"],
|
||||
"accounts": [
|
||||
{"email": "...", "password": "...", "token": ""}
|
||||
]
|
||||
}`,spellCheck:!1})}),u&&i.jsx("div",{className:W("p-4 border-t",u.imported_keys||u.imported_accounts?"bg-emerald-500/10 border-emerald-500/20":"bg-destructive/10 border-destructive/20"),children:i.jsxs("div",{className:"flex items-start gap-3",children:[u.imported_keys||u.imported_accounts?i.jsx(Bl,{className:"w-5 h-5 text-emerald-500 mt-0.5"}):i.jsx(yy,{className:"w-5 h-5 text-destructive mt-0.5"}),i.jsxs("div",{children:[i.jsx("h4",{className:W("font-medium",u.imported_keys||u.imported_accounts?"text-emerald-500":"text-destructive"),children:r("batchImport.importComplete")}),i.jsx("p",{className:"text-sm opacity-80 mt-1",children:r("batchImport.importSummary",{keys:u.imported_keys,accounts:u.imported_accounts})})]})]})})]})]})}function lv({onMessage:e,authFetch:t}){const{t:n}=Bt(),[r,l]=y.useState(""),[o,s]=y.useState(""),[a,u]=y.useState(""),[c,h]=y.useState(!1),[m,g]=y.useState(null),[v,k]=y.useState(null),[w,N]=y.useState(null),p=t||fetch,d=y.useCallback(async()=>{try{const x=await p("/admin/vercel/status");if(x.ok){const S=await x.json();N(S)}}catch(x){console.error("Failed to fetch sync status:",x)}},[p]);y.useEffect(()=>{(async()=>{try{const C=await p("/admin/vercel/config");if(C.ok){const E=await C.json();k(E),E.project_id&&s(E.project_id),E.team_id&&u(E.team_id)}}catch(C){console.error("Failed to load preconfig:",C)}})(),d();const S=setInterval(d,15e3);return()=>clearInterval(S)},[d]);const f=async()=>{const x=v!=null&&v.has_token&&!r?"__USE_PRECONFIG__":r;if(!x&&!(v!=null&&v.has_token)){e("error",n("vercel.tokenRequired"));return}if(!o){e("error",n("vercel.projectRequired"));return}h(!0),g(null);try{const S=await p("/admin/vercel/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({vercel_token:x,project_id:o,team_id:a||void 0})}),C=await S.json();S.ok?(g({...C,success:!0}),e("success",C.message),d()):(g({...C,success:!1}),e("error",C.detail||n("vercel.syncFailed")))}catch{e("error",n("vercel.networkError"))}finally{h(!1)}};return i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto h-[calc(100vh-140px)]",children:[i.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-sm p-6 space-y-6",children:[i.jsxs("div",{className:"border-b border-border pb-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[i.jsx(Yd,{className:"w-6 h-6 text-primary"}),n("vercel.title")]}),w&&i.jsxs("div",{className:W("flex items-center gap-1.5 text-xs font-semibold px-2.5 py-1 rounded-full border transition-colors",w.synced?"text-emerald-500 bg-emerald-500/10 border-emerald-500/20":w.has_synced_before?"text-amber-500 bg-amber-500/10 border-amber-500/20":"text-muted-foreground bg-muted/50 border-border"),children:[i.jsx("span",{className:W("w-1.5 h-1.5 rounded-full",w.synced?"bg-emerald-500":w.has_synced_before?"bg-amber-500 animate-pulse":"bg-muted-foreground")}),w.synced?n("vercel.statusSynced"):w.has_synced_before?n("vercel.statusNotSynced"):n("vercel.statusNeverSynced")]})]}),i.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:n("vercel.description")}),(w==null?void 0:w.last_sync_time)&&i.jsxs("p",{className:"text-xs text-muted-foreground/60 mt-1.5 flex items-center gap-1",children:[i.jsx(ty,{className:"w-3 h-3"}),n("vercel.lastSyncTime",{time:new Date(w.last_sync_time*1e3).toLocaleString()})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{className:"text-sm font-medium flex items-center justify-between",children:[n("vercel.tokenLabel"),i.jsxs("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:[n("vercel.getToken")," ",i.jsx(iu,{className:"w-3 h-3"})]})]}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:"password",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all pr-10",placeholder:v!=null&&v.has_token?n("vercel.tokenPlaceholderPreconfig"):n("vercel.tokenPlaceholder"),value:r,onChange:x=>l(x.target.value)}),(v==null?void 0:v.has_token)&&!r&&i.jsx("div",{className:"absolute right-3 top-2.5 text-emerald-500",children:i.jsx(Fs,{className:"w-5 h-5"})})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-sm font-medium",children:n("vercel.projectIdLabel")}),i.jsx("input",{type:"text",className:"w-full h-10 px-3 bg-background border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-ring transition-all",placeholder:"prj_xxxxxxxxxxxx or Project Name",value:o,onChange:x=>s(x.target.value)}),i.jsx("p",{className:"text-xs text-muted-foreground",children:n("vercel.projectIdHint")})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{c
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relLine truncated
|
||||
@@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- SEO Meta Tags -->
|
||||
<title>DS2API - 管理面板 / Admin Console</title>
|
||||
<meta name="description" content="DS2API 管理面板:管理 DeepSeek 账号、测试 API、同步 Vercel 配置 / Admin console for accounts, API tests, and Vercel sync." />
|
||||
<meta name="keywords" content="DeepSeek, API, OpenAI, 管理面板, admin console, DS2API" />
|
||||
<meta name="author" content="CJackHwang" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
|
||||
<!-- Open Graph / Social -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="DS2API - 管理面板 / Admin Console" />
|
||||
<meta property="og:description" content="Manage DeepSeek accounts, test the API, and sync Vercel configuration." />
|
||||
<meta property="og:site_name" content="DS2API" />
|
||||
|
||||
<!-- PWA / Mobile -->
|
||||
<meta name="theme-color" content="#f59e0b" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="DS2API" />
|
||||
|
||||
<!-- Favicon - using data URI for orange-yellow gradient icon -->
|
||||
<link rel="icon" type="image/svg+xml"
|
||||
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23f59e0b'/%3E%3Cstop offset='100%25' stop-color='%23ef4444'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect rx='20' width='100' height='100' fill='url(%23g)'/%3E%3Ctext x='50' y='68' font-family='Arial,sans-serif' font-size='48' font-weight='bold' fill='white' text-anchor='middle'%3EDS%3C/text%3E%3C/svg%3E" />
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
||||
<script type="module" crossorigin src="/admin/assets/index-BZnWnZUg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/admin/assets/index-Dd4LAu0y.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,5 +1,11 @@
|
||||
{
|
||||
"version": 2,
|
||||
"buildCommand": "npm ci --prefix webui && npm run build --prefix webui",
|
||||
"functions": {
|
||||
"api/index.go": {
|
||||
"includeFiles": "static/admin/**"
|
||||
}
|
||||
},
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
|
||||
Reference in new issue
Block a user