storybook 10.1.0-alpha.10 → 10.1.0-alpha.12

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 (192) hide show
  1. package/dist/_browser-chunks/Color-FTG7SQDA.js +1097 -0
  2. package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
  3. package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
  4. package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
  5. package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
  6. package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
  7. package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
  8. package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
  9. package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-74YHFU5B.js} +44 -109
  10. package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
  11. package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
  12. package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
  13. package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
  14. package/dist/_browser-chunks/chunk-BE2DAXKJ.js +2966 -0
  15. package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
  16. package/dist/_browser-chunks/chunk-EBHB6RPS.js +61 -0
  17. package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
  18. package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
  19. package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
  20. package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
  21. package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
  22. package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
  23. package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
  24. package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
  25. package/dist/_browser-chunks/{chunk-QMY4G4R2.js → chunk-L4RMQ7D7.js} +17 -64
  26. package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
  27. package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
  28. package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
  29. package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
  30. package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
  31. package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
  32. package/dist/_browser-chunks/chunk-WXP2XJ3O.js +950 -0
  33. package/dist/_browser-chunks/chunk-X3DUQ5RA.js +47 -0
  34. package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
  35. package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
  36. package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
  37. package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
  38. package/dist/_browser-chunks/{syntaxhighlighter-RJZASWHL.js → syntaxhighlighter-WKBQ5RC7.js} +704 -1848
  39. package/dist/_node-chunks/{builder-manager-HA7CYFCK.js → builder-manager-YUOHSIUB.js} +475 -1013
  40. package/dist/_node-chunks/camelcase-JREIL7NV.js +18 -0
  41. package/dist/_node-chunks/{chunk-RMHAL25C.js → chunk-2D2IODUU.js} +88 -228
  42. package/dist/_node-chunks/chunk-2DMESZFJ.js +943 -0
  43. package/dist/_node-chunks/chunk-4FT2DHGE.js +3009 -0
  44. package/dist/_node-chunks/chunk-5HV3B5OP.js +45571 -0
  45. package/dist/_node-chunks/{chunk-OVXB5GGT.js → chunk-5KLIDWFN.js} +292 -688
  46. package/dist/_node-chunks/chunk-A4APXFQ2.js +759 -0
  47. package/dist/_node-chunks/chunk-B6JWY6PC.js +37 -0
  48. package/dist/_node-chunks/chunk-CZ5GHJCC.js +603 -0
  49. package/dist/_node-chunks/chunk-DUXPWBOK.js +61 -0
  50. package/dist/_node-chunks/chunk-DWXTZT3D.js +58 -0
  51. package/dist/_node-chunks/chunk-E5FJS66Z.js +20 -0
  52. package/dist/_node-chunks/chunk-EZWWR7AR.js +936 -0
  53. package/dist/_node-chunks/chunk-FDXFVHIL.js +1114 -0
  54. package/dist/_node-chunks/{chunk-F3XOPI6H.js → chunk-FZLRAH4N.js} +469 -983
  55. package/dist/_node-chunks/chunk-HZG65SU3.js +34 -0
  56. package/dist/_node-chunks/chunk-IXVYNBMD.js +18 -0
  57. package/dist/_node-chunks/chunk-JARUEMEP.js +4523 -0
  58. package/dist/_node-chunks/chunk-LIH7MTP7.js +3214 -0
  59. package/dist/_node-chunks/chunk-N5GIRUP5.js +1047 -0
  60. package/dist/_node-chunks/{chunk-X4XU27M6.js → chunk-NAOYEL54.js} +15 -24
  61. package/dist/_node-chunks/chunk-O5DA7YLO.js +3171 -0
  62. package/dist/_node-chunks/chunk-OP3INKUD.js +54 -0
  63. package/dist/_node-chunks/chunk-QCO2ZM7F.js +209 -0
  64. package/dist/_node-chunks/chunk-QYQIZBS6.js +26 -0
  65. package/dist/_node-chunks/chunk-SEMIAAWG.js +1564 -0
  66. package/dist/_node-chunks/chunk-TS2UUH2J.js +301 -0
  67. package/dist/_node-chunks/chunk-WA6KZQZ2.js +119 -0
  68. package/dist/_node-chunks/{chunk-ZHSCUGNP.js → chunk-WFLWJO24.js} +3799 -7849
  69. package/dist/_node-chunks/chunk-WUXQMQCB.js +72 -0
  70. package/dist/_node-chunks/{chunk-VPR5IBMG.js → chunk-XXPJ7XR3.js} +8 -10
  71. package/dist/_node-chunks/chunk-Y4E6IGQF.js +61 -0
  72. package/dist/_node-chunks/chunk-ZL3AFKRX.js +1029 -0
  73. package/dist/_node-chunks/chunk-ZXSD6L3S.js +756 -0
  74. package/dist/_node-chunks/dist-DS2B5A3J.js +121 -0
  75. package/dist/_node-chunks/globby-6THB7HVX.js +3452 -0
  76. package/dist/_node-chunks/lib-5NKX4YGG.js +366 -0
  77. package/dist/_node-chunks/mdx-N42X6CFJ-ZLT3QOFF.js +14329 -0
  78. package/dist/_node-chunks/p-limit-PDMWNG7W.js +116 -0
  79. package/dist/_node-chunks/plugin-6XMWOGPO.js +123 -0
  80. package/dist/_node-chunks/{plugin-6ZPCS4LI.js → plugin-LTOXVT6A.js} +36 -56
  81. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-2SFE5LQS.js +46582 -0
  82. package/dist/_node-chunks/webpack-mock-plugin-CX5J2U56.js +92 -0
  83. package/dist/actions/decorator.js +21 -42
  84. package/dist/actions/index.js +3 -3
  85. package/dist/babel/index.d.ts +671 -335
  86. package/dist/babel/index.js +11 -11
  87. package/dist/bin/core.js +592 -1546
  88. package/dist/bin/dispatcher.js +26 -37
  89. package/dist/bin/loader.js +23 -34
  90. package/dist/channels/index.js +98 -234
  91. package/dist/cli/index.js +1951 -5308
  92. package/dist/client-logger/index.js +31 -61
  93. package/dist/common/index.js +20 -20
  94. package/dist/components/index.js +4211 -8586
  95. package/dist/core-events/index.js +2 -66
  96. package/dist/core-server/index.js +3054 -7290
  97. package/dist/core-server/presets/common-manager.css +2 -2
  98. package/dist/core-server/presets/common-manager.js +1806 -3427
  99. package/dist/core-server/presets/common-override-preset.js +31 -60
  100. package/dist/core-server/presets/common-preset.js +434 -924
  101. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +15 -19
  102. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +12 -17
  103. package/dist/csf/index.js +534 -1179
  104. package/dist/csf-tools/index.js +9 -9
  105. package/dist/docs-tools/index.js +6 -6
  106. package/dist/highlight/index.js +2 -2
  107. package/dist/instrumenter/index.js +199 -415
  108. package/dist/manager/globals-runtime.js +24150 -47364
  109. package/dist/manager/globals.js +2 -3
  110. package/dist/manager/runtime.js +3961 -8373
  111. package/dist/manager-api/index.js +1231 -2425
  112. package/dist/manager-errors.d.ts +3 -0
  113. package/dist/manager-errors.js +3 -3
  114. package/dist/node-logger/index.js +1253 -2601
  115. package/dist/preview/globals.js +2 -3
  116. package/dist/preview/runtime.js +10364 -21990
  117. package/dist/preview-api/index.d.ts +67 -68
  118. package/dist/preview-api/index.js +13 -13
  119. package/dist/preview-errors.d.ts +3 -0
  120. package/dist/preview-errors.js +4 -4
  121. package/dist/router/index.js +347 -899
  122. package/dist/server-errors.d.ts +3 -0
  123. package/dist/server-errors.js +10 -10
  124. package/dist/telemetry/index.js +24 -24
  125. package/dist/test/index.js +5860 -11645
  126. package/dist/theming/create.js +4 -4
  127. package/dist/theming/index.d.ts +3363 -2597
  128. package/dist/theming/index.js +490 -1086
  129. package/dist/types/index.js +2 -11
  130. package/dist/viewport/index.js +3 -3
  131. package/package.json +5 -5
  132. package/dist/_browser-chunks/Color-FQNEU7YS.js +0 -1695
  133. package/dist/_browser-chunks/WithTooltip-6NHN2GXF.js +0 -2343
  134. package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
  135. package/dist/_browser-chunks/chunk-AW46NMGV.js +0 -1308
  136. package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
  137. package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
  138. package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
  139. package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
  140. package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
  141. package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
  142. package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
  143. package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
  144. package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
  145. package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
  146. package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
  147. package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
  148. package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
  149. package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
  150. package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
  151. package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
  152. package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
  153. package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
  154. package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
  155. package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
  156. package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
  157. package/dist/_node-chunks/camelcase-QALD4XFE.js +0 -18
  158. package/dist/_node-chunks/chunk-2XY53ALL.js +0 -420
  159. package/dist/_node-chunks/chunk-3CBQMG2A.js +0 -6712
  160. package/dist/_node-chunks/chunk-3WDAPZYQ.js +0 -28
  161. package/dist/_node-chunks/chunk-4ZB555EJ.js +0 -697
  162. package/dist/_node-chunks/chunk-52DXKXY3.js +0 -4272
  163. package/dist/_node-chunks/chunk-5OVB4A6F.js +0 -69
  164. package/dist/_node-chunks/chunk-AGHGNXGH.js +0 -18
  165. package/dist/_node-chunks/chunk-B23X5ZCK.js +0 -1531
  166. package/dist/_node-chunks/chunk-B2DAHWJK.js +0 -220
  167. package/dist/_node-chunks/chunk-CC4PW5MJ.js +0 -34
  168. package/dist/_node-chunks/chunk-D7NIZELR.js +0 -2256
  169. package/dist/_node-chunks/chunk-DO5Q3H4L.js +0 -1250
  170. package/dist/_node-chunks/chunk-ECK7WVFX.js +0 -304
  171. package/dist/_node-chunks/chunk-EUH3NHXA.js +0 -79
  172. package/dist/_node-chunks/chunk-FOQHPHCV.js +0 -1657
  173. package/dist/_node-chunks/chunk-G6EL47NS.js +0 -111
  174. package/dist/_node-chunks/chunk-GFLS4TJB.js +0 -90
  175. package/dist/_node-chunks/chunk-J3XZKWHE.js +0 -1586
  176. package/dist/_node-chunks/chunk-LE63EHJ5.js +0 -1518
  177. package/dist/_node-chunks/chunk-M47XA42S.js +0 -4741
  178. package/dist/_node-chunks/chunk-OOI74AL3.js +0 -61
  179. package/dist/_node-chunks/chunk-PRJHT3GJ.js +0 -61
  180. package/dist/_node-chunks/chunk-Q52PVUSU.js +0 -101
  181. package/dist/_node-chunks/chunk-SDCF5RNN.js +0 -1198
  182. package/dist/_node-chunks/chunk-UJ5SJ23M.js +0 -5029
  183. package/dist/_node-chunks/chunk-UPHK4ETU.js +0 -64658
  184. package/dist/_node-chunks/chunk-V7VURIPB.js +0 -1544
  185. package/dist/_node-chunks/dist-6TXHNR5C.js +0 -175
  186. package/dist/_node-chunks/globby-PBTV6PX6.js +0 -5222
  187. package/dist/_node-chunks/lib-4RTDZVGX.js +0 -518
  188. package/dist/_node-chunks/mdx-N42X6CFJ-COWEH7KR.js +0 -22017
  189. package/dist/_node-chunks/p-limit-PBVZQOFY.js +0 -168
  190. package/dist/_node-chunks/plugin-EOZKYZAG.js +0 -159
  191. package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-35HMSMR5.js +0 -69102
  192. package/dist/_node-chunks/webpack-mock-plugin-GT3MA5E2.js +0 -124
