/* interact.js 1.10.27 | https://raw.github.com/taye/interact.js/main/LICENSE */ import browser from"./browser.prod.js";import domObjects from"./domObjects.prod.js";import is from"./is.prod.js";import{window as win,realWindow,getWindow}from"./window.prod.js";import"./isWindow.prod.js";function nodeContains(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function closest(e,t){for(;is.element(e);){if(matchesSelector(e,t))return e;e=parentNode(e)}return null}function parentNode(e){let t=e.parentNode;if(is.docFrag(t)){for(;(t=t.host)&&is.docFrag(t););return t}return t}function matchesSelector(e,t){return win!==realWindow&&(t=t.replace(/\/deep\//g," ")),e[browser.prefixedMatchesSelector](t)}const getParent=e=>e.parentNode||e.host;function indexOfDeepestElement(e){let t,n=[];for(let o=0;o=(parseInt(getWindow(t).getComputedStyle(t).zIndex,10)||0)}function matchesUpTo(e,t,n){for(;is.element(e);){if(matchesSelector(e,t))return!0;if((e=parentNode(e))===n)return matchesSelector(e,t)}return!1}function getActualElement(e){return e.correspondingUseElement||e}function getScrollXY(e){return{x:(e=e||win).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}function getElementClientRect(e){const t=e instanceof domObjects.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function getElementRect(e){const t=getElementClientRect(e);if(!browser.isIOS7&&t){const n=getScrollXY(getWindow(e));t.left+=n.x,t.right+=n.x,t.top+=n.y,t.bottom+=n.y}return t}function getPath(e){const t=[];for(;e;)t.push(e),e=parentNode(e);return t}function trySelector(e){return!!is.string(e)&&(domObjects.document.querySelector(e),!0)}export{closest,getActualElement,getElementClientRect,getElementRect,getPath,getScrollXY,indexOfDeepestElement,matchesSelector,matchesUpTo,nodeContains,parentNode,trySelector}; //# sourceMappingURL=domUtils.prod.js.map