'use strict';

// This helper function is similar to Element.closest(),
// however it also traverses shadow DOM boundaries.
const closest = (selector, el) => {
    return (el &&
        (('closest' in el && el.closest(selector)) ||
            closest(selector, el.getRootNode().host)));
};

exports.closest = closest;

//# sourceMappingURL=closest-b45138d3.js.map