1import{b2 as C,cD as j,cG as D,cI as h,aJ as N,$ as R,ef as M,aN as v,F as O,cV as P,dx as a,aI as E,ct as W,aC as o}from"./BTBDsnWa.js";import{d as A}from"./BYOQs3re.js";import{u as H}from"./DGTSS5DA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var c=new e.Error().stack;c&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[c]="ca5496c2-73eb-4b2c-9b74-9f6f994a07b1",e._sentryDebugIdIdentifier="sentry-dbid-ca5496c2-73eb-4b2c-9b74-9f6f994a07b1")}catch{}})();const U=["id"],V=["srcset","media"],F=["src","srcset","loading","alt","fetchpriority"],G=["innerHTML"],J=C({__name:"Picture",props:{image:{},alt:{default:""},loading:{default:"lazy"},fetchpriority:{default:"auto"},sizes:{}},setup(e){const{buildUrl:c,buildSVGUrl:w,cdnParams:b}=A(),{vssWidth:I}=H();function $(i,n){const t=c(i,e.image,n),s={width:n.width*2,height:n.height*2},r=c(i,e.image,s);return`${t} 1x, ${r} 2x`}const u=o(()=>e.image?.image?.path?.endsWith(".svg")||!1),f=Object.keys(e.sizes).map(Number);if(f.length===0)throw new Error("At least one breakpoint must be defined in sizes");const l=Math.min(...f),z=e.sizes[l];if(!z)throw new Error(`Configuration for breakpoint ${l} not found`);const[m,g]=z,d=o(()=>e.image?.image?.path||""),k=o(()=>!e.image||!d?"":u.value?w(d.value):c(d.value,e.image,b(m,g))),S=o(()=>!e.image||!d||u.value?"":$(d.value,b(m,g))),B=o(()=>{{const n=f.sort((r,T)=>T-r).find(r=>r<I.value)||l,[t,s]=e.sizes[n]||[m,g];return`${t} / ${s}`}}),x=o(()=>{if(u.value)return;const i=[e.image?.image?._id];for(const[n,[t,s]]of Object.entries(e.sizes))i.push(`${n}-${t}x${s}`);return i.filter(n=>n!=null).join("_")}),L=o(()=>{let i="";const n=f.sort((t,s)=>t-s);for(const t of n){if(t===l||!e.sizes[t])continue;const[s,r]=e.sizes[t];i+=` 2 @media (min-width: ${t}px) { 3 --picture-aspect-ratio: ${s} / ${r}; 4 } 5 `}return` 6 <style> 7 #picture-${x.value} { 8 --picture-aspect-ratio: ${m} / ${g}; 9 ${i} 10 } 11 12 </style> 13 `}),p=Object.entries(e.sizes).filter(([i])=>Number(i)!==l).reverse(),y=()=>{B.value};return j(()=>{window.addEventListener("resize",y)}),D(()=>{window.removeEventListener("resize",y)}),(i,n)=>(h(),N(R,{name:"fade",mode:"out-in"},{default:M(()=>[(h(),v("picture",{id:a(u)?void 0:`picture-${a(x)}`,key:a(k),class:W(["picture",{"picture--svg":a(u)}])},[(h(!0),v(O,null,P(a(p),([t,[s,r]])=>(h(),v("source",{key:t,srcset:$(a(d),a(b)(s,r)),media:`(min-width: ${t}px)`},null,8,V))),128)),E("img",{src:a(k),srcset:a(S),loading:e.loading,alt:e.alt,fetchpriority:e.fetchpriority,onLoad:y},null,40,F),E("div",{innerHTML:a(L)},null,8,G)],10,U))]),_:1}))}}),K=Object.assign(J,{__name:"ImagePicture"});export{K as _};
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.