: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const max = crossAxisCoord - overflow[maxSide];
crossAxisCoord = clamp(min, crossAxisCoord, max);
const limitedCoords = limiter.fn({
[mainAxis]: mainAxisCoord,
[crossAxis]: crossAxisCoord
* Built-in `limiter` that will stop `shift()` at a certain point.
const limitShift = function (options) {
if (options === void 0) {
mainAxis: checkMainAxis = true,
crossAxis: checkCrossAxis = true
} = floating_ui_utils_evaluate(options, state);
const crossAxis = floating_ui_utils_getSideAxis(placement);
const mainAxis = getOppositeAxis(crossAxis);
let mainAxisCoord = coords[mainAxis];
let crossAxisCoord = coords[crossAxis];
const rawOffset = floating_ui_utils_evaluate(offset, state);
const computedOffset = typeof rawOffset === 'number' ? {
const len = mainAxis === 'y' ? 'height' : 'width';
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
if (mainAxisCoord < limitMin) {
mainAxisCoord = limitMin;
} else if (mainAxisCoord > limitMax) {
mainAxisCoord = limitMax;
var _middlewareData$offse, _middlewareData$offse2;
const len = mainAxis === 'y' ? 'width' : 'height';
const isOriginSide = ['top', 'left'].includes(floating_ui_utils_getSide(placement));
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
if (crossAxisCoord < limitMin) {
crossAxisCoord = limitMin;
} else if (crossAxisCoord > limitMax) {
crossAxisCoord = limitMax;
[mainAxis]: mainAxisCoord,
[crossAxis]: crossAxisCoord
* Provides data that allows you to change the size of the floating element —
* for instance, prevent it from overflowing the clipping boundary or match the
* width of the reference element.
* @see https://floating-ui.com/docs/size
const size = function (options) {
if (options === void 0) {
} = floating_ui_utils_evaluate(options, state);
const overflow = await detectOverflow(state, detectOverflowOptions);
const side = floating_ui_utils_getSide(placement);
const alignment = floating_ui_utils_getAlignment(placement);
const isYAxis = floating_ui_utils_getSideAxis(placement) === 'y';
if (side === 'top' || side === 'bottom') {
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
heightSide = alignment === 'end' ? 'top' : 'bottom';
const overflowAvailableHeight = height - overflow[heightSide];
const overflowAvailableWidth = width - overflow[widthSide];
const noShift = !state.middlewareData.shift;
let availableHeight = overflowAvailableHeight;
let availableWidth = overflowAvailableWidth;
const maximumClippingWidth = width - overflow.left - overflow.right;
availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
const maximumClippingHeight = height - overflow.top - overflow.bottom;
availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
if (noShift && !alignment) {
const xMin = floating_ui_utils_max(overflow.left, 0);
const xMax = floating_ui_utils_max(overflow.right, 0);
const yMin = floating_ui_utils_max(overflow.top, 0);
const yMax = floating_ui_utils_max(overflow.bottom, 0);
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : floating_ui_utils_max(overflow.left, overflow.right));
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : floating_ui_utils_max(overflow.top, overflow.bottom));
const nextDimensions = await platform.getDimensions(elements.floating);
if (width !== nextDimensions.width || height !== nextDimensions.height) {
;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
* Custom positioning reference element.
* @see https://floating-ui.com/docs/virtual-elements
const dist_floating_ui_utils_sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left']));
const floating_ui_utils_alignments = (/* unused pure expression or super */ null && (['start', 'end']));
const dist_floating_ui_utils_placements = /*#__PURE__*/(/* unused pure expression or super */ null && (dist_floating_ui_utils_sides.reduce((acc, side) => acc.concat(side, side + "-" + floating_ui_utils_alignments[0], side + "-" + floating_ui_utils_alignments[1]), [])));
const dist_floating_ui_utils_min = Math.min;
const dist_floating_ui_utils_max = Math.max;
const floating_ui_utils_round = Math.round;
const floating_ui_utils_floor = Math.floor;
const floating_ui_utils_createCoords = v => ({
const floating_ui_utils_oppositeSideMap = {
const floating_ui_utils_oppositeAlignmentMap = {
function floating_ui_utils_clamp(start, value, end) {
return dist_floating_ui_utils_max(start, dist_floating_ui_utils_min(value, end));
function dist_floating_ui_utils_evaluate(value, param) {
return typeof value === 'function' ? value(param) : value;
function dist_floating_ui_utils_getSide(placement) {
return placement.split('-')[0];
function dist_floating_ui_utils_getAlignment(placement) {
return placement.split('-')[1];
function floating_ui_utils_getOppositeAxis(axis) {
return axis === 'x' ? 'y' : 'x';
function floating_ui_utils_getAxisLength(axis) {
return axis === 'y' ? 'height' : 'width';
function dist_floating_ui_utils_getSideAxis(placement) {
return ['top', 'bottom'].includes(dist_floating_ui_utils_getSide(placement)) ? 'y' : 'x';
function floating_ui_utils_getAlignmentAxis(placement) {
return floating_ui_utils_getOppositeAxis(dist_floating_ui_utils_getSideAxis(placement));
function dist_floating_ui_utils_getAlignmentSides(placement, rects, rtl) {
const alignment = dist_floating_ui_utils_getAlignment(placement);
const alignmentAxis = floating_ui_utils_getAlignmentAxis(placement);
const length = floating_ui_utils_getAxisLength(alignmentAxis);
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
if (rects.reference[length] > rects.floating[length]) {
mainAlignmentSide = floating_ui_utils_getOppositePlacement(mainAlignmentSide);
return [mainAlignmentSide, floating_ui_utils_getOppositePlacement(mainAlignmentSide)];
function floating_ui_utils_getExpandedPlacements(placement) {
const oppositePlacement = floating_ui_utils_getOppositePlacement(placement);
return [dist_floating_ui_utils_getOppositeAlignmentPlacement(placement), oppositePlacement, dist_floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)];
function dist_floating_ui_utils_getOppositeAlignmentPlacement(placement) {
return placement.replace(/start|end/g, alignment => floating_ui_utils_oppositeAlignmentMap[alignment]);
function floating_ui_utils_getSideList(side, isStart, rtl) {
const lr = ['left', 'right'];
const rl = ['right', 'left'];
const tb = ['top', 'bottom'];
const bt = ['bottom', 'top'];
if (rtl) return isStart ? rl : lr;
return isStart ? lr : rl;
return isStart ? tb : bt;
function floating_ui_utils_getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
const alignment = dist_floating_ui_utils_getAlignment(placement);
let list = floating_ui_utils_getSideList(dist_floating_ui_utils_getSide(placement), direction === 'start', rtl);
list = list.map(side => side + "-" + alignment);
list = list.concat(list.map(dist_floating_ui_utils_getOppositeAlignmentPlacement));
function floating_ui_utils_getOppositePlacement(placement) {
return placement.replace(/left|right|bottom|top/g, side => floating_ui_utils_oppositeSideMap[side]);
function floating_ui_utils_expandPaddingObject(padding) {
function dist_floating_ui_utils_getPaddingObject(padding) {
return typeof padding !== 'number' ? floating_ui_utils_expandPaddingObject(padding) : {
function dist_floating_ui_utils_rectToClientRect(rect) {
right: rect.x + rect.width,
bottom: rect.y + rect.height
;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
function getNodeName(node) {
return (node.nodeName || '').toLowerCase();
// Mocked nodes in testing environments may not be instances of Node. By
// returning `#document` an infinite loop won't occur.
// https://github.com/floating-ui/floating-ui/issues/2317
function floating_ui_utils_dom_getWindow(node) {
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
function getDocumentElement(node) {
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
return value instanceof Node || value instanceof floating_ui_utils_dom_getWindow(value).Node;
function isElement(value) {
return value instanceof Element || value instanceof floating_ui_utils_dom_getWindow(value).Element;
function isHTMLElement(value) {
return value instanceof HTMLElement || value instanceof floating_ui_utils_dom_getWindow(value).HTMLElement;
function isShadowRoot(value) {
// Browsers without `ShadowRoot` support.
if (typeof ShadowRoot === 'undefined') {
return value instanceof ShadowRoot || value instanceof floating_ui_utils_dom_getWindow(value).ShadowRoot;
function isOverflowElement(element) {
} = floating_ui_utils_dom_getComputedStyle(element);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
function isTableElement(element) {
return ['table', 'td', 'th'].includes(getNodeName(element));
function isContainingBlock(element) {
const webkit = isWebKit();
const css = floating_ui_utils_dom_getComputedStyle(element);
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
function getContainingBlock(element) {
let currentNode = getParentNode(element);
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
if (isContainingBlock(currentNode)) {
currentNode = getParentNode(currentNode);
if (typeof CSS === 'undefined' || !CSS.supports) return false;
return CSS.supports('-webkit-backdrop-filter', 'none');
function isLastTraversableNode(node) {
return ['html', 'body', '#document'].includes(getNodeName(node));
function floating_ui_utils_dom_getComputedStyle(element) {
return floating_ui_utils_dom_getWindow(element).getComputedStyle(element);
function getNodeScroll(element) {
if (isElement(element)) {
scrollLeft: element.scrollLeft,
scrollTop: element.scrollTop
scrollLeft: element.pageXOffset,
scrollTop: element.pageYOffset
function getParentNode(node) {
if (getNodeName(node) === 'html') {
// Step into the shadow DOM of the parent of a slotted node.
isShadowRoot(node) && node.host ||
getDocumentElement(node);
return isShadowRoot(result) ? result.host : result;
function getNearestOverflowAncestor(node) {
const parentNode = getParentNode(node);
if (isLastTraversableNode(parentNode)) {
return node.ownerDocument ? node.ownerDocument.body : node.body;
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
return getNearestOverflowAncestor(parentNode);
function getOverflowAncestors(node, list, traverseIframes) {
var _node$ownerDocument2;
if (traverseIframes === void 0) {
const scrollableAncestor = getNearestOverflowAncestor(node);
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
const win = floating_ui_utils_dom_getWindow(scrollableAncestor);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
function getCssDimensions(element) {
const css = floating_ui_utils_dom_getComputedStyle(element);
// In testing environments, the `width` and `height` properties are empty
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
let width = parseFloat(css.width) || 0;
let height = parseFloat(css.height) || 0;
const hasOffset = isHTMLElement(element);
const offsetWidth = hasOffset ? element.offsetWidth : width;
const offsetHeight = hasOffset ? element.offsetHeight : height;
const shouldFallback = floating_ui_utils_round(width) !== offsetWidth || floating_ui_utils_round(height) !== offsetHeight;
function unwrapElement(element) {
return !isElement(element) ? element.contextElement : element;
function getScale(element) {
const domElement = unwrapElement(element);
if (!isHTMLElement(domElement)) {
return floating_ui_utils_createCoords(1);
const rect = domElement.getBoundingClientRect();
} = getCssDimensions(domElement);
let x = ($ ? floating_ui_utils_round(rect.width) : rect.width) / width;
let y = ($ ? floating_ui_utils_round(rect.height) : rect.height) / height;
// 0, NaN, or Infinity should always fallback to 1.
if (!x || !Number.isFinite(x)) {
if (!y || !Number.isFinite(y)) {
const noOffsets = /*#__PURE__*/floating_ui_utils_createCoords(0);
function getVisualOffsets(element) {
const win = floating_ui_utils_dom_getWindow(element);
if (!isWebKit() || !win.visualViewport) {
x: win.visualViewport.offsetLeft,