vrembem 4.0.0-next.1 → 4.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dev/index.js CHANGED
@@ -2,32 +2,32 @@ var b$2 = (t, e, n) => {
2
2
  if (!e.has(t))
3
3
  throw TypeError("Cannot " + n);
4
4
  };
5
- var o$1 = (t, e, n) => (b$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), f$2 = (t, e, n) => {
5
+ var o$1 = (t, e, n) => (b$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), h$2 = (t, e, n) => {
6
6
  if (e.has(t))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
9
- }, a = (t, e, n, i2) => (b$2(t, e, "write to private field"), i2 ? i2.call(t, n) : e.set(t, n), n);
10
- var r$2;
9
+ }, a = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
10
+ var l$1;
11
11
  let $$2 = class $ {
12
12
  constructor(e, n) {
13
- f$2(this, r$2, void 0);
14
- this.value = e, a(this, r$2, n), this.mql = null;
13
+ h$2(this, l$1, void 0);
14
+ this.value = e, a(this, l$1, n), this.mql = null;
15
15
  }
16
16
  get handler() {
17
- return o$1(this, r$2);
17
+ return o$1(this, l$1);
18
18
  }
19
19
  // Unmount existing handler before setting a new one.
20
20
  set handler(e) {
21
- this.mql && (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", o$1(this, r$2)) : this.mql.removeListener(o$1(this, r$2))), a(this, r$2, e);
21
+ this.mql && (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", o$1(this, l$1)) : this.mql.removeListener(o$1(this, l$1))), a(this, l$1, e);
22
22
  }
23
23
  mount(e, n) {
24
- return e && (this.value = e), n && a(this, r$2, n), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), typeof this.mql.addEventListener == "function" ? this.mql.addEventListener("change", o$1(this, r$2)) : this.mql.addListener(o$1(this, r$2)), o$1(this, r$2).call(this, this.mql), this) : this;
24
+ return e && (this.value = e), n && a(this, l$1, n), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), typeof this.mql.addEventListener == "function" ? this.mql.addEventListener("change", o$1(this, l$1)) : this.mql.addListener(o$1(this, l$1)), o$1(this, l$1).call(this, this.mql), this) : this;
25
25
  }
