cx-viewer 1.0.0 → 1.0.2
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/cli.js +2 -2
- package/dist/assets/App-CF-qZ3B6.js +41 -0
- package/dist/assets/{AppHeader-B3hrnZr-.css → AppHeader-BqUGBbBx.css} +2 -2
- package/dist/assets/{AppHeader.module-BMU2vyC4.js → AppHeader.module-BjoBBbCB.js} +194 -190
- package/dist/assets/Mobile-ByhBkyqb.js +10 -0
- package/dist/assets/{_baseUniq-CXWHShmB.js → _baseUniq-5XIuSb_1.js} +1 -1
- package/dist/assets/{arc-qbol0NJo.js → arc-V3mJhKFJ.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-COZebb1N.js → architectureDiagram-Q4EWVU46-22bjxOE1.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-COCgzPKy.js → blockDiagram-DXYQGD6D-Brshek1N.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-Bs5XvLEo.js → c4Diagram-AHTNJAMY-DQHIuxkd.js} +1 -1
- package/dist/assets/channel-SmGaOM6g.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CyGriz9d.js → chunk-4BX2VUAB-BQE7pifU.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-DlT_q-fl.js → chunk-4TB4RGXK-DcZwv_PV.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-NHN99ZNC.js → chunk-55IACEB6-Gd_3-vV5.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-fK4f9Na9.js → chunk-EDXVE4YY-BbnYdg9M.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DL-dQIq1.js → chunk-FMBD7UC4-NSh7z90L.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-6uruB4VY.js → chunk-OYMX7WX6-DdFwjHsc.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CCWIqLO8.js → chunk-QZHKN3VN-C-1z3DA3.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-Cu84DMJo.js → chunk-YZCP3GAM-w_NiY6dL.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-Bu96zciS.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-Bu96zciS.js +1 -0
- package/dist/assets/clone-u2hQVO7u.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-Dqi4iU3-.js → cose-bilkent-S5V4N54A-bHlM-ydV.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-Dl-EJ9rb.js → dagre-KV5264BT-2cCXOuNw.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-BYtyzF0D.js → diagram-5BDNPKRD-C70P_Nd1.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-BuETHFNU.js → diagram-G4DWMVQ6-C2JvwT8U.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-Z02oZp6I.js → diagram-MMDJMWI5-C9ygMSLV.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-BpGlKv8l.js → diagram-TYMM5635-x-SMPmqb.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-C4YngeQh.js → erDiagram-SMLLAGMA-BGIbL82W.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-BWddFffg.js → flowDiagram-DWJPFMVM-Dg0qwguE.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-Bg0jOD4m.js → ganttDiagram-T4ZO3ILL-XX5qCwKD.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-Bz-3sTXZ.js → gitGraphDiagram-UUTBAWPF-DFil4bpA.js} +1 -1
- package/dist/assets/{graph-XiH8DkIu.js → graph-DJ6egHOd.js} +1 -1
- package/dist/assets/{index-BuUsWKGZ.js → index-DYIYWRaO.js} +2 -2
- package/dist/assets/{infoDiagram-42DDH7IO-DLo-lOCE.js → infoDiagram-42DDH7IO-yB7VRrpO.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-BsIzT5eO.js → ishikawaDiagram-UXIWVN3A-DZ_lPco0.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-C3bOkKqv.js → journeyDiagram-VCZTEJTY-B-FlPR2W.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-D-rJRNbp.js → kanban-definition-6JOO6SKY-mgJwVxKf.js} +1 -1
- package/dist/assets/{layout-Bqp8Hh1c.js → layout-BjzpJ8ZU.js} +1 -1
- package/dist/assets/{linear-BWRSipGb.js → linear-CqOq1rA7.js} +1 -1
- package/dist/assets/{mermaid.core-CJa7klhs.js → mermaid.core-CZyQhtml.js} +4 -4
- package/dist/assets/{min-CQ_VyzMd.js → min-B_tad8Qz.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-Bnj7DDSx.js → mindmap-definition-QFDTVHPH-CgBeHk8K.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-CC8a7Ylw.js → pieDiagram-DEJITSTG-CHENa0KJ.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-CrmL1WUV.js → quadrantDiagram-34T5L4WZ-BUwZwCpc.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-TfkX4u_6.js → requirementDiagram-MS252O5E-H7OaNjNn.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-DMwBbND7.js → sankeyDiagram-XADWPNL6-6UqaFrBf.js} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-CFghMYsm.js → sequenceDiagram-FGHM5R23-DBgpLSsr.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-1H6JIM7l.js → stateDiagram-FHFEXIEX-D_6TWlLl.js} +1 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-Cg06jbzN.js +1 -0
- package/dist/assets/{timeline-definition-GMOUNBTQ-DnLMBlVa.js → timeline-definition-GMOUNBTQ-9_saaHvl.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-DoIkY_KL.js → vennDiagram-DHZGUBPP-DMUS1fiT.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-3n5XmOD5.js → wardley-RL74JXVD-Y-_Nnpu2.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-UMOq3ofC.js → wardleyDiagram-NUSXRM2D-DIh62HY7.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-CNDuQ5Cg.js → xychartDiagram-5P7HB3ND-B_CLrnpt.js} +1 -1
- package/dist/index.html +1 -1
- package/lib/appserver-bridge.js +108 -9
- package/lib/log-management.js +3 -1
- package/lib/plugin-loader.js +126 -6
- package/lib/sdk-manager.js +55 -0
- package/package.json +1 -1
- package/pty-manager.js +27 -3
- package/server.js +301 -34
- package/dist/assets/App-BzrN42Qt.js +0 -41
- package/dist/assets/Mobile-C9wxQTXV.js +0 -10
- package/dist/assets/channel-DvLUZ3Xf.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-ByKhp2Tk.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-ByKhp2Tk.js +0 -1
- package/dist/assets/clone-DZHpE494.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CtXMaKcb.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var He=Object.defineProperty;var We=(t,l,i)=>l in t?He(t,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[l]=i;var M=(t,l,i)=>We(t,typeof l!="symbol"?l+"":l,i);import{r as f,j as e,i as Ue,a as Ge}from"./index-DYIYWRaO.js";import{g as Te,m as Ze,a as _e,r as Pe,K,u as F,C as ue,i as $e,c as E,b as Le,d as qe,I as Xe,_ as Ke,e as z,t as b,f as ke,h as Ye,F as Je,j as Qe,k as et,l as tt,n as st,o as it,s as n,q as le,v as q,A as lt,w as ot,x as nt,y as je,z as r,B,R as at,D as ve,E as rt,T as ct,G as dt,H as mt,J as ht,O as ut,L as bt,M as gt,S as xt,N as he,P as Ne,Q as ft,U as Ce}from"./AppHeader.module-BjoBBbCB.js";const pt=new K("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),jt=new K("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),vt=new K("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Nt=new K("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Ct=new K("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),St=new K("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),yt=t=>{const{componentCls:l,iconCls:i,antCls:s,badgeShadowSize:o,textFontSize:u,textFontSizeSM:c,statusSize:d,dotSize:p,textFontWeight:a,indicatorHeight:x,indicatorHeightSM:m,marginXS:j,calc:y}=t,v=`${s}-scroll-number`,w=_e(t,(S,{darkColor:g})=>({[`&${l} ${l}-color-${S}`]:{background:g,[`&:not(${l}-count)`]:{color:g},"a:hover &":{background:g}}}));return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},Pe(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${l}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:x,height:x,color:t.badgeTextColor,fontWeight:a,fontSize:u,lineHeight:F(x),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:y(x).div(2).equal(),boxShadow:`0 0 0 ${F(o)} ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${l}-count-sm`]:{minWidth:m,height:m,fontSize:c,lineHeight:F(m),borderRadius:y(m).div(2).equal()},[`${l}-multiple-words`]:{padding:`0 ${F(t.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${l}-dot`]:{zIndex:t.indicatorZIndex,width:p,minWidth:p,height:p,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${F(o)} ${t.badgeShadowColor}`},[`${l}-count, ${l}-dot, ${v}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${i}-spin`]:{animationName:St,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${l}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${l}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:d,height:d,verticalAlign:"middle",borderRadius:"50%"},[`${l}-status-success`]:{backgroundColor:t.colorSuccess},[`${l}-status-processing`]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:pt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${l}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${l}-status-error`]:{backgroundColor:t.colorError},[`${l}-status-warning`]:{backgroundColor:t.colorWarning},[`${l}-status-text`]:{marginInlineStart:j,color:t.colorText,fontSize:t.fontSize}}}),w),{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:jt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${l}-zoom-leave`]:{animationName:vt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${l}-not-a-wrapper`]:{[`${l}-zoom-appear, ${l}-zoom-enter`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${l}-zoom-leave`]:{animationName:Ct,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${l}-status)`]:{verticalAlign:"middle"},[`${v}-custom-component, ${l}-count`]:{transform:"none"},[`${v}-custom-component, ${v}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[v]:{overflow:"hidden",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack}`,[`${v}-only`]:{position:"relative",display:"inline-block",height:x,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${v}-only-unit`]:{height:x,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${v}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${l}-count, ${l}-dot, ${v}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},Oe=t=>{const{fontHeight:l,lineWidth:i,marginXS:s,colorBorderBg:o}=t,u=l,c=i,d=t.colorTextLightSolid,p=t.colorError,a=t.colorErrorHover;return Ze(t,{badgeFontHeight:u,badgeShadowSize:c,badgeTextColor:d,badgeColor:p,badgeColorHover:a,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:s,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Ve=t=>{const{fontSize:l,lineHeight:i,fontSizeSM:s,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(l*i)-2*o,indicatorHeightSM:l,dotSize:s/2,textFontSize:s,textFontSizeSM:s,textFontWeight:"normal",statusSize:s/2}},wt=Te("Badge",t=>{const l=Oe(t);return yt(l)},Ve),Tt=t=>{const{antCls:l,badgeFontHeight:i,marginXS:s,badgeRibbonOffset:o,calc:u}=t,c=`${l}-ribbon`,d=`${l}-ribbon-wrapper`,p=_e(t,(a,{darkColor:x})=>({[`&${c}-color-${a}`]:{background:x,color:x}}));return{[d]:{position:"relative"},[c]:Object.assign(Object.assign(Object.assign(Object.assign({},Pe(t)),{position:"absolute",top:s,padding:`0 ${F(t.paddingXS)}`,color:t.colorPrimary,lineHeight:F(i),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${c}-text`]:{color:t.badgeTextColor},[`${c}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${F(u(o).div(2).equal())} solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),p),{[`&${c}-placement-end`]:{insetInlineEnd:u(o).mul(-1).equal(),borderEndEndRadius:0,[`${c}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${c}-placement-start`]:{insetInlineStart:u(o).mul(-1).equal(),borderEndStartRadius:0,[`${c}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},_t=Te(["Badge","Ribbon"],t=>{const l=Oe(t);return Tt(l)},Ve),Pt=t=>{const{className:l,prefixCls:i,style:s,color:o,children:u,text:c,placement:d="end",rootClassName:p}=t,{getPrefixCls:a,direction:x}=f.useContext(ue),m=a("ribbon",i),j=`${m}-wrapper`,[y,v,w]=_t(m,j),S=$e(o,!1),g=E(m,`${m}-placement-${d}`,{[`${m}-rtl`]:x==="rtl",[`${m}-color-${o}`]:S},l),h={},$={};return o&&!S&&(h.background=o,$.color=o),y(f.createElement("div",{className:E(j,p,v,w)},u,f.createElement("div",{className:E(g,v),style:Object.assign(Object.assign({},h),s)},f.createElement("span",{className:`${m}-text`},c),f.createElement("div",{className:`${m}-corner`,style:$}))))},Se=t=>{const{prefixCls:l,value:i,current:s,offset:o=0}=t;let u;return o&&(u={position:"absolute",top:`${o}00%`,left:0}),f.createElement("span",{style:u,className:E(`${l}-only-unit`,{current:s})},i)};function $t(t,l,i){let s=t,o=0;for(;(s+10)%10!==l;)s+=i,o+=i;return o}const Lt=t=>{const{prefixCls:l,count:i,value:s}=t,o=Number(s),u=Math.abs(i),[c,d]=f.useState(o),[p,a]=f.useState(u),x=()=>{d(o),a(u)};f.useEffect(()=>{const y=setTimeout(x,1e3);return()=>clearTimeout(y)},[o]);let m,j;if(c===o||Number.isNaN(o)||Number.isNaN(c))m=[f.createElement(Se,Object.assign({},t,{key:o,current:!0}))],j={transition:"none"};else{m=[];const y=o+10,v=[];for(let h=o;h<=y;h+=1)v.push(h);const w=p<u?1:-1,S=v.findIndex(h=>h%10===c);m=(w<0?v.slice(0,S+1):v.slice(S)).map((h,$)=>{const R=h%10;return f.createElement(Se,Object.assign({},t,{key:h,value:R,offset:w<0?$-S:$,current:$===S}))}),j={transform:`translateY(${-$t(c,o,w)}00%)`}}return f.createElement("span",{className:`${l}-only`,style:j,onTransitionEnd:x},m)};var kt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const Ot=f.forwardRef((t,l)=>{const{prefixCls:i,count:s,className:o,motionClassName:u,style:c,title:d,show:p,component:a="sup",children:x}=t,m=kt(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:j}=f.useContext(ue),y=j("scroll-number",i),v=Object.assign(Object.assign({},m),{"data-show":p,style:c,className:E(y,o,u),title:d});let w=s;if(s&&Number(s)%1===0){const S=String(s).split("");w=f.createElement("bdi",null,S.map((g,h)=>f.createElement(Lt,{prefixCls:y,count:Number(s),value:g,key:S.length-h})))}return c!=null&&c.borderColor&&(v.style=Object.assign(Object.assign({},c),{boxShadow:`0 0 0 1px ${c.borderColor} inset`})),x?Le(x,S=>({className:E(`${y}-custom-component`,S==null?void 0:S.className,u)})):f.createElement(a,Object.assign({},v,{ref:l}),w)});var Vt=function(t,l){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&l.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)l.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i};const Mt=f.forwardRef((t,l)=>{var i,s,o,u,c;const{prefixCls:d,scrollNumberPrefixCls:p,children:a,status:x,text:m,color:j,count:y=null,overflowCount:v=99,dot:w=!1,size:S="default",title:g,offset:h,style:$,className:R,rootClassName:D,classNames:k,styles:O,showZero:H=!1}=t,Y=Vt(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:W,direction:A,badge:N}=f.useContext(ue),T=W("badge",d),[J,ee,oe]=wt(T),_=y>v?`${v}+`:y,P=_==="0"||_===0||m==="0"||m===0,I=y===null||P&&!H,ne=(x!=null||j!=null)&&I,Re=x!=null||!P,Q=w&&!P,U=Q?"":_,G=f.useMemo(()=>((U==null||U==="")&&(m==null||m==="")||P&&!H)&&!Q,[U,P,H,Q,m]),be=f.useRef(y);G||(be.current=y);const Z=be.current,ge=f.useRef(U);G||(ge.current=U);const ae=ge.current,xe=f.useRef(Q);G||(xe.current=Q);const te=f.useMemo(()=>{if(!h)return Object.assign(Object.assign({},N==null?void 0:N.style),$);const V={marginTop:h[1]};return A==="rtl"?V.left=Number.parseInt(h[0],10):V.right=-Number.parseInt(h[0],10),Object.assign(Object.assign(Object.assign({},V),N==null?void 0:N.style),$)},[A,h,$,N==null?void 0:N.style]),Ie=g??(typeof Z=="string"||typeof Z=="number"?Z:void 0),fe=!G&&(m===0?H:!!m&&m!==!0),Fe=fe?f.createElement("span",{className:`${T}-status-text`},m):null,Ae=!Z||typeof Z!="object"?void 0:Le(Z,V=>({style:Object.assign(Object.assign({},te),V.style)})),se=$e(j,!1),Be=E(k==null?void 0:k.indicator,(i=N==null?void 0:N.classNames)===null||i===void 0?void 0:i.indicator,{[`${T}-status-dot`]:ne,[`${T}-status-${x}`]:!!x,[`${T}-color-${j}`]:se}),re={};j&&!se&&(re.color=j,re.background=j);const pe=E(T,{[`${T}-status`]:ne,[`${T}-not-a-wrapper`]:!a,[`${T}-rtl`]:A==="rtl"},R,D,N==null?void 0:N.className,(s=N==null?void 0:N.classNames)===null||s===void 0?void 0:s.root,k==null?void 0:k.root,ee,oe);if(!a&&ne&&(m||Re||!I)){const V=te.color;return J(f.createElement("span",Object.assign({},Y,{className:pe,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(o=N==null?void 0:N.styles)===null||o===void 0?void 0:o.root),te)}),f.createElement("span",{className:Be,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(u=N==null?void 0:N.styles)===null||u===void 0?void 0:u.indicator),re)}),fe&&f.createElement("span",{style:{color:V},className:`${T}-status-text`},m)))}return J(f.createElement("span",Object.assign({ref:l},Y,{className:pe,style:Object.assign(Object.assign({},(c=N==null?void 0:N.styles)===null||c===void 0?void 0:c.root),O==null?void 0:O.root)}),a,f.createElement(qe,{visible:!G,motionName:`${T}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:V})=>{var ce,de;const ze=W("scroll-number",p),me=xe.current,De=E(k==null?void 0:k.indicator,(ce=N==null?void 0:N.classNames)===null||ce===void 0?void 0:ce.indicator,{[`${T}-dot`]:me,[`${T}-count`]:!me,[`${T}-count-sm`]:S==="small",[`${T}-multiple-words`]:!me&&ae&&ae.toString().length>1,[`${T}-status-${x}`]:!!x,[`${T}-color-${j}`]:se});let ie=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(de=N==null?void 0:N.styles)===null||de===void 0?void 0:de.indicator),te);return j&&!se&&(ie=ie||{},ie.background=j),f.createElement(Ot,{prefixCls:ze,show:!G,motionClassName:V,className:De,count:ae,title:Ie,style:ie,key:"scrollNumber"},Ae)}),Fe))}),Me=Mt;Me.Ribbon=Pt;var Et={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M793 242H366v-74c0-6.7-7.7-10.4-12.9-6.3l-142 112a8 8 0 000 12.6l142 112c5.2 4.1 12.9.4 12.9-6.3v-74h415v470H175c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h618c35.3 0 64-28.7 64-64V306c0-35.3-28.7-64-64-64z"}}]},name:"rollback",theme:"outlined"},Rt=function(l,i){return f.createElement(Xe,Ke({},l,{ref:i,icon:Et}))},It=f.forwardRef(Rt);const Ft="_container_1k4mc_1",At="_fileListSection_1k4mc_10",Bt="_header_1k4mc_19",zt="_headerTitle_1k4mc_28",Dt="_fileCount_1k4mc_36",Ht="_changesContainer_1k4mc_44",Wt="_changeItem_1k4mc_51",Ut="_changeItemActive_1k4mc_68",Gt="_dirItem_1k4mc_77",Zt="_dirArrow_1k4mc_88",qt="_dirName_1k4mc_97",Xt="_status_1k4mc_102",Kt="_icon_1k4mc_111",Yt="_fileName_1k4mc_120",Jt="_diffSection_1k4mc_127",Qt="_diffHeader_1k4mc_135",es="_diffFilePath_1k4mc_145",ts="_diffBadge_1k4mc_155",ss="_diffContent_1k4mc_167",is="_diffPlaceholder_1k4mc_173",ls="_statusText_1k4mc_184",os="_errorText_1k4mc_191",ns="_emptyText_1k4mc_198",as="_warningText_1k4mc_205",rs="_fileSizeNote_1k4mc_217",cs="_statusTextItalic_1k4mc_222",ds="_imagePreviewWrap_1k4mc_226",ms="_imagePreview_1k4mc_226",hs="_rotated90_1k4mc_242",C={container:Ft,fileListSection:At,header:Bt,headerTitle:zt,fileCount:Dt,changesContainer:Ht,changeItem:Wt,changeItemActive:Ut,dirItem:Gt,dirArrow:Zt,dirName:qt,status:Xt,icon:Kt,fileName:Yt,diffSection:Jt,diffHeader:Qt,diffFilePath:es,diffBadge:ts,diffContent:ss,diffPlaceholder:is,statusText:ls,errorText:os,emptyText:ns,warningText:as,fileSizeNote:rs,statusTextItalic:cs,imagePreviewWrap:ds,imagePreview:ms,rotated90:hs},us={M:"#e2c08d",A:"#73c991",D:"#f14c4c",R:"#73c991",C:"#73c991",U:"#e2c08d","?":"#73c991","??":"#73c991"},bs={"??":"U"},gs={js:"#e8d44d",jsx:"#61dafb",ts:"#3178c6",tsx:"#3178c6",json:"#999",md:"#519aba",css:"#a86fd9",scss:"#cd6799",html:"#e34c26",py:"#3572a5",go:"#00add8",rs:"#dea584"};function xs(t){const l=t.includes(".")?t.split(".").pop().toLowerCase():"",i=gs[l]||"#888";return e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"1.5",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function fs(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"#c09553",stroke:"none",children:e.jsx("path",{d:"M2 6c0-1.1.9-2 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6z"})})}function ps(t){const l={dirs:{},files:[]};for(const i of t){const s=i.file.split("/");let o=l;for(let u=0;u<s.length-1;u++)o.dirs[s[u]]||(o.dirs[s[u]]={dirs:{},files:[]}),o=o.dirs[s[u]];o.files.push({name:s[s.length-1],status:i.status,fullPath:i.file})}return l}function Ee({name:t,node:l,depth:i,selectedFile:s,onFileClick:o}){const u=Object.keys(l.dirs).sort(),c=[...l.files].sort((d,p)=>d.name.localeCompare(p.name));return e.jsxs(e.Fragment,{children:[t&&e.jsxs("div",{className:C.dirItem,style:{paddingLeft:8+i*16},children:[e.jsx("span",{className:C.dirArrow,children:e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:C.rotated90,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})})}),e.jsx("span",{className:C.icon,children:fs()}),e.jsx("span",{className:C.dirName,children:t})]}),u.map(d=>e.jsx(Ee,{name:d,node:l.dirs[d],depth:t?i+1:i,selectedFile:s,onFileClick:o},d)),c.map(d=>e.jsxs("div",{className:`${C.changeItem} ${s===d.fullPath?C.changeItemActive:""}`,style:{paddingLeft:8+(t?i+1:i)*16},onClick:()=>o&&o(d.fullPath),children:[e.jsx("span",{className:C.icon,children:xs(d.name)}),e.jsx("span",{className:C.fileName,children:d.name}),e.jsx("span",{className:C.status,style:{color:us[d.status]||"#888"},children:bs[d.status]||d.status})]},d.fullPath))]})}function js({visible:t}){const[l,i]=f.useState(null),[s,o]=f.useState(null),[u,c]=f.useState(!0),[d,p]=f.useState(null),[a,x]=f.useState(null),[m,j]=f.useState(null),[y,v]=f.useState(!1),[w,S]=f.useState(!1),g=f.useRef(!0);return f.useEffect(()=>{if(g.current=!0,!!t)return c(!0),o(null),fetch(z("/api/git-status")).then(h=>h.ok?h.json():Promise.reject()).then(h=>{g.current&&(i(h.changes||[]),c(!1))}).catch(()=>{g.current&&(o("Failed to load git status"),c(!1))}),()=>{g.current=!1}},[t]),f.useEffect(()=>{if(!d){x(null),j(null);return}v(!0),x(null),j(null),fetch(z(`/api/git-diff?files=${encodeURIComponent(d)}`)).then(h=>{if(!h.ok)throw new Error(`HTTP ${h.status}`);return h.json()}).then(h=>{g.current&&(h.diffs&&h.diffs[0]?x(h.diffs[0]):j("No diff data available"),v(!1))}).catch(h=>{g.current&&(j(`${b("ui.fileLoadError")}: ${h.message}`),v(!1))})},[d]),e.jsxs("div",{className:C.container,children:[e.jsxs("div",{className:C.fileListSection,children:[e.jsxs("div",{className:C.header,children:[e.jsx("span",{className:C.headerTitle,children:b("ui.gitChanges")}),e.jsx("span",{className:C.fileCount,children:l?l.length:0})]}),e.jsxs("div",{className:C.changesContainer,children:[u&&e.jsx("div",{className:C.statusText,children:"Loading..."}),s&&e.jsx("div",{className:C.errorText,children:s}),!u&&!s&&l&&l.length===0&&e.jsx("div",{className:C.emptyText,children:"No changes"}),!u&&!s&&l&&l.length>0&&e.jsx(Ee,{name:"",node:ps(l),depth:0,selectedFile:d,onFileClick:p})]})]}),e.jsx("div",{className:C.diffSection,children:d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:C.diffHeader,children:[e.jsx("span",{className:C.diffFilePath,children:d}),e.jsx("span",{className:C.diffBadge,children:"DIFF"})]}),e.jsxs("div",{className:C.diffContent,children:[y&&e.jsx("div",{className:C.statusText,children:b("ui.loading")}),m&&e.jsx("div",{className:C.errorText,children:m}),!y&&!m&&a&&e.jsx(e.Fragment,{children:a.is_large?e.jsxs("div",{className:C.warningText,children:[e.jsx("p",{children:b("ui.largeFileWarning")}),e.jsxs("p",{className:C.fileSizeNote,children:[b("ui.fileSize"),": ",(a.size/(1024*1024)).toFixed(2)," MB"]})]}):ke(d)&&!a.is_deleted?e.jsxs("div",{className:C.imagePreviewWrap,children:[e.jsx("img",{className:C.imagePreview,src:z(`/api/file-raw?path=${encodeURIComponent(d)}`),alt:d,onClick:()=>S(!0)}),w&&e.jsx(Ye,{src:z(`/api/file-raw?path=${encodeURIComponent(d)}`),alt:d,onClose:()=>S(!1)})]}):a.is_binary?e.jsx("div",{className:`${C.statusText} ${C.statusTextItalic}`,children:b("ui.binaryFileNotice")}):e.jsx(Je,{file_path:d,old_string:a.old_content,new_string:a.new_content})})]})]}):e.jsxs("div",{className:C.diffPlaceholder,children:[e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#333",strokeWidth:"1.5",children:[e.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),e.jsx("circle",{cx:"18",cy:"6",r:"3"}),e.jsx("circle",{cx:"6",cy:"18",r:"3"}),e.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),e.jsx("span",{children:b("ui.mobileGitDiffHint")})]})})]})}const vs="_container_1bb9n_1",Ns="_header_1bb9n_9",Cs="_headerTitle_1bb9n_18",Ss="_closeBtn_1bb9n_24",ys="_content_1bb9n_38",ws="_empty_1bb9n_47",Ts="_fixedTable_1bb9n_54",_s="_ellipsisCell_1bb9n_58",Ps="_thLeft_1bb9n_65",$s="_colWide_1bb9n_69",Ls="_colNarrow_1bb9n_73",L={container:vs,header:Ns,headerTitle:Cs,closeBtn:Ss,content:ys,empty:ws,fixedTable:Ts,ellipsisCell:_s,thLeft:Ps,colWide:$s,colNarrow:Ls},ks=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],ye={ttl:"cacheLoss.ttl",system_change:"cacheLoss.systemChange",tools_change:"cacheLoss.toolsChange",model_change:"cacheLoss.modelChange",msg_truncated:"cacheLoss.msgTruncated",msg_modified:"cacheLoss.msgModified",key_change:"cacheLoss.keyChange"};function Os({requests:t=[],visible:l,onClose:i}){const{byModel:s,models:o,toolStats:u,skillStats:c,cacheStats:d,activeReasons:p,totalCount:a,totalCache:x,hasCacheStats:m,subAgentEntries:j,hasSubAgentStats:y,teammateEntries:v,hasTeammateStats:w,isEmpty:S}=f.useMemo(()=>{const g=Qe(t),h=Object.keys(g),$=et(t),R=tt(t),D=st(t),k=ks.filter(_=>D[_].count>0),O=k.reduce((_,P)=>_+D[P].count,0),H=k.reduce((_,P)=>_+D[P].cacheCreate,0),Y=k.length>0,W={},A={};for(let _=0;_<t.length;_++){const P=it(t[_],t[_+1]);if(P.type==="SubAgent"){const I=P.subType||"Other";W[I]=(W[I]||0)+1}else if(P.type==="Teammate"){const I=P.subType||"Teammate";A[I]=(A[I]||0)+1}}const N=Object.entries(W).sort((_,P)=>P[1]-_[1]),T=N.length>0,J=Object.entries(A).sort((_,P)=>P[1]-_[1]),ee=J.length>0,oe=h.length===0&&$.length===0&&!Y&&!T&&!ee&&R.length===0;return{byModel:g,models:h,toolStats:$,skillStats:R,cacheStats:D,activeReasons:k,totalCount:O,totalCache:H,hasCacheStats:Y,subAgentEntries:N,hasSubAgentStats:T,teammateEntries:J,hasTeammateStats:ee,isEmpty:oe}},[t]);return l?e.jsxs("div",{className:L.container,children:[e.jsxs("div",{className:L.header,children:[e.jsx("span",{className:L.headerTitle,children:b("ui.tokenStats")}),e.jsx("button",{className:L.closeBtn,onClick:i,children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:L.content,children:S?e.jsx("div",{className:L.empty,children:"—"}):e.jsxs(e.Fragment,{children:[c.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.skillUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Skill"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[c.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:g}),e.jsx("td",{className:n.td,children:h})]},g)),c.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:c.reduce((g,h)=>g+h[1],0)})]})]})]})]}),y&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.subAgentStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"SubAgent"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[j.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[g," ",e.jsx(le,{doc:`SubAgent-${g}`})]}),e.jsx("td",{className:n.td,children:h})]},g)),j.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:j.reduce((g,h)=>g+h[1],0)})]})]})]})]}),w&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:"Teammate"}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Name"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[v.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label,children:g}),e.jsx("td",{className:n.td,children:h})]},g)),v.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:v.reduce((g,h)=>g+h[1],0)})]})]})]})]}),u.length>0&&e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:b("ui.toolUsageStats")}),e.jsxs("table",{className:n.statsTable,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:"Tool"}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")})]})}),e.jsxs("tbody",{children:[u.map(([g,h])=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsxs("td",{className:n.label,children:[g," ",e.jsx(le,{doc:`Tool-${g}`})]}),e.jsx("td",{className:n.td,children:h})]},g)),u.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:u.reduce((g,h)=>g+h[1],0)})]})]})]})]}),m&&e.jsxs("div",{className:n.modelCard,children:[e.jsxs("div",{className:n.modelName,children:["MainAgent",e.jsx(le,{doc:"MainAgent"})," ",b("ui.cacheRebuildStats"),e.jsx(le,{doc:"CacheRebuild"})]}),e.jsxs("table",{className:`${n.statsTable} ${L.fixedTable}`,children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:L.colWide}),e.jsx("col",{className:L.colNarrow}),e.jsx("col",{className:L.colNarrow})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{className:`${n.th} ${L.thLeft}`,children:b("ui.cacheRebuild.reason")}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.count")}),e.jsx("td",{className:n.th,children:b("ui.cacheRebuild.cacheCreate")})]})}),e.jsxs("tbody",{children:[p.map(g=>e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:`${n.label} ${L.ellipsisCell}`,title:b(`ui.${ye[g]}`),children:b(`ui.${ye[g]}`)}),e.jsx("td",{className:n.td,children:d[g].count}),e.jsx("td",{className:n.td,children:q(d[g].cacheCreate)})]},g)),p.length>1&&e.jsxs("tr",{className:n.rebuildTotalRow,children:[e.jsx("td",{className:n.label,children:"Total"}),e.jsx("td",{className:n.td,children:a}),e.jsx("td",{className:n.td,children:q(x)})]})]})]})]}),o.map(g=>{const h=s[g],$=h.input+h.cacheCreation+h.cacheRead,R=$>0?(h.cacheRead/$*100).toFixed(1):"0.0";return e.jsxs("div",{className:n.modelCard,children:[e.jsx("div",{className:n.modelName,children:g}),e.jsx("table",{className:n.statsTable,children:e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Token"}),e.jsx("td",{className:n.th,children:"input"}),e.jsx("td",{className:n.th,children:"output"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:q($)}),e.jsx("td",{className:n.td,children:q(h.output)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:"Cache"}),e.jsx("td",{className:n.th,children:"create"}),e.jsx("td",{className:n.th,children:"read"})]}),e.jsxs("tr",{className:n.rowBorder,children:[e.jsx("td",{className:n.label}),e.jsx("td",{className:n.td,children:q(h.cacheCreation)}),e.jsx("td",{className:n.td,children:q(h.cacheRead)})]}),e.jsxs("tr",{children:[e.jsx("td",{className:n.label,children:b("ui.hitRate")}),e.jsxs("td",{colSpan:2,className:n.td,children:[R,"%"]})]})]})})]},g)})]})})]}):null}const X=class X extends lt{constructor(i){super(i);M(this,"handleExportPromptsTxt",i=>{if(!i||i.length===0)return;const s=[];for(const d of i){const p=[],a=d.timestamp?new Date(d.timestamp).toLocaleString():"";a&&p.push(`${a}:
|
|
2
|
+
`);const x=(d.segments||[]).filter(m=>m.type==="text").map(m=>m.content);x.length>0&&p.push(x.join(`
|
|
3
|
+
`)),s.push(p.join(`
|
|
4
|
+
`))}if(s.length===0)return;const o=new Blob([s.join(`
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
`)],{type:"text/plain;charset=utf-8"}),u=URL.createObjectURL(o),c=document.createElement("a");c.href=u,c.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,c.click(),URL.revokeObjectURL(u)});M(this,"handlePendingPermission",i=>{this.setState({globalPermission:i})});M(this,"handlePendingPlanApproval",i=>{this.setState({globalPlanApproval:i})});M(this,"closeMobilePanels",()=>({mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,mobileFileExplorerVisible:!1}));M(this,"closeProjectFolderPreview",()=>({mobileCurrentFile:null,mobileScrollToLine:null}));M(this,"handleOpenProjectFolder",()=>{this.setState({mobileMenuVisible:!1,...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileFileExplorerVisible:!0})});M(this,"handleAutoApproveChange",i=>{this.setState({autoApproveSeconds:i}),fetch(z("/api/preferences"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoApproveSeconds:i})}).catch(()=>{})});Object.assign(this.state,{mobileMenuVisible:!1,mobileStatsVisible:!1,mobileGitDiffVisible:!1,mobileChatVisible:!1,mobileLogMgmtVisible:!1,mobileSettingsVisible:!1,mobilePromptVisible:!1,mobileTerminalVisible:!1,mobileFileExplorerVisible:!1,mobileCurrentFile:null,mobileScrollToLine:null,mobileFileExplorerExpandedPaths:new Set,mobileFileExplorerRefresh:0,globalPermission:null,globalPlanApproval:null,autoApproveSeconds:0,hasGit:!0})}componentDidMount(){super.componentDidMount(),fetch(z("/api/git-status")).then(i=>{i.ok||this.setState({hasGit:!1,mobileGitDiffVisible:!1})}).catch(()=>this.setState({hasGit:!1,mobileGitDiffVisible:!1})),Ue&&!Ge&&window.visualViewport&&(this._onVisualViewportChange=()=>{const i=this._layoutRef.current;if(!i)return;const s=window.visualViewport;i.style.position="fixed",i.style.top=`${s.offsetTop}px`,i.style.height=`${s.height}px`,i.style.width="100%",i.style.left="0"},window.visualViewport.addEventListener("resize",this._onVisualViewportChange),window.visualViewport.addEventListener("scroll",this._onVisualViewportChange),this._onVisualViewportChange())}componentWillUnmount(){this._onVisualViewportChange&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",this._onVisualViewportChange),window.visualViewport.removeEventListener("scroll",this._onVisualViewportChange)),super.componentWillUnmount()}static parseSegments(i){const s=[],o=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let u=0,c;for(;(c=o.exec(i))!==null;){const p=i.slice(u,c.index).trim();p&&s.push({type:"text",content:p});const a=c[1];if(u=c.index+c[0].length,X.COMMAND_TAGS.has(a))continue;const x=new RegExp(`^<${a}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${a}>$`),m=c[0].match(x),j=m?m[1].trim():c[0].trim();s.push({type:"system",content:j,label:a})}const d=i.slice(u).trim();return d&&s.push({type:"text",content:d}),s}static extractUserTexts(i){const s=[],o=[];let u=null;for(const c of i)if(c.role==="user"){if(typeof c.content=="string"){const d=c.content.trim();if(!d)continue;if(!ot(d)){if(/Implement the following plan:/i.test(d))continue;s.push(d),o.push(d)}}else if(Array.isArray(c.content)){const{commands:d,textBlocks:p}=nt(c.content);d.length>0&&(u=d[d.length-1]);const a=[];for(const m of p)/Implement the following plan:/i.test((m.text||"").trim())||a.push(m.text.trim());const x=c.content.filter(m=>{var j;return m.type==="text"&&((j=m.text)==null?void 0:j.trim())}).map(m=>m.text.trim());a.length>0&&(s.push(a.join(`
|
|
9
|
+
`)),o.push(x.join(`
|
|
10
|
+
`)))}}return{userMsgs:s,fullTexts:o,slashCmd:u}}extractUserPrompts(i){var d;const s=[],o=new Set;let u=null;const c=i.filter(p=>je(p));for(let p=0;p<c.length;p++){const a=c[p],x=((d=a.body)==null?void 0:d.messages)||[],m=a.timestamp||"",{userMsgs:j,fullTexts:y,slashCmd:v}=X.extractUserTexts(x);v&&v!=="/compact"&&v!==u&&s.push({type:"prompt",segments:[{type:"text",content:v}],timestamp:m}),u=v;for(let w=0;w<j.length;w++){const S=j[w];if(o.has(S))continue;o.add(S);const g=y[w]||S;s.push({type:"prompt",segments:X.parseSegments(g),timestamp:m})}}return s}renderOriginalPrompt(i){const s=i.segments.filter(o=>o.type==="text");return s.length===0?null:e.jsx("div",{className:r.mobilePromptCard,children:s.map((o,u)=>e.jsx("pre",{className:r.mobilePromptPreText,children:o.content},u))})}render(){var p;const{filteredRequests:i,fileLoading:s,fileLoadingCount:o,mainAgentSessions:u}=this.renderPrepare();if(this.state.workspaceMode)return this.renderWorkspaceMode();const c=!!this._isLocalLog;let d=null;for(let a=i.length-1;a>=0;a--)if(je(i[a])&&((p=i[a].body)!=null&&p.model)){d=i[a].body.model;break}return e.jsxs("div",{className:r.mobileCLIRoot,ref:this._layoutRef,children:[e.jsxs("div",{className:r.mobileCLIHeader,children:[e.jsxs("div",{className:r.mobileCLIHeaderLeft,children:[e.jsx("button",{className:r.mobileMenuBtn,onClick:()=>this.setState(a=>({mobileMenuVisible:!a.mobileMenuVisible})),"aria-label":b("ui.mobileMenu"),children:e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",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(Me,{status:"processing",color:"green"}),e.jsx("span",{className:r.mobileCLIStatusLabel,children:c?b("ui.historyLog",{file:this._localLogFile}):b("ui.liveMonitoring")+(this.state.projectName?`: ${this.state.projectName}`:"")})]}),e.jsxs("div",{className:r.mobileCLIHeaderRight,children:[c?e.jsx(B,{type:"text",size:"small",icon:e.jsx(It,{}),onClick:()=>history.back(),className:r.mobileNavBtn,children:b("ui.mobileGoBack")}):this.state.hasGit?e.jsx(B,{type:"text",size:"small",icon:e.jsx(at,{}),onClick:()=>this.setState(a=>({...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileGitDiffVisible:!a.mobileGitDiffVisible})),style:{color:this.state.mobileGitDiffVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileGitDiffVisible?b("ui.mobileGitDiffExit"):b("ui.mobileGitDiffBrowse")}):null,!c&&e.jsx(B,{type:"text",size:"small",icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),onClick:()=>this.setState(a=>({...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileTerminalVisible:!a.mobileTerminalVisible})),style:{color:this.state.mobileTerminalVisible?"var(--color-primary)":"var(--text-tertiary)",fontSize:12},children:this.state.mobileTerminalVisible?b("ui.mobileTerminalExit"):b("ui.mobileTerminalBrowse")})]}),this.state.mobileMenuVisible&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:r.mobileMenuOverlay,onClick:()=>this.setState({mobileMenuVisible:!1})}),e.jsxs("div",{className:r.mobileMenuDropdown,children:[!c&&e.jsxs("button",{className:r.mobileMenuItem,onClick:this.handleOpenProjectFolder,children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),b("ui.projectFolder")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileLogMgmtVisible:!0}),this.handleImportLocalLogs()},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),b("ui.logManagement")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileStatsVisible:!0})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]}),b("ui.tokenStats")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobileSettingsVisible:!0})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),b("ui.settings")]}),e.jsxs("button",{className:r.mobileMenuItem,onClick:()=>{this.setState({mobileMenuVisible:!1,...this.closeMobilePanels(),...this.closeProjectFolderPreview(),mobilePromptVisible:!0})},children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"12",x2:"9",y2:"15"}),e.jsx("line",{x1:"12",y1:"12",x2:"15",y2:"15"})]}),b("ui.userPrompt")]})]})]})]}),e.jsxs("div",{className:r.mobileCLIBody,children:[!c&&e.jsxs(e.Fragment,{children:[s&&e.jsxs("div",{className:r.mobileLoadingOverlay,children:[e.jsx("div",{className:r.mobileLoadingSpinner}),e.jsxs("div",{className:r.mobileLoadingLabel,children:[b("ui.loadingChat"),o>0?` (${o})`:""]})]}),e.jsx(ve,{theme:this.themeConfig,children:e.jsx("div",{className:r.mobileChatInner,children:e.jsx(rt,{requests:this.state.requests,mainAgentSessions:u,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,showFullToolContent:this.state.showFullToolContent,showThinkingSummaries:this.state.showThinkingSummaries,onViewRequest:null,scrollToTimestamp:null,onScrollTsDone:()=>{},cliMode:this.state.cliMode,sdkMode:this.state.sdkMode,terminalVisible:!1,mobileChatVisible:!0,fileLoading:this.state.fileLoading,isStreaming:this.state.isStreaming,hasMoreHistory:this.state.hasMoreHistory,loadingMore:this.state.loadingMore,onLoadMoreHistory:()=>this.loadMoreHistory(),loadingSessionId:this.state.loadingSessionId,onLoadSession:a=>this.loadSession(a),onPendingPermission:this.handlePendingPermission,onPendingPlanApproval:this.handlePendingPlanApproval})})})]}),!c&&e.jsx("div",{className:`${r.mobileChatOverlay} ${this.state.mobileTerminalVisible?r.mobileChatOverlayVisible:""}`,children:e.jsx(ct,{modelName:d})}),e.jsx("div",{className:`${r.mobileGitDiffOverlay} ${this.state.mobileGitDiffVisible?r.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileGitDiffInner,children:e.jsx(js,{visible:this.state.mobileGitDiffVisible})})}),e.jsx("div",{className:`${r.mobileGitDiffOverlay} ${this.state.mobileFileExplorerVisible?r.mobileGitDiffOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileGitDiffInner,children:this.state.mobileCurrentFile?ke(this.state.mobileCurrentFile)?e.jsx(dt,{filePath:this.state.mobileCurrentFile,onClose:()=>this.setState({mobileCurrentFile:null,mobileScrollToLine:null})}):e.jsx(mt,{filePath:this.state.mobileCurrentFile,scrollToLine:this.state.mobileScrollToLine,onClose:()=>this.setState({mobileCurrentFile:null,mobileScrollToLine:null})}):e.jsx(ht,{style:{width:"100%",height:"100%"},titleText:b("ui.projectFolder"),refreshTrigger:this.state.mobileFileExplorerRefresh,onClose:()=>this.setState({mobileFileExplorerVisible:!1,...this.closeProjectFolderPreview()}),onFileClick:a=>this.setState({mobileCurrentFile:a,mobileScrollToLine:null}),expandedPaths:this.state.mobileFileExplorerExpandedPaths,onToggleExpand:a=>this.setState(x=>{const m=new Set(x.mobileFileExplorerExpandedPaths);return m.has(a)?m.delete(a):m.add(a),{mobileFileExplorerExpandedPaths:m}}),currentFile:this.state.mobileCurrentFile,onFileRenamed:(a,x)=>this.setState(m=>({mobileCurrentFile:m.mobileCurrentFile===a?x||null:m.mobileCurrentFile,mobileFileExplorerRefresh:m.mobileFileExplorerRefresh+1}))})})}),e.jsx("div",{className:`${r.mobileStatsOverlay} ${this.state.mobileStatsVisible?r.mobileStatsOverlayVisible:""}`,children:e.jsx("div",{className:r.mobileStatsInner,children:e.jsx(Os,{requests:i,visible:this.state.mobileStatsVisible,onClose:()=>this.setState({mobileStatsVisible:!1})})})}),e.jsxs("div",{className:`${r.mobileLogMgmtOverlay} ${this.state.mobileLogMgmtVisible?r.mobileLogMgmtOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsxs("span",{className:r.mobileLogMgmtTitle,children:[e.jsx(ut,{apiEndpoint:z("/api/open-log-dir"),title:b("ui.openLogDir"),size:14}),b("ui.importLocalLogs")]}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileLogMgmtVisible:!1,selectedLogs:new Set}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileLogMgmtActions,children:[this.renderLogProjectSelector(!0),e.jsx(B,{size:"small",type:this.state.selectedLogs.size>=2?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:this.state.selectedLogs.size<2?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:void 0,children:b("ui.mergeLogs")}),e.jsx(B,{size:"small",icon:e.jsx(bt,{}),disabled:this.state.selectedLogs.size===0,onClick:this.handleDeleteLogs,style:this.state.selectedLogs.size===0?{color:"var(--text-muted)",borderColor:"var(--border-light)"}:{color:"var(--color-error-light)",borderColor:"var(--color-error-light)"},children:b("ui.deleteLogs")}),e.jsx(B,{size:"small",icon:e.jsx(gt,{spin:this.state.refreshingStats}),loading:this.state.refreshingStats,onClick:this.handleRefreshStats,children:b("ui.refreshStats")})]}),e.jsx("div",{className:r.mobileLogMgmtBody,children:this.state.localLogsLoading?e.jsx("div",{className:r.spinCenter,children:e.jsx(xt,{})}):(()=>{const a=this.state.localLogs[this.state.currentProject];return!a||a.length===0?e.jsx("div",{className:r.emptyCenter,children:b("ui.noLogs")}):e.jsx(ve,{theme:this.themeConfig,children:e.jsx("div",{className:r.logListContainer,children:this.renderLogTable(a,!0)})})})()})]}),e.jsxs("div",{className:`${r.mobileSettingsOverlay} ${this.state.mobileSettingsVisible?r.mobileSettingsOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:b("ui.settings")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobileSettingsVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:r.mobileSettingsBody,children:[e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.chatDisplaySwitches")}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.collapseToolResults")}),e.jsx(he,{checked:!!this.state.collapseToolResults,onChange:this.handleCollapseToolResultsChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.expandThinking")}),e.jsx(he,{checked:!!this.state.expandThinking,onChange:this.handleExpandThinkingChange})]}),e.jsxs("div",{className:r.mobileSettingsRow,children:[e.jsx("span",{className:r.mobileSettingsLabel,children:b("ui.showFullToolContent")}),e.jsx(he,{checked:!!this.state.showFullToolContent,onChange:this.handleShowFullToolContentChange})]}),e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.themeColor")}),e.jsx("div",{className:r.mobileSettingsRow,children:e.jsx(Ne,{size:"small",value:this.state.themeColor||"dark",onChange:this.handleThemeColorChange,options:[{label:b("ui.themeColor.dark"),value:"dark"},{label:b("ui.themeColor.light"),value:"light"}],style:{width:140}})}),e.jsx("div",{className:r.mobileSettingsSectionTitle,children:b("ui.permission.autoApprove.setting")}),e.jsx("div",{className:r.mobileSettingsRow,children:e.jsx(Ne,{size:"small",value:this.state.autoApproveSeconds||0,onChange:this.handleAutoApproveChange,options:[{label:b("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.jsxs("div",{className:`${r.mobilePromptOverlay} ${this.state.mobilePromptVisible?r.mobilePromptOverlayVisible:""}`,children:[e.jsxs("div",{className:r.mobileLogMgmtHeader,children:[e.jsx("span",{className:r.mobileLogMgmtTitle,children:b("ui.userPrompt")}),e.jsx("button",{className:r.mobileLogMgmtClose,onClick:()=>this.setState({mobilePromptVisible:!1}),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsx("div",{className:r.mobilePromptBody,children:(()=>{const a=this.extractUserPrompts(i);return a.length===0?e.jsx("div",{className:r.mobilePromptEmpty,children:b("ui.noPrompt")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:r.mobilePromptHeader,children:[e.jsxs("span",{className:r.mobilePromptCount,children:[a.length," ",b("ui.promptCountUnit")]}),e.jsx(B,{size:"small",icon:e.jsx(ft,{}),onClick:()=>this.handleExportPromptsTxt(a),children:b("ui.exportPromptsTxt")})]}),e.jsx("div",{className:r.mobilePromptList,children:a.map((x,m)=>e.jsxs("div",{className:r.mobilePromptItem,children:[x.timestamp&&e.jsx("div",{className:r.mobilePromptTimestamp,children:new Date(x.timestamp).toLocaleString()}),this.renderOriginalPrompt(x)]},m))})]})})()})]})]}),this.state.globalPermission&&e.jsx(Ce,{toolName:this.state.globalPermission.permission.toolName,toolInput:this.state.globalPermission.permission.input,requestId:this.state.globalPermission.permission.id,onAllow:this.state.globalPermission.handlers.allow,onAllowSession:this.state.globalPermission.handlers.allowSession,onDeny:this.state.globalPermission.handlers.deny,visible:!0,global:!0,autoApproveSeconds:this.state.autoApproveSeconds,onAutoApproveChange:this.handleAutoApproveChange,modelName:this.state.globalPermission.modelName}),this.state.globalPlanApproval&&e.jsx(Ce,{toolName:"ExitPlanMode",toolInput:this.state.globalPlanApproval.plan.input,requestId:this.state.globalPlanApproval.plan.id,onAllow:this.state.globalPlanApproval.handlers.approve,onDeny:a=>this.state.globalPlanApproval.handlers.reject(a,""),visible:!0,global:!0})]})}};M(X,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let we=X;export{we as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-
|
|
1
|
+
import{aW as L,bk as ln,aG as A,aU as P,aF as W,bl as gn,bm as dn,bn as hn,bo as z,bp as pn,bq as An,br as m,aX as N,b0 as U,b3 as T,bs as _n,a_ as on,bt as wn,bu as On,aH as V,bv as vn,bw as I}from"./mermaid.core-CZyQhtml.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function bn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e<i;)f[e]=r(n[e],e,n);return f}var B=P?P.prototype:void 0,H=B?B.toString:void 0;function k(n){if(typeof n=="string")return n;if(A(n))return bn(n,k)+"";if(x(n))return H?H.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(){}function En(n,r){for(var e=-1,i=n==null?0:n.length;++e<i&&r(n[e],e,n)!==!1;);return n}function cn(n,r,e,i){for(var f=n.length,t=e+-1;++t<f;)if(r(n[t],t,n))return t;return-1}function Tn(n){return n!==n}function Rn(n,r,e){for(var i=e-1,f=n.length;++i<f;)if(n[i]===r)return i;return-1}function In(n,r,e){return r===r?Rn(n,r,e):cn(n,Tn,e)}function Sn(n,r){var e=n==null?0:n.length;return!!e&&In(n,r,0)>-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Gn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Fn,"$1"):i||e)}),r});function Dn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Gn(Dn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&e<i;)n=n[R(r[e++])];return e&&e==i?n:void 0}function mn(n,r,e){var i=n==null?void 0:nn(n,r);return i===void 0?e:i}function rn(n,r){for(var e=-1,i=r.length,f=n.length;++e<i;)n[f+e]=r[e];return n}var K=P?P.isConcatSpreadable:void 0;function Nn(n){return A(n)||z(n)||!!(K&&n&&n[K])}function Kr(n,r,e,i,f){var t=-1,s=n.length;for(e||(e=Nn),f||(f=[]);++t<s;){var u=n[t];e(u)?rn(f,u):i||(f[f.length]=u)}return f}function Un(n,r,e,i){var f=-1,t=n==null?0:n.length;for(i&&t&&(e=n[++f]);++f<t;)e=r(e,n[f],f,n);return e}function en(n,r){for(var e=-1,i=n==null?0:n.length,f=0,t=[];++e<i;){var s=n[e];r(s,e,n)&&(t[f++]=s)}return t}function Bn(){return[]}var Hn=Object.prototype,Kn=Hn.propertyIsEnumerable,q=Object.getOwnPropertySymbols,qn=q?function(n){return n==null?[]:(n=Object(n),en(q(n),function(r){return Kn.call(n,r)}))}:Bn;function Zn(n,r,e){var i=r(n);return A(n)?i:rn(i,e(n))}function Z(n){return Zn(n,M,qn)}var Xn="__lodash_hash_undefined__";function Yn(n){return this.__data__.set(n,Xn),this}function Jn(n){return this.__data__.has(n)}function b(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new pn;++r<e;)this.add(n[r])}b.prototype.add=b.prototype.push=Yn;b.prototype.has=Jn;function Qn(n,r){for(var e=-1,i=n==null?0:n.length;++e<i;)if(r(n[e],e,n))return!0;return!1}function tn(n,r){return n.has(r)}var Wn=1,zn=2;function fn(n,r,e,i,f,t){var s=e&Wn,u=n.length,a=r.length;if(u!=a&&!(s&&a>u))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new b:void 0;for(t.set(n,r),t.set(r,n);++l<u;){var p=n[l],_=r[l];if(i)var w=s?i(_,p,l,r,n,t):i(p,_,l,n,r,t);if(w!==void 0){if(w)continue;d=!1;break}if(o){if(!Qn(r,function(O,v){if(!tn(o,v)&&(p===O||f(p,O,e,i,t)))return o.push(v)})){d=!1;break}}else if(!(p===_||f(p,_,e,i,t))){d=!1;break}}return t.delete(n),t.delete(r),d}function Vn(n){var r=-1,e=Array(n.size);return n.forEach(function(i,f){e[++r]=[f,i]}),e}function C(n){var r=-1,e=Array(n.size);return n.forEach(function(i){e[++r]=i}),e}var kn=1,jn=2,nr="[object Boolean]",rr="[object Date]",er="[object Error]",ir="[object Map]",tr="[object Number]",fr="[object RegExp]",sr="[object Set]",ur="[object String]",ar="[object Symbol]",lr="[object ArrayBuffer]",gr="[object DataView]",X=P?P.prototype:void 0,S=X?X.valueOf:void 0;function dr(n,r,e,i,f,t,s){switch(e){case gr:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case lr:return!(n.byteLength!=r.byteLength||!t(new m(n),new m(r)));case nr:case rr:case tr:return An(+n,+r);case er:return n.name==r.name&&n.message==r.message;case fr:case ur:return n==r+"";case ir:var u=Vn;case sr:var a=i&kn;if(u||(u=C),n.size!=r.size&&!a)return!1;var h=s.get(n);if(h)return h==r;i|=jn,s.set(n,r);var g=fn(u(n),u(r),i,f,t,s);return s.delete(n),g;case ar:if(S)return S.call(n)==S.call(r)}return!1}var hr=1,pr=Object.prototype,Ar=pr.hasOwnProperty;function _r(n,r,e,i,f,t){var s=e&hr,u=Z(n),a=u.length,h=Z(r),g=h.length;if(a!=g&&!s)return!1;for(var l=a;l--;){var d=u[l];if(!(s?d in r:Ar.call(r,d)))return!1}var o=t.get(n),p=t.get(r);if(o&&p)return o==r&&p==n;var _=!0;t.set(n,r),t.set(r,n);for(var w=s;++l<a;){d=u[l];var O=n[d],v=r[d];if(i)var D=s?i(v,O,d,r,n,t):i(O,v,d,n,r,t);if(!(D===void 0?O===v||f(O,v,e,i,t):D)){_=!1;break}w||(w=d=="constructor")}if(_&&!w){var y=n.constructor,E=r.constructor;y!=E&&"constructor"in n&&"constructor"in r&&!(typeof y=="function"&&y instanceof y&&typeof E=="function"&&E instanceof E)&&(_=!1)}return t.delete(n),t.delete(r),_}var or=1,Y="[object Arguments]",J="[object Array]",c="[object Object]",wr=Object.prototype,Q=wr.hasOwnProperty;function Or(n,r,e,i,f,t){var s=A(n),u=A(r),a=s?J:N(n),h=u?J:N(r);a=a==Y?c:a,h=h==Y?c:h;var g=a==c,l=h==c,d=a==h;if(d&&U(n)){if(!U(r))return!1;s=!0,g=!1}if(d&&!g)return t||(t=new T),s||_n(n)?fn(n,r,e,i,f,t):dr(n,r,a,e,i,f,t);if(!(e&or)){var o=g&&Q.call(n,"__wrapped__"),p=l&&Q.call(r,"__wrapped__");if(o||p){var _=o?n.value():n,w=p?r.value():r;return t||(t=new T),f(_,w,e,i,t)}}return d?(t||(t=new T),_r(n,r,e,i,f,t)):!1}function F(n,r,e,i,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Or(n,r,e,i,F,f)}var vr=1,Pr=2;function br(n,r,e,i){var f=e.length,t=f;if(n==null)return!t;for(n=Object(n);f--;){var s=e[f];if(s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++f<t;){s=e[f];var u=s[0],a=n[u],h=s[1];if(s[2]){if(a===void 0&&!(u in n))return!1}else{var g=new T,l;if(!(l===void 0?F(h,a,vr|Pr,i,g):l))return!1}}return!0}function sn(n){return n===n&&!on(n)}function yr(n){for(var r=M(n),e=r.length;e--;){var i=r[e],f=n[i];r[e]=[i,f,sn(f)]}return r}function un(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function Er(n){var r=yr(n);return r.length==1&&r[0][2]?un(r[0][0],r[0][1]):function(e){return e===n||br(e,n,r)}}function cr(n,r){return n!=null&&r in Object(n)}function Tr(n,r,e){r=j(r,n);for(var i=-1,f=r.length,t=!1;++i<f;){var s=R(r[i]);if(!(t=n!=null&&e(n,s)))break;n=n[s]}return t||++i!=f?t:(f=n==null?0:n.length,!!f&&wn(f)&&On(s,f)&&(A(n)||z(n)))}function Rr(n,r){return n!=null&&Tr(n,r,cr)}var Ir=1,Sr=2;function Lr(n,r){return $(n)&&sn(r)?un(R(n),r):function(e){var i=mn(e,n);return i===void 0&&i===r?Rr(e,n):F(r,i,Ir|Sr)}}function xr(n){return function(r){return r==null?void 0:r[n]}}function Mr(n){return function(r){return nn(r,n)}}function $r(n){return $(n)?xr(R(n)):Mr(n)}function an(n){return typeof n=="function"?n:n==null?V:typeof n=="object"?A(n)?Lr(n[0],n[1]):Er(n):$r(n)}function Cr(n,r){return n&&vn(n,r,M)}function Fr(n,r){return function(e,i){if(e==null)return e;if(!W(e))return n(e,i);for(var f=e.length,t=-1,s=Object(e);++t<f&&i(s[t],t,s)!==!1;);return e}}var G=Fr(Cr);function Gr(n){return typeof n=="function"?n:V}function qr(n,r){var e=A(n)?En:G;return e(n,Gr(r))}function Dr(n,r){var e=[];return G(n,function(i,f,t){r(i,f,t)&&e.push(i)}),e}function Zr(n,r){var e=A(n)?en:Dr;return e(n,an(r))}function mr(n,r,e,i,f){return f(n,function(t,s,u){e=i?(i=!1,t):r(e,t,s,u)}),e}function Xr(n,r,e){var i=A(n)?Un:mr,f=arguments.length<3;return i(n,an(r),e,f,G)}var Nr=1/0,Ur=I&&1/C(new I([,-0]))[1]==Nr?function(n){return new I(n)}:yn,Br=200;function Yr(n,r,e){var i=-1,f=Sn,t=n.length,s=!0,u=[],a=u;if(t>=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new b}else a=r?[]:u;n:for(;++i<t;){var g=n[i],l=r?r(g):g;if(g=g!==0?g:0,s&&l===l){for(var d=a.length;d--;)if(a[d]===l)continue n;r&&a.push(l),u.push(g)}else f(a,l,e)||(a!==u&&a.push(l),u.push(g))}return u}export{G as a,Kr as b,an as c,bn as d,rn as e,Zn as f,qn as g,En as h,x as i,Z as j,M as k,Yr as l,Zr as m,qr as n,cn as o,Gr as p,Cr as q,Xr as r,Bn as s,Tr as t,j as u,R as v,nn as w,Rr as x,Dn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-
|
|
1
|
+
import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-CZyQhtml.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|