vrembem 4.0.0-next.8 → 4.0.0-next.9

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
@@ -1,16 +1,12 @@
1
- var b$2 = (t, e, n) => {
2
- if (!e.has(t))
3
- throw TypeError("Cannot " + n);
1
+ var b$2 = (t) => {
2
+ throw TypeError(t);
4
3
  };
5
- var o$2 = (t, e, n) => (b$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), m$2 = (t, e, n) => {
6
- if (e.has(t))
7
- throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(t) : e.set(t, n);
9
- }, a$1 = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
4
+ var g$2 = (t, e, n) => e.has(t) || b$2("Cannot " + n);
5
+ var o$2 = (t, e, n) => (g$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), m$2 = (t, e, n) => e.has(t) ? b$2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), a$1 = (t, e, n, i) => (g$2(t, e, "write to private field"), e.set(t, n), n);
10
6
  var l$1;
11
- let I$2 = class I {
7
+ let L$2 = class L {
12
8
  constructor(e, n) {
13
- m$2(this, l$1, void 0);
9
+ m$2(this, l$1);
14
10
  this.value = e, a$1(this, l$1, n), this.mql = null;
15
11
  }
16
12
  get handler() {
@@ -28,7 +24,7 @@ let I$2 = class I {
28
24
  }
29
25
  };
30
26
  l$1 = /* @__PURE__ */ new WeakMap();
31
- let L$2 = class L {
27
+ let S$3 = class S {
32
28
  constructor() {
33
29
  this.collection = [];
34
30
  }
@@ -63,7 +59,7 @@ const s = {
63
59
  inert: ":not([inert]):not([inert] *)",
64
60
  negTabIndex: ':not([tabindex^="-"])',
65
61
  disabled: ":not(:disabled)"
66
- }, g$2 = [
62
+ }, $$2 = [
67
63
  `a[href]${s.inert}${s.negTabIndex}`,
68
64
  `area[href]${s.inert}${s.negTabIndex}`,
69
65
  `input:not([type="hidden"]):not([type="radio"])${s.inert}${s.negTabIndex}${s.disabled}`,
@@ -82,12 +78,12 @@ const s = {
82
78
  `[tabindex]${s.inert}${s.negTabIndex}`
83
79
  ];
84
80
  var f$2, u$1, d$2;
85
- let S$3 = class S {
81
+ let q$2 = class q {
86
82
  constructor(e = null, n = "[data-focus]") {
87
- m$2(this, f$2, void 0);
88
- m$2(this, u$1, void 0);
89
- m$2(this, d$2, void 0);
90
- this.el = e, this.selectorFocus = n, a$1(this, u$1, $$2.bind(this)), a$1(this, d$2, v$2.bind(this));
83
+ m$2(this, f$2);
84
+ m$2(this, u$1);
85
+ m$2(this, d$2);
86
+ this.el = e, this.selectorFocus = n, a$1(this, u$1, v$2.bind(this)), a$1(this, d$2, y$2.bind(this));
91
87
  }
92
88
  get focusable() {
93
89
  return o$2(this, f$2);
@@ -112,24 +108,24 @@ let S$3 = class S {
112
108
  }
113
109
  getFocusable(e = this.el) {
114
110
  const n = [], i = document.activeElement, r = e.scrollTop;
115
- return e.querySelectorAll(g$2.join(",")).forEach((h2) => {
111
+ return e.querySelectorAll($$2.join(",")).forEach((h2) => {
116
112
  h2.focus(), document.activeElement === h2 && n.push(h2);
117
113
  }), e.scrollTop = r, i.focus(), n;
118
114
  }
119
115
  };
120
116
  f$2 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), d$2 = /* @__PURE__ */ new WeakMap();
121
- function $$2(t) {
117
+ function v$2(t) {
122
118
  (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
119
  }
124
- function v$2(t) {
120
+ function y$2(t) {
125
121
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
126
122
  }
127
- function y$2() {
123
+ function T$2() {
128
124
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
129
125
  }
130
- function T$2(t, e = document.body) {
126
+ function E$2(t, e = document.body) {
131
127
  if (t.slice(0, 2) !== "--") {
132
- const i = y$2();
128
+ const i = T$2();
133
129
  i && (t = `${i}${t}`), t = `--${t}`;
134
130
  }
135
131
  const n = getComputedStyle(e).getPropertyValue(t).trim();
@@ -137,11 +133,11 @@ function T$2(t, e = document.body) {
137
133
  return n;
138
134
  throw new Error(`CSS variable "${t}" was not found!`);
139
135
  }
140
- function q$2(t, e) {
136
+ function F$3(t, e) {
141
137
  const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
142
138
  return i ? JSON.parse(i) : {};
143
139
  }
144
- function F$3(t, e = true) {
140
+ function k$3(t, e = true) {
145
141
  const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
146
142
  return {
147
143
  get(r) {
@@ -152,19 +148,17 @@ function F$3(t, e = true) {
152
148
  }
153
149
  };
154
150
  }
155
- function k$3(t, e, n) {
151
+ function w$2(t, e, n) {
156
152
  const i = e.nodeType === Node.COMMENT_NODE, r = e.nodeType === Node.ELEMENT_NODE;
157
- if (e = i || r ? e : document.querySelector(e), i && (n = "after"), !e)
158
- throw new Error(`Not a valid teleport reference: '${e}'`);
159
- if (typeof e[n] != "function")
160
- throw new Error(`Not a valid teleport method: '${n}'`);
153
+ if (e = i || r ? e : document.querySelector(e), i && (n = "after"), !e) throw new Error(`Not a valid teleport reference: '${e}'`);
154
+ if (typeof e[n] != "function") throw new Error(`Not a valid teleport method: '${n}'`);
161
155
  let c2 = null;
162
156
  return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
163
157
  }
164
- function w$2(t, e, n, i = "transition-duration") {
158
+ function C$2(t, e, n, i = "transition-duration") {
165
159
  return new Promise((r) => {
166
160
  if (typeof i == "string") {
167
- const c2 = T$2(i, t), h2 = !!c2.includes("ms");
161
+ const c2 = E$2(i, t), h2 = !!c2.includes("ms");
168
162
  i = parseFloat(c2) * (h2 ? 1 : 1e3);
169
163
  }
170
164
  t.classList.remove(e.finish), t.classList.add(n.start), setTimeout(() => {
@@ -172,52 +166,43 @@ function w$2(t, e, n, i = "transition-duration") {
172
166
  }, i);
173
167
  });
174
168
  }
175
- function E$2(t, e) {
169
+ function p$2(t, e) {
176
170
  e && document.querySelectorAll(e).forEach((i) => {
177
171
  t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
178
172
  });
179
173
  }
180
- function p$2(t, e) {
174
+ function x$2(t, e) {
181
175
  e && document.querySelectorAll(e).forEach((i) => {
182
176
  t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
183
177
  });
184
178
  }
185
- function C$2(t, e) {
186
- p$2(!!t, e.selectorInert), E$2(!!t, e.selectorOverflow);
179
+ function N$3(t, e) {
180
+ x$2(!!t, e.selectorInert), p$2(!!t, e.selectorOverflow);
187
181
  }
188
182
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
189
183
  __proto__: null,
190
- Breakpoint: I$2,
191
- Collection: L$2,
192
- FocusTrap: S$3,
193
- cssVar: T$2,
194
- getConfig: q$2,
195
- getPrefix: y$2,
196
- localStore: F$3,
197
- teleport: k$3,
198
- transition: w$2,
199
- updateGlobalState: C$2
184
+ Breakpoint: L$2,
185
+ Collection: S$3,
186
+ FocusTrap: q$2,
187
+ cssVar: E$2,
188
+ getConfig: F$3,
189
+ getPrefix: T$2,
190
+ localStore: k$3,
191
+ teleport: w$2,
192
+ transition: C$2,
193
+ updateGlobalState: N$3
200
194
  }, Symbol.toStringTag, { value: "Module" }));
201
- var I$1 = (t, s2, e) => {
202
- if (!s2.has(t))
203
- throw TypeError("Cannot " + e);
195
+ var I$1 = (t) => {
196
+ throw TypeError(t);
204
197
  };
205
- var w$1 = (t, s2, e) => (I$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), S$2 = (t, s2, e) => {
206
- if (s2.has(t))
207
- throw TypeError("Cannot add the same private member more than once");
208
- s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e);
209
- }, L$1 = (t, s2, e, i) => (I$1(t, s2, "write to private field"), i ? i.call(t, e) : s2.set(t, e), e);
210
- var O$1 = (t, s2, e) => {
211
- if (!s2.has(t))
212
- throw TypeError("Cannot " + e);
213
- }, l = (t, s2, e) => (O$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), $$1 = (t, s2, e) => {
214
- if (s2.has(t))
215
- throw TypeError("Cannot add the same private member more than once");
216
- s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e);
217
- }, h$1 = (t, s2, e, i) => (O$1(t, s2, "write to private field"), i ? i.call(t, e) : s2.set(t, e), e), d$1;
218
- let P$1 = class P {
198
+ var O$1 = (t, s2, e) => s2.has(t) || I$1("Cannot " + e);
199
+ var w$1 = (t, s2, e) => (O$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), S$2 = (t, s2, e) => s2.has(t) ? I$1("Cannot add the same private member more than once") : s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e), k$2 = (t, s2, e, i) => (O$1(t, s2, "write to private field"), s2.set(t, e), e);
200
+ var M$2 = (t) => {
201
+ throw TypeError(t);
202
+ }, y$1 = (t, s2, e) => s2.has(t) || M$2("Cannot " + e), l = (t, s2, e) => (y$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), $$1 = (t, s2, e) => s2.has(t) ? M$2("Cannot add the same private member more than once") : s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e), h$1 = (t, s2, e, i) => (y$1(t, s2, "write to private field"), s2.set(t, e), e), d$1;
203
+ let B$2 = class B {
219
204
  constructor(s2, e) {
220
- $$1(this, d$1, void 0), this.value = s2, h$1(this, d$1, e), this.mql = null;
205
+ $$1(this, d$1), this.value = s2, h$1(this, d$1, e), this.mql = null;
221
206
  }
222
207
  get handler() {
223
208
  return l(this, d$1);
@@ -234,7 +219,7 @@ let P$1 = class P {
234
219
  }
235
220
  };
236
221
  d$1 = /* @__PURE__ */ new WeakMap();
237
- let A$1 = class A {
222
+ let j$1 = class j {
238
223
  constructor() {
239
224
  this.collection = [];
240
225
  }
@@ -269,7 +254,7 @@ const o$1 = {
269
254
  inert: ":not([inert]):not([inert] *)",
270
255
  negTabIndex: ':not([tabindex^="-"])',
271
256
  disabled: ":not(:disabled)"
272
- }, B$1 = [
257
+ }, N$2 = [
273
258
  `a[href]${o$1.inert}${o$1.negTabIndex}`,
274
259
  `area[href]${o$1.inert}${o$1.negTabIndex}`,
275
260
  `input:not([type="hidden"]):not([type="radio"])${o$1.inert}${o$1.negTabIndex}${o$1.disabled}`,
@@ -288,9 +273,9 @@ const o$1 = {
288
273
  `[tabindex]${o$1.inert}${o$1.negTabIndex}`
289
274
  ];
290
275
  var v$1, g$1, f$1;
291
- let j$1 = class j {
276
+ let q$1 = class q2 {
292
277
  constructor(s2 = null, e = "[data-focus]") {
293
- $$1(this, v$1, void 0), $$1(this, g$1, void 0), $$1(this, f$1, void 0), this.el = s2, this.selectorFocus = e, h$1(this, g$1, q$1.bind(this)), h$1(this, f$1, K$2.bind(this));
278
+ $$1(this, v$1), $$1(this, g$1), $$1(this, f$1), this.el = s2, this.selectorFocus = e, h$1(this, g$1, K$2.bind(this)), h$1(this, f$1, V$2.bind(this));
294
279
  }
295
280
  get focusable() {
296
281
  return l(this, v$1);
@@ -315,24 +300,24 @@ let j$1 = class j {
315
300
  }
316
301
  getFocusable(s2 = this.el) {
317
302
  const e = [], i = document.activeElement, n = s2.scrollTop;
318
- return s2.querySelectorAll(B$1.join(",")).forEach((c2) => {
303
+ return s2.querySelectorAll(N$2.join(",")).forEach((c2) => {
319
304
  c2.focus(), document.activeElement === c2 && e.push(c2);
320
305
  }), s2.scrollTop = n, i.focus(), e;
321
306
  }
322
307
  };
323
308
  v$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap(), f$1 = /* @__PURE__ */ new WeakMap();
324
- function q$1(t) {
309
+ function K$2(t) {
325
310
  (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()));
326
311
  }
327
- function K$2(t) {
312
+ function V$2(t) {
328
313
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
329
314
  }
330
- function M$2() {
315
+ function D$2() {
331
316
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
332
317
  }
333
- function N$2(t, s2 = document.body) {
318
+ function W$1(t, s2 = document.body) {
334
319
  if (t.slice(0, 2) !== "--") {
335
- const i = M$2();
320
+ const i = D$2();
336
321
  i && (t = `${i}${t}`), t = `--${t}`;
337
322
  }
338
323
  const e = getComputedStyle(s2).getPropertyValue(t).trim();
@@ -340,11 +325,11 @@ function N$2(t, s2 = document.body) {
340
325
  return e;
341
326
  throw new Error(`CSS variable "${t}" was not found!`);
342
327
  }
343
- function V$2(t, s2) {
328
+ function _$2(t, s2) {
344
329
  const e = (t.getAttribute(`data-${s2}`) || "").replace(/'/g, '"');
345
330
  return e ? JSON.parse(e) : {};
346
331
  }
347
- function W$1(t, s2 = true) {
332
+ function J$2(t, s2 = true) {
348
333
  const e = localStorage.getItem(t), i = e ? JSON.parse(e) : {};
349
334
  return {
350
335
  get(n) {
@@ -355,10 +340,10 @@ function W$1(t, s2 = true) {
355
340
  }
356
341
  };
357
342
  }
358
- function y$1(t, s2, e, i = "transition-duration") {
343
+ function F$2(t, s2, e, i = "transition-duration") {
359
344
  return new Promise((n) => {
360
345
  if (typeof i == "string") {
361
- const c2 = N$2(i, t), r = !!c2.includes("ms");
346
+ const c2 = W$1(i, t), r = !!c2.includes("ms");
362
347
  i = parseFloat(c2) * (r ? 1 : 1e3);
363
348
  }
364
349
  t.classList.remove(s2.finish), t.classList.add(e.start), setTimeout(() => {
@@ -366,20 +351,20 @@ function y$1(t, s2, e, i = "transition-duration") {
366
351
  }, i);
367
352
  });
368
353
  }
369
- function _$2(t, s2) {
354
+ function z$1(t, s2) {
370
355
  s2 && document.querySelectorAll(s2).forEach((e) => {
371
356
  t ? e.style.overflow = "hidden" : e.style.removeProperty("overflow");
372
357
  });
373
358
  }
374
- function J$2(t, s2) {
359
+ function G$1(t, s2) {
375
360
  s2 && document.querySelectorAll(s2).forEach((e) => {
376
361
  t ? (e.inert = true, e.setAttribute("aria-hidden", true)) : (e.inert = null, e.removeAttribute("aria-hidden"));
377
362
  });
378
363
  }
379
364
  function C$1(t, s2) {
380
- J$2(!!t, s2.selectorInert), _$2(!!t, s2.selectorOverflow);
365
+ G$1(!!t, s2.selectorInert), z$1(!!t, s2.selectorOverflow);
381
366
  }
382
- const z$1 = {
367
+ const H$1 = {
383
368
  autoMount: false,
384
369
  // Data attributes
385
370
  dataOpen: "drawer-open",
@@ -411,14 +396,14 @@ const z$1 = {
411
396
  transition: true,
412
397
  transitionDuration: "drawer-transition-duration"
413
398
  };
414
- function G$1(t) {
399
+ function Q$2(t) {
415
400
  t.store === "opened" ? t.open(false, false) : t.store === "closed" ? t.close(false, false) : t.store === "indeterminate" ? t.state = "indeterminate" : t.el.classList.contains(t.getSetting("stateOpened")) ? t.open(false, false) : t.el.classList.contains(t.getSetting("stateClosed")) ? t.close(false, false) : t.state = "indeterminate";
416
401
  }
417
- async function H$1(t) {
402
+ async function R$1(t) {
418
403
  t.store === "opened" ? await t.open(false, false) : t.store === "closed" ? await t.close(false, false) : t.store === "indeterminate" ? t.state != "indeterminate" && (t.state = "indeterminate") : (t.state != t.inlineState && (t.state = t.inlineState), t.inlineState === "opened" ? await t.open(false, false) : t.inlineState === "closed" && await t.close(false, false));
419
404
  }
420
- function Q$1(t) {
421
- const s2 = M$2(), e = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
405
+ function U(t) {
406
+ const s2 = D$2(), e = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
422
407
  return this.settings.breakpoints && this.settings.breakpoints[e] ? this.settings.breakpoints[e] : getComputedStyle(document.body).getPropertyValue(`--${s2}breakpoint-${e}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${s2}breakpoint-${e}`).trim() : e;
423
408
  }
424
409
  function m$1(t) {
@@ -427,10 +412,10 @@ function m$1(t) {
427
412
  return s2;
428
413
  throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
429
414
  }
430
- function D$2(t) {
415
+ function P$1(t) {
431
416
  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());
432
417
  }
433
- async function R$1(t) {
418
+ async function X(t) {
434
419
  const s2 = t.target.closest(`
435
420
  [data-${this.settings.dataOpen}],
436
421
  [data-${this.settings.dataToggle}],
@@ -449,8 +434,7 @@ async function R$1(t) {
449
434
  return n.trigger = s2, n.close();
450
435
  } else {
451
436
  const n = t.target.closest(this.settings.selectorDrawer);
452
- if (n)
453
- return this.close(n);
437
+ if (n) return this.close(n);
454
438
  }
455
439
  });
456
440
  return;
@@ -458,11 +442,11 @@ async function R$1(t) {
458
442
  if (this.activeModal && t.target.matches(this.settings.selectorScreen))
459
443
  return this.close(this.activeModal.id);
460
444
  }
461
- function U(t) {
445
+ function Y(t) {
462
446
  if (t.key === "Escape" && this.activeModal)
463
447
  return this.close(this.activeModal);
464
448
  }
465
- async function k$2(t, s2 = true) {
449
+ async function L$1(t, s2 = true) {
466
450
  const e = this.collection.findIndex((i) => i.id === t.id);
467
451
  if (e >= 0) {
468
452
  const i = this.collection[e];
@@ -474,69 +458,69 @@ async function k$2(t, s2 = true) {
474
458
  }
475
459
  async function x$1(t, s2, e = true) {
476
460
  const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
477
- return s2 !== void 0 && (n.transition = s2), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", n.transition ? await y$1(i.el, {
461
+ return s2 !== void 0 && (n.transition = s2), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", n.transition ? await F$2(i.el, {
478
462
  start: n.stateClosing,
479
463
  finish: n.stateClosed
480
464
  }, {
481
465
  start: n.stateOpening,
482
466
  finish: n.stateOpened
483
- }, n.transitionDuration) : (i.el.classList.add(n.stateOpened), i.el.classList.remove(n.stateClosed)), i.state = "opened", i.mode === "modal" && C$1(true, n), e && D$2.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
467
+ }, n.transitionDuration) : (i.el.classList.add(n.stateOpened), i.el.classList.remove(n.stateClosed)), i.state = "opened", i.mode === "modal" && C$1(true, n), e && P$1.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
484
468
  detail: this,
485
469
  bubbles: true
486
470
  }))), i;
487
471
  }
488
472
  async function E$1(t, s2, e = true) {
489
473
  const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
490
- return s2 !== void 0 && (n.transition = s2), (i.state === "opened" || i.state === "indeterminate") && (i.state = "closing", document.activeElement.blur(), n.transition ? await y$1(i.el, {
474
+ return s2 !== void 0 && (n.transition = s2), (i.state === "opened" || i.state === "indeterminate") && (i.state = "closing", document.activeElement.blur(), n.transition ? await F$2(i.el, {
491
475
  start: n.stateOpening,
492
476
  finish: n.stateOpened
493
477
  }, {
494
478
  start: n.stateClosing,
495
479
  finish: n.stateClosed
496
- }, n.transitionDuration) : (i.el.classList.add(n.stateClosed), i.el.classList.remove(n.stateOpened)), i.state = "closed", i.mode === "modal" && C$1(false, n), e && D$2.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
480
+ }, n.transitionDuration) : (i.el.classList.add(n.stateClosed), i.el.classList.remove(n.stateOpened)), i.state = "closed", i.mode === "modal" && C$1(false, n), e && P$1.call(this, i), i.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
497
481
  detail: this,
498
482
  bubbles: true
499
483
  }))), i;
500
484
  }
501
- async function F$2(t, s2, e) {
485
+ async function A$1(t, s2, e) {
502
486
  const i = m$1.call(this, t);
503
487
  return i.state === "closed" ? x$1.call(this, i, s2, e) : E$1.call(this, i, s2, e);
504
488
  }
505
- function X(t) {
489
+ function Z$1(t) {
506
490
  switch (t.mode) {
507
491
  case "inline":
508
- return Y.call(this, t);
492
+ return tt$1.call(this, t);
509
493
  case "modal":
510
- return Z$1.call(this, t);
494
+ return et$1.call(this, t);
511
495
  default:
512
496
  throw new Error(`"${t.mode}" is not a valid drawer mode.`);
513
497
  }
514
498
  }
515
- async function Y(t) {
516
- return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), C$1(false, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await H$1(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
499
+ async function tt$1(t) {
500
+ return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), C$1(false, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await R$1(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
517
501
  detail: this,
518
502
  bubbles: true
519
503
  })), t;
520
504
  }
521
- async function Z$1(t) {
505
+ async function et$1(t) {
522
506
  return t.el.classList.add(t.getSetting("classModal")), t.dialog.setAttribute("aria-modal", "true"), await E$1.call(this, t, false, false), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
523
507
  detail: this,
524
508
  bubbles: true
525
509
  })), t;
526
510
  }
527
- async function tt$1(t, s2 = {}) {
528
- await k$2.call(this, t, false);
529
- const e = this, i = new P$1();
511
+ async function st$1(t, s2 = {}) {
512
+ await L$1.call(this, t, false);
513
+ const e = this, i = new B$2();
530
514
  let n, c2 = "indeterminate";
531
515
  const r = {
532
516
  id: t.id,
533
517
  el: t,
534
518
  dialog: null,
535
519
  trigger: null,
536
- settings: { ...V$2(t, this.settings.dataConfig), ...s2 },
520
+ settings: { ..._$2(t, this.settings.dataConfig), ...s2 },
537
521
  inlineState: "indeterminate",
538
522
  get breakpoint() {
539
- return Q$1.call(e, t);
523
+ return U.call(e, t);
540
524
  },
541
525
  get store() {
542
526
  return e.store.get(this.id);
@@ -545,7 +529,7 @@ async function tt$1(t, s2 = {}) {
545
529
  return n;
546
530
  },
547
531
  set mode(a2) {
548
- n = a2, X.call(e, this);
532
+ n = a2, Z$1.call(e, this);
549
533
  },
550
534
  get state() {
551
535
  return c2;
@@ -560,10 +544,10 @@ async function tt$1(t, s2 = {}) {
560
544
  return E$1.call(e, this, a2, u2);
561
545
  },
562
546
  toggle(a2, u2) {
563
- return F$2.call(e, this, a2, u2);
547
+ return A$1.call(e, this, a2, u2);
564
548
  },
565
549
  deregister() {
566
- return k$2.call(e, this);
550
+ return L$1.call(e, this);
567
551
  },
568
552
  mountBreakpoint() {
569
553
  const a2 = this.breakpoint, u2 = this.handleBreakpoint.bind(this);
@@ -582,15 +566,15 @@ async function tt$1(t, s2 = {}) {
582
566
  };
583
567
  this.collection.push(r);
584
568
  const T2 = t.querySelector(r.getSetting("selectorDialog"));
585
- return r.dialog = T2 || t, r.getSetting("setTabindex") && r.dialog.setAttribute("tabindex", "-1"), await G$1(r), r.inlineState = r.state, r.mode = t.classList.contains(r.getSetting("classModal")) ? "modal" : "inline", r.breakpoint && r.mountBreakpoint(), r;
569
+ return r.dialog = T2 || t, r.getSetting("setTabindex") && r.dialog.setAttribute("tabindex", "-1"), await Q$2(r), r.inlineState = r.state, r.mode = t.classList.contains(r.getSetting("classModal")) ? "modal" : "inline", r.breakpoint && r.mountBreakpoint(), r;
586
570
  }
587
571
  var p$1, b$1;
588
- let st$1 = class st extends A$1 {
572
+ let nt$1 = class nt extends j$1 {
589
573
  constructor(e) {
590
574
  super();
591
- S$2(this, p$1, void 0);
592
- S$2(this, b$1, void 0);
593
- this.defaults = z$1, this.settings = { ...this.defaults, ...e }, this.focusTrap = new j$1(), this.store = W$1(this.settings.storeKey, this.settings.store), L$1(this, p$1, R$1.bind(this)), L$1(this, b$1, U.bind(this)), this.settings.autoMount && this.mount();
575
+ S$2(this, p$1);
576
+ S$2(this, b$1);
577
+ this.defaults = H$1, this.settings = { ...this.defaults, ...e }, this.focusTrap = new q$1(), this.store = J$2(this.settings.storeKey, this.settings.store), k$2(this, p$1, X.bind(this)), k$2(this, b$1, Y.bind(this)), this.settings.autoMount && this.mount();
594
578
  }
595
579
  get activeModal() {
596
580
  return this.collection.find((e) => e.state === "opened" && e.mode === "modal");
@@ -611,11 +595,11 @@ let st$1 = class st extends A$1 {
611
595
  }
612
596
  register(e, i = {}) {
613
597
  let n = typeof e == "string" ? document.getElementById(e) : e;
614
- return n ? tt$1.call(this, n, i) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${e.id || e}".`));
598
+ return n ? st$1.call(this, n, i) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${e.id || e}".`));
615
599
  }
616
600
  deregister(e) {
617
601
  let i = this.get(e.id || e);
618
- return i ? k$2.call(this, i) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${e.id || e}".`));
602
+ return i ? L$1.call(this, i) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${e.id || e}".`));
619
603
  }
620
604
  open(e, i, n) {
621
605
  return x$1.call(this, e, i, n);
@@ -624,46 +608,37 @@ let st$1 = class st extends A$1 {
624
608
  return E$1.call(this, e, i, n);
625
609
  }
626
610
  toggle(e, i, n) {
627
- return F$2.call(this, e, i, n);
611
+ return A$1.call(this, e, i, n);
628
612
  }
629
613
  };
630
614
  p$1 = /* @__PURE__ */ new WeakMap(), b$1 = /* @__PURE__ */ new WeakMap();
631
- var L2 = (i, s2, t) => {
632
- if (!s2.has(i))
633
- throw TypeError("Cannot " + t);
615
+ var L2 = (i) => {
616
+ throw TypeError(i);
634
617
  };
635
- var f = (i, s2, t) => (L2(i, s2, "read from private field"), t ? t.call(i) : s2.get(i)), v = (i, s2, t) => {
636
- if (s2.has(i))
637
- throw TypeError("Cannot add the same private member more than once");
638
- s2 instanceof WeakSet ? s2.add(i) : s2.set(i, t);
639
- }, b = (i, s2, t, e) => (L2(i, s2, "write to private field"), e ? e.call(i, t) : s2.set(i, t), t);
640
- var I2 = (i, s2, t) => {
641
- if (!s2.has(i))
642
- throw TypeError("Cannot " + t);
643
- }, a = (i, s2, t) => (I2(i, s2, "read from private field"), t ? t.call(i) : s2.get(i)), y = (i, s2, t) => {
644
- if (s2.has(i))
645
- throw TypeError("Cannot add the same private member more than once");
646
- s2 instanceof WeakSet ? s2.add(i) : s2.set(i, t);
647
- }, w = (i, s2, t, e) => (I2(i, s2, "write to private field"), e ? e.call(i, t) : s2.set(i, t), t);
648
- class O {
618
+ var I = (i, e, t) => e.has(i) || L2("Cannot " + t);
619
+ var f = (i, e, t) => (I(i, e, "read from private field"), t ? t.call(i) : e.get(i)), v = (i, e, t) => e.has(i) ? L2("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), b = (i, e, t, s2) => (I(i, e, "write to private field"), e.set(i, t), t);
620
+ var S$1 = (i) => {
621
+ throw TypeError(i);
622
+ }, k$1 = (i, e, t) => e.has(i) || S$1("Cannot " + t), a = (i, e, t) => (k$1(i, e, "read from private field"), t ? t.call(i) : e.get(i)), y = (i, e, t) => e.has(i) ? S$1("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), w = (i, e, t, s2) => (k$1(i, e, "write to private field"), e.set(i, t), t);
623
+ class A {
649
624
  constructor() {
650
625
  this.collection = [];
651
626
  }
652
- async register(s2) {
653
- return await this.deregister(s2), this.collection.push(s2), this.collection;
627
+ async register(e) {
628
+ return await this.deregister(e), this.collection.push(e), this.collection;
654
629
  }
655
- async deregister(s2) {
656
- const t = this.collection.findIndex((e) => e === s2);
630
+ async deregister(e) {
631
+ const t = this.collection.findIndex((s2) => s2 === e);
657
632
  if (t >= 0) {
658
- const e = this.collection[t];
659
- Object.getOwnPropertyNames(e).forEach((n) => {
660
- delete e[n];
633
+ const s2 = this.collection[t];
634
+ Object.getOwnPropertyNames(s2).forEach((n) => {
635
+ delete s2[n];
661
636
  }), this.collection.splice(t, 1);
662
637
  }
663
638
  return this.collection;
664
639
  }
665
- async registerCollection(s2) {
666
- return await Promise.all(Array.from(s2, (t) => {
640
+ async registerCollection(e) {
641
+ return await Promise.all(Array.from(e, (t) => {
667
642
  this.register(t);
668
643
  })), this.collection;
669
644
  }
@@ -672,15 +647,15 @@ class O {
672
647
  await this.deregister(this.collection[0]);
673
648
  return this.collection;
674
649
  }
675
- get(s2, t = "id") {
676
- return this.collection.find((e) => e[t] === s2);
650
+ get(e, t = "id") {
651
+ return this.collection.find((s2) => s2[t] === e);
677
652
  }
678
653
  }
679
654
  const o = {
680
655
  inert: ":not([inert]):not([inert] *)",
681
656
  negTabIndex: ':not([tabindex^="-"])',
682
657
  disabled: ":not(:disabled)"
683
- }, M$1 = [
658
+ }, F$1 = [
684
659
  `a[href]${o.inert}${o.negTabIndex}`,
685
660
  `area[href]${o.inert}${o.negTabIndex}`,
686
661
  `input:not([type="hidden"]):not([type="radio"])${o.inert}${o.negTabIndex}${o.disabled}`,
@@ -699,15 +674,15 @@ const o = {
699
674
  `[tabindex]${o.inert}${o.negTabIndex}`
700
675
  ];
701
676
  var g, c, d;
702
- class A2 {
703
- constructor(s2 = null, t = "[data-focus]") {
704
- y(this, g, void 0), y(this, c, void 0), y(this, d, void 0), this.el = s2, this.selectorFocus = t, w(this, c, P2.bind(this)), w(this, d, R.bind(this));
677
+ class P {
678
+ constructor(e = null, t = "[data-focus]") {
679
+ y(this, g), y(this, c), y(this, d), this.el = e, this.selectorFocus = t, w(this, c, R.bind(this)), w(this, d, D$1.bind(this));
705
680
  }
706
681
  get focusable() {
707
682
  return a(this, g);
708
683
  }
709
- set focusable(s2) {
710
- w(this, g, s2), a(this, g).length ? (document.removeEventListener("keydown", a(this, d)), document.addEventListener("keydown", a(this, c))) : (document.removeEventListener("keydown", a(this, c)), document.addEventListener("keydown", a(this, d)));
684
+ set focusable(e) {
685
+ w(this, g, e), a(this, g).length ? (document.removeEventListener("keydown", a(this, d)), document.addEventListener("keydown", a(this, c))) : (document.removeEventListener("keydown", a(this, c)), document.addEventListener("keydown", a(this, d)));
711
686
  }
712
687
  get focusableFirst() {
713
688
  return this.focusable[0];
@@ -715,80 +690,78 @@ class A2 {
715
690
  get focusableLast() {
716
691
  return this.focusable[this.focusable.length - 1];
717
692
  }
718
- mount(s2, t) {
719
- s2 && (this.el = s2), t && (this.selectorFocus = t), this.focusable = this.getFocusable(), this.focus();
693
+ mount(e, t) {
694
+ e && (this.el = e), t && (this.selectorFocus = t), this.focusable = this.getFocusable(), this.focus();
720
695
  }
721
696
  unmount() {
722
697
  this.el = null, this.focusable = [], document.removeEventListener("keydown", a(this, c)), document.removeEventListener("keydown", a(this, d));
723
698
  }
724
- focus(s2 = this.el, t = this.selectorFocus) {
725
- (s2.querySelector(t) || s2).focus();
699
+ focus(e = this.el, t = this.selectorFocus) {
700
+ (e.querySelector(t) || e).focus();
726
701
  }
727
- getFocusable(s2 = this.el) {
728
- const t = [], e = document.activeElement, n = s2.scrollTop;
729
- return s2.querySelectorAll(M$1.join(",")).forEach((r) => {
702
+ getFocusable(e = this.el) {
703
+ const t = [], s2 = document.activeElement, n = e.scrollTop;
704
+ return e.querySelectorAll(F$1.join(",")).forEach((r) => {
730
705
  r.focus(), document.activeElement === r && t.push(r);
731
- }), s2.scrollTop = n, e.focus(), t;
706
+ }), e.scrollTop = n, s2.focus(), t;
732
707
  }
733
708
  }
734
709
  g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
735
- function P2(i) {
710
+ function R(i) {
736
711
  (i.key === "Tab" || i.keyCode === 9) && (i.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (i.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (i.preventDefault(), this.focusableFirst.focus()));
737
712
  }
738
- function R(i) {
713
+ function D$1(i) {
739
714
  (i.key === "Tab" || i.keyCode === 9) && i.preventDefault();
740
715
  }
741
- function F$1() {
716
+ function N$1() {
742
717
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
743
718
  }
744
- function D$1(i, s2 = document.body) {
719
+ function z(i, e = document.body) {
745
720
  if (i.slice(0, 2) !== "--") {
746
- const e = F$1();
747
- e && (i = `${e}${i}`), i = `--${i}`;
721
+ const s2 = N$1();
722
+ s2 && (i = `${s2}${i}`), i = `--${i}`;
748
723
  }
749
- const t = getComputedStyle(s2).getPropertyValue(i).trim();
724
+ const t = getComputedStyle(e).getPropertyValue(i).trim();
750
725
  if (t)
751
726
  return t;
752
727
  throw new Error(`CSS variable "${i}" was not found!`);
753
728
  }
754
- function N$1(i, s2) {
755
- const t = (i.getAttribute(`data-${s2}`) || "").replace(/'/g, '"');
729
+ function j2(i, e) {
730
+ const t = (i.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
756
731
  return t ? JSON.parse(t) : {};
757
732
  }
758
- function T$1(i, s2, t) {
759
- const e = s2.nodeType === Node.COMMENT_NODE, n = s2.nodeType === Node.ELEMENT_NODE;
760
- if (s2 = e || n ? s2 : document.querySelector(s2), e && (t = "after"), !s2)
761
- throw new Error(`Not a valid teleport reference: '${s2}'`);
762
- if (typeof s2[t] != "function")
763
- throw new Error(`Not a valid teleport method: '${t}'`);
733
+ function T$1(i, e, t) {
734
+ const s2 = e.nodeType === Node.COMMENT_NODE, n = e.nodeType === Node.ELEMENT_NODE;
735
+ if (e = s2 || n ? e : document.querySelector(e), s2 && (t = "after"), !e) throw new Error(`Not a valid teleport reference: '${e}'`);
736
+ if (typeof e[t] != "function") throw new Error(`Not a valid teleport method: '${t}'`);
764
737
  let r = null;
765
- return e || (r = document.createComment("teleported #" + i.id), i.before(r)), s2[t](i), e && s2.remove(), r;
738
+ return s2 || (r = document.createComment("teleported #" + i.id), i.before(r)), e[t](i), s2 && e.remove(), r;
766
739
  }
767
- function S$1(i, s2, t, e = "transition-duration") {
740
+ function O(i, e, t, s2 = "transition-duration") {
768
741
  return new Promise((n) => {
769
- if (typeof e == "string") {
770
- const r = D$1(e, i), l2 = !!r.includes("ms");
771
- e = parseFloat(r) * (l2 ? 1 : 1e3);
742
+ if (typeof s2 == "string") {
743
+ const r = z(s2, i), l2 = !!r.includes("ms");
744
+ s2 = parseFloat(r) * (l2 ? 1 : 1e3);
772
745
  }
773
- i.classList.remove(s2.finish), i.classList.add(t.start), setTimeout(() => {
746
+ i.classList.remove(e.finish), i.classList.add(t.start), setTimeout(() => {
774
747
  i.classList.add(t.finish), i.classList.remove(t.start), n(i);
775
- }, e);
748
+ }, s2);
776
749
  });
777
750
  }
778
- function z(i, s2) {
779
- s2 && document.querySelectorAll(s2).forEach((t) => {
751
+ function W(i, e) {
752
+ e && document.querySelectorAll(e).forEach((t) => {
780
753
  i ? t.style.overflow = "hidden" : t.style.removeProperty("overflow");
781
754
  });
782
755
  }
783
- function j2(i, s2) {
784
- s2 && document.querySelectorAll(s2).forEach((t) => {
756
+ function _$1(i, e) {
757
+ e && document.querySelectorAll(e).forEach((t) => {
785
758
  i ? (t.inert = true, t.setAttribute("aria-hidden", true)) : (t.inert = null, t.removeAttribute("aria-hidden"));
786
759
  });
787
760
  }
788
- function W(i, s2) {
789
- j2(!!i, s2.selectorInert), z(!!i, s2.selectorOverflow);
761
+ function G(i, e) {
762
+ _$1(!!i, e.selectorInert), W(!!i, e.selectorOverflow);
790
763
  }
791
- const _$1 = {
764
+ const K$1 = {
792
765
  autoMount: false,
793
766
  // Data attributes
794
767
  dataOpen: "modal-open",
@@ -818,96 +791,96 @@ const _$1 = {
818
791
  transitionDuration: "modal-transition-duration"
819
792
  };
820
793
  function m(i) {
821
- const s2 = typeof i == "string" ? this.get(i) : this.get(i.id);
822
- if (s2)
823
- return s2;
794
+ const e = typeof i == "string" ? this.get(i) : this.get(i.id);
795
+ if (e)
796
+ return e;
824
797
  throw new Error(`Modal not found in collection with id of "${i.id || i}".`);
825
798
  }
826
799
  function p() {
827
800
  this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
828
801
  }
829
- async function G(i) {
830
- const s2 = i.target.closest(`
802
+ async function V$1(i) {
803
+ const e = i.target.closest(`
831
804
  [data-${this.settings.dataOpen}],
832
805
  [data-${this.settings.dataReplace}],
833
806
  [data-${this.settings.dataClose}]
834
807
  `);
835
- if (s2) {
836
- if (i.preventDefault(), s2.matches(`[data-${this.settings.dataOpen}]`)) {
837
- const t = s2.getAttribute(`data-${this.settings.dataOpen}`).trim(), e = m.call(this, t);
838
- return i.target.closest(this.settings.selectorModal) || (this.trigger = s2), e.open();
808
+ if (e) {
809
+ if (i.preventDefault(), e.matches(`[data-${this.settings.dataOpen}]`)) {
810
+ const t = e.getAttribute(`data-${this.settings.dataOpen}`).trim(), s2 = m.call(this, t);
811
+ return i.target.closest(this.settings.selectorModal) || (this.trigger = e), s2.open();
839
812
  }
840
- if (s2.matches(`[data-${this.settings.dataReplace}]`)) {
841
- const t = s2.getAttribute(`data-${this.settings.dataReplace}`).trim(), e = m.call(this, t);
842
- return i.target.closest(this.settings.selectorModal) || (this.trigger = s2), e.replace();
813
+ if (e.matches(`[data-${this.settings.dataReplace}]`)) {
814
+ const t = e.getAttribute(`data-${this.settings.dataReplace}`).trim(), s2 = m.call(this, t);
815
+ return i.target.closest(this.settings.selectorModal) || (this.trigger = e), s2.replace();
843
816
  }
844
- if (s2.matches(`[data-${this.settings.dataClose}]`)) {
845
- const t = s2.getAttribute(`data-${this.settings.dataClose}`).trim();
817
+ if (e.matches(`[data-${this.settings.dataClose}]`)) {
818
+ const t = e.getAttribute(`data-${this.settings.dataClose}`).trim();
846
819
  return t === "*" ? this.closeAll() : this.close(t);
847
820
  }
848
821
  }
849
822
  if (this.active && i.target.matches(this.settings.selectorScreen) && !this.active.required)
850
823
  return this.close(this.active.id);
851
824
  }
852
- function K$1(i) {
825
+ function q3(i) {
853
826
  if (i.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
854
827
  return this.close();
855
828
  }
856
- async function E(i, s2 = true) {
857
- const t = this.collection.findIndex((e) => e.id === i.id);
829
+ async function E(i, e = true) {
830
+ const t = this.collection.findIndex((s2) => s2.id === i.id);
858
831
  if (t >= 0) {
859
- const e = this.collection[t];
860
- s2 && e.state === "opened" ? await e.close(false) : this.stack.remove(e), e.getSetting("teleport") && e.teleportReturn(), Object.getOwnPropertyNames(e).forEach((n) => {
861
- delete e[n];
832
+ const s2 = this.collection[t];
833
+ e && s2.state === "opened" ? await s2.close(false) : this.stack.remove(s2), s2.getSetting("teleport") && s2.teleportReturn(), Object.getOwnPropertyNames(s2).forEach((n) => {
834
+ delete s2[n];
862
835
  }), this.collection.splice(t, 1);
863
836
  }
864
837
  return this.collection;
865
838
  }
866
- async function x(i, s2, t = true) {
867
- const e = m.call(this, i), n = { ...this.settings, ...e.settings };
868
- return s2 !== void 0 && (n.transition = s2), this.stack.moveToTop(e), e.state === "closed" && (e.state = "opening", this.stack.add(e), n.transition ? await S$1(e.el, {
839
+ async function x(i, e, t = true) {
840
+ const s2 = m.call(this, i), n = { ...this.settings, ...s2.settings };
841
+ return e !== void 0 && (n.transition = e), this.stack.moveToTop(s2), s2.state === "closed" && (s2.state = "opening", this.stack.add(s2), n.transition ? await O(s2.el, {
869
842
  start: n.stateClosing,
870
843
  finish: n.stateClosed
871
844
  }, {
872
845
  start: n.stateOpening,
873
846
  finish: n.stateOpened
874
- }, n.transitionDuration) : (e.el.classList.add(n.stateOpened), e.el.classList.remove(n.stateClosed)), e.state = "opened"), t && p.call(this), e.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
847
+ }, n.transitionDuration) : (s2.el.classList.add(n.stateOpened), s2.el.classList.remove(n.stateClosed)), s2.state = "opened"), t && p.call(this), s2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
875
848
  detail: this,
876
849
  bubbles: true
877
- })), e;
878
- }
879
- async function C(i, s2, t = true) {
880
- const e = i ? m.call(this, i) : this.active;
881
- if (e && e.state === "opened") {
882
- e.state = "closing";
883
- const n = { ...this.settings, ...e.settings };
884
- s2 !== void 0 && (n.transition = s2), document.activeElement.blur(), n.transition ? await S$1(e.el, {
850
+ })), s2;
851
+ }
852
+ async function C(i, e, t = true) {
853
+ const s2 = i ? m.call(this, i) : this.active;
854
+ if (s2 && s2.state === "opened") {
855
+ s2.state = "closing";
856
+ const n = { ...this.settings, ...s2.settings };
857
+ e !== void 0 && (n.transition = e), document.activeElement.blur(), n.transition ? await O(s2.el, {
885
858
  start: n.stateOpening,
886
859
  finish: n.stateOpened
887
860
  }, {
888
861
  start: n.stateClosing,
889
862
  finish: n.stateClosed
890
- }, n.transitionDuration) : (e.el.classList.add(n.stateClosed), e.el.classList.remove(n.stateOpened)), this.stack.remove(e), e.state = "closed", t && p.call(this), e.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
863
+ }, n.transitionDuration) : (s2.el.classList.add(n.stateClosed), s2.el.classList.remove(n.stateOpened)), this.stack.remove(s2), s2.state = "closed", t && p.call(this), s2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
891
864
  detail: this,
892
865
  bubbles: true
893
866
  }));
894
867
  }
895
- return e;
868
+ return s2;
896
869
  }
897
- async function $(i, s2) {
870
+ async function $(i, e) {
898
871
  const t = [];
899
- return await Promise.all(this.stack.value.map(async (e) => {
900
- i && i === e.id ? Promise.resolve() : t.push(await C.call(this, e, s2, false)), e.trigger = null;
872
+ return await Promise.all(this.stack.value.map(async (s2) => {
873
+ i && i === s2.id ? Promise.resolve() : t.push(await C.call(this, s2, e, false)), s2.trigger = null;
901
874
  })), t;
902
875
  }
903
- async function k$1(i, s2, t = true) {
904
- const e = m.call(this, i);
876
+ async function M$1(i, e, t = true) {
877
+ const s2 = m.call(this, i);
905
878
  let n, r;
906
- return e.state === "opened" ? (n = e, r = await $.call(this, e.id, s2)) : (r = $.call(this, false, s2), n = x.call(this, e, s2, false), await Promise.all([n, r])), t && p.call(this), { opened: n, closed: r };
879
+ return s2.state === "opened" ? (n = s2, r = await $.call(this, s2.id, e)) : (r = $.call(this, false, e), n = x.call(this, s2, e, false), await Promise.all([n, r])), t && p.call(this), { opened: n, closed: r };
907
880
  }
908
- async function V$1(i, s2 = {}) {
881
+ async function B$1(i, e = {}) {
909
882
  await E.call(this, i, false);
910
- const t = this, e = {
883
+ const t = this, s2 = {
911
884
  id: i.id,
912
885
  state: "closed",
913
886
  el: i,
@@ -916,7 +889,7 @@ async function V$1(i, s2 = {}) {
916
889
  return this.dialog.matches(this.getSetting("selectorRequired"));
917
890
  },
918
891
  returnRef: null,
919
- settings: { ...N$1(i, this.settings.dataConfig), ...s2 },
892
+ settings: { ...j2(i, this.settings.dataConfig), ...e },
920
893
  open(r, l2) {
921
894
  return x.call(t, this, r, l2);
922
895
  },
@@ -924,7 +897,7 @@ async function V$1(i, s2 = {}) {
924
897
  return C.call(t, this, r, l2);
925
898
  },
926
899
  replace(r, l2) {
927
- return k$1.call(t, this, r, l2);
900
+ return M$1.call(t, this, r, l2);
928
901
  },
929
902
  deregister() {
930
903
  return E.call(t, this);
@@ -938,58 +911,58 @@ async function V$1(i, s2 = {}) {
938
911
  getSetting(r) {
939
912
  return r in this.settings ? this.settings[r] : t.settings[r];
940
913
  }
941
- }, n = i.querySelector(e.getSetting("selectorDialog"));
942
- return e.dialog = n || i, e.dialog.setAttribute("aria-modal", "true"), e.dialog.hasAttribute("role") || e.dialog.setAttribute("role", "dialog"), e.getSetting("setTabindex") && e.dialog.setAttribute("tabindex", "-1"), e.getSetting("teleport") && e.teleport(), this.collection.push(e), e.el.classList.contains(this.settings.stateOpened) ? await e.open(false) : (e.el.classList.remove(this.settings.stateOpening), e.el.classList.remove(this.settings.stateClosing), e.el.classList.add(this.settings.stateClosed)), e;
914
+ }, n = i.querySelector(s2.getSetting("selectorDialog"));
915
+ return s2.dialog = n || i, s2.dialog.setAttribute("aria-modal", "true"), s2.dialog.hasAttribute("role") || s2.dialog.setAttribute("role", "dialog"), s2.getSetting("setTabindex") && s2.dialog.setAttribute("tabindex", "-1"), s2.getSetting("teleport") && s2.teleport(), this.collection.push(s2), s2.el.classList.contains(this.settings.stateOpened) ? await s2.open(false) : (s2.el.classList.remove(this.settings.stateOpening), s2.el.classList.remove(this.settings.stateClosing), s2.el.classList.add(this.settings.stateClosed)), s2;
943
916
  }
944
- function q(i) {
945
- const s2 = [];
917
+ function J$1(i) {
918
+ const e = [];
946
919
  return {
947
920
  get value() {
948
- return [...s2];
921
+ return [...e];
949
922
  },
950
923
  get top() {
951
- return s2[s2.length - 1];
924
+ return e[e.length - 1];
952
925
  },
953
926
  updateIndex() {
954
- s2.forEach((t, e) => {
927
+ e.forEach((t, s2) => {
955
928
  t.el.style.zIndex = null;
956
929
  const n = getComputedStyle(t.el)["z-index"];
957
- t.el.style.zIndex = parseInt(n) + e + 1;
930
+ t.el.style.zIndex = parseInt(n) + s2 + 1;
958
931
  });
959
932
  },
960
933
  updateGlobalState() {
961
- W(this.top, i), this.updateIndex();
934
+ G(this.top, i), this.updateIndex();
962
935
  },
963
936
  add(t) {
964
937
  t.el.style.zIndex = null;
965
- const e = getComputedStyle(t.el)["z-index"];
966
- t.el.style.zIndex = parseInt(e) + s2.length + 1, s2.push(t), this.updateGlobalState();
938
+ const s2 = getComputedStyle(t.el)["z-index"];
939
+ t.el.style.zIndex = parseInt(s2) + e.length + 1, e.push(t), this.updateGlobalState();
967
940
  },
968
941
  remove(t) {
969
- const e = s2.findIndex((n) => n.id === t.id);
970
- e >= 0 && (t.el.style.zIndex = null, s2.splice(e, 1), this.updateGlobalState());
942
+ const s2 = e.findIndex((n) => n.id === t.id);
943
+ s2 >= 0 && (t.el.style.zIndex = null, e.splice(s2, 1), this.updateGlobalState());
971
944
  },
972
945
  moveToTop(t) {
973
- const e = s2.findIndex((n) => n.id === t.id);
974
- e >= 0 && (s2.splice(e, 1), this.add(t));
946
+ const s2 = e.findIndex((n) => n.id === t.id);
947
+ s2 >= 0 && (e.splice(s2, 1), this.add(t));
975
948
  }
976
949
  };
977
950
  }
978
951
  var u, h;
979
- let J$1 = class J extends O {
952
+ let Q$1 = class Q extends A {
980
953
  constructor(t) {
981
954
  super();
982
- v(this, u, void 0);
983
- v(this, h, void 0);
984
- this.defaults = _$1, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new A2(), this.stack = q(this.settings), b(this, u, G.bind(this)), b(this, h, K$1.bind(this)), this.settings.autoMount && this.mount();
955
+ v(this, u);
956
+ v(this, h);
957
+ this.defaults = K$1, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new P(), this.stack = J$1(this.settings), b(this, u, V$1.bind(this)), b(this, h, q3.bind(this)), this.settings.autoMount && this.mount();
985
958
  }
986
959
  get active() {
987
960
  return this.stack.top;
988
961
  }
989
962
  async mount(t) {
990
963
  t && (this.settings = { ...this.settings, ...t });
991
- const e = document.querySelectorAll(this.settings.selectorModal);
992
- return await this.registerCollection(e), this.settings.eventListeners && this.mountEventListeners(), this;
964
+ const s2 = document.querySelectorAll(this.settings.selectorModal);
965
+ return await this.registerCollection(s2), this.settings.eventListeners && this.mountEventListeners(), this;
993
966
  }
994
967
  async unmount() {
995
968
  return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
@@ -1000,39 +973,35 @@ let J$1 = class J extends O {
1000
973
  unmountEventListeners() {
1001
974
  document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
1002
975
  }
1003
- register(t, e = {}) {
976
+ register(t, s2 = {}) {
1004
977
  let n = typeof t == "string" ? document.getElementById(t) : t;
1005
- return n ? V$1.call(this, n, e) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${t.id || t}".`));
978
+ return n ? B$1.call(this, n, s2) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${t.id || t}".`));
1006
979
  }
1007
980
  deregister(t) {
1008
- let e = this.get(t.id || t);
1009
- return e ? E.call(this, e) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${t.id || t}".`));
981
+ let s2 = this.get(t.id || t);
982
+ return s2 ? E.call(this, s2) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${t.id || t}".`));
1010
983
  }
1011
- open(t, e, n) {
1012
- return x.call(this, t, e, n);
984
+ open(t, s2, n) {
985
+ return x.call(this, t, s2, n);
1013
986
  }
1014
- close(t, e, n) {
1015
- return C.call(this, t, e, n);
987
+ close(t, s2, n) {
988
+ return C.call(this, t, s2, n);
1016
989
  }
1017
- replace(t, e, n) {
1018
- return k$1.call(this, t, e, n);
990
+ replace(t, s2, n) {
991
+ return M$1.call(this, t, s2, n);
1019
992
  }
1020
- async closeAll(t = false, e, n = true) {
1021
- const r = await $.call(this, t, e);
993
+ async closeAll(t = false, s2, n = true) {
994
+ const r = await $.call(this, t, s2);
1022
995
  return n && p.call(this), r;
1023
996
  }
1024
997
  };
1025
998
  u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1026
- var Ue = (e, t, r) => {
1027
- if (!t.has(e))
1028
- throw TypeError("Cannot " + r);
999
+ var Ue = (e) => {
1000
+ throw TypeError(e);
1029
1001
  };
1030
- var Ae = (e, t, r) => (Ue(e, t, "read from private field"), r ? r.call(e) : t.get(e)), _e = (e, t, r) => {
1031
- if (t.has(e))
1032
- throw TypeError("Cannot add the same private member more than once");
1033
- t instanceof WeakSet ? t.add(e) : t.set(e, r);
1034
- }, Ke = (e, t, r, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
1035
- class $t {
1002
+ var _e = (e, t, r) => t.has(e) || Ue("Cannot " + r);
1003
+ var Ae = (e, t, r) => (_e(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ke = (e, t, r) => t.has(e) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Ge = (e, t, r, i) => (_e(e, t, "write to private field"), t.set(e, r), r);
1004
+ class Ct {
1036
1005
  constructor() {
1037
1006
  this.collection = [];
1038
1007
  }
@@ -1063,10 +1032,10 @@ class $t {
1063
1032
  return this.collection.find((i) => i[r] === t);
1064
1033
  }
1065
1034
  }
1066
- function Ct() {
1035
+ function kt() {
1067
1036
  return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
1068
1037
  }
1069
- const kt = {
1038
+ const Dt = {
1070
1039
  autoMount: false,
1071
1040
  // Selectors
1072
1041
  selectorPopover: ".popover",
@@ -1078,7 +1047,7 @@ const kt = {
1078
1047
  eventType: "click",
1079
1048
  placement: "bottom"
1080
1049
  };
1081
- function ot(e, t) {
1050
+ function at(e, t) {
1082
1051
  const r = getComputedStyle(e), i = {
1083
1052
  placement: t.placement,
1084
1053
  event: t.eventType,
@@ -1089,7 +1058,7 @@ function ot(e, t) {
1089
1058
  "arrow-padding": 0
1090
1059
  };
1091
1060
  for (const n in i) {
1092
- const o2 = Ct(), l2 = r.getPropertyValue(`--${o2}popover-${n}`).trim();
1061
+ const o2 = kt(), l2 = r.getPropertyValue(`--${o2}popover-${n}`).trim();
1093
1062
  l2 && (i[n] = l2);
1094
1063
  }
1095
1064
  return i;
@@ -1133,7 +1102,7 @@ function Pe(e) {
1133
1102
  }
1134
1103
  return t;
1135
1104
  }
1136
- function Dt(e) {
1105
+ function Rt(e) {
1137
1106
  return [{
1138
1107
  name: "offset",
1139
1108
  options: {
@@ -1157,17 +1126,17 @@ function Dt(e) {
1157
1126
  }
1158
1127
  }];
1159
1128
  }
1160
- function at(e) {
1129
+ function st(e) {
1161
1130
  const t = typeof e == "string" ? this.get(e) : this.get(e.id);
1162
1131
  if (t)
1163
1132
  return t;
1164
1133
  throw new Error(`Popover not found in collection with id of "${e}".`);
1165
1134
  }
1166
- function Rt(e) {
1135
+ function Bt(e) {
1167
1136
  return typeof e == "string" ? e : typeof e.hasAttribute == "function" ? e.closest(this.settings.selectorPopover) ? (e = e.closest(this.settings.selectorPopover), e.id) : e.hasAttribute("aria-controls") ? e.getAttribute("aria-controls") : e.hasAttribute("aria-describedby") ? e.getAttribute("aria-describedby") : false : false;
1168
1137
  }
1169
- function Bt(e) {
1170
- const t = Rt.call(this, e);
1138
+ function Tt(e) {
1139
+ const t = Bt.call(this, e);
1171
1140
  if (t) {
1172
1141
  const r = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1173
1142
  return !i && !r ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i ? r ? { popover: r, trigger: i } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
@@ -1175,18 +1144,18 @@ function Bt(e) {
1175
1144
  return { error: new Error("Could not resolve the popover ID.") };
1176
1145
  }
1177
1146
  async function ke(e) {
1178
- const t = e ? at.call(this, e) : await st2.call(this);
1147
+ const t = e ? st.call(this, e) : await ct.call(this);
1179
1148
  return t && t.state === "opened" && (t.el.classList.remove(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "false"), t.popper.setOptions({
1180
1149
  modifiers: [{ name: "eventListeners", enabled: false }]
1181
1150
  }), t.state = "closed", t.trigger === this.trigger && (this.trigger = null)), t;
1182
1151
  }
1183
- async function st2() {
1152
+ async function ct() {
1184
1153
  const e = [];
1185
1154
  return await Promise.all(this.collection.map(async (t) => {
1186
1155
  t.state === "opened" && e.push(await ke.call(this, t));
1187
1156
  })), e;
1188
1157
  }
1189
- function ct(e) {
1158
+ function lt(e) {
1190
1159
  e.state == "opened" && setTimeout(() => {
1191
1160
  const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r = document.activeElement.closest(
1192
1161
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
@@ -1194,24 +1163,24 @@ function ct(e) {
1194
1163
  return !t && !r && e.close(), e;
1195
1164
  }, 1);
1196
1165
  }
1197
- function Tt(e) {
1198
- e.state === "opened" ? e.close() : (this.trigger = e.trigger, e.open(), lt.call(this, e));
1199
- }
1200
1166
  function St(e) {
1167
+ e.state === "opened" ? e.close() : (this.trigger = e.trigger, e.open(), ft.call(this, e));
1168
+ }
1169
+ function Mt(e) {
1201
1170
  switch (e.key) {
1202
1171
  case "Escape":
1203
- this.trigger && this.trigger.focus(), st2.call(this);
1172
+ this.trigger && this.trigger.focus(), ct.call(this);
1204
1173
  return;
1205
1174
  case "Tab":
1206
1175
  this.collection.forEach((t) => {
1207
- ct.call(this, t);
1176
+ lt.call(this, t);
1208
1177
  });
1209
1178
  return;
1210
1179
  default:
1211
1180
  return;
1212
1181
  }
1213
1182
  }
1214
- function lt(e) {
1183
+ function ft(e) {
1215
1184
  const t = this;
1216
1185
  document.addEventListener("click", function r(i) {
1217
1186
  i.target.closest(
@@ -1219,15 +1188,15 @@ function lt(e) {
1219
1188
  ) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r));
1220
1189
  });
1221
1190
  }
1222
- var k = "top", S2 = "bottom", M = "right", D = "left", De = "auto", le = [k, S2, M, D], Q = "start", se = "end", Mt = "clippingParents", ft = "viewport", ne = "popper", jt = "reference", Ge = /* @__PURE__ */ le.reduce(function(e, t) {
1223
- return e.concat([t + "-" + Q, t + "-" + se]);
1224
- }, []), ut = /* @__PURE__ */ [].concat(le, [De]).reduce(function(e, t) {
1225
- return e.concat([t, t + "-" + Q, t + "-" + se]);
1226
- }, []), Wt = "beforeRead", Ht = "read", Nt = "afterRead", Vt = "beforeMain", It = "main", Ft = "afterMain", Xt = "beforeWrite", Yt = "write", qt = "afterWrite", zt = [Wt, Ht, Nt, Vt, It, Ft, Xt, Yt, qt];
1191
+ var k = "top", S2 = "bottom", M = "right", D = "left", De = "auto", le = [k, S2, M, D], Q2 = "start", se = "end", jt = "clippingParents", ut = "viewport", ne = "popper", Wt = "reference", Je = /* @__PURE__ */ le.reduce(function(e, t) {
1192
+ return e.concat([t + "-" + Q2, t + "-" + se]);
1193
+ }, []), pt = /* @__PURE__ */ [].concat(le, [De]).reduce(function(e, t) {
1194
+ return e.concat([t, t + "-" + Q2, t + "-" + se]);
1195
+ }, []), Ht = "beforeRead", Nt = "read", Vt = "afterRead", It = "beforeMain", Ft = "main", Xt = "afterMain", Yt = "beforeWrite", qt = "write", zt = "afterWrite", Ut = [Ht, Nt, Vt, It, Ft, Xt, Yt, qt, zt];
1227
1196
  function N(e) {
1228
1197
  return e ? (e.nodeName || "").toLowerCase() : null;
1229
1198
  }
1230
- function B(e) {
1199
+ function B2(e) {
1231
1200
  if (e == null)
1232
1201
  return window;
1233
1202
  if (e.toString() !== "[object Window]") {
@@ -1237,20 +1206,20 @@ function B(e) {
1237
1206
  return e;
1238
1207
  }
1239
1208
  function K(e) {
1240
- var t = B(e).Element;
1209
+ var t = B2(e).Element;
1241
1210
  return e instanceof t || e instanceof Element;
1242
1211
  }
1243
1212
  function T(e) {
1244
- var t = B(e).HTMLElement;
1213
+ var t = B2(e).HTMLElement;
1245
1214
  return e instanceof t || e instanceof HTMLElement;
1246
1215
  }
1247
1216
  function Re(e) {
1248
1217
  if (typeof ShadowRoot > "u")
1249
1218
  return false;
1250
- var t = B(e).ShadowRoot;
1219
+ var t = B2(e).ShadowRoot;
1251
1220
  return e instanceof t || e instanceof ShadowRoot;
1252
1221
  }
1253
- function Ut(e) {
1222
+ function _t(e) {
1254
1223
  var t = e.state;
1255
1224
  Object.keys(t.elements).forEach(function(r) {
1256
1225
  var i = t.styles[r] || {}, n = t.attributes[r] || {}, o2 = t.elements[r];
@@ -1260,7 +1229,7 @@ function Ut(e) {
1260
1229
  }));
1261
1230
  });
1262
1231
  }
1263
- function _t(e) {
1232
+ function Kt(e) {
1264
1233
  var t = e.state, r = {
1265
1234
  popper: {
1266
1235
  position: t.options.strategy,
@@ -1284,12 +1253,12 @@ function _t(e) {
1284
1253
  });
1285
1254
  };
1286
1255
  }
1287
- const Kt = {
1256
+ const Gt = {
1288
1257
  name: "applyStyles",
1289
1258
  enabled: true,
1290
1259
  phase: "write",
1291
- fn: Ut,
1292
- effect: _t,
1260
+ fn: _t,
1261
+ effect: Kt,
1293
1262
  requires: ["computeStyles"]
1294
1263
  };
1295
1264
  function H(e) {
@@ -1302,14 +1271,14 @@ function Le() {
1302
1271
  return t.brand + "/" + t.version;
1303
1272
  }).join(" ") : navigator.userAgent;
1304
1273
  }
1305
- function pt() {
1274
+ function dt() {
1306
1275
  return !/^((?!chrome|android).)*safari/i.test(Le());
1307
1276
  }
1308
1277
  function ee(e, t, r) {
1309
1278
  t === void 0 && (t = false), r === void 0 && (r = false);
1310
1279
  var i = e.getBoundingClientRect(), n = 1, o2 = 1;
1311
1280
  t && T(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
1312
- var l2 = K(e) ? B(e) : window, s2 = l2.visualViewport, a2 = !pt() && r, 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;
1281
+ var l2 = K(e) ? B2(e) : window, s2 = l2.visualViewport, a2 = !dt() && r, 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;
1313
1282
  return {
1314
1283
  width: h2,
1315
1284
  height: y2,
@@ -1330,7 +1299,7 @@ function Be(e) {
1330
1299
  height: i
1331
1300
  };
1332
1301
  }
1333
- function dt(e, t) {
1302
+ function vt(e, t) {
1334
1303
  var r = t.getRootNode && t.getRootNode();
1335
1304
  if (e.contains(t))
1336
1305
  return true;
@@ -1345,9 +1314,9 @@ function dt(e, t) {
1345
1314
  return false;
1346
1315
  }
1347
1316
  function V(e) {
1348
- return B(e).getComputedStyle(e);
1317
+ return B2(e).getComputedStyle(e);
1349
1318
  }
1350
- function Gt(e) {
1319
+ function Jt(e) {
1351
1320
  return ["table", "td", "th"].indexOf(N(e)) >= 0;
1352
1321
  }
1353
1322
  function F(e) {
@@ -1368,11 +1337,11 @@ function we(e) {
1368
1337
  F(e)
1369
1338
  );
1370
1339
  }
1371
- function Je(e) {
1340
+ function Qe(e) {
1372
1341
  return !T(e) || // https://github.com/popperjs/popper-core/issues/837
1373
1342
  V(e).position === "fixed" ? null : e.offsetParent;
1374
1343
  }
1375
- function Jt(e) {
1344
+ function Qt(e) {
1376
1345
  var t = /firefox/i.test(Le()), r = /Trident/i.test(Le());
1377
1346
  if (r && T(e)) {
1378
1347
  var i = V(e);
@@ -1389,9 +1358,9 @@ function Jt(e) {
1389
1358
  return null;
1390
1359
  }
1391
1360
  function fe(e) {
1392
- for (var t = B(e), r = Je(e); r && Gt(r) && V(r).position === "static"; )
1393
- r = Je(r);
1394
- return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r || Jt(e) || t;
1361
+ for (var t = B2(e), r = Qe(e); r && Jt(r) && V(r).position === "static"; )
1362
+ r = Qe(r);
1363
+ return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r || Qt(e) || t;
1395
1364
  }
1396
1365
  function Te(e) {
1397
1366
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
@@ -1399,11 +1368,11 @@ function Te(e) {
1399
1368
  function oe(e, t, r) {
1400
1369
  return _(e, ye(t, r));
1401
1370
  }
1402
- function Qt(e, t, r) {
1371
+ function Zt(e, t, r) {
1403
1372
  var i = oe(e, t, r);
1404
1373
  return i > r ? r : i;
1405
1374
  }
1406
- function vt() {
1375
+ function ht() {
1407
1376
  return {
1408
1377
  top: 0,
1409
1378
  right: 0,
@@ -1411,56 +1380,56 @@ function vt() {
1411
1380
  left: 0
1412
1381
  };
1413
1382
  }
1414
- function ht(e) {
1415
- return Object.assign({}, vt(), e);
1383
+ function gt(e) {
1384
+ return Object.assign({}, ht(), e);
1416
1385
  }
1417
- function gt(e, t) {
1386
+ function mt(e, t) {
1418
1387
  return t.reduce(function(r, i) {
1419
1388
  return r[i] = e, r;
1420
1389
  }, {});
1421
1390
  }
1422
- var Zt = function(t, r) {
1391
+ var er = function(t, r) {
1423
1392
  return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
1424
1393
  placement: r.placement
1425
- })) : t, ht(typeof t != "number" ? t : gt(t, le));
1394
+ })) : t, gt(typeof t != "number" ? t : mt(t, le));
1426
1395
  };
1427
- function er(e) {
1396
+ function tr(e) {
1428
1397
  var t, r = e.state, i = e.name, n = e.options, o2 = r.elements.arrow, l2 = r.modifiersData.popperOffsets, s2 = H(r.placement), a2 = Te(s2), f2 = [D, M].indexOf(s2) >= 0, c2 = f2 ? "height" : "width";
1429
1398
  if (!(!o2 || !l2)) {
1430
- var h2 = Zt(n.padding, r), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S2 : M, v2 = r.rects.reference[c2] + r.rects.reference[a2] - l2[a2] - r.rects.popper[c2], d2 = l2[a2] - r.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), L3 = a2;
1399
+ var h2 = er(n.padding, r), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S2 : M, v2 = r.rects.reference[c2] + r.rects.reference[a2] - l2[a2] - r.rects.popper[c2], d2 = l2[a2] - r.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), L3 = a2;
1431
1400
  r.modifiersData[i] = (t = {}, t[L3] = x2, t.centerOffset = x2 - m2, t);
1432
1401
  }
1433
1402
  }
1434
- function tr(e) {
1403
+ function rr(e) {
1435
1404
  var t = e.state, r = e.options, i = r.element, n = i === void 0 ? "[data-popper-arrow]" : i;
1436
- n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || dt(t.elements.popper, n) && (t.elements.arrow = n));
1405
+ n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || vt(t.elements.popper, n) && (t.elements.arrow = n));
1437
1406
  }
1438
- const rr = {
1407
+ const ir = {
1439
1408
  name: "arrow",
1440
1409
  enabled: true,
1441
1410
  phase: "main",
1442
- fn: er,
1443
- effect: tr,
1411
+ fn: tr,
1412
+ effect: rr,
1444
1413
  requires: ["popperOffsets"],
1445
1414
  requiresIfExists: ["preventOverflow"]
1446
1415
  };
1447
1416
  function te(e) {
1448
1417
  return e.split("-")[1];
1449
1418
  }
1450
- var ir = {
1419
+ var nr = {
1451
1420
  top: "auto",
1452
1421
  right: "auto",
1453
1422
  bottom: "auto",
1454
1423
  left: "auto"
1455
1424
  };
1456
- function nr(e, t) {
1425
+ function or(e, t) {
1457
1426
  var r = e.x, i = e.y, n = t.devicePixelRatio || 1;
1458
1427
  return {
1459
1428
  x: Z(r * n) / n || 0,
1460
1429
  y: Z(i * n) / n || 0
1461
1430
  };
1462
1431
  }
1463
- function Qe(e) {
1432
+ function Ze(e) {
1464
1433
  var t, r = 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({
1465
1434
  x: u2,
1466
1435
  y: v2
@@ -1472,29 +1441,29 @@ function Qe(e) {
1472
1441
  var w2 = l2.hasOwnProperty("x"), O2 = l2.hasOwnProperty("y"), E2 = D, p2 = k, g2 = window;
1473
1442
  if (f2) {
1474
1443
  var m2 = fe(r), x2 = "clientHeight", L3 = "clientWidth";
1475
- if (m2 === B(r) && (m2 = F(r), V(m2).position !== "static" && s2 === "absolute" && (x2 = "scrollHeight", L3 = "scrollWidth")), m2 = m2, n === k || (n === D || n === M) && o2 === se) {
1444
+ if (m2 === B2(r) && (m2 = F(r), V(m2).position !== "static" && s2 === "absolute" && (x2 = "scrollHeight", L3 = "scrollWidth")), m2 = m2, n === k || (n === D || n === M) && o2 === se) {
1476
1445
  p2 = S2;
1477
- var P3 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.height : (
1446
+ var P2 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.height : (
1478
1447
  // $FlowFixMe[prop-missing]
1479
1448
  m2[x2]
1480
1449
  );
1481
- v2 -= P3 - i.height, v2 *= a2 ? 1 : -1;
1450
+ v2 -= P2 - i.height, v2 *= a2 ? 1 : -1;
1482
1451
  }
1483
1452
  if (n === D || (n === k || n === S2) && o2 === se) {
1484
1453
  E2 = M;
1485
- var A3 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.width : (
1454
+ var A2 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.width : (
1486
1455
  // $FlowFixMe[prop-missing]
1487
1456
  m2[L3]
1488
1457
  );
1489
- u2 -= A3 - i.width, u2 *= a2 ? 1 : -1;
1458
+ u2 -= A2 - i.width, u2 *= a2 ? 1 : -1;
1490
1459
  }
1491
1460
  }
1492
1461
  var $2 = Object.assign({
1493
1462
  position: s2
1494
- }, f2 && ir), j3 = c2 === true ? nr({
1463
+ }, f2 && nr), j3 = c2 === true ? or({
1495
1464
  x: u2,
1496
1465
  y: v2
1497
- }, B(r)) : {
1466
+ }, B2(r)) : {
1498
1467
  x: u2,
1499
1468
  y: v2
1500
1469
  };
@@ -1504,7 +1473,7 @@ function Qe(e) {
1504
1473
  }
1505
1474
  return Object.assign({}, $2, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
1506
1475
  }
1507
- function or(e) {
1476
+ function ar(e) {
1508
1477
  var t = e.state, r = e.options, i = r.gpuAcceleration, n = i === void 0 ? true : i, o2 = r.adaptive, l2 = o2 === void 0 ? true : o2, s2 = r.roundOffsets, a2 = s2 === void 0 ? true : s2, f2 = {
1509
1478
  placement: H(t.placement),
1510
1479
  variation: te(t.placement),
@@ -1513,12 +1482,12 @@ function or(e) {
1513
1482
  gpuAcceleration: n,
1514
1483
  isFixed: t.options.strategy === "fixed"
1515
1484
  };
1516
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Qe(Object.assign({}, f2, {
1485
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ze(Object.assign({}, f2, {
1517
1486
  offsets: t.modifiersData.popperOffsets,
1518
1487
  position: t.options.strategy,
1519
1488
  adaptive: l2,
1520
1489
  roundOffsets: a2
1521
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Qe(Object.assign({}, f2, {
1490
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ze(Object.assign({}, f2, {
1522
1491
  offsets: t.modifiersData.arrow,
1523
1492
  position: "absolute",
1524
1493
  adaptive: false,
@@ -1527,18 +1496,18 @@ function or(e) {
1527
1496
  "data-popper-placement": t.placement
1528
1497
  });
1529
1498
  }
1530
- const ar = {
1499
+ const sr = {
1531
1500
  name: "computeStyles",
1532
1501
  enabled: true,
1533
1502
  phase: "beforeWrite",
1534
- fn: or,
1503
+ fn: ar,
1535
1504
  data: {}
1536
1505
  };
1537
1506
  var ge = {
1538
1507
  passive: true
1539
1508
  };
1540
- function sr(e) {
1541
- var t = e.state, r = 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);
1509
+ function cr(e) {
1510
+ var t = e.state, r = 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);
1542
1511
  return o2 && f2.forEach(function(c2) {
1543
1512
  c2.addEventListener("scroll", r.update, ge);
1544
1513
  }), s2 && a2.addEventListener("resize", r.update, ge), function() {
@@ -1547,16 +1516,16 @@ function sr(e) {
1547
1516
  }), s2 && a2.removeEventListener("resize", r.update, ge);
1548
1517
  };
1549
1518
  }
1550
- const cr = {
1519
+ const lr = {
1551
1520
  name: "eventListeners",
1552
1521
  enabled: true,
1553
1522
  phase: "write",
1554
1523
  fn: function() {
1555
1524
  },
1556
- effect: sr,
1525
+ effect: cr,
1557
1526
  data: {}
1558
1527
  };
1559
- var lr = {
1528
+ var fr = {
1560
1529
  left: "right",
1561
1530
  right: "left",
1562
1531
  bottom: "top",
@@ -1564,20 +1533,20 @@ var lr = {
1564
1533
  };
1565
1534
  function me(e) {
1566
1535
  return e.replace(/left|right|bottom|top/g, function(t) {
1567
- return lr[t];
1536
+ return fr[t];
1568
1537
  });
1569
1538
  }
1570
- var fr = {
1539
+ var ur = {
1571
1540
  start: "end",
1572
1541
  end: "start"
1573
1542
  };
1574
- function Ze(e) {
1543
+ function et(e) {
1575
1544
  return e.replace(/start|end/g, function(t) {
1576
- return fr[t];
1545
+ return ur[t];
1577
1546
  });
1578
1547
  }
1579
1548
  function Se(e) {
1580
- var t = B(e), r = t.pageXOffset, i = t.pageYOffset;
1549
+ var t = B2(e), r = t.pageXOffset, i = t.pageYOffset;
1581
1550
  return {
1582
1551
  scrollLeft: r,
1583
1552
  scrollTop: i
@@ -1586,11 +1555,11 @@ function Se(e) {
1586
1555
  function Me(e) {
1587
1556
  return ee(F(e)).left + Se(e).scrollLeft;
1588
1557
  }
1589
- function ur(e, t) {
1590
- var r = B(e), i = F(e), n = r.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
1558
+ function pr(e, t) {
1559
+ var r = B2(e), i = F(e), n = r.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
1591
1560
  if (n) {
1592
1561
  o2 = n.width, l2 = n.height;
1593
- var f2 = pt();
1562
+ var f2 = dt();
1594
1563
  (f2 || !f2 && t === "fixed") && (s2 = n.offsetLeft, a2 = n.offsetTop);
1595
1564
  }
1596
1565
  return {
@@ -1600,7 +1569,7 @@ function ur(e, t) {
1600
1569
  y: a2
1601
1570
  };
1602
1571
  }
1603
- function pr(e) {
1572
+ function dr(e) {
1604
1573
  var t, r = F(e), i = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r.scrollWidth, r.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r.scrollHeight, r.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s2 = -i.scrollLeft + Me(e), a2 = -i.scrollTop;
1605
1574
  return V(n || r).direction === "rtl" && (s2 += _(r.clientWidth, n ? n.clientWidth : 0) - o2), {
1606
1575
  width: o2,
@@ -1613,13 +1582,13 @@ function je(e) {
1613
1582
  var t = V(e), r = t.overflow, i = t.overflowX, n = t.overflowY;
1614
1583
  return /auto|scroll|overlay|hidden/.test(r + n + i);
1615
1584
  }
1616
- function mt(e) {
1617
- return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && je(e) ? e : mt(we(e));
1585
+ function yt(e) {
1586
+ return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && je(e) ? e : yt(we(e));
1618
1587
  }
1619
1588
  function ae(e, t) {
1620
1589
  var r;
1621
1590
  t === void 0 && (t = []);
1622
- var i = mt(e), n = i === ((r = e.ownerDocument) == null ? void 0 : r.body), o2 = B(i), l2 = n ? [o2].concat(o2.visualViewport || [], je(i) ? i : []) : i, s2 = t.concat(l2);
1591
+ var i = yt(e), n = i === ((r = e.ownerDocument) == null ? void 0 : r.body), o2 = B2(i), l2 = n ? [o2].concat(o2.visualViewport || [], je(i) ? i : []) : i, s2 = t.concat(l2);
1623
1592
  return n ? s2 : (
1624
1593
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1625
1594
  s2.concat(ae(we(l2)))
@@ -1633,27 +1602,27 @@ function $e(e) {
1633
1602
  bottom: e.y + e.height
1634
1603
  });
1635
1604
  }
1636
- function dr(e, t) {
1605
+ function vr(e, t) {
1637
1606
  var r = ee(e, false, t === "fixed");
1638
1607
  return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
1639
1608
  }
1640
- function et(e, t, r) {
1641
- return t === ft ? $e(ur(e, r)) : K(t) ? dr(t, r) : $e(pr(F(e)));
1609
+ function tt(e, t, r) {
1610
+ return t === ut ? $e(pr(e, r)) : K(t) ? vr(t, r) : $e(dr(F(e)));
1642
1611
  }
1643
- function vr(e) {
1612
+ function hr(e) {
1644
1613
  var t = ae(we(e)), r = ["absolute", "fixed"].indexOf(V(e).position) >= 0, i = r && T(e) ? fe(e) : e;
1645
1614
  return K(i) ? t.filter(function(n) {
1646
- return K(n) && dt(n, i) && N(n) !== "body";
1615
+ return K(n) && vt(n, i) && N(n) !== "body";
1647
1616
  }) : [];
1648
1617
  }
1649
- function hr(e, t, r, i) {
1650
- var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1651
- var c2 = et(e, f2, i);
1618
+ function gr(e, t, r, i) {
1619
+ var n = t === "clippingParents" ? hr(e) : [].concat(t), o2 = [].concat(n, [r]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1620
+ var c2 = tt(e, f2, i);
1652
1621
  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;
1653
- }, et(e, l2, i));
1622
+ }, tt(e, l2, i));
1654
1623
  return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
1655
1624
  }
1656
- function yt(e) {
1625
+ function wt(e) {
1657
1626
  var t = e.reference, r = e.element, i = e.placement, n = i ? H(i) : null, o2 = i ? te(i) : null, l2 = t.x + t.width / 2 - r.width / 2, s2 = t.y + t.height / 2 - r.height / 2, a2;
1658
1627
  switch (n) {
1659
1628
  case k:
@@ -1690,7 +1659,7 @@ function yt(e) {
1690
1659
  if (f2 != null) {
1691
1660
  var c2 = f2 === "y" ? "height" : "width";
1692
1661
  switch (o2) {
1693
- case Q:
1662
+ case Q2:
1694
1663
  a2[f2] = a2[f2] - (t[c2] / 2 - r[c2] / 2);
1695
1664
  break;
1696
1665
  case se:
@@ -1702,29 +1671,29 @@ function yt(e) {
1702
1671
  }
1703
1672
  function ce(e, t) {
1704
1673
  t === void 0 && (t = {});
1705
- var r = t, i = r.placement, n = i === void 0 ? e.placement : i, o2 = r.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r.boundary, a2 = s2 === void 0 ? Mt : s2, f2 = r.rootBoundary, c2 = f2 === void 0 ? ft : f2, h2 = r.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r.padding, d2 = v2 === void 0 ? 0 : v2, w2 = ht(typeof d2 != "number" ? d2 : gt(d2, le)), O2 = y2 === ne ? jt : 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 = yt({
1674
+ var r = t, i = r.placement, n = i === void 0 ? e.placement : i, o2 = r.strategy, l2 = o2 === void 0 ? e.strategy : o2, s2 = r.boundary, a2 = s2 === void 0 ? jt : s2, f2 = r.rootBoundary, c2 = f2 === void 0 ? ut : f2, h2 = r.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r.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 = gr(K(p2) ? p2 : p2.contextElement || F(e.elements.popper), a2, c2, l2), m2 = ee(e.elements.reference), x2 = wt({
1706
1675
  reference: m2,
1707
1676
  element: E2,
1708
1677
  strategy: "absolute",
1709
1678
  placement: n
1710
- }), L3 = $e(Object.assign({}, E2, x2)), P3 = y2 === ne ? L3 : m2, A3 = {
1711
- top: g2.top - P3.top + w2.top,
1712
- bottom: P3.bottom - g2.bottom + w2.bottom,
1713
- left: g2.left - P3.left + w2.left,
1714
- right: P3.right - g2.right + w2.right
1679
+ }), L3 = $e(Object.assign({}, E2, x2)), P2 = y2 === ne ? L3 : m2, A2 = {
1680
+ top: g2.top - P2.top + w2.top,
1681
+ bottom: P2.bottom - g2.bottom + w2.bottom,
1682
+ left: g2.left - P2.left + w2.left,
1683
+ right: P2.right - g2.right + w2.right
1715
1684
  }, $2 = e.modifiersData.offset;
1716
1685
  if (y2 === ne && $2) {
1717
1686
  var j3 = $2[n];
1718
- Object.keys(A3).forEach(function(C2) {
1687
+ Object.keys(A2).forEach(function(C2) {
1719
1688
  var X2 = [M, S2].indexOf(C2) >= 0 ? 1 : -1, Y2 = [k, S2].indexOf(C2) >= 0 ? "y" : "x";
1720
- A3[C2] += j3[Y2] * X2;
1689
+ A2[C2] += j3[Y2] * X2;
1721
1690
  });
1722
1691
  }
1723
- return A3;
1692
+ return A2;
1724
1693
  }
1725
- function gr(e, t) {
1694
+ function mr(e, t) {
1726
1695
  t === void 0 && (t = {});
1727
- var r = t, i = r.placement, n = r.boundary, o2 = r.rootBoundary, l2 = r.padding, s2 = r.flipVariations, a2 = r.allowedAutoPlacements, f2 = a2 === void 0 ? ut : a2, c2 = te(i), h2 = c2 ? s2 ? Ge : Ge.filter(function(b2) {
1696
+ var r = t, i = r.placement, n = r.boundary, o2 = r.rootBoundary, l2 = r.padding, s2 = r.flipVariations, a2 = r.allowedAutoPlacements, f2 = a2 === void 0 ? pt : a2, c2 = te(i), h2 = c2 ? s2 ? Je : Je.filter(function(b2) {
1728
1697
  return te(b2) === c2;
1729
1698
  }) : le, y2 = h2.filter(function(b2) {
1730
1699
  return f2.indexOf(b2) >= 0;
@@ -1742,26 +1711,26 @@ function gr(e, t) {
1742
1711
  return u2[b2] - u2[v2];
1743
1712
  });
1744
1713
  }
1745
- function mr(e) {
1714
+ function yr(e) {
1746
1715
  if (H(e) === De)
1747
1716
  return [];
1748
1717
  var t = me(e);
1749
- return [Ze(e), t, Ze(t)];
1718
+ return [et(e), t, et(t)];
1750
1719
  }
1751
- function yr(e) {
1720
+ function wr(e) {
1752
1721
  var t = e.state, r = e.options, i = e.name;
1753
1722
  if (!t.modifiersData[i]._skip) {
1754
- for (var n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r.fallbackPlacements, f2 = r.padding, c2 = r.boundary, h2 = r.rootBoundary, y2 = r.altBoundary, u2 = r.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r.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, I3) {
1755
- return G2.concat(H(I3) === De ? gr(t, {
1756
- placement: I3,
1723
+ for (var n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? true : l2, a2 = r.fallbackPlacements, f2 = r.padding, c2 = r.boundary, h2 = r.rootBoundary, y2 = r.altBoundary, u2 = r.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : yr(d2)), p2 = [d2].concat(E2).reduce(function(G2, I2) {
1724
+ return G2.concat(H(I2) === De ? mr(t, {
1725
+ placement: I2,
1757
1726
  boundary: c2,
1758
1727
  rootBoundary: h2,
1759
1728
  padding: f2,
1760
1729
  flipVariations: b2,
1761
1730
  allowedAutoPlacements: v2
1762
- }) : I3);
1763
- }, []), g2 = t.rects.reference, m2 = t.rects.popper, x2 = /* @__PURE__ */ new Map(), L3 = true, P3 = p2[0], A3 = 0; A3 < p2.length; A3++) {
1764
- var $2 = p2[A3], j3 = H($2), C2 = te($2) === Q, X2 = [k, S2].indexOf(j3) >= 0, Y2 = X2 ? "width" : "height", R2 = ce(t, {
1731
+ }) : I2);
1732
+ }, []), g2 = t.rects.reference, m2 = t.rects.popper, x2 = /* @__PURE__ */ new Map(), L3 = true, P2 = p2[0], A2 = 0; A2 < p2.length; A2++) {
1733
+ var $2 = p2[A2], j3 = H($2), C2 = te($2) === Q2, X2 = [k, S2].indexOf(j3) >= 0, Y2 = X2 ? "width" : "height", R2 = ce(t, {
1765
1734
  placement: $2,
1766
1735
  boundary: c2,
1767
1736
  rootBoundary: h2,
@@ -1769,45 +1738,44 @@ function yr(e) {
1769
1738
  padding: f2
1770
1739
  }), W2 = X2 ? C2 ? M : D : C2 ? S2 : k;
1771
1740
  g2[Y2] > m2[Y2] && (W2 = me(W2));
1772
- var ue = me(W2), q2 = [];
1773
- if (o2 && q2.push(R2[j3] <= 0), s2 && q2.push(R2[W2] <= 0, R2[ue] <= 0), q2.every(function(G2) {
1741
+ var ue = me(W2), q4 = [];
1742
+ if (o2 && q4.push(R2[j3] <= 0), s2 && q4.push(R2[W2] <= 0, R2[ue] <= 0), q4.every(function(G2) {
1774
1743
  return G2;
1775
1744
  })) {
1776
- P3 = $2, L3 = false;
1745
+ P2 = $2, L3 = false;
1777
1746
  break;
1778
1747
  }
1779
- x2.set($2, q2);
1748
+ x2.set($2, q4);
1780
1749
  }
1781
1750
  if (L3)
1782
- for (var pe = b2 ? 3 : 1, be = function(I3) {
1751
+ for (var pe = b2 ? 3 : 1, be = function(I2) {
1783
1752
  var ie = p2.find(function(ve) {
1784
1753
  var z2 = x2.get(ve);
1785
1754
  if (z2)
1786
- return z2.slice(0, I3).every(function(xe) {
1755
+ return z2.slice(0, I2).every(function(xe) {
1787
1756
  return xe;
1788
1757
  });
1789
1758
  });
1790
1759
  if (ie)
1791
- return P3 = ie, "break";
1760
+ return P2 = ie, "break";
1792
1761
  }, re = pe; re > 0; re--) {
1793
1762
  var de = be(re);
1794
- if (de === "break")
1795
- break;
1763
+ if (de === "break") break;
1796
1764
  }
1797
- t.placement !== P3 && (t.modifiersData[i]._skip = true, t.placement = P3, t.reset = true);
1765
+ t.placement !== P2 && (t.modifiersData[i]._skip = true, t.placement = P2, t.reset = true);
1798
1766
  }
1799
1767
  }
1800
- const wr = {
1768
+ const br = {
1801
1769
  name: "flip",
1802
1770
  enabled: true,
1803
1771
  phase: "main",
1804
- fn: yr,
1772
+ fn: wr,
1805
1773
  requiresIfExists: ["offset"],
1806
1774
  data: {
1807
1775
  _skip: false
1808
1776
  }
1809
1777
  };
1810
- function tt(e, t, r) {
1778
+ function rt(e, t, r) {
1811
1779
  return r === void 0 && (r = {
1812
1780
  x: 0,
1813
1781
  y: 0
@@ -1818,17 +1786,17 @@ function tt(e, t, r) {
1818
1786
  left: e.left - t.width - r.x
1819
1787
  };
1820
1788
  }
1821
- function rt(e) {
1789
+ function it(e) {
1822
1790
  return [k, M, S2, D].some(function(t) {
1823
1791
  return e[t] >= 0;
1824
1792
  });
1825
1793
  }
1826
- function br(e) {
1794
+ function xr(e) {
1827
1795
  var t = e.state, r = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1828
1796
  elementContext: "reference"
1829
1797
  }), s2 = ce(t, {
1830
1798
  altBoundary: true
1831
- }), a2 = tt(l2, i), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1799
+ }), a2 = rt(l2, i), f2 = rt(s2, n, o2), c2 = it(a2), h2 = it(f2);
1832
1800
  t.modifiersData[r] = {
1833
1801
  referenceClippingOffsets: a2,
1834
1802
  popperEscapeOffsets: f2,
@@ -1839,14 +1807,14 @@ function br(e) {
1839
1807
  "data-popper-escaped": h2
1840
1808
  });
1841
1809
  }
1842
- const xr = {
1810
+ const Or = {
1843
1811
  name: "hide",
1844
1812
  enabled: true,
1845
1813
  phase: "main",
1846
1814
  requiresIfExists: ["preventOverflow"],
1847
- fn: br
1815
+ fn: xr
1848
1816
  };
1849
- function Or(e, t, r) {
1817
+ function Er(e, t, r) {
1850
1818
  var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r == "function" ? r(Object.assign({}, t, {
1851
1819
  placement: e
1852
1820
  })) : r, l2 = o2[0], s2 = o2[1];
@@ -1858,94 +1826,94 @@ function Or(e, t, r) {
1858
1826
  y: s2
1859
1827
  };
1860
1828
  }
1861
- function Er(e) {
1862
- var t = e.state, r = e.options, i = e.name, n = r.offset, o2 = n === void 0 ? [0, 0] : n, l2 = ut.reduce(function(c2, h2) {
1863
- return c2[h2] = Or(h2, t.rects, o2), c2;
1829
+ function Ar(e) {
1830
+ var t = e.state, r = e.options, i = e.name, n = r.offset, o2 = n === void 0 ? [0, 0] : n, l2 = pt.reduce(function(c2, h2) {
1831
+ return c2[h2] = Er(h2, t.rects, o2), c2;
1864
1832
  }, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
1865
1833
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
1866
1834
  }
1867
- const Ar = {
1835
+ const Pr = {
1868
1836
  name: "offset",
1869
1837
  enabled: true,
1870
1838
  phase: "main",
1871
1839
  requires: ["popperOffsets"],
1872
- fn: Er
1840
+ fn: Ar
1873
1841
  };
1874
- function Pr(e) {
1842
+ function Lr(e) {
1875
1843
  var t = e.state, r = e.name;
1876
- t.modifiersData[r] = yt({
1844
+ t.modifiersData[r] = wt({
1877
1845
  reference: t.rects.reference,
1878
1846
  element: t.rects.popper,
1879
1847
  strategy: "absolute",
1880
1848
  placement: t.placement
1881
1849
  });
1882
1850
  }
1883
- const Lr = {
1851
+ const $r = {
1884
1852
  name: "popperOffsets",
1885
1853
  enabled: true,
1886
1854
  phase: "read",
1887
- fn: Pr,
1855
+ fn: Lr,
1888
1856
  data: {}
1889
1857
  };
1890
- function $r(e) {
1858
+ function Cr(e) {
1891
1859
  return e === "x" ? "y" : "x";
1892
1860
  }
1893
- function Cr(e) {
1861
+ function kr(e) {
1894
1862
  var t = e.state, r = e.options, i = e.name, n = r.mainAxis, o2 = n === void 0 ? true : n, l2 = r.altAxis, s2 = l2 === void 0 ? false : l2, a2 = r.boundary, f2 = r.rootBoundary, c2 = r.altBoundary, h2 = r.padding, y2 = r.tether, u2 = y2 === void 0 ? true : y2, b2 = r.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
1895
1863
  boundary: a2,
1896
1864
  rootBoundary: f2,
1897
1865
  padding: h2,
1898
1866
  altBoundary: c2
1899
- }), w2 = H(t.placement), O2 = te(t.placement), E2 = !O2, p2 = Te(w2), g2 = $r(p2), m2 = t.modifiersData.popperOffsets, x2 = t.rects.reference, L3 = t.rects.popper, P3 = typeof v2 == "function" ? v2(Object.assign({}, t.rects, {
1867
+ }), w2 = H(t.placement), O2 = te(t.placement), E2 = !O2, p2 = Te(w2), g2 = Cr(p2), m2 = t.modifiersData.popperOffsets, x2 = t.rects.reference, L3 = t.rects.popper, P2 = typeof v2 == "function" ? v2(Object.assign({}, t.rects, {
1900
1868
  placement: t.placement
1901
- })) : v2, A3 = typeof P3 == "number" ? {
1902
- mainAxis: P3,
1903
- altAxis: P3
1869
+ })) : v2, A2 = typeof P2 == "number" ? {
1870
+ mainAxis: P2,
1871
+ altAxis: P2
1904
1872
  } : Object.assign({
1905
1873
  mainAxis: 0,
1906
1874
  altAxis: 0
1907
- }, P3), $2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j3 = {
1875
+ }, P2), $2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j3 = {
1908
1876
  x: 0,
1909
1877
  y: 0
1910
1878
  };
1911
1879
  if (m2) {
1912
1880
  if (o2) {
1913
- var C2, X2 = p2 === "y" ? k : D, Y2 = p2 === "y" ? S2 : M, R2 = p2 === "y" ? "height" : "width", W2 = m2[p2], ue = W2 + d2[X2], q2 = W2 - d2[Y2], pe = u2 ? -L3[R2] / 2 : 0, be = O2 === Q ? x2[R2] : L3[R2], re = O2 === Q ? -L3[R2] : -x2[R2], de = t.elements.arrow, G2 = u2 && de ? Be(de) : {
1881
+ var C2, X2 = p2 === "y" ? k : D, Y2 = p2 === "y" ? S2 : M, R2 = p2 === "y" ? "height" : "width", W2 = m2[p2], ue = W2 + d2[X2], q4 = W2 - d2[Y2], pe = u2 ? -L3[R2] / 2 : 0, be = O2 === Q2 ? x2[R2] : L3[R2], re = O2 === Q2 ? -L3[R2] : -x2[R2], de = t.elements.arrow, G2 = u2 && de ? Be(de) : {
1914
1882
  width: 0,
1915
1883
  height: 0
1916
- }, I3 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : vt(), ie = I3[X2], ve = I3[Y2], z2 = oe(0, x2[R2], G2[R2]), xe = E2 ? x2[R2] / 2 - pe - z2 - ie - A3.mainAxis : be - z2 - ie - A3.mainAxis, xt = E2 ? -x2[R2] / 2 + pe + z2 + ve + A3.mainAxis : re + z2 + ve + A3.mainAxis, Oe = t.elements.arrow && fe(t.elements.arrow), Ot = Oe ? p2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, He = (C2 = $2 == null ? void 0 : $2[p2]) != null ? C2 : 0, Et = W2 + xe - He - Ot, At = W2 + xt - He, Ne = oe(u2 ? ye(ue, Et) : ue, W2, u2 ? _(q2, At) : q2);
1884
+ }, I2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ht(), ie = I2[X2], ve = I2[Y2], z2 = oe(0, x2[R2], G2[R2]), xe = E2 ? x2[R2] / 2 - pe - z2 - ie - A2.mainAxis : be - z2 - ie - A2.mainAxis, Ot = E2 ? -x2[R2] / 2 + pe + z2 + ve + A2.mainAxis : re + z2 + ve + A2.mainAxis, Oe = t.elements.arrow && fe(t.elements.arrow), Et = Oe ? p2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, He = (C2 = $2 == null ? void 0 : $2[p2]) != null ? C2 : 0, At = W2 + xe - He - Et, Pt = W2 + Ot - He, Ne = oe(u2 ? ye(ue, At) : ue, W2, u2 ? _(q4, Pt) : q4);
1917
1885
  m2[p2] = Ne, j3[p2] = Ne - W2;
1918
1886
  }
1919
1887
  if (s2) {
1920
- var Ve, Pt = p2 === "x" ? k : D, Lt = p2 === "x" ? S2 : M, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ie = U2 + d2[Pt], Fe = U2 - d2[Lt], Ee = [k, D].indexOf(w2) !== -1, Xe = (Ve = $2 == null ? void 0 : $2[g2]) != null ? Ve : 0, Ye = Ee ? Ie : U2 - x2[he] - L3[he] - Xe + A3.altAxis, qe = Ee ? U2 + x2[he] + L3[he] - Xe - A3.altAxis : Fe, ze = u2 && Ee ? Qt(Ye, U2, qe) : oe(u2 ? Ye : Ie, U2, u2 ? qe : Fe);
1888
+ var Ve, Lt = p2 === "x" ? k : D, $t = p2 === "x" ? S2 : M, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ie = U2 + d2[Lt], Fe = U2 - d2[$t], Ee = [k, D].indexOf(w2) !== -1, Xe = (Ve = $2 == null ? void 0 : $2[g2]) != null ? Ve : 0, Ye = Ee ? Ie : U2 - x2[he] - L3[he] - Xe + A2.altAxis, qe = Ee ? U2 + x2[he] + L3[he] - Xe - A2.altAxis : Fe, ze = u2 && Ee ? Zt(Ye, U2, qe) : oe(u2 ? Ye : Ie, U2, u2 ? qe : Fe);
1921
1889
  m2[g2] = ze, j3[g2] = ze - U2;
1922
1890
  }
1923
1891
  t.modifiersData[i] = j3;
1924
1892
  }
1925
1893
  }
1926
- const kr = {
1894
+ const Dr = {
1927
1895
  name: "preventOverflow",
1928
1896
  enabled: true,
1929
1897
  phase: "main",
1930
- fn: Cr,
1898
+ fn: kr,
1931
1899
  requiresIfExists: ["offset"]
1932
1900
  };
1933
- function Dr(e) {
1901
+ function Rr(e) {
1934
1902
  return {
1935
1903
  scrollLeft: e.scrollLeft,
1936
1904
  scrollTop: e.scrollTop
1937
1905
  };
1938
1906
  }
1939
- function Rr(e) {
1940
- return e === B(e) || !T(e) ? Se(e) : Dr(e);
1941
- }
1942
1907
  function Br(e) {
1908
+ return e === B2(e) || !T(e) ? Se(e) : Rr(e);
1909
+ }
1910
+ function Tr(e) {
1943
1911
  var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
1944
1912
  return r !== 1 || i !== 1;
1945
1913
  }
1946
- function Tr(e, t, r) {
1914
+ function Sr(e, t, r) {
1947
1915
  r === void 0 && (r = false);
1948
- var i = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r), s2 = {
1916
+ var i = T(t), n = T(t) && Tr(t), o2 = F(t), l2 = ee(e, n, r), s2 = {
1949
1917
  scrollLeft: 0,
1950
1918
  scrollTop: 0
1951
1919
  }, a2 = {
@@ -1953,14 +1921,14 @@ function Tr(e, t, r) {
1953
1921
  y: 0
1954
1922
  };
1955
1923
  return (i || !i && !r) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1956
- je(o2)) && (s2 = Rr(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
1924
+ je(o2)) && (s2 = Br(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
1957
1925
  x: l2.left + s2.scrollLeft - a2.x,
1958
1926
  y: l2.top + s2.scrollTop - a2.y,
1959
1927
  width: l2.width,
1960
1928
  height: l2.height
1961
1929
  };
1962
1930
  }
1963
- function Sr(e) {
1931
+ function Mr(e) {
1964
1932
  var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = [];
1965
1933
  e.forEach(function(o2) {
1966
1934
  t.set(o2.name, o2);
@@ -1979,15 +1947,15 @@ function Sr(e) {
1979
1947
  r.has(o2.name) || n(o2);
1980
1948
  }), i;
1981
1949
  }
1982
- function Mr(e) {
1983
- var t = Sr(e);
1984
- return zt.reduce(function(r, i) {
1950
+ function jr(e) {
1951
+ var t = Mr(e);
1952
+ return Ut.reduce(function(r, i) {
1985
1953
  return r.concat(t.filter(function(n) {
1986
1954
  return n.phase === i;
1987
1955
  }));
1988
1956
  }, []);
1989
1957
  }
1990
- function jr(e) {
1958
+ function Wr(e) {
1991
1959
  var t;
1992
1960
  return function() {
1993
1961
  return t || (t = new Promise(function(r) {
@@ -1997,7 +1965,7 @@ function jr(e) {
1997
1965
  })), t;
1998
1966
  };
1999
1967
  }
2000
- function Wr(e) {
1968
+ function Hr(e) {
2001
1969
  var t = e.reduce(function(r, i) {
2002
1970
  var n = r[i.name];
2003
1971
  return r[i.name] = n ? Object.assign({}, n, i, {
@@ -2009,27 +1977,27 @@ function Wr(e) {
2009
1977
  return t[r];
2010
1978
  });
2011
1979
  }
2012
- var it = {
1980
+ var nt2 = {
2013
1981
  placement: "bottom",
2014
1982
  modifiers: [],
2015
1983
  strategy: "absolute"
2016
1984
  };
2017
- function nt() {
1985
+ function ot() {
2018
1986
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
2019
1987
  t[r] = arguments[r];
2020
1988
  return !t.some(function(i) {
2021
1989
  return !(i && typeof i.getBoundingClientRect == "function");
2022
1990
  });
2023
1991
  }
2024
- function Hr(e) {
1992
+ function Nr(e) {
2025
1993
  e === void 0 && (e = {});
2026
- var t = e, r = t.defaultModifiers, i = r === void 0 ? [] : r, n = t.defaultOptions, o2 = n === void 0 ? it : n;
1994
+ var t = e, r = t.defaultModifiers, i = r === void 0 ? [] : r, n = t.defaultOptions, o2 = n === void 0 ? nt2 : n;
2027
1995
  return function(s2, a2, f2) {
2028
1996
  f2 === void 0 && (f2 = o2);
2029
1997
  var c2 = {
2030
1998
  placement: "bottom",
2031
1999
  orderedModifiers: [],
2032
- options: Object.assign({}, it, o2),
2000
+ options: Object.assign({}, nt2, o2),
2033
2001
  modifiersData: {},
2034
2002
  elements: {
2035
2003
  reference: s2,
@@ -2045,7 +2013,7 @@ function Hr(e) {
2045
2013
  reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
2046
2014
  popper: ae(a2)
2047
2015
  };
2048
- var E2 = Mr(Wr([].concat(i, c2.options.modifiers)));
2016
+ var E2 = jr(Hr([].concat(i, c2.options.modifiers)));
2049
2017
  return c2.orderedModifiers = E2.filter(function(p2) {
2050
2018
  return p2.enabled;
2051
2019
  }), b2(), u2.update();
@@ -2058,23 +2026,23 @@ function Hr(e) {
2058
2026
  forceUpdate: function() {
2059
2027
  if (!y2) {
2060
2028
  var w2 = c2.elements, O2 = w2.reference, E2 = w2.popper;
2061
- if (nt(O2, E2)) {
2029
+ if (ot(O2, E2)) {
2062
2030
  c2.rects = {
2063
- reference: Tr(O2, fe(E2), c2.options.strategy === "fixed"),
2031
+ reference: Sr(O2, fe(E2), c2.options.strategy === "fixed"),
2064
2032
  popper: Be(E2)
2065
- }, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(A3) {
2066
- return c2.modifiersData[A3.name] = Object.assign({}, A3.data);
2033
+ }, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(A2) {
2034
+ return c2.modifiersData[A2.name] = Object.assign({}, A2.data);
2067
2035
  });
2068
2036
  for (var p2 = 0; p2 < c2.orderedModifiers.length; p2++) {
2069
2037
  if (c2.reset === true) {
2070
2038
  c2.reset = false, p2 = -1;
2071
2039
  continue;
2072
2040
  }
2073
- var g2 = c2.orderedModifiers[p2], m2 = g2.fn, x2 = g2.options, L3 = x2 === void 0 ? {} : x2, P3 = g2.name;
2041
+ var g2 = c2.orderedModifiers[p2], m2 = g2.fn, x2 = g2.options, L3 = x2 === void 0 ? {} : x2, P2 = g2.name;
2074
2042
  typeof m2 == "function" && (c2 = m2({
2075
2043
  state: c2,
2076
2044
  options: L3,
2077
- name: P3,
2045
+ name: P2,
2078
2046
  instance: u2
2079
2047
  }) || c2);
2080
2048
  }
@@ -2083,7 +2051,7 @@ function Hr(e) {
2083
2051
  },
2084
2052
  // Async and optimistically optimized update – it will not be executed if
2085
2053
  // not necessary (debounced to run at most once-per-tick)
2086
- update: jr(function() {
2054
+ update: Wr(function() {
2087
2055
  return new Promise(function(d2) {
2088
2056
  u2.forceUpdate(), d2(c2);
2089
2057
  });
@@ -2092,7 +2060,7 @@ function Hr(e) {
2092
2060
  v2(), y2 = true;
2093
2061
  }
2094
2062
  };
2095
- if (!nt(s2, a2))
2063
+ if (!ot(s2, a2))
2096
2064
  return u2;
2097
2065
  u2.setOptions(f2).then(function(d2) {
2098
2066
  !y2 && f2.onFirstUpdate && f2.onFirstUpdate(d2);
@@ -2120,20 +2088,20 @@ function Hr(e) {
2120
2088
  return u2;
2121
2089
  };
2122
2090
  }
2123
- var Nr = [cr, Lr, ar, Kt, Ar, wr, kr, rr, xr], Vr = /* @__PURE__ */ Hr({
2124
- defaultModifiers: Nr
2091
+ var Vr = [lr, $r, sr, Gt, Pr, br, Dr, ir, Or], Ir = /* @__PURE__ */ Nr({
2092
+ defaultModifiers: Vr
2125
2093
  });
2126
2094
  async function Ce(e) {
2127
2095
  const t = this.collection.findIndex((r) => r.id === e.id);
2128
2096
  if (t >= 0) {
2129
2097
  const r = this.collection[t];
2130
- r.state === "opened" && r.close(), r.popper.destroy(), wt(r), Object.getOwnPropertyNames(r).forEach((i) => {
2098
+ r.state === "opened" && r.close(), r.popper.destroy(), bt(r), Object.getOwnPropertyNames(r).forEach((i) => {
2131
2099
  delete r[i];
2132
2100
  }), this.collection.splice(t, 1);
2133
2101
  }
2134
2102
  return this.collection;
2135
2103
  }
2136
- function wt(e) {
2104
+ function bt(e) {
2137
2105
  return e.__eventListeners && (e.__eventListeners.forEach((t) => {
2138
2106
  t.el.forEach((r) => {
2139
2107
  t.type.forEach((i) => {
@@ -2143,24 +2111,24 @@ function wt(e) {
2143
2111
  }), delete e.__eventListeners), e;
2144
2112
  }
2145
2113
  async function We(e) {
2146
- const t = at.call(this, e);
2147
- return t.el.classList.add(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "true"), t.config = ot(t.el, this.settings), t.popper.setOptions({
2114
+ const t = st.call(this, e);
2115
+ return t.el.classList.add(this.settings.stateActive), t.trigger.hasAttribute("aria-controls") && t.trigger.setAttribute("aria-expanded", "true"), t.config = at(t.el, this.settings), t.popper.setOptions({
2148
2116
  placement: t.config.placement,
2149
2117
  modifiers: [
2150
2118
  { name: "eventListeners", enabled: true },
2151
- ...Dt(t.config)
2119
+ ...Rt(t.config)
2152
2120
  ]
2153
2121
  }), t.popper.update(), t.state = "opened", t;
2154
2122
  }
2155
- async function Ir(e, t) {
2123
+ async function Fr(e, t) {
2156
2124
  Ce.call(this, e);
2157
2125
  const r = this, i = {
2158
2126
  id: e.id,
2159
2127
  state: "closed",
2160
2128
  el: e,
2161
2129
  trigger: t,
2162
- popper: Vr(t, e),
2163
- config: ot(e, this.settings),
2130
+ popper: Ir(t, e),
2131
+ config: at(e, this.settings),
2164
2132
  open() {
2165
2133
  return We.call(r, this);
2166
2134
  },
@@ -2171,9 +2139,9 @@ async function Ir(e, t) {
2171
2139
  return Ce.call(r, this);
2172
2140
  }
2173
2141
  };
2174
- return i.trigger.hasAttribute("aria-controls") && i.trigger.setAttribute("aria-expanded", "false"), bt.call(this, i), this.collection.push(i), i.el.classList.contains(this.settings.stateActive) && (await i.open(), lt.call(this, i)), i;
2142
+ return i.trigger.hasAttribute("aria-controls") && i.trigger.setAttribute("aria-expanded", "false"), xt.call(this, i), this.collection.push(i), i.el.classList.contains(this.settings.stateActive) && (await i.open(), ft.call(this, i)), i;
2175
2143
  }
2176
- function bt(e) {
2144
+ function xt(e) {
2177
2145
  return e.__eventListeners || (e.config.event === "hover" ? (e.__eventListeners = [{
2178
2146
  el: ["trigger"],
2179
2147
  type: ["mouseenter", "focus"],
@@ -2181,7 +2149,7 @@ function bt(e) {
2181
2149
  }, {
2182
2150
  el: ["el", "trigger"],
2183
2151
  type: ["mouseleave", "focusout"],
2184
- listener: ct.bind(this, e)
2152
+ listener: lt.bind(this, e)
2185
2153
  }], e.__eventListeners.forEach((r) => {
2186
2154
  r.el.forEach((i) => {
2187
2155
  r.type.forEach((n) => {
@@ -2191,7 +2159,7 @@ function bt(e) {
2191
2159
  })) : (e.__eventListeners = [{
2192
2160
  el: ["trigger"],
2193
2161
  type: ["click"],
2194
- listener: Tt.bind(this, e)
2162
+ listener: St.bind(this, e)
2195
2163
  }], e.__eventListeners.forEach((r) => {
2196
2164
  r.el.forEach((i) => {
2197
2165
  r.type.forEach((n) => {
@@ -2200,12 +2168,12 @@ function bt(e) {
2200
2168
  });
2201
2169
  }))), e;
2202
2170
  }
2203
- var J2;
2204
- class Xr extends $t {
2171
+ var J;
2172
+ class Yr extends Ct {
2205
2173
  constructor(r) {
2206
2174
  super();
2207
- _e(this, J2, void 0);
2208
- this.defaults = kt, this.settings = { ...this.defaults, ...r }, this.trigger = null, Ke(this, J2, St.bind(this)), this.settings.autoMount && this.mount();
2175
+ Ke(this, J);
2176
+ this.defaults = Dt, this.settings = { ...this.defaults, ...r }, this.trigger = null, Ge(this, J, Mt.bind(this)), this.settings.autoMount && this.mount();
2209
2177
  }
2210
2178
  async mount(r) {
2211
2179
  r && (this.settings = { ...this.settings, ...r });
@@ -2217,17 +2185,17 @@ class Xr extends $t {
2217
2185
  }
2218
2186
  mountEventListeners(r = true) {
2219
2187
  r && this.collection.forEach((i) => {
2220
- bt.call(this, i);
2221
- }), document.addEventListener("keydown", Ae(this, J2), false);
2188
+ xt.call(this, i);
2189
+ }), document.addEventListener("keydown", Ae(this, J), false);
2222
2190
  }
2223
2191
  unmountEventListeners(r = true) {
2224
2192
  r && this.collection.forEach((i) => {
2225
- wt(i);
2226
- }), document.removeEventListener("keydown", Ae(this, J2), false);
2193
+ bt(i);
2194
+ }), document.removeEventListener("keydown", Ae(this, J), false);
2227
2195
  }
2228
2196
  register(r) {
2229
- const i = Bt.call(this, r);
2230
- return i.error ? Promise.reject(i.error) : Ir.call(this, i.popover, i.trigger);
2197
+ const i = Tt.call(this, r);
2198
+ return i.error ? Promise.reject(i.error) : Fr.call(this, i.popover, i.trigger);
2231
2199
  }
2232
2200
  deregister(r) {
2233
2201
  let i = this.get(r.id || r);
@@ -2240,11 +2208,11 @@ class Xr extends $t {
2240
2208
  return ke.call(this, r);
2241
2209
  }
2242
2210
  }
2243
- J2 = /* @__PURE__ */ new WeakMap();
2211
+ J = /* @__PURE__ */ new WeakMap();
2244
2212
  export {
2245
- st$1 as Drawer,
2246
- J$1 as Modal,
2247
- Xr as Popover,
2213
+ nt$1 as Drawer,
2214
+ Q$1 as Modal,
2215
+ Yr as Popover,
2248
2216
  index as core
2249
2217
  };
2250
2218
  //# sourceMappingURL=index.js.map