@kakadu/components 4.0.5 → 4.0.6

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