Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@popperjs/core

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@popperjs/core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

17

dist/cjs/popper-base.js
/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -165,2 +165,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -493,2 +494,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -495,0 +510,0 @@

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -165,2 +165,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -499,2 +500,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -794,2 +809,3 @@

function getDocumentElement(element) {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;

@@ -944,3 +960,4 @@ }

left: '0',
top: '0'
top: '0',
margin: '0'
};

@@ -947,0 +964,0 @@ Object.assign(state.elements.popper.style, initialStyles);

54

dist/cjs/popper.js
/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -165,2 +165,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -514,2 +515,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -809,2 +824,3 @@

function getDocumentElement(element) {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;

@@ -959,3 +975,4 @@ }

left: '0',
top: '0'
top: '0',
margin: '0'
};

@@ -1091,6 +1108,15 @@ Object.assign(state.elements.popper.style, initialStyles);

var borders = getBorders(element);
var win = getWindow(element);
var right = element.offsetWidth - element.clientWidth - borders.right;
var bottom = element.offsetHeight - element.clientHeight - borders.bottom;
if (getNodeName(element) === 'html') {
right = win.innerWidth - element.clientWidth;
bottom = win.innerHeight - element.clientHeight;
}
return {
top: borders.top,
right: element.offsetWidth - (element.clientWidth + borders.right),
bottom: element.offsetHeight - (element.clientHeight + borders.bottom),
right: right,
bottom: bottom,
left: borders.left

@@ -1133,11 +1159,2 @@ };

function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
function getClientRectFromMixedType(element, clippingParent) {

@@ -1172,3 +1189,3 @@ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));

var rect = getClientRectFromMixedType(element, clippingParent);
var decorations = isHTMLElement(clippingParent) ? getDecorations(clippingParent) : getFreshSideObject();
var decorations = getDecorations(isHTMLElement(clippingParent) ? clippingParent : getDocumentElement(element));
accRect.top = Math.max(rect.top + decorations.top, accRect.top);

@@ -1187,2 +1204,11 @@ accRect.right = Math.min(rect.right - decorations.right, accRect.right);

function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
function mergePaddingObject(paddingObject) {

@@ -1189,0 +1215,0 @@ return Object.assign({}, getFreshSideObject(), {}, paddingObject);

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -167,2 +167,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -495,2 +496,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -497,0 +512,0 @@

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -4,0 +4,0 @@

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -167,2 +167,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -501,2 +502,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -796,2 +811,3 @@

function getDocumentElement(element) {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;

@@ -946,3 +962,4 @@ }

left: '0',
top: '0'
top: '0',
margin: '0'
};

