import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{ct as t}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as n,A as r,Bt as i,D as a,E as o,Ft as s,L as c,Lt as l,O as u,ht as d,k as f,tt as p,x as m}from"./vendor-vue-core-D3IvUUeM.js";import{D as h}from"./vendor-other-CrvBxfcV.js";import{t as g}from"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import"./Button-mG8zDgxj.js";import"./dialogService-BC0EXJA5.js";import{t as _}from"./systemStatsStore-gvlzOl4W.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{o as v}from"./useConflictDetection-CvlLd6TS.js";import"./useExternalLink-BZoBzmNd.js";var y=h(),b={class:`flex flex-col gap-2`},x={class:`text-sm font-medium text-surface-600`},S={class:`ml-4 text-sm text-surface-500`},C=c({__name:`MissingCoreNodesMessage`,props:{missingCoreNodes:{}},setup(e){let c=_(),l=o(()=>Object.keys(e.missingCoreNodes).length>0),h=o(()=>l.value?c.systemStats?.system?.comfyui_version??null:null),g=o(()=>Object.entries(e.missingCoreNodes).sort(([e],[t])=>(0,y.compare)(t,e))),getUniqueNodeNames=e=>e.reduce((e,t)=>(t.type&&!e.includes(t.type)&&e.push(t.type),e),[]).sort();return(e,o)=>l.value?(n(),u(s(t),{key:0,severity:`info`,icon:`pi pi-info-circle`,class:`mx-2 my-2`,pt:{root:{class:`flex-col`},text:{class:`flex-1`}}},{default:d(()=>[a(`div`,b,[a(`div`,null,i(h.value?e.$t(`loadWorkflowWarning.outdatedVersion`,{version:h.value}):e.$t(`loadWorkflowWarning.outdatedVersionGeneric`)),1),(n(!0),r(m,null,p(g.value,([t,o])=>(n(),r(`div`,{key:t,class:`ml-4`},[a(`div`,x,i(e.$t(`loadWorkflowWarning.coreNodesFromVersion`,{version:t||`unknown`})),1),a(`div`,S,i(getUniqueNodeNames(o).join(`, `)),1)]))),128))])]),_:1})):f(``,!0)}}),w={class:`flex h-full w-full flex-col gap-4 p-4`},T={class:`m-0 text-sm leading-4 text-muted-foreground`},E={class:`comfy-missing-nodes flex flex-col max-h-[256px] rounded-lg py-2 scrollbar-custom bg-secondary-background`},D={class:`text-xs`},O={key:0,class:`text-xs`},k={class:`m-0 text-sm leading-4 text-muted-foreground`},A=c({__name:`MissingNodesContent`,props:{missingNodeTypes:{}},setup(e){let t=e,{missingCoreNodes:c}=v(),d=o(()=>{let e=new Set;return t.missingNodeTypes.filter(t=>{let n=typeof t==`object`?t.type:t;return e.has(n)?!1:(e.add(n),!0)}).map(e=>typeof e==`object`?{label:e.type,hint:e.hint,action:e.action}:{label:e})});return(e,t)=>(n(),r(`div`,{class:l([`flex w-[490px] flex-col border-t-1 border-border-default`,s(g)?`border-b-1`:``])},[a(`div`,w,[a(`div`,null,[a(`p`,T,i(s(g)?e.$t(`missingNodes.cloud.description`):e.$t(`missingNodes.oss.description`)),1)]),s(g)?f(``,!0):(n(),u(C,{key:0,"missing-core-nodes":s(c)},null,8,[`missing-core-nodes`])),a(`div`,E,[(n(!0),r(m,null,p(d.value,(e,t)=>(n(),r(`div`,{key:t,class:`flex min-h-8 items-center justify-between px-4 py-2 bg-secondary-background text-muted-foreground`},[a(`span`,D,i(e.label),1),e.hint?(n(),r(`span`,O,i(e.hint),1)):f(``,!0)]))),128))]),a(`div`,null,[a(`p`,k,i(s(g)?e.$t(`missingNodes.cloud.replacementInstruction`):e.$t(`missingNodes.oss.replacementInstruction`)),1)])])],2))}});export{A as default};
//# sourceMappingURL=MissingNodesContent-Cv8FMlYH.js.map