vrembem 4.0.0-next.6 → 4.0.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dev/index.umd.cjs CHANGED
@@ -6,29 +6,29 @@
6
6
  if (!e.has(t))
7
7
  throw TypeError("Cannot " + n);
8
8
  };
9
- var r = (t, e, n) => (b$2(t, e, "read from private field"), n ? n.call(t) : e.get(t)), m$2 = (t, e, n) => {
9
+ 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) => {
10
10
  if (e.has(t))
11
11
  throw TypeError("Cannot add the same private member more than once");
12
12
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
13
- }, a$1 = (t, e, n, s) => (b$2(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
13
+ }, a$1 = (t, e, n, i) => (b$2(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n);
14
14
  var l$1;
15
- let I$3 = class I {
15
+ let I$2 = class I {
16
16
  constructor(e, n) {
17
17
  m$2(this, l$1, void 0);
18
18
  this.value = e, a$1(this, l$1, n), this.mql = null;
19
19
  }
20
20
  get handler() {
21
- return r(this, l$1);
21
+ return o$2(this, l$1);
22
22
  }
23
23
  // Unmount existing handler before setting a new one.
24
24
  set handler(e) {
25
- this.mql && this.mql.removeEventListener("change", r(this, l$1)), a$1(this, l$1, e);
25
+ this.mql && this.mql.removeEventListener("change", o$2(this, l$1)), a$1(this, l$1, e);
26
26
  }
27
27
  mount(e, n) {
28
- return e && (this.value = e), n && a$1(this, l$1, n), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", r(this, l$1)), r(this, l$1).call(this, this.mql), this) : this;
28
+ return e && (this.value = e), n && a$1(this, l$1, n), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", o$2(this, l$1)), o$2(this, l$1).call(this, this.mql), this) : this;
29
29
  }
30
30
  unmount() {
31
- return this.mql ? (this.mql.removeEventListener("change", r(this, l$1)), this.value = null, a$1(this, l$1, null), this.mql = null, this) : this;
31
+ return this.mql ? (this.mql.removeEventListener("change", o$2(this, l$1)), this.value = null, a$1(this, l$1, null), this.mql = null, this) : this;
32
32
  }
33
33
  };
34
34
  l$1 = /* @__PURE__ */ new WeakMap();
@@ -40,11 +40,11 @@
40
40
  return await this.deregister(e), this.collection.push(e), this.collection;
41
41
  }
42
42
  async deregister(e) {
43
- const n = this.collection.findIndex((s) => s === e);
43
+ const n = this.collection.findIndex((i) => i === e);
44
44
  if (n >= 0) {
45
- const s = this.collection[n];
46
- Object.getOwnPropertyNames(s).forEach((o2) => {
47
- delete s[o2];
45
+ const i = this.collection[n];
46
+ Object.getOwnPropertyNames(i).forEach((r) => {
47
+ delete i[r];
48
48
  }), this.collection.splice(n, 1);
49
49
  }
50
50
  return this.collection;
@@ -60,44 +60,44 @@
60
60
  return this.collection;
61
61
  }
62
62
  get(e, n = "id") {
63
- return this.collection.find((s) => s[n] === e);
63
+ return this.collection.find((i) => i[n] === e);
64
64
  }
65
65
  };
66
- const i = {
66
+ const s = {
67
67
  inert: ":not([inert]):not([inert] *)",
68
68
  negTabIndex: ':not([tabindex^="-"])',
69
69
  disabled: ":not(:disabled)"
70
70
  }, g$2 = [
71
- `a[href]${i.inert}${i.negTabIndex}`,
72
- `area[href]${i.inert}${i.negTabIndex}`,
73
- `input:not([type="hidden"]):not([type="radio"])${i.inert}${i.negTabIndex}${i.disabled}`,
74
- `input[type="radio"]${i.inert}${i.negTabIndex}${i.disabled}`,
75
- `select${i.inert}${i.negTabIndex}${i.disabled}`,
76
- `textarea${i.inert}${i.negTabIndex}${i.disabled}`,
77
- `button${i.inert}${i.negTabIndex}${i.disabled}`,
78
- `details${i.inert} > summary:first-of-type${i.negTabIndex}`,
71
+ `a[href]${s.inert}${s.negTabIndex}`,
72
+ `area[href]${s.inert}${s.negTabIndex}`,
73
+ `input:not([type="hidden"]):not([type="radio"])${s.inert}${s.negTabIndex}${s.disabled}`,
74
+ `input[type="radio"]${s.inert}${s.negTabIndex}${s.disabled}`,
75
+ `select${s.inert}${s.negTabIndex}${s.disabled}`,
76
+ `textarea${s.inert}${s.negTabIndex}${s.disabled}`,
77
+ `button${s.inert}${s.negTabIndex}${s.disabled}`,
78
+ `details${s.inert} > summary:first-of-type${s.negTabIndex}`,
79
79
  // Discard until Firefox supports `:has()`
80
80
  // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
81
81
  // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
82
- `iframe${i.inert}${i.negTabIndex}`,
83
- `audio[controls]${i.inert}${i.negTabIndex}`,
84
- `video[controls]${i.inert}${i.negTabIndex}`,
85
- `[contenteditable]${i.inert}${i.negTabIndex}`,
86
- `[tabindex]${i.inert}${i.negTabIndex}`
82
+ `iframe${s.inert}${s.negTabIndex}`,
83
+ `audio[controls]${s.inert}${s.negTabIndex}`,
84
+ `video[controls]${s.inert}${s.negTabIndex}`,
85
+ `[contenteditable]${s.inert}${s.negTabIndex}`,
86
+ `[tabindex]${s.inert}${s.negTabIndex}`
87
87
  ];
88
- var f$2, u$2, d$2;
88
+ var f$2, u$1, d$2;
89
89
  let S$3 = class S {
90
90
  constructor(e = null, n = "[data-focus]") {
91
91
  m$2(this, f$2, void 0);
92
- m$2(this, u$2, void 0);
92
+ m$2(this, u$1, void 0);
93
93
  m$2(this, d$2, void 0);
94
- this.el = e, this.selectorFocus = n, a$1(this, u$2, $$2.bind(this)), a$1(this, d$2, y$2.bind(this));
94
+ this.el = e, this.selectorFocus = n, a$1(this, u$1, $$2.bind(this)), a$1(this, d$2, v$2.bind(this));
95
95
  }
96
96
  get focusable() {
97
- return r(this, f$2);
97
+ return o$2(this, f$2);
98
98
  }
99
99
  set focusable(e) {
100
- a$1(this, f$2, e), r(this, f$2).length ? (document.removeEventListener("keydown", r(this, d$2)), document.addEventListener("keydown", r(this, u$2))) : (document.removeEventListener("keydown", r(this, u$2)), document.addEventListener("keydown", r(this, d$2)));
100
+ a$1(this, f$2, e), o$2(this, f$2).length ? (document.removeEventListener("keydown", o$2(this, d$2)), document.addEventListener("keydown", o$2(this, u$1))) : (document.removeEventListener("keydown", o$2(this, u$1)), document.addEventListener("keydown", o$2(this, d$2)));
101
101
  }
102
102
  get focusableFirst() {
103
103
  return this.focusable[0];
@@ -109,132 +109,132 @@
109
109
  e && (this.el = e), n && (this.selectorFocus = n), this.focusable = this.getFocusable(), this.focus();
110
110
  }
111
111
  unmount() {
112
- this.el = null, this.focusable = [], document.removeEventListener("keydown", r(this, u$2)), document.removeEventListener("keydown", r(this, d$2));
112
+ this.el = null, this.focusable = [], document.removeEventListener("keydown", o$2(this, u$1)), document.removeEventListener("keydown", o$2(this, d$2));
113
113
  }
114
114
  focus(e = this.el, n = this.selectorFocus) {
115
115
  (e.querySelector(n) || e).focus();
116
116
  }
117
117
  getFocusable(e = this.el) {
118
- const n = [], s = document.activeElement, o2 = e.scrollTop;
118
+ const n = [], i = document.activeElement, r = e.scrollTop;
119
119
  return e.querySelectorAll(g$2.join(",")).forEach((h2) => {
120
120
  h2.focus(), document.activeElement === h2 && n.push(h2);
121
- }), e.scrollTop = o2, s.focus(), n;
121
+ }), e.scrollTop = r, i.focus(), n;
122
122
  }
123
123
  };
124
- f$2 = /* @__PURE__ */ new WeakMap(), u$2 = /* @__PURE__ */ new WeakMap(), d$2 = /* @__PURE__ */ new WeakMap();
124
+ f$2 = /* @__PURE__ */ new WeakMap(), u$1 = /* @__PURE__ */ new WeakMap(), d$2 = /* @__PURE__ */ new WeakMap();
125
125
  function $$2(t) {
126
126
  (t.key === "Tab" || t.keyCode === 9) && (t.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (t.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (t.preventDefault(), this.focusableFirst.focus()));
127
127
  }
128
- function y$2(t) {
128
+ function v$2(t) {
129
129
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
130
130
  }
131
- function v$2() {
132
- return getComputedStyle(document.body).getPropertyValue("--vrembem-prefix").trim();
131
+ function y$2() {
132
+ return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
133
133
  }
134
- function T$2(t, e = document.body, n = true) {
135
- if (n) {
136
- const o2 = v$2();
137
- o2 && !t.includes(`--${o2}`) && (t = t.replace("--", `--${o2}`));
134
+ function T$2(t, e = document.body) {
135
+ if (t.slice(0, 2) !== "--") {
136
+ const i = y$2();
137
+ i && (t = `${i}${t}`), t = `--${t}`;
138
138
  }
139
- const s = getComputedStyle(e).getPropertyValue(t).trim();
140
- if (s)
141
- return s;
139
+ const n = getComputedStyle(e).getPropertyValue(t).trim();
140
+ if (n)
141
+ return n;
142
142
  throw new Error(`CSS variable "${t}" was not found!`);
143
143
  }
144
144
  function q$2(t, e) {
145
- const s = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
146
- return s ? JSON.parse(s) : {};
145
+ const i = (t.getAttribute(`data-${e}`) || "").replace(/'/g, '"');
146
+ return i ? JSON.parse(i) : {};
147
147
  }
148
148
  function F$3(t, e = true) {
149
- const n = localStorage.getItem(t), s = n ? JSON.parse(n) : {};
149
+ const n = localStorage.getItem(t), i = n ? JSON.parse(n) : {};
150
150
  return {
151
- get(o2) {
152
- return o2 ? s[o2] : s;
151
+ get(r) {
152
+ return r ? i[r] : i;
153
153
  },
154
- set(o2, c2) {
155
- return c2 ? s[o2] = c2 : delete s[o2], e && localStorage.setItem(t, JSON.stringify(s)), s;
154
+ set(r, c2) {
155
+ return c2 ? i[r] = c2 : delete i[r], e && localStorage.setItem(t, JSON.stringify(i)), i;
156
156
  }
157
157
  };
158
158
  }
159
159
  function k$3(t, e, n) {
160
- const s = e.nodeType === Node.COMMENT_NODE, o2 = e.nodeType === Node.ELEMENT_NODE;
161
- if (e = s || o2 ? e : document.querySelector(e), s && (n = "after"), !e)
160
+ const i = e.nodeType === Node.COMMENT_NODE, r = e.nodeType === Node.ELEMENT_NODE;
161
+ if (e = i || r ? e : document.querySelector(e), i && (n = "after"), !e)
162
162
  throw new Error(`Not a valid teleport reference: '${e}'`);
163
163
  if (typeof e[n] != "function")
164
164
  throw new Error(`Not a valid teleport method: '${n}'`);
165
165
  let c2 = null;
166
- return s || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), s && e.remove(), c2;
166
+ return i || (c2 = document.createComment("teleported #" + t.id), t.before(c2)), e[n](t), i && e.remove(), c2;
167
167
  }
168
- function w$2(t, e, n, s = "--transition-duration") {
169
- return new Promise((o2) => {
170
- if (typeof s == "string") {
171
- const c2 = T$2(s, t), h2 = !!c2.includes("ms");
172
- s = parseFloat(c2) * (h2 ? 1 : 1e3);
168
+ function w$2(t, e, n, i = "transition-duration") {
169
+ return new Promise((r) => {
170
+ if (typeof i == "string") {
171
+ const c2 = T$2(i, t), h2 = !!c2.includes("ms");
172
+ i = parseFloat(c2) * (h2 ? 1 : 1e3);
173
173
  }
174
174
  t.classList.remove(e.finish), t.classList.add(n.start), setTimeout(() => {
175
- t.classList.add(n.finish), t.classList.remove(n.start), o2(t);
176
- }, s);
175
+ t.classList.add(n.finish), t.classList.remove(n.start), r(t);
176
+ }, i);
177
177
  });
178
178
  }
179
- function p$2(t, e) {
180
- e && document.querySelectorAll(e).forEach((s) => {
181
- t ? s.style.overflow = "hidden" : s.style.removeProperty("overflow");
179
+ function E$2(t, e) {
180
+ e && document.querySelectorAll(e).forEach((i) => {
181
+ t ? i.style.overflow = "hidden" : i.style.removeProperty("overflow");
182
182
  });
183
183
  }
184
- function E$2(t, e) {
185
- e && document.querySelectorAll(e).forEach((s) => {
186
- t ? (s.inert = true, s.setAttribute("aria-hidden", true)) : (s.inert = null, s.removeAttribute("aria-hidden"));
184
+ function p$2(t, e) {
185
+ e && document.querySelectorAll(e).forEach((i) => {
186
+ t ? (i.inert = true, i.setAttribute("aria-hidden", true)) : (i.inert = null, i.removeAttribute("aria-hidden"));
187
187
  });
188
188
  }
189
189
  function C$2(t, e) {
190
- E$2(!!t, e.selectorInert), p$2(!!t, e.selectorOverflow);
190
+ p$2(!!t, e.selectorInert), E$2(!!t, e.selectorOverflow);
191
191
  }
192
192
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
193
193
  __proto__: null,
194
- Breakpoint: I$3,
194
+ Breakpoint: I$2,
195
195
  Collection: L$2,
196
196
  FocusTrap: S$3,
197
197
  cssVar: T$2,
198
198
  getConfig: q$2,
199
- getPrefix: v$2,
199
+ getPrefix: y$2,
200
200
  localStore: F$3,
201
201
  teleport: k$3,
202
202
  transition: w$2,
203
203
  updateGlobalState: C$2
204
204
  }, Symbol.toStringTag, { value: "Module" }));
205
- var I$2 = (t, s, e) => {
206
- if (!s.has(t))
205
+ var I$1 = (t, s2, e) => {
206
+ if (!s2.has(t))
207
207
  throw TypeError("Cannot " + e);
208
208
  };
209
- var b$1 = (t, s, e) => (I$2(t, s, "read from private field"), e ? e.call(t) : s.get(t)), $$1 = (t, s, e) => {
210
- if (s.has(t))
209
+ 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) => {
210
+ if (s2.has(t))
211
211
  throw TypeError("Cannot add the same private member more than once");
212
- s instanceof WeakSet ? s.add(t) : s.set(t, e);
213
- }, S$2 = (t, s, e, i2) => (I$2(t, s, "write to private field"), i2 ? i2.call(t, e) : s.set(t, e), e);
214
- var O$1 = (t, s, e) => {
215
- if (!s.has(t))
212
+ s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e);
213
+ }, L$1 = (t, s2, e, i) => (I$1(t, s2, "write to private field"), i ? i.call(t, e) : s2.set(t, e), e);
214
+ var O$1 = (t, s2, e) => {
215
+ if (!s2.has(t))
216
216
  throw TypeError("Cannot " + e);
217
- }, l = (t, s, e) => (O$1(t, s, "read from private field"), e ? e.call(t) : s.get(t)), w$1 = (t, s, e) => {
218
- if (s.has(t))
217
+ }, l = (t, s2, e) => (O$1(t, s2, "read from private field"), e ? e.call(t) : s2.get(t)), $$1 = (t, s2, e) => {
218
+ if (s2.has(t))
219
219
  throw TypeError("Cannot add the same private member more than once");
220
- s instanceof WeakSet ? s.add(t) : s.set(t, e);
221
- }, u$1 = (t, s, e, i2) => (O$1(t, s, "write to private field"), i2 ? i2.call(t, e) : s.set(t, e), e), d$1;
220
+ s2 instanceof WeakSet ? s2.add(t) : s2.set(t, e);
221
+ }, 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;
222
222
  let P$1 = class P {
223
- constructor(s, e) {
224
- w$1(this, d$1, void 0), this.value = s, u$1(this, d$1, e), this.mql = null;
223
+ constructor(s2, e) {
224
+ $$1(this, d$1, void 0), this.value = s2, h$1(this, d$1, e), this.mql = null;
225
225
  }
226
226
  get handler() {
227
227
  return l(this, d$1);
228
228
  }
229
229
  // Unmount existing handler before setting a new one.
230
- set handler(s) {
231
- this.mql && this.mql.removeEventListener("change", l(this, d$1)), u$1(this, d$1, s);
230
+ set handler(s2) {
231
+ this.mql && this.mql.removeEventListener("change", l(this, d$1)), h$1(this, d$1, s2);
232
232
  }
233
- mount(s, e) {
234
- return s && (this.value = s), e && u$1(this, d$1, e), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", l(this, d$1)), l(this, d$1).call(this, this.mql), this) : this;
233
+ mount(s2, e) {
234
+ return s2 && (this.value = s2), e && h$1(this, d$1, e), this.value ? (this.mql = window.matchMedia(`(min-width: ${this.value})`), this.mql.addEventListener("change", l(this, d$1)), l(this, d$1).call(this, this.mql), this) : this;
235
235
  }
236
236
  unmount() {
237
- return this.mql ? (this.mql.removeEventListener("change", l(this, d$1)), this.value = null, u$1(this, d$1, null), this.mql = null, this) : this;
237
+ return this.mql ? (this.mql.removeEventListener("change", l(this, d$1)), this.value = null, h$1(this, d$1, null), this.mql = null, this) : this;
238
238
  }
239
239
  };
240
240
  d$1 = /* @__PURE__ */ new WeakMap();
@@ -242,21 +242,21 @@
242
242
  constructor() {
243
243
  this.collection = [];
244
244
  }
245
- async register(s) {
246
- return await this.deregister(s), this.collection.push(s), this.collection;
245
+ async register(s2) {
246
+ return await this.deregister(s2), this.collection.push(s2), this.collection;
247
247
  }
248
- async deregister(s) {
249
- const e = this.collection.findIndex((i2) => i2 === s);
248
+ async deregister(s2) {
249
+ const e = this.collection.findIndex((i) => i === s2);
250
250
  if (e >= 0) {
251
- const i2 = this.collection[e];
252
- Object.getOwnPropertyNames(i2).forEach((n) => {
253
- delete i2[n];
251
+ const i = this.collection[e];
252
+ Object.getOwnPropertyNames(i).forEach((n) => {
253
+ delete i[n];
254
254
  }), this.collection.splice(e, 1);
255
255
  }
256
256
  return this.collection;
257
257
  }
258
- async registerCollection(s) {
259
- return await Promise.all(Array.from(s, (e) => {
258
+ async registerCollection(s2) {
259
+ return await Promise.all(Array.from(s2, (e) => {
260
260
  this.register(e);
261
261
  })), this.collection;
262
262
  }
@@ -265,8 +265,8 @@
265
265
  await this.deregister(this.collection[0]);
266
266
  return this.collection;
267
267
  }
268
- get(s, e = "id") {
269
- return this.collection.find((i2) => i2[e] === s);
268
+ get(s2, e = "id") {
269
+ return this.collection.find((i) => i[e] === s2);
270
270
  }
271
271
  };
272
272
  const o$1 = {
@@ -292,15 +292,15 @@
292
292
  `[tabindex]${o$1.inert}${o$1.negTabIndex}`
293
293
  ];
294
294
  var v$1, g$1, f$1;
295
- let j$2 = class j {
296
- constructor(s = null, e = "[data-focus]") {
297
- w$1(this, v$1, void 0), w$1(this, g$1, void 0), w$1(this, f$1, void 0), this.el = s, this.selectorFocus = e, u$1(this, g$1, q$1.bind(this)), u$1(this, f$1, K$2.bind(this));
295
+ let j$1 = class j {
296
+ constructor(s2 = null, e = "[data-focus]") {
297
+ $$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));
298
298
  }
299
299
  get focusable() {
300
300
  return l(this, v$1);
301
301
  }
302
- set focusable(s) {
303
- u$1(this, v$1, s), l(this, v$1).length ? (document.removeEventListener("keydown", l(this, f$1)), document.addEventListener("keydown", l(this, g$1))) : (document.removeEventListener("keydown", l(this, g$1)), document.addEventListener("keydown", l(this, f$1)));
302
+ set focusable(s2) {
303
+ h$1(this, v$1, s2), l(this, v$1).length ? (document.removeEventListener("keydown", l(this, f$1)), document.addEventListener("keydown", l(this, g$1))) : (document.removeEventListener("keydown", l(this, g$1)), document.addEventListener("keydown", l(this, f$1)));
304
304
  }
305
305
  get focusableFirst() {
306
306
  return this.focusable[0];
@@ -308,20 +308,20 @@
308
308
  get focusableLast() {
309
309
  return this.focusable[this.focusable.length - 1];
310
310
  }
311
- mount(s, e) {
312
- s && (this.el = s), e && (this.selectorFocus = e), this.focusable = this.getFocusable(), this.focus();
311
+ mount(s2, e) {
312
+ s2 && (this.el = s2), e && (this.selectorFocus = e), this.focusable = this.getFocusable(), this.focus();
313
313
  }
314
314
  unmount() {
315
315
  this.el = null, this.focusable = [], document.removeEventListener("keydown", l(this, g$1)), document.removeEventListener("keydown", l(this, f$1));
316
316
  }
317
- focus(s = this.el, e = this.selectorFocus) {
318
- (s.querySelector(e) || s).focus();
317
+ focus(s2 = this.el, e = this.selectorFocus) {
318
+ (s2.querySelector(e) || s2).focus();
319
319
  }
320
- getFocusable(s = this.el) {
321
- const e = [], i2 = document.activeElement, n = s.scrollTop;
322
- return s.querySelectorAll(B$1.join(",")).forEach((c2) => {
320
+ getFocusable(s2 = this.el) {
321
+ const e = [], i = document.activeElement, n = s2.scrollTop;
322
+ return s2.querySelectorAll(B$1.join(",")).forEach((c2) => {
323
323
  c2.focus(), document.activeElement === c2 && e.push(c2);
324
- }), s.scrollTop = n, i2.focus(), e;
324
+ }), s2.scrollTop = n, i.focus(), e;
325
325
  }
326
326
  };
327
327
  v$1 = /* @__PURE__ */ new WeakMap(), g$1 = /* @__PURE__ */ new WeakMap(), f$1 = /* @__PURE__ */ new WeakMap();
@@ -331,60 +331,60 @@
331
331
  function K$2(t) {
332
332
  (t.key === "Tab" || t.keyCode === 9) && t.preventDefault();
333
333
  }
334
- function y$1() {
335
- return getComputedStyle(document.body).getPropertyValue("--vrembem-prefix").trim();
334
+ function M$2() {
335
+ return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
336
336
  }
337
- function N$2(t, s = document.body, e = true) {
338
- if (e) {
339
- const n = y$1();
340
- n && !t.includes(`--${n}`) && (t = t.replace("--", `--${n}`));
337
+ function N$2(t, s2 = document.body) {
338
+ if (t.slice(0, 2) !== "--") {
339
+ const i = M$2();
340
+ i && (t = `${i}${t}`), t = `--${t}`;
341
341
  }
342
- const i2 = getComputedStyle(s).getPropertyValue(t).trim();
343
- if (i2)
344
- return i2;
342
+ const e = getComputedStyle(s2).getPropertyValue(t).trim();
343
+ if (e)
344
+ return e;
345
345
  throw new Error(`CSS variable "${t}" was not found!`);
346
346
  }
347
- function V$1(t, s) {
348
- const e = (t.getAttribute(`data-${s}`) || "").replace(/'/g, '"');
347
+ function V$2(t, s2) {
348
+ const e = (t.getAttribute(`data-${s2}`) || "").replace(/'/g, '"');
349
349
  return e ? JSON.parse(e) : {};
350
350
  }
351
- function W$1(t, s = true) {
352
- const e = localStorage.getItem(t), i2 = e ? JSON.parse(e) : {};
351
+ function W$1(t, s2 = true) {
352
+ const e = localStorage.getItem(t), i = e ? JSON.parse(e) : {};
353
353
  return {
354
354
  get(n) {
355
- return n ? i2[n] : i2;
355
+ return n ? i[n] : i;
356
356
  },
357
357
  set(n, c2) {
358
- return c2 ? i2[n] = c2 : delete i2[n], s && localStorage.setItem(t, JSON.stringify(i2)), i2;
358
+ return c2 ? i[n] = c2 : delete i[n], s2 && localStorage.setItem(t, JSON.stringify(i)), i;
359
359
  }
360
360
  };
361
361
  }
362
- function M$1(t, s, e, i2 = "--transition-duration") {
362
+ function y$1(t, s2, e, i = "transition-duration") {
363
363
  return new Promise((n) => {
364
- if (typeof i2 == "string") {
365
- const c2 = N$2(i2, t), r2 = !!c2.includes("ms");
366
- i2 = parseFloat(c2) * (r2 ? 1 : 1e3);
364
+ if (typeof i == "string") {
365
+ const c2 = N$2(i, t), r = !!c2.includes("ms");
366
+ i = parseFloat(c2) * (r ? 1 : 1e3);
367
367
  }
368
- t.classList.remove(s.finish), t.classList.add(e.start), setTimeout(() => {
368
+ t.classList.remove(s2.finish), t.classList.add(e.start), setTimeout(() => {
369
369
  t.classList.add(e.finish), t.classList.remove(e.start), n(t);
370
- }, i2);
370
+ }, i);
371
371
  });
372
372
  }
373
- function _$2(t, s) {
374
- s && document.querySelectorAll(s).forEach((e) => {
373
+ function _$2(t, s2) {
374
+ s2 && document.querySelectorAll(s2).forEach((e) => {
375
375
  t ? e.style.overflow = "hidden" : e.style.removeProperty("overflow");
376
376
  });
377
377
  }
378
- function J$2(t, s) {
379
- s && document.querySelectorAll(s).forEach((e) => {
378
+ function J$2(t, s2) {
379
+ s2 && document.querySelectorAll(s2).forEach((e) => {
380
380
  t ? (e.inert = true, e.setAttribute("aria-hidden", true)) : (e.inert = null, e.removeAttribute("aria-hidden"));
381
381
  });
382
382
  }
383
- function k$2(t, s) {
384
- J$2(!!t, s.selectorInert), _$2(!!t, s.selectorOverflow);
383
+ function C$1(t, s2) {
384
+ J$2(!!t, s2.selectorInert), _$2(!!t, s2.selectorOverflow);
385
385
  }
386
386
  const z$1 = {
387
- autoInit: false,
387
+ autoMount: false,
388
388
  // Data attributes
389
389
  dataOpen: "drawer-open",
390
390
  dataClose: "drawer-close",
@@ -413,25 +413,44 @@
413
413
  storeKey: "VB:DrawerState",
414
414
  setTabindex: true,
415
415
  transition: true,
416
- transitionDuration: "--vb-drawer-transition-duration"
416
+ transitionDuration: "drawer-transition-duration"
417
417
  };
418
- async function G$1(t) {
419
- const s = t.target.closest(`
418
+ function G$1(t) {
419
+ 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";
420
+ }
421
+ async function H$1(t) {
422
+ 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));
423
+ }
424
+ function Q$1(t) {
425
+ const s2 = M$2(), e = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
426
+ 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;
427
+ }
428
+ function m$1(t) {
429
+ const s2 = typeof t == "string" ? this.get(t) : this.get(t.id);
430
+ if (s2)
431
+ return s2;
432
+ throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
433
+ }
434
+ function D$2(t) {
435
+ 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());
436
+ }
437
+ async function R$1(t) {
438
+ const s2 = t.target.closest(`
420
439
  [data-${this.settings.dataOpen}],
421
440
  [data-${this.settings.dataToggle}],
422
441
  [data-${this.settings.dataClose}]
423
442
  `);
424
- if (s) {
425
- t.preventDefault(), s.matches(`[data-${this.settings.dataToggle}]`) && s.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i2) => {
426
- const n = this.get(i2);
427
- return n.trigger = s, n.toggle();
428
- }), s.matches(`[data-${this.settings.dataOpen}]`) && s.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i2) => {
429
- const n = this.get(i2);
430
- return n.trigger = s, n.open();
431
- }), s.matches(`[data-${this.settings.dataClose}]`) && s.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i2) => {
432
- if (i2) {
433
- const n = this.get(i2);
434
- return n.trigger = s, n.close();
443
+ if (s2) {
444
+ t.preventDefault(), s2.matches(`[data-${this.settings.dataToggle}]`) && s2.getAttribute(`data-${this.settings.dataToggle}`).trim().split(" ").forEach((i) => {
445
+ const n = m$1.call(this, i);
446
+ return n.trigger = s2, n.toggle();
447
+ }), s2.matches(`[data-${this.settings.dataOpen}]`) && s2.getAttribute(`data-${this.settings.dataOpen}`).trim().split(" ").forEach((i) => {
448
+ const n = m$1.call(this, i);
449
+ return n.trigger = s2, n.open();
450
+ }), s2.matches(`[data-${this.settings.dataClose}]`) && s2.getAttribute(`data-${this.settings.dataClose}`).trim().split(" ").forEach((i) => {
451
+ if (i) {
452
+ const n = m$1.call(this, i);
453
+ return n.trigger = s2, n.close();
435
454
  } else {
436
455
  const n = t.target.closest(this.settings.selectorDrawer);
437
456
  if (n)
@@ -443,68 +462,49 @@
443
462
  if (this.activeModal && t.target.matches(this.settings.selectorScreen))
444
463
  return this.close(this.activeModal.id);
445
464
  }
446
- function H$1(t) {
465
+ function U(t) {
447
466
  if (t.key === "Escape" && this.activeModal)
448
467
  return this.close(this.activeModal);
449
468
  }
450
- async function L$1(t, s = true) {
451
- const e = this.collection.findIndex((i2) => i2.id === t.id);
469
+ async function k$2(t, s2 = true) {
470
+ const e = this.collection.findIndex((i) => i.id === t.id);
452
471
  if (e >= 0) {
453
- const i2 = this.collection[e];
454
- s && i2.state === "opened" && await i2.close(false), this.store.set(i2.id), i2.unmountBreakpoint(), Object.getOwnPropertyNames(i2).forEach((n) => {
455
- delete i2[n];
472
+ const i = this.collection[e];
473
+ s2 && i.state === "opened" && await i.close(false), this.store.set(i.id), i.unmountBreakpoint(), Object.getOwnPropertyNames(i).forEach((n) => {
474
+ delete i[n];
456
475
  }), this.collection.splice(e, 1);
457
476
  }
458
477
  return this.collection;
459
478
  }
460
- function Q$1(t) {
461
- 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";
462
- }
463
- async function R$1(t) {
464
- 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));
465
- }
466
- function U(t) {
467
- const s = y$1(), e = t.getAttribute(`data-${this.settings.dataBreakpoint}`);
468
- return this.settings.breakpoints && this.settings.breakpoints[e] ? this.settings.breakpoints[e] : getComputedStyle(document.body).getPropertyValue(`--${s}breakpoint-${e}`).trim() ? getComputedStyle(document.body).getPropertyValue(`--${s}breakpoint-${e}`).trim() : e;
469
- }
470
- function C$1(t) {
471
- const s = typeof t == "string" ? this.get(t) : this.get(t.id);
472
- if (s)
473
- return s;
474
- throw new Error(`Drawer not found in collection with id of "${t.id || t}".`);
475
- }
476
- function D$2(t) {
477
- 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());
478
- }
479
- async function x$1(t, s, e = true) {
480
- const i2 = C$1.call(this, t), n = { ...this.settings, ...i2.settings };
481
- return s !== void 0 && (n.transition = s), (i2.state === "closed" || i2.state === "indeterminate") && (i2.state = "opening", n.transition ? await M$1(i2.el, {
479
+ async function x$1(t, s2, e = true) {
480
+ const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
481
+ return s2 !== void 0 && (n.transition = s2), (i.state === "closed" || i.state === "indeterminate") && (i.state = "opening", n.transition ? await y$1(i.el, {
482
482
  start: n.stateClosing,
483
483
  finish: n.stateClosed
484
484
  }, {
485
485
  start: n.stateOpening,
486
486
  finish: n.stateOpened
487
- }, n.transitionDuration) : (i2.el.classList.add(n.stateOpened), i2.el.classList.remove(n.stateClosed)), i2.state = "opened", i2.mode === "modal" && k$2(true, n), e && D$2.call(this, i2), i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "opened", {
487
+ }, 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", {
488
488
  detail: this,
489
489
  bubbles: true
490
- }))), i2;
490
+ }))), i;
491
491
  }
492
- async function E$1(t, s, e = true) {
493
- const i2 = C$1.call(this, t), n = { ...this.settings, ...i2.settings };
494
- return s !== void 0 && (n.transition = s), (i2.state === "opened" || i2.state === "indeterminate") && (i2.state = "closing", document.activeElement.blur(), n.transition ? await M$1(i2.el, {
492
+ async function E$1(t, s2, e = true) {
493
+ const i = m$1.call(this, t), n = { ...this.settings, ...i.settings };
494
+ 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, {
495
495
  start: n.stateOpening,
496
496
  finish: n.stateOpened
497
497
  }, {
498
498
  start: n.stateClosing,
499
499
  finish: n.stateClosed
500
- }, n.transitionDuration) : (i2.el.classList.add(n.stateClosed), i2.el.classList.remove(n.stateOpened)), i2.state = "closed", i2.mode === "modal" && k$2(false, n), e && D$2.call(this, i2), i2.el.dispatchEvent(new CustomEvent(n.customEventPrefix + "closed", {
500
+ }, 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", {
501
501
  detail: this,
502
502
  bubbles: true
503
- }))), i2;
503
+ }))), i;
504
504
  }
505
- async function F$2(t, s, e) {
506
- const i2 = C$1.call(this, t);
507
- return i2.state === "closed" ? x$1.call(this, i2, s, e) : E$1.call(this, i2, s, e);
505
+ async function F$2(t, s2, e) {
506
+ const i = m$1.call(this, t);
507
+ return i.state === "closed" ? x$1.call(this, i, s2, e) : E$1.call(this, i, s2, e);
508
508
  }
509
509
  function X(t) {
510
510
  switch (t.mode) {
@@ -517,7 +517,7 @@
517
517
  }
518
518
  }
519
519
  async function Y(t) {
520
- return t.el.classList.remove(t.getSetting("classModal")), t.dialog.removeAttribute("aria-modal"), k$2(false, { ...this.settings, ...t.settings }), this.focusTrap.unmount(), await R$1(t), t.el.dispatchEvent(new CustomEvent(t.getSetting("customEventPrefix") + "switchMode", {
520
+ 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", {
521
521
  detail: this,
522
522
  bubbles: true
523
523
  })), t;
@@ -528,19 +528,19 @@
528
528
  bubbles: true
529
529
  })), t;
530
530
  }
531
- async function tt$1(t, s = {}) {
532
- await L$1.call(this, t, false);
533
- const e = this, i2 = new P$1();
531
+ async function tt$1(t, s2 = {}) {
532
+ await k$2.call(this, t, false);
533
+ const e = this, i = new P$1();
534
534
  let n, c2 = "indeterminate";
535
- const r2 = {
535
+ const r = {
536
536
  id: t.id,
537
537
  el: t,
538
538
  dialog: null,
539
539
  trigger: null,
540
- settings: { ...V$1(t, this.settings.dataConfig), ...s },
540
+ settings: { ...V$2(t, this.settings.dataConfig), ...s2 },
541
541
  inlineState: "indeterminate",
542
542
  get breakpoint() {
543
- return U.call(e, t);
543
+ return Q$1.call(e, t);
544
544
  },
545
545
  get store() {
546
546
  return e.store.get(this.id);
@@ -557,107 +557,107 @@
557
557
  set state(a2) {
558
558
  c2 = a2, this.mode === "inline" && a2 != "opening" && a2 != "closing" && (this.inlineState = a2, this.getSetting("store") && e.store.set(this.id, a2)), a2 === "indeterminate" && (this.el.classList.remove(this.getSetting("stateOpened")), this.el.classList.remove(this.getSetting("stateOpening")), this.el.classList.remove(this.getSetting("stateClosed")), this.el.classList.remove(this.getSetting("stateClosing")));
559
559
  },
560
- open(a2, h2) {
561
- return x$1.call(e, this, a2, h2);
560
+ open(a2, u2) {
561
+ return x$1.call(e, this, a2, u2);
562
562
  },
563
- close(a2, h2) {
564
- return E$1.call(e, this, a2, h2);
563
+ close(a2, u2) {
564
+ return E$1.call(e, this, a2, u2);
565
565
  },
566
- toggle(a2, h2) {
567
- return F$2.call(e, this, a2, h2);
566
+ toggle(a2, u2) {
567
+ return F$2.call(e, this, a2, u2);
568
568
  },
569
569
  deregister() {
570
- return L$1.call(e, this);
570
+ return k$2.call(e, this);
571
571
  },
572
572
  mountBreakpoint() {
573
- const a2 = this.breakpoint, h2 = this.handleBreakpoint.bind(this);
574
- return i2.mount(a2, h2), this;
573
+ const a2 = this.breakpoint, u2 = this.handleBreakpoint.bind(this);
574
+ return i.mount(a2, u2), this;
575
575
  },
576
576
  unmountBreakpoint() {
577
- return i2.unmount(), this;
577
+ return i.unmount(), this;
578
578
  },
579
579
  handleBreakpoint(a2) {
580
- const h2 = a2.matches ? "inline" : "modal";
581
- return this.mode != h2 && (this.mode = h2), this;
580
+ const u2 = a2.matches ? "inline" : "modal";
581
+ return this.mode != u2 && (this.mode = u2), this;
582
582
  },
583
583
  getSetting(a2) {
584
584
  return a2 in this.settings ? this.settings[a2] : e.settings[a2];
585
585
  }
586
586
  };
587
- this.collection.push(r2);
588
- const T2 = t.querySelector(r2.getSetting("selectorDialog"));
589
- return r2.dialog = T2 || t, r2.getSetting("setTabindex") && r2.dialog.setAttribute("tabindex", "-1"), await Q$1(r2), r2.inlineState = r2.state, r2.mode = t.classList.contains(r2.getSetting("classModal")) ? "modal" : "inline", r2.breakpoint && r2.mountBreakpoint(), r2;
587
+ this.collection.push(r);
588
+ const T2 = t.querySelector(r.getSetting("selectorDialog"));
589
+ 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;
590
590
  }
591
- var m$1, p$1;
591
+ var p$1, b$1;
592
592
  let st$1 = class st extends A$1 {
593
593
  constructor(e) {
594
594
  super();
595
- $$1(this, m$1, void 0);
596
- $$1(this, p$1, void 0);
597
- this.defaults = z$1, this.settings = { ...this.defaults, ...e }, this.focusTrap = new j$2(), this.store = W$1(this.settings.storeKey, this.settings.store), S$2(this, m$1, G$1.bind(this)), S$2(this, p$1, H$1.bind(this)), this.settings.autoInit && this.init();
595
+ S$2(this, p$1, void 0);
596
+ S$2(this, b$1, void 0);
597
+ 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();
598
598
  }
599
599
  get activeModal() {
600
600
  return this.collection.find((e) => e.state === "opened" && e.mode === "modal");
601
601
  }
602
- async init(e = null) {
602
+ async mount(e = null) {
603
603
  e && (this.settings = { ...this.settings, ...e });
604
- const i2 = document.querySelectorAll(this.settings.selectorDrawer);
605
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(), this;
604
+ const i = document.querySelectorAll(this.settings.selectorDrawer);
605
+ return await this.registerCollection(i), this.settings.eventListeners && this.mountEventListeners(), this;
606
606
  }
607
- async destroy() {
608
- return await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
607
+ async unmount() {
608
+ return await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
609
609
  }
610
- initEventListeners() {
611
- document.addEventListener("click", b$1(this, m$1), false), document.addEventListener("keydown", b$1(this, p$1), false);
610
+ mountEventListeners() {
611
+ document.addEventListener("click", w$1(this, p$1), false), document.addEventListener("keydown", w$1(this, b$1), false);
612
612
  }
613
- destroyEventListeners() {
614
- document.removeEventListener("click", b$1(this, m$1), false), document.removeEventListener("keydown", b$1(this, p$1), false);
613
+ unmountEventListeners() {
614
+ document.removeEventListener("click", w$1(this, p$1), false), document.removeEventListener("keydown", w$1(this, b$1), false);
615
615
  }
616
- register(e, i2 = {}) {
616
+ register(e, i = {}) {
617
617
  let n = typeof e == "string" ? document.getElementById(e) : e;
618
- return n ? tt$1.call(this, n, i2) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${e.id || e}".`));
618
+ return n ? tt$1.call(this, n, i) : Promise.reject(new Error(`Failed to register; drawer not found with ID of: "${e.id || e}".`));
619
619
  }
620
620
  deregister(e) {
621
- let i2 = this.get(e.id || e);
622
- return i2 ? L$1.call(this, i2) : Promise.reject(new Error(`Failed to deregister; drawer does not exist in collection with ID of: "${e.id || e}".`));
621
+ let i = this.get(e.id || e);
622
+ 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}".`));
623
623
  }
624
- open(e, i2, n) {
625
- return x$1.call(this, e, i2, n);
624
+ open(e, i, n) {
625
+ return x$1.call(this, e, i, n);
626
626
  }
627
- close(e, i2, n) {
628
- return E$1.call(this, e, i2, n);
627
+ close(e, i, n) {
628
+ return E$1.call(this, e, i, n);
629
629
  }
630
- toggle(e, i2, n) {
631
- return F$2.call(this, e, i2, n);
630
+ toggle(e, i, n) {
631
+ return F$2.call(this, e, i, n);
632
632
  }
633
633
  };
634
- m$1 = /* @__PURE__ */ new WeakMap(), p$1 = /* @__PURE__ */ new WeakMap();
635
- var I$1 = (i2, s, t) => {
636
- if (!s.has(i2))
634
+ p$1 = /* @__PURE__ */ new WeakMap(), b$1 = /* @__PURE__ */ new WeakMap();
635
+ var L = (i, s2, t) => {
636
+ if (!s2.has(i))
637
637
  throw TypeError("Cannot " + t);
638
638
  };
639
- var f = (i2, s, t) => (I$1(i2, s, "read from private field"), t ? t.call(i2) : s.get(i2)), m = (i2, s, t) => {
640
- if (s.has(i2))
639
+ var f = (i, s2, t) => (L(i, s2, "read from private field"), t ? t.call(i) : s2.get(i)), v = (i, s2, t) => {
640
+ if (s2.has(i))
641
641
  throw TypeError("Cannot add the same private member more than once");
642
- s instanceof WeakSet ? s.add(i2) : s.set(i2, t);
643
- }, v = (i2, s, t, e) => (I$1(i2, s, "write to private field"), e ? e.call(i2, t) : s.set(i2, t), t);
644
- var T$1 = (i2, s, t) => {
645
- if (!s.has(i2))
642
+ s2 instanceof WeakSet ? s2.add(i) : s2.set(i, t);
643
+ }, b = (i, s2, t, e) => (L(i, s2, "write to private field"), e ? e.call(i, t) : s2.set(i, t), t);
644
+ var I = (i, s2, t) => {
645
+ if (!s2.has(i))
646
646
  throw TypeError("Cannot " + t);
647
- }, a = (i2, s, t) => (T$1(i2, s, "read from private field"), t ? t.call(i2) : s.get(i2)), b = (i2, s, t) => {
648
- if (s.has(i2))
647
+ }, a = (i, s2, t) => (I(i, s2, "read from private field"), t ? t.call(i) : s2.get(i)), y = (i, s2, t) => {
648
+ if (s2.has(i))
649
649
  throw TypeError("Cannot add the same private member more than once");
650
- s instanceof WeakSet ? s.add(i2) : s.set(i2, t);
651
- }, y = (i2, s, t, e) => (T$1(i2, s, "write to private field"), e ? e.call(i2, t) : s.set(i2, t), t);
650
+ s2 instanceof WeakSet ? s2.add(i) : s2.set(i, t);
651
+ }, w = (i, s2, t, e) => (I(i, s2, "write to private field"), e ? e.call(i, t) : s2.set(i, t), t);
652
652
  class O {
653
653
  constructor() {
654
654
  this.collection = [];
655
655
  }
656
- async register(s) {
657
- return await this.deregister(s), this.collection.push(s), this.collection;
656
+ async register(s2) {
657
+ return await this.deregister(s2), this.collection.push(s2), this.collection;
658
658
  }
659
- async deregister(s) {
660
- const t = this.collection.findIndex((e) => e === s);
659
+ async deregister(s2) {
660
+ const t = this.collection.findIndex((e) => e === s2);
661
661
  if (t >= 0) {
662
662
  const e = this.collection[t];
663
663
  Object.getOwnPropertyNames(e).forEach((n) => {
@@ -666,8 +666,8 @@
666
666
  }
667
667
  return this.collection;
668
668
  }
669
- async registerCollection(s) {
670
- return await Promise.all(Array.from(s, (t) => {
669
+ async registerCollection(s2) {
670
+ return await Promise.all(Array.from(s2, (t) => {
671
671
  this.register(t);
672
672
  })), this.collection;
673
673
  }
@@ -676,15 +676,15 @@
676
676
  await this.deregister(this.collection[0]);
677
677
  return this.collection;
678
678
  }
679
- get(s, t = "id") {
680
- return this.collection.find((e) => e[t] === s);
679
+ get(s2, t = "id") {
680
+ return this.collection.find((e) => e[t] === s2);
681
681
  }
682
682
  }
683
683
  const o = {
684
684
  inert: ":not([inert]):not([inert] *)",
685
685
  negTabIndex: ':not([tabindex^="-"])',
686
686
  disabled: ":not(:disabled)"
687
- }, A = [
687
+ }, M$1 = [
688
688
  `a[href]${o.inert}${o.negTabIndex}`,
689
689
  `area[href]${o.inert}${o.negTabIndex}`,
690
690
  `input:not([type="hidden"]):not([type="radio"])${o.inert}${o.negTabIndex}${o.disabled}`,
@@ -703,15 +703,15 @@
703
703
  `[tabindex]${o.inert}${o.negTabIndex}`
704
704
  ];
705
705
  var g, c, d;
706
- class M {
707
- constructor(s = null, t = "[data-focus]") {
708
- b(this, g, void 0), b(this, c, void 0), b(this, d, void 0), this.el = s, this.selectorFocus = t, y(this, c, P.bind(this)), y(this, d, R.bind(this));
706
+ class A {
707
+ constructor(s2 = null, t = "[data-focus]") {
708
+ y(this, g, void 0), y(this, c, void 0), y(this, d, void 0), this.el = s2, this.selectorFocus = t, w(this, c, P.bind(this)), w(this, d, R.bind(this));
709
709
  }
710
710
  get focusable() {
711
711
  return a(this, g);
712
712
  }
713
- set focusable(s) {
714
- y(this, g, s), 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)));
713
+ set focusable(s2) {
714
+ 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)));
715
715
  }
716
716
  get focusableFirst() {
717
717
  return this.focusable[0];
@@ -719,81 +719,81 @@
719
719
  get focusableLast() {
720
720
  return this.focusable[this.focusable.length - 1];
721
721
  }
722
- mount(s, t) {
723
- s && (this.el = s), t && (this.selectorFocus = t), this.focusable = this.getFocusable(), this.focus();
722
+ mount(s2, t) {
723
+ s2 && (this.el = s2), t && (this.selectorFocus = t), this.focusable = this.getFocusable(), this.focus();
724
724
  }
725
725
  unmount() {
726
726
  this.el = null, this.focusable = [], document.removeEventListener("keydown", a(this, c)), document.removeEventListener("keydown", a(this, d));
727
727
  }
728
- focus(s = this.el, t = this.selectorFocus) {
729
- (s.querySelector(t) || s).focus();
728
+ focus(s2 = this.el, t = this.selectorFocus) {
729
+ (s2.querySelector(t) || s2).focus();
730
730
  }
731
- getFocusable(s = this.el) {
732
- const t = [], e = document.activeElement, n = s.scrollTop;
733
- return s.querySelectorAll(A.join(",")).forEach((r2) => {
734
- r2.focus(), document.activeElement === r2 && t.push(r2);
735
- }), s.scrollTop = n, e.focus(), t;
731
+ getFocusable(s2 = this.el) {
732
+ const t = [], e = document.activeElement, n = s2.scrollTop;
733
+ return s2.querySelectorAll(M$1.join(",")).forEach((r) => {
734
+ r.focus(), document.activeElement === r && t.push(r);
735
+ }), s2.scrollTop = n, e.focus(), t;
736
736
  }
737
737
  }
738
738
  g = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
739
- function P(i2) {
740
- (i2.key === "Tab" || i2.keyCode === 9) && (i2.shiftKey ? (document.activeElement === this.focusableFirst || document.activeElement === this.el) && (i2.preventDefault(), this.focusableLast.focus()) : (document.activeElement === this.focusableLast || document.activeElement === this.el) && (i2.preventDefault(), this.focusableFirst.focus()));
739
+ function P(i) {
740
+ (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()));
741
741
  }
742
- function R(i2) {
743
- (i2.key === "Tab" || i2.keyCode === 9) && i2.preventDefault();
742
+ function R(i) {
743
+ (i.key === "Tab" || i.keyCode === 9) && i.preventDefault();
744
744
  }
745
745
  function F$1() {
746
- return getComputedStyle(document.body).getPropertyValue("--vrembem-prefix").trim();
746
+ return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
747
747
  }
748
- function D$1(i2, s = document.body, t = true) {
749
- if (t) {
750
- const n = F$1();
751
- n && !i2.includes(`--${n}`) && (i2 = i2.replace("--", `--${n}`));
748
+ function D$1(i, s2 = document.body) {
749
+ if (i.slice(0, 2) !== "--") {
750
+ const e = F$1();
751
+ e && (i = `${e}${i}`), i = `--${i}`;
752
752
  }
753
- const e = getComputedStyle(s).getPropertyValue(i2).trim();
754
- if (e)
755
- return e;
756
- throw new Error(`CSS variable "${i2}" was not found!`);
753
+ const t = getComputedStyle(s2).getPropertyValue(i).trim();
754
+ if (t)
755
+ return t;
756
+ throw new Error(`CSS variable "${i}" was not found!`);
757
757
  }
758
- function N$1(i2, s) {
759
- const t = (i2.getAttribute(`data-${s}`) || "").replace(/'/g, '"');
758
+ function N$1(i, s2) {
759
+ const t = (i.getAttribute(`data-${s2}`) || "").replace(/'/g, '"');
760
760
  return t ? JSON.parse(t) : {};
761
761
  }
762
- function L(i2, s, t) {
763
- const e = s.nodeType === Node.COMMENT_NODE, n = s.nodeType === Node.ELEMENT_NODE;
764
- if (s = e || n ? s : document.querySelector(s), e && (t = "after"), !s)
765
- throw new Error(`Not a valid teleport reference: '${s}'`);
766
- if (typeof s[t] != "function")
762
+ function T$1(i, s2, t) {
763
+ const e = s2.nodeType === Node.COMMENT_NODE, n = s2.nodeType === Node.ELEMENT_NODE;
764
+ if (s2 = e || n ? s2 : document.querySelector(s2), e && (t = "after"), !s2)
765
+ throw new Error(`Not a valid teleport reference: '${s2}'`);
766
+ if (typeof s2[t] != "function")
767
767
  throw new Error(`Not a valid teleport method: '${t}'`);
768
- let r2 = null;
769
- return e || (r2 = document.createComment("teleported #" + i2.id), i2.before(r2)), s[t](i2), e && s.remove(), r2;
768
+ let r = null;
769
+ return e || (r = document.createComment("teleported #" + i.id), i.before(r)), s2[t](i), e && s2.remove(), r;
770
770
  }
771
- function S$1(i2, s, t, e = "--transition-duration") {
771
+ function S$1(i, s2, t, e = "transition-duration") {
772
772
  return new Promise((n) => {
773
773
  if (typeof e == "string") {
774
- const r2 = D$1(e, i2), l2 = !!r2.includes("ms");
775
- e = parseFloat(r2) * (l2 ? 1 : 1e3);
774
+ const r = D$1(e, i), l2 = !!r.includes("ms");
775
+ e = parseFloat(r) * (l2 ? 1 : 1e3);
776
776
  }
777
- i2.classList.remove(s.finish), i2.classList.add(t.start), setTimeout(() => {
778
- i2.classList.add(t.finish), i2.classList.remove(t.start), n(i2);
777
+ i.classList.remove(s2.finish), i.classList.add(t.start), setTimeout(() => {
778
+ i.classList.add(t.finish), i.classList.remove(t.start), n(i);
779
779
  }, e);
780
780
  });
781
781
  }
782
- function z(i2, s) {
783
- s && document.querySelectorAll(s).forEach((t) => {
784
- i2 ? t.style.overflow = "hidden" : t.style.removeProperty("overflow");
782
+ function z(i, s2) {
783
+ s2 && document.querySelectorAll(s2).forEach((t) => {
784
+ i ? t.style.overflow = "hidden" : t.style.removeProperty("overflow");
785
785
  });
786
786
  }
787
- function j$1(i2, s) {
788
- s && document.querySelectorAll(s).forEach((t) => {
789
- i2 ? (t.inert = true, t.setAttribute("aria-hidden", true)) : (t.inert = null, t.removeAttribute("aria-hidden"));
787
+ function j(i, s2) {
788
+ s2 && document.querySelectorAll(s2).forEach((t) => {
789
+ i ? (t.inert = true, t.setAttribute("aria-hidden", true)) : (t.inert = null, t.removeAttribute("aria-hidden"));
790
790
  });
791
791
  }
792
- function W(i2, s) {
793
- j$1(!!i2, s.selectorInert), z(!!i2, s.selectorOverflow);
792
+ function W(i, s2) {
793
+ j(!!i, s2.selectorInert), z(!!i, s2.selectorOverflow);
794
794
  }
795
795
  const _$1 = {
796
- autoInit: false,
796
+ autoMount: false,
797
797
  // Data attributes
798
798
  dataOpen: "modal-open",
799
799
  dataClose: "modal-close",
@@ -819,57 +819,57 @@
819
819
  teleportMethod: "append",
820
820
  setTabindex: true,
821
821
  transition: true,
822
- transitionDuration: "--vb-modal-transition-duration"
822
+ transitionDuration: "modal-transition-duration"
823
823
  };
824
- async function G(i2) {
825
- const s = i2.target.closest(`
824
+ function m(i) {
825
+ const s2 = typeof i == "string" ? this.get(i) : this.get(i.id);
826
+ if (s2)
827
+ return s2;
828
+ throw new Error(`Modal not found in collection with id of "${i.id || i}".`);
829
+ }
830
+ function p() {
831
+ this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
832
+ }
833
+ async function G(i) {
834
+ const s2 = i.target.closest(`
826
835
  [data-${this.settings.dataOpen}],
827
836
  [data-${this.settings.dataReplace}],
828
837
  [data-${this.settings.dataClose}]
829
838
  `);
830
- if (s) {
831
- if (i2.preventDefault(), s.matches(`[data-${this.settings.dataOpen}]`)) {
832
- const t = s.getAttribute(`data-${this.settings.dataOpen}`).trim(), e = this.get(t);
833
- return i2.target.closest(this.settings.selectorModal) || (this.trigger = s), e.open();
839
+ if (s2) {
840
+ if (i.preventDefault(), s2.matches(`[data-${this.settings.dataOpen}]`)) {
841
+ const t = s2.getAttribute(`data-${this.settings.dataOpen}`).trim(), e = m.call(this, t);
842
+ return i.target.closest(this.settings.selectorModal) || (this.trigger = s2), e.open();
834
843
  }
835
- if (s.matches(`[data-${this.settings.dataReplace}]`)) {
836
- const t = s.getAttribute(`data-${this.settings.dataReplace}`).trim(), e = this.get(t);
837
- return i2.target.closest(this.settings.selectorModal) || (this.trigger = s), e.replace();
844
+ if (s2.matches(`[data-${this.settings.dataReplace}]`)) {
845
+ const t = s2.getAttribute(`data-${this.settings.dataReplace}`).trim(), e = m.call(this, t);
846
+ return i.target.closest(this.settings.selectorModal) || (this.trigger = s2), e.replace();
838
847
  }
839
- if (s.matches(`[data-${this.settings.dataClose}]`)) {
840
- const t = s.getAttribute(`data-${this.settings.dataClose}`).trim();
848
+ if (s2.matches(`[data-${this.settings.dataClose}]`)) {
849
+ const t = s2.getAttribute(`data-${this.settings.dataClose}`).trim();
841
850
  return t === "*" ? this.closeAll() : this.close(t);
842
851
  }
843
852
  }
844
- if (this.active && i2.target.matches(this.settings.selectorScreen) && !this.active.required)
853
+ if (this.active && i.target.matches(this.settings.selectorScreen) && !this.active.required)
845
854
  return this.close(this.active.id);
846
855
  }
847
- function K$1(i2) {
848
- if (i2.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
856
+ function K$1(i) {
857
+ if (i.key === "Escape" && this.active && !this.active.dialog.matches(this.settings.selectorRequired))
849
858
  return this.close();
850
859
  }
851
- async function w(i2, s = true) {
852
- const t = this.collection.findIndex((e) => e.id === i2.id);
860
+ async function E(i, s2 = true) {
861
+ const t = this.collection.findIndex((e) => e.id === i.id);
853
862
  if (t >= 0) {
854
863
  const e = this.collection[t];
855
- s && e.state === "opened" ? await e.close(false) : this.stack.remove(e), e.getSetting("teleport") && e.teleportReturn(), Object.getOwnPropertyNames(e).forEach((n) => {
864
+ s2 && e.state === "opened" ? await e.close(false) : this.stack.remove(e), e.getSetting("teleport") && e.teleportReturn(), Object.getOwnPropertyNames(e).forEach((n) => {
856
865
  delete e[n];
857
866
  }), this.collection.splice(t, 1);
858
867
  }
859
868
  return this.collection;
860
869
  }
861
- function $(i2) {
862
- const s = typeof i2 == "string" ? this.get(i2) : this.get(i2.id);
863
- if (s)
864
- return s;
865
- throw new Error(`Modal not found in collection with id of "${i2.id || i2}".`);
866
- }
867
- function p() {
868
- this.active ? this.focusTrap.mount(this.active.dialog, this.settings.selectorFocus) : (this.trigger && (this.trigger.focus(), this.trigger = null), this.focusTrap.unmount());
869
- }
870
- async function x(i2, s, t = true) {
871
- const e = $.call(this, i2), n = { ...this.settings, ...e.settings };
872
- return s !== void 0 && (n.transition = s), this.stack.moveToTop(e), e.state === "closed" && (e.state = "opening", this.stack.add(e), n.transition ? await S$1(e.el, {
870
+ async function x(i, s2, t = true) {
871
+ const e = m.call(this, i), n = { ...this.settings, ...e.settings };
872
+ 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, {
873
873
  start: n.stateClosing,
874
874
  finish: n.stateClosed
875
875
  }, {
@@ -880,12 +880,12 @@
880
880
  bubbles: true
881
881
  })), e;
882
882
  }
883
- async function C(i2, s, t = true) {
884
- const e = i2 ? $.call(this, i2) : this.active;
883
+ async function C(i, s2, t = true) {
884
+ const e = i ? m.call(this, i) : this.active;
885
885
  if (e && e.state === "opened") {
886
886
  e.state = "closing";
887
887
  const n = { ...this.settings, ...e.settings };
888
- s !== void 0 && (n.transition = s), document.activeElement.blur(), n.transition ? await S$1(e.el, {
888
+ s2 !== void 0 && (n.transition = s2), document.activeElement.blur(), n.transition ? await S$1(e.el, {
889
889
  start: n.stateOpening,
890
890
  finish: n.stateOpened
891
891
  }, {
@@ -898,84 +898,84 @@
898
898
  }
899
899
  return e;
900
900
  }
901
- async function E(i2, s) {
901
+ async function $(i, s2) {
902
902
  const t = [];
903
903
  return await Promise.all(this.stack.value.map(async (e) => {
904
- i2 && i2 === e.id ? Promise.resolve() : t.push(await C.call(this, e, s, false)), e.trigger = null;
904
+ i && i === e.id ? Promise.resolve() : t.push(await C.call(this, e, s2, false)), e.trigger = null;
905
905
  })), t;
906
906
  }
907
- async function k$1(i2, s, t = true) {
908
- const e = $.call(this, i2);
909
- let n, r2;
910
- return e.state === "opened" ? (n = e, r2 = await E.call(this, e.id, s)) : (r2 = E.call(this, false, s), n = x.call(this, e, s, false), await Promise.all([n, r2])), t && p.call(this), { opened: n, closed: r2 };
907
+ async function k$1(i, s2, t = true) {
908
+ const e = m.call(this, i);
909
+ let n, r;
910
+ 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 };
911
911
  }
912
- async function V(i2, s = {}) {
913
- await w.call(this, i2, false);
912
+ async function V$1(i, s2 = {}) {
913
+ await E.call(this, i, false);
914
914
  const t = this, e = {
915
- id: i2.id,
915
+ id: i.id,
916
916
  state: "closed",
917
- el: i2,
917
+ el: i,
918
918
  dialog: null,
919
919
  get required() {
920
920
  return this.dialog.matches(this.getSetting("selectorRequired"));
921
921
  },
922
922
  returnRef: null,
923
- settings: { ...N$1(i2, this.settings.dataConfig), ...s },
924
- open(r2, l2) {
925
- return x.call(t, this, r2, l2);
923
+ settings: { ...N$1(i, this.settings.dataConfig), ...s2 },
924
+ open(r, l2) {
925
+ return x.call(t, this, r, l2);
926
926
  },
927
- close(r2, l2) {
928
- return C.call(t, this, r2, l2);
927
+ close(r, l2) {
928
+ return C.call(t, this, r, l2);
929
929
  },
930
- replace(r2, l2) {
931
- return k$1.call(t, this, r2, l2);
930
+ replace(r, l2) {
931
+ return k$1.call(t, this, r, l2);
932
932
  },
933
933
  deregister() {
934
- return w.call(t, this);
934
+ return E.call(t, this);
935
935
  },
936
- teleport(r2 = this.getSetting("teleport"), l2 = this.getSetting("teleportMethod")) {
937
- return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = L(this.el, r2, l2), this.el);
936
+ teleport(r = this.getSetting("teleport"), l2 = this.getSetting("teleportMethod")) {
937
+ return this.returnRef ? (console.error("Element has already been teleported:", this.el), false) : (this.returnRef = T$1(this.el, r, l2), this.el);
938
938
  },
939
939
  teleportReturn() {
940
- return this.returnRef ? (this.returnRef = L(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), false);
940
+ return this.returnRef ? (this.returnRef = T$1(this.el, this.returnRef), this.el) : (console.error("No return reference found:", this.el), false);
941
941
  },
942
- getSetting(r2) {
943
- return r2 in this.settings ? this.settings[r2] : t.settings[r2];
942
+ getSetting(r) {
943
+ return r in this.settings ? this.settings[r] : t.settings[r];
944
944
  }
945
- }, n = i2.querySelector(e.getSetting("selectorDialog"));
946
- return e.dialog = n || i2, 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;
945
+ }, n = i.querySelector(e.getSetting("selectorDialog"));
946
+ 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;
947
947
  }
948
- function q(i2) {
949
- const s = [];
948
+ function q(i) {
949
+ const s2 = [];
950
950
  return {
951
951
  get value() {
952
- return [...s];
952
+ return [...s2];
953
953
  },
954
954
  get top() {
955
- return s[s.length - 1];
955
+ return s2[s2.length - 1];
956
956
  },
957
957
  updateIndex() {
958
- s.forEach((t, e) => {
958
+ s2.forEach((t, e) => {
959
959
  t.el.style.zIndex = null;
960
960
  const n = getComputedStyle(t.el)["z-index"];
961
961
  t.el.style.zIndex = parseInt(n) + e + 1;
962
962
  });
963
963
  },
964
964
  updateGlobalState() {
965
- W(this.top, i2), this.updateIndex();
965
+ W(this.top, i), this.updateIndex();
966
966
  },
967
967
  add(t) {
968
968
  t.el.style.zIndex = null;
969
969
  const e = getComputedStyle(t.el)["z-index"];
970
- t.el.style.zIndex = parseInt(e) + s.length + 1, s.push(t), this.updateGlobalState();
970
+ t.el.style.zIndex = parseInt(e) + s2.length + 1, s2.push(t), this.updateGlobalState();
971
971
  },
972
972
  remove(t) {
973
- const e = s.findIndex((n) => n.id === t.id);
974
- e >= 0 && (t.el.style.zIndex = null, s.splice(e, 1), this.updateGlobalState());
973
+ const e = s2.findIndex((n) => n.id === t.id);
974
+ e >= 0 && (t.el.style.zIndex = null, s2.splice(e, 1), this.updateGlobalState());
975
975
  },
976
976
  moveToTop(t) {
977
- const e = s.findIndex((n) => n.id === t.id);
978
- e >= 0 && (s.splice(e, 1), this.add(t));
977
+ const e = s2.findIndex((n) => n.id === t.id);
978
+ e >= 0 && (s2.splice(e, 1), this.add(t));
979
979
  }
980
980
  };
981
981
  }
@@ -983,34 +983,34 @@
983
983
  let J$1 = class J extends O {
984
984
  constructor(t) {
985
985
  super();
986
- m(this, u, void 0);
987
- m(this, h, void 0);
988
- this.defaults = _$1, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new M(), this.stack = q(this.settings), v(this, u, G.bind(this)), v(this, h, K$1.bind(this)), this.settings.autoInit && this.init();
986
+ v(this, u, void 0);
987
+ v(this, h, void 0);
988
+ this.defaults = _$1, this.settings = { ...this.defaults, ...t }, this.trigger = null, this.focusTrap = new A(), this.stack = q(this.settings), b(this, u, G.bind(this)), b(this, h, K$1.bind(this)), this.settings.autoMount && this.mount();
989
989
  }
990
990
  get active() {
991
991
  return this.stack.top;
992
992
  }
993
- async init(t) {
993
+ async mount(t) {
994
994
  t && (this.settings = { ...this.settings, ...t });
995
995
  const e = document.querySelectorAll(this.settings.selectorModal);
996
- return await this.registerCollection(e), this.settings.eventListeners && this.initEventListeners(), this;
996
+ return await this.registerCollection(e), this.settings.eventListeners && this.mountEventListeners(), this;
997
997
  }
998
- async destroy() {
999
- return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(), this;
998
+ async unmount() {
999
+ return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(), this;
1000
1000
  }
1001
- initEventListeners() {
1001
+ mountEventListeners() {
1002
1002
  document.addEventListener("click", f(this, u), false), document.addEventListener("keydown", f(this, h), false);
1003
1003
  }
1004
- destroyEventListeners() {
1004
+ unmountEventListeners() {
1005
1005
  document.removeEventListener("click", f(this, u), false), document.removeEventListener("keydown", f(this, h), false);
1006
1006
  }
1007
1007
  register(t, e = {}) {
1008
1008
  let n = typeof t == "string" ? document.getElementById(t) : t;
1009
- return n ? V.call(this, n, e) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${t.id || t}".`));
1009
+ return n ? V$1.call(this, n, e) : Promise.reject(new Error(`Failed to register; modal not found with ID of: "${t.id || t}".`));
1010
1010
  }
1011
1011
  deregister(t) {
1012
1012
  let e = this.get(t.id || t);
1013
- return e ? w.call(this, e) : Promise.reject(new Error(`Failed to deregister; modal does not exist in collection with ID of: "${t.id || t}".`));
1013
+ 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}".`));
1014
1014
  }
1015
1015
  open(t, e, n) {
1016
1016
  return x.call(this, t, e, n);
@@ -1022,20 +1022,20 @@
1022
1022
  return k$1.call(this, t, e, n);
1023
1023
  }
1024
1024
  async closeAll(t = false, e, n = true) {
1025
- const r2 = await E.call(this, t, e);
1026
- return n && p.call(this), r2;
1025
+ const r = await $.call(this, t, e);
1026
+ return n && p.call(this), r;
1027
1027
  }
1028
1028
  };
1029
1029
  u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
1030
- var Ue = (e, t, r2) => {
1030
+ var Ue = (e, t, r) => {
1031
1031
  if (!t.has(e))
1032
- throw TypeError("Cannot " + r2);
1032
+ throw TypeError("Cannot " + r);
1033
1033
  };
1034
- var Ae = (e, t, r2) => (Ue(e, t, "read from private field"), r2 ? r2.call(e) : t.get(e)), _e = (e, t, r2) => {
1034
+ var Ae = (e, t, r) => (Ue(e, t, "read from private field"), r ? r.call(e) : t.get(e)), _e = (e, t, r) => {
1035
1035
  if (t.has(e))
1036
1036
  throw TypeError("Cannot add the same private member more than once");
1037
- t instanceof WeakSet ? t.add(e) : t.set(e, r2);
1038
- }, Ke = (e, t, r2, i2) => (Ue(e, t, "write to private field"), i2 ? i2.call(e, r2) : t.set(e, r2), r2);
1037
+ t instanceof WeakSet ? t.add(e) : t.set(e, r);
1038
+ }, Ke = (e, t, r, i) => (Ue(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
1039
1039
  class $t {
1040
1040
  constructor() {
1041
1041
  this.collection = [];
@@ -1044,18 +1044,18 @@
1044
1044
  return await this.deregister(t), this.collection.push(t), this.collection;
1045
1045
  }
1046
1046
  async deregister(t) {
1047
- const r2 = this.collection.findIndex((i2) => i2 === t);
1048
- if (r2 >= 0) {
1049
- const i2 = this.collection[r2];
1050
- Object.getOwnPropertyNames(i2).forEach((n) => {
1051
- delete i2[n];
1052
- }), this.collection.splice(r2, 1);
1047
+ const r = this.collection.findIndex((i) => i === t);
1048
+ if (r >= 0) {
1049
+ const i = this.collection[r];
1050
+ Object.getOwnPropertyNames(i).forEach((n) => {
1051
+ delete i[n];
1052
+ }), this.collection.splice(r, 1);
1053
1053
  }
1054
1054
  return this.collection;
1055
1055
  }
1056
1056
  async registerCollection(t) {
1057
- return await Promise.all(Array.from(t, (r2) => {
1058
- this.register(r2);
1057
+ return await Promise.all(Array.from(t, (r) => {
1058
+ this.register(r);
1059
1059
  })), this.collection;
1060
1060
  }
1061
1061
  async deregisterCollection() {
@@ -1063,15 +1063,15 @@
1063
1063
  await this.deregister(this.collection[0]);
1064
1064
  return this.collection;
1065
1065
  }
1066
- get(t, r2 = "id") {
1067
- return this.collection.find((i2) => i2[r2] === t);
1066
+ get(t, r = "id") {
1067
+ return this.collection.find((i) => i[r] === t);
1068
1068
  }
1069
1069
  }
1070
1070
  function Ct() {
1071
- return getComputedStyle(document.body).getPropertyValue("--vrembem-prefix").trim();
1071
+ return getComputedStyle(document.body).getPropertyValue("--vb-prefix").trim();
1072
1072
  }
1073
1073
  const kt = {
1074
- autoInit: false,
1074
+ autoMount: false,
1075
1075
  // Selectors
1076
1076
  selectorPopover: ".popover",
1077
1077
  selectorArrow: ".popover__arrow",
@@ -1083,7 +1083,7 @@
1083
1083
  placement: "bottom"
1084
1084
  };
1085
1085
  function ot(e, t) {
1086
- const r2 = getComputedStyle(e), i2 = {
1086
+ const r = getComputedStyle(e), i = {
1087
1087
  placement: t.placement,
1088
1088
  event: t.eventType,
1089
1089
  offset: 0,
@@ -1092,43 +1092,43 @@
1092
1092
  "arrow-element": t.selectorArrow,
1093
1093
  "arrow-padding": 0
1094
1094
  };
1095
- for (const n in i2) {
1096
- const o2 = Ct(), l2 = r2.getPropertyValue(`--${o2}popover-${n}`).trim();
1097
- l2 && (i2[n] = l2);
1095
+ for (const n in i) {
1096
+ const o2 = Ct(), l2 = r.getPropertyValue(`--${o2}popover-${n}`).trim();
1097
+ l2 && (i[n] = l2);
1098
1098
  }
1099
- return i2;
1099
+ return i;
1100
1100
  }
1101
1101
  function Pe(e) {
1102
1102
  let t;
1103
- const r2 = typeof e == "string" ? e.trim().split(" ") : [e];
1104
- switch (r2.forEach(function(i2, n) {
1105
- r2[n] = parseInt(i2, 10);
1106
- }), r2.length) {
1103
+ const r = typeof e == "string" ? e.trim().split(" ") : [e];
1104
+ switch (r.forEach(function(i, n) {
1105
+ r[n] = parseInt(i, 10);
1106
+ }), r.length) {
1107
1107
  case 1:
1108
- t = r2[0];
1108
+ t = r[0];
1109
1109
  break;
1110
1110
  case 2:
1111
1111
  t = {
1112
- top: r2[0],
1113
- right: r2[1],
1114
- bottom: r2[0],
1115
- left: r2[1]
1112
+ top: r[0],
1113
+ right: r[1],
1114
+ bottom: r[0],
1115
+ left: r[1]
1116
1116
  };
1117
1117
  break;
1118
1118
  case 3:
1119
1119
  t = {
1120
- top: r2[0],
1121
- right: r2[1],
1122
- bottom: r2[2],
1123
- left: r2[1]
1120
+ top: r[0],
1121
+ right: r[1],
1122
+ bottom: r[2],
1123
+ left: r[1]
1124
1124
  };
1125
1125
  break;
1126
1126
  case 4:
1127
1127
  t = {
1128
- top: r2[0],
1129
- right: r2[1],
1130
- bottom: r2[2],
1131
- left: r2[3]
1128
+ top: r[0],
1129
+ right: r[1],
1130
+ bottom: r[2],
1131
+ left: r[3]
1132
1132
  };
1133
1133
  break;
1134
1134
  default:
@@ -1173,8 +1173,8 @@
1173
1173
  function Bt(e) {
1174
1174
  const t = Rt.call(this, e);
1175
1175
  if (t) {
1176
- const r2 = document.querySelector(`#${t}`), i2 = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1177
- return !i2 && !r2 ? { error: new Error(`No popover elements found using the ID: "${t}".`) } : i2 ? r2 ? { popover: r2, trigger: i2 } : { error: new Error("No popover associated with the provided popover trigger.") } : { error: new Error("No popover trigger associated with the provided popover.") };
1176
+ const r = document.querySelector(`#${t}`), i = document.querySelector(`[aria-controls="${t}"]`) || document.querySelector(`[aria-describedby="${t}"]`);
1177
+ 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.") };
1178
1178
  } else
1179
1179
  return { error: new Error("Could not resolve the popover ID.") };
1180
1180
  }
@@ -1192,10 +1192,10 @@
1192
1192
  }
1193
1193
  function ct(e) {
1194
1194
  e.state == "opened" && setTimeout(() => {
1195
- const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r2 = document.activeElement.closest(
1195
+ const t = e.el.closest(":hover") === e.el || e.trigger.closest(":hover") === e.trigger, r = document.activeElement.closest(
1196
1196
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
1197
1197
  );
1198
- return !t && !r2 && e.close(), e;
1198
+ return !t && !r && e.close(), e;
1199
1199
  }, 1);
1200
1200
  }
1201
1201
  function Tt(e) {
@@ -1217,17 +1217,17 @@
1217
1217
  }
1218
1218
  function lt(e) {
1219
1219
  const t = this;
1220
- document.addEventListener("click", function r2(i2) {
1221
- i2.target.closest(
1220
+ document.addEventListener("click", function r(i) {
1221
+ i.target.closest(
1222
1222
  `#${e.id}, [aria-controls="${e.id}"], [aria-describedby="${e.id}"]`
1223
- ) ? e.el && !e.el.classList.contains(t.settings.stateActive) && this.removeEventListener("click", r2) : (e.el && e.el.classList.contains(t.settings.stateActive) && e.close(), this.removeEventListener("click", r2));
1223
+ ) ? 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));
1224
1224
  });
1225
1225
  }
1226
- var k = "top", S = "bottom", j = "right", D = "left", De = "auto", le = [k, S, j, D], Q = "start", se = "end", jt = "clippingParents", ft = "viewport", ne = "popper", Mt = "reference", Ge = /* @__PURE__ */ le.reduce(function(e, t) {
1226
+ var k = "top", S = "bottom", M = "right", D = "left", De = "auto", le = [k, S, M, D], Q = "start", se = "end", Mt = "clippingParents", ft = "viewport", ne = "popper", jt = "reference", Ge = /* @__PURE__ */ le.reduce(function(e, t) {
1227
1227
  return e.concat([t + "-" + Q, t + "-" + se]);
1228
1228
  }, []), ut = /* @__PURE__ */ [].concat(le, [De]).reduce(function(e, t) {
1229
1229
  return e.concat([t, t + "-" + Q, t + "-" + se]);
1230
- }, []), Wt = "beforeRead", Ht = "read", Nt = "afterRead", It = "beforeMain", Vt = "main", Ft = "afterMain", Xt = "beforeWrite", Yt = "write", qt = "afterWrite", zt = [Wt, Ht, Nt, It, Vt, Ft, Xt, Yt, qt];
1230
+ }, []), 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];
1231
1231
  function N(e) {
1232
1232
  return e ? (e.nodeName || "").toLowerCase() : null;
1233
1233
  }
@@ -1256,16 +1256,16 @@
1256
1256
  }
1257
1257
  function Ut(e) {
1258
1258
  var t = e.state;
1259
- Object.keys(t.elements).forEach(function(r2) {
1260
- var i2 = t.styles[r2] || {}, n = t.attributes[r2] || {}, o2 = t.elements[r2];
1261
- !T(o2) || !N(o2) || (Object.assign(o2.style, i2), Object.keys(n).forEach(function(l2) {
1262
- var s = n[l2];
1263
- s === false ? o2.removeAttribute(l2) : o2.setAttribute(l2, s === true ? "" : s);
1259
+ Object.keys(t.elements).forEach(function(r) {
1260
+ var i = t.styles[r] || {}, n = t.attributes[r] || {}, o2 = t.elements[r];
1261
+ !T(o2) || !N(o2) || (Object.assign(o2.style, i), Object.keys(n).forEach(function(l2) {
1262
+ var s2 = n[l2];
1263
+ s2 === false ? o2.removeAttribute(l2) : o2.setAttribute(l2, s2 === true ? "" : s2);
1264
1264
  }));
1265
1265
  });
1266
1266
  }
1267
1267
  function _t(e) {
1268
- var t = e.state, r2 = {
1268
+ var t = e.state, r = {
1269
1269
  popper: {
1270
1270
  position: t.options.strategy,
1271
1271
  left: "0",
@@ -1277,12 +1277,12 @@
1277
1277
  },
1278
1278
  reference: {}
1279
1279
  };
1280
- return Object.assign(t.elements.popper.style, r2.popper), t.styles = r2, t.elements.arrow && Object.assign(t.elements.arrow.style, r2.arrow), function() {
1281
- Object.keys(t.elements).forEach(function(i2) {
1282
- var n = t.elements[i2], o2 = t.attributes[i2] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i2) ? t.styles[i2] : r2[i2]), s = l2.reduce(function(a2, f2) {
1280
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
1281
+ Object.keys(t.elements).forEach(function(i) {
1282
+ var n = t.elements[i], o2 = t.attributes[i] || {}, l2 = Object.keys(t.styles.hasOwnProperty(i) ? t.styles[i] : r[i]), s2 = l2.reduce(function(a2, f2) {
1283
1283
  return a2[f2] = "", a2;
1284
1284
  }, {});
1285
- !T(n) || !N(n) || (Object.assign(n.style, s), Object.keys(o2).forEach(function(a2) {
1285
+ !T(n) || !N(n) || (Object.assign(n.style, s2), Object.keys(o2).forEach(function(a2) {
1286
1286
  n.removeAttribute(a2);
1287
1287
  }));
1288
1288
  });
@@ -1309,11 +1309,11 @@
1309
1309
  function pt() {
1310
1310
  return !/^((?!chrome|android).)*safari/i.test(Le());
1311
1311
  }
1312
- function ee(e, t, r2) {
1313
- t === void 0 && (t = false), r2 === void 0 && (r2 = false);
1314
- var i2 = e.getBoundingClientRect(), n = 1, o2 = 1;
1315
- t && T(e) && (n = e.offsetWidth > 0 && Z(i2.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i2.height) / e.offsetHeight || 1);
1316
- var l2 = K(e) ? B(e) : window, s = l2.visualViewport, a2 = !pt() && r2, f2 = (i2.left + (a2 && s ? s.offsetLeft : 0)) / n, c2 = (i2.top + (a2 && s ? s.offsetTop : 0)) / o2, h2 = i2.width / n, y2 = i2.height / o2;
1312
+ function ee(e, t, r) {
1313
+ t === void 0 && (t = false), r === void 0 && (r = false);
1314
+ var i = e.getBoundingClientRect(), n = 1, o2 = 1;
1315
+ t && T(e) && (n = e.offsetWidth > 0 && Z(i.width) / e.offsetWidth || 1, o2 = e.offsetHeight > 0 && Z(i.height) / e.offsetHeight || 1);
1316
+ 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;
1317
1317
  return {
1318
1318
  width: h2,
1319
1319
  height: y2,
@@ -1326,29 +1326,29 @@
1326
1326
  };
1327
1327
  }
1328
1328
  function Be(e) {
1329
- var t = ee(e), r2 = e.offsetWidth, i2 = e.offsetHeight;
1330
- return Math.abs(t.width - r2) <= 1 && (r2 = t.width), Math.abs(t.height - i2) <= 1 && (i2 = t.height), {
1329
+ var t = ee(e), r = e.offsetWidth, i = e.offsetHeight;
1330
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
1331
1331
  x: e.offsetLeft,
1332
1332
  y: e.offsetTop,
1333
- width: r2,
1334
- height: i2
1333
+ width: r,
1334
+ height: i
1335
1335
  };
1336
1336
  }
1337
1337
  function dt(e, t) {
1338
- var r2 = t.getRootNode && t.getRootNode();
1338
+ var r = t.getRootNode && t.getRootNode();
1339
1339
  if (e.contains(t))
1340
1340
  return true;
1341
- if (r2 && Re(r2)) {
1342
- var i2 = t;
1341
+ if (r && Re(r)) {
1342
+ var i = t;
1343
1343
  do {
1344
- if (i2 && e.isSameNode(i2))
1344
+ if (i && e.isSameNode(i))
1345
1345
  return true;
1346
- i2 = i2.parentNode || i2.host;
1347
- } while (i2);
1346
+ i = i.parentNode || i.host;
1347
+ } while (i);
1348
1348
  }
1349
1349
  return false;
1350
1350
  }
1351
- function I(e) {
1351
+ function V(e) {
1352
1352
  return B(e).getComputedStyle(e);
1353
1353
  }
1354
1354
  function Gt(e) {
@@ -1374,18 +1374,18 @@
1374
1374
  }
1375
1375
  function Je(e) {
1376
1376
  return !T(e) || // https://github.com/popperjs/popper-core/issues/837
1377
- I(e).position === "fixed" ? null : e.offsetParent;
1377
+ V(e).position === "fixed" ? null : e.offsetParent;
1378
1378
  }
1379
1379
  function Jt(e) {
1380
- var t = /firefox/i.test(Le()), r2 = /Trident/i.test(Le());
1381
- if (r2 && T(e)) {
1382
- var i2 = I(e);
1383
- if (i2.position === "fixed")
1380
+ var t = /firefox/i.test(Le()), r = /Trident/i.test(Le());
1381
+ if (r && T(e)) {
1382
+ var i = V(e);
1383
+ if (i.position === "fixed")
1384
1384
  return null;
1385
1385
  }
1386
1386
  var n = we(e);
1387
1387
  for (Re(n) && (n = n.host); T(n) && ["html", "body"].indexOf(N(n)) < 0; ) {
1388
- var o2 = I(n);
1388
+ var o2 = V(n);
1389
1389
  if (o2.transform !== "none" || o2.perspective !== "none" || o2.contain === "paint" || ["transform", "perspective"].indexOf(o2.willChange) !== -1 || t && o2.willChange === "filter" || t && o2.filter && o2.filter !== "none")
1390
1390
  return n;
1391
1391
  n = n.parentNode;
@@ -1393,19 +1393,19 @@
1393
1393
  return null;
1394
1394
  }
1395
1395
  function fe(e) {
1396
- for (var t = B(e), r2 = Je(e); r2 && Gt(r2) && I(r2).position === "static"; )
1397
- r2 = Je(r2);
1398
- return r2 && (N(r2) === "html" || N(r2) === "body" && I(r2).position === "static") ? t : r2 || Jt(e) || t;
1396
+ for (var t = B(e), r = Je(e); r && Gt(r) && V(r).position === "static"; )
1397
+ r = Je(r);
1398
+ return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r || Jt(e) || t;
1399
1399
  }
1400
1400
  function Te(e) {
1401
1401
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
1402
1402
  }
1403
- function oe(e, t, r2) {
1404
- return _(e, ye(t, r2));
1403
+ function oe(e, t, r) {
1404
+ return _(e, ye(t, r));
1405
1405
  }
1406
- function Qt(e, t, r2) {
1407
- var i2 = oe(e, t, r2);
1408
- return i2 > r2 ? r2 : i2;
1406
+ function Qt(e, t, r) {
1407
+ var i = oe(e, t, r);
1408
+ return i > r ? r : i;
1409
1409
  }
1410
1410
  function vt() {
1411
1411
  return {
@@ -1419,24 +1419,24 @@
1419
1419
  return Object.assign({}, vt(), e);
1420
1420
  }
1421
1421
  function gt(e, t) {
1422
- return t.reduce(function(r2, i2) {
1423
- return r2[i2] = e, r2;
1422
+ return t.reduce(function(r, i) {
1423
+ return r[i] = e, r;
1424
1424
  }, {});
1425
1425
  }
1426
- var Zt = function(t, r2) {
1427
- return t = typeof t == "function" ? t(Object.assign({}, r2.rects, {
1428
- placement: r2.placement
1426
+ var Zt = function(t, r) {
1427
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
1428
+ placement: r.placement
1429
1429
  })) : t, ht(typeof t != "number" ? t : gt(t, le));
1430
1430
  };
1431
1431
  function er(e) {
1432
- var t, r2 = e.state, i2 = e.name, n = e.options, o2 = r2.elements.arrow, l2 = r2.modifiersData.popperOffsets, s = H(r2.placement), a2 = Te(s), f2 = [D, j].indexOf(s) >= 0, c2 = f2 ? "height" : "width";
1432
+ 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";
1433
1433
  if (!(!o2 || !l2)) {
1434
- var h2 = Zt(n.padding, r2), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : j, v2 = r2.rects.reference[c2] + r2.rects.reference[a2] - l2[a2] - r2.rects.popper[c2], d2 = l2[a2] - r2.rects.reference[a2], w2 = fe(o2), O2 = w2 ? a2 === "y" ? w2.clientHeight || 0 : w2.clientWidth || 0 : 0, E2 = v2 / 2 - d2 / 2, p2 = h2[u2], g2 = O2 - y2[c2] - h2[b2], m2 = O2 / 2 - y2[c2] / 2 + E2, x2 = oe(p2, m2, g2), L2 = a2;
1435
- r2.modifiersData[i2] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
1434
+ var h2 = Zt(n.padding, r), y2 = Be(o2), u2 = a2 === "y" ? k : D, b2 = a2 === "y" ? S : 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), L2 = a2;
1435
+ r.modifiersData[i] = (t = {}, t[L2] = x2, t.centerOffset = x2 - m2, t);
1436
1436
  }
1437
1437
  }
1438
1438
  function tr(e) {
1439
- var t = e.state, r2 = e.options, i2 = r2.element, n = i2 === void 0 ? "[data-popper-arrow]" : i2;
1439
+ var t = e.state, r = e.options, i = r.element, n = i === void 0 ? "[data-popper-arrow]" : i;
1440
1440
  n != null && (typeof n == "string" && (n = t.elements.popper.querySelector(n), !n) || dt(t.elements.popper, n) && (t.elements.arrow = n));
1441
1441
  }
1442
1442
  const rr = {
@@ -1458,14 +1458,14 @@
1458
1458
  left: "auto"
1459
1459
  };
1460
1460
  function nr(e, t) {
1461
- var r2 = e.x, i2 = e.y, n = t.devicePixelRatio || 1;
1461
+ var r = e.x, i = e.y, n = t.devicePixelRatio || 1;
1462
1462
  return {
1463
- x: Z(r2 * n) / n || 0,
1464
- y: Z(i2 * n) / n || 0
1463
+ x: Z(r * n) / n || 0,
1464
+ y: Z(i * n) / n || 0
1465
1465
  };
1466
1466
  }
1467
1467
  function Qe(e) {
1468
- var t, r2 = e.popper, i2 = e.popperRect, n = e.placement, o2 = e.variation, l2 = e.offsets, s = 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({
1468
+ 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({
1469
1469
  x: u2,
1470
1470
  y: v2
1471
1471
  }) : {
@@ -1475,41 +1475,41 @@
1475
1475
  u2 = d2.x, v2 = d2.y;
1476
1476
  var w2 = l2.hasOwnProperty("x"), O2 = l2.hasOwnProperty("y"), E2 = D, p2 = k, g2 = window;
1477
1477
  if (f2) {
1478
- var m2 = fe(r2), x2 = "clientHeight", L2 = "clientWidth";
1479
- if (m2 === B(r2) && (m2 = F(r2), I(m2).position !== "static" && s === "absolute" && (x2 = "scrollHeight", L2 = "scrollWidth")), m2 = m2, n === k || (n === D || n === j) && o2 === se) {
1478
+ var m2 = fe(r), x2 = "clientHeight", L2 = "clientWidth";
1479
+ if (m2 === B(r) && (m2 = F(r), V(m2).position !== "static" && s2 === "absolute" && (x2 = "scrollHeight", L2 = "scrollWidth")), m2 = m2, n === k || (n === D || n === M) && o2 === se) {
1480
1480
  p2 = S;
1481
1481
  var P2 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.height : (
1482
1482
  // $FlowFixMe[prop-missing]
1483
1483
  m2[x2]
1484
1484
  );
1485
- v2 -= P2 - i2.height, v2 *= a2 ? 1 : -1;
1485
+ v2 -= P2 - i.height, v2 *= a2 ? 1 : -1;
1486
1486
  }
1487
1487
  if (n === D || (n === k || n === S) && o2 === se) {
1488
- E2 = j;
1488
+ E2 = M;
1489
1489
  var A2 = h2 && m2 === g2 && g2.visualViewport ? g2.visualViewport.width : (
1490
1490
  // $FlowFixMe[prop-missing]
1491
1491
  m2[L2]
1492
1492
  );
1493
- u2 -= A2 - i2.width, u2 *= a2 ? 1 : -1;
1493
+ u2 -= A2 - i.width, u2 *= a2 ? 1 : -1;
1494
1494
  }
1495
1495
  }
1496
1496
  var $2 = Object.assign({
1497
- position: s
1498
- }, f2 && ir), M2 = c2 === true ? nr({
1497
+ position: s2
1498
+ }, f2 && ir), j2 = c2 === true ? nr({
1499
1499
  x: u2,
1500
1500
  y: v2
1501
- }, B(r2)) : {
1501
+ }, B(r)) : {
1502
1502
  x: u2,
1503
1503
  y: v2
1504
1504
  };
1505
- if (u2 = M2.x, v2 = M2.y, a2) {
1505
+ if (u2 = j2.x, v2 = j2.y, a2) {
1506
1506
  var C2;
1507
1507
  return Object.assign({}, $2, (C2 = {}, C2[p2] = O2 ? "0" : "", C2[E2] = w2 ? "0" : "", C2.transform = (g2.devicePixelRatio || 1) <= 1 ? "translate(" + u2 + "px, " + v2 + "px)" : "translate3d(" + u2 + "px, " + v2 + "px, 0)", C2));
1508
1508
  }
1509
1509
  return Object.assign({}, $2, (t = {}, t[p2] = O2 ? v2 + "px" : "", t[E2] = w2 ? u2 + "px" : "", t.transform = "", t));
1510
1510
  }
1511
1511
  function or(e) {
1512
- var t = e.state, r2 = e.options, i2 = r2.gpuAcceleration, n = i2 === void 0 ? true : i2, o2 = r2.adaptive, l2 = o2 === void 0 ? true : o2, s = r2.roundOffsets, a2 = s === void 0 ? true : s, f2 = {
1512
+ 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 = {
1513
1513
  placement: H(t.placement),
1514
1514
  variation: te(t.placement),
1515
1515
  popper: t.elements.popper,
@@ -1542,13 +1542,13 @@
1542
1542
  passive: true
1543
1543
  };
1544
1544
  function sr(e) {
1545
- var t = e.state, r2 = e.instance, i2 = e.options, n = i2.scroll, o2 = n === void 0 ? true : n, l2 = i2.resize, s = l2 === void 0 ? true : l2, a2 = B(t.elements.popper), f2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1545
+ 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);
1546
1546
  return o2 && f2.forEach(function(c2) {
1547
- c2.addEventListener("scroll", r2.update, ge);
1548
- }), s && a2.addEventListener("resize", r2.update, ge), function() {
1547
+ c2.addEventListener("scroll", r.update, ge);
1548
+ }), s2 && a2.addEventListener("resize", r.update, ge), function() {
1549
1549
  o2 && f2.forEach(function(c2) {
1550
- c2.removeEventListener("scroll", r2.update, ge);
1551
- }), s && a2.removeEventListener("resize", r2.update, ge);
1550
+ c2.removeEventListener("scroll", r.update, ge);
1551
+ }), s2 && a2.removeEventListener("resize", r.update, ge);
1552
1552
  };
1553
1553
  }
1554
1554
  const cr = {
@@ -1581,52 +1581,52 @@
1581
1581
  });
1582
1582
  }
1583
1583
  function Se(e) {
1584
- var t = B(e), r2 = t.pageXOffset, i2 = t.pageYOffset;
1584
+ var t = B(e), r = t.pageXOffset, i = t.pageYOffset;
1585
1585
  return {
1586
- scrollLeft: r2,
1587
- scrollTop: i2
1586
+ scrollLeft: r,
1587
+ scrollTop: i
1588
1588
  };
1589
1589
  }
1590
- function je(e) {
1590
+ function Me(e) {
1591
1591
  return ee(F(e)).left + Se(e).scrollLeft;
1592
1592
  }
1593
1593
  function ur(e, t) {
1594
- var r2 = B(e), i2 = F(e), n = r2.visualViewport, o2 = i2.clientWidth, l2 = i2.clientHeight, s = 0, a2 = 0;
1594
+ var r = B(e), i = F(e), n = r.visualViewport, o2 = i.clientWidth, l2 = i.clientHeight, s2 = 0, a2 = 0;
1595
1595
  if (n) {
1596
1596
  o2 = n.width, l2 = n.height;
1597
1597
  var f2 = pt();
1598
- (f2 || !f2 && t === "fixed") && (s = n.offsetLeft, a2 = n.offsetTop);
1598
+ (f2 || !f2 && t === "fixed") && (s2 = n.offsetLeft, a2 = n.offsetTop);
1599
1599
  }
1600
1600
  return {
1601
1601
  width: o2,
1602
1602
  height: l2,
1603
- x: s + je(e),
1603
+ x: s2 + Me(e),
1604
1604
  y: a2
1605
1605
  };
1606
1606
  }
1607
1607
  function pr(e) {
1608
- var t, r2 = F(e), i2 = Se(e), n = (t = e.ownerDocument) == null ? void 0 : t.body, o2 = _(r2.scrollWidth, r2.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), l2 = _(r2.scrollHeight, r2.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s = -i2.scrollLeft + je(e), a2 = -i2.scrollTop;
1609
- return I(n || r2).direction === "rtl" && (s += _(r2.clientWidth, n ? n.clientWidth : 0) - o2), {
1608
+ 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;
1609
+ return V(n || r).direction === "rtl" && (s2 += _(r.clientWidth, n ? n.clientWidth : 0) - o2), {
1610
1610
  width: o2,
1611
1611
  height: l2,
1612
- x: s,
1612
+ x: s2,
1613
1613
  y: a2
1614
1614
  };
1615
1615
  }
1616
- function Me(e) {
1617
- var t = I(e), r2 = t.overflow, i2 = t.overflowX, n = t.overflowY;
1618
- return /auto|scroll|overlay|hidden/.test(r2 + n + i2);
1616
+ function je(e) {
1617
+ var t = V(e), r = t.overflow, i = t.overflowX, n = t.overflowY;
1618
+ return /auto|scroll|overlay|hidden/.test(r + n + i);
1619
1619
  }
1620
1620
  function mt(e) {
1621
- return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && Me(e) ? e : mt(we(e));
1621
+ return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : T(e) && je(e) ? e : mt(we(e));
1622
1622
  }
1623
1623
  function ae(e, t) {
1624
- var r2;
1624
+ var r;
1625
1625
  t === void 0 && (t = []);
1626
- var i2 = mt(e), n = i2 === ((r2 = e.ownerDocument) == null ? void 0 : r2.body), o2 = B(i2), l2 = n ? [o2].concat(o2.visualViewport || [], Me(i2) ? i2 : []) : i2, s = t.concat(l2);
1627
- return n ? s : (
1626
+ 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);
1627
+ return n ? s2 : (
1628
1628
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1629
- s.concat(ae(we(l2)))
1629
+ s2.concat(ae(we(l2)))
1630
1630
  );
1631
1631
  }
1632
1632
  function $e(e) {
@@ -1638,32 +1638,32 @@
1638
1638
  });
1639
1639
  }
1640
1640
  function dr(e, t) {
1641
- var r2 = ee(e, false, t === "fixed");
1642
- return r2.top = r2.top + e.clientTop, r2.left = r2.left + e.clientLeft, r2.bottom = r2.top + e.clientHeight, r2.right = r2.left + e.clientWidth, r2.width = e.clientWidth, r2.height = e.clientHeight, r2.x = r2.left, r2.y = r2.top, r2;
1641
+ var r = ee(e, false, t === "fixed");
1642
+ 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;
1643
1643
  }
1644
- function et(e, t, r2) {
1645
- return t === ft ? $e(ur(e, r2)) : K(t) ? dr(t, r2) : $e(pr(F(e)));
1644
+ function et(e, t, r) {
1645
+ return t === ft ? $e(ur(e, r)) : K(t) ? dr(t, r) : $e(pr(F(e)));
1646
1646
  }
1647
1647
  function vr(e) {
1648
- var t = ae(we(e)), r2 = ["absolute", "fixed"].indexOf(I(e).position) >= 0, i2 = r2 && T(e) ? fe(e) : e;
1649
- return K(i2) ? t.filter(function(n) {
1650
- return K(n) && dt(n, i2) && N(n) !== "body";
1648
+ var t = ae(we(e)), r = ["absolute", "fixed"].indexOf(V(e).position) >= 0, i = r && T(e) ? fe(e) : e;
1649
+ return K(i) ? t.filter(function(n) {
1650
+ return K(n) && dt(n, i) && N(n) !== "body";
1651
1651
  }) : [];
1652
1652
  }
1653
- function hr(e, t, r2, i2) {
1654
- var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r2]), l2 = o2[0], s = o2.reduce(function(a2, f2) {
1655
- var c2 = et(e, f2, i2);
1653
+ function hr(e, t, r, i) {
1654
+ var n = t === "clippingParents" ? vr(e) : [].concat(t), o2 = [].concat(n, [r]), l2 = o2[0], s2 = o2.reduce(function(a2, f2) {
1655
+ var c2 = et(e, f2, i);
1656
1656
  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;
1657
- }, et(e, l2, i2));
1658
- return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
1657
+ }, et(e, l2, i));
1658
+ return s2.width = s2.right - s2.left, s2.height = s2.bottom - s2.top, s2.x = s2.left, s2.y = s2.top, s2;
1659
1659
  }
1660
1660
  function yt(e) {
1661
- var t = e.reference, r2 = e.element, i2 = e.placement, n = i2 ? H(i2) : null, o2 = i2 ? te(i2) : null, l2 = t.x + t.width / 2 - r2.width / 2, s = t.y + t.height / 2 - r2.height / 2, a2;
1661
+ 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;
1662
1662
  switch (n) {
1663
1663
  case k:
1664
1664
  a2 = {
1665
1665
  x: l2,
1666
- y: t.y - r2.height
1666
+ y: t.y - r.height
1667
1667
  };
1668
1668
  break;
1669
1669
  case S:
@@ -1672,16 +1672,16 @@
1672
1672
  y: t.y + t.height
1673
1673
  };
1674
1674
  break;
1675
- case j:
1675
+ case M:
1676
1676
  a2 = {
1677
1677
  x: t.x + t.width,
1678
- y: s
1678
+ y: s2
1679
1679
  };
1680
1680
  break;
1681
1681
  case D:
1682
1682
  a2 = {
1683
- x: t.x - r2.width,
1684
- y: s
1683
+ x: t.x - r.width,
1684
+ y: s2
1685
1685
  };
1686
1686
  break;
1687
1687
  default:
@@ -1695,10 +1695,10 @@
1695
1695
  var c2 = f2 === "y" ? "height" : "width";
1696
1696
  switch (o2) {
1697
1697
  case Q:
1698
- a2[f2] = a2[f2] - (t[c2] / 2 - r2[c2] / 2);
1698
+ a2[f2] = a2[f2] - (t[c2] / 2 - r[c2] / 2);
1699
1699
  break;
1700
1700
  case se:
1701
- a2[f2] = a2[f2] + (t[c2] / 2 - r2[c2] / 2);
1701
+ a2[f2] = a2[f2] + (t[c2] / 2 - r[c2] / 2);
1702
1702
  break;
1703
1703
  }
1704
1704
  }
@@ -1706,7 +1706,7 @@
1706
1706
  }
1707
1707
  function ce(e, t) {
1708
1708
  t === void 0 && (t = {});
1709
- var r2 = t, i2 = r2.placement, n = i2 === void 0 ? e.placement : i2, o2 = r2.strategy, l2 = o2 === void 0 ? e.strategy : o2, s = r2.boundary, a2 = s === void 0 ? jt : s, f2 = r2.rootBoundary, c2 = f2 === void 0 ? ft : f2, h2 = r2.elementContext, y2 = h2 === void 0 ? ne : h2, u2 = r2.altBoundary, b2 = u2 === void 0 ? false : u2, v2 = r2.padding, d2 = v2 === void 0 ? 0 : v2, w2 = ht(typeof d2 != "number" ? d2 : gt(d2, le)), O2 = y2 === ne ? Mt : 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({
1709
+ 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({
1710
1710
  reference: m2,
1711
1711
  element: E2,
1712
1712
  strategy: "absolute",
@@ -1718,17 +1718,17 @@
1718
1718
  right: P2.right - g2.right + w2.right
1719
1719
  }, $2 = e.modifiersData.offset;
1720
1720
  if (y2 === ne && $2) {
1721
- var M2 = $2[n];
1721
+ var j2 = $2[n];
1722
1722
  Object.keys(A2).forEach(function(C2) {
1723
- var X2 = [j, S].indexOf(C2) >= 0 ? 1 : -1, Y2 = [k, S].indexOf(C2) >= 0 ? "y" : "x";
1724
- A2[C2] += M2[Y2] * X2;
1723
+ var X2 = [M, S].indexOf(C2) >= 0 ? 1 : -1, Y2 = [k, S].indexOf(C2) >= 0 ? "y" : "x";
1724
+ A2[C2] += j2[Y2] * X2;
1725
1725
  });
1726
1726
  }
1727
1727
  return A2;
1728
1728
  }
1729
1729
  function gr(e, t) {
1730
1730
  t === void 0 && (t = {});
1731
- var r2 = t, i2 = r2.placement, n = r2.boundary, o2 = r2.rootBoundary, l2 = r2.padding, s = r2.flipVariations, a2 = r2.allowedAutoPlacements, f2 = a2 === void 0 ? ut : a2, c2 = te(i2), h2 = c2 ? s ? Ge : Ge.filter(function(b2) {
1731
+ 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) {
1732
1732
  return te(b2) === c2;
1733
1733
  }) : le, y2 = h2.filter(function(b2) {
1734
1734
  return f2.indexOf(b2) >= 0;
@@ -1753,28 +1753,28 @@
1753
1753
  return [Ze(e), t, Ze(t)];
1754
1754
  }
1755
1755
  function yr(e) {
1756
- var t = e.state, r2 = e.options, i2 = e.name;
1757
- if (!t.modifiersData[i2]._skip) {
1758
- for (var n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s = l2 === void 0 ? true : l2, a2 = r2.fallbackPlacements, f2 = r2.padding, c2 = r2.boundary, h2 = r2.rootBoundary, y2 = r2.altBoundary, u2 = r2.flipVariations, b2 = u2 === void 0 ? true : u2, v2 = r2.allowedAutoPlacements, d2 = t.options.placement, w2 = H(d2), O2 = w2 === d2, E2 = a2 || (O2 || !b2 ? [me(d2)] : mr(d2)), p2 = [d2].concat(E2).reduce(function(G2, V2) {
1759
- return G2.concat(H(V2) === De ? gr(t, {
1760
- placement: V2,
1756
+ var t = e.state, r = e.options, i = e.name;
1757
+ if (!t.modifiersData[i]._skip) {
1758
+ 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, I2) {
1759
+ return G2.concat(H(I2) === De ? gr(t, {
1760
+ placement: I2,
1761
1761
  boundary: c2,
1762
1762
  rootBoundary: h2,
1763
1763
  padding: f2,
1764
1764
  flipVariations: b2,
1765
1765
  allowedAutoPlacements: v2
1766
- }) : V2);
1766
+ }) : I2);
1767
1767
  }, []), g2 = t.rects.reference, m2 = t.rects.popper, x2 = /* @__PURE__ */ new Map(), L2 = true, P2 = p2[0], A2 = 0; A2 < p2.length; A2++) {
1768
- var $2 = p2[A2], M2 = H($2), C2 = te($2) === Q, X2 = [k, S].indexOf(M2) >= 0, Y2 = X2 ? "width" : "height", R2 = ce(t, {
1768
+ var $2 = p2[A2], j2 = H($2), C2 = te($2) === Q, X2 = [k, S].indexOf(j2) >= 0, Y2 = X2 ? "width" : "height", R2 = ce(t, {
1769
1769
  placement: $2,
1770
1770
  boundary: c2,
1771
1771
  rootBoundary: h2,
1772
1772
  altBoundary: y2,
1773
1773
  padding: f2
1774
- }), W2 = X2 ? C2 ? j : D : C2 ? S : k;
1774
+ }), W2 = X2 ? C2 ? M : D : C2 ? S : k;
1775
1775
  g2[Y2] > m2[Y2] && (W2 = me(W2));
1776
1776
  var ue = me(W2), q2 = [];
1777
- if (o2 && q2.push(R2[M2] <= 0), s && q2.push(R2[W2] <= 0, R2[ue] <= 0), q2.every(function(G2) {
1777
+ if (o2 && q2.push(R2[j2] <= 0), s2 && q2.push(R2[W2] <= 0, R2[ue] <= 0), q2.every(function(G2) {
1778
1778
  return G2;
1779
1779
  })) {
1780
1780
  P2 = $2, L2 = false;
@@ -1783,11 +1783,11 @@
1783
1783
  x2.set($2, q2);
1784
1784
  }
1785
1785
  if (L2)
1786
- for (var pe = b2 ? 3 : 1, be = function(V2) {
1786
+ for (var pe = b2 ? 3 : 1, be = function(I2) {
1787
1787
  var ie = p2.find(function(ve) {
1788
1788
  var z2 = x2.get(ve);
1789
1789
  if (z2)
1790
- return z2.slice(0, V2).every(function(xe) {
1790
+ return z2.slice(0, I2).every(function(xe) {
1791
1791
  return xe;
1792
1792
  });
1793
1793
  });
@@ -1798,7 +1798,7 @@
1798
1798
  if (de === "break")
1799
1799
  break;
1800
1800
  }
1801
- t.placement !== P2 && (t.modifiersData[i2]._skip = true, t.placement = P2, t.reset = true);
1801
+ t.placement !== P2 && (t.modifiersData[i]._skip = true, t.placement = P2, t.reset = true);
1802
1802
  }
1803
1803
  }
1804
1804
  const wr = {
@@ -1811,29 +1811,29 @@
1811
1811
  _skip: false
1812
1812
  }
1813
1813
  };
1814
- function tt(e, t, r2) {
1815
- return r2 === void 0 && (r2 = {
1814
+ function tt(e, t, r) {
1815
+ return r === void 0 && (r = {
1816
1816
  x: 0,
1817
1817
  y: 0
1818
1818
  }), {
1819
- top: e.top - t.height - r2.y,
1820
- right: e.right - t.width + r2.x,
1821
- bottom: e.bottom - t.height + r2.y,
1822
- left: e.left - t.width - r2.x
1819
+ top: e.top - t.height - r.y,
1820
+ right: e.right - t.width + r.x,
1821
+ bottom: e.bottom - t.height + r.y,
1822
+ left: e.left - t.width - r.x
1823
1823
  };
1824
1824
  }
1825
1825
  function rt(e) {
1826
- return [k, j, S, D].some(function(t) {
1826
+ return [k, M, S, D].some(function(t) {
1827
1827
  return e[t] >= 0;
1828
1828
  });
1829
1829
  }
1830
1830
  function br(e) {
1831
- var t = e.state, r2 = e.name, i2 = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1831
+ var t = e.state, r = e.name, i = t.rects.reference, n = t.rects.popper, o2 = t.modifiersData.preventOverflow, l2 = ce(t, {
1832
1832
  elementContext: "reference"
1833
- }), s = ce(t, {
1833
+ }), s2 = ce(t, {
1834
1834
  altBoundary: true
1835
- }), a2 = tt(l2, i2), f2 = tt(s, n, o2), c2 = rt(a2), h2 = rt(f2);
1836
- t.modifiersData[r2] = {
1835
+ }), a2 = tt(l2, i), f2 = tt(s2, n, o2), c2 = rt(a2), h2 = rt(f2);
1836
+ t.modifiersData[r] = {
1837
1837
  referenceClippingOffsets: a2,
1838
1838
  popperEscapeOffsets: f2,
1839
1839
  isReferenceHidden: c2,
@@ -1850,23 +1850,23 @@
1850
1850
  requiresIfExists: ["preventOverflow"],
1851
1851
  fn: br
1852
1852
  };
1853
- function Or(e, t, r2) {
1854
- var i2 = H(e), n = [D, k].indexOf(i2) >= 0 ? -1 : 1, o2 = typeof r2 == "function" ? r2(Object.assign({}, t, {
1853
+ function Or(e, t, r) {
1854
+ var i = H(e), n = [D, k].indexOf(i) >= 0 ? -1 : 1, o2 = typeof r == "function" ? r(Object.assign({}, t, {
1855
1855
  placement: e
1856
- })) : r2, l2 = o2[0], s = o2[1];
1857
- return l2 = l2 || 0, s = (s || 0) * n, [D, j].indexOf(i2) >= 0 ? {
1858
- x: s,
1856
+ })) : r, l2 = o2[0], s2 = o2[1];
1857
+ return l2 = l2 || 0, s2 = (s2 || 0) * n, [D, M].indexOf(i) >= 0 ? {
1858
+ x: s2,
1859
1859
  y: l2
1860
1860
  } : {
1861
1861
  x: l2,
1862
- y: s
1862
+ y: s2
1863
1863
  };
1864
1864
  }
1865
1865
  function Er(e) {
1866
- var t = e.state, r2 = e.options, i2 = e.name, n = r2.offset, o2 = n === void 0 ? [0, 0] : n, l2 = ut.reduce(function(c2, h2) {
1866
+ 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) {
1867
1867
  return c2[h2] = Or(h2, t.rects, o2), c2;
1868
- }, {}), s = l2[t.placement], a2 = s.x, f2 = s.y;
1869
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i2] = l2;
1868
+ }, {}), s2 = l2[t.placement], a2 = s2.x, f2 = s2.y;
1869
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a2, t.modifiersData.popperOffsets.y += f2), t.modifiersData[i] = l2;
1870
1870
  }
1871
1871
  const Ar = {
1872
1872
  name: "offset",
@@ -1876,8 +1876,8 @@
1876
1876
  fn: Er
1877
1877
  };
1878
1878
  function Pr(e) {
1879
- var t = e.state, r2 = e.name;
1880
- t.modifiersData[r2] = yt({
1879
+ var t = e.state, r = e.name;
1880
+ t.modifiersData[r] = yt({
1881
1881
  reference: t.rects.reference,
1882
1882
  element: t.rects.popper,
1883
1883
  strategy: "absolute",
@@ -1895,7 +1895,7 @@
1895
1895
  return e === "x" ? "y" : "x";
1896
1896
  }
1897
1897
  function Cr(e) {
1898
- var t = e.state, r2 = e.options, i2 = e.name, n = r2.mainAxis, o2 = n === void 0 ? true : n, l2 = r2.altAxis, s = l2 === void 0 ? false : l2, a2 = r2.boundary, f2 = r2.rootBoundary, c2 = r2.altBoundary, h2 = r2.padding, y2 = r2.tether, u2 = y2 === void 0 ? true : y2, b2 = r2.tetherOffset, v2 = b2 === void 0 ? 0 : b2, d2 = ce(t, {
1898
+ 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, {
1899
1899
  boundary: a2,
1900
1900
  rootBoundary: f2,
1901
1901
  padding: h2,
@@ -1908,23 +1908,23 @@
1908
1908
  } : Object.assign({
1909
1909
  mainAxis: 0,
1910
1910
  altAxis: 0
1911
- }, P2), $2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M2 = {
1911
+ }, P2), $2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j2 = {
1912
1912
  x: 0,
1913
1913
  y: 0
1914
1914
  };
1915
1915
  if (m2) {
1916
1916
  if (o2) {
1917
- var C2, X2 = p2 === "y" ? k : D, Y2 = p2 === "y" ? S : j, R2 = p2 === "y" ? "height" : "width", W2 = m2[p2], ue = W2 + d2[X2], q2 = W2 - d2[Y2], pe = u2 ? -L2[R2] / 2 : 0, be = O2 === Q ? x2[R2] : L2[R2], re = O2 === Q ? -L2[R2] : -x2[R2], de = t.elements.arrow, G2 = u2 && de ? Be(de) : {
1917
+ var C2, X2 = p2 === "y" ? k : D, Y2 = p2 === "y" ? S : M, R2 = p2 === "y" ? "height" : "width", W2 = m2[p2], ue = W2 + d2[X2], q2 = W2 - d2[Y2], pe = u2 ? -L2[R2] / 2 : 0, be = O2 === Q ? x2[R2] : L2[R2], re = O2 === Q ? -L2[R2] : -x2[R2], de = t.elements.arrow, G2 = u2 && de ? Be(de) : {
1918
1918
  width: 0,
1919
1919
  height: 0
1920
- }, V2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : vt(), ie = V2[X2], ve = V2[Y2], z2 = oe(0, x2[R2], G2[R2]), xe = E2 ? x2[R2] / 2 - pe - z2 - ie - A2.mainAxis : be - z2 - ie - A2.mainAxis, xt = E2 ? -x2[R2] / 2 + pe + z2 + ve + A2.mainAxis : re + z2 + ve + A2.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);
1921
- m2[p2] = Ne, M2[p2] = Ne - W2;
1920
+ }, I2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : vt(), 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, xt = E2 ? -x2[R2] / 2 + pe + z2 + ve + A2.mainAxis : re + z2 + ve + A2.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);
1921
+ m2[p2] = Ne, j2[p2] = Ne - W2;
1922
1922
  }
1923
- if (s) {
1924
- var Ie, Pt = p2 === "x" ? k : D, Lt = p2 === "x" ? S : j, U2 = m2[g2], he = g2 === "y" ? "height" : "width", Ve = U2 + d2[Pt], Fe = U2 - d2[Lt], Ee = [k, D].indexOf(w2) !== -1, Xe = (Ie = $2 == null ? void 0 : $2[g2]) != null ? Ie : 0, Ye = Ee ? Ve : U2 - x2[he] - L2[he] - Xe + A2.altAxis, qe = Ee ? U2 + x2[he] + L2[he] - Xe - A2.altAxis : Fe, ze = u2 && Ee ? Qt(Ye, U2, qe) : oe(u2 ? Ye : Ve, U2, u2 ? qe : Fe);
1925
- m2[g2] = ze, M2[g2] = ze - U2;
1923
+ if (s2) {
1924
+ var Ve, Pt = p2 === "x" ? k : D, Lt = p2 === "x" ? S : 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] - L2[he] - Xe + A2.altAxis, qe = Ee ? U2 + x2[he] + L2[he] - Xe - A2.altAxis : Fe, ze = u2 && Ee ? Qt(Ye, U2, qe) : oe(u2 ? Ye : Ie, U2, u2 ? qe : Fe);
1925
+ m2[g2] = ze, j2[g2] = ze - U2;
1926
1926
  }
1927
- t.modifiersData[i2] = M2;
1927
+ t.modifiersData[i] = j2;
1928
1928
  }
1929
1929
  }
1930
1930
  const kr = {
@@ -1944,73 +1944,73 @@
1944
1944
  return e === B(e) || !T(e) ? Se(e) : Dr(e);
1945
1945
  }
1946
1946
  function Br(e) {
1947
- var t = e.getBoundingClientRect(), r2 = Z(t.width) / e.offsetWidth || 1, i2 = Z(t.height) / e.offsetHeight || 1;
1948
- return r2 !== 1 || i2 !== 1;
1947
+ var t = e.getBoundingClientRect(), r = Z(t.width) / e.offsetWidth || 1, i = Z(t.height) / e.offsetHeight || 1;
1948
+ return r !== 1 || i !== 1;
1949
1949
  }
1950
- function Tr(e, t, r2) {
1951
- r2 === void 0 && (r2 = false);
1952
- var i2 = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r2), s = {
1950
+ function Tr(e, t, r) {
1951
+ r === void 0 && (r = false);
1952
+ var i = T(t), n = T(t) && Br(t), o2 = F(t), l2 = ee(e, n, r), s2 = {
1953
1953
  scrollLeft: 0,
1954
1954
  scrollTop: 0
1955
1955
  }, a2 = {
1956
1956
  x: 0,
1957
1957
  y: 0
1958
1958
  };
1959
- return (i2 || !i2 && !r2) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1960
- Me(o2)) && (s = Rr(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = je(o2))), {
1961
- x: l2.left + s.scrollLeft - a2.x,
1962
- y: l2.top + s.scrollTop - a2.y,
1959
+ return (i || !i && !r) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1960
+ je(o2)) && (s2 = Rr(t)), T(t) ? (a2 = ee(t, true), a2.x += t.clientLeft, a2.y += t.clientTop) : o2 && (a2.x = Me(o2))), {
1961
+ x: l2.left + s2.scrollLeft - a2.x,
1962
+ y: l2.top + s2.scrollTop - a2.y,
1963
1963
  width: l2.width,
1964
1964
  height: l2.height
1965
1965
  };
1966
1966
  }
1967
1967
  function Sr(e) {
1968
- var t = /* @__PURE__ */ new Map(), r2 = /* @__PURE__ */ new Set(), i2 = [];
1968
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = [];
1969
1969
  e.forEach(function(o2) {
1970
1970
  t.set(o2.name, o2);
1971
1971
  });
1972
1972
  function n(o2) {
1973
- r2.add(o2.name);
1973
+ r.add(o2.name);
1974
1974
  var l2 = [].concat(o2.requires || [], o2.requiresIfExists || []);
1975
- l2.forEach(function(s) {
1976
- if (!r2.has(s)) {
1977
- var a2 = t.get(s);
1975
+ l2.forEach(function(s2) {
1976
+ if (!r.has(s2)) {
1977
+ var a2 = t.get(s2);
1978
1978
  a2 && n(a2);
1979
1979
  }
1980
- }), i2.push(o2);
1980
+ }), i.push(o2);
1981
1981
  }
1982
1982
  return e.forEach(function(o2) {
1983
- r2.has(o2.name) || n(o2);
1984
- }), i2;
1983
+ r.has(o2.name) || n(o2);
1984
+ }), i;
1985
1985
  }
1986
- function jr(e) {
1986
+ function Mr(e) {
1987
1987
  var t = Sr(e);
1988
- return zt.reduce(function(r2, i2) {
1989
- return r2.concat(t.filter(function(n) {
1990
- return n.phase === i2;
1988
+ return zt.reduce(function(r, i) {
1989
+ return r.concat(t.filter(function(n) {
1990
+ return n.phase === i;
1991
1991
  }));
1992
1992
  }, []);
1993
1993
  }
1994
- function Mr(e) {
1994
+ function jr(e) {
1995
1995
  var t;
1996
1996
  return function() {
1997
- return t || (t = new Promise(function(r2) {
1997
+ return t || (t = new Promise(function(r) {
1998
1998
  Promise.resolve().then(function() {
1999
- t = void 0, r2(e());
1999
+ t = void 0, r(e());
2000
2000
  });
2001
2001
  })), t;
2002
2002
  };
2003
2003
  }
2004
2004
  function Wr(e) {
2005
- var t = e.reduce(function(r2, i2) {
2006
- var n = r2[i2.name];
2007
- return r2[i2.name] = n ? Object.assign({}, n, i2, {
2008
- options: Object.assign({}, n.options, i2.options),
2009
- data: Object.assign({}, n.data, i2.data)
2010
- }) : i2, r2;
2005
+ var t = e.reduce(function(r, i) {
2006
+ var n = r[i.name];
2007
+ return r[i.name] = n ? Object.assign({}, n, i, {
2008
+ options: Object.assign({}, n.options, i.options),
2009
+ data: Object.assign({}, n.data, i.data)
2010
+ }) : i, r;
2011
2011
  }, {});
2012
- return Object.keys(t).map(function(r2) {
2013
- return t[r2];
2012
+ return Object.keys(t).map(function(r) {
2013
+ return t[r];
2014
2014
  });
2015
2015
  }
2016
2016
  var it = {
@@ -2019,16 +2019,16 @@
2019
2019
  strategy: "absolute"
2020
2020
  };
2021
2021
  function nt() {
2022
- for (var e = arguments.length, t = new Array(e), r2 = 0; r2 < e; r2++)
2023
- t[r2] = arguments[r2];
2024
- return !t.some(function(i2) {
2025
- return !(i2 && typeof i2.getBoundingClientRect == "function");
2022
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
2023
+ t[r] = arguments[r];
2024
+ return !t.some(function(i) {
2025
+ return !(i && typeof i.getBoundingClientRect == "function");
2026
2026
  });
2027
2027
  }
2028
2028
  function Hr(e) {
2029
2029
  e === void 0 && (e = {});
2030
- var t = e, r2 = t.defaultModifiers, i2 = r2 === void 0 ? [] : r2, n = t.defaultOptions, o2 = n === void 0 ? it : n;
2031
- return function(s, a2, f2) {
2030
+ var t = e, r = t.defaultModifiers, i = r === void 0 ? [] : r, n = t.defaultOptions, o2 = n === void 0 ? it : n;
2031
+ return function(s2, a2, f2) {
2032
2032
  f2 === void 0 && (f2 = o2);
2033
2033
  var c2 = {
2034
2034
  placement: "bottom",
@@ -2036,7 +2036,7 @@
2036
2036
  options: Object.assign({}, it, o2),
2037
2037
  modifiersData: {},
2038
2038
  elements: {
2039
- reference: s,
2039
+ reference: s2,
2040
2040
  popper: a2
2041
2041
  },
2042
2042
  attributes: {},
@@ -2046,10 +2046,10 @@
2046
2046
  setOptions: function(w2) {
2047
2047
  var O2 = typeof w2 == "function" ? w2(c2.options) : w2;
2048
2048
  v2(), c2.options = Object.assign({}, o2, c2.options, O2), c2.scrollParents = {
2049
- reference: K(s) ? ae(s) : s.contextElement ? ae(s.contextElement) : [],
2049
+ reference: K(s2) ? ae(s2) : s2.contextElement ? ae(s2.contextElement) : [],
2050
2050
  popper: ae(a2)
2051
2051
  };
2052
- var E2 = jr(Wr([].concat(i2, c2.options.modifiers)));
2052
+ var E2 = Mr(Wr([].concat(i, c2.options.modifiers)));
2053
2053
  return c2.orderedModifiers = E2.filter(function(p2) {
2054
2054
  return p2.enabled;
2055
2055
  }), b2(), u2.update();
@@ -2087,7 +2087,7 @@
2087
2087
  },
2088
2088
  // Async and optimistically optimized update – it will not be executed if
2089
2089
  // not necessary (debounced to run at most once-per-tick)
2090
- update: Mr(function() {
2090
+ update: jr(function() {
2091
2091
  return new Promise(function(d2) {
2092
2092
  u2.forceUpdate(), d2(c2);
2093
2093
  });
@@ -2096,7 +2096,7 @@
2096
2096
  v2(), y2 = true;
2097
2097
  }
2098
2098
  };
2099
- if (!nt(s, a2))
2099
+ if (!nt(s2, a2))
2100
2100
  return u2;
2101
2101
  u2.setOptions(f2).then(function(d2) {
2102
2102
  !y2 && f2.onFirstUpdate && f2.onFirstUpdate(d2);
@@ -2124,24 +2124,24 @@
2124
2124
  return u2;
2125
2125
  };
2126
2126
  }
2127
- var Nr = [cr, Lr, ar, Kt, Ar, wr, kr, rr, xr], Ir = /* @__PURE__ */ Hr({
2127
+ var Nr = [cr, Lr, ar, Kt, Ar, wr, kr, rr, xr], Vr = /* @__PURE__ */ Hr({
2128
2128
  defaultModifiers: Nr
2129
2129
  });
2130
2130
  async function Ce(e) {
2131
- const t = this.collection.findIndex((r2) => r2.id === e.id);
2131
+ const t = this.collection.findIndex((r) => r.id === e.id);
2132
2132
  if (t >= 0) {
2133
- const r2 = this.collection[t];
2134
- r2.state === "opened" && r2.close(), r2.popper.destroy(), wt(r2), Object.getOwnPropertyNames(r2).forEach((i2) => {
2135
- delete r2[i2];
2133
+ const r = this.collection[t];
2134
+ r.state === "opened" && r.close(), r.popper.destroy(), wt(r), Object.getOwnPropertyNames(r).forEach((i) => {
2135
+ delete r[i];
2136
2136
  }), this.collection.splice(t, 1);
2137
2137
  }
2138
2138
  return this.collection;
2139
2139
  }
2140
2140
  function wt(e) {
2141
2141
  return e.__eventListeners && (e.__eventListeners.forEach((t) => {
2142
- t.el.forEach((r2) => {
2143
- t.type.forEach((i2) => {
2144
- e[r2].removeEventListener(i2, t.listener, false);
2142
+ t.el.forEach((r) => {
2143
+ t.type.forEach((i) => {
2144
+ e[r].removeEventListener(i, t.listener, false);
2145
2145
  });
2146
2146
  });
2147
2147
  }), delete e.__eventListeners), e;
@@ -2156,26 +2156,26 @@
2156
2156
  ]
2157
2157
  }), t.popper.update(), t.state = "opened", t;
2158
2158
  }
2159
- async function Vr(e, t) {
2159
+ async function Ir(e, t) {
2160
2160
  Ce.call(this, e);
2161
- const r2 = this, i2 = {
2161
+ const r = this, i = {
2162
2162
  id: e.id,
2163
2163
  state: "closed",
2164
2164
  el: e,
2165
2165
  trigger: t,
2166
- popper: Ir(t, e),
2166
+ popper: Vr(t, e),
2167
2167
  config: ot(e, this.settings),
2168
2168
  open() {
2169
- return We.call(r2, this);
2169
+ return We.call(r, this);
2170
2170
  },
2171
2171
  close() {
2172
- return ke.call(r2, this);
2172
+ return ke.call(r, this);
2173
2173
  },
2174
2174
  deregister() {
2175
- return Ce.call(r2, this);
2175
+ return Ce.call(r, this);
2176
2176
  }
2177
2177
  };
2178
- return i2.trigger.hasAttribute("aria-controls") && i2.trigger.setAttribute("aria-expanded", "false"), bt.call(this, i2), this.collection.push(i2), i2.el.classList.contains(this.settings.stateActive) && (await i2.open(), lt.call(this, i2)), i2;
2178
+ 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;
2179
2179
  }
2180
2180
  function bt(e) {
2181
2181
  return e.__eventListeners || (e.config.event === "hover" ? (e.__eventListeners = [{
@@ -2186,62 +2186,62 @@
2186
2186
  el: ["el", "trigger"],
2187
2187
  type: ["mouseleave", "focusout"],
2188
2188
  listener: ct.bind(this, e)
2189
- }], e.__eventListeners.forEach((r2) => {
2190
- r2.el.forEach((i2) => {
2191
- r2.type.forEach((n) => {
2192
- e[i2].addEventListener(n, r2.listener, false);
2189
+ }], e.__eventListeners.forEach((r) => {
2190
+ r.el.forEach((i) => {
2191
+ r.type.forEach((n) => {
2192
+ e[i].addEventListener(n, r.listener, false);
2193
2193
  });
2194
2194
  });
2195
2195
  })) : (e.__eventListeners = [{
2196
2196
  el: ["trigger"],
2197
2197
  type: ["click"],
2198
2198
  listener: Tt.bind(this, e)
2199
- }], e.__eventListeners.forEach((r2) => {
2200
- r2.el.forEach((i2) => {
2201
- r2.type.forEach((n) => {
2202
- e[i2].addEventListener(n, r2.listener, false);
2199
+ }], e.__eventListeners.forEach((r) => {
2200
+ r.el.forEach((i) => {
2201
+ r.type.forEach((n) => {
2202
+ e[i].addEventListener(n, r.listener, false);
2203
2203
  });
2204
2204
  });
2205
2205
  }))), e;
2206
2206
  }
2207
2207
  var J;
2208
2208
  class Xr extends $t {
2209
- constructor(r2) {
2209
+ constructor(r) {
2210
2210
  super();
2211
2211
  _e(this, J, void 0);
2212
- this.defaults = kt, this.settings = { ...this.defaults, ...r2 }, this.trigger = null, Ke(this, J, St.bind(this)), this.settings.autoInit && this.init();
2212
+ this.defaults = kt, this.settings = { ...this.defaults, ...r }, this.trigger = null, Ke(this, J, St.bind(this)), this.settings.autoMount && this.mount();
2213
2213
  }
2214
- async init(r2) {
2215
- r2 && (this.settings = { ...this.settings, ...r2 });
2216
- const i2 = document.querySelectorAll(this.settings.selectorPopover);
2217
- return await this.registerCollection(i2), this.settings.eventListeners && this.initEventListeners(false), this;
2214
+ async mount(r) {
2215
+ r && (this.settings = { ...this.settings, ...r });
2216
+ const i = document.querySelectorAll(this.settings.selectorPopover);
2217
+ return await this.registerCollection(i), this.settings.eventListeners && this.mountEventListeners(false), this;
2218
2218
  }
2219
- async destroy() {
2220
- return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.destroyEventListeners(false), this;
2219
+ async unmount() {
2220
+ return this.trigger = null, await this.deregisterCollection(), this.settings.eventListeners && this.unmountEventListeners(false), this;
2221
2221
  }
2222
- initEventListeners(r2 = true) {
2223
- r2 && this.collection.forEach((i2) => {
2224
- bt.call(this, i2);
2222
+ mountEventListeners(r = true) {
2223
+ r && this.collection.forEach((i) => {
2224
+ bt.call(this, i);
2225
2225
  }), document.addEventListener("keydown", Ae(this, J), false);
2226
2226
  }
2227
- destroyEventListeners(r2 = true) {
2228
- r2 && this.collection.forEach((i2) => {
2229
- wt(i2);
2227
+ unmountEventListeners(r = true) {
2228
+ r && this.collection.forEach((i) => {
2229
+ wt(i);
2230
2230
  }), document.removeEventListener("keydown", Ae(this, J), false);
2231
2231
  }
2232
- register(r2) {
2233
- const i2 = Bt.call(this, r2);
2234
- return i2.error ? Promise.reject(i2.error) : Vr.call(this, i2.popover, i2.trigger);
2232
+ register(r) {
2233
+ const i = Bt.call(this, r);
2234
+ return i.error ? Promise.reject(i.error) : Ir.call(this, i.popover, i.trigger);
2235
2235
  }
2236
- deregister(r2) {
2237
- let i2 = this.get(r2.id || r2);
2238
- return i2 ? Ce.call(this, i2) : Promise.reject(new Error(`Failed to deregister; popover does not exist in collection with ID of: "${r2.id || r2}".`));
2236
+ deregister(r) {
2237
+ let i = this.get(r.id || r);
2238
+ return i ? Ce.call(this, i) : Promise.reject(new Error(`Failed to deregister; popover does not exist in collection with ID of: "${r.id || r}".`));
2239
2239
  }
2240
- open(r2) {
2241
- return We.call(this, r2);
2240
+ open(r) {
2241
+ return We.call(this, r);
2242
2242
  }
2243
- close(r2) {
2244
- return ke.call(this, r2);
2243
+ close(r) {
2244
+ return ke.call(this, r);
2245
2245
  }
2246
2246
  }
2247
2247
  J = /* @__PURE__ */ new WeakMap();