@@ -949,0 +966,0 @@ Object.assign(state.elements.popper.style, initialStyles);

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!=={}.toString.call(e)?(e=e.ownerDocument)?e.defaultView:window:e}function o(e){return e instanceof n(e).Element}function r(e){return e instanceof n(e).HTMLElement}function i(e){return e?(e.nodeName||"").toLowerCase():null}function a(e){return n(e).getComputedStyle(e)}function s(e,o,s){var f;void 0===s&&(s=!1),e=t(e);var c={scrollLeft:0,scrollTop:0},p=f=0;return s||("body"!==i(o)&&(o!==n(o)&&r(o)?c={scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:c={scrollLeft:(c=n(o)).pageXOffset,scrollTop:c.pageYOffset}),r(o)&&(p=t(o),f=r(o)?a(o):{},o=parseFloat(f.borderTopWidth)||0,parseFloat(f.borderRightWidth),parseFloat(f.borderBottomWidth),f=parseFloat(f.borderLeftWidth)||0,f=p.x+f,p=p.y+o)),{x:e.left+c.scrollLeft-f,y:e.top+c.scrollTop-p,width:e.width,height:e.height}}function f(e){return"html"===i(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function c(e,t){void 0===t&&(t=[]);var o=function e(t){if(["html","body","#document"].includes(i(t)))return t.ownerDocument.body;if(r(t)){var n=a(t);if(/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX))return t}return e(f(t))}(e);return o=(e="body"===i(o))?n(o):o,t=t.concat(o),e?t:t.concat(c(f(o)))}function p(e){var t;return!r(e)||!(t=e.offsetParent)||void 0!==window.InstallTrigger&&"fixed"===a(t).position?null:t}function u(e){var t=n(e);for(e=p(e);e&&["table","td","th"].includes(i(e));)e=p(e);return e&&"body"===i(e)&&"static"===a(e).position?t:e||t}function l(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=t.get(o))&&e(o)})),o.push(r)}(e)})),o}function d(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function h(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function m(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?y:e;return function(e,t,i){function a(){p.forEach((function(e){return e()})),p=[]}void 0===i&&(i=r);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},y,{},r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},p=[],m=!1,b={state:f,setOptions:function(i){return a(),f.options=Object.assign({},r,{},f.options,{},i),f.scrollParents={reference:o(e)?c(e):[],popper:c(t)},i=function(e){var t=l(e);return v.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}([].concat(f.options.modifiers.filter((function(e){return!n.find((function(t){return t.name===e.name}))})),n.map((function(e){return Object.assign({},e,{},f.options.modifiers.find((function(t){return t.name===e.name})))})))),f.orderedModifiers=i.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:f,name:t,instance:b,options:n}),p.push(t||function(){}))})),b.update()},forceUpdate:function(){if(!m){var e=f.elements,t=e.reference;if(h(t,e=e.popper))for(f.rects={reference:s(t,u(e),"fixed"===f.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<f.orderedModifiers.length;t++)if(!0===f.reset)f.reset=!1,t=-1;else{var n=f.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(f=e({state:f,options:o,name:n,instance:b})||f)}}},update:d((function(){return new Promise((function(e){b.forceUpdate(),e(f)}))})),destroy:function(){a(),m=!0}};return h(e,t)?(b.setOptions(i).then((function(e){!m&&i.onFirstUpdate&&i.onFirstUpdate(e)})),b):b}}function b(e){var t,o=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,s=e.position,f=e.gpuAcceleration,c=e.adaptive,p=window.devicePixelRatio||1;e=Math.round(a.x*p)/p||0,p=Math.round(a.y*p)/p||0;var l=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,h="left",m="top";if(c){var b=u(o);b===n(o)&&(b=o.ownerDocument.documentElement),"top"===i&&(p=p-b.clientHeight+r.height,m="bottom"),"left"===i&&(e=e-b.clientWidth+r.width,h="right")}return o=Object.assign({position:s},c&&w),f?Object.assign({},o,((d={})[m]=a?"0":"",d[h]=l?"0":"",d.transform=2>(window.devicePixelRatio||1)?"translate("+e+"px, "+p+"px)":"translate3d("+e+"px, "+p+"px, 0)",d)):Object.assign({},o,((t={})[m]=a?p+"px":"",t[h]=l?e+"px":"",t.transform="",t))}var v="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),y={placement:"bottom",modifiers:[],strategy:"absolute"},g={passive:!0},w={top:"auto",right:"auto",bottom:"auto",left:"auto"},O=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,g)})),a&&s.addEventListener("resize",o.update,g),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,g)})),a&&s.removeEventListener("resize",o.update,g)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;e=e.name;var n=t.modifiersData,o=t.rects.reference,r=t.rects.popper,i=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var a=o.x+o.width/2-r.width/2,s=o.y+o.height/2-r.height/2;switch(i){case"top":a={x:a,y:o.y-r.height};break;case"bottom":a={x:a,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:s};break;case"left":a={x:o.x-r.width,y:s};break;default:a={x:o.x,y:o.y}}if(null!=(i=i?["top","bottom"].includes(i)?"x":"y":null))switch(s="y"===i?"height":"width",t){case"start":a[i]=Math.floor(a[i])-Math.floor(o[s]/2-r[s]/2);break;case"end":a[i]=Math.floor(a[i])+Math.ceil(o[s]/2-r[s]/2)}n[e]=a},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},b(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},b(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},a=t.elements[e];r(a)&&i(a)&&(Object.assign(a.style,n),Object.entries(o).forEach((function(e){var t=e[0];!1===(e=e[1])?a.removeAttribute(t):a.setAttribute(t,!0===e?"":e)})))}))},effect:function(e){var t=e.state,n={position:"absolute",left:"0",top:"0"};return Object.assign(t.elements.popper.style,n),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],a=Object.keys(t.styles.hasOwnProperty(e)?Object.assign({},t.styles[e]):n);e=t.attributes[e]||{},a=a.reduce((function(e,t){var n;return Object.assign({},e,((n={})[String(t)]="",n))}),{}),r(o)&&i(o)&&(Object.assign(o.style,a),Object.keys(e).forEach((function(e){return o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],x=m({defaultModifiers:O});e.createPopper=x,e.defaultModifiers=O,e.popperGenerator=m,Object.defineProperty(e,"__esModule",{value:!0})}));
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!=={}.toString.call(e)?(e=e.ownerDocument)?e.defaultView:window:e}function o(e){return e instanceof n(e).Element}function r(e){return e instanceof n(e).HTMLElement}function i(e){return e?(e.nodeName||"").toLowerCase():null}function a(e){return n(e).getComputedStyle(e)}function s(e,o,s){var f;void 0===s&&(s=!1),e=t(e);var c={scrollLeft:0,scrollTop:0},p=f=0;return s||("body"!==i(o)&&(o!==n(o)&&r(o)?c={scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:c={scrollLeft:(c=n(o)).pageXOffset,scrollTop:c.pageYOffset}),r(o)&&(p=t(o),f=r(o)?a(o):{},o=parseFloat(f.borderTopWidth)||0,parseFloat(f.borderRightWidth),parseFloat(f.borderBottomWidth),f=parseFloat(f.borderLeftWidth)||0,f=p.x+f,p=p.y+o)),{x:e.left+c.scrollLeft-f,y:e.top+c.scrollTop-p,width:e.width,height:e.height}}function f(e){return"html"===i(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function c(e,t){void 0===t&&(t=[]);var o=function e(t){if(["html","body","#document"].includes(i(t)))return t.ownerDocument.body;if(r(t)){var n=a(t);if(/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX))return t}return e(f(t))}(e);return o=(e="body"===i(o))?n(o):o,t=t.concat(o),e?t:t.concat(c(f(o)))}function p(e){var t;return!r(e)||!(t=e.offsetParent)||void 0!==window.InstallTrigger&&"fixed"===a(t).position?null:t}function u(e){var t=n(e);for(e=p(e);e&&["table","td","th"].includes(i(e));)e=p(e);return e&&"body"===i(e)&&"static"===a(e).position?t:e||t}function l(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=t.get(o))&&e(o)})),o.push(r)}(e)})),o}function d(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function h(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function m(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?y:e;return function(e,t,i){function a(){p.forEach((function(e){return e()})),p=[]}void 0===i&&(i=r);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},y,{},r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},p=[],m=!1,b={state:f,setOptions:function(i){return a(),f.options=Object.assign({},r,{},f.options,{},i),f.scrollParents={reference:o(e)?c(e):[],popper:c(t)},i=function(e){var t=l(e);return v.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}([].concat(f.options.modifiers.filter((function(e){return!n.find((function(t){return t.name===e.name}))})),n.map((function(e){return Object.assign({},e,{},f.options.modifiers.find((function(t){return t.name===e.name})))})))),f.orderedModifiers=i.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:f,name:t,instance:b,options:n}),p.push(t||function(){}))})),b.update()},forceUpdate:function(){if(!m){var e=f.elements,t=e.reference;if(h(t,e=e.popper))for(f.rects={reference:s(t,u(e),"fixed"===f.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<f.orderedModifiers.length;t++)if(!0===f.reset)f.reset=!1,t=-1;else{var n=f.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(f=e({state:f,options:o,name:n,instance:b})||f)}}},update:d((function(){return new Promise((function(e){b.forceUpdate(),e(f)}))})),destroy:function(){a(),m=!0}};return h(e,t)?(b.setOptions(i).then((function(e){!m&&i.onFirstUpdate&&i.onFirstUpdate(e)})),b):b}}function b(e){var t,o=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,s=e.position,f=e.gpuAcceleration,c=e.adaptive,p=window.devicePixelRatio||1;e=Math.round(a.x*p)/p||0,p=Math.round(a.y*p)/p||0;var l=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,h="left",m="top";if(c){var b=u(o);b===n(o)&&(b=o.ownerDocument.documentElement),"top"===i&&(p=p-b.clientHeight+r.height,m="bottom"),"left"===i&&(e=e-b.clientWidth+r.width,h="right")}return o=Object.assign({position:s},c&&w),f?Object.assign({},o,((d={})[m]=a?"0":"",d[h]=l?"0":"",d.transform=2>(window.devicePixelRatio||1)?"translate("+e+"px, "+p+"px)":"translate3d("+e+"px, "+p+"px, 0)",d)):Object.assign({},o,((t={})[m]=a?p+"px":"",t[h]=l?e+"px":"",t.transform="",t))}var v="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),y={placement:"bottom",modifiers:[],strategy:"absolute"},g={passive:!0},w={top:"auto",right:"auto",bottom:"auto",left:"auto"},O=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,g)})),a&&s.addEventListener("resize",o.update,g),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,g)})),a&&s.removeEventListener("resize",o.update,g)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;e=e.name;var n=t.modifiersData,o=t.rects.reference,r=t.rects.popper,i=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var a=o.x+o.width/2-r.width/2,s=o.y+o.height/2-r.height/2;switch(i){case"top":a={x:a,y:o.y-r.height};break;case"bottom":a={x:a,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:s};break;case"left":a={x:o.x-r.width,y:s};break;default:a={x:o.x,y:o.y}}if(null!=(i=i?["top","bottom"].includes(i)?"x":"y":null))switch(s="y"===i?"height":"width",t){case"start":a[i]=Math.floor(a[i])-Math.floor(o[s]/2-r[s]/2);break;case"end":a[i]=Math.floor(a[i])+Math.ceil(o[s]/2-r[s]/2)}n[e]=a},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},b(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},b(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},a=t.elements[e];r(a)&&i(a)&&(Object.assign(a.style,n),Object.entries(o).forEach((function(e){var t=e[0];!1===(e=e[1])?a.removeAttribute(t):a.setAttribute(t,!0===e?"":e)})))}))},effect:function(e){var t=e.state,n={position:"absolute",left:"0",top:"0",margin:"0"};return Object.assign(t.elements.popper.style,n),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],a=Object.keys(t.styles.hasOwnProperty(e)?Object.assign({},t.styles[e]):n);e=t.attributes[e]||{},a=a.reduce((function(e,t){var n;return Object.assign({},e,((n={})[String(t)]="",n))}),{}),r(o)&&i(o)&&(Object.assign(o.style,a),Object.keys(e).forEach((function(e){return o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],x=m({defaultModifiers:O});e.createPopper=x,e.defaultModifiers=O,e.popperGenerator=m,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=popper-lite.min.js.map
/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/

