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