import{az as p}from"./index-DRe7Uehz.js";const d=e=>{var t;return e.server===l||e.type==="virtual-machine"?!0:(t=e.variant)==null?void 0:t.includes("desktop")},v=e=>{if(d(e))return!1;const t=["disk1.img","disk-kvm.img","uefi1.img"];return Object.entries(e.versions??{}).find(r=>Object.entries(r[1].items).find(s=>t.includes(s[1].ftype)))===void 0},l="local-iso",_=e=>({aliases:e.name,arch:"",os:"Custom ISO",pool:e.pool,release:"-",server:l,type:"virtual-machine",variant:"iso",created_at:new Date(e.created_at).getTime(),volume:e}),u="local-image",h=e=>{var t,r,s,a,i,n,o,c;return{aliases:((t=e.update_source)==null?void 0:t.alias)??((s=(r=e.aliases)==null?void 0:r[0])==null?void 0:s.name)??"",fingerprint:e.fingerprint,arch:e.architecture==="x86_64"?"amd64":e.architecture,os:p(((a=e.properties)==null?void 0:a.os)??""),created_at:new Date(e.uploaded_at).getTime(),release:((i=e.properties)==null?void 0:i.release)??"",release_title:((n=e.properties)==null?void 0:n.version)??"",type:e.type,cached:e.cached,profiles:e.profiles??["default"],server:e.cached?(o=e.update_source)==null?void 0:o.server:u,variant:(c=e.properties)==null?void 0:c.variant}};export{l as L,d as a,u as b,_ as c,v as i,h as l};
