@gientech/modual 2.3.51 → 2.3.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/ReviewManage-BgLcm9wP.js +393 -0
- package/assets/{index-B0WRZpz8.js → index-GTq8dO4i.js} +1 -1
- package/assets/{server-BOB675f_.js → server-CITslb4E.js} +1 -1
- package/assets/style10.css +1 -1
- package/assets/style11.css +1 -1
- package/assets/style12.css +1 -0
- package/assets/style3.css +1 -1
- package/assets/style4.css +1 -1
- package/assets/style5.css +1 -1
- package/assets/style6.css +1 -1
- package/assets/style7.css +1 -1
- package/assets/style8.css +1 -1
- package/assets/style9.css +1 -1
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/graphBase.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/reviewManage.js +3 -3
- package/reviewSetting.js +1 -1
- package/assets/ReviewManage-BvnnHvuH.js +0 -393
- /package/assets/{DrawerVideo-DE96g9Ht.js → DrawerVideo-Da3LzJAm.js} +0 -0
- /package/assets/{ReviewSetting-BE-nCaCT.js → ReviewSetting-CnlGrn5x.js} +0 -0
- /package/assets/{index-EOdqExPq.js → index-DS6_g8q9.js} +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import{jsx as k,jsxs as X,Fragment as Nr}from"react/jsx-runtime";import*as le from"react";import Ze,{createElement as ui,PureComponent as _s,useState as J,useMemo as qe,createContext as Ea,Children as Ss,cloneElement as ks,Component as Is,useRef as Qe,useEffect as Le,useCallback as Mr,useContext as Rs}from"react";import Ct from"axios";import{AiChat as Ns,validateFileUpload as Ps,showValidationErrors as Ts}from"@mxmweb/aichat";import{mergeLiveChunkToNodes as qs,ChatMessageAdapter as r0}from"@mxmweb/rtext";import{Dropdown as zs,Input as Vr,Popover as Os,message as Oe,Skeleton as an,Button as vr,ConfigProvider as ei,Modal as Zt,Form as n0,Table as ba,Pagination as Ms,Empty as Ls,Tooltip as mr,Drawer as Aa,Select as Ba,DatePicker as $s}from"antd";import{u as er}from"./index-CpW6Dhpp.js";import{Icon as wa,defaultTheme as ti,useTheme as Da,deepMergeTheme as Gn,DashboardContainer as Vs}from"@mxmweb/zui";import{_ as Mi,w as tr,c as Et,j as Fe,e as j,o as Li,f as Hr,v as Us,d as li,g as Hs}from"./AntdIcon-Vuhc5UuC.js";import{l as $i,h as ke,b as Ws,c as js,e as Ae,g as _a,a as Wr,_ as jr,i as Kr,j as Lt}from"./lodash-L-fHanCU.js";import i0 from"dayjs";import{c as Tr}from"./createLucideIcon-Bj5DlX2s.js";import{P as Ks}from"./plus-B679mjyt.js";import{S as Yn}from"./search-CEuIa9-_.js";import{X as Sa}from"./x-CdZQbi--.js";import{i as Gs,_ as ka,m as Lr,g as hr,s as Qt,a as a0,b as Ys,e as Xs,c as Qs,t as Zs}from"./index-DS6_g8q9.js";import{r as Js,a as eo,g as Xn,d as Ia,b as Ra,c as Na,e as Ei,f as Vi,D as to,T as Qn,h as ro,i as no,j as io,N as ao,k as so,G as oo,l as uo,W as lo,m as co,u as fo,F as po,n as s0,o as ci,p as xo,q as ho,s as go,t as vo,v as mo}from"./index-GTq8dO4i.js";import{C as yo,G as Pa}from"./GientechStreamReader-CnAI3q38.js";import{C as Fo}from"./chevron-right-CrkLSPrQ.js";import{f as Co,R as Ta,P as Eo,k as bo,g as di,r as qa,a as Ao,c as fi}from"./PlusOutlined-Di4ORSd7.js";import{c as Bo}from"./DrawerVideo-Da3LzJAm.js";/* empty css *//* empty css */import"@mxmweb/fviewer";import"../database.js";import"../databaseId.js";import"../databaseTable.js";import"../modelManage.js";import"../sensitive.js";import"../oprecords.js";import"./ReviewSetting-CnlGrn5x.js";import rr from"styled-components";import{Xviwer as wo}from"@mxmweb/xviewer";import{A as Do,P as _o}from"./server-CITslb4E.js";import{R as So}from"./QuestionCircleOutlined-BsYIcMyN.js";import{T as ko}from"./triangle-alert-LqO4u4ts.js";import"./index-biTyTcBO.js";/**
|
|
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 Io=Tr("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
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 Ro=Tr("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
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 No=Tr("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["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 Po=Tr("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
22
|
+
* @license lucide-react v0.456.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const za=Tr("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
27
|
+
* @license lucide-react v0.456.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const To=Tr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),qo=n=>le.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},le.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.6666C11.6819 14.6666 14.6667 11.6819 14.6667 7.99998C14.6667 4.31808 11.6819 1.33331 8 1.33331C4.3181 1.33331 1.33334 4.31808 1.33334 7.99998C1.33334 11.6819 4.3181 14.6666 8 14.6666Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M1.33334 8H14.6667",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.6666C9.47277 14.6666 10.6667 11.6819 10.6667 7.99998C10.6667 4.31808 9.47277 1.33331 8 1.33331C6.52724 1.33331 5.33334 4.31808 5.33334 7.99998C5.33334 11.6819 6.52724 14.6666 8 14.6666Z",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M3.28597 3.38068C4.4924 4.58711 6.15907 5.33331 8 5.33331C9.84097 5.33331 11.5076 4.58711 12.7141 3.38068",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M12.7141 12.6193C11.5076 11.4129 9.84097 10.6667 8 10.6667C6.15907 10.6667 4.4924 11.4129 3.28597 12.6193",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),zo=n=>le.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},le.createElement("path",{d:"M1.73633 1.57642C2.53848 0.774265 3.74473 0.714862 4.87207 1.03052C6.02182 1.35245 7.24885 2.09683 8.3125 3.1604C9.37624 4.22414 10.1204 5.45195 10.4424 6.60181C10.758 7.72909 10.6986 8.93446 9.89648 9.73657C9.09439 10.5387 7.88901 10.5981 6.76172 10.2825C5.61186 9.96051 4.38405 9.21632 3.32031 8.15259C2.25674 7.08894 1.51236 5.86191 1.19043 4.71216C0.874775 3.58481 0.934176 2.37857 1.73633 1.57642Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M6.76172 5.41479C7.88883 5.09929 9.09442 5.15888 9.89648 5.96069C10.6986 6.76284 10.758 7.96909 10.4424 9.09644C10.1204 10.2462 9.37617 11.4732 8.3125 12.5369C7.24882 13.6005 6.02187 14.3448 4.87207 14.6667C3.74472 14.9824 2.53848 14.923 1.73633 14.1208C0.934528 13.3188 0.874922 12.1132 1.19043 10.9861C1.51239 9.83623 2.25659 8.60841 3.32031 7.54468C4.38405 6.48096 5.61186 5.73675 6.76172 5.41479Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M11.1282 1.03052C12.2553 0.715012 13.4609 0.774612 14.263 1.57642C15.0651 2.37857 15.1246 3.58481 14.8089 4.71216C14.4869 5.86196 13.7427 7.08892 12.679 8.15259C11.6153 9.21627 10.3884 9.96048 9.23859 10.2825C8.11124 10.5981 6.90499 10.5387 6.10284 9.73657C5.30106 8.9345 5.24144 7.72892 5.55695 6.60181C5.8789 5.45195 6.62311 4.22414 7.68683 3.1604C8.75056 2.09668 9.97838 1.35248 11.1282 1.03052Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M6.10284 5.96069C6.90499 5.15855 8.11124 5.09914 9.23859 5.41479C10.3883 5.73673 11.6154 6.48111 12.679 7.54468C13.7427 8.60841 14.4869 9.83623 14.8089 10.9861C15.1245 12.1134 15.0651 13.3188 14.263 14.1208C13.4609 14.9229 12.2555 14.9823 11.1282 14.6667C9.97838 14.3448 8.75055 13.6006 7.68683 12.5369C6.62325 11.4732 5.87888 10.2462 5.55695 9.09644C5.24129 7.96909 5.3007 6.76284 6.10284 5.96069Z",stroke:"#4E6EF2",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),Br={actions:[{name:"upload",icon:k(wa,{type:"wenda/shangchuanwenjian",color:"#000",size:20}),tip:"\u6587\u4EF6\u4E0A\u4F20"}],switchs:[{label:"\u8054\u7F51\u641C\u7D22",name:"netSearch",type:"switch",defaultValue:!1,enabled:!0,icon:k(qo,{width:16,height:16,className:"aichat-netsearch-icon",style:{color:"#4B8CF7"}})},{label:"\u6DF1\u5EA6\u601D\u8003",name:"reasoning",type:"switch",defaultValue:!0,enabled:!0,icon:k(zo,{width:16,height:16})}]},Ui={sidebar:{newChat:"\u65B0\u5EFA\u5BF9\u8BDD",newConversation:"\u65B0\u5EFA\u4F1A\u8BDD",unnamedSession:"\u672A\u547D\u540D\u4F1A\u8BDD",noAssistant:"\u672A\u9009\u62E9\u52A9\u624B",searchPlaceholder:"\u641C\u7D22\u5386\u53F2\u8BB0\u5F55",search:"\u641C\u7D22",rename:"\u91CD\u547D\u540D",delete:"\u5220\u9664"},welcome:{defaultPrologue:"\u60A8\u597D\uFF0C\u6B22\u8FCE\u4F7F\u7528\u5C0F\u9CB8\u667A\u80FD\u95EE\u7B54",selectAssistant:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B",searchAssistant:"\u641C\u7D22\u52A9\u624B\u540D\u79F0"},sender:{placeholder:"\u8F93\u5165\u95EE\u9898\u540E\u6309Enter\u53D1\u9001,Shift+Enter\u8FDB\u884C\u6362\u884C",netSearch:"\u8054\u7F51\u641C\u7D22",deepThinking:"\u6DF1\u5EA6\u601D\u8003",fileUpload:"\u6587\u4EF6\u4E0A\u4F20"},chatHeader:{newConversation:"\u65B0\u5BF9\u8BDD"},disclaimer:"\u5185\u5BB9\u7531AI\u751F\u6210\uFF0C\u4EC5\u4F9B\u53C2\u8003\uFF0C\u4E0D\u4EE3\u8868\u672C\u516C\u53F8\u89C2\u70B9\u3002"},Oo={sidebar:{newChat:"New chat",newConversation:"New conversation",unnamedSession:"Unnamed",noAssistant:"No assistant",searchPlaceholder:"Search history",search:"Search",rename:"Rename",delete:"Delete"},welcome:{defaultPrologue:"Hello, welcome to Smart Q&A",selectAssistant:"Please select an assistant",searchAssistant:"Search assistants"},sender:{placeholder:"Type your question and press Enter to send, Shift+Enter for new line",netSearch:"Web search",deepThinking:"Deep thinking",fileUpload:"Upload file"},chatHeader:{newConversation:"New conversation"},disclaimer:"Content is AI-generated and for reference only."},Mo={sidebar:{newChat:"\u65B0\u898F\u4F1A\u8A71",newConversation:"\u65B0\u898F\u4F1A\u8A71",unnamedSession:"\u540D\u524D\u306A\u3057",noAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u672A\u9078\u629E",searchPlaceholder:"\u5C65\u6B74\u3092\u691C\u7D22",search:"\u691C\u7D22",rename:"\u540D\u524D\u3092\u5909\u66F4",delete:"\u524A\u9664"},welcome:{defaultPrologue:"\u3053\u3093\u306B\u3061\u306F\u3001\u30B9\u30DE\u30FC\u30C8Q&A\u3078\u3088\u3046\u3053\u305D",selectAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",searchAssistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u3092\u691C\u7D22"},sender:{placeholder:"\u8CEA\u554F\u3092\u5165\u529B\u3057\u3001Enter\u3067\u9001\u4FE1\u3001Shift+Enter\u3067\u6539\u884C",netSearch:"\u30CD\u30C3\u30C8\u691C\u7D22",deepThinking:"\u6DF1\u304F\u8003\u3048\u308B",fileUpload:"\u30D5\u30A1\u30A4\u30EB\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"},chatHeader:{newConversation:"\u65B0\u898F\u4F1A\u8A71"},disclaimer:"AI\u306B\u3088\u308A\u751F\u6210\u3055\u308C\u305F\u5185\u5BB9\u3067\u3059\u3002\u53C2\u8003\u3068\u3057\u3066\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002"},Lo={zh:Ui,en:Oo,ja:Mo};function Oa(n){return Lo[n]??Ui}const Ma=Ze.createContext({locale:"zh",messages:Ui});function ri(){return Ze.useContext(Ma)}function $o({locale:n,children:r}){const e=Ze.useMemo(()=>({locale:n,messages:Oa(n)}),[n]);return Ze.createElement(Ma.Provider,{value:e},r)}function Vo(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,$i(n,r)}var o0=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function Uo(n,r){return!!(n===r||o0(n)&&o0(r))}function Ho(n,r){if(n.length!==r.length)return!1;for(var e=0;e<n.length;e++)if(!Uo(n[e],r[e]))return!1;return!0}function pi(n,r){r===void 0&&(r=Ho);var e,t=[],i,a=!1;function s(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return a&&e===this&&r(l,t)||(i=n.apply(this,l),a=!0,e=this,t=l),i}return s}var Wo=typeof performance=="object"&&typeof performance.now=="function",u0=Wo?function(){return performance.now()}:function(){return Date.now()};function l0(n){cancelAnimationFrame(n.id)}function jo(n,r){var e=u0();function t(){u0()-e>=r?n.call(null):i.id=requestAnimationFrame(t)}var i={id:requestAnimationFrame(t)};return i}var xi=-1;function c0(n){if(n===void 0&&(n=!1),xi===-1||n){var r=document.createElement("div"),e=r.style;e.width="50px",e.height="50px",e.overflow="scroll",document.body.appendChild(r),xi=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return xi}var wr=null;function d0(n){if(n===void 0&&(n=!1),wr===null||n){var r=document.createElement("div"),e=r.style;e.width="50px",e.height="50px",e.overflow="scroll",e.direction="rtl";var t=document.createElement("div"),i=t.style;return i.width="100px",i.height="100px",r.appendChild(t),document.body.appendChild(r),r.scrollLeft>0?wr="positive-descending":(r.scrollLeft=1,r.scrollLeft===0?wr="negative":wr="positive-ascending"),document.body.removeChild(r),wr}return wr}var Ko=150,Go=function(r,e){return r};function Yo(n){var r,e=n.getItemOffset,t=n.getEstimatedTotalSize,i=n.getItemSize,a=n.getOffsetForIndexAndAlignment,s=n.getStartIndexForOffset,l=n.getStopIndexForStartIndex,f=n.initInstanceProps,u=n.shouldResetStyleCacheOnItemSizeChange,o=n.validateProps;return r=(function(m){Vo(x,m);function x(h){var d;return d=m.call(this,h)||this,d._instanceProps=f(d.props,ke(d)),d._outerRef=void 0,d._resetIsScrollingTimeoutId=null,d.state={instance:ke(d),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof d.props.initialScrollOffset=="number"?d.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},d._callOnItemsRendered=void 0,d._callOnItemsRendered=pi(function(c,g,p,v){return d.props.onItemsRendered({overscanStartIndex:c,overscanStopIndex:g,visibleStartIndex:p,visibleStopIndex:v})}),d._callOnScroll=void 0,d._callOnScroll=pi(function(c,g,p){return d.props.onScroll({scrollDirection:c,scrollOffset:g,scrollUpdateWasRequested:p})}),d._getItemStyle=void 0,d._getItemStyle=function(c){var g=d.props,p=g.direction,v=g.itemSize,C=g.layout,A=d._getItemStyleCache(u&&v,u&&C,u&&p),B;if(A.hasOwnProperty(c))B=A[c];else{var S=e(d.props,c,d._instanceProps),I=i(d.props,c,d._instanceProps),R=p==="horizontal"||C==="horizontal",D=p==="rtl",b=R?S:0;A[c]=B={position:"absolute",left:D?void 0:b,right:D?b:void 0,top:R?0:S,height:R?"100%":I,width:R?I:"100%"}}return B},d._getItemStyleCache=void 0,d._getItemStyleCache=pi(function(c,g,p){return{}}),d._onScrollHorizontal=function(c){var g=c.currentTarget,p=g.clientWidth,v=g.scrollLeft,C=g.scrollWidth;d.setState(function(A){if(A.scrollOffset===v)return null;var B=d.props.direction,S=v;if(B==="rtl")switch(d0()){case"negative":S=-v;break;case"positive-descending":S=C-p-v;break}return S=Math.max(0,Math.min(S,C-p)),{isScrolling:!0,scrollDirection:A.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},d._resetIsScrollingDebounced)},d._onScrollVertical=function(c){var g=c.currentTarget,p=g.clientHeight,v=g.scrollHeight,C=g.scrollTop;d.setState(function(A){if(A.scrollOffset===C)return null;var B=Math.max(0,Math.min(C,v-p));return{isScrolling:!0,scrollDirection:A.scrollOffset<B?"forward":"backward",scrollOffset:B,scrollUpdateWasRequested:!1}},d._resetIsScrollingDebounced)},d._outerRefSetter=function(c){var g=d.props.outerRef;d._outerRef=c,typeof g=="function"?g(c):g!=null&&typeof g=="object"&&g.hasOwnProperty("current")&&(g.current=c)},d._resetIsScrollingDebounced=function(){d._resetIsScrollingTimeoutId!==null&&l0(d._resetIsScrollingTimeoutId),d._resetIsScrollingTimeoutId=jo(d._resetIsScrolling,Ko)},d._resetIsScrolling=function(){d._resetIsScrollingTimeoutId=null,d.setState({isScrolling:!1},function(){d._getItemStyleCache(-1,null)})},d}x.getDerivedStateFromProps=function(d,c){return Xo(d,c),o(d),null};var y=x.prototype;return y.scrollTo=function(d){d=Math.max(0,d),this.setState(function(c){return c.scrollOffset===d?null:{scrollDirection:c.scrollOffset<d?"forward":"backward",scrollOffset:d,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},y.scrollToItem=function(d,c){c===void 0&&(c="auto");var g=this.props,p=g.itemCount,v=g.layout,C=this.state.scrollOffset;d=Math.max(0,Math.min(d,p-1));var A=0;if(this._outerRef){var B=this._outerRef;v==="vertical"?A=B.scrollWidth>B.clientWidth?c0():0:A=B.scrollHeight>B.clientHeight?c0():0}this.scrollTo(a(this.props,d,c,C,this._instanceProps,A))},y.componentDidMount=function(){var d=this.props,c=d.direction,g=d.initialScrollOffset,p=d.layout;if(typeof g=="number"&&this._outerRef!=null){var v=this._outerRef;c==="horizontal"||p==="horizontal"?v.scrollLeft=g:v.scrollTop=g}this._callPropsCallbacks()},y.componentDidUpdate=function(){var d=this.props,c=d.direction,g=d.layout,p=this.state,v=p.scrollOffset,C=p.scrollUpdateWasRequested;if(C&&this._outerRef!=null){var A=this._outerRef;if(c==="horizontal"||g==="horizontal")if(c==="rtl")switch(d0()){case"negative":A.scrollLeft=-v;break;case"positive-ascending":A.scrollLeft=v;break;default:var B=A.clientWidth,S=A.scrollWidth;A.scrollLeft=S-B-v;break}else A.scrollLeft=v;else A.scrollTop=v}this._callPropsCallbacks()},y.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&l0(this._resetIsScrollingTimeoutId)},y.render=function(){var d=this.props,c=d.children,g=d.className,p=d.direction,v=d.height,C=d.innerRef,A=d.innerElementType,B=d.innerTagName,S=d.itemCount,I=d.itemData,R=d.itemKey,D=R===void 0?Go:R,b=d.layout,w=d.outerElementType,F=d.outerTagName,N=d.style,M=d.useIsScrolling,V=d.width,$=this.state.isScrolling,L=p==="horizontal"||b==="horizontal",G=L?this._onScrollHorizontal:this._onScrollVertical,Y=this._getRangeToRender(),P=Y[0],T=Y[1],z=[];if(S>0)for(var q=P;q<=T;q++)z.push(ui(c,{data:I,key:D(q,I),index:q,isScrolling:M?$:void 0,style:this._getItemStyle(q)}));var Q=t(this.props,this._instanceProps);return ui(w||F||"div",{className:g,onScroll:G,ref:this._outerRefSetter,style:Mi({position:"relative",height:v,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:p},N)},ui(A||B||"div",{children:z,ref:C,style:{height:L?"100%":Q,pointerEvents:$?"none":void 0,width:L?Q:"100%"}}))},y._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var d=this.props.itemCount;if(d>0){var c=this._getRangeToRender(),g=c[0],p=c[1],v=c[2],C=c[3];this._callOnItemsRendered(g,p,v,C)}}if(typeof this.props.onScroll=="function"){var A=this.state,B=A.scrollDirection,S=A.scrollOffset,I=A.scrollUpdateWasRequested;this._callOnScroll(B,S,I)}},y._getRangeToRender=function(){var d=this.props,c=d.itemCount,g=d.overscanCount,p=this.state,v=p.isScrolling,C=p.scrollDirection,A=p.scrollOffset;if(c===0)return[0,0,0,0];var B=s(this.props,A,this._instanceProps),S=l(this.props,B,A,this._instanceProps),I=!v||C==="backward"?Math.max(1,g):1,R=!v||C==="forward"?Math.max(1,g):1;return[Math.max(0,B-I),Math.max(0,Math.min(c-1,S+R)),B,S]},x})(_s),r.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},r}var Xo=function(r,e){r.children,r.direction,r.height,r.layout,r.innerTagName,r.outerTagName,r.width,e.instance},Qo=50,kr=function(r,e,t){var i=r,a=i.itemSize,s=t.itemMetadataMap,l=t.lastMeasuredIndex;if(e>l){var f=0;if(l>=0){var u=s[l];f=u.offset+u.size}for(var o=l+1;o<=e;o++){var m=a(o);s[o]={offset:f,size:m},f+=m}t.lastMeasuredIndex=e}return s[e]},Zo=function(r,e,t){var i=e.itemMetadataMap,a=e.lastMeasuredIndex,s=a>0?i[a].offset:0;return s>=t?La(r,e,a,0,t):Jo(r,e,Math.max(0,a),t)},La=function(r,e,t,i,a){for(;i<=t;){var s=i+Math.floor((t-i)/2),l=kr(r,s,e).offset;if(l===a)return s;l<a?i=s+1:l>a&&(t=s-1)}return i>0?i-1:0},Jo=function(r,e,t,i){for(var a=r.itemCount,s=1;t<a&&kr(r,t,e).offset<i;)t+=s,s*=2;return La(r,e,Math.min(t,a-1),Math.floor(t/2),i)},f0=function(r,e){var t=r.itemCount,i=e.itemMetadataMap,a=e.estimatedItemSize,s=e.lastMeasuredIndex,l=0;if(s>=t&&(s=t-1),s>=0){var f=i[s];l=f.offset+f.size}var u=t-s-1,o=u*a;return l+o},eu=Yo({getItemOffset:function(r,e,t){return kr(r,e,t).offset},getItemSize:function(r,e,t){return t.itemMetadataMap[e].size},getEstimatedTotalSize:f0,getOffsetForIndexAndAlignment:function(r,e,t,i,a,s){var l=r.direction,f=r.height,u=r.layout,o=r.width,m=l==="horizontal"||u==="horizontal",x=m?o:f,y=kr(r,e,a),h=f0(r,a),d=Math.max(0,Math.min(h-x,y.offset)),c=Math.max(0,y.offset-x+y.size+s);switch(t==="smart"&&(i>=c-x&&i<=d+x?t="auto":t="center"),t){case"start":return d;case"end":return c;case"center":return Math.round(c+(d-c)/2);case"auto":default:return i>=c&&i<=d?i:i<c?c:d}},getStartIndexForOffset:function(r,e,t){return Zo(r,t,e)},getStopIndexForStartIndex:function(r,e,t,i){for(var a=r.direction,s=r.height,l=r.itemCount,f=r.layout,u=r.width,o=a==="horizontal"||f==="horizontal",m=o?u:s,x=kr(r,e,i),y=t+m,h=x.offset+x.size,d=e;d<l-1&&h<y;)d++,h+=kr(r,d,i).size;return d},initInstanceProps:function(r,e){var t=r,i=t.estimatedItemSize,a={itemMetadataMap:{},estimatedItemSize:i||Qo,lastMeasuredIndex:-1};return e.resetAfterIndex=function(s,l){l===void 0&&(l=!0),a.lastMeasuredIndex=Math.min(a.lastMeasuredIndex,s-1),e._getItemStyleCache(-1),l&&e.forceUpdate()},a},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(r){r.itemSize}});function tu({isActive:n,isNew:r,isDisabled:e,data:t,eventsEmit:i,styles:a={},assistantList:s=[]}){const{messages:l}=ri(),[f,u]=J(!1),o=(a==null?void 0:a.colors)||{},m=qe(()=>{const g=t==null?void 0:t.configId;if(!g||!s||s.length===0)return l.sidebar.noAssistant;const p=s.find(v=>String(v==null?void 0:v.id)===String(g));if(!p)return l.sidebar.noAssistant;if(p!=null&&p.name)return p.name;try{const v=typeof p.configJson=="string"?JSON.parse(p.configJson):p.configJson;return(v==null?void 0:v.config_name)||l.sidebar.noAssistant}catch{return l.sidebar.noAssistant}},[s,t==null?void 0:t.configId,l.sidebar.noAssistant]),x=[{key:"rename",icon:k(Po,{size:12}),label:l.sidebar.rename,onClick:g=>{g.domEvent.stopPropagation(),i&&i("conversations:rename_icon_clicked",t)}},{key:"delete",icon:k(To,{size:12}),label:l.sidebar.delete,danger:!0,onClick:g=>{g.domEvent.stopPropagation(),i&&i("conversations:delete_icon_clicked",t)}}],y=n?o.activeItemBg||"#f0f4ff":f?o.itemHoverBg||"#f5f7fa":o.itemBg||"transparent",h=n?o.activeItemText||o.primary||"#0122ff":o.itemText||"#333",d=n?o.activeItemBorder||o.primary||"#0122ff":"transparent",c=g=>{const p=i0(),v=i0(g);return p.isSame(v,"day")?v.format("HH:mm"):v.format("MM-DD HH:mm")};return X("div",{className:"flex relative items-center justify-between mb-2 px-4 py-3 rounded-md transition-colors cursor-pointer select-none",onClick:()=>!e&&i&&i("conversation:item_click",t),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{minHeight:48,background:y,color:h,border:`1px solid ${d}`,...a.item,opacity:e?.5:1},children:[X("div",{className:"flex flex-col gap-y-2 flex-1 min-w-0",children:[k("span",{className:"truncate text-sm max-w-[160px] font-medium",title:t.label||l.sidebar.unnamedSession,style:{color:h,fontSize:"14px",lineHeight:"1.4"},children:t.label||l.sidebar.unnamedSession}),X("div",{className:"flex items-center justify-between gap-2",children:[k("span",{className:"text-xs truncate flex-1",style:{color:n?o.activeItemTextSecondary||"#666":o.itemTextSecondary||"#666",fontSize:"12px",lineHeight:"1.3"},children:m}),t.gmtModified&&k("span",{className:"text-xs flex-shrink-0",style:{color:n?o.activeItemTextSecondary||"#999":o.itemTextSecondary||"#999",fontSize:"12px",lineHeight:"1.3"},children:c(t.gmtModified)})]})]}),!e&&f&&!r&&k("div",{className:"absolute top-2 right-3",children:k(zs,{menu:{items:x},trigger:["click"],placement:"bottomRight",children:k(Io,{size:16,className:"text-gray-600 hover:text-gray-800",style:{cursor:"pointer",color:n?o.activeItemTextSecondary||"#999":o.itemTextSecondary||"#999"},onClick:g=>g.stopPropagation()})})})]})}function ru(n,r=[{label:"\u5F53\u5929",dayPeriod:1}]){const e=new Date,t={other:[]};return n.forEach(i=>{const a=new Date(i.gmtModified),s=Math.floor((+e-+a)/(1e3*60*60*24));let l=!1;for(const f of r)if(s<=f.dayPeriod){t[f.label]||(t[f.label]=[]),t[f.label].push(i),l=!0;break}l||t.other.push(i)}),t}/*! @license Rematrix v0.2.2
|
|
32
|
+
|
|
33
|
+
Copyright 2018 Fisssion LLC.
|
|
34
|
+
|
|
35
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
36
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
37
|
+
in the Software without restriction, including without limitation the rights
|
|
38
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
39
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
40
|
+
furnished to do so, subject to the following conditions:
|
|
41
|
+
|
|
42
|
+
The above copyright notice and this permission notice shall be included in
|
|
43
|
+
all copies or substantial portions of the Software.
|
|
44
|
+
|
|
45
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
46
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
47
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
48
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
49
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
50
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
51
|
+
THE SOFTWARE.
|
|
52
|
+
*/function bi(n){if(n.constructor!==Array)throw new TypeError("Expected array.");if(n.length===16)return n;if(n.length===6){var r=qr();return r[0]=n[0],r[1]=n[1],r[4]=n[2],r[5]=n[3],r[12]=n[4],r[13]=n[5],r}throw new RangeError("Expected array with either 6 or 16 values.")}function qr(){for(var n=[],r=0;r<16;r++)r%5==0?n.push(1):n.push(0);return n}function nu(n,r){for(var e=bi(n),t=bi(r),i=[],a=0;a<4;a++)for(var s=[e[a],e[a+4],e[a+8],e[a+12]],l=0;l<4;l++){var f=l*4,u=[t[f],t[f+1],t[f+2],t[f+3]],o=s[0]*u[0]+s[1]*u[1]+s[2]*u[2]+s[3]*u[3];i[a+f]=o}return i}function iu(n){if(typeof n=="string"){var r=n.match(/matrix(3d)?\(([^)]+)\)/);if(r){var e=r[2].split(", ").map(parseFloat);return bi(e)}}return qr()}function au(n){var r=qr();return r[0]=n,r}function su(n){var r=qr();return r[5]=n,r}function ou(n){var r=qr();return r[12]=n,r}function uu(n){var r=qr();return r[13]=n,r}var dn=function(n){return typeof n=="number"},$a=function(n){return typeof n=="function"},Va=function(n){return Object.prototype.toString.call(n)==="[object Object]"},Ir=function(n){return Array.prototype.slice.apply(n)},Ua=function(n){var r=n.reduce(function(e,t){return e[t]=(e[t]||0)+1,e},{});return Object.keys(r).filter(function(e){return r[e]>1})};function Jt(n){return[].slice.call(arguments,1).forEach(function(r){if(r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e])}),n}var Ai,Bi=function(n,r,e){return n+(r-n)*e},Ha={__proto__:null,isNumber:dn,isFunction:$a,isObject:Va,toArray:Ir,getDuplicateValsAsStrings:Ua,assign:Jt,tweenProp:Bi},Hi="data-flip-id",Wi="data-inverse-flip-id",ji="data-portal-key",lu="data-exit-container",sn={__proto__:null,DATA_FLIP_ID:Hi,DATA_INVERSE_FLIP_ID:Wi,DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:ji},wi={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},p0=function(n){return Va(n)?n:Object.keys(wi).indexOf(n)>-1?wi[n]:{}};typeof window<"u"&&(Ai=window.requestAnimationFrame);var cu=Ai=Ai||function(n){window.setTimeout(n,1e3/60)},du=Date.now(),fu=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()-du};function Wa(n,r){var e=n.indexOf(r);e!==-1&&n.splice(e,1)}var pu=(function(){function n(){}return n.prototype.run=function(){var r=this;cu(function(){r.springSystem.loop(fu())})},n})(),hi=function(){this.position=0,this.velocity=0},xu=0,kt=.001,hu=(function(){function n(e){this._id="s"+xu++,this._springSystem=e,this.listeners=[],this._startValue=0,this._currentState=new hi,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new hi,this._restSpeedThreshold=.001,this._tempState=new hi,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={}}var r=n.prototype;return r.getId=function(){return this._id},r.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},r.setSpringConfig=function(e){return this._springConfig=e,this},r.getCurrentValue=function(){return this._currentState.position},r.getDisplacementDistanceForState=function(e){return Math.abs(this._endValue-e.position)},r.setEndValue=function(e){if(e===this._endValue)return this;if(this.prevEndValue=e,this._endValue===e&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=e,this._springSystem.activateSpring(this.getId());for(var t=0,i=this.listeners.length;t<i;t++){var a=this.listeners[t].onSpringEndStateChange;a&&a(this)}return this},r.setVelocity=function(e){return e===this._currentState.velocity||(this._currentState.velocity=e,this._springSystem.activateSpring(this.getId())),this},r.setCurrentValue=function(e){this._startValue=e,this._currentState.position=e;for(var t=0,i=this.listeners.length;t<i;t++){var a=this.listeners[t];a.onSpringUpdate&&a.onSpringUpdate(this)}return this},r.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},r.setOvershootClampingEnabled=function(e){return this._overshootClampingEnabled=e,this},r.isOvershooting=function(){var e=this._startValue,t=this._endValue;return this._springConfig.tension>0&&(e<t&&this.getCurrentValue()>t||e>t&&this.getCurrentValue()<t)},r.advance=function(e,t){var i=this.isAtRest();if(!i||!this._wasAtRest){var a=t;t>.064&&(a=.064),this._timeAccumulator+=a;for(var s,l,f,u,o,m,x=this._springConfig.tension,y=this._springConfig.friction,h=this._currentState.position,d=this._currentState.velocity,c=this._tempState.position,g=this._tempState.velocity;this._timeAccumulator>=kt;)this._timeAccumulator-=kt,this._timeAccumulator<kt&&(this._previousState.position=h,this._previousState.velocity=d),l=x*(this._endValue-c)-y*d,u=x*(this._endValue-(c=h+(s=d)*kt*.5))-y*(g=d+l*kt*.5),m=x*(this._endValue-(c=h+(f=g)*kt*.5))-y*(g=d+u*kt*.5),c=h+(o=g)*kt,h+=1/6*(s+2*(f+o)+(g=d+m*kt))*kt,d+=1/6*(l+2*(u+m)+(x*(this._endValue-c)-y*g))*kt;this._tempState.position=c,this._tempState.velocity=g,this._currentState.position=h,this._currentState.velocity=d,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/kt),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var p=!1;this._wasAtRest&&(this._wasAtRest=!1,p=!0);var v=!1;i&&(this._wasAtRest=!0,v=!0),this.notifyPositionUpdated(p,v)}},r.notifyPositionUpdated=function(e,t){var i=this;this.listeners.filter(Boolean).forEach(function(a){e&&a.onSpringActivate&&!i._onActivateCalled&&(a.onSpringActivate(i),i._onActivateCalled=!0),a.onSpringUpdate&&a.onSpringUpdate(i),t&&a.onSpringAtRest&&a.onSpringAtRest(i)})},r.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},r.wasAtRest=function(){return this._wasAtRest},r.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||this._springConfig.tension===0)},r._interpolate=function(e){this._currentState.position=this._currentState.position*e+this._previousState.position*(1-e),this._currentState.velocity=this._currentState.velocity*e+this._previousState.velocity*(1-e)},r.addListener=function(e){return this.listeners.push(e),this},r.addOneTimeListener=function(e){var t=this;return Object.keys(e).forEach(function(i){var a;e[i]=(a=e[i],function(){a.apply(void 0,[].slice.call(arguments)),t.removeListener(e)})}),this.listeners.push(e),this},r.removeListener=function(e){return Wa(this.listeners,e),this},n})(),ja=(function(){function n(e){this.looper=e||new pu,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={}}var r=n.prototype;return r.createSpring=function(e,t){return this.createSpringWithConfig({tension:e,friction:t})},r.createSpringWithConfig=function(e){var t=new hu(this);return this.registerSpring(t),t.setSpringConfig(e),t},r.getIsIdle=function(){return this._isIdle},r.registerSpring=function(e){this._springRegistry[e.getId()]=e},r.deregisterSpring=function(e){Wa(this._activeSprings,e),delete this._springRegistry[e.getId()]},r.advance=function(e,t){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(s){s.systemShouldAdvance()?s.advance(e/1e3,t/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(s))});this._idleSpringIndices.length>0;){var a=this._idleSpringIndices.pop();a>=0&&this._activeSprings.splice(a,1)}},r.loop=function(e){var t;this._lastTimeMillis===-1&&(this._lastTimeMillis=e-1);var i=e-this._lastTimeMillis;this._lastTimeMillis=e;var a=0,s=this.listeners.length;for(a=0;a<s;a++)(t=this.listeners[a]).onBeforeIntegrate&&t.onBeforeIntegrate(this);for(this.advance(e,i),this._activeSprings.length===0&&(this._isIdle=!0,this._lastTimeMillis=-1),a=0;a<s;a++)(t=this.listeners[a]).onAfterIntegrate&&t.onAfterIntegrate(this);this._isIdle||this.looper.run()},r.activateSpring=function(e){var t=this._springRegistry[e];this._activeSprings.indexOf(t)===-1&&this._activeSprings.push(t),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},n})(),gu=new ja,Ka=function(n){var r=n.springConfig,e=r.overshootClamping,t=n.getOnUpdateFunc,i=n.onAnimationEnd,a=n.onSpringActivate,s=gu.createSpring(r.stiffness,r.damping);s.setOvershootClampingEnabled(!!e);var l={onSpringActivate:a,onSpringAtRest:function(){s.destroy(),i()},onSpringUpdate:t({spring:s,onAnimationEnd:i})};return s.addListener(l),s},x0=function(n){var r=Ka(n);return r.setEndValue(1),r},h0=function(n,r){if(r===void 0&&(r={}),n&&n.length){r.reverse&&n.reverse();var e,t=typeof(e=r.speed)!="number"?1.1:1+Math.min(Math.max(5*e,0),5),i=1/Math.max(Math.min(n.length,100),10),a=n.map(function(s,l){var f=s.getOnUpdateFunc;return s.getOnUpdateFunc=function(u){var o=f(u);return function(m){var x=m.getCurrentValue();(x=x<.01?0:x>.99?1:x)>=i&&a[l+1]&&a[l+1](Math.max(Math.min(x*t,1),0)),o(m)}},s}).map(function(s){var l=Ka(s);if(l)return l.setEndValue.bind(l)}).filter(Boolean);a[0]&&a[0](1)}},g0=function(n){return[0,1,4,5,12,13].map(function(r){return n[r]})},v0=function(n){return n.top<window.innerHeight&&n.bottom>0&&n.left<window.innerWidth&&n.right>0};function m0(n){return JSON.parse(n.dataset.flipConfig||"{}")}var Ga=function(n,r){var e;return Jt(n,((e={})[r[0]]=r[1],e))},Ya=function(n,r){return Ir(r?document.querySelectorAll("["+ji+'="'+r+'"]'):n.querySelectorAll("["+Hi+"]"))},Xa=function(n){return n.map(function(r){return[r,r.getBoundingClientRect()]})},vu=function(n){var r=n.cachedOrderedFlipIds,e=r===void 0?[]:r,t=n.inProgressAnimations,i=t===void 0?{}:t,a=n.flippedElementPositionsBeforeUpdate,s=a===void 0?{}:a,l=n.flipCallbacks,f=l===void 0?{}:l,u=n.containerEl,o=n.applyTransformOrigin,m=n.spring,x=n.debug,y=n.portalKey,h=n.staggerConfig,d=h===void 0?{}:h,c=n.decisionData,g=c===void 0?{}:c,p=n.handleEnterUpdateDelete,v=n.onComplete,C=n.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var A,B=Xa(Ya((A={element:u,portalKey:y}).element,A.portalKey)).map(function(L){var G=L[0],Y=L[1],P=window.getComputedStyle(G);return[G.dataset.flipId,{element:G,rect:Y,opacity:parseFloat(P.opacity),transform:P.transform}]}).reduce(Ga,{}),S=(function(L){var G=L.containerEl,Y=L.portalKey;return Y?(function(P){return function(T){return Ir(document.querySelectorAll("["+ji+'="'+P+'"]'+T))}})(Y):G?(function(P){var T=Math.random().toFixed(5);return P.dataset.flipperId=T,function(z){return Ir(P.querySelectorAll('[data-flipper-id="'+T+'"] '+z))}})(G):function(){return[]}})({containerEl:u,portalKey:y}),I=(function(L){return function(G){return L("["+Hi+'="'+G+'"]')[0]}})(S),R=function(L){return s[L]&&B[L]},D=Object.keys(s).concat(Object.keys(B)).filter(function(L){return!R(L)}),b={flipCallbacks:f,getElement:I,flippedElementPositionsBeforeUpdate:s,flippedElementPositionsAfterUpdate:B,inProgressAnimations:i,decisionData:g},w=(function(L){var G,Y=L.unflippedIds,P=L.flipCallbacks,T=L.getElement,z=L.flippedElementPositionsBeforeUpdate,q=L.flippedElementPositionsAfterUpdate,Q=L.inProgressAnimations,te=L.decisionData,ee=Y.filter(function(pe){return q[pe]}).filter(function(pe){return P[pe]&&P[pe].onAppear}),ne=Y.filter(function(pe){return z[pe]&&P[pe]&&P[pe].onExit}),ce=new Promise(function(pe){G=pe}),oe=[],Ie=0,ve=ne.map(function(pe,we){var Xe=z[pe].domDataForExitAnimations,Ne=Xe.element,Je=Xe.parent,rt=Xe.childPosition,$e=rt.top,ue=rt.left,U=rt.width,me=rt.height;getComputedStyle(Je).position==="static"&&(Je.style.position="relative"),Ne.style.transform="matrix(1, 0, 0, 1, 0, 0)",Ne.style.position="absolute",Ne.style.top=$e+"px",Ne.style.left=ue+"px",Ne.style.height=me+"px",Ne.style.width=U+"px";var Se=oe.filter(function(et){return et[0]===Je})[0];Se||(Se=[Je,document.createDocumentFragment()],oe.push(Se)),Se[1].appendChild(Ne),Ie+=1;var be=function(){try{Je.removeChild(Ne)}catch{}finally{(Ie-=1)==0&&G()}};return Q[pe]={stop:be},function(){return P[pe].onExit(Ne,we,be,te)}});return oe.forEach(function(pe){pe[0].appendChild(pe[1])}),ve.length||G(),{hideEnteringElements:function(){ee.forEach(function(pe){var we=T(pe);we&&(we.style.opacity="0")})},animateEnteringElements:function(){ee.forEach(function(pe,we){var Xe=T(pe);Xe&&P[pe].onAppear(Xe,we,te)})},animateExitingElements:function(){return ve.forEach(function(pe){return pe()}),ce}}})(Jt({},b,{unflippedIds:D})),F=w.hideEnteringElements,N=w.animateEnteringElements,M=w.animateExitingElements,V=Jt({},b,{containerEl:u,flippedIds:e.filter(R),applyTransformOrigin:o,spring:m,debug:x,staggerConfig:d,scopedSelector:S,onComplete:v});C&&C(u,g);var $=(function(L){var G,Y=L.flippedIds,P=L.flipCallbacks,T=L.inProgressAnimations,z=L.flippedElementPositionsBeforeUpdate,q=L.flippedElementPositionsAfterUpdate,Q=L.applyTransformOrigin,te=L.spring,ee=L.getElement,ne=L.debug,ce=L.staggerConfig,oe=ce===void 0?{}:ce,Ie=L.decisionData,ve=Ie===void 0?{}:Ie,pe=L.onComplete,we=L.containerEl,Xe=new Promise(function(K){G=K});if(pe&&Xe.then(function(){return pe(we,ve)}),!Y.length)return function(){return G([]),Xe};var Ne=[],Je=ee(Y[0]),rt=Je?Je.ownerDocument.querySelector("body"):document.querySelector("body");Ua(Y);var $e=Y.map(function(K){var he=z[K].rect,se=q[K].rect,De=z[K].opacity,Z=q[K].opacity,lt=se.width<1||se.height<1,Me=q[K].element;if(!v0(he)&&!v0(se)||!Me)return!1;var _t,ir,mt,ct=m0(Me),ar=(mt=(ir=(_t={flipperSpring:te,flippedSpring:ct.spring})===void 0?{}:_t).flippedSpring,Jt({},wi.noWobble,p0(ir.flipperSpring),p0(mt))),Cr=ct.stagger===!0?"default":ct.stagger,zr={element:Me,id:K,stagger:Cr,springConfig:ar};if(P[K]&&P[K].shouldFlip&&!P[K].shouldFlip(ve.previous,ve.current))return!1;var sr=Math.abs(he.left-se.left)+Math.abs(he.top-se.top),Er=Math.abs(he.width-se.width)+Math.abs(he.height-se.height),br=Math.abs(Z-De);if(he.height===0&&se.height===0||he.width===0&&se.width===0||sr<.5&&Er<.5&&br<.01)return!1;var Ht=iu(q[K].transform),Nt={matrix:Ht},St={matrix:[]},$t=[Ht];ct.translate&&($t.push(ou(he.left-se.left)),$t.push(uu(he.top-se.top))),ct.scale&&($t.push(au(Math.max(he.width,1)/Math.max(se.width,1))),$t.push(su(Math.max(he.height,1)/Math.max(se.height,1)))),ct.opacity&&(St.opacity=De,Nt.opacity=Z);var Wt=[];if(!P[K]||!P[K].shouldInvert||P[K].shouldInvert(ve.previous,ve.current)){var or=(function(ie,at){return Ir(ie.querySelectorAll("["+Wi+'="'+at+'"]'))})(Me,K);Wt=or.map(function(ie){return[ie,m0(ie)]})}St.matrix=g0($t.reduce(nu)),Nt.matrix=g0(Nt.matrix);var jt,Ar=(function(ie){var at=ie.element,Pt=ie.invertedChildren,Tt=ie.body;return function(qt){var Vt=qt.matrix,zt=qt.opacity,ur=qt.forceMinVals;if(dn(zt)&&(at.style.opacity=zt+""),ur&&(at.style.minHeight="1px",at.style.minWidth="1px"),Vt){var ai=(function(Ut){return"matrix("+Ut.join(", ")+")"})(Vt);at.style.transform=ai,Pt&&(function(Ut){var lr=Ut.matrix,Xr=Ut.body;Ut.invertedChildren.forEach(function(cr){var Qr=cr[0],Zr=cr[1];if(Xr.contains(Qr)){var Jr=lr[0],en=lr[3],si=lr[5],Ot={translateX:0,translateY:0,scaleX:1,scaleY:1},Or="";Zr.translate&&(Ot.translateX=-lr[4]/Jr,Ot.translateY=-si/en,Or+="translate("+Ot.translateX+"px, "+Ot.translateY+"px)"),Zr.scale&&(Ot.scaleX=1/Jr,Ot.scaleY=1/en,Or+=" scale("+Ot.scaleX+", "+Ot.scaleY+")"),Qr.style.transform=Or}})})({invertedChildren:Pt,matrix:Vt,body:Tt})}}})({element:Me,invertedChildren:Wt,body:rt});if(P[K]&&P[K].onComplete){var Kt=P[K].onComplete;jt=function(){return Kt(Me,ve)}}var dt=dn(St.opacity)&&dn(Nt.opacity)&&St.opacity!==Nt.opacity,Ge=!1;return Jt({},zr,{stagger:Cr,springConfig:ar,getOnUpdateFunc:function(ie){var at=ie.spring,Pt=ie.onAnimationEnd;return T[K]={destroy:at.destroy.bind(at),onAnimationEnd:Pt},function(Tt){P[K]&&P[K].onSpringUpdate&&P[K].onSpringUpdate(Tt.getCurrentValue()),Ge||(Ge=!0,P[K]&&P[K].onStart&&P[K].onStart(Me,ve));var qt=Tt.getCurrentValue();if(rt.contains(Me)){var Vt={matrix:[]};Vt.matrix=St.matrix.map(function(zt,ur){return Bi(zt,Nt.matrix[ur],qt)}),dt&&(Vt.opacity=Bi(St.opacity,Nt.opacity,qt)),Ar(Vt)}else Tt.destroy()}},initializeFlip:function(){Ar({matrix:St.matrix,opacity:dt?St.opacity:void 0,forceMinVals:lt}),P[K]&&P[K].onStartImmediate&&P[K].onStartImmediate(Me,ve),ct.transformOrigin?Me.style.transformOrigin=ct.transformOrigin:Q&&(Me.style.transformOrigin="0 0"),Wt.forEach(function(ie){var at=ie[0],Pt=ie[1];Pt.transformOrigin?at.style.transformOrigin=Pt.transformOrigin:Q&&(at.style.transformOrigin="0 0")})},onAnimationEnd:function(ie){delete T[K],$a(jt)&&jt(),Me.style.transform="",Wt.forEach(function(at){at[0].style.transform=""}),lt&&Me&&(Me.style.minHeight="",Me.style.minWidth=""),ie||(Ne.push(K),Ne.length>=$e.length&&G(Ne))},delayUntil:ct.delayUntil})}).filter(Boolean);if($e.forEach(function(K){return(0,K.initializeFlip)()}),ne)return function(){};var ue=$e.filter(function(K){return K.delayUntil&&(he=K.delayUntil,$e.filter(function(se){return se.id===he}).length);var he}),U={},me={},Se={};ue.forEach(function(K){K.stagger?(Se[K.stagger]=!0,me[K.delayUntil]?me[K.delayUntil].push(K.stagger):me[K.delayUntil]=[K.stagger]):U[K.delayUntil]?U[K.delayUntil].push(K):U[K.delayUntil]=[K]});var be=$e.filter(function(K){return K.stagger}).reduce(function(K,he){return K[he.stagger]?K[he.stagger].push(he):K[he.stagger]=[he],K},{}),et=$e.filter(function(K){return ue.indexOf(K)===-1});return et.forEach(function(K){K.onSpringActivate=function(){U[K.id]&&U[K.id].forEach(x0),me[K.id]&&Object.keys(me[K.id].reduce(function(he,se){var De;return Jt(he,((De={})[se]=!0,De))},{})).forEach(function(he){h0(be[he],oe[he])})}}),function(){return $e.length||G([]),et.filter(function(K){return!K.stagger}).forEach(x0),Object.keys(be).forEach(function(K){Se[K]||h0(be[K],oe[K])}),Xe}})(V);p?p({hideEnteringElements:F,animateEnteringElements:N,animateExitingElements:M,animateFlippedElements:$}):(F(),M().then(N),$())}},mu=function(n){var r=n.element,e=n.flipCallbacks,t=e===void 0?{}:e,i=n.inProgressAnimations,a=i===void 0?{}:i,s=Ya(r,n.portalKey),l=Ir(r.querySelectorAll("["+Wi+"]")),f={},u=[],o={};s.filter(function(y){return t&&t[y.dataset.flipId]&&t[y.dataset.flipId].onExit}).forEach(function(y){var h=y.parentNode;if(y.closest){var d=y.closest("["+lu+"]");d&&(h=d)}var c=u.findIndex(function(g){return g[0]===h});c===-1&&(u.push([h,h.getBoundingClientRect()]),c=u.length-1),f[y.dataset.flipId]=u[c][1],o[y.dataset.flipId]=h});var m=Xa(s),x=m.map(function(y){var h=y[0],d=y[1],c={};if(t&&t[h.dataset.flipId]&&t[h.dataset.flipId].onExit){var g=f[h.dataset.flipId];Jt(c,{element:h,parent:o[h.dataset.flipId],childPosition:{top:d.top-g.top,left:d.left-g.left,width:d.width,height:d.height}})}return[h.dataset.flipId,{rect:d,opacity:parseFloat(window.getComputedStyle(h).opacity||"1"),domDataForExitAnimations:c}]}).reduce(Ga,{});return(function(y,h){Object.keys(y).forEach(function(d){y[d].destroy&&y[d].destroy(),y[d].onAnimationEnd&&y[d].onAnimationEnd(!0),delete y[d]}),h.forEach(function(d){d.style.transform="",d.style.opacity=""})})(a,s.concat(l)),{flippedElementPositions:x,cachedOrderedFlipIds:m.map(function(y){return y[0].dataset.flipId})}};new ja;function Zn(){return Zn=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},Zn.apply(this,arguments)}function Di(n,r){return Di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Di(n,r)}function Qa(n,r){if(n==null)return{};var e,t,i={},a=Object.keys(n);for(t=0;t<a.length;t++)r.indexOf(e=a[t])>=0||(i[e]=n[e]);return i}var Za=Ea({}),Ja=Ea("portal"),es=(function(n){var r,e;function t(){for(var a,s=arguments.length,l=new Array(s),f=0;f<s;f++)l[f]=arguments[f];return(a=n.call.apply(n,[this].concat(l))||this).inProgressAnimations={},a.flipCallbacks={},a.el=void 0,a}e=n,(r=t).prototype=Object.create(e.prototype),r.prototype.constructor=r,Di(r,e);var i=t.prototype;return i.getSnapshotBeforeUpdate=function(a){return a.flipKey!==this.props.flipKey&&this.el?mu({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},i.componentDidUpdate=function(a,s,l){this.props.flipKey!==a.flipKey&&this.el&&vu({flippedElementPositionsBeforeUpdate:l.flippedElementPositions,cachedOrderedFlipIds:l.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:a.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart})},i.render=function(){var a=this,s=this.props,l=s.portalKey,f=Ze.createElement(Za.Provider,{value:this.flipCallbacks},Ze.createElement(s.element,{className:s.className,ref:function(u){return a.el=u}},this.props.children));return l&&(f=Ze.createElement(Ja.Provider,{value:l},f)),f},t})(Is);es.defaultProps={applyTransformOrigin:!0,element:"div"};var yu=["children","flipId","inverseFlipId","portalKey"],Fu=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],y0=function(n){var r,e=n.children,t=n.flipId,i=n.inverseFlipId,a=n.portalKey,s=Qa(n,yu),l=e,f=(function(o){return typeof o=="function"})(l);if(!f)try{l=Ss.only(e)}catch{throw new Error("Each Flipped component must wrap a single child")}s.scale||s.translate||s.opacity||Ha.assign(s,{translate:!0,scale:!0,opacity:!0});var u=((r={})[sn.DATA_FLIP_CONFIG]=JSON.stringify(s),r);return t!==void 0?u[sn.DATA_FLIP_ID]=String(t):i&&(u[sn.DATA_INVERSE_FLIP_ID]=String(i)),a!==void 0&&(u[sn.DATA_PORTAL_KEY]=a),f?l(u):ks(l,u)},ts=function(n){var r=n.children,e=n.flipId,t=n.shouldFlip,i=n.shouldInvert,a=n.onAppear,s=n.onStart,l=n.onStartImmediate,f=n.onComplete,u=n.onExit,o=n.onSpringUpdate,m=Qa(n,Fu);return r?m.inverseFlipId?Ze.createElement(y0,Zn({},m),r):Ze.createElement(Ja.Consumer,null,function(x){return Ze.createElement(Za.Consumer,null,function(y){return Ha.isObject(y)&&e&&(y[e]={shouldFlip:t,shouldInvert:i,onAppear:a,onStart:s,onStartImmediate:l,onComplete:f,onExit:u,onSpringUpdate:o}),Ze.createElement(y0,Zn({flipId:e},m,{portalKey:x}),r)})}):null};ts.displayName="Flipped";function Cu(n){const{data:r,activedItem:e,onChange:t,onDelete:i,sortRules:a=[{label:"\u5F53\u5929",dayPeriod:1}],eventsEmit:s,assistantList:l,height:f=400,styles:u={},hasMore:o=!1,loadingMore:m=!1}=n,x=r.map(R=>R.sessionId+"-"+R.gmtModified).join(","),y=qe(()=>{const R=a.length>0?a:[{label:"\u5F53\u5929",dayPeriod:1}],D=ru(r,R),b=R.every(F=>!D[F.label]||D[F.label].length===0),w=[];return R.forEach(F=>{D[F.label]&&D[F.label].length>0&&(w.push({type:"group",label:F.label}),D[F.label].forEach(N=>w.push({type:"item",data:N})))}),D.other.length>0&&!b&&(w.push({type:"group",label:"\u5176\u4ED6"}),D.other.forEach(F=>w.push({type:"item",data:F}))),b&&D.other.length>0&&D.other.forEach(F=>w.push({type:"item",data:F})),w},[r,a,x]),h=qe(()=>y.map(R=>R.type==="group"?`g:${R.label}`:`i:${R.data.sessionId}`).join("|"),[y]),d=56,c=14,g=36,p=R=>R===y.length?g:y[R].type==="group"?32:d+c,v=Qe(null),C=qe(()=>y.findIndex(R=>{var D;return R.type==="item"&&((D=R.data)==null?void 0:D.sessionId)===e}),[y,e]),A=qe(()=>y.findIndex(R=>R.type==="item"),[y]),B=Qe(void 0);Le(()=>{const R=B.current;e!==R&&C>-1&&C===A&&v.current&&v.current.scrollToItem(C,"start"),B.current=e},[e,C,A]);const S=Qe(0);if(Le(()=>{if(v.current){const R=S.current,D=y.length;if(S.current=D,D!==R){const w=(R>0?Math.abs(D-R)/R:1)>.5||R<10&&D>20;v.current.resetAfterIndex(0,w)}}},[y.length]),Le(()=>{v.current&&v.current.resetAfterIndex(0,!0)},[h]),y.length===0)return k("div",{className:"text-center text-zinc-400 py-8",children:"\u6682\u65E0\u4F1A\u8BDD"});const I=(u==null?void 0:u.colors)||{};return k(es,{flipKey:x,spring:{stiffness:180,damping:18},children:k(eu,{ref:v,height:f,width:"100%",itemCount:y.length+1,itemSize:p,itemKey:R=>{if(R===y.length)return"footer";const D=y[R];return D.type==="item"?D.data.sessionId:`group-${D.label}`},onItemsRendered:({visibleStopIndex:R})=>{o&&!m&&R>=y.length-1-3&&typeof s=="function"&&s("conversations:load_more")},style:{overflowX:"hidden"},children:({index:R,style:D})=>{if(R===y.length){const w=(u==null?void 0:u.colors)||{};return k("div",{style:{...D,height:g,lineHeight:`${g}px`,textAlign:"center",fontSize:"10px",color:w.textMuted||"#9ca3af",background:w.groupBg||"white"},children:m?"\u52A0\u8F7D\u4E2D...":o?"":"\u6CA1\u6709\u66F4\u591A\u4E86"})}const b=y[R];return b.type==="group"?k("div",{style:{...D,background:I.groupBg||"white",zIndex:1},className:"pt-2 pb-1 px-[28px] py-[2px] text-xs text-gray-400",children:b.label}):k(ts,{flipId:b.data.sessionId,children:k("div",{style:D,className:"px-[12px] py-[2px]",children:k(tu,{isActive:e===b.data.sessionId,isDisabled:!1,isNew:b.data.isNew,data:b.data,eventsEmit:s,assistantList:l,styles:u})})},b.data.sessionId)}})})}const Eu=({value:n,eventsEmit:r,setSearch:e,style:t,styles:i={}})=>{const{messages:a}=ri(),s=i.colors||{},l=i.radius||"12px",f=s.border||"#e5e7eb",u=s.primary||"#2563eb",o=i.headerBg||s.sidebarBg||s.background||"#fff",[m,x]=Ze.useState(!1),y=Ze.useRef(null);Ze.useEffect(()=>{m&&y.current&&y.current.focus()},[m]);const h=()=>{x(!1),e("")};return X("div",{className:"flex items-center gap-2 px-4 py-3 sticky top-0 z-10 min-w-0",style:{...t,background:o,borderTopLeftRadius:l,borderTopRightRadius:l},children:[k("button",{className:"border-none flex items-center justify-center",onClick:()=>{x(!1),r&&r("conversation:create")},title:a.sidebar.newConversation,style:{height:42,borderRadius:"90px",background:u,color:s.buttonText||"#fff",fontWeight:600,boxShadow:i.shadow||"0 2px 8px 0 rgba(0,0,0,0.04)",padding:m?"0 0":"0 14px",minWidth:m?0:180,width:m?0:void 0,opacity:m?0:1,overflow:"hidden",flexShrink:0,transition:"width .22s ease, min-width .22s ease, padding .22s ease, opacity .18s ease",pointerEvents:m?"none":"auto"},children:X("div",{className:"flex items-center gap-2",children:[k(Ks,{size:18}),k("span",{className:"text-sm",children:a.sidebar.newChat})]})}),m?X("div",{className:"flex-1 min-w-0 relative",children:[k("input",{ref:y,className:"w-full px-3 py-2 pr-10 text-sm transition-all",placeholder:a.sidebar.searchPlaceholder,value:n,onChange:d=>e(d.target.value),onKeyDown:d=>{d.key==="Escape"&&h()},style:{minWidth:0,width:"100%",borderRadius:l,background:s.inputBg||"#f4f4f5",border:`1px solid ${f}`,color:s.text||"#222",outline:"none",paddingRight:40}}),k("button",{className:"absolute right-3 flex items-center justify-center transition-colors hover:bg-gray-200 rounded-full",style:{width:20,height:20,color:s.text||"#666",flexShrink:0,position:"absolute",right:"12px",top:"9px"},onClick:h,title:"\u5173\u95ED\u641C\u7D22",onMouseDown:d=>d.preventDefault(),children:k(Sa,{size:16})})]}):k("button",{className:"ml-auto flex items-center justify-center transition-colors hover:bg-gray-50",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${f}`,color:u,flexShrink:0},onClick:()=>x(!0),title:a.sidebar.search,children:k(Yn,{size:18})})]})};function bu(n){const{data:r,sortRules:e,activedItem:t,eventsEmit:i,assistantList:a,styles:s={},hasMore:l=!1,loadingMore:f=!1}=n,{messages:u}=ri(),[o,m]=J(""),x=qe(()=>o?r.filter(B=>(B.label||u.sidebar.unnamedSession).toLowerCase().includes(o.toLowerCase())):r,[r,o,u.sidebar.unnamedSession]),y=qe(()=>[...x].sort((B,S)=>new Date(S.gmtModified).getTime()-new Date(B.gmtModified).getTime()),[x]),h=Qe(null),[d,c]=J(400);Le(()=>{function B(){h.current&&c(h.current.clientHeight)}return B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)},[]);const g=(s==null?void 0:s.colors)||{};s!=null&&s.radius;const p=(s==null?void 0:s.shadow)||"0 4px 24px 0 rgba(0,0,0,0.06)",v=g.border||"#e5e7eb",C=g.sidebarBg||g.background||"#EAEEFF",A=g.text||"#222";return X("div",{className:"h-full flex flex-col overflow-y-hidden",style:{background:C,color:A,boxShadow:p,border:`1px solid ${v}`,...s.container},children:[k(Eu,{value:o,setSearch:m,eventsEmit:i,style:s.header,styles:s}),X("div",{className:"flex-1 min-h-0 relative",ref:h,style:s.list,children:[k(Cu,{eventsEmit:i,data:y,assistantList:a,activedItem:t,sortRules:e,height:d,styles:s,hasMore:l,loadingMore:f}),k("div",{className:"pointer-events-none absolute left-0 right-0 top-0 h-3 z-20",style:{background:`linear-gradient(to bottom, ${C}cc, transparent)`}})]})]})}const Au=""+new URL("defaultWeLogo.svg",import.meta.url).href,Bu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOkSURBVHgBxZRbTBxlFMd/c2EvXBbZLbsCVhcKaAyh2BKTWrX12RhNmxa1IVp98FEJVGNMY2KItSZtqGjaROMlaDSVxiZeqiRa0FBpIlSkhgK15WoLu7AL3V1md25+7CpUojzYB7/km5OZc+Z35pzz/wb+l3X7PotNL9tvd1yIc8OrYp9pWXZ6JXXdfLOtbdNa4fJazoZdu9xVNUE5petIVS9h/npRfkDKefg/A+OaJuUGvIz3DzD14R6uHv/WCmzbcuNlj7S+3z7+5Xepno7TLeJWWiv2n5zyTcEaT/TJlrfwljxCTm42lgHRmIHDqaIqIsTE43NS7FHCBXKkIzw4eGKkYcdnwmGvBspSy+DpxlrffXtqC6WeqM3+CZ3wnAZLOyXAlsXfOjU7D6EYHLw7zVKvgykcG+r98YmKjdG5BK3nw7w7YQuATdAJWR4IJ2UiswKoiC39+S0+4QjNL0NWgDU7y57ZVlLd2n+FO/Kd7BxxcPOpMKGrCSxNTNm2kVUZ2e1g+5YCxh4q4IW+cAactYTZLi6dxgqw4dUjj+UgfXpSJRAaY9Lt4dZAkoW5YWSXyKwo6ZYbhsFCciPe9hgHtDiB+kqe6huF6jknv2As9/Dj3mv2se4Yh5RhEr4SbD2FpMjomkZ0eoaunl5yxXwqKsspKwsiOVzYqST143k8Xe7gvaN17tHOTi0D/D6U3DqhO7oNNxOlU6heD0cOH2frg/dSU1ywMgRhRmMpvvjoG55t3I0RWWDvuST9iy5q64qtr2/LV9Ill/aNOsb9fnC48a+zGYzF6R/opefsGU59sl88d6V5tpagqekNFg2LgeHN3F/pJS9rET2l4v15Ruav1PHLEdsUJYpXcNjXKA54iCd11gf9ONUkLqeVtu4ciQUjwcCF3wjc4sUlJbhouyjOVek6O2kvT3kGV3e9P/uetlmhi4VpCsU0Wz5o5i6/kIehY8UjyHlLpVt8daKZc1d0qt3zaV2ex09LjYvnhsx3rj8pEq90N1QU+Q+9WJVgbzBPpFIzIrZNsYWVlYyVhJXVtFys6UHWf76O36NDu3nt0fbVJ0Wm6Sedomx5hzPCwYpJygvdkOMVQhbKFjrEFG2JRQjPTHH4Uh4HoptFfy2T5+9clt/qo6fS9MMYilqEL1dCyCQtQsnKhC51yUyCkBLz4qeT77Np3KCme/EvwJVndUcfl0qr6uzKwAb8biemqTCjmYS0RUKhM1zuep2TzZfIpFlefwDISXe8s31UTQAAAABJRU5ErkJggg==",wu=(n,r)=>{const e={...ti.colors,...n};return`
|
|
53
|
+
.g-welcome-${r} .g-welcome-title {
|
|
54
|
+
background-image: linear-gradient(90deg, #3262FA 0%, #6C18FF 100%);
|
|
55
|
+
-webkit-background-clip: text;
|
|
56
|
+
background-clip: text;
|
|
57
|
+
color: transparent;
|
|
58
|
+
-webkit-text-fill-color: transparent;
|
|
59
|
+
}
|
|
60
|
+
.g-welcome-${r} .g-welcome-subtitle {
|
|
61
|
+
color: ${e.disabled};
|
|
62
|
+
}
|
|
63
|
+
.g-welcome-${r} .g-welcome-btn {
|
|
64
|
+
background-color: #ffffff;
|
|
65
|
+
border-color: ${e.border};
|
|
66
|
+
color: ${e.text};
|
|
67
|
+
height: 36px;
|
|
68
|
+
border-width: 1px;
|
|
69
|
+
box-shadow: 0 1px 2px rgba(31,35,41,0.04);
|
|
70
|
+
}
|
|
71
|
+
.g-welcome-${r} .g-welcome-btn:hover {
|
|
72
|
+
border-color: ${e.primary};
|
|
73
|
+
color: ${e.primary};
|
|
74
|
+
background-color: #ffffff;
|
|
75
|
+
box-shadow: 0 2px 6px rgba(31,35,41,0.08);
|
|
76
|
+
}
|
|
77
|
+
.g-welcome-${r} .g-welcome-btn.active {
|
|
78
|
+
background-image: linear-gradient(90deg, #F1F8FF 0%, #F9F4FF 100%);
|
|
79
|
+
border-color: ${e.primary};
|
|
80
|
+
box-shadow: 0 4px 10px rgba(24, 144, 255, 0.25);
|
|
81
|
+
}
|
|
82
|
+
.g-welcome-${r} .g-welcome-btn .icon-badge {
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
border-radius: 9999px;
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
background: radial-gradient(100% 100% at 50% 0%, #F2F3F5 0%, #FFFFFF 100%);
|
|
90
|
+
box-shadow: inset 0 0 0 1px ${e.border};
|
|
91
|
+
}
|
|
92
|
+
.g-welcome-${r} .g-welcome-pagination-btn {
|
|
93
|
+
background: transparent;
|
|
94
|
+
border: none;
|
|
95
|
+
color: ${e.disabled};
|
|
96
|
+
padding: 6px 10px;
|
|
97
|
+
border-radius: 9999px;
|
|
98
|
+
transition: all 0.2s;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
line-height: 1;
|
|
101
|
+
min-width: 32px;
|
|
102
|
+
height: 32px;
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
}
|
|
107
|
+
.g-welcome-${r} .g-welcome-pagination-btn:hover:not(:disabled) {
|
|
108
|
+
color: ${e.text};
|
|
109
|
+
background-color: ${e.border}33;
|
|
110
|
+
}
|
|
111
|
+
.g-welcome-${r} .g-welcome-pagination-btn.active {
|
|
112
|
+
color: ${e.primary};
|
|
113
|
+
background: radial-gradient(100% 100% at 50% 50%, ${e.primary}10 0%, ${e.primary}08 100%);
|
|
114
|
+
box-shadow: 0 2px 10px ${e.primary}12, inset 0 0 0 1px ${e.primary}1A;
|
|
115
|
+
}
|
|
116
|
+
.g-welcome-${r} .g-welcome-pagination-btn:disabled {
|
|
117
|
+
color: ${e.disabled};
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
background: transparent;
|
|
120
|
+
}
|
|
121
|
+
.g-welcome-${r} .g-welcome-pagination-text {
|
|
122
|
+
color: ${e.disabled};
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
padding: 0 8px;
|
|
125
|
+
}
|
|
126
|
+
.g-welcome-${r} .g-welcome-pagination-dot {
|
|
127
|
+
width: 6px;
|
|
128
|
+
height: 6px;
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
background-color: ${e.border};
|
|
131
|
+
transition: all 0.2s;
|
|
132
|
+
}
|
|
133
|
+
.g-welcome-${r} .g-welcome-pagination-dot.active {
|
|
134
|
+
background-color: ${e.primary};
|
|
135
|
+
width: 20px;
|
|
136
|
+
border-radius: 3px;
|
|
137
|
+
}
|
|
138
|
+
.g-welcome-${r} .g-welcome-search-btn {
|
|
139
|
+
background-color: #ffffff;
|
|
140
|
+
border: 1px solid ${e.border};
|
|
141
|
+
color: ${e.text};
|
|
142
|
+
padding: 8px 8px;
|
|
143
|
+
border-radius: 100%;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
transition: all 0.2s;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: 6px;
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
box-shadow: 0 1px 2px rgba(31,35,41,0.04);
|
|
151
|
+
}
|
|
152
|
+
.g-welcome-${r} .g-welcome-search-btn:hover {
|
|
153
|
+
border-color: ${e.primary};
|
|
154
|
+
color: ${e.primary};
|
|
155
|
+
box-shadow: 0 2px 6px rgba(31,35,41,0.08);
|
|
156
|
+
}
|
|
157
|
+
.g-welcome-${r} .g-welcome-search-input {
|
|
158
|
+
border: 1px solid ${e.border};
|
|
159
|
+
border-radius: 9999px;
|
|
160
|
+
transition: all 0.2s;
|
|
161
|
+
height: 40px;
|
|
162
|
+
padding: 0 14px;
|
|
163
|
+
}
|
|
164
|
+
.g-welcome-${r} .g-welcome-search-input:focus,
|
|
165
|
+
.g-welcome-${r} .g-welcome-search-input:hover {
|
|
166
|
+
border-color: ${e.primary};
|
|
167
|
+
box-shadow: 0 0 0 2px ${e.primary}1A;
|
|
168
|
+
}
|
|
169
|
+
`};function Du({config:n,styles:r}){if(!n)return null;const e=JSON.parse(n.configJson),t=qe(()=>{var i;return{...ti.colors,...(i=r==null?void 0:r.theme)==null?void 0:i.colors}},[r]);return X("div",{className:"w-[340px] rounded-xl p-4 animate-fade-in bg-white",children:[X("div",{className:"flex items-center mb-2",children:[k("span",{className:"text-md font-bold truncate mr-2",style:{color:t.primary},children:e.config_name||"\u52A9\u624B\u914D\u7F6E"}),k("span",{className:"text-xs truncate rounded px-2 py-0.5",style:{backgroundColor:`${t.primary}1A`,color:t.disabled},children:e.model_name})]}),k("div",{className:"border-b my-2",style:{borderColor:t.border}}),X("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-700 mb-2",style:{color:t.text},children:[X("div",{children:["\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570\uFF1A",k("span",{className:"font-semibold",children:e.max_round})]}),X("div",{children:["\u6700\u5927\u4EE4\u724C\u6570\uFF1A",k("span",{className:"font-semibold",children:e.max_tokens})]}),X("div",{children:["\u6E29\u5EA6\uFF1A",k("span",{className:"font-semibold",children:e.temperature})]}),X("div",{children:["\u53EC\u56DE\u6570\uFF1A",k("span",{className:"font-semibold",children:e.top_k})]}),X("div",{children:["\u591A\u6837\u6027\uFF1A",k("span",{className:"font-semibold",children:e.top_p})]}),X("div",{children:["\u76F8\u4F3C\u5EA6\u9608\u503C\uFF1A",k("span",{className:"font-semibold",children:e.score_threshold})]})]}),X("div",{className:"mb-2",children:[k("div",{className:"text-xs text-gray-400 mb-1",style:{color:t.disabled},children:"\u5173\u8054\u77E5\u8BC6\u5E93\uFF1A"}),k("div",{className:"flex flex-wrap gap-1",children:e.knowledge_base_name?e.knowledge_base_name.split(";").map((i,a)=>k("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:`${t.primary}1A`,color:t.primary},children:i},a)):k("span",{className:"text-gray-300",style:{color:t.disabled},children:"\u65E0"})})]}),X("div",{className:"mb-2",children:[k("div",{className:"text-xs text-gray-400 mb-1",style:{color:t.disabled},children:"\u5F00\u542F\u529F\u80FD:"}),X("div",{className:"flex flex-wrap gap-2 text-xs mt-2",children:[!!e.enabled_faq&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"FAQ"}),!!e.enabled_graph&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u56FE\u8C31"}),!!e.dependOnKb&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u5F3A\u77E5\u8BC6\u4F9D\u8D56"}),!!e.enabled_table_select&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u8868\u683C\u7B5B\u9009"}),!!e.enabled_rerank&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u7CBE\u6392\u6A21\u5F0F"}),!!e.need_trace_source&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u6EAF\u6E90"}),!!e.is_download&&k("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${t.success}1A`,color:t.success},children:"\u4E0B\u8F7D\u6EAF\u6E90"})]})]})]})}function _u(n,r=[],e=60){const[t,i]=J("");return Le(()=>{if(i(""),!n)return;let a=0;const s=setInterval(()=>{i(l=>a>=n.length?(clearInterval(s),l):(a++,n.slice(0,a)))},e);return()=>clearInterval(s)},[n,...r]),t}function Su(n){const{assistantList:r,eventsEmit:e,styles:t,selectedId:i,onSelectAssistant:a,productLogo:s}=n,{messages:l}=ri(),[f,u]=J(1),[o,m]=J(!1),[x,y]=J(""),h=o||x.trim()?6:12,d=Qe(),c=Qe(!1),g=Qe(null),p=Qe(null),v=Qe("");Le(()=>{i&&d.current!==i&&(e==null||e("conversation:new_assistant_change",{assistantId:i}),d.current=i)},[i,e]);const C=qe(()=>er(),[]);Le(()=>{var w;if((w=t==null?void 0:t.theme)!=null&&w.colors){const F=document.createElement("style");return F.innerHTML=wu(t.theme.colors,C),F.id=`g-welcome-styles-${C}`,document.head.appendChild(F),()=>{const N=document.getElementById(F.id);N&&N.remove()}}},[t,C]);const A=qe(()=>r.find(w=>w.id===i),[r,i]),B=qe(()=>JSON.parse((A==null?void 0:A.configJson)||"{}"),[A]),S=qe(()=>{if(!x.trim())return r||[];const w=x.toLowerCase().trim();return(r||[]).filter(F=>{var M,V;const N=((M=F.name)==null?void 0:M.toLowerCase())||"";try{const L=((V=JSON.parse(F.configJson||"{}").config_name)==null?void 0:V.toLowerCase())||"";return N.includes(w)||L.includes(w)}catch{return N.includes(w)}})},[r,x]),I=Math.ceil(((S==null?void 0:S.length)||0)/h),R=(S==null?void 0:S.slice((f-1)*h,f*h))||[];Le(()=>{if(i&&i!==p.current){if(c.current&&g.current!==null){p.current=i;return}const w=x.trim()?S:r;if(w&&w.length>0){const F=w.findIndex(N=>N.id===i);if(F!==-1){const N=Math.floor(F/h)+1;u(N),p.current=i}}}},[i,r,S,h,x]),Le(()=>{if(x!==v.current){if(c.current&&g.current!==null){u(g.current),c.current=!1,g.current=null,v.current=x;return}if(p.current===i){v.current=x;return}c.current||(x.trim()&&(p.current=null),u(1)),v.current=x}},[x,i]),Le(()=>{I>0&&f>I&&u(I)},[I,f]);const D=B.prologue||l.welcome.defaultPrologue,b=_u(D,[i],30);return X("div",{className:`flex flex-col relative items-center justify-center h-full w-full g-welcome-${C}`,children:[k("img",{src:s||Au,alt:"logo",className:"mb-4",style:{width:68,height:68}}),k("div",{className:"text-3xl font-bold mb-2 g-welcome-title",children:b}),!i&&k("div",{className:"flex mb-2 g-welcome-subtitle",children:l.welcome.selectAssistant}),X("div",{style:{maxWidth:"1200px"},className:`flex mt-8 flex-wrap gap-3\r
|
|
170
|
+
max-w-[1200px] px-8 w-full mx-auto justify-center mb-4`,children:[o?k("div",{className:"flex items-center gap-2 px-5 w-full",style:{flexBasis:"100%"},children:k(Vr,{className:"g-welcome-search-input w-full",placeholder:l.welcome.searchAssistant,prefix:k(Yn,{size:16}),suffix:k("button",{type:"button",onClick:()=>{m(!1),y("")},style:{background:"transparent",border:"none",cursor:"pointer"},children:k(Sa,{size:14})}),value:x,onChange:w=>y(w.target.value),autoFocus:!0})}):k("button",{type:"button",className:"g-welcome-search-btn",onClick:()=>m(!0),children:k(Yn,{size:16})}),R&&R.length>0?k(Nr,{children:R.map(w=>{const F=i===w.id;let N=w.icon;try{const M=JSON.parse(w.configJson||"{}");N=N||M.icon||M.avatar||M.logo}catch{}return N=N||Bu,k(Os,{content:()=>k(Du,{config:r.find(M=>M.id===w.id),styles:t}),trigger:"hover",placement:"bottom",children:X("button",{type:"button",className:`g-welcome-btn px-3 cursor-pointer rounded-full border font-medium min-w-[160px] text-sm transition-all flex items-center gap-2 ${F?"active":""}`,onClick:()=>{a==null||a(w.id);const M=o||x.trim(),$=(M?r:x.trim()?S:r).findIndex(L=>L.id===w.id);if($!==-1){const G=Math.floor($/(M?12:h))+1;u(G),p.current=w.id,M&&(g.current=G,c.current=!0,setTimeout(()=>{y(""),m(!1)},100))}},title:w.name,children:[k("span",{className:"icon-badge",children:k("img",{src:N,alt:"icon",style:{width:16,height:16,borderRadius:4}})}),k("span",{className:"truncate max-w-[180px]",children:w.name})]})},w.id)})}):k("div",{className:"g-welcome-subtitle",children:"\u6682\u65E0\u53EF\u7528\u52A9\u624B"})]}),I>1&&X("div",{className:"flex items-center gap-2",children:[k("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(w=>Math.max(1,w-1)),disabled:f===1,children:k(yo,{size:16})}),k("div",{className:"flex items-center gap-1",children:(()=>{const w=[];if(I<=7)for(let N=1;N<=I;N++)w.push(N);else if(w.push(1),f<=4){for(let N=2;N<=5;N++)w.push(N);w.push("..."),w.push(I)}else if(f>=I-3){w.push("...");for(let N=I-4;N<=I;N++)w.push(N)}else{w.push("...");for(let N=f-1;N<=f+1;N++)w.push(N);w.push("..."),w.push(I)}return w.map((N,M)=>{if(N==="...")return k("span",{className:"g-welcome-pagination-text px-1",children:"..."},`ellipsis-${M}`);const V=N;return k("button",{type:"button",className:`g-welcome-pagination-btn ${f===V?"active":""}`,onClick:()=>u(V),children:V},V)})})()}),k("button",{type:"button",className:"g-welcome-pagination-btn",onClick:()=>u(w=>Math.min(I,w+1)),disabled:f===I,children:k(Fo,{size:16})})]})]})}class gi extends Error{}let Bt=null,Mt=null,It=null,ze=[],pr,xr,vi=new Map;const ku=({baseUrl:n,token:r,CSRFToken:e,setChatData:t,activeSessionId:i,setAppStatus:a,setConversationList:s})=>{const l=c=>{if(!c)return!1;if(typeof c=="string"){const g=c.trim();return g!==""&&g!=="[]"&&g!=="null"}return!0},f=({content:c,status:g,respTime:p,filePaths:v,reference:C,webReference:A,knowledgeBases:B,graphReference:S,databaseReference:I,llmType:R,resultType:D,queryId:b,tokens:w,chain:F,thoughtChainNodes:N,enableCot:M,chainRespTime:V,faqReference:$})=>{t(L=>{var oe;if(!L[0])return L;const G=L[0],Y=G.messages||[],P=Y.length-1;if(P<0)return L;const T=Y[P];if(T.istype!=="ai")return L;let z=Y.slice();if(v!=null&&v.length){const Ie=Y.length-2;if(Ie>=0&&((oe=Y[Ie])==null?void 0:oe.istype)==="user"){const ve={...Y[Ie],filePaths:v};z[Ie]=ve}}const q=b&&b!==T.queryId,Q=g===1&&T.status===2,te=q||Q?l(S)?S:null:S!==void 0&&l(S)?S:T.graphReference;g===2&&S!==void 0&&console.log("[AichatUseController] reset_chat status=2 \u65F6\u7684 graphReference:",{graphReference:S,isValid:l(S),lastMessageGraphReference:T.graphReference,finalGraphReference:te,isNewQuery:q,isRestart:Q});let ee;q?ee=c:Q?ee="":g===4||g===2&&!c?ee=T.content||"":ee=(T.content||"")+c;const ne={...T,content:ee,status:g,respTime:p,filePaths:v,reference:q||Q?C||"[]":C,webReference:q||Q?A||"[]":A,knowledgeBases:q||Q?B||"[]":B,graphReference:te,databaseReference:q||Q?I!==void 0?I:null:I!==void 0?I:T.databaseReference,resultType:D,llmType:R,tokens:w,queryId:b||T.queryId||er(32),chain:q||Q?F!==void 0?F:void 0:F!==void 0?F:T.chain,thoughtChainNodes:q||Q?N!==void 0?N:void 0:N!==void 0?N:T.thoughtChainNodes,enableCot:M!==void 0?M:T.enableCot,chainRespTime:V!==void 0?V:T.chainRespTime,faqReference:q||Q?$!==void 0?$:null:$!==void 0?$:T.faqReference};return ne.clientSideId=ne.clientSideId||ne.queryId+"-ai",z[P]=ne,[{...G,isNew:!1,messages:z},...L.slice(1)]})},u=c=>{if(c instanceof gi)throw a(g=>({...g,display:"error",sender:"ready"})),Bt&&(Bt.abort(),Bt=null),Mt=null,It=null,c};return{updateUserFilesMessage:({currentFiles:c})=>{t(g=>{if(!g[0])return g;const p=g[0],v=p.messages||[];if(!v.length)return g;const C=v.length-2;if(C<0||v[C].istype!=="user")return g;const B=v.slice();return B[C]={...v[C],currentFiles:c},[{...p,messages:B},...g.slice(1)]})},api_startChat_re:(c,g)=>{Bt&&Bt.abort(),Bt=new AbortController,Mt=c.sessionId,It=c.queryId,ze=[],pr=void 0,xr=void 0,vi=new Map;const p=`${n}/qa/ai/question_re`;console.log("data",c);const v={...c};Co(p,{method:"post",signal:Bt.signal,headers:{"Content-Type":"application/json",Accept:"text/event-stream",Authorization:r||"","X-CSRF-TOKEN-IN":e||""},openWhenHidden:!0,body:JSON.stringify(v),onopen:async C=>{if(C.status===500)throw new gi("Internal Server Error");if(!C.ok)throw new gi(`HTTP error: ${C.status}`)},onmessage:C=>{var Q,te,ee,ne;const A=JSON.parse(C.data);if(Mt!==A.sessionId){console.log("[AichatUseController] \u6D41\u5F0F\u8BF7\u6C42\u7684 sessionId \u5DF2\u4E0D\u5339\u914D\uFF0C\u5FFD\u7565\u6570\u636E",{currentStreamSessionId:Mt,receivedSessionId:A.sessionId,activeSessionId:i});return}if(i!==A.sessionId)return;const{reply:B,resultType:S,respTime:I,reference:R,webReference:D,graphReference:b,knowledgeBases:w,filePaths:F,status:N,docs:M,llmType:V,databaseReference:$,businessType:L,nodeStatus:G,enableCot:Y,chainRespTime:P,faqReference:T}=A;if(N===4&&L){G===2&&typeof P=="number"&&P>0&&vi.set(L,P);const ce=G===2&&typeof P=="number"&&P>0?P:void 0;ze=qs(ze,{businessType:L,nodeStatus:G,reply:B,respTime:ce,chainRespTime:ce}),console.log("[AichatUseController] status=4 \u805A\u5408\u601D\u7EF4\u94FE\u6570\u636E:",{businessType:L,nodeStatus:G,content:(Q=B==null?void 0:B.content)==null?void 0:Q.substring(0,50),currentThoughtNodesCount:ze.length,chainRespTime:G===2?P:void 0})}else N===1&&L&&console.log("[AichatUseController] status=1 \u8DF3\u8FC7\u601D\u7EF4\u94FE\u805A\u5408:",{businessType:L,content:(te=B==null?void 0:B.content)==null?void 0:te.substring(0,50),note:"status=1 \u7684\u5185\u5BB9\u5E94\u8BE5\u53BB\u6B63\u6587\uFF0C\u4E0D\u662F\u601D\u7EF4\u94FE"});if(typeof Y=="number"&&(pr=Y),N===1||N===2){const ce=Array.from(vi.values()).reduce((oe,Ie)=>oe+Ie,0);ce>0&&(xr=ce)}const z=F?JSON.parse(F):[];N===2&&B&&B.content&&(B.content.includes("\u6A21\u578B\u6682\u65E0\u6CD5\u8FD4\u56DE")||B.content.includes("\u5931\u8D25")||B.content.includes("\u9519\u8BEF")||B.content.includes("\u8BF7\u7A0D\u540E\u518D\u8BD5"))&&a(ce=>({...ce,display:"ready",sender:"ready"}));const q=l(b)?b:void 0;if(N===2&&console.log("[AichatUseController] status=2 \u65F6\u7684 graphReference:",{graphReference:b,type:typeof b,isValid:l(b),finalGraphReference:q}),N===4){const ce=ze.length>0?ze.map(oe=>({businessType:oe.businessType,nodeStatus:oe.nodeStatus,content:oe.content})):void 0;console.log("[AichatUseController] status=4 \u66F4\u65B0\u601D\u7EF4\u94FE:",{businessType:L,chainLength:(ce==null?void 0:ce.length)||0,replyContentLength:((ee=B==null?void 0:B.content)==null?void 0:ee.length)||0,note:"status=4 \u65F6\uFF0Creply.content \u5E94\u8BE5\u805A\u5408\u5230\u601D\u7EF4\u94FE\uFF0C\u4E0D\u66F4\u65B0\u6B63\u6587"}),f({content:"",status:N,respTime:I,filePaths:z,reference:R||M||"",webReference:D||"",knowledgeBases:w||"",graphReference:q,databaseReference:$,llmType:V,resultType:S,queryId:A.queryId,tokens:A.tokens,chain:ce,thoughtChainNodes:ze.length>0?[...ze]:void 0,enableCot:pr,chainRespTime:xr,faqReference:T})}else if(N===1){ze.length>0&&(ze=ze.map(oe=>({...oe,nodeStatus:2}))),console.log("[AichatUseController] status=1 \u66F4\u65B0\u6B63\u6587:",{businessType:L,content:(ne=B==null?void 0:B.content)==null?void 0:ne.substring(0,50),thoughtNodesCount:ze.length,note:"status=1 \u65F6\uFF0Creply.content \u5E94\u8BE5\u53BB\u6B63\u6587\uFF0C\u601D\u7EF4\u94FE\u8282\u70B9\u72B6\u6001\u66F4\u65B0\u4E3A\u5B8C\u6210"});const ce=ze.length>0?ze.map(oe=>({businessType:oe.businessType,nodeStatus:oe.nodeStatus,content:oe.content})):void 0;f({content:B.content||"",status:N,respTime:I,filePaths:z,reference:R||M||"",webReference:D||"",graphReference:q,knowledgeBases:w||"",databaseReference:$??null,llmType:V,resultType:S,queryId:A.queryId,tokens:A.tokens,chain:ce??void 0,thoughtChainNodes:ze.length>0?[...ze]:void 0,enableCot:pr,chainRespTime:xr,faqReference:T})}else if(N===2){ze.length>0&&(ze=ze.map(oe=>({...oe,nodeStatus:2})));const ce=ze.length>0?ze.map(oe=>({businessType:oe.businessType,nodeStatus:oe.nodeStatus,content:oe.content})):void 0;if(f({content:B.content||"",status:2,respTime:I,filePaths:z,reference:R||M||"",webReference:D||"",knowledgeBases:w||"",graphReference:q,databaseReference:$,llmType:V,resultType:S,queryId:A.queryId,tokens:A.tokens,chain:ce,thoughtChainNodes:ze.length>0?[...ze]:void 0,enableCot:pr,chainRespTime:xr,faqReference:T}),ze=[],a(oe=>({...oe,display:"ready",sender:"ready"})),g){const oe=I||Date.now();console.log("[AichatUseController] \u6D88\u606F\u53D1\u9001\u6210\u529F\uFF0CgmtModified:",oe),g(oe)}}else if(N===3)f({content:(B==null?void 0:B.content)||"",status:3,respTime:I||Date.now(),filePaths:z,reference:R||M||"",webReference:D||"",knowledgeBases:w||"",graphReference:q,databaseReference:$,llmType:V,resultType:S,queryId:A.queryId,tokens:A.tokens,chain:void 0,thoughtChainNodes:ze.length>0?[...ze]:void 0,enableCot:pr,chainRespTime:xr,faqReference:T}),Bt&&(Bt.abort(),Bt=null),Mt=null,It=null,ze=[],a(ce=>({...ce,display:"error",sender:"ready"}));else{const ce=ze.length>0?ze.map(oe=>({businessType:oe.businessType,nodeStatus:oe.nodeStatus,content:oe.content,respTime:oe.respTime,chainRespTime:oe.respTime})):void 0;f({content:B.content||"",status:N,respTime:I,filePaths:z,reference:R||M||"",knowledgeBases:w||"",webReference:D||"",graphReference:q,databaseReference:$,llmType:V,resultType:S,queryId:A.queryId,tokens:A.tokens,chain:ce,thoughtChainNodes:ze.length>0?[...ze]:void 0,enableCot:pr,chainRespTime:xr})}},onerror:u,onclose:()=>{Mt===c.sessionId&&(Mt=null,It=null)}})},addEmptyMessage:({queryId:c,content:g,filePaths:p,currentFiles:v})=>{t(C=>{const A=new Date().toISOString(),B=c||er(32),S={istype:"user",content:g,time:A,queryId:B,clientSideId:B+"-user",filePaths:p||"",currentFiles:v||[]},I={istype:"ai",content:"",time:new Date(Date.now()+1).toISOString(),streaming:!0,status:0,queryId:B,clientSideId:B+"-ai"},R=C.find(D=>D.id===i);return R?R.messages.push(S,I):console.warn("addEmptyMessage called without an active session."),[...C]})},setLastEmptyMessage:({now:c})=>{t(g=>{if(!g[0])return g;const p=g[0],v=p.messages||[];if(!v.length)return g;const C=v.length-1;if(C<0)return g;const A=v[C];if(A.istype!=="ai")return g;const B=v.slice();return B[C]={...A,istype:"ai",content:"",time:c,streaming:!0,status:0},[{...p,messages:B},...g.slice(1)]})},stopStream:async()=>{if(It)try{await Ct.delete(`${n}/qa/ai/abortStream?queryId=${It}`,{headers:{Authorization:r||"","X-CSRF-TOKEN-IN":e||""}}),console.log("[AichatUseController] \u5DF2\u8C03\u7528\u540E\u7AEF\u63A5\u53E3\u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42",It)}catch(c){console.error("[AichatUseController] \u8C03\u7528\u505C\u6B62\u63A5\u53E3\u5931\u8D25",c)}else console.warn("[AichatUseController] \u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42\u65F6\u672A\u627E\u5230 queryId");Bt=null,Mt=null,It=null,a(c=>({...c,display:"ready",sender:"ready"}))},cancelStreamBySessionId:async c=>{if(Bt&&Mt===c){if(console.log("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\uFF0C\u53D6\u6D88\u6B63\u5728\u8FDB\u884C\u7684\u6D41\u5F0F\u8BF7\u6C42",c),It)try{await Ct.delete(`${n}/qa/ai/abortStream?queryId=${It}`,{headers:{Authorization:r||"","X-CSRF-TOKEN-IN":e||""}}),console.log("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u5DF2\u8C03\u7528\u540E\u7AEF\u63A5\u53E3\u505C\u6B62\u6D41\u5F0F\u8BF7\u6C42",It)}catch(g){console.error("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u8C03\u7528\u505C\u6B62\u63A5\u53E3\u5931\u8D25",g)}else console.warn("[AichatUseController] \u5207\u6362\u4F1A\u8BDD\u65F6\u672A\u627E\u5230 queryId");return Bt=null,Mt=null,It=null,a(g=>({...g,display:"ready",sender:"ready"})),!0}return!1}}},Iu=1e3,Ru=3e3;function Nu({url:n,token:r,CSRFToken:e,onError:t,activeSessionId:i}){const[a,s]=J([]),[l,f]=J(()=>({uploadedFiles:[]})),u=Qe(!1),o=async d=>{var c,g;if(!d)return null;try{const p=await Ct.get(`${n}/index/knowledgeBase/file/getFilesBysessionId?sessionId=${d}`,{headers:{Authorization:r}});console.log("[DEBUG] \u83B7\u53D6\u4E34\u65F6\u6587\u4EF6\u5217\u8868 res:",(c=p==null?void 0:p.data)==null?void 0:c.data),f({uploadedFiles:((g=p==null?void 0:p.data)==null?void 0:g.data)||[]})}catch(p){throw console.error("\u83B7\u53D6\u4E34\u65F6\u6587\u4EF6\u5217\u8868\u5931\u8D25:",p),p}},m=Mr((d,c)=>{const g=d.join(",");let p=0,v=null;v=()=>{u.current=!0};const C=async()=>{if(!u.current){if(p>=Iu){u.current||c.onFail("\u6587\u4EF6\u89E3\u6790\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}p++;try{const A=await Ct.get(`${n}/index/knowledgeBase/file/getFileStatusByUids?uids=${g}`,{headers:{Authorization:r}});if(u.current)return;if(A.data.success){const B=A.data.data;u.current||c.onStatusUpdate(B),B.every(I=>{const R=I.fileParseStatus??I.status;return R===3||R===4})?u.current||c.onComplete():u.current||setTimeout(C,Ru)}else u.current||c.onFail(A.data.errorMsg||"\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u5931\u8D25")}catch(A){if(t==null||t(A),u.current)return;c.onFail("\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u65F6\u53D1\u751F\u7F51\u7EDC\u9519\u8BEF")}}};return C(),v},[n,r,t]),x=Mr(async(d,c)=>{if(!d){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6");return}Js({url:n,token:r,CSRFToken:e},{uid:d,queryId:c},(g,p)=>{g?(Oe.success("\u6587\u4EF6\u5DF2\u4ECE\u4E34\u65F6\u77E5\u8BC6\u5E93\u79FB\u9664"),o(i)):(console.log("[DEBUG] removeFilefromTempUpload \u56DE\u8C03 false\uFF0Cres:",p),Oe.error("\u6587\u4EF6\u79FB\u9664\u5931\u8D25"))})},[n,r,e,i]),y=Mr(()=>{u.current=!1},[]),h=Mr(()=>{u.current=!0},[]);return{fileManagerData:l,fileStatuses:a,setFileManagerData:f,setFileStatuses:s,pollFileStatus:m,handleRemoveFromTemp:x,resetStopFlag:y,setStopFlag:h,stoppedRef:u,getTempFileList:o}}function Pu({title:n,subtitle:r}){const[e,t]=J(0);return Le(()=>{let i;return e<98?i=setTimeout(()=>{t(a=>a+Math.random()*6+1)},80):e<100&&(i=setTimeout(()=>t(100),400)),()=>clearTimeout(i)},[e]),X("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[X("div",{className:"mb-8 flex flex-col items-center",children:[k("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:n||"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),k("div",{className:"mt-2 text-sm text-[#555555]",children:r||"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),X("div",{className:"relative w-80 max-w-sm",children:[k("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:k("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(e,100)}%`}})}),X("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(e),100),"%"]})]}),X("div",{className:"mt-8 flex flex-col items-center gap-2",children:[k("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),k("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const rs=document.createElement("style");rs.textContent=`
|
|
171
|
+
.animate-bounce-slow {
|
|
172
|
+
animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
173
|
+
}
|
|
174
|
+
@keyframes bounce {
|
|
175
|
+
0%, 100% { transform: translateY(0); }
|
|
176
|
+
50% { transform: translateY(-12px); }
|
|
177
|
+
}
|
|
178
|
+
`;document.head.appendChild(rs);function Tu(){return X("div",{className:"flex flex-col gap-8 p-4 w-full mx-auto",children:[X("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(an,{active:!0,paragraph:{rows:1}})})]}),X("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(an,{active:!0,paragraph:{rows:3}})})]}),X("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(an,{active:!0,paragraph:{rows:1}})})]}),X("div",{className:"flex items-start gap-4",children:[k("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),k("div",{className:"flex-1",children:k(an,{active:!0,paragraph:{rows:2}})})]})]})}function qu({msg:n,subMsg:r}){return X("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-white/80 backdrop-blur-sm",children:[k("div",{className:"mb-6 animate-bounce",children:k(No,{size:64,className:"text-[#d70016]"})}),k("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:n||"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25"}),k("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:r||"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),k(vr,{type:"primary",icon:k(za,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function zu(){return X("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-transparent! backdrop-blur-sm",children:[k("div",{className:"mb-6 animate-bounce",children:k(eo,{size:64,className:"text-[#d70016]"})}),k("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:"\u62B1\u6B49\uFF0C\u9047\u5230\u4E86\u4E00\u4E9B\u95EE\u9898"}),k("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}),k(vr,{type:"primary",icon:k(za,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function _i(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[];return Ze.Children.forEach(n,function(t){t==null&&!r.keepEmpty||(Array.isArray(t)?e=e.concat(_i(t)):Gs(t)&&t.props?e=e.concat(_i(t.props.children,r)):e.push(t))}),e}var gr="RC_FORM_INTERNAL_HOOKS",Ue=function(){tr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Pr=le.createContext({getFieldValue:Ue,getFieldsValue:Ue,getFieldError:Ue,getFieldWarning:Ue,getFieldsError:Ue,isFieldsTouched:Ue,isFieldTouched:Ue,isFieldValidating:Ue,isFieldsValidating:Ue,resetFields:Ue,setFields:Ue,setFieldValue:Ue,setFieldsValue:Ue,validateFields:Ue,submit:Ue,getInternalHooks:function(){return Ue(),{dispatch:Ue,initEntityValue:Ue,registerField:Ue,useSubscribe:Ue,setInitialValues:Ue,destroyForm:Ue,setCallbacks:Ue,registerWatch:Ue,getFields:Ue,setValidateMessages:Ue,setPreserve:Ue,getInitialValue:Ue}}}),Jn=le.createContext(null);function Si(n){return n==null?[]:Array.isArray(n)?n:[n]}function Ou(n){return n&&!!n._init}function ki(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var r=JSON.parse(JSON.stringify(this));return r.clone=this.clone,r}}}var Ii=ki();function Mu(n){try{return Function.toString.call(n).indexOf("[native code]")!==-1}catch{return typeof n=="function"}}function Lu(n,r,e){if(Ws())return Reflect.construct.apply(null,arguments);var t=[null];t.push.apply(t,r);var i=new(n.bind.apply(n,t));return e&&$i(i,e.prototype),i}function Ri(n){var r=typeof Map=="function"?new Map:void 0;return Ri=function(t){if(t===null||!Mu(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(t))return r.get(t);r.set(t,i)}function i(){return Lu(t,arguments,js(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$i(i,t)},Ri(n)}var $u=/%[sdj%]/g,Vu=function(){};function Ni(n){if(!n||!n.length)return null;var r={};return n.forEach(function(e){var t=e.field;r[t]=r[t]||[],r[t].push(e)}),r}function Dt(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];var i=0,a=e.length;if(typeof n=="function")return n.apply(null,e);if(typeof n=="string"){var s=n.replace($u,function(l){if(l==="%%")return"%";if(i>=a)return l;switch(l){case"%s":return String(e[i++]);case"%d":return Number(e[i++]);case"%j":try{return JSON.stringify(e[i++])}catch{return"[Circular]"}break;default:return l}});return s}return n}function Uu(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function ut(n,r){return!!(n==null||r==="array"&&Array.isArray(n)&&!n.length||Uu(r)&&typeof n=="string"&&!n)}function Hu(n,r,e){var t=[],i=0,a=n.length;function s(l){t.push.apply(t,Ae(l||[])),i++,i===a&&e(t)}n.forEach(function(l){r(l,s)})}function F0(n,r,e){var t=0,i=n.length;function a(s){if(s&&s.length){e(s);return}var l=t;t=t+1,l<i?r(n[l],a):e([])}a([])}function Wu(n){var r=[];return Object.keys(n).forEach(function(e){r.push.apply(r,Ae(n[e]||[]))}),r}var C0=(function(n){_a(e,n);var r=ka(e);function e(t,i){var a;return Wr(this,e),a=r.call(this,"Async Validation Error"),j(ke(a),"errors",void 0),j(ke(a),"fields",void 0),a.errors=t,a.fields=i,a}return jr(e)})(Ri(Error));function ju(n,r,e,t,i){if(r.first){var a=new Promise(function(x,y){var h=function(g){return t(g),g.length?y(new C0(g,Ni(g))):x(i)},d=Wu(n);F0(d,e,h)});return a.catch(function(x){return x}),a}var s=r.firstFields===!0?Object.keys(n):r.firstFields||[],l=Object.keys(n),f=l.length,u=0,o=[],m=new Promise(function(x,y){var h=function(c){if(o.push.apply(o,c),u++,u===f)return t(o),o.length?y(new C0(o,Ni(o))):x(i)};l.length||(t(o),x(i)),l.forEach(function(d){var c=n[d];s.indexOf(d)!==-1?F0(c,e,h):Hu(c,e,h)})});return m.catch(function(x){return x}),m}function Ku(n){return!!(n&&n.message!==void 0)}function Gu(n,r){for(var e=n,t=0;t<r.length;t++){if(e==null)return e;e=e[r[t]]}return e}function E0(n,r){return function(e){var t;return n.fullFields?t=Gu(r,n.fullFields):t=r[e.field||n.fullField],Ku(e)?(e.field=e.field||n.fullField,e.fieldValue=t,e):{message:typeof e=="function"?e():e,fieldValue:t,field:e.field||n.fullField}}}function b0(n,r){if(r){for(var e in r)if(r.hasOwnProperty(e)){var t=r[e];Et(t)==="object"&&Et(n[e])==="object"?n[e]=Fe(Fe({},n[e]),t):n[e]=t}}return n}var Dr="enum",Yu=function(r,e,t,i,a){r[Dr]=Array.isArray(r[Dr])?r[Dr]:[],r[Dr].indexOf(e)===-1&&i.push(Dt(a.messages[Dr],r.fullField,r[Dr].join(", ")))},Xu=function(r,e,t,i,a){if(r.pattern){if(r.pattern instanceof RegExp)r.pattern.lastIndex=0,r.pattern.test(e)||i.push(Dt(a.messages.pattern.mismatch,r.fullField,e,r.pattern));else if(typeof r.pattern=="string"){var s=new RegExp(r.pattern);s.test(e)||i.push(Dt(a.messages.pattern.mismatch,r.fullField,e,r.pattern))}}},Qu=function(r,e,t,i,a){var s=typeof r.len=="number",l=typeof r.min=="number",f=typeof r.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o=e,m=null,x=typeof e=="number",y=typeof e=="string",h=Array.isArray(e);if(x?m="number":y?m="string":h&&(m="array"),!m)return!1;h&&(o=e.length),y&&(o=e.replace(u,"_").length),s?o!==r.len&&i.push(Dt(a.messages[m].len,r.fullField,r.len)):l&&!f&&o<r.min?i.push(Dt(a.messages[m].min,r.fullField,r.min)):f&&!l&&o>r.max?i.push(Dt(a.messages[m].max,r.fullField,r.max)):l&&f&&(o<r.min||o>r.max)&&i.push(Dt(a.messages[m].range,r.fullField,r.min,r.max))},ns=function(r,e,t,i,a,s){r.required&&(!t.hasOwnProperty(r.field)||ut(e,s||r.type))&&i.push(Dt(a.messages.required,r.fullField))},on;const Zu=(function(){if(on)return on;var n="[a-fA-F\\d:]",r=function(B){return B&&B.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(n,")|(?<=").concat(n,")(?=\\s|$))"):""},e="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",t="[a-fA-F\\d]{1,4}",i=["(?:".concat(t,":){7}(?:").concat(t,"|:)"),"(?:".concat(t,":){6}(?:").concat(e,"|:").concat(t,"|:)"),"(?:".concat(t,":){5}(?::").concat(e,"|(?::").concat(t,"){1,2}|:)"),"(?:".concat(t,":){4}(?:(?::").concat(t,"){0,1}:").concat(e,"|(?::").concat(t,"){1,3}|:)"),"(?:".concat(t,":){3}(?:(?::").concat(t,"){0,2}:").concat(e,"|(?::").concat(t,"){1,4}|:)"),"(?:".concat(t,":){2}(?:(?::").concat(t,"){0,3}:").concat(e,"|(?::").concat(t,"){1,5}|:)"),"(?:".concat(t,":){1}(?:(?::").concat(t,"){0,4}:").concat(e,"|(?::").concat(t,"){1,6}|:)"),"(?::(?:(?::".concat(t,"){0,5}:").concat(e,"|(?::").concat(t,"){1,7}|:))")],a="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(i.join("|"),")").concat(a),l=new RegExp("(?:^".concat(e,"$)|(?:^").concat(s,"$)")),f=new RegExp("^".concat(e,"$")),u=new RegExp("^".concat(s,"$")),o=function(B){return B&&B.exact?l:new RegExp("(?:".concat(r(B)).concat(e).concat(r(B),")|(?:").concat(r(B)).concat(s).concat(r(B),")"),"g")};o.v4=function(A){return A&&A.exact?f:new RegExp("".concat(r(A)).concat(e).concat(r(A)),"g")},o.v6=function(A){return A&&A.exact?u:new RegExp("".concat(r(A)).concat(s).concat(r(A)),"g")};var m="(?:(?:[a-z]+:)?//)",x="(?:\\S+(?::\\S*)?@)?",y=o.v4().source,h=o.v6().source,d="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",c="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",p="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',C="(?:".concat(m,"|www\\.)").concat(x,"(?:localhost|").concat(y,"|").concat(h,"|").concat(d).concat(c).concat(g,")").concat(p).concat(v);return on=new RegExp("(?:^".concat(C,"$)"),"i"),on});var A0={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},$r={integer:function(r){return $r.number(r)&&parseInt(r,10)===r},float:function(r){return $r.number(r)&&!$r.integer(r)},array:function(r){return Array.isArray(r)},regexp:function(r){if(r instanceof RegExp)return!0;try{return!!new RegExp(r)}catch{return!1}},date:function(r){return typeof r.getTime=="function"&&typeof r.getMonth=="function"&&typeof r.getYear=="function"&&!isNaN(r.getTime())},number:function(r){return isNaN(r)?!1:typeof r=="number"},object:function(r){return Et(r)==="object"&&!$r.array(r)},method:function(r){return typeof r=="function"},email:function(r){return typeof r=="string"&&r.length<=320&&!!r.match(A0.email)},url:function(r){return typeof r=="string"&&r.length<=2048&&!!r.match(Zu())},hex:function(r){return typeof r=="string"&&!!r.match(A0.hex)}},Ju=function(r,e,t,i,a){if(r.required&&e===void 0){ns(r,e,t,i,a);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=r.type;s.indexOf(l)>-1?$r[l](e)||i.push(Dt(a.messages.types[l],r.fullField,r.type)):l&&Et(e)!==r.type&&i.push(Dt(a.messages.types[l],r.fullField,r.type))},el=function(r,e,t,i,a){(/^\s+$/.test(e)||e==="")&&i.push(Dt(a.messages.whitespace,r.fullField))};const Be={required:ns,whitespace:el,type:Ju,range:Qu,enum:Yu,pattern:Xu};var tl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a)}t(s)},rl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(e==null&&!r.required)return t();Be.required(r,e,i,s,a,"array"),e!=null&&(Be.type(r,e,i,s,a),Be.range(r,e,i,s,a))}t(s)},nl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&Be.type(r,e,i,s,a)}t(s)},il=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e,"date")&&!r.required)return t();if(Be.required(r,e,i,s,a),!ut(e,"date")){var f;e instanceof Date?f=e:f=new Date(e),Be.type(r,f,i,s,a),f&&Be.range(r,f.getTime(),i,s,a)}}t(s)},al="enum",sl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&Be[al](r,e,i,s,a)}t(s)},ol=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&(Be.type(r,e,i,s,a),Be.range(r,e,i,s,a))}t(s)},ul=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&(Be.type(r,e,i,s,a),Be.range(r,e,i,s,a))}t(s)},ll=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&Be.type(r,e,i,s,a)}t(s)},cl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(e===""&&(e=void 0),ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&(Be.type(r,e,i,s,a),Be.range(r,e,i,s,a))}t(s)},dl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),e!==void 0&&Be.type(r,e,i,s,a)}t(s)},fl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e,"string")&&!r.required)return t();Be.required(r,e,i,s,a),ut(e,"string")||Be.pattern(r,e,i,s,a)}t(s)},pl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e)&&!r.required)return t();Be.required(r,e,i,s,a),ut(e)||Be.type(r,e,i,s,a)}t(s)},xl=function(r,e,t,i,a){var s=[],l=Array.isArray(e)?"array":Et(e);Be.required(r,e,i,s,a,l),t(s)},hl=function(r,e,t,i,a){var s=[],l=r.required||!r.required&&i.hasOwnProperty(r.field);if(l){if(ut(e,"string")&&!r.required)return t();Be.required(r,e,i,s,a,"string"),ut(e,"string")||(Be.type(r,e,i,s,a),Be.range(r,e,i,s,a),Be.pattern(r,e,i,s,a),r.whitespace===!0&&Be.whitespace(r,e,i,s,a))}t(s)},mi=function(r,e,t,i,a){var s=r.type,l=[],f=r.required||!r.required&&i.hasOwnProperty(r.field);if(f){if(ut(e,s)&&!r.required)return t();Be.required(r,e,i,l,a,s),ut(e,s)||Be.type(r,e,i,l,a)}t(l)};const Ur={string:hl,method:ll,number:cl,boolean:nl,regexp:pl,integer:ul,float:ol,array:rl,object:dl,enum:sl,pattern:fl,date:il,url:mi,hex:mi,email:mi,required:xl,any:tl};var Gr=(function(){function n(r){Wr(this,n),j(this,"rules",null),j(this,"_messages",Ii),this.define(r)}return jr(n,[{key:"define",value:function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if(Et(e)!=="object"||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach(function(i){var a=e[i];t.rules[i]=Array.isArray(a)?a:[a]})}},{key:"messages",value:function(e){return e&&(this._messages=b0(ki(),e)),this._messages}},{key:"validate",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=e,l=i,f=a;if(typeof l=="function"&&(f=l,l={}),!this.rules||Object.keys(this.rules).length===0)return f&&f(null,s),Promise.resolve(s);function u(h){var d=[],c={};function g(v){if(Array.isArray(v)){var C;d=(C=d).concat.apply(C,Ae(v))}else d.push(v)}for(var p=0;p<h.length;p++)g(h[p]);d.length?(c=Ni(d),f(d,c)):f(null,s)}if(l.messages){var o=this.messages();o===Ii&&(o=ki()),b0(o,l.messages),l.messages=o}else l.messages=this.messages();var m={},x=l.keys||Object.keys(this.rules);x.forEach(function(h){var d=t.rules[h],c=s[h];d.forEach(function(g){var p=g;typeof p.transform=="function"&&(s===e&&(s=Fe({},s)),c=s[h]=p.transform(c),c!=null&&(p.type=p.type||(Array.isArray(c)?"array":Et(c)))),typeof p=="function"?p={validator:p}:p=Fe({},p),p.validator=t.getValidationMethod(p),p.validator&&(p.field=h,p.fullField=p.fullField||h,p.type=t.getType(p),m[h]=m[h]||[],m[h].push({rule:p,value:c,source:s,field:h}))})});var y={};return ju(m,l,function(h,d){var c=h.rule,g=(c.type==="object"||c.type==="array")&&(Et(c.fields)==="object"||Et(c.defaultField)==="object");g=g&&(c.required||!c.required&&h.value),c.field=h.field;function p(S,I){return Fe(Fe({},I),{},{fullField:"".concat(c.fullField,".").concat(S),fullFields:c.fullFields?[].concat(Ae(c.fullFields),[S]):[S]})}function v(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],I=Array.isArray(S)?S:[S];!l.suppressWarning&&I.length&&n.warning("async-validator:",I),I.length&&c.message!==void 0&&(I=[].concat(c.message));var R=I.map(E0(c,s));if(l.first&&R.length)return y[c.field]=1,d(R);if(!g)d(R);else{if(c.required&&!h.value)return c.message!==void 0?R=[].concat(c.message).map(E0(c,s)):l.error&&(R=[l.error(c,Dt(l.messages.required,c.field))]),d(R);var D={};c.defaultField&&Object.keys(h.value).map(function(F){D[F]=c.defaultField}),D=Fe(Fe({},D),h.rule.fields);var b={};Object.keys(D).forEach(function(F){var N=D[F],M=Array.isArray(N)?N:[N];b[F]=M.map(p.bind(null,F))});var w=new n(b);w.messages(l.messages),h.rule.options&&(h.rule.options.messages=l.messages,h.rule.options.error=l.error),w.validate(h.value,h.rule.options||l,function(F){var N=[];R&&R.length&&N.push.apply(N,Ae(R)),F&&F.length&&N.push.apply(N,Ae(F)),d(N.length?N:null)})}}var C;if(c.asyncValidator)C=c.asyncValidator(c,h.value,v,h.source,l);else if(c.validator){try{C=c.validator(c,h.value,v,h.source,l)}catch(S){var A,B;(A=(B=console).error)===null||A===void 0||A.call(B,S),l.suppressValidatorError||setTimeout(function(){throw S},0),v(S.message)}C===!0?v():C===!1?v(typeof c.message=="function"?c.message(c.fullField||c.field):c.message||"".concat(c.fullField||c.field," fails")):C instanceof Array?v(C):C instanceof Error&&v(C.message)}C&&C.then&&C.then(function(){return v()},function(S){return v(S)})},function(h){u(h)},s)}},{key:"getType",value:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type="pattern"),typeof e.validator!="function"&&e.type&&!Ur.hasOwnProperty(e.type))throw new Error(Dt("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if(typeof e.validator=="function")return e.validator;var t=Object.keys(e),i=t.indexOf("message");return i!==-1&&t.splice(i,1),t.length===1&&t[0]==="required"?Ur.required:Ur[this.getType(e)]||void 0}}]),n})();j(Gr,"register",function(r,e){if(typeof e!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ur[r]=e});j(Gr,"warning",Vu);j(Gr,"messages",Ii);j(Gr,"validators",Ur);var wt="'${name}' is not a valid ${type}",is={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:wt,method:wt,array:wt,object:wt,number:wt,date:wt,boolean:wt,integer:wt,float:wt,regexp:wt,email:wt,url:wt,hex:wt},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},B0=Gr;function gl(n,r){return n.replace(/\\?\$\{\w+\}/g,function(e){if(e.startsWith("\\"))return e.slice(1);var t=e.slice(2,-1);return r[t]})}var w0="CODE_LOGIC_ERROR";function Pi(n,r,e,t,i){return Ti.apply(this,arguments)}function Ti(){return Ti=Kr(Lt().mark(function n(r,e,t,i,a){var s,l,f,u,o,m,x,y,h;return Lt().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return s=Fe({},t),delete s.ruleIndex,B0.warning=function(){},s.validator&&(l=s.validator,s.validator=function(){try{return l.apply(void 0,arguments)}catch(g){return console.error(g),Promise.reject(w0)}}),f=null,s&&s.type==="array"&&s.defaultField&&(f=s.defaultField,delete s.defaultField),u=new B0(j({},r,[s])),o=Lr(is,i.validateMessages),u.messages(o),m=[],c.prev=10,c.next=13,Promise.resolve(u.validate(j({},r,e),Fe({},i)));case 13:c.next=18;break;case 15:c.prev=15,c.t0=c.catch(10),c.t0.errors&&(m=c.t0.errors.map(function(g,p){var v=g.message,C=v===w0?o.default:v;return le.isValidElement(C)?le.cloneElement(C,{key:"error_".concat(p)}):C}));case 18:if(!(!m.length&&f&&Array.isArray(e)&&e.length>0)){c.next=23;break}return c.next=21,Promise.all(e.map(function(g,p){return Pi("".concat(r,".").concat(p),g,f,i,a)}));case 21:return x=c.sent,c.abrupt("return",x.reduce(function(g,p){return[].concat(Ae(g),Ae(p))},[]));case 23:return y=Fe(Fe({},t),{},{name:r,enum:(t.enum||[]).join(", ")},a),h=m.map(function(g){return typeof g=="string"?gl(g,y):g}),c.abrupt("return",h);case 26:case"end":return c.stop()}},n,null,[[10,15]])})),Ti.apply(this,arguments)}function vl(n,r,e,t,i,a){var s=n.join("."),l=e.map(function(o,m){var x=o.validator,y=Fe(Fe({},o),{},{ruleIndex:m});return x&&(y.validator=function(h,d,c){var g=!1,p=function(){for(var A=arguments.length,B=new Array(A),S=0;S<A;S++)B[S]=arguments[S];Promise.resolve().then(function(){tr(!g,"Your validator function has already return a promise. `callback` will be ignored."),g||c.apply(void 0,B)})},v=x(h,d,p);g=v&&typeof v.then=="function"&&typeof v.catch=="function",tr(g,"`callback` is deprecated. Please return a promise instead."),g&&v.then(function(){c()}).catch(function(C){c(C||" ")})}),y}).sort(function(o,m){var x=o.warningOnly,y=o.ruleIndex,h=m.warningOnly,d=m.ruleIndex;return!!x==!!h?y-d:x?1:-1}),f;if(i===!0)f=new Promise((function(){var o=Kr(Lt().mark(function m(x,y){var h,d,c;return Lt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:h=0;case 1:if(!(h<l.length)){p.next=12;break}return d=l[h],p.next=5,Pi(s,r,d,t,a);case 5:if(c=p.sent,!c.length){p.next=9;break}return y([{errors:c,rule:d}]),p.abrupt("return");case 9:h+=1,p.next=1;break;case 12:x([]);case 13:case"end":return p.stop()}},m)}));return function(m,x){return o.apply(this,arguments)}})());else{var u=l.map(function(o){return Pi(s,r,o,t,a).then(function(m){return{errors:m,rule:o}})});f=(i?yl(u):ml(u)).then(function(o){return Promise.reject(o)})}return f.catch(function(o){return o}),f}function ml(n){return qi.apply(this,arguments)}function qi(){return qi=Kr(Lt().mark(function n(r){return Lt().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(r).then(function(i){var a,s=(a=[]).concat.apply(a,Ae(i));return s}));case 1:case"end":return t.stop()}},n)})),qi.apply(this,arguments)}function yl(n){return zi.apply(this,arguments)}function zi(){return zi=Kr(Lt().mark(function n(r){var e;return Lt().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=0,i.abrupt("return",new Promise(function(a){r.forEach(function(s){s.then(function(l){l.errors.length&&a([l]),e+=1,e===r.length&&a([])})})}));case 2:case"end":return i.stop()}},n)})),zi.apply(this,arguments)}function st(n){return Si(n)}function D0(n,r){var e={};return r.forEach(function(t){var i=hr(n,t);e=Qt(e,t,i)}),e}function Rr(n,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return n&&n.some(function(t){return as(r,t,e)})}function as(n,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!n||!r||!e&&n.length!==r.length?!1:r.every(function(t,i){return n[i]===t})}function Fl(n,r){if(n===r)return!0;if(!n&&r||n&&!r||!n||!r||Et(n)!=="object"||Et(r)!=="object")return!1;var e=Object.keys(n),t=Object.keys(r),i=new Set([].concat(e,t));return Ae(i).every(function(a){var s=n[a],l=r[a];return typeof s=="function"&&typeof l=="function"?!0:s===l})}function Cl(n){var r=arguments.length<=1?void 0:arguments[1];return r&&r.target&&Et(r.target)==="object"&&n in r.target?r.target[n]:r}function _0(n,r,e){var t=n.length;if(r<0||r>=t||e<0||e>=t)return n;var i=n[r],a=r-e;return a>0?[].concat(Ae(n.slice(0,e)),[i],Ae(n.slice(e,r)),Ae(n.slice(r+1,t))):a<0?[].concat(Ae(n.slice(0,r)),Ae(n.slice(r+1,e+1)),[i],Ae(n.slice(e+1,t))):n}var El=["name"],Rt=[];function yi(n,r,e,t,i,a){return typeof n=="function"?n(r,e,"source"in a?{source:a.source}:{}):t!==i}var Ki=(function(n){_a(e,n);var r=ka(e);function e(t){var i;if(Wr(this,e),i=r.call(this,t),j(ke(i),"state",{resetCount:0}),j(ke(i),"cancelRegisterFunc",null),j(ke(i),"mounted",!1),j(ke(i),"touched",!1),j(ke(i),"dirty",!1),j(ke(i),"validatePromise",void 0),j(ke(i),"prevValidating",void 0),j(ke(i),"errors",Rt),j(ke(i),"warnings",Rt),j(ke(i),"cancelRegister",function(){var f=i.props,u=f.preserve,o=f.isListField,m=f.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(o,u,st(m)),i.cancelRegisterFunc=null}),j(ke(i),"getNamePath",function(){var f=i.props,u=f.name,o=f.fieldContext,m=o.prefixName,x=m===void 0?[]:m;return u!==void 0?[].concat(Ae(x),Ae(u)):[]}),j(ke(i),"getRules",function(){var f=i.props,u=f.rules,o=u===void 0?[]:u,m=f.fieldContext;return o.map(function(x){return typeof x=="function"?x(m):x})}),j(ke(i),"refresh",function(){i.mounted&&i.setState(function(f){var u=f.resetCount;return{resetCount:u+1}})}),j(ke(i),"metaCache",null),j(ke(i),"triggerMetaEvent",function(f){var u=i.props.onMetaChange;if(u){var o=Fe(Fe({},i.getMeta()),{},{destroy:f});a0(i.metaCache,o)||u(o),i.metaCache=o}else i.metaCache=null}),j(ke(i),"onStoreChange",function(f,u,o){var m=i.props,x=m.shouldUpdate,y=m.dependencies,h=y===void 0?[]:y,d=m.onReset,c=o.store,g=i.getNamePath(),p=i.getValue(f),v=i.getValue(c),C=u&&Rr(u,g);switch(o.type==="valueUpdate"&&o.source==="external"&&!a0(p,v)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Rt,i.warnings=Rt,i.triggerMetaEvent()),o.type){case"reset":if(!u||C){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Rt,i.warnings=Rt,i.triggerMetaEvent(),d==null||d(),i.refresh();return}break;case"remove":{if(x&&yi(x,f,c,p,v,o)){i.reRender();return}break}case"setField":{var A=o.data;if(C){"touched"in A&&(i.touched=A.touched),"validating"in A&&!("originRCField"in A)&&(i.validatePromise=A.validating?Promise.resolve([]):null),"errors"in A&&(i.errors=A.errors||Rt),"warnings"in A&&(i.warnings=A.warnings||Rt),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in A&&Rr(u,g,!0)){i.reRender();return}if(x&&!g.length&&yi(x,f,c,p,v,o)){i.reRender();return}break}case"dependenciesUpdate":{var B=h.map(st);if(B.some(function(S){return Rr(o.relatedFields,S)})){i.reRender();return}break}default:if(C||(!h.length||g.length||x)&&yi(x,f,c,p,v,o)){i.reRender();return}break}x===!0&&i.reRender()}),j(ke(i),"validateRules",function(f){var u=i.getNamePath(),o=i.getValue(),m=f||{},x=m.triggerName,y=m.validateOnly,h=y===void 0?!1:y,d=Promise.resolve().then(Kr(Lt().mark(function c(){var g,p,v,C,A,B,S;return Lt().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(i.mounted){R.next=2;break}return R.abrupt("return",[]);case 2:if(g=i.props,p=g.validateFirst,v=p===void 0?!1:p,C=g.messageVariables,A=g.validateDebounce,B=i.getRules(),x&&(B=B.filter(function(D){return D}).filter(function(D){var b=D.validateTrigger;if(!b)return!0;var w=Si(b);return w.includes(x)})),!(A&&x)){R.next=10;break}return R.next=8,new Promise(function(D){setTimeout(D,A)});case 8:if(i.validatePromise===d){R.next=10;break}return R.abrupt("return",[]);case 10:return S=vl(u,o,B,f,v,C),S.catch(function(D){return D}).then(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rt;if(i.validatePromise===d){var b;i.validatePromise=null;var w=[],F=[];(b=D.forEach)===null||b===void 0||b.call(D,function(N){var M=N.rule.warningOnly,V=N.errors,$=V===void 0?Rt:V;M?F.push.apply(F,Ae($)):w.push.apply(w,Ae($))}),i.errors=w,i.warnings=F,i.triggerMetaEvent(),i.reRender()}}),R.abrupt("return",S);case 13:case"end":return R.stop()}},c)})));return h||(i.validatePromise=d,i.dirty=!0,i.errors=Rt,i.warnings=Rt,i.triggerMetaEvent(),i.reRender()),d}),j(ke(i),"isFieldValidating",function(){return!!i.validatePromise}),j(ke(i),"isFieldTouched",function(){return i.touched}),j(ke(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var f=i.props.fieldContext,u=f.getInternalHooks(gr),o=u.getInitialValue;return o(i.getNamePath())!==void 0}),j(ke(i),"getErrors",function(){return i.errors}),j(ke(i),"getWarnings",function(){return i.warnings}),j(ke(i),"isListField",function(){return i.props.isListField}),j(ke(i),"isList",function(){return i.props.isList}),j(ke(i),"isPreserve",function(){return i.props.preserve}),j(ke(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var f={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return f}),j(ke(i),"getOnlyChild",function(f){if(typeof f=="function"){var u=i.getMeta();return Fe(Fe({},i.getOnlyChild(f(i.getControlled(),u,i.props.fieldContext))),{},{isFunction:!0})}var o=_i(f);return o.length!==1||!le.isValidElement(o[0])?{child:o,isFunction:!1}:{child:o[0],isFunction:!1}}),j(ke(i),"getValue",function(f){var u=i.props.fieldContext.getFieldsValue,o=i.getNamePath();return hr(f||u(!0),o)}),j(ke(i),"getControlled",function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=i.props,o=u.name,m=u.trigger,x=u.validateTrigger,y=u.getValueFromEvent,h=u.normalize,d=u.valuePropName,c=u.getValueProps,g=u.fieldContext,p=x!==void 0?x:g.validateTrigger,v=i.getNamePath(),C=g.getInternalHooks,A=g.getFieldsValue,B=C(gr),S=B.dispatch,I=i.getValue(),R=c||function(N){return j({},d,N)},D=f[m],b=o!==void 0?R(I):{},w=Fe(Fe({},f),b);w[m]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var N,M=arguments.length,V=new Array(M),$=0;$<M;$++)V[$]=arguments[$];y?N=y.apply(void 0,V):N=Cl.apply(void 0,[d].concat(V)),h&&(N=h(N,I,A(!0))),N!==I&&S({type:"updateValue",namePath:v,value:N}),D&&D.apply(void 0,V)};var F=Si(p||[]);return F.forEach(function(N){var M=w[N];w[N]=function(){M&&M.apply(void 0,arguments);var V=i.props.rules;V&&V.length&&S({type:"validateField",namePath:v,triggerName:N})}}),w}),t.fieldContext){var a=t.fieldContext.getInternalHooks,s=a(gr),l=s.initEntityValue;l(ke(i))}return i}return jr(e,[{key:"componentDidMount",value:function(){var i=this.props,a=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var l=s.getInternalHooks,f=l(gr),u=f.registerField;this.cancelRegisterFunc=u(this)}a===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,a=this.props.children,s=this.getOnlyChild(a),l=s.child,f=s.isFunction,u;return f?u=l:le.isValidElement(l)?u=le.cloneElement(l,this.getControlled(l.props)):(tr(!l,"`children` of Field is not validate ReactElement."),u=l),le.createElement(le.Fragment,{key:i},u)}}]),e})(le.Component);j(Ki,"contextType",Pr);j(Ki,"defaultProps",{trigger:"onChange",valuePropName:"value"});function ss(n){var r,e=n.name,t=Li(n,El),i=le.useContext(Pr),a=le.useContext(Jn),s=e!==void 0?st(e):void 0,l=(r=t.isListField)!==null&&r!==void 0?r:!!a,f="keep";return l||(f="_".concat((s||[]).join("_"))),le.createElement(Ki,Mi({key:f,name:s,isListField:l},t,{fieldContext:i}))}function bl(n){var r=n.name,e=n.initialValue,t=n.children,i=n.rules,a=n.validateTrigger,s=n.isListField,l=le.useContext(Pr),f=le.useContext(Jn),u=le.useRef({keys:[],id:0}),o=u.current,m=le.useMemo(function(){var d=st(l.prefixName)||[];return[].concat(Ae(d),Ae(st(r)))},[l.prefixName,r]),x=le.useMemo(function(){return Fe(Fe({},l),{},{prefixName:m})},[l,m]),y=le.useMemo(function(){return{getKey:function(c){var g=m.length,p=c[g];return[o.keys[p],c.slice(g+1)]}}},[m]);if(typeof t!="function")return tr(!1,"Form.List only accepts function as children."),null;var h=function(c,g,p){var v=p.source;return v==="internal"?!1:c!==g};return le.createElement(Jn.Provider,{value:y},le.createElement(Pr.Provider,{value:x},le.createElement(ss,{name:[],shouldUpdate:h,rules:i,validateTrigger:a,initialValue:e,isList:!0,isListField:s??!!f},function(d,c){var g=d.value,p=g===void 0?[]:g,v=d.onChange,C=l.getFieldValue,A=function(){var R=C(m||[]);return R||[]},B={add:function(R,D){var b=A();D>=0&&D<=b.length?(o.keys=[].concat(Ae(o.keys.slice(0,D)),[o.id],Ae(o.keys.slice(D))),v([].concat(Ae(b.slice(0,D)),[R],Ae(b.slice(D))))):(o.keys=[].concat(Ae(o.keys),[o.id]),v([].concat(Ae(b),[R]))),o.id+=1},remove:function(R){var D=A(),b=new Set(Array.isArray(R)?R:[R]);b.size<=0||(o.keys=o.keys.filter(function(w,F){return!b.has(F)}),v(D.filter(function(w,F){return!b.has(F)})))},move:function(R,D){if(R!==D){var b=A();R<0||R>=b.length||D<0||D>=b.length||(o.keys=_0(o.keys,R,D),v(_0(b,R,D)))}}},S=p||[];return Array.isArray(S)||(S=[]),t(S.map(function(I,R){var D=o.keys[R];return D===void 0&&(o.keys[R]=o.id,D=o.keys[R],o.id+=1),{name:R,key:D,isListField:!0}}),B,c)})))}function Al(n){var r=!1,e=n.length,t=[];return n.length?new Promise(function(i,a){n.forEach(function(s,l){s.catch(function(f){return r=!0,f}).then(function(f){e-=1,t[l]=f,!(e>0)&&(r&&a(t),i(t))})})}):Promise.resolve([])}var os="__@field_split__";function Fi(n){return n.map(function(r){return"".concat(Et(r),":").concat(r)}).join(os)}var _r=(function(){function n(){Wr(this,n),j(this,"kvs",new Map)}return jr(n,[{key:"set",value:function(e,t){this.kvs.set(Fi(e),t)}},{key:"get",value:function(e){return this.kvs.get(Fi(e))}},{key:"update",value:function(e,t){var i=this.get(e),a=t(i);a?this.set(e,a):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Fi(e))}},{key:"map",value:function(e){return Ae(this.kvs.entries()).map(function(t){var i=Hr(t,2),a=i[0],s=i[1],l=a.split(os);return e({key:l.map(function(f){var u=f.match(/^([^:]*):(.*)$/),o=Hr(u,3),m=o[1],x=o[2];return m==="number"?Number(x):x}),value:s})})}},{key:"toJSON",value:function(){var e={};return this.map(function(t){var i=t.key,a=t.value;return e[i.join(".")]=a,null}),e}}]),n})(),Bl=["name"],wl=jr(function n(r){var e=this;Wr(this,n),j(this,"formHooked",!1),j(this,"forceRootUpdate",void 0),j(this,"subscribable",!0),j(this,"store",{}),j(this,"fieldEntities",[]),j(this,"initialValues",{}),j(this,"callbacks",{}),j(this,"validateMessages",null),j(this,"preserve",null),j(this,"lastValidatePromise",null),j(this,"getForm",function(){return{getFieldValue:e.getFieldValue,getFieldsValue:e.getFieldsValue,getFieldError:e.getFieldError,getFieldWarning:e.getFieldWarning,getFieldsError:e.getFieldsError,isFieldsTouched:e.isFieldsTouched,isFieldTouched:e.isFieldTouched,isFieldValidating:e.isFieldValidating,isFieldsValidating:e.isFieldsValidating,resetFields:e.resetFields,setFields:e.setFields,setFieldValue:e.setFieldValue,setFieldsValue:e.setFieldsValue,validateFields:e.validateFields,submit:e.submit,_init:!0,getInternalHooks:e.getInternalHooks}}),j(this,"getInternalHooks",function(t){return t===gr?(e.formHooked=!0,{dispatch:e.dispatch,initEntityValue:e.initEntityValue,registerField:e.registerField,useSubscribe:e.useSubscribe,setInitialValues:e.setInitialValues,destroyForm:e.destroyForm,setCallbacks:e.setCallbacks,setValidateMessages:e.setValidateMessages,getFields:e.getFields,setPreserve:e.setPreserve,getInitialValue:e.getInitialValue,registerWatch:e.registerWatch}):(tr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),j(this,"useSubscribe",function(t){e.subscribable=t}),j(this,"prevWithoutPreserves",null),j(this,"setInitialValues",function(t,i){if(e.initialValues=t||{},i){var a,s=Lr(t,e.store);(a=e.prevWithoutPreserves)===null||a===void 0||a.map(function(l){var f=l.key;s=Qt(s,f,hr(t,f))}),e.prevWithoutPreserves=null,e.updateStore(s)}}),j(this,"destroyForm",function(t){if(t)e.updateStore({});else{var i=new _r;e.getFieldEntities(!0).forEach(function(a){e.isMergedPreserve(a.isPreserve())||i.set(a.getNamePath(),!0)}),e.prevWithoutPreserves=i}}),j(this,"getInitialValue",function(t){var i=hr(e.initialValues,t);return t.length?Lr(i):i}),j(this,"setCallbacks",function(t){e.callbacks=t}),j(this,"setValidateMessages",function(t){e.validateMessages=t}),j(this,"setPreserve",function(t){e.preserve=t}),j(this,"watchList",[]),j(this,"registerWatch",function(t){return e.watchList.push(t),function(){e.watchList=e.watchList.filter(function(i){return i!==t})}}),j(this,"notifyWatch",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(e.watchList.length){var i=e.getFieldsValue(),a=e.getFieldsValue(!0);e.watchList.forEach(function(s){s(i,a,t)})}}),j(this,"timeoutId",null),j(this,"warningUnhooked",function(){}),j(this,"updateStore",function(t){e.store=t}),j(this,"getFieldEntities",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return t?e.fieldEntities.filter(function(i){return i.getNamePath().length}):e.fieldEntities}),j(this,"getFieldsMap",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new _r;return e.getFieldEntities(t).forEach(function(a){var s=a.getNamePath();i.set(s,a)}),i}),j(this,"getFieldEntitiesForNamePathList",function(t){if(!t)return e.getFieldEntities(!0);var i=e.getFieldsMap(!0);return t.map(function(a){var s=st(a);return i.get(s)||{INVALIDATE_NAME_PATH:st(a)}})}),j(this,"getFieldsValue",function(t,i){e.warningUnhooked();var a,s,l;if(t===!0||Array.isArray(t)?(a=t,s=i):t&&Et(t)==="object"&&(l=t.strict,s=t.filter),a===!0&&!s)return e.store;var f=e.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null),u=[];return f.forEach(function(o){var m,x,y="INVALIDATE_NAME_PATH"in o?o.INVALIDATE_NAME_PATH:o.getNamePath();if(l){var h,d;if((h=(d=o).isList)!==null&&h!==void 0&&h.call(d))return}else if(!a&&(m=(x=o).isListField)!==null&&m!==void 0&&m.call(x))return;if(!s)u.push(y);else{var c="getMeta"in o?o.getMeta():null;s(c)&&u.push(y)}}),D0(e.store,u.map(st))}),j(this,"getFieldValue",function(t){e.warningUnhooked();var i=st(t);return hr(e.store,i)}),j(this,"getFieldsError",function(t){e.warningUnhooked();var i=e.getFieldEntitiesForNamePathList(t);return i.map(function(a,s){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:st(t[s]),errors:[],warnings:[]}})}),j(this,"getFieldError",function(t){e.warningUnhooked();var i=st(t),a=e.getFieldsError([i])[0];return a.errors}),j(this,"getFieldWarning",function(t){e.warningUnhooked();var i=st(t),a=e.getFieldsError([i])[0];return a.warnings}),j(this,"isFieldsTouched",function(){e.warningUnhooked();for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];var s=i[0],l=i[1],f,u=!1;i.length===0?f=null:i.length===1?Array.isArray(s)?(f=s.map(st),u=!1):(f=null,u=s):(f=s.map(st),u=l);var o=e.getFieldEntities(!0),m=function(c){return c.isFieldTouched()};if(!f)return u?o.every(function(d){return m(d)||d.isList()}):o.some(m);var x=new _r;f.forEach(function(d){x.set(d,[])}),o.forEach(function(d){var c=d.getNamePath();f.forEach(function(g){g.every(function(p,v){return c[v]===p})&&x.update(g,function(p){return[].concat(Ae(p),[d])})})});var y=function(c){return c.some(m)},h=x.map(function(d){var c=d.value;return c});return u?h.every(y):h.some(y)}),j(this,"isFieldTouched",function(t){return e.warningUnhooked(),e.isFieldsTouched([t])}),j(this,"isFieldsValidating",function(t){e.warningUnhooked();var i=e.getFieldEntities();if(!t)return i.some(function(s){return s.isFieldValidating()});var a=t.map(st);return i.some(function(s){var l=s.getNamePath();return Rr(a,l)&&s.isFieldValidating()})}),j(this,"isFieldValidating",function(t){return e.warningUnhooked(),e.isFieldsValidating([t])}),j(this,"resetWithFieldInitialValue",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new _r,a=e.getFieldEntities(!0);a.forEach(function(f){var u=f.props.initialValue,o=f.getNamePath();if(u!==void 0){var m=i.get(o)||new Set;m.add({entity:f,value:u}),i.set(o,m)}});var s=function(u){u.forEach(function(o){var m=o.props.initialValue;if(m!==void 0){var x=o.getNamePath(),y=e.getInitialValue(x);if(y!==void 0)tr(!1,"Form already set 'initialValues' with path '".concat(x.join("."),"'. Field can not overwrite it."));else{var h=i.get(x);if(h&&h.size>1)tr(!1,"Multiple Field with path '".concat(x.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var d=e.getFieldValue(x),c=o.isListField();!c&&(!t.skipExist||d===void 0)&&e.updateStore(Qt(e.store,x,Ae(h)[0].value))}}}})},l;t.entities?l=t.entities:t.namePathList?(l=[],t.namePathList.forEach(function(f){var u=i.get(f);if(u){var o;(o=l).push.apply(o,Ae(Ae(u).map(function(m){return m.entity})))}})):l=a,s(l)}),j(this,"resetFields",function(t){e.warningUnhooked();var i=e.store;if(!t){e.updateStore(Lr(e.initialValues)),e.resetWithFieldInitialValue(),e.notifyObservers(i,null,{type:"reset"}),e.notifyWatch();return}var a=t.map(st);a.forEach(function(s){var l=e.getInitialValue(s);e.updateStore(Qt(e.store,s,l))}),e.resetWithFieldInitialValue({namePathList:a}),e.notifyObservers(i,a,{type:"reset"}),e.notifyWatch(a)}),j(this,"setFields",function(t){e.warningUnhooked();var i=e.store,a=[];t.forEach(function(s){var l=s.name,f=Li(s,Bl),u=st(l);a.push(u),"value"in f&&e.updateStore(Qt(e.store,u,f.value)),e.notifyObservers(i,[u],{type:"setField",data:s})}),e.notifyWatch(a)}),j(this,"getFields",function(){var t=e.getFieldEntities(!0),i=t.map(function(a){var s=a.getNamePath(),l=a.getMeta(),f=Fe(Fe({},l),{},{name:s,value:e.getFieldValue(s)});return Object.defineProperty(f,"originRCField",{value:!0}),f});return i}),j(this,"initEntityValue",function(t){var i=t.props.initialValue;if(i!==void 0){var a=t.getNamePath(),s=hr(e.store,a);s===void 0&&e.updateStore(Qt(e.store,a,i))}}),j(this,"isMergedPreserve",function(t){var i=t!==void 0?t:e.preserve;return i??!0}),j(this,"registerField",function(t){e.fieldEntities.push(t);var i=t.getNamePath();if(e.notifyWatch([i]),t.props.initialValue!==void 0){var a=e.store;e.resetWithFieldInitialValue({entities:[t],skipExist:!0}),e.notifyObservers(a,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.fieldEntities=e.fieldEntities.filter(function(m){return m!==t}),!e.isMergedPreserve(l)&&(!s||f.length>1)){var u=s?void 0:e.getInitialValue(i);if(i.length&&e.getFieldValue(i)!==u&&e.fieldEntities.every(function(m){return!as(m.getNamePath(),i)})){var o=e.store;e.updateStore(Qt(o,i,u,!0)),e.notifyObservers(o,[i],{type:"remove"}),e.triggerDependenciesUpdate(o,i)}}e.notifyWatch([i])}}),j(this,"dispatch",function(t){switch(t.type){case"updateValue":{var i=t.namePath,a=t.value;e.updateValue(i,a);break}case"validateField":{var s=t.namePath,l=t.triggerName;e.validateFields([s],{triggerName:l});break}}}),j(this,"notifyObservers",function(t,i,a){if(e.subscribable){var s=Fe(Fe({},a),{},{store:e.getFieldsValue(!0)});e.getFieldEntities().forEach(function(l){var f=l.onStoreChange;f(t,i,s)})}else e.forceRootUpdate()}),j(this,"triggerDependenciesUpdate",function(t,i){var a=e.getDependencyChildrenFields(i);return a.length&&e.validateFields(a),e.notifyObservers(t,a,{type:"dependenciesUpdate",relatedFields:[i].concat(Ae(a))}),a}),j(this,"updateValue",function(t,i){var a=st(t),s=e.store;e.updateStore(Qt(e.store,a,i)),e.notifyObservers(s,[a],{type:"valueUpdate",source:"internal"}),e.notifyWatch([a]);var l=e.triggerDependenciesUpdate(s,a),f=e.callbacks.onValuesChange;if(f){var u=D0(e.store,[a]);f(u,e.getFieldsValue())}e.triggerOnFieldsChange([a].concat(Ae(l)))}),j(this,"setFieldsValue",function(t){e.warningUnhooked();var i=e.store;if(t){var a=Lr(e.store,t);e.updateStore(a)}e.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),e.notifyWatch()}),j(this,"setFieldValue",function(t,i){e.setFields([{name:t,value:i,errors:[],warnings:[]}])}),j(this,"getDependencyChildrenFields",function(t){var i=new Set,a=[],s=new _r;e.getFieldEntities().forEach(function(f){var u=f.props.dependencies;(u||[]).forEach(function(o){var m=st(o);s.update(m,function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return x.add(f),x})})});var l=function f(u){var o=s.get(u)||new Set;o.forEach(function(m){if(!i.has(m)){i.add(m);var x=m.getNamePath();m.isFieldDirty()&&x.length&&(a.push(x),f(x))}})};return l(t),a}),j(this,"triggerOnFieldsChange",function(t,i){var a=e.callbacks.onFieldsChange;if(a){var s=e.getFields();if(i){var l=new _r;i.forEach(function(u){var o=u.name,m=u.errors;l.set(o,m)}),s.forEach(function(u){u.errors=l.get(u.name)||u.errors})}var f=s.filter(function(u){var o=u.name;return Rr(t,o)});f.length&&a(f,s)}}),j(this,"validateFields",function(t,i){e.warningUnhooked();var a,s;Array.isArray(t)||typeof t=="string"||typeof i=="string"?(a=t,s=i):s=t;var l=!!a,f=l?a.map(st):[],u=[],o=String(Date.now()),m=new Set,x=s||{},y=x.recursive,h=x.dirty;e.getFieldEntities(!0).forEach(function(p){if(l||f.push(p.getNamePath()),!(!p.props.rules||!p.props.rules.length)&&!(h&&!p.isFieldDirty())){var v=p.getNamePath();if(m.add(v.join(o)),!l||Rr(f,v,y)){var C=p.validateRules(Fe({validateMessages:Fe(Fe({},is),e.validateMessages)},s));u.push(C.then(function(){return{name:v,errors:[],warnings:[]}}).catch(function(A){var B,S=[],I=[];return(B=A.forEach)===null||B===void 0||B.call(A,function(R){var D=R.rule.warningOnly,b=R.errors;D?I.push.apply(I,Ae(b)):S.push.apply(S,Ae(b))}),S.length?Promise.reject({name:v,errors:S,warnings:I}):{name:v,errors:S,warnings:I}}))}}});var d=Al(u);e.lastValidatePromise=d,d.catch(function(p){return p}).then(function(p){var v=p.map(function(C){var A=C.name;return A});e.notifyObservers(e.store,v,{type:"validateFinish"}),e.triggerOnFieldsChange(v,p)});var c=d.then(function(){return e.lastValidatePromise===d?Promise.resolve(e.getFieldsValue(f)):Promise.reject([])}).catch(function(p){var v=p.filter(function(C){return C&&C.errors.length});return Promise.reject({values:e.getFieldsValue(f),errorFields:v,outOfDate:e.lastValidatePromise!==d})});c.catch(function(p){return p});var g=f.filter(function(p){return m.has(p.join(o))});return e.triggerOnFieldsChange(g),c}),j(this,"submit",function(){e.warningUnhooked(),e.validateFields().then(function(t){var i=e.callbacks.onFinish;if(i)try{i(t)}catch(a){console.error(a)}}).catch(function(t){var i=e.callbacks.onFinishFailed;i&&i(t)})}),this.forceRootUpdate=r});function Gi(n){var r=le.useRef(),e=le.useState({}),t=Hr(e,2),i=t[1];if(!r.current)if(n)r.current=n;else{var a=function(){i({})},s=new wl(a);r.current=s.getForm()}return[r.current]}var Oi=le.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Dl=function(r){var e=r.validateMessages,t=r.onFormChange,i=r.onFormFinish,a=r.children,s=le.useContext(Oi),l=le.useRef({});return le.createElement(Oi.Provider,{value:Fe(Fe({},s),{},{validateMessages:Fe(Fe({},s.validateMessages),e),triggerFormChange:function(u,o){t&&t(u,{changedFields:o,forms:l.current}),s.triggerFormChange(u,o)},triggerFormFinish:function(u,o){i&&i(u,{values:o,forms:l.current}),s.triggerFormFinish(u,o)},registerForm:function(u,o){u&&(l.current=Fe(Fe({},l.current),{},j({},u,o))),s.registerForm(u,o)},unregisterForm:function(u){var o=Fe({},l.current);delete o[u],l.current=o,s.unregisterForm(u)}})},a)},_l=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],Sl=function(r,e){var t=r.name,i=r.initialValues,a=r.fields,s=r.form,l=r.preserve,f=r.children,u=r.component,o=u===void 0?"form":u,m=r.validateMessages,x=r.validateTrigger,y=x===void 0?"onChange":x,h=r.onValuesChange,d=r.onFieldsChange,c=r.onFinish,g=r.onFinishFailed,p=r.clearOnDestroy,v=Li(r,_l),C=le.useRef(null),A=le.useContext(Oi),B=Gi(s),S=Hr(B,1),I=S[0],R=I.getInternalHooks(gr),D=R.useSubscribe,b=R.setInitialValues,w=R.setCallbacks,F=R.setValidateMessages,N=R.setPreserve,M=R.destroyForm;le.useImperativeHandle(e,function(){return Fe(Fe({},I),{},{nativeElement:C.current})}),le.useEffect(function(){return A.registerForm(t,I),function(){A.unregisterForm(t)}},[A,I,t]),F(Fe(Fe({},A.validateMessages),m)),w({onValuesChange:h,onFieldsChange:function(q){if(A.triggerFormChange(t,q),d){for(var Q=arguments.length,te=new Array(Q>1?Q-1:0),ee=1;ee<Q;ee++)te[ee-1]=arguments[ee];d.apply(void 0,[q].concat(te))}},onFinish:function(q){A.triggerFormFinish(t,q),c&&c(q)},onFinishFailed:g}),N(l);var V=le.useRef(null);b(i,!V.current),V.current||(V.current=!0),le.useEffect(function(){return function(){return M(p)}},[]);var $,L=typeof f=="function";if(L){var G=I.getFieldsValue(!0);$=f(G,I)}else $=f;D(!L);var Y=le.useRef();le.useEffect(function(){Fl(Y.current||[],a||[])||I.setFields(a||[]),Y.current=a},[a,I]);var P=le.useMemo(function(){return Fe(Fe({},I),{},{validateTrigger:y})},[I,y]),T=le.createElement(Jn.Provider,{value:null},le.createElement(Pr.Provider,{value:P},$));return o===!1?T:le.createElement(o,Mi({},v,{ref:C,onSubmit:function(q){q.preventDefault(),q.stopPropagation(),I.submit()},onReset:function(q){var Q;q.preventDefault(),I.resetFields(),(Q=v.onReset)===null||Q===void 0||Q.call(v,q)}}),T)};function S0(n){try{return JSON.stringify(n)}catch{return Math.random()}}function kl(){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];var t=r[0],i=r[1],a=i===void 0?{}:i,s=Ou(a)?{form:a}:a,l=s.form,f=J(),u=Hr(f,2),o=u[0],m=u[1],x=qe(function(){return S0(o)},[o]),y=Qe(x);y.current=x;var h=Rs(Pr),d=l||h,c=d&&d._init,g=st(t),p=Qe(g);return p.current=g,Le(function(){if(c){var v=d.getFieldsValue,C=d.getInternalHooks,A=C(gr),B=A.registerWatch,S=function(b,w){var F=s.preserve?w:b;return typeof t=="function"?t(F):hr(F,p.current)},I=B(function(D,b){var w=S(D,b),F=S0(w);y.current!==F&&(y.current=F,m(w))}),R=S(v(),v(!0));return o!==R&&m(R),I}},[c]),o}var Il=le.forwardRef(Sl),Yr=Il;Yr.FormProvider=Dl;Yr.Field=ss;Yr.List=bl;Yr.useForm=Gi;Yr.useWatch=kl;const k0=n=>typeof n=="object"&&n!=null&&n.nodeType===1,I0=(n,r)=>(!r||n!=="hidden")&&n!=="visible"&&n!=="clip",un=(n,r)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const e=getComputedStyle(n,null);return I0(e.overflowY,r)||I0(e.overflowX,r)||(t=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(t);return!!i&&(i.clientHeight<t.scrollHeight||i.clientWidth<t.scrollWidth)})(n)}return!1},ln=(n,r,e,t,i,a,s,l)=>a<n&&s>r||a>n&&s<r?0:a<=n&&l<=e||s>=r&&l>=e?a-n-t:s>r&&l<e||a<n&&l>e?s-r+i:0,Rl=n=>{const r=n.parentElement;return r??(n.getRootNode().host||null)},R0=(n,r)=>{var e,t,i,a;if(typeof document>"u")return[];const{scrollMode:s,block:l,inline:f,boundary:u,skipOverflowHiddenElements:o}=r,m=typeof u=="function"?u:V=>V!==u;if(!k0(n))throw new TypeError("Invalid target");const x=document.scrollingElement||document.documentElement,y=[];let h=n;for(;k0(h)&&m(h);){if(h=Rl(h),h===x){y.push(h);break}h!=null&&h===document.body&&un(h)&&!un(document.documentElement)||h!=null&&un(h,o)&&y.push(h)}const d=(t=(e=window.visualViewport)==null?void 0:e.width)!=null?t:innerWidth,c=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:g,scrollY:p}=window,{height:v,width:C,top:A,right:B,bottom:S,left:I}=n.getBoundingClientRect(),{top:R,right:D,bottom:b,left:w}=(V=>{const $=window.getComputedStyle(V);return{top:parseFloat($.scrollMarginTop)||0,right:parseFloat($.scrollMarginRight)||0,bottom:parseFloat($.scrollMarginBottom)||0,left:parseFloat($.scrollMarginLeft)||0}})(n);let F=l==="start"||l==="nearest"?A-R:l==="end"?S+b:A+v/2-R+b,N=f==="center"?I+C/2-w+D:f==="end"?B+D:I-w;const M=[];for(let V=0;V<y.length;V++){const $=y[V],{height:L,width:G,top:Y,right:P,bottom:T,left:z}=$.getBoundingClientRect();if(s==="if-needed"&&A>=0&&I>=0&&S<=c&&B<=d&&($===x&&!un($)||A>=Y&&S<=T&&I>=z&&B<=P))return M;const q=getComputedStyle($),Q=parseInt(q.borderLeftWidth,10),te=parseInt(q.borderTopWidth,10),ee=parseInt(q.borderRightWidth,10),ne=parseInt(q.borderBottomWidth,10);let ce=0,oe=0;const Ie="offsetWidth"in $?$.offsetWidth-$.clientWidth-Q-ee:0,ve="offsetHeight"in $?$.offsetHeight-$.clientHeight-te-ne:0,pe="offsetWidth"in $?$.offsetWidth===0?0:G/$.offsetWidth:0,we="offsetHeight"in $?$.offsetHeight===0?0:L/$.offsetHeight:0;if(x===$)ce=l==="start"?F:l==="end"?F-c:l==="nearest"?ln(p,p+c,c,te,ne,p+F,p+F+v,v):F-c/2,oe=f==="start"?N:f==="center"?N-d/2:f==="end"?N-d:ln(g,g+d,d,Q,ee,g+N,g+N+C,C),ce=Math.max(0,ce+p),oe=Math.max(0,oe+g);else{ce=l==="start"?F-Y-te:l==="end"?F-T+ne+ve:l==="nearest"?ln(Y,T,L,te,ne+ve,F,F+v,v):F-(Y+L/2)+ve/2,oe=f==="start"?N-z-Q:f==="center"?N-(z+G/2)+Ie/2:f==="end"?N-P+ee+Ie:ln(z,P,G,Q,ee+Ie,N,N+C,C);const{scrollLeft:Xe,scrollTop:Ne}=$;ce=we===0?0:Math.max(0,Math.min(Ne+ce/we,$.scrollHeight-L/we+ve)),oe=pe===0?0:Math.max(0,Math.min(Xe+oe/pe,$.scrollWidth-G/pe+Ie)),F+=Ne-ce,N+=Xe-oe}M.push({el:$,top:ce,left:oe})}return M},Nl=n=>n===!1?{block:"end",inline:"nearest"}:(r=>r===Object(r)&&Object.keys(r).length!==0)(n)?n:{block:"start",inline:"nearest"};function Pl(n,r){if(!n.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(n))return;const e=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(n);if((i=>typeof i=="object"&&typeof i.behavior=="function")(r))return r.behavior(R0(n,r));const t=typeof r=="boolean"||r==null?void 0:r.behavior;for(const{el:i,top:a,left:s}of R0(n,Nl(r))){const l=a-e.top+e.bottom,f=s-e.left+e.right;i.scroll({top:l,left:f,behavior:t})}}const Tl=["parentNode"],ql="form_item";function us(n){return n===void 0||n===!1?[]:Array.isArray(n)?n:[n]}function zl(n,r){if(!n.length)return;const e=n.join("_");return r?`${r}_${e}`:Tl.includes(e)?`${ql}_${e}`:e}var Ol=function(n,r){var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0&&(e[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(n);i<t.length;i++)r.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(n,t[i])&&(e[t[i]]=n[t[i]]);return e};function N0(n){return us(n).join("_")}function P0(n,r){const e=r.getFieldInstance(n),t=Ys(e);if(t)return t;const i=zl(us(n),r.__INTERNAL__.name);if(i)return document.getElementById(i)}function ls(n){const[r]=Gi(),e=le.useRef({}),t=le.useMemo(()=>Object.assign(Object.assign({},r),{__INTERNAL__:{itemRef:i=>a=>{const s=N0(i);a?e.current[s]=a:delete e.current[s]}},scrollToField:(i,a={})=>{const{focus:s}=a,l=Ol(a,["focus"]),f=P0(i,t);f&&(Pl(f,Object.assign({scrollMode:"if-needed",block:"nearest"},l)),s&&t.focusField(i))},focusField:i=>{var a,s;const l=t.getFieldInstance(i);typeof(l==null?void 0:l.focus)=="function"?l.focus():(s=(a=P0(i,t))===null||a===void 0?void 0:a.focus)===null||s===void 0||s.call(a)},getFieldInstance:i=>{const a=N0(i);return e.current[a]}}),[n,r]);return[t]}const Ml=({isModalOpen:n,handleOk:r,handleCancel:e,data:t})=>{const i={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[a]=ls();return Le(()=>{if(!n){a.resetFields();return}a.setFieldValue("new_name",t==null?void 0:t.label)},[t,n]),k(ei,{modal:{styles:i},children:k(Zt,{title:k("div",{className:"text-[16px]",children:"\u7F16\u8F91\u4F1A\u8BDD\u540D\u79F0"}),closeIcon:null,open:n,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:X("div",{className:"mt-[16px] flex justify-end",children:[k(vr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),k(vr,{children:"\u786E\u8BA4",onClick:async()=>{try{const s=await a.validateFields();r("ok_rename",s)}catch(s){console.log(s);return}},type:"primary",className:"border-none"})]}),children:k(n0,{form:a,children:k(n0.Item,{name:"new_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"},{max:100,message:"\u6700\u5927\u5B57\u6570\u9650\u5236100"}],children:k(Vr,{})})})})})},Ll=({isModalOpen:n,handleOk:r,handleCancel:e,data:t})=>{const i={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[a]=ls();return Le(()=>{if(!n){a.resetFields();return}a.setFieldValue("new_name",t==null?void 0:t.label)},[t,n]),k(ei,{modal:{styles:i},children:k(Zt,{title:k("div",{className:"text-[16px]",children:"\u5220\u9664\u4F1A\u8BDD"}),closeIcon:null,open:n,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:X("div",{className:"mt-[16px] flex justify-end",children:[k(vr,{children:"\u53D6\u6D88",onClick:e,className:"mr-[8px]"}),k(vr,{children:"\u786E\u8BA4",onClick:async()=>{try{const s=await a.validateFields();r("ok_remove",s)}catch(s){console.log(s);return}},type:"primary",className:"border-none"})]}),children:k("div",{children:`\u786E\u5B9A\u8981\u5220\u9664\u4F1A\u8BDD\u300C${t.label}\u300D\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002`})})})},$l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFQSURBVHgBpVMxTsNQDLWTiIYBFG7Q3iCcgLIxQJWxZSpbOxFO0HICOhE2shGxEFCGbvQGcAPCCahgIJHoN/5RaEOUBAJPsmTZ3/aT/T4Co23ZxoYeWVACEjj/UOhx6l2E+RzudQfNNcR79ptQjfD1vbE98yfzbFDTEE1ZrBC1/IIJEhYPEYhPKUs3m1OQyJBOWfFPOQX+CQ1qQu6sATBaCLwNrh2/NgOdjQC2FBVu5PW+MTjoDvrccSdfJNILqQCzdB9WpzckudQlg87hYISIl7I7G2YNAZ75SrtFy1wxIBwLwtPAc8ZQA5qq676II5MAw8A7n+z3hpLW2d2V0/pVA99NlGV/BRJdIDbltqcV91++zwesvm2IOH6AEmkTkfsW6Seb6/EL+0dY9EhKl1mYi1Slq3HCQFCP2WHWZJY2qEL6L5LPJ/gy8BfIJmxt6X8C+32HILvaN+0AAAAASUVORK5CYII=",ni=({title:n,setOpen:r,children:e})=>X("div",{style:{width:"100%",height:"60px",borderBottom:"1px solid #EBEBEB",padding:"20px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"16px",fontWeight:600},children:[k("div",{children:n}),X("div",{style:{display:"flex",alignItems:"center",gap:20},children:[e,k("img",{src:Bo,style:{width:"16px",height:"16px",cursor:"pointer"},onClick:()=>r(!1)})]})]}),Vl=({items:n})=>{var i,a;const r=(i=n==null?void 0:n[0])!=null&&i.data?n[0].data:{},{properties:e}=r,t=((a=(e||[]).find(s=>s.name==="name"))==null?void 0:a.value)||r.nodeType;return X("div",{style:{width:"280px",height:"60px",borderRadius:"4px",padding:"8px 8px 0 8px",display:"flex",background:"#fff"},children:[k("div",{style:{background:"#DBBDA0",width:"43px",height:"43px",borderRadius:"4px",fontSize:"26px",color:"#fff",lineHeight:"40px",textAlign:"center"},children:t?t.substr(0,1):""}),X("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-between",height:"45px",marginLeft:"16px"},children:[k("div",{style:{color:"#2A2A2A",fontWeight:"16px",fontSize:"16px",minWidth:"10px",width:190,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:t}),k("div",{style:{height:"20px",padding:"0 10px",background:"#E3F0FF",fontSize:"12px",lineHeight:"20px",textAlign:"center",borderRadius:"4px",marginTop:"4px",width:"fit-content",color:"#055AFF"},children:r.nodeType})]})]})};Ta();const Ul=({curFileInfo:n,onClose:r,token:e})=>{var o;const[t,i]=J({nodeList:[],edgeList:[]}),a=Qe(null);Le(()=>{console.log("curFileInfo",n)},[n]);const s=async m=>{var x,y,h;if(!(!(m!=null&&m.id)||!(m!=null&&m.cypher)||!(m!=null&&m.fetchUrl)))try{const{cypher:d,fetchUrl:c,name:g}=m||{},p=await Ct.post(`${Xn()}${c}`,{graphName:g,statement:d},{headers:{Authorization:e}});console.log("getGraphData res",p),i(((x=p==null?void 0:p.data)==null?void 0:x.data)||{})}catch(d){Oe.error((h=(y=d==null?void 0:d.response)==null?void 0:y.data)==null?void 0:h.errorMsg),console.log("error",d)}};Le(()=>{s(n)},[n]);const l={title:"",subtitle:"",backgroundColor:"#FAFBFD",showLegend:!1,showTooltip:!0,showFullscreen:!0,showMinimap:!1,toolbarMode:"floatbar"},f={type:"circle",style:{fill:"#529BF8",lineWidth:0,halo:!1,labelFill:"#fff",labelFontSize:12,labelPlacement:"center",labelTextAlign:"center",labelMaxWidth:60,labelMaxLines:10,labelOffsetY:-6,labelWordWrap:!0,size:80,labelText:m=>{var h;if(!(m!=null&&m.data))return"";const{properties:x,nodeType:y}=m.data;return((h=(x||[]).find(d=>d.name==="name"))==null?void 0:h.value)||y}},state:{active:m=>m.states.includes("selected")?{halo:!0}:{halo:!1,cursor:"pointer"},selected:m=>({halo:!0,cursor:"pointer"})}},u={type:"line",style:{stroke:"#DDE1E8",lineWidth:1,cursor:"pointer",labelFill:"#888888",halo:!1,labelText:m=>{var h;if(!(m!=null&&m.data))return"";const{properties:x,edgeType:y}=m.data;return((h=(x||[]).find(d=>d.name==="name"))==null?void 0:h.value)||y}},state:{active:{cursor:"pointer"},selected:m=>({halo:!0,cursor:"pointer"})}};return X("div",{children:[k(ni,{title:(n==null?void 0:n.graphName)||(n==null?void 0:n.name),setOpen:r,children:k(vr,{icon:k("img",{src:Xs,width:16}),onClick:()=>{Eo(a.current,{mode:"viewport",type:"image/png"}).then(m=>{Oe.success("\u5BFC\u51FA\u6210\u529F")})},children:"\u5BFC\u51FA"})}),k("div",{style:{width:"100%",height:"calc(100vh - 60px)"},children:k(bo,{centerNode:{vid:(o=n==null?void 0:n.traceNode)==null?void 0:o.vid},data:t,tooltipShow:{node:!0,edge:!1},layout:{type:"force",linkDistance:190},title:l.title,subtitle:l.subtitle,backgroundColor:l.backgroundColor,showGrid:!1,showLegend:l.showLegend,showTooltip:l.showTooltip,tooltipRender:Vl,showFullscreen:l.showFullscreen,showMinimap:l.showMinimap,customPlugins:{},toolbarMode:l.toolbarMode,onReady:m=>{a.current=m,console.log("KnowledgeGraphPreview ready:",m)},node:f,edge:u})})]})},Hl=({content:n,onClose:r,token:e})=>{const t=s=>{if(!(s!=null&&s.metadata))return;const l=Ei(s,""),{page_number:f,page_size:u,position:o,offset:m,chunk_type:x}=s.metadata;if(l==="markdown_table")return m!=null&&m.length?{annotations:[{id:er(),offsets:m}],initialPage:1}:{};{if(!u||!o)return console.log("%c\u7F3A\u5C11\u6587\u4EF6size\u6216\u8005\u6587\u4EF6\u5750\u6807","color: red"),{};const y=Array.isArray(u)?u:JSON.parse(u);if(!y.length)return console.log("%c\u7F3A\u5C11\u6587\u4EF6size","color: red"),{};const h=Array.isArray(o)?o:JSON.parse(o);return!h.length||!f?(console.log("%c\u7F3A\u5C11\u6587\u4EF6\u5750\u6807\u6216\u8005\u6587\u4EF6\u9875\u6570","color: red"),{}):{annotations:h.map((c,g)=>({id:er(),pageNumber:f[g],x:+(c[0][0]/y[0][0]).toFixed(4),y:+(c[0][1]/y[0][1]).toFixed(4),width:+((c[1][0]-c[0][0])/y[0][0]).toFixed(4),height:+((c[2][1]-c[0][1])/y[0][1]).toFixed(4),content:"",color:x==="image"?"#60f74f":"#4FC3F7"})),initialPage:f[0]}}},i=qe(()=>{var s,l;if(console.log("content88888888888",n),n&&e){console.log("content999",n);const{annotations:f,initialPage:u}=t(n),o={...n,metadata:{source:((s=n==null?void 0:n.metadata)==null?void 0:s.source)||n.parse_url||n.url,page_size:(l=n==null?void 0:n.metadata)==null?void 0:l.page_size}},m=Ia(Ra(o));return{filePath:m,fileName:Vi(o),fileType:Ei(o,m),totalPages:o.pdfPages||0,token:e,annotations:f,initialPage:u,initialZoom:Na(598,o)}}else return{}},[n]),a=qe(()=>i.filePath?(console.log("curData",i),k(Pa,{initialZoom:i.initialZoom||100,convertedFilePath:i.filePath,fileName:i.fileName,fileType:i.fileType,initialPage:i.initialPage,totalPages:i.totalPages,authorization:i.token,annotations:i.annotations,streamApiUrl:"/proxy/index/knowledgeBase/file/stream",eventsEmit:s=>{switch(s){case"viewer:close":r();break}},tools:{close:!0}})):k(Nr,{}),[i]);return k("div",{style:{fontFamily:"Source Han Sans CN",fontSize:"12px"},className:"h-full w-full",children:a})},cs=({curFileInfo:n,onClose:r,token:e})=>{const t=qe(()=>{var a,s,l;if(n&&e){console.log("content999",n);const f={file_source:n.parse_url||n.parsedFilePath||n.url,file_type:n.file_type,metadata:{source:n.filePath||n.url||((a=n==null?void 0:n.metadata)==null?void 0:a.source)||"",page_size:(s=n==null?void 0:n.metadata)==null?void 0:s.page_size},pdfPages:n.pdfPages},u=Ia(Ra(f));return{filePath:u,fileName:Vi(f),fileType:Ei(f,u),totalPages:f.pdfPages||0,token:e,initialZoom:Na(((l=document.getElementById("pdfBox"))==null?void 0:l.clientWidth)||0,f)}}else return{}},[n]),i=qe(()=>(console.log("curData",t),t.filePath?k(Pa,{initialZoom:t.initialZoom||100,convertedFilePath:t.filePath,fileName:t.fileName,fileType:t.fileType,initialPage:1,totalPages:t.totalPages,authorization:t.token,streamApiUrl:"/proxy/index/knowledgeBase/file/stream",eventsEmit:a=>{switch(a){case"viewer:close":r();break}},tools:{close:!0}}):k(Nr,{})),[t]);return k("div",{id:"pdfBox",className:"h-full overflow-y-auto",children:i})},Wl=({curFileInfo:n,token:r,onClose:e})=>{const[t,i]=J(1),[a,s]=J(10),[l,f]=J([]),[u,o]=J([]),[m,x]=J(0);Le(()=>{var g;const c=((g=n==null?void 0:n.metadata)==null?void 0:g.fetchUrl)||(n==null?void 0:n.fetchUrl);c&&h(c)},[n,t,a]);const y=async({url:c,params:g})=>{var p;try{const v=await Ct.get(`${Xn()}${c}?${new URLSearchParams(g).toString()}`,{headers:{Authorization:r}}),C=(p=v==null?void 0:v.data)==null?void 0:p.data;if(C){const{columns:A,dataList:B,totalData:S}=C;f(((A==null?void 0:A.slice(1))||[]).map(I=>({title:I.businessName,dataIndex:I.physicalName,key:I.physicalName}))),o(B||[]),x(S||[])}}catch(v){console.log("error",v)}},h=async c=>{y({url:`${c}`,params:{pageNo:t,pageSize:a}})},d=qe(()=>{const{databaseName:c,businessTableName:g,tableName:p}=n;return`${c} - ${p||g}`},[n]);return X("div",{children:[k(ni,{title:d,setOpen:e}),(l==null?void 0:l.length)>0?X("div",{children:[k("div",{className:"p-4 overflow-auto h-[calc(100vh-120px)]",children:k(ba,{columns:l,dataSource:u,pagination:!1,scroll:{x:"max-content"},rowKey:"id"})}),k("div",{className:"flex justify-end px-[18px]",children:k(Ms,{current:t,pageSize:a,responsive:!0,simple:!0,total:m,showSizeChanger:!0,showQuickJumper:!0,onChange:(c,g)=>{i(c),s(g||10)},onShowSizeChange:(c,g)=>{i(1),s(g)}})})]}):k(Ls,{})]})},Ci=({i:n,item:r,j:e,clickTag:t})=>{const i=e.nodeType?e.index:(e==null?void 0:e.name)!=null&&e.name!==""?String(e.name):(e==null?void 0:e.label)!=null&&e.label!==""?String(e.label):(e==null?void 0:e.content)!=null&&e.content!==""?String(e.content):(e==null?void 0:e.index)!=null?String(e.index):"";return k("div",{style:{minWidth:"16px",maxWidth:"80px",height:"16px",padding:"0 4px",backgroundColor:Kl[r.key],margin:"0 4px",color:Gl[r.key],display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"2px",fontSize:"12px",cursor:t?"pointer":"default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},onClick:()=>t&&t(n,e,r),title:i,children:i},e.id)};function jl(n){if(typeof n=="string"){const r=n.trim();if(!r)return"";const e=r.match(/\d{4}-\d{2}-\d{2}/);if(e!=null&&e[0])return e[0];const t=new Date(r);return Number.isNaN(t.getTime())?"":t.toISOString().slice(0,10)}if(n instanceof Date&&!Number.isNaN(n.getTime()))return n.toISOString().slice(0,10);if(typeof n=="number"&&Number.isFinite(n)){const r=new Date(n);if(!Number.isNaN(r.getTime()))return r.toISOString().slice(0,10)}return""}const Kl={knowledgeList:"#EAF4FD",searchList:"#E8F7F0",databaseList:"#FFF4E5",graphList:"#E7F8FB"},Gl={knowledgeList:"#2072F0",searchList:"#39B83F",databaseList:"#F48C14",graphList:"#10BBD9"},T0=[{key:"knowledgeList",name:"\u77E5\u8BC6\u5E93\u6587\u6863"},{key:"searchList",name:"\u8054\u7F51\u641C\u7D22",hideBtns:!0},{key:"databaseList",name:"\u6570\u636E\u5E93",hideBtns:!0},{key:"graphList",name:"\u77E5\u8BC6\u56FE\u8C31",hideBtns:!0}],q0=({type:n,data:r,token:e,eventsEmit:t,is_download:i})=>{const[a,s]=J(T0),[l,f]=J("mark"),[u,o]=J(!1),[m,x]=J({}),[y,h]=J("knowledgeList"),[d,c]=J(null),[g,p]=J({knowledgeList:[],searchList:[],databaseList:[],graphList:[]}),v=qe(()=>{const b=4-a.length,w=Array(b).fill(null).map((N,M)=>({name:"",key:100+M})),F=[...a,...w];return console.log("rrrrrr",F),F},[a]),C=b=>{const w=typeof b=="number"?b:Number(String(b).trim());return Number.isFinite(w)?(Math.trunc(w*100)/100).toFixed(2):""},A=b=>{switch(b){case"searchList":return lo;case"databaseList":return uo;case"graphList":return oo;default:return""}},B=b=>{const w=(b||"").toLowerCase();return["pdf"].includes(w)?"rag/pdf":["doc","docx"].includes(w)?"rag/word":["csv"].includes(w)?"rag/csv":["xls","xlsx"].includes(w)?"rag/excel":["ppt","pptx","pub"].includes(w)?"rag/ppt":["png","jpg","jpeg","jpge"].includes(w)?"rag/pic":["txt"].includes(w)?"rag/txt":["ofd"].includes(w)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(w)?"rag/video":"rag/txt"},S=(b,w)=>{if(b==="knowledgeList"){let N=((w==null?void 0:w.file_type)||"").toLowerCase();if(!N||N==="faq"){const M=(w==null?void 0:w.metadata)||{},V=M.folder_path||(w==null?void 0:w.folder_path)||M.file_path||M.source||(w==null?void 0:w.source)||(w==null?void 0:w.file_name)||"",$=String(V).match(/\.([a-z0-9]+)$/i);$&&(N=$[1].toLowerCase())}return k(ao,{type:B(N),size:22,style:{flexShrink:0}})}const F=A(b);return F?k("img",{src:F,style:{width:"22px",height:"22px",flexShrink:0}}):null},I=b=>{if(String((b==null?void 0:b.file_type)||"").toLowerCase()==="video")return!0;const F=String((b==null?void 0:b.file_name)||(b==null?void 0:b.name)||""),N=F.includes(".")?F.split(".").pop():"";return["mp4","flv","avi","mkv"].includes(String(N).toLowerCase())},R=(b,w)=>b==="graphList"?w:b==="knowledgeList"?(console.log("++++++",w),w.map(F=>{const N=F.metadata||{},M=F.score;if(F.type==="faq"){const $=N.folder_path||F.folder_path||N.knowledge_base_name||F.file_name||N.source||F.source||"",L=String($).match(/\.([a-z0-9]+)$/i),G=L?L[1].toLowerCase():"faq";return{...F,file_type:G,name:$,score:M}}const V=F.sourceFileName||no(F.source)||F.file_name;return{...F,file_type:io(F.source)||F.file_type,name:V,score:M}}).sort((F,N)=>(N.score||0)-(F.score||0))):b==="searchList"?w.map(F=>({...F,name:F.sourceFileName||F.file_name})).sort((F,N)=>(N.score||0)-(F.score||0)):b==="databaseList"?w.map(F=>{const N=F.tableName?`${F.databaseName||"\u6570\u636E\u5E93"} - ${F.tableName}`:F.databaseName||F.name||"\u6570\u636E\u5E93";return{...F,name:N,file_name:N,file_type:"database"}}).sort((F,N)=>(N.score||0)-(F.score||0)):w,D=(b,w,F)=>{var N,M;switch(F.key){case"knowledgeList":const{pdfPages:V,parsedFilePath:$,order_num:L,tags:G}=b||{},Y=w.id||L||"Unknown ID",P=(G||[]).find(ne=>ne.id===Y);if(b.type==="faq"){x(b),f("faq"),o(!0),t==null||t("retrive_tag:click",{tagInfo:{id:w.id,index:w.index,image_urls:w.image_urls||[]},fromtype:"10",leaf:{id:w.id,fromtype:"10"},referenceDoc:b});return}if(b.type==="video")return console.log("sdgasdgag",{file:{...b,...P}}),t==null?void 0:t("retrive_tag:click",{file:{...b,...P}});if(console.log("click knowledge tag",b,w),!b||!P)return;const{metadata:T}=P,z=T.source.split("/"),q=z[z.length-1]||"",Q=q.split("."),te=Q.slice(0,-1).join(".")||"Unknown Label",ee=Q[Q.length-1]||"Unknown Type";x({id:Y,title:te,file_name:q,file_type:ee,file_source:so(ee)?`${Qn}${T.source}`:$,metadata:T,pdfPages:V}),f("mark"),o(!0);break;case"searchList":console.log("click search tag",b,w);break;case"databaseList":console.log("click database tag",b,w),f("database"),x({...b,metadata:b.metadata||{},fetchUrl:b.fetchUrl||((N=b.metadata)==null?void 0:N.fetchUrl)||""}),o(!0);break;case"graphList":console.log("click graph tag",b,w),f("graphPreview"),x({...w,traceNode:(M=(w==null?void 0:w.traceNodes)||[])==null?void 0:M[0]}),o(!0);break}};return Le(()=>{if(n!==ds.REFERENCELIST||(console.log("data in reference drawer",r),!r))return;const{graphRefs:b,knowledgeRefs:w,webRefs:F,databaseRefs:N}=r;b!=null&&b.length&&(g.graphList=R("graphList",b)),w!=null&&w.length&&(g.knowledgeList=R("knowledgeList",w)),F!=null&&F.length&&(g.searchList=R("searchList",F)),N!=null&&N.length&&(g.databaseList=R("databaseList",N));const M=T0.filter(V=>{var $;return($=g[V.key])==null?void 0:$.length}).sort((V,$)=>{var L,G;return(((L=g[$.key])==null?void 0:L.length)||0)-(((G=g[V.key])==null?void 0:G.length)||0)});s(M),M!=null&&M.length&&h(M[0].key),p({...g})},[r]),X(Nr,{children:[X("div",{className:"listWrap w-full h-full",children:[k(ni,{title:"\u77E5\u8BC6\u6EAF\u6E90",setOpen:()=>{const b=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(b)}}),X("div",{style:{height:"calc(100% - 60px)"},children:[k("div",{className:"tabs",style:{display:"flex",justifyContent:"space-between",padding:"12px 20px"},children:v.map(b=>k("div",{className:"tab-item",style:{padding:"5.5px 12px",backgroundColor:b.name?y===b.key?"#4E6EF2":"#F5F6F9":"transparent",cursor:"pointer",borderRadius:"4px",color:y===b.key?"#FFFFFF":"#4E5969",fontSize:"14px",minWidth:"80px",display:"flex",justifyContent:"center"},onClick:()=>{b.name&&h(b.key)},children:b.name},b.key))}),k("div",{className:"listBox",style:{height:"calc(100% - 66px)",overflowY:"auto",display:"flex",flexDirection:"column",alignItems:"center",willChange:"scroll-position",transform:"translateZ(0)"},children:a.map(b=>{let w=g[b.key]||[];return y!==b.key?null:k("div",{children:w.map(F=>{var N,M,V,$,L,G,Y,P,T;return X("div",{style:{width:"360px",padding:"4px 8px",borderRadius:"4px",margin:"6px 0",cursor:b.key==="knowledgeList"&&F.type==="faq"?"default":"pointer"},className:"listItemBox",onClick:()=>{b.key==="searchList"&&window.open(F.link,"_blank")},children:[X("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px"},children:[X("div",{style:{flex:1,minWidth:0,fontSize:"14px",color:"#1D2129",fontWeight:"700",display:"flex",alignItems:"center"},children:[k("div",{style:{width:22,height:22,marginRight:2,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"},children:S(b.key,F)}),k(mr,{placement:"topLeft",title:((N=F==null?void 0:F.name)==null?void 0:N.length)>17?F.name:"",children:k("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.4,wordBreak:"break-all"},onClick:()=>{var z;b.key==="knowledgeList"&&F.type==="faq"||(b.key==="knowledgeList"?t==null||t("knowledge_referenceFile_title:click",{data:{...F,file_type:F.file_type,file_name:F.file_name,metadata:F.metadata,parsedFilePath:F.parsedFilePath}}):b.key==="databaseList"&&(f("database"),x({...F,metadata:F.metadata||{},fetchUrl:F.fetchUrl||((z=F.metadata)==null?void 0:z.fetchUrl)||""}),o(!0)))},children:F.name})})]}),!!((M=F==null?void 0:F.tags)!=null&&M.length&&F.tags.length>0&&F.tags.length<=10&&F.type!=="faq")&&k("div",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(F.tags||[]).map(z=>k(Ci,{i:F,item:b,j:z,clickTag:D},z.id))}),X("div",{style:{width:"52px",justifyContent:I(F)?"flex-end":"space-between",alignItems:"center",marginRight:"8px",display:b.hideBtns||F.type==="faq"||F.faq_question||F.faq_answer?"none":"flex"},children:[!I(F)&&X(Nr,{children:[k("img",{src:$l,style:{width:"16px",height:"16px",cursor:"pointer"},onClick:()=>{t==null||t("referenceFile_filechat",{data:{...F,file_type:F.file_type,file_name:F.file_name,metadata:F.metadata,parsedFilePath:F.parsedFilePath}})}}),k("div",{style:{borderRight:"1px solid #E5E6EB",height:"14px"}})]}),k("img",{src:to,style:{width:"16px",height:"16px",cursor:i?d?"wait":"pointer":"not-allowed",opacity:d?.7:1},onClick:async()=>{var ne;if(!i||d)return;const z=((ne=((F==null?void 0:F.tags)||[])[0])==null?void 0:ne.metadata)||(F==null?void 0:F.metadata)||{},q=(F==null?void 0:F.path)||(z==null?void 0:z.source)||(F==null?void 0:F.source)||(F==null?void 0:F.convertedFilePath)||(F==null?void 0:F.file_source)||(F==null?void 0:F.parsedFilePath)||(F==null?void 0:F.url)||(F==null?void 0:F.filePath)||"",Q=Vi({metadata:z,file_name:F==null?void 0:F.file_name})||String(q).split("/").pop()||(F==null?void 0:F.file_name)||"file";if(F.type!=="video"){t==null||t("referenceFile_download",{data:F,filePath:q,fileName:Q});return}if(!q)return;const te=String(q).includes("http")?String(q):`${Qn}${q}`,ee=`reference-download-${Q}`;c(ee),Oe.loading({key:ee,content:`\u6B63\u5728\u51C6\u5907\u4E0B\u8F7D\uFF1A${Q}`,duration:0});try{await ro({filePath:te,fileName:Q,token:e}),Oe.success({key:ee,content:`\u4E0B\u8F7D\u5DF2\u5F00\u59CB\uFF1A${Q}`})}catch{Oe.error({key:ee,content:`\u4E0B\u8F7D\u5931\u8D25\uFF1A${Q}`})}finally{c(null)}}})]})]}),b.key==="knowledgeList"&&F.type==="faq"&&(((V=F.metadata)==null?void 0:V.update_time)||F.score!==void 0||(($=F==null?void 0:F.tags)==null?void 0:$.length)&&F.tags.length>0)&&X("div",{style:{marginTop:"4px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",fontSize:"12px",color:"#4E5969"},children:[X("span",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:8},children:[F.score!==void 0&&X("span",{children:["\u5206\u6570: ",C(F.score)]}),((L=F.metadata)==null?void 0:L.update_time)&&k("span",{children:jl(F.metadata.update_time)})]}),((G=F==null?void 0:F.tags)==null?void 0:G.length)&&F.tags.length>0&&F.tags.length<=10&&k("span",{style:{display:"flex",alignItems:"center",flexShrink:0,gap:"2px"},children:(F.tags||[]).map(z=>k(Ci,{i:F,item:b,j:z,clickTag:F.type==="faq"?void 0:D},z.id))})]}),F.score!==void 0&&!(F.type==="faq"||F.faq_question||F.faq_answer)&&k("div",{style:{display:"flex",alignItems:"center",height:"18px",marginTop:"4px"},children:X("div",{style:{backgroundColor:"#F2F2FB",borderRadius:"4px",padding:"2px 3px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:"12px"},children:[k("span",{style:{color:"#4E5969",marginRight:"6px"},children:"\u5206\u6570:"}),k("span",{style:{color:"#1D2129"},children:C(F.score)})]})}),k("div",{style:{flex:1,display:"flex",justifyContent:"flex-start",marginTop:"4px"},children:((Y=F==null?void 0:F.tags)!=null&&Y.length&&F.tags.length>10?F.tags:[]).map(z=>k(Ci,{i:F,item:b,j:z,clickTag:F.type==="faq"?void 0:D},z.id))}),F.type==="faq"&&(F.faq_question||F.faq_answer)&&X("div",{style:{marginTop:"8px",padding:"8px 10px",background:"#EAF4FD",borderRadius:"4px",fontSize:"12px",color:"#1D2129",lineHeight:1.5},children:[F.faq_question!=null&&String(F.faq_question).trim()!==""&&X("div",{style:{marginBottom:"4px",display:"flex"},children:[k("span",{style:{color:"#4E5969",flexShrink:0},children:"Q: "}),k("span",{style:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:String(F.faq_question).trim()})]}),F.faq_answer!=null&&String(F.faq_answer).trim()!==""&&X("div",{style:{display:"flex"},children:[k("span",{style:{color:"#4E5969",flexShrink:0},children:"A: "}),k("span",{style:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:String(F.faq_answer).replace(/\s*--+[A-Za-z0-9]*\s*$/,"").trim()||String(F.faq_answer).trim()})]})]}),!!((P=F==null?void 0:F.main_source)!=null&&P.length)&&X("div",{style:{flex:1,display:"flex",alignItems:"flex-start",marginTop:"4px"},children:[k("div",{style:{fontSize:"12px",color:"#4E5969",width:"60px"},children:"\u5173\u8054\u6587\u6863:"}),k(mr,{placement:"topLeft",title:((T=di(F.main_source[0]))==null?void 0:T.length)>22?di(F.main_source[0]):"",children:k("div",{style:{fontSize:"12px",color:"#4E5969",width:"289px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:di(F.main_source[0])})})]})]},F.id)})},b.key)})})]})]}),k(ei,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:X(Aa,{autoFocus:!1,onClose:()=>o(!1),open:u,width:y==="graphList"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,afterOpenChange:b=>{b||x(null)},children:[l==="graphPreview"&&k(Ul,{curFileInfo:m,onClose:o,token:e}),l==="mark"&&k(Hl,{content:m,onClose:o,token:e}),l==="preview"&&k(cs,{curFileInfo:m,onClose:o,token:e}),l==="database"&&k(Wl,{curFileInfo:m,onClose:o,token:e}),l==="faq"&&m&&X("div",{className:"p-4",style:{fontSize:"14px",color:"#1D2129",lineHeight:1.6},children:[m.faq_question!=null&&String(m.faq_question).trim()!==""&&X("div",{style:{marginBottom:"12px"},children:[k("span",{style:{color:"#4E5969",marginRight:"4px"},children:"Q:"}),k("span",{children:String(m.faq_question).trim()})]}),m.faq_answer!=null&&String(m.faq_answer).trim()!==""&&X("div",{children:[k("span",{style:{color:"#4E5969",marginRight:"4px"},children:"A:"}),k("span",{children:String(m.faq_answer).replace(/\s*--+[A-Za-z0-9]*\s*$/,"").trim()||String(m.faq_answer).trim()})]})]})]})})]})},z0=({fileData:n,token:r})=>{const[e,t]=J([]);Le(()=>{var s,l;if(n!=null&&n.knowledgeBase){const f=n==null?void 0:n.knowledgeBase;if(!((s=f==null?void 0:f.treeData)!=null&&s.length))return;const u=(f==null?void 0:f.treeData)||[];if(!(u!=null&&u.length))return;const o=n==null?void 0:n.category;t((u||[]).filter(m=>m.name===o.name))}else if(n!=null&&n.knowledgeBases){const f=n==null?void 0:n.knowledgeBases;if(!(f!=null&&f.length))return;const u=((l=f[0])==null?void 0:l.treeData)||[];if(!(u!=null&&u.length))return;t(u)}},[n]);const i=Qe(new Map),a=async(s,l)=>{var f,u;if(!i.current.get(s==null?void 0:s.fetchUrl))try{const o=e[l];o.loading=!0;const m=[...e];t(m);const x=await Ct.get(`${Ao()}/${s.fetchUrl}`,{headers:{Authorization:r}}),y=(u=(f=x==null?void 0:x.data)==null?void 0:f.data)==null?void 0:u.records;if(y){const h=e[l];h.loading=!1,h.children=y;const d=[...e];d[l]=h,t(d),i.current.set(s==null?void 0:s.fetchUrl,!0)}else{const h=e[l];h.loading=!1;const d=[...e];t(d)}}catch{const m=e[l];m.loading=!1;const x=[...e];t(x)}};return X(Nr,{children:[k(ni,{title:"\u77E5\u8BC6\u5E93\u6587\u6863\u76EE\u5F55",setOpen:()=>{const s=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(s)}}),k("div",{style:{height:"calc(100% - 60px)",overflowY:"auto",padding:"16px"},children:e.map((s,l)=>{var f;return s.type==="file"?X("div",{className:"flex",style:{marginTop:"8px"},children:[qa(s),k(mr,{placement:"top",title:((f=s.name)==null?void 0:f.length)>23?s.name:"",children:k("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default",fontSize:"14px"},children:s.name})})]}):k(Yl,{item:s,index:l,clickFileItem:a},l)})})]})},Yl=({item:n,index:r,clickFileItem:e})=>{var a;const[t,i]=J(!1);return X("div",{style:{marginTop:"8px"},children:[X("div",{className:"flex cursor-pointer",onClick:()=>{i(!t),!t&&e(n,r)},children:[qa(n),k(mr,{placement:"top",title:((a=n.name)==null?void 0:a.length)>23?n.name:"",children:X("div",{style:{paddingLeft:"6px",width:"346px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"14px"},children:[n.name," (",n.fileCount||0,")"]})})]},r),k("div",{style:{padding:"2px 0 2px 14px",margin:"8px 0 0 7px",borderLeft:"2px solid #E5E6EB",display:t?"block":"none"},children:(n.children||[]).map((s,l)=>{var f;return X("div",{className:"flex items-center",children:[k("div",{style:{width:"4px",height:"4px",borderRadius:"2px",background:"black"}}),k(mr,{placement:"top",title:((f=s.name)==null?void 0:f.length)>26?s.name:"",children:k("div",{style:{paddingLeft:"6px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",width:"336px"},children:s.fileName})})]},l)})})]})};var ds=(n=>(n.REFERENCELIST="referencelist",n.ALLFILELIST="allFileList",n))(ds||{});function Ff(n=Ns){return function({token:e,url:t="http://localhost:8888",styles:i,CSRFToken:a,eventsEmit:s,scrollOld:l,locale:f="zh",messages:u,...o}){const m=Da(),x=qe(()=>{const E=Gn({theme:ti,mode:"light"},m||{});return Gn(E,i||{})},[m,i]),[y,h]=J(!1),[d,c]=J(!1),[g,p]=J(null),[v,C]=J(!1),[A,B]=J("mark"),[S,I]=J({url:"",parse_url:"",file_type:"",file_name:""}),[R,D]=J(!1),[b,w]=J([]),[F,N]=J(1),[M]=J(16),[V,$]=J(0),[L,G]=J(!1),[Y,P]=J([]),[T,z]=J(void 0),q=Qe(void 0);q.current=T;const[Q,te]=J([]),[ee,ne]=J([]),[ce,oe]=J(void 0),[Ie,ve]=J({display:"ready",sender:"ready",app:"initializing"});function pe(_,E){if(!E)return _;const O=Array.isArray(_)?[..._]:{..._};for(const H in E)if(E[H]!==void 0&&E[H]!==null&&Object.prototype.hasOwnProperty.call(E,H))if(H==="actions"&&Array.isArray(_[H])&&Array.isArray(E[H])){const W=new Map;_[H].forEach(ae=>{ae.name&&W.set(ae.name,ae)}),E[H].forEach(ae=>{ae.name&&W.set(ae.name,ae)}),O[H]=Array.from(W.values())}else typeof _[H]=="object"&&_[H]!==null&&!Array.isArray(_[H])&&typeof E[H]=="object"&&E[H]!==null&&!Array.isArray(E[H])?O[H]=pe(_[H],E[H]):O[H]=E[H];return O}const we=qe(()=>Oa(f),[f]),Xe=qe(()=>{const _=we;return{...Br,placeholder:_.sender.placeholder,switchs:(Br.switchs??[]).map(O=>({...O,label:O.name==="netSearch"?_.sender.netSearch:_.sender.deepThinking})),actions:(Br.actions??[]).map(O=>({...O,tip:O.name==="upload"?_.sender.fileUpload:O.tip}))}},[f,we]),[Ne,Je]=J(()=>pe(Xe,o.senderConfig));Le(()=>{const _=we,E={...Br,placeholder:_.sender.placeholder,switchs:(Br.switchs??[]).map(O=>({...O,label:O.name==="netSearch"?_.sender.netSearch:_.sender.deepThinking})),actions:(Br.actions??[]).map(O=>({...O,tip:O.name==="upload"?_.sender.fileUpload:O.tip}))};Je(O=>{const H=pe(E,o.senderConfig);return Array.isArray(O.actions)&&Array.isArray(H.actions)&&(H.actions=H.actions.map((W,ae)=>{var de;const xe=(de=O.actions)==null?void 0:de[ae];return xe&&xe.name===W.name&&xe.badgeCount!==void 0?{...W,badgeCount:xe.badgeCount}:W})),H})},[f,o.senderConfig,we]);const{fileStatuses:rt,setFileStatuses:$e,pollFileStatus:ue,handleRemoveFromTemp:U,resetStopFlag:me,setStopFlag:Se,stoppedRef:be,getTempFileList:et,setFileManagerData:K,fileManagerData:he}=Nu({url:t,token:e,CSRFToken:a,activeSessionId:T}),[se,De]=Ze.useState(()=>{var E;if(!ee||ee.length===0)return;const _=ee.find(O=>O.isDefault);return _?_.id:(E=ee[0])==null?void 0:E.id});Ze.useEffect(()=>{if(!ee||ee.length===0)return;const _=ee.some(E=>E.id===se);if(!se||!_){const E=ee.find(O=>O.isDefault);De(E?E.id:ee[0].id)}},[ee]);const[Z,lt]=J({}),Me=Qe(void 0),_t=Qe(void 0),ir=Qe(void 0),mt=Qe(null),ct=Qe(void 0),ar=Qe([]),[Cr,zr]=J([]),[sr,Er]=J({}),[br,Ht]=J(!1),[Nt,St]=J([]),[$t,Wt]=J(!1),{api_startChat_re:or,addEmptyMessage:jt,setLastEmptyMessage:Ar,stopStream:Kt,cancelStreamBySessionId:dt}=ku({baseUrl:t,CSRFToken:a,token:e,setChatData:P,activeSessionId:T,setAppStatus:ve,setConversationList:w}),Ge=qe(()=>{const _={};return(ee||[]).forEach(E=>{_[E.id]=E}),_},[ee]),ie=qe(()=>{const _=Y.find(O=>O.id===T)||{id:T,messages:[]},E=_.configId?Ge[_.configId]:null;return{..._,assistantInfo:E}},[Y,T,Ge]);Le(()=>{console.log("currentChatData",ie)},[ie]);const at=qe(()=>{if(ie.configId&&Ge){const _=Ge[ie.configId];return _!=null&&_.configJson?JSON.parse(_.configJson).is_download:!1}else return!1},[ie.configId,Ge]);qe(()=>{if((ie.configId||ce)&&Ge){const _=Ge[ie.configId];if(_!=null&&_.configJson){const E=JSON.parse(_.configJson);return console.log("is_enableThinking",ie.configId,Ge,ce),!!E.thinking}else if(ce){const E=Ge[ce];if(E!=null&&E.configJson)return!!JSON.parse(E.configJson).thinking}}return!1},[ie.configId,Ge,ce]),Le(()=>{$e([]),K({uploadedFiles:[]}),mt.current&&(mt.current.value="")},[T]),Le(()=>{if(Me.current&&Me.current!==T){const E=Me.current,O=b.find(ae=>ae.sessionId===E&&ae.isNew),H=Y.find(ae=>ae.id===E&&ae.isNew),W=H&&H.messages&&H.messages.length>0;O&&!W&&(w(ae=>ae.filter(xe=>xe.sessionId!==E)),P(ae=>ae.filter(xe=>xe.id!==E)))}Me.current=T;const _=ie.messages&&ie.messages.length>0?ie.messages[ie.messages.length-1].recommendQuestion:[];te(_)},[T,b,Y,ie.messages]);const Pt=async _=>{var E,O,H,W;if(!L){G(!0);try{const ae=await Ct.get(`${t}/qa/dialogue/list?pageNo=${_}&pageSize=${M}&sysType=INT_SESSION`,{headers:{Authorization:e}}),xe=((O=(E=ae==null?void 0:ae.data)==null?void 0:E.data)==null?void 0:O.records)||[],de=((W=(H=ae==null?void 0:ae.data)==null?void 0:H.data)==null?void 0:W.total)||0;$(de),w(Ce=>{const Ve=new Map;return[...Ce,...xe].forEach(tt=>{Ve.set(tt.sessionId,tt)}),Array.from(Ve.values())}),N(_)}catch{}finally{G(!1)}}};Le(()=>{ve(_=>({..._,app:"initializing"})),Ct.get(`${t}/qa/search/config/helper/list?pageNo=1&pageSize=3000`,{headers:{Authorization:e}}).then(_=>{ne(_.data.data||[])}).catch(()=>{}),Pt(1).then(()=>{T||cr(),ve(_=>({..._,app:"ready"}))}).catch(()=>{ve(_=>({..._,app:"error"}))})},[]),Le(()=>{T&&(ve(_=>({..._,display:"loading"})),et(T),Ct.get(`${t}/qa/dialogue/getDialogBySessionId?sessionId=${T}`,{headers:{Authorization:e}}).then(_=>{var ft;if(!_.data.data){ve(re=>({...re,display:"ready"}));return}const E=((ft=_.data.data)==null?void 0:ft.queryReplyPairList)||[],O=Qs(E),{sessionId:H,searchConfigDTO:W,filePath:ae,configId:xe,reference:de,webReference:Ce,uploadedFiles:Ve,fileList:tt,currentFiles:nt}=_.data.data;if(O.length>0){const re=O.length-1-[...O].reverse().findIndex(Pe=>Pe.istype==="ai");re>=0&&re<O.length&&O[re].istype==="ai"&&(de&&(O[re].reference=de),Ce&&(O[re].webReference=Ce))}const Re=nt||tt||Ve;if(Re&&O.length>0){const re=[...O].reverse().findIndex(Pe=>Pe.istype==="user");re!==-1&&(console.log(O[O.length-1-re].currentFiles,"filesData"),O[O.length-1-re].currentFiles=Re)}b.find(re=>re.sessionId===H)&&w(re=>re.map(Pe=>Pe.sessionId===H?{...Pe,searchConfigDTO:W,filePath:ae,configId:xe}:Pe));const ge={configId:_.data.data.configId,filePath:_.data.data.filePath,searchConfigDTO:_.data.data.searchConfigDTO||{},sessionId:_.data.data.sessionId,label:_.data.data.label,kbId:_.data.data.kbId};P(re=>{const Pe=re.filter(vt=>vt.id!==T);return[{id:T,messages:O,...ge},...Pe]}),ve(re=>({...re,display:"ready"}))}).catch(_=>{console.error("\u83B7\u53D6\u804A\u5929\u6570\u636E\u5931\u8D25:",_),_.response&&_.response.status===404&&cr(),ve(E=>({...E,display:"error"}))}))},[T,t,e]),Le(()=>{const _=he.uploadedFiles.length;Je(E=>{const O=Array.isArray(E.actions)?E.actions:[];return{...E,actions:O.map(W=>W.name==="history"?{...W,badgeCount:_}:W)}})},[he.uploadedFiles]),Le(()=>{co({url:t,token:e},_=>{St(_)})},[]),Ze.useEffect(()=>{rt.length&&P(_=>{if(!_[0])return _;const{messages:E}=_[0];for(let O=E.length-1;O>=0;O--)if(E[O].istype==="user"){const H=E[O].currentFiles||[];E[O].currentFiles=rt.map(W=>{var xe,de,Ce;const ae=H.find(Ve=>Ve.uid===W.uid);return{name:((xe=W.file)==null?void 0:xe.name)||W.name,size:((de=W.file)==null?void 0:de.size)||W.size,type:((Ce=W.file)==null?void 0:Ce.type)||W.type,status:W.status,uid:W.uid,url:W.url||(ae==null?void 0:ae.url)||""}});break}return[..._]})},[rt]);let Tt=null,qt=null;const Vt=(_,E,O,H)=>{qt=ue(_,{onStatusUpdate:E,onComplete:O,onFail:H})},zt=(_,E)=>{P(O=>{const H=[...O];return H[0]&&(H[0]={...H[0],messages:H[0].messages.map(W=>W.queryId===_?{...W,feedbackResult:E}:W)}),H})},ur=async _=>{var E,O;if(_)try{const H=(ie==null?void 0:ie.configId)||((E=Ge==null?void 0:Ge[(ie==null?void 0:ie.configId)||""])==null?void 0:E.id)||"",W=await Ct.get(`${t}/qa/ai/recommendQuestion?queryId=${_}&configId=${H||""}`.replace(/\?&/,"?"),{headers:{Authorization:e}});te(((O=W.data)==null?void 0:O.data)||[])}catch{te([])}};function ai(_){const{content:E,audioUrl:O,filePaths:H,queryId:W}=_;if(!T||!W)return;const ae=(ie==null?void 0:ie.messages)||[],xe=ae.findIndex(fe=>(fe==null?void 0:fe.queryId)===W&&((fe==null?void 0:fe.istype)==="ai"||(fe==null?void 0:fe.isUser)===!1));let de;if(xe>0)for(let fe=xe-1;fe>=0;fe-=1){const ge=ae[fe];if((ge==null?void 0:ge.istype)==="user"||(ge==null?void 0:ge.isUser)===!0){de=ge;break}}const Ce=(de==null?void 0:de.content)??E;if(!Ce)return;const Ve=(de==null?void 0:de.filePaths)??H,tt=(typeof Ve=="string"&&Ve?JSON.parse(Ve):Ve||[]).map(fe=>fe.uid),nt=Date.now();Ar({now:nt}),ve(fe=>({...fe,display:"processing",sender:"processing"}));const Re="query-"+er(32);xe>=0&&ae[xe]&&P(fe=>{if(!fe[0])return fe;const ge=fe[0],ft=ge.messages||[];if(xe>=ft.length)return fe;const re=ft.slice();return re[xe]={...re[xe],queryId:Re,content:re[xe].content,reference:"[]",webReference:"[]",graphReference:null,databaseReference:null,status:2,chain:void 0},[{...ge,messages:re},...fe.slice(1)]}),_.clearFn&&_.clearFn(),w(fe=>fe.map(ge=>ge.sessionId===T?{...ge,gmtModified:nt}:ge)),or({configId:ie.configId,content:Ce,fileUids:tt,lastDate:nt,name:ie.label||"",queryId:Re,sessionId:String(T||""),type:(de==null?void 0:de.audioUrl)??O?"audioUrl":"text",audioUrl:((de==null?void 0:de.audioUrl)??O)||"",enableThinking:!!Z.reasoning,enableWebsearch:!!Z.netSearch,qaChannel:Z.qaChannel,tempKnowledgeBaseCheck:rn.current},fe=>{ur(Re)})}async function Ut(_,E){if(Ie.sender!=="ready"){Oe.warning("\u5F53\u524D\u5BF9\u8BDD\u6B63\u5728\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u518D\u53D1\u9001\u65B0\u7684\u95EE\u9898");return}if(!T)return;const O=new CustomEvent("aichat:right_set",{detail:{collapsed:!0}});window.dispatchEvent(O);const H=b.find(W=>W.sessionId===T);if(H&&H.isNew){let W=!1;const ae=ce||H.configId,xe=_&&_.content?_.content.slice(0,20):H.label||"\u672A\u547D\u540D\u4F1A\u8BDD";if(await new Promise((de,Ce)=>{ho({url:t,token:e,CSRFToken:a},{label:xe,sessionId:H.sessionId,sysType:"INT_SESSION",configId:ae},Ve=>{Ve&&Ve.data&&Ve.data.sessionId?(w(tt=>tt.map(nt=>nt.sessionId===H.sessionId?{...nt,isNew:!1,configId:ae,label:xe}:nt)),P(tt=>tt.map(nt=>nt.id===H.sessionId?{...nt,isNew:!1,configId:ae,label:xe}:nt)),W=!0,de()):(Oe.error("\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),Ce())})}),!W)return;lr(T,_,E,ae);return}lr(T,_,E)}function lr(_,E,O,H){const W="query-"+er(32),ae=b.find(Re=>Re.sessionId===_),xe=H||(ae==null?void 0:ae.configId)||ie.configId;console.log("\u52A9\u624B\u914D\u7F6E\u8BE6\u60C5",xe);const de=E.content||E.text||"",Ce=typeof de=="string"?de:String(de),Ve=Ce?Ce.slice(0,20):"\u672A\u547D\u540D\u4F1A\u8BDD";let tt;if(E.files&&E.files.length>0&&(tt=E.files.map(Re=>({name:Re.file.name,size:Re.file.size,type:Re.file.type,filePath:Re.filePath||"",convertedFilePath:Re.convertedFilePath||"",uid:Re.uid||""}))),console.log("\u672C\u5730\u6587\u4EF6\u4E0A\u4F20",E.files),jt({content:Ce,queryId:W,currentFiles:tt,filePaths:tt?JSON.stringify(tt):void 0}),w(Re=>Re.map(fe=>fe.sessionId===_&&fe.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&fe.isNew?{...fe,label:Ve,gmtModified:Date.now(),isNew:!1}:fe)),P(Re=>Re.map(fe=>fe.id===_&&fe.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&fe.isNew?{...fe,label:Ve,isNew:!1}:fe)),E.files&&E.files.length>0){ve(re=>({...re,sender:"uploading",display:"uploading"})),Tt=new AbortController,me();const Re=E.files.map(()=>`rc-upload-${Date.now()}-${Math.random().toString(36).slice(2)}`),fe=E.files.map((re,Pe)=>({...re,uid:Re[Pe],status:"uploading"}));$e(fe);const ge=new FormData;E.files.forEach(re=>{ge.append("files",re.file)});const ft=String(_||"");ge.append("sessionId",ft),ge.append("uids",Re.join(",")),Ct.post(`${t}/index/knowledgeBase/file/uploadFiles`,ge,{headers:{Authorization:e,"Content-Type":"multipart/form-data"},signal:Tt.signal}).then(re=>{var gt,Ye,Yt,Ft,dr,fr,ye,ot,it,He;if(console.log("\u6587\u4EF6\u4E0A\u4F20\u7684\u6253\u5370\u7ED3\u679C",re),console.log("\u6587\u4EF6\u4E0A\u4F20\u54CD\u5E94\u8BE6\u60C5:",{status:re.status,success:(gt=re.data)==null?void 0:gt.success,dataType:Array.isArray((Ye=re.data)==null?void 0:Ye.data)?"array":typeof((Yt=re.data)==null?void 0:Yt.data),dataLength:Array.isArray((Ft=re.data)==null?void 0:Ft.data)?re.data.data.length:"N/A",errorMsg:(dr=re.data)==null?void 0:dr.errorMsg,errorCode:(fr=re.data)==null?void 0:fr.errorCode,fullResponse:re.data}),be.current)return;const Pe=(ye=re.data)==null?void 0:ye.data,yt=((ot=re.data)==null?void 0:ot.success)===!0,vt=Array.isArray(Pe)&&Pe.length>0;if(yt&&vt){const We=Pe,bt=We.map(je=>je.uid);$e(je=>je.map(Ke=>{const Ee=Pe.find(Te=>Te.uid===Ke.uid);return Ee?{...Ke,...Ee}:Ke})),ve(je=>({...je,sender:"processing",display:"analyzing"})),$e(je=>je.map(Ke=>({...Ke,status:"parsing"}))),Vt(bt,je=>{if(!je||!Array.isArray(je)){console.warn("pollFileStatus \u56DE\u8C03\u8FD4\u56DE\u7684 serverStatuses \u65E0\u6548:",je);return}if($e(Ee=>Ee.map(Te=>{const pt=je.find(At=>At&&At.uid===Te.uid);if(pt)switch(pt.fileParseStatus??pt.status){case 3:return{...Te,status:"done"};case 4:return{...Te,status:"error"};case 1:case 2:default:return{...Te,status:"parsing"}}return Te})),Array.isArray(je)&&je.length>0&&je.every(Ee=>{if(!Ee)return!1;const Te=Ee.fileParseStatus??Ee.status;return Te===3||Te===4})){$e([]);const Ee=new Map;(je||[]).forEach(Te=>{Ee.set(Te.id,Te)}),K(Te=>({uploadedFiles:mo(Te.uploadedFiles,We).map(At=>{var Xt;return{...At,pdfPages:((Xt=Ee.get(At.id))==null?void 0:Xt.pdfPages)||0}})}))}},()=>{O==null||O(),ve(Ke=>({...Ke,sender:"processing",display:"processing"})),$e(Ke=>Ke.map(Ee=>{const Te=We.find(pt=>pt.uid===Ee.uid);return Te?{...Ee,...Te,url:Te.filePath,filePath:Te.filePath,name:Te.fileName||Ee.name,convertedFilePath:Te.convertedFilePath||Ee.convertedFilePath}:Ee})),P(Ke=>{if(!Ke[0])return Ke;const{messages:Ee}=Ke[0];for(let Te=Ee.length-1;Te>=0;Te--)if(Ee[Te].istype==="user"){const pt=Ee[Te].currentFiles||[];Ee[Te].currentFiles=pt.map(At=>{const Xt=We.find(oi=>oi.uid===At.uid);return Xt?{...At,...Xt}:At});break}return[...Ke]});const je=Date.now();or({configId:xe,content:Ce,fileUids:bt,lastDate:je,name:Ve,queryId:W,sessionId:String(_||""),type:"text",audioUrl:"",enableThinking:!!Z.reasoning,enableWebsearch:!!Z.netSearch,qaChannel:Z.qaChannel,tempKnowledgeBaseCheck:rn.current},Ke=>{ur(W)})},je=>{ve(Ke=>({...Ke,display:"ready",sender:"ready"})),$e(Ke=>Ke.map(Ee=>({...Ee,status:"error",message:je})))})}else{let We="\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25";(it=re.data)!=null&&it.errorMsg?We=re.data.errorMsg:yt?vt||(Array.isArray(Pe)?Pe.length===0&&(We="\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u4E3A\u7A7A"):We=`\u4E0A\u4F20\u5931\u8D25: \u8FD4\u56DE\u6570\u636E\u683C\u5F0F\u9519\u8BEF\uFF0C\u671F\u671B\u6570\u7EC4\uFF0C\u5B9E\u9645\u4E3A ${typeof Pe}`):We=`\u4E0A\u4F20\u5931\u8D25: success=${(He=re.data)==null?void 0:He.success}`,console.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\u8BE6\u60C5:",{errorMsg:We,response:re.data,isSuccess:yt,isValidData:vt}),Oe.error(We),ve(bt=>({...bt,display:"error",sender:"ready"})),$e(bt=>bt.map(je=>({...je,status:"error",message:We})))}}).catch(re=>{var Pe,yt;((Pe=re==null?void 0:re.response)==null?void 0:Pe.status)===413?(yt=re==null?void 0:re.response)!=null&&yt.statusText.includes("Request Entity Too Large")&&Oe.error("\u6587\u4EF6\u8D85\u8FC7\u6700\u5927\u53EF\u4E0A\u4F20\u9650\u5236"):Oe.error("\u7F51\u7EDC\u9519\u8BEF"),ve(vt=>({...vt,display:"error",sender:"ready"})),$e(vt=>vt.map(gt=>({...gt,status:"error",message:"\u7F51\u7EDC\u9519\u8BEF"})))});return}ve(Re=>({...Re,display:"processing",sender:"processing"}));const nt=Date.now();w(Re=>Re.map(fe=>fe.sessionId===_?{...fe,gmtModified:nt}:fe)),O==null||O(),or({configId:xe,content:Ce,fileUids:[],lastDate:nt,name:Ve,queryId:W,sessionId:String(_||""),type:"text",audioUrl:"",enableThinking:!!Z.reasoning,enableWebsearch:!!Z.netSearch,qaChannel:Z.qaChannel,tempKnowledgeBaseCheck:rn.current},Re=>{ur(W)})}function Xr(_){_.restult==1?ci({url:t,token:e,CSRFToken:a},{queryId:_.queryId},()=>{zt(_.queryId,null)}):s0({url:t,token:e,CSRFToken:a},{restult:1,queryId:_.queryId},()=>{zt(_.queryId,1)})}function cr(_){const E=er(32),O={sessionId:E,label:"\u672A\u547D\u540D\u4F1A\u8BDD",gmtModified:Date.now(),searchConfigDTO:{},filePath:"",configId:"",isNew:!0};w(H=>[{...O,messages:[]},...H]),P(H=>[{id:E,messages:[],...O},...H]),z(E)}function Qr(_){if(_!=null&&_.sessionId&&_.sessionId!==T){T&&dt(T),z(_.sessionId),ve(O=>({...O,sender:"ready"}));const E=Y.find(O=>O.id===_.sessionId);if(E&&E.messages&&E.messages.length>0){const O=[...E.messages].reverse().find(H=>H.istype==="ai");O&&O.recommendQuestion?te(O.recommendQuestion):te([])}else te([])}}const Zr=async _=>new Promise((E,O)=>{go({url:t,token:e,CSRFToken:a},{sessionId:_},H=>{H?(Oe.success("\u5220\u9664\u6210\u529F!"),E(H)):(Oe.error("\u5220\u9664\u5931\u8D25!"),O(H))})}),Jr=async()=>{try{return w([]),$(0),await Pt(1),[]}catch(_){throw Oe.error("\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u5931\u8D25"),_}},en=async(_,E)=>new Promise((O,H)=>{vo({url:t,token:e,CSRFToken:a},{label:E,sessionId:_},W=>{if(W){const ae=Date.now();w(xe=>xe.map(de=>de.sessionId===_?{...de,label:E,gmtModified:ae}:de)),P(xe=>xe.map(de=>de.id===_?{...de,label:E}:de)),Oe.success("\u91CD\u547D\u540D\u6210\u529F!"),O(W)}else Oe.error("\u91CD\u547D\u540D\u5931\u8D25"),H(W)})}),si=_=>{w(E=>{const O=E.filter(H=>H.sessionId!==_);return T===_&&(O.length>0?z(O[0].sessionId):cr()),O})},Ot=(_,E)=>{const O=Date.now();w(H=>H.map(W=>W.sessionId===_?{...W,label:E,gmtModified:O}:W)),P(H=>H.map(W=>W.id===_?{...W,label:E}:W))},Or=_=>{s0({url:t,token:e,CSRFToken:a},{..._,...sr,restult:0},()=>{zt(sr.queryId,0)})},ms=_=>{const E=_.new_name,O=g.data.label;E&&E!==O?g.async_renameConversation(E).then(()=>{g.fn_renameItemInList(E),h(!1)}).catch(()=>{}):h(!1)},ys=_=>{g.async_deleteConversation().then(()=>{g.fn_removeItemFromList(),c(!1)}).catch(()=>{})},tn=(_,E)=>{switch(console.log(_,E),_){case"close_remove":c(!1);break;case"close_rename":h(!1);break;case"ok_rename":ms(E);break;case"ok_remove":ys();break}},Fs=async({url:_,params:E,replacePredataFunction:O})=>{var H,W;try{const ae=await Ct.post(_,E,{headers:{Authorization:e}}),xe=(W=(H=ae==null?void 0:ae.data)==null?void 0:H.data)==null?void 0:W.data;xe&&O(xe)}catch(ae){console.log("error",ae)}},Cs=async _=>{var E;try{const O=await Ct.get(`${Xn()}/index/knowledgeBase/file/getFileStatusByUids?uids=${_.data.uids}`,{headers:{Authorization:e}});return console.log("resslkdjgalsg",O),(E=O==null?void 0:O.data)==null?void 0:E.data}catch{}},Ji=async _=>{try{const E=await Cs({data:{uids:_.uid},config:{url:Xn(),token:e,enableMock:!1}});if(E!=null&&E.length){const O=E[0];if(fi(O.convertedFilePath)==="pdf"&&!O.pdfPages)return Oe.warning("\u6587\u4EF6\u8FD8\u672A\u89E3\u6790\u5B8C\u6210,\u8BF7\u7A0D\u540E\u9884\u89C8");if(O.convertedFilePath)I({..._,parse_url:O.convertedFilePath,pdfPages:O.pdfPages}),B("preview"),C(!0);else return Oe.warning("\u6587\u4EF6\u89E3\u6790\u5931\u8D25")}}catch{}},rn=Qe(!1),Gt=(_,E)=>{var O,H,W,ae,xe,de,Ce,Ve,tt,nt,Re,fe,ge,ft;switch(console.log(`[Event] ${_}`,E),_){case"TempKnowledgeBase":rn.current=E;break;case"reference_file:click":if(E.file_type==="image")return;const re=ye=>{I({...E,file_type:E.type,file_name:E.file,...ye}),B("preview"),C(!0)},Pe=fi((E==null?void 0:E.parse_url)||""),yt=(O=E.metadata)!=null&&O.source?`${Qn}${E.metadata.source}`:E.filePath||E.url||E.convertedFilePath||"",vt=fi(yt),gt=()=>{if(E.uid)Ji(E);else return E.references?void 0:Oe.warning("\u6587\u4EF6\u8FD8\u672A\u89E3\u6790\u5B8C\u6210,\u8BF7\u7A0D\u540E\u9884\u89C8")};if(xo.includes(vt)){const ye=(H=E.metadata)!=null&&H.source?`${Qn}${E.metadata.source}`:E.url||E.convertedFilePath||E.filePath;vt==="pdf"?E.pdfPages?re({parse_url:ye}):gt():re({parse_url:ye})}else Pe==="pdf"?E.pdfPages?re():gt():E.parse_url?re():gt();break;case"conversations:load_more":{b.length<V&&!L&&Pt(F+1);break}case"retrieve-sql-data:pagingation_click":const{page:Ye,pageSize:Yt,fetchUrl:Ft,source:dr,replacePredataFunction:fr}=E;Fs({url:`${t}${Ft}`,replacePredataFunction:fr,params:{pageNo:Ye,pageSize:Yt,convertedFilePath:dr,stream:!1}});break;case"web_referenceFile_title:click":if(!((W=E==null?void 0:E.data)!=null&&W.link))return console.error("\u6CA1\u6709\u7F51\u9875\u5730\u5740");window.open(E.data.link,"_blank");break;case"conversation:item_click":Qr(E);break;case"files:finished_animation_complete":$e([]);break;case"conversation:create":cr();break;case"conversation:new_assistant_change":oe(E.assistantId);break;case"conversations:rename_icon_clicked":p({data:E,async_renameConversation:ye=>en(E.sessionId,ye),fn_renameItemInList:ye=>Ot(E.sessionId,ye)}),h(!0);break;case"conversations:delete_icon_clicked":p({data:E,async_deleteConversation:()=>Zr(E.sessionId),async_refreshConversationList:Jr,fn_removeItemFromList:()=>si(E.sessionId)}),c(!0);break;case"sender:send":Ut(E,E.clearFn);break;case"sender:send_recommandQuestion":{const ye=((E==null?void 0:E.content)??"").toString();if(!ye)break;Ut({content:ye},()=>{});break}case"chatbox:follow_up_question_click":{const ye=((E==null?void 0:E.question)??(E==null?void 0:E.content)??"").toString();if(!ye)break;Ut({content:ye},()=>{});break}case"sender:stop":Se(),Tt&&(Tt.abort(),Tt=null),qt&&(qt(),qt=null),ve(ye=>({...ye,display:"ready",sender:"ready"})),$e([]),Kt==null||Kt();break;case"sender:clear":(ae=E.clearFn)==null||ae.call(E);break;case"sender:configChange":E&&E.all&<(E.all);break;case"sender:action_upload":mt.current&&mt.current.click();break;case"sender:action_history":Wt(!0);break;case"uploaded_file:item_click":break;case"action_copy:click":E&&Zs(E.content,E.event);break;case"chatbox:copy":{let ye=(E==null?void 0:E.content)||"";if(!ye)break;ye=ye.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,"");const ot=async He=>{try{return await navigator.clipboard.writeText(He),Oe.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"),!0}catch{return!1}},it=He=>{const We=document.createElement("textarea");We.value=He,We.style.position="fixed",We.style.opacity="0",document.body.appendChild(We),We.focus(),We.select();try{document.execCommand("copy"),Oe.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch{Oe.error("\u590D\u5236\u5931\u8D25")}document.body.removeChild(We)};ot(ye).then(He=>{He||it(ye)});break}case"chatbox:repeat":console.log(E,"sdkflskdjflksdjfklsdjlfkjsdklfjsdklfjlks"),ai(E);break;case"action_thumbsup":Xr(E);break;case"chatbox:like":Xr({queryId:E==null?void 0:E.queryId,restult:E==null?void 0:E.result});break;case"action_thumbsdown":E.restult===0?ci({url:t,token:e,CSRFToken:a},{queryId:E.queryId},()=>{zt(E.queryId,null)}):(Er(E),Ht(!0));break;case"chatbox:dislike":(E==null?void 0:E.result)===0?ci({url:t,token:e,CSRFToken:a},{queryId:E.queryId},()=>{zt(E.queryId,null)}):(Er({queryId:E==null?void 0:E.queryId}),Ht(!0));break;case"action_retrive_tag":s==null||s("action_retrive_tag",E);break;case"referenceFile_view":s==null||s("referenceFile_view",E);break;case"referenceFile_question":console.log(E,"zhezhhzhzh"),Ji(E.data||E),s==null||s("referenceFile_question",E);break;case"referenceFile_download":s==null||s("referenceFile_download",E);break;case"references:click":case"knowledge_base_view_all:click":{const ye=()=>_==="references:click"?k(q0,{type:"referencelist",data:E,token:e,eventsEmit:s,is_download:at}):k(z0,{fileData:E,token:e}),ot=new CustomEvent("aichat:right_set_content",{detail:{content:k(ye,{})}});window.dispatchEvent(ot);const it=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(it);break}case"knowledge_base_category:click":{if(((xe=E==null?void 0:E.category)==null?void 0:xe.itemType)==="file")return;const ye=()=>k(z0,{fileData:E,token:e}),ot=new CustomEvent("aichat:right_set_content",{detail:{content:k(ye,{})}});window.dispatchEvent(ot);const it=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(it);break}case"retrive_tag:click":{let ye=(E==null?void 0:E.referencesPayloadSingle)||((E==null?void 0:E.fromtype)==="10"&&(E!=null&&E.referenceDoc)?{knowledgeRefs:[E.referenceDoc],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}}:null);if((E==null?void 0:E.fromtype)==="10"&&!ye&&((de=E==null?void 0:E.leaf)==null?void 0:de.id)!=null&&((Ce=ie==null?void 0:ie.messages)!=null&&Ce.length)){const ot=ie.messages;for(let it=ot.length-1;it>=0;it--){const He=ot[it];if((He==null?void 0:He.istype)!=="ai")continue;const We=(He==null?void 0:He.faqReference)??((Ve=He==null?void 0:He.reply)==null?void 0:Ve.faqReference)??(He==null?void 0:He.reference);if(!We)continue;let bt=[];try{const xt=typeof We=="string"?(()=>{const Ds=We.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(Ds)})():We;bt=Array.isArray(xt)?xt:[xt]}catch{continue}if(bt.length===0)continue;const je=String(E.leaf.id);let Ke=bt.findIndex(xt=>String((xt==null?void 0:xt.pk)??(xt==null?void 0:xt.order_num)??(xt==null?void 0:xt.id))===je);if(Ke<0){const xt=Number(je);Number.isInteger(xt)&&xt>=1&&xt<=bt.length&&(Ke=xt-1)}if(Ke<0)continue;const Ee=bt[Ke],Te=Ke+1,pt=Ee.metadata||{},At=Ee.faq_question||pt.sourceFileName||pt.source&&String(pt.source).split("/").pop()||"FAQ",Xt=Ee.folder_path||pt.folder_path||pt.knowledge_base_name||"",oi=Xt?`${Xt} - ${At}`:At,ws=`\u77E5\u8BC6\u5E93${Te}\u540D\uFF1A${oi}`,nn=String(Ee.pk??Ee.order_num??Ee.id??""),t0=typeof Ee.score=="number"?Ee.score:typeof pt.score=="number"?pt.score:0;ye={knowledgeRefs:[{id:nn,file_id:nn,file_name:ws,file_type:"faq",type:"faq",path:"",score:t0,rrf_score:t0,tags:[{id:je,index:Te,image_urls:((tt=E==null?void 0:E.tagInfo)==null?void 0:tt.image_urls)||[],metadata:pt}],source:Ee.folder_path||"",order_num:nn,pk:nn,faq_question:Ee.faq_question,faq_answer:Ee.faq_answer,folder_path:Ee.folder_path,metadata:pt,faqIndex:Te,...Ee}],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};break}}if((E==null?void 0:E.fromtype)==="10"&&ye){const ot=new CustomEvent("aichat:right_set_content",{detail:{content:k(q0,{type:"referencelist",data:ye,token:e,eventsEmit:s,is_download:at})}});window.dispatchEvent(ot);const it=new CustomEvent("aichat:right_set",{detail:{collapsed:!1}});window.dispatchEvent(it)}s==null||s("retrive_tag:click",E);break}case"fileManager:change":{typeof(E==null?void 0:E.setUploadedFiles)=="function"&&(_t.current=E.setUploadedFiles,ir.current=E.removeFile,ct.current=E==null?void 0:E.senderConfig,ar.current=Array.isArray(E==null?void 0:E.uploadedFiles)?E.uploadedFiles:[],Array.isArray(E==null?void 0:E.uploadedFiles)&&zr(E.uploadedFiles),console.log("[DEBUG] fileManager:change \u4E8B\u4EF6\u89E6\u53D1\uFF0CsetUploadedFilesRef \u5DF2\u8BBE\u7F6E",{hasSetUploadedFiles:!!_t.current,uploadedFilesCount:((nt=E==null?void 0:E.uploadedFiles)==null?void 0:nt.length)||0,pendingFilesCount:((Re=E==null?void 0:E.uploadedFiles)==null?void 0:Re.length)||0,hasSenderConfig:!!(E!=null&&E.senderConfig),senderConfig:E==null?void 0:E.senderConfig,upload_number_limit:(fe=E==null?void 0:E.senderConfig)==null?void 0:fe.upload_number_limit,upload_size_limit:(ge=E==null?void 0:E.senderConfig)==null?void 0:ge.upload_size_limit}));break}case"uploaded_file:removeFromTemp":{console.log("[DEBUG] mergedEventsEmit uploaded_file:removeFromTemp \u4E8B\u4EF6",E);const ye=(ft=E==null?void 0:E.file)==null?void 0:ft.uid;if(!ye){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6",E);break}const ot=[...(ie==null?void 0:ie.messages)||[]].reverse().find(He=>He.istype==="user"),it=ot==null?void 0:ot.queryId;U(ye,it);break}case"uploaded_file:remove_batch":break;case"layout:right_change":{if((E==null?void 0:E.collapsed)===!0){const ye=new CustomEvent("aichat:sidebar_set",{detail:{collapsed:!1}});window.dispatchEvent(ye)}break}default:s==null||s(_,E)}},Es=[{key:"conversations",type:"custom",label:"\u5BF9\u8BDD\u5386\u53F2",icon:k(Ro,{size:16}),enabled:!0,component:k(bu,{data:b,assistantList:ee,activedItem:T||"",hasMore:b.length<V,loadingMore:L,sortRules:[{label:"\u5F53\u5929",dayPeriod:1},{label:"3\u5929",dayPeriod:3},{label:"7\u5929",dayPeriod:7},{label:"30\u5929",dayPeriod:30}],eventsEmit:Gt,styles:x.theme})}],e0=Ze.useCallback(()=>k(Su,{eventsEmit:Gt,assistantList:ee,styles:x,selectedId:se,onSelectAssistant:De,productLogo:o==null?void 0:o.productLogo}),[Gt,ee,x,se,o==null?void 0:o.productLogo]),bs={...Ze.useMemo(()=>({AiChatBox:(_,E)=>{var tt,nt,Re,fe;const O=E===(((tt=ie==null?void 0:ie.messages)==null?void 0:tt.length)||0)-1;let H="ready";if(O)if(_.status!==void 0)switch(_.status){case 0:H="thinking";break;case 1:H="processing";break;case 2:H="ready";break;case 3:H="error";break;case 4:H="thinking";break;default:H=Ie.display}else H=Ie.display;let W=[];if(Array.isArray(Q))W=Q;else if(typeof Q=="string")try{W=JSON.parse(Q)||[]}catch{W=[]}const ae=(()=>{var re;const ge=_==null?void 0:_.reference;if(ge){if(typeof ge=="string")try{return JSON.parse(ge),ge}catch{return"[]"}try{return JSON.stringify(ge)}catch{return"[]"}}const ft=(_==null?void 0:_.faqReference)??((re=_==null?void 0:_.reply)==null?void 0:re.faqReference)??void 0;if(!ft)return"[]";try{const Pe=typeof ft=="string"?(()=>{const Ye=ft.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(Ye)})():ft,yt=Array.isArray(Pe)?Pe:[Pe];if(!yt.length)return"[]";const gt={knowledgeRefs:yt.map((Ye,Yt)=>{const Ft=Ye.metadata||{},dr=Ye.faq_question||Ft.sourceFileName||Ft.source&&String(Ft.source).split("/").pop()||"FAQ",fr=Ye.folder_path||Ft.folder_path||Ft.knowledge_base_name||"",ye=fr?`${fr} - ${dr}`:dr,ot=`\u77E5\u8BC6\u5E93${Yt+1}\u540D\uFF1A${ye}`,it=String(Ye.pk??Ye.order_num??Ye.id??""),He=typeof Ye.score=="number"?Ye.score:typeof Ft.score=="number"?Ft.score:0;return{id:it,file_id:it,file_name:ot,file_type:"faq",type:"faq",path:"",score:He,rrf_score:He,tags:[{id:it,index:Yt+1,image_urls:[],metadata:Ft}],source:Ye.folder_path||"",order_num:it,pk:it,faq_question:Ye.faq_question,faq_answer:Ye.faq_answer,folder_path:Ye.folder_path,metadata:Ft,faqIndex:Yt+1,...Ye}}),webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{}};return JSON.stringify(gt)}catch{return"[]"}})(),xe=(()=>{const ge=_==null?void 0:_.webReference;if(!ge)return"[]";if(typeof ge=="string")try{return JSON.parse(ge),ge}catch{return"[]"}try{return JSON.stringify(ge)}catch{return"[]"}})(),de=(()=>{const ge=_==null?void 0:_.graphReference;if(!ge)return"[]";if(typeof ge=="string")try{return JSON.parse(ge),ge}catch{return"[]"}try{return JSON.stringify(ge)}catch{return"[]"}})(),Ce=_==null?void 0:_.databaseReference,Ve=(()=>{var ft,re,Pe;if(_!=null&&_.chainRespTime||(ft=_==null?void 0:_.reply)!=null&&ft.chainRespTime)return(_==null?void 0:_.chainRespTime)??((re=_==null?void 0:_.reply)==null?void 0:re.chainRespTime);const ge=(_==null?void 0:_.chain)||((Pe=_==null?void 0:_.reply)==null?void 0:Pe.chain);if(Array.isArray(ge)&&ge.length>0){const yt=ge.reduce((vt,gt)=>{const Ye=(gt==null?void 0:gt.chainRespTime)??(gt==null?void 0:gt.respTime);return Ye!=null&&Ye>0?vt+Ye:vt},0);return yt>0?yt:void 0}})();return k(r0,{..._,enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",referenceMode:"button",reference:ae,webReference:xe,graphReference:de,faqReference:(_==null?void 0:_.faqReference)??((nt=_==null?void 0:_.reply)==null?void 0:nt.faqReference),databaseReference:Ce,contentType:"stream",displayStatus:H,eventsEmit:Gt,isLast:O&&(_==null?void 0:_.istype)==="ai",followUpQuestions:O&&(_==null?void 0:_.istype)==="ai"?W:[],defaultAnswer:((Re=ie==null?void 0:ie.searchConfigDTO)==null?void 0:Re.defaultAnswer)||"\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u6211\u4EEC\u6CA1\u80FD\u67E5\u5230\u4F60\u8981\u7684\u95EE\u9898*-*",is_download:at,styles:x,enableThoughtChain:!0,chain:_==null?void 0:_.chain,thoughtChainNodes:_==null?void 0:_.thoughtChainNodes,thoughtChainStatus:_==null?void 0:_.status,enableCot:(_==null?void 0:_.enableCot)??((fe=_==null?void 0:_.reply)==null?void 0:fe.enableCot),chainRespTime:Ve},`${(_==null?void 0:_.queryId)||(_==null?void 0:_.id)||E}-${(_==null?void 0:_.istype)||"unknown"}`)},LogoBox:_=>_&&_.LogoBox===null?null:_&&typeof _.LogoBox=="function"?k(_.LogoBox,{}):k("div",{className:"text-2xl w-full text-center font-bold",children:"\u5C0F\u9CB8\u667A\u80FD\u52A9\u624B"}),DisplayLoading:()=>k(Tu,{}),DisplayError:()=>k(zu,{}),AppError:()=>k(qu,{msg:"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25",subMsg:"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),AppLoading:()=>{var _,E;return k(Pu,{title:(_=o==null?void 0:o.appLoadingConfig)==null?void 0:_.title,subtitle:((E=o==null?void 0:o.appLoadingConfig)==null?void 0:E.subtitle)||""})},UserChatBox:(_,E)=>k(r0,{enablePrism:!1,token:e,streamUrl:"/proxy/index/knowledgeBase/file/stream",..._,referenceMode:"button",contentType:"plainText",isUser:!0,displayStatus:"ready",eventsEmit:Gt,styles:x,fileManagerData:he,currentFiles:_==null?void 0:_.currentFiles},`${(_==null?void 0:_.queryId)||(_==null?void 0:_.id)||E}-user`),WelcomeComponent:e0}),[e0,ie,Ie.display,Gt,x,at,he]),...o.CustomComponents||{}};Le(()=>{Je(_=>{const E=Array.isArray(_.switchs)?_.switchs.map(O=>O.name==="reasoning"?{...O,enabled:!0}:O):[];return{..._,switchs:E}})},[]);const As=qe(()=>he.uploadedFiles||[],[he]),{FileDisplayTools:Bs}=fo({fileManagerData:{uploadedFiles:As},styles:x,eventsEmit:Gt});return k($o,{locale:f,children:X("div",{style:{height:"100%",minWidth:"1116px",overflow:"hidden"},children:[k("input",{ref:mt,type:"file",multiple:!0,accept:"image/*,.pdf,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.txt,.md,.json,.csv,.zip,.rar,.7z,.ofd",style:{display:"none"},onChange:_=>{const E=_.target.files,O=q.current;if(E&&E.length>0){console.log("[DEBUG] handleFileSelect \u89E6\u53D1",{filesCount:E.length,hasSetUploadedFilesRef:!!_t.current,hasSenderConfig:!!ct.current,dynamicSenderConfig:Ne,dynamicSenderConfigKeys:Ne?Object.keys(Ne):[],senderConfigRef:ct.current,senderConfigRefKeys:ct.current?Object.keys(ct.current):[]});const H=Array.from(E);let W=ct.current;(!W||W.upload_size_limit===void 0&&W.upload_number_limit===void 0&&(!W.upload_file_type_limit||W.upload_file_type_limit.length===0))&&(W=Ne);const ae=ar.current||[];console.log("[DEBUG] \u9A8C\u8BC1\u914D\u7F6E\u68C0\u67E5",{configSource:W,upload_number_limit:W==null?void 0:W.upload_number_limit,upload_size_limit:W==null?void 0:W.upload_size_limit,existingFilesCount:ae.length,newFilesCount:H.length});const xe=W&&(W.upload_size_limit!==void 0||W.upload_number_limit!==void 0&&W.upload_number_limit>0||W.upload_file_type_limit&&W.upload_file_type_limit.length>0);if(console.log("[DEBUG] \u914D\u7F6E\u68C0\u67E5\u7ED3\u679C",{hasUploadLimitConfig:xe,upload_number_limit:W==null?void 0:W.upload_number_limit,upload_size_limit:W==null?void 0:W.upload_size_limit,upload_file_type_limit:W==null?void 0:W.upload_file_type_limit}),xe){const de={upload_size_limit:W.upload_size_limit,upload_number_limit:W.upload_number_limit,upload_file_type_limit:W.upload_file_type_limit,upload_limit_message:W.upload_limit_message};console.log("[DEBUG] \u6267\u884C\u6587\u4EF6\u9A8C\u8BC1",{uploadConfig:de,existingFilesCount:ae.length,newFilesCount:H.length,totalCount:ae.length+H.length});const Ce=Ps(H,ae,de);if(console.log("[DEBUG] \u9A8C\u8BC1\u7ED3\u679C",{valid:Ce.valid,errors:Ce.errors,rejectedFilesCount:Ce.rejectedFiles.length}),!Ce.valid){Ts(Ce);const Ve=H.filter(tt=>!Ce.rejectedFiles.includes(tt));if(Ve.length===0){mt.current&&(mt.current.value="");return}H.splice(0,H.length,...Ve)}}if(_t.current){const de=H.map(Ce=>({file:Ce,type:Ce.type.startsWith("image/")?"image":"document",status:"pending",name:Ce.name}));console.log("[DEBUG] \u901A\u8FC7 setUploadedFilesRef \u8BBE\u7F6E\u6587\u4EF6",de),_t.current(de)}else console.warn("[DEBUG] setUploadedFilesRef \u672A\u8BBE\u7F6E\uFF0C\u5EF6\u8FDF\u91CD\u8BD5"),setTimeout(()=>{if(q.current===O)if(_t.current){const de=H.map(Ce=>({file:Ce,type:Ce.type.startsWith("image/")?"image":"document",status:"pending",name:Ce.name}));console.log("[DEBUG] \u5EF6\u8FDF\u540E\u901A\u8FC7 setUploadedFilesRef \u8BBE\u7F6E\u6587\u4EF6",de),_t.current(de)}else console.error("[DEBUG] \u5EF6\u8FDF\u540E setUploadedFilesRef \u4ECD\u672A\u8BBE\u7F6E")},100)}mt.current&&(mt.current.value="")}}),k(n,{...o,status:Ie,chatData:ie,sidebar:Es,recommandQuestions:[],eventsEmit:Gt,styles:x,senderConfig:Ne,fileUploadStatus:rt,CustomComponents:bs,activeSessionId:T,scrollOld:l,rightbarInitialCollapsed:R,rightbarWidth:"400px",onRightbarChange:_=>{D(_)},locale:f,messages:u,disclaimer:o.disclaimer??we.disclaimer,chatHeader:{title:(ie==null?void 0:ie.label)||we.chatHeader.newConversation,tools:Bs}},T!=null?String(T):"no-session"),k(po,{open:br,feedBackList:Nt,setOpen:Ht,handleConfirm:Or}),k(Ml,{isModalOpen:y,handleOk:tn,handleCancel:()=>tn("close_rename"),data:(g==null?void 0:g.data)||{}}),k(Ll,{isModalOpen:d,handleOk:tn,handleCancel:()=>tn("close_remove"),data:(g==null?void 0:g.data)||{}}),k(ei,{drawer:{styles:{body:{padding:0},header:{display:"none"}}},children:k(Aa,{autoFocus:!1,onClose:()=>C(!1),open:v,width:A==="graphPreview"?"100%":720,className:"overflow-x-hidden",destroyOnClose:!0,children:A==="preview"&&k(cs,{curFileInfo:S,onClose:C,token:e})})})]})})}}var fn={exports:{}};function Xl(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pn={exports:{}};const Ql={},Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Jl=Us(Zl);var ec=pn.exports,O0;function _e(){return O0||(O0=1,(function(n,r){(function(e,t){n.exports=t()})(ec,function(){var e=e||(function(t,i){var a;if(typeof window<"u"&&window.crypto&&(a=window.crypto),typeof self<"u"&&self.crypto&&(a=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window<"u"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof li<"u"&&li.crypto&&(a=li.crypto),!a&&typeof Xl=="function")try{a=Jl}catch{}var s=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||(function(){function p(){}return function(v){var C;return p.prototype=v,C=new p,p.prototype=null,C}})(),f={},u=f.lib={},o=u.Base=(function(){return{extend:function(p){var v=l(this);return p&&v.mixIn(p),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var p=this.extend();return p.init.apply(p,arguments),p},init:function(){},mixIn:function(p){for(var v in p)p.hasOwnProperty(v)&&(this[v]=p[v]);p.hasOwnProperty("toString")&&(this.toString=p.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),m=u.WordArray=o.extend({init:function(p,v){p=this.words=p||[],v!=i?this.sigBytes=v:this.sigBytes=p.length*4},toString:function(p){return(p||y).stringify(this)},concat:function(p){var v=this.words,C=p.words,A=this.sigBytes,B=p.sigBytes;if(this.clamp(),A%4)for(var S=0;S<B;S++){var I=C[S>>>2]>>>24-S%4*8&255;v[A+S>>>2]|=I<<24-(A+S)%4*8}else for(var R=0;R<B;R+=4)v[A+R>>>2]=C[R>>>2];return this.sigBytes+=B,this},clamp:function(){var p=this.words,v=this.sigBytes;p[v>>>2]&=4294967295<<32-v%4*8,p.length=t.ceil(v/4)},clone:function(){var p=o.clone.call(this);return p.words=this.words.slice(0),p},random:function(p){for(var v=[],C=0;C<p;C+=4)v.push(s());return new m.init(v,p)}}),x=f.enc={},y=x.Hex={stringify:function(p){for(var v=p.words,C=p.sigBytes,A=[],B=0;B<C;B++){var S=v[B>>>2]>>>24-B%4*8&255;A.push((S>>>4).toString(16)),A.push((S&15).toString(16))}return A.join("")},parse:function(p){for(var v=p.length,C=[],A=0;A<v;A+=2)C[A>>>3]|=parseInt(p.substr(A,2),16)<<24-A%8*4;return new m.init(C,v/2)}},h=x.Latin1={stringify:function(p){for(var v=p.words,C=p.sigBytes,A=[],B=0;B<C;B++){var S=v[B>>>2]>>>24-B%4*8&255;A.push(String.fromCharCode(S))}return A.join("")},parse:function(p){for(var v=p.length,C=[],A=0;A<v;A++)C[A>>>2]|=(p.charCodeAt(A)&255)<<24-A%4*8;return new m.init(C,v)}},d=x.Utf8={stringify:function(p){try{return decodeURIComponent(escape(h.stringify(p)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(p){return h.parse(unescape(encodeURIComponent(p)))}},c=u.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new m.init,this._nDataBytes=0},_append:function(p){typeof p=="string"&&(p=d.parse(p)),this._data.concat(p),this._nDataBytes+=p.sigBytes},_process:function(p){var v,C=this._data,A=C.words,B=C.sigBytes,S=this.blockSize,I=S*4,R=B/I;p?R=t.ceil(R):R=t.max((R|0)-this._minBufferSize,0);var D=R*S,b=t.min(D*4,B);if(D){for(var w=0;w<D;w+=S)this._doProcessBlock(A,w);v=A.splice(0,D),C.sigBytes-=b}return new m.init(v,b)},clone:function(){var p=o.clone.call(this);return p._data=this._data.clone(),p},_minBufferSize:0});u.Hasher=c.extend({cfg:o.extend(),init:function(p){this.cfg=this.cfg.extend(p),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(p){return this._append(p),this._process(),this},finalize:function(p){p&&this._append(p);var v=this._doFinalize();return v},blockSize:16,_createHelper:function(p){return function(v,C){return new p.init(C).finalize(v)}},_createHmacHelper:function(p){return function(v,C){return new g.HMAC.init(p,C).finalize(v)}}});var g=f.algo={};return f})(Math);return e})})(pn)),pn.exports}var xn={exports:{}},tc=xn.exports,M0;function ii(){return M0||(M0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(tc,function(e){return(function(t){var i=e,a=i.lib,s=a.Base,l=a.WordArray,f=i.x64={};f.Word=s.extend({init:function(u,o){this.high=u,this.low=o}}),f.WordArray=s.extend({init:function(u,o){u=this.words=u||[],o!=t?this.sigBytes=o:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,o=u.length,m=[],x=0;x<o;x++){var y=u[x];m.push(y.high),m.push(y.low)}return l.create(m,this.sigBytes)},clone:function(){for(var u=s.clone.call(this),o=u.words=this.words.slice(0),m=o.length,x=0;x<m;x++)o[x]=o[x].clone();return u}})})(),e})})(xn)),xn.exports}var hn={exports:{}},rc=hn.exports,L0;function nc(){return L0||(L0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(rc,function(e){return(function(){if(typeof ArrayBuffer=="function"){var t=e,i=t.lib,a=i.WordArray,s=a.init,l=a.init=function(f){if(f instanceof ArrayBuffer&&(f=new Uint8Array(f)),(f instanceof Int8Array||typeof Uint8ClampedArray<"u"&&f instanceof Uint8ClampedArray||f instanceof Int16Array||f instanceof Uint16Array||f instanceof Int32Array||f instanceof Uint32Array||f instanceof Float32Array||f instanceof Float64Array)&&(f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength)),f instanceof Uint8Array){for(var u=f.byteLength,o=[],m=0;m<u;m++)o[m>>>2]|=f[m]<<24-m%4*8;s.call(this,o,u)}else s.apply(this,arguments)};l.prototype=a}})(),e.lib.WordArray})})(hn)),hn.exports}var gn={exports:{}},ic=gn.exports,$0;function ac(){return $0||($0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(ic,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=t.enc;s.Utf16=s.Utf16BE={stringify:function(f){for(var u=f.words,o=f.sigBytes,m=[],x=0;x<o;x+=2){var y=u[x>>>2]>>>16-x%4*8&65535;m.push(String.fromCharCode(y))}return m.join("")},parse:function(f){for(var u=f.length,o=[],m=0;m<u;m++)o[m>>>1]|=f.charCodeAt(m)<<16-m%2*16;return a.create(o,u*2)}},s.Utf16LE={stringify:function(f){for(var u=f.words,o=f.sigBytes,m=[],x=0;x<o;x+=2){var y=l(u[x>>>2]>>>16-x%4*8&65535);m.push(String.fromCharCode(y))}return m.join("")},parse:function(f){for(var u=f.length,o=[],m=0;m<u;m++)o[m>>>1]|=l(f.charCodeAt(m)<<16-m%2*16);return a.create(o,u*2)}};function l(f){return f<<8&4278255360|f>>>8&16711935}})(),e.enc.Utf16})})(gn)),gn.exports}var vn={exports:{}},sc=vn.exports,V0;function yr(){return V0||(V0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(sc,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=t.enc;s.Base64={stringify:function(f){var u=f.words,o=f.sigBytes,m=this._map;f.clamp();for(var x=[],y=0;y<o;y+=3)for(var h=u[y>>>2]>>>24-y%4*8&255,d=u[y+1>>>2]>>>24-(y+1)%4*8&255,c=u[y+2>>>2]>>>24-(y+2)%4*8&255,g=h<<16|d<<8|c,p=0;p<4&&y+p*.75<o;p++)x.push(m.charAt(g>>>6*(3-p)&63));var v=m.charAt(64);if(v)for(;x.length%4;)x.push(v);return x.join("")},parse:function(f){var u=f.length,o=this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var x=0;x<o.length;x++)m[o.charCodeAt(x)]=x}var y=o.charAt(64);if(y){var h=f.indexOf(y);h!==-1&&(u=h)}return l(f,u,m)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(f,u,o){for(var m=[],x=0,y=0;y<u;y++)if(y%4){var h=o[f.charCodeAt(y-1)]<<y%4*2,d=o[f.charCodeAt(y)]>>>6-y%4*2,c=h|d;m[x>>>2]|=c<<24-x%4*8,x++}return a.create(m,x)}})(),e.enc.Base64})})(vn)),vn.exports}var mn={exports:{}},oc=mn.exports,U0;function uc(){return U0||(U0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(oc,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=t.enc;s.Base64url={stringify:function(f,u){u===void 0&&(u=!0);var o=f.words,m=f.sigBytes,x=u?this._safe_map:this._map;f.clamp();for(var y=[],h=0;h<m;h+=3)for(var d=o[h>>>2]>>>24-h%4*8&255,c=o[h+1>>>2]>>>24-(h+1)%4*8&255,g=o[h+2>>>2]>>>24-(h+2)%4*8&255,p=d<<16|c<<8|g,v=0;v<4&&h+v*.75<m;v++)y.push(x.charAt(p>>>6*(3-v)&63));var C=x.charAt(64);if(C)for(;y.length%4;)y.push(C);return y.join("")},parse:function(f,u){u===void 0&&(u=!0);var o=f.length,m=u?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var y=0;y<m.length;y++)x[m.charCodeAt(y)]=y}var h=m.charAt(64);if(h){var d=f.indexOf(h);d!==-1&&(o=d)}return l(f,o,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(f,u,o){for(var m=[],x=0,y=0;y<u;y++)if(y%4){var h=o[f.charCodeAt(y-1)]<<y%4*2,d=o[f.charCodeAt(y)]>>>6-y%4*2,c=h|d;m[x>>>2]|=c<<24-x%4*8,x++}return a.create(m,x)}})(),e.enc.Base64url})})(mn)),mn.exports}var yn={exports:{}},lc=yn.exports,H0;function Fr(){return H0||(H0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(lc,function(e){return(function(t){var i=e,a=i.lib,s=a.WordArray,l=a.Hasher,f=i.algo,u=[];(function(){for(var d=0;d<64;d++)u[d]=t.abs(t.sin(d+1))*4294967296|0})();var o=f.MD5=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(d,c){for(var g=0;g<16;g++){var p=c+g,v=d[p];d[p]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}var C=this._hash.words,A=d[c+0],B=d[c+1],S=d[c+2],I=d[c+3],R=d[c+4],D=d[c+5],b=d[c+6],w=d[c+7],F=d[c+8],N=d[c+9],M=d[c+10],V=d[c+11],$=d[c+12],L=d[c+13],G=d[c+14],Y=d[c+15],P=C[0],T=C[1],z=C[2],q=C[3];P=m(P,T,z,q,A,7,u[0]),q=m(q,P,T,z,B,12,u[1]),z=m(z,q,P,T,S,17,u[2]),T=m(T,z,q,P,I,22,u[3]),P=m(P,T,z,q,R,7,u[4]),q=m(q,P,T,z,D,12,u[5]),z=m(z,q,P,T,b,17,u[6]),T=m(T,z,q,P,w,22,u[7]),P=m(P,T,z,q,F,7,u[8]),q=m(q,P,T,z,N,12,u[9]),z=m(z,q,P,T,M,17,u[10]),T=m(T,z,q,P,V,22,u[11]),P=m(P,T,z,q,$,7,u[12]),q=m(q,P,T,z,L,12,u[13]),z=m(z,q,P,T,G,17,u[14]),T=m(T,z,q,P,Y,22,u[15]),P=x(P,T,z,q,B,5,u[16]),q=x(q,P,T,z,b,9,u[17]),z=x(z,q,P,T,V,14,u[18]),T=x(T,z,q,P,A,20,u[19]),P=x(P,T,z,q,D,5,u[20]),q=x(q,P,T,z,M,9,u[21]),z=x(z,q,P,T,Y,14,u[22]),T=x(T,z,q,P,R,20,u[23]),P=x(P,T,z,q,N,5,u[24]),q=x(q,P,T,z,G,9,u[25]),z=x(z,q,P,T,I,14,u[26]),T=x(T,z,q,P,F,20,u[27]),P=x(P,T,z,q,L,5,u[28]),q=x(q,P,T,z,S,9,u[29]),z=x(z,q,P,T,w,14,u[30]),T=x(T,z,q,P,$,20,u[31]),P=y(P,T,z,q,D,4,u[32]),q=y(q,P,T,z,F,11,u[33]),z=y(z,q,P,T,V,16,u[34]),T=y(T,z,q,P,G,23,u[35]),P=y(P,T,z,q,B,4,u[36]),q=y(q,P,T,z,R,11,u[37]),z=y(z,q,P,T,w,16,u[38]),T=y(T,z,q,P,M,23,u[39]),P=y(P,T,z,q,L,4,u[40]),q=y(q,P,T,z,A,11,u[41]),z=y(z,q,P,T,I,16,u[42]),T=y(T,z,q,P,b,23,u[43]),P=y(P,T,z,q,N,4,u[44]),q=y(q,P,T,z,$,11,u[45]),z=y(z,q,P,T,Y,16,u[46]),T=y(T,z,q,P,S,23,u[47]),P=h(P,T,z,q,A,6,u[48]),q=h(q,P,T,z,w,10,u[49]),z=h(z,q,P,T,G,15,u[50]),T=h(T,z,q,P,D,21,u[51]),P=h(P,T,z,q,$,6,u[52]),q=h(q,P,T,z,I,10,u[53]),z=h(z,q,P,T,M,15,u[54]),T=h(T,z,q,P,B,21,u[55]),P=h(P,T,z,q,F,6,u[56]),q=h(q,P,T,z,Y,10,u[57]),z=h(z,q,P,T,b,15,u[58]),T=h(T,z,q,P,L,21,u[59]),P=h(P,T,z,q,R,6,u[60]),q=h(q,P,T,z,V,10,u[61]),z=h(z,q,P,T,S,15,u[62]),T=h(T,z,q,P,N,21,u[63]),C[0]=C[0]+P|0,C[1]=C[1]+T|0,C[2]=C[2]+z|0,C[3]=C[3]+q|0},_doFinalize:function(){var d=this._data,c=d.words,g=this._nDataBytes*8,p=d.sigBytes*8;c[p>>>5]|=128<<24-p%32;var v=t.floor(g/4294967296),C=g;c[(p+64>>>9<<4)+15]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,c[(p+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,d.sigBytes=(c.length+1)*4,this._process();for(var A=this._hash,B=A.words,S=0;S<4;S++){var I=B[S];B[S]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return A},clone:function(){var d=l.clone.call(this);return d._hash=this._hash.clone(),d}});function m(d,c,g,p,v,C,A){var B=d+(c&g|~c&p)+v+A;return(B<<C|B>>>32-C)+c}function x(d,c,g,p,v,C,A){var B=d+(c&p|g&~p)+v+A;return(B<<C|B>>>32-C)+c}function y(d,c,g,p,v,C,A){var B=d+(c^g^p)+v+A;return(B<<C|B>>>32-C)+c}function h(d,c,g,p,v,C,A){var B=d+(g^(c|~p))+v+A;return(B<<C|B>>>32-C)+c}i.MD5=l._createHelper(o),i.HmacMD5=l._createHmacHelper(o)})(Math),e.MD5})})(yn)),yn.exports}var Fn={exports:{}},cc=Fn.exports,W0;function fs(){return W0||(W0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(cc,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=i.Hasher,l=t.algo,f=[],u=l.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,m){for(var x=this._hash.words,y=x[0],h=x[1],d=x[2],c=x[3],g=x[4],p=0;p<80;p++){if(p<16)f[p]=o[m+p]|0;else{var v=f[p-3]^f[p-8]^f[p-14]^f[p-16];f[p]=v<<1|v>>>31}var C=(y<<5|y>>>27)+g+f[p];p<20?C+=(h&d|~h&c)+1518500249:p<40?C+=(h^d^c)+1859775393:p<60?C+=(h&d|h&c|d&c)-1894007588:C+=(h^d^c)-899497514,g=c,c=d,d=h<<30|h>>>2,h=y,y=C}x[0]=x[0]+y|0,x[1]=x[1]+h|0,x[2]=x[2]+d|0,x[3]=x[3]+c|0,x[4]=x[4]+g|0},_doFinalize:function(){var o=this._data,m=o.words,x=this._nDataBytes*8,y=o.sigBytes*8;return m[y>>>5]|=128<<24-y%32,m[(y+64>>>9<<4)+14]=Math.floor(x/4294967296),m[(y+64>>>9<<4)+15]=x,o.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var o=s.clone.call(this);return o._hash=this._hash.clone(),o}});t.SHA1=s._createHelper(u),t.HmacSHA1=s._createHmacHelper(u)})(),e.SHA1})})(Fn)),Fn.exports}var Cn={exports:{}},dc=Cn.exports,j0;function Yi(){return j0||(j0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(dc,function(e){return(function(t){var i=e,a=i.lib,s=a.WordArray,l=a.Hasher,f=i.algo,u=[],o=[];(function(){function y(g){for(var p=t.sqrt(g),v=2;v<=p;v++)if(!(g%v))return!1;return!0}function h(g){return(g-(g|0))*4294967296|0}for(var d=2,c=0;c<64;)y(d)&&(c<8&&(u[c]=h(t.pow(d,1/2))),o[c]=h(t.pow(d,1/3)),c++),d++})();var m=[],x=f.SHA256=l.extend({_doReset:function(){this._hash=new s.init(u.slice(0))},_doProcessBlock:function(y,h){for(var d=this._hash.words,c=d[0],g=d[1],p=d[2],v=d[3],C=d[4],A=d[5],B=d[6],S=d[7],I=0;I<64;I++){if(I<16)m[I]=y[h+I]|0;else{var R=m[I-15],D=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,b=m[I-2],w=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;m[I]=D+m[I-7]+w+m[I-16]}var F=C&A^~C&B,N=c&g^c&p^g&p,M=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),V=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),$=S+V+F+o[I]+m[I],L=M+N;S=B,B=A,A=C,C=v+$|0,v=p,p=g,g=c,c=$+L|0}d[0]=d[0]+c|0,d[1]=d[1]+g|0,d[2]=d[2]+p|0,d[3]=d[3]+v|0,d[4]=d[4]+C|0,d[5]=d[5]+A|0,d[6]=d[6]+B|0,d[7]=d[7]+S|0},_doFinalize:function(){var y=this._data,h=y.words,d=this._nDataBytes*8,c=y.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=t.floor(d/4294967296),h[(c+64>>>9<<4)+15]=d,y.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var y=l.clone.call(this);return y._hash=this._hash.clone(),y}});i.SHA256=l._createHelper(x),i.HmacSHA256=l._createHmacHelper(x)})(Math),e.SHA256})})(Cn)),Cn.exports}var En={exports:{}},fc=En.exports,K0;function pc(){return K0||(K0=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),Yi())})(fc,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=t.algo,l=s.SHA256,f=s.SHA224=l.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=l._doFinalize.call(this);return u.sigBytes-=4,u}});t.SHA224=l._createHelper(f),t.HmacSHA224=l._createHmacHelper(f)})(),e.SHA224})})(En)),En.exports}var bn={exports:{}},xc=bn.exports,G0;function ps(){return G0||(G0=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ii())})(xc,function(e){return(function(){var t=e,i=t.lib,a=i.Hasher,s=t.x64,l=s.Word,f=s.WordArray,u=t.algo;function o(){return l.create.apply(l,arguments)}var m=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],x=[];(function(){for(var h=0;h<80;h++)x[h]=o()})();var y=u.SHA512=a.extend({_doReset:function(){this._hash=new f.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(h,d){for(var c=this._hash.words,g=c[0],p=c[1],v=c[2],C=c[3],A=c[4],B=c[5],S=c[6],I=c[7],R=g.high,D=g.low,b=p.high,w=p.low,F=v.high,N=v.low,M=C.high,V=C.low,$=A.high,L=A.low,G=B.high,Y=B.low,P=S.high,T=S.low,z=I.high,q=I.low,Q=R,te=D,ee=b,ne=w,ce=F,oe=N,Ie=M,ve=V,pe=$,we=L,Xe=G,Ne=Y,Je=P,rt=T,$e=z,ue=q,U=0;U<80;U++){var me,Se,be=x[U];if(U<16)Se=be.high=h[d+U*2]|0,me=be.low=h[d+U*2+1]|0;else{var et=x[U-15],K=et.high,he=et.low,se=(K>>>1|he<<31)^(K>>>8|he<<24)^K>>>7,De=(he>>>1|K<<31)^(he>>>8|K<<24)^(he>>>7|K<<25),Z=x[U-2],lt=Z.high,Me=Z.low,_t=(lt>>>19|Me<<13)^(lt<<3|Me>>>29)^lt>>>6,ir=(Me>>>19|lt<<13)^(Me<<3|lt>>>29)^(Me>>>6|lt<<26),mt=x[U-7],ct=mt.high,ar=mt.low,Cr=x[U-16],zr=Cr.high,sr=Cr.low;me=De+ar,Se=se+ct+(me>>>0<De>>>0?1:0),me=me+ir,Se=Se+_t+(me>>>0<ir>>>0?1:0),me=me+sr,Se=Se+zr+(me>>>0<sr>>>0?1:0),be.high=Se,be.low=me}var Er=pe&Xe^~pe&Je,br=we&Ne^~we&rt,Ht=Q&ee^Q&ce^ee&ce,Nt=te&ne^te&oe^ne&oe,St=(Q>>>28|te<<4)^(Q<<30|te>>>2)^(Q<<25|te>>>7),$t=(te>>>28|Q<<4)^(te<<30|Q>>>2)^(te<<25|Q>>>7),Wt=(pe>>>14|we<<18)^(pe>>>18|we<<14)^(pe<<23|we>>>9),or=(we>>>14|pe<<18)^(we>>>18|pe<<14)^(we<<23|pe>>>9),jt=m[U],Ar=jt.high,Kt=jt.low,dt=ue+or,Ge=$e+Wt+(dt>>>0<ue>>>0?1:0),dt=dt+br,Ge=Ge+Er+(dt>>>0<br>>>0?1:0),dt=dt+Kt,Ge=Ge+Ar+(dt>>>0<Kt>>>0?1:0),dt=dt+me,Ge=Ge+Se+(dt>>>0<me>>>0?1:0),ie=$t+Nt,at=St+Ht+(ie>>>0<$t>>>0?1:0);$e=Je,ue=rt,Je=Xe,rt=Ne,Xe=pe,Ne=we,we=ve+dt|0,pe=Ie+Ge+(we>>>0<ve>>>0?1:0)|0,Ie=ce,ve=oe,ce=ee,oe=ne,ee=Q,ne=te,te=dt+ie|0,Q=Ge+at+(te>>>0<dt>>>0?1:0)|0}D=g.low=D+te,g.high=R+Q+(D>>>0<te>>>0?1:0),w=p.low=w+ne,p.high=b+ee+(w>>>0<ne>>>0?1:0),N=v.low=N+oe,v.high=F+ce+(N>>>0<oe>>>0?1:0),V=C.low=V+ve,C.high=M+Ie+(V>>>0<ve>>>0?1:0),L=A.low=L+we,A.high=$+pe+(L>>>0<we>>>0?1:0),Y=B.low=Y+Ne,B.high=G+Xe+(Y>>>0<Ne>>>0?1:0),T=S.low=T+rt,S.high=P+Je+(T>>>0<rt>>>0?1:0),q=I.low=q+ue,I.high=z+$e+(q>>>0<ue>>>0?1:0)},_doFinalize:function(){var h=this._data,d=h.words,c=this._nDataBytes*8,g=h.sigBytes*8;d[g>>>5]|=128<<24-g%32,d[(g+128>>>10<<5)+30]=Math.floor(c/4294967296),d[(g+128>>>10<<5)+31]=c,h.sigBytes=d.length*4,this._process();var p=this._hash.toX32();return p},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h},blockSize:1024/32});t.SHA512=a._createHelper(y),t.HmacSHA512=a._createHmacHelper(y)})(),e.SHA512})})(bn)),bn.exports}var An={exports:{}},hc=An.exports,Y0;function gc(){return Y0||(Y0=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ii(),ps())})(hc,function(e){return(function(){var t=e,i=t.x64,a=i.Word,s=i.WordArray,l=t.algo,f=l.SHA512,u=l.SHA384=f.extend({_doReset:function(){this._hash=new s.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var o=f._doFinalize.call(this);return o.sigBytes-=16,o}});t.SHA384=f._createHelper(u),t.HmacSHA384=f._createHmacHelper(u)})(),e.SHA384})})(An)),An.exports}var Bn={exports:{}},vc=Bn.exports,X0;function mc(){return X0||(X0=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ii())})(vc,function(e){return(function(t){var i=e,a=i.lib,s=a.WordArray,l=a.Hasher,f=i.x64,u=f.Word,o=i.algo,m=[],x=[],y=[];(function(){for(var c=1,g=0,p=0;p<24;p++){m[c+5*g]=(p+1)*(p+2)/2%64;var v=g%5,C=(2*c+3*g)%5;c=v,g=C}for(var c=0;c<5;c++)for(var g=0;g<5;g++)x[c+5*g]=g+(2*c+3*g)%5*5;for(var A=1,B=0;B<24;B++){for(var S=0,I=0,R=0;R<7;R++){if(A&1){var D=(1<<R)-1;D<32?I^=1<<D:S^=1<<D-32}A&128?A=A<<1^113:A<<=1}y[B]=u.create(S,I)}})();var h=[];(function(){for(var c=0;c<25;c++)h[c]=u.create()})();var d=o.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var c=this._state=[],g=0;g<25;g++)c[g]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(c,g){for(var p=this._state,v=this.blockSize/2,C=0;C<v;C++){var A=c[g+2*C],B=c[g+2*C+1];A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360;var S=p[C];S.high^=B,S.low^=A}for(var I=0;I<24;I++){for(var R=0;R<5;R++){for(var D=0,b=0,w=0;w<5;w++){var S=p[R+5*w];D^=S.high,b^=S.low}var F=h[R];F.high=D,F.low=b}for(var R=0;R<5;R++)for(var N=h[(R+4)%5],M=h[(R+1)%5],V=M.high,$=M.low,D=N.high^(V<<1|$>>>31),b=N.low^($<<1|V>>>31),w=0;w<5;w++){var S=p[R+5*w];S.high^=D,S.low^=b}for(var L=1;L<25;L++){var D,b,S=p[L],G=S.high,Y=S.low,P=m[L];P<32?(D=G<<P|Y>>>32-P,b=Y<<P|G>>>32-P):(D=Y<<P-32|G>>>64-P,b=G<<P-32|Y>>>64-P);var T=h[x[L]];T.high=D,T.low=b}var z=h[0],q=p[0];z.high=q.high,z.low=q.low;for(var R=0;R<5;R++)for(var w=0;w<5;w++){var L=R+5*w,S=p[L],Q=h[L],te=h[(R+1)%5+5*w],ee=h[(R+2)%5+5*w];S.high=Q.high^~te.high&ee.high,S.low=Q.low^~te.low&ee.low}var S=p[0],ne=y[I];S.high^=ne.high,S.low^=ne.low}},_doFinalize:function(){var c=this._data,g=c.words;this._nDataBytes*8;var p=c.sigBytes*8,v=this.blockSize*32;g[p>>>5]|=1<<24-p%32,g[(t.ceil((p+1)/v)*v>>>5)-1]|=128,c.sigBytes=g.length*4,this._process();for(var C=this._state,A=this.cfg.outputLength/8,B=A/8,S=[],I=0;I<B;I++){var R=C[I],D=R.high,b=R.low;D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,S.push(b),S.push(D)}return new s.init(S,A)},clone:function(){for(var c=l.clone.call(this),g=c._state=this._state.slice(0),p=0;p<25;p++)g[p]=g[p].clone();return c}});i.SHA3=l._createHelper(d),i.HmacSHA3=l._createHmacHelper(d)})(Math),e.SHA3})})(Bn)),Bn.exports}var wn={exports:{}},yc=wn.exports,Q0;function Fc(){return Q0||(Q0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(yc,function(e){/** @preserve
|
|
179
|
+
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
180
|
+
|
|
181
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
182
|
+
|
|
183
|
+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
184
|
+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
185
|
+
|
|
186
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
187
|
+
*/return(function(t){var i=e,a=i.lib,s=a.WordArray,l=a.Hasher,f=i.algo,u=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),m=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),x=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=s.create([0,1518500249,1859775393,2400959708,2840853838]),h=s.create([1352829926,1548603684,1836072691,2053994217,0]),d=f.RIPEMD160=l.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(B,S){for(var I=0;I<16;I++){var R=S+I,D=B[R];B[R]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var b=this._hash.words,w=y.words,F=h.words,N=u.words,M=o.words,V=m.words,$=x.words,L,G,Y,P,T,z,q,Q,te,ee;z=L=b[0],q=G=b[1],Q=Y=b[2],te=P=b[3],ee=T=b[4];for(var ne,I=0;I<80;I+=1)ne=L+B[S+N[I]]|0,I<16?ne+=c(G,Y,P)+w[0]:I<32?ne+=g(G,Y,P)+w[1]:I<48?ne+=p(G,Y,P)+w[2]:I<64?ne+=v(G,Y,P)+w[3]:ne+=C(G,Y,P)+w[4],ne=ne|0,ne=A(ne,V[I]),ne=ne+T|0,L=T,T=P,P=A(Y,10),Y=G,G=ne,ne=z+B[S+M[I]]|0,I<16?ne+=C(q,Q,te)+F[0]:I<32?ne+=v(q,Q,te)+F[1]:I<48?ne+=p(q,Q,te)+F[2]:I<64?ne+=g(q,Q,te)+F[3]:ne+=c(q,Q,te)+F[4],ne=ne|0,ne=A(ne,$[I]),ne=ne+ee|0,z=ee,ee=te,te=A(Q,10),Q=q,q=ne;ne=b[1]+Y+te|0,b[1]=b[2]+P+ee|0,b[2]=b[3]+T+z|0,b[3]=b[4]+L+q|0,b[4]=b[0]+G+Q|0,b[0]=ne},_doFinalize:function(){var B=this._data,S=B.words,I=this._nDataBytes*8,R=B.sigBytes*8;S[R>>>5]|=128<<24-R%32,S[(R+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,B.sigBytes=(S.length+1)*4,this._process();for(var D=this._hash,b=D.words,w=0;w<5;w++){var F=b[w];b[w]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360}return D},clone:function(){var B=l.clone.call(this);return B._hash=this._hash.clone(),B}});function c(B,S,I){return B^S^I}function g(B,S,I){return B&S|~B&I}function p(B,S,I){return(B|~S)^I}function v(B,S,I){return B&I|S&~I}function C(B,S,I){return B^(S|~I)}function A(B,S){return B<<S|B>>>32-S}i.RIPEMD160=l._createHelper(d),i.HmacRIPEMD160=l._createHmacHelper(d)})(),e.RIPEMD160})})(wn)),wn.exports}var Dn={exports:{}},Cc=Dn.exports,Z0;function Xi(){return Z0||(Z0=1,(function(n,r){(function(e,t){n.exports=t(_e())})(Cc,function(e){(function(){var t=e,i=t.lib,a=i.Base,s=t.enc,l=s.Utf8,f=t.algo;f.HMAC=a.extend({init:function(u,o){u=this._hasher=new u.init,typeof o=="string"&&(o=l.parse(o));var m=u.blockSize,x=m*4;o.sigBytes>x&&(o=u.finalize(o)),o.clamp();for(var y=this._oKey=o.clone(),h=this._iKey=o.clone(),d=y.words,c=h.words,g=0;g<m;g++)d[g]^=1549556828,c[g]^=909522486;y.sigBytes=h.sigBytes=x,this.reset()},reset:function(){var u=this._hasher;u.reset(),u.update(this._iKey)},update:function(u){return this._hasher.update(u),this},finalize:function(u){var o=this._hasher,m=o.finalize(u);o.reset();var x=o.finalize(this._oKey.clone().concat(m));return x}})})()})})(Dn)),Dn.exports}var _n={exports:{}},Ec=_n.exports,J0;function bc(){return J0||(J0=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),Yi(),Xi())})(Ec,function(e){return(function(){var t=e,i=t.lib,a=i.Base,s=i.WordArray,l=t.algo,f=l.SHA256,u=l.HMAC,o=l.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:f,iterations:25e4}),init:function(m){this.cfg=this.cfg.extend(m)},compute:function(m,x){for(var y=this.cfg,h=u.create(y.hasher,m),d=s.create(),c=s.create([1]),g=d.words,p=c.words,v=y.keySize,C=y.iterations;g.length<v;){var A=h.update(x).finalize(c);h.reset();for(var B=A.words,S=B.length,I=A,R=1;R<C;R++){I=h.finalize(I),h.reset();for(var D=I.words,b=0;b<S;b++)B[b]^=D[b]}d.concat(A),p[0]++}return d.sigBytes=v*4,d}});t.PBKDF2=function(m,x,y){return o.create(y).compute(m,x)}})(),e.PBKDF2})})(_n)),_n.exports}var Sn={exports:{}},Ac=Sn.exports,ea;function nr(){return ea||(ea=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),fs(),Xi())})(Ac,function(e){return(function(){var t=e,i=t.lib,a=i.Base,s=i.WordArray,l=t.algo,f=l.MD5,u=l.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:f,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,m){for(var x,y=this.cfg,h=y.hasher.create(),d=s.create(),c=d.words,g=y.keySize,p=y.iterations;c.length<g;){x&&h.update(x),x=h.update(o).finalize(m),h.reset();for(var v=1;v<p;v++)x=h.finalize(x),h.reset();d.concat(x)}return d.sigBytes=g*4,d}});t.EvpKDF=function(o,m,x){return u.create(x).compute(o,m)}})(),e.EvpKDF})})(Sn)),Sn.exports}var kn={exports:{}},Bc=kn.exports,ta;function ht(){return ta||(ta=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),nr())})(Bc,function(e){e.lib.Cipher||(function(t){var i=e,a=i.lib,s=a.Base,l=a.WordArray,f=a.BufferedBlockAlgorithm,u=i.enc;u.Utf8;var o=u.Base64,m=i.algo,x=m.EvpKDF,y=a.Cipher=f.extend({cfg:s.extend(),createEncryptor:function(D,b){return this.create(this._ENC_XFORM_MODE,D,b)},createDecryptor:function(D,b){return this.create(this._DEC_XFORM_MODE,D,b)},init:function(D,b,w){this.cfg=this.cfg.extend(w),this._xformMode=D,this._key=b,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(D){return this._append(D),this._process()},finalize:function(D){D&&this._append(D);var b=this._doFinalize();return b},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function D(b){return typeof b=="string"?R:B}return function(b){return{encrypt:function(w,F,N){return D(F).encrypt(b,w,F,N)},decrypt:function(w,F,N){return D(F).decrypt(b,w,F,N)}}}})()});a.StreamCipher=y.extend({_doFinalize:function(){var D=this._process(!0);return D},blockSize:1});var h=i.mode={},d=a.BlockCipherMode=s.extend({createEncryptor:function(D,b){return this.Encryptor.create(D,b)},createDecryptor:function(D,b){return this.Decryptor.create(D,b)},init:function(D,b){this._cipher=D,this._iv=b}}),c=h.CBC=(function(){var D=d.extend();D.Encryptor=D.extend({processBlock:function(w,F){var N=this._cipher,M=N.blockSize;b.call(this,w,F,M),N.encryptBlock(w,F),this._prevBlock=w.slice(F,F+M)}}),D.Decryptor=D.extend({processBlock:function(w,F){var N=this._cipher,M=N.blockSize,V=w.slice(F,F+M);N.decryptBlock(w,F),b.call(this,w,F,M),this._prevBlock=V}});function b(w,F,N){var M,V=this._iv;V?(M=V,this._iv=t):M=this._prevBlock;for(var $=0;$<N;$++)w[F+$]^=M[$]}return D})(),g=i.pad={},p=g.Pkcs7={pad:function(D,b){for(var w=b*4,F=w-D.sigBytes%w,N=F<<24|F<<16|F<<8|F,M=[],V=0;V<F;V+=4)M.push(N);var $=l.create(M,F);D.concat($)},unpad:function(D){var b=D.words[D.sigBytes-1>>>2]&255;D.sigBytes-=b}};a.BlockCipher=y.extend({cfg:y.cfg.extend({mode:c,padding:p}),reset:function(){var D;y.reset.call(this);var b=this.cfg,w=b.iv,F=b.mode;this._xformMode==this._ENC_XFORM_MODE?D=F.createEncryptor:(D=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==D?this._mode.init(this,w&&w.words):(this._mode=D.call(F,this,w&&w.words),this._mode.__creator=D)},_doProcessBlock:function(D,b){this._mode.processBlock(D,b)},_doFinalize:function(){var D,b=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(b.pad(this._data,this.blockSize),D=this._process(!0)):(D=this._process(!0),b.unpad(D)),D},blockSize:128/32});var v=a.CipherParams=s.extend({init:function(D){this.mixIn(D)},toString:function(D){return(D||this.formatter).stringify(this)}}),C=i.format={},A=C.OpenSSL={stringify:function(D){var b,w=D.ciphertext,F=D.salt;return F?b=l.create([1398893684,1701076831]).concat(F).concat(w):b=w,b.toString(o)},parse:function(D){var b,w=o.parse(D),F=w.words;return F[0]==1398893684&&F[1]==1701076831&&(b=l.create(F.slice(2,4)),F.splice(0,4),w.sigBytes-=16),v.create({ciphertext:w,salt:b})}},B=a.SerializableCipher=s.extend({cfg:s.extend({format:A}),encrypt:function(D,b,w,F){F=this.cfg.extend(F);var N=D.createEncryptor(w,F),M=N.finalize(b),V=N.cfg;return v.create({ciphertext:M,key:w,iv:V.iv,algorithm:D,mode:V.mode,padding:V.padding,blockSize:D.blockSize,formatter:F.format})},decrypt:function(D,b,w,F){F=this.cfg.extend(F),b=this._parse(b,F.format);var N=D.createDecryptor(w,F).finalize(b.ciphertext);return N},_parse:function(D,b){return typeof D=="string"?b.parse(D,this):D}}),S=i.kdf={},I=S.OpenSSL={execute:function(D,b,w,F,N){if(F||(F=l.random(64/8)),N)var M=x.create({keySize:b+w,hasher:N}).compute(D,F);else var M=x.create({keySize:b+w}).compute(D,F);var V=l.create(M.words.slice(b),w*4);return M.sigBytes=b*4,v.create({key:M,iv:V,salt:F})}},R=a.PasswordBasedCipher=B.extend({cfg:B.cfg.extend({kdf:I}),encrypt:function(D,b,w,F){F=this.cfg.extend(F);var N=F.kdf.execute(w,D.keySize,D.ivSize,F.salt,F.hasher);F.iv=N.iv;var M=B.encrypt.call(this,D,b,N.key,F);return M.mixIn(N),M},decrypt:function(D,b,w,F){F=this.cfg.extend(F),b=this._parse(b,F.format);var N=F.kdf.execute(w,D.keySize,D.ivSize,b.salt,F.hasher);F.iv=N.iv;var M=B.decrypt.call(this,D,b,N.key,F);return M}})})()})})(kn)),kn.exports}var In={exports:{}},wc=In.exports,ra;function Dc(){return ra||(ra=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(wc,function(e){return e.mode.CFB=(function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(a,s){var l=this._cipher,f=l.blockSize;i.call(this,a,s,f,l),this._prevBlock=a.slice(s,s+f)}}),t.Decryptor=t.extend({processBlock:function(a,s){var l=this._cipher,f=l.blockSize,u=a.slice(s,s+f);i.call(this,a,s,f,l),this._prevBlock=u}});function i(a,s,l,f){var u,o=this._iv;o?(u=o.slice(0),this._iv=void 0):u=this._prevBlock,f.encryptBlock(u,0);for(var m=0;m<l;m++)a[s+m]^=u[m]}return t})(),e.mode.CFB})})(In)),In.exports}var Rn={exports:{}},_c=Rn.exports,na;function Sc(){return na||(na=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(_c,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(a,s){var l=this._cipher,f=l.blockSize,u=this._iv,o=this._counter;u&&(o=this._counter=u.slice(0),this._iv=void 0);var m=o.slice(0);l.encryptBlock(m,0),o[f-1]=o[f-1]+1|0;for(var x=0;x<f;x++)a[s+x]^=m[x]}});return t.Decryptor=i,t})(),e.mode.CTR})})(Rn)),Rn.exports}var Nn={exports:{}},kc=Nn.exports,ia;function Ic(){return ia||(ia=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(kc,function(e){/** @preserve
|
|
188
|
+
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
189
|
+
* derived from CryptoJS.mode.CTR
|
|
190
|
+
* Jan Hruby jhruby.web@gmail.com
|
|
191
|
+
*/return e.mode.CTRGladman=(function(){var t=e.lib.BlockCipherMode.extend();function i(l){if((l>>24&255)===255){var f=l>>16&255,u=l>>8&255,o=l&255;f===255?(f=0,u===255?(u=0,o===255?o=0:++o):++u):++f,l=0,l+=f<<16,l+=u<<8,l+=o}else l+=1<<24;return l}function a(l){return(l[0]=i(l[0]))===0&&(l[1]=i(l[1])),l}var s=t.Encryptor=t.extend({processBlock:function(l,f){var u=this._cipher,o=u.blockSize,m=this._iv,x=this._counter;m&&(x=this._counter=m.slice(0),this._iv=void 0),a(x);var y=x.slice(0);u.encryptBlock(y,0);for(var h=0;h<o;h++)l[f+h]^=y[h]}});return t.Decryptor=s,t})(),e.mode.CTRGladman})})(Nn)),Nn.exports}var Pn={exports:{}},Rc=Pn.exports,aa;function Nc(){return aa||(aa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Rc,function(e){return e.mode.OFB=(function(){var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(a,s){var l=this._cipher,f=l.blockSize,u=this._iv,o=this._keystream;u&&(o=this._keystream=u.slice(0),this._iv=void 0),l.encryptBlock(o,0);for(var m=0;m<f;m++)a[s+m]^=o[m]}});return t.Decryptor=i,t})(),e.mode.OFB})})(Pn)),Pn.exports}var Tn={exports:{}},Pc=Tn.exports,sa;function Tc(){return sa||(sa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Pc,function(e){return e.mode.ECB=(function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(i,a){this._cipher.encryptBlock(i,a)}}),t.Decryptor=t.extend({processBlock:function(i,a){this._cipher.decryptBlock(i,a)}}),t})(),e.mode.ECB})})(Tn)),Tn.exports}var qn={exports:{}},qc=qn.exports,oa;function zc(){return oa||(oa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(qc,function(e){return e.pad.AnsiX923={pad:function(t,i){var a=t.sigBytes,s=i*4,l=s-a%s,f=a+l-1;t.clamp(),t.words[f>>>2]|=l<<24-f%4*8,t.sigBytes+=l},unpad:function(t){var i=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=i}},e.pad.Ansix923})})(qn)),qn.exports}var zn={exports:{}},Oc=zn.exports,ua;function Mc(){return ua||(ua=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Oc,function(e){return e.pad.Iso10126={pad:function(t,i){var a=i*4,s=a-t.sigBytes%a;t.concat(e.lib.WordArray.random(s-1)).concat(e.lib.WordArray.create([s<<24],1))},unpad:function(t){var i=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=i}},e.pad.Iso10126})})(zn)),zn.exports}var On={exports:{}},Lc=On.exports,la;function $c(){return la||(la=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Lc,function(e){return e.pad.Iso97971={pad:function(t,i){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,i)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})})(On)),On.exports}var Mn={exports:{}},Vc=Mn.exports,ca;function Uc(){return ca||(ca=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Vc,function(e){return e.pad.ZeroPadding={pad:function(t,i){var a=i*4;t.clamp(),t.sigBytes+=a-(t.sigBytes%a||a)},unpad:function(t){for(var i=t.words,a=t.sigBytes-1,a=t.sigBytes-1;a>=0;a--)if(i[a>>>2]>>>24-a%4*8&255){t.sigBytes=a+1;break}}},e.pad.ZeroPadding})})(Mn)),Mn.exports}var Ln={exports:{}},Hc=Ln.exports,da;function Wc(){return da||(da=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(Hc,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})})(Ln)),Ln.exports}var $n={exports:{}},jc=$n.exports,fa;function Kc(){return fa||(fa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ht())})(jc,function(e){return(function(t){var i=e,a=i.lib,s=a.CipherParams,l=i.enc,f=l.Hex,u=i.format;u.Hex={stringify:function(o){return o.ciphertext.toString(f)},parse:function(o){var m=f.parse(o);return s.create({ciphertext:m})}}})(),e.format.Hex})})($n)),$n.exports}var Vn={exports:{}},Gc=Vn.exports,pa;function Yc(){return pa||(pa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(Gc,function(e){return(function(){var t=e,i=t.lib,a=i.BlockCipher,s=t.algo,l=[],f=[],u=[],o=[],m=[],x=[],y=[],h=[],d=[],c=[];(function(){for(var v=[],C=0;C<256;C++)C<128?v[C]=C<<1:v[C]=C<<1^283;for(var A=0,B=0,C=0;C<256;C++){var S=B^B<<1^B<<2^B<<3^B<<4;S=S>>>8^S&255^99,l[A]=S,f[S]=A;var I=v[A],R=v[I],D=v[R],b=v[S]*257^S*16843008;u[A]=b<<24|b>>>8,o[A]=b<<16|b>>>16,m[A]=b<<8|b>>>24,x[A]=b;var b=D*16843009^R*65537^I*257^A*16843008;y[S]=b<<24|b>>>8,h[S]=b<<16|b>>>16,d[S]=b<<8|b>>>24,c[S]=b,A?(A=I^v[v[v[D^I]]],B^=v[v[B]]):A=B=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],p=s.AES=a.extend({_doReset:function(){var v;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var C=this._keyPriorReset=this._key,A=C.words,B=C.sigBytes/4,S=this._nRounds=B+6,I=(S+1)*4,R=this._keySchedule=[],D=0;D<I;D++)D<B?R[D]=A[D]:(v=R[D-1],D%B?B>6&&D%B==4&&(v=l[v>>>24]<<24|l[v>>>16&255]<<16|l[v>>>8&255]<<8|l[v&255]):(v=v<<8|v>>>24,v=l[v>>>24]<<24|l[v>>>16&255]<<16|l[v>>>8&255]<<8|l[v&255],v^=g[D/B|0]<<24),R[D]=R[D-B]^v);for(var b=this._invKeySchedule=[],w=0;w<I;w++){var D=I-w;if(w%4)var v=R[D];else var v=R[D-4];w<4||D<=4?b[w]=v:b[w]=y[l[v>>>24]]^h[l[v>>>16&255]]^d[l[v>>>8&255]]^c[l[v&255]]}}},encryptBlock:function(v,C){this._doCryptBlock(v,C,this._keySchedule,u,o,m,x,l)},decryptBlock:function(v,C){var A=v[C+1];v[C+1]=v[C+3],v[C+3]=A,this._doCryptBlock(v,C,this._invKeySchedule,y,h,d,c,f);var A=v[C+1];v[C+1]=v[C+3],v[C+3]=A},_doCryptBlock:function(v,C,A,B,S,I,R,D){for(var b=this._nRounds,w=v[C]^A[0],F=v[C+1]^A[1],N=v[C+2]^A[2],M=v[C+3]^A[3],V=4,$=1;$<b;$++){var L=B[w>>>24]^S[F>>>16&255]^I[N>>>8&255]^R[M&255]^A[V++],G=B[F>>>24]^S[N>>>16&255]^I[M>>>8&255]^R[w&255]^A[V++],Y=B[N>>>24]^S[M>>>16&255]^I[w>>>8&255]^R[F&255]^A[V++],P=B[M>>>24]^S[w>>>16&255]^I[F>>>8&255]^R[N&255]^A[V++];w=L,F=G,N=Y,M=P}var L=(D[w>>>24]<<24|D[F>>>16&255]<<16|D[N>>>8&255]<<8|D[M&255])^A[V++],G=(D[F>>>24]<<24|D[N>>>16&255]<<16|D[M>>>8&255]<<8|D[w&255])^A[V++],Y=(D[N>>>24]<<24|D[M>>>16&255]<<16|D[w>>>8&255]<<8|D[F&255])^A[V++],P=(D[M>>>24]<<24|D[w>>>16&255]<<16|D[F>>>8&255]<<8|D[N&255])^A[V++];v[C]=L,v[C+1]=G,v[C+2]=Y,v[C+3]=P},keySize:256/32});t.AES=a._createHelper(p)})(),e.AES})})(Vn)),Vn.exports}var Un={exports:{}},Xc=Un.exports,xa;function Qc(){return xa||(xa=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(Xc,function(e){return(function(){var t=e,i=t.lib,a=i.WordArray,s=i.BlockCipher,l=t.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],m=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],x=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=l.DES=s.extend({_doReset:function(){for(var g=this._key,p=g.words,v=[],C=0;C<56;C++){var A=f[C]-1;v[C]=p[A>>>5]>>>31-A%32&1}for(var B=this._subKeys=[],S=0;S<16;S++){for(var I=B[S]=[],R=o[S],C=0;C<24;C++)I[C/6|0]|=v[(u[C]-1+R)%28]<<31-C%6,I[4+(C/6|0)]|=v[28+(u[C+24]-1+R)%28]<<31-C%6;I[0]=I[0]<<1|I[0]>>>31;for(var C=1;C<7;C++)I[C]=I[C]>>>(C-1)*4+3;I[7]=I[7]<<5|I[7]>>>27}for(var D=this._invSubKeys=[],C=0;C<16;C++)D[C]=B[15-C]},encryptBlock:function(g,p){this._doCryptBlock(g,p,this._subKeys)},decryptBlock:function(g,p){this._doCryptBlock(g,p,this._invSubKeys)},_doCryptBlock:function(g,p,v){this._lBlock=g[p],this._rBlock=g[p+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var C=0;C<16;C++){for(var A=v[C],B=this._lBlock,S=this._rBlock,I=0,R=0;R<8;R++)I|=m[R][((S^A[R])&x[R])>>>0];this._lBlock=S,this._rBlock=B^I}var D=this._lBlock;this._lBlock=this._rBlock,this._rBlock=D,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),g[p]=this._lBlock,g[p+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(g,p){var v=(this._lBlock>>>g^this._rBlock)&p;this._rBlock^=v,this._lBlock^=v<<g}function d(g,p){var v=(this._rBlock>>>g^this._lBlock)&p;this._lBlock^=v,this._rBlock^=v<<g}t.DES=s._createHelper(y);var c=l.TripleDES=s.extend({_doReset:function(){var g=this._key,p=g.words;if(p.length!==2&&p.length!==4&&p.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var v=p.slice(0,2),C=p.length<4?p.slice(0,2):p.slice(2,4),A=p.length<6?p.slice(0,2):p.slice(4,6);this._des1=y.createEncryptor(a.create(v)),this._des2=y.createEncryptor(a.create(C)),this._des3=y.createEncryptor(a.create(A))},encryptBlock:function(g,p){this._des1.encryptBlock(g,p),this._des2.decryptBlock(g,p),this._des3.encryptBlock(g,p)},decryptBlock:function(g,p){this._des3.decryptBlock(g,p),this._des2.encryptBlock(g,p),this._des1.decryptBlock(g,p)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=s._createHelper(c)})(),e.TripleDES})})(Un)),Un.exports}var Hn={exports:{}},Zc=Hn.exports,ha;function Jc(){return ha||(ha=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(Zc,function(e){return(function(){var t=e,i=t.lib,a=i.StreamCipher,s=t.algo,l=s.RC4=a.extend({_doReset:function(){for(var o=this._key,m=o.words,x=o.sigBytes,y=this._S=[],h=0;h<256;h++)y[h]=h;for(var h=0,d=0;h<256;h++){var c=h%x,g=m[c>>>2]>>>24-c%4*8&255;d=(d+y[h]+g)%256;var p=y[h];y[h]=y[d],y[d]=p}this._i=this._j=0},_doProcessBlock:function(o,m){o[m]^=f.call(this)},keySize:256/32,ivSize:0});function f(){for(var o=this._S,m=this._i,x=this._j,y=0,h=0;h<4;h++){m=(m+1)%256,x=(x+o[m])%256;var d=o[m];o[m]=o[x],o[x]=d,y|=o[(o[m]+o[x])%256]<<24-h*8}return this._i=m,this._j=x,y}t.RC4=a._createHelper(l);var u=s.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)f.call(this)}});t.RC4Drop=a._createHelper(u)})(),e.RC4})})(Hn)),Hn.exports}var Wn={exports:{}},ed=Wn.exports,ga;function td(){return ga||(ga=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(ed,function(e){return(function(){var t=e,i=t.lib,a=i.StreamCipher,s=t.algo,l=[],f=[],u=[],o=s.Rabbit=a.extend({_doReset:function(){for(var x=this._key.words,y=this.cfg.iv,h=0;h<4;h++)x[h]=(x[h]<<8|x[h]>>>24)&16711935|(x[h]<<24|x[h]>>>8)&4278255360;var d=this._X=[x[0],x[3]<<16|x[2]>>>16,x[1],x[0]<<16|x[3]>>>16,x[2],x[1]<<16|x[0]>>>16,x[3],x[2]<<16|x[1]>>>16],c=this._C=[x[2]<<16|x[2]>>>16,x[0]&4294901760|x[1]&65535,x[3]<<16|x[3]>>>16,x[1]&4294901760|x[2]&65535,x[0]<<16|x[0]>>>16,x[2]&4294901760|x[3]&65535,x[1]<<16|x[1]>>>16,x[3]&4294901760|x[0]&65535];this._b=0;for(var h=0;h<4;h++)m.call(this);for(var h=0;h<8;h++)c[h]^=d[h+4&7];if(y){var g=y.words,p=g[0],v=g[1],C=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,A=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,B=C>>>16|A&4294901760,S=A<<16|C&65535;c[0]^=C,c[1]^=B,c[2]^=A,c[3]^=S,c[4]^=C,c[5]^=B,c[6]^=A,c[7]^=S;for(var h=0;h<4;h++)m.call(this)}},_doProcessBlock:function(x,y){var h=this._X;m.call(this),l[0]=h[0]^h[5]>>>16^h[3]<<16,l[1]=h[2]^h[7]>>>16^h[5]<<16,l[2]=h[4]^h[1]>>>16^h[7]<<16,l[3]=h[6]^h[3]>>>16^h[1]<<16;for(var d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360,x[y+d]^=l[d]},blockSize:128/32,ivSize:64/32});function m(){for(var x=this._X,y=this._C,h=0;h<8;h++)f[h]=y[h];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<f[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<f[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<f[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<f[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<f[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<f[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<f[6]>>>0?1:0)|0,this._b=y[7]>>>0<f[7]>>>0?1:0;for(var h=0;h<8;h++){var d=x[h]+y[h],c=d&65535,g=d>>>16,p=((c*c>>>17)+c*g>>>15)+g*g,v=((d&4294901760)*d|0)+((d&65535)*d|0);u[h]=p^v}x[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,x[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,x[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,x[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,x[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,x[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,x[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,x[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}t.Rabbit=a._createHelper(o)})(),e.Rabbit})})(Wn)),Wn.exports}var jn={exports:{}},rd=jn.exports,va;function nd(){return va||(va=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(rd,function(e){return(function(){var t=e,i=t.lib,a=i.StreamCipher,s=t.algo,l=[],f=[],u=[],o=s.RabbitLegacy=a.extend({_doReset:function(){var x=this._key.words,y=this.cfg.iv,h=this._X=[x[0],x[3]<<16|x[2]>>>16,x[1],x[0]<<16|x[3]>>>16,x[2],x[1]<<16|x[0]>>>16,x[3],x[2]<<16|x[1]>>>16],d=this._C=[x[2]<<16|x[2]>>>16,x[0]&4294901760|x[1]&65535,x[3]<<16|x[3]>>>16,x[1]&4294901760|x[2]&65535,x[0]<<16|x[0]>>>16,x[2]&4294901760|x[3]&65535,x[1]<<16|x[1]>>>16,x[3]&4294901760|x[0]&65535];this._b=0;for(var c=0;c<4;c++)m.call(this);for(var c=0;c<8;c++)d[c]^=h[c+4&7];if(y){var g=y.words,p=g[0],v=g[1],C=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,A=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,B=C>>>16|A&4294901760,S=A<<16|C&65535;d[0]^=C,d[1]^=B,d[2]^=A,d[3]^=S,d[4]^=C,d[5]^=B,d[6]^=A,d[7]^=S;for(var c=0;c<4;c++)m.call(this)}},_doProcessBlock:function(x,y){var h=this._X;m.call(this),l[0]=h[0]^h[5]>>>16^h[3]<<16,l[1]=h[2]^h[7]>>>16^h[5]<<16,l[2]=h[4]^h[1]>>>16^h[7]<<16,l[3]=h[6]^h[3]>>>16^h[1]<<16;for(var d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360,x[y+d]^=l[d]},blockSize:128/32,ivSize:64/32});function m(){for(var x=this._X,y=this._C,h=0;h<8;h++)f[h]=y[h];y[0]=y[0]+1295307597+this._b|0,y[1]=y[1]+3545052371+(y[0]>>>0<f[0]>>>0?1:0)|0,y[2]=y[2]+886263092+(y[1]>>>0<f[1]>>>0?1:0)|0,y[3]=y[3]+1295307597+(y[2]>>>0<f[2]>>>0?1:0)|0,y[4]=y[4]+3545052371+(y[3]>>>0<f[3]>>>0?1:0)|0,y[5]=y[5]+886263092+(y[4]>>>0<f[4]>>>0?1:0)|0,y[6]=y[6]+1295307597+(y[5]>>>0<f[5]>>>0?1:0)|0,y[7]=y[7]+3545052371+(y[6]>>>0<f[6]>>>0?1:0)|0,this._b=y[7]>>>0<f[7]>>>0?1:0;for(var h=0;h<8;h++){var d=x[h]+y[h],c=d&65535,g=d>>>16,p=((c*c>>>17)+c*g>>>15)+g*g,v=((d&4294901760)*d|0)+((d&65535)*d|0);u[h]=p^v}x[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,x[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,x[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,x[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,x[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,x[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,x[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,x[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}t.RabbitLegacy=a._createHelper(o)})(),e.RabbitLegacy})})(jn)),jn.exports}var Kn={exports:{}},id=Kn.exports,ma;function ad(){return ma||(ma=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),yr(),Fr(),nr(),ht())})(id,function(e){return(function(){var t=e,i=t.lib,a=i.BlockCipher,s=t.algo;const l=16,f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function m(c,g){let p=g>>24&255,v=g>>16&255,C=g>>8&255,A=g&255,B=c.sbox[0][p]+c.sbox[1][v];return B=B^c.sbox[2][C],B=B+c.sbox[3][A],B}function x(c,g,p){let v=g,C=p,A;for(let B=0;B<l;++B)v=v^c.pbox[B],C=m(c,v)^C,A=v,v=C,C=A;return A=v,v=C,C=A,C=C^c.pbox[l],v=v^c.pbox[l+1],{left:v,right:C}}function y(c,g,p){let v=g,C=p,A;for(let B=l+1;B>1;--B)v=v^c.pbox[B],C=m(c,v)^C,A=v,v=C,C=A;return A=v,v=C,C=A,C=C^c.pbox[1],v=v^c.pbox[0],{left:v,right:C}}function h(c,g,p){for(let S=0;S<4;S++){c.sbox[S]=[];for(let I=0;I<256;I++)c.sbox[S][I]=u[S][I]}let v=0;for(let S=0;S<l+2;S++)c.pbox[S]=f[S]^g[v],v++,v>=p&&(v=0);let C=0,A=0,B=0;for(let S=0;S<l+2;S+=2)B=x(c,C,A),C=B.left,A=B.right,c.pbox[S]=C,c.pbox[S+1]=A;for(let S=0;S<4;S++)for(let I=0;I<256;I+=2)B=x(c,C,A),C=B.left,A=B.right,c.sbox[S][I]=C,c.sbox[S][I+1]=A;return!0}var d=s.Blowfish=a.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var c=this._keyPriorReset=this._key,g=c.words,p=c.sigBytes/4;h(o,g,p)}},encryptBlock:function(c,g){var p=x(o,c[g],c[g+1]);c[g]=p.left,c[g+1]=p.right},decryptBlock:function(c,g){var p=y(o,c[g],c[g+1]);c[g]=p.left,c[g+1]=p.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=a._createHelper(d)})(),e.Blowfish})})(Kn)),Kn.exports}var sd=fn.exports,ya;function od(){return ya||(ya=1,(function(n,r){(function(e,t,i){n.exports=t(_e(),ii(),nc(),ac(),yr(),uc(),Fr(),fs(),Yi(),pc(),ps(),gc(),mc(),Fc(),Xi(),bc(),nr(),ht(),Dc(),Sc(),Ic(),Nc(),Tc(),zc(),Mc(),$c(),Uc(),Wc(),Kc(),Yc(),Qc(),Jc(),td(),nd(),ad())})(sd,function(e){return e})})(fn)),fn.exports}var ud=od();const xs=Hs(ud);xs.enc.Utf8.parse("1234567890123456");xs.enc.Utf8.parse("1234567890123456");const Qi={login:{usernamePlaceholder:"\u8F93\u5165\u7528\u6237\u540D\u5B57",passwordPlaceholder:"\u8F93\u5165\u5BC6\u7801",verifyCodePlaceholder:"\u8F93\u5165\u9A8C\u8BC1\u7801",usernameRequired:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u5B57",passwordRequired:"\u8BF7\u8F93\u5165\u5BC6\u7801",verifyCodeRequired:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",submit:"\u767B\u5F55",errorFallback:"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"},register:{labels:{username:"\u7528\u6237\u540D",phone:"\u624B\u673A\u53F7",email:"\u90AE\u7BB1",password:"\u5BC6\u7801",confirmPassword:"\u786E\u8BA4\u5BC6\u7801",verifyCode:"\u9A8C\u8BC1\u7801"},placeholders:{username:"\u8F93\u5165\u7528\u6237\u540D\u5B57",phone:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",email:"\u8F93\u5165\u90AE\u7BB1",password:"\u8BF7\u8F93\u5165\u5BC6\u7801",confirmPassword:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",verifyCode:"\u8F93\u5165\u9A8C\u8BC1\u7801"},required:{username:"\u8BF7\u8F93\u5165\u540D\u79F0",phone:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",email:"\u8BF7\u8F93\u5165\u90AE\u7BB1",password:"\u8BF7\u8F93\u5165\u5BC6\u7801",confirmPassword:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",verifyCode:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"},cancel:"\u53D6\u6D88",submit:"\u6CE8\u518C",passwordConfirmMismatch:"\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"}},ld={login:{usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",verifyCodePlaceholder:"Enter verification code",usernameRequired:"Please enter username",passwordRequired:"Please enter password",verifyCodeRequired:"Please enter verification code",submit:"Sign in",errorFallback:"Login failed, please try again later."},register:{labels:{username:"Username",phone:"Phone",email:"Email",password:"Password",confirmPassword:"Confirm password",verifyCode:"Verification code"},placeholders:{username:"Enter username",phone:"Enter phone number",email:"Enter email",password:"Enter password",confirmPassword:"Confirm password",verifyCode:"Enter verification code"},required:{username:"Please enter username",phone:"Please enter phone number",email:"Please enter email",password:"Please enter password",confirmPassword:"Please confirm password",verifyCode:"Please enter verification code"},cancel:"Cancel",submit:"Register",passwordConfirmMismatch:"Passwords do not match."}},cd={login:{usernamePlaceholder:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B",passwordPlaceholder:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B",verifyCodePlaceholder:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B",usernameRequired:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",passwordRequired:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",verifyCodeRequired:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",submit:"\u30ED\u30B0\u30A4\u30F3",errorFallback:"\u30ED\u30B0\u30A4\u30F3\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},register:{labels:{username:"\u30E6\u30FC\u30B6\u30FC\u540D",phone:"\u96FB\u8A71\u756A\u53F7",email:"\u30E1\u30FC\u30EB",password:"\u30D1\u30B9\u30EF\u30FC\u30C9",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u78BA\u8A8D",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9"},placeholders:{username:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B",phone:"\u96FB\u8A71\u756A\u53F7\u3092\u5165\u529B",email:"\u30E1\u30FC\u30EB\u3092\u5165\u529B",password:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u78BA\u8A8D",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B"},required:{username:"\u30E6\u30FC\u30B6\u30FC\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",phone:"\u96FB\u8A71\u756A\u53F7\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",email:"\u30E1\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",password:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",confirmPassword:"\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",verifyCode:"\u8A8D\u8A3C\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"},cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",submit:"\u767B\u9332",passwordConfirmMismatch:"\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002"}},dd={zh:Qi,en:ld,ja:cd};function fd(n,r){const e=dd[n]??Qi;return r?{...e,...r}:e}const hs=Ze.createContext({locale:"zh",messages:Qi});function Cf(){return Ze.useContext(hs)}function Ef({locale:n,messages:r,children:e}){const t=Ze.useMemo(()=>({locale:n,messages:fd(n,r)}),[n,r]);return Ze.createElement(hs.Provider,{value:t},e)}Ta();const Sr=5,pd=({onAction:n})=>k(Zi,{className:"reviewmanage-toolbar-control-wrap",children:k(Ba,{mode:"multiple",size:"middle",style:{width:230},placeholder:"\u5BA1\u6838\u4E2D",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:2},{label:"\u5BA1\u6838\u62D2\u7EDD",value:3},{label:"\u590D\u5BA1\u4E2D",value:4},{label:"\u590D\u5BA1\u901A\u8FC7",value:5},{label:"\u590D\u5BA1\u62D2\u7EDD",value:6},{label:"\u5168\u90E8",value:0}],defaultValue:[1,4],onChange:r=>n==null?void 0:n("change",{value:r})})}),Fa=({placeholder:n,value:r,onAction:e})=>X(Dd,{className:"reviewmanage-toolbar-search-wrap",children:[k("input",{className:"reviewmanage-toolbar-search-input",placeholder:n,value:r??"",onChange:t=>e==null?void 0:e("change",{value:t.target.value}),onKeyDown:t=>{t.key==="Enter"&&(e==null||e("submit"))}}),k("button",{type:"button",className:"reviewmanage-toolbar-search-btn","aria-label":"search",onClick:()=>e==null?void 0:e("submit"),children:k(Yn,{size:14,color:"#98A2B3"})})]}),xd=({onAction:n})=>{const[r,e]=J(null);return k(Zi,{className:"reviewmanage-toolbar-control-wrap",children:k($s.RangePicker,{size:"middle",style:{width:250},value:r,onChange:t=>{var s,l;const i=t??null;e(i);const a={startTime:((s=i==null?void 0:i[0])==null?void 0:s.format("YYYY-MM-DD"))??"",endTime:((l=i==null?void 0:i[1])==null?void 0:l.format("YYYY-MM-DD"))??""};n==null||n("change",a),a.startTime&&a.endTime&&(n==null||n("submit",a))},placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})})},hd=({value:n,...r})=>{var i;return X(_d,{className:"reviewmanage-status-cell","data-status":n,children:[n==="\u5BA1\u6838\u4E2D"||n==="\u590D\u5BA1\u4E2D"?k("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):k("span",{className:"reviewmanage-status-dot"}),k("span",{className:"reviewmanage-status-text",children:n}),(n==="\u5BA1\u6838\u62D2\u7EDD"||n==="\u590D\u5BA1\u62D2\u7EDD")&&k(mr,{title:((i=r==null?void 0:r.cell)==null?void 0:i.extra)||"",children:k(ko,{size:14,color:"#FF4D4F"})})]})};function gd(n){var e;const r=((e=(n||"").split(".").pop())==null?void 0:e.toLowerCase())||"";return r==="pdf"?"rag/pdf":r==="ofd"?"rag/ofd":["doc","docx"].includes(r)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(r)?"rag/excel":["ppt","pptx"].includes(r)?"rag/ppt":["txt","md"].includes(r)?"rag/txt":["zip","rar","7z"].includes(r)?"rag/zip":["ofd"].includes(r)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(r)?"rag/video":"rag/file"}const vd=({value:n})=>X(Sd,{className:"reviewmanage-filename-cell",children:[k("span",{className:"reviewmanage-filename-icon",children:k(wa,{type:gd(n),size:16})}),k("span",{className:"reviewmanage-filename-text",title:n,children:n})]}),md=({value:n})=>k(kd,{className:"reviewmanage-knowledge-tag","data-kind":n==="\u6570\u636E\u5E93"?"database":"knowledge",children:n});function yd(n){if(n==null)return[];if(Array.isArray(n))return n.map(e=>String(e??"").trim()).filter(e=>e&&e!=="-"&&e!=="\u2014");const r=String(n).trim();return!r||r==="-"||r==="\u2014"?[]:r.split(/[、,,\s]+/g).map(e=>e.trim()).filter(e=>e&&e!=="-"&&e!=="\u2014")}const Ca=({value:n})=>{const r=yd(n);if(!r.length)return k("span",{children:"-"});const e=3;if(r.length<=e)return k("span",{children:r.join("\u3001")});const t=r.slice(0,e);return X(Id,{className:"reviewmanage-reviewers-cell",title:r.join("\u3001"),children:[t.join("\u3001"),"...\u7B49",r.length,"\u4EBA"]})},Fd=({row:n,cell:r,emit:e})=>{const t=Array.isArray(r==null?void 0:r.actions)?r.actions:[];return k(Rd,{className:"reviewmanage-action-cell",children:t.map(i=>k("button",{type:"button",className:"reviewmanage-action-link",onClick:()=>e==null?void 0:e(`table_action_${i.value}`,{...n}),children:i.label},i.value))})};function gs(n){const{enableFirstAudit:r,enableSecondAudit:e,reviewStatus:t}=n;return r&&t==="\u5BA1\u6838\u4E2D"?[{value:"first_approve",label:"\u5BA1\u6838\u901A\u8FC7"},{value:"first_reject",label:"\u5BA1\u6838\u62D2\u7EDD"},{value:"detail",label:"\u67E5\u770B"}]:e&&t==="\u590D\u5BA1\u4E2D"?[{value:"second_approve",label:"\u590D\u5BA1\u901A\u8FC7"},{value:"second_reject",label:"\u590D\u5BA1\u62D2\u7EDD"},{value:"detail",label:"\u67E5\u770B"}]:[{value:"detail",label:"\u67E5\u770B"}]}function Cd(n){return{1:"\u5BA1\u6838\u4E2D",2:"\u5BA1\u6838\u901A\u8FC7",3:"\u5BA1\u6838\u62D2\u7EDD",4:"\u590D\u5BA1\u4E2D",5:"\u590D\u5BA1\u901A\u8FC7",6:"\u590D\u5BA1\u62D2\u7EDD"}[Number(n)]||"\u5BA1\u6838\u4E2D"}function Ed(n){return n===2?"\u6570\u636E\u5E93":"\u77E5\u8BC6\u5E93"}function bd(n){return n===2?"\u5220\u9664":"\u4E0A\u4F20"}const vs=(n,r)=>{const{auditStatus:e,operateType:t,enableFirstAudit:i,enableSecondAudit:a}=n;return t==1?r?!(e==r&&(e==1||e==4)):!((e==1||e==4)&&(i||a)):!0};function Ad(n,r,e){return n.map((t,i)=>{const a=Cd(t.auditStatus),s={id:String(t.id??""),fileName:String(t.fileName??"-"),knowledgeType:Ed(t.targetType),operationType:bd(t.operateType),reviewStatus:a,creator:String(t.createBy??"-"),firstReviewer:Array.isArray(t.firstAuditor)?t.firstAuditor.join("\u3001"):String(t.firstAuditor??"-"),secondReviewer:Array.isArray(t.secondAuditor)?t.secondAuditor.join("\u3001"):String(t.secondAuditor??"-"),uploadTime:String(t.uploadTime??"-"),firstReviewTime:String(t.firstAuditTime??"-"),secondReviewTime:String(t.secondAuditTime??"-"),targetName:(t==null?void 0:t.targetName)||"-",lastRejectReason:t==null?void 0:t.lastRejectReason,enableFirstAudit:t==null?void 0:t.enableFirstAudit,enableSecondAudit:t==null?void 0:t.enableSecondAudit,selectDisabled:vs(t)};return{id:s.id,selectDisabled:s.selectDisabled,rowData:s,__absIndex:(r-1)*e+i,data:[{columnId:"targetName",value:s.targetName,type:"text"},{columnId:"fileName",value:s.fileName,type:"customized"},{columnId:"knowledgeType",value:s.knowledgeType,type:"customized"},{columnId:"operationType",value:s.operationType,type:"text"},{columnId:"reviewStatus",value:s.reviewStatus,type:"customized",extra:s.lastRejectReason},{columnId:"creator",value:s.creator,type:"text"},{columnId:"firstReviewer",value:s.firstReviewer,type:"customized"},{columnId:"secondReviewer",value:s.secondReviewer,type:"customized"},{columnId:"uploadTime",value:s.uploadTime,type:"text"},{columnId:"firstReviewTime",value:s.firstReviewTime,type:"text"},{columnId:"secondReviewTime",value:s.secondReviewTime,type:"text"},{columnId:"actions",value:s,type:"customized",actions:gs(s)}]}})}function Bd(n){return[{columnId:"targetName",value:n.targetName,type:"text"},{columnId:"fileName",value:n.fileName,type:"customized"},{columnId:"knowledgeType",value:n.knowledgeType,type:"customized"},{columnId:"operationType",value:n.operationType,type:"text"},{columnId:"reviewStatus",value:n.reviewStatus,type:"customized",extra:n==null?void 0:n.lastRejectReason},{columnId:"creator",value:n.creator,type:"text"},{columnId:"firstReviewer",value:n.firstReviewer,type:"customized"},{columnId:"secondReviewer",value:n.secondReviewer,type:"customized"},{columnId:"uploadTime",value:n.uploadTime,type:"text"},{columnId:"firstReviewTime",value:n.firstReviewTime,type:"text"},{columnId:"secondReviewTime",value:n.secondReviewTime,type:"text"},{columnId:"actions",value:n,type:"customized",actions:gs(n)}]}const cn=n=>{const r=n.split(".");return r.length>1?r[r.length-1]:""};function bf({url:n,token:r,role:e,styles:t,CustomComponents:i,eventsEmit:a}){const s=Qe(null),l=async(ue,U,me)=>{var Se,be,et,K,he,se;switch(console.log("[adopter] mergedEventsEmit",ue,U,me),ue){case"request:error_network":{((et=(be=(Se=U==null?void 0:U.error)==null?void 0:Se.response)==null?void 0:be.data)==null?void 0:et.errorCode)=="51036"?Zt.warning({title:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664",width:400,content:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{Ie.current="",await Xe({pageNo:Number(te||1),pageSize:Number(q||Sr)})}}):((se=(he=(K=U==null?void 0:U.error)==null?void 0:K.response)==null?void 0:he.data)==null?void 0:se.errorCode)=="51038"&&Zt.warning({title:"\u5BA1\u6838\u5DF2\u5173\u95ED",width:400,content:"\u8D85\u7EA7\u7BA1\u7406\u5458\u5DF2\u5173\u95ED\u5BA1\u6838\u5F00\u5173\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{Ie.current="",await Xe({pageNo:Number(te||1),pageSize:Number(q||Sr)})}});break}case"reviewmanage_table_action_detail":{const{id:De,rowData:Z}=U==null?void 0:U.data;if(De){const lt=cn(Z==null?void 0:Z.fileName);if(["html","txt","jpg","jpeg","png"].includes(lt))C({url:(Z==null?void 0:Z.fileUrl)||"",parse_url:(Z==null?void 0:Z.fileUrl)||"",file_type:cn(Z==null?void 0:Z.fileName),file_name:(Z==null?void 0:Z.fileName)||""}),p(!0);else if(["mp4","flv","avi","mkv","video"].includes(lt))C({link:(Z==null?void 0:Z.fileUrl)||"",parse_url:(Z==null?void 0:Z.fileUrl)||"",file_type:cn(Z==null?void 0:Z.fileName),source_name:(Z==null?void 0:Z.fileName)||""}),p(!0);else{const Me=await x(De);Me?(C({url:Me||"",parse_url:Me||"",file_type:cn(Z==null?void 0:Z.fileName),source_name:(Z==null?void 0:Z.fileName)||""}),p(!0)):Oe.error("\u683C\u5F0F\u8F6C\u6362\u5931\u8D25\uFF0C\u65E0\u6CD5\u9884\u89C8")}}break}default:typeof a=="function"&&a(ue,U);break}},f=qe(()=>Do({url:n,token:r,role:e,eventsEmit:l}),[a,e,r,n]),{getReviewData:u,reviewSingleData:o,batchReview:m,getCovertUrl:x}=f,y=Da(),h=qe(()=>Gn(Gn({theme:ti,mode:"light"},y||{}),t||{}),[y,t]),[d,c]=J(),[g,p]=J(!1),[v,C]=J(),[A,B]=J(!1),S=({onAction:ue})=>X(Zi,{className:"reviewmanage-toolbar-control-wrap",children:[k(Ba,{size:"middle",style:{width:120},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:we,onChange:U=>ue==null?void 0:ue("change",{value:U})}),k(mr,{title:"\u53EA\u6709\u540C\u4E00\u72B6\u6001\u7684\u6587\u6863\u624D\u53EF\u4EE5\u8FDB\u884C\u6279\u91CF\u64CD\u4F5C",children:k(So,{className:"ml-[10px]",style:{color:"#86909C"}})})]}),[I,R]=J([1,4]),[D,b]=J(""),[w,F]=J(""),[N,M]=J({startTime:"",endTime:""}),[V,$]=J([]),[L,G]=J([]),[Y,P]=J([]),[T,z]=J(0),[q,Q]=J(Sr),[te,ee]=J(1),[ne,ce]=J(0),[oe]=J(1),Ie=Qe(""),[ve,pe]=J({pageNo:1,pageSize:Sr}),we=qe(()=>{var ue,U;if((L==null?void 0:L.length)>0){const me=(U=(ue=L[0])==null?void 0:ue.rowData)==null?void 0:U.auditStatus;return L.every(be=>{var et;return((et=be==null?void 0:be.rowData)==null?void 0:et.auditStatus)===me})?[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:me==4},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:me==4},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:me==1},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:me==1}]:[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:!0},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:!0}]}return[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4}]},[L]),Xe=Mr(async ue=>{const U=Number(ue.pageNo||1),me=Number(ue.pageSize||Sr),Se=[String(D||""),String(w||""),String((N==null?void 0:N.startTime)||""),String((N==null?void 0:N.endTime)||""),String(I.join(",")),String(me)].join("::");try{const be=await u(ue),et=(be==null?void 0:be.records)||[],K=Ad(et,U,me),he=Ie.current===Se;Ie.current=Se,P(he?se=>{const De=new Map;return se.forEach(Z=>De.set(Z.id,Z)),K.forEach(Z=>De.set(Z.id,Z)),Array.from(De.values())}:K),z(Number((be==null?void 0:be.total)||0)),pe({pageNo:U,pageSize:me})}catch(be){console.error("[ReviewManage] getReviewData error:",be)}},[]),Ne=async({pageNo:ue,pageSize:U})=>{const me=I.includes(1),Se=I.includes(4),be=me&&Se,et={pageNo:Number(ue||1),pageSize:Number(U||Sr),targetType:oe,...I.length>0&&!I.includes(0)?{auditStatuses:I}:{},...D.trim()?{targetNameFuzzy:D.trim()}:{},...w.trim()?{fileNameFuzzy:w.trim()}:{},...N!=null&&N.startTime?{uploadStartTime:`${N==null?void 0:N.startTime} 00:00:00`}:{},...N!=null&&N.endTime?{uploadEndTime:`${N==null?void 0:N.endTime} 23:59:59`}:{},...I.length>0&&(me||Se||be)?{sortOrder:"asc"}:{sortOrder:"desc"}};await Xe({...et})},Je=()=>{Ie.current="",ee(1),ce(ue=>ue+1)};Le(()=>{Ne({pageNo:te,pageSize:q})},[te,q,ne,I,N]);const rt=async ue=>{var me,Se,be;const U=await m({...ue});U&&(((me=U==null?void 0:U.failedInstances)==null?void 0:me.length)>0?Zt.warning({title:"\u6279\u91CF\u5BA1\u6838\u5931\u8D25",width:900,content:k(ba,{columns:[{title:"\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",width:195},{title:"\u5BA1\u6838\u5931\u8D25\u539F\u56E0",dataIndex:"failedReason",key:"failedReason",width:195}],dataSource:(U==null?void 0:U.failedInstances)||[],pagination:!1,scroll:{y:400}}),okText:"\u77E5\u9053\u4E86",onOk:async()=>{Je()}}):Je(),s!=null&&s.current&&((be=s==null?void 0:(Se=s.current.appFn).clearSelectedItems)==null||be.call(Se)))};qe(()=>Y.map((ue,U)=>({id:ue.id,selectDisabled:ue==null?void 0:ue.selectDisabled,rowData:ue,__absIndex:(te-1)*q+U,data:Bd(ue)})),[Y]);const $e=qe(()=>({label:"",model:null,defaultActiveId:"review-manage-table",views:[{id:"review-manage-table",label:"",type:"table",allowMultiSelect:!0,viewBehavior:"pagination",total:T,requestPagesize:q,viewPageSize:q,toolbar:[{type:"customized",key:"batch_action",component:S,position:"left"},{type:"customized",key:"status_filter",component:pd,position:"right"},{type:"customized",key:"enterprise_search",component:Fa,position:"right",componentProps:{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22",value:D}},{type:"customized",key:"file_search",component:Fa,position:"right",componentProps:{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22",value:w}},{type:"customized",key:"time_range",component:xd,position:"right"}],columns:[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",id:"fileName",type:"customized",component:vd},{title:"\u4F01\u4E1A\u5E93\u540D",id:"targetName",type:"text"},{title:"\u77E5\u8BC6\u7C7B\u578B",id:"knowledgeType",type:"customized",component:md},{title:"\u64CD\u4F5C\u7C7B\u522B",id:"operationType",type:"text"},{title:"\u5BA1\u6838\u72B6\u6001",id:"reviewStatus",type:"customized",component:hd},{title:"\u5F55\u5165\u5458",id:"creator",type:"text"},{title:"\u521D\u5BA1\u4EBA\u5458",id:"firstReviewer",type:"customized",component:Ca},{title:"\u590D\u5BA1\u4EBA\u5458",id:"secondReviewer",type:"customized",component:Ca},{title:"\u4E0A\u4F20\u65F6\u95F4",id:"uploadTime",type:"text"},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",id:"firstReviewTime",type:"text"},{title:"\u590D\u5BA1\u5BA1\u6838\u65F6\u95F4",id:"secondReviewTime",type:"text"},{title:"\u64CD\u4F5C",id:"actions",type:"customized",component:Fd}]}],dataSource:Y,styles:h,CustomComponents:i,eventsEmit:async(ue,U,me)=>{var be,et,K,he;if(console.log("[ReviewManage] eventsEmit",ue,U,me),ue==="table_row_select"){const se=Y.find(De=>De.id==(U==null?void 0:U.rowId));P(De=>De.map(Z=>({...Z,selectDisabled:vs(Z,se==null?void 0:se.auditStatus)})))}if(ue==="toolbar_batch_action_change"){const se=Number((U==null?void 0:U.value)??"");if(c(se),se&&V.length>0)if(se==2||se==4){let De="";Zt.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:k("div",{style:{minHeight:220},children:k(Vr.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:Z=>{De=Z.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const Z=De.trim();if(!Z)return Oe.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));await rt({instanceIds:V,actionTypeCode:se,rejectReason:Z})}})}else await rt({instanceIds:V,actionTypeCode:se})}if(ue==="toolbar_status_filter_change"&&R(Array.isArray(U==null?void 0:U.value)?U.value:[]),ue==="toolbar_enterprise_search_change"&&b(String((U==null?void 0:U.value)??"")),ue==="toolbar_enterprise_search_submit"&&Ne({pageNo:1}),ue==="toolbar_file_search_change"&&F(String((U==null?void 0:U.value)??"")),ue==="toolbar_file_search_submit"&&Ne({pageNo:1}),ue==="toolbar_time_range_submit"&&M({startTime:String((U==null?void 0:U.startTime)??""),endTime:String((U==null?void 0:U.endTime)??"")}),ue==="pagination:request_merge_data"){const se=(U==null?void 0:U.request)||{},De=Number(se.pageSize??q)||q,Z=Math.max(1,Number(se.pageNo??te)||te);Q(De),ee(Z),ce(lt=>lt+1)}if(ue==="table_action_first_approve"){const se=(be=U==null?void 0:U.data)==null?void 0:be.id;se&&await o({instanceId:se,actionTypeCode:1})&&(ce(Z=>Z+1),Oe.success("\u521D\u5BA1\u901A\u8FC7"))}if(ue==="table_action_first_reject"){const se=(et=U==null?void 0:U.data)==null?void 0:et.id;if(se){let De="";Zt.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:k("div",{style:{minHeight:220},children:k(Vr.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:Z=>{De=Z.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const Z=De.trim();if(!Z)return Oe.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));se&&await o({instanceId:se,actionTypeCode:2,rejectReason:Z})&&(Je(),Oe.success("\u521D\u5BA1\u62D2\u7EDD"))}})}}if(ue==="table_action_second_approve"){const se=(K=U==null?void 0:U.data)==null?void 0:K.id;se&&await o({instanceId:se,actionTypeCode:3})&&(Je(),Oe.success("\u590D\u5BA1\u901A\u8FC7"))}if(ue==="table_action_second_reject"){const se=(he=U==null?void 0:U.data)==null?void 0:he.id;if(se){let De="";Zt.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:k("div",{style:{minHeight:220},children:k(Vr.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:Z=>{De=Z.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const Z=De.trim();if(!Z)return Oe.warning("\u8BF7\u8F93\u5165\u590D\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));se&&await o({instanceId:se,actionTypeCode:4,rejectReason:Z})&&(Je(),Oe.success("\u590D\u5BA1\u62D2\u7EDD"))}})}}const Se=(Array.isArray(U==null?void 0:U.selectedIds)?U.selectedIds:void 0)??(Array.isArray(U==null?void 0:U.selectedKeys)?U.selectedKeys:void 0)??(Array.isArray(U==null?void 0:U.selectedRowKeys)?U.selectedRowKeys:void 0);Se&&($(Se.map(se=>String(se))),G(U.selectedItems)),l==null||l(`reviewmanage_${ue}`,{...U,batchAction:d,selectedIds:V},me)}}),[i,d,I,D,w,N,l,rt,h,te,q,V,Y,T]);return X(Vs,{title:"\u5BA1\u6838\u7BA1\u7406",styles:h,CustomComponents:i,children:[k(wd,{className:"reviewmanage-page-wrap",children:k(wo,{ref:s,...$e},"review-manage-table")}),k(_o,{open:g,curFileInfo:v,token:r,onClose:()=>p(!1)})]})}const wd=rr.div.attrs({className:"reviewmanage-page-wrap"})`
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 100%;
|
|
194
|
+
min-height: 0;
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
|
|
198
|
+
.xviewer-container {
|
|
199
|
+
flex: 1 1 0;
|
|
200
|
+
min-height: 0;
|
|
201
|
+
}
|
|
202
|
+
`,Zi=rr.div.attrs({className:"reviewmanage-toolbar-control-wrap"})`
|
|
203
|
+
display: inline-flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
|
|
206
|
+
/* 统一 antd 输入控件视觉规格:高度/圆角/边框/字号 */
|
|
207
|
+
:global(.ant-select-selector) {
|
|
208
|
+
height: 32px !important;
|
|
209
|
+
border-radius: 8px !important;
|
|
210
|
+
border-color: #d0d5dd !important;
|
|
211
|
+
box-shadow: none !important;
|
|
212
|
+
}
|
|
213
|
+
:global(.ant-select-selection-search-input) {
|
|
214
|
+
height: 32px !important;
|
|
215
|
+
}
|
|
216
|
+
:global(.ant-select-selection-item),
|
|
217
|
+
:global(.ant-select-selection-placeholder) {
|
|
218
|
+
line-height: 30px !important;
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
color: #344054;
|
|
221
|
+
}
|
|
222
|
+
:global(.ant-picker) {
|
|
223
|
+
height: 32px !important;
|
|
224
|
+
border-radius: 8px !important;
|
|
225
|
+
border-color: #d0d5dd !important;
|
|
226
|
+
box-shadow: none !important;
|
|
227
|
+
}
|
|
228
|
+
:global(.ant-picker-input > input) {
|
|
229
|
+
font-size: 12px;
|
|
230
|
+
color: #344054;
|
|
231
|
+
}
|
|
232
|
+
`,Dd=rr.div.attrs({className:"reviewmanage-toolbar-search-wrap"})`
|
|
233
|
+
height: 32px;
|
|
234
|
+
min-width: 220px;
|
|
235
|
+
padding: 0 10px 0 12px;
|
|
236
|
+
border-radius: 8px;
|
|
237
|
+
border: 1px solid #d0d5dd;
|
|
238
|
+
background: #fff;
|
|
239
|
+
display: inline-flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
gap: 8px;
|
|
242
|
+
|
|
243
|
+
.reviewmanage-toolbar-search-input {
|
|
244
|
+
flex: 1;
|
|
245
|
+
min-width: 0;
|
|
246
|
+
border: none;
|
|
247
|
+
outline: none;
|
|
248
|
+
font-size: 12px;
|
|
249
|
+
color: #344054;
|
|
250
|
+
background: transparent;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.reviewmanage-toolbar-search-btn {
|
|
254
|
+
display: inline-flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
justify-content: center;
|
|
257
|
+
width: 22px;
|
|
258
|
+
height: 22px;
|
|
259
|
+
border: none;
|
|
260
|
+
background: transparent;
|
|
261
|
+
padding: 0;
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
border-radius: 6px;
|
|
264
|
+
}
|
|
265
|
+
.reviewmanage-toolbar-search-btn:hover {
|
|
266
|
+
background: rgba(16, 24, 40, 0.04);
|
|
267
|
+
}
|
|
268
|
+
.reviewmanage-toolbar-search-btn:active {
|
|
269
|
+
background: rgba(16, 24, 40, 0.06);
|
|
270
|
+
}
|
|
271
|
+
`,_d=rr.div.attrs({className:"reviewmanage-status-cell"})`
|
|
272
|
+
display: inline-flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
gap: 6px;
|
|
275
|
+
color: #1f2937;
|
|
276
|
+
|
|
277
|
+
.reviewmanage-status-dot {
|
|
278
|
+
width: 8px;
|
|
279
|
+
height: 8px;
|
|
280
|
+
border-radius: 999px;
|
|
281
|
+
background: #d1d5db;
|
|
282
|
+
box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.15);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.reviewmanage-status-spinner {
|
|
286
|
+
width: 14px;
|
|
287
|
+
height: 14px;
|
|
288
|
+
border-radius: 999px;
|
|
289
|
+
border: 2px solid rgba(59, 130, 246, 0.25);
|
|
290
|
+
border-top-color: rgba(59, 130, 246, 1);
|
|
291
|
+
animation: reviewmanage-spin 0.9s linear infinite;
|
|
292
|
+
box-sizing: border-box;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@keyframes reviewmanage-spin {
|
|
296
|
+
from {
|
|
297
|
+
transform: rotate(0deg);
|
|
298
|
+
}
|
|
299
|
+
to {
|
|
300
|
+
transform: rotate(360deg);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&[data-status='复审中'] {
|
|
305
|
+
.reviewmanage-status-dot {
|
|
306
|
+
background: #60a5fa;
|
|
307
|
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&[data-status='审核通过'],
|
|
312
|
+
&[data-status='复审通过'] {
|
|
313
|
+
.reviewmanage-status-dot {
|
|
314
|
+
background: #12b76a;
|
|
315
|
+
box-shadow: 0 0 0 2px rgba(18, 183, 106, 0.18);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[data-status='审核拒绝'],
|
|
320
|
+
&[data-status='复审拒绝'] {
|
|
321
|
+
.reviewmanage-status-dot {
|
|
322
|
+
background: #f04438;
|
|
323
|
+
box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.18);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
`,Sd=rr.div.attrs({className:"reviewmanage-filename-cell"})`
|
|
327
|
+
display: inline-flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 10px;
|
|
330
|
+
min-width: 0;
|
|
331
|
+
|
|
332
|
+
.reviewmanage-filename-icon {
|
|
333
|
+
display: inline-flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
justify-content: center;
|
|
336
|
+
width: 22px;
|
|
337
|
+
height: 22px;
|
|
338
|
+
border-radius: 6px;
|
|
339
|
+
background: rgba(59, 130, 246, 0.06);
|
|
340
|
+
flex-shrink: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.reviewmanage-filename-text {
|
|
344
|
+
min-width: 0;
|
|
345
|
+
max-width: 340px;
|
|
346
|
+
overflow: hidden;
|
|
347
|
+
text-overflow: ellipsis;
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
color: #111827;
|
|
350
|
+
}
|
|
351
|
+
`,kd=rr.span.attrs({className:"reviewmanage-knowledge-tag"})`
|
|
352
|
+
display: inline-flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
justify-content: center;
|
|
355
|
+
height: 22px;
|
|
356
|
+
padding: 0 10px;
|
|
357
|
+
border-radius: 10px;
|
|
358
|
+
font-size: 12px;
|
|
359
|
+
font-weight: 500;
|
|
360
|
+
border: 1px solid transparent;
|
|
361
|
+
user-select: none;
|
|
362
|
+
|
|
363
|
+
&[data-kind='knowledge'] {
|
|
364
|
+
color: #1d4ed8;
|
|
365
|
+
background: rgba(37, 99, 235, 0.10);
|
|
366
|
+
border-color: rgba(37, 99, 235, 0.18);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&[data-kind='database'] {
|
|
370
|
+
color: #6d28d9;
|
|
371
|
+
background: rgba(109, 40, 217, 0.10);
|
|
372
|
+
border-color: rgba(109, 40, 217, 0.18);
|
|
373
|
+
}
|
|
374
|
+
`,Id=rr.span.attrs({className:"reviewmanage-reviewers-cell"})`
|
|
375
|
+
display: inline-block;
|
|
376
|
+
max-width: 180px;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
text-overflow: ellipsis;
|
|
379
|
+
white-space: nowrap;
|
|
380
|
+
`,Rd=rr.div.attrs({className:"reviewmanage-action-cell"})`
|
|
381
|
+
display: inline-flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
gap: 10px;
|
|
384
|
+
|
|
385
|
+
.reviewmanage-action-link {
|
|
386
|
+
border: none;
|
|
387
|
+
background: transparent;
|
|
388
|
+
color: #1d4ed8;
|
|
389
|
+
font-size: 12px;
|
|
390
|
+
padding: 0;
|
|
391
|
+
cursor: pointer;
|
|
392
|
+
}
|
|
393
|
+
`;export{ds as D,Ef as L,bf as R,hs as a,fd as g,Cf as u,Ff as w};
|