cc-viewer 1.6.128 → 1.6.129
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/dist/assets/{App-DjokzLBZ.js → App-B4IcGK6G.js} +5 -5
- package/dist/assets/{AppHeader.module-C_9cGk6q.js → AppHeader.module-CjrmuYgF.js} +4 -4
- package/dist/assets/{Mobile-C_9JyMrQ.js → Mobile-BNjHrZsB.js} +1 -1
- package/dist/assets/{_basePickBy-DZsPya4T.js → _basePickBy-D-v24Uv8.js} +1 -1
- package/dist/assets/{_baseUniq-BKMu7axu.js → _baseUniq-DqvTMV21.js} +1 -1
- package/dist/assets/{arc-HdkU3-Q0.js → arc-B0iqMX_t.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-CLZObMQE.js → architectureDiagram-2XIMDMQ5-BRF9FhT9.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-BN_ArwM6.js → blockDiagram-WCTKOSBZ-Brer9ofE.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-xfmfzSLr.js → c4Diagram-IC4MRINW-BhlDWgYA.js} +1 -1
- package/dist/assets/channel-DJKFF81H.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-LmTS0N_Y.js → chunk-4BX2VUAB-0pYpBnVw.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-BUjLyEwI.js → chunk-55IACEB6-BW9joWXm.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BI4iVFDJ.js → chunk-FMBD7UC4-betWJo2A.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-CYyQrIIG.js → chunk-JSJVCQXG-DLAUODYO.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-XPSOKtya.js → chunk-KX2RTZJC-Cljgt4wi.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-BG3N9hlV.js → chunk-NQ4KR5QH-DGtRHSDZ.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN--HHAC-o9.js → chunk-QZHKN3VN-Bf2EBbcK.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-C9n5z1qV.js → chunk-WL4C6EOR-DogNv_T-.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-d5u75FwT.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-d5u75FwT.js +1 -0
- package/dist/assets/clone-DkEqeifv.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CSk_-HFm.js → cose-bilkent-S5V4N54A-BdoTB8Zt.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-Bcx22b8V.js → dagre-KLK3FWXG-DRQqDHQ7.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-CMZPqM1v.js → diagram-E7M64L7V-BX-wfeOc.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-DV2HoSDO.js → diagram-IFDJBPK2-YLLbyEij.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-Cl2auwWm.js → diagram-P4PSJMXO-DA0ukgAI.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-BLHNAJjU.js → erDiagram-INFDFZHY-vjFVOTtz.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-BUo54HS0.js → flowDiagram-PKNHOUZH-Cg_-Vd89.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-4-QcIKKg.js → ganttDiagram-A5KZAMGK-DnB2Ecma.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BN-FVz4c.js → gitGraphDiagram-K3NZZRJ6-DjNlJDl4.js} +1 -1
- package/dist/assets/{graph-DgIk77-E.js → graph-C-qkdO14.js} +1 -1
- package/dist/assets/{index-DSK1hkRx.js → index-DoYvdLcS.js} +2 -2
- package/dist/assets/{infoDiagram-LFFYTUFH-B9vhRk8P.js → infoDiagram-LFFYTUFH-0y2oNdoE.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-asE5M0Fv.js → ishikawaDiagram-PHBUUO56-BMRJoH_5.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-4ALWk8O5.js → journeyDiagram-4ABVD52K-B6CLe4n8.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-CPAEJgWC.js → kanban-definition-K7BYSVSG-Bg-_K4sq.js} +1 -1
- package/dist/assets/{layout-v66mlPMj.js → layout-BNDRVWJf.js} +1 -1
- package/dist/assets/{linear-Co_jEfPw.js → linear-ScBwT1se.js} +1 -1
- package/dist/assets/{mermaid.core-CEWgHFON.js → mermaid.core-DjZtPf7G.js} +4 -4
- package/dist/assets/{mindmap-definition-YRQLILUH-CAOQS6xD.js → mindmap-definition-YRQLILUH-o1Z3V0_3.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-5ZLLb5x9.js → pieDiagram-SKSYHLDU-D1Y3Q1ig.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-0zsomG7_.js → quadrantDiagram-337W2JSQ-CoY7L_bt.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-DdF1sN3f.js → requirementDiagram-Z7DCOOCP-wrZZpE0R.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-0KR_K7eu.js → sankeyDiagram-WA2Y5GQK-Der4bVqU.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-jvPZmlrX.js → sequenceDiagram-2WXFIKYE-BeUq_QxR.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-DIEqQBNB.js → stateDiagram-RAJIS63D-t2UDl0JW.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-DhC2yAso.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-DvxKsW4W.js → timeline-definition-YZTLITO2-BuQyo5DM.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-DChK8JVr.js → treemap-KZPCXAKY-C21Ktbbn.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-Db3auAwM.js → vennDiagram-LZ73GAT5-Di7S-rzQ.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-Du8kFfw3.js → xychartDiagram-JWTSCODW-BDBkOvEx.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server.js +28 -0
- package/dist/assets/channel-CTrzj5Id.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-BeYV4qR5.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-BeYV4qR5.js +0 -1
- package/dist/assets/clone-DoICy0xC.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-CiorKQQd.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ts=Object.defineProperty;var Ms=(n,s,t)=>s in n?Ts(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var B=(n,s,t)=>Ms(n,typeof s!="symbol"?s+"":s,t);import{r as j,R as q,j as e,a as Es}from"./index-DSK1hkRx.js";import{P as Rs,Q as Is,_ as ee,c as se,U as ut,V as Ls,W as mt,d as St,X as Ce,Y as kt,Z as rt,$ as wt,a0 as As,a1 as Ct,a2 as Ps,a3 as Tt,a4 as Ds,g as Bs,m as Os,u as He,a5 as Fs,a6 as Hs,a7 as $s,a8 as zs,a9 as Vs,aa as qs,ab as Us,ac as Mt,C as bt,I as ue,ad as Ws,ae as Jt,af as Ks,ag as Qt,ah as Gs,ai as Js,aj as Qs,e as oe,t as p,w as We,x as Ys,y as Te,j as Xs,k as Zs,l as ea,s as r,v as U,q as ie,ak as Yt,al as Ve,am as K,L as $e,an as ze,n as ta,ao as sa,o as Ke,ap as aa,aq as ke,S as Xt,B as F,ar as na,as as la,at as qe,au as oa,av as xe,aw as Et,ax as Ee,M as ia,ay as Zt,J as Re,az as Je,G as pt,aA as Rt,H as gt,aB as ra,O as es,aC as ca,aD as da,aE as ha,aF as Le,aG as It,aH as ua,aI as Lt,aJ as ts,aK as ss,aL as Ae,aM as Pe,aN as as,aO as ct,aP as At,aQ as Pt,aR as Dt,aS as ma,aT as pa,A as ga,aU as Qe,aV as Bt,aW as fa,D as xa,z as R,E as va,aX as ya}from"./AppHeader.module-C_9cGk6q.js";var Ot=j.createContext(null),ns=j.createContext({}),ja=["prefixCls","className","containerRef"],Ca=function(s){var t=s.prefixCls,a=s.className,d=s.containerRef,l=Rs(s,ja),u=j.useContext(ns),g=u.panel,o=Is(g,d);return j.createElement("div",ee({className:se("".concat(t,"-content"),a),role:"dialog",ref:o},ut(s,{aria:!0}),{"aria-modal":"true"},l))};function Ft(n){return typeof n=="string"&&String(Number(n))===n?(Ls(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(n)):n}var Ht={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function ba(n,s){var t,a,d,l=n.prefixCls,u=n.open,g=n.placement,o=n.inline,h=n.push,i=n.forceRender,c=n.autoFocus,m=n.keyboard,y=n.classNames,x=n.rootClassName,f=n.rootStyle,v=n.zIndex,C=n.className,k=n.id,N=n.style,b=n.motion,T=n.width,E=n.height,L=n.children,I=n.mask,M=n.maskClosable,D=n.maskMotion,O=n.maskClassName,ae=n.maskStyle,ne=n.afterOpenChange,A=n.onClose,X=n.onMouseEnter,re=n.onMouseOver,Z=n.onMouseLeave,me=n.onClick,be=n.onKeyDown,ve=n.onKeyUp,G=n.styles,pe=n.drawerRender,le=j.useRef(),ye=j.useRef(),_=j.useRef();j.useImperativeHandle(s,function(){return le.current});var W=function(de){var Be=de.keyCode,Oe=de.shiftKey;switch(Be){case rt.TAB:{if(Be===rt.TAB){if(!Oe&&document.activeElement===_.current){var Fe;(Fe=ye.current)===null||Fe===void 0||Fe.focus({preventScroll:!0})}else if(Oe&&document.activeElement===ye.current){var it;(it=_.current)===null||it===void 0||it.focus({preventScroll:!0})}}break}case rt.ESC:{A&&m&&(de.stopPropagation(),A(de));break}}};j.useEffect(function(){if(u&&c){var Y;(Y=le.current)===null||Y===void 0||Y.focus({preventScroll:!0})}},[u]);var ge=j.useState(!1),we=mt(ge,2),Ne=we[0],je=we[1],z=j.useContext(Ot),_e;typeof h=="boolean"?_e=h?{}:{distance:0}:_e=h||{};var fe=(t=(a=(d=_e)===null||d===void 0?void 0:d.distance)!==null&&a!==void 0?a:z==null?void 0:z.pushDistance)!==null&&t!==void 0?t:180,ce=j.useMemo(function(){return{pushDistance:fe,push:function(){je(!0)},pull:function(){je(!1)}}},[fe]);j.useEffect(function(){if(u){var Y;z==null||(Y=z.push)===null||Y===void 0||Y.call(z)}else{var de;z==null||(de=z.pull)===null||de===void 0||de.call(z)}},[u]),j.useEffect(function(){return function(){var Y;z==null||(Y=z.pull)===null||Y===void 0||Y.call(z)}},[]);var te=j.createElement(St,ee({key:"mask"},D,{visible:I&&u}),function(Y,de){var Be=Y.className,Oe=Y.style;return j.createElement("div",{className:se("".concat(l,"-mask"),Be,y==null?void 0:y.mask,O),style:Ce(Ce(Ce({},Oe),ae),G==null?void 0:G.mask),onClick:M&&u?A:void 0,ref:de})}),V=typeof b=="function"?b(g):b,Q={};if(Ne&&fe)switch(g){case"top":Q.transform="translateY(".concat(fe,"px)");break;case"bottom":Q.transform="translateY(".concat(-fe,"px)");break;case"left":Q.transform="translateX(".concat(fe,"px)");break;default:Q.transform="translateX(".concat(-fe,"px)");break}g==="left"||g==="right"?Q.width=Ft(T):Q.height=Ft(E);var Se={onMouseEnter:X,onMouseOver:re,onMouseLeave:Z,onClick:me,onKeyDown:be,onKeyUp:ve},Ge=j.createElement(St,ee({key:"panel"},V,{visible:u,forceRender:i,onVisibleChanged:function(de){ne==null||ne(de)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(Y,de){var Be=Y.className,Oe=Y.style,Fe=j.createElement(Ca,ee({id:k,containerRef:de,prefixCls:l,className:se(C,y==null?void 0:y.content),style:Ce(Ce({},N),G==null?void 0:G.content)},ut(n,{aria:!0}),Se),L);return j.createElement("div",ee({className:se("".concat(l,"-content-wrapper"),y==null?void 0:y.wrapper,Be),style:Ce(Ce(Ce({},Q),Oe),G==null?void 0:G.wrapper)},ut(n,{data:!0})),pe?pe(Fe):Fe)}),_t=Ce({},f);return v&&(_t.zIndex=v),j.createElement(Ot.Provider,{value:ce},j.createElement("div",{className:se(l,"".concat(l,"-").concat(g),x,kt(kt({},"".concat(l,"-open"),u),"".concat(l,"-inline"),o)),style:_t,tabIndex:-1,ref:le,onKeyDown:W},te,j.createElement("div",{tabIndex:0,ref:ye,style:Ht,"aria-hidden":"true","data-sentinel":"start"}),Ge,j.createElement("div",{tabIndex:0,ref:_,style:Ht,"aria-hidden":"true","data-sentinel":"end"})))}var Na=j.forwardRef(ba),_a=function(s){var t=s.open,a=t===void 0?!1:t,d=s.prefixCls,l=d===void 0?"rc-drawer":d,u=s.placement,g=u===void 0?"right":u,o=s.autoFocus,h=o===void 0?!0:o,i=s.keyboard,c=i===void 0?!0:i,m=s.width,y=m===void 0?378:m,x=s.mask,f=x===void 0?!0:x,v=s.maskClosable,C=v===void 0?!0:v,k=s.getContainer,N=s.forceRender,b=s.afterOpenChange,T=s.destroyOnClose,E=s.onMouseEnter,L=s.onMouseOver,I=s.onMouseLeave,M=s.onClick,D=s.onKeyDown,O=s.onKeyUp,ae=s.panelRef,ne=j.useState(!1),A=mt(ne,2),X=A[0],re=A[1],Z=j.useState(!1),me=mt(Z,2),be=me[0],ve=me[1];wt(function(){ve(!0)},[]);var G=be?a:!1,pe=j.useRef(),le=j.useRef();wt(function(){G&&(le.current=document.activeElement)},[G]);var ye=function(Ne){var je;if(re(Ne),b==null||b(Ne),!Ne&&le.current&&!((je=pe.current)!==null&&je!==void 0&&je.contains(le.current))){var z;(z=le.current)===null||z===void 0||z.focus({preventScroll:!0})}},_=j.useMemo(function(){return{panel:ae}},[ae]);if(!N&&!X&&!G&&T)return null;var W={onMouseEnter:E,onMouseOver:L,onMouseLeave:I,onClick:M,onKeyDown:D,onKeyUp:O},ge=Ce(Ce({},s),{},{open:G,prefixCls:l,placement:g,autoFocus:h,keyboard:c,width:y,mask:f,maskClosable:C,inline:k===!1,afterOpenChange:ye,ref:pe},W);return j.createElement(ns.Provider,{value:_},j.createElement(As,{open:G||N||X,autoDestroy:!1,getContainer:k,autoLock:f&&(G||X)},j.createElement(Na,ge)))};const ls=n=>{var s,t;const{prefixCls:a,ariaId:d,title:l,footer:u,extra:g,closable:o,loading:h,onClose:i,headerStyle:c,bodyStyle:m,footerStyle:y,children:x,classNames:f,styles:v}=n,C=Ct("drawer");let k;o===!1?k=void 0:o===void 0||o===!0?k="start":k=(o==null?void 0:o.placement)==="end"?"end":"start";const N=j.useCallback(I=>j.createElement("button",{type:"button",onClick:i,className:se(`${a}-close`,{[`${a}-close-${k}`]:k==="end"})},I),[i,a,k]),[b,T]=Ps(Tt(n),Tt(C),{closable:!0,closeIconRender:N}),E=()=>{var I,M;return!l&&!b?null:j.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(I=C.styles)===null||I===void 0?void 0:I.header),c),v==null?void 0:v.header),className:se(`${a}-header`,{[`${a}-header-close-only`]:b&&!l&&!g},(M=C.classNames)===null||M===void 0?void 0:M.header,f==null?void 0:f.header)},j.createElement("div",{className:`${a}-header-title`},k==="start"&&T,l&&j.createElement("div",{className:`${a}-title`,id:d},l)),g&&j.createElement("div",{className:`${a}-extra`},g),k==="end"&&T)},L=()=>{var I,M;if(!u)return null;const D=`${a}-footer`;return j.createElement("div",{className:se(D,(I=C.classNames)===null||I===void 0?void 0:I.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},(M=C.styles)===null||M===void 0?void 0:M.footer),y),v==null?void 0:v.footer)},u)};return j.createElement(j.Fragment,null,E(),j.createElement("div",{className:se(`${a}-body`,f==null?void 0:f.body,(s=C.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=C.styles)===null||t===void 0?void 0:t.body),m),v==null?void 0:v.body)},h?j.createElement(Ds,{active:!0,title:!1,paragraph:{rows:5},className:`${a}-body-skeleton`}):x),L())},Sa=n=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[n]},os=(n,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},n),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":n})}),is=(n,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},os({opacity:n},{opacity:1})),ka=(n,s)=>[is(.7,s),os({transform:Sa(n)},{transform:"none"})],wa=n=>{const{componentCls:s,motionDurationSlow:t}=n;return{[s]:{[`${s}-mask-motion`]:is(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((a,d)=>Object.assign(Object.assign({},a),{[`&-${d}`]:ka(d,t)}),{})}}},Ta=n=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:a,colorBgMask:d,colorBgElevated:l,motionDurationSlow:u,motionDurationMid:g,paddingXS:o,padding:h,paddingLG:i,fontSizeLG:c,lineHeightLG:m,lineWidth:y,lineType:x,colorSplit:f,marginXS:v,colorIcon:C,colorIconHover:k,colorBgTextHover:N,colorBgTextActive:b,colorText:T,fontWeightStrong:E,footerPaddingBlock:L,footerPaddingInline:I,calc:M}=n,D=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:n.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:n.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:n.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:n.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:a,background:d,pointerEvents:"auto"},[D]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${u}`,"&-hidden":{display:"none"}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:n.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:n.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:n.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:n.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${He(h)} ${He(i)}`,fontSize:c,lineHeight:m,borderBottom:`${He(y)} ${x} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:M(c).add(o).equal(),height:M(c).add(o).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:C,fontWeight:E,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${g}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:v},[`&:not(${t}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:k,backgroundColor:N,textDecoration:"none"},"&:active":{backgroundColor:b}},Fs(n)),[`${t}-title`]:{flex:1,margin:0,fontWeight:n.fontWeightStrong,fontSize:c,lineHeight:m},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:i,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${He(L)} ${He(I)}`,borderTop:`${He(y)} ${x} ${f}`},"&-rtl":{direction:"rtl"}}}},Ma=n=>({zIndexPopup:n.zIndexPopupBase,footerPaddingBlock:n.paddingXS,footerPaddingInline:n.padding}),rs=Bs("Drawer",n=>{const s=Os(n,{});return[Ta(s),wa(s)]},Ma);var cs=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,a=Object.getOwnPropertySymbols(n);d<a.length;d++)s.indexOf(a[d])<0&&Object.prototype.propertyIsEnumerable.call(n,a[d])&&(t[a[d]]=n[a[d]]);return t};const Ea={distance:180},Ye=n=>{const{rootClassName:s,width:t,height:a,size:d="default",mask:l=!0,push:u=Ea,open:g,afterOpenChange:o,onClose:h,prefixCls:i,getContainer:c,panelRef:m=null,style:y,className:x,"aria-labelledby":f,visible:v,afterVisibleChange:C,maskStyle:k,drawerStyle:N,contentWrapperStyle:b,destroyOnClose:T,destroyOnHidden:E}=n,L=cs(n,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),I=Hs(),M=L.title?I:void 0,{getPopupContainer:D,getPrefixCls:O,direction:ae,className:ne,style:A,classNames:X,styles:re}=Ct("drawer"),Z=O("drawer",i),[me,be,ve]=rs(Z),G=c===void 0&&D?()=>D(document.body):c,pe=se({"no-mask":!l,[`${Z}-rtl`]:ae==="rtl"},s,be,ve),le=j.useMemo(()=>t??(d==="large"?736:378),[t,d]),ye=j.useMemo(()=>a??(d==="large"?736:378),[a,d]),_={motionName:Mt(Z,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},W=fe=>({motionName:Mt(Z,`panel-motion-${fe}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),ge=$s(),we=zs(m,ge),[Ne,je]=Vs("Drawer",L.zIndex),{classNames:z={},styles:_e={}}=L;return me(j.createElement(qs,{form:!0,space:!0},j.createElement(Us.Provider,{value:je},j.createElement(_a,Object.assign({prefixCls:Z,onClose:h,maskMotion:_,motion:W},L,{classNames:{mask:se(z.mask,X.mask),content:se(z.content,X.content),wrapper:se(z.wrapper,X.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},_e.mask),k),re.mask),content:Object.assign(Object.assign(Object.assign({},_e.content),N),re.content),wrapper:Object.assign(Object.assign(Object.assign({},_e.wrapper),b),re.wrapper)},open:g??v,mask:l,push:u,width:le,height:ye,style:Object.assign(Object.assign({},A),y),className:se(ne,x),rootClassName:pe,getContainer:G,afterOpenChange:o??C,panelRef:we,zIndex:Ne,"aria-labelledby":f??M,destroyOnClose:E??T}),j.createElement(ls,Object.assign({prefixCls:Z},L,{ariaId:M,onClose:h}))))))},Ra=n=>{const{prefixCls:s,style:t,className:a,placement:d="right"}=n,l=cs(n,["prefixCls","style","className","placement"]),{getPrefixCls:u}=j.useContext(bt),g=u("drawer",s),[o,h,i]=rs(g),c=se(g,`${g}-pure`,`${g}-${d}`,h,i,a);return o(j.createElement("div",{className:c,style:t},j.createElement(ls,Object.assign({prefixCls:g},l))))};Ye._InternalPanelDoNotUseOrYouWillBeFired=Ra;var Ia={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},La=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Ia}))},Xe=j.forwardRef(La),Aa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Pa=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Aa}))},$t=j.forwardRef(Pa);function Da(n,s,t){return typeof t=="boolean"?t:n.length?!0:Ws(s).some(d=>d.type===Jt)}var ds=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,a=Object.getOwnPropertySymbols(n);d<a.length;d++)s.indexOf(a[d])<0&&Object.prototype.propertyIsEnumerable.call(n,a[d])&&(t[a[d]]=n[a[d]]);return t};function ot({suffixCls:n,tagName:s,displayName:t}){return a=>j.forwardRef((l,u)=>j.createElement(a,Object.assign({ref:u,suffixCls:n,tagName:s},l)))}const Nt=j.forwardRef((n,s)=>{const{prefixCls:t,suffixCls:a,className:d,tagName:l}=n,u=ds(n,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:g}=j.useContext(bt),o=g("layout",t),[h,i,c]=Qt(o),m=a?`${o}-${a}`:o;return h(j.createElement(l,Object.assign({className:se(t||m,d,i,c),ref:s},u)))}),Ba=j.forwardRef((n,s)=>{const{direction:t}=j.useContext(bt),[a,d]=j.useState([]),{prefixCls:l,className:u,rootClassName:g,children:o,hasSider:h,tagName:i,style:c}=n,m=ds(n,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),y=Ks(m,["suffixCls"]),{getPrefixCls:x,className:f,style:v}=Ct("layout"),C=x("layout",l),k=Da(a,o,h),[N,b,T]=Qt(C),E=se(C,{[`${C}-has-sider`]:k,[`${C}-rtl`]:t==="rtl"},f,u,g,b,T),L=j.useMemo(()=>({siderHook:{addSider:I=>{d(M=>[].concat(Gs(M),[I]))},removeSider:I=>{d(M=>M.filter(D=>D!==I))}}}),[]);return N(j.createElement(Js.Provider,{value:L},j.createElement(i,Object.assign({ref:s,className:E,style:Object.assign(Object.assign({},v),c)},y),o)))}),Oa=ot({tagName:"div",displayName:"Layout"})(Ba),Fa=ot({suffixCls:"header",tagName:"header",displayName:"Header"})(Nt),Ha=ot({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Nt),$a=ot({suffixCls:"content",tagName:"main",displayName:"Content"})(Nt),Me=Oa;Me.Header=Fa;Me.Footer=Ha;Me.Content=$a;Me.Sider=Jt;Me._InternalSiderContext=Qs;var za={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},Va=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:za}))},zt=j.forwardRef(Va),qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},Ua=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:qa}))},Vt=j.forwardRef(Ua),Wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},Ka=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Wa}))},qt=j.forwardRef(Ka),Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Ja=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Ga}))},Ze=j.forwardRef(Ja),Qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},Ya=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Qa}))},dt=j.forwardRef(Ya),Xa={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},Za=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:Xa}))},en=j.forwardRef(Za),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},sn=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:tn}))},an=j.forwardRef(sn),nn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},ln=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:nn}))},Ut=j.forwardRef(ln),on={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},rn=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:on}))},cn=j.forwardRef(rn),dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},hn=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:dn}))},Wt=j.forwardRef(hn),un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},mn=function(s,t){return j.createElement(ue,ee({},s,{ref:t,icon:un}))},Kt=j.forwardRef(mn),pn=Object.defineProperty,tt=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable,Gt=(n,s,t)=>s in n?pn(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ft=(n,s)=>{for(var t in s||(s={}))hs.call(s,t)&&Gt(n,t,s[t]);if(tt)for(var t of tt(s))us.call(s,t)&&Gt(n,t,s[t]);return n},xt=(n,s)=>{var t={};for(var a in n)hs.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&tt)for(var a of tt(n))s.indexOf(a)<0&&us.call(n,a)&&(t[a]=n[a]);return t};/**
|
|
1
|
+
var Ts=Object.defineProperty;var Ms=(n,s,t)=>s in n?Ts(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var B=(n,s,t)=>Ms(n,typeof s!="symbol"?s+"":s,t);import{r as j,R as q,j as e,a as Es}from"./index-DoYvdLcS.js";import{P as Rs,Q as Is,_ as ee,c as se,U as ut,V as Ls,W as mt,d as St,X as be,Y as kt,Z as rt,$ as wt,a0 as As,a1 as Ct,a2 as Ps,a3 as Tt,a4 as Ds,g as Bs,m as Os,u as He,a5 as Fs,a6 as Hs,a7 as $s,a8 as zs,a9 as Vs,aa as qs,ab as Us,ac as Mt,C as bt,I as me,ad as Ws,ae as Jt,af as Ks,ag as Qt,ah as Gs,ai as Js,aj as Qs,e as oe,t as p,w as We,x as Ys,y as Te,j as Xs,k as Zs,l as ea,s as r,v as U,q as ie,ak as Yt,al as Ve,am as K,L as $e,an as ze,n as ta,ao as sa,o as Ke,ap as aa,aq as ke,S as Xt,B as F,ar as na,as as la,at as qe,au as oa,av as ve,aw as Et,J as Me,ax as Re,M as ia,ay as Zt,az as Je,G as pt,aA as Rt,H as gt,aB as ra,O as es,aC as ca,aD as da,aE as ha,aF as Le,aG as It,aH as ua,aI as Lt,aJ as ts,aK as ss,aL as Ae,aM as Pe,aN as as,aO as ct,aP as At,aQ as Pt,aR as Dt,aS as ma,aT as pa,A as ga,aU as Qe,aV as Bt,aW as fa,D as xa,z as R,E as va,aX as ya}from"./AppHeader.module-CjrmuYgF.js";var Ot=j.createContext(null),ns=j.createContext({}),ja=["prefixCls","className","containerRef"],Ca=function(s){var t=s.prefixCls,a=s.className,d=s.containerRef,l=Rs(s,ja),u=j.useContext(ns),g=u.panel,o=Is(g,d);return j.createElement("div",ee({className:se("".concat(t,"-content"),a),role:"dialog",ref:o},ut(s,{aria:!0}),{"aria-modal":"true"},l))};function Ft(n){return typeof n=="string"&&String(Number(n))===n?(Ls(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(n)):n}var Ht={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function ba(n,s){var t,a,d,l=n.prefixCls,u=n.open,g=n.placement,o=n.inline,h=n.push,i=n.forceRender,c=n.autoFocus,m=n.keyboard,y=n.classNames,x=n.rootClassName,f=n.rootStyle,v=n.zIndex,C=n.className,k=n.id,N=n.style,b=n.motion,T=n.width,E=n.height,L=n.children,I=n.mask,M=n.maskClosable,D=n.maskMotion,O=n.maskClassName,ae=n.maskStyle,ne=n.afterOpenChange,A=n.onClose,X=n.onMouseEnter,re=n.onMouseOver,Z=n.onMouseLeave,pe=n.onClick,ye=n.onKeyDown,ue=n.onKeyUp,G=n.styles,ge=n.drawerRender,le=j.useRef(),je=j.useRef(),_=j.useRef();j.useImperativeHandle(s,function(){return le.current});var W=function(de){var Be=de.keyCode,Oe=de.shiftKey;switch(Be){case rt.TAB:{if(Be===rt.TAB){if(!Oe&&document.activeElement===_.current){var Fe;(Fe=je.current)===null||Fe===void 0||Fe.focus({preventScroll:!0})}else if(Oe&&document.activeElement===je.current){var it;(it=_.current)===null||it===void 0||it.focus({preventScroll:!0})}}break}case rt.ESC:{A&&m&&(de.stopPropagation(),A(de));break}}};j.useEffect(function(){if(u&&c){var Y;(Y=le.current)===null||Y===void 0||Y.focus({preventScroll:!0})}},[u]);var fe=j.useState(!1),we=mt(fe,2),Ne=we[0],Ce=we[1],z=j.useContext(Ot),_e;typeof h=="boolean"?_e=h?{}:{distance:0}:_e=h||{};var xe=(t=(a=(d=_e)===null||d===void 0?void 0:d.distance)!==null&&a!==void 0?a:z==null?void 0:z.pushDistance)!==null&&t!==void 0?t:180,ce=j.useMemo(function(){return{pushDistance:xe,push:function(){Ce(!0)},pull:function(){Ce(!1)}}},[xe]);j.useEffect(function(){if(u){var Y;z==null||(Y=z.push)===null||Y===void 0||Y.call(z)}else{var de;z==null||(de=z.pull)===null||de===void 0||de.call(z)}},[u]),j.useEffect(function(){return function(){var Y;z==null||(Y=z.pull)===null||Y===void 0||Y.call(z)}},[]);var te=j.createElement(St,ee({key:"mask"},D,{visible:I&&u}),function(Y,de){var Be=Y.className,Oe=Y.style;return j.createElement("div",{className:se("".concat(l,"-mask"),Be,y==null?void 0:y.mask,O),style:be(be(be({},Oe),ae),G==null?void 0:G.mask),onClick:M&&u?A:void 0,ref:de})}),V=typeof b=="function"?b(g):b,Q={};if(Ne&&xe)switch(g){case"top":Q.transform="translateY(".concat(xe,"px)");break;case"bottom":Q.transform="translateY(".concat(-xe,"px)");break;case"left":Q.transform="translateX(".concat(xe,"px)");break;default:Q.transform="translateX(".concat(-xe,"px)");break}g==="left"||g==="right"?Q.width=Ft(T):Q.height=Ft(E);var Se={onMouseEnter:X,onMouseOver:re,onMouseLeave:Z,onClick:pe,onKeyDown:ye,onKeyUp:ue},Ge=j.createElement(St,ee({key:"panel"},V,{visible:u,forceRender:i,onVisibleChanged:function(de){ne==null||ne(de)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(Y,de){var Be=Y.className,Oe=Y.style,Fe=j.createElement(Ca,ee({id:k,containerRef:de,prefixCls:l,className:se(C,y==null?void 0:y.content),style:be(be({},N),G==null?void 0:G.content)},ut(n,{aria:!0}),Se),L);return j.createElement("div",ee({className:se("".concat(l,"-content-wrapper"),y==null?void 0:y.wrapper,Be),style:be(be(be({},Q),Oe),G==null?void 0:G.wrapper)},ut(n,{data:!0})),ge?ge(Fe):Fe)}),_t=be({},f);return v&&(_t.zIndex=v),j.createElement(Ot.Provider,{value:ce},j.createElement("div",{className:se(l,"".concat(l,"-").concat(g),x,kt(kt({},"".concat(l,"-open"),u),"".concat(l,"-inline"),o)),style:_t,tabIndex:-1,ref:le,onKeyDown:W},te,j.createElement("div",{tabIndex:0,ref:je,style:Ht,"aria-hidden":"true","data-sentinel":"start"}),Ge,j.createElement("div",{tabIndex:0,ref:_,style:Ht,"aria-hidden":"true","data-sentinel":"end"})))}var Na=j.forwardRef(ba),_a=function(s){var t=s.open,a=t===void 0?!1:t,d=s.prefixCls,l=d===void 0?"rc-drawer":d,u=s.placement,g=u===void 0?"right":u,o=s.autoFocus,h=o===void 0?!0:o,i=s.keyboard,c=i===void 0?!0:i,m=s.width,y=m===void 0?378:m,x=s.mask,f=x===void 0?!0:x,v=s.maskClosable,C=v===void 0?!0:v,k=s.getContainer,N=s.forceRender,b=s.afterOpenChange,T=s.destroyOnClose,E=s.onMouseEnter,L=s.onMouseOver,I=s.onMouseLeave,M=s.onClick,D=s.onKeyDown,O=s.onKeyUp,ae=s.panelRef,ne=j.useState(!1),A=mt(ne,2),X=A[0],re=A[1],Z=j.useState(!1),pe=mt(Z,2),ye=pe[0],ue=pe[1];wt(function(){ue(!0)},[]);var G=ye?a:!1,ge=j.useRef(),le=j.useRef();wt(function(){G&&(le.current=document.activeElement)},[G]);var je=function(Ne){var Ce;if(re(Ne),b==null||b(Ne),!Ne&&le.current&&!((Ce=ge.current)!==null&&Ce!==void 0&&Ce.contains(le.current))){var z;(z=le.current)===null||z===void 0||z.focus({preventScroll:!0})}},_=j.useMemo(function(){return{panel:ae}},[ae]);if(!N&&!X&&!G&&T)return null;var W={onMouseEnter:E,onMouseOver:L,onMouseLeave:I,onClick:M,onKeyDown:D,onKeyUp:O},fe=be(be({},s),{},{open:G,prefixCls:l,placement:g,autoFocus:h,keyboard:c,width:y,mask:f,maskClosable:C,inline:k===!1,afterOpenChange:je,ref:ge},W);return j.createElement(ns.Provider,{value:_},j.createElement(As,{open:G||N||X,autoDestroy:!1,getContainer:k,autoLock:f&&(G||X)},j.createElement(Na,fe)))};const ls=n=>{var s,t;const{prefixCls:a,ariaId:d,title:l,footer:u,extra:g,closable:o,loading:h,onClose:i,headerStyle:c,bodyStyle:m,footerStyle:y,children:x,classNames:f,styles:v}=n,C=Ct("drawer");let k;o===!1?k=void 0:o===void 0||o===!0?k="start":k=(o==null?void 0:o.placement)==="end"?"end":"start";const N=j.useCallback(I=>j.createElement("button",{type:"button",onClick:i,className:se(`${a}-close`,{[`${a}-close-${k}`]:k==="end"})},I),[i,a,k]),[b,T]=Ps(Tt(n),Tt(C),{closable:!0,closeIconRender:N}),E=()=>{var I,M;return!l&&!b?null:j.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(I=C.styles)===null||I===void 0?void 0:I.header),c),v==null?void 0:v.header),className:se(`${a}-header`,{[`${a}-header-close-only`]:b&&!l&&!g},(M=C.classNames)===null||M===void 0?void 0:M.header,f==null?void 0:f.header)},j.createElement("div",{className:`${a}-header-title`},k==="start"&&T,l&&j.createElement("div",{className:`${a}-title`,id:d},l)),g&&j.createElement("div",{className:`${a}-extra`},g),k==="end"&&T)},L=()=>{var I,M;if(!u)return null;const D=`${a}-footer`;return j.createElement("div",{className:se(D,(I=C.classNames)===null||I===void 0?void 0:I.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign(Object.assign({},(M=C.styles)===null||M===void 0?void 0:M.footer),y),v==null?void 0:v.footer)},u)};return j.createElement(j.Fragment,null,E(),j.createElement("div",{className:se(`${a}-body`,f==null?void 0:f.body,(s=C.classNames)===null||s===void 0?void 0:s.body),style:Object.assign(Object.assign(Object.assign({},(t=C.styles)===null||t===void 0?void 0:t.body),m),v==null?void 0:v.body)},h?j.createElement(Ds,{active:!0,title:!1,paragraph:{rows:5},className:`${a}-body-skeleton`}):x),L())},Sa=n=>{const s="100%";return{left:`translateX(-${s})`,right:`translateX(${s})`,top:`translateY(-${s})`,bottom:`translateY(${s})`}[n]},os=(n,s)=>({"&-enter, &-appear":Object.assign(Object.assign({},n),{"&-active":s}),"&-leave":Object.assign(Object.assign({},s),{"&-active":n})}),is=(n,s)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${s}`}}},os({opacity:n},{opacity:1})),ka=(n,s)=>[is(.7,s),os({transform:Sa(n)},{transform:"none"})],wa=n=>{const{componentCls:s,motionDurationSlow:t}=n;return{[s]:{[`${s}-mask-motion`]:is(0,t),[`${s}-panel-motion`]:["left","right","top","bottom"].reduce((a,d)=>Object.assign(Object.assign({},a),{[`&-${d}`]:ka(d,t)}),{})}}},Ta=n=>{const{borderRadiusSM:s,componentCls:t,zIndexPopup:a,colorBgMask:d,colorBgElevated:l,motionDurationSlow:u,motionDurationMid:g,paddingXS:o,padding:h,paddingLG:i,fontSizeLG:c,lineHeightLG:m,lineWidth:y,lineType:x,colorSplit:f,marginXS:v,colorIcon:C,colorIconHover:k,colorBgTextHover:N,colorBgTextActive:b,colorText:T,fontWeightStrong:E,footerPaddingBlock:L,footerPaddingInline:I,calc:M}=n,D=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${t}-left`]:{boxShadow:n.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:n.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:n.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:n.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:a,background:d,pointerEvents:"auto"},[D]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:`all ${u}`,"&-hidden":{display:"none"}},[`&-left > ${D}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:n.boxShadowDrawerLeft},[`&-right > ${D}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:n.boxShadowDrawerRight},[`&-top > ${D}`]:{top:0,insetInline:0,boxShadow:n.boxShadowDrawerUp},[`&-bottom > ${D}`]:{bottom:0,insetInline:0,boxShadow:n.boxShadowDrawerDown},[`${t}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${He(h)} ${He(i)}`,fontSize:c,lineHeight:m,borderBottom:`${He(y)} ${x} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:Object.assign({display:"inline-flex",width:M(c).add(o).equal(),height:M(c).add(o).equal(),borderRadius:s,justifyContent:"center",alignItems:"center",color:C,fontWeight:E,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${g}`,textRendering:"auto",[`&${t}-close-end`]:{marginInlineStart:v},[`&:not(${t}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:k,backgroundColor:N,textDecoration:"none"},"&:active":{backgroundColor:b}},Fs(n)),[`${t}-title`]:{flex:1,margin:0,fontWeight:n.fontWeightStrong,fontSize:c,lineHeight:m},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:i,overflow:"auto",[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${t}-footer`]:{flexShrink:0,padding:`${He(L)} ${He(I)}`,borderTop:`${He(y)} ${x} ${f}`},"&-rtl":{direction:"rtl"}}}},Ma=n=>({zIndexPopup:n.zIndexPopupBase,footerPaddingBlock:n.paddingXS,footerPaddingInline:n.padding}),rs=Bs("Drawer",n=>{const s=Os(n,{});return[Ta(s),wa(s)]},Ma);var cs=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,a=Object.getOwnPropertySymbols(n);d<a.length;d++)s.indexOf(a[d])<0&&Object.prototype.propertyIsEnumerable.call(n,a[d])&&(t[a[d]]=n[a[d]]);return t};const Ea={distance:180},Ye=n=>{const{rootClassName:s,width:t,height:a,size:d="default",mask:l=!0,push:u=Ea,open:g,afterOpenChange:o,onClose:h,prefixCls:i,getContainer:c,panelRef:m=null,style:y,className:x,"aria-labelledby":f,visible:v,afterVisibleChange:C,maskStyle:k,drawerStyle:N,contentWrapperStyle:b,destroyOnClose:T,destroyOnHidden:E}=n,L=cs(n,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),I=Hs(),M=L.title?I:void 0,{getPopupContainer:D,getPrefixCls:O,direction:ae,className:ne,style:A,classNames:X,styles:re}=Ct("drawer"),Z=O("drawer",i),[pe,ye,ue]=rs(Z),G=c===void 0&&D?()=>D(document.body):c,ge=se({"no-mask":!l,[`${Z}-rtl`]:ae==="rtl"},s,ye,ue),le=j.useMemo(()=>t??(d==="large"?736:378),[t,d]),je=j.useMemo(()=>a??(d==="large"?736:378),[a,d]),_={motionName:Mt(Z,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},W=xe=>({motionName:Mt(Z,`panel-motion-${xe}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),fe=$s(),we=zs(m,fe),[Ne,Ce]=Vs("Drawer",L.zIndex),{classNames:z={},styles:_e={}}=L;return pe(j.createElement(qs,{form:!0,space:!0},j.createElement(Us.Provider,{value:Ce},j.createElement(_a,Object.assign({prefixCls:Z,onClose:h,maskMotion:_,motion:W},L,{classNames:{mask:se(z.mask,X.mask),content:se(z.content,X.content),wrapper:se(z.wrapper,X.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},_e.mask),k),re.mask),content:Object.assign(Object.assign(Object.assign({},_e.content),N),re.content),wrapper:Object.assign(Object.assign(Object.assign({},_e.wrapper),b),re.wrapper)},open:g??v,mask:l,push:u,width:le,height:je,style:Object.assign(Object.assign({},A),y),className:se(ne,x),rootClassName:ge,getContainer:G,afterOpenChange:o??C,panelRef:we,zIndex:Ne,"aria-labelledby":f??M,destroyOnClose:E??T}),j.createElement(ls,Object.assign({prefixCls:Z},L,{ariaId:M,onClose:h}))))))},Ra=n=>{const{prefixCls:s,style:t,className:a,placement:d="right"}=n,l=cs(n,["prefixCls","style","className","placement"]),{getPrefixCls:u}=j.useContext(bt),g=u("drawer",s),[o,h,i]=rs(g),c=se(g,`${g}-pure`,`${g}-${d}`,h,i,a);return o(j.createElement("div",{className:c,style:t},j.createElement(ls,Object.assign({prefixCls:g},l))))};Ye._InternalPanelDoNotUseOrYouWillBeFired=Ra;var Ia={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},La=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Ia}))},Xe=j.forwardRef(La),Aa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Pa=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Aa}))},$t=j.forwardRef(Pa);function Da(n,s,t){return typeof t=="boolean"?t:n.length?!0:Ws(s).some(d=>d.type===Jt)}var ds=function(n,s){var t={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,a=Object.getOwnPropertySymbols(n);d<a.length;d++)s.indexOf(a[d])<0&&Object.prototype.propertyIsEnumerable.call(n,a[d])&&(t[a[d]]=n[a[d]]);return t};function ot({suffixCls:n,tagName:s,displayName:t}){return a=>j.forwardRef((l,u)=>j.createElement(a,Object.assign({ref:u,suffixCls:n,tagName:s},l)))}const Nt=j.forwardRef((n,s)=>{const{prefixCls:t,suffixCls:a,className:d,tagName:l}=n,u=ds(n,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:g}=j.useContext(bt),o=g("layout",t),[h,i,c]=Qt(o),m=a?`${o}-${a}`:o;return h(j.createElement(l,Object.assign({className:se(t||m,d,i,c),ref:s},u)))}),Ba=j.forwardRef((n,s)=>{const{direction:t}=j.useContext(bt),[a,d]=j.useState([]),{prefixCls:l,className:u,rootClassName:g,children:o,hasSider:h,tagName:i,style:c}=n,m=ds(n,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),y=Ks(m,["suffixCls"]),{getPrefixCls:x,className:f,style:v}=Ct("layout"),C=x("layout",l),k=Da(a,o,h),[N,b,T]=Qt(C),E=se(C,{[`${C}-has-sider`]:k,[`${C}-rtl`]:t==="rtl"},f,u,g,b,T),L=j.useMemo(()=>({siderHook:{addSider:I=>{d(M=>[].concat(Gs(M),[I]))},removeSider:I=>{d(M=>M.filter(D=>D!==I))}}}),[]);return N(j.createElement(Js.Provider,{value:L},j.createElement(i,Object.assign({ref:s,className:E,style:Object.assign(Object.assign({},v),c)},y),o)))}),Oa=ot({tagName:"div",displayName:"Layout"})(Ba),Fa=ot({suffixCls:"header",tagName:"header",displayName:"Header"})(Nt),Ha=ot({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Nt),$a=ot({suffixCls:"content",tagName:"main",displayName:"Content"})(Nt),Ee=Oa;Ee.Header=Fa;Ee.Footer=Ha;Ee.Content=$a;Ee.Sider=Jt;Ee._InternalSiderContext=Qs;var za={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},Va=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:za}))},zt=j.forwardRef(Va),qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},Ua=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:qa}))},Vt=j.forwardRef(Ua),Wa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},Ka=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Wa}))},qt=j.forwardRef(Ka),Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Ja=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Ga}))},Ze=j.forwardRef(Ja),Qa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},Ya=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Qa}))},dt=j.forwardRef(Ya),Xa={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},Za=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:Xa}))},en=j.forwardRef(Za),tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},sn=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:tn}))},an=j.forwardRef(sn),nn={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},ln=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:nn}))},Ut=j.forwardRef(ln),on={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},rn=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:on}))},cn=j.forwardRef(rn),dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},hn=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:dn}))},Wt=j.forwardRef(hn),un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},mn=function(s,t){return j.createElement(me,ee({},s,{ref:t,icon:un}))},Kt=j.forwardRef(mn),pn=Object.defineProperty,tt=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable,Gt=(n,s,t)=>s in n?pn(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t,ft=(n,s)=>{for(var t in s||(s={}))hs.call(s,t)&&Gt(n,t,s[t]);if(tt)for(var t of tt(s))us.call(s,t)&&Gt(n,t,s[t]);return n},xt=(n,s)=>{var t={};for(var a in n)hs.call(n,a)&&s.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&tt)for(var a of tt(n))s.indexOf(a)<0&&us.call(n,a)&&(t[a]=n[a]);return t};/**
|
|
2
2
|
* @license QR Code generator library (TypeScript)
|
|
3
3
|
* Copyright (c) Project Nayuki.
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
@@ -6,7 +6,7 @@ var Ts=Object.defineProperty;var Ms=(n,s,t)=>s in n?Ts(n,s,{enumerable:!0,config
|
|
|
6
6
|
* @license qrcode.react
|
|
7
7
|
* Copyright (c) Paul O'Shannessy
|
|
8
8
|
* SPDX-License-Identifier: ISC
|
|
9
|
-
*/var gn={L:Ue.QrCode.Ecc.LOW,M:Ue.QrCode.Ecc.MEDIUM,Q:Ue.QrCode.Ecc.QUARTILE,H:Ue.QrCode.Ecc.HIGH},ms=128,ps="L",gs="#FFFFFF",fs="#000000",xs=!1,vs=1,fn=4,xn=0,vn=.1;function ys(n,s=0){const t=[];return n.forEach(function(a,d){let l=null;a.forEach(function(u,g){if(!u&&l!==null){t.push(`M${l+s} ${d+s}h${g-l}v1H${l+s}z`),l=null;return}if(g===a.length-1){if(!u)return;l===null?t.push(`M${g+s},${d+s} h1v1H${g+s}z`):t.push(`M${l+s},${d+s} h${g+1-l}v1H${l+s}z`);return}u&&l===null&&(l=g)})}),t.join("")}function js(n,s){return n.slice().map((t,a)=>a<s.y||a>=s.y+s.h?t:t.map((d,l)=>l<s.x||l>=s.x+s.w?d:!1))}function yn(n,s,t,a){if(a==null)return null;const d=n.length+t*2,l=Math.floor(s*vn),u=d/s,g=(a.width||l)*u,o=(a.height||l)*u,h=a.x==null?n.length/2-g/2:a.x*u,i=a.y==null?n.length/2-o/2:a.y*u,c=a.opacity==null?1:a.opacity;let m=null;if(a.excavate){let x=Math.floor(h),f=Math.floor(i),v=Math.ceil(g+h-x),C=Math.ceil(o+i-f);m={x,y:f,w:v,h:C}}const y=a.crossOrigin;return{x:h,y:i,h:o,w:g,excavation:m,opacity:c,crossOrigin:y}}function jn(n,s){return s!=null?Math.max(Math.floor(s),0):n?fn:xn}function Cs({value:n,level:s,minVersion:t,includeMargin:a,marginSize:d,imageSettings:l,size:u,boostLevel:g}){let o=q.useMemo(()=>{const x=(Array.isArray(n)?n:[n]).reduce((f,v)=>(f.push(...Ue.QrSegment.makeSegments(v)),f),[]);return Ue.QrCode.encodeSegments(x,gn[s],t,void 0,void 0,g)},[n,s,t,g]);const{cells:h,margin:i,numCells:c,calculatedImageSettings:m}=q.useMemo(()=>{let y=o.getModules();const x=jn(a,d),f=y.length+x*2,v=yn(y,u,x,l);return{cells:y,margin:x,numCells:f,calculatedImageSettings:v}},[o,u,l,a,d]);return{qrcode:o,margin:i,cells:h,numCells:c,calculatedImageSettings:m}}var Cn=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),bs=q.forwardRef(function(s,t){const a=s,{value:d,size:l=ms,level:u=ps,bgColor:g=gs,fgColor:o=fs,includeMargin:h=xs,minVersion:i=vs,boostLevel:c,marginSize:m,imageSettings:y}=a,f=xt(a,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=f,C=xt(f,["style"]),k=y==null?void 0:y.src,N=q.useRef(null),b=q.useRef(null),T=q.useCallback(A=>{N.current=A,typeof t=="function"?t(A):t&&(t.current=A)},[t]),[E,L]=q.useState(!1),{margin:I,cells:M,numCells:D,calculatedImageSettings:O}=Cs({value:d,level:u,minVersion:i,boostLevel:c,includeMargin:h,marginSize:m,imageSettings:y,size:l});q.useEffect(()=>{if(N.current!=null){const A=N.current,X=A.getContext("2d");if(!X)return;let re=M;const Z=b.current,
|
|
9
|
+
*/var gn={L:Ue.QrCode.Ecc.LOW,M:Ue.QrCode.Ecc.MEDIUM,Q:Ue.QrCode.Ecc.QUARTILE,H:Ue.QrCode.Ecc.HIGH},ms=128,ps="L",gs="#FFFFFF",fs="#000000",xs=!1,vs=1,fn=4,xn=0,vn=.1;function ys(n,s=0){const t=[];return n.forEach(function(a,d){let l=null;a.forEach(function(u,g){if(!u&&l!==null){t.push(`M${l+s} ${d+s}h${g-l}v1H${l+s}z`),l=null;return}if(g===a.length-1){if(!u)return;l===null?t.push(`M${g+s},${d+s} h1v1H${g+s}z`):t.push(`M${l+s},${d+s} h${g+1-l}v1H${l+s}z`);return}u&&l===null&&(l=g)})}),t.join("")}function js(n,s){return n.slice().map((t,a)=>a<s.y||a>=s.y+s.h?t:t.map((d,l)=>l<s.x||l>=s.x+s.w?d:!1))}function yn(n,s,t,a){if(a==null)return null;const d=n.length+t*2,l=Math.floor(s*vn),u=d/s,g=(a.width||l)*u,o=(a.height||l)*u,h=a.x==null?n.length/2-g/2:a.x*u,i=a.y==null?n.length/2-o/2:a.y*u,c=a.opacity==null?1:a.opacity;let m=null;if(a.excavate){let x=Math.floor(h),f=Math.floor(i),v=Math.ceil(g+h-x),C=Math.ceil(o+i-f);m={x,y:f,w:v,h:C}}const y=a.crossOrigin;return{x:h,y:i,h:o,w:g,excavation:m,opacity:c,crossOrigin:y}}function jn(n,s){return s!=null?Math.max(Math.floor(s),0):n?fn:xn}function Cs({value:n,level:s,minVersion:t,includeMargin:a,marginSize:d,imageSettings:l,size:u,boostLevel:g}){let o=q.useMemo(()=>{const x=(Array.isArray(n)?n:[n]).reduce((f,v)=>(f.push(...Ue.QrSegment.makeSegments(v)),f),[]);return Ue.QrCode.encodeSegments(x,gn[s],t,void 0,void 0,g)},[n,s,t,g]);const{cells:h,margin:i,numCells:c,calculatedImageSettings:m}=q.useMemo(()=>{let y=o.getModules();const x=jn(a,d),f=y.length+x*2,v=yn(y,u,x,l);return{cells:y,margin:x,numCells:f,calculatedImageSettings:v}},[o,u,l,a,d]);return{qrcode:o,margin:i,cells:h,numCells:c,calculatedImageSettings:m}}var Cn=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),bs=q.forwardRef(function(s,t){const a=s,{value:d,size:l=ms,level:u=ps,bgColor:g=gs,fgColor:o=fs,includeMargin:h=xs,minVersion:i=vs,boostLevel:c,marginSize:m,imageSettings:y}=a,f=xt(a,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:v}=f,C=xt(f,["style"]),k=y==null?void 0:y.src,N=q.useRef(null),b=q.useRef(null),T=q.useCallback(A=>{N.current=A,typeof t=="function"?t(A):t&&(t.current=A)},[t]),[E,L]=q.useState(!1),{margin:I,cells:M,numCells:D,calculatedImageSettings:O}=Cs({value:d,level:u,minVersion:i,boostLevel:c,includeMargin:h,marginSize:m,imageSettings:y,size:l});q.useEffect(()=>{if(N.current!=null){const A=N.current,X=A.getContext("2d");if(!X)return;let re=M;const Z=b.current,pe=O!=null&&Z!==null&&Z.complete&&Z.naturalHeight!==0&&Z.naturalWidth!==0;pe&&O.excavation!=null&&(re=js(M,O.excavation));const ye=window.devicePixelRatio||1;A.height=A.width=l*ye;const ue=l/D*ye;X.scale(ue,ue),X.fillStyle=g,X.fillRect(0,0,D,D),X.fillStyle=o,Cn?X.fill(new Path2D(ys(re,I))):M.forEach(function(G,ge){G.forEach(function(le,je){le&&X.fillRect(je+I,ge+I,1,1)})}),O&&(X.globalAlpha=O.opacity),pe&&X.drawImage(Z,O.x+I,O.y+I,O.w,O.h)}}),q.useEffect(()=>{L(!1)},[k]);const ae=ft({height:l,width:l},v);let ne=null;return k!=null&&(ne=q.createElement("img",{src:k,key:k,style:{display:"none"},onLoad:()=>{L(!0)},ref:b,crossOrigin:O==null?void 0:O.crossOrigin})),q.createElement(q.Fragment,null,q.createElement("canvas",ft({style:ae,height:l,width:l,ref:T,role:"img"},C)),ne)});bs.displayName="QRCodeCanvas";var bn=q.forwardRef(function(s,t){const a=s,{value:d,size:l=ms,level:u=ps,bgColor:g=gs,fgColor:o=fs,includeMargin:h=xs,minVersion:i=vs,boostLevel:c,title:m,marginSize:y,imageSettings:x}=a,f=xt(a,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:v,cells:C,numCells:k,calculatedImageSettings:N}=Cs({value:d,level:u,minVersion:i,boostLevel:c,includeMargin:h,marginSize:y,imageSettings:x,size:l});let b=C,T=null;x!=null&&N!=null&&(N.excavation!=null&&(b=js(C,N.excavation)),T=q.createElement("image",{href:x.src,height:N.h,width:N.w,x:N.x+v,y:N.y+v,preserveAspectRatio:"none",opacity:N.opacity,crossOrigin:N.crossOrigin}));const E=ys(b,v);return q.createElement("svg",ft({height:l,width:l,viewBox:`0 0 ${k} ${k}`,ref:t,role:"img"},f),!!m&&q.createElement("title",null,m),q.createElement("path",{fill:g,d:`M0,0 h${k}v${k}H0z`,shapeRendering:"crispEdges"}),q.createElement("path",{fill:o,d:E,shapeRendering:"crispEdges"}),T)});bn.displayName="QRCodeSVG";const Nn=[{label:"Auto",value:"auto"},{label:"Opus 4.6 (1M)",value:"opus-4.6-1m",tokens:1e6},{label:"Sonnet 4.6",value:"sonnet-4.6",tokens:2e5},{label:"GLM5",value:"glm5",tokens:2e5},{label:"Kimi K2.5",value:"kimi-k2.5",tokens:2e5},{label:"MiniMax 2.1",value:"minimax-2.1",tokens:2e5},{label:"Qwen 3.5",value:"Qwen 3.5",tokens:2e5}],_n={calibrationModels:Nn},ht=_n.calibrationModels,Sn=[{value:"zh",short:"zh",label:"简体中文"},{value:"en",short:"en",label:"English"},{value:"zh-TW",short:"zh-TW",label:"繁體中文"},{value:"ko",short:"ko",label:"한국어"},{value:"ja",short:"ja",label:"日本語"},{value:"de",short:"de",label:"Deutsch"},{value:"es",short:"es",label:"Español"},{value:"fr",short:"fr",label:"Français"},{value:"it",short:"it",label:"Italiano"},{value:"da",short:"da",label:"Dansk"},{value:"pl",short:"pl",label:"Polski"},{value:"ru",short:"ru",label:"Русский"},{value:"ar",short:"ar",label:"العربية"},{value:"no",short:"no",label:"Norsk"},{value:"pt-BR",short:"pt-BR",label:"Português (Brasil)"},{value:"th",short:"th",label:"ไทย"},{value:"tr",short:"tr",label:"Türkçe"},{value:"uk",short:"uk",label:"Українська"}],kn=n=>{const s=t=>t.toUpperCase().split("").map(a=>String.fromCodePoint(127462+a.charCodeAt(0)-65)).join("");return!n||n.length!==2?s("CN"):s(n)},Ie=class Ie extends q.Component{constructor(t){super(t);B(this,"handleShowPrompts",()=>{this.setState({promptModalVisible:!0,promptData:this.extractUserPrompts()})});B(this,"handleExportPromptsTxt",()=>{const t=this.state.promptData;if(!t||t.length===0)return;const a=[];for(const g of t){const o=[],h=g.timestamp?new Date(g.timestamp).toLocaleString():"";h&&o.push(`${h}:
|
|
10
10
|
`);const i=(g.segments||[]).filter(c=>c.type==="text").map(c=>c.content);i.length>0&&o.push(i.join(`
|
|
11
11
|
`)),a.push(o.join(`
|
|
12
12
|
`))}if(a.length===0)return;const d=new Blob([a.join(`
|
|
@@ -23,7 +23,7 @@ var Ts=Object.defineProperty;var Ms=(n,s,t)=>s in n?Ts(n,s,{enumerable:!0,config
|
|
|
23
23
|
`))}return a.join(`
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
`)}renderProjectStatsContent(){const{projectStats:t,projectStatsLoading:a}=this.state;if(a)return e.jsx("div",{className:r.projectStatsCenter,children:e.jsx(Xt,{})});if(!t)return e.jsx("div",{className:r.projectStatsEmpty,children:p("ui.projectStats.noData")});const{summary:d,models:l,updatedAt:u}=t;l&&Object.entries(l).sort((h,i)=>i[1]-h[1]);const g={};if(t.files){for(const h of Object.values(t.files))if(h.models)for(const[i,c]of Object.entries(h.models))g[i]||(g[i]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),g[i].input+=c.input_tokens||0,g[i].output+=c.output_tokens||0,g[i].cacheRead+=c.cache_read_input_tokens||0,g[i].cacheCreation+=c.cache_creation_input_tokens||0,g[i].count+=c.count||0}const o=Object.entries(g).sort((h,i)=>i[1].count-h[1].count);return e.jsxs("div",{className:r.projectStatsContent,children:[u&&e.jsx("div",{className:r.projectStatsUpdated,children:p("ui.projectStats.updatedAt",{time:new Date(u).toLocaleString()})}),e.jsxs("div",{className:r.projectStatsSummary,children:[e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.requestCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.totalRequests")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.turnCount)??(d==null?void 0:d.sessionCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.turnCount")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.fileCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.totalFiles")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:U(d==null?void 0:d.input_tokens)}),e.jsx("div",{className:r.projectStatLabel,children:"Input Tokens"})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:U(d==null?void 0:d.output_tokens)}),e.jsx("div",{className:r.projectStatLabel,children:"Output Tokens"})]})]}),o.length>0&&e.jsxs("div",{className:r.projectStatsSection,children:[e.jsx("div",{className:r.projectStatsSectionTitle,children:p("ui.projectStats.modelUsage")}),o.map(([h,i])=>{const c=i.input+i.cacheRead+i.cacheCreation,m=c>0?(i.cacheRead/c*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.projectStatsModelCard,children:[e.jsxs("div",{className:r.projectStatsModelHeader,children:[e.jsx("span",{className:r.projectStatsModelName,children:h}),e.jsxs("span",{className:r.projectStatsModelCount,children:[i.count," reqs"]})]}),e.jsx("table",{className:r.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Token"}),e.jsx("td",{className:r.th,children:"input"}),e.jsx("td",{className:r.th,children:"output"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:U(c)}),e.jsx("td",{className:r.td,children:U(i.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Cache"}),e.jsx("td",{className:r.th,children:"create"}),e.jsx("td",{className:r.th,children:"read"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:U(i.cacheCreation)}),e.jsx("td",{className:r.td,children:U(i.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:r.td,children:[m,"%"]})]})]})})]},h)})]})]})}render(){const{requestCount:t,requests:a=[],viewMode:d,cacheType:l,onToggleViewMode:u,onImportLocalLogs:g,onLangChange:o,isLocalLog:h,localLogFile:i,projectName:c,collapseToolResults:m,onCollapseToolResultsChange:y,expandThinking:x,onExpandThinkingChange:f,showFullToolContent:v,onShowFullToolContentChange:C,expandDiff:k,onExpandDiffChange:N,filterIrrelevant:b,onFilterIrrelevantChange:T,logDir:E,onLogDirChange:L,updateInfo:I,onDismissUpdate:M,cliMode:D,terminalVisible:O,onToggleTerminal:ae,onReturnToWorkspaces:ne,contextWindow:A,serverCachedContent:X,resumeAutoChoice:re,onResumeAutoChoiceToggle:Z,onResumeAutoChoiceChange:me,themeColor:be,onThemeColorChange:ve,autoApproveSeconds:G,onAutoApproveChange:pe}=this.props,{countdownText:le}=this.state,ye=[{key:"import-local",icon:e.jsx(Ut,{}),label:p("ui.importLocalLogs"),onClick:g},{key:"export-prompts",icon:e.jsx(en,{}),label:p("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:e.jsx(zt,{}),label:p("ui.pluginManagement"),onClick:this.handleShowPlugins},{key:"switch-workspace",icon:e.jsx(Ut,{className:r.iconMirror}),label:e.jsx("span",{className:r.disabledMenuItem,children:p("ui.switchWorkspace")}),disabled:!0},{key:"process-management",icon:e.jsx(dt,{}),label:p("ui.processManagement"),onClick:this.handleShowProcesses},{key:"proxy-switch",icon:e.jsx($t,{}),label:p("ui.proxySwitch"),onClick:()=>this.setState({proxyModalVisible:!0})},{type:"divider"},{key:"project-stats",icon:e.jsx(Vt,{}),label:p("ui.projectStats"),onClick:this.handleShowProjectStats},...d==="raw"?[{key:"global-settings",icon:e.jsx(Wt,{}),label:p("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...d==="chat"?[{key:"display-settings",icon:e.jsx(Wt,{}),label:p("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:e.jsx(an,{}),label:p("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:e.jsx("div",{className:r.langGrid,children:Sn.map(_=>e.jsx(F,{size:"small",type:_.value===la()?"primary":"default",onClick:W=>{W.stopPropagation(),na(_.value),o&&o()},className:r.langBtn,children:_.label},_.value))})}]}];return e.jsxs("div",{className:r.headerBar,children:[e.jsxs(qe,{size:"middle",children:[e.jsx(oa,{menu:{items:ye,className:"logo-dropdown-menu"},trigger:["hover"],onOpenChange:_=>this.setState({logoDropdownOpen:_}),align:{offset:[-4,0]},children:e.jsx("span",{className:`${r.logoWrap}${this.state.logoDropdownOpen?` ${r.logoWrapActive}`:""}`,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`${r.logoImage}${this.state.logoDropdownOpen?` ${r.logoImageActive}`:""}`,children:[e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})})}),e.jsx(ze,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px",maxHeight:"80vh",overflowY:"auto"},children:e.jsxs(xe,{className:r.tokenStatsTag,children:[e.jsx(dt,{className:r.tokenStatsIcon}),p("ui.tokenStats")]})}),this.props.activeProxyId&&this.props.activeProxyId!=="max"&&(()=>{const _=(this.props.proxyProfiles||[]).find(W=>W.id===this.props.activeProxyId);return _?e.jsxs(xe,{className:r.proxyProfileTag,onClick:()=>this.setState({proxyModalVisible:!0}),children:[e.jsx($t,{className:r.proxySwapIcon}),_.name,_.activeModel?` · ${_.activeModel}`:""]}):null})(),(()=>{var Ne,je,z,_e,fe;let _=0;const W=ht.find(ce=>ce.value===this.state.calibrationModel),ge=W==null?void 0:W.tokens;if(!h){if(ge&&(A==null?void 0:A.used_percentage)!=null){const ce=V=>{var Se,Ge;const Q=(Ge=(Se=V.response)==null?void 0:Se.body)==null?void 0:Ge.usage;return((Q==null?void 0:Q.input_tokens)||0)+((Q==null?void 0:Q.cache_creation_input_tokens)||0)+((Q==null?void 0:Q.cache_read_input_tokens)||0)};let te=0;for(let V=a.length-1;V>=0;V--)if(Te(a[V])&&((je=(Ne=a[V].response)==null?void 0:Ne.body)!=null&&je.usage)){te=ce(a[V]);break}if(te>0){const V=ge*.835;_=Math.min(100,Math.max(0,Math.round(te/V*100)))}else{const V=A.context_window_size||2e5;_=Math.min(100,Math.max(0,Math.round(A.used_percentage*V/ge/83.5*100)))}}else if((A==null?void 0:A.used_percentage)!=null){const ce=this.state.settingsModel?Et(this.state.settingsModel):0,te=A.context_window_size||2e5;ce&&ce!==te?_=Math.min(100,Math.max(0,Math.round(A.used_percentage*te/ce/83.5*100))):_=Math.min(100,Math.max(0,Math.round(A.used_percentage/83.5*100)))}else if(a.length>0){const ce=te=>{var Q,Se;const V=(Se=(Q=te.response)==null?void 0:Q.body)==null?void 0:Se.usage;return((V==null?void 0:V.input_tokens)||0)+((V==null?void 0:V.cache_creation_input_tokens)||0)+((V==null?void 0:V.cache_read_input_tokens)||0)};for(let te=a.length-1;te>=0;te--)if(Te(a[te])&&((_e=(z=a[te].response)==null?void 0:z.body)!=null&&_e.usage)){const V=ce(a[te]),Se=(ge||(A==null?void 0:A.context_window_size)||Et(((fe=a[te].body)==null?void 0:fe.model)||this.state.settingsModel))*.835;Se>0&&V>0&&(_=Math.min(100,Math.max(0,Math.round(V/Se*100))));break}}}_===0&&this._lastContextPercent>0&&(_=this._lastContextPercent);const we=_>=80?"var(--color-error-light)":_>=60?"var(--color-warning-light)":"var(--color-success)";return h?e.jsx(xe,{className:`${r.liveTag} ${r.liveTagHistory}`,children:e.jsx("span",{className:r.liveTagText,children:p("ui.historyLog",{file:i})})}):e.jsx(ze,{content:this.state._cachePopoverOpen?this.renderCacheContentPopover(_):e.jsx("div",{className:r.cachePopoverPlaceholder}),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px"},onOpenChange:ce=>{this.setState({_cachePopoverOpen:ce}),ce||(this._cacheScrollInited=!1)},children:e.jsxs("span",{className:r.liveTag,style:{borderColor:we,color:we},children:[e.jsx("span",{className:r.liveTagFill,style:{width:`${_}%`,backgroundColor:we}}),e.jsx("span",{className:r.liveTagContent,children:e.jsxs("span",{className:r.liveTagText,children:[p("ui.liveMonitoring"),c?`:${c}`:""]})})]})})})(),I&&e.jsx(xe,{color:I.type==="completed"?"green":"orange",closable:!0,onClose:()=>M&&M(),children:I.type==="completed"?p("ui.update.completed",{version:I.version}):p("ui.update.majorAvailable",{version:I.version})})]}),e.jsxs(qe,{size:"middle",children:[le&&d==="raw"&&e.jsxs(xe,{style:{background:"var(--bg-surface)",border:"1px solid var(--border-hover)",color:le===p("ui.cacheExpired")?"var(--color-error-light)":"var(--text-secondary)"},children:[p("ui.cacheCountdown",{type:l?`(${l})`:""}),e.jsx("strong",{className:r.countdownStrong,children:le})]}),d==="chat"&&D&&!h&&this.state.localUrl&&e.jsxs(e.Fragment,{children:[this.state.countryFlag&&e.jsx(ze,{content:this.state.countryInfo?e.jsxs("div",{className:r.countryInfoPopover,children:[e.jsxs("div",{children:[this.state.countryFlag," ",this.state.countryInfo.country]}),this.state.countryInfo.region&&e.jsx("div",{children:this.state.countryInfo.region}),this.state.countryInfo.city&&e.jsx("div",{children:this.state.countryInfo.city}),this.state.countryInfo.org&&e.jsx("div",{className:r.countryInfoMeta,children:this.state.countryInfo.org}),this.state.countryInfo.ip&&e.jsx("div",{className:r.countryInfoMeta,children:this.state.countryInfo.ip})]}):null,trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 12px"},children:e.jsx(F,{className:r.compactBtnNoBorder,icon:e.jsx("span",{className:r.countryFlagIcon,children:this.state.countryFlag})})}),e.jsx(ze,{content:e.jsxs("div",{className:r.qrcodePopover,children:[e.jsx("div",{className:r.qrcodeTitle,children:p("ui.scanToCoding")}),e.jsx(bs,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),e.jsx(Ee,{readOnly:!0,value:this.state.localUrl,className:r.qrcodeUrlInput,suffix:e.jsx(Ve,{className:r.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px"},children:e.jsx(F,{className:r.compactBtnNoBorder,icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r.svgIcon,children:[e.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),e.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})})]}),D&&d==="chat"&&!h&&e.jsx(F,{className:r.compactBtn,type:O?"primary":"default",ghost:O,icon:e.jsx(Ze,{}),onClick:ae,children:p("ui.terminal")}),e.jsx(F,{className:r.compactBtn,type:d==="raw"?"primary":"default",icon:d==="raw"?e.jsx(cn,{}):e.jsx(Xe,{}),onClick:u,children:d==="raw"?p("ui.chatMode"):p("ui.rawMode")})]}),e.jsxs(ke,{title:`${p("ui.userPrompt")} (${this.state.promptData.length}${p("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[e.jsx("div",{className:r.promptExportBar,children:e.jsx(F,{icon:e.jsx(ia,{}),onClick:this.handleExportPromptsTxt,children:p("ui.exportPromptsTxt")})}),e.jsx(Zt,{activeKey:this.state.promptViewMode,onChange:_=>this.setState({promptViewMode:_}),size:"small",items:[{key:"original",label:p("ui.promptModeOriginal")},{key:"context",label:p("ui.promptModeContext")},{key:"text",label:p("ui.promptModeText")}]}),this.state.promptViewMode==="text"?e.jsx("textarea",{readOnly:!0,className:r.promptTextarea,value:this.buildTextModeContent()}):e.jsxs("div",{className:r.promptScrollArea,children:[this.state.promptData.length===0&&e.jsx("div",{className:r.promptEmpty,children:p("ui.noPrompt")}),this.state.promptData.map((_,W)=>{const ge=_.timestamp?new Date(_.timestamp).toLocaleString():p("ui.unknownTime");return e.jsxs("div",{children:[e.jsxs("div",{className:r.promptTimestamp,children:[ge,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(_):this.renderTextPrompt(_)]},W)})]})]}),e.jsxs(Ye,{title:p("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[e.jsxs("div",{className:r.settingsGroupBox,children:[e.jsx("div",{className:r.settingsGroupTitle,children:p("ui.chatDisplaySwitches")}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.collapseToolResults")}),e.jsx(Re,{checked:!!m,onChange:_=>y&&y(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.expandThinking")}),e.jsx(Re,{checked:!!x,onChange:_=>f&&f(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.showFullToolContent")}),e.jsx(Re,{checked:!!v,onChange:_=>C&&C(_)})]})]}),e.jsxs("div",{className:r.settingsGroupBox,children:[e.jsx("div",{className:r.settingsGroupTitle,children:p("ui.userPreferences")}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.resumeAutoChoice")}),e.jsx(Re,{checked:!!re,onChange:_=>Z&&Z(_)})]}),re&&e.jsx("div",{className:r.settingsItem,children:e.jsxs(Je.Group,{value:re,onChange:_=>me&&me(_.target.value),size:"small",children:[e.jsx(Je,{value:"continue",children:p("ui.resumeAutoChoice.continue")}),e.jsx(Je,{value:"new",children:p("ui.resumeAutoChoice.new")})]})}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.permission.autoApprove.setting")}),e.jsx($e,{size:"small",value:G||0,onChange:_=>pe&&pe(_),options:[{label:p("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20},{label:"30s",value:30},{label:"60s",value:60}],style:{width:100}})]})]}),e.jsx("div",{className:r.settingsGroupBox,children:e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.themeColor")}),e.jsx($e,{size:"small",value:be||"dark",onChange:_=>ve&&ve(_),options:[{label:p("ui.themeColor.dark"),value:"dark"},{label:p("ui.themeColor.light"),value:"light"}],style:{width:140}})]})})]}),e.jsxs(Ye,{title:e.jsxs("span",{children:[p("ui.globalSettings")," ",e.jsx(ie,{doc:"GlobalSettings"})]}),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.filterIrrelevant")}),e.jsx(Re,{checked:!!b,onChange:_=>T&&T(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.expandDiff")}),e.jsx(Re,{checked:!!k,onChange:_=>N&&N(_)})]}),e.jsx("div",{className:r.settingsDivider}),e.jsx("div",{className:r.settingsLabel,children:p("ui.logDirTitle")}),e.jsx(Ee,{className:r.logDirInput,value:this.state.logDirDraft??E,onChange:_=>this.setState({logDirDraft:_.target.value}),onBlur:()=>{const _=this.state.logDirDraft;_!=null&&_!==E&&(L==null||L(_)),this.setState({logDirDraft:null})},onPressEnter:()=>{const _=this.state.logDirDraft;_!=null&&_!==E&&(L==null||L(_)),this.setState({logDirDraft:null})},placeholder:"~/.claude/cc-viewer"})]}),e.jsx(Ye,{title:e.jsxs("span",{children:[e.jsx(Vt,{className:r.titleIcon}),p("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),e.jsxs(ke,{title:e.jsxs("span",{children:[e.jsx(zt,{className:r.titleIcon}),p("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:e.jsxs("div",{className:r.pluginModalFooter,children:[e.jsxs("div",{className:r.pluginModalFooterLeft,children:[e.jsx(F,{icon:e.jsx(Rt,{}),onClick:this.handleAddPlugin,children:p("ui.plugins.add")}),e.jsx(F,{icon:e.jsx(qt,{}),onClick:this.handleShowCdnModal,children:p("ui.plugins.cdnInstall")})]}),e.jsx(F,{icon:e.jsx(gt,{}),onClick:this.handleReloadPlugins,children:p("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&e.jsxs("div",{className:r.pluginDirHint,children:[e.jsxs("span",{className:r.pluginDirLabel,children:[p("ui.plugins.pluginsDir"),":"]})," ",e.jsx("code",{className:r.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?e.jsxs("div",{className:r.pluginEmpty,children:[e.jsx("div",{className:r.pluginEmptyTitle,children:p("ui.plugins.empty")}),e.jsx("div",{className:r.pluginEmptyHint,children:p("ui.plugins.emptyHint")})]}):e.jsx("div",{className:r.pluginList,children:this.state.pluginsList.map(_=>e.jsxs("div",{className:r.pluginItem,children:[e.jsxs("div",{className:r.pluginInfo,children:[e.jsx("span",{className:r.pluginName,children:_.name}),e.jsx("span",{className:r.pluginFile,children:_.file}),_.hooks.length>0&&e.jsx("span",{className:r.pluginHooks,children:_.hooks.map(W=>e.jsx("span",{className:r.pluginHookTag,children:W},W))})]}),e.jsxs("div",{className:r.pluginActions,children:[e.jsx(Re,{size:"small",checked:_.enabled,onChange:W=>this.handleTogglePlugin(_.name,W)}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(pt,{}),onClick:()=>this.handleDeletePlugin(_.file,_.name)})]})]},_.file))})]}),e.jsx(ke,{title:p("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:e.jsx("p",{children:this.state.deleteTarget?p("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(qt,{className:r.titleIcon}),p("ui.plugins.cdnInstall")]}),open:this.state.cdnModalVisible,onCancel:this.handleCdnCancel,onOk:this.handleCdnInstall,confirmLoading:this.state.cdnLoading,okText:p("ui.plugins.cdnInstallBtn"),cancelText:p("ui.cancel"),width:480,children:e.jsxs("div",{children:[e.jsx("div",{className:r.cdnUrlLabel,children:p("ui.plugins.cdnUrl")}),e.jsx(Ee,{placeholder:p("ui.plugins.cdnUrlPlaceholder"),value:this.state.cdnUrl,onChange:this.handleCdnUrlChange,onPressEnter:this.handleCdnInstall,className:r.cdnInput})]})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(dt,{className:r.titleIcon}),p("ui.processManagement")]}),open:this.state.processModalVisible,onCancel:()=>this.setState({processModalVisible:!1}),footer:e.jsx(F,{icon:e.jsx(gt,{}),onClick:this.fetchProcesses,loading:this.state.processLoading,children:p("ui.processManagement.refresh")}),width:780,children:e.jsx(ra,{dataSource:this.state.processList,rowKey:"pid",loading:this.state.processLoading,size:"middle",pagination:!1,columns:[{title:p("ui.processManagement.port"),dataIndex:"port",width:80,render:_=>_?e.jsx("a",{href:`${window.location.protocol}//127.0.0.1:${_}`,target:"_blank",rel:"noopener noreferrer",children:_}):""},{title:"PID",dataIndex:"pid",width:80},{title:p("ui.processManagement.command"),dataIndex:"command",ellipsis:!0},{title:p("ui.processManagement.startTime"),dataIndex:"startTime",width:200},{title:p("ui.processManagement.action"),width:100,render:(_,W)=>W.isCurrent?e.jsx(F,{size:"small",className:r.currentProcessBtn,children:p("ui.processManagement.current")}):e.jsx(F,{size:"small",danger:!0,onClick:()=>this.handleKillProcess(W.pid),children:p("ui.processManagement.kill")})}]})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(es,{apiEndpoint:oe("/api/open-profile-dir"),title:p("ui.proxy.openConfigDir"),size:16})," ",p("ui.proxySwitch")," ",e.jsx(ie,{doc:"ProxySwitch",zIndex:1100})]}),open:this.state.proxyModalVisible,onCancel:()=>this.setState({proxyModalVisible:!1,editingProxy:null}),footer:null,width:520,children:this.renderProxyProfileList()})]})}renderProxyProfileList(){const t=this.props.proxyProfiles||[],a=this.props.activeProxyId||"max",{editingProxy:d,editForm:l}=this.state;return e.jsxs("div",{children:[e.jsxs("div",{className:r.proxyWarning,children:["⚠️ ",p("ui.proxy.maxWarning")]}),e.jsx("div",{className:r.proxyList,children:t.map(u=>{var g;return e.jsxs("div",{className:`${r.proxyItem} ${u.id===a?r.proxyItemActive:""}`,children:[e.jsxs("div",{className:r.proxyItemMain,onClick:()=>{if(u.id!==a){const o={active:u.id,profiles:t};this.props.onProxyProfileChange(o)}},children:[e.jsx(Je,{checked:u.id===a,style:{marginRight:8}}),e.jsxs("div",{className:r.proxyItemInfo,children:[e.jsxs("div",{className:r.proxyItemNameRow,children:[e.jsx("span",{className:r.proxyItemName,children:u.name}),u.id==="max"&&e.jsx(xe,{className:r.proxyBuiltinTag,children:p("ui.proxy.builtin")})]}),u.id==="max"&&this.props.defaultConfig&&e.jsxs("div",{className:r.proxyItemDetail,children:[(()=>{try{return new URL(this.props.defaultConfig.origin).host}catch{return this.props.defaultConfig.origin}})(),this.props.defaultConfig.authType?` · ${this.props.defaultConfig.authType}`:"",this.props.defaultConfig.apiKey?` · ${this.props.defaultConfig.apiKey}`:"",this.props.defaultConfig.model?` · ${this.props.defaultConfig.model}`:""]}),u.id!=="max"&&u.baseURL&&e.jsxs("div",{className:r.proxyItemDetail,children:[(()=>{try{return new URL(u.baseURL).host}catch{return u.baseURL}})(),u.activeModel?` · ${u.activeModel}`:(g=u.models)!=null&&g.length?` · ${u.models[0]}`:""]})]})]}),u.id!=="max"&&e.jsxs("div",{className:r.proxyItemActions,children:[e.jsx(F,{type:"text",size:"small",icon:e.jsx(ca,{}),onClick:()=>this.setState({editingProxy:u.id,editForm:{name:u.name||"",baseURL:u.baseURL||"",apiKey:u.apiKey||"",models:(u.models||[]).join(", "),activeModel:u.activeModel||""}})}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(pt,{}),onClick:()=>{ke.confirm({title:p("ui.proxy.deleteProxy"),content:p("ui.proxy.deleteConfirm",{name:u.name}),okType:"danger",onOk:()=>{const o=t.filter(i=>i.id!==u.id),h=a===u.id?"max":a;this.props.onProxyProfileChange({active:h,profiles:o})}})}})]})]},u.id)})}),d&&e.jsxs("div",{className:r.proxyEditForm,children:[e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.name")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Ee,{size:"small",value:l.name,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,name:g}}))}})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.baseURL")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Ee,{size:"small",value:l.baseURL,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,baseURL:g}}))},placeholder:"https://api.example.com"})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.apiKey")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Ee.Password,{size:"small",value:l.apiKey,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,apiKey:g}}))},placeholder:"sk-..."})]}),e.jsx("div",{className:r.proxyEditDivider}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.models")}),e.jsx(Ee,{size:"small",value:l.models,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,models:g}}))},placeholder:"model-1, model-2"})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.activeModel")}),e.jsx($e,{size:"small",className:r.fullWidthSelect,value:l.activeModel||void 0,onChange:u=>this.setState(g=>({editForm:{...g.editForm,activeModel:u}})),placeholder:p("ui.proxy.activeModel"),children:(l.models||"").split(",").map(u=>u.trim()).filter(Boolean).map(u=>e.jsx($e.Option,{value:u,children:u},u))})]}),e.jsxs("div",{className:r.proxyEditBtns,children:[e.jsx(F,{size:"small",icon:e.jsx(da,{}),type:"primary",onClick:()=>{var h,i,c;if(!((h=l.name)!=null&&h.trim())||!((i=l.baseURL)!=null&&i.trim())||!((c=l.apiKey)!=null&&c.trim())){K.warning(p("ui.proxy.requiredFields"));return}const u=(l.models||"").split(",").map(m=>m.trim()).filter(Boolean),g={id:d==="__new__"?`proxy_${Date.now()}`:d,name:l.name.trim(),baseURL:l.baseURL.trim(),apiKey:l.apiKey.trim(),models:u,activeModel:l.activeModel||u[0]||""};let o;d==="__new__"?o=[...t,g]:o=t.map(m=>m.id===d?{...m,...g,id:m.id}:m),this.props.onProxyProfileChange({active:a,profiles:o}),this.setState({editingProxy:null})},children:p("ui.proxy.save")}),e.jsx(F,{size:"small",icon:e.jsx(ha,{}),onClick:()=>this.setState({editingProxy:null}),children:p("ui.proxy.cancel")})]})]}),!d&&e.jsx(F,{block:!0,type:"dashed",icon:e.jsx(Rt,{}),style:{marginTop:12},onClick:()=>this.setState({editingProxy:"__new__",editForm:{name:"",baseURL:"",apiKey:"",models:"",activeModel:""}}),children:p("ui.proxy.addProxy")})]})}};B(Ie,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let st=Ie;const wn="_centerEmpty_42t2k_1",Tn="_scrollContainer_42t2k_8",Mn="_listItem_42t2k_15",En="_listItemActive_42t2k_29",Rn="_itemContent_42t2k_46",In="_itemHeader_42t2k_51",Ln="_tagNoMargin_42t2k_59",An="_modelName_42t2k_64",Pn="_modelNameMain_42t2k_69",Dn="_time_42t2k_73",Bn="_detailRow_42t2k_79",On="_urlText_42t2k_86",Fn="_duration_42t2k_95",Hn="_statusOk_42t2k_100",$n="_statusErr_42t2k_106",zn="_statusDefault_42t2k_111",Vn="_usageBox_42t2k_116",qn="_cacheDot_42t2k_126",Un="_cacheDotLoss_42t2k_135",Wn="_cacheDotNormal_42t2k_140",Kn="_tagMainAgent_42t2k_144",Gn="_tagPlan_42t2k_150",Jn="_tagMuted_42t2k_156",Qn="_tooltipPreLine_42t2k_162",$={centerEmpty:wn,scrollContainer:Tn,listItem:Mn,listItemActive:En,itemContent:Rn,itemHeader:In,tagNoMargin:Ln,modelName:An,modelNameMain:Pn,time:Dn,detailRow:Bn,urlText:On,duration:Fn,statusOk:Hn,statusErr:$n,statusDefault:zn,usageBox:Vn,cacheDot:qn,cacheDotLoss:Un,cacheDotNormal:Wn,tagMainAgent:Kn,tagPlan:Gn,tagMuted:Jn,tooltipPreLine:Qn};class Yn extends q.Component{constructor(t){super(t);B(this,"handleKeyDown",t=>{if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;const{requests:a,selectedIndex:d,onSelect:l}=this.props;if(!a.length)return;t.preventDefault();const u=d??0,g=t.key==="ArrowUp"?Math.max(0,u-1):Math.min(a.length-1,u+1);g!==u&&l(g)});this.activeItemRef=q.createRef()}componentDidMount(){this.scrollToSelected(!0)}shouldComponentUpdate(t){return t.requests!==this.props.requests||t.selectedIndex!==this.props.selectedIndex||t.scrollCenter!==this.props.scrollCenter||t.cacheLossMap!==this.props.cacheLossMap}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.selectedIndex!==this.props.selectedIndex&&(this.scrollToSelected(!1),this.activeItemRef.current&&this.activeItemRef.current.focus({preventScroll:!0}))}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:a,onSelect:d}=this.props;return t.length===0?e.jsx("div",{className:$.centerEmpty,children:e.jsx(Le,{description:p("ui.waitingRequests")})}):e.jsx("div",{className:$.scrollContainer,onKeyDown:this.handleKeyDown,children:e.jsx(It,{dataSource:t,size:"small",split:!1,renderItem:(l,u)=>{var T,E,L;const g=new Date(l.timestamp).toLocaleTimeString("zh-CN"),o=u===a,h=l.response&&l.response.status<400,i=l.response&&l.response.status>=400,c=ua((T=l.body)==null?void 0:T.model),m=u+1<t.length?t[u+1]:null,{type:y,subType:x}=Ke(l,m),f=(L=(E=l.response)==null?void 0:E.body)==null?void 0:L.usage,v=f?(f.input_tokens||0)+(f.cache_read_input_tokens||0)+(f.cache_creation_input_tokens||0):null,C=(f==null?void 0:f.output_tokens)||null,k=(f==null?void 0:f.cache_read_input_tokens)||0,N=(f==null?void 0:f.cache_creation_input_tokens)||0;let b=l.url;try{const I=new URL(l.url);b=I.host+I.pathname}catch{}return e.jsx(It.Item,{ref:o?this.activeItemRef:void 0,tabIndex:0,onClick:()=>d(u),className:`${$.listItem} ${o?$.listItemActive:""}`,children:e.jsxs("div",{className:$.itemContent,children:[e.jsxs("div",{className:$.itemHeader,children:[y==="MainAgent"?e.jsx(xe,{className:`${$.tagNoMargin} ${$.tagMainAgent}`,children:"MainAgent"}):y==="Plan"?e.jsx(xe,{className:`${$.tagNoMargin} ${$.tagPlan}`,children:Lt(y,x)}):y==="Count"||y==="Preflight"?e.jsx(xe,{className:`${$.tagNoMargin} ${$.tagMuted}`,children:y}):e.jsx(xe,{className:$.tagNoMargin,children:Lt(y,x)}),c&&e.jsx("span",{className:`${$.modelName} ${y==="MainAgent"?$.modelNameMain:""}`,children:c}),e.jsx("span",{className:$.time,children:g})]}),e.jsxs("div",{className:$.detailRow,children:[e.jsx("span",{className:$.urlText,title:l.url,children:b}),l.duration&&e.jsxs("span",{className:$.duration,children:[l.duration,"ms"]}),l.response&&e.jsx("span",{className:h?$.statusOk:i?$.statusErr:$.statusDefault,children:l.response.status})]}),f&&e.jsxs("div",{className:$.usageBox,children:[e.jsxs("div",{children:["token: output:",U(C)||0,", input: ",U(v)||0]}),(k>0||N>0)&&e.jsx("div",{children:(()=>{var O;const I=(O=this.props.cacheLossMap)==null?void 0:O.get(u),M={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let D;if(I){const ne=(I.reasons||[I.reason]).map(A=>p(M[A]||M.key_change)).join(`
|
|
26
|
+
`)}renderProjectStatsContent(){const{projectStats:t,projectStatsLoading:a}=this.state;if(a)return e.jsx("div",{className:r.projectStatsCenter,children:e.jsx(Xt,{})});if(!t)return e.jsx("div",{className:r.projectStatsEmpty,children:p("ui.projectStats.noData")});const{summary:d,models:l,updatedAt:u}=t;l&&Object.entries(l).sort((h,i)=>i[1]-h[1]);const g={};if(t.files){for(const h of Object.values(t.files))if(h.models)for(const[i,c]of Object.entries(h.models))g[i]||(g[i]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),g[i].input+=c.input_tokens||0,g[i].output+=c.output_tokens||0,g[i].cacheRead+=c.cache_read_input_tokens||0,g[i].cacheCreation+=c.cache_creation_input_tokens||0,g[i].count+=c.count||0}const o=Object.entries(g).sort((h,i)=>i[1].count-h[1].count);return e.jsxs("div",{className:r.projectStatsContent,children:[u&&e.jsx("div",{className:r.projectStatsUpdated,children:p("ui.projectStats.updatedAt",{time:new Date(u).toLocaleString()})}),e.jsxs("div",{className:r.projectStatsSummary,children:[e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.requestCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.totalRequests")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.turnCount)??(d==null?void 0:d.sessionCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.turnCount")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:(d==null?void 0:d.fileCount)??0}),e.jsx("div",{className:r.projectStatLabel,children:p("ui.projectStats.totalFiles")})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:U(d==null?void 0:d.input_tokens)}),e.jsx("div",{className:r.projectStatLabel,children:"Input Tokens"})]}),e.jsxs("div",{className:r.projectStatCard,children:[e.jsx("div",{className:r.projectStatValue,children:U(d==null?void 0:d.output_tokens)}),e.jsx("div",{className:r.projectStatLabel,children:"Output Tokens"})]})]}),o.length>0&&e.jsxs("div",{className:r.projectStatsSection,children:[e.jsx("div",{className:r.projectStatsSectionTitle,children:p("ui.projectStats.modelUsage")}),o.map(([h,i])=>{const c=i.input+i.cacheRead+i.cacheCreation,m=c>0?(i.cacheRead/c*100).toFixed(1):"0.0";return e.jsxs("div",{className:r.projectStatsModelCard,children:[e.jsxs("div",{className:r.projectStatsModelHeader,children:[e.jsx("span",{className:r.projectStatsModelName,children:h}),e.jsxs("span",{className:r.projectStatsModelCount,children:[i.count," reqs"]})]}),e.jsx("table",{className:r.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Token"}),e.jsx("td",{className:r.th,children:"input"}),e.jsx("td",{className:r.th,children:"output"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:U(c)}),e.jsx("td",{className:r.td,children:U(i.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:"Cache"}),e.jsx("td",{className:r.th,children:"create"}),e.jsx("td",{className:r.th,children:"read"})]}),e.jsxs("tr",{className:r.rowBorder,children:[e.jsx("td",{className:r.label}),e.jsx("td",{className:r.td,children:U(i.cacheCreation)}),e.jsx("td",{className:r.td,children:U(i.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:r.label,children:p("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:r.td,children:[m,"%"]})]})]})})]},h)})]})]})}render(){const{requestCount:t,requests:a=[],viewMode:d,cacheType:l,onToggleViewMode:u,onImportLocalLogs:g,onLangChange:o,isLocalLog:h,localLogFile:i,projectName:c,collapseToolResults:m,onCollapseToolResultsChange:y,expandThinking:x,onExpandThinkingChange:f,showFullToolContent:v,onShowFullToolContentChange:C,expandDiff:k,onExpandDiffChange:N,filterIrrelevant:b,onFilterIrrelevantChange:T,logDir:E,onLogDirChange:L,updateInfo:I,onDismissUpdate:M,cliMode:D,terminalVisible:O,onToggleTerminal:ae,onReturnToWorkspaces:ne,contextWindow:A,serverCachedContent:X,resumeAutoChoice:re,onResumeAutoChoiceToggle:Z,onResumeAutoChoiceChange:pe,themeColor:ye,onThemeColorChange:ue,autoApproveSeconds:G,onAutoApproveChange:ge}=this.props,{countdownText:le}=this.state,je=[{key:"import-local",icon:e.jsx(Ut,{}),label:p("ui.importLocalLogs"),onClick:g},{key:"export-prompts",icon:e.jsx(en,{}),label:p("ui.exportPrompts"),onClick:this.handleShowPrompts},{key:"plugin-management",icon:e.jsx(zt,{}),label:p("ui.pluginManagement"),onClick:this.handleShowPlugins},{key:"switch-workspace",icon:e.jsx(Ut,{className:r.iconMirror}),label:e.jsx("span",{className:r.disabledMenuItem,children:p("ui.switchWorkspace")}),disabled:!0},{key:"process-management",icon:e.jsx(dt,{}),label:p("ui.processManagement"),onClick:this.handleShowProcesses},{key:"proxy-switch",icon:e.jsx($t,{}),label:p("ui.proxySwitch"),onClick:()=>this.setState({proxyModalVisible:!0})},{type:"divider"},{key:"project-stats",icon:e.jsx(Vt,{}),label:p("ui.projectStats"),onClick:this.handleShowProjectStats},...d==="raw"?[{key:"global-settings",icon:e.jsx(Wt,{}),label:p("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}]:[],...d==="chat"?[{key:"display-settings",icon:e.jsx(Wt,{}),label:p("ui.settings"),onClick:()=>this.setState({settingsDrawerVisible:!0})}]:[],{key:"language",icon:e.jsx(an,{}),label:p("ui.languageSettings"),children:[{key:"lang-grid-container",type:"group",label:e.jsx("div",{className:r.langGrid,children:Sn.map(_=>e.jsx(F,{size:"small",type:_.value===la()?"primary":"default",onClick:W=>{W.stopPropagation(),na(_.value),o&&o()},className:r.langBtn,children:_.label},_.value))})}]}];return e.jsxs("div",{className:r.headerBar,children:[e.jsxs(qe,{size:"middle",children:[e.jsx(oa,{menu:{items:je,className:"logo-dropdown-menu"},trigger:["hover"],onOpenChange:_=>this.setState({logoDropdownOpen:_}),align:{offset:[-4,0]},children:e.jsx("span",{className:`${r.logoWrap}${this.state.logoDropdownOpen?` ${r.logoWrapActive}`:""}`,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`${r.logoImage}${this.state.logoDropdownOpen?` ${r.logoImageActive}`:""}`,children:[e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})})}),e.jsx(ze,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px",maxHeight:"80vh",overflowY:"auto"},children:e.jsxs(ve,{className:r.tokenStatsTag,children:[e.jsx(dt,{className:r.tokenStatsIcon}),p("ui.tokenStats")]})}),this.props.activeProxyId&&this.props.activeProxyId!=="max"&&(()=>{const _=(this.props.proxyProfiles||[]).find(W=>W.id===this.props.activeProxyId);return _?e.jsxs(ve,{className:r.proxyProfileTag,onClick:()=>this.setState({proxyModalVisible:!0}),children:[e.jsx($t,{className:r.proxySwapIcon}),_.name,_.activeModel?` · ${_.activeModel}`:""]}):null})(),(()=>{var Ne,Ce,z,_e,xe;let _=0;const W=ht.find(ce=>ce.value===this.state.calibrationModel),fe=W==null?void 0:W.tokens;if(!h){if(fe&&(A==null?void 0:A.used_percentage)!=null){const ce=V=>{var Se,Ge;const Q=(Ge=(Se=V.response)==null?void 0:Se.body)==null?void 0:Ge.usage;return((Q==null?void 0:Q.input_tokens)||0)+((Q==null?void 0:Q.cache_creation_input_tokens)||0)+((Q==null?void 0:Q.cache_read_input_tokens)||0)};let te=0;for(let V=a.length-1;V>=0;V--)if(Te(a[V])&&((Ce=(Ne=a[V].response)==null?void 0:Ne.body)!=null&&Ce.usage)){te=ce(a[V]);break}if(te>0){const V=fe*.835;_=Math.min(100,Math.max(0,Math.round(te/V*100)))}else{const V=A.context_window_size||2e5;_=Math.min(100,Math.max(0,Math.round(A.used_percentage*V/fe/83.5*100)))}}else if((A==null?void 0:A.used_percentage)!=null){const ce=this.state.settingsModel?Et(this.state.settingsModel):0,te=A.context_window_size||2e5;ce&&ce!==te?_=Math.min(100,Math.max(0,Math.round(A.used_percentage*te/ce/83.5*100))):_=Math.min(100,Math.max(0,Math.round(A.used_percentage/83.5*100)))}else if(a.length>0){const ce=te=>{var Q,Se;const V=(Se=(Q=te.response)==null?void 0:Q.body)==null?void 0:Se.usage;return((V==null?void 0:V.input_tokens)||0)+((V==null?void 0:V.cache_creation_input_tokens)||0)+((V==null?void 0:V.cache_read_input_tokens)||0)};for(let te=a.length-1;te>=0;te--)if(Te(a[te])&&((_e=(z=a[te].response)==null?void 0:z.body)!=null&&_e.usage)){const V=ce(a[te]),Se=(fe||(A==null?void 0:A.context_window_size)||Et(((xe=a[te].body)==null?void 0:xe.model)||this.state.settingsModel))*.835;Se>0&&V>0&&(_=Math.min(100,Math.max(0,Math.round(V/Se*100))));break}}}_===0&&this._lastContextPercent>0&&(_=this._lastContextPercent);const we=_>=80?"var(--color-error-light)":_>=60?"var(--color-warning-light)":"var(--color-success)";return h?e.jsx(ve,{className:`${r.liveTag} ${r.liveTagHistory}`,children:e.jsx("span",{className:r.liveTagText,children:p("ui.historyLog",{file:i})})}):e.jsx(ze,{content:this.state._cachePopoverOpen?this.renderCacheContentPopover(_):e.jsx("div",{className:r.cachePopoverPlaceholder}),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px"},onOpenChange:ce=>{this.setState({_cachePopoverOpen:ce}),ce||(this._cacheScrollInited=!1)},children:e.jsxs("span",{className:r.liveTag,style:{borderColor:we,color:we},children:[e.jsx("span",{className:r.liveTagFill,style:{width:`${_}%`,backgroundColor:we}}),e.jsx("span",{className:r.liveTagContent,children:e.jsxs("span",{className:r.liveTagText,children:[p("ui.liveMonitoring"),c?`:${c}`:""]})})]})})})(),I&&e.jsx(ve,{color:I.type==="completed"?"green":"orange",closable:!0,onClose:()=>M&&M(),children:I.type==="completed"?p("ui.update.completed",{version:I.version}):p("ui.update.majorAvailable",{version:I.version})})]}),e.jsxs(qe,{size:"middle",children:[le&&d==="raw"&&e.jsxs(ve,{style:{background:"var(--bg-surface)",border:"1px solid var(--border-hover)",color:le===p("ui.cacheExpired")?"var(--color-error-light)":"var(--text-secondary)"},children:[p("ui.cacheCountdown",{type:l?`(${l})`:""}),e.jsx("strong",{className:r.countdownStrong,children:le})]}),d==="chat"&&D&&!h&&this.state.localUrl&&e.jsxs(e.Fragment,{children:[this.state.countryFlag&&e.jsx(ze,{content:this.state.countryInfo?e.jsxs("div",{className:r.countryInfoPopover,children:[e.jsxs("div",{children:[this.state.countryFlag," ",this.state.countryInfo.country]}),this.state.countryInfo.region&&e.jsx("div",{children:this.state.countryInfo.region}),this.state.countryInfo.city&&e.jsx("div",{children:this.state.countryInfo.city}),this.state.countryInfo.org&&e.jsx("div",{className:r.countryInfoMeta,children:this.state.countryInfo.org}),this.state.countryInfo.ip&&e.jsx("div",{className:r.countryInfoMeta,children:this.state.countryInfo.ip})]}):null,trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 12px"},children:e.jsx(F,{className:r.compactBtnNoBorder,icon:e.jsx("span",{className:r.countryFlagIcon,children:this.state.countryFlag})})}),e.jsx(Me,{checked:ye==="light",onChange:_=>ue&&ue(_?"light":"dark"),checkedChildren:"雪山白",unCheckedChildren:"曜石黑"}),e.jsx(ze,{content:e.jsxs("div",{className:r.qrcodePopover,children:[e.jsx("div",{className:r.qrcodeTitle,children:p("ui.scanToCoding")}),e.jsx(bs,{value:this.state.localUrl,size:200,bgColor:"#141414",fgColor:"#d9d9d9",level:"M"}),e.jsx(Re,{readOnly:!0,value:this.state.localUrl,className:r.qrcodeUrlInput,suffix:e.jsx(Ve,{className:r.qrcodeUrlCopy,onClick:()=>{navigator.clipboard.writeText(this.state.localUrl).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})}})})]}),trigger:"hover",placement:"bottomRight",overlayInnerStyle:{background:"var(--bg-elevated)",border:"1px solid var(--border-hover)",borderRadius:8,padding:"8px 8px"},children:e.jsx(F,{className:r.compactBtnNoBorder,icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r.svgIcon,children:[e.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}),e.jsx("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"})]})})})]}),D&&d==="chat"&&!h&&e.jsx(F,{className:r.compactBtn,type:O?"primary":"default",ghost:O,icon:e.jsx(Ze,{}),onClick:ae,children:p("ui.terminal")}),e.jsx(F,{className:r.compactBtn,type:d==="raw"?"primary":"default",icon:d==="raw"?e.jsx(cn,{}):e.jsx(Xe,{}),onClick:u,children:d==="raw"?p("ui.chatMode"):p("ui.rawMode")})]}),e.jsxs(ke,{title:`${p("ui.userPrompt")} (${this.state.promptData.length}${p("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[e.jsx("div",{className:r.promptExportBar,children:e.jsx(F,{icon:e.jsx(ia,{}),onClick:this.handleExportPromptsTxt,children:p("ui.exportPromptsTxt")})}),e.jsx(Zt,{activeKey:this.state.promptViewMode,onChange:_=>this.setState({promptViewMode:_}),size:"small",items:[{key:"original",label:p("ui.promptModeOriginal")},{key:"context",label:p("ui.promptModeContext")},{key:"text",label:p("ui.promptModeText")}]}),this.state.promptViewMode==="text"?e.jsx("textarea",{readOnly:!0,className:r.promptTextarea,value:this.buildTextModeContent()}):e.jsxs("div",{className:r.promptScrollArea,children:[this.state.promptData.length===0&&e.jsx("div",{className:r.promptEmpty,children:p("ui.noPrompt")}),this.state.promptData.map((_,W)=>{const fe=_.timestamp?new Date(_.timestamp).toLocaleString():p("ui.unknownTime");return e.jsxs("div",{children:[e.jsxs("div",{className:r.promptTimestamp,children:[fe,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(_):this.renderTextPrompt(_)]},W)})]})]}),e.jsxs(Ye,{title:p("ui.settings"),placement:"left",width:360,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[e.jsxs("div",{className:r.settingsGroupBox,children:[e.jsx("div",{className:r.settingsGroupTitle,children:p("ui.chatDisplaySwitches")}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.collapseToolResults")}),e.jsx(Me,{checked:!!m,onChange:_=>y&&y(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.expandThinking")}),e.jsx(Me,{checked:!!x,onChange:_=>f&&f(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.showFullToolContent")}),e.jsx(Me,{checked:!!v,onChange:_=>C&&C(_)})]})]}),e.jsxs("div",{className:r.settingsGroupBox,children:[e.jsx("div",{className:r.settingsGroupTitle,children:p("ui.userPreferences")}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.resumeAutoChoice")}),e.jsx(Me,{checked:!!re,onChange:_=>Z&&Z(_)})]}),re&&e.jsx("div",{className:r.settingsItem,children:e.jsxs(Je.Group,{value:re,onChange:_=>pe&&pe(_.target.value),size:"small",children:[e.jsx(Je,{value:"continue",children:p("ui.resumeAutoChoice.continue")}),e.jsx(Je,{value:"new",children:p("ui.resumeAutoChoice.new")})]})}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.permission.autoApprove.setting")}),e.jsx($e,{size:"small",value:G||0,onChange:_=>ge&&ge(_),options:[{label:p("ui.permission.autoApprove.off"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20},{label:"30s",value:30},{label:"60s",value:60}],style:{width:100}})]})]}),e.jsx("div",{className:r.settingsGroupBox,children:e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.themeColor")}),e.jsx($e,{size:"small",value:ye||"dark",onChange:_=>ue&&ue(_),options:[{label:p("ui.themeColor.dark"),value:"dark"},{label:p("ui.themeColor.light"),value:"light"}],style:{width:140}})]})})]}),e.jsxs(Ye,{title:e.jsxs("span",{children:[p("ui.globalSettings")," ",e.jsx(ie,{doc:"GlobalSettings"})]}),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.filterIrrelevant")}),e.jsx(Me,{checked:!!b,onChange:_=>T&&T(_)})]}),e.jsxs("div",{className:r.settingsItem,children:[e.jsx("span",{className:r.settingsLabel,children:p("ui.expandDiff")}),e.jsx(Me,{checked:!!k,onChange:_=>N&&N(_)})]}),e.jsx("div",{className:r.settingsDivider}),e.jsx("div",{className:r.settingsLabel,children:p("ui.logDirTitle")}),e.jsx(Re,{className:r.logDirInput,value:this.state.logDirDraft??E,onChange:_=>this.setState({logDirDraft:_.target.value}),onBlur:()=>{const _=this.state.logDirDraft;_!=null&&_!==E&&(L==null||L(_)),this.setState({logDirDraft:null})},onPressEnter:()=>{const _=this.state.logDirDraft;_!=null&&_!==E&&(L==null||L(_)),this.setState({logDirDraft:null})},placeholder:"~/.claude/cc-viewer"})]}),e.jsx(Ye,{title:e.jsxs("span",{children:[e.jsx(Vt,{className:r.titleIcon}),p("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()}),e.jsxs(ke,{title:e.jsxs("span",{children:[e.jsx(zt,{className:r.titleIcon}),p("ui.pluginManagement")]}),open:this.state.pluginModalVisible,onCancel:()=>this.setState({pluginModalVisible:!1}),footer:e.jsxs("div",{className:r.pluginModalFooter,children:[e.jsxs("div",{className:r.pluginModalFooterLeft,children:[e.jsx(F,{icon:e.jsx(Rt,{}),onClick:this.handleAddPlugin,children:p("ui.plugins.add")}),e.jsx(F,{icon:e.jsx(qt,{}),onClick:this.handleShowCdnModal,children:p("ui.plugins.cdnInstall")})]}),e.jsx(F,{icon:e.jsx(gt,{}),onClick:this.handleReloadPlugins,children:p("ui.plugins.reload")})]}),width:560,children:[this.state.pluginsDir&&e.jsxs("div",{className:r.pluginDirHint,children:[e.jsxs("span",{className:r.pluginDirLabel,children:[p("ui.plugins.pluginsDir"),":"]})," ",e.jsx("code",{className:r.pluginDirPath,onClick:()=>{navigator.clipboard.writeText(this.state.pluginsDir).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})},children:this.state.pluginsDir})]}),this.state.pluginsList.length===0?e.jsxs("div",{className:r.pluginEmpty,children:[e.jsx("div",{className:r.pluginEmptyTitle,children:p("ui.plugins.empty")}),e.jsx("div",{className:r.pluginEmptyHint,children:p("ui.plugins.emptyHint")})]}):e.jsx("div",{className:r.pluginList,children:this.state.pluginsList.map(_=>e.jsxs("div",{className:r.pluginItem,children:[e.jsxs("div",{className:r.pluginInfo,children:[e.jsx("span",{className:r.pluginName,children:_.name}),e.jsx("span",{className:r.pluginFile,children:_.file}),_.hooks.length>0&&e.jsx("span",{className:r.pluginHooks,children:_.hooks.map(W=>e.jsx("span",{className:r.pluginHookTag,children:W},W))})]}),e.jsxs("div",{className:r.pluginActions,children:[e.jsx(Me,{size:"small",checked:_.enabled,onChange:W=>this.handleTogglePlugin(_.name,W)}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(pt,{}),onClick:()=>this.handleDeletePlugin(_.file,_.name)})]})]},_.file))})]}),e.jsx(ke,{title:p("ui.plugins.delete"),open:this.state.deleteConfirmVisible,onCancel:()=>this.setState({deleteConfirmVisible:!1,deleteTarget:null}),onOk:this.handleDeletePluginConfirm,okType:"danger",okText:"OK",cancelText:"Cancel",children:e.jsx("p",{children:this.state.deleteTarget?p("ui.plugins.deleteConfirm",{name:this.state.deleteTarget.name}):""})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(qt,{className:r.titleIcon}),p("ui.plugins.cdnInstall")]}),open:this.state.cdnModalVisible,onCancel:this.handleCdnCancel,onOk:this.handleCdnInstall,confirmLoading:this.state.cdnLoading,okText:p("ui.plugins.cdnInstallBtn"),cancelText:p("ui.cancel"),width:480,children:e.jsxs("div",{children:[e.jsx("div",{className:r.cdnUrlLabel,children:p("ui.plugins.cdnUrl")}),e.jsx(Re,{placeholder:p("ui.plugins.cdnUrlPlaceholder"),value:this.state.cdnUrl,onChange:this.handleCdnUrlChange,onPressEnter:this.handleCdnInstall,className:r.cdnInput})]})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(dt,{className:r.titleIcon}),p("ui.processManagement")]}),open:this.state.processModalVisible,onCancel:()=>this.setState({processModalVisible:!1}),footer:e.jsx(F,{icon:e.jsx(gt,{}),onClick:this.fetchProcesses,loading:this.state.processLoading,children:p("ui.processManagement.refresh")}),width:780,children:e.jsx(ra,{dataSource:this.state.processList,rowKey:"pid",loading:this.state.processLoading,size:"middle",pagination:!1,columns:[{title:p("ui.processManagement.port"),dataIndex:"port",width:80,render:_=>_?e.jsx("a",{href:`${window.location.protocol}//127.0.0.1:${_}`,target:"_blank",rel:"noopener noreferrer",children:_}):""},{title:"PID",dataIndex:"pid",width:80},{title:p("ui.processManagement.command"),dataIndex:"command",ellipsis:!0},{title:p("ui.processManagement.startTime"),dataIndex:"startTime",width:200},{title:p("ui.processManagement.action"),width:100,render:(_,W)=>W.isCurrent?e.jsx(F,{size:"small",className:r.currentProcessBtn,children:p("ui.processManagement.current")}):e.jsx(F,{size:"small",danger:!0,onClick:()=>this.handleKillProcess(W.pid),children:p("ui.processManagement.kill")})}]})}),e.jsx(ke,{title:e.jsxs("span",{children:[e.jsx(es,{apiEndpoint:oe("/api/open-profile-dir"),title:p("ui.proxy.openConfigDir"),size:16})," ",p("ui.proxySwitch")," ",e.jsx(ie,{doc:"ProxySwitch",zIndex:1100})]}),open:this.state.proxyModalVisible,onCancel:()=>this.setState({proxyModalVisible:!1,editingProxy:null}),footer:null,width:520,children:this.renderProxyProfileList()})]})}renderProxyProfileList(){const t=this.props.proxyProfiles||[],a=this.props.activeProxyId||"max",{editingProxy:d,editForm:l}=this.state;return e.jsxs("div",{children:[e.jsxs("div",{className:r.proxyWarning,children:["⚠️ ",p("ui.proxy.maxWarning")]}),e.jsx("div",{className:r.proxyList,children:t.map(u=>{var g;return e.jsxs("div",{className:`${r.proxyItem} ${u.id===a?r.proxyItemActive:""}`,children:[e.jsxs("div",{className:r.proxyItemMain,onClick:()=>{if(u.id!==a){const o={active:u.id,profiles:t};this.props.onProxyProfileChange(o)}},children:[e.jsx(Je,{checked:u.id===a,style:{marginRight:8}}),e.jsxs("div",{className:r.proxyItemInfo,children:[e.jsxs("div",{className:r.proxyItemNameRow,children:[e.jsx("span",{className:r.proxyItemName,children:u.name}),u.id==="max"&&e.jsx(ve,{className:r.proxyBuiltinTag,children:p("ui.proxy.builtin")})]}),u.id==="max"&&this.props.defaultConfig&&e.jsxs("div",{className:r.proxyItemDetail,children:[(()=>{try{return new URL(this.props.defaultConfig.origin).host}catch{return this.props.defaultConfig.origin}})(),this.props.defaultConfig.authType?` · ${this.props.defaultConfig.authType}`:"",this.props.defaultConfig.apiKey?` · ${this.props.defaultConfig.apiKey}`:"",this.props.defaultConfig.model?` · ${this.props.defaultConfig.model}`:""]}),u.id!=="max"&&u.baseURL&&e.jsxs("div",{className:r.proxyItemDetail,children:[(()=>{try{return new URL(u.baseURL).host}catch{return u.baseURL}})(),u.activeModel?` · ${u.activeModel}`:(g=u.models)!=null&&g.length?` · ${u.models[0]}`:""]})]})]}),u.id!=="max"&&e.jsxs("div",{className:r.proxyItemActions,children:[e.jsx(F,{type:"text",size:"small",icon:e.jsx(ca,{}),onClick:()=>this.setState({editingProxy:u.id,editForm:{name:u.name||"",baseURL:u.baseURL||"",apiKey:u.apiKey||"",models:(u.models||[]).join(", "),activeModel:u.activeModel||""}})}),e.jsx(F,{type:"text",size:"small",danger:!0,icon:e.jsx(pt,{}),onClick:()=>{ke.confirm({title:p("ui.proxy.deleteProxy"),content:p("ui.proxy.deleteConfirm",{name:u.name}),okType:"danger",onOk:()=>{const o=t.filter(i=>i.id!==u.id),h=a===u.id?"max":a;this.props.onProxyProfileChange({active:h,profiles:o})}})}})]})]},u.id)})}),d&&e.jsxs("div",{className:r.proxyEditForm,children:[e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.name")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Re,{size:"small",value:l.name,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,name:g}}))}})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.baseURL")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Re,{size:"small",value:l.baseURL,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,baseURL:g}}))},placeholder:"https://api.example.com"})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsxs("label",{children:[p("ui.proxy.apiKey")," ",e.jsx("span",{className:r.proxyRequired,children:"*"})]}),e.jsx(Re.Password,{size:"small",value:l.apiKey,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,apiKey:g}}))},placeholder:"sk-..."})]}),e.jsx("div",{className:r.proxyEditDivider}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.models")}),e.jsx(Re,{size:"small",value:l.models,onChange:u=>{const g=u.target.value;this.setState(o=>({editForm:{...o.editForm,models:g}}))},placeholder:"model-1, model-2"})]}),e.jsxs("div",{className:r.proxyEditRow,children:[e.jsx("label",{children:p("ui.proxy.activeModel")}),e.jsx($e,{size:"small",className:r.fullWidthSelect,value:l.activeModel||void 0,onChange:u=>this.setState(g=>({editForm:{...g.editForm,activeModel:u}})),placeholder:p("ui.proxy.activeModel"),children:(l.models||"").split(",").map(u=>u.trim()).filter(Boolean).map(u=>e.jsx($e.Option,{value:u,children:u},u))})]}),e.jsxs("div",{className:r.proxyEditBtns,children:[e.jsx(F,{size:"small",icon:e.jsx(da,{}),type:"primary",onClick:()=>{var h,i,c;if(!((h=l.name)!=null&&h.trim())||!((i=l.baseURL)!=null&&i.trim())||!((c=l.apiKey)!=null&&c.trim())){K.warning(p("ui.proxy.requiredFields"));return}const u=(l.models||"").split(",").map(m=>m.trim()).filter(Boolean),g={id:d==="__new__"?`proxy_${Date.now()}`:d,name:l.name.trim(),baseURL:l.baseURL.trim(),apiKey:l.apiKey.trim(),models:u,activeModel:l.activeModel||u[0]||""};let o;d==="__new__"?o=[...t,g]:o=t.map(m=>m.id===d?{...m,...g,id:m.id}:m),this.props.onProxyProfileChange({active:a,profiles:o}),this.setState({editingProxy:null})},children:p("ui.proxy.save")}),e.jsx(F,{size:"small",icon:e.jsx(ha,{}),onClick:()=>this.setState({editingProxy:null}),children:p("ui.proxy.cancel")})]})]}),!d&&e.jsx(F,{block:!0,type:"dashed",icon:e.jsx(Rt,{}),style:{marginTop:12},onClick:()=>this.setState({editingProxy:"__new__",editForm:{name:"",baseURL:"",apiKey:"",models:"",activeModel:""}}),children:p("ui.proxy.addProxy")})]})}};B(Ie,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let st=Ie;const wn="_centerEmpty_42t2k_1",Tn="_scrollContainer_42t2k_8",Mn="_listItem_42t2k_15",En="_listItemActive_42t2k_29",Rn="_itemContent_42t2k_46",In="_itemHeader_42t2k_51",Ln="_tagNoMargin_42t2k_59",An="_modelName_42t2k_64",Pn="_modelNameMain_42t2k_69",Dn="_time_42t2k_73",Bn="_detailRow_42t2k_79",On="_urlText_42t2k_86",Fn="_duration_42t2k_95",Hn="_statusOk_42t2k_100",$n="_statusErr_42t2k_106",zn="_statusDefault_42t2k_111",Vn="_usageBox_42t2k_116",qn="_cacheDot_42t2k_126",Un="_cacheDotLoss_42t2k_135",Wn="_cacheDotNormal_42t2k_140",Kn="_tagMainAgent_42t2k_144",Gn="_tagPlan_42t2k_150",Jn="_tagMuted_42t2k_156",Qn="_tooltipPreLine_42t2k_162",$={centerEmpty:wn,scrollContainer:Tn,listItem:Mn,listItemActive:En,itemContent:Rn,itemHeader:In,tagNoMargin:Ln,modelName:An,modelNameMain:Pn,time:Dn,detailRow:Bn,urlText:On,duration:Fn,statusOk:Hn,statusErr:$n,statusDefault:zn,usageBox:Vn,cacheDot:qn,cacheDotLoss:Un,cacheDotNormal:Wn,tagMainAgent:Kn,tagPlan:Gn,tagMuted:Jn,tooltipPreLine:Qn};class Yn extends q.Component{constructor(t){super(t);B(this,"handleKeyDown",t=>{if(t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;const{requests:a,selectedIndex:d,onSelect:l}=this.props;if(!a.length)return;t.preventDefault();const u=d??0,g=t.key==="ArrowUp"?Math.max(0,u-1):Math.min(a.length-1,u+1);g!==u&&l(g)});this.activeItemRef=q.createRef()}componentDidMount(){this.scrollToSelected(!0)}shouldComponentUpdate(t){return t.requests!==this.props.requests||t.selectedIndex!==this.props.selectedIndex||t.scrollCenter!==this.props.scrollCenter||t.cacheLossMap!==this.props.cacheLossMap}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.selectedIndex!==this.props.selectedIndex&&(this.scrollToSelected(!1),this.activeItemRef.current&&this.activeItemRef.current.focus({preventScroll:!0}))}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:a,onSelect:d}=this.props;return t.length===0?e.jsx("div",{className:$.centerEmpty,children:e.jsx(Le,{description:p("ui.waitingRequests")})}):e.jsx("div",{className:$.scrollContainer,onKeyDown:this.handleKeyDown,children:e.jsx(It,{dataSource:t,size:"small",split:!1,renderItem:(l,u)=>{var T,E,L;const g=new Date(l.timestamp).toLocaleTimeString("zh-CN"),o=u===a,h=l.response&&l.response.status<400,i=l.response&&l.response.status>=400,c=ua((T=l.body)==null?void 0:T.model),m=u+1<t.length?t[u+1]:null,{type:y,subType:x}=Ke(l,m),f=(L=(E=l.response)==null?void 0:E.body)==null?void 0:L.usage,v=f?(f.input_tokens||0)+(f.cache_read_input_tokens||0)+(f.cache_creation_input_tokens||0):null,C=(f==null?void 0:f.output_tokens)||null,k=(f==null?void 0:f.cache_read_input_tokens)||0,N=(f==null?void 0:f.cache_creation_input_tokens)||0;let b=l.url;try{const I=new URL(l.url);b=I.host+I.pathname}catch{}return e.jsx(It.Item,{ref:o?this.activeItemRef:void 0,tabIndex:0,onClick:()=>d(u),className:`${$.listItem} ${o?$.listItemActive:""}`,children:e.jsxs("div",{className:$.itemContent,children:[e.jsxs("div",{className:$.itemHeader,children:[y==="MainAgent"?e.jsx(ve,{className:`${$.tagNoMargin} ${$.tagMainAgent}`,children:"MainAgent"}):y==="Plan"?e.jsx(ve,{className:`${$.tagNoMargin} ${$.tagPlan}`,children:Lt(y,x)}):y==="Count"||y==="Preflight"?e.jsx(ve,{className:`${$.tagNoMargin} ${$.tagMuted}`,children:y}):e.jsx(ve,{className:$.tagNoMargin,children:Lt(y,x)}),c&&e.jsx("span",{className:`${$.modelName} ${y==="MainAgent"?$.modelNameMain:""}`,children:c}),e.jsx("span",{className:$.time,children:g})]}),e.jsxs("div",{className:$.detailRow,children:[e.jsx("span",{className:$.urlText,title:l.url,children:b}),l.duration&&e.jsxs("span",{className:$.duration,children:[l.duration,"ms"]}),l.response&&e.jsx("span",{className:h?$.statusOk:i?$.statusErr:$.statusDefault,children:l.response.status})]}),f&&e.jsxs("div",{className:$.usageBox,children:[e.jsxs("div",{children:["token: output:",U(C)||0,", input: ",U(v)||0]}),(k>0||N>0)&&e.jsx("div",{children:(()=>{var O;const I=(O=this.props.cacheLossMap)==null?void 0:O.get(u),M={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let D;if(I){const ne=(I.reasons||[I.reason]).map(A=>p(M[A]||M.key_change)).join(`
|
|
27
27
|
`);D=e.jsx(ts,{title:e.jsx("span",{className:$.tooltipPreLine,children:ne}),children:e.jsx("span",{className:`${$.cacheDot} ${$.cacheDotLoss}`})})}else D=e.jsx("span",{className:`${$.cacheDot} ${$.cacheDotNormal}`});return e.jsxs(e.Fragment,{children:["cache",D,": ",k>0?`read:${U(k)}`:"",k>0&&N>0?", ":"",N>0?`create:${U(N)}`:""]})})()})]})]})})}})})}}const Xn=n=>typeof n=="boolean"||n instanceof Boolean,Zn=n=>typeof n=="number"||n instanceof Number,el=n=>typeof n=="bigint"||n instanceof BigInt,Ns=n=>!!n&&n instanceof Date,tl=n=>typeof n=="string"||n instanceof String,sl=n=>Array.isArray(n),_s=n=>typeof n=="object"&&n!==null,Ss=n=>!!n&&n instanceof Object&&typeof n=="function";function at(n,s){return s===void 0&&(s=!1),!n||s?`"${n}"`:n}function al(n,s,t){return t?JSON.stringify(n):s?`"${n}"`:n}function ks(n){let{field:s,value:t,data:a,lastElement:d,openBracket:l,closeBracket:u,level:g,style:o,shouldExpandNode:h,clickToExpandNode:i,outerRef:c,beforeExpandChange:m}=n;const y=j.useRef(!1),[x,f]=j.useState(()=>h(g,t,s)),v=j.useRef(null);j.useEffect(()=>{y.current?f(h(g,t,s)):y.current=!0},[h]);const C=j.useId();if(a.length===0)return nl({field:s,openBracket:l,closeBracket:u,lastElement:d,style:o});const k=x?o.collapseIcon:o.expandIcon,N=x?o.ariaLables.collapseJson:o.ariaLables.expandJson,b=g+1,T=a.length-1,E=M=>{x!==M&&(!m||m({level:g,value:t,field:s,newExpandValue:M}))&&f(M)},L=M=>{if(M.key==="ArrowRight"||M.key==="ArrowLeft")M.preventDefault(),E(M.key==="ArrowRight");else if(M.key==="ArrowUp"||M.key==="ArrowDown"){M.preventDefault();const D=M.key==="ArrowUp"?-1:1;if(!c.current)return;const O=c.current.querySelectorAll("[role=button]");let ae=-1;for(let A=0;A<O.length;A++)if(O[A].tabIndex===0){ae=A;break}if(ae<0)return;const ne=(ae+D+O.length)%O.length;O[ae].tabIndex=-1,O[ne].tabIndex=0,O[ne].focus()}},I=()=>{var M;E(!x);const D=v.current;if(!D)return;const O=(M=c.current)===null||M===void 0?void 0:M.querySelector('[role=button][tabindex="0"]');O&&(O.tabIndex=-1),D.tabIndex=0,D.focus()};return j.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-expanded":x,"aria-selected":void 0},j.createElement("span",{className:k,onClick:I,onKeyDown:L,role:"button","aria-label":N,"aria-expanded":x,"aria-controls":x?C:void 0,ref:v,tabIndex:g===0?0:-1}),(s||s==="")&&(i?j.createElement("span",{className:o.clickableLabel,onClick:I,onKeyDown:L},at(s,o.quotesForFieldNames),":"):j.createElement("span",{className:o.label},at(s,o.quotesForFieldNames),":")),j.createElement("span",{className:o.punctuation},l),x?j.createElement("ul",{id:C,role:"group",className:o.childFieldsContainer},a.map((M,D)=>j.createElement(vt,{key:M[0]||D,field:M[0],value:M[1],style:o,lastElement:D===T,level:b,shouldExpandNode:h,clickToExpandNode:i,beforeExpandChange:m,outerRef:c}))):j.createElement("span",{className:o.collapsedContent,onClick:I,onKeyDown:L}),j.createElement("span",{className:o.punctuation},u),!d&&j.createElement("span",{className:o.punctuation},","))}function nl(n){let{field:s,openBracket:t,closeBracket:a,lastElement:d,style:l}=n;return j.createElement("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&j.createElement("span",{className:l.label},at(s,l.quotesForFieldNames),":"),j.createElement("span",{className:l.punctuation},t),j.createElement("span",{className:l.punctuation},a),!d&&j.createElement("span",{className:l.punctuation},","))}function ll(n){let{field:s,value:t,style:a,lastElement:d,shouldExpandNode:l,clickToExpandNode:u,level:g,outerRef:o,beforeExpandChange:h}=n;return ks({field:s,value:t,lastElement:d||!1,level:g,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:l,clickToExpandNode:u,data:Object.keys(t).map(i=>[i,t[i]]),outerRef:o,beforeExpandChange:h})}function ol(n){let{field:s,value:t,style:a,lastElement:d,level:l,shouldExpandNode:u,clickToExpandNode:g,outerRef:o,beforeExpandChange:h}=n;return ks({field:s,value:t,lastElement:d||!1,level:l,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:u,clickToExpandNode:g,data:t.map(i=>[void 0,i]),outerRef:o,beforeExpandChange:h})}function il(n){let{field:s,value:t,style:a,lastElement:d}=n,l,u=a.otherValue;return t===null?(l="null",u=a.nullValue):t===void 0?(l="undefined",u=a.undefinedValue):tl(t)?(l=al(t,!a.noQuotesForStringValues,a.stringifyStringValues),u=a.stringValue):Xn(t)?(l=t?"true":"false",u=a.booleanValue):Zn(t)?(l=t.toString(),u=a.numberValue):el(t)?(l=`${t.toString()}n`,u=a.numberValue):Ns(t)?l=t.toISOString():Ss(t)?l="function() { }":l=t.toString(),j.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(s||s==="")&&j.createElement("span",{className:a.label},at(s,a.quotesForFieldNames),":"),j.createElement("span",{className:u},l),!d&&j.createElement("span",{className:a.punctuation},","))}function vt(n){const s=n.value;return sl(s)?j.createElement(ol,Object.assign({},n)):_s(s)&&!Ns(s)&&!Ss(s)?j.createElement(ll,Object.assign({},n)):j.createElement(il,Object.assign({},n))}var H={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const ws={collapseJson:"collapse JSON",expandJson:"expand JSON"},et={container:H["container-light"],basicChildStyle:H["basic-element-style"],childFieldsContainer:H["child-fields-container"],label:H["label-light"],clickableLabel:H["clickable-label-light"],nullValue:H["value-null-light"],undefinedValue:H["value-undefined-light"],stringValue:H["value-string-light"],booleanValue:H["value-boolean-light"],numberValue:H["value-number-light"],otherValue:H["value-other-light"],punctuation:H["punctuation-light"],collapseIcon:H["collapse-icon-light"],expandIcon:H["expand-icon-light"],collapsedContent:H["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ws,stringifyStringValues:!1},rl={container:H["container-dark"],basicChildStyle:H["basic-element-style"],childFieldsContainer:H["child-fields-container"],label:H["label-dark"],clickableLabel:H["clickable-label-dark"],nullValue:H["value-null-dark"],undefinedValue:H["value-undefined-dark"],stringValue:H["value-string-dark"],booleanValue:H["value-boolean-dark"],numberValue:H["value-number-dark"],otherValue:H["value-other-dark"],punctuation:H["punctuation-dark"],collapseIcon:H["collapse-icon-dark"],expandIcon:H["expand-icon-dark"],collapsedContent:H["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:ws,stringifyStringValues:!1},cl=()=>!0,dl=n=>{let{data:s,style:t=et,shouldExpandNode:a=cl,clickToExpandNode:d=!1,beforeExpandChange:l,compactTopLevel:u,...g}=n;const o=j.useRef(null);return j.createElement("div",Object.assign({"aria-label":"JSON view"},g,{className:t.container,ref:o,role:"tree"}),u&&_s(s)?Object.entries(s).map(h=>{let[i,c]=h;return j.createElement(vt,{key:i,field:i,value:c,style:{...et,...t},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:d,beforeExpandChange:l,outerRef:o})}):j.createElement(vt,{value:s,style:{...et,...t},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:d,outerRef:o,beforeExpandChange:l}))},hl="_container_qeuid_1",ul={container:hl};class nt extends q.Component{shouldComponentUpdate(s){return s.data!==this.props.data||s.defaultExpand!==this.props.defaultExpand||s.expandNode!==this.props.expandNode}render(){const{data:s,defaultExpand:t,expandNode:a}=this.props,l={...typeof document<"u"&&document.documentElement.getAttribute("data-theme")!=="light"?rl:et,container:"rjv-container"};if(s==null)return null;const u=typeof a=="function"?a:t==="all"?()=>!0:t==="root"?g=>g<2:g=>g<1;return e.jsx("div",{className:ul.container,children:e.jsx(dl,{data:s,shouldExpandNode:u,style:l})})}}function ml({currentId:n,visibleIds:s=[],key:t}){if(t!=="ArrowUp"&&t!=="ArrowDown")return null;const a=s.findIndex(l=>l===n),d=t==="ArrowUp"?-1:1;return a>=0?s[a+d]??null:null}const pl="_root_17dqd_1",gl="_sidebar_17dqd_9",fl="_section_17dqd_18",xl="_sectionHeader_17dqd_22",vl="_arrow_17dqd_48",yl="_sectionTitle_17dqd_54",jl="_sectionCount_17dqd_62",Cl="_sectionBody_17dqd_71",bl="_historyToggle_17dqd_76",Nl="_historyToggleLabel_17dqd_102",_l="_item_17dqd_107",Sl="_itemActive_17dqd_135",kl="_itemContent_17dqd_142",wl="_itemLabel_17dqd_148",Tl="_itemSublabel_17dqd_156",Ml="_itemTime_17dqd_165",El="_content_17dqd_174",Rl="_contentEmpty_17dqd_182",Il="_contentInner_17dqd_189",Ll="_emptyWrap_17dqd_193",Al="_roleHeader_17dqd_201",Pl="_roleBadge_17dqd_209",Dl="_role_user_17dqd_218",Bl="_role_assistant_17dqd_224",Ol="_roleLabel_17dqd_230",Fl="_contentTime_17dqd_237",Hl="_turnDivider_17dqd_245",$l="_textBlock_17dqd_252",zl="_textBlockBar_17dqd_259",Vl="_textBlockBody_17dqd_268",ql="_textBlockCompact_17dqd_276",Ul="_textBlockCompactFloat_17dqd_283",Wl="_thinkingBlock_17dqd_290",Kl="_thinkingHeader_17dqd_298",Gl="_thinkingPreview_17dqd_313",Jl="_thinkingBody_17dqd_323",Ql="_toolBlock_17dqd_329",Yl="_toolBlockResult_17dqd_336",Xl="_toolBlockError_17dqd_340",Zl="_toolBlockHeader_17dqd_344",eo="_toolBlockBody_17dqd_355",to="_toolName_17dqd_360",so="_toolId_17dqd_366",ao="_errorLabel_17dqd_373",no="_blockTag_17dqd_383",lo="_blockTagText_17dqd_396",oo="_blockTagThinking_17dqd_402",io="_blockTagResult_17dqd_408",ro="_blockTagError_17dqd_414",co="_jsonBlock_17dqd_421",ho="_jsonBlockLabel_17dqd_428",uo="_blockSeparator_17dqd_438",mo="_markdownBody_17dqd_445",w={root:pl,sidebar:gl,section:fl,sectionHeader:xl,arrow:vl,sectionTitle:yl,sectionCount:jl,sectionBody:Cl,historyToggle:bl,historyToggleLabel:Nl,item:_l,itemActive:Sl,itemContent:kl,itemLabel:wl,itemSublabel:Tl,itemTime:Ml,content:El,contentEmpty:Rl,contentInner:Il,emptyWrap:Ll,roleHeader:Al,roleBadge:Pl,role_user:Dl,role_assistant:Bl,roleLabel:Ol,contentTime:Fl,turnDivider:Hl,textBlock:$l,textBlockBar:zl,textBlockBody:Vl,textBlockCompact:ql,textBlockCompactFloat:Ul,thinkingBlock:Wl,thinkingHeader:Kl,thinkingPreview:Gl,thinkingBody:Jl,toolBlock:Ql,toolBlockResult:Yl,toolBlockError:Xl,toolBlockHeader:Zl,toolBlockBody:eo,toolName:to,toolId:so,errorLabel:ao,blockTag:no,blockTagText:lo,blockTagThinking:oo,blockTagResult:io,blockTagError:ro,jsonBlock:co,jsonBlockLabel:ho,blockSeparator:uo,markdownBody:mo},{Text:po}=ss;function yt(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}if(Array.isArray(n)){const s=[];for(const t of n)if(t)if(t.type==="text"){const a=(t.text||"").trim();a&&s.push({type:"markdown",text:a})}else if(t.type==="tool_use")s.push({type:"tool_use",name:t.name||"unknown",id:t.id||"",input:t.input??{}});else if(t.type==="tool_result"){const a=go(t.content);s.push({type:"tool_result",tool_use_id:t.tool_use_id||"",is_error:t.is_error,content:a})}else if(t.type==="thinking"){const a=t.thinking||"";a.trim()&&s.push({type:"thinking",text:a})}else t.type==="image"?s.push({type:"json",label:"image",data:t}):s.push({type:"json",label:t.type||"block",data:t});return s}return[{type:"json",label:"content",data:n}]}function go(n){if(n==null)return[];if(typeof n=="string"){const s=n.trim();return s?[{type:"markdown",text:s}]:[]}return Array.isArray(n)?n.flatMap(s=>{if(!s)return[];if(s.type==="text"){const t=(s.text||"").trim();return t?[{type:"markdown",text:t}]:[]}return[{type:"json",label:s.type||"block",data:s}]}):[{type:"json",label:"content",data:n}]}function fo(n){if(!n)return null;if(typeof n=="string")return[{type:"markdown",text:n}];if(Array.isArray(n)){const s=[];return n.forEach((t,a)=>{a>0&&s.push({type:"separator"}),t&&(typeof t=="string"?s.push({type:"markdown",text:t}):t.type==="text"?s.push({type:"markdown",text:t.text||""}):s.push({type:"json",label:t.type||"item",data:t}))}),s}return[{type:"json",label:"system",data:n}]}function xo(n){const s=[],t=(n==null?void 0:n.name)||"unknown",a=(n==null?void 0:n.description)||"";let d=`### ${t}
|
|
28
28
|
|
|
29
29
|
`;a&&(d+=`${a}
|
|
@@ -32,8 +32,8 @@ var Ts=Object.defineProperty;var Ms=(n,s,t)=>s in n?Ts(n,s,{enumerable:!0,config
|
|
|
32
32
|
=== ${p("ui.systemPrompt")} ===`),f.system.forEach(T=>b.push(T))),f.messages.length>0&&(b.push(`
|
|
33
33
|
=== ${p("ui.messages")} ===`),f.messages.forEach(T=>b.push(T))),b.join(`
|
|
34
34
|
|
|
35
|
-
`)},k=f.messages.map((b,T)=>({text:b,msgIdx:T})).filter(({text:b})=>b.startsWith("[user]")).map(({text:b,msgIdx:T})=>{const E=b.replace(/^\[user\]\s*/,"").trim();return!E||We(E)?{cleaned:"",msgIdx:T}:{cleaned:st.parseSegments(E).filter(M=>M.type==="text").map(M=>M.content.trim()).filter(M=>M&&!We(M)).join(" ").trim(),msgIdx:T}}).filter(({cleaned:b})=>!(!b||/Implement the following plan:/i.test(b))),N=k.length>0?e.jsx("div",{className:S.userPromptList,children:k.map(({cleaned:b,msgIdx:T})=>e.jsx("div",{className:S.userPromptItem,onMouseEnter:E=>{E.currentTarget.style.background="var(--color-primary-bg-lighter)",E.currentTarget.style.color="var(--text-white)"},onMouseLeave:E=>{E.currentTarget.style.background="",E.currentTarget.style.color="var(--text-secondary)"},onClick:()=>this.scrollToCacheMsg(T),children:b},T))}):null;return e.jsxs("div",{className:S.cacheContent,children:[(()=>{const T=f.cacheCreateTokens>0||f.cacheReadTokens>0?f:this._lastCachedTokensKey===v?this._lastCachedTokens:null;return T||N?e.jsxs("div",{className:S.cacheTokenBar,children:[T&&e.jsxs(e.Fragment,{children:[p("ui.tokens"),": ",e.jsxs("span",{className:S.cacheTokenWrite,children:["write ",U(T.cacheCreateTokens)]})," / ",e.jsxs("span",{className:S.cacheTokenRead,children:["read ",U(T.cacheReadTokens)]}),e.jsx(ts,{title:p("ui.copyAllCacheText"),children:e.jsx(Ve,{className:S.cacheCopyIcon,onClick:()=>{navigator.clipboard.writeText(C()).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})}})})]}),N&&e.jsx(ze,{content:N,trigger:"hover",placement:"left",children:e.jsx("span",{className:S.userPromptNavBtn,children:p("ui.userPromptNav")})})]}):null})(),e.jsxs("div",{className:S.cacheScrollArea,ref:b=>{this._cacheScrollEl=b},children:[f.tools.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,tools:!b.cacheCollapsed.tools}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.tools?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.tools")," (",f.tools.length,")"]}),!this.state.cacheCollapsed.tools&&f.tools.map((b,T)=>e.jsx("pre",{className:S.cachePre,children:b},T))]}),f.system.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,system:!b.cacheCollapsed.system}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.system?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.systemPrompt")," (",f.system.length,")"]}),!this.state.cacheCollapsed.system&&f.system.map((b,T)=>e.jsx("pre",{className:S.cachePreSystem,children:b},T))]}),f.messages.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,messages:!b.cacheCollapsed.messages}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.messages?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.messages")," (",f.messages.length,")"]}),!this.state.cacheCollapsed.messages&&f.messages.map((b,T)=>{const E=T===this.state.cacheHighlightIdx,L=E?this.state.cacheHighlightFading?{boxShadow:"0 0 10px rgba(22,104,220,0)",transition:"box-shadow 3s ease-out",position:"relative"}:{boxShadow:"0 0 10px rgba(22,104,220,0.6)",transition:"box-shadow 0.2s ease-in",position:"relative"}:{};return e.jsxs("pre",{"data-msg-idx":T,className:S.cachePre,style:L,children:[E&&e.jsx("svg",{className:S.cacheHighlightSvg,style:{opacity:this.state.cacheHighlightFading?0:1,transition:this.state.cacheHighlightFading?"opacity 3s ease-out":void 0},preserveAspectRatio:"none",children:e.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"4",ry:"4",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",children:e.jsx("animate",{attributeName:"stroke-dashoffset",from:"0",to:"-100",dur:"4s",repeatCount:"indefinite"})})}),b]},T)})]})]})]})})()})},{key:"context",label:"Context",children:e.jsx("div",{className:`${S.tabContent} ${S.cacheTabContent}`,children:e.jsx(So,{body:s.body,response:(m=s.response)==null?void 0:m.body})})}],i=(x=(y=s.response)==null?void 0:y.body)==null?void 0:x.usage,c=i?(()=>{const f=i.input_tokens||0,v=i.output_tokens||0,C=i.cache_creation_input_tokens||0,k=i.cache_read_input_tokens||0,N=f+C+k,b=N>0?(k/N*100).toFixed(1):"0.0";return{input:f,output:v,cacheCreate:C,cacheRead:k,hitRate:b}})():null;return e.jsxs("div",{className:S.container,children:[e.jsxs("div",{className:S.urlSection,children:[e.jsxs("div",{className:S.urlLeft,children:[e.jsx(ji,{className:S.urlText,ellipsis:{rows:2,expandable:!0},children:s.url}),e.jsxs(qe,{size:"small",wrap:!0,children:[e.jsx(
|
|
35
|
+
`)},k=f.messages.map((b,T)=>({text:b,msgIdx:T})).filter(({text:b})=>b.startsWith("[user]")).map(({text:b,msgIdx:T})=>{const E=b.replace(/^\[user\]\s*/,"").trim();return!E||We(E)?{cleaned:"",msgIdx:T}:{cleaned:st.parseSegments(E).filter(M=>M.type==="text").map(M=>M.content.trim()).filter(M=>M&&!We(M)).join(" ").trim(),msgIdx:T}}).filter(({cleaned:b})=>!(!b||/Implement the following plan:/i.test(b))),N=k.length>0?e.jsx("div",{className:S.userPromptList,children:k.map(({cleaned:b,msgIdx:T})=>e.jsx("div",{className:S.userPromptItem,onMouseEnter:E=>{E.currentTarget.style.background="var(--color-primary-bg-lighter)",E.currentTarget.style.color="var(--text-white)"},onMouseLeave:E=>{E.currentTarget.style.background="",E.currentTarget.style.color="var(--text-secondary)"},onClick:()=>this.scrollToCacheMsg(T),children:b},T))}):null;return e.jsxs("div",{className:S.cacheContent,children:[(()=>{const T=f.cacheCreateTokens>0||f.cacheReadTokens>0?f:this._lastCachedTokensKey===v?this._lastCachedTokens:null;return T||N?e.jsxs("div",{className:S.cacheTokenBar,children:[T&&e.jsxs(e.Fragment,{children:[p("ui.tokens"),": ",e.jsxs("span",{className:S.cacheTokenWrite,children:["write ",U(T.cacheCreateTokens)]})," / ",e.jsxs("span",{className:S.cacheTokenRead,children:["read ",U(T.cacheReadTokens)]}),e.jsx(ts,{title:p("ui.copyAllCacheText"),children:e.jsx(Ve,{className:S.cacheCopyIcon,onClick:()=>{navigator.clipboard.writeText(C()).then(()=>{K.success(p("ui.copied"))}).catch(()=>{})}})})]}),N&&e.jsx(ze,{content:N,trigger:"hover",placement:"left",children:e.jsx("span",{className:S.userPromptNavBtn,children:p("ui.userPromptNav")})})]}):null})(),e.jsxs("div",{className:S.cacheScrollArea,ref:b=>{this._cacheScrollEl=b},children:[f.tools.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,tools:!b.cacheCollapsed.tools}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.tools?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.tools")," (",f.tools.length,")"]}),!this.state.cacheCollapsed.tools&&f.tools.map((b,T)=>e.jsx("pre",{className:S.cachePre,children:b},T))]}),f.system.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,system:!b.cacheCollapsed.system}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.system?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.systemPrompt")," (",f.system.length,")"]}),!this.state.cacheCollapsed.system&&f.system.map((b,T)=>e.jsx("pre",{className:S.cachePreSystem,children:b},T))]}),f.messages.length>0&&e.jsxs("div",{className:S.cacheSectionBlock,children:[e.jsxs("div",{className:S.cacheSectionHeader,onClick:()=>this.setState(b=>({cacheCollapsed:{...b.cacheCollapsed,messages:!b.cacheCollapsed.messages}})),children:[e.jsx("span",{className:S.cacheCollapseArrow,style:{transform:this.state.cacheCollapsed.messages?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),p("ui.messages")," (",f.messages.length,")"]}),!this.state.cacheCollapsed.messages&&f.messages.map((b,T)=>{const E=T===this.state.cacheHighlightIdx,L=E?this.state.cacheHighlightFading?{boxShadow:"0 0 10px rgba(22,104,220,0)",transition:"box-shadow 3s ease-out",position:"relative"}:{boxShadow:"0 0 10px rgba(22,104,220,0.6)",transition:"box-shadow 0.2s ease-in",position:"relative"}:{};return e.jsxs("pre",{"data-msg-idx":T,className:S.cachePre,style:L,children:[E&&e.jsx("svg",{className:S.cacheHighlightSvg,style:{opacity:this.state.cacheHighlightFading?0:1,transition:this.state.cacheHighlightFading?"opacity 3s ease-out":void 0},preserveAspectRatio:"none",children:e.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"4",ry:"4",fill:"none",stroke:"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",children:e.jsx("animate",{attributeName:"stroke-dashoffset",from:"0",to:"-100",dur:"4s",repeatCount:"indefinite"})})}),b]},T)})]})]})]})})()})},{key:"context",label:"Context",children:e.jsx("div",{className:`${S.tabContent} ${S.cacheTabContent}`,children:e.jsx(So,{body:s.body,response:(m=s.response)==null?void 0:m.body})})}],i=(x=(y=s.response)==null?void 0:y.body)==null?void 0:x.usage,c=i?(()=>{const f=i.input_tokens||0,v=i.output_tokens||0,C=i.cache_creation_input_tokens||0,k=i.cache_read_input_tokens||0,N=f+C+k,b=N>0?(k/N*100).toFixed(1):"0.0";return{input:f,output:v,cacheCreate:C,cacheRead:k,hitRate:b}})():null;return e.jsxs("div",{className:S.container,children:[e.jsxs("div",{className:S.urlSection,children:[e.jsxs("div",{className:S.urlLeft,children:[e.jsx(ji,{className:S.urlText,ellipsis:{rows:2,expandable:!0},children:s.url}),e.jsxs(qe,{size:"small",wrap:!0,children:[e.jsx(ve,{color:s.method==="POST"?"blue":"green",children:s.method}),e.jsxs(he,{type:"secondary",className:S.metaText,children:["🕐 ",d]}),s.duration&&e.jsxs(he,{type:"secondary",className:S.metaText,children:["⏱️ ",s.duration,"ms"]}),s.response&&e.jsxs(ve,{color:l?"success":"error",children:["HTTP ",s.response.status]})]})]}),c&&e.jsx("div",{className:S.tokenStatsBox,children:e.jsxs("div",{className:S.tokenGrid,children:[e.jsxs("div",{className:S.tokenRows,children:[e.jsxs("div",{className:S.tokenRow,children:[e.jsx("span",{className:S.tokenLabel,children:"Token"}),e.jsxs("span",{className:S.tokenTd,children:["input: ",U(c.input)]}),e.jsxs("span",{className:S.tokenTd,children:["output: ",U(c.output)]})]}),e.jsxs("div",{className:`${S.tokenRow} ${S.tokenRowBorder}`,children:[e.jsx("span",{className:S.tokenLabel,children:"Cache"}),e.jsxs("span",{className:S.tokenTd,children:["create: ",U(c.cacheCreate)]}),e.jsxs("span",{className:S.tokenTd,children:["read: ",U(c.cacheRead)]})]})]}),e.jsxs("div",{className:S.tokenHitRate,children:[e.jsxs("div",{children:[c.hitRate,"%"]}),e.jsx("div",{className:S.tokenHitRateLabel,children:p("ui.hitRate")})]})]})})]}),e.jsx(Zt,{activeKey:t,onChange:a,items:h,size:"small"})]})}}const bi="_resizer_pzn4b_1",Ni={resizer:bi};class _i extends q.Component{constructor(s){super(s),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(s){s.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(s){this.props.onResize&&this.props.onResize(s.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return e.jsx("div",{onMouseDown:this.handleMouseDown,className:Ni.resizer})}}class Ei extends ga{constructor(t){super(t);B(this,"handleViewRequest",t=>{this.setState({viewMode:"raw",selectedIndex:t,scrollCenter:!0})});B(this,"handleViewInChat",()=>{this.setState(t=>{const d=(t.showAll?t.requests:Qe(t.requests))[t.selectedIndex];if(!d)return null;let l=null;if(Te(d)&&d.timestamp)l=d.timestamp;else{const u=Ke(d);if((u.type==="SubAgent"||u.type==="Teammate")&&d.timestamp)l=d.timestamp;else{const g=t.requests.indexOf(d);g>=0&&(l=Bt(t.requests,g))}l||K.info(p("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:l}})});B(this,"handleToggleViewMode",()=>{this.setState(t=>{const a=t.viewMode==="raw"?"chat":"raw";if(a==="raw"){if(t.selectedIndex===null){const u=t.showAll?t.requests:Qe(t.requests);return{viewMode:a,selectedIndex:u.length>0?u.length-1:null,scrollCenter:!0}}return{viewMode:a,scrollCenter:!0}}const d=t.showAll?t.requests:Qe(t.requests),l=t.selectedIndex!=null?d[t.selectedIndex]:null;if(l){let u=null;if(Te(l)&&l.timestamp)u=l.timestamp;else{const g=Ke(l);if((g.type==="SubAgent"||g.type==="Teammate")&&l.timestamp)u=l.timestamp;else{const o=t.requests.indexOf(l);o>=0&&(u=Bt(t.requests,o)),u||K.info(p("ui.cannotMap"))}}return{viewMode:a,chatScrollToTs:u}}return{viewMode:a,chatScrollToTs:null}},()=>{this.state.viewMode==="chat"&&this.state.terminalVisible&&this.state.cliMode&&!Es&&requestAnimationFrame(()=>{const t=document.querySelector(".xterm-helper-textarea");t&&t.focus()})})});B(this,"handleTabChange",t=>{this.setState({currentTab:t})});B(this,"handleCacheHighlightDone",()=>{this.setState({pendingCacheHighlight:null})});B(this,"handleNavigateCacheMsg",t=>{const a=this.state.showAll?this.state.requests:Qe(this.state.requests);let d=-1;for(let l=a.length-1;l>=0;l--)if(Te(a[l])){d=l;break}d<0||this.setState({selectedIndex:d,scrollCenter:!0,currentTab:"kv-cache-text",pendingCacheHighlight:{msgIdx:t,key:Date.now()}})});B(this,"handleResize",t=>{const a=this.mainContainerRef.current;if(!a)return;const d=a.getBoundingClientRect(),l=t-d.left;l>=250&&l<=800&&this.setState({leftPanelWidth:l})});B(this,"handleLoadLocalJsonlFile",()=>{const t=document.createElement("input");t.type="file",t.accept=".jsonl",t.multiple=!0,t.onchange=a=>{const d=Array.from(a.target.files);if(d.length===0)return;if(d.reduce((h,i)=>h+i.size,0)>500*1024*1024){K.error(p("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});let u=0;const g=[],o=[];d.forEach(h=>{const i=new FileReader;i.onload=c=>{try{const y=c.target.result.split(`
|
|
36
36
|
---
|
|
37
37
|
`).filter(x=>x.trim()).map(x=>{try{return JSON.parse(x)}catch{return null}}).filter(Boolean);g.push(...y),o.push(h.name)}catch{}u++,u===d.length&&this._finishLocalLoad(g,o)},i.readAsText(h)})},t.click()});B(this,"_processJsonlFiles",t=>{if(!t||t.length===0)return;if(t.reduce((g,o)=>g+o.size,0)>500*1024*1024){K.error(p("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});let d=0;const l=[],u=[];t.forEach(g=>{const o=new FileReader;o.onload=h=>{try{const c=h.target.result.split(`
|
|
38
38
|
---
|
|
39
|
-
`).filter(m=>m.trim()).map(m=>{try{return JSON.parse(m)}catch{return null}}).filter(Boolean);l.push(...c),u.push(g.name)}catch{}d++,d===t.length&&this._finishLocalLoad(l,u)},o.readAsText(g)})});B(this,"_isInternalDrag",t=>t.dataTransfer.types.includes("text/x-preset-reorder"));B(this,"_onDragOver",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;if(t.target.closest&&t.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});B(this,"_onDragLeave",t=>{const a=this._layoutRef.current;a&&!a.contains(t.relatedTarget)&&this.setState({isDragging:!1})});B(this,"_onDrop",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;this.setState({isDragging:!1});const a=Array.from(t.dataTransfer.files);a.length&&Promise.all(a.map(d=>fa(d).then(l=>({name:d.name,path:l})).catch(l=>(K.error(`${d.name}: ${l.message}`),null)))).then(d=>{const l=d.filter(Boolean).map(u=>`"${u.path}"`);l.length>0&&this.setState(u=>({pendingUploadPaths:[...u.pendingUploadPaths||[],...l]}))})});B(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});Object.assign(this.state,{leftPanelWidth:380,terminalVisible:!0,currentTab:"request",pendingCacheHighlight:null})}render(){const{filteredRequests:t,selectedRequest:a,fileLoading:d,fileLoadingCount:l,mainAgentSessions:u,viewMode:g}=this.renderPrepare(),{selectedIndex:o,leftPanelWidth:h,currentTab:i}=this.state;return this.state.workspaceMode?this.renderWorkspaceMode():e.jsxs(xa,{theme:this.themeConfig,children:[d&&e.jsx("div",{className:R.loadingOverlay,children:e.jsxs("div",{className:R.loadingText,children:["Loading...(",l,")"]})}),this.state.isDragging&&e.jsx("div",{className:R.dragOverlay,children:e.jsxs("div",{className:R.dragOverlayContent,children:[e.jsx(Kt,{className:R.dragIcon}),e.jsx("p",{children:p("ui.dragDropHint")})]})}),e.jsxs(Me,{className:R.layout,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[e.jsx(Me.Header,{className:R.header,children:e.jsx(st,{requestCount:t.length,requests:t,viewMode:g,cacheExpireAt:this.state.cacheExpireAt,cacheType:this.state.cacheType,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,showFullToolContent:this.state.showFullToolContent,onShowFullToolContentChange:this.handleShowFullToolContentChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,logDir:this.state.logDir,onLogDirChange:this.handleLogDirChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),onReturnToWorkspaces:this.state.cliMode?this.handleReturnToWorkspaces:null,contextWindow:this.state.contextWindow,onNavigateCacheMsg:this.handleNavigateCacheMsg,serverCachedContent:this.state.serverCachedContent||this._lastKvCacheContent,resumeAutoChoice:this.state.resumeAutoChoice,onResumeAutoChoiceToggle:this.handleResumeAutoChoiceToggle,onResumeAutoChoiceChange:this.handleResumeAutoChoiceChange,themeColor:this.state.themeColor,onThemeColorChange:this.handleThemeColorChange,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,proxyProfiles:this.state.proxyProfiles,activeProxyId:this.state.activeProxyId,defaultConfig:this.state.defaultConfig,onProxyProfileChange:this.handleProxyProfileChange})}),e.jsxs(Me.Content,{className:R.content,children:[g==="raw"&&(t.length===0?e.jsx("div",{className:R.guideContainer,children:e.jsxs("div",{className:R.guideContent,children:[e.jsx("h2",{className:R.guideTitle,children:p("ui.guide.title")}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"1"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step1")}),e.jsx("code",{className:R.guideCode,children:p("ui.guide.exampleQuestion")})]})]}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"2"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step2")}),e.jsx("code",{className:R.guideCode,children:p("ui.guide.troubleshootCmd")})]})]}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"3"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step3")}),e.jsx("code",{className:R.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):e.jsxs("div",{ref:this.mainContainerRef,className:R.mainContainer,children:[e.jsxs("div",{className:R.leftPanel,style:{width:h},children:[e.jsxs("div",{className:R.leftPanelHeader,children:[e.jsx("span",{children:p("ui.requestList")}),e.jsx("span",{className:R.leftPanelCount,children:p("ui.totalRequests",{count:t.length})})]}),e.jsx("div",{className:R.leftPanelBody,children:e.jsx(Yn,{requests:t,selectedIndex:o,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:this.handleScrollDone,cacheLossMap:this._cacheLossMap})})]}),e.jsx(_i,{onResize:this.handleResize}),e.jsx("div",{className:R.rightPanel,children:e.jsx(Ci,{request:a,requests:t,allRequests:this.state.requests,selectedIndex:o,currentTab:i,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff,pendingCacheHighlight:this.state.pendingCacheHighlight,onCacheHighlightDone:this.handleCacheHighlightDone})})]})),e.jsx("div",{className:R.chatViewWrapper,style:{display:g==="chat"?"flex":"none"},children:e.jsx(va,{requests:t,mainAgentSessions:u,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:this.handleScrollTsDone,cliMode:this._isLocalLog?!1:this.state.cliMode,sdkMode:this._isLocalLog?!1:this.state.sdkMode,terminalVisible:this._isLocalLog||this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:c=>this.loadSession(c),lang:this.state.lang,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange})})]}),e.jsx("div",{className:R.footer,children:e.jsx("div",{className:R.footerRight,children:e.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:R.footerLink,children:[e.jsx("svg",{className:R.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]})})})]}),e.jsx(ke,{title:p("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:e.jsxs("div",{children:[e.jsxs("div",{className:R.resumeFooterRight,children:[e.jsx(F,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),className:R.btnMarginRight,children:p("ui.resume.continue")},"continue"),e.jsx(F,{onClick:()=>this.handleResumeChoice("new"),children:p("ui.resume.new")},"new")]}),e.jsx("div",{className:R.resumeFooterLeft,children:e.jsx(ya,{checked:this.state.resumeRememberChoice,onChange:c=>this.setState({resumeRememberChoice:c.target.checked}),className:R.resumeCheckboxOpacity,children:e.jsx("span",{className:R.resumeCheckboxOpacity,children:p("ui.resume.remember")})})})]}),children:e.jsx("p",{children:p("ui.resume.message",{file:this.state.resumeFileName})})}),e.jsxs(ke,{title:e.jsxs("span",{className:R.modalTitleInline,children:[e.jsx(es,{apiEndpoint:oe("/api/open-log-dir"),title:p("ui.openLogDir"),size:16}),p("ui.importLocalLogs")]}),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{overflow:"hidden"}},children:[e.jsxs("div",{className:R.modalActions,children:[e.jsx(F,{icon:e.jsx(Kt,{}),onClick:this.handleLoadLocalJsonlFile,children:p("ui.loadLocalJsonl")}),e.jsx(F,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,className:R.btnMarginLeft,children:p("ui.mergeLogs")}),e.jsx(F,{size:"small",danger:!0,icon:e.jsx(pt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,className:R.btnMarginLeft,children:p("ui.deleteLogs")}),e.jsx(F,{size:"small",icon:e.jsx(gt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,className:R.btnMarginLeft,children:p("ui.refreshStats")})]}),this.state.localLogsLoading?e.jsx("div",{className:R.spinCenter,children:e.jsx(Xt,{})}):(()=>{const c=this.state.localLogs[this.state.currentProject];return!c||c.length===0?e.jsx("div",{className:R.emptyCenter,children:p("ui.noLogs")}):e.jsx("div",{className:R.logListContainer,children:this.renderLogTable(c,!1)})})()]})]})}}export{Ei as default};
|
|
39
|
+
`).filter(m=>m.trim()).map(m=>{try{return JSON.parse(m)}catch{return null}}).filter(Boolean);l.push(...c),u.push(g.name)}catch{}d++,d===t.length&&this._finishLocalLoad(l,u)},o.readAsText(g)})});B(this,"_isInternalDrag",t=>t.dataTransfer.types.includes("text/x-preset-reorder"));B(this,"_onDragOver",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;if(t.target.closest&&t.target.closest("[data-file-explorer]")){this.state.isDragging&&this.setState({isDragging:!1});return}this.state.isDragging||this.setState({isDragging:!0})});B(this,"_onDragLeave",t=>{const a=this._layoutRef.current;a&&!a.contains(t.relatedTarget)&&this.setState({isDragging:!1})});B(this,"_onDrop",t=>{if(t.preventDefault(),this._isInternalDrag(t))return;this.setState({isDragging:!1});const a=Array.from(t.dataTransfer.files);a.length&&Promise.all(a.map(d=>fa(d).then(l=>({name:d.name,path:l})).catch(l=>(K.error(`${d.name}: ${l.message}`),null)))).then(d=>{const l=d.filter(Boolean).map(u=>`"${u.path}"`);l.length>0&&this.setState(u=>({pendingUploadPaths:[...u.pendingUploadPaths||[],...l]}))})});B(this,"handleUploadPathsConsumed",()=>{this.setState({pendingUploadPaths:[]})});Object.assign(this.state,{leftPanelWidth:380,terminalVisible:!0,currentTab:"request",pendingCacheHighlight:null})}render(){const{filteredRequests:t,selectedRequest:a,fileLoading:d,fileLoadingCount:l,mainAgentSessions:u,viewMode:g}=this.renderPrepare(),{selectedIndex:o,leftPanelWidth:h,currentTab:i}=this.state;return this.state.workspaceMode?this.renderWorkspaceMode():e.jsxs(xa,{theme:this.themeConfig,children:[d&&e.jsx("div",{className:R.loadingOverlay,children:e.jsxs("div",{className:R.loadingText,children:["Loading...(",l,")"]})}),this.state.isDragging&&e.jsx("div",{className:R.dragOverlay,children:e.jsxs("div",{className:R.dragOverlayContent,children:[e.jsx(Kt,{className:R.dragIcon}),e.jsx("p",{children:p("ui.dragDropHint")})]})}),e.jsxs(Ee,{className:R.layout,ref:this._layoutRef,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,children:[e.jsx(Ee.Header,{className:R.header,children:e.jsx(st,{requestCount:t.length,requests:t,viewMode:g,cacheExpireAt:this.state.cacheExpireAt,cacheType:this.state.cacheType,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,showFullToolContent:this.state.showFullToolContent,onShowFullToolContentChange:this.handleShowFullToolContentChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,logDir:this.state.logDir,onLogDirChange:this.handleLogDirChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),onReturnToWorkspaces:this.state.cliMode?this.handleReturnToWorkspaces:null,contextWindow:this.state.contextWindow,onNavigateCacheMsg:this.handleNavigateCacheMsg,serverCachedContent:this.state.serverCachedContent||this._lastKvCacheContent,resumeAutoChoice:this.state.resumeAutoChoice,onResumeAutoChoiceToggle:this.handleResumeAutoChoiceToggle,onResumeAutoChoiceChange:this.handleResumeAutoChoiceChange,themeColor:this.state.themeColor,onThemeColorChange:this.handleThemeColorChange,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,proxyProfiles:this.state.proxyProfiles,activeProxyId:this.state.activeProxyId,defaultConfig:this.state.defaultConfig,onProxyProfileChange:this.handleProxyProfileChange})}),e.jsxs(Ee.Content,{className:R.content,children:[g==="raw"&&(t.length===0?e.jsx("div",{className:R.guideContainer,children:e.jsxs("div",{className:R.guideContent,children:[e.jsx("h2",{className:R.guideTitle,children:p("ui.guide.title")}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"1"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step1")}),e.jsx("code",{className:R.guideCode,children:p("ui.guide.exampleQuestion")})]})]}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"2"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step2")}),e.jsx("code",{className:R.guideCode,children:p("ui.guide.troubleshootCmd")})]})]}),e.jsxs("div",{className:R.guideStep,children:[e.jsx("div",{className:R.guideStepNum,children:"3"}),e.jsxs("div",{className:R.guideStepBody,children:[e.jsx("p",{className:R.guideText,children:p("ui.guide.step3")}),e.jsx("code",{className:R.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):e.jsxs("div",{ref:this.mainContainerRef,className:R.mainContainer,children:[e.jsxs("div",{className:R.leftPanel,style:{width:h},children:[e.jsxs("div",{className:R.leftPanelHeader,children:[e.jsx("span",{children:p("ui.requestList")}),e.jsx("span",{className:R.leftPanelCount,children:p("ui.totalRequests",{count:t.length})})]}),e.jsx("div",{className:R.leftPanelBody,children:e.jsx(Yn,{requests:t,selectedIndex:o,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:this.handleScrollDone,cacheLossMap:this._cacheLossMap})})]}),e.jsx(_i,{onResize:this.handleResize}),e.jsx("div",{className:R.rightPanel,children:e.jsx(Ci,{request:a,requests:t,allRequests:this.state.requests,selectedIndex:o,currentTab:i,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff,pendingCacheHighlight:this.state.pendingCacheHighlight,onCacheHighlightDone:this.handleCacheHighlightDone})})]})),e.jsx("div",{className:R.chatViewWrapper,style:{display:g==="chat"?"flex":"none"},children:e.jsx(va,{requests:t,mainAgentSessions:u,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:this.handleScrollTsDone,cliMode:this._isLocalLog?!1:this.state.cliMode,sdkMode:this._isLocalLog?!1:this.state.sdkMode,terminalVisible:this._isLocalLog||this.state.sdkMode?!1:this.state.terminalVisible,onToggleTerminal:()=>this.setState(c=>({terminalVisible:!c.terminalVisible})),pendingUploadPaths:this.state.pendingUploadPaths,onUploadPathsConsumed:this.handleUploadPathsConsumed,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:c=>this.loadSession(c),lang:this.state.lang,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange})})]}),e.jsx("div",{className:R.footer,children:e.jsx("div",{className:R.footerRight,children:e.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:R.footerLink,children:[e.jsx("svg",{className:R.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]})})})]}),e.jsx(ke,{title:p("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:e.jsxs("div",{children:[e.jsxs("div",{className:R.resumeFooterRight,children:[e.jsx(F,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),className:R.btnMarginRight,children:p("ui.resume.continue")},"continue"),e.jsx(F,{onClick:()=>this.handleResumeChoice("new"),children:p("ui.resume.new")},"new")]}),e.jsx("div",{className:R.resumeFooterLeft,children:e.jsx(ya,{checked:this.state.resumeRememberChoice,onChange:c=>this.setState({resumeRememberChoice:c.target.checked}),className:R.resumeCheckboxOpacity,children:e.jsx("span",{className:R.resumeCheckboxOpacity,children:p("ui.resume.remember")})})})]}),children:e.jsx("p",{children:p("ui.resume.message",{file:this.state.resumeFileName})})}),e.jsxs(ke,{title:e.jsxs("span",{className:R.modalTitleInline,children:[e.jsx(es,{apiEndpoint:oe("/api/open-log-dir"),title:p("ui.openLogDir"),size:16}),p("ui.importLocalLogs")]}),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{overflow:"hidden"}},children:[e.jsxs("div",{className:R.modalActions,children:[e.jsx(F,{icon:e.jsx(Kt,{}),onClick:this.handleLoadLocalJsonlFile,children:p("ui.loadLocalJsonl")}),e.jsx(F,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,className:R.btnMarginLeft,children:p("ui.mergeLogs")}),e.jsx(F,{size:"small",danger:!0,icon:e.jsx(pt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,className:R.btnMarginLeft,children:p("ui.deleteLogs")}),e.jsx(F,{size:"small",icon:e.jsx(gt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,className:R.btnMarginLeft,children:p("ui.refreshStats")})]}),this.state.localLogsLoading?e.jsx("div",{className:R.spinCenter,children:e.jsx(Xt,{})}):(()=>{const c=this.state.localLogs[this.state.currentProject];return!c||c.length===0?e.jsx("div",{className:R.emptyCenter,children:p("ui.noLogs")}):e.jsx("div",{className:R.logListContainer,children:this.renderLogTable(c,!1)})})()]})]})}}export{Ei as default};
|