@pnx-mixtape/mxds 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/build/accordion.css +1 -1
  2. package/dist/build/base.css +1 -1
  3. package/dist/build/breadcrumb.css +1 -1
  4. package/dist/build/button.css +1 -1
  5. package/dist/build/callout.css +1 -1
  6. package/dist/build/card.css +1 -1
  7. package/dist/build/carousel.css +1 -1
  8. package/dist/build/chunks/{DropMenu-LnJEp-sg.js → DropMenu-BckyZaZM.js} +1 -1
  9. package/dist/build/chunks/{Popover-C4gisyxr.js → Popover-hTv4lVea.js} +2 -2
  10. package/dist/build/chunks/polyfills-QW1VbwlO.js +562 -0
  11. package/dist/build/chunks/popover-Dk48Vm_U.js +407 -0
  12. package/dist/build/constants.css +1 -1
  13. package/dist/build/container-grid.css +1 -1
  14. package/dist/build/content-block.css +1 -1
  15. package/dist/build/dialog.css +1 -1
  16. package/dist/build/drop-menu.css +1 -1
  17. package/dist/build/drop-menu.entry.js +2 -2
  18. package/dist/build/drupal.css +1 -1
  19. package/dist/build/filters.css +1 -1
  20. package/dist/build/footer.css +1 -1
  21. package/dist/build/form.css +1 -1
  22. package/dist/build/global-alert.css +1 -1
  23. package/dist/build/grid.css +1 -1
  24. package/dist/build/header.css +1 -1
  25. package/dist/build/header.entry.js +524 -379
  26. package/dist/build/hero-banner.css +1 -1
  27. package/dist/build/icon.css +1 -1
  28. package/dist/build/in-page-alert.css +1 -1
  29. package/dist/build/in-page-navigation.css +1 -1
  30. package/dist/build/in-page-navigation.entry.js +23 -11
  31. package/dist/build/link-list.css +1 -1
  32. package/dist/build/list-item.css +1 -1
  33. package/dist/build/masthead.css +1 -1
  34. package/dist/build/navigation.css +1 -1
  35. package/dist/build/page.css +1 -1
  36. package/dist/build/pagination.css +1 -1
  37. package/dist/build/popover.css +1 -1
  38. package/dist/build/popover.entry.js +1 -1
  39. package/dist/build/results-bar.css +1 -1
  40. package/dist/build/section.css +1 -1
  41. package/dist/build/side-navigation.css +1 -1
  42. package/dist/build/sidebar.css +1 -1
  43. package/dist/build/social-links.css +1 -1
  44. package/dist/build/steps.css +1 -1
  45. package/dist/build/sticky.css +1 -1
  46. package/dist/build/tabs.css +1 -1
  47. package/dist/build/tabs.entry.js +2 -2
  48. package/dist/build/tag.css +1 -1
  49. package/dist/build/utilities.css +1 -1
  50. package/dist/build/utility-list.css +1 -1
  51. package/package.json +22 -21
  52. package/src/Atom/Background/_background.css +1 -0
  53. package/src/Atom/Image/_image.css +1 -0
  54. package/src/Atom/Media/_media.css +0 -6
  55. package/src/Atom/Spacing/_mixins.css +22 -0
  56. package/src/Atom/Spacing/_spacing.css +33 -0
  57. package/src/Atom/Table/Table.stories.ts +17 -7
  58. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +16 -8
  59. package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
  60. package/src/Atom/Table/_table.css +26 -1
  61. package/src/Atom/Table/table-responsive.twig +1 -1
  62. package/src/Atom/Table/table.twig +9 -1
  63. package/src/Atom/_flow.css +1 -5
  64. package/src/Component/Card/Card.stories.ts +19 -0
  65. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +40 -9
  66. package/src/Component/Card/card.css +60 -12
  67. package/src/Component/Card/card.twig +5 -2
  68. package/src/Component/Carousel/Elements/Carousel.ts +8 -3
  69. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +52 -52
  70. package/src/Component/Carousel/carousel.css +14 -35
  71. package/src/Component/Carousel/carousel.twig +0 -1
  72. package/src/Component/GlobalAlert/global-alert.css +8 -4
  73. package/src/Component/InPageAlert/in-page-alert.css +1 -0
  74. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +12 -7
  75. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +28 -12
  76. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +30 -49
  77. package/src/Component/InPageNavigation/in-page-navigation.css +8 -4
  78. package/src/Component/InPageNavigation/in-page-navigation.twig +9 -6
  79. package/src/Component/InPageNavigation/twig/content-example.twig +1 -1
  80. package/src/Component/InPageNavigation/twig/in-page-navigation-selector.twig +4 -0
  81. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +9 -9
  82. package/src/Component/ListItem/list-item.css +14 -1
  83. package/src/Component/ListItem/list-item.twig +6 -2
  84. package/src/Component/Pagination/Pagination.stories.ts +1 -1
  85. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +2 -2
  86. package/src/Component/ResultsBar/results-bar.css +4 -0
  87. package/src/Form/FormItem/FormItem.stories.ts +14 -0
  88. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +19 -0
  89. package/src/Form/form.css +11 -3
  90. package/src/Layout/Grid/Grid.stories.ts +7 -7
  91. package/src/Layout/Grid/GridItem.stories.ts +1 -2
  92. package/src/Layout/Section/section.css +8 -0
  93. package/src/_custom-media.css +2 -0
  94. package/src/constants.css +16 -4
  95. package/src/enums.ts +1 -1
  96. package/src/tokens.js +1 -0
  97. package/dist/build/chunks/polyfills-Du4RTZDf.js +0 -511
  98. package/dist/build/chunks/popover-Bd5oQ1Ic.js +0 -407
