import{a as i,f as l,A as G,i as _,e as c,h as z,g as H,s as J,t as d,l as K,n as r,d as m,F as o,k as F,m as M,x as N}from"./index-BPc98LNf.js";var O=l('<button type="button" class="zoom-button svelte-hreotd"><img class="svelte-hreotd"/></button>'),P=l('<img class="svelte-hreotd"/>'),Q=l('<div class="caption svelte-hreotd"> </div>'),R=l('<div class="lightbox svelte-hreotd" role="button" tabindex="0"><img class="svelte-hreotd"/></div>'),S=l("<div><!> <!></div> <!>",1);function U(W,a){let h=i(a,"src",3,""),n=i(a,"alt",3,""),b=i(a,"caption",3,void 0),g=i(a,"width",3,void 0),u=i(a,"maxWidth",3,void 0),x=i(a,"height",3,void 0),w=i(a,"objectFit",3,"contain"),k=i(a,"zoomable",3,!1),A=i(a,"border",3,!1),v=J(!1);var y=S(),f=G(y),j=c(f);{var E=e=>{var t=O();t.__click=()=>m(v,!0);var s=c(t);d(()=>{o(s,"src",h()),o(s,"alt",n()),F(s,`width: ${g()||"auto"}; max-width: ${u()||"100%"}; height: ${x()||"auto"}; object-fit: ${w()};`)}),r(e,t)},I=e=>{var t=P();d(()=>{o(t,"src",h()),o(t,"alt",n()),F(t,`width: ${g()||"auto"}; max-width: ${u()||"100%"}; height: ${x()||"auto"}; object-fit: ${w()};`)}),r(e,t)};_(j,e=>{k()?e(E):e(I,!1)})}var L=z(j,2);{var q=e=>{var t=Q(),s=c(t);d(()=>M(s,b())),r(e,t)};_(L,e=>{b()&&e(q)})}var B=z(f,2);{var C=e=>{var t=R();t.__click=()=>m(v,!1),t.__keydown=D=>D.key==="Escape"&&m(v,!1);var s=c(t);d(()=>{o(s,"src",h()),o(s,"alt",n())}),r(e,t)};_(B,e=>{k()&&H(v)&&e(C)})}d(()=>K(f,1,`image-wrapper ${A()?"bordered":""}`,"svelte-hreotd")),r(W,y)}N(["click","keydown"]);export{U as default};
