var cachedRtlScrollType=null;function getRtlScrollType(){if(cachedRtlScrollType){return cachedRtlScrollType}if(typeof document==="undefined"){cachedRtlScrollType="default";return cachedRtlScrollType}var t=document.createElement("div");t.style.width="100px";t.style.height="100px";t.style.position="absolute";t.style.top="-1000px";t.style.overflow="scroll";t.style.direction="rtl";var e=document.createElement("div");e.style.width="200px";e.style.height="100px";t.appendChild(e);document.body.appendChild(t);if(t.scrollLeft>0){cachedRtlScrollType="reverse"}else{t.scrollLeft=1;cachedRtlScrollType=t.scrollLeft===0?"negative":"default"}document.body.removeChild(t);return cachedRtlScrollType}function isRtlDirection(t){return getComputedStyle(t).direction==="rtl"}function getRtlScrollOffsetFromStart(t,e,r){switch(r){case"negative":return Math.max(0,-t);case"reverse":return Math.max(0,t);case"default":default:return Math.max(0,e-t)}}function getScrollOffsetFromStart(t){var e=t.scrollLeft,r=t.scrollWidth,l=t.clientWidth;var c=Math.max(0,r-l);if(c<=0){return 0}var o=isRtlDirection(t);if(!o){return e}return getRtlScrollOffsetFromStart(e,c,getRtlScrollType())}function isScrolledFromInlineStart(t){return getScrollOffsetFromStart(t)>0}export{isScrolledFromInlineStart as a,getScrollOffsetFromStart as g,isRtlDirection as i};
//# sourceMappingURL=scroll-DtgUQhjl.js.map