const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-l6TwDTR3.js","./index-Dmami9WE.js","./index-C8L7RhXS.css","./dashboard-BHNKEvkq.js","./server-3HmnhxQB.js","./kubernetes-D2-GnE0t.js","./deploy-CD5bEXt-.js","./automation-WG-s4QEv.js","./monitor-CicbJUrQ.js","./agent-B3ElXCx8.js","./cloud-Dq4kl-JO.js","./system-C3cYTuQH.js","./ai-2t1T1OeI.js"])))=>i.map(i=>d[i]); import{i as Ke,j as e,r as t,aU as Tr,D as _e,a as Te,b as Je,c as Re,d as Me,s as xr,Y as Ae,M as Ve,P as cr,K as ve,o as Fe,B as N,a6 as $e,S as ze,e as qe,$ as ir,a0 as xe,X as ue,t as vr,L as Le,ak as Rr,ab as Mr,a8 as Br,ag as Pr,aa as Qe,ad as Ar,a9 as $r,ac as Or,as as zr,h as Lr,V as Hr,aQ as hr,N as Ur,E as ar,aJ as gr,aK as ur,aL as br,aM as Sr,aN as We,aO as he,f as Dr}from"./index-Dmami9WE.js";import{C as ke,a as Ee}from"./card-CIfC-8Rh.js";import{I as V}from"./input-NsU9nXZF.js";import{C as ge}from"./checkbox-DoAtRzQj.js";import{b as Oe,e as se,T as Vr,a as Wr,c as de,d as Gr}from"./table-CG4mjNfb.js";import{S as fe,a as we,b as Ce,c as Ie,d as H}from"./select-DUbxjT0z.js";import{s as te,r as Kr}from"./server-3HmnhxQB.js";import{S as Jr}from"./stat-strip-BteRU1Iu.js";import{t as J}from"./index-BuEnLCjT.js";import{B as $}from"./badge-3UzCvU7L.js";import{c as ye}from"./cloud-Dq4kl-JO.js";import{R as le}from"./refresh-cw-CTBERyFc.js";import{S as jr}from"./search-Dd-PeBfg.js";import{x as qr,a as Qr}from"./xterm-DSqgeKvr.js";import{c as Nr,s as Xr}from"./deploy-CD5bEXt-.js";import{M as yr,a as fr}from"./minimize-2-BHcbNmdK.js";import{F as wr}from"./folder-open-CjMh_m_2.js";import{U as Xe}from"./upload-CRLg7Pbj.js";import{a as nr,F as Yr}from"./folder-B5RGB3GG.js";import{A as Zr}from"./arrow-left-BIbk9wFC.js";import{D as Ye}from"./download-Vuij9wGr.js";import{T as Ze}from"./trash-2-DWVnIU6o.js";import{L as D}from"./label-Ap_-SPYI.js";import{T as dr}from"./textarea-DHUZ6N85.js";import{S as es}from"./save-YtnrpTd8.js";import{H as rs}from"./hard-drive-DmC04Y5r.js";import{E as ss}from"./ellipsis-BcWfelgl.js";import{S as ts}from"./square-pen-B3dPIBrm.js";import{P as os}from"./plus-O65gX7Qz.js";import"./index-CtCQcvyh.js";import"./chevron-up-Cq4GPopa.js";const cs=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],er=Ke("chevron-left",cs);const as=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Ge=Ke("file-spreadsheet",as);const ns=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ds=Ke("folder-plus",ns);function ls({servers:s}){const x=s.filter(c=>c.status==="running").length,o=s.filter(c=>c.status==="maintenance").length,a=s.filter(c=>c.status==="stopped").length;return e.jsx(Jr,{"code-path":"src/components/server/ServerStatsStrip.tsx:14:5",items:[{label:"服务器",value:s.length,color:"blue"},{label:"运行中",value:x,color:"emerald"},{label:"维护中",value:o,color:"amber"},{label:"已停止",value:a,color:"muted"}]})}const ps=[{id:"aws",name:"AWS",color:"bg-orange-500",icon:"AWS"},{id:"aliyun",name:"阿里云",color:"bg-orange-600",icon:"AL"},{id:"tencent",name:"腾讯云",color:"bg-blue-500",icon:"TX"},{id:"huawei",name:"华为云",color:"bg-red-500",icon:"HW"},{id:"azure",name:"Azure",color:"bg-blue-600",icon:"AZ"}];function ms({open:s,onClose:x}){const[o,a]=t.useState([]),[c,u]=t.useState(1),[h,g]=t.useState(""),[m,F]=t.useState(null),[S,k]=t.useState([]),[n,y]=t.useState([]),[E,R]=t.useState(""),[w,f]=t.useState(!1),[v,C]=t.useState([]),[i,O]=t.useState([]),[W,j]=t.useState(!1),[z,p]=t.useState([]),[b,B]=t.useState(!1),[T,G]=t.useState(null),[ee,re]=t.useState("22"),[pe,l]=t.useState([]),[M,K]=t.useState(""),U=async()=>{try{const r=await ye.getAccounts();a(r?.list||[])}catch(r){console.error("加载云账号失败:",r)}};t.useEffect(()=>{s&&(U(),Tr(async()=>{const{credentialApi:r}=await import("./index-l6TwDTR3.js");return{credentialApi:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({credentialApi:r})=>{r.list().then(_=>l(_?.list||[])).catch(()=>l([]))}))},[s]);const P=o.filter(r=>r.provider===h&&r.status==="active"),X=t.useCallback(async r=>{try{return(await ye.getAccountRegions(r))?.list||[]}catch{return[]}},[]),q=t.useCallback(async r=>{f(!0);try{await ye.syncRegions(r);const _=await X(r);k(_)}catch(_){throw console.error("同步区域失败:",_),_}finally{f(!1)}},[X]),A=t.useCallback(async()=>{if(!m)return;const r=await X(m.id);if(k(r),r.length===0)try{await q(m.id)}catch{}},[m,X,q]),me=t.useCallback(async()=>{if(!(!m||n.length===0)){j(!0),p([]),C([]),O([]);try{const r=await ye.discoverInstances(m.id,n);C(r?.list||[]),p(r?.errors||[])}catch(r){console.error("发现主机失败:",r),p([r?.message||"发现主机失败"])}finally{j(!1)}}},[m,n]),L=async()=>{if(!(!m||i.length===0)){B(!0);try{const r=v.filter(ae=>i.includes(ae.instance_id)),_=await ye.importInstances(m.id,r,{default_port:Number(ee)||22,credential_id:M?Number(M):void 0});G(_||{imported:0,skipped:0})}catch(r){console.error("导入失败:",r)}finally{B(!1)}}},ie=()=>{c===2&&m&&c<4?(u(3),A()):c<4&&u(c+1)},Ue=()=>{c>1&&u(c-1)},oe=()=>{n.length===S.length&&S.length>0?y([]):y(S.map(r=>r.code))},be=r=>{O(_=>_.includes(r)?_.filter(ae=>ae!==r):[..._,r])},Be=()=>{i.length===v.length&&v.length>0?O([]):O(v.map(r=>r.instance_id))},Se=()=>{x(),u(1),g(""),F(null),y([]),k([]),C([]),O([]),R(""),p([]),G(null),re("22"),K("")},De=S.filter(r=>!E||r.name?.toLowerCase().includes(E.toLowerCase())||r.code?.toLowerCase().includes(E.toLowerCase())),Pe=[{id:1,title:"公有云",icon:xr},{id:2,title:"访问凭据",icon:Ae},{id:3,title:"选择区域",icon:Ve},{id:4,title:"导入确认",icon:cr}];return e.jsx(_e,{"code-path":"src/components/server/CloudServerImport.tsx:232:5",open:s,onOpenChange:Se,children:e.jsxs(Te,{"code-path":"src/components/server/CloudServerImport.tsx:233:7",className:"max-w-3xl bg-[var(--dg-bg-primary)] border-[var(--dg-border)] text-[var(--dg-text-primary)]",children:[e.jsxs(Je,{"code-path":"src/components/server/CloudServerImport.tsx:234:9",children:[e.jsx(Re,{"code-path":"src/components/server/CloudServerImport.tsx:235:11",className:"text-xl",children:"导入云主机"}),e.jsx(Me,{"code-path":"src/components/server/CloudServerImport.tsx:236:11",className:"sr-only",children:"从云平台批量导入主机资产"})]}),e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:240:9",className:"flex items-center justify-center mb-6 flex-wrap gap-1",children:Pe.map((r,_)=>e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:242:13",className:"flex items-center",children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:243:15",className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${c===r.id?"bg-blue-600 text-white":c>r.id?"bg-emerald-600/20 text-emerald-400":"bg-[var(--dg-bg-secondary)] text-[var(--dg-text-muted)]"}`,children:[e.jsx(r.icon,{"code-path":"src/components/server/CloudServerImport.tsx:250:17",className:"h-4 w-4"}),e.jsx("span",{"code-path":"src/components/server/CloudServerImport.tsx:251:17",className:"font-medium hidden sm:inline",children:r.title}),c>r.id&&e.jsx(ve,{"code-path":"src/components/server/CloudServerImport.tsx:252:33",className:"h-3 w-3 ml-1"})]}),_e.jsx(ke,{"code-path":"src/components/server/CloudServerImport.tsx:267:17",className:`cursor-pointer transition-all ${h===r.id?"border-blue-500 ring-2 ring-blue-500/30 bg-[var(--dg-bg-secondary)]":"border-[var(--dg-border)] hover:border-blue-500 bg-[var(--dg-bg-secondary)]"}`,onClick:()=>g(r.id),children:e.jsxs(Ee,{"code-path":"src/components/server/CloudServerImport.tsx:276:19",className:"p-4 flex items-center gap-3",children:[e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:277:21",className:`w-10 h-10 rounded-lg ${r.color} flex items-center justify-center text-white font-bold text-sm`,children:r.icon}),e.jsx("span",{"code-path":"src/components/server/CloudServerImport.tsx:280:21",className:"font-medium text-[var(--dg-text-primary)]",children:r.name})]})},r.id))})]}),c===2&&e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:290:11",className:"space-y-4",children:[e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:291:13",className:"text-[var(--dg-text-secondary)] text-sm",children:"请选择访问凭据(AccessKey)"}),P.length>0?e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:293:15",className:"space-y-2 max-h-[300px] overflow-y-auto",children:P.map(r=>e.jsx(ke,{"code-path":"src/components/server/CloudServerImport.tsx:295:19",className:`cursor-pointer transition-all ${m?.id===r.id?"border-blue-500 ring-1 ring-blue-500/30 bg-[var(--dg-bg-secondary)]":"border-[var(--dg-border)] hover:border-blue-500 bg-[var(--dg-bg-secondary)]"}`,onClick:()=>F(r),children:e.jsxs(Ee,{"code-path":"src/components/server/CloudServerImport.tsx:304:21",className:"p-3 flex items-center justify-between",children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:305:23",className:"flex items-center gap-3",children:[e.jsx(Ae,{"code-path":"src/components/server/CloudServerImport.tsx:306:25",className:"h-5 w-5 text-blue-400"}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:307:25",children:[e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:308:27",className:"font-medium text-[var(--dg-text-primary)]",children:r.name}),e.jsxs("p",{"code-path":"src/components/server/CloudServerImport.tsx:309:27",className:"text-xs text-[var(--dg-text-muted)]",children:[(r.access_key||r.accessKey||"******").slice(0,20),"..."]})]})]}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:314:23",className:"text-right",children:[e.jsxs($,{"code-path":"src/components/server/CloudServerImport.tsx:315:25",className:"bg-emerald-500/20 text-emerald-400 border-0",children:[r.region_count??r.regionCount??0," 区域"]}),e.jsxs("p",{"code-path":"src/components/server/CloudServerImport.tsx:318:25",className:"text-xs text-[var(--dg-text-muted)] mt-1",children:[r.server_count??r.serverCount??0," 服务器"]})]})]})},r.id))}):e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:325:15",className:"text-center py-8 text-[var(--dg-text-muted)]",children:[e.jsx(Ae,{"code-path":"src/components/server/CloudServerImport.tsx:326:17",className:"h-12 w-12 mx-auto mb-3 opacity-50"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:327:17",children:"该云平台暂无有效的访问凭据"})]})]}),c===3&&e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:335:11",className:"space-y-4",children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:336:13",className:"flex items-center justify-between",children:[e.jsxs("p",{"code-path":"src/components/server/CloudServerImport.tsx:337:15",className:"text-[var(--dg-text-secondary)] text-sm",children:["请选择要同步的区域",S.length>0&&e.jsxs("span",{"code-path":"src/components/server/CloudServerImport.tsx:340:19",className:"ml-2 text-[var(--dg-text-muted)]",children:["(共 ",S.length," 个区域,已选 ",n.length," 个)"]})]}),e.jsxs(N,{"code-path":"src/components/server/CloudServerImport.tsx:343:15",variant:"outline",size:"sm",className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)]",onClick:()=>m&&q(m.id),disabled:w,children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:350:17",className:`h-3 w-3 mr-1 ${w?"animate-spin":""}`}),w?"同步中...":"刷新区域"]})]}),w?e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:356:15",className:"text-center py-12",children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:357:17",className:"h-8 w-8 mx-auto mb-3 animate-spin text-blue-400"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:358:17",className:"text-[var(--dg-text-secondary)]",children:"正在从云平台同步区域列表..."})]}):S.length===0?e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:361:15",className:"text-center py-8 text-[var(--dg-text-muted)]",children:[e.jsx(Ve,{"code-path":"src/components/server/CloudServerImport.tsx:362:17",className:"h-10 w-10 mx-auto mb-3 opacity-50"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:363:17",children:"暂无区域数据"}),e.jsxs(N,{"code-path":"src/components/server/CloudServerImport.tsx:364:17",variant:"outline",size:"sm",className:"mt-3 border-[var(--dg-border)] text-blue-400",onClick:()=>m&&q(m.id),children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:370:19",className:"h-3 w-3 mr-1"}),"立即同步"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:377:17",className:"flex items-center gap-2",children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:378:19",className:"relative flex-1",children:[e.jsx(jr,{"code-path":"src/components/server/CloudServerImport.tsx:379:21",className:"h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-[var(--dg-text-muted)]"}),e.jsx(V,{"code-path":"src/components/server/CloudServerImport.tsx:380:21",placeholder:"搜索区域名称或编码...",value:E,onChange:r=>R(r.target.value),className:"pl-9 bg-[var(--dg-bg-secondary)] border-[var(--dg-border)]"})]}),e.jsx(N,{"code-path":"src/components/server/CloudServerImport.tsx:387:19",variant:"outline",size:"sm",onClick:oe,className:"border-[var(--dg-border)]",children:n.length===S.length&&S.length>0?"取消全选":"全选"})]}),e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:393:17",className:"border rounded-lg border-[var(--dg-border)] overflow-hidden max-h-[300px] overflow-y-auto",children:e.jsxs("table",{"code-path":"src/components/server/CloudServerImport.tsx:394:19",className:"w-full",children:[e.jsx("thead",{"code-path":"src/components/server/CloudServerImport.tsx:395:21",className:"bg-[var(--dg-bg-secondary)] sticky top-0",children:e.jsxs("tr",{"code-path":"src/components/server/CloudServerImport.tsx:396:23",children:[e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:397:25",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)] w-10",children:e.jsx(ge,{"code-path":"src/components/server/CloudServerImport.tsx:398:27",checked:n.length===S.length&&S.length>0,onCheckedChange:oe})}),e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:403:25",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)]",children:"区域编码"}),e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:404:25",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)]",children:"区域名称"}),e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:405:25",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)]",children:"Endpoint"})]})}),e.jsx("tbody",{"code-path":"src/components/server/CloudServerImport.tsx:408:21",className:"divide-y divide-[var(--dg-border)]",children:De.map(r=>e.jsxs("tr",{"code-path":"src/components/server/CloudServerImport.tsx:410:25",className:`cursor-pointer hover:bg-[var(--dg-bg-hover)] ${n.includes(r.code)?"bg-blue-500/10":""}`,onClick:()=>{y(_=>_.includes(r.code)?_.filter(ae=>ae!==r.code):[..._,r.code])},children:[e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:421:27",className:"px-3 py-2",children:e.jsx(ge,{"code-path":"src/components/server/CloudServerImport.tsx:422:29",checked:n.includes(r.code)})}),e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:424:27",className:"px-3 py-2 text-sm text-blue-400 font-mono",children:r.code}),e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:425:27",className:"px-3 py-2 text-sm text-[var(--dg-text-primary)]",children:r.name}),e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:426:27",className:"px-3 py-2 text-xs text-[var(--dg-text-muted)] font-mono truncate max-w-[200px]",children:r.endpoint||"-"})]},r.id||r.code))})]})})]})]}),c===4&&e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:439:11",className:"space-y-4",children:T?e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:442:15",className:"text-center py-12",children:[e.jsx(cr,{"code-path":"src/components/server/CloudServerImport.tsx:443:17",className:"h-12 w-12 mx-auto mb-3 text-emerald-400"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:444:17",className:"text-lg font-medium text-[var(--dg-text-primary)]",children:"导入完成"}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:445:17",className:"flex items-center justify-center gap-6 mt-4",children:[e.jsxs($,{"code-path":"src/components/server/CloudServerImport.tsx:446:19",className:"bg-emerald-500/20 text-emerald-400 border-0 text-base px-4 py-1",children:["成功导入 ",T.imported," 台"]}),T.skipped>0&&e.jsxs($,{"code-path":"src/components/server/CloudServerImport.tsx:450:21",className:"bg-amber-500/20 text-amber-400 border-0 text-base px-4 py-1",children:["跳过 ",T.skipped," 台(已存在)"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:458:17",className:"flex items-center justify-between",children:[e.jsxs("p",{"code-path":"src/components/server/CloudServerImport.tsx:459:19",className:"text-[var(--dg-text-secondary)] text-sm",children:["已选 ",n.length," 个区域",v.length>0&&e.jsxs("span",{"code-path":"src/components/server/CloudServerImport.tsx:462:23",className:"ml-2",children:["· 发现 ",v.length," 台主机"]})]}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:465:19",className:"flex items-center gap-2",children:[v.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(N,{"code-path":"src/components/server/CloudServerImport.tsx:468:25",variant:"outline",size:"sm",onClick:Be,className:"border-[var(--dg-border)]",children:i.length===v.length&&v.length>0?"取消全选":"全选"}),e.jsxs($,{"code-path":"src/components/server/CloudServerImport.tsx:471:25",className:"bg-blue-500/20 text-blue-400 border-0",children:["已选 ",i.length," 台"]})]}),e.jsxs(N,{"code-path":"src/components/server/CloudServerImport.tsx:476:21",variant:"outline",size:"sm",onClick:me,disabled:W||n.length===0,className:"border-[var(--dg-border)] text-blue-400",children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:483:23",className:`h-3 w-3 mr-1 ${W?"animate-spin":""}`}),W?"发现中...":v.length>0?"重新发现":"发现主机"]})]})]}),e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:490:17",className:"flex flex-wrap gap-1",children:n.map(r=>{const _=S.find(ae=>ae.code===r);return e.jsxs($,{"code-path":"src/components/server/CloudServerImport.tsx:494:23",className:"bg-[var(--dg-bg-secondary)] text-[var(--dg-text-muted)] border border-[var(--dg-border)] text-xs",children:[e.jsx(Ve,{"code-path":"src/components/server/CloudServerImport.tsx:495:25",className:"h-3 w-3 mr-1"}),_?.name||r]},r)})}),z.length>0&&e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:504:19",className:"flex items-start gap-2 p-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-400 text-sm",children:[e.jsx($e,{"code-path":"src/components/server/CloudServerImport.tsx:505:21",className:"h-4 w-4 mt-0.5 flex-shrink-0"}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:506:21",children:[e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:507:23",className:"font-medium",children:"部分区域发现失败:"}),z.map((r,_)=>e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:509:25",className:"text-xs mt-1 opacity-80",children:r},_))]})]}),W?e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:517:19",className:"text-center py-12",children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:518:21",className:"h-8 w-8 mx-auto mb-3 animate-spin text-blue-400"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:519:21",className:"text-[var(--dg-text-secondary)]",children:"正在发现云主机,请稍候..."}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:520:21",className:"text-xs text-[var(--dg-text-muted)] mt-1",children:"正在逐区域查询,可能需要数秒"})]}):v.length===0&&!W?e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:523:19",className:"text-center py-8 text-[var(--dg-text-muted)]",children:[e.jsx(ze,{"code-path":"src/components/server/CloudServerImport.tsx:524:21",className:"h-10 w-10 mx-auto mb-3 opacity-50"}),e.jsx("p",{"code-path":"src/components/server/CloudServerImport.tsx:525:21",children:'点击"发现主机"按钮,开始扫描所选区域'})]}):e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:528:19",className:"border rounded-lg border-[var(--dg-border)] overflow-hidden max-h-[300px] overflow-y-auto",children:e.jsxs("table",{"code-path":"src/components/server/CloudServerImport.tsx:529:21",className:"w-full",children:[e.jsx("thead",{"code-path":"src/components/server/CloudServerImport.tsx:530:23",className:"bg-[var(--dg-bg-secondary)] sticky top-0",children:e.jsxs("tr",{"code-path":"src/components/server/CloudServerImport.tsx:531:25",children:[e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:532:27",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)] w-10",children:e.jsx(ge,{"code-path":"src/components/server/CloudServerImport.tsx:533:29",checked:i.length===v.length&&v.length>0,onCheckedChange:Be})}),e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:538:27",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)]",children:"主机名"}),e.jsx("th",{"code-path":"src/components/server/CloudServerImport.tsx:539:27",className:"px-3 py-2 text-left text-xs font-medium text-[var(--dg-text-secondary)]",children:"IP地址"})]})}),e.jsx("tbody",{"code-path":"src/components/server/CloudServerImport.tsx:542:23",className:"divide-y divide-[var(--dg-border)]",children:v.map(r=>e.jsxs("tr",{"code-path":"src/components/server/CloudServerImport.tsx:544:27",className:`cursor-pointer hover:bg-[var(--dg-bg-hover)] ${i.includes(r.instance_id)?"bg-blue-500/10":""}`,onClick:()=>be(r.instance_id),children:[e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:549:29",className:"px-3 py-2",children:e.jsx(ge,{"code-path":"src/components/server/CloudServerImport.tsx:550:31",checked:i.includes(r.instance_id)})}),e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:552:29",className:"px-3 py-2 text-sm text-[var(--dg-text-primary)]",children:r.instance_name||r.hostname||"-"}),e.jsx("td",{"code-path":"src/components/server/CloudServerImport.tsx:553:29",className:"px-3 py-2 text-sm text-[var(--dg-text-secondary)]",children:r.private_ip||r.public_ip||"-"})]},r.instance_id))})]})}),v.length>0&&i.length>0&&e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:565:19",className:"grid grid-cols-2 gap-4 p-4 rounded-lg bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)]",children:[e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:566:21",children:[e.jsxs("label",{"code-path":"src/components/server/CloudServerImport.tsx:567:23",className:"block text-xs font-medium text-[var(--dg-text-secondary)] mb-1",children:["SSH 端口",e.jsx("span",{"code-path":"src/components/server/CloudServerImport.tsx:569:25",className:"text-[var(--dg-text-muted)] ml-1",children:"(导入时统一设置)"})]}),e.jsx(V,{"code-path":"src/components/server/CloudServerImport.tsx:571:23",type:"number",placeholder:"22",value:ee,onChange:r=>re(r.target.value),className:"w-32 bg-[var(--dg-bg-tertiary)] border-[var(--dg-border)] text-[var(--dg-text-primary)]"})]}),e.jsxs("div",{"code-path":"src/components/server/CloudServerImport.tsx:579:21",children:[e.jsxs("label",{"code-path":"src/components/server/CloudServerImport.tsx:580:23",className:"block text-xs font-medium text-[var(--dg-text-secondary)] mb-1",children:["关联凭证",e.jsx("span",{"code-path":"src/components/server/CloudServerImport.tsx:582:25",className:"text-[var(--dg-text-muted)] ml-1",children:"(可选,用于SSH远程管理)"})]}),e.jsxs("select",{"code-path":"src/components/server/CloudServerImport.tsx:584:23",value:M,onChange:r=>K(r.target.value),className:"w-full px-3 py-1.5 bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)] rounded-md text-[var(--dg-text-primary)] text-xs",children:[e.jsx("option",{"code-path":"src/components/server/CloudServerImport.tsx:589:25",value:"",children:"不使用凭据"}),pe.map(r=>e.jsxs("option",{"code-path":"src/components/server/CloudServerImport.tsx:591:27",value:String(r.id),children:[r.type==="ssh_key"?"🔑":"🔒"," ",r.name]},r.id))]})]})]})]})}),e.jsxs(qe,{"code-path":"src/components/server/CloudServerImport.tsx:605:9",className:"flex justify-between items-center",children:[e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:606:11",children:c>1&&!T&&e.jsxs(N,{"code-path":"src/components/server/CloudServerImport.tsx:608:15",variant:"outline",onClick:Ue,className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)]",children:[e.jsx(er,{"code-path":"src/components/server/CloudServerImport.tsx:609:17",className:"h-4 w-4 mr-1"}),"上一步"]})}),e.jsx("div",{"code-path":"src/components/server/CloudServerImport.tsx:614:11",className:"flex gap-2",children:T?e.jsx(N,{"code-path":"src/components/server/CloudServerImport.tsx:616:15",onClick:Se,className:"bg-blue-600 hover:bg-blue-700",children:"完成"}):e.jsxs(e.Fragment,{children:[e.jsx(N,{"code-path":"src/components/server/CloudServerImport.tsx:621:17",variant:"outline",onClick:Se,className:"border-[var(--dg-border)] text-[var(--dg-text-secondary)]",children:"取消"}),c<4?e.jsxs(N,{"code-path":"src/components/server/CloudServerImport.tsx:625:19",onClick:ie,disabled:c===1&&!h||c===2&&!m||c===3&&n.length===0,className:"bg-blue-600 hover:bg-blue-700",children:["下一步",e.jsx(Fe,{"code-path":"src/components/server/CloudServerImport.tsx:635:21",className:"h-4 w-4 ml-1"})]}):e.jsx(N,{"code-path":"src/components/server/CloudServerImport.tsx:638:19",onClick:L,disabled:i.length===0||b,className:"bg-emerald-600 hover:bg-emerald-700",children:b?e.jsxs(e.Fragment,{children:[e.jsx(le,{"code-path":"src/components/server/CloudServerImport.tsx:645:25",className:"h-4 w-4 mr-1 animate-spin"}),"导入中..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{"code-path":"src/components/server/CloudServerImport.tsx:650:25",className:"h-4 w-4 mr-1"}),"确认导入 (",i.length,")"]})})]})})]})]})})}function xs({open:s,onOpenChange:x,serverId:o,serverName:a,serverIp:c,hasAuth:u=!0}){const h=t.useRef(null),g=t.useRef(null),m=t.useRef(null),F=t.useRef(null),[S,k]=t.useState(!1),[n,y]=t.useState(!1),[E,R]=t.useState([]),[w,f]=t.useState(""),[v,C]=t.useState(!1),[i,O]=t.useState(u);t.useEffect(()=>{!s||u||Nr.list().then(j=>R(j?.list||[])).catch(()=>{})},[s,u]);const W=async()=>{if(!(!w||!o))try{C(!0),await Xr.assign(o,Number(w)),J.success("凭据已关联"),O(!0)}catch(j){J.error(j?.message||"关联失败")}finally{C(!1)}};return t.useEffect(()=>{s||(O(u),f(""))},[s,u]),t.useEffect(()=>{if(!s||!o||!i)return;const j=new qr.Terminal({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',allowProposedApi:!0,theme:{background:"#0a0e14",foreground:"#d6d6d6",cursor:"#d6d6d6",selectionBackground:"rgba(255,255,255,0.2)"}}),z=new Qr.FitAddon;j.loadAddon(z),g.current=j,F.current=z;const p=location.protocol==="https:"?"wss":"ws",b=ir.getState().token||"",B=`${p}://${location.host}/ws/terminal?id=${o}&cols=80&rows=24&token=${encodeURIComponent(b)}`,T=new WebSocket(B);return m.current=T,j.onData(G=>{T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({status:0,data:G}))}),T.onmessage=G=>{try{const ee=JSON.parse(G.data);ee.status===0&&typeof ee.data=="string"&&j.write(ee.data)}catch{j.write(typeof G.data=="string"?G.data:"")}},T.onopen=()=>{k(!0),h.current&&(j.open(h.current),requestAnimationFrame(()=>{try{z.fit(),j.focus()}catch{}}))},T.onclose=()=>{k(!1),j.write(`\r \x1B[31m[连接已关闭]\x1B[0m\r `)},T.onerror=()=>{j.write(`\r \x1B[31m[连接发生错误]\x1B[0m\r `)},()=>{try{T.close(),j.dispose()}catch{}g.current=null,m.current=null,k(!1)}},[s,o,i]),t.useEffect(()=>{if(!s)return;const j=h.current;if(!j)return;let z;const p=new ResizeObserver(()=>{clearTimeout(z),z=setTimeout(()=>{if(F.current&&g.current&&m.current)try{F.current.fit(),g.current.focus();const{cols:b,rows:B}=g.current;m.current.readyState===WebSocket.OPEN&&m.current.send(JSON.stringify({status:1,cols:b,rows:B}))}catch{}},60)});return p.observe(j),()=>{clearTimeout(z),p.disconnect()}},[s]),e.jsx(_e,{"code-path":"src/components/server/TerminalDialog.tsx:196:5",open:s,onOpenChange:x,children:e.jsxs(Te,{"code-path":"src/components/server/TerminalDialog.tsx:197:7",showCloseButton:!1,className:xe("bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] p-0 gap-0","!duration-0 !transition-none",n?"!max-w-none !w-screen !h-screen !rounded-none !translate-x-0 !translate-y-0 !left-0 !top-0":""),style:n?{maxWidth:"100vw",width:"100vw",height:"100vh"}:{maxWidth:"900px",width:"90vw"},children:[e.jsxs(Re,{"code-path":"src/components/server/TerminalDialog.tsx:209:9",className:"sr-only",children:["终端 - ",a]}),e.jsx(Me,{"code-path":"src/components/server/TerminalDialog.tsx:210:9",className:"sr-only",children:"SSH 终端连接"}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:212:9",className:"flex items-center justify-between px-4 py-2 border-b border-[var(--dg-border)]",children:[e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:213:11",className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{"code-path":"src/components/server/TerminalDialog.tsx:214:13",className:xe("w-2 h-2 rounded-full",S?"bg-emerald-400":"bg-red-400")}),e.jsx("span",{"code-path":"src/components/server/TerminalDialog.tsx:215:13",className:"text-[var(--dg-text-primary)] font-medium",children:a}),e.jsxs("span",{"code-path":"src/components/server/TerminalDialog.tsx:216:13",className:"text-[var(--dg-text-muted)]",children:["(",c,")"]})]}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:218:11",className:"flex items-center gap-1",children:[e.jsx("button",{"code-path":"src/components/server/TerminalDialog.tsx:219:13",onClick:()=>y(!n),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",children:n?e.jsx(yr,{"code-path":"src/components/server/TerminalDialog.tsx:223:29",className:"h-4 w-4"}):e.jsx(fr,{"code-path":"src/components/server/TerminalDialog.tsx:223:65",className:"h-4 w-4"})}),e.jsx("button",{"code-path":"src/components/server/TerminalDialog.tsx:225:13",onClick:()=>x(!1),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",children:e.jsx(ue,{"code-path":"src/components/server/TerminalDialog.tsx:229:15",className:"h-4 w-4"})})]})]}),!i&&e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:235:11",className:"p-6 flex flex-col items-center justify-center gap-4",style:{height:"480px"},children:[e.jsx(vr,{"code-path":"src/components/server/TerminalDialog.tsx:236:13",className:"h-12 w-12 text-amber-400"}),e.jsxs("div",{"code-path":"src/components/server/TerminalDialog.tsx:237:13",className:"text-center",children:[e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:238:15",className:"text-[var(--dg-text-primary)] font-medium mb-1",children:"服务器未配置认证凭据"}),e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:239:15",className:"text-sm text-[var(--dg-text-muted)]",children:"请选择一个凭据用于 SSH 连接"})]}),E.length===0?e.jsx("p",{"code-path":"src/components/server/TerminalDialog.tsx:242:15",className:"text-xs text-[var(--dg-text-muted)]",children:"暂无可用凭据,请先去「凭证配置」添加"}):e.jsxs("select",{"code-path":"src/components/server/TerminalDialog.tsx:244:15",value:w,onChange:j=>f(j.target.value),className:"w-64 px-3 py-2 bg-[var(--dg-bg-tertiary)] border border-[var(--dg-border)] rounded-md text-[var(--dg-text-primary)] text-sm",children:[e.jsx("option",{"code-path":"src/components/server/TerminalDialog.tsx:249:17",value:"",children:"-- 选择凭据 --"}),E.map(j=>e.jsxs("option",{"code-path":"src/components/server/TerminalDialog.tsx:251:19",value:String(j.id),children:[j.type==="ssh_key"?"🔑":"🔒"," ",j.name]},j.id))]}),e.jsx(N,{"code-path":"src/components/server/TerminalDialog.tsx:257:13",onClick:W,disabled:!w||v,className:"bg-[var(--dg-blue)] hover:opacity-90 text-white",children:v?"关联中...":"确认连接"})]}),i&&e.jsx("div",{"code-path":"src/components/server/TerminalDialog.tsx:268:11",ref:h,className:"bg-[#0a0e14]",style:{height:n?"calc(100vh - 49px)":"480px"}})]})})}const is=s=>s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1048576).toFixed(2)} MB`;function vs({open:s,onOpenChange:x,serverId:o,serverName:a}){const[c,u]=t.useState([]),[h,g]=t.useState([]),[m,F]=t.useState("/"),[S,k]=t.useState(!1),[n,y]=t.useState(""),[E,R]=t.useState(!1),[w,f]=t.useState(!1),v=t.useRef(null),C=t.useCallback(async p=>{if(o){k(!0),y("");try{const b=await te.listFiles(o,p),B=b?.data||b;u(B.items||[]),g(B.breadcrumbs||[]),F(B.path||p)}catch(b){y(b?.message||"加载目录失败"),u([])}finally{k(!1)}}},[o]);t.useEffect(()=>{s&&o&&(f(!1),C("/"))},[s,o,C]);const i=async p=>{if(o)try{await te.downloadFile(o,p)}catch(b){y("下载失败: "+(b?.message||""))}},O=async p=>{const b=p.target.files?.[0];if(!(!b||!o)){R(!0);try{await te.uploadFile(o,m,b),await C(m)}catch(B){y(B?.message||"上传失败")}finally{R(!1),v.current&&(v.current.value="")}}},W=async(p,b)=>{if(!(!o||!confirm(`确认删除 ${b?"目录":"文件"} "${p}"?`)))try{await te.deleteFile(o,p),await C(m)}catch(B){y(B?.message||"删除失败")}},j=async()=>{const p=prompt("输入目录名:");if(!p||!o)return;const b=m==="/"?`/${p}`:`${m}/${p}`;try{await te.mkdir(o,b),await C(m)}catch(B){y(B?.message||"创建失败")}},z=[...c].sort((p,b)=>p.is_dir!==b.is_dir?p.is_dir?-1:1:p.name.localeCompare(b.name));return e.jsx(_e,{"code-path":"src/components/server/ServerFileBrowser.tsx:145:5",open:s,onOpenChange:x,children:e.jsxs(Te,{"code-path":"src/components/server/ServerFileBrowser.tsx:146:7",showCloseButton:!1,onInteractOutside:p=>{E&&p.preventDefault()},className:xe("bg-[var(--dg-bg-secondary)] border-[var(--dg-border)] p-0 gap-0","!duration-0 !transition-none",w?"!max-w-none !w-screen !h-screen !rounded-none":""),style:w?{maxWidth:"100vw",width:"100vw",height:"100vh"}:{maxWidth:"95vw",width:"1100px",maxHeight:"92vh"},children:[e.jsxs(Re,{"code-path":"src/components/server/ServerFileBrowser.tsx:164:9",className:"sr-only",children:["文件浏览 — ",a]}),e.jsx(Me,{"code-path":"src/components/server/ServerFileBrowser.tsx:165:9",className:"sr-only",children:"SFTP 文件管理 · 上传 · 下载 · 删除"}),e.jsxs("div",{"code-path":"src/components/server/ServerFileBrowser.tsx:168:9",className:"flex items-center justify-between px-4 py-2.5 border-b border-[var(--dg-border)] shrink-0",children:[e.jsxs("div",{"code-path":"src/components/server/ServerFileBrowser.tsx:169:11",className:"flex items-center gap-2 min-w-0",children:[e.jsx(wr,{"code-path":"src/components/server/ServerFileBrowser.tsx:170:13",className:"h-4 w-4 text-[var(--dg-blue)] shrink-0"}),e.jsx("span",{"code-path":"src/components/server/ServerFileBrowser.tsx:171:13",className:"text-[var(--dg-text-primary)] font-medium text-sm truncate",children:a}),e.jsx("span",{"code-path":"src/components/server/ServerFileBrowser.tsx:174:13",className:"text-[var(--dg-text-muted)] text-xs",children:"· SFTP 文件管理"})]}),e.jsxs("div",{"code-path":"src/components/server/ServerFileBrowser.tsx:176:11",className:"flex items-center gap-1",children:[e.jsx("button",{"code-path":"src/components/server/ServerFileBrowser.tsx:177:13",onClick:()=>f(!w),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",title:w?"退出全屏":"全屏",children:w?e.jsx(yr,{"code-path":"src/components/server/ServerFileBrowser.tsx:182:29",className:"h-4 w-4"}):e.jsx(fr,{"code-path":"src/components/server/ServerFileBrowser.tsx:182:65",className:"h-4 w-4"})}),e.jsx("button",{"code-path":"src/components/server/ServerFileBrowser.tsx:184:13",onClick:()=>x(!1),className:"p-1.5 rounded hover:bg-[var(--dg-bg-hover)] text-[var(--dg-text-secondary)]",children:e.jsx(ue,{"code-path":"src/components/server/ServerFileBrowser.tsx:188:15",className:"h-4 w-4"})})]})]}),e.jsxs("div",{"code-path":"src/components/server/ServerFileBrowser.tsx:194:9",className:"flex items-center gap-2 px-4 py-2 border-b border-[var(--dg-border)] bg-[var(--dg-bg-primary)] shrink-0",children:[e.jsxs(N,{"code-path":"src/components/server/ServerFileBrowser.tsx:195:11",variant:"outline",size:"sm",className:"border-[var(--dg-border)] h-8",onClick:()=>C(m),children:[e.jsx(le,{"code-path":"src/components/server/ServerFileBrowser.tsx:197:13",className:"h-3.5 w-3.5 mr-1"}),"刷新"]}),e.jsxs("label",{"code-path":"src/components/server/ServerFileBrowser.tsx:199:11",children:[e.jsxs(N,{"code-path":"src/components/server/ServerFileBrowser.tsx:200:13",variant:"outline",size:"sm",className:"border-[var(--dg-border)] h-8 cursor-pointer",onClick:()=>v.current?.click(),disabled:E,children:[E?e.jsx(Le,{"code-path":"src/components/server/ServerFileBrowser.tsx:202:28",className:"h-3.5 w-3.5 mr-1 animate-spin"}):e.jsx(Xe,{"code-path":"src/components/server/ServerFileBrowser.tsx:202:84",className:"h-3.5 w-3.5 mr-1"}),"上传"]}),e.jsx("input",{"code-path":"src/components/server/ServerFileBrowser.tsx:205:13",ref:v,type:"file",className:"hidden",onChange:O})]}),e.jsxs(N,{"code-path":"src/components/server/ServerFileBrowser.tsx:207:11",variant:"outline",size:"sm",className:"border-[var(--dg-border)] h-8",onClick:j,children:[e.jsx(ds,{"code-path":"src/components/server/ServerFileBrowser.tsx:209:13",className:"h-3.5 w-3.5 mr-1"}),"新建目录"]}),n&&e.jsxs($,{"code-path":"src/components/server/ServerFileBrowser.tsx:212:13",variant:"outline",className:"border-red-500/30 text-red-400 ml-auto",children:[e.jsx(ue,{"code-path":"src/components/server/ServerFileBrowser.tsx:213:15",className:"h-3 w-3 mr-1 cursor-pointer",onClick:()=>y("")}),n]})]}),e.jsx("div",{"code-path":"src/components/server/ServerFileBrowser.tsx:220:9",className:"flex items-center gap-0.5 px-4 py-2 text-xs border-b border-[var(--dg-border)] bg-[var(--dg-bg-tertiary)] overflow-x-auto shrink-0",children:h.map((p,b)=>e.jsxs("span",{"code-path":"src/components/server/ServerFileBrowser.tsx:222:13",className:"flex items-center gap-0.5",children:[b===0?e.jsx("button",{"code-path":"src/components/server/ServerFileBrowser.tsx:224:17",onClick:()=>C("/"),className:"text-[var(--dg-text-secondary)] hover:text-[var(--dg-text-primary)] p-0.5",children:e.jsx(Rr,{"code-path":"src/components/server/ServerFileBrowser.tsx:228:19",className:"h-3.5 w-3.5"})}):e.jsx("button",{"code-path":"src/components/server/ServerFileBrowser.tsx:231:17",onClick:()=>C(p.path),className:"text-[var(--dg-blue)] hover:underline truncate max-w-[150px]",children:p.name}),b