import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{$n as n,C as r,Cr as i,Gn as a,Nn as o,Qn as s,Rr as c,Tr as l,Ut as u,Wt as d,Xn as f,Zn as p,_ as m,ai as h,ar as g,er as _,g as v,h as y,ir as ee,si as te,sr as b,ui as x,v as ne,w as S}from"./vendor-primevue-D50rA9nL.js";import{n as re,r as ie}from"./vendor-vue-BAQ5VIVR.js";import{dn as ae,fn as C,on as w,sn as T,un as oe}from"./api-z_dXWY_S.js";import{M as E,N as se,P as ce,f as D,i as O,j as k,n as le,r as ue,s as A,t as de,y as j}from"./PanelTemplate-BUPnglF3.js";var M,N,P,F=t((()=>{o(),j(),M={class:`grid grid-cols-2 gap-2`},N={class:`font-medium`},P=b({__name:`DeviceInfo`,props:{device:{}},setup(e){let t=e,n=[{field:`name`,header:`Name`},{field:`type`,header:`Type`},{field:`vram_total`,header:`VRAM Total`},{field:`vram_free`,header:`VRAM Free`},{field:`torch_vram_total`,header:`Torch VRAM Total`},{field:`torch_vram_free`,header:`Torch VRAM Free`}],formatValue=(e,t)=>[`vram_total`,`vram_free`,`torch_vram_total`,`torch_vram_free`].includes(t)?D(e):e;return(e,r)=>(i(),_(`div`,M,[(i(),_(a,null,l(n,e=>(i(),_(a,{key:e.field},[p(`div`,N,x(e.header),1),p(`div`,null,x(formatValue(t.device[e.field],e.field)),1)],64))),64))]))}})})),I,fe=t((()=>{F(),F(),I=P})),L,R,z,B,V,H,U,W=t((()=>{o(),u(),r(),m(),fe(),w(),j(),L={class:`system-stats`},R={class:`mb-6`},z={class:`mb-4 text-2xl font-semibold`},B={class:`grid grid-cols-2 gap-2`},V={class:`font-medium`},H={class:`mb-4 text-2xl font-semibold`},U=b({__name:`SystemStatsPanel`,props:{stats:{}},setup(e){let t=e,r=f(()=>({...t.stats.system,argv:t.stats.system.argv.join(` `)})),o=f(()=>t.stats.devices.length>0),u=[{field:`os`,header:`OS`},{field:`python_version`,header:`Python Version`},{field:`embedded_python`,header:`Embedded Python`},{field:`pytorch_version`,header:`Pytorch Version`},{field:`argv`,header:`Arguments`},{field:`ram_total`,header:`RAM Total`,formatNumber:D},{field:`ram_free`,header:`RAM Free`,formatNumber:D}],m=[{field:`cloud_version`,header:`Cloud Version`},{field:`comfyui_version`,header:`ComfyUI Version`,format:A},{field:`comfyui_frontend_version`,header:`Frontend Version`,format:A},{field:`workflow_templates_version`,header:`Templates Version`}],v=f(()=>T?m:u),getDisplayValue=e=>{let t=r.value[e.field];return e.formatNumber&&typeof t==`number`?e.formatNumber(t):e.format&&typeof t==`string`?e.format(t):t};return(e,r)=>(i(),_(`div`,L,[p(`div`,R,[p(`h2`,z,x(e.$t(`g.systemInfo`)),1),p(`div`,B,[(i(!0),_(a,null,l(v.value,e=>(i(),_(a,{key:e.field},[p(`div`,V,x(e.header),1),p(`div`,null,x(getDisplayValue(e)),1)],64))),128))])]),o.value?(i(),_(a,{key:0},[g(h(d)),p(`div`,null,[p(`h2`,H,x(e.$t(`g.devices`)),1),t.stats.devices.length>1?(i(),s(h(ne),{key:0},{default:c(()=>[(i(!0),_(a,null,l(t.stats.devices,e=>(i(),s(h(S),{key:e.index,header:e.name,value:e.index},{default:c(()=>[g(I,{device:e},null,8,[`device`])]),_:2},1032,[`header`,`value`]))),128))]),_:1})):(i(),s(I,{key:1,device:t.stats.devices[0]},null,8,[`device`]))])],64)):n(``,!0)]))}})})),G,K=t((()=>{W(),W(),G=U})),q,pe=t((()=>{ie(),o(),se(),w(),ae(),j(),ue(),k(),q=re(`aboutPanel`,()=>{let e=O(),t=E(),{staticUrls:n}=ce(),r=f(()=>t?.systemStats?.system?.comfyui_version??``),i=f(()=>[{label:`ComfyUI ${C()?`v`+oe().getComfyUIVersion():A(r.value)}`,url:T?n.comfyOrg:n.github,icon:T?`pi pi-cloud`:`pi pi-github`},{label:`ComfyUI_frontend v1.38.13`,url:n.githubFrontend,icon:`pi pi-github`},{label:`Discord`,url:n.discord,icon:`pi pi-discord`},{label:`ComfyOrg`,url:n.comfyOrg,icon:`pi pi-globe`}]);return{badges:f(()=>[...i.value,...e.extensions.flatMap(e=>e.aboutPageBadges??[])])}})})),J,Y,X,Z,Q=t((()=>{o(),u(),y(),K(),pe(),k(),le(),J={class:`mb-2 text-2xl font-bold`},Y={class:`space-y-2`},X=[`href`,`title`],Z=b({__name:`AboutPanel`,setup(e){let t=E(),r=q();return(e,o)=>(i(),s(de,{value:`About`,class:`about-container`},{default:c(()=>[p(`h2`,J,x(e.$t(`g.about`)),1),p(`div`,Y,[(i(!0),_(a,null,l(h(r).badges,e=>(i(),_(`a`,{key:e.url,href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`about-badge inline-flex items-center no-underline`,title:e.url},[g(h(v),{class:`mr-2`},{icon:c(()=>[p(`i`,{class:te([e.icon,`mr-2 text-xl`])},null,2)]),default:c(()=>[ee(` `+x(e.label),1)]),_:2},1024)],8,X))),128))]),g(h(d)),h(t).systemStats?(i(),s(G,{key:0,stats:h(t).systemStats},null,8,[`stats`])):n(``,!0)]),_:1}))}})})),$;t((()=>{Q(),Q(),$=Z}))();export{$ as default};
//# sourceMappingURL=AboutPanel-BSBfoRw4.js.map