@gientech/modual 2.1.39 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +761 -761
  2. package/assets/{GientechStreamReader-BYPlltUh.js → GientechStreamReader-C5jijqVw.js} +57 -57
  3. package/assets/LeftOutlined-9XTSYGbi.js +1 -0
  4. package/assets/database.svg +11 -11
  5. package/assets/database_add.svg +53 -53
  6. package/assets/database_connect.svg +66 -66
  7. package/assets/database_upload.svg +29 -29
  8. package/assets/databse.svg +6 -6
  9. package/assets/defaultWeLogo.svg +14 -14
  10. package/assets/graph.svg +4 -4
  11. package/assets/iconAi.svg +9 -9
  12. package/assets/{index-TcKs3T8h.js → index-B64Nj5uU.js} +2 -2
  13. package/assets/{index-B-AFa3n1.js → index-B872BsjL.js} +1 -1
  14. package/assets/{index-CS-Rgw_E.js → index-BIrUv1JE.js} +1 -1
  15. package/assets/index-Bk-pRt65.js +27 -0
  16. package/assets/{index-8h59dJlj.js → index-BvpN2hYX.js} +1 -1
  17. package/assets/{index-BdNcL3V6.js → index-BxR_BLxA.js} +1 -1
  18. package/assets/index-CkVpaVb6.js +1 -0
  19. package/assets/{index-DoUk2Ei_.js → index-D3Z0MZbL.js} +4 -4
  20. package/assets/{index-C6WKbL3A.js → index-DaM9Fbys.js} +3 -3
  21. package/assets/{index-CVis9Agw.js → index-SbYeytsI.js} +1 -1
  22. package/assets/index-hDlFWjNU.js +1969 -0
  23. package/assets/{index-ON3wgCdz.js → index-sWqCalkt.js} +144 -192
  24. package/assets/knowledge.svg +4 -4
  25. package/assets/mysql.svg +14 -14
  26. package/assets/{plus-CnVxGdOo.js → plus-DDbDO7lA.js} +1 -1
  27. package/assets/search-BoBdGjgo.js +6 -0
  28. package/assets/sensitive.svg +5 -5
  29. package/assets/style-DwfpZJI9.js +196 -0
  30. package/assets/style4.css +1 -1
  31. package/assets/{triangle-alert-BycMPaz2.js → triangle-alert-DF53kXdm.js} +1 -1
  32. package/assets/{x-CmbLQ9dc.js → x-DfdS1_QC.js} +1 -1
  33. package/assistantConfig.js +152 -1
  34. package/chat.d.ts +11 -1
  35. package/chat.js +1 -196
  36. package/chatCompare.js +1 -1
  37. package/database.js +2 -2
  38. package/databaseId.js +1 -1
  39. package/databaseTable.js +2 -2
  40. package/index.d.ts +301 -0
  41. package/index.js +1 -1
  42. package/modelManage.d.ts +124 -0
  43. package/modelManage.js +1 -1
  44. package/package.json +6 -6
  45. package/sensitive.d.ts +134 -2
  46. package/sensitive.js +205 -1
  47. package/streamFilesReader.js +1 -1
  48. package/worker/pdf.worker.min.js +21 -21
  49. package/assets/index-BN3yu4iN.js +0 -1
  50. package/assets/index-CMlRkGxa.js +0 -1995
  51. package/assets/index-Cbz7IFQk.js +0 -157
