1import{d as v,o as n,k as s,Y as u,e as c,F as R,v as y,r as z,g as r}from"./D2XzVb-v.js";const F={"3:4":"aspect-3/4","4:3":"aspect-4/3","16:9":"aspect-video","9:16":"aspect-9/16","1:1":"aspect-square",auto:"aspect-auto"},j=["media","srcset"],x=["alt","title","loading","src","fetchpriority"],B=v({__name:"Image",props:{image:{},lazy:{type:Boolean,default:!0},aspectRatio:{default:()=>{}},roundedBorderSize:{default:""},objectFit:{default:"cover"},breakpoints:{},enforcedFullSize:{type:Boolean,default:!1},altText:{default:""},fetchpriority:{default:"auto"},detectAspectRatio:{type:Boolean,default:!1}},setup(e){const d=()=>{const t=e.image.original.width/e.image.original.height;return t>1.5?"16:9":t>1?"4:3":t===1?"1:1":t>.75?"3:4":t>.5?"9:16":"auto"},l=e.aspectRatio||(e.detectAspectRatio?d():"auto"),f={"3:4":[[320,400]],"4:3":[[600,450],[900,675]],"16:9":[[600,340],[870,490],[1920,1080]],"9:16":[],"1:1":[[600,580]]},m={contain:"object-contain",cover:"object-cover",fill:"object-fill","scale-down":"object-scale-down",none:"object-none"},h=r(()=>{if(e.enforcedFullSize||l==="auto")return"w-full h-full";const[t,a]=l.split(":").map(o=>+o);return t<=a?"max-w-full max-h-full w-full h-full":"max-w-full max-h-full w-full h-auto"}),g=r(()=>e.image.resolutions.filter(([t,a])=>e.enforcedFullSize?!1:l==="auto"?!0:f[l].some(([i,b])=>i===t&&b===a))),w=r(()=>[...g.value].sort(([t],[a])=>t-a).map(([t,,a],o,i)=>({media:o<i.length-1?`(max-width: ${t}px)`:void 0,srcset:a.url})));return(t,a)=>(n(),s("picture",{class:u(["overflow-hidden",{block:e.objectFit==="cover"},{"h-full w-full":e.enforcedFullSize&&c(l)==="auto"},("cssAspectRatio"in t?t.cssAspectRatio:c(F))[c(l)]])},[(n(!0),s(R,null,y(c(w),(o,i)=>(n(),s("source",{key:i,media:o.media,srcset:o.srcset},null,8,j))),128)),z("img",{alt:e.image.altText||e.altText,title:e.image.title,class:u([m[e.objectFit],e.roundedBorderSize,c(h),"border-none"]),loading:e.lazy?"lazy":void 0,src:e.image.original.url,fetchpriority:e.fetchpriority},null,10,x)],2))}});export{B as _,F as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.