26
26
  unmount() {
27
- return this.mql ? (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", o$1(this, r$2)) : this.mql.removeListener(o$1(this, r$2)), this.value = null, a(this, r$2, null), this.mql = null, this) : this;
27
+ return this.mql ? (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", o$1(this, l$1)) : this.mql.removeListener(o$1(this, l$1)), this.value = null, a(this, l$1, null), this.mql = null, this) : this;
28
28
  }
29
29
  };
30
- r$2 = /* @__PURE__ */ new WeakMap();
30
+ l$1 = /* @__PURE__ */ new WeakMap();
31
31
  let T$2 = class T {
32
32
  constructor() {
33
33
  this.collection = [];
@@ -36,11 +36,11 @@ let T$2 = class T {
36
36
  return await this.deregister(e), this.collection.push(e), this.collection;
37
37
  }
38
38
  async deregister(e) {
39
- const n = this.collection.findIndex((i2) => i2 === e);
39
+ const n = this.collection.findIndex((i) => i === e);
40
40
  if (n >= 0) {
41
- const i2 = this.collection[n];
42
- Object.getOwnPropertyNames(i2).forEach((l2) => {
43
- delete i2[l2];
41
+ const i = this.collection[n];
42
+ Object.getOwnPropertyNames(i).forEach((r2) => {
43
+ delete i[r2];
44
44
  }), this.collection.splice(n, 1);
45
45
  }
46
46
  return this.collection;
@@ -56,7 +56,7 @@ let T$2 = class T {
56
56
  return this.collection;
57
57
  }
58
58
  get(e, n = "id") {
59
- return this.collection.find((i2) => i2[n] === e);
59
+ return this.collection.find((i) => i[n] === e);
60
60
  }
61
61
  };
62
62
  const s = {
@@ -81,19 +81,19 @@ const s = {
81
81
  `[contenteditable]${s.inert}${s.negTabIndex}`,
82
82
  `[tabindex]${s.inert}${s.negTabIndex}`
83
83
  ];
84
- var h$2, d$1, u$2;
84
+ var f$2, d$1, u$2;
85
85
  let x$1 = class x {
86
86
  constructor(e = null, n = "[data-focus]") {
87
- f$2(this, h$2, void 0);
88
- f$2(this, d$1, void 0);
89
- f$2(this, u$2, void 0);
90
- this.el = e, this.selectorFocus = n, a(this, d$1, p$2.bind(this)), a(this, u$2, g$2.bind(this));
87
+ h$2(this, f$2, void 0);
88
+ h$2(this, d$1, void 0);
89
+ h$2(this, u$2, void 0);
90
+ this.el = e, this.selectorFocus = n, a(this, d$1, g$2.bind(this)), a(this, u$2, p$2.bind(this));
91
91
  }
92
92
  get focusable() {
93
- return o$1(this, h$2);
93
+ return o$1(this, f$2);
94
94
  }
95
95
  set focusable(e) {
96
- a(this, h$2, e), o$1(this, h$2).length ? (document.removeEventListener("keydown", o$1(this, u$2)), document.addEventListener("keydown", o$1(this, d$1))) : (document.removeEventListener("keydown", o$1(this, d$1)), document.addEventListener("keydown", o$1(this, u$2)));
96
+ a(this, f$2, e), o$1(this, f$2).length ? (document.removeEventListener("keydown", o$1(this, u$2)), document.addEventListener("keydown", o$1(this, d$1))) : (document.removeEventListener("keydown", o$1(this, d$1)), document.addEventListener("keydown", o$1(this, u$2)));
97
97
  }
98
98
  get focusableFirst() {
99
99
  return this.focusable[0];
@@ -111,63 +111,63 @@ let x$1 = class x {
111
111
  (e.querySelector(n) || e).focus();
112
112
  }
113
113
  getFocusable(e = this.el) {
114
- const n = [], i2 = document.activeElement, l2 = e.scrollTop;
114
+ const n = [], i = document.activeElement, r2 = e.scrollTop;
115
115
  return e.querySelectorAll(v$2.join(",")).forEach((m2) => {
116
116
  m2.focus(), document.activeElement === m2 && n.push(m2);
117
- }), e.scrollTop = l2, i2.focus(), n;
117
+ }), e.scrollTop = r2, i.focus(), n;
118
118
  }
119
119
  };
120
- h$2 = /* @__PURE__ */ new WeakMap(), d$1 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap();
121
- function p$2(t) {
120
+ f$2 = /* @__PURE__ */ new WeakMap(), d$1 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap();
121
+ function g$2(t) {
122
122
  (t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
123
123
  }
124
- function g$2(t) {
124
+ function p$2(t) {
125
125
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
126
126
  }
127
127
  function q$2(t, e) {
128
- const i2 = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
129
- return i2 ? JSON.parse(i2) : {};
128
+ const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
129
+ return i ? JSON.parse(i) : {};
130
130
  }
131
131
  function I$3() {
132
132
  return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
133
133
  }
134
134
  function C$2(t, e = true) {
135
- const n = localStorage.getItem(t), i2 = n ? JSON.parse(n) : {};
135
+ const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
136
136
  return {
137
- get(l2) {
138
- return l2 ? i2[l2] : i2;
137
+ get(r2) {
138
+ return r2 ? i[r2] : i;
139
139
  },
140
- set(l2, c2) {
141
- return c2 ? i2[l2] = c2 : delete i2[l2], e && localStorage.setItem(t, JSON.stringify(i2)), i2;
140
+ set(r2, c2) {
141
+ return c2 ? i[r2] = c2 : delete i[r2], e && localStorage.setItem(t, JSON.stringify(i)), i;
142
142
  }
143
143
  };
144
144
  }
145
145
  function O$2(t, e, n) {
146
- const i2 = e.nodeType === Node.COMMENT_NODE, l2 = e.nodeType === Node.ELEMENT_NODE;
147
- if (e = i2 || l2 ? e : document.querySelector(e), i2 && (n = "after"), !e)
146
+ const i = e.nodeType === Node.COMMENT_NODE, r2 = e.nodeType === Node.ELEMENT_NODE;
147
+ if (e = i || r2 ? e : document.querySelector(e), i && (n = "after"), !e)
148
148
  throw new Error(`Not a valid teleport reference: '${e}'`);
149
149
  if (typeof e[n] != "function")
150
150
  throw new Error(`Not a valid teleport method: '${n}'`);
151
151
  let c2 = null;
152
- return i2 || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i2 && e.remove(), c2;
152
+ return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
153
153
  }
154
154
  const S$3 = (t, e) => new Promise((n) => {
155
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
156
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend", i2);
155
+ e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(r2) {
156
+ r2.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend", i));
157
157
  })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), n(t));
158
158
  }), F$3 = (t, e) => new Promise((n) => {
159
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
160
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend", i2);
159
+ e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(r2) {
160
+ r2.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend", i));
161
161
  })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), n(t));
162
162
  });
163
163
  function y$2(t, e) {
164
- e && document.querySelectorAll(e).forEach((i2) => {
165
- t ? i2.style.overflow = "hidden" : i2.style.removeProperty("overflow");
164
+ e && document.querySelectorAll(e).forEach((i) => {
165
+ t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
166
166
  });
167
167
  }
168
168
  function L$2(t, e) {
169
- e && document.querySelectorAll(e).forEach((i2) => {
170
- t ? (i2.inert = true, i2.setAttribute("aria-hidden", true)) : (i2.inert = null, i2.removeAttribute("aria-hidden"));
169
+ e && document.querySelectorAll(e).forEach((i) => {
170
+ t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
171
171
  });
172
172
  }
173
173
  function k$3(t, e) {
@@ -186,43 +186,6 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
186
186
  teleport: O$2,
187
187
  updateGlobalState: k$3
188
188
  }, Symbol.toStringTag, { value: "Module" }));
189
- const i = {
190
- autoInit: false,
191
- stateAttr: "aria-checked",
192
- stateValue: "mixed"
193
- };
194
- let r$1 = class r {
195
- constructor(t) {
196
- this.defaults = i, this.settings = { ...this.defaults, ...t }, this.__handlerClick = this.handlerClick.bind(this), this.settings.autoInit && this.init();
197
- }
198
- init(t = null) {
199
- t && (this.settings = { ...this.settings, ...t });
200
- const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = document.querySelectorAll(e);
201
- this.setIndeterminate(s2), document.addEventListener("click", this.__handlerClick, false);
202
- }
203
- destroy() {
204
- document.removeEventListener("click", this.__handlerClick, false);
205
- }
206
- handlerClick(t) {
207
- const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = t.target.closest(e);
208
- s2 && (this.removeAriaState(s2), this.setIndeterminate(s2));
209
- }
210
- setAriaState(t, e = this.settings.stateValue) {
211
- t = t.forEach ? t : [t], t.forEach((s2) => {
212
- s2.setAttribute(this.settings.stateAttr, e);
213
- });
214
- }
215
- removeAriaState(t) {
216
- t = t.forEach ? t : [t], t.forEach((e) => {
217
- e.removeAttribute(this.settings.stateAttr);
218
- });
219
- }
220
- setIndeterminate(t) {
221
- t = t.forEach ? t : [t], t.forEach((e) => {
222
- e.hasAttribute(this.settings.stateAttr) ? e.indeterminate = true : e.indeterminate = false;
223
- });
224
- }
225
- };
226
189
  var S$2 = (t, e, s2) => {
227
190
  if (!e.has(t))
228
191
  throw TypeError("Cannot " + s2);
@@ -231,31 +194,31 @@ var p$1 = (t, e, s2) => (S$2(t, e, "read from private field"), s2 ? s2.call(t) :
231
194
  if (e.has(t))
232
195
  throw TypeError("Cannot add the same private member more than once");
233
196
  e instanceof WeakSet ? e.add(t) : e.set(t, s2);
234
- }, $$1 = (t, e, s2, i2) => (S$2(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
197
+ }, $$1 = (t, e, s2, i) => (S$2(t, e, "write to private field"), i ? i.call(t, s2) : e.set(t, s2), s2);
235
198
  var I$2 = (t, e, s2) => {
236
199
  if (!e.has(t))
237
200
  throw TypeError("Cannot " + s2);
238
- }, l$1 = (t, e, s2) => (I$2(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), w$1 = (t, e, s2) => {
201
+ }, l = (t, e, s2) => (I$2(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), w$1 = (t, e, s2) => {
239
202
  if (e.has(t))
240
203
  throw TypeError("Cannot add the same private member more than once");
241
204
  e instanceof WeakSet ? e.add(t) : e.set(t, s2);
242
- }, h$1 = (t, e, s2, i2) => (I$2(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2), c$1;
205
+ }, h$1 = (t, e, s2, i) => (I$2(t, e, "write to private field"), i ? i.call(t, s2) : e.set(t, s2), s2), c$1;
243
206
  let M$2 = class M {
244
207
  constructor(e, s2) {
245
208
  w$1(this, c$1, void 0), this.value = e, h$1(this, c$1, s2), this.mql = null;
246
209
  }
247
210
  get handler() {
248
- return l$1(this, c$1);
211
+ return l(this, c$1);
249
212
  }
250
213
  // Unmount existing handler before setting a new one.
251
214
  set handler(e) {
252
- this.mql && (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", l$1(this, c$1)) : this.mql.removeListener(l$1(this, c$1))), h$1(this, c$1, e);
215
+ this.mql && (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", l(this, c$1)) : this.mql.removeListener(l(this, c$1))), h$1(this, c$1, e);
253
216
  }
254
217
  mount(e, s2) {
255
- return e && (this.value = e), s2 && h$1(this, c$1, s2), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), typeof this.mql.addEventListener == "function" ? this.mql.addEventListener("change", l$1(this, c$1)) : this.mql.addListener(l$1(this, c$1)), l$1(this, c$1).call(this, this.mql), this) : this;
218
+ return e && (this.value = e), s2 && h$1(this, c$1, s2), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), typeof this.mql.addEventListener == "function" ? this.mql.addEventListener("change", l(this, c$1)) : this.mql.addListener(l(this, c$1)), l(this, c$1).call(this, this.mql), this) : this;
256
219
  }
257
220
  unmount() {
258
- return this.mql ? (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", l$1(this, c$1)) : this.mql.removeListener(l$1(this, c$1)), this.value = null, h$1(this, c$1, null), this.mql = null, this) : this;
221
+ return this.mql ? (typeof this.mql.removeEventListener == "function" ? this.mql.removeEventListener("change", l(this, c$1)) : this.mql.removeListener(l(this, c$1)), this.value = null, h$1(this, c$1, null), this.mql = null, this) : this;
259
222
  }
260
223
  };
261
224
  c$1 = /* @__PURE__ */ new WeakMap();
@@ -267,11 +230,11 @@ let P$1 = class P {
267
230
  return await this.deregister(e), this.collection.push(e), this.collection;
268
231
  }
269
232
  async deregister(e) {
270
- const s2 = this.collection.findIndex((i2) => i2 === e);
233
+ const s2 = this.collection.findIndex((i) => i === e);
271
234
  if (s2 >= 0) {
272
- const i2 = this.collection[s2];
273
- Object.getOwnPropertyNames(i2).forEach((n) => {
274
- delete i2[n];
235
+ const i = this.collection[s2];
236
+ Object.getOwnPropertyNames(i).forEach((n) => {
237
+ delete i[n];
275
238
  }), this.collection.splice(s2, 1);
276
239
  }
277
240
  return this.collection;
@@ -287,30 +250,30 @@ let P$1 = class P {
287
250
  return this.collection;
288
251
  }
289
252
  get(e, s2 = "id") {
290
- return this.collection.find((i2) => i2[s2] === e);
253
+ return this.collection.find((i) => i[s2] === e);
291
254
  }
292
255
  };
293
- const r2 = {
256
+ const r$1 = {
294
257
  inert: ":not([inert]):not([inert] *)",
295
258
  negTabIndex: ':not([tabindex^="-"])',
296
259
  disabled: ":not(:disabled)"
297
260
  }, F$2 = [
298
- `a[href]${r2.inert}${r2.negTabIndex}`,
299
- `area[href]${r2.inert}${r2.negTabIndex}`,
300
- `input:not([type="hidden"]):not([type="radio"])${r2.inert}${r2.negTabIndex}${r2.disabled}`,
301
- `input[type="radio"]${r2.inert}${r2.negTabIndex}${r2.disabled}`,
302
- `select${r2.inert}${r2.negTabIndex}${r2.disabled}`,
303
- `textarea${r2.inert}${r2.negTabIndex}${r2.disabled}`,
304
- `button${r2.inert}${r2.negTabIndex}${r2.disabled}`,
305
- `details${r2.inert} > summary:first-of-type${r2.negTabIndex}`,
261
+ `a[href]${r$1.inert}${r$1.negTabIndex}`,
262
+ `area[href]${r$1.inert}${r$1.negTabIndex}`,
263
+ `input:not([type="hidden"]):not([type="radio"])${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
264
+ `input[type="radio"]${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
265
+ `select${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
266
+ `textarea${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
267
+ `button${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
268
+ `details${r$1.inert} > summary:first-of-type${r$1.negTabIndex}`,
306
269
  // Discard until Firefox supports `:has()`
307
270
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
308
271
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
309
- `iframe${r2.inert}${r2.negTabIndex}`,
310
- `audio[controls]${r2.inert}${r2.negTabIndex}`,
311
- `video[controls]${r2.inert}${r2.negTabIndex}`,
312
- `[contenteditable]${r2.inert}${r2.negTabIndex}`,
313
- `[tabindex]${r2.inert}${r2.negTabIndex}`
272
+ `iframe${r$1.inert}${r$1.negTabIndex}`,
273
+ `audio[controls]${r$1.inert}${r$1.negTabIndex}`,
274
+ `video[controls]${r$1.inert}${r$1.negTabIndex}`,
275
+ `[contenteditable]${r$1.inert}${r$1.negTabIndex}`,
276
+ `[tabindex]${r$1.inert}${r$1.negTabIndex}`
314
277
  ];
315
278
  var v$1, u$1, g$1;
316
279
  let B$2 = class B {
@@ -318,10 +281,10 @@ let B$2 = class B {
318
281
  w$1(this, v$1, void 0), w$1(this, u$1, void 0), w$1(this, g$1, void 0), this.el = e, this.selectorFocus = s2, h$1(this, u$1, _$2.bind(this)), h$1(this, g$1, N$2.bind(this));
319
282
  }
320
283
  get focusable() {
321
- return l$1(this, v$1);
284
+ return l(this, v$1);
322
285
  }
323
286
  set focusable(e) {
324
- h$1(this, v$1, e), l$1(this, v$1).length ? (document.removeEventListener("keydown", l$1(this, g$1)), document.addEventListener("keydown", l$1(this, u$1))) : (document.removeEventListener("keydown", l$1(this, u$1)), document.addEventListener("keydown", l$1(this, g$1)));
287
+ h$1(this, v$1, e), l(this, v$1).length ? (document.removeEventListener("keydown", l(this, g$1)), document.addEventListener("keydown", l(this, u$1))) : (document.removeEventListener("keydown", l(this, u$1)), document.addEventListener("keydown", l(this, g$1)));
325
288
  }
326
289
  get focusableFirst() {
327
290
  return this.focusable[0];
@@ -333,16 +296,16 @@ let B$2 = class B {
333
296
  e && (this.el = e), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
334
297
  }
335
298
  unmount() {
336
- this.el = null, this.focusable = [], document.removeEventListener("keydown", l$1(this, u$1)), document.removeEventListener("keydown", l$1(this, g$1));
299
+ this.el = null, this.focusable = [], document.removeEventListener("keydown", l(this, u$1)), document.removeEventListener("keydown", l(this, g$1));
337
300
  }
338
301
  focus(e = this.el, s2 = this.selectorFocus) {
339
302
  (e.querySelector(s2) || e).focus();
340
303
  }
341
304
  getFocusable(e = this.el) {
342
- const s2 = [], i2 = document.activeElement, n = e.scrollTop;
305
+ const s2 = [], i = document.activeElement, n = e.scrollTop;
343
306
  return e.querySelectorAll(F$2.join(",")).forEach((a2) => {
344
307
  a2.focus(), document.activeElement === a2 && s2.push(a2);
345
- }), e.scrollTop = n, i2.focus(), s2;
308
+ }), e.scrollTop = n, i.focus(), s2;
346
309
  }
347
310
  };
348
311
  v$1 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap();
@@ -360,23 +323,23 @@ function W$1() {
360
323
  return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
361
324
  }
362
325
  function V(t, e = true) {
363
- const s2 = localStorage.getItem(t), i2 = s2 ? JSON.parse(s2) : {};
326
+ const s2 = localStorage.getItem(t), i = s2 ? JSON.parse(s2) : {};
364
327
  return {
365
328
  get(n) {
366
- return n ? i2[n] : i2;
329
+ return n ? i[n] : i;
367
330
  },
368
331
  set(n, a2) {
369
- return a2 ? i2[n] = a2 : delete i2[n], e && localStorage.setItem(t, JSON.stringify(i2)), i2;
332
+ return a2 ? i[n] = a2 : delete i[n], e && localStorage.setItem(t, JSON.stringify(i)), i;
370
333
  }
371
334
  };
372
335
  }
373
336
  const J$2 = (t, e) => new Promise((s2) => {
374
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
375
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i2);
337
+ e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(n) {
338
+ n.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i));
376
339
  })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), s2(t));
377
340
  }), z$1 = (t, e) => new Promise((s2) => {
378
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
379
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i2);
341
+ e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(n) {
342
+ n.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i));
380
343
  })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), s2(t));
381
344
  });
382
345
  function G$1(t, e) {
@@ -429,15 +392,15 @@ function R$1(t) {
429
392
  [data-${this.settings.dataClose}]
430
393
  `);
431
394
  if (e) {
432
- t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i2) => {
433
- const n = this.get(i2);
395
+ t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i) => {
396
+ const n = this.get(i);
434
397
  n.trigger = e, n.toggle();
435
- }), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i2) => {
436
- const n = this.get(i2);
398
+ }), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i) => {
399
+ const n = this.get(i);
437
400
  n.trigger = e, n.open();
438
- }), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i2) => {
439
- if (i2) {
440
- const n = this.get(i2);
401
+ }), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i) => {
402
+ if (i) {
403
+ const n = this.get(i);
441
404
  n.trigger = e, n.close();
442
405
  } else {
443
406
  const n = t.target.closest(this.settings.selectorDrawer);
@@ -457,11 +420,11 @@ function U$1(t) {
457
420
  async function L$1(t, e = true) {
458
421
  if (!t)
459
422
  return this.collection;
460
- const s2 = this.collection.findIndex((i2) => i2.id === t.id);
423
+ const s2 = this.collection.findIndex((i) => i.id === t.id);
461
424
  if (s2 >= 0) {
462
- const i2 = this.collection[s2];
463
- e && i2.state === "opened" && await i2.close(false), this.store.set(i2.id), i2.unmountBreakpoint(), Object.getOwnPropertyNames(i2).forEach((n) => {
464
- delete i2[n];
425
+ const i = this.collection[s2];
426
+ e && i.state === "opened" && await i.close(false), this.store.set(i.id), i.unmountBreakpoint(), Object.getOwnPropertyNames(i).forEach((n) => {
427
+ delete i[n];
465
428
  }), this.collection.splice(s2, 1);
466
429
  }
467
430
  return this.collection;
@@ -482,8 +445,8 @@ function O$1(t) {
482
445
  function Y(t) {
483
446
  const e = O$1.call(this, t);
484
447
  if (e) {
485
- const s2 = document.querySelector(`#${e}`), i2 = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
486
- return !s2 && !i2 ? { error: new Error(`No drawer elements found using the ID: "${e}".`) } : i2 ? { drawer: s2, dialog: i2 } : { error: new Error("Drawer is missing dialog element.") };
448
+ const s2 = document.querySelector(`#${e}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
449
+ return !s2 && !i ? { error: new Error(`No drawer elements found using the ID: "${e}".`) } : i ? { drawer: s2, dialog: i } : { error: new Error("Drawer is missing dialog element.") };
487
450
  } else
488
451
  return { error: new Error("Could not resolve the drawer ID.") };
489
452
  }
@@ -494,22 +457,22 @@ function D$2(t) {
494
457
  t.state === "opened" ? t.mode === "modal" ? this.focusTrap.mount(t.dialog, this.settings.selectorFocus) : this.focusTrap.focus(t.dialog, this.settings.selectorFocus) : (t.trigger && (t.trigger.focus(), t.trigger = null), this.focusTrap.unmount());
495
458
  }
496
459
  async function C$1(t, e, s2 = true) {
497
- const i2 = y$1.call(this, t), n = { ...this.settings, ...i2.settings };
498
- return e !== void 0 && (n.transition = e), i2.state === "closed" && (i2.state = "opening", await J$2(i2.el, n), i2.mode === "modal" && k$2(true, n), i2.state = "opened"), s2 && D$2.call(this, i2), i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
460
+ const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
461
+ return e !== void 0 && (n.transition = e), i.state === "closed" && (i.state = "opening", await J$2(i.el, n), i.mode === "modal" && k$2(true, n), i.state = "opened"), s2 && D$2.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
499
462
  detail: this,
500
463
  bubbles: true
501
- })), i2;
464
+ })), i;
502
465
  }
503
466
  async function b$1(t, e, s2 = true) {
504
- const i2 = y$1.call(this, t), n = { ...this.settings, ...i2.settings };
505
- return e !== void 0 && (n.transition = e), i2.state === "opened" && (i2.state = "closing", document.activeElement.blur(), await z$1(i2.el, n), i2.mode === "modal" && k$2(false, n), s2 && D$2.call(this, i2), i2.state = "closed", i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
467
+ const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
468
+ return e !== void 0 && (n.transition = e), i.state === "opened" && (i.state = "closing", document.activeElement.blur(), await z$1(i.el, n), i.mode === "modal" && k$2(false, n), s2 && D$2.call(this, i), i.state = "closed", i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
506
469
  detail: this,
507
470
  bubbles: true
508
- }))), i2;
471
+ }))), i;
509
472
  }
510
473
  async function q$1(t, e, s2) {
511
- const i2 = y$1.call(this, t);
512
- return i2.state === "closed" ? C$1.call(this, i2, e, s2) : b$1.call(this, i2, e, s2);
474
+ const i = y$1.call(this, t);
475
+ return i.state === "closed" ? C$1.call(this, i, e, s2) : b$1.call(this, i, e, s2);
513
476
  }
514
477
  function Z$1(t) {
515
478
  switch (t.mode) {
@@ -535,7 +498,7 @@ async function tt$1(t) {
535
498
  }
536
499
  async function et$1(t, e) {
537
500
  await L$1.call(this, t, false);
538
- const s2 = this, i2 = new M$2(), n = {
501
+ const s2 = this, i = new M$2(), n = {
539
502
  open(o2, d2) {
540
503
  return C$1.call(s2, this, o2, d2);
541
504
  },
@@ -550,10 +513,10 @@ async function et$1(t, e) {
550
513
  },
551
514
  mountBreakpoint() {
552
515
  const o2 = this.breakpoint, d2 = this.handleBreakpoint.bind(this);
553
- return i2.mount(o2, d2), this;
516
+ return i.mount(o2, d2), this;
554
517
  },
555
518
  unmountBreakpoint() {
556
- return i2.unmount(), this;
519
+ return i.unmount(), this;
557
520
  },
558
521
  handleBreakpoint(o2) {
559
522
  return this.mode = o2.matches ? "inline" : "modal", this;
@@ -600,8 +563,8 @@ let it$1 = class it extends P$1 {
600
563
  }
601
564
  async init(s2 = null) {
602
565
  s2 && (this.settings = { ...this.settings, ...s2 });
603
- const i2 = document.querySelectorAll(this.settings.selectorDrawer);
604
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(), this;
566
+ const i = document.querySelectorAll(this.settings.selectorDrawer);
567
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
605
568
  }
606
569
  async destroy() {
607
570
  return await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
@@ -613,60 +576,60 @@ let it$1 = class it extends P$1 {
613
576
  document.removeEventListener("click", p$1(this, f$1), false), document.removeEventListener("keydown", p$1(this, m$1), false);
614
577
  }
615
578
  register(s2) {
616
- const i2 = Y.call(this, s2);
617
- return i2.error ? Promise.reject(i2.error) : et$1.call(this, i2.drawer, i2.dialog);
579
+ const i = Y.call(this, s2);
580
+ return i.error ? Promise.reject(i.error) : et$1.call(this, i.drawer, i.dialog);
618
581
  }
619
582
  deregister(s2) {
620
- const i2 = this.get(O$1.call(this, s2));
621
- return L$1.call(this, i2);
583
+ const i = this.get(O$1.call(this, s2));
584
+ return L$1.call(this, i);
622
585
  }
623
- open(s2, i2, n) {
624
- return C$1.call(this, s2, i2, n);
586
+ open(s2, i, n) {
587
+ return C$1.call(this, s2, i, n);
625
588
  }
626
- close(s2, i2, n) {
627
- return b$1.call(this, s2, i2, n);
589
+ close(s2, i, n) {
590
+ return b$1.call(this, s2, i, n);
628
591
  }
629
- toggle(s2, i2, n) {
630
- return q$1.call(this, s2, i2, n);
592
+ toggle(s2, i, n) {
593
+ return q$1.call(this, s2, i, n);
631
594
  }
632
595
  };
633
596
  f$1 = /* @__PURE__ */ new WeakMap(), m$1 = /* @__PURE__ */ new WeakMap();
634
- var I$1 = (t, e, s2) => {
635
- if (!e.has(t))
597
+ var I$1 = (e, t, s2) => {
598
+ if (!t.has(e))
636
599
  throw TypeError("Cannot " + s2);
637
600
  };
638
- var f = (t, e, s2) => (I$1(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), v = (t, e, s2) => {
639
- if (e.has(t))
601
+ var f = (e, t, s2) => (I$1(e, t, "read from private field"), s2 ? s2.call(e) : t.get(e)), v = (e, t, s2) => {
602
+ if (t.has(e))
640
603
  throw TypeError("Cannot add the same private member more than once");
641
- e instanceof WeakSet ? e.add(t) : e.set(t, s2);
642
- }, b = (t, e, s2, i2) => (I$1(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
643
- var k$1 = (t, e, s2) => {
644
- if (!e.has(t))
604
+ t instanceof WeakSet ? t.add(e) : t.set(e, s2);
605
+ }, b = (e, t, s2, i) => (I$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
606
+ var k$1 = (e, t, s2) => {
607
+ if (!t.has(e))
645
608
  throw TypeError("Cannot " + s2);
646
- }, o = (t, e, s2) => (k$1(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), y = (t, e, s2) => {
647
- if (e.has(t))
609
+ }, o = (e, t, s2) => (k$1(e, t, "read from private field"), s2 ? s2.call(e) : t.get(e)), y = (e, t, s2) => {
610
+ if (t.has(e))
648
611
  throw TypeError("Cannot add the same private member more than once");
649
- e instanceof WeakSet ? e.add(t) : e.set(t, s2);
650
- }, E = (t, e, s2, i2) => (k$1(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
612
+ t instanceof WeakSet ? t.add(e) : t.set(e, s2);
613
+ }, E = (e, t, s2, i) => (k$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
651
614
  class A {
652
615
  constructor() {
653
616
  this.collection = [];
654
617
  }
655
- async register(e) {
656
- return await this.deregister(e), this.collection.push(e), this.collection;
618
+ async register(t) {
619
+ return await this.deregister(t), this.collection.push(t), this.collection;
657
620
  }
658
- async deregister(e) {
659
- const s2 = this.collection.findIndex((i2) => i2 === e);
621
+ async deregister(t) {
622
+ const s2 = this.collection.findIndex((i) => i === t);
660
623
  if (s2 >= 0) {
661
- const i2 = this.collection[s2];
662
- Object.getOwnPropertyNames(i2).forEach((n) => {
663
- delete i2[n];
624
+ const i = this.collection[s2];
625
+ Object.getOwnPropertyNames(i).forEach((n) => {
626
+ delete i[n];
664
627
  }), this.collection.splice(s2, 1);
665
628
  }
666
629
  return this.collection;
667
630
  }
668
- async registerCollection(e) {
669
- return await Promise.all(Array.from(e, (s2) => {
631
+ async registerCollection(t) {
632
+ return await Promise.all(Array.from(t, (s2) => {
670
633
  this.register(s2);
671
634
  })), this.collection;
672
635
  }
@@ -675,42 +638,42 @@ class A {
675
638
  await this.deregister(this.collection[0]);
676
639
  return this.collection;
677
640
  }
678
- get(e, s2 = "id") {
679
- return this.collection.find((i2) => i2[s2] === e);
641
+ get(t, s2 = "id") {
642
+ return this.collection.find((i) => i[s2] === t);
680
643
  }
681
644
  }
682
- const l = {
645
+ const r = {
683
646
  inert: ":not([inert]):not([inert] *)",
684
647
  negTabIndex: ':not([tabindex^="-"])',
685
648
  disabled: ":not(:disabled)"
686
649
  }, S$1 = [
687
- `a[href]${l.inert}${l.negTabIndex}`,
688
- `area[href]${l.inert}${l.negTabIndex}`,
689
- `input:not([type="hidden"]):not([type="radio"])${l.inert}${l.negTabIndex}${l.disabled}`,
690
- `input[type="radio"]${l.inert}${l.negTabIndex}${l.disabled}`,
691
- `select${l.inert}${l.negTabIndex}${l.disabled}`,
692
- `textarea${l.inert}${l.negTabIndex}${l.disabled}`,
693
- `button${l.inert}${l.negTabIndex}${l.disabled}`,
694
- `details${l.inert} > summary:first-of-type${l.negTabIndex}`,
650
+ `a[href]${r.inert}${r.negTabIndex}`,
651
+ `area[href]${r.inert}${r.negTabIndex}`,
652
+ `input:not([type="hidden"]):not([type="radio"])${r.inert}${r.negTabIndex}${r.disabled}`,
653
+ `input[type="radio"]${r.inert}${r.negTabIndex}${r.disabled}`,
654
+ `select${r.inert}${r.negTabIndex}${r.disabled}`,
655
+ `textarea${r.inert}${r.negTabIndex}${r.disabled}`,
656
+ `button${r.inert}${r.negTabIndex}${r.disabled}`,
657
+ `details${r.inert} > summary:first-of-type${r.negTabIndex}`,
695
658
  // Discard until Firefox supports `:has()`
696
659
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
697
660
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
698
- `iframe${l.inert}${l.negTabIndex}`,
699
- `audio[controls]${l.inert}${l.negTabIndex}`,
700
- `video[controls]${l.inert}${l.negTabIndex}`,
701
- `[contenteditable]${l.inert}${l.negTabIndex}`,
702
- `[tabindex]${l.inert}${l.negTabIndex}`
661
+ `iframe${r.inert}${r.negTabIndex}`,
662
+ `audio[controls]${r.inert}${r.negTabIndex}`,
663
+ `video[controls]${r.inert}${r.negTabIndex}`,
664
+ `[contenteditable]${r.inert}${r.negTabIndex}`,
665
+ `[tabindex]${r.inert}${r.negTabIndex}`
703
666
  ];
704
667
  var g, c, d;
705
668
  let M$1 = class M2 {
706
- constructor(e = null, s2 = "[data-focus]") {
707
- y(this, g, void 0), y(this, c, void 0), y(this, d, void 0), this.el = e, this.selectorFocus = s2, E(this, c, R.bind(this)), E(this, d, N$1.bind(this));
669
+ constructor(t = null, s2 = "[data-focus]") {
670
+ y(this, g, void 0), y(this, c, void 0), y(this, d, void 0), this.el = t, this.selectorFocus = s2, E(this, c, R.bind(this)), E(this, d, N$1.bind(this));
708
671
  }
709
672
  get focusable() {
710
673
  return o(this, g);
711
674
  }
712
- set focusable(e) {
713
- E(this, g, e), o(this, g).length ? (document.removeEventListener("keydown", o(this, d)), document.addEventListener("keydown", o(this, c))) : (document.removeEventListener("keydown", o(this, c)), document.addEventListener("keydown", o(this, d)));
675
+ set focusable(t) {
676
+ E(this, g, t), o(this, g).length ? (document.removeEventListener("keydown", o(this, d)), document.addEventListener("keydown", o(this, c))) : (document.removeEventListener("keydown", o(this, c)), document.addEventListener("keydown", o(this, d)));
714
677
  }
715
678
  get focusableFirst() {
716
679
  return this.focusable[0];
@@ -718,63 +681,63 @@ let M$1 = class M2 {
718
681
  get focusableLast() {
719
682
  return this.focusable[this.focusable.length - 1];
720
683
  }
721
- mount(e, s2) {
722
- e && (this.el = e), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
684
+ mount(t, s2) {
685
+ t && (this.el = t), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
723
686
  }
724
687
  unmount() {
725
688
  this.el = null, this.focusable = [], document.removeEventListener("keydown", o(this, c)), document.removeEventListener("keydown", o(this, d));
726
689
  }
727
- focus(e = this.el, s2 = this.selectorFocus) {
728
- (e.querySelector(s2) || e).focus();
690
+ focus(t = this.el, s2 = this.selectorFocus) {
691
+ (t.querySelector(s2) || t).focus();
729
692
  }
730
- getFocusable(e = this.el) {
731
- const s2 = [], i2 = document.activeElement, n = e.scrollTop;
732
- return e.querySelectorAll(S$1.join(",")).forEach((r3) => {
733
- r3.focus(), document.activeElement === r3 && s2.push(r3);
734
- }), e.scrollTop = n, i2.focus(), s2;
693
+ getFocusable(t = this.el) {
694
+ const s2 = [], i = document.activeElement, n = t.scrollTop;
695
+ return t.querySelectorAll(S$1.join(",")).forEach((l2) => {
696
+ l2.focus(), document.activeElement === l2 && s2.push(l2);
697
+ }), t.scrollTop = n, i.focus(), s2;
735
698
  }
736
699
  };
737
700
  g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
738
- function R(t) {
739
- (t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
701
+ function R(e) {
702
+ (e.key === "Tab" || e.keyCode === 9) && (e.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (e.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (e.preventDefault(), this.focusableFirst.focus()));
740
703
  }
741
- function N$1(t) {
742
- (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
704
+ function N$1(e) {
705
+ (e.key === "Tab" || e.keyCode === 9) && e.preventDefault();
743
706
  }
744
- function P2(t, e) {
745
- const s2 = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
707
+ function P2(e, t) {
708
+ const s2 = (e.getAttribute(`data-${t}`) || "").replace(/'/g, '"');
746
709
  return s2 ? JSON.parse(s2) : {};
747
710
  }
748
- function T$1(t, e, s2) {
749
- const i2 = e.nodeType === Node.COMMENT_NODE, n = e.nodeType === Node.ELEMENT_NODE;
750
- if (e = i2 || n ? e : document.querySelector(e), i2 && (s2 = "after"), !e)
751
- throw new Error(`Not a valid teleport reference: '${e}'`);
752
- if (typeof e[s2] != "function")
711
+ function T$1(e, t, s2) {
712
+ const i = t.nodeType === Node.COMMENT_NODE, n = t.nodeType === Node.ELEMENT_NODE;
713
+ if (t = i || n ? t : document.querySelector(t), i && (s2 = "after"), !t)
714
+ throw new Error(`Not a valid teleport reference: '${t}'`);
715
+ if (typeof t[s2] != "function")
753
716
  throw new Error(`Not a valid teleport method: '${s2}'`);
754
- let r3 = null;
755
- return i2 || (r3 = document.createComment("teleported #" + t.id), t.before(r3)), e[s2](t), i2 && e.remove(), r3;
756
- }
757
- const D$1 = (t, e) => new Promise((s2) => {
758
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
759
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i2);
760
- })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), s2(t));
761
- }), F$1 = (t, e) => new Promise((s2) => {
762
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
763
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i2);
764
- })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), s2(t));
717
+ let l2 = null;
718
+ return i || (l2 = document.createComment("teleported #" + e.id), e.before(l2)), t[s2](e), i && t.remove(), l2;
719
+ }
720
+ const D$1 = (e, t) => new Promise((s2) => {
721
+ t.transition ? (e.classList.remove(t.stateClosed), e.classList.add(t.stateOpening), e.addEventListener("transitionend", function i(n) {
722
+ n.target == e && (e.classList.add(t.stateOpened), e.classList.remove(t.stateOpening), s2(e), this.removeEventListener("transitionend", i));
723
+ })) : (e.classList.add(t.stateOpened), e.classList.remove(t.stateClosed), s2(e));
724
+ }), F$1 = (e, t) => new Promise((s2) => {
725
+ t.transition ? (e.classList.add(t.stateClosing), e.classList.remove(t.stateOpened), e.addEventListener("transitionend", function i(n) {
726
+ n.target == e && (e.classList.remove(t.stateClosing), e.classList.add(t.stateClosed), s2(e), this.removeEventListener("transitionend", i));
727
+ })) : (e.classList.add(t.stateClosed), e.classList.remove(t.stateOpened), s2(e));
765
728
  });
766
- function q(t, e) {
767
- e && document.querySelectorAll(e).forEach((s2) => {
768
- t ? s2.style.overflow = "hidden" : s2.style.removeProperty("overflow");
729
+ function q(e, t) {
730
+ t && document.querySelectorAll(t).forEach((s2) => {
731
+ e ? s2.style.overflow = "hidden" : s2.style.removeProperty("overflow");
769
732
  });
770
733
  }
771
- function z(t, e) {
772
- e && document.querySelectorAll(e).forEach((s2) => {
773
- t ? (s2.inert = true, s2.setAttribute("aria-hidden", true)) : (s2.inert = null, s2.removeAttribute("aria-hidden"));
734
+ function z(e, t) {
735
+ t && document.querySelectorAll(t).forEach((s2) => {
736
+ e ? (s2.inert = true, s2.setAttribute("aria-hidden", true)) : (s2.inert = null, s2.removeAttribute("aria-hidden"));
774
737
  });
775
738
  }
776
- function W(t, e) {
777
- z(!!t, e.selectorInert), q(!!t, e.selectorOverflow);
739
+ function W(e, t) {
740
+ z(!!e, t.selectorInert), q(!!e, t.selectorOverflow);
778
741
  }
779
742
  const _$1 = {
780
743
  autoInit: false,
@@ -803,155 +766,155 @@ const _$1 = {
803
766
  setTabindex: true,
804
767
  transition: true
805
768
  };
806
- function L(t) {
807
- const e = typeof t == "string" ? this.get(t) : this.get(t.id);
808
- if (e)
809
- return e;
810
- throw new Error(`Modal not found in collection with id of "${t.id || t}".`);
769
+ function L(e) {
770
+ const t = typeof e == "string" ? this.get(e) : this.get(e.id);
771
+ if (t)
772
+ return t;
773
+ throw new Error(`Modal not found in collection with id of "${e.id || e}".`);
811
774
  }
812
- function p(t) {
813
- return typeof t == "string" ? t : typeof t.hasAttribute == "function" ? t.hasAttribute(`data-${this.settings.dataOpen}`) ? t.getAttribute(`data-${this.settings.dataOpen}`) : t.hasAttribute(`data-${this.settings.dataClose}`) ? t.getAttribute(`data-${this.settings.dataClose}`) || false : t.hasAttribute(`data-${this.settings.dataReplace}`) ? t.getAttribute(`data-${this.settings.dataReplace}`) : t.closest(this.settings.selectorModal) ? (t = t.closest(this.settings.selectorModal), t.id || false) : false : t.id ? t.id : false;
775
+ function p(e) {
776
+ return typeof e == "string" ? e : typeof e.hasAttribute == "function" ? e.hasAttribute(`data-${this.settings.dataOpen}`) ? e.getAttribute(`data-${this.settings.dataOpen}`) : e.hasAttribute(`data-${this.settings.dataClose}`) ? e.getAttribute(`data-${this.settings.dataClose}`) || false : e.hasAttribute(`data-${this.settings.dataReplace}`) ? e.getAttribute(`data-${this.settings.dataReplace}`) : e.closest(this.settings.selectorModal) ? (e = e.closest(this.settings.selectorModal), e.id || false) : false : e.id ? e.id : false;
814
777
  }
815
- function G(t) {
816
- const e = p.call(this, t);
817
- if (e) {
818
- const s2 = document.querySelector(`#${e}`), i2 = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
819
- return !s2 && !i2 ? { error: new Error(`No modal elements found using the ID: "${e}".`) } : i2 ? { modal: s2, dialog: i2 } : { error: new Error("Modal is missing dialog element.") };
778
+ function G(e) {
779
+ const t = p.call(this, e);
780
+ if (t) {
781
+ const s2 = document.querySelector(`#${t}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
782
+ return !s2 && !i ? { error: new Error(`No modal elements found using the ID: "${t}".`) } : i ? { modal: s2, dialog: i } : { error: new Error("Modal is missing dialog element.") };
820
783
  } else
821
784
  return { error: new Error("Could not resolve the modal ID.") };
822
785
  }
823
786
  function m() {
824
787
  this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
825
788
  }
826
- async function K$1(t) {
827
- let e = t.target.closest(
789
+ async function K$1(e) {
790
+ let t = e.target.closest(
828
791
  `[data-${this.settings.dataOpen}], [data-${this.settings.dataReplace}]`
829
792
  );
830
- if (e) {
831
- t.preventDefault(), t.target.closest(this.settings.selectorModal) || (this.trigger = e);
832
- const i2 = this.get(p.call(this, e));
833
- return e.matches(`[data-${this.settings.dataOpen}]`) ? i2.open() : i2.replace();
793
+ if (t) {
794
+ e.preventDefault(), e.target.closest(this.settings.selectorModal) || (this.trigger = t);
795
+ const i = this.get(p.call(this, t));
796
+ return t.matches(`[data-${this.settings.dataOpen}]`) ? i.open() : i.replace();
834
797
  }
835
- if (e = t.target.closest(`[data-${this.settings.dataClose}]`), e) {
836
- t.preventDefault();
837
- const s2 = e.getAttribute(`data-${this.settings.dataClose}`);
798
+ if (t = e.target.closest(`[data-${this.settings.dataClose}]`), t) {
799
+ e.preventDefault();
800
+ const s2 = t.getAttribute(`data-${this.settings.dataClose}`);
838
801
  return s2 === "*" ? this.closeAll() : this.close(s2);
839
802
  }
840
- if (t.target.matches(this.settings.selectorModal) && !t.target.querySelector(this.settings.selectorRequired))
841
- return this.close(p.call(this, t.target));
803
+ if (e.target.matches(this.settings.selectorModal) && !e.target.querySelector(this.settings.selectorRequired))
804
+ return this.close(p.call(this, e.target));
842
805
  }
843
- function J$1(t) {
844
- if (t.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
806
+ function J$1(e) {
807
+ if (e.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
845
808
  return this.close();
846
809
  }
847
- async function w(t, e = true) {
848
- if (!t)
810
+ async function w(e, t = true) {
811
+ if (!e)
849
812
  return this.collection;
850
- const s2 = this.collection.findIndex((i2) => i2.id === t.id);
813
+ const s2 = this.collection.findIndex((i) => i.id === e.id);
851
814
  if (s2 >= 0) {
852
- const i2 = this.collection[s2];
853
- e && i2.state === "opened" ? await i2.close(false) : this.stack.remove(i2), i2.getSetting("teleport") && i2.teleportReturn(), Object.getOwnPropertyNames(i2).forEach((n) => {
854
- delete i2[n];
815
+ const i = this.collection[s2];
816
+ t && i.state === "opened" ? await i.close(false) : this.stack.remove(i), i.getSetting("teleport") && i.teleportReturn(), Object.getOwnPropertyNames(i).forEach((n) => {
817
+ delete i[n];
855
818
  }), this.collection.splice(s2, 1);
856
819
  }
857
820
  return this.collection;
858
821
  }
859
- async function x2(t, e, s2 = true) {
860
- const i2 = L.call(this, t), n = { ...this.settings, ...i2.settings };
861
- return e !== void 0 && (n.transition = e), this.stack.moveToTop(i2), i2.state === "closed" && (i2.state = "opening", this.stack.add(i2), await D$1(i2.el, n), i2.state = "opened"), s2 && m.call(this), i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
822
+ async function x2(e, t, s2 = true) {
823
+ const i = L.call(this, e), n = { ...this.settings, ...i.settings };
824
+ return t !== void 0 && (n.transition = t), this.stack.moveToTop(i), i.state === "closed" && (i.state = "opening", this.stack.add(i), await D$1(i.el, n), i.state = "opened"), s2 && m.call(this), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
862
825
  detail: this,
863
826
  bubbles: true
864
- })), i2;
865
- }
866
- async function C(t, e, s2 = true) {
867
- const i2 = t ? L.call(this, t) : this.active;
868
- if (i2 && i2.state === "opened") {
869
- i2.state = "closing";
870
- const n = { ...this.settings, ...i2.settings };
871
- e !== void 0 && (n.transition = e), document.activeElement.blur(), await F$1(i2.el, n), this.stack.remove(i2), s2 && m.call(this), i2.state = "closed", i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
827
+ })), i;
828
+ }
829
+ async function C(e, t, s2 = true) {
830
+ const i = e ? L.call(this, e) : this.active;
831
+ if (i && i.state === "opened") {
832
+ i.state = "closing";
833
+ const n = { ...this.settings, ...i.settings };
834
+ t !== void 0 && (n.transition = t), document.activeElement.blur(), await F$1(i.el, n), this.stack.remove(i), s2 && m.call(this), i.state = "closed", i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
872
835
  detail: this,
873
836
  bubbles: true
874
837
  }));
875
838
  }
876
- return i2;
839
+ return i;
877
840
  }
878
- async function $2(t, e) {
841
+ async function $2(e, t) {
879
842
  const s2 = [];
880
- return await Promise.all(this.stack.value.map(async (i2) => {
881
- t && t === i2.id ? Promise.resolve() : s2.push(await C.call(this, i2, e, false)), i2.trigger = null;
843
+ return await Promise.all(this.stack.value.map(async (i) => {
844
+ e && e === i.id ? Promise.resolve() : s2.push(await C.call(this, i, t, false)), i.trigger = null;
882
845
  })), s2;
883
846
  }
884
- async function O(t, e, s2 = true) {
885
- const i2 = L.call(this, t);
886
- let n, r3;
887
- return i2.state === "opened" ? (n = i2, r3 = await $2.call(this, i2.id, e)) : (n = x2.call(this, i2, e, false), r3 = $2.call(this, false, e), await Promise.all([n, r3])), s2 && m.call(this), { opened: n, closed: r3 };
847
+ async function O(e, t, s2 = true) {
848
+ const i = L.call(this, e);
849
+ let n, l2;
850
+ return i.state === "opened" ? (n = i, l2 = await $2.call(this, i.id, t)) : (n = x2.call(this, i, t, false), l2 = $2.call(this, false, t), await Promise.all([n, l2])), s2 && m.call(this), { opened: n, closed: l2 };
888
851
  }
889
- async function B$1(t, e) {
890
- await w.call(this, t, false);
891
- const s2 = this, i2 = {
892
- open(r3, a2) {
893
- return x2.call(s2, this, r3, a2);
852
+ async function B$1(e, t) {
853
+ await w.call(this, e, false);
854
+ const s2 = this, i = {
855
+ open(l2, a2) {
856
+ return x2.call(s2, this, l2, a2);
894
857
  },
895
- close(r3, a2) {
896
- return C.call(s2, this, r3, a2);
858
+ close(l2, a2) {
859
+ return C.call(s2, this, l2, a2);
897
860
  },
898
- replace(r3, a2) {
899
- return O.call(s2, this, r3, a2);
861
+ replace(l2, a2) {
862
+ return O.call(s2, this, l2, a2);
900
863
  },
901
864
  deregister() {
902
865
  return w.call(s2, this);
903
866
  },
904
- teleport(r3 = this.getSetting("teleport"), a2 = this.getSetting("teleportMethod")) {
905
- return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = T$1(this.el, r3, a2), this.el);
867
+ teleport(l2 = this.getSetting("teleport"), a2 = this.getSetting("teleportMethod")) {
868
+ return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = T$1(this.el, l2, a2), this.el);
906
869
  },
907
870
  teleportReturn() {
908
871
  return this.returnRef ? (this.returnRef = T$1(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), false);
909
872
  },
910
- getSetting(r3) {
911
- return r3 in this.settings ? this.settings[r3] : s2.settings[r3];
873
+ getSetting(l2) {
874
+ return l2 in this.settings ? this.settings[l2] : s2.settings[l2];
912
875
  }
913
876
  }, n = {
914
- id: t.id,
877
+ id: e.id,
915
878
  state: "closed",
916
- el: t,
917
- dialog: e,
879
+ el: e,
880
+ dialog: t,
918
881
  returnRef: null,
919
- settings: P2(t, this.settings.dataConfig),
920
- ...i2
882
+ settings: P2(e, this.settings.dataConfig),
883
+ ...i
921
884
  };
922
885
  return n.dialog.setAttribute("aria-modal", "true"), n.dialog.hasAttribute("role") || n.dialog.setAttribute("role", "dialog"), n.getSetting("setTabindex") && n.dialog.setAttribute("tabindex", "-1"), n.getSetting("teleport") && n.teleport(), this.collection.push(n), n.el.classList.contains(this.settings.stateOpened) ? await n.open(false) : (n.el.classList.remove(this.settings.stateOpening), n.el.classList.remove(this.settings.stateClosing), n.el.classList.add(this.settings.stateClosed)), n;
923
886
  }
924
- function H$1(t) {
925
- const e = [];
887
+ function H$1(e) {
888
+ const t = [];
926
889
  return {
927
890
  get value() {
928
- return [...e];
891
+ return [...t];
929
892
  },
930
893
  get top() {
931
- return e[e.length - 1];
894
+ return t[t.length - 1];
932
895
  },
933
896
  updateIndex() {
934
- e.forEach((s2, i2) => {
897
+ t.forEach((s2, i) => {
935
898
  s2.el.style.zIndex = null;
936
899
  const n = getComputedStyle(s2.el)["z-index"];
937
- s2.el.style.zIndex = parseInt(n) + i2 + 1;
900
+ s2.el.style.zIndex = parseInt(n) + i + 1;
938
901
  });
939
902
  },
940
903
  updateGlobalState() {
941
- W(this.top, t), this.updateIndex();
904
+ W(this.top, e), this.updateIndex();
942
905
  },
943
906
  add(s2) {
944
907
  s2.el.style.zIndex = null;
945
- const i2 = getComputedStyle(s2.el)["z-index"];
946
- s2.el.style.zIndex = parseInt(i2) + e.length + 1, e.push(s2), this.updateGlobalState();
908
+ const i = getComputedStyle(s2.el)["z-index"];
909
+ s2.el.style.zIndex = parseInt(i) + t.length + 1, t.push(s2), this.updateGlobalState();
947
910
  },
948
911
  remove(s2) {
949
- const i2 = e.findIndex((n) => n.id === s2.id);
950
- i2 >= 0 && (s2.el.style.zIndex = null, e.splice(i2, 1), this.updateGlobalState());
912
+ const i = t.findIndex((n) => n.id === s2.id);
913
+ i >= 0 && (s2.el.style.zIndex = null, t.splice(i, 1), this.updateGlobalState());
951
914
  },
952
915
  moveToTop(s2) {
953
- const i2 = e.findIndex((n) => n.id === s2.id);
954
- i2 >= 0 && (e.splice(i2, 1), this.add(s2));
916
+ const i = t.findIndex((n) => n.id === s2.id);
917
+ i >= 0 && (t.splice(i, 1), this.add(s2));
955
918
  }
956
919
  };
957
920
  }
@@ -968,8 +931,8 @@ class U extends A {
968
931
  }
969
932
  async init(s2) {
970
933
  s2 && (this.settings = { ...this.settings, ...s2 });
971
- const i2 = document.querySelectorAll(this.settings.selectorModal);
972
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(), this;
934
+ const i = document.querySelectorAll(this.settings.selectorModal);
935
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
973
936
  }
974
937
  async destroy() {
975
938
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
@@ -981,37 +944,37 @@ class U extends A {
981
944
  document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
982
945
  }
983
946
  register(s2) {
984
- const i2 = G.call(this, s2);
985
- return i2.error ? Promise.reject(i2.error) : B$1.call(this, i2.modal, i2.dialog);
947
+ const i = G.call(this, s2);
948
+ return i.error ? Promise.reject(i.error) : B$1.call(this, i.modal, i.dialog);
986
949
  }
987
950
  deregister(s2) {
988
- const i2 = this.get(p.call(this, s2));
989
- return w.call(this, i2);
951
+ const i = this.get(p.call(this, s2));
952
+ return w.call(this, i);
990
953
  }
991
- open(s2, i2, n) {
992
- return x2.call(this, s2, i2, n);
954
+ open(s2, i, n) {
955
+ return x2.call(this, s2, i, n);
993
956
  }
994
- close(s2, i2, n) {
995
- return C.call(this, s2, i2, n);
957
+ close(s2, i, n) {
958
+ return C.call(this, s2, i, n);
996
959
  }
997
- replace(s2, i2, n) {
998
- return O.call(this, s2, i2, n);
960
+ replace(s2, i, n) {
961
+ return O.call(this, s2, i, n);
999
962
  }
1000
- async closeAll(s2 = false, i2, n = true) {
1001
- const r3 = await $2.call(this, s2, i2);
1002
- return n && m.call(this), r3;
963
+ async closeAll(s2 = false, i, n = true) {
964
+ const l2 = await $2.call(this, s2, i);
965
+ return n && m.call(this), l2;
1003
966
  }
1004
967
  }
1005
968
  u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1006
- var Ue = (e, t, r3) => {
969
+ var Ue = (e, t, r2) => {
1007
970
  if (!t.has(e))
1008
- throw TypeError("Cannot " + r3);
971
+ throw TypeError("Cannot " + r2);
1009
972
  };
1010
- var Ae = (e, t, r3) => (Ue(e, t, "read from private field"), r3 ? r3.call(e) : t.get(e)), _e = (e, t, r3) => {
973
+ var Ae = (e, t, r2) => (Ue(e, t, "read from private field"), r2 ? r2.call(e) : t.get(e)), _e = (e, t, r2) => {
1011
974
  if (t.has(e))
1012
975
  throw TypeError("Cannot add the same private member more than once");
1013
- t instanceof WeakSet ? t.add(e) : t.set(e, r3);
1014
- }, Ke = (e, t, r3, i2) => (Ue(e, t, "write to private field"), i2 ? i2.call(e, r3) : t.set(e, r3), r3);
976
+ t instanceof WeakSet ? t.add(e) : t.set(e, r2);
977
+ }, Ke = (e, t, r2, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r2) : t.set(e, r2), r2);
1015
978
  class Ct {
1016
979
  constructor() {
1017
980
  this.collection = [];
@@ -1020,18 +983,18 @@ class Ct {
1020
983
  return await this.deregister(t), this.collection.push(t), this.collection;
1021
984
  }
1022
985
  async deregister(t) {
1023
- const r3 = this.collection.findIndex((i2) => i2 === t);
1024
- if (r3 >= 0) {
1025
- const i2 = this.collection[r3];
1026
- Object.getOwnPropertyNames(i2).forEach((n) => {
1027
- delete i2[n];
1028
- }), this.collection.splice(r3, 1);
986
+ const r2 = this.collection.findIndex((i) => i === t);
987
+ if (r2 >= 0) {
988
+ const i = this.collection[r2];
989
+ Object.getOwnPropertyNames(i).forEach((n) => {
990
+ delete i[n];
991
+ }), this.collection.splice(r2, 1);
1029
992
  }
1030
993
  return this.collection;
1031
994
  }
1032
995
  async registerCollection(t) {
1033
- return await Promise.all(Array.from(t, (r3) => {
1034
- this.register(r3);
996
+ return await Promise.all(Array.from(t, (r2) => {
997
+ this.register(r2);
1035
998
  })), this.collection;
1036
999
  }
1037
1000
  async deregisterCollection() {
@@ -1039,8 +1002,8 @@ class Ct {
1039
1002
  await this.deregister(this.collection[0]);
1040
1003
  return this.collection;
1041
1004
  }
1042
- get(t, r3 = "id") {
1043
- return this.collection.find((i2) => i2[r3] === t);
1005
+ get(t, r2 = "id") {
1006
+ return this.collection.find((i) => i[r2] === t);
1044
1007
  }
1045
1008
  }
1046
1009
  function kt() {
@@ -1059,7 +1022,7 @@ const Dt = {
1059
1022
  placement: "bottom"
1060
1023
  };
1061
1024
  function ot(e, t) {
1062
- const r3 = getComputedStyle(e), i2 = {
1025
+ const r2 = getComputedStyle(e), i = {
1063
1026
  placement: t.placement,
1064
1027
  event: t.eventType,
1065
1028
  offset: 0,
@@ -1068,43 +1031,43 @@ function ot(e, t) {
1068
1031
  "arrow-element": t.selectorArrow,
1069
1032
  "arrow-padding": 0
1070
1033
  };
1071
- for (const n in i2) {
1072
- const o2 = kt(), l2 = r3.getPropertyValue(`--${o2}popover-${n}`).trim();
1073
- l2 && (i2[n] = l2);
1034
+ for (const n in i) {
1035
+ const o2 = kt(), l2 = r2.getPropertyValue(`--${o2}popover-${n}`).trim();
1036
+ l2 && (i[n] = l2);
1074
1037
  }
1075
- return i2;
1038
+ return i;
1076
1039
  }
1077
1040
  function Pe(e) {
1078
1041
  let t;
1079
- const r3 = typeof e == "string" ? e.trim().split(" ") : [e];
1080
- switch (r3.forEach(function(i2, n) {
1081
- r3[n] = parseInt(i2, 10);
1082
- }), r3.length) {
1042
+ const r2 = typeof e == "string" ? e.trim().split(" ") : [e];
1043
+ switch (r2.forEach(function(i, n) {
1044
+ r2[n] = parseInt(i, 10);
1045
+ }), r2.length) {
1083
1046
  case 1:
1084
- t = r3[0];
1047
+ t = r2[0];
1085
1048
  break;
1086
1049
  case 2:
1087
1050
  t = {
1088
- top: r3[0],
1089
- right: r3[1],
1090
- bottom: r3[0],
1091
- left: r3[1]
1051
+ top: r2[0],
1052
+ right: r2[1],
1053
+ bottom: r2[0],
1054
+ left: r2[1]
1092
1055
  };
1093
1056
  break;
1094
1057
  case 3:
1095
1058
  t = {
1096
- top: r3[0],
1097
- right: r3[1],
1098
- bottom: r3[2],
1099
- left: r3[1]
1059
+ top: r2[0],
1060
+ right: r2[1],
1061
+ bottom: r2[2],
1062
+ left: r2[1]
1100
1063
  };
1101
1064
  break;
1102
1065
  case 4:
1103
1066
  t = {
1104
- top: r3[0],
1105
- right: r3[1],
1106
- bottom: r3[2],
1107
- left: r3[3]
1067
+ top: r2[0],
1068
+ right: r2[1],
1069
+ bottom: r2[2],
1070
+ left: r2[3]
1108
1071
  };
1109
1072
  break;
1110
1073
  default:
@@ -1149,8 +1112,8 @@ function st(e) {
1149
1112
  function Bt(e) {
1150
1113
  const t = st.call(this, e);
1151
1114
  if (t) {
1152
- const r3 = document.querySelector(`#${t}`), i2 = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1153
- return !i2 && !r3 ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i2 ? r3 ? { popover: r3, trigger: i2 } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
1115
+ const r2 = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1116
+ return !i && !r2 ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i ? r2 ? { popover: r2, trigger: i } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
1154
1117
  } else
1155
1118
  return { error: new Error("Could not resolve the popover ID.") };
1156
1119
  }
@@ -1168,10 +1131,10 @@ async function ct() {
1168
1131
  }
1169
1132
  function lt(e) {
1170
1133
  e.state == "opened" && setTimeout(() => {
1171
- const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r3 = document.activeElement.closest(
1134
+ const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r2 = document.activeElement.closest(
1172
1135
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
1173
1136
  );
1174
- return !t && !r3 && e.close(), e;
1137
+ return !t && !r2 && e.close(), e;
1175
1138
  }, 1);
1176
1139
  }
1177
1140
  function Tt(e) {
@@ -1193,10 +1156,10 @@ function St(e) {
1193
1156
  }
1194
1157
  function ft(e) {
1195
1158
  const t = this;
1196
- document.addEventListener("click", function r3(i2) {
1197
- i2.target.closest(
1159
+ document.addEventListener("click", function r2(i) {
1160
+ i.target.closest(
1198
1161
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
1199
- ) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r3) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r3));
1162
+ ) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r2) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r2));
1200
1163
  });
1201
1164
  }
1202
1165
  var k = "top", S = "bottom", M3 = "right", D = "left", De = "auto", le = [k, S, M3, D], Q = "start", se = "end", Mt = "clippingParents", ut = "viewport", ne = "popper", Wt = "reference", Ge = /* @__PURE__ */ le.reduce(function(e, t) {
@@ -1232,16 +1195,16 @@ function Re(e) {
1232
1195
  }
1233
1196
  function Ut(e) {
1234
1197
  var t = e.state;
1235
- Object.keys(t.elements).forEach(function(r3) {
1236
- var i2 = t.styles[r3] || {}, n = t.attributes[r3] || {}, o2 = t.elements[r3];
1237
- !T2(o2) || !N(o2) || (Object.assign(o2.style, i2), Object.keys(n).forEach(function(l2) {
1198
+ Object.keys(t.elements).forEach(function(r2) {
1199
+ var i = t.styles[r2] || {}, n = t.attributes[r2] || {}, o2 = t.elements[r2];
1200
+ !T2(o2) || !N(o2) || (Object.assign(o2.style, i), Object.keys(n).forEach(function(l2) {
1238
1201
  var s2 = n[l2];
1239
1202
  s2 === false ? o2.removeAttribute(l2) : o2.setAttribute(l2, s2 === true ? "" : s2);
1240
1203
  }));
1241
1204
  });
1242
1205
  }
1243
1206
  function _t(e) {
1244
- var t = e.state, r3 = {
1207
+ var t = e.state, r2 = {
1245
1208
  popper: {
1246
1209
  position: t.options.strategy,
1247
1210
  left: "0",
@@ -1253,9 +1216,9 @@ function _t(e) {
1253
1216
  },
1254
1217
  reference: {}
1255
1218
  };
1256
- return Object.assign(t.elements.popper.style, r3.popper), t.styles = r3, t.elements.arrow && Object.assign(t.elements.arrow.style, r3.arrow), function() {
1257
- Object.keys(t.elements).forEach(function(i2) {
1258
- var n = t.elements[i2], o2 = t.attributes[i2] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i2) ? t.styles[i2] : r3[i2]), s2 = l2.reduce(function(a2, f2) {
1219
+ return Object.assign(t.elements.popper.style, r2.popper), t.styles = r2, t.elements.arrow && Object.assign(t.elements.arrow.style, r2.arrow), function() {
1220
+ Object.keys(t.elements).forEach(function(i) {
1221
+ var n = t.elements[i], o2 = t.attributes[i] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i) ? t.styles[i] : r2[i]), s2 = l2.reduce(function(a2, f2) {
1259
1222
  return a2[f2] = "", a2;
1260
1223
  }, {});
1261
1224
  !T2(n) || !N(n) || (Object.assign(n.style, s2), Object.keys(o2).forEach(function(a2) {
@@ -1285,11 +1248,11 @@ function Le() {
1285
1248
  function dt() {
1286
1249
  return !/^((?!chrome|android).)*safari/i.test(Le());
1287
1250
  }
1288
- function ee(e, t, r3) {
1289
- t === void 0 && (t = false), r3 === void 0 && (r3 = false);
1290
- var i2 = e.getBoundingClientRect(), n = 1, o2 = 1;
1291
- t && T2(e) && (n = e.offsetWidth > 0 && Z(i2.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i2.height) / e.offsetHeight || 1);
1292
- var l2 = K(e) ? B2(e) : window, s2 = l2.visualViewport, a2 = !dt() && r3, f2 = (i2.left + (a2 && s2 ? s2.offsetLeft : 0)) / n, c2 = (i2.top + (a2 && s2 ? s2.offsetTop : 0)) / o2, h2 = i2.width / n, y2 = i2.height / o2;
1251
+ function ee(e, t, r2) {
1252
+ t === void 0 && (t = false), r2 === void 0 && (r2 = false);
1253
+ var i = e.getBoundingClientRect(), n = 1, o2 = 1;
1254
+ t && T2(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
1255
+ var l2 = K(e) ? B2(e) : window, s2 = l2.visualViewport, a2 = !dt() && r2, f2 = (i.left + (a2 && s2 ? s2.offsetLeft : 0)) / n, c2 = (i.top + (a2 && s2 ? s2.offsetTop : 0)) / o2, h2 = i.width / n, y2 = i.height / o2;
1293
1256
  return {
1294
1257
  width: h2,
1295
1258
  height: y2,
@@ -1302,25 +1265,25 @@ function ee(e, t, r3) {
1302
1265
  };
1303
1266
  }
1304
1267
  function Be(e) {
1305
- var t = ee(e), r3 = e.offsetWidth, i2 = e.offsetHeight;
1306
- return Math.abs(t.width - r3) <= 1 && (r3 = t.width), Math.abs(t.height - i2) <= 1 && (i2 = t.height), {
1268
+ var t = ee(e), r2 = e.offsetWidth, i = e.offsetHeight;
1269
+ return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
1307
1270
  x: e.offsetLeft,
1308
1271
  y: e.offsetTop,
1309
- width: r3,
1310
- height: i2
1272
+ width: r2,
1273
+ height: i
1311
1274
  };
1312
1275
  }
1313
1276
  function vt(e, t) {
1314
- var r3 = t.getRootNode && t.getRootNode();
1277
+ var r2 = t.getRootNode && t.getRootNode();
1315
1278
  if (e.contains(t))
1316
1279
  return true;
1317
- if (r3 && Re(r3)) {
1318
- var i2 = t;
1280
+ if (r2 && Re(r2)) {
1281
+ var i = t;
1319
1282
  do {
1320
- if (i2 && e.isSameNode(i2))
1283
+ if (i && e.isSameNode(i))
1321
1284
  return true;
1322
- i2 = i2.parentNode || i2.host;
1323
- } while (i2);
1285
+ i = i.parentNode || i.host;
1286
+ } while (i);
1324
1287
  }
1325
1288
  return false;
1326
1289
  }
@@ -1353,10 +1316,10 @@ function Je(e) {
1353
1316
  I(e).position === "fixed" ? null : e.offsetParent;
1354
1317
  }
1355
1318
  function Jt(e) {
1356
- var t = /firefox/i.test(Le()), r3 = /Trident/i.test(Le());
1357
- if (r3 && T2(e)) {
1358
- var i2 = I(e);
1359
- if (i2.position === "fixed")
1319
+ var t = /firefox/i.test(Le()), r2 = /Trident/i.test(Le());
1320
+ if (r2 && T2(e)) {
1321
+ var i = I(e);
1322
+ if (i.position === "fixed")
1360
1323
  return null;
1361
1324
  }
1362
1325
  var n = we(e);
@@ -1369,19 +1332,19 @@ function Jt(e) {
1369
1332
  return null;
1370
1333
  }
1371
1334
  function fe(e) {
1372
- for (var t = B2(e), r3 = Je(e); r3 && Gt(r3) && I(r3).position === "static"; )
1373
- r3 = Je(r3);
1374
- return r3 && (N(r3) === "html" || N(r3) === "body" && I(r3).position === "static") ? t : r3 || Jt(e) || t;
1335
+ for (var t = B2(e), r2 = Je(e); r2 && Gt(r2) && I(r2).position === "static"; )
1336
+ r2 = Je(r2);
1337
+ return r2 && (N(r2) === "html" || N(r2) === "body" && I(r2).position === "static") ? t : r2 || Jt(e) || t;
1375
1338
  }
1376
1339
  function Te(e) {
1377
1340
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
1378
1341
  }
1379
- function oe(e, t, r3) {
1380
- return _(e, ye(t, r3));
1342
+ function oe(e, t, r2) {
1343
+ return _(e, ye(t, r2));
1381
1344
  }
1382
- function Qt(e, t, r3) {
1383
- var i2 = oe(e, t, r3);
1384
- return i2 > r3 ? r3 : i2;
1345
+ function Qt(e, t, r2) {
1346
+ var i = oe(e, t, r2);
1347
+ return i > r2 ? r2 : i;
1385
1348
  }
1386
1349
  function ht() {
1387
1350
  return {
@@ -1395,24 +1358,24 @@ function gt(e) {
1395
1358
  return Object.assign({}, ht(), e);
1396
1359
  }
1397
1360
  function mt(e, t) {
1398
- return t.reduce(function(r3, i2) {
1399
- return r3[i2] = e, r3;
1361
+ return t.reduce(function(r2, i) {
1362
+ return r2[i] = e, r2;
1400
1363
  }, {});
1401
1364
  }
1402
- var Zt = function(t, r3) {
1403
- return t = typeof t == "function" ? t(Object.assign({}, r3.rects, {
1404
- placement: r3.placement
1365
+ var Zt = function(t, r2) {
1366
+ return t = typeof t == "function" ? t(Object.assign({}, r2.rects, {
1367
+ placement: r2.placement
1405
1368
  })) : t, gt(typeof t != "number" ? t : mt(t, le));
1406
1369
  };
1407
1370
  function er(e) {
1408
- var t, r3 = e.state, i2 = e.name, n = e.options, o2 = r3.elements.arrow, l2 = r3.modifiersData.popperOffsets, s2 = H(r3.placement), a2 = Te(s2), f2 = [D, M3].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
1371
+ var t, r2 = e.state, i = e.name, n = e.options, o2 = r2.elements.arrow, l2 = r2.modifiersData.popperOffsets, s2 = H(r2.placement), a2 = Te(s2), f2 = [D, M3].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
1409
1372
  if (!(!o2 || !l2)) {
1410
- var h2 = Zt(n.padding, r3), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : M3, v2 = r3.rects.reference[c2] + r3.rects.reference[a2] - l2[a2] - r3.rects.popper[c2], d2 = l2[a2] - r3.rects.reference[a2], w2 = fe(o2), O2 = w2 ? a2 === "y" ? w2.clientHeight || 0 : w2.clientWidth || 0 : 0, E2 = v2 / 2 - d2 / 2, p2 = h2[u2], g2 = O2 - y2[c2] - h2[b2], m2 = O2 / 2 - y2[c2] / 2 + E2, x3 = oe(p2, m2, g2), L2 = a2;
1411
- r3.modifiersData[i2] = (t = {}, t[L2] = x3, t.centerOffset = x3 - m2, t);
1373
+ var h2 = Zt(n.padding, r2), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : M3, v2 = r2.rects.reference[c2] + r2.rects.reference[a2] - l2[a2] - r2.rects.popper[c2], d2 = l2[a2] - r2.rects.reference[a2], w2 = fe(o2), O2 = w2 ? a2 === "y" ? w2.clientHeight || 0 : w2.clientWidth || 0 : 0, E2 = v2 / 2 - d2 / 2, p2 = h2[u2], g2 = O2 - y2[c2] - h2[b2], m2 = O2 / 2 - y2[c2] / 2 + E2, x3 = oe(p2, m2, g2), L2 = a2;
1374
+ r2.modifiersData[i] = (t = {}, t[L2] = x3, t.centerOffset = x3 - m2, t);
1412
1375
  }
1413
1376
  }
1414
1377
  function tr(e) {
1415
- var t = e.state, r3 = e.options, i2 = r3.element, n = i2 === void 0 ? "[data-popper-arrow]" : i2;
1378
+ var t = e.state, r2 = e.options, i = r2.element, n = i === void 0 ? "[data-popper-arrow]" : i;
1416
1379
  n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
1417
1380
  }
1418
1381
  const rr = {
@@ -1434,14 +1397,14 @@ var ir = {
1434
1397
  left: "auto"
1435
1398
  };
1436
1399
  function nr(e, t) {
1437
- var r3 = e.x, i2 = e.y, n = t.devicePixelRatio || 1;
1400
+ var r2 = e.x, i = e.y, n = t.devicePixelRatio || 1;
1438
1401
  return {
1439
- x: Z(r3 * n) / n || 0,
1440
- y: Z(i2 * n) / n || 0
1402
+ x: Z(r2 * n) / n || 0,
1403
+ y: Z(i * n) / n || 0
1441
1404
  };
1442
1405
  }
1443
1406
  function Qe(e) {
1444
- var t, r3 = e.popper, i2 = e.popperRect, n = e.placement, o2 = e.variation, l2 = e.offsets, s2 = e.position, a2 = e.gpuAcceleration, f2 = e.adaptive, c2 = e.roundOffsets, h2 = e.isFixed, y2 = l2.x, u2 = y2 === void 0 ? 0 : y2, b2 = l2.y, v2 = b2 === void 0 ? 0 : b2, d2 = typeof c2 == "function" ? c2({
1407
+ var t, r2 = e.popper, i = e.popperRect, n = e.placement, o2 = e.variation, l2 = e.offsets, s2 = e.position, a2 = e.gpuAcceleration, f2 = e.adaptive, c2 = e.roundOffsets, h2 = e.isFixed, y2 = l2.x, u2 = y2 === void 0 ? 0 : y2, b2 = l2.y, v2 = b2 === void 0 ? 0 : b2, d2 = typeof c2 == "function" ? c2({
1445
1408
  x: u2,
1446
1409
  y: v2
1447
1410
  }) : {
@@ -1451,14 +1414,14 @@ function Qe(e) {
1451
1414
  u2 = d2.x, v2 = d2.y;
1452
1415
  var w2 = l2.hasOwnProperty("x"), O2 = l2.hasOwnProperty("y"), E2 = D, p2 = k, g2 = window;
1453
1416
  if (f2) {
1454
- var m2 = fe(r3), x3 = "clientHeight", L2 = "clientWidth";
1455
- if (m2 === B2(r3) && (m2 = F(r3), I(m2).position !== "static" && s2 === "absolute" && (x3 = "scrollHeight", L2 = "scrollWidth")), m2 = m2, n === k || (n === D || n === M3) && o2 === se) {
1417
+ var m2 = fe(r2), x3 = "clientHeight", L2 = "clientWidth";
1418
+ if (m2 === B2(r2) && (m2 = F(r2), I(m2).position !== "static" && s2 === "absolute" && (x3 = "scrollHeight", L2 = "scrollWidth")), m2 = m2, n === k || (n === D || n === M3) && o2 === se) {
1456
1419
  p2 = S;
1457
1420
  var P3 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.height : (
1458
1421
  // $FlowFixMe[prop-missing]
1459
1422
  m2[x3]
1460
1423
  );
1461
- v2 -= P3 - i2.height, v2 *= a2 ? 1 : -1;
1424
+ v2 -= P3 - i.height, v2 *= a2 ? 1 : -1;
1462
1425
  }
1463
1426
  if (n === D || (n === k || n === S) && o2 === se) {
1464
1427
  E2 = M3;
@@ -1466,7 +1429,7 @@ function Qe(e) {
1466
1429
  // $FlowFixMe[prop-missing]
1467
1430
  m2[L2]
1468
1431
  );
1469
- u2 -= A2 - i2.width, u2 *= a2 ? 1 : -1;
1432
+ u2 -= A2 - i.width, u2 *= a2 ? 1 : -1;
1470
1433
  }
1471
1434
  }
1472
1435
  var $3 = Object.assign({
@@ -1474,7 +1437,7 @@ function Qe(e) {
1474
1437
  }, f2 && ir), W2 = c2 === true ? nr({
1475
1438
  x: u2,
1476
1439
  y: v2
1477
- }, B2(r3)) : {
1440
+ }, B2(r2)) : {
1478
1441
  x: u2,
1479
1442
  y: v2
1480
1443
  };
@@ -1485,7 +1448,7 @@ function Qe(e) {
1485
1448
  return Object.assign({}, $3, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
1486
1449
  }
1487
1450
  function or(e) {
1488
- var t = e.state, r3 = e.options, i2 = r3.gpuAcceleration, n = i2 === void 0 ? true : i2, o2 = r3.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r3.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
1451
+ var t = e.state, r2 = e.options, i = r2.gpuAcceleration, n = i === void 0 ? true : i, o2 = r2.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r2.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
1489
1452
  placement: H(t.placement),
1490
1453
  variation: te(t.placement),
1491
1454
  popper: t.elements.popper,
@@ -1518,13 +1481,13 @@ var ge = {
1518
1481
  passive: true
1519
1482
  };
1520
1483
  function sr(e) {
1521
- var t = e.state, r3 = e.instance, i2 = e.options, n = i2.scroll, o2 = n === void 0 ? true : n, l2 = i2.resize, s2 = l2 === void 0 ? true : l2, a2 = B2(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1484
+ var t = e.state, r2 = e.instance, i = e.options, n = i.scroll, o2 = n === void 0 ? true : n, l2 = i.resize, s2 = l2 === void 0 ? true : l2, a2 = B2(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1522
1485
  return o2 && f2.forEach(function(c2) {
1523
- c2.addEventListener("scroll", r3.update, ge);
1524
- }), s2 && a2.addEventListener("resize", r3.update, ge), function() {
1486
+ c2.addEventListener("scroll", r2.update, ge);
1487
+ }), s2 && a2.addEventListener("resize", r2.update, ge), function() {
1525
1488
  o2 && f2.forEach(function(c2) {
1526
- c2.removeEventListener("scroll", r3.update, ge);
1527
- }), s2 && a2.removeEventListener("resize", r3.update, ge);
1489
+ c2.removeEventListener("scroll", r2.update, ge);
1490
+ }), s2 && a2.removeEventListener("resize", r2.update, ge);
1528
1491
  };
1529
1492
  }
1530
1493
  const cr = {
@@ -1557,17 +1520,17 @@ function Ze(e) {
1557
1520
  });
1558
1521
  }
1559
1522
  function Se(e) {
1560
- var t = B2(e), r3 = t.pageXOffset, i2 = t.pageYOffset;
1523
+ var t = B2(e), r2 = t.pageXOffset, i = t.pageYOffset;
1561
1524
  return {
1562
- scrollLeft: r3,
1563
- scrollTop: i2
1525
+ scrollLeft: r2,
1526
+ scrollTop: i
1564
1527
  };
1565
1528
  }
1566
1529
  function Me(e) {
1567
1530
  return ee(F(e)).left + Se(e).scrollLeft;
1568
1531
  }
1569
1532
  function ur(e, t) {
1570
- var r3 = B2(e), i2 = F(e), n = r3.visualViewport, o2 = i2.clientWidth, l2 = i2.clientHeight, s2 = 0, a2 = 0;
1533
+ var r2 = B2(e), i = F(e), n = r2.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
1571
1534
  if (n) {
1572
1535
  o2 = n.width, l2 = n.height;
1573
1536
  var f2 = dt();
@@ -1581,8 +1544,8 @@ function ur(e, t) {
1581
1544
  };
1582
1545
  }
1583
1546
  function pr(e) {
1584
- var t, r3 = F(e), i2 = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r3.scrollWidth, r3.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r3.scrollHeight, r3.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s2 = -i2.scrollLeft + Me(e), a2 = -i2.scrollTop;
1585
- return I(n || r3).direction === "rtl" && (s2 += _(r3.clientWidth, n ? n.clientWidth : 0) - o2), {
1547
+ var t, r2 = F(e), i = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r2.scrollWidth, r2.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r2.scrollHeight, r2.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s2 = -i.scrollLeft + Me(e), a2 = -i.scrollTop;
1548
+ return I(n || r2).direction === "rtl" && (s2 += _(r2.clientWidth, n ? n.clientWidth : 0) - o2), {
1586
1549
  width: o2,
1587
1550
  height: l2,
1588
1551
  x: s2,
@@ -1590,16 +1553,16 @@ function pr(e) {
1590
1553
  };
1591
1554
  }
1592
1555
  function We(e) {
1593
- var t = I(e), r3 = t.overflow, i2 = t.overflowX, n = t.overflowY;
1594
- return /auto|scroll|overlay|hidden/.test(r3 + n + i2);
1556
+ var t = I(e), r2 = t.overflow, i = t.overflowX, n = t.overflowY;
1557
+ return /auto|scroll|overlay|hidden/.test(r2 + n + i);
1595
1558
  }
1596
1559
  function yt(e) {
1597
1560
  return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T2(e) && We(e) ? e : yt(we(e));
1598
1561
  }
1599
1562
  function ae(e, t) {
1600
- var r3;
1563
+ var r2;
1601
1564
  t === void 0 && (t = []);
1602
- var i2 = yt(e), n = i2 === ((r3 = e.ownerDocument) == null ? void 0 : r3.body), o2 = B2(i2), l2 = n ? [o2].concat(o2.visualViewport || [], We(i2) ? i2 : []) : i2, s2 = t.concat(l2);
1565
+ var i = yt(e), n = i === ((r2 = e.ownerDocument) == null ? void 0 : r2.body), o2 = B2(i), l2 = n ? [o2].concat(o2.visualViewport || [], We(i) ? i : []) : i, s2 = t.concat(l2);
1603
1566
  return n ? s2 : (
1604
1567
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1605
1568
  s2.concat(ae(we(l2)))
@@ -1614,32 +1577,32 @@ function $e(e) {
1614
1577
  });
1615
1578
  }
1616
1579
  function dr(e, t) {
1617
- var r3 = ee(e, false, t === "fixed");
1618
- return r3.top = r3.top + e.clientTop, r3.left = r3.left + e.clientLeft, r3.bottom = r3.top + e.clientHeight, r3.right = r3.left + e.clientWidth, r3.width = e.clientWidth, r3.height = e.clientHeight, r3.x = r3.left, r3.y = r3.top, r3;
1580
+ var r2 = ee(e, false, t === "fixed");
1581
+ return r2.top = r2.top + e.clientTop, r2.left = r2.left + e.clientLeft, r2.bottom = r2.top + e.clientHeight, r2.right = r2.left + e.clientWidth, r2.width = e.clientWidth, r2.height = e.clientHeight, r2.x = r2.left, r2.y = r2.top, r2;
1619
1582
  }
1620
- function et(e, t, r3) {
1621
- return t === ut ? $e(ur(e, r3)) : K(t) ? dr(t, r3) : $e(pr(F(e)));
1583
+ function et(e, t, r2) {
1584
+ return t === ut ? $e(ur(e, r2)) : K(t) ? dr(t, r2) : $e(pr(F(e)));
1622
1585
  }
1623
1586
  function vr(e) {
1624
- var t = ae(we(e)), r3 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i2 = r3 && T2(e) ? fe(e) : e;
1625
- return K(i2) ? t.filter(function(n) {
1626
- return K(n) && vt(n, i2) && N(n) !== "body";
1587
+ var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i = r2 && T2(e) ? fe(e) : e;
1588
+ return K(i) ? t.filter(function(n) {
1589
+ return K(n) && vt(n, i) && N(n) !== "body";
1627
1590
  }) : [];
1628
1591
  }
1629
- function hr(e, t, r3, i2) {
1630
- var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r3]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1631
- var c2 = et(e, f2, i2);
1592
+ function hr(e, t, r2, i) {
1593
+ var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r2]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1594
+ var c2 = et(e, f2, i);
1632
1595
  return a2.top = _(c2.top, a2.top), a2.right = ye(c2.right, a2.right), a2.bottom = ye(c2.bottom, a2.bottom), a2.left = _(c2.left, a2.left), a2;
1633
- }, et(e, l2, i2));
1596
+ }, et(e, l2, i));
1634
1597
  return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
1635
1598
  }
1636
1599
  function wt(e) {
1637
- var t = e.reference, r3 = e.element, i2 = e.placement, n = i2 ? H(i2) : null, o2 = i2 ? te(i2) : null, l2 = t.x + t.width / 2 - r3.width / 2, s2 = t.y + t.height / 2 - r3.height / 2, a2;
1600
+ var t = e.reference, r2 = e.element, i = e.placement, n = i ? H(i) : null, o2 = i ? te(i) : null, l2 = t.x + t.width / 2 - r2.width / 2, s2 = t.y + t.height / 2 - r2.height / 2, a2;
1638
1601
  switch (n) {
1639
1602
  case k:
1640
1603
  a2 = {
1641
1604
  x: l2,
1642
- y: t.y - r3.height
1605
+ y: t.y - r2.height
1643
1606
  };
1644
1607
  break;
1645
1608
  case S:
@@ -1656,7 +1619,7 @@ function wt(e) {
1656
1619
  break;
1657
1620
  case D:
1658
1621
  a2 = {
1659
- x: t.x - r3.width,
1622
+ x: t.x - r2.width,
1660
1623
  y: s2
1661
1624
  };
1662
1625
  break;
@@ -1671,10 +1634,10 @@ function wt(e) {
1671
1634
  var c2 = f2 === "y" ? "height" : "width";
1672
1635
  switch (o2) {
1673
1636
  case Q:
1674
- a2[f2] = a2[f2] - (t[c2] / 2 - r3[c2] / 2);
1637
+ a2[f2] = a2[f2] - (t[c2] / 2 - r2[c2] / 2);
1675
1638
  break;
1676
1639
  case se:
1677
- a2[f2] = a2[f2] + (t[c2] / 2 - r3[c2] / 2);
1640
+ a2[f2] = a2[f2] + (t[c2] / 2 - r2[c2] / 2);
1678
1641
  break;
1679
1642
  }
1680
1643
  }
@@ -1682,7 +1645,7 @@ function wt(e) {
1682
1645
  }
1683
1646
  function ce(e, t) {
1684
1647
  t === void 0 && (t = {});
1685
- var r3 = t, i2 = r3.placement, n = i2 === void 0 ? e.placement : i2, o2 = r3.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r3.boundary, a2 = s2 === void 0 ? Mt : s2, f2 = r3.rootBoundary, c2 = f2 === void 0 ? ut : f2, h2 = r3.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r3.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r3.padding, d2 = v2 === void 0 ? 0 : v2, w2 = gt(typeof d2 != "number" ? d2 : mt(d2, le)), O2 = y2 === ne ? Wt : ne, E2 = e.rects.popper, p2 = e.elements[b2 ? O2 : y2], g2 = hr(K(p2) ? p2 : p2.contextElement || F(e.elements.popper), a2, c2, l2), m2 = ee(e.elements.reference), x3 = wt({
1648
+ var r2 = t, i = r2.placement, n = i === void 0 ? e.placement : i, o2 = r2.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r2.boundary, a2 = s2 === void 0 ? Mt : s2, f2 = r2.rootBoundary, c2 = f2 === void 0 ? ut : f2, h2 = r2.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r2.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r2.padding, d2 = v2 === void 0 ? 0 : v2, w2 = gt(typeof d2 != "number" ? d2 : mt(d2, le)), O2 = y2 === ne ? Wt : ne, E2 = e.rects.popper, p2 = e.elements[b2 ? O2 : y2], g2 = hr(K(p2) ? p2 : p2.contextElement || F(e.elements.popper), a2, c2, l2), m2 = ee(e.elements.reference), x3 = wt({
1686
1649
  reference: m2,
1687
1650
  element: E2,
1688
1651
  strategy: "absolute",
@@ -1704,7 +1667,7 @@ function ce(e, t) {
1704
1667
  }
1705
1668
  function gr(e, t) {
1706
1669
  t === void 0 && (t = {});
1707
- var r3 = t, i2 = r3.placement, n = r3.boundary, o2 = r3.rootBoundary, l2 = r3.padding, s2 = r3.flipVariations, a2 = r3.allowedAutoPlacements, f2 = a2 === void 0 ? pt : a2, c2 = te(i2), h2 = c2 ? s2 ? Ge : Ge.filter(function(b2) {
1670
+ var r2 = t, i = r2.placement, n = r2.boundary, o2 = r2.rootBoundary, l2 = r2.padding, s2 = r2.flipVariations, a2 = r2.allowedAutoPlacements, f2 = a2 === void 0 ? pt : a2, c2 = te(i), h2 = c2 ? s2 ? Ge : Ge.filter(function(b2) {
1708
1671
  return te(b2) === c2;
1709
1672
  }) : le, y2 = h2.filter(function(b2) {
1710
1673
  return f2.indexOf(b2) >= 0;
@@ -1729,9 +1692,9 @@ function mr(e) {
1729
1692
  return [Ze(e), t, Ze(t)];
1730
1693
  }
1731
1694
  function yr(e) {
1732
- var t = e.state, r3 = e.options, i2 = e.name;
1733
- if (!t.modifiersData[i2]._skip) {
1734
- for (var n = r3.mainAxis, o2 = n === void 0 ? true : n, l2 = r3.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r3.fallbackPlacements, f2 = r3.padding, c2 = r3.boundary, h2 = r3.rootBoundary, y2 = r3.altBoundary, u2 = r3.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r3.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : mr(d2)), p2 = [d2].concat(E2).reduce(function(G2, V2) {
1695
+ var t = e.state, r2 = e.options, i = e.name;
1696
+ if (!t.modifiersData[i]._skip) {
1697
+ for (var n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r2.fallbackPlacements, f2 = r2.padding, c2 = r2.boundary, h2 = r2.rootBoundary, y2 = r2.altBoundary, u2 = r2.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r2.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : mr(d2)), p2 = [d2].concat(E2).reduce(function(G2, V2) {
1735
1698
  return G2.concat(H(V2) === De ? gr(t, {
1736
1699
  placement: V2,
1737
1700
  boundary: c2,
@@ -1774,7 +1737,7 @@ function yr(e) {
1774
1737
  if (de === "break")
1775
1738
  break;
1776
1739
  }
1777
- t.placement !== P3 && (t.modifiersData[i2]._skip = true, t.placement = P3, t.reset = true);
1740
+ t.placement !== P3 && (t.modifiersData[i]._skip = true, t.placement = P3, t.reset = true);
1778
1741
  }
1779
1742
  }
1780
1743
  const wr = {
@@ -1787,15 +1750,15 @@ const wr = {
1787
1750
  _skip: false
1788
1751
  }
1789
1752
  };
1790
- function tt(e, t, r3) {
1791
- return r3 === void 0 && (r3 = {
1753
+ function tt(e, t, r2) {
1754
+ return r2 === void 0 && (r2 = {
1792
1755
  x: 0,
1793
1756
  y: 0
1794
1757
  }), {
1795
- top: e.top - t.height - r3.y,
1796
- right: e.right - t.width + r3.x,
1797
- bottom: e.bottom - t.height + r3.y,
1798
- left: e.left - t.width - r3.x
1758
+ top: e.top - t.height - r2.y,
1759
+ right: e.right - t.width + r2.x,
1760
+ bottom: e.bottom - t.height + r2.y,
1761
+ left: e.left - t.width - r2.x
1799
1762
  };
1800
1763
  }
1801
1764
  function rt(e) {
@@ -1804,12 +1767,12 @@ function rt(e) {
1804
1767
  });
1805
1768
  }
1806
1769
  function br(e) {
1807
- var t = e.state, r3 = e.name, i2 = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1770
+ var t = e.state, r2 = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1808
1771
  elementContext: "reference"
1809
1772
  }), s2 = ce(t, {
1810
1773
  altBoundary: true
1811
- }), a2 = tt(l2, i2), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1812
- t.modifiersData[r3] = {
1774
+ }), a2 = tt(l2, i), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1775
+ t.modifiersData[r2] = {
1813
1776
  referenceClippingOffsets: a2,
1814
1777
  popperEscapeOffsets: f2,
1815
1778
  isReferenceHidden: c2,
@@ -1826,11 +1789,11 @@ const xr = {
1826
1789
  requiresIfExists: ["preventOverflow"],
1827
1790
  fn: br
1828
1791
  };
1829
- function Or(e, t, r3) {
1830
- var i2 = H(e), n = [D, k].indexOf(i2) >= 0 ? -1 : 1, o2 = typeof r3 == "function" ? r3(Object.assign({}, t, {
1792
+ function Or(e, t, r2) {
1793
+ var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r2 == "function" ? r2(Object.assign({}, t, {
1831
1794
  placement: e
1832
- })) : r3, l2 = o2[0], s2 = o2[1];
1833
- return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M3].indexOf(i2) >= 0 ? {
1795
+ })) : r2, l2 = o2[0], s2 = o2[1];
1796
+ return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M3].indexOf(i) >= 0 ? {
1834
1797
  x: s2,
1835
1798
  y: l2
1836
1799
  } : {
@@ -1839,10 +1802,10 @@ function Or(e, t, r3) {
1839
1802
  };
1840
1803
  }
1841
1804
  function Er(e) {
1842
- var t = e.state, r3 = e.options, i2 = e.name, n = r3.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
1805
+ var t = e.state, r2 = e.options, i = e.name, n = r2.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
1843
1806
  return c2[h2] = Or(h2, t.rects, o2), c2;
1844
1807
  }, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
1845
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i2] = l2;
1808
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
1846
1809
  }
1847
1810
  const Ar = {
1848
1811
  name: "offset",
@@ -1852,8 +1815,8 @@ const Ar = {
1852
1815
  fn: Er
1853
1816
  };
1854
1817
  function Pr(e) {
1855
- var t = e.state, r3 = e.name;
1856
- t.modifiersData[r3] = wt({
1818
+ var t = e.state, r2 = e.name;
1819
+ t.modifiersData[r2] = wt({
1857
1820
  reference: t.rects.reference,
1858
1821
  element: t.rects.popper,
1859
1822
  strategy: "absolute",
@@ -1871,7 +1834,7 @@ function $r(e) {
1871
1834
  return e === "x" ? "y" : "x";
1872
1835
  }
1873
1836
  function Cr(e) {
1874
- var t = e.state, r3 = e.options, i2 = e.name, n = r3.mainAxis, o2 = n === void 0 ? true : n, l2 = r3.altAxis, s2 = l2 === void 0 ? false : l2, a2 = r3.boundary, f2 = r3.rootBoundary, c2 = r3.altBoundary, h2 = r3.padding, y2 = r3.tether, u2 = y2 === void 0 ? true : y2, b2 = r3.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
1837
+ var t = e.state, r2 = e.options, i = e.name, n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s2 = l2 === void 0 ? false : l2, a2 = r2.boundary, f2 = r2.rootBoundary, c2 = r2.altBoundary, h2 = r2.padding, y2 = r2.tether, u2 = y2 === void 0 ? true : y2, b2 = r2.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
1875
1838
  boundary: a2,
1876
1839
  rootBoundary: f2,
1877
1840
  padding: h2,
@@ -1900,7 +1863,7 @@ function Cr(e) {
1900
1863
  var Ie, Lt = p2 === "x" ? k : D, $t = p2 === "x" ? S : M3, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ve = U2 + d2[Lt], Fe = U2 - d2[$t], Ee = [k, D].indexOf(w2) !== -1, qe = (Ie = $3 == null ? void 0 : $3[g2]) != null ? Ie : 0, Xe = Ee ? Ve : U2 - x3[he] - L2[he] - qe + A2.altAxis, Ye = Ee ? U2 + x3[he] + L2[he] - qe - A2.altAxis : Fe, ze = u2 && Ee ? Qt(Xe, U2, Ye) : oe(u2 ? Xe : Ve, U2, u2 ? Ye : Fe);
1901
1864
  m2[g2] = ze, W2[g2] = ze - U2;
1902
1865
  }
1903
- t.modifiersData[i2] = W2;
1866
+ t.modifiersData[i] = W2;
1904
1867
  }
1905
1868
  }
1906
1869
  const kr = {
@@ -1920,19 +1883,19 @@ function Rr(e) {
1920
1883
  return e === B2(e) || !T2(e) ? Se(e) : Dr(e);
1921
1884
  }
1922
1885
  function Br(e) {
1923
- var t = e.getBoundingClientRect(), r3 = Z(t.width) / e.offsetWidth || 1, i2 = Z(t.height) / e.offsetHeight || 1;
1924
- return r3 !== 1 || i2 !== 1;
1886
+ var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
1887
+ return r2 !== 1 || i !== 1;
1925
1888
  }
1926
- function Tr(e, t, r3) {
1927
- r3 === void 0 && (r3 = false);
1928
- var i2 = T2(t), n = T2(t) && Br(t), o2 = F(t), l2 = ee(e, n, r3), s2 = {
1889
+ function Tr(e, t, r2) {
1890
+ r2 === void 0 && (r2 = false);
1891
+ var i = T2(t), n = T2(t) && Br(t), o2 = F(t), l2 = ee(e, n, r2), s2 = {
1929
1892
  scrollLeft: 0,
1930
1893
  scrollTop: 0
1931
1894
  }, a2 = {
1932
1895
  x: 0,
1933
1896
  y: 0
1934
1897
  };
1935
- return (i2 || !i2 && !r3) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1898
+ return (i || !i && !r2) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1936
1899
  We(o2)) && (s2 = Rr(t)), T2(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
1937
1900
  x: l2.left + s2.scrollLeft - a2.x,
1938
1901
  y: l2.top + s2.scrollTop - a2.y,
@@ -1941,52 +1904,52 @@ function Tr(e, t, r3) {
1941
1904
  };
1942
1905
  }
1943
1906
  function Sr(e) {
1944
- var t = /* @__PURE__ */ new Map(), r3 = /* @__PURE__ */ new Set(), i2 = [];
1907
+ var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(), i = [];
1945
1908
  e.forEach(function(o2) {
1946
1909
  t.set(o2.name, o2);
1947
1910
  });
1948
1911
  function n(o2) {
1949
- r3.add(o2.name);
1912
+ r2.add(o2.name);
1950
1913
  var l2 = [].concat(o2.requires || [], o2.requiresIfExists || []);
1951
1914
  l2.forEach(function(s2) {
1952
- if (!r3.has(s2)) {
1915
+ if (!r2.has(s2)) {
1953
1916
  var a2 = t.get(s2);
1954
1917
  a2 && n(a2);
1955
1918
  }
1956
- }), i2.push(o2);
1919
+ }), i.push(o2);
1957
1920
  }
1958
1921
  return e.forEach(function(o2) {
1959
- r3.has(o2.name) || n(o2);
1960
- }), i2;
1922
+ r2.has(o2.name) || n(o2);
1923
+ }), i;
1961
1924
  }
1962
1925
  function Mr(e) {
1963
1926
  var t = Sr(e);
1964
- return zt.reduce(function(r3, i2) {
1965
- return r3.concat(t.filter(function(n) {
1966
- return n.phase === i2;
1927
+ return zt.reduce(function(r2, i) {
1928
+ return r2.concat(t.filter(function(n) {
1929
+ return n.phase === i;
1967
1930
  }));
1968
1931
  }, []);
1969
1932
  }
1970
1933
  function Wr(e) {
1971
1934
  var t;
1972
1935
  return function() {
1973
- return t || (t = new Promise(function(r3) {
1936
+ return t || (t = new Promise(function(r2) {
1974
1937
  Promise.resolve().then(function() {
1975
- t = void 0, r3(e());
1938
+ t = void 0, r2(e());
1976
1939
  });
1977
1940
  })), t;
1978
1941
  };
1979
1942
  }
1980
1943
  function jr(e) {
1981
- var t = e.reduce(function(r3, i2) {
1982
- var n = r3[i2.name];
1983
- return r3[i2.name] = n ? Object.assign({}, n, i2, {
1984
- options: Object.assign({}, n.options, i2.options),
1985
- data: Object.assign({}, n.data, i2.data)
1986
- }) : i2, r3;
1944
+ var t = e.reduce(function(r2, i) {
1945
+ var n = r2[i.name];
1946
+ return r2[i.name] = n ? Object.assign({}, n, i, {
1947
+ options: Object.assign({}, n.options, i.options),
1948
+ data: Object.assign({}, n.data, i.data)
1949
+ }) : i, r2;
1987
1950
  }, {});
1988
- return Object.keys(t).map(function(r3) {
1989
- return t[r3];
1951
+ return Object.keys(t).map(function(r2) {
1952
+ return t[r2];
1990
1953
  });
1991
1954
  }
1992
1955
  var it2 = {
@@ -1995,15 +1958,15 @@ var it2 = {
1995
1958
  strategy: "absolute"
1996
1959
  };
1997
1960
  function nt() {
1998
- for (var e = arguments.length, t = new Array(e), r3 = 0; r3 < e; r3++)
1999
- t[r3] = arguments[r3];
2000
- return !t.some(function(i2) {
2001
- return !(i2 && typeof i2.getBoundingClientRect == "function");
1961
+ for (var e = arguments.length, t = new Array(e), r2 = 0; r2 < e; r2++)
1962
+ t[r2] = arguments[r2];
1963
+ return !t.some(function(i) {
1964
+ return !(i && typeof i.getBoundingClientRect == "function");
2002
1965
  });
2003
1966
  }
2004
1967
  function Hr(e) {
2005
1968
  e === void 0 && (e = {});
2006
- var t = e, r3 = t.defaultModifiers, i2 = r3 === void 0 ? [] : r3, n = t.defaultOptions, o2 = n === void 0 ? it2 : n;
1969
+ var t = e, r2 = t.defaultModifiers, i = r2 === void 0 ? [] : r2, n = t.defaultOptions, o2 = n === void 0 ? it2 : n;
2007
1970
  return function(s2, a2, f2) {
2008
1971
  f2 === void 0 && (f2 = o2);
2009
1972
  var c2 = {
@@ -2025,7 +1988,7 @@ function Hr(e) {
2025
1988
  reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
2026
1989
  popper: ae(a2)
2027
1990
  };
2028
- var E2 = Mr(jr([].concat(i2, c2.options.modifiers)));
1991
+ var E2 = Mr(jr([].concat(i, c2.options.modifiers)));
2029
1992
  return c2.orderedModifiers = E2.filter(function(p2) {
2030
1993
  return p2.enabled;
2031
1994
  }), b2(), u2.update();
@@ -2106,20 +2069,20 @@ var Nr = [cr, Lr, ar, Kt, Ar, wr, kr, rr, xr], Ir = /* @__PURE__ */ Hr({
2106
2069
  async function Ce(e) {
2107
2070
  if (!e)
2108
2071
  return this.collection;
2109
- const t = this.collection.findIndex((r3) => r3.id === e.id);
2072
+ const t = this.collection.findIndex((r2) => r2.id === e.id);
2110
2073
  if (t >= 0) {
2111
- const r3 = this.collection[t];
2112
- r3.state === "opened" && r3.close(), r3.popper.destroy(), bt(r3), Object.getOwnPropertyNames(r3).forEach((i2) => {
2113
- delete r3[i2];
2074
+ const r2 = this.collection[t];
2075
+ r2.state === "opened" && r2.close(), r2.popper.destroy(), bt(r2), Object.getOwnPropertyNames(r2).forEach((i) => {
2076
+ delete r2[i];
2114
2077
  }), this.collection.splice(t, 1);
2115
2078
  }
2116
2079
  return this.collection;
2117
2080
  }
2118
2081
  function bt(e) {
2119
2082
  return e.__eventListeners && (e.__eventListeners.forEach((t) => {
2120
- t.el.forEach((r3) => {
2121
- t.type.forEach((i2) => {
2122
- e[r3].removeEventListener(i2, t.listener, false);
2083
+ t.el.forEach((r2) => {
2084
+ t.type.forEach((i) => {
2085
+ e[r2].removeEventListener(i, t.listener, false);
2123
2086
  });
2124
2087
  });
2125
2088
  }), delete e.__eventListeners), e;
@@ -2136,15 +2099,15 @@ async function je(e) {
2136
2099
  }
2137
2100
  async function Vr(e, t) {
2138
2101
  Ce.call(this, e);
2139
- const r3 = this, i2 = {
2102
+ const r2 = this, i = {
2140
2103
  open() {
2141
- return je.call(r3, this);
2104
+ return je.call(r2, this);
2142
2105
  },
2143
2106
  close() {
2144
- return ke.call(r3, this);
2107
+ return ke.call(r2, this);
2145
2108
  },
2146
2109
  deregister() {
2147
- return Ce.call(r3, this);
2110
+ return Ce.call(r2, this);
2148
2111
  }
2149
2112
  }, n = {
2150
2113
  id: e.id,
@@ -2153,7 +2116,7 @@ async function Vr(e, t) {
2153
2116
  trigger: t,
2154
2117
  popper: Ir(t, e),
2155
2118
  config: ot(e, this.settings),
2156
- ...i2
2119
+ ...i
2157
2120
  };
2158
2121
  return n.trigger.hasAttribute("aria-controls") && n.trigger.setAttribute("aria-expanded", "false"), xt.call(this, n), this.collection.push(n), n.el.classList.contains(this.settings.stateActive) && (await n.open(), ft.call(this, n)), n;
2159
2122
  }
@@ -2166,67 +2129,66 @@ function xt(e) {
2166
2129
  el: ["el", "trigger"],
2167
2130
  type: ["mouseleave", "focusout"],
2168
2131
  listener: lt.bind(this, e)
2169
- }], e.__eventListeners.forEach((r3) => {
2170
- r3.el.forEach((i2) => {
2171
- r3.type.forEach((n) => {
2172
- e[i2].addEventListener(n, r3.listener, false);
2132
+ }], e.__eventListeners.forEach((r2) => {
2133
+ r2.el.forEach((i) => {
2134
+ r2.type.forEach((n) => {
2135
+ e[i].addEventListener(n, r2.listener, false);
2173
2136
  });
2174
2137
  });
2175
2138
  })) : (e.__eventListeners = [{
2176
2139
  el: ["trigger"],
2177
2140
  type: ["click"],
2178
2141
  listener: Tt.bind(this, e)
2179
- }], e.__eventListeners.forEach((r3) => {
2180
- r3.el.forEach((i2) => {
2181
- r3.type.forEach((n) => {
2182
- e[i2].addEventListener(n, r3.listener, false);
2142
+ }], e.__eventListeners.forEach((r2) => {
2143
+ r2.el.forEach((i) => {
2144
+ r2.type.forEach((n) => {
2145
+ e[i].addEventListener(n, r2.listener, false);
2183
2146
  });
2184
2147
  });
2185
2148
  }))), e;
2186
2149
  }
2187
2150
  var J;
2188
2151
  class qr extends Ct {
2189
- constructor(r3) {
2152
+ constructor(r2) {
2190
2153
  super();
2191
2154
  _e(this, J, void 0);
2192
- this.defaults = Dt, this.settings = { ...this.defaults, ...r3 }, this.trigger = null, Ke(this, J, St.bind(this)), this.settings.autoInit && this.init();
2155
+ this.defaults = Dt, this.settings = { ...this.defaults, ...r2 }, this.trigger = null, Ke(this, J, St.bind(this)), this.settings.autoInit && this.init();
2193
2156
  }
2194
- async init(r3) {
2195
- r3 && (this.settings = { ...this.settings, ...r3 });
2196
- const i2 = document.querySelectorAll(this.settings.selectorPopover);
2197
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(false), this;
2157
+ async init(r2) {
2158
+ r2 && (this.settings = { ...this.settings, ...r2 });
2159
+ const i = document.querySelectorAll(this.settings.selectorPopover);
2160
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(false), this;
2198
2161
  }
2199
2162
  async destroy() {
2200
2163
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(false), this;
2201
2164
  }
2202
- initEventListeners(r3 = true) {
2203
- r3 && this.collection.forEach((i2) => {
2204
- xt.call(this, i2);
2165
+ initEventListeners(r2 = true) {
2166
+ r2 && this.collection.forEach((i) => {
2167
+ xt.call(this, i);
2205
2168
  }), document.addEventListener("keydown", Ae(this, J), false);
2206
2169
  }
2207
- destroyEventListeners(r3 = true) {
2208
- r3 && this.collection.forEach((i2) => {
2209
- bt(i2);
2170
+ destroyEventListeners(r2 = true) {
2171
+ r2 && this.collection.forEach((i) => {
2172
+ bt(i);
2210
2173
  }), document.removeEventListener("keydown", Ae(this, J), false);
2211
2174
  }
2212
- register(r3) {
2213
- const i2 = Bt.call(this, r3);
2214
- return i2.error ? Promise.reject(i2.error) : Vr.call(this, i2.popover, i2.trigger);
2175
+ register(r2) {
2176
+ const i = Bt.call(this, r2);
2177
+ return i.error ? Promise.reject(i.error) : Vr.call(this, i.popover, i.trigger);
2215
2178
  }
2216
- deregister(r3) {
2217
- const i2 = this.get(st.call(this, r3));
2218
- return Ce.call(this, i2);
2179
+ deregister(r2) {
2180
+ const i = this.get(st.call(this, r2));
2181
+ return Ce.call(this, i);
2219
2182
  }
2220
- open(r3) {
2221
- return je.call(this, r3);
2183
+ open(r2) {
2184
+ return je.call(this, r2);
2222
2185
  }
2223
- close(r3) {
2224
- return ke.call(this, r3);
2186
+ close(r2) {
2187
+ return ke.call(this, r2);
2225
2188
  }
2226
2189
  }
2227
2190
  J = /* @__PURE__ */ new WeakMap();
2228
2191
  export {
2229
- r$1 as Checkbox,
2230
2192
  it$1 as Drawer,
2231
2193
  U as Modal,
2232
2194
  qr as Popover,