@c2n/tooltip 0.0.6

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.
@@ -0,0 +1,1468 @@
1
+ import { LitElement, html, nothing, unsafeCSS } from "lit";
2
+ import { isServer } from "lit-html/is-server.js";
3
+ import { customElement, property, query, state } from "lit/decorators.js";
4
+ //#region ../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
5
+ /**
6
+ * Custom positioning reference element.
7
+ * @see https://floating-ui.com/docs/virtual-elements
8
+ */
9
+ var sides = [
10
+ "top",
11
+ "right",
12
+ "bottom",
13
+ "left"
14
+ ];
15
+ var alignments = ["start", "end"];
16
+ var placements = /*#__PURE__*/ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
17
+ var min = Math.min;
18
+ var max = Math.max;
19
+ var round = Math.round;
20
+ var floor = Math.floor;
21
+ var createCoords = (v) => ({
22
+ x: v,
23
+ y: v
24
+ });
25
+ var oppositeSideMap = {
26
+ left: "right",
27
+ right: "left",
28
+ bottom: "top",
29
+ top: "bottom"
30
+ };
31
+ function clamp(start, value, end) {
32
+ return max(start, min(value, end));
33
+ }
34
+ function evaluate(value, param) {
35
+ return typeof value === "function" ? value(param) : value;
36
+ }
37
+ function getSide(placement) {
38
+ return placement.split("-")[0];
39
+ }
40
+ function getAlignment(placement) {
41
+ return placement.split("-")[1];
42
+ }
43
+ function getOppositeAxis(axis) {
44
+ return axis === "x" ? "y" : "x";
45
+ }
46
+ function getAxisLength(axis) {
47
+ return axis === "y" ? "height" : "width";
48
+ }
49
+ function getSideAxis(placement) {
50
+ const firstChar = placement[0];
51
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
52
+ }
53
+ function getAlignmentAxis(placement) {
54
+ return getOppositeAxis(getSideAxis(placement));
55
+ }
56
+ function getAlignmentSides(placement, rects, rtl) {
57
+ if (rtl === void 0) rtl = false;
58
+ const alignment = getAlignment(placement);
59
+ const alignmentAxis = getAlignmentAxis(placement);
60
+ const length = getAxisLength(alignmentAxis);
61
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
62
+ if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
63
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
64
+ }
65
+ function getExpandedPlacements(placement) {
66
+ const oppositePlacement = getOppositePlacement(placement);
67
+ return [
68
+ getOppositeAlignmentPlacement(placement),
69
+ oppositePlacement,
70
+ getOppositeAlignmentPlacement(oppositePlacement)
71
+ ];
72
+ }
73
+ function getOppositeAlignmentPlacement(placement) {
74
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
75
+ }
76
+ var lrPlacement = ["left", "right"];
77
+ var rlPlacement = ["right", "left"];
78
+ var tbPlacement = ["top", "bottom"];
79
+ var btPlacement = ["bottom", "top"];
80
+ function getSideList(side, isStart, rtl) {
81
+ switch (side) {
82
+ case "top":
83
+ case "bottom":
84
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
85
+ return isStart ? lrPlacement : rlPlacement;
86
+ case "left":
87
+ case "right": return isStart ? tbPlacement : btPlacement;
88
+ default: return [];
89
+ }
90
+ }
91
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
92
+ const alignment = getAlignment(placement);
93
+ let list = getSideList(getSide(placement), direction === "start", rtl);
94
+ if (alignment) {
95
+ list = list.map((side) => side + "-" + alignment);
96
+ if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
97
+ }
98
+ return list;
99
+ }
100
+ function getOppositePlacement(placement) {
101
+ const side = getSide(placement);
102
+ return oppositeSideMap[side] + placement.slice(side.length);
103
+ }
104
+ function expandPaddingObject(padding) {
105
+ var _padding$top, _padding$right, _padding$bottom, _padding$left;
106
+ return {
107
+ top: (_padding$top = padding.top) != null ? _padding$top : 0,
108
+ right: (_padding$right = padding.right) != null ? _padding$right : 0,
109
+ bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
110
+ left: (_padding$left = padding.left) != null ? _padding$left : 0
111
+ };
112
+ }
113
+ function getPaddingObject(padding) {
114
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
115
+ top: padding,
116
+ right: padding,
117
+ bottom: padding,
118
+ left: padding
119
+ };
120
+ }
121
+ function rectToClientRect(rect) {
122
+ const { x, y, width, height } = rect;
123
+ return {
124
+ width,
125
+ height,
126
+ top: y,
127
+ left: x,
128
+ right: x + width,
129
+ bottom: y + height,
130
+ x,
131
+ y
132
+ };
133
+ }
134
+ //#endregion
135
+ //#region ../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs
136
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
137
+ let { reference, floating } = _ref;
138
+ const sideAxis = getSideAxis(placement);
139
+ const alignmentAxis = getAlignmentAxis(placement);
140
+ const alignLength = getAxisLength(alignmentAxis);
141
+ const side = getSide(placement);
142
+ const isVertical = sideAxis === "y";
143
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
144
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
145
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
146
+ let coords;
147
+ switch (side) {
148
+ case "top":
149
+ coords = {
150
+ x: commonX,
151
+ y: reference.y - floating.height
152
+ };
153
+ break;
154
+ case "bottom":
155
+ coords = {
156
+ x: commonX,
157
+ y: reference.y + reference.height
158
+ };
159
+ break;
160
+ case "right":
161
+ coords = {
162
+ x: reference.x + reference.width,
163
+ y: commonY
164
+ };
165
+ break;
166
+ case "left":
167
+ coords = {
168
+ x: reference.x - floating.width,
169
+ y: commonY
170
+ };
171
+ break;
172
+ default: coords = {
173
+ x: reference.x,
174
+ y: reference.y
175
+ };
176
+ }
177
+ const alignment = getAlignment(placement);
178
+ if (alignment) coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
179
+ return coords;
180
+ }
181
+ /**
182
+ * Resolves with an object of overflow side offsets that determine how much the
183
+ * element is overflowing a given clipping boundary on each side.
184
+ * - positive = overflowing the boundary by that number of pixels
185
+ * - negative = how many pixels left before it will overflow
186
+ * - 0 = lies flush with the boundary
187
+ * @see https://floating-ui.com/docs/detectOverflow
188
+ */
189
+ async function detectOverflow(state, options) {
190
+ var _await$platform$isEle;
191
+ if (options === void 0) options = {};
192
+ const { x, y, platform, rects, elements, strategy } = state;
193
+ const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
194
+ const paddingObject = getPaddingObject(padding);
195
+ const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
196
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
197
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
198
+ boundary,
199
+ rootBoundary,
200
+ strategy
201
+ }));
202
+ const rect = elementContext === "floating" ? {
203
+ x,
204
+ y,
205
+ width: rects.floating.width,
206
+ height: rects.floating.height
207
+ } : rects.reference;
208
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
209
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) && await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
210
+ x: 1,
211
+ y: 1
212
+ };
213
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
214
+ elements,
215
+ rect,
216
+ offsetParent,
217
+ strategy
218
+ }) : rect);
219
+ return {
220
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
221
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
222
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
223
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
224
+ };
225
+ }
226
+ var MAX_RESET_COUNT = 50;
227
+ /**
228
+ * Computes the `x` and `y` coordinates that will place the floating element
229
+ * next to a given reference element.
230
+ *
231
+ * This export does not have any `platform` interface logic. You will need to
232
+ * write one for the platform you are using Floating UI with.
233
+ */
234
+ var computePosition$1 = async (reference, floating, config) => {
235
+ const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
236
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
237
+ ...platform,
238
+ detectOverflow
239
+ };
240
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
241
+ let rects = await platform.getElementRects({
242
+ reference,
243
+ floating,
244
+ strategy
245
+ });
246
+ let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
247
+ let statefulPlacement = placement;
248
+ let resetCount = 0;
249
+ const middlewareData = {};
250
+ for (let i = 0; i < middleware.length; i++) {
251
+ const currentMiddleware = middleware[i];
252
+ if (!currentMiddleware) continue;
253
+ const { name, fn } = currentMiddleware;
254
+ const { x: nextX, y: nextY, data, reset } = await fn({
255
+ x,
256
+ y,
257
+ initialPlacement: placement,
258
+ placement: statefulPlacement,
259
+ strategy,
260
+ middlewareData,
261
+ rects,
262
+ platform: platformWithDetectOverflow,
263
+ elements: {
264
+ reference,
265
+ floating
266
+ }
267
+ });
268
+ x = nextX != null ? nextX : x;
269
+ y = nextY != null ? nextY : y;
270
+ middlewareData[name] = {
271
+ ...middlewareData[name],
272
+ ...data
273
+ };
274
+ if (reset && resetCount < MAX_RESET_COUNT) {
275
+ resetCount++;
276
+ if (typeof reset === "object") {
277
+ if (reset.placement) statefulPlacement = reset.placement;
278
+ if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
279
+ reference,
280
+ floating,
281
+ strategy
282
+ }) : reset.rects;
283
+ ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
284
+ }
285
+ i = -1;
286
+ }
287
+ }
288
+ return {
289
+ x,
290
+ y,
291
+ placement: statefulPlacement,
292
+ strategy,
293
+ middlewareData
294
+ };
295
+ };
296
+ /**
297
+ * Provides data to position an inner element of the floating element so that it
298
+ * appears centered to the reference element.
299
+ * @see https://floating-ui.com/docs/arrow
300
+ */
301
+ var arrow$1 = (options) => ({
302
+ name: "arrow",
303
+ options,
304
+ async fn(state) {
305
+ const { x, y, placement, rects, platform, elements, middlewareData } = state;
306
+ const { element, padding = 0 } = evaluate(options, state) || {};
307
+ if (element == null) return {};
308
+ const paddingObject = getPaddingObject(padding);
309
+ const coords = {
310
+ x,
311
+ y
312
+ };
313
+ const axis = getAlignmentAxis(placement);
314
+ const length = getAxisLength(axis);
315
+ const arrowDimensions = await platform.getDimensions(element);
316
+ const isYAxis = axis === "y";
317
+ const minProp = isYAxis ? "top" : "left";
318
+ const maxProp = isYAxis ? "bottom" : "right";
319
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
320
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
321
+ const startDiff = coords[axis] - rects.reference[axis];
322
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
323
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
324
+ if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
325
+ const centerToReference = endDiff / 2 - startDiff / 2;
326
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
327
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
328
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
329
+ const max = clientSize - arrowDimensions[length] - maxPadding;
330
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
331
+ const offset = clamp(minPadding, center, max);
332
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
333
+ const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
334
+ return {
335
+ [axis]: coords[axis] + alignmentOffset,
336
+ data: {
337
+ [axis]: offset,
338
+ centerOffset: center - offset - alignmentOffset,
339
+ ...shouldAddOffset && { alignmentOffset }
340
+ },
341
+ reset: shouldAddOffset
342
+ };
343
+ }
344
+ });
345
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
346
+ return (alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement)).filter((placement) => {
347
+ if (alignment) return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
348
+ return true;
349
+ });
350
+ }
351
+ /**
352
+ * Optimizes the visibility of the floating element by choosing the placement
353
+ * that has the most space available automatically, without needing to specify a
354
+ * preferred placement. Alternative to `flip`.
355
+ * @see https://floating-ui.com/docs/autoPlacement
356
+ */
357
+ var autoPlacement$1 = function(options) {
358
+ if (options === void 0) options = {};
359
+ return {
360
+ name: "autoPlacement",
361
+ options,
362
+ async fn(state) {
363
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
364
+ const { rects, middlewareData, placement, platform, elements } = state;
365
+ const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
366
+ const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
367
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
368
+ const currentPlacement = placements$1[currentIndex];
369
+ if (currentPlacement == null) return {};
370
+ if (placement !== currentPlacement) return { reset: { placement: placements$1[0] } };
371
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
372
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
373
+ const currentOverflows = [
374
+ overflow[getSide(currentPlacement)],
375
+ overflow[alignmentSides[0]],
376
+ overflow[alignmentSides[1]]
377
+ ];
378
+ const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {
379
+ placement: currentPlacement,
380
+ overflows: currentOverflows
381
+ }];
382
+ const nextPlacement = placements$1[currentIndex + 1];
383
+ if (nextPlacement) return {
384
+ data: {
385
+ index: currentIndex + 1,
386
+ overflows: allOverflows
387
+ },
388
+ reset: { placement: nextPlacement }
389
+ };
390
+ const placementsSortedByMostSpace = allOverflows.map((d) => {
391
+ const alignment = getAlignment(d.placement);
392
+ return [
393
+ d.placement,
394
+ alignment && crossAxis ? d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : d.overflows[0],
395
+ d.overflows
396
+ ];
397
+ }).sort((a, b) => a[1] - b[1]);
398
+ const resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d) => d[2].slice(0, getAlignment(d[0]) ? 2 : 3).every((v) => v <= 0))[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
399
+ if (resetPlacement !== placement) return {
400
+ data: {
401
+ index: currentIndex + 1,
402
+ overflows: allOverflows
403
+ },
404
+ reset: { placement: resetPlacement }
405
+ };
406
+ return {};
407
+ }
408
+ };
409
+ };
410
+ /**
411
+ * Optimizes the visibility of the floating element by flipping the `placement`
412
+ * in order to keep it in view when the preferred placement(s) will overflow the
413
+ * clipping boundary. Alternative to `autoPlacement`.
414
+ * @see https://floating-ui.com/docs/flip
415
+ */
416
+ var flip$1 = function(options) {
417
+ if (options === void 0) options = {};
418
+ return {
419
+ name: "flip",
420
+ options,
421
+ async fn(state) {
422
+ var _middlewareData$arrow, _middlewareData$flip;
423
+ const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
424
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
425
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
426
+ const side = getSide(placement);
427
+ const initialSideAxis = getSideAxis(initialPlacement);
428
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
429
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
430
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
431
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
432
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
433
+ const placements = [initialPlacement, ...fallbackPlacements];
434
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
435
+ const overflows = [];
436
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
437
+ if (checkMainAxis) overflows.push(overflow[side]);
438
+ if (checkCrossAxis) {
439
+ const sides = getAlignmentSides(placement, rects, rtl);
440
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
441
+ }
442
+ overflowsData = [...overflowsData, {
443
+ placement,
444
+ overflows
445
+ }];
446
+ if (!overflows.every((side) => side <= 0)) {
447
+ var _middlewareData$flip2, _overflowsData$filter;
448
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
449
+ const nextPlacement = placements[nextIndex];
450
+ if (nextPlacement) {
451
+ if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
452
+ data: {
453
+ index: nextIndex,
454
+ overflows: overflowsData
455
+ },
456
+ reset: { placement: nextPlacement }
457
+ };
458
+ }
459
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
460
+ if (!resetPlacement) switch (fallbackStrategy) {
461
+ case "bestFit": {
462
+ var _overflowsData$filter2;
463
+ const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
464
+ if (hasFallbackAxisSideDirection) {
465
+ const currentSideAxis = getSideAxis(d.placement);
466
+ return currentSideAxis === initialSideAxis || currentSideAxis === "y";
467
+ }
468
+ return true;
469
+ }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
470
+ if (placement) resetPlacement = placement;
471
+ break;
472
+ }
473
+ case "initialPlacement": resetPlacement = initialPlacement;
474
+ }
475
+ if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
476
+ }
477
+ return {};
478
+ }
479
+ };
480
+ };
481
+ var originSides = /*#__PURE__*/ new Set(["left", "top"]);
482
+ async function convertValueToCoords(state, options) {
483
+ const { placement, platform, elements } = state;
484
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
485
+ const side = getSide(placement);
486
+ const alignment = getAlignment(placement);
487
+ const isVertical = getSideAxis(placement) === "y";
488
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
489
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
490
+ const rawValue = evaluate(options, state);
491
+ let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
492
+ mainAxis: rawValue,
493
+ crossAxis: 0,
494
+ alignmentAxis: null
495
+ } : {
496
+ mainAxis: rawValue.mainAxis || 0,
497
+ crossAxis: rawValue.crossAxis || 0,
498
+ alignmentAxis: rawValue.alignmentAxis
499
+ };
500
+ if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
501
+ return isVertical ? {
502
+ x: crossAxis * crossAxisMulti,
503
+ y: mainAxis * mainAxisMulti
504
+ } : {
505
+ x: mainAxis * mainAxisMulti,
506
+ y: crossAxis * crossAxisMulti
507
+ };
508
+ }
509
+ /**
510
+ * Modifies the placement by translating the floating element along the
511
+ * specified axes.
512
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
513
+ * object may be passed.
514
+ * @see https://floating-ui.com/docs/offset
515
+ */
516
+ var offset$1 = function(options) {
517
+ if (options === void 0) options = 0;
518
+ return {
519
+ name: "offset",
520
+ options,
521
+ async fn(state) {
522
+ var _middlewareData$offse, _middlewareData$arrow;
523
+ const { x, y, placement, middlewareData } = state;
524
+ const diffCoords = await convertValueToCoords(state, options);
525
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
526
+ return {
527
+ x: x + diffCoords.x,
528
+ y: y + diffCoords.y,
529
+ data: {
530
+ ...diffCoords,
531
+ placement
532
+ }
533
+ };
534
+ }
535
+ };
536
+ };
537
+ /**
538
+ * Optimizes the visibility of the floating element by shifting it in order to
539
+ * keep it in view when it will overflow the clipping boundary.
540
+ * @see https://floating-ui.com/docs/shift
541
+ */
542
+ var shift$1 = function(options) {
543
+ if (options === void 0) options = {};
544
+ return {
545
+ name: "shift",
546
+ options,
547
+ async fn(state) {
548
+ const { x, y, placement, platform } = state;
549
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
550
+ let { x, y } = _ref;
551
+ return {
552
+ x,
553
+ y
554
+ };
555
+ } }, ...detectOverflowOptions } = evaluate(options, state);
556
+ const coords = {
557
+ x,
558
+ y
559
+ };
560
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
561
+ const crossAxis = getSideAxis(placement);
562
+ const mainAxis = getOppositeAxis(crossAxis);
563
+ let mainAxisCoord = coords[mainAxis];
564
+ let crossAxisCoord = coords[crossAxis];
565
+ const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
566
+ if (checkMainAxis) mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
567
+ if (checkCrossAxis) crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
568
+ const limitedCoords = limiter.fn({
569
+ ...state,
570
+ [mainAxis]: mainAxisCoord,
571
+ [crossAxis]: crossAxisCoord
572
+ });
573
+ return {
574
+ ...limitedCoords,
575
+ data: {
576
+ x: limitedCoords.x - x,
577
+ y: limitedCoords.y - y,
578
+ enabled: {
579
+ [mainAxis]: checkMainAxis,
580
+ [crossAxis]: checkCrossAxis
581
+ }
582
+ }
583
+ };
584
+ }
585
+ };
586
+ };
587
+ //#endregion
588
+ //#region ../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
589
+ function hasWindow() {
590
+ return typeof window !== "undefined";
591
+ }
592
+ function getNodeName(node) {
593
+ if (isNode(node)) return (node.nodeName || "").toLowerCase();
594
+ return "#document";
595
+ }
596
+ function getWindow(node) {
597
+ var _node$ownerDocument;
598
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
599
+ }
600
+ function getDocumentElement(node) {
601
+ var _ref;
602
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
603
+ }
604
+ function isNode(value) {
605
+ if (!hasWindow()) return false;
606
+ return value instanceof Node || value instanceof getWindow(value).Node;
607
+ }
608
+ function isElement(value) {
609
+ if (!hasWindow()) return false;
610
+ return value instanceof Element || value instanceof getWindow(value).Element;
611
+ }
612
+ function isHTMLElement(value) {
613
+ if (!hasWindow()) return false;
614
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
615
+ }
616
+ function isShadowRoot(value) {
617
+ if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
618
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
619
+ }
620
+ function isOverflowElement(element) {
621
+ const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
622
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
623
+ }
624
+ function isTableElement(element) {
625
+ return /^(table|td|th)$/.test(getNodeName(element));
626
+ }
627
+ function isTopLayer(element) {
628
+ try {
629
+ if (element.matches(":popover-open")) return true;
630
+ } catch (_e) {}
631
+ try {
632
+ return element.matches(":modal");
633
+ } catch (_e) {
634
+ return false;
635
+ }
636
+ }
637
+ var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
638
+ var containRe = /paint|layout|strict|content/;
639
+ var isNotNone = (value) => !!value && value !== "none";
640
+ var isWebKitValue;
641
+ function isContainingBlock(elementOrCss) {
642
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
643
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
644
+ }
645
+ function getContainingBlock(element) {
646
+ let currentNode = getParentNode(element);
647
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
648
+ if (isContainingBlock(currentNode)) return currentNode;
649
+ else if (isTopLayer(currentNode)) return null;
650
+ currentNode = getParentNode(currentNode);
651
+ }
652
+ return null;
653
+ }
654
+ function isWebKit() {
655
+ if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
656
+ return isWebKitValue;
657
+ }
658
+ function isLastTraversableNode(node) {
659
+ return /^(html|body|#document)$/.test(getNodeName(node));
660
+ }
661
+ function getComputedStyle$1(element) {
662
+ return getWindow(element).getComputedStyle(element);
663
+ }
664
+ function getNodeScroll(element) {
665
+ if (isElement(element)) return {
666
+ scrollLeft: element.scrollLeft,
667
+ scrollTop: element.scrollTop
668
+ };
669
+ return {
670
+ scrollLeft: element.scrollX,
671
+ scrollTop: element.scrollY
672
+ };
673
+ }
674
+ function getParentNode(node) {
675
+ if (getNodeName(node) === "html") return node;
676
+ const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
677
+ return isShadowRoot(result) ? result.host : result;
678
+ }
679
+ function getNearestOverflowAncestor(node) {
680
+ const parentNode = getParentNode(node);
681
+ if (isLastTraversableNode(parentNode)) return (node.ownerDocument || node).body;
682
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
683
+ return getNearestOverflowAncestor(parentNode);
684
+ }
685
+ function getOverflowAncestors(node, list, traverseIframes) {
686
+ var _node$ownerDocument2;
687
+ if (list === void 0) list = [];
688
+ if (traverseIframes === void 0) traverseIframes = true;
689
+ const scrollableAncestor = getNearestOverflowAncestor(node);
690
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
691
+ const win = getWindow(scrollableAncestor);
692
+ if (isBody) {
693
+ const frameElement = getFrameElement(win);
694
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
695
+ } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
696
+ }
697
+ function getFrameElement(win) {
698
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
699
+ }
700
+ //#endregion
701
+ //#region ../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
702
+ function getCssDimensions(element) {
703
+ const css = getComputedStyle$1(element);
704
+ let width = parseFloat(css.width) || 0;
705
+ let height = parseFloat(css.height) || 0;
706
+ const hasOffset = isHTMLElement(element);
707
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
708
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
709
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
710
+ if (shouldFallback) {
711
+ width = offsetWidth;
712
+ height = offsetHeight;
713
+ }
714
+ return {
715
+ width,
716
+ height,
717
+ $: shouldFallback
718
+ };
719
+ }
720
+ function unwrapElement(element) {
721
+ return !isElement(element) ? element.contextElement : element;
722
+ }
723
+ function getScale(element) {
724
+ const domElement = unwrapElement(element);
725
+ if (!isHTMLElement(domElement)) return createCoords(1);
726
+ const rect = domElement.getBoundingClientRect();
727
+ const { width, height, $ } = getCssDimensions(domElement);
728
+ let x = ($ ? round(rect.width) : rect.width) / width;
729
+ let y = ($ ? round(rect.height) : rect.height) / height;
730
+ if (!x || !Number.isFinite(x)) x = 1;
731
+ if (!y || !Number.isFinite(y)) y = 1;
732
+ return {
733
+ x,
734
+ y
735
+ };
736
+ }
737
+ var noOffsets = /*#__PURE__*/ createCoords(0);
738
+ function getVisualOffsets(element) {
739
+ const win = getWindow(element);
740
+ if (!isWebKit() || !win.visualViewport) return noOffsets;
741
+ return {
742
+ x: win.visualViewport.offsetLeft,
743
+ y: win.visualViewport.offsetTop
744
+ };
745
+ }
746
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
747
+ if (isFixed === void 0) isFixed = false;
748
+ return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
749
+ }
750
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
751
+ if (includeScale === void 0) includeScale = false;
752
+ if (isFixedStrategy === void 0) isFixedStrategy = false;
753
+ const clientRect = element.getBoundingClientRect();
754
+ const domElement = unwrapElement(element);
755
+ let scale = createCoords(1);
756
+ if (includeScale) {
757
+ if (offsetParent) {
758
+ if (isElement(offsetParent)) scale = getScale(offsetParent);
759
+ } else scale = getScale(element);
760
+ }
761
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
762
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
763
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
764
+ let width = clientRect.width / scale.x;
765
+ let height = clientRect.height / scale.y;
766
+ if (domElement && offsetParent) {
767
+ const win = getWindow(domElement);
768
+ const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
769
+ let currentWin = win;
770
+ let currentIFrame = getFrameElement(currentWin);
771
+ while (currentIFrame && offsetWin !== currentWin) {
772
+ const iframeScale = getScale(currentIFrame);
773
+ const iframeRect = currentIFrame.getBoundingClientRect();
774
+ const css = getComputedStyle$1(currentIFrame);
775
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
776
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
777
+ x *= iframeScale.x;
778
+ y *= iframeScale.y;
779
+ width *= iframeScale.x;
780
+ height *= iframeScale.y;
781
+ x += left;
782
+ y += top;
783
+ currentWin = getWindow(currentIFrame);
784
+ currentIFrame = getFrameElement(currentWin);
785
+ }
786
+ }
787
+ return rectToClientRect({
788
+ width,
789
+ height,
790
+ x,
791
+ y
792
+ });
793
+ }
794
+ function getWindowScrollBarX(element, rect) {
795
+ const leftScroll = getNodeScroll(element).scrollLeft;
796
+ if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
797
+ return rect.left + leftScroll;
798
+ }
799
+ function getHTMLOffset(documentElement, scroll) {
800
+ const htmlRect = documentElement.getBoundingClientRect();
801
+ return {
802
+ x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
803
+ y: htmlRect.top + scroll.scrollTop
804
+ };
805
+ }
806
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
807
+ let { elements, rect, offsetParent, strategy } = _ref;
808
+ const isFixed = strategy === "fixed";
809
+ const documentElement = getDocumentElement(offsetParent);
810
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
811
+ if (offsetParent === documentElement || topLayer && isFixed) return rect;
812
+ let scroll = {
813
+ scrollLeft: 0,
814
+ scrollTop: 0
815
+ };
816
+ let scale = createCoords(1);
817
+ const offsets = createCoords(0);
818
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
819
+ if (isOffsetParentAnElement || !isFixed) {
820
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
821
+ if (isOffsetParentAnElement) {
822
+ const offsetRect = getBoundingClientRect(offsetParent);
823
+ scale = getScale(offsetParent);
824
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
825
+ offsets.y = offsetRect.y + offsetParent.clientTop;
826
+ }
827
+ }
828
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
829
+ return {
830
+ width: rect.width * scale.x,
831
+ height: rect.height * scale.y,
832
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
833
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
834
+ };
835
+ }
836
+ function getClientRects(element) {
837
+ return element.getClientRects ? Array.from(element.getClientRects()) : [];
838
+ }
839
+ function getDocumentRect(html) {
840
+ const scroll = getNodeScroll(html);
841
+ const body = html.ownerDocument.body;
842
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
843
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
844
+ let x = -scroll.scrollLeft + getWindowScrollBarX(html);
845
+ const y = -scroll.scrollTop;
846
+ if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
847
+ return {
848
+ width,
849
+ height,
850
+ x,
851
+ y
852
+ };
853
+ }
854
+ var SCROLLBAR_MAX = 25;
855
+ function getViewportRect(element, strategy, rootBoundary) {
856
+ if (rootBoundary === void 0) rootBoundary = "viewport";
857
+ const isLayoutViewport = rootBoundary === "layoutViewport";
858
+ const win = getWindow(element);
859
+ const html = getDocumentElement(element);
860
+ const visualViewport = win.visualViewport;
861
+ let width = html.clientWidth;
862
+ let height = html.clientHeight;
863
+ let x = 0;
864
+ let y = 0;
865
+ if (visualViewport) {
866
+ const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
867
+ if (isLayoutViewport) {
868
+ if (!layoutRelativeClientCoords) {
869
+ x = -visualViewport.offsetLeft;
870
+ y = -visualViewport.offsetTop;
871
+ }
872
+ } else {
873
+ width = visualViewport.width;
874
+ height = visualViewport.height;
875
+ if (layoutRelativeClientCoords) {
876
+ x = visualViewport.offsetLeft;
877
+ y = visualViewport.offsetTop;
878
+ }
879
+ }
880
+ }
881
+ if (getWindowScrollBarX(html) <= 0) {
882
+ const doc = html.ownerDocument;
883
+ const body = doc.body;
884
+ const bodyStyles = getComputedStyle(body);
885
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
886
+ const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
887
+ const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
888
+ if (gutter <= SCROLLBAR_MAX) width -= gutter;
889
+ }
890
+ return {
891
+ width,
892
+ height,
893
+ x,
894
+ y
895
+ };
896
+ }
897
+ function getInnerBoundingClientRect(element, strategy) {
898
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
899
+ const top = clientRect.top + element.clientTop;
900
+ const left = clientRect.left + element.clientLeft;
901
+ const scale = getScale(element);
902
+ return {
903
+ width: element.clientWidth * scale.x,
904
+ height: element.clientHeight * scale.y,
905
+ x: left * scale.x,
906
+ y: top * scale.y
907
+ };
908
+ }
909
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
910
+ let rect;
911
+ if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") rect = getViewportRect(element, strategy, clippingAncestor);
912
+ else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
913
+ else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
914
+ else {
915
+ const visualOffsets = getVisualOffsets(element);
916
+ rect = {
917
+ x: clippingAncestor.x - visualOffsets.x,
918
+ y: clippingAncestor.y - visualOffsets.y,
919
+ width: clippingAncestor.width,
920
+ height: clippingAncestor.height
921
+ };
922
+ }
923
+ return rectToClientRect(rect);
924
+ }
925
+ function getClippingElementAncestors(element, cache) {
926
+ const cachedResult = cache.get(element);
927
+ if (cachedResult) return cachedResult;
928
+ let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
929
+ let lastKeptComputedStyle = null;
930
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
931
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
932
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
933
+ const computedStyle = getComputedStyle$1(currentNode);
934
+ const currentNodeIsContaining = isContainingBlock(currentNode);
935
+ const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
936
+ if (!currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static")) result = result.filter((ancestor) => ancestor !== currentNode);
937
+ else lastKeptComputedStyle = computedStyle;
938
+ currentNode = getParentNode(currentNode);
939
+ }
940
+ cache.set(element, result);
941
+ return result;
942
+ }
943
+ function getClippingRect(_ref) {
944
+ let { element, boundary, rootBoundary, strategy } = _ref;
945
+ const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
946
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
947
+ let top = firstRect.top;
948
+ let right = firstRect.right;
949
+ let bottom = firstRect.bottom;
950
+ let left = firstRect.left;
951
+ for (let i = 1; i < clippingAncestors.length; i++) {
952
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
953
+ top = max(rect.top, top);
954
+ right = min(rect.right, right);
955
+ bottom = min(rect.bottom, bottom);
956
+ left = max(rect.left, left);
957
+ }
958
+ return {
959
+ width: right - left,
960
+ height: bottom - top,
961
+ x: left,
962
+ y: top
963
+ };
964
+ }
965
+ function getDimensions(element) {
966
+ const { width, height } = getCssDimensions(element);
967
+ return {
968
+ width,
969
+ height
970
+ };
971
+ }
972
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
973
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
974
+ const documentElement = getDocumentElement(offsetParent);
975
+ const isFixed = strategy === "fixed";
976
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
977
+ let scroll = {
978
+ scrollLeft: 0,
979
+ scrollTop: 0
980
+ };
981
+ const offsets = createCoords(0);
982
+ if (isOffsetParentAnElement || !isFixed) {
983
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
984
+ if (isOffsetParentAnElement) {
985
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
986
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
987
+ offsets.y = offsetRect.y + offsetParent.clientTop;
988
+ }
989
+ }
990
+ if (!isOffsetParentAnElement && documentElement) offsets.x = getWindowScrollBarX(documentElement);
991
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
992
+ return {
993
+ x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
994
+ y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
995
+ width: rect.width,
996
+ height: rect.height
997
+ };
998
+ }
999
+ function isStaticPositioned(element) {
1000
+ return getComputedStyle$1(element).position === "static";
1001
+ }
1002
+ function getTrueOffsetParent(element, polyfill) {
1003
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
1004
+ if (polyfill) return polyfill(element);
1005
+ let rawOffsetParent = element.offsetParent;
1006
+ if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
1007
+ return rawOffsetParent;
1008
+ }
1009
+ function getOffsetParent(element, polyfill) {
1010
+ const win = getWindow(element);
1011
+ if (isTopLayer(element)) return win;
1012
+ if (!isHTMLElement(element)) {
1013
+ let svgOffsetParent = getParentNode(element);
1014
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1015
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
1016
+ svgOffsetParent = getParentNode(svgOffsetParent);
1017
+ }
1018
+ return win;
1019
+ }
1020
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1021
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1022
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
1023
+ return offsetParent || getContainingBlock(element) || win;
1024
+ }
1025
+ var getElementRects = async function(data) {
1026
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1027
+ const getDimensionsFn = this.getDimensions;
1028
+ const floatingDimensions = await getDimensionsFn(data.floating);
1029
+ return {
1030
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1031
+ floating: {
1032
+ x: 0,
1033
+ y: 0,
1034
+ width: floatingDimensions.width,
1035
+ height: floatingDimensions.height
1036
+ }
1037
+ };
1038
+ };
1039
+ function isRTL(element) {
1040
+ return getComputedStyle$1(element).direction === "rtl";
1041
+ }
1042
+ var platform = {
1043
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1044
+ getDocumentElement,
1045
+ getClippingRect,
1046
+ getOffsetParent,
1047
+ getElementRects,
1048
+ getClientRects,
1049
+ getDimensions,
1050
+ getScale,
1051
+ isElement,
1052
+ isRTL
1053
+ };
1054
+ function rectsAreEqual(a, b) {
1055
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1056
+ }
1057
+ function observeMove(element, onMove, ancestorResize) {
1058
+ let io = null;
1059
+ let timeoutId;
1060
+ const root = getDocumentElement(element);
1061
+ function cleanup() {
1062
+ var _io;
1063
+ clearTimeout(timeoutId);
1064
+ (_io = io) == null || _io.disconnect();
1065
+ io = null;
1066
+ }
1067
+ function refresh(skip, threshold) {
1068
+ if (skip === void 0) skip = false;
1069
+ if (threshold === void 0) threshold = 1;
1070
+ cleanup();
1071
+ const elementRectForRootMargin = element.getBoundingClientRect();
1072
+ const { left, top, width, height } = elementRectForRootMargin;
1073
+ if (!skip) onMove();
1074
+ if (!width || !height) return;
1075
+ const insetTop = floor(top);
1076
+ const insetRight = floor(root.clientWidth - (left + width));
1077
+ const insetBottom = floor(root.clientHeight - (top + height));
1078
+ const insetLeft = floor(left);
1079
+ const options = {
1080
+ rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
1081
+ threshold: max(0, min(1, threshold)) || 1
1082
+ };
1083
+ let isFirstUpdate = true;
1084
+ function handleObserve(entries) {
1085
+ const ratio = entries[0].intersectionRatio;
1086
+ if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) return refresh();
1087
+ if (ratio !== threshold) {
1088
+ if (!isFirstUpdate) return refresh();
1089
+ if (!ratio) timeoutId = setTimeout(() => {
1090
+ refresh(false, 1e-7);
1091
+ }, 1e3);
1092
+ else refresh(false, ratio);
1093
+ }
1094
+ isFirstUpdate = false;
1095
+ }
1096
+ try {
1097
+ io = new IntersectionObserver(handleObserve, {
1098
+ ...options,
1099
+ root: root.ownerDocument
1100
+ });
1101
+ } catch (_e) {
1102
+ io = new IntersectionObserver(handleObserve, options);
1103
+ }
1104
+ io.observe(element);
1105
+ }
1106
+ const win = getWindow(element);
1107
+ const handleResize = () => refresh(ancestorResize);
1108
+ win.addEventListener("resize", handleResize);
1109
+ refresh(true);
1110
+ return () => {
1111
+ win.removeEventListener("resize", handleResize);
1112
+ cleanup();
1113
+ };
1114
+ }
1115
+ /**
1116
+ * Automatically updates the position of the floating element when necessary.
1117
+ * Should only be called when the floating element is mounted on the DOM or
1118
+ * visible on the screen.
1119
+ * @returns cleanup function that should be invoked when the floating element is
1120
+ * removed from the DOM or hidden from the screen.
1121
+ * @see https://floating-ui.com/docs/autoUpdate
1122
+ */
1123
+ function autoUpdate(reference, floating, update, options) {
1124
+ if (options === void 0) options = {};
1125
+ const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
1126
+ const referenceEl = unwrapElement(reference);
1127
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
1128
+ ancestors.forEach((ancestor) => {
1129
+ ancestorScroll && ancestor.addEventListener("scroll", update);
1130
+ ancestorResize && ancestor.addEventListener("resize", update);
1131
+ });
1132
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
1133
+ let reobserveFrame = -1;
1134
+ let resizeObserver = null;
1135
+ if (elementResize) {
1136
+ resizeObserver = new ResizeObserver((_ref) => {
1137
+ let [firstEntry] = _ref;
1138
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
1139
+ resizeObserver.unobserve(floating);
1140
+ cancelAnimationFrame(reobserveFrame);
1141
+ reobserveFrame = requestAnimationFrame(() => {
1142
+ var _resizeObserver;
1143
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1144
+ });
1145
+ }
1146
+ update();
1147
+ });
1148
+ if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
1149
+ if (floating) resizeObserver.observe(floating);
1150
+ }
1151
+ let frameId;
1152
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1153
+ if (animationFrame) frameLoop();
1154
+ function frameLoop() {
1155
+ const nextRefRect = getBoundingClientRect(reference);
1156
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
1157
+ prevRefRect = nextRefRect;
1158
+ frameId = requestAnimationFrame(frameLoop);
1159
+ }
1160
+ update();
1161
+ return () => {
1162
+ var _resizeObserver2;
1163
+ ancestors.forEach((ancestor) => {
1164
+ ancestorScroll && ancestor.removeEventListener("scroll", update);
1165
+ ancestorResize && ancestor.removeEventListener("resize", update);
1166
+ });
1167
+ cleanupIo?.();
1168
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1169
+ resizeObserver = null;
1170
+ if (animationFrame) cancelAnimationFrame(frameId);
1171
+ };
1172
+ }
1173
+ /**
1174
+ * Modifies the placement by translating the floating element along the
1175
+ * specified axes.
1176
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1177
+ * object may be passed.
1178
+ * @see https://floating-ui.com/docs/offset
1179
+ */
1180
+ var offset = offset$1;
1181
+ /**
1182
+ * Optimizes the visibility of the floating element by choosing the placement
1183
+ * that has the most space available automatically, without needing to specify a
1184
+ * preferred placement. Alternative to `flip`.
1185
+ * @see https://floating-ui.com/docs/autoPlacement
1186
+ */
1187
+ var autoPlacement = autoPlacement$1;
1188
+ /**
1189
+ * Optimizes the visibility of the floating element by shifting it in order to
1190
+ * keep it in view when it will overflow the clipping boundary.
1191
+ * @see https://floating-ui.com/docs/shift
1192
+ */
1193
+ var shift = shift$1;
1194
+ /**
1195
+ * Optimizes the visibility of the floating element by flipping the `placement`
1196
+ * in order to keep it in view when the preferred placement(s) will overflow the
1197
+ * clipping boundary. Alternative to `autoPlacement`.
1198
+ * @see https://floating-ui.com/docs/flip
1199
+ */
1200
+ var flip = flip$1;
1201
+ /**
1202
+ * Provides data to position an inner element of the floating element so that it
1203
+ * appears centered to the reference element.
1204
+ * @see https://floating-ui.com/docs/arrow
1205
+ */
1206
+ var arrow = arrow$1;
1207
+ /**
1208
+ * Computes the `x` and `y` coordinates that will place the floating element
1209
+ * next to a given reference element.
1210
+ */
1211
+ var computePosition = (reference, floating, options) => {
1212
+ const cache = /* @__PURE__ */ new Map();
1213
+ const mergedOptions = options != null ? options : {};
1214
+ const platformWithCache = {
1215
+ ...platform,
1216
+ ...mergedOptions.platform,
1217
+ _c: cache
1218
+ };
1219
+ return computePosition$1(reference, floating, {
1220
+ ...mergedOptions,
1221
+ platform: platformWithCache
1222
+ });
1223
+ };
1224
+ //#endregion
1225
+ //#region src/tooltip.scss?inline
1226
+ var tooltip_default = "/* ex : var((width: 24px), width, c2-checkbox) returns var(--c2-checkbox-width, 24px) */\n:host {\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: transparent;\n overflow: visible;\n width: max-content;\n max-width: var(--c2-tooltip--max-width,240px);\n pointer-events: none;\n user-select: none;\n box-sizing: border-box;\n opacity: 0;\n transform: var(--c2-tooltip--enter-transform,scale(0.92));\n transition: opacity var(--c2-tooltip--transition-duration,120ms) cubic-bezier(0.2, 0, 0, 1), transform var(--c2-tooltip--transition-duration,120ms) cubic-bezier(0.2, 0, 0, 1), display var(--c2-tooltip--transition-duration,120ms) allow-discrete, overlay var(--c2-tooltip--transition-duration,120ms) allow-discrete;\n}\n\n:host(:popover-open) {\n opacity: 1;\n transform: none;\n}\n\n@starting-style {\n :host(:popover-open) {\n opacity: 0;\n transform: var(--c2-tooltip--enter-transform,scale(0.92));\n }\n}\n:host([current-placement^=top]) {\n transform-origin: bottom center;\n}\n\n:host([current-placement^=bottom]) {\n transform-origin: top center;\n}\n\n:host([current-placement^=left]) {\n transform-origin: center right;\n}\n\n:host([current-placement^=right]) {\n transform-origin: center left;\n}\n\n.c2-tooltip {\n position: relative;\n box-sizing: border-box;\n padding-top: var(--c2-tooltip--padding-top,5px);\n padding-right: var(--c2-tooltip--padding-right,8px);\n padding-bottom: var(--c2-tooltip--padding-bottom,5px);\n padding-left: var(--c2-tooltip--padding-left,8px);\n border-radius: var(--c2-tooltip--border-radius,6px);\n border: var(--c2-tooltip--border);\n background: var(--c2-tooltip--background-color,#18181b);\n color: var(--c2-tooltip--color,#fafafa);\n box-shadow: var(--c2-tooltip--box-shadow,0 4px 12px rgba(0, 0, 0, 0.15));\n font-size: var(--c2-tooltip--font-size,12px);\n font-weight: var(--c2-tooltip--font-weight,500);\n font-style: var(--c2-tooltip--font-style);\n font-family: var(--c2-tooltip--font-family);\n line-height: var(--c2-tooltip--line-height,1.4);\n text-align: left;\n overflow-wrap: break-word;\n}\n\n.c2-tooltip__arrow {\n position: absolute;\n width: var(--c2-tooltip__arrow--size,8px);\n height: var(--c2-tooltip__arrow--size,8px);\n background: var(--c2-tooltip--background-color,#18181b);\n border: var(--c2-tooltip--border);\n transform: rotate(45deg);\n pointer-events: none;\n clip-path: none;\n}\n\n:host([current-placement^=top]) .c2-tooltip__arrow {\n clip-path: polygon(100% 0, 100% 100%, 0 100%);\n}\n\n:host([current-placement^=bottom]) .c2-tooltip__arrow {\n clip-path: polygon(0 0, 100% 0, 0 100%);\n}\n\n:host([current-placement^=left]) .c2-tooltip__arrow {\n clip-path: polygon(0 0, 100% 0, 100% 100%);\n}\n\n:host([current-placement^=right]) .c2-tooltip__arrow {\n clip-path: polygon(0 0, 100% 100%, 0 100%);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n}";
1227
+ //#endregion
1228
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
1229
+ function __decorate(decorators, target, key, desc) {
1230
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1231
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1232
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1233
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1234
+ }
1235
+ //#endregion
1236
+ //#region src/tooltip.ts
1237
+ var ENTER_EVENTS = ["pointerenter", "focus"];
1238
+ var LEAVE_EVENTS = [
1239
+ "pointerleave",
1240
+ "blur",
1241
+ "pointerdown"
1242
+ ];
1243
+ var uid = 0;
1244
+ var Tooltip = class Tooltip extends LitElement {
1245
+ constructor(..._args) {
1246
+ super(..._args);
1247
+ this.placement = "top";
1248
+ this.position = void 0;
1249
+ this.delay = 300;
1250
+ this.hideDelay = 0;
1251
+ this.hideArrow = false;
1252
+ this.targetStrategy = "parent";
1253
+ this.for = void 0;
1254
+ this.open = false;
1255
+ this.targetText = "";
1256
+ this._target = null;
1257
+ this.cleanupPosition = null;
1258
+ this.handleEnter = () => {
1259
+ clearTimeout(this.hideTimer);
1260
+ if (this.open || this.showTimer) return;
1261
+ this.showTimer = setTimeout(() => {
1262
+ this.showTimer = void 0;
1263
+ this.open = true;
1264
+ }, this.delay);
1265
+ };
1266
+ this.handleLeave = () => {
1267
+ clearTimeout(this.showTimer);
1268
+ this.showTimer = void 0;
1269
+ if (!this.open) return;
1270
+ if (this.hideDelay > 0) {
1271
+ clearTimeout(this.hideTimer);
1272
+ this.hideTimer = setTimeout(() => this.open = false, this.hideDelay);
1273
+ } else this.open = false;
1274
+ };
1275
+ this.handleTargetKeydown = (event) => {
1276
+ if (event.key === "Escape" && this.open) this.open = false;
1277
+ };
1278
+ }
1279
+ static {
1280
+ this.styles = unsafeCSS(tooltip_default);
1281
+ }
1282
+ /** @deprecated Use `open`. */
1283
+ get showing() {
1284
+ return this.open;
1285
+ }
1286
+ /** The element the tooltip describes. Assignable. */
1287
+ get target() {
1288
+ return this._target;
1289
+ }
1290
+ set target(target) {
1291
+ if (target === this._target) return;
1292
+ this.detachTarget();
1293
+ this._target = target;
1294
+ if (target) {
1295
+ for (const name of ENTER_EVENTS) target.addEventListener(name, this.handleEnter);
1296
+ for (const name of LEAVE_EVENTS) target.addEventListener(name, this.handleLeave);
1297
+ target.addEventListener("keydown", this.handleTargetKeydown);
1298
+ if (!this.id) this.id = `c2-tooltip-${++uid}`;
1299
+ const described = (target.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean);
1300
+ if (!described.includes(this.id)) target.setAttribute("aria-describedby", [...described, this.id].join(" "));
1301
+ }
1302
+ this.syncTargetText();
1303
+ }
1304
+ /**
1305
+ * `targetText` is only the slot's fallback content, and the target is resolved from the live DOM, so it is
1306
+ * necessarily unknown when the element is server-rendered. Assigning it before the first update would be lost:
1307
+ * hydration adopts the server-rendered markup as-is and records the new value as already committed, so the
1308
+ * bubble would stay empty forever. Wait for that first update before touching it.
1309
+ */
1310
+ syncTargetText() {
1311
+ const text = this._target?.dataset.tooltip ?? "";
1312
+ if (text === this.targetText) return;
1313
+ if (this.hasUpdated) this.targetText = text;
1314
+ else this.updateComplete.then(() => this.targetText = text);
1315
+ }
1316
+ connectedCallback() {
1317
+ super.connectedCallback();
1318
+ if (isServer) return;
1319
+ if (!this.hasAttribute("popover")) this.setAttribute("popover", "manual");
1320
+ this.setAttribute("role", "tooltip");
1321
+ this.resolveTarget();
1322
+ }
1323
+ disconnectedCallback() {
1324
+ super.disconnectedCallback();
1325
+ this.detachTarget();
1326
+ this.clearTimers();
1327
+ this.stopPositioning();
1328
+ }
1329
+ resolveTarget() {
1330
+ if (this.for) {
1331
+ const root = this.getRootNode();
1332
+ this.target = root.querySelector?.(`#${CSS.escape(this.for)}`) ?? null;
1333
+ return;
1334
+ }
1335
+ if (this._target) return;
1336
+ if (this.targetStrategy === "previousElement") this.target = this.previousElementSibling;
1337
+ else {
1338
+ const parent = this.parentElement;
1339
+ this.target = parent?.tagName === "ASTRO-ISLAND" ? parent.parentElement : parent;
1340
+ }
1341
+ }
1342
+ detachTarget() {
1343
+ const target = this._target;
1344
+ if (!target) return;
1345
+ for (const name of ENTER_EVENTS) target.removeEventListener(name, this.handleEnter);
1346
+ for (const name of LEAVE_EVENTS) target.removeEventListener(name, this.handleLeave);
1347
+ target.removeEventListener("keydown", this.handleTargetKeydown);
1348
+ const described = (target.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((id) => id && id !== this.id);
1349
+ if (described.length) target.setAttribute("aria-describedby", described.join(" "));
1350
+ else target.removeAttribute("aria-describedby");
1351
+ this._target = null;
1352
+ }
1353
+ clearTimers() {
1354
+ clearTimeout(this.showTimer);
1355
+ clearTimeout(this.hideTimer);
1356
+ this.showTimer = this.hideTimer = void 0;
1357
+ }
1358
+ readPixels(name, fallback) {
1359
+ const value = Number.parseFloat(getComputedStyle(this).getPropertyValue(name));
1360
+ return Number.isNaN(value) ? fallback : value;
1361
+ }
1362
+ startPositioning() {
1363
+ this.stopPositioning();
1364
+ const target = this._target;
1365
+ if (!target) return;
1366
+ this.cleanupPosition = autoUpdate(target, this, () => this.updatePosition(target));
1367
+ }
1368
+ stopPositioning() {
1369
+ this.cleanupPosition?.();
1370
+ this.cleanupPosition = null;
1371
+ }
1372
+ async updatePosition(target) {
1373
+ const arrowEl = this.hideArrow ? void 0 : this.arrowElement;
1374
+ const arrowSize = arrowEl ? this.readPixels("--c2-tooltip__arrow--size", 8) : 0;
1375
+ const gap = this.readPixels("--c2-tooltip--offset", 8);
1376
+ const allowed = this.position?.split(",").map((p) => p.trim()).filter(Boolean);
1377
+ const middleware = [
1378
+ offset(gap + arrowSize / 2),
1379
+ allowed?.length ? autoPlacement({ allowedPlacements: allowed }) : flip({ padding: 8 }),
1380
+ shift({ padding: 8 })
1381
+ ];
1382
+ if (arrowEl) middleware.push(arrow({
1383
+ element: arrowEl,
1384
+ padding: 6
1385
+ }));
1386
+ const { x, y, placement, middlewareData } = await computePosition(target, this, {
1387
+ placement: allowed?.length ? void 0 : this.placement,
1388
+ strategy: "fixed",
1389
+ middleware
1390
+ });
1391
+ this.style.left = `${x}px`;
1392
+ this.style.top = `${y}px`;
1393
+ this.setAttribute("current-placement", placement);
1394
+ if (arrowEl && middlewareData.arrow) {
1395
+ const staticSide = {
1396
+ top: "bottom",
1397
+ right: "left",
1398
+ bottom: "top",
1399
+ left: "right"
1400
+ }[placement.split("-")[0]];
1401
+ const { x: ax, y: ay } = middlewareData.arrow;
1402
+ Object.assign(arrowEl.style, {
1403
+ left: ax != null ? `${ax}px` : "",
1404
+ top: ay != null ? `${ay}px` : "",
1405
+ right: "",
1406
+ bottom: "",
1407
+ [staticSide]: `${-arrowSize / 2}px`
1408
+ });
1409
+ }
1410
+ }
1411
+ updated(changed) {
1412
+ if (changed.has("for") || changed.has("targetStrategy")) this.resolveTarget();
1413
+ if (changed.has("open") && !isServer) {
1414
+ const shown = this.matches(":popover-open");
1415
+ if (this.open && !shown) {
1416
+ if (this._target?.dataset.tooltip) this.targetText = this._target.dataset.tooltip;
1417
+ try {
1418
+ this.showPopover();
1419
+ } catch {}
1420
+ this.startPositioning();
1421
+ this.dispatchEvent(new Event("show", {
1422
+ bubbles: true,
1423
+ composed: true
1424
+ }));
1425
+ } else if (!this.open && shown) {
1426
+ this.stopPositioning();
1427
+ try {
1428
+ this.hidePopover();
1429
+ } catch {}
1430
+ this.dispatchEvent(new Event("hide", {
1431
+ bubbles: true,
1432
+ composed: true
1433
+ }));
1434
+ }
1435
+ }
1436
+ }
1437
+ render() {
1438
+ return html`
1439
+ <div class="c2-tooltip">
1440
+ <slot>${this.targetText}</slot>
1441
+ ${this.hideArrow ? nothing : html`<span class="c2-tooltip__arrow"></span>`}
1442
+ </div>
1443
+ `;
1444
+ }
1445
+ };
1446
+ __decorate([property({ reflect: true })], Tooltip.prototype, "placement", void 0);
1447
+ __decorate([property()], Tooltip.prototype, "position", void 0);
1448
+ __decorate([property({ type: Number })], Tooltip.prototype, "delay", void 0);
1449
+ __decorate([property({
1450
+ type: Number,
1451
+ attribute: "hide-delay"
1452
+ })], Tooltip.prototype, "hideDelay", void 0);
1453
+ __decorate([property({
1454
+ type: Boolean,
1455
+ reflect: true,
1456
+ attribute: "hide-arrow"
1457
+ })], Tooltip.prototype, "hideArrow", void 0);
1458
+ __decorate([property({ attribute: "target-strategy" })], Tooltip.prototype, "targetStrategy", void 0);
1459
+ __decorate([property()], Tooltip.prototype, "for", void 0);
1460
+ __decorate([property({
1461
+ type: Boolean,
1462
+ reflect: true
1463
+ })], Tooltip.prototype, "open", void 0);
1464
+ __decorate([state()], Tooltip.prototype, "targetText", void 0);
1465
+ __decorate([query(".c2-tooltip__arrow")], Tooltip.prototype, "arrowElement", void 0);
1466
+ Tooltip = __decorate([customElement("c2-tooltip")], Tooltip);
1467
+ //#endregion
1468
+ export { Tooltip };