import{h as t}from"./p-8a04cc92.js";import{a as r}from"./p-836e88d4.js";const e=e=>{var{image:a,params:c}=e,n=function(t,r){var e={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(e[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(a=Object.getOwnPropertySymbols(t);c<a.length;c++)r.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(t,a[c])&&(e[a[c]]=t[a[c]])}return e}(e,["image","params"]);n.loading||(n.loading="lazy"),c?c.q||(c.q="65"):c={q:"65"};const{width:i,height:o}=n;if(!a.url)return;const s=c?Object.entries(c).reduce((t,r)=>{const e=new RegExp(`\\?.*${r[0]}=`);return a.url.match(e)?t:`${t}${t.match(/^\?$/)?"":"&"}${r.join("=")}`},a.url.match(/\?/)?"":"?"):"",f=new URL(a.url+s),m={width:i||f.searchParams.get("w"),height:o||f.searchParams.get("h")};return t("img",Object.assign({},r(n),{src:""+f},{srcset:a["2x"]?`${f} 1x, ${a["2x"].url}${s} 2x`:void 0},m,{alt:a.alt}))};export{e as P}