@kakadu/components 6.18.0 → 6.20.0

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 (39) hide show
  1. package/build/components/modal.js +1 -1
  2. package/build/components/modal.mjs +1 -1
  3. package/build/components/popover.js +1 -1
  4. package/build/components/popover.mjs +1 -1
  5. package/build/components/text-button.js +1 -1
  6. package/build/components/text-button.mjs +1 -1
  7. package/build/components.css +1 -1
  8. package/build/focus-trap-react-BVCKtGPy.js +9 -0
  9. package/build/{focus-trap-react-Df_V17Wb.mjs → focus-trap-react-C3mPpJGa.mjs} +469 -479
  10. package/build/hooks/use-local-storage.js +1 -1
  11. package/build/hooks/use-local-storage.mjs +29 -31
  12. package/build/hooks/use-session-storage.d.ts +3 -0
  13. package/build/hooks/use-session-storage.js +1 -0
  14. package/build/hooks/use-session-storage.mjs +72 -0
  15. package/build/icons/icon.d.ts +1 -1
  16. package/build/icons/icon.js +1 -1
  17. package/build/icons/icon.mjs +29 -27
  18. package/build/icons/trend-down.d.ts +2 -0
  19. package/build/icons/trend-down.js +1 -0
  20. package/build/icons/trend-down.mjs +27 -0
  21. package/build/icons/trend-up.js +1 -1
  22. package/build/icons/trend-up.mjs +13 -36
  23. package/build/index.d.ts +12 -0
  24. package/build/index.js +1 -1
  25. package/build/index.mjs +113 -101
  26. package/build/utilities/average.d.ts +1 -0
  27. package/build/utilities/average.js +1 -0
  28. package/build/utilities/average.mjs +7 -0
  29. package/build/utilities/is-number.d.ts +1 -0
  30. package/build/utilities/is-number.js +1 -0
  31. package/build/utilities/is-number.mjs +6 -0
  32. package/build/utilities/round.d.ts +1 -0
  33. package/build/utilities/round.js +1 -0
  34. package/build/utilities/round.mjs +7 -0
  35. package/build/utilities/sum.d.ts +1 -0
  36. package/build/utilities/sum.js +1 -0
  37. package/build/utilities/sum.mjs +6 -0
  38. package/package.json +13 -13
  39. package/build/focus-trap-react-4An60CdH.js +0 -9
@@ -1,65 +1,65 @@
1
1
  import Ee from "react";
2
- import { g as be } from "./_commonjsHelpers-MdHo5S7N.mjs";
2
+ import { g as ve } from "./_commonjsHelpers-MdHo5S7N.mjs";
3
3
  var Y = { exports: {} };
4
4
  /*!
5
- * tabbable 6.5.1
5
+ * tabbable 6.5.2
6
6
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
7
7
  */
