@edugis-org/webmapx 0.1.9 → 0.1.11
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-lib/alert-C_G5X6J8.js +311 -0
- package/dist-lib/button-BlZd3WPH.js +744 -0
- package/dist-lib/checkbox-DB4oPyyw.js +287 -0
- package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
- package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
- package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
- package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
- package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
- package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
- package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
- package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
- package/dist-lib/divider-BOFbR_Ny.js +41 -0
- package/dist-lib/icon-CBNpO1lq.js +9 -0
- package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
- package/dist-lib/input-B212BH6L.js +575 -0
- package/dist-lib/option-BQN9Zz_8.js +1108 -0
- package/dist-lib/spinner-DdcBaa3z.js +6 -0
- package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
- package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
- package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
- package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
- package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
- package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-C964bdEG.js} +3 -3
- package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
- package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
- package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
- package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
- package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
- package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
- package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
- package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
- package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
- package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
- package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
- package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
- package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
- package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
- package/dist-lib/webmapx.js +312 -311
- package/package.json +1 -1
- package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
- package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
import { a as e, n as t, o as n, r, s as i } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { t as a } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
|
|
3
|
+
import { css as o, html as s } from "lit";
|
|
4
|
+
import { property as c, query as l } from "lit/decorators.js";
|
|
5
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
|
6
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3KSWVBQ5.js
|
|
7
|
+
var d = o`
|
|
8
|
+
:host {
|
|
9
|
+
--arrow-color: var(--sl-color-neutral-1000);
|
|
10
|
+
--arrow-size: 6px;
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant
|
|
14
|
+
* 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.
|
|
15
|
+
*/
|
|
16
|
+
--arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
|
|
17
|
+
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
|
|
18
|
+
|
|
19
|
+
display: contents;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popup {
|
|
23
|
+
position: absolute;
|
|
24
|
+
isolation: isolate;
|
|
25
|
+
max-width: var(--auto-size-available-width, none);
|
|
26
|
+
max-height: var(--auto-size-available-height, none);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.popup--fixed {
|
|
30
|
+
position: fixed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.popup:not(.popup--active) {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.popup__arrow {
|
|
38
|
+
position: absolute;
|
|
39
|
+
width: calc(var(--arrow-size-diagonal) * 2);
|
|
40
|
+
height: calc(var(--arrow-size-diagonal) * 2);
|
|
41
|
+
rotate: 45deg;
|
|
42
|
+
background: var(--arrow-color);
|
|
43
|
+
z-index: -1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Hover bridge */
|
|
47
|
+
.popup-hover-bridge:not(.popup-hover-bridge--visible) {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.popup-hover-bridge {
|
|
52
|
+
position: fixed;
|
|
53
|
+
z-index: calc(var(--sl-z-index-dropdown) - 1);
|
|
54
|
+
top: 0;
|
|
55
|
+
right: 0;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
clip-path: polygon(
|
|
59
|
+
var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
|
|
60
|
+
var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),
|
|
61
|
+
var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),
|
|
62
|
+
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
`, f = Math.min, p = Math.max, m = Math.round, h = Math.floor, g = (e) => ({
|
|
66
|
+
x: e,
|
|
67
|
+
y: e
|
|
68
|
+
}), _ = {
|
|
69
|
+
left: "right",
|
|
70
|
+
right: "left",
|
|
71
|
+
bottom: "top",
|
|
72
|
+
top: "bottom"
|
|
73
|
+
}, v = {
|
|
74
|
+
start: "end",
|
|
75
|
+
end: "start"
|
|
76
|
+
};
|
|
77
|
+
function y(e, t, n) {
|
|
78
|
+
return p(e, f(t, n));
|
|
79
|
+
}
|
|
80
|
+
function b(e, t) {
|
|
81
|
+
return typeof e == "function" ? e(t) : e;
|
|
82
|
+
}
|
|
83
|
+
function x(e) {
|
|
84
|
+
return e.split("-")[0];
|
|
85
|
+
}
|
|
86
|
+
function S(e) {
|
|
87
|
+
return e.split("-")[1];
|
|
88
|
+
}
|
|
89
|
+
function C(e) {
|
|
90
|
+
return e === "x" ? "y" : "x";
|
|
91
|
+
}
|
|
92
|
+
function w(e) {
|
|
93
|
+
return e === "y" ? "height" : "width";
|
|
94
|
+
}
|
|
95
|
+
var T = /*#__PURE__*/ new Set(["top", "bottom"]);
|
|
96
|
+
function E(e) {
|
|
97
|
+
return T.has(x(e)) ? "y" : "x";
|
|
98
|
+
}
|
|
99
|
+
function D(e) {
|
|
100
|
+
return C(E(e));
|
|
101
|
+
}
|
|
102
|
+
function O(e, t, n) {
|
|
103
|
+
n === void 0 && (n = !1);
|
|
104
|
+
let r = S(e), i = D(e), a = w(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
105
|
+
return t.reference[a] > t.floating[a] && (o = F(o)), [o, F(o)];
|
|
106
|
+
}
|
|
107
|
+
function k(e) {
|
|
108
|
+
let t = F(e);
|
|
109
|
+
return [
|
|
110
|
+
A(e),
|
|
111
|
+
t,
|
|
112
|
+
A(t)
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
function A(e) {
|
|
116
|
+
return e.replace(/start|end/g, (e) => v[e]);
|
|
117
|
+
}
|
|
118
|
+
var j = ["left", "right"], M = ["right", "left"], ee = ["top", "bottom"], N = ["bottom", "top"];
|
|
119
|
+
function te(e, t, n) {
|
|
120
|
+
switch (e) {
|
|
121
|
+
case "top":
|
|
122
|
+
case "bottom": return n ? t ? M : j : t ? j : M;
|
|
123
|
+
case "left":
|
|
124
|
+
case "right": return t ? ee : N;
|
|
125
|
+
default: return [];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function P(e, t, n, r) {
|
|
129
|
+
let i = S(e), a = te(x(e), n === "start", r);
|
|
130
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(A)))), a;
|
|
131
|
+
}
|
|
132
|
+
function F(e) {
|
|
133
|
+
return e.replace(/left|right|bottom|top/g, (e) => _[e]);
|
|
134
|
+
}
|
|
135
|
+
function I(e) {
|
|
136
|
+
return {
|
|
137
|
+
top: 0,
|
|
138
|
+
right: 0,
|
|
139
|
+
bottom: 0,
|
|
140
|
+
left: 0,
|
|
141
|
+
...e
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function ne(e) {
|
|
145
|
+
return typeof e == "number" ? {
|
|
146
|
+
top: e,
|
|
147
|
+
right: e,
|
|
148
|
+
bottom: e,
|
|
149
|
+
left: e
|
|
150
|
+
} : I(e);
|
|
151
|
+
}
|
|
152
|
+
function L(e) {
|
|
153
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
154
|
+
return {
|
|
155
|
+
width: r,
|
|
156
|
+
height: i,
|
|
157
|
+
top: n,
|
|
158
|
+
left: t,
|
|
159
|
+
right: t + r,
|
|
160
|
+
bottom: n + i,
|
|
161
|
+
x: t,
|
|
162
|
+
y: n
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
167
|
+
function re(e, t, n) {
|
|
168
|
+
let { reference: r, floating: i } = e, a = E(t), o = D(t), s = w(o), c = x(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
169
|
+
switch (c) {
|
|
170
|
+
case "top":
|
|
171
|
+
p = {
|
|
172
|
+
x: u,
|
|
173
|
+
y: r.y - i.height
|
|
174
|
+
};
|
|
175
|
+
break;
|
|
176
|
+
case "bottom":
|
|
177
|
+
p = {
|
|
178
|
+
x: u,
|
|
179
|
+
y: r.y + r.height
|
|
180
|
+
};
|
|
181
|
+
break;
|
|
182
|
+
case "right":
|
|
183
|
+
p = {
|
|
184
|
+
x: r.x + r.width,
|
|
185
|
+
y: d
|
|
186
|
+
};
|
|
187
|
+
break;
|
|
188
|
+
case "left":
|
|
189
|
+
p = {
|
|
190
|
+
x: r.x - i.width,
|
|
191
|
+
y: d
|
|
192
|
+
};
|
|
193
|
+
break;
|
|
194
|
+
default: p = {
|
|
195
|
+
x: r.x,
|
|
196
|
+
y: r.y
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
switch (S(t)) {
|
|
200
|
+
case "start":
|
|
201
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
202
|
+
break;
|
|
203
|
+
case "end":
|
|
204
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
return p;
|
|
208
|
+
}
|
|
209
|
+
var ie = async (e, t, n) => {
|
|
210
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
211
|
+
reference: e,
|
|
212
|
+
floating: t,
|
|
213
|
+
strategy: i
|
|
214
|
+
}), { x: u, y: d } = re(l, r, c), f = r, p = {}, m = 0;
|
|
215
|
+
for (let n = 0; n < s.length; n++) {
|
|
216
|
+
let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
|
|
217
|
+
x: u,
|
|
218
|
+
y: d,
|
|
219
|
+
initialPlacement: r,
|
|
220
|
+
placement: f,
|
|
221
|
+
strategy: i,
|
|
222
|
+
middlewareData: p,
|
|
223
|
+
rects: l,
|
|
224
|
+
platform: o,
|
|
225
|
+
elements: {
|
|
226
|
+
reference: e,
|
|
227
|
+
floating: t
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
u = g ?? u, d = _ ?? d, p = {
|
|
231
|
+
...p,
|
|
232
|
+
[a]: {
|
|
233
|
+
...p[a],
|
|
234
|
+
...v
|
|
235
|
+
}
|
|
236
|
+
}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await o.getElementRects({
|
|
237
|
+
reference: e,
|
|
238
|
+
floating: t,
|
|
239
|
+
strategy: i
|
|
240
|
+
}) : y.rects), {x: u, y: d} = re(l, f, c)), n = -1);
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
x: u,
|
|
244
|
+
y: d,
|
|
245
|
+
placement: f,
|
|
246
|
+
strategy: i,
|
|
247
|
+
middlewareData: p
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
async function ae(e, t) {
|
|
251
|
+
t === void 0 && (t = {});
|
|
252
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = b(t, e), p = ne(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = L(await i.getClippingRect({
|
|
253
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
254
|
+
boundary: c,
|
|
255
|
+
rootBoundary: l,
|
|
256
|
+
strategy: s
|
|
257
|
+
})), g = u === "floating" ? {
|
|
258
|
+
x: n,
|
|
259
|
+
y: r,
|
|
260
|
+
width: a.floating.width,
|
|
261
|
+
height: a.floating.height
|
|
262
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
263
|
+
x: 1,
|
|
264
|
+
y: 1
|
|
265
|
+
}, y = L(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
266
|
+
elements: o,
|
|
267
|
+
rect: g,
|
|
268
|
+
offsetParent: _,
|
|
269
|
+
strategy: s
|
|
270
|
+
}) : g);
|
|
271
|
+
return {
|
|
272
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
273
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
274
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
275
|
+
right: (y.right - h.right + p.right) / v.x
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
var oe = (e) => ({
|
|
279
|
+
name: "arrow",
|
|
280
|
+
options: e,
|
|
281
|
+
async fn(t) {
|
|
282
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = b(e, t) || {};
|
|
283
|
+
if (l == null) return {};
|
|
284
|
+
let d = ne(u), p = {
|
|
285
|
+
x: n,
|
|
286
|
+
y: r
|
|
287
|
+
}, m = D(i), h = w(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", x = _ ? "bottom" : "right", C = _ ? "clientHeight" : "clientWidth", T = a.reference[h] + a.reference[m] - p[m] - a.floating[h], E = p[m] - a.reference[m], O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), k = O ? O[C] : 0;
|
|
288
|
+
(!k || !await (o.isElement == null ? void 0 : o.isElement(O))) && (k = s.floating[C] || a.floating[h]);
|
|
289
|
+
let A = T / 2 - E / 2, j = k / 2 - g[h] / 2 - 1, M = f(d[v], j), ee = f(d[x], j), N = M, te = k - g[h] - ee, P = k / 2 - g[h] / 2 + A, F = y(N, P, te), I = !c.arrow && S(i) != null && P !== F && a.reference[h] / 2 - (P < N ? M : ee) - g[h] / 2 < 0, L = I ? P < N ? P - N : P - te : 0;
|
|
290
|
+
return {
|
|
291
|
+
[m]: p[m] + L,
|
|
292
|
+
data: {
|
|
293
|
+
[m]: F,
|
|
294
|
+
centerOffset: P - F - L,
|
|
295
|
+
...I && { alignmentOffset: L }
|
|
296
|
+
},
|
|
297
|
+
reset: I
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
}), se = function(e) {
|
|
301
|
+
return e === void 0 && (e = {}), {
|
|
302
|
+
name: "flip",
|
|
303
|
+
options: e,
|
|
304
|
+
async fn(t) {
|
|
305
|
+
var n;
|
|
306
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = b(e, t);
|
|
307
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
308
|
+
let g = x(r), _ = E(o), v = x(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), S = d || (v || !m ? [F(o)] : k(o)), C = p !== "none";
|
|
309
|
+
!d && C && S.push(...P(o, m, p, y));
|
|
310
|
+
let w = [o, ...S], T = await ae(t, h), D = [], A = i.flip?.overflows || [];
|
|
311
|
+
if (l && D.push(T[g]), u) {
|
|
312
|
+
let e = O(r, a, y);
|
|
313
|
+
D.push(T[e[0]], T[e[1]]);
|
|
314
|
+
}
|
|
315
|
+
if (A = [...A, {
|
|
316
|
+
placement: r,
|
|
317
|
+
overflows: D
|
|
318
|
+
}], !D.every((e) => e <= 0)) {
|
|
319
|
+
let e = (i.flip?.index || 0) + 1, t = w[e];
|
|
320
|
+
if (t && (!(u === "alignment" && _ !== E(t)) || A.every((e) => E(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
321
|
+
data: {
|
|
322
|
+
index: e,
|
|
323
|
+
overflows: A
|
|
324
|
+
},
|
|
325
|
+
reset: { placement: t }
|
|
326
|
+
};
|
|
327
|
+
let n = A.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
328
|
+
if (!n) switch (f) {
|
|
329
|
+
case "bestFit": {
|
|
330
|
+
let e = A.filter((e) => {
|
|
331
|
+
if (C) {
|
|
332
|
+
let t = E(e.placement);
|
|
333
|
+
return t === _ || t === "y";
|
|
334
|
+
}
|
|
335
|
+
return !0;
|
|
336
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
337
|
+
e && (n = e);
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
case "initialPlacement":
|
|
341
|
+
n = o;
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
if (r !== n) return { reset: { placement: n } };
|
|
345
|
+
}
|
|
346
|
+
return {};
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}, ce = /*#__PURE__*/ new Set(["left", "top"]);
|
|
350
|
+
async function le(e, t) {
|
|
351
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = x(n), s = S(n), c = E(n) === "y", l = ce.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = b(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
352
|
+
mainAxis: d,
|
|
353
|
+
crossAxis: 0,
|
|
354
|
+
alignmentAxis: null
|
|
355
|
+
} : {
|
|
356
|
+
mainAxis: d.mainAxis || 0,
|
|
357
|
+
crossAxis: d.crossAxis || 0,
|
|
358
|
+
alignmentAxis: d.alignmentAxis
|
|
359
|
+
};
|
|
360
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
361
|
+
x: p * u,
|
|
362
|
+
y: f * l
|
|
363
|
+
} : {
|
|
364
|
+
x: f * l,
|
|
365
|
+
y: p * u
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
var ue = function(e) {
|
|
369
|
+
return e === void 0 && (e = 0), {
|
|
370
|
+
name: "offset",
|
|
371
|
+
options: e,
|
|
372
|
+
async fn(t) {
|
|
373
|
+
var n;
|
|
374
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await le(t, e);
|
|
375
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
376
|
+
x: r + s.x,
|
|
377
|
+
y: i + s.y,
|
|
378
|
+
data: {
|
|
379
|
+
...s,
|
|
380
|
+
placement: a
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
}, de = function(e) {
|
|
386
|
+
return e === void 0 && (e = {}), {
|
|
387
|
+
name: "shift",
|
|
388
|
+
options: e,
|
|
389
|
+
async fn(t) {
|
|
390
|
+
let { x: n, y: r, placement: i } = t, { mainAxis: a = !0, crossAxis: o = !1, limiter: s = { fn: (e) => {
|
|
391
|
+
let { x: t, y: n } = e;
|
|
392
|
+
return {
|
|
393
|
+
x: t,
|
|
394
|
+
y: n
|
|
395
|
+
};
|
|
396
|
+
} }, ...c } = b(e, t), l = {
|
|
397
|
+
x: n,
|
|
398
|
+
y: r
|
|
399
|
+
}, u = await ae(t, c), d = E(x(i)), f = C(d), p = l[f], m = l[d];
|
|
400
|
+
if (a) {
|
|
401
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = p + u[e], r = p - u[t];
|
|
402
|
+
p = y(n, p, r);
|
|
403
|
+
}
|
|
404
|
+
if (o) {
|
|
405
|
+
let e = d === "y" ? "top" : "left", t = d === "y" ? "bottom" : "right", n = m + u[e], r = m - u[t];
|
|
406
|
+
m = y(n, m, r);
|
|
407
|
+
}
|
|
408
|
+
let h = s.fn({
|
|
409
|
+
...t,
|
|
410
|
+
[f]: p,
|
|
411
|
+
[d]: m
|
|
412
|
+
});
|
|
413
|
+
return {
|
|
414
|
+
...h,
|
|
415
|
+
data: {
|
|
416
|
+
x: h.x - n,
|
|
417
|
+
y: h.y - r,
|
|
418
|
+
enabled: {
|
|
419
|
+
[f]: a,
|
|
420
|
+
[d]: o
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
}, fe = function(e) {
|
|
427
|
+
return e === void 0 && (e = {}), {
|
|
428
|
+
name: "size",
|
|
429
|
+
options: e,
|
|
430
|
+
async fn(t) {
|
|
431
|
+
var n, r;
|
|
432
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = b(e, t), u = await ae(t, l), d = x(i), m = S(i), h = E(i) === "y", { width: g, height: _ } = a.floating, v, y;
|
|
433
|
+
d === "top" || d === "bottom" ? (v = d, y = m === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (y = d, v = m === "end" ? "top" : "bottom");
|
|
434
|
+
let C = _ - u.top - u.bottom, w = g - u.left - u.right, T = f(_ - u[v], C), D = f(g - u[y], w), O = !t.middlewareData.shift, k = T, A = D;
|
|
435
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = w), (r = t.middlewareData.shift) != null && r.enabled.y && (k = C), O && !m) {
|
|
436
|
+
let e = p(u.left, 0), t = p(u.right, 0), n = p(u.top, 0), r = p(u.bottom, 0);
|
|
437
|
+
h ? A = g - 2 * (e !== 0 || t !== 0 ? e + t : p(u.left, u.right)) : k = _ - 2 * (n !== 0 || r !== 0 ? n + r : p(u.top, u.bottom));
|
|
438
|
+
}
|
|
439
|
+
await c({
|
|
440
|
+
...t,
|
|
441
|
+
availableWidth: A,
|
|
442
|
+
availableHeight: k
|
|
443
|
+
});
|
|
444
|
+
let j = await o.getDimensions(s.floating);
|
|
445
|
+
return g !== j.width || _ !== j.height ? { reset: { rects: !0 } } : {};
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
451
|
+
function R() {
|
|
452
|
+
return typeof window < "u";
|
|
453
|
+
}
|
|
454
|
+
function z(e) {
|
|
455
|
+
return pe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
456
|
+
}
|
|
457
|
+
function B(e) {
|
|
458
|
+
var t;
|
|
459
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
460
|
+
}
|
|
461
|
+
function V(e) {
|
|
462
|
+
return ((pe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
463
|
+
}
|
|
464
|
+
function pe(e) {
|
|
465
|
+
return R() ? e instanceof Node || e instanceof B(e).Node : !1;
|
|
466
|
+
}
|
|
467
|
+
function H(e) {
|
|
468
|
+
return R() ? e instanceof Element || e instanceof B(e).Element : !1;
|
|
469
|
+
}
|
|
470
|
+
function U(e) {
|
|
471
|
+
return R() ? e instanceof HTMLElement || e instanceof B(e).HTMLElement : !1;
|
|
472
|
+
}
|
|
473
|
+
function me(e) {
|
|
474
|
+
return !R() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
|
|
475
|
+
}
|
|
476
|
+
var he = /*#__PURE__*/ new Set(["inline", "contents"]);
|
|
477
|
+
function W(e) {
|
|
478
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = J(e);
|
|
479
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !he.has(i);
|
|
480
|
+
}
|
|
481
|
+
var ge = /*#__PURE__*/ new Set([
|
|
482
|
+
"table",
|
|
483
|
+
"td",
|
|
484
|
+
"th"
|
|
485
|
+
]);
|
|
486
|
+
function _e(e) {
|
|
487
|
+
return ge.has(z(e));
|
|
488
|
+
}
|
|
489
|
+
var ve = [":popover-open", ":modal"];
|
|
490
|
+
function G(e) {
|
|
491
|
+
return ve.some((t) => {
|
|
492
|
+
try {
|
|
493
|
+
return e.matches(t);
|
|
494
|
+
} catch {
|
|
495
|
+
return !1;
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
var ye = [
|
|
500
|
+
"transform",
|
|
501
|
+
"translate",
|
|
502
|
+
"scale",
|
|
503
|
+
"rotate",
|
|
504
|
+
"perspective"
|
|
505
|
+
], be = [
|
|
506
|
+
"transform",
|
|
507
|
+
"translate",
|
|
508
|
+
"scale",
|
|
509
|
+
"rotate",
|
|
510
|
+
"perspective",
|
|
511
|
+
"filter"
|
|
512
|
+
], xe = [
|
|
513
|
+
"paint",
|
|
514
|
+
"layout",
|
|
515
|
+
"strict",
|
|
516
|
+
"content"
|
|
517
|
+
];
|
|
518
|
+
function K(e) {
|
|
519
|
+
let t = Ce(), n = H(e) ? J(e) : e;
|
|
520
|
+
return ye.some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || be.some((e) => (n.willChange || "").includes(e)) || xe.some((e) => (n.contain || "").includes(e));
|
|
521
|
+
}
|
|
522
|
+
function Se(e) {
|
|
523
|
+
let t = Y(e);
|
|
524
|
+
for (; U(t) && !q(t);) {
|
|
525
|
+
if (K(t)) return t;
|
|
526
|
+
if (G(t)) return null;
|
|
527
|
+
t = Y(t);
|
|
528
|
+
}
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
function Ce() {
|
|
532
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
533
|
+
}
|
|
534
|
+
var we = /*#__PURE__*/ new Set([
|
|
535
|
+
"html",
|
|
536
|
+
"body",
|
|
537
|
+
"#document"
|
|
538
|
+
]);
|
|
539
|
+
function q(e) {
|
|
540
|
+
return we.has(z(e));
|
|
541
|
+
}
|
|
542
|
+
function J(e) {
|
|
543
|
+
return B(e).getComputedStyle(e);
|
|
544
|
+
}
|
|
545
|
+
function Te(e) {
|
|
546
|
+
return H(e) ? {
|
|
547
|
+
scrollLeft: e.scrollLeft,
|
|
548
|
+
scrollTop: e.scrollTop
|
|
549
|
+
} : {
|
|
550
|
+
scrollLeft: e.scrollX,
|
|
551
|
+
scrollTop: e.scrollY
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function Y(e) {
|
|
555
|
+
if (z(e) === "html") return e;
|
|
556
|
+
let t = e.assignedSlot || e.parentNode || me(e) && e.host || V(e);
|
|
557
|
+
return me(t) ? t.host : t;
|
|
558
|
+
}
|
|
559
|
+
function Ee(e) {
|
|
560
|
+
let t = Y(e);
|
|
561
|
+
return q(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && W(t) ? t : Ee(t);
|
|
562
|
+
}
|
|
563
|
+
function X(e, t, n) {
|
|
564
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
565
|
+
let r = Ee(e), i = r === e.ownerDocument?.body, a = B(r);
|
|
566
|
+
if (i) {
|
|
567
|
+
let e = De(a);
|
|
568
|
+
return t.concat(a, a.visualViewport || [], W(r) ? r : [], e && n ? X(e) : []);
|
|
569
|
+
}
|
|
570
|
+
return t.concat(r, X(r, [], n));
|
|
571
|
+
}
|
|
572
|
+
function De(e) {
|
|
573
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
574
|
+
}
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
577
|
+
function Oe(e) {
|
|
578
|
+
let t = J(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = U(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = m(n) !== a || m(r) !== o;
|
|
579
|
+
return s && (n = a, r = o), {
|
|
580
|
+
width: n,
|
|
581
|
+
height: r,
|
|
582
|
+
$: s
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
function ke(e) {
|
|
586
|
+
return H(e) ? e : e.contextElement;
|
|
587
|
+
}
|
|
588
|
+
function Z(e) {
|
|
589
|
+
let t = ke(e);
|
|
590
|
+
if (!U(t)) return g(1);
|
|
591
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Oe(t), o = (a ? m(n.width) : n.width) / r, s = (a ? m(n.height) : n.height) / i;
|
|
592
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
593
|
+
x: o,
|
|
594
|
+
y: s
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
var Ae = /*#__PURE__*/ g(0);
|
|
598
|
+
function je(e) {
|
|
599
|
+
let t = B(e);
|
|
600
|
+
return !Ce() || !t.visualViewport ? Ae : {
|
|
601
|
+
x: t.visualViewport.offsetLeft,
|
|
602
|
+
y: t.visualViewport.offsetTop
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function Me(e, t, n) {
|
|
606
|
+
return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
|
|
607
|
+
}
|
|
608
|
+
function Q(e, t, n, r) {
|
|
609
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
610
|
+
let i = e.getBoundingClientRect(), a = ke(e), o = g(1);
|
|
611
|
+
t && (r ? H(r) && (o = Z(r)) : o = Z(e));
|
|
612
|
+
let s = Me(a, n, r) ? je(a) : g(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
613
|
+
if (a) {
|
|
614
|
+
let e = B(a), t = r && H(r) ? B(r) : r, n = e, i = De(n);
|
|
615
|
+
for (; i && r && t !== n;) {
|
|
616
|
+
let e = Z(i), t = i.getBoundingClientRect(), r = J(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
617
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = B(i), i = De(n);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return L({
|
|
621
|
+
width: u,
|
|
622
|
+
height: d,
|
|
623
|
+
x: c,
|
|
624
|
+
y: l
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
function Ne(e, t) {
|
|
628
|
+
let n = Te(e).scrollLeft;
|
|
629
|
+
return t ? t.left + n : Q(V(e)).left + n;
|
|
630
|
+
}
|
|
631
|
+
function Pe(e, t) {
|
|
632
|
+
let n = e.getBoundingClientRect();
|
|
633
|
+
return {
|
|
634
|
+
x: n.left + t.scrollLeft - Ne(e, n),
|
|
635
|
+
y: n.top + t.scrollTop
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
function Fe(e) {
|
|
639
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = V(r), s = t ? G(t.floating) : !1;
|
|
640
|
+
if (r === o || s && a) return n;
|
|
641
|
+
let c = {
|
|
642
|
+
scrollLeft: 0,
|
|
643
|
+
scrollTop: 0
|
|
644
|
+
}, l = g(1), u = g(0), d = U(r);
|
|
645
|
+
if ((d || !d && !a) && ((z(r) !== "body" || W(o)) && (c = Te(r)), U(r))) {
|
|
646
|
+
let e = Q(r);
|
|
647
|
+
l = Z(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
648
|
+
}
|
|
649
|
+
let f = o && !d && !a ? Pe(o, c) : g(0);
|
|
650
|
+
return {
|
|
651
|
+
width: n.width * l.x,
|
|
652
|
+
height: n.height * l.y,
|
|
653
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
654
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
function Ie(e) {
|
|
658
|
+
return Array.from(e.getClientRects());
|
|
659
|
+
}
|
|
660
|
+
function Le(e) {
|
|
661
|
+
let t = V(e), n = Te(e), r = e.ownerDocument.body, i = p(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = p(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Ne(e), s = -n.scrollTop;
|
|
662
|
+
return J(r).direction === "rtl" && (o += p(t.clientWidth, r.clientWidth) - i), {
|
|
663
|
+
width: i,
|
|
664
|
+
height: a,
|
|
665
|
+
x: o,
|
|
666
|
+
y: s
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
var Re = 25;
|
|
670
|
+
function ze(e, t) {
|
|
671
|
+
let n = B(e), r = V(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
672
|
+
if (i) {
|
|
673
|
+
a = i.width, o = i.height;
|
|
674
|
+
let e = Ce();
|
|
675
|
+
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
676
|
+
}
|
|
677
|
+
let l = Ne(r);
|
|
678
|
+
if (l <= 0) {
|
|
679
|
+
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
680
|
+
o <= Re && (a -= o);
|
|
681
|
+
} else l <= Re && (a += l);
|
|
682
|
+
return {
|
|
683
|
+
width: a,
|
|
684
|
+
height: o,
|
|
685
|
+
x: s,
|
|
686
|
+
y: c
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
var Be = /*#__PURE__*/ new Set(["absolute", "fixed"]);
|
|
690
|
+
function Ve(e, t) {
|
|
691
|
+
let n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = U(e) ? Z(e) : g(1);
|
|
692
|
+
return {
|
|
693
|
+
width: e.clientWidth * a.x,
|
|
694
|
+
height: e.clientHeight * a.y,
|
|
695
|
+
x: i * a.x,
|
|
696
|
+
y: r * a.y
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function He(e, t, n) {
|
|
700
|
+
let r;
|
|
701
|
+
if (t === "viewport") r = ze(e, n);
|
|
702
|
+
else if (t === "document") r = Le(V(e));
|
|
703
|
+
else if (H(t)) r = Ve(t, n);
|
|
704
|
+
else {
|
|
705
|
+
let n = je(e);
|
|
706
|
+
r = {
|
|
707
|
+
x: t.x - n.x,
|
|
708
|
+
y: t.y - n.y,
|
|
709
|
+
width: t.width,
|
|
710
|
+
height: t.height
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
return L(r);
|
|
714
|
+
}
|
|
715
|
+
function Ue(e, t) {
|
|
716
|
+
let n = Y(e);
|
|
717
|
+
return n === t || !H(n) || q(n) ? !1 : J(n).position === "fixed" || Ue(n, t);
|
|
718
|
+
}
|
|
719
|
+
function We(e, t) {
|
|
720
|
+
let n = t.get(e);
|
|
721
|
+
if (n) return n;
|
|
722
|
+
let r = X(e, [], !1).filter((e) => H(e) && z(e) !== "body"), i = null, a = J(e).position === "fixed", o = a ? Y(e) : e;
|
|
723
|
+
for (; H(o) && !q(o);) {
|
|
724
|
+
let t = J(o), n = K(o);
|
|
725
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && Be.has(i.position) || W(o) && !n && Ue(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Y(o);
|
|
726
|
+
}
|
|
727
|
+
return t.set(e, r), r;
|
|
728
|
+
}
|
|
729
|
+
function Ge(e) {
|
|
730
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? G(t) ? [] : We(t, this._c) : [].concat(n), r], o = a[0], s = a.reduce((e, n) => {
|
|
731
|
+
let r = He(t, n, i);
|
|
732
|
+
return e.top = p(r.top, e.top), e.right = f(r.right, e.right), e.bottom = f(r.bottom, e.bottom), e.left = p(r.left, e.left), e;
|
|
733
|
+
}, He(t, o, i));
|
|
734
|
+
return {
|
|
735
|
+
width: s.right - s.left,
|
|
736
|
+
height: s.bottom - s.top,
|
|
737
|
+
x: s.left,
|
|
738
|
+
y: s.top
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
function Ke(e) {
|
|
742
|
+
let { width: t, height: n } = Oe(e);
|
|
743
|
+
return {
|
|
744
|
+
width: t,
|
|
745
|
+
height: n
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function qe(e, t, n) {
|
|
749
|
+
let r = U(t), i = V(t), a = n === "fixed", o = Q(e, !0, a, t), s = {
|
|
750
|
+
scrollLeft: 0,
|
|
751
|
+
scrollTop: 0
|
|
752
|
+
}, c = g(0);
|
|
753
|
+
function l() {
|
|
754
|
+
c.x = Ne(i);
|
|
755
|
+
}
|
|
756
|
+
if (r || !r && !a) if ((z(t) !== "body" || W(i)) && (s = Te(t)), r) {
|
|
757
|
+
let e = Q(t, !0, a, t);
|
|
758
|
+
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
759
|
+
} else i && l();
|
|
760
|
+
a && !r && i && l();
|
|
761
|
+
let u = i && !r && !a ? Pe(i, s) : g(0);
|
|
762
|
+
return {
|
|
763
|
+
x: o.left + s.scrollLeft - c.x - u.x,
|
|
764
|
+
y: o.top + s.scrollTop - c.y - u.y,
|
|
765
|
+
width: o.width,
|
|
766
|
+
height: o.height
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
function Je(e) {
|
|
770
|
+
return J(e).position === "static";
|
|
771
|
+
}
|
|
772
|
+
function Ye(e, t) {
|
|
773
|
+
if (!U(e) || J(e).position === "fixed") return null;
|
|
774
|
+
if (t) return t(e);
|
|
775
|
+
let n = e.offsetParent;
|
|
776
|
+
return V(e) === n && (n = n.ownerDocument.body), n;
|
|
777
|
+
}
|
|
778
|
+
function Xe(e, t) {
|
|
779
|
+
let n = B(e);
|
|
780
|
+
if (G(e)) return n;
|
|
781
|
+
if (!U(e)) {
|
|
782
|
+
let t = Y(e);
|
|
783
|
+
for (; t && !q(t);) {
|
|
784
|
+
if (H(t) && !Je(t)) return t;
|
|
785
|
+
t = Y(t);
|
|
786
|
+
}
|
|
787
|
+
return n;
|
|
788
|
+
}
|
|
789
|
+
let r = Ye(e, t);
|
|
790
|
+
for (; r && _e(r) && Je(r);) r = Ye(r, t);
|
|
791
|
+
return r && q(r) && Je(r) && !K(r) ? n : r || Se(e) || n;
|
|
792
|
+
}
|
|
793
|
+
var Ze = async function(e) {
|
|
794
|
+
let t = this.getOffsetParent || Xe, n = this.getDimensions, r = await n(e.floating);
|
|
795
|
+
return {
|
|
796
|
+
reference: qe(e.reference, await t(e.floating), e.strategy),
|
|
797
|
+
floating: {
|
|
798
|
+
x: 0,
|
|
799
|
+
y: 0,
|
|
800
|
+
width: r.width,
|
|
801
|
+
height: r.height
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
function Qe(e) {
|
|
806
|
+
return J(e).direction === "rtl";
|
|
807
|
+
}
|
|
808
|
+
var $e = {
|
|
809
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Fe,
|
|
810
|
+
getDocumentElement: V,
|
|
811
|
+
getClippingRect: Ge,
|
|
812
|
+
getOffsetParent: Xe,
|
|
813
|
+
getElementRects: Ze,
|
|
814
|
+
getClientRects: Ie,
|
|
815
|
+
getDimensions: Ke,
|
|
816
|
+
getScale: Z,
|
|
817
|
+
isElement: H,
|
|
818
|
+
isRTL: Qe
|
|
819
|
+
};
|
|
820
|
+
function et(e, t) {
|
|
821
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
822
|
+
}
|
|
823
|
+
function tt(e, t) {
|
|
824
|
+
let n = null, r, i = V(e);
|
|
825
|
+
function a() {
|
|
826
|
+
var e;
|
|
827
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
828
|
+
}
|
|
829
|
+
function o(s, c) {
|
|
830
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
831
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: m, height: g } = l;
|
|
832
|
+
if (s || t(), !m || !g) return;
|
|
833
|
+
let _ = h(d), v = h(i.clientWidth - (u + m)), y = h(i.clientHeight - (d + g)), b = h(u), x = {
|
|
834
|
+
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
|
|
835
|
+
threshold: p(0, f(1, c)) || 1
|
|
836
|
+
}, S = !0;
|
|
837
|
+
function C(t) {
|
|
838
|
+
let n = t[0].intersectionRatio;
|
|
839
|
+
if (n !== c) {
|
|
840
|
+
if (!S) return o();
|
|
841
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
842
|
+
o(!1, 1e-7);
|
|
843
|
+
}, 1e3);
|
|
844
|
+
}
|
|
845
|
+
n === 1 && !et(l, e.getBoundingClientRect()) && o(), S = !1;
|
|
846
|
+
}
|
|
847
|
+
try {
|
|
848
|
+
n = new IntersectionObserver(C, {
|
|
849
|
+
...x,
|
|
850
|
+
root: i.ownerDocument
|
|
851
|
+
});
|
|
852
|
+
} catch {
|
|
853
|
+
n = new IntersectionObserver(C, x);
|
|
854
|
+
}
|
|
855
|
+
n.observe(e);
|
|
856
|
+
}
|
|
857
|
+
return o(!0), a;
|
|
858
|
+
}
|
|
859
|
+
function nt(e, t, n, r) {
|
|
860
|
+
r === void 0 && (r = {});
|
|
861
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ke(e), u = i || a ? [...l ? X(l) : [], ...X(t)] : [];
|
|
862
|
+
u.forEach((e) => {
|
|
863
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
864
|
+
});
|
|
865
|
+
let d = l && s ? tt(l, n) : null, f = -1, p = null;
|
|
866
|
+
o && (p = new ResizeObserver((e) => {
|
|
867
|
+
let [r] = e;
|
|
868
|
+
r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
869
|
+
var e;
|
|
870
|
+
(e = p) == null || e.observe(t);
|
|
871
|
+
})), n();
|
|
872
|
+
}), l && !c && p.observe(l), p.observe(t));
|
|
873
|
+
let m, h = c ? Q(e) : null;
|
|
874
|
+
c && g();
|
|
875
|
+
function g() {
|
|
876
|
+
let t = Q(e);
|
|
877
|
+
h && !et(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
878
|
+
}
|
|
879
|
+
return n(), () => {
|
|
880
|
+
var e;
|
|
881
|
+
u.forEach((e) => {
|
|
882
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
883
|
+
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
var rt = ue, it = de, at = se, ot = fe, st = oe, ct = (e, t, n) => {
|
|
887
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
888
|
+
platform: $e,
|
|
889
|
+
...n
|
|
890
|
+
}, a = {
|
|
891
|
+
...i.platform,
|
|
892
|
+
_c: r
|
|
893
|
+
};
|
|
894
|
+
return ie(e, t, {
|
|
895
|
+
...i,
|
|
896
|
+
platform: a
|
|
897
|
+
});
|
|
898
|
+
};
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region node_modules/composed-offset-position/dist/composed-offset-position.browser.min.mjs
|
|
901
|
+
function lt(e) {
|
|
902
|
+
return dt(e);
|
|
903
|
+
}
|
|
904
|
+
function ut(e) {
|
|
905
|
+
return e.assignedSlot ? e.assignedSlot : e.parentNode instanceof ShadowRoot ? e.parentNode.host : e.parentNode;
|
|
906
|
+
}
|
|
907
|
+
function dt(e) {
|
|
908
|
+
for (let t = e; t; t = ut(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
|
|
909
|
+
for (let t = ut(e); t; t = ut(t)) {
|
|
910
|
+
if (!(t instanceof Element)) continue;
|
|
911
|
+
let e = getComputedStyle(t);
|
|
912
|
+
if (e.display !== "contents" && (e.position !== "static" || K(e) || t.tagName === "BODY")) return t;
|
|
913
|
+
}
|
|
914
|
+
return null;
|
|
915
|
+
}
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5JY5FUCG.js
|
|
918
|
+
function ft(e) {
|
|
919
|
+
return typeof e == "object" && !!e && "getBoundingClientRect" in e && ("contextElement" in e ? e.contextElement instanceof Element : !0);
|
|
920
|
+
}
|
|
921
|
+
var $ = class extends t {
|
|
922
|
+
constructor() {
|
|
923
|
+
super(...arguments), this.localize = new a(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.updateHoverBridge = () => {
|
|
924
|
+
if (this.hoverBridge && this.anchorEl) {
|
|
925
|
+
let e = this.anchorEl.getBoundingClientRect(), t = this.popup.getBoundingClientRect(), n = this.placement.includes("top") || this.placement.includes("bottom"), r = 0, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0, u = 0;
|
|
926
|
+
n ? e.top < t.top ? (r = e.left, i = e.bottom, a = e.right, o = e.bottom, s = t.left, c = t.top, l = t.right, u = t.top) : (r = t.left, i = t.bottom, a = t.right, o = t.bottom, s = e.left, c = e.top, l = e.right, u = e.top) : e.left < t.left ? (r = e.right, i = e.top, a = t.left, o = t.top, s = e.right, c = e.bottom, l = t.left, u = t.bottom) : (r = t.right, i = t.top, a = e.left, o = e.top, s = t.right, c = t.bottom, l = e.left, u = e.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${r}px`), this.style.setProperty("--hover-bridge-top-left-y", `${i}px`), this.style.setProperty("--hover-bridge-top-right-x", `${a}px`), this.style.setProperty("--hover-bridge-top-right-y", `${o}px`), this.style.setProperty("--hover-bridge-bottom-left-x", `${s}px`), this.style.setProperty("--hover-bridge-bottom-left-y", `${c}px`), this.style.setProperty("--hover-bridge-bottom-right-x", `${l}px`), this.style.setProperty("--hover-bridge-bottom-right-y", `${u}px`);
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
async connectedCallback() {
|
|
931
|
+
super.connectedCallback(), await this.updateComplete, this.start();
|
|
932
|
+
}
|
|
933
|
+
disconnectedCallback() {
|
|
934
|
+
super.disconnectedCallback(), this.stop();
|
|
935
|
+
}
|
|
936
|
+
async updated(e) {
|
|
937
|
+
super.updated(e), e.has("active") && (this.active ? this.start() : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
|
|
938
|
+
}
|
|
939
|
+
async handleAnchorChange() {
|
|
940
|
+
if (await this.stop(), this.anchor && typeof this.anchor == "string") {
|
|
941
|
+
let e = this.getRootNode();
|
|
942
|
+
this.anchorEl = e.getElementById(this.anchor);
|
|
943
|
+
} else this.anchor instanceof Element || ft(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector("[slot=\"anchor\"]");
|
|
944
|
+
this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({ flatten: !0 })[0]), this.anchorEl && this.active && this.start();
|
|
945
|
+
}
|
|
946
|
+
start() {
|
|
947
|
+
!this.anchorEl || !this.active || (this.cleanup = nt(this.anchorEl, this.popup, () => {
|
|
948
|
+
this.reposition();
|
|
949
|
+
}));
|
|
950
|
+
}
|
|
951
|
+
async stop() {
|
|
952
|
+
return new Promise((e) => {
|
|
953
|
+
this.cleanup ? (this.cleanup(), this.cleanup = void 0, this.removeAttribute("data-current-placement"), this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), requestAnimationFrame(() => e())) : e();
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
reposition() {
|
|
957
|
+
if (!this.active || !this.anchorEl) return;
|
|
958
|
+
let e = [rt({
|
|
959
|
+
mainAxis: this.distance,
|
|
960
|
+
crossAxis: this.skidding
|
|
961
|
+
})];
|
|
962
|
+
this.sync ? e.push(ot({ apply: ({ rects: e }) => {
|
|
963
|
+
let t = this.sync === "width" || this.sync === "both", n = this.sync === "height" || this.sync === "both";
|
|
964
|
+
this.popup.style.width = t ? `${e.reference.width}px` : "", this.popup.style.height = n ? `${e.reference.height}px` : "";
|
|
965
|
+
} })) : (this.popup.style.width = "", this.popup.style.height = ""), this.flip && e.push(at({
|
|
966
|
+
boundary: this.flipBoundary,
|
|
967
|
+
fallbackPlacements: this.flipFallbackPlacements,
|
|
968
|
+
fallbackStrategy: this.flipFallbackStrategy === "best-fit" ? "bestFit" : "initialPlacement",
|
|
969
|
+
padding: this.flipPadding
|
|
970
|
+
})), this.shift && e.push(it({
|
|
971
|
+
boundary: this.shiftBoundary,
|
|
972
|
+
padding: this.shiftPadding
|
|
973
|
+
})), this.autoSize ? e.push(ot({
|
|
974
|
+
boundary: this.autoSizeBoundary,
|
|
975
|
+
padding: this.autoSizePadding,
|
|
976
|
+
apply: ({ availableWidth: e, availableHeight: t }) => {
|
|
977
|
+
this.autoSize === "vertical" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-height", `${t}px`) : this.style.removeProperty("--auto-size-available-height"), this.autoSize === "horizontal" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-width", `${e}px`) : this.style.removeProperty("--auto-size-available-width");
|
|
978
|
+
}
|
|
979
|
+
})) : (this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height")), this.arrow && e.push(st({
|
|
980
|
+
element: this.arrowEl,
|
|
981
|
+
padding: this.arrowPadding
|
|
982
|
+
}));
|
|
983
|
+
let t = this.strategy === "absolute" ? (e) => $e.getOffsetParent(e, lt) : $e.getOffsetParent;
|
|
984
|
+
ct(this.anchorEl, this.popup, {
|
|
985
|
+
placement: this.placement,
|
|
986
|
+
middleware: e,
|
|
987
|
+
strategy: this.strategy,
|
|
988
|
+
platform: n(i({}, $e), { getOffsetParent: t })
|
|
989
|
+
}).then(({ x: e, y: t, middlewareData: n, placement: r }) => {
|
|
990
|
+
let i = this.localize.dir() === "rtl", a = {
|
|
991
|
+
top: "bottom",
|
|
992
|
+
right: "left",
|
|
993
|
+
bottom: "top",
|
|
994
|
+
left: "right"
|
|
995
|
+
}[r.split("-")[0]];
|
|
996
|
+
if (this.setAttribute("data-current-placement", r), Object.assign(this.popup.style, {
|
|
997
|
+
left: `${e}px`,
|
|
998
|
+
top: `${t}px`
|
|
999
|
+
}), this.arrow) {
|
|
1000
|
+
let e = n.arrow.x, t = n.arrow.y, r = "", o = "", s = "", c = "";
|
|
1001
|
+
if (this.arrowPlacement === "start") {
|
|
1002
|
+
let n = typeof e == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
1003
|
+
r = typeof t == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", o = i ? n : "", c = i ? "" : n;
|
|
1004
|
+
} else if (this.arrowPlacement === "end") {
|
|
1005
|
+
let n = typeof e == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
1006
|
+
o = i ? "" : n, c = i ? n : "", s = typeof t == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
|
|
1007
|
+
} else this.arrowPlacement === "center" ? (c = typeof e == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", r = typeof t == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (c = typeof e == "number" ? `${e}px` : "", r = typeof t == "number" ? `${t}px` : "");
|
|
1008
|
+
Object.assign(this.arrowEl.style, {
|
|
1009
|
+
top: r,
|
|
1010
|
+
right: o,
|
|
1011
|
+
bottom: s,
|
|
1012
|
+
left: c,
|
|
1013
|
+
[a]: "calc(var(--arrow-size-diagonal) * -1)"
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
}), requestAnimationFrame(() => this.updateHoverBridge()), this.emit("sl-reposition");
|
|
1017
|
+
}
|
|
1018
|
+
render() {
|
|
1019
|
+
return s`
|
|
1020
|
+
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
1021
|
+
|
|
1022
|
+
<span
|
|
1023
|
+
part="hover-bridge"
|
|
1024
|
+
class=${u({
|
|
1025
|
+
"popup-hover-bridge": !0,
|
|
1026
|
+
"popup-hover-bridge--visible": this.hoverBridge && this.active
|
|
1027
|
+
})}
|
|
1028
|
+
></span>
|
|
1029
|
+
|
|
1030
|
+
<div
|
|
1031
|
+
part="popup"
|
|
1032
|
+
class=${u({
|
|
1033
|
+
popup: !0,
|
|
1034
|
+
"popup--active": this.active,
|
|
1035
|
+
"popup--fixed": this.strategy === "fixed",
|
|
1036
|
+
"popup--has-arrow": this.arrow
|
|
1037
|
+
})}
|
|
1038
|
+
>
|
|
1039
|
+
<slot></slot>
|
|
1040
|
+
${this.arrow ? s`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}
|
|
1041
|
+
</div>
|
|
1042
|
+
`;
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
$.styles = [r, d], e([l(".popup")], $.prototype, "popup", 2), e([l(".popup__arrow")], $.prototype, "arrowEl", 2), e([c()], $.prototype, "anchor", 2), e([c({
|
|
1046
|
+
type: Boolean,
|
|
1047
|
+
reflect: !0
|
|
1048
|
+
})], $.prototype, "active", 2), e([c({ reflect: !0 })], $.prototype, "placement", 2), e([c({ reflect: !0 })], $.prototype, "strategy", 2), e([c({ type: Number })], $.prototype, "distance", 2), e([c({ type: Number })], $.prototype, "skidding", 2), e([c({ type: Boolean })], $.prototype, "arrow", 2), e([c({ attribute: "arrow-placement" })], $.prototype, "arrowPlacement", 2), e([c({
|
|
1049
|
+
attribute: "arrow-padding",
|
|
1050
|
+
type: Number
|
|
1051
|
+
})], $.prototype, "arrowPadding", 2), e([c({ type: Boolean })], $.prototype, "flip", 2), e([c({
|
|
1052
|
+
attribute: "flip-fallback-placements",
|
|
1053
|
+
converter: {
|
|
1054
|
+
fromAttribute: (e) => e.split(" ").map((e) => e.trim()).filter((e) => e !== ""),
|
|
1055
|
+
toAttribute: (e) => e.join(" ")
|
|
1056
|
+
}
|
|
1057
|
+
})], $.prototype, "flipFallbackPlacements", 2), e([c({ attribute: "flip-fallback-strategy" })], $.prototype, "flipFallbackStrategy", 2), e([c({ type: Object })], $.prototype, "flipBoundary", 2), e([c({
|
|
1058
|
+
attribute: "flip-padding",
|
|
1059
|
+
type: Number
|
|
1060
|
+
})], $.prototype, "flipPadding", 2), e([c({ type: Boolean })], $.prototype, "shift", 2), e([c({ type: Object })], $.prototype, "shiftBoundary", 2), e([c({
|
|
1061
|
+
attribute: "shift-padding",
|
|
1062
|
+
type: Number
|
|
1063
|
+
})], $.prototype, "shiftPadding", 2), e([c({ attribute: "auto-size" })], $.prototype, "autoSize", 2), e([c()], $.prototype, "sync", 2), e([c({ type: Object })], $.prototype, "autoSizeBoundary", 2), e([c({
|
|
1064
|
+
attribute: "auto-size-padding",
|
|
1065
|
+
type: Number
|
|
1066
|
+
})], $.prototype, "autoSizePadding", 2), e([c({
|
|
1067
|
+
attribute: "hover-bridge",
|
|
1068
|
+
type: Boolean
|
|
1069
|
+
})], $.prototype, "hoverBridge", 2);
|
|
1070
|
+
//#endregion
|
|
1071
|
+
export { $ as t };
|