@@ -1,157 +0,0 @@
1
- import{jsxs as d,jsx as e,Fragment as je}from"react/jsx-runtime";import Ue,{useState as v,forwardRef as Xe,useEffect as W,useMemo as me,useImperativeHandle as Je,useRef as ae}from"react";import{c as Ce,a8 as Ne,a as Ge,L as oe,d as q,g as Ye,x as Ie,F as O,b as pe,a9 as Se,I as Ee,S as G,aa as Qe,ab as eu,B as ee,R as re,a6 as he}from"./index-8h59dJlj.js";import{X as uu}from"./x-CmbLQ9dc.js";import{P as Be}from"./plus-CnVxGdOo.js";import{M as ye,s as xe}from"./index-DoUk2Ei_.js";import{S as tu}from"./index-CVis9Agw.js";/* empty css *//**
2
- * @license lucide-react v0.456.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const nu=Ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
7
- * @license lucide-react v0.456.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const $e=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
12
- * @license lucide-react v0.456.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const qe=Ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
17
- * @license lucide-react v0.456.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const su=Ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),_e=({title:n,defaultExpanded:s=!0,className:r,children:t})=>{const[h,g]=v(s);return d("div",{className:r,children:[d("div",{className:"flex items-center justify-between",style:{marginBottom:"10px"},children:[d("div",{className:"flex items-center",children:[e("div",{style:{width:"3px",height:"12px",backgroundColor:"#4E6EF2",borderRadius:"6px",marginRight:"6px"}}),e("div",{className:"font-bold",children:n})]}),h?e($e,{onClick:()=>g(b=>!b),color:"#4E6EF2",size:18}):e(Ne,{onClick:()=>g(b=>!b),color:"#4E5969",size:18})]}),t?e("div",{style:{display:h?"block":"none"},children:t}):null]})},ce=()=>d("div",{className:"w-full h-[80px] rounded-md flex flex-col justify-center items-center",children:[e("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:d("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd",children:[e("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{"fill-rule":"nonzero",stroke:"#d9d9d9",children:[e("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),e("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})}),e("div",{children:"\u6682\u65E0\u53EF\u7528\u6A21\u578B"})]}),ru="\u63D0\u793A\u8BCD\u7528\u4E8E\u6307\u5B9A\u804A\u5929\u7684\u80CC\u666F\u548C\u4E0A\u4E0B\u6587\uFF0C\u6216\u8005\u8BA9\u52A9\u624B\u91C7\u53D6\u67D0\u4E2A\u4EBA\u683C\u6765\u56DE\u7B54\u4F60\u7684\u95EE\u9898\uFF1B",lu="\u5F00\u5173\u5F00\u542F\uFF0C\u5219\u82E5\u7CFB\u7EDF\u672A\u5728\u77E5\u8BC6\u5E93\u3001\u6570\u636E\u5E93\u7B49\u4F01\u4E1A\u77E5\u8BC6\u6570\u636E\u8303\u56F4\u5185\u68C0\u7D22\u5230\u7B54\u6848\uFF0C\u5219\u76F4\u63A5\u62D2\u7EDD\u56DE\u7B54\u76F8\u5173\u95EE\u9898\uFF1B",au='\u4F60\u662F\u4E00\u4E2A\u667A\u80FD\u52A9\u624B\uFF0C\u8BF7\u603B\u7ED3\u77E5\u8BC6\u5E93\u7684\u5185\u5BB9\u6765\u56DE\u7B54\u95EE\u9898,\u8BF7\u5217\u4E3E\u77E5\u8BC6\u5E93\u4E2D\u7684\u6570\u636E\u8BE6\u7EC6\u56DE\u7B54\u3002\u5F53\u6240\u6709\u77E5\u8BC6\u5E93\u5185\u5BB9\u90FD\u4E0E\u95EE\u9898\u65E0\u5173\u65F6\uFF0C\u4F60\u7684\u56DE\u7B54\u5FC5\u987B\u5305\u62EC"\u77E5\u8BC6\u5E93\u4E2D\u672A\u627E\u5230\u60A8\u8981\u7684\u7B54\u6848!"',ou="\u60A8\u597D\uFF01\u6211\u6CE8\u610F\u5230\u60A8\u7684\u6D88\u606F\u4E2D\u53EF\u80FD\u5305\u542B\u4E86\u4E00\u4E9B\u654F\u611F\u7684\u5185\u5BB9\u3002\u4E3A\u4E86\u4FDD\u8BC1\u793E\u533A\u7684\u53CB\u597D\u6C1B\u56F4\uFF0C\u6211\u4EEC\u65E0\u6CD5\u7EE7\u7EED\u5C31\u6B64\u8BDD\u9898\u8FDB\u884C\u8BA8\u8BBA\u3002\u5982\u679C\u60A8\u6709\u5176\u4ED6\u95EE\u9898\u6216\u9700\u8981\u5E2E\u52A9\uFF0C\u6211\u5F88\u4E50\u610F\u7EE7\u7EED\u4E3A\u60A8\u670D\u52A1\uFF01\u8C22\u8C22\u60A8\u7684\u7406\u89E3\u548C\u652F\u6301\u3002",le={top_k:{default:10,min:1,max:15,step:1,tooltip:"top_k\u4EE3\u8868\u6A21\u578B\u6700\u7EC8\u53D6\u4FE1\u7684\u6587\u672C\u5757\u6570\uFF0C\u4F8B\u5982\u95E8\u69DBtop_p = 0.8\uFF0Ctop_k = 3\uFF0C\u610F\u5473\u7740\u6A21\u578B\u4F1A\u4F9D\u636E\u76F8\u4F3C\u5EA6\u9AD8\u4F4E\u53D6\u524D3\u4E2A\u5927\u4E8E0.8\u7684\u6587\u672C\u5757\uFF0C\u5373\u4F7F\u5F53\u524D\u53EF\u80FD\u6709\u5927\u4E8E3\u4E2A\u6587\u672C\u5757\u7684\u76F8\u4F3C\u5EA6\u5927\u4E8E0.8\uFF1B"},max_tokens:{default:4096,min:0,max:1e4,step:64,tooltip:"max_tokens\u4EE3\u8868\u6A21\u578B\u7A97\u53E3\u5927\u5C0F\uFF0C\u5373\u4E00\u6B21\u95EE\u7B54\u5927\u6A21\u578B\u4E00\u6B21\u80FD\u591F\u63A5\u53D7\u7684\u5B57\u7B26\u4E32\u6700\u5927\u957F\u5EA6\uFF0C\u5305\u62EC\u7528\u6237\u7684\u63D0\u95EE\u548C\u6A21\u578B\u7684\u56DE\u7B54\uFF1B\u591A\u8F6E\u5BF9\u8BDD\u4E2D\u5386\u53F2\u5BF9\u8BDD\u5185\u5BB9\u4E5F\u5305\u62EC\u5728\u5185\uFF1B\u6700\u5927\u503C\u53D6\u51B3\u4E8E\u5927\u6A21\u578B\u672C\u8EAB\u662F\u5426\u652F\u6301\uFF1B"},max_round:{default:5,min:0,max:32,step:1,tooltip:"\u4EA4\u4E92\u5BF9\u8BDD\u573A\u666F\u91CC\uFF0C\u7CFB\u7EDF\u80FD\u591F\u8BB0\u5FC6\u5E76\u6709\u6548\u5173\u8054\u7684\u7528\u6237\u4E0E\u6A21\u578B\u4E4B\u95F4\u6765\u56DE\u4EA4\u6D41\u7684\u6700\u5927\u6B21\u6570\uFF1B"},temperature:{default:.3,min:.1,max:1,step:.1,tooltip:"\u6E29\u5EA6\u662F\u6A21\u578B\u56DE\u7B54\u7684\u503E\u5411\u6027\uFF0C\u53D6\u503C\u8303\u56F4\u4E00\u822C\u662F0\uFF5E1; \u53D6\u503C\u8D8B\u8FD10\u4EE3\u8868\u7740\u6A21\u578B\u56DE\u7B54\u4F1A\u66F4\u4E25\u8C28\uFF0C\u9002\u5408\u56DE\u7B54\u68C0\u7D22\u7C7B\u95EE\u9898; \u53D6\u503C\u8D8B\u8FD11\u5219\u4EE3\u8868\u56DE\u7B54\u66F4\u53D1\u6563\uFF0C\u9002\u5408\u56DE\u7B54\u521B\u65B0\u6027\u7684\u95EE\u9898\uFF1B"},top_p:{default:.8,min:.1,max:1,step:.1,tooltip:"top_p \u7528\u4E8E\u63A7\u5236\u5927\u6A21\u578B\u751F\u6210\u7B56\u7565\uFF0C\u51B3\u5B9A\u4E86\u6A21\u578B\u5728\u751F\u6210\u4E0B\u4E00\u4E2A\u8BCD\u65F6\uFF0C\u4ECE\u7D2F\u79EF\u6982\u7387\u8FBE\u5230 p \u7684\u6700\u5C0F\u8BCD\u96C6\u5408\u4E2D\u8FDB\u884C\u91C7\u6837\u3002\u901A\u5E38\u8BBE\u7F6E\u57280.8 - 0.95\u4E4B\u95F4\uFF0Ctop_p\u8D8A\u4F4E\u6A21\u578B\u7528\u8BCD\u8D8A\u4FDD\u5B88\uFF0C\u8D8A\u9AD8\u8D8A\u6D3B\u8DC3\u3002"},score_threshold:{default:.1,min:.1,max:1,step:.1,tooltip:"score_threshold\u53C2\u6570\u662F\u6A21\u578B\u8FDB\u884C\u91CD\u6392\u5E8F\u65F6\uFF0C\u5BF9\u4E8E\u6587\u672C\u5757\u53D6\u820D\u7684\u95E8\u69DB\u503C\uFF1B"}},iu={search_policy:1,enabled_rerank:!0,need_trace_source:!0,trace_by_llm:!0,is_download:!1,dependOnKb:0,enabled_faq:!1,enabled_graph:!1,enabled_question_rewrite:!1,isDefault:0},cu=[{label:"\u6DF7\u5408\u68C0\u7D22",value:1},{label:"\u5168\u6587\u68C0\u7D22",value:2},{label:"\u8BED\u4E49\u68C0\u7D22",value:3}],du=[{label:"\u89C4\u5219\u6EAF\u6E90",value:!1},{label:"\u5927\u6A21\u578B\u6EAF\u6E90",value:!0}],fe=({url:n,token:s,role:r,eventsEmit:t})=>{const h=Ge.create({baseURL:n,timeout:1e6});return h.interceptors.request.use(a=>{let u=s;return!u&&!["user/login","user/kaptcha","user/regist"].some(i=>a.url.includes(i))?(t&&t("request:error_auth",{errorMsg:"\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F",redirect:"/login"}),Promise.reject(new Error("\u672A\u767B\u5F55\u6216token\u5DF2\u8FC7\u671F"))):(a.headers.Authorization=u||"",a.headers.userName=r==="\u672A\u767B\u5F55\u7528\u6237"?"":r,a)}),h.interceptors.response.use(a=>{const u=["user/kaptcha"],l=a.data;if(u.some(I=>a.config.url&&a.config.url.includes(I))||l.size&&l.type)return l;const{success:i,errorMsg:E,errorCode:p}=l;if(i)return l;t&&t("request:error_business",{errorCode:p,errorMsg:E||"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",response:l})},a=>{var u,l,i,E,p,I,N,T,Z;if(a.message==="canceled")return Promise.reject(a);if(t){let y="request:error_network",C={errorMsg:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25",error:a};((u=a==null?void 0:a.response)==null?void 0:u.status)===401?(y="request:error_auth",C={errorMsg:"\u6CA1\u6709\u8DB3\u591F\u6743\u9650",error:a,redirect:"/login"}):(((i=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:i.errorCode)==="30013"||((p=(E=a==null?void 0:a.response)==null?void 0:E.data)==null?void 0:p.errorCode)==="30023")&&(y="request:error_business",C={errorCode:(N=(I=a==null?void 0:a.response)==null?void 0:I.data)==null?void 0:N.errorCode,errorMsg:((Z=(T=a==null?void 0:a.response)==null?void 0:T.data)==null?void 0:Z.errorMsg)||"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",error:a}),t(y,C)}return Promise.reject(a)}),{getConfigById:async a=>{try{const u=await h.get(`/qa/search/config/getById?configId=${a}`),{success:l,data:i}=u;return l?i:!1}catch(u){console.error("getConfigById",u)}},fetchDatabases:async()=>{try{const a=await h.get("/index/database/queryAllDBList"),{success:u,data:l}=a;return u?l:!1}catch(a){console.error("fetchDatabases",a)}},fetchModels:async a=>{try{const u=await h.get(`/index/modelInfo/allPage?${new URLSearchParams(a).toString()}`),{success:l,data:i}=u;return l?i:!1}catch(u){return console.log("fetchModels error",u),!1}},fetchSensitiveLibrary:async a=>{try{const u=await h.get(`/sensitive/library?${new URLSearchParams(a).toString()}`),{success:l,data:i}=u;return l?i:!1}catch(u){return console.log("fetchSensitiveLibrary error",u),!1}},fetchConfigItemLimit:async()=>{try{const a=await h.get("/qa/search/config/configItemLimit"),{success:u,data:l}=a;return u?l:!1}catch(a){console.error("fetchConfigItemLimit error",a)}},fetchKnowledgeBase:async a=>{try{const u=a?`?userName=${a}`:"";console.log("+++",u);const l=await h.get(`/index/knowledgeBase/searchList${u}`),{success:i,data:E}=l;return i?E:!1}catch(u){console.log("e",u)}},fetchGraphs:async()=>{try{const a=await h.get("/index/graph/platform/querySnapshotList?pageSize=999&pageNo=1"),{success:u,data:l}=a;return u?l:!1}catch(a){console.error("fetchGraphs",a)}},checkName:async(a,u)=>{try{const l=await h.get(`/qa/search/config/checkName?configName=${a}${u?`&configId=${u}`:""}`),{success:i,data:E}=l;if(i)return E}catch(l){return console.log("updateConversationAssistant error:",l),!1}},getBizLabelLabels:async a=>{try{const u=await h.post("/index/bizLabel/labels",a),{success:l,data:i}=u;if(l)return i}catch(u){return console.log("updateConversationAssistant error:",u),!1}},addConversationAssistant:async a=>{try{const u=await h.post("/qa/search/config/add",{...a}),{success:l,data:i}=u;if(l)return i}catch(u){return console.log("addConversationAssistant error:",u),!1}},updateConversationAssistant:async(a,u)=>{try{const l=await h.put("/qa/search/config/update",{id:a,...u}),{success:i,data:E}=l;if(i)return E}catch(l){return console.log("updateConversationAssistant error:",l),!1}}}},be=({countText:n,eventsEmit:s,data:r})=>{const[t,h]=v(!0);return d("div",{style:{marginTop:8},children:[n&&d("div",{className:"flex items-center gap-2",children:[e("span",{style:{color:t?"#4E6EF2":"#4E5969"},children:n}),t?e($e,{onClick:()=>h(g=>!g),color:"#4E6EF2",size:14}):e(Ne,{onClick:()=>h(g=>!g),color:"#4E5969",size:14})]}),e("div",{style:{display:t?"block":"none"},children:r.map(g=>e(hu,{item:g,eventsEmit:s},g.key))})]})},hu=({item:n,eventsEmit:s})=>{var h,g,b;const[r,t]=v(!0);return d("div",{className:"flex items-center justify-between",style:{padding:"8px 12px",borderRadius:6},children:[d("div",{children:[d("div",{style:{color:"#1D2129"},className:"flex items-center",children:[n.label,((h=n==null?void 0:n.tags)==null?void 0:h.length)>0&&d(je,{children:[d("span",{style:{color:"#4E5969",marginLeft:"6px",marginRight:6},children:["(",(g=n==null?void 0:n.tags)==null?void 0:g.length,"\u4E2A\u6807\u7B7E)"]}),r?e($e,{onClick:()=>t(f=>!f),color:"#4E6EF2",size:14}):e(Ne,{onClick:()=>t(f=>!f),color:"#4E5969",size:14})]})]}),((b=n==null?void 0:n.tags)==null?void 0:b.length)>0&&e("div",{className:"flex flex-wrap gap-4",style:{display:r?"block":"none",marginTop:8},children:((n==null?void 0:n.tags)||[]).map(f=>e(oe,{iconPosition:"end",type:"text",style:{backgroundColor:"#F0F0F0",padding:"2px 6px",height:22,borderRadius:2,color:"#1D2129",margin:5},icon:e(uu,{size:14,color:"#86909C",onClick:()=>{const c={...n,tags:n.tags.filter(B=>B!==f)};s("removeTag",c)}}),children:f},f))})]}),e(oe,{type:"text",icon:e(qe,{size:14}),onClick:()=>s("removeItem",n)})]},n.key)},mu=q.div`
22
- display: flex;
23
- background-color: #ffffff;
24
- border: 1px solid ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.border)==null?void 0:t.default)||"#e5e7eb"}};
25
- border-radius: ${n=>{var s,r;return((r=(s=n.$theme)==null?void 0:s.space)==null?void 0:r.radius)||"8px"}};
26
- overflow: hidden;
27
- width: ${n=>n.$width||"600px"};
28
- height: ${n=>n.$height||"400px"};
29
- position: relative;
30
- `,Le=q.div`
31
- display: flex;
32
- flex-direction: column;
33
- border-right: 1px solid ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.border)==null?void 0:t.default)||"#e5e7eb"}};
34
- overflow: hidden;
35
-
36
- &:last-child {
37
- border-right: none;
38
- }
39
- `,pu=q.div`
40
- padding: 12px 16px;
41
- font-weight: 400;
42
- font-size: 14px;
43
- display: flex;
44
- align-items: center;
45
- justify-content: space-between;
46
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.primary)||"#4E5969"}};
47
- `,fu=q.div`
48
- font-weight: 400;
49
- font-size: 14px;
50
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.primary)||"#4E6EF2"}};
51
- `,gu=q.div`
52
- padding: 12px;
53
- background-color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.background)==null?void 0:t.default)||"#ffffff"}};
54
- `,Fu=q.input`
55
- width: 100%;
56
- padding: 8px 12px 8px 12px;
57
- border: 1px solid ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.border)==null?void 0:t.default)||"#e5e7eb"}};
58
- border-radius: ${n=>{var s,r;return((r=(s=n.$theme)==null?void 0:s.space)==null?void 0:r.radius)||"6px"}};
59
- font-size: 14px;
60
- outline: none;
61
- transition: all 0.2s;
62
-
63
- &:focus {
64
- border-color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.primary)==null?void 0:t.default)||"#3b82f6"}};
65
- box-shadow: 0 0 0 3px ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.primary)==null?void 0:t.default)||"#3b82f6"}}20;
66
- }
67
-
68
- &::placeholder {
69
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.tertiary)||"#9ca3af"}};
70
- }
71
- `,Eu=q.div`
72
- position: absolute;
73
- right: 20px;
74
- top: 50%;
75
- transform: translateY(-50%);
76
- color: #9ca3af;
77
- pointer-events: none;
78
- `,ze=q.div`
79
- flex: 1;
80
- overflow-y: auto;
81
- overflow-x: hidden;
82
-
83
- &::-webkit-scrollbar {
84
- width: 6px;
85
- }
86
-
87
- &::-webkit-scrollbar-track {
88
- background: #f1f1f1;
89
- }
90
-
91
- &::-webkit-scrollbar-thumb {
92
- background: #c1c1c1;
93
- border-radius: 3px;
94
-
95
- &:hover {
96
- background: #a8a8a8;
97
- }
98
- }
99
- `,Pe=q.div`
100
- padding: 10px 16px;
101
- cursor: ${n=>n.$disabled?"not-allowed":"pointer"};
102
- transition: all 0.2s;
103
- display: flex;
104
- align-items: center;
105
- justify-content: space-between;
106
- opacity: ${n=>n.$disabled?.5:1};
107
-
108
- &:hover {
109
- background-color: ${n=>{var s,r,t;return n.$disabled?"transparent":((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.background)==null?void 0:t.hover)||"#f3f4f6"}};
110
- }
111
-
112
- &:last-child {
113
- border-bottom: none;
114
- }
115
- `,Me=q.span`
116
- flex: 1;
117
- font-size: 14px;
118
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.primary)||"#111827"}};
119
- overflow: hidden;
120
- text-overflow: ellipsis;
121
- white-space: nowrap;
122
- `,Te=q.button`
123
- display: flex;
124
- align-items: center;
125
- justify-content: center;
126
- width: 68px;
127
- border: none;
128
- background-color: #ebecf3;
129
- border-radius: 4px;
130
- cursor: pointer;
131
- font-size: 12px;
132
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.secondary)||"#1D2129"}};
133
- transition: all 0.2s;
134
-
135
- &:disabled {
136
- cursor: not-allowed;
137
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.secondary)||"#C9CDD4"}};
138
- }
139
- `,Oe=q.div`
140
- padding: 40px 20px;
141
- text-align: center;
142
- color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.text)==null?void 0:t.tertiary)||"#9ca3af"}};
143
- font-size: 14px;
144
- `;q.span`
145
- display: inline-flex;
146
- align-items: center;
147
- justify-content: center;
148
- min-width: 20px;
149
- height: 20px;
150
- padding: 0 6px;
151
- background-color: ${n=>{var s,r,t;return((t=(r=(s=n.$theme)==null?void 0:s.colors)==null?void 0:r.primary)==null?void 0:t.default)||"#3b82f6"}};
152
- color: white;
153
- border-radius: 10px;
154
- font-size: 12px;
155
- font-weight: 500;
156
- margin-left: 8px;
157
- `;const ge=Xe(({dataSource:n,value:s=[],onConfirm:r,maxCount:t=0,searchPlaceholder:h="\u641C\u7D22...",title:g="",showSearch:b=!0,filterOption:f,renderItem:c,renderSelectedItem:B,className:M,style:$,styles:A,height:F,width:R},k)=>{const a=Ye(),u=Ie(Ie({theme:O,mode:"light"},a),A),[l,i]=v(s),[E,p]=v("");W(()=>{i(s)},[s]),me(()=>new Set(s.map(o=>o.key)),[s]);const I=me(()=>new Set(l.map(o=>o.key)),[l]);Je(k,()=>({getSelectedItems:()=>l,confirm:()=>{r==null||r(l)}}),[l,r]);const T=f||((o,_)=>{var H;if(!o)return!0;const w=o.toLowerCase();return _.label.toLowerCase().includes(w)||((H=_.tags)==null?void 0:H.some(V=>V.toLowerCase().includes(w)))||!1}),Z=me(()=>(n||[]).filter(o=>T(E,o)),[n,E,T]),y=o=>{const _=I.has(o.key);let w;if(_)w=(l||[]).filter(H=>H.key!==o.key);else{if(t>0&&l.length>=t)return;w=[...l,o]}i(w)},C=(o,_)=>{i(w=>w.map(V=>V.key==o?{...V,tags:_}:V))},z=o=>{const _=(l||[]).filter(w=>w.key!==o.key);i(_)},x=o=>I.has(o);return t>0&&l.length>=t,d(mu,{$theme:u.theme||O,$width:R,$height:F,className:M,style:$,children:[d(Le,{$theme:u.theme||O,style:{flex:1},children:[b&&e(gu,{$theme:u.theme||O,children:d("div",{style:{position:"relative"},children:[e(Eu,{children:e(su,{size:16})}),e(Fu,{$theme:u.theme||O,type:"text",placeholder:h,value:E,onChange:o=>p(o.target.value)})]})}),e(ze,{children:Z.length===0?e(Oe,{$theme:u.theme||O,children:E?"\u672A\u627E\u5230\u5339\u914D\u9879":"\u6682\u65E0\u6570\u636E"}):Z.map(o=>{const _=x(o.key);return d(Pe,{$theme:u.theme||O,$selected:_,children:[e(Me,{$theme:u.theme||O,children:c?c(o):o.label}),_&&e(Te,{$theme:u.theme||O,onClick:w=>{w.stopPropagation(),z(o)},disabled:!0,children:"\u5DF2\u6DFB\u52A0"}),!_&&e(Te,{$theme:u.theme||O,onClick:w=>{w.stopPropagation(),y(o)},children:"\u6DFB\u52A0"})]},o.key)})})]}),d(Le,{$theme:u.theme||O,style:{flex:1},children:[d(pu,{$theme:u.theme||O,children:[t>0?`\u5DF2\u9009\uFF1A${l.length}/${t}\u4E2A${g}`:`\u5DF2\u9009\uFF1A${l.length}\u4E2A${g}`,e(fu,{$theme:u.theme||O,onClick:o=>{o.stopPropagation(),i([])},children:"\u6E05\u7A7A"})]}),e(ze,{children:l.length===0?e(Oe,{$theme:u.theme||O,children:"\u6682\u65E0\u5DF2\u9009\u9879"}):l.map(o=>{var w,H,V;const _=ue=>C(o.key,ue);return d(Pe,{$theme:u.theme||O,children:[e(Me,{$theme:u.theme||O,children:B?B(o,_):o.label}),e(qe,{size:14,color:((V=(H=(w=u.theme)==null?void 0:w.colors)==null?void 0:H.text)==null?void 0:V.secondary)||"#86909C",style:{cursor:"pointer"},onClick:ue=>{ue.stopPropagation(),z(o)}})]},o.key)})})]})]})});ge.displayName="SearchableSelector";const we="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='2.22222'%20fill='%23FFCC3C'/%3e%3cpath%20d='M13.3263%2012.7917H7.53763C7.33426%2012.8116%207.17923%2012.9825%207.17923%2013.1867C7.17923%2013.3909%207.33426%2013.5618%207.53763%2013.5817H13.3277C13.3828%2013.5871%2013.4384%2013.5809%2013.4909%2013.5634C13.5435%2013.546%2013.5918%2013.5178%2013.6328%2013.4806C13.6738%2013.4434%2013.7066%2013.3981%2013.729%2013.3474C13.7514%2013.2968%2013.763%2013.2421%2013.763%2013.1867C13.763%2013.1313%2013.7514%2013.0766%2013.729%2013.026C13.7066%2012.9753%2013.6738%2012.93%2013.6328%2012.8928C13.5918%2012.8556%2013.5435%2012.8274%2013.4909%2012.8099C13.4384%2012.7925%2013.3828%2012.7863%2013.3277%2012.7917H13.3263ZM9.19742%207.60418L8.84232%208.55193H9.57339L9.19742%207.60418Z'%20fill='white'/%3e%3cpath%20d='M15.3211%2014.7707V6.9692H14.4704V14.3543H6.70511C6.06668%2014.3392%205.55704%2013.8173%205.55704%2013.1788C5.55704%2012.5402%206.06668%2012.0184%206.70511%2012.0033H13.352C13.4644%2012.0075%2013.5735%2011.9648%2013.653%2011.8852C13.6923%2011.8459%2013.7231%2011.7988%2013.7434%2011.747C13.7638%2011.6952%2013.7731%2011.6398%2013.771%2011.5842V5.20102C13.7736%205.14526%2013.7646%205.08958%2013.7445%205.03752C13.7244%204.98546%2013.6936%204.93816%2013.6542%204.89865C13.6148%204.85915%2013.5675%204.82832%2013.5155%204.80812C13.4634%204.78792%2013.4077%204.7788%2013.352%204.78134H6.70511C5.60281%204.80136%204.71609%205.69369%204.70291%206.79599V13.1759C4.71609%2014.283%205.61038%2015.1773%206.71756%2015.1905H14.8893C15.0042%2015.1994%2015.1173%2015.1585%2015.1999%2015.0782C15.2407%2015.0385%2015.2727%2014.9905%2015.2936%2014.9375C15.3145%2014.8845%2015.3239%2014.8276%2015.3211%2014.7707ZM8.98782%206.78585H9.44888L10.7213%209.92562H10.2475L9.9075%209.06759H8.51871L8.19742%209.92562H7.72354L8.98782%206.78585Z'%20fill='white'/%3e%3c/svg%3e",{Item:Cu}=pe,Bu=({url:n,token:s,role:r,eventsEmit:t,sectionData:h,defaultAnswer:g,form:b})=>{const[f,c]=v([]),[B,M]=v([]),[$,A]=v(!1),[F,R]=v(!1),k=ae(null),{fetchSensitiveLibrary:a}=fe({url:n,token:s,role:r,eventsEmit:t});W(()=>{u()},[]),W(()=>{if(h&&(f==null?void 0:f.length)>0){let p=h?Array.isArray(h)?h:h.split(","):[],I=[];p.forEach(N=>{const T=(f||[]).find(Z=>Z.key===N);T&&I.push({key:T.key,label:T.label})}),M(I)}},[h,f]),W(()=>{g&&R(!0)},[g]);const u=async()=>{try{const p=await a({pageNo:1,pageSize:9999});if(p!=null&&p.records){const I=((p==null?void 0:p.records)||[]).map(N=>({key:N.id+"",label:N.name}));c(I)}}catch(p){console.error(p)}},l=(p,I)=>{switch(p){case"removeItem":const N=B.filter(T=>T.key!==I.key);M([...N]),i(N);break}},i=p=>{const I=p.map(N=>(N==null?void 0:N.key)||"").filter(N=>N).join(",");t&&t("sensitive_selected",I)},E=()=>{var I;const p=((I=k.current)==null?void 0:I.getSelectedItems())||[];M(p),A(!1),i(p)};return d("div",{style:{borderBottom:"1px solid #E5E6EB",padding:"12px 0 "},children:[d("div",{className:"flex items-center justify-between",children:[d("div",{className:"flex items-center",children:[e("img",{src:we}),e("span",{className:"font-medium ",style:{marginLeft:"10px"},children:"\u654F\u611F\u8BCD"})]}),e(oe,{color:"primary",variant:"outlined",size:"small",icon:e(Be,{size:14}),onClick:()=>A(!0),children:"\u6DFB\u52A0"})]}),e(Se,{checked:F,onChange:p=>{R(p.target.checked),p.target.checked?b.setFieldsValue({defaultAnswer:ou}):b.setFieldsValue({defaultAnswer:""})},style:{marginBottom:8,marginTop:8},children:"\u81EA\u5B9A\u4E49\u56DE\u590D"}),F&&e(Cu,{label:"\u81EA\u5B9A\u4E49\u56DE\u590D\u5185\u5BB9",name:"defaultAnswer",layout:"vertical",children:e(Ee.TextArea,{style:{height:"55px",resize:"none"}})}),(B==null?void 0:B.length)>0&&e(be,{countText:(B==null?void 0:B.length)>0?`\u5DF2\u9009\uFF1A${B==null?void 0:B.length}\u4E2A\u654F\u611F\u8BCD\u5E93`:void 0,eventsEmit:l,data:B}),e(ye,{width:740,title:"\u9009\u62E9\u654F\u611F\u8BCD",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",open:$,onOk:E,onCancel:()=>A(!1),destroyOnHidden:!0,className:"assistant-config-resource-bind-modal",children:e(ge,{ref:k,dataSource:f,value:B,searchPlaceholder:"\u641C\u7D22\u540D\u79F0...",width:"700px",height:"500px",title:"\u654F\u611F\u8BCD\u5E93",renderItem:p=>d("div",{className:"flex ",children:[e("img",{src:we,alt:"add"}),e("span",{style:{marginLeft:8,marginRight:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:p.label,children:p.label})]}),renderSelectedItem:(p,I)=>d("div",{className:"flex items-center",children:[e("img",{src:we,alt:"add"}),e("div",{style:{marginLeft:"12px"},children:e("div",{style:{fontWeight:500},children:p.label})})]})})})]})},ve="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='20'%20height='20'%20rx='2.22222'%20fill='%2300B2F9'/%3e%3cpath%20d='M5.3125%2013.9672V13.975C5.32812%2014.6938%205.89922%2015.2734%206.61875%2015.2734H13.9062C14.3375%2015.2734%2014.6875%2014.9289%2014.6875%2014.4977V5.50703C14.6875%205.40447%2014.6673%205.30292%2014.628%205.20818C14.5887%205.11344%2014.5312%205.02736%2014.4586%204.95488C14.3861%204.8824%2014.2999%204.82492%2014.2052%204.78575C14.1104%204.74657%2014.0088%204.72646%2013.9062%204.72656H6.875C6.01172%204.72656%205.3125%205.42031%205.3125%206.28359V13.9672ZM7.5%209.24531V6.25C7.5%206.07813%207.64062%205.9375%207.8125%205.9375H9.6875C9.86016%205.9375%2010%206.07813%2010%206.25V9.24531C10%209.30716%209.98175%209.36762%209.94741%209.41906C9.91308%209.47049%209.86425%209.51058%209.80712%209.53426C9.74999%209.55793%209.68712%209.56412%209.62647%209.55204C9.56581%209.53996%209.51011%209.51016%209.46641%209.46641L8.97109%208.97109C8.94207%208.94204%208.90761%208.91899%208.86967%208.90326C8.83173%208.88754%208.79107%208.87944%208.75%208.87944C8.70893%208.87944%208.66827%208.88754%208.63033%208.90326C8.59239%208.91899%208.55793%208.94204%208.52891%208.97109L8.03359%209.46641C7.98989%209.51016%207.93418%209.53996%207.87353%209.55204C7.81288%209.56412%207.75001%209.55793%207.69288%209.53426C7.63575%209.51058%207.58692%209.47049%207.55259%209.41906C7.51825%209.36762%207.49995%209.30716%207.5%209.24531ZM6.54375%2014.2063C6.45208%2014.1156%206.40625%2014.0052%206.40625%2013.875C6.40625%2013.7458%206.45208%2013.6354%206.54375%2013.5438C6.6349%2013.4521%206.74531%2013.4062%206.875%2013.4062H13.5938V14.3438H6.875C6.74531%2014.3438%206.6349%2014.2979%206.54375%2014.2063Z'%20fill='white'/%3e%3c/svg%3e",yu=({url:n,token:s,role:r,sectionData:t,createBy:h,eventsEmit:g})=>{const[b,f]=v(),[c,B]=v([]),[M,$]=v(!1),A=ae(null),[F,R]=v(!1),[k,a]=v([]),u=ae(new Map).current,{fetchKnowledgeBase:l,getBizLabelLabels:i}=fe({url:n,token:s,role:r,eventsEmit:g}),E=ae(!1);W(()=>{E.current||(h?(p(h),E.current=!0):(p(),E.current=!0))},[h]),W(()=>{if(t&&(b==null?void 0:b.length)>0){const y=t==null?void 0:t.knowledge_base_name_source,C=y&&(Array.isArray(y)?y:y.split(";"));let z=[];(C||[]).forEach(x=>{const o=((t==null?void 0:t.selectedKnowledgeBase)||[]).find(w=>w.name==x),_=(b||[]).find(w=>w.knowledge_base_name_source===x);if(_){const{key:w,label:H,knowledge_base_name:V,knowledge_base_name_source:ue}=_;z.push({key:w,label:H,knowledge_base_name:V,knowledge_base_name_source:ue,tags:o==null?void 0:o.labels})}}),B(z)}},[t,b]);const p=async y=>{try{const C=await l(y);if(C){const z=(C||[]).map(x=>({key:x.id,label:x.kbName,knowledge_base_name:x.primitiveName,knowledge_base_name_source:x.kbName}));f(z)}}catch(C){console.error(C)}},I=(y,C)=>{switch(y){case"removeItem":const z=c.filter(o=>o.key!==C.key);B([...z]),N(z);break;case"removeTag":const x=c.findIndex(o=>o.key==C.key);x!==-1&&(c[x]=C),B([...c]),N(c);break}},N=y=>{const C=(y||[]).map(o=>(o==null?void 0:o.knowledge_base_name)||"").filter(o=>o).join(";"),z=(y||[]).map(o=>(o==null?void 0:o.knowledge_base_name_source)||"").filter(o=>o).join(";"),x=(y||[]).filter(o=>{var _;return Array.isArray(o==null?void 0:o.tags)&&((_=o.tags)==null?void 0:_.length)>0}).map(o=>({id:o.key,name:o.label,knowledge_base_name_source:o.knowledge_base_name,labels:o.tags}));g&&g("knowledge_selected",{knowledge_base_name:C,knowledge_base_name_source:z,selectedKnowledgeBase:x})},T=()=>{var C;const y=((C=A.current)==null?void 0:C.getSelectedItems())||[];B(y),$(!1),N(y)},Z=async(y,C)=>{if(y){const z=u.get(C);if(z){a(z);return}if(!F)try{R(!0);const x=await i({kbNames:[C]});if(Array.isArray(x)){const o=x.length?x[0].label:"",_=o?(o||"").split(",").map(w=>({label:w,value:w})):[];u.set(C,_),a(_)}R(!1)}catch(x){console.error("Error fetching data:",x),R(!1)}}};return d("div",{style:{borderBottom:"1px solid #E5E6EB",padding:"12px 0 "},children:[d("div",{className:"flex items-center justify-between",children:[d("div",{className:"flex items-center",children:[e("img",{src:ve}),e("span",{className:"font-medium ",style:{marginLeft:"10px"},children:"\u77E5\u8BC6\u5E93"})]}),e("div",{className:"flex items-center gap-2",children:e(oe,{color:"primary",variant:"outlined",size:"small",icon:e(Be,{size:14}),onClick:()=>$(!0),children:"\u6DFB\u52A0"})})]}),(c==null?void 0:c.length)>0&&e(be,{countText:(c==null?void 0:c.length)>0?`\u5DF2\u9009\uFF1A${c==null?void 0:c.length}\u4E2A\u77E5\u8BC6\u5E93`:void 0,eventsEmit:I,data:c}),e(ye,{width:740,className:"assistant-config-resource-bind-modal",title:"\u9009\u62E9\u77E5\u8BC6\u5E93",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",open:M,onOk:T,onCancel:()=>$(!1),destroyOnHidden:!0,children:e(ge,{ref:A,dataSource:b,value:c,searchPlaceholder:"\u641C\u7D22\u540D\u79F0...",width:"700px",height:"500px",title:"\u77E5\u8BC6\u5E93",renderItem:y=>d("div",{className:"flex ",children:[e("img",{src:ve,alt:"add"}),e("span",{style:{marginLeft:8,marginRight:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:y.label,children:y.label})]}),renderSelectedItem:(y,C)=>d("div",{className:"flex ",children:[e("img",{src:ve,alt:"add"}),d("div",{style:{marginLeft:"12px"},children:[e("div",{style:{marginBottom:"8px",fontWeight:500},children:y.label}),e(G,{mode:"tags",placeholder:"\u9009\u62E9\u6807\u7B7E...",maxTagCount:1,value:y.tags||[],onChange:z=>{C(z)},style:{width:250},options:k,loading:F,onOpenChange:z=>{Z(z,y.knowledge_base_name)}})]})]})})})]})},bu=Ue.memo(yu),ke="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='24'%20height='24'%20rx='3.55556'%20fill='%23925BFF'/%3e%3cpath%20d='M11.9971%2011.265C15.249%2011.265%2017.8891%2010.443%2017.8891%209.423V7.95288C17.8891%206.93291%2015.2492%206.11084%2011.9971%206.11084C8.74513%206.11084%206.10504%206.93276%206.10504%207.95288V9.42285C6.10504%2010.437%208.73898%2011.265%2011.9971%2011.265Z'%20fill='white'/%3e%3cpath%20d='M11.9971%2014.577C15.249%2014.577%2017.8891%2013.7551%2017.8891%2012.7349V10.527C17.8891%2011.5469%2015.2492%2012.369%2011.9971%2012.369C8.74513%2012.369%206.10504%2011.5471%206.10504%2010.527V12.7349C6.10504%2013.749%208.73898%2014.577%2011.9971%2014.577Z'%20fill='white'/%3e%3cpath%20d='M11.9971%2015.681C8.7451%2015.681%206.11102%2014.859%206.11102%2013.839V16.0469C6.11102%2017.0609%208.74496%2017.889%2012.0031%2017.889C15.255%2017.889%2017.8951%2017.0671%2017.8951%2016.0469V13.8391C17.889%2014.859%2015.249%2015.681%2011.9971%2015.681Z'%20fill='white'/%3e%3c/svg%3e",Re=10,Au=({url:n,token:s,role:r,eventsEmit:t,sectionData:h,disabled:g})=>{const[b,f]=v([]),[c,B]=v([]),[M,$]=v(!1),A=ae(null),{fetchDatabases:F}=fe({url:n,token:s,role:r,eventsEmit:t});W(()=>{R()},[]),W(()=>{if(h){let u=[];(h||[]).map(l=>{const i=(b||[]).find(E=>E.key===l.key);if(i){const{key:E,label:p}=i;u.push({key:E,label:p})}}),B(u)}},[h,b]);const R=async()=>{try{const u=await F();if(u){const l=(u||[]).map(i=>({key:i.primitiveName,label:i.name}));f(l)}}catch(u){console.error(u)}},k=(u,l)=>{switch(u){case"removeItem":const i=c.filter(E=>E.key!==l.key);B([...i]),t&&t("database_selected",i);break}},a=()=>{var l;const u=((l=A.current)==null?void 0:l.getSelectedItems())||[];B(u),$(!1),t&&t("database_selected",u)};return d("div",{style:{borderBottom:"1px solid #E5E6EB",padding:"12px 0 "},children:[d("div",{className:"flex items-center justify-between",children:[d("div",{className:"flex items-center",children:[e("img",{src:ke}),e("span",{className:"font-medium ",style:{marginLeft:"10px"},children:"\u6570\u636E\u5E93"})]}),e("div",{className:"flex items-center gap-2",children:e(oe,{color:"primary",variant:"outlined",size:"small",icon:e(Be,{size:14}),onClick:()=>$(!0),disabled:c.length>=Re||g,children:"\u6DFB\u52A0"})})]}),(c==null?void 0:c.length)>0&&e(be,{countText:(c==null?void 0:c.length)>0?`\u5DF2\u9009\uFF1A${c==null?void 0:c.length}\u4E2A\u6570\u636E\u5E93`:void 0,eventsEmit:k,data:c}),e(ye,{width:740,title:"\u9009\u62E9\u6570\u636E\u5E93",className:"assistant-config-resource-bind-modal",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",open:M,onOk:a,onCancel:()=>$(!1),destroyOnHidden:!0,children:e(ge,{ref:A,dataSource:b,value:c,searchPlaceholder:"\u641C\u7D22\u540D\u79F0...",width:"700px",height:"500px",title:"\u6570\u636E\u5E93",maxCount:Re,renderItem:u=>d("div",{className:"flex ",children:[e("img",{src:ke,alt:"add"}),e("span",{style:{marginLeft:8,marginRight:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:u.label,children:u.label})]}),renderSelectedItem:(u,l)=>d("div",{className:"flex items-center",children:[e("img",{src:ke,alt:"add"}),e("div",{style:{marginLeft:"12px"},children:e("div",{style:{fontWeight:500},children:u.label})})]})})})]})},De="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='24'%20height='24'%20rx='3.55556'%20fill='%2300C1B8'/%3e%3cpath%20d='M17.9887%2012.582C18.1207%2013.6621%2017.2267%2014.5801%2016.1526%2014.4901C15.3306%2014.4181%2014.6645%2013.7521%2014.6045%2012.924C14.5745%2012.558%2014.6645%2012.21%2014.8445%2011.9159C14.9285%2011.7779%2014.9045%2011.6039%2014.8025%2011.4899L14.3885%2011.0339C14.2805%2010.9139%2014.1005%2010.8839%2013.9565%2010.9559C13.6144%2011.1239%2013.2304%2011.2199%2012.8224%2011.2199C12.6244%2011.2199%2012.4324%2011.1959%2012.2464%2011.1539C12.0963%2011.1179%2011.9463%2011.1779%2011.8563%2011.3039L11.2803%2012.1259C11.1783%2012.276%2011.1963%2012.474%2011.3223%2012.606C11.8983%2013.188%2012.2464%2013.9921%2012.2284%2014.8741C12.1924%2016.4702%2010.9203%2017.7963%209.32417%2017.9043C7.45804%2018.0243%205.90994%2016.4942%206.00595%2014.6281C6.08995%2013.038%207.38604%2011.7599%208.97614%2011.6879C9.42017%2011.6699%209.8402%2011.7419%2010.2302%2011.8919C10.3922%2011.9519%2010.5722%2011.8979%2010.6743%2011.7599L11.1663%2011.0579C11.2743%2010.9019%2011.2503%2010.6919%2011.1123%2010.5658C10.5302%2010.0498%2010.1882%209.26976%2010.2662%208.4177C10.3742%207.18162%2011.3823%206.18556%2012.6244%206.09555C14.1245%205.98154%2015.3846%207.17562%2015.3846%208.65172C15.3846%209.20376%2015.2106%209.70779%2014.9105%2010.1278C14.8085%2010.2658%2014.8205%2010.4578%2014.9345%2010.5898L15.3786%2011.0819C15.4746%2011.1899%2015.6306%2011.2259%2015.7626%2011.1779C16.0086%2011.0939%2016.2786%2011.0639%2016.5606%2011.1119C17.3047%2011.2259%2017.8987%2011.8319%2017.9887%2012.582Z'%20fill='white'/%3e%3c/svg%3e",xu=({url:n,token:s,role:r,eventsEmit:t,sectionData:h})=>{const[g,b]=v([]),[f,c]=v([]),[B,M]=v(!1),$=ae(null),{fetchGraphs:A}=fe({url:n,token:s,role:r,eventsEmit:t});W(()=>{F()},[]),W(()=>{if(h){let u=[];(h||[]).map(l=>{const i=(g||[]).find(E=>E.key===l.index_name);if(i){const{key:E,label:p}=i;u.push({key:E,label:p})}}),c(u)}},[h,g]);const F=async()=>{try{const u=await A();if(u!=null&&u.dataList){const l=((u==null?void 0:u.dataList)||[]).map(i=>({key:i.schemaId,label:i.name}));b(l)}}catch(u){console.error(u)}},R=(u,l)=>{switch(u){case"removeItem":const i=f.filter(E=>E.key!==l.key);c([...i]),k(i);break}},k=u=>{const l=(u||[]).map(i=>({graph_name:i.label,index_name:i.key}));t&&t("graph_selected",l)},a=()=>{var l;const u=((l=$.current)==null?void 0:l.getSelectedItems())||[];c(u),M(!1),k(u)};return d("div",{style:{borderBottom:"1px solid #E5E6EB",padding:"12px 0 "},children:[d("div",{className:"flex items-center justify-between",children:[d("div",{className:"flex items-center",children:[e("img",{src:De}),e("span",{className:"font-medium ",style:{marginLeft:"10px"},children:"\u56FE\u8C31\u5E93"})]}),e("div",{className:"flex items-center gap-2",children:e(oe,{color:"primary",variant:"outlined",size:"small",icon:e(Be,{size:14}),onClick:()=>M(!0),children:"\u6DFB\u52A0"})})]}),(f==null?void 0:f.length)>0&&e(be,{countText:(f==null?void 0:f.length)>0?`\u5DF2\u9009\uFF1A${f==null?void 0:f.length}\u4E2A\u56FE\u8C31`:void 0,eventsEmit:R,data:f}),e(ye,{width:740,title:"\u9009\u62E9\u56FE\u8C31",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",className:"assistant-config-resource-bind-modal",open:B,onOk:a,destroyOnHidden:!0,onCancel:()=>M(!1),children:e(ge,{ref:$,dataSource:g,value:f,searchPlaceholder:"\u641C\u7D22\u540D\u79F0...",width:"700px",height:"500px",title:"\u56FE\u8C31",renderItem:u=>d("div",{className:"flex ",children:[e("img",{src:De,alt:"add"}),e("span",{style:{marginLeft:8,marginRight:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:u.label,children:u.label})]}),renderSelectedItem:u=>d("div",{className:"flex items-center",children:[e("img",{src:De,alt:"add"}),e("div",{style:{marginLeft:"12px"},children:e("div",{style:{fontWeight:500},children:u.label})})]})})})]})},_u=({value:n,onChange:s,min:r,max:t,step:h,disabled:g,sliderStyle:b,inputStyle:f,inputWidth:c=90})=>{const B=$=>{const A=Array.isArray($)?$[0]:$;s==null||s(A)},M=$=>{s==null||s($)};return d(tu,{style:{width:"100%"},children:[e(Qe,{min:r,max:t,step:h,disabled:g,value:n,onChange:B,style:{width:"200px",flex:1,...b}}),e(eu,{min:r,max:t,step:h,disabled:g,controls:!1,value:n,onChange:M,style:{width:c,...f}})]})},{Item:wu}=pe,de=({label:n,name:s,configScale:r})=>{const t=me(()=>r[s],[r]),h=(g,b)=>({validator(f,c){return c==null?Promise.reject("\u8BF7\u8F93\u5165\u6709\u6548\u6570\u5B57"):typeof+c!="number"||isNaN(+c)?Promise.reject("\u53EA\u80FD\u8F93\u5165\u6570\u5B57"):c<g||c>b?Promise.reject(`\u8BF7\u8F93\u5165${g}\u5230${b}\u4E4B\u95F4\u7684\u6570\u5B57`):Promise.resolve()}});return e(ee,{span:12,children:e(wu,{label:n,name:s,tooltip:t.tooltip,rules:[{required:!0,message:""},h(t.min,t.max)],children:e(_u,{min:t.min,max:t.max,step:t.step})})})},{Item:P}=pe,zu=({url:n,token:s,role:r,id:t,showDatabase:h,showGraph:g,isShare:b,disabled:f,eventsEmit:c,showGraphEnhanced:B,CustomComponents:M})=>{const{ContentLoading:$}=M,[A]=pe.useForm(),[F,R]=v(),[k,a]=v(),[u,l]=v(),[i,E]=v(),[p,I]=v(),[N,T]=v(!0),[Z,y]=v(!1),[C,z]=v(le),x=ae({}),{getConfigById:o,fetchModels:_,fetchConfigItemLimit:w,checkName:H,addConversationAssistant:V,updateConversationAssistant:ue}=fe({url:n,token:s,role:r,eventsEmit:c});W(()=>{He()},[t]),W(()=>{t?(Array.isArray(k)&&Array.isArray(u)&&A.validateFields(["model_name","plan_model_name","recommend_model_name","rerank_model_name","multi_model_name","embedding_model_name"]),Array.isArray(i)&&A.validateFields(["multi_model_name"])):(Array.isArray(k)&&(k==null?void 0:k.length)==0&&A.validateFields(["model_name","plan_model_name","recommend_model_name","embedding_model_name"]),Array.isArray(u)&&(u==null?void 0:u.length)==0&&A.validateFields(["rerank_model_name"]),Array.isArray(i)&&(i==null?void 0:i.length)==0&&A.validateFields(["multi_model_name"]),Array.isArray(p)&&(p==null?void 0:p.length)==0&&A.validateFields(["embedding_model_name"]))},[u,k,i,p,t]);const He=async()=>{let m;if(t){N||T(!0);try{const D=await o(t);if(D){const{configJson:S,...U}=D,K=S&&JSON.parse(S),{knowledge_base_name:Y,knowledge_base_name_source:X,selectedKnowledgeBase:te,sensitiveWordIds:ne,database_name:se,graph_nb_name:J}=K;m={...U,...K},x.current={knowledge_base_name:Y,knowledge_base_name_source:X,selectedKnowledgeBase:te,sensitiveWordIds:ne,database_name:se,graph_nb_name:J},R(m),A.setFieldsValue(m),T(!1)}}catch{}}else T(!1);await Ve(m)},Ve=async m=>{var D,S,U,K,Y;try{const[X,te,ne,se,J]=await Promise.allSettled([_({pageNum:1,pageSize:9999,status:1,type:1}),_({pageNum:1,pageSize:9999,status:1,type:3}),_({pageNum:1,pageSize:9999,status:1,type:4}),w(),_({pageNum:1,pageSize:9999,status:1,type:2})]);if(X.status==="fulfilled"&&X.value){const L=(((D=X.value)==null?void 0:D.records)||[]).map(Q=>({...Q,label:Q.modelName,value:Q.modelName}));if(L.length>0){const Q=(S=L.find(Ae=>Ae.value==(m==null?void 0:m.model_name)))==null?void 0:S.maxTokens;(m==null?void 0:m.max_tokens)>Q&&A.setFieldsValue({max_tokens:Q})}a(L)}if(te.status==="fulfilled"&&te.value){const j=(((U=te.value)==null?void 0:U.records)||[]).map(L=>({label:L.modelName||L.name,value:L.modelName||L.name}));l(j),j.length>0&&!(m!=null&&m.rerank_model_name)&&A.setFieldsValue({rerank_model_name:j[0].value})}if(ne.status==="fulfilled"&&ne.value){const j=(((K=ne.value)==null?void 0:K.records)||[]).map(L=>({label:L.modelName||L.name,value:L.modelName||L.name}));E(j),j.length>0&&!(m!=null&&m.multi_model_name)&&A.setFieldsValue({multi_model_name:j[0].value})}if(J.status==="fulfilled"&&J.value){const j=(((Y=J.value)==null?void 0:Y.records)||[]).map(L=>({label:L.modelName||L.name,value:L.modelName||L.name}));I(j),j.length>0&&!(m!=null&&m.embedding_model_name)&&A.setFieldsValue({embedding_model_name:j[0].value})}if(se.status==="fulfilled"&&se.value&&se.value){const j=se.value;Object.keys(le).forEach(L=>{if(j.hasOwnProperty(L)){const{max:Q,min:Ae}=j[L];le[L]={...le[L],min:Ae,max:Q}}}),z(le)}}catch(X){console.error("\u83B7\u53D6\u5217\u8868\u5931\u8D25:",X)}},Ke=async(m,D)=>await H(D,t)?(xe.warning("\u540D\u79F0\u91CD\u590D\uFF01",2),Promise.reject("\u540D\u79F0\u91CD\u590D")):Promise.resolve(),ie=(m,D)=>({validator(S,U){return U?Array.isArray(m)&&m.length===0||!m.find(K=>K.value==U)?Promise.reject("\u6A21\u578B\u65E0\u6CD5\u4F7F\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"):Promise.resolve():Array.isArray(m)&&m.length===0?Promise.reject("\u6682\u65E0\u53EF\u7528\u6A21\u578B\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458"):Promise.reject(D)}}),Fe=(m,D)=>{switch(m){case"knowledge_selected":x.current={...x.current,...D};break;case"sensitive_selected":x.current={...x.current,sensitiveWordIds:D};break;case"database_selected":x.current={...x.current,database_name:D};break;case"graph_selected":x.current={...x.current,graph_nb_name:D};break}},We=async()=>{var D;let m={};try{y(!0);const S=await A.validateFields(),{knowledge_base_name:U,knowledge_base_name_source:K,selectedKnowledgeBase:Y,sensitiveWordIds:X,database_name:te,graph_nb_name:ne}=x.current;S.thinking=((D=k.find(J=>J.modelName==S.model_name))==null?void 0:D.thinking)||!1,g&&(S.enabled_nb_graph=!0),m={configJson:JSON.stringify({...S,knowledge_base_name:U,knowledge_base_name_source:K,selectedKnowledgeBase:Y,sensitiveWordIds:X,...h?{database_name:te}:{},...g?{graph_nb_name:ne}:{}}),name:S.config_name,isDefault:S.isDefault,defaultAnswer:S.defaultAnswer,dependOnKb:S.dependOnKb,sensitiveWordIds:X},t?await ue(t,m)&&(xe.success("\u66F4\u65B0\u52A9\u624B\u914D\u7F6E\u6210\u529F"),c&&c("go_back")):await V(m)&&(xe.success("\u65B0\u589E\u52A9\u624B\u914D\u7F6E\u6210\u529F"),c&&c("go_back"))}catch(S){console.error("submit error",S)}finally{y(!1)}},Ze=me(()=>{const m={};return Object.keys(le).forEach(D=>{var S;m[D]=(S=le[D])==null?void 0:S.default}),{...iu,...m}},[]);return d("div",{style:{height:"100%",width:"100%"},children:[d("div",{className:"flex items-center justify-between",style:{width:"100%",padding:"4px 10px 16px 10px"},children:[d("div",{className:"flex items-center",children:[e(nu,{color:"#2468F2",onClick:()=>c&&c("go_back")}),e("div",{className:"text-[16px] text-[#1D2129] bold",style:{marginLeft:20},children:t?"\u7F16\u8F91\u4F1A\u8BDD\u52A9\u624B":"\u65B0\u5EFA\u4F1A\u8BDD\u52A9\u624B"})]}),!N&&e(oe,{type:"primary",onClick:()=>We(),loading:Z,disabled:f,children:"\u786E\u5B9A"})]}),N?$&&e($,{}):e(pe,{style:{padding:20,height:"calc(100vh - 150px)",backgroundColor:"#fff"},form:A,layout:"vertical",initialValues:Ze,disabled:f,colon:!1,children:d(re,{gutter:24,style:{height:"100%"},children:[d(ee,{span:12,style:{borderRight:"1px solid #E5E6EB",padding:"10px 32px",height:"100%",overflowY:"auto"},children:[e(P,{label:"\u52A9\u624B\u540D\u79F0",name:"config_name",validateTrigger:"onBlur",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u52A9\u624B\u540D\u79F0"},{validator:Ke}],children:e(Ee,{placeholder:"\u8BF7\u8F93\u5165"})}),d(re,{gutter:16,children:[e(ee,{span:12,children:e(P,{label:"\u95EE\u7B54\u6A21\u578B",name:"model_name",rules:[{required:!0,message:""},ie(k,"\u8BF7\u9009\u62E9\u95EE\u7B54\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:k,notFoundContent:e(ce,{})})})}),e(ee,{span:12,children:e(P,{label:"\u89C4\u5212\u6A21\u578B",name:"plan_model_name",rules:[{required:!0,message:""},ie(k,"\u8BF7\u9009\u62E9\u89C4\u5212\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:k,notFoundContent:e(ce,{})})})})]}),d(re,{gutter:16,children:[e(ee,{span:12,children:e(P,{label:"\u4E0A\u4F20\u6587\u6863\u95EE\u7B54\u591A\u6A21\u6001\u6A21\u578B",name:"multi_model_name",rules:[{required:!0,message:""},ie(i,"\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u6863\u95EE\u7B54\u591A\u6A21\u6001\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:i,notFoundContent:e(ce,{})})})}),e(ee,{span:12,children:e(P,{label:"Rerank\u6A21\u578B",name:"rerank_model_name",rules:[{required:!0,message:""},ie(u,"\u8BF7\u9009\u62E9Rerank\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:u,notFoundContent:e(ce,{})})})})]}),e(re,{gutter:16,children:e(ee,{span:24,children:e(P,{label:"\u5411\u91CF\u89E3\u6790\u6A21\u578B",name:"embedding_model_name",rules:[{required:!0,message:""},ie(p,"\u8BF7\u9009\u62E9\u5411\u91CF\u89E3\u6790\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:p,notFoundContent:e(ce,{})})})})}),e(P,{label:"\u5F00\u573A\u767D",name:"prologue",children:e(Ee.TextArea,{maxLength:50,showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u5F00\u573A\u767D",autoSize:{minRows:2}})}),e(P,{label:"\u63D0\u793A\u8BCD",name:"system_prompt",tooltip:ru,children:e(Ee.TextArea,{showCount:!0,rows:8,maxLength:3e3,autoSize:{minRows:10},placeholder:`\u4F8B\u5982\uFF1A${au}`})}),e(P,{name:"isDefault",valuePropName:"checked",normalize:m=>m===!0?1:0,children:e(Se,{children:"\u9009\u62E9\u4E3A\u9ED8\u8BA4\u52A9\u624B"})})]}),d(ee,{span:12,style:{height:"100%",padding:"10px 32px",overflowY:"auto"},children:[d(_e,{title:"\u68C0\u7D22\u4E0E\u751F\u6210\u53C2\u6570",children:[e(P,{label:"\u95EE\u9898\u63A8\u8350\u6A21\u578B",name:"recommend_model_name",rules:[{required:!0,message:""},ie(k,"\u8BF7\u9009\u62E9\u95EE\u9898\u63A8\u8350\u6A21\u578B")],children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:k,notFoundContent:e(ce,{})})}),e(P,{label:"\u68C0\u7D22\u7B56\u7565",name:"search_policy",children:e(G,{options:cu,placeholder:"\u8BF7\u9009\u62E9"})}),d(re,{gutter:16,children:[e(de,{label:"\u6E29\u5EA6",name:"temperature",configScale:C}),e(de,{label:"\u591A\u6837\u6027",name:"top_p",configScale:C})]}),d(re,{gutter:16,children:[e(de,{label:"\u53EC\u56DE\u6570",name:"top_k",configScale:C}),e(de,{label:"\u76F8\u4F3C\u5EA6\u9608\u503C",name:"score_threshold",configScale:C})]}),d(re,{gutter:16,children:[e(P,{noStyle:!0,shouldUpdate:(m,D)=>m.model_name!==D.model_name,children:({getFieldValue:m})=>{var K;const D=m("model_name"),S=(K=(k||[]).find(Y=>Y.value==D))==null?void 0:K.maxTokens;return m("max_tokens")>S&&A.setFieldValue("max_tokens",S),e(de,{label:"\u6700\u5927\u4EE4\u724C\u6570",name:"max_tokens",configScale:{...C,max_tokens:{...C.max_tokens,max:S||1e4}}})}}),e(de,{label:"\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570",name:"max_round",configScale:C})]})]}),d(_e,{title:"\u529F\u80FD\u5F00\u5173",children:[e(P,{label:"\u5F00\u542FFAQ\u4F18\u5148",name:"enabled_faq",valuePropName:"checked",layout:"horizontal",children:e(he,{})}),B&&e(P,{label:"\u542F\u7528\u56FE\u8C31\u589E\u5F3A",name:"enabled_graph",valuePropName:"checked",layout:"horizontal",children:e(he,{})}),e(P,{label:"\u5F00\u542F\u5F3A\u4F01\u4E1A\u77E5\u8BC6\u4F9D\u8D56",name:"dependOnKb",valuePropName:"checked",layout:"horizontal",tooltip:lu,normalize:m=>m===!0?1:0,children:e(he,{})}),e(P,{label:"\u5F00\u542F\u95EE\u9898\u6539\u5199",name:"enabled_question_rewrite",valuePropName:"checked",layout:"horizontal",children:e(he,{})}),e(P,{label:"\u5F00\u542F\u6EAF\u6E90",name:"need_trace_source",valuePropName:"checked",layout:"horizontal",children:e(he,{})}),e(P,{noStyle:!0,shouldUpdate:(m,D)=>m.need_trace_source!==D.need_trace_source,children:({getFieldValue:m})=>m("need_trace_source")?d(je,{children:[e(P,{label:"\u6EAF\u6E90\u7B56\u7565",name:"trace_by_llm",layout:"horizontal",children:e(G,{placeholder:"\u8BF7\u9009\u62E9",options:du})}),e(P,{name:"is_download",valuePropName:"checked",layout:"horizontal",children:e(Se,{children:"\u5141\u8BB8\u4E0B\u8F7D\u6EAF\u6E90\u6587\u4EF6"})})]}):null})]}),d(_e,{title:"\u8D44\u6E90\u7ED1\u5B9A",children:[e(Bu,{url:n,token:s,role:r,sectionData:F==null?void 0:F.sensitiveWordIds,eventsEmit:Fe,defaultAnswer:F==null?void 0:F.defaultAnswer,form:A}),e(bu,{url:n,token:s,role:r,sectionData:{knowledge_base_name:F==null?void 0:F.knowledge_base_name,knowledge_base_name_source:F==null?void 0:F.knowledge_base_name_source,selectedKnowledgeBase:F==null?void 0:F.selectedKnowledgeBase},createBy:b?F==null?void 0:F.createBy:void 0,eventsEmit:Fe}),h&&e(Au,{url:n,token:s,role:r,disabled:f,sectionData:F==null?void 0:F.database_name,eventsEmit:Fe}),g&&e(xu,{url:n,token:s,role:r,sectionData:F==null?void 0:F.graph_nb_name,eventsEmit:Fe})]})]})]})})]})};export{zu as C,su as S};