2017-05-17 14:09:14 +02:00
|
|
|
var _Mathfloor=Math.floor,_Mathmin=Math.min,_Mathround=Math.round,_Mathmax=Math.max;(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 o(Ne){return''!==Ne&&!isNaN(parseFloat(Ne))&&isFinite(Ne)}function r(Ne,De){Object.keys(De).forEach(function(Pe){var Be='';-1!==['width','height','top','right','bottom','left'].indexOf(Pe)&&o(De[Pe])&&(Be='px'),Ne.style[Pe]=De[Pe]+Be})}function s(Ne){return Ne&&'[object Function]'==={}.toString.call(Ne)}function p(Ne,De){if(1!==Ne.nodeType)return[];var Pe=window.getComputedStyle(Ne,null);return De?Pe[De]:Pe}function d(Ne){return'HTML'===Ne.nodeName?Ne:Ne.parentNode||Ne.host}function f(Ne){if(!Ne||-1!==['HTML','BODY','#document'].indexOf(Ne.nodeName))return window.document.body;var De=p(Ne),Pe=De.overflow,Be=De.overflowX,We=De.overflowY;return /(auto|scroll)/.test(Pe+We+Be)?Ne:f(d(Ne))}function l(Ne){var De=Ne.nodeName;return'BODY'!==De&&('HTML'===De||Ne.firstElementChild.offsetParent===Ne)}function m(Ne){return null===Ne.parentNode?Ne:m(Ne.parentNode)}function c(Ne){var De=Ne&&Ne.offsetParent,Pe=De&&De.nodeName;return Pe&&'BODY'!==Pe&&'HTML'!==Pe?De:window.document.documentElement}function h(Ne,De){if(!Ne||!Ne.nodeType||!De||!De.nodeType)return window.document.documentElement;var Pe=Ne.compareDocumentPosition(De)&Node.DOCUMENT_POSITION_FOLLOWING,Be=Pe?Ne:De,We=Pe?De:Ne,ke=document.createRange();ke.setStart(Be,0),ke.setEnd(We,0);var He=ke.commonAncestorContainer;if(Ne!==He&&De!==He||Be.contains(We))return l(He)?He:c(He);var Me=m(Ne);return Me.host?h(Me.host,De):h(Ne,m(De).host)}function u(Ne){var De=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',Pe='top'===De?'scrollTop':'scrollLeft',Be=Ne.nodeName;if('BODY'===Be||'HTML'===Be){var We=window.document.documentElement,ke=window.document.scrollingElement||We;return ke[Pe]}return Ne[Pe]}function g(Ne,De){var Pe=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Be=u(De,'top'),We=u(De,'left'),ke=Pe?-1:1;return Ne.top+=Be*ke,Ne.bottom+=Be*ke,Ne.left+=We*ke,Ne.right+=We*ke,Ne}function w(Ne,De){var Pe='x'===De?'Left':'Top',Be='Left'==Pe?'Right':'Bottom';return+Ne['border'+Pe+'Width'].split('px')[0]+ +Ne['border'+Be+'Width'].split('px')[0]}function E(Ne,De,Pe,Be){return _Mathmax(De['offset'+Ne],Pe['client'+Ne],Pe['offset'+Ne],be()?Pe['offset'+Ne]+Be['margin'+('Height'===Ne?'Top':'Left')]+Be['margin'+('Height'===Ne?'Bottom':'Right')]:0)}function v(){var Ne=window.document.body,De=window.document.documentElement,Pe=be()&&window.getComputedStyle(De);return{height:E('Height',Ne,De,Pe),width:E('Width',Ne,De,Pe)}}function O(Ne){return ve({},Ne,{right:Ne.left+Ne.width,bottom:Ne.top+Ne.height})}function L(Ne){var De={};if(be())try{De=Ne.getBoundingClientRect();var Pe=u(Ne,'top'),Be=u(Ne,'left');De.top+=Pe,De.left+=Be,De.bottom+=Pe,De.right+=Be}catch(Re){}else De=Ne.getBoundingClientRect();var We={left:De.left,top:De.top,width:De.right-De.left,height:De.bottom-De.top},ke='HTML'===Ne.nodeName?v():{},He=ke.width||Ne.clientWidth||We.right-We.left,Me=ke.height||Ne.clientHeight||We.bottom-We.top,Ie=Ne.offsetWidth-He,Ae=Ne.offsetHeight-Me;if(Ie||Ae){var Ue=p(Ne);Ie-=w(Ue,'x'),Ae-=w(Ue,'y'),We.width-=Ie,We.height-=Ae}return O(We)}function S(Ne,De){var Pe=be(),Be='HTML'===De.nodeName,We=L(Ne),ke=L(De),He=f(Ne),Me=O({top:We.top-ke.top,left:We.left-ke.left,width:We.width,height:We.height});if(Be||'BODY'===De.nodeName){var Ie=p(De),Ae=Pe&&Be?0:+Ie.borderTopWidth.split('px')[0],Ue=Pe&&Be?0:+Ie.borderLeftWidth.split('px')[0],Re=Pe&&Be?0:+Ie.marginTop.split('px')[0],Ye=Pe&&Be?0:+Ie.marginLeft.split('px')[0];Me.top-=Ae-Re,Me.bottom-=Ae-Re,Me.left-=Ue-Ye,Me.right-=Ue-Ye,Me.marginTop=Re,Me.marginLeft=Ye}return De.contains(He)&&(Pe||'BODY'!==He.nodeName)&&(Me=g(Me,De)),Me}function C(Ne){var De=window.document.documentElement,Pe=S(Ne,De),Be=_Mathmax(De.clientWidth,window.innerWidth||0),We=_Mathmax(De.clientHeight,window.innerHeight||0),ke=u(De),He=u(De,'left'),Me={top:ke-Pe.top+Pe.marginTop,left:He-Pe.left+Pe.marginLeft,wi
|