(()=>{var t=function(t){return t.classList.contains("eb-tooltip-top")||t.classList.contains("eb-tooltip-bottom")?"translateX(-50%)":t.classList.contains("eb-tooltip-left")||t.classList.contains("eb-tooltip-right")?"translateY(-50%)":t.classList.contains("eb-tooltip-top-left")||t.classList.contains("eb-tooltip-top-right")||t.classList.contains("eb-tooltip-bottom-left")||t.classList.contains("eb-tooltip-bottom-right")?"translateX(0)":"translateX(-50%)"},i=function(i){if(!i._isVisible||i._isHiding){i._hideTimeout&&(clearTimeout(i._hideTimeout),i._hideTimeout=null);var o=i.querySelector(".eb-tooltip-inner");i._isVisible=!0,i._isHiding=!1,o.style.opacity="1",o.style.visibility="visible",i.style.opacity="1",i.style.visibility="visible",i.style.transform=t(i),e(i)}},o=function(i){if(i._isVisible&&!i._isHiding){i._isHiding=!0;var o=i.querySelector(".eb-tooltip-inner");o.style.opacity="0",o.style.visibility="hidden",i.style.opacity="0",i.style.transform=t(i),i._hideTimeout=setTimeout(function(){i.style.visibility="hidden",i._isVisible=!1,i._isHiding=!1,i._hideTimeout=null},300)}},e=function(t){var i=t.getBoundingClientRect(),o=window.innerWidth,e=window.innerHeight;i.left<0?(t.classList.remove("eb-tooltip-left"),t.classList.add("eb-tooltip-right")):i.right>o&&(t.classList.remove("eb-tooltip-right"),t.classList.add("eb-tooltip-left")),i.top<0?(t.classList.remove("eb-tooltip-top"),t.classList.add("eb-tooltip-bottom")):i.bottom>e&&(t.classList.remove("eb-tooltip-bottom"),t.classList.add("eb-tooltip-top"))};document.addEventListener("DOMContentLoaded",function(){var t;function n(){document.querySelectorAll('.eb-hotspot-tooltip[style*="opacity: 1"]').forEach(function(t){e(t)})}document.querySelectorAll(".eb-image-hotspots-wrapper").forEach(function(t){!function(t){t.querySelectorAll(".eb-hotspot-marker").forEach(function(e){var n=e.querySelector(".eb-hotspot-tooltip"),s=e.getAttribute("data-tooltip-trigger")||"hover",l=e.getAttribute("data-tooltip-animation")||"none";if(n)if(n._isVisible=!1,n._isAnimating=!1,n._isHiding=!1,n._hideTimeout=null,"hover"===s){var a;e.addEventListener("mouseenter",function(){clearTimeout(a),"none"!==l&&n._showTooltipWithAnimation?n._showTooltipWithAnimation(n):i(n)}),e.addEventListener("mouseleave",function(){"none"!==l&&n._hideTooltipWithAnimation?n._hideTooltipWithAnimation(n):o(n)}),n.addEventListener("mouseenter",function(){clearTimeout(a),"none"!==l&&n._showTooltipWithAnimation?n._showTooltipWithAnimation(n):"1"!==n.style.opacity&&i(n)}),n.addEventListener("mouseleave",function(){"none"!==l&&n._hideTooltipWithAnimation?n._hideTooltipWithAnimation(n):o(n)})}else"click"===s&&e.addEventListener("click",function(s){s.preventDefault(),s.stopPropagation(),t.querySelectorAll(".eb-hotspot-tooltip").forEach(function(t){t!==n&&("none"!==l&&t._hideTooltipWithAnimation?t._hideTooltipWithAnimation(t):o(t),t.closest(".eb-hotspot-marker").classList.remove("active"))}),e.classList.contains("active")?("none"!==l&&n._hideTooltipWithAnimation?n._hideTooltipWithAnimation(n):o(n),e.classList.remove("active")):("none"!==l&&n._showTooltipWithAnimation?n._showTooltipWithAnimation(n):i(n),e.classList.add("active"))})}),document.addEventListener("click",function(i){if(t.contains(i.target)){var e=i.target.closest(".eb-hotspot-marker"),n=i.target.closest(".eb-hotspot-tooltip");e||n||t.querySelectorAll(".eb-hotspot-marker.active").forEach(function(t){var i=t.querySelector(".eb-hotspot-tooltip");i&&("none"!==animtion&&i._hideTooltipWithAnimation?i._hideTooltipWithAnimation(i):o(i),t.classList.remove("active"))})}else t.querySelectorAll(".eb-hotspot-marker.active").forEach(function(t){var i=t.querySelector(".eb-hotspot-tooltip");i&&("none"!==animtion&&i._hideTooltipWithAnimation?i._hideTooltipWithAnimation(i):o(i),t.classList.remove("active"))})})}(t)}),window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(n,100)})})})();