/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import{h as e}from"./p-Bf4Ol6Qt.js";import{c as i}from"./p-BK16Cn81.js";const t="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIgogICAgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWV5ZSI+CiAgICA8cGF0aCBkPSJNMi4wNjIgMTIuMzQ4YTEgMSAwIDAgMSAwLS42OTYgMTAuNzUgMTAuNzUgMCAwIDEgMTkuODc2IDAgMSAxIDAgMCAxIDAgLjY5NiAxMC43NSAxMC43NSAwIDAgMS0xOS44NzYgMCIgLz4KICAgIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+Cjwvc3ZnPg==",s=({expandedImage:t,style:s={},imageStyle:o={},closeImageViewer:n})=>e("div",null,e("div",{onClick:n,class:i("image-viewer-overlay",{active:t}),style:Object.assign({backdropFilter:t?"blur(3px)":"blur(0px)"},s)},e("button",{class:"image-viewer-close-btn"},e("div",{class:"image-viewer-close-line first"}),e("div",{class:"image-viewer-close-line second"}))),e("img",{style:o,alt:"",class:"image-viewer-expanded-image"}));let o;function n(e,i){if(this.expandedImage===i)return;this.originalImage=e;const t=this.el.shadowRoot.querySelector(".image-viewer-expanded-image");t.src=e.src,document.removeEventListener("keydown",o),o=()=>l.bind(this)(),document.addEventListener("keydown",o);const s=e.getBoundingClientRect();document.body.style.overflow="hidden",Object.assign(t.style,{top:`${s.top}px`,pointerEvents:"auto",left:`${s.left}px`,transitionDuration:"0s",width:`${s.width}px`,height:`${s.height}px`}),setTimeout((()=>{const s=window.innerWidth-160,o=window.innerHeight-32,n=e.naturalWidth/e.naturalHeight;let l,a;s/n<=o?(l=s,a=s/n):(a=o,l=o*n),t.style.transitionDuration="0.3s",Object.assign(t.style,{opacity:"1",width:`${l}px`,height:`${a}px`,top:(window.innerHeight-a)/2+"px",left:(window.innerWidth-l)/2+"px"}),this.expandedImage=i}),200)}function l(e){if(null==e||e.preventDefault(),e&&"Escape"!==e.key)return;document.removeEventListener("keydown",o);const i=this.el.shadowRoot.querySelector(".image-viewer-expanded-image"),t=this.originalImage.getBoundingClientRect();Object.assign(i.style,{top:`${t.top}px`,pointerEvents:"none",left:`${t.left}px`,width:`${t.width}px`,height:`${t.height}px`,transitionDuration:"0.3s"}),setTimeout((()=>{i.src="",i.style.opacity="0",i.style.transitionDuration="0s"}),300),document.body.style.overflow="",this.expandedImage=null}const a=i=>e("svg",{class:i.class,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{"stroke-width":"0"}),e("g",{"stroke-linecap":"round","stroke-linejoin":"round"}),e("g",null,e("circle",{cx:"12",cy:"12",r:"8","fill-opacity":"0.24"}),e("path",{d:"M8.5 11L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L19.5 6","stroke-width":"1.2"}))),c=i=>e("svg",{class:i.class,viewBox:"-5 -5 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7H7V6h10v1zm0 12H7v-6h10v6zm2-12V3H5v4H1v8.996C1 17.103 1.897 18 3.004 18H5v3h14v-3h1.996A2.004 2.004 0 0 0 23 15.996V7h-4z",fill:"rgb(252, 248, 227)"}));export{a as A,s as I,c as P,l as c,t as e,n as o}