@lumx/react 3.20.1-alpha.27 → 3.20.1-alpha.29

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.
Files changed (197) hide show
  1. package/index.js +14033 -63
  2. package/index.js.map +1 -1
  3. package/package.json +7 -13
  4. package/utils/index.js +158 -3
  5. package/utils/index.js.map +1 -1
  6. package/_internal/Button-2b55a913.js +0 -97
  7. package/_internal/Button-2b55a913.js.map +0 -1
  8. package/_internal/ButtonRoot-823f3e9c.js +0 -117
  9. package/_internal/ButtonRoot-823f3e9c.js.map +0 -1
  10. package/_internal/Chip-e1e85810.js +0 -143
  11. package/_internal/Chip-e1e85810.js.map +0 -1
  12. package/_internal/ClickAwayProvider-1204f237.js +0 -95
  13. package/_internal/ClickAwayProvider-1204f237.js.map +0 -1
  14. package/_internal/DisabledStateContext-ea04260d.js +0 -29
  15. package/_internal/DisabledStateContext-ea04260d.js.map +0 -1
  16. package/_internal/HeadingLevelProvider-ebdcb0c7.js +0 -61
  17. package/_internal/HeadingLevelProvider-ebdcb0c7.js.map +0 -1
  18. package/_internal/IconButton-be160cb0.js +0 -77
  19. package/_internal/IconButton-be160cb0.js.map +0 -1
  20. package/_internal/ImageCaption-fcf5720c.js +0 -75
  21. package/_internal/ImageCaption-fcf5720c.js.map +0 -1
  22. package/_internal/List-dbf4297f.js +0 -791
  23. package/_internal/List-dbf4297f.js.map +0 -1
  24. package/_internal/PopoverDialog-193a0918.js +0 -655
  25. package/_internal/PopoverDialog-193a0918.js.map +0 -1
  26. package/_internal/Portal-3f86608e.js +0 -45
  27. package/_internal/Portal-3f86608e.js.map +0 -1
  28. package/_internal/RawClickable-2c2b6a89.js +0 -52
  29. package/_internal/RawClickable-2c2b6a89.js.map +0 -1
  30. package/_internal/Slides-2d267d8c.js +0 -679
  31. package/_internal/Slides-2d267d8c.js.map +0 -1
  32. package/_internal/ThemeContext-3181f000.js +0 -14
  33. package/_internal/ThemeContext-3181f000.js.map +0 -1
  34. package/_internal/Thumbnail-0872250e.js +0 -314
  35. package/_internal/Thumbnail-0872250e.js.map +0 -1
  36. package/_internal/check-circle-de24f857.js +0 -4
  37. package/_internal/check-circle-de24f857.js.map +0 -1
  38. package/_internal/chevron-right-827b804a.js +0 -6
  39. package/_internal/chevron-right-827b804a.js.map +0 -1
  40. package/_internal/chevron-up-0b9c76cb.js +0 -6
  41. package/_internal/chevron-up-0b9c76cb.js.map +0 -1
  42. package/_internal/close-circle-ef5d1aac.js +0 -4
  43. package/_internal/close-circle-ef5d1aac.js.map +0 -1
  44. package/_internal/close-eaf6c45a.js +0 -4
  45. package/_internal/close-eaf6c45a.js.map +0 -1
  46. package/_internal/components/alert-dialog-a6ed922b.js +0 -163
  47. package/_internal/components/alert-dialog-a6ed922b.js.map +0 -1
  48. package/_internal/components/autocomplete-c97b7698.js +0 -261
  49. package/_internal/components/autocomplete-c97b7698.js.map +0 -1
  50. package/_internal/components/avatar-d2214a61.js +0 -83
  51. package/_internal/components/avatar-d2214a61.js.map +0 -1
  52. package/_internal/components/badge-8390e590.js +0 -81
  53. package/_internal/components/badge-8390e590.js.map +0 -1
  54. package/_internal/components/button-b05f8f0c.js +0 -47
  55. package/_internal/components/button-b05f8f0c.js.map +0 -1
  56. package/_internal/components/checkbox-346834f8.js +0 -143
  57. package/_internal/components/checkbox-346834f8.js.map +0 -1
  58. package/_internal/components/chip-e3a6330f.js +0 -102
  59. package/_internal/components/chip-e3a6330f.js.map +0 -1
  60. package/_internal/components/comment-block-b1acc69f.js +0 -138
  61. package/_internal/components/comment-block-b1acc69f.js.map +0 -1
  62. package/_internal/components/date-picker-582c4925.js +0 -2
  63. package/_internal/components/date-picker-582c4925.js.map +0 -1
  64. package/_internal/components/dialog-785646aa.js +0 -238
  65. package/_internal/components/dialog-785646aa.js.map +0 -1
  66. package/_internal/components/divider-116af6b9.js +0 -50
  67. package/_internal/components/divider-116af6b9.js.map +0 -1
  68. package/_internal/components/drag-handle-6b073866.js +0 -52
  69. package/_internal/components/drag-handle-6b073866.js.map +0 -1
  70. package/_internal/components/dropdown-c0c0cfe8.js +0 -147
  71. package/_internal/components/dropdown-c0c0cfe8.js.map +0 -1
  72. package/_internal/components/expansion-panel-1de1d1ff.js +0 -167
  73. package/_internal/components/expansion-panel-1de1d1ff.js.map +0 -1
  74. package/_internal/components/flag-7c9d3abf.js +0 -59
  75. package/_internal/components/flag-7c9d3abf.js.map +0 -1
  76. package/_internal/components/flex-box-10423fa5.js +0 -56
  77. package/_internal/components/flex-box-10423fa5.js.map +0 -1
  78. package/_internal/components/generic-block-b79f163a.js +0 -128
  79. package/_internal/components/generic-block-b79f163a.js.map +0 -1
  80. package/_internal/components/grid-6f1b5a41.js +0 -104
  81. package/_internal/components/grid-6f1b5a41.js.map +0 -1
  82. package/_internal/components/grid-column-ee504283.js +0 -58
  83. package/_internal/components/grid-column-ee504283.js.map +0 -1
  84. package/_internal/components/heading-d4c66a34.js +0 -53
  85. package/_internal/components/heading-d4c66a34.js.map +0 -1
  86. package/_internal/components/icon-7c79ab42.js +0 -2
  87. package/_internal/components/icon-7c79ab42.js.map +0 -1
  88. package/_internal/components/image-block-762eb669.js +0 -110
  89. package/_internal/components/image-block-762eb669.js.map +0 -1
  90. package/_internal/components/image-lightbox-10fef304.js +0 -759
  91. package/_internal/components/image-lightbox-10fef304.js.map +0 -1
  92. package/_internal/components/inline-list-e6f19a98.js +0 -74
  93. package/_internal/components/inline-list-e6f19a98.js.map +0 -1
  94. package/_internal/components/input-helper-64153099.js +0 -71
  95. package/_internal/components/input-helper-64153099.js.map +0 -1
  96. package/_internal/components/input-label-2feb0bb0.js +0 -59
  97. package/_internal/components/input-label-2feb0bb0.js.map +0 -1
  98. package/_internal/components/lightbox-dcc9a7a0.js +0 -155
  99. package/_internal/components/lightbox-dcc9a7a0.js.map +0 -1
  100. package/_internal/components/link-f9421eab.js +0 -72
  101. package/_internal/components/link-f9421eab.js.map +0 -1
  102. package/_internal/components/link-preview-5c7e3878.js +0 -117
  103. package/_internal/components/link-preview-5c7e3878.js.map +0 -1
  104. package/_internal/components/list-f29e54b7.js +0 -71
  105. package/_internal/components/list-f29e54b7.js.map +0 -1
  106. package/_internal/components/message-aa3e3f76.js +0 -98
  107. package/_internal/components/message-aa3e3f76.js.map +0 -1
  108. package/_internal/components/mosaic-b4b35fa7.js +0 -94
  109. package/_internal/components/mosaic-b4b35fa7.js.map +0 -1
  110. package/_internal/components/navigation-8357dbe6.js +0 -225
  111. package/_internal/components/navigation-8357dbe6.js.map +0 -1
  112. package/_internal/components/notification-ec4cf95f.js +0 -143
  113. package/_internal/components/notification-ec4cf95f.js.map +0 -1
  114. package/_internal/components/popover-a674dd8d.js +0 -3
  115. package/_internal/components/popover-a674dd8d.js.map +0 -1
  116. package/_internal/components/post-block-bb3d3cbf.js +0 -109
  117. package/_internal/components/post-block-bb3d3cbf.js.map +0 -1
  118. package/_internal/components/progress-f39c3fa2.js +0 -182
  119. package/_internal/components/progress-f39c3fa2.js.map +0 -1
  120. package/_internal/components/progress-tracker-997931ac.js +0 -309
  121. package/_internal/components/progress-tracker-997931ac.js.map +0 -1
  122. package/_internal/components/radio-button-559a4863.js +0 -149
  123. package/_internal/components/radio-button-559a4863.js.map +0 -1
  124. package/_internal/components/select-8295a416.js +0 -457
  125. package/_internal/components/select-8295a416.js.map +0 -1
  126. package/_internal/components/side-navigation-40ee8bda.js +0 -164
  127. package/_internal/components/side-navigation-40ee8bda.js.map +0 -1
  128. package/_internal/components/skeleton-c66516ee.js +0 -166
  129. package/_internal/components/skeleton-c66516ee.js.map +0 -1
  130. package/_internal/components/slider-efbfbc45.js +0 -311
  131. package/_internal/components/slider-efbfbc45.js.map +0 -1
  132. package/_internal/components/slideshow-c5faf531.js +0 -151
  133. package/_internal/components/slideshow-c5faf531.js.map +0 -1
  134. package/_internal/components/switch-a26a5a72.js +0 -121
  135. package/_internal/components/switch-a26a5a72.js.map +0 -1
  136. package/_internal/components/table-c43ec4a5.js +0 -297
  137. package/_internal/components/table-c43ec4a5.js.map +0 -1
  138. package/_internal/components/tabs-4037fe57.js +0 -298
  139. package/_internal/components/tabs-4037fe57.js.map +0 -1
  140. package/_internal/components/text-851c62f8.js +0 -2
  141. package/_internal/components/text-851c62f8.js.map +0 -1
  142. package/_internal/components/text-field-82adaeb4.js +0 -359
  143. package/_internal/components/text-field-82adaeb4.js.map +0 -1
  144. package/_internal/components/thumbnail-f1784929.js +0 -42
  145. package/_internal/components/thumbnail-f1784929.js.map +0 -1
  146. package/_internal/components/toolbar-a43533a2.js +0 -61
  147. package/_internal/components/toolbar-a43533a2.js.map +0 -1
  148. package/_internal/components/tooltip-aa48ddda.js +0 -327
  149. package/_internal/components/tooltip-aa48ddda.js.map +0 -1
  150. package/_internal/components/uploader-7bc3adaa.js +0 -153
  151. package/_internal/components/uploader-7bc3adaa.js.map +0 -1
  152. package/_internal/components/user-block-fc03f01a.js +0 -144
  153. package/_internal/components/user-block-fc03f01a.js.map +0 -1
  154. package/_internal/constants-b9e57936.js +0 -2155
  155. package/_internal/constants-b9e57936.js.map +0 -1
  156. package/_internal/constants-d0e3f49e.js +0 -24
  157. package/_internal/constants-d0e3f49e.js.map +0 -1
  158. package/_internal/context-9d1336a1.js +0 -19
  159. package/_internal/context-9d1336a1.js.map +0 -1
  160. package/_internal/forwardRef-15f62847.js +0 -70
  161. package/_internal/forwardRef-15f62847.js.map +0 -1
  162. package/_internal/getFocusableElements-230173a8.js +0 -13
  163. package/_internal/getFocusableElements-230173a8.js.map +0 -1
  164. package/_internal/index-192f8ada.js +0 -103
  165. package/_internal/index-192f8ada.js.map +0 -1
  166. package/_internal/index-8e7fecb5.js +0 -436
  167. package/_internal/index-8e7fecb5.js.map +0 -1
  168. package/_internal/index-b06353f2.js +0 -117
  169. package/_internal/index-b06353f2.js.map +0 -1
  170. package/_internal/information-49bbeed3.js +0 -6
  171. package/_internal/information-49bbeed3.js.map +0 -1
  172. package/_internal/isComponent-b9762ff1.js +0 -18
  173. package/_internal/isComponent-b9762ff1.js.map +0 -1
  174. package/_internal/isComponentType-e806b848.js +0 -9
  175. package/_internal/isComponentType-e806b848.js.map +0 -1
  176. package/_internal/mergeRefs-f0d7d6ea.js +0 -30
  177. package/_internal/mergeRefs-f0d7d6ea.js.map +0 -1
  178. package/_internal/state-db358714.js +0 -130
  179. package/_internal/state-db358714.js.map +0 -1
  180. package/_internal/useBooleanState-2a3d237c.js +0 -12
  181. package/_internal/useBooleanState-2a3d237c.js.map +0 -1
  182. package/_internal/useCallbackOnEscape-0b220f9c.js +0 -62
  183. package/_internal/useCallbackOnEscape-0b220f9c.js.map +0 -1
  184. package/_internal/useDisableBodyScroll-36bd7352.js +0 -219
  185. package/_internal/useDisableBodyScroll-36bd7352.js.map +0 -1
  186. package/_internal/useDisableStateProps-69e16b7c.js +0 -36
  187. package/_internal/useDisableStateProps-69e16b7c.js.map +0 -1
  188. package/_internal/useFocusTrap-3114e5e8.js +0 -112
  189. package/_internal/useFocusTrap-3114e5e8.js.map +0 -1
  190. package/_internal/useId-3a1facc0.js +0 -18
  191. package/_internal/useId-3a1facc0.js.map +0 -1
  192. package/_internal/useRovingTabIndex-7daf0f24.js +0 -77
  193. package/_internal/useRovingTabIndex-7daf0f24.js.map +0 -1
  194. package/_internal/useTransitionVisibility-321fdbfa.js +0 -50
  195. package/_internal/useTransitionVisibility-321fdbfa.js.map +0 -1
  196. package/_internal/wrapChildrenIconWithSpaces-f1e91251.js +0 -20
  197. package/_internal/wrapChildrenIconWithSpaces-f1e91251.js.map +0 -1
