@leaflink/stash 48.10.0 → 48.10.1
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/Accordion.js +1 -1
- package/dist/ActionsDropdown.js +1 -1
- package/dist/AddressSelect.js +1 -1
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +1 -1
- package/dist/AppTopbar.js +1 -1
- package/dist/Avatar.vue.d.ts +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Button.vue.d.ts +3 -1
- package/dist/CardMedia.js +1 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +1 -1
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +1 -1
- package/dist/CurrencyInput.js +39 -34
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +1 -1
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +1 -1
- package/dist/DataViewToolbar.js +1 -1
- package/dist/DatePicker.js +3355 -3368
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dialog.js +75 -69
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +2 -2
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +1 -1
- package/dist/FileUpload.js +1 -1
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +1 -1
- package/dist/FilterDrawerItem.js +1 -1
- package/dist/FilterDropdown.js +1 -1
- package/dist/FilterSelect.js +1 -1
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +1 -1
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +2 -2
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/IconLabel.js +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +3 -3
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-4b8944da.js → Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js} +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-4b8944da.js.map → Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map} +1 -1
- package/dist/Image.js.map +1 -1
- package/dist/InlineEdit.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +1 -1
- package/dist/LicenseChip.js +1 -1
- package/dist/ListView.js +2 -2
- package/dist/ListView.js.map +1 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +1 -1
- package/dist/Metric.vue.d.ts +1 -1
- package/dist/Modal.js +1 -1
- package/dist/Modals.js +6 -6
- package/dist/Modals.js.map +1 -1
- package/dist/ObfuscateText.js +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +1 -1
- package/dist/PlaidLink.js.map +1 -1
- package/dist/QuickAction.js +1 -1
- package/dist/RadioNew.js.map +1 -1
- package/dist/RangeInput.js +1 -1
- package/dist/SearchBar.js +1 -1
- package/dist/Select.js +709 -653
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +1 -1
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +1 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/Step.js +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/TableCell.js +2 -2
- package/dist/TableHeaderCell.js +2 -2
- package/dist/TableHeaderRow.js +2 -2
- package/dist/TableRow.js +2 -2
- package/dist/TableRow.vue.d.ts +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/TextEditor.js +991 -991
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +274 -252
- package/dist/Toast.js.map +1 -1
- package/dist/Toasts.js +1 -1
- package/dist/ToastsPlugin.js +1 -1
- package/dist/components.css +2 -2
- package/dist/index-5e5945a9.js.map +1 -1
- package/dist/{index-79ce320f.js → index-9e1095ef.js} +6 -4
- package/dist/index-9e1095ef.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/isDefined-2ce6cde4.js.map +1 -1
- package/dist/observe.js.map +1 -1
- package/dist/searchFuzzy-74a7de1c.js.map +1 -1
- package/dist/sticky.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/toTimeZone-e6e9ab75.js.map +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/useGoogleMaps.js +109 -119
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useModals.d.ts +6 -363
- package/dist/useModals.js.map +1 -1
- package/dist/useScriptTag.js.map +1 -1
- package/dist/useStepper.js.map +1 -1
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/colorScheme.js.map +1 -1
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/formatDateTime.js.map +1 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/storage.js.map +1 -1
- package/dist/viewable.js.map +1 -1
- package/package.json +30 -46
- package/dist/index-79ce320f.js.map +0 -1
package/dist/Select.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { DEBOUNCE as
|
|
10
|
-
import
|
|
11
|
-
import { D as
|
|
12
|
-
import
|
|
13
|
-
import { _ as
|
|
14
|
-
import
|
|
15
|
-
import { _ as
|
|
1
|
+
import { computed as k, ref as O, shallowRef as St, watch as te, getCurrentScope as Ct, onScopeDispose as Rt, shallowReadonly as re, unref as q, defineComponent as Ot, useAttrs as kt, useSlots as Tt, nextTick as ze, onMounted as Bt, onUnmounted as At, openBlock as A, createBlock as Te, normalizeClass as me, createSlots as Lt, withCtx as ve, createElementVNode as j, createElementBlock as V, Fragment as Be, renderList as Ae, toDisplayString as ae, withDirectives as ge, withKeys as Qe, createCommentVNode as ye, renderSlot as Le, createTextVNode as we, withModifiers as be, createVNode as ce, Teleport as Dt, Transition as Ft, normalizeStyle as Mt, vModelText as Pt, vShow as He, pushScopeId as It, popScopeId as Vt } from "vue";
|
|
2
|
+
import Nt from "@leaflink/snitch";
|
|
3
|
+
import $t from "lodash-es/debounce";
|
|
4
|
+
import zt from "lodash-es/isEmpty";
|
|
5
|
+
import Ze from "lodash-es/isEqual";
|
|
6
|
+
import Ht from "lodash-es/isPlainObject";
|
|
7
|
+
import Wt from "lodash-es/uniqueId";
|
|
8
|
+
import jt from "./useSearch.js";
|
|
9
|
+
import { DEBOUNCE as Kt, KEY_CODES as ue } from "./constants.js";
|
|
10
|
+
import Ut from "./clickoutside.js";
|
|
11
|
+
import { D as qt } from "./MenusPlugin-9288029a.js";
|
|
12
|
+
import et from "./Chip.js";
|
|
13
|
+
import { _ as Xt } from "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
|
|
14
|
+
import xe from "./Icon.js";
|
|
15
|
+
import { _ as Yt } from "./_plugin-vue_export-helper-dad06003.js";
|
|
16
16
|
import "lodash-es/get";
|
|
17
17
|
import "./searchFuzzy-74a7de1c.js";
|
|
18
18
|
import "./_commonjsHelpers-10dfc225.js";
|
|
@@ -20,57 +20,57 @@ import "./utils/helpers.js";
|
|
|
20
20
|
import "lodash-es/camelCase";
|
|
21
21
|
import "lodash-es/isFinite";
|
|
22
22
|
import "./utils/colorScheme.js";
|
|
23
|
-
import "./index-
|
|
23
|
+
import "./index-9e1095ef.js";
|
|
24
24
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
25
25
|
import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
|
|
26
26
|
import "./locale.js";
|
|
27
|
-
const
|
|
27
|
+
const ne = Math.min, N = Math.max, Fe = Math.round, De = Math.floor, Y = (e) => ({
|
|
28
28
|
x: e,
|
|
29
29
|
y: e
|
|
30
|
-
}),
|
|
30
|
+
}), Gt = {
|
|
31
31
|
left: "right",
|
|
32
32
|
right: "left",
|
|
33
33
|
bottom: "top",
|
|
34
34
|
top: "bottom"
|
|
35
|
-
},
|
|
35
|
+
}, Jt = {
|
|
36
36
|
start: "end",
|
|
37
37
|
end: "start"
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Ie(e, n) {
|
|
40
40
|
return typeof e == "function" ? e(n) : e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function oe(e) {
|
|
43
43
|
return e.split("-")[0];
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Se(e) {
|
|
46
46
|
return e.split("-")[1];
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Qt(e) {
|
|
49
49
|
return e === "x" ? "y" : "x";
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function rt(e) {
|
|
52
52
|
return e === "y" ? "height" : "width";
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return ["top", "bottom"].includes(
|
|
54
|
+
function de(e) {
|
|
55
|
+
return ["top", "bottom"].includes(oe(e)) ? "y" : "x";
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function at(e) {
|
|
58
|
+
return Qt(de(e));
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Zt(e, n, t) {
|
|
61
61
|
t === void 0 && (t = !1);
|
|
62
|
-
const o =
|
|
62
|
+
const o = Se(e), l = at(e), s = rt(l);
|
|
63
63
|
let i = l === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
64
|
-
return n.reference[s] > n.floating[s] && (i =
|
|
64
|
+
return n.reference[s] > n.floating[s] && (i = Me(i)), [i, Me(i)];
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
const n =
|
|
68
|
-
return [
|
|
66
|
+
function en(e) {
|
|
67
|
+
const n = Me(e);
|
|
68
|
+
return [je(e), n, je(n)];
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return e.replace(/start|end/g, (n) =>
|
|
70
|
+
function je(e) {
|
|
71
|
+
return e.replace(/start|end/g, (n) => Jt[n]);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function tn(e, n, t) {
|
|
74
74
|
const o = ["left", "right"], l = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
|
|
75
75
|
switch (e) {
|
|
76
76
|
case "top":
|
|
@@ -83,15 +83,15 @@ function Jt(e, n, t) {
|
|
|
83
83
|
return [];
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
const l =
|
|
88
|
-
let s =
|
|
89
|
-
return l && (s = s.map((i) => i + "-" + l), n && (s = s.concat(s.map(
|
|
86
|
+
function nn(e, n, t, o) {
|
|
87
|
+
const l = Se(e);
|
|
88
|
+
let s = tn(oe(e), t === "start", o);
|
|
89
|
+
return l && (s = s.map((i) => i + "-" + l), n && (s = s.concat(s.map(je)))), s;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return e.replace(/left|right|bottom|top/g, (n) =>
|
|
91
|
+
function Me(e) {
|
|
92
|
+
return e.replace(/left|right|bottom|top/g, (n) => Gt[n]);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function on(e) {
|
|
95
95
|
return {
|
|
96
96
|
top: 0,
|
|
97
97
|
right: 0,
|
|
@@ -100,72 +100,81 @@ function Zt(e) {
|
|
|
100
100
|
...e
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return typeof e != "number" ?
|
|
103
|
+
function ln(e) {
|
|
104
|
+
return typeof e != "number" ? on(e) : {
|
|
105
105
|
top: e,
|
|
106
106
|
right: e,
|
|
107
107
|
bottom: e,
|
|
108
108
|
left: e
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Pe(e) {
|
|
112
|
+
const {
|
|
113
|
+
x: n,
|
|
114
|
+
y: t,
|
|
115
|
+
width: o,
|
|
116
|
+
height: l
|
|
117
|
+
} = e;
|
|
112
118
|
return {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
width: o,
|
|
120
|
+
height: l,
|
|
121
|
+
top: t,
|
|
122
|
+
left: n,
|
|
123
|
+
right: n + o,
|
|
124
|
+
bottom: t + l,
|
|
125
|
+
x: n,
|
|
126
|
+
y: t
|
|
118
127
|
};
|
|
119
128
|
}
|
|
120
|
-
function
|
|
129
|
+
function tt(e, n, t) {
|
|
121
130
|
let {
|
|
122
131
|
reference: o,
|
|
123
132
|
floating: l
|
|
124
133
|
} = e;
|
|
125
|
-
const s =
|
|
126
|
-
let
|
|
134
|
+
const s = de(n), i = at(n), c = rt(i), r = oe(n), u = s === "y", d = o.x + o.width / 2 - l.width / 2, p = o.y + o.height / 2 - l.height / 2, y = o[c] / 2 - l[c] / 2;
|
|
135
|
+
let h;
|
|
127
136
|
switch (r) {
|
|
128
137
|
case "top":
|
|
129
|
-
|
|
130
|
-
x:
|
|
138
|
+
h = {
|
|
139
|
+
x: d,
|
|
131
140
|
y: o.y - l.height
|
|
132
141
|
};
|
|
133
142
|
break;
|
|
134
143
|
case "bottom":
|
|
135
|
-
|
|
136
|
-
x:
|
|
144
|
+
h = {
|
|
145
|
+
x: d,
|
|
137
146
|
y: o.y + o.height
|
|
138
147
|
};
|
|
139
148
|
break;
|
|
140
149
|
case "right":
|
|
141
|
-
|
|
150
|
+
h = {
|
|
142
151
|
x: o.x + o.width,
|
|
143
|
-
y:
|
|
152
|
+
y: p
|
|
144
153
|
};
|
|
145
154
|
break;
|
|
146
155
|
case "left":
|
|
147
|
-
|
|
156
|
+
h = {
|
|
148
157
|
x: o.x - l.width,
|
|
149
|
-
y:
|
|
158
|
+
y: p
|
|
150
159
|
};
|
|
151
160
|
break;
|
|
152
161
|
default:
|
|
153
|
-
|
|
162
|
+
h = {
|
|
154
163
|
x: o.x,
|
|
155
164
|
y: o.y
|
|
156
165
|
};
|
|
157
166
|
}
|
|
158
|
-
switch (
|
|
167
|
+
switch (Se(n)) {
|
|
159
168
|
case "start":
|
|
160
|
-
|
|
169
|
+
h[i] -= y * (t && u ? -1 : 1);
|
|
161
170
|
break;
|
|
162
171
|
case "end":
|
|
163
|
-
|
|
172
|
+
h[i] += y * (t && u ? -1 : 1);
|
|
164
173
|
break;
|
|
165
174
|
}
|
|
166
|
-
return
|
|
175
|
+
return h;
|
|
167
176
|
}
|
|
168
|
-
const
|
|
177
|
+
const sn = async (e, n, t) => {
|
|
169
178
|
const {
|
|
170
179
|
placement: o = "bottom",
|
|
171
180
|
strategy: l = "absolute",
|
|
@@ -177,25 +186,25 @@ const tn = async (e, n, t) => {
|
|
|
177
186
|
floating: n,
|
|
178
187
|
strategy: l
|
|
179
188
|
}), {
|
|
180
|
-
x:
|
|
181
|
-
y:
|
|
182
|
-
} =
|
|
183
|
-
for (let
|
|
189
|
+
x: d,
|
|
190
|
+
y: p
|
|
191
|
+
} = tt(u, o, r), y = o, h = {}, f = 0;
|
|
192
|
+
for (let w = 0; w < c.length; w++) {
|
|
184
193
|
const {
|
|
185
|
-
name:
|
|
186
|
-
fn:
|
|
187
|
-
} = c[
|
|
188
|
-
x:
|
|
194
|
+
name: b,
|
|
195
|
+
fn: m
|
|
196
|
+
} = c[w], {
|
|
197
|
+
x: g,
|
|
189
198
|
y: E,
|
|
190
199
|
data: R,
|
|
191
200
|
reset: C
|
|
192
|
-
} = await
|
|
193
|
-
x:
|
|
194
|
-
y:
|
|
201
|
+
} = await m({
|
|
202
|
+
x: d,
|
|
203
|
+
y: p,
|
|
195
204
|
initialPlacement: o,
|
|
196
|
-
placement:
|
|
205
|
+
placement: y,
|
|
197
206
|
strategy: l,
|
|
198
|
-
middlewareData:
|
|
207
|
+
middlewareData: h,
|
|
199
208
|
rects: u,
|
|
200
209
|
platform: i,
|
|
201
210
|
elements: {
|
|
@@ -203,33 +212,30 @@ const tn = async (e, n, t) => {
|
|
|
203
212
|
floating: n
|
|
204
213
|
}
|
|
205
214
|
});
|
|
206
|
-
|
|
207
|
-
...
|
|
208
|
-
[
|
|
209
|
-
...
|
|
215
|
+
d = g ?? d, p = E ?? p, h = {
|
|
216
|
+
...h,
|
|
217
|
+
[b]: {
|
|
218
|
+
...h[b],
|
|
210
219
|
...R
|
|
211
220
|
}
|
|
212
|
-
}, C && f <= 50) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
} = Ye(u, g, r)), b = -1;
|
|
221
|
-
continue;
|
|
222
|
-
}
|
|
221
|
+
}, C && f <= 50 && (f++, typeof C == "object" && (C.placement && (y = C.placement), C.rects && (u = C.rects === !0 ? await i.getElementRects({
|
|
222
|
+
reference: e,
|
|
223
|
+
floating: n,
|
|
224
|
+
strategy: l
|
|
225
|
+
}) : C.rects), {
|
|
226
|
+
x: d,
|
|
227
|
+
y: p
|
|
228
|
+
} = tt(u, y, r)), w = -1);
|
|
223
229
|
}
|
|
224
230
|
return {
|
|
225
|
-
x:
|
|
226
|
-
y:
|
|
227
|
-
placement:
|
|
231
|
+
x: d,
|
|
232
|
+
y: p,
|
|
233
|
+
placement: y,
|
|
228
234
|
strategy: l,
|
|
229
|
-
middlewareData:
|
|
235
|
+
middlewareData: h
|
|
230
236
|
};
|
|
231
237
|
};
|
|
232
|
-
async function
|
|
238
|
+
async function ct(e, n) {
|
|
233
239
|
var t;
|
|
234
240
|
n === void 0 && (n = {});
|
|
235
241
|
const {
|
|
@@ -241,38 +247,40 @@ async function ot(e, n) {
|
|
|
241
247
|
strategy: r
|
|
242
248
|
} = e, {
|
|
243
249
|
boundary: u = "clippingAncestors",
|
|
244
|
-
rootBoundary:
|
|
245
|
-
elementContext:
|
|
246
|
-
altBoundary:
|
|
247
|
-
padding:
|
|
248
|
-
} =
|
|
249
|
-
element: (t = await (s.isElement == null ? void 0 : s.isElement(
|
|
250
|
+
rootBoundary: d = "viewport",
|
|
251
|
+
elementContext: p = "floating",
|
|
252
|
+
altBoundary: y = !1,
|
|
253
|
+
padding: h = 0
|
|
254
|
+
} = Ie(n, e), f = ln(h), b = c[y ? p === "floating" ? "reference" : "floating" : p], m = Pe(await s.getClippingRect({
|
|
255
|
+
element: (t = await (s.isElement == null ? void 0 : s.isElement(b))) == null || t ? b : b.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
250
256
|
boundary: u,
|
|
251
|
-
rootBoundary:
|
|
257
|
+
rootBoundary: d,
|
|
252
258
|
strategy: r
|
|
253
|
-
})),
|
|
254
|
-
...i.floating,
|
|
259
|
+
})), g = p === "floating" ? {
|
|
255
260
|
x: o,
|
|
256
|
-
y: l
|
|
261
|
+
y: l,
|
|
262
|
+
width: i.floating.width,
|
|
263
|
+
height: i.floating.height
|
|
257
264
|
} : i.reference, E = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), R = await (s.isElement == null ? void 0 : s.isElement(E)) ? await (s.getScale == null ? void 0 : s.getScale(E)) || {
|
|
258
265
|
x: 1,
|
|
259
266
|
y: 1
|
|
260
267
|
} : {
|
|
261
268
|
x: 1,
|
|
262
269
|
y: 1
|
|
263
|
-
}, C =
|
|
264
|
-
|
|
270
|
+
}, C = Pe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
271
|
+
elements: c,
|
|
272
|
+
rect: g,
|
|
265
273
|
offsetParent: E,
|
|
266
274
|
strategy: r
|
|
267
|
-
}) :
|
|
275
|
+
}) : g);
|
|
268
276
|
return {
|
|
269
|
-
top: (
|
|
270
|
-
bottom: (C.bottom -
|
|
271
|
-
left: (
|
|
272
|
-
right: (C.right -
|
|
277
|
+
top: (m.top - C.top + f.top) / R.y,
|
|
278
|
+
bottom: (C.bottom - m.bottom + f.bottom) / R.y,
|
|
279
|
+
left: (m.left - C.left + f.left) / R.x,
|
|
280
|
+
right: (C.right - m.right + f.right) / R.x
|
|
273
281
|
};
|
|
274
282
|
}
|
|
275
|
-
const
|
|
283
|
+
const rn = function(e) {
|
|
276
284
|
return e === void 0 && (e = {}), {
|
|
277
285
|
name: "flip",
|
|
278
286
|
options: e,
|
|
@@ -286,57 +294,65 @@ const nn = function(e) {
|
|
|
286
294
|
platform: r,
|
|
287
295
|
elements: u
|
|
288
296
|
} = n, {
|
|
289
|
-
mainAxis:
|
|
290
|
-
crossAxis:
|
|
291
|
-
fallbackPlacements:
|
|
292
|
-
fallbackStrategy:
|
|
297
|
+
mainAxis: d = !0,
|
|
298
|
+
crossAxis: p = !0,
|
|
299
|
+
fallbackPlacements: y,
|
|
300
|
+
fallbackStrategy: h = "bestFit",
|
|
293
301
|
fallbackAxisSideDirection: f = "none",
|
|
294
|
-
flipAlignment:
|
|
295
|
-
...
|
|
296
|
-
} =
|
|
302
|
+
flipAlignment: w = !0,
|
|
303
|
+
...b
|
|
304
|
+
} = Ie(e, n);
|
|
297
305
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
298
306
|
return {};
|
|
299
|
-
const
|
|
300
|
-
!
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
|
|
307
|
+
const m = oe(l), g = de(c), E = oe(c) === c, R = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), C = y || (E || !w ? [Me(c)] : en(c)), T = f !== "none";
|
|
308
|
+
!y && T && C.push(...nn(c, w, f, R));
|
|
309
|
+
const _ = [c, ...C], P = await ct(n, b), B = [];
|
|
310
|
+
let W = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
311
|
+
if (d && B.push(P[m]), p) {
|
|
312
|
+
const U = Zt(l, i, R);
|
|
313
|
+
B.push(P[U[0]], P[U[1]]);
|
|
306
314
|
}
|
|
307
|
-
if (
|
|
315
|
+
if (W = [...W, {
|
|
308
316
|
placement: l,
|
|
309
|
-
overflows:
|
|
310
|
-
}], !
|
|
311
|
-
var
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
317
|
+
overflows: B
|
|
318
|
+
}], !B.every((U) => U <= 0)) {
|
|
319
|
+
var J, Re;
|
|
320
|
+
const U = (((J = s.flip) == null ? void 0 : J.index) || 0) + 1, Q = _[U];
|
|
321
|
+
if (Q)
|
|
314
322
|
return {
|
|
315
323
|
data: {
|
|
316
|
-
index:
|
|
317
|
-
overflows:
|
|
324
|
+
index: U,
|
|
325
|
+
overflows: W
|
|
318
326
|
},
|
|
319
327
|
reset: {
|
|
320
|
-
placement:
|
|
328
|
+
placement: Q
|
|
321
329
|
}
|
|
322
330
|
};
|
|
323
|
-
let
|
|
324
|
-
if (!
|
|
325
|
-
switch (
|
|
331
|
+
let Z = (Re = W.filter((I) => I.overflows[0] <= 0).sort((I, $) => I.overflows[1] - $.overflows[1])[0]) == null ? void 0 : Re.placement;
|
|
332
|
+
if (!Z)
|
|
333
|
+
switch (h) {
|
|
326
334
|
case "bestFit": {
|
|
327
|
-
var
|
|
328
|
-
const
|
|
329
|
-
|
|
335
|
+
var Oe;
|
|
336
|
+
const I = (Oe = W.filter(($) => {
|
|
337
|
+
if (T) {
|
|
338
|
+
const L = de($.placement);
|
|
339
|
+
return L === g || // Create a bias to the `y` side axis due to horizontal
|
|
340
|
+
// reading directions favoring greater width.
|
|
341
|
+
L === "y";
|
|
342
|
+
}
|
|
343
|
+
return !0;
|
|
344
|
+
}).map(($) => [$.placement, $.overflows.filter((L) => L > 0).reduce((L, $e) => L + $e, 0)]).sort(($, L) => $[1] - L[1])[0]) == null ? void 0 : Oe[0];
|
|
345
|
+
I && (Z = I);
|
|
330
346
|
break;
|
|
331
347
|
}
|
|
332
348
|
case "initialPlacement":
|
|
333
|
-
|
|
349
|
+
Z = c;
|
|
334
350
|
break;
|
|
335
351
|
}
|
|
336
|
-
if (l !==
|
|
352
|
+
if (l !== Z)
|
|
337
353
|
return {
|
|
338
354
|
reset: {
|
|
339
|
-
placement:
|
|
355
|
+
placement: Z
|
|
340
356
|
}
|
|
341
357
|
};
|
|
342
358
|
}
|
|
@@ -344,35 +360,35 @@ const nn = function(e) {
|
|
|
344
360
|
}
|
|
345
361
|
};
|
|
346
362
|
};
|
|
347
|
-
async function
|
|
363
|
+
async function an(e, n) {
|
|
348
364
|
const {
|
|
349
365
|
placement: t,
|
|
350
366
|
platform: o,
|
|
351
367
|
elements: l
|
|
352
|
-
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), i =
|
|
368
|
+
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), i = oe(t), c = Se(t), r = de(t) === "y", u = ["left", "top"].includes(i) ? -1 : 1, d = s && r ? -1 : 1, p = Ie(n, e);
|
|
353
369
|
let {
|
|
354
|
-
mainAxis:
|
|
355
|
-
crossAxis:
|
|
370
|
+
mainAxis: y,
|
|
371
|
+
crossAxis: h,
|
|
356
372
|
alignmentAxis: f
|
|
357
|
-
} = typeof
|
|
358
|
-
mainAxis:
|
|
373
|
+
} = typeof p == "number" ? {
|
|
374
|
+
mainAxis: p,
|
|
359
375
|
crossAxis: 0,
|
|
360
376
|
alignmentAxis: null
|
|
361
377
|
} : {
|
|
362
378
|
mainAxis: 0,
|
|
363
379
|
crossAxis: 0,
|
|
364
380
|
alignmentAxis: null,
|
|
365
|
-
...
|
|
381
|
+
...p
|
|
366
382
|
};
|
|
367
|
-
return c && typeof f == "number" && (
|
|
368
|
-
x:
|
|
369
|
-
y:
|
|
383
|
+
return c && typeof f == "number" && (h = c === "end" ? f * -1 : f), r ? {
|
|
384
|
+
x: h * d,
|
|
385
|
+
y: y * u
|
|
370
386
|
} : {
|
|
371
|
-
x:
|
|
372
|
-
y:
|
|
387
|
+
x: y * u,
|
|
388
|
+
y: h * d
|
|
373
389
|
};
|
|
374
390
|
}
|
|
375
|
-
const
|
|
391
|
+
const cn = function(e) {
|
|
376
392
|
return e === void 0 && (e = 0), {
|
|
377
393
|
name: "offset",
|
|
378
394
|
options: e,
|
|
@@ -383,7 +399,7 @@ const ln = function(e) {
|
|
|
383
399
|
y: s,
|
|
384
400
|
placement: i,
|
|
385
401
|
middlewareData: c
|
|
386
|
-
} = n, r = await
|
|
402
|
+
} = n, r = await an(n, e);
|
|
387
403
|
return i === ((t = c.offset) == null ? void 0 : t.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
388
404
|
x: l + r.x,
|
|
389
405
|
y: s + r.y,
|
|
@@ -394,7 +410,7 @@ const ln = function(e) {
|
|
|
394
410
|
};
|
|
395
411
|
}
|
|
396
412
|
};
|
|
397
|
-
},
|
|
413
|
+
}, un = function(e) {
|
|
398
414
|
return e === void 0 && (e = {}), {
|
|
399
415
|
name: "size",
|
|
400
416
|
options: e,
|
|
@@ -408,32 +424,25 @@ const ln = function(e) {
|
|
|
408
424
|
apply: i = () => {
|
|
409
425
|
},
|
|
410
426
|
...c
|
|
411
|
-
} =
|
|
412
|
-
width:
|
|
413
|
-
height:
|
|
427
|
+
} = Ie(e, n), r = await ct(n, c), u = oe(t), d = Se(t), p = de(t) === "y", {
|
|
428
|
+
width: y,
|
|
429
|
+
height: h
|
|
414
430
|
} = o.floating;
|
|
415
|
-
let f,
|
|
416
|
-
u === "top" || u === "bottom" ? (f = u,
|
|
417
|
-
const
|
|
418
|
-
let
|
|
419
|
-
if (
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
} else {
|
|
423
|
-
const O = d - r.top - r.bottom;
|
|
424
|
-
E = m || y ? ge(_, O) : O;
|
|
425
|
-
}
|
|
426
|
-
if (y && !m) {
|
|
427
|
-
const O = N(r.left, 0), x = N(r.right, 0), M = N(r.top, 0), D = N(r.bottom, 0);
|
|
428
|
-
h ? R = g - 2 * (O !== 0 || x !== 0 ? O + x : N(r.left, r.right)) : E = d - 2 * (M !== 0 || D !== 0 ? M + D : N(r.top, r.bottom));
|
|
431
|
+
let f, w;
|
|
432
|
+
u === "top" || u === "bottom" ? (f = u, w = d === (await (l.isRTL == null ? void 0 : l.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = u, f = d === "end" ? "top" : "bottom");
|
|
433
|
+
const b = h - r.top - r.bottom, m = y - r.left - r.right, g = ne(h - r[f], b), E = ne(y - r[w], m), R = !n.middlewareData.shift;
|
|
434
|
+
let C = g, T = E;
|
|
435
|
+
if (p ? T = d || R ? ne(E, m) : m : C = d || R ? ne(g, b) : b, R && !d) {
|
|
436
|
+
const P = N(r.left, 0), B = N(r.right, 0), W = N(r.top, 0), J = N(r.bottom, 0);
|
|
437
|
+
p ? T = y - 2 * (P !== 0 || B !== 0 ? P + B : N(r.left, r.right)) : C = h - 2 * (W !== 0 || J !== 0 ? W + J : N(r.top, r.bottom));
|
|
429
438
|
}
|
|
430
439
|
await i({
|
|
431
440
|
...n,
|
|
432
|
-
availableWidth:
|
|
433
|
-
availableHeight:
|
|
441
|
+
availableWidth: T,
|
|
442
|
+
availableHeight: C
|
|
434
443
|
});
|
|
435
|
-
const
|
|
436
|
-
return
|
|
444
|
+
const _ = await l.getDimensions(s.floating);
|
|
445
|
+
return y !== _.width || h !== _.height ? {
|
|
437
446
|
reset: {
|
|
438
447
|
rects: !0
|
|
439
448
|
}
|
|
@@ -441,203 +450,222 @@ const ln = function(e) {
|
|
|
441
450
|
}
|
|
442
451
|
};
|
|
443
452
|
};
|
|
444
|
-
function
|
|
445
|
-
return
|
|
453
|
+
function ie(e) {
|
|
454
|
+
return Ue(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
446
455
|
}
|
|
447
|
-
function
|
|
456
|
+
function M(e) {
|
|
448
457
|
var n;
|
|
449
458
|
return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
|
450
459
|
}
|
|
451
|
-
function
|
|
460
|
+
function X(e) {
|
|
452
461
|
var n;
|
|
453
|
-
return (n = (
|
|
462
|
+
return (n = (Ue(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
|
|
454
463
|
}
|
|
455
|
-
function
|
|
456
|
-
return e instanceof Node || e instanceof
|
|
464
|
+
function Ue(e) {
|
|
465
|
+
return e instanceof Node || e instanceof M(e).Node;
|
|
457
466
|
}
|
|
458
|
-
function
|
|
459
|
-
return e instanceof Element || e instanceof
|
|
467
|
+
function z(e) {
|
|
468
|
+
return e instanceof Element || e instanceof M(e).Element;
|
|
460
469
|
}
|
|
461
|
-
function
|
|
462
|
-
return e instanceof HTMLElement || e instanceof
|
|
470
|
+
function K(e) {
|
|
471
|
+
return e instanceof HTMLElement || e instanceof M(e).HTMLElement;
|
|
463
472
|
}
|
|
464
|
-
function
|
|
465
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
473
|
+
function nt(e) {
|
|
474
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof M(e).ShadowRoot;
|
|
466
475
|
}
|
|
467
|
-
function
|
|
476
|
+
function Ce(e) {
|
|
468
477
|
const {
|
|
469
478
|
overflow: n,
|
|
470
479
|
overflowX: t,
|
|
471
480
|
overflowY: o,
|
|
472
481
|
display: l
|
|
473
|
-
} =
|
|
482
|
+
} = H(e);
|
|
474
483
|
return /auto|scroll|overlay|hidden|clip/.test(n + o + t) && !["inline", "contents"].includes(l);
|
|
475
484
|
}
|
|
476
|
-
function
|
|
477
|
-
return ["table", "td", "th"].includes(
|
|
485
|
+
function fn(e) {
|
|
486
|
+
return ["table", "td", "th"].includes(ie(e));
|
|
478
487
|
}
|
|
479
|
-
function
|
|
480
|
-
|
|
488
|
+
function Ve(e) {
|
|
489
|
+
return [":popover-open", ":modal"].some((n) => {
|
|
490
|
+
try {
|
|
491
|
+
return e.matches(n);
|
|
492
|
+
} catch {
|
|
493
|
+
return !1;
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function qe(e) {
|
|
498
|
+
const n = Xe(), t = z(e) ? H(e) : e;
|
|
481
499
|
return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (t.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (t.contain || "").includes(o));
|
|
482
500
|
}
|
|
483
|
-
function
|
|
484
|
-
let n =
|
|
485
|
-
for (;
|
|
486
|
-
if (
|
|
501
|
+
function dn(e) {
|
|
502
|
+
let n = G(e);
|
|
503
|
+
for (; K(n) && !he(n); ) {
|
|
504
|
+
if (qe(n))
|
|
487
505
|
return n;
|
|
488
|
-
|
|
506
|
+
if (Ve(n))
|
|
507
|
+
return null;
|
|
508
|
+
n = G(n);
|
|
489
509
|
}
|
|
490
510
|
return null;
|
|
491
511
|
}
|
|
492
|
-
function
|
|
512
|
+
function Xe() {
|
|
493
513
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
494
514
|
}
|
|
495
|
-
function
|
|
496
|
-
return ["html", "body", "#document"].includes(
|
|
515
|
+
function he(e) {
|
|
516
|
+
return ["html", "body", "#document"].includes(ie(e));
|
|
497
517
|
}
|
|
498
|
-
function
|
|
499
|
-
return
|
|
518
|
+
function H(e) {
|
|
519
|
+
return M(e).getComputedStyle(e);
|
|
500
520
|
}
|
|
501
|
-
function
|
|
502
|
-
return
|
|
521
|
+
function Ne(e) {
|
|
522
|
+
return z(e) ? {
|
|
503
523
|
scrollLeft: e.scrollLeft,
|
|
504
524
|
scrollTop: e.scrollTop
|
|
505
525
|
} : {
|
|
506
|
-
scrollLeft: e.
|
|
507
|
-
scrollTop: e.
|
|
526
|
+
scrollLeft: e.scrollX,
|
|
527
|
+
scrollTop: e.scrollY
|
|
508
528
|
};
|
|
509
529
|
}
|
|
510
|
-
function
|
|
511
|
-
if (
|
|
530
|
+
function G(e) {
|
|
531
|
+
if (ie(e) === "html")
|
|
512
532
|
return e;
|
|
513
533
|
const n = (
|
|
514
534
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
515
535
|
e.assignedSlot || // DOM Element detected.
|
|
516
536
|
e.parentNode || // ShadowRoot detected.
|
|
517
|
-
|
|
518
|
-
|
|
537
|
+
nt(e) && e.host || // Fallback.
|
|
538
|
+
X(e)
|
|
519
539
|
);
|
|
520
|
-
return
|
|
540
|
+
return nt(n) ? n.host : n;
|
|
521
541
|
}
|
|
522
|
-
function
|
|
523
|
-
const n =
|
|
524
|
-
return
|
|
542
|
+
function ut(e) {
|
|
543
|
+
const n = G(e);
|
|
544
|
+
return he(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : K(n) && Ce(n) ? n : ut(n);
|
|
525
545
|
}
|
|
526
|
-
function
|
|
546
|
+
function Ee(e, n, t) {
|
|
527
547
|
var o;
|
|
528
548
|
n === void 0 && (n = []), t === void 0 && (t = !0);
|
|
529
|
-
const l =
|
|
530
|
-
|
|
549
|
+
const l = ut(e), s = l === ((o = e.ownerDocument) == null ? void 0 : o.body), i = M(l);
|
|
550
|
+
if (s) {
|
|
551
|
+
const c = Ke(i);
|
|
552
|
+
return n.concat(i, i.visualViewport || [], Ce(l) ? l : [], c && t ? Ee(c) : []);
|
|
553
|
+
}
|
|
554
|
+
return n.concat(l, Ee(l, [], t));
|
|
531
555
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
556
|
+
function Ke(e) {
|
|
557
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
558
|
+
}
|
|
559
|
+
function ft(e) {
|
|
560
|
+
const n = H(e);
|
|
534
561
|
let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
|
|
535
|
-
const l =
|
|
562
|
+
const l = K(e), s = l ? e.offsetWidth : t, i = l ? e.offsetHeight : o, c = Fe(t) !== s || Fe(o) !== i;
|
|
536
563
|
return c && (t = s, o = i), {
|
|
537
564
|
width: t,
|
|
538
565
|
height: o,
|
|
539
566
|
$: c
|
|
540
567
|
};
|
|
541
568
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
569
|
+
function Ye(e) {
|
|
570
|
+
return z(e) ? e : e.contextElement;
|
|
544
571
|
}
|
|
545
|
-
function
|
|
546
|
-
const n =
|
|
547
|
-
if (!
|
|
548
|
-
return
|
|
572
|
+
function fe(e) {
|
|
573
|
+
const n = Ye(e);
|
|
574
|
+
if (!K(n))
|
|
575
|
+
return Y(1);
|
|
549
576
|
const t = n.getBoundingClientRect(), {
|
|
550
577
|
width: o,
|
|
551
578
|
height: l,
|
|
552
579
|
$: s
|
|
553
|
-
} =
|
|
554
|
-
let i = (s ?
|
|
580
|
+
} = ft(n);
|
|
581
|
+
let i = (s ? Fe(t.width) : t.width) / o, c = (s ? Fe(t.height) : t.height) / l;
|
|
555
582
|
return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
556
583
|
x: i,
|
|
557
584
|
y: c
|
|
558
585
|
};
|
|
559
586
|
}
|
|
560
|
-
const
|
|
561
|
-
function
|
|
562
|
-
const n =
|
|
563
|
-
return !
|
|
587
|
+
const hn = /* @__PURE__ */ Y(0);
|
|
588
|
+
function dt(e) {
|
|
589
|
+
const n = M(e);
|
|
590
|
+
return !Xe() || !n.visualViewport ? hn : {
|
|
564
591
|
x: n.visualViewport.offsetLeft,
|
|
565
592
|
y: n.visualViewport.offsetTop
|
|
566
593
|
};
|
|
567
594
|
}
|
|
568
|
-
function
|
|
569
|
-
return n === void 0 && (n = !1), !t || n && t !==
|
|
595
|
+
function pn(e, n, t) {
|
|
596
|
+
return n === void 0 && (n = !1), !t || n && t !== M(e) ? !1 : n;
|
|
570
597
|
}
|
|
571
|
-
function
|
|
598
|
+
function le(e, n, t, o) {
|
|
572
599
|
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
573
|
-
const l = e.getBoundingClientRect(), s =
|
|
574
|
-
let i =
|
|
575
|
-
n && (o ?
|
|
576
|
-
const c =
|
|
577
|
-
let r = (l.left + c.x) / i.x, u = (l.top + c.y) / i.y,
|
|
600
|
+
const l = e.getBoundingClientRect(), s = Ye(e);
|
|
601
|
+
let i = Y(1);
|
|
602
|
+
n && (o ? z(o) && (i = fe(o)) : i = fe(e));
|
|
603
|
+
const c = pn(s, t, o) ? dt(s) : Y(0);
|
|
604
|
+
let r = (l.left + c.x) / i.x, u = (l.top + c.y) / i.y, d = l.width / i.x, p = l.height / i.y;
|
|
578
605
|
if (s) {
|
|
579
|
-
const
|
|
580
|
-
let f =
|
|
581
|
-
for (;
|
|
582
|
-
const b =
|
|
583
|
-
r *= b.x, u *= b.y,
|
|
606
|
+
const y = M(s), h = o && z(o) ? M(o) : o;
|
|
607
|
+
let f = y, w = Ke(f);
|
|
608
|
+
for (; w && o && h !== f; ) {
|
|
609
|
+
const b = fe(w), m = w.getBoundingClientRect(), g = H(w), E = m.left + (w.clientLeft + parseFloat(g.paddingLeft)) * b.x, R = m.top + (w.clientTop + parseFloat(g.paddingTop)) * b.y;
|
|
610
|
+
r *= b.x, u *= b.y, d *= b.x, p *= b.y, r += E, u += R, f = M(w), w = Ke(f);
|
|
584
611
|
}
|
|
585
612
|
}
|
|
586
|
-
return
|
|
587
|
-
width:
|
|
588
|
-
height:
|
|
613
|
+
return Pe({
|
|
614
|
+
width: d,
|
|
615
|
+
height: p,
|
|
589
616
|
x: r,
|
|
590
617
|
y: u
|
|
591
618
|
});
|
|
592
619
|
}
|
|
593
|
-
function
|
|
620
|
+
function mn(e) {
|
|
594
621
|
let {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
622
|
+
elements: n,
|
|
623
|
+
rect: t,
|
|
624
|
+
offsetParent: o,
|
|
625
|
+
strategy: l
|
|
598
626
|
} = e;
|
|
599
|
-
const l =
|
|
600
|
-
if (
|
|
601
|
-
return
|
|
602
|
-
let
|
|
627
|
+
const s = l === "fixed", i = X(o), c = n ? Ve(n.floating) : !1;
|
|
628
|
+
if (o === i || c && s)
|
|
629
|
+
return t;
|
|
630
|
+
let r = {
|
|
603
631
|
scrollLeft: 0,
|
|
604
632
|
scrollTop: 0
|
|
605
|
-
},
|
|
606
|
-
const
|
|
607
|
-
if ((
|
|
608
|
-
const
|
|
609
|
-
|
|
633
|
+
}, u = Y(1);
|
|
634
|
+
const d = Y(0), p = K(o);
|
|
635
|
+
if ((p || !p && !s) && ((ie(o) !== "body" || Ce(i)) && (r = Ne(o)), K(o))) {
|
|
636
|
+
const y = le(o);
|
|
637
|
+
u = fe(o), d.x = y.x + o.clientLeft, d.y = y.y + o.clientTop;
|
|
610
638
|
}
|
|
611
639
|
return {
|
|
612
|
-
width:
|
|
613
|
-
height:
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
640
|
+
width: t.width * u.x,
|
|
641
|
+
height: t.height * u.y,
|
|
642
|
+
x: t.x * u.x - r.scrollLeft * u.x + d.x,
|
|
643
|
+
y: t.y * u.y - r.scrollTop * u.y + d.y
|
|
616
644
|
};
|
|
617
645
|
}
|
|
618
|
-
function
|
|
646
|
+
function vn(e) {
|
|
619
647
|
return Array.from(e.getClientRects());
|
|
620
648
|
}
|
|
621
|
-
function
|
|
622
|
-
return
|
|
649
|
+
function ht(e) {
|
|
650
|
+
return le(X(e)).left + Ne(e).scrollLeft;
|
|
623
651
|
}
|
|
624
|
-
function
|
|
625
|
-
const n =
|
|
626
|
-
let i = -t.scrollLeft +
|
|
652
|
+
function gn(e) {
|
|
653
|
+
const n = X(e), t = Ne(e), o = e.ownerDocument.body, l = N(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), s = N(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
|
|
654
|
+
let i = -t.scrollLeft + ht(e);
|
|
627
655
|
const c = -t.scrollTop;
|
|
628
|
-
return
|
|
656
|
+
return H(o).direction === "rtl" && (i += N(n.clientWidth, o.clientWidth) - l), {
|
|
629
657
|
width: l,
|
|
630
658
|
height: s,
|
|
631
659
|
x: i,
|
|
632
660
|
y: c
|
|
633
661
|
};
|
|
634
662
|
}
|
|
635
|
-
function
|
|
636
|
-
const t =
|
|
663
|
+
function yn(e, n) {
|
|
664
|
+
const t = M(e), o = X(e), l = t.visualViewport;
|
|
637
665
|
let s = o.clientWidth, i = o.clientHeight, c = 0, r = 0;
|
|
638
666
|
if (l) {
|
|
639
667
|
s = l.width, i = l.height;
|
|
640
|
-
const u =
|
|
668
|
+
const u = Xe();
|
|
641
669
|
(!u || u && n === "fixed") && (c = l.offsetLeft, r = l.offsetTop);
|
|
642
670
|
}
|
|
643
671
|
return {
|
|
@@ -647,8 +675,8 @@ function pn(e, n) {
|
|
|
647
675
|
y: r
|
|
648
676
|
};
|
|
649
677
|
}
|
|
650
|
-
function
|
|
651
|
-
const t =
|
|
678
|
+
function wn(e, n) {
|
|
679
|
+
const t = le(e, !0, n === "fixed"), o = t.top + e.clientTop, l = t.left + e.clientLeft, s = K(e) ? fe(e) : Y(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, r = l * s.x, u = o * s.y;
|
|
652
680
|
return {
|
|
653
681
|
width: i,
|
|
654
682
|
height: c,
|
|
@@ -656,52 +684,52 @@ function hn(e, n) {
|
|
|
656
684
|
y: u
|
|
657
685
|
};
|
|
658
686
|
}
|
|
659
|
-
function
|
|
687
|
+
function ot(e, n, t) {
|
|
660
688
|
let o;
|
|
661
689
|
if (n === "viewport")
|
|
662
|
-
o =
|
|
690
|
+
o = yn(e, t);
|
|
663
691
|
else if (n === "document")
|
|
664
|
-
o =
|
|
665
|
-
else if (
|
|
666
|
-
o =
|
|
692
|
+
o = gn(X(e));
|
|
693
|
+
else if (z(n))
|
|
694
|
+
o = wn(n, t);
|
|
667
695
|
else {
|
|
668
|
-
const l =
|
|
696
|
+
const l = dt(e);
|
|
669
697
|
o = {
|
|
670
698
|
...n,
|
|
671
699
|
x: n.x - l.x,
|
|
672
700
|
y: n.y - l.y
|
|
673
701
|
};
|
|
674
702
|
}
|
|
675
|
-
return
|
|
703
|
+
return Pe(o);
|
|
676
704
|
}
|
|
677
|
-
function
|
|
678
|
-
const t =
|
|
679
|
-
return t === n || !
|
|
705
|
+
function pt(e, n) {
|
|
706
|
+
const t = G(e);
|
|
707
|
+
return t === n || !z(t) || he(t) ? !1 : H(t).position === "fixed" || pt(t, n);
|
|
680
708
|
}
|
|
681
|
-
function
|
|
709
|
+
function bn(e, n) {
|
|
682
710
|
const t = n.get(e);
|
|
683
711
|
if (t)
|
|
684
712
|
return t;
|
|
685
|
-
let o =
|
|
686
|
-
const s =
|
|
687
|
-
let i = s ?
|
|
688
|
-
for (;
|
|
689
|
-
const c =
|
|
690
|
-
!r && c.position === "fixed" && (l = null), (s ? !r && !l : !r && c.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) ||
|
|
713
|
+
let o = Ee(e, [], !1).filter((c) => z(c) && ie(c) !== "body"), l = null;
|
|
714
|
+
const s = H(e).position === "fixed";
|
|
715
|
+
let i = s ? G(e) : e;
|
|
716
|
+
for (; z(i) && !he(i); ) {
|
|
717
|
+
const c = H(i), r = qe(i);
|
|
718
|
+
!r && c.position === "fixed" && (l = null), (s ? !r && !l : !r && c.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || Ce(i) && !r && pt(e, i)) ? o = o.filter((d) => d !== i) : l = c, i = G(i);
|
|
691
719
|
}
|
|
692
720
|
return n.set(e, o), o;
|
|
693
721
|
}
|
|
694
|
-
function
|
|
722
|
+
function xn(e) {
|
|
695
723
|
let {
|
|
696
724
|
element: n,
|
|
697
725
|
boundary: t,
|
|
698
726
|
rootBoundary: o,
|
|
699
727
|
strategy: l
|
|
700
728
|
} = e;
|
|
701
|
-
const i = [...t === "clippingAncestors" ?
|
|
702
|
-
const
|
|
703
|
-
return u.top = N(
|
|
704
|
-
},
|
|
729
|
+
const i = [...t === "clippingAncestors" ? Ve(n) ? [] : bn(n, this._c) : [].concat(t), o], c = i[0], r = i.reduce((u, d) => {
|
|
730
|
+
const p = ot(n, d, l);
|
|
731
|
+
return u.top = N(p.top, u.top), u.right = ne(p.right, u.right), u.bottom = ne(p.bottom, u.bottom), u.left = N(p.left, u.left), u;
|
|
732
|
+
}, ot(n, c, l));
|
|
705
733
|
return {
|
|
706
734
|
width: r.right - r.left,
|
|
707
735
|
height: r.bottom - r.top,
|
|
@@ -709,118 +737,135 @@ function gn(e) {
|
|
|
709
737
|
y: r.top
|
|
710
738
|
};
|
|
711
739
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
740
|
+
function _n(e) {
|
|
741
|
+
const {
|
|
742
|
+
width: n,
|
|
743
|
+
height: t
|
|
744
|
+
} = ft(e);
|
|
745
|
+
return {
|
|
746
|
+
width: n,
|
|
747
|
+
height: t
|
|
748
|
+
};
|
|
714
749
|
}
|
|
715
|
-
function
|
|
716
|
-
const o =
|
|
750
|
+
function En(e, n, t) {
|
|
751
|
+
const o = K(n), l = X(n), s = t === "fixed", i = le(e, !0, s, n);
|
|
717
752
|
let c = {
|
|
718
753
|
scrollLeft: 0,
|
|
719
754
|
scrollTop: 0
|
|
720
755
|
};
|
|
721
|
-
const r =
|
|
756
|
+
const r = Y(0);
|
|
722
757
|
if (o || !o && !s)
|
|
723
|
-
if ((
|
|
724
|
-
const
|
|
725
|
-
r.x =
|
|
758
|
+
if ((ie(n) !== "body" || Ce(l)) && (c = Ne(n)), o) {
|
|
759
|
+
const p = le(n, !0, s, n);
|
|
760
|
+
r.x = p.x + n.clientLeft, r.y = p.y + n.clientTop;
|
|
726
761
|
} else
|
|
727
|
-
l && (r.x =
|
|
762
|
+
l && (r.x = ht(l));
|
|
763
|
+
const u = i.left + c.scrollLeft - r.x, d = i.top + c.scrollTop - r.y;
|
|
728
764
|
return {
|
|
729
|
-
x:
|
|
730
|
-
y:
|
|
765
|
+
x: u,
|
|
766
|
+
y: d,
|
|
731
767
|
width: i.width,
|
|
732
768
|
height: i.height
|
|
733
769
|
};
|
|
734
770
|
}
|
|
735
|
-
function
|
|
736
|
-
return
|
|
771
|
+
function We(e) {
|
|
772
|
+
return H(e).position === "static";
|
|
773
|
+
}
|
|
774
|
+
function lt(e, n) {
|
|
775
|
+
return !K(e) || H(e).position === "fixed" ? null : n ? n(e) : e.offsetParent;
|
|
737
776
|
}
|
|
738
|
-
function
|
|
739
|
-
const t =
|
|
740
|
-
if (
|
|
777
|
+
function mt(e, n) {
|
|
778
|
+
const t = M(e);
|
|
779
|
+
if (Ve(e))
|
|
780
|
+
return t;
|
|
781
|
+
if (!K(e)) {
|
|
782
|
+
let l = G(e);
|
|
783
|
+
for (; l && !he(l); ) {
|
|
784
|
+
if (z(l) && !We(l))
|
|
785
|
+
return l;
|
|
786
|
+
l = G(l);
|
|
787
|
+
}
|
|
741
788
|
return t;
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
789
|
+
}
|
|
790
|
+
let o = lt(e, n);
|
|
791
|
+
for (; o && fn(o) && We(o); )
|
|
792
|
+
o = lt(o, n);
|
|
793
|
+
return o && he(o) && We(o) && !qe(o) ? t : o || dn(e) || t;
|
|
746
794
|
}
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
reference: n,
|
|
750
|
-
floating: t,
|
|
751
|
-
strategy: o
|
|
752
|
-
} = e;
|
|
753
|
-
const l = this.getOffsetParent || ut, s = this.getDimensions;
|
|
795
|
+
const Sn = async function(e) {
|
|
796
|
+
const n = this.getOffsetParent || mt, t = this.getDimensions, o = await t(e.floating);
|
|
754
797
|
return {
|
|
755
|
-
reference:
|
|
798
|
+
reference: En(e.reference, await n(e.floating), e.strategy),
|
|
756
799
|
floating: {
|
|
757
800
|
x: 0,
|
|
758
801
|
y: 0,
|
|
759
|
-
|
|
802
|
+
width: o.width,
|
|
803
|
+
height: o.height
|
|
760
804
|
}
|
|
761
805
|
};
|
|
762
806
|
};
|
|
763
|
-
function
|
|
764
|
-
return
|
|
765
|
-
}
|
|
766
|
-
const
|
|
767
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
768
|
-
getDocumentElement:
|
|
769
|
-
getClippingRect:
|
|
770
|
-
getOffsetParent:
|
|
771
|
-
getElementRects:
|
|
772
|
-
getClientRects:
|
|
773
|
-
getDimensions:
|
|
774
|
-
getScale:
|
|
775
|
-
isElement:
|
|
776
|
-
isRTL:
|
|
807
|
+
function Cn(e) {
|
|
808
|
+
return H(e).direction === "rtl";
|
|
809
|
+
}
|
|
810
|
+
const Rn = {
|
|
811
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: mn,
|
|
812
|
+
getDocumentElement: X,
|
|
813
|
+
getClippingRect: xn,
|
|
814
|
+
getOffsetParent: mt,
|
|
815
|
+
getElementRects: Sn,
|
|
816
|
+
getClientRects: vn,
|
|
817
|
+
getDimensions: _n,
|
|
818
|
+
getScale: fe,
|
|
819
|
+
isElement: z,
|
|
820
|
+
isRTL: Cn
|
|
777
821
|
};
|
|
778
|
-
function
|
|
822
|
+
function On(e, n) {
|
|
779
823
|
let t = null, o;
|
|
780
|
-
const l =
|
|
824
|
+
const l = X(e);
|
|
781
825
|
function s() {
|
|
782
|
-
|
|
826
|
+
var c;
|
|
827
|
+
clearTimeout(o), (c = t) == null || c.disconnect(), t = null;
|
|
783
828
|
}
|
|
784
829
|
function i(c, r) {
|
|
785
830
|
c === void 0 && (c = !1), r === void 0 && (r = 1), s();
|
|
786
831
|
const {
|
|
787
832
|
left: u,
|
|
788
|
-
top:
|
|
789
|
-
width:
|
|
790
|
-
height:
|
|
833
|
+
top: d,
|
|
834
|
+
width: p,
|
|
835
|
+
height: y
|
|
791
836
|
} = e.getBoundingClientRect();
|
|
792
|
-
if (c || n(), !
|
|
837
|
+
if (c || n(), !p || !y)
|
|
793
838
|
return;
|
|
794
|
-
const
|
|
795
|
-
rootMargin: -
|
|
796
|
-
threshold: N(0,
|
|
839
|
+
const h = De(d), f = De(l.clientWidth - (u + p)), w = De(l.clientHeight - (d + y)), b = De(u), g = {
|
|
840
|
+
rootMargin: -h + "px " + -f + "px " + -w + "px " + -b + "px",
|
|
841
|
+
threshold: N(0, ne(1, r)) || 1
|
|
797
842
|
};
|
|
798
843
|
let E = !0;
|
|
799
844
|
function R(C) {
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
845
|
+
const T = C[0].intersectionRatio;
|
|
846
|
+
if (T !== r) {
|
|
802
847
|
if (!E)
|
|
803
848
|
return i();
|
|
804
|
-
|
|
849
|
+
T ? i(!1, T) : o = setTimeout(() => {
|
|
805
850
|
i(!1, 1e-7);
|
|
806
|
-
},
|
|
851
|
+
}, 1e3);
|
|
807
852
|
}
|
|
808
853
|
E = !1;
|
|
809
854
|
}
|
|
810
855
|
try {
|
|
811
856
|
t = new IntersectionObserver(R, {
|
|
812
|
-
...
|
|
857
|
+
...g,
|
|
813
858
|
// Handle <iframe>s
|
|
814
859
|
root: l.ownerDocument
|
|
815
860
|
});
|
|
816
861
|
} catch {
|
|
817
|
-
t = new IntersectionObserver(R,
|
|
862
|
+
t = new IntersectionObserver(R, g);
|
|
818
863
|
}
|
|
819
864
|
t.observe(e);
|
|
820
865
|
}
|
|
821
866
|
return i(!0), s;
|
|
822
867
|
}
|
|
823
|
-
function
|
|
868
|
+
function kn(e, n, t, o) {
|
|
824
869
|
o === void 0 && (o = {});
|
|
825
870
|
const {
|
|
826
871
|
ancestorScroll: l = !0,
|
|
@@ -828,144 +873,155 @@ function Sn(e, n, t, o) {
|
|
|
828
873
|
elementResize: i = typeof ResizeObserver == "function",
|
|
829
874
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
830
875
|
animationFrame: r = !1
|
|
831
|
-
} = o, u =
|
|
832
|
-
|
|
833
|
-
l &&
|
|
876
|
+
} = o, u = Ye(e), d = l || s ? [...u ? Ee(u) : [], ...Ee(n)] : [];
|
|
877
|
+
d.forEach((m) => {
|
|
878
|
+
l && m.addEventListener("scroll", t, {
|
|
834
879
|
passive: !0
|
|
835
|
-
}), s &&
|
|
880
|
+
}), s && m.addEventListener("resize", t);
|
|
836
881
|
});
|
|
837
|
-
const
|
|
838
|
-
let
|
|
839
|
-
i && (
|
|
840
|
-
let [
|
|
841
|
-
|
|
842
|
-
|
|
882
|
+
const p = u && c ? On(u, t) : null;
|
|
883
|
+
let y = -1, h = null;
|
|
884
|
+
i && (h = new ResizeObserver((m) => {
|
|
885
|
+
let [g] = m;
|
|
886
|
+
g && g.target === u && h && (h.unobserve(n), cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
887
|
+
var E;
|
|
888
|
+
(E = h) == null || E.observe(n);
|
|
843
889
|
})), t();
|
|
844
|
-
}), u && !r &&
|
|
845
|
-
let f,
|
|
846
|
-
r &&
|
|
847
|
-
function
|
|
848
|
-
const
|
|
849
|
-
|
|
890
|
+
}), u && !r && h.observe(u), h.observe(n));
|
|
891
|
+
let f, w = r ? le(e) : null;
|
|
892
|
+
r && b();
|
|
893
|
+
function b() {
|
|
894
|
+
const m = le(e);
|
|
895
|
+
w && (m.x !== w.x || m.y !== w.y || m.width !== w.width || m.height !== w.height) && t(), w = m, f = requestAnimationFrame(b);
|
|
850
896
|
}
|
|
851
897
|
return t(), () => {
|
|
852
|
-
m
|
|
853
|
-
|
|
854
|
-
|
|
898
|
+
var m;
|
|
899
|
+
d.forEach((g) => {
|
|
900
|
+
l && g.removeEventListener("scroll", t), s && g.removeEventListener("resize", t);
|
|
901
|
+
}), p == null || p(), (m = h) == null || m.disconnect(), h = null, r && cancelAnimationFrame(f);
|
|
855
902
|
};
|
|
856
903
|
}
|
|
857
|
-
const
|
|
904
|
+
const Tn = cn, Bn = rn, An = un, Ln = (e, n, t) => {
|
|
858
905
|
const o = /* @__PURE__ */ new Map(), l = {
|
|
859
|
-
platform:
|
|
906
|
+
platform: Rn,
|
|
860
907
|
...t
|
|
861
908
|
}, s = {
|
|
862
909
|
...l.platform,
|
|
863
910
|
_c: o
|
|
864
911
|
};
|
|
865
|
-
return
|
|
912
|
+
return sn(e, n, {
|
|
866
913
|
...l,
|
|
867
914
|
platform: s
|
|
868
915
|
});
|
|
869
916
|
};
|
|
870
|
-
function
|
|
871
|
-
|
|
872
|
-
return (n = e == null ? void 0 : e.$el) != null ? n : e;
|
|
917
|
+
function Dn(e) {
|
|
918
|
+
return e != null && typeof e == "object" && "$el" in e;
|
|
873
919
|
}
|
|
874
|
-
function
|
|
920
|
+
function it(e) {
|
|
921
|
+
if (Dn(e)) {
|
|
922
|
+
const n = e.$el;
|
|
923
|
+
return Ue(n) && ie(n) === "#comment" ? null : n;
|
|
924
|
+
}
|
|
925
|
+
return e;
|
|
926
|
+
}
|
|
927
|
+
function _e(e) {
|
|
928
|
+
return typeof e == "function" ? e() : q(e);
|
|
929
|
+
}
|
|
930
|
+
function vt(e) {
|
|
875
931
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
876
932
|
}
|
|
877
|
-
function
|
|
878
|
-
const t =
|
|
933
|
+
function st(e, n) {
|
|
934
|
+
const t = vt(e);
|
|
879
935
|
return Math.round(n * t) / t;
|
|
880
936
|
}
|
|
881
|
-
function
|
|
937
|
+
function Fn(e, n, t) {
|
|
882
938
|
t === void 0 && (t = {});
|
|
883
|
-
const o = t.whileElementsMounted, l =
|
|
884
|
-
var
|
|
885
|
-
return (
|
|
886
|
-
}), s =
|
|
887
|
-
var
|
|
888
|
-
return (
|
|
889
|
-
}), c =
|
|
890
|
-
var
|
|
891
|
-
return (
|
|
892
|
-
}), r =
|
|
893
|
-
var
|
|
894
|
-
return (
|
|
895
|
-
}), u =
|
|
896
|
-
const
|
|
897
|
-
position:
|
|
939
|
+
const o = t.whileElementsMounted, l = k(() => {
|
|
940
|
+
var _;
|
|
941
|
+
return (_ = _e(t.open)) != null ? _ : !0;
|
|
942
|
+
}), s = k(() => _e(t.middleware)), i = k(() => {
|
|
943
|
+
var _;
|
|
944
|
+
return (_ = _e(t.placement)) != null ? _ : "bottom";
|
|
945
|
+
}), c = k(() => {
|
|
946
|
+
var _;
|
|
947
|
+
return (_ = _e(t.strategy)) != null ? _ : "absolute";
|
|
948
|
+
}), r = k(() => {
|
|
949
|
+
var _;
|
|
950
|
+
return (_ = _e(t.transform)) != null ? _ : !0;
|
|
951
|
+
}), u = k(() => it(e.value)), d = k(() => it(n.value)), p = O(0), y = O(0), h = O(c.value), f = O(i.value), w = St({}), b = O(!1), m = k(() => {
|
|
952
|
+
const _ = {
|
|
953
|
+
position: h.value,
|
|
898
954
|
left: "0",
|
|
899
955
|
top: "0"
|
|
900
956
|
};
|
|
901
|
-
if (!
|
|
902
|
-
return
|
|
903
|
-
const
|
|
957
|
+
if (!d.value)
|
|
958
|
+
return _;
|
|
959
|
+
const P = st(d.value, p.value), B = st(d.value, y.value);
|
|
904
960
|
return r.value ? {
|
|
905
|
-
...
|
|
906
|
-
transform: "translate(" +
|
|
907
|
-
...
|
|
961
|
+
..._,
|
|
962
|
+
transform: "translate(" + P + "px, " + B + "px)",
|
|
963
|
+
...vt(d.value) >= 1.5 && {
|
|
908
964
|
willChange: "transform"
|
|
909
965
|
}
|
|
910
966
|
} : {
|
|
911
|
-
position:
|
|
912
|
-
left:
|
|
913
|
-
top:
|
|
967
|
+
position: h.value,
|
|
968
|
+
left: P + "px",
|
|
969
|
+
top: B + "px"
|
|
914
970
|
};
|
|
915
971
|
});
|
|
916
|
-
let
|
|
972
|
+
let g;
|
|
917
973
|
function E() {
|
|
918
|
-
u.value == null ||
|
|
974
|
+
u.value == null || d.value == null || Ln(u.value, d.value, {
|
|
919
975
|
middleware: s.value,
|
|
920
976
|
placement: i.value,
|
|
921
977
|
strategy: c.value
|
|
922
|
-
}).then((
|
|
923
|
-
|
|
978
|
+
}).then((_) => {
|
|
979
|
+
p.value = _.x, y.value = _.y, h.value = _.strategy, f.value = _.placement, w.value = _.middlewareData, b.value = !0;
|
|
924
980
|
});
|
|
925
981
|
}
|
|
926
982
|
function R() {
|
|
927
|
-
typeof
|
|
983
|
+
typeof g == "function" && (g(), g = void 0);
|
|
928
984
|
}
|
|
929
985
|
function C() {
|
|
930
986
|
if (R(), o === void 0) {
|
|
931
987
|
E();
|
|
932
988
|
return;
|
|
933
989
|
}
|
|
934
|
-
if (u.value != null &&
|
|
935
|
-
|
|
990
|
+
if (u.value != null && d.value != null) {
|
|
991
|
+
g = o(u.value, d.value, E);
|
|
936
992
|
return;
|
|
937
993
|
}
|
|
938
994
|
}
|
|
939
|
-
function
|
|
940
|
-
l.value || (
|
|
995
|
+
function T() {
|
|
996
|
+
l.value || (b.value = !1);
|
|
941
997
|
}
|
|
942
|
-
return
|
|
998
|
+
return te([s, i, c], E, {
|
|
943
999
|
flush: "sync"
|
|
944
|
-
}),
|
|
1000
|
+
}), te([u, d], C, {
|
|
945
1001
|
flush: "sync"
|
|
946
|
-
}),
|
|
1002
|
+
}), te(l, T, {
|
|
947
1003
|
flush: "sync"
|
|
948
|
-
}),
|
|
949
|
-
x:
|
|
950
|
-
y:
|
|
951
|
-
strategy:
|
|
952
|
-
placement:
|
|
953
|
-
middlewareData:
|
|
954
|
-
isPositioned:
|
|
955
|
-
floatingStyles:
|
|
1004
|
+
}), Ct() && Rt(R), {
|
|
1005
|
+
x: re(p),
|
|
1006
|
+
y: re(y),
|
|
1007
|
+
strategy: re(h),
|
|
1008
|
+
placement: re(f),
|
|
1009
|
+
middlewareData: re(w),
|
|
1010
|
+
isPositioned: re(b),
|
|
1011
|
+
floatingStyles: m,
|
|
956
1012
|
update: E
|
|
957
1013
|
};
|
|
958
1014
|
}
|
|
959
|
-
const
|
|
1015
|
+
const Mn = (e) => (It("data-v-d85a8746"), e = e(), Vt(), e), Pn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], In = ["selected", "value"], Vn = /* @__PURE__ */ Mn(() => /* @__PURE__ */ j("option", { value: "" }, null, -1)), Nn = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], $n = ["id"], zn = ["onKeypress", "onMousedown"], Hn = {
|
|
960
1016
|
key: 0,
|
|
961
1017
|
class: "stash-select__total"
|
|
962
|
-
},
|
|
1018
|
+
}, Wn = {
|
|
963
1019
|
key: 0,
|
|
964
1020
|
class: "tw-flex tw-items-center tw-border-b tw-border-blue-500 tw-pr-1.5"
|
|
965
|
-
},
|
|
1021
|
+
}, jn = ["data-test", "placeholder"], Kn = { class: "stash-select__options options tw-my-1.5 tw-w-full tw-border-white tw-bg-white" }, Un = ["data-test", "onClick", "onMouseenter"], qn = { class: "tw-m-1.5 tw-cursor-default tw-p-1.5" }, Xn = {
|
|
966
1022
|
class: "tw-m-1.5 tw-cursor-default tw-p-1.5",
|
|
967
1023
|
"data-test": "stash-select|no-options"
|
|
968
|
-
},
|
|
1024
|
+
}, Yn = /* @__PURE__ */ Ot({
|
|
969
1025
|
name: "ll-select",
|
|
970
1026
|
__name: "Select",
|
|
971
1027
|
props: {
|
|
@@ -1005,404 +1061,404 @@ const On = (e) => (Mt("data-v-d85a8746"), e = e(), Dt(), e), kn = ["id", "aria-e
|
|
|
1005
1061
|
useFuzzySearch: { type: Boolean, default: !1 },
|
|
1006
1062
|
menuPlacement: { default: "bottom-start" },
|
|
1007
1063
|
enableTeleport: { type: Boolean, default: !1 },
|
|
1008
|
-
teleportTo: { default: `#${
|
|
1064
|
+
teleportTo: { default: `#${qt}` }
|
|
1009
1065
|
},
|
|
1010
1066
|
emits: ["update:model-value", "clear", "add", "remove", "opened", "closed"],
|
|
1011
1067
|
setup(e, { emit: n }) {
|
|
1012
|
-
const t = e, o = 6, l = 300, s =
|
|
1013
|
-
whileElementsMounted:
|
|
1068
|
+
const t = e, o = 6, l = 300, s = kt(), i = Tt(), c = O(null), r = O(null), u = O(null), d = O(null), p = O(null), y = O(0), h = O(0), f = O([]), w = O(() => []), b = O(""), m = O(-1), g = O(!1), E = O({}), R = O(!1), { floatingStyles: C } = Fn(c, u, {
|
|
1069
|
+
whileElementsMounted: kn,
|
|
1014
1070
|
placement: t.menuPlacement,
|
|
1015
1071
|
middleware: [
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
apply({ availableHeight: a, elements:
|
|
1020
|
-
t.enableTeleport && Object.assign(
|
|
1072
|
+
Bn(),
|
|
1073
|
+
Tn(({ rects: a }) => t.menuPlacement.includes("bottom") && y.value > h.value ? y.value - a.reference.height + o : o),
|
|
1074
|
+
An({
|
|
1075
|
+
apply({ availableHeight: a, elements: v, rects: S }) {
|
|
1076
|
+
t.enableTeleport && Object.assign(v.floating.style, {
|
|
1021
1077
|
maxWidth: `${S.reference.width}px`,
|
|
1022
1078
|
maxHeight: `${Math.min(a, l)}px`
|
|
1023
1079
|
});
|
|
1024
1080
|
}
|
|
1025
1081
|
})
|
|
1026
1082
|
]
|
|
1027
|
-
}),
|
|
1083
|
+
}), T = k(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), _ = k(() => {
|
|
1028
1084
|
let a = (R.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
|
|
1029
|
-
return
|
|
1030
|
-
}),
|
|
1031
|
-
() => !
|
|
1032
|
-
),
|
|
1033
|
-
|
|
1085
|
+
return Ht(a[0]) || (a = a.map((v, S) => ({ name: v, id: S }))), a;
|
|
1086
|
+
}), P = k(() => t.searchLoading || Object.keys(E.value).length > 0), B = k(() => t.disableFiltering || !(b.value || "").trim() ? _.value : w.value(b.value)), W = k(() => y.value <= h.value), J = k(
|
|
1087
|
+
() => !g.value && !t.single && !W.value && f.value.length
|
|
1088
|
+
), Re = k(() => [f.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), Oe = k(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
|
|
1089
|
+
te(b, (a, v) => v !== a && ke(-1)), te(f, () => pe(), { deep: !0 }), te(
|
|
1034
1090
|
() => t.modelValue,
|
|
1035
1091
|
(a) => {
|
|
1036
1092
|
if (Array.isArray(a)) {
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1093
|
+
const v = a.filter(Boolean);
|
|
1094
|
+
Ze(v, f.value) || (f.value = v);
|
|
1039
1095
|
return;
|
|
1040
1096
|
}
|
|
1041
|
-
if (!
|
|
1042
|
-
|
|
1097
|
+
if (!zt(a)) {
|
|
1098
|
+
Ze(a, f.value[0]) || (f.value[0] = a);
|
|
1043
1099
|
return;
|
|
1044
1100
|
}
|
|
1045
1101
|
f.value = [];
|
|
1046
1102
|
},
|
|
1047
1103
|
{ immediate: !0 }
|
|
1048
|
-
),
|
|
1104
|
+
), te(
|
|
1049
1105
|
() => t.options,
|
|
1050
1106
|
() => {
|
|
1051
|
-
const { searchFor: a } =
|
|
1052
|
-
items:
|
|
1107
|
+
const { searchFor: a } = jt({
|
|
1108
|
+
items: k(() => _.value),
|
|
1053
1109
|
fieldNames: t.searchBy.length ? t.searchBy : [t.displayBy],
|
|
1054
1110
|
trackBy: t.trackBy
|
|
1055
1111
|
});
|
|
1056
|
-
|
|
1112
|
+
w.value = (v) => a(v, { fuzzy: t.useFuzzySearch });
|
|
1057
1113
|
},
|
|
1058
1114
|
{ immediate: !0 }
|
|
1059
1115
|
);
|
|
1060
|
-
const
|
|
1116
|
+
const U = () => {
|
|
1061
1117
|
f.value = [], n("update:model-value", t.single ? void 0 : f.value), n("clear");
|
|
1062
|
-
},
|
|
1063
|
-
t.disabled || !a || typeof a == "object" && "disabled" in a && (a != null && a.disabled) || (
|
|
1064
|
-
},
|
|
1118
|
+
}, Q = (a) => {
|
|
1119
|
+
t.disabled || !a || typeof a == "object" && "disabled" in a && (a != null && a.disabled) || (se(a) ? I(a) : (t.single && (f.value = []), f.value.push(a), n("update:model-value", t.single ? f.value[0] : f.value), n("add", a)), t.single && L());
|
|
1120
|
+
}, Z = (a) => {
|
|
1065
1121
|
if (t.single) {
|
|
1066
|
-
const S =
|
|
1067
|
-
var
|
|
1068
|
-
return ((
|
|
1122
|
+
const S = _.value.find((D) => {
|
|
1123
|
+
var F;
|
|
1124
|
+
return ((F = D[t.trackBy]) == null ? void 0 : F.toString()) === a.target.value;
|
|
1069
1125
|
});
|
|
1070
|
-
|
|
1126
|
+
Q(S);
|
|
1071
1127
|
return;
|
|
1072
1128
|
}
|
|
1073
|
-
const
|
|
1129
|
+
const v = [...a.target.selectedOptions];
|
|
1074
1130
|
for (const S of [...f.value])
|
|
1075
|
-
|
|
1076
|
-
var
|
|
1077
|
-
return
|
|
1078
|
-
}) ||
|
|
1079
|
-
for (const S of
|
|
1080
|
-
const
|
|
1081
|
-
(
|
|
1082
|
-
var
|
|
1083
|
-
return ((
|
|
1131
|
+
v.find((F) => {
|
|
1132
|
+
var x;
|
|
1133
|
+
return F.value === ((x = S[t.trackBy]) == null ? void 0 : x.toString());
|
|
1134
|
+
}) || I(S);
|
|
1135
|
+
for (const S of v) {
|
|
1136
|
+
const D = _.value.find(
|
|
1137
|
+
(F) => {
|
|
1138
|
+
var x;
|
|
1139
|
+
return ((x = F[t.trackBy]) == null ? void 0 : x.toString()) === S.value;
|
|
1084
1140
|
}
|
|
1085
1141
|
);
|
|
1086
|
-
|
|
1142
|
+
se(D) || Q(D);
|
|
1087
1143
|
}
|
|
1088
|
-
},
|
|
1089
|
-
if (t.disabled ||
|
|
1144
|
+
}, I = (a) => {
|
|
1145
|
+
if (t.disabled || Oe.value && f.value.length === 1)
|
|
1090
1146
|
return;
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1093
|
-
|
|
1147
|
+
const v = f.value.findIndex((S) => S[t.trackBy] === a[t.trackBy]);
|
|
1148
|
+
if (v === -1) {
|
|
1149
|
+
Nt.warn("ll-select: could not find option to remove", a);
|
|
1094
1150
|
return;
|
|
1095
1151
|
}
|
|
1096
|
-
f.value.splice(
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1152
|
+
f.value.splice(v, 1), n("update:model-value", t.single ? f.value[0] : f.value), n("remove", a, v);
|
|
1153
|
+
}, $ = () => {
|
|
1154
|
+
g.value || (pe(), g.value = !0, n("opened"), T.value && ze(() => {
|
|
1099
1155
|
var a;
|
|
1100
|
-
(a =
|
|
1156
|
+
(a = p.value) == null || a.focus({ preventScroll: !0 });
|
|
1101
1157
|
}));
|
|
1102
|
-
},
|
|
1158
|
+
}, L = () => {
|
|
1103
1159
|
var a;
|
|
1104
|
-
|
|
1105
|
-
},
|
|
1106
|
-
if (await
|
|
1160
|
+
g.value && n("closed", f.value), ke(-1), g.value = !1, t.preserveSearchTerm || (b.value = ""), (a = r.value) == null || a.blur();
|
|
1161
|
+
}, $e = async (a) => {
|
|
1162
|
+
if (await ze(), !r.value)
|
|
1107
1163
|
return;
|
|
1108
|
-
if (![
|
|
1109
|
-
const S = r.value.querySelector(".stash-select__option--highlighted"),
|
|
1110
|
-
if (!
|
|
1164
|
+
if (![ue.ENTER, ue.ESCAPE].includes(a.keyCode)) {
|
|
1165
|
+
const S = r.value.querySelector(".stash-select__option--highlighted"), D = S == null ? void 0 : S.getBoundingClientRect(), F = r.value.getBoundingClientRect();
|
|
1166
|
+
if (!D || !F)
|
|
1111
1167
|
return;
|
|
1112
|
-
(
|
|
1168
|
+
(D.bottom >= F.bottom || D.top <= F.top + D.height) && (S == null || S.scrollIntoView({ block: "nearest", inline: "nearest" }));
|
|
1113
1169
|
}
|
|
1114
|
-
},
|
|
1115
|
-
|
|
1116
|
-
},
|
|
1117
|
-
if (a.keyCode ===
|
|
1118
|
-
|
|
1119
|
-
else if (a.keyCode ===
|
|
1120
|
-
|
|
1121
|
-
else if (a.keyCode ===
|
|
1122
|
-
|
|
1123
|
-
else if (a.keyCode ===
|
|
1124
|
-
|
|
1170
|
+
}, ke = (a) => {
|
|
1171
|
+
m.value = a;
|
|
1172
|
+
}, gt = (a) => {
|
|
1173
|
+
if (a.keyCode === ue.ESCAPE)
|
|
1174
|
+
L();
|
|
1175
|
+
else if (a.keyCode === ue.DOWN && m.value < B.value.length - 1)
|
|
1176
|
+
g.value && m.value++;
|
|
1177
|
+
else if (a.keyCode === ue.UP && m.value > 0)
|
|
1178
|
+
g.value && m.value--, u.value && T.value && m.value === 0 && (u.value.scrollTop -= 100);
|
|
1179
|
+
else if (a.keyCode === ue.ENTER && m.value !== -1)
|
|
1180
|
+
g.value && Q(B.value[m.value]);
|
|
1125
1181
|
else
|
|
1126
1182
|
return;
|
|
1127
|
-
a.preventDefault(),
|
|
1128
|
-
},
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1183
|
+
a.preventDefault(), $e(a);
|
|
1184
|
+
}, Ge = $t(function() {
|
|
1185
|
+
yt();
|
|
1186
|
+
}, Kt.FAST), yt = async function() {
|
|
1131
1187
|
if (!t.onSearch)
|
|
1132
1188
|
return;
|
|
1133
|
-
const a =
|
|
1189
|
+
const a = Wt("search-request-");
|
|
1134
1190
|
try {
|
|
1135
|
-
E.value[a] = !0, await t.onSearch(
|
|
1191
|
+
E.value[a] = !0, await t.onSearch(b.value);
|
|
1136
1192
|
} finally {
|
|
1137
1193
|
delete E.value[a];
|
|
1138
1194
|
}
|
|
1139
|
-
},
|
|
1195
|
+
}, wt = (a, v) => [
|
|
1140
1196
|
{
|
|
1141
1197
|
"stash-select__option": !0,
|
|
1142
1198
|
"stash-select__option--disabled": a && typeof a == "object" && "disabled" in a && (a == null ? void 0 : a.disabled),
|
|
1143
|
-
"stash-select__option--highlighted":
|
|
1144
|
-
"stash-select__option--selected":
|
|
1199
|
+
"stash-select__option--highlighted": m.value === v,
|
|
1200
|
+
"stash-select__option--selected": se(a)
|
|
1145
1201
|
},
|
|
1146
1202
|
// @deprecated
|
|
1147
1203
|
{
|
|
1148
|
-
"tw-bg-ice-200":
|
|
1149
|
-
"tw-bg-blue-100 tw-text-ice-700":
|
|
1204
|
+
"tw-bg-ice-200": m.value === v,
|
|
1205
|
+
"tw-bg-blue-100 tw-text-ice-700": se(a)
|
|
1150
1206
|
}
|
|
1151
|
-
],
|
|
1152
|
-
function
|
|
1153
|
-
var
|
|
1207
|
+
], se = (a) => a == null ? !1 : f.value.some((v) => (v == null ? void 0 : v[t.trackBy]) === a[t.trackBy]);
|
|
1208
|
+
function Je(a) {
|
|
1209
|
+
var D, F;
|
|
1154
1210
|
if (!a)
|
|
1155
1211
|
return !1;
|
|
1156
|
-
const
|
|
1157
|
-
return
|
|
1212
|
+
const v = (D = r.value) == null ? void 0 : D.contains(a), S = (F = u.value) == null ? void 0 : F.contains(a);
|
|
1213
|
+
return v || S;
|
|
1158
1214
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const
|
|
1161
|
-
!
|
|
1215
|
+
function bt(a) {
|
|
1216
|
+
const v = a.relatedTarget;
|
|
1217
|
+
!Je(v) && v && L();
|
|
1162
1218
|
}
|
|
1163
|
-
function
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1219
|
+
function xt(a) {
|
|
1220
|
+
const v = a.target;
|
|
1221
|
+
Je(v) || L();
|
|
1166
1222
|
}
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
},
|
|
1170
|
-
await
|
|
1223
|
+
const _t = () => {
|
|
1224
|
+
ke(-1);
|
|
1225
|
+
}, pe = async () => {
|
|
1226
|
+
await ze(), d.value && r.value && (h.value = h.value === 0 ? r.value.clientHeight : h.value, y.value = d.value.clientHeight);
|
|
1171
1227
|
};
|
|
1172
|
-
return
|
|
1228
|
+
return Bt(() => {
|
|
1173
1229
|
if (s.onInput)
|
|
1174
1230
|
throw new Error("ll-select: use the @update:model-value event instead of @input.");
|
|
1175
|
-
window.addEventListener("resize",
|
|
1176
|
-
}),
|
|
1177
|
-
window.removeEventListener("resize",
|
|
1178
|
-
}), (a,
|
|
1231
|
+
window.addEventListener("resize", pe), pe();
|
|
1232
|
+
}), At(() => {
|
|
1233
|
+
window.removeEventListener("resize", pe);
|
|
1234
|
+
}), (a, v) => (A(), Te(Xt, {
|
|
1179
1235
|
id: t.id,
|
|
1180
|
-
class:
|
|
1236
|
+
class: me(["input ll-select stash-select", q(s).class]),
|
|
1181
1237
|
"data-test": "stash-select",
|
|
1182
1238
|
"add-bottom-space": t.addBottomSpace,
|
|
1183
1239
|
"error-text": t.errorText || t.error,
|
|
1184
1240
|
"hint-text": t.hintText || t.hint,
|
|
1185
1241
|
label: t.label,
|
|
1186
1242
|
"show-optional-in-label": t.showOptionalInLabel
|
|
1187
|
-
},
|
|
1188
|
-
default:
|
|
1189
|
-
|
|
1243
|
+
}, Lt({
|
|
1244
|
+
default: ve(({ fieldId: S, fieldErrorId: D, hasError: F }) => [
|
|
1245
|
+
j("select", {
|
|
1190
1246
|
id: S,
|
|
1191
|
-
"aria-errormessage":
|
|
1192
|
-
"aria-invalid":
|
|
1247
|
+
"aria-errormessage": D,
|
|
1248
|
+
"aria-invalid": F,
|
|
1193
1249
|
class: "tw-sr-only",
|
|
1194
1250
|
disabled: t.disabled,
|
|
1195
1251
|
multiple: !t.single,
|
|
1196
1252
|
name: t.name,
|
|
1197
|
-
onChange:
|
|
1253
|
+
onChange: Z
|
|
1198
1254
|
}, [
|
|
1199
|
-
(
|
|
1200
|
-
key: `srOnlyOption-${
|
|
1201
|
-
selected:
|
|
1202
|
-
value:
|
|
1203
|
-
},
|
|
1204
|
-
|
|
1205
|
-
], 40,
|
|
1206
|
-
|
|
1255
|
+
(A(!0), V(Be, null, Ae(B.value, (x, ee) => (A(), V("option", {
|
|
1256
|
+
key: `srOnlyOption-${ee}`,
|
|
1257
|
+
selected: se(x),
|
|
1258
|
+
value: x[t.trackBy]
|
|
1259
|
+
}, ae(x[t.displayBy] || ""), 9, In))), 128)),
|
|
1260
|
+
Vn
|
|
1261
|
+
], 40, Pn),
|
|
1262
|
+
ge((A(), V("div", {
|
|
1207
1263
|
ref_key: "selectRef",
|
|
1208
1264
|
ref: c,
|
|
1209
1265
|
role: "listbox",
|
|
1210
1266
|
"aria-hidden": "true",
|
|
1211
|
-
class:
|
|
1267
|
+
class: me(["stash-select__content-wrapper", [
|
|
1212
1268
|
{
|
|
1213
1269
|
"stash-select--disabled": !!t.disabled,
|
|
1214
1270
|
"stash-select--error": !!(t.errorText || t.error),
|
|
1215
|
-
"stash-select--active":
|
|
1271
|
+
"stash-select--active": g.value,
|
|
1216
1272
|
"stash-select--single": t.single
|
|
1217
1273
|
},
|
|
1218
1274
|
// @deprecated
|
|
1219
1275
|
{
|
|
1220
|
-
"is-active":
|
|
1276
|
+
"is-active": g.value,
|
|
1221
1277
|
"is-single": t.single,
|
|
1222
1278
|
"is-disabled": t.disabled
|
|
1223
1279
|
}
|
|
1224
1280
|
]]),
|
|
1225
1281
|
"aria-controls": "listbox-" + S,
|
|
1226
|
-
"aria-expanded":
|
|
1282
|
+
"aria-expanded": g.value,
|
|
1227
1283
|
"aria-label": t.placeholder,
|
|
1228
1284
|
"aria-disabled": t.disabled || void 0,
|
|
1229
|
-
onKeydown:
|
|
1230
|
-
onKeyup:
|
|
1285
|
+
onKeydown: gt,
|
|
1286
|
+
onKeyup: Qe(L, ["esc"])
|
|
1231
1287
|
}, [
|
|
1232
|
-
|
|
1288
|
+
j("div", {
|
|
1233
1289
|
id: "listbox-" + S,
|
|
1234
1290
|
ref_key: "contentRef",
|
|
1235
1291
|
ref: r,
|
|
1236
1292
|
class: "input-field stash-select__content",
|
|
1237
1293
|
tabindex: "0",
|
|
1238
|
-
onFocusin:
|
|
1239
|
-
onFocusinOnce:
|
|
1240
|
-
onFocusout:
|
|
1241
|
-
onKeydown:
|
|
1242
|
-
onMouseleave:
|
|
1294
|
+
onFocusin: $,
|
|
1295
|
+
onFocusinOnce: v[4] || (v[4] = (x) => R.value = !0),
|
|
1296
|
+
onFocusout: bt,
|
|
1297
|
+
onKeydown: $,
|
|
1298
|
+
onMouseleave: _t
|
|
1243
1299
|
}, [
|
|
1244
|
-
|
|
1300
|
+
j("ul", {
|
|
1245
1301
|
ref_key: "chipsRef",
|
|
1246
|
-
ref:
|
|
1302
|
+
ref: d,
|
|
1247
1303
|
class: "stash-select__chips"
|
|
1248
1304
|
}, [
|
|
1249
|
-
f.value.length ?
|
|
1305
|
+
f.value.length ? ye("", !0) : (A(), V("li", {
|
|
1250
1306
|
key: 0,
|
|
1251
|
-
class:
|
|
1252
|
-
},
|
|
1253
|
-
t.single ? (
|
|
1254
|
-
key: `chip-${
|
|
1255
|
-
class:
|
|
1307
|
+
class: me(["stash-select__placeholder tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
|
|
1308
|
+
}, ae(t.placeholder), 3)),
|
|
1309
|
+
t.single ? (A(!0), V(Be, { key: 1 }, Ae(f.value, (x) => (A(), V("li", {
|
|
1310
|
+
key: `chip-${x[t.trackBy]}`,
|
|
1311
|
+
class: me(["stash-select__selected tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
|
|
1256
1312
|
}, [
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1313
|
+
Le(a.$slots, "selected", { option: x }, () => [
|
|
1314
|
+
we(ae(x[t.displayBy] || x) + " ", 1),
|
|
1315
|
+
j("button", {
|
|
1260
1316
|
tabindex: "-1",
|
|
1261
1317
|
class: "stash-select__remove",
|
|
1262
|
-
onKeypress:
|
|
1263
|
-
onMousedown:
|
|
1318
|
+
onKeypress: Qe(be((ee) => I(x), ["prevent"]), ["enter"]),
|
|
1319
|
+
onMousedown: be((ee) => I(x), ["prevent", "stop"])
|
|
1264
1320
|
}, [
|
|
1265
|
-
|
|
1321
|
+
ce(xe, {
|
|
1266
1322
|
icon: "close",
|
|
1267
1323
|
name: "close",
|
|
1268
1324
|
size: "small"
|
|
1269
1325
|
})
|
|
1270
|
-
], 40,
|
|
1326
|
+
], 40, zn)
|
|
1271
1327
|
], !0)
|
|
1272
|
-
], 2))), 128)) : (
|
|
1273
|
-
key: `chip-${
|
|
1328
|
+
], 2))), 128)) : (A(!0), V(Be, { key: 2 }, Ae(f.value, (x) => (A(), V("li", {
|
|
1329
|
+
key: `chip-${x[t.trackBy]}`,
|
|
1274
1330
|
class: "tw-inline-block"
|
|
1275
1331
|
}, [
|
|
1276
|
-
|
|
1332
|
+
ce(et, {
|
|
1277
1333
|
"bg-color": "blue-500",
|
|
1278
1334
|
"is-removable": "",
|
|
1279
1335
|
"text-color": "white",
|
|
1280
1336
|
class: "stash-select__chip",
|
|
1281
|
-
onRemove: (
|
|
1337
|
+
onRemove: (ee) => I(x)
|
|
1282
1338
|
}, {
|
|
1283
|
-
default:
|
|
1284
|
-
|
|
1339
|
+
default: ve(() => [
|
|
1340
|
+
we(ae(x[t.displayBy] || x), 1)
|
|
1285
1341
|
]),
|
|
1286
1342
|
_: 2
|
|
1287
1343
|
}, 1032, ["onRemove"])
|
|
1288
1344
|
]))), 128))
|
|
1289
1345
|
], 512),
|
|
1290
|
-
|
|
1291
|
-
|
|
1346
|
+
J.value ? (A(), V("div", Hn, [
|
|
1347
|
+
ce(et, {
|
|
1292
1348
|
"bg-color": "blue-500",
|
|
1293
1349
|
"is-removable": "",
|
|
1294
1350
|
"text-color": "white",
|
|
1295
1351
|
class: "stash-select__chip",
|
|
1296
|
-
onRemove:
|
|
1352
|
+
onRemove: U
|
|
1297
1353
|
}, {
|
|
1298
|
-
default:
|
|
1299
|
-
|
|
1354
|
+
default: ve(() => [
|
|
1355
|
+
we(ae(Re.value), 1)
|
|
1300
1356
|
]),
|
|
1301
1357
|
_: 1
|
|
1302
1358
|
})
|
|
1303
|
-
])) :
|
|
1304
|
-
t.icon ? (
|
|
1359
|
+
])) : ye("", !0),
|
|
1360
|
+
t.icon ? (A(), Te(xe, {
|
|
1305
1361
|
key: 1,
|
|
1306
1362
|
class: "stash-select__icon",
|
|
1307
1363
|
"data-test": "stash-select|toggle-icon",
|
|
1308
1364
|
name: t.icon,
|
|
1309
|
-
onMousedown:
|
|
1310
|
-
}, null, 8, ["name"])) :
|
|
1311
|
-
(
|
|
1365
|
+
onMousedown: v[0] || (v[0] = be((x) => g.value && L(), ["prevent"]))
|
|
1366
|
+
}, null, 8, ["name"])) : ye("", !0),
|
|
1367
|
+
(A(), Te(Dt, {
|
|
1312
1368
|
to: t.teleportTo,
|
|
1313
1369
|
disabled: !t.enableTeleport
|
|
1314
1370
|
}, [
|
|
1315
|
-
|
|
1316
|
-
default:
|
|
1317
|
-
|
|
1371
|
+
ce(Ft, { name: "fade" }, {
|
|
1372
|
+
default: ve(() => [
|
|
1373
|
+
ge(j("div", {
|
|
1318
1374
|
ref_key: "optionsWrapperRef",
|
|
1319
1375
|
ref: u,
|
|
1320
1376
|
class: "stash-select__border-selector tw-w-full tw-shadow",
|
|
1321
|
-
style:
|
|
1322
|
-
onClick:
|
|
1377
|
+
style: Mt(q(C)),
|
|
1378
|
+
onClick: v[3] || (v[3] = be(() => {
|
|
1323
1379
|
}, ["stop"]))
|
|
1324
1380
|
}, [
|
|
1325
|
-
|
|
1326
|
-
|
|
1381
|
+
T.value ? (A(), V("div", Wn, [
|
|
1382
|
+
ge(j("input", {
|
|
1327
1383
|
ref_key: "searchRef",
|
|
1328
|
-
ref:
|
|
1329
|
-
"onUpdate:modelValue":
|
|
1384
|
+
ref: p,
|
|
1385
|
+
"onUpdate:modelValue": v[1] || (v[1] = (x) => b.value = x),
|
|
1330
1386
|
type: "text",
|
|
1331
1387
|
autocomplete: "off",
|
|
1332
1388
|
class: "stash-select__search",
|
|
1333
|
-
"data-test":
|
|
1389
|
+
"data-test": q(s)["data-test"] ? q(s)["data-test"] + "-search" : "stash-select|search",
|
|
1334
1390
|
placeholder: t.searchPlaceholder,
|
|
1335
1391
|
spellcheck: !1,
|
|
1336
|
-
onInput:
|
|
1337
|
-
(...
|
|
1338
|
-
}, null, 40,
|
|
1339
|
-
[
|
|
1392
|
+
onInput: v[2] || (v[2] = //@ts-ignore
|
|
1393
|
+
(...x) => q(Ge) && q(Ge)(...x))
|
|
1394
|
+
}, null, 40, jn), [
|
|
1395
|
+
[Pt, b.value]
|
|
1340
1396
|
]),
|
|
1341
|
-
|
|
1397
|
+
ce(xe, {
|
|
1342
1398
|
name: "search",
|
|
1343
1399
|
class: "tw-text-ice-500"
|
|
1344
1400
|
})
|
|
1345
|
-
])) :
|
|
1346
|
-
|
|
1347
|
-
(
|
|
1348
|
-
key: `option-${
|
|
1349
|
-
"data-test":
|
|
1350
|
-
class:
|
|
1351
|
-
onClick: (
|
|
1352
|
-
onMouseenter:
|
|
1401
|
+
])) : ye("", !0),
|
|
1402
|
+
j("ul", Kn, [
|
|
1403
|
+
(A(!0), V(Be, null, Ae(B.value, (x, ee) => (A(), V("li", {
|
|
1404
|
+
key: `option-${x[t.trackBy]}`,
|
|
1405
|
+
"data-test": x[t.trackBy],
|
|
1406
|
+
class: me(wt(x, ee)),
|
|
1407
|
+
onClick: (Et) => Q(x),
|
|
1408
|
+
onMouseenter: be((Et) => ke(ee), ["self"])
|
|
1353
1409
|
}, [
|
|
1354
|
-
|
|
1355
|
-
|
|
1410
|
+
Le(a.$slots, "option", { option: x }, () => [
|
|
1411
|
+
we(ae(x[t.displayBy] || x), 1)
|
|
1356
1412
|
], !0),
|
|
1357
|
-
|
|
1413
|
+
se(x) && !t.hideCheck ? (A(), Te(xe, {
|
|
1358
1414
|
key: 0,
|
|
1359
1415
|
class: "tw-ml-auto tw-text-blue-500",
|
|
1360
1416
|
name: "check"
|
|
1361
|
-
})) :
|
|
1362
|
-
], 42,
|
|
1363
|
-
|
|
1364
|
-
|
|
1417
|
+
})) : ye("", !0)
|
|
1418
|
+
], 42, Un))), 128)),
|
|
1419
|
+
ge(j("li", qn, [
|
|
1420
|
+
ce(xe, {
|
|
1365
1421
|
"data-test": "stash-select|options-loading",
|
|
1366
1422
|
name: "working",
|
|
1367
1423
|
class: "tw-animate-spin tw-text-ice-500"
|
|
1368
1424
|
})
|
|
1369
1425
|
], 512), [
|
|
1370
|
-
[
|
|
1426
|
+
[He, t.loading || P.value]
|
|
1371
1427
|
]),
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1428
|
+
ge(j("li", Xn, [
|
|
1429
|
+
Le(a.$slots, "no-options", {}, () => [
|
|
1430
|
+
we(" No options ")
|
|
1375
1431
|
], !0)
|
|
1376
1432
|
], 512), [
|
|
1377
|
-
[
|
|
1433
|
+
[He, !t.loading && !P.value && !B.value.length]
|
|
1378
1434
|
])
|
|
1379
1435
|
])
|
|
1380
1436
|
], 4), [
|
|
1381
|
-
[
|
|
1437
|
+
[He, g.value && !t.disabled]
|
|
1382
1438
|
])
|
|
1383
1439
|
]),
|
|
1384
1440
|
_: 3
|
|
1385
1441
|
})
|
|
1386
1442
|
], 8, ["to", "disabled"]))
|
|
1387
|
-
], 40,
|
|
1388
|
-
], 42,
|
|
1389
|
-
[
|
|
1443
|
+
], 40, $n)
|
|
1444
|
+
], 42, Nn)), [
|
|
1445
|
+
[q(Ut), xt]
|
|
1390
1446
|
])
|
|
1391
1447
|
]),
|
|
1392
1448
|
_: 2
|
|
1393
1449
|
}, [
|
|
1394
|
-
|
|
1450
|
+
q(i).hint ? {
|
|
1395
1451
|
name: "hint",
|
|
1396
|
-
fn:
|
|
1397
|
-
|
|
1452
|
+
fn: ve(() => [
|
|
1453
|
+
Le(a.$slots, "hint", {}, void 0, !0)
|
|
1398
1454
|
]),
|
|
1399
1455
|
key: "0"
|
|
1400
1456
|
} : void 0
|
|
1401
1457
|
]), 1032, ["id", "add-bottom-space", "class", "error-text", "hint-text", "label", "show-optional-in-label"]));
|
|
1402
1458
|
}
|
|
1403
1459
|
});
|
|
1404
|
-
const
|
|
1460
|
+
const Eo = /* @__PURE__ */ Yt(Yn, [["__scopeId", "data-v-d85a8746"]]);
|
|
1405
1461
|
export {
|
|
1406
|
-
|
|
1462
|
+
Eo as default
|
|
1407
1463
|
};
|
|
1408
1464
|
//# sourceMappingURL=Select.js.map
|