@@ -167,2 +167,3 @@

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -516,2 +517,16 @@ }

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -811,2 +826,3 @@

function getDocumentElement(element) {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;

@@ -961,3 +977,4 @@ }

left: '0',
top: '0'
top: '0',
margin: '0'
};

@@ -1093,6 +1110,15 @@ Object.assign(state.elements.popper.style, initialStyles);

var borders = getBorders(element);
var win = getWindow(element);
var right = element.offsetWidth - element.clientWidth - borders.right;
var bottom = element.offsetHeight - element.clientHeight - borders.bottom;
if (getNodeName(element) === 'html') {
right = win.innerWidth - element.clientWidth;
bottom = win.innerHeight - element.clientHeight;
}
return {
top: borders.top,
right: element.offsetWidth - (element.clientWidth + borders.right),
bottom: element.offsetHeight - (element.clientHeight + borders.bottom),
right: right,
bottom: bottom,
left: borders.left

@@ -1135,11 +1161,2 @@ };

function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
function getClientRectFromMixedType(element, clippingParent) {

@@ -1174,3 +1191,3 @@ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));

var rect = getClientRectFromMixedType(element, clippingParent);
var decorations = isHTMLElement(clippingParent) ? getDecorations(clippingParent) : getFreshSideObject();
var decorations = getDecorations(isHTMLElement(clippingParent) ? clippingParent : getDocumentElement(element));
accRect.top = Math.max(rect.top + decorations.top, accRect.top);

@@ -1189,2 +1206,11 @@ accRect.right = Math.min(rect.right - decorations.right, accRect.right);

