!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var n,e=!1;try{var t=document.createElement("div");t.addEventListener("focus",function(e){e.preventDefault(),e.stopPropagation()},!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){if(navigator&&void 0!==navigator.userAgent&&navigator.userAgent&&navigator.userAgent.match(/Edge\/1[7-8]/))return e=!1;e=!0}}))}catch(e){}void 0!==HTMLElement.prototype.nativeFocus||e||(HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus,n=function(e){for(var t=0;t<e.length;t++)e[t][0].scrollTop=e[t][1],e[t][0].scrollLeft=e[t][2]},HTMLElement.prototype.focus=function(e){var t,o;e&&e.preventScroll?(t=function(e){for(var t=e.parentNode,o=[],n=document.scrollingElement||document.documentElement;t&&t!==n;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&o.push([t,t.scrollTop,t.scrollLeft]),t=t.parentNode;return o.push([t=n,t.scrollTop,t.scrollLeft]),o}(this),"function"==typeof setTimeout?(o=this,setTimeout(function(){o.nativeFocus(),n(t)},0)):(this.nativeFocus(),n(t))):this.nativeFocus()})}}();