@zextras/carbonio-design-system 12.0.2 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { withEmotionCache, ThemeContext, useTheme as useTheme$1, css, keyframes, ThemeProvider as ThemeProvider$1, Global } from '@emotion/react';
1
+ import { withEmotionCache, ThemeContext, css, useTheme as useTheme$1, keyframes, ThemeProvider as ThemeProvider$1, Global } from '@emotion/react';
2
2
  export { ThemeContext } from '@emotion/react';
3
3
  import * as React from 'react';
4
4
  import React__default, { useMemo, useRef, useEffect, useState, useCallback, useLayoutEffect, cloneElement, createRef, forwardRef, useReducer, Component, createElement, createContext, useContext } from 'react';
5
- import { reduce, map, isMatch, omit, trim, slice, filter, debounce, isEmpty, uniq, head, drop, last, noop } from 'lodash';
5
+ import { reduce, map, isMatch, omit, trim, slice, filter, debounce, isEmpty, uniq, head, drop, last, noop as noop$1 } from 'lodash';
6
6
  import * as ReactDOM from 'react-dom';
7
7
  import ReactDOM__default from 'react-dom';
8
8
 
@@ -416,7 +416,7 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
416
416
  };
417
417
 
418
418
  // eslint-disable-next-line no-undef
419
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
419
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
420
420
 
421
421
  var isPropValid = /* #__PURE__ */memoize(function (prop) {
422
422
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
@@ -3683,7 +3683,9 @@ function hslToHex(hue, saturation, lightness) {
3683
3683
  * }
3684
3684
  */
3685
3685
  function hsl(value, saturation, lightness) {
3686
- if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
3686
+ if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
3687
+ return hslToHex(value, saturation, lightness);
3688
+ } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
3687
3689
  return hslToHex(value.hue, value.saturation, value.lightness);
3688
3690
  }
3689
3691
  throw new PolishedError(1);
@@ -3716,7 +3718,9 @@ function hsl(value, saturation, lightness) {
3716
3718
  * }
3717
3719
  */
3718
3720
  function hsla(value, saturation, lightness, alpha) {
3719
- if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
3721
+ if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
3722
+ return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
3723
+ } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
3720
3724
  return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
3721
3725
  }
3722
3726
  throw new PolishedError(2);
@@ -4766,10 +4770,6 @@ const oppositeSideMap = {
4766
4770
  bottom: 'top',
4767
4771
  top: 'bottom'
4768
4772
  };
4769
- const oppositeAlignmentMap = {
4770
- start: 'end',
4771
- end: 'start'
4772
- };
4773
4773
  function clamp(start, value, end) {
4774
4774
  return max$1(start, min$1(value, end));
4775
4775
  }
@@ -4789,7 +4789,8 @@ function getAxisLength(axis) {
4789
4789
  return axis === 'y' ? 'height' : 'width';
4790
4790
  }
4791
4791
  function getSideAxis(placement) {
4792
- return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
4792
+ const firstChar = placement[0];
4793
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
4793
4794
  }
4794
4795
  function getAlignmentAxis(placement) {
4795
4796
  return getOppositeAxis(getSideAxis(placement));
@@ -4812,21 +4813,21 @@ function getExpandedPlacements(placement) {
4812
4813
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
4813
4814
  }
4814
4815
  function getOppositeAlignmentPlacement(placement) {
4815
- return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
4816
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
4816
4817
  }
4818
+ const lrPlacement = ['left', 'right'];
4819
+ const rlPlacement = ['right', 'left'];
4820
+ const tbPlacement = ['top', 'bottom'];
4821
+ const btPlacement = ['bottom', 'top'];
4817
4822
  function getSideList(side, isStart, rtl) {
4818
- const lr = ['left', 'right'];
4819
- const rl = ['right', 'left'];
4820
- const tb = ['top', 'bottom'];
4821
- const bt = ['bottom', 'top'];
4822
4823
  switch (side) {
4823
4824
  case 'top':
4824
4825
  case 'bottom':
4825
- if (rtl) return isStart ? rl : lr;
4826
- return isStart ? lr : rl;
4826
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
4827
+ return isStart ? lrPlacement : rlPlacement;
4827
4828
  case 'left':
4828
4829
  case 'right':
4829
- return isStart ? tb : bt;
4830
+ return isStart ? tbPlacement : btPlacement;
4830
4831
  default:
4831
4832
  return [];
4832
4833
  }
@@ -4843,7 +4844,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
4843
4844
  return list;
4844
4845
  }
4845
4846
  function getOppositePlacement(placement) {
4846
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
4847
+ const side = getSide(placement);
4848
+ return oppositeSideMap[side] + placement.slice(side.length);
4847
4849
  }
4848
4850
  function expandPaddingObject(padding) {
4849
4851
  return {
@@ -4937,6 +4939,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
4937
4939
  return coords;
4938
4940
  }
4939
4941
 
4942
+ /**
4943
+ * Resolves with an object of overflow side offsets that determine how much the
4944
+ * element is overflowing a given clipping boundary on each side.
4945
+ * - positive = overflowing the boundary by that number of pixels
4946
+ * - negative = how many pixels left before it will overflow
4947
+ * - 0 = lies flush with the boundary
4948
+ * @see https://floating-ui.com/docs/detectOverflow
4949
+ */
4950
+ async function detectOverflow(state, options) {
4951
+ var _await$platform$isEle;
4952
+ if (options === void 0) {
4953
+ options = {};
4954
+ }
4955
+ const {
4956
+ x,
4957
+ y,
4958
+ platform,
4959
+ rects,
4960
+ elements,
4961
+ strategy
4962
+ } = state;
4963
+ const {
4964
+ boundary = 'clippingAncestors',
4965
+ rootBoundary = 'viewport',
4966
+ elementContext = 'floating',
4967
+ altBoundary = false,
4968
+ padding = 0
4969
+ } = evaluate(options, state);
4970
+ const paddingObject = getPaddingObject(padding);
4971
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
4972
+ const element = elements[altBoundary ? altContext : elementContext];
4973
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
4974
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
4975
+ boundary,
4976
+ rootBoundary,
4977
+ strategy
4978
+ }));
4979
+ const rect = elementContext === 'floating' ? {
4980
+ x,
4981
+ y,
4982
+ width: rects.floating.width,
4983
+ height: rects.floating.height
4984
+ } : rects.reference;
4985
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
4986
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
4987
+ x: 1,
4988
+ y: 1
4989
+ } : {
4990
+ x: 1,
4991
+ y: 1
4992
+ };
4993
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
4994
+ elements,
4995
+ rect,
4996
+ offsetParent,
4997
+ strategy
4998
+ }) : rect);
4999
+ return {
5000
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
5001
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
5002
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
5003
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
5004
+ };
5005
+ }
5006
+
5007
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
5008
+ const MAX_RESET_COUNT = 50;
5009
+
4940
5010
  /**
4941
5011
  * Computes the `x` and `y` coordinates that will place the floating element
4942
5012
  * next to a given reference element.
@@ -4944,14 +5014,17 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
4944
5014
  * This export does not have any `platform` interface logic. You will need to
4945
5015
  * write one for the platform you are using Floating UI with.
4946
5016
  */