@@ -15,49 +15,49 @@ var candidateSelectors = [
15
15
  return e?.getRootNode?.call(e);
16
16
  } : function(e) {
17
17
  return e?.ownerDocument;
18
- }, _isInert = function(e, D) {
19
- D === void 0 && (D = !0);
20
- var O = e?.getAttribute?.call(e, "inert");
21
- return O === "" || O === "true" || D && e && (typeof e.closest == "function" ? e.closest("[inert]") : _isInert(e.parentNode));
18
+ }, _isInert = function(e, t) {
19
+ t === void 0 && (t = !0);
20
+ var n = e?.getAttribute?.call(e, "inert");
21
+ return n === "" || n === "true" || t && e && (typeof e.closest == "function" ? e.closest("[inert]") : _isInert(e.parentNode));
22
22
  }, isContentEditable = function(e) {
23
- var D = e?.getAttribute?.call(e, "contenteditable");
24
- return D === "" || D === "true";
25
- }, getCandidates = function(e, D, k) {
23
+ var t = e?.getAttribute?.call(e, "contenteditable");
24
+ return t === "" || t === "true";
25
+ }, getCandidates = function(e, t, r) {
26
26
  if (_isInert(e)) return [];
27
- var j = Array.prototype.slice.apply(e.querySelectorAll(candidateSelector));
28
- return D && matches.call(e, candidateSelector) && j.unshift(e), j = j.filter(k), j;
29
- }, _getCandidatesIteratively = function(e, D, k) {
30
- for (var j = [], N = Array.from(e); N.length;) {
31
- var P = N.shift();
32
- if (!_isInert(P, !1)) if (P.tagName === "SLOT") {
33
- var I = P.assignedElements(), L = _getCandidatesIteratively(I.length ? I : P.children, !0, k);
34
- k.flatten ? j.push.apply(j, L) : j.push({
35
- scopeParent: P,
36
- candidates: L
27
+ var a = Array.prototype.slice.apply(e.querySelectorAll(candidateSelector));
28
+ return t && matches.call(e, candidateSelector) && a.unshift(e), a = a.filter(r), a;
29
+ }, _getCandidatesIteratively = function(e, t, r) {
30
+ for (var a = [], s = Array.from(e); s.length;) {
31
+ var c = s.shift();
32
+ if (!_isInert(c, !1)) if (c.tagName === "SLOT") {
33
+ var u = c.assignedElements(), d = _getCandidatesIteratively(u.length ? u : c.children, !0, r);
34
+ r.flatten ? a.push.apply(a, d) : a.push({
35
+ scopeParent: c,
36
+ candidates: d
37
37
  });
38
38
  } else {
39
- matches.call(P, candidateSelector) && k.filter(P) && (D || !e.includes(P)) && j.push(P);
40
- var R = P.shadowRoot || typeof k.getShadowRoot == "function" && k.getShadowRoot(P), z = !_isInert(R, !1) && (!k.shadowRootFilter || k.shadowRootFilter(P));
41
- if (R && z) {
42
- var B = _getCandidatesIteratively(R === !0 ? P.children : R.children, !0, k);
43
- k.flatten ? j.push.apply(j, B) : j.push({
44
- scopeParent: P,
45
- candidates: B
39
+ matches.call(c, candidateSelector) && r.filter(c) && (t || !e.includes(c)) && a.push(c);
40
+ var f = c.shadowRoot || typeof r.getShadowRoot == "function" && r.getShadowRoot(c), p = !_isInert(f, !1) && (!r.shadowRootFilter || r.shadowRootFilter(c));
41
+ if (f && p) {
42
+ var m = _getCandidatesIteratively(f === !0 ? c.children : f.children, !0, r);
43
+ r.flatten ? a.push.apply(a, m) : a.push({
44
+ scopeParent: c,
45
+ candidates: m
46
46
  });
47
- } else N.unshift.apply(N, P.children);
47
+ } else s.unshift.apply(s, c.children);
48
48
  }
49
49
  }
50
- return j;
50
+ return a;
51
51
  }, hasTabIndex = function(e) {
52
52
  return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
53
53
  }, getTabIndex = function(e) {
54
54
  if (!e) throw Error("No node provided");
55
55
  return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || isContentEditable(e)) && !hasTabIndex(e) ? 0 : e.tabIndex;
56
- }, getSortOrderTabIndex = function(e, D) {
57
- var O = getTabIndex(e);
58
- return O < 0 && D && !hasTabIndex(e) ? 0 : O;
59
- }, sortOrderedTabbables = function(e, D) {
60
- return e.tabIndex === D.tabIndex ? e.documentOrder - D.documentOrder : e.tabIndex - D.tabIndex;
56
+ }, getSortOrderTabIndex = function(e, t) {
57
+ var n = getTabIndex(e);
58
+ return n < 0 && t && !hasTabIndex(e) ? 0 : n;
59
+ }, sortOrderedTabbables = function(e, t) {
60
+ return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
61
61
  }, isInput = function(e) {
62
62
  return e.tagName === "INPUT";
63
63
  }, isHiddenInput = function(e) {
@@ -66,41 +66,41 @@ var candidateSelectors = [
66
66
  return e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(e) {
67
67
  return e.tagName === "SUMMARY";
68
68
  });
69
- }, getCheckedRadio = function(e, D) {
70
- for (var O = 0; O < e.length; O++) if (e[O].checked && e[O].form === D) return e[O];
69
+ }, getCheckedRadio = function(e, t) {
70
+ for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
71
71
  }, isTabbableRadio = function(e) {
72
72
  if (!e.name) return !0;
73
- var D = e.form || getRootNode(e), O = function(e) {
74
- return D.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
75
- }, k;
76
- if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") k = O(window.CSS.escape(e.name));
73
+ var t = e.form || getRootNode(e), n = function(e) {
74
+ return t.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
75
+ }, r;
76
+ if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") r = n(window.CSS.escape(e.name));
77
77
  else try {
78
- k = O(e.name);
78
+ r = n(e.name);
79
79
  } catch (e) {
80
80
  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", e.message), !1;
81
81
  }
82
- var A = getCheckedRadio(k, e.form);
83
- return !A || A === e;
82
+ var i = getCheckedRadio(r, e.form);
83
+ return !i || i === e;
84
84
  }, isRadio = function(e) {
85
85
  return isInput(e) && e.type === "radio";
86
86
  }, isNonTabbableRadio = function(e) {
87
87
  return isRadio(e) && !isTabbableRadio(e);
88
88
  }, isNodeAttached = function(e) {
89
- var D = e && getRootNode(e), O = D?.host, k = !1;
90
- if (D && D !== e) {
91
- var A, M, N;
92
- for (k = !!((A = O) != null && (M = A.ownerDocument) != null && M.contains(O) || e != null && (N = e.ownerDocument) != null && N.contains(e)); !k && O;) {
93
- var P, F;
94
- D = getRootNode(O), O = D?.host, k = !!((P = O) != null && (F = P.ownerDocument) != null && F.contains(O));
89
+ var t = e && getRootNode(e), n = t?.host, r = !1;
90
+ if (t && t !== e) {
91
+ var i, o, s;
92
+ for (r = !!((i = n) != null && (o = i.ownerDocument) != null && o.contains(n) || e != null && (s = e.ownerDocument) != null && s.contains(e)); !r && n;) {
93
+ var c, l;
94
+ t = getRootNode(n), n = t?.host, r = !!((c = n) != null && (l = c.ownerDocument) != null && l.contains(n));
95
95
  }
96
96
  }
97
- return k;
97
+ return r;
98
98
  }, isZeroArea = function(e) {
99
- var D = e.getBoundingClientRect(), O = D.width, k = D.height;
100
- return O === 0 && k === 0;
101
- }, isHidden = function(e, D) {
102
- var O = D.displayCheck, k = D.getShadowRoot;
103
- if (O === "full-native" && "checkVisibility" in e) return !e.checkVisibility({
99
+ var t = e.getBoundingClientRect(), n = t.width, r = t.height;
100
+ return n === 0 && r === 0;
101
+ }, isHidden = function(e, t) {
102
+ var n = t.displayCheck, r = t.getShadowRoot;
103
+ if (n === "full-native" && "checkVisibility" in e) return !e.checkVisibility({
104
104
  checkOpacity: !1,
105
105
  opacityProperty: !1,
106
106
  contentVisibilityAuto: !0,
@@ -108,132 +108,156 @@ var candidateSelectors = [
108
108
  checkVisibilityCSS: !0
109
109
  });
110
110
  if (getComputedStyle(e).visibility === "hidden") return !0;
111
- var M = matches.call(e, "details>summary:first-of-type") ? e.parentElement : e;
112
- if (matches.call(M, "details:not([open]) *")) return !0;
113
- if (!O || O === "full" || O === "full-native" || O === "legacy-full") {
114
- if (typeof k == "function") {
115
- for (var N = e; e;) {
116
- var P = e.parentElement, F = getRootNode(e);
117
- if (P && !P.shadowRoot && k(P) === !0) return isZeroArea(e);
118
- e = e.assignedSlot ? e.assignedSlot : !P && F !== e.ownerDocument ? F.host : P;
111
+ var o = matches.call(e, "details>summary:first-of-type") ? e.parentElement : e;
112
+ if (matches.call(o, "details:not([open]) *")) return !0;
113
+ if (!n || n === "full" || n === "full-native" || n === "legacy-full") {
114
+ if (typeof r == "function") {
115
+ for (var s = e; e;) {
116
+ var c = e.parentElement, l = getRootNode(e);
117
+ if (c && !c.shadowRoot && r(c) === !0) return isZeroArea(e);
118
+ e = e.assignedSlot ? e.assignedSlot : !c && l !== e.ownerDocument ? l.host : c;
119
119
  }
120
- e = N;
120
+ e = s;
121
121
  }
122
122
  if (isNodeAttached(e)) return !e.getClientRects().length;
123
- if (O !== "legacy-full") return !0;
124
- } else if (O === "non-zero-area") return isZeroArea(e);
123
+ if (n !== "legacy-full") return !0;
124
+ } else if (n === "non-zero-area") return isZeroArea(e);
125
125
  return !1;
126
126
  }, isDisabledFromFieldset = function(e) {
127
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var D = e.parentElement; D;) {
128
- if (D.tagName === "FIELDSET" && D.disabled) {
129
- for (var O = 0; O < D.children.length; O++) {
130
- var k = D.children.item(O);
131
- if (k.tagName === "LEGEND") return matches.call(D, "fieldset[disabled] *") ? !0 : !k.contains(e);
127
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var t = e.parentElement; t;) {
128
+ if (t.tagName === "FIELDSET" && t.disabled) {
129
+ for (var n = 0; n < t.children.length; n++) {
130
+ var r = t.children.item(n);
131
+ if (r.tagName === "LEGEND") return matches.call(t, "fieldset[disabled] *") ? !0 : !r.contains(e);
132
132
  }
133
133
  return !0;
134
134
  }
135
- D = D.parentElement;
135
+ t = t.parentElement;
136
136
  }
137
137
  return !1;
138
- }, isNodeMatchingSelectorFocusable = function(e, D) {
139
- return !(D.disabled || isHiddenInput(D) || isHidden(D, e) || isDetailsWithSummary(D) || isDisabledFromFieldset(D));
140
- }, isNodeMatchingSelectorTabbable = function(e, D) {
141
- return !(isNonTabbableRadio(D) || getTabIndex(D) < 0 || !isNodeMatchingSelectorFocusable(e, D));
138
+ }, isNodeMatchingSelectorFocusable = function(e, t) {
139
+ return !(t.disabled || isHiddenInput(t) || isHidden(t, e) || isDetailsWithSummary(t) || isDisabledFromFieldset(t));
140
+ }, isNodeMatchingSelectorTabbable = function(e, t) {
141
+ return !(isNonTabbableRadio(t) || getTabIndex(t) < 0 || !isNodeMatchingSelectorFocusable(e, t));
142
142
  }, isShadowRootTabbable = function(e) {
143
- var D = parseInt(e.getAttribute("tabindex"), 10);
144
- return !!(isNaN(D) || D >= 0);
143
+ var t = parseInt(e.getAttribute("tabindex"), 10);
144
+ return !!(isNaN(t) || t >= 0);
145
145
  }, _sortByOrder = function(e) {
146
- var D = [], O = [];
147
- return e.forEach(function(e, k) {
148
- var A = !!e.scopeParent, j = A ? e.scopeParent : e, M = getSortOrderTabIndex(j, A), N = A ? _sortByOrder(e.candidates) : j;
149
- M === 0 ? A ? D.push.apply(D, N) : D.push(j) : O.push({
150
- documentOrder: k,
151
- tabIndex: M,
146
+ var t = [], n = [];
147
+ return e.forEach(function(e, r) {
148
+ var i = !!e.scopeParent, a = i ? e.scopeParent : e, o = getSortOrderTabIndex(a, i), s = i ? _sortByOrder(e.candidates) : a;
149
+ o === 0 ? i ? t.push.apply(t, s) : t.push(a) : n.push({
150
+ documentOrder: r,
151
+ tabIndex: o,
152
152
  item: e,
153
- isScope: A,
154
- content: N
153
+ isScope: i,
154
+ content: s
155
155
  });
156
- }), O.sort(sortOrderedTabbables).reduce(function(e, D) {
157
- return D.isScope ? e.push.apply(e, D.content) : e.push(D.content), e;
158
- }, []).concat(D);
159
- }, tabbable = function(e, D) {
160
- return D ||= {}, _sortByOrder(D.getShadowRoot ? _getCandidatesIteratively([e], D.includeContainer, {
161
- filter: isNodeMatchingSelectorTabbable.bind(null, D),
156
+ }), n.sort(sortOrderedTabbables).reduce(function(e, t) {
157
+ return t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e;
158
+ }, []).concat(t);
159
+ }, tabbable = function(e, t) {
160
+ return t ||= {}, _sortByOrder(t.getShadowRoot ? _getCandidatesIteratively([e], t.includeContainer, {
161
+ filter: isNodeMatchingSelectorTabbable.bind(null, t),
162
162
  flatten: !1,
163
- getShadowRoot: D.getShadowRoot,
163
+ getShadowRoot: t.getShadowRoot,
164
164
  shadowRootFilter: isShadowRootTabbable
165
- }) : getCandidates(e, D.includeContainer, isNodeMatchingSelectorTabbable.bind(null, D)));
166
- }, focusable = function(e, D) {
167
- return D ||= {}, D.getShadowRoot ? _getCandidatesIteratively([e], D.includeContainer, {
168
- filter: isNodeMatchingSelectorFocusable.bind(null, D),
165
+ }) : getCandidates(e, t.includeContainer, isNodeMatchingSelectorTabbable.bind(null, t)));
166
+ }, focusable = function(e, t) {
167
+ return t ||= {}, t.getShadowRoot ? _getCandidatesIteratively([e], t.includeContainer, {
168
+ filter: isNodeMatchingSelectorFocusable.bind(null, t),
169
169
  flatten: !0,
170
- getShadowRoot: D.getShadowRoot
171
- }) : getCandidates(e, D.includeContainer, isNodeMatchingSelectorFocusable.bind(null, D));
172
- }, isTabbable = function(e, D) {
173
- if (D ||= {}, !e) throw Error("No node provided");
174
- return matches.call(e, candidateSelector) === !1 ? !1 : isNodeMatchingSelectorTabbable(D, e);
175
- }, focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat("iframe:not([inert]):not([inert] *)").join(","), isFocusable = function(e, D) {
176
- if (D ||= {}, !e) throw Error("No node provided");
177
- return matches.call(e, focusableCandidateSelector) === !1 ? !1 : isNodeMatchingSelectorFocusable(D, e);
170
+ getShadowRoot: t.getShadowRoot
171
+ }) : getCandidates(e, t.includeContainer, isNodeMatchingSelectorFocusable.bind(null, t));
172
+ }, isTabbable = function(e, t) {
173
+ if (t ||= {}, !e) throw Error("No node provided");
174
+ return matches.call(e, candidateSelector) === !1 ? !1 : isNodeMatchingSelectorTabbable(t, e);
175
+ }, focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat("iframe:not([inert]):not([inert] *)").join(","), isFocusable = function(e, t) {
176
+ if (t ||= {}, !e) throw Error("No node provided");
177
+ return matches.call(e, focusableCandidateSelector) === !1 ? !1 : isNodeMatchingSelectorFocusable(t, e);
178
178
  };
179
- function _arrayLikeToArray(e, D) {
180
- (D == null || D > e.length) && (D = e.length);
181
- for (var O = 0, k = Array(D); O < D; O++) k[O] = e[O];
182
- return k;
179
+ function _arrayLikeToArray(e, t) {
180
+ (t == null || t > e.length) && (t = e.length);
181
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
182
+ return r;
183
183
  }
184
184
  function _arrayWithoutHoles(e) {
185
185
  if (Array.isArray(e)) return _arrayLikeToArray(e);
186
186
  }
187
- function _createForOfIteratorHelper(e, D) {
188
- var O = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
189
- if (!O) {
190
- if (Array.isArray(e) || (O = _unsupportedIterableToArray(e)) || D) {
191
- O && (e = O);
192
- var k = 0, A = function() {};
187
+ function asyncGeneratorStep(e, t, n, r, i, a, o) {
188
+ try {
189
+ var s = e[a](o), c = s.value;
190
+ } catch (e) {
191
+ n(e);
192
+ return;
193
+ }
194
+ s.done ? t(c) : Promise.resolve(c).then(r, i);
195
+ }
196
+ function _asyncToGenerator(e) {
197
+ return function() {
198
+ var t = this, n = arguments;
199
+ return new Promise(function(r, i) {
200
+ var a = e.apply(t, n);
201
+ function o(e) {
202
+ asyncGeneratorStep(a, r, i, o, s, "next", e);
203
+ }
204
+ function s(e) {
205
+ asyncGeneratorStep(a, r, i, o, s, "throw", e);
206
+ }
207
+ o(void 0);
208
+ });
209
+ };
210
+ }
211
+ function _createForOfIteratorHelper(e, t) {
212
+ var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
213
+ if (!n) {
214
+ if (Array.isArray(e) || (n = _unsupportedIterableToArray(e)) || t) {
215
+ n && (e = n);
216
+ var r = 0, i = function() {};
193
217
  return {
194
- s: A,
218
+ s: i,
195
219
  n: function() {
196
- return k >= e.length ? { done: !0 } : {
220
+ return r >= e.length ? { done: !0 } : {
197
221
  done: !1,
198
- value: e[k++]
222
+ value: e[r++]
199
223
  };
200
224
  },
201
225
  e: function(e) {
202
226
  throw e;
203
227
  },
204
- f: A
228
+ f: i
205
229
  };
206
230
  }
207
231
  throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
208
232
  }
209
- var j, M = !0, N = !1;
233
+ var a, o = !0, s = !1;
210
234
  return {
211
235
  s: function() {
212
- O = O.call(e);
236
+ n = n.call(e);
213
237
  },
214
238
  n: function() {
215
- var e = O.next();
216
- return M = e.done, e;
239
+ var e = n.next();
240
+ return o = e.done, e;
217
241
  },
218
242
  e: function(e) {
219
- N = !0, j = e;
243
+ s = !0, a = e;
220
244
  },
221
245
  f: function() {
222
246
  try {
223
- M || O.return == null || O.return();
247
+ o || n.return == null || n.return();
224
248
  } finally {
225
- if (N) throw j;
249
+ if (s) throw a;
226
250
  }
227
251
  }
228
252
  };
229
253
  }
230
- function _defineProperty(e, D, O) {
231
- return (D = _toPropertyKey(D)) in e ? Object.defineProperty(e, D, {
232
- value: O,
254
+ function _defineProperty(e, t, n) {
255
+ return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
256
+ value: n,
233
257
  enumerable: !0,
234
258
  configurable: !0,
235
259
  writable: !0
236
- }) : e[D] = O, e;
260
+ }) : e[t] = n, e;
237
261
  }
238
262
  function _iterableToArray(e) {
239
263
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
@@ -241,70 +265,162 @@ function _iterableToArray(e) {
241
265
  function _nonIterableSpread() {
242
266
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
243
267
  }
244
- function ownKeys(e, D) {
245
- var O = Object.keys(e);
268
+ function ownKeys(e, t) {
269
+ var n = Object.keys(e);
246
270
  if (Object.getOwnPropertySymbols) {
247
- var k = Object.getOwnPropertySymbols(e);
248
- D && (k = k.filter(function(D) {
249
- return Object.getOwnPropertyDescriptor(e, D).enumerable;
250
- })), O.push.apply(O, k);
271
+ var r = Object.getOwnPropertySymbols(e);
272
+ t && (r = r.filter(function(t) {
273
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
274
+ })), n.push.apply(n, r);
251
275
  }
252
- return O;
276
+ return n;
253
277
  }
254
278
  function _objectSpread2(e) {
255
- for (var D = 1; D < arguments.length; D++) {
256
- var O = arguments[D] == null ? {} : arguments[D];
257
- D % 2 ? ownKeys(Object(O), !0).forEach(function(D) {
258
- _defineProperty(e, D, O[D]);
259
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(O)) : ownKeys(Object(O)).forEach(function(D) {
260
- Object.defineProperty(e, D, Object.getOwnPropertyDescriptor(O, D));
279
+ for (var t = 1; t < arguments.length; t++) {
280
+ var n = arguments[t] == null ? {} : arguments[t];
281
+ t % 2 ? ownKeys(Object(n), !0).forEach(function(t) {
282
+ _defineProperty(e, t, n[t]);
283
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ownKeys(Object(n)).forEach(function(t) {
284
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
261
285
  });
262
286
  }
263
287
  return e;
264
288
  }
289
+ function _regenerator() {
290
+ var e, t, n = typeof Symbol == "function" ? Symbol : {}, r = n.iterator || "@@iterator", i = n.toStringTag || "@@toStringTag";
291
+ function a(n, r, i, a) {
292
+ var c = r && r.prototype instanceof s ? r : s, l = Object.create(c.prototype);
293
+ return _regeneratorDefine(l, "_invoke", function(n, r, i) {
294
+ var a, s, c, l = 0, u = i || [], d = !1, f = {
295
+ p: 0,
296
+ n: 0,
297
+ v: e,
298
+ a: p,
299
+ f: p.bind(e, 4),
300
+ d: function(t, n) {
301
+ return a = t, s = 0, c = e, f.n = n, o;
302
+ }
303
+ };
304
+ function p(n, r) {
305
+ for (s = n, c = r, t = 0; !d && l && !i && t < u.length; t++) {
306
+ var i, a = u[t], p = f.p, m = a[2];
307
+ n > 3 ? (i = m === r) && (c = a[(s = a[4]) ? 5 : (s = 3, 3)], a[4] = a[5] = e) : a[0] <= p && ((i = n < 2 && p < a[1]) ? (s = 0, f.v = r, f.n = a[1]) : p < m && (i = n < 3 || a[0] > r || r > m) && (a[4] = n, a[5] = r, f.n = m, s = 0));
308
+ }
309
+ if (i || n > 1) return o;
310
+ throw d = !0, r;
311
+ }
312
+ return function(i, u, m) {
313
+ if (l > 1) throw TypeError("Generator is already running");
314
+ for (d && u === 1 && p(u, m), s = u, c = m; (t = s < 2 ? e : c) || !d;) {
315
+ a || (s ? s < 3 ? (s > 1 && (f.n = -1), p(s, c)) : f.n = c : f.v = c);
316
+ try {
317
+ if (l = 2, a) {
318
+ if (s || (i = "next"), t = a[i]) {
319
+ if (!(t = t.call(a, c))) throw TypeError("iterator result is not an object");
320
+ if (!t.done) return t;
321
+ c = t.value, s < 2 && (s = 0);
322
+ } else s === 1 && (t = a.return) && t.call(a), s < 2 && (c = TypeError("The iterator does not provide a '" + i + "' method"), s = 1);
323
+ a = e;
324
+ } else if ((t = (d = f.n < 0) ? c : n.call(r, f)) !== o) break;
325
+ } catch (t) {
326
+ a = e, s = 1, c = t;
327
+ } finally {
328
+ l = 1;
329
+ }
330
+ }
331
+ return {
332
+ value: t,
333
+ done: d
334
+ };
335
+ };
336
+ }(n, i, a), !0), l;
337
+ }
338
+ var o = {};
339
+ function s() {}
340
+ function c() {}
341
+ function l() {}
342
+ t = Object.getPrototypeOf;
343
+ var u = [][r] ? t(t([][r]())) : (_regeneratorDefine(t = {}, r, function() {
344
+ return this;
345
+ }), t), d = l.prototype = s.prototype = Object.create(u);
346
+ function f(e) {
347
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, l) : (e.__proto__ = l, _regeneratorDefine(e, i, "GeneratorFunction")), e.prototype = Object.create(d), e;
348
+ }
349
+ return c.prototype = l, _regeneratorDefine(d, "constructor", l), _regeneratorDefine(l, "constructor", c), c.displayName = "GeneratorFunction", _regeneratorDefine(l, i, "GeneratorFunction"), _regeneratorDefine(d), _regeneratorDefine(d, i, "Generator"), _regeneratorDefine(d, r, function() {
350
+ return this;
351
+ }), _regeneratorDefine(d, "toString", function() {
352
+ return "[object Generator]";
353
+ }), (_regenerator = function() {
354
+ return {
355
+ w: a,
356
+ m: f
357
+ };
358
+ })();
359
+ }
360
+ function _regeneratorDefine(e, t, n, r) {
361
+ var i = Object.defineProperty;
362
+ try {
363
+ i({}, "", {});
364
+ } catch {
365
+ i = 0;
366
+ }
367
+ _regeneratorDefine = function(e, t, n, r) {
368
+ function a(t, n) {
369
+ _regeneratorDefine(e, t, function(e) {
370
+ return this._invoke(t, n, e);
371
+ });
372
+ }
373
+ t ? i ? i(e, t, {
374
+ value: n,
375
+ enumerable: !r,
376
+ configurable: !r,
377
+ writable: !r
378
+ }) : e[t] = n : (a("next", 0), a("throw", 1), a("return", 2));
379
+ }, _regeneratorDefine(e, t, n, r);
380
+ }
265
381
  function _toConsumableArray(e) {
266
382
  return _arrayWithoutHoles(e) || _iterableToArray(e) || _unsupportedIterableToArray(e) || _nonIterableSpread();
267
383
  }
268
- function _toPrimitive(e, D) {
384
+ function _toPrimitive(e, t) {
269
385
  if (typeof e != "object" || !e) return e;
270
- var O = e[Symbol.toPrimitive];
271
- if (O !== void 0) {
272
- var k = O.call(e, D);
273
- if (typeof k != "object") return k;
386
+ var n = e[Symbol.toPrimitive];
387
+ if (n !== void 0) {
388
+ var r = n.call(e, t);
389
+ if (typeof r != "object") return r;
274
390
  throw TypeError("@@toPrimitive must return a primitive value.");
275
391
  }
276
- return (D === "string" ? String : Number)(e);
392
+ return (t === "string" ? String : Number)(e);
277
393
  }
278
394
  function _toPropertyKey(e) {
279
- var D = _toPrimitive(e, "string");
280
- return typeof D == "symbol" ? D : D + "";
395
+ var t = _toPrimitive(e, "string");
396
+ return typeof t == "symbol" ? t : t + "";
281
397
  }
282
- function _unsupportedIterableToArray(e, D) {
398
+ function _unsupportedIterableToArray(e, t) {
283
399
  if (e) {
284
- if (typeof e == "string") return _arrayLikeToArray(e, D);
285
- var O = {}.toString.call(e).slice(8, -1);
286
- return O === "Object" && e.constructor && (O = e.constructor.name), O === "Map" || O === "Set" ? Array.from(e) : O === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O) ? _arrayLikeToArray(e, D) : void 0;
400
+ if (typeof e == "string") return _arrayLikeToArray(e, t);
401
+ var n = {}.toString.call(e).slice(8, -1);
402
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
287
403
  }
288
404
  }
289
405
  var activeFocusTraps = {
290
406
  getActiveTrap: function(e) {
291
407
  return e?.length > 0 ? e[e.length - 1] : null;
292
408
  },
293
- activateTrap: function(e, D) {
294
- D !== activeFocusTraps.getActiveTrap(e) && activeFocusTraps.pauseTrap(e);
295
- var O = e.indexOf(D);
296
- O === -1 || e.splice(O, 1), e.push(D);
409
+ activateTrap: function(e, t) {
410
+ t !== activeFocusTraps.getActiveTrap(e) && activeFocusTraps.pauseTrap(e);
411
+ var n = e.indexOf(t);
412
+ n === -1 || e.splice(n, 1), e.push(t);
297
413
  },
298
- deactivateTrap: function(e, D) {
299
- var O = e.indexOf(D);
300
- O !== -1 && e.splice(O, 1), activeFocusTraps.unpauseTrap(e);
414
+ deactivateTrap: function(e, t) {
415
+ var n = e.indexOf(t);
416
+ n !== -1 && e.splice(n, 1), activeFocusTraps.unpauseTrap(e);
301
417
  },
302
418
  pauseTrap: function(e) {
303
419
  activeFocusTraps.getActiveTrap(e)?._setPausedState(!0);
304
420
  },
305
421
  unpauseTrap: function(e) {
306
- var D = activeFocusTraps.getActiveTrap(e);
307
- D && !D._isManuallyPaused() && D._setPausedState(!1);
422
+ var t = activeFocusTraps.getActiveTrap(e);
423
+ t && !t._isManuallyPaused() && t._setPausedState(!1);
308
424
  }
309
425
  }, isSelectableInput = function(e) {
310
426
  return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
@@ -319,19 +435,19 @@ var activeFocusTraps = {
319
435
  }, delay = function(e) {
320
436
  return setTimeout(e, 0);
321
437
  }, valueOrHandler = function(e) {
322
- var D = [...arguments].slice(1);
323
- return typeof e == "function" ? e.apply(void 0, D) : e;
438
+ var t = [...arguments].slice(1);
439
+ return typeof e == "function" ? e.apply(void 0, t) : e;
324
440
  }, getActualTarget = function(e) {
325
441
  return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
326
- }, internalTrapStack = [], createFocusTrap = function(e, D) {
327
- var O = D?.document || document, k = D?.trapStack || internalTrapStack, A = _objectSpread2({
442
+ }, internalTrapStack = [], createFocusTrap = function(e, t) {
443
+ var n = t?.document || document, r = t?.trapStack || internalTrapStack, i = _objectSpread2({
328
444
  returnFocusOnDeactivate: !0,
329
445
  escapeDeactivates: !0,
330
446
  delayInitialFocus: !0,
331
447
  isolateSubtrees: !1,
332
448
  isKeyForward,
333
449
  isKeyBackward
334
- }, D), j = {
450
+ }, t), a = {
335
451
  containers: [],
336
452
  containerGroups: [],
337
453
  tabbableGroups: [],
@@ -344,325 +460,354 @@ var activeFocusTraps = {
344
460
  manuallyPaused: !1,
345
461
  delayInitialFocusTimer: void 0,
346
462
  recentNavEvent: void 0
347
- }, M, N = function(e, D, O) {
348
- return e && e[D] !== void 0 ? e[D] : A[O || D];
349
- }, P = function(e, D) {
350
- var O = typeof D?.composedPath == "function" ? D.composedPath() : void 0;
351
- return j.containerGroups.findIndex(function(D) {
352
- var k = D.container, A = D.tabbableNodes;
353
- return k.contains(e) || O?.includes(k) || A.find(function(D) {
354
- return D === e;
463
+ }, o, s = function(e, t, n) {
464
+ return e && e[t] !== void 0 ? e[t] : i[n || t];
465
+ }, c = function(e, t) {
466
+ var n = typeof t?.composedPath == "function" ? t.composedPath() : void 0;
467
+ return a.containerGroups.findIndex(function(t) {
468
+ var r = t.container, i = t.tabbableNodes;
469
+ return r.contains(e) || n?.includes(r) || i.find(function(t) {
470
+ return t === e;
355
471
  });
356
472
  });
357
- }, F = function(e) {
358
- var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = D.hasFallback, j = k === void 0 ? !1 : k, M = D.params, N = M === void 0 ? [] : M, P = A[e];
359
- if (typeof P == "function" && (P = P.apply(void 0, _toConsumableArray(N))), P === !0 && (P = void 0), !P) {
360
- if (P === void 0 || P === !1) return P;
473
+ }, l = function(e) {
474
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.hasFallback, a = r === void 0 ? !1 : r, o = t.params, s = o === void 0 ? [] : o, c = i[e];
475
+ if (typeof c == "function" && (c = c.apply(void 0, _toConsumableArray(s))), c === !0 && (c = void 0), !c) {
476
+ if (c === void 0 || c === !1) return c;
361
477
  throw Error(`\`${e}\` was specified but was not a node, or did not return a node`);
362
478
  }
363
- var F = P;
364
- if (typeof P == "string") {
479
+ var l = c;
480
+ if (typeof c == "string") {
365
481
  try {
366
- F = O.querySelector(P);
367
- } catch (D) {
368
- throw Error(`\`${e}\` appears to be an invalid selector; error="${D.message}"`);
482
+ l = n.querySelector(c);
483
+ } catch (t) {
484
+ throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`);
369
485
  }
370
- if (!F && !j) throw Error(`\`${e}\` as selector refers to no known node`);
486
+ if (!l && !a) throw Error(`\`${e}\` as selector refers to no known node`);
371
487
  }
372
- return F;
373
- }, I = function() {
374
- var e = F("initialFocus", { hasFallback: !0 });
488
+ return l;
489
+ }, u = function() {
490
+ var e = l("initialFocus", { hasFallback: !0 });
375
491
  if (e === !1) return !1;
376
- if (e === void 0 || e && !isFocusable(e, A.tabbableOptions)) if (P(O.activeElement) >= 0) e = O.activeElement;
492
+ if (e === void 0 || e && !isFocusable(e, i.tabbableOptions)) if (c(n.activeElement) >= 0) e = n.activeElement;
377
493
  else {
378
- var D = j.tabbableGroups[0];
379
- e = D && D.firstTabbableNode || F("fallbackFocus");
494
+ var t = a.tabbableGroups[0];
495
+ e = t && t.firstTabbableNode || l("fallbackFocus");
380
496
  }
381
- else e === null && (e = F("fallbackFocus"));
497
+ else e === null && (e = l("fallbackFocus"));
382
498
  if (!e) throw Error("Your focus-trap needs to have at least one focusable element");
383
499
  return e;
384
- }, R = function() {
385
- if (j.containerGroups = j.containers.map(function(e) {
386
- var D = tabbable(e, A.tabbableOptions), O = focusable(e, A.tabbableOptions), k = D.length > 0 ? D[0] : void 0, j = D.length > 0 ? D[D.length - 1] : void 0, M = O.find(function(e) {
500
+ }, f = function() {
501
+ if (a.containerGroups = a.containers.map(function(e) {
502
+ var t = tabbable(e, i.tabbableOptions), n = focusable(e, i.tabbableOptions), r = t.length > 0 ? t[0] : void 0, a = t.length > 0 ? t[t.length - 1] : void 0, o = n.find(function(e) {
387
503
  return isTabbable(e);
388
- }), N = O.slice().reverse().find(function(e) {
504
+ }), s = n.slice().reverse().find(function(e) {
389
505
  return isTabbable(e);
390
506
  });
391
507
  return {
392
508
  container: e,
393
- tabbableNodes: D,
394
- focusableNodes: O,
395
- posTabIndexesFound: !!D.find(function(e) {
509
+ tabbableNodes: t,
510
+ focusableNodes: n,
511
+ posTabIndexesFound: !!t.find(function(e) {
396
512
  return getTabIndex(e) > 0;
397
513
  }),
398
- firstTabbableNode: k,
399
- lastTabbableNode: j,
400
- firstDomTabbableNode: M,
401
- lastDomTabbableNode: N,
514
+ firstTabbableNode: r,
515
+ lastTabbableNode: a,
516
+ firstDomTabbableNode: o,
517
+ lastDomTabbableNode: s,
402
518
  nextTabbableNode: function(e) {
403
- var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, A = D.indexOf(e);
404
- return A < 0 ? k ? O.slice(O.indexOf(e) + 1).find(function(e) {
519
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = t.indexOf(e);
520
+ return i < 0 ? r ? n.slice(n.indexOf(e) + 1).find(function(e) {
405
521
  return isTabbable(e);
406
- }) : O.slice(0, O.indexOf(e)).reverse().find(function(e) {
522
+ }) : n.slice(0, n.indexOf(e)).reverse().find(function(e) {
407
523
  return isTabbable(e);
408
- }) : D[A + (k ? 1 : -1)];
524
+ }) : t[i + (r ? 1 : -1)];
409
525
  }
410
526
  };
411
- }), j.tabbableGroups = j.containerGroups.filter(function(e) {
527
+ }), a.tabbableGroups = a.containerGroups.filter(function(e) {
412
528
  return e.tabbableNodes.length > 0;
413
- }), j.tabbableGroups.length <= 0 && !F("fallbackFocus")) throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
414
- if (j.containerGroups.find(function(e) {
529
+ }), a.tabbableGroups.length <= 0 && !l("fallbackFocus")) throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
530
+ if (a.containerGroups.find(function(e) {
415
531
  return e.posTabIndexesFound;
416
- }) && j.containerGroups.length > 1) throw 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.");
417
- }, z = function(e) {
418
- var D = e.activeElement;
419
- if (D) return D.shadowRoot && D.shadowRoot.activeElement !== null ? z(D.shadowRoot) : D;
420
- }, B = function(e) {
421
- if (e !== !1 && e !== z(document)) {
532
+ }) && a.containerGroups.length > 1) throw 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.");
533
+ }, p = function(e) {
534
+ var t = e.activeElement;
535
+ if (t) return t.shadowRoot && t.shadowRoot.activeElement !== null ? p(t.shadowRoot) : t;
536
+ }, m = function(e) {
537
+ if (e !== !1 && e !== p(document)) {
422
538
  if (!e || !e.focus) {
423
- B(I());
539
+ m(u());
424
540
  return;
425
541
  }
426
- e.focus({ preventScroll: !!A.preventScroll }), j.mostRecentlyFocusedNode = e, isSelectableInput(e) && e.select();
542
+ e.focus({ preventScroll: !!i.preventScroll }), a.mostRecentlyFocusedNode = e, isSelectableInput(e) && e.select();
427
543
  }
428
- }, V = function(e) {
429
- var D = F("setReturnFocus", { params: [e] });
430
- return D || (D === !1 ? !1 : e);
431
- }, H = function(e) {
432
- var D = e.target, O = e.event, k = e.isBackward, M = k === void 0 ? !1 : k;
433
- D ||= getActualTarget(O), R();
434
- var N = null;
435
- if (j.tabbableGroups.length > 0) {
436
- var I = P(D, O), z = I >= 0 ? j.containerGroups[I] : void 0;
437
- if (I < 0) N = M ? j.tabbableGroups[j.tabbableGroups.length - 1].lastTabbableNode : j.tabbableGroups[0].firstTabbableNode;
438
- else if (M) {
439
- var B = j.tabbableGroups.findIndex(function(e) {
440
- var O = e.firstTabbableNode;
441
- return D === O;
544
+ }, h = function(e) {
545
+ var t = l("setReturnFocus", { params: [e] });
546
+ return t || (t === !1 ? !1 : e);
547
+ }, g = function(e) {
548
+ var t = e.target, n = e.event, r = e.isBackward, o = r === void 0 ? !1 : r;
549
+ t ||= getActualTarget(n), f();
550
+ var s = null;
551
+ if (a.tabbableGroups.length > 0) {
552
+ var u = c(t, n), p = u >= 0 ? a.containerGroups[u] : void 0;
553
+ if (u < 0) s = o ? a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : a.tabbableGroups[0].firstTabbableNode;
554
+ else if (o) {
555
+ var m = a.tabbableGroups.findIndex(function(e) {
556
+ var n = e.firstTabbableNode;
557
+ return t === n;
442
558
  });
443
- if (B < 0 && (z.container === D || isFocusable(D, A.tabbableOptions) && !isTabbable(D, A.tabbableOptions) && !z.nextTabbableNode(D, !1)) && (B = I), B >= 0) {
444
- var V = B === 0 ? j.tabbableGroups.length - 1 : B - 1, H = j.tabbableGroups[V];
445
- N = getTabIndex(D) >= 0 ? H.lastTabbableNode : H.lastDomTabbableNode;
446
- } else isTabEvent(O) || (N = z.nextTabbableNode(D, !1));
559
+ if (m < 0 && (p.container === t || isFocusable(t, i.tabbableOptions) && !isTabbable(t, i.tabbableOptions) && !p.nextTabbableNode(t, !1)) && (m = u), m >= 0) {
560
+ var h = m === 0 ? a.tabbableGroups.length - 1 : m - 1, g = a.tabbableGroups[h];
561
+ s = getTabIndex(t) >= 0 ? g.lastTabbableNode : g.lastDomTabbableNode;
562
+ } else isTabEvent(n) || (s = p.nextTabbableNode(t, !1));
447
563
  } else {
448
- var U = j.tabbableGroups.findIndex(function(e) {
449
- var O = e.lastTabbableNode;
450
- return D === O;
564
+ var _ = a.tabbableGroups.findIndex(function(e) {
565
+ var n = e.lastTabbableNode;
566
+ return t === n;
451
567
  });
452
- if (U < 0 && (z.container === D || isFocusable(D, A.tabbableOptions) && !isTabbable(D, A.tabbableOptions) && !z.nextTabbableNode(D)) && (U = I), U >= 0) {
453
- var W = U === j.tabbableGroups.length - 1 ? 0 : U + 1, G = j.tabbableGroups[W];
454
- N = getTabIndex(D) >= 0 ? G.firstTabbableNode : G.firstDomTabbableNode;
455
- } else isTabEvent(O) || (N = z.nextTabbableNode(D));
568
+ if (_ < 0 && (p.container === t || isFocusable(t, i.tabbableOptions) && !isTabbable(t, i.tabbableOptions) && !p.nextTabbableNode(t)) && (_ = u), _ >= 0) {
569
+ var v = _ === a.tabbableGroups.length - 1 ? 0 : _ + 1, y = a.tabbableGroups[v];
570
+ s = getTabIndex(t) >= 0 ? y.firstTabbableNode : y.firstDomTabbableNode;
571
+ } else isTabEvent(n) || (s = p.nextTabbableNode(t));
456
572
  }
457
- } else N = F("fallbackFocus");
458
- return N;
459
- }, U = function(e) {
460
- if (!(P(getActualTarget(e), e) >= 0)) {
461
- if (valueOrHandler(A.clickOutsideDeactivates, e)) {
462
- M.deactivate({ returnFocus: A.returnFocusOnDeactivate });
573
+ } else s = l("fallbackFocus");
574
+ return s;
575
+ }, _ = function(e) {
576
+ if (!(c(getActualTarget(e), e) >= 0)) {
577
+ if (valueOrHandler(i.clickOutsideDeactivates, e)) {
578
+ o.deactivate({ returnFocus: i.returnFocusOnDeactivate });
463
579
  return;
464
580
  }
465
- valueOrHandler(A.allowOutsideClick, e) || e.preventDefault();
581
+ valueOrHandler(i.allowOutsideClick, e) || e.preventDefault();
466
582
  }
467
- }, W = function(e) {
468
- var D = getActualTarget(e), O = P(D, e) >= 0;
469
- if (O || D instanceof Document) O && (j.mostRecentlyFocusedNode = D);
583
+ }, v = function(e) {
584
+ var t = getActualTarget(e), n = c(t, e) >= 0;
585
+ if (n || t instanceof Document) n && (a.mostRecentlyFocusedNode = t);
470
586
  else {
471
587
  e.stopImmediatePropagation();
472
- var k, M = !0;
473
- if (j.mostRecentlyFocusedNode) if (getTabIndex(j.mostRecentlyFocusedNode) > 0) {
474
- var N = P(j.mostRecentlyFocusedNode), F = j.containerGroups[N].tabbableNodes;
475
- if (F.length > 0) {
476
- var R = F.findIndex(function(e) {
477
- return e === j.mostRecentlyFocusedNode;
588
+ var r, o = !0;
589
+ if (a.mostRecentlyFocusedNode) if (getTabIndex(a.mostRecentlyFocusedNode) > 0) {
590
+ var s = c(a.mostRecentlyFocusedNode), l = a.containerGroups[s].tabbableNodes;
591
+ if (l.length > 0) {
592
+ var f = l.findIndex(function(e) {
593
+ return e === a.mostRecentlyFocusedNode;
478
594
  });
479
- R >= 0 && (A.isKeyForward(j.recentNavEvent) ? R + 1 < F.length && (k = F[R + 1], M = !1) : R - 1 >= 0 && (k = F[R - 1], M = !1));
595
+ f >= 0 && (i.isKeyForward(a.recentNavEvent) ? f + 1 < l.length && (r = l[f + 1], o = !1) : f - 1 >= 0 && (r = l[f - 1], o = !1));
480
596
  }
481
- } else j.containerGroups.some(function(e) {
597
+ } else a.containerGroups.some(function(e) {
482
598
  return e.tabbableNodes.some(function(e) {
483
599
  return getTabIndex(e) > 0;
484
600
  });
485
- }) || (M = !1);
486
- else M = !1;
487
- M && (k = H({
488
- target: j.mostRecentlyFocusedNode,
489
- isBackward: A.isKeyBackward(j.recentNavEvent)
490
- })), B(k || j.mostRecentlyFocusedNode || I());
601
+ }) || (o = !1);
602
+ else o = !1;
603
+ o && (r = g({
604
+ target: a.mostRecentlyFocusedNode,
605
+ isBackward: i.isKeyBackward(a.recentNavEvent)
606
+ })), m(r || a.mostRecentlyFocusedNode || u());
491
607
  }
492
- j.recentNavEvent = void 0;
493
- }, G = function(e) {
494
- var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
495
- j.recentNavEvent = e;
496
- var O = H({
608
+ a.recentNavEvent = void 0;
609
+ }, y = function(e) {
610
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
611
+ a.recentNavEvent = e;
612
+ var n = g({
497
613
  event: e,
498
- isBackward: D
614
+ isBackward: t
499
615
  });
500
- O && (isTabEvent(e) && e.preventDefault(), B(O));
501
- }, K = function(e) {
502
- (A.isKeyForward(e) || A.isKeyBackward(e)) && G(e, A.isKeyBackward(e));
503
- }, q = function(e) {
504
- isEscapeEvent(e) && valueOrHandler(A.escapeDeactivates, e) !== !1 && (e.preventDefault(), M.deactivate());
505
- }, J = function(e) {
506
- P(getActualTarget(e), e) >= 0 || valueOrHandler(A.clickOutsideDeactivates, e) || valueOrHandler(A.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
507
- }, Y = function() {
508
- if (j.active) return activeFocusTraps.activateTrap(k, M), j.delayInitialFocusTimer = A.delayInitialFocus ? delay(function() {
509
- B(I());
510
- }) : B(I()), O.addEventListener("focusin", W, !0), O.addEventListener("mousedown", U, {
616
+ n && (isTabEvent(e) && e.preventDefault(), m(n));
617
+ }, b = function(e) {
618
+ (i.isKeyForward(e) || i.isKeyBackward(e)) && y(e, i.isKeyBackward(e));
619
+ }, x = function(e) {
620
+ isEscapeEvent(e) && valueOrHandler(i.escapeDeactivates, e) !== !1 && (e.preventDefault(), o.deactivate());
621
+ }, S = function(e) {
622
+ c(getActualTarget(e), e) >= 0 || valueOrHandler(i.clickOutsideDeactivates, e) || valueOrHandler(i.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
623
+ }, C = function() {
624
+ if (!a.active) return Promise.resolve();
625
+ activeFocusTraps.activateTrap(r, o);
626
+ var e;
627
+ return i.delayInitialFocus ? e = new Promise(function(e) {
628
+ a.delayInitialFocusTimer = delay(function() {
629
+ m(u()), e();
630
+ });
631
+ }) : (e = Promise.resolve(), m(u())), n.addEventListener("focusin", v, !0), n.addEventListener("mousedown", _, {
511
632
  capture: !0,
512
633
  passive: !1
513
- }), O.addEventListener("touchstart", U, {
634
+ }), n.addEventListener("touchstart", _, {
514
635
  capture: !0,
515
636
  passive: !1
516
- }), O.addEventListener("click", J, {
637
+ }), n.addEventListener("click", S, {
517
638
  capture: !0,
518
639
  passive: !1
519
- }), O.addEventListener("keydown", K, {
640
+ }), n.addEventListener("keydown", b, {
520
641
  capture: !0,
521
642
  passive: !1
522
- }), O.addEventListener("keydown", q), M;
523
- }, X = function(e) {
524
- j.active && !j.paused && M._setSubtreeIsolation(!1), j.adjacentElements.clear(), j.alreadySilent.clear();
525
- var D = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Set(), k = _createForOfIteratorHelper(e), A;
643
+ }), n.addEventListener("keydown", x), e;
644
+ }, w = function(e) {
645
+ a.active && !a.paused && o._setSubtreeIsolation(!1), a.adjacentElements.clear(), a.alreadySilent.clear();
646
+ var t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = _createForOfIteratorHelper(e), i;
526
647
  try {
527
- for (k.s(); !(A = k.n()).done;) {
528
- var N = A.value;
529
- D.add(N);
530
- for (var P = typeof ShadowRoot < "u" && N.getRootNode() instanceof ShadowRoot, F = N; F;) {
531
- D.add(F);
532
- var I = F.parentElement, L = [];
533
- I ? L = I.children : !I && P && (L = F.getRootNode().children, I = F.getRootNode().host, P = typeof ShadowRoot < "u" && I.getRootNode() instanceof ShadowRoot);
534
- var R = _createForOfIteratorHelper(L), z;
648
+ for (r.s(); !(i = r.n()).done;) {
649
+ var s = i.value;
650
+ t.add(s);
651
+ for (var c = typeof ShadowRoot < "u" && s.getRootNode() instanceof ShadowRoot, l = s; l;) {
652
+ t.add(l);
653
+ var u = l.parentElement, d = [];
654
+ u ? d = u.children : !u && c && (d = l.getRootNode().children, u = l.getRootNode().host, c = typeof ShadowRoot < "u" && u.getRootNode() instanceof ShadowRoot);
655
+ var f = _createForOfIteratorHelper(d), p;
535
656
  try {
536
- for (R.s(); !(z = R.n()).done;) {
537
- var B = z.value;
538
- O.add(B);
657
+ for (f.s(); !(p = f.n()).done;) {
658
+ var m = p.value;
659
+ n.add(m);
539
660
  }
540
661
  } catch (e) {
541
- R.e(e);
662
+ f.e(e);
542
663
  } finally {
543
- R.f();
664
+ f.f();
544
665
  }
545
- F = I;
666
+ l = u;
546
667
  }
547
668
  }
548
669
  } catch (e) {
549
- k.e(e);
670
+ r.e(e);
550
671
  } finally {
551
- k.f();
672
+ r.f();
552
673
  }
553
- D.forEach(function(e) {
554
- O.delete(e);
555
- }), j.adjacentElements = O;
556
- }, Z = function() {
557
- if (j.active) return O.removeEventListener("focusin", W, !0), O.removeEventListener("mousedown", U, !0), O.removeEventListener("touchstart", U, !0), O.removeEventListener("click", J, !0), O.removeEventListener("keydown", K, !0), O.removeEventListener("keydown", q), M;
558
- }, Q = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(e) {
674
+ t.forEach(function(e) {
675
+ n.delete(e);
676
+ }), a.adjacentElements = n;
677
+ }, T = function() {
678
+ if (a.active) return n.removeEventListener("focusin", v, !0), n.removeEventListener("mousedown", _, !0), n.removeEventListener("touchstart", _, !0), n.removeEventListener("click", S, !0), n.removeEventListener("keydown", b, !0), n.removeEventListener("keydown", x), o;
679
+ }, E = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(e) {
559
680
  e.some(function(e) {
560
681
  return Array.from(e.removedNodes).some(function(e) {
561
- return e === j.mostRecentlyFocusedNode;
682
+ return e === a.mostRecentlyFocusedNode;
562
683
  });
563
- }) && B(I());
564
- }) : void 0, $ = function() {
565
- Q && (Q.disconnect(), j.active && !j.paused && j.containers.map(function(e) {
566
- Q.observe(e, {
684
+ }) && m(u());
685
+ }) : void 0, D = function() {
686
+ E && (E.disconnect(), a.active && !a.paused && a.containers.map(function(e) {
687
+ E.observe(e, {
567
688
  subtree: !0,
568
689
  childList: !0
569
690
  });
570
691
  }));
571
692
  };
572
- return M = {
693
+ return o = {
573
694
  get active() {
574
- return j.active;
695
+ return a.active;
575
696
  },
576
697
  get paused() {
577
- return j.paused;
698
+ return a.paused;
578
699
  },
579
700
  activate: function(e) {
580
- if (j.active) return this;
581
- var D = N(e, "onActivate"), P = N(e, "onPostActivate"), F = N(e, "checkCanFocusTrap"), I = activeFocusTraps.getActiveTrap(k), L = !1;
582
- if (I && !I.paused) {
583
- var B;
584
- (B = I._setSubtreeIsolation) == null || B.call(I, !1), L = !0;
701
+ if (a.active) return this;
702
+ var t = s(e, "onActivate"), i = s(e, "onPostActivate"), c = s(e, "checkCanFocusTrap"), l = activeFocusTraps.getActiveTrap(r), u = !1;
703
+ if (l && !l.paused) {
704
+ var d;
705
+ (d = l._setSubtreeIsolation) == null || d.call(l, !1), u = !0;
585
706
  }
586
707
  try {
587
- F || R(), j.active = !0, j.paused = !1, j.nodeFocusedBeforeActivation = z(O), D?.();
588
- var V = function() {
589
- F && R(), Y(), $(), A.isolateSubtrees && M._setSubtreeIsolation(!0), P?.();
590
- };
591
- if (F) return F(j.containers.concat()).then(V, V), this;
592
- V();
708
+ c || f(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = p(n), t?.();
709
+ var m = /* @__PURE__ */ function() {
710
+ var e = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function e() {
711
+ return _regenerator().w(function(e) {
712
+ for (;;) switch (e.n) {
713
+ case 0: return c && f(), e.n = 1, C();
714
+ case 1: o._setSubtreeIsolation(!0), D(), i?.();
715
+ case 2: return e.a(2);
716
+ }
717
+ }, e);
718
+ }));
719
+ return function() {
720
+ return e.apply(this, arguments);
721
+ };
722
+ }();
723
+ if (c) return c(a.containers.concat()).then(m, m), this;
724
+ m();
593
725
  } catch (e) {
594
- if (I === activeFocusTraps.getActiveTrap(k) && L) {
595
- var H;
596
- (H = I._setSubtreeIsolation) == null || H.call(I, !0);
726
+ if (l === activeFocusTraps.getActiveTrap(r) && u) {
727
+ var h;
728
+ (h = l._setSubtreeIsolation) == null || h.call(l, !0);
597
729
  }
598
730
  throw e;
599
731
  }
600
732
  return this;
601
733
  },
602
734
  deactivate: function(e) {
603
- if (!j.active) return this;
604
- var D = _objectSpread2({
605
- onDeactivate: A.onDeactivate,
606
- onPostDeactivate: A.onPostDeactivate,
607
- checkCanReturnFocus: A.checkCanReturnFocus
735
+ if (!a.active) return this;
736
+ var t = _objectSpread2({
737
+ onDeactivate: i.onDeactivate,
738
+ onPostDeactivate: i.onPostDeactivate,
739
+ checkCanReturnFocus: i.checkCanReturnFocus
608
740
  }, e);
609
- clearTimeout(j.delayInitialFocusTimer), j.delayInitialFocusTimer = void 0, j.paused || M._setSubtreeIsolation(!1), j.alreadySilent.clear(), Z(), j.active = !1, j.paused = !1, $(), activeFocusTraps.deactivateTrap(k, M);
610
- var O = N(D, "onDeactivate"), P = N(D, "onPostDeactivate"), F = N(D, "checkCanReturnFocus"), I = N(D, "returnFocus", "returnFocusOnDeactivate");
611
- O?.();
612
- var L = function() {
741
+ clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, a.paused || o._setSubtreeIsolation(!1), a.alreadySilent.clear(), T(), a.active = !1, a.paused = !1, D(), activeFocusTraps.deactivateTrap(r, o);
742
+ var n = s(t, "onDeactivate"), c = s(t, "onPostDeactivate"), l = s(t, "checkCanReturnFocus"), u = s(t, "returnFocus", "returnFocusOnDeactivate");
743
+ n?.();
744
+ var d = function() {
613
745
  delay(function() {
614
- I && B(V(j.nodeFocusedBeforeActivation)), P?.();
746
+ u && m(h(a.nodeFocusedBeforeActivation)), c?.();
615
747
  });
616
748
  };
617
- return I && F ? (F(V(j.nodeFocusedBeforeActivation)).then(L, L), this) : (L(), this);
749
+ return u && l ? (l(h(a.nodeFocusedBeforeActivation)).then(d, d), this) : (d(), this);
618
750
  },
619
751
  pause: function(e) {
620
- return j.active ? (j.manuallyPaused = !0, this._setPausedState(!0, e)) : this;
752
+ return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, e)) : this;
621
753
  },
622
754
  unpause: function(e) {
623
- return !j.active || (j.manuallyPaused = !1, k[k.length - 1] !== this) ? this : this._setPausedState(!1, e);
755
+ return !a.active || (a.manuallyPaused = !1, r[r.length - 1] !== this) ? this : this._setPausedState(!1, e);
624
756
  },
625
757
  updateContainerElements: function(e) {
626
- return j.containers = [].concat(e).filter(Boolean).map(function(e) {
627
- return typeof e == "string" ? O.querySelector(e) : e;
628
- }), A.isolateSubtrees && X(j.containers), j.active && (R(), A.isolateSubtrees && !j.paused && M._setSubtreeIsolation(!0)), $(), this;
758
+ return a.containers = [].concat(e).filter(Boolean).map(function(e) {
759
+ return typeof e == "string" ? n.querySelector(e) : e;
760
+ }), i.isolateSubtrees && w(a.containers), a.active && (f(), a.paused || o._setSubtreeIsolation(!0)), D(), this;
629
761
  }
630
- }, Object.defineProperties(M, {
762
+ }, Object.defineProperties(o, {
631
763
  _isManuallyPaused: { value: function() {
632
- return j.manuallyPaused;
764
+ return a.manuallyPaused;
633
765
  } },
634
- _setPausedState: { value: function(e, D) {
635
- if (j.paused === e) return this;
636
- if (j.paused = e, e) {
637
- var O = N(D, "onPause"), k = N(D, "onPostPause");
638
- O?.(), Z(), $(), M._setSubtreeIsolation(!1), k?.();
766
+ _setPausedState: { value: function(e, t) {
767
+ if (a.paused === e) return this;
768
+ if (a.paused = e, e) {
769
+ var n = s(t, "onPause"), r = s(t, "onPostPause");
770
+ n?.(), T(), o._setSubtreeIsolation(!1), D(), r?.();
639
771
  } else {
640
- var A = N(D, "onUnpause"), P = N(D, "onPostUnpause");
641
- A?.(), M._setSubtreeIsolation(!0), R(), Y(), $(), P?.();
772
+ var i = s(t, "onUnpause"), c = s(t, "onPostUnpause");
773
+ i?.(), (/* @__PURE__ */ (function() {
774
+ var e = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function e() {
775
+ return _regenerator().w(function(e) {
776
+ for (;;) switch (e.n) {
777
+ case 0: return f(), e.n = 1, C();
778
+ case 1: o._setSubtreeIsolation(!0), D(), c?.();
779
+ case 2: return e.a(2);
780
+ }
781
+ }, e);
782
+ }));
783
+ return function() {
784
+ return e.apply(this, arguments);
785
+ };
786
+ })())();
642
787
  }
643
788
  return this;
644
789
  } },
645
790
  _setSubtreeIsolation: { value: function(e) {
646
- A.isolateSubtrees && j.adjacentElements.forEach(function(D) {
647
- if (e) switch (A.isolateSubtrees) {
791
+ i.isolateSubtrees && a.adjacentElements.forEach(function(t) {
792
+ if (e) switch (i.isolateSubtrees) {
648
793
  case "aria-hidden":
649
- (D.ariaHidden === "true" || D.getAttribute("aria-hidden")?.toLowerCase() === "true") && j.alreadySilent.add(D), D.setAttribute("aria-hidden", "true");
794
+ (t.ariaHidden === "true" || t.getAttribute("aria-hidden")?.toLowerCase() === "true") && a.alreadySilent.add(t), t.setAttribute("aria-hidden", "true");
650
795
  break;
651
796
  default:
652
- (D.inert || D.hasAttribute("inert")) && j.alreadySilent.add(D), D.setAttribute("inert", !0);
797
+ (t.inert || t.hasAttribute("inert")) && a.alreadySilent.add(t), t.setAttribute("inert", !0);
653
798
  break;
654
799
  }
655
- else if (!j.alreadySilent.has(D)) switch (A.isolateSubtrees) {
800
+ else if (!a.alreadySilent.has(t)) switch (i.isolateSubtrees) {
656
801
  case "aria-hidden":
657
- D.removeAttribute("aria-hidden");
802
+ t.removeAttribute("aria-hidden");
658
803
  break;
659
804
  default:
660
- D.removeAttribute("inert");
805
+ t.removeAttribute("inert");
661
806
  break;
662
807
  }
663
808
  });
664
809
  } }
665
- }), M.updateContainerElements(e), M;
810
+ }), o.updateContainerElements(e), o;
666
811
  }, GlobalToggle = class extends HTMLElement {
667
812
  internals_;
668
813
  controller;
@@ -691,34 +836,34 @@ var activeFocusTraps = {
691
836
  allowOutsideClick: !0,
692
837
  onActivate: () => document.body.classList.add(this.scrollLockClass),
693
838
  onDeactivate: () => document.body.classList.remove(this.scrollLockClass),
694
- checkCanFocusTrap: ([e]) => new Promise((D) => {
695
- let O = setInterval(() => {
696
- getComputedStyle(e).visibility !== "hidden" && (D(), clearInterval(O));
839
+ checkCanFocusTrap: ([e]) => new Promise((t) => {
840
+ let n = setInterval(() => {
841
+ getComputedStyle(e).visibility !== "hidden" && (t(), clearInterval(n));
697
842
  }, 5);
698
843
  })
699
844
  });
700
- let { signal: D } = this.controller;
701
- this.handleBreakpoint(this.breakpoint), this.breakpoint.addEventListener("change", this.handleBreakpoint, { signal: D }), document.addEventListener("keydown", this.handleKeyDown, { signal: D });
845
+ let { signal: t } = this.controller;
846
+ this.handleBreakpoint(this.breakpoint), this.breakpoint.addEventListener("change", this.handleBreakpoint, { signal: t }), document.addEventListener("keydown", this.handleKeyDown, { signal: t });
702
847
  }
703
848
  disconnectedCallback() {
704
849
  this.widget.detach(), this.controller.abort();
705
850
  }
706
851
  handleBreakpoint = ({ matches: e }) => {
707
852
  if (!this.trigger) return;
708
- let { signal: D } = this.controller;
709
- e ? (this.widget.attach(), this.target.setAttribute("inert", ""), this.trigger.addEventListener("disclosure-toggle", this.handleDisclosure, { signal: D })) : (this.widget.detach(), this.target.removeAttribute("inert"), this.target.classList.remove(this.scrollLockClass), this.trigger.removeEventListener("disclosure-toggle", this.handleDisclosure), this.focusTrap.deactivate());
853
+ let { signal: t } = this.controller;
854
+ e ? (this.widget.attach(), this.target.setAttribute("inert", ""), this.trigger.addEventListener("disclosure-toggle", this.handleDisclosure, { signal: t })) : (this.widget.detach(), this.target.removeAttribute("inert"), this.target.classList.remove(this.scrollLockClass), this.trigger.removeEventListener("disclosure-toggle", this.handleDisclosure), this.focusTrap.deactivate());
710
855
  };
711
856
  handleDisclosure = ({ detail: e }) => {
712
- let { isOpen: D } = e, O = D ? "Open" : "Close", k = D ? "Close" : "Open";
713
- this.trigger.textContent = this.triggerText.replace(O, k), D ? this.focusTrap.activate() : this.focusTrap.deactivate(), D && this.hideOther && this.otherTrigger && this.otherTrigger.getAttribute("aria-expanded") === "true" && this.otherTrigger.click(), this.trigger.classList.toggle(this.isSearch ? this.searchIconClass : this.menuIconClass), this.trigger.classList.toggle(this.closeIconClass), this.target.classList.toggle(this.backgroundClass), this.trigger.removeAttribute("no-focus"), this.isOpen = D;
857
+ let { isOpen: t } = e, n = t ? "Open" : "Close", r = t ? "Close" : "Open";
858
+ this.trigger.textContent = this.triggerText.replace(n, r), t ? this.focusTrap.activate() : this.focusTrap.deactivate(), t && this.hideOther && this.otherTrigger && this.otherTrigger.getAttribute("aria-expanded") === "true" && this.otherTrigger.click(), this.trigger.classList.toggle(this.isSearch ? this.searchIconClass : this.menuIconClass), this.trigger.classList.toggle(this.closeIconClass), this.target.classList.toggle(this.backgroundClass), this.trigger.removeAttribute("no-focus"), this.isOpen = t;
714
859
  };
715
860
  handleKeyDown = (e) => {
716
861
  this.isOpen && e.key === "Escape" && this.widget.handleToggle();
717
862
  };
718
863
  get trigger() {
719
- let e = this.querySelector(":scope > button"), D = e.getAttribute("aria-controls");
720
- if (!e || !D) throw Error(`${this.localName} must contain a <button aria-controls="element-to-trigger"> element.`);
721
- return e.removeAttribute("disabled"), this.controls = D, this.triggerText = e.textContent, e;
864
+ let e = this.querySelector(":scope > button"), t = e.getAttribute("aria-controls");
865
+ if (!e || !t) throw Error(`${this.localName} must contain a <button aria-controls="element-to-trigger"> element.`);
866
+ return e.removeAttribute("disabled"), this.controls = t, this.triggerText = e.textContent, e;
722
867
  }
723
868
  get target() {
724
869
  let e = document.querySelector(`div[id="${this.controls}"]`);