Spaces:
Running
Running
Z User commited on
Commit ·
c75eed1
1
Parent(s): f55a35b
feat: add pre-built hermes-web-ui (Hermes teal theme + Chinese i18n)
Browse files- Vue 3 + Naive UI SPA served at /webui
- Hermes teal color theme: #0d9488 accent, high readability
- Full Chinese translation (zh.ts locale)
- iPhone 15 Pro Max responsive (768px breakpoint)
- Removed binary files (MP4, TTF, PNG) for HF compatibility
This view is limited to 50 files because it contains too many changes. See raw diff
- Dockerfile +1 -0
- entry.py +49 -8
- webui/assets/Add-D070kowG.js +1 -0
- webui/assets/ChannelsView-Br2GRhTp.js +1 -0
- webui/assets/ChannelsView-DIBfwpcR.css +1 -0
- webui/assets/ChatView-BYd7bMKt.js +5 -0
- webui/assets/ChatView-DG5WMkBg.css +1 -0
- webui/assets/Dropdown-ReirMLrI.js +125 -0
- webui/assets/FilesView-B0-Cm0Le.js +0 -0
- webui/assets/FilesView-W1cq2eQW.css +1 -0
- webui/assets/FormItem-DB8yIr9W.js +110 -0
- webui/assets/GatewaysView-B2c9soUv.css +1 -0
- webui/assets/GatewaysView-BxceJN_D.js +1 -0
- webui/assets/GroupChatView-8G8m7Tft.js +0 -0
- webui/assets/GroupChatView-CjrsrmTX.css +1 -0
- webui/assets/InputNumber-P0oq6NtF.js +13 -0
- webui/assets/JobsView-CuKEnltM.js +2 -0
- webui/assets/JobsView-DlZj5jxn.css +1 -0
- webui/assets/LoginView-YmilKiMi.css +1 -0
- webui/assets/LoginView-vUCsbDMV.js +1 -0
- webui/assets/LogsView-B7bccIME.js +1 -0
- webui/assets/LogsView-BuxFUnEf.css +1 -0
- webui/assets/MarkdownRenderer-BLJUO767.css +1 -0
- webui/assets/MarkdownRenderer-P3bVUblX.js +0 -0
- webui/assets/MemoryView--hC8Atwx.js +7 -0
- webui/assets/MemoryView-CaRuy_r5.css +1 -0
- webui/assets/ModelsView-D6DC0TTh.css +1 -0
- webui/assets/ModelsView-DiGxSAIV.js +83 -0
- webui/assets/Popconfirm-ClpYjEYd.js +16 -0
- webui/assets/ProfilesView-BKAx9zCB.js +1 -0
- webui/assets/ProfilesView-Bzgt-TSp.css +1 -0
- webui/assets/SettingRow-BACRFGe8.js +1 -0
- webui/assets/SettingRow-BOmZezg0.css +1 -0
- webui/assets/SettingsView-CA5ncO8e.css +1 -0
- webui/assets/SettingsView-fiDPfpVZ.js +352 -0
- webui/assets/SkillsView-Fk_3rYtt.js +1 -0
- webui/assets/SkillsView-UN8bqBzc.css +1 -0
- webui/assets/Space-BZigAtaW.js +1 -0
- webui/assets/Switch-CDXAYhwk.js +102 -0
- webui/assets/TerminalView-gsqzLJ6S.js +0 -0
- webui/assets/TerminalView-rrxswUK5.css +1 -0
- webui/assets/Tooltip-DQzh27d-.js +1 -0
- webui/assets/Upload-DNhu4d4-.js +440 -0
- webui/assets/UsageView-AFixvCPJ.js +1 -0
- webui/assets/UsageView-DZQCtRuu.css +1 -0
- webui/assets/_arrayReduce-Cj7sZjrj.js +1 -0
- webui/assets/_baseFor-tDInUmcl.js +1 -0
- webui/assets/_baseUniq-_HXxrvbp.js +1 -0
- webui/assets/abap-CDhDeuvv.js +1 -0
- webui/assets/apex-CAdLmNAy.js +1 -0
Dockerfile
CHANGED
|
@@ -36,6 +36,7 @@ COPY entry.py /app/entry.py
|
|
| 36 |
COPY dashboard.html /app/dashboard.html
|
| 37 |
COPY plugins/pollinations/ /root/.hermes/plugins/image_gen/pollinations/
|
| 38 |
COPY scripts/ /app/scripts/
|
|
|
|
| 39 |
|
| 40 |
RUN chmod 600 /root/.hermes/.env
|
| 41 |
|
|
|
|
| 36 |
COPY dashboard.html /app/dashboard.html
|
| 37 |
COPY plugins/pollinations/ /root/.hermes/plugins/image_gen/pollinations/
|
| 38 |
COPY scripts/ /app/scripts/
|
| 39 |
+
COPY webui/ /app/webui/
|
| 40 |
|
| 41 |
RUN chmod 600 /root/.hermes/.env
|
| 42 |
|
entry.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
|
| 4 |
Serves a real-time monitoring dashboard on port 7860 and runs the
|
| 5 |
Hermes Gateway (Feishu WebSocket bot) in a background thread.
|
|
|
|
| 6 |
"""
|
| 7 |
|
| 8 |
import json
|
|
@@ -14,6 +15,7 @@ import threading
|
|
| 14 |
import time
|
| 15 |
import logging
|
| 16 |
import psutil
|
|
|
|
| 17 |
from datetime import datetime, timezone
|
| 18 |
from http.server import HTTPServer, BaseHTTPRequestHandler
|
| 19 |
from socketserver import ThreadingMixIn
|
|
@@ -38,6 +40,7 @@ CONFIG_FILE = os.path.join(HERMES_HOME, "config.yaml")
|
|
| 38 |
ENV_FILE = os.path.join(HERMES_HOME, ".env")
|
| 39 |
DASHBOARD_HTML = "/app/dashboard.html"
|
| 40 |
DEPLOY_HTML = "/app/deploy.html"
|
|
|
|
| 41 |
|
| 42 |
# ---------------------------------------------------------------------------
|
| 43 |
# Logging
|
|
@@ -263,33 +266,70 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
| 263 |
length = int(self.headers.get("Content-Length", 0))
|
| 264 |
return self.rfile.read(length) if length > 0 else b""
|
| 265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
# ── GET routes ──
|
| 267 |
|
| 268 |
def do_GET(self):
|
| 269 |
parsed = urlparse(self.path)
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 273 |
return self._send_html(DASHBOARD_HTML)
|
| 274 |
|
| 275 |
# Deploy overview
|
| 276 |
-
if
|
| 277 |
return self._send_html(DEPLOY_HTML)
|
| 278 |
|
| 279 |
# SSE log stream
|
| 280 |
-
if
|
| 281 |
return self._handle_sse()
|
| 282 |
|
| 283 |
# Status
|
| 284 |
-
if
|
| 285 |
return self._send_json(self._get_status())
|
| 286 |
|
| 287 |
# Sessions
|
| 288 |
-
if
|
| 289 |
return self._send_json(_get_session_list())
|
| 290 |
|
| 291 |
# Log history (REST, not SSE)
|
| 292 |
-
if
|
| 293 |
return self._send_json(self._get_log_history(parsed.query))
|
| 294 |
|
| 295 |
self.send_error(404)
|
|
@@ -485,6 +525,7 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
| 485 |
|
| 486 |
def main():
|
| 487 |
logger.info("=== Hermes Agent — HuggingFace Space Entry ===")
|
|
|
|
| 488 |
|
| 489 |
# Setup persistent storage
|
| 490 |
_ensure_persistent_storage()
|
|
|
|
| 3 |
|
| 4 |
Serves a real-time monitoring dashboard on port 7860 and runs the
|
| 5 |
Hermes Gateway (Feishu WebSocket bot) in a background thread.
|
| 6 |
+
Also serves hermes-web-ui (Vue SPA) at /webui
|
| 7 |
"""
|
| 8 |
|
| 9 |
import json
|
|
|
|
| 15 |
import time
|
| 16 |
import logging
|
| 17 |
import psutil
|
| 18 |
+
import mimetypes
|
| 19 |
from datetime import datetime, timezone
|
| 20 |
from http.server import HTTPServer, BaseHTTPRequestHandler
|
| 21 |
from socketserver import ThreadingMixIn
|
|
|
|
| 40 |
ENV_FILE = os.path.join(HERMES_HOME, ".env")
|
| 41 |
DASHBOARD_HTML = "/app/dashboard.html"
|
| 42 |
DEPLOY_HTML = "/app/deploy.html"
|
| 43 |
+
WEBUI_DIR = "/app/webui"
|
| 44 |
|
| 45 |
# ---------------------------------------------------------------------------
|
| 46 |
# Logging
|
|
|
|
| 266 |
length = int(self.headers.get("Content-Length", 0))
|
| 267 |
return self.rfile.read(length) if length > 0 else b""
|
| 268 |
|
| 269 |
+
def _send_file(self, filepath: str, content_type: str = None):
|
| 270 |
+
"""Serve a static file (JS, CSS, images, etc.)."""
|
| 271 |
+
try:
|
| 272 |
+
with open(filepath, "rb") as f:
|
| 273 |
+
body = f.read()
|
| 274 |
+
if content_type is None:
|
| 275 |
+
content_type = mimetypes.guess_type(filepath)[0] or "application/octet-stream"
|
| 276 |
+
self.send_response(200)
|
| 277 |
+
self.send_header("Content-Type", content_type)
|
| 278 |
+
self.send_header("Content-Length", str(len(body)))
|
| 279 |
+
self.send_header("Cache-Control", "public, max-age=86400")
|
| 280 |
+
self.end_headers()
|
| 281 |
+
self.wfile.write(body)
|
| 282 |
+
except FileNotFoundError:
|
| 283 |
+
self.send_error(404)
|
| 284 |
+
|
| 285 |
+
def _send_webui_html(self):
|
| 286 |
+
"""Serve WebUI SPA index.html."""
|
| 287 |
+
index_path = os.path.join(WEBUI_DIR, "index.html")
|
| 288 |
+
if os.path.isfile(index_path):
|
| 289 |
+
self._send_html(index_path)
|
| 290 |
+
else:
|
| 291 |
+
self.send_error(404, "WebUI not installed")
|
| 292 |
+
|
| 293 |
# ── GET routes ──
|
| 294 |
|
| 295 |
def do_GET(self):
|
| 296 |
parsed = urlparse(self.path)
|
| 297 |
+
path = parsed.path
|
| 298 |
+
|
| 299 |
+
# ── WebUI SPA routes ──
|
| 300 |
+
if path == "/webui" or path == "/webui/":
|
| 301 |
+
return self._send_webui_html()
|
| 302 |
+
|
| 303 |
+
if path.startswith("/webui/"):
|
| 304 |
+
# Try serving static file first
|
| 305 |
+
static_path = os.path.join(WEBUI_DIR, path[len("/webui/"):])
|
| 306 |
+
if os.path.isfile(static_path):
|
| 307 |
+
return self._send_file(static_path)
|
| 308 |
+
# SPA fallback: serve index.html for client-side routing
|
| 309 |
+
return self._send_webui_html()
|
| 310 |
+
|
| 311 |
+
# ── Dashboard ──
|
| 312 |
+
if path in ("/", "/index.html"):
|
| 313 |
return self._send_html(DASHBOARD_HTML)
|
| 314 |
|
| 315 |
# Deploy overview
|
| 316 |
+
if path == "/deploy":
|
| 317 |
return self._send_html(DEPLOY_HTML)
|
| 318 |
|
| 319 |
# SSE log stream
|
| 320 |
+
if path == "/api/logs/stream":
|
| 321 |
return self._handle_sse()
|
| 322 |
|
| 323 |
# Status
|
| 324 |
+
if path == "/api/status":
|
| 325 |
return self._send_json(self._get_status())
|
| 326 |
|
| 327 |
# Sessions
|
| 328 |
+
if path == "/api/sessions":
|
| 329 |
return self._send_json(_get_session_list())
|
| 330 |
|
| 331 |
# Log history (REST, not SSE)
|
| 332 |
+
if path == "/api/logs":
|
| 333 |
return self._send_json(self._get_log_history(parsed.query))
|
| 334 |
|
| 335 |
self.send_error(404)
|
|
|
|
| 525 |
|
| 526 |
def main():
|
| 527 |
logger.info("=== Hermes Agent — HuggingFace Space Entry ===")
|
| 528 |
+
logger.info("WebUI at /webui (static preview)")
|
| 529 |
|
| 530 |
# Setup persistent storage
|
| 531 |
_ensure_persistent_storage()
|
webui/assets/Add-D070kowG.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Fr as e,Lr as t}from"./index-Cl8-DFW_.js";var n=e({name:`Add`,render(){return t(`svg`,{width:`512`,height:`512`,viewBox:`0 0 512 512`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t(`path`,{d:`M256 112V400M400 256H112`,stroke:`currentColor`,"stroke-width":`32`,"stroke-linecap":`round`,"stroke-linejoin":`round`}))}});export{n as t};
|
webui/assets/ChannelsView-Br2GRhTp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./Switch-CDXAYhwk.js";import{Ar as t,Dr as n,Fr as r,Gr as i,I as a,Jr as o,N as s,Nr as c,Or as l,Pr as u,Qr as d,Ur as f,Wr as p,Yr as m,ai as h,c as g,ci as _,ei as v,jr as y,k as b,kr as x,lr as S,ni as C,oi as w,qr as T,u as E,wr as D,y as O}from"./index-Cl8-DFW_.js";import{a as k,i as A,n as j,r as M,t as N}from"./settings-Cxn8gJl1.js";import{t as P}from"./SettingRow-BACRFGe8.js";var F={class:`platform-info`},I=[`innerHTML`],L={class:`platform-name`},R={key:0,class:`platform-card-body`},z=g(r({__name:`PlatformCard`,props:{name:{},icon:{},config:{},credentials:{}},setup(e){let r=e,s=C(!0),{t:f}=S(),p=n(()=>{let e=r.credentials;if(!e)return!1;let t=[`token`,`api_key`,`app_id`,`client_id`,`secret`,`app_secret`,`client_secret`,`access_token`,`bot_id`,`account_id`,`enabled`];return[e,e.extra].filter(Boolean).some(e=>t.some(t=>{let n=e[t];return n!=null&&n!==``&&n!==!1}))});return(n,r)=>(i(),y(`div`,{class:w([`platform-card`,{configured:p.value}])},[l(`div`,{class:`platform-card-header`,onClick:r[0]||=e=>s.value=!s.value},[l(`div`,F,[l(`span`,{class:`platform-icon`,innerHTML:e.icon},null,8,I),l(`span`,L,_(e.name),1),u(h(a),{type:p.value?`success`:`default`,size:`small`,round:``},{default:d(()=>[c(_(p.value?h(f)(`common.configured`):h(f)(`common.notConfigured`)),1)]),_:1},8,[`type`])]),l(`span`,{class:w([`expand-icon`,{expanded:s.value}])},`▾`,2)]),s.value?(i(),y(`div`,R,[o(n.$slots,`default`,{},void 0,!0)])):t(``,!0)],2))}}),[[`__scopeId`,`data-v-cee18614`]]),B={class:`settings-section`},V={class:`weixin-qr-section`},H={key:1,class:`weixin-qr-loading`},U={key:2,class:`weixin-qr-hint`},W=g(r({__name:`PlatformSettings`,setup(n){let r=N(),a=O(),{t:o}=S(),f=v({});function g(e,t){return`${e}.${t}`}function w(e,t){return!!f[g(e,t)]}async function E(e,t,n){let r=g(e,t);f[r]=!0;try{await n(),a.success(o(`settings.saved`))}catch{a.error(o(`settings.saveFailed`))}finally{f[r]=!1}}async function F(e,t,n){E(e,t,()=>r.saveSection(e,n))}async function I(e,t,n){E(e,t,async()=>{await A(e,n),await r.fetchSettings()})}function L(e){return r.platforms[e]||{}}let R=C(``),W=C(``),G=C(`idle`),K=null;async function q(){G.value=`loading`,R.value=``,W.value=``,Y();try{let e=await j();W.value=e.qrcode,R.value=e.qrcode_url,window.open(e.qrcode_url,`_blank`),G.value=`waiting`,J()}catch(e){G.value=`error`,a.error(e.message||o(`platform.qrFetching`))}}function J(){W.value&&(K=setTimeout(async()=>{try{let e=await M(W.value);e.status===`wait`?J():e.status===`scaned`?(G.value=`scaned`,J()):e.status===`expired`?G.value=`expired`:e.status===`confirmed`&&(G.value=`confirmed`,await k({account_id:e.account_id,token:e.token,base_url:e.base_url}),await r.fetchSettings(),a.success(o(`settings.saved`)))}catch{J()}},3e3))}function Y(){K&&=(clearTimeout(K),null)}p(()=>{Y()});let X=[{key:`telegram`,name:`Telegram`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.479.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg>`},{key:`discord`,name:`Discord`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"/></svg>`},{key:`slack`,name:`Slack`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 0a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V5.042zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1 2.523-2.52h6.313A2.528 2.528 0 0 1 24 18.956a2.528 2.528 0 0 1-2.522 2.523h-6.313z"/></svg>`},{key:`whatsapp`,name:`WhatsApp`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>`},{key:`matrix`,name:`Matrix`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.433-.245.936-.365 1.5-.365.54 0 1.033.107 1.48.324.448.217.786.619 1.017 1.205.24-.376.558-.702.956-.98.398-.277.872-.414 1.424-.414.41 0 .784.065 1.122.194.34.13.629.325.87.588.241.263.428.59.56.984.132.393.198.85.198 1.368v5.89h-2.49v-4.893c0-.268-.016-.525-.048-.77a1.627 1.627 0 00-.2-.63 1.028 1.028 0 00-.392-.426 1.294 1.294 0 00-.616-.134c-.277 0-.508.05-.693.15a1.043 1.043 0 00-.43.41 1.768 1.768 0 00-.214.616 4.15 4.15 0 00-.06.74v4.937H9.29v-4.937c0-.25-.01-.498-.032-.742a1.84 1.84 0 00-.166-.638.998.998 0 00-.363-.448 1.206 1.206 0 00-.624-.154c-.26 0-.483.048-.67.144a1.055 1.055 0 00-.436.402 1.744 1.744 0 00-.227.616 4.108 4.108 0 00-.063.74v4.937H5.21V7.81zm15.693 15.64V.55H21.72V0H24v24h-2.28v-.55z"/></svg>`},{key:`feishu`,name:`Feishu`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M6.59 3.41a2.25 2.25 0 0 1 3.182 0L13.5 7.14l-3.182 3.182L6.59 7.59a2.25 2.25 0 0 1 0-3.182zm5.303 5.303L15.075 5.53a2.25 2.25 0 0 1 3.182 3.182L15.075 11.894 11.893 8.713zM3.41 6.59a2.25 2.25 0 0 1 3.182 0l3.182 3.182-3.182 3.182a2.25 2.25 0 0 1-3.182-3.182L3.41 6.59zm5.303 5.303L11.894 15.075a2.25 2.25 0 0 1-3.182 3.182L5.53 15.075 8.713 11.893zm5.303-5.303L17.478 9.778a2.25 2.25 0 0 1-3.182 3.182L10.53 10.075l3.182-3.182 0 .023z"/></svg>`},{key:`weixin`,name:`Weixin`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 01.213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 00.167-.054l1.903-1.114a.864.864 0 01.717-.098 10.16 10.16 0 002.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178A1.17 1.17 0 014.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178 1.17 1.17 0 01-1.162-1.178c0-.651.52-1.18 1.162-1.18zm3.68 4.025c-3.694 0-6.69 2.462-6.69 5.496 0 3.034 2.996 5.496 6.69 5.496.753 0 1.477-.1 2.158-.28a.66.66 0 01.548.074l1.46.854a.25.25 0 00.127.041.224.224 0 00.221-.225c0-.055-.022-.109-.037-.162l-.298-1.131a.453.453 0 01.163-.509C21.81 18.613 22.77 16.973 22.77 15.512c0-3.034-2.996-5.496-6.69-5.496h.198zm-2.454 3.347c.491 0 .889.404.889.902a.896.896 0 01-.889.903.896.896 0 01-.889-.903c0-.498.398-.902.889-.902zm4.912 0c.491 0 .889.404.889.902a.896.896 0 01-.889.903.896.896 0 01-.889-.903c0-.498.398-.902.889-.902z"/></svg>`},{key:`wecom`,name:`WeCom`,icon:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 01.213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 00.167-.054l1.903-1.114a.864.864 0 01.717-.098 10.16 10.16 0 002.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178A1.17 1.17 0 014.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 01-1.162 1.178 1.17 1.17 0 01-1.162-1.178c0-.651.52-1.18 1.162-1.18zm3.68 4.025c-3.694 0-6.69 2.462-6.69 5.496 0 3.034 2.996 5.496 6.69 5.496.753 0 1.477-.1 2.158-.28a.66.66 0 01.548.074l1.46.854a.25.25 0 00.127.041.224.224 0 00.221-.225c0-.055-.022-.109-.037-.162l-.298-1.131a.453.453 0 01.163-.509C21.81 18.613 22.77 16.973 22.77 15.512c0-3.034-2.996-5.496-6.69-5.496h.198zm-2.454 3.347c.491 0 .889.404.889.902a.896.896 0 01-.889.903.896.896 0 01-.889-.903c0-.498.398-.902.889-.902zm4.912 0c.491 0 .889.404.889.902a.896.896 0 01-.889.903.896.896 0 01-.889-.903c0-.498.398-.902.889-.902z"/></svg>`}];return(n,a)=>{let f=m(`NSpin`);return i(),y(`section`,B,[(i(),y(D,null,T(X,n=>u(z,{key:n.key,name:n.name,icon:n.icon,config:h(r)[n.key],credentials:L(n.key)},{default:d(()=>[n.key===`telegram`?(i(),y(D,{key:0},[u(P,{label:h(o)(`platform.botToken`),hint:h(o)(`platform.botTokenHint`)},{default:d(()=>[u(h(s),{"default-value":L(`telegram`).token||``,loading:w(`telegram`,`token`),clearable:``,size:`small`,class:`input-lg`,placeholder:`123456:ABC-DEF...`,onChange:a[0]||=e=>I(`telegram`,`token`,{token:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionGroup`)},{default:d(()=>[u(h(e),{value:h(r).telegram.require_mention,loading:w(`telegram`,`require_mention`),"onUpdate:value":a[1]||=e=>F(`telegram`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.reactions`),hint:h(o)(`platform.reactionsHint`)},{default:d(()=>[u(h(e),{value:h(r).telegram.reactions,loading:w(`telegram`,`reactions`),"onUpdate:value":a[2]||=e=>F(`telegram`,`reactions`,{reactions:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChats`),hint:h(o)(`platform.freeResponseChatsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).telegram.free_response_chats||``,loading:w(`telegram`,`free_response_chats`),size:`small`,placeholder:`chat_id1,chat_id2`,onChange:a[3]||=e=>F(`telegram`,`free_response_chats`,{free_response_chats:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.mentionPatterns`),hint:h(o)(`platform.mentionPatternsHint`)},{default:d(()=>[u(h(s),{"default-value":(h(r).telegram.mention_patterns||[]).join(`, `),loading:w(`telegram`,`mention_patterns`),size:`small`,placeholder:`pattern1, pattern2`,onChange:a[4]||=e=>F(`telegram`,`mention_patterns`,{mention_patterns:e?e.split(`,`).map(e=>e.trim()):[]})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`discord`?(i(),y(D,{key:1},[u(P,{label:h(o)(`platform.botToken`),hint:h(o)(`platform.botTokenHint`)},{default:d(()=>[u(h(s),{"default-value":L(`discord`).token||``,loading:w(`discord`,`token`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Bot token...`,onChange:a[5]||=e=>I(`discord`,`token`,{token:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionChannel`)},{default:d(()=>[u(h(e),{value:h(r).discord.require_mention,loading:w(`discord`,`require_mention`),"onUpdate:value":a[6]||=e=>F(`discord`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.autoThread`),hint:h(o)(`platform.autoThreadHint`)},{default:d(()=>[u(h(e),{value:h(r).discord.auto_thread,loading:w(`discord`,`auto_thread`),"onUpdate:value":a[7]||=e=>F(`discord`,`auto_thread`,{auto_thread:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.reactions`),hint:h(o)(`platform.reactionsHint`)},{default:d(()=>[u(h(e),{value:h(r).discord.reactions,loading:w(`discord`,`reactions`),"onUpdate:value":a[8]||=e=>F(`discord`,`reactions`,{reactions:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChannels`),hint:h(o)(`platform.freeResponseChannelsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).discord.free_response_channels||``,loading:w(`discord`,`free_response_channels`),size:`small`,placeholder:`channel_id1,channel_id2`,onChange:a[9]||=e=>F(`discord`,`free_response_channels`,{free_response_channels:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.allowedChannels`),hint:h(o)(`platform.allowedChannelsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).discord.allowed_channels||``,loading:w(`discord`,`allowed_channels`),size:`small`,placeholder:`channel_id1,channel_id2`,onChange:a[10]||=e=>F(`discord`,`allowed_channels`,{allowed_channels:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.ignoredChannels`),hint:h(o)(`platform.ignoredChannelsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).discord.ignored_channels||``,loading:w(`discord`,`ignored_channels`),size:`small`,placeholder:`channel_id1,channel_id2`,onChange:a[11]||=e=>F(`discord`,`ignored_channels`,{ignored_channels:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.noThreadChannels`),hint:h(o)(`platform.noThreadChannelsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).discord.no_thread_channels||``,loading:w(`discord`,`no_thread_channels`),size:`small`,placeholder:`channel_id1,channel_id2`,onChange:a[12]||=e=>F(`discord`,`no_thread_channels`,{no_thread_channels:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`slack`?(i(),y(D,{key:2},[u(P,{label:h(o)(`platform.botToken`),hint:h(o)(`platform.botTokenHint`)},{default:d(()=>[u(h(s),{"default-value":L(`slack`).token||``,loading:w(`slack`,`token`),clearable:``,size:`small`,class:`input-lg`,placeholder:`xoxb-...`,onChange:a[13]||=e=>I(`slack`,`token`,{token:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionChannel`)},{default:d(()=>[u(h(e),{value:h(r).slack.require_mention,loading:w(`slack`,`require_mention`),"onUpdate:value":a[14]||=e=>F(`slack`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.allowBots`),hint:h(o)(`platform.allowBotsHint`)},{default:d(()=>[u(h(e),{value:h(r).slack.allow_bots,loading:w(`slack`,`allow_bots`),"onUpdate:value":a[15]||=e=>F(`slack`,`allow_bots`,{allow_bots:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChannels`),hint:h(o)(`platform.freeResponseChannelsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).slack.free_response_channels||``,loading:w(`slack`,`free_response_channels`),size:`small`,placeholder:`channel_id1,channel_id2`,onChange:a[16]||=e=>F(`slack`,`free_response_channels`,{free_response_channels:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`whatsapp`?(i(),y(D,{key:3},[u(P,{label:h(o)(`platform.waEnabled`),hint:h(o)(`platform.waEnabledHint`)},{default:d(()=>[u(h(e),{value:L(`whatsapp`).enabled,loading:w(`whatsapp`,`enabled`),"onUpdate:value":a[17]||=e=>I(`whatsapp`,`enabled`,{enabled:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionGroup`)},{default:d(()=>[u(h(e),{value:h(r).whatsapp.require_mention,loading:w(`whatsapp`,`require_mention`),"onUpdate:value":a[18]||=e=>F(`whatsapp`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChats`),hint:h(o)(`platform.freeResponseChatsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).whatsapp.free_response_chats||``,loading:w(`whatsapp`,`free_response_chats`),size:`small`,placeholder:`chat_id1,chat_id2`,onChange:a[19]||=e=>F(`whatsapp`,`free_response_chats`,{free_response_chats:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.mentionPatterns`),hint:h(o)(`platform.mentionPatternsHint`)},{default:d(()=>[u(h(s),{"default-value":(h(r).whatsapp.mention_patterns||[]).join(`, `),loading:w(`whatsapp`,`mention_patterns`),size:`small`,placeholder:`pattern1, pattern2`,onChange:a[20]||=e=>F(`whatsapp`,`mention_patterns`,{mention_patterns:e?e.split(`,`).map(e=>e.trim()):[]})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`matrix`?(i(),y(D,{key:4},[u(P,{label:h(o)(`platform.accessToken`),hint:h(o)(`platform.accessTokenHint`)},{default:d(()=>[u(h(s),{"default-value":L(`matrix`).token||``,loading:w(`matrix`,`token`),clearable:``,size:`small`,class:`input-lg`,placeholder:`syt_...`,onChange:a[21]||=e=>I(`matrix`,`token`,{token:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.homeserver`),hint:h(o)(`platform.homeserverHint`)},{default:d(()=>[u(h(s),{"default-value":L(`matrix`).extra?.homeserver||``,loading:w(`matrix`,`homeserver`),clearable:``,size:`small`,class:`input-lg`,placeholder:`https://matrix.org`,onChange:a[22]||=e=>I(`matrix`,`homeserver`,{extra:{...L(`matrix`).extra,homeserver:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionRoom`)},{default:d(()=>[u(h(e),{value:h(r).matrix.require_mention,loading:w(`matrix`,`require_mention`),"onUpdate:value":a[23]||=e=>F(`matrix`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.autoThread`),hint:h(o)(`platform.autoThreadHintRoom`)},{default:d(()=>[u(h(e),{value:h(r).matrix.auto_thread,loading:w(`matrix`,`auto_thread`),"onUpdate:value":a[24]||=e=>F(`matrix`,`auto_thread`,{auto_thread:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.dmMentionThreads`),hint:h(o)(`platform.dmMentionThreadsHint`)},{default:d(()=>[u(h(e),{value:h(r).matrix.dm_mention_threads,loading:w(`matrix`,`dm_mention_threads`),"onUpdate:value":a[25]||=e=>F(`matrix`,`dm_mention_threads`,{dm_mention_threads:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseRooms`),hint:h(o)(`platform.freeResponseRoomsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).matrix.free_response_rooms||``,loading:w(`matrix`,`free_response_rooms`),size:`small`,placeholder:`room_id1,room_id2`,onChange:a[26]||=e=>F(`matrix`,`free_response_rooms`,{free_response_rooms:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`feishu`?(i(),y(D,{key:5},[u(P,{label:h(o)(`platform.appId`),hint:h(o)(`platform.appIdHint`)},{default:d(()=>[u(h(s),{"default-value":L(`feishu`).extra?.app_id||``,loading:w(`feishu`,`app_id`),clearable:``,size:`small`,class:`input-lg`,placeholder:`cli_...`,onChange:a[27]||=e=>I(`feishu`,`app_id`,{extra:{...L(`feishu`).extra,app_id:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.appSecret`),hint:h(o)(`platform.appSecretHint`)},{default:d(()=>[u(h(s),{"default-value":L(`feishu`).extra?.app_secret||``,loading:w(`feishu`,`app_secret`),clearable:``,size:`small`,class:`input-lg`,placeholder:`App Secret`,onChange:a[28]||=e=>I(`feishu`,`app_secret`,{extra:{...L(`feishu`).extra,app_secret:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionGroup`)},{default:d(()=>[u(h(e),{value:h(r).feishu.require_mention,loading:w(`feishu`,`require_mention`),"onUpdate:value":a[29]||=e=>F(`feishu`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChats`),hint:h(o)(`platform.freeResponseChatsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).feishu.free_response_chats||``,loading:w(`feishu`,`free_response_chats`),size:`small`,placeholder:`chat_id1,chat_id2`,onChange:a[30]||=e=>F(`feishu`,`free_response_chats`,{free_response_chats:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`dingtalk`?(i(),y(D,{key:6},[u(P,{label:h(o)(`platform.clientId`),hint:h(o)(`platform.clientIdHint`)},{default:d(()=>[u(h(s),{"default-value":L(`dingtalk`).extra?.client_id||``,loading:w(`dingtalk`,`client_id`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Client ID`,onChange:a[31]||=e=>I(`dingtalk`,`client_id`,{extra:{...L(`dingtalk`).extra,client_id:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.clientSecret`),hint:h(o)(`platform.clientSecretHint`)},{default:d(()=>[u(h(s),{"default-value":L(`dingtalk`).extra?.client_secret||``,loading:w(`dingtalk`,`client_secret`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Client Secret`,onChange:a[32]||=e=>I(`dingtalk`,`client_secret`,{extra:{...L(`dingtalk`).extra,client_secret:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.requireMention`),hint:h(o)(`platform.requireMentionGroup`)},{default:d(()=>[u(h(e),{value:h(r).dingtalk.require_mention,loading:w(`dingtalk`,`require_mention`),"onUpdate:value":a[33]||=e=>F(`dingtalk`,`require_mention`,{require_mention:e})},null,8,[`value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.freeResponseChats`),hint:h(o)(`platform.freeResponseChatsHint`)},{default:d(()=>[u(h(s),{"default-value":h(r).dingtalk.free_response_chats||``,loading:w(`dingtalk`,`free_response_chats`),size:`small`,placeholder:`chat_id1,chat_id2`,onChange:a[34]||=e=>F(`dingtalk`,`free_response_chats`,{free_response_chats:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`weixin`?(i(),y(D,{key:7},[l(`div`,V,[G.value===`idle`||G.value===`error`||G.value===`expired`||G.value===`confirmed`?(i(),x(h(b),{key:0,type:`primary`,size:`small`,onClick:q},{default:d(()=>[c(_(G.value===`confirmed`?h(o)(`platform.qrRelogin`):h(o)(`platform.qrLogin`)),1)]),_:1})):t(``,!0),G.value===`loading`?(i(),y(`div`,H,[u(f,{size:`small`}),l(`span`,null,_(h(o)(`platform.qrFetching`)),1)])):t(``,!0),G.value===`waiting`||G.value===`scaned`?(i(),y(`div`,U,_(G.value===`scaned`?h(o)(`platform.qrScanedHint`):h(o)(`platform.qrScanHint`)),1)):t(``,!0)]),u(P,{label:h(o)(`platform.weixinToken`),hint:h(o)(`platform.weixinTokenHint`)},{default:d(()=>[u(h(s),{"default-value":L(`weixin`).token||``,loading:w(`weixin`,`token`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Token`,onChange:a[35]||=e=>I(`weixin`,`token`,{token:e})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.accountId`),hint:h(o)(`platform.accountIdHint`)},{default:d(()=>[u(h(s),{"default-value":L(`weixin`).extra?.account_id||``,loading:w(`weixin`,`account_id`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Account ID`,onChange:a[36]||=e=>I(`weixin`,`account_id`,{extra:{...L(`weixin`).extra,account_id:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0),n.key===`wecom`?(i(),y(D,{key:8},[u(P,{label:h(o)(`platform.botId`),hint:h(o)(`platform.botIdHint`)},{default:d(()=>[u(h(s),{"default-value":L(`wecom`).extra?.bot_id||``,loading:w(`wecom`,`bot_id`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Bot ID`,onChange:a[37]||=e=>I(`wecom`,`bot_id`,{extra:{...L(`wecom`).extra,bot_id:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`]),u(P,{label:h(o)(`platform.appSecret`),hint:h(o)(`platform.wecomSecretHint`)},{default:d(()=>[u(h(s),{"default-value":L(`wecom`).extra?.secret||``,loading:w(`wecom`,`secret`),clearable:``,size:`small`,class:`input-lg`,placeholder:`Secret`,onChange:a[38]||=e=>I(`wecom`,`secret`,{extra:{...L(`wecom`).extra,secret:e}})},null,8,[`default-value`,`loading`])]),_:1},8,[`label`,`hint`])],64)):t(``,!0)]),_:2},1032,[`name`,`icon`,`config`,`credentials`])),64))])}}}),[[`__scopeId`,`data-v-c7999829`]]),G={class:`channels-view`},K={class:`page-header`},q={class:`header-title`},J={class:`channels-content`},Y=g(r({__name:`ChannelsView`,setup(e){let n=N(),{t:r}=S();return f(()=>{n.fetchSettings()}),(e,a)=>(i(),y(`div`,G,[l(`header`,K,[l(`h2`,q,_(h(r)(`sidebar.channels`)),1)]),l(`div`,J,[u(h(E),{show:h(n).loading||h(n).saving,size:`large`,description:h(r)(`common.loading`)},{default:d(()=>[h(n).loading?t(``,!0):(i(),x(W,{key:0}))]),_:1},8,[`show`,`description`])])]))}}),[[`__scopeId`,`data-v-e25dbf6c`]]);export{Y as default};
|
webui/assets/ChannelsView-DIBfwpcR.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-cee18614]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-cee18614]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.platform-card[data-v-cee18614]{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;margin-bottom:12px;overflow:hidden}.platform-card.configured[data-v-cee18614]{border-color:rgba(var(--success-rgb), .2)}.platform-card-header[data-v-cee18614]{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.platform-card-header[data-v-cee18614]:hover{background-color:rgba(var(--text-primary-rgb), .03)}.platform-info[data-v-cee18614]{align-items:center;gap:10px;display:flex}.platform-icon[data-v-cee18614]{width:18px;height:18px;color:var(--text-secondary);flex-shrink:0}.platform-name[data-v-cee18614]{color:var(--text-primary);font-size:14px;font-weight:500}.expand-icon[data-v-cee18614]{color:var(--text-muted);font-size:12px;transition:transform .2s}.expand-icon.expanded[data-v-cee18614]{transform:rotate(0)}.expand-icon[data-v-cee18614]:not(.expanded){transform:rotate(-90deg)}.platform-card-body[data-v-cee18614]{border-top:1px solid var(--border-light);padding:0 16px 12px}[data-v-c7999829]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c7999829]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-c7999829]{margin-top:16px}.weixin-qr-section[data-v-c7999829]{margin-top:12px;margin-bottom:12px}.weixin-qr-loading[data-v-c7999829]{color:var(--text-muted);align-items:center;gap:8px;font-size:13px;display:flex}.weixin-qr-hint[data-v-c7999829]{color:var(--text-secondary);font-size:13px}[data-v-e25dbf6c]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-e25dbf6c]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.channels-view[data-v-e25dbf6c]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.channels-content[data-v-e25dbf6c]{flex:1;padding:20px;position:relative;overflow-y:auto}
|
webui/assets/ChatView-BYd7bMKt.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./Dropdown-ReirMLrI.js";import{t}from"./Tooltip-DQzh27d-.js";import{t as n}from"./Popconfirm-ClpYjEYd.js";import{n as r}from"./app-IytcAxLh.js";import{$r as i,Ar as a,Br as o,Dr as s,Fr as c,Gr as l,Hr as u,N as d,Nr as f,Or as p,Pr as m,Qr as h,Sr as g,Tr as _,Ur as ee,Wr as v,Xr as y,Zr as b,_r as x,ai as S,b as C,c as w,ci as T,cr as E,i as D,jr as O,k,kr as A,l as j,lr as M,n as N,ni as P,o as F,oi as I,pr as L,qr as R,r as z,s as B,si as V,t as te,wr as H,xr as ne,y as re,yr as ie}from"./index-Cl8-DFW_.js";import{t as ae}from"./settings-Cxn8gJl1.js";import{t as oe}from"./session-browser-prefs-D7bVorU0.js";import{t as se}from"./clipboard-BulqpJ4r.js";import{a as ce,i as U,n as le,r as ue,t as de}from"./MarkdownRenderer-P3bVUblX.js";var W={telegram:`Telegram`,api_server:`API Server`,cli:`CLI`,discord:`Discord`,slack:`Slack`,matrix:`Matrix`,whatsapp:`WhatsApp`,signal:`Signal`,email:`Email`,sms:`SMS`,dingtalk:`DingTalk`,feishu:`Feishu`,wecom:`WeCom`,weixin:`WeChat`,bluebubbles:`iMessage`,mattermost:`Mattermost`,cron:`Cron`};function G(e){return e?W[e]||e:``}function K(e){if(!e)return``;let t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString([],{month:`short`,day:`numeric`})}function q(e){return K(e*1e3)}var fe={class:`chat-input-area`},J={class:`input-top-bar`},Y={key:1,class:`context-bar`},pe={key:0,class:`attachment-previews`},X=[`src`,`alt`],Z={key:1,class:`attachment-file`},Q={class:`file-name`},$={class:`file-size`},me=[`onClick`],he=[`placeholder`],ge={class:`input-actions`},_e=2e5,ve=w(c({__name:`ChatInput`,setup(e){let n=te(),{t:o}=M(),c=P(``),u=P(),d=P(),g=P([]),_=P(!1),v=P(0),b=P(!1),x=s(()=>c.value.trim()||g.value.length>0),C=P(2e5);async function w(){try{C.value=await D(B().activeProfileName||void 0)}catch{C.value=_e}}ee(w),y(()=>B().activeProfileName,w),y(()=>r().selectedModel,w);let E=s(()=>(n.activeSession?.inputTokens??0)+(n.activeSession?.outputTokens??0)),j=s(()=>Math.max(0,C.value-E.value)),N=s(()=>Math.min(E.value/C.value*100,100));function F(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`k`:String(e)}function L(e){if(g.value.find(t=>t.name===e.name))return;let t=Date.now().toString(36)+Math.random().toString(36).slice(2,8),n=URL.createObjectURL(e);g.value.push({id:t,name:e.name,type:e.type,size:e.size,url:n,file:e})}function z(){d.value?.click()}function ne(e){let t=e.target;if(t.files){for(let e of t.files)L(e);t.value=``}}function re(e){let t=Array.from(e.clipboardData?.items||[]).filter(e=>e.type.startsWith(`image/`));if(t.length){e.preventDefault();for(let e of t){let t=e.getAsFile();if(!t)continue;let n=e.type.split(`/`)[1]||`png`;L(new File([t],`pasted-${Date.now()}.${n}`,{type:e.type}))}}}function ae(e){e.preventDefault()}function oe(e){e.preventDefault(),e.dataTransfer?.types.includes(`Files`)&&(v.value++,_.value=!0)}function se(){v.value--,v.value<=0&&(v.value=0,_.value=!1)}function ce(e){e.preventDefault(),v.value=0,_.value=!1;let t=Array.from(e.dataTransfer?.files||[]);if(t.length){for(let e of t)L(e);u.value?.focus()}}function U(){let e=c.value.trim();!e&&g.value.length===0||(n.sendMessage(e,g.value.length>0?g.value:void 0),c.value=``,g.value=[],u.value&&(u.value.style.height=`auto`))}function le(){b.value=!0}function ue(){requestAnimationFrame(()=>{b.value=!1})}function de(e){return b.value||e.isComposing||e.keyCode===229}function W(e){e.key!==`Enter`||e.shiftKey||de(e)||(e.preventDefault(),U())}function G(e){let t=e.target;t.style.height=`auto`,t.style.height=Math.min(t.scrollHeight,100)+`px`}function K(e){let t=g.value.findIndex(t=>t.id===e);t!==-1&&(URL.revokeObjectURL(g.value[t].url),g.value.splice(t,1))}function q(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+` KB`:(e/(1024*1024)).toFixed(1)+` MB`}function ve(e){return e.startsWith(`image/`)}return(e,r)=>(l(),O(`div`,fe,[p(`div`,J,[m(S(t),{trigger:`hover`},{trigger:h(()=>[m(S(k),{quaternary:``,size:`tiny`,onClick:z,circle:``},{icon:h(()=>[...r[2]||=[p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[p(`path`,{d:`M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48`})],-1)]]),_:1})]),default:h(()=>[f(` `+T(S(o)(`chat.attachFiles`)),1)]),_:1}),E.value>0?(l(),O(`span`,{key:0,class:I([`context-info`,{"context-warning":N.value>80}])},T(F(E.value))+` / `+T(F(C.value))+` · `+T(S(o)(`chat.contextRemaining`))+` `+T(F(j.value)),3)):a(``,!0),E.value>0?(l(),O(`div`,Y,[p(`div`,{class:I([`context-bar-fill`,{"context-bar-warn":N.value>60&&N.value<=80,"context-bar-danger":N.value>80}]),style:V({width:`${N.value}%`})},null,6)])):a(``,!0)]),g.value.length>0?(l(),O(`div`,pe,[(l(!0),O(H,null,R(g.value,e=>(l(),O(`div`,{key:e.id,class:I([`attachment-preview`,{image:ve(e.type)}])},[ve(e.type)?(l(),O(`img`,{key:0,src:e.url,alt:e.name,class:`attachment-thumb`},null,8,X)):(l(),O(`div`,Z,[r[3]||=p(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[p(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),p(`polyline`,{points:`14 2 14 8 20 8`})],-1),p(`span`,Q,T(e.name),1),p(`span`,$,T(q(e.size)),1)])),p(`button`,{class:`attachment-remove`,onClick:t=>K(e.id)},[...r[4]||=[p(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]],8,me)],2))),128))])):a(``,!0),p(`div`,{class:I([`input-wrapper`,{"drag-over":_.value}]),onDragover:ae,onDragenter:oe,onDragleave:se,onDrop:ce},[p(`input`,{ref_key:`fileInputRef`,ref:d,type:`file`,multiple:``,class:`file-input-hidden`,onChange:ne},null,544),i(p(`textarea`,{ref_key:`textareaRef`,ref:u,"onUpdate:modelValue":r[0]||=e=>c.value=e,class:`input-textarea`,placeholder:S(o)(`chat.inputPlaceholder`),rows:`1`,onKeydown:W,onCompositionstart:le,onCompositionend:ue,onInput:G,onPaste:re},null,40,he),[[ie,c.value]]),p(`div`,ge,[S(n).isStreaming?(l(),A(S(k),{key:0,size:`small`,type:`error`,onClick:r[1]||=e=>S(n).stopStreaming()},{default:h(()=>[f(T(S(o)(`chat.stop`)),1)]),_:1})):a(``,!0),m(S(k),{size:`small`,type:`primary`,disabled:!x.value||S(n).isStreaming,onClick:U},{icon:h(()=>[...r[5]||=[p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),p(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})],-1)]]),default:h(()=>[f(` `+T(S(o)(`chat.send`)),1)]),_:1},8,[`disabled`])])],34)]))}}),[[`__scopeId`,`data-v-e8019954`]]);async function ye(e={}){let t=new URLSearchParams;return e.humanOnly===!1&&t.set(`humanOnly`,`false`),e.source&&t.set(`source`,e.source),e.limit!=null&&t.set(`limit`,String(e.limit)),(await L(`/api/hermes/sessions/conversations${t.toString()?`?${t.toString()}`:``}`)).sessions}async function be(e,t={}){let n=new URLSearchParams;t.humanOnly===!1&&n.set(`humanOnly`,`false`),t.source&&n.set(`source`,t.source);let r=n.toString()?`?${n.toString()}`:``;return L(`/api/hermes/sessions/conversations/${encodeURIComponent(e)}/messages${r}`)}var xe={class:`conversation-monitor`},Se={class:`conversation-monitor__sidebar`},Ce={key:0,class:`conversation-monitor__empty`},we={key:1,class:`conversation-monitor__empty`},Te=[`aria-pressed`,`onClick`],Ee={class:`conversation-monitor__session-title-row`},De={class:`conversation-monitor__session-title`},Oe={key:0,class:`conversation-monitor__session-live`},ke={class:`conversation-monitor__session-meta`},Ae={key:0,class:`conversation-monitor__session-preview`},je={class:`conversation-monitor__detail`},Me={key:0,class:`conversation-monitor__detail-header`},Ne={class:`conversation-monitor__detail-title`},Pe={class:`conversation-monitor__detail-meta`},Fe={key:1,class:`conversation-monitor__empty conversation-monitor__empty--error`},Ie={key:2,class:`conversation-monitor__empty`},Le={key:3,class:`conversation-monitor__empty`},Re={key:4,class:`conversation-monitor__messages`},ze={class:`conversation-monitor__message-meta`},Be={class:`conversation-monitor__message-content`},Ve=15e3,He=w(c({__name:`ConversationMonitorPane`,props:{humanOnly:{type:Boolean}},setup(e){let t=e,{t:n}=M(),r=P([]),i=P(null),o=P(null),c=P(!1),u=P(!1),d=P(``),f=null,m=0,h=0,g=s(()=>r.value.find(e=>e.id===i.value)||null);function _(e){return n(e===`user`?`chat.monitorRoleUser`:`chat.monitorRoleAssistant`)}function b(e){return n(`chat.linkedSessions`,{count:e})}function x(){m+=1,h+=1}async function C(e=!1){let n=++m;e||(c.value=!0,d.value=``);try{let e=await ye({humanOnly:t.humanOnly});if(n!==m)return;if(r.value=e,!e.length){i.value=null,o.value=null;return}(!i.value||!e.some(e=>e.id===i.value))&&(i.value=e[0].id)}catch(t){if(n!==m||e)return;d.value=t?.message||String(t),r.value=[],i.value=null,o.value=null}finally{!e&&n===m&&(c.value=!1)}}async function w(e,n=!1){let r=++h;if(!e){o.value=null;return}let a=t.humanOnly;n||(u.value=!0,d.value=``);try{let n=await be(e,{humanOnly:a});if(r!==h||e!==i.value||a!==t.humanOnly)return;o.value=n}catch(e){if(r!==h||n)return;d.value=e?.message||String(e),o.value=null}finally{!n&&r===h&&(u.value=!1)}}return y(i,async e=>{await w(e,!1)}),y(()=>t.humanOnly,async()=>{x(),i.value=null,o.value=null,await C(!1)}),ee(async()=>{await C(!1),f=setInterval(async()=>{await C(!0),i.value&&await w(i.value,!0)},Ve)}),v(()=>{x(),f&&clearInterval(f)}),(e,t)=>(l(),O(`div`,xe,[p(`aside`,Se,[c.value&&r.value.length===0?(l(),O(`div`,Ce,T(S(n)(`common.loading`)),1)):r.value.length===0?(l(),O(`div`,we,T(S(n)(`chat.noSessions`)),1)):a(``,!0),(l(!0),O(H,null,R(r.value,e=>(l(),O(`button`,{key:e.id,class:I([`conversation-monitor__session`,{active:e.id===i.value}]),"aria-pressed":e.id===i.value,onClick:t=>i.value=e.id},[p(`div`,Ee,[p(`span`,De,T(e.title||e.preview||e.id),1),e.is_active?(l(),O(`span`,Oe,T(S(n)(`chat.recentBadge`)),1)):a(``,!0)]),p(`div`,ke,T(S(G)(e.source))+` · `+T(S(q)(e.last_active)),1),e.preview?(l(),O(`div`,Ae,T(e.preview),1)):a(``,!0)],10,Te))),128))]),p(`section`,je,[g.value?(l(),O(`header`,Me,[p(`div`,Ne,T(g.value.title||g.value.preview||g.value.id),1),p(`div`,Pe,[p(`span`,null,T(S(G)(g.value.source)),1),t[0]||=p(`span`,null,`·`,-1),p(`span`,null,T(g.value.model),1),t[1]||=p(`span`,null,`·`,-1),p(`span`,null,T(b(g.value.thread_session_count)),1)])])):a(``,!0),d.value?(l(),O(`div`,Fe,T(d.value),1)):u.value&&!o.value?(l(),O(`div`,Ie,T(S(n)(`common.loading`)),1)):!o.value||o.value.messages.length===0?(l(),O(`div`,Le,T(S(n)(`chat.noVisibleMessages`)),1)):(l(),O(`div`,Re,[(l(!0),O(H,null,R(o.value.messages,e=>(l(),O(`article`,{key:`${e.session_id}-${e.id}`,class:I([`conversation-monitor__message`,`role-${e.role}`])},[p(`div`,ze,T(_(e.role))+` · `+T(S(q)(e.timestamp)),1),p(`div`,Be,T(e.content),1)],2))),128))]))])]))}}),[[`__scopeId`,`data-v-be298d0d`]]),Ue=[`id`],We={key:1,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,class:`tool-icon`},Ge={class:`tool-name`},Ke={key:2,class:`tool-preview`},qe={key:3,class:`tool-spinner`},Je={key:4,class:`tool-error-badge`},Ye={key:0,class:`tool-detail-section`,"data-copy-source":`tool-args`},Xe={class:`tool-detail-label`},Ze=[`innerHTML`],Qe={key:1,class:`tool-detail-section`,"data-copy-source":`tool-result`},$e={class:`tool-detail-label`},et=[`innerHTML`],tt={key:1,class:`msg-body`},nt={key:0,src:E,alt:`Hermes`,class:`msg-avatar`},rt={key:0,class:`msg-attachments`},it=[`src`,`alt`,`onClick`],at=[`onClick`,`title`],ot={class:`att-name`},st={class:`att-size`},ct={class:`thinking-label`},lt={key:0,class:`thinking-meta`},ut={class:`thinking-meta`},dt={key:0,class:`thinking-body`},ft={key:3,class:`streaming-dots`},pt={class:`message-meta`},mt=[`title`],ht={class:`message-time`},gt=[`src`],_t=2e3,vt=w(c({__name:`MessageItem`,props:{message:{},highlight:{type:Boolean}},setup(e){let t=e,{t:n}=M(),r=re(),i=s(()=>t.message.role===`system`),o=P(!1),c=P(null),d=te(),f=ae(),h=s(()=>{if(t.message.role===`tool`)return null;let e=t.message.content||``;return e.trim()?e:null});async function ee(){let e=h.value;if(e)try{await navigator.clipboard.writeText(e),r.success(n(`chat.copiedBubble`))}catch{r.error(n(`chat.copyFailed`))}}let v=s(()=>z(t.message.content||``,{streaming:!!t.message.isStreaming})),y=s(()=>!!(t.message.reasoning&&t.message.reasoning.length>0)),x=s(()=>y.value||v.value.hasThinking),C=s(()=>{let e=[];return t.message.reasoning&&e.push(t.message.reasoning),e.push(...v.value.segments),v.value.pending&&e.push(v.value.pending),e.join(`
|
| 2 |
+
|
| 3 |
+
`)}),w=s(()=>{let e=N(v.value);return t.message.reasoning&&(e+=t.message.reasoning.length),e}),E=s(()=>t.message.isStreaming?!!(v.value.pending!==null||y.value&&!t.message.content):!1),D=P(null),k=s(()=>E.value?!0:D.value===null?!!f.display.show_reasoning:D.value);function j(){D.value=!k.value}let F=P(Date.now()),L=null;function B(){let e=d.getThinkingObservation(t.message.id),n=!!(t.message.isStreaming&&e?.startedAt!==void 0&&e.endedAt===void 0);n&&L===null?L=window.setInterval(()=>{F.value=Date.now()},1e3):!n&&L!==null&&(window.clearInterval(L),L=null)}b(B),u(()=>{L!==null&&window.clearInterval(L)});let V=s(()=>{let e=d.getThinkingObservation(t.message.id);if(!e?.startedAt)return null;let n=e.endedAt??(t.message.isStreaming?F.value:e.startedAt);return Math.max(0,n-e.startedAt)});function ne(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return r===0?`${n}m`:`${n}m ${r}s`}let ie=s(()=>new Date(t.message.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}));function oe(e){return e.startsWith(`image/`)}function se(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+` KB`:(e/(1024*1024)).toFixed(1)+` MB`}function W(e){let n=t.message.content||``,r=/\[File:\s*([^\]]+)\]\(([^)]+)\)/g,i;for(;(i=r.exec(n))!==null;)if(i[1].trim()===e.trim())return i[2];return null}function G(e){let t=W(e.name);if(t){r.info(n(`download.downloading`)),ce(t,e.name).catch(e=>{r.error(e.message||n(`download.downloadFailed`))});return}if(e.url&&e.url.startsWith(`blob:`)){let t=document.createElement(`a`);t.href=e.url,t.download=e.name,document.body.appendChild(t),t.click(),document.body.removeChild(t)}}function K(e){if(!e)return{full:``,display:``};try{let t=JSON.stringify(JSON.parse(e),null,2);return{full:t,display:t.length>_t?t.slice(0,_t)+`
|
| 4 |
+
`+n(`chat.truncated`):t,language:`json`}}catch{return{full:e,display:e.length>_t?e.slice(0,_t)+`
|
| 5 |
+
`+n(`chat.truncated`):e}}}function q(e,t){return U(e,t,n(`common.copy`),{maxHighlightLength:_t})}async function fe(e){let t=e.target;if(!(t instanceof HTMLElement))return;let n=t.closest(`[data-copy-code="true"]`);if(!n)return;e.preventDefault();let r=n.closest(`[data-copy-source]`)?.dataset.copySource;if(r===`tool-args`&&Z.value){await le(Z.value);return}if(r===`tool-result`&&$.value){await le($.value);return}await ue(e)}let J=s(()=>(t.message.attachments?.length??0)>0),Y=s(()=>!!(t.message.toolArgs||t.message.toolResult)),pe=s(()=>K(t.message.toolArgs)),X=s(()=>K(t.message.toolResult)),Z=s(()=>pe.value.full),Q=s(()=>pe.value.display),$=s(()=>X.value.full),me=s(()=>X.value.display),he=s(()=>Q.value?q(Q.value,pe.value.language):``),ge=s(()=>me.value?q(me.value,X.value.language):``);return(t,r)=>(l(),O(H,null,[p(`div`,{class:I([`message`,[e.message.role,{highlight:e.highlight}]]),id:`message-${e.message.id}`},[e.message.role===`tool`?(l(),O(H,{key:0},[p(`div`,{class:I([`tool-line`,{expandable:Y.value}]),onClick:r[0]||=e=>Y.value&&(o.value=!o.value)},[Y.value?(l(),O(`svg`,{key:0,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:I([`tool-chevron`,{rotated:o.value}])},[...r[3]||=[p(`polyline`,{points:`9 18 15 12 9 6`},null,-1)]],2)):(l(),O(`svg`,We,[...r[4]||=[p(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`},null,-1)]])),p(`span`,Ge,T(e.message.toolName),1),e.message.toolPreview&&!o.value?(l(),O(`span`,Ke,T(e.message.toolPreview),1)):a(``,!0),e.message.toolStatus===`running`?(l(),O(`span`,qe)):a(``,!0),e.message.toolStatus===`error`?(l(),O(`span`,Je,T(S(n)(`chat.error`)),1)):a(``,!0)],2),o.value&&Y.value?(l(),O(`div`,{key:0,class:`tool-details`,onClick:fe},[Q.value?(l(),O(`div`,Ye,[p(`div`,Xe,T(S(n)(`chat.arguments`)),1),p(`div`,{class:`tool-detail-code-block`,innerHTML:he.value},null,8,Ze)])):a(``,!0),me.value?(l(),O(`div`,Qe,[p(`div`,$e,T(S(n)(`chat.result`)),1),p(`div`,{class:`tool-detail-code-block`,innerHTML:ge.value},null,8,et)])):a(``,!0)])):a(``,!0)],64)):(l(),O(`div`,tt,[e.message.role===`assistant`?(l(),O(`img`,nt)):a(``,!0),p(`div`,{class:I([`msg-content`,e.message.role])},[p(`div`,{class:I([`message-bubble`,{system:i.value}])},[J.value?(l(),O(`div`,rt,[(l(!0),O(H,null,R(e.message.attachments,e=>(l(),O(`div`,{key:e.id,class:I([`msg-attachment`,{image:oe(e.type)}])},[oe(e.type)&&e.url?(l(),O(`img`,{key:0,src:e.url,alt:e.name,class:`msg-attachment-thumb`,onClick:t=>c.value=e.url},null,8,it)):(l(),O(`div`,{key:1,class:`msg-attachment-file`,onClick:t=>G(e),style:{cursor:`pointer`},title:S(n)(`download.downloadFile`)},[r[5]||=p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[p(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),p(`polyline`,{points:`14 2 14 8 20 8`})],-1),p(`span`,ot,T(e.name),1),p(`span`,st,T(se(e.size)),1),r[6]||=p(`svg`,{class:`att-download-icon`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),p(`polyline`,{points:`7 10 12 15 17 10`}),p(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})],-1)],8,at))],2))),128))])):a(``,!0),x.value?(l(),O(`div`,{key:1,class:I([`thinking-block`,{expanded:k.value}])},[p(`div`,{class:`thinking-header`,onClick:j},[(l(),O(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:I([`thinking-chevron`,{rotated:k.value}])},[...r[7]||=[p(`polyline`,{points:`9 18 15 12 9 6`},null,-1)]],2)),r[8]||=p(`span`,{class:`thinking-icon`},`💭`,-1),p(`span`,ct,T(E.value?S(n)(`chat.thinkingInProgress`):S(n)(`chat.thinkingLabel`)),1),V.value!==null&&V.value>0?(l(),O(`span`,lt,` · `+T(S(n)(`chat.thinkingDuration`,{duration:ne(V.value)})),1)):a(``,!0),p(`span`,ut,` · `+T(S(n)(`chat.thinkingChars`,{count:w.value})),1)]),k.value?(l(),O(`div`,dt,[m(de,{content:C.value},null,8,[`content`])])):a(``,!0)],2)):a(``,!0),v.value.body?(l(),A(de,{key:2,content:v.value.body},null,8,[`content`])):a(``,!0),e.message.isStreaming&&!e.message.content?(l(),O(`span`,ft,[...r[9]||=[p(`span`,null,null,-1),p(`span`,null,null,-1),p(`span`,null,null,-1)]])):a(``,!0)],2),p(`div`,pt,[h.value?(l(),O(`button`,{key:0,class:`copy-bubble-btn`,onClick:ee,title:S(n)(`chat.copyBubble`)},[...r[10]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),p(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})],-1)]],8,mt)):a(``,!0),p(`span`,ht,T(ie.value),1)])],2)]))],10,Ue),(l(),A(_,{to:`body`},[c.value?(l(),O(`div`,{key:0,class:`image-preview-overlay`,onClick:r[2]||=g(e=>c.value=null,[`self`])},[p(`img`,{src:c.value,class:`image-preview-img`,onClick:r[1]||=e=>c.value=null},null,8,gt)])):a(``,!0)]))],64))}}),[[`__scopeId`,`data-v-c7d0f76f`]]),yt=`/webui/assets/thinking-light-BjeGd2gJ.mp4`,bt=`/webui/assets/thinking-dark-yYkYRZLs.mp4`,xt={key:0,class:`empty-state`},St={key:0,class:`streaming-indicator`},Ct=[`src`],wt={key:0,class:`tool-calls-panel`},Tt={class:`tool-call-name`},Et={key:0,class:`tool-call-preview`},Dt={key:1,class:`tool-call-spinner`},Ot={key:2,class:`tool-call-error`},kt=w(c({__name:`MessageList`,setup(e){let t=te(),{t:n}=M(),{isDark:r}=j(),i=P(),c=s(()=>t.messages.filter(e=>e.role!==`tool`)),u=s(()=>{let e=t.messages,n=-1;for(let t=e.length-1;t>=0;t--)if(e[t].role===`user`){n=t;break}return[...e.filter((e,t)=>e.role===`tool`&&t>n)].reverse()});function d(e=200){let t=i.value;return t?t.scrollHeight-t.scrollTop-t.clientHeight<e:!0}function f(){o(()=>{i.value&&(i.value.scrollTop=i.value.scrollHeight)})}function g(e){o(()=>{let t=document.getElementById(`message-${e}`);t&&t.scrollIntoView({block:`center`})})}return y(()=>t.activeSessionId,e=>{if(e){if(t.focusMessageId){o(()=>g(t.focusMessageId));return}o(()=>f())}},{immediate:!0}),y(()=>t.focusMessageId,e=>{e&&g(e)}),y(()=>t.isRunActive,e=>{e&&f()}),y(()=>t.messages[t.messages.length-1]?.content,()=>{if(t.focusMessageId){g(t.focusMessageId);return}d()&&f()}),y(u,()=>{if(t.focusMessageId){g(t.focusMessageId);return}d()&&f()}),(e,o)=>(l(),O(`div`,{ref_key:`listRef`,ref:i,class:`message-list`},[S(t).messages.length===0?(l(),O(`div`,xt,[o[0]||=p(`img`,{src:`/webui/logo.png`,alt:`Hermes`,class:`empty-logo`},null,-1),p(`p`,null,T(S(n)(`chat.emptyState`)),1)])):a(``,!0),(l(!0),O(H,null,R(c.value,e=>(l(),A(vt,{key:e.id,message:e,highlight:S(t).focusMessageId===e.id},null,8,[`message`,`highlight`]))),128)),m(x,{name:`fade`},{default:h(()=>[S(t).isRunActive?(l(),O(`div`,St,[p(`video`,{src:S(r)?S(bt):S(yt),autoplay:``,loop:``,muted:``,playsinline:``,class:`thinking-video`},null,8,Ct),u.value.length>0?(l(),O(`div`,wt,[(l(!0),O(H,null,R(u.value,e=>(l(),O(`div`,{key:e.id,class:`tool-call-item`},[o[1]||=p(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,class:`tool-call-icon`},[p(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`})],-1),p(`span`,Tt,T(e.toolName),1),e.toolPreview?(l(),O(`span`,Et,T(e.toolPreview),1)):a(``,!0),e.toolStatus===`running`?(l(),O(`span`,Dt)):a(``,!0),e.toolStatus===`error`?(l(),O(`span`,Ot,T(S(n)(`chat.error`)),1)):a(``,!0)]))),128))])):a(``,!0)])):a(``,!0)]),_:1})],512))}}),[[`__scopeId`,`data-v-1bc92f44`]]),At=[`aria-current`],jt={class:`session-item-content`},Mt={class:`session-item-title-row`},Nt={key:0,class:`session-item-active-indicator`,"aria-hidden":`true`},Pt={key:1,class:`session-item-pin`,"aria-hidden":`true`},Ft={class:`session-item-title`},It={key:2,class:`session-item-live-badge`},Lt={class:`session-item-meta`},Rt={key:0,class:`session-item-model`},zt={class:`session-item-time`},Bt=c({__name:`SessionListItem`,props:{session:{},active:{type:Boolean},live:{type:Boolean},pinned:{type:Boolean},canDelete:{type:Boolean}},emits:[`select`,`contextmenu`,`delete`],setup(e,{emit:t}){let r=t,{t:i}=M();return(t,o)=>(l(),O(`button`,{class:I([`session-item`,{active:e.active,live:e.live}]),"aria-current":e.active?`page`:void 0,onClick:o[2]||=e=>r(`select`),onContextmenu:o[3]||=e=>r(`contextmenu`,e)},[p(`div`,jt,[p(`span`,Mt,[e.live?(l(),O(`span`,Nt,[...o[4]||=[p(`svg`,{class:`session-item-active-spinner`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`},[p(`circle`,{cx:`12`,cy:`12`,r:`8`,opacity:`0.2`}),p(`path`,{d:`M20 12a8 8 0 0 0-8-8`})],-1)]])):a(``,!0),e.pinned?(l(),O(`span`,Pt,[...o[5]||=[p(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[p(`path`,{d:`M12 17v5`}),p(`path`,{d:`M5 8l14 0`}),p(`path`,{d:`M8 3l8 0 0 5 3 5-14 0 3-5z`})],-1)]])):a(``,!0),p(`span`,Ft,T(e.session.title),1),e.live?(l(),O(`span`,It,[o[6]||=p(`span`,{class:`live-dot`},null,-1),p(`span`,null,T(S(i)(`chat.liveMode`)),1)])):a(``,!0)]),p(`span`,Lt,[e.session.model?(l(),O(`span`,Rt,T(e.session.model),1)):a(``,!0),p(`span`,zt,T(S(K)(e.session.createdAt)),1)])]),e.canDelete?(l(),A(S(n),{key:0,onPositiveClick:o[1]||=e=>r(`delete`)},{trigger:h(()=>[p(`button`,{class:`session-item-delete`,onClick:o[0]||=g(()=>{},[`stop`])},[...o[7]||=[p(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]])]),default:h(()=>[f(` `+T(S(i)(`chat.deleteSession`)),1)]),_:1})):a(``,!0)],42,At))}}),Vt={class:`chat-panel`},Ht={class:`session-list-header`},Ut={key:0,class:`session-list-title`},Wt={class:`session-list-actions`},Gt={key:0,class:`session-items`},Kt={key:0,class:`session-loading`},qt={key:1,class:`session-empty`},Jt={class:`session-group-header session-group-header--static`},Yt={class:`session-group-label`},Xt={class:`session-group-count`},Zt=[`onClick`],Qt={class:`session-group-label`},$t={class:`session-group-count`},en={class:`chat-main`},tn={class:`chat-header`},nn={class:`header-left`},rn={class:`header-session-title`},an={key:1,class:`source-badge`},on={class:`header-actions`},sn={class:`chat-mode-toggle`},cn=w(c({__name:`ChatPanel`,setup(n){let r=te(),i=oe(),c=re(),{t:u}=M(),g=P(`chat`),_=P(typeof window>`u`||!window.matchMedia(`(max-width: 768px)`).matches),b=P(_.value),x=null,w=P(!1);function E(e){r.switchSession(e),x?.matches&&(_.value=!1)}function D(e){e!==g.value&&(e===`live`?(b.value=_.value,_.value=!1):_.value=x?.matches?!1:b.value,g.value=e)}function j(e){w.value=e.matches,e.matches&&_.value&&(_.value=!1)}ee(()=>{x=window.matchMedia(`(max-width: 768px)`),j(x),x.addEventListener(`change`,j)}),v(()=>{x?.removeEventListener(`change`,j)});let N=P(!1),L=P(``),z=P(null),B=P(null),V=P(new Set(JSON.parse(localStorage.getItem(`hermes_collapsed_groups`)||`[]`)));function ie(e){return e===`api_server`?-1:e===`cron`?999:0}function ae(e){return[...e].sort((e,t)=>{let n=r.isSessionLive(e.id);return n===r.isSessionLive(t.id)?(t.updatedAt||0)-(e.updatedAt||0):n?-1:1})}let ce=s(()=>ae(r.sessions.filter(e=>i.isPinned(e.id)))),U=s(()=>{let e=new Map;for(let t of r.sessions){if(i.isPinned(t.id))continue;let n=t.source||``;e.has(n)||e.set(n,[]),e.get(n).push(t)}return[...e.keys()].sort((t,n)=>{let i=e.get(t)?.some(e=>r.isSessionLive(e.id))||!1;if(i!==(e.get(n)?.some(e=>r.isSessionLive(e.id))||!1))return i?-1:1;let a=ie(t),o=ie(n);return a===o?t.localeCompare(n):a-o}).map(t=>({source:t,label:t?G(t):u(`chat.other`),sessions:ae(e.get(t))}))});function le(e){if(!V.value.has(e))V.value=new Set([...V.value,e]);else{V.value=new Set(U.value.map(e=>e.source).filter(t=>t!==e));let t=U.value.find(t=>t.source===e);t?.sessions.length&&r.switchSession(t.sessions[0].id)}localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...V.value]))}y(U,e=>{if(localStorage.getItem(`hermes_collapsed_groups`)!==null){let e=r.activeSession?.source;e&&V.value.has(e)&&(V.value=new Set([...V.value].filter(t=>t!==e)),localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...V.value])));return}V.value=new Set(e.slice(1).map(e=>e.source)),localStorage.setItem(`hermes_collapsed_groups`,JSON.stringify([...V.value]))},{once:!0}),y(()=>[r.sessionsLoaded,...r.sessions.map(e=>e.id)],e=>{let t=e.slice(1);!e[0]||t.length===0||i.pruneMissingSessions(t)},{immediate:!0});let ue=s(()=>r.activeSession?.title||u(`chat.newChat`)),de=s(()=>g.value===`live`?u(`chat.liveSessions`):ue.value),W=s(()=>g.value===`chat`&&r.activeSession?.source||``);function K(){r.newChat()}async function q(e){let t=e||r.activeSessionId;t&&(await se(t)?c.success(u(`common.copied`)):c.error(u(`common.copied`)+` ✗`))}function fe(e){i.removePinned(e),r.deleteSession(e),c.success(u(`chat.sessionDeleted`))}let J=P(null),Y=s(()=>J.value?i.isPinned(J.value):!1),pe=s(()=>[{label:u(Y.value?`chat.unpin`:`chat.pin`),key:`pin`},{label:u(`chat.rename`),key:`rename`},{label:u(`chat.copySessionId`),key:`copy-id`}]);function X(e,t){e.preventDefault(),J.value=t,Z.value=!0,Q.value=e.clientX,$.value=e.clientY}let Z=P(!1),Q=P(0),$=P(0);function me(e){if(Z.value=!1,J.value){if(e===`pin`){i.togglePinned(J.value);return}if(e===`copy-id`)q(J.value);else if(e===`rename`){let e=r.sessions.find(e=>e.id===J.value);z.value=J.value,L.value=e?.title||``,N.value=!0,o(()=>{B.value?.focus()})}}}function he(){Z.value=!1}async function ge(){if(!(!z.value||!L.value.trim())){if(await F(z.value,L.value.trim())){let e=r.sessions.find(e=>e.id===z.value);e&&(e.title=L.value.trim()),r.activeSession?.id===z.value&&(r.activeSession.title=L.value.trim()),c.success(u(`chat.renamed`))}else c.error(u(`chat.renameFailed`));N.value=!1}}return(n,o)=>(l(),O(`div`,Vt,[g.value===`chat`?(l(),O(`div`,{key:0,class:I([`session-backdrop`,{active:_.value}]),onClick:o[0]||=e=>_.value=!1},null,2)):a(``,!0),g.value===`chat`?(l(),O(`aside`,{key:1,class:I([`session-list`,{collapsed:!_.value}])},[p(`div`,Ht,[_.value?(l(),O(`span`,Ut,T(S(u)(`chat.sessions`)),1)):a(``,!0),p(`div`,Wt,[p(`button`,{class:`session-close-btn`,onClick:o[1]||=e=>_.value=!1},[...o[8]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]]),m(S(k),{quaternary:``,size:`tiny`,onClick:K,circle:``},{icon:h(()=>[...o[9]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),p(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),_:1})])]),_.value?(l(),O(`div`,Gt,[S(r).isLoadingSessions&&S(r).sessions.length===0?(l(),O(`div`,Kt,T(S(u)(`common.loading`)),1)):S(r).sessions.length===0?(l(),O(`div`,qt,T(S(u)(`chat.noSessions`)),1)):a(``,!0),ce.value.length>0?(l(),O(H,{key:2},[p(`div`,Jt,[p(`span`,Yt,T(S(u)(`chat.pinned`)),1),p(`span`,Xt,T(ce.value.length),1)]),(l(!0),O(H,null,R(ce.value,e=>(l(),A(Bt,{key:`pinned-${e.id}`,session:e,active:e.id===S(r).activeSessionId,live:S(r).isSessionLive(e.id),pinned:!0,"can-delete":e.id!==S(r).activeSessionId||S(r).sessions.length>1,onSelect:t=>E(e.id),onContextmenu:t=>X(t,e.id),onDelete:t=>fe(e.id)},null,8,[`session`,`active`,`live`,`can-delete`,`onSelect`,`onContextmenu`,`onDelete`]))),128))],64)):a(``,!0),(l(!0),O(H,null,R(U.value,e=>(l(),O(H,{key:e.source},[p(`div`,{class:`session-group-header`,onClick:t=>le(e.source)},[(l(),O(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:I([`group-chevron`,{collapsed:V.value.has(e.source)}])},[...o[10]||=[p(`polyline`,{points:`9 18 15 12 9 6`},null,-1)]],2)),p(`span`,Qt,T(e.label),1),p(`span`,$t,T(e.sessions.length),1)],8,Zt),V.value.has(e.source)?a(``,!0):(l(!0),O(H,{key:0},R(e.sessions,e=>(l(),A(Bt,{key:e.id,session:e,active:e.id===S(r).activeSessionId,live:S(r).isSessionLive(e.id),pinned:!1,"can-delete":e.id!==S(r).activeSessionId||S(r).sessions.length>1,onSelect:t=>E(e.id),onContextmenu:t=>X(t,e.id),onDelete:t=>fe(e.id)},null,8,[`session`,`active`,`live`,`can-delete`,`onSelect`,`onContextmenu`,`onDelete`]))),128))],64))),128))])):a(``,!0)],2)):a(``,!0),m(S(e),{placement:`bottom-start`,trigger:`manual`,x:Q.value,y:$.value,options:pe.value,show:Z.value,onSelect:me,onClickoutside:he},null,8,[`x`,`y`,`options`,`show`]),m(S(C),{show:N.value,"onUpdate:show":o[3]||=e=>N.value=e,preset:`dialog`,title:S(u)(`chat.renameSession`),"positive-text":S(u)(`common.ok`),"negative-text":S(u)(`common.cancel`),onPositiveClick:ge},{default:h(()=>[m(S(d),{ref_key:`renameInputRef`,ref:B,value:L.value,"onUpdate:value":o[2]||=e=>L.value=e,placeholder:S(u)(`chat.enterNewTitle`),onKeydown:ne(ge,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`show`,`title`,`positive-text`,`negative-text`]),p(`div`,en,[p(`header`,tn,[p(`div`,nn,[g.value===`chat`?(l(),A(S(k),{key:0,quaternary:``,size:`small`,onClick:o[4]||=e=>_.value=!_.value,circle:``},{icon:h(()=>[...o[11]||=[p(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[p(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`}),p(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`}),p(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`}),p(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`})],-1)]]),_:1})):a(``,!0),p(`span`,rn,T(de.value),1),W.value?(l(),O(`span`,an,T(S(G)(W.value)),1)):a(``,!0)]),p(`div`,on,[p(`div`,sn,[m(S(k),{size:`small`,type:g.value===`chat`?`primary`:`default`,"aria-pressed":g.value===`chat`,onClick:o[5]||=e=>D(`chat`)},{default:h(()=>[f(T(S(u)(`chat.chatMode`)),1)]),_:1},8,[`type`,`aria-pressed`]),m(S(k),{size:`small`,type:g.value===`live`?`primary`:`default`,"aria-pressed":g.value===`live`,onClick:o[6]||=e=>D(`live`)},{default:h(()=>[f(T(S(u)(`chat.liveMode`)),1)]),_:1},8,[`type`,`aria-pressed`])]),g.value===`chat`?(l(),O(H,{key:0},[m(S(t),{trigger:`hover`},{trigger:h(()=>[m(S(k),{quaternary:``,size:`small`,onClick:o[7]||=e=>q(),circle:``},{icon:h(()=>[...o[12]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[p(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),p(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})],-1)]]),_:1})]),default:h(()=>[f(` `+T(S(u)(`chat.copySessionId`)),1)]),_:1}),m(S(k),{size:`small`,circle:w.value,onClick:K},{icon:h(()=>[...o[13]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),p(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:h(()=>[w.value?a(``,!0):(l(),O(H,{key:0},[f(T(S(u)(`chat.newChat`)),1)],64))]),_:1},8,[`circle`])],64)):a(``,!0)])]),g.value===`chat`?(l(),O(H,{key:0},[m(kt),m(ve)],64)):(l(),A(He,{key:1,"human-only":S(i).humanOnly},null,8,[`human-only`]))])]))}}),[[`__scopeId`,`data-v-ed01ae3e`]]),ln={class:`chat-view`},un=w(c({__name:`ChatView`,setup(e){let t=r(),n=te(),i=B();return ee(async()=>{t.loadModels(),await i.fetchProfiles(),n.loadSessions()}),(e,t)=>(l(),O(`div`,ln,[m(cn)]))}}),[[`__scopeId`,`data-v-6dae3628`]]);export{un as default};
|
webui/assets/ChatView-DG5WMkBg.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-e8019954]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-e8019954]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.chat-input-area[data-v-e8019954]{border-top:1px solid var(--border-color);flex-shrink:0;padding:12px 20px 16px}.input-top-bar[data-v-e8019954]{align-items:center;gap:8px;padding:0 0 6px;display:flex}.context-info[data-v-e8019954]{color:var(--text-muted);font-size:11px}.context-info.context-warning[data-v-e8019954]{color:#e8a735}.context-bar[data-v-e8019954]{background:#80808033;border-radius:2px;width:60px;height:4px;overflow:hidden}.context-bar-fill[data-v-e8019954]{background:linear-gradient(90deg,#8080804d,#80808099);border-radius:2px;height:100%;transition:width .3s}.context-bar-fill.context-bar-warn[data-v-e8019954]{background:linear-gradient(90deg,#c98a1a,#e8a735)}.context-bar-fill.context-bar-danger[data-v-e8019954]{background:linear-gradient(90deg,#c43a2a,#e85d4a)}.attachment-previews[data-v-e8019954]{flex-wrap:wrap;gap:8px;padding:0 0 10px;display:flex}.attachment-preview[data-v-e8019954]{background-color:var(--bg-secondary);border:1px solid var(--border-color);border-radius:6px;position:relative;overflow:hidden}.attachment-preview.image[data-v-e8019954]{width:64px;height:64px}.attachment-thumb[data-v-e8019954]{object-fit:cover;width:100%;height:100%}.attachment-file[data-v-e8019954]{min-width:80px;max-width:140px;color:var(--text-secondary);flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:8px 12px;display:flex}.attachment-file .file-name[data-v-e8019954]{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:11px;overflow:hidden}.attachment-file .file-size[data-v-e8019954]{color:var(--text-muted);font-size:10px}.attachment-remove[data-v-e8019954]{width:18px;height:18px;color:var(--text-on-overlay);cursor:pointer;opacity:0;background:#00000080;border:none;border-radius:50%;justify-content:center;align-items:center;transition:opacity .15s;display:flex;position:absolute;top:2px;right:2px}.attachment-preview:hover .attachment-remove[data-v-e8019954]{opacity:1}.file-input-hidden[data-v-e8019954]{display:none}.input-wrapper[data-v-e8019954]{background-color:var(--bg-input);border:1px solid var(--border-color);border-radius:10px;align-items:center;gap:10px;padding:10px 12px;transition:border-color .15s,background-color .15s;display:flex}.input-wrapper[data-v-e8019954]:focus-within{border-color:var(--accent-primary)}.dark .input-wrapper[data-v-e8019954]{background-color:#333}.input-textarea[data-v-e8019954]{color:var(--text-primary);resize:none;background:0 0;border:none;outline:none;flex:1;min-height:20px;max-height:100px;font-family:Inter,system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.5;overflow-y:auto}.input-textarea[data-v-e8019954]::placeholder{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.input-actions[data-v-e8019954]{flex-shrink:0;align-items:center;gap:6px;display:flex}.input-wrapper.drag-over[data-v-e8019954]{border-color:var(--accent-info);background-color:rgba(var(--accent-info-rgb), .04);border-style:dashed}[data-v-be298d0d]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-be298d0d]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.conversation-monitor[data-v-be298d0d]{flex:1;min-height:0;display:flex}.conversation-monitor__sidebar[data-v-be298d0d]{border-right:1px solid var(--border-color);scrollbar-gutter:stable;flex-shrink:0;width:260px;overflow-y:auto}.conversation-monitor__sidebar[data-v-be298d0d]::-webkit-scrollbar{width:4px}.conversation-monitor__sidebar[data-v-be298d0d]::-webkit-scrollbar-thumb{background:rgba(var(--text-muted), .3);border-radius:4px}.conversation-monitor__sidebar[data-v-be298d0d]::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-muted), .5)}.conversation-monitor__session[data-v-be298d0d]{border:0;border-bottom:1px solid rgba(var(--border-color), .6);width:100%;color:inherit;text-align:left;cursor:pointer;background:0 0;padding:12px 14px}.conversation-monitor__session.active[data-v-be298d0d]{background:rgba(var(--accent-primary-rgb), .12);color:var(--text-primary);font-weight:500}.conversation-monitor__session.active .conversation-monitor__session-title[data-v-be298d0d]{color:var(--accent-primary)}.conversation-monitor__session-title-row[data-v-be298d0d],.conversation-monitor__detail-meta[data-v-be298d0d],.conversation-monitor__message-meta[data-v-be298d0d]{align-items:center;gap:6px;display:flex}.conversation-monitor__session-title[data-v-be298d0d],.conversation-monitor__detail-title[data-v-be298d0d]{font-weight:600}.conversation-monitor__session-live[data-v-be298d0d]{color:var(--accent-primary);font-size:11px}.conversation-monitor__session-meta[data-v-be298d0d],.conversation-monitor__session-preview[data-v-be298d0d],.conversation-monitor__detail-meta[data-v-be298d0d],.conversation-monitor__message-meta[data-v-be298d0d]{color:var(--text-muted);font-size:12px}.conversation-monitor__session-preview[data-v-be298d0d],.conversation-monitor__message-content[data-v-be298d0d]{white-space:pre-wrap;margin-top:6px}.conversation-monitor__detail[data-v-be298d0d]{flex-direction:column;flex:1;min-width:0;display:flex}.conversation-monitor__detail-header[data-v-be298d0d]{border-bottom:1px solid var(--border-color);padding:16px 20px}.conversation-monitor__messages[data-v-be298d0d]{flex-direction:column;flex:1;gap:12px;padding:16px 20px;display:flex;overflow-y:auto}.conversation-monitor__message[data-v-be298d0d]{background:rgba(var(--bg-secondary), .8);border-radius:10px;padding:12px 14px}.conversation-monitor__message.role-user[data-v-be298d0d]{border:1px solid rgba(var(--accent-primary), .18)}.conversation-monitor__message.role-assistant[data-v-be298d0d]{border:1px solid rgba(var(--border-color), .9)}.conversation-monitor__empty[data-v-be298d0d]{color:var(--text-muted);padding:24px}.conversation-monitor__empty--error[data-v-be298d0d]{color:var(--error)}@media (width<=768px){.conversation-monitor[data-v-be298d0d]{flex-direction:column}.conversation-monitor__sidebar[data-v-be298d0d]{border-right:0;border-bottom:1px solid var(--border-color);flex-shrink:0;width:100%;max-height:220px}.conversation-monitor__detail[data-v-be298d0d]{min-height:0;overflow:hidden}}[data-v-c7d0f76f]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c7d0f76f]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.message[data-v-c7d0f76f]{flex-direction:column;display:flex}.message.user[data-v-c7d0f76f]{align-items:flex-end}.message.user .msg-body[data-v-c7d0f76f]{max-width:75%}.message.user .msg-content.user[data-v-c7d0f76f]{align-items:flex-end}.message.user .message-bubble[data-v-c7d0f76f]{background-color:var(--msg-user-bg);border-radius:10px}.message.assistant[data-v-c7d0f76f]{flex-direction:row;align-items:flex-start;gap:8px}.message.assistant .msg-body[data-v-c7d0f76f]{max-width:80%}.message.assistant .msg-avatar[data-v-c7d0f76f]{flex-shrink:0;width:40px;height:40px;margin-top:2px}.message.assistant .message-bubble[data-v-c7d0f76f]{background-color:var(--msg-assistant-bg);border-radius:10px}.message.tool[data-v-c7d0f76f],.message.system[data-v-c7d0f76f]{align-items:flex-start}.message.system .message-bubble.system[data-v-c7d0f76f]{border-left:3px solid var(--warning);background-color:rgba(var(--warning-rgb), .06);border-radius:6px;max-width:80%}.message.highlight .message-bubble[data-v-c7d0f76f]{box-shadow:0 0 0 1px rgba(var(--accent-primary-rgb), .45)}.msg-body[data-v-c7d0f76f]{align-items:flex-start;gap:8px;max-width:85%;display:flex}.msg-content[data-v-c7d0f76f]{flex-direction:column;min-width:0;display:flex}.message-bubble[data-v-c7d0f76f]{word-break:break-word;border-radius:10px;padding:10px 14px;font-size:14px;line-height:1.65}.msg-attachments[data-v-c7d0f76f]{flex-wrap:wrap;gap:8px;margin-bottom:8px;display:flex}.msg-attachment[data-v-c7d0f76f]{border:1px solid var(--border-light);background-color:#0000000a;border-radius:6px;overflow:hidden}.msg-attachment.image[data-v-c7d0f76f]{max-width:200px}.msg-attachment-thumb[data-v-c7d0f76f]{object-fit:contain;cursor:pointer;max-width:200px;max-height:160px;display:block}.msg-attachment-file[data-v-c7d0f76f]{color:var(--text-secondary);align-items:center;gap:6px;padding:6px 10px;font-size:12px;display:flex}.msg-attachment-file .att-name[data-v-c7d0f76f]{white-space:nowrap;text-overflow:ellipsis;max-width:160px;overflow:hidden}.msg-attachment-file .att-size[data-v-c7d0f76f]{color:var(--text-muted);flex-shrink:0;font-size:11px}.thinking-block[data-v-c7d0f76f]{border-bottom:1px dashed var(--border-light);margin-bottom:8px;padding:4px 0}.thinking-block .thinking-header[data-v-c7d0f76f]{color:var(--text-muted);cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:11px;display:flex}.thinking-block .thinking-header[data-v-c7d0f76f]:hover{background:#00000008}.thinking-block .thinking-chevron[data-v-c7d0f76f]{flex-shrink:0;transition:transform .15s}.thinking-block .thinking-chevron.rotated[data-v-c7d0f76f]{transform:rotate(90deg)}.thinking-block .thinking-icon[data-v-c7d0f76f]{flex-shrink:0;font-size:11px}.thinking-block .thinking-label[data-v-c7d0f76f]{flex-shrink:0;font-weight:500}.thinking-block .thinking-meta[data-v-c7d0f76f]{color:var(--text-muted);font-variant-numeric:tabular-nums}.thinking-block .thinking-body[data-v-c7d0f76f]{border-left:2px solid var(--border-light);opacity:.85;margin-top:6px;padding:6px 10px;font-size:13px;font-style:italic}.thinking-block .thinking-body[data-v-c7d0f76f] p{margin:.3em 0}.message-meta[data-v-c7d0f76f]{opacity:0;align-items:center;gap:6px;margin-top:4px;padding:0 4px;transition:opacity .15s;display:flex}.message:hover .message-meta[data-v-c7d0f76f]{opacity:1}.copy-bubble-btn[data-v-c7d0f76f]{width:24px;height:24px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:0;transition:color .15s,background .15s;display:flex}.copy-bubble-btn[data-v-c7d0f76f]:hover{color:var(--text-secondary);background:#0000000f}.dark .copy-bubble-btn[data-v-c7d0f76f]{color:#999}.dark .copy-bubble-btn[data-v-c7d0f76f]:hover{color:#ccc;background:#ffffff14}.message-time[data-v-c7d0f76f]{color:var(--text-muted);-webkit-user-select:none;user-select:none;font-size:11px}.dark .message-time[data-v-c7d0f76f]{color:#999}.tool-line[data-v-c7d0f76f]{color:var(--text-muted);border-radius:6px;align-items:center;gap:6px;padding:2px 4px;font-size:11px;display:flex}.tool-line.expandable[data-v-c7d0f76f]{cursor:pointer}.tool-line.expandable[data-v-c7d0f76f]:hover{background:#00000008}.tool-line .tool-name[data-v-c7d0f76f]{flex-shrink:0;font-family:JetBrains Mono,Fira Code,Consolas,monospace}.tool-line .tool-preview[data-v-c7d0f76f]{text-overflow:ellipsis;white-space:nowrap;max-width:400px;overflow:hidden}.tool-chevron[data-v-c7d0f76f]{flex-shrink:0;transition:transform .15s}.tool-chevron.rotated[data-v-c7d0f76f]{transform:rotate(90deg)}.tool-spinner[data-v-c7d0f76f]{border:1.5px solid var(--text-muted);border-top-color:#0000;border-radius:50%;flex-shrink:0;width:10px;height:10px;animation:.6s linear infinite spin-c7d0f76f}.tool-error-badge[data-v-c7d0f76f]{color:var(--error);background:rgba(var(--error-rgb), .08);border-radius:3px;padding:0 4px;font-size:9px;line-height:14px}.tool-details[data-v-c7d0f76f]{border-left:2px solid var(--border-light);margin-top:2px;margin-left:16px;padding-left:10px}.tool-detail-section[data-v-c7d0f76f]{margin-bottom:6px}.tool-detail-label[data-v-c7d0f76f]{color:var(--text-muted);text-transform:uppercase;letter-spacing:.3px;margin-bottom:2px;font-size:10px;font-weight:600}.tool-detail-code-block[data-v-c7d0f76f] .hljs-code-block{margin:0}.tool-detail-code-block[data-v-c7d0f76f] .code-header{background:#00000005}.tool-detail-code-block[data-v-c7d0f76f] code.hljs{white-space:pre-wrap;word-break:break-word;max-height:300px;font-size:11px;overflow-y:auto}@keyframes spin-c7d0f76f{to{transform:rotate(360deg)}}.streaming-cursor[data-v-c7d0f76f]{background-color:var(--text-muted);vertical-align:text-bottom;width:2px;height:1em;margin-left:2px;animation:.8s infinite blink-c7d0f76f;display:inline-block}.streaming-dots[data-v-c7d0f76f]{gap:4px;padding:4px 0;display:flex}.streaming-dots span[data-v-c7d0f76f]{background-color:var(--text-muted);border-radius:50%;width:6px;height:6px;animation:1.4s ease-in-out infinite pulse-c7d0f76f}.streaming-dots span[data-v-c7d0f76f]:nth-child(2){animation-delay:.2s}.streaming-dots span[data-v-c7d0f76f]:nth-child(3){animation-delay:.4s}@keyframes blink-c7d0f76f{0%,50%{opacity:1}51%,to{opacity:0}}@keyframes pulse-c7d0f76f{0%,80%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}.image-preview-overlay[data-v-c7d0f76f]{z-index:9999;cursor:pointer;background:#000000d9;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.image-preview-img[data-v-c7d0f76f]{object-fit:contain;border-radius:4px;max-width:90vw;max-height:90vh}@media (width<=768px){.message.user .msg-body[data-v-c7d0f76f],.message.assistant .msg-body[data-v-c7d0f76f],.message.system .msg-body[data-v-c7d0f76f]{max-width:100%}}[data-v-1bc92f44]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-1bc92f44]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.message-list[data-v-1bc92f44]{background-color:var(--bg-card);flex-direction:column;flex:1;gap:16px;padding:20px;display:flex;overflow-y:auto}.dark .message-list[data-v-1bc92f44]{background-color:#333}.empty-state[data-v-1bc92f44]{color:var(--text-muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:12px;display:flex}.empty-state .empty-logo[data-v-1bc92f44]{opacity:.25;width:48px;height:48px}.empty-state p[data-v-1bc92f44]{font-size:14px}.fade-enter-active[data-v-1bc92f44],.fade-leave-active[data-v-1bc92f44]{transition:opacity .4s}.fade-enter-from[data-v-1bc92f44],.fade-leave-to[data-v-1bc92f44]{opacity:0}.streaming-indicator[data-v-1bc92f44]{align-items:flex-start;gap:12px;padding:4px;display:flex}.streaming-indicator .thinking-video[data-v-1bc92f44]{object-fit:contain;border-radius:10px;flex-shrink:0;width:120px;height:213px}.tool-calls-panel[data-v-1bc92f44]{scrollbar-width:none;-ms-overflow-style:none;flex-direction:column;gap:4px;max-height:213px;padding-top:4px;display:flex;overflow-y:auto}.tool-calls-panel[data-v-1bc92f44]::-webkit-scrollbar{display:none}.tool-call-item[data-v-1bc92f44]{color:var(--text-secondary);background:#00000008;border-radius:6px;align-items:center;gap:6px;padding:3px 8px;font-size:11px;display:flex}.dark .tool-call-item[data-v-1bc92f44]{background:#ffffff0f}.tool-call-item .tool-call-icon[data-v-1bc92f44]{color:var(--text-muted);flex-shrink:0}.tool-call-item .tool-call-name[data-v-1bc92f44]{flex-shrink:0;font-family:JetBrains Mono,Fira Code,Consolas,monospace}.tool-call-item .tool-call-preview[data-v-1bc92f44]{text-overflow:ellipsis;white-space:nowrap;max-width:300px;color:var(--text-muted);overflow:hidden}.tool-call-spinner[data-v-1bc92f44]{border:1.5px solid var(--text-muted);border-top-color:#0000;border-radius:50%;flex-shrink:0;width:10px;height:10px;animation:.6s linear infinite spin-1bc92f44}.tool-call-error[data-v-1bc92f44]{color:var(--error);background:rgba(var(--error), .08);border-radius:3px;padding:0 4px;font-size:9px;line-height:14px}@keyframes spin-1bc92f44{to{transform:rotate(360deg)}}[data-v-ed01ae3e]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-ed01ae3e]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.chat-panel[data-v-ed01ae3e]{height:100%;display:flex;position:relative}.session-list[data-v-ed01ae3e]{border-right:1px solid var(--border-color);flex-direction:column;flex-shrink:0;width:220px;transition:width .25s,opacity .25s;display:flex;overflow:hidden}.session-list.collapsed[data-v-ed01ae3e]{opacity:0;pointer-events:none;border-right:none;width:0}@media (width<=768px){.session-list[data-v-ed01ae3e]{z-index:10;background:var(--bg-card);width:280px;height:100%;position:absolute;top:0;left:0;box-shadow:2px 0 8px #0000001a}.session-list.collapsed[data-v-ed01ae3e]{opacity:0;transform:translate(-100%)}.session-close-btn[data-v-ed01ae3e]{display:flex}.session-backdrop[data-v-ed01ae3e]{z-index:9;opacity:0;pointer-events:none;background:#0006;transition:opacity .15s;position:absolute;inset:0}.session-backdrop.active[data-v-ed01ae3e]{opacity:1;pointer-events:auto}}.session-list-header[data-v-ed01ae3e]{flex-shrink:0;justify-content:space-between;align-items:center;padding:12px;display:flex}.session-list-actions[data-v-ed01ae3e]{align-items:center;gap:4px;display:flex}.session-close-btn[data-v-ed01ae3e]{cursor:pointer;color:var(--text-secondary);background:0 0;border:none;border-radius:6px;padding:4px;display:none}.session-close-btn[data-v-ed01ae3e]:hover{background:rgba(var(--accent-primary), .06)}.session-list-title[data-v-ed01ae3e]{color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;font-size:12px;font-weight:600}.session-group-header[data-v-ed01ae3e]{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;padding:6px 10px 4px;display:flex}.session-group-header--static[data-v-ed01ae3e]{cursor:default}.group-chevron[data-v-ed01ae3e]{flex-shrink:0;transition:transform .15s;transform:rotate(90deg)}.group-chevron.collapsed[data-v-ed01ae3e]{transform:rotate(0)}.session-group-label[data-v-ed01ae3e]{color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;font-size:10px;font-weight:600}.session-group-count[data-v-ed01ae3e]{color:var(--text-muted);font-size:10px;font-weight:400}.session-items[data-v-ed01ae3e]{flex:1;padding:0 6px 12px;overflow-y:auto}.session-loading[data-v-ed01ae3e],.session-empty[data-v-ed01ae3e]{color:var(--text-muted);text-align:center;padding:16px 10px;font-size:12px}[data-v-ed01ae3e] .session-item{cursor:pointer;text-align:left;width:100%;color:var(--text-secondary);background:0 0;border:none;border-radius:6px;justify-content:space-between;align-items:center;margin-bottom:2px;padding:8px 10px;transition:all .15s;display:flex}[data-v-ed01ae3e] .session-item:hover{background:rgba(var(--accent-primary), .06);color:var(--text-primary)}[data-v-ed01ae3e] .session-item:hover .session-item-delete{opacity:1}[data-v-ed01ae3e] .session-item.active{background:rgba(var(--accent-primary-rgb), .12);color:var(--text-primary);font-weight:500}[data-v-ed01ae3e] .session-item.active .session-item-title,[data-v-ed01ae3e] .session-item.live .session-item-title{color:var(--accent-primary)}[data-v-ed01ae3e] .session-item-content{flex:1;overflow:hidden}[data-v-ed01ae3e] .session-item-title-row{align-items:center;gap:6px;min-width:0;display:flex}[data-v-ed01ae3e] .session-item-title{white-space:nowrap;text-overflow:ellipsis;flex:auto;min-width:0;font-size:13px;display:block;overflow:hidden}[data-v-ed01ae3e] .session-item-active-indicator{color:var(--accent-primary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}[data-v-ed01ae3e] .session-item-active-spinner{animation:1.1s linear infinite session-spin-ed01ae3e}[data-v-ed01ae3e] .session-item-live-badge{letter-spacing:.04em;text-transform:uppercase;color:var(--accent-primary);background:rgba(var(--accent-primary-rgb), .1);border-radius:999px;flex-shrink:0;align-items:center;gap:4px;padding:1px 7px;font-size:10px;font-weight:600;line-height:16px;display:inline-flex}[data-v-ed01ae3e] .live-dot{background:var(--accent-primary);border-radius:50%;width:6px;height:6px;animation:2s ease-in-out infinite live-pulse-ed01ae3e}@keyframes live-pulse-ed01ae3e{0%,to{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)}}[data-v-ed01ae3e] .session-item-pin{color:var(--accent-primary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}[data-v-ed01ae3e] .session-item-time{color:var(--text-muted);font-size:11px}[data-v-ed01ae3e] .session-item-meta{align-items:center;gap:6px;margin-top:2px;display:flex}[data-v-ed01ae3e] .session-item-model{color:var(--accent-primary);background:rgba(var(--accent-primary), .08);text-overflow:ellipsis;white-space:nowrap;border-radius:3px;flex-shrink:0;max-width:100px;padding:0 5px;font-size:10px;line-height:16px;overflow:hidden}[data-v-ed01ae3e] .session-item-delete{opacity:.5;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;padding:2px;transition:all .15s}[data-v-ed01ae3e] .session-item-delete:hover{color:var(--error);background:rgba(var(--error), .1)}@keyframes session-spin-ed01ae3e{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.chat-main[data-v-ed01ae3e]{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.chat-header[data-v-ed01ae3e]{border-bottom:1px solid var(--border-color);flex-shrink:0;justify-content:space-between;align-items:center;padding:21px 20px;display:flex}.header-left[data-v-ed01ae3e]{flex:1;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.header-session-title[data-v-ed01ae3e]{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:600;overflow:hidden}.source-badge[data-v-ed01ae3e]{color:var(--text-muted);background:rgba(var(--text-muted), .12);white-space:nowrap;border-radius:8px;flex-shrink:0;padding:1px 7px;font-size:10px;line-height:16px}.header-actions[data-v-ed01ae3e]{flex-shrink:0;align-items:center;gap:4px;display:flex}.chat-mode-toggle[data-v-ed01ae3e]{align-items:center;gap:4px;margin-right:4px;display:flex}@media (width<=768px){.chat-header[data-v-ed01ae3e]{padding:16px 12px 16px 52px}}.chat-view[data-v-6dae3628]{height:calc(100 * var(--vh));flex-direction:column;display:flex}
|
webui/assets/Dropdown-ReirMLrI.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{i as e,t}from"./create-EseJ7qR2.js";import{$n as n,B as r,Bn as i,Dr as a,Fr as o,H as s,Hn as c,Hr as l,Kr as u,L as d,Ln as f,Lr as p,Mn as m,Nn as h,On as g,Pn as _,R as v,Rr as y,S as b,Sn as x,T as S,Un as C,Vr as w,Xr as T,_r as E,ei as D,er as O,hn as k,in as A,ir as j,it as M,jn as N,kn as P,ni as F,nr as I,pn as L,ri as R,rn as z,rr as B,ti as V,tr as H,un as U,vn as W,wr as ee,yn as te,z as ne,zn as re,zr as G}from"./index-Cl8-DFW_.js";function ie(e={},t){let n=D({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:r,keyup:i}=e,a=e=>{switch(e.key){case`Control`:n.ctrl=!0;break;case`Meta`:n.command=!0,n.win=!0;break;case`Shift`:n.shift=!0;break;case`Tab`:n.tab=!0;break}r!==void 0&&Object.keys(r).forEach(t=>{if(t!==e.key)return;let n=r[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},o=e=>{switch(e.key){case`Control`:n.ctrl=!1;break;case`Meta`:n.command=!1,n.win=!1;break;case`Shift`:n.shift=!1;break;case`Tab`:n.tab=!1;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=()=>{(t===void 0||t.value)&&(C(`keydown`,document,a),C(`keyup`,document,o)),t!==void 0&&T(t,e=>{e?(C(`keydown`,document,a),C(`keyup`,document,o)):(c(`keydown`,document,a),c(`keyup`,document,o))})};return re()?(w(s),l(()=>{(t===void 0||t.value)&&(c(`keydown`,document,a),c(`keyup`,document,o))})):s(),V(n)}function ae(e,t,n){if(!t)return e;let r=F(e.value),i=null;return T(e,e=>{i!==null&&window.clearTimeout(i),e===!0?n&&!n.value?r.value=!0:i=window.setTimeout(()=>{r.value=!0},t):r.value=!1}),r}function oe(e){return t=>{t?e.value=t.$el:e.value=null}}var K=o({name:`ChevronRight`,render(){return p(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},p(`path`,{d:`M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z`,fill:`currentColor`}))}}),q=_(`n-dropdown-menu`),J=_(`n-dropdown`),Y=_(`n-dropdown-option`),X=o({name:`DropdownDivider`,props:{clsPrefix:{type:String,required:!0}},render(){return p(`div`,{class:`${this.clsPrefix}-dropdown-divider`})}}),se=o({name:`DropdownGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{showIconRef:e,hasSubmenuRef:t}=y(q),{renderLabelRef:n,labelFieldRef:r,nodePropsRef:i,renderOptionRef:a}=y(J);return{labelField:r,showIcon:e,hasSubmenu:t,renderLabel:n,nodeProps:i,renderOption:a}},render(){let{clsPrefix:e,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:i,renderOption:a}=this,{rawNode:o}=this.tmNode,s=p(`div`,Object.assign({class:`${e}-dropdown-option`},r?.(o)),p(`div`,{class:`${e}-dropdown-option-body ${e}-dropdown-option-body--group`},p(`div`,{"data-dropdown-option":!0,class:[`${e}-dropdown-option-body__prefix`,n&&`${e}-dropdown-option-body__prefix--show-icon`]},U(o.icon)),p(`div`,{class:`${e}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(o):U(o.title??o[this.labelField])),p(`div`,{class:[`${e}-dropdown-option-body__suffix`,t&&`${e}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return a?a({node:s,option:o}):s}}),ce=O(`icon`,`
|
| 2 |
+
height: 1em;
|
| 3 |
+
width: 1em;
|
| 4 |
+
line-height: 1em;
|
| 5 |
+
text-align: center;
|
| 6 |
+
display: inline-block;
|
| 7 |
+
position: relative;
|
| 8 |
+
fill: currentColor;
|
| 9 |
+
`,[I(`color-transition`,{transition:`color .3s var(--n-bezier)`}),I(`depth`,{color:`var(--n-color)`},[n(`svg`,{opacity:`var(--n-opacity)`,transition:`opacity .3s var(--n-bezier)`})]),n(`svg`,{height:`1em`,width:`1em`})]),Z=o({_n_icon__:!0,name:`Icon`,inheritAttrs:!1,props:Object.assign(Object.assign({},M.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=A(e),r=M(`Icon`,`-icon`,ce,b,e,t),i=a(()=>{let{depth:t}=e,{common:{cubicBezierEaseInOut:n},self:i}=r.value;if(t!==void 0){let{color:e,[`opacity${t}Depth`]:r}=i;return{"--n-bezier":n,"--n-color":e,"--n-opacity":r}}return{"--n-bezier":n,"--n-color":``,"--n-opacity":``}}),o=n?z(`icon`,a(()=>`${e.depth||`d`}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:a(()=>{let{size:t,color:n}=e;return{fontSize:te(t),color:n}}),cssVars:n?void 0:i,themeClass:o?.themeClass,onRender:o?.onRender}},render(){let{$parent:e,depth:t,mergedClsPrefix:n,component:r,onRender:i,themeClass:a}=this;return e?.$options?._n_icon__&&W(`icon`,"don't wrap `n-icon` inside `n-icon`"),i?.(),p(`i`,G(this.$attrs,{role:`img`,class:[`${n}-icon`,a,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),r?p(r):this.$slots)}});function Q(e,t){return e.type===`submenu`||e.type===void 0&&e[t]!==void 0}function le(e){return e.type===`group`}function $(e){return e.type===`divider`}function ue(e){return e.type===`render`}var de=o({name:`DropdownOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:`right-start`},props:Object,scrollable:Boolean},setup(t){let n=y(J),{hoverKeyRef:r,keyboardKeyRef:o,lastToggledSubmenuKeyRef:s,pendingKeyPathRef:c,activeKeyPathRef:l,animatedRef:d,mergedShowRef:f,renderLabelRef:p,renderIconRef:m,labelFieldRef:h,childrenFieldRef:g,renderOptionRef:_,nodePropsRef:v,menuPropsRef:b}=n,x=y(Y,null),S=y(q),C=y(N),w=a(()=>t.tmNode.rawNode),T=a(()=>{let{value:e}=g;return Q(t.tmNode.rawNode,e)}),E=a(()=>{let{disabled:e}=t.tmNode;return e}),D=ae(a(()=>{if(!T.value)return!1;let{key:e,disabled:n}=t.tmNode;if(n)return!1;let{value:i}=r,{value:a}=o,{value:l}=s,{value:u}=c;return i===null?a===null?l===null?!1:u.includes(e):u.includes(e)&&u[u.length-1]!==e:u.includes(e)}),300,a(()=>o.value===null&&!d.value)),O=a(()=>!!x?.enteringSubmenuRef.value),k=F(!1);u(Y,{enteringSubmenuRef:k});function A(){k.value=!0}function j(){k.value=!1}function M(){let{parentKey:e,tmNode:n}=t;n.disabled||f.value&&(s.value=e,o.value=null,r.value=n.key)}function P(){let{tmNode:e}=t;e.disabled||f.value&&r.value!==e.key&&M()}function I(n){if(t.tmNode.disabled||!f.value)return;let{relatedTarget:i}=n;i&&!e({target:i},`dropdownOption`)&&!e({target:i},`scrollbarRail`)&&(r.value=null)}function L(){let{value:e}=T,{tmNode:r}=t;f.value&&!e&&!r.disabled&&(n.doSelect(r.key,r.rawNode),n.doUpdateShow(!1))}return{labelField:h,renderLabel:p,renderIcon:m,siblingHasIcon:S.showIconRef,siblingHasSubmenu:S.hasSubmenuRef,menuProps:b,popoverBody:C,animated:d,mergedShowSubmenu:a(()=>D.value&&!O.value),rawNode:w,hasSubmenu:T,pending:i(()=>{let{value:e}=c,{key:n}=t.tmNode;return e.includes(n)}),childActive:i(()=>{let{value:e}=l,{key:n}=t.tmNode,r=e.findIndex(e=>n===e);return r===-1?!1:r<e.length-1}),active:i(()=>{let{value:e}=l,{key:n}=t.tmNode,r=e.findIndex(e=>n===e);return r===-1?!1:r===e.length-1}),mergedDisabled:E,renderOption:_,nodeProps:v,handleClick:L,handleMouseMove:P,handleMouseEnter:M,handleMouseLeave:I,handleSubmenuBeforeEnter:A,handleSubmenuAfterEnter:j}},render(){let{animated:e,rawNode:t,mergedShowSubmenu:n,clsPrefix:r,siblingHasIcon:i,siblingHasSubmenu:a,renderLabel:o,renderIcon:s,renderOption:c,nodeProps:l,props:u,scrollable:d}=this,f=null;if(n){let e=this.menuProps?.call(this,t,t.children);f=p(me,Object.assign({},e,{clsPrefix:r,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}let m={class:[`${r}-dropdown-option-body`,this.pending&&`${r}-dropdown-option-body--pending`,this.active&&`${r}-dropdown-option-body--active`,this.childActive&&`${r}-dropdown-option-body--child-active`,this.mergedDisabled&&`${r}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},h=l?.(t),_=p(`div`,Object.assign({class:[`${r}-dropdown-option`,h?.class],"data-dropdown-option":!0},h),p(`div`,G(m,u),[p(`div`,{class:[`${r}-dropdown-option-body__prefix`,i&&`${r}-dropdown-option-body__prefix--show-icon`]},[s?s(t):U(t.icon)]),p(`div`,{"data-dropdown-option":!0,class:`${r}-dropdown-option-body__label`},o?o(t):U(t[this.labelField]??t.title)),p(`div`,{"data-dropdown-option":!0,class:[`${r}-dropdown-option-body__suffix`,a&&`${r}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?p(Z,null,{default:()=>p(K,null)}):null)]),this.hasSubmenu?p(P,null,{default:()=>[p(g,null,{default:()=>p(`div`,{class:`${r}-dropdown-offset-container`},p(x,{show:this.mergedShowSubmenu,placement:this.placement,to:d&&this.popoverBody||void 0,teleportDisabled:!d},{default:()=>p(`div`,{class:`${r}-dropdown-menu-wrapper`},e?p(E,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:`fade-in-scale-up-transition`,appear:!0},{default:()=>f}):f)}))})]}):null);return c?c({node:_,option:t}):_}}),fe=o({name:`NDropdownGroup`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){let{tmNode:e,parentKey:t,clsPrefix:n}=this,{children:r}=e;return p(ee,null,p(se,{clsPrefix:n,tmNode:e,key:e.key}),r?.map(e=>{let{rawNode:r}=e;return r.show===!1?null:$(r)?p(X,{clsPrefix:n,key:e.key}):e.isGroup?(W(`dropdown`,"`group` node is not allowed to be put in `group` node."),null):p(de,{clsPrefix:n,tmNode:e,parentKey:t,key:e.key})}))}}),pe=o({name:`DropdownRenderOption`,props:{tmNode:{type:Object,required:!0}},render(){let{rawNode:{render:e,props:t}}=this.tmNode;return p(`div`,t,[e?.()])}}),me=o({name:`DropdownMenu`,props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){let{renderIconRef:t,childrenFieldRef:n}=y(J);u(q,{showIconRef:a(()=>{let n=t.value;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>n?n(e):e.icon);let{rawNode:t}=e;return n?n(t):t.icon})}),hasSubmenuRef:a(()=>{let{value:t}=n;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>Q(e,t));let{rawNode:n}=e;return Q(n,t)})})});let r=F(null);return u(m,null),u(h,null),u(N,r),{bodyRef:r}},render(){let{parentKey:e,clsPrefix:t,scrollable:n}=this,r=this.tmNodes.map(r=>{let{rawNode:i}=r;return i.show===!1?null:ue(i)?p(pe,{tmNode:r,key:r.key}):$(i)?p(X,{clsPrefix:t,key:r.key}):le(i)?p(fe,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):p(de,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:i.props,scrollable:n})});return p(`div`,{class:[`${t}-dropdown-menu`,n&&`${t}-dropdown-menu--scrollable`],ref:`bodyRef`},n?p(s,{contentClass:`${t}-dropdown-menu__content`},{default:()=>r}):r,this.showArrow?ne({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),he=O(`dropdown-menu`,`
|
| 10 |
+
transform-origin: var(--v-transform-origin);
|
| 11 |
+
background-color: var(--n-color);
|
| 12 |
+
border-radius: var(--n-border-radius);
|
| 13 |
+
box-shadow: var(--n-box-shadow);
|
| 14 |
+
position: relative;
|
| 15 |
+
transition:
|
| 16 |
+
background-color .3s var(--n-bezier),
|
| 17 |
+
box-shadow .3s var(--n-bezier);
|
| 18 |
+
`,[r(),O(`dropdown-option`,`
|
| 19 |
+
position: relative;
|
| 20 |
+
`,[n(`a`,`
|
| 21 |
+
text-decoration: none;
|
| 22 |
+
color: inherit;
|
| 23 |
+
outline: none;
|
| 24 |
+
`,[n(`&::before`,`
|
| 25 |
+
content: "";
|
| 26 |
+
position: absolute;
|
| 27 |
+
left: 0;
|
| 28 |
+
right: 0;
|
| 29 |
+
top: 0;
|
| 30 |
+
bottom: 0;
|
| 31 |
+
`)]),O(`dropdown-option-body`,`
|
| 32 |
+
display: flex;
|
| 33 |
+
cursor: pointer;
|
| 34 |
+
position: relative;
|
| 35 |
+
height: var(--n-option-height);
|
| 36 |
+
line-height: var(--n-option-height);
|
| 37 |
+
font-size: var(--n-font-size);
|
| 38 |
+
color: var(--n-option-text-color);
|
| 39 |
+
transition: color .3s var(--n-bezier);
|
| 40 |
+
`,[n(`&::before`,`
|
| 41 |
+
content: "";
|
| 42 |
+
position: absolute;
|
| 43 |
+
top: 0;
|
| 44 |
+
bottom: 0;
|
| 45 |
+
left: 4px;
|
| 46 |
+
right: 4px;
|
| 47 |
+
transition: background-color .3s var(--n-bezier);
|
| 48 |
+
border-radius: var(--n-border-radius);
|
| 49 |
+
`),B(`disabled`,[I(`pending`,`
|
| 50 |
+
color: var(--n-option-text-color-hover);
|
| 51 |
+
`,[H(`prefix, suffix`,`
|
| 52 |
+
color: var(--n-option-text-color-hover);
|
| 53 |
+
`),n(`&::before`,`background-color: var(--n-option-color-hover);`)]),I(`active`,`
|
| 54 |
+
color: var(--n-option-text-color-active);
|
| 55 |
+
`,[H(`prefix, suffix`,`
|
| 56 |
+
color: var(--n-option-text-color-active);
|
| 57 |
+
`),n(`&::before`,`background-color: var(--n-option-color-active);`)]),I(`child-active`,`
|
| 58 |
+
color: var(--n-option-text-color-child-active);
|
| 59 |
+
`,[H(`prefix, suffix`,`
|
| 60 |
+
color: var(--n-option-text-color-child-active);
|
| 61 |
+
`)])]),I(`disabled`,`
|
| 62 |
+
cursor: not-allowed;
|
| 63 |
+
opacity: var(--n-option-opacity-disabled);
|
| 64 |
+
`),I(`group`,`
|
| 65 |
+
font-size: calc(var(--n-font-size) - 1px);
|
| 66 |
+
color: var(--n-group-header-text-color);
|
| 67 |
+
`,[H(`prefix`,`
|
| 68 |
+
width: calc(var(--n-option-prefix-width) / 2);
|
| 69 |
+
`,[I(`show-icon`,`
|
| 70 |
+
width: calc(var(--n-option-icon-prefix-width) / 2);
|
| 71 |
+
`)])]),H(`prefix`,`
|
| 72 |
+
width: var(--n-option-prefix-width);
|
| 73 |
+
display: flex;
|
| 74 |
+
justify-content: center;
|
| 75 |
+
align-items: center;
|
| 76 |
+
color: var(--n-prefix-color);
|
| 77 |
+
transition: color .3s var(--n-bezier);
|
| 78 |
+
z-index: 1;
|
| 79 |
+
`,[I(`show-icon`,`
|
| 80 |
+
width: var(--n-option-icon-prefix-width);
|
| 81 |
+
`),O(`icon`,`
|
| 82 |
+
font-size: var(--n-option-icon-size);
|
| 83 |
+
`)]),H(`label`,`
|
| 84 |
+
white-space: nowrap;
|
| 85 |
+
flex: 1;
|
| 86 |
+
z-index: 1;
|
| 87 |
+
`),H(`suffix`,`
|
| 88 |
+
box-sizing: border-box;
|
| 89 |
+
flex-grow: 0;
|
| 90 |
+
flex-shrink: 0;
|
| 91 |
+
display: flex;
|
| 92 |
+
justify-content: flex-end;
|
| 93 |
+
align-items: center;
|
| 94 |
+
min-width: var(--n-option-suffix-width);
|
| 95 |
+
padding: 0 8px;
|
| 96 |
+
transition: color .3s var(--n-bezier);
|
| 97 |
+
color: var(--n-suffix-color);
|
| 98 |
+
z-index: 1;
|
| 99 |
+
`,[I(`has-submenu`,`
|
| 100 |
+
width: var(--n-option-icon-suffix-width);
|
| 101 |
+
`),O(`icon`,`
|
| 102 |
+
font-size: var(--n-option-icon-size);
|
| 103 |
+
`)]),O(`dropdown-menu`,`pointer-events: all;`)]),O(`dropdown-offset-container`,`
|
| 104 |
+
pointer-events: none;
|
| 105 |
+
position: absolute;
|
| 106 |
+
left: 0;
|
| 107 |
+
right: 0;
|
| 108 |
+
top: -4px;
|
| 109 |
+
bottom: -4px;
|
| 110 |
+
`)]),O(`dropdown-divider`,`
|
| 111 |
+
transition: background-color .3s var(--n-bezier);
|
| 112 |
+
background-color: var(--n-divider-color);
|
| 113 |
+
height: 1px;
|
| 114 |
+
margin: 4px 0;
|
| 115 |
+
`),O(`dropdown-menu-wrapper`,`
|
| 116 |
+
transform-origin: var(--v-transform-origin);
|
| 117 |
+
width: fit-content;
|
| 118 |
+
`),n(`>`,[O(`scrollbar`,`
|
| 119 |
+
height: inherit;
|
| 120 |
+
max-height: inherit;
|
| 121 |
+
`)]),B(`scrollable`,`
|
| 122 |
+
padding: var(--n-padding);
|
| 123 |
+
`),I(`scrollable`,[H(`content`,`
|
| 124 |
+
padding: var(--n-padding);
|
| 125 |
+
`)])]),ge={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:String,inverted:Boolean,placement:{type:String,default:`bottom`},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:`label`},keyField:{type:String,default:`key`},childrenField:{type:String,default:`children`},value:[String,Number]},_e=Object.keys(v),ve=o({name:`Dropdown`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},v),ge),M.props),setup(e){let n=F(!1),r=f(R(e,`show`),n),o=a(()=>{let{keyField:n,childrenField:r}=e;return t(e.options,{getKey(e){return e[n]},getDisabled(e){return e.disabled===!0},getIgnored(e){return e.type===`divider`||e.type===`render`},getChildren(e){return e[r]}})}),s=a(()=>o.value.treeNodes),c=F(null),l=F(null),d=F(null),p=a(()=>c.value??l.value??d.value??null),m=a(()=>o.value.getPath(p.value).keyPath),h=a(()=>o.value.getPath(e.value).keyPath),g=i(()=>e.keyboard&&r.value);ie({keydown:{ArrowUp:{prevent:!0,handler:P},ArrowRight:{prevent:!0,handler:N},ArrowDown:{prevent:!0,handler:I},ArrowLeft:{prevent:!0,handler:O},Enter:{prevent:!0,handler:L},Escape:D}},g);let{mergedClsPrefixRef:_,inlineThemeDisabled:v,mergedComponentPropsRef:y}=A(e),b=a(()=>e.size||y?.value?.Dropdown?.size||`medium`),x=M(`Dropdown`,`-dropdown`,he,S,e,_);u(J,{labelFieldRef:R(e,`labelField`),childrenFieldRef:R(e,`childrenField`),renderLabelRef:R(e,`renderLabel`),renderIconRef:R(e,`renderIcon`),hoverKeyRef:c,keyboardKeyRef:l,lastToggledSubmenuKeyRef:d,pendingKeyPathRef:m,activeKeyPathRef:h,animatedRef:R(e,`animated`),mergedShowRef:r,nodePropsRef:R(e,`nodeProps`),renderOptionRef:R(e,`renderOption`),menuPropsRef:R(e,`menuProps`),doSelect:C,doUpdateShow:w}),T(r,t=>{!e.animated&&!t&&E()});function C(t,n){let{onSelect:r}=e;r&&k(r,t,n)}function w(t){let{"onUpdate:show":r,onUpdateShow:i}=e;r&&k(r,t),i&&k(i,t),n.value=t}function E(){c.value=null,l.value=null,d.value=null}function D(){w(!1)}function O(){V(`left`)}function N(){V(`right`)}function P(){V(`up`)}function I(){V(`down`)}function L(){let e=B();e?.isLeaf&&r.value&&(C(e.key,e.rawNode),w(!1))}function B(){let{value:e}=o,{value:t}=p;return!e||t===null?null:e.getNode(t)??null}function V(e){let{value:t}=p,{value:{getFirstAvailableNode:n}}=o,r=null;if(t===null){let e=n();e!==null&&(r=e.key)}else{let t=B();if(t){let n;switch(e){case`down`:n=t.getNext();break;case`up`:n=t.getPrev();break;case`right`:n=t.getChild();break;case`left`:n=t.getParent();break}n&&(r=n.key)}}r!==null&&(c.value=null,l.value=r)}let H=a(()=>{let{inverted:t}=e,n=b.value,{common:{cubicBezierEaseInOut:r},self:i}=x.value,{padding:a,dividerColor:o,borderRadius:s,optionOpacityDisabled:c,[j(`optionIconSuffixWidth`,n)]:l,[j(`optionSuffixWidth`,n)]:u,[j(`optionIconPrefixWidth`,n)]:d,[j(`optionPrefixWidth`,n)]:f,[j(`fontSize`,n)]:p,[j(`optionHeight`,n)]:m,[j(`optionIconSize`,n)]:h}=i,g={"--n-bezier":r,"--n-font-size":p,"--n-padding":a,"--n-border-radius":s,"--n-option-height":m,"--n-option-prefix-width":f,"--n-option-icon-prefix-width":d,"--n-option-suffix-width":u,"--n-option-icon-suffix-width":l,"--n-option-icon-size":h,"--n-divider-color":o,"--n-option-opacity-disabled":c};return t?(g[`--n-color`]=i.colorInverted,g[`--n-option-color-hover`]=i.optionColorHoverInverted,g[`--n-option-color-active`]=i.optionColorActiveInverted,g[`--n-option-text-color`]=i.optionTextColorInverted,g[`--n-option-text-color-hover`]=i.optionTextColorHoverInverted,g[`--n-option-text-color-active`]=i.optionTextColorActiveInverted,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActiveInverted,g[`--n-prefix-color`]=i.prefixColorInverted,g[`--n-suffix-color`]=i.suffixColorInverted,g[`--n-group-header-text-color`]=i.groupHeaderTextColorInverted):(g[`--n-color`]=i.color,g[`--n-option-color-hover`]=i.optionColorHover,g[`--n-option-color-active`]=i.optionColorActive,g[`--n-option-text-color`]=i.optionTextColor,g[`--n-option-text-color-hover`]=i.optionTextColorHover,g[`--n-option-text-color-active`]=i.optionTextColorActive,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActive,g[`--n-prefix-color`]=i.prefixColor,g[`--n-suffix-color`]=i.suffixColor,g[`--n-group-header-text-color`]=i.groupHeaderTextColor),g}),U=v?z(`dropdown`,a(()=>`${b.value[0]}${e.inverted?`i`:``}`),H,e):void 0;return{mergedClsPrefix:_,mergedTheme:x,mergedSize:b,tmNodes:s,mergedShow:r,handleAfterLeave:()=>{e.animated&&E()},doUpdateShow:w,cssVars:v?void 0:H,themeClass:U?.themeClass,onRender:U?.onRender}},render(){let e=(e,t,n,r,i)=>{var a;let{mergedClsPrefix:o,menuProps:s}=this;(a=this.onRender)==null||a.call(this);let c=s?.(void 0,this.tmNodes.map(e=>e.rawNode))||{},l={ref:oe(t),class:[e,`${o}-dropdown`,`${o}-dropdown--${this.mergedSize}-size`,this.themeClass],clsPrefix:o,tmNodes:this.tmNodes,style:[...n,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:r,onMouseleave:i};return p(me,G(this.$attrs,l,c))},{mergedTheme:t}=this,n={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return p(d,Object.assign({},L(this.$props,_e),n),{trigger:()=>{var e;return(e=this.$slots).default?.call(e)}})}});export{Z as n,K as r,ve as t};
|
webui/assets/FilesView-B0-Cm0Le.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
webui/assets/FilesView-W1cq2eQW.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-7f00b3bc]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-7f00b3bc]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.file-tree[data-v-7f00b3bc]{padding:8px}.tree-header[data-v-7f00b3bc]{cursor:pointer;color:var(--text-primary);border-radius:6px;align-items:center;gap:8px;padding:8px 12px;font-size:13px;font-weight:500;display:flex}.tree-header[data-v-7f00b3bc]:hover{background-color:rgba(var(--accent-primary-rgb), .06)}.file-breadcrumb[data-v-061302de]{padding:0 16px}.file-toolbar[data-v-138da008]{border-bottom:1px solid var(--border-color);padding:12px 16px}[data-v-ab2593c7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-ab2593c7]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.file-list[data-v-ab2593c7]{padding:8px 16px}.file-list-header[data-v-ab2593c7]{color:var(--text-muted);border-bottom:1px solid var(--border-light);-webkit-user-select:none;user-select:none;align-items:center;gap:16px;margin-bottom:4px;padding:6px 12px;font-size:12px;font-weight:500;display:flex}.sort-header[data-v-ab2593c7]{cursor:pointer}.sort-header[data-v-ab2593c7]:hover{color:var(--text-primary)}.sort-indicator[data-v-ab2593c7]{margin-left:2px;font-size:11px}.file-actions-placeholder[data-v-ab2593c7]{flex-shrink:0;width:60px}.file-list-row[data-v-ab2593c7]{cursor:pointer;border-radius:6px;align-items:center;gap:16px;padding:8px 12px;font-size:13px;display:flex}.file-list-row[data-v-ab2593c7]:hover{background-color:rgba(var(--accent-primary-rgb), .06)}.file-list-row:hover .file-actions[data-v-ab2593c7]{opacity:1}.file-name[data-v-ab2593c7]{text-overflow:ellipsis;white-space:nowrap;flex:1;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.file-icon[data-v-ab2593c7]{flex-shrink:0}.file-size[data-v-ab2593c7]{text-align:right;width:80px;color:var(--text-secondary);flex-shrink:0}.file-date[data-v-ab2593c7]{width:160px;color:var(--text-secondary);flex-shrink:0}.file-actions[data-v-ab2593c7]{opacity:0;flex-shrink:0;gap:4px;transition:opacity .15s;display:flex}@media (width<=768px){.file-size[data-v-ab2593c7],.file-date[data-v-ab2593c7]{display:none}}[data-v-bf0681f5]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-bf0681f5]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.file-editor[data-v-bf0681f5]{flex-direction:column;height:100%;display:flex}.editor-header[data-v-bf0681f5]{border-bottom:1px solid var(--border-color);background-color:var(--bg-card);justify-content:space-between;align-items:center;padding:8px 16px;display:flex}.editor-filename[data-v-bf0681f5]{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.editor-container[data-v-bf0681f5]{flex:1;min-height:0}[data-v-a9f9eb37]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-a9f9eb37]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.file-preview[data-v-a9f9eb37]{flex-direction:column;height:100%;display:flex}.preview-header[data-v-a9f9eb37]{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;padding:8px 16px;display:flex}.preview-filename[data-v-a9f9eb37]{color:var(--text-secondary);font-size:13px}.preview-content[data-v-a9f9eb37]{flex:1;justify-content:center;padding:16px;display:flex;overflow:auto}.preview-image[data-v-a9f9eb37]{object-fit:contain;max-width:100%;max-height:100%}.preview-markdown[data-v-a9f9eb37]{width:100%;max-width:800px}.upload-dragger[data-v-e54e68b1]{text-align:center;cursor:pointer;flex-direction:column;justify-content:center;align-items:center;padding:40px 20px;display:flex}.upload-dragger p[data-v-e54e68b1]{opacity:.6;margin-top:12px;font-size:14px}[data-v-4513759a]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-4513759a]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.files-view[data-v-4513759a]{height:100%;display:flex;overflow:hidden}.files-tree-panel[data-v-4513759a]{border-right:1px solid var(--border-color);flex-shrink:0;width:240px;min-width:180px;max-width:400px;overflow-y:auto}.files-main-panel[data-v-4513759a]{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.files-content[data-v-4513759a]{flex:1;min-height:0;overflow-y:auto}@media (width<=768px){.files-view[data-v-4513759a]{flex-direction:column}.files-tree-panel[data-v-4513759a]{border-right:none;border-bottom:1px solid var(--border-color);width:100%;max-width:none;height:200px}}
|
webui/assets/FormItem-DB8yIr9W.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{$n as e,Dr as t,Fr as n,Ft as r,Hr as i,Ir as a,Kr as o,Lr as s,Pn as c,Rr as l,Ur as u,Wn as d,Xr as f,_ as p,_r as m,at as h,cn as g,er as _,fn as v,in as y,ir as b,it as x,ni as S,nr as C,ri as w,rn as ee,tn as te,tr as T,vn as E,yn as D}from"./index-Cl8-DFW_.js";function ne(e,t,n){let r=l(e,null);if(r===null)return;let o=a()?.proxy;f(n,s),s(n.value),i(()=>{s(void 0,n.value)});function s(e,n){if(!r)return;let i=r[t];n!==void 0&&c(i,n),e!==void 0&&u(i,e)}function c(e,t){e[t]||(e[t]=[]),e[t].splice(e[t].findIndex(e=>e===o),1)}function u(e,t){e[t]||(e[t]=[]),~e[t].findIndex(e=>e===o)||e[t].push(o)}}var O=c(`n-form`),re=c(`n-form-item-insts`),k=_(`form`,[C(`inline`,`
|
| 2 |
+
width: 100%;
|
| 3 |
+
display: inline-flex;
|
| 4 |
+
align-items: flex-start;
|
| 5 |
+
align-content: space-around;
|
| 6 |
+
`,[_(`form-item`,{width:`auto`,marginRight:`18px`},[e(`&:last-child`,{marginRight:0})])])]),A=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},ie=n({name:`Form`,props:Object.assign(Object.assign({},x.props),{inline:Boolean,labelWidth:[Number,String],labelAlign:String,labelPlacement:{type:String,default:`top`},model:{type:Object,default:()=>{}},rules:Object,disabled:Boolean,size:String,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:!0},onSubmit:{type:Function,default:e=>{e.preventDefault()}},showLabel:{type:Boolean,default:void 0},validateMessages:Object}),setup(e){let{mergedClsPrefixRef:t}=y(e);x(`Form`,`-form`,k,p,e,t);let n={},r=S(void 0),i=e=>{let t=r.value;(t===void 0||e>=t)&&(r.value=e)};function a(){var e;for(let t of v(n)){let r=n[t];for(let t of r)(e=t.invalidateLabelWidth)==null||e.call(t)}}function s(e){return A(this,arguments,void 0,function*(e,t=()=>!0){return yield new Promise((r,i)=>{let a=[];for(let e of v(n)){let r=n[e];for(let e of r)e.path&&a.push(e.internalValidate(null,t))}Promise.all(a).then(t=>{let n=t.some(e=>!e.valid),a=[],o=[];t.forEach(e=>{e.errors?.length&&a.push(e.errors),e.warnings?.length&&o.push(e.warnings)}),e&&e(a.length?a:void 0,{warnings:o.length?o:void 0}),n?i(a.length?a:void 0):r({warnings:o.length?o:void 0})})})})}function c(){for(let e of v(n)){let t=n[e];for(let e of t)e.restoreValidation()}}return o(O,{props:e,maxChildLabelWidthRef:r,deriveMaxChildLabelWidth:i}),o(re,{formItems:n}),Object.assign({validate:s,restoreValidation:c,invalidateLabelWidth:a},{mergedClsPrefix:t})},render(){let{mergedClsPrefix:e}=this;return s(`form`,{class:[`${e}-form`,this.inline&&`${e}-form--inline`],onSubmit:this.onSubmit},this.$slots)}});function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function M(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,P(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function ae(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function F(e,t,n){return F=ae()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&P(i,n.prototype),i},F.apply(null,arguments)}function oe(e){return Function.toString.call(e).indexOf(`[native code]`)!==-1}function I(e){var t=typeof Map==`function`?new Map:void 0;return I=function(e){if(e===null||!oe(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return F(e,arguments,N(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,e)},I(e)}var se=/%[sdj%]/g,ce=function(){};function L(e){if(!e||!e.length)return null;var t={};return e.forEach(function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)}),t}function R(e){var t=[...arguments].slice(1),n=0,r=t.length;return typeof e==`function`?e.apply(null,t):typeof e==`string`?e.replace(se,function(e){if(e===`%%`)return`%`;if(n>=r)return e;switch(e){case`%s`:return String(t[n++]);case`%d`:return Number(t[n++]);case`%j`:try{return JSON.stringify(t[n++])}catch{return`[Circular]`}break;default:return e}}):e}function le(e){return e===`string`||e===`url`||e===`hex`||e===`email`||e===`date`||e===`pattern`}function z(e,t){return!!(e==null||t===`array`&&Array.isArray(e)&&!e.length||le(t)&&typeof e==`string`&&!e)}function ue(e,t,n){var r=[],i=0,a=e.length;function o(e){r.push.apply(r,e||[]),i++,i===a&&n(r)}e.forEach(function(e){t(e,o)})}function B(e,t,n){var r=0,i=e.length;function a(o){if(o&&o.length){n(o);return}var s=r;r+=1,s<i?t(e[s],a):n([])}a([])}function de(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var V=function(e){M(t,e);function t(t,n){var r=e.call(this,`Async Validation Error`)||this;return r.errors=t,r.fields=n,r}return t}(I(Error));function fe(e,t,n,r,i){if(t.first){var a=new Promise(function(t,a){B(de(e),n,function(e){return r(e),e.length?a(new V(e,L(e))):t(i)})});return a.catch(function(e){return e}),a}var o=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),c=s.length,l=0,u=[],d=new Promise(function(t,a){var d=function(e){if(u.push.apply(u,e),l++,l===c)return r(u),u.length?a(new V(u,L(u))):t(i)};s.length||(r(u),t(i)),s.forEach(function(t){var r=e[t];o.indexOf(t)===-1?ue(r,n,d):B(r,n,d)})});return d.catch(function(e){return e}),d}function pe(e){return!!(e&&e.message!==void 0)}function me(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function H(e,t){return function(n){var r=e.fullFields?me(t,e.fullFields):t[n.field||e.fullField];return pe(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n==`function`?n():n,fieldValue:r,field:n.field||e.fullField}}}function U(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r==`object`&&typeof e[n]==`object`?e[n]=j({},e[n],r):e[n]=r}}return e}var he=function(e,t,n,r,i,a){e.required&&(!n.hasOwnProperty(e.field)||z(t,a||e.type))&&r.push(R(i.messages.required,e.fullField))},ge=function(e,t,n,r,i){(/^\s+$/.test(t)||t===``)&&r.push(R(i.messages.whitespace,e.fullField))},W,_e=(function(){if(W)return W;var e=`[a-fA-F\\d:]`,t=function(t){return t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=`+e+`)|(?<=`+e+`)(?=\\s|$))`:``},n=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,r=`[a-fA-F\\d]{1,4}`,i=(`
|
| 7 |
+
(?:
|
| 8 |
+
(?:`+r+`:){7}(?:`+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
| 9 |
+
(?:`+r+`:){6}(?:`+n+`|:`+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
| 10 |
+
(?:`+r+`:){5}(?::`+n+`|(?::`+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
| 11 |
+
(?:`+r+`:){4}(?:(?::`+r+`){0,1}:`+n+`|(?::`+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
| 12 |
+
(?:`+r+`:){3}(?:(?::`+r+`){0,2}:`+n+`|(?::`+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
| 13 |
+
(?:`+r+`:){2}(?:(?::`+r+`){0,3}:`+n+`|(?::`+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
| 14 |
+
(?:`+r+`:){1}(?:(?::`+r+`){0,4}:`+n+`|(?::`+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
| 15 |
+
(?::(?:(?::`+r+`){0,5}:`+n+`|(?::`+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
| 16 |
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
| 17 |
+
`).replace(/\s*\/\/.*$/gm,``).replace(/\n/g,``).trim(),a=RegExp(`(?:^`+n+`$)|(?:^`+i+`$)`),o=RegExp(`^`+n+`$`),s=RegExp(`^`+i+`$`),c=function(e){return e&&e.exact?a:RegExp(`(?:`+t(e)+n+t(e)+`)|(?:`+t(e)+i+t(e)+`)`,`g`)};c.v4=function(e){return e&&e.exact?o:RegExp(``+t(e)+n+t(e),`g`)},c.v6=function(e){return e&&e.exact?s:RegExp(``+t(e)+i+t(e),`g`)};var l=`(?:(?:[a-z]+:)?//)`,u=`(?:\\S+(?::\\S*)?@)?`,d=c.v4().source,f=c.v6().source,p=`(?:`+l+`|www\\.)`+u+`(?:localhost|`+d+`|`+f+`|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return W=RegExp(`(?:^`+p+`$)`,`i`),W}),ve={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},G={integer:function(e){return G.number(e)&&parseInt(e,10)===e},float:function(e){return G.number(e)&&!G.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime==`function`&&typeof e.getMonth==`function`&&typeof e.getYear==`function`&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e==`number`},object:function(e){return typeof e==`object`&&!G.array(e)},method:function(e){return typeof e==`function`},email:function(e){return typeof e==`string`&&e.length<=320&&!!e.match(ve.email)},url:function(e){return typeof e==`string`&&e.length<=2048&&!!e.match(_e())},hex:function(e){return typeof e==`string`&&!!e.match(ve.hex)}},ye=function(e,t,n,r,i){if(e.required&&t===void 0){he(e,t,n,r,i);return}var a=[`integer`,`float`,`array`,`regexp`,`object`,`method`,`email`,`number`,`date`,`url`,`hex`],o=e.type;a.indexOf(o)>-1?G[o](t)||r.push(R(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(R(i.messages.types[o],e.fullField,e.type))},be=function(e,t,n,r,i){var a=typeof e.len==`number`,o=typeof e.min==`number`,s=typeof e.max==`number`,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,u=null,d=typeof t==`number`,f=typeof t==`string`,p=Array.isArray(t);if(d?u=`number`:f?u=`string`:p&&(u=`array`),!u)return!1;p&&(l=t.length),f&&(l=t.replace(c,`_`).length),a?l!==e.len&&r.push(R(i.messages[u].len,e.fullField,e.len)):o&&!s&&l<e.min?r.push(R(i.messages[u].min,e.fullField,e.min)):s&&!o&&l>e.max?r.push(R(i.messages[u].max,e.fullField,e.max)):o&&s&&(l<e.min||l>e.max)&&r.push(R(i.messages[u].range,e.fullField,e.min,e.max))},K=`enum`,q={required:he,whitespace:ge,type:ye,range:be,enum:function(e,t,n,r,i){e[K]=Array.isArray(e[K])?e[K]:[],e[K].indexOf(t)===-1&&r.push(R(i.messages[K],e.fullField,e[K].join(`, `)))},pattern:function(e,t,n,r,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(R(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern==`string`&&(new RegExp(e.pattern).test(t)||r.push(R(i.messages.pattern.mismatch,e.fullField,t,e.pattern))))}},xe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`string`)&&!e.required)return n();q.required(e,t,r,a,i,`string`),z(t,`string`)||(q.type(e,t,r,a,i),q.range(e,t,r,a,i),q.pattern(e,t,r,a,i),e.whitespace===!0&&q.whitespace(e,t,r,a,i))}n(a)},Se=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&q.type(e,t,r,a,i)}n(a)},Ce=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===``&&(t=void 0),z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&(q.type(e,t,r,a,i),q.range(e,t,r,a,i))}n(a)},we=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&q.type(e,t,r,a,i)}n(a)},Te=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),z(t)||q.type(e,t,r,a,i)}n(a)},Ee=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&(q.type(e,t,r,a,i),q.range(e,t,r,a,i))}n(a)},De=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&(q.type(e,t,r,a,i),q.range(e,t,r,a,i))}n(a)},Oe=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();q.required(e,t,r,a,i,`array`),t!=null&&(q.type(e,t,r,a,i),q.range(e,t,r,a,i))}n(a)},ke=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&q.type(e,t,r,a,i)}n(a)},Ae=`enum`,je=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i),t!==void 0&&q[Ae](e,t,r,a,i)}n(a)},Me=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`string`)&&!e.required)return n();q.required(e,t,r,a,i),z(t,`string`)||q.pattern(e,t,r,a,i)}n(a)},Ne=function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,`date`)&&!e.required)return n();if(q.required(e,t,r,a,i),!z(t,`date`)){var o=t instanceof Date?t:new Date(t);q.type(e,o,r,a,i),o&&q.range(e,o.getTime(),r,a,i)}}n(a)},Pe=function(e,t,n,r,i){var a=[],o=Array.isArray(t)?`array`:typeof t;q.required(e,t,r,a,i,o),n(a)},J=function(e,t,n,r,i){var a=e.type,o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t,a)&&!e.required)return n();q.required(e,t,r,o,i,a),z(t,a)||q.type(e,t,r,o,i)}n(o)},Y={string:xe,method:Se,number:Ce,boolean:we,regexp:Te,integer:Ee,float:De,array:Oe,object:ke,enum:je,pattern:Me,date:Ne,url:J,hex:J,email:J,required:Pe,any:function(e,t,n,r,i){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(z(t)&&!e.required)return n();q.required(e,t,r,a,i)}n(a)}};function X(){return{default:`Validation error on field %s`,required:`%s is required`,enum:`%s must be one of %s`,whitespace:`%s cannot be empty`,date:{format:`%s date %s is invalid for format %s`,parse:`%s date could not be parsed, %s is invalid `,invalid:`%s date %s is invalid`},types:{string:`%s is not a %s`,method:`%s is not a %s (function)`,array:`%s is not an %s`,object:`%s is not an %s`,number:`%s is not a %s`,date:`%s is not a %s`,boolean:`%s is not a %s`,integer:`%s is not an %s`,float:`%s is not a %s`,regexp:`%s is not a valid %s`,email:`%s is not a valid %s`,url:`%s is not a valid %s`,hex:`%s is not a valid %s`},string:{len:`%s must be exactly %s characters`,min:`%s must be at least %s characters`,max:`%s cannot be longer than %s characters`,range:`%s must be between %s and %s characters`},number:{len:`%s must equal %s`,min:`%s cannot be less than %s`,max:`%s cannot be greater than %s`,range:`%s must be between %s and %s`},array:{len:`%s must be exactly %s in length`,min:`%s cannot be less than %s in length`,max:`%s cannot be greater than %s in length`,range:`%s must be between %s and %s in length`},pattern:{mismatch:`%s value %s does not match pattern %s`},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Z=X(),Q=function(){function e(e){this.rules=null,this._messages=Z,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw Error(`Cannot configure a schema with no rules`);if(typeof e!=`object`||Array.isArray(e))throw Error(`Rules must be an object`);this.rules={},Object.keys(e).forEach(function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]})},t.messages=function(e){return e&&(this._messages=U(X(),e)),this._messages},t.validate=function(t,n,r){var i=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var a=t,o=n,s=r;if(typeof o==`function`&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,a),Promise.resolve(a);function c(e){var t=[],n={};function r(e){if(Array.isArray(e)){var n;t=(n=t).concat.apply(n,e)}else t.push(e)}for(var i=0;i<e.length;i++)r(e[i]);t.length?(n=L(t),s(t,n)):s(null,a)}if(o.messages){var l=this.messages();l===Z&&(l=X()),U(l,o.messages),o.messages=l}else o.messages=this.messages();var u={};(o.keys||Object.keys(this.rules)).forEach(function(e){var n=i.rules[e],r=a[e];n.forEach(function(n){var o=n;typeof o.transform==`function`&&(a===t&&(a=j({},a)),r=a[e]=o.transform(r)),o=typeof o==`function`?{validator:o}:j({},o),o.validator=i.getValidationMethod(o),o.validator&&(o.field=e,o.fullField=o.fullField||e,o.type=i.getType(o),u[e]=u[e]||[],u[e].push({rule:o,value:r,source:a,field:e}))})});var d={};return fe(u,o,function(t,n){var r=t.rule,i=(r.type===`object`||r.type===`array`)&&(typeof r.fields==`object`||typeof r.defaultField==`object`);i&&=r.required||!r.required&&t.value,r.field=t.field;function s(e,t){return j({},t,{fullField:r.fullField+`.`+e,fullFields:r.fullFields?[].concat(r.fullFields,[e]):[e]})}function c(c){c===void 0&&(c=[]);var l=Array.isArray(c)?c:[c];!o.suppressWarning&&l.length&&e.warning(`async-validator:`,l),l.length&&r.message!==void 0&&(l=[].concat(r.message));var u=l.map(H(r,a));if(o.first&&u.length)return d[r.field]=1,n(u);if(!i)n(u);else{if(r.required&&!t.value)return r.message===void 0?o.error&&(u=[o.error(r,R(o.messages.required,r.field))]):u=[].concat(r.message).map(H(r,a)),n(u);var f={};r.defaultField&&Object.keys(t.value).map(function(e){f[e]=r.defaultField}),f=j({},f,t.rule.fields);var p={};Object.keys(f).forEach(function(e){var t=f[e];p[e]=(Array.isArray(t)?t:[t]).map(s.bind(null,e))});var m=new e(p);m.messages(o.messages),t.rule.options&&(t.rule.options.messages=o.messages,t.rule.options.error=o.error),m.validate(t.value,t.rule.options||o,function(e){var t=[];u&&u.length&&t.push.apply(t,u),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)})}}var l;if(r.asyncValidator)l=r.asyncValidator(r,t.value,c,t.source,o);else if(r.validator){try{l=r.validator(r,t.value,c,t.source,o)}catch(e){console.error==null||console.error(e),o.suppressValidatorError||setTimeout(function(){throw e},0),c(e.message)}l===!0?c():l===!1?c(typeof r.message==`function`?r.message(r.fullField||r.field):r.message||(r.fullField||r.field)+` fails`):l instanceof Array?c(l):l instanceof Error&&c(l.message)}l&&l.then&&l.then(function(){return c()},function(e){return c(e)})},function(e){c(e)},a)},t.getType=function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type=`pattern`),typeof e.validator!=`function`&&e.type&&!Y.hasOwnProperty(e.type))throw Error(R(`Unknown rule type %s`,e.type));return e.type||`string`},t.getValidationMethod=function(e){if(typeof e.validator==`function`)return e.validator;var t=Object.keys(e),n=t.indexOf(`message`);return n!==-1&&t.splice(n,1),t.length===1&&t[0]===`required`?Y.required:Y[this.getType(e)]||void 0},e}();Q.register=function(e,t){if(typeof t!=`function`)throw Error(`Cannot register a validator by type, validator is not a function`);Y[e]=t},Q.warning=ce,Q.messages=Z,Q.validators=Y;var{cubicBezierEaseInOut:$}=h;function Fe({name:t=`fade-down`,fromOffset:n=`-4px`,enterDuration:r=`.3s`,leaveDuration:i=`.3s`,enterCubicBezier:a=$,leaveCubicBezier:o=$}={}){return[e(`&.${t}-transition-enter-from, &.${t}-transition-leave-to`,{opacity:0,transform:`translateY(${n})`}),e(`&.${t}-transition-enter-to, &.${t}-transition-leave-from`,{opacity:1,transform:`translateY(0)`}),e(`&.${t}-transition-leave-active`,{transition:`opacity ${i} ${o}, transform ${i} ${o}`}),e(`&.${t}-transition-enter-active`,{transition:`opacity ${r} ${a}, transform ${r} ${a}`})]}var Ie=_(`form-item`,`
|
| 18 |
+
display: grid;
|
| 19 |
+
line-height: var(--n-line-height);
|
| 20 |
+
`,[_(`form-item-label`,`
|
| 21 |
+
grid-area: label;
|
| 22 |
+
align-items: center;
|
| 23 |
+
line-height: 1.25;
|
| 24 |
+
text-align: var(--n-label-text-align);
|
| 25 |
+
font-size: var(--n-label-font-size);
|
| 26 |
+
min-height: var(--n-label-height);
|
| 27 |
+
padding: var(--n-label-padding);
|
| 28 |
+
color: var(--n-label-text-color);
|
| 29 |
+
transition: color .3s var(--n-bezier);
|
| 30 |
+
box-sizing: border-box;
|
| 31 |
+
font-weight: var(--n-label-font-weight);
|
| 32 |
+
`,[T(`asterisk`,`
|
| 33 |
+
white-space: nowrap;
|
| 34 |
+
user-select: none;
|
| 35 |
+
-webkit-user-select: none;
|
| 36 |
+
color: var(--n-asterisk-color);
|
| 37 |
+
transition: color .3s var(--n-bezier);
|
| 38 |
+
`),T(`asterisk-placeholder`,`
|
| 39 |
+
grid-area: mark;
|
| 40 |
+
user-select: none;
|
| 41 |
+
-webkit-user-select: none;
|
| 42 |
+
visibility: hidden;
|
| 43 |
+
`)]),_(`form-item-blank`,`
|
| 44 |
+
grid-area: blank;
|
| 45 |
+
min-height: var(--n-blank-height);
|
| 46 |
+
`),C(`auto-label-width`,[_(`form-item-label`,`white-space: nowrap;`)]),C(`left-labelled`,`
|
| 47 |
+
grid-template-areas:
|
| 48 |
+
"label blank"
|
| 49 |
+
"label feedback";
|
| 50 |
+
grid-template-columns: auto minmax(0, 1fr);
|
| 51 |
+
grid-template-rows: auto 1fr;
|
| 52 |
+
align-items: flex-start;
|
| 53 |
+
`,[_(`form-item-label`,`
|
| 54 |
+
display: grid;
|
| 55 |
+
grid-template-columns: 1fr auto;
|
| 56 |
+
min-height: var(--n-blank-height);
|
| 57 |
+
height: auto;
|
| 58 |
+
box-sizing: border-box;
|
| 59 |
+
flex-shrink: 0;
|
| 60 |
+
flex-grow: 0;
|
| 61 |
+
`,[C(`reverse-columns-space`,`
|
| 62 |
+
grid-template-columns: auto 1fr;
|
| 63 |
+
`),C(`left-mark`,`
|
| 64 |
+
grid-template-areas:
|
| 65 |
+
"mark text"
|
| 66 |
+
". text";
|
| 67 |
+
`),C(`right-mark`,`
|
| 68 |
+
grid-template-areas:
|
| 69 |
+
"text mark"
|
| 70 |
+
"text .";
|
| 71 |
+
`),C(`right-hanging-mark`,`
|
| 72 |
+
grid-template-areas:
|
| 73 |
+
"text mark"
|
| 74 |
+
"text .";
|
| 75 |
+
`),T(`text`,`
|
| 76 |
+
grid-area: text;
|
| 77 |
+
`),T(`asterisk`,`
|
| 78 |
+
grid-area: mark;
|
| 79 |
+
align-self: end;
|
| 80 |
+
`)])]),C(`top-labelled`,`
|
| 81 |
+
grid-template-areas:
|
| 82 |
+
"label"
|
| 83 |
+
"blank"
|
| 84 |
+
"feedback";
|
| 85 |
+
grid-template-rows: minmax(var(--n-label-height), auto) 1fr;
|
| 86 |
+
grid-template-columns: minmax(0, 100%);
|
| 87 |
+
`,[C(`no-label`,`
|
| 88 |
+
grid-template-areas:
|
| 89 |
+
"blank"
|
| 90 |
+
"feedback";
|
| 91 |
+
grid-template-rows: 1fr;
|
| 92 |
+
`),_(`form-item-label`,`
|
| 93 |
+
display: flex;
|
| 94 |
+
align-items: flex-start;
|
| 95 |
+
justify-content: var(--n-label-text-align);
|
| 96 |
+
`)]),_(`form-item-blank`,`
|
| 97 |
+
box-sizing: border-box;
|
| 98 |
+
display: flex;
|
| 99 |
+
align-items: center;
|
| 100 |
+
position: relative;
|
| 101 |
+
`),_(`form-item-feedback-wrapper`,`
|
| 102 |
+
grid-area: feedback;
|
| 103 |
+
box-sizing: border-box;
|
| 104 |
+
min-height: var(--n-feedback-height);
|
| 105 |
+
font-size: var(--n-feedback-font-size);
|
| 106 |
+
line-height: 1.25;
|
| 107 |
+
transform-origin: top left;
|
| 108 |
+
`,[e(`&:not(:empty)`,`
|
| 109 |
+
padding: var(--n-feedback-padding);
|
| 110 |
+
`),_(`form-item-feedback`,{transition:`color .3s var(--n-bezier)`,color:`var(--n-feedback-text-color)`},[C(`warning`,{color:`var(--n-feedback-text-color-warning)`}),C(`error`,{color:`var(--n-feedback-text-color-error)`}),Fe({fromOffset:`-3px`,enterDuration:`.3s`,leaveDuration:`.2s`})])])]);function Le(e){let n=l(O,null),{mergedComponentPropsRef:r}=y(e);return{mergedSize:t(()=>e.size===void 0?n?.props.size===void 0?r?.value?.Form?.size||`medium`:n.props.size:e.size)}}function Re(e){let n=l(O,null),r=t(()=>{let{labelPlacement:t}=e;return t===void 0?n?.props.labelPlacement?n.props.labelPlacement:`top`:t}),i=t(()=>r.value===`left`&&(e.labelWidth===`auto`||n?.props.labelWidth===`auto`)),a=t(()=>{if(r.value===`top`)return;let{labelWidth:t}=e;if(t!==void 0&&t!==`auto`)return D(t);if(i.value){let e=n?.maxChildLabelWidthRef.value;return e===void 0?void 0:D(e)}if(n?.props.labelWidth!==void 0)return D(n.props.labelWidth)}),o=t(()=>{let{labelAlign:t}=e;if(t)return t;if(n?.props.labelAlign)return n.props.labelAlign}),s=t(()=>[e.labelProps?.style,e.labelStyle,{width:a.value}]),c=t(()=>{let{showRequireMark:t}=e;return t===void 0?n?.props.showRequireMark:t}),u=t(()=>{let{requireMarkPlacement:t}=e;return t===void 0?n?.props.requireMarkPlacement||`right`:t}),d=S(!1),f=S(!1);return{validationErrored:d,validationWarned:f,mergedLabelStyle:s,mergedLabelPlacement:r,mergedLabelAlign:o,mergedShowRequireMark:c,mergedRequireMarkPlacement:u,mergedValidationStatus:t(()=>{let{validationStatus:t}=e;if(t!==void 0)return t;if(d.value)return`error`;if(f.value)return`warning`}),mergedShowFeedback:t(()=>{let{showFeedback:t}=e;return t===void 0?n?.props.showFeedback===void 0?!0:n.props.showFeedback:t}),mergedShowLabel:t(()=>{let{showLabel:t}=e;return t===void 0?n?.props.showLabel===void 0?!0:n.props.showLabel:t}),isAutoLabelWidth:i}}function ze(e){let n=l(O,null),i=t(()=>{let{rulePath:t}=e;if(t!==void 0)return t;let{path:n}=e;if(n!==void 0)return n}),a=t(()=>{let t=[],{rule:a}=e;if(a!==void 0&&(Array.isArray(a)?t.push(...a):t.push(a)),n){let{rules:e}=n.props,{value:a}=i;if(e!==void 0&&a!==void 0){let n=r(e,a);n!==void 0&&(Array.isArray(n)?t.push(...n):t.push(n))}}return t}),o=t(()=>a.value.some(e=>e.required));return{mergedRules:a,mergedRequired:t(()=>o.value||e.required)}}var Be=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Ve=Object.assign(Object.assign({},x.props),{label:String,labelWidth:[Number,String],labelStyle:[String,Object],labelAlign:String,labelPlacement:String,path:String,first:Boolean,rulePath:String,required:Boolean,showRequireMark:{type:Boolean,default:void 0},requireMarkPlacement:String,showFeedback:{type:Boolean,default:void 0},rule:[Object,Array],size:String,ignorePathChange:Boolean,validationStatus:String,feedback:String,feedbackClass:String,feedbackStyle:[String,Object],showLabel:{type:Boolean,default:void 0},labelProps:Object,contentClass:String,contentStyle:[String,Object]});v(Ve);function He(e,t){return(...n)=>{try{let r=e(...n);return!t&&(typeof r==`boolean`||r instanceof Error||Array.isArray(r))||r?.then?r:(r===void 0||E(`form-item/validate`,`You return a ${typeof r} typed value in the validator method, which is not recommended. Please use ${t?"`Promise`":"`boolean`, `Error` or `Promise`"} typed value instead.`),!0)}catch(e){E(`form-item/validate`,"An error is catched in the validation, so the validation won't be done. Your callback in `validate` method of `n-form` or `n-form-item` won't be called in this validation."),console.error(e);return}}}var Ue=n({name:`FormItem`,props:Ve,slots:Object,setup(e){ne(re,`formItems`,w(e,`path`));let{mergedClsPrefixRef:n,inlineThemeDisabled:i}=y(e),a=l(O,null),s=Le(e),c=Re(e),{validationErrored:m,validationWarned:h}=c,{mergedRequired:g,mergedRules:_}=ze(e),{mergedSize:v}=s,{mergedLabelPlacement:C,mergedLabelAlign:T,mergedRequireMarkPlacement:E}=c,D=S([]),k=S(d()),A=S(null),ie=a?w(a.props,`disabled`):S(!1),j=x(`Form`,`-form-item`,Ie,p,e,n);f(w(e,`path`),()=>{e.ignorePathChange||N()});function M(){if(!c.isAutoLabelWidth.value)return;let e=A.value;if(e!==null){let t=e.style.whiteSpace;e.style.whiteSpace=`nowrap`,e.style.width=``,a?.deriveMaxChildLabelWidth(Number(getComputedStyle(e).width.slice(0,-2))),e.style.whiteSpace=t}}function N(){D.value=[],m.value=!1,h.value=!1,e.feedback&&(k.value=d())}let P=(...t)=>Be(this,[...t],void 0,function*(t=null,n=()=>!0,i={suppressWarning:!0}){let{path:o}=e;i?i.first||=e.first:i={};let{value:s}=_,c=a?r(a.props.model,o||``):void 0,l={},u={},d=(t?s.filter(e=>Array.isArray(e.trigger)?e.trigger.includes(t):e.trigger===t):s).filter(n).map((e,t)=>{let n=Object.assign({},e);if(n.validator&&=He(n.validator,!1),n.asyncValidator&&=He(n.asyncValidator,!0),n.renderMessage){let e=`__renderMessage__${t}`;u[e]=n.message,n.message=e,l[e]=n.renderMessage}return n}),f=d.filter(e=>e.level!==`warning`),p=d.filter(e=>e.level===`warning`),g={valid:!0,errors:void 0,warnings:void 0};if(!d.length)return g;let v=o??`__n_no_path__`,y=new Q({[v]:f}),b=new Q({[v]:p}),{validateMessages:x}=a?.props||{};x&&(y.messages(x),b.messages(x));let S=e=>{D.value=e.map(e=>{let t=e?.message||``;return{key:t,render:()=>t.startsWith(`__renderMessage__`)?l[t]():t}}),e.forEach(e=>{e.message?.startsWith(`__renderMessage__`)&&(e.message=u[e.message])})};if(f.length){let e=yield new Promise(e=>{y.validate({[v]:c},i,e)});e?.length&&(g.valid=!1,g.errors=e,S(e))}if(p.length&&!g.errors){let e=yield new Promise(e=>{b.validate({[v]:c},i,e)});e?.length&&(S(e),g.warnings=e)}return!g.errors&&!g.warnings?N():(m.value=!!g.errors,h.value=!!g.warnings),g});function ae(){P(`blur`)}function F(){P(`change`)}function oe(){P(`focus`)}function I(){P(`input`)}function se(e,t){return Be(this,void 0,void 0,function*(){let n,r,i,a;return typeof e==`string`?(n=e,r=t):typeof e==`object`&&e&&(n=e.trigger,r=e.callback,i=e.shouldRuleBeApplied,a=e.options),yield new Promise((e,t)=>{P(n,i,a).then(({valid:n,errors:i,warnings:a})=>{n?(r&&r(void 0,{warnings:a}),e({warnings:a})):(r&&r(i,{warnings:a}),t(i))})})})}o(te,{path:w(e,`path`),disabled:ie,mergedSize:s.mergedSize,mergedValidationStatus:c.mergedValidationStatus,restoreValidation:N,handleContentBlur:ae,handleContentChange:F,handleContentFocus:oe,handleContentInput:I});let ce={validate:se,restoreValidation:N,internalValidate:P,invalidateLabelWidth:M};u(M);let L=t(()=>{let{value:e}=v,{value:t}=C,n=t===`top`?`vertical`:`horizontal`,{common:{cubicBezierEaseInOut:r},self:{labelTextColor:i,asteriskColor:a,lineHeight:o,feedbackTextColor:s,feedbackTextColorWarning:c,feedbackTextColorError:l,feedbackPadding:u,labelFontWeight:d,[b(`labelHeight`,e)]:f,[b(`blankHeight`,e)]:p,[b(`feedbackFontSize`,e)]:m,[b(`feedbackHeight`,e)]:h,[b(`labelPadding`,n)]:g,[b(`labelTextAlign`,n)]:_,[b(b(`labelFontSize`,t),e)]:y}}=j.value,x=T.value??_;return t===`top`&&(x=x===`right`?`flex-end`:`flex-start`),{"--n-bezier":r,"--n-line-height":o,"--n-blank-height":p,"--n-label-font-size":y,"--n-label-text-align":x,"--n-label-height":f,"--n-label-padding":g,"--n-label-font-weight":d,"--n-asterisk-color":a,"--n-label-text-color":i,"--n-feedback-padding":u,"--n-feedback-font-size":m,"--n-feedback-height":h,"--n-feedback-text-color":s,"--n-feedback-text-color-warning":c,"--n-feedback-text-color-error":l}}),R=i?ee(`form-item`,t(()=>`${v.value[0]}${C.value[0]}${T.value?.[0]||``}`),L,e):void 0,le=t(()=>C.value===`left`&&E.value===`left`&&T.value===`left`);return Object.assign(Object.assign(Object.assign(Object.assign({labelElementRef:A,mergedClsPrefix:n,mergedRequired:g,feedbackId:k,renderExplains:D,reverseColSpace:le},c),s),ce),{cssVars:i?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,mergedShowLabel:n,mergedShowRequireMark:r,mergedRequireMarkPlacement:i,onRender:a}=this,o=r===void 0?this.mergedRequired:r;return a?.(),s(`div`,{class:[`${t}-form-item`,this.themeClass,`${t}-form-item--${this.mergedSize}-size`,`${t}-form-item--${this.mergedLabelPlacement}-labelled`,this.isAutoLabelWidth&&`${t}-form-item--auto-label-width`,!n&&`${t}-form-item--no-label`],style:this.cssVars},n&&(()=>{let e=this.$slots.label?this.$slots.label():this.label;if(!e)return null;let n=s(`span`,{class:`${t}-form-item-label__text`},e),r=o?s(`span`,{class:`${t}-form-item-label__asterisk`},i===`left`?`*\xA0`:`\xA0*`):i===`right-hanging`&&s(`span`,{class:`${t}-form-item-label__asterisk-placeholder`},`\xA0*`),{labelProps:a}=this;return s(`label`,Object.assign({},a,{class:[a?.class,`${t}-form-item-label`,`${t}-form-item-label--${i}-mark`,this.reverseColSpace&&`${t}-form-item-label--reverse-columns-space`],style:this.mergedLabelStyle,ref:`labelElementRef`}),i===`left`?[r,n]:[n,r])})(),s(`div`,{class:[`${t}-form-item-blank`,this.contentClass,this.mergedValidationStatus&&`${t}-form-item-blank--${this.mergedValidationStatus}`],style:this.contentStyle},e),this.mergedShowFeedback?s(`div`,{key:this.feedbackId,style:this.feedbackStyle,class:[`${t}-form-item-feedback-wrapper`,this.feedbackClass]},s(m,{name:`fade-down-transition`,mode:`out-in`},{default:()=>{let{mergedValidationStatus:n}=this;return g(e.feedback,e=>{let{feedback:r}=this,i=e||r?s(`div`,{key:`__feedback__`,class:`${t}-form-item-feedback__line`},e||r):this.renderExplains.length?this.renderExplains?.map(({key:e,render:n})=>s(`div`,{key:e,class:`${t}-form-item-feedback__line`},n())):null;return i?n===`warning`?s(`div`,{key:`controlled-warning`,class:`${t}-form-item-feedback ${t}-form-item-feedback--warning`},i):n===`error`?s(`div`,{key:`controlled-error`,class:`${t}-form-item-feedback ${t}-form-item-feedback--error`},i):n===`success`?s(`div`,{key:`controlled-success`,class:`${t}-form-item-feedback ${t}-form-item-feedback--success`},i):s(`div`,{key:`controlled-default`,class:`${t}-form-item-feedback`},i):null})}})):null)}});export{ie as n,Ue as t};
|
webui/assets/GatewaysView-B2c9soUv.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-d70aa8a3]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-d70aa8a3]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.gateways-view[data-v-d70aa8a3]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.gateways-content[data-v-d70aa8a3]{flex:1;padding:20px;overflow-y:auto}.empty-state[data-v-d70aa8a3]{text-align:center;color:var(--text-muted);padding:40px 0}.gateway-list[data-v-d70aa8a3]{flex-direction:column;gap:12px;display:flex}.gateway-card[data-v-d70aa8a3]{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;justify-content:space-between;align-items:center;padding:16px 20px;transition:border-color .15s;display:flex}.gateway-card[data-v-d70aa8a3]:hover{border-color:var(--text-muted)}.gateway-name[data-v-d70aa8a3]{color:var(--text-primary);margin-bottom:4px;font-size:14px;font-weight:600}.gateway-meta[data-v-d70aa8a3]{gap:12px;display:flex}.meta-item[data-v-d70aa8a3]{color:var(--text-muted);font-size:12px}.gateway-actions[data-v-d70aa8a3]{align-items:center;gap:8px;display:flex}
|
webui/assets/GatewaysView-BxceJN_D.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ar as e,Fr as t,Gr as n,I as r,Nr as i,Or as a,Pr as o,Qr as s,Ur as c,ai as l,c as u,ci as d,gr as f,jr as p,k as m,lr as h,ni as g,pr as _,qr as v,u as y,wr as b,y as x}from"./index-Cl8-DFW_.js";async function S(){return(await _(`/api/hermes/gateways`)).gateways}async function C(e){return(await _(`/api/hermes/gateways/${e}/start`,{method:`POST`})).gateway}async function w(e){await _(`/api/hermes/gateways/${e}/stop`,{method:`POST`})}var T=f(`gateways`,()=>{let e=g([]),t=g(!1);async function n(){t.value=!0;try{let t=await S();e.value=Array.isArray(t)?t:Object.values(t||{})}finally{t.value=!1}}async function r(n){t.value=!0;try{let t=await C(n),r=e.value.findIndex(e=>e.profile===n);r>=0?e.value[r]=t:e.value.push(t)}finally{t.value=!1}}async function i(n){t.value=!0;try{await w(n);let t=e.value.find(e=>e.profile===n);t&&(t.running=!1,t.pid=void 0)}finally{t.value=!1}}return{gateways:e,loading:t,fetchStatus:n,start:r,stop:i}}),E={class:`gateways-view`},D={class:`page-header`},O={class:`header-title`},k={class:`gateways-content`},A={key:0,class:`empty-state`},j={key:1,class:`gateway-list`},M={class:`gateway-info`},N={class:`gateway-name`},P={class:`gateway-meta`},F={class:`meta-item`},I={key:0,class:`meta-item`},L={class:`gateway-actions`},R=u(t({__name:`GatewaysView`,setup(t){let{t:u}=h(),f=x(),g=T();c(()=>{g.fetchStatus()});async function _(e,t){try{t?(await g.stop(e),f.success(`${u(`gateways.stopped`)}: ${e}`)):(await g.start(e),f.success(`${u(`gateways.started`)}: ${e}`))}catch(e){f.error(e.message)}}return(t,c)=>(n(),p(`div`,E,[a(`header`,D,[a(`h2`,O,d(l(u)(`gateways.title`)),1)]),a(`div`,k,[o(l(y),{show:l(g).loading,size:`large`},{default:s(()=>[l(g).gateways.length===0?(n(),p(`div`,A,d(l(u)(`common.noData`)),1)):(n(),p(`div`,j,[(n(!0),p(b,null,v(l(g).gateways,t=>(n(),p(`div`,{key:t.profile,class:`gateway-card`},[a(`div`,M,[a(`div`,N,d(t.profile),1),a(`div`,P,[a(`span`,F,d(t.host)+`:`+d(t.port),1),t.pid?(n(),p(`span`,I,`PID: `+d(t.pid),1)):e(``,!0)])]),a(`div`,L,[o(l(r),{type:t.running?`success`:`default`,size:`small`,round:``},{default:s(()=>[i(d(t.running?l(u)(`gateways.running`):l(u)(`gateways.stopped`)),1)]),_:2},1032,[`type`]),o(l(m),{size:`small`,type:t.running?`warning`:`primary`,round:``,onClick:e=>_(t.profile,t.running)},{default:s(()=>[i(d(t.running?l(u)(`common.stop`):l(u)(`common.start`)),1)]),_:2},1032,[`type`,`onClick`])])]))),128))]))]),_:1},8,[`show`])])]))}}),[[`__scopeId`,`data-v-d70aa8a3`]]);export{R as default};
|
webui/assets/GroupChatView-8G8m7Tft.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
webui/assets/GroupChatView-CjrsrmTX.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-0a07afd6]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-0a07afd6]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.group-message[data-v-0a07afd6]{gap:10px;padding:2px 0;display:flex}.group-message.agent[data-v-0a07afd6],.group-message.self[data-v-0a07afd6]{flex-direction:row-reverse}.group-message.agent .msg-body[data-v-0a07afd6],.group-message.self .msg-body[data-v-0a07afd6]{align-items:flex-end}.group-message.agent .msg-header[data-v-0a07afd6],.group-message.self .msg-header[data-v-0a07afd6]{flex-direction:row-reverse}.group-message.agent .msg-content.agent-content[data-v-0a07afd6]{background-color:rgba(var(--accent-primary-rgb), .06)}.group-message.self .msg-content[data-v-0a07afd6]{background-color:rgba(var(--accent-primary-rgb), .1)}.avatar[data-v-0a07afd6]{border-radius:8px;flex-shrink:0;width:36px;height:36px;margin-top:2px;overflow:hidden}.avatar[data-v-0a07afd6] svg{width:36px;height:36px}.msg-body[data-v-0a07afd6]{flex-direction:column;min-width:0;max-width:85%;display:flex}.msg-header[data-v-0a07afd6]{align-items:center;gap:8px;padding-bottom:2px;display:flex}.msg-header .sender-name[data-v-0a07afd6]{color:var(--text-primary);font-size:13px;font-weight:600}.msg-header .agent-desc[data-v-0a07afd6]{color:var(--text-muted);font-size:11px;font-style:italic}.msg-time[data-v-0a07afd6]{color:var(--text-muted);opacity:.6;margin-top:2px;font-size:12px}.msg-content[data-v-0a07afd6]{color:var(--text-primary);background-color:var(--msg-user-bg);word-break:break-word;overflow-wrap:break-word;border-radius:10px;padding:10px 14px;font-size:14px;line-height:1.65}.msg-content[data-v-0a07afd6] .mention-highlight{color:#409eff;cursor:default;font-weight:600}[data-v-abded617]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-abded617]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.message-list[data-v-abded617]{background-color:var(--bg-card);flex-direction:column;flex:1;gap:12px;padding:16px 20px;display:flex;overflow-y:auto}.empty-state[data-v-abded617]{color:var(--text-muted);opacity:.4;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:12px;display:flex}.empty-state p[data-v-abded617]{font-size:14px}[data-v-d354da76]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-d354da76]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.chat-input-area[data-v-d354da76]{border-top:1px solid var(--border-color);flex-shrink:0;padding:20px 20px 16px}.typing-dots[data-v-d354da76]{align-items:center;gap:2px;display:inline-flex}.typing-dots span[data-v-d354da76]{background-color:var(--text-muted);border-radius:50%;width:4px;height:4px;animation:1.2s infinite typing-bounce-d354da76;display:block}.typing-dots span[data-v-d354da76]:nth-child(2){animation-delay:.2s}.typing-dots span[data-v-d354da76]:nth-child(3){animation-delay:.4s}@keyframes typing-bounce-d354da76{0%,60%,to{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}.input-wrapper[data-v-d354da76]{background-color:var(--bg-input);border:1px solid var(--border-color);border-radius:10px;align-items:center;gap:10px;padding:10px 12px;transition:border-color .15s,background-color .15s;display:flex}.input-wrapper[data-v-d354da76]:focus-within{border-color:var(--accent-primary)}.dark .input-wrapper[data-v-d354da76]{background-color:#333}.input-textarea[data-v-d354da76]{color:var(--text-primary);resize:none;background:0 0;border:none;outline:none;flex:1;min-height:20px;max-height:100px;font-family:Inter,system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.5;overflow-y:auto}.input-textarea[data-v-d354da76]::placeholder{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.input-actions[data-v-d354da76]{flex-shrink:0;align-items:center;gap:6px;display:flex}[data-v-f150f087]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-f150f087]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.create-form .form-group[data-v-f150f087]{margin-bottom:16px}.form-label[data-v-f150f087]{color:var(--text-secondary);margin-bottom:6px;font-size:13px;font-weight:500;display:block}.form-hint[data-v-f150f087]{color:var(--text-muted);margin:4px 0 0;font-size:11px}.code-row[data-v-f150f087]{align-items:center;gap:8px;display:flex}.compression-collapse[data-v-f150f087]{margin-bottom:16px}.compression-fields[data-v-f150f087]{padding-top:8px}[data-v-9cda5948]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-9cda5948]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.group-chat-panel[data-v-9cda5948]{height:100%;display:flex;position:relative;overflow:hidden}.sidebar-backdrop[data-v-9cda5948]{display:none}@media (width<=768px){.sidebar-backdrop[data-v-9cda5948]{z-index:99;opacity:0;pointer-events:none;background:#0006;transition:opacity .15s;display:block;position:absolute;inset:0}.sidebar-backdrop.active[data-v-9cda5948]{opacity:1;pointer-events:auto}}.status-bar[data-v-9cda5948]{flex-shrink:0;padding:6px 20px;overflow:hidden}.context-status-list[data-v-9cda5948]{flex-wrap:nowrap;gap:8px;display:flex;overflow-x:auto}.context-status-list[data-v-9cda5948]::-webkit-scrollbar{height:0}.context-status[data-v-9cda5948]{color:var(--text-secondary);background-color:var(--bg-card-hover);border-radius:6px;align-items:center;gap:6px;padding:4px 10px;font-size:12px;display:inline-flex}.dark .context-status[data-v-9cda5948]{background-color:#ffffff0f}.typing-indicator[data-v-9cda5948]{color:var(--text-muted);align-items:center;gap:6px;font-size:12px;display:flex}.typing-dots[data-v-9cda5948]{align-items:center;gap:2px;display:inline-flex}.typing-dots span[data-v-9cda5948]{background-color:var(--text-muted);border-radius:50%;width:4px;height:4px;animation:1.2s infinite typing-bounce-9cda5948;display:block}.typing-dots span[data-v-9cda5948]:nth-child(2){animation-delay:.2s}.typing-dots span[data-v-9cda5948]:nth-child(3){animation-delay:.4s}@keyframes typing-bounce-9cda5948{0%,60%,to{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}.room-sidebar[data-v-9cda5948]{border-right:1px solid var(--border-color);flex-direction:column;flex-shrink:0;width:220px;display:flex}.sidebar-header[data-v-9cda5948]{flex-shrink:0;justify-content:space-between;align-items:center;padding:12px;display:flex}.sidebar-header .sidebar-title[data-v-9cda5948]{color:var(--text-primary);font-size:15px;font-weight:600}.sidebar-header .sidebar-actions[data-v-9cda5948]{gap:4px;display:flex}.room-list[data-v-9cda5948]{flex:1;padding:8px;overflow-y:auto}.room-item[data-v-9cda5948]{cursor:pointer;border-radius:6px;align-items:center;gap:10px;padding:10px;transition:background-color .15s;display:flex}.room-item[data-v-9cda5948]:hover{background-color:rgba(var(--accent-primary-rgb), .06)}.room-item.active[data-v-9cda5948]{background-color:rgba(var(--accent-primary-rgb), .12)}.room-item .room-icon[data-v-9cda5948]{color:var(--text-muted);flex-shrink:0}.room-item .room-info[data-v-9cda5948]{flex-direction:column;flex:1;min-width:0;display:flex}.room-item .room-name[data-v-9cda5948]{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.room-item .room-code[data-v-9cda5948]{color:var(--text-muted);font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:11px}.room-item .room-tokens[data-v-9cda5948]{color:var(--text-muted);font-size:11px}.room-item .room-delete-btn[data-v-9cda5948]{width:24px;height:24px;color:var(--text-muted);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s,color .15s,background-color .15s;display:flex}.room-item .room-delete-btn[data-v-9cda5948]:hover{color:var(--error);background-color:rgba(var(--error-rgb), .1)}.room-item:hover .room-delete-btn[data-v-9cda5948]{opacity:1}.empty-rooms[data-v-9cda5948]{text-align:center;color:var(--text-muted);padding:20px 12px;font-size:13px}.chat-main[data-v-9cda5948]{background-color:#0000;flex-direction:column;flex:1;min-width:0;display:flex}.chat-header[data-v-9cda5948]{border-bottom:1px solid var(--border-color);align-items:center;gap:12px;padding:21px 20px;display:flex}.chat-header .room-title-text[data-v-9cda5948]{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:16px;font-weight:600;overflow:hidden}.chat-header .header-info[data-v-9cda5948]{flex-shrink:0;align-items:center;gap:8px;display:flex}.chat-header .member-count[data-v-9cda5948]{color:var(--text-muted);font-size:12px}.avatar-stack[data-v-9cda5948]{cursor:pointer}.avatar-stack-inner[data-v-9cda5948]{align-items:center;display:flex}.avatar-stack-item[data-v-9cda5948]{border:2px solid var(--bg-card);background-color:var(--bg-secondary);border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;margin-left:-12px;transition:transform .15s;display:flex;overflow:hidden}.avatar-stack-item[data-v-9cda5948]:first-child{margin-left:0}.avatar-stack-item[data-v-9cda5948]:hover{transform:translateY(-2px);z-index:100!important}.avatar-stack-more[data-v-9cda5948]{border:2px solid var(--bg-card);background-color:var(--bg-secondary);width:28px;height:28px;color:var(--text-secondary);border-radius:50%;justify-content:center;align-items:center;margin-left:-12px;font-size:11px;font-weight:600;display:flex}.agent-avatar[data-v-9cda5948]{justify-content:center;align-items:center;width:28px;height:28px;display:flex}.agent-avatar[data-v-9cda5948] svg{width:100%;height:100%}.agent-popover[data-v-9cda5948]{max-height:300px;overflow-y:auto}.agent-popover-title[data-v-9cda5948]{color:var(--text-muted);border-bottom:1px solid var(--border-color);margin-bottom:8px;padding:0 0 8px;font-size:12px;font-weight:600}.agent-popover-item[data-v-9cda5948]{border-radius:6px;align-items:center;gap:8px;padding:6px 4px;transition:background-color .15s;display:flex}.agent-popover-item[data-v-9cda5948]:hover{background-color:rgba(var(--accent-primary-rgb), .06)}.agent-popover-item .agent-popover-info[data-v-9cda5948]{flex:1;min-width:0}.agent-popover-item .agent-popover-name[data-v-9cda5948]{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:13px;display:block;overflow:hidden}.agent-popover-item .agent-popover-profile[data-v-9cda5948]{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;font-size:11px;display:block;overflow:hidden}.agent-popover-item .agent-popover-remove[data-v-9cda5948]{width:24px;height:24px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;transition:all .15s;display:flex}.agent-popover-item .agent-popover-remove[data-v-9cda5948]:hover{color:var(--error);background-color:#c8323214}.no-room[data-v-9cda5948]{color:var(--text-muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;display:flex}.no-room .no-room-icon[data-v-9cda5948]{opacity:.3}.no-room p[data-v-9cda5948]{font-size:14px}.icon-btn[data-v-9cda5948]{width:32px;height:32px;color:var(--text-secondary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:all .15s;display:flex}.icon-btn[data-v-9cda5948]:hover{background-color:rgba(var(--accent-primary-rgb), .08);color:var(--text-primary)}.modal-backdrop[data-v-9cda5948]{z-index:1000;background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal[data-v-9cda5948]{background:var(--bg-card);border-radius:14px;width:400px;max-width:90vw;padding:24px;box-shadow:0 8px 32px #0000001f}.modal h3[data-v-9cda5948]{color:var(--text-primary);margin:0 0 20px;font-size:16px;font-weight:600}.form-group[data-v-9cda5948]{margin-bottom:16px}.modal-actions[data-v-9cda5948]{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}.form-hint[data-v-9cda5948]{color:var(--text-muted);margin:4px 0 0;font-size:11px}.connection-dot[data-v-9cda5948]{border-radius:50%;flex-shrink:0;width:8px;height:8px}.connection-dot.connected[data-v-9cda5948]{background-color:var(--success);box-shadow:0 0 6px rgba(var(--success-rgb), .5)}.connection-dot.disconnected[data-v-9cda5948]{background-color:var(--error)}@media (width<=768px){.room-sidebar[data-v-9cda5948]{z-index:100;position:absolute;top:0;bottom:0;left:0;box-shadow:4px 0 16px #0000001a}.chat-header[data-v-9cda5948]{padding-left:56px}}.group-chat-view[data-v-6a221d32]{height:calc(100 * var(--vh));flex-direction:column;display:flex}
|
webui/assets/InputNumber-P0oq6NtF.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./Add-D070kowG.js";import{$n as t,A as n,Bn as r,Br as i,Dr as a,Fr as o,Ln as s,Lr as c,N as l,P as u,U as d,Un as f,Xr as ee,cn as p,er as m,hn as h,in as te,it as g,j as _,ni as v,nn as ne,nt as y,on as b,ot as re,qn as ie,ri as ae,rt as x,st as oe}from"./index-Cl8-DFW_.js";var S=o({name:`Remove`,render(){return c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},c(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
|
| 2 |
+
fill: none;
|
| 3 |
+
stroke: currentColor;
|
| 4 |
+
stroke-linecap: round;
|
| 5 |
+
stroke-linejoin: round;
|
| 6 |
+
stroke-width: 32px;
|
| 7 |
+
`}))}});function C(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var se=x({name:`InputNumber`,common:d,peers:{Button:_,Input:u},self:C}),w=t([m(`input-number-suffix`,`
|
| 8 |
+
display: inline-block;
|
| 9 |
+
margin-right: 10px;
|
| 10 |
+
`),m(`input-number-prefix`,`
|
| 11 |
+
display: inline-block;
|
| 12 |
+
margin-left: 10px;
|
| 13 |
+
`)]);function T(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function E(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function D(e){return e==null?!0:!Number.isNaN(e)}function O(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function k(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var A=800,j=100,M=o({name:`InputNumber`,props:Object.assign(Object.assign({},g.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:o,mergedComponentPropsRef:c}=te(e),l=g(`InputNumber`,`-input-number`,w,se,e,n),{localeRef:u}=oe(`InputNumber`),d=ne(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:c?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:p,mergedDisabledRef:m,mergedStatusRef:_}=d,y=v(null),b=v(null),x=v(null),S=v(e.defaultValue),C=s(ae(e,`value`),S),M=v(``),N=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},ce=t=>{let n=[e.min,e.max,e.step,t].map(e=>e===void 0?0:N(e));return Math.max(...n)},le=r(()=>{let{placeholder:t}=e;return t===void 0?u.value.placeholder:t}),P=r(()=>{let t=k(e.step);return t===null||t===0?1:Math.abs(t)}),F=r(()=>{let t=k(e.min);return t===null?null:t}),I=r(()=>{let t=k(e.max);return t===null?null:t}),L=()=>{let{value:t}=C;if(D(t)){let{format:n,precision:r}=e;n?M.value=n(t):t===null||r===void 0||N(t)>r?M.value=O(t,void 0):M.value=O(t,r)}else M.value=String(t)};L();let R=t=>{let{value:n}=C;if(t===n){L();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=e,{nTriggerFormInput:o,nTriggerFormChange:s}=d;a&&h(a,t),i&&h(i,t),r&&h(r,t),S.value=t,o(),s()},z=({offset:t,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=M;if(i&&E(a))return!1;let o=(e.parse||T)(a);if(o===null)return n&&R(null),null;if(D(o)){let a=N(o),{precision:s}=e;if(s!==void 0&&s<a&&!r)return!1;let c=Number.parseFloat((o+t).toFixed(s??ce(o)));if(D(c)){let{value:t}=I,{value:r}=F;if(t!==null&&c>t){if(!n||i)return!1;c=t}if(r!==null&&c<r){if(!n||i)return!1;c=r}return e.validator&&!e.validator(c)?!1:(n&&R(c),c)}}return!1},B=r(()=>z({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),V=r(()=>{let{value:t}=C;if(e.validator&&t===null)return!1;let{value:n}=P;return z({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),H=r(()=>{let{value:t}=C;if(e.validator&&t===null)return!1;let{value:n}=P;return z({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function U(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=d;n&&h(n,t),r()}function ue(t){if(t.target===y.value?.wrapperElRef)return;let n=z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(n!==!1){let e=y.value?.inputElRef;e&&(e.value=String(n||``)),C.value===n&&L()}else L();let{onBlur:r}=e,{nTriggerFormBlur:a}=d;r&&h(r,t),a(),i(()=>{L()})}function W(t){let{onClear:n}=e;n&&h(n,t)}function G(){let{value:t}=H;if(!t){$();return}let{value:n}=C;if(n===null)e.validator||R(q());else{let{value:e}=P;z({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function K(){let{value:t}=V;if(!t){Z();return}let{value:n}=C;if(n===null)e.validator||R(q());else{let{value:e}=P;z({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let de=U,fe=ue;function q(){if(e.validator)return null;let{value:t}=F,{value:n}=I;return t===null?n===null?0:Math.min(0,n):Math.max(0,t)}function pe(e){W(e),R(null)}function me(e){var t;x.value?.$el.contains(e.target)&&e.preventDefault(),b.value?.$el.contains(e.target)&&e.preventDefault(),(t=y.value)==null||t.activate()}let J=null,Y=null,X=null;function Z(){X&&=(window.clearTimeout(X),null),J&&=(window.clearInterval(J),null)}let Q=null;function $(){Q&&=(window.clearTimeout(Q),null),Y&&=(window.clearInterval(Y),null)}function he(){Z(),X=window.setTimeout(()=>{J=window.setInterval(()=>{K()},j)},A),f(`mouseup`,document,Z,{once:!0})}function ge(){$(),Q=window.setTimeout(()=>{Y=window.setInterval(()=>{G()},j)},A),f(`mouseup`,document,$,{once:!0})}let _e=()=>{Y||G()},ve=()=>{J||K()};function ye(t){var n;if(t.key===`Enter`){if(t.target===y.value?.wrapperElRef)return;z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=y.value)==null||n.deactivate())}else if(t.key===`ArrowUp`){if(!H.value||e.keyboard.ArrowUp===!1)return;t.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&G()}else if(t.key===`ArrowDown`){if(!V.value||e.keyboard.ArrowDown===!1)return;t.preventDefault(),z({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&K()}}function be(t){M.value=t,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&z({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}ee(C,()=>{L()});let xe={focus:()=>y.value?.focus(),blur:()=>y.value?.blur(),select:()=>y.value?.select()},Se=re(`InputNumber`,o,n);return Object.assign(Object.assign({},xe),{rtlEnabled:Se,inputInstRef:y,minusButtonInstRef:b,addButtonInstRef:x,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:S,mergedValue:C,mergedPlaceholder:le,displayedValueInvalid:B,mergedSize:p,mergedDisabled:m,displayedValue:M,addable:H,minusable:V,mergedStatus:_,handleFocus:de,handleBlur:fe,handleClear:pe,handleMouseDown:me,handleAddClick:_e,handleMinusClick:ve,handleAddMousedown:ge,handleMinusMousedown:he,handleKeyDown:ye,handleUpdateDisplayedValue:be,mergedTheme:l,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:a(()=>{let{self:{iconColorDisabled:e}}=l.value,[t,n,r,i]=ie(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:t,$slots:r}=this,i=()=>c(n,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>b(r[`minus-icon`],()=>[c(y,{clsPrefix:t},{default:()=>c(S,null)})])}),a=()=>c(n,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>b(r[`add-icon`],()=>[c(y,{clsPrefix:t},{default:()=>c(e,null)})])});return c(`div`,{class:[`${t}-input-number`,this.rtlEnabled&&`${t}-input-number--rtl`]},c(l,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[i(),p(r.prefix,e=>e?c(`span`,{class:`${t}-input-number-prefix`},e):null)]:r.prefix?.call(r),suffix:()=>this.showButton?[p(r.suffix,e=>e?c(`span`,{class:`${t}-input-number-suffix`},e):null),this.buttonPlacement===`right`?i():null,a()]:r.suffix?.call(r)}))}});export{M as t};
|
webui/assets/JobsView-CuKEnltM.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jobs-BrAnck6c.js","assets/index-Cl8-DFW_.js","assets/chunk-Dlc7tRH4.js","assets/preload-helper-CPuF8Owr.js","assets/_baseFor-tDInUmcl.js","assets/create-EseJ7qR2.js","assets/app-IytcAxLh.js","assets/index-BTGffw30.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{t as e}from"./preload-helper-CPuF8Owr.js";import{n as t,t as n}from"./FormItem-DB8yIr9W.js";import{t as r}from"./InputNumber-P0oq6NtF.js";import{t as i}from"./Tooltip-DQzh27d-.js";import{Ar as a,Dr as o,E as s,Fr as c,Gr as l,Mr as u,N as d,Nr as f,Or as p,Pr as m,Qr as h,Ur as g,ai as _,b as v,c as y,ci as b,gr as x,jr as S,k as C,kr as w,lr as T,ni as E,oi as D,qr as O,u as k,wr as A,y as j}from"./index-Cl8-DFW_.js";import{a as M,c as N,i as P,n as F,o as I,s as L,t as ee}from"./jobs-BrAnck6c.js";function R(e,t){return e.job_id===t||e.id===t}var z=x(`jobs`,()=>{let e=E([]),t=E(!1);async function n(){t.value=!0;try{e.value=await P()}catch(e){console.error(`Failed to fetch jobs:`,e)}finally{t.value=!1}}async function r(t){let n=await ee(t);return e.value.unshift(n),n}async function i(t,n){let r=await N(t,n),i=e.value.findIndex(e=>R(e,t));return i!==-1&&(e.value[i]=r),r}async function a(t){await F(t),e.value=e.value.filter(e=>!R(e,t))}async function o(t){let n=await M(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}async function s(t){let n=await I(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}async function c(t){let n=await L(t),r=e.value.findIndex(e=>R(e,t));r!==-1&&(e.value[r]=n)}return{jobs:e,loading:t,fetchJobs:n,createJob:r,updateJob:i,deleteJob:a,pauseJob:o,resumeJob:s,runJob:c}}),B={class:`job-card`},V={class:`card-header`},H={class:`job-name`},U={class:`card-body`},W={class:`info-row`},G={class:`info-label`},K={class:`info-value mono`},q={class:`info-row`},J={class:`info-label`},Y={class:`info-value`},X={class:`info-row`},Z={class:`info-label`},Q={class:`info-value`},te={class:`info-row`},ne={class:`info-label`},re={class:`info-value`},ie={key:0,class:`info-row`},ae={class:`info-label`},oe={class:`info-value`},se={class:`card-actions`},ce=y(c({__name:`JobCard`,props:{job:{}},emits:[`edit`],setup(e,{emit:t}){let n=e,r=t,{t:s}=T(),c=z(),u=j(),d=o(()=>n.job.job_id||n.job.id),g=o(()=>n.job.state===`running`?s(`jobs.status.running`):n.job.state===`paused`?s(`jobs.status.paused`):n.job.enabled?s(`jobs.status.scheduled`):s(`jobs.status.disabled`)),v=o(()=>n.job.state===`running`?`info`:n.job.state===`paused`?`warning`:n.job.enabled?`success`:`error`),y=o(()=>{let e=n.job.schedule;return typeof e==`string`?e:e?.expr||n.job.schedule_display||`—`}),x=e=>e?new Date(e).toLocaleString():`—`;async function E(){try{await c.pauseJob(d.value),u.success(s(`jobs.jobPaused`))}catch(e){u.error(e.message)}}async function O(){try{await c.resumeJob(d.value),u.success(s(`jobs.jobResumed`))}catch(e){u.error(e.message)}}async function k(){try{await c.runJob(d.value),u.info(s(`jobs.jobTriggered`))}catch(e){u.error(e.message)}}async function M(){try{await c.deleteJob(d.value),u.success(s(`jobs.jobDeleted`))}catch(e){u.error(e.message)}}return(t,n)=>(l(),S(`div`,B,[p(`div`,V,[p(`h3`,H,b(e.job.name),1),p(`span`,{class:D([`status-badge`,v.value])},b(g.value),3)]),p(`div`,U,[p(`div`,W,[p(`span`,G,b(_(s)(`jobs.info.schedule`)),1),p(`code`,K,b(y.value),1)]),p(`div`,q,[p(`span`,J,b(_(s)(`jobs.info.lastRun`)),1),p(`span`,Y,[f(b(x(e.job.last_run_at))+` `,1),e.job.last_status?(l(),S(`span`,{key:0,class:D([`run-status`,{ok:e.job.last_status===`ok`,err:e.job.last_status!==`ok`}])},b(e.job.last_status===`ok`?_(s)(`common.ok`):e.job.last_status),3)):a(``,!0)])]),p(`div`,X,[p(`span`,Z,b(_(s)(`jobs.info.nextRun`)),1),p(`span`,Q,b(x(e.job.next_run_at)),1)]),p(`div`,te,[p(`span`,ne,b(_(s)(`jobs.info.deliver`)),1),p(`span`,re,[f(b(e.job.deliver),1),e.job.origin?(l(),S(A,{key:0},[f(` (`+b(e.job.origin.platform)+`)`,1)],64)):a(``,!0)])]),e.job.repeat?(l(),S(`div`,ie,[p(`span`,ae,b(_(s)(`jobs.info.repeat`)),1),p(`span`,oe,[typeof e.job.repeat==`string`?(l(),S(A,{key:0},[f(b(e.job.repeat),1)],64)):(l(),S(A,{key:1},[f(b(e.job.repeat.completed)+` / `+b(e.job.repeat.times??`∞`),1)],64))])])):a(``,!0)]),p(`div`,se,[e.job.state!==`paused`&&e.job.enabled?(l(),w(_(i),{key:0},{trigger:h(()=>[m(_(C),{size:`tiny`,quaternary:``,onClick:E},{default:h(()=>[f(b(_(s)(`jobs.action.pause`)),1)]),_:1})]),default:h(()=>[f(` `+b(_(s)(`jobs.action.pauseJob`)),1)]),_:1})):e.job.state===`paused`?(l(),w(_(i),{key:1},{trigger:h(()=>[m(_(C),{size:`tiny`,quaternary:``,onClick:O},{default:h(()=>[f(b(_(s)(`jobs.action.resume`)),1)]),_:1})]),default:h(()=>[f(` `+b(_(s)(`jobs.action.resumeJob`)),1)]),_:1})):a(``,!0),m(_(i),null,{trigger:h(()=>[m(_(C),{size:`tiny`,quaternary:``,onClick:k},{default:h(()=>[f(b(_(s)(`jobs.action.runNow`)),1)]),_:1})]),default:h(()=>[f(` `+b(_(s)(`jobs.action.triggerImmediately`)),1)]),_:1}),m(_(C),{size:`tiny`,quaternary:``,onClick:n[0]||=e=>r(`edit`,d.value)},{default:h(()=>[f(b(_(s)(`common.edit`)),1)]),_:1}),m(_(C),{size:`tiny`,quaternary:``,type:`error`,onClick:M},{default:h(()=>[f(b(_(s)(`common.delete`)),1)]),_:1})])]))}}),[[`__scopeId`,`data-v-5c958088`]]),le={key:0,class:`empty-state`},$={key:1,class:`jobs-grid`},ue=y(c({__name:`JobsPanel`,emits:[`edit`],setup(e,{emit:t}){let{t:n}=T(),r=t,i=z();return(e,t)=>_(i).jobs.length===0?(l(),S(`div`,le,[t[0]||=u(`<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" class="empty-icon" data-v-a0a8d138><rect x="3" y="4" width="18" height="18" rx="2" ry="2" data-v-a0a8d138></rect><line x1="16" y1="2" x2="16" y2="6" data-v-a0a8d138></line><line x1="8" y1="2" x2="8" y2="6" data-v-a0a8d138></line><line x1="3" y1="10" x2="21" y2="10" data-v-a0a8d138></line></svg>`,1),p(`p`,null,b(_(n)(`jobs.noJobs`)),1)])):(l(),S(`div`,$,[(l(!0),S(A,null,O(_(i).jobs,e=>(l(),w(ce,{key:e.id,job:e,onEdit:t=>r(`edit`,e.id)},null,8,[`job`,`onEdit`]))),128))]))}}),[[`__scopeId`,`data-v-a0a8d138`]]),de={class:`modal-footer`},fe=y(c({__name:`JobFormModal`,props:{jobId:{}},emits:[`close`,`saved`],setup(i,{emit:a}){let{t:c}=T(),u=i,y=a,x=z(),S=j(),D=E(!0),O=E(!1),k=E({name:``,schedule:``,prompt:``,deliver:`origin`,repeat_times:null}),A=E(null),M=o(()=>!!u.jobId),N=o(()=>[{label:c(`jobs.presetEveryMinute`),value:`* * * * *`},{label:c(`jobs.presetEvery5Min`),value:`*/5 * * * *`},{label:c(`jobs.presetEveryHour`),value:`0 * * * *`},{label:c(`jobs.presetEveryDay`),value:`0 0 * * *`},{label:c(`jobs.presetEveryDay9`),value:`0 9 * * *`},{label:c(`jobs.presetEveryMonday`),value:`0 9 * * 1`},{label:c(`jobs.presetEveryMonth`),value:`0 9 1 * *`}]),P=o(()=>[{label:c(`jobs.origin`),value:`origin`},{label:c(`jobs.local`),value:`local`}]),F=E(null);g(async()=>{if(u.jobId)try{let{getJob:t}=await e(async()=>{let{getJob:e}=await import(`./jobs-BrAnck6c.js`).then(e=>e.r);return{getJob:e}},__vite__mapDeps([0,1,2,3,4,5,6,7])),n=await t(u.jobId);k.value={name:n.name,schedule:typeof n.schedule==`string`?n.schedule:n.schedule?.expr||n.schedule_display||``,prompt:n.prompt,deliver:n.deliver||`origin`,repeat_times:typeof n.repeat==`number`?n.repeat:typeof n.repeat==`object`?n.repeat.times:null},typeof n.schedule==`object`&&n.schedule&&(F.value=n.schedule)}catch(e){S.error(c(`jobs.loadFailed`)+`: `+e.message)}});async function I(){if(!k.value.name.trim()){S.warning(c(`jobs.nameRequired`));return}if(!k.value.schedule.trim()){S.warning(c(`jobs.scheduleRequired`));return}O.value=!0;try{let e={name:k.value.name,schedule:k.value.schedule,prompt:k.value.prompt,deliver:k.value.deliver,repeat:k.value.repeat_times??void 0};M.value&&F.value&&(e.schedule={kind:F.value.kind,expr:k.value.schedule,display:k.value.schedule}),M.value?(await x.updateJob(u.jobId,e),S.success(c(`jobs.jobUpdated`))):(await x.createJob(e),S.success(c(`jobs.jobCreated`))),y(`saved`)}catch(e){S.error(e.message)}finally{O.value=!1}}function L(){D.value=!1,setTimeout(()=>y(`close`),200)}return(e,i)=>(l(),w(_(v),{show:D.value,"onUpdate:show":i[7]||=e=>D.value=e,preset:`card`,title:M.value?_(c)(`jobs.editJob`):_(c)(`jobs.createJob`),style:{width:`min(520px, calc(100vw - 32px))`},"mask-closable":!O.value,onAfterLeave:i[8]||=e=>y(`close`)},{footer:h(()=>[p(`div`,de,[m(_(C),{onClick:L},{default:h(()=>[f(b(_(c)(`common.cancel`)),1)]),_:1}),m(_(C),{type:`primary`,loading:O.value,onClick:I},{default:h(()=>[f(b(M.value?_(c)(`common.update`):_(c)(`common.create`)),1)]),_:1},8,[`loading`])])]),default:h(()=>[m(_(t),{"label-placement":`top`},{default:h(()=>[m(_(n),{label:_(c)(`jobs.name`),required:``},{default:h(()=>[m(_(d),{value:k.value.name,"onUpdate:value":i[0]||=e=>k.value.name=e,placeholder:_(c)(`jobs.namePlaceholder`),maxlength:`200`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),m(_(n),{label:_(c)(`jobs.schedule`),required:``},{default:h(()=>[m(_(d),{value:k.value.schedule,"onUpdate:value":i[1]||=e=>k.value.schedule=e,placeholder:_(c)(`jobs.schedulePlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),m(_(n),{label:_(c)(`jobs.quickPresets`)},{default:h(()=>[m(_(s),{value:A.value,"onUpdate:value":[i[2]||=e=>A.value=e,i[3]||=e=>k.value.schedule=e],options:N.value,placeholder:_(c)(`jobs.selectPreset`)},null,8,[`value`,`options`,`placeholder`])]),_:1},8,[`label`]),m(_(n),{label:_(c)(`jobs.prompt`),required:``},{default:h(()=>[m(_(d),{value:k.value.prompt,"onUpdate:value":i[4]||=e=>k.value.prompt=e,type:`textarea`,placeholder:_(c)(`jobs.promptPlaceholder`),rows:4,maxlength:`5000`,"show-count":``},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),m(_(n),{label:_(c)(`jobs.deliverTarget`)},{default:h(()=>[m(_(s),{value:k.value.deliver,"onUpdate:value":i[5]||=e=>k.value.deliver=e,options:P.value},null,8,[`value`,`options`])]),_:1},8,[`label`]),m(_(n),{label:_(c)(`jobs.repeatCount`)},{default:h(()=>[m(_(r),{value:k.value.repeat_times,"onUpdate:value":i[6]||=e=>k.value.repeat_times=e,min:1,placeholder:_(c)(`jobs.repeatPlaceholder`),clearable:``,style:{width:`100%`}},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-b339cfa2`]]),pe={class:`jobs-view`},me={class:`page-header`},he={class:`header-title`},ge={class:`jobs-content`},_e=y(c({__name:`JobsView`,setup(e){let{t}=T(),n=z(),r=E(!1),i=E(null);g(()=>{n.fetchJobs()});function o(){i.value=null,r.value=!0}function s(e){i.value=e,r.value=!0}function c(){r.value=!1,i.value=null}async function u(){await n.fetchJobs(),c()}return(e,d)=>(l(),S(`div`,pe,[p(`header`,me,[p(`h2`,he,b(_(t)(`jobs.title`)),1),m(_(C),{type:`primary`,size:`small`,onClick:o},{icon:h(()=>[...d[0]||=[p(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[p(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),p(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:h(()=>[f(` `+b(_(t)(`jobs.createJob`)),1)]),_:1})]),p(`div`,ge,[m(_(k),{show:_(n).loading&&_(n).jobs.length===0},{default:h(()=>[m(ue,{onEdit:s})]),_:1},8,[`show`])]),r.value?(l(),w(fe,{key:0,"job-id":i.value,onClose:c,onSaved:u},null,8,[`job-id`])):a(``,!0)]))}}),[[`__scopeId`,`data-v-c0d68ae3`]]);export{_e as default};
|
webui/assets/JobsView-DlZj5jxn.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-5c958088]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-5c958088]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.job-card[data-v-5c958088]{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;padding:16px;transition:border-color .15s}.job-card[data-v-5c958088]:hover{border-color:rgba(var(--accent-primary-rgb), .3)}.card-header[data-v-5c958088]{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.job-name[data-v-5c958088]{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-size:15px;font-weight:600;overflow:hidden}.status-badge[data-v-5c958088]{border-radius:10px;padding:2px 8px;font-size:11px;font-weight:500}.status-badge.success[data-v-5c958088]{background:rgba(var(--success-rgb), .12);color:var(--success)}.status-badge.info[data-v-5c958088]{background:rgba(var(--accent-primary-rgb), .12);color:var(--accent-primary)}.status-badge.warning[data-v-5c958088]{background:rgba(var(--warning-rgb), .12);color:var(--warning)}.status-badge.error[data-v-5c958088]{background:rgba(var(--error-rgb), .12);color:var(--error)}.card-body[data-v-5c958088]{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.info-row[data-v-5c958088]{justify-content:space-between;align-items:center;display:flex}.info-label[data-v-5c958088]{color:var(--text-muted);font-size:12px}.info-value[data-v-5c958088]{color:var(--text-secondary);font-size:12px}.run-status[data-v-5c958088]{margin-left:6px;font-size:11px;font-weight:500}.run-status.ok[data-v-5c958088]{color:var(--success)}.run-status.err[data-v-5c958088]{color:var(--error)}.mono[data-v-5c958088]{font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px}.card-actions[data-v-5c958088]{border-top:1px solid var(--border-light);gap:4px;padding-top:10px;display:flex}[data-v-a0a8d138]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-a0a8d138]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.empty-state[data-v-a0a8d138]{height:100%;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;display:flex}.empty-state .empty-icon[data-v-a0a8d138]{opacity:.3}.empty-state p[data-v-a0a8d138]{font-size:14px}.jobs-grid[data-v-a0a8d138]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));gap:14px;display:grid}.modal-footer[data-v-b339cfa2]{justify-content:flex-end;gap:8px;display:flex}[data-v-c0d68ae3]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c0d68ae3]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.jobs-view[data-v-c0d68ae3]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.jobs-content[data-v-c0d68ae3]{flex:1;padding:20px;overflow-y:auto}
|
webui/assets/LoginView-YmilKiMi.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-6f801147]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-6f801147]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.login-view[data-v-6f801147]{height:calc(100 * var(--vh));background:var(--bg-primary);justify-content:center;align-items:center;display:flex}.login-card[data-v-6f801147]{border:1px solid var(--border-color);background:var(--bg-card);text-align:center;border-radius:14px;width:480px;max-width:calc(100vw - 32px);padding:56px}@media (width<=768px){.login-card[data-v-6f801147]{padding:32px 24px}}.login-logo[data-v-6f801147]{margin-bottom:24px}.login-title[data-v-6f801147]{color:var(--text-primary);margin:0 0 10px;font-size:26px;font-weight:600}.login-desc[data-v-6f801147]{color:var(--text-muted);margin:0 0 32px;font-size:14px;line-height:1.6}.login-method-toggle[data-v-6f801147]{border:1px solid var(--border-color);border-radius:6px;margin-bottom:24px;display:flex;overflow:hidden}.login-method-toggle .toggle-btn[data-v-6f801147]{color:var(--text-muted);cursor:pointer;background:0 0;border:none;flex:1;padding:10px;font-size:13px;transition:all .15s}.login-method-toggle .toggle-btn.active[data-v-6f801147]{background:var(--text-primary);color:var(--text-on-accent)}.login-method-toggle .toggle-btn[data-v-6f801147]:not(.active):hover{background:rgba(var(--accent-primary-rgb), .06)}.login-form[data-v-6f801147]{flex-direction:column;gap:14px;display:flex}.login-input[data-v-6f801147]{border:1px solid var(--border-color);width:100%;color:var(--text-primary);background:var(--bg-input);box-sizing:border-box;border-radius:6px;outline:none;padding:14px 16px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:15px;transition:border-color .15s}.login-input[data-v-6f801147]::placeholder{color:var(--text-muted)}.login-input[data-v-6f801147]:focus{border-color:var(--accent-primary)}.login-error[data-v-6f801147]{color:var(--error);text-align:left;font-size:13px}.login-btn[data-v-6f801147]{background:var(--text-primary);width:100%;color:var(--text-on-accent);cursor:pointer;border:none;border-radius:6px;padding:14px;font-size:15px;font-weight:500;transition:opacity .15s}.login-btn[data-v-6f801147]:hover{opacity:.85}.login-btn[data-v-6f801147]:disabled{opacity:.5;cursor:not-allowed}
|
webui/assets/LoginView-vUCsbDMV.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{$r as e,Ar as t,Fr as n,Gr as r,Or as i,Sr as a,Ur as o,ai as s,c,ci as l,fr as u,hr as d,jr as f,lr as p,mr as m,ni as h,oi as g,wr as _,xr as v,yr as y}from"./index-Cl8-DFW_.js";import{i as b,r as x}from"./auth-B-i69M-u.js";var S={class:`login-view`},C={class:`login-card`},w={class:`login-title`},T={class:`login-desc`},E={key:0,class:`login-method-toggle`},D=[`placeholder`],O=[`placeholder`],k=[`placeholder`],A={key:2,class:`login-error`},j=[`disabled`],M=c(n({__name:`LoginView`,setup(n){let{t:c}=p(),M=d(),N=window.__LOGIN_TOKEN__||``,P=h(N),F=h(``),I=h(``),L=h(!1),R=h(``),z=h(`token`),B=h(!1);u()&&M.replace(`/hermes/chat`),o(async()=>{try{let e=await x();B.value=e.hasPasswordLogin,e.hasPasswordLogin&&!N&&(z.value=`password`)}catch{}});async function V(){z.value===`token`?await H():await U()}async function H(){let e=P.value.trim();if(!e){R.value=c(`login.tokenRequired`);return}L.value=!0,R.value=``;try{if((await fetch(`/api/hermes/sessions`,{headers:{Authorization:`Bearer ${e}`}})).status===401){R.value=c(`login.invalidToken`),L.value=!1;return}m(e),M.replace(`/hermes/chat`)}catch{R.value=c(`login.connectionFailed`)}finally{L.value=!1}}async function U(){if(!F.value.trim()||!I.value){R.value=c(`login.credentialsRequired`);return}L.value=!0,R.value=``;try{m(await b(F.value.trim(),I.value)),M.replace(`/hermes/chat`)}catch(e){R.value=e.message||c(`login.invalidCredentials`)}finally{L.value=!1}}return(n,o)=>(r(),f(`div`,S,[i(`div`,C,[o[5]||=i(`div`,{class:`login-logo`},[i(`img`,{src:`/webui/logo.png`,alt:`Hermes`,width:`80`,height:`80`})],-1),i(`h1`,w,l(s(c)(`login.title`)),1),i(`p`,T,l(s(c)(`login.description`)),1),B.value?(r(),f(`div`,E,[i(`button`,{class:g([`toggle-btn`,{active:z.value===`password`}]),onClick:o[0]||=e=>z.value=`password`},l(s(c)(`login.passwordLogin`)),3),i(`button`,{class:g([`toggle-btn`,{active:z.value===`token`}]),onClick:o[1]||=e=>z.value=`token`},l(s(c)(`login.tokenLogin`)),3)])):t(``,!0),i(`form`,{class:`login-form`,onSubmit:a(V,[`prevent`])},[z.value===`token`?e((r(),f(`input`,{key:0,"onUpdate:modelValue":o[2]||=e=>P.value=e,type:`password`,class:`login-input`,placeholder:s(c)(`login.placeholder`),autofocus:``},null,8,D)),[[y,P.value]]):t(``,!0),z.value===`password`?(r(),f(_,{key:1},[e(i(`input`,{"onUpdate:modelValue":o[3]||=e=>F.value=e,type:`text`,class:`login-input`,placeholder:s(c)(`login.usernamePlaceholder`),autofocus:``},null,8,O),[[y,F.value]]),e(i(`input`,{"onUpdate:modelValue":o[4]||=e=>I.value=e,type:`password`,class:`login-input`,placeholder:s(c)(`login.passwordPlaceholder`),onKeyup:v(V,[`enter`])},null,40,k),[[y,I.value]])],64)):t(``,!0),R.value?(r(),f(`div`,A,l(R.value),1)):t(``,!0),i(`button`,{type:`submit`,class:`login-btn`,disabled:L.value},l(L.value?`...`:s(c)(`login.submit`)),9,j)],32)])]))}}),[[`__scopeId`,`data-v-6f801147`]]);export{M as default};
|
webui/assets/LogsView-B7bccIME.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{$r as e,Ar as t,Dr as n,E as r,Fr as i,Gr as a,Nr as o,Or as s,Pr as c,Qr as l,Ur as u,ai as d,c as f,ci as p,jr as m,k as h,lr as g,ni as _,oi as v,pr as y,qr as b,u as x,wr as S,y as C,yr as w}from"./index-Cl8-DFW_.js";async function T(){return(await y(`/api/hermes/logs`)).files}async function E(e,t){let n=new URLSearchParams;t?.lines&&n.set(`lines`,String(t.lines)),t?.level&&n.set(`level`,t.level),t?.session&&n.set(`session`,t.session),t?.since&&n.set(`since`,t.since);let r=n.toString();return(await y(`/api/hermes/logs/${e}${r?`?${r}`:``}`)).entries.filter(e=>e!==null)}var D={class:`logs-view`},ee={class:`page-header`},O={class:`header-title`},k={class:`header-actions`},A=[`placeholder`],j={class:`logs-body`},M={key:0,class:`logs-empty`},N={class:`log-list`},P={class:`log-time`},F={class:`log-logger`},I={class:`access-method`},L={class:`access-path`},R={key:1,class:`log-message`},z=f(i({__name:`LogsView`,setup(i){let{t:f}=g(),y=C(),z=_([]),B=_(`agent`),V=_([]),H=_(!1),U=_(100),W=_(``),G=_(``),K=n(()=>z.value.map(e=>({label:`${e.name} (${e.size})`,value:e.name}))),q=n(()=>[{label:f(`logs.all`),value:``},{label:`ERROR`,value:`ERROR`},{label:`WARNING`,value:`WARNING`},{label:`INFO`,value:`INFO`},{label:`DEBUG`,value:`DEBUG`}]),J=[{label:`50`,value:50},{label:`100`,value:100},{label:`200`,value:200},{label:`500`,value:500}],Y=n(()=>{if(!G.value)return V.value;let e=G.value.toLowerCase();return V.value.filter(t=>t.message.toLowerCase().includes(e)||t.logger.toLowerCase().includes(e)||t.raw.toLowerCase().includes(e))});function X(e){switch(e){case`ERROR`:return`level-error`;case`WARNING`:return`level-warning`;case`DEBUG`:return`level-debug`;default:return`level-info`}}function Z(e){let t=e.match(/\d{2}:\d{2}:\d{2}/);return t?t[0]:e}function Q(e){let t=e.match(/"(\w+)\s+(\S+)\s+HTTP\/[^"]+"\s+(\d+)/);return t?{method:t[1],path:t[2],status:t[3]}:null}async function $(){H.value=!0;try{V.value=(await E(B.value,{lines:U.value,level:W.value||void 0})).filter(e=>e!==null)}catch(e){y.error(e.message)}finally{H.value=!1}}return u(async()=>{z.value=await T(),await $()}),(n,i)=>(a(),m(`div`,D,[s(`header`,ee,[s(`h2`,O,p(d(f)(`logs.title`)),1),s(`div`,k,[c(d(r),{value:B.value,"onUpdate:value":[i[0]||=e=>B.value=e,$],options:K.value,size:`small`,class:`input-md`},null,8,[`value`,`options`]),c(d(r),{value:W.value,options:q.value,size:`small`,class:`input-sm`,"onUpdate:value":i[1]||=e=>{W.value=e,$()}},null,8,[`value`,`options`]),c(d(r),{value:U.value,options:J,size:`small`,class:`input-sm`,"onUpdate:value":i[2]||=e=>{U.value=e,$()}},null,8,[`value`]),e(s(`input`,{"onUpdate:modelValue":i[3]||=e=>G.value=e,class:`search-input`,placeholder:d(f)(`logs.searchPlaceholder`)},null,8,A),[[w,G.value]]),c(d(h),{size:`small`,loading:H.value,onClick:$},{default:l(()=>[o(p(d(f)(`logs.refresh`)),1)]),_:1},8,[`loading`])])]),s(`div`,j,[c(d(x),{show:H.value},{default:l(()=>[Y.value.length===0&&!H.value?(a(),m(`div`,M,p(d(f)(`logs.noEntries`)),1)):t(``,!0),s(`div`,N,[(a(!0),m(S,null,b(Y.value,(e,t)=>(a(),m(`div`,{key:t,class:v([`log-entry`,X(e.level)])},[s(`span`,P,p(Z(e.timestamp)),1),s(`span`,{class:v([`log-level`,X(e.level)])},p(e.level),3),s(`span`,F,p(e.logger),1),Q(e.message)?(a(),m(S,{key:0},[s(`span`,I,p(Q(e.message).method),1),s(`span`,L,p(Q(e.message).path),1),s(`span`,{class:v([`access-status`,`status-`+(Q(e.message).status?.[0]||`x`)])},p(Q(e.message).status),3)],64)):(a(),m(`span`,R,p(e.message),1))],2))),128))])]),_:1},8,[`show`])])]))}}),[[`__scopeId`,`data-v-c785e2a9`]]);export{z as default};
|
webui/assets/LogsView-BuxFUnEf.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-c785e2a9]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c785e2a9]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.logs-view[data-v-c785e2a9]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.page-header[data-v-c785e2a9]{flex-wrap:wrap;gap:12px}.header-actions[data-v-c785e2a9]{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.search-input[data-v-c785e2a9]{border:1px solid var(--border-color);background:var(--bg-input);color:var(--text-primary);border-radius:6px;outline:none;width:160px;padding:4px 10px;font-size:13px;transition:border-color .15s}.search-input[data-v-c785e2a9]:focus{border-color:var(--accent-primary)}.search-input[data-v-c785e2a9]::placeholder{color:var(--text-muted)}.logs-body[data-v-c785e2a9]{flex:1;min-height:0;overflow-y:auto}.logs-empty[data-v-c785e2a9]{height:100%;color:var(--text-muted);justify-content:center;align-items:center;font-size:13px;display:flex}.log-list[data-v-c785e2a9]{padding:4px 0}.log-entry[data-v-c785e2a9]{border-left:2px solid #0000;align-items:center;gap:8px;padding:3px 20px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px;line-height:1.6;display:flex}.log-entry[data-v-c785e2a9]:hover{background-color:rgba(var(--accent-primary-rgb), .03)}.log-entry.level-error[data-v-c785e2a9]{border-left-color:var(--error)}.log-entry.level-error .log-message[data-v-c785e2a9]{color:var(--error)}.log-entry.level-warning[data-v-c785e2a9]{border-left-color:var(--warning)}.log-entry.level-warning .log-message[data-v-c785e2a9]{color:var(--warning)}.log-time[data-v-c785e2a9]{color:var(--text-muted);font-variant-numeric:tabular-nums;flex-shrink:0}.log-level[data-v-c785e2a9]{text-align:center;border-radius:2px;flex-shrink:0;min-width:42px;padding:0 4px;font-size:10px;font-weight:600}.log-level.level-error[data-v-c785e2a9]{background:rgba(var(--error-rgb), .12);color:var(--error)}.log-level.level-warning[data-v-c785e2a9]{background:rgba(var(--warning-rgb), .12);color:var(--warning)}.log-level.level-debug[data-v-c785e2a9],.log-level.level-info[data-v-c785e2a9]{background:rgba(var(--accent-primary-rgb), .06);color:var(--text-muted)}.log-logger[data-v-c785e2a9]{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;max-width:160px;overflow:hidden}.log-message[data-v-c785e2a9]{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.access-method[data-v-c785e2a9]{color:var(--text-primary);flex-shrink:0;font-weight:600}.access-path[data-v-c785e2a9]{color:var(--accent-primary);text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.access-status[data-v-c785e2a9]{flex-shrink:0;font-size:11px;font-weight:600}.access-status.status-2[data-v-c785e2a9]{color:var(--success)}.access-status.status-3[data-v-c785e2a9]{color:var(--warning)}.access-status.status-4[data-v-c785e2a9],.access-status.status-5[data-v-c785e2a9]{color:var(--error)}
|
webui/assets/MarkdownRenderer-BLJUO767.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.markdown-body{box-sizing:border-box;min-width:0;max-width:100%;font-size:14px;line-height:1.65;overflow-x:auto}.markdown-body p{margin:0 0 8px}.markdown-body p:last-child{margin-bottom:0}.markdown-body ul,.markdown-body ol{margin:4px 0 8px;padding-left:20px}.markdown-body li{margin:2px 0}.markdown-body strong{color:var(--text-primary);font-weight:600}.markdown-body em{color:var(--text-secondary)}.markdown-body a{color:var(--accent-primary);text-underline-offset:2px;text-decoration:underline}.markdown-body a:hover{color:var(--accent-hover)}.markdown-body blockquote{border-left:3px solid var(--border-color);color:var(--text-secondary);margin:8px 0;padding:4px 12px}.markdown-body code:not(.hljs){background:var(--code-bg);color:var(--accent-primary);border-radius:4px;padding:2px 6px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:13px}.markdown-body table{border-collapse:collapse;width:100%;margin:8px 0;display:block;overflow-x:auto}.markdown-body table th,.markdown-body table td{border:1px solid var(--border-color);text-align:left;padding:6px 12px;font-size:13px}.markdown-body table th{background:rgba(var(--accent-primary-rgb), .08);color:var(--text-primary);font-weight:600}.markdown-body table td{color:var(--text-secondary)}.markdown-body hr{border:none;border-top:1px solid var(--border-color);margin:12px 0}.markdown-body .mermaid-diagram{border:1px solid var(--border-color);background:rgba(var(--accent-primary-rgb), .04);border-radius:8px;margin:10px 0;padding:14px;overflow-x:auto}.markdown-body .mermaid-diagram svg{max-width:100%;height:auto;margin:0 auto;display:block}.markdown-body .mermaid-loading{color:var(--text-secondary);justify-content:center;align-items:center;min-height:60px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:13px;display:flex}
|
webui/assets/MarkdownRenderer-P3bVUblX.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
webui/assets/MemoryView--hC8Atwx.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{$r as e,Ar as t,Dr as n,Fr as r,Gr as i,Mr as a,Nr as o,Or as s,Pr as c,Qr as l,Ur as ee,ai as u,c as d,ci as f,jr as p,k as m,kr as h,lr as te,ni as g,y as ne,yr as _}from"./index-Cl8-DFW_.js";import{t as v}from"./MarkdownRenderer-P3bVUblX.js";import{a as y,t as b}from"./skills-Itof9XyP.js";var re={class:`memory-view`},ie={class:`page-header`},ae={class:`header-title`},oe={class:`memory-content`},se={key:0,class:`memory-loading`},ce={key:1,class:`memory-sections`},le={class:`memory-section`},ue={class:`section-header`},x={class:`section-title-row`},S={class:`section-title`},C={key:0,class:`section-mtime`},w={key:0,class:`section-body`},T={key:1,class:`empty-text`},E={key:1,class:`section-edit`},D=[`placeholder`],O={class:`edit-actions`},k={class:`memory-section`},A={class:`section-header`},j={class:`section-title-row`},M={class:`section-title`},N={key:0,class:`section-mtime`},P={key:0,class:`section-body`},F={key:1,class:`empty-text`},I={key:1,class:`section-edit`},L=[`placeholder`],R={class:`edit-actions`},z={class:`memory-section`},de={class:`section-header`},B={class:`section-title-row`},V={class:`section-title`},H={key:0,class:`section-mtime`},fe={key:0,class:`section-body`},pe={key:1,class:`empty-text`},me={key:1,class:`section-edit`},he=[`placeholder`],ge={class:`edit-actions`},U=d(r({__name:`MemoryView`,setup(r){let{t:d}=te(),U=ne(),W=g(!1),G=g(null),K=g(null),q=g(``),J=g(!1);ee(Y);async function Y(){W.value=!0;try{G.value=await b()}catch(e){console.error(`Failed to load memory:`,e),U.error(d(`memory.loadFailed`))}finally{W.value=!1}}function X(e){K.value=e,q.value=G.value?.[e]||``}function Z(){K.value=null,q.value=``}async function Q(){if(K.value){J.value=!0;try{await y(K.value,q.value),await Y(),K.value=null,q.value=``,U.success(d(`common.saved`))}catch(e){U.error(`${d(`common.saveFailed`)}: ${e.message}`)}finally{J.value=!1}}}function $(e){return e?new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):``}let _e=n(()=>!G.value?.memory?.trim()),ve=n(()=>!G.value?.user?.trim()),ye=n(()=>!G.value?.soul?.trim()),be=n(()=>(G.value?.memory||``).replace(/§/g,`
|
| 2 |
+
|
| 3 |
+
`)),xe=n(()=>(G.value?.user||``).replace(/§/g,`
|
| 4 |
+
|
| 5 |
+
`)),Se=n(()=>(G.value?.soul||``).replace(/§/g,`
|
| 6 |
+
|
| 7 |
+
`));return(n,r)=>(i(),p(`div`,re,[s(`header`,ie,[s(`h2`,ae,f(u(d)(`memory.title`)),1),c(u(m),{size:`small`,quaternary:``,onClick:Y},{icon:l(()=>[...r[6]||=[s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[s(`polyline`,{points:`23 4 23 10 17 10`}),s(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`})],-1)]]),default:l(()=>[o(` `+f(u(d)(`memory.refresh`)),1)]),_:1})]),s(`div`,oe,[W.value&&!G.value?(i(),p(`div`,se,f(u(d)(`common.loading`)),1)):(i(),p(`div`,ce,[s(`div`,le,[s(`div`,ue,[s(`div`,x,[r[7]||=a(`<span class="section-icon" data-v-5b2926d1><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-v-5b2926d1><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-5b2926d1></path><polyline points="14 2 14 8 20 8" data-v-5b2926d1></polyline><line x1="16" y1="13" x2="8" y2="13" data-v-5b2926d1></line><line x1="16" y1="17" x2="8" y2="17" data-v-5b2926d1></line></svg></span>`,1),s(`span`,S,f(u(d)(`memory.myNotes`)),1),G.value?.memory_mtime?(i(),p(`span`,C,f($(G.value.memory_mtime)),1)):t(``,!0)]),K.value===`memory`?t(``,!0):(i(),h(u(m),{key:0,size:`tiny`,quaternary:``,onClick:r[0]||=e=>X(`memory`)},{icon:l(()=>[...r[8]||=[s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[s(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),s(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})],-1)]]),default:l(()=>[o(` `+f(u(d)(`common.edit`)),1)]),_:1}))]),K.value===`memory`?(i(),p(`div`,E,[e(s(`textarea`,{"onUpdate:modelValue":r[1]||=e=>q.value=e,class:`edit-textarea`,placeholder:u(d)(`memory.notesPlaceholder`),spellcheck:`false`},null,8,D),[[_,q.value]]),s(`div`,O,[c(u(m),{size:`small`,onClick:Z},{default:l(()=>[o(f(u(d)(`common.cancel`)),1)]),_:1}),c(u(m),{size:`small`,type:`primary`,loading:J.value,onClick:Q},{default:l(()=>[o(f(u(d)(`common.save`)),1)]),_:1},8,[`loading`])])])):(i(),p(`div`,w,[_e.value?(i(),p(`p`,T,f(u(d)(`memory.noNotes`)),1)):(i(),h(v,{key:0,content:be.value},null,8,[`content`]))]))]),s(`div`,k,[s(`div`,A,[s(`div`,j,[r[9]||=s(`span`,{class:`section-icon`},[s(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[s(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),s(`circle`,{cx:`12`,cy:`7`,r:`4`})])],-1),s(`span`,M,f(u(d)(`memory.userProfile`)),1),G.value?.user_mtime?(i(),p(`span`,N,f($(G.value.user_mtime)),1)):t(``,!0)]),K.value===`user`?t(``,!0):(i(),h(u(m),{key:0,size:`tiny`,quaternary:``,onClick:r[2]||=e=>X(`user`)},{icon:l(()=>[...r[10]||=[s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[s(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),s(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})],-1)]]),default:l(()=>[o(` `+f(u(d)(`common.edit`)),1)]),_:1}))]),K.value===`user`?(i(),p(`div`,I,[e(s(`textarea`,{"onUpdate:modelValue":r[3]||=e=>q.value=e,class:`edit-textarea`,placeholder:u(d)(`memory.profilePlaceholder`),spellcheck:`false`},null,8,L),[[_,q.value]]),s(`div`,R,[c(u(m),{size:`small`,onClick:Z},{default:l(()=>[o(f(u(d)(`common.cancel`)),1)]),_:1}),c(u(m),{size:`small`,type:`primary`,loading:J.value,onClick:Q},{default:l(()=>[o(f(u(d)(`common.save`)),1)]),_:1},8,[`loading`])])])):(i(),p(`div`,P,[ve.value?(i(),p(`p`,F,f(u(d)(`memory.noProfile`)),1)):(i(),h(v,{key:0,content:xe.value},null,8,[`content`]))]))]),s(`div`,z,[s(`div`,de,[s(`div`,B,[r[11]||=a(`<span class="section-icon" data-v-5b2926d1><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-v-5b2926d1><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" data-v-5b2926d1></path><path d="M8 14s1.5 2 4 2 4-2 4-2" data-v-5b2926d1></path><line x1="9" y1="9" x2="9.01" y2="9" data-v-5b2926d1></line><line x1="15" y1="9" x2="15.01" y2="9" data-v-5b2926d1></line></svg></span>`,1),s(`span`,V,f(u(d)(`memory.soul`)),1),G.value?.soul_mtime?(i(),p(`span`,H,f($(G.value.soul_mtime)),1)):t(``,!0)]),K.value===`soul`?t(``,!0):(i(),h(u(m),{key:0,size:`tiny`,quaternary:``,onClick:r[4]||=e=>X(`soul`)},{icon:l(()=>[...r[12]||=[s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[s(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),s(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})],-1)]]),default:l(()=>[o(` `+f(u(d)(`common.edit`)),1)]),_:1}))]),K.value===`soul`?(i(),p(`div`,me,[e(s(`textarea`,{"onUpdate:modelValue":r[5]||=e=>q.value=e,class:`edit-textarea`,placeholder:u(d)(`memory.soulPlaceholder`),spellcheck:`false`},null,8,he),[[_,q.value]]),s(`div`,ge,[c(u(m),{size:`small`,onClick:Z},{default:l(()=>[o(f(u(d)(`common.cancel`)),1)]),_:1}),c(u(m),{size:`small`,type:`primary`,loading:J.value,onClick:Q},{default:l(()=>[o(f(u(d)(`common.save`)),1)]),_:1},8,[`loading`])])])):(i(),p(`div`,fe,[ye.value?(i(),p(`p`,pe,f(u(d)(`memory.noSoul`)),1)):(i(),h(v,{key:0,content:Se.value},null,8,[`content`]))]))])]))])]))}}),[[`__scopeId`,`data-v-5b2926d1`]]);export{U as default};
|
webui/assets/MemoryView-CaRuy_r5.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-5b2926d1]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-5b2926d1]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.memory-view[data-v-5b2926d1]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.memory-content[data-v-5b2926d1]{flex-direction:column;flex:1;padding:20px;display:flex;overflow:hidden}.memory-loading[data-v-5b2926d1]{color:var(--text-muted);flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.memory-sections[data-v-5b2926d1]{flex:1;gap:16px;min-height:0;display:flex}@media (width<=768px){.memory-sections[data-v-5b2926d1]{flex-direction:column}}.memory-section[data-v-5b2926d1]{border:1px solid var(--border-color);border-radius:10px;flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.section-header[data-v-5b2926d1]{background:var(--bg-secondary);border-bottom:1px solid var(--border-color);flex-shrink:0;justify-content:space-between;align-items:center;padding:10px 16px;display:flex}.section-title-row[data-v-5b2926d1]{align-items:center;gap:8px;display:flex}.section-icon[data-v-5b2926d1]{color:var(--text-secondary);display:flex}.section-title[data-v-5b2926d1]{color:var(--text-primary);font-size:14px;font-weight:600}.section-mtime[data-v-5b2926d1]{color:var(--text-muted);font-size:11px}.section-body[data-v-5b2926d1]{flex:1;min-height:0;padding:16px;overflow-y:auto}.empty-text[data-v-5b2926d1]{color:var(--text-muted);font-size:13px;font-style:italic}.section-edit[data-v-5b2926d1]{flex-direction:column;flex:1;min-height:0;padding:12px 16px;display:flex}.edit-textarea[data-v-5b2926d1]{border:1px solid var(--border-color);background:var(--bg-input);width:100%;min-height:0;color:var(--text-primary);resize:none;border-radius:6px;outline:none;flex:1;padding:12px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:13px;line-height:1.6}.edit-textarea[data-v-5b2926d1]:focus{border-color:var(--accent-primary)}.edit-actions[data-v-5b2926d1]{justify-content:flex-end;gap:8px;margin-top:10px;display:flex}
|
webui/assets/ModelsView-D6DC0TTh.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-e7818f5a]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-e7818f5a]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.provider-card[data-v-e7818f5a]{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;padding:16px;transition:border-color .15s}.provider-card[data-v-e7818f5a]:hover{border-color:rgba(var(--accent-primary-rgb), .3)}.card-header[data-v-e7818f5a]{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.provider-name[data-v-e7818f5a]{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-size:15px;font-weight:600;overflow:hidden}.type-badge[data-v-e7818f5a]{border-radius:10px;padding:2px 8px;font-size:11px;font-weight:500}.type-badge.builtin[data-v-e7818f5a]{background:rgba(var(--accent-primary-rgb), .12);color:var(--accent-primary)}.type-badge.custom[data-v-e7818f5a]{background:rgba(var(--success-rgb), .12);color:var(--success)}.card-body[data-v-e7818f5a]{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.info-row[data-v-e7818f5a]{justify-content:space-between;align-items:center;display:flex}.info-label[data-v-e7818f5a]{color:var(--text-muted);font-size:12px}.info-value[data-v-e7818f5a]{color:var(--text-secondary);font-size:12px}.mono[data-v-e7818f5a]{font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px}.card-actions[data-v-e7818f5a]{border-top:1px solid var(--border-light);gap:8px;padding-top:10px;display:flex}[data-v-76eec30b]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-76eec30b]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.empty-state[data-v-76eec30b]{height:100%;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;display:flex}.empty-state .empty-icon[data-v-76eec30b]{opacity:.3}.empty-state p[data-v-76eec30b]{font-size:14px}.providers-grid[data-v-76eec30b]{grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:14px;display:grid}.codex-login[data-v-b8a659c8]{flex-direction:column;align-items:center;padding:8px 0;display:flex}.codex-login__state[data-v-b8a659c8]{flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;min-height:120px;display:flex}.codex-login__hint[data-v-b8a659c8]{color:var(--n-text-color,inherit);text-align:center;font-size:14px;line-height:1.6}.codex-login__code[data-v-b8a659c8]{border:1px solid var(--n-border-color,#e0e0e6);cursor:pointer;background:var(--n-color,#fafafa);border-radius:8px;align-items:center;gap:12px;padding:12px 20px;transition:border-color .2s;display:flex}.codex-login__code[data-v-b8a659c8]:hover{border-color:var(--n-primary-color,#18a058)}.codex-login__code-text[data-v-b8a659c8]{letter-spacing:4px;color:var(--n-text-color,inherit);font-family:monospace;font-size:28px;font-weight:700}.codex-login__state--success[data-v-b8a659c8]{color:#18a058}.codex-login__state--success svg[data-v-b8a659c8]{stroke:#18a058}.codex-login__error[data-v-b8a659c8]{color:#d03050;text-align:center;font-size:13px}.modal-footer[data-v-b8a659c8]{justify-content:flex-end;gap:8px;display:flex}.nous-login[data-v-13765003]{flex-direction:column;align-items:center;padding:8px 0;display:flex}.nous-login__state[data-v-13765003]{flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;min-height:120px;display:flex}.nous-login__hint[data-v-13765003]{color:var(--n-text-color,inherit);text-align:center;font-size:14px;line-height:1.6}.nous-login__code[data-v-13765003]{border:1px solid var(--n-border-color,#e0e0e6);cursor:pointer;background:var(--n-color,#fafafa);border-radius:8px;align-items:center;gap:12px;padding:12px 20px;transition:border-color .2s;display:flex}.nous-login__code[data-v-13765003]:hover{border-color:var(--n-primary-color,#18a058)}.nous-login__code-text[data-v-13765003]{letter-spacing:4px;color:var(--n-text-color,inherit);font-family:monospace;font-size:28px;font-weight:700}.nous-login__state--success[data-v-13765003]{color:#18a058}.nous-login__state--success svg[data-v-13765003]{stroke:#18a058}.nous-login__error[data-v-13765003]{color:#d03050;text-align:center;font-size:13px}.modal-footer[data-v-13765003]{justify-content:flex-end;gap:8px;display:flex}.copilot-login[data-v-fe3fcc7e]{flex-direction:column;align-items:center;padding:8px 0;display:flex}.copilot-login__state[data-v-fe3fcc7e]{flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;min-height:120px;display:flex}.copilot-login__hint[data-v-fe3fcc7e]{color:var(--n-text-color,inherit);text-align:center;font-size:14px;line-height:1.6}.copilot-login__code[data-v-fe3fcc7e]{border:1px solid var(--n-border-color,#e0e0e6);cursor:pointer;background:var(--n-color,#fafafa);border-radius:8px;align-items:center;gap:12px;padding:12px 20px;transition:border-color .2s;display:flex}.copilot-login__code[data-v-fe3fcc7e]:hover{border-color:var(--n-primary-color,#18a058)}.copilot-login__code-text[data-v-fe3fcc7e]{letter-spacing:4px;color:var(--n-text-color,inherit);font-family:monospace;font-size:28px;font-weight:700}.copilot-login__state--success[data-v-fe3fcc7e]{color:#18a058}.copilot-login__state--success svg[data-v-fe3fcc7e]{stroke:#18a058}.copilot-login__error[data-v-fe3fcc7e]{color:#d03050;text-align:center;font-size:13px}.modal-footer[data-v-fe3fcc7e],.modal-footer[data-v-975eb2e9]{justify-content:flex-end;gap:8px;display:flex}[data-v-2fa030eb]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-2fa030eb]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.models-view[data-v-2fa030eb]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.models-content[data-v-2fa030eb]{flex:1;padding:20px;overflow-y:auto}
|
webui/assets/ModelsView-DiGxSAIV.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{n as e,t}from"./FormItem-DB8yIr9W.js";import{t as n}from"./get-slot-DyvCJGRO.js";import{t as r}from"./InputNumber-P0oq6NtF.js";import{t as i}from"./composables-DggaE5oy.js";import{n as a}from"./app-IytcAxLh.js";import{$n as o,Ar as s,Bn as c,C as l,Dr as u,E as d,Fr as f,Gr as p,Kr as m,Ln as h,Lr as g,N as _,Nr as v,Or as y,Pn as b,Pr as x,Qr as S,Rr as C,Ur as w,Wr as T,Xr as E,Yr as D,ai as O,b as k,c as A,ci as j,cn as M,er as N,hn as P,in as F,ir as I,it as L,jr as R,k as z,kr as B,lr as V,mn as ee,ni as H,nn as U,nr as W,oi as te,ot as ne,pr as G,qr as re,ri as K,rn as ie,rr as q,t as ae,tr as J,u as Y,wr as oe,y as X}from"./index-Cl8-DFW_.js";import{t as Z}from"./clipboard-BulqpJ4r.js";import{t as Q}from"./models-Jqyv3Qjo.js";var se={name:String,value:{type:[String,Number,Boolean],default:`on`},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},ce=b(`n-radio-group`);function le(e){let t=C(ce,null),{mergedClsPrefixRef:n,mergedComponentPropsRef:r}=F(e),i=U(e,{mergedSize(n){let{size:i}=e;if(i!==void 0)return i;if(t){let{mergedSizeRef:{value:e}}=t;if(e!==void 0)return e}return n?n.mergedSize.value:r?.value?.Radio?.size||`medium`},mergedDisabled(n){return!!(e.disabled||t?.disabledRef.value||n?.disabled.value)}}),{mergedSizeRef:a,mergedDisabledRef:o}=i,s=H(null),l=H(null),u=H(e.defaultChecked),d=h(K(e,`checked`),u),f=c(()=>t?t.valueRef.value===e.value:d.value),p=c(()=>{let{name:n}=e;if(n!==void 0)return n;if(t)return t.nameRef.value}),m=H(!1);function g(){if(t){let{doUpdateValue:n}=t,{value:r}=e;P(n,r)}else{let{onUpdateChecked:t,"onUpdate:checked":n}=e,{nTriggerFormInput:r,nTriggerFormChange:a}=i;t&&P(t,!0),n&&P(n,!0),r(),a(),u.value=!0}}function _(){o.value||f.value||g()}function v(){_(),s.value&&(s.value.checked=f.value)}function y(){m.value=!1}function b(){m.value=!0}return{mergedClsPrefix:t?t.mergedClsPrefixRef:n,inputRef:s,labelRef:l,mergedName:p,mergedDisabled:o,renderSafeChecked:f,focus:m,mergedSize:a,handleRadioInputChange:v,handleRadioInputBlur:y,handleRadioInputFocus:b}}var ue=f({name:`RadioButton`,props:se,setup:le,render(){let{mergedClsPrefix:e}=this;return g(`label`,{class:[`${e}-radio-button`,this.mergedDisabled&&`${e}-radio-button--disabled`,this.renderSafeChecked&&`${e}-radio-button--checked`,this.focus&&[`${e}-radio-button--focus`]]},g(`input`,{ref:`inputRef`,type:`radio`,class:`${e}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur}),g(`div`,{class:`${e}-radio-button__state-border`}),M(this.$slots.default,t=>!t&&!this.label?null:g(`div`,{ref:`labelRef`,class:`${e}-radio__label`},t||this.label)))}}),de=N(`radio-group`,`
|
| 2 |
+
display: inline-block;
|
| 3 |
+
font-size: var(--n-font-size);
|
| 4 |
+
`,[J(`splitor`,`
|
| 5 |
+
display: inline-block;
|
| 6 |
+
vertical-align: bottom;
|
| 7 |
+
width: 1px;
|
| 8 |
+
transition:
|
| 9 |
+
background-color .3s var(--n-bezier),
|
| 10 |
+
opacity .3s var(--n-bezier);
|
| 11 |
+
background: var(--n-button-border-color);
|
| 12 |
+
`,[W(`checked`,{backgroundColor:`var(--n-button-border-color-active)`}),W(`disabled`,{opacity:`var(--n-opacity-disabled)`})]),W(`button-group`,`
|
| 13 |
+
white-space: nowrap;
|
| 14 |
+
height: var(--n-height);
|
| 15 |
+
line-height: var(--n-height);
|
| 16 |
+
`,[N(`radio-button`,{height:`var(--n-height)`,lineHeight:`var(--n-height)`}),J(`splitor`,{height:`var(--n-height)`})]),N(`radio-button`,`
|
| 17 |
+
vertical-align: bottom;
|
| 18 |
+
outline: none;
|
| 19 |
+
position: relative;
|
| 20 |
+
user-select: none;
|
| 21 |
+
-webkit-user-select: none;
|
| 22 |
+
display: inline-block;
|
| 23 |
+
box-sizing: border-box;
|
| 24 |
+
padding-left: 14px;
|
| 25 |
+
padding-right: 14px;
|
| 26 |
+
white-space: nowrap;
|
| 27 |
+
transition:
|
| 28 |
+
background-color .3s var(--n-bezier),
|
| 29 |
+
opacity .3s var(--n-bezier),
|
| 30 |
+
border-color .3s var(--n-bezier),
|
| 31 |
+
color .3s var(--n-bezier);
|
| 32 |
+
background: var(--n-button-color);
|
| 33 |
+
color: var(--n-button-text-color);
|
| 34 |
+
border-top: 1px solid var(--n-button-border-color);
|
| 35 |
+
border-bottom: 1px solid var(--n-button-border-color);
|
| 36 |
+
`,[N(`radio-input`,`
|
| 37 |
+
pointer-events: none;
|
| 38 |
+
position: absolute;
|
| 39 |
+
border: 0;
|
| 40 |
+
border-radius: inherit;
|
| 41 |
+
left: 0;
|
| 42 |
+
right: 0;
|
| 43 |
+
top: 0;
|
| 44 |
+
bottom: 0;
|
| 45 |
+
opacity: 0;
|
| 46 |
+
z-index: 1;
|
| 47 |
+
`),J(`state-border`,`
|
| 48 |
+
z-index: 1;
|
| 49 |
+
pointer-events: none;
|
| 50 |
+
position: absolute;
|
| 51 |
+
box-shadow: var(--n-button-box-shadow);
|
| 52 |
+
transition: box-shadow .3s var(--n-bezier);
|
| 53 |
+
left: -1px;
|
| 54 |
+
bottom: -1px;
|
| 55 |
+
right: -1px;
|
| 56 |
+
top: -1px;
|
| 57 |
+
`),o(`&:first-child`,`
|
| 58 |
+
border-top-left-radius: var(--n-button-border-radius);
|
| 59 |
+
border-bottom-left-radius: var(--n-button-border-radius);
|
| 60 |
+
border-left: 1px solid var(--n-button-border-color);
|
| 61 |
+
`,[J(`state-border`,`
|
| 62 |
+
border-top-left-radius: var(--n-button-border-radius);
|
| 63 |
+
border-bottom-left-radius: var(--n-button-border-radius);
|
| 64 |
+
`)]),o(`&:last-child`,`
|
| 65 |
+
border-top-right-radius: var(--n-button-border-radius);
|
| 66 |
+
border-bottom-right-radius: var(--n-button-border-radius);
|
| 67 |
+
border-right: 1px solid var(--n-button-border-color);
|
| 68 |
+
`,[J(`state-border`,`
|
| 69 |
+
border-top-right-radius: var(--n-button-border-radius);
|
| 70 |
+
border-bottom-right-radius: var(--n-button-border-radius);
|
| 71 |
+
`)]),q(`disabled`,`
|
| 72 |
+
cursor: pointer;
|
| 73 |
+
`,[o(`&:hover`,[J(`state-border`,`
|
| 74 |
+
transition: box-shadow .3s var(--n-bezier);
|
| 75 |
+
box-shadow: var(--n-button-box-shadow-hover);
|
| 76 |
+
`),q(`checked`,{color:`var(--n-button-text-color-hover)`})]),W(`focus`,[o(`&:not(:active)`,[J(`state-border`,{boxShadow:`var(--n-button-box-shadow-focus)`})])])]),W(`checked`,`
|
| 77 |
+
background: var(--n-button-color-active);
|
| 78 |
+
color: var(--n-button-text-color-active);
|
| 79 |
+
border-color: var(--n-button-border-color-active);
|
| 80 |
+
`),W(`disabled`,`
|
| 81 |
+
cursor: not-allowed;
|
| 82 |
+
opacity: var(--n-opacity-disabled);
|
| 83 |
+
`)])]);function fe(e,t,n){let r=[],i=!1;for(let a=0;a<e.length;++a){let o=e[a],s=o.type?.name;s===`RadioButton`&&(i=!0);let c=o.props;if(s!==`RadioButton`){r.push(o);continue}if(a===0)r.push(o);else{let e=r[r.length-1].props,i=t===e.value,a=e.disabled,s=t===c.value,l=c.disabled,u=(i?2:0)+ +!a,d=(s?2:0)+ +!l,f={[`${n}-radio-group__splitor--disabled`]:a,[`${n}-radio-group__splitor--checked`]:i},p={[`${n}-radio-group__splitor--disabled`]:l,[`${n}-radio-group__splitor--checked`]:s},m=u<d?p:f;r.push(g(`div`,{class:[`${n}-radio-group__splitor`,m]}),o)}}return{children:r,isButtonGroup:i}}var pe=f({name:`RadioGroup`,props:Object.assign(Object.assign({},L.props),{name:String,value:[String,Number,Boolean],defaultValue:{type:[String,Number,Boolean],default:null},size:String,disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),setup(e){let t=H(null),{mergedSizeRef:n,mergedDisabledRef:r,nTriggerFormChange:i,nTriggerFormInput:a,nTriggerFormBlur:o,nTriggerFormFocus:s}=U(e),{mergedClsPrefixRef:c,inlineThemeDisabled:d,mergedRtlRef:f}=F(e),p=L(`Radio`,`-radio-group`,de,l,e,c),g=H(e.defaultValue),_=h(K(e,`value`),g);function v(t){let{onUpdateValue:n,"onUpdate:value":r}=e;n&&P(n,t),r&&P(r,t),g.value=t,i(),a()}function y(e){let{value:n}=t;n&&(n.contains(e.relatedTarget)||s())}function b(e){let{value:n}=t;n&&(n.contains(e.relatedTarget)||o())}m(ce,{mergedClsPrefixRef:c,nameRef:K(e,`name`),valueRef:_,disabledRef:r,mergedSizeRef:n,doUpdateValue:v});let x=ne(`Radio`,f,c),S=u(()=>{let{value:e}=n,{common:{cubicBezierEaseInOut:t},self:{buttonBorderColor:r,buttonBorderColorActive:i,buttonBorderRadius:a,buttonBoxShadow:o,buttonBoxShadowFocus:s,buttonBoxShadowHover:c,buttonColor:l,buttonColorActive:u,buttonTextColor:d,buttonTextColorActive:f,buttonTextColorHover:m,opacityDisabled:h,[I(`buttonHeight`,e)]:g,[I(`fontSize`,e)]:_}}=p.value;return{"--n-font-size":_,"--n-bezier":t,"--n-button-border-color":r,"--n-button-border-color-active":i,"--n-button-border-radius":a,"--n-button-box-shadow":o,"--n-button-box-shadow-focus":s,"--n-button-box-shadow-hover":c,"--n-button-color":l,"--n-button-color-active":u,"--n-button-text-color":d,"--n-button-text-color-hover":m,"--n-button-text-color-active":f,"--n-height":g,"--n-opacity-disabled":h}}),C=d?ie(`radio-group`,u(()=>n.value[0]),S,e):void 0;return{selfElRef:t,rtlEnabled:x,mergedClsPrefix:c,mergedValue:_,handleFocusout:b,handleFocusin:y,cssVars:d?void 0:S,themeClass:C?.themeClass,onRender:C?.onRender}},render(){var e;let{mergedValue:t,mergedClsPrefix:r,handleFocusin:i,handleFocusout:a}=this,{children:o,isButtonGroup:s}=fe(ee(n(this)),t,r);return(e=this.onRender)==null||e.call(this),g(`div`,{onFocusin:i,onFocusout:a,ref:`selfElRef`,class:[`${r}-radio-group`,this.rtlEnabled&&`${r}-radio-group--rtl`,this.themeClass,s&&`${r}-radio-group--button-group`],style:this.cssVars},o)}});async function me(){return G(`/api/hermes/auth/copilot/start`,{method:`POST`})}async function he(e){return G(`/api/hermes/auth/copilot/poll/${e}`)}async function $(){return G(`/api/hermes/auth/copilot/check-token`)}async function ge(){return G(`/api/hermes/auth/copilot/enable`,{method:`POST`})}async function _e(){return G(`/api/hermes/auth/copilot/disable`,{method:`POST`})}var ve={class:`provider-card`},ye={class:`card-header`},be={class:`provider-name`},xe={class:`card-body`},Se={class:`info-row`},Ce={class:`info-label`},we={class:`info-value mono`},Te={class:`info-row`},Ee={class:`info-label`},De={class:`info-value mono`},Oe={class:`card-actions`},ke=A(f({__name:`ProviderCard`,props:{provider:{}},setup(e){let t=e,{t:n}=V(),r=Q(),o=a(),s=ae(),c=X(),l=i(),d=u(()=>t.provider.provider.startsWith(`custom:`)),f=u(()=>t.provider.provider===`copilot`),m=u(()=>t.provider.label),h=H(!1);async function g(){let e=``;if(f.value)try{let t=await $();t.source===`env`?e=n(`models.copilotDeleteHintEnv`):t.source===`gh-cli`?e=n(`models.copilotDeleteHintGhCli`):t.source===`apps-json`&&(e=n(`models.copilotDeleteHintAppsJson`))}catch{}l.warning({title:n(`models.deleteProvider`),content:f.value&&e?`${n(`models.deleteConfirm`,{name:m.value})}\n\n${e}`:n(`models.deleteConfirm`,{name:m.value}),positiveText:n(`common.delete`),negativeText:n(`common.cancel`),onPositiveClick:async()=>{h.value=!0;try{if(f.value?(await _e(),s.clearProviderFromSessions(`copilot`),await Promise.all([r.fetchProviders(),o.loadModels()])):await r.removeProvider(t.provider.provider),!o.selectedModel&&o.modelGroups.length>0){let e=o.modelGroups.find(e=>e.models.length>0);e&&await o.switchModel(e.models[0],e.provider)}c.success(n(`models.providerDeleted`))}catch(e){c.error(e.message)}finally{h.value=!1}}})}return(t,r)=>(p(),R(`div`,ve,[y(`div`,ye,[y(`h3`,be,j(m.value),1),y(`span`,{class:te([`type-badge`,d.value?`custom`:`builtin`])},j(d.value?O(n)(`models.customType`):O(n)(`models.builtIn`)),3)]),y(`div`,xe,[y(`div`,Se,[y(`span`,Ce,j(O(n)(`models.provider`)),1),y(`code`,we,j(e.provider.provider),1)]),y(`div`,Te,[y(`span`,Ee,j(O(n)(`models.baseUrl`)),1),y(`code`,De,j(e.provider.base_url),1)])]),y(`div`,Oe,[x(O(z),{size:`tiny`,quaternary:``,type:`error`,loading:h.value,onClick:g},{default:S(()=>[v(j(O(n)(`common.delete`)),1)]),_:1},8,[`loading`])])]))}}),[[`__scopeId`,`data-v-e7818f5a`]]),Ae={key:0,class:`empty-state`},je={key:1,class:`providers-grid`},Me=A(f({__name:`ProvidersPanel`,setup(e){let{t}=V(),n=Q();return(e,r)=>O(n).providers.length===0?(p(),R(`div`,Ae,[r[0]||=y(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,class:`empty-icon`},[y(`path`,{d:`M12 2L2 7l10 5 10-5-10-5z`}),y(`path`,{d:`M2 17l10 5 10-5`}),y(`path`,{d:`M2 12l10 5 10-5`})],-1),y(`p`,null,j(O(t)(`models.noProviders`)),1)])):(p(),R(`div`,je,[(p(!0),R(oe,null,re(O(n).providers,e=>(p(),B(ke,{key:e.provider,provider:e},null,8,[`provider`]))),128))]))}}),[[`__scopeId`,`data-v-76eec30b`]]);async function Ne(){return G(`/api/hermes/auth/codex/start`,{method:`POST`})}async function Pe(e){return G(`/api/hermes/auth/codex/poll/${e}`)}var Fe={class:`codex-login`},Ie={key:0,class:`codex-login__state`},Le={key:1,class:`codex-login__state`},Re={class:`codex-login__hint`},ze={class:`codex-login__code-text`},Be={key:2,class:`codex-login__state codex-login__state--success`},Ve={key:3,class:`codex-login__state`},He={class:`codex-login__error`},Ue={key:4,class:`codex-login__state`},We={class:`codex-login__error`},Ge={class:`modal-footer`},Ke=A(f({__name:`CodexLoginModal`,emits:[`close`,`success`],setup(e,{emit:t}){let{t:n}=V(),r=t,i=X(),a=H(!0),o=H(`idle`),c=H(``),l=H(``),u=H(``),d=H(``),f=null;async function m(){o.value=`loading`,d.value=``;try{let e=await Ne();c.value=e.user_code,l.value=e.verification_url,u.value=e.session_id,o.value=`waiting`,h()}catch(e){o.value=`error`;let t=e.message||``;try{let e=t.match(/\{[\s\S]*\}$/);e?d.value=JSON.parse(e[0]).error||t:d.value=t}catch{d.value=t}i.error(d.value)}}function h(){g(),f=setTimeout(async()=>{try{let e=await Pe(u.value);e.status===`pending`?h():e.status===`approved`?(o.value=`approved`,i.success(n(`models.codexApproved`)),setTimeout(()=>{a.value=!1,setTimeout(()=>r(`success`),200)},1e3)):e.status===`expired`?o.value=`expired`:e.status===`error`&&(o.value=`error`,d.value=e.error||`Unknown error`)}catch{h()}},3e3)}function g(){f&&=(clearTimeout(f),null)}function _(){g(),a.value=!1,setTimeout(()=>r(`close`),200)}async function b(){await Z(c.value)?i.success(n(`models.codexCopyCode`)):i.error(n(`models.codexCopyCode`)+` ✗`)}function C(){window.open(l.value,`_blank`)}function w(){o.value=`idle`,c.value=``,l.value=``,u.value=``,d.value=``,m()}return T(()=>{g()}),m(),(e,t)=>{let i=D(`NSpin`);return p(),B(O(k),{show:a.value,"onUpdate:show":t[0]||=e=>a.value=e,preset:`card`,title:O(n)(`models.codexLoginTitle`),style:{width:`min(440px, calc(100vw - 32px))`},"mask-closable":o.value!==`waiting`,onAfterLeave:t[1]||=e=>r(`close`)},{footer:S(()=>[y(`div`,Ge,[x(O(z),{disabled:o.value===`waiting`,onClick:_},{default:S(()=>[v(j(O(n)(`common.cancel`)),1)]),_:1},8,[`disabled`])])]),default:S(()=>[y(`div`,Fe,[o.value===`idle`||o.value===`loading`?(p(),R(`div`,Ie,[x(i,{size:`small`})])):o.value===`waiting`?(p(),R(`div`,Le,[y(`p`,Re,j(O(n)(`models.codexWaiting`)),1),y(`div`,{class:`codex-login__code`,onClick:b},[y(`span`,ze,j(c.value),1),t[2]||=y(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),y(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})],-1)]),x(O(z),{type:`primary`,block:``,onClick:C},{icon:S(()=>[...t[3]||=[y(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6`}),y(`polyline`,{points:`15 3 21 3 21 9`}),y(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})],-1)]]),default:S(()=>[v(` `+j(O(n)(`models.codexOpenLink`)),1)]),_:1})])):o.value===`approved`?(p(),R(`div`,Be,[t[4]||=y(`svg`,{width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M22 11.08V12a10 10 0 11-5.93-9.14`}),y(`polyline`,{points:`22 4 12 14.01 9 11.01`})],-1),y(`p`,null,j(O(n)(`models.codexApproved`)),1)])):o.value===`expired`?(p(),R(`div`,Ve,[y(`p`,He,j(O(n)(`models.codexExpired`)),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):o.value===`error`?(p(),R(`div`,Ue,[y(`p`,We,j(d.value),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):s(``,!0)])]),_:1},8,[`show`,`title`,`mask-closable`])}}}),[[`__scopeId`,`data-v-b8a659c8`]]);async function qe(){return G(`/api/hermes/auth/nous/start`,{method:`POST`})}async function Je(e){return G(`/api/hermes/auth/nous/poll/${e}`)}var Ye={class:`nous-login`},Xe={key:0,class:`nous-login__state`},Ze={key:1,class:`nous-login__state`},Qe={class:`nous-login__hint`},$e={class:`nous-login__code-text`},et={key:2,class:`nous-login__state nous-login__state--success`},tt={key:3,class:`nous-login__state`},nt={class:`nous-login__error`},rt={key:4,class:`nous-login__state`},it={class:`nous-login__error`},at={class:`modal-footer`},ot=A(f({__name:`NousLoginModal`,emits:[`close`,`success`],setup(e,{emit:t}){let{t:n}=V(),r=t,i=X(),a=H(!0),o=H(`idle`),c=H(``),l=H(``),u=H(``),d=H(``),f=null;async function m(){o.value=`loading`,d.value=``;try{let e=await qe();c.value=e.user_code,l.value=e.verification_url,u.value=e.session_id,o.value=`waiting`,h()}catch(e){o.value=`error`;let t=e.message||``;try{let e=t.match(/\{[\s\S]*\}$/);e?d.value=JSON.parse(e[0]).error||t:d.value=t}catch{d.value=t}i.error(d.value)}}function h(){g(),f=setTimeout(async()=>{try{let e=await Je(u.value);e.status===`pending`?h():e.status===`approved`?(o.value=`approved`,i.success(n(`models.nousApproved`)),setTimeout(()=>{a.value=!1,setTimeout(()=>r(`success`),200)},1e3)):e.status===`expired`?o.value=`expired`:e.status===`denied`?(o.value=`error`,d.value=n(`models.nousDenied`)):e.status===`error`&&(o.value=`error`,d.value=e.error||`Unknown error`)}catch{h()}},3e3)}function g(){f&&=(clearTimeout(f),null)}function _(){g(),a.value=!1,setTimeout(()=>r(`close`),200)}async function b(){await Z(c.value)?i.success(n(`models.nousCopyCode`)):i.error(n(`models.nousCopyCode`)+` ✗`)}function C(){window.open(l.value,`_blank`)}function w(){o.value=`idle`,c.value=``,l.value=``,u.value=``,d.value=``,m()}return T(()=>{g()}),m(),(e,t)=>(p(),B(O(k),{show:a.value,"onUpdate:show":t[0]||=e=>a.value=e,preset:`card`,title:O(n)(`models.nousLoginTitle`),style:{width:`min(440px, calc(100vw - 32px))`},"mask-closable":o.value!==`waiting`,onAfterLeave:t[1]||=e=>r(`close`)},{footer:S(()=>[y(`div`,at,[x(O(z),{disabled:o.value===`waiting`,onClick:_},{default:S(()=>[v(j(O(n)(`common.cancel`)),1)]),_:1},8,[`disabled`])])]),default:S(()=>[y(`div`,Ye,[o.value===`idle`||o.value===`loading`?(p(),R(`div`,Xe,[x(O(Y),{size:`small`})])):o.value===`waiting`?(p(),R(`div`,Ze,[y(`p`,Qe,j(O(n)(`models.nousWaiting`)),1),y(`div`,{class:`nous-login__code`,onClick:b},[y(`span`,$e,j(c.value),1),t[2]||=y(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),y(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})],-1)]),x(O(z),{type:`primary`,block:``,onClick:C},{icon:S(()=>[...t[3]||=[y(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6`}),y(`polyline`,{points:`15 3 21 3 21 9`}),y(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})],-1)]]),default:S(()=>[v(` `+j(O(n)(`models.nousOpenLink`)),1)]),_:1})])):o.value===`approved`?(p(),R(`div`,et,[t[4]||=y(`svg`,{width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M22 11.08V12a10 10 0 11-5.93-9.14`}),y(`polyline`,{points:`22 4 12 14.01 9 11.01`})],-1),y(`p`,null,j(O(n)(`models.nousApproved`)),1)])):o.value===`expired`?(p(),R(`div`,tt,[y(`p`,nt,j(O(n)(`models.nousExpired`)),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):o.value===`error`?(p(),R(`div`,rt,[y(`p`,it,j(d.value),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):s(``,!0)])]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-13765003`]]),st={class:`copilot-login`},ct={key:0,class:`copilot-login__state`},lt={key:1,class:`copilot-login__state`},ut={class:`copilot-login__hint`},dt={class:`copilot-login__code-text`},ft={key:2,class:`copilot-login__state copilot-login__state--success`},pt={key:3,class:`copilot-login__state`},mt={class:`copilot-login__error`},ht={key:4,class:`copilot-login__state`},gt={class:`copilot-login__error`},_t={class:`modal-footer`},vt=A(f({__name:`CopilotLoginModal`,emits:[`close`,`success`],setup(e,{emit:t}){let{t:n}=V(),r=t,i=X(),a=H(!0),o=H(`idle`),c=H(``),l=H(``),u=H(``),d=H(``),f=null;async function m(){o.value=`loading`,d.value=``;try{let e=await me();c.value=e.user_code,l.value=e.verification_url,u.value=e.session_id,o.value=`waiting`,h()}catch(e){o.value=`error`;let t=e?.message||``;try{let e=t.match(/\{[\s\S]*\}$/);e?d.value=JSON.parse(e[0]).error||t:d.value=t}catch{d.value=t}i.error(d.value)}}function h(){g(),f=setTimeout(async()=>{try{let e=await he(u.value);e.status===`pending`?h():e.status===`approved`?(o.value=`approved`,i.success(n(`models.copilotApproved`)),setTimeout(()=>{a.value=!1,setTimeout(()=>r(`success`),200)},1e3)):e.status===`expired`?o.value=`expired`:e.status===`denied`?(o.value=`error`,d.value=n(`models.copilotDenied`)):e.status===`error`&&(o.value=`error`,d.value=e.error||`Unknown error`)}catch{h()}},3e3)}function g(){f&&=(clearTimeout(f),null)}function _(){g(),a.value=!1,setTimeout(()=>r(`close`),200)}async function b(){await Z(c.value)?i.success(n(`models.copilotCopyCode`)):i.error(n(`models.copilotCopyCode`)+` ✗`)}function C(){window.open(l.value,`_blank`)}function w(){o.value=`idle`,c.value=``,l.value=``,u.value=``,d.value=``,m()}return T(()=>{g()}),m(),(e,t)=>(p(),B(O(k),{show:a.value,"onUpdate:show":t[0]||=e=>a.value=e,preset:`card`,title:O(n)(`models.copilotLoginTitle`),style:{width:`min(440px, calc(100vw - 32px))`},"mask-closable":o.value!==`waiting`,onAfterLeave:t[1]||=e=>r(`close`)},{footer:S(()=>[y(`div`,_t,[x(O(z),{disabled:o.value===`waiting`,onClick:_},{default:S(()=>[v(j(O(n)(`common.cancel`)),1)]),_:1},8,[`disabled`])])]),default:S(()=>[y(`div`,st,[o.value===`idle`||o.value===`loading`?(p(),R(`div`,ct,[x(O(Y),{size:`small`})])):o.value===`waiting`?(p(),R(`div`,lt,[y(`p`,ut,j(O(n)(`models.copilotWaiting`)),1),y(`div`,{class:`copilot-login__code`,onClick:b},[y(`span`,dt,j(c.value),1),t[2]||=y(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`}),y(`path`,{d:`M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1`})],-1)]),x(O(z),{type:`primary`,block:``,onClick:C},{icon:S(()=>[...t[3]||=[y(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6`}),y(`polyline`,{points:`15 3 21 3 21 9`}),y(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})],-1)]]),default:S(()=>[v(` `+j(O(n)(`models.copilotOpenLink`)),1)]),_:1})])):o.value===`approved`?(p(),R(`div`,ft,[t[4]||=y(`svg`,{width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`path`,{d:`M22 11.08V12a10 10 0 11-5.93-9.14`}),y(`polyline`,{points:`22 4 12 14.01 9 11.01`})],-1),y(`p`,null,j(O(n)(`models.copilotApproved`)),1)])):o.value===`expired`?(p(),R(`div`,pt,[y(`p`,mt,j(O(n)(`models.copilotExpired`)),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):o.value===`error`?(p(),R(`div`,ht,[y(`p`,gt,j(d.value),1),x(O(z),{size:`small`,onClick:w},{default:S(()=>[v(j(O(n)(`common.retry`)),1)]),_:1})])):s(``,!0)])]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-fe3fcc7e`]]),yt={style:{display:`flex`,gap:`12px`}},bt={style:{display:`flex`,gap:`8px`,width:`100%`}},xt={class:`modal-footer`},St=`openai-codex`,Ct=`nous`,wt=`copilot`,Tt=`alibaba-coding-plan`,Et=A(f({__name:`ProviderFormModal`,emits:[`close`,`saved`],setup(n,{emit:a}){let{t:o}=V(),c=a,l=Q(),f=X(),m=i(),h=H(!0),g=H(!1),b=H(!1),C=H(!1),T=H(!1),D=H(!1),A=H(!1),M=H(`preset`),N=H(null),P=H({name:``,base_url:``,api_key:``,model:``,context_length:null}),F=H([]),I={intl:`https://coding-intl.dashscope.aliyuncs.com/v1`,cn:`https://coding.dashscope.aliyuncs.com/v1`},L=u(()=>N.value===St),R=u(()=>N.value===Ct),ee=u(()=>N.value===wt),U=u(()=>N.value===Tt),W=H(`intl`),te=u(()=>l.allProviders.map(e=>({label:e.label,value:e.provider})));function ne(e){let t=e.replace(/^https?:\/\//,``).replace(/\/v1\/?$/,``).split(`/`)[0];return t.includes(`localhost`)||t.includes(`127.0.0.1`)?o(`models.local`,{host:t}):t.charAt(0).toUpperCase()+t.slice(1)}E(N,e=>{if(P.value.model=``,W.value=`intl`,e){let t=l.allProviders.find(t=>t.provider===e);t&&(P.value.name=t.label,P.value.base_url=t.base_url,F.value=t.models.map(e=>({label:e,value:e})),t.models.length>0&&(P.value.model=t.models[0])),e===wt&&J()}}),E(W,e=>{U.value&&(P.value.base_url=I[e])}),E(()=>P.value.base_url,e=>{M.value===`custom`&&e.trim()&&!P.value.name&&(P.value.name=ne(e.trim()))}),E(M,()=>{F.value=[],P.value={name:``,base_url:``,api_key:``,model:``,context_length:null},N.value=null}),w(()=>{l.providers.length===0&&l.fetchProviders()});async function G(){let{base_url:e}=P.value;if(!e.trim()){f.warning(o(`models.enterBaseUrl`));return}b.value=!0;try{let t=e.replace(/\/+$/,``),n=/\/v\d+\/?$/.test(t)?`${t}/models`:`${t}/v1/models`,r={};P.value.api_key.trim()&&(r.Authorization=`Bearer ${P.value.api_key.trim()}`);let i=await fetch(n,{headers:r,signal:AbortSignal.timeout(8e3)});if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json();if(!Array.isArray(a.data))throw Error(o(`models.unexpectedFormat`));F.value=a.data.map(e=>({label:e.id,value:e.id})),F.value.length>0&&!P.value.model&&(P.value.model=F.value[0].value),f.success(o(`models.foundModels`,{count:F.value.length}))}catch(e){f.error(o(`models.fetchFailed`)+`: `+e.message)}finally{b.value=!1}}async function re(){if(M.value===`preset`&&!N.value){f.warning(o(`models.selectProviderRequired`));return}if(L.value){C.value=!0;return}if(R.value){T.value=!0;return}if(ee.value){J();return}if(!P.value.base_url.trim()){f.warning(o(`models.baseUrlRequired`));return}if(!P.value.api_key.trim()){f.warning(o(`models.apiKeyRequired`));return}if(!P.value.model){f.warning(o(`models.modelRequired`));return}g.value=!0;try{let e=M.value===`preset`?N.value:null,t=P.value.context_length??void 0;await l.addProvider({name:P.value.name.trim(),base_url:P.value.base_url.trim(),api_key:P.value.api_key.trim(),model:P.value.model,context_length:t,providerKey:e}),f.success(o(`models.providerAdded`)),c(`saved`)}catch(e){f.error(e.message)}finally{g.value=!1}}async function K(){C.value=!1,f.success(o(`models.providerAdded`)),c(`saved`)}async function ie(){T.value=!1,f.success(o(`models.providerAdded`)),c(`saved`)}async function q(){D.value=!1,f.success(o(`models.providerAdded`)),c(`saved`)}function ae(e){return e===`env`?o(`models.copilotAddSourceEnv`):e===`gh-cli`?o(`models.copilotAddSourceGhCli`):e===`apps-json`?o(`models.copilotAddSourceAppsJson`):``}async function J(){if(!A.value){A.value=!0;try{let e=await $();if(e.has_token){let t=ae(e.source);m.success({title:o(`models.copilotAddDetectedTitle`),content:t?`${o(`models.copilotAddDetected`)}\n\n${t}`:o(`models.copilotAddDetected`),positiveText:o(`common.add`),negativeText:o(`common.cancel`),onPositiveClick:async()=>{try{await ge(),f.success(o(`models.providerAdded`)),c(`saved`)}catch(e){f.error(e?.message??String(e))}},onNegativeClick:()=>{N.value=null},onClose:()=>{N.value=null}})}else D.value=!0}catch(e){f.error(e?.message??String(e)),N.value=null}finally{A.value=!1}}}function Y(){D.value=!1,N.value=null}function oe(){h.value=!1,setTimeout(()=>c(`close`),200)}return(n,i)=>(p(),B(O(k),{show:h.value,"onUpdate:show":i[11]||=e=>h.value=e,preset:`card`,title:O(o)(`models.addProvider`),style:{width:`min(520px, calc(100vw - 32px))`},"mask-closable":!g.value&&!C.value&&!T.value&&!D.value,onAfterLeave:i[12]||=e=>c(`close`)},{footer:S(()=>[y(`div`,xt,[x(O(z),{onClick:oe},{default:S(()=>[v(j(O(o)(`common.cancel`)),1)]),_:1}),x(O(z),{type:`primary`,loading:g.value,onClick:re},{default:S(()=>[v(j(O(o)(`common.add`)),1)]),_:1},8,[`loading`])])]),default:S(()=>[x(O(e),{"label-placement":`top`},{default:S(()=>[x(O(t),{label:O(o)(`models.providerType`)},{default:S(()=>[y(`div`,yt,[x(O(z),{type:M.value===`preset`?`primary`:`default`,size:`small`,onClick:i[0]||=e=>M.value=`preset`},{default:S(()=>[v(j(O(o)(`models.preset`)),1)]),_:1},8,[`type`]),x(O(z),{type:M.value===`custom`?`primary`:`default`,size:`small`,onClick:i[1]||=e=>M.value=`custom`},{default:S(()=>[v(j(O(o)(`models.custom`)),1)]),_:1},8,[`type`])])]),_:1},8,[`label`]),M.value===`preset`?(p(),B(O(t),{key:0,label:O(o)(`models.selectProvider`),required:``},{default:S(()=>[x(O(d),{value:N.value,"onUpdate:value":i[2]||=e=>N.value=e,options:te.value,placeholder:O(o)(`models.chooseProvider`),filterable:``},null,8,[`value`,`options`,`placeholder`])]),_:1},8,[`label`])):s(``,!0),M.value===`custom`?(p(),B(O(t),{key:1,label:O(o)(`models.name`)},{default:S(()=>[x(O(_),{value:P.value.name,"onUpdate:value":i[3]||=e=>P.value.name=e,placeholder:O(o)(`models.autoGeneratedName`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])):s(``,!0),U.value?(p(),B(O(t),{key:2,label:O(o)(`models.region`)},{default:S(()=>[x(O(pe),{value:W.value,"onUpdate:value":i[4]||=e=>W.value=e},{default:S(()=>[x(O(ue),{value:`intl`},{default:S(()=>[v(j(O(o)(`models.regionIntl`)),1)]),_:1}),x(O(ue),{value:`cn`},{default:S(()=>[v(j(O(o)(`models.regionCn`)),1)]),_:1})]),_:1},8,[`value`])]),_:1},8,[`label`])):s(``,!0),!L.value&&!R.value?(p(),B(O(t),{key:3,label:O(o)(`models.baseUrl`),required:``},{default:S(()=>[x(O(_),{value:P.value.base_url,"onUpdate:value":i[5]||=e=>P.value.base_url=e,placeholder:O(o)(`models.baseUrlPlaceholder`),disabled:M.value===`preset`},null,8,[`value`,`placeholder`,`disabled`])]),_:1},8,[`label`])):s(``,!0),!L.value&&!R.value?(p(),B(O(t),{key:4,label:O(o)(`models.apiKey`),required:``},{default:S(()=>[x(O(_),{value:P.value.api_key,"onUpdate:value":i[6]||=e=>P.value.api_key=e,type:`password`,"show-password-on":`click`,placeholder:O(o)(`models.apiKeyPlaceholder`),autocomplete:`off`},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])):s(``,!0),x(O(t),{label:O(o)(`models.defaultModel`),required:``},{default:S(()=>[y(`div`,bt,[x(O(d),{value:P.value.model,"onUpdate:value":i[7]||=e=>P.value.model=e,options:F.value,filterable:``,tag:``,placeholder:O(o)(`models.selectOrInput`),style:{flex:`1`}},null,8,[`value`,`options`,`placeholder`]),M.value===`custom`||M.value===`preset`&&F.value.length===0?(p(),B(O(z),{key:0,loading:b.value,onClick:G},{default:S(()=>[v(j(O(o)(`common.fetch`)),1)]),_:1},8,[`loading`])):s(``,!0)])]),_:1},8,[`label`]),M.value===`custom`?(p(),B(O(t),{key:5,label:O(o)(`models.contextLength`)},{default:S(()=>[x(O(r),{value:P.value.context_length,"onUpdate:value":i[8]||=e=>P.value.context_length=e,placeholder:O(o)(`models.contextLengthPlaceholder`),min:0,clearable:``,style:{width:`100%`}},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])):s(``,!0)]),_:1}),C.value?(p(),B(Ke,{key:0,onClose:i[9]||=e=>C.value=!1,onSuccess:K})):s(``,!0),T.value?(p(),B(ot,{key:1,onClose:i[10]||=e=>T.value=!1,onSuccess:ie})):s(``,!0),D.value?(p(),B(vt,{key:2,onClose:Y,onSuccess:q})):s(``,!0)]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-975eb2e9`]]),Dt={class:`models-view`},Ot={class:`page-header`},kt={class:`header-title`},At={class:`models-content`},jt=A(f({__name:`ModelsView`,setup(e){let{t}=V(),n=Q(),r=a(),i=H(!1);w(async()=>{try{await $()}catch{}n.fetchProviders()});function o(){i.value=!0}function c(){i.value=!1}async function l(){await n.fetchProviders(),r.loadModels(),c()}return(e,r)=>(p(),R(`div`,Dt,[y(`header`,Ot,[y(`h2`,kt,j(O(t)(`models.title`)),1),x(O(z),{type:`primary`,size:`small`,onClick:o},{icon:S(()=>[...r[0]||=[y(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[y(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),y(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:S(()=>[v(` `+j(O(t)(`models.addProvider`)),1)]),_:1})]),y(`div`,At,[x(O(Y),{show:O(n).loading&&O(n).providers.length===0},{default:S(()=>[x(Me)]),_:1},8,[`show`])]),i.value?(p(),B(Et,{key:0,onClose:c,onSaved:l})):s(``,!0)]))}}),[[`__scopeId`,`data-v-2fa030eb`]]);export{jt as default};
|
webui/assets/Popconfirm-ClpYjEYd.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{$n as e,Dr as t,Fr as n,Kr as r,L as i,Lr as a,Pn as o,R as s,Rr as c,Y as l,cn as u,dn as d,er as f,fn as p,g as m,hn as h,in as g,it as _,k as v,ni as y,nt as b,on as x,pn as S,ri as C,rn as w,st as T,tr as E}from"./index-Cl8-DFW_.js";var D=o(`n-popconfirm`),O={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},k=p(O),A=n({name:`NPopconfirmPanel`,props:O,setup(e){let{localeRef:n}=T(`Popconfirm`),{inlineThemeDisabled:r}=g(),{mergedClsPrefixRef:i,mergedThemeRef:a,props:o}=c(D),s=t(()=>{let{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:n,iconColor:r}}=a.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":n,"--n-icon-color":r}}),l=r?w(`popconfirm-panel`,void 0,s,o):void 0;return Object.assign(Object.assign({},T(`Popconfirm`)),{mergedClsPrefix:i,cssVars:r?void 0:s,localizedPositiveText:t(()=>e.positiveText||n.value.positiveText),localizedNegativeText:t(()=>e.negativeText||n.value.negativeText),positiveButtonProps:C(o,`positiveButtonProps`),negativeButtonProps:C(o,`negativeButtonProps`),handlePositiveClick(t){e.onPositiveClick(t)},handleNegativeClick(t){e.onNegativeClick(t)},themeClass:l?.themeClass,onRender:l?.onRender})},render(){var e;let{mergedClsPrefix:t,showIcon:n,$slots:r}=this,i=x(r.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&a(v,Object.assign({size:`small`,onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&a(v,Object.assign({size:`small`,type:`primary`,onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(e=this.onRender)==null||e.call(this),a(`div`,{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},u(r.default,e=>n||e?a(`div`,{class:`${t}-popconfirm__body`},n?a(`div`,{class:`${t}-popconfirm__icon`},x(r.icon,()=>[a(b,{clsPrefix:t},{default:()=>a(l,null)})])):null,e):null),i?a(`div`,{class:[`${t}-popconfirm__action`]},i):null)}}),j=f(`popconfirm`,[E(`body`,`
|
| 2 |
+
font-size: var(--n-font-size);
|
| 3 |
+
display: flex;
|
| 4 |
+
align-items: center;
|
| 5 |
+
flex-wrap: nowrap;
|
| 6 |
+
position: relative;
|
| 7 |
+
`,[E(`icon`,`
|
| 8 |
+
display: flex;
|
| 9 |
+
font-size: var(--n-icon-size);
|
| 10 |
+
color: var(--n-icon-color);
|
| 11 |
+
transition: color .3s var(--n-bezier);
|
| 12 |
+
margin: 0 8px 0 0;
|
| 13 |
+
`)]),E(`action`,`
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: flex-end;
|
| 16 |
+
`,[e(`&:not(:first-child)`,`margin-top: 8px`),f(`button`,[e(`&:not(:last-child)`,`margin-right: 8px;`)])])]),M=n({name:`Popconfirm`,props:Object.assign(Object.assign(Object.assign({},_.props),s),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:`click`},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function}),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=g(),n=_(`Popconfirm`,`-popconfirm`,j,m,e,t),i=y(null);function a(t){if(!i.value?.getMergedShow())return;let{onPositiveClick:n,"onUpdate:show":r}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=i.value)==null||t.setShow(!1),r&&h(r,!1))})}function o(t){if(!i.value?.getMergedShow())return;let{onNegativeClick:n,"onUpdate:show":r}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=i.value)==null||t.setShow(!1),r&&h(r,!1))})}return r(D,{mergedThemeRef:n,mergedClsPrefixRef:t,props:e}),{setShow(e){var t;(t=i.value)==null||t.setShow(e)},syncPosition(){var e;(e=i.value)==null||e.syncPosition()},mergedTheme:n,popoverInstRef:i,handlePositiveClick:a,handleNegativeClick:o}},render(){let{$slots:e,$props:t,mergedTheme:n}=this;return a(i,Object.assign({},d(t,k),{theme:n.peers.Popover,themeOverrides:n.peerOverrides.Popover,internalExtraClass:[`popconfirm`],ref:`popoverInstRef`}),{trigger:e.trigger,default:()=>{let n=S(t,k);return a(A,Object.assign({},n,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}});export{M as t};
|
webui/assets/ProfilesView-BKAx9zCB.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{n as e,t}from"./FormItem-DB8yIr9W.js";import{t as n}from"./Upload-DNhu4d4-.js";import{t as r}from"./composables-DggaE5oy.js";import{t as i}from"./Switch-CDXAYhwk.js";import{Ar as a,Dr as o,Fr as s,Gr as c,I as l,N as u,Nr as d,Or as f,Pr as p,Qr as m,Ur as h,ai as g,b as _,c as v,ci as y,jr as b,k as x,kr as S,lr as C,ni as w,oi as T,qr as E,s as D,u as O,wr as k,xr as A,y as j}from"./index-Cl8-DFW_.js";var ee={class:`card-header`},te={class:`profile-name`},ne={class:`card-body`},re={class:`info-row`},ie={class:`info-label`},ae={class:`info-value mono`},oe={class:`info-row`},se={class:`info-label`},M={class:`info-value mono`},N={class:`toggle-text`},P={key:0,class:`card-detail`},F={class:`info-row`},I={class:`info-label`},L={class:`info-value`},R={class:`info-row`},z={class:`info-label`},B={class:`info-value mono detail-path`},V={class:`info-row`},H={class:`info-label`},U={class:`info-value`},W={class:`info-row`},G={class:`info-label`},K={class:`info-value`},ce={class:`info-row`},le={class:`info-label`},ue={class:`info-value`},de={class:`card-actions`},q=v(s({__name:`ProfileCard`,props:{profile:{}},setup(e,{emit:t}){let n=e,{t:i}=C(),s=D(),u=j(),h=r(),_=w(!1),v=w(!1),E=w(!1),A=w(!1),q=w(null),J=o(()=>n.profile.name===`default`);async function Y(){if(_.value){_.value=!1;return}_.value=!0,v.value=!0;try{q.value=await s.fetchProfileDetail(n.profile.name)}finally{v.value=!1}}async function X(){A.value=!0;try{await s.switchProfile(n.profile.name)?window.location.reload():u.error(i(`profiles.switchFailed`))}finally{A.value=!1}}function Z(){h.warning({title:i(`profiles.delete`),content:i(`profiles.deleteConfirm`,{name:n.profile.name}),positiveText:i(`common.delete`),negativeText:i(`common.cancel`),onPositiveClick:async()=>{await s.deleteProfile(n.profile.name)?u.success(i(`profiles.deleteSuccess`)):u.error(i(`profiles.deleteFailed`))}})}async function Q(){E.value=!0;try{await s.exportProfile(n.profile.name)?u.success(i(`profiles.exportSuccess`)):u.error(i(`profiles.exportFailed`))}finally{E.value=!1}}return(t,n)=>(c(),b(`div`,{class:T([`profile-card`,{active:e.profile.active}])},[f(`div`,ee,[f(`h3`,te,y(e.profile.name),1),e.profile.active?(c(),S(g(l),{key:0,size:`tiny`,type:`success`,bordered:!1},{default:m(()=>[d(y(g(i)(`profiles.active`)),1)]),_:1})):a(``,!0)]),f(`div`,ne,[f(`div`,re,[f(`span`,ie,y(g(i)(`profiles.model`)),1),f(`code`,ae,y(e.profile.model),1)]),f(`div`,oe,[f(`span`,se,y(g(i)(`profiles.gateway`)),1),f(`code`,M,y(e.profile.gateway),1)])]),f(`div`,{class:`card-detail-toggle`,onClick:Y},[(c(),b(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:T([`toggle-icon`,{expanded:_.value}])},[...n[0]||=[f(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2)),f(`span`,N,y(_.value?g(i)(`common.collapse`):g(i)(`common.expand`)),1)]),_.value?(c(),b(`div`,P,[p(g(O),{show:v.value,size:`small`},{default:m(()=>[q.value?(c(),b(k,{key:0},[f(`div`,F,[f(`span`,I,y(g(i)(`profiles.provider`)),1),f(`span`,L,y(q.value.provider),1)]),f(`div`,R,[f(`span`,z,y(g(i)(`profiles.path`)),1),f(`code`,B,y(q.value.path),1)]),f(`div`,V,[f(`span`,H,y(g(i)(`profiles.skills`)),1),f(`span`,U,y(q.value.skills),1)]),f(`div`,W,[f(`span`,G,y(g(i)(`profiles.hasEnv`)),1),f(`span`,K,y(q.value.hasEnv?`Yes`:`No`),1)]),f(`div`,ce,[f(`span`,le,y(g(i)(`profiles.hasSoulMd`)),1),f(`span`,ue,y(q.value.hasSoulMd?`Yes`:`No`),1)])],64)):a(``,!0)]),_:1},8,[`show`])])):a(``,!0),f(`div`,de,[e.profile.active?a(``,!0):(c(),S(g(x),{key:0,size:`tiny`,loading:A.value,quaternary:``,type:`primary`,onClick:X},{default:m(()=>[d(y(g(i)(`profiles.switchTo`)),1)]),_:1},8,[`loading`])),p(g(x),{size:`tiny`,quaternary:``,type:`error`,disabled:J.value||e.profile.active,onClick:Z},{default:m(()=>[d(y(g(i)(`common.delete`)),1)]),_:1},8,[`disabled`]),p(g(x),{size:`tiny`,quaternary:``,loading:E.value,onClick:Q},{default:m(()=>[d(y(g(i)(`profiles.export`)),1)]),_:1},8,[`loading`])])],2))}}),[[`__scopeId`,`data-v-ee1f1fe2`]]),J={key:0,class:`empty-state`},Y={key:1,class:`profiles-grid`},X=v(s({__name:`ProfilesPanel`,emits:[`rename`],setup(e){let{t}=C(),n=D();return(e,r)=>g(n).profiles.length===0?(c(),b(`div`,J,[r[1]||=f(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,class:`empty-icon`},[f(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),f(`circle`,{cx:`12`,cy:`7`,r:`4`})],-1),f(`p`,null,y(g(t)(`profiles.noProfiles`)),1)])):(c(),b(`div`,Y,[(c(!0),b(k,null,E(g(n).profiles,t=>(c(),S(q,{key:t.name,profile:t,onRename:r[0]||=t=>e.$emit(`rename`,t)},null,8,[`profile`]))),128))]))}}),[[`__scopeId`,`data-v-51e73d5a`]]),Z={class:`modal-footer`},Q=v(s({__name:`ProfileCreateModal`,emits:[`close`,`saved`],setup(n,{emit:r}){let a=r,{t:o}=C(),s=D(),l=j(),h=w(!0),v=w(!1),b=w(``),T=w(!1);async function E(){if(!b.value.trim()){l.warning(o(`profiles.namePlaceholder`));return}v.value=!0;try{await s.createProfile(b.value.trim(),T.value)?(l.success(o(`profiles.createSuccess`,{name:b.value.trim()})),a(`saved`)):l.error(o(`profiles.createFailed`))}finally{v.value=!1}}function O(){h.value=!1,setTimeout(()=>a(`close`),200)}return(n,r)=>(c(),S(g(_),{show:h.value,"onUpdate:show":r[2]||=e=>h.value=e,preset:`card`,title:g(o)(`profiles.create`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!v.value,onAfterLeave:r[3]||=e=>a(`close`)},{footer:m(()=>[f(`div`,Z,[p(g(x),{onClick:O},{default:m(()=>[d(y(g(o)(`common.cancel`)),1)]),_:1}),p(g(x),{type:`primary`,loading:v.value,onClick:E},{default:m(()=>[d(y(g(o)(`common.create`)),1)]),_:1},8,[`loading`])])]),default:m(()=>[p(g(e),{"label-placement":`top`},{default:m(()=>[p(g(t),{label:g(o)(`profiles.name`),required:``},{default:m(()=>[p(g(u),{value:b.value,placeholder:g(o)(`profiles.namePlaceholder`),onInput:r[0]||=e=>b.value=e.replace(/[^a-zA-Z0-9_-]/g,``),onKeyup:A(E,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),p(g(t),{label:g(o)(`profiles.cloneFromCurrent`)},{default:m(()=>[p(g(i),{value:T.value,"onUpdate:value":r[1]||=e=>T.value=e},null,8,[`value`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-fb1271ea`]]),fe={class:`modal-footer`},pe=v(s({__name:`ProfileRenameModal`,props:{profileName:{}},emits:[`close`,`saved`],setup(n,{emit:r}){let i=n,a=r,{t:o}=C(),s=D(),l=j(),h=w(!0),v=w(!1),b=w(``);async function T(){if(!b.value.trim()){l.warning(o(`profiles.newNamePlaceholder`));return}v.value=!0;try{await s.renameProfile(i.profileName,b.value.trim())?(l.success(o(`profiles.renameSuccess`)),a(`saved`)):l.error(o(`profiles.renameFailed`))}finally{v.value=!1}}function E(){h.value=!1,setTimeout(()=>a(`close`),200)}return(n,r)=>(c(),S(g(_),{show:h.value,"onUpdate:show":r[1]||=e=>h.value=e,preset:`card`,title:g(o)(`profiles.rename`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!v.value,onAfterLeave:r[2]||=e=>a(`close`)},{footer:m(()=>[f(`div`,fe,[p(g(x),{onClick:E},{default:m(()=>[d(y(g(o)(`common.cancel`)),1)]),_:1}),p(g(x),{type:`primary`,loading:v.value,onClick:T},{default:m(()=>[d(y(g(o)(`common.confirm`)),1)]),_:1},8,[`loading`])])]),default:m(()=>[p(g(e),{"label-placement":`top`},{default:m(()=>[p(g(t),{label:g(o)(`profiles.newName`),required:``},{default:m(()=>[p(g(u),{value:b.value,"onUpdate:value":r[0]||=e=>b.value=e,placeholder:g(o)(`profiles.newNamePlaceholder`),onKeyup:A(T,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-e31a23a9`]]),me={class:`modal-footer`},he=v(s({__name:`ProfileImportModal`,emits:[`close`,`saved`],setup(e,{emit:t}){let r=t,{t:i}=C(),a=D(),o=j(),s=w(!0),l=w(!1),u=w([]),h=[`.tar.gz`,`.tgz`,`.gz`,`.zip`];function v({file:e}){let t=e.name?.toLowerCase()||``;return h.some(e=>t.endsWith(e))?!0:(o.warning(i(`profiles.importInvalidFile`)),!1)}async function b(){if(!u.value.length){o.warning(i(`profiles.importSelectFile`));return}l.value=!0;try{let e=u.value[0].file;if(!e){o.error(i(`profiles.importFailed`));return}await a.importProfile(e)?(o.success(i(`profiles.importSuccess`)),r(`saved`)):o.error(i(`profiles.importFailed`))}finally{l.value=!1}}function T(){s.value=!1,setTimeout(()=>r(`close`),200)}return(e,t)=>(c(),S(g(_),{show:s.value,"onUpdate:show":t[1]||=e=>s.value=e,preset:`card`,title:g(i)(`profiles.import`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!l.value,onAfterLeave:t[2]||=e=>r(`close`)},{footer:m(()=>[f(`div`,me,[p(g(x),{onClick:T},{default:m(()=>[d(y(g(i)(`common.cancel`)),1)]),_:1}),p(g(x),{type:`primary`,loading:l.value,disabled:!u.value.length,onClick:b},{default:m(()=>[d(y(g(i)(`common.confirm`)),1)]),_:1},8,[`loading`,`disabled`])])]),default:m(()=>[p(g(n),{"file-list":u.value,"onUpdate:fileList":t[0]||=e=>u.value=e,max:1,accept:h.join(`,`),disabled:l.value,onBeforeUpload:v},{default:m(()=>[p(g(x),null,{default:m(()=>[d(y(g(i)(`profiles.importSelectFile`)),1)]),_:1})]),_:1},8,[`file-list`,`accept`,`disabled`])]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-accddacf`]]),ge={class:`profiles-view`},$={class:`page-header`},_e={class:`header-title`},ve={class:`header-actions`},ye={class:`profiles-content`},be=v(s({__name:`ProfilesView`,setup(e){let{t}=C(),n=D(),r=w(!1),i=w(!1),o=w(null);h(()=>{n.fetchProfiles()});function s(){r.value=!1}function l(){o.value=null}function u(){i.value=!1}return(e,h)=>(c(),b(`div`,ge,[f(`header`,$,[f(`h2`,_e,y(g(t)(`profiles.title`)),1),f(`div`,ve,[p(g(x),{size:`small`,onClick:h[0]||=e=>i.value=!0},{icon:m(()=>[...h[6]||=[f(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[f(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),f(`polyline`,{points:`17 8 12 3 7 8`}),f(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})],-1)]]),default:m(()=>[d(` `+y(g(t)(`profiles.import`)),1)]),_:1}),p(g(x),{type:`primary`,size:`small`,onClick:h[1]||=e=>r.value=!0},{icon:m(()=>[...h[7]||=[f(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[f(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),f(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:m(()=>[d(` `+y(g(t)(`profiles.create`)),1)]),_:1})])]),f(`div`,ye,[p(g(O),{show:g(n).loading&&g(n).profiles.length===0},{default:m(()=>[p(X,{onRename:h[2]||=e=>o.value=e})]),_:1},8,[`show`])]),r.value?(c(),S(Q,{key:0,onClose:h[3]||=e=>r.value=!1,onSaved:s})):a(``,!0),o.value?(c(),S(pe,{key:1,"profile-name":o.value,onClose:h[4]||=e=>o.value=null,onSaved:l},null,8,[`profile-name`])):a(``,!0),i.value?(c(),S(he,{key:2,onClose:h[5]||=e=>i.value=!1,onSaved:u})):a(``,!0)]))}}),[[`__scopeId`,`data-v-fcdc8d6b`]]);export{be as default};
|
webui/assets/ProfilesView-Bzgt-TSp.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-ee1f1fe2]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-ee1f1fe2]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.profile-card[data-v-ee1f1fe2]{background-color:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;padding:16px;transition:border-color .15s}.profile-card[data-v-ee1f1fe2]:hover{border-color:rgba(var(--accent-primary-rgb), .3)}.profile-card.active[data-v-ee1f1fe2]{border-color:rgba(var(--success-rgb), .4)}.card-header[data-v-ee1f1fe2]{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.profile-name[data-v-ee1f1fe2]{color:var(--text-primary);text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-size:15px;font-weight:600;overflow:hidden}.card-body[data-v-ee1f1fe2]{flex-direction:column;gap:6px;margin-bottom:8px;display:flex}.card-detail-toggle[data-v-ee1f1fe2]{cursor:pointer;color:var(--text-muted);-webkit-user-select:none;user-select:none;align-items:center;gap:4px;padding:6px 0;font-size:12px;display:flex}.card-detail-toggle[data-v-ee1f1fe2]:hover{color:var(--text-secondary)}.toggle-icon[data-v-ee1f1fe2]{transition:transform .2s}.toggle-icon.expanded[data-v-ee1f1fe2]{transform:rotate(180deg)}.card-detail[data-v-ee1f1fe2]{border-top:1px solid var(--border-light);margin-bottom:8px;padding:8px 0}.info-row[data-v-ee1f1fe2]{justify-content:space-between;align-items:center;padding:2px 0;display:flex}.info-label[data-v-ee1f1fe2]{color:var(--text-muted);flex-shrink:0;margin-right:12px;font-size:12px}.info-value[data-v-ee1f1fe2]{color:var(--text-secondary);text-align:right;text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.mono[data-v-ee1f1fe2]{font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px}.detail-path[data-v-ee1f1fe2]{max-width:260px}.card-actions[data-v-ee1f1fe2]{border-top:1px solid var(--border-light);flex-wrap:wrap;gap:8px;padding-top:10px;display:flex}[data-v-51e73d5a]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-51e73d5a]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.empty-state[data-v-51e73d5a]{height:100%;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;display:flex}.empty-state .empty-icon[data-v-51e73d5a]{opacity:.3}.empty-state p[data-v-51e73d5a]{font-size:14px}.profiles-grid[data-v-51e73d5a]{grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:14px;display:grid}.modal-footer[data-v-fb1271ea],.modal-footer[data-v-e31a23a9],.modal-footer[data-v-accddacf]{justify-content:flex-end;gap:8px;display:flex}[data-v-fcdc8d6b]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-fcdc8d6b]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.profiles-view[data-v-fcdc8d6b]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.page-header[data-v-fcdc8d6b]{border-bottom:1px solid var(--border-color);justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.header-title[data-v-fcdc8d6b]{color:var(--text-primary);font-size:16px;font-weight:600}.header-actions[data-v-fcdc8d6b]{gap:8px;display:flex}.profiles-content[data-v-fcdc8d6b]{flex:1;padding:20px;overflow-y:auto}
|
webui/assets/SettingRow-BACRFGe8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ar as e,Fr as t,Gr as n,Jr as r,Or as i,c as a,ci as o,jr as s}from"./index-Cl8-DFW_.js";var c={class:`setting-row`},l={class:`setting-info`},u={class:`setting-label`},d={key:0,class:`setting-hint`},f={class:`setting-control`},p=a(t({__name:`SettingRow`,props:{label:{},hint:{}},setup(t){return(a,p)=>(n(),s(`div`,c,[i(`div`,l,[i(`label`,u,o(t.label),1),t.hint?(n(),s(`p`,d,o(t.hint),1)):e(``,!0)]),i(`div`,f,[r(a.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-b81640b4`]]);export{p as t};
|
webui/assets/SettingRow-BOmZezg0.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-b81640b4]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-b81640b4]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.setting-row[data-v-b81640b4]{border-bottom:1px solid var(--border-light);justify-content:space-between;align-items:center;padding:10px 0;display:flex}.setting-row[data-v-b81640b4]:last-child{border-bottom:none}.setting-info[data-v-b81640b4]{flex:1;margin-right:16px}.setting-label[data-v-b81640b4]{color:var(--text-primary);font-size:13px;display:block}.setting-hint[data-v-b81640b4]{color:var(--text-muted);margin-top:2px;font-size:12px}.setting-control[data-v-b81640b4]{flex-shrink:0}@media (width<=768px){.setting-row[data-v-b81640b4]{flex-direction:column;align-items:flex-start;gap:8px}.setting-info[data-v-b81640b4]{margin-right:0}.setting-control[data-v-b81640b4]{width:100%}}
|
webui/assets/SettingsView-CA5ncO8e.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-e737ef30]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-e737ef30]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-e737ef30]{margin-top:16px}[data-v-1f96245d]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-1f96245d]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-1f96245d]{margin-top:16px}[data-v-0c8e2aa7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-0c8e2aa7]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-0c8e2aa7]{margin-top:16px}[data-v-3514aeb7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-3514aeb7]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-3514aeb7]{margin-top:16px}[data-v-43145f27]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-43145f27]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-43145f27]{margin-top:16px}[data-v-c28727b7]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c28727b7]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-section[data-v-c28727b7]{margin-top:16px}.empty-hint[data-v-c28727b7]{padding:40px 0}.provider-section[data-v-c28727b7]{border:1px solid var(--border-color);background:var(--bg-card);border-radius:10px;margin-bottom:14px;padding:16px}.provider-header[data-v-c28727b7]{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.provider-name[data-v-c28727b7]{color:var(--text-primary);margin:0;font-size:14px;font-weight:600}.type-badge[data-v-c28727b7]{border-radius:10px;padding:2px 8px;font-size:11px;font-weight:500}.type-badge.builtin[data-v-c28727b7]{background:rgba(var(--accent-primary-rgb), .12);color:var(--accent-primary)}.type-badge.custom[data-v-c28727b7]{background:rgba(var(--success-rgb), .12);color:var(--success)}.provider-fields[data-v-c28727b7]{flex-direction:column;gap:10px;display:flex}.field-row[data-v-c28727b7]{align-items:center;gap:10px;display:flex}.field-row .n-input[data-v-c28727b7]{flex:1}[data-v-79bc4876]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-79bc4876]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.account-settings[data-v-79bc4876]{padding:8px 0}.section-desc[data-v-79bc4876]{color:var(--text-muted);margin:0 0 20px;font-size:13px;line-height:1.6}.action-row[data-v-79bc4876]{justify-content:space-between;align-items:center;gap:16px;display:flex}.action-label[data-v-79bc4876]{color:var(--text-secondary);font-size:14px}.action-buttons[data-v-79bc4876]{flex-shrink:0;gap:8px;display:flex}[data-v-6bfbe8eb]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-6bfbe8eb]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.settings-view[data-v-6bfbe8eb]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.settings-content[data-v-6bfbe8eb]{flex:1;padding:20px;overflow-y:auto}
|
webui/assets/SettingsView-fiDPfpVZ.js
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{n as e,t}from"./FormItem-DB8yIr9W.js";import{S as n}from"./_baseFor-tDInUmcl.js";import{n as r,t as i}from"./now-CeSGHkSX.js";import{t as a}from"./Add-D070kowG.js";import{t as o}from"./InputNumber-P0oq6NtF.js";import{t as s}from"./Switch-CDXAYhwk.js";import{t as c}from"./Popconfirm-ClpYjEYd.js";import{s as l}from"./app-IytcAxLh.js";import{$n as u,$r as d,Ar as f,Br as p,Dr as m,E as h,En as g,Er as _,Fn as v,Fr as y,Gr as b,Jn as x,Kr as S,Ln as C,Lr as w,N as T,Nr as E,Or as D,Pn as ee,Pr as O,Qr as k,Rn as te,Rr as A,Tn as j,Ur as M,V as N,Xn as ne,Xr as re,Zr as ie,_n as ae,ai as P,b as oe,br as se,c as F,ci as I,cn as ce,dn as le,er as L,hn as R,in as ue,ir as z,it as de,jr as B,k as V,l as fe,lr as H,mn as pe,ni as U,nr as W,nt as me,oi as he,p as ge,q as _e,qr as G,ri as K,rn as ve,rr as ye,tr as q,u as be,un as xe,vr as Se,wn as Ce,wr as we,xn as J,xr as Y,y as X,zr as Te}from"./index-Cl8-DFW_.js";import{a as Ee,n as De,o as Oe,r as ke,t as Ae}from"./auth-B-i69M-u.js";import{t as Z}from"./settings-Cxn8gJl1.js";import{t as Q}from"./SettingRow-BACRFGe8.js";import{t as je}from"./session-browser-prefs-D7bVorU0.js";import{t as Me}from"./models-Jqyv3Qjo.js";var Ne=Ce(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[Ce(`&::-webkit-scrollbar`,{width:0,height:0})]),Pe=y({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=U(null);function t(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let n=g();return Ne.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:j,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...t){var n;(n=e.value)==null||n.scrollTo(...t)}})},render(){return w(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),Fe=`Expected a function`,Ie=Math.max,Le=Math.min;function Re(e,t,a){var o,s,c,l,u,d,f=0,p=!1,m=!1,h=!0;if(typeof e!=`function`)throw TypeError(Fe);t=r(t)||0,n(a)&&(p=!!a.leading,m=`maxWait`in a,c=m?Ie(r(a.maxWait)||0,t):c,h=`trailing`in a?!!a.trailing:h);function g(t){var n=o,r=s;return o=s=void 0,f=t,l=e.apply(r,n),l}function _(e){return f=e,u=setTimeout(b,t),p?g(e):l}function v(e){var n=e-d,r=e-f,i=t-n;return m?Le(i,c-r):i}function y(e){var n=e-d,r=e-f;return d===void 0||n>=t||n<0||m&&r>=c}function b(){var e=i();if(y(e))return x(e);u=setTimeout(b,v(e))}function x(e){return u=void 0,h&&o?g(e):(o=s=void 0,l)}function S(){u!==void 0&&clearTimeout(u),f=0,o=d=s=u=void 0}function C(){return u===void 0?l:x(i())}function w(){var e=i(),n=y(e);if(o=arguments,s=this,d=e,n){if(u===void 0)return _(d);if(m)return clearTimeout(u),u=setTimeout(b,t),g(d)}return u===void 0&&(u=setTimeout(b,t)),l}return w.cancel=S,w.flush=C,w}var ze=`Expected a function`;function Be(e,t,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(ze);return n(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),Re(e,t,{leading:i,maxWait:t,trailing:a})}var Ve=ee(`n-tabs`),He={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},$=y({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:He,slots:Object,setup(e){let t=A(Ve,null);return t||ae(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return w(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),Ue=y({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},le(He,[`displayDirective`])),setup(e){let{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:a,addTabStyleRef:o,tabClassRef:s,addTabClassRef:c,tabChangeIdRef:l,onBeforeLeaveRef:u,triggerRef:d,handleAdd:f,activateTab:p,handleClose:h}=A(Ve);return{trigger:d,mergedClosable:m(()=>{if(e.internalAddable)return!1;let{closable:t}=e;return t===void 0?i.value:t}),style:a,addStyle:o,tabClass:s,addTabClass:c,clsPrefix:t,value:n,type:r,handleClose(t){t.stopPropagation(),!e.disabled&&h(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){f();return}let{name:t}=e,r=++l.id;if(t!==n.value){let{value:i}=u;i?Promise.resolve(i(e.name,n.value)).then(e=>{e&&l.id===r&&p(t)}):p(t)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:o,value:s,mergedClosable:c,trigger:l,$slots:{default:u}}=this,d=i??o;return w(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?w(`div`,{class:`${t}-tabs-tab-pad`}):null,w(`div`,Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},Te({class:[`${t}-tabs-tab`,s===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,c&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:l===`click`?this.activateTab:void 0,onMouseenter:l===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),w(`span`,{class:`${t}-tabs-tab__label`},e?w(we,null,w(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),w(me,{clsPrefix:t},{default:()=>w(a,null)})):u?u():typeof d==`object`?d:xe(d??n)),c&&this.type===`card`?w(_e,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),We=L(`tabs`,`
|
| 2 |
+
box-sizing: border-box;
|
| 3 |
+
width: 100%;
|
| 4 |
+
display: flex;
|
| 5 |
+
flex-direction: column;
|
| 6 |
+
transition:
|
| 7 |
+
background-color .3s var(--n-bezier),
|
| 8 |
+
border-color .3s var(--n-bezier);
|
| 9 |
+
`,[W(`segment-type`,[L(`tabs-rail`,[u(`&.transition-disabled`,[L(`tabs-capsule`,`
|
| 10 |
+
transition: none;
|
| 11 |
+
`)])])]),W(`top`,[L(`tab-pane`,`
|
| 12 |
+
padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
|
| 13 |
+
`)]),W(`left`,[L(`tab-pane`,`
|
| 14 |
+
padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
|
| 15 |
+
`)]),W(`left, right`,`
|
| 16 |
+
flex-direction: row;
|
| 17 |
+
`,[L(`tabs-bar`,`
|
| 18 |
+
width: 2px;
|
| 19 |
+
right: 0;
|
| 20 |
+
transition:
|
| 21 |
+
top .2s var(--n-bezier),
|
| 22 |
+
max-height .2s var(--n-bezier),
|
| 23 |
+
background-color .3s var(--n-bezier);
|
| 24 |
+
`),L(`tabs-tab`,`
|
| 25 |
+
padding: var(--n-tab-padding-vertical);
|
| 26 |
+
`)]),W(`right`,`
|
| 27 |
+
flex-direction: row-reverse;
|
| 28 |
+
`,[L(`tab-pane`,`
|
| 29 |
+
padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
|
| 30 |
+
`),L(`tabs-bar`,`
|
| 31 |
+
left: 0;
|
| 32 |
+
`)]),W(`bottom`,`
|
| 33 |
+
flex-direction: column-reverse;
|
| 34 |
+
justify-content: flex-end;
|
| 35 |
+
`,[L(`tab-pane`,`
|
| 36 |
+
padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
|
| 37 |
+
`),L(`tabs-bar`,`
|
| 38 |
+
top: 0;
|
| 39 |
+
`)]),L(`tabs-rail`,`
|
| 40 |
+
position: relative;
|
| 41 |
+
padding: 3px;
|
| 42 |
+
border-radius: var(--n-tab-border-radius);
|
| 43 |
+
width: 100%;
|
| 44 |
+
background-color: var(--n-color-segment);
|
| 45 |
+
transition: background-color .3s var(--n-bezier);
|
| 46 |
+
display: flex;
|
| 47 |
+
align-items: center;
|
| 48 |
+
`,[L(`tabs-capsule`,`
|
| 49 |
+
border-radius: var(--n-tab-border-radius);
|
| 50 |
+
position: absolute;
|
| 51 |
+
pointer-events: none;
|
| 52 |
+
background-color: var(--n-tab-color-segment);
|
| 53 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
|
| 54 |
+
transition: transform 0.3s var(--n-bezier);
|
| 55 |
+
`),L(`tabs-tab-wrapper`,`
|
| 56 |
+
flex-basis: 0;
|
| 57 |
+
flex-grow: 1;
|
| 58 |
+
display: flex;
|
| 59 |
+
align-items: center;
|
| 60 |
+
justify-content: center;
|
| 61 |
+
`,[L(`tabs-tab`,`
|
| 62 |
+
overflow: hidden;
|
| 63 |
+
border-radius: var(--n-tab-border-radius);
|
| 64 |
+
width: 100%;
|
| 65 |
+
display: flex;
|
| 66 |
+
align-items: center;
|
| 67 |
+
justify-content: center;
|
| 68 |
+
`,[W(`active`,`
|
| 69 |
+
font-weight: var(--n-font-weight-strong);
|
| 70 |
+
color: var(--n-tab-text-color-active);
|
| 71 |
+
`),u(`&:hover`,`
|
| 72 |
+
color: var(--n-tab-text-color-hover);
|
| 73 |
+
`)])])]),W(`flex`,[L(`tabs-nav`,`
|
| 74 |
+
width: 100%;
|
| 75 |
+
position: relative;
|
| 76 |
+
`,[L(`tabs-wrapper`,`
|
| 77 |
+
width: 100%;
|
| 78 |
+
`,[L(`tabs-tab`,`
|
| 79 |
+
margin-right: 0;
|
| 80 |
+
`)])])]),L(`tabs-nav`,`
|
| 81 |
+
box-sizing: border-box;
|
| 82 |
+
line-height: 1.5;
|
| 83 |
+
display: flex;
|
| 84 |
+
transition: border-color .3s var(--n-bezier);
|
| 85 |
+
`,[q(`prefix, suffix`,`
|
| 86 |
+
display: flex;
|
| 87 |
+
align-items: center;
|
| 88 |
+
`),q(`prefix`,`padding-right: 16px;`),q(`suffix`,`padding-left: 16px;`)]),W(`top, bottom`,[u(`>`,[L(`tabs-nav`,[L(`tabs-nav-scroll-wrapper`,[u(`&::before`,`
|
| 89 |
+
top: 0;
|
| 90 |
+
bottom: 0;
|
| 91 |
+
left: 0;
|
| 92 |
+
width: 20px;
|
| 93 |
+
`),u(`&::after`,`
|
| 94 |
+
top: 0;
|
| 95 |
+
bottom: 0;
|
| 96 |
+
right: 0;
|
| 97 |
+
width: 20px;
|
| 98 |
+
`),W(`shadow-start`,[u(`&::before`,`
|
| 99 |
+
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
|
| 100 |
+
`)]),W(`shadow-end`,[u(`&::after`,`
|
| 101 |
+
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
| 102 |
+
`)])])])])]),W(`left, right`,[L(`tabs-nav-scroll-content`,`
|
| 103 |
+
flex-direction: column;
|
| 104 |
+
`),u(`>`,[L(`tabs-nav`,[L(`tabs-nav-scroll-wrapper`,[u(`&::before`,`
|
| 105 |
+
top: 0;
|
| 106 |
+
left: 0;
|
| 107 |
+
right: 0;
|
| 108 |
+
height: 20px;
|
| 109 |
+
`),u(`&::after`,`
|
| 110 |
+
bottom: 0;
|
| 111 |
+
left: 0;
|
| 112 |
+
right: 0;
|
| 113 |
+
height: 20px;
|
| 114 |
+
`),W(`shadow-start`,[u(`&::before`,`
|
| 115 |
+
box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
|
| 116 |
+
`)]),W(`shadow-end`,[u(`&::after`,`
|
| 117 |
+
box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
|
| 118 |
+
`)])])])])]),L(`tabs-nav-scroll-wrapper`,`
|
| 119 |
+
flex: 1;
|
| 120 |
+
position: relative;
|
| 121 |
+
overflow: hidden;
|
| 122 |
+
`,[L(`tabs-nav-y-scroll`,`
|
| 123 |
+
height: 100%;
|
| 124 |
+
width: 100%;
|
| 125 |
+
overflow-y: auto;
|
| 126 |
+
scrollbar-width: none;
|
| 127 |
+
`,[u(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
| 128 |
+
width: 0;
|
| 129 |
+
height: 0;
|
| 130 |
+
display: none;
|
| 131 |
+
`)]),u(`&::before, &::after`,`
|
| 132 |
+
transition: box-shadow .3s var(--n-bezier);
|
| 133 |
+
pointer-events: none;
|
| 134 |
+
content: "";
|
| 135 |
+
position: absolute;
|
| 136 |
+
z-index: 1;
|
| 137 |
+
`)]),L(`tabs-nav-scroll-content`,`
|
| 138 |
+
display: flex;
|
| 139 |
+
position: relative;
|
| 140 |
+
min-width: 100%;
|
| 141 |
+
min-height: 100%;
|
| 142 |
+
width: fit-content;
|
| 143 |
+
box-sizing: border-box;
|
| 144 |
+
`),L(`tabs-wrapper`,`
|
| 145 |
+
display: inline-flex;
|
| 146 |
+
flex-wrap: nowrap;
|
| 147 |
+
position: relative;
|
| 148 |
+
`),L(`tabs-tab-wrapper`,`
|
| 149 |
+
display: flex;
|
| 150 |
+
flex-wrap: nowrap;
|
| 151 |
+
flex-shrink: 0;
|
| 152 |
+
flex-grow: 0;
|
| 153 |
+
`),L(`tabs-tab`,`
|
| 154 |
+
cursor: pointer;
|
| 155 |
+
white-space: nowrap;
|
| 156 |
+
flex-wrap: nowrap;
|
| 157 |
+
display: inline-flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
color: var(--n-tab-text-color);
|
| 160 |
+
font-size: var(--n-tab-font-size);
|
| 161 |
+
background-clip: padding-box;
|
| 162 |
+
padding: var(--n-tab-padding);
|
| 163 |
+
transition:
|
| 164 |
+
box-shadow .3s var(--n-bezier),
|
| 165 |
+
color .3s var(--n-bezier),
|
| 166 |
+
background-color .3s var(--n-bezier),
|
| 167 |
+
border-color .3s var(--n-bezier);
|
| 168 |
+
`,[W(`disabled`,{cursor:`not-allowed`}),q(`close`,`
|
| 169 |
+
margin-left: 6px;
|
| 170 |
+
transition:
|
| 171 |
+
background-color .3s var(--n-bezier),
|
| 172 |
+
color .3s var(--n-bezier);
|
| 173 |
+
`),q(`label`,`
|
| 174 |
+
display: flex;
|
| 175 |
+
align-items: center;
|
| 176 |
+
z-index: 1;
|
| 177 |
+
`)]),L(`tabs-bar`,`
|
| 178 |
+
position: absolute;
|
| 179 |
+
bottom: 0;
|
| 180 |
+
height: 2px;
|
| 181 |
+
border-radius: 1px;
|
| 182 |
+
background-color: var(--n-bar-color);
|
| 183 |
+
transition:
|
| 184 |
+
left .2s var(--n-bezier),
|
| 185 |
+
max-width .2s var(--n-bezier),
|
| 186 |
+
opacity .3s var(--n-bezier),
|
| 187 |
+
background-color .3s var(--n-bezier);
|
| 188 |
+
`,[u(`&.transition-disabled`,`
|
| 189 |
+
transition: none;
|
| 190 |
+
`),W(`disabled`,`
|
| 191 |
+
background-color: var(--n-tab-text-color-disabled)
|
| 192 |
+
`)]),L(`tabs-pane-wrapper`,`
|
| 193 |
+
position: relative;
|
| 194 |
+
overflow: hidden;
|
| 195 |
+
transition: max-height .2s var(--n-bezier);
|
| 196 |
+
`),L(`tab-pane`,`
|
| 197 |
+
color: var(--n-pane-text-color);
|
| 198 |
+
width: 100%;
|
| 199 |
+
transition:
|
| 200 |
+
color .3s var(--n-bezier),
|
| 201 |
+
background-color .3s var(--n-bezier),
|
| 202 |
+
opacity .2s var(--n-bezier);
|
| 203 |
+
left: 0;
|
| 204 |
+
right: 0;
|
| 205 |
+
top: 0;
|
| 206 |
+
`,[u(`&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active`,`
|
| 207 |
+
transition:
|
| 208 |
+
color .3s var(--n-bezier),
|
| 209 |
+
background-color .3s var(--n-bezier),
|
| 210 |
+
transform .2s var(--n-bezier),
|
| 211 |
+
opacity .2s var(--n-bezier);
|
| 212 |
+
`),u(`&.next-transition-leave-active, &.prev-transition-leave-active`,`
|
| 213 |
+
position: absolute;
|
| 214 |
+
`),u(`&.next-transition-enter-from, &.prev-transition-leave-to`,`
|
| 215 |
+
transform: translateX(32px);
|
| 216 |
+
opacity: 0;
|
| 217 |
+
`),u(`&.next-transition-leave-to, &.prev-transition-enter-from`,`
|
| 218 |
+
transform: translateX(-32px);
|
| 219 |
+
opacity: 0;
|
| 220 |
+
`),u(`&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to`,`
|
| 221 |
+
transform: translateX(0);
|
| 222 |
+
opacity: 1;
|
| 223 |
+
`)]),L(`tabs-tab-pad`,`
|
| 224 |
+
box-sizing: border-box;
|
| 225 |
+
width: var(--n-tab-gap);
|
| 226 |
+
flex-grow: 0;
|
| 227 |
+
flex-shrink: 0;
|
| 228 |
+
`),W(`line-type, bar-type`,[L(`tabs-tab`,`
|
| 229 |
+
font-weight: var(--n-tab-font-weight);
|
| 230 |
+
box-sizing: border-box;
|
| 231 |
+
vertical-align: bottom;
|
| 232 |
+
`,[u(`&:hover`,{color:`var(--n-tab-text-color-hover)`}),W(`active`,`
|
| 233 |
+
color: var(--n-tab-text-color-active);
|
| 234 |
+
font-weight: var(--n-tab-font-weight-active);
|
| 235 |
+
`),W(`disabled`,{color:`var(--n-tab-text-color-disabled)`})])]),L(`tabs-nav`,[W(`line-type`,[W(`top`,[q(`prefix, suffix`,`
|
| 236 |
+
border-bottom: 1px solid var(--n-tab-border-color);
|
| 237 |
+
`),L(`tabs-nav-scroll-content`,`
|
| 238 |
+
border-bottom: 1px solid var(--n-tab-border-color);
|
| 239 |
+
`),L(`tabs-bar`,`
|
| 240 |
+
bottom: -1px;
|
| 241 |
+
`)]),W(`left`,[q(`prefix, suffix`,`
|
| 242 |
+
border-right: 1px solid var(--n-tab-border-color);
|
| 243 |
+
`),L(`tabs-nav-scroll-content`,`
|
| 244 |
+
border-right: 1px solid var(--n-tab-border-color);
|
| 245 |
+
`),L(`tabs-bar`,`
|
| 246 |
+
right: -1px;
|
| 247 |
+
`)]),W(`right`,[q(`prefix, suffix`,`
|
| 248 |
+
border-left: 1px solid var(--n-tab-border-color);
|
| 249 |
+
`),L(`tabs-nav-scroll-content`,`
|
| 250 |
+
border-left: 1px solid var(--n-tab-border-color);
|
| 251 |
+
`),L(`tabs-bar`,`
|
| 252 |
+
left: -1px;
|
| 253 |
+
`)]),W(`bottom`,[q(`prefix, suffix`,`
|
| 254 |
+
border-top: 1px solid var(--n-tab-border-color);
|
| 255 |
+
`),L(`tabs-nav-scroll-content`,`
|
| 256 |
+
border-top: 1px solid var(--n-tab-border-color);
|
| 257 |
+
`),L(`tabs-bar`,`
|
| 258 |
+
top: -1px;
|
| 259 |
+
`)]),q(`prefix, suffix`,`
|
| 260 |
+
transition: border-color .3s var(--n-bezier);
|
| 261 |
+
`),L(`tabs-nav-scroll-content`,`
|
| 262 |
+
transition: border-color .3s var(--n-bezier);
|
| 263 |
+
`),L(`tabs-bar`,`
|
| 264 |
+
border-radius: 0;
|
| 265 |
+
`)]),W(`card-type`,[q(`prefix, suffix`,`
|
| 266 |
+
transition: border-color .3s var(--n-bezier);
|
| 267 |
+
`),L(`tabs-pad`,`
|
| 268 |
+
flex-grow: 1;
|
| 269 |
+
transition: border-color .3s var(--n-bezier);
|
| 270 |
+
`),L(`tabs-tab-pad`,`
|
| 271 |
+
transition: border-color .3s var(--n-bezier);
|
| 272 |
+
`),L(`tabs-tab`,`
|
| 273 |
+
font-weight: var(--n-tab-font-weight);
|
| 274 |
+
border: 1px solid var(--n-tab-border-color);
|
| 275 |
+
background-color: var(--n-tab-color);
|
| 276 |
+
box-sizing: border-box;
|
| 277 |
+
position: relative;
|
| 278 |
+
vertical-align: bottom;
|
| 279 |
+
display: flex;
|
| 280 |
+
justify-content: space-between;
|
| 281 |
+
font-size: var(--n-tab-font-size);
|
| 282 |
+
color: var(--n-tab-text-color);
|
| 283 |
+
`,[W(`addable`,`
|
| 284 |
+
padding-left: 8px;
|
| 285 |
+
padding-right: 8px;
|
| 286 |
+
font-size: 16px;
|
| 287 |
+
justify-content: center;
|
| 288 |
+
`,[q(`height-placeholder`,`
|
| 289 |
+
width: 0;
|
| 290 |
+
font-size: var(--n-tab-font-size);
|
| 291 |
+
`),ye(`disabled`,[u(`&:hover`,`
|
| 292 |
+
color: var(--n-tab-text-color-hover);
|
| 293 |
+
`)])]),W(`closable`,`padding-right: 8px;`),W(`active`,`
|
| 294 |
+
background-color: #0000;
|
| 295 |
+
font-weight: var(--n-tab-font-weight-active);
|
| 296 |
+
color: var(--n-tab-text-color-active);
|
| 297 |
+
`),W(`disabled`,`color: var(--n-tab-text-color-disabled);`)])]),W(`left, right`,`
|
| 298 |
+
flex-direction: column;
|
| 299 |
+
`,[q(`prefix, suffix`,`
|
| 300 |
+
padding: var(--n-tab-padding-vertical);
|
| 301 |
+
`),L(`tabs-wrapper`,`
|
| 302 |
+
flex-direction: column;
|
| 303 |
+
`),L(`tabs-tab-wrapper`,`
|
| 304 |
+
flex-direction: column;
|
| 305 |
+
`,[L(`tabs-tab-pad`,`
|
| 306 |
+
height: var(--n-tab-gap-vertical);
|
| 307 |
+
width: 100%;
|
| 308 |
+
`)])]),W(`top`,[W(`card-type`,[L(`tabs-scroll-padding`,`border-bottom: 1px solid var(--n-tab-border-color);`),q(`prefix, suffix`,`
|
| 309 |
+
border-bottom: 1px solid var(--n-tab-border-color);
|
| 310 |
+
`),L(`tabs-tab`,`
|
| 311 |
+
border-top-left-radius: var(--n-tab-border-radius);
|
| 312 |
+
border-top-right-radius: var(--n-tab-border-radius);
|
| 313 |
+
`,[W(`active`,`
|
| 314 |
+
border-bottom: 1px solid #0000;
|
| 315 |
+
`)]),L(`tabs-tab-pad`,`
|
| 316 |
+
border-bottom: 1px solid var(--n-tab-border-color);
|
| 317 |
+
`),L(`tabs-pad`,`
|
| 318 |
+
border-bottom: 1px solid var(--n-tab-border-color);
|
| 319 |
+
`)])]),W(`left`,[W(`card-type`,[L(`tabs-scroll-padding`,`border-right: 1px solid var(--n-tab-border-color);`),q(`prefix, suffix`,`
|
| 320 |
+
border-right: 1px solid var(--n-tab-border-color);
|
| 321 |
+
`),L(`tabs-tab`,`
|
| 322 |
+
border-top-left-radius: var(--n-tab-border-radius);
|
| 323 |
+
border-bottom-left-radius: var(--n-tab-border-radius);
|
| 324 |
+
`,[W(`active`,`
|
| 325 |
+
border-right: 1px solid #0000;
|
| 326 |
+
`)]),L(`tabs-tab-pad`,`
|
| 327 |
+
border-right: 1px solid var(--n-tab-border-color);
|
| 328 |
+
`),L(`tabs-pad`,`
|
| 329 |
+
border-right: 1px solid var(--n-tab-border-color);
|
| 330 |
+
`)])]),W(`right`,[W(`card-type`,[L(`tabs-scroll-padding`,`border-left: 1px solid var(--n-tab-border-color);`),q(`prefix, suffix`,`
|
| 331 |
+
border-left: 1px solid var(--n-tab-border-color);
|
| 332 |
+
`),L(`tabs-tab`,`
|
| 333 |
+
border-top-right-radius: var(--n-tab-border-radius);
|
| 334 |
+
border-bottom-right-radius: var(--n-tab-border-radius);
|
| 335 |
+
`,[W(`active`,`
|
| 336 |
+
border-left: 1px solid #0000;
|
| 337 |
+
`)]),L(`tabs-tab-pad`,`
|
| 338 |
+
border-left: 1px solid var(--n-tab-border-color);
|
| 339 |
+
`),L(`tabs-pad`,`
|
| 340 |
+
border-left: 1px solid var(--n-tab-border-color);
|
| 341 |
+
`)])]),W(`bottom`,[W(`card-type`,[L(`tabs-scroll-padding`,`border-top: 1px solid var(--n-tab-border-color);`),q(`prefix, suffix`,`
|
| 342 |
+
border-top: 1px solid var(--n-tab-border-color);
|
| 343 |
+
`),L(`tabs-tab`,`
|
| 344 |
+
border-bottom-left-radius: var(--n-tab-border-radius);
|
| 345 |
+
border-bottom-right-radius: var(--n-tab-border-radius);
|
| 346 |
+
`,[W(`active`,`
|
| 347 |
+
border-top: 1px solid #0000;
|
| 348 |
+
`)]),L(`tabs-tab-pad`,`
|
| 349 |
+
border-top: 1px solid var(--n-tab-border-color);
|
| 350 |
+
`),L(`tabs-pad`,`
|
| 351 |
+
border-top: 1px solid var(--n-tab-border-color);
|
| 352 |
+
`)])])])]),Ge=Be,Ke=y({name:`Tabs`,props:Object.assign(Object.assign({},de.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(e,{slots:t}){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:i}=ue(e),a=de(`Tabs`,`-tabs`,We,ge,e,n),o=U(null),s=U(null),c=U(null),l=U(null),u=U(null),d=U(null),f=U(!0),h=U(!0),g=v(e,[`labelSize`,`size`]),_=m(()=>g.value?g.value:i?.value?.Tabs?.size||`medium`),y=v(e,[`activeName`,`value`]),b=U(y.value??e.defaultValue??(t.default?pe(t.default())[0]?.props?.name:null)),w=C(y,b),T={id:0},E=m(()=>{if(!(!e.justifyContent||e.type===`card`))return{display:`flex`,justifyContent:e.justifyContent}});re(w,()=>{T.id=0,A(),j()});function D(){let{value:e}=w;return e===null?null:o.value?.querySelector(`[data-name="${e}"]`)}function ee(t){if(e.type===`card`)return;let{value:r}=s;if(!r)return;let i=r.style.opacity===`0`;if(t){let a=`${n.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=e;if(t.dataset.disabled===`true`?r.classList.add(a):r.classList.remove(a),[`top`,`bottom`].includes(s)){if(k([`top`,`maxHeight`,`height`]),typeof o==`number`&&t.offsetWidth>=o){let e=Math.floor((t.offsetWidth-o)/2)+t.offsetLeft;r.style.left=`${e}px`,r.style.maxWidth=`${o}px`}else r.style.left=`${t.offsetLeft}px`,r.style.maxWidth=`${t.offsetWidth}px`;r.style.width=`8192px`,i&&(r.style.transition=`none`),r.offsetWidth,i&&(r.style.transition=``,r.style.opacity=`1`)}else{if(k([`left`,`maxWidth`,`width`]),typeof o==`number`&&t.offsetHeight>=o){let e=Math.floor((t.offsetHeight-o)/2)+t.offsetTop;r.style.top=`${e}px`,r.style.maxHeight=`${o}px`}else r.style.top=`${t.offsetTop}px`,r.style.maxHeight=`${t.offsetHeight}px`;r.style.height=`8192px`,i&&(r.style.transition=`none`),r.offsetHeight,i&&(r.style.transition=``,r.style.opacity=`1`)}}}function O(){if(e.type===`card`)return;let{value:t}=s;t&&(t.style.opacity=`0`)}function k(e){let{value:t}=s;if(t)for(let n of e)t.style[n]=``}function A(){if(e.type===`card`)return;let t=D();t?ee(t):O()}function j(){let e=u.value?.$el;if(!e)return;let t=D();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let N=U(null),ae=0,P=null;function oe(e){let t=N.value;if(t){ae=e.getBoundingClientRect().height;let n=`${ae}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};P?(r(),P(),P=null):P=r}}function se(e){let t=N.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(ae,n)}px`};P?(P(),P=null,r()):P=r}}function F(){let t=N.value;if(t){t.style.maxHeight=``,t.style.height=``;let{paneWrapperStyle:n}=e;if(typeof n==`string`)t.style.cssText=n;else if(n){let{maxHeight:e,height:r}=n;e!==void 0&&(t.style.maxHeight=e),r!==void 0&&(t.style.height=r)}}}let I={value:[]},ce=U(`next`);function le(e){let t=w.value,n=`next`;for(let r of I.value){if(r===t)break;if(r===e){n=`prev`;break}}ce.value=n,L(e)}function L(t){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=e;n&&R(n,t),r&&R(r,t),i&&R(i,t),b.value=t}function B(t){let{onClose:n}=e;n&&R(n,t)}let V=!0;function fe(){let{value:e}=s;if(!e)return;V||=!1;let t=`transition-disabled`;e.classList.add(t),A(),e.classList.remove(t)}let H=U(null);function W({transitionDisabled:e}){let t=o.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=D();n&&H.value&&(H.value.style.width=`${n.offsetWidth}px`,H.value.style.height=`${n.offsetHeight}px`,H.value.style.transform=`translateX(${n.offsetLeft-x(getComputedStyle(t).paddingLeft)}px)`,e&&H.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}re([w],()=>{e.type===`segment`&&p(()=>{W({transitionDisabled:!1})})}),M(()=>{e.type===`segment`&&W({transitionDisabled:!0})});let me=0;function he(t){if(t.contentRect.width===0&&t.contentRect.height===0||me===t.contentRect.width)return;me=t.contentRect.width;let{type:n}=e;if((n===`line`||n===`bar`)&&(V||e.justifyContent?.startsWith(`space`))&&fe(),n!==`segment`){let{placement:t}=e;xe((t===`top`||t===`bottom`?u.value?.$el:d.value)||null)}}let _e=Ge(he,64);re([()=>e.justifyContent,()=>e.size],()=>{p(()=>{let{type:t}=e;(t===`line`||t===`bar`)&&fe()})});let G=U(!1);function ye(t){let{target:n,contentRect:{width:r,height:i}}=t,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=e;if(!G.value)s===`top`||s===`bottom`?a<r&&(G.value=!0):o<i&&(G.value=!0);else{let{value:e}=l;if(!e)return;s===`top`||s===`bottom`?a-r>e.$el.offsetWidth&&(G.value=!1):o-i>e.$el.offsetHeight&&(G.value=!1)}xe(u.value?.$el||null)}let q=Ge(ye,64);function be(){let{onAdd:t}=e;t&&t(),p(()=>{let e=D(),{value:t}=u;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function xe(t){if(!t)return;let{placement:n}=e;if(n===`top`||n===`bottom`){let{scrollLeft:e,scrollWidth:n,offsetWidth:r}=t;f.value=e<=0,h.value=e+r>=n}else{let{scrollTop:e,scrollHeight:n,offsetHeight:r}=t;f.value=e<=0,h.value=e+r>=n}}let Se=Ge(e=>{xe(e.target)},64);S(Ve,{triggerRef:K(e,`trigger`),tabStyleRef:K(e,`tabStyle`),tabClassRef:K(e,`tabClass`),addTabStyleRef:K(e,`addTabStyle`),addTabClassRef:K(e,`addTabClass`),paneClassRef:K(e,`paneClass`),paneStyleRef:K(e,`paneStyle`),mergedClsPrefixRef:n,typeRef:K(e,`type`),closableRef:K(e,`closable`),valueRef:w,tabChangeIdRef:T,onBeforeLeaveRef:K(e,`onBeforeLeave`),activateTab:le,handleClose:B,handleAdd:be}),te(()=>{A(),j()}),ie(()=>{let{value:e}=c;if(!e)return;let{value:t}=n,r=`${t}-tabs-nav-scroll-wrapper--shadow-start`,i=`${t}-tabs-nav-scroll-wrapper--shadow-end`;f.value?e.classList.remove(r):e.classList.add(r),h.value?e.classList.remove(i):e.classList.add(i)});let Ce={syncBarPosition:()=>{A()}},we=()=>{W({transitionDisabled:!0})},J=m(()=>{let{value:t}=_,{type:n}=e,r=`${t}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:o,closeIconColorHover:s,closeIconColorPressed:c,tabColor:l,tabBorderColor:u,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:v,closeSize:y,closeIconSize:b,closeColorHover:x,closeColorPressed:S,closeBorderRadius:C,[z(`panePadding`,t)]:w,[z(`tabPadding`,r)]:T,[z(`tabPaddingVertical`,r)]:E,[z(`tabGap`,r)]:D,[z(`tabGap`,`${r}Vertical`)]:ee,[z(`tabTextColor`,n)]:O,[z(`tabTextColorActive`,n)]:k,[z(`tabTextColorHover`,n)]:te,[z(`tabTextColorDisabled`,n)]:A,[z(`tabFontSize`,t)]:j},common:{cubicBezierEaseInOut:M}}=a.value;return{"--n-bezier":M,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":j,"--n-tab-text-color":O,"--n-tab-text-color-active":k,"--n-tab-text-color-disabled":A,"--n-tab-text-color-hover":te,"--n-pane-text-color":d,"--n-tab-border-color":u,"--n-tab-border-radius":p,"--n-close-size":y,"--n-close-icon-size":b,"--n-close-color-hover":x,"--n-close-color-pressed":S,"--n-close-border-radius":C,"--n-close-icon-color":o,"--n-close-icon-color-hover":s,"--n-close-icon-color-pressed":c,"--n-tab-color":l,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":T,"--n-tab-padding-vertical":E,"--n-tab-gap":D,"--n-tab-gap-vertical":ee,"--n-pane-padding-left":ne(w,`left`),"--n-pane-padding-right":ne(w,`right`),"--n-pane-padding-top":ne(w,`top`),"--n-pane-padding-bottom":ne(w,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":v}}),Y=r?ve(`tabs`,m(()=>`${_.value[0]}${e.type[0]}`),J,e):void 0;return Object.assign({mergedClsPrefix:n,mergedValue:w,renderedNames:new Set,segmentCapsuleElRef:H,tabsPaneWrapperRef:N,tabsElRef:o,barElRef:s,addTabInstRef:l,xScrollInstRef:u,scrollWrapperElRef:c,addTabFixed:G,tabWrapperStyle:E,handleNavResize:_e,mergedSize:_,handleScroll:Se,handleTabsResize:q,cssVars:r?void 0:J,themeClass:Y?.themeClass,animationDirection:ce,renderNameListRef:I,yScrollElRef:d,handleSegmentResize:we,onAnimationBeforeLeave:oe,onAnimationEnter:se,onAnimationAfterEnter:F,onRender:Y?.onRender},Ce)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:o,onRender:s,paneWrapperClass:c,paneWrapperStyle:l,$slots:{default:u,prefix:d,suffix:f}}=this;s?.();let p=u?pe(u()).filter(e=>e.type.__TAB_PANE__===!0):[],m=u?pe(u()).filter(e=>e.type.__TAB__===!0):[],h=!m.length,g=t===`card`,_=t===`segment`,v=!g&&!_&&this.justifyContent;o.value=[];let y=()=>{let t=w(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},v?null:w(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),h?p.map((e,t)=>(o.value.push(e.props.name),Xe(w(Ue,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!v||v===`center`||v===`start`||v===`end`)}),e.children?{default:e.children.tab}:void 0)))):m.map((e,t)=>(o.value.push(e.props.name),Xe(t!==0&&!v?Ye(e):e))),!r&&i&&g?Je(i,(h?p.length:m.length)!==0):null,v?null:w(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return w(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},g&&i?w(J,{onResize:this.handleTabsResize},{default:()=>t}):t,g?w(`div`,{class:`${e}-tabs-pad`}):null,g?null:w(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},b=_?`top`:n;return w(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,v&&`${e}-tabs--flex`,`${e}-tabs--${b}`],style:this.cssVars},w(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${b}`,`${e}-tabs-nav`]},ce(d,t=>t&&w(`div`,{class:`${e}-tabs-nav__prefix`},t)),_?w(J,{onResize:this.handleSegmentResize},{default:()=>w(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},w(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},w(`div`,{class:`${e}-tabs-wrapper`},w(`div`,{class:`${e}-tabs-tab`}))),h?p.map((e,t)=>(o.value.push(e.props.name),w(Ue,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):m.map((e,t)=>(o.value.push(e.props.name),t===0?e:Ye(e))))}):w(J,{onResize:this.handleNavResize},{default:()=>w(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(b)?w(Pe,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:y}):w(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},y()))}),r&&i&&g?Je(i,!0):null,ce(f,t=>t&&w(`div`,{class:`${e}-tabs-nav__suffix`},t))),h&&(this.animated&&(b===`top`||b===`bottom`)?w(`div`,{ref:`tabsPaneWrapperRef`,style:l,class:[`${e}-tabs-pane-wrapper`,c]},qe(p,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):qe(p,this.mergedValue,this.renderedNames)))}});function qe(e,t,n,r,i,a,o){let s=[];return e.forEach(e=>{let{name:r,displayDirective:i,"display-directive":a}=e.props,o=e=>i===e||a===e,c=t===r;if(e.key!==void 0&&(e.key=r),c||o(`show`)||o(`show:lazy`)&&n.has(r)){n.has(r)||n.add(r);let t=!o(`if`);s.push(t?d(e,[[se,c]]):e)}}),o?w(Se,{name:`${o}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function Je(e,t){return w(Ue,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function Ye(e){let t=_(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function Xe(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}var Ze={class:`settings-section`},Qe=F(y({__name:`DisplaySettings`,setup(e){let t=Z(),n=X(),{t:r}=H(),{mode:i,setMode:a}=fe(),o=[{label:r(`settings.display.themeLight`),value:`light`},{label:r(`settings.display.themeDark`),value:`dark`},{label:r(`settings.display.themeSystem`),value:`system`}];async function c(e){try{await t.saveSection(`display`,e),n.success(r(`settings.saved`))}catch{n.error(r(`settings.saveFailed`))}}function l(e){let t=e;a(t),c({skin:t})}return(e,n)=>(b(),B(`section`,Ze,[O(Q,{label:P(r)(`settings.display.theme`),hint:P(r)(`settings.display.themeHint`)},{default:k(()=>[O(P(h),{value:P(i),options:o,size:`small`,"consistent-menu-width":!1,class:`input-sm`,"onUpdate:value":l},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.streaming`),hint:P(r)(`settings.display.streamingHint`)},{default:k(()=>[O(P(s),{value:P(t).display.streaming,"onUpdate:value":n[0]||=e=>c({streaming:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.compact`),hint:P(r)(`settings.display.compactHint`)},{default:k(()=>[O(P(s),{value:P(t).display.compact,"onUpdate:value":n[1]||=e=>c({compact:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.showReasoning`),hint:P(r)(`settings.display.showReasoningHint`)},{default:k(()=>[O(P(s),{value:P(t).display.show_reasoning,"onUpdate:value":n[2]||=e=>c({show_reasoning:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.showCost`),hint:P(r)(`settings.display.showCostHint`)},{default:k(()=>[O(P(s),{value:P(t).display.show_cost,"onUpdate:value":n[3]||=e=>c({show_cost:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.inlineDiffs`),hint:P(r)(`settings.display.inlineDiffsHint`)},{default:k(()=>[O(P(s),{value:P(t).display.inline_diffs,"onUpdate:value":n[4]||=e=>c({inline_diffs:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.bellOnComplete`),hint:P(r)(`settings.display.bellOnCompleteHint`)},{default:k(()=>[O(P(s),{value:P(t).display.bell_on_complete,"onUpdate:value":n[5]||=e=>c({bell_on_complete:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.display.busyInputMode`),hint:P(r)(`settings.display.busyInputModeHint`)},{default:k(()=>[O(P(s),{value:P(t).display.busy_input_mode===`interrupt`,"onUpdate:value":n[6]||=e=>c({busy_input_mode:e?`interrupt`:`off`})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-e737ef30`]]),$e={class:`settings-section`},et=F(y({__name:`AgentSettings`,setup(e){let t=Z(),n=X(),{t:r}=H();async function i(e){try{await t.saveSection(`agent`,e),n.success(r(`settings.saved`))}catch{n.error(r(`settings.saveFailed`))}}return(e,n)=>(b(),B(`section`,$e,[O(Q,{label:P(r)(`settings.agent.maxTurns`),hint:P(r)(`settings.agent.maxTurnsHint`)},{default:k(()=>[O(P(o),{value:P(t).agent.max_turns,min:1,max:200,step:5,size:`small`,class:`input-sm`,"onUpdate:value":n[0]||=e=>e!=null&&i({max_turns:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.agent.gatewayTimeout`),hint:P(r)(`settings.agent.gatewayTimeoutHint`)},{default:k(()=>[O(P(o),{value:P(t).agent.gateway_timeout,min:60,max:7200,step:60,size:`small`,class:`input-sm`,"onUpdate:value":n[1]||=e=>e!=null&&i({gateway_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.agent.restartDrainTimeout`),hint:P(r)(`settings.agent.restartDrainTimeoutHint`)},{default:k(()=>[O(P(o),{value:P(t).agent.restart_drain_timeout,min:10,max:300,step:10,size:`small`,class:`input-sm`,"onUpdate:value":n[2]||=e=>e!=null&&i({restart_drain_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.agent.toolEnforcement`),hint:P(r)(`settings.agent.toolEnforcementHint`)},{default:k(()=>[O(P(h),{value:P(t).agent.tool_use_enforcement||`auto`,options:[{label:P(r)(`settings.agent.auto`),value:`auto`},{label:P(r)(`settings.agent.always`),value:`always`},{label:P(r)(`settings.agent.never`),value:`never`}],size:`small`,class:`input-sm`,"onUpdate:value":n[3]||=e=>i({tool_use_enforcement:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-1f96245d`]]),tt={class:`settings-section`},nt=F(y({__name:`MemorySettings`,setup(e){let t=Z(),n=X(),{t:r}=H();async function i(e){try{await t.saveSection(`memory`,e),n.success(r(`settings.saved`))}catch{n.error(r(`settings.saveFailed`))}}return(e,n)=>(b(),B(`section`,tt,[O(Q,{label:P(r)(`settings.memory.enabled`),hint:P(r)(`settings.memory.enabledHint`)},{default:k(()=>[O(P(s),{value:P(t).memory.memory_enabled,"onUpdate:value":n[0]||=e=>i({memory_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.memory.userProfile`),hint:P(r)(`settings.memory.userProfileHint`)},{default:k(()=>[O(P(s),{value:P(t).memory.user_profile_enabled,"onUpdate:value":n[1]||=e=>i({user_profile_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.memory.charLimit`),hint:P(r)(`settings.memory.charLimitHint`)},{default:k(()=>[O(P(o),{value:P(t).memory.memory_char_limit,min:100,max:1e4,step:100,size:`small`,class:`input-sm`,"onUpdate:value":n[2]||=e=>e!=null&&i({memory_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(r)(`settings.memory.userCharLimit`),hint:P(r)(`settings.memory.userCharLimitHint`)},{default:k(()=>[O(P(o),{value:P(t).memory.user_char_limit,min:100,max:1e4,step:100,size:`small`,class:`input-sm`,"onUpdate:value":n[3]||=e=>e!=null&&i({user_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-0c8e2aa7`]]),rt={class:`settings-section`},it=F(y({__name:`SessionSettings`,setup(e){let t=Z(),n=je(),r=X(),{t:i}=H();async function a(e){try{await t.saveSection(`session_reset`,e),r.success(i(`settings.saved`))}catch{r.error(i(`settings.saveFailed`))}}return(e,r)=>(b(),B(`section`,rt,[O(Q,{label:P(i)(`settings.session.mode`),hint:P(i)(`settings.session.modeHint`)},{default:k(()=>[O(P(h),{value:P(t).sessionReset.mode||`both`,options:[{label:P(i)(`settings.session.modeBoth`),value:`both`},{label:P(i)(`settings.session.modeIdle`),value:`idle`},{label:P(i)(`settings.session.modeHourly`),value:`hourly`}],size:`small`,class:`input-md`,"onUpdate:value":r[0]||=e=>a({mode:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(i)(`settings.session.idleMinutes`),hint:P(i)(`settings.session.idleMinutesHint`)},{default:k(()=>[O(P(o),{value:P(t).sessionReset.idle_minutes,min:10,max:10080,step:30,size:`small`,class:`input-sm`,"onUpdate:value":r[1]||=e=>e!=null&&a({idle_minutes:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(i)(`settings.session.atHour`),hint:P(i)(`settings.session.atHourHint`)},{default:k(()=>[O(P(o),{value:P(t).sessionReset.at_hour,min:0,max:23,step:1,size:`small`,class:`input-sm`,"onUpdate:value":r[2]||=e=>e!=null&&a({at_hour:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),O(Q,{label:P(i)(`settings.session.liveMonitorHumanOnly`),hint:P(i)(`settings.session.liveMonitorHumanOnlyHint`)},{default:k(()=>[O(P(s),{value:P(n).humanOnly,"onUpdate:value":r[3]||=e=>P(n).setHumanOnly(e)},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-3514aeb7`]]),at={class:`settings-section`},ot=F(y({__name:`PrivacySettings`,setup(e){let t=Z(),n=X(),{t:r}=H();async function i(e){try{await t.saveSection(`privacy`,e),n.success(r(`settings.saved`))}catch{n.error(r(`settings.saveFailed`))}}return(e,n)=>(b(),B(`section`,at,[O(Q,{label:P(r)(`settings.privacy.redactPii`),hint:P(r)(`settings.privacy.redactPiiHint`)},{default:k(()=>[O(P(s),{value:P(t).privacy.redact_pii,"onUpdate:value":n[0]||=e=>i({redact_pii:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-43145f27`]]),st={class:`settings-section`},ct={key:0,class:`empty-hint`},lt={class:`provider-header`},ut={class:`provider-name`},dt={key:0,class:`provider-fields`},ft={class:`field-row`},pt={key:1,class:`provider-fields`},mt={class:`field-row`},ht=F(y({__name:`ModelSettings`,setup(e){let{t}=H(),n=Me(),r=X(),i=U(null),a=U({});M(()=>{n.providers.length===0&&n.fetchProviders()});let o=e=>e.startsWith(`custom:`);function s(e){if(!(e in a.value)){let t=n.providers.find(t=>t.provider===e);a.value[e]=t?.api_key||``}return a.value[e]}async function c(e){let a=s(e);if(!a.trim()){r.warning(t(`settings.models.apiKeyPlaceholder`));return}i.value=e;try{await l(e,{api_key:a.trim()}),r.success(t(`settings.models.saved`)),await n.fetchProviders()}catch(e){r.error(e.message||t(`settings.models.saveFailed`))}finally{i.value=null}}async function u(e){let a=s(e);i.value=e;try{await l(e,{api_key:a.trim()}),r.success(t(`settings.models.saved`)),await n.fetchProviders()}catch(e){r.error(e.message||t(`settings.models.saveFailed`))}finally{i.value=null}}return(e,r)=>(b(),B(`section`,st,[O(P(be),{show:P(n).loading},{default:k(()=>[P(n).providers.length===0?(b(),B(`div`,ct,[O(P(N),{description:P(t)(`settings.models.noProviders`)},null,8,[`description`])])):f(``,!0),(b(!0),B(we,null,G(P(n).providers,e=>(b(),B(`div`,{key:e.provider,class:`provider-section`},[D(`div`,lt,[D(`h4`,ut,I(e.label),1),D(`span`,{class:he([`type-badge`,o(e.provider)?`custom`:`builtin`])},I(o(e.provider)?P(t)(`models.customType`):P(t)(`models.builtIn`)),3)]),o(e.provider)?(b(),B(`div`,pt,[D(`div`,mt,[O(P(T),{value:s(e.provider),type:`password`,"show-password-on":`click`,placeholder:P(t)(`settings.models.apiKeyPlaceholder`),autocomplete:`off`,"onUpdate:value":t=>a.value[e.provider]=t},null,8,[`value`,`placeholder`,`onUpdate:value`]),O(P(V),{type:`primary`,size:`small`,loading:i.value===e.provider,onClick:t=>u(e.provider)},{default:k(()=>[E(I(P(t)(`settings.models.save`)),1)]),_:1},8,[`loading`,`onClick`])])])):(b(),B(`div`,dt,[D(`div`,ft,[O(P(T),{value:s(e.provider),type:`password`,"show-password-on":`click`,placeholder:P(t)(`settings.models.apiKeyPlaceholder`),autocomplete:`off`,"onUpdate:value":t=>a.value[e.provider]=t},null,8,[`value`,`placeholder`,`onUpdate:value`]),O(P(V),{type:`primary`,size:`small`,loading:i.value===e.provider,onClick:t=>c(e.provider)},{default:k(()=>[E(I(P(t)(`settings.models.save`)),1)]),_:1},8,[`loading`,`onClick`])])]))]))),128))]),_:1},8,[`show`])]))}}),[[`__scopeId`,`data-v-c28727b7`]]),gt={class:`account-settings`},_t={class:`section-desc`},vt={key:0,class:`action-row`},yt={class:`action-label`},bt={key:1,class:`configured-section`},xt={class:`action-row`},St={class:`action-label`},Ct={class:`action-buttons`},wt=F(y({__name:`AccountSettings`,setup(n){let{t:r}=H(),i=X(),a=U(!1),o=U(null),s=U(!1),l=U(!1),u=U(``),d=U(``),f=U(``),p=U(!1),m=U(``),h=U(``),g=U(``),_=U(!1),v=U(``),y=U(``);M(async()=>{try{let e=await ke();a.value=e.hasPasswordLogin,o.value=e.username}catch{}});async function x(){if(d.value!==f.value){i.error(r(`login.passwordMismatch`));return}if(d.value.length<6){i.error(r(`login.passwordTooShort`));return}s.value=!0;try{await Oe(u.value,d.value),a.value=!0,o.value=u.value,l.value=!1,u.value=``,d.value=``,f.value=``,i.success(r(`login.setupSuccess`))}catch(e){i.error(e.message||r(`common.saveFailed`))}finally{s.value=!1}}async function S(){if(h.value!==g.value){i.error(r(`login.passwordMismatch`));return}if(h.value.length<6){i.error(r(`login.passwordTooShort`));return}s.value=!0;try{await Ae(m.value,h.value),p.value=!1,m.value=``,h.value=``,g.value=``,i.success(r(`login.passwordChanged`))}catch(e){i.error(e.message||r(`common.saveFailed`))}finally{s.value=!1}}async function C(){if(y.value.trim().length<2){i.error(r(`login.usernameTooShort`));return}s.value=!0;try{await De(v.value,y.value.trim()),o.value=y.value.trim(),_.value=!1,v.value=``,y.value=``,i.success(r(`login.usernameChanged`))}catch(e){i.error(e.message||r(`common.saveFailed`))}finally{s.value=!1}}async function w(){s.value=!0;try{await Ee(),a.value=!1,o.value=null,i.success(r(`login.passwordRemoved`))}catch(e){i.error(e.message||r(`common.saveFailed`))}finally{s.value=!1}}function ee(){u.value=``,d.value=``,f.value=``,l.value=!0}function te(){m.value=``,h.value=``,g.value=``,p.value=!0}function A(){v.value=``,y.value=``,_.value=!0}return(n,i)=>(b(),B(`div`,gt,[D(`p`,_t,I(P(r)(`login.setupDescription`)),1),a.value?(b(),B(`div`,bt,[D(`div`,xt,[D(`span`,St,I(P(r)(`login.passwordLoginConfigured`,{username:o.value})),1),D(`div`,Ct,[O(P(V),{onClick:te},{default:k(()=>[E(I(P(r)(`login.changePassword`)),1)]),_:1}),O(P(V),{onClick:A},{default:k(()=>[E(I(P(r)(`login.changeUsername`)),1)]),_:1}),O(P(c),{onPositiveClick:w},{trigger:k(()=>[O(P(V),{type:`error`,ghost:``,loading:s.value},{default:k(()=>[E(I(P(r)(`login.removePasswordLogin`)),1)]),_:1},8,[`loading`])]),default:k(()=>[E(` `+I(P(r)(`login.removeConfirm`)),1)]),_:1})])])])):(b(),B(`div`,vt,[D(`span`,yt,I(P(r)(`login.passwordLoginNotConfigured`)),1),O(P(V),{type:`primary`,onClick:ee},{default:k(()=>[E(I(P(r)(`login.setupPassword`)),1)]),_:1})])),O(P(oe),{show:l.value,"onUpdate:show":i[4]||=e=>l.value=e,preset:`dialog`,title:P(r)(`login.setupPassword`)},{action:k(()=>[O(P(V),{onClick:i[3]||=e=>l.value=!1},{default:k(()=>[E(I(P(r)(`common.cancel`)),1)]),_:1}),O(P(V),{type:`primary`,loading:s.value,onClick:x},{default:k(()=>[E(I(P(r)(`common.save`)),1)]),_:1},8,[`loading`])]),default:k(()=>[O(P(e),{"label-placement":`top`},{default:k(()=>[O(P(t),{label:P(r)(`login.username`)},{default:k(()=>[O(P(T),{value:u.value,"onUpdate:value":i[0]||=e=>u.value=e,placeholder:P(r)(`login.usernamePlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),O(P(t),{label:P(r)(`login.newPassword`)},{default:k(()=>[O(P(T),{value:d.value,"onUpdate:value":i[1]||=e=>d.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.passwordPlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),O(P(t),{label:P(r)(`login.confirmPassword`)},{default:k(()=>[O(P(T),{value:f.value,"onUpdate:value":i[2]||=e=>f.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.confirmPassword`),onKeyup:Y(x,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`]),O(P(oe),{show:p.value,"onUpdate:show":i[9]||=e=>p.value=e,preset:`dialog`,title:P(r)(`login.changePassword`)},{action:k(()=>[O(P(V),{onClick:i[8]||=e=>p.value=!1},{default:k(()=>[E(I(P(r)(`common.cancel`)),1)]),_:1}),O(P(V),{type:`primary`,loading:s.value,onClick:S},{default:k(()=>[E(I(P(r)(`common.save`)),1)]),_:1},8,[`loading`])]),default:k(()=>[O(P(e),{"label-placement":`top`},{default:k(()=>[O(P(t),{label:P(r)(`login.currentPassword`)},{default:k(()=>[O(P(T),{value:m.value,"onUpdate:value":i[5]||=e=>m.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.currentPassword`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),O(P(t),{label:P(r)(`login.newPassword`)},{default:k(()=>[O(P(T),{value:h.value,"onUpdate:value":i[6]||=e=>h.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.newPassword`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),O(P(t),{label:P(r)(`login.confirmPassword`)},{default:k(()=>[O(P(T),{value:g.value,"onUpdate:value":i[7]||=e=>g.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.confirmPassword`),onKeyup:Y(S,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`]),O(P(oe),{show:_.value,"onUpdate:show":i[13]||=e=>_.value=e,preset:`dialog`,title:P(r)(`login.changeUsername`)},{action:k(()=>[O(P(V),{onClick:i[12]||=e=>_.value=!1},{default:k(()=>[E(I(P(r)(`common.cancel`)),1)]),_:1}),O(P(V),{type:`primary`,loading:s.value,onClick:C},{default:k(()=>[E(I(P(r)(`common.save`)),1)]),_:1},8,[`loading`])]),default:k(()=>[O(P(e),{"label-placement":`top`},{default:k(()=>[O(P(t),{label:P(r)(`login.currentPassword`)},{default:k(()=>[O(P(T),{value:v.value,"onUpdate:value":i[10]||=e=>v.value=e,type:`password`,"show-password-on":`click`,placeholder:P(r)(`login.currentPassword`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),O(P(t),{label:P(r)(`login.newUsername`)},{default:k(()=>[O(P(T),{value:y.value,"onUpdate:value":i[11]||=e=>y.value=e,placeholder:P(r)(`login.usernamePlaceholder`),onKeyup:Y(C,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`])]))}}),[[`__scopeId`,`data-v-79bc4876`]]),Tt={class:`settings-view`},Et={class:`page-header`},Dt={class:`header-title`},Ot={class:`settings-content`},kt=F(y({__name:`SettingsView`,setup(e){let t=Z(),{t:n}=H();return M(()=>{t.fetchSettings()}),(e,r)=>(b(),B(`div`,Tt,[D(`header`,Et,[D(`h2`,Dt,I(P(n)(`settings.title`)),1)]),D(`div`,Ot,[O(P(be),{show:P(t).loading||P(t).saving,size:`large`,description:P(n)(`common.loading`)},{default:k(()=>[O(P(Ke),{type:`line`,animated:``},{default:k(()=>[O(P($),{name:`account`,tab:P(n)(`settings.tabs.account`)},{default:k(()=>[O(wt)]),_:1},8,[`tab`]),O(P($),{name:`display`,tab:P(n)(`settings.tabs.display`)},{default:k(()=>[O(Qe)]),_:1},8,[`tab`]),O(P($),{name:`agent`,tab:P(n)(`settings.tabs.agent`)},{default:k(()=>[O(et)]),_:1},8,[`tab`]),O(P($),{name:`memory`,tab:P(n)(`settings.tabs.memory`)},{default:k(()=>[O(nt)]),_:1},8,[`tab`]),O(P($),{name:`session`,tab:P(n)(`settings.tabs.session`)},{default:k(()=>[O(it)]),_:1},8,[`tab`]),O(P($),{name:`privacy`,tab:P(n)(`settings.tabs.privacy`)},{default:k(()=>[O(ot)]),_:1},8,[`tab`]),O(P($),{name:`models`,tab:P(n)(`settings.tabs.models`)},{default:k(()=>[O(ht)]),_:1},8,[`tab`])]),_:1})]),_:1},8,[`show`,`description`])])]))}}),[[`__scopeId`,`data-v-6bfbe8eb`]]);export{kt as default};
|
webui/assets/SkillsView-Fk_3rYtt.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./Switch-CDXAYhwk.js";import{Ar as t,Dr as n,Fr as r,Gr as i,N as a,Nr as o,Or as s,Pr as c,Sr as l,Ur as u,Wr as d,Xr as f,ai as p,c as m,ci as h,jr as g,kr as _,lr as v,ni as y,oi as b,qr as x,wr as S,y as C}from"./index-Cl8-DFW_.js";import{t as w}from"./MarkdownRenderer-P3bVUblX.js";import{i as T,n as E,o as ee,r as D}from"./skills-Itof9XyP.js";var O={class:`skill-list`},k={key:0,class:`skill-empty`},A=[`onClick`],j={class:`category-name`},M={class:`category-count`},N={key:0,class:`category-skills`},P=[`onClick`],F={class:`skill-info`},I={class:`skill-name`},L={key:0,class:`skill-desc`},R=m(r({__name:`SkillList`,props:{categories:{},selectedSkill:{},searchQuery:{}},emits:[`select`],setup(r,{emit:a}){let{t:o}=v(),u=C(),d=r,f=a,m=y(new Set),_=y(new Set),w=n(()=>{if(!d.searchQuery)return d.categories;let e=d.searchQuery.toLowerCase();return d.categories.map(t=>({...t,skills:t.skills.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))})).filter(t=>t.skills.length>0||t.name.toLowerCase().includes(e))});function T(e){m.value.has(e)?m.value.delete(e):m.value.add(e)}function E(e,t){f(`select`,e,t)}async function D(e,t,n){if(!_.value.has(t)){_.value.add(t);try{await ee(t,n);let r=d.categories.find(t=>t.name===e)?.skills.find(e=>e.name===t);r&&(r.enabled=n)}catch(e){u.error(o(`skills.toggleFailed`)+`: ${e.message}`)}finally{_.value.delete(t)}}}return(n,a)=>(i(),g(`div`,O,[w.value.length===0?(i(),g(`div`,k,h(r.searchQuery?p(o)(`skills.noMatch`):p(o)(`skills.noSkills`)),1)):t(``,!0),(i(!0),g(S,null,x(w.value,n=>(i(),g(`div`,{key:n.name,class:`skill-category`},[s(`button`,{class:`category-header`,onClick:e=>T(n.name)},[(i(),g(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:b([`category-arrow`,{collapsed:m.value.has(n.name)}])},[...a[1]||=[s(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2)),s(`span`,j,h(n.name),1),s(`span`,M,h(n.skills.length),1)],8,A),m.value.has(n.name)?t(``,!0):(i(),g(`div`,N,[(i(!0),g(S,null,x(n.skills,o=>(i(),g(`button`,{key:o.name,class:b([`skill-item`,{active:r.selectedSkill===`${n.name}/${o.name}`}]),onClick:e=>E(n.name,o.name)},[s(`div`,F,[s(`span`,I,h(o.name),1),o.description?(i(),g(`span`,L,h(o.description),1)):t(``,!0)]),c(p(e),{size:`small`,value:o.enabled!==!1,loading:_.value.has(o.name),"onUpdate:value":e=>D(n.name,o.name,e),onClick:a[0]||=l(()=>{},[`stop`])},null,8,[`value`,`loading`,`onUpdate:value`])],10,P))),128))]))]))),128))]))}}),[[`__scopeId`,`data-v-d9844f2e`]]),z={class:`skill-detail`},B={class:`detail-title`},V={class:`detail-category`},H={class:`detail-name`},U={key:0,class:`detail-loading`},te={key:0,class:`detail-breadcrumb`},W={class:`breadcrumb-path`},G={class:`detail-content`},K={key:1,class:`detail-files`},q={class:`files-header`},J={class:`files-list`},Y=[`onClick`],X=m(r({__name:`SkillDetail`,props:{category:{},skill:{}},setup(e){let{t:n}=v(),r=e,a=y(``),c=y([]),l=y(!1),u=y(``),d=y(null),m=y(!1);async function b(){l.value=!0,d.value=null,u.value=``,c.value=[],a.value=``;try{let e=`${r.category}/${r.skill}/SKILL.md`,[t,n]=await Promise.all([E(e),D(r.category,r.skill)]);a.value=t,c.value=n.filter(e=>!e.isDir&&e.path!==`SKILL.md`)}catch(e){a.value=n(`skills.loadFailed`)+`: ${e.message}`}finally{l.value=!1}}async function C(e){m.value=!0,d.value=e;try{let t=`${r.category}/${r.skill}/`,n=e;if(e.startsWith(`/`)){let t=e.split(`/.hermes/skills/`)[1];t&&(n=t.split(`/`).slice(2).join(`/`))}u.value=await E(`${t}${n}`)}catch(e){u.value=n(`skills.fileLoadFailed`)+`: ${e.message}`}finally{m.value=!1}}function T(){d.value=null,u.value=``}return f(()=>`${r.category}/${r.skill}`,b,{immediate:!0}),(r,f)=>(i(),g(`div`,z,[s(`div`,B,[s(`span`,V,h(e.category),1),f[0]||=s(`span`,{class:`detail-separator`},`/`,-1),s(`span`,H,h(e.skill),1)]),l.value&&!a.value?(i(),g(`div`,U,h(p(n)(`common.loading`)),1)):(i(),g(S,{key:1},[d.value?(i(),g(`div`,te,[s(`button`,{class:`back-btn`,onClick:T},[f[1]||=s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[s(`polyline`,{points:`15 18 9 12 15 6`})],-1),o(` `+h(p(n)(`skills.backTo`))+` `+h(e.skill),1)]),s(`span`,W,h(d.value),1)])):t(``,!0),s(`div`,G,[d.value?(i(),_(w,{key:0,content:u.value},null,8,[`content`])):(i(),_(w,{key:1,content:a.value},null,8,[`content`]))]),!d.value&&c.value.length>0?(i(),g(`div`,K,[s(`div`,q,h(p(n)(`skills.attachedFiles`)),1),s(`div`,J,[(i(!0),g(S,null,x(c.value,e=>(i(),g(`button`,{key:e.path,class:`file-item`,onClick:t=>C(e.path)},[f[2]||=s(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[s(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),s(`polyline`,{points:`14 2 14 8 20 8`})],-1),s(`span`,null,h(e.path),1)],8,Y))),128))])])):t(``,!0)],64))]))}}),[[`__scopeId`,`data-v-aa8397b8`]]),Z={class:`skills-view`},Q={class:`page-header`},ne={style:{display:`flex`,"align-items":`center`,gap:`8px`}},re={class:`header-title`},ie={class:`skills-content`},ae={key:0,class:`skills-loading`},oe={key:1,class:`skills-layout`},$={key:0,class:`skills-sidebar`},se={class:`skills-main`},ce={key:1,class:`empty-detail`},le=m(r({__name:`SkillsView`,setup(e){let{t:n}=v(),r=y([]),o=y(!1),l=y(``),f=y(``),m=y(``),x=y(!0),S=null;function C(e){x.value=!e.matches}u(()=>{S=window.matchMedia(`(max-width: 768px)`),C(S),S.addEventListener(`change`,C),w()}),d(()=>{S?.removeEventListener(`change`,C)});async function w(){o.value=!0;try{r.value=await T()}catch(e){console.error(`Failed to load skills:`,e)}finally{o.value=!1}}function E(e,t){l.value=e,f.value=t,window.innerWidth<=768&&(x.value=!1)}return(e,u)=>(i(),g(`div`,Z,[s(`header`,Q,[s(`div`,ne,[s(`h2`,re,h(p(n)(`skills.title`)),1),x.value?t(``,!0):(i(),g(`button`,{key:0,class:`sidebar-toggle`,onClick:u[0]||=e=>x.value=!0},[...u[3]||=[s(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[s(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),s(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),s(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})],-1)]]))]),c(p(a),{value:m.value,"onUpdate:value":u[1]||=e=>m.value=e,placeholder:p(n)(`skills.searchPlaceholder`),size:`small`,clearable:``,style:{width:`160px`}},null,8,[`value`,`placeholder`])]),s(`div`,ie,[o.value&&r.value.length===0?(i(),g(`div`,ae,h(p(n)(`common.loading`)),1)):(i(),g(`div`,oe,[s(`div`,{class:b([`mobile-backdrop`,{active:x.value}]),onClick:u[2]||=e=>x.value=!1},null,2),x.value?(i(),g(`div`,$,[c(R,{categories:r.value,"selected-skill":l.value&&f.value?`${l.value}/${f.value}`:null,"search-query":m.value,onSelect:E},null,8,[`categories`,`selected-skill`,`search-query`])])):t(``,!0),s(`div`,se,[l.value&&f.value?(i(),_(X,{key:0,category:l.value,skill:f.value},null,8,[`category`,`skill`])):(i(),g(`div`,ce,[u[4]||=s(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,opacity:`0.2`},[s(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),s(`polyline`,{points:`2 17 12 22 22 17`}),s(`polyline`,{points:`2 12 12 17 22 12`})],-1),s(`span`,null,h(p(n)(`skills.noMatch`)),1)]))])]))])]))}}),[[`__scopeId`,`data-v-0147c6c2`]]);export{le as default};
|
webui/assets/SkillsView-UN8bqBzc.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-d9844f2e]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-d9844f2e]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.skill-list[data-v-d9844f2e]{flex:1;padding:8px;overflow-y:auto}.skill-empty[data-v-d9844f2e]{color:var(--text-muted);text-align:center;padding:24px 16px;font-size:13px}.skill-category[data-v-d9844f2e]{margin-bottom:4px}.category-header[data-v-d9844f2e]{width:100%;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.3px;cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;padding:6px 10px;font-size:12px;font-weight:600;display:flex}.category-header[data-v-d9844f2e]:hover{background:rgba(var(--accent-primary-rgb), .04)}.category-arrow[data-v-d9844f2e]{flex-shrink:0;transition:transform .15s}.category-arrow.collapsed[data-v-d9844f2e]{transform:rotate(-90deg)}.category-name[data-v-d9844f2e]{text-align:left;text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.category-count[data-v-d9844f2e]{color:var(--text-muted);background:rgba(var(--accent-primary-rgb), .06);border-radius:8px;padding:1px 6px;font-size:11px}.category-skills[data-v-d9844f2e]{padding:2px 0 4px}.skill-item[data-v-d9844f2e]{width:100%;color:var(--text-secondary);text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:row;align-items:center;gap:8px;padding:6px 10px 6px 28px;font-size:13px;transition:all .15s;display:flex}.skill-item[data-v-d9844f2e]:hover{background:rgba(var(--accent-primary-rgb), .06);color:var(--text-primary)}.skill-item.active[data-v-d9844f2e]{background:rgba(var(--accent-primary-rgb), .1);color:var(--text-primary);font-weight:500}.skill-info[data-v-d9844f2e]{flex-direction:column;flex:1;min-width:0;display:flex}.skill-name[data-v-d9844f2e]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.skill-desc[data-v-d9844f2e]{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;margin-top:1px;font-size:11px;overflow:hidden}[data-v-aa8397b8]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-aa8397b8]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.skill-detail[data-v-aa8397b8]{flex-direction:column;height:100%;display:flex}.detail-title[data-v-aa8397b8]{border-bottom:1px solid var(--border-color);flex-shrink:0;margin-bottom:12px;padding-bottom:12px;font-size:15px}.detail-category[data-v-aa8397b8]{color:var(--text-muted);font-size:13px}.detail-separator[data-v-aa8397b8]{color:var(--text-muted);margin:0 6px}.detail-name[data-v-aa8397b8]{color:var(--text-primary);font-weight:600}.detail-loading[data-v-aa8397b8]{color:var(--text-muted);flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.detail-breadcrumb[data-v-aa8397b8]{border-bottom:1px solid var(--border-color);flex-shrink:0;align-items:center;gap:8px;margin-bottom:12px;padding:8px 0 12px;display:flex}.back-btn[data-v-aa8397b8]{color:var(--accent-primary);cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;gap:4px;padding:2px 6px;font-size:13px;display:flex}.back-btn[data-v-aa8397b8]:hover{background:rgba(var(--accent-primary-rgb), .06)}.breadcrumb-path[data-v-aa8397b8]{color:var(--text-muted);font-size:13px}.detail-content[data-v-aa8397b8]{flex:1;min-height:0;padding-bottom:12px;overflow-y:auto}.detail-content[data-v-aa8397b8] hr{border:none;margin:12px 0}.detail-files[data-v-aa8397b8]{border-top:1px solid var(--border-color);flex-shrink:0;margin-top:12px;padding-top:12px}.files-header[data-v-aa8397b8]{color:var(--text-muted);text-transform:uppercase;letter-spacing:.3px;margin-bottom:6px;font-size:12px;font-weight:600}.files-list[data-v-aa8397b8]{flex-wrap:wrap;gap:4px;display:flex}.file-item[data-v-aa8397b8]{border:1px solid var(--border-color);background:var(--bg-secondary);color:var(--text-secondary);cursor:pointer;border-radius:6px;align-items:center;gap:4px;padding:4px 8px;font-size:12px;transition:all .15s;display:flex}.file-item[data-v-aa8397b8]:hover{border-color:var(--accent-primary);color:var(--accent-primary)}[data-v-0147c6c2]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-0147c6c2]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.skills-view[data-v-0147c6c2]{height:calc(100 * var(--vh));flex-direction:column;display:flex}.search-input[data-v-0147c6c2]{width:100px}@media (width<=768px){.search-input[data-v-0147c6c2]{width:100%}}.skills-content[data-v-0147c6c2]{flex:1;overflow:hidden}.skills-loading[data-v-0147c6c2]{height:100%;color:var(--text-muted);justify-content:center;align-items:center;font-size:13px;display:flex}.skills-layout[data-v-0147c6c2]{height:100%;display:flex}.skills-sidebar[data-v-0147c6c2]{border-right:1px solid var(--border-color);flex-direction:column;flex-shrink:0;width:280px;min-height:0;display:flex;overflow:hidden}.skills-main[data-v-0147c6c2]{flex:1;min-width:0;padding:16px 20px;overflow-y:auto}.sidebar-toggle[data-v-0147c6c2]{cursor:pointer;color:var(--text-secondary);background:0 0;border:none;border-radius:6px;padding:4px;display:none}.sidebar-toggle[data-v-0147c6c2]:hover{background:rgba(var(--accent-primary-rgb), .06)}@media (width<=768px){.sidebar-toggle[data-v-0147c6c2]{display:flex}.skills-sidebar[data-v-0147c6c2]{z-index:10;background:var(--bg-card);height:100%;position:absolute;top:0;left:0;box-shadow:2px 0 8px #0000001a}.skills-layout[data-v-0147c6c2]{position:relative}.mobile-backdrop[data-v-0147c6c2]{z-index:9;opacity:0;pointer-events:none;background:#0006;transition:opacity .15s;display:block;position:absolute;inset:0}.mobile-backdrop.active[data-v-0147c6c2]{opacity:1;pointer-events:auto}}.empty-detail[data-v-0147c6c2]{height:100%;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:13px;display:flex}
|
webui/assets/Space-BZigAtaW.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./get-slot-DyvCJGRO.js";import{An as t,Cr as n,Dr as r,Fr as i,Jn as a,Lr as o,Yn as s,in as c,ir as l,it as u,mn as d,ot as f,v as p}from"./index-Cl8-DFW_.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!t)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=i({name:`Space`,props:Object.assign(Object.assign({},u.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n,mergedComponentPropsRef:i}=c(e),o=r(()=>e.size||i?.value?.Space?.size||`medium`),d=u(`Space`,`-space`,void 0,h,e,t),p=f(`Space`,n,t);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:t,margin:r(()=>{let e=o.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[l(`gap`,e)]:t}}=d.value,{row:n,col:r}=s(t);return{horizontal:a(r),vertical:a(n)}})}},render(){let{vertical:t,reverse:r,align:i,inline:a,justify:s,itemClass:c,itemStyle:l,margin:u,wrap:f,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=d(e(this),!1);if(!v.length)return null;let y=`${u.horizontal}px`,b=`${u.horizontal/2}px`,x=`${u.vertical}px`,S=`${u.vertical/2}px`,C=v.length-1,w=s.startsWith(`space-`);return o(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:a?`inline-flex`:`flex`,flexDirection:t&&!r?`column`:t&&r?`column-reverse`:!t&&r?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(s)?`flex-${s}`:s,flexWrap:!f||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:i,gap:h?`${u.vertical}px ${u.horizontal}px`:``}},!g&&(h||_)?v:v.map((e,r)=>e.type===n?e:o(`div`,{role:`none`,class:c,style:[l,{maxWidth:`100%`},h?``:t?{marginBottom:r===C?``:x}:m?{marginLeft:w?s===`space-between`&&r===C?``:b:r===C?``:y,marginRight:w?s===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?s===`space-between`&&r===C?``:b:r===C?``:y,marginLeft:w?s===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}]},e)))}});export{v as t};
|
webui/assets/Switch-CDXAYhwk.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{$n as e,Dr as t,Fr as n,G as r,J as i,Jn as a,Kn as o,Ln as s,Lr as c,U as l,Zn as u,an as d,cn as f,er as p,hn as m,in as h,ir as g,it as _,m as v,ni as y,nn as b,nr as x,ri as S,rn as C,rr as w,tr as T,tt as E}from"./index-Cl8-DFW_.js";function D(e){let{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},v),{iconColor:i,textColor:`white`,loadingColor:t,opacityDisabled:n,railColor:`rgba(0, 0, 0, .14)`,railColorActive:t,buttonBoxShadow:`0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${o(t,{alpha:.2})}`})}var O={name:`Switch`,common:l,self:D},k=p(`switch`,`
|
| 2 |
+
height: var(--n-height);
|
| 3 |
+
min-width: var(--n-width);
|
| 4 |
+
vertical-align: middle;
|
| 5 |
+
user-select: none;
|
| 6 |
+
-webkit-user-select: none;
|
| 7 |
+
display: inline-flex;
|
| 8 |
+
outline: none;
|
| 9 |
+
justify-content: center;
|
| 10 |
+
align-items: center;
|
| 11 |
+
`,[T(`children-placeholder`,`
|
| 12 |
+
height: var(--n-rail-height);
|
| 13 |
+
display: flex;
|
| 14 |
+
flex-direction: column;
|
| 15 |
+
overflow: hidden;
|
| 16 |
+
pointer-events: none;
|
| 17 |
+
visibility: hidden;
|
| 18 |
+
`),T(`rail-placeholder`,`
|
| 19 |
+
display: flex;
|
| 20 |
+
flex-wrap: none;
|
| 21 |
+
`),T(`button-placeholder`,`
|
| 22 |
+
width: calc(1.75 * var(--n-rail-height));
|
| 23 |
+
height: var(--n-rail-height);
|
| 24 |
+
`),p(`base-loading`,`
|
| 25 |
+
position: absolute;
|
| 26 |
+
top: 50%;
|
| 27 |
+
left: 50%;
|
| 28 |
+
transform: translateX(-50%) translateY(-50%);
|
| 29 |
+
font-size: calc(var(--n-button-width) - 4px);
|
| 30 |
+
color: var(--n-loading-color);
|
| 31 |
+
transition: color .3s var(--n-bezier);
|
| 32 |
+
`,[i({left:`50%`,top:`50%`,originalTransform:`translateX(-50%) translateY(-50%)`})]),T(`checked, unchecked`,`
|
| 33 |
+
transition: color .3s var(--n-bezier);
|
| 34 |
+
color: var(--n-text-color);
|
| 35 |
+
box-sizing: border-box;
|
| 36 |
+
position: absolute;
|
| 37 |
+
white-space: nowrap;
|
| 38 |
+
top: 0;
|
| 39 |
+
bottom: 0;
|
| 40 |
+
display: flex;
|
| 41 |
+
align-items: center;
|
| 42 |
+
line-height: 1;
|
| 43 |
+
`),T(`checked`,`
|
| 44 |
+
right: 0;
|
| 45 |
+
padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
| 46 |
+
`),T(`unchecked`,`
|
| 47 |
+
left: 0;
|
| 48 |
+
justify-content: flex-end;
|
| 49 |
+
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
| 50 |
+
`),e(`&:focus`,[T(`rail`,`
|
| 51 |
+
box-shadow: var(--n-box-shadow-focus);
|
| 52 |
+
`)]),x(`round`,[T(`rail`,`border-radius: calc(var(--n-rail-height) / 2);`,[T(`button`,`border-radius: calc(var(--n-button-height) / 2);`)])]),w(`disabled`,[w(`icon`,[x(`rubber-band`,[x(`pressed`,[T(`rail`,[T(`button`,`max-width: var(--n-button-width-pressed);`)])]),T(`rail`,[e(`&:active`,[T(`button`,`max-width: var(--n-button-width-pressed);`)])]),x(`active`,[x(`pressed`,[T(`rail`,[T(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])]),T(`rail`,[e(`&:active`,[T(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])])])])])]),x(`active`,[T(`rail`,[T(`button`,`left: calc(100% - var(--n-button-width) - var(--n-offset))`)])]),T(`rail`,`
|
| 53 |
+
overflow: hidden;
|
| 54 |
+
height: var(--n-rail-height);
|
| 55 |
+
min-width: var(--n-rail-width);
|
| 56 |
+
border-radius: var(--n-rail-border-radius);
|
| 57 |
+
cursor: pointer;
|
| 58 |
+
position: relative;
|
| 59 |
+
transition:
|
| 60 |
+
opacity .3s var(--n-bezier),
|
| 61 |
+
background .3s var(--n-bezier),
|
| 62 |
+
box-shadow .3s var(--n-bezier);
|
| 63 |
+
background-color: var(--n-rail-color);
|
| 64 |
+
`,[T(`button-icon`,`
|
| 65 |
+
color: var(--n-icon-color);
|
| 66 |
+
transition: color .3s var(--n-bezier);
|
| 67 |
+
font-size: calc(var(--n-button-height) - 4px);
|
| 68 |
+
position: absolute;
|
| 69 |
+
left: 0;
|
| 70 |
+
right: 0;
|
| 71 |
+
top: 0;
|
| 72 |
+
bottom: 0;
|
| 73 |
+
display: flex;
|
| 74 |
+
justify-content: center;
|
| 75 |
+
align-items: center;
|
| 76 |
+
line-height: 1;
|
| 77 |
+
`,[i()]),T(`button`,`
|
| 78 |
+
align-items: center;
|
| 79 |
+
top: var(--n-offset);
|
| 80 |
+
left: var(--n-offset);
|
| 81 |
+
height: var(--n-button-height);
|
| 82 |
+
width: var(--n-button-width-pressed);
|
| 83 |
+
max-width: var(--n-button-width);
|
| 84 |
+
border-radius: var(--n-button-border-radius);
|
| 85 |
+
background-color: var(--n-button-color);
|
| 86 |
+
box-shadow: var(--n-button-box-shadow);
|
| 87 |
+
box-sizing: border-box;
|
| 88 |
+
cursor: inherit;
|
| 89 |
+
content: "";
|
| 90 |
+
position: absolute;
|
| 91 |
+
transition:
|
| 92 |
+
background-color .3s var(--n-bezier),
|
| 93 |
+
left .3s var(--n-bezier),
|
| 94 |
+
opacity .3s var(--n-bezier),
|
| 95 |
+
max-width .3s var(--n-bezier),
|
| 96 |
+
box-shadow .3s var(--n-bezier);
|
| 97 |
+
`)]),x(`active`,[T(`rail`,`background-color: var(--n-rail-color-active);`)]),x(`loading`,[T(`rail`,`
|
| 98 |
+
cursor: wait;
|
| 99 |
+
`)]),x(`disabled`,[T(`rail`,`
|
| 100 |
+
cursor: not-allowed;
|
| 101 |
+
opacity: .5;
|
| 102 |
+
`)])]),A=Object.assign(Object.assign({},_.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),j,M=n({name:`Switch`,props:A,slots:Object,setup(e){j===void 0&&(j=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:i}=h(e),o=_(`Switch`,`-switch`,k,O,e,n),c=b(e,{mergedSize(t){return e.size===void 0?t?t.mergedSize.value:i?.value?.Switch?.size||`medium`:e.size}}),{mergedSizeRef:l,mergedDisabledRef:d}=c,f=y(e.defaultValue),p=s(S(e,`value`),f),v=t(()=>p.value===e.checkedValue),x=y(!1),w=y(!1),T=t(()=>{let{railStyle:t}=e;if(t)return t({focused:w.value,checked:v.value})});function E(t){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=c;n&&m(n,t),i&&m(i,t),r&&m(r,t),f.value=t,a(),o()}function D(){let{nTriggerFormFocus:e}=c;e()}function A(){let{nTriggerFormBlur:e}=c;e()}function M(){e.loading||d.value||(p.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue))}function N(){w.value=!0,D()}function P(){w.value=!1,A(),x.value=!1}function F(t){e.loading||d.value||t.key===` `&&(p.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue),x.value=!1)}function I(t){e.loading||d.value||t.key===` `&&(t.preventDefault(),x.value=!0)}let L=t(()=>{let{value:e}=l,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:s,boxShadowFocus:c,loadingColor:d,textColor:f,iconColor:p,[g(`buttonHeight`,e)]:m,[g(`buttonWidth`,e)]:h,[g(`buttonWidthPressed`,e)]:_,[g(`railHeight`,e)]:v,[g(`railWidth`,e)]:y,[g(`railBorderRadius`,e)]:b,[g(`buttonBorderRadius`,e)]:x},common:{cubicBezierEaseInOut:S}}=o.value,C,w,T;return j?(C=`calc((${v} - ${m}) / 2)`,w=`max(${v}, ${m})`,T=`max(${y}, calc(${y} + ${m} - ${v}))`):(C=u((a(v)-a(m))/2),w=u(Math.max(a(v),a(m))),T=a(v)>a(m)?y:u(a(y)+a(m)-a(v))),{"--n-bezier":S,"--n-button-border-radius":x,"--n-button-box-shadow":i,"--n-button-color":s,"--n-button-width":h,"--n-button-width-pressed":_,"--n-button-height":m,"--n-height":w,"--n-offset":C,"--n-opacity-disabled":t,"--n-rail-border-radius":b,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":v,"--n-rail-width":y,"--n-width":T,"--n-box-shadow-focus":c,"--n-loading-color":d,"--n-text-color":f,"--n-icon-color":p}}),R=r?C(`switch`,t(()=>l.value[0]),L,e):void 0;return{handleClick:M,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:T,pressed:x,mergedClsPrefix:n,mergedValue:p,checked:v,mergedDisabled:d,cssVars:r?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:i,onRender:a,$slots:o}=this;a?.();let{checked:s,unchecked:l,icon:u,"checked-icon":p,"unchecked-icon":m}=o,h=!(d(u)&&d(p)&&d(m));return c(`div`,{role:`switch`,"aria-checked":n,class:[`${e}-switch`,this.themeClass,h&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},c(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:i},f(s,t=>f(l,n=>t||n?c(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},c(`div`,{class:`${e}-switch__rail-placeholder`},c(`div`,{class:`${e}-switch__button-placeholder`}),t),c(`div`,{class:`${e}-switch__rail-placeholder`},c(`div`,{class:`${e}-switch__button-placeholder`}),n)):null)),c(`div`,{class:`${e}-switch__button`},f(u,t=>f(p,n=>f(m,i=>c(E,null,{default:()=>this.loading?c(r,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(n||t)?c(`div`,{class:`${e}-switch__button-icon`,key:n?`checked-icon`:`icon`},n||t):!this.checked&&(i||t)?c(`div`,{class:`${e}-switch__button-icon`,key:i?`unchecked-icon`:`icon`},i||t):null})))),f(s,t=>t&&c(`div`,{key:`checked`,class:`${e}-switch__checked`},t)),f(l,t=>t&&c(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},t)))))}});export{M as t};
|
webui/assets/TerminalView-gsqzLJ6S.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
webui/assets/TerminalView-rrxswUK5.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}[data-v-7963a2bf]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-7963a2bf]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.terminal-panel[data-v-7963a2bf]{height:100%;display:flex;position:relative}.session-list[data-v-7963a2bf]{border-right:1px solid var(--border-color);flex-direction:column;flex-shrink:0;width:220px;transition:width .25s,opacity .25s;display:flex;overflow:hidden}.session-list.collapsed[data-v-7963a2bf]{opacity:0;pointer-events:none;border-right:none;width:0}@media (width<=768px){.session-list[data-v-7963a2bf]{z-index:10;background:var(--bg-card);width:280px;height:100%;position:absolute;top:0;left:0;box-shadow:2px 0 8px #0000001a}.session-list.collapsed[data-v-7963a2bf]{opacity:0;transform:translate(-100%)}}.session-list-header[data-v-7963a2bf]{flex-shrink:0;justify-content:space-between;align-items:center;padding:12px;display:flex}.session-list-actions[data-v-7963a2bf]{align-items:center;gap:4px;display:flex}.session-list-title[data-v-7963a2bf]{color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;font-size:12px;font-weight:600}.session-items[data-v-7963a2bf]{flex:1;padding:0 6px 12px;overflow-y:auto}.session-empty[data-v-7963a2bf]{color:var(--text-muted);text-align:center;padding:16px 10px;font-size:12px}.session-item[data-v-7963a2bf]{cursor:pointer;text-align:left;width:100%;color:var(--text-secondary);background:0 0;border:none;border-radius:6px;justify-content:space-between;align-items:center;margin-bottom:2px;padding:8px 10px;transition:all .15s;display:flex}.session-item[data-v-7963a2bf]:hover{background:rgba(var(--accent-primary-rgb), .06);color:var(--text-primary)}.session-item:hover .session-item-delete[data-v-7963a2bf]{opacity:1}.session-item.active[data-v-7963a2bf]{background:rgba(var(--accent-primary-rgb), .1);color:var(--text-primary);font-weight:500}.session-item.exited[data-v-7963a2bf]{opacity:.5}.session-item-content[data-v-7963a2bf]{flex:1;overflow:hidden}.session-item-title[data-v-7963a2bf]{white-space:nowrap;text-overflow:ellipsis;font-size:13px;display:block;overflow:hidden}.session-item-meta[data-v-7963a2bf]{align-items:center;gap:6px;margin-top:2px;display:flex}.session-item-shell[data-v-7963a2bf]{color:var(--accent-primary);background:rgba(var(--accent-primary-rgb), .08);border-radius:3px;padding:0 5px;font-size:10px;line-height:16px}.session-item-time[data-v-7963a2bf]{color:var(--text-muted);font-size:11px}.session-item-status[data-v-7963a2bf]{color:var(--text-muted);font-size:11px;font-style:italic}.session-item-delete[data-v-7963a2bf]{opacity:.5;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;padding:2px;transition:all .15s}.session-item-delete[data-v-7963a2bf]:hover{color:var(--error);background:rgba(var(--error-rgb), .1)}.session-close-btn[data-v-7963a2bf]{cursor:pointer;color:var(--text-secondary);background:0 0;border:none;border-radius:6px;padding:4px;display:none}.session-close-btn[data-v-7963a2bf]:hover{background:rgba(var(--accent-primary-rgb), .06)}.terminal-main[data-v-7963a2bf]{flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.terminal-header[data-v-7963a2bf]{border-bottom:1px solid var(--border-color);flex-shrink:0;justify-content:space-between;align-items:center;padding:21px 20px;display:flex}.header-left[data-v-7963a2bf]{flex:1;align-items:center;gap:8px;min-width:0;display:flex;overflow:hidden}.header-session-title[data-v-7963a2bf]{color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:600;overflow:hidden}.header-actions[data-v-7963a2bf]{flex-shrink:0;align-items:center;gap:8px;display:flex}.theme-select[data-v-7963a2bf]{width:130px}.terminal-container[data-v-7963a2bf]{flex-direction:column;flex:1;min-height:0;margin:10px;display:flex;overflow:hidden}.terminal-xterm[data-v-7963a2bf]{border:1px solid var(--border-color);border-radius:10px;flex:1;overflow:hidden}.terminal-xterm[data-v-7963a2bf] .xterm{height:100%;padding:8px}.terminal-xterm[data-v-7963a2bf] .xterm-viewport{scrollbar-width:none!important;-ms-overflow-style:none!important;background-color:#0000!important;overflow-y:scroll!important}.terminal-xterm[data-v-7963a2bf] .xterm-viewport::-webkit-scrollbar{display:none!important}.terminal-xterm[data-v-7963a2bf] .xterm-screen{background-color:#0000!important}.terminal-xterm[data-v-7963a2bf] .xterm-scrollable-element{scrollbar-width:none!important;-ms-overflow-style:none!important}.terminal-xterm[data-v-7963a2bf] .xterm-scrollable-element::-webkit-scrollbar{display:none!important}@media (width<=768px){.session-close-btn[data-v-7963a2bf]{display:flex}.session-backdrop[data-v-7963a2bf]{z-index:9;opacity:0;pointer-events:none;background:#0006;transition:opacity .15s;position:absolute;inset:0}.session-backdrop.active[data-v-7963a2bf]{opacity:1;pointer-events:auto}.terminal-header[data-v-7963a2bf]{padding:16px 12px 16px 52px}.terminal-container[data-v-7963a2bf]{padding:8px}.terminal-xterm[data-v-7963a2bf]{bottom:0;left:0;right:0}}.xterm .scrollbar{background:#ffffff14!important;border-radius:3px!important;width:6px!important}.xterm .scrollbar .slider{background:#fff3!important;border-radius:3px!important;transition:background .15s!important}.xterm .scrollbar:hover .slider{background:#ffffff59!important}
|
webui/assets/Tooltip-DQzh27d-.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Dr as e,Fr as t,L as n,Lr as r,R as i,in as a,it as o,ni as s,w as c}from"./index-Cl8-DFW_.js";var l=t({name:`Tooltip`,props:Object.assign(Object.assign({},i),o.props),slots:Object,__popover__:!0,setup(t){let{mergedClsPrefixRef:n}=a(t),r=o(`Tooltip`,`-tooltip`,void 0,c,t,n),i=s(null);return Object.assign(Object.assign({},{syncPosition(){i.value.syncPosition()},setShow(e){i.value.setShow(e)}}),{popoverRef:i,mergedTheme:r,popoverThemeOverrides:e(()=>r.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return r(n,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}});export{l as t};
|
webui/assets/Upload-DNhu4d4-.js
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{t as e}from"./_arrayReduce-Cj7sZjrj.js";import{t}from"./Add-D070kowG.js";import{t as n}from"./Tooltip-DQzh27d-.js";import{$ as r,$n as i,$r as a,An as o,B as s,Bn as c,Br as l,Cn as u,Dn as d,Dr as f,F as p,Fr as m,Hn as h,Hr as g,In as _,J as v,K as y,Kr as b,Ln as x,Lr as S,Pn as C,Q as w,Qn as ee,Rr as T,Tr as E,U as D,Un as O,Ur as k,W as te,Wn as A,X as j,Xr as ne,Y as re,Z as ie,Zr as M,_n as N,_r as P,br as ae,d as F,er as I,et as L,gn as oe,h as se,hn as R,ii as ce,in as z,ir as le,it as B,k as V,ni as H,nn as ue,nr as U,nt as W,on as G,ot as de,ri as K,rn as fe,rr as pe,rt as me,si as he,sr as q,st as ge,tr as J,tt as _e,vn as ve,w as ye,wr as Y,yn as X,zt as be}from"./index-Cl8-DFW_.js";function xe(e,t){if(!e)return;let n=document.createElement(`a`);n.href=e,t!==void 0&&(n.download=t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Se(e){return function(t){return e?.[t]}}var Ce=Se({À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`}),we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Te=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`);function Ee(e){return e=be(e),e&&e.replace(we,Ce).replace(Te,``)}var De=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Oe(e){return e.match(De)||[]}var ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ae(e){return ke.test(e)}var je=`\\ud800-\\udfff`,Me=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Ne=`\\u2700-\\u27bf`,Pe=`a-z\\xdf-\\xf6\\xf8-\\xff`,Fe=`\\xac\\xb1\\xd7\\xf7`,Ie=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,Le=`\\u2000-\\u206f`,Re=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,ze=`A-Z\\xc0-\\xd6\\xd8-\\xde`,Be=`\\ufe0e\\ufe0f`,Ve=Fe+Ie+Le+Re,He=`['’]`,Ue=`[`+Ve+`]`,We=`[`+Me+`]`,Ge=`\\d+`,Ke=`[`+Ne+`]`,qe=`[`+Pe+`]`,Je=`[^`+je+Ve+Ge+Ne+Pe+ze+`]`,Ye=`(?:`+We+`|\\ud83c[\\udffb-\\udfff])`,Xe=`[^`+je+`]`,Ze=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Qe=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Z=`[`+ze+`]`,$e=`\\u200d`,et=`(?:`+qe+`|`+Je+`)`,tt=`(?:`+Z+`|`+Je+`)`,nt=`(?:`+He+`(?:d|ll|m|re|s|t|ve))?`,rt=`(?:`+He+`(?:D|LL|M|RE|S|T|VE))?`,it=Ye+`?`,at=`[`+Be+`]?`,ot=`(?:`+$e+`(?:`+[Xe,Ze,Qe].join(`|`)+`)`+at+it+`)*`,st=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,ct=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,lt=at+it+ot,ut=`(?:`+[Ke,Ze,Qe].join(`|`)+`)`+lt,dt=RegExp([Z+`?`+qe+`+`+nt+`(?=`+[Ue,Z,`$`].join(`|`)+`)`,tt+`+`+rt+`(?=`+[Ue,Z+et,`$`].join(`|`)+`)`,Z+`?`+et+`+`+nt,Z+`+`+rt,ct,st,Ge,ut].join(`|`),`g`);function ft(e){return e.match(dt)||[]}function pt(e,t,n){return e=be(e),t=n?void 0:t,t===void 0?Ae(e)?ft(e):Oe(e):e.match(t)||[]}var mt=RegExp(`['’]`,`g`);function ht(t){return function(n){return e(pt(Ee(n).replace(mt,``)),t,``)}}var gt=ht(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),_t=L(`attach`,()=>S(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},S(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},S(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},S(`path`,{d:`M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z`}))))),vt=L(`cancel`,()=>S(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},S(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},S(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},S(`path`,{d:`M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z`}))))),yt=L(`download`,()=>S(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},S(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},S(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},S(`path`,{d:`M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z`}))))),bt=m({name:`ResizeSmall`,render(){return S(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},S(`g`,{fill:`none`},S(`path`,{d:`M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z`,fill:`currentColor`})))}}),xt=L(`retry`,()=>S(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},S(`path`,{d:`M320,146s24.36-12-64-12A160,160,0,1,0,416,294`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;`}),S(`polyline`,{points:`256 58 336 138 256 218`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),St=L(`rotateClockwise`,()=>S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z`,fill:`currentColor`}),S(`path`,{d:`M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z`,fill:`currentColor`}))),Ct=L(`rotateClockwise`,()=>S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z`,fill:`currentColor`}),S(`path`,{d:`M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z`,fill:`currentColor`}))),wt=L(`trash`,()=>S(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},S(`path`,{d:`M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),S(`rect`,{x:`32`,y:`64`,width:`448`,height:`80`,rx:`16`,ry:`16`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),S(`line`,{x1:`312`,y1:`240`,x2:`200`,y2:`352`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}),S(`line`,{x1:`312`,y1:`352`,x2:`200`,y2:`240`,style:`fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;`}))),Tt=L(`zoomIn`,()=>S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z`,fill:`currentColor`}),S(`path`,{d:`M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z`,fill:`currentColor`}))),Et=L(`zoomOut`,()=>S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z`,fill:`currentColor`}),S(`path`,{d:`M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z`,fill:`currentColor`}))),Dt=o&&`loading`in document.createElement(`img`);function Ot(e={}){let{root:t=null}=e;return{hash:`${e.rootMargin||`0px 0px 0px 0px`}-${Array.isArray(e.threshold)?e.threshold.join(`,`):e.threshold??`0`}`,options:Object.assign(Object.assign({},e),{root:(typeof t==`string`?document.querySelector(t):t)||document.documentElement})}}var kt=new WeakMap,At=new WeakMap,jt=new WeakMap,Mt=(e,t,n)=>{if(!e)return()=>{};let r=Ot(t),{root:i}=r.options,a,o=kt.get(i);o?a=o:(a=new Map,kt.set(i,a));let s,c;a.has(r.hash)?(c=a.get(r.hash),c[1].has(e)||(s=c[0],c[1].add(e),s.observe(e))):(s=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=At.get(e.target),n=jt.get(e.target);t&&t(),n&&(n.value=!0)}})},r.options),s.observe(e),c=[s,new Set([e])],a.set(r.hash,c));let l=!1,u=()=>{l||(At.delete(e),jt.delete(e),l=!0,c[1].has(e)&&(c[0].unobserve(e),c[1].delete(e)),c[1].size<=0&&a.delete(r.hash),a.size||kt.delete(i))};return At.set(e,u),jt.set(e,n),u};function Nt(){return{toolbarIconColor:`rgba(255, 255, 255, .9)`,toolbarColor:`rgba(0, 0, 0, .35)`,toolbarBoxShadow:`none`,toolbarBorderRadius:`24px`}}var Pt=me({name:`Image`,common:D,peers:{Tooltip:ye},self:Nt});function Ft(){return S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z`,fill:`currentColor`}))}function It(){return S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z`,fill:`currentColor`}))}function Lt(){return S(`svg`,{viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},S(`path`,{d:`M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z`,fill:`currentColor`}))}var Rt=Object.assign(Object.assign({},B.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),zt=C(`n-image`),Bt=i([i(`body >`,[I(`image-container`,`position: fixed;`)]),I(`image-preview-container`,`
|
| 2 |
+
position: fixed;
|
| 3 |
+
left: 0;
|
| 4 |
+
right: 0;
|
| 5 |
+
top: 0;
|
| 6 |
+
bottom: 0;
|
| 7 |
+
display: flex;
|
| 8 |
+
`),I(`image-preview-overlay`,`
|
| 9 |
+
z-index: -1;
|
| 10 |
+
position: absolute;
|
| 11 |
+
left: 0;
|
| 12 |
+
right: 0;
|
| 13 |
+
top: 0;
|
| 14 |
+
bottom: 0;
|
| 15 |
+
background: rgba(0, 0, 0, .3);
|
| 16 |
+
`,[te()]),I(`image-preview-toolbar`,`
|
| 17 |
+
z-index: 1;
|
| 18 |
+
position: absolute;
|
| 19 |
+
left: 50%;
|
| 20 |
+
transform: translateX(-50%);
|
| 21 |
+
border-radius: var(--n-toolbar-border-radius);
|
| 22 |
+
height: 48px;
|
| 23 |
+
bottom: 40px;
|
| 24 |
+
padding: 0 12px;
|
| 25 |
+
background: var(--n-toolbar-color);
|
| 26 |
+
box-shadow: var(--n-toolbar-box-shadow);
|
| 27 |
+
color: var(--n-toolbar-icon-color);
|
| 28 |
+
transition: color .3s var(--n-bezier);
|
| 29 |
+
display: flex;
|
| 30 |
+
align-items: center;
|
| 31 |
+
`,[I(`base-icon`,`
|
| 32 |
+
padding: 0 8px;
|
| 33 |
+
font-size: 28px;
|
| 34 |
+
cursor: pointer;
|
| 35 |
+
`),te()]),I(`image-preview-wrapper`,`
|
| 36 |
+
position: absolute;
|
| 37 |
+
left: 0;
|
| 38 |
+
right: 0;
|
| 39 |
+
top: 0;
|
| 40 |
+
bottom: 0;
|
| 41 |
+
display: flex;
|
| 42 |
+
pointer-events: none;
|
| 43 |
+
`,[s()]),I(`image-preview`,`
|
| 44 |
+
user-select: none;
|
| 45 |
+
-webkit-user-select: none;
|
| 46 |
+
pointer-events: all;
|
| 47 |
+
margin: auto;
|
| 48 |
+
max-height: calc(100vh - 32px);
|
| 49 |
+
max-width: calc(100vw - 32px);
|
| 50 |
+
transition: transform .3s var(--n-bezier);
|
| 51 |
+
`),I(`image`,`
|
| 52 |
+
display: inline-flex;
|
| 53 |
+
max-height: 100%;
|
| 54 |
+
max-width: 100%;
|
| 55 |
+
`,[pe(`preview-disabled`,`
|
| 56 |
+
cursor: pointer;
|
| 57 |
+
`),i(`img`,`
|
| 58 |
+
border-radius: inherit;
|
| 59 |
+
`)])]),Vt=32,Ht=m({name:`ImagePreview`,props:Object.assign(Object.assign({},Rt),{src:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onNext:Function,onPrev:Function,onClose:[Function,Array]}),setup(e){let{src:t}=ce(e),{mergedClsPrefixRef:r}=z(e),i=B(`Image`,`-image`,Bt,Pt,e,r),a=null,o=H(null),s=H(null),c=H(!1),{localeRef:l}=ge(`Image`),u=H(e.defaultShow),d=x(K(e,`show`),u);function p(){let{value:e}=s;if(!a||!e)return;let{style:t}=e,n=a.getBoundingClientRect();t.transformOrigin=`${n.left+n.width/2}px ${n.top+n.height/2}px`}function m(t){var n,r;switch(t.key){case` `:t.preventDefault();break;case`ArrowLeft`:(n=e.onPrev)==null||n.call(e);break;case`ArrowRight`:(r=e.onNext)==null||r.call(e);break;case`ArrowUp`:t.preventDefault(),de();break;case`ArrowDown`:t.preventDefault(),pe();break;case`Escape`:J();break}}function v(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&R(n,t),r&&R(r,t),u.value=t,c.value=!0}ne(d,e=>{e?O(`keydown`,document,m):h(`keydown`,document,m)}),g(()=>{h(`keydown`,document,m)});let y=0,b=0,C=0,w=0,E=0,D=0,k=0,te=0,A=!1;function j(e){let{clientX:t,clientY:n}=e;C=t-y,w=n-b,ee(q)}function re(e){let{mouseUpClientX:t,mouseUpClientY:n,mouseDownClientX:r,mouseDownClientY:i}=e,a=r-t,o=i-n;return{moveVerticalDirection:`vertical${o>0?`Top`:`Bottom`}`,moveHorizontalDirection:`horizontal${a>0?`Left`:`Right`}`,deltaHorizontal:a,deltaVertical:o}}function ie(e){let{value:t}=o;if(!t)return{offsetX:0,offsetY:0};let n=t.getBoundingClientRect(),{moveVerticalDirection:r,moveHorizontalDirection:i,deltaHorizontal:a,deltaVertical:s}=e||{},c=0,l=0;return c=n.width<=window.innerWidth?0:n.left>0?(n.width-window.innerWidth)/2:n.right<window.innerWidth?-(n.width-window.innerWidth)/2:i===`horizontalRight`?Math.min((n.width-window.innerWidth)/2,E-(a??0)):Math.max(-((n.width-window.innerWidth)/2),E-(a??0)),l=n.height<=window.innerHeight?0:n.top>0?(n.height-window.innerHeight)/2:n.bottom<window.innerHeight?-(n.height-window.innerHeight)/2:r===`verticalBottom`?Math.min((n.height-window.innerHeight)/2,D-(s??0)):Math.max(-((n.height-window.innerHeight)/2),D-(s??0)),{offsetX:c,offsetY:l}}function M(e){h(`mousemove`,document,j),h(`mouseup`,document,M);let{clientX:t,clientY:n}=e;A=!1;let r=ie(re({mouseUpClientX:t,mouseUpClientY:n,mouseDownClientX:k,mouseDownClientY:te}));C=r.offsetX,w=r.offsetY,q()}let N=T(zt,null);function P(e){var t,n;if((n=(t=N?.previewedImgPropsRef.value)?.onMousedown)==null||n.call(t,e),e.button!==0)return;let{clientX:r,clientY:i}=e;A=!0,y=r-C,b=i-w,E=C,D=w,k=r,te=i,q(),O(`mousemove`,document,j),O(`mouseup`,document,M)}let ae=1.5,F=0,I=1,L=0;function oe(e){var t,n;(n=(t=N?.previewedImgPropsRef.value)?.onDblclick)==null||n.call(t,e);let r=G();I=I===r?1:r,q()}function se(){I=1,F=0}function le(){var t;se(),L=0,(t=e.onPrev)==null||t.call(e)}function V(){var t;se(),L=0,(t=e.onNext)==null||t.call(e)}function ue(){L-=90,q()}function U(){L+=90,q()}function W(){let{value:e}=o;if(!e)return 1;let{innerWidth:t,innerHeight:n}=window,r=Math.max(1,e.naturalHeight/(n-Vt)),i=Math.max(1,e.naturalWidth/(t-Vt));return Math.max(3,r*2,i*2)}function G(){let{value:e}=o;if(!e)return 1;let{innerWidth:t,innerHeight:n}=window,r=e.naturalHeight/(n-Vt),i=e.naturalWidth/(t-Vt);return r<1&&i<1?1:Math.max(r,i)}function de(){let e=W();I<e&&(F+=1,I=Math.min(e,ae**+F),q())}function pe(){if(I>.5){let e=I;--F,I=Math.max(.5,ae**+F);let t=e-I;q(!1);let n=ie();I+=t,q(!1),I-=t,C=n.offsetX,w=n.offsetY,q()}}function me(){let e=t.value;e&&xe(e,void 0)}function q(e=!0){let{value:t}=o;if(!t)return;let{style:n}=t,r=he(N?.previewedImgPropsRef.value?.style),i=``;if(typeof r==`string`)i=`${r};`;else for(let e in r)i+=`${gt(e)}: ${r[e]};`;let a=`transform-origin: center; transform: translateX(${C}px) translateY(${w}px) rotate(${L}deg) scale(${I});`;A?n.cssText=`${i}cursor: grabbing; transition: none;${a}`:n.cssText=`${i}cursor: grab;${a}${e?``:`transition: none;`}`,e||t.offsetHeight}function J(){if(d.value){let{onClose:t}=e;t&&R(t),v(!1),u.value=!1}}function _e(){I=G(),F=Math.ceil(Math.log(I)/Math.log(ae)),C=0,w=0,q()}let ve={setThumbnailEl:e=>{a=e}};function ye(t,r){if(e.showToolbarTooltip){let{value:e}=i;return S(n,{to:!1,theme:e.peers.Tooltip,themeOverrides:e.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>l.value[r],trigger:()=>t})}else return t}let Y=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{toolbarIconColor:t,toolbarBorderRadius:n,toolbarBoxShadow:r,toolbarColor:a}}=i.value;return{"--n-bezier":e,"--n-toolbar-icon-color":t,"--n-toolbar-color":a,"--n-toolbar-border-radius":n,"--n-toolbar-box-shadow":r}}),{inlineThemeDisabled:X}=z(),be=X?fe(`image-preview`,void 0,Y,e):void 0;function Se(e){e.preventDefault()}return Object.assign({clsPrefix:r,previewRef:o,previewWrapperRef:s,previewSrc:t,mergedShow:d,appear:_(),displayed:c,previewedImgProps:N?.previewedImgPropsRef,handleWheel:Se,handlePreviewMousedown:P,handlePreviewDblclick:oe,syncTransformOrigin:p,handleAfterLeave:()=>{se(),L=0,c.value=!1},handleDragStart:e=>{var t,n;(n=(t=N?.previewedImgPropsRef.value)?.onDragstart)==null||n.call(t,e),e.preventDefault()},zoomIn:de,zoomOut:pe,handleDownloadClick:me,rotateCounterclockwise:ue,rotateClockwise:U,handleSwitchPrev:le,handleSwitchNext:V,withTooltip:ye,resizeToOrignalImageSize:_e,cssVars:X?void 0:Y,themeClass:be?.themeClass,onRender:be?.onRender,doUpdateShow:v,close:J},ve)},render(){var e;let{clsPrefix:t,renderToolbar:n,withTooltip:r}=this,i=r(S(W,{clsPrefix:t,onClick:this.handleSwitchPrev},{default:Ft}),`tipPrevious`),o=r(S(W,{clsPrefix:t,onClick:this.handleSwitchNext},{default:It}),`tipNext`),s=r(S(W,{clsPrefix:t,onClick:this.rotateCounterclockwise},{default:()=>S(Ct,null)}),`tipCounterclockwise`),c=r(S(W,{clsPrefix:t,onClick:this.rotateClockwise},{default:()=>S(St,null)}),`tipClockwise`),l=r(S(W,{clsPrefix:t,onClick:this.resizeToOrignalImageSize},{default:()=>S(bt,null)}),`tipOriginalSize`),f=r(S(W,{clsPrefix:t,onClick:this.zoomOut},{default:()=>S(Et,null)}),`tipZoomOut`),p=r(S(W,{clsPrefix:t,onClick:this.handleDownloadClick},{default:()=>S(yt,null)}),`tipDownload`),m=r(S(W,{clsPrefix:t,onClick:()=>this.close()},{default:Lt}),`tipClose`),h=r(S(W,{clsPrefix:t,onClick:this.zoomIn},{default:()=>S(Tt,null)}),`tipZoomIn`);return S(Y,null,(e=this.$slots).default?.call(e),S(u,{show:this.mergedShow},{default:()=>{var e;return this.mergedShow||this.displayed?((e=this.onRender)==null||e.call(this),a(S(`div`,{ref:`containerRef`,class:[`${t}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},S(P,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?S(`div`,{class:`${t}-image-preview-overlay`,onClick:()=>this.close()}):null}),this.showToolbar?S(P,{name:`fade-in-transition`,appear:this.appear},{default:()=>this.mergedShow?S(`div`,{class:`${t}-image-preview-toolbar`},n?n({nodes:{prev:i,next:o,rotateCounterclockwise:s,rotateClockwise:c,resizeToOriginalSize:l,zoomOut:f,zoomIn:h,download:p,close:m}}):S(Y,null,this.onPrev?S(Y,null,i,o):null,s,c,l,f,h,p,m)):null}):null,S(P,{name:`fade-in-scale-up-transition`,onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{let{previewedImgProps:e={}}=this;return a(S(`div`,{class:`${t}-image-preview-wrapper`,ref:`previewWrapperRef`},S(`img`,Object.assign({},e,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${t}-image-preview`,e.class],key:this.previewSrc,src:this.previewSrc,ref:`previewRef`,onDragstart:this.handleDragStart}))),[[ae,this.mergedShow]])}})),[[d,{enabled:this.mergedShow}]])):null}}))}}),Ut=C(`n-image-group`),Wt=m({name:`ImageGroup`,props:Object.assign(Object.assign({},Rt),{srcList:Array,current:Number,defaultCurrent:{type:Number,default:0},show:{type:Boolean,default:void 0},defaultShow:Boolean,onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],onUpdateCurrent:[Function,Array],"onUpdate:current":[Function,Array]}),setup(e){let{mergedClsPrefixRef:t}=z(e),n=`c${A()}`,r=H(null),i=H(e.defaultShow),a=x(K(e,`show`),i),o=H(new Map),s=f(()=>{if(e.srcList){let t=new Map;return e.srcList.forEach((e,n)=>{t.set(`p${n}`,e)}),t}return o.value}),c=f(()=>Array.from(s.value.keys())),l=()=>c.value.length;function u(t,n){e.srcList&&N(`image-group`,"`n-image` can't be placed inside `n-image-group` when image group's `src-list` prop is set.");let r=`r${t}`;return o.value.has(`r${r}`)||o.value.set(r,n),function(){o.value.has(r)||o.value.delete(r)}}let d=H(e.defaultCurrent),p=x(K(e,`current`),d),m=t=>{if(t!==p.value){let{onUpdateCurrent:n,"onUpdate:current":r}=e;n&&R(n,t),r&&R(r,t),d.value=t}},h=f(()=>c.value[p.value]),g=e=>{let t=c.value.indexOf(e);t!==p.value&&m(t)},_=f(()=>s.value.get(h.value));function v(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&R(n,t),r&&R(r,t),i.value=t}function y(){v(!1)}let S=f(()=>{let e=(e,t)=>{for(let n=e;n<=t;n++){let e=c.value[n];if(s.value.get(e))return n}},t=e(p.value+1,l()-1);return t===void 0?e(0,p.value-1):t}),C=f(()=>{let e=(e,t)=>{for(let n=e;n>=t;n--){let e=c.value[n];if(s.value.get(e))return n}},t=e(p.value-1,0);return t===void 0?e(l()-1,p.value+1):t});function w(t){var n,r;t===1?(C.value!==void 0&&m(S.value),(n=e.onPreviewNext)==null||n.call(e)):(S.value!==void 0&&m(C.value),(r=e.onPreviewPrev)==null||r.call(e))}return b(Ut,{mergedClsPrefixRef:t,registerImageUrl:u,setThumbnailEl:e=>{var t;(t=r.value)==null||t.setThumbnailEl(e)},toggleShow:e=>{v(!0),g(e)},groupId:n,renderToolbarRef:K(e,`renderToolbar`)}),{mergedClsPrefix:t,previewInstRef:r,mergedShow:a,src:_,onClose:y,next:()=>{w(1)},prev:()=>{w(-1)}}},render(){return S(Ht,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,onPrev:this.prev,onNext:this.next,src:this.src,show:this.mergedShow,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,onClose:this.onClose},this.$slots)}}),Gt=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:`fill`},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},Rt),Kt=0,qt=m({name:`Image`,props:Gt,slots:Object,inheritAttrs:!1,setup(e){let t=H(null),n=H(!1),r=H(null),i=T(Ut,null),{mergedClsPrefixRef:a}=i||z(e),o=f(()=>e.previewSrc||e.src),s=H(!1),c=Kt++,l=()=>{if(e.previewDisabled||n.value)return;if(i){i.setThumbnailEl(t.value),i.toggleShow(`r${c}`);return}let{value:a}=r;a&&(a.setThumbnailEl(t.value),s.value=!0)},u={click:()=>{l()},showPreview:l},d=H(!e.lazy);k(()=>{var e;(e=t.value)==null||e.setAttribute(`data-group-id`,i?.groupId||``)}),k(()=>{if(e.lazy&&e.intersectionObserverOptions){let n,r=M(()=>{n?.(),n=void 0,n=Mt(t.value,e.intersectionObserverOptions,d)});g(()=>{r(),n?.()})}}),M(()=>{var t;e.src||(t=e.imgProps)==null||t.src,n.value=!1}),M(e=>{let t=(i?.registerImageUrl)?.call(i,c,o.value||``);e(()=>{t?.()})});function p(t){var n,r;u.showPreview(),(r=(n=e.imgProps)?.onClick)==null||r.call(n,t)}function m(){s.value=!1}let h=H(!1);return b(zt,{previewedImgPropsRef:K(e,`previewedImgProps`)}),Object.assign({mergedClsPrefix:a,groupId:i?.groupId,previewInstRef:r,imageRef:t,mergedPreviewSrc:o,showError:n,shouldStartLoading:d,loaded:h,mergedOnClick:e=>{p(e)},onPreviewClose:m,mergedOnError:t=>{if(!d.value)return;n.value=!0;let{onError:r,imgProps:{onError:i}={}}=e;r?.(t),i?.(t)},mergedOnLoad:t=>{let{onLoad:n,imgProps:{onLoad:r}={}}=e;n?.(t),r?.(t),h.value=!0},previewShow:s},u)},render(){var e;let{mergedClsPrefix:t,imgProps:n={},loaded:r,$attrs:i,lazy:a}=this,o=G(this.$slots.error,()=>[]),s=(e=this.$slots).placeholder?.call(e),c=this.src||n.src,l=this.showError&&o.length?o:S(`img`,Object.assign(Object.assign({},n),{ref:`imageRef`,width:this.width||n.width,height:this.height||n.height,src:this.showError?this.fallbackSrc:a&&this.intersectionObserverOptions?this.shouldStartLoading?c:void 0:c,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:Dt&&a&&!this.intersectionObserverOptions?`lazy`:`eager`,style:[n.style||``,s&&!r?{height:`0`,width:`0`,visibility:`hidden`}:``,{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return S(`div`,Object.assign({},i,{role:`none`,class:[i.class,`${t}-image`,(this.previewDisabled||this.showError)&&`${t}-image--preview-disabled`]}),this.groupId?l:S(Ht,{theme:this.theme,themeOverrides:this.themeOverrides,ref:`previewInstRef`,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar,src:this.mergedPreviewSrc,show:!this.previewDisabled&&this.previewShow,onClose:this.onPreviewClose},{default:()=>l}),!r&&s)}}),Jt={success:S(j,null),error:S(r,null),warning:S(re,null),info:S(ie,null)},Yt=m({name:`ProgressCircle`,props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){let n=f(()=>{let t=`gradient`,{fillColor:n}=e;return typeof n==`object`?`${t}-${q(JSON.stringify(n))}`:t});function r(t,r,i,a){let{gapDegree:o,viewBoxWidth:s,strokeWidth:c}=e,l=50+c/2,u=`M ${l},${l} m 0,50
|
| 60 |
+
a 50,50 0 1 1 0,-100
|
| 61 |
+
a 50,50 0 1 1 0,100`,d=Math.PI*2*50;return{pathString:u,pathStyle:{stroke:a===`rail`?i:typeof e.fillColor==`object`?`url(#${n.value})`:i,strokeDasharray:`${Math.min(t,100)/100*(d-o)}px ${s*8}px`,strokeDashoffset:`-${o/2}px`,transformOrigin:r?`center`:void 0,transform:r?`rotate(${r}deg)`:void 0}}}let i=()=>{let t=typeof e.fillColor==`object`,r=t?e.fillColor.stops[0]:``,i=t?e.fillColor.stops[1]:``;return t&&S(`defs`,null,S(`linearGradient`,{id:n.value,x1:`0%`,y1:`100%`,x2:`100%`,y2:`0%`},S(`stop`,{offset:`0%`,"stop-color":r}),S(`stop`,{offset:`100%`,"stop-color":i})))};return()=>{let{fillColor:n,railColor:a,strokeWidth:o,offsetDegree:s,status:c,percentage:l,showIndicator:u,indicatorTextColor:d,unit:f,gapOffsetDegree:p,clsPrefix:m}=e,{pathString:h,pathStyle:g}=r(100,0,a,`rail`),{pathString:_,pathStyle:v}=r(l,s,n,`fill`),y=100+o;return S(`div`,{class:`${m}-progress-content`,role:`none`},S(`div`,{class:`${m}-progress-graph`,"aria-hidden":!0},S(`div`,{class:`${m}-progress-graph-circle`,style:{transform:p?`rotate(${p}deg)`:void 0}},S(`svg`,{viewBox:`0 0 ${y} ${y}`},i(),S(`g`,null,S(`path`,{class:`${m}-progress-graph-circle-rail`,d:h,"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:g})),S(`g`,null,S(`path`,{class:[`${m}-progress-graph-circle-fill`,l===0&&`${m}-progress-graph-circle-fill--empty`],d:_,"stroke-width":o,"stroke-linecap":`round`,fill:`none`,style:v}))))),u?S(`div`,null,t.default?S(`div`,{class:`${m}-progress-custom-content`,role:`none`},t.default()):c===`default`?S(`div`,{class:`${m}-progress-text`,style:{color:d},role:`none`},S(`span`,{class:`${m}-progress-text__percentage`},l),S(`span`,{class:`${m}-progress-text__unit`},f)):S(`div`,{class:`${m}-progress-icon`,"aria-hidden":!0},S(W,{clsPrefix:m},{default:()=>Jt[c]}))):null)}}}),Xt={success:S(j,null),error:S(r,null),warning:S(re,null),info:S(ie,null)},Zt=m({name:`ProgressLine`,props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:`%`},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){let n=f(()=>X(e.height)),r=f(()=>typeof e.fillColor==`object`?`linear-gradient(to right, ${e.fillColor?.stops[0]} , ${e.fillColor?.stops[1]})`:e.fillColor),i=f(()=>e.railBorderRadius===void 0?e.height===void 0?``:X(e.height,{c:.5}):X(e.railBorderRadius)),a=f(()=>e.fillBorderRadius===void 0?e.railBorderRadius===void 0?e.height===void 0?``:X(e.height,{c:.5}):X(e.railBorderRadius):X(e.fillBorderRadius));return()=>{let{indicatorPlacement:o,railColor:s,railStyle:c,percentage:l,unit:u,indicatorTextColor:d,status:f,showIndicator:p,processing:m,clsPrefix:h}=e;return S(`div`,{class:`${h}-progress-content`,role:`none`},S(`div`,{class:`${h}-progress-graph`,"aria-hidden":!0},S(`div`,{class:[`${h}-progress-graph-line`,{[`${h}-progress-graph-line--indicator-${o}`]:!0}]},S(`div`,{class:`${h}-progress-graph-line-rail`,style:[{backgroundColor:s,height:n.value,borderRadius:i.value},c]},S(`div`,{class:[`${h}-progress-graph-line-fill`,m&&`${h}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:n.value,lineHeight:n.value,borderRadius:a.value}},o===`inside`?S(`div`,{class:`${h}-progress-graph-line-indicator`,style:{color:d}},t.default?t.default():`${l}${u}`):null)))),p&&o===`outside`?S(`div`,null,t.default?S(`div`,{class:`${h}-progress-custom-content`,style:{color:d},role:`none`},t.default()):f===`default`?S(`div`,{role:`none`,class:`${h}-progress-icon ${h}-progress-icon--as-text`,style:{color:d}},l,u):S(`div`,{class:`${h}-progress-icon`,"aria-hidden":!0},S(W,{clsPrefix:h},{default:()=>Xt[f]}))):null)}}});function Qt(e,t,n=100){return`m ${n/2} ${n/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var $t=m({name:`ProgressMultipleCircle`,props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){let n=f(()=>e.percentage.map((t,n)=>`${Math.PI*t/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*n)-e.circleGap*n)*2}, ${e.viewBoxWidth*8}`)),r=(t,n)=>{let r=e.fillColor[n],i=typeof r==`object`?r.stops[0]:``,a=typeof r==`object`?r.stops[1]:``;return typeof e.fillColor[n]==`object`&&S(`linearGradient`,{id:`gradient-${n}`,x1:`100%`,y1:`0%`,x2:`0%`,y2:`100%`},S(`stop`,{offset:`0%`,"stop-color":i}),S(`stop`,{offset:`100%`,"stop-color":a}))};return()=>{let{viewBoxWidth:i,strokeWidth:a,circleGap:o,showIndicator:s,fillColor:c,railColor:l,railStyle:u,percentage:d,clsPrefix:f}=e;return S(`div`,{class:`${f}-progress-content`,role:`none`},S(`div`,{class:`${f}-progress-graph`,"aria-hidden":!0},S(`div`,{class:`${f}-progress-graph-circle`},S(`svg`,{viewBox:`0 0 ${i} ${i}`},S(`defs`,null,d.map((e,t)=>r(e,t))),d.map((e,t)=>S(`g`,{key:t},S(`path`,{class:`${f}-progress-graph-circle-rail`,d:Qt(i/2-a/2*(1+2*t)-o*t,a,i),"stroke-width":a,"stroke-linecap":`round`,fill:`none`,style:[{strokeDashoffset:0,stroke:l[t]},u[t]]}),S(`path`,{class:[`${f}-progress-graph-circle-fill`,e===0&&`${f}-progress-graph-circle-fill--empty`],d:Qt(i/2-a/2*(1+2*t)-o*t,a,i),"stroke-width":a,"stroke-linecap":`round`,fill:`none`,style:{strokeDasharray:n.value[t],strokeDashoffset:0,stroke:typeof c[t]==`object`?`url(#gradient-${t})`:c[t]}})))))),s&&t.default?S(`div`,null,S(`div`,{class:`${f}-progress-text`},t.default())):null)}}}),en=i([I(`progress`,{display:`inline-block`},[I(`progress-icon`,`
|
| 62 |
+
color: var(--n-icon-color);
|
| 63 |
+
transition: color .3s var(--n-bezier);
|
| 64 |
+
`),U(`line`,`
|
| 65 |
+
width: 100%;
|
| 66 |
+
display: block;
|
| 67 |
+
`,[I(`progress-content`,`
|
| 68 |
+
display: flex;
|
| 69 |
+
align-items: center;
|
| 70 |
+
`,[I(`progress-graph`,{flex:1})]),I(`progress-custom-content`,{marginLeft:`14px`}),I(`progress-icon`,`
|
| 71 |
+
width: 30px;
|
| 72 |
+
padding-left: 14px;
|
| 73 |
+
height: var(--n-icon-size-line);
|
| 74 |
+
line-height: var(--n-icon-size-line);
|
| 75 |
+
font-size: var(--n-icon-size-line);
|
| 76 |
+
`,[U(`as-text`,`
|
| 77 |
+
color: var(--n-text-color-line-outer);
|
| 78 |
+
text-align: center;
|
| 79 |
+
width: 40px;
|
| 80 |
+
font-size: var(--n-font-size);
|
| 81 |
+
padding-left: 4px;
|
| 82 |
+
transition: color .3s var(--n-bezier);
|
| 83 |
+
`)])]),U(`circle, dashboard`,{width:`120px`},[I(`progress-custom-content`,`
|
| 84 |
+
position: absolute;
|
| 85 |
+
left: 50%;
|
| 86 |
+
top: 50%;
|
| 87 |
+
transform: translateX(-50%) translateY(-50%);
|
| 88 |
+
display: flex;
|
| 89 |
+
align-items: center;
|
| 90 |
+
justify-content: center;
|
| 91 |
+
`),I(`progress-text`,`
|
| 92 |
+
position: absolute;
|
| 93 |
+
left: 50%;
|
| 94 |
+
top: 50%;
|
| 95 |
+
transform: translateX(-50%) translateY(-50%);
|
| 96 |
+
display: flex;
|
| 97 |
+
align-items: center;
|
| 98 |
+
color: inherit;
|
| 99 |
+
font-size: var(--n-font-size-circle);
|
| 100 |
+
color: var(--n-text-color-circle);
|
| 101 |
+
font-weight: var(--n-font-weight-circle);
|
| 102 |
+
transition: color .3s var(--n-bezier);
|
| 103 |
+
white-space: nowrap;
|
| 104 |
+
`),I(`progress-icon`,`
|
| 105 |
+
position: absolute;
|
| 106 |
+
left: 50%;
|
| 107 |
+
top: 50%;
|
| 108 |
+
transform: translateX(-50%) translateY(-50%);
|
| 109 |
+
display: flex;
|
| 110 |
+
align-items: center;
|
| 111 |
+
color: var(--n-icon-color);
|
| 112 |
+
font-size: var(--n-icon-size-circle);
|
| 113 |
+
`)]),U(`multiple-circle`,`
|
| 114 |
+
width: 200px;
|
| 115 |
+
color: inherit;
|
| 116 |
+
`,[I(`progress-text`,`
|
| 117 |
+
font-weight: var(--n-font-weight-circle);
|
| 118 |
+
color: var(--n-text-color-circle);
|
| 119 |
+
position: absolute;
|
| 120 |
+
left: 50%;
|
| 121 |
+
top: 50%;
|
| 122 |
+
transform: translateX(-50%) translateY(-50%);
|
| 123 |
+
display: flex;
|
| 124 |
+
align-items: center;
|
| 125 |
+
justify-content: center;
|
| 126 |
+
transition: color .3s var(--n-bezier);
|
| 127 |
+
`)]),I(`progress-content`,{position:`relative`}),I(`progress-graph`,{position:`relative`},[I(`progress-graph-circle`,[i(`svg`,{verticalAlign:`bottom`}),I(`progress-graph-circle-fill`,`
|
| 128 |
+
stroke: var(--n-fill-color);
|
| 129 |
+
transition:
|
| 130 |
+
opacity .3s var(--n-bezier),
|
| 131 |
+
stroke .3s var(--n-bezier),
|
| 132 |
+
stroke-dasharray .3s var(--n-bezier);
|
| 133 |
+
`,[U(`empty`,{opacity:0})]),I(`progress-graph-circle-rail`,`
|
| 134 |
+
transition: stroke .3s var(--n-bezier);
|
| 135 |
+
overflow: hidden;
|
| 136 |
+
stroke: var(--n-rail-color);
|
| 137 |
+
`)]),I(`progress-graph-line`,[U(`indicator-inside`,[I(`progress-graph-line-rail`,`
|
| 138 |
+
height: 16px;
|
| 139 |
+
line-height: 16px;
|
| 140 |
+
border-radius: 10px;
|
| 141 |
+
`,[I(`progress-graph-line-fill`,`
|
| 142 |
+
height: inherit;
|
| 143 |
+
border-radius: 10px;
|
| 144 |
+
`),I(`progress-graph-line-indicator`,`
|
| 145 |
+
background: #0000;
|
| 146 |
+
white-space: nowrap;
|
| 147 |
+
text-align: right;
|
| 148 |
+
margin-left: 14px;
|
| 149 |
+
margin-right: 14px;
|
| 150 |
+
height: inherit;
|
| 151 |
+
font-size: 12px;
|
| 152 |
+
color: var(--n-text-color-line-inner);
|
| 153 |
+
transition: color .3s var(--n-bezier);
|
| 154 |
+
`)])]),U(`indicator-inside-label`,`
|
| 155 |
+
height: 16px;
|
| 156 |
+
display: flex;
|
| 157 |
+
align-items: center;
|
| 158 |
+
`,[I(`progress-graph-line-rail`,`
|
| 159 |
+
flex: 1;
|
| 160 |
+
transition: background-color .3s var(--n-bezier);
|
| 161 |
+
`),I(`progress-graph-line-indicator`,`
|
| 162 |
+
background: var(--n-fill-color);
|
| 163 |
+
font-size: 12px;
|
| 164 |
+
transform: translateZ(0);
|
| 165 |
+
display: flex;
|
| 166 |
+
vertical-align: middle;
|
| 167 |
+
height: 16px;
|
| 168 |
+
line-height: 16px;
|
| 169 |
+
padding: 0 10px;
|
| 170 |
+
border-radius: 10px;
|
| 171 |
+
position: absolute;
|
| 172 |
+
white-space: nowrap;
|
| 173 |
+
color: var(--n-text-color-line-inner);
|
| 174 |
+
transition:
|
| 175 |
+
right .2s var(--n-bezier),
|
| 176 |
+
color .3s var(--n-bezier),
|
| 177 |
+
background-color .3s var(--n-bezier);
|
| 178 |
+
`)]),I(`progress-graph-line-rail`,`
|
| 179 |
+
position: relative;
|
| 180 |
+
overflow: hidden;
|
| 181 |
+
height: var(--n-rail-height);
|
| 182 |
+
border-radius: 5px;
|
| 183 |
+
background-color: var(--n-rail-color);
|
| 184 |
+
transition: background-color .3s var(--n-bezier);
|
| 185 |
+
`,[I(`progress-graph-line-fill`,`
|
| 186 |
+
background: var(--n-fill-color);
|
| 187 |
+
position: relative;
|
| 188 |
+
border-radius: 5px;
|
| 189 |
+
height: inherit;
|
| 190 |
+
width: 100%;
|
| 191 |
+
max-width: 0%;
|
| 192 |
+
transition:
|
| 193 |
+
background-color .3s var(--n-bezier),
|
| 194 |
+
max-width .2s var(--n-bezier);
|
| 195 |
+
`,[U(`processing`,[i(`&::after`,`
|
| 196 |
+
content: "";
|
| 197 |
+
background-image: var(--n-line-bg-processing);
|
| 198 |
+
animation: progress-processing-animation 2s var(--n-bezier) infinite;
|
| 199 |
+
`)])])])])])]),i(`@keyframes progress-processing-animation`,`
|
| 200 |
+
0% {
|
| 201 |
+
position: absolute;
|
| 202 |
+
left: 0;
|
| 203 |
+
top: 0;
|
| 204 |
+
bottom: 0;
|
| 205 |
+
right: 100%;
|
| 206 |
+
opacity: 1;
|
| 207 |
+
}
|
| 208 |
+
66% {
|
| 209 |
+
position: absolute;
|
| 210 |
+
left: 0;
|
| 211 |
+
top: 0;
|
| 212 |
+
bottom: 0;
|
| 213 |
+
right: 0;
|
| 214 |
+
opacity: 0;
|
| 215 |
+
}
|
| 216 |
+
100% {
|
| 217 |
+
position: absolute;
|
| 218 |
+
left: 0;
|
| 219 |
+
top: 0;
|
| 220 |
+
bottom: 0;
|
| 221 |
+
right: 0;
|
| 222 |
+
opacity: 0;
|
| 223 |
+
}
|
| 224 |
+
`)]),tn=m({name:`Progress`,props:Object.assign(Object.assign({},B.props),{processing:Boolean,type:{type:String,default:`line`},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:`default`},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:`%`},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:`outside`},indicatorPlacement:{type:String,default:`outside`},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),setup(e){let t=f(()=>e.indicatorPlacement||e.indicatorPosition),n=f(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type===`dashboard`)return 75}),{mergedClsPrefixRef:r,inlineThemeDisabled:i}=z(e),a=B(`Progress`,`-progress`,en,se,e,r),o=f(()=>{let{status:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontSize:r,fontSizeCircle:i,railColor:o,railHeight:s,iconSizeCircle:c,iconSizeLine:l,textColorCircle:u,textColorLineInner:d,textColorLineOuter:f,lineBgProcessing:p,fontWeightCircle:m,[le(`iconColor`,t)]:h,[le(`fillColor`,t)]:g}}=a.value;return{"--n-bezier":n,"--n-fill-color":g,"--n-font-size":r,"--n-font-size-circle":i,"--n-font-weight-circle":m,"--n-icon-color":h,"--n-icon-size-circle":c,"--n-icon-size-line":l,"--n-line-bg-processing":p,"--n-rail-color":o,"--n-rail-height":s,"--n-text-color-circle":u,"--n-text-color-line-inner":d,"--n-text-color-line-outer":f}}),s=i?fe(`progress`,f(()=>e.status[0]),o,e):void 0;return{mergedClsPrefix:r,mergedIndicatorPlacement:t,gapDeg:n,cssVars:i?void 0:o,themeClass:s?.themeClass,onRender:s?.onRender}},render(){let{type:e,cssVars:t,indicatorTextColor:n,showIndicator:r,status:i,railColor:a,railStyle:o,color:s,percentage:c,viewBoxWidth:l,strokeWidth:u,mergedIndicatorPlacement:d,unit:f,borderRadius:p,fillBorderRadius:m,height:h,processing:g,circleGap:_,mergedClsPrefix:v,gapDeg:y,gapOffsetDegree:b,themeClass:x,$slots:C,onRender:w}=this;return w?.(),S(`div`,{class:[x,`${v}-progress`,`${v}-progress--${e}`,`${v}-progress--${i}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,role:e===`circle`||e===`line`||e===`dashboard`?`progressbar`:`none`},e===`circle`||e===`dashboard`?S(Yt,{clsPrefix:v,status:i,showIndicator:r,indicatorTextColor:n,railColor:a,fillColor:s,railStyle:o,offsetDegree:this.offsetDegree,percentage:c,viewBoxWidth:l,strokeWidth:u,gapDegree:y===void 0?e===`dashboard`?75:0:y,gapOffsetDegree:b,unit:f},C):e===`line`?S(Zt,{clsPrefix:v,status:i,showIndicator:r,indicatorTextColor:n,railColor:a,fillColor:s,railStyle:o,percentage:c,processing:g,indicatorPlacement:d,unit:f,fillBorderRadius:m,railBorderRadius:p,height:h},C):e===`multiple-circle`?S($t,{clsPrefix:v,strokeWidth:u,railColor:a,fillColor:s,railStyle:o,viewBoxWidth:l,percentage:c,showIndicator:r,circleGap:_},C):null)}}),Q=C(`n-upload`),nn=i([I(`upload`,`width: 100%;`,[U(`dragger-inside`,[I(`upload-trigger`,`
|
| 225 |
+
display: block;
|
| 226 |
+
`)]),U(`drag-over`,[I(`upload-dragger`,`
|
| 227 |
+
border: var(--n-dragger-border-hover);
|
| 228 |
+
`)])]),I(`upload-dragger`,`
|
| 229 |
+
cursor: pointer;
|
| 230 |
+
box-sizing: border-box;
|
| 231 |
+
width: 100%;
|
| 232 |
+
text-align: center;
|
| 233 |
+
border-radius: var(--n-border-radius);
|
| 234 |
+
padding: 24px;
|
| 235 |
+
opacity: 1;
|
| 236 |
+
transition:
|
| 237 |
+
opacity .3s var(--n-bezier),
|
| 238 |
+
border-color .3s var(--n-bezier),
|
| 239 |
+
background-color .3s var(--n-bezier);
|
| 240 |
+
background-color: var(--n-dragger-color);
|
| 241 |
+
border: var(--n-dragger-border);
|
| 242 |
+
`,[i(`&:hover`,`
|
| 243 |
+
border: var(--n-dragger-border-hover);
|
| 244 |
+
`),U(`disabled`,`
|
| 245 |
+
cursor: not-allowed;
|
| 246 |
+
`)]),I(`upload-trigger`,`
|
| 247 |
+
display: inline-block;
|
| 248 |
+
box-sizing: border-box;
|
| 249 |
+
opacity: 1;
|
| 250 |
+
transition: opacity .3s var(--n-bezier);
|
| 251 |
+
`,[i(`+`,[I(`upload-file-list`,`margin-top: 8px;`)]),U(`disabled`,`
|
| 252 |
+
opacity: var(--n-item-disabled-opacity);
|
| 253 |
+
cursor: not-allowed;
|
| 254 |
+
`),U(`image-card`,`
|
| 255 |
+
width: 96px;
|
| 256 |
+
height: 96px;
|
| 257 |
+
`,[I(`base-icon`,`
|
| 258 |
+
font-size: 24px;
|
| 259 |
+
`),I(`upload-dragger`,`
|
| 260 |
+
padding: 0;
|
| 261 |
+
height: 100%;
|
| 262 |
+
width: 100%;
|
| 263 |
+
display: flex;
|
| 264 |
+
align-items: center;
|
| 265 |
+
justify-content: center;
|
| 266 |
+
`)])]),I(`upload-file-list`,`
|
| 267 |
+
line-height: var(--n-line-height);
|
| 268 |
+
opacity: 1;
|
| 269 |
+
transition: opacity .3s var(--n-bezier);
|
| 270 |
+
`,[i(`a, img`,`outline: none;`),U(`disabled`,`
|
| 271 |
+
opacity: var(--n-item-disabled-opacity);
|
| 272 |
+
cursor: not-allowed;
|
| 273 |
+
`,[I(`upload-file`,`cursor: not-allowed;`)]),U(`grid`,`
|
| 274 |
+
display: grid;
|
| 275 |
+
grid-template-columns: repeat(auto-fill, 96px);
|
| 276 |
+
grid-gap: 8px;
|
| 277 |
+
margin-top: 0;
|
| 278 |
+
`),I(`upload-file`,`
|
| 279 |
+
display: block;
|
| 280 |
+
box-sizing: border-box;
|
| 281 |
+
cursor: default;
|
| 282 |
+
padding: 0px 12px 0 6px;
|
| 283 |
+
transition: background-color .3s var(--n-bezier);
|
| 284 |
+
border-radius: var(--n-border-radius);
|
| 285 |
+
`,[p(),I(`progress`,[p({foldPadding:!0})]),i(`&:hover`,`
|
| 286 |
+
background-color: var(--n-item-color-hover);
|
| 287 |
+
`,[I(`upload-file-info`,[J(`action`,`
|
| 288 |
+
opacity: 1;
|
| 289 |
+
`)])]),U(`image-type`,`
|
| 290 |
+
border-radius: var(--n-border-radius);
|
| 291 |
+
text-decoration: underline;
|
| 292 |
+
text-decoration-color: #0000;
|
| 293 |
+
`,[I(`upload-file-info`,`
|
| 294 |
+
padding-top: 0px;
|
| 295 |
+
padding-bottom: 0px;
|
| 296 |
+
width: 100%;
|
| 297 |
+
height: 100%;
|
| 298 |
+
display: flex;
|
| 299 |
+
justify-content: space-between;
|
| 300 |
+
align-items: center;
|
| 301 |
+
padding: 6px 0;
|
| 302 |
+
`,[I(`progress`,`
|
| 303 |
+
padding: 2px 0;
|
| 304 |
+
margin-bottom: 0;
|
| 305 |
+
`),J(`name`,`
|
| 306 |
+
padding: 0 8px;
|
| 307 |
+
`),J(`thumbnail`,`
|
| 308 |
+
width: 32px;
|
| 309 |
+
height: 32px;
|
| 310 |
+
font-size: 28px;
|
| 311 |
+
display: flex;
|
| 312 |
+
justify-content: center;
|
| 313 |
+
align-items: center;
|
| 314 |
+
`,[i(`img`,`
|
| 315 |
+
width: 100%;
|
| 316 |
+
`)])])]),U(`text-type`,[I(`progress`,`
|
| 317 |
+
box-sizing: border-box;
|
| 318 |
+
padding-bottom: 6px;
|
| 319 |
+
margin-bottom: 6px;
|
| 320 |
+
`)]),U(`image-card-type`,`
|
| 321 |
+
position: relative;
|
| 322 |
+
width: 96px;
|
| 323 |
+
height: 96px;
|
| 324 |
+
border: var(--n-item-border-image-card);
|
| 325 |
+
border-radius: var(--n-border-radius);
|
| 326 |
+
padding: 0;
|
| 327 |
+
display: flex;
|
| 328 |
+
align-items: center;
|
| 329 |
+
justify-content: center;
|
| 330 |
+
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
|
| 331 |
+
border-radius: var(--n-border-radius);
|
| 332 |
+
overflow: hidden;
|
| 333 |
+
`,[I(`progress`,`
|
| 334 |
+
position: absolute;
|
| 335 |
+
left: 8px;
|
| 336 |
+
bottom: 8px;
|
| 337 |
+
right: 8px;
|
| 338 |
+
width: unset;
|
| 339 |
+
`),I(`upload-file-info`,`
|
| 340 |
+
padding: 0;
|
| 341 |
+
width: 100%;
|
| 342 |
+
height: 100%;
|
| 343 |
+
`,[J(`thumbnail`,`
|
| 344 |
+
width: 100%;
|
| 345 |
+
height: 100%;
|
| 346 |
+
display: flex;
|
| 347 |
+
flex-direction: column;
|
| 348 |
+
align-items: center;
|
| 349 |
+
justify-content: center;
|
| 350 |
+
font-size: 36px;
|
| 351 |
+
`,[i(`img`,`
|
| 352 |
+
width: 100%;
|
| 353 |
+
`)])]),i(`&::before`,`
|
| 354 |
+
position: absolute;
|
| 355 |
+
z-index: 1;
|
| 356 |
+
left: 0;
|
| 357 |
+
right: 0;
|
| 358 |
+
top: 0;
|
| 359 |
+
bottom: 0;
|
| 360 |
+
border-radius: inherit;
|
| 361 |
+
opacity: 0;
|
| 362 |
+
transition: opacity .2s var(--n-bezier);
|
| 363 |
+
content: "";
|
| 364 |
+
`),i(`&:hover`,[i(`&::before`,`opacity: 1;`),I(`upload-file-info`,[J(`thumbnail`,`opacity: .12;`)])])]),U(`error-status`,[i(`&:hover`,`
|
| 365 |
+
background-color: var(--n-item-color-hover-error);
|
| 366 |
+
`),I(`upload-file-info`,[J(`name`,`color: var(--n-item-text-color-error);`),J(`thumbnail`,`color: var(--n-item-text-color-error);`)]),U(`image-card-type`,`
|
| 367 |
+
border: var(--n-item-border-image-card-error);
|
| 368 |
+
`)]),U(`with-url`,`
|
| 369 |
+
cursor: pointer;
|
| 370 |
+
`,[I(`upload-file-info`,[J(`name`,`
|
| 371 |
+
color: var(--n-item-text-color-success);
|
| 372 |
+
text-decoration-color: var(--n-item-text-color-success);
|
| 373 |
+
`,[i(`a`,`
|
| 374 |
+
text-decoration: underline;
|
| 375 |
+
`)])])]),I(`upload-file-info`,`
|
| 376 |
+
position: relative;
|
| 377 |
+
padding-top: 6px;
|
| 378 |
+
padding-bottom: 6px;
|
| 379 |
+
display: flex;
|
| 380 |
+
flex-wrap: nowrap;
|
| 381 |
+
`,[J(`thumbnail`,`
|
| 382 |
+
font-size: 18px;
|
| 383 |
+
opacity: 1;
|
| 384 |
+
transition: opacity .2s var(--n-bezier);
|
| 385 |
+
color: var(--n-item-icon-color);
|
| 386 |
+
`,[I(`base-icon`,`
|
| 387 |
+
margin-right: 2px;
|
| 388 |
+
vertical-align: middle;
|
| 389 |
+
transition: color .3s var(--n-bezier);
|
| 390 |
+
`)]),J(`action`,`
|
| 391 |
+
padding-top: inherit;
|
| 392 |
+
padding-bottom: inherit;
|
| 393 |
+
position: absolute;
|
| 394 |
+
right: 0;
|
| 395 |
+
top: 0;
|
| 396 |
+
bottom: 0;
|
| 397 |
+
width: 80px;
|
| 398 |
+
display: flex;
|
| 399 |
+
align-items: center;
|
| 400 |
+
transition: opacity .2s var(--n-bezier);
|
| 401 |
+
justify-content: flex-end;
|
| 402 |
+
opacity: 0;
|
| 403 |
+
`,[I(`button`,[i(`&:not(:last-child)`,{marginRight:`4px`}),I(`base-icon`,[i(`svg`,[v()])])]),U(`image-type`,`
|
| 404 |
+
position: relative;
|
| 405 |
+
max-width: 80px;
|
| 406 |
+
width: auto;
|
| 407 |
+
`),U(`image-card-type`,`
|
| 408 |
+
z-index: 2;
|
| 409 |
+
position: absolute;
|
| 410 |
+
width: 100%;
|
| 411 |
+
height: 100%;
|
| 412 |
+
left: 0;
|
| 413 |
+
right: 0;
|
| 414 |
+
bottom: 0;
|
| 415 |
+
top: 0;
|
| 416 |
+
display: flex;
|
| 417 |
+
justify-content: center;
|
| 418 |
+
align-items: center;
|
| 419 |
+
`)]),J(`name`,`
|
| 420 |
+
color: var(--n-item-text-color);
|
| 421 |
+
flex: 1;
|
| 422 |
+
display: flex;
|
| 423 |
+
justify-content: center;
|
| 424 |
+
text-overflow: ellipsis;
|
| 425 |
+
overflow: hidden;
|
| 426 |
+
flex-direction: column;
|
| 427 |
+
text-decoration-color: #0000;
|
| 428 |
+
font-size: var(--n-font-size);
|
| 429 |
+
transition:
|
| 430 |
+
color .3s var(--n-bezier),
|
| 431 |
+
text-decoration-color .3s var(--n-bezier);
|
| 432 |
+
`,[i(`a`,`
|
| 433 |
+
color: inherit;
|
| 434 |
+
text-decoration: underline;
|
| 435 |
+
`)])])])]),I(`upload-file-input`,`
|
| 436 |
+
display: none;
|
| 437 |
+
width: 0;
|
| 438 |
+
height: 0;
|
| 439 |
+
opacity: 0;
|
| 440 |
+
`)]),rn=m({name:`UploadDragger`,__UPLOAD_DRAGGER__:!0,setup(e,{slots:t}){let n=T(Q,null);return n||N(`upload-dragger`,"`n-upload-dragger` must be placed inside `n-upload`."),()=>{let{mergedClsPrefixRef:{value:e},mergedDisabledRef:{value:r},maxReachedRef:{value:i}}=n;return S(`div`,{class:[`${e}-upload-dragger`,(r||i)&&`${e}-upload-dragger--disabled`]},t)}}});function an(){return S(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},S(`g`,{fill:`none`},S(`path`,{d:`M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z`,fill:`currentColor`})))}function on(){return S(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 28 28`},S(`g`,{fill:`none`},S(`path`,{d:`M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z`,fill:`currentColor`})))}var sn=m({name:`UploadProgress`,props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:T(Q).mergedThemeRef}},render(){return S(y,null,{default:()=>this.show?S(tn,{type:`line`,showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),cn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function ln(e){return e.includes(`image/`)}function un(e=``){let t=e.split(`/`),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[``])[0]}var dn=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,fn=e=>{if(e.type)return ln(e.type);let t=un(e.name||``);if(dn.test(t))return!0;let n=e.thumbnailUrl||e.url||``,r=un(n);return!!(/^data:image\//.test(n)||dn.test(r))};function pn(e){return cn(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!ln(e.type)){t(``);return}t(window.URL.createObjectURL(e))})})}var mn=o&&window.FileReader&&window.File;function hn(e){return e.isDirectory}function gn(e){return e.isFile}function _n(e,t){return cn(this,void 0,void 0,function*(){let n=[];function r(e){return cn(this,void 0,void 0,function*(){for(let i of e)if(i){if(t&&hn(i)){let e=i.createReader(),t=[],n;try{do n=yield new Promise((t,n)=>{e.readEntries(t,n)}),t=t.concat(n);while(n.length>0)}catch(e){oe(`upload`,`error happens when handling directory upload`,e)}yield r(t)}else if(gn(i))try{let e=yield new Promise((e,t)=>{i.file(e,t)});n.push({file:e,entry:i,source:`dnd`})}catch(e){oe(`upload`,`error happens when handling file upload`,e)}}})}return yield r(e),n})}function $(e){let{id:t,name:n,percentage:r,status:i,url:a,file:o,thumbnailUrl:s,type:c,fullPath:l,batchId:u}=e;return{id:t,name:n,percentage:r??null,status:i,url:a??null,file:o??null,thumbnailUrl:s??null,type:c??null,fullPath:l??null,batchId:u??null}}function vn(e,t,n){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase(),n.split(`,`).map(e=>e.trim()).filter(Boolean).some(n=>{if(n.startsWith(`.`)){if(e.endsWith(n))return!0}else if(n.includes(`/`)){let[e,r]=t.split(`/`),[i,a]=n.split(`/`);if((i===`*`||e&&i&&i===e)&&(a===`*`||r&&a&&a===r))return!0}else return!0;return!1})}var yn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},bn={paddingMedium:`0 3px`,heightMedium:`24px`,iconSizeMedium:`18px`},xn=m({name:`UploadFile`,props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(e){let t=T(Q),n=H(null),r=H(``),i=f(()=>{let{file:t}=e;return t.status===`finished`?`success`:t.status===`error`?`error`:`info`}),a=f(()=>{let{file:t}=e;if(t.status===`error`)return`error`}),o=f(()=>{let{file:t}=e;return t.status===`uploading`}),s=f(()=>{if(!t.showCancelButtonRef.value)return!1;let{file:n}=e;return[`uploading`,`pending`,`error`].includes(n.status)}),l=f(()=>{if(!t.showRemoveButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),u=f(()=>{if(!t.showDownloadButtonRef.value)return!1;let{file:n}=e;return[`finished`].includes(n.status)}),d=f(()=>{if(!t.showRetryButtonRef.value)return!1;let{file:n}=e;return[`error`].includes(n.status)}),p=c(()=>r.value||e.file.thumbnailUrl||e.file.url),m=f(()=>{if(!t.showPreviewButtonRef.value)return!1;let{file:{status:n},listType:r}=e;return[`finished`].includes(n)&&p.value&&r===`image-card`});function h(){return yn(this,void 0,void 0,function*(){let n=t.onRetryRef.value;n&&(yield n({file:e.file}))===!1||t.submit({fileId:e.file.id})})}function g(t){t.preventDefault();let{file:n}=e;[`finished`,`pending`,`error`].includes(n.status)?v(n):[`uploading`].includes(n.status)?b(n):ve(`upload`,`The button clicked type is unknown.`)}function _(t){t.preventDefault(),y(e.file)}function v(n){let{xhrMap:r,doChange:i,onRemoveRef:{value:a},mergedFileListRef:{value:o}}=t;Promise.resolve(a?a({file:Object.assign({},n),fileList:o,index:e.index}):!0).then(e=>{if(e===!1)return;let t=Object.assign({},n,{status:`removed`});r.delete(n.id),i(t,void 0,{remove:!0})})}function y(e){let{onDownloadRef:{value:n},customDownloadRef:{value:r}}=t;Promise.resolve(n?n(Object.assign({},e)):!0).then(t=>{t!==!1&&(r?r(Object.assign({},e)):xe(e.url,e.name))})}function b(e){let{xhrMap:n}=t;n.get(e.id)?.abort(),v(Object.assign({},e))}function x(r){let{onPreviewRef:{value:i}}=t;if(i)i(e.file,{event:r});else if(e.listType===`image-card`){let{value:e}=n;if(!e)return;e.showPreview()}}let S=()=>yn(this,void 0,void 0,function*(){let{listType:n}=e;n!==`image`&&n!==`image-card`||t.shouldUseThumbnailUrlRef.value(e.file)&&(r.value=yield t.getFileThumbnailUrlResolver(e.file))});return M(()=>{S()}),{mergedTheme:t.mergedThemeRef,progressStatus:i,buttonType:a,showProgress:o,disabled:t.mergedDisabledRef,showCancelButton:s,showRemoveButton:l,showDownloadButton:u,showRetryButton:d,showPreviewButton:m,mergedThumbnailUrl:p,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:n,handleRemoveOrCancelClick:g,handleDownloadClick:_,handleRetryClick:h,handlePreviewClick:x}},render(){let{clsPrefix:e,mergedTheme:t,listType:n,file:r,renderIcon:i}=this,a,o=n===`image`;a=o||n===`image-card`?!this.shouldUseThumbnailUrl(r)||!this.mergedThumbnailUrl?S(`span`,{class:`${e}-upload-file-info__thumbnail`},i?i(r):fn(r)?S(W,{clsPrefix:e},{default:an}):S(W,{clsPrefix:e},{default:on})):S(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},n===`image-card`?S(qt,{src:this.mergedThumbnailUrl||void 0,previewSrc:r.url||void 0,alt:r.name,ref:`imageRef`}):S(`img`,{src:this.mergedThumbnailUrl||void 0,alt:r.name})):S(`span`,{class:`${e}-upload-file-info__thumbnail`},i?i(r):S(W,{clsPrefix:e},{default:()=>S(_t,null)}));let s=S(sn,{show:this.showProgress,percentage:r.percentage||0,status:this.progressStatus}),c=n===`text`||n===`image`;return S(`div`,{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,r.url&&r.status!==`error`&&n!==`image-card`&&`${e}-upload-file--with-url`,`${e}-upload-file--${n}-type`]},S(`div`,{class:`${e}-upload-file-info`},a,S(`div`,{class:`${e}-upload-file-info__name`},c&&(r.url&&r.status!==`error`?S(`a`,{rel:`noopener noreferer`,target:`_blank`,href:r.url||void 0,onClick:this.handlePreviewClick},r.name):S(`span`,{onClick:this.handlePreviewClick},r.name)),o&&s),S(`div`,{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${n}-type`]},this.showPreviewButton?S(V,{key:`preview`,quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:bn},{icon:()=>S(W,{clsPrefix:e},{default:()=>S(w,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&S(V,{key:`cancelOrTrash`,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:bn,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>S(_e,null,{default:()=>this.showRemoveButton?S(W,{clsPrefix:e,key:`trash`},{default:()=>S(wt,null)}):S(W,{clsPrefix:e,key:`cancel`},{default:()=>S(vt,null)})})}),this.showRetryButton&&!this.disabled&&S(V,{key:`retry`,quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:bn},{icon:()=>S(W,{clsPrefix:e},{default:()=>S(xt,null)})}),this.showDownloadButton?S(V,{key:`download`,quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:bn},{icon:()=>S(W,{clsPrefix:e},{default:()=>S(yt,null)})}):null)),!o&&s)}}),Sn=m({name:`UploadTrigger`,props:{abstract:Boolean},slots:Object,setup(e,{slots:n}){let r=T(Q,null);r||N(`upload-trigger`,"`n-upload-trigger` must be placed inside `n-upload`.");let{mergedClsPrefixRef:i,mergedDisabledRef:a,maxReachedRef:o,listTypeRef:s,dragOverRef:c,openOpenFileDialog:l,draggerInsideRef:u,handleFileAddition:d,mergedDirectoryDndRef:p,triggerClassRef:m,triggerStyleRef:h}=r,g=f(()=>s.value===`image-card`);function _(){a.value||o.value||l()}function v(e){e.preventDefault(),c.value=!0}function y(e){e.preventDefault(),c.value=!0}function b(e){e.preventDefault(),c.value=!1}function x(e){if(e.preventDefault(),!u.value||a.value||o.value){c.value=!1;return}let t=e.dataTransfer?.items;t?.length?_n(Array.from(t).map(e=>e.webkitGetAsEntry()),p.value).then(e=>{d(e)}).finally(()=>{c.value=!1}):c.value=!1}return()=>{let{value:r}=i;return e.abstract?n.default?.call(n,{handleClick:_,handleDrop:x,handleDragOver:v,handleDragEnter:y,handleDragLeave:b}):S(`div`,{class:[`${r}-upload-trigger`,(a.value||o.value)&&`${r}-upload-trigger--disabled`,g.value&&`${r}-upload-trigger--image-card`,m.value],style:h.value,onClick:_,onDrop:x,onDragover:v,onDragenter:y,onDragleave:b},g.value?S(rn,null,{default:()=>G(n.default,()=>[S(W,{clsPrefix:r},{default:()=>S(t,null)})])}):n)}}}),Cn=m({name:`UploadFileList`,setup(e,{slots:t}){let n=T(Q,null);n||N(`upload-file-list`,"`n-upload-file-list` must be placed inside `n-upload`.");let{abstractRef:r,mergedClsPrefixRef:i,listTypeRef:a,mergedFileListRef:o,fileListClassRef:s,fileListStyleRef:c,cssVarsRef:l,themeClassRef:u,maxReachedRef:d,showTriggerRef:p,imageGroupPropsRef:m}=n,h=f(()=>a.value===`image-card`),g=()=>o.value.map((e,t)=>S(xn,{clsPrefix:i.value,key:e.id,file:e,index:t,listType:a.value})),_=()=>h.value?S(Wt,Object.assign({},m.value),{default:g}):S(y,{group:!0},{default:g});return()=>{let{value:e}=i,{value:n}=r;return S(`div`,{class:[`${e}-upload-file-list`,h.value&&`${e}-upload-file-list--grid`,n?u?.value:void 0,s.value],style:[n&&l?l.value:``,c.value]},_(),p.value&&!d.value&&h.value&&S(Sn,null,t))}}}),wn=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function Tn(e,t,n){let{doChange:r,xhrMap:i}=e,a=0;function o(n){let o=Object.assign({},t,{status:`error`,percentage:a});i.delete(t.id),o=$(e.onError?.call(e,{file:o,event:n})||o),r(o,n)}function s(s){if(e.isErrorState){if(e.isErrorState(n)){o(s);return}}else if(n.status<200||n.status>=300){o(s);return}let c=Object.assign({},t,{status:`finished`,percentage:a});i.delete(t.id),c=$(e.onFinish?.call(e,{file:c,event:s})||c),r(c,s)}return{handleXHRLoad:s,handleXHRError:o,handleXHRAbort(e){let n=Object.assign({},t,{status:`removed`,file:null,percentage:a});i.delete(t.id),r(n,e)},handleXHRProgress(e){let n=Object.assign({},t,{status:`uploading`});if(e.lengthComputable){let t=Math.ceil(e.loaded/e.total*100);n.percentage=t,a=t}r(n,e)}}}function En(e){let{inst:t,file:n,data:r,headers:i,withCredentials:a,action:o,customRequest:s}=e,{doChange:c}=e.inst,l=0;s({file:n,data:r,headers:i,withCredentials:a,action:o,onProgress(e){let t=Object.assign({},n,{status:`uploading`}),r=e.percent;t.percentage=r,l=r,c(t)},onFinish(){let e=Object.assign({},n,{status:`finished`,percentage:l});e=$(t.onFinish?.call(t,{file:e})||e),c(e)},onError(){let e=Object.assign({},n,{status:`error`,percentage:l});e=$(t.onError?.call(t,{file:e})||e),c(e)}})}function Dn(e,t,n){let r=Tn(e,t,n);n.onabort=r.handleXHRAbort,n.onerror=r.handleXHRError,n.onload=r.handleXHRLoad,n.upload&&(n.upload.onprogress=r.handleXHRProgress)}function On(e,t){return typeof e==`function`?e({file:t}):e||{}}function kn(e,t,n){let r=On(t,n);r&&Object.keys(r).forEach(t=>{e.setRequestHeader(t,r[t])})}function An(e,t,n){let r=On(t,n);r&&Object.keys(r).forEach(t=>{e.append(t,r[t])})}function jn(e,t,n,{method:r,action:i,withCredentials:a,responseType:o,headers:s,data:c}){let l=new XMLHttpRequest;l.responseType=o,e.xhrMap.set(n.id,l),l.withCredentials=a;let u=new FormData;if(An(u,c,n),n.file!==null&&u.append(t,n.file),Dn(e,n,l),i!==void 0){l.open(r.toUpperCase(),i),kn(l,s,n),l.send(u);let t=Object.assign({},n,{status:`uploading`});e.doChange(t)}}var Mn=m({name:`Upload`,props:Object.assign(Object.assign({},B.props),{name:{type:String,default:`file`},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:`POST`},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:``},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onRetry:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,customDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:`text`},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>mn?fn(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),setup(e){e.abstract&&e.listType===`image-card`&&N(`upload`,`when the list-type is image-card, abstract is not supported.`);let{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=z(e),i=B(`Upload`,`-upload`,nn,F,e,t),a=de(`Upload`,r,t),o=ue(e),s=H(e.defaultFileList),c=K(e,`fileList`),u=H(null),d={value:!1},p=H(!1),m=new Map,h=x(c,s),g=f(()=>h.value.map($)),_=f(()=>{let{max:t}=e;return t===void 0?!1:g.value.length>=t});function v(){var e;(e=u.value)==null||e.click()}function y(e){let t=e.target;ee(t.files?Array.from(t.files).map(e=>({file:e,entry:null,source:`input`})):null,e),t.value=``}function S(t){let{"onUpdate:fileList":n,onUpdateFileList:r}=e;n&&R(n,t),r&&R(r,t),s.value=t}let C=f(()=>e.multiple||e.directory),w=(t,n,r={append:!1,remove:!1})=>{let{append:i,remove:a}=r,o=Array.from(g.value),s=o.findIndex(e=>e.id===t.id);if(i||a||~s){i?o.push(t):a?o.splice(s,1):o.splice(s,1,t);let{onChange:r}=e;r&&r({file:t,fileList:o,event:n}),S(o)}};function ee(t,n){if(!t||t.length===0)return;let{onBeforeUpload:r}=e;t=C.value?t:[t[0]];let{max:i,accept:a}=e;t=t.filter(({file:e,source:t})=>t===`dnd`&&a?.trim()?vn(e.name,e.type,a):!0),i&&(t=t.slice(0,i-g.value.length));let o=A();Promise.all(t.map(e=>wn(this,[e],void 0,function*({file:e,entry:t}){let n={id:A(),batchId:o,name:e.name,status:`pending`,percentage:0,file:e,url:null,type:e.type,thumbnailUrl:null,fullPath:t?.fullPath??`/${e.webkitRelativePath||e.name}`};return!r||(yield r({file:n,fileList:g.value}))!==!1?n:null}))).then(e=>wn(this,void 0,void 0,function*(){let t=Promise.resolve();e.forEach(e=>{t=t.then(l).then(()=>{e&&w(e,n,{append:!0})})}),yield t})).then(()=>{e.defaultUpload&&T()})}function T({fileId:t,retry:n=!1}={}){let{method:r,action:i,withCredentials:a,headers:o,data:s,name:c}=e,l=t===void 0?g.value:g.value.filter(e=>e.id===t),u=n||t!==void 0;l.forEach(t=>{let{status:n}=t;(n===`pending`||n===`error`&&u)&&(e.customRequest?En({inst:{doChange:w,xhrMap:m,onFinish:e.onFinish,onError:e.onError},file:t,action:i,withCredentials:a,headers:o,data:s,customRequest:e.customRequest}):jn({doChange:w,xhrMap:m,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},c,t,{method:r,action:i,withCredentials:a,responseType:e.responseType,headers:o,data:s}))})}function E(t){if(t.thumbnailUrl)return t.thumbnailUrl;let{createThumbnailUrl:n}=e;return n?n(t.file,t)??(t.url||``):t.url?t.url:t.file?pn(t.file):``}let D=f(()=>{let{common:{cubicBezierEaseInOut:e},self:{draggerColor:t,draggerBorder:n,draggerBorderHover:r,itemColorHover:a,itemColorHoverError:o,itemTextColorError:s,itemTextColorSuccess:c,itemTextColor:l,itemIconColor:u,itemDisabledOpacity:d,lineHeight:f,borderRadius:p,fontSize:m,itemBorderImageCardError:h,itemBorderImageCard:g}}=i.value;return{"--n-bezier":e,"--n-border-radius":p,"--n-dragger-border":n,"--n-dragger-border-hover":r,"--n-dragger-color":t,"--n-font-size":m,"--n-item-color-hover":a,"--n-item-color-hover-error":o,"--n-item-disabled-opacity":d,"--n-item-icon-color":u,"--n-item-text-color":l,"--n-item-text-color-error":s,"--n-item-text-color-success":c,"--n-line-height":f,"--n-item-border-image-card-error":h,"--n-item-border-image-card":g}}),O=n?fe(`upload`,void 0,D,e):void 0;b(Q,{mergedClsPrefixRef:t,mergedThemeRef:i,showCancelButtonRef:K(e,`showCancelButton`),showDownloadButtonRef:K(e,`showDownloadButton`),showRemoveButtonRef:K(e,`showRemoveButton`),showRetryButtonRef:K(e,`showRetryButton`),onRemoveRef:K(e,`onRemove`),onDownloadRef:K(e,`onDownload`),customDownloadRef:K(e,`customDownload`),mergedFileListRef:g,triggerClassRef:K(e,`triggerClass`),triggerStyleRef:K(e,`triggerStyle`),shouldUseThumbnailUrlRef:K(e,`shouldUseThumbnailUrl`),renderIconRef:K(e,`renderIcon`),xhrMap:m,submit:T,doChange:w,showPreviewButtonRef:K(e,`showPreviewButton`),onPreviewRef:K(e,`onPreview`),getFileThumbnailUrlResolver:E,listTypeRef:K(e,`listType`),dragOverRef:p,openOpenFileDialog:v,draggerInsideRef:d,handleFileAddition:ee,mergedDisabledRef:o.mergedDisabledRef,maxReachedRef:_,fileListClassRef:K(e,`fileListClass`),fileListStyleRef:K(e,`fileListStyle`),abstractRef:K(e,`abstract`),acceptRef:K(e,`accept`),cssVarsRef:n?void 0:D,themeClassRef:O?.themeClass,onRender:O?.onRender,showTriggerRef:K(e,`showTrigger`),imageGroupPropsRef:K(e,`imageGroupProps`),mergedDirectoryDndRef:f(()=>e.directoryDnd??e.directory),onRetryRef:K(e,`onRetry`)});let k={clear:()=>{s.value=[]},submit:T,openOpenFileDialog:v};return Object.assign({mergedClsPrefix:t,draggerInsideRef:d,rtlEnabled:a,inputElRef:u,mergedTheme:i,dragOver:p,mergedMultiple:C,cssVars:n?void 0:D,themeClass:O?.themeClass,onRender:O?.onRender,handleFileInputChange:y},k)},render(){let{draggerInsideRef:e,mergedClsPrefix:t,$slots:n,directory:r,onRender:i}=this;n.default&&!this.abstract&&n.default()[0]?.type?.__UPLOAD_DRAGGER__&&(e.value=!0);let a=S(`input`,Object.assign({},this.inputProps,{ref:`inputElRef`,type:`file`,class:`${t}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:r||void 0,directory:r||void 0}));return this.abstract?S(Y,null,n.default?.call(n),S(E,{to:`body`},a)):(i?.(),S(`div`,{class:[`${t}-upload`,this.rtlEnabled&&`${t}-upload--rtl`,e.value&&`${t}-upload--dragger-inside`,this.dragOver&&`${t}-upload--drag-over`,this.themeClass],style:this.cssVars},a,this.showTrigger&&this.listType!==`image-card`&&S(Sn,null,n),this.showFileList&&S(Cn,null,n)))}});export{Mn as t};
|
webui/assets/UsageView-AFixvCPJ.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ar as e,Dr as t,Fr as n,Gr as r,Nr as i,Or as a,Pr as o,Qr as s,Ur as c,a as l,ai as u,c as d,ci as f,gr as ee,jr as p,k as m,lr as h,ni as g,qr as _,si as v,wr as y}from"./index-Cl8-DFW_.js";var b=ee(`usage`,()=>{let e=g([]),n=g(!1);async function r(){n.value=!0;try{e.value=await l()}catch(e){console.error(`Failed to load sessions for usage:`,e)}finally{n.value=!1}}let i=t(()=>e.value.reduce((e,t)=>e+(t.input_tokens||0),0)),a=t(()=>e.value.reduce((e,t)=>e+(t.output_tokens||0),0)),o=t(()=>i.value+a.value),s=t(()=>e.value.length),c=t(()=>e.value.reduce((e,t)=>e+(t.cache_read_tokens||0),0));return{sessions:e,isLoading:n,loadSessions:r,totalInputTokens:i,totalOutputTokens:a,totalTokens:o,totalSessions:s,totalCacheTokens:c,cacheHitRate:t(()=>{let e=i.value;return e===0?null:c.value/e*100}),estimatedCost:t(()=>e.value.reduce((e,t)=>e+(t.actual_cost_usd??t.estimated_cost_usd??0),0)),modelUsage:t(()=>{let t=new Map;for(let n of e.value){let e=n.model||`unknown`;t.has(e)||t.set(e,{model:e,inputTokens:0,outputTokens:0,cacheTokens:0,totalTokens:0,sessions:0});let r=t.get(e);r.inputTokens+=n.input_tokens||0,r.outputTokens+=n.output_tokens||0,r.cacheTokens+=n.cache_read_tokens||0,r.totalTokens+=(n.input_tokens||0)+(n.output_tokens||0),r.sessions+=1}return[...t.values()].sort((e,t)=>t.totalTokens-e.totalTokens)}),dailyUsage:t(()=>{let t=new Map,n=new Date;for(let e=29;e>=0;e--){let r=new Date(n);r.setDate(r.getDate()-e);let i=r.toISOString().slice(0,10);t.set(i,{date:i,tokens:0,cache:0,sessions:0,cost:0})}for(let n of e.value){let e=new Date(n.started_at*1e3).toISOString().slice(0,10),r=t.get(e);if(r){r.tokens+=(n.input_tokens||0)+(n.output_tokens||0),r.cache+=n.cache_read_tokens||0,r.sessions+=1;let e=n.actual_cost_usd??n.estimated_cost_usd??0;r.cost+=e}}return[...t.values()]}),avgSessionsPerDay:t(()=>{let t=e.value.length>0?new Date(e.value[e.value.length-1].started_at*1e3):new Date,n=Math.max(1,Math.ceil((Date.now()-t.getTime())/(1e3*60*60*24)));return s.value/n})}}),x={class:`stat-cards`},S={class:`stat-card`},C={class:`stat-label`},w={class:`stat-value`},T={class:`stat-sub`},E={class:`stat-card`},D={class:`stat-label`},O={class:`stat-value`},k={class:`stat-sub`},A={class:`stat-card`},j={class:`stat-label`},M={class:`stat-value`},N={class:`stat-card`},P={class:`stat-label`},F={class:`stat-value`},I={key:0,class:`stat-sub`},L=d(n({__name:`StatCards`,setup(t){let{t:n}=h(),i=b();function o(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function s(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}return(t,c)=>(r(),p(`div`,x,[a(`div`,S,[a(`div`,C,f(u(n)(`usage.totalTokens`)),1),a(`div`,w,f(o(u(i).totalTokens)),1),a(`div`,T,f(o(u(i).totalInputTokens))+` `+f(u(n)(`usage.inputTokens`))+` / `+f(o(u(i).totalOutputTokens))+` `+f(u(n)(`usage.outputTokens`)),1)]),a(`div`,E,[a(`div`,D,f(u(n)(`usage.totalSessions`)),1),a(`div`,O,f(u(i).totalSessions),1),a(`div`,k,f(u(n)(`usage.avgPerDay`,{n:u(i).avgSessionsPerDay.toFixed(1)})),1)]),a(`div`,A,[a(`div`,j,f(u(n)(`usage.estimatedCost`)),1),a(`div`,M,f(s(u(i).estimatedCost)),1)]),a(`div`,N,[a(`div`,P,f(u(n)(`usage.cacheHitRate`)),1),a(`div`,F,f(u(i).cacheHitRate===null?`--`:u(i).cacheHitRate.toFixed(1)+`%`),1),u(i).cacheHitRate===null?e(``,!0):(r(),p(`div`,I,f(o(u(i).totalCacheTokens))+` `+f(u(n)(`usage.tokens`)),1))])]))}}),[[`__scopeId`,`data-v-3a594781`]]),R={class:`model-breakdown`},te={class:`section-title`},z={class:`model-list`},B={class:`model-name`},V={class:`model-bar-wrap`},H={class:`model-tokens`},U=d(n({__name:`ModelBreakdown`,setup(e){let{t}=h(),n=b();function i(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}return(e,o)=>(r(),p(`div`,R,[a(`h3`,te,f(u(t)(`usage.modelBreakdown`)),1),a(`div`,z,[(r(!0),p(y,null,_(u(n).modelUsage,e=>(r(),p(`div`,{key:e.model,class:`model-row`},[a(`span`,B,f(e.model),1),a(`div`,V,[a(`div`,{class:`model-bar`,style:v({width:e.totalTokens/u(n).modelUsage[0].totalTokens*100+`%`})},null,4)]),a(`span`,H,f(i(e.totalTokens)),1)]))),128))])]))}}),[[`__scopeId`,`data-v-d364aa35`]]),W={class:`daily-trend`},G={class:`section-title`},K={class:`bar-chart`},q={class:`bar-track`},J={class:`bar-tooltip`},Y={class:`tooltip-date`},X={class:`tooltip-row`},Z={class:`tooltip-row`},Q={class:`tooltip-row`},ne={class:`tooltip-row`},re={class:`bar-dates`},ie={class:`trend-table`},ae=d(n({__name:`DailyTrend`,setup(e){let{t:n}=h(),i=b();function o(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function s(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}let c=t(()=>Math.max(...i.dailyUsage.map(e=>e.tokens),1));return(e,t)=>(r(),p(`div`,W,[a(`h3`,G,f(u(n)(`usage.dailyTrend`)),1),a(`div`,K,[(r(!0),p(y,null,_(u(i).dailyUsage,e=>(r(),p(`div`,{key:e.date,class:`bar-col`},[a(`div`,q,[a(`div`,{class:`bar-fill`,style:v({height:e.tokens/c.value*100+`%`})},null,4)]),a(`div`,J,[a(`div`,Y,f(e.date),1),a(`div`,X,f(u(n)(`usage.tokens`))+`: `+f(o(e.tokens)),1),a(`div`,Z,f(u(n)(`usage.cache`))+`: `+f(o(e.cache)),1),a(`div`,Q,f(u(n)(`usage.sessions`))+`: `+f(e.sessions),1),a(`div`,ne,f(u(n)(`usage.cost`))+`: `+f(s(e.cost)),1)])]))),128))]),a(`div`,re,[a(`span`,null,f(u(i).dailyUsage[0]?.date.slice(5)),1),a(`span`,null,f(u(i).dailyUsage[u(i).dailyUsage.length-1]?.date.slice(5)),1)]),a(`div`,ie,[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,f(u(n)(`usage.date`)),1),a(`th`,null,f(u(n)(`usage.tokens`)),1),a(`th`,null,f(u(n)(`usage.cache`)),1),a(`th`,null,f(u(n)(`usage.sessions`)),1),a(`th`,null,f(u(n)(`usage.cost`)),1)])]),a(`tbody`,null,[(r(!0),p(y,null,_([...u(i).dailyUsage].reverse().slice(0,30),e=>(r(),p(`tr`,{key:e.date},[a(`td`,null,f(e.date),1),a(`td`,null,f(o(e.tokens)),1),a(`td`,null,f(o(e.cache)),1),a(`td`,null,f(e.sessions),1),a(`td`,null,f(s(e.cost)),1)]))),128))])])])]))}}),[[`__scopeId`,`data-v-2caa0ddc`]]),oe={class:`usage-view`},$={class:`page-header`},se={class:`header-title`},ce={class:`usage-content`},le={key:0,class:`usage-loading`},ue={key:2,class:`usage-empty`},de=d(n({__name:`UsageView`,setup(e){let{t}=h(),n=b();return c(()=>{n.loadSessions()}),(e,c)=>(r(),p(`div`,oe,[a(`header`,$,[a(`h2`,se,f(u(t)(`usage.title`)),1),o(u(m),{size:`small`,quaternary:``,loading:u(n).isLoading,onClick:c[0]||=e=>u(n).loadSessions()},{default:s(()=>[i(f(u(t)(`usage.refresh`)),1)]),_:1},8,[`loading`])]),a(`div`,ce,[u(n).isLoading&&u(n).sessions.length===0?(r(),p(`div`,le,f(u(t)(`common.loading`)),1)):u(n).sessions.length>0?(r(),p(y,{key:1},[o(L),o(U),o(ae)],64)):(r(),p(`div`,ue,f(u(t)(`usage.noData`)),1))])]))}}),[[`__scopeId`,`data-v-c0e83cbe`]]);export{de as default};
|
webui/assets/UsageView-DZQCtRuu.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[data-v-3a594781]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-3a594781]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.stat-cards[data-v-3a594781]{grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px;display:grid}.stat-card[data-v-3a594781]{background:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;padding:16px}.stat-label[data-v-3a594781]{color:var(--text-muted);margin-bottom:6px;font-size:12px}.stat-value[data-v-3a594781]{color:var(--text-primary);font-size:22px;font-weight:600;line-height:1.2}.stat-sub[data-v-3a594781]{color:var(--text-muted);margin-top:4px;font-size:11px}@media (width<=768px){.stat-cards[data-v-3a594781]{grid-template-columns:repeat(2,1fr)}}@media (width<=480px){.stat-cards[data-v-3a594781]{grid-template-columns:1fr}}[data-v-d364aa35]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-d364aa35]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.model-breakdown[data-v-d364aa35]{background:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;margin-bottom:20px;padding:16px}.section-title[data-v-d364aa35]{color:var(--text-secondary);margin:0 0 12px;font-size:13px;font-weight:600}.model-list[data-v-d364aa35]{flex-direction:column;gap:8px;display:flex}.model-row[data-v-d364aa35]{align-items:center;gap:10px;display:flex}.model-name[data-v-d364aa35]{color:var(--text-secondary);text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;width:140px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:12px;overflow:hidden}.model-bar-wrap[data-v-d364aa35]{background:var(--bg-secondary);border-radius:3px;flex:1;height:16px;overflow:hidden}.model-bar[data-v-d364aa35]{background:var(--text-primary);border-radius:3px;min-width:2px;height:100%;transition:width .3s}.dark .model-bar[data-v-d364aa35]{background:#66bb6a}.model-tokens[data-v-d364aa35]{color:var(--text-muted);text-align:right;flex-shrink:0;width:60px;font-size:12px}[data-v-2caa0ddc]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-2caa0ddc]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.daily-trend[data-v-2caa0ddc]{background:var(--bg-card);border:1px solid var(--border-color);border-radius:10px;padding:16px}.section-title[data-v-2caa0ddc]{color:var(--text-secondary);margin:0 0 12px;font-size:13px;font-weight:600}.bar-chart[data-v-2caa0ddc]{gap:2px;margin-bottom:16px;display:flex}.bar-col[data-v-2caa0ddc]{flex-direction:column;flex:1;align-items:center;min-width:0;display:flex}.bar-track[data-v-2caa0ddc]{background:var(--bg-secondary);border-radius:2px 2px 0 0;align-items:flex-end;width:100%;height:140px;display:flex}.bar-fill[data-v-2caa0ddc]{background:var(--text-primary);border-radius:2px 2px 0 0;width:100%;min-height:0;transition:height .3s}.dark .bar-fill[data-v-2caa0ddc]{background:#66bb6a}.bar-col[data-v-2caa0ddc]{position:relative}.bar-tooltip[data-v-2caa0ddc]{background:var(--text-primary);color:var(--text-on-accent);white-space:nowrap;z-index:10;pointer-events:none;border-radius:6px;padding:6px 10px;font-size:11px;display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%)}.bar-tooltip[data-v-2caa0ddc]:after{content:"";border:5px solid #0000;border-top-color:var(--text-primary);position:absolute;top:100%;left:50%;transform:translate(-50%)}.bar-col:hover .bar-tooltip[data-v-2caa0ddc]{display:block}.tooltip-date[data-v-2caa0ddc]{margin-bottom:2px;font-weight:600}.tooltip-row[data-v-2caa0ddc]{opacity:.85;font-size:10px;line-height:1.5}.bar-label[data-v-2caa0ddc]{display:none}.bar-dates[data-v-2caa0ddc]{color:var(--text-muted);justify-content:space-between;margin-top:4px;margin-bottom:16px;font-size:10px;display:flex}.trend-table[data-v-2caa0ddc]{overflow-x:auto}table[data-v-2caa0ddc]{border-collapse:collapse;width:100%;font-size:12px}thead[data-v-2caa0ddc]{position:sticky;top:0}th[data-v-2caa0ddc]{text-align:left;color:var(--text-muted);border-bottom:1px solid var(--border-color);background:var(--bg-card);text-transform:uppercase;letter-spacing:.3px;padding:8px 10px;font-size:11px;font-weight:600}td[data-v-2caa0ddc]{color:var(--text-secondary);border-bottom:1px solid var(--border-light);padding:6px 10px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:11px}tr:last-child td[data-v-2caa0ddc]{border-bottom:none}[data-v-c0e83cbe]:root{--bg-primary:#fafafa;--bg-secondary:#f0f0f0;--bg-sidebar:#f5f5f5;--bg-card:#fff;--bg-card-hover:#fafafa;--bg-input:#fff;--border-color:#e0e0e0;--border-light:#ebebeb;--accent-primary:#0d9488;--accent-hover:#0f766e;--accent-muted:#5eead4;--accent-subtle:#0d948814;--text-primary:#1a1a1a;--text-secondary:#555;--text-muted:#999;--success:#16a34a;--error:#dc2626;--warning:#d97706;--msg-user-bg:#f0fdfa;--msg-assistant-bg:#fff;--msg-system-border:#bdbdbd;--code-bg:#f4f4f4;--text-on-accent:#fff;--text-on-overlay:#fff;--accent-info:#0284c7;--accent-primary-rgb:13, 148, 136;--accent-hover-rgb:15, 118, 110;--text-primary-rgb:26, 26, 26;--text-muted-rgb:153, 153, 153;--success-rgb:22, 163, 74;--error-rgb:220, 38, 38;--warning-rgb:217, 119, 6;--accent-info-rgb:2, 132, 199}.dark[data-v-c0e83cbe]{--bg-primary:#141414;--bg-secondary:#1e1e1e;--bg-sidebar:#191919;--bg-card:#262626;--bg-card-hover:#2a2a2a;--bg-input:#222;--border-color:#333;--border-light:#2a2a2a;--accent-primary:#2dd4bf;--accent-hover:#5eead4;--accent-muted:#99f6e4;--accent-subtle:#2dd4bf1a;--text-primary:#f0f0f0;--text-secondary:#b8b8b8;--text-muted:#777;--success:#4ade80;--error:#f87171;--warning:#fbbf24;--msg-user-bg:#1a2e2b;--msg-assistant-bg:#1e1e1e;--msg-system-border:#444;--code-bg:#1a1a1a;--text-on-accent:#0f172a;--text-on-overlay:#fff;--accent-info:#38bdf8;--accent-primary-rgb:45, 212, 191;--accent-hover-rgb:94, 234, 212;--text-primary-rgb:240, 240, 240;--text-muted-rgb:119, 119, 119;--success-rgb:74, 222, 128;--error-rgb:248, 113, 113;--warning-rgb:251, 191, 36;--accent-info-rgb:56, 189, 248}.usage-view[data-v-c0e83cbe]{flex-direction:column;height:100%;display:flex}.usage-content[data-v-c0e83cbe]{scrollbar-width:none;-ms-overflow-style:none;flex:1;width:100%;max-width:960px;margin:0 auto;padding:20px;overflow-y:auto}.usage-content[data-v-c0e83cbe]::-webkit-scrollbar{display:none}.usage-loading[data-v-c0e83cbe],.usage-empty[data-v-c0e83cbe]{text-align:center;color:var(--text-muted);padding:60px 0;font-size:14px}
|
webui/assets/_arrayReduce-Cj7sZjrj.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
function e(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}export{e as t};
|
webui/assets/_baseFor-tDInUmcl.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
var e=typeof global==`object`&&global&&global.Object===Object&&global,t=typeof self==`object`&&self&&self.Object===Object&&self,n=e||t||Function(`return this`)(),r=n.Symbol,i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;function c(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch{}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}var l=Object.prototype.toString;function u(e){return l.call(e)}var d=`[object Null]`,f=`[object Undefined]`,p=r?r.toStringTag:void 0;function m(e){return e==null?e===void 0?f:d:p&&p in Object(e)?c(e):u(e)}function h(e){return typeof e==`object`&&!!e}var g=Array.isArray;function _(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function ee(e){return e}var te=`[object AsyncFunction]`,ne=`[object Function]`,re=`[object GeneratorFunction]`,ie=`[object Proxy]`;function v(e){if(!_(e))return!1;var t=m(e);return t==ne||t==re||t==te||t==ie}var y=n[`__core-js_shared__`],b=function(){var e=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ae(e){return!!b&&b in e}var oe=Function.prototype.toString;function x(e){if(e!=null){try{return oe.call(e)}catch{}try{return e+``}catch{}}return``}var se=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,le=Function.prototype,ue=Object.prototype,de=le.toString,fe=ue.hasOwnProperty,pe=RegExp(`^`+de.call(fe).replace(se,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function me(e){return!_(e)||ae(e)?!1:(v(e)?pe:ce).test(x(e))}function he(e,t){return e?.[t]}function S(e,t){var n=he(e,t);return me(n)?n:void 0}var ge=9007199254740991,_e=/^(?:0|[1-9]\d*)$/;function C(e,t){var n=typeof e;return t??=ge,!!t&&(n==`number`||n!=`symbol`&&_e.test(e))&&e>-1&&e%1==0&&e<t}function w(e,t){return e===t||e!==e&&t!==t}var ve=9007199254740991;function T(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ve}function ye(e){return e!=null&&T(e.length)&&!v(e)}var be=Object.prototype;function xe(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||be)}function E(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var D=`[object Arguments]`;function O(e){return h(e)&&m(e)==D}var k=Object.prototype,A=k.hasOwnProperty,j=k.propertyIsEnumerable,M=O(function(){return arguments}())?O:function(e){return h(e)&&A.call(e,`callee`)&&!j.call(e,`callee`)};function Se(){return!1}var N=typeof exports==`object`&&exports&&!exports.nodeType&&exports,P=N&&typeof module==`object`&&module&&!module.nodeType&&module,F=P&&P.exports===N?n.Buffer:void 0,I=(F?F.isBuffer:void 0)||Se,Ce=`[object Arguments]`,we=`[object Array]`,Te=`[object Boolean]`,Ee=`[object Date]`,De=`[object Error]`,Oe=`[object Function]`,ke=`[object Map]`,Ae=`[object Number]`,je=`[object Object]`,Me=`[object RegExp]`,Ne=`[object Set]`,Pe=`[object String]`,Fe=`[object WeakMap]`,Ie=`[object ArrayBuffer]`,Le=`[object DataView]`,Re=`[object Float32Array]`,ze=`[object Float64Array]`,Be=`[object Int8Array]`,Ve=`[object Int16Array]`,He=`[object Int32Array]`,Ue=`[object Uint8Array]`,We=`[object Uint8ClampedArray]`,Ge=`[object Uint16Array]`,Ke=`[object Uint32Array]`,L={};L[Re]=L[ze]=L[Be]=L[Ve]=L[He]=L[Ue]=L[We]=L[Ge]=L[Ke]=!0,L[Ce]=L[we]=L[Ie]=L[Te]=L[Le]=L[Ee]=L[De]=L[Oe]=L[ke]=L[Ae]=L[je]=L[Me]=L[Ne]=L[Pe]=L[Fe]=!1;function qe(e){return h(e)&&T(e.length)&&!!L[m(e)]}function R(e){return function(t){return e(t)}}var z=typeof exports==`object`&&exports&&!exports.nodeType&&exports,B=z&&typeof module==`object`&&module&&!module.nodeType&&module,V=B&&B.exports===z&&e.process,H=function(){try{return B&&B.require&&B.require(`util`).types||V&&V.binding&&V.binding(`util`)}catch{}}(),U=H&&H.isTypedArray,W=U?R(U):qe,Je=Object.prototype.hasOwnProperty;function Ye(e,t){var n=g(e),r=!n&&M(e),i=!n&&!r&&I(e),a=!n&&!r&&!i&&W(e),o=n||r||i||a,s=o?E(e.length,String):[],c=s.length;for(var l in e)(t||Je.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||C(l,c)))&&s.push(l);return s}function Xe(e,t){return function(n){return e(t(n))}}var G=S(Object,`create`);function Ze(){this.__data__=G?G(null):{},this.size=0}function Qe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var $e=`__lodash_hash_undefined__`,et=Object.prototype.hasOwnProperty;function tt(e){var t=this.__data__;if(G){var n=t[e];return n===$e?void 0:n}return et.call(t,e)?t[e]:void 0}var nt=Object.prototype.hasOwnProperty;function rt(e){var t=this.__data__;return G?t[e]!==void 0:nt.call(t,e)}var it=`__lodash_hash_undefined__`;function at(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=G&&t===void 0?it:t,this}function K(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}K.prototype.clear=Ze,K.prototype.delete=Qe,K.prototype.get=tt,K.prototype.has=rt,K.prototype.set=at;function ot(){this.__data__=[],this.size=0}function q(e,t){for(var n=e.length;n--;)if(w(e[n][0],t))return n;return-1}var st=Array.prototype.splice;function ct(e){var t=this.__data__,n=q(t,e);return n<0?!1:(n==t.length-1?t.pop():st.call(t,n,1),--this.size,!0)}function lt(e){var t=this.__data__,n=q(t,e);return n<0?void 0:t[n][1]}function ut(e){return q(this.__data__,e)>-1}function dt(e,t){var n=this.__data__,r=q(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function J(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}J.prototype.clear=ot,J.prototype.delete=ct,J.prototype.get=lt,J.prototype.has=ut,J.prototype.set=dt;var Y=S(n,`Map`);function ft(){this.size=0,this.__data__={hash:new K,map:new(Y||J),string:new K}}function pt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function X(e,t){var n=e.__data__;return pt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function mt(e){var t=X(this,e).delete(e);return this.size-=+!!t,t}function Z(e){return X(this,e).get(e)}function ht(e){return X(this,e).has(e)}function gt(e,t){var n=X(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Q.prototype.clear=ft,Q.prototype.delete=mt,Q.prototype.get=Z,Q.prototype.has=ht,Q.prototype.set=gt;function _t(){this.__data__=new J,this.size=0}function vt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function yt(e){return this.__data__.get(e)}function bt(e){return this.__data__.has(e)}var xt=200;function St(e,t){var n=this.__data__;if(n instanceof J){var r=n.__data__;if(!Y||r.length<xt-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this}function $(e){var t=this.__data__=new J(e);this.size=t.size}$.prototype.clear=_t,$.prototype.delete=vt,$.prototype.get=yt,$.prototype.has=bt,$.prototype.set=St;var Ct=n.Uint8Array;function wt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Tt=wt();export{g as C,n as D,r as E,_ as S,m as T,C as _,Y as a,v as b,W as c,I as d,M as f,w as g,T as h,Q as i,H as l,ye as m,Ct as n,Xe as o,xe as p,$ as r,Ye as s,Tt as t,R as u,S as v,h as w,ee as x,x as y};
|
webui/assets/_baseUniq-_HXxrvbp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,f as n,x as r}from"./_baseFor-tDInUmcl.js";import{t as i}from"./_arrayReduce-Cj7sZjrj.js";import{At as a,Pt as o,Tt as s,bt as c,ft as l,mt as u,vt as d,yt as f}from"./index-Cl8-DFW_.js";function p(){}function m(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function h(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function g(e){return e!==e}function _(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function v(e,t,n){return t===t?_(e,t,n):h(e,g,n)}function y(e,t){return!!(e!=null&&e.length)&&v(e,t,0)>-1}var b=t?t.isConcatSpreadable:void 0;function x(t){return e(t)||n(t)||!!(b&&t&&t[b])}function S(e,t,n,r,i){var a=-1,s=e.length;for(n||=x,i||=[];++a<s;){var c=e[a];t>0&&n(c)?t>1?S(c,t-1,n,r,i):o(i,c):r||(i[i.length]=c)}return i}function C(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function w(e){return typeof e==`function`?e:r}function T(t,n){return(e(t)?m:l)(t,w(n))}function E(e,t){var n=[];return l(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function D(t,n){return(e(t)?a:E)(t,u(n,3))}function O(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function k(t,n,r){var a=e(t)?i:O,o=arguments.length<3;return a(t,u(n,4),r,o,l)}var A=s&&1/d(new s([,-0]))[1]==1/0?function(e){return new s(e)}:p,j=200;function M(e,t,n){var r=-1,i=y,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=C;else if(a>=j){var u=t?null:A(e);if(u)return d(u);o=!1,i=f,l=new c}else l=t?[]:s;outer:for(;++r<a;){var p=e[r],m=t?t(p):p;if(p=n||p!==0?p:0,o&&m===m){for(var h=l.length;h--;)if(l[h]===m)continue outer;t&&l.push(m),s.push(p)}else i(l,m,n)||(l!==s&&l.push(m),s.push(p))}return s}export{w as a,m as c,T as i,k as n,S as o,D as r,h as s,M as t};
|
webui/assets/abap-CDhDeuvv.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
var e={comments:{lineComment:`*`},brackets:[[`[`,`]`],[`(`,`)`]]},t={defaultToken:`invalid`,ignoreCase:!0,tokenPostfix:`.abap`,keywords:`abap-source.abbreviated.abstract.accept.accepting.according.activation.actual.add.add-corresponding.adjacent.after.alias.aliases.align.all.allocate.alpha.analysis.analyzer.and.append.appendage.appending.application.archive.area.arithmetic.as.ascending.aspect.assert.assign.assigned.assigning.association.asynchronous.at.attributes.authority.authority-check.avg.back.background.backup.backward.badi.base.before.begin.between.big.binary.bintohex.bit.black.blank.blanks.blob.block.blocks.blue.bound.boundaries.bounds.boxed.break-point.buffer.by.bypassing.byte.byte-order.call.calling.case.cast.casting.catch.center.centered.chain.chain-input.chain-request.change.changing.channels.character.char-to-hex.check.checkbox.ci_.circular.class.class-coding.class-data.class-events.class-methods.class-pool.cleanup.clear.client.clob.clock.close.coalesce.code.coding.col_background.col_group.col_heading.col_key.col_negative.col_normal.col_positive.col_total.collect.color.column.columns.comment.comments.commit.common.communication.comparing.component.components.compression.compute.concat.concat_with_space.concatenate.cond.condense.condition.connect.connection.constants.context.contexts.continue.control.controls.conv.conversion.convert.copies.copy.corresponding.country.cover.cpi.create.creating.critical.currency.currency_conversion.current.cursor.cursor-selection.customer.customer-function.dangerous.data.database.datainfo.dataset.date.dats_add_days.dats_add_months.dats_days_between.dats_is_valid.daylight.dd/mm/yy.dd/mm/yyyy.ddmmyy.deallocate.decimal_shift.decimals.declarations.deep.default.deferred.define.defining.definition.delete.deleting.demand.department.descending.describe.destination.detail.dialog.directory.disconnect.display.display-mode.distinct.divide.divide-corresponding.division.do.dummy.duplicate.duplicates.duration.during.dynamic.dynpro.edit.editor-call.else.elseif.empty.enabled.enabling.encoding.end.endat.endcase.endcatch.endchain.endclass.enddo.endenhancement.end-enhancement-section.endexec.endform.endfunction.endian.endif.ending.endinterface.end-lines.endloop.endmethod.endmodule.end-of-definition.end-of-editing.end-of-file.end-of-page.end-of-selection.endon.endprovide.endselect.end-test-injection.end-test-seam.endtry.endwhile.endwith.engineering.enhancement.enhancement-point.enhancements.enhancement-section.entries.entry.enum.environment.equiv.errormessage.errors.escaping.event.events.exact.except.exception.exceptions.exception-table.exclude.excluding.exec.execute.exists.exit.exit-command.expand.expanding.expiration.explicit.exponent.export.exporting.extend.extended.extension.extract.fail.fetch.field.field-groups.fields.field-symbol.field-symbols.file.filter.filters.filter-table.final.find.first.first-line.fixed-point.fkeq.fkge.flush.font.for.form.format.forward.found.frame.frames.free.friends.from.function.functionality.function-pool.further.gaps.generate.get.giving.gkeq.gkge.global.grant.green.group.groups.handle.handler.harmless.hashed.having.hdb.header.headers.heading.head-lines.help-id.help-request.hextobin.hide.high.hint.hold.hotspot.icon.id.identification.identifier.ids.if.ignore.ignoring.immediately.implementation.implementations.implemented.implicit.import.importing.in.inactive.incl.include.includes.including.increment.index.index-line.infotypes.inheriting.init.initial.initialization.inner.inout.input.insert.instance.instances.instr.intensified.interface.interface-pool.interfaces.internal.intervals.into.inverse.inverted-date.is.iso.job.join.keep.keeping.kernel.key.keys.keywords.kind.language.last.late.layout.leading.leave.left.left-justified.leftplus.leftspace.legacy.length.let.level.levels.like.line.lines.line-count.linefeed.line-selection.line-size.list.listbox.list-processing.little.llang.load.load-of-program.lob.local.locale.locator.logfile.logical.log-point.long.loop.low.lower.lpad.lpi.ltrim.mail.main.major-id.mapping.margin.mark.mask.match.matchcode.max.maximum.medium.members.memory.mesh.message.message-id.messages.messaging.method.methods.min.minimum.minor-id.mm/dd/yy.mm/dd/yyyy.mmddyy.mode.modif.modifier.modify.module.move.move-corresponding.multiply.multiply-corresponding.name.nametab.native.nested.nesting.new.new-line.new-page.new-section.next.no.no-display.no-extension.no-gap.no-gaps.no-grouping.no-heading.no-scrolling.no-sign.no-title.no-topofpage.no-zero.node.nodes.non-unicode.non-unique.not.null.number.object.objects.obligatory.occurrence.occurrences.occurs.of.off.offset.ole.on.only.open.option.optional.options.or.order.other.others.out.outer.output.output-length.overflow.overlay.pack.package.pad.padding.page.pages.parameter.parameters.parameter-table.part.partially.pattern.percentage.perform.performing.person.pf1.pf10.pf11.pf12.pf13.pf14.pf15.pf2.pf3.pf4.pf5.pf6.pf7.pf8.pf9.pf-status.pink.places.pool.pos_high.pos_low.position.pragmas.precompiled.preferred.preserving.primary.print.print-control.priority.private.procedure.process.program.property.protected.provide.public.push.pushbutton.put.queue-only.quickinfo.radiobutton.raise.raising.range.ranges.read.reader.read-only.receive.received.receiver.receiving.red.redefinition.reduce.reduced.ref.reference.refresh.regex.reject.remote.renaming.replace.replacement.replacing.report.request.requested.reserve.reset.resolution.respecting.responsible.result.results.resumable.resume.retry.return.returncode.returning.returns.right.right-justified.rightplus.rightspace.risk.rmc_communication_failure.rmc_invalid_status.rmc_system_failure.role.rollback.rows.rpad.rtrim.run.sap.sap-spool.saving.scale_preserving.scale_preserving_scientific.scan.scientific.scientific_with_leading_zero.scroll.scroll-boundary.scrolling.search.secondary.seconds.section.select.selection.selections.selection-screen.selection-set.selection-sets.selection-table.select-options.send.separate.separated.set.shared.shift.short.shortdump-id.sign_as_postfix.single.size.skip.skipping.smart.some.sort.sortable.sorted.source.specified.split.spool.spots.sql.sqlscript.stable.stamp.standard.starting.start-of-editing.start-of-selection.state.statement.statements.static.statics.statusinfo.step-loop.stop.structure.structures.style.subkey.submatches.submit.subroutine.subscreen.subtract.subtract-corresponding.suffix.sum.summary.summing.supplied.supply.suppress.switch.switchstates.symbol.syncpoints.syntax.syntax-check.syntax-trace.system-call.system-exceptions.system-exit.tab.tabbed.table.tables.tableview.tabstrip.target.task.tasks.test.testing.test-injection.test-seam.text.textpool.then.throw.time.times.timestamp.timezone.tims_is_valid.title.titlebar.title-lines.to.tokenization.tokens.top-lines.top-of-page.trace-file.trace-table.trailing.transaction.transfer.transformation.translate.transporting.trmac.truncate.truncation.try.tstmp_add_seconds.tstmp_current_utctimestamp.tstmp_is_valid.tstmp_seconds_between.type.type-pool.type-pools.types.uline.unassign.under.unicode.union.unique.unit_conversion.unix.unpack.until.unwind.up.update.upper.user.user-command.using.utf-8.valid.value.value-request.values.vary.varying.verification-message.version.via.view.visible.wait.warning.when.whenever.where.while.width.window.windows.with.with-heading.without.with-title.word.work.write.writer.xml.xsd.yellow.yes.yymmdd.zero.zone.abap_system_timezone.abap_user_timezone.access.action.adabas.adjust_numbers.allow_precision_loss.allowed.amdp.applicationuser.as_geo_json.as400.associations.balance.behavior.breakup.bulk.cds.cds_client.check_before_save.child.clients.corr.corr_spearman.cross.cycles.datn_add_days.datn_add_months.datn_days_between.dats_from_datn.dats_tims_to_tstmp.dats_to_datn.db2.db6.ddl.dense_rank.depth.deterministic.discarding.entities.entity.error.failed.finalize.first_value.fltp_to_dec.following.fractional.full.graph.grouping.hierarchy.hierarchy_ancestors.hierarchy_ancestors_aggregate.hierarchy_descendants.hierarchy_descendants_aggregate.hierarchy_siblings.incremental.indicators.lag.last_value.lead.leaves.like_regexpr.link.locale_sap.lock.locks.many.mapped.matched.measures.median.mssqlnt.multiple.nodetype.ntile.nulls.occurrences_regexpr.one.operations.oracle.orphans.over.parent.parents.partition.pcre.period.pfcg_mapping.preceding.privileged.product.projection.rank.redirected.replace_regexpr.reported.response.responses.root.row.row_number.sap_system_date.save.schema.session.sets.shortdump.siblings.spantree.start.stddev.string_agg.subtotal.sybase.tims_from_timn.tims_to_timn.to_blob.to_clob.total.trace-entry.tstmp_to_dats.tstmp_to_dst.tstmp_to_tims.tstmpl_from_utcl.tstmpl_to_utcl.unbounded.utcl_add_seconds.utcl_current.utcl_seconds_between.uuid.var.verbatim`.split(`.`),builtinFunctions:`abs.acos.asin.atan.bit-set.boolc.boolx.ceil.char_off.charlen.cmax.cmin.concat_lines_of.contains.contains_any_not_of.contains_any_of.cos.cosh.count.count_any_not_of.count_any_of.dbmaxlen.distance.escape.exp.find_any_not_of.find_any_of.find_end.floor.frac.from_mixed.ipow.line_exists.line_index.log.log10.matches.nmax.nmin.numofchar.repeat.rescale.reverse.round.segment.shift_left.shift_right.sign.sin.sinh.sqrt.strlen.substring.substring_after.substring_before.substring_from.substring_to.tan.tanh.to_lower.to_mixed.to_upper.trunc.utclong_add.utclong_current.utclong_diff.xsdbool.xstrlen`.split(`.`),typeKeywords:`b.c.d.decfloat16.decfloat34.f.i.int8.n.p.s.string.t.utclong.x.xstring.any.clike.csequence.decfloat.numeric.simple.xsequence.accp.char.clnt.cuky.curr.datn.dats.d16d.d16n.d16r.d34d.d34n.d34r.dec.df16_dec.df16_raw.df34_dec.df34_raw.fltp.geom_ewkb.int1.int2.int4.lang.lchr.lraw.numc.quan.raw.rawstring.sstring.timn.tims.unit.utcl.df16_scl.df34_scl.prec.varc.abap_bool.abap_false.abap_true.abap_undefined.me.screen.space.super.sy.syst.table_line.*sys*`.split(`.`),builtinMethods:[`class_constructor`,`constructor`],derivedTypes:[`%CID`,`%CID_REF`,`%CONTROL`,`%DATA`,`%ELEMENT`,`%FAIL`,`%KEY`,`%MSG`,`%PARAM`,`%PID`,`%PID_ASSOC`,`%PID_PARENT`,`%_HINTS`],cdsLanguage:[`@AbapAnnotation`,`@AbapCatalog`,`@AccessControl`,`@API`,`@ClientDependent`,`@ClientHandling`,`@CompatibilityContract`,`@DataAging`,`@EndUserText`,`@Environment`,`@LanguageDependency`,`@MappingRole`,`@Metadata`,`@MetadataExtension`,`@ObjectModel`,`@Scope`,`@Semantics`,`$EXTENSION`,`$SELF`],selectors:[`->`,`->*`,`=>`,`~`,`~*`],operators:` +. -./.*.**.div.mod.=.#.@.+=.-=.*=./=.**=.&&=.?=.&.&&.bit-and.bit-not.bit-or.bit-xor.m.o.z.<. >.<=.>=.<>.><.=<.=>.bt.byte-ca.byte-cn.byte-co.byte-cs.byte-na.byte-ns.ca.cn.co.cp.cs.eq.ge.gt.le.lt.na.nb.ne.np.ns.*/.*:.--./*.//`.split(`.`),symbols:/[=><!~?&+\-*\/\^%#@]+/,tokenizer:{root:[[/[a-z_\/$%@]([\w\/$%]|-(?!>))*/,{cases:{"@typeKeywords":`type`,"@keywords":`keyword`,"@cdsLanguage":`annotation`,"@derivedTypes":`type`,"@builtinFunctions":`type`,"@builtinMethods":`type`,"@operators":`key`,"@default":`identifier`}}],[/<[\w]+>/,`identifier`],[/##[\w|_]+/,`comment`],{include:`@whitespace`},[/[:,.]/,`delimiter`],[/[{}()\[\]]/,`@brackets`],[/@symbols/,{cases:{"@selectors":`tag`,"@operators":`key`,"@default":``}}],[/'/,{token:`string`,bracket:`@open`,next:`@stringquote`}],[/`/,{token:`string`,bracket:`@open`,next:`@stringping`}],[/\|/,{token:`string`,bracket:`@open`,next:`@stringtemplate`}],[/\d+/,`number`]],stringtemplate:[[/[^\\\|]+/,`string`],[/\\\|/,`string`],[/\|/,{token:`string`,bracket:`@close`,next:`@pop`}]],stringping:[[/[^\\`]+/,`string`],[/`/,{token:`string`,bracket:`@close`,next:`@pop`}]],stringquote:[[/[^\\']+/,`string`],[/'/,{token:`string`,bracket:`@close`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/^\*.*$/,`comment`],[/\".*$/,`comment`]]}};export{e as conf,t as language};
|
webui/assets/apex-CAdLmNAy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
var e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}],folding:{markers:{start:RegExp(`^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))`),end:RegExp(`^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))`)}}},t=`abstract.activate.and.any.array.as.asc.assert.autonomous.begin.bigdecimal.blob.boolean.break.bulk.by.case.cast.catch.char.class.collect.commit.const.continue.convertcurrency.decimal.default.delete.desc.do.double.else.end.enum.exception.exit.export.extends.false.final.finally.float.for.from.future.get.global.goto.group.having.hint.if.implements.import.in.inner.insert.instanceof.int.interface.into.join.last_90_days.last_month.last_n_days.last_week.like.limit.list.long.loop.map.merge.native.new.next_90_days.next_month.next_n_days.next_week.not.null.nulls.number.object.of.on.or.outer.override.package.parallel.pragma.private.protected.public.retrieve.return.returning.rollback.savepoint.search.select.set.short.sort.stat.static.strictfp.super.switch.synchronized.system.testmethod.then.this.this_month.this_week.throw.throws.today.tolabel.tomorrow.transaction.transient.trigger.true.try.type.undelete.update.upsert.using.virtual.void.volatile.webservice.when.where.while.yesterday`.split(`.`),n=e=>e.charAt(0).toUpperCase()+e.substr(1),r=[];t.forEach(e=>{r.push(e),r.push(e.toUpperCase()),r.push(n(e))});var i={defaultToken:``,tokenPostfix:`.apex`,keywords:r,operators:`=.>.<.!.~.?.:.==.<=.>=.!=.&&.||.++.--.+.-.*./.&.|.^.%.<<.>>.>>>.+=.-=.*=./=.&=.|=.^=.%=.<<=.>>=.>>>=`.split(`.`),symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":{token:`keyword.$0`},"@default":`identifier`}}],[/[A-Z][\w\$]*/,{cases:{"@keywords":{token:`keyword.$0`},"@default":`type.identifier`}}],{include:`@whitespace`},[/[{}()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/@\s*[a-zA-Z_\$][\w\$]*/,`annotation`],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,`number.float`],[/(@digits)[fFdD]/,`number.float`],[/(@digits)[lL]?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string."`],[/'/,`string`,`@string.'`],[/'[^\\']'/,`string`],[/(')(@escapes)(')/,[`string`,`string.escape`,`string`]],[/'/,`string.invalid`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@apexdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],apexdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],string:[[/[^\\"']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/["']/,{cases:{"$#==$S2":{token:`string`,next:`@pop`},"@default":`string`}}]]}};export{e as conf,i as language};
|