@folkehelseinstituttet/designsystem 0.41.1 → 0.41.3
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/fhi-flex.js +16 -16
- package/fhi-flex.js.map +1 -1
- package/{fhi-tooltip.component-DJNDfrHK.js → fhi-tooltip.component-Bs2jmkyC.js} +291 -329
- package/fhi-tooltip.component-Bs2jmkyC.js.map +1 -0
- package/fhi-tooltip.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
- package/fhi-tooltip.component-DJNDfrHK.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, d as t, i as n, o as r, r as i, s as a, t as o, u as s } from "./decorate-DFXIek-k.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
3
3
|
var c = Math.min, l = Math.max, u = Math.round, d = Math.floor, f = (e) => ({
|
|
4
4
|
x: e,
|
|
5
5
|
y: e
|
|
@@ -34,58 +34,57 @@ function b(e) {
|
|
|
34
34
|
function x(e) {
|
|
35
35
|
return v(b(e));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function S(e, t, n) {
|
|
38
38
|
n === void 0 && (n = !1);
|
|
39
39
|
let r = _(e), i = x(e), a = y(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
40
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
40
|
+
return t.reference[a] > t.floating[a] && (o = k(o)), [o, k(o)];
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
let t =
|
|
42
|
+
function C(e) {
|
|
43
|
+
let t = k(e);
|
|
44
44
|
return [
|
|
45
|
-
|
|
45
|
+
w(e),
|
|
46
46
|
t,
|
|
47
|
-
|
|
47
|
+
w(t)
|
|
48
48
|
];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function w(e) {
|
|
51
51
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
function
|
|
53
|
+
var T = ["left", "right"], E = ["right", "left"], ee = ["top", "bottom"], D = ["bottom", "top"];
|
|
54
|
+
function O(e, t, n) {
|
|
55
55
|
switch (e) {
|
|
56
56
|
case "top":
|
|
57
|
-
case "bottom": return n ? t ?
|
|
57
|
+
case "bottom": return n ? t ? E : T : t ? T : E;
|
|
58
58
|
case "left":
|
|
59
|
-
case "right": return t ?
|
|
59
|
+
case "right": return t ? ee : D;
|
|
60
60
|
default: return [];
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
let i = _(e), a =
|
|
65
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
63
|
+
function te(e, t, n, r) {
|
|
64
|
+
let i = _(e), a = O(g(e), n === "start", r);
|
|
65
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(w)))), a;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function k(e) {
|
|
68
68
|
let t = g(e);
|
|
69
69
|
return p[t] + e.slice(t.length);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function A(e) {
|
|
72
72
|
return {
|
|
73
|
-
top: 0,
|
|
74
|
-
right: 0,
|
|
75
|
-
bottom: 0,
|
|
76
|
-
left: 0
|
|
77
|
-
...e
|
|
73
|
+
top: e.top ?? 0,
|
|
74
|
+
right: e.right ?? 0,
|
|
75
|
+
bottom: e.bottom ?? 0,
|
|
76
|
+
left: e.left ?? 0
|
|
78
77
|
};
|
|
79
78
|
}
|
|
80
|
-
function
|
|
79
|
+
function ne(e) {
|
|
81
80
|
return typeof e == "number" ? {
|
|
82
81
|
top: e,
|
|
83
82
|
right: e,
|
|
84
83
|
bottom: e,
|
|
85
84
|
left: e
|
|
86
|
-
} :
|
|
85
|
+
} : A(e);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
87
|
+
function j(e) {
|
|
89
88
|
let { x: t, y: n, width: r, height: i } = e;
|
|
90
89
|
return {
|
|
91
90
|
width: r,
|
|
@@ -99,8 +98,8 @@ function A(e) {
|
|
|
99
98
|
};
|
|
100
99
|
}
|
|
101
100
|
//#endregion
|
|
102
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.
|
|
103
|
-
function
|
|
101
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
102
|
+
function re(e, t, n) {
|
|
104
103
|
let { reference: r, floating: i } = e, a = b(t), o = x(t), s = y(o), c = g(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;
|
|
105
104
|
switch (c) {
|
|
106
105
|
case "top":
|
|
@@ -132,19 +131,12 @@ function ie(e, t, n) {
|
|
|
132
131
|
y: r.y
|
|
133
132
|
};
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
p[o] -= f * (n && l ? -1 : 1);
|
|
138
|
-
break;
|
|
139
|
-
case "end":
|
|
140
|
-
p[o] += f * (n && l ? -1 : 1);
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
return p;
|
|
134
|
+
let m = _(t);
|
|
135
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
144
136
|
}
|
|
145
|
-
async function
|
|
137
|
+
async function ie(e, t) {
|
|
146
138
|
t === void 0 && (t = {});
|
|
147
|
-
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 } = h(t, e), p =
|
|
139
|
+
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 } = h(t, e), p = ne(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], g = j(await i.getClippingRect({
|
|
148
140
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
149
141
|
boundary: c,
|
|
150
142
|
rootBoundary: l,
|
|
@@ -157,7 +149,7 @@ async function ae(e, t) {
|
|
|
157
149
|
} : a.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), y = await (i.isElement == null ? void 0 : i.isElement(v)) && await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
158
150
|
x: 1,
|
|
159
151
|
y: 1
|
|
160
|
-
}, b =
|
|
152
|
+
}, b = j(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
161
153
|
elements: o,
|
|
162
154
|
rect: _,
|
|
163
155
|
offsetParent: v,
|
|
@@ -170,15 +162,15 @@ async function ae(e, t) {
|
|
|
170
162
|
right: (b.right - g.right + p.right) / y.x
|
|
171
163
|
};
|
|
172
164
|
}
|
|
173
|
-
var
|
|
165
|
+
var ae = 50, oe = async (e, t, n) => {
|
|
174
166
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
175
167
|
...o,
|
|
176
|
-
detectOverflow:
|
|
168
|
+
detectOverflow: ie
|
|
177
169
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
178
170
|
reference: e,
|
|
179
171
|
floating: t,
|
|
180
172
|
strategy: i
|
|
181
|
-
}), { x: u, y: d } =
|
|
173
|
+
}), { x: u, y: d } = re(l, r, c), f = r, p = 0, m = {};
|
|
182
174
|
for (let n = 0; n < a.length; n++) {
|
|
183
175
|
let h = a[n];
|
|
184
176
|
if (!h) continue;
|
|
@@ -199,11 +191,11 @@ var oe = 50, se = async (e, t, n) => {
|
|
|
199
191
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
200
192
|
...m[g],
|
|
201
193
|
...b
|
|
202
|
-
}, x && p <
|
|
194
|
+
}, x && p < ae && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
203
195
|
reference: e,
|
|
204
196
|
floating: t,
|
|
205
197
|
strategy: i
|
|
206
|
-
}) : x.rects), {x: u, y: d} =
|
|
198
|
+
}) : x.rects), {x: u, y: d} = re(l, f, c)), n = -1);
|
|
207
199
|
}
|
|
208
200
|
return {
|
|
209
201
|
x: u,
|
|
@@ -212,7 +204,7 @@ var oe = 50, se = async (e, t, n) => {
|
|
|
212
204
|
strategy: i,
|
|
213
205
|
middlewareData: m
|
|
214
206
|
};
|
|
215
|
-
},
|
|
207
|
+
}, se = function(e) {
|
|
216
208
|
return e === void 0 && (e = {}), {
|
|
217
209
|
name: "flip",
|
|
218
210
|
options: e,
|
|
@@ -220,30 +212,30 @@ var oe = 50, se = async (e, t, n) => {
|
|
|
220
212
|
var n;
|
|
221
213
|
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(e, t);
|
|
222
214
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
223
|
-
let v = g(r), y = b(o), x = g(o) === o,
|
|
224
|
-
!d &&
|
|
225
|
-
let
|
|
226
|
-
if (l &&
|
|
227
|
-
let e =
|
|
228
|
-
|
|
215
|
+
let v = g(r), y = b(o), x = g(o) === o, w = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), T = d || (x || !m ? [k(o)] : C(o)), E = p !== "none";
|
|
216
|
+
!d && E && T.push(...te(o, m, p, w));
|
|
217
|
+
let ee = [o, ...T], D = await s.detectOverflow(t, _), O = [], A = i.flip?.overflows || [];
|
|
218
|
+
if (l && O.push(D[v]), u) {
|
|
219
|
+
let e = S(r, a, w);
|
|
220
|
+
O.push(D[e[0]], D[e[1]]);
|
|
229
221
|
}
|
|
230
|
-
if (
|
|
222
|
+
if (A = [...A, {
|
|
231
223
|
placement: r,
|
|
232
|
-
overflows:
|
|
233
|
-
}], !
|
|
234
|
-
let e = (i.flip?.index || 0) + 1, t =
|
|
235
|
-
if (t && (!(u === "alignment" && y !== b(t)) ||
|
|
224
|
+
overflows: O
|
|
225
|
+
}], !O.every((e) => e <= 0)) {
|
|
226
|
+
let e = (i.flip?.index || 0) + 1, t = ee[e];
|
|
227
|
+
if (t && (!(u === "alignment" && y !== b(t)) || A.every((e) => b(e.placement) === y ? e.overflows[0] > 0 : !0))) return {
|
|
236
228
|
data: {
|
|
237
229
|
index: e,
|
|
238
|
-
overflows:
|
|
230
|
+
overflows: A
|
|
239
231
|
},
|
|
240
232
|
reset: { placement: t }
|
|
241
233
|
};
|
|
242
|
-
let n =
|
|
234
|
+
let n = A.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
243
235
|
if (!n) switch (f) {
|
|
244
236
|
case "bestFit": {
|
|
245
|
-
let e =
|
|
246
|
-
if (
|
|
237
|
+
let e = A.filter((e) => {
|
|
238
|
+
if (E) {
|
|
247
239
|
let t = b(e.placement);
|
|
248
240
|
return t === y || t === "y";
|
|
249
241
|
}
|
|
@@ -261,9 +253,9 @@ var oe = 50, se = async (e, t, n) => {
|
|
|
261
253
|
return {};
|
|
262
254
|
}
|
|
263
255
|
};
|
|
264
|
-
},
|
|
265
|
-
async function
|
|
266
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = g(n), s = _(n), c = b(n) === "y", l =
|
|
256
|
+
}, ce = /*#__PURE__*/ new Set(["left", "top"]);
|
|
257
|
+
async function le(e, t) {
|
|
258
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = g(n), s = _(n), c = b(n) === "y", l = ce.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = h(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
267
259
|
mainAxis: d,
|
|
268
260
|
crossAxis: 0,
|
|
269
261
|
alignmentAxis: null
|
|
@@ -280,13 +272,13 @@ async function ue(e, t) {
|
|
|
280
272
|
y: p * u
|
|
281
273
|
};
|
|
282
274
|
}
|
|
283
|
-
var
|
|
275
|
+
var ue = function(e) {
|
|
284
276
|
return e === void 0 && (e = 0), {
|
|
285
277
|
name: "offset",
|
|
286
278
|
options: e,
|
|
287
279
|
async fn(t) {
|
|
288
280
|
var n;
|
|
289
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
281
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await le(t, e);
|
|
290
282
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
291
283
|
x: r + s.x,
|
|
292
284
|
y: i + s.y,
|
|
@@ -297,7 +289,7 @@ var de = function(e) {
|
|
|
297
289
|
};
|
|
298
290
|
}
|
|
299
291
|
};
|
|
300
|
-
},
|
|
292
|
+
}, de = function(e) {
|
|
301
293
|
return e === void 0 && (e = {}), {
|
|
302
294
|
name: "shift",
|
|
303
295
|
options: e,
|
|
@@ -311,19 +303,12 @@ var de = function(e) {
|
|
|
311
303
|
} }, ...l } = h(e, t), u = {
|
|
312
304
|
x: n,
|
|
313
305
|
y: r
|
|
314
|
-
}, d = await a.detectOverflow(t, l), f = b(
|
|
315
|
-
|
|
316
|
-
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = _ + d[e], r = _ - d[t];
|
|
317
|
-
_ = m(n, _, r);
|
|
318
|
-
}
|
|
319
|
-
if (s) {
|
|
320
|
-
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = y + d[e], r = y - d[t];
|
|
321
|
-
y = m(n, y, r);
|
|
322
|
-
}
|
|
306
|
+
}, d = await a.detectOverflow(t, l), f = b(i), p = v(f), g = u[p], _ = u[f], y = (e, t) => m(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
307
|
+
o && (g = y(p, g)), s && (_ = y(f, _));
|
|
323
308
|
let x = c.fn({
|
|
324
309
|
...t,
|
|
325
|
-
[p]:
|
|
326
|
-
[f]:
|
|
310
|
+
[p]: g,
|
|
311
|
+
[f]: _
|
|
327
312
|
});
|
|
328
313
|
return {
|
|
329
314
|
...x,
|
|
@@ -340,40 +325,40 @@ var de = function(e) {
|
|
|
340
325
|
};
|
|
341
326
|
};
|
|
342
327
|
//#endregion
|
|
343
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
344
|
-
function
|
|
328
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
329
|
+
function M() {
|
|
345
330
|
return typeof window < "u";
|
|
346
331
|
}
|
|
347
|
-
function M(e) {
|
|
348
|
-
return pe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
349
|
-
}
|
|
350
332
|
function N(e) {
|
|
351
|
-
|
|
352
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
333
|
+
return fe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
353
334
|
}
|
|
354
335
|
function P(e) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
function pe(e) {
|
|
358
|
-
return j() ? e instanceof Node || e instanceof N(e).Node : !1;
|
|
336
|
+
var t;
|
|
337
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
359
338
|
}
|
|
360
339
|
function F(e) {
|
|
361
|
-
return
|
|
340
|
+
return ((fe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
362
341
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
342
|
+
function fe(e) {
|
|
343
|
+
return M() ? e instanceof Node || e instanceof P(e).Node : !1;
|
|
365
344
|
}
|
|
366
|
-
function
|
|
367
|
-
return
|
|
345
|
+
function I(e) {
|
|
346
|
+
return M() ? e instanceof Element || e instanceof P(e).Element : !1;
|
|
368
347
|
}
|
|
369
348
|
function L(e) {
|
|
370
|
-
|
|
371
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
349
|
+
return M() ? e instanceof HTMLElement || e instanceof P(e).HTMLElement : !1;
|
|
372
350
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
351
|
+
function pe(e) {
|
|
352
|
+
return !M() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof P(e).ShadowRoot;
|
|
375
353
|
}
|
|
376
354
|
function R(e) {
|
|
355
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = W(e);
|
|
356
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
357
|
+
}
|
|
358
|
+
function me(e) {
|
|
359
|
+
return /^(table|td|th)$/.test(N(e));
|
|
360
|
+
}
|
|
361
|
+
function z(e) {
|
|
377
362
|
try {
|
|
378
363
|
if (e.matches(":popover-open")) return !0;
|
|
379
364
|
} catch {}
|
|
@@ -383,31 +368,31 @@ function R(e) {
|
|
|
383
368
|
return !1;
|
|
384
369
|
}
|
|
385
370
|
}
|
|
386
|
-
var
|
|
387
|
-
function
|
|
388
|
-
let t =
|
|
389
|
-
return
|
|
390
|
-
}
|
|
391
|
-
function
|
|
392
|
-
let t =
|
|
393
|
-
for (;
|
|
394
|
-
if (
|
|
395
|
-
if (
|
|
396
|
-
t =
|
|
371
|
+
var he = /transform|translate|scale|rotate|perspective|filter/, ge = /paint|layout|strict|content/, B = (e) => !!e && e !== "none", _e;
|
|
372
|
+
function V(e) {
|
|
373
|
+
let t = I(e) ? W(e) : e;
|
|
374
|
+
return B(t.transform) || B(t.translate) || B(t.scale) || B(t.rotate) || B(t.perspective) || !H() && (B(t.backdropFilter) || B(t.filter)) || he.test(t.willChange || "") || ge.test(t.contain || "");
|
|
375
|
+
}
|
|
376
|
+
function ve(e) {
|
|
377
|
+
let t = K(e);
|
|
378
|
+
for (; L(t) && !U(t);) {
|
|
379
|
+
if (V(t)) return t;
|
|
380
|
+
if (z(t)) return null;
|
|
381
|
+
t = K(t);
|
|
397
382
|
}
|
|
398
383
|
return null;
|
|
399
384
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
402
|
-
}
|
|
403
|
-
function H(e) {
|
|
404
|
-
return /^(html|body|#document)$/.test(M(e));
|
|
385
|
+
function H() {
|
|
386
|
+
return _e ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), _e;
|
|
405
387
|
}
|
|
406
388
|
function U(e) {
|
|
407
|
-
return
|
|
389
|
+
return /^(html|body|#document)$/.test(N(e));
|
|
408
390
|
}
|
|
409
391
|
function W(e) {
|
|
410
|
-
return
|
|
392
|
+
return P(e).getComputedStyle(e);
|
|
393
|
+
}
|
|
394
|
+
function G(e) {
|
|
395
|
+
return I(e) ? {
|
|
411
396
|
scrollLeft: e.scrollLeft,
|
|
412
397
|
scrollTop: e.scrollTop
|
|
413
398
|
} : {
|
|
@@ -415,101 +400,101 @@ function W(e) {
|
|
|
415
400
|
scrollTop: e.scrollY
|
|
416
401
|
};
|
|
417
402
|
}
|
|
418
|
-
function
|
|
419
|
-
if (
|
|
420
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
421
|
-
return
|
|
403
|
+
function K(e) {
|
|
404
|
+
if (N(e) === "html") return e;
|
|
405
|
+
let t = e.assignedSlot || e.parentNode || pe(e) && e.host || F(e);
|
|
406
|
+
return pe(t) ? t.host : t;
|
|
422
407
|
}
|
|
423
|
-
function
|
|
424
|
-
let t =
|
|
425
|
-
return
|
|
408
|
+
function ye(e) {
|
|
409
|
+
let t = K(e);
|
|
410
|
+
return U(t) ? (e.ownerDocument || e).body : L(t) && R(t) ? t : ye(t);
|
|
426
411
|
}
|
|
427
|
-
function
|
|
412
|
+
function q(e, t, n) {
|
|
428
413
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
429
|
-
let r =
|
|
414
|
+
let r = ye(e), i = r === e.ownerDocument?.body, a = P(r);
|
|
430
415
|
if (i) {
|
|
431
|
-
let e =
|
|
432
|
-
return t.concat(a, a.visualViewport || [],
|
|
433
|
-
} else return t.concat(r,
|
|
416
|
+
let e = J(a);
|
|
417
|
+
return t.concat(a, a.visualViewport || [], R(r) ? r : [], e && n ? q(e) : []);
|
|
418
|
+
} else return t.concat(r, q(r, [], n));
|
|
434
419
|
}
|
|
435
|
-
function
|
|
420
|
+
function J(e) {
|
|
436
421
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
437
422
|
}
|
|
438
423
|
//#endregion
|
|
439
|
-
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
440
|
-
function
|
|
441
|
-
let t =
|
|
424
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
425
|
+
function be(e) {
|
|
426
|
+
let t = W(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = L(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = u(n) !== a || u(r) !== o;
|
|
442
427
|
return s && (n = a, r = o), {
|
|
443
428
|
width: n,
|
|
444
429
|
height: r,
|
|
445
430
|
$: s
|
|
446
431
|
};
|
|
447
432
|
}
|
|
448
|
-
function J(e) {
|
|
449
|
-
return F(e) ? e : e.contextElement;
|
|
450
|
-
}
|
|
451
433
|
function Y(e) {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
434
|
+
return I(e) ? e : e.contextElement;
|
|
435
|
+
}
|
|
436
|
+
function X(e) {
|
|
437
|
+
let t = Y(e);
|
|
438
|
+
if (!L(t)) return f(1);
|
|
439
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = be(t), o = (a ? u(n.width) : n.width) / r, s = (a ? u(n.height) : n.height) / i;
|
|
455
440
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
456
441
|
x: o,
|
|
457
442
|
y: s
|
|
458
443
|
};
|
|
459
444
|
}
|
|
460
|
-
var
|
|
461
|
-
function
|
|
462
|
-
let t =
|
|
463
|
-
return !
|
|
445
|
+
var xe = /*#__PURE__*/ f(0);
|
|
446
|
+
function Se(e) {
|
|
447
|
+
let t = P(e);
|
|
448
|
+
return !H() || !t.visualViewport ? xe : {
|
|
464
449
|
x: t.visualViewport.offsetLeft,
|
|
465
450
|
y: t.visualViewport.offsetTop
|
|
466
451
|
};
|
|
467
452
|
}
|
|
468
|
-
function
|
|
469
|
-
return t === void 0 && (t = !1),
|
|
453
|
+
function Ce(e, t, n) {
|
|
454
|
+
return t === void 0 && (t = !1), !!n && t && n === P(e);
|
|
470
455
|
}
|
|
471
|
-
function
|
|
456
|
+
function Z(e, t, n, r) {
|
|
472
457
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
473
|
-
let i = e.getBoundingClientRect(), a =
|
|
474
|
-
t && (r ?
|
|
475
|
-
let s =
|
|
476
|
-
if (a) {
|
|
477
|
-
let e =
|
|
478
|
-
for (; i &&
|
|
479
|
-
let e =
|
|
480
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n =
|
|
458
|
+
let i = e.getBoundingClientRect(), a = Y(e), o = f(1);
|
|
459
|
+
t && (r ? I(r) && (o = X(r)) : o = X(e));
|
|
460
|
+
let s = Ce(a, n, r) ? Se(a) : f(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;
|
|
461
|
+
if (a && r) {
|
|
462
|
+
let e = P(a), t = I(r) ? P(r) : r, n = e, i = J(n);
|
|
463
|
+
for (; i && t !== n;) {
|
|
464
|
+
let e = X(i), t = i.getBoundingClientRect(), r = W(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
465
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = P(i), i = J(n);
|
|
481
466
|
}
|
|
482
467
|
}
|
|
483
|
-
return
|
|
468
|
+
return j({
|
|
484
469
|
width: u,
|
|
485
470
|
height: d,
|
|
486
471
|
x: c,
|
|
487
472
|
y: l
|
|
488
473
|
});
|
|
489
474
|
}
|
|
490
|
-
function
|
|
491
|
-
let n =
|
|
492
|
-
return t ? t.left + n :
|
|
475
|
+
function Q(e, t) {
|
|
476
|
+
let n = G(e).scrollLeft;
|
|
477
|
+
return t ? t.left + n : Z(F(e)).left + n;
|
|
493
478
|
}
|
|
494
|
-
function
|
|
479
|
+
function we(e, t) {
|
|
495
480
|
let n = e.getBoundingClientRect();
|
|
496
481
|
return {
|
|
497
|
-
x: n.left + t.scrollLeft -
|
|
482
|
+
x: n.left + t.scrollLeft - Q(e, n),
|
|
498
483
|
y: n.top + t.scrollTop
|
|
499
484
|
};
|
|
500
485
|
}
|
|
501
|
-
function
|
|
502
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
486
|
+
function Te(e) {
|
|
487
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = F(r), s = t ? z(t.floating) : !1;
|
|
503
488
|
if (r === o || s && a) return n;
|
|
504
489
|
let c = {
|
|
505
490
|
scrollLeft: 0,
|
|
506
491
|
scrollTop: 0
|
|
507
|
-
}, l = f(1), u = f(0), d =
|
|
508
|
-
if ((d || !
|
|
509
|
-
let e =
|
|
510
|
-
l =
|
|
492
|
+
}, l = f(1), u = f(0), d = L(r);
|
|
493
|
+
if ((d || !a) && ((N(r) !== "body" || R(o)) && (c = G(r)), d)) {
|
|
494
|
+
let e = Z(r);
|
|
495
|
+
l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
511
496
|
}
|
|
512
|
-
let p = o && !d && !a ?
|
|
497
|
+
let p = o && !d && !a ? we(o, c) : f(0);
|
|
513
498
|
return {
|
|
514
499
|
width: n.width * l.x,
|
|
515
500
|
height: n.height * l.y,
|
|
@@ -517,40 +502,39 @@ function Ee(e) {
|
|
|
517
502
|
y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
|
|
518
503
|
};
|
|
519
504
|
}
|
|
520
|
-
function
|
|
521
|
-
return Array.from(e.getClientRects());
|
|
505
|
+
function Ee(e) {
|
|
506
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
522
507
|
}
|
|
523
|
-
function
|
|
524
|
-
let t =
|
|
525
|
-
return
|
|
526
|
-
width:
|
|
527
|
-
height:
|
|
528
|
-
x:
|
|
529
|
-
y:
|
|
508
|
+
function De(e) {
|
|
509
|
+
let t = G(e), n = e.ownerDocument.body, r = l(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = l(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Q(e), o = -t.scrollTop;
|
|
510
|
+
return W(n).direction === "rtl" && (a += l(e.clientWidth, n.clientWidth) - r), {
|
|
511
|
+
width: r,
|
|
512
|
+
height: i,
|
|
513
|
+
x: a,
|
|
514
|
+
y: o
|
|
530
515
|
};
|
|
531
516
|
}
|
|
532
|
-
var
|
|
533
|
-
function
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
let e =
|
|
538
|
-
|
|
517
|
+
var Oe = 25;
|
|
518
|
+
function ke(e, t, n) {
|
|
519
|
+
n === void 0 && (n = "viewport");
|
|
520
|
+
let r = n === "layoutViewport", i = P(e), a = F(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
521
|
+
if (o) {
|
|
522
|
+
let e = !H() || t === "fixed";
|
|
523
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
524
|
+
}
|
|
525
|
+
if (Q(a) <= 0) {
|
|
526
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
527
|
+
o <= Oe && (s -= o);
|
|
539
528
|
}
|
|
540
|
-
let l = Z(r);
|
|
541
|
-
if (l <= 0) {
|
|
542
|
-
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);
|
|
543
|
-
o <= ke && (a -= o);
|
|
544
|
-
} else l <= ke && (a += l);
|
|
545
529
|
return {
|
|
546
|
-
width:
|
|
547
|
-
height:
|
|
548
|
-
x:
|
|
549
|
-
y:
|
|
530
|
+
width: s,
|
|
531
|
+
height: c,
|
|
532
|
+
x: l,
|
|
533
|
+
y: u
|
|
550
534
|
};
|
|
551
535
|
}
|
|
552
|
-
function
|
|
553
|
-
let n =
|
|
536
|
+
function Ae(e, t) {
|
|
537
|
+
let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = X(e);
|
|
554
538
|
return {
|
|
555
539
|
width: e.clientWidth * a.x,
|
|
556
540
|
height: e.clientHeight * a.y,
|
|
@@ -558,13 +542,13 @@ function je(e, t) {
|
|
|
558
542
|
y: r * a.y
|
|
559
543
|
};
|
|
560
544
|
}
|
|
561
|
-
function
|
|
545
|
+
function je(e, t, n) {
|
|
562
546
|
let r;
|
|
563
|
-
if (t === "viewport") r =
|
|
564
|
-
else if (t === "document") r =
|
|
565
|
-
else if (
|
|
547
|
+
if (t === "viewport" || t === "layoutViewport") r = ke(e, n, t);
|
|
548
|
+
else if (t === "document") r = De(F(e));
|
|
549
|
+
else if (I(t)) r = Ae(t, n);
|
|
566
550
|
else {
|
|
567
|
-
let n =
|
|
551
|
+
let n = Se(e);
|
|
568
552
|
r = {
|
|
569
553
|
x: t.x - n.x,
|
|
570
554
|
y: t.y - n.y,
|
|
@@ -572,26 +556,22 @@ function Me(e, t, n) {
|
|
|
572
556
|
height: t.height
|
|
573
557
|
};
|
|
574
558
|
}
|
|
575
|
-
return
|
|
559
|
+
return j(r);
|
|
576
560
|
}
|
|
577
|
-
function
|
|
578
|
-
let n = G(e);
|
|
579
|
-
return n === t || !F(n) || H(n) ? !1 : U(n).position === "fixed" || Ne(n, t);
|
|
580
|
-
}
|
|
581
|
-
function Pe(e, t) {
|
|
561
|
+
function Me(e, t) {
|
|
582
562
|
let n = t.get(e);
|
|
583
563
|
if (n) return n;
|
|
584
|
-
let r =
|
|
585
|
-
for (;
|
|
586
|
-
let
|
|
587
|
-
!
|
|
564
|
+
let r = q(e, [], !1).filter((e) => I(e) && N(e) !== "body"), i = null, a = W(e).position === "fixed", o = a ? K(e) : e;
|
|
565
|
+
for (; I(o) && !U(o);) {
|
|
566
|
+
let e = W(o), t = V(o), n = i ? i.position : a ? "fixed" : "";
|
|
567
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = K(o);
|
|
588
568
|
}
|
|
589
569
|
return t.set(e, r), r;
|
|
590
570
|
}
|
|
591
|
-
function
|
|
592
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
571
|
+
function Ne(e) {
|
|
572
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? z(t) ? [] : Me(t, this._c) : [].concat(n), r], o = je(t, a[0], i), s = o.top, u = o.right, d = o.bottom, f = o.left;
|
|
593
573
|
for (let e = 1; e < a.length; e++) {
|
|
594
|
-
let n =
|
|
574
|
+
let n = je(t, a[e], i);
|
|
595
575
|
s = l(n.top, s), u = c(n.right, u), d = c(n.bottom, d), f = l(n.left, f);
|
|
596
576
|
}
|
|
597
577
|
return {
|
|
@@ -601,62 +581,59 @@ function Fe(e) {
|
|
|
601
581
|
y: s
|
|
602
582
|
};
|
|
603
583
|
}
|
|
604
|
-
function
|
|
605
|
-
let { width: t, height: n } =
|
|
584
|
+
function Pe(e) {
|
|
585
|
+
let { width: t, height: n } = be(e);
|
|
606
586
|
return {
|
|
607
587
|
width: t,
|
|
608
588
|
height: n
|
|
609
589
|
};
|
|
610
590
|
}
|
|
611
|
-
function
|
|
612
|
-
let r =
|
|
591
|
+
function Fe(e, t, n) {
|
|
592
|
+
let r = L(t), i = F(t), a = n === "fixed", o = Z(e, !0, a, t), s = {
|
|
613
593
|
scrollLeft: 0,
|
|
614
594
|
scrollTop: 0
|
|
615
595
|
}, c = f(0);
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
if (r || !r && !a) if ((M(t) !== "body" || L(i)) && (s = W(t)), r) {
|
|
620
|
-
let e = X(t, !0, a, t);
|
|
596
|
+
if ((r || !a) && ((N(t) !== "body" || R(i)) && (s = G(t)), r)) {
|
|
597
|
+
let e = Z(t, !0, a, t);
|
|
621
598
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
let
|
|
599
|
+
}
|
|
600
|
+
!r && i && (c.x = Q(i));
|
|
601
|
+
let l = i && !r && !a ? we(i, s) : f(0);
|
|
625
602
|
return {
|
|
626
|
-
x: o.left + s.scrollLeft - c.x -
|
|
627
|
-
y: o.top + s.scrollTop - c.y -
|
|
603
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
604
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
628
605
|
width: o.width,
|
|
629
606
|
height: o.height
|
|
630
607
|
};
|
|
631
608
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
609
|
+
function Ie(e) {
|
|
610
|
+
return W(e).position === "static";
|
|
634
611
|
}
|
|
635
|
-
function
|
|
636
|
-
if (!
|
|
612
|
+
function Le(e, t) {
|
|
613
|
+
if (!L(e) || W(e).position === "fixed") return null;
|
|
637
614
|
if (t) return t(e);
|
|
638
615
|
let n = e.offsetParent;
|
|
639
|
-
return
|
|
640
|
-
}
|
|
641
|
-
function
|
|
642
|
-
let n =
|
|
643
|
-
if (
|
|
644
|
-
if (!
|
|
645
|
-
let t =
|
|
646
|
-
for (; t && !
|
|
647
|
-
if (
|
|
648
|
-
t =
|
|
616
|
+
return F(e) === n && (n = n.ownerDocument.body), n;
|
|
617
|
+
}
|
|
618
|
+
function Re(e, t) {
|
|
619
|
+
let n = P(e);
|
|
620
|
+
if (z(e)) return n;
|
|
621
|
+
if (!L(e)) {
|
|
622
|
+
let t = K(e);
|
|
623
|
+
for (; t && !U(t);) {
|
|
624
|
+
if (I(t) && !Ie(t)) return t;
|
|
625
|
+
t = K(t);
|
|
649
626
|
}
|
|
650
627
|
return n;
|
|
651
628
|
}
|
|
652
|
-
let r =
|
|
653
|
-
for (; r &&
|
|
654
|
-
return r &&
|
|
629
|
+
let r = Le(e, t);
|
|
630
|
+
for (; r && me(r) && Ie(r);) r = Le(r, t);
|
|
631
|
+
return r && U(r) && Ie(r) && !V(r) ? n : r || ve(e) || n;
|
|
655
632
|
}
|
|
656
|
-
var
|
|
657
|
-
let t = this.getOffsetParent ||
|
|
633
|
+
var ze = async function(e) {
|
|
634
|
+
let t = this.getOffsetParent || Re, n = this.getDimensions, r = await n(e.floating);
|
|
658
635
|
return {
|
|
659
|
-
reference:
|
|
636
|
+
reference: Fe(e.reference, await t(e.floating), e.strategy),
|
|
660
637
|
floating: {
|
|
661
638
|
x: 0,
|
|
662
639
|
y: 0,
|
|
@@ -665,67 +642,71 @@ var Be = async function(e) {
|
|
|
665
642
|
}
|
|
666
643
|
};
|
|
667
644
|
};
|
|
668
|
-
function
|
|
669
|
-
return
|
|
670
|
-
}
|
|
671
|
-
var
|
|
672
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
673
|
-
getDocumentElement:
|
|
674
|
-
getClippingRect:
|
|
675
|
-
getOffsetParent:
|
|
676
|
-
getElementRects:
|
|
677
|
-
getClientRects:
|
|
678
|
-
getDimensions:
|
|
679
|
-
getScale:
|
|
680
|
-
isElement:
|
|
681
|
-
isRTL:
|
|
645
|
+
function Be(e) {
|
|
646
|
+
return W(e).direction === "rtl";
|
|
647
|
+
}
|
|
648
|
+
var Ve = {
|
|
649
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Te,
|
|
650
|
+
getDocumentElement: F,
|
|
651
|
+
getClippingRect: Ne,
|
|
652
|
+
getOffsetParent: Re,
|
|
653
|
+
getElementRects: ze,
|
|
654
|
+
getClientRects: Ee,
|
|
655
|
+
getDimensions: Pe,
|
|
656
|
+
getScale: X,
|
|
657
|
+
isElement: I,
|
|
658
|
+
isRTL: Be
|
|
682
659
|
};
|
|
683
|
-
function
|
|
660
|
+
function He(e, t) {
|
|
684
661
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
685
662
|
}
|
|
686
|
-
function
|
|
687
|
-
let
|
|
688
|
-
function
|
|
663
|
+
function Ue(e, t, n) {
|
|
664
|
+
let r = null, i, a = F(e);
|
|
665
|
+
function o() {
|
|
689
666
|
var e;
|
|
690
|
-
clearTimeout(
|
|
667
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
691
668
|
}
|
|
692
|
-
function
|
|
693
|
-
|
|
669
|
+
function s(n, u) {
|
|
670
|
+
n === void 0 && (n = !1), u === void 0 && (u = 1), o();
|
|
694
671
|
let f = e.getBoundingClientRect(), { left: p, top: m, width: h, height: g } = f;
|
|
695
|
-
if (
|
|
696
|
-
let _ = d(m), v = d(
|
|
672
|
+
if (n || t(), !h || !g) return;
|
|
673
|
+
let _ = d(m), v = d(a.clientWidth - (p + h)), y = d(a.clientHeight - (m + g)), b = d(p), x = {
|
|
697
674
|
rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
|
|
698
675
|
threshold: l(0, c(1, u)) || 1
|
|
699
|
-
},
|
|
700
|
-
function
|
|
676
|
+
}, S = !0;
|
|
677
|
+
function C(t) {
|
|
701
678
|
let n = t[0].intersectionRatio;
|
|
679
|
+
if (!He(f, e.getBoundingClientRect())) return s();
|
|
702
680
|
if (n !== u) {
|
|
703
|
-
if (!
|
|
704
|
-
n ?
|
|
705
|
-
|
|
681
|
+
if (!S) return s();
|
|
682
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
683
|
+
s(!1, 1e-7);
|
|
706
684
|
}, 1e3);
|
|
707
685
|
}
|
|
708
|
-
|
|
686
|
+
S = !1;
|
|
709
687
|
}
|
|
710
688
|
try {
|
|
711
|
-
|
|
689
|
+
r = new IntersectionObserver(C, {
|
|
712
690
|
...x,
|
|
713
|
-
root:
|
|
691
|
+
root: a.ownerDocument
|
|
714
692
|
});
|
|
715
693
|
} catch {
|
|
716
|
-
|
|
694
|
+
r = new IntersectionObserver(C, x);
|
|
717
695
|
}
|
|
718
|
-
|
|
696
|
+
r.observe(e);
|
|
719
697
|
}
|
|
720
|
-
|
|
698
|
+
let u = P(e), f = () => s(n);
|
|
699
|
+
return u.addEventListener("resize", f), s(!0), () => {
|
|
700
|
+
u.removeEventListener("resize", f), o();
|
|
701
|
+
};
|
|
721
702
|
}
|
|
722
|
-
function
|
|
703
|
+
function We(e, t, n, r) {
|
|
723
704
|
r === void 0 && (r = {});
|
|
724
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l =
|
|
705
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Y(e), u = i || a ? [...l ? q(l) : [], ...t ? q(t) : []] : [];
|
|
725
706
|
u.forEach((e) => {
|
|
726
|
-
i && e.addEventListener("scroll", n
|
|
707
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
727
708
|
});
|
|
728
|
-
let d = l && s ?
|
|
709
|
+
let d = l && s ? Ue(l, n, a) : null, f = -1, p = null;
|
|
729
710
|
o && (p = new ResizeObserver((e) => {
|
|
730
711
|
let [r] = e;
|
|
731
712
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -733,11 +714,11 @@ function Ge(e, t, n, r) {
|
|
|
733
714
|
(e = p) == null || e.observe(t);
|
|
734
715
|
})), n();
|
|
735
716
|
}), l && !c && p.observe(l), t && p.observe(t));
|
|
736
|
-
let m, h = c ?
|
|
717
|
+
let m, h = c ? Z(e) : null;
|
|
737
718
|
c && g();
|
|
738
719
|
function g() {
|
|
739
|
-
let t =
|
|
740
|
-
h && !
|
|
720
|
+
let t = Z(e);
|
|
721
|
+
h && !He(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
741
722
|
}
|
|
742
723
|
return n(), () => {
|
|
743
724
|
var e;
|
|
@@ -746,19 +727,17 @@ function Ge(e, t, n, r) {
|
|
|
746
727
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
747
728
|
};
|
|
748
729
|
}
|
|
749
|
-
var
|
|
750
|
-
let r = /* @__PURE__ */ new Map(), i = {
|
|
751
|
-
|
|
752
|
-
...n
|
|
753
|
-
}, a = {
|
|
730
|
+
var Ge = ue, Ke = de, qe = se, Je = (e, t, n) => {
|
|
731
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
732
|
+
...Ve,
|
|
754
733
|
...i.platform,
|
|
755
734
|
_c: r
|
|
756
735
|
};
|
|
757
|
-
return
|
|
736
|
+
return oe(e, t, {
|
|
758
737
|
...i,
|
|
759
738
|
platform: a
|
|
760
739
|
});
|
|
761
|
-
},
|
|
740
|
+
}, Ye = "fhi-tooltip", $ = class extends a {
|
|
762
741
|
constructor(...e) {
|
|
763
742
|
super(...e), this.message = "", this.placement = "top", this.delay = 500, this.trigger = "hover", this.maxWidth = "18.75rem", this._timeoutId = void 0, this._autoPositioningCleanup = () => {}, this._isVisible = !1, this._isFadingOut = !1, this._position = {
|
|
764
743
|
top: 0,
|
|
@@ -781,14 +760,14 @@ var Ke = de, qe = fe, Je = ce, Ye = (e, t, n) => {
|
|
|
781
760
|
}, 150));
|
|
782
761
|
}
|
|
783
762
|
_positionTooltip(e) {
|
|
784
|
-
this._autoPositioningCleanup =
|
|
785
|
-
|
|
763
|
+
this._autoPositioningCleanup = We(this._anchor, this._tooltip, () => {
|
|
764
|
+
Je(this._anchor, this._tooltip, {
|
|
786
765
|
placement: e || "top",
|
|
787
766
|
strategy: "fixed",
|
|
788
767
|
middleware: [
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
768
|
+
qe({ fallbackAxisSideDirection: "start" }),
|
|
769
|
+
Ke(),
|
|
770
|
+
Ge(4)
|
|
792
771
|
]
|
|
793
772
|
}).then(({ x: e, y: t }) => {
|
|
794
773
|
this._position = {
|
|
@@ -840,25 +819,6 @@ var Ke = de, qe = fe, Je = ce, Ye = (e, t, n) => {
|
|
|
840
819
|
}
|
|
841
820
|
static {
|
|
842
821
|
this.styles = t`
|
|
843
|
-
:host {
|
|
844
|
-
--color-background: var(--fhi-color-neutral-base-active);
|
|
845
|
-
--color-text: var(--fhi-color-neutral-text-inverted);
|
|
846
|
-
--color-border: none;
|
|
847
|
-
|
|
848
|
-
--typography-font-family: var(--fhi-font-family-default);
|
|
849
|
-
--typography-font-size: var(--fhi-typography-body-small-font-size);
|
|
850
|
-
--typography-font-style: normal;
|
|
851
|
-
--typography-font-weight: var(--fhi-typography-body-small-font-weight);
|
|
852
|
-
--typography-line-height: var(--fhi-typography-body-small-line-height);
|
|
853
|
-
--typography-letter-spacing: var(
|
|
854
|
-
--fhi-typography-body-small-letter-spacing
|
|
855
|
-
);
|
|
856
|
-
|
|
857
|
-
--dimension-border-radius: var(--fhi-border-radius-050);
|
|
858
|
-
--dimension-border-width: none;
|
|
859
|
-
--dimension-padding: var(--fhi-spacing-050) var(--fhi-spacing-100);
|
|
860
|
-
}
|
|
861
|
-
|
|
862
822
|
:host {
|
|
863
823
|
#tooltip-anchor {
|
|
864
824
|
width: max-content;
|
|
@@ -869,33 +829,35 @@ var Ke = de, qe = fe, Je = ce, Ye = (e, t, n) => {
|
|
|
869
829
|
top: 0;
|
|
870
830
|
left: 0;
|
|
871
831
|
position: fixed;
|
|
872
|
-
border: var(--dimension-border-width) solid var(--color-border);
|
|
873
832
|
visibility: hidden;
|
|
874
833
|
opacity: 0;
|
|
875
834
|
margin: 0;
|
|
876
835
|
transition: opacity 0.15s ease-in-out;
|
|
877
836
|
width: max-content;
|
|
878
|
-
padding: var(--
|
|
879
|
-
border-radius: var(--
|
|
880
|
-
background-color: var(--color-
|
|
881
|
-
color: var(--color-text);
|
|
882
|
-
font-family: var(--
|
|
837
|
+
padding: var(--fhi-spacing-050) var(--fhi-spacing-100);
|
|
838
|
+
border-radius: var(--fhi-border-radius-050);
|
|
839
|
+
background-color: var(--fhi-color-neutral-base-active);
|
|
840
|
+
color: var(--fhi-color-neutral-text-inverted);
|
|
841
|
+
font-family: var(--fhi-font-family-default);
|
|
883
842
|
-webkit-font-smoothing: antialiased;
|
|
884
|
-
font-size: var(--typography-font-size);
|
|
885
|
-
font-weight: var(--typography-font-weight);
|
|
886
|
-
line-height: var(--typography-line-height);
|
|
887
|
-
letter-spacing: var(--typography-letter-spacing);
|
|
843
|
+
font-size: var(--fhi-typography-body-small-font-size);
|
|
844
|
+
font-weight: var(--fhi-typography-body-small-font-weight);
|
|
845
|
+
line-height: var(--fhi-typography-body-small-line-height);
|
|
846
|
+
letter-spacing: var(--fhi-typography-body-small-letter-spacing);
|
|
888
847
|
font-variant-numeric: lining-nums proportional-nums;
|
|
889
848
|
font-style: normal;
|
|
890
849
|
cursor: default;
|
|
850
|
+
|
|
891
851
|
&[aria-hidden='false'] {
|
|
892
852
|
z-index: 1000;
|
|
893
853
|
visibility: visible;
|
|
894
854
|
opacity: 1;
|
|
895
855
|
}
|
|
856
|
+
|
|
896
857
|
&[fading-out] {
|
|
897
858
|
opacity: 0;
|
|
898
859
|
}
|
|
860
|
+
|
|
899
861
|
&::after {
|
|
900
862
|
content: '';
|
|
901
863
|
position: absolute;
|
|
@@ -912,8 +874,8 @@ var Ke = de, qe = fe, Je = ce, Ye = (e, t, n) => {
|
|
|
912
874
|
o([e({ type: String })], $.prototype, "message", void 0), o([e({ type: String })], $.prototype, "placement", void 0), o([e({ type: Number })], $.prototype, "delay", void 0), o([e({ type: String })], $.prototype, "trigger", void 0), o([e({
|
|
913
875
|
type: String,
|
|
914
876
|
attribute: "max-width"
|
|
915
|
-
})], $.prototype, "maxWidth", void 0), o([i("#tooltip-anchor")], $.prototype, "_anchor", void 0), o([i("#tooltip")], $.prototype, "_tooltip", void 0), o([n()], $.prototype, "_isVisible", void 0), o([n()], $.prototype, "_isFadingOut", void 0), o([n()], $.prototype, "_position", void 0), $ = o([r(
|
|
877
|
+
})], $.prototype, "maxWidth", void 0), o([i("#tooltip-anchor")], $.prototype, "_anchor", void 0), o([i("#tooltip")], $.prototype, "_tooltip", void 0), o([n()], $.prototype, "_isVisible", void 0), o([n()], $.prototype, "_isFadingOut", void 0), o([n()], $.prototype, "_position", void 0), $ = o([r(Ye)], $);
|
|
916
878
|
//#endregion
|
|
917
|
-
export {
|
|
879
|
+
export { Ye as n, $ as t };
|
|
918
880
|
|
|
919
|
-
//# sourceMappingURL=fhi-tooltip.component-
|
|
881
|
+
//# sourceMappingURL=fhi-tooltip.component-Bs2jmkyC.js.map
|