@adyen/bento-vue2 1.4.1 → 1.5.0
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/dist/@types/components.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +27 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +522 -114
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +13 -3
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +119 -71
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +42 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +389 -50
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
- package/dist/accordion.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/base-button.89e9efbd.js +88 -0
- package/dist/chunks/base-button.89e9efbd.js.map +1 -0
- package/dist/chunks/base-modal.6eaa7e53.js +211 -0
- package/dist/chunks/base-modal.6eaa7e53.js.map +1 -0
- package/dist/chunks/{calendar.c20df708.js → calendar.44459d87.js} +2 -2
- package/dist/chunks/{calendar.c20df708.js.map → calendar.44459d87.js.map} +1 -1
- package/dist/chunks/{checkbox.5a69ce9d.js → checkbox.b69b8f22.js} +16 -16
- package/dist/chunks/{checkbox.5a69ce9d.js.map → checkbox.b69b8f22.js.map} +1 -1
- package/dist/chunks/{copy.982e1b19.js → copy.57f969d4.js} +2 -2
- package/dist/chunks/{copy.982e1b19.js.map → copy.57f969d4.js.map} +1 -1
- package/dist/chunks/debounce.b5ef6acf.js +10 -0
- package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.9bef4138.js → dropdown-default-textbox.2d093874.js} +8 -7
- package/dist/chunks/{dropdown-default-textbox.9bef4138.js.map → dropdown-default-textbox.2d093874.js.map} +1 -1
- package/dist/chunks/{dropdown.15cc1c45.js → dropdown.10ea8304.js} +33 -31
- package/dist/chunks/dropdown.10ea8304.js.map +1 -0
- package/dist/chunks/{index.c39c64c9.js → index.0f8690c4.js} +2 -2
- package/dist/chunks/{index.c39c64c9.js.map → index.0f8690c4.js.map} +1 -1
- package/dist/chunks/{index.58ce168a.js → index.4a11da21.js} +179 -170
- package/dist/chunks/index.4a11da21.js.map +1 -0
- package/dist/chunks/{index.876ea5bf.js → index.660f2f2e.js} +2 -2
- package/dist/chunks/{index.876ea5bf.js.map → index.660f2f2e.js.map} +1 -1
- package/dist/chunks/{index.b9c8c99a.js → index.f607a3f1.js} +4 -4
- package/dist/chunks/{index.b9c8c99a.js.map → index.f607a3f1.js.map} +1 -1
- package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
- package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.f8b467a7.js → listbox-option-tag.e2688e54.js} +2 -2
- package/dist/chunks/{listbox-option-tag.f8b467a7.js.map → listbox-option-tag.e2688e54.js.map} +1 -1
- package/dist/chunks/{listbox.cbf47484.js → listbox.201a8521.js} +6 -5
- package/dist/chunks/{listbox.cbf47484.js.map → listbox.201a8521.js.map} +1 -1
- package/dist/chunks/{tooltip.0297fd5d.js → tooltip.f89cb0cd.js} +18 -18
- package/dist/chunks/{tooltip.0297fd5d.js.map → tooltip.f89cb0cd.js.map} +1 -1
- package/dist/chunks/use-has-slot.6052d56a.js.map +1 -1
- package/dist/code-snippet.js +193 -191
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +750 -640
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +5 -5
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +10 -10
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +533 -491
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +71 -50
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +181 -102
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -1
- package/dist/index.js +200 -193
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +2 -2
- package/dist/internal.js +4 -4
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +39 -30
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +29 -26
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -2
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +43 -31
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1228 -180
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +3 -3
- package/dist/segmented-control.js +9 -9
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +13 -13
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +1 -1
- package/dist/stepper.js +229 -0
- package/dist/stepper.js.map +1 -0
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +1 -1
- package/dist/tag.js +2 -2
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle.js +14 -14
- package/dist/toggle.js.map +1 -1
- package/dist/web-types.json +279 -60
- package/package.json +3 -3
- package/dist/chunks/base-button.7a676605.js +0 -82
- package/dist/chunks/base-button.7a676605.js.map +0 -1
- package/dist/chunks/base-modal.a51d2395.js +0 -207
- package/dist/chunks/base-modal.a51d2395.js.map +0 -1
- package/dist/chunks/debounce.f8d92e44.js.map +0 -1
- package/dist/chunks/dropdown.15cc1c45.js.map +0 -1
- package/dist/chunks/index.58ce168a.js.map +0 -1
package/dist/popper-container.js
CHANGED
|
@@ -1,225 +1,1273 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { B as
|
|
4
|
-
import { n as
|
|
5
|
-
import "./assets/
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { unref as q, computed as R, ref as I, shallowRef as zt, watch as Z, getCurrentScope as jt, onScopeDispose as Ut, shallowReadonly as Y, defineComponent as Xt, toRefs as Yt } from "vue";
|
|
2
|
+
import "./chunks/index.af05ced4.js";
|
|
3
|
+
import { B as qt } from "./chunks/index.0f8690c4.js";
|
|
4
|
+
import { n as Gt } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
|
+
import "./assets/index35.css";
|
|
6
|
+
const Kt = ["top", "right", "bottom", "left"], yt = ["start", "end"], xt = /* @__PURE__ */ Kt.reduce((t, e) => t.concat(e, e + "-" + yt[0], e + "-" + yt[1]), []), K = Math.min, U = Math.max, ot = Math.round, nt = Math.floor, z = (t) => ({
|
|
7
|
+
x: t,
|
|
8
|
+
y: t
|
|
9
|
+
}), Jt = {
|
|
10
|
+
left: "right",
|
|
11
|
+
right: "left",
|
|
12
|
+
bottom: "top",
|
|
13
|
+
top: "bottom"
|
|
14
|
+
}, Qt = {
|
|
15
|
+
start: "end",
|
|
16
|
+
end: "start"
|
|
17
|
+
};
|
|
18
|
+
function ft(t, e, n) {
|
|
19
|
+
return U(t, K(e, n));
|
|
20
|
+
}
|
|
21
|
+
function Q(t, e) {
|
|
22
|
+
return typeof t == "function" ? t(e) : t;
|
|
23
|
+
}
|
|
24
|
+
function N(t) {
|
|
25
|
+
return t.split("-")[0];
|
|
26
|
+
}
|
|
27
|
+
function B(t) {
|
|
28
|
+
return t.split("-")[1];
|
|
29
|
+
}
|
|
30
|
+
function St(t) {
|
|
31
|
+
return t === "x" ? "y" : "x";
|
|
32
|
+
}
|
|
33
|
+
function dt(t) {
|
|
34
|
+
return t === "y" ? "height" : "width";
|
|
35
|
+
}
|
|
36
|
+
function st(t) {
|
|
37
|
+
return ["top", "bottom"].includes(N(t)) ? "y" : "x";
|
|
38
|
+
}
|
|
39
|
+
function mt(t) {
|
|
40
|
+
return St(st(t));
|
|
41
|
+
}
|
|
42
|
+
function Lt(t, e, n) {
|
|
43
|
+
n === void 0 && (n = !1);
|
|
44
|
+
const o = B(t), i = mt(t), l = dt(i);
|
|
45
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
46
|
+
return e.reference[l] > e.floating[l] && (r = rt(r)), [r, rt(r)];
|
|
47
|
+
}
|
|
48
|
+
function Zt(t) {
|
|
49
|
+
const e = rt(t);
|
|
50
|
+
return [it(t), e, it(e)];
|
|
51
|
+
}
|
|
52
|
+
function it(t) {
|
|
53
|
+
return t.replace(/start|end/g, (e) => Qt[e]);
|
|
54
|
+
}
|
|
55
|
+
function te(t, e, n) {
|
|
56
|
+
const o = ["left", "right"], i = ["right", "left"], l = ["top", "bottom"], r = ["bottom", "top"];
|
|
57
|
+
switch (t) {
|
|
58
|
+
case "top":
|
|
59
|
+
case "bottom":
|
|
60
|
+
return n ? e ? i : o : e ? o : i;
|
|
61
|
+
case "left":
|
|
62
|
+
case "right":
|
|
63
|
+
return e ? l : r;
|
|
64
|
+
default:
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function ee(t, e, n, o) {
|
|
69
|
+
const i = B(t);
|
|
70
|
+
let l = te(N(t), n === "start", o);
|
|
71
|
+
return i && (l = l.map((r) => r + "-" + i), e && (l = l.concat(l.map(it)))), l;
|
|
72
|
+
}
|
|
73
|
+
function rt(t) {
|
|
74
|
+
return t.replace(/left|right|bottom|top/g, (e) => Jt[e]);
|
|
75
|
+
}
|
|
76
|
+
function ne(t) {
|
|
77
|
+
return {
|
|
78
|
+
top: 0,
|
|
79
|
+
right: 0,
|
|
80
|
+
bottom: 0,
|
|
81
|
+
left: 0,
|
|
82
|
+
...t
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function Ct(t) {
|
|
86
|
+
return typeof t != "number" ? ne(t) : {
|
|
87
|
+
top: t,
|
|
88
|
+
right: t,
|
|
89
|
+
bottom: t,
|
|
90
|
+
left: t
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function lt(t) {
|
|
94
|
+
return {
|
|
95
|
+
...t,
|
|
96
|
+
top: t.y,
|
|
97
|
+
left: t.x,
|
|
98
|
+
right: t.x + t.width,
|
|
99
|
+
bottom: t.y + t.height
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function bt(t, e, n) {
|
|
103
|
+
let {
|
|
104
|
+
reference: o,
|
|
105
|
+
floating: i
|
|
106
|
+
} = t;
|
|
107
|
+
const l = st(e), r = mt(e), s = dt(r), a = N(e), c = l === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[s] / 2 - i[s] / 2;
|
|
108
|
+
let f;
|
|
109
|
+
switch (a) {
|
|
110
|
+
case "top":
|
|
111
|
+
f = {
|
|
112
|
+
x: u,
|
|
113
|
+
y: o.y - i.height
|
|
114
|
+
};
|
|
115
|
+
break;
|
|
116
|
+
case "bottom":
|
|
117
|
+
f = {
|
|
118
|
+
x: u,
|
|
119
|
+
y: o.y + o.height
|
|
120
|
+
};
|
|
121
|
+
break;
|
|
122
|
+
case "right":
|
|
123
|
+
f = {
|
|
124
|
+
x: o.x + o.width,
|
|
125
|
+
y: d
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "left":
|
|
129
|
+
f = {
|
|
130
|
+
x: o.x - i.width,
|
|
131
|
+
y: d
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
default:
|
|
135
|
+
f = {
|
|
136
|
+
x: o.x,
|
|
137
|
+
y: o.y
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
switch (B(e)) {
|
|
141
|
+
case "start":
|
|
142
|
+
f[r] -= p * (n && c ? -1 : 1);
|
|
143
|
+
break;
|
|
144
|
+
case "end":
|
|
145
|
+
f[r] += p * (n && c ? -1 : 1);
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
return f;
|
|
149
|
+
}
|
|
150
|
+
const oe = async (t, e, n) => {
|
|
151
|
+
const {
|
|
152
|
+
placement: o = "bottom",
|
|
153
|
+
strategy: i = "absolute",
|
|
154
|
+
middleware: l = [],
|
|
155
|
+
platform: r
|
|
156
|
+
} = n, s = l.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
157
|
+
let c = await r.getElementRects({
|
|
158
|
+
reference: t,
|
|
159
|
+
floating: e,
|
|
160
|
+
strategy: i
|
|
161
|
+
}), {
|
|
162
|
+
x: u,
|
|
163
|
+
y: d
|
|
164
|
+
} = bt(c, o, a), p = o, f = {}, m = 0;
|
|
165
|
+
for (let g = 0; g < s.length; g++) {
|
|
166
|
+
const {
|
|
167
|
+
name: w,
|
|
168
|
+
fn: h
|
|
169
|
+
} = s[g], {
|
|
170
|
+
x: v,
|
|
171
|
+
y,
|
|
172
|
+
data: O,
|
|
173
|
+
reset: b
|
|
174
|
+
} = await h({
|
|
175
|
+
x: u,
|
|
176
|
+
y: d,
|
|
177
|
+
initialPlacement: o,
|
|
178
|
+
placement: p,
|
|
179
|
+
strategy: i,
|
|
180
|
+
middlewareData: f,
|
|
181
|
+
rects: c,
|
|
182
|
+
platform: r,
|
|
183
|
+
elements: {
|
|
184
|
+
reference: t,
|
|
185
|
+
floating: e
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
u = v ?? u, d = y ?? d, f = {
|
|
189
|
+
...f,
|
|
190
|
+
[w]: {
|
|
191
|
+
...f[w],
|
|
192
|
+
...O
|
|
193
|
+
}
|
|
194
|
+
}, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
|
|
195
|
+
reference: t,
|
|
196
|
+
floating: e,
|
|
197
|
+
strategy: i
|
|
198
|
+
}) : b.rects), {
|
|
199
|
+
x: u,
|
|
200
|
+
y: d
|
|
201
|
+
} = bt(c, p, a)), g = -1);
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
x: u,
|
|
205
|
+
y: d,
|
|
206
|
+
placement: p,
|
|
207
|
+
strategy: i,
|
|
208
|
+
middlewareData: f
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
async function pt(t, e) {
|
|
212
|
+
var n;
|
|
213
|
+
e === void 0 && (e = {});
|
|
214
|
+
const {
|
|
215
|
+
x: o,
|
|
216
|
+
y: i,
|
|
217
|
+
platform: l,
|
|
218
|
+
rects: r,
|
|
219
|
+
elements: s,
|
|
220
|
+
strategy: a
|
|
221
|
+
} = t, {
|
|
222
|
+
boundary: c = "clippingAncestors",
|
|
223
|
+
rootBoundary: u = "viewport",
|
|
224
|
+
elementContext: d = "floating",
|
|
225
|
+
altBoundary: p = !1,
|
|
226
|
+
padding: f = 0
|
|
227
|
+
} = Q(e, t), m = Ct(f), w = s[p ? d === "floating" ? "reference" : "floating" : d], h = lt(await l.getClippingRect({
|
|
228
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(w))) == null || n ? w : w.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(s.floating)),
|
|
229
|
+
boundary: c,
|
|
230
|
+
rootBoundary: u,
|
|
231
|
+
strategy: a
|
|
232
|
+
})), v = d === "floating" ? {
|
|
233
|
+
...r.floating,
|
|
234
|
+
x: o,
|
|
235
|
+
y: i
|
|
236
|
+
} : r.reference, y = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(s.floating)), O = await (l.isElement == null ? void 0 : l.isElement(y)) ? await (l.getScale == null ? void 0 : l.getScale(y)) || {
|
|
237
|
+
x: 1,
|
|
238
|
+
y: 1
|
|
239
|
+
} : {
|
|
240
|
+
x: 1,
|
|
241
|
+
y: 1
|
|
242
|
+
}, b = lt(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
243
|
+
elements: s,
|
|
244
|
+
rect: v,
|
|
245
|
+
offsetParent: y,
|
|
246
|
+
strategy: a
|
|
247
|
+
}) : v);
|
|
248
|
+
return {
|
|
249
|
+
top: (h.top - b.top + m.top) / O.y,
|
|
250
|
+
bottom: (b.bottom - h.bottom + m.bottom) / O.y,
|
|
251
|
+
left: (h.left - b.left + m.left) / O.x,
|
|
252
|
+
right: (b.right - h.right + m.right) / O.x
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const ie = (t) => ({
|
|
8
256
|
name: "arrow",
|
|
9
|
-
options:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
257
|
+
options: t,
|
|
258
|
+
async fn(e) {
|
|
259
|
+
const {
|
|
260
|
+
x: n,
|
|
261
|
+
y: o,
|
|
262
|
+
placement: i,
|
|
263
|
+
rects: l,
|
|
264
|
+
platform: r,
|
|
265
|
+
elements: s,
|
|
266
|
+
middlewareData: a
|
|
267
|
+
} = e, {
|
|
268
|
+
element: c,
|
|
269
|
+
padding: u = 0
|
|
270
|
+
} = Q(t, e) || {};
|
|
271
|
+
if (c == null)
|
|
272
|
+
return {};
|
|
273
|
+
const d = Ct(u), p = {
|
|
274
|
+
x: n,
|
|
275
|
+
y: o
|
|
276
|
+
}, f = mt(i), m = dt(f), g = await r.getDimensions(c), w = f === "y", h = w ? "top" : "left", v = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", O = l.reference[m] + l.reference[f] - p[f] - l.floating[m], b = p[f] - l.reference[f], A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
277
|
+
let x = A ? A[y] : 0;
|
|
278
|
+
(!x || !await (r.isElement == null ? void 0 : r.isElement(A))) && (x = s.floating[y] || l.floating[m]);
|
|
279
|
+
const C = O / 2 - b / 2, D = x / 2 - g[m] / 2 - 1, T = K(d[h], D), P = K(d[v], D), _ = T, j = x - g[m] - P, E = x / 2 - g[m] / 2 + C, F = ft(_, E, j), M = !a.arrow && B(i) != null && E !== F && l.reference[m] / 2 - (E < _ ? T : P) - g[m] / 2 < 0, $ = M ? E < _ ? E - _ : E - j : 0;
|
|
280
|
+
return {
|
|
281
|
+
[f]: p[f] + $,
|
|
282
|
+
data: {
|
|
283
|
+
[f]: F,
|
|
284
|
+
centerOffset: E - F - $,
|
|
285
|
+
...M && {
|
|
286
|
+
alignmentOffset: $
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
reset: M
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
function re(t, e, n) {
|
|
294
|
+
return (t ? [...n.filter((i) => B(i) === t), ...n.filter((i) => B(i) !== t)] : n.filter((i) => N(i) === i)).filter((i) => t ? B(i) === t || (e ? it(i) !== i : !1) : !0);
|
|
295
|
+
}
|
|
296
|
+
const le = function(t) {
|
|
297
|
+
return t === void 0 && (t = {}), {
|
|
298
|
+
name: "autoPlacement",
|
|
299
|
+
options: t,
|
|
300
|
+
async fn(e) {
|
|
301
|
+
var n, o, i;
|
|
302
|
+
const {
|
|
303
|
+
rects: l,
|
|
304
|
+
middlewareData: r,
|
|
305
|
+
placement: s,
|
|
306
|
+
platform: a,
|
|
307
|
+
elements: c
|
|
308
|
+
} = e, {
|
|
309
|
+
crossAxis: u = !1,
|
|
310
|
+
alignment: d,
|
|
311
|
+
allowedPlacements: p = xt,
|
|
312
|
+
autoAlignment: f = !0,
|
|
313
|
+
...m
|
|
314
|
+
} = Q(t, e), g = d !== void 0 || p === xt ? re(d || null, f, p) : p, w = await pt(e, m), h = ((n = r.autoPlacement) == null ? void 0 : n.index) || 0, v = g[h];
|
|
315
|
+
if (v == null)
|
|
316
|
+
return {};
|
|
317
|
+
const y = Lt(v, l, await (a.isRTL == null ? void 0 : a.isRTL(c.floating)));
|
|
318
|
+
if (s !== v)
|
|
319
|
+
return {
|
|
320
|
+
reset: {
|
|
321
|
+
placement: g[0]
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const O = [w[N(v)], w[y[0]], w[y[1]]], b = [...((o = r.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
325
|
+
placement: v,
|
|
326
|
+
overflows: O
|
|
327
|
+
}], A = g[h + 1];
|
|
328
|
+
if (A)
|
|
329
|
+
return {
|
|
330
|
+
data: {
|
|
331
|
+
index: h + 1,
|
|
332
|
+
overflows: b
|
|
333
|
+
},
|
|
334
|
+
reset: {
|
|
335
|
+
placement: A
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
const x = b.map((T) => {
|
|
339
|
+
const P = B(T.placement);
|
|
340
|
+
return [T.placement, P && u ? (
|
|
341
|
+
// Check along the mainAxis and main crossAxis side.
|
|
342
|
+
T.overflows.slice(0, 2).reduce((_, j) => _ + j, 0)
|
|
343
|
+
) : (
|
|
344
|
+
// Check only the mainAxis.
|
|
345
|
+
T.overflows[0]
|
|
346
|
+
), T.overflows];
|
|
347
|
+
}).sort((T, P) => T[1] - P[1]), D = ((i = x.filter((T) => T[2].slice(
|
|
348
|
+
0,
|
|
349
|
+
// Aligned placements should not check their opposite crossAxis
|
|
350
|
+
// side.
|
|
351
|
+
B(T[0]) ? 2 : 3
|
|
352
|
+
).every((P) => P <= 0))[0]) == null ? void 0 : i[0]) || x[0][0];
|
|
353
|
+
return D !== s ? {
|
|
354
|
+
data: {
|
|
355
|
+
index: h + 1,
|
|
356
|
+
overflows: b
|
|
357
|
+
},
|
|
358
|
+
reset: {
|
|
359
|
+
placement: D
|
|
360
|
+
}
|
|
361
|
+
} : {};
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
}, se = function(t) {
|
|
365
|
+
return t === void 0 && (t = {}), {
|
|
366
|
+
name: "flip",
|
|
367
|
+
options: t,
|
|
368
|
+
async fn(e) {
|
|
369
|
+
var n, o;
|
|
370
|
+
const {
|
|
371
|
+
placement: i,
|
|
372
|
+
middlewareData: l,
|
|
373
|
+
rects: r,
|
|
374
|
+
initialPlacement: s,
|
|
375
|
+
platform: a,
|
|
376
|
+
elements: c
|
|
377
|
+
} = e, {
|
|
378
|
+
mainAxis: u = !0,
|
|
379
|
+
crossAxis: d = !0,
|
|
380
|
+
fallbackPlacements: p,
|
|
381
|
+
fallbackStrategy: f = "bestFit",
|
|
382
|
+
fallbackAxisSideDirection: m = "none",
|
|
383
|
+
flipAlignment: g = !0,
|
|
384
|
+
...w
|
|
385
|
+
} = Q(t, e);
|
|
386
|
+
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
387
|
+
return {};
|
|
388
|
+
const h = N(i), v = N(s) === s, y = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), O = p || (v || !g ? [rt(s)] : Zt(s));
|
|
389
|
+
!p && m !== "none" && O.push(...ee(s, g, m, y));
|
|
390
|
+
const b = [s, ...O], A = await pt(e, w), x = [];
|
|
391
|
+
let C = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
392
|
+
if (u && x.push(A[h]), d) {
|
|
393
|
+
const _ = Lt(i, r, y);
|
|
394
|
+
x.push(A[_[0]], A[_[1]]);
|
|
395
|
+
}
|
|
396
|
+
if (C = [...C, {
|
|
397
|
+
placement: i,
|
|
398
|
+
overflows: x
|
|
399
|
+
}], !x.every((_) => _ <= 0)) {
|
|
400
|
+
var D, T;
|
|
401
|
+
const _ = (((D = l.flip) == null ? void 0 : D.index) || 0) + 1, j = b[_];
|
|
402
|
+
if (j)
|
|
403
|
+
return {
|
|
404
|
+
data: {
|
|
405
|
+
index: _,
|
|
406
|
+
overflows: C
|
|
407
|
+
},
|
|
408
|
+
reset: {
|
|
409
|
+
placement: j
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
let E = (T = C.filter((F) => F.overflows[0] <= 0).sort((F, M) => F.overflows[1] - M.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
413
|
+
if (!E)
|
|
414
|
+
switch (f) {
|
|
415
|
+
case "bestFit": {
|
|
416
|
+
var P;
|
|
417
|
+
const F = (P = C.map((M) => [M.placement, M.overflows.filter(($) => $ > 0).reduce(($, It) => $ + It, 0)]).sort((M, $) => M[1] - $[1])[0]) == null ? void 0 : P[0];
|
|
418
|
+
F && (E = F);
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
case "initialPlacement":
|
|
422
|
+
E = s;
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
if (i !== E)
|
|
426
|
+
return {
|
|
427
|
+
reset: {
|
|
428
|
+
placement: E
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
return {};
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
async function ce(t, e) {
|
|
437
|
+
const {
|
|
438
|
+
placement: n,
|
|
439
|
+
platform: o,
|
|
440
|
+
elements: i
|
|
441
|
+
} = t, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = N(n), s = B(n), a = st(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, u = l && a ? -1 : 1, d = Q(e, t);
|
|
442
|
+
let {
|
|
443
|
+
mainAxis: p,
|
|
444
|
+
crossAxis: f,
|
|
445
|
+
alignmentAxis: m
|
|
446
|
+
} = typeof d == "number" ? {
|
|
447
|
+
mainAxis: d,
|
|
448
|
+
crossAxis: 0,
|
|
449
|
+
alignmentAxis: null
|
|
450
|
+
} : {
|
|
451
|
+
mainAxis: 0,
|
|
452
|
+
crossAxis: 0,
|
|
453
|
+
alignmentAxis: null,
|
|
454
|
+
...d
|
|
455
|
+
};
|
|
456
|
+
return s && typeof m == "number" && (f = s === "end" ? m * -1 : m), a ? {
|
|
457
|
+
x: f * u,
|
|
458
|
+
y: p * c
|
|
459
|
+
} : {
|
|
460
|
+
x: p * c,
|
|
461
|
+
y: f * u
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
const ae = function(t) {
|
|
465
|
+
return t === void 0 && (t = 0), {
|
|
466
|
+
name: "offset",
|
|
467
|
+
options: t,
|
|
468
|
+
async fn(e) {
|
|
469
|
+
var n, o;
|
|
470
|
+
const {
|
|
471
|
+
x: i,
|
|
472
|
+
y: l,
|
|
473
|
+
placement: r,
|
|
474
|
+
middlewareData: s
|
|
475
|
+
} = e, a = await ce(e, t);
|
|
476
|
+
return r === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
|
|
477
|
+
x: i + a.x,
|
|
478
|
+
y: l + a.y,
|
|
479
|
+
data: {
|
|
480
|
+
...a,
|
|
481
|
+
placement: r
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
}, fe = function(t) {
|
|
487
|
+
return t === void 0 && (t = {}), {
|
|
488
|
+
name: "shift",
|
|
489
|
+
options: t,
|
|
490
|
+
async fn(e) {
|
|
491
|
+
const {
|
|
492
|
+
x: n,
|
|
493
|
+
y: o,
|
|
494
|
+
placement: i
|
|
495
|
+
} = e, {
|
|
496
|
+
mainAxis: l = !0,
|
|
497
|
+
crossAxis: r = !1,
|
|
498
|
+
limiter: s = {
|
|
499
|
+
fn: (w) => {
|
|
500
|
+
let {
|
|
501
|
+
x: h,
|
|
502
|
+
y: v
|
|
503
|
+
} = w;
|
|
504
|
+
return {
|
|
505
|
+
x: h,
|
|
506
|
+
y: v
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
...a
|
|
511
|
+
} = Q(t, e), c = {
|
|
512
|
+
x: n,
|
|
513
|
+
y: o
|
|
514
|
+
}, u = await pt(e, a), d = st(N(i)), p = St(d);
|
|
515
|
+
let f = c[p], m = c[d];
|
|
516
|
+
if (l) {
|
|
517
|
+
const w = p === "y" ? "top" : "left", h = p === "y" ? "bottom" : "right", v = f + u[w], y = f - u[h];
|
|
518
|
+
f = ft(v, f, y);
|
|
519
|
+
}
|
|
520
|
+
if (r) {
|
|
521
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", v = m + u[w], y = m - u[h];
|
|
522
|
+
m = ft(v, m, y);
|
|
523
|
+
}
|
|
524
|
+
const g = s.fn({
|
|
525
|
+
...e,
|
|
526
|
+
[p]: f,
|
|
527
|
+
[d]: m
|
|
528
|
+
});
|
|
529
|
+
return {
|
|
530
|
+
...g,
|
|
531
|
+
data: {
|
|
532
|
+
x: g.x - n,
|
|
533
|
+
y: g.y - o
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
function H(t) {
|
|
540
|
+
return gt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
541
|
+
}
|
|
542
|
+
function S(t) {
|
|
543
|
+
var e;
|
|
544
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
545
|
+
}
|
|
546
|
+
function V(t) {
|
|
547
|
+
var e;
|
|
548
|
+
return (e = (gt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
549
|
+
}
|
|
550
|
+
function gt(t) {
|
|
551
|
+
return t instanceof Node || t instanceof S(t).Node;
|
|
552
|
+
}
|
|
553
|
+
function W(t) {
|
|
554
|
+
return t instanceof Element || t instanceof S(t).Element;
|
|
555
|
+
}
|
|
556
|
+
function k(t) {
|
|
557
|
+
return t instanceof HTMLElement || t instanceof S(t).HTMLElement;
|
|
558
|
+
}
|
|
559
|
+
function Ot(t) {
|
|
560
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
561
|
+
}
|
|
562
|
+
function et(t) {
|
|
563
|
+
const {
|
|
564
|
+
overflow: e,
|
|
565
|
+
overflowX: n,
|
|
566
|
+
overflowY: o,
|
|
567
|
+
display: i
|
|
568
|
+
} = L(t);
|
|
569
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
|
|
570
|
+
}
|
|
571
|
+
function ue(t) {
|
|
572
|
+
return ["table", "td", "th"].includes(H(t));
|
|
573
|
+
}
|
|
574
|
+
function ht(t) {
|
|
575
|
+
const e = wt(), n = L(t);
|
|
576
|
+
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
577
|
+
}
|
|
578
|
+
function de(t) {
|
|
579
|
+
let e = J(t);
|
|
580
|
+
for (; k(e) && !ct(e); ) {
|
|
581
|
+
if (ht(e))
|
|
582
|
+
return e;
|
|
583
|
+
e = J(e);
|
|
584
|
+
}
|
|
585
|
+
return null;
|
|
586
|
+
}
|
|
587
|
+
function wt() {
|
|
588
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
589
|
+
}
|
|
590
|
+
function ct(t) {
|
|
591
|
+
return ["html", "body", "#document"].includes(H(t));
|
|
592
|
+
}
|
|
593
|
+
function L(t) {
|
|
594
|
+
return S(t).getComputedStyle(t);
|
|
595
|
+
}
|
|
596
|
+
function at(t) {
|
|
597
|
+
return W(t) ? {
|
|
598
|
+
scrollLeft: t.scrollLeft,
|
|
599
|
+
scrollTop: t.scrollTop
|
|
600
|
+
} : {
|
|
601
|
+
scrollLeft: t.pageXOffset,
|
|
602
|
+
scrollTop: t.pageYOffset
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function J(t) {
|
|
606
|
+
if (H(t) === "html")
|
|
607
|
+
return t;
|
|
608
|
+
const e = (
|
|
609
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
610
|
+
t.assignedSlot || // DOM Element detected.
|
|
611
|
+
t.parentNode || // ShadowRoot detected.
|
|
612
|
+
Ot(t) && t.host || // Fallback.
|
|
613
|
+
V(t)
|
|
614
|
+
);
|
|
615
|
+
return Ot(e) ? e.host : e;
|
|
616
|
+
}
|
|
617
|
+
function Dt(t) {
|
|
618
|
+
const e = J(t);
|
|
619
|
+
return ct(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && et(e) ? e : Dt(e);
|
|
620
|
+
}
|
|
621
|
+
function tt(t, e, n) {
|
|
622
|
+
var o;
|
|
623
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
624
|
+
const i = Dt(t), l = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = S(i);
|
|
625
|
+
return l ? e.concat(r, r.visualViewport || [], et(i) ? i : [], r.frameElement && n ? tt(r.frameElement) : []) : e.concat(i, tt(i, [], n));
|
|
626
|
+
}
|
|
627
|
+
function Pt(t) {
|
|
628
|
+
const e = L(t);
|
|
629
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
630
|
+
const i = k(t), l = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, s = ot(n) !== l || ot(o) !== r;
|
|
631
|
+
return s && (n = l, o = r), {
|
|
632
|
+
width: n,
|
|
633
|
+
height: o,
|
|
634
|
+
$: s
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function vt(t) {
|
|
638
|
+
return W(t) ? t : t.contextElement;
|
|
639
|
+
}
|
|
640
|
+
function G(t) {
|
|
641
|
+
const e = vt(t);
|
|
642
|
+
if (!k(e))
|
|
643
|
+
return z(1);
|
|
644
|
+
const n = e.getBoundingClientRect(), {
|
|
645
|
+
width: o,
|
|
646
|
+
height: i,
|
|
647
|
+
$: l
|
|
648
|
+
} = Pt(e);
|
|
649
|
+
let r = (l ? ot(n.width) : n.width) / o, s = (l ? ot(n.height) : n.height) / i;
|
|
650
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
651
|
+
x: r,
|
|
652
|
+
y: s
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
const me = /* @__PURE__ */ z(0);
|
|
656
|
+
function Ft(t) {
|
|
657
|
+
const e = S(t);
|
|
658
|
+
return !wt() || !e.visualViewport ? me : {
|
|
659
|
+
x: e.visualViewport.offsetLeft,
|
|
660
|
+
y: e.visualViewport.offsetTop
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
function pe(t, e, n) {
|
|
664
|
+
return e === void 0 && (e = !1), !n || e && n !== S(t) ? !1 : e;
|
|
665
|
+
}
|
|
666
|
+
function X(t, e, n, o) {
|
|
667
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
668
|
+
const i = t.getBoundingClientRect(), l = vt(t);
|
|
669
|
+
let r = z(1);
|
|
670
|
+
e && (o ? W(o) && (r = G(o)) : r = G(t));
|
|
671
|
+
const s = pe(l, n, o) ? Ft(l) : z(0);
|
|
672
|
+
let a = (i.left + s.x) / r.x, c = (i.top + s.y) / r.y, u = i.width / r.x, d = i.height / r.y;
|
|
673
|
+
if (l) {
|
|
674
|
+
const p = S(l), f = o && W(o) ? S(o) : o;
|
|
675
|
+
let m = p, g = m.frameElement;
|
|
676
|
+
for (; g && o && f !== m; ) {
|
|
677
|
+
const w = G(g), h = g.getBoundingClientRect(), v = L(g), y = h.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, O = h.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
678
|
+
a *= w.x, c *= w.y, u *= w.x, d *= w.y, a += y, c += O, m = S(g), g = m.frameElement;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
return lt({
|
|
682
|
+
width: u,
|
|
683
|
+
height: d,
|
|
684
|
+
x: a,
|
|
685
|
+
y: c
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
const ge = [":popover-open", ":modal"];
|
|
689
|
+
function Mt(t) {
|
|
690
|
+
return ge.some((e) => {
|
|
691
|
+
try {
|
|
692
|
+
return t.matches(e);
|
|
693
|
+
} catch {
|
|
694
|
+
return !1;
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
function he(t) {
|
|
699
|
+
let {
|
|
700
|
+
elements: e,
|
|
701
|
+
rect: n,
|
|
702
|
+
offsetParent: o,
|
|
703
|
+
strategy: i
|
|
704
|
+
} = t;
|
|
705
|
+
const l = i === "fixed", r = V(o), s = e ? Mt(e.floating) : !1;
|
|
706
|
+
if (o === r || s && l)
|
|
707
|
+
return n;
|
|
708
|
+
let a = {
|
|
709
|
+
scrollLeft: 0,
|
|
710
|
+
scrollTop: 0
|
|
711
|
+
}, c = z(1);
|
|
712
|
+
const u = z(0), d = k(o);
|
|
713
|
+
if ((d || !d && !l) && ((H(o) !== "body" || et(r)) && (a = at(o)), k(o))) {
|
|
714
|
+
const p = X(o);
|
|
715
|
+
c = G(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
716
|
+
}
|
|
717
|
+
return {
|
|
718
|
+
width: n.width * c.x,
|
|
719
|
+
height: n.height * c.y,
|
|
720
|
+
x: n.x * c.x - a.scrollLeft * c.x + u.x,
|
|
721
|
+
y: n.y * c.y - a.scrollTop * c.y + u.y
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
function we(t) {
|
|
725
|
+
return Array.from(t.getClientRects());
|
|
726
|
+
}
|
|
727
|
+
function Bt(t) {
|
|
728
|
+
return X(V(t)).left + at(t).scrollLeft;
|
|
729
|
+
}
|
|
730
|
+
function ve(t) {
|
|
731
|
+
const e = V(t), n = at(t), o = t.ownerDocument.body, i = U(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), l = U(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
732
|
+
let r = -n.scrollLeft + Bt(t);
|
|
733
|
+
const s = -n.scrollTop;
|
|
734
|
+
return L(o).direction === "rtl" && (r += U(e.clientWidth, o.clientWidth) - i), {
|
|
735
|
+
width: i,
|
|
736
|
+
height: l,
|
|
737
|
+
x: r,
|
|
738
|
+
y: s
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
function ye(t, e) {
|
|
742
|
+
const n = S(t), o = V(t), i = n.visualViewport;
|
|
743
|
+
let l = o.clientWidth, r = o.clientHeight, s = 0, a = 0;
|
|
744
|
+
if (i) {
|
|
745
|
+
l = i.width, r = i.height;
|
|
746
|
+
const c = wt();
|
|
747
|
+
(!c || c && e === "fixed") && (s = i.offsetLeft, a = i.offsetTop);
|
|
748
|
+
}
|
|
749
|
+
return {
|
|
750
|
+
width: l,
|
|
751
|
+
height: r,
|
|
752
|
+
x: s,
|
|
753
|
+
y: a
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function xe(t, e) {
|
|
757
|
+
const n = X(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, l = k(t) ? G(t) : z(1), r = t.clientWidth * l.x, s = t.clientHeight * l.y, a = i * l.x, c = o * l.y;
|
|
758
|
+
return {
|
|
759
|
+
width: r,
|
|
760
|
+
height: s,
|
|
761
|
+
x: a,
|
|
762
|
+
y: c
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
function At(t, e, n) {
|
|
766
|
+
let o;
|
|
767
|
+
if (e === "viewport")
|
|
768
|
+
o = ye(t, n);
|
|
769
|
+
else if (e === "document")
|
|
770
|
+
o = ve(V(t));
|
|
771
|
+
else if (W(e))
|
|
772
|
+
o = xe(e, n);
|
|
773
|
+
else {
|
|
774
|
+
const i = Ft(t);
|
|
775
|
+
o = {
|
|
776
|
+
...e,
|
|
777
|
+
x: e.x - i.x,
|
|
778
|
+
y: e.y - i.y
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
return lt(o);
|
|
782
|
+
}
|
|
783
|
+
function kt(t, e) {
|
|
784
|
+
const n = J(t);
|
|
785
|
+
return n === e || !W(n) || ct(n) ? !1 : L(n).position === "fixed" || kt(n, e);
|
|
786
|
+
}
|
|
787
|
+
function be(t, e) {
|
|
788
|
+
const n = e.get(t);
|
|
789
|
+
if (n)
|
|
790
|
+
return n;
|
|
791
|
+
let o = tt(t, [], !1).filter((s) => W(s) && H(s) !== "body"), i = null;
|
|
792
|
+
const l = L(t).position === "fixed";
|
|
793
|
+
let r = l ? J(t) : t;
|
|
794
|
+
for (; W(r) && !ct(r); ) {
|
|
795
|
+
const s = L(r), a = ht(r);
|
|
796
|
+
!a && s.position === "fixed" && (i = null), (l ? !a && !i : !a && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || et(r) && !a && kt(t, r)) ? o = o.filter((u) => u !== r) : i = s, r = J(r);
|
|
39
797
|
}
|
|
40
|
-
|
|
41
|
-
|
|
798
|
+
return e.set(t, o), o;
|
|
799
|
+
}
|
|
800
|
+
function Oe(t) {
|
|
801
|
+
let {
|
|
802
|
+
element: e,
|
|
803
|
+
boundary: n,
|
|
804
|
+
rootBoundary: o,
|
|
805
|
+
strategy: i
|
|
806
|
+
} = t;
|
|
807
|
+
const r = [...n === "clippingAncestors" ? be(e, this._c) : [].concat(n), o], s = r[0], a = r.reduce((c, u) => {
|
|
808
|
+
const d = At(e, u, i);
|
|
809
|
+
return c.top = U(d.top, c.top), c.right = K(d.right, c.right), c.bottom = K(d.bottom, c.bottom), c.left = U(d.left, c.left), c;
|
|
810
|
+
}, At(e, s, i));
|
|
811
|
+
return {
|
|
812
|
+
width: a.right - a.left,
|
|
813
|
+
height: a.bottom - a.top,
|
|
814
|
+
x: a.left,
|
|
815
|
+
y: a.top
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function Ae(t) {
|
|
819
|
+
const {
|
|
820
|
+
width: e,
|
|
821
|
+
height: n
|
|
822
|
+
} = Pt(t);
|
|
823
|
+
return {
|
|
824
|
+
width: e,
|
|
825
|
+
height: n
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
function Te(t, e, n) {
|
|
829
|
+
const o = k(e), i = V(e), l = n === "fixed", r = X(t, !0, l, e);
|
|
830
|
+
let s = {
|
|
831
|
+
scrollLeft: 0,
|
|
832
|
+
scrollTop: 0
|
|
833
|
+
};
|
|
834
|
+
const a = z(0);
|
|
835
|
+
if (o || !o && !l)
|
|
836
|
+
if ((H(e) !== "body" || et(i)) && (s = at(e)), o) {
|
|
837
|
+
const d = X(e, !0, l, e);
|
|
838
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
839
|
+
} else
|
|
840
|
+
i && (a.x = Bt(i));
|
|
841
|
+
const c = r.left + s.scrollLeft - a.x, u = r.top + s.scrollTop - a.y;
|
|
842
|
+
return {
|
|
843
|
+
x: c,
|
|
844
|
+
y: u,
|
|
845
|
+
width: r.width,
|
|
846
|
+
height: r.height
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
function Tt(t, e) {
|
|
850
|
+
return !k(t) || L(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
851
|
+
}
|
|
852
|
+
function $t(t, e) {
|
|
853
|
+
const n = S(t);
|
|
854
|
+
if (!k(t) || Mt(t))
|
|
855
|
+
return n;
|
|
856
|
+
let o = Tt(t, e);
|
|
857
|
+
for (; o && ue(o) && L(o).position === "static"; )
|
|
858
|
+
o = Tt(o, e);
|
|
859
|
+
return o && (H(o) === "html" || H(o) === "body" && L(o).position === "static" && !ht(o)) ? n : o || de(t) || n;
|
|
860
|
+
}
|
|
861
|
+
const Re = async function(t) {
|
|
862
|
+
const e = this.getOffsetParent || $t, n = this.getDimensions;
|
|
863
|
+
return {
|
|
864
|
+
reference: Te(t.reference, await e(t.floating), t.strategy),
|
|
865
|
+
floating: {
|
|
866
|
+
x: 0,
|
|
867
|
+
y: 0,
|
|
868
|
+
...await n(t.floating)
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
function _e(t) {
|
|
873
|
+
return L(t).direction === "rtl";
|
|
874
|
+
}
|
|
875
|
+
const Ee = {
|
|
876
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: he,
|
|
877
|
+
getDocumentElement: V,
|
|
878
|
+
getClippingRect: Oe,
|
|
879
|
+
getOffsetParent: $t,
|
|
880
|
+
getElementRects: Re,
|
|
881
|
+
getClientRects: we,
|
|
882
|
+
getDimensions: Ae,
|
|
883
|
+
getScale: G,
|
|
884
|
+
isElement: W,
|
|
885
|
+
isRTL: _e
|
|
886
|
+
};
|
|
887
|
+
function Se(t, e) {
|
|
888
|
+
let n = null, o;
|
|
889
|
+
const i = V(t);
|
|
890
|
+
function l() {
|
|
891
|
+
var s;
|
|
892
|
+
clearTimeout(o), (s = n) == null || s.disconnect(), n = null;
|
|
893
|
+
}
|
|
894
|
+
function r(s, a) {
|
|
895
|
+
s === void 0 && (s = !1), a === void 0 && (a = 1), l();
|
|
896
|
+
const {
|
|
897
|
+
left: c,
|
|
898
|
+
top: u,
|
|
899
|
+
width: d,
|
|
900
|
+
height: p
|
|
901
|
+
} = t.getBoundingClientRect();
|
|
902
|
+
if (s || e(), !d || !p)
|
|
903
|
+
return;
|
|
904
|
+
const f = nt(u), m = nt(i.clientWidth - (c + d)), g = nt(i.clientHeight - (u + p)), w = nt(c), v = {
|
|
905
|
+
rootMargin: -f + "px " + -m + "px " + -g + "px " + -w + "px",
|
|
906
|
+
threshold: U(0, K(1, a)) || 1
|
|
907
|
+
};
|
|
908
|
+
let y = !0;
|
|
909
|
+
function O(b) {
|
|
910
|
+
const A = b[0].intersectionRatio;
|
|
911
|
+
if (A !== a) {
|
|
912
|
+
if (!y)
|
|
913
|
+
return r();
|
|
914
|
+
A ? r(!1, A) : o = setTimeout(() => {
|
|
915
|
+
r(!1, 1e-7);
|
|
916
|
+
}, 100);
|
|
917
|
+
}
|
|
918
|
+
y = !1;
|
|
919
|
+
}
|
|
920
|
+
try {
|
|
921
|
+
n = new IntersectionObserver(O, {
|
|
922
|
+
...v,
|
|
923
|
+
// Handle <iframe>s
|
|
924
|
+
root: i.ownerDocument
|
|
925
|
+
});
|
|
926
|
+
} catch {
|
|
927
|
+
n = new IntersectionObserver(O, v);
|
|
928
|
+
}
|
|
929
|
+
n.observe(t);
|
|
930
|
+
}
|
|
931
|
+
return r(!0), l;
|
|
932
|
+
}
|
|
933
|
+
function Rt(t, e, n, o) {
|
|
934
|
+
o === void 0 && (o = {});
|
|
935
|
+
const {
|
|
936
|
+
ancestorScroll: i = !0,
|
|
937
|
+
ancestorResize: l = !0,
|
|
938
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
939
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
940
|
+
animationFrame: a = !1
|
|
941
|
+
} = o, c = vt(t), u = i || l ? [...c ? tt(c) : [], ...tt(e)] : [];
|
|
942
|
+
u.forEach((h) => {
|
|
943
|
+
i && h.addEventListener("scroll", n, {
|
|
944
|
+
passive: !0
|
|
945
|
+
}), l && h.addEventListener("resize", n);
|
|
946
|
+
});
|
|
947
|
+
const d = c && s ? Se(c, n) : null;
|
|
948
|
+
let p = -1, f = null;
|
|
949
|
+
r && (f = new ResizeObserver((h) => {
|
|
950
|
+
let [v] = h;
|
|
951
|
+
v && v.target === c && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
952
|
+
var y;
|
|
953
|
+
(y = f) == null || y.observe(e);
|
|
954
|
+
})), n();
|
|
955
|
+
}), c && !a && f.observe(c), f.observe(e));
|
|
956
|
+
let m, g = a ? X(t) : null;
|
|
957
|
+
a && w();
|
|
958
|
+
function w() {
|
|
959
|
+
const h = X(t);
|
|
960
|
+
g && (h.x !== g.x || h.y !== g.y || h.width !== g.width || h.height !== g.height) && n(), g = h, m = requestAnimationFrame(w);
|
|
961
|
+
}
|
|
962
|
+
return n(), () => {
|
|
963
|
+
var h;
|
|
964
|
+
u.forEach((v) => {
|
|
965
|
+
i && v.removeEventListener("scroll", n), l && v.removeEventListener("resize", n);
|
|
966
|
+
}), d == null || d(), (h = f) == null || h.disconnect(), f = null, a && cancelAnimationFrame(m);
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
const Le = le, Ce = fe, De = se, Pe = ie, Fe = (t, e, n) => {
|
|
970
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
971
|
+
platform: Ee,
|
|
972
|
+
...n
|
|
973
|
+
}, l = {
|
|
974
|
+
...i.platform,
|
|
975
|
+
_c: o
|
|
976
|
+
};
|
|
977
|
+
return oe(t, e, {
|
|
978
|
+
...i,
|
|
979
|
+
platform: l
|
|
980
|
+
});
|
|
981
|
+
};
|
|
982
|
+
function Me(t) {
|
|
983
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
984
|
+
}
|
|
985
|
+
function ut(t) {
|
|
986
|
+
if (Me(t)) {
|
|
987
|
+
const e = t.$el;
|
|
988
|
+
return gt(e) && H(e) === "#comment" ? null : e;
|
|
989
|
+
}
|
|
990
|
+
return t;
|
|
991
|
+
}
|
|
992
|
+
function Be(t) {
|
|
993
|
+
return {
|
|
994
|
+
name: "arrow",
|
|
995
|
+
options: t,
|
|
996
|
+
fn(e) {
|
|
997
|
+
const n = ut(q(t.element));
|
|
998
|
+
return n == null ? {} : Pe({
|
|
999
|
+
element: n,
|
|
1000
|
+
padding: t.padding
|
|
1001
|
+
}).fn(e);
|
|
1002
|
+
}
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
function Nt(t) {
|
|
1006
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1007
|
+
}
|
|
1008
|
+
function _t(t, e) {
|
|
1009
|
+
const n = Nt(t);
|
|
1010
|
+
return Math.round(e * n) / n;
|
|
1011
|
+
}
|
|
1012
|
+
function ke(t, e, n) {
|
|
1013
|
+
n === void 0 && (n = {});
|
|
1014
|
+
const o = n.whileElementsMounted, i = R(() => {
|
|
1015
|
+
var x;
|
|
1016
|
+
return (x = q(n.open)) != null ? x : !0;
|
|
1017
|
+
}), l = R(() => q(n.middleware)), r = R(() => {
|
|
1018
|
+
var x;
|
|
1019
|
+
return (x = q(n.placement)) != null ? x : "bottom";
|
|
1020
|
+
}), s = R(() => {
|
|
1021
|
+
var x;
|
|
1022
|
+
return (x = q(n.strategy)) != null ? x : "absolute";
|
|
1023
|
+
}), a = R(() => {
|
|
1024
|
+
var x;
|
|
1025
|
+
return (x = q(n.transform)) != null ? x : !0;
|
|
1026
|
+
}), c = R(() => ut(t.value)), u = R(() => ut(e.value)), d = I(0), p = I(0), f = I(s.value), m = I(r.value), g = zt({}), w = I(!1), h = R(() => {
|
|
1027
|
+
const x = {
|
|
1028
|
+
position: f.value,
|
|
1029
|
+
left: "0",
|
|
1030
|
+
top: "0"
|
|
1031
|
+
};
|
|
1032
|
+
if (!u.value)
|
|
1033
|
+
return x;
|
|
1034
|
+
const C = _t(u.value, d.value), D = _t(u.value, p.value);
|
|
1035
|
+
return a.value ? {
|
|
1036
|
+
...x,
|
|
1037
|
+
transform: "translate(" + C + "px, " + D + "px)",
|
|
1038
|
+
...Nt(u.value) >= 1.5 && {
|
|
1039
|
+
willChange: "transform"
|
|
1040
|
+
}
|
|
1041
|
+
} : {
|
|
1042
|
+
position: f.value,
|
|
1043
|
+
left: C + "px",
|
|
1044
|
+
top: D + "px"
|
|
1045
|
+
};
|
|
1046
|
+
});
|
|
1047
|
+
let v;
|
|
1048
|
+
function y() {
|
|
1049
|
+
c.value == null || u.value == null || Fe(c.value, u.value, {
|
|
1050
|
+
middleware: l.value,
|
|
1051
|
+
placement: r.value,
|
|
1052
|
+
strategy: s.value
|
|
1053
|
+
}).then((x) => {
|
|
1054
|
+
d.value = x.x, p.value = x.y, f.value = x.strategy, m.value = x.placement, g.value = x.middlewareData, w.value = !0;
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
function O() {
|
|
1058
|
+
typeof v == "function" && (v(), v = void 0);
|
|
1059
|
+
}
|
|
1060
|
+
function b() {
|
|
1061
|
+
if (O(), o === void 0) {
|
|
1062
|
+
y();
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
if (c.value != null && u.value != null) {
|
|
1066
|
+
v = o(c.value, u.value, y);
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
function A() {
|
|
1071
|
+
i.value || (w.value = !1);
|
|
1072
|
+
}
|
|
1073
|
+
return Z([l, r, s], y, {
|
|
1074
|
+
flush: "sync"
|
|
1075
|
+
}), Z([c, u], b, {
|
|
1076
|
+
flush: "sync"
|
|
1077
|
+
}), Z(i, A, {
|
|
1078
|
+
flush: "sync"
|
|
1079
|
+
}), jt() && Ut(O), {
|
|
1080
|
+
x: Y(d),
|
|
1081
|
+
y: Y(p),
|
|
1082
|
+
strategy: Y(f),
|
|
1083
|
+
placement: Y(m),
|
|
1084
|
+
middlewareData: Y(g),
|
|
1085
|
+
isPositioned: Y(w),
|
|
1086
|
+
floatingStyles: h,
|
|
1087
|
+
update: y
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
var Ht = /* @__PURE__ */ ((t) => (t.TOP = "top", t.RIGHT = "right", t.BOTTOM = "bottom", t.LEFT = "left", t))(Ht || {}), Wt = /* @__PURE__ */ ((t) => (t.AUTO = "auto", t.AUTO_START = "auto-start", t.AUTO_END = "auto-end", t.TOP_START = "top-start", t.TOP_END = "top-end", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t))(Wt || {}), Vt = /* @__PURE__ */ ((t) => (t.TOOLTIP = "tooltip", t.POPOVER = "dialog", t))(Vt || {});
|
|
1091
|
+
const Et = { ...Ht, ...Wt }, $e = (t, e) => t ? e[1] + 7 : e[1], Ne = (t) => {
|
|
1092
|
+
let e = Array.isArray(t) ? t : [t];
|
|
1093
|
+
return e = e.filter((n) => n !== "auto" && n !== "auto-start" && n !== "auto-end").map((n) => n), {
|
|
1094
|
+
fallbackPlacements: e
|
|
1095
|
+
};
|
|
1096
|
+
}, He = {
|
|
1097
|
+
name: "sameWidth",
|
|
1098
|
+
fn: ({ elements: t }) => (t.floating.style.width = `${t.reference.offsetWidth}px`, {})
|
|
1099
|
+
}, We = {}, Ve = /* @__PURE__ */ Xt({
|
|
1100
|
+
...We,
|
|
1101
|
+
__name: "popper-container",
|
|
42
1102
|
props: {
|
|
43
1103
|
/**
|
|
44
|
-
* The
|
|
45
|
-
*/
|
|
46
|
-
id: { type: String, default: null },
|
|
47
|
-
/**
|
|
48
|
-
* Reference to the DOM element or Vue component for positioning
|
|
49
|
-
*/
|
|
50
|
-
targetElement: { type: [Element, Object], required: !0 },
|
|
51
|
-
/**
|
|
52
|
-
* Position relative to the target element
|
|
53
|
-
* @see {@link https://popper.js.org/docs/v2/constructors/#placement}
|
|
1104
|
+
* The aria role assigned to the container. Defaults to null, which means it's not set if nothing is passed.
|
|
54
1105
|
*/
|
|
55
|
-
|
|
1106
|
+
ariaRole: {
|
|
56
1107
|
type: String,
|
|
57
|
-
default:
|
|
58
|
-
validator: (t) => Object.values(
|
|
1108
|
+
default: null,
|
|
1109
|
+
validator: (t) => Object.values(Vt).includes(t)
|
|
59
1110
|
},
|
|
60
|
-
/**
|
|
61
|
-
* Instructs popover to be visible outside of the containing container.
|
|
62
|
-
* Useful when component would be used in limited containers like Modal, Side panel, etc.
|
|
63
|
-
* https://popper.js.org/docs/v2/constructors/#strategy
|
|
64
|
-
*/
|
|
65
|
-
fixedPositioning: { type: Boolean, default: !1 },
|
|
66
1111
|
/**
|
|
67
1112
|
* Indicates if container should have additional arrow, pointing at target element
|
|
68
1113
|
* Can be just a boolean flag, or an object with additional configuration:
|
|
69
1114
|
* @property {Array<string>} arrow.classes – apply any additional classes to the arrow element.
|
|
70
|
-
* @property {string} arrow.padding – useful when content has rounded corners, https://
|
|
1115
|
+
* @property {string} arrow.padding – useful when content has rounded corners, @see {@link https://floating-ui.com/docs/arrow#padding}
|
|
71
1116
|
*/
|
|
72
1117
|
arrow: { type: Object, default: void 0 },
|
|
73
|
-
/**
|
|
74
|
-
* Allows to displace a popper container from its target element.
|
|
75
|
-
* @see {@link https://popper.js.org/docs/v2/modifiers/offset/}
|
|
76
|
-
*/
|
|
77
|
-
offset: {
|
|
78
|
-
type: Array,
|
|
79
|
-
default: () => [0, 0],
|
|
80
|
-
validator: (t) => (t == null ? void 0 : t.length) === 2
|
|
81
|
-
},
|
|
82
|
-
/**
|
|
83
|
-
* Instructs popper container to have the same width as target element.
|
|
84
|
-
*/
|
|
85
|
-
matchWidth: { type: Boolean, default: !1 },
|
|
86
1118
|
/**
|
|
87
1119
|
* Disables wrapping focus-trap component.
|
|
88
1120
|
* Mostly useful for the storybook demo.
|
|
89
1121
|
*/
|
|
90
1122
|
disabledFocusTrap: { type: Boolean, default: !1 },
|
|
91
|
-
/**
|
|
92
|
-
* Custom set of modifiers. Useful for low-level control over Popper behavior in some really complex use cases.
|
|
93
|
-
*/
|
|
94
|
-
modifiers: { type: Array, default: null },
|
|
95
1123
|
/**
|
|
96
1124
|
* Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].
|
|
97
1125
|
* Useful when not using auto as starting placement.
|
|
98
|
-
* https://
|
|
1126
|
+
* @see {@link https://floating-ui.com/docs/flip#fallbackplacements}
|
|
99
1127
|
*/
|
|
100
1128
|
fallbackPosition: {
|
|
101
1129
|
type: [Array, String],
|
|
102
1130
|
default: null
|
|
103
1131
|
},
|
|
104
1132
|
/**
|
|
105
|
-
*
|
|
1133
|
+
* Instructs popover to be visible outside of the containing container.
|
|
1134
|
+
* Useful when component would be used in limited containers like Modal, Side panel, etc.
|
|
1135
|
+
* @see {@link https://floating-ui.com/docs/usefloating#strategy}
|
|
106
1136
|
*/
|
|
107
|
-
|
|
108
|
-
type: String,
|
|
109
|
-
default: null,
|
|
110
|
-
validator: (t) => Object.values(o).includes(t)
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
data: () => ({
|
|
114
|
-
popper: null,
|
|
115
|
-
emittedPosition: null
|
|
116
|
-
}),
|
|
117
|
-
computed: {
|
|
118
|
-
strategy() {
|
|
119
|
-
return this.fixedPositioning ? "fixed" : "absolute";
|
|
120
|
-
},
|
|
1137
|
+
fixedPositioning: { type: Boolean, default: !1 },
|
|
121
1138
|
/**
|
|
122
|
-
*
|
|
123
|
-
* Read utils file for more info on each modifier.
|
|
1139
|
+
* The id to be set on the component. Use it for accessibility purposes.
|
|
124
1140
|
*/
|
|
125
|
-
|
|
126
|
-
const t = this.modifiers || [];
|
|
127
|
-
return [
|
|
128
|
-
// Create arrow modifier if arrow props are set
|
|
129
|
-
...this.arrow ? [d(this.$refs.arrow, this.arrow)] : [],
|
|
130
|
-
// Create offset modifier
|
|
131
|
-
c(this.arrow, this.offset),
|
|
132
|
-
// Apply data-hide attribute to arrow element depnding on center offset.
|
|
133
|
-
m,
|
|
134
|
-
// If matchWidth set to true, set the width of popover to same as target element.
|
|
135
|
-
...this.matchWidth ? [u] : [],
|
|
136
|
-
// Emits position of popover when position is updated.
|
|
137
|
-
{
|
|
138
|
-
name: "trackPosition",
|
|
139
|
-
enabled: !0,
|
|
140
|
-
phase: "afterWrite",
|
|
141
|
-
fn: ({ state: r }) => {
|
|
142
|
-
this.emittedPosition !== r.placement && (this.emittedPosition = r.placement, this.$emit("position", this.emittedPosition));
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
// Sets Flip modifier if fallbackPosition is set
|
|
146
|
-
...this.fallbackPosition ? [h(this.fallbackPosition)] : [],
|
|
147
|
-
...t || []
|
|
148
|
-
];
|
|
149
|
-
},
|
|
1141
|
+
id: { type: String, default: null },
|
|
150
1142
|
/**
|
|
151
|
-
*
|
|
1143
|
+
* If hiding / showing popper element then use this property to tell the popper when to update it's position.
|
|
1144
|
+
* This will drastically help improve performance, as we will not need to track hidden elements.
|
|
152
1145
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
1146
|
+
isHidden: { type: Boolean, default: null },
|
|
1147
|
+
/**
|
|
1148
|
+
* Instructs popper container to have the same width as target element.
|
|
1149
|
+
*/
|
|
1150
|
+
matchWidth: { type: Boolean, default: !1 },
|
|
1151
|
+
/**
|
|
1152
|
+
* Custom set of middleware. Useful for low-level control over Popper behavior in some really complex use cases.
|
|
1153
|
+
* @see {@link https://floating-ui.com/docs/middleware}
|
|
1154
|
+
*/
|
|
1155
|
+
middleware: { type: Array, default: null },
|
|
1156
|
+
/**
|
|
1157
|
+
* Allows to displace a popper container from its target element.
|
|
1158
|
+
* @see {@link https://floating-ui.com/docs/offset#options}
|
|
1159
|
+
*/
|
|
1160
|
+
offset: {
|
|
1161
|
+
type: Array,
|
|
1162
|
+
default: () => [0, 0],
|
|
1163
|
+
validator: (t) => (t == null ? void 0 : t.length) === 2
|
|
167
1164
|
},
|
|
168
|
-
|
|
169
|
-
|
|
1165
|
+
/**
|
|
1166
|
+
* Position relative to the target element
|
|
1167
|
+
* @see {@link https://floating-ui.com/docs/computeposition#placement}
|
|
1168
|
+
*/
|
|
1169
|
+
position: {
|
|
1170
|
+
type: String,
|
|
1171
|
+
default: Et.AUTO,
|
|
1172
|
+
validator: (t) => Object.values(Et).includes(t)
|
|
170
1173
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
this.initPopper();
|
|
176
|
-
},
|
|
177
|
-
beforeUnmount() {
|
|
178
|
-
this.destroyPopper();
|
|
1174
|
+
/**
|
|
1175
|
+
* Reference to the DOM element or Vue component for positioning
|
|
1176
|
+
*/
|
|
1177
|
+
targetElement: { type: [Element, Object], required: !0 }
|
|
179
1178
|
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
1179
|
+
emits: ["placement"],
|
|
1180
|
+
setup(t, { emit: e }) {
|
|
1181
|
+
var y;
|
|
1182
|
+
const n = t, { position: o } = Yt(n), i = I(), l = I(null), r = I(n.position), s = R(
|
|
1183
|
+
() => n.targetElement.$el ? n.targetElement.$el : n.targetElement
|
|
1184
|
+
), a = R(
|
|
1185
|
+
() => i.value.$el ? i.value.$el : i.value
|
|
1186
|
+
), c = R(() => (n == null ? void 0 : n.position) !== "auto" && (n == null ? void 0 : n.fallbackPosition) !== "auto"), u = R(() => {
|
|
1187
|
+
switch (n.position) {
|
|
1188
|
+
case "auto-start":
|
|
1189
|
+
return { alignment: "start", crossAxis: !0 };
|
|
1190
|
+
case "auto-end":
|
|
1191
|
+
return { alignment: "end", crossAxis: !0 };
|
|
1192
|
+
default:
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
}), d = R(() => n.fixedPositioning ? "fixed" : "absolute"), { floatingStyles: p, middlewareData: f, placement: m, update: g } = ke(s, i, {
|
|
1196
|
+
placement: o,
|
|
1197
|
+
middleware: [
|
|
1198
|
+
// Adds flip modifier if fallbackPosition is not set to auto
|
|
1199
|
+
...c.value ? [
|
|
1200
|
+
De({
|
|
1201
|
+
fallbackPlacements: Ne(n.fallbackPosition).fallbackPlacements
|
|
1202
|
+
})
|
|
1203
|
+
] : [],
|
|
1204
|
+
// Adds autoposition middlelare if position is set to any auto variants
|
|
1205
|
+
...c.value ? [] : [Le(u.value)],
|
|
1206
|
+
// Add shifting middle in case popper is still not fully visible in view port
|
|
1207
|
+
Ce(),
|
|
1208
|
+
// Adds offset middlelare if offset property is set
|
|
1209
|
+
...n.offset ? [ae($e(n.arrow, n.offset))] : [],
|
|
1210
|
+
// Adds arrow middlelare if arrow property is set, can set additional padding property
|
|
1211
|
+
...n.arrow ? [Be({ element: l, padding: n.arrow.padding || 0 })] : [],
|
|
1212
|
+
// Adds same width middleware to keep popper width same as referenced element's width
|
|
1213
|
+
...n.matchWidth ? [He] : [],
|
|
1214
|
+
// If there is additional custom middleware to add via the property then add it
|
|
1215
|
+
...((y = n.middleware) == null ? void 0 : y.length) > 0 ? n.middleware : []
|
|
1216
|
+
],
|
|
1217
|
+
strategy: d,
|
|
1218
|
+
// If we're mounting the element with a `v-if` then we need to auto update it while it's mounted
|
|
1219
|
+
...n.isHidden === null ? { whileElementsMounted: Rt } : []
|
|
1220
|
+
});
|
|
1221
|
+
let w;
|
|
1222
|
+
Z(
|
|
1223
|
+
() => n.isHidden,
|
|
1224
|
+
() => {
|
|
1225
|
+
n.isHidden !== null && !n.isHidden ? w = Rt(s == null ? void 0 : s.value, a == null ? void 0 : a.value, g) : n.isHidden !== null && n.isHidden && typeof w == "function" && w();
|
|
1226
|
+
}
|
|
1227
|
+
), Z(
|
|
1228
|
+
() => m.value,
|
|
1229
|
+
() => {
|
|
1230
|
+
r.value !== m.value && (r.value = m.value, e("placement", r.value));
|
|
1231
|
+
}
|
|
1232
|
+
);
|
|
1233
|
+
const h = R(() => {
|
|
1234
|
+
var O, b;
|
|
1235
|
+
return {
|
|
1236
|
+
position: "absolute",
|
|
1237
|
+
left: ((O = f.value.arrow) == null ? void 0 : O.x) != null ? `${f.value.arrow.x}px` : "",
|
|
1238
|
+
top: ((b = f.value.arrow) == null ? void 0 : b.y) != null ? `${f.value.arrow.y}px` : ""
|
|
1239
|
+
};
|
|
1240
|
+
}), v = R(() => {
|
|
1241
|
+
var O;
|
|
1242
|
+
return {
|
|
1243
|
+
class: n.arrow.classes,
|
|
1244
|
+
style: h.value,
|
|
1245
|
+
// Applies a data-hide attribute to arrow element depending on center offset.
|
|
1246
|
+
...((O = f.value.arrow) == null ? void 0 : O.centerOffset) !== 0 ? { "data-hide": "" } : {}
|
|
1247
|
+
};
|
|
1248
|
+
});
|
|
1249
|
+
return { __sfc: !0, props: n, emit: e, position: o, popperContainerRef: i, floatingArrow: l, emittedPosition: r, targetElement: s, popperContainerElement: a, isFlipMiddleware: c, getAutoPlacementProps: u, strategy: d, floatingStyles: p, middlewareData: f, placement: m, update: g, cleanupAutoUpdate: w, arrowStyles: h, arrowAttributes: v, BentoFocusTrap: qt };
|
|
202
1250
|
}
|
|
203
1251
|
});
|
|
204
|
-
var
|
|
205
|
-
var e = this,
|
|
206
|
-
return
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1252
|
+
var Ie = function() {
|
|
1253
|
+
var e = this, n = e._self._c, o = e._self._setupProxy;
|
|
1254
|
+
return n(o.BentoFocusTrap, e._b({ ref: "popperContainerRef", staticClass: "b-popper-container", style: o.floatingStyles, attrs: { id: e.id, "data-popper-placement": o.placement, disabled: e.disabledFocusTrap, role: e.ariaRole } }, "bento-focus-trap", e.$attrs, !1), [e._t("default"), o.props.arrow ? n("span", e._b({ ref: "floatingArrow", staticClass: "b-popper-container__arrow", attrs: { "data-testid": "arrow" } }, "span", o.arrowAttributes, !1)) : e._e()], 2);
|
|
1255
|
+
}, ze = [], je = /* @__PURE__ */ Gt(
|
|
1256
|
+
Ve,
|
|
1257
|
+
Ie,
|
|
1258
|
+
ze,
|
|
211
1259
|
!1,
|
|
212
1260
|
null,
|
|
213
|
-
"
|
|
1261
|
+
"2dc38cd5",
|
|
214
1262
|
null,
|
|
215
1263
|
null
|
|
216
1264
|
);
|
|
217
|
-
const
|
|
1265
|
+
const Ge = je.exports;
|
|
218
1266
|
export {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1267
|
+
Ge as PopperContainer,
|
|
1268
|
+
Vt as PopperContainerAriaRole,
|
|
1269
|
+
Et as PopperContainerPosition,
|
|
1270
|
+
Ht as PopperContainerPositionBasic,
|
|
1271
|
+
Wt as PopperContainerPositionExtended
|
|
224
1272
|
};
|
|
225
1273
|
//# sourceMappingURL=popper-container.js.map
|