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.umd.cjs CHANGED
@@ -6,32 +6,32 @@
6
6
  if (!e.has(t))
7
7
  throw TypeError("Cannot " + n);
8
8
  };
9
- 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) => {
9
+ 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) => {
10
10
  if (e.has(t))
11
11
  throw TypeError("Cannot add the same private member more than once");
12
12
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
13
- }, a = (t, e, n, i2) => (b$2(t, e, "write to private field"), i2 ? i2.call(t, n) : e.set(t, n), n);
14
- var r$2;
13
+ }, a = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
14
+ var l$1;
15
15
  let $$2 = class $ {
16
16
  constructor(e, n) {
17
- f$2(this, r$2, void 0);
18
- this.value = e, a(this, r$2, n), this.mql = null;
17
+ h$2(this, l$1, void 0);
18
+ this.value = e, a(this, l$1, n), this.mql = null;
19
19
  }
20
20
  get handler() {
21
- return o$1(this, r$2);
21
+ return o$1(this, l$1);
22
22
  }
23
23
  // Unmount existing handler before setting a new one.
24
24
  set handler(e) {
25
- 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);
25
+ 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);
26
26
  }
27
27
  mount(e, n) {
28
- 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;
28
+ 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;
29
29
  }
30
30
  unmount() {
31
- 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;
31
+ 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;
32
32
  }
33
33
  };
34
- r$2 = /* @__PURE__ */ new WeakMap();
34
+ l$1 = /* @__PURE__ */ new WeakMap();
35
35
  let T$2 = class T {
36
36
  constructor() {
37
37
  this.collection = [];
@@ -40,11 +40,11 @@
40
40
  return await this.deregister(e), this.collection.push(e), this.collection;
41
41
  }
42
42
  async deregister(e) {
43
- const n = this.collection.findIndex((i2) => i2 === e);
43
+ const n = this.collection.findIndex((i) => i === e);
44
44
  if (n >= 0) {
45
- const i2 = this.collection[n];
46
- Object.getOwnPropertyNames(i2).forEach((l2) => {
47
- delete i2[l2];
45
+ const i = this.collection[n];
46
+ Object.getOwnPropertyNames(i).forEach((r2) => {
47
+ delete i[r2];
48
48
  }), this.collection.splice(n, 1);
49
49
  }
50
50
  return this.collection;
@@ -60,7 +60,7 @@
60
60
  return this.collection;
61
61
  }
62
62
  get(e, n = "id") {
63
- return this.collection.find((i2) => i2[n] === e);
63
+ return this.collection.find((i) => i[n] === e);
64
64
  }
65
65
  };
66
66
  const s = {
@@ -85,19 +85,19 @@
85
85
  `[contenteditable]${s.inert}${s.negTabIndex}`,
86
86
  `[tabindex]${s.inert}${s.negTabIndex}`
87
87
  ];
88
- var h$2, d$1, u$2;
88
+ var f$2, d$1, u$2;
89
89
  let x$1 = class x {
90
90
  constructor(e = null, n = "[data-focus]") {
91
- f$2(this, h$2, void 0);
92
- f$2(this, d$1, void 0);
93
- f$2(this, u$2, void 0);
94
- this.el = e, this.selectorFocus = n, a(this, d$1, p$2.bind(this)), a(this, u$2, g$2.bind(this));
91
+ h$2(this, f$2, void 0);
92
+ h$2(this, d$1, void 0);
93
+ h$2(this, u$2, void 0);
94
+ this.el = e, this.selectorFocus = n, a(this, d$1, g$2.bind(this)), a(this, u$2, p$2.bind(this));
95
95
  }
96
96
  get focusable() {
97
- return o$1(this, h$2);
97
+ return o$1(this, f$2);
98
98
  }
99
99
  set focusable(e) {
100
- 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)));
100
+ 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)));
101
101
  }
102
102
  get focusableFirst() {
103
103
  return this.focusable[0];
@@ -115,63 +115,63 @@
115
115
  (e.querySelector(n) || e).focus();
116
116
  }
117
117
  getFocusable(e = this.el) {
118
- const n = [], i2 = document.activeElement, l2 = e.scrollTop;
118
+ const n = [], i = document.activeElement, r2 = e.scrollTop;
119
119
  return e.querySelectorAll(v$2.join(",")).forEach((m2) => {
120
120
  m2.focus(), document.activeElement === m2 && n.push(m2);
121
- }), e.scrollTop = l2, i2.focus(), n;
121
+ }), e.scrollTop = r2, i.focus(), n;
122
122
  }
123
123
  };
124
- h$2 = /* @__PURE__ */ new WeakMap(), d$1 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap();
125
- function p$2(t) {
124
+ f$2 = /* @__PURE__ */ new WeakMap(), d$1 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap();
125
+ function g$2(t) {
126
126
  (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()));
127
127
  }
128
- function g$2(t) {
128
+ function p$2(t) {
129
129
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
130
130
  }
131
131
  function q$2(t, e) {
132
- const i2 = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
133
- return i2 ? JSON.parse(i2) : {};
132
+ const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
133
+ return i ? JSON.parse(i) : {};
134
134
  }
135
135
  function I$3() {
136
136
  return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
137
137
  }
138
138
  function C$2(t, e = true) {
139
- const n = localStorage.getItem(t), i2 = n ? JSON.parse(n) : {};
139
+ const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
140
140
  return {
141
- get(l2) {
142
- return l2 ? i2[l2] : i2;
141
+ get(r2) {
142
+ return r2 ? i[r2] : i;
143
143
  },
144
- set(l2, c2) {
145
- return c2 ? i2[l2] = c2 : delete i2[l2], e && localStorage.setItem(t, JSON.stringify(i2)), i2;
144
+ set(r2, c2) {
145
+ return c2 ? i[r2] = c2 : delete i[r2], e && localStorage.setItem(t, JSON.stringify(i)), i;
146
146
  }
147
147
  };
148
148
  }
149
149
  function O$2(t, e, n) {
150
- const i2 = e.nodeType === Node.COMMENT_NODE, l2 = e.nodeType === Node.ELEMENT_NODE;
151
- if (e = i2 || l2 ? e : document.querySelector(e), i2 && (n = "after"), !e)
150
+ const i = e.nodeType === Node.COMMENT_NODE, r2 = e.nodeType === Node.ELEMENT_NODE;
151
+ if (e = i || r2 ? e : document.querySelector(e), i && (n = "after"), !e)
152
152
  throw new Error(`Not a valid teleport reference: '${e}'`);
153
153
  if (typeof e[n] != "function")
154
154
  throw new Error(`Not a valid teleport method: '${n}'`);
155
155
  let c2 = null;
156
- return i2 || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i2 && e.remove(), c2;
156
+ return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
157
157
  }
158
158
  const S$3 = (t, e) => new Promise((n) => {
159
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
160
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend", i2);
159
+ e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(r2) {
160
+ r2.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), n(t), this.removeEventListener("transitionend", i));
161
161
  })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), n(t));
162
162
  }), F$3 = (t, e) => new Promise((n) => {
163
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
164
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend", i2);
163
+ e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(r2) {
164
+ r2.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), n(t), this.removeEventListener("transitionend", i));
165
165
  })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), n(t));
166
166
  });
167
167
  function y$2(t, e) {
168
- e && document.querySelectorAll(e).forEach((i2) => {
169
- t ? i2.style.overflow = "hidden" : i2.style.removeProperty("overflow");
168
+ e && document.querySelectorAll(e).forEach((i) => {
169
+ t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
170
170
  });
171
171
  }
172
172
  function L$2(t, e) {
173
- e && document.querySelectorAll(e).forEach((i2) => {
174
- t ? (i2.inert = true, i2.setAttribute("aria-hidden", true)) : (i2.inert = null, i2.removeAttribute("aria-hidden"));
173
+ e && document.querySelectorAll(e).forEach((i) => {
174
+ t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
175
175
  });
176
176
  }
177
177
  function k$3(t, e) {
@@ -190,43 +190,6 @@
190
190
  teleport: O$2,
191
191
  updateGlobalState: k$3
192
192
  }, Symbol.toStringTag, { value: "Module" }));
193
- const i = {
194
- autoInit: false,
195
- stateAttr: "aria-checked",
196
- stateValue: "mixed"
197
- };
198
- let r$1 = class r {
199
- constructor(t) {
200
- this.defaults = i, this.settings = { ...this.defaults, ...t }, this.__handlerClick = this.handlerClick.bind(this), this.settings.autoInit && this.init();
201
- }
202
- init(t = null) {
203
- t && (this.settings = { ...this.settings, ...t });
204
- const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = document.querySelectorAll(e);
205
- this.setIndeterminate(s2), document.addEventListener("click", this.__handlerClick, false);
206
- }
207
- destroy() {
208
- document.removeEventListener("click", this.__handlerClick, false);
209
- }
210
- handlerClick(t) {
211
- const e = `[${this.settings.stateAttr}="${this.settings.stateValue}"]`, s2 = t.target.closest(e);
212
- s2 && (this.removeAriaState(s2), this.setIndeterminate(s2));
213
- }
214
- setAriaState(t, e = this.settings.stateValue) {
215
- t = t.forEach ? t : [t], t.forEach((s2) => {
216
- s2.setAttribute(this.settings.stateAttr, e);
217
- });
218
- }
219
- removeAriaState(t) {
220
- t = t.forEach ? t : [t], t.forEach((e) => {
221
- e.removeAttribute(this.settings.stateAttr);
222
- });
223
- }
224
- setIndeterminate(t) {
225
- t = t.forEach ? t : [t], t.forEach((e) => {
226
- e.hasAttribute(this.settings.stateAttr) ? e.indeterminate = true : e.indeterminate = false;
227
- });
228
- }
229
- };
230
193
  var S$2 = (t, e, s2) => {
231
194
  if (!e.has(t))
232
195
  throw TypeError("Cannot " + s2);
@@ -235,31 +198,31 @@
235
198
  if (e.has(t))
236
199
  throw TypeError("Cannot add the same private member more than once");
237
200
  e instanceof WeakSet ? e.add(t) : e.set(t, s2);
238
- }, $$1 = (t, e, s2, i2) => (S$2(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
201
+ }, $$1 = (t, e, s2, i) => (S$2(t, e, "write to private field"), i ? i.call(t, s2) : e.set(t, s2), s2);
239
202
  var I$2 = (t, e, s2) => {
240
203
  if (!e.has(t))
241
204
  throw TypeError("Cannot " + s2);
242
- }, 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) => {
205
+ }, l = (t, e, s2) => (I$2(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), w$1 = (t, e, s2) => {
243
206
  if (e.has(t))
244
207
  throw TypeError("Cannot add the same private member more than once");
245
208
  e instanceof WeakSet ? e.add(t) : e.set(t, s2);
246
- }, 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;
209
+ }, 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;
247
210
  let M$2 = class M {
248
211
  constructor(e, s2) {
249
212
  w$1(this, c$1, void 0), this.value = e, h$1(this, c$1, s2), this.mql = null;
250
213
  }
251
214
  get handler() {
252
- return l$1(this, c$1);
215
+ return l(this, c$1);
253
216
  }
254
217
  // Unmount existing handler before setting a new one.
255
218
  set handler(e) {
256
- 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);
219
+ 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);
257
220
  }
258
221
  mount(e, s2) {
259
- 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;
222
+ 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;
260
223
  }
261
224
  unmount() {
262
- 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;
225
+ 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;
263
226
  }
264
227
  };
