import{o as e}from"./rolldown-runtime-C_s2cVnS.js";import{h as t,m as n,n as r}from"./vendor-react-nmZsNlRz.js";import{t as i}from"./utils-BRwGVQJx.js";import{E as a}from"./index-DjNTYlku.js";var o=r(),s=e(t(),1),c=e(n(),1);function l(){let e=(0,o.c)(7),[t,n]=(0,s.useState)(!1),r,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=e=>n(e.metaKey||e.ctrlKey),t=()=>n(!1);return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,e),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,e),window.removeEventListener(`blur`,t)}},a=[],e[0]=r,e[1]=a):(r=e[0],a=e[1]),(0,s.useEffect)(r,a);let l=t?`pointer-events-none`:`pointer-events-auto`,u;e[2]===l?u=e[3]:(u=i(`group/gate absolute inset-0`,l),e[2]=l,e[3]=u);let d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,c.jsx)(`span`,{className:`pointer-events-none absolute bottom-2 left-2 rounded-md bg-black/55 px-1.5 py-0.5 text-[0.625rem] font-medium text-white opacity-0 transition-opacity group-hover/embed:opacity-100`,children:`Hold ⌘ to zoom`}),e[4]=d):d=e[4];let f;return e[5]===u?f=e[6]:(f=(0,c.jsx)(`div`,{className:u,children:d}),e[5]=u,e[6]=f),f}var u=`autoplay; encrypted-media; picture-in-picture; clipboard-write; fullscreen`;function d(e){let t=(0,o.c)(18),{descriptor:n}=e,r=a(),i=n.provider===`googlemaps`||n.provider===`openstreetmap`,s=r?`dark`:`light`,d;t[0]!==s||t[1]!==n.aspectRatio||t[2]!==n.height?(d=n.aspectRatio?{aspectRatio:n.aspectRatio,colorScheme:s}:{colorScheme:s,height:n.height},t[0]=s,t[1]=n.aspectRatio,t[2]=n.height,t[3]=d):d=t[3];let f=d;if(i){let e;t[4]===s?e=t[5]:(e={colorScheme:s},t[4]=s,t[5]=e);let r=`${n.label} embed`,i;t[6]!==n.embedUrl||t[7]!==e||t[8]!==r?(i=(0,c.jsx)(`iframe`,{allow:u,className:`absolute inset-0 size-full border-0 bg-transparent`,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`,src:n.embedUrl,style:e,title:r}),t[6]=n.embedUrl,t[7]=e,t[8]=r,t[9]=i):i=t[9];let a;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,c.jsx)(l,{}),t[10]=a):a=t[10];let o;return t[11]!==f||t[12]!==i?(o=(0,c.jsxs)(`div`,{className:`relative w-full overflow-hidden`,style:f,children:[i,a]}),t[11]=f,t[12]=i,t[13]=o):o=t[13],o}let p=`${n.label} embed`,m;return t[14]!==n.embedUrl||t[15]!==f||t[16]!==p?(m=(0,c.jsx)(`iframe`,{allow:u,allowFullScreen:!0,className:`block w-full border-0 bg-transparent`,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`,scrolling:`no`,src:n.embedUrl,style:f,title:p}),t[14]=n.embedUrl,t[15]=f,t[16]=p,t[17]=m):m=t[17],m}export{d as default};