4947
- const computePosition$1 = async (reference, floating, config) => {
5017
+ const computePosition$2 = async (reference, floating, config) => {
4948
5018
  const {
4949
5019
  placement = 'bottom',
4950
5020
  strategy = 'absolute',
4951
5021
  middleware = [],
4952
5022
  platform
4953
5023
  } = config;
4954
- const validMiddleware = middleware.filter(Boolean);
5024
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
5025
+ ...platform,
5026
+ detectOverflow
5027
+ };
4955
5028
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
4956
5029
  let rects = await platform.getElementRects({
4957
5030
  reference,
@@ -4963,13 +5036,17 @@ const computePosition$1 = async (reference, floating, config) => {
4963
5036
  y
4964
5037
  } = computeCoordsFromPlacement(rects, placement, rtl);
4965
5038
  let statefulPlacement = placement;
4966
- let middlewareData = {};
4967
5039
  let resetCount = 0;
4968
- for (let i = 0; i < validMiddleware.length; i++) {
5040
+ const middlewareData = {};
5041
+ for (let i = 0; i < middleware.length; i++) {
5042
+ const currentMiddleware = middleware[i];
5043
+ if (!currentMiddleware) {
5044
+ continue;
5045
+ }
4969
5046
  const {
4970
5047
  name,
4971
5048
  fn
4972
- } = validMiddleware[i];
5049
+ } = currentMiddleware;
4973
5050
  const {
4974
5051
  x: nextX,
4975
5052
  y: nextY,
@@ -4983,7 +5060,7 @@ const computePosition$1 = async (reference, floating, config) => {
4983
5060
  strategy,
4984
5061
  middlewareData,
4985
5062
  rects,
4986
- platform,
5063
+ platform: platformWithDetectOverflow,
4987
5064
  elements: {
4988
5065
  reference,
4989
5066
  floating
@@ -4991,14 +5068,11 @@ const computePosition$1 = async (reference, floating, config) => {
4991
5068
  });
4992
5069
  x = nextX != null ? nextX : x;
4993
5070
  y = nextY != null ? nextY : y;
4994
- middlewareData = {
4995
- ...middlewareData,
4996
- [name]: {
4997
- ...middlewareData[name],
4998
- ...data
4999
- }
5071
+ middlewareData[name] = {
5072
+ ...middlewareData[name],
5073
+ ...data
5000
5074
  };
5001
- if (reset && resetCount <= 50) {
5075
+ if (reset && resetCount < MAX_RESET_COUNT) {
5002
5076
  resetCount++;
5003
5077
  if (typeof reset === 'object') {
5004
5078
  if (reset.placement) {
@@ -5028,71 +5102,6 @@ const computePosition$1 = async (reference, floating, config) => {
5028
5102
  };
5029
5103
  };
5030
5104
 
5031
- /**
5032
- * Resolves with an object of overflow side offsets that determine how much the
5033
- * element is overflowing a given clipping boundary on each side.
5034
- * - positive = overflowing the boundary by that number of pixels
5035
- * - negative = how many pixels left before it will overflow
5036
- * - 0 = lies flush with the boundary
5037
- * @see https://floating-ui.com/docs/detectOverflow
5038
- */
5039
- async function detectOverflow(state, options) {
5040
- var _await$platform$isEle;
5041
- if (options === void 0) {
5042
- options = {};
5043
- }
5044
- const {
5045
- x,
5046
- y,
5047
- platform,
5048
- rects,
5049
- elements,
5050
- strategy
5051
- } = state;
5052
- const {
5053
- boundary = 'clippingAncestors',
5054
- rootBoundary = 'viewport',
5055
- elementContext = 'floating',
5056
- altBoundary = false,
5057
- padding = 0
5058
- } = evaluate(options, state);
5059
- const paddingObject = getPaddingObject(padding);
5060
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
5061
- const element = elements[altBoundary ? altContext : elementContext];
5062
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
5063
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
5064
- boundary,
5065
- rootBoundary,
5066
- strategy
5067
- }));
5068
- const rect = elementContext === 'floating' ? {
5069
- x,
5070
- y,
5071
- width: rects.floating.width,
5072
- height: rects.floating.height
5073
- } : rects.reference;
5074
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
5075
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
5076
- x: 1,
5077
- y: 1
5078
- } : {
5079
- x: 1,
5080
- y: 1
5081
- };
5082
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
5083
- elements,
5084
- rect,
5085
- offsetParent,
5086
- strategy
5087
- }) : rect);
5088
- return {
5089
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
5090
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
5091
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
5092
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
5093
- };
5094
- }
5095
-
5096
5105
  /**
5097
5106
  * Provides data to position an inner element of the floating element so that it
5098
5107
  * appears centered to the reference element.
@@ -5181,7 +5190,7 @@ const arrow$3 = options => ({
5181
5190
  * clipping boundary. Alternative to `autoPlacement`.
5182
5191
  * @see https://floating-ui.com/docs/flip
5183
5192
  */
5184
- const flip$2 = function (options) {
5193
+ const flip$3 = function (options) {
5185
5194
  if (options === void 0) {
5186
5195
  options = {};
5187
5196
  }
@@ -5225,7 +5234,7 @@ const flip$2 = function (options) {
5225
5234
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
5226
5235
  }
5227
5236
  const placements = [initialPlacement, ...fallbackPlacements];
5228
- const overflow = await detectOverflow(state, detectOverflowOptions);
5237
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
5229
5238
  const overflows = [];
5230
5239
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
5231
5240
  if (checkMainAxis) {
@@ -5246,16 +5255,22 @@ const flip$2 = function (options) {
5246
5255
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
5247
5256
  const nextPlacement = placements[nextIndex];
5248
5257
  if (nextPlacement) {
5249
- // Try next placement and re-run the lifecycle.
5250
- return {
5251
- data: {
5252
- index: nextIndex,
5253
- overflows: overflowsData
5254
- },
5255
- reset: {
5256
- placement: nextPlacement
5257
- }
5258
- };
5258
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
5259
+ if (!ignoreCrossAxisOverflow ||
5260
+ // We leave the current main axis only if every placement on that axis
5261
+ // overflows the main axis.
5262
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
5263
+ // Try next placement and re-run the lifecycle.
5264
+ return {
5265
+ data: {
5266
+ index: nextIndex,
5267
+ overflows: overflowsData
5268
+ },
5269
+ reset: {
5270
+ placement: nextPlacement
5271
+ }
5272
+ };
5273
+ }
5259
5274
  }
5260
5275
 
5261
5276
  // First, find the candidates that fit on the mainAxis side of overflow,
@@ -5301,6 +5316,8 @@ const flip$2 = function (options) {
5301
5316
  };
5302
5317
  };
5303
5318
 
5319
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
5320
+
5304
5321
  // For type backwards-compatibility, the `OffsetOptions` type was also
5305
5322
  // Derivable.
5306
5323
 
@@ -5314,7 +5331,7 @@ async function convertValueToCoords(state, options) {
5314
5331
  const side = getSide(placement);
5315
5332
  const alignment = getAlignment(placement);
5316
5333
  const isVertical = getSideAxis(placement) === 'y';
5317
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
5334
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
5318
5335
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
5319
5336
  const rawValue = evaluate(options, state);
5320
5337
 
@@ -5328,10 +5345,9 @@ async function convertValueToCoords(state, options) {
5328
5345
  crossAxis: 0,
5329
5346
  alignmentAxis: null
5330
5347
  } : {
5331
- mainAxis: 0,
5332
- crossAxis: 0,
5333
- alignmentAxis: null,
5334
- ...rawValue
5348
+ mainAxis: rawValue.mainAxis || 0,
5349
+ crossAxis: rawValue.crossAxis || 0,
5350
+ alignmentAxis: rawValue.alignmentAxis
5335
5351
  };
5336
5352
  if (alignment && typeof alignmentAxis === 'number') {
5337
5353
  crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
@@ -5352,7 +5368,7 @@ async function convertValueToCoords(state, options) {
5352
5368
  * object may be passed.
5353
5369
  * @see https://floating-ui.com/docs/offset
5354
5370
  */
5355
- const offset$2 = function (options) {
5371
+ const offset$3 = function (options) {
5356
5372
  if (options === void 0) {
5357
5373
  options = 0;
5358
5374
  }
@@ -5402,7 +5418,8 @@ const shift$1 = function (options) {
5402
5418
  const {
5403
5419
  x,
5404
5420
  y,
5405
- placement
5421
+ placement,
5422
+ platform
5406
5423
  } = state;
5407
5424
  const {
5408
5425
  mainAxis: checkMainAxis = true,
@@ -5425,7 +5442,7 @@ const shift$1 = function (options) {
5425
5442
  x,
5426
5443
  y
5427
5444
  };
5428
- const overflow = await detectOverflow(state, detectOverflowOptions);
5445
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
5429
5446
  const crossAxis = getSideAxis(getSide(placement));
5430
5447
  const mainAxis = getOppositeAxis(crossAxis);
5431
5448
  let mainAxisCoord = coords[mainAxis];
@@ -5453,7 +5470,11 @@ const shift$1 = function (options) {
5453
5470
  ...limitedCoords,
5454
5471
  data: {
5455
5472
  x: limitedCoords.x - x,
5456
- y: limitedCoords.y - y
5473
+ y: limitedCoords.y - y,
5474
+ enabled: {
5475
+ [mainAxis]: checkMainAxis,
5476
+ [crossAxis]: checkCrossAxis
5477
+ }
5457
5478
  }
5458
5479
  };
5459
5480
  }
@@ -5511,7 +5532,7 @@ const limitShift$1 = function (options) {
5511
5532
  if (checkCrossAxis) {
5512
5533
  var _middlewareData$offse, _middlewareData$offse2;
5513
5534
  const len = mainAxis === 'y' ? 'width' : 'height';
5514
- const isOriginSide = ['top', 'left'].includes(getSide(placement));
5535
+ const isOriginSide = originSides.has(getSide(placement));
5515
5536
  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);
5516
5537
  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);
5517
5538
  if (crossAxisCoord < limitMin) {
@@ -5578,27 +5599,36 @@ function isOverflowElement(element) {
5578
5599
  overflowX,
5579
5600
  overflowY,
5580
5601
  display
5581
- } = getComputedStyle(element);
5582
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
5602
+ } = getComputedStyle$1(element);
5603
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
5583
5604
  }
5584
5605
  function isTableElement(element) {
5585
- return ['table', 'td', 'th'].includes(getNodeName(element));
5606
+ return /^(table|td|th)$/.test(getNodeName(element));
5586
5607
  }
5587
5608
  function isTopLayer(element) {
5588
- return [':popover-open', ':modal'].some(selector => {
5589
- try {
5590
- return element.matches(selector);
5591
- } catch (e) {
5592
- return false;
5609
+ try {
5610
+ if (element.matches(':popover-open')) {
5611
+ return true;
5593
5612
  }
5594
- });
5613
+ } catch (_e) {
5614
+ // no-op
5615
+ }
5616
+ try {
5617
+ return element.matches(':modal');
5618
+ } catch (_e) {
5619
+ return false;
5620
+ }
5595
5621
  }
5622
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
5623
+ const containRe = /paint|layout|strict|content/;
5624
+ const isNotNone = value => !!value && value !== 'none';
5625
+ let isWebKitValue;
5596
5626
  function isContainingBlock(elementOrCss) {
5597
- const webkit = isWebKit();
5598
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
5627
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
5599
5628
 
5600
5629
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5601
- 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));
5630
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
5631
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
5602
5632
  }
5603
5633
  function getContainingBlock(element) {
5604
5634
  let currentNode = getParentNode(element);
@@ -5613,13 +5643,15 @@ function getContainingBlock(element) {
5613
5643
  return null;
5614
5644
  }
5615
5645
  function isWebKit() {
5616
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
5617
- return CSS.supports('-webkit-backdrop-filter', 'none');
5646
+ if (isWebKitValue == null) {
5647
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
5648
+ }
5649
+ return isWebKitValue;
5618
5650
  }
5619
5651
  function isLastTraversableNode(node) {
5620
- return ['html', 'body', '#document'].includes(getNodeName(node));
5652
+ return /^(html|body|#document)$/.test(getNodeName(node));
5621
5653
  }
5622
- function getComputedStyle(element) {
5654
+ function getComputedStyle$1(element) {
5623
5655
  return getWindow(element).getComputedStyle(element);
5624
5656
  }
5625
5657
  function getNodeScroll(element) {
@@ -5673,15 +5705,16 @@ function getOverflowAncestors(node, list, traverseIframes) {
5673
5705
  if (isBody) {
5674
5706
  const frameElement = getFrameElement(win);
5675
5707
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
5708
+ } else {
5709
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
5676
5710
  }
5677
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
5678
5711
  }
5679
5712
  function getFrameElement(win) {
5680
5713
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
5681
5714
  }
5682
5715
 
5683
- function getCssDimensions(element) {
5684
- const css = getComputedStyle(element);
5716
+ function getCssDimensions$1(element) {
5717
+ const css = getComputedStyle$1(element);
5685
5718
  // In testing environments, the `width` and `height` properties are empty
5686
5719
  // strings for SVG elements, returning NaN. Fallback to `0` in this case.
5687
5720
  let width = parseFloat(css.width) || 0;
@@ -5701,12 +5734,12 @@ function getCssDimensions(element) {
5701
5734
  };
5702
5735
  }
5703
5736
 
5704
- function unwrapElement(element) {
5737
+ function unwrapElement$1(element) {
5705
5738
  return !isElement(element) ? element.contextElement : element;
5706
5739
  }
5707
5740
 
5708
- function getScale(element) {
5709
- const domElement = unwrapElement(element);
5741
+ function getScale$1(element) {
5742
+ const domElement = unwrapElement$1(element);
5710
5743
  if (!isHTMLElement(domElement)) {
5711
5744
  return createCoords(1);
5712
5745
  }
@@ -5715,7 +5748,7 @@ function getScale(element) {
5715
5748
  width,
5716
5749
  height,
5717
5750
  $
5718
- } = getCssDimensions(domElement);
5751
+ } = getCssDimensions$1(domElement);
5719
5752
  let x = ($ ? round(rect.width) : rect.width) / width;
5720
5753
  let y = ($ ? round(rect.height) : rect.height) / height;
5721
5754
 
@@ -5733,18 +5766,18 @@ function getScale(element) {
5733
5766
  };
5734
5767
  }
5735
5768
 
5736
- const noOffsets = /*#__PURE__*/createCoords(0);
5737
- function getVisualOffsets(element) {
5769
+ const noOffsets$1 = /*#__PURE__*/createCoords(0);
5770
+ function getVisualOffsets$1(element) {
5738
5771
  const win = getWindow(element);
5739
5772
  if (!isWebKit() || !win.visualViewport) {
5740
- return noOffsets;
5773
+ return noOffsets$1;
5741
5774
  }
5742
5775
  return {
5743
5776
  x: win.visualViewport.offsetLeft,
5744
5777
  y: win.visualViewport.offsetTop
5745
5778
  };
5746
5779
  }
5747
- function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5780
+ function shouldAddVisualOffsets$1(element, isFixed, floatingOffsetParent) {
5748
5781
  if (isFixed === void 0) {
5749
5782
  isFixed = false;
5750
5783
  }
@@ -5754,7 +5787,7 @@ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5754
5787
  return isFixed;
5755
5788
  }
5756
5789
 
5757
- function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5790
+ function getBoundingClientRect$1(element, includeScale, isFixedStrategy, offsetParent) {
5758
5791
  if (includeScale === void 0) {
5759
5792
  includeScale = false;
5760
5793
  }
@@ -5762,18 +5795,18 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5762
5795
  isFixedStrategy = false;
5763
5796
  }
5764
5797
  const clientRect = element.getBoundingClientRect();
5765
- const domElement = unwrapElement(element);
5798
+ const domElement = unwrapElement$1(element);
5766
5799
  let scale = createCoords(1);
5767
5800
  if (includeScale) {
5768
5801
  if (offsetParent) {
5769
5802
  if (isElement(offsetParent)) {
5770
- scale = getScale(offsetParent);
5803
+ scale = getScale$1(offsetParent);
5771
5804
  }
5772
5805
  } else {
5773
- scale = getScale(element);
5806
+ scale = getScale$1(element);
5774
5807
  }
5775
5808
  }
5776
- const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
5809
+ const visualOffsets = shouldAddVisualOffsets$1(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets$1(domElement) : createCoords(0);
5777
5810
  let x = (clientRect.left + visualOffsets.x) / scale.x;
5778
5811
  let y = (clientRect.top + visualOffsets.y) / scale.y;
5779
5812
  let width = clientRect.width / scale.x;
@@ -5784,9 +5817,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5784
5817
  let currentWin = win;
5785
5818
  let currentIFrame = getFrameElement(currentWin);
5786
5819
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
5787
- const iframeScale = getScale(currentIFrame);
5820
+ const iframeScale = getScale$1(currentIFrame);
5788
5821
  const iframeRect = currentIFrame.getBoundingClientRect();
5789
- const css = getComputedStyle(currentIFrame);
5822
+ const css = getComputedStyle$1(currentIFrame);
5790
5823
  const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5791
5824
  const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5792
5825
  x *= iframeScale.x;
@@ -5809,22 +5842,22 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
5809
5842
 
5810
5843
  // If <html> has a CSS width greater than the viewport, then this will be
5811
5844
  // incorrect for RTL.
5812
- function getWindowScrollBarX(element, rect) {
5845
+ function getWindowScrollBarX$1(element, rect) {
5813
5846
  const leftScroll = getNodeScroll(element).scrollLeft;
5814
5847
  if (!rect) {
5815
- return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
5848
+ return getBoundingClientRect$1(getDocumentElement(element)).left + leftScroll;
5816
5849
  }
5817
5850
  return rect.left + leftScroll;
5818
5851
  }
5819
5852
 
5820
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
5853
+ function getHTMLOffset$1(documentElement, scroll, ignoreScrollbarX) {
5821
5854
  if (ignoreScrollbarX === void 0) {
5822
5855
  ignoreScrollbarX = false;
5823
5856
  }
5824
5857
  const htmlRect = documentElement.getBoundingClientRect();
5825
5858
  const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
5826
5859
  // RTL <body> scrollbar.
5827
- getWindowScrollBarX(documentElement, htmlRect));
5860
+ getWindowScrollBarX$1(documentElement, htmlRect));
5828
5861
  const y = htmlRect.top + scroll.scrollTop;
5829
5862
  return {
5830
5863
  x,
@@ -5832,7 +5865,7 @@ function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
5832
5865
  };
5833
5866
  }
5834
5867
 
5835
- function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5868
+ function convertOffsetParentRelativeRectToViewportRelativeRect$1(_ref) {
5836
5869
  let {
5837
5870
  elements,
5838
5871
  rect,
@@ -5857,13 +5890,13 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5857
5890
  scroll = getNodeScroll(offsetParent);
5858
5891
  }
5859
5892
  if (isHTMLElement(offsetParent)) {
5860
- const offsetRect = getBoundingClientRect(offsetParent);
5861
- scale = getScale(offsetParent);
5893
+ const offsetRect = getBoundingClientRect$1(offsetParent);
5894
+ scale = getScale$1(offsetParent);
5862
5895
  offsets.x = offsetRect.x + offsetParent.clientLeft;
5863
5896
  offsets.y = offsetRect.y + offsetParent.clientTop;
5864
5897
  }
5865
5898
  }
5866
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
5899
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset$1(documentElement, scroll, true) : createCoords(0);
5867
5900
  return {
5868
5901
  width: rect.width * scale.x,
5869
5902
  height: rect.height * scale.y,
@@ -5872,21 +5905,21 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5872
5905
  };
5873
5906
  }
5874
5907
 
5875
- function getClientRects(element) {
5908
+ function getClientRects$1(element) {
5876
5909
  return Array.from(element.getClientRects());
5877
5910
  }
5878
5911
 
5879
5912
  // Gets the entire size of the scrollable document area, even extending outside
5880
5913
  // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
5881
- function getDocumentRect(element) {
5914
+ function getDocumentRect$1(element) {
5882
5915
  const html = getDocumentElement(element);
5883
5916
  const scroll = getNodeScroll(element);
5884
5917
  const body = element.ownerDocument.body;
5885
5918
  const width = max$1(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
5886
5919
  const height = max$1(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
5887
- let x = -scroll.scrollLeft + getWindowScrollBarX(element);
5920
+ let x = -scroll.scrollLeft + getWindowScrollBarX$1(element);
5888
5921
  const y = -scroll.scrollTop;
5889
- if (getComputedStyle(body).direction === 'rtl') {
5922
+ if (getComputedStyle$1(body).direction === 'rtl') {
5890
5923
  x += max$1(html.clientWidth, body.clientWidth) - width;
5891
5924
  }
5892
5925
  return {
@@ -5897,7 +5930,7 @@ function getDocumentRect(element) {
5897
5930
  };
5898
5931
  }
5899
5932
 
5900
- function getViewportRect(element, strategy) {
5933
+ function getViewportRect$1(element, strategy) {
5901
5934
  const win = getWindow(element);
5902
5935
  const html = getDocumentElement(element);
5903
5936
  const visualViewport = win.visualViewport;
@@ -5923,11 +5956,11 @@ function getViewportRect(element, strategy) {
5923
5956
  }
5924
5957
 
5925
5958
  // Returns the inner client rect, subtracting scrollbars if present.
5926
- function getInnerBoundingClientRect(element, strategy) {
5927
- const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
5959
+ function getInnerBoundingClientRect$1(element, strategy) {
5960
+ const clientRect = getBoundingClientRect$1(element, true, strategy === 'fixed');
5928
5961
  const top = clientRect.top + element.clientTop;
5929
5962
  const left = clientRect.left + element.clientLeft;
5930
- const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
5963
+ const scale = isHTMLElement(element) ? getScale$1(element) : createCoords(1);
5931
5964
  const width = element.clientWidth * scale.x;
5932
5965
  const height = element.clientHeight * scale.y;
5933
5966
  const x = left * scale.x;
@@ -5939,16 +5972,16 @@ function getInnerBoundingClientRect(element, strategy) {
5939
5972
  y
5940
5973
  };
5941
5974
  }
5942
- function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
5975
+ function getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy) {
5943
5976
  let rect;
5944
5977
  if (clippingAncestor === 'viewport') {
5945
- rect = getViewportRect(element, strategy);
5978
+ rect = getViewportRect$1(element, strategy);
5946
5979
  } else if (clippingAncestor === 'document') {
5947
- rect = getDocumentRect(getDocumentElement(element));
5980
+ rect = getDocumentRect$1(getDocumentElement(element));
5948
5981
  } else if (isElement(clippingAncestor)) {
5949
- rect = getInnerBoundingClientRect(clippingAncestor, strategy);
5982
+ rect = getInnerBoundingClientRect$1(clippingAncestor, strategy);
5950
5983
  } else {
5951
- const visualOffsets = getVisualOffsets(element);
5984
+ const visualOffsets = getVisualOffsets$1(element);
5952
5985
  rect = {
5953
5986
  x: clippingAncestor.x - visualOffsets.x,
5954
5987
  y: clippingAncestor.y - visualOffsets.y,
@@ -5958,35 +5991,35 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
5958
5991
  }
5959
5992
  return rectToClientRect(rect);
5960
5993
  }
5961
- function hasFixedPositionAncestor(element, stopNode) {
5994
+ function hasFixedPositionAncestor$1(element, stopNode) {
5962
5995
  const parentNode = getParentNode(element);
5963
5996
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
5964
5997
  return false;
5965
5998
  }
5966
- return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
5999
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor$1(parentNode, stopNode);
5967
6000
  }
5968
6001
 
5969
6002
  // A "clipping ancestor" is an `overflow` element with the characteristic of
5970
6003
  // clipping (or hiding) child elements. This returns all clipping ancestors
5971
6004
  // of the given element up the tree.
5972
- function getClippingElementAncestors(element, cache) {
6005
+ function getClippingElementAncestors$1(element, cache) {
5973
6006
  const cachedResult = cache.get(element);
5974
6007
  if (cachedResult) {
5975
6008
  return cachedResult;
5976
6009
  }
5977
6010
  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
5978
6011
  let currentContainingBlockComputedStyle = null;
5979
- const elementIsFixed = getComputedStyle(element).position === 'fixed';
6012
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
5980
6013
  let currentNode = elementIsFixed ? getParentNode(element) : element;
5981
6014
 
5982
6015
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5983
6016
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
5984
- const computedStyle = getComputedStyle(currentNode);
6017
+ const computedStyle = getComputedStyle$1(currentNode);
5985
6018
  const currentNodeIsContaining = isContainingBlock(currentNode);
5986
6019
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
5987
6020
  currentContainingBlockComputedStyle = null;
5988
6021
  }
5989
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
6022
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor$1(element, currentNode);
5990
6023
  if (shouldDropCurrentNode) {
5991
6024
  // Drop non-containing blocks.
5992
6025
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -6002,24 +6035,24 @@ function getClippingElementAncestors(element, cache) {
6002
6035
 
6003
6036
  // Gets the maximum area that the element is visible in due to any number of
6004
6037
  // clipping ancestors.
6005
- function getClippingRect(_ref) {
6038
+ function getClippingRect$1(_ref) {
6006
6039
  let {
6007
6040
  element,
6008
6041
  boundary,
6009
6042
  rootBoundary,
6010
6043
  strategy
6011
6044
  } = _ref;
6012
- const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
6045
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors$1(element, this._c) : [].concat(boundary);
6013
6046
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
6014
6047
  const firstClippingAncestor = clippingAncestors[0];
6015
6048
  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
6016
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
6049
+ const rect = getClientRectFromClippingAncestor$1(element, clippingAncestor, strategy);
6017
6050
  accRect.top = max$1(rect.top, accRect.top);
6018
6051
  accRect.right = min$1(rect.right, accRect.right);
6019
6052
  accRect.bottom = min$1(rect.bottom, accRect.bottom);
6020
6053
  accRect.left = max$1(rect.left, accRect.left);
6021
6054
  return accRect;
6022
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
6055
+ }, getClientRectFromClippingAncestor$1(element, firstClippingAncestor, strategy));
6023
6056
  return {
6024
6057
  width: clippingRect.right - clippingRect.left,
6025
6058
  height: clippingRect.bottom - clippingRect.top,
@@ -6028,22 +6061,22 @@ function getClippingRect(_ref) {
6028
6061
  };
6029
6062
  }
6030
6063
 
6031
- function getDimensions(element) {
6064
+ function getDimensions$1(element) {
6032
6065
  const {
6033
6066
  width,
6034
6067
  height
6035
- } = getCssDimensions(element);
6068
+ } = getCssDimensions$1(element);
6036
6069
  return {
6037
6070
  width,
6038
6071
  height
6039
6072
  };
6040
6073
  }
6041
6074
 
6042
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
6075
+ function getRectRelativeToOffsetParent$1(element, offsetParent, strategy) {
6043
6076
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
6044
6077
  const documentElement = getDocumentElement(offsetParent);
6045
6078
  const isFixed = strategy === 'fixed';
6046
- const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
6079
+ const rect = getBoundingClientRect$1(element, true, isFixed, offsetParent);
6047
6080
  let scroll = {
6048
6081
  scrollLeft: 0,
6049
6082
  scrollTop: 0
@@ -6054,16 +6087,16 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
6054
6087
  scroll = getNodeScroll(offsetParent);
6055
6088
  }
6056
6089
  if (isOffsetParentAnElement) {
6057
- const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
6090
+ const offsetRect = getBoundingClientRect$1(offsetParent, true, isFixed, offsetParent);
6058
6091
  offsets.x = offsetRect.x + offsetParent.clientLeft;
6059
6092
  offsets.y = offsetRect.y + offsetParent.clientTop;
6060
6093
  } else if (documentElement) {
6061
6094
  // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
6062
6095
  // Firefox with layout.scrollbar.side = 3 in about:config to test this.
6063
- offsets.x = getWindowScrollBarX(documentElement);
6096
+ offsets.x = getWindowScrollBarX$1(documentElement);
6064
6097
  }
6065
6098
  }
6066
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
6099
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset$1(documentElement, scroll) : createCoords(0);
6067
6100
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
6068
6101
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
6069
6102
  return {
@@ -6074,12 +6107,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
6074
6107
  };
6075
6108
  }
6076
6109
 
6077
- function isStaticPositioned(element) {
6078
- return getComputedStyle(element).position === 'static';
6110
+ function isStaticPositioned$1(element) {
6111
+ return getComputedStyle$1(element).position === 'static';
6079
6112
  }
6080
6113
 
6081
- function getTrueOffsetParent(element, polyfill) {
6082
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
6114
+ function getTrueOffsetParent$1(element, polyfill) {
6115
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
6083
6116
  return null;
6084
6117
  }
6085
6118
  if (polyfill) {
@@ -6099,7 +6132,7 @@ function getTrueOffsetParent(element, polyfill) {
6099
6132
 
6100
6133
  // Gets the closest ancestor positioned element. Handles some edge cases,
6101
6134
  // such as table ancestors and cross browser bugs.
6102
- function getOffsetParent(element, polyfill) {
6135
+ function getOffsetParent$1(element, polyfill) {
6103
6136
  const win = getWindow(element);
6104
6137
  if (isTopLayer(element)) {
6105
6138
  return win;
@@ -6107,29 +6140,29 @@ function getOffsetParent(element, polyfill) {
6107
6140
  if (!isHTMLElement(element)) {
6108
6141
  let svgOffsetParent = getParentNode(element);
6109
6142
  while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
6110
- if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
6143
+ if (isElement(svgOffsetParent) && !isStaticPositioned$1(svgOffsetParent)) {
6111
6144
  return svgOffsetParent;
6112
6145
  }
6113
6146
  svgOffsetParent = getParentNode(svgOffsetParent);
6114
6147
  }
6115
6148
  return win;
6116
6149
  }
6117
- let offsetParent = getTrueOffsetParent(element, polyfill);
6118
- while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
6119
- offsetParent = getTrueOffsetParent(offsetParent, polyfill);
6150
+ let offsetParent = getTrueOffsetParent$1(element, polyfill);
6151
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned$1(offsetParent)) {
6152
+ offsetParent = getTrueOffsetParent$1(offsetParent, polyfill);
6120
6153
  }
6121
- if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
6154
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned$1(offsetParent) && !isContainingBlock(offsetParent)) {
6122
6155
  return win;
6123
6156
  }
6124
6157
  return offsetParent || getContainingBlock(element) || win;
6125
6158
  }
6126
6159
 
6127
- const getElementRects = async function (data) {
6128
- const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
6160
+ const getElementRects$1 = async function (data) {
6161
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent$1;
6129
6162
  const getDimensionsFn = this.getDimensions;
6130
6163
  const floatingDimensions = await getDimensionsFn(data.floating);
6131
6164
  return {
6132
- reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
6165
+ reference: getRectRelativeToOffsetParent$1(data.reference, await getOffsetParentFn(data.floating), data.strategy),
6133
6166
  floating: {
6134
6167
  x: 0,
6135
6168
  y: 0,
@@ -6139,25 +6172,25 @@ const getElementRects = async function (data) {
6139
6172
  };
6140
6173
  };
6141
6174
 
6142
- function isRTL(element) {
6143
- return getComputedStyle(element).direction === 'rtl';
6175
+ function isRTL$1(element) {
6176
+ return getComputedStyle$1(element).direction === 'rtl';
6144
6177
  }
6145
6178
 
6146
- const platform = {
6147
- convertOffsetParentRelativeRectToViewportRelativeRect,
6179
+ const platform$1 = {
6180
+ convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect$1,
6148
6181
  getDocumentElement,
6149
- getClippingRect,
6150
- getOffsetParent,
6151
- getElementRects,
6152
- getClientRects,
6153
- getDimensions,
6154
- getScale,
6182
+ getClippingRect: getClippingRect$1,
6183
+ getOffsetParent: getOffsetParent$1,
6184
+ getElementRects: getElementRects$1,
6185
+ getClientRects: getClientRects$1,
6186
+ getDimensions: getDimensions$1,
6187
+ getScale: getScale$1,
6155
6188
  isElement,
6156
- isRTL
6189
+ isRTL: isRTL$1
6157
6190
  };
6158
6191
 
6159
6192
  // https://samthor.au/2021/observing-dom/
6160
- function observeMove(element, onMove) {
6193
+ function observeMove$1(element, onMove) {
6161
6194
  let io = null;
6162
6195
  let timeoutId;
6163
6196
  const root = getDocumentElement(element);
@@ -6241,7 +6274,7 @@ function observeMove(element, onMove) {
6241
6274
  * removed from the DOM or hidden from the screen.
6242
6275
  * @see https://floating-ui.com/docs/autoUpdate
6243
6276
  */
6244
- function autoUpdate(reference, floating, update, options) {
6277
+ function autoUpdate$1(reference, floating, update, options) {
6245
6278
  if (options === void 0) {
6246
6279
  options = {};
6247
6280
  }
@@ -6252,7 +6285,7 @@ function autoUpdate(reference, floating, update, options) {
6252
6285
  layoutShift = typeof IntersectionObserver === 'function',
6253
6286
  animationFrame = false
6254
6287
  } = options;
6255
- const referenceEl = unwrapElement(reference);
6288
+ const referenceEl = unwrapElement$1(reference);
6256
6289
  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
6257
6290
  ancestors.forEach(ancestor => {
6258
6291
  ancestorScroll && ancestor.addEventListener('scroll', update, {
@@ -6260,7 +6293,7 @@ function autoUpdate(reference, floating, update, options) {
6260
6293
  });
6261
6294
  ancestorResize && ancestor.addEventListener('resize', update);
6262
6295
  });
6263
- const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
6296
+ const cleanupIo = referenceEl && layoutShift ? observeMove$1(referenceEl, update) : null;
6264
6297
  let reobserveFrame = -1;
6265
6298
  let resizeObserver = null;
6266
6299
  if (elementResize) {
@@ -6284,12 +6317,12 @@ function autoUpdate(reference, floating, update, options) {
6284
6317
  resizeObserver.observe(floating);
6285
6318
  }
6286
6319
  let frameId;
6287
- let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
6320
+ let prevRefRect = animationFrame ? getBoundingClientRect$1(reference) : null;
6288
6321
  if (animationFrame) {
6289
6322
  frameLoop();
6290
6323
  }
6291
6324
  function frameLoop() {
6292
- const nextRefRect = getBoundingClientRect(reference);
6325
+ const nextRefRect = getBoundingClientRect$1(reference);
6293
6326
  if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
6294
6327
  update();
6295
6328
  }
@@ -6319,7 +6352,7 @@ function autoUpdate(reference, floating, update, options) {
6319
6352
  * object may be passed.
6320
6353
  * @see https://floating-ui.com/docs/offset
6321
6354
  */
6322
- const offset$1 = offset$2;
6355
+ const offset$2 = offset$3;
6323
6356
 
6324
6357
  /**
6325
6358
  * Optimizes the visibility of the floating element by shifting it in order to
@@ -6334,14 +6367,7 @@ const shift = shift$1;
6334
6367
  * clipping boundary. Alternative to `autoPlacement`.
6335
6368
  * @see https://floating-ui.com/docs/flip
6336
6369
  */
6337
- const flip$1 = flip$2;
6338
-
6339
- /**
6340
- * Provides data to position an inner element of the floating element so that it
6341
- * appears centered to the reference element.
6342
- * @see https://floating-ui.com/docs/arrow
6343
- */
6344
- const arrow$2 = arrow$3;
6370
+ const flip$2 = flip$3;
6345
6371
 
6346
6372
  /**
6347
6373
  * Built-in `limiter` that will stop `shift()` at a certain point.
@@ -6352,20 +6378,20 @@ const limitShift = limitShift$1;
6352
6378
  * Computes the `x` and `y` coordinates that will place the floating element
6353
6379
  * next to a given reference element.
6354
6380
  */
6355
- const computePosition = (reference, floating, options) => {
6381
+ const computePosition$1 = (reference, floating, options) => {
6356
6382
  // This caches the expensive `getClippingElementAncestors` function so that
6357
6383
  // multiple lifecycle resets re-use the same result. It only lives for a
6358
6384
  // single call. If other functions become expensive, we can add them as well.
6359
6385
  const cache = new Map();
6360
6386
  const mergedOptions = {
6361
- platform,
6387
+ platform: platform$1,
6362
6388
  ...options
6363
6389
  };
6364
6390
  const platformWithCache = {
6365
6391
  ...mergedOptions.platform,
6366
6392
  _c: cache
6367
6393
  };
6368
- return computePosition$1(reference, floating, {
6394
+ return computePosition$2(reference, floating, {
6369
6395
  ...mergedOptions,
6370
6396
  platform: platformWithCache
6371
6397
  });
@@ -6394,8 +6420,8 @@ function useCombinedRefs(...refs) {
6394
6420
  */
6395
6421
 
6396
6422
  function setupFloating(reference, floating, options) {
6397
- return autoUpdate(reference, floating, () => {
6398
- computePosition(reference, floating, options).then(({
6423
+ return autoUpdate$1(reference, floating, () => {
6424
+ computePosition$1(reference, floating, options).then(({
6399
6425
  x,
6400
6426
  y
6401
6427
  }) => {
@@ -6591,7 +6617,7 @@ const Tooltip = /*#__PURE__*/React__default.forwardRef(function TooltipFn({
6591
6617
  if (open && !disabled && combinedTriggerRef.current && tooltipRef.current) {
6592
6618
  cleanup = setupFloating(combinedTriggerRef.current, tooltipRef.current, {
6593
6619
  placement,
6594
- middleware: [offset$1(8), flip$1({
6620
+ middleware: [offset$2(8), flip$2({
6595
6621
  fallbackPlacements
6596
6622
  }), shift({
6597
6623
  limiter: limitShift()
@@ -8822,7 +8848,7 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef(function DropdownFn({
8822
8848
  if (popperReference && dropdownRef.current) {
8823
8849
  cleanup = setupFloating(popperReference, dropdownRef.current, {
8824
8850
  placement,
8825
- middleware: [flip$1(), shift({
8851
+ middleware: [flip$2(), shift({
8826
8852
  limiter: limitShift()
8827
8853
  })],
8828
8854
  strategy: 'fixed'
@@ -17964,23 +17990,749 @@ function subYears(date, amount) {
17964
17990
  return addYears(date, -amount);
17965
17991
  }
17966
17992
 
17967
- var index$1 = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
17968
-
17969
- // Fork of `fast-deep-equal` that only does the comparisons we need and compares
17970
- // functions
17971
- function deepEqual(a, b) {
17972
- if (a === b) {
17973
- return true;
17974
- }
17975
- if (typeof a !== typeof b) {
17976
- return false;
17977
- }
17978
- if (typeof a === 'function' && a.toString() === b.toString()) {
17979
- return true;
17980
- }
17981
- let length;
17982
- let i;
17983
- let keys;
17993
+ function getCssDimensions(element) {
17994
+ const css = getComputedStyle$1(element);
17995
+ // In testing environments, the `width` and `height` properties are empty
17996
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
17997
+ let width = parseFloat(css.width) || 0;
17998
+ let height = parseFloat(css.height) || 0;
17999
+ const hasOffset = isHTMLElement(element);
18000
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
18001
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
18002
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
18003
+ if (shouldFallback) {
18004
+ width = offsetWidth;
18005
+ height = offsetHeight;
18006
+ }
18007
+ return {
18008
+ width,
18009
+ height,
18010
+ $: shouldFallback
18011
+ };
18012
+ }
18013
+
18014
+ function unwrapElement(element) {
18015
+ return !isElement(element) ? element.contextElement : element;
18016
+ }
18017
+
18018
+ function getScale(element) {
18019
+ const domElement = unwrapElement(element);
18020
+ if (!isHTMLElement(domElement)) {
18021
+ return createCoords(1);
18022
+ }
18023
+ const rect = domElement.getBoundingClientRect();
18024
+ const {
18025
+ width,
18026
+ height,
18027
+ $
18028
+ } = getCssDimensions(domElement);
18029
+ let x = ($ ? round(rect.width) : rect.width) / width;
18030
+ let y = ($ ? round(rect.height) : rect.height) / height;
18031
+
18032
+ // 0, NaN, or Infinity should always fallback to 1.
18033
+
18034
+ if (!x || !Number.isFinite(x)) {
18035
+ x = 1;
18036
+ }
18037
+ if (!y || !Number.isFinite(y)) {
18038
+ y = 1;
18039
+ }
18040
+ return {
18041
+ x,
18042
+ y
18043
+ };
18044
+ }
18045
+
18046
+ const noOffsets = /*#__PURE__*/createCoords(0);
18047
+ function getVisualOffsets(element) {
18048
+ const win = getWindow(element);
18049
+ if (!isWebKit() || !win.visualViewport) {
18050
+ return noOffsets;
18051
+ }
18052
+ return {
18053
+ x: win.visualViewport.offsetLeft,
18054
+ y: win.visualViewport.offsetTop
18055
+ };
18056
+ }
18057
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
18058
+ if (isFixed === void 0) {
18059
+ isFixed = false;
18060
+ }
18061
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
18062
+ return false;
18063
+ }
18064
+ return isFixed;
18065
+ }
18066
+
18067
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
18068
+ if (includeScale === void 0) {
18069
+ includeScale = false;
18070
+ }
18071
+ if (isFixedStrategy === void 0) {
18072
+ isFixedStrategy = false;
18073
+ }
18074
+ const clientRect = element.getBoundingClientRect();
18075
+ const domElement = unwrapElement(element);
18076
+ let scale = createCoords(1);
18077
+ if (includeScale) {
18078
+ if (offsetParent) {
18079
+ if (isElement(offsetParent)) {
18080
+ scale = getScale(offsetParent);
18081
+ }
18082
+ } else {
18083
+ scale = getScale(element);
18084
+ }
18085
+ }
18086
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
18087
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
18088
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
18089
+ let width = clientRect.width / scale.x;
18090
+ let height = clientRect.height / scale.y;
18091
+ if (domElement) {
18092
+ const win = getWindow(domElement);
18093
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
18094
+ let currentWin = win;
18095
+ let currentIFrame = getFrameElement(currentWin);
18096
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
18097
+ const iframeScale = getScale(currentIFrame);
18098
+ const iframeRect = currentIFrame.getBoundingClientRect();
18099
+ const css = getComputedStyle$1(currentIFrame);
18100
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
18101
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
18102
+ x *= iframeScale.x;
18103
+ y *= iframeScale.y;
18104
+ width *= iframeScale.x;
18105
+ height *= iframeScale.y;
18106
+ x += left;
18107
+ y += top;
18108
+ currentWin = getWindow(currentIFrame);
18109
+ currentIFrame = getFrameElement(currentWin);
18110
+ }
18111
+ }
18112
+ return rectToClientRect({
18113
+ width,
18114
+ height,
18115
+ x,
18116
+ y
18117
+ });
18118
+ }
18119
+
18120
+ // If <html> has a CSS width greater than the viewport, then this will be
18121
+ // incorrect for RTL.
18122
+ function getWindowScrollBarX(element, rect) {
18123
+ const leftScroll = getNodeScroll(element).scrollLeft;
18124
+ if (!rect) {
18125
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
18126
+ }
18127
+ return rect.left + leftScroll;
18128
+ }
18129
+
18130
+ function getHTMLOffset(documentElement, scroll) {
18131
+ const htmlRect = documentElement.getBoundingClientRect();
18132
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
18133
+ const y = htmlRect.top + scroll.scrollTop;
18134
+ return {
18135
+ x,
18136
+ y
18137
+ };
18138
+ }
18139
+
18140
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
18141
+ let {
18142
+ elements,
18143
+ rect,
18144
+ offsetParent,
18145
+ strategy
18146
+ } = _ref;
18147
+ const isFixed = strategy === 'fixed';
18148
+ const documentElement = getDocumentElement(offsetParent);
18149
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
18150
+ if (offsetParent === documentElement || topLayer && isFixed) {
18151
+ return rect;
18152
+ }
18153
+ let scroll = {
18154
+ scrollLeft: 0,
18155
+ scrollTop: 0
18156
+ };
18157
+ let scale = createCoords(1);
18158
+ const offsets = createCoords(0);
18159
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
18160
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
18161
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
18162
+ scroll = getNodeScroll(offsetParent);
18163
+ }
18164
+ if (isOffsetParentAnElement) {
18165
+ const offsetRect = getBoundingClientRect(offsetParent);
18166
+ scale = getScale(offsetParent);
18167
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
18168
+ offsets.y = offsetRect.y + offsetParent.clientTop;
18169
+ }
18170
+ }
18171
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
18172
+ return {
18173
+ width: rect.width * scale.x,
18174
+ height: rect.height * scale.y,
18175
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
18176
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
18177
+ };
18178
+ }
18179
+
18180
+ function getClientRects(element) {
18181
+ return Array.from(element.getClientRects());
18182
+ }
18183
+
18184
+ // Gets the entire size of the scrollable document area, even extending outside
18185
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
18186
+ function getDocumentRect(element) {
18187
+ const html = getDocumentElement(element);
18188
+ const scroll = getNodeScroll(element);
18189
+ const body = element.ownerDocument.body;
18190
+ const width = max$1(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
18191
+ const height = max$1(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
18192
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
18193
+ const y = -scroll.scrollTop;
18194
+ if (getComputedStyle$1(body).direction === 'rtl') {
18195
+ x += max$1(html.clientWidth, body.clientWidth) - width;
18196
+ }
18197
+ return {
18198
+ width,
18199
+ height,
18200
+ x,
18201
+ y
18202
+ };
18203
+ }
18204
+
18205
+ // Safety check: ensure the scrollbar space is reasonable in case this
18206
+ // calculation is affected by unusual styles.
18207
+ // Most scrollbars leave 15-18px of space.
18208
+ const SCROLLBAR_MAX = 25;
18209
+ function getViewportRect(element, strategy) {
18210
+ const win = getWindow(element);
18211
+ const html = getDocumentElement(element);
18212
+ const visualViewport = win.visualViewport;
18213
+ let width = html.clientWidth;
18214
+ let height = html.clientHeight;
18215
+ let x = 0;
18216
+ let y = 0;
18217
+ if (visualViewport) {
18218
+ width = visualViewport.width;
18219
+ height = visualViewport.height;
18220
+ const visualViewportBased = isWebKit();
18221
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
18222
+ x = visualViewport.offsetLeft;
18223
+ y = visualViewport.offsetTop;
18224
+ }
18225
+ }
18226
+ const windowScrollbarX = getWindowScrollBarX(html);
18227
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
18228
+ // visual width of the <html> but this is not considered in the size
18229
+ // of `html.clientWidth`.
18230
+ if (windowScrollbarX <= 0) {
18231
+ const doc = html.ownerDocument;
18232
+ const body = doc.body;
18233
+ const bodyStyles = getComputedStyle(body);
18234
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
18235
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
18236
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
18237
+ width -= clippingStableScrollbarWidth;
18238
+ }
18239
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
18240
+ // If the <body> scrollbar is on the left, the width needs to be extended
18241
+ // by the scrollbar amount so there isn't extra space on the right.
18242
+ width += windowScrollbarX;
18243
+ }
18244
+ return {
18245
+ width,
18246
+ height,
18247
+ x,
18248
+ y
18249
+ };
18250
+ }
18251
+
18252
+ // Returns the inner client rect, subtracting scrollbars if present.
18253
+ function getInnerBoundingClientRect(element, strategy) {
18254
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
18255
+ const top = clientRect.top + element.clientTop;
18256
+ const left = clientRect.left + element.clientLeft;
18257
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
18258
+ const width = element.clientWidth * scale.x;
18259
+ const height = element.clientHeight * scale.y;
18260
+ const x = left * scale.x;
18261
+ const y = top * scale.y;
18262
+ return {
18263
+ width,
18264
+ height,
18265
+ x,
18266
+ y
18267
+ };
18268
+ }
18269
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
18270
+ let rect;
18271
+ if (clippingAncestor === 'viewport') {
18272
+ rect = getViewportRect(element, strategy);
18273
+ } else if (clippingAncestor === 'document') {
18274
+ rect = getDocumentRect(getDocumentElement(element));
18275
+ } else if (isElement(clippingAncestor)) {
18276
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
18277
+ } else {
18278
+ const visualOffsets = getVisualOffsets(element);
18279
+ rect = {
18280
+ x: clippingAncestor.x - visualOffsets.x,
18281
+ y: clippingAncestor.y - visualOffsets.y,
18282
+ width: clippingAncestor.width,
18283
+ height: clippingAncestor.height
18284
+ };
18285
+ }
18286
+ return rectToClientRect(rect);
18287
+ }
18288
+ function hasFixedPositionAncestor(element, stopNode) {
18289
+ const parentNode = getParentNode(element);
18290
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
18291
+ return false;
18292
+ }
18293
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
18294
+ }
18295
+
18296
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
18297
+ // clipping (or hiding) child elements. This returns all clipping ancestors
18298
+ // of the given element up the tree.
18299
+ function getClippingElementAncestors(element, cache) {
18300
+ const cachedResult = cache.get(element);
18301
+ if (cachedResult) {
18302
+ return cachedResult;
18303
+ }
18304
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
18305
+ let currentContainingBlockComputedStyle = null;
18306
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
18307
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
18308
+
18309
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
18310
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
18311
+ const computedStyle = getComputedStyle$1(currentNode);
18312
+ const currentNodeIsContaining = isContainingBlock(currentNode);
18313
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
18314
+ currentContainingBlockComputedStyle = null;
18315
+ }
18316
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
18317
+ if (shouldDropCurrentNode) {
18318
+ // Drop non-containing blocks.
18319
+ result = result.filter(ancestor => ancestor !== currentNode);
18320
+ } else {
18321
+ // Record last containing block for next iteration.
18322
+ currentContainingBlockComputedStyle = computedStyle;
18323
+ }
18324
+ currentNode = getParentNode(currentNode);
18325
+ }
18326
+ cache.set(element, result);
18327
+ return result;
18328
+ }
18329
+
18330
+ // Gets the maximum area that the element is visible in due to any number of
18331
+ // clipping ancestors.
18332
+ function getClippingRect(_ref) {
18333
+ let {
18334
+ element,
18335
+ boundary,
18336
+ rootBoundary,
18337
+ strategy
18338
+ } = _ref;
18339
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
18340
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
18341
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
18342
+ let top = firstRect.top;
18343
+ let right = firstRect.right;
18344
+ let bottom = firstRect.bottom;
18345
+ let left = firstRect.left;
18346
+ for (let i = 1; i < clippingAncestors.length; i++) {
18347
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
18348
+ top = max$1(rect.top, top);
18349
+ right = min$1(rect.right, right);
18350
+ bottom = min$1(rect.bottom, bottom);
18351
+ left = max$1(rect.left, left);
18352
+ }
18353
+ return {
18354
+ width: right - left,
18355
+ height: bottom - top,
18356
+ x: left,
18357
+ y: top
18358
+ };
18359
+ }
18360
+
18361
+ function getDimensions(element) {
18362
+ const {
18363
+ width,
18364
+ height
18365
+ } = getCssDimensions(element);
18366
+ return {
18367
+ width,
18368
+ height
18369
+ };
18370
+ }
18371
+
18372
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
18373
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
18374
+ const documentElement = getDocumentElement(offsetParent);
18375
+ const isFixed = strategy === 'fixed';
18376
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
18377
+ let scroll = {
18378
+ scrollLeft: 0,
18379
+ scrollTop: 0
18380
+ };
18381
+ const offsets = createCoords(0);
18382
+
18383
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
18384
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
18385
+ function setLeftRTLScrollbarOffset() {
18386
+ offsets.x = getWindowScrollBarX(documentElement);
18387
+ }
18388
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
18389
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
18390
+ scroll = getNodeScroll(offsetParent);
18391
+ }
18392
+ if (isOffsetParentAnElement) {
18393
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
18394
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
18395
+ offsets.y = offsetRect.y + offsetParent.clientTop;
18396
+ } else if (documentElement) {
18397
+ setLeftRTLScrollbarOffset();
18398
+ }
18399
+ }
18400
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
18401
+ setLeftRTLScrollbarOffset();
18402
+ }
18403
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
18404
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
18405
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
18406
+ return {
18407
+ x,
18408
+ y,
18409
+ width: rect.width,
18410
+ height: rect.height
18411
+ };
18412
+ }
18413
+
18414
+ function isStaticPositioned(element) {
18415
+ return getComputedStyle$1(element).position === 'static';
18416
+ }
18417
+
18418
+ function getTrueOffsetParent(element, polyfill) {
18419
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
18420
+ return null;
18421
+ }
18422
+ if (polyfill) {
18423
+ return polyfill(element);
18424
+ }
18425
+ let rawOffsetParent = element.offsetParent;
18426
+
18427
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
18428
+ // while Chrome and Safari return the <body> element. The <body> element must
18429
+ // be used to perform the correct calculations even if the <html> element is
18430
+ // non-static.
18431
+ if (getDocumentElement(element) === rawOffsetParent) {
18432
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
18433
+ }
18434
+ return rawOffsetParent;
18435
+ }
18436
+
18437
+ // Gets the closest ancestor positioned element. Handles some edge cases,
18438
+ // such as table ancestors and cross browser bugs.
18439
+ function getOffsetParent(element, polyfill) {
18440
+ const win = getWindow(element);
18441
+ if (isTopLayer(element)) {
18442
+ return win;
18443
+ }
18444
+ if (!isHTMLElement(element)) {
18445
+ let svgOffsetParent = getParentNode(element);
18446
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
18447
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
18448
+ return svgOffsetParent;
18449
+ }
18450
+ svgOffsetParent = getParentNode(svgOffsetParent);
18451
+ }
18452
+ return win;
18453
+ }
18454
+ let offsetParent = getTrueOffsetParent(element, polyfill);
18455
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
18456
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
18457
+ }
18458
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
18459
+ return win;
18460
+ }
18461
+ return offsetParent || getContainingBlock(element) || win;
18462
+ }
18463
+
18464
+ const getElementRects = async function (data) {
18465
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
18466
+ const getDimensionsFn = this.getDimensions;
18467
+ const floatingDimensions = await getDimensionsFn(data.floating);
18468
+ return {
18469
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
18470
+ floating: {
18471
+ x: 0,
18472
+ y: 0,
18473
+ width: floatingDimensions.width,
18474
+ height: floatingDimensions.height
18475
+ }
18476
+ };
18477
+ };
18478
+
18479
+ function isRTL(element) {
18480
+ return getComputedStyle$1(element).direction === 'rtl';
18481
+ }
18482
+
18483
+ const platform = {
18484
+ convertOffsetParentRelativeRectToViewportRelativeRect,
18485
+ getDocumentElement,
18486
+ getClippingRect,
18487
+ getOffsetParent,
18488
+ getElementRects,
18489
+ getClientRects,
18490
+ getDimensions,
18491
+ getScale,
18492
+ isElement,
18493
+ isRTL
18494
+ };
18495
+
18496
+ function rectsAreEqual(a, b) {
18497
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
18498
+ }
18499
+
18500
+ // https://samthor.au/2021/observing-dom/
18501
+ function observeMove(element, onMove) {
18502
+ let io = null;
18503
+ let timeoutId;
18504
+ const root = getDocumentElement(element);
18505
+ function cleanup() {
18506
+ var _io;
18507
+ clearTimeout(timeoutId);
18508
+ (_io = io) == null || _io.disconnect();
18509
+ io = null;
18510
+ }
18511
+ function refresh(skip, threshold) {
18512
+ if (skip === void 0) {
18513
+ skip = false;
18514
+ }
18515
+ if (threshold === void 0) {
18516
+ threshold = 1;
18517
+ }
18518
+ cleanup();
18519
+ const elementRectForRootMargin = element.getBoundingClientRect();
18520
+ const {
18521
+ left,
18522
+ top,
18523
+ width,
18524
+ height
18525
+ } = elementRectForRootMargin;
18526
+ if (!skip) {
18527
+ onMove();
18528
+ }
18529
+ if (!width || !height) {
18530
+ return;
18531
+ }
18532
+ const insetTop = floor(top);
18533
+ const insetRight = floor(root.clientWidth - (left + width));
18534
+ const insetBottom = floor(root.clientHeight - (top + height));
18535
+ const insetLeft = floor(left);
18536
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
18537
+ const options = {
18538
+ rootMargin,
18539
+ threshold: max$1(0, min$1(1, threshold)) || 1
18540
+ };
18541
+ let isFirstUpdate = true;
18542
+ function handleObserve(entries) {
18543
+ const ratio = entries[0].intersectionRatio;
18544
+ if (ratio !== threshold) {
18545
+ if (!isFirstUpdate) {
18546
+ return refresh();
18547
+ }
18548
+ if (!ratio) {
18549
+ // If the reference is clipped, the ratio is 0. Throttle the refresh
18550
+ // to prevent an infinite loop of updates.
18551
+ timeoutId = setTimeout(() => {
18552
+ refresh(false, 1e-7);
18553
+ }, 1000);
18554
+ } else {
18555
+ refresh(false, ratio);
18556
+ }
18557
+ }
18558
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
18559
+ // It's possible that even though the ratio is reported as 1, the
18560
+ // element is not actually fully within the IntersectionObserver's root
18561
+ // area anymore. This can happen under performance constraints. This may
18562
+ // be a bug in the browser's IntersectionObserver implementation. To
18563
+ // work around this, we compare the element's bounding rect now with
18564
+ // what it was at the time we created the IntersectionObserver. If they
18565
+ // are not equal then the element moved, so we refresh.
18566
+ refresh();
18567
+ }
18568
+ isFirstUpdate = false;
18569
+ }
18570
+
18571
+ // Older browsers don't support a `document` as the root and will throw an
18572
+ // error.
18573
+ try {
18574
+ io = new IntersectionObserver(handleObserve, {
18575
+ ...options,
18576
+ // Handle <iframe>s
18577
+ root: root.ownerDocument
18578
+ });
18579
+ } catch (_e) {
18580
+ io = new IntersectionObserver(handleObserve, options);
18581
+ }
18582
+ io.observe(element);
18583
+ }
18584
+ refresh(true);
18585
+ return cleanup;
18586
+ }
18587
+
18588
+ /**
18589
+ * Automatically updates the position of the floating element when necessary.
18590
+ * Should only be called when the floating element is mounted on the DOM or
18591
+ * visible on the screen.
18592
+ * @returns cleanup function that should be invoked when the floating element is
18593
+ * removed from the DOM or hidden from the screen.
18594
+ * @see https://floating-ui.com/docs/autoUpdate
18595
+ */
18596
+ function autoUpdate(reference, floating, update, options) {
18597
+ if (options === void 0) {
18598
+ options = {};
18599
+ }
18600
+ const {
18601
+ ancestorScroll = true,
18602
+ ancestorResize = true,
18603
+ elementResize = typeof ResizeObserver === 'function',
18604
+ layoutShift = typeof IntersectionObserver === 'function',
18605
+ animationFrame = false
18606
+ } = options;
18607
+ const referenceEl = unwrapElement(reference);
18608
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
18609
+ ancestors.forEach(ancestor => {
18610
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
18611
+ passive: true
18612
+ });
18613
+ ancestorResize && ancestor.addEventListener('resize', update);
18614
+ });
18615
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
18616
+ let reobserveFrame = -1;
18617
+ let resizeObserver = null;
18618
+ if (elementResize) {
18619
+ resizeObserver = new ResizeObserver(_ref => {
18620
+ let [firstEntry] = _ref;
18621
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
18622
+ // Prevent update loops when using the `size` middleware.
18623
+ // https://github.com/floating-ui/floating-ui/issues/1740
18624
+ resizeObserver.unobserve(floating);
18625
+ cancelAnimationFrame(reobserveFrame);
18626
+ reobserveFrame = requestAnimationFrame(() => {
18627
+ var _resizeObserver;
18628
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
18629
+ });
18630
+ }
18631
+ update();
18632
+ });
18633
+ if (referenceEl && !animationFrame) {
18634
+ resizeObserver.observe(referenceEl);
18635
+ }
18636
+ if (floating) {
18637
+ resizeObserver.observe(floating);
18638
+ }
18639
+ }
18640
+ let frameId;
18641
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
18642
+ if (animationFrame) {
18643
+ frameLoop();
18644
+ }
18645
+ function frameLoop() {
18646
+ const nextRefRect = getBoundingClientRect(reference);
18647
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
18648
+ update();
18649
+ }
18650
+ prevRefRect = nextRefRect;
18651
+ frameId = requestAnimationFrame(frameLoop);
18652
+ }
18653
+ update();
18654
+ return () => {
18655
+ var _resizeObserver2;
18656
+ ancestors.forEach(ancestor => {
18657
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
18658
+ ancestorResize && ancestor.removeEventListener('resize', update);
18659
+ });
18660
+ cleanupIo == null || cleanupIo();
18661
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
18662
+ resizeObserver = null;
18663
+ if (animationFrame) {
18664
+ cancelAnimationFrame(frameId);
18665
+ }
18666
+ };
18667
+ }
18668
+
18669
+ /**
18670
+ * Modifies the placement by translating the floating element along the
18671
+ * specified axes.
18672
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
18673
+ * object may be passed.
18674
+ * @see https://floating-ui.com/docs/offset
18675
+ */
18676
+ const offset$1 = offset$3;
18677
+
18678
+ /**
18679
+ * Optimizes the visibility of the floating element by flipping the `placement`
18680
+ * in order to keep it in view when the preferred placement(s) will overflow the
18681
+ * clipping boundary. Alternative to `autoPlacement`.
18682
+ * @see https://floating-ui.com/docs/flip
18683
+ */
18684
+ const flip$1 = flip$3;
18685
+
18686
+ /**
18687
+ * Provides data to position an inner element of the floating element so that it
18688
+ * appears centered to the reference element.
18689
+ * @see https://floating-ui.com/docs/arrow
18690
+ */
18691
+ const arrow$2 = arrow$3;
18692
+
18693
+ /**
18694
+ * Computes the `x` and `y` coordinates that will place the floating element
18695
+ * next to a given reference element.
18696
+ */
18697
+ const computePosition = (reference, floating, options) => {
18698
+ // This caches the expensive `getClippingElementAncestors` function so that
18699
+ // multiple lifecycle resets re-use the same result. It only lives for a
18700
+ // single call. If other functions become expensive, we can add them as well.
18701
+ const cache = new Map();
18702
+ const mergedOptions = {
18703
+ platform,
18704
+ ...options
18705
+ };
18706
+ const platformWithCache = {
18707
+ ...mergedOptions.platform,
18708
+ _c: cache
18709
+ };
18710
+ return computePosition$2(reference, floating, {
18711
+ ...mergedOptions,
18712
+ platform: platformWithCache
18713
+ });
18714
+ };
18715
+
18716
+ var isClient = typeof document !== 'undefined';
18717
+
18718
+ var noop = function noop() {};
18719
+ var index$1 = isClient ? useLayoutEffect : noop;
18720
+
18721
+ // Fork of `fast-deep-equal` that only does the comparisons we need and compares
18722
+ // functions
18723
+ function deepEqual(a, b) {
18724
+ if (a === b) {
18725
+ return true;
18726
+ }
18727
+ if (typeof a !== typeof b) {
18728
+ return false;
18729
+ }
18730
+ if (typeof a === 'function' && a.toString() === b.toString()) {
18731
+ return true;
18732
+ }
18733
+ let length;
18734
+ let i;
18735
+ let keys;
17984
18736
  if (a && b && typeof a === 'object') {
17985
18737
  if (Array.isArray(a)) {
17986
18738
  length = a.length;
@@ -18238,10 +18990,14 @@ const arrow$1 = options => {
18238
18990
  * object may be passed.
18239
18991
  * @see https://floating-ui.com/docs/offset
18240
18992
  */
18241
- const offset = (options, deps) => ({
18242
- ...offset$1(options),
18243
- options: [options, deps]
18244
- });
18993
+ const offset = (options, deps) => {
18994
+ const result = offset$1(options);
18995
+ return {
18996
+ name: result.name,
18997
+ fn: result.fn,
18998
+ options: [options, deps]
18999
+ };
19000
+ };
18245
19001
 
18246
19002
  /**
18247
19003
  * Optimizes the visibility of the floating element by flipping the `placement`
@@ -18249,10 +19005,14 @@ const offset = (options, deps) => ({
18249
19005
  * clipping boundary. Alternative to `autoPlacement`.
18250
19006
  * @see https://floating-ui.com/docs/flip
18251
19007
  */
18252
- const flip = (options, deps) => ({
18253
- ...flip$1(options),
18254
- options: [options, deps]
18255
- });
19008
+ const flip = (options, deps) => {
19009
+ const result = flip$1(options);
19010
+ return {
19011
+ name: result.name,
19012
+ fn: result.fn,
19013
+ options: [options, deps]
19014
+ };
19015
+ };
18256
19016
 
18257
19017
  /**
18258
19018
  * Provides data to position an inner element of the floating element so that it
@@ -18260,10 +19020,14 @@ const flip = (options, deps) => ({
18260
19020
  * This wraps the core `arrow` middleware to allow React refs as the element.
18261
19021
  * @see https://floating-ui.com/docs/arrow
18262
19022
  */
18263
- const arrow = (options, deps) => ({
18264
- ...arrow$1(options),
18265
- options: [options, deps]
18266
- });
19023
+ const arrow = (options, deps) => {
19024
+ const result = arrow$1(options);
19025
+ return {
19026
+ name: result.name,
19027
+ fn: result.fn,
19028
+ options: [options, deps]
19029
+ };
19030
+ };
18267
19031
 
18268
19032
  // https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379
18269
19033
  const SafeReact = {
@@ -18403,7 +19167,7 @@ const FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props
18403
19167
  // https://github.com/floating-ui/floating-ui/issues/2932
18404
19168
  index(() => {
18405
19169
  if (!floating) return;
18406
- const isRTL = getComputedStyle(floating).direction === 'rtl';
19170
+ const isRTL = getComputedStyle$1(floating).direction === 'rtl';
18407
19171
  if (isRTL) {
18408
19172
  setIsRTL(true);
18409
19173
  }
@@ -18578,7 +19342,7 @@ function useFloating(options) {
18578
19342
  const computedElements = rootContext.elements;
18579
19343
  const [_domReference, setDomReference] = React.useState(null);
18580
19344
  const [positionReference, _setPositionReference] = React.useState(null);
18581
- const optionDomReference = computedElements == null ? void 0 : computedElements.reference;
19345
+ const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
18582
19346
  const domReference = optionDomReference || _domReference;
18583
19347
  const domReferenceRef = React.useRef(null);
18584
19348
  const tree = useFloatingTree();
@@ -23954,7 +24718,7 @@ const DateTimePickerInput = /*#__PURE__*/React__default.forwardRef(function Date
23954
24718
  var css_248z = ".react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow,.react-datepicker__navigation-icon::before{border-color:#ccc;border-style:solid;border-width:3px 3px 0 0;content:\"\";display:block;height:9px;position:absolute;top:6px;width:9px}.react-datepicker-wrapper{display:inline-block;padding:0;border:0}.react-datepicker{font-family:\"Helvetica Neue\",helvetica,arial,sans-serif;font-size:.8rem;background-color:#fff;color:#000;border:1px solid #aeaeae;border-radius:.3rem;display:inline-block;position:relative;line-height:initial}.react-datepicker--time-only .react-datepicker__time-container{border-left:0}.react-datepicker--time-only .react-datepicker__time,.react-datepicker--time-only .react-datepicker__time-box{border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.react-datepicker-popper{z-index:1;line-height:0}.react-datepicker-popper .react-datepicker__triangle{stroke:#aeaeae}.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle{fill:#f0f0f0;color:#f0f0f0}.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle{fill:#fff;color:#fff}.react-datepicker__header{text-align:center;background-color:#f0f0f0;border-bottom:1px solid #aeaeae;border-top-left-radius:.3rem;padding:8px 0;position:relative}.react-datepicker__header--time{padding-bottom:8px;padding-left:5px;padding-right:5px}.react-datepicker__header--time:not(.react-datepicker__header--time--only){border-top-left-radius:0}.react-datepicker__header:not(.react-datepicker__header--has-time-select){border-top-right-radius:.3rem}.react-datepicker__year-dropdown-container--select,.react-datepicker__month-dropdown-container--select,.react-datepicker__month-year-dropdown-container--select,.react-datepicker__year-dropdown-container--scroll,.react-datepicker__month-dropdown-container--scroll,.react-datepicker__month-year-dropdown-container--scroll{display:inline-block;margin:0 15px}.react-datepicker__current-month,.react-datepicker-time__header,.react-datepicker-year-header{margin-top:0;color:#000;font-weight:bold;font-size:.944rem}h2.react-datepicker__current-month{padding:0;margin:0}.react-datepicker-time__header{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.react-datepicker__navigation{align-items:center;background:none;display:flex;justify-content:center;text-align:center;cursor:pointer;position:absolute;top:2px;padding:0;border:none;z-index:1;height:32px;width:32px;text-indent:-999em;overflow:hidden}.react-datepicker__navigation--previous{left:2px}.react-datepicker__navigation--next{right:2px}.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button){right:85px}.react-datepicker__navigation--years{position:relative;top:0;display:block;margin-left:auto;margin-right:auto}.react-datepicker__navigation--years-previous{top:4px}.react-datepicker__navigation--years-upcoming{top:-4px}.react-datepicker__navigation:hover *::before{border-color:hsl(0,0%,65%)}.react-datepicker__navigation-icon{position:relative;top:-1px;font-size:20px;width:0}.react-datepicker__navigation-icon--next{left:-2px}.react-datepicker__navigation-icon--next::before{transform:rotate(45deg);left:-7px}.react-datepicker__navigation-icon--previous{right:-2px}.react-datepicker__navigation-icon--previous::before{transform:rotate(225deg);right:-7px}.react-datepicker__month-container{float:left}.react-datepicker__year{margin:.4rem;text-align:center}.react-datepicker__year-wrapper{display:flex;flex-wrap:wrap;max-width:180px}.react-datepicker__year .react-datepicker__year-text{display:inline-block;width:4rem;margin:2px}.react-datepicker__month{margin:.4rem;text-align:center}.react-datepicker__month .react-datepicker__month-text,.react-datepicker__month .react-datepicker__quarter-text{display:inline-block;width:4rem;margin:2px}.react-datepicker__input-time-container{clear:both;width:100%;float:left;margin:5px 0 10px 15px;text-align:left}.react-datepicker__input-time-container .react-datepicker-time__caption{display:inline-block}.react-datepicker__input-time-container .react-datepicker-time__input-container{display:inline-block}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input{display:inline-block;margin-left:10px}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input{width:auto}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]{-moz-appearance:textfield}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter{margin-left:5px;display:inline-block}.react-datepicker__time-container{float:right;border-left:1px solid #aeaeae;width:85px}.react-datepicker__time-container--with-today-button{display:inline;border:1px solid #aeaeae;border-radius:.3rem;position:absolute;right:-87px;top:0}.react-datepicker__time-container .react-datepicker__time{position:relative;background:#fff;border-bottom-right-radius:.3rem}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{width:85px;overflow-x:hidden;margin:0 auto;text-align:center;border-bottom-right-radius:.3rem}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list{list-style:none;margin:0;height:calc(195px + 1.7rem/2);overflow-y:scroll;padding-right:0;padding-left:0;width:100%;box-sizing:content-box}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:30px;padding:5px 10px;white-space:nowrap}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover{cursor:pointer;background-color:#f0f0f0}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected{background-color:#216ba5;color:#fff;font-weight:bold}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover{background-color:#216ba5}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled{color:#ccc}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover{cursor:default;background-color:rgba(0,0,0,0)}.react-datepicker__week-number{color:#ccc;display:inline-block;width:1.7rem;line-height:1.7rem;text-align:center;margin:.166rem}.react-datepicker__week-number.react-datepicker__week-number--clickable{cursor:pointer}.react-datepicker__week-number.react-datepicker__week-number--clickable:not(.react-datepicker__week-number--selected,.react-datepicker__week-number--keyboard-selected):hover{border-radius:.3rem;background-color:#f0f0f0}.react-datepicker__week-number--selected{border-radius:.3rem;background-color:#216ba5;color:#fff}.react-datepicker__week-number--selected:hover{background-color:rgb(28.75,93.2196969697,143.75)}.react-datepicker__week-number--keyboard-selected{border-radius:.3rem;background-color:rgb(41.5,134.5606060606,207.5);color:#fff}.react-datepicker__week-number--keyboard-selected:hover{background-color:rgb(28.75,93.2196969697,143.75)}.react-datepicker__day-names{white-space:nowrap;margin-bottom:-8px}.react-datepicker__week{white-space:nowrap}.react-datepicker__day-name,.react-datepicker__day,.react-datepicker__time-name{color:#000;display:inline-block;width:1.7rem;line-height:1.7rem;text-align:center;margin:.166rem}.react-datepicker__day,.react-datepicker__month-text,.react-datepicker__quarter-text,.react-datepicker__year-text{cursor:pointer}.react-datepicker__day:not([aria-disabled=true]):hover,.react-datepicker__month-text:not([aria-disabled=true]):hover,.react-datepicker__quarter-text:not([aria-disabled=true]):hover,.react-datepicker__year-text:not([aria-disabled=true]):hover{border-radius:.3rem;background-color:#f0f0f0}.react-datepicker__day--today,.react-datepicker__month-text--today,.react-datepicker__quarter-text--today,.react-datepicker__year-text--today{font-weight:bold}.react-datepicker__day--highlighted,.react-datepicker__month-text--highlighted,.react-datepicker__quarter-text--highlighted,.react-datepicker__year-text--highlighted{border-radius:.3rem;background-color:#3dcc4a;color:#fff}.react-datepicker__day--highlighted:not([aria-disabled=true]):hover,.react-datepicker__month-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__year-text--highlighted:not([aria-disabled=true]):hover{background-color:rgb(49.8551020408,189.6448979592,62.5632653061)}.react-datepicker__day--highlighted-custom-1,.react-datepicker__month-text--highlighted-custom-1,.react-datepicker__quarter-text--highlighted-custom-1,.react-datepicker__year-text--highlighted-custom-1{color:#f0f}.react-datepicker__day--highlighted-custom-2,.react-datepicker__month-text--highlighted-custom-2,.react-datepicker__quarter-text--highlighted-custom-2,.react-datepicker__year-text--highlighted-custom-2{color:green}.react-datepicker__day--holidays,.react-datepicker__month-text--holidays,.react-datepicker__quarter-text--holidays,.react-datepicker__year-text--holidays{position:relative;border-radius:.3rem;background-color:#ff6803;color:#fff}.react-datepicker__day--holidays .overlay,.react-datepicker__month-text--holidays .overlay,.react-datepicker__quarter-text--holidays .overlay,.react-datepicker__year-text--holidays .overlay{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background-color:#333;color:#fff;padding:4px;border-radius:4px;white-space:nowrap;visibility:hidden;opacity:0;transition:visibility 0s,opacity .3s ease-in-out}.react-datepicker__day--holidays:not([aria-disabled=true]):hover,.react-datepicker__month-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__year-text--holidays:not([aria-disabled=true]):hover{background-color:rgb(207,82.9642857143,0)}.react-datepicker__day--holidays:hover .overlay,.react-datepicker__month-text--holidays:hover .overlay,.react-datepicker__quarter-text--holidays:hover .overlay,.react-datepicker__year-text--holidays:hover .overlay{visibility:visible;opacity:1}.react-datepicker__day--selected,.react-datepicker__day--in-selecting-range,.react-datepicker__day--in-range,.react-datepicker__month-text--selected,.react-datepicker__month-text--in-selecting-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--selected,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--selected,.react-datepicker__year-text--in-selecting-range,.react-datepicker__year-text--in-range{border-radius:.3rem;background-color:#216ba5;color:#fff}.react-datepicker__day--selected:not([aria-disabled=true]):hover,.react-datepicker__day--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__day--in-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-range:not([aria-disabled=true]):hover{background-color:rgb(28.75,93.2196969697,143.75)}.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected,.react-datepicker__quarter-text--keyboard-selected,.react-datepicker__year-text--keyboard-selected{border-radius:.3rem;background-color:rgb(186.25,217.0833333333,241.25);color:#000}.react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--keyboard-selected:not([aria-disabled=true]):hover{background-color:rgb(28.75,93.2196969697,143.75)}.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range){background-color:rgba(33,107,165,.5)}.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range){background-color:#f0f0f0;color:#000}.react-datepicker__day--disabled,.react-datepicker__month-text--disabled,.react-datepicker__quarter-text--disabled,.react-datepicker__year-text--disabled{cursor:default;color:#ccc}.react-datepicker__day--disabled .overlay,.react-datepicker__month-text--disabled .overlay,.react-datepicker__quarter-text--disabled .overlay,.react-datepicker__year-text--disabled .overlay{position:absolute;bottom:70%;left:50%;transform:translateX(-50%);background-color:#333;color:#fff;padding:4px;border-radius:4px;white-space:nowrap;visibility:hidden;opacity:0;transition:visibility 0s,opacity .3s ease-in-out}.react-datepicker__input-container{position:relative;display:inline-block;width:100%}.react-datepicker__input-container .react-datepicker__calendar-icon{position:absolute;padding:.5rem;box-sizing:content-box}.react-datepicker__view-calendar-icon input{padding:6px 10px 5px 25px}.react-datepicker__year-read-view,.react-datepicker__month-read-view,.react-datepicker__month-year-read-view{border:1px solid rgba(0,0,0,0);border-radius:.3rem;position:relative}.react-datepicker__year-read-view:hover,.react-datepicker__month-read-view:hover,.react-datepicker__month-year-read-view:hover{cursor:pointer}.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow{border-top-color:hsl(0,0%,70%)}.react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow{transform:rotate(135deg);right:-16px;top:0}.react-datepicker__year-dropdown,.react-datepicker__month-dropdown,.react-datepicker__month-year-dropdown{background-color:#f0f0f0;position:absolute;width:50%;left:25%;top:30px;z-index:1;text-align:center;border-radius:.3rem;border:1px solid #aeaeae}.react-datepicker__year-dropdown:hover,.react-datepicker__month-dropdown:hover,.react-datepicker__month-year-dropdown:hover{cursor:pointer}.react-datepicker__year-dropdown--scrollable,.react-datepicker__month-dropdown--scrollable,.react-datepicker__month-year-dropdown--scrollable{height:150px;overflow-y:scroll}.react-datepicker__year-option,.react-datepicker__month-option,.react-datepicker__month-year-option{line-height:20px;width:100%;display:block;margin-left:auto;margin-right:auto}.react-datepicker__year-option:first-of-type,.react-datepicker__month-option:first-of-type,.react-datepicker__month-year-option:first-of-type{border-top-left-radius:.3rem;border-top-right-radius:.3rem}.react-datepicker__year-option:last-of-type,.react-datepicker__month-option:last-of-type,.react-datepicker__month-year-option:last-of-type{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.react-datepicker__year-option:hover,.react-datepicker__month-option:hover,.react-datepicker__month-year-option:hover{background-color:#ccc}.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming{border-bottom-color:hsl(0,0%,70%)}.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous{border-top-color:hsl(0,0%,70%)}.react-datepicker__year-option--selected,.react-datepicker__month-option--selected,.react-datepicker__month-year-option--selected{position:absolute;left:15px}.react-datepicker__close-icon{cursor:pointer;background-color:rgba(0,0,0,0);border:0;outline:0;padding:0 6px 0 0;position:absolute;top:0;right:0;height:100%;display:table-cell;vertical-align:middle}.react-datepicker__close-icon::after{cursor:pointer;background-color:#216ba5;color:#fff;border-radius:50%;height:16px;width:16px;padding:2px;font-size:12px;line-height:1;text-align:center;display:table-cell;vertical-align:middle;content:\"×\"}.react-datepicker__close-icon--disabled{cursor:default}.react-datepicker__close-icon--disabled::after{cursor:default;background-color:#ccc}.react-datepicker__today-button{background:#f0f0f0;border-top:1px solid #aeaeae;cursor:pointer;text-align:center;font-weight:bold;padding:5px 0;clear:left}.react-datepicker__portal{position:fixed;width:100vw;height:100vh;background-color:rgba(0,0,0,.8);left:0;top:0;justify-content:center;align-items:center;display:flex;z-index:2147483647}.react-datepicker__portal .react-datepicker__day-name,.react-datepicker__portal .react-datepicker__day,.react-datepicker__portal .react-datepicker__time-name{width:3rem;line-height:3rem}@media(max-width: 400px),(max-height: 550px){.react-datepicker__portal .react-datepicker__day-name,.react-datepicker__portal .react-datepicker__day,.react-datepicker__portal .react-datepicker__time-name{width:2rem;line-height:2rem}}.react-datepicker__portal .react-datepicker__current-month,.react-datepicker__portal .react-datepicker-time__header{font-size:1.44rem}.react-datepicker__children-container{width:13.8rem;margin:.4rem;padding-right:.2rem;padding-left:.2rem;height:auto}.react-datepicker__aria-live{position:absolute;clip-path:circle(0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;white-space:nowrap}.react-datepicker__calendar-icon{width:1em;height:1em;vertical-align:-0.125em}\n";
23955
24719
  styleInject(css_248z);
23956
24720
 
23957
- const DEFAULT_MODIFIERS = [flip$1({
24721
+ const DEFAULT_MODIFIERS = [flip$2({
23958
24722
  fallbackPlacements: ['bottom']
23959
24723
  }), shift({
23960
24724
  limiter: limitShift()
@@ -24426,6 +25190,68 @@ const TextArea = /*#__PURE__*/React__default.forwardRef(function TextAreaFn({
24426
25190
  }, description));
24427
25191
  });
24428
25192
 
25193
+ var es_array_includes = {};
25194
+
25195
+ var addToUnscopables;
25196
+ var hasRequiredAddToUnscopables;
25197
+
25198
+ function requireAddToUnscopables () {
25199
+ if (hasRequiredAddToUnscopables) return addToUnscopables;
25200
+ hasRequiredAddToUnscopables = 1;
25201
+ var wellKnownSymbol = requireWellKnownSymbol();
25202
+ var create = requireObjectCreate();
25203
+ var defineProperty = requireObjectDefineProperty().f;
25204
+
25205
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
25206
+ var ArrayPrototype = Array.prototype;
25207
+
25208
+ // Array.prototype[@@unscopables]
25209
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
25210
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
25211
+ defineProperty(ArrayPrototype, UNSCOPABLES, {
25212
+ configurable: true,
25213
+ value: create(null)
25214
+ });
25215
+ }
25216
+
25217
+ // add a key to Array.prototype[@@unscopables]
25218
+ addToUnscopables = function (key) {
25219
+ ArrayPrototype[UNSCOPABLES][key] = true;
25220
+ };
25221
+ return addToUnscopables;
25222
+ }
25223
+
25224
+ var hasRequiredEs_array_includes;
25225
+
25226
+ function requireEs_array_includes () {
25227
+ if (hasRequiredEs_array_includes) return es_array_includes;
25228
+ hasRequiredEs_array_includes = 1;
25229
+ var $ = require_export();
25230
+ var $includes = requireArrayIncludes().includes;
25231
+ var fails = requireFails();
25232
+ var addToUnscopables = requireAddToUnscopables();
25233
+
25234
+ // FF99+ bug
25235
+ var BROKEN_ON_SPARSE = fails(function () {
25236
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
25237
+ return !Array(1).includes();
25238
+ });
25239
+
25240
+ // `Array.prototype.includes` method
25241
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
25242
+ $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
25243
+ includes: function includes(el /* , fromIndex = 0 */) {
25244
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
25245
+ }
25246
+ });
25247
+
25248
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
25249
+ addToUnscopables('includes');
25250
+ return es_array_includes;
25251
+ }
25252
+
25253
+ requireEs_array_includes();
25254
+
24429
25255
  const DEFAULT_TRANSITION_TIMING = 'cubic-bezier(0.4, 0, 0.2, 1)';
24430
25256
  const DEFAULT_TRANSITION_DURATION = 225;
24431
25257
  const STYLES = {
@@ -25483,7 +26309,7 @@ const Popper = /*#__PURE__*/React__default.forwardRef(function PopperFn({
25483
26309
  if (popperRef.current) {
25484
26310
  cleanup = setupFloating(virtualEl || anchorElement, popperRef.current, {
25485
26311
  placement,
25486
- middleware: [offset$1(8), !virtualEl && flip$1({
26312
+ middleware: [offset$2(8), !virtualEl && flip$2({
25487
26313
  fallbackPlacements: ['bottom']
25488
26314
  }), shift({
25489
26315
  limiter: limitShift()
@@ -26027,7 +26853,7 @@ const CollapsingActions = /*#__PURE__*/React__default.forwardRef(function Collap
26027
26853
  icon: "MoreVertical",
26028
26854
  size: globalIconSize,
26029
26855
  color: globalIconColor,
26030
- onClick: noop
26856
+ onClick: noop$1
26031
26857
  }))));
26032
26858
  });
26033
26859
 
@@ -26464,7 +27290,7 @@ const Modal = /*#__PURE__*/React__default.forwardRef(function ModalFn({
26464
27290
  secondaryActionLabel,
26465
27291
  secondaryActionDisabled,
26466
27292
  secondaryActionTooltip,
26467
- onClose = noop,
27293
+ onClose = noop$1,
26468
27294
  dismissLabel,
26469
27295
  optionalFooter,
26470
27296
  customFooter,