0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-12 00:08:59 +01:00
Bootstrap/docs/assets/js/vendor/popper.min.js

3 lines
19 KiB
JavaScript
Raw Normal View History

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(Oe){return''!==Oe&&!isNaN(parseFloat(Oe))&&isFinite(Oe)}function r(Oe,Le){Object.keys(Le).forEach(function(Se){var Ce='';-1!==['width','height','top','right','bottom','left'].indexOf(Se)&&o(Le[Se])&&(Ce='px'),Oe.style[Se]=Le[Se]+Ce})}function s(Oe){for(var Le=[!1,'ms','webkit','moz','o'],Se=Oe.charAt(0).toUpperCase()+Oe.slice(1),Ce=0;Ce<Le.length-1;Ce++){var Te=Le[Ce],Ne=Te?''+Te+Se:Oe;if('undefined'!=typeof window.document.body.style[Ne])return Ne}return null}function p(Oe){var Le=Oe.nodeName;return'BODY'!==Le&&('HTML'===Le||Oe.firstElementChild.offsetParent===Oe)}function d(Oe){return null===Oe.parentNode?Oe:d(Oe.parentNode)}function f(Oe){var Le=Oe&&Oe.offsetParent,Se=Le&&Le.nodeName;return Se&&'BODY'!==Se&&'HTML'!==Se?Le:window.document.documentElement}function l(Oe,Le){if(!Oe||!Oe.nodeType||!Le||!Le.nodeType)return window.document.documentElement;var Se=Oe.compareDocumentPosition(Le)&Node.DOCUMENT_POSITION_FOLLOWING,Ce=Se?Oe:Le,Te=Se?Le:Oe,Ne=document.createRange();Ne.setStart(Ce,0),Ne.setEnd(Te,0);var We=Ne.commonAncestorContainer;if(Oe!==We&&Le!==We||Ce.contains(Te))return p(We)?We:f(We);var De=d(Oe);return De.host?l(De.host,Le):l(Oe,d(Le).host)}function m(Oe,Le){if(1!==Oe.nodeType)return[];var Se=window.getComputedStyle(Oe,null);return Le?Se[Le]:Se}function c(Oe){var Le=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',Se='top'===Le?'scrollTop':'scrollLeft',Ce=Oe.nodeName;if('BODY'===Ce||'HTML'===Ce){var Te=window.document.documentElement,Ne=window.document.scrollingElement||Te;return Ne[Se]}return Oe[Se]}function h(Oe,Le){var Se=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Ce=c(Le,'top'),Te=c(Le,'left'),Ne=Se?-1:1;return Oe.top+=Ce*Ne,Oe.bottom+=Ce*Ne,Oe.left+=Te*Ne,Oe.right+=Te*Ne,Oe}function u(Oe){return'HTML'===Oe.nodeName?Oe:Oe.parentNode||Oe.host}function g(Oe){if(!Oe||-1!==['HTML','BODY','#document'].indexOf(Oe.nodeName))return window.document.body;var Le=m(Oe),Se=Le.overflow,Ce=Le.overflowX,Te=Le.overflowY;return /(auto|scroll)/.test(Se+Te+Ce)?Oe:g(u(Oe))}function E(Oe,Le){var Se='x'===Le?'Left':'Top',Ce='Left'==Se?'Right':'Bottom';return+Oe['border'+Se+'Width'].split('px')[0]+ +Oe['border'+Ce+'Width'].split('px')[0]}function v(){var Oe=window.document.body,Le=window.document.documentElement;return{height:_Mathmax(Oe.scrollHeight,Oe.offsetHeight,Le.clientHeight,Le.scrollHeight,Le.offsetHeight),width:_Mathmax(Oe.scrollWidth,Oe.offsetWidth,Le.clientWidth,Le.scrollWidth,Le.offsetWidth)}}function w(Oe){return he({},Oe,{right:Oe.left+Oe.width,bottom:Oe.top+Oe.height})}function O(Oe){var Le={};if(ge())try{Le=Oe.getBoundingClientRect();var Se=c(Oe,'top'),Ce=c(Oe,'left');Le.top+=Se,Le.left+=Ce,Le.bottom+=Se,Le.right+=Ce}catch(Be){}else Le=Oe.getBoundingClientRect();var Te={left:Le.left,top:Le.top,width:Le.right-Le.left,height:Le.bottom-Le.top},Ne='HTML'===Oe.nodeName?v():{},We=Ne.width||Oe.clientWidth||Te.right-Te.left,De=Ne.height||Oe.clientHeight||Te.bottom-Te.top,He=Oe.offsetWidth-We,Pe=Oe.offsetHeight-De;if(He||Pe){var ke=m(Oe);He-=E(ke,'x'),Pe-=E(ke,'y'),Te.width-=He,Te.height-=Pe}return w(Te)}function L(Oe,Le){var Se=ge(),Ce='HTML'===Le.nodeName,Te=O(Oe),Ne=O(Le),We=g(Oe),De=w({top:Te.top-Ne.top,left:Te.left-Ne.left,width:Te.width,height:Te.height});if(Ce||'BODY'===Le.nodeName){var He=m(Le),Pe=Se&&Ce?0:+He.borderTopWidth.split('px')[0],ke=Se&&Ce?0:+He.borderLeftWidth.split('px')[0],Be=Se&&Ce?0:+He.marginTop.split('px')[0],Me=Se&&Ce?0:+He.marginLeft.split('px')[0];De.top-=Pe-Be,De.bottom-=Pe-Be,De.left-=ke-Me,De.right-=ke-Me,De.marginTop=Be,De.marginLeft=Me}return Le.contains(We)&&(Se||'BODY'!==We.nodeName)&&(De=h(De,Le)),De}function S(Oe,Le,Se){var Ce=l(Le,Se);return L(Se,Ce)}function C(Oe){var Le=window.getComputedStyle(Oe),Se=parseFloat(Le.marginTop)+parseFloat(Le.marginBottom),Ce=parseFloat(Le.marginLeft)+parseFl
2017-04-06 23:16:07 +02:00
//# sourceMappingURL=popper.min.js.map