function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
function mergePaddingObject(paddingObject) {

@@ -1191,0 +1217,0 @@ return Object.assign({}, getFreshSideObject(), {}, paddingObject);

/**
* @popperjs/core v2.0.0 - MIT License
* @popperjs/core v2.0.1 - MIT License
*/
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(e){return"[object Window]"!=={}.toString.call(e)?(e=e.ownerDocument)?e.defaultView:window:e}function n(e){return{scrollLeft:(e=r(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof r(e).Element}function i(e){return e instanceof r(e).HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return r(e).getComputedStyle(e)}function f(e){return e=i(e)?s(e):{},{top:parseFloat(e.borderTopWidth)||0,right:parseFloat(e.borderRightWidth)||0,bottom:parseFloat(e.borderBottomWidth)||0,left:parseFloat(e.borderLeftWidth)||0}}function p(e,o,s){void 0===s&&(s=!1),e=t(e);var p={scrollLeft:0,scrollTop:0},c=0,u=0;return s||("body"!==a(o)&&(p=o!==r(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:n(o)),i(o)&&(s=t(o),o=f(o),c=s.x+o.left,u=s.y+o.top)),{x:e.left+p.scrollLeft-c,y:e.top+p.scrollTop-u,width:e.width,height:e.height}}function c(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function u(e){return"html"===a(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function d(e,t){void 0===t&&(t=[]);var n=function e(t){if(["html","body","#document"].includes(a(t)))return t.ownerDocument.body;if(i(t)){var r=s(t);if(/auto|scroll|overlay|hidden/.test(r.overflow+r.overflowY+r.overflowX))return t}return e(u(t))}(e);return n=(e="body"===a(n))?r(n):n,t=t.concat(n),e?t:t.concat(d(u(n)))}function l(e){var t;return!i(e)||!(t=e.offsetParent)||void 0!==window.InstallTrigger&&"fixed"===s(t).position?null:t}function m(e){var t=r(e);for(e=l(e);e&&["table","td","th"].includes(a(e));)e=l(e);return e&&"body"===a(e)&&"static"===s(e).position?t:e||t}function h(e){var t=new Map,r=new Set,n=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||function e(o){r.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(n){r.has(n)||(n=t.get(n))&&e(n)})),n.push(o)}(e)})),n}function v(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}function b(e){return e.split("-")[0]}function g(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function y(e){void 0===e&&(e={});var t=e.defaultModifiers,r=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?C:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},C,{},n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],u=!1,l={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,{},s.options,{},i),s.scrollParents={reference:o(e)?d(e):[],popper:d(t)},i=function(e){var t=h(e);return H.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}([].concat(s.options.modifiers.filter((function(e){return!r.find((function(t){return t.name===e.name}))})),r.map((function(e){return Object.assign({},e,{},s.options.modifiers.find((function(t){return t.name===e.name})))})))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options;r=void 0===r?{}:r,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:l,options:r}),f.push(t||function(){}))})),l.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference;if(g(t,e=e.popper))for(s.rects={reference:p(t,m(e),"fixed"===s.options.strategy),popper:c(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var r=s.orderedModifiers[t];e=r.fn;var n=r.options;n=void 0===n?{}:n,r=r.name,"function"==typeof e&&(s=e({state:s,options:n,name:r,instance:l})||s)}}},update:v((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){a(),u=!0}};return g(e,t)?(l.setOptions(i).then((function(e){!u&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l):l}}function w(e){return["top","bottom"].includes(e)?"x":"y"}function x(e){var t=e.reference,r=e.element,n=(e=e.placement)?b(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-r.width/2,i=t.y+t.height/2-r.height/2;switch(n){case"top":o={x:o,y:t.y-r.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-r.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(n=n?w(n):null))switch(i="y"===n?"height":"width",e){case"start":o[n]=Math.floor(o[n])-Math.floor(t[i]/2-r[i]/2);break;case"end":o[n]=Math.floor(o[n])+Math.ceil(t[i]/2-r[i]/2)}return o}function O(e){var t,n=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,s=e.position,f=e.gpuAcceleration,p=e.adaptive,c=window.devicePixelRatio||1;e=Math.round(a.x*c)/c||0,c=Math.round(a.y*c)/c||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,l="left",h="top";if(p){var v=m(n);v===r(n)&&(v=n.ownerDocument.documentElement),"top"===i&&(c=c-v.clientHeight+o.height,h="bottom"),"left"===i&&(e=e-v.clientWidth+o.width,l="right")}return n=Object.assign({position:s},p&&I),f?Object.assign({},n,((d={})[h]=a?"0":"",d[l]=u?"0":"",d.transform=2>(window.devicePixelRatio||1)?"translate("+e+"px, "+c+"px)":"translate3d("+e+"px, "+c+"px, 0)",d)):Object.assign({},n,((t={})[h]=a?c+"px":"",t[l]=u?e+"px":"",t.transform="",t))}function M(e){return e.replace(/left|right|bottom|top/g,(function(e){return N[e]}))}function D(e){return e.replace(/start|end/g,(function(e){return _[e]}))}function j(e,t){var r=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(r)do{if(t&&t.isSameNode(e))return!0;t=t.parentNode||t.host}while(t);return!1}function E(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function P(e,o){if("viewport"===o)e=E({width:(e=r(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(o))e=t(o);else{var a=e.ownerDocument.documentElement;e=r(a),o=n(a),(a=p(a.ownerDocument.documentElement,e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-o.scrollLeft,a.y=-o.scrollTop,e=E(a)}return e}function k(e,t,r){return t="clippingParents"===t?function(e){var t=d(e),r=["absolute","fixed"].includes(s(e).position)&&i(e)?m(e):e;return o(r)?t.filter((function(e){return o(e)&&j(e,r)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,r){var n=P(e,r);if(i(r)){var o=f(r);r={top:o.top,right:r.offsetWidth-(r.clientWidth+o.right),bottom:r.offsetHeight-(r.clientHeight+o.bottom),left:o.left}}else r={top:0,right:0,bottom:0,left:0};return t.top=Math.max(n.top+r.top,t.top),t.right=Math.min(n.right-r.right,t.right),t.bottom=Math.min(n.bottom-r.bottom,t.bottom),t.left=Math.max(n.left+r.left,t.left),t}),P(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function L(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},e)}function W(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function B(e,r){void 0===r&&(r={});var n=r;r=void 0===(r=n.placement)?e.placement:r;var i=n.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var f=n.altBoundary,p=void 0!==f&&f;n=L("number"!=typeof(n=void 0===(n=n.padding)?0:n)?n:W(n,S));var c=e.elements.reference;f=e.rects.popper,a=k(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:e.elements.popper.ownerDocument.documentElement,a,s),p=x({reference:s=t(c),element:f,strategy:"absolute",placement:r}),f=E(Object.assign({},f,{},p)),s="popper"===i?f:s;var u={top:a.top-s.top+n.top,bottom:s.bottom-a.bottom+n.bottom,left:a.left-s.left+n.left,right:s.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[r];Object.keys(u).forEach((function(e){var t=["right","bottom"].includes(e)?1:-1,r=["top","bottom"].includes(e)?"y":"x";u[e]+=d[r]*t}))}return u}function R(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var S=["top","bottom","right","left"],T=S.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),A=[].concat(S,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),H="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),C={placement:"bottom",modifiers:[],strategy:"absolute"},F={passive:!0},I={top:"auto",right:"auto",bottom:"auto",left:"auto"},N={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"},U=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=r(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,F)})),a&&s.addEventListener("resize",n.update,F),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,F)})),a&&s.removeEventListener("resize",n.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=x({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options;e=void 0===(e=r.gpuAcceleration)||e,r=void 0===(r=r.adaptive)||r,e={placement:b(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},O(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},O(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,r),Object.entries(n).forEach((function(e){var t=e[0];!1===(e=e[1])?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(e){var t=e.state,r={position:"absolute",left:"0",top:"0"};return Object.assign(t.elements.popper.style,r),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=Object.keys(t.styles.hasOwnProperty(e)?Object.assign({},t.styles[e]):r);e=t.attributes[e]||{},o=o.reduce((function(e,t){var r;return Object.assign({},e,((r={})[String(t)]="",r))}),{}),i(n)&&a(n)&&(Object.assign(n.style,o),Object.keys(e).forEach((function(e){return n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.name,n=void 0===(e=e.options.offset)?[0,0]:e,o=(e=A.reduce((function(e,r){var o=t.rects,i=b(r),a=["left","top"].includes(i)?-1:1,s="function"==typeof n?n(Object.assign({},o,{placement:r})):n;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=["left","right"].includes(i)?{x:s,y:o}:{x:o,y:s},e[r]=i,e}),{}))[t.placement],i=o.y;t.modifiersData.popperOffsets.x+=o.x,t.modifiersData.popperOffsets.y+=i,t.modifiersData[r]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;if(e=e.name,!t.modifiersData[e]._skip){var n=r.fallbackPlacements,o=r.padding,i=r.boundary,a=r.rootBoundary,s=void 0===(r=r.flipVariations)||r,f=b(r=t.options.placement);n=n||(f===r?[M(r)]:function(e){if("auto"===b(e))return[];var t=M(e);return[D(e),t,D(t)]}(r));var p=function(e,t){var r=new Set;return e.filter((function(e){if(e=t(e),!r.has(e))return r.add(e),!0}))}([r].concat(n).reduce((function(e,r){return"auto"===b(r)?e.concat(function(e,t){void 0===t&&(t={});var r=t.boundary,n=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.placement.split("-")[1],s=(a?i?T:T.filter((function(e){return e.includes(a)})):S).reduce((function(t,i){return t[i]=B(e,{placement:i,boundary:r,rootBoundary:n,padding:o})[b(i)],t}),{});return Object.keys(s).sort((function(e,t){return s[e]-s[t]}))}(t,{placement:r,boundary:i,rootBoundary:a,padding:o,flipVariations:s})):e.concat(r)}),[]),(function(e){return e}));n=t.rects.reference,r=t.rects.popper;var c=new Map;f=!0;for(var u=p[0],d=0;d<p.length;d++){var l=p[d],m=b(l),h="start"===l.split("-")[1],v=["top","bottom"].includes(m),g=v?"width":"height",y=B(t,{placement:l,boundary:i,rootBoundary:a,padding:o});if(h=v?h?"right":"left":h?"bottom":"top",n[g]>r[g]&&(h=M(h)),g=M(h),(m=[0>=y[m],0>=y[h],0>=y[g]]).every((function(e){return e}))){u=l,f=!1;break}c.set(l,m)}if(f)for(n=function(e){var t=p.find((function(t){if(t=c.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return u=t,"break"},r=s?3:1;0<r&&"break"!==n(r);r--);t.placement!==u&&(t.modifiersData[e]._skip=!0,t.placement=u,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;e=e.name;var n=r.mainAxis,o=void 0===n||n;n=void 0!==(n=r.altAxis)&&n;var i=r.tether;i=void 0===i||i;var a=r.tetherOffset,s=void 0===a?0:a;r=B(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding}),a=b(t.placement);var f=t.placement.split("-")[1],p=!f,u=w(a);a="x"===u?"y":"x";var d=t.modifiersData.popperOffsets,l=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},o){var v="y"===u?"top":"left",g="y"===u?"bottom":"right",y="y"===u?"height":"width";o=d[u];var x=d[u]+r[v],O=d[u]-r[g],M=i?-m[y]/2:0,D="start"===f?l[y]:m[y];f="start"===f?-m[y]:-l[y],m=t.elements.arrow,m=i&&m?c(m):{width:0,height:0};var j=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=j[v],g=j[g],m=Math.max(0,Math.min(Math.abs(l[y]-m[y]),m[y])),j=t.modifiersData.offset?t.modifiersData.offset[t.placement][u]:0,D=t.modifiersData.popperOffsets[u]+(p?l[y]/2-M-m-v-h:D-m-v-h)-j,p=t.modifiersData.popperOffsets[u]+(p?-l[y]/2+M+m+g+h:f+m+g+h)-j,i=Math.max(i?Math.min(x,D):x,Math.min(o,i?Math.max(O,p):O)),t.modifiersData.popperOffsets[u]=i,s[u]=i-o}n&&(n=d[a],i=Math.max(n+r["x"===u?"top":"left"],Math.min(n,n-r["x"===u?"bottom":"right"])),t.modifiersData.popperOffsets[a]=i,s[a]=i-n),t.modifiersData[e]=s},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state;e=e.name;var n=r.elements.arrow,o=r.modifiersData.popperOffsets,i=b(r.placement),a=w(i);if(i=["left","right"].includes(i)?"height":"width",n){var s=r.modifiersData[e+"#persistent"].padding;n=c(n),o=Math.max(s["y"===a?"top":"left"],Math.min(r.rects.popper[i]/2-n[i]/2+((r.rects.reference[i]+r.rects.reference[a]-o[a]-r.rects.popper[i])/2-(o[a]-r.rects.reference[a])/2),r.rects.popper[i]-n[i]-s["y"===a?"bottom":"right"])),r.modifiersData[e]=((t={})[a]=o,t)}},effect:function(e){var t=e.state,r=e.options;e=e.name;var n=r.element;n=void 0===n?"[data-popper-arrow]":n,r=void 0===(r=r.padding)?0:r,("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&j(t.elements.popper,n)&&(t.elements.arrow=n,t.modifiersData[e+"#persistent"]={padding:L("number"!=typeof r?r:W(r,S))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var r=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,i=B(t,{elementContext:"reference"}),a=B(t,{altBoundary:!0});r=R(i,r),n=R(a,n,o),o=q(r),a=q(n),t.modifiersData[e]={referenceClippingOffsets:r,popperEscapeOffsets:n,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],V=y({defaultModifiers:U});e.createPopper=V,e.defaultModifiers=U,e.popperGenerator=y,Object.defineProperty(e,"__esModule",{value:!0})}));
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(e){return"[object Window]"!=={}.toString.call(e)?(e=e.ownerDocument)?e.defaultView:window:e}function n(e){return{scrollLeft:(e=r(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof r(e).Element}function i(e){return e instanceof r(e).HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return r(e).getComputedStyle(e)}function f(e){return e=i(e)?s(e):{},{top:parseFloat(e.borderTopWidth)||0,right:parseFloat(e.borderRightWidth)||0,bottom:parseFloat(e.borderBottomWidth)||0,left:parseFloat(e.borderLeftWidth)||0}}function p(e,o,s){void 0===s&&(s=!1),e=t(e);var p={scrollLeft:0,scrollTop:0},c=0,u=0;return s||("body"!==a(o)&&(p=o!==r(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:n(o)),i(o)&&(s=t(o),o=f(o),c=s.x+o.left,u=s.y+o.top)),{x:e.left+p.scrollLeft-c,y:e.top+p.scrollTop-u,width:e.width,height:e.height}}function c(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function u(e){return"html"===a(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function d(e,t){void 0===t&&(t=[]);var n=function e(t){if(["html","body","#document"].includes(a(t)))return t.ownerDocument.body;if(i(t)){var r=s(t);if(/auto|scroll|overlay|hidden/.test(r.overflow+r.overflowY+r.overflowX))return t}return e(u(t))}(e);return n=(e="body"===a(n))?r(n):n,t=t.concat(n),e?t:t.concat(d(u(n)))}function l(e){var t;return!i(e)||!(t=e.offsetParent)||void 0!==window.InstallTrigger&&"fixed"===s(t).position?null:t}function m(e){var t=r(e);for(e=l(e);e&&["table","td","th"].includes(a(e));)e=l(e);return e&&"body"===a(e)&&"static"===s(e).position?t:e||t}function h(e){var t=new Map,r=new Set,n=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||function e(o){r.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(n){r.has(n)||(n=t.get(n))&&e(n)})),n.push(o)}(e)})),n}function v(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}function g(e){return e.split("-")[0]}function b(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function y(e){void 0===e&&(e={});var t=e.defaultModifiers,r=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?C:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},C,{},n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],u=!1,l={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,{},s.options,{},i),s.scrollParents={reference:o(e)?d(e):[],popper:d(t)},i=function(e){var t=h(e);return A.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}([].concat(s.options.modifiers.filter((function(e){return!r.find((function(t){return t.name===e.name}))})),r.map((function(e){return Object.assign({},e,{},s.options.modifiers.find((function(t){return t.name===e.name})))})))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options;r=void 0===r?{}:r,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:l,options:r}),f.push(t||function(){}))})),l.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference;if(b(t,e=e.popper))for(s.rects={reference:p(t,m(e),"fixed"===s.options.strategy),popper:c(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var r=s.orderedModifiers[t];e=r.fn;var n=r.options;n=void 0===n?{}:n,r=r.name,"function"==typeof e&&(s=e({state:s,options:n,name:r,instance:l})||s)}}},update:v((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){a(),u=!0}};return b(e,t)?(l.setOptions(i).then((function(e){!u&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l):l}}function w(e){return["top","bottom"].includes(e)?"x":"y"}function x(e){var t=e.reference,r=e.element,n=(e=e.placement)?g(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-r.width/2,i=t.y+t.height/2-r.height/2;switch(n){case"top":o={x:o,y:t.y-r.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-r.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(n=n?w(n):null))switch(i="y"===n?"height":"width",e){case"start":o[n]=Math.floor(o[n])-Math.floor(t[i]/2-r[i]/2);break;case"end":o[n]=Math.floor(o[n])+Math.ceil(t[i]/2-r[i]/2)}return o}function O(e){var t,n=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,s=e.position,f=e.gpuAcceleration,p=e.adaptive,c=window.devicePixelRatio||1;e=Math.round(a.x*c)/c||0,c=Math.round(a.y*c)/c||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,l="left",h="top";if(p){var v=m(n);v===r(n)&&(v=n.ownerDocument.documentElement),"top"===i&&(c=c-v.clientHeight+o.height,h="bottom"),"left"===i&&(e=e-v.clientWidth+o.width,l="right")}return n=Object.assign({position:s},p&&I),f?Object.assign({},n,((d={})[h]=a?"0":"",d[l]=u?"0":"",d.transform=2>(window.devicePixelRatio||1)?"translate("+e+"px, "+c+"px)":"translate3d("+e+"px, "+c+"px, 0)",d)):Object.assign({},n,((t={})[h]=a?c+"px":"",t[l]=u?e+"px":"",t.transform="",t))}function M(e){return e.replace(/left|right|bottom|top/g,(function(e){return N[e]}))}function D(e){return e.replace(/start|end/g,(function(e){return _[e]}))}function j(e,t){var r=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(r)do{if(t&&t.isSameNode(e))return!0;t=t.parentNode||t.host}while(t);return!1}function E(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function P(e,o){if("viewport"===o)e=E({width:(e=r(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(o))e=t(o);else{var a=e.ownerDocument.documentElement;e=r(a),o=n(a),(a=p(a.ownerDocument.documentElement,e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-o.scrollLeft,a.y=-o.scrollTop,e=E(a)}return e}function k(e,t,n){return t="clippingParents"===t?function(e){var t=d(e),r=["absolute","fixed"].includes(s(e).position)&&i(e)?m(e):e;return o(r)?t.filter((function(e){return o(e)&&j(e,r)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){var o=P(e,n),s=i(n)?n:e.ownerDocument.documentElement,p=f(s),c=r(s);n=s.offsetWidth-s.clientWidth-p.right;var u=s.offsetHeight-s.clientHeight-p.bottom;return"html"===a(s)&&(n=c.innerWidth-s.clientWidth,u=c.innerHeight-s.clientHeight),s=p.top,p=p.left,t.top=Math.max(o.top+s,t.top),t.right=Math.min(o.right-n,t.right),t.bottom=Math.min(o.bottom-u,t.bottom),t.left=Math.max(o.left+p,t.left),t}),P(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},e)}function L(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function B(e,r){void 0===r&&(r={});var n=r;r=void 0===(r=n.placement)?e.placement:r;var i=n.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var f=n.altBoundary,p=void 0!==f&&f;n=W("number"!=typeof(n=void 0===(n=n.padding)?0:n)?n:L(n,H));var c=e.elements.reference;f=e.rects.popper,a=k(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:e.elements.popper.ownerDocument.documentElement,a,s),p=x({reference:s=t(c),element:f,strategy:"absolute",placement:r}),f=E(Object.assign({},f,{},p)),s="popper"===i?f:s;var u={top:a.top-s.top+n.top,bottom:s.bottom-a.bottom+n.bottom,left:a.left-s.left+n.left,right:s.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[r];Object.keys(u).forEach((function(e){var t=["right","bottom"].includes(e)?1:-1,r=["top","bottom"].includes(e)?"y":"x";u[e]+=d[r]*t}))}return u}function R(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var H=["top","bottom","right","left"],S=H.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),T=[].concat(H,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),A="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),C={placement:"bottom",modifiers:[],strategy:"absolute"},F={passive:!0},I={top:"auto",right:"auto",bottom:"auto",left:"auto"},N={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"},U=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=r(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,F)})),a&&s.addEventListener("resize",n.update,F),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,F)})),a&&s.removeEventListener("resize",n.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=x({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options;e=void 0===(e=r.gpuAcceleration)||e,r=void 0===(r=r.adaptive)||r,e={placement:g(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},O(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},O(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,r),Object.entries(n).forEach((function(e){var t=e[0];!1===(e=e[1])?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(e){var t=e.state,r={position:"absolute",left:"0",top:"0",margin:"0"};return Object.assign(t.elements.popper.style,r),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=Object.keys(t.styles.hasOwnProperty(e)?Object.assign({},t.styles[e]):r);e=t.attributes[e]||{},o=o.reduce((function(e,t){var r;return Object.assign({},e,((r={})[String(t)]="",r))}),{}),i(n)&&a(n)&&(Object.assign(n.style,o),Object.keys(e).forEach((function(e){return n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.name,n=void 0===(e=e.options.offset)?[0,0]:e,o=(e=T.reduce((function(e,r){var o=t.rects,i=g(r),a=["left","top"].includes(i)?-1:1,s="function"==typeof n?n(Object.assign({},o,{placement:r})):n;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=["left","right"].includes(i)?{x:s,y:o}:{x:o,y:s},e[r]=i,e}),{}))[t.placement],i=o.y;t.modifiersData.popperOffsets.x+=o.x,t.modifiersData.popperOffsets.y+=i,t.modifiersData[r]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;if(e=e.name,!t.modifiersData[e]._skip){var n=r.fallbackPlacements,o=r.padding,i=r.boundary,a=r.rootBoundary,s=void 0===(r=r.flipVariations)||r,f=g(r=t.options.placement);n=n||(f===r?[M(r)]:function(e){if("auto"===g(e))return[];var t=M(e);return[D(e),t,D(t)]}(r));var p=function(e,t){var r=new Set;return e.filter((function(e){if(e=t(e),!r.has(e))return r.add(e),!0}))}([r].concat(n).reduce((function(e,r){return"auto"===g(r)?e.concat(function(e,t){void 0===t&&(t={});var r=t.boundary,n=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.placement.split("-")[1],s=(a?i?S:S.filter((function(e){return e.includes(a)})):H).reduce((function(t,i){return t[i]=B(e,{placement:i,boundary:r,rootBoundary:n,padding:o})[g(i)],t}),{});return Object.keys(s).sort((function(e,t){return s[e]-s[t]}))}(t,{placement:r,boundary:i,rootBoundary:a,padding:o,flipVariations:s})):e.concat(r)}),[]),(function(e){return e}));n=t.rects.reference,r=t.rects.popper;var c=new Map;f=!0;for(var u=p[0],d=0;d<p.length;d++){var l=p[d],m=g(l),h="start"===l.split("-")[1],v=["top","bottom"].includes(m),b=v?"width":"height",y=B(t,{placement:l,boundary:i,rootBoundary:a,padding:o});if(h=v?h?"right":"left":h?"bottom":"top",n[b]>r[b]&&(h=M(h)),b=M(h),(m=[0>=y[m],0>=y[h],0>=y[b]]).every((function(e){return e}))){u=l,f=!1;break}c.set(l,m)}if(f)for(n=function(e){var t=p.find((function(t){if(t=c.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return u=t,"break"},r=s?3:1;0<r&&"break"!==n(r);r--);t.placement!==u&&(t.modifiersData[e]._skip=!0,t.placement=u,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;e=e.name;var n=r.mainAxis,o=void 0===n||n;n=void 0!==(n=r.altAxis)&&n;var i=r.tether;i=void 0===i||i;var a=r.tetherOffset,s=void 0===a?0:a;r=B(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding}),a=g(t.placement);var f=t.placement.split("-")[1],p=!f,u=w(a);a="x"===u?"y":"x";var d=t.modifiersData.popperOffsets,l=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},o){var v="y"===u?"top":"left",b="y"===u?"bottom":"right",y="y"===u?"height":"width";o=d[u];var x=d[u]+r[v],O=d[u]-r[b],M=i?-m[y]/2:0,D="start"===f?l[y]:m[y];f="start"===f?-m[y]:-l[y],m=t.elements.arrow,m=i&&m?c(m):{width:0,height:0};var j=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=j[v],b=j[b],m=Math.max(0,Math.min(Math.abs(l[y]-m[y]),m[y])),j=t.modifiersData.offset?t.modifiersData.offset[t.placement][u]:0,D=t.modifiersData.popperOffsets[u]+(p?l[y]/2-M-m-v-h:D-m-v-h)-j,p=t.modifiersData.popperOffsets[u]+(p?-l[y]/2+M+m+b+h:f+m+b+h)-j,i=Math.max(i?Math.min(x,D):x,Math.min(o,i?Math.max(O,p):O)),t.modifiersData.popperOffsets[u]=i,s[u]=i-o}n&&(n=d[a],i=Math.max(n+r["x"===u?"top":"left"],Math.min(n,n-r["x"===u?"bottom":"right"])),t.modifiersData.popperOffsets[a]=i,s[a]=i-n),t.modifiersData[e]=s},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state;e=e.name;var n=r.elements.arrow,o=r.modifiersData.popperOffsets,i=g(r.placement),a=w(i);if(i=["left","right"].includes(i)?"height":"width",n){var s=r.modifiersData[e+"#persistent"].padding;n=c(n),o=Math.max(s["y"===a?"top":"left"],Math.min(r.rects.popper[i]/2-n[i]/2+((r.rects.reference[i]+r.rects.reference[a]-o[a]-r.rects.popper[i])/2-(o[a]-r.rects.reference[a])/2),r.rects.popper[i]-n[i]-s["y"===a?"bottom":"right"])),r.modifiersData[e]=((t={})[a]=o,t)}},effect:function(e){var t=e.state,r=e.options;e=e.name;var n=r.element;n=void 0===n?"[data-popper-arrow]":n,r=void 0===(r=r.padding)?0:r,("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&j(t.elements.popper,n)&&(t.elements.arrow=n,t.modifiersData[e+"#persistent"]={padding:W("number"!=typeof r?r:L(r,H))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var r=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,i=B(t,{elementContext:"reference"}),a=B(t,{altBoundary:!0});r=R(i,r),n=R(a,n,o),o=q(r),a=q(n),t.modifiersData[e]={referenceClippingOffsets:r,popperEscapeOffsets:n,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],V=y({defaultModifiers:U});e.createPopper=V,e.defaultModifiers=U,e.popperGenerator=y,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=popper.min.js.map

@@ -13,3 +13,2 @@ import { viewport } from "../enums.js";

import rectToClientRect from "../utils/rectToClientRect.js";
import getFreshSideObject from "../utils/getFreshSideObject.js";

@@ -45,3 +44,3 @@ function getClientRectFromMixedType(element, clippingParent) {

var rect = getClientRectFromMixedType(element, clippingParent);
var decorations = isHTMLElement(clippingParent) ? getDecorations(clippingParent) : getFreshSideObject();
var decorations = getDecorations(isHTMLElement(clippingParent) ? clippingParent : getDocumentElement(element));
accRect.top = Math.max(rect.top + decorations.top, accRect.top);

@@ -48,0 +47,0 @@ accRect.right = Math.min(rect.right - decorations.right, accRect.right);

@@ -1,11 +0,22 @@

import getBorders from "./getBorders.js"; // Borders + scrollbars
import getBorders from "./getBorders.js";
import getNodeName from "./getNodeName.js";
import getWindow from "./getWindow.js"; // Borders + scrollbars
export default function getDecorations(element) {
var borders = getBorders(element);
var win = getWindow(element);
var right = element.offsetWidth - element.clientWidth - borders.right;
var bottom = element.offsetHeight - element.clientHeight - borders.bottom;
if (getNodeName(element) === 'html') {
right = win.innerWidth - element.clientWidth;
bottom = win.innerHeight - element.clientHeight;
}
return {
top: borders.top,
right: element.offsetWidth - (element.clientWidth + borders.right),
bottom: element.offsetHeight - (element.clientHeight + borders.bottom),
right: right,
bottom: bottom,
left: borders.left
};
}
export default function getDocumentElement(element) {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;
}

@@ -7,2 +7,3 @@ import getParentNode from "./getParentNode.js";

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -9,0 +10,0 @@ }

@@ -5,2 +5,3 @@ import getCompositeRect from "./dom-utils/getCompositeRect.js";

import getOffsetParent from "./dom-utils/getOffsetParent.js";
import getComputedStyle from "./dom-utils/getComputedStyle.js";
import orderModifiers from "./utils/orderModifiers.js";

@@ -103,2 +104,16 @@ import debounce from "./utils/debounce.js";

}
var _getComputedStyle = getComputedStyle(popper),
marginTop = _getComputedStyle.marginTop,
marginRight = _getComputedStyle.marginRight,
marginBottom = _getComputedStyle.marginBottom,
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
}
} // Strip out disabled modifiers

@@ -105,0 +120,0 @@

@@ -38,3 +38,4 @@ import getNodeName from "../dom-utils/getNodeName.js";

left: '0',
top: '0'
top: '0',
margin: '0'
};

@@ -41,0 +42,0 @@ Object.assign(state.elements.popper.style, initialStyles);

@@ -25,3 +25,2 @@ import { Placement, ModifierPhases } from "./enums";

export declare type State = {
isCreated: boolean;
elements: {

@@ -62,3 +61,3 @@ reference: Element | VirtualElement;

export declare type ModifierArguments<Options extends Obj> = {
state: Partial<State>;
state: State;
instance: Instance;

@@ -74,4 +73,4 @@ options: Partial<Options>;

requiresIfExists?: Array<string>;
fn: (arg0: ModifierArguments<Options>) => State | null | undefined;
effect?: (arg0: ModifierArguments<Options>) => () => void | null | undefined;
fn: (arg0: ModifierArguments<Options>) => State | void;
effect?: (arg0: ModifierArguments<Options>) => () => void | void;
options?: Obj;

@@ -78,0 +77,0 @@ data?: Obj;

{
"name": "@popperjs/core",
"version": "2.0.0",
"version": "2.0.1",
"description": "Tooltip and Popover Positioning Engine",

@@ -58,4 +58,4 @@ "main": "dist/cjs/popper.js",

"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.13.0",
"@babel/cli": "^7.8.0",
"@ampproject/rollup-plugin-closure-compiler": "^0.20.0",
"@babel/cli": "^7.8.3",
"@babel/core": "^7.7.5",

@@ -67,8 +67,8 @@ "@babel/plugin-transform-flow-strip-types": "^7.7.4",

"@khanacademy/flow-to-ts": "^0.1.4",
"@typescript-eslint/parser": "^2.15.0",
"@typescript-eslint/parser": "^2.17.0",
"arg": "^4.1.2",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-add-import-extension": "^1.2.2",
"babel-jest": "^25.1.0",
"babel-plugin-add-import-extension": "^1.3.0",
"babel-plugin-annotate-pure-calls": "^0.4.0",

@@ -86,11 +86,11 @@ "babel-plugin-dev-expression": "^0.2.2",

"eslint-plugin-unused-imports": "^0.1.2",
"flow-bin": "0.115.0",
"flow-bin": "0.116.1",
"flow-copy-source": "^2.0.9",
"get-port-cli": "^2.0.0",
"glob": "^7.1.6",
"husky": "^4.0.7",
"jest": "^24.9.0",
"husky": "^4.2.0",
"jest": "^25.1.0",
"jest-environment-jsdom-fourteen": "^1.0.1",
"jest-environment-puppeteer": "^4.4.0",
"jest-image-snapshot": "^2.11.1",
"jest-image-snapshot": "^2.12.0",
"jest-puppeteer": "^4.4.0",

@@ -101,4 +101,3 @@ "poster": "^0.0.9",

"puppeteer": "^2.0.0",
"puppeteer-firefox": "^0.5.1",
"rollup": "^1.29.0",
"rollup": "^1.29.1",
"rollup-plugin-babel": "^4.3.3",

@@ -113,3 +112,3 @@ "rollup-plugin-bundle-size": "^1.0.2",

"trim-right": "^1.0.1",
"typescript": "^3.7.4",
"typescript": "^3.7.5",
"utility-types": "^3.10.0"

@@ -116,0 +115,0 @@ },

@@ -0,6 +1,9 @@

<!-- <HEADER> // IGNORE IT -->
<p align="center">
<img src="https://github.com/popperjs/popper-core/blob/master/docs/src/images/popper-logo.svg" alt="Popper" height="300px"/>
<img src="https://rawcdn.githack.com/popperjs/popper-core/8805a5d7599e14619c9e7ac19a3713285d8e5d7f/docs/src/images/popper-logo-outlined.svg" alt="Popper" height="300px"/>
</p>
<h1 align="center">Tooltip & Popover Positioning Engine</h1>
<div align="center">
<h1>Tooltip & Popover Positioning Engine</h1>
</div>

@@ -17,2 +20,3 @@ <p align="center">

<br />
<!-- </HEADER> // NOW BEGINS THE README -->

@@ -114,3 +118,7 @@ **Positioning tooltips and popovers is difficult. Popper is here to help!**

```html
<script src="https://unpkg.com/@popperjs/core@2.0.0-rc.3"></script>
<!-- Development version -->
<script src="https://unpkg.com/@popperjs/core@2/dist/umd/popper.js"></script>
<!-- Production version -->
<script src="https://unpkg.com/@popperjs/core@2"></script>
```

@@ -150,3 +158,3 @@

<script src="https://unpkg.com/@popperjs/core@2.0.0-rc.3"></script>
<script src="https://unpkg.com/@popperjs/core@^2.0.0"></script>
<script>

@@ -153,0 +161,0 @@ const button = document.querySelector('#button');

@@ -16,3 +16,2 @@ // @flow

import rectToClientRect from '../utils/rectToClientRect';
import getFreshSideObject from '../utils/getFreshSideObject';

@@ -70,5 +69,7 @@ function getClientRectFromMixedType(

const rect = getClientRectFromMixedType(element, clippingParent);
const decorations = isHTMLElement(clippingParent)
? getDecorations(clippingParent)
: getFreshSideObject();
const decorations = getDecorations(
isHTMLElement(clippingParent)
? clippingParent
: getDocumentElement(element)
);

@@ -75,0 +76,0 @@ accRect.top = Math.max(rect.top + decorations.top, accRect.top);

// @flow
import type { SideObject } from '../types';
import getBorders from './getBorders';
import getNodeName from './getNodeName';
import getWindow from './getWindow';

@@ -8,9 +10,18 @@ // Borders + scrollbars

const borders = getBorders(element);
const win = getWindow(element);
let right = element.offsetWidth - element.clientWidth - borders.right;
let bottom = element.offsetHeight - element.clientHeight - borders.bottom;
if (getNodeName(element) === 'html') {
right = win.innerWidth - element.clientWidth;
bottom = win.innerHeight - element.clientHeight;
}
return {
top: borders.top,
right: element.offsetWidth - (element.clientWidth + borders.right),
bottom: element.offsetHeight - (element.clientHeight + borders.bottom),
right,
bottom,
left: borders.left,
};
}
// @flow
export default function getDocumentElement(element: Element): HTMLElement {
// $FlowFixMe: assume body is always available
return element.ownerDocument.documentElement;
}

@@ -9,2 +9,3 @@ // @flow

if (['html', 'body', '#document'].includes(getNodeName(node))) {
// $FlowFixMe: assume body is always available
return node.ownerDocument.body;

@@ -11,0 +12,0 @@ }

@@ -13,2 +13,3 @@ // @flow

import getOffsetParent from './dom-utils/getOffsetParent';
import getComputedStyle from './dom-utils/getComputedStyle';
import orderModifiers from './utils/orderModifiers';

@@ -129,2 +130,27 @@ import debounce from './utils/debounce';

}
const {
marginTop,
marginRight,
marginBottom,
marginLeft,
} = getComputedStyle(popper);
// We no longer take into account `margins` on the popper, and it can
// cause bugs with positioning, so we'll warn the consumer
if (
[marginTop, marginRight, marginBottom, marginLeft].some(margin =>
parseFloat(margin)
)
) {
console.warn(
[
'Popper: CSS "margin" styles cannot be used to apply padding',
'between the popper and its reference element or boundary.',
'To replicate margin, use the `offset` modifier, as well as',
'the `padding` option in the `preventOverflow` and `flip`',
'modifiers.',
].join(' ')
);
}
}

@@ -131,0 +157,0 @@

@@ -68,2 +68,50 @@ // @flow

describe('margin warning', () => {
it('warns for margin: value', () => {
const spy = jest.spyOn(console, 'warn');
const popper = getPopper();
popper.style.margin = '5px';
createPopper(reference, popper);
expect(spy).toHaveBeenCalledWith(
[
'Popper: CSS "margin" styles cannot be used to apply padding',
'between the popper and its reference element or boundary.',
'To replicate margin, use the `offset` modifier, as well as',
'the `padding` option in the `preventOverflow` and `flip`',
'modifiers.',
].join(' ')
);
});
it('warns for two sides', () => {
const spy = jest.spyOn(console, 'warn');
const popper = getPopper();
popper.style.margin = '0 0.5em';
createPopper(reference, popper);
expect(spy).toHaveBeenCalledWith(
[
'Popper: CSS "margin" styles cannot be used to apply padding',
'between the popper and its reference element or boundary.',
'To replicate margin, use the `offset` modifier, as well as',
'the `padding` option in the `preventOverflow` and `flip`',
'modifiers.',
].join(' ')
);
});
it('does not warn with no margin', () => {
const spy = jest.spyOn(console, 'warn');
const popper = getPopper();
popper.style.margin = '0px';
createPopper(reference, popper);
expect(spy).not.toHaveBeenCalled();
});
});
it('does not error for missing phase for disabled modifiers', () => {

@@ -70,0 +118,0 @@ const spy = jest.spyOn(console, 'error');

@@ -41,2 +41,3 @@ // @flow

top: '0',
margin: '0',
};

@@ -43,0 +44,0 @@

@@ -32,3 +32,2 @@ // @flow

export type State = {|
isCreated: boolean,
elements: {|

@@ -67,3 +66,3 @@ reference: Element | VirtualElement,

export type ModifierArguments<Options: Obj> = {
state: $Shape<State>,
state: State,
instance: Instance,

@@ -79,4 +78,4 @@ options: $Shape<Options>,

requiresIfExists?: Array<string>,
fn: (ModifierArguments<Options>) => ?State,
effect?: (ModifierArguments<Options>) => ?() => void,
fn: (ModifierArguments<Options>) => State | void,
effect?: (ModifierArguments<Options>) => (() => void) | void,
options?: Obj,

@@ -83,0 +82,0 @@ data?: Obj,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc