diff --git a/pilot/openapi/api_v1/editor/api_editor_v1.py b/pilot/openapi/api_v1/editor/api_editor_v1.py
index cbcd29abc..ba37ff247 100644
--- a/pilot/openapi/api_v1/editor/api_editor_v1.py
+++ b/pilot/openapi/api_v1/editor/api_editor_v1.py
@@ -1,4 +1,5 @@
import json
+import time
from fastapi import (
APIRouter,
Body,
@@ -17,17 +18,18 @@ from pilot.openapi.api_view_model import (
)
from pilot.openapi.editor_view_model import (
ChatDbRounds,
+ ChartList,
ChartDetail,
ChatChartEditContext,
ChatSqlEditContext,
DbTable
)
-from pilot.openapi.api_v1.editor.sql_editor import DataNode,ChartRunData,SqlRunData
+from pilot.openapi.api_v1.editor.sql_editor import DataNode, ChartRunData, SqlRunData
from pilot.memory.chat_history.duckdb_history import DuckdbHistoryMemory
from pilot.scene.message import OnceConversation
from pilot.scene.chat_dashboard.data_loader import DashboardDataLoader
-
+from pilot.scene.chat_db.data_loader import DbDataLoader
router = APIRouter()
CFG = Config()
@@ -83,14 +85,24 @@ async def get_editor_sql(con_uid: str, round: int):
for element in once["messages"]:
if element["type"] == "ai":
return Result.succ(json.loads(element["data"]["content"]))
- return Result.faild("没有获取到可用的SQL返回结构")
+ return Result.faild(msg="not have sql!")
-@router.post("/v1/editor/sql/run", response_model=Result[List[dict]])
+@router.post("/v1/editor/sql/run", response_model=Result[SqlRunData])
async def editor_sql_run(db_name: str, sql: str):
logger.info("get_editor_sql_run:{},{}", db_name, sql)
conn = CFG.LOCAL_DB_MANAGE.get_connect(db_name)
- return Result.succ(conn.run(sql))
+
+ start_time = time.time() * 1000
+ colunms, sql_result = conn.query_ex(sql)
+ # 计算执行耗时
+ end_time = time.time() * 1000
+ sql_run_data: SqlRunData = SqlRunData(result_info="",
+ run_cost=(end_time - start_time) / 1000,
+ colunms=colunms,
+ values=sql_result
+ )
+ return Result.succ(sql_run_data)
@router.post("/v1/sql/editor/submit", response_model=Result)
@@ -99,34 +111,43 @@ async def sql_editor_submit(sql_edit_context: ChatSqlEditContext = Body()):
history_mem = DuckdbHistoryMemory(sql_edit_context.conv_uid)
history_messages: List[OnceConversation] = history_mem.get_messages()
if history_messages:
- edit_round = list(filter(lambda x: x['chat_order'] == sql_edit_context.conv_round, history_messages))[0]
+ conn = CFG.LOCAL_DB_MANAGE.get_connect(sql_edit_context.db_name)
+
+ edit_round = list(filter(lambda x: x['chat_order'] == sql_edit_context.conv_round, history_messages))[0]
if edit_round:
for element in edit_round["messages"]:
if element["type"] == "ai":
- element["data"]["content"]=""
+ db_resp = json.loads(element["data"]["content"])
+ db_resp['thoughts'] = sql_edit_context.new_speak
+ db_resp['sql'] = sql_edit_context.new_sql
+ element["data"]["content"] = json.dumps(db_resp)
if element["type"] == "view":
- element["data"]["content"]=""
+ data_loader = DbDataLoader()
+ element["data"]["content"] = data_loader.get_table_view_by_conn(conn.run(sql_edit_context.new_sql),
+ sql_edit_context.new_speak)
history_mem.update(history_messages)
return Result.succ(None)
- return Result.faild("Edit Faild!")
+ return Result.faild(msg="Edit Faild!")
-@router.get("/v1/editor/chart/list", response_model=Result[ChartDetail])
+@router.get("/v1/editor/chart/list", response_model=Result[ChartList])
async def get_editor_chart_list(con_uid: str):
logger.info("get_editor_sql_rounds:{}", con_uid)
history_mem = DuckdbHistoryMemory(con_uid)
history_messages: List[OnceConversation] = history_mem.get_messages()
if history_messages:
last_round = max(history_messages, key=lambda x: x['chat_order'])
+ db_name = last_round["param_value"]
for element in last_round["messages"]:
if element["type"] == "ai":
- return Result.succ(json.loads(element["data"]["content"]))
-
- return Result.faild("没有获取到可用的SQL返回结构")
+ chart_list: ChartList = ChartList(round=last_round, db_name=db_name,
+ charts=json.loads(element["data"]["content"]))
+ return Result.succ(chart_list)
+ return Result.faild(msg="Not have charts!")
@router.get("/v1/editor/chart/info", response_model=Result[ChartDetail])
-async def get_editor_chart_info(con_uid: str, chart_uid: str):
+async def get_editor_chart_info(con_uid: str, chart_title: str):
logger.info(f"get_editor_sql_rounds:{con_uid}")
logger.info("get_editor_sql_rounds:{}", con_uid)
history_mem = DuckdbHistoryMemory(con_uid)
@@ -136,12 +157,12 @@ async def get_editor_chart_info(con_uid: str, chart_uid: str):
db_name = last_round["param_value"]
if not db_name:
logger.error("this dashboard dialogue version too old, can't support editor!")
- return Result.faild("this dashboard dialogue version too old, can't support editor!")
+ return Result.faild(msg="this dashboard dialogue version too old, can't support editor!")
for element in last_round["messages"]:
if element["type"] == "view":
view_data: dict = json.loads(element["data"]["content"]);
charts: List = view_data.get("charts")
- find_chart = list(filter(lambda x: x['chart_name'] == chart_uid, charts))[0]
+ find_chart = list(filter(lambda x: x['chart_name'] == chart_title, charts))[0]
conn = CFG.LOCAL_DB_MANAGE.get_connect(db_name)
detail: ChartDetail = ChartDetail(chart_uid=find_chart['chart_uid'],
@@ -155,23 +176,27 @@ async def get_editor_chart_info(con_uid: str, chart_uid: str):
)
return Result.succ(detail)
- return Result.faild("Can't Find Chart Detail Info!")
+ return Result.faild(msg="Can't Find Chart Detail Info!")
@router.post("/v1/editor/chart/run", response_model=Result[ChartRunData])
async def editor_chart_run(db_name: str, sql: str):
logger.info(f"editor_chart_run:{db_name},{sql}")
- dashboard_data_loader:DashboardDataLoader = DashboardDataLoader()
+ dashboard_data_loader: DashboardDataLoader = DashboardDataLoader()
db_conn = CFG.LOCAL_DB_MANAGE.get_connect(db_name)
- field_names,chart_values = dashboard_data_loader.get_chart_values_by_db(db_conn, sql)
+ field_names, chart_values = dashboard_data_loader.get_chart_values_by_conn(db_conn, sql)
- sql_run_data:SqlRunData = SqlRunData(result_info="",
- run_cost="",
- colunms= field_names,
- values= db_conn.query_ex(sql)
- )
- return Result.succ(ChartRunData(sql_data=sql_run_data,chart_values=chart_values))
+ start_time = time.time() * 1000
+ colunms, sql_result = db_conn.query_ex(sql)
+ # 计算执行耗时
+ end_time = time.time() * 1000
+ sql_run_data: SqlRunData = SqlRunData(result_info="",
+ run_cost=(end_time - start_time) / 1000,
+ colunms=colunms,
+ values=sql_result
+ )
+ return Result.succ(ChartRunData(sql_data=sql_run_data, chart_values=chart_values))
@router.post("/v1/chart/editor/submit", response_model=Result[bool])
@@ -180,21 +205,40 @@ async def chart_editor_submit(chart_edit_context: ChatChartEditContext = Body())
history_mem = DuckdbHistoryMemory(chart_edit_context.conv_uid)
history_messages: List[OnceConversation] = history_mem.get_messages()
if history_messages:
- edit_round = list(filter(lambda x: x['chat_order'] == chart_edit_context.conv_round, history_messages))[0]
+ dashboard_data_loader: DashboardDataLoader = DashboardDataLoader()
+ db_conn = CFG.LOCAL_DB_MANAGE.get_connect(chart_edit_context.db_name)
+
+ edit_round = max(history_messages, key=lambda x: x['chat_order'])
if edit_round:
- for element in edit_round["messages"]:
- if element["type"] == "ai":
- view_data: dict = json.loads(element["data"]["content"]);
- charts: List = view_data.get("charts")
- find_chart = list(filter(lambda x: x['chart_name'] == chart_edit_context.chart_uid, charts))[0]
+ try:
+ for element in edit_round["messages"]:
+ if element["type"] == "view":
+ view_data: dict = json.loads(element["data"]["content"]);
+ charts: List = view_data.get("charts")
+ find_chart = list(filter(lambda x: x['chart_name'] == chart_edit_context.chart_title, charts))[0]
+ if chart_edit_context.new_chart_type:
+ find_chart['chart_type'] = chart_edit_context.new_chart_type
+ if chart_edit_context.new_comment:
+ find_chart['chart_desc'] = chart_edit_context.new_comment
+ field_names, chart_values = dashboard_data_loader.get_chart_values_by_conn(db_conn,
+ chart_edit_context.new_sql)
+ find_chart['chart_sql'] = chart_edit_context.new_sql
+ find_chart['values'] = [value.dict() for value in chart_values]
+ find_chart['column_name'] = field_names
- if element["type"] == "view":
- view_data: dict = json.loads(element["data"]["content"]);
- charts: List = view_data.get("charts")
- find_chart = list(filter(lambda x: x['chart_name'] == chart_edit_context.chart_uid, charts))[0]
-
+ element["data"]["content"] = json.dumps(view_data, ensure_ascii=False)
+ if element["type"] == "ai":
+ ai_resp: dict = json.loads(element["data"]["content"])
+ edit_item = list(filter(lambda x: x['title'] == chart_edit_context.chart_title, ai_resp))[0]
+ edit_item["sql"] = chart_edit_context.new_sql
+ edit_item["showcase"] = chart_edit_context.new_chart_type
+ edit_item["thoughts"] = chart_edit_context.new_comment
+ element["data"]["content"] = json.dumps(ai_resp, ensure_ascii=False)
+ except Exception as e:
+ logger.error(f"edit chart exception!{str(e)}" ,e)
+ return Result.faild(msg=f"Edit chart exception!{str(e)}")
history_mem.update(history_messages)
return Result.succ(None)
- return Result.faild("Edit Faild!")
+ return Result.faild(msg="Edit Faild!")
diff --git a/pilot/openapi/editor_view_model.py b/pilot/openapi/editor_view_model.py
index c44b49041..64d0c3eb5 100644
--- a/pilot/openapi/editor_view_model.py
+++ b/pilot/openapi/editor_view_model.py
@@ -21,6 +21,12 @@ class ChatDbRounds(BaseModel):
round_name: str
+class ChartList(BaseModel):
+ round: int
+ db_name: str
+ charts: List
+
+
class ChartDetail(BaseModel):
chart_uid: str
chart_type: str
@@ -34,24 +40,25 @@ class ChartDetail(BaseModel):
class ChatChartEditContext(BaseModel):
conv_uid: str
- conv_round: int
- chart_uid: str
-
+ chart_title: str
+ db_name: str
old_sql: str
- new_sql: str
- comment: str
- gmt_create: int
- new_view_info: str
+ new_chart_type: str
+ new_sql: str
+ new_comment: str
+ gmt_create: int
class ChatSqlEditContext(BaseModel):
conv_uid: str
+ db_name: str
conv_round: int
old_sql: str
- new_sql: str
- comment: str
+ old_speak: str
gmt_create: int
+ new_sql: str
+ new_speak: str
new_view_info: str
diff --git a/pilot/scene/chat_dashboard/chat.py b/pilot/scene/chat_dashboard/chat.py
index ed1c22754..c33f3db0f 100644
--- a/pilot/scene/chat_dashboard/chat.py
+++ b/pilot/scene/chat_dashboard/chat.py
@@ -10,6 +10,7 @@ from pilot.scene.chat_dashboard.data_preparation.report_schma import (
ChartData,
ReportData,
)
+from pilot.scene.chat_dashboard.prompt import prompt
from pilot.scene.chat_dashboard.data_loader import DashboardDataLoader
CFG = Config()
@@ -26,6 +27,7 @@ class ChatDashboard(BaseChat):
chat_mode=ChatScene.ChatDashboard,
chat_session_id=chat_session_id,
current_user_input=user_input,
+ select_param=db_name,
)
if not db_name:
raise ValueError(f"{ChatScene.ChatDashboard.value} mode should choose db!")
@@ -33,7 +35,6 @@ class ChatDashboard(BaseChat):
self.report_name = report_name
self.database = CFG.LOCAL_DB_MANAGE.get_connect(db_name)
- self.db_connect = self.database.session
self.top_k: int = 5
self.dashboard_template = self.__load_dashboard_template(report_name)
@@ -78,7 +79,7 @@ class ChatDashboard(BaseChat):
dashboard_data_loader = DashboardDataLoader()
for chart_item in prompt_response:
try:
- field_names, values = dashboard_data_loader.get_chart_values_by_conn(self.db_connect, chart_item.sql)
+ field_names, values = dashboard_data_loader.get_chart_values_by_conn(self.database, chart_item.sql)
chart_datas.append(
ChartData(
chart_uid=str(uuid.uuid1()),
diff --git a/pilot/scene/chat_dashboard/prompt.py b/pilot/scene/chat_dashboard/prompt.py
index 72c429ea7..6676ca678 100644
--- a/pilot/scene/chat_dashboard/prompt.py
+++ b/pilot/scene/chat_dashboard/prompt.py
@@ -22,7 +22,7 @@ According to the characteristics of the analyzed data, choose the most suitable
Pay attention to the length of the output content of the analysis result, do not exceed 4000tokens
-Give the correct {dialect} analysis SQL (don't use unprovided values such as 'paid'), analysis title, display method and summary of brief analysis thinking, and respond in the following json format:
+Give the correct {dialect} analysis SQL (don't use unprovided values such as 'paid'), analysis title(don't exist the same), display method and summary of brief analysis thinking, and respond in the following json format:
{response}
Ensure the response is correct json and can be parsed by Python json.loads
"""
diff --git a/pilot/scene/chat_db/auto_execute/chat.py b/pilot/scene/chat_db/auto_execute/chat.py
index ca0604f66..979634842 100644
--- a/pilot/scene/chat_db/auto_execute/chat.py
+++ b/pilot/scene/chat_db/auto_execute/chat.py
@@ -36,7 +36,6 @@ class ChatWithDbAutoExecute(BaseChat):
)
self.db_name = db_name
self.database = CFG.LOCAL_DB_MANAGE.get_connect(db_name)
- self.db_connect = self.database.session
self.top_k: int = 200
def generate_input_values(self):
@@ -63,4 +62,4 @@ class ChatWithDbAutoExecute(BaseChat):
def do_action(self, prompt_response):
print(f"do_action:{prompt_response}")
- return self.database.run(self.db_connect, prompt_response.sql)
+ return self.database.run( prompt_response.sql)
diff --git a/pilot/scene/chat_db/auto_execute/data_loader.py b/pilot/scene/chat_db/auto_execute/data_loader.py
deleted file mode 100644
index e36289d9f..000000000
--- a/pilot/scene/chat_db/auto_execute/data_loader.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import json
-
-
-class DbDataLoader:
-
-
- def get_table_view_by_conn(self, db_conn, chart_sql: str):
- pass
\ No newline at end of file
diff --git a/pilot/scene/chat_db/auto_execute/out_parser.py b/pilot/scene/chat_db/auto_execute/out_parser.py
index a94e450f4..d3d0e0621 100644
--- a/pilot/scene/chat_db/auto_execute/out_parser.py
+++ b/pilot/scene/chat_db/auto_execute/out_parser.py
@@ -7,7 +7,7 @@ from pilot.utils import build_logger
from pilot.out_parser.base import BaseOutputParser, T
from pilot.configs.model_config import LOGDIR
from pilot.configs.config import Config
-
+from pilot.scene.chat_db.data_loader import DbDataLoader
CFG = Config()
@@ -36,6 +36,7 @@ class DbChatOutputParser(BaseOutputParser):
def parse_view_response(self, speak, data) -> str:
### tool out data to table view
+ data_loader = DbDataLoader()
if len(data) <= 1:
data.insert(0, ["result"])
df = pd.DataFrame(data[1:], columns=data[0])
@@ -45,13 +46,12 @@ class DbChatOutputParser(BaseOutputParser):
"""
html_table = df.to_html(index=False, escape=False)
html = f"
{table_style}{html_table}"
+ view_text = f"##### {str(speak)}" + "\n" + html.replace("\n", " ")
+ return view_text
else:
- html_table = df.to_html(index=False, escape=False, sparsify=False)
- table_str = "".join(html_table.split())
- html = f"""{table_str}
"""
+ return data_loader.get_table_view_by_conn(data, speak)
+
- view_text = f"##### {str(speak)}" + "\n" + html.replace("\n", " ")
- return view_text
@property
def _type(self) -> str:
diff --git a/pilot/scene/chat_db/data_loader.py b/pilot/scene/chat_db/data_loader.py
new file mode 100644
index 000000000..b41640ceb
--- /dev/null
+++ b/pilot/scene/chat_db/data_loader.py
@@ -0,0 +1,15 @@
+import pandas as pd
+
+class DbDataLoader:
+
+
+ def get_table_view_by_conn(self, data, speak):
+ ### tool out data to table view
+ if len(data) <= 1:
+ data.insert(0, ["result"])
+ df = pd.DataFrame(data[1:], columns=data[0])
+ html_table = df.to_html(index=False, escape=False, sparsify=False)
+ table_str = "".join(html_table.split())
+ html = f"""{table_str}
"""
+ view_text = f"##### {str(speak)}" + "\n" + html.replace("\n", " ")
+ return view_text
\ No newline at end of file
diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html
index 2dda42bba..4250a8d09 100644
--- a/pilot/server/static/404.html
+++ b/pilot/server/static/404.html
@@ -1 +1 @@
-404: This page could not be found 404
This page could not be found.
\ No newline at end of file
+404: This page could not be found 404
This page could not be found.
\ No newline at end of file
diff --git a/pilot/server/static/404/index.html b/pilot/server/static/404/index.html
index 2dda42bba..4250a8d09 100644
--- a/pilot/server/static/404/index.html
+++ b/pilot/server/static/404/index.html
@@ -1 +1 @@
-404: This page could not be found 404
This page could not be found.
\ No newline at end of file
+404: This page could not be found 404
This page could not be found.
\ No newline at end of file
diff --git a/pilot/server/static/WHITE_LOGO.png b/pilot/server/static/WHITE_LOGO.png
new file mode 100644
index 000000000..af69fed77
Binary files /dev/null and b/pilot/server/static/WHITE_LOGO.png differ
diff --git a/pilot/server/static/_next/static/chunks/2-a60cf38d8ab305bb.js b/pilot/server/static/_next/static/chunks/2-a60cf38d8ab305bb.js
new file mode 100644
index 000000000..6f2e6fe07
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/2-a60cf38d8ab305bb.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2],{95131:function(i,o,e){e.d(o,{Z:function(){return l}});var a=e(40431),n=e(86006),t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},r=e(1240),l=n.forwardRef(function(i,o){return n.createElement(r.Z,(0,a.Z)({},i,{ref:o,icon:t}))})},29382:function(i,o,e){var a=e(78997);o.Z=void 0;var n=a(e(76906)),t=e(9268),r=(0,n.default)([(0,t.jsx)("path",{d:"M5 5h2v3h10V5h2v5h2V5c0-1.1-.9-2-2-2h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v-2H5V5zm7-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"},"0"),(0,t.jsx)("path",{d:"M20.3 18.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S12 14 12 16.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l2.7 2.7 1.4-1.4-2.7-2.7zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5z"},"1")],"ContentPasteSearchOutlined");o.Z=r},74852:function(i,o,e){var a=e(78997);o.Z=void 0;var n=a(e(76906)),t=e(9268),r=(0,n.default)((0,t.jsx)("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}),"WarningRounded");o.Z=r},50318:function(i,o,e){e.d(o,{Z:function(){return M}});var a=e(46750),n=e(40431),t=e(86006),r=e(89791),l=e(53832),d=e(47562),s=e(50645),c=e(88930),u=e(18587);function v(i){return(0,u.d6)("MuiDivider",i)}(0,u.sI)("MuiDivider",["root","horizontal","vertical","insetContext","insetNone"]);var g=e(326),p=e(9268);let m=["className","children","component","inset","orientation","role","slots","slotProps"],f=i=>{let{orientation:o,inset:e}=i,a={root:["root",o,e&&`inset${(0,l.Z)(e)}`]};return(0,d.Z)(a,v,{})},h=(0,s.Z)("hr",{name:"JoyDivider",slot:"Root",overridesResolver:(i,o)=>o.root})(({theme:i,ownerState:o})=>(0,n.Z)({"--Divider-thickness":"1px","--Divider-lineColor":i.vars.palette.divider},"none"===o.inset&&{"--_Divider-inset":"0px"},"context"===o.inset&&{"--_Divider-inset":"var(--Divider-inset, 0px)"},{margin:"initial",marginInline:"vertical"===o.orientation?"initial":"var(--_Divider-inset)",marginBlock:"vertical"===o.orientation?"var(--_Divider-inset)":"initial",position:"relative",alignSelf:"stretch",flexShrink:0},o.children?{"--Divider-gap":i.spacing(1),"--Divider-childPosition":"50%",display:"flex",flexDirection:"vertical"===o.orientation?"column":"row",alignItems:"center",whiteSpace:"nowrap",textAlign:"center",border:0,fontFamily:i.vars.fontFamily.body,fontSize:i.vars.fontSize.sm,"&::before, &::after":{position:"relative",inlineSize:"vertical"===o.orientation?"var(--Divider-thickness)":"initial",blockSize:"vertical"===o.orientation?"initial":"var(--Divider-thickness)",backgroundColor:"var(--Divider-lineColor)",content:'""'},"&::before":{marginInlineEnd:"vertical"===o.orientation?"initial":"min(var(--Divider-childPosition) * 999, var(--Divider-gap))",marginBlockEnd:"vertical"===o.orientation?"min(var(--Divider-childPosition) * 999, var(--Divider-gap))":"initial",flexBasis:"var(--Divider-childPosition)"},"&::after":{marginInlineStart:"vertical"===o.orientation?"initial":"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))",marginBlockStart:"vertical"===o.orientation?"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))":"initial",flexBasis:"calc(100% - var(--Divider-childPosition))"}}:{border:"none",listStyle:"none",backgroundColor:"var(--Divider-lineColor)",inlineSize:"vertical"===o.orientation?"var(--Divider-thickness)":"initial",blockSize:"vertical"===o.orientation?"initial":"var(--Divider-thickness)"})),D=t.forwardRef(function(i,o){let e=(0,c.Z)({props:i,name:"JoyDivider"}),{className:t,children:l,component:d=null!=l?"div":"hr",inset:s,orientation:u="horizontal",role:v="hr"!==d?"separator":void 0,slots:D={},slotProps:M={}}=e,y=(0,a.Z)(e,m),b=(0,n.Z)({},e,{inset:s,role:v,orientation:u,component:d}),x=f(b),S=(0,n.Z)({},y,{component:d,slots:D,slotProps:M}),[Z,C]=(0,g.Z)("root",{ref:o,className:(0,r.Z)(x.root,t),elementType:h,externalForwardedProps:S,ownerState:b,additionalProps:(0,n.Z)({as:d,role:v},"separator"===v&&"vertical"===u&&{"aria-orientation":"vertical"})});return(0,p.jsx)(Z,(0,n.Z)({},C,{children:l}))});D.muiName="Divider";var M=D},30530:function(i,o,e){e.d(o,{Z:function(){return Z}});var a=e(46750),n=e(40431),t=e(86006),r=e(89791),l=e(47562),d=e(53832),s=e(44542),c=e(50645),u=e(88930),v=e(47093),g=e(5737),p=e(18587);function m(i){return(0,p.d6)("MuiModalDialog",i)}(0,p.sI)("MuiModalDialog",["root","colorPrimary","colorNeutral","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg","layoutCenter","layoutFullscreen"]);var f=e(66752),h=e(69586),D=e(326),M=e(9268);let y=["className","children","color","component","variant","size","layout","slots","slotProps"],b=i=>{let{variant:o,color:e,size:a,layout:n}=i,t={root:["root",o&&`variant${(0,d.Z)(o)}`,e&&`color${(0,d.Z)(e)}`,a&&`size${(0,d.Z)(a)}`,n&&`layout${(0,d.Z)(n)}`]};return(0,l.Z)(t,m,{})},x=(0,c.Z)(g.U,{name:"JoyModalDialog",slot:"Root",overridesResolver:(i,o)=>o.root})(({theme:i,ownerState:o})=>(0,n.Z)({"--Divider-inset":"calc(-1 * var(--ModalDialog-padding))","--ModalClose-radius":"max((var(--ModalDialog-radius) - var(--variant-borderWidth, 0px)) - var(--ModalClose-inset), min(var(--ModalClose-inset) / 2, (var(--ModalDialog-radius) - var(--variant-borderWidth, 0px)) / 2))"},"sm"===o.size&&{"--ModalDialog-padding":i.spacing(2),"--ModalDialog-radius":i.vars.radius.sm,"--ModalDialog-gap":i.spacing(.75),"--ModalDialog-titleOffset":i.spacing(.25),"--ModalDialog-descriptionOffset":i.spacing(.25),"--ModalClose-inset":i.spacing(1.25),fontSize:i.vars.fontSize.sm},"md"===o.size&&{"--ModalDialog-padding":i.spacing(2.5),"--ModalDialog-radius":i.vars.radius.md,"--ModalDialog-gap":i.spacing(1.5),"--ModalDialog-titleOffset":i.spacing(.25),"--ModalDialog-descriptionOffset":i.spacing(.75),"--ModalClose-inset":i.spacing(1.5),fontSize:i.vars.fontSize.md},"lg"===o.size&&{"--ModalDialog-padding":i.spacing(3),"--ModalDialog-radius":i.vars.radius.md,"--ModalDialog-gap":i.spacing(2),"--ModalDialog-titleOffset":i.spacing(.75),"--ModalDialog-descriptionOffset":i.spacing(1),"--ModalClose-inset":i.spacing(1.5),fontSize:i.vars.fontSize.lg},{boxSizing:"border-box",boxShadow:i.shadow.md,borderRadius:"var(--ModalDialog-radius)",fontFamily:i.vars.fontFamily.body,lineHeight:i.vars.lineHeight.md,padding:"var(--ModalDialog-padding)",minWidth:"min(calc(100vw - 2 * var(--ModalDialog-padding)), var(--ModalDialog-minWidth, 300px))",outline:0,position:"absolute",display:"flex",flexDirection:"column"},"fullscreen"===o.layout&&{top:0,left:0,right:0,bottom:0,border:0,borderRadius:0},"center"===o.layout&&{top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxWidth:"min(calc(100vw - 2 * var(--ModalDialog-padding)), var(--ModalDialog-maxWidth, 100vw))",maxHeight:"calc(100% - 2 * var(--ModalDialog-padding))"},{[`& [id="${o["aria-labelledby"]}"]`]:{"--Typography-margin":"calc(-1 * var(--ModalDialog-titleOffset)) 0 var(--ModalDialog-gap) 0","--Typography-fontSize":"1.125em",[`& + [id="${o["aria-describedby"]}"]`]:{"--unstable_ModalDialog-descriptionOffset":"calc(-1 * var(--ModalDialog-descriptionOffset))"}},[`& [id="${o["aria-describedby"]}"]`]:{"--Typography-fontSize":"1em","--Typography-margin":"var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 0 0","&:not(:last-child)":{"--Typography-margin":"var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 var(--ModalDialog-gap) 0"}}})),S=t.forwardRef(function(i,o){let e=(0,u.Z)({props:i,name:"JoyModalDialog"}),{className:l,children:d,color:c="neutral",component:g="div",variant:p="outlined",size:m="md",layout:S="center",slots:Z={},slotProps:C={}}=e,z=(0,a.Z)(e,y),{getColor:$}=(0,v.VT)(p),k=$(i.color,c),E=(0,n.Z)({},e,{color:k,component:g,layout:S,size:m,variant:p}),P=b(E),O=(0,n.Z)({},z,{component:g,slots:Z,slotProps:C}),w=t.useMemo(()=>({variant:p,color:"context"===k?void 0:k}),[k,p]),[T,R]=(0,D.Z)("root",{ref:o,className:(0,r.Z)(P.root,l),elementType:x,externalForwardedProps:O,ownerState:E,additionalProps:{as:g,role:"dialog","aria-modal":"true"}});return(0,M.jsx)(f.Z.Provider,{value:m,children:(0,M.jsx)(h.Z.Provider,{value:w,children:(0,M.jsx)(T,(0,n.Z)({},R,{children:t.Children.map(d,i=>{if(!t.isValidElement(i))return i;if((0,s.Z)(i,["Divider"])){let o={};return o.inset="inset"in i.props?i.props.inset:"context",t.cloneElement(i,o)}return i})}))})})});var Z=S},66752:function(i,o,e){var a=e(86006);let n=a.createContext(void 0);o.Z=n},69586:function(i,o,e){var a=e(86006);let n=a.createContext(void 0);o.Z=n},3146:function(i,o,e){e.d(o,{Z:function(){return n}});var a=e(86006);function n(){let[,i]=a.useReducer(i=>i+1,0);return i}},6783:function(i,o,e){var a=e(86006),n=e(67044),t=e(91295);o.Z=(i,o)=>{let e=a.useContext(n.Z),r=a.useMemo(()=>{var a;let n=o||t.Z[i],r=null!==(a=null==e?void 0:e[i])&&void 0!==a?a:{};return Object.assign(Object.assign({},"function"==typeof n?n():n),r||{})},[i,o,e]),l=a.useMemo(()=>{let i=null==e?void 0:e.locale;return(null==e?void 0:e.exist)&&!i?t.Z.locale:i},[e]);return[r,l]}},75872:function(i,o,e){e.d(o,{c:function(){return a}});function a(i){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0},{componentCls:e}=i,a=`${e}-compact`;return{[a]:Object.assign(Object.assign({},function(i,o,e){let{focusElCls:a,focus:n,borderElCls:t}=e,r=t?"> *":"",l=["hover",n?"focus":null,"active"].filter(Boolean).map(i=>`&:${i} ${r}`).join(",");return{[`&-item:not(${o}-last-item)`]:{marginInlineEnd:-i.lineWidth},"&-item":Object.assign(Object.assign({[l]:{zIndex:2}},a?{[`&${a}`]:{zIndex:2}}:{}),{[`&[disabled] ${r}`]:{zIndex:0}})}}(i,a,o)),function(i,o,e){let{borderElCls:a}=e,n=a?`> ${a}`:"";return{[`&-item:not(${o}-first-item):not(${o}-last-item) ${n}`]:{borderRadius:0},[`&-item:not(${o}-last-item)${o}-first-item`]:{[`& ${n}, &${i}-sm ${n}, &${i}-lg ${n}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${o}-first-item)${o}-last-item`]:{[`& ${n}, &${i}-sm ${n}, &${i}-lg ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}(e,a,o))}}},73234:function(i,o,e){e.d(o,{Z:function(){return n}});var a=e(88684);function n(i,o){var e=(0,a.Z)({},i);return Array.isArray(o)&&o.forEach(function(i){delete e[i]}),e}},42442:function(i,o,e){e.d(o,{Z:function(){return r}});var a=e(88684),n="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function t(i,o){return 0===i.indexOf(o)}function r(i){var o,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o=!1===e?{aria:!0,data:!0,attr:!0}:!0===e?{aria:!0}:(0,a.Z)({},e);var r={};return Object.keys(i).forEach(function(e){(o.aria&&("role"===e||t(e,"aria-"))||o.data&&t(e,"data-")||o.attr&&n.includes(e))&&(r[e]=i[e])}),r}}}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/872-4a145d8028102d89.js b/pilot/server/static/_next/static/chunks/872-4a145d8028102d89.js
new file mode 100644
index 000000000..8cf263a7f
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/872-4a145d8028102d89.js
@@ -0,0 +1,16 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[872],{72474:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(40431),n=r(86006),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},i=r(1240),l=n.forwardRef(function(e,t){return n.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:a}))})},59534:function(e,t,r){var o=r(78997);t.Z=void 0;var n=o(r(76906)),a=r(9268),i=(0,n.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");t.Z=i},68949:function(e,t,r){var o=r(78997);t.Z=void 0;var n=o(r(76906)),a=r(9268),i=(0,n.default)((0,a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");t.Z=i},28086:function(e,t,r){r.d(t,{Z:function(){return D}});var o=r(46750),n=r(40431),a=r(86006),i=r(53832),l=r(47562),c=r(24263),s=r(21454),d=r(99179),u=r(50645),p=r(88930),m=r(47093),h=r(326),f=r(18587);function g(e){return(0,f.d6)("MuiSwitch",e)}let v=(0,f.sI)("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]);var b=r(31857),y=r(9268);let w=["checked","defaultChecked","disabled","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","id","color","variant","size","startDecorator","endDecorator","component","slots","slotProps"],x=e=>{let{checked:t,disabled:r,focusVisible:o,readOnly:n,color:a,variant:c}=e,s={root:["root",t&&"checked",r&&"disabled",o&&"focusVisible",n&&"readOnly",c&&`variant${(0,i.Z)(c)}`,a&&`color${(0,i.Z)(a)}`],thumb:["thumb",t&&"checked"],track:["track",t&&"checked"],action:["action",o&&"focusVisible"],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.Z)(s,g,{})},$=({theme:e,ownerState:t})=>(r={})=>{var o;let n=(null==(o=e.variants[`${t.variant}${r.state||""}`])?void 0:o[t.color])||{};return{"--Switch-trackBackground":n.backgroundColor,"--Switch-trackColor":n.color,"--Switch-trackBorderColor":"outlined"===t.variant?n.borderColor:"currentColor","--Switch-thumbBackground":n.color,"--Switch-thumbColor":n.backgroundColor}},S=(0,u.Z)("div",{name:"JoySwitch",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r;let o=$({theme:e,ownerState:t});return(0,n.Z)({"--variant-borderWidth":null==(r=e.variants[t.variant])||null==(r=r[t.color])?void 0:r["--variant-borderWidth"],"--Switch-trackRadius":e.vars.radius.lg,"--Switch-thumbShadow":"soft"===t.variant?"none":"0 0 0 1px var(--Switch-trackBackground)"},"sm"===t.size&&{"--Switch-trackWidth":"40px","--Switch-trackHeight":"20px","--Switch-thumbSize":"12px","--Switch-gap":"6px",fontSize:e.vars.fontSize.sm},"md"===t.size&&{"--Switch-trackWidth":"48px","--Switch-trackHeight":"24px","--Switch-thumbSize":"16px","--Switch-gap":"8px",fontSize:e.vars.fontSize.md},"lg"===t.size&&{"--Switch-trackWidth":"64px","--Switch-trackHeight":"32px","--Switch-thumbSize":"24px","--Switch-gap":"12px"},{"--unstable_paddingBlock":"max((var(--Switch-trackHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Switch-thumbSize)) / 2, 0px)","--Switch-thumbRadius":"max(var(--Switch-trackRadius) - var(--unstable_paddingBlock), min(var(--unstable_paddingBlock) / 2, var(--Switch-trackRadius) / 2))","--Switch-thumbWidth":"var(--Switch-thumbSize)","--Switch-thumbOffset":"max((var(--Switch-trackHeight) - var(--Switch-thumbSize)) / 2, 0px)"},o(),{"&:hover":(0,n.Z)({},o({state:"Hover"})),[`&.${v.checked}`]:(0,n.Z)({},o(),{"&:hover":(0,n.Z)({},o({state:"Hover"}))}),[`&.${v.disabled}`]:(0,n.Z)({pointerEvents:"none",color:e.vars.palette.text.tertiary},o({state:"Disabled"})),display:"inline-flex",alignItems:"center",alignSelf:"center",fontFamily:e.vars.fontFamily.body,position:"relative",padding:"calc((var(--Switch-thumbSize) / 2) - (var(--Switch-trackHeight) / 2)) calc(-1 * var(--Switch-thumbOffset))",backgroundColor:"initial",border:"none",margin:"var(--unstable_Switch-margin)"})}),k=(0,u.Z)("div",{name:"JoySwitch",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e})=>({borderRadius:"var(--Switch-trackRadius)",position:"absolute",top:0,left:0,bottom:0,right:0,[e.focus.selector]:e.focus.default})),C=(0,u.Z)("input",{name:"JoySwitch",slot:"Input",overridesResolver:(e,t)=>t.input})({margin:0,height:"100%",width:"100%",opacity:0,position:"absolute",cursor:"pointer"}),E=(0,u.Z)("span",{name:"JoySwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>(0,n.Z)({position:"relative",color:"var(--Switch-trackColor)",height:"var(--Switch-trackHeight)",width:"var(--Switch-trackWidth)",display:"flex",flexShrink:0,justifyContent:"space-between",alignItems:"center",boxSizing:"border-box",border:"var(--variant-borderWidth, 0px) solid",borderColor:"var(--Switch-trackBorderColor)",backgroundColor:"var(--Switch-trackBackground)",borderRadius:"var(--Switch-trackRadius)",fontFamily:e.vars.fontFamily.body},"sm"===t.size&&{fontSize:e.vars.fontSize.xs},"md"===t.size&&{fontSize:e.vars.fontSize.sm},"lg"===t.size&&{fontSize:e.vars.fontSize.md})),Z=(0,u.Z)("span",{name:"JoySwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"calc(50% - var(--Switch-trackWidth) / 2 + var(--Switch-thumbWidth) / 2 + var(--Switch-thumbOffset))",transform:"translate(-50%, -50%)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${v.checked}`]:{left:"calc(50% + var(--Switch-trackWidth) / 2 - var(--Switch-thumbWidth) / 2 - var(--Switch-thumbOffset))"}}),O=(0,u.Z)("span",{name:"JoySwitch",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"var(--Switch-gap)"}),z=(0,u.Z)("span",{name:"JoySwitch",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"var(--Switch-gap)"}),T=a.forwardRef(function(e,t){var r,i,l,u,f;let g=(0,p.Z)({props:e,name:"JoySwitch"}),{checked:v,defaultChecked:$,disabled:T,onBlur:D,onChange:I,onFocus:R,onFocusVisible:j,readOnly:H,id:N,color:M,variant:P="solid",size:F="md",startDecorator:B,endDecorator:W,component:L,slots:A={},slotProps:_={}}=g,X=(0,o.Z)(g,w),V=a.useContext(b.Z),U=null!=(r=null!=(i=e.disabled)?i:null==V?void 0:V.disabled)?r:T,q=null!=(l=null!=(u=e.size)?u:null==V?void 0:V.size)?l:F,{getColor:J}=(0,m.VT)(P),G=J(e.color,null!=V&&V.error?"danger":null!=(f=null==V?void 0:V.color)?f:M),{getInputProps:K,checked:Q,disabled:Y,focusVisible:ee,readOnly:et}=function(e){let{checked:t,defaultChecked:r,disabled:o,onBlur:i,onChange:l,onFocus:u,onFocusVisible:p,readOnly:m,required:h}=e,[f,g]=(0,c.Z)({controlled:t,default:!!r,name:"Switch",state:"checked"}),v=e=>t=>{var r;t.nativeEvent.defaultPrevented||(g(t.target.checked),null==l||l(t),null==(r=e.onChange)||r.call(e,t))},{isFocusVisibleRef:b,onBlur:y,onFocus:w,ref:x}=(0,s.Z)(),[$,S]=a.useState(!1);o&&$&&S(!1),a.useEffect(()=>{b.current=$},[$,b]);let k=a.useRef(null),C=e=>t=>{var r;k.current||(k.current=t.currentTarget),w(t),!0===b.current&&(S(!0),null==p||p(t)),null==u||u(t),null==(r=e.onFocus)||r.call(e,t)},E=e=>t=>{var r;y(t),!1===b.current&&S(!1),null==i||i(t),null==(r=e.onBlur)||r.call(e,t)},Z=(0,d.Z)(x,k);return{checked:f,disabled:!!o,focusVisible:$,getInputProps:(e={})=>(0,n.Z)({checked:t,defaultChecked:r,disabled:o,readOnly:m,ref:Z,required:h,type:"checkbox"},e,{onChange:v(e),onFocus:C(e),onBlur:E(e)}),inputRef:Z,readOnly:!!m}}({checked:v,defaultChecked:$,disabled:U,onBlur:D,onChange:I,onFocus:R,onFocusVisible:j,readOnly:H}),er=(0,n.Z)({},g,{id:N,checked:Q,disabled:Y,focusVisible:ee,readOnly:et,color:Q?G||"primary":G||"neutral",variant:P,size:q}),eo=x(er),en=(0,n.Z)({},X,{component:L,slots:A,slotProps:_}),[ea,ei]=(0,h.Z)("root",{ref:t,className:eo.root,elementType:S,externalForwardedProps:en,ownerState:er}),[el,ec]=(0,h.Z)("startDecorator",{additionalProps:{"aria-hidden":!0},className:eo.startDecorator,elementType:O,externalForwardedProps:en,ownerState:er}),[es,ed]=(0,h.Z)("endDecorator",{additionalProps:{"aria-hidden":!0},className:eo.endDecorator,elementType:z,externalForwardedProps:en,ownerState:er}),[eu,ep]=(0,h.Z)("track",{className:eo.track,elementType:E,externalForwardedProps:en,ownerState:er}),[em,eh]=(0,h.Z)("thumb",{className:eo.thumb,elementType:Z,externalForwardedProps:en,ownerState:er}),[ef,eg]=(0,h.Z)("action",{className:eo.action,elementType:k,externalForwardedProps:en,ownerState:er}),[ev,eb]=(0,h.Z)("input",{additionalProps:{id:null!=N?N:null==V?void 0:V.htmlFor,"aria-describedby":null==V?void 0:V["aria-describedby"]},className:eo.input,elementType:C,externalForwardedProps:en,getSlotProps:K,ownerState:er});return(0,y.jsxs)(ea,(0,n.Z)({},ei,{children:[B&&(0,y.jsx)(el,(0,n.Z)({},ec,{children:"function"==typeof B?B(er):B})),(0,y.jsxs)(eu,(0,n.Z)({},ep,{children:[null==ep?void 0:ep.children,(0,y.jsx)(em,(0,n.Z)({},eh))]})),(0,y.jsx)(ef,(0,n.Z)({},eg,{children:(0,y.jsx)(ev,(0,n.Z)({},eb))})),W&&(0,y.jsx)(es,(0,n.Z)({},ed,{children:"function"==typeof W?W(er):W}))]}))});var D=T},866:function(e,t,r){r.d(t,{Z:function(){return j}});var o=r(46750),n=r(40431),a=r(86006),i=r(53832),l=r(47562),c=r(8431),s=r(99179),d=r(30165),u=r(22099),p=r(11059),m=r(9268);let h=["onChange","maxRows","minRows","style","value"];function f(e){return parseInt(e,10)||0}let g={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function v(e){return null==e||0===Object.keys(e).length||0===e.outerHeightStyle&&!e.overflow}let b=a.forwardRef(function(e,t){let{onChange:r,maxRows:i,minRows:l=1,style:b,value:y}=e,w=(0,o.Z)(e,h),{current:x}=a.useRef(null!=y),$=a.useRef(null),S=(0,s.Z)(t,$),k=a.useRef(null),C=a.useRef(0),[E,Z]=a.useState({outerHeightStyle:0}),O=a.useCallback(()=>{let t=$.current,r=(0,d.Z)(t),o=r.getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0};let n=k.current;n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");let a=o.boxSizing,c=f(o.paddingBottom)+f(o.paddingTop),s=f(o.borderBottomWidth)+f(o.borderTopWidth),u=n.scrollHeight;n.value="x";let p=n.scrollHeight,m=u;l&&(m=Math.max(Number(l)*p,m)),i&&(m=Math.min(Number(i)*p,m)),m=Math.max(m,p);let h=m+("border-box"===a?c+s:0),g=1>=Math.abs(m-u);return{outerHeightStyle:h,overflow:g}},[i,l,e.placeholder]),z=(e,t)=>{let{outerHeightStyle:r,overflow:o}=t;return C.current<20&&(r>0&&Math.abs((e.outerHeightStyle||0)-r)>1||e.overflow!==o)?(C.current+=1,{overflow:o,outerHeightStyle:r}):e},T=a.useCallback(()=>{let e=O();v(e)||Z(t=>z(t,e))},[O]),D=()=>{let e=O();v(e)||c.flushSync(()=>{Z(t=>z(t,e))})};return a.useEffect(()=>{let e;let t=(0,u.Z)(()=>{C.current=0,$.current&&D()}),r=$.current,o=(0,d.Z)(r);return o.addEventListener("resize",t),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(t)).observe(r),()=>{t.clear(),o.removeEventListener("resize",t),e&&e.disconnect()}}),(0,p.Z)(()=>{T()}),a.useEffect(()=>{C.current=0},[y]),(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)("textarea",(0,n.Z)({value:y,onChange:e=>{C.current=0,x||T(),r&&r(e)},ref:S,rows:l,style:(0,n.Z)({height:E.outerHeightStyle,overflow:E.overflow?"hidden":void 0},b)},w)),(0,m.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:k,tabIndex:-1,style:(0,n.Z)({},g.shadow,b,{paddingTop:0,paddingBottom:0})})]})});var y=r(50645),w=r(88930),x=r(47093),$=r(326),S=r(18587);function k(e){return(0,S.d6)("MuiTextarea",e)}let C=(0,S.sI)("MuiTextarea",["root","textarea","startDecorator","endDecorator","formControl","disabled","error","focused","colorPrimary","colorNeutral","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft"]);var E=r(74313);let Z=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","size","color","variant","startDecorator","endDecorator","minRows","maxRows","component","slots","slotProps"],O=e=>{let{disabled:t,variant:r,color:o,size:n}=e,a={root:["root",t&&"disabled",r&&`variant${(0,i.Z)(r)}`,o&&`color${(0,i.Z)(o)}`,n&&`size${(0,i.Z)(n)}`],textarea:["textarea"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.Z)(a,k,{})},z=(0,y.Z)("div",{name:"JoyTextarea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var r,o,a,i,l;let c=null==(r=e.variants[`${t.variant}`])?void 0:r[t.color];return[(0,n.Z)({"--Textarea-radius":e.vars.radius.sm,"--Textarea-gap":"0.5rem","--Textarea-placeholderColor":"inherit","--Textarea-placeholderOpacity":.5,"--Textarea-focused":"0","--Textarea-focusedThickness":e.vars.focus.thickness},"context"===t.color?{"--Textarea-focusedHighlight":e.vars.palette.focusVisible}:{"--Textarea-focusedHighlight":null==(o=e.vars.palette["neutral"===t.color?"primary":t.color])?void 0:o[500]},"sm"===t.size&&{"--Textarea-minHeight":"2rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.5rem","--Textarea-decoratorChildHeight":"min(1.5rem, var(--Textarea-minHeight))","--Icon-fontSize":"1.25rem"},"md"===t.size&&{"--Textarea-minHeight":"2.5rem","--Textarea-paddingBlock":"calc(0.5rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"0.75rem","--Textarea-decoratorChildHeight":"min(2rem, var(--Textarea-minHeight))","--Icon-fontSize":"1.5rem"},"lg"===t.size&&{"--Textarea-minHeight":"3rem","--Textarea-paddingBlock":"calc(0.75rem - var(--variant-borderWidth, 0px))","--Textarea-paddingInline":"1rem","--Textarea-gap":"0.75rem","--Textarea-decoratorChildHeight":"min(2.375rem, var(--Textarea-minHeight))","--Icon-fontSize":"1.75rem"},{"--_Textarea-paddingBlock":"max((var(--Textarea-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Textarea-decoratorChildHeight)) / 2, 0px)","--Textarea-decoratorChildRadius":"max(var(--Textarea-radius) - var(--variant-borderWidth, 0px) - var(--_Textarea-paddingBlock), min(var(--_Textarea-paddingBlock) + var(--variant-borderWidth, 0px), var(--Textarea-radius) / 2))","--Button-minHeight":"var(--Textarea-decoratorChildHeight)","--IconButton-size":"var(--Textarea-decoratorChildHeight)","--Button-radius":"var(--Textarea-decoratorChildRadius)","--IconButton-radius":"var(--Textarea-decoratorChildRadius)",boxSizing:"border-box",minWidth:0,minHeight:"var(--Textarea-minHeight)",cursor:"text",position:"relative",display:"flex",flexDirection:"column",paddingInlineStart:"var(--Textarea-paddingInline)",paddingBlock:"var(--Textarea-paddingBlock)",borderRadius:"var(--Textarea-radius)",fontFamily:e.vars.fontFamily.body,fontSize:e.vars.fontSize.md,lineHeight:e.vars.lineHeight.md},"sm"===t.size&&{fontSize:e.vars.fontSize.sm,lineHeight:e.vars.lineHeight.sm},{"&:before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Textarea-focusedInset, inset) 0 0 0 calc(var(--Textarea-focused) * var(--Textarea-focusedThickness)) var(--Textarea-focusedHighlight)"}}),(0,n.Z)({},c,{backgroundColor:null!=(a=null==c?void 0:c.backgroundColor)?a:e.vars.palette.background.surface,"&:hover":(0,n.Z)({},null==(i=e.variants[`${t.variant}Hover`])?void 0:i[t.color],{backgroundColor:null,cursor:"text"}),[`&.${C.disabled}`]:null==(l=e.variants[`${t.variant}Disabled`])?void 0:l[t.color],"&:focus-within::before":{"--Textarea-focused":"1"}})]}),T=(0,y.Z)(b,{name:"JoyTextarea",slot:"Textarea",overridesResolver:(e,t)=>t.textarea})({resize:"none",border:"none",minWidth:0,outline:0,padding:0,paddingInlineEnd:"var(--Textarea-paddingInline)",flex:"auto",alignSelf:"stretch",color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit","&::-webkit-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Textarea-placeholderColor)",opacity:"var(--Textarea-placeholderOpacity)"}}),D=(0,y.Z)("div",{name:"JoyTextarea",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})(({theme:e})=>({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockEnd:"var(--Textarea-gap)",color:e.vars.palette.text.tertiary,cursor:"initial"})),I=(0,y.Z)("div",{name:"JoyTextarea",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})(({theme:e})=>({display:"flex",marginInlineStart:"calc(var(--Textarea-paddingBlock) - var(--Textarea-paddingInline))",marginInlineEnd:"var(--Textarea-paddingBlock)",marginBlockStart:"var(--Textarea-gap)",color:e.vars.palette.text.tertiary,cursor:"initial"})),R=a.forwardRef(function(e,t){var r,a,i,l,c,s,d;let u=(0,w.Z)({props:e,name:"JoyTextarea"}),p=(0,E.Z)(u,C),{propsToForward:h,rootStateClasses:f,inputStateClasses:g,getRootProps:v,getInputProps:b,formControl:y,focused:S,error:k=!1,disabled:R=!1,size:j="md",color:H="neutral",variant:N="outlined",startDecorator:M,endDecorator:P,minRows:F,maxRows:B,component:W,slots:L={},slotProps:A={}}=p,_=(0,o.Z)(p,Z),X=null!=(r=null!=(a=e.disabled)?a:null==y?void 0:y.disabled)?r:R,V=null!=(i=null!=(l=e.error)?l:null==y?void 0:y.error)?i:k,U=null!=(c=null!=(s=e.size)?s:null==y?void 0:y.size)?c:j,{getColor:q}=(0,x.VT)(N),J=q(e.color,V?"danger":null!=(d=null==y?void 0:y.color)?d:H),G=(0,n.Z)({},u,{color:J,disabled:X,error:V,focused:S,size:U,variant:N}),K=O(G),Q=(0,n.Z)({},_,{component:W,slots:L,slotProps:A}),[Y,ee]=(0,$.Z)("root",{ref:t,className:[K.root,f],elementType:z,externalForwardedProps:Q,getSlotProps:v,ownerState:G}),[et,er]=(0,$.Z)("textarea",{additionalProps:{id:null==y?void 0:y.htmlFor,"aria-describedby":null==y?void 0:y["aria-describedby"]},className:[K.textarea,g],elementType:T,internalForwardedProps:(0,n.Z)({},h,{minRows:F,maxRows:B}),externalForwardedProps:Q,getSlotProps:b,ownerState:G}),[eo,en]=(0,$.Z)("startDecorator",{className:K.startDecorator,elementType:D,externalForwardedProps:Q,ownerState:G}),[ea,ei]=(0,$.Z)("endDecorator",{className:K.endDecorator,elementType:I,externalForwardedProps:Q,ownerState:G});return(0,m.jsxs)(Y,(0,n.Z)({},ee,{children:[M&&(0,m.jsx)(eo,(0,n.Z)({},en,{children:M})),(0,m.jsx)(et,(0,n.Z)({},er)),P&&(0,m.jsx)(ea,(0,n.Z)({},ei,{children:P}))]}))});var j=R},50157:function(e,t,r){r.d(t,{default:function(){return tl}});var o=r(86006),n=r(90151),a=r(8683),i=r.n(a),l=r(40431),c=r(18050),s=r(49449),d=r(43663),u=r(38340),p=r(65877),m=r(89301),h=r(71971),f=r(965),g=r(27859),v=r(42442);function b(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function y(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var r=new FormData;e.data&&Object.keys(e.data).forEach(function(t){var o=e.data[t];if(Array.isArray(o)){o.forEach(function(e){r.append("".concat(t,"[]"),e)});return}r.append(t,o)}),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){if(t.status<200||t.status>=300){var r;return e.onError(((r=Error("cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"))).status=t.status,r.method=e.method,r.url=e.action,r),b(t))}return e.onSuccess(b(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var o=e.headers||{};return null!==o["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(function(e){null!==o[e]&&t.setRequestHeader(e,o[e])}),t.send(r),{abort:function(){t.abort()}}}var w=+new Date,x=0;function $(){return"rc-upload-".concat(w,"-").concat(++x)}var S=r(5004),k=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",n=e.type||"",a=n.replace(/\/.*$/,"");return r.some(function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var r=o.toLowerCase(),i=t.toLowerCase(),l=[i];return(".jpg"===i||".jpeg"===i)&&(l=[".jpg",".jpeg"]),l.some(function(e){return r.endsWith(e)})}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,""):n===t||!!/^\w+$/.test(t)&&((0,S.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)})}return!0},C=function(e,t,r){var o=function e(o,n){if(o.path=n||"",o.isFile)o.file(function(e){r(e)&&(o.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))});else if(o.isDirectory){var a,i,l;a=function(t){t.forEach(function(t){e(t,"".concat(n).concat(o.name,"/"))})},i=o.createReader(),l=[],function e(){i.readEntries(function(t){var r=Array.prototype.slice.apply(t);l=l.concat(r),r.length?e():a(l)})}()}};e.forEach(function(e){o(e.webkitGetAsEntry())})},E=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Z=function(e){(0,d.Z)(r,e);var t=(0,u.Z)(r);function r(){(0,c.Z)(this,r);for(var e,o,a=arguments.length,i=Array(a),l=0;l{let{uid:r}=t;return r===e.uid});return -1===o?r.push(e):r[o]=e,r}function K(e,t){let r=void 0!==e.uid?"uid":"name";return t.filter(t=>t[r]===e[r])[0]}let Q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),r=t[t.length-1],o=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},Y=e=>0===e.indexOf("image/"),ee=e=>{if(e.type&&!e.thumbUrl)return Y(e.type);let t=e.thumbUrl||e.url||"",r=Q(t);return!!(/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r))||!/^data:/.test(t)&&!r};function et(e){return new Promise(t=>{if(!e.type||!Y(e.type)){t("");return}let r=document.createElement("canvas");r.width=200,r.height=200,r.style.cssText="position: fixed; left: 0; top: 0; width: 200px; height: 200px; z-index: 9999; display: none;",document.body.appendChild(r);let o=r.getContext("2d"),n=new Image;if(n.onload=()=>{let{width:e,height:a}=n,i=200,l=200,c=0,s=0;e>a?s=-((l=a*(200/e))-i)/2:c=-((i=e*(200/a))-l)/2,o.drawImage(n,c,s,i,l);let d=r.toDataURL();document.body.removeChild(r),t(d)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){let t=new FileReader;t.addEventListener("load",()=>{t.result&&(n.src=t.result)}),t.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}var er={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},eo=o.forwardRef(function(e,t){return o.createElement(M.Z,(0,l.Z)({},e,{ref:t,icon:er}))}),en={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},ea=o.forwardRef(function(e,t){return o.createElement(M.Z,(0,l.Z)({},e,{ref:t,icon:en}))}),ei={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},el=o.forwardRef(function(e,t){return o.createElement(M.Z,(0,l.Z)({},e,{ref:t,icon:ei}))}),ec=r(34777),es=r(95131),ed=r(56222),eu=r(31533),ep=r(73234),em=r(88684),eh={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ef=function(){var e=(0,o.useRef)([]),t=(0,o.useRef)(null);return(0,o.useEffect)(function(){var r=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var n=e.style;n.transitionDuration=".3s, .3s, .3s, .06s",t.current&&r-t.current<100&&(n.transitionDuration="0s, 0s")}}),o&&(t.current=Date.now())}),e.current},eg=r(60456),ev=r(71693),eb=0,ey=(0,ev.Z)(),ew=function(e){var t=o.useState(),r=(0,eg.Z)(t,2),n=r[0],a=r[1];return o.useEffect(function(){var e;a("rc_progress_".concat((ey?(e=eb,eb+=1):e="TEST_OR_SSR",e)))},[]),e||n},ex=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function e$(e){return+e.replace("%","")}function eS(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var ek=function(e,t,r,o,n,a,i,l,c,s){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-o)/100*t;return"round"===c&&100!==o&&(u+=s/2)>=t&&(u=t-.01),{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(n+r/100*360*((360-a)/360)+(0===a?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},eC=function(e){var t,r,n,a,c=(0,em.Z)((0,em.Z)({},eh),e),s=c.id,d=c.prefixCls,u=c.steps,p=c.strokeWidth,h=c.trailWidth,g=c.gapDegree,v=void 0===g?0:g,b=c.gapPosition,y=c.trailColor,w=c.strokeLinecap,x=c.style,$=c.className,S=c.strokeColor,k=c.percent,C=(0,m.Z)(c,ex),E=ew(s),Z="".concat(E,"-gradient"),O=50-p/2,z=2*Math.PI*O,T=v>0?90+v/2:-90,D=z*((360-v)/360),I="object"===(0,f.Z)(u)?u:{count:u,space:2},R=I.count,j=I.space,H=ek(z,D,0,100,T,v,b,y,w,p),N=eS(k),M=eS(S),P=M.find(function(e){return e&&"object"===(0,f.Z)(e)}),F=ef();return o.createElement("svg",(0,l.Z)({className:i()("".concat(d,"-circle"),$),viewBox:"".concat(-50," ").concat(-50," ").concat(100," ").concat(100),style:x,id:s,role:"presentation"},C),P&&o.createElement("defs",null,o.createElement("linearGradient",{id:Z,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(P).sort(function(e,t){return e$(e)-e$(t)}).map(function(e,t){return o.createElement("stop",{key:t,offset:e,stopColor:P[e]})}))),!R&&o.createElement("circle",{className:"".concat(d,"-circle-trail"),r:O,cx:0,cy:0,stroke:y,strokeLinecap:w,strokeWidth:h||p,style:H}),R?(t=Math.round(R*(N[0]/100)),r=100/R,n=0,Array(R).fill(null).map(function(e,a){var i=a<=t-1?M[0]:y,l=i&&"object"===(0,f.Z)(i)?"url(#".concat(Z,")"):void 0,c=ek(z,D,n,r,T,v,b,i,"butt",p,j);return n+=(D-c.strokeDashoffset+j)*100/D,o.createElement("circle",{key:a,className:"".concat(d,"-circle-path"),r:O,cx:0,cy:0,stroke:l,strokeWidth:p,opacity:1,style:c,ref:function(e){F[a]=e}})})):(a=0,N.map(function(e,t){var r=M[t]||M[M.length-1],n=r&&"object"===(0,f.Z)(r)?"url(#".concat(Z,")"):void 0,i=ek(z,D,a,e,T,v,b,r,w,p);return a+=e,o.createElement("circle",{key:t,className:"".concat(d,"-circle-path"),r:O,cx:0,cy:0,stroke:n,strokeLinecap:w,strokeWidth:p,opacity:0===e?0:1,style:i,ref:function(e){F[t]=e}})}).reverse()))},eE=r(15241),eZ=r(70333);function eO(e){return!e||e<0?0:e>100?100:e}function ez(e){let{success:t,successPercent:r}=e,o=r;return t&&"progress"in t&&(o=t.progress),t&&"percent"in t&&(o=t.percent),o}let eT=e=>{let{percent:t,success:r,successPercent:o}=e,n=eO(ez({success:r,successPercent:o}));return[n,eO(eO(t)-n)]},eD=e=>{let{success:t={},strokeColor:r}=e,{strokeColor:o}=t;return[o||eZ.ez.green,r||null]},eI=(e,t,r)=>{var o,n,a,i;let l=-1,c=-1;if("step"===t){let t=r.steps,o=r.strokeWidth;"string"==typeof e||void 0===e?(l="small"===e?2:14,c=null!=o?o:8):"number"==typeof e?[l,c]=[e,e]:[l=14,c=8]=e,l*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?c=t||("small"===e?6:8):"number"==typeof e?[l,c]=[e,e]:[l=-1,c=8]=e}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[l,c]="small"===e?[60,60]:[120,120]:"number"==typeof e?[l,c]=[e,e]:(l=null!==(n=null!==(o=e[0])&&void 0!==o?o:e[1])&&void 0!==n?n:120,c=null!==(i=null!==(a=e[0])&&void 0!==a?a:e[1])&&void 0!==i?i:120));return[l,c]},eR=e=>3/e*100;var ej=e=>{let{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:a,gapDegree:l,width:c=120,type:s,children:d,success:u,size:p=c}=e,[m,h]=eI(p,"circle"),{strokeWidth:f}=e;void 0===f&&(f=Math.max(eR(m),6));let g=o.useMemo(()=>l||0===l?l:"dashboard"===s?75:void 0,[l,s]),v=a||"dashboard"===s&&"bottom"||void 0,b="[object Object]"===Object.prototype.toString.call(e.strokeColor),y=eD({success:u,strokeColor:e.strokeColor}),w=i()(`${t}-inner`,{[`${t}-circle-gradient`]:b}),x=o.createElement(eC,{percent:eT(e),strokeWidth:f,trailWidth:f,strokeColor:y,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:g,gapPosition:v});return o.createElement("div",{className:w,style:{width:m,height:h,fontSize:.15*m+6}},m<=20?o.createElement(eE.Z,{title:d},o.createElement("span",null,x)):o.createElement(o.Fragment,null,x,d))},eH=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let eN=e=>{let t=[];return Object.keys(e).forEach(r=>{let o=parseFloat(r.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[r]})}),(t=t.sort((e,t)=>e.key-t.key)).map(e=>{let{key:t,value:r}=e;return`${r} ${t}%`}).join(", ")},eM=(e,t)=>{let{from:r=eZ.ez.blue,to:o=eZ.ez.blue,direction:n="rtl"===t?"to left":"to right"}=e,a=eH(e,["from","to","direction"]);if(0!==Object.keys(a).length){let e=eN(a);return{backgroundImage:`linear-gradient(${n}, ${e})`}}return{backgroundImage:`linear-gradient(${n}, ${r}, ${o})`}};var eP=e=>{let{prefixCls:t,direction:r,percent:n,size:a,strokeWidth:i,strokeColor:l,strokeLinecap:c="round",children:s,trailColor:d=null,success:u}=e,p=l&&"string"!=typeof l?eM(l,r):{backgroundColor:l},m="square"===c||"butt"===c?0:void 0,h=null!=a?a:[-1,i||("small"===a?6:8)],[f,g]=eI(h,"line",{strokeWidth:i}),v=Object.assign({width:`${eO(n)}%`,height:g,borderRadius:m},p),b=ez(e),y={width:`${eO(b)}%`,height:g,borderRadius:m,backgroundColor:null==u?void 0:u.strokeColor};return o.createElement(o.Fragment,null,o.createElement("div",{className:`${t}-outer`,style:{width:f<0?"100%":f,height:g}},o.createElement("div",{className:`${t}-inner`,style:{backgroundColor:d||void 0,borderRadius:m}},o.createElement("div",{className:`${t}-bg`,style:v}),void 0!==b?o.createElement("div",{className:`${t}-success-bg`,style:y}):null)),s)},eF=e=>{let{size:t,steps:r,percent:n=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:s,children:d}=e,u=Math.round(r*(n/100)),p=null!=t?t:["small"===t?2:14,a],[m,h]=eI(p,"step",{steps:r,strokeWidth:a}),f=m/r,g=Array(r);for(let e=0;e{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,eA.Wf)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:e_,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},eV=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},eU=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},eq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}};var eJ=(0,eW.Z)("Progress",e=>{let t=e.marginXXS/2,r=(0,eL.TS)(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[eX(r),eV(r),eU(r),eq(r)]}),eG=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let eK=["normal","exception","active","success"],eQ=o.forwardRef((e,t)=>{let r;let{prefixCls:n,className:a,rootClassName:l,steps:c,strokeColor:s,percent:d=0,size:u="default",showInfo:p=!0,type:m="line",status:h,format:f}=e,g=eG(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format"]),v=o.useMemo(()=>{var t,r;let o=ez(e);return parseInt(void 0!==o?null===(t=null!=o?o:0)||void 0===t?void 0:t.toString():null===(r=null!=d?d:0)||void 0===r?void 0:r.toString(),10)},[d,e.success,e.successPercent]),b=o.useMemo(()=>!eK.includes(h)&&v>=100?"success":h||"normal",[h,v]),{getPrefixCls:y,direction:w}=o.useContext(I.E_),x=y("progress",n),[$,S]=eJ(x),k=o.useMemo(()=>{let t;if(!p)return null;let r=ez(e),n=f||(e=>`${e}%`),a="line"===m;return f||"exception"!==b&&"success"!==b?t=n(eO(d),eO(r)):"exception"===b?t=a?o.createElement(ed.Z,null):o.createElement(eu.Z,null):"success"===b&&(t=a?o.createElement(ec.Z,null):o.createElement(es.Z,null)),o.createElement("span",{className:`${x}-text`,title:"string"==typeof t?t:void 0},t)},[p,d,v,b,m,x,f]),C=Array.isArray(s)?s[0]:s,E="string"==typeof s||Array.isArray(s)?s:void 0;"line"===m?r=c?o.createElement(eF,Object.assign({},e,{strokeColor:E,prefixCls:x,steps:c}),k):o.createElement(eP,Object.assign({},e,{strokeColor:C,prefixCls:x,direction:w}),k):("circle"===m||"dashboard"===m)&&(r=o.createElement(ej,Object.assign({},e,{strokeColor:C,prefixCls:x,progressStatus:b}),k));let Z=i()(x,{[`${x}-inline-circle`]:"circle"===m&&eI(u,"circle")[0]<=20,[`${x}-${"dashboard"===m&&"circle"||c&&"steps"||m}`]:!0,[`${x}-status-${b}`]:!0,[`${x}-show-info`]:p,[`${x}-${u}`]:"string"==typeof u,[`${x}-rtl`]:"rtl"===w},a,l,S);return $(o.createElement("div",Object.assign({ref:t,className:Z,role:"progressbar","aria-valuenow":v},(0,ep.Z)(g,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),r))}),eY=o.forwardRef((e,t)=>{var r,n;let{prefixCls:a,className:l,style:c,locale:s,listType:d,file:u,items:p,progress:m,iconRender:h,actionIconRender:f,itemRender:g,isImgUrl:v,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:w,previewIcon:x,removeIcon:$,downloadIcon:S,onPreview:k,onDownload:C,onClose:E}=e,{status:Z}=u,[O,z]=o.useState(Z);o.useEffect(()=>{"removed"!==Z&&z(Z)},[Z]);let[T,D]=o.useState(!1),R=o.useRef(null);o.useEffect(()=>(R.current=setTimeout(()=>{D(!0)},300),()=>{R.current&&clearTimeout(R.current)}),[]);let j=h(u),H=o.createElement("div",{className:`${a}-icon`},j);if("picture"===d||"picture-card"===d||"picture-circle"===d){if("uploading"!==O&&(u.thumbUrl||u.url)){let e=(null==v?void 0:v(u))?o.createElement("img",{src:u.thumbUrl||u.url,alt:u.name,className:`${a}-list-item-image`,crossOrigin:u.crossOrigin}):j,t=i()({[`${a}-list-item-thumbnail`]:!0,[`${a}-list-item-file`]:v&&!v(u)});H=o.createElement("a",{className:t,onClick:e=>k(u,e),href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer"},e)}else{let e=i()({[`${a}-list-item-thumbnail`]:!0,[`${a}-list-item-file`]:"uploading"!==O});H=o.createElement("div",{className:e},j)}}let N=i()(`${a}-list-item`,`${a}-list-item-${O}`),M="string"==typeof u.linkProps?JSON.parse(u.linkProps):u.linkProps,P=y?f(("function"==typeof $?$(u):$)||o.createElement(eo,null),()=>E(u),a,s.removeFile):null,F=w&&"done"===O?f(("function"==typeof S?S(u):S)||o.createElement(ea,null),()=>C(u),a,s.downloadFile):null,B="picture-card"!==d&&"picture-circle"!==d&&o.createElement("span",{key:"download-delete",className:i()(`${a}-list-item-actions`,{picture:"picture"===d})},F,P),W=i()(`${a}-list-item-name`),L=u.url?[o.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:W,title:u.name},M,{href:u.url,onClick:e=>k(u,e)}),u.name),B]:[o.createElement("span",{key:"view",className:W,onClick:e=>k(u,e),title:u.name},u.name),B],A=b?o.createElement("a",{href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:u.url||u.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:e=>k(u,e),title:s.previewFile},"function"==typeof x?x(u):x||o.createElement(el,null)):null,X=("picture-card"===d||"picture-circle"===d)&&"uploading"!==O&&o.createElement("span",{className:`${a}-list-item-actions`},A,"done"===O&&F,P),{getPrefixCls:V}=o.useContext(I.E_),U=V(),q=o.createElement("div",{className:N},H,L,X,T&&o.createElement(_.ZP,{motionName:`${U}-fade`,visible:"uploading"===O,motionDeadline:2e3},e=>{let{className:t}=e,r="percent"in u?o.createElement(eQ,Object.assign({},m,{type:"line",percent:u.percent,"aria-label":u["aria-label"],"aria-labelledby":u["aria-labelledby"]})):null;return o.createElement("div",{className:i()(`${a}-list-item-progress`,t)},r)})),J=u.response&&"string"==typeof u.response?u.response:(null===(r=u.error)||void 0===r?void 0:r.statusText)||(null===(n=u.error)||void 0===n?void 0:n.message)||s.uploadError,G="error"===O?o.createElement(eE.Z,{title:J,getPopupContainer:e=>e.parentNode},q):q;return o.createElement("div",{className:i()(`${a}-list-item-container`,l),style:c,ref:t},g?g(G,u,p,{download:C.bind(null,u),preview:k.bind(null,u),remove:E.bind(null,u)}):G)}),e0=o.forwardRef((e,t)=>{let{listType:r="text",previewFile:a=et,onPreview:l,onDownload:c,onRemove:s,locale:d,iconRender:u,isImageUrl:p=ee,prefixCls:m,items:h=[],showPreviewIcon:f=!0,showRemoveIcon:g=!0,showDownloadIcon:v=!1,removeIcon:b,previewIcon:y,downloadIcon:w,progress:x={size:[-1,2],showInfo:!1},appendAction:$,appendActionVisible:S=!0,itemRender:k,disabled:C}=e,E=(0,X.Z)(),[Z,O]=o.useState(!1);o.useEffect(()=>{("picture"===r||"picture-card"===r||"picture-circle"===r)&&(h||[]).forEach(e=>{"undefined"!=typeof document&&"undefined"!=typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",a&&a(e.originFileObj).then(t=>{e.thumbUrl=t||"",E()}))})},[r,h,a]),o.useEffect(()=>{O(!0)},[]);let z=(e,t)=>{if(l)return null==t||t.preventDefault(),l(e)},T=e=>{"function"==typeof c?c(e):e.url&&window.open(e.url)},D=e=>{null==s||s(e)},R=e=>{if(u)return u(e,r);let t="uploading"===e.status,n=p&&p(e)?o.createElement(A,null):o.createElement(P,null),a=t?o.createElement(F.Z,null):o.createElement(W,null);return"picture"===r?a=t?o.createElement(F.Z,null):n:("picture-card"===r||"picture-circle"===r)&&(a=t?d.uploading:n),a},j=(e,t,r,n)=>{let a={type:"text",size:"small",title:n,onClick:r=>{t(),(0,U.l$)(e)&&e.props.onClick&&e.props.onClick(r)},className:`${r}-list-item-action`,disabled:C};if((0,U.l$)(e)){let t=(0,U.Tm)(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}));return o.createElement(q.ZP,Object.assign({},a,{icon:t}))}return o.createElement(q.ZP,Object.assign({},a),o.createElement("span",null,e))};o.useImperativeHandle(t,()=>({handlePreview:z,handleDownload:T}));let{getPrefixCls:H}=o.useContext(I.E_),N=H("upload",m),M=H(),B=i()({[`${N}-list`]:!0,[`${N}-list-${r}`]:!0}),L=(0,n.Z)(h.map(e=>({key:e.uid,file:e}))),J="picture-card"===r||"picture-circle"===r?"animate-inline":"animate",G={motionDeadline:2e3,motionName:`${N}-${J}`,keys:L,motionAppear:Z},K=o.useMemo(()=>{let e=Object.assign({},(0,V.ZP)(M));return delete e.onAppearEnd,delete e.onEnterEnd,delete e.onLeaveEnd,e},[M]);return"picture-card"!==r&&"picture-circle"!==r&&(G=Object.assign(Object.assign({},K),G)),o.createElement("div",{className:B},o.createElement(_.V4,Object.assign({},G,{component:!1}),e=>{let{key:t,file:n,className:a,style:i}=e;return o.createElement(eY,{key:t,locale:d,prefixCls:N,className:a,style:i,file:n,items:h,progress:x,listType:r,isImgUrl:p,showPreviewIcon:f,showRemoveIcon:g,showDownloadIcon:v,removeIcon:b,previewIcon:y,downloadIcon:w,iconRender:R,actionIconRender:j,itemRender:k,onPreview:z,onDownload:T,onClose:D})}),$&&o.createElement(_.ZP,Object.assign({},G,{visible:S,forceRender:!0}),e=>{let{className:t,style:r}=e;return(0,U.Tm)($,e=>({className:i()(e.className,t),style:Object.assign(Object.assign(Object.assign({},r),{pointerEvents:t?"none":void 0}),e.style)}))}))});var e1=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),e2=e=>{let{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${r},
+ p${t}-text,
+ p${t}-hint
+ `]:{color:e.colorTextDisabled}}}}}},e3=e=>{let{componentCls:t,antCls:r,iconCls:o,fontSize:n,lineHeight:a}=e,i=`${t}-list-item`,l=`${i}-actions`,c=`${i}-action`,s=Math.round(n*a);return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},(0,eA.dF)()),{lineHeight:e.lineHeight,[i]:{position:"relative",height:e.lineHeight*n,marginTop:e.marginXS,fontSize:n,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${i}-name`]:Object.assign(Object.assign({},eA.vS),{padding:`0 ${e.paddingXS}px`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[l]:{[c]:{opacity:0},[`${c}${r}-btn-sm`]:{height:s,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
+ ${c}:focus,
+ &.picture ${c}
+ `]:{opacity:1},[o]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:n},[`${i}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:n+e.paddingXS,fontSize:n,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${i}:hover ${c}`]:{opacity:1,color:e.colorText},[`${i}-error`]:{color:e.colorError,[`${i}-name, ${t}-icon ${o}`]:{color:e.colorError},[l]:{[`${o}, ${o}:hover`]:{color:e.colorError},[c]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}};let e6=new eB.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),e4=new eB.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var e8=e=>{let{componentCls:t}=e,r=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${r}-appear, ${r}-enter, ${r}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${r}-appear, ${r}-enter`]:{animationName:e6},[`${r}-leave`]:{animationName:e4}}},e6,e4]},e7=r(57389);let e5=e=>{let{componentCls:t,iconCls:r,uploadThumbnailSize:o,uploadProgressOffset:n}=e,a=`${t}-list`,i=`${a}-item`;return{[`${t}-wrapper`]:{[`
+ ${a}${a}-picture,
+ ${a}${a}-picture-card,
+ ${a}${a}-picture-circle
+ `]:{[i]:{position:"relative",height:o+2*e.lineWidth+2*e.paddingXS,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:Object.assign(Object.assign({},eA.vS),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:n,width:`calc(100% - ${2*e.paddingSM}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${r}`]:{[`svg path[fill='${eZ.iN[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${eZ.iN.primary}']`]:{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:n}}},[`${a}${a}-picture-circle ${i}`]:{[`&, &::before, ${i}-thumbnail`]:{borderRadius:"50%"}}}}},e9=e=>{let{componentCls:t,iconCls:r,fontSizeLG:o,colorTextLightSolid:n}=e,a=`${t}-list`,i=`${a}-item`,l=e.uploadPicCardSize;return{[`
+ ${t}-wrapper${t}-picture-card-wrapper,
+ ${t}-wrapper${t}-picture-circle-wrapper
+ `]:Object.assign(Object.assign({},(0,eA.dF)()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:l,height:l,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card, ${a}${a}-picture-circle`]:{[`${a}-item-container`]:{display:"inline-block",width:l,height:l,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${2*e.paddingXS}px)`,height:`calc(100% - ${2*e.paddingXS}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${r}-eye, ${r}-download, ${r}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${i}-actions, ${i}-actions:hover`]:{[`${r}-eye, ${r}-download, ${r}-delete`]:{color:new e7.C(n).setAlpha(.65).toRgbString(),"&:hover":{color:n}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"center"},[`${i}-file + ${i}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${2*e.paddingXS}px)`},[`${i}-uploading`]:{[`&${i}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:"none"}},[`${i}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${2*e.paddingXS}px)`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}};var te=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}};let tt=e=>{let{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,eA.Wf)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:r,cursor:"not-allowed"}})}};var tr=(0,eW.Z)("Upload",e=>{let{fontSizeHeading3:t,fontSize:r,lineHeight:o,lineWidth:n,controlHeightLG:a}=e,i=(0,eL.TS)(e,{uploadThumbnailSize:2*t,uploadProgressOffset:Math.round(r*o)/2+n,uploadPicCardSize:2.55*a});return[tt(i),e2(i),e5(i),e9(i),e3(i),e8(i),te(i),e1(i)]},e=>({actionsColor:e.colorTextDescription}));let to=`__LIST_IGNORE_${Date.now()}__`,tn=o.forwardRef((e,t)=>{var r;let{fileList:a,defaultFileList:l,onRemove:c,showUploadList:s=!0,listType:d="text",onPreview:u,onDownload:p,onChange:m,onDrop:h,previewFile:f,disabled:g,locale:v,iconRender:b,isImageUrl:y,progress:w,prefixCls:x,className:$,type:S="select",children:k,style:C,itemRender:E,maxCount:Z,data:O={},multiple:N=!1,action:M="",accept:P="",supportServerRender:F=!0}=e,B=o.useContext(R.Z),W=null!=g?g:B,[L,A]=(0,T.Z)(l||[],{value:a,postState:e=>null!=e?e:[]}),[_,X]=o.useState("drop"),V=o.useRef(null);o.useMemo(()=>{let e=Date.now();(a||[]).forEach((t,r)=>{t.uid||Object.isFrozen(t)||(t.uid=`__AUTO__${e}_${r}__`)})},[a]);let U=(e,t,r)=>{let o=(0,n.Z)(t),a=!1;1===Z?o=o.slice(-1):Z&&(a=!0,o=o.slice(0,Z)),(0,D.flushSync)(()=>{A(o)});let i={file:e,fileList:o};r&&(i.event=r),(!a||o.some(t=>t.uid===e.uid))&&(0,D.flushSync)(()=>{null==m||m(i)})},q=e=>{let t=e.filter(e=>!e.file[to]);if(!t.length)return;let r=t.map(e=>J(e.file)),o=(0,n.Z)(L);r.forEach(e=>{o=G(e,o)}),r.forEach((e,r)=>{let n=e;if(t[r].parsedFile)e.status="uploading";else{let t;let{originFileObj:r}=e;try{t=new File([r],r.name,{type:r.type})}catch(e){(t=new Blob([r],{type:r.type})).name=r.name,t.lastModifiedDate=new Date,t.lastModified=new Date().getTime()}t.uid=e.uid,n=t}U(n,o)})},Q=(e,t,r)=>{try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}if(!K(t,L))return;let o=J(t);o.status="done",o.percent=100,o.response=e,o.xhr=r;let n=G(o,L);U(o,n)},Y=(e,t)=>{if(!K(t,L))return;let r=J(t);r.status="uploading",r.percent=e.percent;let o=G(r,L);U(r,o,e)},ee=(e,t,r)=>{if(!K(r,L))return;let o=J(r);o.error=e,o.response=t,o.status="error";let n=G(o,L);U(o,n)},et=e=>{let t;Promise.resolve("function"==typeof c?c(e):c).then(r=>{var o;if(!1===r)return;let n=function(e,t){let r=void 0!==e.uid?"uid":"name",o=t.filter(t=>t[r]!==e[r]);return o.length===t.length?null:o}(e,L);n&&(t=Object.assign(Object.assign({},e),{status:"removed"}),null==L||L.forEach(e=>{let r=void 0!==t.uid?"uid":"name";e[r]!==t[r]||Object.isFrozen(e)||(e.status="removed")}),null===(o=V.current)||void 0===o||o.abort(t),U(t,n))})},er=e=>{X(e.type),"drop"===e.type&&(null==h||h(e))};o.useImperativeHandle(t,()=>({onBatchStart:q,onSuccess:Q,onProgress:Y,onError:ee,fileList:L,upload:V.current}));let{getPrefixCls:eo,direction:en}=o.useContext(I.E_),ea=eo("upload",x),ei=Object.assign(Object.assign({onBatchStart:q,onError:ee,onProgress:Y,onSuccess:Q},e),{data:O,multiple:N,action:M,accept:P,supportServerRender:F,prefixCls:ea,disabled:W,beforeUpload:(t,r)=>{var o,n,a,i;return o=void 0,n=void 0,a=void 0,i=function*(){let{beforeUpload:o,transformFile:n}=e,a=t;if(o){let e=yield o(t,r);if(!1===e)return!1;if(delete t[to],e===to)return Object.defineProperty(t,to,{value:!0,configurable:!0}),!1;"object"==typeof e&&e&&(a=e)}return n&&(a=yield n(a)),a},new(a||(a=Promise))(function(e,t){function r(e){try{c(i.next(e))}catch(e){t(e)}}function l(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var o;t.done?e(t.value):((o=t.value)instanceof a?o:new a(function(e){e(o)})).then(r,l)}c((i=i.apply(o,n||[])).next())})},onChange:void 0});delete ei.className,delete ei.style,(!k||W)&&delete ei.id;let[el,ec]=tr(ea),[es]=(0,j.Z)("Upload",H.Z.Upload),{showRemoveIcon:ed,showPreviewIcon:eu,showDownloadIcon:ep,removeIcon:em,previewIcon:eh,downloadIcon:ef}="boolean"==typeof s?{}:s,eg=(e,t)=>s?o.createElement(e0,{prefixCls:ea,listType:d,items:L,previewFile:f,onPreview:u,onDownload:p,onRemove:et,showRemoveIcon:!W&&ed,showPreviewIcon:eu,showDownloadIcon:ep,removeIcon:em,previewIcon:eh,downloadIcon:ef,iconRender:b,locale:Object.assign(Object.assign({},es),v),isImageUrl:y,progress:w,appendAction:e,appendActionVisible:t,itemRender:E,disabled:W}):e,ev={[`${ea}-rtl`]:"rtl"===en};if("drag"===S){let e=i()(ea,{[`${ea}-drag`]:!0,[`${ea}-drag-uploading`]:L.some(e=>"uploading"===e.status),[`${ea}-drag-hover`]:"dragover"===_,[`${ea}-disabled`]:W,[`${ea}-rtl`]:"rtl"===en},ec);return el(o.createElement("span",{className:i()(`${ea}-wrapper`,ev,$,ec)},o.createElement("div",{className:e,onDrop:er,onDragOver:er,onDragLeave:er,style:C},o.createElement(z,Object.assign({},ei,{ref:V,className:`${ea}-btn`}),o.createElement("div",{className:`${ea}-drag-container`},k))),eg()))}let eb=i()(ea,`${ea}-select`,{[`${ea}-disabled`]:W}),ey=(r=k?void 0:{display:"none"},o.createElement("div",{className:eb,style:r},o.createElement(z,Object.assign({},ei,{ref:V}))));return el("picture-card"===d||"picture-circle"===d?o.createElement("span",{className:i()(`${ea}-wrapper`,{[`${ea}-picture-card-wrapper`]:"picture-card"===d,[`${ea}-picture-circle-wrapper`]:"picture-circle"===d},ev,$,ec)},eg(ey,!!k)):o.createElement("span",{className:i()(`${ea}-wrapper`,ev,$,ec)},ey,eg()))});var ta=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let ti=o.forwardRef((e,t)=>{var{style:r,height:n}=e,a=ta(e,["style","height"]);return o.createElement(tn,Object.assign({ref:t},a,{type:"drag",style:Object.assign(Object.assign({},r),{height:n})}))});tn.Dragger=ti,tn.LIST_IGNORE=to;var tl=tn}}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/app/chat/page-5cbaa4028c70970e.js b/pilot/server/static/_next/static/chunks/app/chat/page-5cbaa4028c70970e.js
new file mode 100644
index 000000000..6e9f17af0
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/app/chat/page-5cbaa4028c70970e.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[929],{86066:function(e,l,t){Promise.resolve().then(t.bind(t,65641))},65641:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return X}});var n=t(9268),i=t(86006),a=t(91440),s=t(90022),r=t(69962),o=t(97287),d=t(73141),c=t(45642),u=t(8997),h=t(22046),x=t(83192),v=t(90545),p=t(89081),f=t(78915),m=t(71990),j=e=>{let l=(0,i.useReducer)((e,l)=>({...e,...l}),{...e});return l},b=t(57931),g=t(56008),y=t(21628),_=t(52040),w=e=>{let{queryAgentURL:l,channel:t,queryBody:n,initHistory:a,runHistoryList:s}=e,[r,o]=j({history:a||[]}),d=(0,g.useSearchParams)(),c=d.get("id"),{refreshDialogList:u}=(0,b.Cg)(),h=new AbortController;(0,i.useEffect)(()=>{a&&o({history:a})},[a]);let x=async(e,i)=>{if(!e)return;let a=[...r.history,{role:"human",context:e}],s=a.length;o({history:a});let d={conv_uid:c,...i,...n,user_input:e,channel:t};if(!(null==d?void 0:d.conv_uid)){y.ZP.error("conv_uid 不存在,请刷新后重试");return}try{await (0,m.L)("".concat(_.env.API_BASE_URL?_.env.API_BASE_URL:"").concat("/api"+l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d),signal:h.signal,async onopen(e){if(a.length<=1){var l;u();let e=new URLSearchParams(window.location.search);e.delete("initMessage"),null===(l=window.history)||void 0===l||l.replaceState(null,null,"?".concat(e.toString()))}(!e.ok||e.headers.get("content-type")!==m.a)&&e.status>=400&&e.status<500&&429!==e.status&&e.status},onclose(){console.log("onclose")},onerror(e){throw console.log("onerror"),Error(e)},onmessage:e=>{var l,t,n;if(e.data=null===(l=e.data)||void 0===l?void 0:l.replaceAll("\\n","\n"),"[DONE]"===e.data);else if(null===(t=e.data)||void 0===t?void 0:t.startsWith("[ERROR]"))o({history:[...a,{role:"view",context:null===(n=e.data)||void 0===n?void 0:n.replace("[ERROR]","")}]});else{let l=[...a];e.data&&((null==l?void 0:l[s])?l[s].context="".concat(e.data):l.push({role:"view",context:e.data}),o({history:l}))}}})}catch(e){console.log(e),o({history:[...a,{role:"view",context:"请求出错"}]})}};return{handleChatSubmit:x,history:r.history}},Z=t(67830),N=t(54842),P=t(80937),S=t(311),C=t(94244),k=t(12025),E=t(46571),D=t(53113),R=t(35086),O=t(53047),L=t(81528),B=t(30530),I=t(64747),T=t(77614),A=t(19700),z=t(92391),F=t(55749),V=t(70781),q=t(75403),J=t(99398),M=t(49064),U=t(84835),W=t.n(U),H=t(15241),G=t(28179);let K=z.z.object({query:z.z.string().min(1)});var Y=e=>{var l;let{messages:a,onSubmit:r,readOnly:o,paramsList:d,runParamsList:c,dbList:u,runDbList:h,supportTypes:p,clearIntialMessage:m,setChartsData:j}=e,b=(0,g.useSearchParams)(),_=b.get("initMessage"),w=b.get("spaceNameOriginal"),z=b.get("scene"),U="chat_dashboard"===z,Y=(0,i.useRef)(null),[Q,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(),[el,et]=(0,i.useState)(!1),[en,ei]=(0,i.useState)(),[ea,es]=(0,i.useState)(a),[er,eo]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(!1),[eu,eh]=(0,i.useState)(u),ex=(e,l,t)=>{let n=W().cloneDeep(eu);n&&(void 0===(null==eu?void 0:eu[e])&&(n[e]={}),n[e][l]=t,eh(n))},ev=(0,A.cI)({resolver:(0,Z.F)(K),defaultValues:{}}),ep=async e=>{let{query:l}=e;try{X(!0),ev.reset(),await r(l,{select_param:null==d?void 0:d[$]})}catch(e){}finally{X(!1)}},ef=async()=>{try{var e;let l=new URLSearchParams(window.location.search),t=l.get("initMessage");l.delete("initMessage"),null===(e=window.history)||void 0===e||e.replaceState(null,null,"?".concat(l.toString())),await ep({query:t})}catch(e){console.log(e)}finally{null==m||m()}},em={overrides:{code:e=>{let{children:l}=e;return(0,n.jsx)(J.Z,{language:"javascript",style:M.Z,children:l})}},wrapper:i.Fragment},ej=e=>{let l=e;try{l=JSON.parse(e)}catch(e){console.log(e)}return l},eb=i.useMemo(()=>{if("function"==typeof(null==window?void 0:window.fetch)){let e=t(62631);return t(25204),t(82372),e.default}},[]);return i.useEffect(()=>{Y.current&&Y.current.scrollTo(0,Y.current.scrollHeight)},[null==a?void 0:a.length]),i.useEffect(()=>{_&&a.length<=0&&ef()},[_,a.length]),i.useEffect(()=>{var e,l;d&&(null===(e=Object.keys(d||{}))||void 0===e?void 0:e.length)>0&&ee(w||(null===(l=Object.keys(d||{}))||void 0===l?void 0:l[0]))},[d]),i.useEffect(()=>{if(U){let e=W().cloneDeep(a);e.forEach(e=>{(null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=ej(null==e?void 0:e.context))}),es(e.filter(e=>["view","human"].includes(e.role)))}else es(a.filter(e=>["view","human"].includes(e.role)))},[U,a]),(0,i.useEffect)(()=>{let e=W().cloneDeep(u);null==e||e.forEach(e=>{let l=null==p?void 0:p.find(l=>l.db_type===e.db_type);e.isfileDb=null==l?void 0:l.is_file_db}),eh(e)},[u,p]),(0,n.jsxs)("div",{className:"w-full h-full",children:[(0,n.jsxs)(P.Z,{className:"w-full h-full bg-[#fefefe] dark:bg-[#212121]",sx:{table:{borderCollapse:"collapse",border:"1px solid #ccc",width:"100%"},"th, td":{border:"1px solid #ccc",padding:"10px",textAlign:"center"}},children:[(0,n.jsxs)(P.Z,{ref:Y,direction:"column",sx:{overflowY:"auto",maxHeight:"100%",flex:1},children:[null==ea?void 0:ea.map((e,l)=>{var t,i;return(0,n.jsx)(P.Z,{children:(0,n.jsx)(s.Z,{size:"sm",variant:"outlined",color:"view"===e.role?"primary":"neutral",sx:l=>({background:"view"===e.role?"var(--joy-palette-primary-softBg, var(--joy-palette-primary-100, #DDF1FF))":"unset",border:"unset",borderRadius:"unset",padding:"24px 0 26px 0",lineHeight:"24px"}),children:(0,n.jsxs)(v.Z,{sx:{width:"76%",margin:"0 auto"},className:"flex flex-row",children:[(0,n.jsx)("div",{className:"mr-3 inline",children:"view"===e.role?(0,n.jsx)(V.Z,{}):(0,n.jsx)(F.Z,{})}),(0,n.jsx)("div",{className:"inline align-middle mt-0.5 max-w-full flex-1 overflow-auto",children:U&&"view"===e.role&&"object"==typeof(null==e?void 0:e.context)?(0,n.jsxs)(n.Fragment,{children:["[".concat(e.context.template_name,"]: "),(0,n.jsx)(S.Z,{sx:{color:"#1677ff"},component:"button",onClick:()=>{et(!0),ei(l),eo(JSON.stringify(null==e?void 0:e.context,null,2))},children:e.context.template_introduce||"暂无介绍"})]}):(0,n.jsx)(n.Fragment,{children:"string"==typeof e.context&&(0,n.jsx)(q.Z,{options:em,children:null===(t=e.context)||void 0===t?void 0:null===(i=t.replaceAll)||void 0===i?void 0:i.call(t,"\\n","\n")})})})]})})},l)}),Q&&(0,n.jsx)(C.Z,{variant:"soft",color:"neutral",size:"sm",sx:{mx:"auto",my:2}})]}),!o&&(0,n.jsx)(v.Z,{className:"bg-[#fefefe] dark:bg-[#212121] before:bg-[#fefefe] before:dark:bg-[#212121]",sx:{position:"relative","&::before":{content:'" "',position:"absolute",top:"-18px",left:"0",right:"0",width:"100%",margin:"0 auto",height:"20px",filter:"blur(10px)",zIndex:2}},children:(0,n.jsxs)("form",{style:{maxWidth:"100%",width:"76%",position:"relative",display:"flex",marginTop:"auto",overflow:"visible",background:"none",justifyContent:"center",marginLeft:"auto",marginRight:"auto",flexDirection:"column",gap:"12px",paddingBottom:"58px",paddingTop:"20px"},onSubmit:e=>{e.stopPropagation(),ev.handleSubmit(ep)(e)},children:[(0,n.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[Object.keys(d||{}).length>0&&(0,n.jsx)("div",{className:"flex items-center gap-3",children:(0,n.jsx)(k.Z,{value:$,onChange:(e,l)=>{ee(l)},sx:{maxWidth:"100%"},children:null===(l=Object.keys(d||{}))||void 0===l?void 0:l.map(e=>(0,n.jsx)(E.Z,{value:e,children:e},e))})}),["chat_with_db_execute","chat_with_db_qa"].includes(z)&&(0,n.jsx)(D.Z,{"aria-label":"Like",variant:"plain",color:"neutral",sx:{padding:0,"&: hover":{backgroundColor:"unset"}},onClick:()=>{ec(!0)},children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,n.jsx)(G.Z,{style:{marginBottom:"0.125rem",fontSize:"28px"}}),(0,n.jsx)("span",{style:{display:"block",lineHeight:"25px",fontSize:12,marginLeft:6},children:"DB Connect Setting"})]})})]}),(0,n.jsx)(R.ZP,{className:"w-full h-12",variant:"outlined",endDecorator:(0,n.jsx)(O.ZP,{type:"submit",disabled:Q,children:(0,n.jsx)(N.Z,{})}),...ev.register("query")})]})})]}),(0,n.jsx)(L.Z,{open:el,onClose:()=>{et(!1)},children:(0,n.jsxs)(B.Z,{"aria-labelledby":"variant-modal-title","aria-describedby":"variant-modal-description",children:[(0,n.jsx)(I.Z,{}),(0,n.jsxs)(v.Z,{sx:{marginTop:"32px"},children:[!!eb&&(0,n.jsx)(eb,{mode:"json",value:er,height:"600px",width:"820px",onChange:eo,placeholder:"默认json数据",debounceChangePeriod:100,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,setOptions:{useWorker:!0,showLineNumbers:!0,highlightSelectedWord:!0,tabSize:2}}),(0,n.jsx)(D.Z,{variant:"outlined",className:"w-full",sx:{marginTop:"12px"},onClick:()=>{if(en)try{let e=W().cloneDeep(ea),l=JSON.parse(er);e[en].context=l,es(e),null==j||j(null==l?void 0:l.charts),et(!1),eo("")}catch(e){y.ZP.error("JSON 格式化出错")}},children:"Submit"})]})]})}),(0,n.jsx)(L.Z,{open:ed,onClose:()=>{ec(!1),null==c||c()},children:(0,n.jsxs)(B.Z,{children:[(0,n.jsx)(I.Z,{}),(0,n.jsxs)(x.Z,{children:[(0,n.jsx)("caption",{children:(0,n.jsx)("h3",{style:{fontWeight:"bold"},children:"数据库列表"})}),(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{style:{width:"140px"},children:"数据库类型"}),(0,n.jsx)("th",{style:{width:"130px"},children:"数据库名"}),(0,n.jsx)("th",{style:{width:"150px"},children:"链接地址/域名"}),(0,n.jsx)("th",{style:{width:"100px"},children:"端口"}),(0,n.jsx)("th",{style:{width:"140px"},children:"用户名"}),(0,n.jsx)("th",{style:{width:"140px"},children:"密码"}),(0,n.jsx)("th",{style:{width:"140px"},children:"备注"}),(0,n.jsx)("th",{style:{width:"140px"},children:"操作"})]})}),(0,n.jsxs)("tbody",{children:[null==eu?void 0:eu.map((e,l)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(0,n.jsx)(k.Z,{defaultValue:null==e?void 0:e.db_type,onChange:(e,t)=>{let n=null==p?void 0:p.find(e=>e.db_type===t),i=W().cloneDeep(eu);i[l].db_type=t,i[l].isfileDb=null==n?void 0:n.is_file_db,n?(i[l].db_host="",i[l].db_port=""):i[l].db_path="",eh(i)},children:null==p?void 0:p.map(e=>(0,n.jsx)(E.Z,{value:e.db_type,children:null==e?void 0:e.db_type},e.db_type))}):(0,n.jsx)(H.Z,{title:null==e?void 0:e.db_type,children:null==e?void 0:e.db_type})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isNew)?(0,n.jsx)(R.ZP,{value:null==e?void 0:e.db_name,onChange:e=>{ex(l,"db_name",e.target.value)}}):(0,n.jsx)(H.Z,{title:null==e?void 0:e.db_name,children:null==e?void 0:e.db_name})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(0,n.jsx)(R.ZP,{value:(null==e?void 0:e.isfileDb)?null==e?void 0:e.db_path:null==e?void 0:e.db_host,onChange:t=>{(null==e?void 0:e.isfileDb)?ex(l,"db_path",t.target.value):ex(l,"db_host",t.target.value)}}):(0,n.jsx)(H.Z,{title:(null==e?void 0:e.isfileDb)?null==e?void 0:e.db_path:null==e?void 0:e.db_host,children:(null==e?void 0:e.isfileDb)?null==e?void 0:e.db_path:null==e?void 0:e.db_host})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(null==e?void 0:e.isfileDb)?"-":(0,n.jsx)(R.ZP,{value:null==e?void 0:e.db_port,onChange:e=>{ex(l,"db_port",e.target.value)}}):(0,n.jsx)(H.Z,{title:null==e?void 0:e.db_port,children:null==e?void 0:e.db_port})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(0,n.jsx)(R.ZP,{defaultValue:e.db_user,onChange:e=>{ex(l,"db_user",e.target.value)}}):(0,n.jsx)(H.Z,{title:null==e?void 0:e.db_user,children:null==e?void 0:e.db_user})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(0,n.jsx)(R.ZP,{defaultValue:e.db_pwd,type:"password",onChange:e=>{ex(l,"db_pwd",e.target.value)}}):(0,n.jsx)(n.Fragment,{children:"******"})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isEdit)?(0,n.jsx)(R.ZP,{defaultValue:null==e?void 0:e.comment,onChange:e=>{ex(l,"comment",e.target.value)}}):(0,n.jsx)(H.Z,{title:null==e?void 0:e.comment,children:null==e?void 0:e.comment})}),(0,n.jsx)("td",{children:(0,n.jsxs)(v.Z,{sx:{gap:1,["& .".concat(T.Z.root)]:{padding:0,"&:hover":{background:"transparent"}}},children:[(null==e?void 0:e.isEdit)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D.Z,{size:"sm",variant:"plain",color:"neutral",sx:{marginRight:"8px"},onClick:async()=>{let l=W().cloneDeep(e),t={db_type:null==l?void 0:l.db_type,db_name:null==l?void 0:l.db_name,file_path:(null==l?void 0:l.isfileDb)?null==l?void 0:l.db_path:void 0,db_host:(null==l?void 0:l.isfileDb)?void 0:null==l?void 0:l.db_host,db_port:(null==l?void 0:l.isfileDb)?void 0:null==l?void 0:l.db_port,db_user:null==l?void 0:l.db_user,db_pwd:null==l?void 0:l.db_pwd,comment:null==l?void 0:l.comment};if(l.isNew){let e=null==u?void 0:u.map(e=>null==e?void 0:e.db_name);if(null==e?void 0:e.includes(null==l?void 0:l.db_name)){y.ZP.error("该数据库名称已存在");return}await (0,f.PR)("/api/v1/chat/db/add",t)}else await (0,f.PR)("/api/v1/chat/db/edit",t);await (null==h?void 0:h())},children:"保存"}),(0,n.jsx)(D.Z,{size:"sm",variant:"plain",color:"neutral",sx:{marginRight:"8px"},onClick:()=>{let t=W().cloneDeep(eu);(null==e?void 0:e.isNew)?t.splice(l,1):(t[l].isEdit=!1,t[l]=null==u?void 0:u[l]),eh(t)},children:"取消"})]}):(0,n.jsx)(D.Z,{size:"sm",variant:"plain",color:"neutral",sx:{marginRight:"8px"},onClick:()=>{let e=W().cloneDeep(eu);e[l].isEdit=!0,eh(e)},children:"编辑"}),(0,n.jsx)(D.Z,{size:"sm",variant:"soft",color:"danger",onClick:async()=>{(null==e?void 0:e.db_name)&&(await (0,f.PR)("/api/v1/chat/db/delete?db_name=".concat(null==e?void 0:e.db_name)),await (null==h?void 0:h()))},children:"删除"})]})})]},l)),(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:8,children:(0,n.jsx)(D.Z,{variant:"outlined",sx:{width:"100%"},onClick:()=>{let e=W().cloneDeep(eu);null==e||e.push({isEdit:!0,isNew:!0,db_name:""}),eh(e)},children:"+ 新增一行"})})})]})]})]})})]})};let Q=()=>(0,n.jsxs)(s.Z,{className:"h-full w-full flex bg-transparent",children:[(0,n.jsx)(r.Z,{animation:"wave",variant:"text",level:"body2"}),(0,n.jsx)(r.Z,{animation:"wave",variant:"text",level:"body2"}),(0,n.jsx)(o.Z,{ratio:"21/9",className:"flex-1",sx:{["& .".concat(d.Z.content)]:{height:"100%"}},children:(0,n.jsx)(r.Z,{variant:"overlay",className:"h-full"})})]});var X=()=>{let[e,l]=(0,i.useState)();i.useRef(null);let[t,r]=i.useState(!1),o=(0,g.useSearchParams)(),{refreshDialogList:d}=(0,b.Cg)(),m=o.get("id"),j=o.get("scene"),{data:y,run:_}=(0,p.Z)(async()=>await (0,f.Tk)("/v1/chat/dialogue/messages/history",{con_uid:m}),{ready:!!m,refreshDeps:[m]}),{data:Z,run:N}=(0,p.Z)(async()=>await (0,f.Tk)("/v1/chat/db/list"),{ready:!!j&&!!["chat_with_db_execute","chat_with_db_qa"].includes(j)}),{data:P}=(0,p.Z)(async()=>await (0,f.Tk)("/v1/chat/db/support/type"),{ready:!!j&&!!["chat_with_db_execute","chat_with_db_qa"].includes(j)}),{data:S,run:C}=(0,p.Z)(async()=>await (0,f.Kw)("/v1/chat/mode/params/list?chat_mode=".concat(j)),{ready:!!j,refreshDeps:[m,j]}),{history:k,handleChatSubmit:E}=w({queryAgentURL:"/v1/chat/completions",queryBody:{conv_uid:m,chat_mode:j||"chat_normal"},initHistory:null==y?void 0:y.data,runHistoryList:_});(0,i.useEffect)(()=>{try{var e;let t=null==k?void 0:null===(e=k[k.length-1])||void 0===e?void 0:e.context,n=JSON.parse(t);l((null==n?void 0:n.template_name)==="report"?null==n?void 0:n.charts:void 0)}catch(e){l(void 0)}},[k]);let D=(0,i.useMemo)(()=>{if(e){let l=[],t=null==e?void 0:e.filter(e=>"IndicatorValue"===e.chart_type);t.length>0&&l.push({rowIndex:l.length,cols:t,type:"IndicatorValue"});let n=null==e?void 0:e.filter(e=>"IndicatorValue"!==e.chart_type),i=n.length,a=0;return[[0],[1],[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]][i].forEach(e=>{if(e>0){let t=n.slice(a,a+e);a+=e,l.push({rowIndex:l.length,cols:t})}}),l}},[e]);return(0,n.jsxs)(c.Z,{container:!0,spacing:2,className:"h-full",sx:{flexGrow:1},children:[e&&(0,n.jsx)(c.Z,{xs:8,className:"max-h-full",children:(0,n.jsx)("div",{className:"flex flex-col gap-3 h-full",children:null==D?void 0:D.map(e=>(0,n.jsx)("div",{className:"".concat((null==e?void 0:e.type)!=="IndicatorValue"?"flex flex-1 gap-3 overflow-hidden":""),children:e.cols.map(e=>{if("IndicatorValue"===e.chart_type)return(0,n.jsx)("div",{className:"flex flex-row gap-3",children:e.values.map(e=>(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(s.Z,{sx:{background:"transparent"},children:(0,n.jsxs)(u.Z,{className:"justify-around",children:[(0,n.jsx)(h.ZP,{gutterBottom:!0,component:"div",children:e.name}),(0,n.jsx)(h.ZP,{children:e.value})]})})},e.name))},e.chart_uid);if("LineChart"===e.chart_type)return(0,n.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,n.jsx)(s.Z,{className:"h-full",sx:{background:"transparent"},children:(0,n.jsxs)(u.Z,{className:"h-full",children:[(0,n.jsx)(h.ZP,{gutterBottom:!0,component:"div",children:e.chart_name}),(0,n.jsx)(h.ZP,{gutterBottom:!0,level:"body3",children:e.chart_desc}),(0,n.jsx)("div",{className:"flex-1 h-full",children:(0,n.jsx)(a.Chart,{padding:[10,20,50,40],autoFit:!0,data:e.values,children:(0,n.jsx)(a.LineAdvance,{shape:"smooth",point:!0,area:!0,position:"name*value",color:"type"})})})]})})},e.chart_uid);if("BarChart"===e.chart_type)return(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(s.Z,{className:"h-full",sx:{background:"transparent"},children:(0,n.jsxs)(u.Z,{className:"h-full",children:[(0,n.jsx)(h.ZP,{gutterBottom:!0,component:"div",children:e.chart_name}),(0,n.jsx)(h.ZP,{gutterBottom:!0,level:"body3",children:e.chart_desc}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsxs)(a.Chart,{autoFit:!0,data:e.values,children:[(0,n.jsx)(a.Interval,{position:"name*value",style:{lineWidth:3,stroke:(0,a.getTheme)().colors10[0]}}),(0,n.jsx)(a.Tooltip,{shared:!0})]})})]})})},e.chart_uid);if("Table"===e.chart_type){var l,t;let i=W().groupBy(e.values,"type");return(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(s.Z,{className:"h-full overflow-auto",sx:{background:"transparent"},children:(0,n.jsxs)(u.Z,{className:"h-full",children:[(0,n.jsx)(h.ZP,{gutterBottom:!0,component:"div",children:e.chart_name}),(0,n.jsx)(h.ZP,{gutterBottom:!0,level:"body3",children:e.chart_desc}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsxs)(x.Z,{"aria-label":"basic table",stripe:"odd",hoverRow:!0,borderAxis:"bothBetween",children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{children:Object.keys(i).map(e=>(0,n.jsx)("th",{children:e},e))})}),(0,n.jsx)("tbody",{children:null===(l=Object.values(i))||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.map((e,l)=>{var t;return(0,n.jsx)("tr",{children:null===(t=Object.keys(i))||void 0===t?void 0:t.map(e=>{var t;return(0,n.jsx)("td",{children:(null==i?void 0:null===(t=i[e])||void 0===t?void 0:t[l].value)||""},e)})},l)})})]})})]})})},e.chart_uid)}})},e.rowIndex))})}),!e&&"chat_dashboard"===j&&(0,n.jsx)(c.Z,{xs:8,className:"max-h-full p-6",children:(0,n.jsx)("div",{className:"flex flex-col gap-3 h-full",children:(0,n.jsxs)(c.Z,{container:!0,spacing:2,sx:{flexGrow:1},children:[(0,n.jsx)(c.Z,{xs:8,children:(0,n.jsx)(v.Z,{className:"h-full w-full",sx:{display:"flex",gap:2},children:(0,n.jsx)(Q,{})})}),(0,n.jsx)(c.Z,{xs:4,children:(0,n.jsx)(Q,{})}),(0,n.jsx)(c.Z,{xs:4,children:(0,n.jsx)(Q,{})}),(0,n.jsx)(c.Z,{xs:8,children:(0,n.jsx)(Q,{})})]})})}),(0,n.jsx)(c.Z,{xs:"chat_dashboard"===j?4:12,className:"h-full max-h-full",children:(0,n.jsx)("div",{className:"h-full",style:{boxShadow:"chat_dashboard"===j?"0px 0px 9px 0px #c1c0c080":"unset"},children:(0,n.jsx)(Y,{clearIntialMessage:async()=>{await d()},dbList:null==Z?void 0:Z.data,runDbList:N,supportTypes:null==P?void 0:P.data,isChartChat:"chat_dashboard"===j,messages:k||[],onSubmit:E,paramsList:null==S?void 0:S.data,runParamsList:C,setChartsData:l})})})]})}},57931:function(e,l,t){"use strict";t.d(l,{ZP:function(){return d},Cg:function(){return r}});var n=t(9268),i=t(89081),a=t(78915),s=t(86006);let[r,o]=function(){let e=s.createContext(void 0);return[function(){let l=s.useContext(e);if(void 0===l)throw Error("useCtx must be inside a Provider with a value");return l},e.Provider]}();var d=e=>{let{children:l}=e,{run:t,data:s,refresh:r}=(0,i.Z)(async()=>await (0,a.Tk)("/v1/chat/dialogue/list"),{manual:!0});return(0,n.jsx)(o,{value:{dialogueList:s,queryDialogueList:t,refreshDialogList:r},children:l})}},78915:function(e,l,t){"use strict";t.d(l,{Tk:function(){return c},Kw:function(){return u},PR:function(){return h},Ej:function(){return x}});var n=t(21628),i=t(24214),a=t(52040);let s=i.Z.create({baseURL:a.env.API_BASE_URL});s.defaults.timeout=1e4,s.interceptors.response.use(e=>e.data,e=>Promise.reject(e));var r=t(84835);let o={"content-type":"application/json"},d=e=>{if(!(0,r.isPlainObject)(e))return JSON.stringify(e);let l={...e};for(let e in l){let t=l[e];"string"==typeof t&&(l[e]=t.trim())}return JSON.stringify(l)},c=(e,l)=>{if(l){let t=Object.keys(l).filter(e=>void 0!==l[e]&&""!==l[e]).map(e=>"".concat(e,"=").concat(l[e])).join("&");t&&(e+="?".concat(t))}return s.get("/api"+e,{headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},u=(e,l)=>{let t=d(l);return s.post("/api"+e,{body:t,headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},h=(e,l)=>(d(l),s.post(e,l,{headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})),x=(e,l)=>s.post(e,l).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})}},function(e){e.O(0,[180,757,282,838,60,759,192,86,316,790,767,259,751,320,253,769,744],function(){return e(e.s=86066)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/app/datastores/documents/page-7560757029bdf106.js b/pilot/server/static/_next/static/chunks/app/datastores/documents/page-7560757029bdf106.js
new file mode 100644
index 000000000..1be6ed74f
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/app/datastores/documents/page-7560757029bdf106.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[470],{78141:function(e,t,a){"use strict";var i=a(78997);t.Z=void 0;var r=i(a(76906)),n=a(9268),o=(0,r.default)((0,n.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"}),"Cached");t.Z=o},73220:function(e,t,a){"use strict";var i=a(78997);t.Z=void 0;var r=i(a(76906)),n=a(9268),o=(0,r.default)((0,n.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"}),"Chat");t.Z=o},4797:function(e,t,a){Promise.resolve().then(a.bind(a,16692))},16692:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return er}});var i=a(9268),r=a(56008),n=a(86006),o=a(50645),s=a(5737),l=a(78635),c=a(80937),d=a(44334),h=a(311),p=a(22046),u=a(53113),g=a(83192),m=a(46750),x=a(40431),v=a(89791),f=a(47562),C=a(46319),b=a(53832),j=a(49657),Z=a(88930),y=a(47093),P=a(18587);function w(e){return(0,P.d6)("MuiChip",e)}let S=(0,P.sI)("MuiChip",["root","clickable","colorPrimary","colorNeutral","colorDanger","colorInfo","colorSuccess","colorWarning","colorContext","disabled","endDecorator","focusVisible","label","labelSm","labelMd","labelLg","sizeSm","sizeMd","sizeLg","startDecorator","variantPlain","variantSolid","variantSoft","variantOutlined"]),_=n.createContext({disabled:void 0,variant:void 0,color:void 0});var z=a(326);let k=["children","className","color","onClick","disabled","size","variant","startDecorator","endDecorator","component","slots","slotProps"],R=e=>{let{disabled:t,size:a,color:i,clickable:r,variant:n,focusVisible:o}=e,s={root:["root",t&&"disabled",i&&`color${(0,b.Z)(i)}`,a&&`size${(0,b.Z)(a)}`,n&&`variant${(0,b.Z)(n)}`,r&&"clickable"],action:["action",t&&"disabled",o&&"focusVisible"],label:["label",a&&`label${(0,b.Z)(a)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,f.Z)(s,w,{})},D=(0,o.Z)("div",{name:"JoyChip",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var a,i,r,n;return[(0,x.Z)({"--Chip-decoratorChildOffset":"min(calc(var(--Chip-paddingInline) - (var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2), var(--Chip-paddingInline))","--Chip-decoratorChildRadius":"max(var(--_Chip-radius) - var(--variant-borderWidth, 0px) - var(--_Chip-paddingBlock), min(var(--_Chip-paddingBlock) + var(--variant-borderWidth, 0px), var(--_Chip-radius) / 2))","--Chip-deleteRadius":"var(--Chip-decoratorChildRadius)","--Chip-deleteSize":"var(--Chip-decoratorChildHeight)","--Avatar-radius":"var(--Chip-decoratorChildRadius)","--Avatar-size":"var(--Chip-decoratorChildHeight)","--Icon-margin":"initial","--unstable_actionRadius":"var(--_Chip-radius)"},"sm"===t.size&&{"--Chip-gap":"0.25rem","--Chip-paddingInline":"0.5rem","--Chip-decoratorChildHeight":"calc(min(1.125rem, var(--_Chip-minHeight)) - 2 * var(--variant-borderWidth, 0px))","--Icon-fontSize":"calc(var(--_Chip-minHeight) / 1.714)","--_Chip-minHeight":"var(--Chip-minHeight, 1.5rem)",fontSize:e.vars.fontSize.xs},"md"===t.size&&{"--Chip-gap":"0.375rem","--Chip-paddingInline":"0.75rem","--Chip-decoratorChildHeight":"min(1.375rem, var(--_Chip-minHeight))","--Icon-fontSize":"calc(var(--_Chip-minHeight) / 1.778)","--_Chip-minHeight":"var(--Chip-minHeight, 2rem)",fontSize:e.vars.fontSize.sm},"lg"===t.size&&{"--Chip-gap":"0.5rem","--Chip-paddingInline":"1rem","--Chip-decoratorChildHeight":"min(1.75rem, var(--_Chip-minHeight))","--Icon-fontSize":"calc(var(--_Chip-minHeight) / 2)","--_Chip-minHeight":"var(--Chip-minHeight, 2.5rem)",fontSize:e.vars.fontSize.md},{"--_Chip-radius":"var(--Chip-radius, 1.5rem)","--_Chip-paddingBlock":"max((var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2, 0px)",minHeight:"var(--_Chip-minHeight)",maxWidth:"max-content",paddingInline:"var(--Chip-paddingInline)",borderRadius:"var(--_Chip-radius)",position:"relative",fontWeight:e.vars.fontWeight.md,fontFamily:e.vars.fontFamily.body,display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",textDecoration:"none",verticalAlign:"middle",boxSizing:"border-box",[`&.${S.disabled}`]:{color:null==(a=e.variants[`${t.variant}Disabled`])||null==(a=a[t.color])?void 0:a.color}}),...t.clickable?[{"--variant-borderWidth":"0px",color:null==(n=e.variants[t.variant])||null==(n=n[t.color])?void 0:n.color}]:[null==(i=e.variants[t.variant])?void 0:i[t.color],{[`&.${S.disabled}`]:null==(r=e.variants[`${t.variant}Disabled`])?void 0:r[t.color]}]]}),I=(0,o.Z)("span",{name:"JoyChip",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>(0,x.Z)({display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",order:1,minInlineSize:0,flexGrow:1},e.clickable&&{zIndex:1,pointerEvents:"none"})),H=(0,o.Z)("button",{name:"JoyChip",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var a,i,r,n;return[{position:"absolute",zIndex:0,top:0,left:0,bottom:0,right:0,width:"100%",border:"none",cursor:"pointer",padding:"initial",margin:"initial",backgroundColor:"initial",textDecoration:"none",borderRadius:"inherit",[e.focus.selector]:e.focus.default},null==(a=e.variants[t.variant])?void 0:a[t.color],{"&:hover":null==(i=e.variants[`${t.variant}Hover`])?void 0:i[t.color]},{"&:active":null==(r=e.variants[`${t.variant}Active`])?void 0:r[t.color]},{[`&.${S.disabled}`]:null==(n=e.variants[`${t.variant}Disabled`])?void 0:n[t.color]}]}),N=(0,o.Z)("span",{name:"JoyChip",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Avatar-marginInlineStart":"calc(var(--Chip-decoratorChildOffset) * -1)","--Chip-deleteMargin":"0 0 0 calc(var(--Chip-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Chip-paddingInline) / -4)",display:"inherit",marginInlineEnd:"var(--Chip-gap)",order:0,zIndex:1,pointerEvents:"none"}),F=(0,o.Z)("span",{name:"JoyChip",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Chip-deleteMargin":"0 calc(var(--Chip-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Chip-paddingInline) / -4) 0 0",display:"inherit",marginInlineStart:"var(--Chip-gap)",order:2,zIndex:1,pointerEvents:"none"}),T=n.forwardRef(function(e,t){let a=(0,Z.Z)({props:e,name:"JoyChip"}),{children:r,className:o,color:s="primary",onClick:l,disabled:c=!1,size:d="md",variant:h="solid",startDecorator:p,endDecorator:u,component:g,slots:f={},slotProps:b={}}=a,P=(0,m.Z)(a,k),{getColor:w}=(0,y.VT)(h),S=w(e.color,s),T=!!l||!!b.action,O=(0,x.Z)({},a,{disabled:c,size:d,color:S,variant:h,clickable:T,focusVisible:!1}),E="function"==typeof b.action?b.action(O):b.action,M=n.useRef(null),{focusVisible:W,getRootProps:L}=(0,C.Z)((0,x.Z)({},E,{disabled:c,rootRef:M}));O.focusVisible=W;let A=R(O),U=(0,x.Z)({},P,{component:g,slots:f,slotProps:b}),[$,B]=(0,z.Z)("root",{ref:t,className:(0,v.Z)(A.root,o),elementType:D,externalForwardedProps:U,ownerState:O}),[V,J]=(0,z.Z)("label",{className:A.label,elementType:I,externalForwardedProps:U,ownerState:O}),Y=(0,j.Z)(J.id),[G,K]=(0,z.Z)("action",{className:A.action,elementType:H,externalForwardedProps:U,ownerState:O,getSlotProps:L,additionalProps:{"aria-labelledby":Y,as:null==E?void 0:E.component,onClick:l}}),[X,q]=(0,z.Z)("startDecorator",{className:A.startDecorator,elementType:N,externalForwardedProps:U,ownerState:O}),[Q,ee]=(0,z.Z)("endDecorator",{className:A.endDecorator,elementType:F,externalForwardedProps:U,ownerState:O}),et=n.useMemo(()=>({disabled:c,variant:h,color:"context"===S?void 0:S}),[S,c,h]);return(0,i.jsx)(_.Provider,{value:et,children:(0,i.jsxs)($,(0,x.Z)({},B,{children:[T&&(0,i.jsx)(G,(0,x.Z)({},K)),(0,i.jsx)(V,(0,x.Z)({},J,{id:Y,children:r})),p&&(0,i.jsx)(X,(0,x.Z)({},q,{children:p})),u&&(0,i.jsx)(Q,(0,x.Z)({},ee,{children:u}))]}))})});var O=a(81528),E=a(90545),M=a(35086),W=a(866),L=a(28086),A=a(65326),U=a.n(A),$=a(72474),B=a(59534),V=a(78141),J=a(68949),Y=a(73220),G=a(50157),K=a(23910),X=a(21628),q=a(1031),Q=a(78915);let{Dragger:ee}=G.default,et=(0,o.Z)(s.Z)(e=>{let{theme:t}=e;return{width:"50%",backgroundColor:"dark"===t.palette.mode?t.palette.background.level1:"#fff",...t.typography.body2,padding:t.spacing(1),textAlign:"center",borderRadius:4,color:t.vars.palette.text.secondary}}),ea=["Choose a Datasource type","Setup the Datasource"],ei=[{type:"text",title:"Text",subTitle:"Fill your raw text"},{type:"webPage",title:"URL",subTitle:"Fetch the content of a URL"},{type:"file",title:"Document",subTitle:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown"}];var er=()=>{let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("name"),{mode:a}=(0,l.tv)(),[o,m]=(0,n.useState)(!1),[x,v]=(0,n.useState)(0),[f,C]=(0,n.useState)(""),[b,j]=(0,n.useState)([]),[Z,y]=(0,n.useState)(""),[P,w]=(0,n.useState)(""),[S,_]=(0,n.useState)(""),[z,k]=(0,n.useState)(""),[R,D]=(0,n.useState)(null),[I,H]=(0,n.useState)(0),[N,F]=(0,n.useState)(0),[A,G]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{(async function(){let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:1,page_size:20});e.success&&(j(e.data.data),H(e.data.total),F(e.data.page))})()},[]),(0,i.jsxs)("div",{className:"p-4",children:[(0,i.jsxs)(c.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{marginBottom:"20px"},children:[(0,i.jsxs)(d.Z,{"aria-label":"breadcrumbs",children:[(0,i.jsx)(h.Z,{onClick:()=>{e.push("/datastores")},underline:"hover",color:"neutral",fontSize:"inherit",children:"Knowledge Space"},"Knowledge Space"),(0,i.jsx)(p.ZP,{fontSize:"inherit",children:"Documents"})]}),(0,i.jsxs)(c.Z,{direction:"row",alignItems:"center",children:[(0,i.jsxs)(u.Z,{variant:"outlined",onClick:async()=>{var a,i;let r=await (0,Q.PR)("/api/v1/chat/dialogue/new",{chat_mode:"chat_knowledge"});(null==r?void 0:r.success)&&(null==r?void 0:null===(a=r.data)||void 0===a?void 0:a.conv_uid)&&e.push("/chat?id=".concat(null==r?void 0:null===(i=r.data)||void 0===i?void 0:i.conv_uid,"&scene=chat_knowledge&spaceNameOriginal=").concat(t))},sx:{marginRight:"20px",backgroundColor:"rgb(39, 155, 255) !important",color:"white",border:"none"},children:[(0,i.jsx)(Y.Z,{sx:{marginRight:"6px",fontSize:"18px"}}),"Chat"]}),(0,i.jsx)(u.Z,{variant:"outlined",onClick:()=>m(!0),children:"+ Add Datasource"})]})]}),b.length?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(g.Z,{color:"primary",variant:"plain",size:"sm",sx:{"& tbody tr: hover":{backgroundColor:"light"===a?"rgb(246, 246, 246)":"rgb(33, 33, 40)"},"& tbody tr: hover a":{textDecoration:"underline"},"& tr > *:last-child":{textAlign:"right"}},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Name"}),(0,i.jsx)("th",{children:"Type"}),(0,i.jsx)("th",{children:"Size"}),(0,i.jsx)("th",{children:"Last Synch"}),(0,i.jsx)("th",{children:"Status"}),(0,i.jsx)("th",{children:"Result"}),(0,i.jsx)("th",{style:{width:"30%"},children:"Operation"})]})}),(0,i.jsx)("tbody",{children:b.map(a=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:a.doc_name}),(0,i.jsx)("td",{children:(0,i.jsx)(T,{size:"sm",variant:"solid",color:"neutral",sx:{opacity:.5},children:a.doc_type})}),(0,i.jsxs)("td",{children:[a.chunk_size," chunks"]}),(0,i.jsx)("td",{children:U()(a.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,i.jsx)("td",{children:(0,i.jsx)(T,{size:"sm",sx:{opacity:.5},variant:"solid",color:function(){switch(a.status){case"TODO":return"neutral";case"RUNNING":return"primary";case"FINISHED":return"success";case"FAILED":return"danger"}}(),children:a.status})}),(0,i.jsx)("td",{children:"TODO"===a.status||"RUNNING"===a.status?"":"FINISHED"===a.status?(0,i.jsx)(K.Z,{content:a.result,trigger:"hover",children:(0,i.jsx)(T,{size:"sm",variant:"solid",color:"success",sx:{opacity:.5},children:"SUCCESS"})}):(0,i.jsx)(K.Z,{content:a.result,trigger:"hover",children:(0,i.jsx)(T,{size:"sm",variant:"solid",color:"danger",sx:{opacity:.5},children:"FAILED"})})}),(0,i.jsx)("td",{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(u.Z,{variant:"outlined",size:"sm",sx:{marginRight:"2px"},onClick:async()=>{let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/sync"),{doc_ids:[a.id]});e.success?X.ZP.success("success"):X.ZP.error(e.err_msg||"failed")},children:["Synch",(0,i.jsx)(V.Z,{})]}),(0,i.jsx)(u.Z,{variant:"outlined",size:"sm",sx:{marginRight:"2px"},onClick:()=>{e.push("/datastores/documents/chunklist?spacename=".concat(t,"&documentid=").concat(a.id))},children:"Details"}),(0,i.jsxs)(u.Z,{variant:"outlined",size:"sm",color:"danger",onClick:async()=>{let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/delete"),{doc_name:a.doc_name});if(e.success){X.ZP.success("success");let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:N,page_size:20});e.success&&(j(e.data.data),H(e.data.total),F(e.data.page))}else X.ZP.error(e.err_msg||"failed")},children:["Delete",(0,i.jsx)(J.Z,{})]})]})})]},a.id))})]}),(0,i.jsx)(c.Z,{direction:"row",justifyContent:"flex-end",sx:{marginTop:"20px"},children:(0,i.jsx)(q.Z,{defaultPageSize:20,showSizeChanger:!1,current:N,total:I,onChange:async e=>{let a=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:e,page_size:20});a.success&&(j(a.data.data),H(a.data.total),F(a.data.page))},hideOnSinglePage:!0})})]}):(0,i.jsx)(i.Fragment,{}),(0,i.jsx)(O.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center","z-index":1e3},open:o,onClose:()=>m(!1),children:(0,i.jsxs)(s.Z,{variant:"outlined",sx:{width:800,borderRadius:"md",p:3,boxShadow:"lg"},children:[(0,i.jsx)(E.Z,{sx:{width:"100%"},children:(0,i.jsx)(c.Z,{spacing:2,direction:"row",children:ea.map((e,t)=>(0,i.jsxs)(et,{sx:{fontWeight:x===t?"bold":"",color:x===t?"#2AA3FF":""},children:[t(0,i.jsxs)(s.Z,{sx:{boxSizing:"border-box",height:"80px",padding:"12px",display:"flex",flexDirection:"column",justifyContent:"space-between",border:"1px solid gray",borderRadius:"6px",marginBottom:"20px",cursor:"pointer"},onClick:()=>{C(e.type),v(1)},children:[(0,i.jsx)(s.Z,{sx:{fontSize:"20px",fontWeight:"bold"},children:e.title}),(0,i.jsx)(s.Z,{children:e.subTitle})]},e.type))})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(E.Z,{sx:{margin:"30px auto"},children:["Name:",(0,i.jsx)(M.ZP,{placeholder:"Please input the name",onChange:e=>w(e.target.value),sx:{marginBottom:"20px"}}),"webPage"===f?(0,i.jsxs)(i.Fragment,{children:["Web Page URL:",(0,i.jsx)(M.ZP,{placeholder:"Please input the Web Page URL",onChange:e=>y(e.target.value)})]}):"file"===f?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ee,{name:"file",multiple:!1,onChange(e){var t;if(console.log(e),0===e.fileList.length){D(null),w("");return}D(e.file.originFileObj),w(null===(t=e.file.originFileObj)||void 0===t?void 0:t.name)},children:[(0,i.jsx)("p",{className:"ant-upload-drag-icon",children:(0,i.jsx)($.Z,{})}),(0,i.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:"Select or Drop file"}),(0,i.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})}):(0,i.jsxs)(i.Fragment,{children:["Text Source(Optional):",(0,i.jsx)(M.ZP,{placeholder:"Please input the text source",onChange:e=>_(e.target.value),sx:{marginBottom:"20px"}}),"Text:",(0,i.jsx)(W.Z,{onChange:e=>k(e.target.value),minRows:4,sx:{marginBottom:"20px"}})]}),(0,i.jsx)(p.ZP,{component:"label",sx:{marginTop:"20px"},endDecorator:(0,i.jsx)(L.Z,{checked:A,onChange:e=>G(e.target.checked)}),children:"Synch:"})]}),(0,i.jsxs)(c.Z,{direction:"row",justifyContent:"flex-start",alignItems:"center",sx:{marginBottom:"20px"},children:[(0,i.jsx)(u.Z,{variant:"outlined",sx:{marginRight:"20px"},onClick:()=>v(0),children:"< Back"}),(0,i.jsx)(u.Z,{variant:"outlined",onClick:async()=>{if(""===P){X.ZP.error("Please input the name");return}if("webPage"===f){if(""===Z){X.ZP.error("Please input the Web Page URL");return}let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/add"),{doc_name:P,content:Z,doc_type:"URL"});if(e.success&&A&&(0,Q.PR)("/knowledge/".concat(t,"/document/sync"),{doc_ids:[e.data]}),e.success){X.ZP.success("success"),m(!1);let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:N,page_size:20});e.success&&(j(e.data.data),H(e.data.total),F(e.data.page))}else X.ZP.error(e.err_msg||"failed")}else if("file"===f){if(!R){X.ZP.error("Please select a file");return}let e=new FormData;e.append("doc_name",P),e.append("doc_file",R),e.append("doc_type","DOCUMENT");let a=await (0,Q.Ej)("/knowledge/".concat(t,"/document/upload"),e);if(a.success&&A&&(0,Q.PR)("/knowledge/".concat(t,"/document/sync"),{doc_ids:[a.data]}),a.success){X.ZP.success("success"),m(!1);let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:N,page_size:20});e.success&&(j(e.data.data),H(e.data.total),F(e.data.page))}else X.ZP.error(a.err_msg||"failed")}else{if(""===z){X.ZP.error("Please input the text");return}let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/add"),{doc_name:P,source:S,content:z,doc_type:"TEXT"});if(e.success&&A&&(0,Q.PR)("/knowledge/".concat(t,"/document/sync"),{doc_ids:[e.data]}),e.success){X.ZP.success("success"),m(!1);let e=await (0,Q.PR)("/knowledge/".concat(t,"/document/list"),{page:N,page_size:20});e.success&&(j(e.data.data),H(e.data.total),F(e.data.page))}else X.ZP.error(e.err_msg||"failed")}},children:"Finish"})]})]})]})})]})}},78915:function(e,t,a){"use strict";a.d(t,{Tk:function(){return d},Kw:function(){return h},PR:function(){return p},Ej:function(){return u}});var i=a(21628),r=a(24214),n=a(52040);let o=r.Z.create({baseURL:n.env.API_BASE_URL});o.defaults.timeout=1e4,o.interceptors.response.use(e=>e.data,e=>Promise.reject(e));var s=a(84835);let l={"content-type":"application/json"},c=e=>{if(!(0,s.isPlainObject)(e))return JSON.stringify(e);let t={...e};for(let e in t){let a=t[e];"string"==typeof a&&(t[e]=a.trim())}return JSON.stringify(t)},d=(e,t)=>{if(t){let a=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");a&&(e+="?".concat(a))}return o.get("/api"+e,{headers:l}).then(e=>e).catch(e=>{i.ZP.error(e),Promise.reject(e)})},h=(e,t)=>{let a=c(t);return o.post("/api"+e,{body:a,headers:l}).then(e=>e).catch(e=>{i.ZP.error(e),Promise.reject(e)})},p=(e,t)=>(c(t),o.post(e,t,{headers:l}).then(e=>e).catch(e=>{i.ZP.error(e),Promise.reject(e)})),u=(e,t)=>o.post(e,t).then(e=>e).catch(e=>{i.ZP.error(e),Promise.reject(e)})}},function(e){e.O(0,[180,550,838,60,759,192,86,409,790,946,767,957,872,253,769,744],function(){return e(e.s=4797)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/app/datastores/page-e0ea3b47f190d00a.js b/pilot/server/static/_next/static/chunks/app/datastores/page-e0ea3b47f190d00a.js
new file mode 100644
index 000000000..1b53001d3
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/app/datastores/page-e0ea3b47f190d00a.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43],{66162:function(e,t,r){Promise.resolve().then(r.bind(r,44323))},44323:function(e,t,r){"use strict";r.r(t);var n=r(9268),s=r(56008),o=r(86006),i=r(72474),a=r(59534),l=r(29382),c=r(68949),x=r(74852),d=r(50157),p=r(21628),u=r(50645),h=r(5737),g=r(90545),m=r(80937),j=r(81528),f=r(35086),Z=r(53113),b=r(866),P=r(22046),w=r(28086),y=r(30530),k=r(50318),S=r(78915);let{Dragger:C}=d.default,F=(0,u.Z)(h.Z)(e=>{let{theme:t}=e;return{width:"33%",backgroundColor:"dark"===t.palette.mode?t.palette.background.level1:"#fff",...t.typography.body2,padding:t.spacing(1),textAlign:"center",borderRadius:4,color:t.vars.palette.text.secondary}}),v=["Knowledge Space Config","Choose a Datasource type","Setup the Datasource"],R=[{type:"text",title:"Text",subTitle:"Fill your raw text"},{type:"webPage",title:"URL",subTitle:"Fetch the content of a URL"},{type:"file",title:"Document",subTitle:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown"}];t.default=()=>{let e=(0,s.useRouter)(),[t,r]=(0,o.useState)(0),[d,u]=(0,o.useState)(""),[_,A]=(0,o.useState)([]),[N,T]=(0,o.useState)(!1),[B,E]=(0,o.useState)(""),[z,D]=(0,o.useState)(""),[O,W]=(0,o.useState)(""),[U,L]=(0,o.useState)(""),[G,I]=(0,o.useState)(""),[K,M]=(0,o.useState)(""),[J,V]=(0,o.useState)(""),[H,X]=(0,o.useState)(null),[Y,q]=(0,o.useState)(!0),[Q,$]=(0,o.useState)(!1),[ee,et]=(0,o.useState)({});return(0,o.useEffect)(()=>{(async function(){let e=await (0,S.PR)("/knowledge/space/list",{});e.success&&A(e.data)})()},[]),(0,n.jsxs)(g.Z,{sx:{width:"100%",height:"100%"},className:"bg-[#F1F2F5] dark:bg-[#212121]",children:[(0,n.jsx)(g.Z,{className:"page-body p-4",sx:{"&":{height:"90%",overflow:"auto"},"&::-webkit-scrollbar":{display:"none"}},children:(0,n.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",sx:{"& i":{width:"430px",marginRight:"30px"}},children:[(0,n.jsxs)(g.Z,{sx:{display:"flex",alignContent:"start",boxSizing:"content-box",width:"390px",height:"79px",padding:"33px 20px 40px",marginRight:"30px",marginBottom:"30px",fontSize:"18px",fontWeight:"bold",color:"black",flexShrink:0,flexGrow:0,cursor:"pointer",borderRadius:"16px","&: hover":{boxShadow:"0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);"}},onClick:()=>T(!0),className:"bg-[#E9EBEE] dark:bg-[#484848]",children:[(0,n.jsx)(g.Z,{sx:{width:"32px",height:"32px",lineHeight:"28px",border:"1px solid #2AA3FF",textAlign:"center",borderRadius:"5px",marginRight:"5px",fontWeight:"300",color:"#2AA3FF"},children:"+"}),(0,n.jsx)(g.Z,{sx:{fontSize:"16px"},children:"space"})]}),_.map((t,r)=>(0,n.jsxs)(g.Z,{sx:{position:"relative",padding:"30px 20px 40px",marginRight:"30px",marginBottom:"30px",borderTop:"4px solid rgb(84, 164, 248)",flexShrink:0,flexGrow:0,cursor:"pointer",borderRadius:"10px","&: hover":{boxShadow:"0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);"}},onClick:()=>{e.push("/datastores/documents?name=".concat(t.name))},className:"bg-[#FFFFFF] dark:bg-[#484848]",children:[(0,n.jsxs)(g.Z,{sx:{fontSize:"18px",marginBottom:"10px",fontWeight:"bold",color:"black"},children:[(0,n.jsx)(l.Z,{sx:{marginRight:"5px",color:"#2AA3FF"}}),t.name]}),(0,n.jsxs)(g.Z,{sx:{display:"flex",justifyContent:"flex-start"},children:[(0,n.jsxs)(g.Z,{sx:{width:"130px",flexGrow:0,flexShrink:0},children:[(0,n.jsx)(g.Z,{sx:{color:"#2AA3FF"},children:t.vector_type}),(0,n.jsx)(g.Z,{sx:{fontSize:"12px",color:"black"},children:"Vector"})]}),(0,n.jsxs)(g.Z,{sx:{width:"130px",flexGrow:0,flexShrink:0},children:[(0,n.jsx)(g.Z,{sx:{color:"#2AA3FF"},children:t.owner}),(0,n.jsx)(g.Z,{sx:{fontSize:"12px",color:"black"},children:"Owner"})]}),(0,n.jsxs)(g.Z,{sx:{width:"130px",flexGrow:0,flexShrink:0},children:[(0,n.jsx)(g.Z,{sx:{color:"#2AA3FF"},children:t.docs||0}),(0,n.jsx)(g.Z,{sx:{fontSize:"12px",color:"black"},children:"Docs"})]})]}),(0,n.jsx)(g.Z,{sx:{position:"absolute",right:"10px",top:"10px",color:"rgb(205, 32, 41)"},onClick:e=>{e.stopPropagation(),et(t),$(!0)},children:(0,n.jsx)(c.Z,{sx:{fontSize:"30px"}})})]},r)),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{}),(0,n.jsx)("i",{})]})}),(0,n.jsx)(j.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center","z-index":1e3},open:N,onClose:()=>T(!1),children:(0,n.jsxs)(h.Z,{variant:"outlined",sx:{width:800,borderRadius:"md",p:3,boxShadow:"lg"},children:[(0,n.jsx)(g.Z,{sx:{width:"100%"},children:(0,n.jsx)(m.Z,{spacing:2,direction:"row",children:v.map((e,r)=>(0,n.jsxs)(F,{sx:{fontWeight:t===r?"bold":"",color:t===r?"#2AA3FF":""},children:[rE(e.target.value),sx:{marginBottom:"20px"}}),"Owner:",(0,n.jsx)(f.ZP,{placeholder:"Please input the owner",onChange:e=>D(e.target.value),sx:{marginBottom:"20px"}}),"Description:",(0,n.jsx)(f.ZP,{placeholder:"Please input the description",onChange:e=>W(e.target.value),sx:{marginBottom:"20px"}})]}),(0,n.jsx)(Z.Z,{variant:"outlined",onClick:async()=>{if(""===B){p.ZP.error("please input the name");return}if(/[^0-9a-zA-Z_-]/.test(B)){p.ZP.error('the name can only contain numbers, letters, "-" and "_"');return}if(""===z){p.ZP.error("please input the owner");return}if(""===O){p.ZP.error("please input the description");return}let e=await (0,S.PR)("/knowledge/space/add",{name:B,vector_type:"Chroma",owner:z,desc:O});if(e.success){p.ZP.success("success"),r(1);let e=await (0,S.PR)("/knowledge/space/list",{});e.success&&A(e.data)}else p.ZP.error(e.err_msg||"failed")},children:"Next"})]}):1===t?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(g.Z,{sx:{margin:"30px auto"},children:R.map(e=>(0,n.jsxs)(h.Z,{sx:{boxSizing:"border-box",height:"80px",padding:"12px",display:"flex",flexDirection:"column",justifyContent:"space-between",border:"1px solid gray",borderRadius:"6px",marginBottom:"20px",cursor:"pointer"},onClick:()=>{u(e.type),r(2)},children:[(0,n.jsx)(h.Z,{sx:{fontSize:"20px",fontWeight:"bold"},children:e.title}),(0,n.jsx)(h.Z,{children:e.subTitle})]},e.type))})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(g.Z,{sx:{margin:"30px auto"},children:["Name:",(0,n.jsx)(f.ZP,{placeholder:"Please input the name",onChange:e=>I(e.target.value),sx:{marginBottom:"20px"}}),"webPage"===d?(0,n.jsxs)(n.Fragment,{children:["Web Page URL:",(0,n.jsx)(f.ZP,{placeholder:"Please input the Web Page URL",onChange:e=>L(e.target.value)})]}):"file"===d?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(C,{name:"file",multiple:!1,onChange(e){var t;if(0===e.fileList.length){X(null),I("");return}X(e.file.originFileObj),I(null===(t=e.file.originFileObj)||void 0===t?void 0:t.name)},children:[(0,n.jsx)("p",{className:"ant-upload-drag-icon",children:(0,n.jsx)(i.Z,{})}),(0,n.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:"Select or Drop file"}),(0,n.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})}):(0,n.jsxs)(n.Fragment,{children:["Text Source(Optional):",(0,n.jsx)(f.ZP,{placeholder:"Please input the text source",onChange:e=>M(e.target.value),sx:{marginBottom:"20px"}}),"Text:",(0,n.jsx)(b.Z,{onChange:e=>V(e.target.value),minRows:4,sx:{marginBottom:"20px"}})]}),(0,n.jsx)(P.ZP,{component:"label",sx:{marginTop:"20px"},endDecorator:(0,n.jsx)(w.Z,{checked:Y,onChange:e=>q(e.target.checked)}),children:"Synch:"})]}),(0,n.jsxs)(m.Z,{direction:"row",justifyContent:"flex-start",alignItems:"center",sx:{marginBottom:"20px"},children:[(0,n.jsx)(Z.Z,{variant:"outlined",sx:{marginRight:"20px"},onClick:()=>r(1),children:"< Back"}),(0,n.jsx)(Z.Z,{variant:"outlined",onClick:async()=>{if(""===G){p.ZP.error("Please input the name");return}if("webPage"===d){if(""===U){p.ZP.error("Please input the Web Page URL");return}let e=await (0,S.PR)("/knowledge/".concat(B,"/document/add"),{doc_name:G,content:U,doc_type:"URL"});e.success?(p.ZP.success("success"),T(!1),Y&&(0,S.PR)("/knowledge/".concat(B,"/document/sync"),{doc_ids:[e.data]})):p.ZP.error(e.err_msg||"failed")}else if("file"===d){if(!H){p.ZP.error("Please select a file");return}let e=new FormData;e.append("doc_name",G),e.append("doc_file",H),e.append("doc_type","DOCUMENT");let t=await (0,S.Ej)("/knowledge/".concat(B,"/document/upload"),e);t.success?(p.ZP.success("success"),T(!1),Y&&(0,S.PR)("/knowledge/".concat(B,"/document/sync"),{doc_ids:[t.data]})):p.ZP.error(t.err_msg||"failed")}else{if(""===J){p.ZP.error("Please input the text");return}let e=await (0,S.PR)("/knowledge/".concat(B,"/document/add"),{doc_name:G,source:K,content:J,doc_type:"TEXT"});e.success?(p.ZP.success("success"),T(!1),Y&&(0,S.PR)("/knowledge/".concat(B,"/document/sync"),{doc_ids:[e.data]})):p.ZP.error(e.err_msg||"failed")}},children:"Finish"})]})]})]})}),(0,n.jsx)(j.Z,{open:Q,onClose:()=>$(!1),children:(0,n.jsxs)(y.Z,{variant:"outlined",role:"alertdialog","aria-labelledby":"alert-dialog-modal-title","aria-describedby":"alert-dialog-modal-description",children:[(0,n.jsx)(P.ZP,{id:"alert-dialog-modal-title",component:"h2",startDecorator:(0,n.jsx)(x.Z,{style:{color:"rgb(205, 32, 41)"}}),sx:{color:"black"},children:"Confirmation"}),(0,n.jsx)(k.Z,{}),(0,n.jsxs)(P.ZP,{id:"alert-dialog-modal-description",textColor:"text.tertiary",sx:{fontWeight:"500",color:"black"},children:["Sure to delete ",null==ee?void 0:ee.name,"?"]}),(0,n.jsxs)(g.Z,{sx:{display:"flex",gap:1,justifyContent:"flex-end",pt:2},children:[(0,n.jsx)(Z.Z,{variant:"outlined",color:"neutral",onClick:()=>$(!1),children:"Cancel"}),(0,n.jsx)(Z.Z,{variant:"outlined",color:"danger",onClick:async()=>{$(!1);let e=await (0,S.PR)("/knowledge/space/delete",{name:null==ee?void 0:ee.name});if(e.success){p.ZP.success("success");let e=await (0,S.PR)("/knowledge/space/list",{});e.success&&A(e.data)}else p.ZP.error(e.err_msg||"failed")},children:"Yes"})]})]})})]})}},78915:function(e,t,r){"use strict";r.d(t,{Tk:function(){return x},Kw:function(){return d},PR:function(){return p},Ej:function(){return u}});var n=r(21628),s=r(24214),o=r(52040);let i=s.Z.create({baseURL:o.env.API_BASE_URL});i.defaults.timeout=1e4,i.interceptors.response.use(e=>e.data,e=>Promise.reject(e));var a=r(84835);let l={"content-type":"application/json"},c=e=>{if(!(0,a.isPlainObject)(e))return JSON.stringify(e);let t={...e};for(let e in t){let r=t[e];"string"==typeof r&&(t[e]=r.trim())}return JSON.stringify(t)},x=(e,t)=>{if(t){let r=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");r&&(e+="?".concat(r))}return i.get("/api"+e,{headers:l}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},d=(e,t)=>{let r=c(t);return i.post("/api"+e,{body:r,headers:l}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},p=(e,t)=>(c(t),i.post(e,t,{headers:l}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})),u=(e,t)=>i.post(e,t).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})}},function(e){e.O(0,[180,838,60,759,192,86,790,946,872,2,253,769,744],function(){return e(e.s=66162)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/app/layout-7ae5a2339fb758d0.js b/pilot/server/static/_next/static/chunks/app/layout-7ae5a2339fb758d0.js
new file mode 100644
index 000000000..d0a75621a
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/app/layout-7ae5a2339fb758d0.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{72431:function(){},91909:function(e,t,r){Promise.resolve().then(r.bind(r,50902))},57931:function(e,t,r){"use strict";r.d(t,{ZP:function(){return d},Cg:function(){return a}});var n=r(9268),i=r(89081),s=r(78915),l=r(86006);let[a,o]=function(){let e=l.createContext(void 0);return[function(){let t=l.useContext(e);if(void 0===t)throw Error("useCtx must be inside a Provider with a value");return t},e.Provider]}();var d=e=>{let{children:t}=e,{run:r,data:l,refresh:a}=(0,i.Z)(async()=>await (0,s.Tk)("/v1/chat/dialogue/list"),{manual:!0});return(0,n.jsx)(o,{value:{dialogueList:l,queryDialogueList:r,refreshDialogList:a},children:t})}},50902:function(e,t,r){"use strict";let n,i;r.r(t),r.d(t,{default:function(){return M}});var s=r(9268);r(97402),r(23517);var l=r(86006),a=r(56008),o=r(35846),d=r.n(o),c=r(20837),u=r(78635),f=r(90545),h=r(53113),x=r(18818),m=r(4882),p=r(70092),v=r(64579),g=r(22046),j=r(53047),b=r(62921),y=r(40020),Z=r(11515),w=r(84892),k=r(601),C=r(1301),B=r(98703),P=r(57931),N=r(66664),_=r(78915),E=r(76394),D=r.n(E),S=()=>{var e;let t=(0,a.usePathname)(),r=(0,a.useSearchParams)(),n=r.get("id"),i=(0,a.useRouter)(),[o,E]=(0,l.useState)("/LOGO_1.png"),{dialogueList:S,queryDialogueList:L,refreshDialogList:O}=(0,P.Cg)(),{mode:z,setMode:H}=(0,u.tv)(),F=(0,l.useMemo)(()=>[{label:"Knowledge Space",route:"/datastores",icon:(0,s.jsx)(y.Z,{fontSize:"small"}),active:"/datastores"===t}],[t]);return(0,l.useEffect)(()=>{"light"===z?E("/LOGO_1.png"):E("/WHITE_LOGO.png")},[z]),(0,l.useEffect)(()=>{(async()=>{await L()})()},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("nav",{className:"flex h-12 items-center justify-between border-b px-4 dark:border-gray-800 dark:bg-gray-800/70 md:hidden",children:[(0,s.jsx)("div",{children:(0,s.jsx)(k.Z,{})}),(0,s.jsx)("span",{className:"truncate px-4",children:"New Chat"}),(0,s.jsx)("a",{href:"",className:"-mr-3 flex h-9 w-9 shrink-0 items-center justify-center",children:(0,s.jsx)(C.Z,{})})]}),(0,s.jsx)("nav",{className:"grid max-h-screen h-full max-md:hidden",children:(0,s.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",borderRight:"1px solid",borderColor:"divider",maxHeight:"100vh",position:"sticky",left:"0px",top:"0px",overflow:"hidden"},children:[(0,s.jsx)(f.Z,{sx:{p:2,gap:2,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:(0,s.jsx)("div",{className:"flex items-center gap-3",children:(0,s.jsx)(D(),{src:o,alt:"DB-GPT",width:633,height:157,className:"w-full max-w-full",unoptimized:!0})})}),(0,s.jsx)(f.Z,{sx:{px:2},children:(0,s.jsx)(d(),{href:"/",children:(0,s.jsx)(h.Z,{color:"primary",className:"w-full bg-gradient-to-r from-[#31afff] to-[#1677ff] dark:bg-gradient-to-r dark:from-[#6a6a6a] dark:to-[#80868f]",style:{color:"#fff"},children:"+ New Chat"})})}),(0,s.jsx)(f.Z,{sx:{p:2,display:{xs:"none",sm:"initial"},maxHeight:"100%",overflow:"auto"},children:(0,s.jsx)(x.Z,{size:"sm",sx:{"--ListItem-radius":"8px"},children:(0,s.jsx)(m.Z,{nested:!0,children:(0,s.jsx)(x.Z,{size:"sm","aria-labelledby":"nav-list-browse",sx:{"& .JoyListItemButton-root":{p:"8px"},gap:"4px"},children:null==S?void 0:null===(e=S.data)||void 0===e?void 0:e.map(e=>{let l=("/chat"===t||"/chat/"===t)&&n===e.conv_uid;return(0,s.jsx)(m.Z,{children:(0,s.jsx)(p.Z,{selected:l,variant:l?"soft":"plain",sx:{"&:hover .del-btn":{visibility:"visible"}},children:(0,s.jsx)(v.Z,{children:(0,s.jsxs)(d(),{href:"/chat?id=".concat(e.conv_uid,"&scene=").concat(null==e?void 0:e.chat_mode),className:"flex items-center justify-between",children:[(0,s.jsxs)(g.ZP,{fontSize:14,noWrap:!0,children:[(0,s.jsx)(B.Z,{style:{marginRight:"0.5rem"}}),(null==e?void 0:e.user_name)||(null==e?void 0:e.user_input)||"undefined"]}),(0,s.jsx)(j.ZP,{color:"neutral",variant:"plain",size:"sm",onClick:n=>{n.preventDefault(),n.stopPropagation(),c.Z.confirm({title:"Delete Chat",content:"Are you sure delete this chat?",width:"276px",centered:!0,async onOk(){await (0,_.Kw)("/v1/chat/dialogue/delete?con_uid=".concat(e.conv_uid)),await O(),"/chat"===t&&r.get("id")===e.conv_uid&&i.push("/")}})},className:"del-btn invisible",children:(0,s.jsx)(N.Z,{})})]})})})},e.conv_uid)})})})})}),(0,s.jsxs)("div",{className:"flex flex-col justify-between flex-1",children:[(0,s.jsx)("div",{}),(0,s.jsx)(f.Z,{sx:{p:2,pt:3,pb:6,borderTop:"1px solid",borderColor:"divider",display:{xs:"none",sm:"initial"},position:"sticky",bottom:0,zIndex:100,background:"var(--joy-palette-background-body)"},children:(0,s.jsxs)(x.Z,{size:"sm",sx:{"--ListItem-radius":"8px"},children:[(0,s.jsx)(m.Z,{nested:!0,children:(0,s.jsx)(x.Z,{size:"sm","aria-labelledby":"nav-list-browse",sx:{"& .JoyListItemButton-root":{p:"8px"}},children:F.map(e=>(0,s.jsx)(d(),{href:e.route,children:(0,s.jsx)(m.Z,{children:(0,s.jsxs)(p.Z,{color:"neutral",sx:{marginBottom:1,height:"2.5rem"},selected:e.active,variant:e.active?"soft":"plain",children:[(0,s.jsx)(b.Z,{sx:{color:e.active?"inherit":"neutral.500"},children:e.icon}),(0,s.jsx)(v.Z,{children:e.label})]})})},e.route))})}),(0,s.jsx)(m.Z,{children:(0,s.jsxs)(p.Z,{sx:{height:"2.5rem"},onClick:()=>{"light"===z?H("dark"):H("light")},children:[(0,s.jsx)(b.Z,{children:"dark"===z?(0,s.jsx)(Z.Z,{fontSize:"small"}):(0,s.jsx)(w.Z,{fontSize:"small"})}),(0,s.jsx)(v.Z,{children:"Theme"})]})})]})})]})]})})]})},L=r(29720),O=r(41287),z=r(38230);let H=(0,O.Z)({colorSchemes:{light:{palette:{mode:"dark",primary:{...z.Z.grey,solidBg:"#e6f4ff",solidColor:"#1677ff",solidHoverBg:"#e6f4ff"},neutral:{plainColor:"#4d4d4d",plainHoverColor:"#131318",plainHoverBg:"#EBEBEF",plainActiveBg:"#D8D8DF",plainDisabledColor:"#B9B9C6"},background:{body:"#fff",surface:"#fff"},text:{primary:"#505050"}}},dark:{palette:{mode:"light",primary:{...z.Z.grey,softBg:"#353539",softHoverBg:"#35353978",softDisabledBg:"#353539",solidBg:"#51525beb",solidHoverBg:"#51525beb"},neutral:{plainColor:"#D8D8DF",plainHoverColor:"#F7F7F8",plainHoverBg:"#353539",plainActiveBg:"#434356",plainDisabledColor:"#434356",outlinedBorder:"#353539",outlinedHoverBorder:"#454651"},text:{primary:"#EBEBEF"},background:{body:"#212121",surface:"#51525beb"}}}},fontFamily:{body:"Josefin Sans, sans-serif",display:"Josefin Sans, sans-serif"},typography:{display1:{background:"linear-gradient(-30deg, var(--joy-palette-primary-900), var(--joy-palette-primary-400))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}},zIndex:{modal:1001}});var F=r(53794),I=r.n(F),T=r(54486),R=r.n(T);let A=0;function J(){"loading"!==i&&(i="loading",n=setTimeout(function(){R().start()},250))}function G(){A>0||(i="stop",clearTimeout(n),R().done())}if(I().events.on("routeChangeStart",J),I().events.on("routeChangeComplete",G),I().events.on("routeChangeError",G),"function"==typeof(null==window?void 0:window.fetch)){let e=window.fetch;window.fetch=async function(){for(var t=arguments.length,r=Array(t),n=0;n{if((null==n?void 0:n.current)&&r){var e,t,i,s,l,a;null==n||null===(e=n.current)||void 0===e||null===(t=e.classList)||void 0===t||t.add(r),"light"===r?null==n||null===(i=n.current)||void 0===i||null===(s=i.classList)||void 0===s||s.remove("dark"):null==n||null===(l=n.current)||void 0===l||null===(a=l.classList)||void 0===a||a.remove("light")}},[n,r]),(0,s.jsxs)("div",{ref:n,className:"h-full",children:[(0,s.jsx)(W,{}),(0,s.jsx)(P.ZP,{children:(0,s.jsx)("div",{className:"contents h-full",children:(0,s.jsxs)("div",{className:"grid h-full w-screen grid-cols-1 grid-rows-[auto,1fr] overflow-hidden text-smd dark:text-gray-300 md:grid-cols-[280px,1fr] md:grid-rows-[1fr]",children:[(0,s.jsx)(S,{}),(0,s.jsx)("div",{className:"relative min-h-0 min-w-0",children:t})]})})})]})}var M=function(e){let{children:t}=e;return(0,s.jsx)("html",{lang:"en",className:"h-full font-sans",children:(0,s.jsx)("body",{className:"h-full font-sans",children:(0,s.jsx)(L.Z,{theme:H,children:(0,s.jsx)(u.lL,{theme:H,defaultMode:"light",children:(0,s.jsx)(K,{children:t})})})})})}},78915:function(e,t,r){"use strict";r.d(t,{Tk:function(){return c},Kw:function(){return u},PR:function(){return f},Ej:function(){return h}});var n=r(21628),i=r(24214),s=r(52040);let l=i.Z.create({baseURL:s.env.API_BASE_URL});l.defaults.timeout=1e4,l.interceptors.response.use(e=>e.data,e=>Promise.reject(e));var a=r(84835);let o={"content-type":"application/json"},d=e=>{if(!(0,a.isPlainObject)(e))return JSON.stringify(e);let t={...e};for(let e in t){let r=t[e];"string"==typeof r&&(t[e]=r.trim())}return JSON.stringify(t)},c=(e,t)=>{if(t){let r=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");r&&(e+="?".concat(r))}return l.get("/api"+e,{headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},u=(e,t)=>{let r=d(t);return l.post("/api"+e,{body:r,headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},f=(e,t)=>(d(t),l.post(e,t,{headers:o}).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})),h=(e,t)=>l.post(e,t).then(e=>e).catch(e=>{n.ZP.error(e),Promise.reject(e)})},97402:function(){},23517:function(){}},function(e){e.O(0,[180,838,60,759,409,316,946,394,751,256,253,769,744],function(){return e(e.s=91909)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/chunks/app/page-116b5a30ac88ed73.js b/pilot/server/static/_next/static/chunks/app/page-116b5a30ac88ed73.js
new file mode 100644
index 000000000..d19c69ae9
--- /dev/null
+++ b/pilot/server/static/_next/static/chunks/app/page-116b5a30ac88ed73.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{50318:function(i,e,t){"use strict";t.d(e,{Z:function(){return y}});var r=t(46750),n=t(40431),a=t(86006),o=t(89791),l=t(53832),s=t(47562),c=t(50645),d=t(88930),v=t(18587);function u(i){return(0,v.d6)("MuiDivider",i)}(0,v.sI)("MuiDivider",["root","horizontal","vertical","insetContext","insetNone"]);var h=t(326),m=t(9268);let p=["className","children","component","inset","orientation","role","slots","slotProps"],g=i=>{let{orientation:e,inset:t}=i,r={root:["root",e,t&&`inset${(0,l.Z)(t)}`]};return(0,s.Z)(r,u,{})},f=(0,c.Z)("hr",{name:"JoyDivider",slot:"Root",overridesResolver:(i,e)=>e.root})(({theme:i,ownerState:e})=>(0,n.Z)({"--Divider-thickness":"1px","--Divider-lineColor":i.vars.palette.divider},"none"===e.inset&&{"--_Divider-inset":"0px"},"context"===e.inset&&{"--_Divider-inset":"var(--Divider-inset, 0px)"},{margin:"initial",marginInline:"vertical"===e.orientation?"initial":"var(--_Divider-inset)",marginBlock:"vertical"===e.orientation?"var(--_Divider-inset)":"initial",position:"relative",alignSelf:"stretch",flexShrink:0},e.children?{"--Divider-gap":i.spacing(1),"--Divider-childPosition":"50%",display:"flex",flexDirection:"vertical"===e.orientation?"column":"row",alignItems:"center",whiteSpace:"nowrap",textAlign:"center",border:0,fontFamily:i.vars.fontFamily.body,fontSize:i.vars.fontSize.sm,"&::before, &::after":{position:"relative",inlineSize:"vertical"===e.orientation?"var(--Divider-thickness)":"initial",blockSize:"vertical"===e.orientation?"initial":"var(--Divider-thickness)",backgroundColor:"var(--Divider-lineColor)",content:'""'},"&::before":{marginInlineEnd:"vertical"===e.orientation?"initial":"min(var(--Divider-childPosition) * 999, var(--Divider-gap))",marginBlockEnd:"vertical"===e.orientation?"min(var(--Divider-childPosition) * 999, var(--Divider-gap))":"initial",flexBasis:"var(--Divider-childPosition)"},"&::after":{marginInlineStart:"vertical"===e.orientation?"initial":"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))",marginBlockStart:"vertical"===e.orientation?"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))":"initial",flexBasis:"calc(100% - var(--Divider-childPosition))"}}:{border:"none",listStyle:"none",backgroundColor:"var(--Divider-lineColor)",inlineSize:"vertical"===e.orientation?"var(--Divider-thickness)":"initial",blockSize:"vertical"===e.orientation?"initial":"var(--Divider-thickness)"})),x=a.forwardRef(function(i,e){let t=(0,d.Z)({props:i,name:"JoyDivider"}),{className:a,children:l,component:s=null!=l?"div":"hr",inset:c,orientation:v="horizontal",role:u="hr"!==s?"separator":void 0,slots:x={},slotProps:y={}}=t,b=(0,r.Z)(t,p),j=(0,n.Z)({},t,{inset:c,role:u,orientation:v,component:s}),D=g(j),k=(0,n.Z)({},b,{component:s,slots:x,slotProps:y}),[w,Z]=(0,h.Z)("root",{ref:e,className:(0,o.Z)(D.root,a),elementType:f,externalForwardedProps:k,ownerState:j,additionalProps:(0,n.Z)({as:s,role:u},"separator"===u&&"vertical"===v&&{"aria-orientation":"vertical"})});return(0,m.jsx)(w,(0,n.Z)({},Z,{children:l}))});x.muiName="Divider";var y=x},20736:function(i,e,t){Promise.resolve().then(t.bind(t,93768))},93768:function(i,e,t){"use strict";t.r(e);var r=t(9268),n=t(89081),a=t(86006),o=t(50318),l=t(90545),s=t(77614),c=t(53113),d=t(35086),v=t(53047),u=t(54842),h=t(67830),m=t(19700),p=t(92391),g=t(78915),f=t(56008),x=t(76394),y=t.n(x);e.default=function(){var i;let e=p.z.object({query:p.z.string().min(1)}),t=(0,f.useRouter)(),[x,b]=(0,a.useState)(!1),j=(0,m.cI)({resolver:(0,h.F)(e),defaultValues:{}}),{data:D}=(0,n.Z)(async()=>await (0,g.Kw)("/v1/chat/dialogue/scenes")),k=async i=>{let{query:e}=i;try{var r,n;b(!0),j.reset();let i=await (0,g.Kw)("/v1/chat/dialogue/new",{chat_mode:"chat_normal"});(null==i?void 0:i.success)&&(null==i?void 0:null===(r=i.data)||void 0===r?void 0:r.conv_uid)&&t.push("/chat?id=".concat(null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.conv_uid,"&initMessage=").concat(e))}catch(i){}finally{b(!1)}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"mx-auto h-full justify-center flex max-w-3xl flex-col gap-8 px-5 pt-6",children:[(0,r.jsx)("div",{className:"my-0 mx-auto",children:(0,r.jsx)(y(),{src:"/LOGO.png",alt:"Revolutionizing Database Interactions with Private LLM Technology",width:856,height:160,className:"w-full",unoptimized:!0})}),(0,r.jsx)("div",{className:"grid gap-8 lg:grid-cols-3",children:(0,r.jsxs)("div",{className:"lg:col-span-3",children:[(0,r.jsx)(o.Z,{className:"text-[#878c93]",children:"Quick Start"}),(0,r.jsx)(l.Z,{className:"grid pt-7 rounded-xl gap-2 lg:grid-cols-3 lg:gap-6",sx:{["& .".concat(s.Z.root)]:{color:"var(--joy-palette-primary-solidColor)",backgroundColor:"var(--joy-palette-primary-solidBg)",height:"52px","&: hover":{backgroundColor:"var(--joy-palette-primary-solidHoverBg)"}},["& .".concat(s.Z.disabled)]:{cursor:"not-allowed",pointerEvents:"unset",color:"var(--joy-palette-primary-plainColor)",backgroundColor:"var(--joy-palette-primary-softDisabledBg)","&: hover":{backgroundColor:"var(--joy-palette-primary-softDisabledBg)"}}},children:null==D?void 0:null===(i=D.data)||void 0===i?void 0:i.map(i=>(0,r.jsx)(c.Z,{disabled:null==i?void 0:i.show_disable,size:"md",variant:"solid",className:"text-base rounded-none",onClick:async()=>{var e,r;let n=await (0,g.Kw)("/v1/chat/dialogue/new",{chat_mode:i.chat_scene});(null==n?void 0:n.success)&&(null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.conv_uid)&&t.push("/chat?id=".concat(null==n?void 0:null===(r=n.data)||void 0===r?void 0:r.conv_uid,"&scene=").concat(i.chat_scene))},children:i.scene_name},i.chat_scene))})]})}),(0,r.jsx)("div",{className:"mt-6 mb-[10%] pointer-events-none inset-x-0 bottom-0 z-0 mx-auto flex w-full max-w-3xl flex-col items-center justify-center max-md:border-t xl:max-w-4xl [&>*]:pointer-events-auto",children:(0,r.jsx)("form",{style:{maxWidth:"100%",width:"100%",position:"relative",display:"flex",marginTop:"auto",overflow:"visible",background:"none",justifyContent:"center",marginLeft:"auto",marginRight:"auto",height:"52px"},onSubmit:i=>{j.handleSubmit(k)(i)},children:(0,r.jsx)(d.ZP,{sx:{width:"100%"},variant:"outlined",placeholder:"Ask anything",endDecorator:(0,r.jsx)(v.ZP,{type:"submit",disabled:x,children:(0,r.jsx)(u.Z,{})}),...j.register("query")})})})]})})}},78915:function(i,e,t){"use strict";t.d(e,{Tk:function(){return d},Kw:function(){return v},PR:function(){return u},Ej:function(){return h}});var r=t(21628),n=t(24214),a=t(52040);let o=n.Z.create({baseURL:a.env.API_BASE_URL});o.defaults.timeout=1e4,o.interceptors.response.use(i=>i.data,i=>Promise.reject(i));var l=t(84835);let s={"content-type":"application/json"},c=i=>{if(!(0,l.isPlainObject)(i))return JSON.stringify(i);let e={...i};for(let i in e){let t=e[i];"string"==typeof t&&(e[i]=t.trim())}return JSON.stringify(e)},d=(i,e)=>{if(e){let t=Object.keys(e).filter(i=>void 0!==e[i]&&""!==e[i]).map(i=>"".concat(i,"=").concat(e[i])).join("&");t&&(i+="?".concat(t))}return o.get("/api"+i,{headers:s}).then(i=>i).catch(i=>{r.ZP.error(i),Promise.reject(i)})},v=(i,e)=>{let t=c(e);return o.post("/api"+i,{body:t,headers:s}).then(i=>i).catch(i=>{r.ZP.error(i),Promise.reject(i)})},u=(i,e)=>(c(e),o.post(i,e,{headers:s}).then(i=>i).catch(i=>{r.ZP.error(i),Promise.reject(i)})),h=(i,e)=>o.post(i,e).then(i=>i).catch(i=>{r.ZP.error(i),Promise.reject(i)})}},function(i){i.O(0,[180,838,60,86,316,259,394,253,769,744],function(){return i(i.s=20736)}),_N_E=i.O()}]);
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_buildManifest.js b/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_buildManifest.js
new file mode 100644
index 000000000..cb10d35e8
--- /dev/null
+++ b/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_buildManifest.js
@@ -0,0 +1 @@
+self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-f5357f382422dd96.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
\ No newline at end of file
diff --git a/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_ssgManifest.js b/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_ssgManifest.js
new file mode 100644
index 000000000..5b3ff592f
--- /dev/null
+++ b/pilot/server/static/_next/static/ehYQW3Jy0KfT03WEgdVRz/_ssgManifest.js
@@ -0,0 +1 @@
+self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
\ No newline at end of file
diff --git a/pilot/server/static/chat/index.html b/pilot/server/static/chat/index.html
index cc937105f..0c53812c5 100644
--- a/pilot/server/static/chat/index.html
+++ b/pilot/server/static/chat/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pilot/server/static/chat/index.txt b/pilot/server/static/chat/index.txt
index 894545ed7..07d7c6dab 100644
--- a/pilot/server/static/chat/index.txt
+++ b/pilot/server/static/chat/index.txt
@@ -1,9 +1,9 @@
1:HL["/_next/static/css/f7886471966370ed.css",{"as":"style"}]
-0:["9C-EourU_3qSC0HuMlO9a",[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
-4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-055e926a104869ef.js"],"name":"","async":false}
+0:["ehYQW3Jy0KfT03WEgdVRz",[[["",{"children":["chat",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
+4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-7ae5a2339fb758d0.js"],"name":"","async":false}
5:I{"id":"13211","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
6:I{"id":"5767","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
7:I{"id":"37396","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
-8:I{"id":"65641","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","757:static/chunks/f60284a2-6891068c9ea7ce77.js","282:static/chunks/7e4358a0-8f10c290d655cdf1.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","316:static/chunks/316-370750739484dff7.js","790:static/chunks/790-97e6b769f5c791cb.js","767:static/chunks/767-b93280f4b5b5e975.js","259:static/chunks/259-2c3490a9eca2f411.js","751:static/chunks/751-30fee9a32c6e64a2.js","320:static/chunks/320-63dc542e9a7120d1.js","929:static/chunks/app/chat/page-86595a764417b205.js"],"name":"","async":false}
+8:I{"id":"65641","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","757:static/chunks/f60284a2-6891068c9ea7ce77.js","282:static/chunks/7e4358a0-8f10c290d655cdf1.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","316:static/chunks/316-370750739484dff7.js","790:static/chunks/790-97e6b769f5c791cb.js","767:static/chunks/767-b93280f4b5b5e975.js","259:static/chunks/259-2c3490a9eca2f411.js","751:static/chunks/751-30fee9a32c6e64a2.js","320:static/chunks/320-63dc542e9a7120d1.js","929:static/chunks/app/chat/page-5cbaa4028c70970e.js"],"name":"","async":false}
2:[["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","chat","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":[["$","$L7",null,{"propsForComponent":{"params":{}},"Component":"$8"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"chat"},"styles":[]}],"params":{}}],null]
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","2",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"any"}]]
diff --git a/pilot/server/static/datastores/documents/chunklist/index.html b/pilot/server/static/datastores/documents/chunklist/index.html
index 94db628d4..97b3550f7 100644
--- a/pilot/server/static/datastores/documents/chunklist/index.html
+++ b/pilot/server/static/datastores/documents/chunklist/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pilot/server/static/datastores/documents/chunklist/index.txt b/pilot/server/static/datastores/documents/chunklist/index.txt
index c5b9c1c2d..67e01c281 100644
--- a/pilot/server/static/datastores/documents/chunklist/index.txt
+++ b/pilot/server/static/datastores/documents/chunklist/index.txt
@@ -1,6 +1,6 @@
1:HL["/_next/static/css/f7886471966370ed.css",{"as":"style"}]
-0:["9C-EourU_3qSC0HuMlO9a",[[["",{"children":["datastores",{"children":["documents",{"children":["chunklist",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
-4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-055e926a104869ef.js"],"name":"","async":false}
+0:["ehYQW3Jy0KfT03WEgdVRz",[[["",{"children":["datastores",{"children":["documents",{"children":["chunklist",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
+4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-7ae5a2339fb758d0.js"],"name":"","async":false}
5:I{"id":"13211","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
6:I{"id":"5767","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
7:I{"id":"37396","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
diff --git a/pilot/server/static/datastores/documents/index.html b/pilot/server/static/datastores/documents/index.html
index 494daea26..52aded878 100644
--- a/pilot/server/static/datastores/documents/index.html
+++ b/pilot/server/static/datastores/documents/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pilot/server/static/datastores/documents/index.txt b/pilot/server/static/datastores/documents/index.txt
index 081a2cb0c..cb066b679 100644
--- a/pilot/server/static/datastores/documents/index.txt
+++ b/pilot/server/static/datastores/documents/index.txt
@@ -1,9 +1,9 @@
1:HL["/_next/static/css/f7886471966370ed.css",{"as":"style"}]
-0:["9C-EourU_3qSC0HuMlO9a",[[["",{"children":["datastores",{"children":["documents",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
-4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-055e926a104869ef.js"],"name":"","async":false}
+0:["ehYQW3Jy0KfT03WEgdVRz",[[["",{"children":["datastores",{"children":["documents",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
+4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-7ae5a2339fb758d0.js"],"name":"","async":false}
5:I{"id":"13211","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
6:I{"id":"5767","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
7:I{"id":"37396","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
-8:I{"id":"16692","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","550:static/chunks/925f3d25-1af7259455ef26bd.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","409:static/chunks/409-4b199bf070fd70fc.js","790:static/chunks/790-97e6b769f5c791cb.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","767:static/chunks/767-b93280f4b5b5e975.js","957:static/chunks/957-c96ff4de6e80d713.js","775:static/chunks/775-224c8c8f5ee3fd65.js","470:static/chunks/app/datastores/documents/page-d94518835f877352.js"],"name":"","async":false}
+8:I{"id":"16692","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","550:static/chunks/925f3d25-1af7259455ef26bd.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","409:static/chunks/409-4b199bf070fd70fc.js","790:static/chunks/790-97e6b769f5c791cb.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","767:static/chunks/767-b93280f4b5b5e975.js","957:static/chunks/957-c96ff4de6e80d713.js","872:static/chunks/872-4a145d8028102d89.js","470:static/chunks/app/datastores/documents/page-7560757029bdf106.js"],"name":"","async":false}
2:[["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","datastores","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","datastores","children","documents","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":[["$","$L7",null,{"propsForComponent":{"params":{}},"Component":"$8"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"documents"},"styles":[]}],"segment":"datastores"},"styles":[]}],"params":{}}],null]
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","2",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"any"}]]
diff --git a/pilot/server/static/datastores/index.html b/pilot/server/static/datastores/index.html
index bba92630a..76a95b52a 100644
--- a/pilot/server/static/datastores/index.html
+++ b/pilot/server/static/datastores/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pilot/server/static/datastores/index.txt b/pilot/server/static/datastores/index.txt
index 63bcebd43..a32784da5 100644
--- a/pilot/server/static/datastores/index.txt
+++ b/pilot/server/static/datastores/index.txt
@@ -1,9 +1,9 @@
1:HL["/_next/static/css/f7886471966370ed.css",{"as":"style"}]
-0:["9C-EourU_3qSC0HuMlO9a",[[["",{"children":["datastores",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
-4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-055e926a104869ef.js"],"name":"","async":false}
+0:["ehYQW3Jy0KfT03WEgdVRz",[[["",{"children":["datastores",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
+4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-7ae5a2339fb758d0.js"],"name":"","async":false}
5:I{"id":"13211","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
6:I{"id":"5767","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
7:I{"id":"37396","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
-8:I{"id":"44323","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","790:static/chunks/790-97e6b769f5c791cb.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","775:static/chunks/775-224c8c8f5ee3fd65.js","43:static/chunks/app/datastores/page-71ca37d05b729f1d.js"],"name":"","async":false}
+8:I{"id":"44323","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","192:static/chunks/192-e9f419fb9f5bc502.js","86:static/chunks/86-6193a530bd8e3ef4.js","790:static/chunks/790-97e6b769f5c791cb.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","872:static/chunks/872-4a145d8028102d89.js","2:static/chunks/2-a60cf38d8ab305bb.js","43:static/chunks/app/datastores/page-e0ea3b47f190d00a.js"],"name":"","async":false}
2:[["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","datastores","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":[["$","$L7",null,{"propsForComponent":{"params":{}},"Component":"$8"}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"datastores"},"styles":[]}],"params":{}}],null]
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","2",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"any"}]]
diff --git a/pilot/server/static/index.html b/pilot/server/static/index.html
index 27f3519c9..28baa3694 100644
--- a/pilot/server/static/index.html
+++ b/pilot/server/static/index.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pilot/server/static/index.txt b/pilot/server/static/index.txt
index ec0ab4e03..c39834b4d 100644
--- a/pilot/server/static/index.txt
+++ b/pilot/server/static/index.txt
@@ -1,9 +1,9 @@
1:HL["/_next/static/css/f7886471966370ed.css",{"as":"style"}]
-0:["9C-EourU_3qSC0HuMlO9a",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
-4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-055e926a104869ef.js"],"name":"","async":false}
+0:["ehYQW3Jy0KfT03WEgdVRz",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f7886471966370ed.css","precedence":"next"}]],["$L3",null]]]]]
+4:I{"id":"50902","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","759:static/chunks/759-22c7defc3aa943a7.js","409:static/chunks/409-4b199bf070fd70fc.js","316:static/chunks/316-370750739484dff7.js","946:static/chunks/946-3a66ddfd20b8ad3d.js","394:static/chunks/394-0ffa189aa535d3eb.js","751:static/chunks/751-30fee9a32c6e64a2.js","256:static/chunks/256-f82130fbef33c4d6.js","185:static/chunks/app/layout-7ae5a2339fb758d0.js"],"name":"","async":false}
5:I{"id":"13211","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
6:I{"id":"5767","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
7:I{"id":"37396","chunks":["272:static/chunks/webpack-8be0750561cfcccd.js","253:static/chunks/bce60fc1-18c9f145b45d8f36.js","769:static/chunks/769-76f7aafd375fdd6b.js"],"name":"","async":false}
-8:I{"id":"26925","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","86:static/chunks/86-6193a530bd8e3ef4.js","316:static/chunks/316-370750739484dff7.js","259:static/chunks/259-2c3490a9eca2f411.js","394:static/chunks/394-0ffa189aa535d3eb.js","931:static/chunks/app/page-ba37471c26b3ed90.js"],"name":"","async":false}
+8:I{"id":"93768","chunks":["180:static/chunks/0e02fca3-615d0d51fa074d92.js","838:static/chunks/838-25c9b71d449c8910.js","60:static/chunks/60-8ef99caef9fdf742.js","86:static/chunks/86-6193a530bd8e3ef4.js","316:static/chunks/316-370750739484dff7.js","259:static/chunks/259-2c3490a9eca2f411.js","394:static/chunks/394-0ffa189aa535d3eb.js","931:static/chunks/app/page-116b5a30ac88ed73.js"],"name":"","async":false}
2:[["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":[["$","$L7",null,{"propsForComponent":{"params":{}},"Component":"$8"}],null],"segment":"__PAGE__"},"styles":[]}],"params":{}}],null]
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","2",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"any"}]]