@ogcio/design-system-react 1.15.2 → 1.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,54 +1,53 @@
1
1
  "use client";
2
- import { jsx as ve } from "react/jsx-runtime";
3
- import { useRef as Ft, useEffect as qt } from "react";
4
- import { cn as de } from "../cn.js";
5
- import { useCombinedRefs as me } from "../hooks/use-combined-refs.js";
6
- import { createDynamicHeightModifier as he } from "./utilities.js";
7
- var $ = "top", T = "bottom", S = "right", C = "left", Pt = "auto", ft = [$, T, S, C], Q = "start", it = "end", ge = "clippingParents", Zt = "viewport", nt = "popper", ye = "reference", Xt = /* @__PURE__ */ ft.reduce(function(t, e) {
8
- return t.concat([e + "-" + Q, e + "-" + it]);
9
- }, []), _t = /* @__PURE__ */ [].concat(ft, [Pt]).reduce(function(t, e) {
10
- return t.concat([e, e + "-" + Q, e + "-" + it]);
11
- }, []), be = "beforeRead", we = "read", xe = "afterRead", Oe = "beforeMain", Ee = "main", Ae = "afterMain", Pe = "beforeWrite", De = "write", je = "afterWrite", Be = [be, we, xe, Oe, Ee, Ae, Pe, De, je];
12
- function V(t) {
13
- return t ? (t.nodeName || "").toLowerCase() : null;
14
- }
15
- function R(t) {
16
- if (t == null)
2
+ import { jsx as dt } from "react/jsx-runtime";
3
+ import { useRef as Ee, useEffect as Ae } from "react";
4
+ import { cn as mt } from "../cn.js";
5
+ import { createDynamicHeightModifier as Xe } from "./utilities.js";
6
+ var $ = "top", T = "bottom", S = "right", k = "left", Be = "auto", fe = [$, T, S, k], Q = "start", ie = "end", ht = "clippingParents", _e = "viewport", ne = "popper", yt = "reference", ze = /* @__PURE__ */ fe.reduce(function(e, t) {
7
+ return e.concat([t + "-" + Q, t + "-" + ie]);
8
+ }, []), et = /* @__PURE__ */ [].concat(fe, [Be]).reduce(function(e, t) {
9
+ return e.concat([t, t + "-" + Q, t + "-" + ie]);
10
+ }, []), gt = "beforeRead", bt = "read", wt = "afterRead", xt = "beforeMain", Ot = "main", Et = "afterMain", At = "beforeWrite", Pt = "write", Dt = "afterWrite", Bt = [gt, bt, wt, xt, Ot, Et, At, Pt, Dt];
11
+ function V(e) {
12
+ return e ? (e.nodeName || "").toLowerCase() : null;
13
+ }
14
+ function L(e) {
15
+ if (e == null)
17
16
  return window;
18
- if (t.toString() !== "[object Window]") {
19
- var e = t.ownerDocument;
20
- return e && e.defaultView || window;
17
+ if (e.toString() !== "[object Window]") {
18
+ var t = e.ownerDocument;
19
+ return t && t.defaultView || window;
21
20
  }
22
- return t;
21
+ return e;
23
22
  }
24
- function K(t) {
25
- var e = R(t).Element;
26
- return t instanceof e || t instanceof Element;
23
+ function K(e) {
24
+ var t = L(e).Element;
25
+ return e instanceof t || e instanceof Element;
27
26
  }
28
- function L(t) {
29
- var e = R(t).HTMLElement;
30
- return t instanceof e || t instanceof HTMLElement;
27
+ function R(e) {
28
+ var t = L(e).HTMLElement;
29
+ return e instanceof t || e instanceof HTMLElement;
31
30
  }
32
- function Dt(t) {
31
+ function je(e) {
33
32
  if (typeof ShadowRoot > "u")
34
33
  return !1;
35
- var e = R(t).ShadowRoot;
36
- return t instanceof e || t instanceof ShadowRoot;
37
- }
38
- function $e(t) {
39
- var e = t.state;
40
- Object.keys(e.elements).forEach(function(r) {
41
- var n = e.styles[r] || {}, a = e.attributes[r] || {}, i = e.elements[r];
42
- !L(i) || !V(i) || (Object.assign(i.style, n), Object.keys(a).forEach(function(c) {
34
+ var t = L(e).ShadowRoot;
35
+ return e instanceof t || e instanceof ShadowRoot;
36
+ }
37
+ function jt(e) {
38
+ var t = e.state;
39
+ Object.keys(t.elements).forEach(function(r) {
40
+ var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
41
+ !R(o) || !V(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(c) {
43
42
  var s = a[c];
44
- s === !1 ? i.removeAttribute(c) : i.setAttribute(c, s === !0 ? "" : s);
43
+ s === !1 ? o.removeAttribute(c) : o.setAttribute(c, s === !0 ? "" : s);
45
44
  }));
46
45
  });
47
46
  }
48
- function Ce(t) {
49
- var e = t.state, r = {
47
+ function $t(e) {
48
+ var t = e.state, r = {
50
49
  popper: {
51
- position: e.options.strategy,
50
+ position: t.options.strategy,
52
51
  left: "0",
53
52
  top: "0",
54
53
  margin: "0"
@@ -58,137 +57,137 @@ function Ce(t) {
58
57
  },
59
58
  reference: {}
60
59
  };
61
- return Object.assign(e.elements.popper.style, r.popper), e.styles = r, e.elements.arrow && Object.assign(e.elements.arrow.style, r.arrow), function() {
62
- Object.keys(e.elements).forEach(function(n) {
63
- var a = e.elements[n], i = e.attributes[n] || {}, c = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : r[n]), s = c.reduce(function(o, p) {
64
- return o[p] = "", o;
60
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
61
+ Object.keys(t.elements).forEach(function(n) {
62
+ var a = t.elements[n], o = t.attributes[n] || {}, c = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), s = c.reduce(function(i, u) {
63
+ return i[u] = "", i;
65
64
  }, {});
66
- !L(a) || !V(a) || (Object.assign(a.style, s), Object.keys(i).forEach(function(o) {
67
- a.removeAttribute(o);
65
+ !R(a) || !V(a) || (Object.assign(a.style, s), Object.keys(o).forEach(function(i) {
66
+ a.removeAttribute(i);
68
67
  }));
69
68
  });
70
69
  };
71
70
  }
72
- const ke = {
71
+ const kt = {
73
72
  name: "applyStyles",
74
73
  enabled: !0,
75
74
  phase: "write",
76
- fn: $e,
77
- effect: Ce,
75
+ fn: jt,
76
+ effect: $t,
78
77
  requires: ["computeStyles"]
79
78
  };
80
- function H(t) {
81
- return t.split("-")[0];
82
- }
83
- var G = Math.max, gt = Math.min, Z = Math.round;
84
- function Et() {
85
- var t = navigator.userAgentData;
86
- return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
87
- return e.brand + "/" + e.version;
79
+ function H(e) {
80
+ return e.split("-")[0];
81
+ }
82
+ var G = Math.max, ye = Math.min, Z = Math.round;
83
+ function Pe() {
84
+ var e = navigator.userAgentData;
85
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
86
+ return t.brand + "/" + t.version;
88
87
  }).join(" ") : navigator.userAgent;
89
88
  }
90
- function te() {
91
- return !/^((?!chrome|android).)*safari/i.test(Et());
89
+ function tt() {
90
+ return !/^((?!chrome|android).)*safari/i.test(Pe());
92
91
  }
93
- function _(t, e, r) {
94
- e === void 0 && (e = !1), r === void 0 && (r = !1);
95
- var n = t.getBoundingClientRect(), a = 1, i = 1;
96
- e && L(t) && (a = t.offsetWidth > 0 && Z(n.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Z(n.height) / t.offsetHeight || 1);
97
- var c = K(t) ? R(t) : window, s = c.visualViewport, o = !te() && r, p = (n.left + (o && s ? s.offsetLeft : 0)) / a, f = (n.top + (o && s ? s.offsetTop : 0)) / i, l = n.width / a, d = n.height / i;
92
+ function _(e, t, r) {
93
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
94
+ var n = e.getBoundingClientRect(), a = 1, o = 1;
95
+ t && R(e) && (a = e.offsetWidth > 0 && Z(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Z(n.height) / e.offsetHeight || 1);
96
+ var c = K(e) ? L(e) : window, s = c.visualViewport, i = !tt() && r, u = (n.left + (i && s ? s.offsetLeft : 0)) / a, f = (n.top + (i && s ? s.offsetTop : 0)) / o, d = n.width / a, h = n.height / o;
98
97
  return {
99
- width: l,
100
- height: d,
98
+ width: d,
99
+ height: h,
101
100
  top: f,
102
- right: p + l,
103
- bottom: f + d,
104
- left: p,
105
- x: p,
101
+ right: u + d,
102
+ bottom: f + h,
103
+ left: u,
104
+ x: u,
106
105
  y: f
107
106
  };
108
107
  }
109
- function jt(t) {
110
- var e = _(t), r = t.offsetWidth, n = t.offsetHeight;
111
- return Math.abs(e.width - r) <= 1 && (r = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), {
112
- x: t.offsetLeft,
113
- y: t.offsetTop,
108
+ function $e(e) {
109
+ var t = _(e), r = e.offsetWidth, n = e.offsetHeight;
110
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
111
+ x: e.offsetLeft,
112
+ y: e.offsetTop,
114
113
  width: r,
115
114
  height: n
116
115
  };
117
116
  }
118
- function ee(t, e) {
119
- var r = e.getRootNode && e.getRootNode();
120
- if (t.contains(e))
117
+ function rt(e, t) {
118
+ var r = t.getRootNode && t.getRootNode();
119
+ if (e.contains(t))
121
120
  return !0;
122
- if (r && Dt(r)) {
123
- var n = e;
121
+ if (r && je(r)) {
122
+ var n = t;
124
123
  do {
125
- if (n && t.isSameNode(n))
124
+ if (n && e.isSameNode(n))
126
125
  return !0;
127
126
  n = n.parentNode || n.host;
128
127
  } while (n);
129
128
  }
130
129
  return !1;
131
130
  }
132
- function N(t) {
133
- return R(t).getComputedStyle(t);
131
+ function N(e) {
132
+ return L(e).getComputedStyle(e);
134
133
  }
135
- function Re(t) {
136
- return ["table", "td", "th"].indexOf(V(t)) >= 0;
134
+ function Ct(e) {
135
+ return ["table", "td", "th"].indexOf(V(e)) >= 0;
137
136
  }
138
- function q(t) {
139
- return ((K(t) ? t.ownerDocument : (
137
+ function q(e) {
138
+ return ((K(e) ? e.ownerDocument : (
140
139
  // $FlowFixMe[prop-missing]
141
- t.document
140
+ e.document
142
141
  )) || window.document).documentElement;
143
142
  }
144
- function yt(t) {
145
- return V(t) === "html" ? t : (
143
+ function ge(e) {
144
+ return V(e) === "html" ? e : (
146
145
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
147
146
  // $FlowFixMe[incompatible-return]
148
147
  // $FlowFixMe[prop-missing]
149
- t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
150
- t.parentNode || // DOM Element detected
151
- (Dt(t) ? t.host : null) || // ShadowRoot detected
148
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
149
+ e.parentNode || // DOM Element detected
150
+ (je(e) ? e.host : null) || // ShadowRoot detected
152
151
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
153
- q(t)
152
+ q(e)
154
153
  );
155
154
  }
156
- function It(t) {
157
- return !L(t) || // https://github.com/popperjs/popper-core/issues/837
158
- N(t).position === "fixed" ? null : t.offsetParent;
155
+ function Ie(e) {
156
+ return !R(e) || // https://github.com/popperjs/popper-core/issues/837
157
+ N(e).position === "fixed" ? null : e.offsetParent;
159
158
  }
160
- function Le(t) {
161
- var e = /firefox/i.test(Et()), r = /Trident/i.test(Et());
162
- if (r && L(t)) {
163
- var n = N(t);
159
+ function Lt(e) {
160
+ var t = /firefox/i.test(Pe()), r = /Trident/i.test(Pe());
161
+ if (r && R(e)) {
162
+ var n = N(e);
164
163
  if (n.position === "fixed")
165
164
  return null;
166
165
  }
167
- var a = yt(t);
168
- for (Dt(a) && (a = a.host); L(a) && ["html", "body"].indexOf(V(a)) < 0; ) {
169
- var i = N(a);
170
- if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
166
+ var a = ge(e);
167
+ for (je(a) && (a = a.host); R(a) && ["html", "body"].indexOf(V(a)) < 0; ) {
168
+ var o = N(a);
169
+ if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
171
170
  return a;
172
171
  a = a.parentNode;
173
172
  }
174
173
  return null;
175
174
  }
176
- function ct(t) {
177
- for (var e = R(t), r = It(t); r && Re(r) && N(r).position === "static"; )
178
- r = It(r);
179
- return r && (V(r) === "html" || V(r) === "body" && N(r).position === "static") ? e : r || Le(t) || e;
175
+ function ce(e) {
176
+ for (var t = L(e), r = Ie(e); r && Ct(r) && N(r).position === "static"; )
177
+ r = Ie(r);
178
+ return r && (V(r) === "html" || V(r) === "body" && N(r).position === "static") ? t : r || Lt(e) || t;
180
179
  }
181
- function Bt(t) {
182
- return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
180
+ function ke(e) {
181
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
183
182
  }
184
- function at(t, e, r) {
185
- return G(t, gt(e, r));
183
+ function ae(e, t, r) {
184
+ return G(e, ye(t, r));
186
185
  }
187
- function Te(t, e, r) {
188
- var n = at(t, e, r);
186
+ function Rt(e, t, r) {
187
+ var n = ae(e, t, r);
189
188
  return n > r ? r : n;
190
189
  }
191
- function re() {
190
+ function nt() {
192
191
  return {
193
192
  top: 0,
194
193
  right: 0,
@@ -196,444 +195,444 @@ function re() {
196
195
  left: 0
197
196
  };
198
197
  }
199
- function ne(t) {
200
- return Object.assign({}, re(), t);
198
+ function at(e) {
199
+ return Object.assign({}, nt(), e);
201
200
  }
202
- function ae(t, e) {
203
- return e.reduce(function(r, n) {
204
- return r[n] = t, r;
201
+ function ot(e, t) {
202
+ return t.reduce(function(r, n) {
203
+ return r[n] = e, r;
205
204
  }, {});
206
205
  }
207
- var Se = function(e, r) {
208
- return e = typeof e == "function" ? e(Object.assign({}, r.rects, {
206
+ var Tt = function(t, r) {
207
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
209
208
  placement: r.placement
210
- })) : e, ne(typeof e != "number" ? e : ae(e, ft));
209
+ })) : t, at(typeof t != "number" ? t : ot(t, fe));
211
210
  };
212
- function Me(t) {
213
- var e, r = t.state, n = t.name, a = t.options, i = r.elements.arrow, c = r.modifiersData.popperOffsets, s = H(r.placement), o = Bt(s), p = [C, S].indexOf(s) >= 0, f = p ? "height" : "width";
214
- if (!(!i || !c)) {
215
- var l = Se(a.padding, r), d = jt(i), u = o === "y" ? $ : C, w = o === "y" ? T : S, h = r.rects.reference[f] + r.rects.reference[o] - c[o] - r.rects.popper[f], m = c[o] - r.rects.reference[o], b = ct(i), O = b ? o === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, E = h / 2 - m / 2, v = l[u], g = O - d[f] - l[w], y = O / 2 - d[f] / 2 + E, x = at(v, y, g), D = o;
216
- r.modifiersData[n] = (e = {}, e[D] = x, e.centerOffset = x - y, e);
211
+ function St(e) {
212
+ var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, c = r.modifiersData.popperOffsets, s = H(r.placement), i = ke(s), u = [k, S].indexOf(s) >= 0, f = u ? "height" : "width";
213
+ if (!(!o || !c)) {
214
+ var d = Tt(a.padding, r), h = $e(o), p = i === "y" ? $ : k, y = i === "y" ? T : S, m = r.rects.reference[f] + r.rects.reference[i] - c[i] - r.rects.popper[f], l = c[i] - r.rects.reference[i], w = ce(o), x = w ? i === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, O = m / 2 - l / 2, v = d[p], g = x - h[f] - d[y], b = x / 2 - h[f] / 2 + O, E = ae(v, b, g), D = i;
215
+ r.modifiersData[n] = (t = {}, t[D] = E, t.centerOffset = E - b, t);
217
216
  }
218
217
  }
219
- function We(t) {
220
- var e = t.state, r = t.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
221
- a != null && (typeof a == "string" && (a = e.elements.popper.querySelector(a), !a) || ee(e.elements.popper, a) && (e.elements.arrow = a));
218
+ function Mt(e) {
219
+ var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
220
+ a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || rt(t.elements.popper, a) && (t.elements.arrow = a));
222
221
  }
223
- const He = {
222
+ const Wt = {
224
223
  name: "arrow",
225
224
  enabled: !0,
226
225
  phase: "main",
227
- fn: Me,
228
- effect: We,
226
+ fn: St,
227
+ effect: Mt,
229
228
  requires: ["popperOffsets"],
230
229
  requiresIfExists: ["preventOverflow"]
231
230
  };
232
- function tt(t) {
233
- return t.split("-")[1];
231
+ function ee(e) {
232
+ return e.split("-")[1];
234
233
  }
235
- var Ve = {
234
+ var Ht = {
236
235
  top: "auto",
237
236
  right: "auto",
238
237
  bottom: "auto",
239
238
  left: "auto"
240
239
  };
241
- function Ne(t, e) {
242
- var r = t.x, n = t.y, a = e.devicePixelRatio || 1;
240
+ function Vt(e, t) {
241
+ var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
243
242
  return {
244
243
  x: Z(r * a) / a || 0,
245
244
  y: Z(n * a) / a || 0
246
245
  };
247
246
  }
248
- function Yt(t) {
249
- var e, r = t.popper, n = t.popperRect, a = t.placement, i = t.variation, c = t.offsets, s = t.position, o = t.gpuAcceleration, p = t.adaptive, f = t.roundOffsets, l = t.isFixed, d = c.x, u = d === void 0 ? 0 : d, w = c.y, h = w === void 0 ? 0 : w, m = typeof f == "function" ? f({
250
- x: u,
251
- y: h
247
+ function Ye(e) {
248
+ var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, u = e.adaptive, f = e.roundOffsets, d = e.isFixed, h = c.x, p = h === void 0 ? 0 : h, y = c.y, m = y === void 0 ? 0 : y, l = typeof f == "function" ? f({
249
+ x: p,
250
+ y: m
252
251
  }) : {
253
- x: u,
254
- y: h
252
+ x: p,
253
+ y: m
255
254
  };
256
- u = m.x, h = m.y;
257
- var b = c.hasOwnProperty("x"), O = c.hasOwnProperty("y"), E = C, v = $, g = window;
258
- if (p) {
259
- var y = ct(r), x = "clientHeight", D = "clientWidth";
260
- if (y === R(r) && (y = q(r), N(y).position !== "static" && s === "absolute" && (x = "scrollHeight", D = "scrollWidth")), y = y, a === $ || (a === C || a === S) && i === it) {
255
+ p = l.x, m = l.y;
256
+ var w = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = k, v = $, g = window;
257
+ if (u) {
258
+ var b = ce(r), E = "clientHeight", D = "clientWidth";
259
+ if (b === L(r) && (b = q(r), N(b).position !== "static" && s === "absolute" && (E = "scrollHeight", D = "scrollWidth")), b = b, a === $ || (a === k || a === S) && o === ie) {
261
260
  v = T;
262
- var P = l && y === g && g.visualViewport ? g.visualViewport.height : (
261
+ var P = d && b === g && g.visualViewport ? g.visualViewport.height : (
263
262
  // $FlowFixMe[prop-missing]
264
- y[x]
263
+ b[E]
265
264
  );
266
- h -= P - n.height, h *= o ? 1 : -1;
265
+ m -= P - n.height, m *= i ? 1 : -1;
267
266
  }
268
- if (a === C || (a === $ || a === T) && i === it) {
269
- E = S;
270
- var A = l && y === g && g.visualViewport ? g.visualViewport.width : (
267
+ if (a === k || (a === $ || a === T) && o === ie) {
268
+ O = S;
269
+ var A = d && b === g && g.visualViewport ? g.visualViewport.width : (
271
270
  // $FlowFixMe[prop-missing]
272
- y[D]
271
+ b[D]
273
272
  );
274
- u -= A - n.width, u *= o ? 1 : -1;
273
+ p -= A - n.width, p *= i ? 1 : -1;
275
274
  }
276
275
  }
277
- var j = Object.assign({
276
+ var B = Object.assign({
278
277
  position: s
279
- }, p && Ve), M = f === !0 ? Ne({
280
- x: u,
281
- y: h
282
- }, R(r)) : {
283
- x: u,
284
- y: h
278
+ }, u && Ht), M = f === !0 ? Vt({
279
+ x: p,
280
+ y: m
281
+ }, L(r)) : {
282
+ x: p,
283
+ y: m
285
284
  };
286
- if (u = M.x, h = M.y, o) {
287
- var B;
288
- return Object.assign({}, j, (B = {}, B[v] = O ? "0" : "", B[E] = b ? "0" : "", B.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + h + "px)" : "translate3d(" + u + "px, " + h + "px, 0)", B));
285
+ if (p = M.x, m = M.y, i) {
286
+ var j;
287
+ return Object.assign({}, B, (j = {}, j[v] = x ? "0" : "", j[O] = w ? "0" : "", j.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", j));
289
288
  }
290
- return Object.assign({}, j, (e = {}, e[v] = O ? h + "px" : "", e[E] = b ? u + "px" : "", e.transform = "", e));
291
- }
292
- function Fe(t) {
293
- var e = t.state, r = t.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, i = r.adaptive, c = i === void 0 ? !0 : i, s = r.roundOffsets, o = s === void 0 ? !0 : s, p = {
294
- placement: H(e.placement),
295
- variation: tt(e.placement),
296
- popper: e.elements.popper,
297
- popperRect: e.rects.popper,
289
+ return Object.assign({}, B, (t = {}, t[v] = x ? m + "px" : "", t[O] = w ? p + "px" : "", t.transform = "", t));
290
+ }
291
+ function Nt(e) {
292
+ var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, c = o === void 0 ? !0 : o, s = r.roundOffsets, i = s === void 0 ? !0 : s, u = {
293
+ placement: H(t.placement),
294
+ variation: ee(t.placement),
295
+ popper: t.elements.popper,
296
+ popperRect: t.rects.popper,
298
297
  gpuAcceleration: a,
299
- isFixed: e.options.strategy === "fixed"
298
+ isFixed: t.options.strategy === "fixed"
300
299
  };
301
- e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Yt(Object.assign({}, p, {
302
- offsets: e.modifiersData.popperOffsets,
303
- position: e.options.strategy,
300
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ye(Object.assign({}, u, {
301
+ offsets: t.modifiersData.popperOffsets,
302
+ position: t.options.strategy,
304
303
  adaptive: c,
305
- roundOffsets: o
306
- })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Yt(Object.assign({}, p, {
307
- offsets: e.modifiersData.arrow,
304
+ roundOffsets: i
305
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ye(Object.assign({}, u, {
306
+ offsets: t.modifiersData.arrow,
308
307
  position: "absolute",
309
308
  adaptive: !1,
310
- roundOffsets: o
311
- })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
312
- "data-popper-placement": e.placement
309
+ roundOffsets: i
310
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
311
+ "data-popper-placement": t.placement
313
312
  });
314
313
  }
315
- const qe = {
314
+ const Ft = {
316
315
  name: "computeStyles",
317
316
  enabled: !0,
318
317
  phase: "beforeWrite",
319
- fn: Fe,
318
+ fn: Nt,
320
319
  data: {}
321
320
  };
322
- var mt = {
321
+ var me = {
323
322
  passive: !0
324
323
  };
325
- function Xe(t) {
326
- var e = t.state, r = t.instance, n = t.options, a = n.scroll, i = a === void 0 ? !0 : a, c = n.resize, s = c === void 0 ? !0 : c, o = R(e.elements.popper), p = [].concat(e.scrollParents.reference, e.scrollParents.popper);
327
- return i && p.forEach(function(f) {
328
- f.addEventListener("scroll", r.update, mt);
329
- }), s && o.addEventListener("resize", r.update, mt), function() {
330
- i && p.forEach(function(f) {
331
- f.removeEventListener("scroll", r.update, mt);
332
- }), s && o.removeEventListener("resize", r.update, mt);
324
+ function qt(e) {
325
+ var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, c = n.resize, s = c === void 0 ? !0 : c, i = L(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
326
+ return o && u.forEach(function(f) {
327
+ f.addEventListener("scroll", r.update, me);
328
+ }), s && i.addEventListener("resize", r.update, me), function() {
329
+ o && u.forEach(function(f) {
330
+ f.removeEventListener("scroll", r.update, me);
331
+ }), s && i.removeEventListener("resize", r.update, me);
333
332
  };
334
333
  }
335
- const Ie = {
334
+ const Xt = {
336
335
  name: "eventListeners",
337
336
  enabled: !0,
338
337
  phase: "write",
339
338
  fn: function() {
340
339
  },
341
- effect: Xe,
340
+ effect: qt,
342
341
  data: {}
343
342
  };
344
- var Ye = {
343
+ var zt = {
345
344
  left: "right",
346
345
  right: "left",
347
346
  bottom: "top",
348
347
  top: "bottom"
349
348
  };
350
- function ht(t) {
351
- return t.replace(/left|right|bottom|top/g, function(e) {
352
- return Ye[e];
349
+ function he(e) {
350
+ return e.replace(/left|right|bottom|top/g, function(t) {
351
+ return zt[t];
353
352
  });
354
353
  }
355
- var ze = {
354
+ var It = {
356
355
  start: "end",
357
356
  end: "start"
358
357
  };
359
- function zt(t) {
360
- return t.replace(/start|end/g, function(e) {
361
- return ze[e];
358
+ function Ue(e) {
359
+ return e.replace(/start|end/g, function(t) {
360
+ return It[t];
362
361
  });
363
362
  }
364
- function $t(t) {
365
- var e = R(t), r = e.pageXOffset, n = e.pageYOffset;
363
+ function Ce(e) {
364
+ var t = L(e), r = t.pageXOffset, n = t.pageYOffset;
366
365
  return {
367
366
  scrollLeft: r,
368
367
  scrollTop: n
369
368
  };
370
369
  }
371
- function Ct(t) {
372
- return _(q(t)).left + $t(t).scrollLeft;
370
+ function Le(e) {
371
+ return _(q(e)).left + Ce(e).scrollLeft;
373
372
  }
374
- function Ue(t, e) {
375
- var r = R(t), n = q(t), a = r.visualViewport, i = n.clientWidth, c = n.clientHeight, s = 0, o = 0;
373
+ function Yt(e, t) {
374
+ var r = L(e), n = q(e), a = r.visualViewport, o = n.clientWidth, c = n.clientHeight, s = 0, i = 0;
376
375
  if (a) {
377
- i = a.width, c = a.height;
378
- var p = te();
379
- (p || !p && e === "fixed") && (s = a.offsetLeft, o = a.offsetTop);
376
+ o = a.width, c = a.height;
377
+ var u = tt();
378
+ (u || !u && t === "fixed") && (s = a.offsetLeft, i = a.offsetTop);
380
379
  }
381
380
  return {
382
- width: i,
381
+ width: o,
383
382
  height: c,
384
- x: s + Ct(t),
385
- y: o
383
+ x: s + Le(e),
384
+ y: i
386
385
  };
387
386
  }
388
- function Ge(t) {
389
- var e, r = q(t), n = $t(t), a = (e = t.ownerDocument) == null ? void 0 : e.body, i = G(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), c = G(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -n.scrollLeft + Ct(t), o = -n.scrollTop;
390
- return N(a || r).direction === "rtl" && (s += G(r.clientWidth, a ? a.clientWidth : 0) - i), {
391
- width: i,
387
+ function Ut(e) {
388
+ var t, r = q(e), n = Ce(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = G(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), c = G(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), s = -n.scrollLeft + Le(e), i = -n.scrollTop;
389
+ return N(a || r).direction === "rtl" && (s += G(r.clientWidth, a ? a.clientWidth : 0) - o), {
390
+ width: o,
392
391
  height: c,
393
392
  x: s,
394
- y: o
393
+ y: i
395
394
  };
396
395
  }
397
- function kt(t) {
398
- var e = N(t), r = e.overflow, n = e.overflowX, a = e.overflowY;
396
+ function Re(e) {
397
+ var t = N(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
399
398
  return /auto|scroll|overlay|hidden/.test(r + a + n);
400
399
  }
401
- function oe(t) {
402
- return ["html", "body", "#document"].indexOf(V(t)) >= 0 ? t.ownerDocument.body : L(t) && kt(t) ? t : oe(yt(t));
400
+ function it(e) {
401
+ return ["html", "body", "#document"].indexOf(V(e)) >= 0 ? e.ownerDocument.body : R(e) && Re(e) ? e : it(ge(e));
403
402
  }
404
- function ot(t, e) {
403
+ function oe(e, t) {
405
404
  var r;
406
- e === void 0 && (e = []);
407
- var n = oe(t), a = n === ((r = t.ownerDocument) == null ? void 0 : r.body), i = R(n), c = a ? [i].concat(i.visualViewport || [], kt(n) ? n : []) : n, s = e.concat(c);
405
+ t === void 0 && (t = []);
406
+ var n = it(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = L(n), c = a ? [o].concat(o.visualViewport || [], Re(n) ? n : []) : n, s = t.concat(c);
408
407
  return a ? s : (
409
408
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
410
- s.concat(ot(yt(c)))
409
+ s.concat(oe(ge(c)))
411
410
  );
412
411
  }
413
- function At(t) {
414
- return Object.assign({}, t, {
415
- left: t.x,
416
- top: t.y,
417
- right: t.x + t.width,
418
- bottom: t.y + t.height
412
+ function De(e) {
413
+ return Object.assign({}, e, {
414
+ left: e.x,
415
+ top: e.y,
416
+ right: e.x + e.width,
417
+ bottom: e.y + e.height
419
418
  });
420
419
  }
421
- function Ke(t, e) {
422
- var r = _(t, !1, e === "fixed");
423
- return r.top = r.top + t.clientTop, r.left = r.left + t.clientLeft, r.bottom = r.top + t.clientHeight, r.right = r.left + t.clientWidth, r.width = t.clientWidth, r.height = t.clientHeight, r.x = r.left, r.y = r.top, r;
420
+ function Gt(e, t) {
421
+ var r = _(e, !1, t === "fixed");
422
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
424
423
  }
425
- function Ut(t, e, r) {
426
- return e === Zt ? At(Ue(t, r)) : K(e) ? Ke(e, r) : At(Ge(q(t)));
424
+ function Ge(e, t, r) {
425
+ return t === _e ? De(Yt(e, r)) : K(t) ? Gt(t, r) : De(Ut(q(e)));
427
426
  }
428
- function Je(t) {
429
- var e = ot(yt(t)), r = ["absolute", "fixed"].indexOf(N(t).position) >= 0, n = r && L(t) ? ct(t) : t;
430
- return K(n) ? e.filter(function(a) {
431
- return K(a) && ee(a, n) && V(a) !== "body";
427
+ function Kt(e) {
428
+ var t = oe(ge(e)), r = ["absolute", "fixed"].indexOf(N(e).position) >= 0, n = r && R(e) ? ce(e) : e;
429
+ return K(n) ? t.filter(function(a) {
430
+ return K(a) && rt(a, n) && V(a) !== "body";
432
431
  }) : [];
433
432
  }
434
- function Qe(t, e, r, n) {
435
- var a = e === "clippingParents" ? Je(t) : [].concat(e), i = [].concat(a, [r]), c = i[0], s = i.reduce(function(o, p) {
436
- var f = Ut(t, p, n);
437
- return o.top = G(f.top, o.top), o.right = gt(f.right, o.right), o.bottom = gt(f.bottom, o.bottom), o.left = G(f.left, o.left), o;
438
- }, Ut(t, c, n));
433
+ function Jt(e, t, r, n) {
434
+ var a = t === "clippingParents" ? Kt(e) : [].concat(t), o = [].concat(a, [r]), c = o[0], s = o.reduce(function(i, u) {
435
+ var f = Ge(e, u, n);
436
+ return i.top = G(f.top, i.top), i.right = ye(f.right, i.right), i.bottom = ye(f.bottom, i.bottom), i.left = G(f.left, i.left), i;
437
+ }, Ge(e, c, n));
439
438
  return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
440
439
  }
441
- function ie(t) {
442
- var e = t.reference, r = t.element, n = t.placement, a = n ? H(n) : null, i = n ? tt(n) : null, c = e.x + e.width / 2 - r.width / 2, s = e.y + e.height / 2 - r.height / 2, o;
440
+ function st(e) {
441
+ var t = e.reference, r = e.element, n = e.placement, a = n ? H(n) : null, o = n ? ee(n) : null, c = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, i;
443
442
  switch (a) {
444
443
  case $:
445
- o = {
444
+ i = {
446
445
  x: c,
447
- y: e.y - r.height
446
+ y: t.y - r.height
448
447
  };
449
448
  break;
450
449
  case T:
451
- o = {
450
+ i = {
452
451
  x: c,
453
- y: e.y + e.height
452
+ y: t.y + t.height
454
453
  };
455
454
  break;
456
455
  case S:
457
- o = {
458
- x: e.x + e.width,
456
+ i = {
457
+ x: t.x + t.width,
459
458
  y: s
460
459
  };
461
460
  break;
462
- case C:
463
- o = {
464
- x: e.x - r.width,
461
+ case k:
462
+ i = {
463
+ x: t.x - r.width,
465
464
  y: s
466
465
  };
467
466
  break;
468
467
  default:
469
- o = {
470
- x: e.x,
471
- y: e.y
468
+ i = {
469
+ x: t.x,
470
+ y: t.y
472
471
  };
473
472
  }
474
- var p = a ? Bt(a) : null;
475
- if (p != null) {
476
- var f = p === "y" ? "height" : "width";
477
- switch (i) {
473
+ var u = a ? ke(a) : null;
474
+ if (u != null) {
475
+ var f = u === "y" ? "height" : "width";
476
+ switch (o) {
478
477
  case Q:
479
- o[p] = o[p] - (e[f] / 2 - r[f] / 2);
478
+ i[u] = i[u] - (t[f] / 2 - r[f] / 2);
480
479
  break;
481
- case it:
482
- o[p] = o[p] + (e[f] / 2 - r[f] / 2);
480
+ case ie:
481
+ i[u] = i[u] + (t[f] / 2 - r[f] / 2);
483
482
  break;
484
483
  }
485
484
  }
486
- return o;
485
+ return i;
487
486
  }
488
- function st(t, e) {
489
- e === void 0 && (e = {});
490
- var r = e, n = r.placement, a = n === void 0 ? t.placement : n, i = r.strategy, c = i === void 0 ? t.strategy : i, s = r.boundary, o = s === void 0 ? ge : s, p = r.rootBoundary, f = p === void 0 ? Zt : p, l = r.elementContext, d = l === void 0 ? nt : l, u = r.altBoundary, w = u === void 0 ? !1 : u, h = r.padding, m = h === void 0 ? 0 : h, b = ne(typeof m != "number" ? m : ae(m, ft)), O = d === nt ? ye : nt, E = t.rects.popper, v = t.elements[w ? O : d], g = Qe(K(v) ? v : v.contextElement || q(t.elements.popper), o, f, c), y = _(t.elements.reference), x = ie({
491
- reference: y,
492
- element: E,
487
+ function se(e, t) {
488
+ t === void 0 && (t = {});
489
+ var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, c = o === void 0 ? e.strategy : o, s = r.boundary, i = s === void 0 ? ht : s, u = r.rootBoundary, f = u === void 0 ? _e : u, d = r.elementContext, h = d === void 0 ? ne : d, p = r.altBoundary, y = p === void 0 ? !1 : p, m = r.padding, l = m === void 0 ? 0 : m, w = at(typeof l != "number" ? l : ot(l, fe)), x = h === ne ? yt : ne, O = e.rects.popper, v = e.elements[y ? x : h], g = Jt(K(v) ? v : v.contextElement || q(e.elements.popper), i, f, c), b = _(e.elements.reference), E = st({
490
+ reference: b,
491
+ element: O,
493
492
  placement: a
494
- }), D = At(Object.assign({}, E, x)), P = d === nt ? D : y, A = {
495
- top: g.top - P.top + b.top,
496
- bottom: P.bottom - g.bottom + b.bottom,
497
- left: g.left - P.left + b.left,
498
- right: P.right - g.right + b.right
499
- }, j = t.modifiersData.offset;
500
- if (d === nt && j) {
501
- var M = j[a];
502
- Object.keys(A).forEach(function(B) {
503
- var X = [S, T].indexOf(B) >= 0 ? 1 : -1, I = [$, T].indexOf(B) >= 0 ? "y" : "x";
504
- A[B] += M[I] * X;
493
+ }), D = De(Object.assign({}, O, E)), P = h === ne ? D : b, A = {
494
+ top: g.top - P.top + w.top,
495
+ bottom: P.bottom - g.bottom + w.bottom,
496
+ left: g.left - P.left + w.left,
497
+ right: P.right - g.right + w.right
498
+ }, B = e.modifiersData.offset;
499
+ if (h === ne && B) {
500
+ var M = B[a];
501
+ Object.keys(A).forEach(function(j) {
502
+ var X = [S, T].indexOf(j) >= 0 ? 1 : -1, z = [$, T].indexOf(j) >= 0 ? "y" : "x";
503
+ A[j] += M[z] * X;
505
504
  });
506
505
  }
507
506
  return A;
508
507
  }
509
- function Ze(t, e) {
510
- e === void 0 && (e = {});
511
- var r = e, n = r.placement, a = r.boundary, i = r.rootBoundary, c = r.padding, s = r.flipVariations, o = r.allowedAutoPlacements, p = o === void 0 ? _t : o, f = tt(n), l = f ? s ? Xt : Xt.filter(function(w) {
512
- return tt(w) === f;
513
- }) : ft, d = l.filter(function(w) {
514
- return p.indexOf(w) >= 0;
508
+ function Qt(e, t) {
509
+ t === void 0 && (t = {});
510
+ var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, c = r.padding, s = r.flipVariations, i = r.allowedAutoPlacements, u = i === void 0 ? et : i, f = ee(n), d = f ? s ? ze : ze.filter(function(y) {
511
+ return ee(y) === f;
512
+ }) : fe, h = d.filter(function(y) {
513
+ return u.indexOf(y) >= 0;
515
514
  });
516
- d.length === 0 && (d = l);
517
- var u = d.reduce(function(w, h) {
518
- return w[h] = st(t, {
519
- placement: h,
515
+ h.length === 0 && (h = d);
516
+ var p = h.reduce(function(y, m) {
517
+ return y[m] = se(e, {
518
+ placement: m,
520
519
  boundary: a,
521
- rootBoundary: i,
520
+ rootBoundary: o,
522
521
  padding: c
523
- })[H(h)], w;
522
+ })[H(m)], y;
524
523
  }, {});
525
- return Object.keys(u).sort(function(w, h) {
526
- return u[w] - u[h];
524
+ return Object.keys(p).sort(function(y, m) {
525
+ return p[y] - p[m];
527
526
  });
528
527
  }
529
- function _e(t) {
530
- if (H(t) === Pt)
528
+ function Zt(e) {
529
+ if (H(e) === Be)
531
530
  return [];
532
- var e = ht(t);
533
- return [zt(t), e, zt(e)];
534
- }
535
- function tr(t) {
536
- var e = t.state, r = t.options, n = t.name;
537
- if (!e.modifiersData[n]._skip) {
538
- for (var a = r.mainAxis, i = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !0 : c, o = r.fallbackPlacements, p = r.padding, f = r.boundary, l = r.rootBoundary, d = r.altBoundary, u = r.flipVariations, w = u === void 0 ? !0 : u, h = r.allowedAutoPlacements, m = e.options.placement, b = H(m), O = b === m, E = o || (O || !w ? [ht(m)] : _e(m)), v = [m].concat(E).reduce(function(J, F) {
539
- return J.concat(H(F) === Pt ? Ze(e, {
531
+ var t = he(e);
532
+ return [Ue(e), t, Ue(t)];
533
+ }
534
+ function _t(e) {
535
+ var t = e.state, r = e.options, n = e.name;
536
+ if (!t.modifiersData[n]._skip) {
537
+ for (var a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !0 : c, i = r.fallbackPlacements, u = r.padding, f = r.boundary, d = r.rootBoundary, h = r.altBoundary, p = r.flipVariations, y = p === void 0 ? !0 : p, m = r.allowedAutoPlacements, l = t.options.placement, w = H(l), x = w === l, O = i || (x || !y ? [he(l)] : Zt(l)), v = [l].concat(O).reduce(function(J, F) {
538
+ return J.concat(H(F) === Be ? Qt(t, {
540
539
  placement: F,
541
540
  boundary: f,
542
- rootBoundary: l,
543
- padding: p,
544
- flipVariations: w,
545
- allowedAutoPlacements: h
541
+ rootBoundary: d,
542
+ padding: u,
543
+ flipVariations: y,
544
+ allowedAutoPlacements: m
546
545
  }) : F);
547
- }, []), g = e.rects.reference, y = e.rects.popper, x = /* @__PURE__ */ new Map(), D = !0, P = v[0], A = 0; A < v.length; A++) {
548
- var j = v[A], M = H(j), B = tt(j) === Q, X = [$, T].indexOf(M) >= 0, I = X ? "width" : "height", k = st(e, {
549
- placement: j,
546
+ }, []), g = t.rects.reference, b = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, P = v[0], A = 0; A < v.length; A++) {
547
+ var B = v[A], M = H(B), j = ee(B) === Q, X = [$, T].indexOf(M) >= 0, z = X ? "width" : "height", C = se(t, {
548
+ placement: B,
550
549
  boundary: f,
551
- rootBoundary: l,
552
- altBoundary: d,
553
- padding: p
554
- }), W = X ? B ? S : C : B ? T : $;
555
- g[I] > y[I] && (W = ht(W));
556
- var pt = ht(W), Y = [];
557
- if (i && Y.push(k[M] <= 0), s && Y.push(k[W] <= 0, k[pt] <= 0), Y.every(function(J) {
550
+ rootBoundary: d,
551
+ altBoundary: h,
552
+ padding: u
553
+ }), W = X ? j ? S : k : j ? T : $;
554
+ g[z] > b[z] && (W = he(W));
555
+ var ue = he(W), I = [];
556
+ if (o && I.push(C[M] <= 0), s && I.push(C[W] <= 0, C[ue] <= 0), I.every(function(J) {
558
557
  return J;
559
558
  })) {
560
- P = j, D = !1;
559
+ P = B, D = !1;
561
560
  break;
562
561
  }
563
- x.set(j, Y);
562
+ E.set(B, I);
564
563
  }
565
564
  if (D)
566
- for (var ut = w ? 3 : 1, bt = function(F) {
567
- var rt = v.find(function(vt) {
568
- var z = x.get(vt);
569
- if (z)
570
- return z.slice(0, F).every(function(wt) {
571
- return wt;
565
+ for (var pe = y ? 3 : 1, be = function(F) {
566
+ var re = v.find(function(ve) {
567
+ var Y = E.get(ve);
568
+ if (Y)
569
+ return Y.slice(0, F).every(function(we) {
570
+ return we;
572
571
  });
573
572
  });
574
- if (rt)
575
- return P = rt, "break";
576
- }, et = ut; et > 0; et--) {
577
- var lt = bt(et);
578
- if (lt === "break") break;
573
+ if (re)
574
+ return P = re, "break";
575
+ }, te = pe; te > 0; te--) {
576
+ var le = be(te);
577
+ if (le === "break") break;
579
578
  }
580
- e.placement !== P && (e.modifiersData[n]._skip = !0, e.placement = P, e.reset = !0);
579
+ t.placement !== P && (t.modifiersData[n]._skip = !0, t.placement = P, t.reset = !0);
581
580
  }
582
581
  }
583
582
  const er = {
584
583
  name: "flip",
585
584
  enabled: !0,
586
585
  phase: "main",
587
- fn: tr,
586
+ fn: _t,
588
587
  requiresIfExists: ["offset"],
589
588
  data: {
590
589
  _skip: !1
591
590
  }
592
591
  };
593
- function Gt(t, e, r) {
592
+ function Ke(e, t, r) {
594
593
  return r === void 0 && (r = {
595
594
  x: 0,
596
595
  y: 0
597
596
  }), {
598
- top: t.top - e.height - r.y,
599
- right: t.right - e.width + r.x,
600
- bottom: t.bottom - e.height + r.y,
601
- left: t.left - e.width - r.x
597
+ top: e.top - t.height - r.y,
598
+ right: e.right - t.width + r.x,
599
+ bottom: e.bottom - t.height + r.y,
600
+ left: e.left - t.width - r.x
602
601
  };
603
602
  }
604
- function Kt(t) {
605
- return [$, S, T, C].some(function(e) {
606
- return t[e] >= 0;
603
+ function Je(e) {
604
+ return [$, S, T, k].some(function(t) {
605
+ return e[t] >= 0;
607
606
  });
608
607
  }
609
- function rr(t) {
610
- var e = t.state, r = t.name, n = e.rects.reference, a = e.rects.popper, i = e.modifiersData.preventOverflow, c = st(e, {
608
+ function tr(e) {
609
+ var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, c = se(t, {
611
610
  elementContext: "reference"
612
- }), s = st(e, {
611
+ }), s = se(t, {
613
612
  altBoundary: !0
614
- }), o = Gt(c, n), p = Gt(s, a, i), f = Kt(o), l = Kt(p);
615
- e.modifiersData[r] = {
616
- referenceClippingOffsets: o,
617
- popperEscapeOffsets: p,
613
+ }), i = Ke(c, n), u = Ke(s, a, o), f = Je(i), d = Je(u);
614
+ t.modifiersData[r] = {
615
+ referenceClippingOffsets: i,
616
+ popperEscapeOffsets: u,
618
617
  isReferenceHidden: f,
619
- hasPopperEscaped: l
620
- }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
618
+ hasPopperEscaped: d
619
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
621
620
  "data-popper-reference-hidden": f,
622
- "data-popper-escaped": l
621
+ "data-popper-escaped": d
623
622
  });
624
623
  }
625
- const nr = {
624
+ const rr = {
626
625
  name: "hide",
627
626
  enabled: !0,
628
627
  phase: "main",
629
628
  requiresIfExists: ["preventOverflow"],
630
- fn: rr
629
+ fn: tr
631
630
  };
632
- function ar(t, e, r) {
633
- var n = H(t), a = [C, $].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, e, {
634
- placement: t
635
- })) : r, c = i[0], s = i[1];
636
- return c = c || 0, s = (s || 0) * a, [C, S].indexOf(n) >= 0 ? {
631
+ function nr(e, t, r) {
632
+ var n = H(e), a = [k, $].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
633
+ placement: e
634
+ })) : r, c = o[0], s = o[1];
635
+ return c = c || 0, s = (s || 0) * a, [k, S].indexOf(n) >= 0 ? {
637
636
  x: s,
638
637
  y: c
639
638
  } : {
@@ -641,196 +640,196 @@ function ar(t, e, r) {
641
640
  y: s
642
641
  };
643
642
  }
644
- function or(t) {
645
- var e = t.state, r = t.options, n = t.name, a = r.offset, i = a === void 0 ? [0, 0] : a, c = _t.reduce(function(f, l) {
646
- return f[l] = ar(l, e.rects, i), f;
647
- }, {}), s = c[e.placement], o = s.x, p = s.y;
648
- e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += o, e.modifiersData.popperOffsets.y += p), e.modifiersData[n] = c;
643
+ function ar(e) {
644
+ var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, c = et.reduce(function(f, d) {
645
+ return f[d] = nr(d, t.rects, o), f;
646
+ }, {}), s = c[t.placement], i = s.x, u = s.y;
647
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += u), t.modifiersData[n] = c;
649
648
  }
650
- const ir = {
649
+ const or = {
651
650
  name: "offset",
652
651
  enabled: !0,
653
652
  phase: "main",
654
653
  requires: ["popperOffsets"],
655
- fn: or
654
+ fn: ar
656
655
  };
657
- function sr(t) {
658
- var e = t.state, r = t.name;
659
- e.modifiersData[r] = ie({
660
- reference: e.rects.reference,
661
- element: e.rects.popper,
662
- placement: e.placement
656
+ function ir(e) {
657
+ var t = e.state, r = e.name;
658
+ t.modifiersData[r] = st({
659
+ reference: t.rects.reference,
660
+ element: t.rects.popper,
661
+ placement: t.placement
663
662
  });
664
663
  }
665
- const fr = {
664
+ const sr = {
666
665
  name: "popperOffsets",
667
666
  enabled: !0,
668
667
  phase: "read",
669
- fn: sr,
668
+ fn: ir,
670
669
  data: {}
671
670
  };
672
- function cr(t) {
673
- return t === "x" ? "y" : "x";
674
- }
675
- function pr(t) {
676
- var e = t.state, r = t.options, n = t.name, a = r.mainAxis, i = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !1 : c, o = r.boundary, p = r.rootBoundary, f = r.altBoundary, l = r.padding, d = r.tether, u = d === void 0 ? !0 : d, w = r.tetherOffset, h = w === void 0 ? 0 : w, m = st(e, {
677
- boundary: o,
678
- rootBoundary: p,
679
- padding: l,
671
+ function fr(e) {
672
+ return e === "x" ? "y" : "x";
673
+ }
674
+ function cr(e) {
675
+ var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, s = c === void 0 ? !1 : c, i = r.boundary, u = r.rootBoundary, f = r.altBoundary, d = r.padding, h = r.tether, p = h === void 0 ? !0 : h, y = r.tetherOffset, m = y === void 0 ? 0 : y, l = se(t, {
676
+ boundary: i,
677
+ rootBoundary: u,
678
+ padding: d,
680
679
  altBoundary: f
681
- }), b = H(e.placement), O = tt(e.placement), E = !O, v = Bt(b), g = cr(v), y = e.modifiersData.popperOffsets, x = e.rects.reference, D = e.rects.popper, P = typeof h == "function" ? h(Object.assign({}, e.rects, {
682
- placement: e.placement
683
- })) : h, A = typeof P == "number" ? {
680
+ }), w = H(t.placement), x = ee(t.placement), O = !x, v = ke(w), g = fr(v), b = t.modifiersData.popperOffsets, E = t.rects.reference, D = t.rects.popper, P = typeof m == "function" ? m(Object.assign({}, t.rects, {
681
+ placement: t.placement
682
+ })) : m, A = typeof P == "number" ? {
684
683
  mainAxis: P,
685
684
  altAxis: P
686
685
  } : Object.assign({
687
686
  mainAxis: 0,
688
687
  altAxis: 0
689
- }, P), j = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, M = {
688
+ }, P), B = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
690
689
  x: 0,
691
690
  y: 0
692
691
  };
693
- if (y) {
694
- if (i) {
695
- var B, X = v === "y" ? $ : C, I = v === "y" ? T : S, k = v === "y" ? "height" : "width", W = y[v], pt = W + m[X], Y = W - m[I], ut = u ? -D[k] / 2 : 0, bt = O === Q ? x[k] : D[k], et = O === Q ? -D[k] : -x[k], lt = e.elements.arrow, J = u && lt ? jt(lt) : {
692
+ if (b) {
693
+ if (o) {
694
+ var j, X = v === "y" ? $ : k, z = v === "y" ? T : S, C = v === "y" ? "height" : "width", W = b[v], ue = W + l[X], I = W - l[z], pe = p ? -D[C] / 2 : 0, be = x === Q ? E[C] : D[C], te = x === Q ? -D[C] : -E[C], le = t.elements.arrow, J = p && le ? $e(le) : {
696
695
  width: 0,
697
696
  height: 0
698
- }, F = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : re(), rt = F[X], vt = F[I], z = at(0, x[k], J[k]), wt = E ? x[k] / 2 - ut - z - rt - A.mainAxis : bt - z - rt - A.mainAxis, se = E ? -x[k] / 2 + ut + z + vt + A.mainAxis : et + z + vt + A.mainAxis, xt = e.elements.arrow && ct(e.elements.arrow), fe = xt ? v === "y" ? xt.clientTop || 0 : xt.clientLeft || 0 : 0, Rt = (B = j == null ? void 0 : j[v]) != null ? B : 0, ce = W + wt - Rt - fe, pe = W + se - Rt, Lt = at(u ? gt(pt, ce) : pt, W, u ? G(Y, pe) : Y);
699
- y[v] = Lt, M[v] = Lt - W;
697
+ }, F = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : nt(), re = F[X], ve = F[z], Y = ae(0, E[C], J[C]), we = O ? E[C] / 2 - pe - Y - re - A.mainAxis : be - Y - re - A.mainAxis, ft = O ? -E[C] / 2 + pe + Y + ve + A.mainAxis : te + Y + ve + A.mainAxis, xe = t.elements.arrow && ce(t.elements.arrow), ct = xe ? v === "y" ? xe.clientTop || 0 : xe.clientLeft || 0 : 0, Te = (j = B == null ? void 0 : B[v]) != null ? j : 0, ut = W + we - Te - ct, pt = W + ft - Te, Se = ae(p ? ye(ue, ut) : ue, W, p ? G(I, pt) : I);
698
+ b[v] = Se, M[v] = Se - W;
700
699
  }
701
700
  if (s) {
702
- var Tt, ue = v === "x" ? $ : C, le = v === "x" ? T : S, U = y[g], dt = g === "y" ? "height" : "width", St = U + m[ue], Mt = U - m[le], Ot = [$, C].indexOf(b) !== -1, Wt = (Tt = j == null ? void 0 : j[g]) != null ? Tt : 0, Ht = Ot ? St : U - x[dt] - D[dt] - Wt + A.altAxis, Vt = Ot ? U + x[dt] + D[dt] - Wt - A.altAxis : Mt, Nt = u && Ot ? Te(Ht, U, Vt) : at(u ? Ht : St, U, u ? Vt : Mt);
703
- y[g] = Nt, M[g] = Nt - U;
701
+ var Me, lt = v === "x" ? $ : k, vt = v === "x" ? T : S, U = b[g], de = g === "y" ? "height" : "width", We = U + l[lt], He = U - l[vt], Oe = [$, k].indexOf(w) !== -1, Ve = (Me = B == null ? void 0 : B[g]) != null ? Me : 0, Ne = Oe ? We : U - E[de] - D[de] - Ve + A.altAxis, Fe = Oe ? U + E[de] + D[de] - Ve - A.altAxis : He, qe = p && Oe ? Rt(Ne, U, Fe) : ae(p ? Ne : We, U, p ? Fe : He);
702
+ b[g] = qe, M[g] = qe - U;
704
703
  }
705
- e.modifiersData[n] = M;
704
+ t.modifiersData[n] = M;
706
705
  }
707
706
  }
708
707
  const ur = {
709
708
  name: "preventOverflow",
710
709
  enabled: !0,
711
710
  phase: "main",
712
- fn: pr,
711
+ fn: cr,
713
712
  requiresIfExists: ["offset"]
714
713
  };
715
- function lr(t) {
714
+ function pr(e) {
716
715
  return {
717
- scrollLeft: t.scrollLeft,
718
- scrollTop: t.scrollTop
716
+ scrollLeft: e.scrollLeft,
717
+ scrollTop: e.scrollTop
719
718
  };
720
719
  }
721
- function vr(t) {
722
- return t === R(t) || !L(t) ? $t(t) : lr(t);
720
+ function lr(e) {
721
+ return e === L(e) || !R(e) ? Ce(e) : pr(e);
723
722
  }
724
- function dr(t) {
725
- var e = t.getBoundingClientRect(), r = Z(e.width) / t.offsetWidth || 1, n = Z(e.height) / t.offsetHeight || 1;
723
+ function vr(e) {
724
+ var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, n = Z(t.height) / e.offsetHeight || 1;
726
725
  return r !== 1 || n !== 1;
727
726
  }
728
- function mr(t, e, r) {
727
+ function dr(e, t, r) {
729
728
  r === void 0 && (r = !1);
730
- var n = L(e), a = L(e) && dr(e), i = q(e), c = _(t, a, r), s = {
729
+ var n = R(t), a = R(t) && vr(t), o = q(t), c = _(e, a, r), s = {
731
730
  scrollLeft: 0,
732
731
  scrollTop: 0
733
- }, o = {
732
+ }, i = {
734
733
  x: 0,
735
734
  y: 0
736
735
  };
737
- return (n || !n && !r) && ((V(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
738
- kt(i)) && (s = vr(e)), L(e) ? (o = _(e, !0), o.x += e.clientLeft, o.y += e.clientTop) : i && (o.x = Ct(i))), {
739
- x: c.left + s.scrollLeft - o.x,
740
- y: c.top + s.scrollTop - o.y,
736
+ return (n || !n && !r) && ((V(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
737
+ Re(o)) && (s = lr(t)), R(t) ? (i = _(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : o && (i.x = Le(o))), {
738
+ x: c.left + s.scrollLeft - i.x,
739
+ y: c.top + s.scrollTop - i.y,
741
740
  width: c.width,
742
741
  height: c.height
743
742
  };
744
743
  }
745
- function hr(t) {
746
- var e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
747
- t.forEach(function(i) {
748
- e.set(i.name, i);
744
+ function mr(e) {
745
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
746
+ e.forEach(function(o) {
747
+ t.set(o.name, o);
749
748
  });
750
- function a(i) {
751
- r.add(i.name);
752
- var c = [].concat(i.requires || [], i.requiresIfExists || []);
749
+ function a(o) {
750
+ r.add(o.name);
751
+ var c = [].concat(o.requires || [], o.requiresIfExists || []);
753
752
  c.forEach(function(s) {
754
753
  if (!r.has(s)) {
755
- var o = e.get(s);
756
- o && a(o);
754
+ var i = t.get(s);
755
+ i && a(i);
757
756
  }
758
- }), n.push(i);
757
+ }), n.push(o);
759
758
  }
760
- return t.forEach(function(i) {
761
- r.has(i.name) || a(i);
759
+ return e.forEach(function(o) {
760
+ r.has(o.name) || a(o);
762
761
  }), n;
763
762
  }
764
- function gr(t) {
765
- var e = hr(t);
766
- return Be.reduce(function(r, n) {
767
- return r.concat(e.filter(function(a) {
763
+ function hr(e) {
764
+ var t = mr(e);
765
+ return Bt.reduce(function(r, n) {
766
+ return r.concat(t.filter(function(a) {
768
767
  return a.phase === n;
769
768
  }));
770
769
  }, []);
771
770
  }
772
- function yr(t) {
773
- var e;
771
+ function yr(e) {
772
+ var t;
774
773
  return function() {
775
- return e || (e = new Promise(function(r) {
774
+ return t || (t = new Promise(function(r) {
776
775
  Promise.resolve().then(function() {
777
- e = void 0, r(t());
776
+ t = void 0, r(e());
778
777
  });
779
- })), e;
778
+ })), t;
780
779
  };
781
780
  }
782
- function br(t) {
783
- var e = t.reduce(function(r, n) {
781
+ function gr(e) {
782
+ var t = e.reduce(function(r, n) {
784
783
  var a = r[n.name];
785
784
  return r[n.name] = a ? Object.assign({}, a, n, {
786
785
  options: Object.assign({}, a.options, n.options),
787
786
  data: Object.assign({}, a.data, n.data)
788
787
  }) : n, r;
789
788
  }, {});
790
- return Object.keys(e).map(function(r) {
791
- return e[r];
789
+ return Object.keys(t).map(function(r) {
790
+ return t[r];
792
791
  });
793
792
  }
794
- var Jt = {
793
+ var Qe = {
795
794
  placement: "bottom",
796
795
  modifiers: [],
797
796
  strategy: "absolute"
798
797
  };
799
- function Qt() {
800
- for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
801
- e[r] = arguments[r];
802
- return !e.some(function(n) {
798
+ function Ze() {
799
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
800
+ t[r] = arguments[r];
801
+ return !t.some(function(n) {
803
802
  return !(n && typeof n.getBoundingClientRect == "function");
804
803
  });
805
804
  }
806
- function wr(t) {
807
- t === void 0 && (t = {});
808
- var e = t, r = e.defaultModifiers, n = r === void 0 ? [] : r, a = e.defaultOptions, i = a === void 0 ? Jt : a;
809
- return function(s, o, p) {
810
- p === void 0 && (p = i);
805
+ function br(e) {
806
+ e === void 0 && (e = {});
807
+ var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? Qe : a;
808
+ return function(s, i, u) {
809
+ u === void 0 && (u = o);
811
810
  var f = {
812
811
  placement: "bottom",
813
812
  orderedModifiers: [],
814
- options: Object.assign({}, Jt, i),
813
+ options: Object.assign({}, Qe, o),
815
814
  modifiersData: {},
816
815
  elements: {
817
816
  reference: s,
818
- popper: o
817
+ popper: i
819
818
  },
820
819
  attributes: {},
821
820
  styles: {}
822
- }, l = [], d = !1, u = {
821
+ }, d = [], h = !1, p = {
823
822
  state: f,
824
- setOptions: function(b) {
825
- var O = typeof b == "function" ? b(f.options) : b;
826
- h(), f.options = Object.assign({}, i, f.options, O), f.scrollParents = {
827
- reference: K(s) ? ot(s) : s.contextElement ? ot(s.contextElement) : [],
828
- popper: ot(o)
823
+ setOptions: function(w) {
824
+ var x = typeof w == "function" ? w(f.options) : w;
825
+ m(), f.options = Object.assign({}, o, f.options, x), f.scrollParents = {
826
+ reference: K(s) ? oe(s) : s.contextElement ? oe(s.contextElement) : [],
827
+ popper: oe(i)
829
828
  };
830
- var E = gr(br([].concat(n, f.options.modifiers)));
831
- return f.orderedModifiers = E.filter(function(v) {
829
+ var O = hr(gr([].concat(n, f.options.modifiers)));
830
+ return f.orderedModifiers = O.filter(function(v) {
832
831
  return v.enabled;
833
- }), w(), u.update();
832
+ }), y(), p.update();
834
833
  },
835
834
  // Sync update – it will always be executed, even if not necessary. This
836
835
  // is useful for low frequency updates where sync behavior simplifies the
@@ -838,12 +837,12 @@ function wr(t) {
838
837
  // For high frequency updates (e.g. `resize` and `scroll` events), always
839
838
  // prefer the async Popper#update method
840
839
  forceUpdate: function() {
841
- if (!d) {
842
- var b = f.elements, O = b.reference, E = b.popper;
843
- if (Qt(O, E)) {
840
+ if (!h) {
841
+ var w = f.elements, x = w.reference, O = w.popper;
842
+ if (Ze(x, O)) {
844
843
  f.rects = {
845
- reference: mr(O, ct(E), f.options.strategy === "fixed"),
846
- popper: jt(E)
844
+ reference: dr(x, ce(O), f.options.strategy === "fixed"),
845
+ popper: $e(O)
847
846
  }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(A) {
848
847
  return f.modifiersData[A.name] = Object.assign({}, A.data);
849
848
  });
@@ -852,12 +851,12 @@ function wr(t) {
852
851
  f.reset = !1, v = -1;
853
852
  continue;
854
853
  }
855
- var g = f.orderedModifiers[v], y = g.fn, x = g.options, D = x === void 0 ? {} : x, P = g.name;
856
- typeof y == "function" && (f = y({
854
+ var g = f.orderedModifiers[v], b = g.fn, E = g.options, D = E === void 0 ? {} : E, P = g.name;
855
+ typeof b == "function" && (f = b({
857
856
  state: f,
858
857
  options: D,
859
858
  name: P,
860
- instance: u
859
+ instance: p
861
860
  }) || f);
862
861
  }
863
862
  }
@@ -866,95 +865,132 @@ function wr(t) {
866
865
  // Async and optimistically optimized update – it will not be executed if
867
866
  // not necessary (debounced to run at most once-per-tick)
868
867
  update: yr(function() {
869
- return new Promise(function(m) {
870
- u.forceUpdate(), m(f);
868
+ return new Promise(function(l) {
869
+ p.forceUpdate(), l(f);
871
870
  });
872
871
  }),
873
872
  destroy: function() {
874
- h(), d = !0;
873
+ m(), h = !0;
875
874
  }
876
875
  };
877
- if (!Qt(s, o))
878
- return u;
879
- u.setOptions(p).then(function(m) {
880
- !d && p.onFirstUpdate && p.onFirstUpdate(m);
876
+ if (!Ze(s, i))
877
+ return p;
878
+ p.setOptions(u).then(function(l) {
879
+ !h && u.onFirstUpdate && u.onFirstUpdate(l);
881
880
  });
882
- function w() {
883
- f.orderedModifiers.forEach(function(m) {
884
- var b = m.name, O = m.options, E = O === void 0 ? {} : O, v = m.effect;
881
+ function y() {
882
+ f.orderedModifiers.forEach(function(l) {
883
+ var w = l.name, x = l.options, O = x === void 0 ? {} : x, v = l.effect;
885
884
  if (typeof v == "function") {
886
885
  var g = v({
887
886
  state: f,
888
- name: b,
889
- instance: u,
890
- options: E
891
- }), y = function() {
887
+ name: w,
888
+ instance: p,
889
+ options: O
890
+ }), b = function() {
892
891
  };
893
- l.push(g || y);
892
+ d.push(g || b);
894
893
  }
895
894
  });
896
895
  }
897
- function h() {
898
- l.forEach(function(m) {
899
- return m();
900
- }), l = [];
896
+ function m() {
897
+ d.forEach(function(l) {
898
+ return l();
899
+ }), d = [];
901
900
  }
902
- return u;
901
+ return p;
903
902
  };
904
903
  }
905
- var xr = [Ie, fr, qe, ke, ir, er, ur, He, nr], Or = /* @__PURE__ */ wr({
906
- defaultModifiers: xr
904
+ var wr = [Xt, sr, Ft, kt, or, er, ur, Wt, rr], xr = /* @__PURE__ */ br({
905
+ defaultModifiers: wr
907
906
  });
908
- const Br = ({
909
- triggerRef: t,
910
- children: e,
907
+ const Dr = ({
908
+ triggerRef: e,
909
+ children: t,
911
910
  className: r,
912
911
  open: n,
913
912
  onOpenChange: a,
914
- maxHeight: i,
913
+ maxHeight: o,
915
914
  options: c = {
916
915
  strategy: "absolute",
917
916
  placement: "bottom-start",
918
917
  modifiers: [
919
- { name: "preventOverflow", options: { padding: 8 } },
920
918
  {
921
- name: "flip",
919
+ name: "preventOverflow",
922
920
  options: {
923
- fallbackPlacements: ["right", "top"]
921
+ padding: 8,
922
+ boundary: "clippingParents",
923
+ rootBoundary: "viewport",
924
+ tether: !0
924
925
  }
925
- }
926
+ },
927
+ {
928
+ name: "flip",
929
+ options: { fallbackPlacements: ["right", "top"], altBoundary: !0 }
930
+ },
931
+ {
932
+ name: "computeStyles",
933
+ options: { adaptive: !1, gpuAcceleration: !1 }
934
+ },
935
+ { name: "eventListeners", enabled: !0 }
926
936
  ]
927
937
  },
928
938
  extraRefs: s = []
929
939
  }) => {
930
- const o = Ft(null), p = me(t, ...s), f = Ft(null);
931
- return qt(() => (n && (t != null && t.current) && (o != null && o.current) && (f.current = Or(
932
- t.current,
933
- o.current,
934
- {
940
+ const i = Ee(null), u = Ee(null), f = Ee(null);
941
+ return Ae(() => {
942
+ if (!n)
943
+ return;
944
+ const d = (e == null ? void 0 : e.current) ?? null, h = i.current ?? null;
945
+ if (!(!d || !h))
946
+ return u.current = xr(d, h, {
947
+ ...c,
948
+ modifiers: [
949
+ ...(c == null ? void 0 : c.modifiers) ?? [],
950
+ Xe(o),
951
+ { name: "eventListeners", enabled: !0 }
952
+ ]
953
+ }), f.current = new ResizeObserver(() => {
954
+ u.current && u.current.update();
955
+ }), f.current.observe(h), f.current.observe(d), requestAnimationFrame(() => {
956
+ u.current && u.current.update();
957
+ }), () => {
958
+ var p, y;
959
+ f.current && f.current.disconnect(), f.current = null, u.current && ((y = (p = u.current).destroy) == null || y.call(p)), u.current = null;
960
+ };
961
+ }, [n, e, o, c]), Ae(() => {
962
+ n && u.current && (u.current.setOptions((d) => ({
963
+ ...d,
935
964
  ...c,
936
965
  modifiers: [
937
- ...c.modifiers || [],
938
- he(i)
966
+ ...(c == null ? void 0 : c.modifiers) ?? [],
967
+ Xe(o),
968
+ { name: "eventListeners", enabled: !0 }
939
969
  ]
940
- }
941
- ), requestAnimationFrame(() => {
942
- var l;
943
- (l = f.current) == null || l.update();
944
- })), () => {
945
- var l, d;
946
- (d = (l = f.current) == null ? void 0 : l.destroy) == null || d.call(l), f.current = null;
947
- }), [n, t, i]), qt(() => {
948
- const l = (u) => {
949
- o.current && !o.current.contains(u.target) && !p.contains(u.target) && a(!1);
950
- }, d = (u) => {
951
- u.key === "Escape" && a(!1);
970
+ })), u.current.update());
971
+ }, [n, t, o, c]), Ae(() => {
972
+ if (!n)
973
+ return;
974
+ const d = () => {
975
+ const y = (e == null ? void 0 : e.current) ?? null, m = s.map((l) => (l == null ? void 0 : l.current) ?? null).filter(Boolean);
976
+ return { base: y, extras: m };
977
+ }, h = (y) => {
978
+ const m = y.target, l = i.current, { base: w, extras: x } = d(), O = !!(l && l.contains(m)), v = !!(w && w.contains(m));
979
+ let g = !1;
980
+ for (const b of x)
981
+ if (b.contains(m)) {
982
+ g = !0;
983
+ break;
984
+ }
985
+ !O && !v && !g && a(!1);
986
+ }, p = (y) => {
987
+ y.key === "Escape" && a(!1);
952
988
  };
953
- return n && (document.addEventListener("mousedown", l), document.addEventListener("keydown", d)), () => {
954
- document.removeEventListener("mousedown", l), document.removeEventListener("keydown", d);
989
+ return document.addEventListener("mousedown", h), document.addEventListener("keydown", p), () => {
990
+ document.removeEventListener("mousedown", h), document.removeEventListener("keydown", p);
955
991
  };
956
- }, [n, a, t]), n ? /* @__PURE__ */ ve("div", { ref: o, role: "dialog", className: de("gi-popover", r), children: e }) : null;
992
+ }, [n, a, e, s]), n ? /* @__PURE__ */ dt("div", { ref: i, role: "dialog", className: mt("gi-popover", r), children: t }) : null;
957
993
  };
958
994
  export {
959
- Br as Popover
995
+ Dr as Popover
960
996
  };