265
228
  c$1 = /* @__PURE__ */ new WeakMap();
@@ -271,11 +234,11 @@
271
234
  return await this.deregister(e), this.collection.push(e), this.collection;
272
235
  }
273
236
  async deregister(e) {
274
- const s2 = this.collection.findIndex((i2) => i2 === e);
237
+ const s2 = this.collection.findIndex((i) => i === e);
275
238
  if (s2 >= 0) {
276
- const i2 = this.collection[s2];
277
- Object.getOwnPropertyNames(i2).forEach((n) => {
278
- delete i2[n];
239
+ const i = this.collection[s2];
240
+ Object.getOwnPropertyNames(i).forEach((n) => {
241
+ delete i[n];
279
242
  }), this.collection.splice(s2, 1);
280
243
  }
281
244
  return this.collection;
@@ -291,30 +254,30 @@
291
254
  return this.collection;
292
255
  }
293
256
  get(e, s2 = "id") {
294
- return this.collection.find((i2) => i2[s2] === e);
257
+ return this.collection.find((i) => i[s2] === e);
295
258
  }
296
259
  };
297
- const r = {
260
+ const r$1 = {
298
261
  inert: ":not([inert]):not([inert] *)",
299
262
  negTabIndex: ':not([tabindex^="-"])',
300
263
  disabled: ":not(:disabled)"
301
264
  }, F$2 = [
302
- `a[href]${r.inert}${r.negTabIndex}`,
303
- `area[href]${r.inert}${r.negTabIndex}`,
304
- `input:not([type="hidden"]):not([type="radio"])${r.inert}${r.negTabIndex}${r.disabled}`,
305
- `input[type="radio"]${r.inert}${r.negTabIndex}${r.disabled}`,
306
- `select${r.inert}${r.negTabIndex}${r.disabled}`,
307
- `textarea${r.inert}${r.negTabIndex}${r.disabled}`,
308
- `button${r.inert}${r.negTabIndex}${r.disabled}`,
309
- `details${r.inert} > summary:first-of-type${r.negTabIndex}`,
265
+ `a[href]${r$1.inert}${r$1.negTabIndex}`,
266
+ `area[href]${r$1.inert}${r$1.negTabIndex}`,
267
+ `input:not([type="hidden"]):not([type="radio"])${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
268
+ `input[type="radio"]${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
269
+ `select${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
270
+ `textarea${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
271
+ `button${r$1.inert}${r$1.negTabIndex}${r$1.disabled}`,
272
+ `details${r$1.inert} > summary:first-of-type${r$1.negTabIndex}`,
310
273
  // Discard until Firefox supports `:has()`
311
274
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
312
275
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
313
- `iframe${r.inert}${r.negTabIndex}`,
314
- `audio[controls]${r.inert}${r.negTabIndex}`,
315
- `video[controls]${r.inert}${r.negTabIndex}`,
316
- `[contenteditable]${r.inert}${r.negTabIndex}`,
317
- `[tabindex]${r.inert}${r.negTabIndex}`
276
+ `iframe${r$1.inert}${r$1.negTabIndex}`,
277
+ `audio[controls]${r$1.inert}${r$1.negTabIndex}`,
278
+ `video[controls]${r$1.inert}${r$1.negTabIndex}`,
279
+ `[contenteditable]${r$1.inert}${r$1.negTabIndex}`,
280
+ `[tabindex]${r$1.inert}${r$1.negTabIndex}`
318
281
  ];
319
282
  var v$1, u$1, g$1;
320
283
  let B$2 = class B {
@@ -322,10 +285,10 @@
322
285
  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));
323
286
  }
324
287
  get focusable() {
325
- return l$1(this, v$1);
288
+ return l(this, v$1);
326
289
  }
327
290
  set focusable(e) {
328
- 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)));
291
+ 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)));
329
292
  }
330
293
  get focusableFirst() {
331
294
  return this.focusable[0];
@@ -337,16 +300,16 @@
337
300
  e && (this.el = e), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
338
301
  }
339
302
  unmount() {
340
- this.el = null, this.focusable = [], document.removeEventListener("keydown", l$1(this, u$1)), document.removeEventListener("keydown", l$1(this, g$1));
303
+ this.el = null, this.focusable = [], document.removeEventListener("keydown", l(this, u$1)), document.removeEventListener("keydown", l(this, g$1));
341
304
  }
342
305
  focus(e = this.el, s2 = this.selectorFocus) {
343
306
  (e.querySelector(s2) || e).focus();
344
307
  }
345
308
  getFocusable(e = this.el) {
346
- const s2 = [], i2 = document.activeElement, n = e.scrollTop;
309
+ const s2 = [], i = document.activeElement, n = e.scrollTop;
347
310
  return e.querySelectorAll(F$2.join(",")).forEach((a2) => {
348
311
  a2.focus(), document.activeElement === a2 && s2.push(a2);
349
- }), e.scrollTop = n, i2.focus(), s2;
312
+ }), e.scrollTop = n, i.focus(), s2;
350
313
  }
351
314
  };
352
315
  v$1 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap();
@@ -364,23 +327,23 @@
364
327
  return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
365
328
  }
366
329
  function V(t, e = true) {
367
- const s2 = localStorage.getItem(t), i2 = s2 ? JSON.parse(s2) : {};
330
+ const s2 = localStorage.getItem(t), i = s2 ? JSON.parse(s2) : {};
368
331
  return {
369
332
  get(n) {
370
- return n ? i2[n] : i2;
333
+ return n ? i[n] : i;
371
334
  },
372
335
  set(n, a2) {
373
- return a2 ? i2[n] = a2 : delete i2[n], e && localStorage.setItem(t, JSON.stringify(i2)), i2;
336
+ return a2 ? i[n] = a2 : delete i[n], e && localStorage.setItem(t, JSON.stringify(i)), i;
374
337
  }
375
338
  };
376
339
  }
377
340
  const J$2 = (t, e) => new Promise((s2) => {
378
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
379
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i2);
341
+ e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i(n) {
342
+ n.target == t && (t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i));
380
343
  })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), s2(t));
381
344
  }), z$1 = (t, e) => new Promise((s2) => {
382
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
383
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i2);
345
+ e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i(n) {
346
+ n.target == t && (t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i));
384
347
  })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), s2(t));
385
348
  });
