"use strict";function f(o,r,n){let d=1,l=1;const e=typeof o=="string"?document.querySelector(o):o;if(!e)throw new Error("containerElement is not found");const s=typeof r=="string"?e.querySelector(r):r;if(!s)throw new Error("imageElement is not found");const t=typeof n=="string"?e.querySelector(n):n;if(!t)throw new Error("imageOriginalEl is not found");const i=()=>{t&&(t.style.width=t.naturalWidth+"px",t.style.height=t.naturalHeight+"px",d=t.naturalWidth/e.clientWidth-1,l=t.naturalHeight/e.clientHeight-1)};return(()=>{t.addEventListener("load",i),e.addEventListener("mouseenter",()=>{s.style.opacity="0"}),e.addEventListener("mouseleave",()=>{s.style.opacity="1"}),e.addEventListener("mousemove",a=>{t.style.top=-a.offsetY*l+"px",t.style.left=-a.offsetX*d+"px"})})(),i(),i}module.exports=f;