UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

6 lines 1.02 kB
/*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.5.0-next.4 */ function n(n){return r(n)}function t(n){return f(n,"offsetTop")}function e(n){return f(n,"offsetLeft")}function o(n){return n.assignedSlot?n.assignedSlot:n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}function r(n){for(let t=n;t;t=o(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=o(n);t;t=o(t)){if(!(t instanceof Element))continue;const n=getComputedStyle(t);if("contents"!==n.display){if("static"!==n.position||"none"!==n.filter)return t;if("BODY"===t.tagName)return t}}return null}function f(n,t){let e=n[t],o=r(n);const f=function(n){const t=new Set;let e=n.getRootNode();for(;e;)t.add(e),e=e.parentNode?e.parentNode.getRootNode():null;return t}(n);for(;o&&!f.has(o.getRootNode());)e-=o[t],o=r(o);return e}export{e as offsetLeft,n as offsetParent,t as offsetTop}