@@ -1,2155 +0,0 @@
1
- import * as React from 'react';
2
- import { I as IS_BROWSER } from './constants-d0e3f49e.js';
3
-
4
- var top = 'top';
5
- var bottom = 'bottom';
6
- var right = 'right';
7
- var left = 'left';
8
- var auto = 'auto';
9
- var basePlacements = [top, bottom, right, left];
10
- var start = 'start';
11
- var end = 'end';
12
- var clippingParents = 'clippingParents';
13
- var viewport = 'viewport';
14
- var popper = 'popper';
15
- var reference = 'reference';
16
- var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
17
- return acc.concat([placement + "-" + start, placement + "-" + end]);
18
- }, []);
19
- var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
20
- return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
21
- }, []); // modifiers that need to read the DOM
22
-
23
- var beforeRead = 'beforeRead';
24
- var read = 'read';
25
- var afterRead = 'afterRead'; // pure-logic modifiers
26
-
27
- var beforeMain = 'beforeMain';
28
- var main = 'main';
29
- var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
30
-
31
- var beforeWrite = 'beforeWrite';
32
- var write = 'write';
33
- var afterWrite = 'afterWrite';
34
- var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
35
-
36
- function getNodeName(element) {
37
- return element ? (element.nodeName || '').toLowerCase() : null;
38
- }
39
-
40
- /*:: import type { Window } from '../types'; */
41
-
42
- /*:: declare function getWindow(node: Node | Window): Window; */
43
- function getWindow(node) {
44
- if (node.toString() !== '[object Window]') {
45
- var ownerDocument = node.ownerDocument;
46
- return ownerDocument ? ownerDocument.defaultView || window : window;
47
- }
48
-
49
- return node;
50
- }
51
-
52
- /*:: declare function isElement(node: mixed): boolean %checks(node instanceof
53
- Element); */
54
-
55
- function isElement(node) {
56
- var OwnElement = getWindow(node).Element;
57
- return node instanceof OwnElement || node instanceof Element;
58
- }
59
- /*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof
60
- HTMLElement); */
61
-
62
-
63
- function isHTMLElement(node) {
64
- var OwnElement = getWindow(node).HTMLElement;
65
- return node instanceof OwnElement || node instanceof HTMLElement;
66
- }
67
- /*:: declare function isShadowRoot(node: mixed): boolean %checks(node instanceof
68
- ShadowRoot); */
69
-
70
-
71
- function isShadowRoot(node) {
72
- var OwnElement = getWindow(node).ShadowRoot;
73
- return node instanceof OwnElement || node instanceof ShadowRoot;
74
- }
75
-
76
- // and applies them to the HTMLElements such as popper and arrow
77
-
78
- function applyStyles(_ref) {
79
- var state = _ref.state;
80
- Object.keys(state.elements).forEach(function (name) {
81
- var style = state.styles[name] || {};
82
- var attributes = state.attributes[name] || {};
83
- var element = state.elements[name]; // arrow is optional + virtual elements
84
-
85
- if (!isHTMLElement(element) || !getNodeName(element)) {
86
- return;
87
- } // Flow doesn't support to extend this property, but it's the most
88
- // effective way to apply styles to an HTMLElement
89
- // $FlowFixMe
90
-
91
-
92
- Object.assign(element.style, style);
93
- Object.keys(attributes).forEach(function (name) {
94
- var value = attributes[name];
95
-
96
- if (value === false) {
97
- element.removeAttribute(name);
98
- } else {
99
- element.setAttribute(name, value === true ? '' : value);
100
- }
101
- });
102
- });
103
- }
104
-
105
- function effect$2(_ref2) {
106
- var state = _ref2.state;
107
- var initialStyles = {
108
- popper: {
109
- position: state.options.strategy,
110
- left: '0',
111
- top: '0',
112
- margin: '0'
113
- },
114
- arrow: {
115
- position: 'absolute'
116
- },
117
- reference: {}
118
- };
119
- Object.assign(state.elements.popper.style, initialStyles.popper);
120
-
121
- if (state.elements.arrow) {
122
- Object.assign(state.elements.arrow.style, initialStyles.arrow);
123
- }
124
-
125
- return function () {
126
- Object.keys(state.elements).forEach(function (name) {
127
- var element = state.elements[name];
128
- var attributes = state.attributes[name] || {};
129
- var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
130
-
131
- var style = styleProperties.reduce(function (style, property) {
132
- style[property] = '';
133
- return style;
134
- }, {}); // arrow is optional + virtual elements
135
-
136
- if (!isHTMLElement(element) || !getNodeName(element)) {
137
- return;
138
- } // Flow doesn't support to extend this property, but it's the most
139
- // effective way to apply styles to an HTMLElement
140
- // $FlowFixMe
141
-
142
-
143
- Object.assign(element.style, style);
144
- Object.keys(attributes).forEach(function (attribute) {
145
- element.removeAttribute(attribute);
146
- });
147
- });
148
- };
149
- } // eslint-disable-next-line import/no-unused-modules
150
-
151
-
152
- var applyStyles$1 = {
153
- name: 'applyStyles',
154
- enabled: true,
155
- phase: 'write',
156
- fn: applyStyles,
157
- effect: effect$2,
158
- requires: ['computeStyles']
159
- };
160
-
161
- function getBasePlacement(placement) {
162
- return placement.split('-')[0];
163
- }
164
-
165
- // Returns the layout rect of an element relative to its offsetParent. Layout
166
- // means it doesn't take into account transforms.
167
- function getLayoutRect(element) {
168
- return {
169
- x: element.offsetLeft,
170
- y: element.offsetTop,
171
- width: element.offsetWidth,
172
- height: element.offsetHeight
173
- };
174
- }
175
-
176
- function contains(parent, child) {
177
- var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
178
-
179
- if (parent.contains(child)) {
180
- return true;
181
- } // then fallback to custom implementation with Shadow DOM support
182
- else if (rootNode && isShadowRoot(rootNode)) {
183
- var next = child;
184
-
185
- do {
186
- if (next && parent.isSameNode(next)) {
187
- return true;
188
- } // $FlowFixMe: need a better way to handle this...
189
-
190
-
191
- next = next.parentNode || next.host;
192
- } while (next);
193
- } // Give up, the result is false
194
-
195
-
196
- return false;
197
- }
198
-
199
- function getComputedStyle(element) {
200
- return getWindow(element).getComputedStyle(element);
201
- }
202
-
203
- function isTableElement(element) {
204
- return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
205
- }
206
-
207
- function getDocumentElement(element) {
208
- // $FlowFixMe: assume body is always available
209
- return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
210
- }
211
-
212
- function getParentNode(element) {
213
- if (getNodeName(element) === 'html') {
214
- return element;
215
- }
216
-
217
- return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle
218
- element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
219
- element.parentNode || // DOM Element detected
220
- // $FlowFixMe: need a better way to handle this...
221
- element.host || // ShadowRoot detected
222
- // $FlowFixMe: HTMLElement is a Node
223
- getDocumentElement(element) // fallback
224
-
225
- );
226
- }
227
-
228
- function getTrueOffsetParent(element) {
229
- if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
230
- getComputedStyle(element).position === 'fixed') {
231
- return null;
232
- }
233
-
234
- var offsetParent = element.offsetParent;
235
-
236
- if (offsetParent) {
237
- var html = getDocumentElement(offsetParent);
238
-
239
- if (getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && getComputedStyle(html).position !== 'static') {
240
- return html;
241
- }
242
- }
243
-
244
- return offsetParent;
245
- } // `.offsetParent` reports `null` for fixed elements, while absolute elements
246
- // return the containing block
247
-
248
-
249
- function getContainingBlock(element) {
250
- var currentNode = getParentNode(element);
251
-
252
- while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
253
- var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
254
- // create a containing block.
255
-
256
- if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {
257
- return currentNode;
258
- } else {
259
- currentNode = currentNode.parentNode;
260
- }
261
- }
262
-
263
- return null;
264
- } // Gets the closest ancestor positioned element. Handles some edge cases,
265
- // such as table ancestors and cross browser bugs.
266
-
267
-
268
- function getOffsetParent(element) {
269
- var window = getWindow(element);
270
- var offsetParent = getTrueOffsetParent(element);
271
-
272
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
273
- offsetParent = getTrueOffsetParent(offsetParent);
274
- }
275
-
276
- if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static') {
277
- return window;
278
- }
279
-
280
- return offsetParent || getContainingBlock(element) || window;
281
- }
282
-
283
- function getMainAxisFromPlacement(placement) {
284
- return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
285
- }
286
-
287
- function within(min, value, max) {
288
- return Math.max(min, Math.min(value, max));
289
- }
290
-
291
- function getFreshSideObject() {
292
- return {
293
- top: 0,
294
- right: 0,
295
- bottom: 0,
296
- left: 0
297
- };
298
- }
299
-
300
- function mergePaddingObject(paddingObject) {
301
- return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);
302
- }
303
-
304
- function expandToHashMap(value, keys) {
305
- return keys.reduce(function (hashMap, key) {
306
- hashMap[key] = value;
307
- return hashMap;
308
- }, {});
309
- }
310
-
311
- function arrow(_ref) {
312
- var _state$modifiersData$;
313
-
314
- var state = _ref.state,
315
- name = _ref.name;
316
- var arrowElement = state.elements.arrow;
317
- var popperOffsets = state.modifiersData.popperOffsets;
318
- var basePlacement = getBasePlacement(state.placement);
319
- var axis = getMainAxisFromPlacement(basePlacement);
320
- var isVertical = [left, right].indexOf(basePlacement) >= 0;
321
- var len = isVertical ? 'height' : 'width';
322
-
323
- if (!arrowElement || !popperOffsets) {
324
- return;
325
- }
326
-
327
- var paddingObject = state.modifiersData[name + "#persistent"].padding;
328
- var arrowRect = getLayoutRect(arrowElement);
329
- var minProp = axis === 'y' ? top : left;
330
- var maxProp = axis === 'y' ? bottom : right;
331
- var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
332
- var startDiff = popperOffsets[axis] - state.rects.reference[axis];
333
- var arrowOffsetParent = getOffsetParent(arrowElement);
334
- var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
335
- var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
336
- // outside of the popper bounds
337
-
338
- var min = paddingObject[minProp];
339
- var max = clientSize - arrowRect[len] - paddingObject[maxProp];
340
- var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
341
- var offset = within(min, center, max); // Prevents breaking syntax highlighting...
342
-
343
- var axisProp = axis;
344
- state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
345
- }
346
-
347
- function effect$1(_ref2) {
348
- var state = _ref2.state,
349
- options = _ref2.options,
350
- name = _ref2.name;
351
- var _options$element = options.element,
352
- arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element,
353
- _options$padding = options.padding,
354
- padding = _options$padding === void 0 ? 0 : _options$padding;
355
-
356
- if (arrowElement == null) {
357
- return;
358
- } // CSS selector
359
-
360
-
361
- if (typeof arrowElement === 'string') {
362
- arrowElement = state.elements.popper.querySelector(arrowElement);
363
-
364
- if (!arrowElement) {
365
- return;
366
- }
367
- }
368
-
369
- if (process.env.NODE_ENV !== "production") {
370
- if (!isHTMLElement(arrowElement)) {
371
- console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
372
- }
373
- }
374
-
375
- if (!contains(state.elements.popper, arrowElement)) {
376
- if (process.env.NODE_ENV !== "production") {
377
- console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
378
- }
379
-
380
- return;
381
- }
382
-
383
- state.elements.arrow = arrowElement;
384
- state.modifiersData[name + "#persistent"] = {
385
- padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))
386
- };
387
- } // eslint-disable-next-line import/no-unused-modules
388
-
389
-
390
- var arrow$1 = {
391
- name: 'arrow',
392
- enabled: true,
393
- phase: 'main',
394
- fn: arrow,
395
- effect: effect$1,
396
- requires: ['popperOffsets'],
397
- requiresIfExists: ['preventOverflow']
398
- };
399
-
400
- var unsetSides = {
401
- top: 'auto',
402
- right: 'auto',
403
- bottom: 'auto',
404
- left: 'auto'
405
- }; // Round the offsets to the nearest suitable subpixel based on the DPR.
406
- // Zooming can change the DPR, but it seems to report a value that will
407
- // cleanly divide the values into the appropriate subpixels.
408
-
409
- function roundOffsets(_ref) {
410
- var x = _ref.x,
411
- y = _ref.y;
412
- var win = window;
413
- var dpr = win.devicePixelRatio || 1;
414
- return {
415
- x: Math.round(x * dpr) / dpr || 0,
416
- y: Math.round(y * dpr) / dpr || 0
417
- };
418
- }
419
-
420
- function mapToStyles(_ref2) {
421
- var _Object$assign2;
422
-
423
- var popper = _ref2.popper,
424
- popperRect = _ref2.popperRect,
425
- placement = _ref2.placement,
426
- offsets = _ref2.offsets,
427
- position = _ref2.position,
428
- gpuAcceleration = _ref2.gpuAcceleration,
429
- adaptive = _ref2.adaptive;
430
-
431
- var _roundOffsets = roundOffsets(offsets),
432
- x = _roundOffsets.x,
433
- y = _roundOffsets.y;
434
-
435
- var hasX = offsets.hasOwnProperty('x');
436
- var hasY = offsets.hasOwnProperty('y');
437
- var sideX = left;
438
- var sideY = top;
439
- var win = window;
440
-
441
- if (adaptive) {
442
- var offsetParent = getOffsetParent(popper);
443
-
444
- if (offsetParent === getWindow(popper)) {
445
- offsetParent = getDocumentElement(popper);
446
- } // $FlowFixMe: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
447
-
448
- /*:: offsetParent = (offsetParent: Element); */
449
-
450
-
451
- if (placement === top) {
452
- sideY = bottom;
453
- y -= offsetParent.clientHeight - popperRect.height;
454
- y *= gpuAcceleration ? 1 : -1;
455
- }
456
-
457
- if (placement === left) {
458
- sideX = right;
459
- x -= offsetParent.clientWidth - popperRect.width;
460
- x *= gpuAcceleration ? 1 : -1;
461
- }
462
- }
463
-
464
- var commonStyles = Object.assign({
465
- position: position
466
- }, adaptive && unsetSides);
467
-
468
- if (gpuAcceleration) {
469
- var _Object$assign;
470
-
471
- return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
472
- }
473
-
474
- return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
475
- }
476
-
477
- function computeStyles(_ref3) {
478
- var state = _ref3.state,
479
- options = _ref3.options;
480
- var _options$gpuAccelerat = options.gpuAcceleration,
481
- gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
482
- _options$adaptive = options.adaptive,
483
- adaptive = _options$adaptive === void 0 ? true : _options$adaptive;
484
-
485
- if (process.env.NODE_ENV !== "production") {
486
- var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';
487
-
488
- if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
489
- return transitionProperty.indexOf(property) >= 0;
490
- })) {
491
- console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
492
- }
493
- }
494
-
495
- var commonStyles = {
496
- placement: getBasePlacement(state.placement),
497
- popper: state.elements.popper,
498
- popperRect: state.rects.popper,
499
- gpuAcceleration: gpuAcceleration
500
- };
501
-
502
- if (state.modifiersData.popperOffsets != null) {
503
- state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {
504
- offsets: state.modifiersData.popperOffsets,
505
- position: state.options.strategy,
506
- adaptive: adaptive
507
- })));
508
- }
509
-
510
- if (state.modifiersData.arrow != null) {
511
- state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {
512
- offsets: state.modifiersData.arrow,
513
- position: 'absolute',
514
- adaptive: false
515
- })));
516
- }
517
-
518
- state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {
519
- 'data-popper-placement': state.placement
520
- });
521
- } // eslint-disable-next-line import/no-unused-modules
522
-
523
-
524
- var computeStyles$1 = {
525
- name: 'computeStyles',
526
- enabled: true,
527
- phase: 'beforeWrite',
528
- fn: computeStyles,
529
- data: {}
530
- };
531
-
532
- var passive = {
533
- passive: true
534
- };
535
-
536
- function effect(_ref) {
537
- var state = _ref.state,
538
- instance = _ref.instance,
539
- options = _ref.options;
540
- var _options$scroll = options.scroll,
541
- scroll = _options$scroll === void 0 ? true : _options$scroll,
542
- _options$resize = options.resize,
543
- resize = _options$resize === void 0 ? true : _options$resize;
544
- var window = getWindow(state.elements.popper);
545
- var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
546
-
547
- if (scroll) {
548
- scrollParents.forEach(function (scrollParent) {
549
- scrollParent.addEventListener('scroll', instance.update, passive);
550
- });
551
- }
552
-
553
- if (resize) {
554
- window.addEventListener('resize', instance.update, passive);
555
- }
556
-
557
- return function () {
558
- if (scroll) {
559
- scrollParents.forEach(function (scrollParent) {
560
- scrollParent.removeEventListener('scroll', instance.update, passive);
561
- });
562
- }
563
-
564
- if (resize) {
565
- window.removeEventListener('resize', instance.update, passive);
566
- }
567
- };
568
- } // eslint-disable-next-line import/no-unused-modules
569
-
570
-
571
- var eventListeners = {
572
- name: 'eventListeners',
573
- enabled: true,
574
- phase: 'write',
575
- fn: function fn() {},
576
- effect: effect,
577
- data: {}
578
- };
579
-
580
- var hash$1 = {
581
- left: 'right',
582
- right: 'left',
583
- bottom: 'top',
584
- top: 'bottom'
585
- };
586
- function getOppositePlacement(placement) {
587
- return placement.replace(/left|right|bottom|top/g, function (matched) {
588
- return hash$1[matched];
589
- });
590
- }
591
-
592
- var hash = {
593
- start: 'end',
594
- end: 'start'
595
- };
596
- function getOppositeVariationPlacement(placement) {
597
- return placement.replace(/start|end/g, function (matched) {
598
- return hash[matched];
599
- });
600
- }
601
-
602
- function getBoundingClientRect(element) {
603
- var rect = element.getBoundingClientRect();
604
- return {
605
- width: rect.width,
606
- height: rect.height,
607
- top: rect.top,
608
- right: rect.right,
609
- bottom: rect.bottom,
610
- left: rect.left,
611
- x: rect.left,
612
- y: rect.top
613
- };
614
- }
615
-
616
- function getWindowScroll(node) {
617
- var win = getWindow(node);
618
- var scrollLeft = win.pageXOffset;
619
- var scrollTop = win.pageYOffset;
620
- return {
621
- scrollLeft: scrollLeft,
622
- scrollTop: scrollTop
623
- };
624
- }
625
-
626
- function getWindowScrollBarX(element) {
627
- // If <html> has a CSS width greater than the viewport, then this will be
628
- // incorrect for RTL.
629
- // Popper 1 is broken in this case and never had a bug report so let's assume
630
- // it's not an issue. I don't think anyone ever specifies width on <html>
631
- // anyway.
632
- // Browsers where the left scrollbar doesn't cause an issue report `0` for
633
- // this (e.g. Edge 2019, IE11, Safari)
634
- return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
635
- }
636
-
637
- function getViewportRect(element) {
638
- var win = getWindow(element);
639
- var html = getDocumentElement(element);
640
- var visualViewport = win.visualViewport;
641
- var width = html.clientWidth;
642
- var height = html.clientHeight;
643
- var x = 0;
644
- var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
645
- // can be obscured underneath it.
646
- // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
647
- // if it isn't open, so if this isn't available, the popper will be detected
648
- // to overflow the bottom of the screen too early.
649
-
650
- if (visualViewport) {
651
- width = visualViewport.width;
652
- height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
653
- // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
654
- // errors due to floating point numbers, so we need to check precision.
655
- // Safari returns a number <= 0, usually < -1 when pinch-zoomed
656
- // Feature detection fails in mobile emulation mode in Chrome.
657
- // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
658
- // 0.001
659
- // Fallback here: "Not Safari" userAgent
660
-
661
- if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
662
- x = visualViewport.offsetLeft;
663
- y = visualViewport.offsetTop;
664
- }
665
- }
666
-
667
- return {
668
- width: width,
669
- height: height,
670
- x: x + getWindowScrollBarX(element),
671
- y: y
672
- };
673
- }
674
-
675
- // of the `<html>` and `<body>` rect bounds if horizontally scrollable
676
-
677
- function getDocumentRect(element) {
678
- var html = getDocumentElement(element);
679
- var winScroll = getWindowScroll(element);
680
- var body = element.ownerDocument.body;
681
- var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
682
- var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
683
- var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
684
- var y = -winScroll.scrollTop;
685
-
686
- if (getComputedStyle(body || html).direction === 'rtl') {
687
- x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;
688
- }
689
-
690
- return {
691
- width: width,
692
- height: height,
693
- x: x,
694
- y: y
695
- };
696
- }
697
-
698
- function isScrollParent(element) {
699
- // Firefox wants us to check `-x` and `-y` variations as well
700
- var _getComputedStyle = getComputedStyle(element),
701
- overflow = _getComputedStyle.overflow,
702
- overflowX = _getComputedStyle.overflowX,
703
- overflowY = _getComputedStyle.overflowY;
704
-
705
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
706
- }
707
-
708
- function getScrollParent(node) {
709
- if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
710
- // $FlowFixMe: assume body is always available
711
- return node.ownerDocument.body;
712
- }
713
-
714
- if (isHTMLElement(node) && isScrollParent(node)) {
715
- return node;
716
- }
717
-
718
- return getScrollParent(getParentNode(node));
719
- }
720
-
721
- /*
722
- given a DOM element, return the list of all scroll parents, up the list of ancesors
723
- until we get to the top window object. This list is what we attach scroll listeners
724
- to, because if any of these parent elements scroll, we'll need to re-calculate the
725
- reference element's position.
726
- */
727
-
728
- function listScrollParents(element, list) {
729
- if (list === void 0) {
730
- list = [];
731
- }
732
-
733
- var scrollParent = getScrollParent(element);
734
- var isBody = getNodeName(scrollParent) === 'body';
735
- var win = getWindow(scrollParent);
736
- var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
737
- var updatedList = list.concat(target);
738
- return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here
739
- updatedList.concat(listScrollParents(getParentNode(target)));
740
- }
741
-
742
- function rectToClientRect(rect) {
743
- return Object.assign(Object.assign({}, rect), {}, {
744
- left: rect.x,
745
- top: rect.y,
746
- right: rect.x + rect.width,
747
- bottom: rect.y + rect.height
748
- });
749
- }
750
-
751
- function getInnerBoundingClientRect(element) {
752
- var rect = getBoundingClientRect(element);
753
- rect.top = rect.top + element.clientTop;
754
- rect.left = rect.left + element.clientLeft;
755
- rect.bottom = rect.top + element.clientHeight;
756
- rect.right = rect.left + element.clientWidth;
757
- rect.width = element.clientWidth;
758
- rect.height = element.clientHeight;
759
- rect.x = rect.left;
760
- rect.y = rect.top;
761
- return rect;
762
- }
763
-
764
- function getClientRectFromMixedType(element, clippingParent) {
765
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
766
- } // A "clipping parent" is an overflowable container with the characteristic of
767
- // clipping (or hiding) overflowing elements with a position different from
768
- // `initial`
769
-
770
-
771
- function getClippingParents(element) {
772
- var clippingParents = listScrollParents(getParentNode(element));
773
- var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
774
- var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
775
-
776
- if (!isElement(clipperElement)) {
777
- return [];
778
- } // $FlowFixMe: https://github.com/facebook/flow/issues/1414
779
-
780
-
781
- return clippingParents.filter(function (clippingParent) {
782
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
783
- });
784
- } // Gets the maximum area that the element is visible in due to any number of
785
- // clipping parents
786
-
787
-
788
- function getClippingRect(element, boundary, rootBoundary) {
789
- var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
790
- var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
791
- var firstClippingParent = clippingParents[0];
792
- var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
793
- var rect = getClientRectFromMixedType(element, clippingParent);
794
- accRect.top = Math.max(rect.top, accRect.top);
795
- accRect.right = Math.min(rect.right, accRect.right);
796
- accRect.bottom = Math.min(rect.bottom, accRect.bottom);
797
- accRect.left = Math.max(rect.left, accRect.left);
798
- return accRect;
799
- }, getClientRectFromMixedType(element, firstClippingParent));
800
- clippingRect.width = clippingRect.right - clippingRect.left;
801
- clippingRect.height = clippingRect.bottom - clippingRect.top;
802
- clippingRect.x = clippingRect.left;
803
- clippingRect.y = clippingRect.top;
804
- return clippingRect;
805
- }
806
-
807
- function getVariation(placement) {
808
- return placement.split('-')[1];
809
- }
810
-
811
- function computeOffsets(_ref) {
812
- var reference = _ref.reference,
813
- element = _ref.element,
814
- placement = _ref.placement;
815
- var basePlacement = placement ? getBasePlacement(placement) : null;
816
- var variation = placement ? getVariation(placement) : null;
817
- var commonX = reference.x + reference.width / 2 - element.width / 2;
818
- var commonY = reference.y + reference.height / 2 - element.height / 2;
819
- var offsets;
820
-
821
- switch (basePlacement) {
822
- case top:
823
- offsets = {
824
- x: commonX,
825
- y: reference.y - element.height
826
- };
827
- break;
828
-
829
- case bottom:
830
- offsets = {
831
- x: commonX,
832
- y: reference.y + reference.height
833
- };
834
- break;
835
-
836
- case right:
837
- offsets = {
838
- x: reference.x + reference.width,
839
- y: commonY
840
- };
841
- break;
842
-
843
- case left:
844
- offsets = {
845
- x: reference.x - element.width,
846
- y: commonY
847
- };
848
- break;
849
-
850
- default:
851
- offsets = {
852
- x: reference.x,
853
- y: reference.y
854
- };
855
- }
856
-
857
- var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
858
-
859
- if (mainAxis != null) {
860
- var len = mainAxis === 'y' ? 'height' : 'width';
861
-
862
- switch (variation) {
863
- case start:
864
- offsets[mainAxis] = Math.floor(offsets[mainAxis]) - Math.floor(reference[len] / 2 - element[len] / 2);
865
- break;
866
-
867
- case end:
868
- offsets[mainAxis] = Math.floor(offsets[mainAxis]) + Math.ceil(reference[len] / 2 - element[len] / 2);
869
- break;
870
- }
871
- }
872
-
873
- return offsets;
874
- }
875
-
876
- function detectOverflow(state, options) {
877
- if (options === void 0) {
878
- options = {};
879
- }
880
-
881
- var _options = options,
882
- _options$placement = _options.placement,
883
- placement = _options$placement === void 0 ? state.placement : _options$placement,
884
- _options$boundary = _options.boundary,
885
- boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
886
- _options$rootBoundary = _options.rootBoundary,
887
- rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
888
- _options$elementConte = _options.elementContext,
889
- elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
890
- _options$altBoundary = _options.altBoundary,
891
- altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
892
- _options$padding = _options.padding,
893
- padding = _options$padding === void 0 ? 0 : _options$padding;
894
- var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
895
- var altContext = elementContext === popper ? reference : popper;
896
- var referenceElement = state.elements.reference;
897
- var popperRect = state.rects.popper;
898
- var element = state.elements[altBoundary ? altContext : elementContext];
899
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
900
- var referenceClientRect = getBoundingClientRect(referenceElement);
901
- var popperOffsets = computeOffsets({
902
- reference: referenceClientRect,
903
- element: popperRect,
904
- strategy: 'absolute',
905
- placement: placement
906
- });
907
- var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));
908
- var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
909
- // 0 or negative = within the clipping rect
910
-
911
- var overflowOffsets = {
912
- top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
913
- bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
914
- left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
915
- right: elementClientRect.right - clippingClientRect.right + paddingObject.right
916
- };
917
- var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
918
-
919
- if (elementContext === popper && offsetData) {
920
- var offset = offsetData[placement];
921
- Object.keys(overflowOffsets).forEach(function (key) {
922
- var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
923
- var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
924
- overflowOffsets[key] += offset[axis] * multiply;
925
- });
926
- }
927
-
928
- return overflowOffsets;
929
- }
930
-
931
- /*:: type OverflowsMap = { [ComputedPlacement]: number }; */
932
-
933
- /*;; type OverflowsMap = { [key in ComputedPlacement]: number }; */
934
- function computeAutoPlacement(state, options) {
935
- if (options === void 0) {
936
- options = {};
937
- }
938
-
939
- var _options = options,
940
- placement = _options.placement,
941
- boundary = _options.boundary,
942
- rootBoundary = _options.rootBoundary,
943
- padding = _options.padding,
944
- flipVariations = _options.flipVariations,
945
- _options$allowedAutoP = _options.allowedAutoPlacements,
946
- allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
947
- var variation = getVariation(placement);
948
- var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
949
- return getVariation(placement) === variation;
950
- }) : basePlacements; // $FlowFixMe
951
-
952
- var allowedPlacements = placements$1.filter(function (placement) {
953
- return allowedAutoPlacements.indexOf(placement) >= 0;
954
- });
955
-
956
- if (allowedPlacements.length === 0) {
957
- allowedPlacements = placements$1;
958
-
959
- if (process.env.NODE_ENV !== "production") {
960
- console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
961
- }
962
- } // $FlowFixMe: Flow seems to have problems with two array unions...
963
-
964
-
965
- var overflows = allowedPlacements.reduce(function (acc, placement) {
966
- acc[placement] = detectOverflow(state, {
967
- placement: placement,
968
- boundary: boundary,
969
- rootBoundary: rootBoundary,
970
- padding: padding
971
- })[getBasePlacement(placement)];
972
- return acc;
973
- }, {});
974
- return Object.keys(overflows).sort(function (a, b) {
975
- return overflows[a] - overflows[b];
976
- });
977
- }
978
-
979
- function getExpandedFallbackPlacements(placement) {
980
- if (getBasePlacement(placement) === auto) {
981
- return [];
982
- }
983
-
984
- var oppositePlacement = getOppositePlacement(placement);
985
- return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
986
- }
987
-
988
- function flip(_ref) {
989
- var state = _ref.state,
990
- options = _ref.options,
991
- name = _ref.name;
992
-
993
- if (state.modifiersData[name]._skip) {
994
- return;
995
- }
996
-
997
- var _options$mainAxis = options.mainAxis,
998
- checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
999
- _options$altAxis = options.altAxis,
1000
- checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1001
- specifiedFallbackPlacements = options.fallbackPlacements,
1002
- padding = options.padding,
1003
- boundary = options.boundary,
1004
- rootBoundary = options.rootBoundary,
1005
- altBoundary = options.altBoundary,
1006
- _options$flipVariatio = options.flipVariations,
1007
- flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1008
- allowedAutoPlacements = options.allowedAutoPlacements;
1009
- var preferredPlacement = state.options.placement;
1010
- var basePlacement = getBasePlacement(preferredPlacement);
1011
- var isBasePlacement = basePlacement === preferredPlacement;
1012
- var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1013
- var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1014
- return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
1015
- placement: placement,
1016
- boundary: boundary,
1017
- rootBoundary: rootBoundary,
1018
- padding: padding,
1019
- flipVariations: flipVariations,
1020
- allowedAutoPlacements: allowedAutoPlacements
1021
- }) : placement);
1022
- }, []);
1023
- var referenceRect = state.rects.reference;
1024
- var popperRect = state.rects.popper;
1025
- var checksMap = new Map();
1026
- var makeFallbackChecks = true;
1027
- var firstFittingPlacement = placements[0];
1028
-
1029
- for (var i = 0; i < placements.length; i++) {
1030
- var placement = placements[i];
1031
-
1032
- var _basePlacement = getBasePlacement(placement);
1033
-
1034
- var isStartVariation = getVariation(placement) === start;
1035
- var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
1036
- var len = isVertical ? 'width' : 'height';
1037
- var overflow = detectOverflow(state, {
1038
- placement: placement,
1039
- boundary: boundary,
1040
- rootBoundary: rootBoundary,
1041
- altBoundary: altBoundary,
1042
- padding: padding
1043
- });
1044
- var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1045
-
1046
- if (referenceRect[len] > popperRect[len]) {
1047
- mainVariationSide = getOppositePlacement(mainVariationSide);
1048
- }
1049
-
1050
- var altVariationSide = getOppositePlacement(mainVariationSide);
1051
- var checks = [];
1052
-
1053
- if (checkMainAxis) {
1054
- checks.push(overflow[_basePlacement] <= 0);
1055
- }
1056
-
1057
- if (checkAltAxis) {
1058
- checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1059
- }
1060
-
1061
- if (checks.every(function (check) {
1062
- return check;
1063
- })) {
1064
- firstFittingPlacement = placement;
1065
- makeFallbackChecks = false;
1066
- break;
1067
- }
1068
-
1069
- checksMap.set(placement, checks);
1070
- }
1071
-
1072
- if (makeFallbackChecks) {
1073
- // `2` may be desired in some cases – research later
1074
- var numberOfChecks = flipVariations ? 3 : 1;
1075
-
1076
- var _loop = function _loop(_i) {
1077
- var fittingPlacement = placements.find(function (placement) {
1078
- var checks = checksMap.get(placement);
1079
-
1080
- if (checks) {
1081
- return checks.slice(0, _i).every(function (check) {
1082
- return check;
1083
- });
1084
- }
1085
- });
1086
-
1087
- if (fittingPlacement) {
1088
- firstFittingPlacement = fittingPlacement;
1089
- return "break";
1090
- }
1091
- };
1092
-
1093
- for (var _i = numberOfChecks; _i > 0; _i--) {
1094
- var _ret = _loop(_i);
1095
-
1096
- if (_ret === "break") break;
1097
- }
1098
- }
1099
-
1100
- if (state.placement !== firstFittingPlacement) {
1101
- state.modifiersData[name]._skip = true;
1102
- state.placement = firstFittingPlacement;
1103
- state.reset = true;
1104
- }
1105
- } // eslint-disable-next-line import/no-unused-modules
1106
-
1107
-
1108
- var flip$1 = {
1109
- name: 'flip',
1110
- enabled: true,
1111
- phase: 'main',
1112
- fn: flip,
1113
- requiresIfExists: ['offset'],
1114
- data: {
1115
- _skip: false
1116
- }
1117
- };
1118
-
1119
- function getSideOffsets(overflow, rect, preventedOffsets) {
1120
- if (preventedOffsets === void 0) {
1121
- preventedOffsets = {
1122
- x: 0,
1123
- y: 0
1124
- };
1125
- }
1126
-
1127
- return {
1128
- top: overflow.top - rect.height - preventedOffsets.y,
1129
- right: overflow.right - rect.width + preventedOffsets.x,
1130
- bottom: overflow.bottom - rect.height + preventedOffsets.y,
1131
- left: overflow.left - rect.width - preventedOffsets.x
1132
- };
1133
- }
1134
-
1135
- function isAnySideFullyClipped(overflow) {
1136
- return [top, right, bottom, left].some(function (side) {
1137
- return overflow[side] >= 0;
1138
- });
1139
- }
1140
-
1141
- function hide(_ref) {
1142
- var state = _ref.state,
1143
- name = _ref.name;
1144
- var referenceRect = state.rects.reference;
1145
- var popperRect = state.rects.popper;
1146
- var preventedOffsets = state.modifiersData.preventOverflow;
1147
- var referenceOverflow = detectOverflow(state, {
1148
- elementContext: 'reference'
1149
- });
1150
- var popperAltOverflow = detectOverflow(state, {
1151
- altBoundary: true
1152
- });
1153
- var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
1154
- var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
1155
- var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
1156
- var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
1157
- state.modifiersData[name] = {
1158
- referenceClippingOffsets: referenceClippingOffsets,
1159
- popperEscapeOffsets: popperEscapeOffsets,
1160
- isReferenceHidden: isReferenceHidden,
1161
- hasPopperEscaped: hasPopperEscaped
1162
- };
1163
- state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {
1164
- 'data-popper-reference-hidden': isReferenceHidden,
1165
- 'data-popper-escaped': hasPopperEscaped
1166
- });
1167
- } // eslint-disable-next-line import/no-unused-modules
1168
-
1169
-
1170
- var hide$1 = {
1171
- name: 'hide',
1172
- enabled: true,
1173
- phase: 'main',
1174
- requiresIfExists: ['preventOverflow'],
1175
- fn: hide
1176
- };
1177
-
1178
- function distanceAndSkiddingToXY(placement, rects, offset) {
1179
- var basePlacement = getBasePlacement(placement);
1180
- var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
1181
-
1182
- var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, {
1183
- placement: placement
1184
- })) : offset,
1185
- skidding = _ref[0],
1186
- distance = _ref[1];
1187
-
1188
- skidding = skidding || 0;
1189
- distance = (distance || 0) * invertDistance;
1190
- return [left, right].indexOf(basePlacement) >= 0 ? {
1191
- x: distance,
1192
- y: skidding
1193
- } : {
1194
- x: skidding,
1195
- y: distance
1196
- };
1197
- }
1198
-
1199
- function offset(_ref2) {
1200
- var state = _ref2.state,
1201
- options = _ref2.options,
1202
- name = _ref2.name;
1203
- var _options$offset = options.offset,
1204
- offset = _options$offset === void 0 ? [0, 0] : _options$offset;
1205
- var data = placements.reduce(function (acc, placement) {
1206
- acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1207
- return acc;
1208
- }, {});
1209
- var _data$state$placement = data[state.placement],
1210
- x = _data$state$placement.x,
1211
- y = _data$state$placement.y;
1212
-
1213
- if (state.modifiersData.popperOffsets != null) {
1214
- state.modifiersData.popperOffsets.x += x;
1215
- state.modifiersData.popperOffsets.y += y;
1216
- }
1217
-
1218
- state.modifiersData[name] = data;
1219
- } // eslint-disable-next-line import/no-unused-modules
1220
-
1221
-
1222
- var offset$1 = {
1223
- name: 'offset',
1224
- enabled: true,
1225
- phase: 'main',
1226
- requires: ['popperOffsets'],
1227
- fn: offset
1228
- };
1229
-
1230
- function popperOffsets(_ref) {
1231
- var state = _ref.state,
1232
- name = _ref.name;
1233
- // Offsets are the actual position the popper needs to have to be
1234
- // properly positioned near its reference element
1235
- // This is the most basic placement, and will be adjusted by
1236
- // the modifiers in the next step
1237
- state.modifiersData[name] = computeOffsets({
1238
- reference: state.rects.reference,
1239
- element: state.rects.popper,
1240
- strategy: 'absolute',
1241
- placement: state.placement
1242
- });
1243
- } // eslint-disable-next-line import/no-unused-modules
1244
-
1245
-
1246
- var popperOffsets$1 = {
1247
- name: 'popperOffsets',
1248
- enabled: true,
1249
- phase: 'read',
1250
- fn: popperOffsets,
1251
- data: {}
1252
- };
1253
-
1254
- function getAltAxis(axis) {
1255
- return axis === 'x' ? 'y' : 'x';
1256
- }
1257
-
1258
- function preventOverflow(_ref) {
1259
- var state = _ref.state,
1260
- options = _ref.options,
1261
- name = _ref.name;
1262
- var _options$mainAxis = options.mainAxis,
1263
- checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1264
- _options$altAxis = options.altAxis,
1265
- checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
1266
- boundary = options.boundary,
1267
- rootBoundary = options.rootBoundary,
1268
- altBoundary = options.altBoundary,
1269
- padding = options.padding,
1270
- _options$tether = options.tether,
1271
- tether = _options$tether === void 0 ? true : _options$tether,
1272
- _options$tetherOffset = options.tetherOffset,
1273
- tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1274
- var overflow = detectOverflow(state, {
1275
- boundary: boundary,
1276
- rootBoundary: rootBoundary,
1277
- padding: padding,
1278
- altBoundary: altBoundary
1279
- });
1280
- var basePlacement = getBasePlacement(state.placement);
1281
- var variation = getVariation(state.placement);
1282
- var isBasePlacement = !variation;
1283
- var mainAxis = getMainAxisFromPlacement(basePlacement);
1284
- var altAxis = getAltAxis(mainAxis);
1285
- var popperOffsets = state.modifiersData.popperOffsets;
1286
- var referenceRect = state.rects.reference;
1287
- var popperRect = state.rects.popper;
1288
- var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, {
1289
- placement: state.placement
1290
- })) : tetherOffset;
1291
- var data = {
1292
- x: 0,
1293
- y: 0
1294
- };
1295
-
1296
- if (!popperOffsets) {
1297
- return;
1298
- }
1299
-
1300
- if (checkMainAxis) {
1301
- var mainSide = mainAxis === 'y' ? top : left;
1302
- var altSide = mainAxis === 'y' ? bottom : right;
1303
- var len = mainAxis === 'y' ? 'height' : 'width';
1304
- var offset = popperOffsets[mainAxis];
1305
- var min = popperOffsets[mainAxis] + overflow[mainSide];
1306
- var max = popperOffsets[mainAxis] - overflow[altSide];
1307
- var additive = tether ? -popperRect[len] / 2 : 0;
1308
- var minLen = variation === start ? referenceRect[len] : popperRect[len];
1309
- var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
1310
- // outside the reference bounds
1311
-
1312
- var arrowElement = state.elements.arrow;
1313
- var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
1314
- width: 0,
1315
- height: 0
1316
- };
1317
- var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
1318
- var arrowPaddingMin = arrowPaddingObject[mainSide];
1319
- var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
1320
- // to include its full size in the calculation. If the reference is small
1321
- // and near the edge of a boundary, the popper can overflow even if the
1322
- // reference is not overflowing as well (e.g. virtual elements with no
1323
- // width or height)
1324
-
1325
- var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1326
- var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
1327
- var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
1328
- var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1329
- var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1330
- var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
1331
- var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
1332
- var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
1333
- var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);
1334
- popperOffsets[mainAxis] = preventedOffset;
1335
- data[mainAxis] = preventedOffset - offset;
1336
- }
1337
-
1338
- if (checkAltAxis) {
1339
- var _mainSide = mainAxis === 'x' ? top : left;
1340
-
1341
- var _altSide = mainAxis === 'x' ? bottom : right;
1342
-
1343
- var _offset = popperOffsets[altAxis];
1344
-
1345
- var _min = _offset + overflow[_mainSide];
1346
-
1347
- var _max = _offset - overflow[_altSide];
1348
-
1349
- var _preventedOffset = within(_min, _offset, _max);
1350
-
1351
- popperOffsets[altAxis] = _preventedOffset;
1352
- data[altAxis] = _preventedOffset - _offset;
1353
- }
1354
-
1355
- state.modifiersData[name] = data;
1356
- } // eslint-disable-next-line import/no-unused-modules
1357
-
1358
-
1359
- var preventOverflow$1 = {
1360
- name: 'preventOverflow',
1361
- enabled: true,
1362
- phase: 'main',
1363
- fn: preventOverflow,
1364
- requiresIfExists: ['offset']
1365
- };
1366
-
1367
- function getHTMLElementScroll(element) {
1368
- return {
1369
- scrollLeft: element.scrollLeft,
1370
- scrollTop: element.scrollTop
1371
- };
1372
- }
1373
-
1374
- function getNodeScroll(node) {
1375
- if (node === getWindow(node) || !isHTMLElement(node)) {
1376
- return getWindowScroll(node);
1377
- } else {
1378
- return getHTMLElementScroll(node);
1379
- }
1380
- }
1381
-
1382
- // Composite means it takes into account transforms as well as layout.
1383
-
1384
- function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1385
- if (isFixed === void 0) {
1386
- isFixed = false;
1387
- }
1388
-
1389
- var documentElement = getDocumentElement(offsetParent);
1390
- var rect = getBoundingClientRect(elementOrVirtualElement);
1391
- var isOffsetParentAnElement = isHTMLElement(offsetParent);
1392
- var scroll = {
1393
- scrollLeft: 0,
1394
- scrollTop: 0
1395
- };
1396
- var offsets = {
1397
- x: 0,
1398
- y: 0
1399
- };
1400
-
1401
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1402
- if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
1403
- isScrollParent(documentElement)) {
1404
- scroll = getNodeScroll(offsetParent);
1405
- }
1406
-
1407
- if (isHTMLElement(offsetParent)) {
1408
- offsets = getBoundingClientRect(offsetParent);
1409
- offsets.x += offsetParent.clientLeft;
1410
- offsets.y += offsetParent.clientTop;
1411
- } else if (documentElement) {
1412
- offsets.x = getWindowScrollBarX(documentElement);
1413
- }
1414
- }
1415
-
1416
- return {
1417
- x: rect.left + scroll.scrollLeft - offsets.x,
1418
- y: rect.top + scroll.scrollTop - offsets.y,
1419
- width: rect.width,
1420
- height: rect.height
1421
- };
1422
- }
1423
-
1424
- function order(modifiers) {
1425
- var map = new Map();
1426
- var visited = new Set();
1427
- var result = [];
1428
- modifiers.forEach(function (modifier) {
1429
- map.set(modifier.name, modifier);
1430
- }); // On visiting object, check for its dependencies and visit them recursively
1431
-
1432
- function sort(modifier) {
1433
- visited.add(modifier.name);
1434
- var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
1435
- requires.forEach(function (dep) {
1436
- if (!visited.has(dep)) {
1437
- var depModifier = map.get(dep);
1438
-
1439
- if (depModifier) {
1440
- sort(depModifier);
1441
- }
1442
- }
1443
- });
1444
- result.push(modifier);
1445
- }
1446
-
1447
- modifiers.forEach(function (modifier) {
1448
- if (!visited.has(modifier.name)) {
1449
- // check for visited object
1450
- sort(modifier);
1451
- }
1452
- });
1453
- return result;
1454
- }
1455
-
1456
- function orderModifiers(modifiers) {
1457
- // order based on dependencies
1458
- var orderedModifiers = order(modifiers); // order based on phase
1459
-
1460
- return modifierPhases.reduce(function (acc, phase) {
1461
- return acc.concat(orderedModifiers.filter(function (modifier) {
1462
- return modifier.phase === phase;
1463
- }));
1464
- }, []);
1465
- }
1466
-
1467
- function debounce(fn) {
1468
- var pending;
1469
- return function () {
1470
- if (!pending) {
1471
- pending = new Promise(function (resolve) {
1472
- Promise.resolve().then(function () {
1473
- pending = undefined;
1474
- resolve(fn());
1475
- });
1476
- });
1477
- }
1478
-
1479
- return pending;
1480
- };
1481
- }
1482
-
1483
- function format(str) {
1484
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1485
- args[_key - 1] = arguments[_key];
1486
- }
1487
-
1488
- return [].concat(args).reduce(function (p, c) {
1489
- return p.replace(/%s/, c);
1490
- }, str);
1491
- }
1492
-
1493
- var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
1494
- var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
1495
- var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
1496
- function validateModifiers(modifiers) {
1497
- modifiers.forEach(function (modifier) {
1498
- Object.keys(modifier).forEach(function (key) {
1499
- switch (key) {
1500
- case 'name':
1501
- if (typeof modifier.name !== 'string') {
1502
- console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
1503
- }
1504
-
1505
- break;
1506
-
1507
- case 'enabled':
1508
- if (typeof modifier.enabled !== 'boolean') {
1509
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
1510
- }
1511
-
1512
- case 'phase':
1513
- if (modifierPhases.indexOf(modifier.phase) < 0) {
1514
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
1515
- }
1516
-
1517
- break;
1518
-
1519
- case 'fn':
1520
- if (typeof modifier.fn !== 'function') {
1521
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
1522
- }
1523
-
1524
- break;
1525
-
1526
- case 'effect':
1527
- if (typeof modifier.effect !== 'function') {
1528
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
1529
- }
1530
-
1531
- break;
1532
-
1533
- case 'requires':
1534
- if (!Array.isArray(modifier.requires)) {
1535
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
1536
- }
1537
-
1538
- break;
1539
-
1540
- case 'requiresIfExists':
1541
- if (!Array.isArray(modifier.requiresIfExists)) {
1542
- console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
1543
- }
1544
-
1545
- break;
1546
-
1547
- case 'options':
1548
- case 'data':
1549
- break;
1550
-
1551
- default:
1552
- console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
1553
- return "\"" + s + "\"";
1554
- }).join(', ') + "; but \"" + key + "\" was provided.");
1555
- }
1556
-
1557
- modifier.requires && modifier.requires.forEach(function (requirement) {
1558
- if (modifiers.find(function (mod) {
1559
- return mod.name === requirement;
1560
- }) == null) {
1561
- console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
1562
- }
1563
- });
1564
- });
1565
- });
1566
- }
1567
-
1568
- function uniqueBy(arr, fn) {
1569
- var identifiers = new Set();
1570
- return arr.filter(function (item) {
1571
- var identifier = fn(item);
1572
-
1573
- if (!identifiers.has(identifier)) {
1574
- identifiers.add(identifier);
1575
- return true;
1576
- }
1577
- });
1578
- }
1579
-
1580
- function mergeByName(modifiers) {
1581
- var merged = modifiers.reduce(function (merged, current) {
1582
- var existing = merged[current.name];
1583
- merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, {
1584
- options: Object.assign(Object.assign({}, existing.options), current.options),
1585
- data: Object.assign(Object.assign({}, existing.data), current.data)
1586
- }) : current;
1587
- return merged;
1588
- }, {}); // IE11 does not support Object.values
1589
-
1590
- return Object.keys(merged).map(function (key) {
1591
- return merged[key];
1592
- });
1593
- }
1594
-
1595
- var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
1596
- var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
1597
- var DEFAULT_OPTIONS = {
1598
- placement: 'bottom',
1599
- modifiers: [],
1600
- strategy: 'absolute'
1601
- };
1602
-
1603
- function areValidElements() {
1604
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1605
- args[_key] = arguments[_key];
1606
- }
1607
-
1608
- return !args.some(function (element) {
1609
- return !(element && typeof element.getBoundingClientRect === 'function');
1610
- });
1611
- }
1612
-
1613
- function popperGenerator(generatorOptions) {
1614
- if (generatorOptions === void 0) {
1615
- generatorOptions = {};
1616
- }
1617
-
1618
- var _generatorOptions = generatorOptions,
1619
- _generatorOptions$def = _generatorOptions.defaultModifiers,
1620
- defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
1621
- _generatorOptions$def2 = _generatorOptions.defaultOptions,
1622
- defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1623
- return function createPopper(reference, popper, options) {
1624
- if (options === void 0) {
1625
- options = defaultOptions;
1626
- }
1627
-
1628
- var state = {
1629
- placement: 'bottom',
1630
- orderedModifiers: [],
1631
- options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),
1632
- modifiersData: {},
1633
- elements: {
1634
- reference: reference,
1635
- popper: popper
1636
- },
1637
- attributes: {},
1638
- styles: {}
1639
- };
1640
- var effectCleanupFns = [];
1641
- var isDestroyed = false;
1642
- var instance = {
1643
- state: state,
1644
- setOptions: function setOptions(options) {
1645
- cleanupModifierEffects();
1646
- state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);
1647
- state.scrollParents = {
1648
- reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
1649
- popper: listScrollParents(popper)
1650
- }; // Orders the modifiers based on their dependencies and `phase`
1651
- // properties
1652
-
1653
- var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
1654
-
1655
- state.orderedModifiers = orderedModifiers.filter(function (m) {
1656
- return m.enabled;
1657
- }); // Validate the provided modifiers so that the consumer will get warned
1658
- // if one of the modifiers is invalid for any reason
1659
-
1660
- if (process.env.NODE_ENV !== "production") {
1661
- var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
1662
- var name = _ref.name;
1663
- return name;
1664
- });
1665
- validateModifiers(modifiers);
1666
-
1667
- if (getBasePlacement(state.options.placement) === auto) {
1668
- var flipModifier = state.orderedModifiers.find(function (_ref2) {
1669
- var name = _ref2.name;
1670
- return name === 'flip';
1671
- });
1672
-
1673
- if (!flipModifier) {
1674
- console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
1675
- }
1676
- }
1677
-
1678
- var _getComputedStyle = getComputedStyle(popper),
1679
- marginTop = _getComputedStyle.marginTop,
1680
- marginRight = _getComputedStyle.marginRight,
1681
- marginBottom = _getComputedStyle.marginBottom,
1682
- marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
1683
- // cause bugs with positioning, so we'll warn the consumer
1684
-
1685
-
1686
- if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
1687
- return parseFloat(margin);
1688
- })) {
1689
- console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
1690
- }
1691
- }
1692
-
1693
- runModifierEffects();
1694
- return instance.update();
1695
- },
1696
- // Sync update – it will always be executed, even if not necessary. This
1697
- // is useful for low frequency updates where sync behavior simplifies the
1698
- // logic.
1699
- // For high frequency updates (e.g. `resize` and `scroll` events), always
1700
- // prefer the async Popper#update method
1701
- forceUpdate: function forceUpdate() {
1702
- if (isDestroyed) {
1703
- return;
1704
- }
1705
-
1706
- var _state$elements = state.elements,
1707
- reference = _state$elements.reference,
1708
- popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
1709
- // anymore
1710
-
1711
- if (!areValidElements(reference, popper)) {
1712
- if (process.env.NODE_ENV !== "production") {
1713
- console.error(INVALID_ELEMENT_ERROR);
1714
- }
1715
-
1716
- return;
1717
- } // Store the reference and popper rects to be read by modifiers
1718
-
1719
-
1720
- state.rects = {
1721
- reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
1722
- popper: getLayoutRect(popper)
1723
- }; // Modifiers have the ability to reset the current update cycle. The
1724
- // most common use case for this is the `flip` modifier changing the
1725
- // placement, which then needs to re-run all the modifiers, because the
1726
- // logic was previously ran for the previous placement and is therefore
1727
- // stale/incorrect
1728
-
1729
- state.reset = false;
1730
- state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
1731
- // is filled with the initial data specified by the modifier. This means
1732
- // it doesn't persist and is fresh on each update.
1733
- // To ensure persistent data, use `${name}#persistent`
1734
-
1735
- state.orderedModifiers.forEach(function (modifier) {
1736
- return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1737
- });
1738
- var __debug_loops__ = 0;
1739
-
1740
- for (var index = 0; index < state.orderedModifiers.length; index++) {
1741
- if (process.env.NODE_ENV !== "production") {
1742
- __debug_loops__ += 1;
1743
-
1744
- if (__debug_loops__ > 100) {
1745
- console.error(INFINITE_LOOP_ERROR);
1746
- break;
1747
- }
1748
- }
1749
-
1750
- if (state.reset === true) {
1751
- state.reset = false;
1752
- index = -1;
1753
- continue;
1754
- }
1755
-
1756
- var _state$orderedModifie = state.orderedModifiers[index],
1757
- fn = _state$orderedModifie.fn,
1758
- _state$orderedModifie2 = _state$orderedModifie.options,
1759
- _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
1760
- name = _state$orderedModifie.name;
1761
-
1762
- if (typeof fn === 'function') {
1763
- state = fn({
1764
- state: state,
1765
- options: _options,
1766
- name: name,
1767
- instance: instance
1768
- }) || state;
1769
- }
1770
- }
1771
- },
1772
- // Async and optimistically optimized update – it will not be executed if
1773
- // not necessary (debounced to run at most once-per-tick)
1774
- update: debounce(function () {
1775
- return new Promise(function (resolve) {
1776
- instance.forceUpdate();
1777
- resolve(state);
1778
- });
1779
- }),
1780
- destroy: function destroy() {
1781
- cleanupModifierEffects();
1782
- isDestroyed = true;
1783
- }
1784
- };
1785
-
1786
- if (!areValidElements(reference, popper)) {
1787
- if (process.env.NODE_ENV !== "production") {
1788
- console.error(INVALID_ELEMENT_ERROR);
1789
- }
1790
-
1791
- return instance;
1792
- }
1793
-
1794
- instance.setOptions(options).then(function (state) {
1795
- if (!isDestroyed && options.onFirstUpdate) {
1796
- options.onFirstUpdate(state);
1797
- }
1798
- }); // Modifiers have the ability to execute arbitrary code before the first
1799
- // update cycle runs. They will be executed in the same order as the update
1800
- // cycle. This is useful when a modifier adds some persistent data that
1801
- // other modifiers need to use, but the modifier is run after the dependent
1802
- // one.
1803
-
1804
- function runModifierEffects() {
1805
- state.orderedModifiers.forEach(function (_ref3) {
1806
- var name = _ref3.name,
1807
- _ref3$options = _ref3.options,
1808
- options = _ref3$options === void 0 ? {} : _ref3$options,
1809
- effect = _ref3.effect;
1810
-
1811
- if (typeof effect === 'function') {
1812
- var cleanupFn = effect({
1813
- state: state,
1814
- name: name,
1815
- instance: instance,
1816
- options: options
1817
- });
1818
-
1819
- var noopFn = function noopFn() {};
1820
-
1821
- effectCleanupFns.push(cleanupFn || noopFn);
1822
- }
1823
- });
1824
- }
1825
-
1826
- function cleanupModifierEffects() {
1827
- effectCleanupFns.forEach(function (fn) {
1828
- return fn();
1829
- });
1830
- effectCleanupFns = [];
1831
- }
1832
-
1833
- return instance;
1834
- };
1835
- }
1836
-
1837
- var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
1838
- var createPopper = /*#__PURE__*/popperGenerator({
1839
- defaultModifiers: defaultModifiers
1840
- }); // eslint-disable-next-line import/no-unused-modules
1841
-
1842
- /**
1843
- * Simple ponyfill for Object.fromEntries
1844
- */
1845
-
1846
- var fromEntries = function fromEntries(entries) {
1847
- return entries.reduce(function (acc, _ref) {
1848
- var key = _ref[0],
1849
- value = _ref[1];
1850
- acc[key] = value;
1851
- return acc;
1852
- }, {});
1853
- };
1854
- /**
1855
- * Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
1856
- */
1857
-
1858
- var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
1859
-
1860
- /* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
1861
-
1862
- var hasElementType = typeof Element !== 'undefined';
1863
- var hasMap = typeof Map === 'function';
1864
- var hasSet = typeof Set === 'function';
1865
- var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;
1866
-
1867
- // Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js
1868
-
1869
- function equal(a, b) {
1870
- // START: fast-deep-equal es6/index.js 3.1.1
1871
- if (a === b) return true;
1872
-
1873
- if (a && b && typeof a == 'object' && typeof b == 'object') {
1874
- if (a.constructor !== b.constructor) return false;
1875
-
1876
- var length, i, keys;
1877
- if (Array.isArray(a)) {
1878
- length = a.length;
1879
- if (length != b.length) return false;
1880
- for (i = length; i-- !== 0;)
1881
- if (!equal(a[i], b[i])) return false;
1882
- return true;
1883
- }
1884
-
1885
- // START: Modifications:
1886
- // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
1887
- // to co-exist with es5.
1888
- // 2. Replace `for of` with es5 compliant iteration using `for`.
1889
- // Basically, take:
1890
- //
1891
- // ```js
1892
- // for (i of a.entries())
1893
- // if (!b.has(i[0])) return false;
1894
- // ```
1895
- //
1896
- // ... and convert to:
1897
- //
1898
- // ```js
1899
- // it = a.entries();
1900
- // while (!(i = it.next()).done)
1901
- // if (!b.has(i.value[0])) return false;
1902
- // ```
1903
- //
1904
- // **Note**: `i` access switches to `i.value`.
1905
- var it;
1906
- if (hasMap && (a instanceof Map) && (b instanceof Map)) {
1907
- if (a.size !== b.size) return false;
1908
- it = a.entries();
1909
- while (!(i = it.next()).done)
1910
- if (!b.has(i.value[0])) return false;
1911
- it = a.entries();
1912
- while (!(i = it.next()).done)
1913
- if (!equal(i.value[1], b.get(i.value[0]))) return false;
1914
- return true;
1915
- }
1916
-
1917
- if (hasSet && (a instanceof Set) && (b instanceof Set)) {
1918
- if (a.size !== b.size) return false;
1919
- it = a.entries();
1920
- while (!(i = it.next()).done)
1921
- if (!b.has(i.value[0])) return false;
1922
- return true;
1923
- }
1924
- // END: Modifications
1925
-
1926
- if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
1927
- length = a.length;
1928
- if (length != b.length) return false;
1929
- for (i = length; i-- !== 0;)
1930
- if (a[i] !== b[i]) return false;
1931
- return true;
1932
- }
1933
-
1934
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
1935
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
1936
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
1937
-
1938
- keys = Object.keys(a);
1939
- length = keys.length;
1940
- if (length !== Object.keys(b).length) return false;
1941
-
1942
- for (i = length; i-- !== 0;)
1943
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
1944
- // END: fast-deep-equal
1945
-
1946
- // START: react-fast-compare
1947
- // custom handling for DOM elements
1948
- if (hasElementType && a instanceof Element) return false;
1949
-
1950
- // custom handling for React/Preact
1951
- for (i = length; i-- !== 0;) {
1952
- if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
1953
- // React-specific: avoid traversing React elements' _owner
1954
- // Preact-specific: avoid traversing Preact elements' __v and __o
1955
- // __v = $_original / $_vnode
1956
- // __o = $_owner
1957
- // These properties contain circular references and are not needed when
1958
- // comparing the actual elements (and not their owners)
1959
- // .$$typeof and ._store on just reasonable markers of elements
1960
-
1961
- continue;
1962
- }
1963
-
1964
- // all other properties should be traversed as usual
1965
- if (!equal(a[keys[i]], b[keys[i]])) return false;
1966
- }
1967
- // END: react-fast-compare
1968
-
1969
- // START: fast-deep-equal
1970
- return true;
1971
- }
1972
-
1973
- return a !== a && b !== b;
1974
- }
1975
- // end fast-deep-equal
1976
-
1977
- var reactFastCompare = function isEqual(a, b) {
1978
- try {
1979
- return equal(a, b);
1980
- } catch (error) {
1981
- if (((error.message || '').match(/stack|recursion/i))) {
1982
- // warn on circular references, don't crash
1983
- // browsers give this different errors name and messages:
1984
- // chrome/safari: "RangeError", "Maximum call stack size exceeded"
1985
- // firefox: "InternalError", too much recursion"
1986
- // edge: "Error", "Out of stack space"
1987
- console.warn('react-fast-compare cannot handle circular refs');
1988
- return false;
1989
- }
1990
- // some other error. we should definitely know about these
1991
- throw error;
1992
- }
1993
- };
1994
-
1995
- var EMPTY_MODIFIERS = [];
1996
- var usePopper$1 = function usePopper(referenceElement, popperElement, options) {
1997
- if (options === void 0) {
1998
- options = {};
1999
- }
2000
-
2001
- var prevOptions = React.useRef(null);
2002
- var optionsWithDefaults = {
2003
- onFirstUpdate: options.onFirstUpdate,
2004
- placement: options.placement || 'bottom',
2005
- strategy: options.strategy || 'absolute',
2006
- modifiers: options.modifiers || EMPTY_MODIFIERS
2007
- };
2008
-
2009
- var _React$useState = React.useState({
2010
- styles: {
2011
- popper: {
2012
- position: optionsWithDefaults.strategy,
2013
- left: '0',
2014
- top: '0'
2015
- }
2016
- },
2017
- attributes: {}
2018
- }),
2019
- state = _React$useState[0],
2020
- setState = _React$useState[1];
2021
-
2022
- var updateStateModifier = React.useMemo(function () {
2023
- return {
2024
- name: 'updateState',
2025
- enabled: true,
2026
- phase: 'write',
2027
- fn: function fn(_ref) {
2028
- var state = _ref.state;
2029
- var elements = Object.keys(state.elements);
2030
- setState({
2031
- styles: fromEntries(elements.map(function (element) {
2032
- return [element, state.styles[element] || {}];
2033
- })),
2034
- attributes: fromEntries(elements.map(function (element) {
2035
- return [element, state.attributes[element]];
2036
- }))
2037
- });
2038
- },
2039
- requires: ['computeStyles']
2040
- };
2041
- }, []);
2042
- var popperOptions = React.useMemo(function () {
2043
- var newOptions = {
2044
- onFirstUpdate: optionsWithDefaults.onFirstUpdate,
2045
- placement: optionsWithDefaults.placement,
2046
- strategy: optionsWithDefaults.strategy,
2047
- modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {
2048
- name: 'applyStyles',
2049
- enabled: false
2050
- }])
2051
- };
2052
-
2053
- if (reactFastCompare(prevOptions.current, newOptions)) {
2054
- return prevOptions.current || newOptions;
2055
- } else {
2056
- prevOptions.current = newOptions;
2057
- return newOptions;
2058
- }
2059
- }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
2060
- var popperInstanceRef = React.useRef();
2061
- useIsomorphicLayoutEffect(function () {
2062
- if (popperInstanceRef.current) {
2063
- popperInstanceRef.current.setOptions(popperOptions);
2064
- }
2065
- }, [popperOptions]);
2066
- useIsomorphicLayoutEffect(function () {
2067
- if (referenceElement == null || popperElement == null) {
2068
- return;
2069
- }
2070
-
2071
- var createPopper$1 = options.createPopper || createPopper;
2072
- var popperInstance = createPopper$1(referenceElement, popperElement, popperOptions);
2073
- popperInstanceRef.current = popperInstance;
2074
- return function () {
2075
- popperInstance.destroy();
2076
- popperInstanceRef.current = null;
2077
- };
2078
- }, [referenceElement, popperElement, options.createPopper]);
2079
- return {
2080
- state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
2081
- styles: state.styles,
2082
- attributes: state.attributes,
2083
- update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
2084
- forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
2085
- };
2086
- };
2087
-
2088
- /** Stub usePopper for use outside of browsers */
2089
- const useStubPopper = (_a, _p, {
2090
- placement
2091
- }) => ({
2092
- attributes: {
2093
- popper: {
2094
- 'data-popper-placement': placement
2095
- }
2096
- },
2097
- styles: {
2098
- popper: {
2099
- transform: 'translate(1, 1)'
2100
- }
2101
- }
2102
- });
2103
-
2104
- /** Switch hook implementation between environment */
2105
- const usePopper = IS_BROWSER ? usePopper$1 : useStubPopper;
2106
-
2107
- /**
2108
- * Different possible placements for the popover.
2109
- */
2110
- const Placement = {
2111
- AUTO: 'auto',
2112
- AUTO_END: 'auto-end',
2113
- AUTO_START: 'auto-start',
2114
- TOP: 'top',
2115
- TOP_END: 'top-end',
2116
- TOP_START: 'top-start',
2117
- RIGHT: 'right',
2118
- RIGHT_END: 'right-end',
2119
- RIGHT_START: 'right-start',
2120
- BOTTOM: 'bottom',
2121
- BOTTOM_END: 'bottom-end',
2122
- BOTTOM_START: 'bottom-start',
2123
- LEFT: 'left',
2124
- LEFT_END: 'left-end',
2125
- LEFT_START: 'left-start'
2126
- };
2127
-
2128
- /**
2129
- * Offset of the popover.
2130
- */
2131
-
2132
- /**
2133
- * Popover elevation index.
2134
- */
2135
-
2136
- /**
2137
- * Popover fit anchor width options.
2138
- */
2139
- const FitAnchorWidth = {
2140
- MAX_WIDTH: 'maxWidth',
2141
- MIN_WIDTH: 'minWidth',
2142
- WIDTH: 'width'
2143
- };
2144
- /**
2145
- * Arrow size (in pixel).
2146
- */
2147
- const ARROW_SIZE = 14;
2148
-
2149
- /**
2150
- * Popover default z-index
2151
- */
2152
- const POPOVER_ZINDEX = 9999;
2153
-
2154
- export { ARROW_SIZE as A, FitAnchorWidth as F, Placement as P, POPOVER_ZINDEX as a, detectOverflow as d, usePopper as u };
2155
- //# sourceMappingURL=constants-b9e57936.js.map