@popperjs/core
Advanced tools
Comparing version 2.8.0 to 2.8.1
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.1 - MIT License | ||
*/ | ||
@@ -465,5 +465,5 @@ | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -516,2 +516,5 @@ return merged; | ||
var max = Math.max; | ||
var min = Math.min; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -525,4 +528,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -532,3 +535,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -568,3 +571,3 @@ | ||
function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -620,6 +623,6 @@ top: rect.y, | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -717,3 +720,3 @@ }, getClientRectFromMixedType(element, firstClippingParent)); | ||
function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} | ||
@@ -759,3 +762,3 @@ | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -820,3 +823,3 @@ // 0 or negative = within the clipping rect | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -836,3 +839,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -839,0 +842,0 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.1 - MIT License | ||
*/ | ||
@@ -465,5 +465,5 @@ | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -516,2 +516,6 @@ return merged; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -525,4 +529,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -532,3 +536,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -568,3 +572,3 @@ | ||
function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -620,6 +624,6 @@ top: rect.y, | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -717,3 +721,3 @@ }, getClientRectFromMixedType(element, firstClippingParent)); | ||
function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} | ||
@@ -759,3 +763,3 @@ | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -820,3 +824,3 @@ // 0 or negative = within the clipping rect | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -836,3 +840,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -1100,3 +1104,2 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -1164,3 +1167,3 @@ top: 'auto', | ||
if (placement === top) { | ||
sideY = bottom; // $FlowFixMe | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
@@ -1172,3 +1175,3 @@ y -= offsetParent[heightProp] - popperRect.height; | ||
if (placement === left) { | ||
sideX = right; // $FlowFixMe | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
@@ -1187,6 +1190,6 @@ x -= offsetParent[widthProp] - popperRect.width; | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
} | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
} | ||
@@ -1222,3 +1225,3 @@ | ||
if (state.modifiersData.popperOffsets != null) { | ||
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.popperOffsets, | ||
@@ -1232,3 +1235,3 @@ position: state.options.strategy, | ||
if (state.modifiersData.arrow != null) { | ||
state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.arrow, | ||
@@ -1241,3 +1244,3 @@ position: 'absolute', | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-placement': state.placement | ||
@@ -1244,0 +1247,0 @@ }); |
@@ -51,3 +51,3 @@ import getCompositeRect from "./dom-utils/getCompositeRect.js"; | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -67,3 +67,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -70,0 +70,0 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], |
@@ -14,2 +14,3 @@ import { viewport } from "../enums.js"; | ||
import rectToClientRect from "../utils/rectToClientRect.js"; | ||
import { max, min } from "../utils/math.js"; | ||
@@ -59,6 +60,6 @@ function getInnerBoundingClientRect(element) { | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -65,0 +66,0 @@ }, getClientRectFromMixedType(element, firstClippingParent)); |
import getDocumentElement from "./getDocumentElement.js"; | ||
import getComputedStyle from "./getComputedStyle.js"; | ||
import getWindowScrollBarX from "./getWindowScrollBarX.js"; | ||
import getWindowScroll from "./getWindowScroll.js"; // Gets the entire size of the scrollable document area, even extending outside | ||
import getWindowScroll from "./getWindowScroll.js"; | ||
import { max } from "../utils/math.js"; // Gets the entire size of the scrollable document area, even extending outside | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -13,4 +14,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -20,3 +21,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -23,0 +24,0 @@ |
@@ -84,3 +84,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
padding = typeof padding === 'function' ? padding(Object.assign(Object.assign({}, state.rects), {}, { | ||
padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { | ||
placement: state.placement | ||
@@ -87,0 +87,0 @@ })) : padding; |
@@ -6,5 +6,5 @@ import { top, left, right, bottom } from "../enums.js"; | ||
import getComputedStyle from "../dom-utils/getComputedStyle.js"; | ||
import getBasePlacement from "../utils/getBasePlacement.js"; // eslint-disable-next-line import/no-unused-modules | ||
import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import { round } from "../utils/math.js"; // eslint-disable-next-line import/no-unused-modules | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -72,3 +72,3 @@ top: 'auto', | ||
if (placement === top) { | ||
sideY = bottom; // $FlowFixMe | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
@@ -80,3 +80,3 @@ y -= offsetParent[heightProp] - popperRect.height; | ||
if (placement === left) { | ||
sideX = right; // $FlowFixMe | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
@@ -95,6 +95,6 @@ x -= offsetParent[widthProp] - popperRect.width; | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
} | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
} | ||
@@ -130,3 +130,3 @@ | ||
if (state.modifiersData.popperOffsets != null) { | ||
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.popperOffsets, | ||
@@ -140,3 +140,3 @@ position: state.options.strategy, | ||
if (state.modifiersData.arrow != null) { | ||
state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.arrow, | ||
@@ -149,3 +149,3 @@ position: 'absolute', | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-placement': state.placement | ||
@@ -152,0 +152,0 @@ }); |
@@ -48,3 +48,3 @@ import { top, bottom, left, right } from "../enums.js"; | ||
}; | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-reference-hidden': isReferenceHidden, | ||
@@ -51,0 +51,0 @@ 'data-popper-escaped': hasPopperEscaped |
@@ -7,3 +7,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, { | ||
var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { | ||
placement: placement | ||
@@ -10,0 +10,0 @@ })) : offset, |
@@ -11,2 +11,3 @@ import { top, left, right, bottom, start } from "../enums.js"; | ||
import getFreshSideObject from "../utils/getFreshSideObject.js"; | ||
import { max as mathMax, min as mathMin } from "../utils/math.js"; | ||
@@ -43,3 +44,3 @@ function preventOverflow(_ref) { | ||
var popperRect = state.rects.popper; | ||
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, { | ||
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { | ||
placement: state.placement | ||
@@ -91,3 +92,3 @@ })) : tetherOffset; | ||
if (checkMainAxis) { | ||
var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max); | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
@@ -108,3 +109,3 @@ data[mainAxis] = preventedOffset - offset; | ||
var _preventedOffset = within(tether ? Math.min(_min, tetherMin) : _min, _offset, tether ? Math.max(_max, tetherMax) : _max); | ||
var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max); | ||
@@ -111,0 +112,0 @@ popperOffsets[altAxis] = _preventedOffset; |
@@ -42,3 +42,3 @@ import getBoundingClientRect from "../dom-utils/getBoundingClientRect.js"; | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -45,0 +45,0 @@ // 0 or negative = within the clipping rect |
export default function mergeByName(modifiers) { | ||
var merged = modifiers.reduce(function (merged, current) { | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -8,0 +8,0 @@ return merged; |
import getFreshSideObject from "./getFreshSideObject.js"; | ||
export default function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} |
export default function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -4,0 +4,0 @@ top: rect.y, |
@@ -0,3 +1,4 @@ | ||
import { max as mathMax, min as mathMin } from "./math.js"; | ||
export default function within(min, value, max) { | ||
return Math.max(min, Math.min(value, max)); | ||
return mathMax(min, mathMin(value, max)); | ||
} |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.1 - MIT License | ||
*/ | ||
@@ -8,3 +8,3 @@ | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.Popper = {})); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Popper = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -468,5 +468,5 @@ | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -519,2 +519,5 @@ return merged; | ||
var max = Math.max; | ||
var min = Math.min; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -528,4 +531,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -535,3 +538,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -571,3 +574,3 @@ | ||
function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -623,6 +626,6 @@ top: rect.y, | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -720,3 +723,3 @@ }, getClientRectFromMixedType(element, firstClippingParent)); | ||
function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} | ||
@@ -762,3 +765,3 @@ | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -823,3 +826,3 @@ // 0 or negative = within the clipping rect | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -839,3 +842,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -842,0 +845,0 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.1 - MIT License | ||
*/ | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function n(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return{scrollLeft:(t=n(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof n(t).Element||t instanceof Element}function r(t){return t instanceof n(t).HTMLElement||t instanceof HTMLElement}function f(t){return t instanceof n(t).ShadowRoot||t instanceof ShadowRoot}function c(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function s(t){return e(a(t)).left+o(t).scrollLeft}function l(t){return n(t).getComputedStyle(t)}function u(t){return t=l(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function d(t,i,f){void 0===f&&(f=!1);var l=a(i);t=e(t);var d=r(i),p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(d||!d&&!f)&&(("body"!==c(i)||u(l))&&(p=i!==n(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:o(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):l&&(h.x=s(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function p(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||a(t)}function h(t,e){var o;void 0===e&&(e=[]);var i=function t(e){return 0<=["html","body","#document"].indexOf(c(e))?e.ownerDocument.body:r(e)&&u(e)?e:t(p(e))}(t);return t=i===(null==(o=t.ownerDocument)?void 0:o.body),o=n(i),i=t?[o].concat(o.visualViewport||[],u(i)?i:[]):i,e=e.concat(i),t?e:e.concat(h(p(i)))}function m(t){return r(t)&&"fixed"!==l(t).position?t.offsetParent:null}function g(t){for(var e=n(t),o=m(t);o&&0<=["table","td","th"].indexOf(c(o))&&"static"===l(o).position;)o=m(o);if(o&&("html"===c(o)||"body"===c(o)&&"static"===l(o).position))return e;if(!o)t:{for(o=navigator.userAgent.toLowerCase().includes("firefox"),t=p(t);r(t)&&0>["html","body"].indexOf(c(t));){var i=l(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||["transform","perspective"].includes(i.willChange)||o&&"filter"===i.willChange||o&&i.filter&&"none"!==i.filter){o=t;break t}t=t.parentNode}o=null}return o||e}function b(t){var e=new Map,n=new Set,o=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||function t(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(o){n.has(o)||(o=e.get(o))&&t(o)})),o.push(i)}(t)})),o}function v(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function y(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function w(t,i){if("viewport"===i){i=n(t);var f=a(t);i=i.visualViewport;var c=f.clientWidth;f=f.clientHeight;var u=0,d=0;i&&(c=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=i.offsetLeft,d=i.offsetTop)),t=y(t={width:c,height:f,x:u+s(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=a(t),t=a(d),c=o(d),i=null==(f=d.ownerDocument)?void 0:f.body,f=Math.max(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),u=Math.max(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-c.scrollLeft+s(d),c=-c.scrollTop,"rtl"===l(i||t).direction&&(d+=Math.max(t.clientWidth,i?i.clientWidth:0)-f),t=y({width:f,height:u,x:d,y:c}));return t}function x(t,e,n){return e="clippingParents"===e?function(t){var e=h(p(t)),n=0<=["absolute","fixed"].indexOf(l(t).position)&&r(t)?g(t):t;return i(n)?e.filter((function(t){var e;if(e=i(t))t:if(e=n.getRootNode&&n.getRootNode(),t.contains(n))e=!0;else{if(e&&f(e)){e=n;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==c(t)})):[]}(t):[].concat(e),(n=(n=[].concat(e,[n])).reduce((function(e,n){return n=w(t,n),e.top=Math.max(n.top,e.top),e.right=Math.min(n.right,e.right),e.bottom=Math.min(n.bottom,e.bottom),e.left=Math.max(n.left,e.left),e}),w(t,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function O(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function j(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,o=void 0===(t=t.defaultOptions)?L:t;return function(t,e,r){function f(){a.forEach((function(t){return t()})),a=[]}void 0===r&&(r=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},L),o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},a=[],s=!1,l={state:c,setOptions:function(r){return f(),c.options=Object.assign(Object.assign(Object.assign({},o),c.options),r),c.scrollParents={reference:i(t)?h(t):t.contextElement?h(t.contextElement):[],popper:h(e)},r=function(t){var e=b(t);return E.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign(Object.assign(Object.assign({},n),e),{},{options:Object.assign(Object.assign({},n.options),e.options),data:Object.assign(Object.assign({},n.data),e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,c.options.modifiers))),c.orderedModifiers=r.filter((function(t){return t.enabled})),c.orderedModifiers.forEach((function(t){var e=t.name,n=t.options;n=void 0===n?{}:n,"function"==typeof(t=t.effect)&&(e=t({state:c,name:e,instance:l,options:n}),a.push(e||function(){}))})),l.update()},forceUpdate:function(){if(!s){var t=c.elements,e=t.reference;if(O(e,t=t.popper))for(c.rects={reference:d(e,g(t),"fixed"===c.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach((function(t){return c.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<c.orderedModifiers.length;e++)if(!0===c.reset)c.reset=!1,e=-1;else{var n=c.orderedModifiers[e];t=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof t&&(c=t({state:c,options:o,name:n,instance:l})||c)}}},update:v((function(){return new Promise((function(t){l.forceUpdate(),t(c)}))})),destroy:function(){f(),s=!0}};return O(t,e)?(l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l):l}}var M=["top","bottom","right","left"],E="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),L={placement:"bottom",modifiers:[],strategy:"absolute"},W=j();t.createPopper=W,t.detectOverflow=function(t,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?t.placement:n;var r=o.boundary,f=void 0===r?"clippingParents":r,c=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var s=o.altBoundary,l=void 0!==s&&s;o=function(t){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),t)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}(o,M));var u=t.elements.reference;s=t.rects.popper,f=x(i(l=t.elements[l?"popper"===r?"reference":"popper":r])?l:l.contextElement||a(t.elements.popper),f,c),l=function(t){var e=t.reference,n=t.element,o=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;switch(o){case"top":i={x:i,y:e.y-n.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-n.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(r="y"===o?"height":"width",t){case"start":i[o]-=e[r]/2-n[r]/2;break;case"end":i[o]+=e[r]/2-n[r]/2}return i}({reference:c=e(u),element:s,strategy:"absolute",placement:n}),s=y(Object.assign(Object.assign({},s),l)),c="popper"===r?s:c;var d={top:f.top-c.top+o.top,bottom:c.bottom-f.bottom+o.bottom,left:f.left-c.left+o.left,right:c.right-f.right+o.right};if(t=t.modifiersData.offset,"popper"===r&&t){var p=t[n];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,n=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=p[n]*e}))}return d},t.popperGenerator=j,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Popper={})}(this,(function(t){function e(t){return{width:(t=t.getBoundingClientRect()).width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function o(t){return"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function n(t){return{scrollLeft:(t=o(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof o(t).Element||t instanceof Element}function r(t){return t instanceof o(t).HTMLElement||t instanceof HTMLElement}function f(t){return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function c(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function s(t){return e(a(t)).left+n(t).scrollLeft}function l(t){return o(t).getComputedStyle(t)}function u(t){return t=l(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function d(t,i,f){void 0===f&&(f=!1);var l=a(i);t=e(t);var d=r(i),p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(d||!d&&!f)&&(("body"!==c(i)||u(l))&&(p=i!==o(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:n(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):l&&(h.x=s(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function p(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||a(t)}function h(t){return 0<=["html","body","#document"].indexOf(c(t))?t.ownerDocument.body:r(t)&&u(t)?t:h(p(t))}function m(t,e){var n;void 0===e&&(e=[]);var i=h(t);return t=i===(null==(n=t.ownerDocument)?void 0:n.body),n=o(i),i=t?[n].concat(n.visualViewport||[],u(i)?i:[]):i,e=e.concat(i),t?e:e.concat(m(p(i)))}function g(t){return r(t)&&"fixed"!==l(t).position?t.offsetParent:null}function v(t){for(var e=o(t),n=g(t);n&&0<=["table","td","th"].indexOf(c(n))&&"static"===l(n).position;)n=g(n);if(n&&("html"===c(n)||"body"===c(n)&&"static"===l(n).position))return e;if(!n)t:{for(n=navigator.userAgent.toLowerCase().includes("firefox"),t=p(t);r(t)&&0>["html","body"].indexOf(c(t));){var i=l(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||["transform","perspective"].includes(i.willChange)||n&&"filter"===i.willChange||n&&i.filter&&"none"!==i.filter){n=t;break t}t=t.parentNode}n=null}return n||e}function b(t){function e(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){n.has(t)||(t=o.get(t))&&e(t)})),i.push(t)}var o=new Map,n=new Set,i=[];return t.forEach((function(t){o.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||e(t)})),i}function y(t){var e;return function(){return e||(e=new Promise((function(o){Promise.resolve().then((function(){e=void 0,o(t())}))}))),e}}function w(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function x(t,i){if("viewport"===i){i=o(t);var f=a(t);i=i.visualViewport;var c=f.clientWidth;f=f.clientHeight;var u=0,d=0;i&&(c=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=i.offsetLeft,d=i.offsetTop)),t=w(t={width:c,height:f,x:u+s(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=a(t),t=a(d),c=n(d),i=null==(f=d.ownerDocument)?void 0:f.body,f=T(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),u=T(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-c.scrollLeft+s(d),c=-c.scrollTop,"rtl"===l(i||t).direction&&(d+=T(t.clientWidth,i?i.clientWidth:0)-f),t=w({width:f,height:u,x:d,y:c}));return t}function O(t,e,o){return e="clippingParents"===e?function(t){var e=m(p(t)),o=0<=["absolute","fixed"].indexOf(l(t).position)&&r(t)?v(t):t;return i(o)?e.filter((function(t){var e;if(e=i(t))t:if(e=o.getRootNode&&o.getRootNode(),t.contains(o))e=!0;else{if(e&&f(e)){e=o;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==c(t)})):[]}(t):[].concat(e),(o=(o=[].concat(e,[o])).reduce((function(e,o){return o=x(t,o),e.top=T(o.top,e.top),e.right=W(o.right,e.right),e.bottom=W(o.bottom,e.bottom),e.left=T(o.left,e.left),e}),x(t,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function E(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function L(t){void 0===t&&(t={});var e=t.defaultModifiers,o=void 0===e?[]:e,n=void 0===(t=t.defaultOptions)?H:t;return function(t,e,r){function f(){a.forEach((function(t){return t()})),a=[]}void 0===r&&(r=n);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},H,n),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},a=[],s=!1,l={state:c,setOptions:function(r){return f(),c.options=Object.assign({},n,c.options,r),c.scrollParents={reference:i(t)?m(t):t.contextElement?m(t.contextElement):[],popper:m(e)},r=function(t){var e=b(t);return j.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}(function(t){var e=t.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(o,c.options.modifiers))),c.orderedModifiers=r.filter((function(t){return t.enabled})),c.orderedModifiers.forEach((function(t){var e=t.name,o=t.options;o=void 0===o?{}:o,"function"==typeof(t=t.effect)&&(e=t({state:c,name:e,instance:l,options:o}),a.push(e||function(){}))})),l.update()},forceUpdate:function(){if(!s){var t=c.elements,e=t.reference;if(E(e,t=t.popper))for(c.rects={reference:d(e,v(t),"fixed"===c.options.strategy),popper:{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach((function(t){return c.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<c.orderedModifiers.length;e++)if(!0===c.reset)c.reset=!1,e=-1;else{var o=c.orderedModifiers[e];t=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof t&&(c=t({state:c,options:n,name:o,instance:l})||c)}}},update:y((function(){return new Promise((function(t){l.forceUpdate(),t(c)}))})),destroy:function(){f(),s=!0}};return E(t,e)?(l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l):l}}var M=["top","bottom","right","left"],j="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),T=Math.max,W=Math.min,H={placement:"bottom",modifiers:[],strategy:"absolute"},P=L();t.createPopper=P,t.detectOverflow=function(t,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?t.placement:o;var r=n.boundary,f=void 0===r?"clippingParents":r,c=void 0===(r=n.rootBoundary)?"viewport":r;r=void 0===(r=n.elementContext)?"popper":r;var s=n.altBoundary,l=void 0!==s&&s;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof n?n:function(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}(n,M));var u=t.elements.reference;s=t.rects.popper,f=O(i(l=t.elements[l?"popper"===r?"reference":"popper":r])?l:l.contextElement||a(t.elements.popper),f,c),l=function(t){var e=t.reference,o=t.element,n=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-o.width/2,r=e.y+e.height/2-o.height/2;switch(n){case"top":i={x:i,y:e.y-o.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-o.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(r="y"===n?"height":"width",t){case"start":i[n]-=e[r]/2-o[r]/2;break;case"end":i[n]+=e[r]/2-o[r]/2}return i}({reference:c=e(u),element:s,strategy:"absolute",placement:o}),s=w(Object.assign({},s,l)),c="popper"===r?s:c;var d={top:f.top-c.top+n.top,bottom:c.bottom-f.bottom+n.bottom,left:f.left-c.left+n.left,right:c.right-f.right+n.right};if(t=t.modifiersData.offset,"popper"===r&&t){var p=t[o];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,o=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=p[o]*e}))}return d},t.popperGenerator=L,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-base.min.js.map |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.1 - MIT License | ||
*/ | ||
@@ -8,3 +8,3 @@ | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.Popper = {})); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Popper = {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -468,5 +468,5 @@ | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -519,2 +519,6 @@ return merged; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -528,4 +532,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -535,3 +539,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -571,3 +575,3 @@ | ||
function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -623,6 +627,6 @@ top: rect.y, | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -720,3 +724,3 @@ }, getClientRectFromMixedType(element, firstClippingParent)); | ||
function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} | ||
@@ -762,3 +766,3 @@ | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -823,3 +827,3 @@ // 0 or negative = within the clipping rect | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -839,3 +843,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -1103,3 +1107,2 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -1167,3 +1170,3 @@ top: 'auto', | ||
if (placement === top) { | ||
sideY = bottom; // $FlowFixMe | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
@@ -1175,3 +1178,3 @@ y -= offsetParent[heightProp] - popperRect.height; | ||
if (placement === left) { | ||
sideX = right; // $FlowFixMe | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
@@ -1190,6 +1193,6 @@ x -= offsetParent[widthProp] - popperRect.width; | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
} | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
} | ||
@@ -1225,3 +1228,3 @@ | ||
if (state.modifiersData.popperOffsets != null) { | ||
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.popperOffsets, | ||
@@ -1235,3 +1238,3 @@ position: state.options.strategy, | ||
if (state.modifiersData.arrow != null) { | ||
state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.arrow, | ||
@@ -1244,3 +1247,3 @@ position: 'absolute', | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-placement': state.placement | ||
@@ -1247,0 +1250,0 @@ }); |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.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]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function s(e){return e instanceof n(e).ShadowRoot||e instanceof ShadowRoot}function a(e){return e?(e.nodeName||"").toLowerCase():null}function c(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return t(c(e)).left+o(e).scrollLeft}function p(e){return n(e).getComputedStyle(e)}function l(e){return e=p(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,s){void 0===s&&(s=!1);var p=c(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(u||!u&&!s)&&(("body"!==a(r)||l(p))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((h=t(r)).x+=r.clientLeft,h.y+=r.clientTop):p&&(h.x=f(p))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||c(e)}function h(e,t){var o;void 0===t&&(t=[]);var r=function e(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:i(t)&&l(t)?t:e(d(t))}(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=n(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(h(d(r)))}function m(e){return i(e)&&"fixed"!==p(e).position?e.offsetParent:null}function g(e){for(var t=n(e),o=m(e);o&&0<=["table","td","th"].indexOf(a(o))&&"static"===p(o).position;)o=m(o);if(o&&("html"===a(o)||"body"===a(o)&&"static"===p(o).position))return t;if(!o)e:{for(o=navigator.userAgent.toLowerCase().includes("firefox"),e=d(e);i(e)&&0>["html","body"].indexOf(a(e));){var r=p(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||["transform","perspective"].includes(r.willChange)||o&&"filter"===r.willChange||o&&r.filter&&"none"!==r.filter){o=e;break e}e=e.parentNode}o=null}return o||t}function b(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 v(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function y(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O(e,r){if("viewport"===r){r=n(e);var s=c(e);r=r.visualViewport;var a=s.clientWidth;s=s.clientHeight;var l=0,u=0;r&&(a=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=y(e={width:a,height:s,x:l+f(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=c(e),e=c(u),a=o(u),r=null==(s=u.ownerDocument)?void 0:s.body,s=Math.max(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=Math.max(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-a.scrollLeft+f(u),a=-a.scrollTop,"rtl"===p(r||e).direction&&(u+=Math.max(e.clientWidth,r?r.clientWidth:0)-s),e=y({width:s,height:l,x:u,y:a}));return e}function w(e,t,n){return t="clippingParents"===t?function(e){var t=h(d(e)),n=0<=["absolute","fixed"].indexOf(p(e).position)&&i(e)?g(e):e;return r(n)?t.filter((function(e){var t;if(t=r(e))e:if(t=n.getRootNode&&n.getRootNode(),e.contains(n))t=!0;else{if(t&&s(t)){t=n;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==a(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=O(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),O(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function x(e){var t=e.reference,n=e.element,o=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function j(){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 E(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?W:e;return function(e,t,i){function s(){c.forEach((function(e){return e()})),c=[]}void 0===i&&(i=o);var a={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},W),o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,p={state:a,setOptions:function(i){return s(),a.options=Object.assign(Object.assign(Object.assign({},o),a.options),i),a.scrollParents={reference:r(e)?h(e):e.contextElement?h(e.contextElement):[],popper:h(t)},i=function(e){var t=b(e);return P.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=i.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:a,name:t,instance:p,options:n}),c.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!f){var e=a.elements,t=e.reference;if(j(t,e=e.popper))for(a.rects={reference:u(t,g(e),"fixed"===a.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<a.orderedModifiers.length;t++)if(!0===a.reset)a.reset=!1,t=-1;else{var n=a.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(a=e({state:a,options:o,name:n,instance:p})||a)}}},update:v((function(){return new Promise((function(e){p.forceUpdate(),e(a)}))})),destroy:function(){s(),f=!0}};return j(e,t)?(p.setOptions(i).then((function(e){!f&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function M(e){var t,o=e.popper,r=e.popperRect,i=e.placement,s=e.offsets,a=e.position,f=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=s.y;var u=window.devicePixelRatio||1;e={x:D(D(s.x*u)/u)||0,y:D(D(e*u)/u)||0}}else e="function"==typeof e?e(s):s;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var h,m="left",b="top",v=window;if(l){var y=g(o),O="clientHeight",w="clientWidth";y===n(o)&&("static"!==p(y=c(o)).position&&(O="scrollHeight",w="scrollWidth")),"top"===i&&(b="bottom",u-=y[O]-r.height,u*=f?1:-1),"left"===i&&(m="right",e-=y[w]-r.width,e*=f?1:-1)}return o=Object.assign({position:a},l&&H),f?Object.assign(Object.assign({},o),{},((h={})[b]=s?"0":"",h[m]=d?"0":"",h.transform=2>(v.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",h)):Object.assign(Object.assign({},o),{},((t={})[b]=s?u+"px":"",t[m]=d?e+"px":"",t.transform="",t))}var L=["top","bottom","right","left"],P="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),W={placement:"bottom",modifiers:[],strategy:"absolute"},k={passive:!0},D=Math.round,H={top:"auto",right:"auto",bottom:"auto",left:"auto"},R=[{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,s=void 0===(e=e.resize)||e,a=n(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",o.update,k)})),s&&a.addEventListener("resize",o.update,k),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",o.update,k)})),s&&a.removeEventListener("resize",o.update,k)}},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,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),M(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),M(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(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]||{},r=t.elements[e];i(r)&&a(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&a(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]}],T=E({defaultModifiers:R});e.createPopper=T,e.defaultModifiers=R,e.detectOverflow=function(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,s=void 0===i?"clippingParents":i,a=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var f=o.altBoundary,p=void 0!==f&&f;o=function(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:function(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}(o,L));var l=e.elements.reference;f=e.rects.popper,s=w(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||c(e.elements.popper),s,a),p=x({reference:a=t(l),element:f,strategy:"absolute",placement:n}),f=y(Object.assign(Object.assign({},f),p)),a="popper"===i?f:a;var u={top:s.top-a.top+o.top,bottom:a.bottom-s.bottom+o.bottom,left:s.left-a.left+o.left,right:a.right-s.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u},e.popperGenerator=E,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="undefined"!=typeof globalThis?globalThis: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 o(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return{scrollLeft:(e=o(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof o(e).Element||e instanceof Element}function i(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function a(e){return e instanceof o(e).ShadowRoot||e instanceof ShadowRoot}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(f(e)).left+n(e).scrollLeft}function p(e){return o(e).getComputedStyle(e)}function l(e){return e=p(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,a){void 0===a&&(a=!1);var p=f(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(u||!u&&!a)&&(("body"!==s(r)||l(p))&&(d=r!==o(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:n(r)),i(r)?((h=t(r)).x+=r.clientLeft,h.y+=r.clientTop):p&&(h.x=c(p))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:h(d(e))}function m(e,t){var n;void 0===t&&(t=[]);var r=h(e);return e=r===(null==(n=e.ownerDocument)?void 0:n.body),n=o(r),r=e?[n].concat(n.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(m(d(r)))}function v(e){return i(e)&&"fixed"!==p(e).position?e.offsetParent:null}function g(e){for(var t=o(e),n=v(e);n&&0<=["table","td","th"].indexOf(s(n))&&"static"===p(n).position;)n=v(n);if(n&&("html"===s(n)||"body"===s(n)&&"static"===p(n).position))return t;if(!n)e:{for(n=navigator.userAgent.toLowerCase().includes("firefox"),e=d(e);i(e)&&0>["html","body"].indexOf(s(e));){var r=p(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||["transform","perspective"].includes(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter){n=e;break e}e=e.parentNode}n=null}return n||t}function b(e){function t(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){n.has(e)||(e=o.get(e))&&t(e)})),r.push(e)}var o=new Map,n=new Set,r=[];return e.forEach((function(e){o.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||t(e)})),r}function y(e){var t;return function(){return t||(t=new Promise((function(o){Promise.resolve().then((function(){t=void 0,o(e())}))}))),t}}function w(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function x(e,r){if("viewport"===r){r=o(e);var a=f(e);r=r.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;r&&(s=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=w(e={width:s,height:a,x:l+c(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=n(u),r=null==(a=u.ownerDocument)?void 0:a.body,a=k(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=k(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-s.scrollLeft+c(u),s=-s.scrollTop,"rtl"===p(r||e).direction&&(u+=k(e.clientWidth,r?r.clientWidth:0)-a),e=w({width:a,height:l,x:u,y:s}));return e}function O(e,t,o){return t="clippingParents"===t?function(e){var t=m(d(e)),o=0<=["absolute","fixed"].indexOf(p(e).position)&&i(e)?g(e):e;return r(o)?t.filter((function(e){var t;if(t=r(e))e:if(t=o.getRootNode&&o.getRootNode(),e.contains(o))t=!0;else{if(t&&a(t)){t=o;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==s(e)})):[]}(e):[].concat(t),(o=(o=[].concat(t,[o])).reduce((function(t,o){return o=x(e,o),t.top=k(o.top,t.top),t.right=T(o.right,t.right),t.bottom=T(o.bottom,t.bottom),t.left=k(o.left,t.left),t}),x(e,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function j(e){var t=e.reference,o=e.element,n=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2;switch(n){case"top":r={x:r,y:t.y-o.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-o.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(i="y"===n?"height":"width",e){case"start":r[n]-=t[i]/2-o[i]/2;break;case"end":r[n]+=t[i]/2-o[i]/2}return r}function E(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function L(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?H: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({},H,n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,s.options,i),s.scrollParents={reference:r(e)?m(e):e.contextElement?m(e.contextElement):[],popper:m(t)},i=function(e){var t=b(e);return W.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}(function(e){var t=e.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,o=e.options;o=void 0===o?{}:o,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:o}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(E(t,e=e.popper))for(s.rects={reference:u(t,g(e),"fixed"===s.options.strategy),popper:{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},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 o=s.orderedModifiers[t];e=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof e&&(s=e({state:s,options:n,name:o,instance:p})||s)}}},update:y((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return E(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function M(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var u=window.devicePixelRatio||1;e={x:D(D(a.x*u)/u)||0,y:D(D(e*u)/u)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var h,m="left",v="top",b=window;if(l){var y=g(n),w="clientHeight",x="clientWidth";y===o(n)&&("static"!==p(y=f(n)).position&&(w="scrollHeight",x="scrollWidth")),"top"===i&&(v="bottom",u-=y[w]-r.height,u*=c?1:-1),"left"===i&&(m="right",e-=y[x]-r.width,e*=c?1:-1)}return n=Object.assign({position:s},l&&S),c?Object.assign({},n,((h={})[v]=a?"0":"",h[m]=d?"0":"",h.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",h)):Object.assign({},n,((t={})[v]=a?u+"px":"",t[m]=d?e+"px":"",t.transform="",t))}var P=["top","bottom","right","left"],W="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),k=Math.max,T=Math.min,D=Math.round,H={placement:"bottom",modifiers:[],strategy:"absolute"},R={passive:!0},S={top:"auto",right:"auto",bottom:"auto",left:"auto"},A=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=o(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,R)})),a&&s.addEventListener("resize",n.update,R),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,R)})),a&&s.removeEventListener("resize",n.update,R)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=j({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,o=e.options;e=void 0===(e=o.gpuAcceleration)||e;var n=o.adaptive;n=void 0===n||n,o=void 0===(o=o.roundOffsets)||o,e={placement:t.placement.split("-")[0],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,M(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,M(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),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 o=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{}),i(n)&&s(n)&&(Object.assign(n.style,e),Object.keys(r).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}],C=L({defaultModifiers:A});e.createPopper=C,e.defaultModifiers=A,e.detectOverflow=function(e,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?e.placement:o;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 c=n.altBoundary,p=void 0!==c&&c;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof n?n:function(e,t){return t.reduce((function(t,o){return t[o]=e,t}),{})}(n,P));var l=e.elements.reference;c=e.rects.popper,a=O(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||f(e.elements.popper),a,s),p=j({reference:s=t(l),element:c,strategy:"absolute",placement:o}),c=w(Object.assign({},c,p)),s="popper"===i?c: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[o];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,o=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[o]*t}))}return u},e.popperGenerator=L,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-lite.min.js.map |
/** | ||
* @popperjs/core v2.8.0 - MIT License | ||
* @popperjs/core v2.8.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]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e instanceof n(e).ShadowRoot||e instanceof ShadowRoot}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(f(e)).left+r(e).scrollLeft}function p(e){return n(e).getComputedStyle(e)}function l(e){return e=p(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,o,a){void 0===a&&(a=!1);var p=f(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!a)&&(("body"!==s(o)||l(p))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):p&&(m.x=c(p))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function d(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function m(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e,t){var r;void 0===t&&(t=[]);var o=function e(t){return 0<=["html","body","#document"].indexOf(s(t))?t.ownerDocument.body:i(t)&&l(t)?t:e(m(t))}(e);return e=o===(null==(r=e.ownerDocument)?void 0:r.body),r=n(o),o=e?[r].concat(r.visualViewport||[],l(o)?o:[]):o,t=t.concat(o),e?t:t.concat(h(m(o)))}function g(e){return i(e)&&"fixed"!==p(e).position?e.offsetParent:null}function v(e){for(var t=n(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===p(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===p(r).position))return t;if(!r)e:{for(r=navigator.userAgent.toLowerCase().includes("firefox"),e=m(e);i(e)&&0>["html","body"].indexOf(s(e));){var o=p(e);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||["transform","perspective"].includes(o.willChange)||r&&"filter"===o.willChange||r&&o.filter&&"none"!==o.filter){r=e;break e}e=e.parentNode}r=null}return r||t}function b(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function y(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function O(e){return e.split("-")[0]}function w(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function x(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function j(e,o){if("viewport"===o){o=n(e);var a=f(e);o=o.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(s=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=x(e={width:s,height:a,x:l+c(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=r(u),o=null==(a=u.ownerDocument)?void 0:a.body,a=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-s.scrollLeft+c(u),s=-s.scrollTop,"rtl"===p(o||e).direction&&(u+=Math.max(e.clientWidth,o?o.clientWidth:0)-a),e=x({width:a,height:l,x:u,y:s}));return e}function M(e,t,n){return t="clippingParents"===t?function(e){var t=h(m(e)),n=0<=["absolute","fixed"].indexOf(p(e).position)&&i(e)?v(e):e;return o(n)?t.filter((function(e){return o(e)&&w(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=j(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),j(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function E(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function D(e){var t=e.reference,n=e.element,r=(e=e.placement)?O(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.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-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?E(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]-=t[i]/2-n[i]/2;break;case"end":o[r]+=t[i]/2-n[i]/2}return o}function L(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function P(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function k(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var c=r.altBoundary,p=void 0!==c&&c;r=L("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:P(r,q));var l=e.elements.reference;c=e.rects.popper,a=M(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||f(e.elements.popper),a,s),p=D({reference:s=t(l),element:c,strategy:"absolute",placement:n}),c=x(Object.assign(Object.assign({},c),p)),s="popper"===i?c:s;var u={top:a.top-s.top+r.top,bottom:s.bottom-a.bottom+r.bottom,left:a.left-s.left+r.left,right:s.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function W(){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 A(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?I:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},I),r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign(Object.assign(Object.assign({},r),s.options),i),s.scrollParents={reference:o(e)?h(e):e.contextElement?h(e.contextElement):[],popper:h(t)},i=function(e){var t=b(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:n}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(W(t,e=e.popper))for(s.rects={reference:u(t,v(e),"fixed"===s.options.strategy),popper:d(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 n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:p})||s)}}},update:y((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return W(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function B(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var u=window.devicePixelRatio||1;e={x:F(F(a.x*u)/u)||0,y:F(F(e*u)/u)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var m,h="left",g="top",b=window;if(l){var y=v(r),O="clientHeight",w="clientWidth";y===n(r)&&("static"!==p(y=f(r)).position&&(O="scrollHeight",w="scrollWidth")),"top"===i&&(g="bottom",u-=y[O]-o.height,u*=c?1:-1),"left"===i&&(h="right",e-=y[w]-o.width,e*=c?1:-1)}return r=Object.assign({position:s},l&&X),c?Object.assign(Object.assign({},r),{},((m={})[g]=a?"0":"",m[h]=d?"0":"",m.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",m)):Object.assign(Object.assign({},r),{},((t={})[g]=a?u+"px":"",t[h]=d?e+"px":"",t.transform="",t))}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return K[e]}))}function R(e){return e.replace(/start|end/g,(function(e){return Q[e]}))}function S(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function T(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],C=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),N=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),V="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),I={placement:"bottom",modifiers:[],strategy:"absolute"},_={passive:!0},U={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,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",r.update,_)})),a&&s.addEventListener("resize",r.update,_),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,_)})),a&&s.removeEventListener("resize",r.update,_)}},data:{}},z={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=D({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},F=Math.round,X={top:"auto",right:"auto",bottom:"auto",left:"auto"},Y={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var r=n.adaptive;r=void 0===r||r,n=void 0===(n=n.roundOffsets)||n,e={placement:O(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),B(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),B(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},G={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]||{},r=t.attributes[e]||{},o=t.elements[e];i(o)&&s(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},J={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=N.reduce((function(e,n){var o=t.rects,i=O(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign(Object.assign({},o),{},{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},K={left:"right",right:"left",bottom:"top",top:"bottom"},Q={start:"end",end:"start"},Z={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,c=n.altBoundary,p=n.flipVariations,l=void 0===p||p,u=n.allowedAutoPlacements;p=O(n=t.options.placement),i=i||(p!==n&&l?function(e){if("auto"===O(e))return[];var t=H(e);return[R(e),t,R(t)]}(n):[H(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===O(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?N:a,f=t.placement.split("-")[1];0===(i=(t=f?i?C:C.filter((function(e){return e.split("-")[1]===f})):q).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var c=i.reduce((function(t,i){return t[i]=k(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[O(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;p=!0;for(var h=d[0],g=0;g<d.length;g++){var v=d[g],b=O(v),y="start"===v.split("-")[1],w=0<=["top","bottom"].indexOf(b),x=w?"width":"height",j=k(t,{placement:v,boundary:s,rootBoundary:f,altBoundary:c,padding:a});if(y=w?y?"right":"left":y?"bottom":"top",n[x]>i[x]&&(y=H(y)),x=H(y),w=[],r&&w.push(0>=j[b]),o&&w.push(0>=j[y],0>=j[x]),w.every((function(e){return e}))){h=v,p=!1;break}m.set(v,w)}if(p)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},$={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r,i=void 0!==(r=n.altAxis)&&r;r=void 0===(r=n.tether)||r;var a=n.tetherOffset,s=void 0===a?0:a,f=k(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=O(t.placement);var c=t.placement.split("-")[1],p=!c,l=E(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):s;if(s={x:0,y:0},a){if(o||i){var g="y"===l?"top":"left",b="y"===l?"bottom":"right",y="y"===l?"height":"width",w=a[l],x=a[l]+f[g],j=a[l]-f[b],M=r?-m[y]/2:0,D="start"===c?u[y]:m[y];c="start"===c?-m[y]:-u[y],m=t.elements.arrow,m=r&&m?d(m):{width:0,height:0};var L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};g=L[g],b=L[b],m=Math.max(0,Math.min(u[y],m[y])),D=p?u[y]/2-M-m-g-h:D-m-g-h,u=p?-u[y]/2+M+m+b+h:c+m+b+h,p=t.elements.arrow&&v(t.elements.arrow),h=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,p=a[l]+D-h-(p?"y"===l?p.clientTop||0:p.clientLeft||0:0),u=a[l]+u-h,o&&(o=Math.max(r?Math.min(x,p):x,Math.min(w,r?Math.max(j,u):j)),a[l]=o,s[l]=o-w),i&&(i=(o=a[n])+f["x"===l?"top":"left"],f=o-f["x"===l?"bottom":"right"],r=Math.max(r?Math.min(i,p):i,Math.min(o,r?Math.max(f,u):f)),a[n]=r,s[n]=r-o)}t.modifiersData[e]=s}},requiresIfExists:["offset"]},ee={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=O(n.placement),a=E(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f=d(r),c="y"===a?"top":"left",p="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=v(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=Math.max(s[c],Math.min(l,r-f[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;w(t.elements.popper,r)&&(n="function"==typeof n?n(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):n,t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:L("number"!=typeof n?n:P(n,q))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=k(t,{elementContext:"reference"}),a=k(t,{altBoundary:!0});n=S(i,n),r=S(a,r,o),o=T(n),a=T(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":o,"data-popper-escaped":a})}},ne=A({defaultModifiers:[U,z,Y,G]}),re=[U,z,Y,G,J,Z,$,ee,te],oe=A({defaultModifiers:re});e.applyStyles=G,e.arrow=ee,e.computeStyles=Y,e.createPopper=oe,e.createPopperLite=ne,e.defaultModifiers=re,e.detectOverflow=k,e.eventListeners=U,e.flip=Z,e.hide=te,e.offset=J,e.popperGenerator=A,e.popperOffsets=z,e.preventOverflow=$,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="undefined"!=typeof globalThis?globalThis: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]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e instanceof n(e).ShadowRoot||e instanceof ShadowRoot}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return t(f(e)).left+r(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,o,a){void 0===a&&(a=!1);var c=f(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!a)&&(("body"!==s(o)||l(c))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):c&&(m.x=p(c))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function d(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function m(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:h(m(e))}function v(e,t){var r;void 0===t&&(t=[]);var o=h(e);return e=o===(null==(r=e.ownerDocument)?void 0:r.body),r=n(o),o=e?[r].concat(r.visualViewport||[],l(o)?o:[]):o,t=t.concat(o),e?t:t.concat(v(m(o)))}function g(e){return i(e)&&"fixed"!==c(e).position?e.offsetParent:null}function y(e){for(var t=n(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===c(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===c(r).position))return t;if(!r)e:{for(r=navigator.userAgent.toLowerCase().includes("firefox"),e=m(e);i(e)&&0>["html","body"].indexOf(s(e));){var o=c(e);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||["transform","perspective"].includes(o.willChange)||r&&"filter"===o.willChange||r&&o.filter&&"none"!==o.filter){r=e;break e}e=e.parentNode}r=null}return r||t}function b(e){function t(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){r.has(e)||(e=n.get(e))&&t(e)})),o.push(e)}var n=new Map,r=new Set,o=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||t(e)})),o}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,o){if("viewport"===o){o=n(e);var a=f(e);o=o.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(s=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=j(e={width:s,height:a,x:l+p(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=r(u),o=null==(a=u.ownerDocument)?void 0:a.body,a=_(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=_(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(o||e).direction&&(u+=_(e.clientWidth,o?o.clientWidth:0)-a),e=j({width:a,height:l,x:u,y:s}));return e}function D(e,t,n){return t="clippingParents"===t?function(e){var t=v(m(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?y(e):e;return o(n)?t.filter((function(e){return o(e)&&O(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=E(e,n),t.top=_(n.top,t.top),t.right=U(n.right,t.right),t.bottom=U(n.bottom,t.bottom),t.left=_(n.left,t.left),t}),E(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function L(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,r=(e=e.placement)?x(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.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-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?L(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]-=t[i]/2-n[i]/2;break;case"end":o[r]+=t[i]/2-n[i]/2}return o}function k(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function M(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function W(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var p=r.altBoundary,c=void 0!==p&&p;r=k("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:M(r,C));var l=e.elements.reference;p=e.rects.popper,a=D(o(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=t(l),element:p,strategy:"absolute",placement:n}),p=j(Object.assign({},p,c)),s="popper"===i?p:s;var u={top:a.top-s.top+r.top,bottom:s.bottom-a.bottom+r.bottom,left:a.left-s.left+r.left,right:s.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function A(){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 B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?F:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},F,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return a(),s.options=Object.assign({},r,s.options,i),s.scrollParents={reference:o(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=b(e);return I.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(A(t,e=e.popper))for(s.rects={reference:u(t,y(e),"fixed"===s.options.strategy),popper:d(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 n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:c})||s)}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return A(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),c):c}}function T(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,s=e.position,p=e.gpuAcceleration,l=e.adaptive;if(!0===(e=e.roundOffsets)){e=a.y;var u=window.devicePixelRatio||1;e={x:z(z(a.x*u)/u)||0,y:z(z(e*u)/u)||0}}else e="function"==typeof e?e(a):a;e=void 0===(e=(u=e).x)?0:e,u=void 0===(u=u.y)?0:u;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var m,h="left",v="top",g=window;if(l){var b=y(r),w="clientHeight",x="clientWidth";b===n(r)&&("static"!==c(b=f(r)).position&&(w="scrollHeight",x="scrollWidth")),"top"===i&&(v="bottom",u-=b[w]-o.height,u*=p?1:-1),"left"===i&&(h="right",e-=b[x]-o.width,e*=p?1:-1)}return r=Object.assign({position:s},l&&J),p?Object.assign({},r,((m={})[v]=a?"0":"",m[h]=d?"0":"",m.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",m)):Object.assign({},r,((t={})[v]=a?u+"px":"",t[h]=d?e+"px":"",t.transform="",t))}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return $[e]}))}function R(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function S(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var C=["top","bottom","right","left"],N=C.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),V=[].concat(C,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),I="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),_=Math.max,U=Math.min,z=Math.round,F={placement:"bottom",modifiers:[],strategy:"absolute"},X={passive:!0},Y={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,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",r.update,X)})),a&&s.addEventListener("resize",r.update,X),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,X)})),a&&s.removeEventListener("resize",r.update,X)}},data:{}},G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=P({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},J={top:"auto",right:"auto",bottom:"auto",left:"auto"},K={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var r=n.adaptive;r=void 0===r||r,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,T(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,T(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Q={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]||{},r=t.attributes[e]||{},o=t.elements[e];i(o)&&s(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},Z={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=V.reduce((function(e,n){var o=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign({},o,{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},$={left:"right",right:"left",bottom:"top",top:"bottom"},ee={start:"end",end:"start"},te={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=H(e);return[R(e),t,R(t)]}(n):[H(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?V:a,f=t.placement.split("-")[1];0===(i=(t=f?i?N:N.filter((function(e){return e.split("-")[1]===f})):C).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=W(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;c=!0;for(var h=d[0],v=0;v<d.length;v++){var g=d[v],y=x(g),b="start"===g.split("-")[1],w=0<=["top","bottom"].indexOf(y),O=w?"width":"height",j=W(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(b=w?b?"right":"left":b?"bottom":"top",n[O]>i[O]&&(b=H(b)),O=H(b),w=[],r&&w.push(0>=j[y]),o&&w.push(0>=j[b],0>=j[O]),w.every((function(e){return e}))){h=g,c=!1;break}m.set(g,w)}if(c)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ne={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r,i=void 0!==(r=n.altAxis)&&r;r=void 0===(r=n.tether)||r;var a=n.tetherOffset,s=void 0===a?0:a,f=W(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=x(t.placement);var p=t.placement.split("-")[1],c=!p,l=L(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=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},a){if(o||i){var v="y"===l?"top":"left",g="y"===l?"bottom":"right",b="y"===l?"height":"width",w=a[l],O=a[l]+f[v],j=a[l]-f[g],E=r?-m[b]/2:0,D="start"===p?u[b]:m[b];p="start"===p?-m[b]:-u[b],m=t.elements.arrow,m=r&&m?d(m):{width:0,height:0};var P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=P[v],g=P[g],m=_(0,U(u[b],m[b])),D=c?u[b]/2-E-m-v-h:D-m-v-h,u=c?-u[b]/2+E+m+g+h:p+m+g+h,c=t.elements.arrow&&y(t.elements.arrow),h=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,c=a[l]+D-h-(c?"y"===l?c.clientTop||0:c.clientLeft||0:0),u=a[l]+u-h,o&&(o=r?U(O,c):O,j=r?_(j,u):j,o=_(o,U(w,j)),a[l]=o,s[l]=o-w),i&&(o=(i=a[n])+f["x"===l?"top":"left"],f=i-f["x"===l?"bottom":"right"],o=r?U(o,c):o,r=r?_(f,u):f,r=_(o,U(i,r)),a[n]=r,s[n]=r-i)}t.modifiersData[e]=s}},requiresIfExists:["offset"]},re={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=x(n.placement),a=L(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f=d(r),p="y"===a?"top":"left",c="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=y(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=_(s[p],U(l,r-f[i]-s[c])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;O(t.elements.popper,r)&&(n="function"==typeof n?n(Object.assign({},t.rects,{placement:t.placement})):n,t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:k("number"!=typeof n?n:M(n,C))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},oe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=W(t,{elementContext:"reference"}),a=W(t,{altBoundary:!0});n=S(i,n),r=S(a,r,o),o=q(n),a=q(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}},ie=B({defaultModifiers:[Y,G,K,Q]}),ae=[Y,G,K,Q,Z,te,ne,re,oe],se=B({defaultModifiers:ae});e.applyStyles=Q,e.arrow=re,e.computeStyles=K,e.createPopper=se,e.createPopperLite=ie,e.defaultModifiers=ae,e.detectOverflow=W,e.eventListeners=Y,e.flip=te,e.hide=oe,e.offset=Z,e.popperGenerator=B,e.popperOffsets=G,e.preventOverflow=ne,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper.min.js.map |
@@ -51,3 +51,3 @@ import getCompositeRect from "./dom-utils/getCompositeRect.js"; | ||
orderedModifiers: [], | ||
options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions), | ||
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), | ||
modifiersData: {}, | ||
@@ -67,3 +67,3 @@ elements: { | ||
cleanupModifierEffects(); | ||
state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options); | ||
state.options = Object.assign({}, defaultOptions, state.options, options); | ||
state.scrollParents = { | ||
@@ -70,0 +70,0 @@ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], |
@@ -14,2 +14,3 @@ import { viewport } from "../enums.js"; | ||
import rectToClientRect from "../utils/rectToClientRect.js"; | ||
import { max, min } from "../utils/math.js"; | ||
@@ -59,6 +60,6 @@ function getInnerBoundingClientRect(element) { | ||
var rect = getClientRectFromMixedType(element, clippingParent); | ||
accRect.top = Math.max(rect.top, accRect.top); | ||
accRect.right = Math.min(rect.right, accRect.right); | ||
accRect.bottom = Math.min(rect.bottom, accRect.bottom); | ||
accRect.left = Math.max(rect.left, accRect.left); | ||
accRect.top = max(rect.top, accRect.top); | ||
accRect.right = min(rect.right, accRect.right); | ||
accRect.bottom = min(rect.bottom, accRect.bottom); | ||
accRect.left = max(rect.left, accRect.left); | ||
return accRect; | ||
@@ -65,0 +66,0 @@ }, getClientRectFromMixedType(element, firstClippingParent)); |
import getDocumentElement from "./getDocumentElement.js"; | ||
import getComputedStyle from "./getComputedStyle.js"; | ||
import getWindowScrollBarX from "./getWindowScrollBarX.js"; | ||
import getWindowScroll from "./getWindowScroll.js"; // Gets the entire size of the scrollable document area, even extending outside | ||
import getWindowScroll from "./getWindowScroll.js"; | ||
import { max } from "../utils/math.js"; // Gets the entire size of the scrollable document area, even extending outside | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -13,4 +14,4 @@ | ||
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; | ||
var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); | ||
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); | ||
var x = -winScroll.scrollLeft + getWindowScrollBarX(element); | ||
@@ -20,3 +21,3 @@ var y = -winScroll.scrollTop; | ||
if (getComputedStyle(body || html).direction === 'rtl') { | ||
x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
x += max(html.clientWidth, body ? body.clientWidth : 0) - width; | ||
} | ||
@@ -23,0 +24,0 @@ |
import { Window } from "../types"; | ||
export default function getNodeScroll(node: Node | Window): any; | ||
export default function getNodeScroll(node: Node | Window): { | ||
scrollLeft: any; | ||
scrollTop: any; | ||
}; |
@@ -84,3 +84,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
padding = typeof padding === 'function' ? padding(Object.assign(Object.assign({}, state.rects), {}, { | ||
padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { | ||
placement: state.placement | ||
@@ -87,0 +87,0 @@ })) : padding; |
@@ -6,5 +6,5 @@ import { top, left, right, bottom } from "../enums.js"; | ||
import getComputedStyle from "../dom-utils/getComputedStyle.js"; | ||
import getBasePlacement from "../utils/getBasePlacement.js"; // eslint-disable-next-line import/no-unused-modules | ||
import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import { round } from "../utils/math.js"; // eslint-disable-next-line import/no-unused-modules | ||
var round = Math.round; | ||
var unsetSides = { | ||
@@ -72,3 +72,3 @@ top: 'auto', | ||
if (placement === top) { | ||
sideY = bottom; // $FlowFixMe | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
@@ -80,3 +80,3 @@ y -= offsetParent[heightProp] - popperRect.height; | ||
if (placement === left) { | ||
sideX = right; // $FlowFixMe | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
@@ -95,6 +95,6 @@ x -= offsetParent[widthProp] - popperRect.width; | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); | ||
} | ||
return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); | ||
} | ||
@@ -130,3 +130,3 @@ | ||
if (state.modifiersData.popperOffsets != null) { | ||
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.popperOffsets, | ||
@@ -140,3 +140,3 @@ position: state.options.strategy, | ||
if (state.modifiersData.arrow != null) { | ||
state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, { | ||
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { | ||
offsets: state.modifiersData.arrow, | ||
@@ -149,3 +149,3 @@ position: 'absolute', | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-placement': state.placement | ||
@@ -152,0 +152,0 @@ }); |
@@ -48,3 +48,3 @@ import { top, bottom, left, right } from "../enums.js"; | ||
}; | ||
state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, { | ||
state.attributes.popper = Object.assign({}, state.attributes.popper, { | ||
'data-popper-reference-hidden': isReferenceHidden, | ||
@@ -51,0 +51,0 @@ 'data-popper-escaped': hasPopperEscaped |
@@ -7,3 +7,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, { | ||
var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { | ||
placement: placement | ||
@@ -10,0 +10,0 @@ })) : offset, |
@@ -11,2 +11,3 @@ import { top, left, right, bottom, start } from "../enums.js"; | ||
import getFreshSideObject from "../utils/getFreshSideObject.js"; | ||
import { max as mathMax, min as mathMin } from "../utils/math.js"; | ||
@@ -43,3 +44,3 @@ function preventOverflow(_ref) { | ||
var popperRect = state.rects.popper; | ||
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, { | ||
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { | ||
placement: state.placement | ||
@@ -91,3 +92,3 @@ })) : tetherOffset; | ||
if (checkMainAxis) { | ||
var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max); | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
@@ -108,3 +109,3 @@ data[mainAxis] = preventedOffset - offset; | ||
var _preventedOffset = within(tether ? Math.min(_min, tetherMin) : _min, _offset, tether ? Math.max(_max, tetherMax) : _max); | ||
var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max); | ||
@@ -111,0 +112,0 @@ popperOffsets[altAxis] = _preventedOffset; |
@@ -1,1 +0,1 @@ | ||
export default function debounce<T>(fn: Function): () => Promise<T>; | ||
export default function debounce<T>(fn: (...args: Array<any>) => any): () => Promise<T>; |
@@ -42,3 +42,3 @@ import getBoundingClientRect from "../dom-utils/getBoundingClientRect.js"; | ||
}); | ||
var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets)); | ||
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); | ||
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect | ||
@@ -45,0 +45,0 @@ // 0 or negative = within the clipping rect |
export default function mergeByName(modifiers) { | ||
var merged = modifiers.reduce(function (merged, current) { | ||
var existing = merged[current.name]; | ||
merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, { | ||
options: Object.assign(Object.assign({}, existing.options), current.options), | ||
data: Object.assign(Object.assign({}, existing.data), current.data) | ||
merged[current.name] = existing ? Object.assign({}, existing, current, { | ||
options: Object.assign({}, existing.options, current.options), | ||
data: Object.assign({}, existing.data, current.data) | ||
}) : current; | ||
@@ -8,0 +8,0 @@ return merged; |
import getFreshSideObject from "./getFreshSideObject.js"; | ||
export default function mergePaddingObject(paddingObject) { | ||
return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject); | ||
return Object.assign({}, getFreshSideObject(), paddingObject); | ||
} |
export default function rectToClientRect(rect) { | ||
return Object.assign(Object.assign({}, rect), {}, { | ||
return Object.assign({}, rect, { | ||
left: rect.x, | ||
@@ -4,0 +4,0 @@ top: rect.y, |
@@ -0,3 +1,4 @@ | ||
import { max as mathMax, min as mathMin } from "./math.js"; | ||
export default function within(min, value, max) { | ||
return Math.max(min, Math.min(value, max)); | ||
return mathMax(min, mathMin(value, max)); | ||
} |
{ | ||
"name": "@popperjs/core", | ||
"version": "2.8.0", | ||
"version": "2.8.1", | ||
"description": "Tooltip and Popover Positioning Engine", | ||
@@ -47,3 +47,4 @@ "main": "dist/cjs/popper.js", | ||
"build:typescript": "rimraf dist/typescript; flow-to-ts \"src/**/*.js\" --write --inline-utility-types; tsc-silent --project .config/tsconfig.json --createSourceFile .config/createSourceFile.js --suppress @; rimraf \"src/**/*.ts\"", | ||
"prepublishOnly": "yarn build" | ||
"prepublishOnly": "yarn build", | ||
"postinstall": "husky install .config/husky" | ||
}, | ||
@@ -71,16 +72,16 @@ "prettier": { | ||
"devDependencies": { | ||
"@ampproject/rollup-plugin-closure-compiler": "^0.25.2", | ||
"@ampproject/rollup-plugin-closure-compiler": "^0.26.0", | ||
"@atomico/rollup-plugin-sizes": "^1.1.4", | ||
"@babel/cli": "^7.8.3", | ||
"@babel/core": "^7.7.5", | ||
"@babel/plugin-transform-flow-strip-types": "^7.7.4", | ||
"@babel/plugin-transform-runtime": "^7.7.6", | ||
"@babel/preset-env": "^7.7.6", | ||
"@babel/cli": "^7.12.17", | ||
"@babel/core": "^7.12.17", | ||
"@babel/plugin-transform-flow-strip-types": "^7.12.13", | ||
"@babel/plugin-transform-runtime": "^7.12.17", | ||
"@babel/preset-env": "^7.12.17", | ||
"@fezvrasta/tsc-silent": "^1.3.0", | ||
"@khanacademy/flow-to-ts": "^0.1.7", | ||
"@rollup/plugin-babel": "^5.0.0", | ||
"@rollup/plugin-replace": "^2.3.2", | ||
"@khanacademy/flow-to-ts": "^0.1.9", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-replace": "^2.3.4", | ||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^25.5.1", | ||
"babel-plugin-add-import-extension": "^1.3.0", | ||
"babel-jest": "^26.6.3", | ||
"babel-plugin-add-import-extension": "^1.4.4", | ||
"babel-plugin-annotate-pure-calls": "^0.4.0", | ||
@@ -90,30 +91,30 @@ "babel-plugin-dev-expression": "^0.2.2", | ||
"babel-plugin-transform-inline-environment-variables": "^0.4.3", | ||
"concurrently": "^5.2.0", | ||
"concurrently": "^5.3.0", | ||
"dotenv": "^8.2.0", | ||
"eslint": "^6.8.0", | ||
"eslint-plugin-flowtype": "^4.6.0", | ||
"eslint-plugin-import": "^2.20.0", | ||
"eslint-plugin-unused-imports": "^0.1.2", | ||
"eslint": "^7.20.0", | ||
"eslint-plugin-flowtype": "^5.2.2", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-unused-imports": "^1.1.0", | ||
"flow-bin": "^0.139.0", | ||
"flow-copy-source": "^2.0.9", | ||
"get-port-cli": "^2.0.0", | ||
"husky": "^4.2.1", | ||
"jest": "^25.5.1", | ||
"husky": "^5.0.9", | ||
"jest": "^26.6.3", | ||
"jest-environment-jsdom-sixteen": "^1.0.3", | ||
"jest-environment-puppeteer": "^4.4.0", | ||
"jest-image-snapshot": "^3.1.0", | ||
"jest-image-snapshot": "^4.3.0", | ||
"jest-puppeteer": "^4.4.0", | ||
"poster": "^0.0.9", | ||
"prettier": "^2.0.5", | ||
"pretty-quick": "^2.0.1", | ||
"puppeteer": "^3.0.2", | ||
"replace-in-files-cli": "^0.3.1", | ||
"rollup": "^2.7.3", | ||
"prettier": "^2.2.1", | ||
"pretty-quick": "^3.1.0", | ||
"puppeteer": "^7.1.0", | ||
"replace-in-files-cli": "^1.0.0", | ||
"rollup": "^2.39.0", | ||
"rollup-plugin-flow-entry": "^0.3.3", | ||
"rollup-plugin-license": "^2.0.0", | ||
"rollup-plugin-terser": "^5.2.0", | ||
"rollup-plugin-visualizer": "^4.0.3", | ||
"serve": "^11.3.0", | ||
"typescript": "^3.7.5" | ||
"rollup-plugin-license": "^2.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-visualizer": "^4.2.0", | ||
"serve": "^11.3.2", | ||
"typescript": "^4.1.5" | ||
} | ||
} |
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 too big to display
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 too big to display
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1487298
272
11121
1