@vonage/vivid 5.7.0 → 5.9.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/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition19.cjs +3 -4
- package/bundled/definition19.js +35 -52
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -1
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/feature.cjs +4 -0
- package/bundled/feature.js +2886 -0
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +49 -22
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +15 -13
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/checkbox/definition.cjs +1 -1
- package/checkbox/definition.js +1 -1
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/contextual-help/definition.cjs +1 -0
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +5145 -3781
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/data-table/definition.cjs +204 -0
- package/data-table/definition.js +188 -0
- package/data-table/index.cjs +37 -0
- package/data-table/index.js +143 -0
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +26 -0
- package/index.js +4 -0
- package/lib/components.d.ts +4 -0
- package/lib/contextual-help/definition.d.ts +2 -0
- package/lib/data-table/definition.d.ts +8 -0
- package/lib/data-table/table-body.d.ts +3 -0
- package/lib/data-table/table-body.template.d.ts +3 -0
- package/lib/data-table/table-cell.d.ts +381 -0
- package/lib/data-table/table-cell.template.d.ts +3 -0
- package/lib/data-table/table-head.d.ts +3 -0
- package/lib/data-table/table-head.template.d.ts +3 -0
- package/lib/data-table/table-header-cell.d.ts +381 -0
- package/lib/data-table/table-header-cell.template.d.ts +3 -0
- package/lib/data-table/table-row.d.ts +381 -0
- package/lib/data-table/table-row.template.d.ts +3 -0
- package/lib/data-table/table.d.ts +3 -0
- package/lib/data-table/table.template.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +0 -1
- package/lib/rich-text-editor/rte/config.d.ts +3 -0
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +4 -0
- package/lib/rich-text-view/rich-text-view.d.ts +15 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/tag-name-map.d.ts +10 -1
- package/locales/de-DE.cjs +3 -1
- package/locales/de-DE.js +3 -1
- package/locales/en-GB.cjs +3 -1
- package/locales/en-GB.js +3 -1
- package/locales/en-US.cjs +3 -1
- package/locales/en-US.js +3 -1
- package/locales/ja-JP.cjs +3 -1
- package/locales/ja-JP.js +3 -1
- package/locales/zh-CN.cjs +3 -1
- package/locales/zh-CN.js +3 -1
- package/package.json +8 -12
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +328 -3882
- package/rich-text-editor/definition.js +143 -3697
- package/rich-text-editor/index.cjs +12 -15
- package/rich-text-editor/index.js +3489 -6291
- package/rich-text-view/definition.cjs +159 -0
- package/rich-text-view/definition.js +153 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +95 -0
- package/select/definition.cjs +27 -15
- package/select/definition.js +27 -15
- package/shared/foundation/listbox/listbox.d.ts +0 -1
- package/shared/localization/Locale.d.ts +2 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/feature.cjs +3678 -0
- package/unbundled/feature.js +3662 -0
- package/unbundled/listbox.cjs +29 -2
- package/unbundled/listbox.js +29 -2
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1478 -39
|
@@ -0,0 +1,1242 @@
|
|
|
1
|
+
const Dt = ["top", "right", "bottom", "left"], vt = ["start", "end"], bt = /* @__PURE__ */ Dt.reduce((t, e) => t.concat(e, e + "-" + vt[0], e + "-" + vt[1]), []), N = Math.min, L = Math.max, it = Math.round, ot = Math.floor, I = (t) => ({
|
|
2
|
+
x: t,
|
|
3
|
+
y: t
|
|
4
|
+
}), Xt = {
|
|
5
|
+
left: "right",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
top: "bottom"
|
|
9
|
+
}, Yt = {
|
|
10
|
+
start: "end",
|
|
11
|
+
end: "start"
|
|
12
|
+
};
|
|
13
|
+
function dt(t, e, n) {
|
|
14
|
+
return L(t, N(e, n));
|
|
15
|
+
}
|
|
16
|
+
function j(t, e) {
|
|
17
|
+
return typeof t == "function" ? t(e) : t;
|
|
18
|
+
}
|
|
19
|
+
function W(t) {
|
|
20
|
+
return t.split("-")[0];
|
|
21
|
+
}
|
|
22
|
+
function H(t) {
|
|
23
|
+
return t.split("-")[1];
|
|
24
|
+
}
|
|
25
|
+
function Ft(t) {
|
|
26
|
+
return t === "x" ? "y" : "x";
|
|
27
|
+
}
|
|
28
|
+
function ht(t) {
|
|
29
|
+
return t === "y" ? "height" : "width";
|
|
30
|
+
}
|
|
31
|
+
const jt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
32
|
+
function z(t) {
|
|
33
|
+
return jt.has(W(t)) ? "y" : "x";
|
|
34
|
+
}
|
|
35
|
+
function gt(t) {
|
|
36
|
+
return Ft(z(t));
|
|
37
|
+
}
|
|
38
|
+
function Mt(t, e, n) {
|
|
39
|
+
n === void 0 && (n = !1);
|
|
40
|
+
const o = H(t), i = gt(t), s = ht(i);
|
|
41
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
42
|
+
return e.reference[s] > e.floating[s] && (r = rt(r)), [r, rt(r)];
|
|
43
|
+
}
|
|
44
|
+
function qt(t) {
|
|
45
|
+
const e = rt(t);
|
|
46
|
+
return [st(t), e, st(e)];
|
|
47
|
+
}
|
|
48
|
+
function st(t) {
|
|
49
|
+
return t.replace(/start|end/g, (e) => Yt[e]);
|
|
50
|
+
}
|
|
51
|
+
const Rt = ["left", "right"], Ot = ["right", "left"], Ut = ["top", "bottom"], Kt = ["bottom", "top"];
|
|
52
|
+
function Gt(t, e, n) {
|
|
53
|
+
switch (t) {
|
|
54
|
+
case "top":
|
|
55
|
+
case "bottom":
|
|
56
|
+
return n ? e ? Ot : Rt : e ? Rt : Ot;
|
|
57
|
+
case "left":
|
|
58
|
+
case "right":
|
|
59
|
+
return e ? Ut : Kt;
|
|
60
|
+
default:
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function Jt(t, e, n, o) {
|
|
65
|
+
const i = H(t);
|
|
66
|
+
let s = Gt(W(t), n === "start", o);
|
|
67
|
+
return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(st)))), s;
|
|
68
|
+
}
|
|
69
|
+
function rt(t) {
|
|
70
|
+
return t.replace(/left|right|bottom|top/g, (e) => Xt[e]);
|
|
71
|
+
}
|
|
72
|
+
function Qt(t) {
|
|
73
|
+
return {
|
|
74
|
+
top: 0,
|
|
75
|
+
right: 0,
|
|
76
|
+
bottom: 0,
|
|
77
|
+
left: 0,
|
|
78
|
+
...t
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function pt(t) {
|
|
82
|
+
return typeof t != "number" ? Qt(t) : {
|
|
83
|
+
top: t,
|
|
84
|
+
right: t,
|
|
85
|
+
bottom: t,
|
|
86
|
+
left: t
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function J(t) {
|
|
90
|
+
const {
|
|
91
|
+
x: e,
|
|
92
|
+
y: n,
|
|
93
|
+
width: o,
|
|
94
|
+
height: i
|
|
95
|
+
} = t;
|
|
96
|
+
return {
|
|
97
|
+
width: o,
|
|
98
|
+
height: i,
|
|
99
|
+
top: n,
|
|
100
|
+
left: e,
|
|
101
|
+
right: e + o,
|
|
102
|
+
bottom: n + i,
|
|
103
|
+
x: e,
|
|
104
|
+
y: n
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function At(t, e, n) {
|
|
108
|
+
let {
|
|
109
|
+
reference: o,
|
|
110
|
+
floating: i
|
|
111
|
+
} = t;
|
|
112
|
+
const s = z(e), r = gt(e), c = ht(r), a = W(e), f = s === "y", u = o.x + o.width / 2 - i.width / 2, l = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
|
|
113
|
+
let d;
|
|
114
|
+
switch (a) {
|
|
115
|
+
case "top":
|
|
116
|
+
d = {
|
|
117
|
+
x: u,
|
|
118
|
+
y: o.y - i.height
|
|
119
|
+
};
|
|
120
|
+
break;
|
|
121
|
+
case "bottom":
|
|
122
|
+
d = {
|
|
123
|
+
x: u,
|
|
124
|
+
y: o.y + o.height
|
|
125
|
+
};
|
|
126
|
+
break;
|
|
127
|
+
case "right":
|
|
128
|
+
d = {
|
|
129
|
+
x: o.x + o.width,
|
|
130
|
+
y: l
|
|
131
|
+
};
|
|
132
|
+
break;
|
|
133
|
+
case "left":
|
|
134
|
+
d = {
|
|
135
|
+
x: o.x - i.width,
|
|
136
|
+
y: l
|
|
137
|
+
};
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
d = {
|
|
141
|
+
x: o.x,
|
|
142
|
+
y: o.y
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
switch (H(e)) {
|
|
146
|
+
case "start":
|
|
147
|
+
d[r] -= m * (n && f ? -1 : 1);
|
|
148
|
+
break;
|
|
149
|
+
case "end":
|
|
150
|
+
d[r] += m * (n && f ? -1 : 1);
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
return d;
|
|
154
|
+
}
|
|
155
|
+
const Zt = async (t, e, n) => {
|
|
156
|
+
const {
|
|
157
|
+
placement: o = "bottom",
|
|
158
|
+
strategy: i = "absolute",
|
|
159
|
+
middleware: s = [],
|
|
160
|
+
platform: r
|
|
161
|
+
} = n, c = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
162
|
+
let f = await r.getElementRects({
|
|
163
|
+
reference: t,
|
|
164
|
+
floating: e,
|
|
165
|
+
strategy: i
|
|
166
|
+
}), {
|
|
167
|
+
x: u,
|
|
168
|
+
y: l
|
|
169
|
+
} = At(f, o, a), m = o, d = {}, h = 0;
|
|
170
|
+
for (let g = 0; g < c.length; g++) {
|
|
171
|
+
const {
|
|
172
|
+
name: p,
|
|
173
|
+
fn: w
|
|
174
|
+
} = c[g], {
|
|
175
|
+
x,
|
|
176
|
+
y: v,
|
|
177
|
+
data: R,
|
|
178
|
+
reset: b
|
|
179
|
+
} = await w({
|
|
180
|
+
x: u,
|
|
181
|
+
y: l,
|
|
182
|
+
initialPlacement: o,
|
|
183
|
+
placement: m,
|
|
184
|
+
strategy: i,
|
|
185
|
+
middlewareData: d,
|
|
186
|
+
rects: f,
|
|
187
|
+
platform: r,
|
|
188
|
+
elements: {
|
|
189
|
+
reference: t,
|
|
190
|
+
floating: e
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
u = x ?? u, l = v ?? l, d = {
|
|
194
|
+
...d,
|
|
195
|
+
[p]: {
|
|
196
|
+
...d[p],
|
|
197
|
+
...R
|
|
198
|
+
}
|
|
199
|
+
}, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (f = b.rects === !0 ? await r.getElementRects({
|
|
200
|
+
reference: t,
|
|
201
|
+
floating: e,
|
|
202
|
+
strategy: i
|
|
203
|
+
}) : b.rects), {
|
|
204
|
+
x: u,
|
|
205
|
+
y: l
|
|
206
|
+
} = At(f, m, a)), g = -1);
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
x: u,
|
|
210
|
+
y: l,
|
|
211
|
+
placement: m,
|
|
212
|
+
strategy: i,
|
|
213
|
+
middlewareData: d
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
async function Q(t, e) {
|
|
217
|
+
var n;
|
|
218
|
+
e === void 0 && (e = {});
|
|
219
|
+
const {
|
|
220
|
+
x: o,
|
|
221
|
+
y: i,
|
|
222
|
+
platform: s,
|
|
223
|
+
rects: r,
|
|
224
|
+
elements: c,
|
|
225
|
+
strategy: a
|
|
226
|
+
} = t, {
|
|
227
|
+
boundary: f = "clippingAncestors",
|
|
228
|
+
rootBoundary: u = "viewport",
|
|
229
|
+
elementContext: l = "floating",
|
|
230
|
+
altBoundary: m = !1,
|
|
231
|
+
padding: d = 0
|
|
232
|
+
} = j(e, t), h = pt(d), p = c[m ? l === "floating" ? "reference" : "floating" : l], w = J(await s.getClippingRect({
|
|
233
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
234
|
+
boundary: f,
|
|
235
|
+
rootBoundary: u,
|
|
236
|
+
strategy: a
|
|
237
|
+
})), x = l === "floating" ? {
|
|
238
|
+
x: o,
|
|
239
|
+
y: i,
|
|
240
|
+
width: r.floating.width,
|
|
241
|
+
height: r.floating.height
|
|
242
|
+
} : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), R = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
|
|
243
|
+
x: 1,
|
|
244
|
+
y: 1
|
|
245
|
+
} : {
|
|
246
|
+
x: 1,
|
|
247
|
+
y: 1
|
|
248
|
+
}, b = J(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
249
|
+
elements: c,
|
|
250
|
+
rect: x,
|
|
251
|
+
offsetParent: v,
|
|
252
|
+
strategy: a
|
|
253
|
+
}) : x);
|
|
254
|
+
return {
|
|
255
|
+
top: (w.top - b.top + h.top) / R.y,
|
|
256
|
+
bottom: (b.bottom - w.bottom + h.bottom) / R.y,
|
|
257
|
+
left: (w.left - b.left + h.left) / R.x,
|
|
258
|
+
right: (b.right - w.right + h.right) / R.x
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const te = (t) => ({
|
|
262
|
+
name: "arrow",
|
|
263
|
+
options: t,
|
|
264
|
+
async fn(e) {
|
|
265
|
+
const {
|
|
266
|
+
x: n,
|
|
267
|
+
y: o,
|
|
268
|
+
placement: i,
|
|
269
|
+
rects: s,
|
|
270
|
+
platform: r,
|
|
271
|
+
elements: c,
|
|
272
|
+
middlewareData: a
|
|
273
|
+
} = e, {
|
|
274
|
+
element: f,
|
|
275
|
+
padding: u = 0
|
|
276
|
+
} = j(t, e) || {};
|
|
277
|
+
if (f == null)
|
|
278
|
+
return {};
|
|
279
|
+
const l = pt(u), m = {
|
|
280
|
+
x: n,
|
|
281
|
+
y: o
|
|
282
|
+
}, d = gt(i), h = ht(d), g = await r.getDimensions(f), p = d === "y", w = p ? "top" : "left", x = p ? "bottom" : "right", v = p ? "clientHeight" : "clientWidth", R = s.reference[h] + s.reference[d] - m[d] - s.floating[h], b = m[d] - s.reference[d], A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(f));
|
|
283
|
+
let O = A ? A[v] : 0;
|
|
284
|
+
(!O || !await (r.isElement == null ? void 0 : r.isElement(A))) && (O = c.floating[v] || s.floating[h]);
|
|
285
|
+
const B = R / 2 - b / 2, T = O / 2 - g[h] / 2 - 1, y = N(l[w], T), S = N(l[x], T), P = y, E = O - g[h] - S, C = O / 2 - g[h] / 2 + B, $ = dt(P, C, E), k = !a.arrow && H(i) != null && C !== $ && s.reference[h] / 2 - (C < P ? y : S) - g[h] / 2 < 0, D = k ? C < P ? C - P : C - E : 0;
|
|
286
|
+
return {
|
|
287
|
+
[d]: m[d] + D,
|
|
288
|
+
data: {
|
|
289
|
+
[d]: $,
|
|
290
|
+
centerOffset: C - $ - D,
|
|
291
|
+
...k && {
|
|
292
|
+
alignmentOffset: D
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
reset: k
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
function ee(t, e, n) {
|
|
300
|
+
return (t ? [...n.filter((i) => H(i) === t), ...n.filter((i) => H(i) !== t)] : n.filter((i) => W(i) === i)).filter((i) => t ? H(i) === t || (e ? st(i) !== i : !1) : !0);
|
|
301
|
+
}
|
|
302
|
+
const ne = function(t) {
|
|
303
|
+
return t === void 0 && (t = {}), {
|
|
304
|
+
name: "autoPlacement",
|
|
305
|
+
options: t,
|
|
306
|
+
async fn(e) {
|
|
307
|
+
var n, o, i;
|
|
308
|
+
const {
|
|
309
|
+
rects: s,
|
|
310
|
+
middlewareData: r,
|
|
311
|
+
placement: c,
|
|
312
|
+
platform: a,
|
|
313
|
+
elements: f
|
|
314
|
+
} = e, {
|
|
315
|
+
crossAxis: u = !1,
|
|
316
|
+
alignment: l,
|
|
317
|
+
allowedPlacements: m = bt,
|
|
318
|
+
autoAlignment: d = !0,
|
|
319
|
+
...h
|
|
320
|
+
} = j(t, e), g = l !== void 0 || m === bt ? ee(l || null, d, m) : m, p = await Q(e, h), w = ((n = r.autoPlacement) == null ? void 0 : n.index) || 0, x = g[w];
|
|
321
|
+
if (x == null)
|
|
322
|
+
return {};
|
|
323
|
+
const v = Mt(x, s, await (a.isRTL == null ? void 0 : a.isRTL(f.floating)));
|
|
324
|
+
if (c !== x)
|
|
325
|
+
return {
|
|
326
|
+
reset: {
|
|
327
|
+
placement: g[0]
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const R = [p[W(x)], p[v[0]], p[v[1]]], b = [...((o = r.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
331
|
+
placement: x,
|
|
332
|
+
overflows: R
|
|
333
|
+
}], A = g[w + 1];
|
|
334
|
+
if (A)
|
|
335
|
+
return {
|
|
336
|
+
data: {
|
|
337
|
+
index: w + 1,
|
|
338
|
+
overflows: b
|
|
339
|
+
},
|
|
340
|
+
reset: {
|
|
341
|
+
placement: A
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const O = b.map((y) => {
|
|
345
|
+
const S = H(y.placement);
|
|
346
|
+
return [y.placement, S && u ? (
|
|
347
|
+
// Check along the mainAxis and main crossAxis side.
|
|
348
|
+
y.overflows.slice(0, 2).reduce((P, E) => P + E, 0)
|
|
349
|
+
) : (
|
|
350
|
+
// Check only the mainAxis.
|
|
351
|
+
y.overflows[0]
|
|
352
|
+
), y.overflows];
|
|
353
|
+
}).sort((y, S) => y[1] - S[1]), T = ((i = O.filter((y) => y[2].slice(
|
|
354
|
+
0,
|
|
355
|
+
// Aligned placements should not check their opposite crossAxis
|
|
356
|
+
// side.
|
|
357
|
+
H(y[0]) ? 2 : 3
|
|
358
|
+
).every((S) => S <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
|
|
359
|
+
return T !== c ? {
|
|
360
|
+
data: {
|
|
361
|
+
index: w + 1,
|
|
362
|
+
overflows: b
|
|
363
|
+
},
|
|
364
|
+
reset: {
|
|
365
|
+
placement: T
|
|
366
|
+
}
|
|
367
|
+
} : {};
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
}, oe = function(t) {
|
|
371
|
+
return t === void 0 && (t = {}), {
|
|
372
|
+
name: "flip",
|
|
373
|
+
options: t,
|
|
374
|
+
async fn(e) {
|
|
375
|
+
var n, o;
|
|
376
|
+
const {
|
|
377
|
+
placement: i,
|
|
378
|
+
middlewareData: s,
|
|
379
|
+
rects: r,
|
|
380
|
+
initialPlacement: c,
|
|
381
|
+
platform: a,
|
|
382
|
+
elements: f
|
|
383
|
+
} = e, {
|
|
384
|
+
mainAxis: u = !0,
|
|
385
|
+
crossAxis: l = !0,
|
|
386
|
+
fallbackPlacements: m,
|
|
387
|
+
fallbackStrategy: d = "bestFit",
|
|
388
|
+
fallbackAxisSideDirection: h = "none",
|
|
389
|
+
flipAlignment: g = !0,
|
|
390
|
+
...p
|
|
391
|
+
} = j(t, e);
|
|
392
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
393
|
+
return {};
|
|
394
|
+
const w = W(i), x = z(c), v = W(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), b = m || (v || !g ? [rt(c)] : qt(c)), A = h !== "none";
|
|
395
|
+
!m && A && b.push(...Jt(c, g, h, R));
|
|
396
|
+
const O = [c, ...b], B = await Q(e, p), T = [];
|
|
397
|
+
let y = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
398
|
+
if (u && T.push(B[w]), l) {
|
|
399
|
+
const C = Mt(i, r, R);
|
|
400
|
+
T.push(B[C[0]], B[C[1]]);
|
|
401
|
+
}
|
|
402
|
+
if (y = [...y, {
|
|
403
|
+
placement: i,
|
|
404
|
+
overflows: T
|
|
405
|
+
}], !T.every((C) => C <= 0)) {
|
|
406
|
+
var S, P;
|
|
407
|
+
const C = (((S = s.flip) == null ? void 0 : S.index) || 0) + 1, $ = O[C];
|
|
408
|
+
if ($ && (!(l === "alignment" ? x !== z($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
409
|
+
// overflows the main axis.
|
|
410
|
+
y.every((F) => z(F.placement) === x ? F.overflows[0] > 0 : !0)))
|
|
411
|
+
return {
|
|
412
|
+
data: {
|
|
413
|
+
index: C,
|
|
414
|
+
overflows: y
|
|
415
|
+
},
|
|
416
|
+
reset: {
|
|
417
|
+
placement: $
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
let k = (P = y.filter((D) => D.overflows[0] <= 0).sort((D, F) => D.overflows[1] - F.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
421
|
+
if (!k)
|
|
422
|
+
switch (d) {
|
|
423
|
+
case "bestFit": {
|
|
424
|
+
var E;
|
|
425
|
+
const D = (E = y.filter((F) => {
|
|
426
|
+
if (A) {
|
|
427
|
+
const q = z(F.placement);
|
|
428
|
+
return q === x || // Create a bias to the `y` side axis due to horizontal
|
|
429
|
+
// reading directions favoring greater width.
|
|
430
|
+
q === "y";
|
|
431
|
+
}
|
|
432
|
+
return !0;
|
|
433
|
+
}).map((F) => [F.placement, F.overflows.filter((q) => q > 0).reduce((q, It) => q + It, 0)]).sort((F, q) => F[1] - q[1])[0]) == null ? void 0 : E[0];
|
|
434
|
+
D && (k = D);
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
case "initialPlacement":
|
|
438
|
+
k = c;
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
if (i !== k)
|
|
442
|
+
return {
|
|
443
|
+
reset: {
|
|
444
|
+
placement: k
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
return {};
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
function St(t, e) {
|
|
453
|
+
return {
|
|
454
|
+
top: t.top - e.height,
|
|
455
|
+
right: t.right - e.width,
|
|
456
|
+
bottom: t.bottom - e.height,
|
|
457
|
+
left: t.left - e.width
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
function Ct(t) {
|
|
461
|
+
return Dt.some((e) => t[e] >= 0);
|
|
462
|
+
}
|
|
463
|
+
const ie = function(t) {
|
|
464
|
+
return t === void 0 && (t = {}), {
|
|
465
|
+
name: "hide",
|
|
466
|
+
options: t,
|
|
467
|
+
async fn(e) {
|
|
468
|
+
const {
|
|
469
|
+
rects: n
|
|
470
|
+
} = e, {
|
|
471
|
+
strategy: o = "referenceHidden",
|
|
472
|
+
...i
|
|
473
|
+
} = j(t, e);
|
|
474
|
+
switch (o) {
|
|
475
|
+
case "referenceHidden": {
|
|
476
|
+
const s = await Q(e, {
|
|
477
|
+
...i,
|
|
478
|
+
elementContext: "reference"
|
|
479
|
+
}), r = St(s, n.reference);
|
|
480
|
+
return {
|
|
481
|
+
data: {
|
|
482
|
+
referenceHiddenOffsets: r,
|
|
483
|
+
referenceHidden: Ct(r)
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
case "escaped": {
|
|
488
|
+
const s = await Q(e, {
|
|
489
|
+
...i,
|
|
490
|
+
altBoundary: !0
|
|
491
|
+
}), r = St(s, n.floating);
|
|
492
|
+
return {
|
|
493
|
+
data: {
|
|
494
|
+
escapedOffsets: r,
|
|
495
|
+
escaped: Ct(r)
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
default:
|
|
500
|
+
return {};
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
function Bt(t) {
|
|
506
|
+
const e = N(...t.map((s) => s.left)), n = N(...t.map((s) => s.top)), o = L(...t.map((s) => s.right)), i = L(...t.map((s) => s.bottom));
|
|
507
|
+
return {
|
|
508
|
+
x: e,
|
|
509
|
+
y: n,
|
|
510
|
+
width: o - e,
|
|
511
|
+
height: i - n
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
function se(t) {
|
|
515
|
+
const e = t.slice().sort((i, s) => i.y - s.y), n = [];
|
|
516
|
+
let o = null;
|
|
517
|
+
for (let i = 0; i < e.length; i++) {
|
|
518
|
+
const s = e[i];
|
|
519
|
+
!o || s.y - o.y > o.height / 2 ? n.push([s]) : n[n.length - 1].push(s), o = s;
|
|
520
|
+
}
|
|
521
|
+
return n.map((i) => J(Bt(i)));
|
|
522
|
+
}
|
|
523
|
+
const re = function(t) {
|
|
524
|
+
return t === void 0 && (t = {}), {
|
|
525
|
+
name: "inline",
|
|
526
|
+
options: t,
|
|
527
|
+
async fn(e) {
|
|
528
|
+
const {
|
|
529
|
+
placement: n,
|
|
530
|
+
elements: o,
|
|
531
|
+
rects: i,
|
|
532
|
+
platform: s,
|
|
533
|
+
strategy: r
|
|
534
|
+
} = e, {
|
|
535
|
+
padding: c = 2,
|
|
536
|
+
x: a,
|
|
537
|
+
y: f
|
|
538
|
+
} = j(t, e), u = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(o.reference)) || []), l = se(u), m = J(Bt(u)), d = pt(c);
|
|
539
|
+
function h() {
|
|
540
|
+
if (l.length === 2 && l[0].left > l[1].right && a != null && f != null)
|
|
541
|
+
return l.find((p) => a > p.left - d.left && a < p.right + d.right && f > p.top - d.top && f < p.bottom + d.bottom) || m;
|
|
542
|
+
if (l.length >= 2) {
|
|
543
|
+
if (z(n) === "y") {
|
|
544
|
+
const y = l[0], S = l[l.length - 1], P = W(n) === "top", E = y.top, C = S.bottom, $ = P ? y.left : S.left, k = P ? y.right : S.right, D = k - $, F = C - E;
|
|
545
|
+
return {
|
|
546
|
+
top: E,
|
|
547
|
+
bottom: C,
|
|
548
|
+
left: $,
|
|
549
|
+
right: k,
|
|
550
|
+
width: D,
|
|
551
|
+
height: F,
|
|
552
|
+
x: $,
|
|
553
|
+
y: E
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
const p = W(n) === "left", w = L(...l.map((y) => y.right)), x = N(...l.map((y) => y.left)), v = l.filter((y) => p ? y.left === x : y.right === w), R = v[0].top, b = v[v.length - 1].bottom, A = x, O = w, B = O - A, T = b - R;
|
|
557
|
+
return {
|
|
558
|
+
top: R,
|
|
559
|
+
bottom: b,
|
|
560
|
+
left: A,
|
|
561
|
+
right: O,
|
|
562
|
+
width: B,
|
|
563
|
+
height: T,
|
|
564
|
+
x: A,
|
|
565
|
+
y: R
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
return m;
|
|
569
|
+
}
|
|
570
|
+
const g = await s.getElementRects({
|
|
571
|
+
reference: {
|
|
572
|
+
getBoundingClientRect: h
|
|
573
|
+
},
|
|
574
|
+
floating: o.floating,
|
|
575
|
+
strategy: r
|
|
576
|
+
});
|
|
577
|
+
return i.reference.x !== g.reference.x || i.reference.y !== g.reference.y || i.reference.width !== g.reference.width || i.reference.height !== g.reference.height ? {
|
|
578
|
+
reset: {
|
|
579
|
+
rects: g
|
|
580
|
+
}
|
|
581
|
+
} : {};
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
}, ce = /* @__PURE__ */ new Set(["left", "top"]);
|
|
585
|
+
async function le(t, e) {
|
|
586
|
+
const {
|
|
587
|
+
placement: n,
|
|
588
|
+
platform: o,
|
|
589
|
+
elements: i
|
|
590
|
+
} = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = W(n), c = H(n), a = z(n) === "y", f = ce.has(r) ? -1 : 1, u = s && a ? -1 : 1, l = j(e, t);
|
|
591
|
+
let {
|
|
592
|
+
mainAxis: m,
|
|
593
|
+
crossAxis: d,
|
|
594
|
+
alignmentAxis: h
|
|
595
|
+
} = typeof l == "number" ? {
|
|
596
|
+
mainAxis: l,
|
|
597
|
+
crossAxis: 0,
|
|
598
|
+
alignmentAxis: null
|
|
599
|
+
} : {
|
|
600
|
+
mainAxis: l.mainAxis || 0,
|
|
601
|
+
crossAxis: l.crossAxis || 0,
|
|
602
|
+
alignmentAxis: l.alignmentAxis
|
|
603
|
+
};
|
|
604
|
+
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
|
|
605
|
+
x: d * u,
|
|
606
|
+
y: m * f
|
|
607
|
+
} : {
|
|
608
|
+
x: m * f,
|
|
609
|
+
y: d * u
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
const ae = function(t) {
|
|
613
|
+
return t === void 0 && (t = 0), {
|
|
614
|
+
name: "offset",
|
|
615
|
+
options: t,
|
|
616
|
+
async fn(e) {
|
|
617
|
+
var n, o;
|
|
618
|
+
const {
|
|
619
|
+
x: i,
|
|
620
|
+
y: s,
|
|
621
|
+
placement: r,
|
|
622
|
+
middlewareData: c
|
|
623
|
+
} = e, a = await le(e, t);
|
|
624
|
+
return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
625
|
+
x: i + a.x,
|
|
626
|
+
y: s + a.y,
|
|
627
|
+
data: {
|
|
628
|
+
...a,
|
|
629
|
+
placement: r
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
}, fe = function(t) {
|
|
635
|
+
return t === void 0 && (t = {}), {
|
|
636
|
+
name: "shift",
|
|
637
|
+
options: t,
|
|
638
|
+
async fn(e) {
|
|
639
|
+
const {
|
|
640
|
+
x: n,
|
|
641
|
+
y: o,
|
|
642
|
+
placement: i
|
|
643
|
+
} = e, {
|
|
644
|
+
mainAxis: s = !0,
|
|
645
|
+
crossAxis: r = !1,
|
|
646
|
+
limiter: c = {
|
|
647
|
+
fn: (p) => {
|
|
648
|
+
let {
|
|
649
|
+
x: w,
|
|
650
|
+
y: x
|
|
651
|
+
} = p;
|
|
652
|
+
return {
|
|
653
|
+
x: w,
|
|
654
|
+
y: x
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
...a
|
|
659
|
+
} = j(t, e), f = {
|
|
660
|
+
x: n,
|
|
661
|
+
y: o
|
|
662
|
+
}, u = await Q(e, a), l = z(W(i)), m = Ft(l);
|
|
663
|
+
let d = f[m], h = f[l];
|
|
664
|
+
if (s) {
|
|
665
|
+
const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = d + u[p], v = d - u[w];
|
|
666
|
+
d = dt(x, d, v);
|
|
667
|
+
}
|
|
668
|
+
if (r) {
|
|
669
|
+
const p = l === "y" ? "top" : "left", w = l === "y" ? "bottom" : "right", x = h + u[p], v = h - u[w];
|
|
670
|
+
h = dt(x, h, v);
|
|
671
|
+
}
|
|
672
|
+
const g = c.fn({
|
|
673
|
+
...e,
|
|
674
|
+
[m]: d,
|
|
675
|
+
[l]: h
|
|
676
|
+
});
|
|
677
|
+
return {
|
|
678
|
+
...g,
|
|
679
|
+
data: {
|
|
680
|
+
x: g.x - n,
|
|
681
|
+
y: g.y - o,
|
|
682
|
+
enabled: {
|
|
683
|
+
[m]: s,
|
|
684
|
+
[l]: r
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
}, ue = function(t) {
|
|
691
|
+
return t === void 0 && (t = {}), {
|
|
692
|
+
name: "size",
|
|
693
|
+
options: t,
|
|
694
|
+
async fn(e) {
|
|
695
|
+
var n, o;
|
|
696
|
+
const {
|
|
697
|
+
placement: i,
|
|
698
|
+
rects: s,
|
|
699
|
+
platform: r,
|
|
700
|
+
elements: c
|
|
701
|
+
} = e, {
|
|
702
|
+
apply: a = () => {
|
|
703
|
+
},
|
|
704
|
+
...f
|
|
705
|
+
} = j(t, e), u = await Q(e, f), l = W(i), m = H(i), d = z(i) === "y", {
|
|
706
|
+
width: h,
|
|
707
|
+
height: g
|
|
708
|
+
} = s.floating;
|
|
709
|
+
let p, w;
|
|
710
|
+
l === "top" || l === "bottom" ? (p = l, w = m === (await (r.isRTL == null ? void 0 : r.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = l, p = m === "end" ? "top" : "bottom");
|
|
711
|
+
const x = g - u.top - u.bottom, v = h - u.left - u.right, R = N(g - u[p], x), b = N(h - u[w], v), A = !e.middlewareData.shift;
|
|
712
|
+
let O = R, B = b;
|
|
713
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (B = v), (o = e.middlewareData.shift) != null && o.enabled.y && (O = x), A && !m) {
|
|
714
|
+
const y = L(u.left, 0), S = L(u.right, 0), P = L(u.top, 0), E = L(u.bottom, 0);
|
|
715
|
+
d ? B = h - 2 * (y !== 0 || S !== 0 ? y + S : L(u.left, u.right)) : O = g - 2 * (P !== 0 || E !== 0 ? P + E : L(u.top, u.bottom));
|
|
716
|
+
}
|
|
717
|
+
await a({
|
|
718
|
+
...e,
|
|
719
|
+
availableWidth: B,
|
|
720
|
+
availableHeight: O
|
|
721
|
+
});
|
|
722
|
+
const T = await r.getDimensions(c.floating);
|
|
723
|
+
return h !== T.width || g !== T.height ? {
|
|
724
|
+
reset: {
|
|
725
|
+
rects: !0
|
|
726
|
+
}
|
|
727
|
+
} : {};
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
function ct() {
|
|
732
|
+
return typeof window < "u";
|
|
733
|
+
}
|
|
734
|
+
function tt(t) {
|
|
735
|
+
return kt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
736
|
+
}
|
|
737
|
+
function M(t) {
|
|
738
|
+
var e;
|
|
739
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
740
|
+
}
|
|
741
|
+
function Y(t) {
|
|
742
|
+
var e;
|
|
743
|
+
return (e = (kt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
744
|
+
}
|
|
745
|
+
function kt(t) {
|
|
746
|
+
return ct() ? t instanceof Node || t instanceof M(t).Node : !1;
|
|
747
|
+
}
|
|
748
|
+
function V(t) {
|
|
749
|
+
return ct() ? t instanceof Element || t instanceof M(t).Element : !1;
|
|
750
|
+
}
|
|
751
|
+
function X(t) {
|
|
752
|
+
return ct() ? t instanceof HTMLElement || t instanceof M(t).HTMLElement : !1;
|
|
753
|
+
}
|
|
754
|
+
function Lt(t) {
|
|
755
|
+
return !ct() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof M(t).ShadowRoot;
|
|
756
|
+
}
|
|
757
|
+
const de = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
758
|
+
function nt(t) {
|
|
759
|
+
const {
|
|
760
|
+
overflow: e,
|
|
761
|
+
overflowX: n,
|
|
762
|
+
overflowY: o,
|
|
763
|
+
display: i
|
|
764
|
+
} = _(t);
|
|
765
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !de.has(i);
|
|
766
|
+
}
|
|
767
|
+
const me = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
768
|
+
function he(t) {
|
|
769
|
+
return me.has(tt(t));
|
|
770
|
+
}
|
|
771
|
+
const ge = [":popover-open", ":modal"];
|
|
772
|
+
function lt(t) {
|
|
773
|
+
return ge.some((e) => {
|
|
774
|
+
try {
|
|
775
|
+
return t.matches(e);
|
|
776
|
+
} catch {
|
|
777
|
+
return !1;
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
const pe = ["transform", "translate", "scale", "rotate", "perspective"], we = ["transform", "translate", "scale", "rotate", "perspective", "filter"], xe = ["paint", "layout", "strict", "content"];
|
|
782
|
+
function wt(t) {
|
|
783
|
+
const e = xt(), n = V(t) ? _(t) : t;
|
|
784
|
+
return pe.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || we.some((o) => (n.willChange || "").includes(o)) || xe.some((o) => (n.contain || "").includes(o));
|
|
785
|
+
}
|
|
786
|
+
function ye(t) {
|
|
787
|
+
let e = U(t);
|
|
788
|
+
for (; X(e) && !Z(e); ) {
|
|
789
|
+
if (wt(e))
|
|
790
|
+
return e;
|
|
791
|
+
if (lt(e))
|
|
792
|
+
return null;
|
|
793
|
+
e = U(e);
|
|
794
|
+
}
|
|
795
|
+
return null;
|
|
796
|
+
}
|
|
797
|
+
function xt() {
|
|
798
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
799
|
+
}
|
|
800
|
+
const ve = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
801
|
+
function Z(t) {
|
|
802
|
+
return ve.has(tt(t));
|
|
803
|
+
}
|
|
804
|
+
function _(t) {
|
|
805
|
+
return M(t).getComputedStyle(t);
|
|
806
|
+
}
|
|
807
|
+
function at(t) {
|
|
808
|
+
return V(t) ? {
|
|
809
|
+
scrollLeft: t.scrollLeft,
|
|
810
|
+
scrollTop: t.scrollTop
|
|
811
|
+
} : {
|
|
812
|
+
scrollLeft: t.scrollX,
|
|
813
|
+
scrollTop: t.scrollY
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
function U(t) {
|
|
817
|
+
if (tt(t) === "html")
|
|
818
|
+
return t;
|
|
819
|
+
const e = (
|
|
820
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
821
|
+
t.assignedSlot || // DOM Element detected.
|
|
822
|
+
t.parentNode || // ShadowRoot detected.
|
|
823
|
+
Lt(t) && t.host || // Fallback.
|
|
824
|
+
Y(t)
|
|
825
|
+
);
|
|
826
|
+
return Lt(e) ? e.host : e;
|
|
827
|
+
}
|
|
828
|
+
function Wt(t) {
|
|
829
|
+
const e = U(t);
|
|
830
|
+
return Z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : X(e) && nt(e) ? e : Wt(e);
|
|
831
|
+
}
|
|
832
|
+
function et(t, e, n) {
|
|
833
|
+
var o;
|
|
834
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
835
|
+
const i = Wt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = M(i);
|
|
836
|
+
if (s) {
|
|
837
|
+
const c = mt(r);
|
|
838
|
+
return e.concat(r, r.visualViewport || [], nt(i) ? i : [], c && n ? et(c) : []);
|
|
839
|
+
}
|
|
840
|
+
return e.concat(i, et(i, [], n));
|
|
841
|
+
}
|
|
842
|
+
function mt(t) {
|
|
843
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
844
|
+
}
|
|
845
|
+
function $t(t) {
|
|
846
|
+
const e = _(t);
|
|
847
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
848
|
+
const i = X(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = it(n) !== s || it(o) !== r;
|
|
849
|
+
return c && (n = s, o = r), {
|
|
850
|
+
width: n,
|
|
851
|
+
height: o,
|
|
852
|
+
$: c
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
function yt(t) {
|
|
856
|
+
return V(t) ? t : t.contextElement;
|
|
857
|
+
}
|
|
858
|
+
function G(t) {
|
|
859
|
+
const e = yt(t);
|
|
860
|
+
if (!X(e))
|
|
861
|
+
return I(1);
|
|
862
|
+
const n = e.getBoundingClientRect(), {
|
|
863
|
+
width: o,
|
|
864
|
+
height: i,
|
|
865
|
+
$: s
|
|
866
|
+
} = $t(e);
|
|
867
|
+
let r = (s ? it(n.width) : n.width) / o, c = (s ? it(n.height) : n.height) / i;
|
|
868
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
869
|
+
x: r,
|
|
870
|
+
y: c
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
const be = /* @__PURE__ */ I(0);
|
|
874
|
+
function Ht(t) {
|
|
875
|
+
const e = M(t);
|
|
876
|
+
return !xt() || !e.visualViewport ? be : {
|
|
877
|
+
x: e.visualViewport.offsetLeft,
|
|
878
|
+
y: e.visualViewport.offsetTop
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
function Re(t, e, n) {
|
|
882
|
+
return e === void 0 && (e = !1), !n || e && n !== M(t) ? !1 : e;
|
|
883
|
+
}
|
|
884
|
+
function K(t, e, n, o) {
|
|
885
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
886
|
+
const i = t.getBoundingClientRect(), s = yt(t);
|
|
887
|
+
let r = I(1);
|
|
888
|
+
e && (o ? V(o) && (r = G(o)) : r = G(t));
|
|
889
|
+
const c = Re(s, n, o) ? Ht(s) : I(0);
|
|
890
|
+
let a = (i.left + c.x) / r.x, f = (i.top + c.y) / r.y, u = i.width / r.x, l = i.height / r.y;
|
|
891
|
+
if (s) {
|
|
892
|
+
const m = M(s), d = o && V(o) ? M(o) : o;
|
|
893
|
+
let h = m, g = mt(h);
|
|
894
|
+
for (; g && o && d !== h; ) {
|
|
895
|
+
const p = G(g), w = g.getBoundingClientRect(), x = _(g), v = w.left + (g.clientLeft + parseFloat(x.paddingLeft)) * p.x, R = w.top + (g.clientTop + parseFloat(x.paddingTop)) * p.y;
|
|
896
|
+
a *= p.x, f *= p.y, u *= p.x, l *= p.y, a += v, f += R, h = M(g), g = mt(h);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
return J({
|
|
900
|
+
width: u,
|
|
901
|
+
height: l,
|
|
902
|
+
x: a,
|
|
903
|
+
y: f
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
function ft(t, e) {
|
|
907
|
+
const n = at(t).scrollLeft;
|
|
908
|
+
return e ? e.left + n : K(Y(t)).left + n;
|
|
909
|
+
}
|
|
910
|
+
function Nt(t, e) {
|
|
911
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ft(t, n), i = n.top + e.scrollTop;
|
|
912
|
+
return {
|
|
913
|
+
x: o,
|
|
914
|
+
y: i
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function Oe(t) {
|
|
918
|
+
let {
|
|
919
|
+
elements: e,
|
|
920
|
+
rect: n,
|
|
921
|
+
offsetParent: o,
|
|
922
|
+
strategy: i
|
|
923
|
+
} = t;
|
|
924
|
+
const s = i === "fixed", r = Y(o), c = e ? lt(e.floating) : !1;
|
|
925
|
+
if (o === r || c && s)
|
|
926
|
+
return n;
|
|
927
|
+
let a = {
|
|
928
|
+
scrollLeft: 0,
|
|
929
|
+
scrollTop: 0
|
|
930
|
+
}, f = I(1);
|
|
931
|
+
const u = I(0), l = X(o);
|
|
932
|
+
if ((l || !l && !s) && ((tt(o) !== "body" || nt(r)) && (a = at(o)), X(o))) {
|
|
933
|
+
const d = K(o);
|
|
934
|
+
f = G(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
935
|
+
}
|
|
936
|
+
const m = r && !l && !s ? Nt(r, a) : I(0);
|
|
937
|
+
return {
|
|
938
|
+
width: n.width * f.x,
|
|
939
|
+
height: n.height * f.y,
|
|
940
|
+
x: n.x * f.x - a.scrollLeft * f.x + u.x + m.x,
|
|
941
|
+
y: n.y * f.y - a.scrollTop * f.y + u.y + m.y
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function Ae(t) {
|
|
945
|
+
return Array.from(t.getClientRects());
|
|
946
|
+
}
|
|
947
|
+
function Se(t) {
|
|
948
|
+
const e = Y(t), n = at(t), o = t.ownerDocument.body, i = L(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = L(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
949
|
+
let r = -n.scrollLeft + ft(t);
|
|
950
|
+
const c = -n.scrollTop;
|
|
951
|
+
return _(o).direction === "rtl" && (r += L(e.clientWidth, o.clientWidth) - i), {
|
|
952
|
+
width: i,
|
|
953
|
+
height: s,
|
|
954
|
+
x: r,
|
|
955
|
+
y: c
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
const Tt = 25;
|
|
959
|
+
function Ce(t, e) {
|
|
960
|
+
const n = M(t), o = Y(t), i = n.visualViewport;
|
|
961
|
+
let s = o.clientWidth, r = o.clientHeight, c = 0, a = 0;
|
|
962
|
+
if (i) {
|
|
963
|
+
s = i.width, r = i.height;
|
|
964
|
+
const u = xt();
|
|
965
|
+
(!u || u && e === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
|
|
966
|
+
}
|
|
967
|
+
const f = ft(o);
|
|
968
|
+
if (f <= 0) {
|
|
969
|
+
const u = o.ownerDocument, l = u.body, m = getComputedStyle(l), d = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(o.clientWidth - l.clientWidth - d);
|
|
970
|
+
h <= Tt && (s -= h);
|
|
971
|
+
} else f <= Tt && (s += f);
|
|
972
|
+
return {
|
|
973
|
+
width: s,
|
|
974
|
+
height: r,
|
|
975
|
+
x: c,
|
|
976
|
+
y: a
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
const Le = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
980
|
+
function Te(t, e) {
|
|
981
|
+
const n = K(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = X(t) ? G(t) : I(1), r = t.clientWidth * s.x, c = t.clientHeight * s.y, a = i * s.x, f = o * s.y;
|
|
982
|
+
return {
|
|
983
|
+
width: r,
|
|
984
|
+
height: c,
|
|
985
|
+
x: a,
|
|
986
|
+
y: f
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
function Pt(t, e, n) {
|
|
990
|
+
let o;
|
|
991
|
+
if (e === "viewport")
|
|
992
|
+
o = Ce(t, n);
|
|
993
|
+
else if (e === "document")
|
|
994
|
+
o = Se(Y(t));
|
|
995
|
+
else if (V(e))
|
|
996
|
+
o = Te(e, n);
|
|
997
|
+
else {
|
|
998
|
+
const i = Ht(t);
|
|
999
|
+
o = {
|
|
1000
|
+
x: e.x - i.x,
|
|
1001
|
+
y: e.y - i.y,
|
|
1002
|
+
width: e.width,
|
|
1003
|
+
height: e.height
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
return J(o);
|
|
1007
|
+
}
|
|
1008
|
+
function Vt(t, e) {
|
|
1009
|
+
const n = U(t);
|
|
1010
|
+
return n === e || !V(n) || Z(n) ? !1 : _(n).position === "fixed" || Vt(n, e);
|
|
1011
|
+
}
|
|
1012
|
+
function Pe(t, e) {
|
|
1013
|
+
const n = e.get(t);
|
|
1014
|
+
if (n)
|
|
1015
|
+
return n;
|
|
1016
|
+
let o = et(t, [], !1).filter((c) => V(c) && tt(c) !== "body"), i = null;
|
|
1017
|
+
const s = _(t).position === "fixed";
|
|
1018
|
+
let r = s ? U(t) : t;
|
|
1019
|
+
for (; V(r) && !Z(r); ) {
|
|
1020
|
+
const c = _(r), a = wt(r);
|
|
1021
|
+
!a && c.position === "fixed" && (i = null), (s ? !a && !i : !a && c.position === "static" && !!i && Le.has(i.position) || nt(r) && !a && Vt(t, r)) ? o = o.filter((u) => u !== r) : i = c, r = U(r);
|
|
1022
|
+
}
|
|
1023
|
+
return e.set(t, o), o;
|
|
1024
|
+
}
|
|
1025
|
+
function Ee(t) {
|
|
1026
|
+
let {
|
|
1027
|
+
element: e,
|
|
1028
|
+
boundary: n,
|
|
1029
|
+
rootBoundary: o,
|
|
1030
|
+
strategy: i
|
|
1031
|
+
} = t;
|
|
1032
|
+
const r = [...n === "clippingAncestors" ? lt(e) ? [] : Pe(e, this._c) : [].concat(n), o], c = r[0], a = r.reduce((f, u) => {
|
|
1033
|
+
const l = Pt(e, u, i);
|
|
1034
|
+
return f.top = L(l.top, f.top), f.right = N(l.right, f.right), f.bottom = N(l.bottom, f.bottom), f.left = L(l.left, f.left), f;
|
|
1035
|
+
}, Pt(e, c, i));
|
|
1036
|
+
return {
|
|
1037
|
+
width: a.right - a.left,
|
|
1038
|
+
height: a.bottom - a.top,
|
|
1039
|
+
x: a.left,
|
|
1040
|
+
y: a.top
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
function De(t) {
|
|
1044
|
+
const {
|
|
1045
|
+
width: e,
|
|
1046
|
+
height: n
|
|
1047
|
+
} = $t(t);
|
|
1048
|
+
return {
|
|
1049
|
+
width: e,
|
|
1050
|
+
height: n
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
function Fe(t, e, n) {
|
|
1054
|
+
const o = X(e), i = Y(e), s = n === "fixed", r = K(t, !0, s, e);
|
|
1055
|
+
let c = {
|
|
1056
|
+
scrollLeft: 0,
|
|
1057
|
+
scrollTop: 0
|
|
1058
|
+
};
|
|
1059
|
+
const a = I(0);
|
|
1060
|
+
function f() {
|
|
1061
|
+
a.x = ft(i);
|
|
1062
|
+
}
|
|
1063
|
+
if (o || !o && !s)
|
|
1064
|
+
if ((tt(e) !== "body" || nt(i)) && (c = at(e)), o) {
|
|
1065
|
+
const d = K(e, !0, s, e);
|
|
1066
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
1067
|
+
} else i && f();
|
|
1068
|
+
s && !o && i && f();
|
|
1069
|
+
const u = i && !o && !s ? Nt(i, c) : I(0), l = r.left + c.scrollLeft - a.x - u.x, m = r.top + c.scrollTop - a.y - u.y;
|
|
1070
|
+
return {
|
|
1071
|
+
x: l,
|
|
1072
|
+
y: m,
|
|
1073
|
+
width: r.width,
|
|
1074
|
+
height: r.height
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
function ut(t) {
|
|
1078
|
+
return _(t).position === "static";
|
|
1079
|
+
}
|
|
1080
|
+
function Et(t, e) {
|
|
1081
|
+
if (!X(t) || _(t).position === "fixed")
|
|
1082
|
+
return null;
|
|
1083
|
+
if (e)
|
|
1084
|
+
return e(t);
|
|
1085
|
+
let n = t.offsetParent;
|
|
1086
|
+
return Y(t) === n && (n = n.ownerDocument.body), n;
|
|
1087
|
+
}
|
|
1088
|
+
function _t(t, e) {
|
|
1089
|
+
const n = M(t);
|
|
1090
|
+
if (lt(t))
|
|
1091
|
+
return n;
|
|
1092
|
+
if (!X(t)) {
|
|
1093
|
+
let i = U(t);
|
|
1094
|
+
for (; i && !Z(i); ) {
|
|
1095
|
+
if (V(i) && !ut(i))
|
|
1096
|
+
return i;
|
|
1097
|
+
i = U(i);
|
|
1098
|
+
}
|
|
1099
|
+
return n;
|
|
1100
|
+
}
|
|
1101
|
+
let o = Et(t, e);
|
|
1102
|
+
for (; o && he(o) && ut(o); )
|
|
1103
|
+
o = Et(o, e);
|
|
1104
|
+
return o && Z(o) && ut(o) && !wt(o) ? n : o || ye(t) || n;
|
|
1105
|
+
}
|
|
1106
|
+
const Me = async function(t) {
|
|
1107
|
+
const e = this.getOffsetParent || _t, n = this.getDimensions, o = await n(t.floating);
|
|
1108
|
+
return {
|
|
1109
|
+
reference: Fe(t.reference, await e(t.floating), t.strategy),
|
|
1110
|
+
floating: {
|
|
1111
|
+
x: 0,
|
|
1112
|
+
y: 0,
|
|
1113
|
+
width: o.width,
|
|
1114
|
+
height: o.height
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
function Be(t) {
|
|
1119
|
+
return _(t).direction === "rtl";
|
|
1120
|
+
}
|
|
1121
|
+
const ke = {
|
|
1122
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Oe,
|
|
1123
|
+
getDocumentElement: Y,
|
|
1124
|
+
getClippingRect: Ee,
|
|
1125
|
+
getOffsetParent: _t,
|
|
1126
|
+
getElementRects: Me,
|
|
1127
|
+
getClientRects: Ae,
|
|
1128
|
+
getDimensions: De,
|
|
1129
|
+
getScale: G,
|
|
1130
|
+
isElement: V,
|
|
1131
|
+
isRTL: Be
|
|
1132
|
+
};
|
|
1133
|
+
function zt(t, e) {
|
|
1134
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1135
|
+
}
|
|
1136
|
+
function We(t, e) {
|
|
1137
|
+
let n = null, o;
|
|
1138
|
+
const i = Y(t);
|
|
1139
|
+
function s() {
|
|
1140
|
+
var c;
|
|
1141
|
+
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
1142
|
+
}
|
|
1143
|
+
function r(c, a) {
|
|
1144
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), s();
|
|
1145
|
+
const f = t.getBoundingClientRect(), {
|
|
1146
|
+
left: u,
|
|
1147
|
+
top: l,
|
|
1148
|
+
width: m,
|
|
1149
|
+
height: d
|
|
1150
|
+
} = f;
|
|
1151
|
+
if (c || e(), !m || !d)
|
|
1152
|
+
return;
|
|
1153
|
+
const h = ot(l), g = ot(i.clientWidth - (u + m)), p = ot(i.clientHeight - (l + d)), w = ot(u), v = {
|
|
1154
|
+
rootMargin: -h + "px " + -g + "px " + -p + "px " + -w + "px",
|
|
1155
|
+
threshold: L(0, N(1, a)) || 1
|
|
1156
|
+
};
|
|
1157
|
+
let R = !0;
|
|
1158
|
+
function b(A) {
|
|
1159
|
+
const O = A[0].intersectionRatio;
|
|
1160
|
+
if (O !== a) {
|
|
1161
|
+
if (!R)
|
|
1162
|
+
return r();
|
|
1163
|
+
O ? r(!1, O) : o = setTimeout(() => {
|
|
1164
|
+
r(!1, 1e-7);
|
|
1165
|
+
}, 1e3);
|
|
1166
|
+
}
|
|
1167
|
+
O === 1 && !zt(f, t.getBoundingClientRect()) && r(), R = !1;
|
|
1168
|
+
}
|
|
1169
|
+
try {
|
|
1170
|
+
n = new IntersectionObserver(b, {
|
|
1171
|
+
...v,
|
|
1172
|
+
// Handle <iframe>s
|
|
1173
|
+
root: i.ownerDocument
|
|
1174
|
+
});
|
|
1175
|
+
} catch {
|
|
1176
|
+
n = new IntersectionObserver(b, v);
|
|
1177
|
+
}
|
|
1178
|
+
n.observe(t);
|
|
1179
|
+
}
|
|
1180
|
+
return r(!0), s;
|
|
1181
|
+
}
|
|
1182
|
+
function $e(t, e, n, o) {
|
|
1183
|
+
o === void 0 && (o = {});
|
|
1184
|
+
const {
|
|
1185
|
+
ancestorScroll: i = !0,
|
|
1186
|
+
ancestorResize: s = !0,
|
|
1187
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
1188
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1189
|
+
animationFrame: a = !1
|
|
1190
|
+
} = o, f = yt(t), u = i || s ? [...f ? et(f) : [], ...et(e)] : [];
|
|
1191
|
+
u.forEach((w) => {
|
|
1192
|
+
i && w.addEventListener("scroll", n, {
|
|
1193
|
+
passive: !0
|
|
1194
|
+
}), s && w.addEventListener("resize", n);
|
|
1195
|
+
});
|
|
1196
|
+
const l = f && c ? We(f, n) : null;
|
|
1197
|
+
let m = -1, d = null;
|
|
1198
|
+
r && (d = new ResizeObserver((w) => {
|
|
1199
|
+
let [x] = w;
|
|
1200
|
+
x && x.target === f && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1201
|
+
var v;
|
|
1202
|
+
(v = d) == null || v.observe(e);
|
|
1203
|
+
})), n();
|
|
1204
|
+
}), f && !a && d.observe(f), d.observe(e));
|
|
1205
|
+
let h, g = a ? K(t) : null;
|
|
1206
|
+
a && p();
|
|
1207
|
+
function p() {
|
|
1208
|
+
const w = K(t);
|
|
1209
|
+
g && !zt(g, w) && n(), g = w, h = requestAnimationFrame(p);
|
|
1210
|
+
}
|
|
1211
|
+
return n(), () => {
|
|
1212
|
+
var w;
|
|
1213
|
+
u.forEach((x) => {
|
|
1214
|
+
i && x.removeEventListener("scroll", n), s && x.removeEventListener("resize", n);
|
|
1215
|
+
}), l?.(), (w = d) == null || w.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
const He = ae, Ne = ne, Ve = fe, _e = oe, ze = ue, Ie = ie, Xe = te, Ye = re, je = (t, e, n) => {
|
|
1219
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1220
|
+
platform: ke,
|
|
1221
|
+
...n
|
|
1222
|
+
}, s = {
|
|
1223
|
+
...i.platform,
|
|
1224
|
+
_c: o
|
|
1225
|
+
};
|
|
1226
|
+
return Zt(t, e, {
|
|
1227
|
+
...i,
|
|
1228
|
+
platform: s
|
|
1229
|
+
});
|
|
1230
|
+
};
|
|
1231
|
+
export {
|
|
1232
|
+
Ne as a,
|
|
1233
|
+
Ve as b,
|
|
1234
|
+
Xe as c,
|
|
1235
|
+
$e as d,
|
|
1236
|
+
je as e,
|
|
1237
|
+
_e as f,
|
|
1238
|
+
Ie as h,
|
|
1239
|
+
Ye as i,
|
|
1240
|
+
He as o,
|
|
1241
|
+
ze as s
|
|
1242
|
+
};
|