8
- var pe = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "area[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], J = /* @__PURE__ */ pe.join(","), he = typeof Element > "u", M = he ? function() {
9
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Q = !he && Element.prototype.getRootNode ? function(i) {
10
- return i == null || i.getRootNode == null ? void 0 : i.getRootNode();
11
- } : function(i) {
12
- return i == null ? void 0 : i.ownerDocument;
13
- }, ee = function(e, t) {
8
+ var be = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "area[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], J = /* @__PURE__ */ be.join(","), pe = typeof Element > "u", M = pe ? function() {
9
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, he = !pe && Element.prototype.getRootNode ? function(n) {
10
+ return n == null || n.getRootNode == null ? void 0 : n.getRootNode();
11
+ } : function(n) {
12
+ return n == null ? void 0 : n.ownerDocument;
13
+ }, Q = function(e, t) {
14
14
  t === void 0 && (t = !0);
15
- var o = e == null || e.getAttribute == null ? void 0 : e.getAttribute("inert"), s = o === "" || o === "true", l = s || t && e && // closest does not exist on shadow roots, so we fall back to a manual
15
+ var o = e == null || e.getAttribute == null ? void 0 : e.getAttribute("inert"), c = o === "" || o === "true", f = c || t && e && // closest does not exist on shadow roots, so we fall back to a manual
16
16
  // lookup upward, in case it is not defined.
17
- (typeof e.closest == "function" ? e.closest("[inert]") : ee(e.parentNode));
18
- return l;
17
+ (typeof e.closest == "function" ? e.closest("[inert]") : Q(e.parentNode));
18
+ return f;
19
19
  }, Oe = function(e) {
20
20
  var t, o = e == null || e.getAttribute == null || (t = e.getAttribute("contenteditable")) == null ? void 0 : t.toLowerCase();
21
21
  return o === "" || o === "true" || o === "plaintext-only";
22
22
  }, ye = function(e, t, o) {
23
- if (ee(e))
23
+ if (Q(e))
24
24
  return [];
25
- var s = Array.prototype.slice.apply(e.querySelectorAll(J));
26
- return t && M.call(e, J) && s.unshift(e), s = s.filter(o), s;
27
- }, te = function(e, t, o) {
28
- for (var s = [], l = Array.from(e); l.length; ) {
29
- var a = l.shift();
30
- if (!ee(a, !1))
31
- if (a.tagName === "SLOT") {
32
- var y = a.assignedElements(), T = y.length ? y : a.children, E = te(T, !0, o);
33
- o.flatten ? s.push.apply(s, E) : s.push({
34
- scopeParent: a,
35
- candidates: E
25
+ var c = Array.prototype.slice.apply(e.querySelectorAll(J));
26
+ return t && M.call(e, J) && c.unshift(e), c = c.filter(o), c;
27
+ }, ee = function(e, t, o) {
28
+ for (var c = [], f = Array.from(e); f.length; ) {
29
+ var i = f.shift();
30
+ if (!Q(i, !1))
31
+ if (i.tagName === "SLOT") {
32
+ var g = i.assignedElements(), F = g.length ? g : i.children, k = ee(F, !0, o);
33
+ o.flatten ? c.push.apply(c, k) : c.push({
34
+ scopeParent: i,
35
+ candidates: k
36
36
  });
37
37
  } else {
38
- var k = M.call(a, J);
39
- k && o.filter(a) && (t || !e.includes(a)) && s.push(a);
40
- var D = a.shadowRoot || // check for an undisclosed shadow
41
- typeof o.getShadowRoot == "function" && o.getShadowRoot(a), N = !ee(D, !1) && (!o.shadowRootFilter || o.shadowRootFilter(a));
42
- if (D && N) {
43
- var _ = te(D === !0 ? a.children : D.children, !0, o);
44
- o.flatten ? s.push.apply(s, _) : s.push({
45
- scopeParent: a,
38
+ var D = M.call(i, J);
39
+ D && o.filter(i) && (t || !e.includes(i)) && c.push(i);
40
+ var O = i.shadowRoot || // check for an undisclosed shadow
41
+ typeof o.getShadowRoot == "function" && o.getShadowRoot(i), N = !Q(O, !1) && (!o.shadowRootFilter || o.shadowRootFilter(i));
42
+ if (O && N) {
43
+ var _ = ee(O === !0 ? i.children : O.children, !0, o);
44
+ o.flatten ? c.push.apply(c, _) : c.push({
45
+ scopeParent: i,
46
46
  candidates: _
47
47
  });
48
48
  } else
49
- l.unshift.apply(l, a.children);
49
+ f.unshift.apply(f, i.children);
50
50
  }
51
51
  }
52
- return s;
52
+ return c;
53
53
  }, me = function(e) {
54
54
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
55
55
  }, L = function(e) {
56
56
  if (!e)
57
57
  throw new Error("No node provided");
58
58
  return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Oe(e)) && !me(e) ? 0 : e.tabIndex;
59
- }, De = function(e, t) {
59
+ }, ke = function(e, t) {
60
60
  var o = L(e);
61
61
  return o < 0 && t && !me(e) ? 0 : o;
62
- }, ke = function(e, t) {
62
+ }, De = function(e, t) {
63
63
  return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
64
64
  }, ge = function(e) {
65
65
  return e.tagName === "INPUT";
@@ -77,40 +77,30 @@ var pe = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
77
77
  }, Ce = function(e) {
78
78
  if (!e.name)
79
79
  return !0;
80
- var t = e.form || Q(e), o = function(y) {
81
- return t.querySelectorAll('input[type="radio"][name="' + y + '"]');
82
- }, s;
80
+ var t = e.form || he(e), o = function(g) {
81
+ return t.querySelectorAll('input[type="radio"][name="' + g + '"]');
82
+ }, c;
83
83
  if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
84
- s = o(window.CSS.escape(e.name));
84
+ c = o(window.CSS.escape(e.name));
85
85
  else
86
86
  try {
87
- s = o(e.name);
88
- } catch (a) {
89
- return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1;
87
+ c = o(e.name);
88
+ } catch (i) {
89
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
90
90
  }
91
- var l = Pe(s, e.form);
92
- return !l || l === e;
91
+ var f = Pe(c, e.form);
92
+ return !f || f === e;
93
93
  }, Ae = function(e) {
94
94
  return ge(e) && e.type === "radio";
95
95
  }, Ie = function(e) {
96
96
  return Ae(e) && !Ce(e);
97
- }, _e = function(e) {
98
- var t, o = e && Q(e), s = (t = o) == null ? void 0 : t.host, l = !1;
99
- if (o && o !== e) {
100
- var a, y;
101
- for (l = !!((a = s) != null && (a = a.ownerDocument) != null && a.contains(s) || e != null && (y = e.ownerDocument) != null && y.contains(e)); !l && s; ) {
102
- var T, E;
103
- o = Q(s), s = (T = o) == null ? void 0 : T.host, l = !!((E = s) != null && (E = E.ownerDocument) != null && E.contains(s));
104
- }
105
- }
106
- return l;
107
- }, se = function(e) {
108
- var t = e.getBoundingClientRect(), o = t.width, s = t.height;
109
- return o === 0 && s === 0;
110
- }, je = function(e, t) {
111
- var o = t.displayCheck, s = t.getShadowRoot;
97
+ }, ue = function(e) {
98
+ var t = e.getBoundingClientRect(), o = t.width, c = t.height;
99
+ return o === 0 && c === 0;
100
+ }, _e = function(e, t) {
101
+ var o = t.displayCheck, c = t.getShadowRoot;
112
102
  if (o === "full-native" && "checkVisibility" in e) {
113
- var l = e.checkVisibility({
103
+ var f = e.checkVisibility({
114
104
  // Checking opacity might be desirable for some use cases, but natively,
115
105
  // opacity zero elements _are_ focusable and tabbable.
116
106
  checkOpacity: !1,
@@ -123,220 +113,220 @@ var pe = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
123
113
  // we include it anyway.
124
114
  checkVisibilityCSS: !0
125
115
  });
126
- return !l;
116
+ return !f;
127
117
  }
128
- var a = getComputedStyle(e), y = a.visibility;
129
- if (y === "hidden" || y === "collapse")
118
+ var i = getComputedStyle(e), g = i.visibility;
119
+ if (g === "hidden" || g === "collapse")
130
120
  return !0;
131
- var T = M.call(e, "details>summary:first-of-type"), E = T ? e.parentElement : e;
132
- if (M.call(E, "details:not([open]) *"))
121
+ var F = M.call(e, "details>summary:first-of-type"), k = F ? e.parentElement : e;
122
+ if (M.call(k, "details:not([open]) *"))
133
123
  return !0;
134
124
  if (!o || o === "full" || // full-native can run this branch when it falls through in case
135
125
  // Element#checkVisibility is unsupported
136
126
  o === "full-native" || o === "legacy-full") {
137
- if (typeof s == "function") {
138
- for (var k = e; e; ) {
139
- var D = e.parentElement, N = Q(e);
140
- if (D && !D.shadowRoot && s(D) === !0)
141
- return se(e);
142
- e.assignedSlot ? e = e.assignedSlot : !D && N !== e.ownerDocument ? e = N.host : e = D;
127
+ if (typeof c == "function") {
128
+ for (var D = e; e; ) {
129
+ var O = e.parentElement, N = he(e);
130
+ if (O && !O.shadowRoot && c(O) === !0)
131
+ return ue(e);
132
+ e.assignedSlot ? e = e.assignedSlot : !O && N !== e.ownerDocument ? e = N.host : e = O;
143
133
  }
144
- e = k;
134
+ e = D;
145
135
  }
146
- if (_e(e))
136
+ if (e.isConnected)
147
137
  return !e.getClientRects().length;
148
138
  if (o !== "legacy-full")
149
139
  return !0;
150
140
  } else if (o === "non-zero-area")
151
- return se(e);
141
+ return ue(e);
152
142
  return !1;
153
- }, xe = function(e) {
143
+ }, je = function(e) {
154
144
  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
155
145
  for (var t = e.parentElement; t; ) {
156
146
  if (t.tagName === "FIELDSET" && t.disabled) {
157
147
  for (var o = 0; o < t.children.length; o++) {
158
- var s = t.children.item(o);
159
- if (s.tagName === "LEGEND")
160
- return M.call(t, "fieldset[disabled] *") ? !0 : !s.contains(e);
148
+ var c = t.children.item(o);
149
+ if (c.tagName === "LEGEND")
150
+ return M.call(t, "fieldset[disabled] *") ? !0 : !c.contains(e);
161
151
  }
162
152
  return !0;
163
153
  }
164
154
  t = t.parentElement;
165
155
  }
166
156
  return !1;
167
- }, re = function(e, t) {
168
- return !(t.disabled || Ne(t) || je(t, e) || // For a details element with a summary, the summary element gets the focus
169
- Re(t) || xe(t));
170
- }, oe = function(e, t) {
171
- return !(Ie(t) || L(t) < 0 || !re(e, t));
172
- }, Le = function(e) {
157
+ }, te = function(e, t) {
158
+ return !(t.disabled || Ne(t) || _e(t, e) || // For a details element with a summary, the summary element gets the focus
159
+ Re(t) || je(t));
160
+ }, ie = function(e, t) {
161
+ return !(Ie(t) || L(t) < 0 || !te(e, t));
162
+ }, xe = function(e) {
173
163
  var t = parseInt(e.getAttribute("tabindex"), 10);
174
164
  return !!(isNaN(t) || t >= 0);
175
- }, we = function(e) {
165
+ }, Te = function(e) {
176
166
  var t = [], o = [];
177
- return e.forEach(function(s, l) {
178
- var a = !!s.scopeParent, y = a ? s.scopeParent : s, T = De(y, a), E = a ? we(s.candidates) : y;
179
- T === 0 ? a ? t.push.apply(t, E) : t.push(y) : o.push({
180
- documentOrder: l,
181
- tabIndex: T,
182
- item: s,
183
- isScope: a,
184
- content: E
167
+ return e.forEach(function(c, f) {
168
+ var i = !!c.scopeParent, g = i ? c.scopeParent : c, F = ke(g, i), k = i ? Te(c.candidates) : g;
169
+ F === 0 ? i ? t.push.apply(t, k) : t.push(g) : o.push({
170
+ documentOrder: f,
171
+ tabIndex: F,
172
+ item: c,
173
+ isScope: i,
174
+ content: k
185
175
  });
186
- }), o.sort(ke).reduce(function(s, l) {
187
- return l.isScope ? s.push.apply(s, l.content) : s.push(l.content), s;
176
+ }), o.sort(De).reduce(function(c, f) {
177
+ return f.isScope ? c.push.apply(c, f.content) : c.push(f.content), c;
188
178
  }, []).concat(t);
189
- }, Te = function(e, t) {
179
+ }, we = function(e, t) {
190
180
  t = t || {};
191
181
  var o;
192
- return t.getShadowRoot ? o = te([e], t.includeContainer, {
193
- filter: oe.bind(null, t),
182
+ return t.getShadowRoot ? o = ee([e], t.includeContainer, {
183
+ filter: ie.bind(null, t),
194
184
  flatten: !1,
195
185
  getShadowRoot: t.getShadowRoot,
196
- shadowRootFilter: Le
197
- }) : o = ye(e, t.includeContainer, oe.bind(null, t)), we(o);
186
+ shadowRootFilter: xe
187
+ }) : o = ye(e, t.includeContainer, ie.bind(null, t)), Te(o);
198
188
  }, Se = function(e, t) {
199
189
  t = t || {};
200
190
  var o;
201
- return t.getShadowRoot ? o = te([e], t.includeContainer, {
202
- filter: re.bind(null, t),
191
+ return t.getShadowRoot ? o = ee([e], t.includeContainer, {
192
+ filter: te.bind(null, t),
203
193
  flatten: !0,
204
194
  getShadowRoot: t.getShadowRoot
205
- }) : o = ye(e, t.includeContainer, re.bind(null, t)), o;
195
+ }) : o = ye(e, t.includeContainer, te.bind(null, t)), o;
206
196
  }, K = function(e, t) {
207
197
  if (t = t || {}, !e)
208
198
  throw new Error("No node provided");
209
- return M.call(e, J) === !1 ? !1 : oe(t, e);
210
- }, Be = /* @__PURE__ */ pe.concat("iframe:not([inert]):not([inert] *)").join(","), X = function(e, t) {
199
+ return M.call(e, J) === !1 ? !1 : ie(t, e);
200
+ }, Le = /* @__PURE__ */ be.concat("iframe:not([inert]):not([inert] *)").join(","), X = function(e, t) {
211
201
  if (t = t || {}, !e)
212
202
  throw new Error("No node provided");
213
- return M.call(e, Be) === !1 ? !1 : re(t, e);
203
+ return M.call(e, Le) === !1 ? !1 : te(t, e);
214
204
  };
215
- const Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
205
+ const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
216
206
  __proto__: null,
217
207
  focusable: Se,
218
208
  getTabIndex: L,
219
209
  isFocusable: X,
220
210
  isTabbable: K,
221
- tabbable: Te
211
+ tabbable: we
222
212
  }, Symbol.toStringTag, { value: "Module" }));
223
213
  /*!
224
214
  * focus-trap 7.8.0
225
215
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
226
216
  */
227
- function ue(i, e) {
228
- (e == null || e > i.length) && (e = i.length);
229
- for (var t = 0, o = Array(e); t < e; t++) o[t] = i[t];
217
+ function oe(n, e) {
218
+ (e == null || e > n.length) && (e = n.length);
219
+ for (var t = 0, o = Array(e); t < e; t++) o[t] = n[t];
230
220
  return o;
231
221
  }
232
- function Me(i) {
233
- if (Array.isArray(i)) return ue(i);
222
+ function Ke(n) {
223
+ if (Array.isArray(n)) return oe(n);
234
224
  }
235
- function ce(i, e) {
236
- var t = typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
225
+ function se(n, e) {
226
+ var t = typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
237
227
  if (!t) {
238
- if (Array.isArray(i) || (t = Fe(i)) || e) {
239
- t && (i = t);
240
- var o = 0, s = function() {
228
+ if (Array.isArray(n) || (t = Fe(n)) || e) {
229
+ t && (n = t);
230
+ var o = 0, c = function() {
241
231
  };
242
232
  return {
243
- s,
233
+ s: c,
244
234
  n: function() {
245
- return o >= i.length ? {
235
+ return o >= n.length ? {
246
236
  done: !0
247
237
  } : {
248
238
  done: !1,
249
- value: i[o++]
239
+ value: n[o++]
250
240
  };
251
241
  },
252
- e: function(T) {
253
- throw T;
242
+ e: function(F) {
243
+ throw F;
254
244
  },
255
- f: s
245
+ f: c
256
246
  };
257
247
  }
258
248
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
259
249
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
260
250
  }
261
- var l, a = !0, y = !1;
251
+ var f, i = !0, g = !1;
262
252
  return {
263
253
  s: function() {
264
- t = t.call(i);
254
+ t = t.call(n);
265
255
  },
266
256
  n: function() {
267
- var T = t.next();
268
- return a = T.done, T;
257
+ var F = t.next();
258
+ return i = F.done, F;
269
259
  },
270
- e: function(T) {
271
- y = !0, l = T;
260
+ e: function(F) {
261
+ g = !0, f = F;
272
262
  },
273
263
  f: function() {
274
264
  try {
275
- a || t.return == null || t.return();
265
+ i || t.return == null || t.return();
276
266
  } finally {
277
- if (y) throw l;
267
+ if (g) throw f;
278
268
  }
279
269
  }
280
270
  };
281
271
  }
282
- function qe(i, e, t) {
283
- return (e = We(e)) in i ? Object.defineProperty(i, e, {
272
+ function Me(n, e, t) {
273
+ return (e = Ge(e)) in n ? Object.defineProperty(n, e, {
284
274
  value: t,
285
275
  enumerable: !0,
286
276
  configurable: !0,
287
277
  writable: !0
288
- }) : i[e] = t, i;
278
+ }) : n[e] = t, n;
289
279
  }
290
- function $e(i) {
291
- if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
280
+ function qe(n) {
281
+ if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
292
282
  }
293
- function Ve() {
283
+ function $e() {
294
284
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
295
285
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
296
286
  }
297
- function le(i, e) {
298
- var t = Object.keys(i);
287
+ function ce(n, e) {
288
+ var t = Object.keys(n);
299
289
  if (Object.getOwnPropertySymbols) {
300
- var o = Object.getOwnPropertySymbols(i);
301
- e && (o = o.filter(function(s) {
302
- return Object.getOwnPropertyDescriptor(i, s).enumerable;
290
+ var o = Object.getOwnPropertySymbols(n);
291
+ e && (o = o.filter(function(c) {
292
+ return Object.getOwnPropertyDescriptor(n, c).enumerable;
303
293
  })), t.push.apply(t, o);
304
294
  }
305
295
  return t;
306
296
  }
307
- function fe(i) {
297
+ function le(n) {
308
298
  for (var e = 1; e < arguments.length; e++) {
309
299
  var t = arguments[e] != null ? arguments[e] : {};
310
- e % 2 ? le(Object(t), !0).forEach(function(o) {
311
- qe(i, o, t[o]);
312
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : le(Object(t)).forEach(function(o) {
313
- Object.defineProperty(i, o, Object.getOwnPropertyDescriptor(t, o));
300
+ e % 2 ? ce(Object(t), !0).forEach(function(o) {
301
+ Me(n, o, t[o]);
302
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : ce(Object(t)).forEach(function(o) {
303
+ Object.defineProperty(n, o, Object.getOwnPropertyDescriptor(t, o));
314
304
  });
315
305
  }
316
- return i;
306
+ return n;
317
307
  }
318
- function Ge(i) {
319
- return Me(i) || $e(i) || Fe(i) || Ve();
308
+ function He(n) {
309
+ return Ke(n) || qe(n) || Fe(n) || $e();
320
310
  }
321
- function Ue(i, e) {
322
- if (typeof i != "object" || !i) return i;
323
- var t = i[Symbol.toPrimitive];
311
+ function Ve(n, e) {
312
+ if (typeof n != "object" || !n) return n;
313
+ var t = n[Symbol.toPrimitive];
324
314
  if (t !== void 0) {
325
- var o = t.call(i, e);
315
+ var o = t.call(n, e);
326
316
  if (typeof o != "object") return o;
327
317
  throw new TypeError("@@toPrimitive must return a primitive value.");
328
318
  }
329
- return (e === "string" ? String : Number)(i);
319
+ return (e === "string" ? String : Number)(n);
330
320
  }
331
- function We(i) {
332
- var e = Ue(i, "string");
321
+ function Ge(n) {
322
+ var e = Ve(n, "string");
333
323
  return typeof e == "symbol" ? e : e + "";
334
324
  }
335
- function Fe(i, e) {
336
- if (i) {
337
- if (typeof i == "string") return ue(i, e);
338
- var t = {}.toString.call(i).slice(8, -1);
339
- return t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set" ? Array.from(i) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ue(i, e) : void 0;
325
+ function Fe(n, e) {
326
+ if (n) {
327
+ if (typeof n == "string") return oe(n, e);
328
+ var t = {}.toString.call(n).slice(8, -1);
329
+ return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? oe(n, e) : void 0;
340
330
  }
341
331
  }
342
332
  var I = {
@@ -348,8 +338,8 @@ var I = {
348
338
  activateTrap: function(e, t) {
349
339
  var o = I.getActiveTrap(e);
350
340
  t !== o && I.pauseTrap(e);
351
- var s = e.indexOf(t);
352
- s === -1 || e.splice(s, 1), e.push(t);
341
+ var c = e.indexOf(t);
342
+ c === -1 || e.splice(c, 1), e.push(t);
353
343
  },
354
344
  // Removes the trap from the top of the stack, then unpauses the next trap down.
355
345
  deactivateTrap: function(e, t) {
@@ -366,33 +356,33 @@ var I = {
366
356
  var t = I.getActiveTrap(e);
367
357
  t && !t._isManuallyPaused() && t._setPausedState(!1);
368
358
  }
369
- }, ze = function(e) {
359
+ }, Ue = function(e) {
370
360
  return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
371
- }, He = function(e) {
361
+ }, We = function(e) {
372
362
  return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
373
- }, G = function(e) {
363
+ }, V = function(e) {
374
364
  return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
365
+ }, ze = function(e) {
366
+ return V(e) && !e.shiftKey;
375
367
  }, Ye = function(e) {
376
- return G(e) && !e.shiftKey;
377
- }, Ze = function(e) {
378
- return G(e) && e.shiftKey;
379
- }, de = function(e) {
368
+ return V(e) && e.shiftKey;
369
+ }, fe = function(e) {
380
370
  return setTimeout(e, 0);
381
- }, V = function(e) {
382
- for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
383
- o[s - 1] = arguments[s];
371
+ }, H = function(e) {
372
+ for (var t = arguments.length, o = new Array(t > 1 ? t - 1 : 0), c = 1; c < t; c++)
373
+ o[c - 1] = arguments[c];
384
374
  return typeof e == "function" ? e.apply(void 0, o) : e;
385
375
  }, Z = function(e) {
386
376
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
387
- }, Xe = [], Je = function(e, t) {
388
- var o = (t == null ? void 0 : t.document) || document, s = (t == null ? void 0 : t.trapStack) || Xe, l = fe({
377
+ }, Ze = [], Xe = function(e, t) {
378
+ var o = (t == null ? void 0 : t.document) || document, c = (t == null ? void 0 : t.trapStack) || Ze, f = le({
389
379
  returnFocusOnDeactivate: !0,
390
380
  escapeDeactivates: !0,
391
381
  delayInitialFocus: !0,
392
382
  isolateSubtrees: !1,
393
- isKeyForward: Ye,
394
- isKeyBackward: Ze
395
- }, t), a = {
383
+ isKeyForward: ze,
384
+ isKeyBackward: Ye
385
+ }, t), i = {
396
386
  // containers given to createFocusTrap()
397
387
  /** @type {Array<HTMLElement>} */
398
388
  containers: [],
@@ -436,70 +426,70 @@ var I = {
436
426
  delayInitialFocusTimer: void 0,
437
427
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
438
428
  recentNavEvent: void 0
439
- }, y, T = function(n, r, c) {
440
- return n && n[r] !== void 0 ? n[r] : l[c || r];
441
- }, E = function(n, r) {
442
- var c = typeof (r == null ? void 0 : r.composedPath) == "function" ? r.composedPath() : void 0;
443
- return a.containerGroups.findIndex(function(h) {
444
- var p = h.container, g = h.tabbableNodes;
445
- return p.contains(n) || // fall back to explicit tabbable search which will take into consideration any
429
+ }, g, F = function(a, r, s) {
430
+ return a && a[r] !== void 0 ? a[r] : f[s || r];
431
+ }, k = function(a, r) {
432
+ var s = typeof (r == null ? void 0 : r.composedPath) == "function" ? r.composedPath() : void 0;
433
+ return i.containerGroups.findIndex(function(h) {
434
+ var p = h.container, m = h.tabbableNodes;
435
+ return p.contains(a) || // fall back to explicit tabbable search which will take into consideration any
446
436
  // web components if the `tabbableOptions.getShadowRoot` option was used for
447
437
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
448
438
  // look inside web components even if open)
449
- (c == null ? void 0 : c.includes(p)) || g.find(function(v) {
450
- return v === n;
439
+ (s == null ? void 0 : s.includes(p)) || m.find(function(v) {
440
+ return v === a;
451
441
  });
452
442
  });
453
- }, k = function(n) {
454
- var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = r.hasFallback, h = c === void 0 ? !1 : c, p = r.params, g = p === void 0 ? [] : p, v = l[n];
455
- if (typeof v == "function" && (v = v.apply(void 0, Ge(g))), v === !0 && (v = void 0), !v) {
443
+ }, D = function(a) {
444
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = r.hasFallback, h = s === void 0 ? !1 : s, p = r.params, m = p === void 0 ? [] : p, v = f[a];
445
+ if (typeof v == "function" && (v = v.apply(void 0, He(m))), v === !0 && (v = void 0), !v) {
456
446
  if (v === void 0 || v === !1)
457
447
  return v;
458
- throw new Error("`".concat(n, "` was specified but was not a node, or did not return a node"));
448
+ throw new Error("`".concat(a, "` was specified but was not a node, or did not return a node"));
459
449
  }
460
- var S = v;
450
+ var w = v;
461
451
  if (typeof v == "string") {
462
452
  try {
463
- S = o.querySelector(v);
464
- } catch (F) {
465
- throw new Error("`".concat(n, '` appears to be an invalid selector; error="').concat(F.message, '"'));
453
+ w = o.querySelector(v);
454
+ } catch (S) {
455
+ throw new Error("`".concat(a, '` appears to be an invalid selector; error="').concat(S.message, '"'));
466
456
  }
467
- if (!S && !h)
468
- throw new Error("`".concat(n, "` as selector refers to no known node"));
457
+ if (!w && !h)
458
+ throw new Error("`".concat(a, "` as selector refers to no known node"));
469
459
  }
470
- return S;
471
- }, D = function() {
472
- var n = k("initialFocus", {
460
+ return w;
461
+ }, O = function() {
462
+ var a = D("initialFocus", {
473
463
  hasFallback: !0
474
464
  });
475
- if (n === !1)
465
+ if (a === !1)
476
466
  return !1;
477
- if (n === void 0 || n && !X(n, l.tabbableOptions))
478
- if (E(o.activeElement) >= 0)
479
- n = o.activeElement;
467
+ if (a === void 0 || a && !X(a, f.tabbableOptions))
468
+ if (k(o.activeElement) >= 0)
469
+ a = o.activeElement;
480
470
  else {
481
- var r = a.tabbableGroups[0], c = r && r.firstTabbableNode;
482
- n = c || k("fallbackFocus");
471
+ var r = i.tabbableGroups[0], s = r && r.firstTabbableNode;
472
+ a = s || D("fallbackFocus");
483
473
  }
484
- else n === null && (n = k("fallbackFocus"));
485
- if (!n)
474
+ else a === null && (a = D("fallbackFocus"));
475
+ if (!a)
486
476
  throw new Error("Your focus-trap needs to have at least one focusable element");
487
- return n;
477
+ return a;
488
478
  }, N = function() {
489
- if (a.containerGroups = a.containers.map(function(n) {
490
- var r = Te(n, l.tabbableOptions), c = Se(n, l.tabbableOptions), h = r.length > 0 ? r[0] : void 0, p = r.length > 0 ? r[r.length - 1] : void 0, g = c.find(function(F) {
491
- return K(F);
492
- }), v = c.slice().reverse().find(function(F) {
493
- return K(F);
494
- }), S = !!r.find(function(F) {
495
- return L(F) > 0;
479
+ if (i.containerGroups = i.containers.map(function(a) {
480
+ var r = we(a, f.tabbableOptions), s = Se(a, f.tabbableOptions), h = r.length > 0 ? r[0] : void 0, p = r.length > 0 ? r[r.length - 1] : void 0, m = s.find(function(S) {
481
+ return K(S);
482
+ }), v = s.slice().reverse().find(function(S) {
483
+ return K(S);
484
+ }), w = !!r.find(function(S) {
485
+ return L(S) > 0;
496
486
  });
497
487
  return {
498
- container: n,
488
+ container: a,
499
489
  tabbableNodes: r,
500
- focusableNodes: c,
490
+ focusableNodes: s,
501
491
  /** True if at least one node with positive `tabindex` was found in this container. */
502
- posTabIndexesFound: S,
492
+ posTabIndexesFound: w,
503
493
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
504
494
  firstTabbableNode: h,
505
495
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
@@ -512,7 +502,7 @@ var I = {
512
502
  // "close enough most of the time" alternative for positive tabindexes which should generally
513
503
  // be avoided anyway...
514
504
  /** First tabbable node in container, __DOM__ order; `undefined` if none. */
515
- firstDomTabbableNode: g,
505
+ firstDomTabbableNode: m,
516
506
  /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
517
507
  lastDomTabbableNode: v,
518
508
  /**
@@ -525,106 +515,106 @@ var I = {
525
515
  */
526
516
  nextTabbableNode: function(R) {
527
517
  var A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, C = r.indexOf(R);
528
- return C < 0 ? A ? c.slice(c.indexOf(R) + 1).find(function(B) {
518
+ return C < 0 ? A ? s.slice(s.indexOf(R) + 1).find(function(B) {
529
519
  return K(B);
530
- }) : c.slice(0, c.indexOf(R)).reverse().find(function(B) {
520
+ }) : s.slice(0, s.indexOf(R)).reverse().find(function(B) {
531
521
  return K(B);
532
522
  }) : r[C + (A ? 1 : -1)];
533
523
  }
534
524
  };
535
- }), a.tabbableGroups = a.containerGroups.filter(function(n) {
536
- return n.tabbableNodes.length > 0;
537
- }), a.tabbableGroups.length <= 0 && !k("fallbackFocus"))
525
+ }), i.tabbableGroups = i.containerGroups.filter(function(a) {
526
+ return a.tabbableNodes.length > 0;
527
+ }), i.tabbableGroups.length <= 0 && !D("fallbackFocus"))
538
528
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
539
- if (a.containerGroups.find(function(n) {
540
- return n.posTabIndexesFound;
541
- }) && a.containerGroups.length > 1)
529
+ if (i.containerGroups.find(function(a) {
530
+ return a.posTabIndexesFound;
531
+ }) && i.containerGroups.length > 1)
542
532
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
543
- }, _ = function(n) {
544
- var r = n.activeElement;
533
+ }, _ = function(a) {
534
+ var r = a.activeElement;
545
535
  if (r)
546
536
  return r.shadowRoot && r.shadowRoot.activeElement !== null ? _(r.shadowRoot) : r;
547
- }, P = function(n) {
548
- if (n !== !1 && n !== _(document)) {
549
- if (!n || !n.focus) {
550
- P(D());
537
+ }, P = function(a) {
538
+ if (a !== !1 && a !== _(document)) {
539
+ if (!a || !a.focus) {
540
+ P(O());
551
541
  return;
552
542
  }
553
- n.focus({
554
- preventScroll: !!l.preventScroll
555
- }), a.mostRecentlyFocusedNode = n, ze(n) && n.select();
543
+ a.focus({
544
+ preventScroll: !!f.preventScroll
545
+ }), i.mostRecentlyFocusedNode = a, Ue(a) && a.select();
556
546
  }
557
- }, U = function(n) {
558
- var r = k("setReturnFocus", {
559
- params: [n]
547
+ }, G = function(a) {
548
+ var r = D("setReturnFocus", {
549
+ params: [a]
560
550
  });
561
- return r || (r === !1 ? !1 : n);
562
- }, j = function(n) {
563
- var r = n.target, c = n.event, h = n.isBackward, p = h === void 0 ? !1 : h;
564
- r = r || Z(c), N();
565
- var g = null;
566
- if (a.tabbableGroups.length > 0) {
567
- var v = E(r, c), S = v >= 0 ? a.containerGroups[v] : void 0;
551
+ return r || (r === !1 ? !1 : a);
552
+ }, j = function(a) {
553
+ var r = a.target, s = a.event, h = a.isBackward, p = h === void 0 ? !1 : h;
554
+ r = r || Z(s), N();
555
+ var m = null;
556
+ if (i.tabbableGroups.length > 0) {
557
+ var v = k(r, s), w = v >= 0 ? i.containerGroups[v] : void 0;
568
558
  if (v < 0)
569
- p ? g = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : g = a.tabbableGroups[0].firstTabbableNode;
559
+ p ? m = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : m = i.tabbableGroups[0].firstTabbableNode;
570
560
  else if (p) {
571
- var F = a.tabbableGroups.findIndex(function(ne) {
572
- var ie = ne.firstTabbableNode;
573
- return r === ie;
561
+ var S = i.tabbableGroups.findIndex(function(ae) {
562
+ var ne = ae.firstTabbableNode;
563
+ return r === ne;
574
564
  });
575
- if (F < 0 && (S.container === r || X(r, l.tabbableOptions) && !K(r, l.tabbableOptions) && !S.nextTabbableNode(r, !1)) && (F = v), F >= 0) {
576
- var R = F === 0 ? a.tabbableGroups.length - 1 : F - 1, A = a.tabbableGroups[R];
577
- g = L(r) >= 0 ? A.lastTabbableNode : A.lastDomTabbableNode;
578
- } else G(c) || (g = S.nextTabbableNode(r, !1));
565
+ if (S < 0 && (w.container === r || X(r, f.tabbableOptions) && !K(r, f.tabbableOptions) && !w.nextTabbableNode(r, !1)) && (S = v), S >= 0) {
566
+ var R = S === 0 ? i.tabbableGroups.length - 1 : S - 1, A = i.tabbableGroups[R];
567
+ m = L(r) >= 0 ? A.lastTabbableNode : A.lastDomTabbableNode;
568
+ } else V(s) || (m = w.nextTabbableNode(r, !1));
579
569
  } else {
580
- var C = a.tabbableGroups.findIndex(function(ne) {
581
- var ie = ne.lastTabbableNode;
582
- return r === ie;
570
+ var C = i.tabbableGroups.findIndex(function(ae) {
571
+ var ne = ae.lastTabbableNode;
572
+ return r === ne;
583
573
  });
584
- if (C < 0 && (S.container === r || X(r, l.tabbableOptions) && !K(r, l.tabbableOptions) && !S.nextTabbableNode(r)) && (C = v), C >= 0) {
585
- var B = C === a.tabbableGroups.length - 1 ? 0 : C + 1, x = a.tabbableGroups[B];
586
- g = L(r) >= 0 ? x.firstTabbableNode : x.firstDomTabbableNode;
587
- } else G(c) || (g = S.nextTabbableNode(r));
574
+ if (C < 0 && (w.container === r || X(r, f.tabbableOptions) && !K(r, f.tabbableOptions) && !w.nextTabbableNode(r)) && (C = v), C >= 0) {
575
+ var B = C === i.tabbableGroups.length - 1 ? 0 : C + 1, x = i.tabbableGroups[B];
576
+ m = L(r) >= 0 ? x.firstTabbableNode : x.firstDomTabbableNode;
577
+ } else V(s) || (m = w.nextTabbableNode(r));
588
578
  }
589
579
  } else
590
- g = k("fallbackFocus");
591
- return g;
592
- }, q = function(n) {
593
- var r = Z(n);
594
- if (!(E(r, n) >= 0)) {
595
- if (V(l.clickOutsideDeactivates, n)) {
596
- y.deactivate({
580
+ m = D("fallbackFocus");
581
+ return m;
582
+ }, q = function(a) {
583
+ var r = Z(a);
584
+ if (!(k(r, a) >= 0)) {
585
+ if (H(f.clickOutsideDeactivates, a)) {
586
+ g.deactivate({
597
587
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
598
588
  // which will result in the outside click setting focus to the node
599
589
  // that was clicked (and if not focusable, to "nothing"); by setting
600
590
  // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
601
591
  // on activation (or the configured `setReturnFocus` node), whether the
602
592
  // outside click was on a focusable node or not
603
- returnFocus: l.returnFocusOnDeactivate
593
+ returnFocus: f.returnFocusOnDeactivate
604
594
  });
605
595
  return;
606
596
  }
607
- V(l.allowOutsideClick, n) || n.preventDefault();
597
+ H(f.allowOutsideClick, a) || a.preventDefault();
608
598
  }
609
- }, W = function(n) {
610
- var r = Z(n), c = E(r, n) >= 0;
611
- if (c || r instanceof Document)
612
- c && (a.mostRecentlyFocusedNode = r);
599
+ }, U = function(a) {
600
+ var r = Z(a), s = k(r, a) >= 0;
601
+ if (s || r instanceof Document)
602
+ s && (i.mostRecentlyFocusedNode = r);
613
603
  else {
614
- n.stopImmediatePropagation();
604
+ a.stopImmediatePropagation();
615
605
  var h, p = !0;
616
- if (a.mostRecentlyFocusedNode)
617
- if (L(a.mostRecentlyFocusedNode) > 0) {
618
- var g = E(a.mostRecentlyFocusedNode), v = a.containerGroups[g].tabbableNodes;
606
+ if (i.mostRecentlyFocusedNode)
607
+ if (L(i.mostRecentlyFocusedNode) > 0) {
608
+ var m = k(i.mostRecentlyFocusedNode), v = i.containerGroups[m].tabbableNodes;
619
609
  if (v.length > 0) {
620
- var S = v.findIndex(function(F) {
621
- return F === a.mostRecentlyFocusedNode;
610
+ var w = v.findIndex(function(S) {
611
+ return S === i.mostRecentlyFocusedNode;
622
612
  });
623
- S >= 0 && (l.isKeyForward(a.recentNavEvent) ? S + 1 < v.length && (h = v[S + 1], p = !1) : S - 1 >= 0 && (h = v[S - 1], p = !1));
613
+ w >= 0 && (f.isKeyForward(i.recentNavEvent) ? w + 1 < v.length && (h = v[w + 1], p = !1) : w - 1 >= 0 && (h = v[w - 1], p = !1));
624
614
  }
625
615
  } else
626
- a.containerGroups.some(function(F) {
627
- return F.tabbableNodes.some(function(R) {
616
+ i.containerGroups.some(function(S) {
617
+ return S.tabbableNodes.some(function(R) {
628
618
  return L(R) > 0;
629
619
  });
630
620
  }) || (p = !1);
@@ -633,31 +623,31 @@ var I = {
633
623
  p && (h = j({
634
624
  // move FROM the MRU node, not event-related node (which will be the node that is
635
625
  // outside the trap causing the focus escape we're trying to fix)
636
- target: a.mostRecentlyFocusedNode,
637
- isBackward: l.isKeyBackward(a.recentNavEvent)
638
- })), P(h || a.mostRecentlyFocusedNode || D());
626
+ target: i.mostRecentlyFocusedNode,
627
+ isBackward: f.isKeyBackward(i.recentNavEvent)
628
+ })), P(h || i.mostRecentlyFocusedNode || O());
639
629
  }
640
- a.recentNavEvent = void 0;
641
- }, ae = function(n) {
630
+ i.recentNavEvent = void 0;
631
+ }, re = function(a) {
642
632
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
643
- a.recentNavEvent = n;
644
- var c = j({
645
- event: n,
633
+ i.recentNavEvent = a;
634
+ var s = j({
635
+ event: a,
646
636
  isBackward: r
647
637
  });
648
- c && (G(n) && n.preventDefault(), P(c));
649
- }, z = function(n) {
650
- (l.isKeyForward(n) || l.isKeyBackward(n)) && ae(n, l.isKeyBackward(n));
651
- }, H = function(n) {
652
- He(n) && V(l.escapeDeactivates, n) !== !1 && (n.preventDefault(), y.deactivate());
653
- }, $ = function(n) {
654
- var r = Z(n);
655
- E(r, n) >= 0 || V(l.clickOutsideDeactivates, n) || V(l.allowOutsideClick, n) || (n.preventDefault(), n.stopImmediatePropagation());
638
+ s && (V(a) && a.preventDefault(), P(s));
639
+ }, W = function(a) {
640
+ (f.isKeyForward(a) || f.isKeyBackward(a)) && re(a, f.isKeyBackward(a));
641
+ }, z = function(a) {
642
+ We(a) && H(f.escapeDeactivates, a) !== !1 && (a.preventDefault(), g.deactivate());
643
+ }, $ = function(a) {
644
+ var r = Z(a);
645
+ k(r, a) >= 0 || H(f.clickOutsideDeactivates, a) || H(f.allowOutsideClick, a) || (a.preventDefault(), a.stopImmediatePropagation());
656
646
  }, d = function() {
657
- if (a.active)
658
- return I.activateTrap(s, y), a.delayInitialFocusTimer = l.delayInitialFocus ? de(function() {
659
- P(D());
660
- }) : P(D()), o.addEventListener("focusin", W, !0), o.addEventListener("mousedown", q, {
647
+ if (i.active)
648
+ return I.activateTrap(c, g), i.delayInitialFocusTimer = f.delayInitialFocus ? fe(function() {
649
+ P(O());
650
+ }) : P(O()), o.addEventListener("focusin", U, !0), o.addEventListener("mousedown", q, {
661
651
  capture: !0,
662
652
  passive: !1
663
653
  }), o.addEventListener("touchstart", q, {
@@ -666,33 +656,33 @@ var I = {
666
656
  }), o.addEventListener("click", $, {
667
657
  capture: !0,
668
658
  passive: !1
669
- }), o.addEventListener("keydown", z, {
659
+ }), o.addEventListener("keydown", W, {
670
660
  capture: !0,
671
661
  passive: !1
672
- }), o.addEventListener("keydown", H), y;
673
- }, f = function(n) {
674
- a.active && !a.paused && y._setSubtreeIsolation(!1), a.adjacentElements.clear(), a.alreadySilent.clear();
675
- var r = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), h = ce(n), p;
662
+ }), o.addEventListener("keydown", z), g;
663
+ }, l = function(a) {
664
+ i.active && !i.paused && g._setSubtreeIsolation(!1), i.adjacentElements.clear(), i.alreadySilent.clear();
665
+ var r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), h = se(a), p;
676
666
  try {
677
667
  for (h.s(); !(p = h.n()).done; ) {
678
- var g = p.value;
679
- r.add(g);
680
- for (var v = typeof ShadowRoot < "u" && g.getRootNode() instanceof ShadowRoot, S = g; S; ) {
681
- r.add(S);
682
- var F = S.parentElement, R = [];
683
- F ? R = F.children : !F && v && (R = S.getRootNode().children, F = S.getRootNode().host, v = typeof ShadowRoot < "u" && F.getRootNode() instanceof ShadowRoot);
684
- var A = ce(R), C;
668
+ var m = p.value;
669
+ r.add(m);
670
+ for (var v = typeof ShadowRoot < "u" && m.getRootNode() instanceof ShadowRoot, w = m; w; ) {
671
+ r.add(w);
672
+ var S = w.parentElement, R = [];
673
+ S ? R = S.children : !S && v && (R = w.getRootNode().children, S = w.getRootNode().host, v = typeof ShadowRoot < "u" && S.getRootNode() instanceof ShadowRoot);
674
+ var A = se(R), C;
685
675
  try {
686
676
  for (A.s(); !(C = A.n()).done; ) {
687
677
  var B = C.value;
688
- c.add(B);
678
+ s.add(B);
689
679
  }
690
680
  } catch (x) {
691
681
  A.e(x);
692
682
  } finally {
693
683
  A.f();
694
684
  }
695
- S = F;
685
+ w = S;
696
686
  }
697
687
  }
698
688
  } catch (x) {
@@ -701,123 +691,123 @@ var I = {
701
691
  h.f();
702
692
  }
703
693
  r.forEach(function(x) {
704
- c.delete(x);
705
- }), a.adjacentElements = c;
706
- }, m = function() {
707
- if (a.active)
708
- return o.removeEventListener("focusin", W, !0), o.removeEventListener("mousedown", q, !0), o.removeEventListener("touchstart", q, !0), o.removeEventListener("click", $, !0), o.removeEventListener("keydown", z, !0), o.removeEventListener("keydown", H), y;
709
- }, u = function(n) {
710
- var r = n.some(function(c) {
711
- var h = Array.from(c.removedNodes);
694
+ s.delete(x);
695
+ }), i.adjacentElements = s;
696
+ }, y = function() {
697
+ if (i.active)
698
+ return o.removeEventListener("focusin", U, !0), o.removeEventListener("mousedown", q, !0), o.removeEventListener("touchstart", q, !0), o.removeEventListener("click", $, !0), o.removeEventListener("keydown", W, !0), o.removeEventListener("keydown", z), g;
699
+ }, u = function(a) {
700
+ var r = a.some(function(s) {
701
+ var h = Array.from(s.removedNodes);
712
702
  return h.some(function(p) {
713
- return p === a.mostRecentlyFocusedNode;
703
+ return p === i.mostRecentlyFocusedNode;
714
704
  });
715
705
  });
716
- r && P(D());
717
- }, w = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(u) : void 0, O = function() {
718
- w && (w.disconnect(), a.active && !a.paused && a.containers.map(function(n) {
719
- w.observe(n, {
706
+ r && P(O());
707
+ }, T = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(u) : void 0, E = function() {
708
+ T && (T.disconnect(), i.active && !i.paused && i.containers.map(function(a) {
709
+ T.observe(a, {
720
710
  subtree: !0,
721
711
  childList: !0
722
712
  });
723
713
  }));
724
714
  };
725
- return y = {
715
+ return g = {
726
716
  get active() {
727
- return a.active;
717
+ return i.active;
728
718
  },
729
719
  get paused() {
730
- return a.paused;
720
+ return i.paused;
731
721
  },
732
- activate: function(n) {
733
- if (a.active)
722
+ activate: function(a) {
723
+ if (i.active)
734
724
  return this;
735
- var r = T(n, "onActivate"), c = T(n, "onPostActivate"), h = T(n, "checkCanFocusTrap"), p = I.getActiveTrap(s), g = !1;
725
+ var r = F(a, "onActivate"), s = F(a, "onPostActivate"), h = F(a, "checkCanFocusTrap"), p = I.getActiveTrap(c), m = !1;
736
726
  if (p && !p.paused) {
737
727
  var v;
738
- (v = p._setSubtreeIsolation) === null || v === void 0 || v.call(p, !1), g = !0;
728
+ (v = p._setSubtreeIsolation) === null || v === void 0 || v.call(p, !1), m = !0;
739
729
  }
740
730
  try {
741
- h || N(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = _(o), r == null || r();
742
- var S = function() {
743
- h && N(), d(), O(), l.isolateSubtrees && y._setSubtreeIsolation(!0), c == null || c();
731
+ h || N(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = _(o), r == null || r();
732
+ var w = function() {
733
+ h && N(), d(), E(), f.isolateSubtrees && g._setSubtreeIsolation(!0), s == null || s();
744
734
  };
745
735
  if (h)
746
- return h(a.containers.concat()).then(S, S), this;
747
- S();
736
+ return h(i.containers.concat()).then(w, w), this;
737
+ w();
748
738
  } catch (R) {
749
- if (p === I.getActiveTrap(s) && g) {
750
- var F;
751
- (F = p._setSubtreeIsolation) === null || F === void 0 || F.call(p, !0);
739
+ if (p === I.getActiveTrap(c) && m) {
740
+ var S;
741
+ (S = p._setSubtreeIsolation) === null || S === void 0 || S.call(p, !0);
752
742
  }
753
743
  throw R;
754
744
  }
755
745
  return this;
756
746
  },
757
- deactivate: function(n) {
758
- if (!a.active)
747
+ deactivate: function(a) {
748
+ if (!i.active)
759
749
  return this;
760
- var r = fe({
761
- onDeactivate: l.onDeactivate,
762
- onPostDeactivate: l.onPostDeactivate,
763
- checkCanReturnFocus: l.checkCanReturnFocus
764
- }, n);
765
- clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, a.paused || y._setSubtreeIsolation(!1), a.alreadySilent.clear(), m(), a.active = !1, a.paused = !1, O(), I.deactivateTrap(s, y);
766
- var c = T(r, "onDeactivate"), h = T(r, "onPostDeactivate"), p = T(r, "checkCanReturnFocus"), g = T(r, "returnFocus", "returnFocusOnDeactivate");
767
- c == null || c();
750
+ var r = le({
751
+ onDeactivate: f.onDeactivate,
752
+ onPostDeactivate: f.onPostDeactivate,
753
+ checkCanReturnFocus: f.checkCanReturnFocus
754
+ }, a);
755
+ clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, i.paused || g._setSubtreeIsolation(!1), i.alreadySilent.clear(), y(), i.active = !1, i.paused = !1, E(), I.deactivateTrap(c, g);
756
+ var s = F(r, "onDeactivate"), h = F(r, "onPostDeactivate"), p = F(r, "checkCanReturnFocus"), m = F(r, "returnFocus", "returnFocusOnDeactivate");
757
+ s == null || s();
768
758
  var v = function() {
769
- de(function() {
770
- g && P(U(a.nodeFocusedBeforeActivation)), h == null || h();
759
+ fe(function() {
760
+ m && P(G(i.nodeFocusedBeforeActivation)), h == null || h();
771
761
  });
772
762
  };
773
- return g && p ? (p(U(a.nodeFocusedBeforeActivation)).then(v, v), this) : (v(), this);
763
+ return m && p ? (p(G(i.nodeFocusedBeforeActivation)).then(v, v), this) : (v(), this);
774
764
  },
775
- pause: function(n) {
776
- return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, n)) : this;
765
+ pause: function(a) {
766
+ return i.active ? (i.manuallyPaused = !0, this._setPausedState(!0, a)) : this;
777
767
  },
778
- unpause: function(n) {
779
- return a.active ? (a.manuallyPaused = !1, s[s.length - 1] !== this ? this : this._setPausedState(!1, n)) : this;
768
+ unpause: function(a) {
769
+ return i.active ? (i.manuallyPaused = !1, c[c.length - 1] !== this ? this : this._setPausedState(!1, a)) : this;
780
770
  },
781
- updateContainerElements: function(n) {
782
- var r = [].concat(n).filter(Boolean);
783
- return a.containers = r.map(function(c) {
784
- return typeof c == "string" ? o.querySelector(c) : c;
785
- }), l.isolateSubtrees && f(a.containers), a.active && (N(), l.isolateSubtrees && !a.paused && y._setSubtreeIsolation(!0)), O(), this;
771
+ updateContainerElements: function(a) {
772
+ var r = [].concat(a).filter(Boolean);
773
+ return i.containers = r.map(function(s) {
774
+ return typeof s == "string" ? o.querySelector(s) : s;
775
+ }), f.isolateSubtrees && l(i.containers), i.active && (N(), f.isolateSubtrees && !i.paused && g._setSubtreeIsolation(!0)), E(), this;
786
776
  }
787
- }, Object.defineProperties(y, {
777
+ }, Object.defineProperties(g, {
788
778
  _isManuallyPaused: {
789
779
  value: function() {
790
- return a.manuallyPaused;
780
+ return i.manuallyPaused;
791
781
  }
792
782
  },
793
783
  _setPausedState: {
794
- value: function(n, r) {
795
- if (a.paused === n)
784
+ value: function(a, r) {
785
+ if (i.paused === a)
796
786
  return this;
797
- if (a.paused = n, n) {
798
- var c = T(r, "onPause"), h = T(r, "onPostPause");
799
- c == null || c(), m(), O(), y._setSubtreeIsolation(!1), h == null || h();
787
+ if (i.paused = a, a) {
788
+ var s = F(r, "onPause"), h = F(r, "onPostPause");
789
+ s == null || s(), y(), E(), g._setSubtreeIsolation(!1), h == null || h();
800
790
  } else {
801
- var p = T(r, "onUnpause"), g = T(r, "onPostUnpause");
802
- p == null || p(), y._setSubtreeIsolation(!0), N(), d(), O(), g == null || g();
791
+ var p = F(r, "onUnpause"), m = F(r, "onPostUnpause");
792
+ p == null || p(), g._setSubtreeIsolation(!0), N(), d(), E(), m == null || m();
803
793
  }
804
794
  return this;
805
795
  }
806
796
  },
807
797
  _setSubtreeIsolation: {
808
- value: function(n) {
809
- l.isolateSubtrees && a.adjacentElements.forEach(function(r) {
810
- var c;
811
- if (n)
812
- switch (l.isolateSubtrees) {
798
+ value: function(a) {
799
+ f.isolateSubtrees && i.adjacentElements.forEach(function(r) {
800
+ var s;
801
+ if (a)
802
+ switch (f.isolateSubtrees) {
813
803
  case "aria-hidden":
814
- (r.ariaHidden === "true" || ((c = r.getAttribute("aria-hidden")) === null || c === void 0 ? void 0 : c.toLowerCase()) === "true") && a.alreadySilent.add(r), r.setAttribute("aria-hidden", "true");
804
+ (r.ariaHidden === "true" || ((s = r.getAttribute("aria-hidden")) === null || s === void 0 ? void 0 : s.toLowerCase()) === "true") && i.alreadySilent.add(r), r.setAttribute("aria-hidden", "true");
815
805
  break;
816
806
  default:
817
- (r.inert || r.hasAttribute("inert")) && a.alreadySilent.add(r), r.setAttribute("inert", !0);
807
+ (r.inert || r.hasAttribute("inert")) && i.alreadySilent.add(r), r.setAttribute("inert", !0);
818
808
  break;
819
809
  }
820
- else if (!a.alreadySilent.has(r)) switch (l.isolateSubtrees) {
810
+ else if (!i.alreadySilent.has(r)) switch (f.isolateSubtrees) {
821
811
  case "aria-hidden":
822
812
  r.removeAttribute("aria-hidden");
823
813
  break;
@@ -828,97 +818,97 @@ var I = {
828
818
  });
829
819
  }
830
820
  }
831
- }), y.updateContainerElements(e), y;
821
+ }), g.updateContainerElements(e), g;
832
822
  };
833
- const Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
823
+ const Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
834
824
  __proto__: null,
835
- createFocusTrap: Je
836
- }, Symbol.toStringTag, { value: "Module" })), et = /* @__PURE__ */ be(Qe), tt = /* @__PURE__ */ be(Ke);
837
- var ve;
838
- function rt() {
839
- if (ve) return Y.exports;
840
- ve = 1;
841
- function i(d) {
825
+ createFocusTrap: Xe
826
+ }, Symbol.toStringTag, { value: "Module" })), Qe = /* @__PURE__ */ ve(Je), et = /* @__PURE__ */ ve(Be);
827
+ var de;
828
+ function tt() {
829
+ if (de) return Y.exports;
830
+ de = 1;
831
+ function n(d) {
842
832
  "@babel/helpers - typeof";
843
- return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) {
844
- return typeof f;
845
- } : function(f) {
846
- return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f;
847
- }, i(d);
833
+ return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
834
+ return typeof l;
835
+ } : function(l) {
836
+ return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l;
837
+ }, n(d);
848
838
  }
849
839
  var e, t;
850
- function o(d, f) {
851
- if (!(d instanceof f)) throw new TypeError("Cannot call a class as a function");
840
+ function o(d, l) {
841
+ if (!(d instanceof l)) throw new TypeError("Cannot call a class as a function");
852
842
  }
853
- function s(d, f) {
854
- for (var m = 0; m < f.length; m++) {
855
- var u = f[m];
843
+ function c(d, l) {
844
+ for (var y = 0; y < l.length; y++) {
845
+ var u = l[y];
856
846
  u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(d, P(u.key), u);
857
847
  }
858
848
  }
859
- function l(d, f, m) {
860
- return f && s(d.prototype, f), Object.defineProperty(d, "prototype", { writable: !1 }), d;
849
+ function f(d, l, y) {
850
+ return l && c(d.prototype, l), Object.defineProperty(d, "prototype", { writable: !1 }), d;
861
851
  }
862
- function a(d, f, m) {
863
- return f = k(f), y(d, E() ? Reflect.construct(f, m || [], k(d).constructor) : f.apply(d, m));
852
+ function i(d, l, y) {
853
+ return l = D(l), g(d, k() ? Reflect.construct(l, y || [], D(d).constructor) : l.apply(d, y));
864
854
  }
865
- function y(d, f) {
866
- if (f && (i(f) == "object" || typeof f == "function")) return f;
867
- if (f !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
868
- return T(d);
855
+ function g(d, l) {
856
+ if (l && (n(l) == "object" || typeof l == "function")) return l;
857
+ if (l !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
858
+ return F(d);
869
859
  }
870
- function T(d) {
860
+ function F(d) {
871
861
  if (d === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
872
862
  return d;
873
863
  }
874
- function E() {
864
+ function k() {
875
865
  try {
876
866
  var d = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
877
867
  }));
878
868
  } catch {
879
869
  }
880
- return (E = function() {
870
+ return (k = function() {
881
871
  return !!d;
882
872
  })();
883
873
  }
884
- function k(d) {
885
- return k = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(f) {
886
- return f.__proto__ || Object.getPrototypeOf(f);
887
- }, k(d);
874
+ function D(d) {
875
+ return D = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(l) {
876
+ return l.__proto__ || Object.getPrototypeOf(l);
877
+ }, D(d);
888
878
  }
889
- function D(d, f) {
890
- if (typeof f != "function" && f !== null) throw new TypeError("Super expression must either be null or a function");
891
- d.prototype = Object.create(f && f.prototype, { constructor: { value: d, writable: !0, configurable: !0 } }), Object.defineProperty(d, "prototype", { writable: !1 }), f && N(d, f);
879
+ function O(d, l) {
880
+ if (typeof l != "function" && l !== null) throw new TypeError("Super expression must either be null or a function");
881
+ d.prototype = Object.create(l && l.prototype, { constructor: { value: d, writable: !0, configurable: !0 } }), Object.defineProperty(d, "prototype", { writable: !1 }), l && N(d, l);
892
882
  }
893
- function N(d, f) {
894
- return N = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, u) {
895
- return m.__proto__ = u, m;
896
- }, N(d, f);
883
+ function N(d, l) {
884
+ return N = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(y, u) {
885
+ return y.__proto__ = u, y;
886
+ }, N(d, l);
897
887
  }
898
- function _(d, f, m) {
899
- return (f = P(f)) in d ? Object.defineProperty(d, f, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : d[f] = m, d;
888
+ function _(d, l, y) {
889
+ return (l = P(l)) in d ? Object.defineProperty(d, l, { value: y, enumerable: !0, configurable: !0, writable: !0 }) : d[l] = y, d;
900
890
  }
901
891
  function P(d) {
902
- var f = U(d, "string");
903
- return i(f) == "symbol" ? f : f + "";
892
+ var l = G(d, "string");
893
+ return n(l) == "symbol" ? l : l + "";
904
894
  }
905
- function U(d, f) {
906
- if (i(d) != "object" || !d) return d;
907
- var m = d[Symbol.toPrimitive];
908
- if (m !== void 0) {
909
- var u = m.call(d, f);
910
- if (i(u) != "object") return u;
895
+ function G(d, l) {
896
+ if (n(d) != "object" || !d) return d;
897
+ var y = d[Symbol.toPrimitive];
898
+ if (y !== void 0) {
899
+ var u = y.call(d, l);
900
+ if (n(u) != "object") return u;
911
901
  throw new TypeError("@@toPrimitive must return a primitive value.");
912
902
  }
913
- return (f === "string" ? String : Number)(d);
903
+ return (l === "string" ? String : Number)(d);
914
904
  }
915
- var j = Ee, q = et, W = q.createFocusTrap, ae = tt, z = ae.isFocusable, H = parseInt((e = (t = /^(\d+)\./.exec(j.version)) === null || t === void 0 ? void 0 : t[1]) !== null && e !== void 0 ? e : 0, 10), $ = /* @__PURE__ */ (function(d) {
916
- function f(m) {
905
+ var j = Ee, q = Qe, U = q.createFocusTrap, re = et, W = re.isFocusable, z = parseInt((e = (t = /^(\d+)\./.exec(j.version)) === null || t === void 0 ? void 0 : t[1]) !== null && e !== void 0 ? e : 0, 10), $ = /* @__PURE__ */ (function(d) {
906
+ function l(y) {
917
907
  var u;
918
- o(this, f), u = a(this, f, [m]), _(u, "getNodeForOption", function(b) {
919
- var n, r = (n = this.internalOptions[b]) !== null && n !== void 0 ? n : this.originalOptions[b];
908
+ o(this, l), u = i(this, l, [y]), _(u, "getNodeForOption", function(b) {
909
+ var a, r = (a = this.internalOptions[b]) !== null && a !== void 0 ? a : this.originalOptions[b];
920
910
  if (typeof r == "function") {
921
- for (var c = arguments.length, h = new Array(c > 1 ? c - 1 : 0), p = 1; p < c; p++)
911
+ for (var s = arguments.length, h = new Array(s > 1 ? s - 1 : 0), p = 1; p < s; p++)
922
912
  h[p - 1] = arguments[p];
923
913
  r = r.apply(void 0, h);
924
914
  }
@@ -927,13 +917,13 @@ function rt() {
927
917
  return r;
928
918
  throw new Error("`".concat(b, "` was specified but was not a node, or did not return a node"));
929
919
  }
930
- var g = r;
920
+ var m = r;
931
921
  if (typeof r == "string") {
932
922
  var v;
933
- if (g = (v = this.getDocument()) === null || v === void 0 ? void 0 : v.querySelector(r), !g)
923
+ if (m = (v = this.getDocument()) === null || v === void 0 ? void 0 : v.querySelector(r), !m)
934
924
  throw new Error("`".concat(b, "` as selector refers to no known node"));
935
925
  }
936
- return g;
926
+ return m;
937
927
  }), u.handleDeactivate = u.handleDeactivate.bind(u), u.handlePostDeactivate = u.handlePostDeactivate.bind(u), u.handleClickOutsideDeactivates = u.handleClickOutsideDeactivates.bind(u), u.internalOptions = {
938
928
  // We need to hijack the returnFocusOnDeactivate option,
939
929
  // because React can move focus into the element before we arrived at
@@ -964,18 +954,18 @@ function rt() {
964
954
  // the user's setting, defaulted to false since focus-trap defaults this to false
965
955
  clickOutsideDeactivates: !1
966
956
  };
967
- var w = m.focusTrapOptions;
968
- for (var O in w)
969
- if (Object.prototype.hasOwnProperty.call(w, O)) {
970
- if (O === "returnFocusOnDeactivate" || O === "onDeactivate" || O === "onPostDeactivate" || O === "checkCanReturnFocus" || O === "clickOutsideDeactivates") {
971
- u.originalOptions[O] = w[O];
957
+ var T = y.focusTrapOptions;
958
+ for (var E in T)
959
+ if (Object.prototype.hasOwnProperty.call(T, E)) {
960
+ if (E === "returnFocusOnDeactivate" || E === "onDeactivate" || E === "onPostDeactivate" || E === "checkCanReturnFocus" || E === "clickOutsideDeactivates") {
961
+ u.originalOptions[E] = T[E];
972
962
  continue;
973
963
  }
974
- u.internalOptions[O] = w[O];
964
+ u.internalOptions[E] = T[E];
975
965
  }
976
- return u.outsideClick = null, u.focusTrapElements = m.containerElements || [], u.updatePreviousElement(), u;
966
+ return u.outsideClick = null, u.focusTrapElements = y.containerElements || [], u.updatePreviousElement(), u;
977
967
  }
978
- return D(f, d), l(f, [{
968
+ return O(l, d), f(l, [{
979
969
  key: "getDocument",
980
970
  value: function() {
981
971
  return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
@@ -1016,11 +1006,11 @@ function rt() {
1016
1006
  }, {
1017
1007
  key: "handleClickOutsideDeactivates",
1018
1008
  value: function(u) {
1019
- var w = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, u) : this.originalOptions.clickOutsideDeactivates;
1020
- return w && (this.outsideClick = {
1009
+ var T = typeof this.originalOptions.clickOutsideDeactivates == "function" ? this.originalOptions.clickOutsideDeactivates.call(null, u) : this.originalOptions.clickOutsideDeactivates;
1010
+ return T && (this.outsideClick = {
1021
1011
  target: u.target,
1022
- allowDeactivation: w
1023
- }), w;
1012
+ allowDeactivation: T
1013
+ }), T;
1024
1014
  }
1025
1015
  }, {
1026
1016
  key: "handleDeactivate",
@@ -1030,20 +1020,20 @@ function rt() {
1030
1020
  }, {
1031
1021
  key: "handlePostDeactivate",
1032
1022
  value: function() {
1033
- var u = this, w = function() {
1034
- var b = u.getReturnFocusNode(), n = !!// did the consumer allow it?
1023
+ var u = this, T = function() {
1024
+ var b = u.getReturnFocusNode(), a = !!// did the consumer allow it?
1035
1025
  (u.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?
1036
1026
  b !== null && b !== void 0 && b.focus && // was there an outside click that allowed deactivation?
1037
1027
  (!u.outsideClick || // did the consumer allow deactivation when the outside node was clicked?
1038
1028
  u.outsideClick.allowDeactivation && // is the outside node NOT focusable (implying that it did NOT receive focus
1039
1029
  // as a result of the click-through) -- in which case do NOT restore focus
1040
1030
  // to `returnFocusNode` because focus should remain on the outside node
1041
- !z(u.outsideClick.target, u.internalOptions.tabbableOptions))), r = u.internalOptions.preventScroll, c = r === void 0 ? !1 : r;
1042
- n && b.focus({
1043
- preventScroll: c
1031
+ !W(u.outsideClick.target, u.internalOptions.tabbableOptions))), r = u.internalOptions.preventScroll, s = r === void 0 ? !1 : r;
1032
+ a && b.focus({
1033
+ preventScroll: s
1044
1034
  }), u.originalOptions.onPostDeactivate && u.originalOptions.onPostDeactivate.call(null), u.outsideClick = null;
1045
1035
  };
1046
- this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(w, w) : w();
1036
+ this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(T, T) : T();
1047
1037
  }
1048
1038
  }, {
1049
1039
  key: "setupFocusTrap",
@@ -1065,12 +1055,12 @@ function rt() {
1065
1055
  value: function(u) {
1066
1056
  if (this.focusTrap) {
1067
1057
  u.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
1068
- var w = !u.active && this.props.active, O = u.active && !this.props.active, b = !u.paused && this.props.paused, n = u.paused && !this.props.paused;
1069
- if (w && (this.updatePreviousElement(), this.focusTrap.activate()), O) {
1058
+ var T = !u.active && this.props.active, E = u.active && !this.props.active, b = !u.paused && this.props.paused, a = u.paused && !this.props.paused;
1059
+ if (T && (this.updatePreviousElement(), this.focusTrap.activate()), E) {
1070
1060
  this.deactivateTrap();
1071
1061
  return;
1072
1062
  }
1073
- b && this.focusTrap.pause(), n && this.focusTrap.unpause();
1063
+ b && this.focusTrap.pause(), a && this.focusTrap.unpause();
1074
1064
  } else
1075
1065
  u.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
1076
1066
  }
@@ -1082,15 +1072,15 @@ function rt() {
1082
1072
  }, {
1083
1073
  key: "render",
1084
1074
  value: function() {
1085
- var u = this, w = this.props.children ? j.Children.only(this.props.children) : void 0;
1086
- if (w) {
1087
- if (w.type && w.type === j.Fragment)
1075
+ var u = this, T = this.props.children ? j.Children.only(this.props.children) : void 0;
1076
+ if (T) {
1077
+ if (T.type && T.type === j.Fragment)
1088
1078
  throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
1089
- var O = function(r) {
1090
- var c = u.props.containerElements;
1091
- w && (H >= 19 ? typeof w.props.ref == "function" ? w.props.ref(r) : w.props.ref && (w.props.ref.current = r) : typeof w.ref == "function" ? w.ref(r) : w.ref && (w.ref.current = r)), u.focusTrapElements = c || [r];
1092
- }, b = j.cloneElement(w, {
1093
- ref: O
1079
+ var E = function(r) {
1080
+ var s = u.props.containerElements;
1081
+ T && (z >= 19 ? typeof T.props.ref == "function" ? T.props.ref(r) : T.props.ref && (T.props.ref.current = r) : typeof T.ref == "function" ? T.ref(r) : T.ref && (T.ref.current = r)), u.focusTrapElements = s || [r];
1082
+ }, b = j.cloneElement(T, {
1083
+ ref: E
1094
1084
  });
1095
1085
  return b;
1096
1086
  }
@@ -1102,10 +1092,10 @@ function rt() {
1102
1092
  active: !0,
1103
1093
  paused: !1,
1104
1094
  focusTrapOptions: {},
1105
- _createFocusTrap: W
1095
+ _createFocusTrap: U
1106
1096
  }, Y.exports = $, Y.exports.FocusTrap = $, Y.exports;
1107
1097
  }
1108
- var it = rt();
1098
+ var nt = tt();
1109
1099
  export {
1110
- it as f
1100
+ nt as f
1111
1101
  };