(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.VuePrettyHotspot={},n.Vue))})(this,function(n,t){"use strict";const g=(o,a)=>{const s=o.__vccOpts||o;for(const[r,f]of a)s[r]=f;return s},_={props:{image:String,spots:Array},setup(o){const a=t.ref(JSON.parse(JSON.stringify(o.spots)));let s=document.querySelector(":root");return s.style.setProperty("--vue-pretty-hotspot-floating-left","-7.3rem"),{mouseEnterSpotMethod:(d,e)=>{const p=parseFloat(getComputedStyle(document.documentElement).fontSize),i=p*16.4,c=p*14.6,l=e.target.getBoundingClientRect();if(l.left+i0)e.target.classList.add("isLeft"),e.target.classList.remove("isRight"),e.target.classList.remove("isMid");else if(e.target.classList.add("isMid"),e.target.classList.remove("isLeft"),e.target.classList.remove("isRight"),l.left+c/2>window.innerWidth){let m=-1*(l.left+c-window.innerWidth+10);s.style.setProperty("--vue-pretty-hotspot-floating-left",m+"px")}else if(l.left-c/2<0){let y=c/2-l.left,m=c/2-y-10;s.style.setProperty("--vue-pretty-hotspot-floating-left",-m+"px")}else s.style.setProperty("--vue-pretty-hotspot-floating-left","-7.3rem");d.visible=!0},mouseLeaveSpotMethod:d=>{d.visible=!1},spotsRef:a}}},k=o=>(t.pushScopeId("data-v-f59fbf0a"),o=o(),t.popScopeId(),o),S={class:"prettyHotspot"},E=["src"],B=["onMouseenter","onMouseleave"],u=k(()=>t.createElementVNode("div",{class:"sonarBtn"},null,-1)),L={key:0,class:"infoContainer"},N={class:"info"},V=["href"],M=["src"],P={key:1},b=["href"],C={key:2},w={key:3};function H(o,a,s,r,f,d){return t.openBlock(),t.createElementBlock("div",S,[t.createElementVNode("figure",null,[t.createElementVNode("img",{src:s.image,alt:""},null,8,E)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.spotsRef,(e,p)=>(t.openBlock(),t.createElementBlock("div",{key:p,class:"spot",style:t.normalizeStyle(`left: ${e.left}%; top: ${e.top}%`),onMouseenter:i=>r.mouseEnterSpotMethod(e,i),onMouseleave:i=>r.mouseLeaveSpotMethod(e)},[u,t.createVNode(t.Transition,{name:"slide-fade"},{default:t.withCtx(()=>[e.visible?(t.openBlock(),t.createElementBlock("div",L,[t.createElementVNode("div",N,[e.image?(t.openBlock(),t.createElementBlock("a",{key:0,href:e.link},[t.createElementVNode("figure",null,[t.createElementVNode("img",{src:e.image,alt:""},null,8,M)])],8,V)):t.createCommentVNode("",!0),e.title?(t.openBlock(),t.createElementBlock("strong",P,[t.createElementVNode("a",{href:e.link},t.toDisplayString(e.title),9,b)])):t.createCommentVNode("",!0),e.price?(t.openBlock(),t.createElementBlock("span",C,t.toDisplayString(e.price),1)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("p",w,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),_:2},1024)],44,B))),128))])}const h=g(_,[["render",H],["__scopeId","data-v-f59fbf0a"]]),R={install:o=>{o.component("PrettyHotspot",h)}};n.PrettyHotspot=h,n.PrettyHotspotGlobal=R,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});