@drjoshcsimmons/scl 0.1.12 → 0.1.14
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/index100.js +12 -47
- package/dist/index101.js +8 -54
- package/dist/index102.js +30 -11
- package/dist/index103.js +4 -30
- package/dist/index104.js +24 -12
- package/dist/index105.js +6 -30
- package/dist/index107.js +1 -1
- package/dist/index108.js +30 -650
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.js +647 -27
- package/dist/index112.js +14 -8
- package/dist/index113.js +11 -47
- package/dist/index114.js +200 -42
- package/dist/index115.js +21 -20
- package/dist/index116.js +400 -9
- package/dist/index117.js +48 -38
- package/dist/index118.js +48 -18
- package/dist/index119.js +21 -12
- package/dist/index12.js +1 -1
- package/dist/index120.js +9 -206
- package/dist/index121.js +37 -21
- package/dist/index122.js +17 -399
- package/dist/index124.js +1 -1
- package/dist/index126.js +3 -3
- package/dist/index127.js +3 -3
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index131.js +5 -2
- package/dist/index132.js +3 -2
- package/dist/index133.js +24 -5
- package/dist/index134.js +113 -3
- package/dist/index135.js +15 -23
- package/dist/index136.js +519 -107
- package/dist/index137.js +126 -14
- package/dist/index138.js +125 -516
- package/dist/index139.js +2 -128
- package/dist/index14.js +2 -2
- package/dist/index140.js +2 -134
- package/dist/index141.js +69 -65
- package/dist/index142.js +8 -68
- package/dist/index143.js +14 -9
- package/dist/index144.js +66 -14
- package/dist/index145.js +64 -65
- package/dist/index15.js +2 -2
- package/dist/index17.js +4 -4
- package/dist/index18.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +4 -4
- package/dist/index26.js +1 -1
- package/dist/index27.js +3 -3
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index4.js +2 -2
- package/dist/index45.js +33 -237
- package/dist/index46.js +241 -11
- package/dist/index47.js +212 -211
- package/dist/index48.js +4 -4
- package/dist/index49.js +246 -104
- package/dist/index5.js +1 -1
- package/dist/index50.js +12 -33
- package/dist/index51.js +509 -109
- package/dist/index52.js +20 -433
- package/dist/index53.js +158 -57
- package/dist/index54.js +66 -247
- package/dist/index55.js +334 -16
- package/dist/index56.js +236 -31
- package/dist/index57.js +11 -310
- package/dist/index58.js +82 -12
- package/dist/index59.js +221 -232
- package/dist/index6.js +1 -1
- package/dist/index60.js +3 -6
- package/dist/index61.js +112 -143
- package/dist/index62.js +16 -247
- package/dist/index63.js +860 -9
- package/dist/index64.js +9 -241
- package/dist/index65.js +30 -72
- package/dist/index66.js +433 -20
- package/dist/index67.js +53 -75
- package/dist/index68.js +102 -209
- package/dist/index69.js +225 -11
- package/dist/index7.js +1 -1
- package/dist/index70.js +4 -5
- package/dist/index71.js +12 -860
- package/dist/index72.js +125 -9
- package/dist/index73.js +283 -503
- package/dist/index74.js +12 -125
- package/dist/index75.js +241 -323
- package/dist/index76.js +5 -66
- package/dist/index77.js +25 -44
- package/dist/index78.js +64 -23
- package/dist/index79.js +123 -5
- package/dist/index8.js +1 -1
- package/dist/index80.js +13 -50
- package/dist/index81.js +133 -32
- package/dist/index82.js +1 -1
- package/dist/index83.js +218 -7
- package/dist/index84.js +14 -181
- package/dist/index85.js +67 -23
- package/dist/index86.js +33 -5
- package/dist/index87.js +42 -63
- package/dist/index88.js +52 -4
- package/dist/index89.js +50 -4
- package/dist/index9.js +2 -2
- package/dist/index90.js +9 -30
- package/dist/index91.js +45 -14
- package/dist/index92.js +7 -124
- package/dist/index93.js +40 -127
- package/dist/index94.js +30 -14
- package/dist/index95.js +179 -13
- package/dist/index96.js +55 -9
- package/dist/index97.js +11 -50
- package/dist/index98.js +4 -48
- package/dist/index99.js +30 -219
- package/package.json +1 -1
package/dist/index138.js
CHANGED
|
@@ -1,527 +1,136 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let {
|
|
4
|
-
reference: a,
|
|
5
|
-
floating: r
|
|
6
|
-
} = t;
|
|
7
|
-
const n = T(e), o = N(e), m = Q(o), u = j(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
|
|
8
|
-
let i;
|
|
9
|
-
switch (u) {
|
|
10
|
-
case "top":
|
|
11
|
-
i = {
|
|
12
|
-
x: c,
|
|
13
|
-
y: a.y - r.height
|
|
14
|
-
};
|
|
15
|
-
break;
|
|
16
|
-
case "bottom":
|
|
17
|
-
i = {
|
|
18
|
-
x: c,
|
|
19
|
-
y: a.y + a.height
|
|
20
|
-
};
|
|
21
|
-
break;
|
|
22
|
-
case "right":
|
|
23
|
-
i = {
|
|
24
|
-
x: a.x + a.width,
|
|
25
|
-
y: s
|
|
26
|
-
};
|
|
27
|
-
break;
|
|
28
|
-
case "left":
|
|
29
|
-
i = {
|
|
30
|
-
x: a.x - r.width,
|
|
31
|
-
y: s
|
|
32
|
-
};
|
|
33
|
-
break;
|
|
34
|
-
default:
|
|
35
|
-
i = {
|
|
36
|
-
x: a.x,
|
|
37
|
-
y: a.y
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
switch (z(e)) {
|
|
41
|
-
case "start":
|
|
42
|
-
i[o] -= f * (d && h ? -1 : 1);
|
|
43
|
-
break;
|
|
44
|
-
case "end":
|
|
45
|
-
i[o] += f * (d && h ? -1 : 1);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
return i;
|
|
1
|
+
function c() {
|
|
2
|
+
return typeof window < "u";
|
|
49
3
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
x: c,
|
|
76
|
-
y: s,
|
|
77
|
-
initialPlacement: a,
|
|
78
|
-
placement: f,
|
|
79
|
-
strategy: r,
|
|
80
|
-
middlewareData: i,
|
|
81
|
-
rects: h,
|
|
82
|
-
platform: o,
|
|
83
|
-
elements: {
|
|
84
|
-
reference: t,
|
|
85
|
-
floating: e
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
c = A ?? c, s = p ?? s, i = {
|
|
89
|
-
...i,
|
|
90
|
-
[x]: {
|
|
91
|
-
...i[x],
|
|
92
|
-
...v
|
|
93
|
-
}
|
|
94
|
-
}, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
|
|
95
|
-
reference: t,
|
|
96
|
-
floating: e,
|
|
97
|
-
strategy: r
|
|
98
|
-
}) : w.rects), {
|
|
99
|
-
x: c,
|
|
100
|
-
y: s
|
|
101
|
-
} = I(h, f, u)), g = -1);
|
|
102
|
-
}
|
|
103
|
-
return {
|
|
104
|
-
x: c,
|
|
105
|
-
y: s,
|
|
106
|
-
placement: f,
|
|
107
|
-
strategy: r,
|
|
108
|
-
middlewareData: i
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
async function Y(t, e) {
|
|
112
|
-
var d;
|
|
113
|
-
e === void 0 && (e = {});
|
|
4
|
+
function u(t) {
|
|
5
|
+
return p(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
6
|
+
}
|
|
7
|
+
function i(t) {
|
|
8
|
+
var e;
|
|
9
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
10
|
+
}
|
|
11
|
+
function N(t) {
|
|
12
|
+
var e;
|
|
13
|
+
return (e = (p(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
14
|
+
}
|
|
15
|
+
function p(t) {
|
|
16
|
+
return c() ? t instanceof Node || t instanceof i(t).Node : !1;
|
|
17
|
+
}
|
|
18
|
+
function m(t) {
|
|
19
|
+
return c() ? t instanceof Element || t instanceof i(t).Element : !1;
|
|
20
|
+
}
|
|
21
|
+
function w(t) {
|
|
22
|
+
return c() ? t instanceof HTMLElement || t instanceof i(t).HTMLElement : !1;
|
|
23
|
+
}
|
|
24
|
+
function f(t) {
|
|
25
|
+
return !c() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof i(t).ShadowRoot;
|
|
26
|
+
}
|
|
27
|
+
const E = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
28
|
+
function y(t) {
|
|
114
29
|
const {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
} = t, {
|
|
122
|
-
boundary: h = "clippingAncestors",
|
|
123
|
-
rootBoundary: c = "viewport",
|
|
124
|
-
elementContext: s = "floating",
|
|
125
|
-
altBoundary: f = !1,
|
|
126
|
-
padding: i = 0
|
|
127
|
-
} = L(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
|
|
128
|
-
element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
|
|
129
|
-
boundary: h,
|
|
130
|
-
rootBoundary: c,
|
|
131
|
-
strategy: u
|
|
132
|
-
})), A = s === "floating" ? {
|
|
133
|
-
x: a,
|
|
134
|
-
y: r,
|
|
135
|
-
width: o.floating.width,
|
|
136
|
-
height: o.floating.height
|
|
137
|
-
} : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), v = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
|
|
138
|
-
x: 1,
|
|
139
|
-
y: 1
|
|
140
|
-
} : {
|
|
141
|
-
x: 1,
|
|
142
|
-
y: 1
|
|
143
|
-
}, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
144
|
-
elements: m,
|
|
145
|
-
rect: A,
|
|
146
|
-
offsetParent: p,
|
|
147
|
-
strategy: u
|
|
148
|
-
}) : A);
|
|
149
|
-
return {
|
|
150
|
-
top: (y.top - w.top + l.top) / v.y,
|
|
151
|
-
bottom: (w.bottom - y.bottom + l.bottom) / v.y,
|
|
152
|
-
left: (y.left - w.left + l.left) / v.x,
|
|
153
|
-
right: (w.right - y.right + l.right) / v.x
|
|
154
|
-
};
|
|
30
|
+
overflow: e,
|
|
31
|
+
overflowX: n,
|
|
32
|
+
overflowY: o,
|
|
33
|
+
display: r
|
|
34
|
+
} = S(t);
|
|
35
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !E.has(r);
|
|
155
36
|
}
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
middlewareData: u
|
|
168
|
-
} = e, {
|
|
169
|
-
element: h,
|
|
170
|
-
padding: c = 0
|
|
171
|
-
} = L(t, e) || {};
|
|
172
|
-
if (h == null)
|
|
173
|
-
return {};
|
|
174
|
-
const s = J(c), f = {
|
|
175
|
-
x: d,
|
|
176
|
-
y: a
|
|
177
|
-
}, i = N(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
|
178
|
-
let C = P ? P[p] : 0;
|
|
179
|
-
(!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
|
|
180
|
-
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, S = E ? b < D ? b - D : b - F : 0;
|
|
181
|
-
return {
|
|
182
|
-
[i]: f[i] + S,
|
|
183
|
-
data: {
|
|
184
|
-
[i]: B,
|
|
185
|
-
centerOffset: b - B - S,
|
|
186
|
-
...E && {
|
|
187
|
-
alignmentOffset: S
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
reset: E
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}), re = function(t) {
|
|
194
|
-
return t === void 0 && (t = {}), {
|
|
195
|
-
name: "flip",
|
|
196
|
-
options: t,
|
|
197
|
-
async fn(e) {
|
|
198
|
-
var d, a;
|
|
199
|
-
const {
|
|
200
|
-
placement: r,
|
|
201
|
-
middlewareData: n,
|
|
202
|
-
rects: o,
|
|
203
|
-
initialPlacement: m,
|
|
204
|
-
platform: u,
|
|
205
|
-
elements: h
|
|
206
|
-
} = e, {
|
|
207
|
-
mainAxis: c = !0,
|
|
208
|
-
crossAxis: s = !0,
|
|
209
|
-
fallbackPlacements: f,
|
|
210
|
-
fallbackStrategy: i = "bestFit",
|
|
211
|
-
fallbackAxisSideDirection: l = "none",
|
|
212
|
-
flipAlignment: g = !0,
|
|
213
|
-
...x
|
|
214
|
-
} = L(t, e);
|
|
215
|
-
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
|
-
return {};
|
|
217
|
-
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
-
!f && P && w.push(...ne(m, g, l, v));
|
|
219
|
-
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
|
-
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
|
-
if (c && k.push(M[y]), s) {
|
|
222
|
-
const b = ie(r, o, v);
|
|
223
|
-
k.push(M[b[0]], M[b[1]]);
|
|
224
|
-
}
|
|
225
|
-
if (O = [...O, {
|
|
226
|
-
placement: r,
|
|
227
|
-
overflows: k
|
|
228
|
-
}], !k.every((b) => b <= 0)) {
|
|
229
|
-
var H, D;
|
|
230
|
-
const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
|
|
231
|
-
if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
|
-
// overflows the main axis.
|
|
233
|
-
O.every((R) => T(R.placement) === A ? R.overflows[0] > 0 : !0)))
|
|
234
|
-
return {
|
|
235
|
-
data: {
|
|
236
|
-
index: b,
|
|
237
|
-
overflows: O
|
|
238
|
-
},
|
|
239
|
-
reset: {
|
|
240
|
-
placement: B
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
let E = (D = O.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
244
|
-
if (!E)
|
|
245
|
-
switch (i) {
|
|
246
|
-
case "bestFit": {
|
|
247
|
-
var F;
|
|
248
|
-
const S = (F = O.filter((R) => {
|
|
249
|
-
if (P) {
|
|
250
|
-
const V = T(R.placement);
|
|
251
|
-
return V === A || // Create a bias to the `y` side axis due to horizontal
|
|
252
|
-
// reading directions favoring greater width.
|
|
253
|
-
V === "y";
|
|
254
|
-
}
|
|
255
|
-
return !0;
|
|
256
|
-
}).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
|
|
257
|
-
S && (E = S);
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
case "initialPlacement":
|
|
261
|
-
E = m;
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
if (r !== E)
|
|
265
|
-
return {
|
|
266
|
-
reset: {
|
|
267
|
-
placement: E
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
return {};
|
|
37
|
+
const T = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
38
|
+
function A(t) {
|
|
39
|
+
return T.has(u(t));
|
|
40
|
+
}
|
|
41
|
+
const v = [":popover-open", ":modal"];
|
|
42
|
+
function L(t) {
|
|
43
|
+
return v.some((e) => {
|
|
44
|
+
try {
|
|
45
|
+
return t.matches(e);
|
|
46
|
+
} catch {
|
|
47
|
+
return !1;
|
|
272
48
|
}
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
function q(t, e) {
|
|
276
|
-
return {
|
|
277
|
-
top: t.top - e.height,
|
|
278
|
-
right: t.right - e.width,
|
|
279
|
-
bottom: t.bottom - e.height,
|
|
280
|
-
left: t.left - e.width
|
|
281
|
-
};
|
|
49
|
+
});
|
|
282
50
|
}
|
|
283
|
-
|
|
284
|
-
|
|
51
|
+
const D = ["transform", "translate", "scale", "rotate", "perspective"], C = ["transform", "translate", "scale", "rotate", "perspective", "filter"], k = ["paint", "layout", "strict", "content"];
|
|
52
|
+
function V(t) {
|
|
53
|
+
const e = O(), n = m(t) ? S(t) : t;
|
|
54
|
+
return D.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) || C.some((o) => (n.willChange || "").includes(o)) || k.some((o) => (n.contain || "").includes(o));
|
|
285
55
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
const n = await Y(e, {
|
|
312
|
-
...r,
|
|
313
|
-
altBoundary: !0
|
|
314
|
-
}), o = q(n, d.floating);
|
|
315
|
-
return {
|
|
316
|
-
data: {
|
|
317
|
-
escapedOffsets: o,
|
|
318
|
-
escaped: G(o)
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
default:
|
|
323
|
-
return {};
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
}, U = /* @__PURE__ */ new Set(["left", "top"]);
|
|
328
|
-
async function oe(t, e) {
|
|
329
|
-
const {
|
|
330
|
-
placement: d,
|
|
331
|
-
platform: a,
|
|
332
|
-
elements: r
|
|
333
|
-
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = U.has(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
|
|
334
|
-
let {
|
|
335
|
-
mainAxis: f,
|
|
336
|
-
crossAxis: i,
|
|
337
|
-
alignmentAxis: l
|
|
338
|
-
} = typeof s == "number" ? {
|
|
339
|
-
mainAxis: s,
|
|
340
|
-
crossAxis: 0,
|
|
341
|
-
alignmentAxis: null
|
|
342
|
-
} : {
|
|
343
|
-
mainAxis: s.mainAxis || 0,
|
|
344
|
-
crossAxis: s.crossAxis || 0,
|
|
345
|
-
alignmentAxis: s.alignmentAxis
|
|
346
|
-
};
|
|
347
|
-
return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), u ? {
|
|
348
|
-
x: i * c,
|
|
349
|
-
y: f * h
|
|
56
|
+
function B(t) {
|
|
57
|
+
let e = s(t);
|
|
58
|
+
for (; w(e) && !h(e); ) {
|
|
59
|
+
if (V(e))
|
|
60
|
+
return e;
|
|
61
|
+
if (L(e))
|
|
62
|
+
return null;
|
|
63
|
+
e = s(e);
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function O() {
|
|
68
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
69
|
+
}
|
|
70
|
+
const R = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
71
|
+
function h(t) {
|
|
72
|
+
return R.has(u(t));
|
|
73
|
+
}
|
|
74
|
+
function S(t) {
|
|
75
|
+
return i(t).getComputedStyle(t);
|
|
76
|
+
}
|
|
77
|
+
function F(t) {
|
|
78
|
+
return m(t) ? {
|
|
79
|
+
scrollLeft: t.scrollLeft,
|
|
80
|
+
scrollTop: t.scrollTop
|
|
350
81
|
} : {
|
|
351
|
-
|
|
352
|
-
|
|
82
|
+
scrollLeft: t.scrollX,
|
|
83
|
+
scrollTop: t.scrollY
|
|
353
84
|
};
|
|
354
85
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
y: a,
|
|
385
|
-
placement: r
|
|
386
|
-
} = e, {
|
|
387
|
-
mainAxis: n = !0,
|
|
388
|
-
crossAxis: o = !1,
|
|
389
|
-
limiter: m = {
|
|
390
|
-
fn: (x) => {
|
|
391
|
-
let {
|
|
392
|
-
x: y,
|
|
393
|
-
y: A
|
|
394
|
-
} = x;
|
|
395
|
-
return {
|
|
396
|
-
x: y,
|
|
397
|
-
y: A
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
...u
|
|
402
|
-
} = L(t, e), h = {
|
|
403
|
-
x: d,
|
|
404
|
-
y: a
|
|
405
|
-
}, c = await Y(e, u), s = T(j(r)), f = K(s);
|
|
406
|
-
let i = h[f], l = h[s];
|
|
407
|
-
if (n) {
|
|
408
|
-
const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
|
|
409
|
-
i = X(A, i, p);
|
|
410
|
-
}
|
|
411
|
-
if (o) {
|
|
412
|
-
const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
|
|
413
|
-
l = X(A, l, p);
|
|
414
|
-
}
|
|
415
|
-
const g = m.fn({
|
|
416
|
-
...e,
|
|
417
|
-
[f]: i,
|
|
418
|
-
[s]: l
|
|
419
|
-
});
|
|
420
|
-
return {
|
|
421
|
-
...g,
|
|
422
|
-
data: {
|
|
423
|
-
x: g.x - d,
|
|
424
|
-
y: g.y - a,
|
|
425
|
-
enabled: {
|
|
426
|
-
[f]: n,
|
|
427
|
-
[s]: o
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
}, xe = function(t) {
|
|
434
|
-
return t === void 0 && (t = {}), {
|
|
435
|
-
options: t,
|
|
436
|
-
fn(e) {
|
|
437
|
-
const {
|
|
438
|
-
x: d,
|
|
439
|
-
y: a,
|
|
440
|
-
placement: r,
|
|
441
|
-
rects: n,
|
|
442
|
-
middlewareData: o
|
|
443
|
-
} = e, {
|
|
444
|
-
offset: m = 0,
|
|
445
|
-
mainAxis: u = !0,
|
|
446
|
-
crossAxis: h = !0
|
|
447
|
-
} = L(t, e), c = {
|
|
448
|
-
x: d,
|
|
449
|
-
y: a
|
|
450
|
-
}, s = T(r), f = K(s);
|
|
451
|
-
let i = c[f], l = c[s];
|
|
452
|
-
const g = L(m, e), x = typeof g == "number" ? {
|
|
453
|
-
mainAxis: g,
|
|
454
|
-
crossAxis: 0
|
|
455
|
-
} : {
|
|
456
|
-
mainAxis: 0,
|
|
457
|
-
crossAxis: 0,
|
|
458
|
-
...g
|
|
459
|
-
};
|
|
460
|
-
if (u) {
|
|
461
|
-
const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
|
|
462
|
-
i < v ? i = v : i > w && (i = w);
|
|
463
|
-
}
|
|
464
|
-
if (h) {
|
|
465
|
-
var y, A;
|
|
466
|
-
const p = f === "y" ? "width" : "height", v = U.has(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
|
|
467
|
-
l < w ? l = w : l > P && (l = P);
|
|
468
|
-
}
|
|
469
|
-
return {
|
|
470
|
-
[f]: i,
|
|
471
|
-
[s]: l
|
|
472
|
-
};
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
}, ge = function(t) {
|
|
476
|
-
return t === void 0 && (t = {}), {
|
|
477
|
-
name: "size",
|
|
478
|
-
options: t,
|
|
479
|
-
async fn(e) {
|
|
480
|
-
var d, a;
|
|
481
|
-
const {
|
|
482
|
-
placement: r,
|
|
483
|
-
rects: n,
|
|
484
|
-
platform: o,
|
|
485
|
-
elements: m
|
|
486
|
-
} = e, {
|
|
487
|
-
apply: u = () => {
|
|
488
|
-
},
|
|
489
|
-
...h
|
|
490
|
-
} = L(t, e), c = await Y(e, h), s = j(r), f = z(r), i = T(r) === "y", {
|
|
491
|
-
width: l,
|
|
492
|
-
height: g
|
|
493
|
-
} = n.floating;
|
|
494
|
-
let x, y;
|
|
495
|
-
s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
|
|
496
|
-
const A = g - c.top - c.bottom, p = l - c.left - c.right, v = $(g - c[x], A), w = $(l - c[y], p), P = !e.middlewareData.shift;
|
|
497
|
-
let C = v, M = w;
|
|
498
|
-
if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (C = A), P && !f) {
|
|
499
|
-
const O = W(c.left, 0), H = W(c.right, 0), D = W(c.top, 0), F = W(c.bottom, 0);
|
|
500
|
-
i ? M = l - 2 * (O !== 0 || H !== 0 ? O + H : W(c.left, c.right)) : C = g - 2 * (D !== 0 || F !== 0 ? D + F : W(c.top, c.bottom));
|
|
501
|
-
}
|
|
502
|
-
await u({
|
|
503
|
-
...e,
|
|
504
|
-
availableWidth: M,
|
|
505
|
-
availableHeight: C
|
|
506
|
-
});
|
|
507
|
-
const k = await o.getDimensions(m.floating);
|
|
508
|
-
return l !== k.width || g !== k.height ? {
|
|
509
|
-
reset: {
|
|
510
|
-
rects: !0
|
|
511
|
-
}
|
|
512
|
-
} : {};
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
};
|
|
86
|
+
function s(t) {
|
|
87
|
+
if (u(t) === "html")
|
|
88
|
+
return t;
|
|
89
|
+
const e = (
|
|
90
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
91
|
+
t.assignedSlot || // DOM Element detected.
|
|
92
|
+
t.parentNode || // ShadowRoot detected.
|
|
93
|
+
f(t) && t.host || // Fallback.
|
|
94
|
+
N(t)
|
|
95
|
+
);
|
|
96
|
+
return f(e) ? e.host : e;
|
|
97
|
+
}
|
|
98
|
+
function b(t) {
|
|
99
|
+
const e = s(t);
|
|
100
|
+
return h(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : w(e) && y(e) ? e : b(e);
|
|
101
|
+
}
|
|
102
|
+
function d(t, e, n) {
|
|
103
|
+
var o;
|
|
104
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
105
|
+
const r = b(t), g = r === ((o = t.ownerDocument) == null ? void 0 : o.body), l = i(r);
|
|
106
|
+
if (g) {
|
|
107
|
+
const a = _(l);
|
|
108
|
+
return e.concat(l, l.visualViewport || [], y(r) ? r : [], a && n ? d(a) : []);
|
|
109
|
+
}
|
|
110
|
+
return e.concat(r, d(r, [], n));
|
|
111
|
+
}
|
|
112
|
+
function _(t) {
|
|
113
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
114
|
+
}
|
|
516
115
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
116
|
+
S as getComputedStyle,
|
|
117
|
+
B as getContainingBlock,
|
|
118
|
+
N as getDocumentElement,
|
|
119
|
+
_ as getFrameElement,
|
|
120
|
+
b as getNearestOverflowAncestor,
|
|
121
|
+
u as getNodeName,
|
|
122
|
+
F as getNodeScroll,
|
|
123
|
+
d as getOverflowAncestors,
|
|
124
|
+
s as getParentNode,
|
|
125
|
+
i as getWindow,
|
|
126
|
+
V as isContainingBlock,
|
|
127
|
+
m as isElement,
|
|
128
|
+
w as isHTMLElement,
|
|
129
|
+
h as isLastTraversableNode,
|
|
130
|
+
p as isNode,
|
|
131
|
+
y as isOverflowElement,
|
|
132
|
+
f as isShadowRoot,
|
|
133
|
+
A as isTableElement,
|
|
134
|
+
L as isTopLayer,
|
|
135
|
+
O as isWebKit
|
|
527
136
|
};
|