/* Copyright (C) Federico Zivolo 2019 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?b(exports):'function'==typeof define&&define.amd?define(['exports'],b):b(a.PopperUtils={})})(this,function(a){'use strict';function b(a,b){if(1!==a.nodeType)return[];var c=a.ownerDocument.defaultView,d=c.getComputedStyle(a,null);return b?d[b]:d}function c(a){return'HTML'===a.nodeName?a:a.parentNode||a.host}function d(a){if(!a)return document.body;switch(a.nodeName){case'HTML':case'BODY':return a.ownerDocument.body;case'#document':return a.body;}var e=b(a),f=e.overflow,g=e.overflowX,h=e.overflowY;return /(auto|scroll|overlay)/.test(f+h+g)?a:d(c(a))}function e(a){return 11===a?T:10===a?U:T||U}function f(a){if(!a)return document.documentElement;for(var c=e(10)?document.body:null,d=a.offsetParent||null;d===c&&a.nextElementSibling;)d=(a=a.nextElementSibling).offsetParent;var g=d&&d.nodeName;return g&&'BODY'!==g&&'HTML'!==g?-1!==['TH','TD','TABLE'].indexOf(d.nodeName)&&'static'===b(d,'position')?f(d):d:a?a.ownerDocument.documentElement:document.documentElement}function g(a){var b=a.nodeName;return'BODY'!==b&&('HTML'===b||f(a.firstElementChild)===a)}function h(a){return null===a.parentNode?a:h(a.parentNode)}function j(a,b){if(!a||!a.nodeType||!b||!b.nodeType)return document.documentElement;var c=a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING,d=c?a:b,e=c?b:a,i=document.createRange();i.setStart(d,0),i.setEnd(e,0);var k=i.commonAncestorContainer;if(a!==k&&b!==k||d.contains(e))return g(k)?k:f(k);var l=h(a);return l.host?j(l.host,b):j(a,h(b).host)}function k(a){var b=1=c.clientWidth&&d>=c.clientHeight}),k=0