function e(e){let t=e.scrollX,n=`scrollLeft`;if(typeof t!=`number`){let r=e.document;t=r.documentElement[n],typeof t!=`number`&&(t=r.body[n])}return t}function t(e){let t,n,r=e.ownerDocument,{body:i}=r,a=r&&r.documentElement,o=e.getBoundingClientRect();return t=o.left,n=o.top,t-=a.clientLeft||i.clientLeft||0,n-=a.clientTop||i.clientTop||0,{left:t,top:n}}function n(n){let r=t(n),i=n.ownerDocument,a=i.defaultView||i.parentWindow;return r.left+=e(a),r.left}export{n as getOffsetLeft};