386
349
  function G$1(t, e) {
@@ -433,15 +396,15 @@
433
396
  [data-${this.settings.dataClose}]
434
397
  `);
435
398
  if (e) {
436
- t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i2) => {
437
- const n = this.get(i2);
399
+ t.preventDefault(), e.matches(`[data-${this.settings.dataToggle}]`) && e.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i) => {
400
+ const n = this.get(i);
438
401
  n.trigger = e, n.toggle();
439
- }), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i2) => {
440
- const n = this.get(i2);
402
+ }), e.matches(`[data-${this.settings.dataOpen}]`) && e.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i) => {
403
+ const n = this.get(i);
441
404
  n.trigger = e, n.open();
442
- }), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i2) => {
443
- if (i2) {
444
- const n = this.get(i2);
405
+ }), e.matches(`[data-${this.settings.dataClose}]`) && e.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i) => {
406
+ if (i) {
407
+ const n = this.get(i);
445
408
  n.trigger = e, n.close();
446
409
  } else {
447
410
  const n = t.target.closest(this.settings.selectorDrawer);
@@ -461,11 +424,11 @@
461
424
  async function L$1(t, e = true) {
462
425
  if (!t)
463
426
  return this.collection;
464
- const s2 = this.collection.findIndex((i2) => i2.id === t.id);
427
+ const s2 = this.collection.findIndex((i) => i.id === t.id);
465
428
  if (s2 >= 0) {
466
- const i2 = this.collection[s2];
467
- e && i2.state === "opened" && await i2.close(false), this.store.set(i2.id), i2.unmountBreakpoint(), Object.getOwnPropertyNames(i2).forEach((n) => {
468
- delete i2[n];
429
+ const i = this.collection[s2];
430
+ e && i.state === "opened" && await i.close(false), this.store.set(i.id), i.unmountBreakpoint(), Object.getOwnPropertyNames(i).forEach((n) => {
431
+ delete i[n];
469
432
  }), this.collection.splice(s2, 1);
470
433
  }
471
434
  return this.collection;
@@ -486,8 +449,8 @@
486
449
  function Y(t) {
487
450
  const e = O$1.call(this, t);
488
451
  if (e) {
489
- const s2 = document.querySelector(`#${e}`), i2 = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
490
- 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.") };
452
+ const s2 = document.querySelector(`#${e}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
453
+ 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.") };
491
454
  } else
492
455
  return { error: new Error("Could not resolve the drawer ID.") };
493
456
  }
@@ -498,22 +461,22 @@
498
461
  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());
499
462
  }
500
463
  async function C$1(t, e, s2 = true) {
501
- const i2 = y$1.call(this, t), n = { ...this.settings, ...i2.settings };
502
- 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", {
464
+ const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
465
+ 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", {
503
466
  detail: this,
504
467
  bubbles: true
505
- })), i2;
468
+ })), i;
506
469
  }
507
470
  async function b$1(t, e, s2 = true) {
508
- const i2 = y$1.call(this, t), n = { ...this.settings, ...i2.settings };
509
- 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", {
471
+ const i = y$1.call(this, t), n = { ...this.settings, ...i.settings };
472
+ 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", {
510
473
  detail: this,
511
474
  bubbles: true
512
- }))), i2;
475
+ }))), i;
513
476
  }
514
477
  async function q$1(t, e, s2) {
515
- const i2 = y$1.call(this, t);
516
- return i2.state === "closed" ? C$1.call(this, i2, e, s2) : b$1.call(this, i2, e, s2);
478
+ const i = y$1.call(this, t);
479
+ return i.state === "closed" ? C$1.call(this, i, e, s2) : b$1.call(this, i, e, s2);
517
480
  }
518
481
  function Z$1(t) {
519
482
  switch (t.mode) {
@@ -539,7 +502,7 @@
539
502
  }
540
503
  async function et$1(t, e) {
541
504
  await L$1.call(this, t, false);
542
- const s2 = this, i2 = new M$2(), n = {
505
+ const s2 = this, i = new M$2(), n = {
543
506
  open(o2, d2) {
544
507
  return C$1.call(s2, this, o2, d2);
545
508
  },
@@ -554,10 +517,10 @@
554
517
  },
555
518
  mountBreakpoint() {
556
519
  const o2 = this.breakpoint, d2 = this.handleBreakpoint.bind(this);
557
- return i2.mount(o2, d2), this;
520
+ return i.mount(o2, d2), this;
558
521
  },
559
522
  unmountBreakpoint() {
560
- return i2.unmount(), this;
523
+ return i.unmount(), this;
561
524
  },
562
525
  handleBreakpoint(o2) {
563
526
  return this.mode = o2.matches ? "inline" : "modal", this;
@@ -604,8 +567,8 @@
604
567
  }
605
568
  async init(s2 = null) {
606
569
  s2 && (this.settings = { ...this.settings, ...s2 });
607
- const i2 = document.querySelectorAll(this.settings.selectorDrawer);
608
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(), this;
570
+ const i = document.querySelectorAll(this.settings.selectorDrawer);
571
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
609
572
  }
610
573
  async destroy() {
611
574
  return await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
@@ -617,60 +580,60 @@
617
580
  document.removeEventListener("click", p$1(this, f$1), false), document.removeEventListener("keydown", p$1(this, m$1), false);
618
581
  }
619
582
  register(s2) {
620
- const i2 = Y.call(this, s2);
621
- return i2.error ? Promise.reject(i2.error) : et$1.call(this, i2.drawer, i2.dialog);
583
+ const i = Y.call(this, s2);
584
+ return i.error ? Promise.reject(i.error) : et$1.call(this, i.drawer, i.dialog);
622
585
  }
623
586
  deregister(s2) {
624
- const i2 = this.get(O$1.call(this, s2));
625
- return L$1.call(this, i2);
587
+ const i = this.get(O$1.call(this, s2));
588
+ return L$1.call(this, i);
626
589
  }
627
- open(s2, i2, n) {
628
- return C$1.call(this, s2, i2, n);
590
+ open(s2, i, n) {
591
+ return C$1.call(this, s2, i, n);
629
592
  }
630
- close(s2, i2, n) {
631
- return b$1.call(this, s2, i2, n);
593
+ close(s2, i, n) {
594
+ return b$1.call(this, s2, i, n);
632
595
  }
633
- toggle(s2, i2, n) {
634
- return q$1.call(this, s2, i2, n);
596
+ toggle(s2, i, n) {
597
+ return q$1.call(this, s2, i, n);
635
598
  }
636
599
  };
637
600
  f$1 = /* @__PURE__ */ new WeakMap(), m$1 = /* @__PURE__ */ new WeakMap();
638
- var I$1 = (t, e, s2) => {
639
- if (!e.has(t))
601
+ var I$1 = (e, t, s2) => {
602
+ if (!t.has(e))
640
603
  throw TypeError("Cannot " + s2);
641
604
  };
642
- var f = (t, e, s2) => (I$1(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), v = (t, e, s2) => {
643
- if (e.has(t))
605
+ var f = (e, t, s2) => (I$1(e, t, "read from private field"), s2 ? s2.call(e) : t.get(e)), v = (e, t, s2) => {
606
+ if (t.has(e))
644
607
  throw TypeError("Cannot add the same private member more than once");
645
- e instanceof WeakSet ? e.add(t) : e.set(t, s2);
646
- }, b = (t, e, s2, i2) => (I$1(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
647
- var k$1 = (t, e, s2) => {
648
- if (!e.has(t))
608
+ t instanceof WeakSet ? t.add(e) : t.set(e, s2);
609
+ }, b = (e, t, s2, i) => (I$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
610
+ var k$1 = (e, t, s2) => {
611
+ if (!t.has(e))
649
612
  throw TypeError("Cannot " + s2);
650
- }, o = (t, e, s2) => (k$1(t, e, "read from private field"), s2 ? s2.call(t) : e.get(t)), y = (t, e, s2) => {
651
- if (e.has(t))
613
+ }, o = (e, t, s2) => (k$1(e, t, "read from private field"), s2 ? s2.call(e) : t.get(e)), y = (e, t, s2) => {
614
+ if (t.has(e))
652
615
  throw TypeError("Cannot add the same private member more than once");
653
- e instanceof WeakSet ? e.add(t) : e.set(t, s2);
654
- }, E = (t, e, s2, i2) => (k$1(t, e, "write to private field"), i2 ? i2.call(t, s2) : e.set(t, s2), s2);
616
+ t instanceof WeakSet ? t.add(e) : t.set(e, s2);
617
+ }, E = (e, t, s2, i) => (k$1(e, t, "write to private field"), i ? i.call(e, s2) : t.set(e, s2), s2);
655
618
  class A {
656
619
  constructor() {
657
620
  this.collection = [];
658
621
  }
659
- async register(e) {
660
- return await this.deregister(e), this.collection.push(e), this.collection;
622
+ async register(t) {
623
+ return await this.deregister(t), this.collection.push(t), this.collection;
661
624
  }
662
- async deregister(e) {
663
- const s2 = this.collection.findIndex((i2) => i2 === e);
625
+ async deregister(t) {
626
+ const s2 = this.collection.findIndex((i) => i === t);
664
627
  if (s2 >= 0) {
665
- const i2 = this.collection[s2];
666
- Object.getOwnPropertyNames(i2).forEach((n) => {
667
- delete i2[n];
628
+ const i = this.collection[s2];
629
+ Object.getOwnPropertyNames(i).forEach((n) => {
630
+ delete i[n];
668
631
  }), this.collection.splice(s2, 1);
669
632
  }
670
633
  return this.collection;
671
634
  }
672
- async registerCollection(e) {
673
- return await Promise.all(Array.from(e, (s2) => {
635
+ async registerCollection(t) {
636
+ return await Promise.all(Array.from(t, (s2) => {
674
637
  this.register(s2);
675
638
  })), this.collection;
676
639
  }
@@ -679,42 +642,42 @@
679
642
  await this.deregister(this.collection[0]);
680
643
  return this.collection;
681
644
  }
682
- get(e, s2 = "id") {
683
- return this.collection.find((i2) => i2[s2] === e);
645
+ get(t, s2 = "id") {
646
+ return this.collection.find((i) => i[s2] === t);
684
647
  }
685
648
  }
686
- const l = {
649
+ const r = {
687
650
  inert: ":not([inert]):not([inert] *)",
688
651
  negTabIndex: ':not([tabindex^="-"])',
689
652
  disabled: ":not(:disabled)"
690
653
  }, S$1 = [
691
- `a[href]${l.inert}${l.negTabIndex}`,
692
- `area[href]${l.inert}${l.negTabIndex}`,
693
- `input:not([type="hidden"]):not([type="radio"])${l.inert}${l.negTabIndex}${l.disabled}`,
694
- `input[type="radio"]${l.inert}${l.negTabIndex}${l.disabled}`,
695
- `select${l.inert}${l.negTabIndex}${l.disabled}`,
696
- `textarea${l.inert}${l.negTabIndex}${l.disabled}`,
697
- `button${l.inert}${l.negTabIndex}${l.disabled}`,
698
- `details${l.inert} > summary:first-of-type${l.negTabIndex}`,
654
+ `a[href]${r.inert}${r.negTabIndex}`,
655
+ `area[href]${r.inert}${r.negTabIndex}`,
656
+ `input:not([type="hidden"]):not([type="radio"])${r.inert}${r.negTabIndex}${r.disabled}`,
657
+ `input[type="radio"]${r.inert}${r.negTabIndex}${r.disabled}`,
658
+ `select${r.inert}${r.negTabIndex}${r.disabled}`,
659
+ `textarea${r.inert}${r.negTabIndex}${r.disabled}`,
660
+ `button${r.inert}${r.negTabIndex}${r.disabled}`,
661
+ `details${r.inert} > summary:first-of-type${r.negTabIndex}`,
699
662
  // Discard until Firefox supports `:has()`
700
663
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
701
664
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
702
- `iframe${l.inert}${l.negTabIndex}`,
703
- `audio[controls]${l.inert}${l.negTabIndex}`,
704
- `video[controls]${l.inert}${l.negTabIndex}`,
705
- `[contenteditable]${l.inert}${l.negTabIndex}`,
706
- `[tabindex]${l.inert}${l.negTabIndex}`
665
+ `iframe${r.inert}${r.negTabIndex}`,
666
+ `audio[controls]${r.inert}${r.negTabIndex}`,
667
+ `video[controls]${r.inert}${r.negTabIndex}`,
668
+ `[contenteditable]${r.inert}${r.negTabIndex}`,
669
+ `[tabindex]${r.inert}${r.negTabIndex}`
707
670
  ];
708
671
  var g, c, d;
709
672
  let M$1 = class M {
710
- constructor(e = null, s2 = "[data-focus]") {
711
- 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));
673
+ constructor(t = null, s2 = "[data-focus]") {
674
+ 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));
712
675
  }
713
676
  get focusable() {
714
677
  return o(this, g);
715
678
  }
716
- set focusable(e) {
717
- 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)));
679
+ set focusable(t) {
680
+ 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)));
718
681
  }
719
682
  get focusableFirst() {
720
683
  return this.focusable[0];
@@ -722,63 +685,63 @@
722
685
  get focusableLast() {
723
686
  return this.focusable[this.focusable.length - 1];
724
687
  }
725
- mount(e, s2) {
726
- e && (this.el = e), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
688
+ mount(t, s2) {
689
+ t && (this.el = t), s2 && (this.selectorFocus = s2), this.focusable = this.getFocusable(), this.focus();
727
690
  }
728
691
  unmount() {
729
692
  this.el = null, this.focusable = [], document.removeEventListener("keydown", o(this, c)), document.removeEventListener("keydown", o(this, d));
730
693
  }
731
- focus(e = this.el, s2 = this.selectorFocus) {
732
- (e.querySelector(s2) || e).focus();
694
+ focus(t = this.el, s2 = this.selectorFocus) {
695
+ (t.querySelector(s2) || t).focus();
733
696
  }
734
- getFocusable(e = this.el) {
735
- const s2 = [], i2 = document.activeElement, n = e.scrollTop;
736
- return e.querySelectorAll(S$1.join(",")).forEach((r2) => {
737
- r2.focus(), document.activeElement === r2 && s2.push(r2);
738
- }), e.scrollTop = n, i2.focus(), s2;
697
+ getFocusable(t = this.el) {
698
+ const s2 = [], i = document.activeElement, n = t.scrollTop;
699
+ return t.querySelectorAll(S$1.join(",")).forEach((l2) => {
700
+ l2.focus(), document.activeElement === l2 && s2.push(l2);
701
+ }), t.scrollTop = n, i.focus(), s2;
739
702
  }
740
703
  };
741
704
  g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
742
- function R(t) {
743
- (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()));
705
+ function R(e) {
706
+ (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()));
744
707
  }
745
- function N$1(t) {
746
- (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
708
+ function N$1(e) {
709
+ (e.key === "Tab" || e.keyCode === 9) && e.preventDefault();
747
710
  }
748
- function P(t, e) {
749
- const s2 = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
711
+ function P(e, t) {
712
+ const s2 = (e.getAttribute(`data-${t}`) || "").replace(/'/g, '"');
750
713
  return s2 ? JSON.parse(s2) : {};
751
714
  }
752
- function T$1(t, e, s2) {
753
- const i2 = e.nodeType === Node.COMMENT_NODE, n = e.nodeType === Node.ELEMENT_NODE;
754
- if (e = i2 || n ? e : document.querySelector(e), i2 && (s2 = "after"), !e)
755
- throw new Error(`Not a valid teleport reference: '${e}'`);
756
- if (typeof e[s2] != "function")
715
+ function T$1(e, t, s2) {
716
+ const i = t.nodeType === Node.COMMENT_NODE, n = t.nodeType === Node.ELEMENT_NODE;
717
+ if (t = i || n ? t : document.querySelector(t), i && (s2 = "after"), !t)
718
+ throw new Error(`Not a valid teleport reference: '${t}'`);
719
+ if (typeof t[s2] != "function")
757
720
  throw new Error(`Not a valid teleport method: '${s2}'`);
758
- let r2 = null;
759
- return i2 || (r2 = document.createComment("teleported #" + t.id), t.before(r2)), e[s2](t), i2 && e.remove(), r2;
760
- }
761
- const D$1 = (t, e) => new Promise((s2) => {
762
- e.transition ? (t.classList.remove(e.stateClosed), t.classList.add(e.stateOpening), t.addEventListener("transitionend", function i2() {
763
- t.classList.add(e.stateOpened), t.classList.remove(e.stateOpening), s2(t), this.removeEventListener("transitionend", i2);
764
- })) : (t.classList.add(e.stateOpened), t.classList.remove(e.stateClosed), s2(t));
765
- }), F$1 = (t, e) => new Promise((s2) => {
766
- e.transition ? (t.classList.add(e.stateClosing), t.classList.remove(e.stateOpened), t.addEventListener("transitionend", function i2() {
767
- t.classList.remove(e.stateClosing), t.classList.add(e.stateClosed), s2(t), this.removeEventListener("transitionend", i2);
768
- })) : (t.classList.add(e.stateClosed), t.classList.remove(e.stateOpened), s2(t));
721
+ let l2 = null;
722
+ return i || (l2 = document.createComment("teleported #" + e.id), e.before(l2)), t[s2](e), i && t.remove(), l2;
723
+ }
724
+ const D$1 = (e, t) => new Promise((s2) => {
725
+ t.transition ? (e.classList.remove(t.stateClosed), e.classList.add(t.stateOpening), e.addEventListener("transitionend", function i(n) {
726
+ n.target == e && (e.classList.add(t.stateOpened), e.classList.remove(t.stateOpening), s2(e), this.removeEventListener("transitionend", i));
727
+ })) : (e.classList.add(t.stateOpened), e.classList.remove(t.stateClosed), s2(e));
728
+ }), F$1 = (e, t) => new Promise((s2) => {
729
+ t.transition ? (e.classList.add(t.stateClosing), e.classList.remove(t.stateOpened), e.addEventListener("transitionend", function i(n) {
730
+ n.target == e && (e.classList.remove(t.stateClosing), e.classList.add(t.stateClosed), s2(e), this.removeEventListener("transitionend", i));
731
+ })) : (e.classList.add(t.stateClosed), e.classList.remove(t.stateOpened), s2(e));
769
732
  });
770
- function q(t, e) {
771
- e && document.querySelectorAll(e).forEach((s2) => {
772
- t ? s2.style.overflow = "hidden" : s2.style.removeProperty("overflow");
733
+ function q(e, t) {
734
+ t && document.querySelectorAll(t).forEach((s2) => {
735
+ e ? s2.style.overflow = "hidden" : s2.style.removeProperty("overflow");
773
736
  });
774
737
  }
775
- function z(t, e) {
776
- e && document.querySelectorAll(e).forEach((s2) => {
777
- t ? (s2.inert = true, s2.setAttribute("aria-hidden", true)) : (s2.inert = null, s2.removeAttribute("aria-hidden"));
738
+ function z(e, t) {
739
+ t && document.querySelectorAll(t).forEach((s2) => {
740
+ e ? (s2.inert = true, s2.setAttribute("aria-hidden", true)) : (s2.inert = null, s2.removeAttribute("aria-hidden"));
778
741
  });
779
742
  }
780
- function W(t, e) {
781
- z(!!t, e.selectorInert), q(!!t, e.selectorOverflow);
743
+ function W(e, t) {
744
+ z(!!e, t.selectorInert), q(!!e, t.selectorOverflow);
782
745
  }
783
746
  const _$1 = {
784
747
  autoInit: false,
@@ -807,155 +770,155 @@
807
770
  setTabindex: true,
808
771
  transition: true
809
772
  };
810
- function L(t) {
811
- const e = typeof t == "string" ? this.get(t) : this.get(t.id);
812
- if (e)
813
- return e;
814
- throw new Error(`Modal not found in collection with id of "${t.id || t}".`);
773
+ function L(e) {
774
+ const t = typeof e == "string" ? this.get(e) : this.get(e.id);
775
+ if (t)
776
+ return t;
777
+ throw new Error(`Modal not found in collection with id of "${e.id || e}".`);
815
778
  }
816
- function p(t) {
817
- 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;
779
+ function p(e) {
780
+ 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;
818
781
  }
819
- function G(t) {
820
- const e = p.call(this, t);
821
- if (e) {
822
- const s2 = document.querySelector(`#${e}`), i2 = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
823
- 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.") };
782
+ function G(e) {
783
+ const t = p.call(this, e);
784
+ if (t) {
785
+ const s2 = document.querySelector(`#${t}`), i = s2 ? s2.querySelector(this.settings.selectorDialog) : null;
786
+ 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.") };
824
787
  } else
825
788
  return { error: new Error("Could not resolve the modal ID.") };
826
789
  }
827
790
  function m() {
828
791
  this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
829
792
  }
830
- async function K$1(t) {
831
- let e = t.target.closest(
793
+ async function K$1(e) {
794
+ let t = e.target.closest(
832
795
  `[data-${this.settings.dataOpen}], [data-${this.settings.dataReplace}]`
833
796
  );
834
- if (e) {
835
- t.preventDefault(), t.target.closest(this.settings.selectorModal) || (this.trigger = e);
836
- const i2 = this.get(p.call(this, e));
837
- return e.matches(`[data-${this.settings.dataOpen}]`) ? i2.open() : i2.replace();
797
+ if (t) {
798
+ e.preventDefault(), e.target.closest(this.settings.selectorModal) || (this.trigger = t);
799
+ const i = this.get(p.call(this, t));
800
+ return t.matches(`[data-${this.settings.dataOpen}]`) ? i.open() : i.replace();
838
801
  }
839
- if (e = t.target.closest(`[data-${this.settings.dataClose}]`), e) {
840
- t.preventDefault();
841
- const s2 = e.getAttribute(`data-${this.settings.dataClose}`);
802
+ if (t = e.target.closest(`[data-${this.settings.dataClose}]`), t) {
803
+ e.preventDefault();
804
+ const s2 = t.getAttribute(`data-${this.settings.dataClose}`);
842
805
  return s2 === "*" ? this.closeAll() : this.close(s2);
843
806
  }
844
- if (t.target.matches(this.settings.selectorModal) && !t.target.querySelector(this.settings.selectorRequired))
845
- return this.close(p.call(this, t.target));
807
+ if (e.target.matches(this.settings.selectorModal) && !e.target.querySelector(this.settings.selectorRequired))
808
+ return this.close(p.call(this, e.target));
846
809
  }
847
- function J$1(t) {
848
- if (t.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
810
+ function J$1(e) {
811
+ if (e.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
849
812
  return this.close();
850
813
  }
851
- async function w(t, e = true) {
852
- if (!t)
814
+ async function w(e, t = true) {
815
+ if (!e)
853
816
  return this.collection;
854
- const s2 = this.collection.findIndex((i2) => i2.id === t.id);
817
+ const s2 = this.collection.findIndex((i) => i.id === e.id);
855
818
  if (s2 >= 0) {
856
- const i2 = this.collection[s2];
857
- e && i2.state === "opened" ? await i2.close(false) : this.stack.remove(i2), i2.getSetting("teleport") && i2.teleportReturn(), Object.getOwnPropertyNames(i2).forEach((n) => {
858
- delete i2[n];
819
+ const i = this.collection[s2];
820
+ t && i.state === "opened" ? await i.close(false) : this.stack.remove(i), i.getSetting("teleport") && i.teleportReturn(), Object.getOwnPropertyNames(i).forEach((n) => {
821
+ delete i[n];
859
822
  }), this.collection.splice(s2, 1);
860
823
  }
861
824
  return this.collection;
862
825
  }
863
- async function x(t, e, s2 = true) {
864
- const i2 = L.call(this, t), n = { ...this.settings, ...i2.settings };
865
- 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", {
826
+ async function x(e, t, s2 = true) {
827
+ const i = L.call(this, e), n = { ...this.settings, ...i.settings };
828
+ 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", {
866
829
  detail: this,
867
830
  bubbles: true
868
- })), i2;
869
- }
870
- async function C(t, e, s2 = true) {
871
- const i2 = t ? L.call(this, t) : this.active;
872
- if (i2 && i2.state === "opened") {
873
- i2.state = "closing";
874
- const n = { ...this.settings, ...i2.settings };
875
- 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", {
831
+ })), i;
832
+ }
833
+ async function C(e, t, s2 = true) {
834
+ const i = e ? L.call(this, e) : this.active;
835
+ if (i && i.state === "opened") {
836
+ i.state = "closing";
837
+ const n = { ...this.settings, ...i.settings };
838
+ 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", {
876
839
  detail: this,
877
840
  bubbles: true
878
841
  }));
879
842
  }
880
- return i2;
843
+ return i;
881
844
  }
882
- async function $(t, e) {
845
+ async function $(e, t) {
883
846
  const s2 = [];
884
- return await Promise.all(this.stack.value.map(async (i2) => {
885
- t && t === i2.id ? Promise.resolve() : s2.push(await C.call(this, i2, e, false)), i2.trigger = null;
847
+ return await Promise.all(this.stack.value.map(async (i) => {
848
+ e && e === i.id ? Promise.resolve() : s2.push(await C.call(this, i, t, false)), i.trigger = null;
886
849
  })), s2;
887
850
  }
888
- async function O(t, e, s2 = true) {
889
- const i2 = L.call(this, t);
890
- let n, r2;
891
- return i2.state === "opened" ? (n = i2, r2 = await $.call(this, i2.id, e)) : (n = x.call(this, i2, e, false), r2 = $.call(this, false, e), await Promise.all([n, r2])), s2 && m.call(this), { opened: n, closed: r2 };
851
+ async function O(e, t, s2 = true) {
852
+ const i = L.call(this, e);
853
+ let n, l2;
854
+ return i.state === "opened" ? (n = i, l2 = await $.call(this, i.id, t)) : (n = x.call(this, i, t, false), l2 = $.call(this, false, t), await Promise.all([n, l2])), s2 && m.call(this), { opened: n, closed: l2 };
892
855
  }
893
- async function B$1(t, e) {
894
- await w.call(this, t, false);
895
- const s2 = this, i2 = {
896
- open(r2, a2) {
897
- return x.call(s2, this, r2, a2);
856
+ async function B$1(e, t) {
857
+ await w.call(this, e, false);
858
+ const s2 = this, i = {
859
+ open(l2, a2) {
860
+ return x.call(s2, this, l2, a2);
898
861
  },
899
- close(r2, a2) {
900
- return C.call(s2, this, r2, a2);
862
+ close(l2, a2) {
863
+ return C.call(s2, this, l2, a2);
901
864
  },
902
- replace(r2, a2) {
903
- return O.call(s2, this, r2, a2);
865
+ replace(l2, a2) {
866
+ return O.call(s2, this, l2, a2);
904
867
  },
905
868
  deregister() {
906
869
  return w.call(s2, this);
907
870
  },
908
- teleport(r2 = this.getSetting("teleport"), a2 = this.getSetting("teleportMethod")) {
909
- return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = T$1(this.el, r2, a2), this.el);
871
+ teleport(l2 = this.getSetting("teleport"), a2 = this.getSetting("teleportMethod")) {
872
+ return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = T$1(this.el, l2, a2), this.el);
910
873
  },
911
874
  teleportReturn() {
912
875
  return this.returnRef ? (this.returnRef = T$1(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), false);
913
876
  },
914
- getSetting(r2) {
915
- return r2 in this.settings ? this.settings[r2] : s2.settings[r2];
877
+ getSetting(l2) {
878
+ return l2 in this.settings ? this.settings[l2] : s2.settings[l2];
916
879
  }
917
880
  }, n = {
918
- id: t.id,
881
+ id: e.id,
919
882
  state: "closed",
920
- el: t,
921
- dialog: e,
883
+ el: e,
884
+ dialog: t,
922
885
  returnRef: null,
923
- settings: P(t, this.settings.dataConfig),
924
- ...i2
886
+ settings: P(e, this.settings.dataConfig),
887
+ ...i
925
888
  };
926
889
  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;
927
890
  }
928
- function H$1(t) {
929
- const e = [];
891
+ function H$1(e) {
892
+ const t = [];
930
893
  return {
931
894
  get value() {
932
- return [...e];
895
+ return [...t];
933
896
  },
934
897
  get top() {
935
- return e[e.length - 1];
898
+ return t[t.length - 1];
936
899
  },
937
900
  updateIndex() {
938
- e.forEach((s2, i2) => {
901
+ t.forEach((s2, i) => {
939
902
  s2.el.style.zIndex = null;
940
903
  const n = getComputedStyle(s2.el)["z-index"];
941
- s2.el.style.zIndex = parseInt(n) + i2 + 1;
904
+ s2.el.style.zIndex = parseInt(n) + i + 1;
942
905
  });
943
906
  },
944
907
  updateGlobalState() {
945
- W(this.top, t), this.updateIndex();
908
+ W(this.top, e), this.updateIndex();
946
909
  },
947
910
  add(s2) {
948
911
  s2.el.style.zIndex = null;
949
- const i2 = getComputedStyle(s2.el)["z-index"];
950
- s2.el.style.zIndex = parseInt(i2) + e.length + 1, e.push(s2), this.updateGlobalState();
912
+ const i = getComputedStyle(s2.el)["z-index"];
913
+ s2.el.style.zIndex = parseInt(i) + t.length + 1, t.push(s2), this.updateGlobalState();
951
914
  },
952
915
  remove(s2) {
953
- const i2 = e.findIndex((n) => n.id === s2.id);
954
- i2 >= 0 && (s2.el.style.zIndex = null, e.splice(i2, 1), this.updateGlobalState());
916
+ const i = t.findIndex((n) => n.id === s2.id);
917
+ i >= 0 && (s2.el.style.zIndex = null, t.splice(i, 1), this.updateGlobalState());
955
918
  },
956
919
  moveToTop(s2) {
957
- const i2 = e.findIndex((n) => n.id === s2.id);
958
- i2 >= 0 && (e.splice(i2, 1), this.add(s2));
920
+ const i = t.findIndex((n) => n.id === s2.id);
921
+ i >= 0 && (t.splice(i, 1), this.add(s2));
959
922
  }
960
923
  };
961
924
  }
@@ -972,8 +935,8 @@
972
935
  }
973
936
  async init(s2) {
974
937
  s2 && (this.settings = { ...this.settings, ...s2 });
975
- const i2 = document.querySelectorAll(this.settings.selectorModal);
976
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(), this;
938
+ const i = document.querySelectorAll(this.settings.selectorModal);
939
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(), this;
977
940
  }
978
941
  async destroy() {
979
942
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
@@ -985,25 +948,25 @@
985
948
  document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
986
949
  }
987
950
  register(s2) {
988
- const i2 = G.call(this, s2);
989
- return i2.error ? Promise.reject(i2.error) : B$1.call(this, i2.modal, i2.dialog);
951
+ const i = G.call(this, s2);
952
+ return i.error ? Promise.reject(i.error) : B$1.call(this, i.modal, i.dialog);
990
953
  }
991
954
  deregister(s2) {
992
- const i2 = this.get(p.call(this, s2));
993
- return w.call(this, i2);
955
+ const i = this.get(p.call(this, s2));
956
+ return w.call(this, i);
994
957
  }
995
- open(s2, i2, n) {
996
- return x.call(this, s2, i2, n);
958
+ open(s2, i, n) {
959
+ return x.call(this, s2, i, n);
997
960
  }
998
- close(s2, i2, n) {
999
- return C.call(this, s2, i2, n);
961
+ close(s2, i, n) {
962
+ return C.call(this, s2, i, n);
1000
963
  }
1001
- replace(s2, i2, n) {
1002
- return O.call(this, s2, i2, n);
964
+ replace(s2, i, n) {
965
+ return O.call(this, s2, i, n);
1003
966
  }
1004
- async closeAll(s2 = false, i2, n = true) {
1005
- const r2 = await $.call(this, s2, i2);
1006
- return n && m.call(this), r2;
967
+ async closeAll(s2 = false, i, n = true) {
968
+ const l2 = await $.call(this, s2, i);
969
+ return n && m.call(this), l2;
1007
970
  }
1008
971
  }
1009
972
  u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
@@ -1015,7 +978,7 @@
1015
978
  if (t.has(e))
1016
979
  throw TypeError("Cannot add the same private member more than once");
1017
980
  t instanceof WeakSet ? t.add(e) : t.set(e, r2);
1018
- }, Ke = (e, t, r2, i2) => (Ue(e, t, "write to private field"), i2 ? i2.call(e, r2) : t.set(e, r2), r2);
981
+ }, Ke = (e, t, r2, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r2) : t.set(e, r2), r2);
1019
982
  class Ct {
1020
983
  constructor() {
1021
984
  this.collection = [];
@@ -1024,11 +987,11 @@
1024
987
  return await this.deregister(t), this.collection.push(t), this.collection;
1025
988
  }
1026
989
  async deregister(t) {
1027
- const r2 = this.collection.findIndex((i2) => i2 === t);
990
+ const r2 = this.collection.findIndex((i) => i === t);
1028
991
  if (r2 >= 0) {
1029
- const i2 = this.collection[r2];
1030
- Object.getOwnPropertyNames(i2).forEach((n) => {
1031
- delete i2[n];
992
+ const i = this.collection[r2];
993
+ Object.getOwnPropertyNames(i).forEach((n) => {
994
+ delete i[n];
1032
995
  }), this.collection.splice(r2, 1);
1033
996
  }
1034
997
  return this.collection;
@@ -1044,7 +1007,7 @@
1044
1007
  return this.collection;
1045
1008
  }
1046
1009
  get(t, r2 = "id") {
1047
- return this.collection.find((i2) => i2[r2] === t);
1010
+ return this.collection.find((i) => i[r2] === t);
1048
1011
  }
1049
1012
  }
1050
1013
  function kt() {
@@ -1063,7 +1026,7 @@
1063
1026
  placement: "bottom"
1064
1027
  };
1065
1028
  function ot(e, t) {
1066
- const r2 = getComputedStyle(e), i2 = {
1029
+ const r2 = getComputedStyle(e), i = {
1067
1030
  placement: t.placement,
1068
1031
  event: t.eventType,
1069
1032
  offset: 0,
@@ -1072,17 +1035,17 @@
1072
1035
  "arrow-element": t.selectorArrow,
1073
1036
  "arrow-padding": 0
1074
1037
  };
1075
- for (const n in i2) {
1038
+ for (const n in i) {
1076
1039
  const o2 = kt(), l2 = r2.getPropertyValue(`--${o2}popover-${n}`).trim();
1077
- l2 && (i2[n] = l2);
1040
+ l2 && (i[n] = l2);
1078
1041
  }
1079
- return i2;
1042
+ return i;
1080
1043
  }
1081
1044
  function Pe(e) {
1082
1045
  let t;
1083
1046
  const r2 = typeof e == "string" ? e.trim().split(" ") : [e];
1084
- switch (r2.forEach(function(i2, n) {
1085
- r2[n] = parseInt(i2, 10);
1047
+ switch (r2.forEach(function(i, n) {
1048
+ r2[n] = parseInt(i, 10);
1086
1049
  }), r2.length) {
1087
1050
  case 1:
1088
1051
  t = r2[0];
@@ -1153,8 +1116,8 @@
1153
1116
  function Bt(e) {
1154
1117
  const t = st.call(this, e);
1155
1118
  if (t) {
1156
- const r2 = document.querySelector(`#${t}`), i2 = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1157
- return !i2 && !r2 ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i2 ? r2 ? { popover: r2, trigger: i2 } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
1119
+ const r2 = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1120
+ 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.") };
1158
1121
  } else
1159
1122
  return { error: new Error("Could not resolve the popover ID.") };
1160
1123
  }
@@ -1197,8 +1160,8 @@
1197
1160
  }
1198
1161
  function ft(e) {
1199
1162
  const t = this;
1200
- document.addEventListener("click", function r2(i2) {
1201
- i2.target.closest(
1163
+ document.addEventListener("click", function r2(i) {
1164
+ i.target.closest(
1202
1165
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
1203
1166
  ) ? 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));
1204
1167
  });
@@ -1237,8 +1200,8 @@
1237
1200
  function Ut(e) {
1238
1201
  var t = e.state;
1239
1202
  Object.keys(t.elements).forEach(function(r2) {
1240
- var i2 = t.styles[r2] || {}, n = t.attributes[r2] || {}, o2 = t.elements[r2];
1241
- !T(o2) || !N(o2) || (Object.assign(o2.style, i2), Object.keys(n).forEach(function(l2) {
1203
+ var i = t.styles[r2] || {}, n = t.attributes[r2] || {}, o2 = t.elements[r2];
1204
+ !T(o2) || !N(o2) || (Object.assign(o2.style, i), Object.keys(n).forEach(function(l2) {
1242
1205
  var s2 = n[l2];
1243
1206
  s2 === false ? o2.removeAttribute(l2) : o2.setAttribute(l2, s2 === true ? "" : s2);
1244
1207
  }));
@@ -1258,8 +1221,8 @@
1258
1221
  reference: {}
1259
1222
  };
1260
1223
  return Object.assign(t.elements.popper.style, r2.popper), t.styles = r2, t.elements.arrow && Object.assign(t.elements.arrow.style, r2.arrow), function() {
1261
- Object.keys(t.elements).forEach(function(i2) {
1262
- var n = t.elements[i2], o2 = t.attributes[i2] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i2) ? t.styles[i2] : r2[i2]), s2 = l2.reduce(function(a2, f2) {
1224
+ Object.keys(t.elements).forEach(function(i) {
1225
+ 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) {
1263
1226
  return a2[f2] = "", a2;
1264
1227
  }, {});
1265
1228
  !T(n) || !N(n) || (Object.assign(n.style, s2), Object.keys(o2).forEach(function(a2) {
@@ -1291,9 +1254,9 @@
1291
1254
  }
1292
1255
  function ee(e, t, r2) {
1293
1256
  t === void 0 && (t = false), r2 === void 0 && (r2 = false);
1294
- var i2 = e.getBoundingClientRect(), n = 1, o2 = 1;
1295
- t && T(e) && (n = e.offsetWidth > 0 && Z(i2.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i2.height) / e.offsetHeight || 1);
1296
- var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !dt() && r2, 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;
1257
+ var i = e.getBoundingClientRect(), n = 1, o2 = 1;
1258
+ t && T(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
1259
+ var l2 = K(e) ? B(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;
1297
1260
  return {
1298
1261
  width: h2,
1299
1262
  height: y2,
@@ -1306,12 +1269,12 @@
1306
1269
  };
1307
1270
  }
1308
1271
  function Be(e) {
1309
- var t = ee(e), r2 = e.offsetWidth, i2 = e.offsetHeight;
1310
- return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height - i2) <= 1 && (i2 = t.height), {
1272
+ var t = ee(e), r2 = e.offsetWidth, i = e.offsetHeight;
1273
+ return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
1311
1274
  x: e.offsetLeft,
1312
1275
  y: e.offsetTop,
1313
1276
  width: r2,
1314
- height: i2
1277
+ height: i
1315
1278
  };
1316
1279
  }
1317
1280
  function vt(e, t) {
@@ -1319,12 +1282,12 @@
1319
1282
  if (e.contains(t))
1320
1283
  return true;
1321
1284
  if (r2 && Re(r2)) {
1322
- var i2 = t;
1285
+ var i = t;
1323
1286
  do {
1324
- if (i2 && e.isSameNode(i2))
1287
+ if (i && e.isSameNode(i))
1325
1288
  return true;
1326
- i2 = i2.parentNode || i2.host;
1327
- } while (i2);
1289
+ i = i.parentNode || i.host;
1290
+ } while (i);
1328
1291
  }
1329
1292
  return false;
1330
1293
  }
@@ -1359,8 +1322,8 @@
1359
1322
  function Jt(e) {
1360
1323
  var t = /firefox/i.test(Le()), r2 = /Trident/i.test(Le());
1361
1324
  if (r2 && T(e)) {
1362
- var i2 = I(e);
1363
- if (i2.position === "fixed")
1325
+ var i = I(e);
1326
+ if (i.position === "fixed")
1364
1327
  return null;
1365
1328
  }
1366
1329
  var n = we(e);
@@ -1384,8 +1347,8 @@
1384
1347
  return _(e, ye(t, r2));
1385
1348
  }
1386
1349
  function Qt(e, t, r2) {
1387
- var i2 = oe(e, t, r2);
1388
- return i2 > r2 ? r2 : i2;
1350
+ var i = oe(e, t, r2);
1351
+ return i > r2 ? r2 : i;
1389
1352
  }
1390
1353
  function ht() {
1391
1354
  return {
@@ -1399,8 +1362,8 @@
1399
1362
  return Object.assign({}, ht(), e);
1400
1363
  }
1401
1364
  function mt(e, t) {
1402
- return t.reduce(function(r2, i2) {
1403
- return r2[i2] = e, r2;
1365
+ return t.reduce(function(r2, i) {
1366
+ return r2[i] = e, r2;
1404
1367
  }, {});
1405
1368
  }
1406
1369
  var Zt = function(t, r2) {
@@ -1409,14 +1372,14 @@
1409
1372
  })) : t, gt(typeof t != "number" ? t : mt(t, le));
1410
1373
  };
1411
1374
  function er(e) {
1412
- var t, r2 = e.state, i2 = e.name, n = e.options, o2 = r2.elements.arrow, l2 = r2.modifiersData.popperOffsets, s2 = H(r2.placement), a2 = Te(s2), f2 = [D, M].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
1375
+ 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, M].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
1413
1376
  if (!(!o2 || !l2)) {
1414
1377
  var h2 = Zt(n.padding, r2), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : M, 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, x2 = oe(p2, m2, g2), L2 = a2;
1415
- r2.modifiersData[i2] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
1378
+ r2.modifiersData[i] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
1416
1379
  }
1417
1380
  }
1418
1381
  function tr(e) {
1419
- var t = e.state, r2 = e.options, i2 = r2.element, n = i2 === void 0 ? "[data-popper-arrow]" : i2;
1382
+ var t = e.state, r2 = e.options, i = r2.element, n = i === void 0 ? "[data-popper-arrow]" : i;
1420
1383
  n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
1421
1384
  }
1422
1385
  const rr = {
@@ -1438,14 +1401,14 @@
1438
1401
  left: "auto"
1439
1402
  };
1440
1403
  function nr(e, t) {
1441
- var r2 = e.x, i2 = e.y, n = t.devicePixelRatio || 1;
1404
+ var r2 = e.x, i = e.y, n = t.devicePixelRatio || 1;
1442
1405
  return {
1443
1406
  x: Z(r2 * n) / n || 0,
1444
- y: Z(i2 * n) / n || 0
1407
+ y: Z(i * n) / n || 0
1445
1408
  };
1446
1409
  }
1447
1410
  function Qe(e) {
1448
- var t, r2 = 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({
1411
+ 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({
1449
1412
  x: u2,
1450
1413
  y: v2
1451
1414
  }) : {
@@ -1462,7 +1425,7 @@
1462
1425
  // $FlowFixMe[prop-missing]
1463
1426
  m2[x2]
1464
1427
  );
1465
- v2 -= P2 - i2.height, v2 *= a2 ? 1 : -1;
1428
+ v2 -= P2 - i.height, v2 *= a2 ? 1 : -1;
1466
1429
  }
1467
1430
  if (n === D || (n === k || n === S) && o2 === se) {
1468
1431
  E2 = M;
@@ -1470,7 +1433,7 @@
1470
1433
  // $FlowFixMe[prop-missing]
1471
1434
  m2[L2]
1472
1435
  );
1473
- u2 -= A2 - i2.width, u2 *= a2 ? 1 : -1;
1436
+ u2 -= A2 - i.width, u2 *= a2 ? 1 : -1;
1474
1437
  }
1475
1438
  }
1476
1439
  var $2 = Object.assign({
@@ -1489,7 +1452,7 @@
1489
1452
  return Object.assign({}, $2, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
1490
1453
  }
1491
1454
  function or(e) {
1492
- var t = e.state, r2 = e.options, i2 = r2.gpuAcceleration, n = i2 === void 0 ? true : i2, o2 = r2.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r2.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
1455
+ 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 = {
1493
1456
  placement: H(t.placement),
1494
1457
  variation: te(t.placement),
1495
1458
  popper: t.elements.popper,
@@ -1522,7 +1485,7 @@
1522
1485
  passive: true
1523
1486
  };
1524
1487
  function sr(e) {
1525
- var t = e.state, r2 = e.instance, i2 = e.options, n = i2.scroll, o2 = n === void 0 ? true : n, l2 = i2.resize, s2 = l2 === void 0 ? true : l2, a2 = B(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1488
+ 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 = B(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1526
1489
  return o2 && f2.forEach(function(c2) {
1527
1490
  c2.addEventListener("scroll", r2.update, ge);
1528
1491
  }), s2 && a2.addEventListener("resize", r2.update, ge), function() {
@@ -1561,17 +1524,17 @@
1561
1524
  });
1562
1525
  }
1563
1526
  function Se(e) {
1564
- var t = B(e), r2 = t.pageXOffset, i2 = t.pageYOffset;
1527
+ var t = B(e), r2 = t.pageXOffset, i = t.pageYOffset;
1565
1528
  return {
1566
1529
  scrollLeft: r2,
1567
- scrollTop: i2
1530
+ scrollTop: i
1568
1531
  };
1569
1532
  }
1570
1533
  function Me(e) {
1571
1534
  return ee(F(e)).left + Se(e).scrollLeft;
1572
1535
  }
1573
1536
  function ur(e, t) {
1574
- var r2 = B(e), i2 = F(e), n = r2.visualViewport, o2 = i2.clientWidth, l2 = i2.clientHeight, s2 = 0, a2 = 0;
1537
+ var r2 = B(e), i = F(e), n = r2.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
1575
1538
  if (n) {
1576
1539
  o2 = n.width, l2 = n.height;
1577
1540
  var f2 = dt();
@@ -1585,7 +1548,7 @@
1585
1548
  };
1586
1549
  }
1587
1550
  function pr(e) {
1588
- var t, r2 = F(e), i2 = 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 = -i2.scrollLeft + Me(e), a2 = -i2.scrollTop;
1551
+ 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;
1589
1552
  return I(n || r2).direction === "rtl" && (s2 += _(r2.clientWidth, n ? n.clientWidth : 0) - o2), {
1590
1553
  width: o2,
1591
1554
  height: l2,
@@ -1594,8 +1557,8 @@
1594
1557
  };
1595
1558
  }
1596
1559
  function We(e) {
1597
- var t = I(e), r2 = t.overflow, i2 = t.overflowX, n = t.overflowY;
1598
- return /auto|scroll|overlay|hidden/.test(r2 + n + i2);
1560
+ var t = I(e), r2 = t.overflow, i = t.overflowX, n = t.overflowY;
1561
+ return /auto|scroll|overlay|hidden/.test(r2 + n + i);
1599
1562
  }
1600
1563
  function yt(e) {
1601
1564
  return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && We(e) ? e : yt(we(e));
@@ -1603,7 +1566,7 @@
1603
1566
  function ae(e, t) {
1604
1567
  var r2;
1605
1568
  t === void 0 && (t = []);
1606
- var i2 = yt(e), n = i2 === ((r2 = e.ownerDocument) == null ? void 0 : r2.body), o2 = B(i2), l2 = n ? [o2].concat(o2.visualViewport || [], We(i2) ? i2 : []) : i2, s2 = t.concat(l2);
1569
+ var i = yt(e), n = i === ((r2 = e.ownerDocument) == null ? void 0 : r2.body), o2 = B(i), l2 = n ? [o2].concat(o2.visualViewport || [], We(i) ? i : []) : i, s2 = t.concat(l2);
1607
1570
  return n ? s2 : (
1608
1571
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1609
1572
  s2.concat(ae(we(l2)))
@@ -1625,20 +1588,20 @@
1625
1588
  return t === ut ? $e(ur(e, r2)) : K(t) ? dr(t, r2) : $e(pr(F(e)));
1626
1589
  }
1627
1590
  function vr(e) {
1628
- var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i2 = r2 && T(e) ? fe(e) : e;
1629
- return K(i2) ? t.filter(function(n) {
1630
- return K(n) && vt(n, i2) && N(n) !== "body";
1591
+ var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i = r2 && T(e) ? fe(e) : e;
1592
+ return K(i) ? t.filter(function(n) {
1593
+ return K(n) && vt(n, i) && N(n) !== "body";
1631
1594
  }) : [];
1632
1595
  }
1633
- function hr(e, t, r2, i2) {
1596
+ function hr(e, t, r2, i) {
1634
1597
  var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r2]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1635
- var c2 = et(e, f2, i2);
1598
+ var c2 = et(e, f2, i);
1636
1599
  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;
1637
- }, et(e, l2, i2));
1600
+ }, et(e, l2, i));
1638
1601
  return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
1639
1602
  }
1640
1603
  function wt(e) {
1641
- var t = e.reference, r2 = e.element, i2 = e.placement, n = i2 ? H(i2) : null, o2 = i2 ? te(i2) : null, l2 = t.x + t.width / 2 - r2.width / 2, s2 = t.y + t.height / 2 - r2.height / 2, a2;
1604
+ 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;
1642
1605
  switch (n) {
1643
1606
  case k:
1644
1607
  a2 = {
@@ -1686,7 +1649,7 @@
1686
1649
  }
1687
1650
  function ce(e, t) {
1688
1651
  t === void 0 && (t = {});
1689
- var r2 = t, i2 = r2.placement, n = i2 === void 0 ? e.placement : i2, 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), x2 = wt({
1652
+ 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), x2 = wt({
1690
1653
  reference: m2,
1691
1654
  element: E2,
1692
1655
  strategy: "absolute",
@@ -1708,7 +1671,7 @@
1708
1671
  }
1709
1672
  function gr(e, t) {
1710
1673
  t === void 0 && (t = {});
1711
- var r2 = t, i2 = 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(i2), h2 = c2 ? s2 ? Ge : Ge.filter(function(b2) {
1674
+ 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) {
1712
1675
  return te(b2) === c2;
1713
1676
  }) : le, y2 = h2.filter(function(b2) {
1714
1677
  return f2.indexOf(b2) >= 0;
@@ -1733,8 +1696,8 @@
1733
1696
  return [Ze(e), t, Ze(t)];
1734
1697
  }
1735
1698
  function yr(e) {
1736
- var t = e.state, r2 = e.options, i2 = e.name;
1737
- if (!t.modifiersData[i2]._skip) {
1699
+ var t = e.state, r2 = e.options, i = e.name;
1700
+ if (!t.modifiersData[i]._skip) {
1738
1701
  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) {
1739
1702
  return G2.concat(H(V2) === De ? gr(t, {
1740
1703
  placement: V2,
@@ -1778,7 +1741,7 @@
1778
1741
  if (de === "break")
1779
1742
  break;
1780
1743
  }
1781
- t.placement !== P2 && (t.modifiersData[i2]._skip = true, t.placement = P2, t.reset = true);
1744
+ t.placement !== P2 && (t.modifiersData[i]._skip = true, t.placement = P2, t.reset = true);
1782
1745
  }
1783
1746
  }
1784
1747
  const wr = {
@@ -1808,11 +1771,11 @@
1808
1771
  });
1809
1772
  }
1810
1773
  function br(e) {
1811
- var t = e.state, r2 = e.name, i2 = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1774
+ var t = e.state, r2 = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1812
1775
  elementContext: "reference"
1813
1776
  }), s2 = ce(t, {
1814
1777
  altBoundary: true
1815
- }), a2 = tt(l2, i2), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1778
+ }), a2 = tt(l2, i), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1816
1779
  t.modifiersData[r2] = {
1817
1780
  referenceClippingOffsets: a2,
1818
1781
  popperEscapeOffsets: f2,
@@ -1831,10 +1794,10 @@
1831
1794
  fn: br
1832
1795
  };
1833
1796
  function Or(e, t, r2) {
1834
- var i2 = H(e), n = [D, k].indexOf(i2) >= 0 ? -1 : 1, o2 = typeof r2 == "function" ? r2(Object.assign({}, t, {
1797
+ var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r2 == "function" ? r2(Object.assign({}, t, {
1835
1798
  placement: e
1836
1799
  })) : r2, l2 = o2[0], s2 = o2[1];
1837
- return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M].indexOf(i2) >= 0 ? {
1800
+ return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M].indexOf(i) >= 0 ? {
1838
1801
  x: s2,
1839
1802
  y: l2
1840
1803
  } : {
@@ -1843,10 +1806,10 @@
1843
1806
  };
1844
1807
  }
1845
1808
  function Er(e) {
1846
- var t = e.state, r2 = e.options, i2 = e.name, n = r2.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
1809
+ 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) {
1847
1810
  return c2[h2] = Or(h2, t.rects, o2), c2;
1848
1811
  }, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
1849
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i2] = l2;
1812
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
1850
1813
  }
1851
1814
  const Ar = {
1852
1815
  name: "offset",
@@ -1875,7 +1838,7 @@
1875
1838
  return e === "x" ? "y" : "x";
1876
1839
  }
1877
1840
  function Cr(e) {
1878
- var t = e.state, r2 = e.options, i2 = 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, {
1841
+ 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, {
1879
1842
  boundary: a2,
1880
1843
  rootBoundary: f2,
1881
1844
  padding: h2,
@@ -1904,7 +1867,7 @@
1904
1867
  var Ie, Lt = p2 === "x" ? k : D, $t = p2 === "x" ? S : M, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ve = U2 + d2[Lt], Fe = U2 - d2[$t], Ee = [k, D].indexOf(w2) !== -1, qe = (Ie = $2 == null ? void 0 : $2[g2]) != null ? Ie : 0, Xe = Ee ? Ve : U2 - x2[he] - L2[he] - qe + A2.altAxis, Ye = Ee ? U2 + x2[he] + L2[he] - qe - A2.altAxis : Fe, ze = u2 && Ee ? Qt(Xe, U2, Ye) : oe(u2 ? Xe : Ve, U2, u2 ? Ye : Fe);
1905
1868
  m2[g2] = ze, W2[g2] = ze - U2;
1906
1869
  }
1907
- t.modifiersData[i2] = W2;
1870
+ t.modifiersData[i] = W2;
1908
1871
  }
1909
1872
  }
1910
1873
  const kr = {
@@ -1924,19 +1887,19 @@
1924
1887
  return e === B(e) || !T(e) ? Se(e) : Dr(e);
1925
1888
  }
1926
1889
  function Br(e) {
1927
- var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1, i2 = Z(t.height) / e.offsetHeight || 1;
1928
- return r2 !== 1 || i2 !== 1;
1890
+ var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
1891
+ return r2 !== 1 || i !== 1;
1929
1892
  }
1930
1893
  function Tr(e, t, r2) {
1931
1894
  r2 === void 0 && (r2 = false);
1932
- var i2 = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r2), s2 = {
1895
+ var i = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r2), s2 = {
1933
1896
  scrollLeft: 0,
1934
1897
  scrollTop: 0
1935
1898
  }, a2 = {
1936
1899
  x: 0,
1937
1900
  y: 0
1938
1901
  };
1939
- return (i2 || !i2 && !r2) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1902
+ return (i || !i && !r2) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1940
1903
  We(o2)) && (s2 = Rr(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
1941
1904
  x: l2.left + s2.scrollLeft - a2.x,
1942
1905
  y: l2.top + s2.scrollTop - a2.y,
@@ -1945,7 +1908,7 @@
1945
1908
  };
1946
1909
  }
1947
1910
  function Sr(e) {
1948
- var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(), i2 = [];
1911
+ var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(), i = [];
1949
1912
  e.forEach(function(o2) {
1950
1913
  t.set(o2.name, o2);
1951
1914
  });
@@ -1957,17 +1920,17 @@
1957
1920
  var a2 = t.get(s2);
1958
1921
  a2 && n(a2);
1959
1922
  }
1960
- }), i2.push(o2);
1923
+ }), i.push(o2);
1961
1924
  }
1962
1925
  return e.forEach(function(o2) {
1963
1926
  r2.has(o2.name) || n(o2);
1964
- }), i2;
1927
+ }), i;
1965
1928
  }
1966
1929
  function Mr(e) {
1967
1930
  var t = Sr(e);
1968
- return zt.reduce(function(r2, i2) {
1931
+ return zt.reduce(function(r2, i) {
1969
1932
  return r2.concat(t.filter(function(n) {
1970
- return n.phase === i2;
1933
+ return n.phase === i;
1971
1934
  }));
1972
1935
  }, []);
1973
1936
  }
@@ -1982,12 +1945,12 @@
1982
1945
  };
1983
1946
  }
1984
1947
  function jr(e) {
1985
- var t = e.reduce(function(r2, i2) {
1986
- var n = r2[i2.name];
1987
- return r2[i2.name] = n ? Object.assign({}, n, i2, {
1988
- options: Object.assign({}, n.options, i2.options),
1989
- data: Object.assign({}, n.data, i2.data)
1990
- }) : i2, r2;
1948
+ var t = e.reduce(function(r2, i) {
1949
+ var n = r2[i.name];
1950
+ return r2[i.name] = n ? Object.assign({}, n, i, {
1951
+ options: Object.assign({}, n.options, i.options),
1952
+ data: Object.assign({}, n.data, i.data)
1953
+ }) : i, r2;
1991
1954
  }, {});
1992
1955
  return Object.keys(t).map(function(r2) {
1993
1956
  return t[r2];
@@ -2001,13 +1964,13 @@
2001
1964
  function nt() {
2002
1965
  for (var e = arguments.length, t = new Array(e), r2 = 0; r2 < e; r2++)
2003
1966
  t[r2] = arguments[r2];
2004
- return !t.some(function(i2) {
2005
- return !(i2 && typeof i2.getBoundingClientRect == "function");
1967
+ return !t.some(function(i) {
1968
+ return !(i && typeof i.getBoundingClientRect == "function");
2006
1969
  });
2007
1970
  }
2008
1971
  function Hr(e) {
2009
1972
  e === void 0 && (e = {});
2010
- var t = e, r2 = t.defaultModifiers, i2 = r2 === void 0 ? [] : r2, n = t.defaultOptions, o2 = n === void 0 ? it : n;
1973
+ var t = e, r2 = t.defaultModifiers, i = r2 === void 0 ? [] : r2, n = t.defaultOptions, o2 = n === void 0 ? it : n;
2011
1974
  return function(s2, a2, f2) {
2012
1975
  f2 === void 0 && (f2 = o2);
2013
1976
  var c2 = {
@@ -2029,7 +1992,7 @@
2029
1992
  reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
2030
1993
  popper: ae(a2)
2031
1994
  };
2032
- var E2 = Mr(jr([].concat(i2, c2.options.modifiers)));
1995
+ var E2 = Mr(jr([].concat(i, c2.options.modifiers)));
2033
1996
  return c2.orderedModifiers = E2.filter(function(p2) {
2034
1997
  return p2.enabled;
2035
1998
  }), b2(), u2.update();
@@ -2113,8 +2076,8 @@
2113
2076
  const t = this.collection.findIndex((r2) => r2.id === e.id);
2114
2077
  if (t >= 0) {
2115
2078
  const r2 = this.collection[t];
2116
- r2.state === "opened" && r2.close(), r2.popper.destroy(), bt(r2), Object.getOwnPropertyNames(r2).forEach((i2) => {
2117
- delete r2[i2];
2079
+ r2.state === "opened" && r2.close(), r2.popper.destroy(), bt(r2), Object.getOwnPropertyNames(r2).forEach((i) => {
2080
+ delete r2[i];
2118
2081
  }), this.collection.splice(t, 1);
2119
2082
  }
2120
2083
  return this.collection;
@@ -2122,8 +2085,8 @@
2122
2085
  function bt(e) {
2123
2086
  return e.__eventListeners && (e.__eventListeners.forEach((t) => {
2124
2087
  t.el.forEach((r2) => {
2125
- t.type.forEach((i2) => {
2126
- e[r2].removeEventListener(i2, t.listener, false);
2088
+ t.type.forEach((i) => {
2089
+ e[r2].removeEventListener(i, t.listener, false);
2127
2090
  });
2128
2091
  });
2129
2092
  }), delete e.__eventListeners), e;
@@ -2140,7 +2103,7 @@
2140
2103
  }
2141
2104
  async function Vr(e, t) {
2142
2105
  Ce.call(this, e);
2143
- const r2 = this, i2 = {
2106
+ const r2 = this, i = {
2144
2107
  open() {
2145
2108
  return je.call(r2, this);
2146
2109
  },
@@ -2157,7 +2120,7 @@
2157
2120
  trigger: t,
2158
2121
  popper: Ir(t, e),
2159
2122
  config: ot(e, this.settings),
2160
- ...i2
2123
+ ...i
2161
2124
  };
2162
2125
  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;
2163
2126
  }
@@ -2171,9 +2134,9 @@
2171
2134
  type: ["mouseleave", "focusout"],
2172
2135
  listener: lt.bind(this, e)
2173
2136
  }], e.__eventListeners.forEach((r2) => {
2174
- r2.el.forEach((i2) => {
2137
+ r2.el.forEach((i) => {
2175
2138
  r2.type.forEach((n) => {
2176
- e[i2].addEventListener(n, r2.listener, false);
2139
+ e[i].addEventListener(n, r2.listener, false);
2177
2140
  });
2178
2141
  });
2179
2142
  })) : (e.__eventListeners = [{
@@ -2181,9 +2144,9 @@
2181
2144
  type: ["click"],
2182
2145
  listener: Tt.bind(this, e)
2183
2146
  }], e.__eventListeners.forEach((r2) => {
2184
- r2.el.forEach((i2) => {
2147
+ r2.el.forEach((i) => {
2185
2148
  r2.type.forEach((n) => {
2186
- e[i2].addEventListener(n, r2.listener, false);
2149
+ e[i].addEventListener(n, r2.listener, false);
2187
2150
  });
2188
2151
  });
2189
2152
  }))), e;
@@ -2197,29 +2160,29 @@
2197
2160
  }
2198
2161
  async init(r2) {
2199
2162
  r2 && (this.settings = { ...this.settings, ...r2 });
2200
- const i2 = document.querySelectorAll(this.settings.selectorPopover);
2201
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(false), this;
2163
+ const i = document.querySelectorAll(this.settings.selectorPopover);
2164
+ return await this.registerCollection(i), this.settings.eventListeners && this.initEventListeners(false), this;
2202
2165
  }
2203
2166
  async destroy() {
2204
2167
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(false), this;
2205
2168
  }
2206
2169
  initEventListeners(r2 = true) {
2207
- r2 && this.collection.forEach((i2) => {
2208
- xt.call(this, i2);
2170
+ r2 && this.collection.forEach((i) => {
2171
+ xt.call(this, i);
2209
2172
  }), document.addEventListener("keydown", Ae(this, J), false);
2210
2173
  }
2211
2174
  destroyEventListeners(r2 = true) {
2212
- r2 && this.collection.forEach((i2) => {
2213
- bt(i2);
2175
+ r2 && this.collection.forEach((i) => {
2176
+ bt(i);
2214
2177
  }), document.removeEventListener("keydown", Ae(this, J), false);
2215
2178
  }
2216
2179
  register(r2) {
2217
- const i2 = Bt.call(this, r2);
2218
- return i2.error ? Promise.reject(i2.error) : Vr.call(this, i2.popover, i2.trigger);
2180
+ const i = Bt.call(this, r2);
2181
+ return i.error ? Promise.reject(i.error) : Vr.call(this, i.popover, i.trigger);
2219
2182
  }
2220
2183
  deregister(r2) {
2221
- const i2 = this.get(st.call(this, r2));
2222
- return Ce.call(this, i2);
2184
+ const i = this.get(st.call(this, r2));
2185
+ return Ce.call(this, i);
2223
2186
  }
2224
2187
  open(r2) {
2225
2188
  return je.call(this, r2);
@@ -2229,7 +2192,6 @@
2229
2192
  }
2230
2193
  }
2231
2194
  J = /* @__PURE__ */ new WeakMap();
2232
- exports2.Checkbox = r$1;
2233
2195
  exports2.Drawer = it$1;
2234
2196
  exports2.Modal = U;
2235
2197
  exports2.Popover = qr;