@@ -0,0 +1,1651 @@
1
+ import {
2
+ _objectWithoutPropertiesLoose
3
+ } from "./chunk-45UGUKRX.js";
4
+ import {
5
+ _extends
6
+ } from "./chunk-CHUV5WSW.js";
7
+ import {
8
+ require_memoizerific
9
+ } from "./chunk-WJYERY3R.js";
10
+ import {
11
+ __commonJS,
12
+ __toESM
13
+ } from "./chunk-A242L54C.js";
14
+
15
+ // ../node_modules/react-fast-compare/index.js
16
+ var require_react_fast_compare = __commonJS({
17
+ "../node_modules/react-fast-compare/index.js"(exports, module) {
18
+ var hasElementType = typeof Element < "u", hasMap = typeof Map == "function", hasSet = typeof Set == "function", hasArrayBuffer = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
19
+ function equal(a, b) {
20
+ if (a === b) return !0;
21
+ if (a && b && typeof a == "object" && typeof b == "object") {
22
+ if (a.constructor !== b.constructor) return !1;
23
+ var length, i, keys;
24
+ if (Array.isArray(a)) {
25
+ if (length = a.length, length != b.length) return !1;
26
+ for (i = length; i-- !== 0; )
27
+ if (!equal(a[i], b[i])) return !1;
28
+ return !0;
29
+ }
30
+ var it;
31
+ if (hasMap && a instanceof Map && b instanceof Map) {
32
+ if (a.size !== b.size) return !1;
33
+ for (it = a.entries(); !(i = it.next()).done; )
34
+ if (!b.has(i.value[0])) return !1;
35
+ for (it = a.entries(); !(i = it.next()).done; )
36
+ if (!equal(i.value[1], b.get(i.value[0]))) return !1;
37
+ return !0;
38
+ }
39
+ if (hasSet && a instanceof Set && b instanceof Set) {
40
+ if (a.size !== b.size) return !1;
41
+ for (it = a.entries(); !(i = it.next()).done; )
42
+ if (!b.has(i.value[0])) return !1;
43
+ return !0;
44
+ }
45
+ if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
46
+ if (length = a.length, length != b.length) return !1;
47
+ for (i = length; i-- !== 0; )
48
+ if (a[i] !== b[i]) return !1;
49
+ return !0;
50
+ }
51
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
52
+ if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf == "function" && typeof b.valueOf == "function") return a.valueOf() === b.valueOf();
53
+ if (a.toString !== Object.prototype.toString && typeof a.toString == "function" && typeof b.toString == "function") return a.toString() === b.toString();
54
+ if (keys = Object.keys(a), length = keys.length, length !== Object.keys(b).length) return !1;
55
+ for (i = length; i-- !== 0; )
56
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return !1;
57
+ if (hasElementType && a instanceof Element) return !1;
58
+ for (i = length; i-- !== 0; )
59
+ if (!((keys[i] === "_owner" || keys[i] === "__v" || keys[i] === "__o") && a.$$typeof) && !equal(a[keys[i]], b[keys[i]]))
60
+ return !1;
61
+ return !0;
62
+ }
63
+ return a !== a && b !== b;
64
+ }
65
+ module.exports = function(a, b) {
66
+ try {
67
+ return equal(a, b);
68
+ } catch (error) {
69
+ if ((error.message || "").match(/stack|recursion/i))
70
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
71
+ throw error;
72
+ }
73
+ };
74
+ }
75
+ });
76
+
77
+ // ../node_modules/warning/warning.js
78
+ var require_warning = __commonJS({
79
+ "../node_modules/warning/warning.js"(exports, module) {
80
+ "use strict";
81
+ var __DEV__ = process.env.NODE_ENV !== "production", warning2 = function() {
82
+ };
83
+ __DEV__ && (printWarning = function(format, args) {
84
+ var len = arguments.length;
85
+ args = new Array(len > 1 ? len - 1 : 0);
86
+ for (var key = 1; key < len; key++)
87
+ args[key - 1] = arguments[key];
88
+ var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() {
89
+ return args[argIndex++];
90
+ });
91
+ typeof console < "u" && console.error(message);
92
+ try {
93
+ throw new Error(message);
94
+ } catch {
95
+ }
96
+ }, warning2 = function(condition, format, args) {
97
+ var len = arguments.length;
98
+ args = new Array(len > 2 ? len - 2 : 0);
99
+ for (var key = 2; key < len; key++)
100
+ args[key - 2] = arguments[key];
101
+ if (format === void 0)
102
+ throw new Error(
103
+ "`warning(condition, format, ...args)` requires a warning message argument"
104
+ );
105
+ condition || printWarning.apply(null, [format].concat(args));
106
+ });
107
+ var printWarning;
108
+ module.exports = warning2;
109
+ }
110
+ });
111
+
112
+ // src/components/components/tooltip/WithTooltip.tsx
113
+ var import_memoizerific = __toESM(require_memoizerific(), 1);
114
+ import React7, { useCallback as useCallback4, useEffect as useEffect6, useState as useState5 } from "react";
115
+ import ReactDOM2 from "react-dom";
116
+ import { deprecate } from "storybook/internal/client-logger";
117
+ import { global } from "@storybook/global";
118
+
119
+ // ../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js
120
+ import * as React6 from "react";
121
+
122
+ // ../node_modules/react-popper/lib/esm/Popper.js
123
+ import * as React4 from "react";
124
+
125
+ // ../node_modules/react-popper/lib/esm/Manager.js
126
+ import * as React from "react";
127
+ var ManagerReferenceNodeContext = React.createContext(), ManagerReferenceNodeSetterContext = React.createContext();
128
+
129
+ // ../node_modules/react-popper/lib/esm/utils.js
130
+ import * as React2 from "react";
131
+ var fromEntries = function(entries) {
132
+ return entries.reduce(function(acc, _ref) {
133
+ var key = _ref[0], value = _ref[1];
134
+ return acc[key] = value, acc;
135
+ }, {});
136
+ }, useIsomorphicLayoutEffect = typeof window < "u" && window.document && window.document.createElement ? React2.useLayoutEffect : React2.useEffect;
137
+
138
+ // ../node_modules/react-popper/lib/esm/usePopper.js
139
+ import * as React3 from "react";
140
+ import * as ReactDOM from "react-dom";
141
+
142
+ // ../node_modules/@popperjs/core/lib/enums.js
143
+ var top = "top", bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [top, bottom, right, left], start = "start", end = "end", clippingParents = "clippingParents", viewport = "viewport", popper = "popper", reference = "reference", variationPlacements = basePlacements.reduce(function(acc, placement) {
144
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
145
+ }, []), placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
146
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
147
+ }, []), beforeRead = "beforeRead", read = "read", afterRead = "afterRead", beforeMain = "beforeMain", main = "main", afterMain = "afterMain", beforeWrite = "beforeWrite", write = "write", afterWrite = "afterWrite", modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
148
+
149
+ // ../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
150
+ function getNodeName(element) {
151
+ return element ? (element.nodeName || "").toLowerCase() : null;
152
+ }
153
+
154
+ // ../node_modules/@popperjs/core/lib/dom-utils/getWindow.js
155
+ function getWindow(node) {
156
+ if (node == null)
157
+ return window;
158
+ if (node.toString() !== "[object Window]") {
159
+ var ownerDocument = node.ownerDocument;
160
+ return ownerDocument && ownerDocument.defaultView || window;
161
+ }
162
+ return node;
163
+ }
164
+
165
+ // ../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
166
+ function isElement(node) {
167
+ var OwnElement = getWindow(node).Element;
168
+ return node instanceof OwnElement || node instanceof Element;
169
+ }
170
+ function isHTMLElement(node) {
171
+ var OwnElement = getWindow(node).HTMLElement;
172
+ return node instanceof OwnElement || node instanceof HTMLElement;
173
+ }
174
+ function isShadowRoot(node) {
175
+ if (typeof ShadowRoot > "u")
176
+ return !1;
177
+ var OwnElement = getWindow(node).ShadowRoot;
178
+ return node instanceof OwnElement || node instanceof ShadowRoot;
179
+ }
180
+
181
+ // ../node_modules/@popperjs/core/lib/modifiers/applyStyles.js
182
+ function applyStyles(_ref) {
183
+ var state = _ref.state;
184
+ Object.keys(state.elements).forEach(function(name) {
185
+ var style = state.styles[name] || {}, attributes = state.attributes[name] || {}, element = state.elements[name];
186
+ !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(name2) {
187
+ var value = attributes[name2];
188
+ value === !1 ? element.removeAttribute(name2) : element.setAttribute(name2, value === !0 ? "" : value);
189
+ }));
190
+ });
191
+ }
192
+ function effect(_ref2) {
193
+ var state = _ref2.state, initialStyles = {
194
+ popper: {
195
+ position: state.options.strategy,
196
+ left: "0",
197
+ top: "0",
198
+ margin: "0"
199
+ },
200
+ arrow: {
201
+ position: "absolute"
202
+ },
203
+ reference: {}
204
+ };
205
+ return Object.assign(state.elements.popper.style, initialStyles.popper), state.styles = initialStyles, state.elements.arrow && Object.assign(state.elements.arrow.style, initialStyles.arrow), function() {
206
+ Object.keys(state.elements).forEach(function(name) {
207
+ var element = state.elements[name], attributes = state.attributes[name] || {}, styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]), style = styleProperties.reduce(function(style2, property) {
208
+ return style2[property] = "", style2;
209
+ }, {});
210
+ !isHTMLElement(element) || !getNodeName(element) || (Object.assign(element.style, style), Object.keys(attributes).forEach(function(attribute) {
211
+ element.removeAttribute(attribute);
212
+ }));
213
+ });
214
+ };
215
+ }
216
+ var applyStyles_default = {
217
+ name: "applyStyles",
218
+ enabled: !0,
219
+ phase: "write",
220
+ fn: applyStyles,
221
+ effect,
222
+ requires: ["computeStyles"]
223
+ };
224
+
225
+ // ../node_modules/@popperjs/core/lib/utils/getBasePlacement.js
226
+ function getBasePlacement(placement) {
227
+ return placement.split("-")[0];
228
+ }
229
+
230
+ // ../node_modules/@popperjs/core/lib/utils/math.js
231
+ var max = Math.max, min = Math.min, round = Math.round;
232
+
233
+ // ../node_modules/@popperjs/core/lib/utils/userAgent.js
234
+ function getUAString() {
235
+ var uaData = navigator.userAgentData;
236
+ return uaData != null && uaData.brands && Array.isArray(uaData.brands) ? uaData.brands.map(function(item) {
237
+ return item.brand + "/" + item.version;
238
+ }).join(" ") : navigator.userAgent;
239
+ }
240
+
241
+ // ../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js
242
+ function isLayoutViewport() {
243
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
244
+ }
245
+
246
+ // ../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
247
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
248
+ includeScale === void 0 && (includeScale = !1), isFixedStrategy === void 0 && (isFixedStrategy = !1);
249
+ var clientRect = element.getBoundingClientRect(), scaleX = 1, scaleY = 1;
250
+ includeScale && isHTMLElement(element) && (scaleX = element.offsetWidth > 0 && round(clientRect.width) / element.offsetWidth || 1, scaleY = element.offsetHeight > 0 && round(clientRect.height) / element.offsetHeight || 1);
251
+ var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport, addVisualOffsets = !isLayoutViewport() && isFixedStrategy, x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX, y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY, width = clientRect.width / scaleX, height = clientRect.height / scaleY;
252
+ return {
253
+ width,
254
+ height,
255
+ top: y,
256
+ right: x + width,
257
+ bottom: y + height,
258
+ left: x,
259
+ x,
260
+ y
261
+ };
262
+ }
263
+
264
+ // ../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
265
+ function getLayoutRect(element) {
266
+ var clientRect = getBoundingClientRect(element), width = element.offsetWidth, height = element.offsetHeight;
267
+ return Math.abs(clientRect.width - width) <= 1 && (width = clientRect.width), Math.abs(clientRect.height - height) <= 1 && (height = clientRect.height), {
268
+ x: element.offsetLeft,
269
+ y: element.offsetTop,
270
+ width,
271
+ height
272
+ };
273
+ }
274
+
275
+ // ../node_modules/@popperjs/core/lib/dom-utils/contains.js
276
+ function contains(parent, child) {
277
+ var rootNode = child.getRootNode && child.getRootNode();
278
+ if (parent.contains(child))
279
+ return !0;
280
+ if (rootNode && isShadowRoot(rootNode)) {
281
+ var next = child;
282
+ do {
283
+ if (next && parent.isSameNode(next))
284
+ return !0;
285
+ next = next.parentNode || next.host;
286
+ } while (next);
287
+ }
288
+ return !1;
289
+ }
290
+
291
+ // ../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
292
+ function getComputedStyle(element) {
293
+ return getWindow(element).getComputedStyle(element);
294
+ }
295
+
296
+ // ../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
297
+ function isTableElement(element) {
298
+ return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
299
+ }
300
+
301
+ // ../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
302
+ function getDocumentElement(element) {
303
+ return ((isElement(element) ? element.ownerDocument : (
304
+ // $FlowFixMe[prop-missing]
305
+ element.document
306
+ )) || window.document).documentElement;
307
+ }
308
+
309
+ // ../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
310
+ function getParentNode(element) {
311
+ return getNodeName(element) === "html" ? element : (
312
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
313
+ // $FlowFixMe[incompatible-return]
314
+ // $FlowFixMe[prop-missing]
315
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
316
+ element.parentNode || // DOM Element detected
317
+ (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
318
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
319
+ getDocumentElement(element)
320
+ );
321
+ }
322
+
323
+ // ../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
324
+ function getTrueOffsetParent(element) {
325
+ return !isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
326
+ getComputedStyle(element).position === "fixed" ? null : element.offsetParent;
327
+ }
328
+ function getContainingBlock(element) {
329
+ var isFirefox = /firefox/i.test(getUAString()), isIE = /Trident/i.test(getUAString());
330
+ if (isIE && isHTMLElement(element)) {
331
+ var elementCss = getComputedStyle(element);
332
+ if (elementCss.position === "fixed")
333
+ return null;
334
+ }
335
+ var currentNode = getParentNode(element);
336
+ for (isShadowRoot(currentNode) && (currentNode = currentNode.host); isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0; ) {
337
+ var css = getComputedStyle(currentNode);
338
+ if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none")
339
+ return currentNode;
340
+ currentNode = currentNode.parentNode;
341
+ }
342
+ return null;
343
+ }
344
+ function getOffsetParent(element) {
345
+ for (var window2 = getWindow(element), offsetParent = getTrueOffsetParent(element); offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static"; )
346
+ offsetParent = getTrueOffsetParent(offsetParent);
347
+ return offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static") ? window2 : offsetParent || getContainingBlock(element) || window2;
348
+ }
349
+
350
+ // ../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
351
+ function getMainAxisFromPlacement(placement) {
352
+ return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
353
+ }
354
+
355
+ // ../node_modules/@popperjs/core/lib/utils/within.js
356
+ function within(min2, value, max2) {
357
+ return max(min2, min(value, max2));
358
+ }
359
+ function withinMaxClamp(min2, value, max2) {
360
+ var v = within(min2, value, max2);
361
+ return v > max2 ? max2 : v;
362
+ }
363
+
364
+ // ../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
365
+ function getFreshSideObject() {
366
+ return {
367
+ top: 0,
368
+ right: 0,
369
+ bottom: 0,
370
+ left: 0
371
+ };
372
+ }
373
+
374
+ // ../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
375
+ function mergePaddingObject(paddingObject) {
376
+ return Object.assign({}, getFreshSideObject(), paddingObject);
377
+ }
378
+
379
+ // ../node_modules/@popperjs/core/lib/utils/expandToHashMap.js
380
+ function expandToHashMap(value, keys) {
381
+ return keys.reduce(function(hashMap, key) {
382
+ return hashMap[key] = value, hashMap;
383
+ }, {});
384
+ }
385
+
386
+ // ../node_modules/@popperjs/core/lib/modifiers/arrow.js
387
+ var toPaddingObject = function(padding, state) {
388
+ return padding = typeof padding == "function" ? padding(Object.assign({}, state.rects, {
389
+ placement: state.placement
390
+ })) : padding, mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements));
391
+ };
392
+ function arrow(_ref) {
393
+ var _state$modifiersData$, state = _ref.state, name = _ref.name, options = _ref.options, arrowElement = state.elements.arrow, popperOffsets2 = state.modifiersData.popperOffsets, basePlacement = getBasePlacement(state.placement), axis = getMainAxisFromPlacement(basePlacement), isVertical = [left, right].indexOf(basePlacement) >= 0, len = isVertical ? "height" : "width";
394
+ if (!(!arrowElement || !popperOffsets2)) {
395
+ var paddingObject = toPaddingObject(options.padding, state), arrowRect = getLayoutRect(arrowElement), minProp = axis === "y" ? top : left, maxProp = axis === "y" ? bottom : right, endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len], startDiff = popperOffsets2[axis] - state.rects.reference[axis], arrowOffsetParent = getOffsetParent(arrowElement), clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0, centerToReference = endDiff / 2 - startDiff / 2, min2 = paddingObject[minProp], max2 = clientSize - arrowRect[len] - paddingObject[maxProp], center = clientSize / 2 - arrowRect[len] / 2 + centerToReference, offset2 = within(min2, center, max2), axisProp = axis;
396
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$);
397
+ }
398
+ }
399
+ function effect2(_ref2) {
400
+ var state = _ref2.state, options = _ref2.options, _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
401
+ arrowElement != null && (typeof arrowElement == "string" && (arrowElement = state.elements.popper.querySelector(arrowElement), !arrowElement) || contains(state.elements.popper, arrowElement) && (state.elements.arrow = arrowElement));
402
+ }
403
+ var arrow_default = {
404
+ name: "arrow",
405
+ enabled: !0,
406
+ phase: "main",
407
+ fn: arrow,
408
+ effect: effect2,
409
+ requires: ["popperOffsets"],
410
+ requiresIfExists: ["preventOverflow"]
411
+ };
412
+
413
+ // ../node_modules/@popperjs/core/lib/utils/getVariation.js
414
+ function getVariation(placement) {
415
+ return placement.split("-")[1];
416
+ }
417
+
418
+ // ../node_modules/@popperjs/core/lib/modifiers/computeStyles.js
419
+ var unsetSides = {
420
+ top: "auto",
421
+ right: "auto",
422
+ bottom: "auto",
423
+ left: "auto"
424
+ };
425
+ function roundOffsetsByDPR(_ref, win) {
426
+ var x = _ref.x, y = _ref.y, dpr = win.devicePixelRatio || 1;
427
+ return {
428
+ x: round(x * dpr) / dpr || 0,
429
+ y: round(y * dpr) / dpr || 0
430
+ };
431
+ }
432
+ function mapToStyles(_ref2) {
433
+ var _Object$assign2, popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed, _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y, _ref3 = typeof roundOffsets == "function" ? roundOffsets({
434
+ x,
435
+ y
436
+ }) : {
437
+ x,
438
+ y
439
+ };
440
+ x = _ref3.x, y = _ref3.y;
441
+ var hasX = offsets.hasOwnProperty("x"), hasY = offsets.hasOwnProperty("y"), sideX = left, sideY = top, win = window;
442
+ if (adaptive) {
443
+ var offsetParent = getOffsetParent(popper2), heightProp = "clientHeight", widthProp = "clientWidth";
444
+ if (offsetParent === getWindow(popper2) && (offsetParent = getDocumentElement(popper2), getComputedStyle(offsetParent).position !== "static" && position === "absolute" && (heightProp = "scrollHeight", widthProp = "scrollWidth")), offsetParent = offsetParent, placement === top || (placement === left || placement === right) && variation === end) {
445
+ sideY = bottom;
446
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : (
447
+ // $FlowFixMe[prop-missing]
448
+ offsetParent[heightProp]
449
+ );
450
+ y -= offsetY - popperRect.height, y *= gpuAcceleration ? 1 : -1;
451
+ }
452
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
453
+ sideX = right;
454
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : (
455
+ // $FlowFixMe[prop-missing]
456
+ offsetParent[widthProp]
457
+ );
458
+ x -= offsetX - popperRect.width, x *= gpuAcceleration ? 1 : -1;
459
+ }
460
+ }
461
+ var commonStyles = Object.assign({
462
+ position
463
+ }, adaptive && unsetSides), _ref4 = roundOffsets === !0 ? roundOffsetsByDPR({
464
+ x,
465
+ y
466
+ }, getWindow(popper2)) : {
467
+ x,
468
+ y
469
+ };
470
+ if (x = _ref4.x, y = _ref4.y, gpuAcceleration) {
471
+ var _Object$assign;
472
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
473
+ }
474
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
475
+ }
476
+ function computeStyles(_ref5) {
477
+ var state = _ref5.state, options = _ref5.options, _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? !0 : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? !0 : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? !0 : _options$roundOffsets, commonStyles = {
478
+ placement: getBasePlacement(state.placement),
479
+ variation: getVariation(state.placement),
480
+ popper: state.elements.popper,
481
+ popperRect: state.rects.popper,
482
+ gpuAcceleration,
483
+ isFixed: state.options.strategy === "fixed"
484
+ };
485
+ state.modifiersData.popperOffsets != null && (state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
486
+ offsets: state.modifiersData.popperOffsets,
487
+ position: state.options.strategy,
488
+ adaptive,
489
+ roundOffsets
490
+ })))), state.modifiersData.arrow != null && (state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
491
+ offsets: state.modifiersData.arrow,
492
+ position: "absolute",
493
+ adaptive: !1,
494
+ roundOffsets
495
+ })))), state.attributes.popper = Object.assign({}, state.attributes.popper, {
496
+ "data-popper-placement": state.placement
497
+ });
498
+ }
499
+ var computeStyles_default = {
500
+ name: "computeStyles",
501
+ enabled: !0,
502
+ phase: "beforeWrite",
503
+ fn: computeStyles,
504
+ data: {}
505
+ };
506
+
507
+ // ../node_modules/@popperjs/core/lib/modifiers/eventListeners.js
508
+ var passive = {
509
+ passive: !0
510
+ };
511
+ function effect3(_ref) {
512
+ var state = _ref.state, instance = _ref.instance, options = _ref.options, _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? !0 : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? !0 : _options$resize, window2 = getWindow(state.elements.popper), scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
513
+ return scroll && scrollParents.forEach(function(scrollParent) {
514
+ scrollParent.addEventListener("scroll", instance.update, passive);
515
+ }), resize && window2.addEventListener("resize", instance.update, passive), function() {
516
+ scroll && scrollParents.forEach(function(scrollParent) {
517
+ scrollParent.removeEventListener("scroll", instance.update, passive);
518
+ }), resize && window2.removeEventListener("resize", instance.update, passive);
519
+ };
520
+ }
521
+ var eventListeners_default = {
522
+ name: "eventListeners",
523
+ enabled: !0,
524
+ phase: "write",
525
+ fn: function() {
526
+ },
527
+ effect: effect3,
528
+ data: {}
529
+ };
530
+
531
+ // ../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
532
+ var hash = {
533
+ left: "right",
534
+ right: "left",
535
+ bottom: "top",
536
+ top: "bottom"
537
+ };
538
+ function getOppositePlacement(placement) {
539
+ return placement.replace(/left|right|bottom|top/g, function(matched) {
540
+ return hash[matched];
541
+ });
542
+ }
543
+
544
+ // ../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
545
+ var hash2 = {
546
+ start: "end",
547
+ end: "start"
548
+ };
549
+ function getOppositeVariationPlacement(placement) {
550
+ return placement.replace(/start|end/g, function(matched) {
551
+ return hash2[matched];
552
+ });
553
+ }
554
+
555
+ // ../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
556
+ function getWindowScroll(node) {
557
+ var win = getWindow(node), scrollLeft = win.pageXOffset, scrollTop = win.pageYOffset;
558
+ return {
559
+ scrollLeft,
560
+ scrollTop
561
+ };
562
+ }
563
+
564
+ // ../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
565
+ function getWindowScrollBarX(element) {
566
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
567
+ }
568
+
569
+ // ../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
570
+ function getViewportRect(element, strategy) {
571
+ var win = getWindow(element), html = getDocumentElement(element), visualViewport = win.visualViewport, width = html.clientWidth, height = html.clientHeight, x = 0, y = 0;
572
+ if (visualViewport) {
573
+ width = visualViewport.width, height = visualViewport.height;
574
+ var layoutViewport = isLayoutViewport();
575
+ (layoutViewport || !layoutViewport && strategy === "fixed") && (x = visualViewport.offsetLeft, y = visualViewport.offsetTop);
576
+ }
577
+ return {
578
+ width,
579
+ height,
580
+ x: x + getWindowScrollBarX(element),
581
+ y
582
+ };
583
+ }
584
+
585
+ // ../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
586
+ function getDocumentRect(element) {
587
+ var _element$ownerDocumen, html = getDocumentElement(element), winScroll = getWindowScroll(element), body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body, width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0), height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0), x = -winScroll.scrollLeft + getWindowScrollBarX(element), y = -winScroll.scrollTop;
588
+ return getComputedStyle(body || html).direction === "rtl" && (x += max(html.clientWidth, body ? body.clientWidth : 0) - width), {
589
+ width,
590
+ height,
591
+ x,
592
+ y
593
+ };
594
+ }
595
+
596
+ // ../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
597
+ function isScrollParent(element) {
598
+ var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
599
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
600
+ }
601
+
602
+ // ../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
603
+ function getScrollParent(node) {
604
+ return ["html", "body", "#document"].indexOf(getNodeName(node)) >= 0 ? node.ownerDocument.body : isHTMLElement(node) && isScrollParent(node) ? node : getScrollParent(getParentNode(node));
605
+ }
606
+
607
+ // ../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
608
+ function listScrollParents(element, list) {
609
+ var _element$ownerDocumen;
610
+ list === void 0 && (list = []);
611
+ var scrollParent = getScrollParent(element), isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body), win = getWindow(scrollParent), target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent, updatedList = list.concat(target);
612
+ return isBody ? updatedList : (
613
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
614
+ updatedList.concat(listScrollParents(getParentNode(target)))
615
+ );
616
+ }
617
+
618
+ // ../node_modules/@popperjs/core/lib/utils/rectToClientRect.js
619
+ function rectToClientRect(rect) {
620
+ return Object.assign({}, rect, {
621
+ left: rect.x,
622
+ top: rect.y,
623
+ right: rect.x + rect.width,
624
+ bottom: rect.y + rect.height
625
+ });
626
+ }
627
+
628
+ // ../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
629
+ function getInnerBoundingClientRect(element, strategy) {
630
+ var rect = getBoundingClientRect(element, !1, strategy === "fixed");
631
+ return rect.top = rect.top + element.clientTop, rect.left = rect.left + element.clientLeft, rect.bottom = rect.top + element.clientHeight, rect.right = rect.left + element.clientWidth, rect.width = element.clientWidth, rect.height = element.clientHeight, rect.x = rect.left, rect.y = rect.top, rect;
632
+ }
633
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
634
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
635
+ }
636
+ function getClippingParents(element) {
637
+ var clippingParents2 = listScrollParents(getParentNode(element)), canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0, clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
638
+ return isElement(clipperElement) ? clippingParents2.filter(function(clippingParent) {
639
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
640
+ }) : [];
641
+ }
642
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
643
+ var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary), clippingParents2 = [].concat(mainClippingParents, [rootBoundary]), firstClippingParent = clippingParents2[0], clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {
644
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
645
+ return accRect.top = max(rect.top, accRect.top), accRect.right = min(rect.right, accRect.right), accRect.bottom = min(rect.bottom, accRect.bottom), accRect.left = max(rect.left, accRect.left), accRect;
646
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
647
+ return clippingRect.width = clippingRect.right - clippingRect.left, clippingRect.height = clippingRect.bottom - clippingRect.top, clippingRect.x = clippingRect.left, clippingRect.y = clippingRect.top, clippingRect;
648
+ }
649
+
650
+ // ../node_modules/@popperjs/core/lib/utils/computeOffsets.js
651
+ function computeOffsets(_ref) {
652
+ var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement, basePlacement = placement ? getBasePlacement(placement) : null, variation = placement ? getVariation(placement) : null, commonX = reference2.x + reference2.width / 2 - element.width / 2, commonY = reference2.y + reference2.height / 2 - element.height / 2, offsets;
653
+ switch (basePlacement) {
654
+ case top:
655
+ offsets = {
656
+ x: commonX,
657
+ y: reference2.y - element.height
658
+ };
659
+ break;
660
+ case bottom:
661
+ offsets = {
662
+ x: commonX,
663
+ y: reference2.y + reference2.height
664
+ };
665
+ break;
666
+ case right:
667
+ offsets = {
668
+ x: reference2.x + reference2.width,
669
+ y: commonY
670
+ };
671
+ break;
672
+ case left:
673
+ offsets = {
674
+ x: reference2.x - element.width,
675
+ y: commonY
676
+ };
677
+ break;
678
+ default:
679
+ offsets = {
680
+ x: reference2.x,
681
+ y: reference2.y
682
+ };
683
+ }
684
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
685
+ if (mainAxis != null) {
686
+ var len = mainAxis === "y" ? "height" : "width";
687
+ switch (variation) {
688
+ case start:
689
+ offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2);
690
+ break;
691
+ case end:
692
+ offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2);
693
+ break;
694
+ default:
695
+ }
696
+ }
697
+ return offsets;
698
+ }
699
+
700
+ // ../node_modules/@popperjs/core/lib/utils/detectOverflow.js
701
+ function detectOverflow(state, options) {
702
+ options === void 0 && (options = {});
703
+ var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? !1 : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding, paddingObject = mergePaddingObject(typeof padding != "number" ? padding : expandToHashMap(padding, basePlacements)), altContext = elementContext === popper ? reference : popper, popperRect = state.rects.popper, element = state.elements[altBoundary ? altContext : elementContext], clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy), referenceClientRect = getBoundingClientRect(state.elements.reference), popperOffsets2 = computeOffsets({
704
+ reference: referenceClientRect,
705
+ element: popperRect,
706
+ strategy: "absolute",
707
+ placement
708
+ }), popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)), elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect, overflowOffsets = {
709
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
710
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
711
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
712
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
713
+ }, offsetData = state.modifiersData.offset;
714
+ if (elementContext === popper && offsetData) {
715
+ var offset2 = offsetData[placement];
716
+ Object.keys(overflowOffsets).forEach(function(key) {
717
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1, axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x";
718
+ overflowOffsets[key] += offset2[axis] * multiply;
719
+ });
720
+ }
721
+ return overflowOffsets;
722
+ }
723
+
724
+ // ../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
725
+ function computeAutoPlacement(state, options) {
726
+ options === void 0 && (options = {});
727
+ var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP, variation = getVariation(placement), placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
728
+ return getVariation(placement2) === variation;
729
+ }) : basePlacements, allowedPlacements = placements2.filter(function(placement2) {
730
+ return allowedAutoPlacements.indexOf(placement2) >= 0;
731
+ });
732
+ allowedPlacements.length === 0 && (allowedPlacements = placements2);
733
+ var overflows = allowedPlacements.reduce(function(acc, placement2) {
734
+ return acc[placement2] = detectOverflow(state, {
735
+ placement: placement2,
736
+ boundary,
737
+ rootBoundary,
738
+ padding
739
+ })[getBasePlacement(placement2)], acc;
740
+ }, {});
741
+ return Object.keys(overflows).sort(function(a, b) {
742
+ return overflows[a] - overflows[b];
743
+ });
744
+ }
745
+
746
+ // ../node_modules/@popperjs/core/lib/modifiers/flip.js
747
+ function getExpandedFallbackPlacements(placement) {
748
+ if (getBasePlacement(placement) === auto)
749
+ return [];
750
+ var oppositePlacement = getOppositePlacement(placement);
751
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
752
+ }
753
+ function flip(_ref) {
754
+ var state = _ref.state, options = _ref.options, name = _ref.name;
755
+ if (!state.modifiersData[name]._skip) {
756
+ for (var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !0 : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? !0 : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements, preferredPlacement = state.options.placement, basePlacement = getBasePlacement(preferredPlacement), isBasePlacement = basePlacement === preferredPlacement, fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)), placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {
757
+ return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, {
758
+ placement: placement2,
759
+ boundary,
760
+ rootBoundary,
761
+ padding,
762
+ flipVariations,
763
+ allowedAutoPlacements
764
+ }) : placement2);
765
+ }, []), referenceRect = state.rects.reference, popperRect = state.rects.popper, checksMap = /* @__PURE__ */ new Map(), makeFallbackChecks = !0, firstFittingPlacement = placements2[0], i = 0; i < placements2.length; i++) {
766
+ var placement = placements2[i], _basePlacement = getBasePlacement(placement), isStartVariation = getVariation(placement) === start, isVertical = [top, bottom].indexOf(_basePlacement) >= 0, len = isVertical ? "width" : "height", overflow = detectOverflow(state, {
767
+ placement,
768
+ boundary,
769
+ rootBoundary,
770
+ altBoundary,
771
+ padding
772
+ }), mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
773
+ referenceRect[len] > popperRect[len] && (mainVariationSide = getOppositePlacement(mainVariationSide));
774
+ var altVariationSide = getOppositePlacement(mainVariationSide), checks = [];
775
+ if (checkMainAxis && checks.push(overflow[_basePlacement] <= 0), checkAltAxis && checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0), checks.every(function(check) {
776
+ return check;
777
+ })) {
778
+ firstFittingPlacement = placement, makeFallbackChecks = !1;
779
+ break;
780
+ }
781
+ checksMap.set(placement, checks);
782
+ }
783
+ if (makeFallbackChecks)
784
+ for (var numberOfChecks = flipVariations ? 3 : 1, _loop = function(_i2) {
785
+ var fittingPlacement = placements2.find(function(placement2) {
786
+ var checks2 = checksMap.get(placement2);
787
+ if (checks2)
788
+ return checks2.slice(0, _i2).every(function(check) {
789
+ return check;
790
+ });
791
+ });
792
+ if (fittingPlacement)
793
+ return firstFittingPlacement = fittingPlacement, "break";
794
+ }, _i = numberOfChecks; _i > 0; _i--) {
795
+ var _ret = _loop(_i);
796
+ if (_ret === "break") break;
797
+ }
798
+ state.placement !== firstFittingPlacement && (state.modifiersData[name]._skip = !0, state.placement = firstFittingPlacement, state.reset = !0);
799
+ }
800
+ }
801
+ var flip_default = {
802
+ name: "flip",
803
+ enabled: !0,
804
+ phase: "main",
805
+ fn: flip,
806
+ requiresIfExists: ["offset"],
807
+ data: {
808
+ _skip: !1
809
+ }
810
+ };
811
+
812
+ // ../node_modules/@popperjs/core/lib/modifiers/hide.js
813
+ function getSideOffsets(overflow, rect, preventedOffsets) {
814
+ return preventedOffsets === void 0 && (preventedOffsets = {
815
+ x: 0,
816
+ y: 0
817
+ }), {
818
+ top: overflow.top - rect.height - preventedOffsets.y,
819
+ right: overflow.right - rect.width + preventedOffsets.x,
820
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
821
+ left: overflow.left - rect.width - preventedOffsets.x
822
+ };
823
+ }
824
+ function isAnySideFullyClipped(overflow) {
825
+ return [top, right, bottom, left].some(function(side) {
826
+ return overflow[side] >= 0;
827
+ });
828
+ }
829
+ function hide(_ref) {
830
+ var state = _ref.state, name = _ref.name, referenceRect = state.rects.reference, popperRect = state.rects.popper, preventedOffsets = state.modifiersData.preventOverflow, referenceOverflow = detectOverflow(state, {
831
+ elementContext: "reference"
832
+ }), popperAltOverflow = detectOverflow(state, {
833
+ altBoundary: !0
834
+ }), referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect), popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets), isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets), hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
835
+ state.modifiersData[name] = {
836
+ referenceClippingOffsets,
837
+ popperEscapeOffsets,
838
+ isReferenceHidden,
839
+ hasPopperEscaped
840
+ }, state.attributes.popper = Object.assign({}, state.attributes.popper, {
841
+ "data-popper-reference-hidden": isReferenceHidden,
842
+ "data-popper-escaped": hasPopperEscaped
843
+ });
844
+ }
845
+ var hide_default = {
846
+ name: "hide",
847
+ enabled: !0,
848
+ phase: "main",
849
+ requiresIfExists: ["preventOverflow"],
850
+ fn: hide
851
+ };
852
+
853
+ // ../node_modules/@popperjs/core/lib/modifiers/offset.js
854
+ function distanceAndSkiddingToXY(placement, rects, offset2) {
855
+ var basePlacement = getBasePlacement(placement), invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1, _ref = typeof offset2 == "function" ? offset2(Object.assign({}, rects, {
856
+ placement
857
+ })) : offset2, skidding = _ref[0], distance = _ref[1];
858
+ return skidding = skidding || 0, distance = (distance || 0) * invertDistance, [left, right].indexOf(basePlacement) >= 0 ? {
859
+ x: distance,
860
+ y: skidding
861
+ } : {
862
+ x: skidding,
863
+ y: distance
864
+ };
865
+ }
866
+ function offset(_ref2) {
867
+ var state = _ref2.state, options = _ref2.options, name = _ref2.name, _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset, data = placements.reduce(function(acc, placement) {
868
+ return acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2), acc;
869
+ }, {}), _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
870
+ state.modifiersData.popperOffsets != null && (state.modifiersData.popperOffsets.x += x, state.modifiersData.popperOffsets.y += y), state.modifiersData[name] = data;
871
+ }
872
+ var offset_default = {
873
+ name: "offset",
874
+ enabled: !0,
875
+ phase: "main",
876
+ requires: ["popperOffsets"],
877
+ fn: offset
878
+ };
879
+
880
+ // ../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
881
+ function popperOffsets(_ref) {
882
+ var state = _ref.state, name = _ref.name;
883
+ state.modifiersData[name] = computeOffsets({
884
+ reference: state.rects.reference,
885
+ element: state.rects.popper,
886
+ strategy: "absolute",
887
+ placement: state.placement
888
+ });
889
+ }
890
+ var popperOffsets_default = {
891
+ name: "popperOffsets",
892
+ enabled: !0,
893
+ phase: "read",
894
+ fn: popperOffsets,
895
+ data: {}
896
+ };
897
+
898
+ // ../node_modules/@popperjs/core/lib/utils/getAltAxis.js
899
+ function getAltAxis(axis) {
900
+ return axis === "x" ? "y" : "x";
901
+ }
902
+
903
+ // ../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
904
+ function preventOverflow(_ref) {
905
+ var state = _ref.state, options = _ref.options, name = _ref.name, _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? !0 : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? !1 : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? !0 : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset, overflow = detectOverflow(state, {
906
+ boundary,
907
+ rootBoundary,
908
+ padding,
909
+ altBoundary
910
+ }), basePlacement = getBasePlacement(state.placement), variation = getVariation(state.placement), isBasePlacement = !variation, mainAxis = getMainAxisFromPlacement(basePlacement), altAxis = getAltAxis(mainAxis), popperOffsets2 = state.modifiersData.popperOffsets, referenceRect = state.rects.reference, popperRect = state.rects.popper, tetherOffsetValue = typeof tetherOffset == "function" ? tetherOffset(Object.assign({}, state.rects, {
911
+ placement: state.placement
912
+ })) : tetherOffset, normalizedTetherOffsetValue = typeof tetherOffsetValue == "number" ? {
913
+ mainAxis: tetherOffsetValue,
914
+ altAxis: tetherOffsetValue
915
+ } : Object.assign({
916
+ mainAxis: 0,
917
+ altAxis: 0
918
+ }, tetherOffsetValue), offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null, data = {
919
+ x: 0,
920
+ y: 0
921
+ };
922
+ if (popperOffsets2) {
923
+ if (checkMainAxis) {
924
+ var _offsetModifierState$, mainSide = mainAxis === "y" ? top : left, altSide = mainAxis === "y" ? bottom : right, len = mainAxis === "y" ? "height" : "width", offset2 = popperOffsets2[mainAxis], min2 = offset2 + overflow[mainSide], max2 = offset2 - overflow[altSide], additive = tether ? -popperRect[len] / 2 : 0, minLen = variation === start ? referenceRect[len] : popperRect[len], maxLen = variation === start ? -popperRect[len] : -referenceRect[len], arrowElement = state.elements.arrow, arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
925
+ width: 0,
926
+ height: 0
927
+ }, arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(), arrowPaddingMin = arrowPaddingObject[mainSide], arrowPaddingMax = arrowPaddingObject[altSide], arrowLen = within(0, referenceRect[len], arrowRect[len]), minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis, maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis, arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow), clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0, offsetModifierValue = (_offsetModifierState$ = offsetModifierState?.[mainAxis]) != null ? _offsetModifierState$ : 0, tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset, tetherMax = offset2 + maxOffset - offsetModifierValue, preventedOffset = within(tether ? min(min2, tetherMin) : min2, offset2, tether ? max(max2, tetherMax) : max2);
928
+ popperOffsets2[mainAxis] = preventedOffset, data[mainAxis] = preventedOffset - offset2;
929
+ }
930
+ if (checkAltAxis) {
931
+ var _offsetModifierState$2, _mainSide = mainAxis === "x" ? top : left, _altSide = mainAxis === "x" ? bottom : right, _offset = popperOffsets2[altAxis], _len = altAxis === "y" ? "height" : "width", _min = _offset + overflow[_mainSide], _max = _offset - overflow[_altSide], isOriginSide = [top, left].indexOf(basePlacement) !== -1, _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState?.[altAxis]) != null ? _offsetModifierState$2 : 0, _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis, _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max, _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
932
+ popperOffsets2[altAxis] = _preventedOffset, data[altAxis] = _preventedOffset - _offset;
933
+ }
934
+ state.modifiersData[name] = data;
935
+ }
936
+ }
937
+ var preventOverflow_default = {
938
+ name: "preventOverflow",
939
+ enabled: !0,
940
+ phase: "main",
941
+ fn: preventOverflow,
942
+ requiresIfExists: ["offset"]
943
+ };
944
+
945
+ // ../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
946
+ function getHTMLElementScroll(element) {
947
+ return {
948
+ scrollLeft: element.scrollLeft,
949
+ scrollTop: element.scrollTop
950
+ };
951
+ }
952
+
953
+ // ../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
954
+ function getNodeScroll(node) {
955
+ return node === getWindow(node) || !isHTMLElement(node) ? getWindowScroll(node) : getHTMLElementScroll(node);
956
+ }
957
+
958
+ // ../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
959
+ function isElementScaled(element) {
960
+ var rect = element.getBoundingClientRect(), scaleX = round(rect.width) / element.offsetWidth || 1, scaleY = round(rect.height) / element.offsetHeight || 1;
961
+ return scaleX !== 1 || scaleY !== 1;
962
+ }
963
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
964
+ isFixed === void 0 && (isFixed = !1);
965
+ var isOffsetParentAnElement = isHTMLElement(offsetParent), offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent), documentElement = getDocumentElement(offsetParent), rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed), scroll = {
966
+ scrollLeft: 0,
967
+ scrollTop: 0
968
+ }, offsets = {
969
+ x: 0,
970
+ y: 0
971
+ };
972
+ return (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) && ((getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
973
+ isScrollParent(documentElement)) && (scroll = getNodeScroll(offsetParent)), isHTMLElement(offsetParent) ? (offsets = getBoundingClientRect(offsetParent, !0), offsets.x += offsetParent.clientLeft, offsets.y += offsetParent.clientTop) : documentElement && (offsets.x = getWindowScrollBarX(documentElement))), {
974
+ x: rect.left + scroll.scrollLeft - offsets.x,
975
+ y: rect.top + scroll.scrollTop - offsets.y,
976
+ width: rect.width,
977
+ height: rect.height
978
+ };
979
+ }
980
+
981
+ // ../node_modules/@popperjs/core/lib/utils/orderModifiers.js
982
+ function order(modifiers) {
983
+ var map = /* @__PURE__ */ new Map(), visited = /* @__PURE__ */ new Set(), result = [];
984
+ modifiers.forEach(function(modifier) {
985
+ map.set(modifier.name, modifier);
986
+ });
987
+ function sort(modifier) {
988
+ visited.add(modifier.name);
989
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
990
+ requires.forEach(function(dep) {
991
+ if (!visited.has(dep)) {
992
+ var depModifier = map.get(dep);
993
+ depModifier && sort(depModifier);
994
+ }
995
+ }), result.push(modifier);
996
+ }
997
+ return modifiers.forEach(function(modifier) {
998
+ visited.has(modifier.name) || sort(modifier);
999
+ }), result;
1000
+ }
1001
+ function orderModifiers(modifiers) {
1002
+ var orderedModifiers = order(modifiers);
1003
+ return modifierPhases.reduce(function(acc, phase) {
1004
+ return acc.concat(orderedModifiers.filter(function(modifier) {
1005
+ return modifier.phase === phase;
1006
+ }));
1007
+ }, []);
1008
+ }
1009
+
1010
+ // ../node_modules/@popperjs/core/lib/utils/debounce.js
1011
+ function debounce(fn2) {
1012
+ var pending;
1013
+ return function() {
1014
+ return pending || (pending = new Promise(function(resolve) {
1015
+ Promise.resolve().then(function() {
1016
+ pending = void 0, resolve(fn2());
1017
+ });
1018
+ })), pending;
1019
+ };
1020
+ }
1021
+
1022
+ // ../node_modules/@popperjs/core/lib/utils/mergeByName.js
1023
+ function mergeByName(modifiers) {
1024
+ var merged = modifiers.reduce(function(merged2, current) {
1025
+ var existing = merged2[current.name];
1026
+ return merged2[current.name] = existing ? Object.assign({}, existing, current, {
1027
+ options: Object.assign({}, existing.options, current.options),
1028
+ data: Object.assign({}, existing.data, current.data)
1029
+ }) : current, merged2;
1030
+ }, {});
1031
+ return Object.keys(merged).map(function(key) {
1032
+ return merged[key];
1033
+ });
1034
+ }
1035
+
1036
+ // ../node_modules/@popperjs/core/lib/createPopper.js
1037
+ var DEFAULT_OPTIONS = {
1038
+ placement: "bottom",
1039
+ modifiers: [],
1040
+ strategy: "absolute"
1041
+ };
1042
+ function areValidElements() {
1043
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
1044
+ args[_key] = arguments[_key];
1045
+ return !args.some(function(element) {
1046
+ return !(element && typeof element.getBoundingClientRect == "function");
1047
+ });
1048
+ }
1049
+ function popperGenerator(generatorOptions) {
1050
+ generatorOptions === void 0 && (generatorOptions = {});
1051
+ var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers3 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1052
+ return function(reference2, popper2, options) {
1053
+ options === void 0 && (options = defaultOptions);
1054
+ var state = {
1055
+ placement: "bottom",
1056
+ orderedModifiers: [],
1057
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
1058
+ modifiersData: {},
1059
+ elements: {
1060
+ reference: reference2,
1061
+ popper: popper2
1062
+ },
1063
+ attributes: {},
1064
+ styles: {}
1065
+ }, effectCleanupFns = [], isDestroyed = !1, instance = {
1066
+ state,
1067
+ setOptions: function(setOptionsAction) {
1068
+ var options2 = typeof setOptionsAction == "function" ? setOptionsAction(state.options) : setOptionsAction;
1069
+ cleanupModifierEffects(), state.options = Object.assign({}, defaultOptions, state.options, options2), state.scrollParents = {
1070
+ reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
1071
+ popper: listScrollParents(popper2)
1072
+ };
1073
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers3, state.options.modifiers)));
1074
+ return state.orderedModifiers = orderedModifiers.filter(function(m) {
1075
+ return m.enabled;
1076
+ }), runModifierEffects(), instance.update();
1077
+ },
1078
+ // Sync update – it will always be executed, even if not necessary. This
1079
+ // is useful for low frequency updates where sync behavior simplifies the
1080
+ // logic.
1081
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1082
+ // prefer the async Popper#update method
1083
+ forceUpdate: function() {
1084
+ if (!isDestroyed) {
1085
+ var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
1086
+ if (areValidElements(reference3, popper3)) {
1087
+ state.rects = {
1088
+ reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"),
1089
+ popper: getLayoutRect(popper3)
1090
+ }, state.reset = !1, state.placement = state.options.placement, state.orderedModifiers.forEach(function(modifier) {
1091
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1092
+ });
1093
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
1094
+ if (state.reset === !0) {
1095
+ state.reset = !1, index = -1;
1096
+ continue;
1097
+ }
1098
+ var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
1099
+ typeof fn2 == "function" && (state = fn2({
1100
+ state,
1101
+ options: _options,
1102
+ name,
1103
+ instance
1104
+ }) || state);
1105
+ }
1106
+ }
1107
+ }
1108
+ },
1109
+ // Async and optimistically optimized update – it will not be executed if
1110
+ // not necessary (debounced to run at most once-per-tick)
1111
+ update: debounce(function() {
1112
+ return new Promise(function(resolve) {
1113
+ instance.forceUpdate(), resolve(state);
1114
+ });
1115
+ }),
1116
+ destroy: function() {
1117
+ cleanupModifierEffects(), isDestroyed = !0;
1118
+ }
1119
+ };
1120
+ if (!areValidElements(reference2, popper2))
1121
+ return instance;
1122
+ instance.setOptions(options).then(function(state2) {
1123
+ !isDestroyed && options.onFirstUpdate && options.onFirstUpdate(state2);
1124
+ });
1125
+ function runModifierEffects() {
1126
+ state.orderedModifiers.forEach(function(_ref) {
1127
+ var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect4 = _ref.effect;
1128
+ if (typeof effect4 == "function") {
1129
+ var cleanupFn = effect4({
1130
+ state,
1131
+ name,
1132
+ instance,
1133
+ options: options2
1134
+ }), noopFn = function() {
1135
+ };
1136
+ effectCleanupFns.push(cleanupFn || noopFn);
1137
+ }
1138
+ });
1139
+ }
1140
+ function cleanupModifierEffects() {
1141
+ effectCleanupFns.forEach(function(fn2) {
1142
+ return fn2();
1143
+ }), effectCleanupFns = [];
1144
+ }
1145
+ return instance;
1146
+ };
1147
+ }
1148
+ var createPopper = popperGenerator();
1149
+
1150
+ // ../node_modules/@popperjs/core/lib/popper-lite.js
1151
+ var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default], createPopper2 = popperGenerator({
1152
+ defaultModifiers
1153
+ });
1154
+
1155
+ // ../node_modules/@popperjs/core/lib/popper.js
1156
+ var defaultModifiers2 = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default], createPopper3 = popperGenerator({
1157
+ defaultModifiers: defaultModifiers2
1158
+ });
1159
+
1160
+ // ../node_modules/react-popper/lib/esm/usePopper.js
1161
+ var import_react_fast_compare = __toESM(require_react_fast_compare());
1162
+ var EMPTY_MODIFIERS = [], usePopper = function(referenceElement, popperElement, options) {
1163
+ options === void 0 && (options = {});
1164
+ var prevOptions = React3.useRef(null), optionsWithDefaults = {
1165
+ onFirstUpdate: options.onFirstUpdate,
1166
+ placement: options.placement || "bottom",
1167
+ strategy: options.strategy || "absolute",
1168
+ modifiers: options.modifiers || EMPTY_MODIFIERS
1169
+ }, _React$useState = React3.useState({
1170
+ styles: {
1171
+ popper: {
1172
+ position: optionsWithDefaults.strategy,
1173
+ left: "0",
1174
+ top: "0"
1175
+ },
1176
+ arrow: {
1177
+ position: "absolute"
1178
+ }
1179
+ },
1180
+ attributes: {}
1181
+ }), state = _React$useState[0], setState = _React$useState[1], updateStateModifier = React3.useMemo(function() {
1182
+ return {
1183
+ name: "updateState",
1184
+ enabled: !0,
1185
+ phase: "write",
1186
+ fn: function(_ref) {
1187
+ var state2 = _ref.state, elements = Object.keys(state2.elements);
1188
+ ReactDOM.flushSync(function() {
1189
+ setState({
1190
+ styles: fromEntries(elements.map(function(element) {
1191
+ return [element, state2.styles[element] || {}];
1192
+ })),
1193
+ attributes: fromEntries(elements.map(function(element) {
1194
+ return [element, state2.attributes[element]];
1195
+ }))
1196
+ });
1197
+ });
1198
+ },
1199
+ requires: ["computeStyles"]
1200
+ };
1201
+ }, []), popperOptions = React3.useMemo(function() {
1202
+ var newOptions = {
1203
+ onFirstUpdate: optionsWithDefaults.onFirstUpdate,
1204
+ placement: optionsWithDefaults.placement,
1205
+ strategy: optionsWithDefaults.strategy,
1206
+ modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {
1207
+ name: "applyStyles",
1208
+ enabled: !1
1209
+ }])
1210
+ };
1211
+ return (0, import_react_fast_compare.default)(prevOptions.current, newOptions) ? prevOptions.current || newOptions : (prevOptions.current = newOptions, newOptions);
1212
+ }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]), popperInstanceRef = React3.useRef();
1213
+ return useIsomorphicLayoutEffect(function() {
1214
+ popperInstanceRef.current && popperInstanceRef.current.setOptions(popperOptions);
1215
+ }, [popperOptions]), useIsomorphicLayoutEffect(function() {
1216
+ if (!(referenceElement == null || popperElement == null)) {
1217
+ var createPopper4 = options.createPopper || createPopper3, popperInstance = createPopper4(referenceElement, popperElement, popperOptions);
1218
+ return popperInstanceRef.current = popperInstance, function() {
1219
+ popperInstance.destroy(), popperInstanceRef.current = null;
1220
+ };
1221
+ }
1222
+ }, [referenceElement, popperElement, options.createPopper]), {
1223
+ state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
1224
+ styles: state.styles,
1225
+ attributes: state.attributes,
1226
+ update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
1227
+ forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
1228
+ };
1229
+ };
1230
+
1231
+ // ../node_modules/react-popper/lib/esm/Reference.js
1232
+ var import_warning = __toESM(require_warning());
1233
+ import * as React5 from "react";
1234
+
1235
+ // ../node_modules/react-popper-tooltip/dist/esm/react-popper-tooltip.js
1236
+ function useGetLatest(val) {
1237
+ var ref = React6.useRef(val);
1238
+ return ref.current = val, React6.useCallback(function() {
1239
+ return ref.current;
1240
+ }, []);
1241
+ }
1242
+ var noop = function() {
1243
+ };
1244
+ function useControlledState(_ref) {
1245
+ var initial = _ref.initial, value = _ref.value, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop : _ref$onChange;
1246
+ if (initial === void 0 && value === void 0)
1247
+ throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');
1248
+ var _React$useState = React6.useState(initial), state = _React$useState[0], setState = _React$useState[1], getLatest = useGetLatest(state), set = React6.useCallback(function(updater) {
1249
+ var state2 = getLatest(), updatedState = typeof updater == "function" ? updater(state2) : updater;
1250
+ typeof updatedState.persist == "function" && updatedState.persist(), setState(updatedState), typeof onChange == "function" && onChange(updatedState);
1251
+ }, [getLatest, onChange]), isControlled = value !== void 0;
1252
+ return [isControlled ? value : state, isControlled ? onChange : set];
1253
+ }
1254
+ function generateBoundingClientRect(x, y) {
1255
+ return x === void 0 && (x = 0), y === void 0 && (y = 0), function() {
1256
+ return {
1257
+ width: 0,
1258
+ height: 0,
1259
+ top: y,
1260
+ right: x,
1261
+ bottom: y,
1262
+ left: x,
1263
+ x: 0,
1264
+ y: 0,
1265
+ toJSON: function() {
1266
+ return null;
1267
+ }
1268
+ };
1269
+ };
1270
+ }
1271
+ var _excluded = ["styles", "attributes"], virtualElement = {
1272
+ getBoundingClientRect: generateBoundingClientRect()
1273
+ }, defaultConfig = {
1274
+ closeOnOutsideClick: !0,
1275
+ closeOnTriggerHidden: !1,
1276
+ defaultVisible: !1,
1277
+ delayHide: 0,
1278
+ delayShow: 0,
1279
+ followCursor: !1,
1280
+ interactive: !1,
1281
+ mutationObserverOptions: {
1282
+ attributes: !0,
1283
+ childList: !0,
1284
+ subtree: !0
1285
+ },
1286
+ offset: [0, 6],
1287
+ trigger: "hover"
1288
+ };
1289
+ function usePopperTooltip(config, popperOptions) {
1290
+ var _popperProps$state, _popperProps$state$mo, _popperProps$state$mo2;
1291
+ config === void 0 && (config = {}), popperOptions === void 0 && (popperOptions = {});
1292
+ var finalConfig = Object.keys(defaultConfig).reduce(function(config2, key) {
1293
+ var _extends2;
1294
+ return _extends({}, config2, (_extends2 = {}, _extends2[key] = config2[key] !== void 0 ? config2[key] : defaultConfig[key], _extends2));
1295
+ }, config), defaultModifiers3 = React6.useMemo(
1296
+ function() {
1297
+ return [{
1298
+ name: "offset",
1299
+ options: {
1300
+ offset: finalConfig.offset
1301
+ }
1302
+ }];
1303
+ },
1304
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1305
+ Array.isArray(finalConfig.offset) ? finalConfig.offset : []
1306
+ ), finalPopperOptions = _extends({}, popperOptions, {
1307
+ placement: popperOptions.placement || finalConfig.placement,
1308
+ modifiers: popperOptions.modifiers || defaultModifiers3
1309
+ }), _React$useState = React6.useState(null), triggerRef = _React$useState[0], setTriggerRef = _React$useState[1], _React$useState2 = React6.useState(null), tooltipRef = _React$useState2[0], setTooltipRef = _React$useState2[1], _useControlledState = useControlledState({
1310
+ initial: finalConfig.defaultVisible,
1311
+ value: finalConfig.visible,
1312
+ onChange: finalConfig.onVisibleChange
1313
+ }), visible = _useControlledState[0], setVisible = _useControlledState[1], timer = React6.useRef();
1314
+ React6.useEffect(function() {
1315
+ return function() {
1316
+ return clearTimeout(timer.current);
1317
+ };
1318
+ }, []);
1319
+ var _usePopper = usePopper(finalConfig.followCursor ? virtualElement : triggerRef, tooltipRef, finalPopperOptions), styles = _usePopper.styles, attributes = _usePopper.attributes, popperProps = _objectWithoutPropertiesLoose(_usePopper, _excluded), update = popperProps.update, getLatest = useGetLatest({
1320
+ visible,
1321
+ triggerRef,
1322
+ tooltipRef,
1323
+ finalConfig
1324
+ }), isTriggeredBy = React6.useCallback(
1325
+ function(trigger) {
1326
+ return Array.isArray(finalConfig.trigger) ? finalConfig.trigger.includes(trigger) : finalConfig.trigger === trigger;
1327
+ },
1328
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1329
+ Array.isArray(finalConfig.trigger) ? finalConfig.trigger : [finalConfig.trigger]
1330
+ ), hideTooltip = React6.useCallback(function() {
1331
+ clearTimeout(timer.current), timer.current = window.setTimeout(function() {
1332
+ return setVisible(!1);
1333
+ }, finalConfig.delayHide);
1334
+ }, [finalConfig.delayHide, setVisible]), showTooltip = React6.useCallback(function() {
1335
+ clearTimeout(timer.current), timer.current = window.setTimeout(function() {
1336
+ return setVisible(!0);
1337
+ }, finalConfig.delayShow);
1338
+ }, [finalConfig.delayShow, setVisible]), toggleTooltip = React6.useCallback(function() {
1339
+ getLatest().visible ? hideTooltip() : showTooltip();
1340
+ }, [getLatest, hideTooltip, showTooltip]);
1341
+ React6.useEffect(function() {
1342
+ if (getLatest().finalConfig.closeOnOutsideClick) {
1343
+ var handleClickOutside = function(event) {
1344
+ var _event$composedPath, _getLatest = getLatest(), tooltipRef2 = _getLatest.tooltipRef, triggerRef2 = _getLatest.triggerRef, target = (event.composedPath == null || (_event$composedPath = event.composedPath()) == null ? void 0 : _event$composedPath[0]) || event.target;
1345
+ target instanceof Node && tooltipRef2 != null && triggerRef2 != null && !tooltipRef2.contains(target) && !triggerRef2.contains(target) && hideTooltip();
1346
+ };
1347
+ return document.addEventListener("mousedown", handleClickOutside), function() {
1348
+ return document.removeEventListener("mousedown", handleClickOutside);
1349
+ };
1350
+ }
1351
+ }, [getLatest, hideTooltip]), React6.useEffect(function() {
1352
+ if (!(triggerRef == null || !isTriggeredBy("click")))
1353
+ return triggerRef.addEventListener("click", toggleTooltip), function() {
1354
+ return triggerRef.removeEventListener("click", toggleTooltip);
1355
+ };
1356
+ }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() {
1357
+ if (!(triggerRef == null || !isTriggeredBy("double-click")))
1358
+ return triggerRef.addEventListener("dblclick", toggleTooltip), function() {
1359
+ return triggerRef.removeEventListener("dblclick", toggleTooltip);
1360
+ };
1361
+ }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() {
1362
+ if (!(triggerRef == null || !isTriggeredBy("right-click"))) {
1363
+ var preventDefaultAndToggle = function(event) {
1364
+ event.preventDefault(), toggleTooltip();
1365
+ };
1366
+ return triggerRef.addEventListener("contextmenu", preventDefaultAndToggle), function() {
1367
+ return triggerRef.removeEventListener("contextmenu", preventDefaultAndToggle);
1368
+ };
1369
+ }
1370
+ }, [triggerRef, isTriggeredBy, toggleTooltip]), React6.useEffect(function() {
1371
+ if (!(triggerRef == null || !isTriggeredBy("focus")))
1372
+ return triggerRef.addEventListener("focus", showTooltip), triggerRef.addEventListener("blur", hideTooltip), function() {
1373
+ triggerRef.removeEventListener("focus", showTooltip), triggerRef.removeEventListener("blur", hideTooltip);
1374
+ };
1375
+ }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React6.useEffect(function() {
1376
+ if (!(triggerRef == null || !isTriggeredBy("hover")))
1377
+ return triggerRef.addEventListener("mouseenter", showTooltip), triggerRef.addEventListener("mouseleave", hideTooltip), function() {
1378
+ triggerRef.removeEventListener("mouseenter", showTooltip), triggerRef.removeEventListener("mouseleave", hideTooltip);
1379
+ };
1380
+ }, [triggerRef, isTriggeredBy, showTooltip, hideTooltip]), React6.useEffect(function() {
1381
+ if (!(tooltipRef == null || !isTriggeredBy("hover") || !getLatest().finalConfig.interactive))
1382
+ return tooltipRef.addEventListener("mouseenter", showTooltip), tooltipRef.addEventListener("mouseleave", hideTooltip), function() {
1383
+ tooltipRef.removeEventListener("mouseenter", showTooltip), tooltipRef.removeEventListener("mouseleave", hideTooltip);
1384
+ };
1385
+ }, [tooltipRef, isTriggeredBy, showTooltip, hideTooltip, getLatest]);
1386
+ var isReferenceHidden = popperProps == null || (_popperProps$state = popperProps.state) == null || (_popperProps$state$mo = _popperProps$state.modifiersData) == null || (_popperProps$state$mo2 = _popperProps$state$mo.hide) == null ? void 0 : _popperProps$state$mo2.isReferenceHidden;
1387
+ React6.useEffect(function() {
1388
+ finalConfig.closeOnTriggerHidden && isReferenceHidden && hideTooltip();
1389
+ }, [finalConfig.closeOnTriggerHidden, hideTooltip, isReferenceHidden]), React6.useEffect(function() {
1390
+ if (!finalConfig.followCursor || triggerRef == null) return;
1391
+ function setMousePosition(_ref) {
1392
+ var clientX = _ref.clientX, clientY = _ref.clientY;
1393
+ virtualElement.getBoundingClientRect = generateBoundingClientRect(clientX, clientY), update?.();
1394
+ }
1395
+ return triggerRef.addEventListener("mousemove", setMousePosition), function() {
1396
+ return triggerRef.removeEventListener("mousemove", setMousePosition);
1397
+ };
1398
+ }, [finalConfig.followCursor, triggerRef, update]), React6.useEffect(function() {
1399
+ if (!(tooltipRef == null || update == null || finalConfig.mutationObserverOptions == null)) {
1400
+ var observer = new MutationObserver(update);
1401
+ return observer.observe(tooltipRef, finalConfig.mutationObserverOptions), function() {
1402
+ return observer.disconnect();
1403
+ };
1404
+ }
1405
+ }, [finalConfig.mutationObserverOptions, tooltipRef, update]);
1406
+ var getTooltipProps = function(args) {
1407
+ return args === void 0 && (args = {}), _extends({}, args, {
1408
+ style: _extends({}, args.style, styles.popper)
1409
+ }, attributes.popper, {
1410
+ "data-popper-interactive": finalConfig.interactive
1411
+ });
1412
+ }, getArrowProps = function(args) {
1413
+ return args === void 0 && (args = {}), _extends({}, args, attributes.arrow, {
1414
+ style: _extends({}, args.style, styles.arrow),
1415
+ "data-popper-arrow": !0
1416
+ });
1417
+ };
1418
+ return _extends({
1419
+ getArrowProps,
1420
+ getTooltipProps,
1421
+ setTooltipRef,
1422
+ setTriggerRef,
1423
+ tooltipRef,
1424
+ triggerRef,
1425
+ visible
1426
+ }, popperProps);
1427
+ }
1428
+
1429
+ // src/components/components/tooltip/WithTooltip.tsx
1430
+ import { lighten, styled } from "storybook/theming";
1431
+ var { document: document2 } = global, match = (0, import_memoizerific.default)(1e3)(
1432
+ (requests, actual, value, fallback = 0) => actual.split("-")[0] === requests ? value : fallback
1433
+ ), ArrowSpacing = 8, Arrow = styled.div(
1434
+ {
1435
+ position: "absolute",
1436
+ borderStyle: "solid"
1437
+ },
1438
+ ({ placement }) => {
1439
+ let x = 0, y = 0;
1440
+ switch (!0) {
1441
+ case (placement.startsWith("left") || placement.startsWith("right")): {
1442
+ y = 8;
1443
+ break;
1444
+ }
1445
+ case (placement.startsWith("top") || placement.startsWith("bottom")): {
1446
+ x = 8;
1447
+ break;
1448
+ }
1449
+ default:
1450
+ }
1451
+ return { transform: `translate3d(${x}px, ${y}px, 0px)` };
1452
+ },
1453
+ ({ theme, color, placement }) => ({
1454
+ bottom: `${match("top", placement, `${ArrowSpacing * -1}px`, "auto")}`,
1455
+ top: `${match("bottom", placement, `${ArrowSpacing * -1}px`, "auto")}`,
1456
+ right: `${match("left", placement, `${ArrowSpacing * -1}px`, "auto")}`,
1457
+ left: `${match("right", placement, `${ArrowSpacing * -1}px`, "auto")}`,
1458
+ borderBottomWidth: `${match("top", placement, "0", ArrowSpacing)}px`,
1459
+ borderTopWidth: `${match("bottom", placement, "0", ArrowSpacing)}px`,
1460
+ borderRightWidth: `${match("left", placement, "0", ArrowSpacing)}px`,
1461
+ borderLeftWidth: `${match("right", placement, "0", ArrowSpacing)}px`,
1462
+ borderTopColor: match(
1463
+ "top",
1464
+ placement,
1465
+ theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app,
1466
+ "transparent"
1467
+ ),
1468
+ borderBottomColor: match(
1469
+ "bottom",
1470
+ placement,
1471
+ theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app,
1472
+ "transparent"
1473
+ ),
1474
+ borderLeftColor: match(
1475
+ "left",
1476
+ placement,
1477
+ theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app,
1478
+ "transparent"
1479
+ ),
1480
+ borderRightColor: match(
1481
+ "right",
1482
+ placement,
1483
+ theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app,
1484
+ "transparent"
1485
+ )
1486
+ })
1487
+ ), Wrapper = styled.div(
1488
+ ({ hidden }) => ({
1489
+ display: hidden ? "none" : "inline-block",
1490
+ zIndex: 2147483647,
1491
+ colorScheme: "light dark"
1492
+ }),
1493
+ ({ theme, color, hasChrome }) => hasChrome ? {
1494
+ background: color && theme.color[color] || color || theme.base === "light" ? lighten(theme.background.app) : theme.background.app,
1495
+ filter: `
1496
+ drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
1497
+ drop-shadow(0 1px 3px rgba(0,0,0,0.1))
1498
+ `,
1499
+ borderRadius: theme.appBorderRadius + 2,
1500
+ fontSize: theme.typography.size.s1
1501
+ } : {}
1502
+ ), Tooltip = React7.forwardRef(
1503
+ ({
1504
+ placement = "top",
1505
+ hasChrome = !0,
1506
+ children,
1507
+ arrowProps = {},
1508
+ tooltipRef,
1509
+ color,
1510
+ withArrows,
1511
+ ...props
1512
+ }, ref) => React7.createElement(Wrapper, { "data-testid": "tooltip", hasChrome, ref, ...props, color }, hasChrome && withArrows && React7.createElement(Arrow, { placement, ...arrowProps, color }), children)
1513
+ );
1514
+ Tooltip.displayName = "Tooltip";
1515
+ var TargetContainer = styled.div`
1516
+ display: inline-block;
1517
+ cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"};
1518
+ `, TargetSvgContainer = styled.g`
1519
+ cursor: ${(props) => props.trigger === "hover" || props.trigger?.includes("hover") ? "default" : "pointer"};
1520
+ `, WithTooltipPure = ({
1521
+ svg = !1,
1522
+ trigger = "click",
1523
+ closeOnOutsideClick = !1,
1524
+ placement = "top",
1525
+ modifiers = [
1526
+ {
1527
+ name: "preventOverflow",
1528
+ options: {
1529
+ padding: 8
1530
+ }
1531
+ },
1532
+ {
1533
+ name: "offset",
1534
+ options: {
1535
+ offset: [8, 8]
1536
+ }
1537
+ },
1538
+ {
1539
+ name: "arrow",
1540
+ options: {
1541
+ padding: 8
1542
+ }
1543
+ }
1544
+ ],
1545
+ hasChrome = !0,
1546
+ defaultVisible = !1,
1547
+ withArrows,
1548
+ offset: offset2,
1549
+ tooltip,
1550
+ children,
1551
+ closeOnTriggerHidden,
1552
+ mutationObserverOptions,
1553
+ delayHide = trigger === "hover" ? 200 : 0,
1554
+ visible,
1555
+ interactive,
1556
+ delayShow = trigger === "hover" ? 400 : 0,
1557
+ strategy,
1558
+ followCursor,
1559
+ onVisibleChange,
1560
+ portalContainer,
1561
+ ...props
1562
+ }) => {
1563
+ let Container = svg ? TargetSvgContainer : TargetContainer, {
1564
+ getArrowProps,
1565
+ getTooltipProps,
1566
+ setTooltipRef,
1567
+ setTriggerRef,
1568
+ visible: isVisible,
1569
+ state
1570
+ } = usePopperTooltip(
1571
+ {
1572
+ trigger,
1573
+ placement,
1574
+ defaultVisible,
1575
+ delayHide,
1576
+ interactive,
1577
+ closeOnOutsideClick,
1578
+ closeOnTriggerHidden,
1579
+ onVisibleChange,
1580
+ delayShow,
1581
+ followCursor,
1582
+ mutationObserverOptions,
1583
+ visible,
1584
+ offset: offset2
1585
+ },
1586
+ {
1587
+ modifiers,
1588
+ strategy
1589
+ }
1590
+ ), portalTarget = (typeof portalContainer == "string" ? document2.querySelector(portalContainer) : portalContainer) || document2.body, tooltipComponent = isVisible ? React7.createElement(
1591
+ Tooltip,
1592
+ {
1593
+ placement: state?.placement,
1594
+ ref: setTooltipRef,
1595
+ hasChrome,
1596
+ arrowProps: getArrowProps(),
1597
+ withArrows,
1598
+ ...getTooltipProps()
1599
+ },
1600
+ typeof tooltip == "function" ? tooltip({ onHide: () => onVisibleChange(!1) }) : tooltip
1601
+ ) : null;
1602
+ return React7.createElement(React7.Fragment, null, React7.createElement(Container, { trigger, ref: setTriggerRef, ...props }, children), isVisible && ReactDOM2.createPortal(tooltipComponent, portalTarget));
1603
+ }, WithToolTipState = ({
1604
+ startOpen = !1,
1605
+ onVisibleChange: onChange,
1606
+ ...rest
1607
+ }) => {
1608
+ let [tooltipShown, setTooltipShown] = useState5(startOpen), onVisibilityChange = useCallback4(
1609
+ (visibility) => {
1610
+ onChange && onChange(visibility) === !1 || setTooltipShown(visibility);
1611
+ },
1612
+ [onChange]
1613
+ );
1614
+ return useEffect6(() => {
1615
+ let hide2 = () => onVisibilityChange(!1), handleKeyDown = (e) => {
1616
+ e.key === "Escape" && hide2();
1617
+ };
1618
+ document2.addEventListener("keydown", handleKeyDown, !1);
1619
+ let iframes = Array.from(document2.getElementsByTagName("iframe")), unbinders = [];
1620
+ return iframes.forEach((iframe) => {
1621
+ let bind = () => {
1622
+ try {
1623
+ iframe.contentWindow.document && (iframe.contentWindow.document.addEventListener("click", hide2), unbinders.push(() => {
1624
+ try {
1625
+ iframe.contentWindow.document.removeEventListener("click", hide2);
1626
+ } catch {
1627
+ }
1628
+ }));
1629
+ } catch {
1630
+ }
1631
+ };
1632
+ bind(), iframe.addEventListener("load", bind), unbinders.push(() => {
1633
+ iframe.removeEventListener("load", bind);
1634
+ });
1635
+ }), () => {
1636
+ document2.removeEventListener("keydown", handleKeyDown), unbinders.forEach((unbind) => {
1637
+ unbind();
1638
+ });
1639
+ };
1640
+ }), React7.createElement(WithTooltipPure, { ...rest, visible: tooltipShown, onVisibleChange: onVisibilityChange });
1641
+ }, DeprecatedPure = (props) => (deprecate(
1642
+ "WithTooltipPure is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."
1643
+ ), React7.createElement(WithTooltipPure, { ...props })), DeprecatedState = (props) => (deprecate(
1644
+ "WithToolTipState is deprecated and will be removed in Storybook 11. Please use WithTooltip instead."
1645
+ ), React7.createElement(WithToolTipState, { ...props }));
1646
+ export {
1647
+ Tooltip,
1648
+ DeprecatedState as WithToolTipState,
1649
+ WithToolTipState as WithTooltip,
1650
+ DeprecatedPure as WithTooltipPure
1651
+ };