mirror of
https://github.com/gusaul/grpcox.git
synced 2024-12-27 03:10:42 +00:00
3 lines
18 KiB
JavaScript
3 lines
18 KiB
JavaScript
|
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function t(t,o){Object.keys(o).forEach(function(i){var n='';-1!==['width','height','top','right','bottom','left'].indexOf(i)&&e(o[i])&&(n='px'),t.style[i]=o[i]+n})}function o(e){return e&&'[object Function]'==={}.toString.call(e)}function n(e,t){if(1!==e.nodeType)return[];var o=window.getComputedStyle(e,null);return t?o[t]:o}function r(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function p(e){if(!e||-1!==['HTML','BODY','#document'].indexOf(e.nodeName))return window.document.body;var t=n(e),o=t.overflow,i=t.overflowX,s=t.overflowY;return /(auto|scroll)/.test(o+s+i)?e:p(r(e))}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||e.firstElementChild.offsetParent===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e){var t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?t:window.document.documentElement}function f(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return window.document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(n,0);var p=r.commonAncestorContainer;if(e!==p&&t!==p||i.contains(n))return s(p)?p:a(p);var l=d(e);return l.host?f(l.host,t):f(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=window.document.documentElement,r=window.document.scrollingElement||n;return r[o]}return e[o]}function m(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=l(t,'top'),n=l(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function h(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return+e['border'+o+'Width'].split('px')[0]+ +e['border'+i+'Width'].split('px')[0]}function c(e,t,o,i){return _(t['offset'+e],o['client'+e],o['offset'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function g(){var e=window.document.body,t=window.document.documentElement,o=ie()&&window.getComputedStyle(t);return{height:c('Height',e,t,o),width:c('Width',e,t,o)}}function u(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};if(ie())try{t=e.getBoundingClientRect();var o=l(e,'top'),i=l(e,'left');t.top+=o,t.left+=i,t.bottom+=o,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},p='HTML'===e.nodeName?g():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,a=e.offsetWidth-s,f=e.offsetHeight-d;if(a||f){var m=n(e);a-=h(m,'x'),f-=h(m,'y'),r.width-=a,r.height-=f}return u(r)}function y(e,t){var o=ie(),i='HTML'===t.nodeName,r=b(e),s=b(t),d=p(e),a=u({top:r.top-s.top,left:r.left-s.left,width:r.width,height:r.height});if(i||'BODY'===t.nodeName){var f=n(t),l=o&&i?0:+f.borderTopWidth.split('px')[0],h=o&&i?0:+f.borderLeftWidth.split('px')[0],c=o&&i?0:+f.marginTop.split('px')[0],g=o&&i?0:+f.marginLeft.split('px')[0];a.top-=l-c,a.bottom-=l-c,a.left-=h-g,a.right-=h-g,a.marginTop=c,a.marginLeft=g}return(o?t.contains(d):t===d&&'BODY'!==d.nodeName)&&(a=m(a,t)),a}function w(e){var t=window.document.documentElement,o=y(e,t),i=_(t.clientWidth,window.innerWidth||0),n=_(t.clientHeight,window.innerHeight||0),r=l(t),p=l(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return u(s)}function v(e){var t=e.nodeName;return'BODY'===t||'HTML'===t?!1:'fixed'===n(e,'position')||v(r(e))}function E(e,t,o,i){var n={top:0,left:0},s=f(e,t);if('viewport'===i)n=w(s);else{var d;'scrollParent'===i?(d=p(r(e)),'BODY'===d.nodeName&&(d=window.document.documentElement)):'window'===i?d=window.document.documentElement:d=i;var a=y(d,s);if('HTML'===d.nodeName&&!v(s)){var l=g(),m=l.height,h=l.width;n.top+
|
||
|
|
||
|
//# sourceMappingURL=popper.min.js.map
|