cleek 2.3.51 → 2.3.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cleek.es.js CHANGED
@@ -17,7 +17,2878 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, computed as computed$2, openBlock, createElementBlock, normalizeClass, unref as unref$1, createElementVNode, renderSlot, createCommentVNode, normalizeStyle, watch, h, createBlock, Teleport, createVNode, createTextVNode, toDisplayString, withCtx, onMounted, nextTick as nextTick$1, onBeforeUnmount, getCurrentInstance, withDirectives, isRef as isRef$1, vModelDynamic, Fragment, renderList, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import { pushScopeId, popScopeId, defineComponent, nextTick as nextTick$1, openBlock, createBlock, withScopeId, resolveComponent, createElementBlock, normalizeClass, normalizeStyle, withKeys, createElementVNode, Fragment, renderSlot, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h, toDisplayString, computed as computed$2, unref as unref$1, watch, Teleport, createTextVNode, onMounted, onBeforeUnmount, getCurrentInstance, withDirectives, isRef as isRef$1, vModelDynamic, renderList, withModifiers, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
33
+ function getBasePlacement$2(placement) {
34
+ return placement.split("-")[0];
35
+ }
36
+ function getAlignment(placement) {
37
+ return placement.split("-")[1];
38
+ }
39
+ function getMainAxisFromPlacement$1(placement) {
40
+ return ["top", "bottom"].includes(getBasePlacement$2(placement)) ? "x" : "y";
41
+ }
42
+ function getLengthFromAxis(axis) {
43
+ return axis === "y" ? "height" : "width";
44
+ }
45
+ function computeCoordsFromPlacement(_ref2) {
46
+ let {
47
+ reference: reference2,
48
+ floating,
49
+ placement
50
+ } = _ref2;
51
+ const commonX = reference2.x + reference2.width / 2 - floating.width / 2;
52
+ const commonY = reference2.y + reference2.height / 2 - floating.height / 2;
53
+ let coords;
54
+ switch (getBasePlacement$2(placement)) {
55
+ case "top":
56
+ coords = {
57
+ x: commonX,
58
+ y: reference2.y - floating.height
59
+ };
60
+ break;
61
+ case "bottom":
62
+ coords = {
63
+ x: commonX,
64
+ y: reference2.y + reference2.height
65
+ };
66
+ break;
67
+ case "right":
68
+ coords = {
69
+ x: reference2.x + reference2.width,
70
+ y: commonY
71
+ };
72
+ break;
73
+ case "left":
74
+ coords = {
75
+ x: reference2.x - floating.width,
76
+ y: commonY
77
+ };
78
+ break;
79
+ default:
80
+ coords = {
81
+ x: reference2.x,
82
+ y: reference2.y
83
+ };
84
+ }
85
+ const mainAxis = getMainAxisFromPlacement$1(placement);
86
+ const length = getLengthFromAxis(mainAxis);
87
+ switch (getAlignment(placement)) {
88
+ case "start":
89
+ coords[mainAxis] = coords[mainAxis] - (reference2[length] / 2 - floating[length] / 2);
90
+ break;
91
+ case "end":
92
+ coords[mainAxis] = coords[mainAxis] + (reference2[length] / 2 - floating[length] / 2);
93
+ break;
94
+ }
95
+ return coords;
96
+ }
97
+ const computePosition$1 = async (reference2, floating, config2) => {
98
+ const {
99
+ placement = "bottom",
100
+ strategy = "absolute",
101
+ middleware = [],
102
+ platform: platform2
103
+ } = config2;
104
+ let rects = await platform2.getElementRects({
105
+ reference: reference2,
106
+ floating,
107
+ strategy
108
+ });
109
+ let {
110
+ x,
111
+ y
112
+ } = computeCoordsFromPlacement(__spreadProps(__spreadValues({}, rects), {
113
+ placement
114
+ }));
115
+ let statefulPlacement = placement;
116
+ let middlewareData = {};
117
+ for (let i = 0; i < middleware.length; i++) {
118
+ const {
119
+ name,
120
+ fn: fn2
121
+ } = middleware[i];
122
+ const {
123
+ x: nextX,
124
+ y: nextY,
125
+ data,
126
+ reset
127
+ } = await fn2({
128
+ x,
129
+ y,
130
+ initialPlacement: placement,
131
+ placement: statefulPlacement,
132
+ strategy,
133
+ middlewareData,
134
+ rects,
135
+ platform: platform2,
136
+ elements: {
137
+ reference: reference2,
138
+ floating
139
+ }
140
+ });
141
+ x = nextX != null ? nextX : x;
142
+ y = nextY != null ? nextY : y;
143
+ middlewareData = __spreadProps(__spreadValues({}, middlewareData), {
144
+ [name]: data != null ? data : {}
145
+ });
146
+ if (reset) {
147
+ if (typeof reset === "object") {
148
+ if (reset.placement) {
149
+ statefulPlacement = reset.placement;
150
+ }
151
+ if (reset.rects) {
152
+ rects = reset.rects === true ? await platform2.getElementRects({
153
+ reference: reference2,
154
+ floating,
155
+ strategy
156
+ }) : reset.rects;
157
+ }
158
+ ({
159
+ x,
160
+ y
161
+ } = computeCoordsFromPlacement(__spreadProps(__spreadValues({}, rects), {
162
+ placement: statefulPlacement
163
+ })));
164
+ }
165
+ i = -1;
166
+ continue;
167
+ }
168
+ }
169
+ return {
170
+ x,
171
+ y,
172
+ placement: statefulPlacement,
173
+ strategy,
174
+ middlewareData
175
+ };
176
+ };
177
+ function expandPaddingObject(padding) {
178
+ return __spreadValues({
179
+ top: 0,
180
+ right: 0,
181
+ bottom: 0,
182
+ left: 0
183
+ }, padding);
184
+ }
185
+ function getSideObjectFromPadding(padding) {
186
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
187
+ top: padding,
188
+ right: padding,
189
+ bottom: padding,
190
+ left: padding
191
+ };
192
+ }
193
+ function rectToClientRect$1(rect) {
194
+ return __spreadProps(__spreadValues({}, rect), {
195
+ top: rect.y,
196
+ left: rect.x,
197
+ right: rect.x + rect.width,
198
+ bottom: rect.y + rect.height
199
+ });
200
+ }
201
+ async function detectOverflow$1(middlewareArguments, options) {
202
+ if (options === void 0) {
203
+ options = {};
204
+ }
205
+ const {
206
+ x,
207
+ y,
208
+ platform: platform2,
209
+ rects,
210
+ elements,
211
+ strategy
212
+ } = middlewareArguments;
213
+ const {
214
+ boundary = "clippingParents",
215
+ rootBoundary = "viewport",
216
+ elementContext = "floating",
217
+ altBoundary = false,
218
+ padding = 0
219
+ } = options;
220
+ const paddingObject = getSideObjectFromPadding(padding);
221
+ const altContext = elementContext === "floating" ? "reference" : "floating";
222
+ const element = elements[altBoundary ? altContext : elementContext];
223
+ const clippingClientRect = await platform2.getClippingClientRect({
224
+ element: await platform2.isElement(element) ? element : element.contextElement || await platform2.getDocumentElement({
225
+ element: elements.floating
226
+ }),
227
+ boundary,
228
+ rootBoundary
229
+ });
230
+ const elementClientRect = rectToClientRect$1(await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
231
+ rect: elementContext === "floating" ? __spreadProps(__spreadValues({}, rects.floating), {
232
+ x,
233
+ y
234
+ }) : rects.reference,
235
+ offsetParent: await platform2.getOffsetParent({
236
+ element: elements.floating
237
+ }),
238
+ strategy
239
+ }));
240
+ return {
241
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
242
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
243
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
244
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
245
+ };
246
+ }
247
+ const min$2 = Math.min;
248
+ const max$2 = Math.max;
249
+ function within$1(min$12, value, max$12) {
250
+ return max$2(min$12, min$2(value, max$12));
251
+ }
252
+ const arrow$2 = (options) => ({
253
+ name: "arrow",
254
+ options,
255
+ async fn(middlewareArguments) {
256
+ const {
257
+ element,
258
+ padding = 0
259
+ } = options != null ? options : {};
260
+ const {
261
+ x,
262
+ y,
263
+ placement,
264
+ rects,
265
+ platform: platform2
266
+ } = middlewareArguments;
267
+ if (element == null) {
268
+ return {};
269
+ }
270
+ const paddingObject = getSideObjectFromPadding(padding);
271
+ const coords = {
272
+ x,
273
+ y
274
+ };
275
+ const basePlacement = getBasePlacement$2(placement);
276
+ const axis = getMainAxisFromPlacement$1(basePlacement);
277
+ const length = getLengthFromAxis(axis);
278
+ const arrowDimensions = await platform2.getDimensions({
279
+ element
280
+ });
281
+ const minProp = axis === "y" ? "top" : "left";
282
+ const maxProp = axis === "y" ? "bottom" : "right";
283
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
284
+ const startDiff = coords[axis] - rects.reference[axis];
285
+ const arrowOffsetParent = await platform2.getOffsetParent({
286
+ element
287
+ });
288
+ const clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
289
+ const centerToReference = endDiff / 2 - startDiff / 2;
290
+ const min2 = paddingObject[minProp];
291
+ const max2 = clientSize - arrowDimensions[length] - paddingObject[maxProp];
292
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
293
+ const offset2 = within$1(min2, center, max2);
294
+ return {
295
+ data: {
296
+ [axis]: offset2,
297
+ centerOffset: center - offset2
298
+ }
299
+ };
300
+ }
301
+ });
302
+ const hash$1$1 = {
303
+ left: "right",
304
+ right: "left",
305
+ bottom: "top",
306
+ top: "bottom"
307
+ };
308
+ function getOppositePlacement$1(placement) {
309
+ return placement.replace(/left|right|bottom|top/g, (matched) => hash$1$1[matched]);
310
+ }
311
+ function getAlignmentSides(placement, rects) {
312
+ const isStart = getAlignment(placement) === "start";
313
+ const mainAxis = getMainAxisFromPlacement$1(placement);
314
+ const length = getLengthFromAxis(mainAxis);
315
+ let mainAlignmentSide = mainAxis === "x" ? isStart ? "right" : "left" : isStart ? "bottom" : "top";
316
+ if (rects.reference[length] > rects.floating[length]) {
317
+ mainAlignmentSide = getOppositePlacement$1(mainAlignmentSide);
318
+ }
319
+ return {
320
+ main: mainAlignmentSide,
321
+ cross: getOppositePlacement$1(mainAlignmentSide)
322
+ };
323
+ }
324
+ const hash$2 = {
325
+ start: "end",
326
+ end: "start"
327
+ };
328
+ function getOppositeAlignmentPlacement(placement) {
329
+ return placement.replace(/start|end/g, (matched) => hash$2[matched]);
330
+ }
331
+ const basePlacements$1 = ["top", "right", "bottom", "left"];
332
+ const allPlacements = /* @__PURE__ */ basePlacements$1.reduce((acc, basePlacement) => acc.concat(basePlacement, basePlacement + "-start", basePlacement + "-end"), []);
333
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
334
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getBasePlacement$2(placement) === placement);
335
+ return allowedPlacementsSortedByAlignment.filter((placement) => {
336
+ if (alignment) {
337
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
338
+ }
339
+ return true;
340
+ });
341
+ }
342
+ const autoPlacement = function(options) {
343
+ if (options === void 0) {
344
+ options = {};
345
+ }
346
+ return {
347
+ name: "autoPlacement",
348
+ options,
349
+ async fn(middlewareArguments) {
350
+ var _middlewareData$autoP, _middlewareData$autoP2, _middlewareData$autoP3, _middlewareData$autoP4, _middlewareData$autoP5, _placementsSortedByLe;
351
+ const {
352
+ x,
353
+ y,
354
+ rects,
355
+ middlewareData,
356
+ placement
357
+ } = middlewareArguments;
358
+ const _a = options, {
359
+ alignment = null,
360
+ allowedPlacements = allPlacements,
361
+ autoAlignment = true
362
+ } = _a, detectOverflowOptions = __objRest(_a, [
363
+ "alignment",
364
+ "allowedPlacements",
365
+ "autoAlignment"
366
+ ]);
367
+ if ((_middlewareData$autoP = middlewareData.autoPlacement) != null && _middlewareData$autoP.skip) {
368
+ return {};
369
+ }
370
+ const placements2 = getPlacementList(alignment, autoAlignment, allowedPlacements);
371
+ const overflow = await detectOverflow$1(middlewareArguments, detectOverflowOptions);
372
+ const currentIndex = (_middlewareData$autoP2 = (_middlewareData$autoP3 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP3.index) != null ? _middlewareData$autoP2 : 0;
373
+ const currentPlacement = placements2[currentIndex];
374
+ const {
375
+ main: main2,
376
+ cross
377
+ } = getAlignmentSides(currentPlacement, rects);
378
+ if (placement !== currentPlacement) {
379
+ return {
380
+ x,
381
+ y,
382
+ reset: {
383
+ placement: placements2[0]
384
+ }
385
+ };
386
+ }
387
+ const currentOverflows = [overflow[getBasePlacement$2(currentPlacement)], overflow[main2], overflow[cross]];
388
+ const allOverflows = [...(_middlewareData$autoP4 = (_middlewareData$autoP5 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP5.overflows) != null ? _middlewareData$autoP4 : [], {
389
+ placement: currentPlacement,
390
+ overflows: currentOverflows
391
+ }];
392
+ const nextPlacement = placements2[currentIndex + 1];
393
+ if (nextPlacement) {
394
+ return {
395
+ data: {
396
+ index: currentIndex + 1,
397
+ overflows: allOverflows
398
+ },
399
+ reset: {
400
+ placement: nextPlacement
401
+ }
402
+ };
403
+ }
404
+ const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);
405
+ const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find((_ref2) => {
406
+ let {
407
+ overflows
408
+ } = _ref2;
409
+ return overflows.every((overflow2) => overflow2 <= 0);
410
+ })) == null ? void 0 : _placementsSortedByLe.placement;
411
+ return {
412
+ data: {
413
+ skip: true
414
+ },
415
+ reset: {
416
+ placement: placementThatFitsOnAllSides != null ? placementThatFitsOnAllSides : placementsSortedByLeastOverflow[0].placement
417
+ }
418
+ };
419
+ }
420
+ };
421
+ };
422
+ function getExpandedPlacements(placement) {
423
+ const oppositePlacement = getOppositePlacement$1(placement);
424
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
425
+ }
426
+ const flip$2 = function(options) {
427
+ if (options === void 0) {
428
+ options = {};
429
+ }
430
+ return {
431
+ name: "flip",
432
+ options,
433
+ async fn(middlewareArguments) {
434
+ var _middlewareData$flip, _middlewareData$flip2;
435
+ const {
436
+ placement,
437
+ middlewareData,
438
+ rects,
439
+ initialPlacement
440
+ } = middlewareArguments;
441
+ if ((_middlewareData$flip = middlewareData.flip) != null && _middlewareData$flip.skip) {
442
+ return {};
443
+ }
444
+ const _a = options, {
445
+ mainAxis: checkMainAxis = true,
446
+ crossAxis: checkCrossAxis = true,
447
+ fallbackPlacements: specifiedFallbackPlacements,
448
+ fallbackStrategy = "bestFit",
449
+ flipAlignment = true
450
+ } = _a, detectOverflowOptions = __objRest(_a, [
451
+ "mainAxis",
452
+ "crossAxis",
453
+ "fallbackPlacements",
454
+ "fallbackStrategy",
455
+ "flipAlignment"
456
+ ]);
457
+ const basePlacement = getBasePlacement$2(placement);
458
+ const isBasePlacement = basePlacement === initialPlacement;
459
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement$1(initialPlacement)] : getExpandedPlacements(initialPlacement));
460
+ const placements2 = [initialPlacement, ...fallbackPlacements];
461
+ const overflow = await detectOverflow$1(middlewareArguments, detectOverflowOptions);
462
+ const overflows = [];
463
+ let overflowsData = ((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.overflows) || [];
464
+ if (checkMainAxis) {
465
+ overflows.push(overflow[basePlacement]);
466
+ }
467
+ if (checkCrossAxis) {
468
+ const {
469
+ main: main2,
470
+ cross
471
+ } = getAlignmentSides(placement, rects);
472
+ overflows.push(overflow[main2], overflow[cross]);
473
+ }
474
+ overflowsData = [...overflowsData, {
475
+ placement,
476
+ overflows
477
+ }];
478
+ if (!overflows.every((side) => side <= 0)) {
479
+ var _middlewareData$flip$, _middlewareData$flip3;
480
+ const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip3 = middlewareData.flip) == null ? void 0 : _middlewareData$flip3.index) != null ? _middlewareData$flip$ : 0) + 1;
481
+ const nextPlacement = placements2[nextIndex];
482
+ if (nextPlacement) {
483
+ return {
484
+ data: {
485
+ index: nextIndex,
486
+ overflows: overflowsData
487
+ },
488
+ reset: {
489
+ placement: nextPlacement
490
+ }
491
+ };
492
+ }
493
+ let resetPlacement = "bottom";
494
+ switch (fallbackStrategy) {
495
+ case "bestFit": {
496
+ var _overflowsData$slice$;
497
+ const placement2 = (_overflowsData$slice$ = overflowsData.slice().sort((a, b) => a.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0) - b.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0))[0]) == null ? void 0 : _overflowsData$slice$.placement;
498
+ if (placement2) {
499
+ resetPlacement = placement2;
500
+ }
501
+ break;
502
+ }
503
+ case "initialPlacement":
504
+ resetPlacement = initialPlacement;
505
+ break;
506
+ }
507
+ return {
508
+ data: {
509
+ skip: true
510
+ },
511
+ reset: {
512
+ placement: resetPlacement
513
+ }
514
+ };
515
+ }
516
+ return {};
517
+ }
518
+ };
519
+ };
520
+ function convertValueToCoords(_ref2) {
521
+ let {
522
+ placement,
523
+ rects,
524
+ value
525
+ } = _ref2;
526
+ const basePlacement = getBasePlacement$2(placement);
527
+ const multiplier = ["left", "top"].includes(basePlacement) ? -1 : 1;
528
+ const rawValue = typeof value === "function" ? value(__spreadProps(__spreadValues({}, rects), {
529
+ placement
530
+ })) : value;
531
+ const {
532
+ mainAxis,
533
+ crossAxis
534
+ } = typeof rawValue === "number" ? {
535
+ mainAxis: rawValue,
536
+ crossAxis: 0
537
+ } : __spreadValues({
538
+ mainAxis: 0,
539
+ crossAxis: 0
540
+ }, rawValue);
541
+ return getMainAxisFromPlacement$1(basePlacement) === "x" ? {
542
+ x: crossAxis,
543
+ y: mainAxis * multiplier
544
+ } : {
545
+ x: mainAxis * multiplier,
546
+ y: crossAxis
547
+ };
548
+ }
549
+ const offset$2 = function(value) {
550
+ if (value === void 0) {
551
+ value = 0;
552
+ }
553
+ return {
554
+ name: "offset",
555
+ options: value,
556
+ fn(middlewareArguments) {
557
+ const {
558
+ x,
559
+ y,
560
+ placement,
561
+ rects
562
+ } = middlewareArguments;
563
+ const diffCoords = convertValueToCoords({
564
+ placement,
565
+ rects,
566
+ value
567
+ });
568
+ return {
569
+ x: x + diffCoords.x,
570
+ y: y + diffCoords.y,
571
+ data: diffCoords
572
+ };
573
+ }
574
+ };
575
+ };
576
+ function getCrossAxis(axis) {
577
+ return axis === "x" ? "y" : "x";
578
+ }
579
+ const shift = function(options) {
580
+ if (options === void 0) {
581
+ options = {};
582
+ }
583
+ return {
584
+ name: "shift",
585
+ options,
586
+ async fn(middlewareArguments) {
587
+ const {
588
+ x,
589
+ y,
590
+ placement
591
+ } = middlewareArguments;
592
+ const _a = options, {
593
+ mainAxis: checkMainAxis = true,
594
+ crossAxis: checkCrossAxis = false,
595
+ limiter = {
596
+ fn: (_ref2) => {
597
+ let {
598
+ x: x2,
599
+ y: y2
600
+ } = _ref2;
601
+ return {
602
+ x: x2,
603
+ y: y2
604
+ };
605
+ }
606
+ }
607
+ } = _a, detectOverflowOptions = __objRest(_a, [
608
+ "mainAxis",
609
+ "crossAxis",
610
+ "limiter"
611
+ ]);
612
+ const coords = {
613
+ x,
614
+ y
615
+ };
616
+ const overflow = await detectOverflow$1(middlewareArguments, detectOverflowOptions);
617
+ const mainAxis = getMainAxisFromPlacement$1(getBasePlacement$2(placement));
618
+ const crossAxis = getCrossAxis(mainAxis);
619
+ let mainAxisCoord = coords[mainAxis];
620
+ let crossAxisCoord = coords[crossAxis];
621
+ if (checkMainAxis) {
622
+ const minSide = mainAxis === "y" ? "top" : "left";
623
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
624
+ const min2 = mainAxisCoord + overflow[minSide];
625
+ const max2 = mainAxisCoord - overflow[maxSide];
626
+ mainAxisCoord = within$1(min2, mainAxisCoord, max2);
627
+ }
628
+ if (checkCrossAxis) {
629
+ const minSide = crossAxis === "y" ? "top" : "left";
630
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
631
+ const min2 = crossAxisCoord + overflow[minSide];
632
+ const max2 = crossAxisCoord - overflow[maxSide];
633
+ crossAxisCoord = within$1(min2, crossAxisCoord, max2);
634
+ }
635
+ const limitedCoords = limiter.fn(__spreadProps(__spreadValues({}, middlewareArguments), {
636
+ [mainAxis]: mainAxisCoord,
637
+ [crossAxis]: crossAxisCoord
638
+ }));
639
+ return __spreadProps(__spreadValues({}, limitedCoords), {
640
+ data: {
641
+ x: limitedCoords.x - x,
642
+ y: limitedCoords.y - y
643
+ }
644
+ });
645
+ }
646
+ };
647
+ };
648
+ const size = function(options) {
649
+ if (options === void 0) {
650
+ options = {};
651
+ }
652
+ return {
653
+ name: "size",
654
+ options,
655
+ async fn(middlewareArguments) {
656
+ var _middlewareData$size;
657
+ const {
658
+ placement,
659
+ rects,
660
+ middlewareData
661
+ } = middlewareArguments;
662
+ const _a = options, {
663
+ apply
664
+ } = _a, detectOverflowOptions = __objRest(_a, [
665
+ "apply"
666
+ ]);
667
+ if ((_middlewareData$size = middlewareData.size) != null && _middlewareData$size.skip) {
668
+ return {};
669
+ }
670
+ const overflow = await detectOverflow$1(middlewareArguments, detectOverflowOptions);
671
+ const basePlacement = getBasePlacement$2(placement);
672
+ const isEnd = getAlignment(placement) === "end";
673
+ let heightSide;
674
+ let widthSide;
675
+ if (basePlacement === "top" || basePlacement === "bottom") {
676
+ heightSide = basePlacement;
677
+ widthSide = isEnd ? "left" : "right";
678
+ } else {
679
+ widthSide = basePlacement;
680
+ heightSide = isEnd ? "top" : "bottom";
681
+ }
682
+ const xMin = max$2(overflow.left, 0);
683
+ const xMax = max$2(overflow.right, 0);
684
+ const yMin = max$2(overflow.top, 0);
685
+ const yMax = max$2(overflow.bottom, 0);
686
+ const dimensions = {
687
+ height: rects.floating.height - (["left", "right"].includes(placement) ? 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$2(overflow.top, overflow.bottom)) : overflow[heightSide]),
688
+ width: rects.floating.width - (["top", "bottom"].includes(placement) ? 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$2(overflow.left, overflow.right)) : overflow[widthSide])
689
+ };
690
+ apply == null ? void 0 : apply(__spreadValues(__spreadValues({}, dimensions), rects));
691
+ return {
692
+ data: {
693
+ skip: true
694
+ },
695
+ reset: {
696
+ rects: true
697
+ }
698
+ };
699
+ }
700
+ };
701
+ };
702
+ function isWindow(value) {
703
+ return (value == null ? void 0 : value.toString()) === "[object Window]";
704
+ }
705
+ function getWindow$1(node) {
706
+ if (node == null) {
707
+ return window;
708
+ }
709
+ if (!isWindow(node)) {
710
+ const ownerDocument = node.ownerDocument;
711
+ return ownerDocument ? ownerDocument.defaultView || window : window;
712
+ }
713
+ return node;
714
+ }
715
+ function getComputedStyle$1$1(element) {
716
+ return getWindow$1(element).getComputedStyle(element);
717
+ }
718
+ function getNodeName$1(node) {
719
+ return isWindow(node) ? "" : node ? (node.nodeName || "").toLowerCase() : "";
720
+ }
721
+ function isHTMLElement$1(value) {
722
+ return value instanceof getWindow$1(value).HTMLElement;
723
+ }
724
+ function isElement$2(value) {
725
+ return value instanceof getWindow$1(value).Element;
726
+ }
727
+ function isNode(value) {
728
+ return value instanceof getWindow$1(value).Node;
729
+ }
730
+ function isShadowRoot$1(node) {
731
+ const OwnElement = getWindow$1(node).ShadowRoot;
732
+ return node instanceof OwnElement || node instanceof ShadowRoot;
733
+ }
734
+ function isScrollParent$1(element) {
735
+ const {
736
+ overflow,
737
+ overflowX,
738
+ overflowY
739
+ } = getComputedStyle$1$1(element);
740
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
741
+ }
742
+ function isTableElement$1(element) {
743
+ return ["table", "td", "th"].includes(getNodeName$1(element));
744
+ }
745
+ function isContainingBlock(element) {
746
+ const isFirefox = navigator.userAgent.toLowerCase().includes("firefox");
747
+ const css2 = getComputedStyle$1$1(element);
748
+ return css2.transform !== "none" || css2.perspective !== "none" || css2.contain === "paint" || ["transform", "perspective"].includes(css2.willChange) || isFirefox && css2.willChange === "filter" || isFirefox && (css2.filter ? css2.filter !== "none" : false);
749
+ }
750
+ const min$1 = Math.min;
751
+ const max$1 = Math.max;
752
+ const round$1 = Math.round;
753
+ function getBoundingClientRect$1(element, includeScale) {
754
+ if (includeScale === void 0) {
755
+ includeScale = false;
756
+ }
757
+ const clientRect = element.getBoundingClientRect();
758
+ let scaleX = 1;
759
+ let scaleY = 1;
760
+ if (includeScale && isHTMLElement$1(element)) {
761
+ scaleX = element.offsetWidth > 0 ? round$1(clientRect.width) / element.offsetWidth || 1 : 1;
762
+ scaleY = element.offsetHeight > 0 ? round$1(clientRect.height) / element.offsetHeight || 1 : 1;
763
+ }
764
+ return {
765
+ width: clientRect.width / scaleX,
766
+ height: clientRect.height / scaleY,
767
+ top: clientRect.top / scaleY,
768
+ right: clientRect.right / scaleX,
769
+ bottom: clientRect.bottom / scaleY,
770
+ left: clientRect.left / scaleX,
771
+ x: clientRect.left / scaleX,
772
+ y: clientRect.top / scaleY
773
+ };
774
+ }
775
+ function getDocumentElement$1(node) {
776
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
777
+ }
778
+ function getNodeScroll$1(element) {
779
+ if (isWindow(element)) {
780
+ return {
781
+ scrollLeft: element.pageXOffset,
782
+ scrollTop: element.pageYOffset
783
+ };
784
+ }
785
+ return {
786
+ scrollLeft: element.scrollLeft,
787
+ scrollTop: element.scrollTop
788
+ };
789
+ }
790
+ function getWindowScrollBarX$1(element) {
791
+ return getBoundingClientRect$1(getDocumentElement$1(element)).left + getNodeScroll$1(element).scrollLeft;
792
+ }
793
+ function isScaled(element) {
794
+ const rect = getBoundingClientRect$1(element);
795
+ return round$1(rect.width) !== element.offsetWidth || round$1(rect.height) !== element.offsetHeight;
796
+ }
797
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
798
+ const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
799
+ const documentElement = getDocumentElement$1(offsetParent);
800
+ const rect = getBoundingClientRect$1(element, isOffsetParentAnElement && isScaled(offsetParent));
801
+ let scroll = {
802
+ scrollLeft: 0,
803
+ scrollTop: 0
804
+ };
805
+ const offsets = {
806
+ x: 0,
807
+ y: 0
808
+ };
809
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
810
+ if (getNodeName$1(offsetParent) !== "body" || isScrollParent$1(documentElement)) {
811
+ scroll = getNodeScroll$1(offsetParent);
812
+ }
813
+ if (isHTMLElement$1(offsetParent)) {
814
+ const offsetRect = getBoundingClientRect$1(offsetParent, true);
815
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
816
+ offsets.y = offsetRect.y + offsetParent.clientTop;
817
+ } else if (documentElement) {
818
+ offsets.x = getWindowScrollBarX$1(documentElement);
819
+ }
820
+ }
821
+ return {
822
+ x: rect.left + scroll.scrollLeft - offsets.x,
823
+ y: rect.top + scroll.scrollTop - offsets.y,
824
+ width: rect.width,
825
+ height: rect.height
826
+ };
827
+ }
828
+ function getParentNode$1(node) {
829
+ if (getNodeName$1(node) === "html") {
830
+ return node;
831
+ }
832
+ return node.assignedSlot || node.parentNode || (isShadowRoot$1(node) ? node.host : null) || getDocumentElement$1(node);
833
+ }
834
+ function getTrueOffsetParent$1(element) {
835
+ if (!isHTMLElement$1(element) || getComputedStyle(element).position === "fixed") {
836
+ return null;
837
+ }
838
+ return element.offsetParent;
839
+ }
840
+ function getContainingBlock$1(element) {
841
+ let currentNode = getParentNode$1(element);
842
+ while (isHTMLElement$1(currentNode) && !["html", "body"].includes(getNodeName$1(currentNode))) {
843
+ if (isContainingBlock(currentNode)) {
844
+ return currentNode;
845
+ } else {
846
+ currentNode = currentNode.parentNode;
847
+ }
848
+ }
849
+ return null;
850
+ }
851
+ function getOffsetParent$1(element) {
852
+ const window2 = getWindow$1(element);
853
+ let offsetParent = getTrueOffsetParent$1(element);
854
+ while (offsetParent && isTableElement$1(offsetParent) && getComputedStyle(offsetParent).position === "static") {
855
+ offsetParent = getTrueOffsetParent$1(offsetParent);
856
+ }
857
+ if (offsetParent && (getNodeName$1(offsetParent) === "html" || getNodeName$1(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
858
+ return window2;
859
+ }
860
+ return offsetParent || getContainingBlock$1(element) || window2;
861
+ }
862
+ function getDimensions(element) {
863
+ return {
864
+ width: element.offsetWidth,
865
+ height: element.offsetHeight
866
+ };
867
+ }
868
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref2) {
869
+ let {
870
+ rect,
871
+ offsetParent,
872
+ strategy
873
+ } = _ref2;
874
+ const isOffsetParentAnElement = isHTMLElement$1(offsetParent);
875
+ const documentElement = getDocumentElement$1(offsetParent);
876
+ if (offsetParent === documentElement) {
877
+ return rect;
878
+ }
879
+ let scroll = {
880
+ scrollLeft: 0,
881
+ scrollTop: 0
882
+ };
883
+ const offsets = {
884
+ x: 0,
885
+ y: 0
886
+ };
887
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
888
+ if (getNodeName$1(offsetParent) !== "body" || isScrollParent$1(documentElement)) {
889
+ scroll = getNodeScroll$1(offsetParent);
890
+ }
891
+ if (isHTMLElement$1(offsetParent)) {
892
+ const offsetRect = getBoundingClientRect$1(offsetParent, true);
893
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
894
+ offsets.y = offsetRect.y + offsetParent.clientTop;
895
+ }
896
+ }
897
+ return __spreadProps(__spreadValues({}, rect), {
898
+ x: rect.x - scroll.scrollLeft + offsets.x,
899
+ y: rect.y - scroll.scrollTop + offsets.y
900
+ });
901
+ }
902
+ function getViewportRect$1(element) {
903
+ const win = getWindow$1(element);
904
+ const html = getDocumentElement$1(element);
905
+ const visualViewport = win.visualViewport;
906
+ let width = html.clientWidth;
907
+ let height = html.clientHeight;
908
+ let x = 0;
909
+ let y = 0;
910
+ if (visualViewport) {
911
+ width = visualViewport.width;
912
+ height = visualViewport.height;
913
+ if (Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < 0.01) {
914
+ x = visualViewport.offsetLeft;
915
+ y = visualViewport.offsetTop;
916
+ }
917
+ }
918
+ return {
919
+ width,
920
+ height,
921
+ x,
922
+ y
923
+ };
924
+ }
925
+ function getDocumentRect$1(element) {
926
+ var _element$ownerDocumen;
927
+ const html = getDocumentElement$1(element);
928
+ const scroll = getNodeScroll$1(element);
929
+ const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
930
+ const width = max$1(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
931
+ const height = max$1(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
932
+ let x = -scroll.scrollLeft + getWindowScrollBarX$1(element);
933
+ const y = -scroll.scrollTop;
934
+ if (getComputedStyle$1$1(body || html).direction === "rtl") {
935
+ x += max$1(html.clientWidth, body ? body.clientWidth : 0) - width;
936
+ }
937
+ return {
938
+ width,
939
+ height,
940
+ x,
941
+ y
942
+ };
943
+ }
944
+ function getScrollParent$1(node) {
945
+ if (["html", "body", "#document"].includes(getNodeName$1(node))) {
946
+ return node.ownerDocument.body;
947
+ }
948
+ if (isHTMLElement$1(node) && isScrollParent$1(node)) {
949
+ return node;
950
+ }
951
+ return getScrollParent$1(getParentNode$1(node));
952
+ }
953
+ function getScrollParents(node, list) {
954
+ var _node$ownerDocument;
955
+ if (list === void 0) {
956
+ list = [];
957
+ }
958
+ const scrollParent = getScrollParent$1(node);
959
+ const isBody = scrollParent === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
960
+ const win = getWindow$1(scrollParent);
961
+ const target = isBody ? [win].concat(win.visualViewport || [], isScrollParent$1(scrollParent) ? scrollParent : []) : scrollParent;
962
+ const updatedList = list.concat(target);
963
+ return isBody ? updatedList : updatedList.concat(getScrollParents(getParentNode$1(target)));
964
+ }
965
+ function contains$1(parent, child) {
966
+ const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
967
+ if (parent.contains(child)) {
968
+ return true;
969
+ } else if (rootNode && isShadowRoot$1(rootNode)) {
970
+ let next = child;
971
+ do {
972
+ if (next && parent === next) {
973
+ return true;
974
+ }
975
+ next = next.parentNode || next.host;
976
+ } while (next);
977
+ }
978
+ return false;
979
+ }
980
+ function getInnerBoundingClientRect$1(element) {
981
+ const clientRect = getBoundingClientRect$1(element);
982
+ const top2 = clientRect.top + element.clientTop;
983
+ const left2 = clientRect.left + element.clientLeft;
984
+ return {
985
+ top: top2,
986
+ left: left2,
987
+ x: left2,
988
+ y: top2,
989
+ right: left2 + element.clientWidth,
990
+ bottom: top2 + element.clientHeight,
991
+ width: element.clientWidth,
992
+ height: element.clientHeight
993
+ };
994
+ }
995
+ function getClientRectFromClippingParent(element, clippingParent) {
996
+ if (clippingParent === "viewport") {
997
+ return rectToClientRect$1(getViewportRect$1(element));
998
+ }
999
+ if (isElement$2(clippingParent)) {
1000
+ return getInnerBoundingClientRect$1(clippingParent);
1001
+ }
1002
+ return rectToClientRect$1(getDocumentRect$1(getDocumentElement$1(element)));
1003
+ }
1004
+ function getClippingParents$1(element) {
1005
+ const clippingParents2 = getScrollParents(getParentNode$1(element));
1006
+ const canEscapeClipping = ["absolute", "fixed"].includes(getComputedStyle$1$1(element).position);
1007
+ const clipperElement = canEscapeClipping && isHTMLElement$1(element) ? getOffsetParent$1(element) : element;
1008
+ if (!isElement$2(clipperElement)) {
1009
+ return [];
1010
+ }
1011
+ return clippingParents2.filter((clippingParent) => isElement$2(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName$1(clippingParent) !== "body");
1012
+ }
1013
+ function getClippingClientRect(_ref2) {
1014
+ let {
1015
+ element,
1016
+ boundary,
1017
+ rootBoundary
1018
+ } = _ref2;
1019
+ const mainClippingParents = boundary === "clippingParents" ? getClippingParents$1(element) : [].concat(boundary);
1020
+ const clippingParents2 = [...mainClippingParents, rootBoundary];
1021
+ const firstClippingParent = clippingParents2[0];
1022
+ const clippingRect = clippingParents2.reduce((accRect, clippingParent) => {
1023
+ const rect = getClientRectFromClippingParent(element, clippingParent);
1024
+ accRect.top = max$1(rect.top, accRect.top);
1025
+ accRect.right = min$1(rect.right, accRect.right);
1026
+ accRect.bottom = min$1(rect.bottom, accRect.bottom);
1027
+ accRect.left = max$1(rect.left, accRect.left);
1028
+ return accRect;
1029
+ }, getClientRectFromClippingParent(element, firstClippingParent));
1030
+ clippingRect.width = clippingRect.right - clippingRect.left;
1031
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
1032
+ clippingRect.x = clippingRect.left;
1033
+ clippingRect.y = clippingRect.top;
1034
+ return clippingRect;
1035
+ }
1036
+ const platform = {
1037
+ getElementRects: (_ref2) => {
1038
+ let {
1039
+ reference: reference2,
1040
+ floating,
1041
+ strategy
1042
+ } = _ref2;
1043
+ return {
1044
+ reference: getRectRelativeToOffsetParent(reference2, getOffsetParent$1(floating), strategy),
1045
+ floating: __spreadProps(__spreadValues({}, getDimensions(floating)), {
1046
+ x: 0,
1047
+ y: 0
1048
+ })
1049
+ };
1050
+ },
1051
+ convertOffsetParentRelativeRectToViewportRelativeRect: (args) => convertOffsetParentRelativeRectToViewportRelativeRect(args),
1052
+ getOffsetParent: (_ref2) => {
1053
+ let {
1054
+ element
1055
+ } = _ref2;
1056
+ return getOffsetParent$1(element);
1057
+ },
1058
+ isElement: (value) => isElement$2(value),
1059
+ getDocumentElement: (_ref3) => {
1060
+ let {
1061
+ element
1062
+ } = _ref3;
1063
+ return getDocumentElement$1(element);
1064
+ },
1065
+ getClippingClientRect: (args) => getClippingClientRect(args),
1066
+ getDimensions: (_ref4) => {
1067
+ let {
1068
+ element
1069
+ } = _ref4;
1070
+ return getDimensions(element);
1071
+ },
1072
+ getClientRects: (_ref5) => {
1073
+ let {
1074
+ element
1075
+ } = _ref5;
1076
+ return element.getClientRects();
1077
+ }
1078
+ };
1079
+ const computePosition = (reference2, floating, options) => computePosition$1(reference2, floating, __spreadValues({
1080
+ platform
1081
+ }, options));
1082
+ var __defProp2 = Object.defineProperty;
1083
+ var __defProps2 = Object.defineProperties;
1084
+ var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
1085
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
1086
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1087
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
1088
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1089
+ var __spreadValues2 = (a, b) => {
1090
+ for (var prop in b || (b = {}))
1091
+ if (__hasOwnProp2.call(b, prop))
1092
+ __defNormalProp2(a, prop, b[prop]);
1093
+ if (__getOwnPropSymbols2)
1094
+ for (var prop of __getOwnPropSymbols2(b)) {
1095
+ if (__propIsEnum2.call(b, prop))
1096
+ __defNormalProp2(a, prop, b[prop]);
1097
+ }
1098
+ return a;
1099
+ };
1100
+ var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
1101
+ function assign(to, from) {
1102
+ for (const key in from) {
1103
+ if (Object.prototype.hasOwnProperty.call(from, key)) {
1104
+ if (typeof from[key] === "object" && to[key]) {
1105
+ assign(to[key], from[key]);
1106
+ } else {
1107
+ to[key] = from[key];
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+ const config$2 = {
1113
+ disabled: false,
1114
+ distance: 5,
1115
+ skidding: 0,
1116
+ container: "body",
1117
+ boundary: void 0,
1118
+ instantMove: false,
1119
+ disposeTimeout: 5e3,
1120
+ popperTriggers: [],
1121
+ strategy: "absolute",
1122
+ preventOverflow: true,
1123
+ flip: true,
1124
+ shift: true,
1125
+ overflowPadding: 0,
1126
+ arrowPadding: 0,
1127
+ arrowOverflow: true,
1128
+ themes: {
1129
+ tooltip: {
1130
+ placement: "top",
1131
+ triggers: ["hover", "focus", "touch"],
1132
+ hideTriggers: (events2) => [...events2, "click"],
1133
+ delay: {
1134
+ show: 200,
1135
+ hide: 0
1136
+ },
1137
+ handleResize: false,
1138
+ html: false,
1139
+ loadingContent: "..."
1140
+ },
1141
+ dropdown: {
1142
+ placement: "bottom",
1143
+ triggers: ["click"],
1144
+ delay: 0,
1145
+ handleResize: true,
1146
+ autoHide: true
1147
+ },
1148
+ menu: {
1149
+ $extend: "dropdown",
1150
+ triggers: ["hover", "focus"],
1151
+ popperTriggers: ["hover", "focus"],
1152
+ delay: {
1153
+ show: 0,
1154
+ hide: 400
1155
+ }
1156
+ }
1157
+ }
1158
+ };
1159
+ function getDefaultConfig(theme, key) {
1160
+ let themeConfig = config$2.themes[theme] || {};
1161
+ let value;
1162
+ do {
1163
+ value = themeConfig[key];
1164
+ if (typeof value === "undefined") {
1165
+ if (themeConfig.$extend) {
1166
+ themeConfig = config$2.themes[themeConfig.$extend] || {};
1167
+ } else {
1168
+ themeConfig = null;
1169
+ value = config$2[key];
1170
+ }
1171
+ } else {
1172
+ themeConfig = null;
1173
+ }
1174
+ } while (themeConfig);
1175
+ return value;
1176
+ }
1177
+ function getThemeClasses(theme) {
1178
+ const result = [theme];
1179
+ let themeConfig = config$2.themes[theme] || {};
1180
+ do {
1181
+ if (themeConfig.$extend && !themeConfig.$resetCss) {
1182
+ result.push(themeConfig.$extend);
1183
+ themeConfig = config$2.themes[themeConfig.$extend] || {};
1184
+ } else {
1185
+ themeConfig = null;
1186
+ }
1187
+ } while (themeConfig);
1188
+ return result.map((c) => `v-popper--theme-${c}`);
1189
+ }
1190
+ function getAllParentThemes(theme) {
1191
+ const result = [theme];
1192
+ let themeConfig = config$2.themes[theme] || {};
1193
+ do {
1194
+ if (themeConfig.$extend) {
1195
+ result.push(themeConfig.$extend);
1196
+ themeConfig = config$2.themes[themeConfig.$extend] || {};
1197
+ } else {
1198
+ themeConfig = null;
1199
+ }
1200
+ } while (themeConfig);
1201
+ return result;
1202
+ }
1203
+ let supportsPassive = false;
1204
+ if (typeof window !== "undefined") {
1205
+ supportsPassive = false;
1206
+ try {
1207
+ const opts = Object.defineProperty({}, "passive", {
1208
+ get() {
1209
+ supportsPassive = true;
1210
+ }
1211
+ });
1212
+ window.addEventListener("test", null, opts);
1213
+ } catch (e) {
1214
+ }
1215
+ }
1216
+ let isIOS = false;
1217
+ if (typeof window !== "undefined" && typeof navigator !== "undefined") {
1218
+ isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
1219
+ }
1220
+ const placements$1 = ["auto", "top", "bottom", "left", "right"].reduce((acc, base) => acc.concat([
1221
+ base,
1222
+ `${base}-start`,
1223
+ `${base}-end`
1224
+ ]), []);
1225
+ const SHOW_EVENT_MAP = {
1226
+ hover: "mouseenter",
1227
+ focus: "focus",
1228
+ click: "click",
1229
+ touch: "touchstart"
1230
+ };
1231
+ const HIDE_EVENT_MAP = {
1232
+ hover: "mouseleave",
1233
+ focus: "blur",
1234
+ click: "click",
1235
+ touch: "touchend"
1236
+ };
1237
+ function removeFromArray(array, item) {
1238
+ const index = array.indexOf(item);
1239
+ if (index !== -1) {
1240
+ array.splice(index, 1);
1241
+ }
1242
+ }
1243
+ function nextFrame() {
1244
+ return new Promise((resolve) => requestAnimationFrame(() => {
1245
+ requestAnimationFrame(resolve);
1246
+ }));
1247
+ }
1248
+ const shownPoppers = [];
1249
+ let hidingPopper = null;
1250
+ const shownPoppersByTheme = {};
1251
+ function getShownPoppersByTheme(theme) {
1252
+ let list = shownPoppersByTheme[theme];
1253
+ if (!list) {
1254
+ list = shownPoppersByTheme[theme] = [];
1255
+ }
1256
+ return list;
1257
+ }
1258
+ let Element$1 = function() {
1259
+ };
1260
+ if (typeof window !== "undefined") {
1261
+ Element$1 = window.Element;
1262
+ }
1263
+ function defaultPropFactory(prop) {
1264
+ return function(props) {
1265
+ return getDefaultConfig(props.theme, prop);
1266
+ };
1267
+ }
1268
+ const PROVIDE_KEY = "__floating-vue__popper";
1269
+ var PrivatePopper = () => defineComponent({
1270
+ name: "VPopper",
1271
+ provide() {
1272
+ return {
1273
+ [PROVIDE_KEY]: {
1274
+ parentPopper: this
1275
+ }
1276
+ };
1277
+ },
1278
+ inject: {
1279
+ [PROVIDE_KEY]: { default: null }
1280
+ },
1281
+ props: {
1282
+ theme: {
1283
+ type: String,
1284
+ required: true
1285
+ },
1286
+ targetNodes: {
1287
+ type: Function,
1288
+ required: true
1289
+ },
1290
+ referenceNode: {
1291
+ type: Function,
1292
+ required: true
1293
+ },
1294
+ popperNode: {
1295
+ type: Function,
1296
+ required: true
1297
+ },
1298
+ shown: {
1299
+ type: Boolean,
1300
+ default: false
1301
+ },
1302
+ showGroup: {
1303
+ type: String,
1304
+ default: null
1305
+ },
1306
+ ariaId: {
1307
+ default: null
1308
+ },
1309
+ disabled: {
1310
+ type: Boolean,
1311
+ default: defaultPropFactory("disabled")
1312
+ },
1313
+ positioningDisabled: {
1314
+ type: Boolean,
1315
+ default: defaultPropFactory("positioningDisabled")
1316
+ },
1317
+ placement: {
1318
+ type: String,
1319
+ default: defaultPropFactory("placement"),
1320
+ validator: (value) => placements$1.includes(value)
1321
+ },
1322
+ delay: {
1323
+ type: [String, Number, Object],
1324
+ default: defaultPropFactory("delay")
1325
+ },
1326
+ distance: {
1327
+ type: [Number, String],
1328
+ default: defaultPropFactory("distance")
1329
+ },
1330
+ skidding: {
1331
+ type: [Number, String],
1332
+ default: defaultPropFactory("skidding")
1333
+ },
1334
+ triggers: {
1335
+ type: Array,
1336
+ default: defaultPropFactory("triggers")
1337
+ },
1338
+ showTriggers: {
1339
+ type: [Array, Function],
1340
+ default: defaultPropFactory("showTriggers")
1341
+ },
1342
+ hideTriggers: {
1343
+ type: [Array, Function],
1344
+ default: defaultPropFactory("hideTriggers")
1345
+ },
1346
+ popperTriggers: {
1347
+ type: Array,
1348
+ default: defaultPropFactory("popperTriggers")
1349
+ },
1350
+ popperShowTriggers: {
1351
+ type: [Array, Function],
1352
+ default: defaultPropFactory("popperShowTriggers")
1353
+ },
1354
+ popperHideTriggers: {
1355
+ type: [Array, Function],
1356
+ default: defaultPropFactory("popperHideTriggers")
1357
+ },
1358
+ container: {
1359
+ type: [String, Object, Element$1, Boolean],
1360
+ default: defaultPropFactory("container")
1361
+ },
1362
+ boundary: {
1363
+ type: [String, Element$1],
1364
+ default: defaultPropFactory("boundary")
1365
+ },
1366
+ strategy: {
1367
+ type: String,
1368
+ validator: (value) => ["absolute", "fixed"].includes(value),
1369
+ default: defaultPropFactory("strategy")
1370
+ },
1371
+ autoHide: {
1372
+ type: [Boolean, Function],
1373
+ default: defaultPropFactory("autoHide")
1374
+ },
1375
+ handleResize: {
1376
+ type: Boolean,
1377
+ default: defaultPropFactory("handleResize")
1378
+ },
1379
+ instantMove: {
1380
+ type: Boolean,
1381
+ default: defaultPropFactory("instantMove")
1382
+ },
1383
+ eagerMount: {
1384
+ type: Boolean,
1385
+ default: defaultPropFactory("eagerMount")
1386
+ },
1387
+ popperClass: {
1388
+ type: [String, Array, Object],
1389
+ default: defaultPropFactory("popperClass")
1390
+ },
1391
+ computeTransformOrigin: {
1392
+ type: Boolean,
1393
+ default: defaultPropFactory("computeTransformOrigin")
1394
+ },
1395
+ autoMinSize: {
1396
+ type: Boolean,
1397
+ default: defaultPropFactory("autoMinSize")
1398
+ },
1399
+ autoSize: {
1400
+ type: [Boolean, String],
1401
+ default: defaultPropFactory("autoSize")
1402
+ },
1403
+ autoMaxSize: {
1404
+ type: Boolean,
1405
+ default: defaultPropFactory("autoMaxSize")
1406
+ },
1407
+ autoBoundaryMaxSize: {
1408
+ type: Boolean,
1409
+ default: defaultPropFactory("autoBoundaryMaxSize")
1410
+ },
1411
+ preventOverflow: {
1412
+ type: Boolean,
1413
+ default: defaultPropFactory("preventOverflow")
1414
+ },
1415
+ overflowPadding: {
1416
+ type: [Number, String],
1417
+ default: defaultPropFactory("overflowPadding")
1418
+ },
1419
+ arrowPadding: {
1420
+ type: [Number, String],
1421
+ default: defaultPropFactory("arrowPadding")
1422
+ },
1423
+ arrowOverflow: {
1424
+ type: Boolean,
1425
+ default: defaultPropFactory("arrowOverflow")
1426
+ },
1427
+ flip: {
1428
+ type: Boolean,
1429
+ default: defaultPropFactory("flip")
1430
+ },
1431
+ shift: {
1432
+ type: Boolean,
1433
+ default: defaultPropFactory("shift")
1434
+ },
1435
+ shiftCrossAxis: {
1436
+ type: Boolean,
1437
+ default: defaultPropFactory("shiftCrossAxis")
1438
+ }
1439
+ },
1440
+ emits: [
1441
+ "show",
1442
+ "hide",
1443
+ "update:shown",
1444
+ "apply-show",
1445
+ "apply-hide",
1446
+ "close-group",
1447
+ "close-directive",
1448
+ "auto-hide",
1449
+ "resize",
1450
+ "dispose"
1451
+ ],
1452
+ data() {
1453
+ return {
1454
+ isShown: false,
1455
+ isMounted: false,
1456
+ skipTransition: false,
1457
+ classes: {
1458
+ showFrom: false,
1459
+ showTo: false,
1460
+ hideFrom: false,
1461
+ hideTo: true
1462
+ },
1463
+ result: {
1464
+ x: 0,
1465
+ y: 0,
1466
+ placement: "",
1467
+ strategy: this.strategy,
1468
+ arrow: {
1469
+ x: 0,
1470
+ y: 0,
1471
+ centerOffset: 0
1472
+ },
1473
+ transformOrigin: null
1474
+ },
1475
+ shownChildren: new Set(),
1476
+ lastAutoHide: true
1477
+ };
1478
+ },
1479
+ computed: {
1480
+ popperId() {
1481
+ return this.ariaId != null ? this.ariaId : this.randomId;
1482
+ },
1483
+ shouldMountContent() {
1484
+ return this.eagerMount || this.isMounted;
1485
+ },
1486
+ slotData() {
1487
+ return {
1488
+ popperId: this.popperId,
1489
+ isShown: this.isShown,
1490
+ shouldMountContent: this.shouldMountContent,
1491
+ skipTransition: this.skipTransition,
1492
+ autoHide: typeof this.autoHide === "function" ? this.lastAutoHide : this.autoHide,
1493
+ show: this.show,
1494
+ hide: this.hide,
1495
+ handleResize: this.handleResize,
1496
+ onResize: this.onResize,
1497
+ classes: __spreadProps2(__spreadValues2({}, this.classes), {
1498
+ popperClass: this.popperClass
1499
+ }),
1500
+ result: this.positioningDisabled ? null : this.result,
1501
+ attrs: this.$attrs
1502
+ };
1503
+ },
1504
+ parentPopper() {
1505
+ var _a;
1506
+ return (_a = this[PROVIDE_KEY]) == null ? void 0 : _a.parentPopper;
1507
+ },
1508
+ hasPopperShowTriggerHover() {
1509
+ var _a, _b;
1510
+ return ((_a = this.popperTriggers) == null ? void 0 : _a.includes("hover")) || ((_b = this.popperShowTriggers) == null ? void 0 : _b.includes("hover"));
1511
+ }
1512
+ },
1513
+ watch: __spreadValues2(__spreadValues2({
1514
+ shown: "$_autoShowHide",
1515
+ disabled(value) {
1516
+ if (value) {
1517
+ this.dispose();
1518
+ } else {
1519
+ this.init();
1520
+ }
1521
+ },
1522
+ async container() {
1523
+ if (this.isShown) {
1524
+ this.$_ensureTeleport();
1525
+ await this.$_computePosition();
1526
+ }
1527
+ }
1528
+ }, [
1529
+ "triggers",
1530
+ "positioningDisabled"
1531
+ ].reduce((acc, prop) => {
1532
+ acc[prop] = "$_refreshListeners";
1533
+ return acc;
1534
+ }, {})), [
1535
+ "placement",
1536
+ "distance",
1537
+ "skidding",
1538
+ "boundary",
1539
+ "strategy",
1540
+ "overflowPadding",
1541
+ "arrowPadding",
1542
+ "preventOverflow",
1543
+ "shift",
1544
+ "shiftCrossAxis",
1545
+ "flip"
1546
+ ].reduce((acc, prop) => {
1547
+ acc[prop] = "$_computePosition";
1548
+ return acc;
1549
+ }, {})),
1550
+ created() {
1551
+ this.$_isDisposed = true;
1552
+ this.randomId = `popper_${[Math.random(), Date.now()].map((n) => n.toString(36).substring(2, 10)).join("_")}`;
1553
+ if (this.autoMinSize) {
1554
+ console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.');
1555
+ }
1556
+ if (this.autoMaxSize) {
1557
+ console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.");
1558
+ }
1559
+ },
1560
+ mounted() {
1561
+ this.init();
1562
+ this.$_detachPopperNode();
1563
+ },
1564
+ activated() {
1565
+ this.$_autoShowHide();
1566
+ },
1567
+ deactivated() {
1568
+ this.hide();
1569
+ },
1570
+ beforeUnmount() {
1571
+ this.dispose();
1572
+ },
1573
+ methods: {
1574
+ show({ event = null, skipDelay = false, force = false } = {}) {
1575
+ var _a, _b;
1576
+ if (((_a = this.parentPopper) == null ? void 0 : _a.lockedChild) && this.parentPopper.lockedChild !== this)
1577
+ return;
1578
+ this.$_pendingHide = false;
1579
+ if (force || !this.disabled) {
1580
+ if (((_b = this.parentPopper) == null ? void 0 : _b.lockedChild) === this) {
1581
+ this.parentPopper.lockedChild = null;
1582
+ }
1583
+ this.$_scheduleShow(event, skipDelay);
1584
+ this.$emit("show");
1585
+ this.$_showFrameLocked = true;
1586
+ requestAnimationFrame(() => {
1587
+ this.$_showFrameLocked = false;
1588
+ });
1589
+ }
1590
+ this.$emit("update:shown", true);
1591
+ },
1592
+ hide({ event = null, skipDelay = false } = {}) {
1593
+ var _a;
1594
+ if (this.$_hideInProgress)
1595
+ return;
1596
+ if (this.shownChildren.size > 0) {
1597
+ this.$_pendingHide = true;
1598
+ return;
1599
+ }
1600
+ if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) {
1601
+ if (this.parentPopper) {
1602
+ this.parentPopper.lockedChild = this;
1603
+ clearTimeout(this.parentPopper.lockedChildTimer);
1604
+ this.parentPopper.lockedChildTimer = setTimeout(() => {
1605
+ if (this.parentPopper.lockedChild === this) {
1606
+ this.parentPopper.lockedChild.hide({ skipDelay });
1607
+ this.parentPopper.lockedChild = null;
1608
+ }
1609
+ }, 1e3);
1610
+ }
1611
+ return;
1612
+ }
1613
+ if (((_a = this.parentPopper) == null ? void 0 : _a.lockedChild) === this) {
1614
+ this.parentPopper.lockedChild = null;
1615
+ }
1616
+ this.$_pendingHide = false;
1617
+ this.$_scheduleHide(event, skipDelay);
1618
+ this.$emit("hide");
1619
+ this.$emit("update:shown", false);
1620
+ },
1621
+ init() {
1622
+ if (!this.$_isDisposed)
1623
+ return;
1624
+ this.$_isDisposed = false;
1625
+ this.isMounted = false;
1626
+ this.$_events = [];
1627
+ this.$_preventShow = false;
1628
+ this.$_referenceNode = this.referenceNode();
1629
+ this.$_targetNodes = this.targetNodes().filter((e) => e.nodeType === e.ELEMENT_NODE);
1630
+ this.$_popperNode = this.popperNode();
1631
+ this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner");
1632
+ this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container");
1633
+ this.$_swapTargetAttrs("title", "data-original-title");
1634
+ this.$_detachPopperNode();
1635
+ if (this.triggers.length) {
1636
+ this.$_addEventListeners();
1637
+ }
1638
+ if (this.shown) {
1639
+ this.show();
1640
+ }
1641
+ },
1642
+ dispose() {
1643
+ if (this.$_isDisposed)
1644
+ return;
1645
+ this.$_isDisposed = true;
1646
+ this.$_removeEventListeners();
1647
+ this.hide({ skipDelay: true });
1648
+ this.$_detachPopperNode();
1649
+ this.isMounted = false;
1650
+ this.isShown = false;
1651
+ this.$_updateParentShownChildren(false);
1652
+ this.$_swapTargetAttrs("data-original-title", "title");
1653
+ this.$emit("dispose");
1654
+ },
1655
+ async onResize() {
1656
+ if (this.isShown) {
1657
+ await this.$_computePosition();
1658
+ this.$emit("resize");
1659
+ }
1660
+ },
1661
+ async $_computePosition() {
1662
+ var _a;
1663
+ if (this.$_isDisposed || this.positioningDisabled)
1664
+ return;
1665
+ const options2 = {
1666
+ strategy: this.strategy,
1667
+ middleware: []
1668
+ };
1669
+ if (this.distance || this.skidding) {
1670
+ options2.middleware.push(offset$2({
1671
+ mainAxis: this.distance,
1672
+ crossAxis: this.skidding
1673
+ }));
1674
+ }
1675
+ const isPlacementAuto = this.placement.startsWith("auto");
1676
+ if (isPlacementAuto) {
1677
+ options2.middleware.push(autoPlacement({
1678
+ alignment: (_a = this.placement.split("-")[1]) != null ? _a : ""
1679
+ }));
1680
+ } else {
1681
+ options2.placement = this.placement;
1682
+ }
1683
+ if (this.preventOverflow) {
1684
+ if (this.shift) {
1685
+ options2.middleware.push(shift({
1686
+ padding: this.overflowPadding,
1687
+ boundary: this.boundary,
1688
+ crossAxis: this.shiftCrossAxis
1689
+ }));
1690
+ }
1691
+ if (!isPlacementAuto && this.flip) {
1692
+ options2.middleware.push(flip$2({
1693
+ padding: this.overflowPadding,
1694
+ boundary: this.boundary
1695
+ }));
1696
+ }
1697
+ }
1698
+ options2.middleware.push(arrow$2({
1699
+ element: this.$_arrowNode,
1700
+ padding: this.arrowPadding
1701
+ }));
1702
+ if (this.arrowOverflow) {
1703
+ options2.middleware.push({
1704
+ name: "arrowOverflow",
1705
+ fn: ({ placement, rects, middlewareData }) => {
1706
+ let overflow;
1707
+ const { centerOffset } = middlewareData.arrow;
1708
+ if (placement.startsWith("top") || placement.startsWith("bottom")) {
1709
+ overflow = Math.abs(centerOffset) > rects.reference.width / 2;
1710
+ } else {
1711
+ overflow = Math.abs(centerOffset) > rects.reference.height / 2;
1712
+ }
1713
+ return {
1714
+ data: {
1715
+ overflow
1716
+ }
1717
+ };
1718
+ }
1719
+ });
1720
+ }
1721
+ if (this.autoMinSize || this.autoSize) {
1722
+ const autoSize = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
1723
+ options2.middleware.push({
1724
+ name: "autoSize",
1725
+ fn: ({ rects, placement, middlewareData }) => {
1726
+ var _a2;
1727
+ if ((_a2 = middlewareData.autoSize) == null ? void 0 : _a2.skip) {
1728
+ return {};
1729
+ }
1730
+ let width;
1731
+ let height;
1732
+ if (placement.startsWith("top") || placement.startsWith("bottom")) {
1733
+ width = rects.reference.width;
1734
+ } else {
1735
+ height = rects.reference.height;
1736
+ }
1737
+ this.$_innerNode.style[autoSize === "min" ? "minWidth" : autoSize === "max" ? "maxWidth" : "width"] = width != null ? `${width}px` : null;
1738
+ this.$_innerNode.style[autoSize === "min" ? "minHeight" : autoSize === "max" ? "maxHeight" : "height"] = height != null ? `${height}px` : null;
1739
+ return {
1740
+ data: {
1741
+ skip: true
1742
+ },
1743
+ reset: {
1744
+ rects: true
1745
+ }
1746
+ };
1747
+ }
1748
+ });
1749
+ }
1750
+ if (this.autoMaxSize || this.autoBoundaryMaxSize) {
1751
+ this.$_innerNode.style.maxWidth = null;
1752
+ this.$_innerNode.style.maxHeight = null;
1753
+ options2.middleware.push(size({
1754
+ boundary: this.boundary,
1755
+ padding: this.overflowPadding,
1756
+ apply: ({ width, height }) => {
1757
+ this.$_innerNode.style.maxWidth = width != null ? `${width}px` : null;
1758
+ this.$_innerNode.style.maxHeight = height != null ? `${height}px` : null;
1759
+ }
1760
+ }));
1761
+ }
1762
+ const data = await computePosition(this.$_referenceNode, this.$_popperNode, options2);
1763
+ Object.assign(this.result, {
1764
+ x: data.x,
1765
+ y: data.y,
1766
+ placement: data.placement,
1767
+ strategy: data.strategy,
1768
+ arrow: __spreadValues2(__spreadValues2({}, data.middlewareData.arrow), data.middlewareData.arrowOverflow)
1769
+ });
1770
+ },
1771
+ $_scheduleShow(event = null, skipDelay = false) {
1772
+ this.$_updateParentShownChildren(true);
1773
+ this.$_hideInProgress = false;
1774
+ clearTimeout(this.$_scheduleTimer);
1775
+ if (hidingPopper && this.instantMove && hidingPopper.instantMove && hidingPopper !== this.parentPopper) {
1776
+ hidingPopper.$_applyHide(true);
1777
+ this.$_applyShow(true);
1778
+ return;
1779
+ }
1780
+ if (skipDelay) {
1781
+ this.$_applyShow();
1782
+ } else {
1783
+ this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show"));
1784
+ }
1785
+ },
1786
+ $_scheduleHide(event = null, skipDelay = false) {
1787
+ if (this.shownChildren.size > 0) {
1788
+ this.$_pendingHide = true;
1789
+ return;
1790
+ }
1791
+ this.$_updateParentShownChildren(false);
1792
+ this.$_hideInProgress = true;
1793
+ clearTimeout(this.$_scheduleTimer);
1794
+ if (this.isShown) {
1795
+ hidingPopper = this;
1796
+ }
1797
+ if (skipDelay) {
1798
+ this.$_applyHide();
1799
+ } else {
1800
+ this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide"));
1801
+ }
1802
+ },
1803
+ $_computeDelay(type) {
1804
+ const delay = this.delay;
1805
+ return parseInt(delay && delay[type] || delay || 0);
1806
+ },
1807
+ async $_applyShow(skipTransition = false) {
1808
+ clearTimeout(this.$_disposeTimer);
1809
+ clearTimeout(this.$_scheduleTimer);
1810
+ this.skipTransition = skipTransition;
1811
+ if (this.isShown) {
1812
+ return;
1813
+ }
1814
+ this.$_ensureTeleport();
1815
+ await nextFrame();
1816
+ await this.$_computePosition();
1817
+ await this.$_applyShowEffect();
1818
+ if (!this.positioningDisabled) {
1819
+ this.$_registerEventListeners([
1820
+ ...getScrollParents(this.$_referenceNode),
1821
+ ...getScrollParents(this.$_popperNode)
1822
+ ], "scroll", () => {
1823
+ this.$_computePosition();
1824
+ });
1825
+ }
1826
+ },
1827
+ async $_applyShowEffect() {
1828
+ if (this.$_hideInProgress)
1829
+ return;
1830
+ if (this.computeTransformOrigin) {
1831
+ const bounds = this.$_referenceNode.getBoundingClientRect();
1832
+ const popperWrapper = this.$_popperNode.querySelector(".v-popper__wrapper");
1833
+ const parentBounds = popperWrapper.parentNode.getBoundingClientRect();
1834
+ const x = bounds.x + bounds.width / 2 - (parentBounds.left + popperWrapper.offsetLeft);
1835
+ const y = bounds.y + bounds.height / 2 - (parentBounds.top + popperWrapper.offsetTop);
1836
+ this.result.transformOrigin = `${x}px ${y}px`;
1837
+ }
1838
+ this.isShown = true;
1839
+ this.$_applyAttrsToTarget({
1840
+ "aria-describedby": this.popperId,
1841
+ "data-popper-shown": ""
1842
+ });
1843
+ const showGroup = this.showGroup;
1844
+ if (showGroup) {
1845
+ let popover;
1846
+ for (let i = 0; i < shownPoppers.length; i++) {
1847
+ popover = shownPoppers[i];
1848
+ if (popover.showGroup !== showGroup) {
1849
+ popover.hide();
1850
+ popover.$emit("close-group");
1851
+ }
1852
+ }
1853
+ }
1854
+ shownPoppers.push(this);
1855
+ document.body.classList.add("v-popper--some-open");
1856
+ for (const theme of getAllParentThemes(this.theme)) {
1857
+ getShownPoppersByTheme(theme).push(this);
1858
+ document.body.classList.add(`v-popper--some-open--${theme}`);
1859
+ }
1860
+ this.$emit("apply-show");
1861
+ this.classes.showFrom = true;
1862
+ this.classes.showTo = false;
1863
+ this.classes.hideFrom = false;
1864
+ this.classes.hideTo = false;
1865
+ await nextFrame();
1866
+ this.classes.showFrom = false;
1867
+ this.classes.showTo = true;
1868
+ this.$_popperNode.focus();
1869
+ },
1870
+ async $_applyHide(skipTransition = false) {
1871
+ if (this.shownChildren.size > 0) {
1872
+ this.$_pendingHide = true;
1873
+ this.$_hideInProgress = false;
1874
+ return;
1875
+ }
1876
+ clearTimeout(this.$_scheduleTimer);
1877
+ if (!this.isShown) {
1878
+ return;
1879
+ }
1880
+ this.skipTransition = skipTransition;
1881
+ removeFromArray(shownPoppers, this);
1882
+ if (shownPoppers.length === 0) {
1883
+ document.body.classList.remove("v-popper--some-open");
1884
+ }
1885
+ for (const theme of getAllParentThemes(this.theme)) {
1886
+ const list = getShownPoppersByTheme(theme);
1887
+ removeFromArray(list, this);
1888
+ if (list.length === 0) {
1889
+ document.body.classList.remove(`v-popper--some-open--${theme}`);
1890
+ }
1891
+ }
1892
+ if (hidingPopper === this) {
1893
+ hidingPopper = null;
1894
+ }
1895
+ this.isShown = false;
1896
+ this.$_applyAttrsToTarget({
1897
+ "aria-describedby": void 0,
1898
+ "data-popper-shown": void 0
1899
+ });
1900
+ clearTimeout(this.$_disposeTimer);
1901
+ const disposeTime = getDefaultConfig(this.theme, "disposeTimeout");
1902
+ if (disposeTime !== null) {
1903
+ this.$_disposeTimer = setTimeout(() => {
1904
+ if (this.$_popperNode) {
1905
+ this.$_detachPopperNode();
1906
+ this.isMounted = false;
1907
+ }
1908
+ }, disposeTime);
1909
+ }
1910
+ this.$_removeEventListeners("scroll");
1911
+ this.$emit("apply-hide");
1912
+ this.classes.showFrom = false;
1913
+ this.classes.showTo = false;
1914
+ this.classes.hideFrom = true;
1915
+ this.classes.hideTo = false;
1916
+ await nextFrame();
1917
+ this.classes.hideFrom = false;
1918
+ this.classes.hideTo = true;
1919
+ },
1920
+ $_autoShowHide() {
1921
+ if (this.shown) {
1922
+ this.show();
1923
+ } else {
1924
+ this.hide();
1925
+ }
1926
+ },
1927
+ $_ensureTeleport() {
1928
+ if (this.$_isDisposed)
1929
+ return;
1930
+ let container = this.container;
1931
+ if (typeof container === "string") {
1932
+ container = window.document.querySelector(container);
1933
+ } else if (container === false) {
1934
+ container = this.$_targetNodes[0].parentNode;
1935
+ }
1936
+ if (!container) {
1937
+ throw new Error("No container for popover: " + this.container);
1938
+ }
1939
+ container.appendChild(this.$_popperNode);
1940
+ this.isMounted = true;
1941
+ },
1942
+ $_addEventListeners() {
1943
+ const handleShow = (event) => {
1944
+ if (this.isShown && !this.$_hideInProgress) {
1945
+ return;
1946
+ }
1947
+ event.usedByTooltip = true;
1948
+ !this.$_preventShow && this.show({ event });
1949
+ };
1950
+ this.$_registerTriggerListeners(this.$_targetNodes, SHOW_EVENT_MAP, this.triggers, this.showTriggers, handleShow);
1951
+ this.$_registerTriggerListeners([this.$_popperNode], SHOW_EVENT_MAP, this.popperTriggers, this.popperShowTriggers, handleShow);
1952
+ const handleHide = (event) => {
1953
+ if (event.usedByTooltip) {
1954
+ return;
1955
+ }
1956
+ this.hide({ event });
1957
+ };
1958
+ this.$_registerTriggerListeners(this.$_targetNodes, HIDE_EVENT_MAP, this.triggers, this.hideTriggers, handleHide);
1959
+ this.$_registerTriggerListeners([this.$_popperNode], HIDE_EVENT_MAP, this.popperTriggers, this.popperHideTriggers, handleHide);
1960
+ },
1961
+ $_registerEventListeners(targetNodes, eventType, handler) {
1962
+ this.$_events.push({ targetNodes, eventType, handler });
1963
+ targetNodes.forEach((node) => node.addEventListener(eventType, handler, supportsPassive ? {
1964
+ passive: true
1965
+ } : void 0));
1966
+ },
1967
+ $_registerTriggerListeners(targetNodes, eventMap, commonTriggers, customTrigger, handler) {
1968
+ let triggers = commonTriggers;
1969
+ if (customTrigger != null) {
1970
+ triggers = typeof customTrigger === "function" ? customTrigger(triggers) : customTrigger;
1971
+ }
1972
+ triggers.forEach((trigger) => {
1973
+ const eventType = eventMap[trigger];
1974
+ if (eventType) {
1975
+ this.$_registerEventListeners(targetNodes, eventType, handler);
1976
+ }
1977
+ });
1978
+ },
1979
+ $_removeEventListeners(filterEventType) {
1980
+ const newList = [];
1981
+ this.$_events.forEach((listener3) => {
1982
+ const { targetNodes, eventType, handler } = listener3;
1983
+ if (!filterEventType || filterEventType === eventType) {
1984
+ targetNodes.forEach((node) => node.removeEventListener(eventType, handler));
1985
+ } else {
1986
+ newList.push(listener3);
1987
+ }
1988
+ });
1989
+ this.$_events = newList;
1990
+ },
1991
+ $_refreshListeners() {
1992
+ if (!this.$_isDisposed) {
1993
+ this.$_removeEventListeners();
1994
+ this.$_addEventListeners();
1995
+ }
1996
+ },
1997
+ $_handleGlobalClose(event, touch = false) {
1998
+ if (this.$_showFrameLocked)
1999
+ return;
2000
+ this.hide({ event });
2001
+ if (event.closePopover) {
2002
+ this.$emit("close-directive");
2003
+ } else {
2004
+ this.$emit("auto-hide");
2005
+ }
2006
+ if (touch) {
2007
+ this.$_preventShow = true;
2008
+ setTimeout(() => {
2009
+ this.$_preventShow = false;
2010
+ }, 300);
2011
+ }
2012
+ },
2013
+ $_detachPopperNode() {
2014
+ this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
2015
+ },
2016
+ $_swapTargetAttrs(attrFrom, attrTo) {
2017
+ for (const el of this.$_targetNodes) {
2018
+ const value = el.getAttribute(attrFrom);
2019
+ if (value) {
2020
+ el.removeAttribute(attrFrom);
2021
+ el.setAttribute(attrTo, value);
2022
+ }
2023
+ }
2024
+ },
2025
+ $_applyAttrsToTarget(attrs) {
2026
+ for (const el of this.$_targetNodes) {
2027
+ for (const n in attrs) {
2028
+ const value = attrs[n];
2029
+ if (value == null) {
2030
+ el.removeAttribute(n);
2031
+ } else {
2032
+ el.setAttribute(n, value);
2033
+ }
2034
+ }
2035
+ }
2036
+ },
2037
+ $_updateParentShownChildren(value) {
2038
+ let parent = this.parentPopper;
2039
+ while (parent) {
2040
+ if (value) {
2041
+ parent.shownChildren.add(this.randomId);
2042
+ } else {
2043
+ parent.shownChildren.delete(this.randomId);
2044
+ if (parent.$_pendingHide) {
2045
+ parent.hide();
2046
+ }
2047
+ }
2048
+ parent = parent.parentPopper;
2049
+ }
2050
+ },
2051
+ $_isAimingPopper() {
2052
+ const referenceBounds = this.$_referenceNode.getBoundingClientRect();
2053
+ if (mouseX >= referenceBounds.left && mouseX <= referenceBounds.right && mouseY >= referenceBounds.top && mouseY <= referenceBounds.bottom) {
2054
+ const popperBounds = this.$_popperNode.getBoundingClientRect();
2055
+ const vectorX = mouseX - mousePreviousX;
2056
+ const vectorY = mouseY - mousePreviousY;
2057
+ const distance = popperBounds.left + popperBounds.width / 2 - mousePreviousX + (popperBounds.top + popperBounds.height / 2) - mousePreviousY;
2058
+ const newVectorLength = distance + popperBounds.width + popperBounds.height;
2059
+ const edgeX = mousePreviousX + vectorX * newVectorLength;
2060
+ const edgeY = mousePreviousY + vectorY * newVectorLength;
2061
+ return lineIntersectsLine(mousePreviousX, mousePreviousY, edgeX, edgeY, popperBounds.left, popperBounds.top, popperBounds.left, popperBounds.bottom) || lineIntersectsLine(mousePreviousX, mousePreviousY, edgeX, edgeY, popperBounds.left, popperBounds.top, popperBounds.right, popperBounds.top) || lineIntersectsLine(mousePreviousX, mousePreviousY, edgeX, edgeY, popperBounds.right, popperBounds.top, popperBounds.right, popperBounds.bottom) || lineIntersectsLine(mousePreviousX, mousePreviousY, edgeX, edgeY, popperBounds.left, popperBounds.bottom, popperBounds.right, popperBounds.bottom);
2062
+ }
2063
+ return false;
2064
+ }
2065
+ },
2066
+ render() {
2067
+ return this.$slots.default(this.slotData);
2068
+ }
2069
+ });
2070
+ if (typeof document !== "undefined" && typeof window !== "undefined") {
2071
+ if (isIOS) {
2072
+ document.addEventListener("touchstart", handleGlobalMousedown, supportsPassive ? {
2073
+ passive: true,
2074
+ capture: true
2075
+ } : true);
2076
+ document.addEventListener("touchend", handleGlobalTouchend, supportsPassive ? {
2077
+ passive: true,
2078
+ capture: true
2079
+ } : true);
2080
+ } else {
2081
+ window.addEventListener("mousedown", handleGlobalMousedown, true);
2082
+ window.addEventListener("click", handleGlobalClick, true);
2083
+ }
2084
+ window.addEventListener("resize", computePositionAllShownPoppers);
2085
+ }
2086
+ function handleGlobalMousedown(event) {
2087
+ for (let i = 0; i < shownPoppers.length; i++) {
2088
+ const popper2 = shownPoppers[i];
2089
+ try {
2090
+ const popperContent = popper2.popperNode();
2091
+ popper2.$_mouseDownContains = popperContent.contains(event.target);
2092
+ } catch (e) {
2093
+ }
2094
+ }
2095
+ }
2096
+ function handleGlobalClick(event) {
2097
+ handleGlobalClose(event);
2098
+ }
2099
+ function handleGlobalTouchend(event) {
2100
+ handleGlobalClose(event, true);
2101
+ }
2102
+ function handleGlobalClose(event, touch = false) {
2103
+ const preventClose = {};
2104
+ for (let i = shownPoppers.length - 1; i >= 0; i--) {
2105
+ const popper2 = shownPoppers[i];
2106
+ try {
2107
+ const contains2 = popper2.$_containsGlobalTarget = isContainingEventTarget(popper2, event);
2108
+ popper2.$_pendingHide = false;
2109
+ requestAnimationFrame(() => {
2110
+ popper2.$_pendingHide = false;
2111
+ if (preventClose[popper2.randomId])
2112
+ return;
2113
+ if (shouldAutoHide(popper2, contains2, event)) {
2114
+ popper2.$_handleGlobalClose(event, touch);
2115
+ if (!event.closeAllPopover && event.closePopover && contains2) {
2116
+ let parent2 = popper2.parentPopper;
2117
+ while (parent2) {
2118
+ preventClose[parent2.randomId] = true;
2119
+ parent2 = parent2.parentPopper;
2120
+ }
2121
+ return;
2122
+ }
2123
+ let parent = popper2.parentPopper;
2124
+ while (parent) {
2125
+ if (shouldAutoHide(parent, parent.$_containsGlobalTarget, event)) {
2126
+ parent.$_handleGlobalClose(event, touch);
2127
+ } else {
2128
+ break;
2129
+ }
2130
+ parent = parent.parentPopper;
2131
+ }
2132
+ }
2133
+ });
2134
+ } catch (e) {
2135
+ }
2136
+ }
2137
+ }
2138
+ function isContainingEventTarget(popper2, event) {
2139
+ const popperContent = popper2.popperNode();
2140
+ return popper2.$_mouseDownContains || popperContent.contains(event.target);
2141
+ }
2142
+ function shouldAutoHide(popper2, contains2, event) {
2143
+ return event.closeAllPopover || event.closePopover && contains2 || getAutoHideResult(popper2, event) && !contains2;
2144
+ }
2145
+ function getAutoHideResult(popper2, event) {
2146
+ if (typeof popper2.autoHide === "function") {
2147
+ const result = popper2.autoHide(event);
2148
+ popper2.lastAutoHide = result;
2149
+ return result;
2150
+ }
2151
+ return popper2.autoHide;
2152
+ }
2153
+ function computePositionAllShownPoppers(event) {
2154
+ for (let i = 0; i < shownPoppers.length; i++) {
2155
+ const popper2 = shownPoppers[i];
2156
+ popper2.$_computePosition(event);
2157
+ }
2158
+ }
2159
+ let mousePreviousX = 0;
2160
+ let mousePreviousY = 0;
2161
+ let mouseX = 0;
2162
+ let mouseY = 0;
2163
+ if (typeof window !== "undefined") {
2164
+ window.addEventListener("mousemove", (event) => {
2165
+ mousePreviousX = mouseX;
2166
+ mousePreviousY = mouseY;
2167
+ mouseX = event.clientX;
2168
+ mouseY = event.clientY;
2169
+ }, supportsPassive ? {
2170
+ passive: true
2171
+ } : void 0);
2172
+ }
2173
+ function lineIntersectsLine(x1, y1, x2, y2, x3, y3, x4, y4) {
2174
+ const uA = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
2175
+ const uB = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
2176
+ return uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1;
2177
+ }
2178
+ function getInternetExplorerVersion() {
2179
+ var ua = window.navigator.userAgent;
2180
+ var msie = ua.indexOf("MSIE ");
2181
+ if (msie > 0) {
2182
+ return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)), 10);
2183
+ }
2184
+ var trident = ua.indexOf("Trident/");
2185
+ if (trident > 0) {
2186
+ var rv = ua.indexOf("rv:");
2187
+ return parseInt(ua.substring(rv + 3, ua.indexOf(".", rv)), 10);
2188
+ }
2189
+ var edge = ua.indexOf("Edge/");
2190
+ if (edge > 0) {
2191
+ return parseInt(ua.substring(edge + 5, ua.indexOf(".", edge)), 10);
2192
+ }
2193
+ return -1;
2194
+ }
2195
+ let isIE;
2196
+ function initCompat() {
2197
+ if (!initCompat.init) {
2198
+ initCompat.init = true;
2199
+ isIE = getInternetExplorerVersion() !== -1;
2200
+ }
2201
+ }
2202
+ var script = {
2203
+ name: "ResizeObserver",
2204
+ props: {
2205
+ emitOnMount: {
2206
+ type: Boolean,
2207
+ default: false
2208
+ },
2209
+ ignoreWidth: {
2210
+ type: Boolean,
2211
+ default: false
2212
+ },
2213
+ ignoreHeight: {
2214
+ type: Boolean,
2215
+ default: false
2216
+ }
2217
+ },
2218
+ emits: [
2219
+ "notify"
2220
+ ],
2221
+ mounted() {
2222
+ initCompat();
2223
+ nextTick$1(() => {
2224
+ this._w = this.$el.offsetWidth;
2225
+ this._h = this.$el.offsetHeight;
2226
+ if (this.emitOnMount) {
2227
+ this.emitSize();
2228
+ }
2229
+ });
2230
+ const object = document.createElement("object");
2231
+ this._resizeObject = object;
2232
+ object.setAttribute("aria-hidden", "true");
2233
+ object.setAttribute("tabindex", -1);
2234
+ object.onload = this.addResizeHandlers;
2235
+ object.type = "text/html";
2236
+ if (isIE) {
2237
+ this.$el.appendChild(object);
2238
+ }
2239
+ object.data = "about:blank";
2240
+ if (!isIE) {
2241
+ this.$el.appendChild(object);
2242
+ }
2243
+ },
2244
+ beforeUnmount() {
2245
+ this.removeResizeHandlers();
2246
+ },
2247
+ methods: {
2248
+ compareAndNotify() {
2249
+ if (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) {
2250
+ this._w = this.$el.offsetWidth;
2251
+ this._h = this.$el.offsetHeight;
2252
+ this.emitSize();
2253
+ }
2254
+ },
2255
+ emitSize() {
2256
+ this.$emit("notify", {
2257
+ width: this._w,
2258
+ height: this._h
2259
+ });
2260
+ },
2261
+ addResizeHandlers() {
2262
+ this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify);
2263
+ this.compareAndNotify();
2264
+ },
2265
+ removeResizeHandlers() {
2266
+ if (this._resizeObject && this._resizeObject.onload) {
2267
+ if (!isIE && this._resizeObject.contentDocument) {
2268
+ this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify);
2269
+ }
2270
+ this.$el.removeChild(this._resizeObject);
2271
+ this._resizeObject.onload = null;
2272
+ this._resizeObject = null;
2273
+ }
2274
+ }
2275
+ }
2276
+ };
2277
+ const _withId = /* @__PURE__ */ withScopeId("data-v-b329ee4c");
2278
+ pushScopeId("data-v-b329ee4c");
2279
+ const _hoisted_1$2$1 = {
2280
+ class: "resize-observer",
2281
+ tabindex: "-1"
2282
+ };
2283
+ popScopeId();
2284
+ const render$3 = /* @__PURE__ */ _withId((_ctx, _cache, $props, $setup, $data, $options) => {
2285
+ return openBlock(), createBlock("div", _hoisted_1$2$1);
2286
+ });
2287
+ script.render = render$3;
2288
+ script.__scopeId = "data-v-b329ee4c";
2289
+ script.__file = "src/components/ResizeObserver.vue";
2290
+ var PrivateThemeClass = (prop = "theme") => ({
2291
+ computed: {
2292
+ themeClass() {
2293
+ return getThemeClasses(this[prop]);
2294
+ }
2295
+ }
2296
+ });
2297
+ var _export_sfc$1 = (sfc, props) => {
2298
+ const target = sfc.__vccOpts || sfc;
2299
+ for (const [key, val] of props) {
2300
+ target[key] = val;
2301
+ }
2302
+ return target;
2303
+ };
2304
+ const _sfc_main$5$1 = defineComponent({
2305
+ name: "VPopperContent",
2306
+ components: {
2307
+ ResizeObserver: script
2308
+ },
2309
+ mixins: [
2310
+ PrivateThemeClass()
2311
+ ],
2312
+ props: {
2313
+ popperId: String,
2314
+ theme: String,
2315
+ shown: Boolean,
2316
+ mounted: Boolean,
2317
+ skipTransition: Boolean,
2318
+ autoHide: Boolean,
2319
+ handleResize: Boolean,
2320
+ classes: Object,
2321
+ result: Object
2322
+ },
2323
+ emits: [
2324
+ "hide",
2325
+ "resize"
2326
+ ],
2327
+ methods: {
2328
+ toPx(value) {
2329
+ if (value != null && !isNaN(value)) {
2330
+ return `${value}px`;
2331
+ }
2332
+ return null;
2333
+ }
2334
+ }
2335
+ });
2336
+ const _hoisted_1$1$1 = ["id", "aria-hidden", "tabindex", "data-popper-placement"];
2337
+ const _hoisted_2$1$1 = {
2338
+ ref: "inner",
2339
+ class: "v-popper__inner"
2340
+ };
2341
+ const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-outer" }, null, -1);
2342
+ const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-inner" }, null, -1);
2343
+ const _hoisted_5$2 = [
2344
+ _hoisted_3$7,
2345
+ _hoisted_4$5
2346
+ ];
2347
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2348
+ const _component_ResizeObserver = resolveComponent("ResizeObserver");
2349
+ return openBlock(), createElementBlock("div", {
2350
+ id: _ctx.popperId,
2351
+ ref: "popover",
2352
+ class: normalizeClass(["v-popper__popper", [
2353
+ _ctx.themeClass,
2354
+ _ctx.classes.popperClass,
2355
+ {
2356
+ "v-popper__popper--shown": _ctx.shown,
2357
+ "v-popper__popper--hidden": !_ctx.shown,
2358
+ "v-popper__popper--show-from": _ctx.classes.showFrom,
2359
+ "v-popper__popper--show-to": _ctx.classes.showTo,
2360
+ "v-popper__popper--hide-from": _ctx.classes.hideFrom,
2361
+ "v-popper__popper--hide-to": _ctx.classes.hideTo,
2362
+ "v-popper__popper--skip-transition": _ctx.skipTransition,
2363
+ "v-popper__popper--arrow-overflow": _ctx.result && _ctx.result.arrow.overflow,
2364
+ "v-popper__popper--no-positioning": !_ctx.result
2365
+ }
2366
+ ]]),
2367
+ style: normalizeStyle(_ctx.result ? {
2368
+ position: _ctx.result.strategy,
2369
+ transform: `translate3d(${Math.round(_ctx.result.x)}px,${Math.round(_ctx.result.y)}px,0)`
2370
+ } : void 0),
2371
+ "aria-hidden": _ctx.shown ? "false" : "true",
2372
+ tabindex: _ctx.autoHide ? 0 : void 0,
2373
+ "data-popper-placement": _ctx.result ? _ctx.result.placement : void 0,
2374
+ onKeyup: _cache[2] || (_cache[2] = withKeys(($event) => _ctx.autoHide && _ctx.$emit("hide"), ["esc"]))
2375
+ }, [
2376
+ createElementVNode("div", {
2377
+ class: "v-popper__backdrop",
2378
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.autoHide && _ctx.$emit("hide"))
2379
+ }),
2380
+ createElementVNode("div", {
2381
+ class: "v-popper__wrapper",
2382
+ style: normalizeStyle(_ctx.result ? {
2383
+ transformOrigin: _ctx.result.transformOrigin
2384
+ } : void 0)
2385
+ }, [
2386
+ createElementVNode("div", _hoisted_2$1$1, [
2387
+ _ctx.mounted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2388
+ createElementVNode("div", null, [
2389
+ renderSlot(_ctx.$slots, "default")
2390
+ ]),
2391
+ _ctx.handleResize ? (openBlock(), createBlock(_component_ResizeObserver, {
2392
+ key: 0,
2393
+ onNotify: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("resize", $event))
2394
+ })) : createCommentVNode("", true)
2395
+ ], 64)) : createCommentVNode("", true)
2396
+ ], 512),
2397
+ createElementVNode("div", {
2398
+ ref: "arrow",
2399
+ class: "v-popper__arrow-container",
2400
+ style: normalizeStyle(_ctx.result ? {
2401
+ left: _ctx.toPx(_ctx.result.arrow.x),
2402
+ top: _ctx.toPx(_ctx.result.arrow.y)
2403
+ } : void 0)
2404
+ }, _hoisted_5$2, 4)
2405
+ ], 4)
2406
+ ], 46, _hoisted_1$1$1);
2407
+ }
2408
+ var PrivatePopperContent = /* @__PURE__ */ _export_sfc$1(_sfc_main$5$1, [["render", _sfc_render$2]]);
2409
+ var PrivatePopperMethods = {
2410
+ methods: {
2411
+ show(...args) {
2412
+ return this.$refs.popper.show(...args);
2413
+ },
2414
+ hide(...args) {
2415
+ return this.$refs.popper.hide(...args);
2416
+ },
2417
+ dispose(...args) {
2418
+ return this.$refs.popper.dispose(...args);
2419
+ },
2420
+ onResize(...args) {
2421
+ return this.$refs.popper.onResize(...args);
2422
+ }
2423
+ }
2424
+ };
2425
+ const _sfc_main$4$1 = defineComponent({
2426
+ name: "VPopperWrapper",
2427
+ components: {
2428
+ Popper: PrivatePopper(),
2429
+ PopperContent: PrivatePopperContent
2430
+ },
2431
+ mixins: [
2432
+ PrivatePopperMethods,
2433
+ PrivateThemeClass("finalTheme")
2434
+ ],
2435
+ inheritAttrs: false,
2436
+ props: {
2437
+ theme: {
2438
+ type: String,
2439
+ default: null
2440
+ }
2441
+ },
2442
+ computed: {
2443
+ finalTheme() {
2444
+ var _a;
2445
+ return (_a = this.theme) != null ? _a : this.$options.vPopperTheme;
2446
+ },
2447
+ popperAttrs() {
2448
+ const result = __spreadValues2({}, this.$attrs);
2449
+ delete result.class;
2450
+ delete result.style;
2451
+ return result;
2452
+ }
2453
+ },
2454
+ methods: {
2455
+ getTargetNodes() {
2456
+ return Array.from(this.$refs.reference.children).filter((node) => node !== this.$refs.popperContent.$el);
2457
+ }
2458
+ }
2459
+ });
2460
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
2461
+ const _component_PopperContent = resolveComponent("PopperContent");
2462
+ const _component_Popper = resolveComponent("Popper");
2463
+ return openBlock(), createBlock(_component_Popper, mergeProps({ ref: "popper" }, _ctx.popperAttrs, {
2464
+ theme: _ctx.finalTheme,
2465
+ "target-nodes": _ctx.getTargetNodes,
2466
+ "reference-node": () => _ctx.$refs.reference,
2467
+ "popper-node": () => _ctx.$refs.popperContent.$el
2468
+ }), {
2469
+ default: withCtx(({
2470
+ popperId,
2471
+ isShown,
2472
+ shouldMountContent,
2473
+ skipTransition,
2474
+ autoHide,
2475
+ show,
2476
+ hide: hide2,
2477
+ handleResize,
2478
+ onResize,
2479
+ classes,
2480
+ result,
2481
+ attrs
2482
+ }) => [
2483
+ createElementVNode("div", mergeProps({
2484
+ ref: "reference",
2485
+ class: "v-popper"
2486
+ }, attrs, {
2487
+ class: [
2488
+ _ctx.$attrs.class,
2489
+ _ctx.themeClass,
2490
+ {
2491
+ "v-popper--shown": isShown
2492
+ }
2493
+ ],
2494
+ style: _ctx.$attrs.style
2495
+ }), [
2496
+ renderSlot(_ctx.$slots, "default", {
2497
+ shown: isShown,
2498
+ show,
2499
+ hide: hide2
2500
+ }),
2501
+ createVNode(_component_PopperContent, {
2502
+ ref: "popperContent",
2503
+ "popper-id": popperId,
2504
+ theme: _ctx.finalTheme,
2505
+ shown: isShown,
2506
+ mounted: shouldMountContent,
2507
+ "skip-transition": skipTransition,
2508
+ "auto-hide": autoHide,
2509
+ "handle-resize": handleResize,
2510
+ classes,
2511
+ result,
2512
+ onHide: hide2,
2513
+ onResize
2514
+ }, {
2515
+ default: withCtx(() => [
2516
+ renderSlot(_ctx.$slots, "popper", {
2517
+ shown: isShown,
2518
+ hide: hide2
2519
+ })
2520
+ ]),
2521
+ _: 2
2522
+ }, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
2523
+ ], 16)
2524
+ ]),
2525
+ _: 3
2526
+ }, 16, ["theme", "target-nodes", "reference-node", "popper-node"]);
2527
+ }
2528
+ var PrivatePopperWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$1, [["render", _sfc_render$1]]);
2529
+ const _sfc_main$3$1 = defineComponent(__spreadProps2(__spreadValues2({}, PrivatePopperWrapper), {
2530
+ name: "VDropdown",
2531
+ vPopperTheme: "dropdown"
2532
+ }));
2533
+ const _sfc_main$2$1 = defineComponent(__spreadProps2(__spreadValues2({}, PrivatePopperWrapper), {
2534
+ name: "VMenu",
2535
+ vPopperTheme: "menu"
2536
+ }));
2537
+ const _sfc_main$1$1 = defineComponent(__spreadProps2(__spreadValues2({}, PrivatePopperWrapper), {
2538
+ name: "VTooltip",
2539
+ vPopperTheme: "tooltip"
2540
+ }));
2541
+ const _sfc_main$q = defineComponent({
2542
+ name: "VTooltipDirective",
2543
+ components: {
2544
+ Popper: PrivatePopper(),
2545
+ PopperContent: PrivatePopperContent
2546
+ },
2547
+ mixins: [
2548
+ PrivatePopperMethods
2549
+ ],
2550
+ inheritAttrs: false,
2551
+ props: {
2552
+ theme: {
2553
+ type: String,
2554
+ default: "tooltip"
2555
+ },
2556
+ html: {
2557
+ type: Boolean,
2558
+ default: (props) => getDefaultConfig(props.theme, "html")
2559
+ },
2560
+ content: {
2561
+ type: [String, Number, Function],
2562
+ default: null
2563
+ },
2564
+ loadingContent: {
2565
+ type: String,
2566
+ default: (props) => getDefaultConfig(props.theme, "loadingContent")
2567
+ }
2568
+ },
2569
+ data() {
2570
+ return {
2571
+ asyncContent: null
2572
+ };
2573
+ },
2574
+ computed: {
2575
+ isContentAsync() {
2576
+ return typeof this.content === "function";
2577
+ },
2578
+ loading() {
2579
+ return this.isContentAsync && this.asyncContent == null;
2580
+ },
2581
+ finalContent() {
2582
+ if (this.isContentAsync) {
2583
+ return this.loading ? this.loadingContent : this.asyncContent;
2584
+ }
2585
+ return this.content;
2586
+ }
2587
+ },
2588
+ watch: {
2589
+ content: {
2590
+ handler() {
2591
+ this.fetchContent(true);
2592
+ },
2593
+ immediate: true
2594
+ },
2595
+ async finalContent() {
2596
+ await this.$nextTick();
2597
+ this.$refs.popper.onResize();
2598
+ }
2599
+ },
2600
+ created() {
2601
+ this.$_fetchId = 0;
2602
+ },
2603
+ methods: {
2604
+ fetchContent(force) {
2605
+ if (typeof this.content === "function" && this.$_isShown && (force || !this.$_loading && this.asyncContent == null)) {
2606
+ this.asyncContent = null;
2607
+ this.$_loading = true;
2608
+ const fetchId = ++this.$_fetchId;
2609
+ const result = this.content(this);
2610
+ if (result.then) {
2611
+ result.then((res) => this.onResult(fetchId, res));
2612
+ } else {
2613
+ this.onResult(fetchId, result);
2614
+ }
2615
+ }
2616
+ },
2617
+ onResult(fetchId, result) {
2618
+ if (fetchId !== this.$_fetchId)
2619
+ return;
2620
+ this.$_loading = false;
2621
+ this.asyncContent = result;
2622
+ },
2623
+ onShow() {
2624
+ this.$_isShown = true;
2625
+ this.fetchContent();
2626
+ },
2627
+ onHide() {
2628
+ this.$_isShown = false;
2629
+ }
2630
+ }
2631
+ });
2632
+ const _hoisted_1$l = ["innerHTML"];
2633
+ const _hoisted_2$a = ["textContent"];
2634
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2635
+ const _component_PopperContent = resolveComponent("PopperContent");
2636
+ const _component_Popper = resolveComponent("Popper");
2637
+ return openBlock(), createBlock(_component_Popper, mergeProps({ ref: "popper" }, _ctx.$attrs, {
2638
+ theme: _ctx.theme,
2639
+ "popper-node": () => _ctx.$refs.popperContent.$el,
2640
+ onApplyShow: _ctx.onShow,
2641
+ onApplyHide: _ctx.onHide
2642
+ }), {
2643
+ default: withCtx(({
2644
+ popperId,
2645
+ isShown,
2646
+ shouldMountContent,
2647
+ skipTransition,
2648
+ autoHide,
2649
+ hide: hide2,
2650
+ handleResize,
2651
+ onResize,
2652
+ classes,
2653
+ result
2654
+ }) => [
2655
+ createVNode(_component_PopperContent, {
2656
+ ref: "popperContent",
2657
+ class: normalizeClass({
2658
+ "v-popper--tooltip-loading": _ctx.loading
2659
+ }),
2660
+ "popper-id": popperId,
2661
+ theme: _ctx.theme,
2662
+ shown: isShown,
2663
+ mounted: shouldMountContent,
2664
+ "skip-transition": skipTransition,
2665
+ "auto-hide": autoHide,
2666
+ "handle-resize": handleResize,
2667
+ classes,
2668
+ result,
2669
+ onHide: hide2,
2670
+ onResize
2671
+ }, {
2672
+ default: withCtx(() => [
2673
+ _ctx.html ? (openBlock(), createElementBlock("div", {
2674
+ key: 0,
2675
+ innerHTML: _ctx.finalContent
2676
+ }, null, 8, _hoisted_1$l)) : (openBlock(), createElementBlock("div", {
2677
+ key: 1,
2678
+ textContent: toDisplayString(_ctx.finalContent)
2679
+ }, null, 8, _hoisted_2$a))
2680
+ ]),
2681
+ _: 2
2682
+ }, 1032, ["class", "popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
2683
+ ]),
2684
+ _: 1
2685
+ }, 16, ["theme", "popper-node", "onApplyShow", "onApplyHide"]);
2686
+ }
2687
+ var PrivateTooltipDirective = /* @__PURE__ */ _export_sfc$1(_sfc_main$q, [["render", _sfc_render]]);
2688
+ const TARGET_CLASS = "v-popper--has-tooltip";
2689
+ function getPlacement(options2, modifiers) {
2690
+ let result = options2.placement;
2691
+ if (!result && modifiers) {
2692
+ for (const pos of placements$1) {
2693
+ if (modifiers[pos]) {
2694
+ result = pos;
2695
+ }
2696
+ }
2697
+ }
2698
+ if (!result) {
2699
+ result = getDefaultConfig(options2.theme || "tooltip", "placement");
2700
+ }
2701
+ return result;
2702
+ }
2703
+ function getOptions(el, value, modifiers) {
2704
+ let options2;
2705
+ const type = typeof value;
2706
+ if (type === "string") {
2707
+ options2 = { content: value };
2708
+ } else if (value && type === "object") {
2709
+ options2 = value;
2710
+ } else {
2711
+ options2 = { content: false };
2712
+ }
2713
+ options2.placement = getPlacement(options2, modifiers);
2714
+ options2.targetNodes = () => [el];
2715
+ options2.referenceNode = () => el;
2716
+ return options2;
2717
+ }
2718
+ let directiveApp;
2719
+ let directives;
2720
+ let uid = 0;
2721
+ function ensureDirectiveApp() {
2722
+ if (directiveApp)
2723
+ return;
2724
+ directives = ref([]);
2725
+ directiveApp = createApp({
2726
+ name: "VTooltipDirectiveApp",
2727
+ setup() {
2728
+ return {
2729
+ directives
2730
+ };
2731
+ },
2732
+ render() {
2733
+ return this.directives.map((directive) => {
2734
+ return h(PrivateTooltipDirective, __spreadProps2(__spreadValues2({}, directive.options), {
2735
+ shown: directive.shown || directive.options.shown,
2736
+ key: directive.id
2737
+ }));
2738
+ });
2739
+ },
2740
+ devtools: {
2741
+ hide: true
2742
+ }
2743
+ });
2744
+ const mountTarget = document.createElement("div");
2745
+ document.body.appendChild(mountTarget);
2746
+ directiveApp.mount(mountTarget);
2747
+ }
2748
+ function createTooltip(el, value, modifiers) {
2749
+ ensureDirectiveApp();
2750
+ const options2 = ref(getOptions(el, value, modifiers));
2751
+ const shown = ref(false);
2752
+ const item = {
2753
+ id: uid++,
2754
+ options: options2,
2755
+ shown
2756
+ };
2757
+ directives.value.push(item);
2758
+ if (el.classList) {
2759
+ el.classList.add(TARGET_CLASS);
2760
+ }
2761
+ const result = el.$_popper = {
2762
+ options: options2,
2763
+ item,
2764
+ show() {
2765
+ shown.value = true;
2766
+ },
2767
+ hide() {
2768
+ shown.value = false;
2769
+ }
2770
+ };
2771
+ return result;
2772
+ }
2773
+ function destroyTooltip(el) {
2774
+ if (el.$_popper) {
2775
+ const index = directives.value.indexOf(el.$_popper.item);
2776
+ if (index !== -1)
2777
+ directives.value.splice(index, 1);
2778
+ delete el.$_popper;
2779
+ delete el.$_popperOldShown;
2780
+ delete el.$_popperMountTarget;
2781
+ }
2782
+ if (el.classList) {
2783
+ el.classList.remove(TARGET_CLASS);
2784
+ }
2785
+ }
2786
+ function bind(el, { value, modifiers }) {
2787
+ const options2 = getOptions(el, value, modifiers);
2788
+ if (!options2.content || getDefaultConfig(options2.theme || "tooltip", "disabled")) {
2789
+ destroyTooltip(el);
2790
+ } else {
2791
+ let directive;
2792
+ if (el.$_popper) {
2793
+ directive = el.$_popper;
2794
+ directive.options.value = options2;
2795
+ } else {
2796
+ directive = createTooltip(el, value, modifiers);
2797
+ }
2798
+ if (typeof value.shown !== "undefined" && value.shown !== el.$_popperOldShown) {
2799
+ el.$_popperOldShown = value.shown;
2800
+ value.shown ? directive.show() : directive.hide();
2801
+ }
2802
+ }
2803
+ }
2804
+ var PrivateVTooltip = {
2805
+ beforeMount: bind,
2806
+ updated: bind,
2807
+ beforeUnmount(el) {
2808
+ destroyTooltip(el);
2809
+ }
2810
+ };
2811
+ function addListeners(el) {
2812
+ el.addEventListener("click", onClick);
2813
+ el.addEventListener("touchstart", onTouchStart, supportsPassive ? {
2814
+ passive: true
2815
+ } : false);
2816
+ }
2817
+ function removeListeners(el) {
2818
+ el.removeEventListener("click", onClick);
2819
+ el.removeEventListener("touchstart", onTouchStart);
2820
+ el.removeEventListener("touchend", onTouchEnd);
2821
+ el.removeEventListener("touchcancel", onTouchCancel);
2822
+ }
2823
+ function onClick(event) {
2824
+ const el = event.currentTarget;
2825
+ event.closePopover = !el.$_vclosepopover_touch;
2826
+ event.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;
2827
+ }
2828
+ function onTouchStart(event) {
2829
+ if (event.changedTouches.length === 1) {
2830
+ const el = event.currentTarget;
2831
+ el.$_vclosepopover_touch = true;
2832
+ const touch = event.changedTouches[0];
2833
+ el.$_vclosepopover_touchPoint = touch;
2834
+ el.addEventListener("touchend", onTouchEnd);
2835
+ el.addEventListener("touchcancel", onTouchCancel);
2836
+ }
2837
+ }
2838
+ function onTouchEnd(event) {
2839
+ const el = event.currentTarget;
2840
+ el.$_vclosepopover_touch = false;
2841
+ if (event.changedTouches.length === 1) {
2842
+ const touch = event.changedTouches[0];
2843
+ const firstTouch = el.$_vclosepopover_touchPoint;
2844
+ event.closePopover = Math.abs(touch.screenY - firstTouch.screenY) < 20 && Math.abs(touch.screenX - firstTouch.screenX) < 20;
2845
+ event.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;
2846
+ }
2847
+ }
2848
+ function onTouchCancel(event) {
2849
+ const el = event.currentTarget;
2850
+ el.$_vclosepopover_touch = false;
2851
+ }
2852
+ var PrivateVClosePopper = {
2853
+ beforeMount(el, { value, modifiers }) {
2854
+ el.$_closePopoverModifiers = modifiers;
2855
+ if (typeof value === "undefined" || value) {
2856
+ addListeners(el);
2857
+ }
2858
+ },
2859
+ updated(el, { value, oldValue, modifiers }) {
2860
+ el.$_closePopoverModifiers = modifiers;
2861
+ if (value !== oldValue) {
2862
+ if (typeof value === "undefined" || value) {
2863
+ addListeners(el);
2864
+ } else {
2865
+ removeListeners(el);
2866
+ }
2867
+ }
2868
+ },
2869
+ beforeUnmount(el) {
2870
+ removeListeners(el);
2871
+ }
2872
+ };
2873
+ function install$1(app, options2 = {}) {
2874
+ if (app.$_vTooltipInstalled)
2875
+ return;
2876
+ app.$_vTooltipInstalled = true;
2877
+ assign(config$2, options2);
2878
+ app.directive("tooltip", PrivateVTooltip);
2879
+ app.directive("close-popper", PrivateVClosePopper);
2880
+ app.component("v-tooltip", _sfc_main$1$1);
2881
+ app.component("VTooltip", _sfc_main$1$1);
2882
+ app.component("v-dropdown", _sfc_main$3$1);
2883
+ app.component("VDropdown", _sfc_main$3$1);
2884
+ app.component("v-menu", _sfc_main$2$1);
2885
+ app.component("VMenu", _sfc_main$2$1);
2886
+ }
2887
+ const plugin = {
2888
+ version: "2.0.0-beta.16",
2889
+ install: install$1,
2890
+ options: config$2
2891
+ };
21
2892
  var defaultCleekOptions = {
22
2893
  colors: {
23
2894
  primary: "#559933",
@@ -30,6 +2901,7 @@ var defaultCleekOptions = {
30
2901
  basePath: ""
31
2902
  }
32
2903
  };
2904
+ var style = "";
33
2905
  var ckDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
34
2906
  var _export_sfc = (sfc, props) => {
35
2907
  const target = sfc.__vccOpts || sfc;
@@ -471,9 +3343,9 @@ function insertCss(css2) {
471
3343
  if (!css2 || !IS_DOM) {
472
3344
  return;
473
3345
  }
474
- var style = DOCUMENT.createElement("style");
475
- style.setAttribute("type", "text/css");
476
- style.innerHTML = css2;
3346
+ var style2 = DOCUMENT.createElement("style");
3347
+ style2.setAttribute("type", "text/css");
3348
+ style2.innerHTML = css2;
477
3349
  var headChildren = DOCUMENT.head.childNodes;
478
3350
  var beforeChild = null;
479
3351
  for (var i = headChildren.length - 1; i > -1; i--) {
@@ -483,14 +3355,14 @@ function insertCss(css2) {
483
3355
  beforeChild = child;
484
3356
  }
485
3357
  }
486
- DOCUMENT.head.insertBefore(style, beforeChild);
3358
+ DOCUMENT.head.insertBefore(style2, beforeChild);
487
3359
  return css2;
488
3360
  }
489
3361
  var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
490
3362
  function nextUniqueId() {
491
- var size = 12;
3363
+ var size2 = 12;
492
3364
  var id = "";
493
- while (size-- > 0) {
3365
+ while (size2-- > 0) {
494
3366
  id += idPool[Math.random() * 62 | 0];
495
3367
  }
496
3368
  return id;
@@ -694,10 +3566,10 @@ function toHex(unicode) {
694
3566
  return decoded.length === 1 ? decoded[0].toString(16) : null;
695
3567
  }
696
3568
  function codePointAt(string, index) {
697
- var size = string.length;
3569
+ var size2 = string.length;
698
3570
  var first = string.charCodeAt(index);
699
3571
  var second;
700
- if (first >= 55296 && first <= 56319 && size > index + 1) {
3572
+ if (first >= 55296 && first <= 56319 && size2 > index + 1) {
701
3573
  second = string.charCodeAt(index + 1);
702
3574
  if (second >= 56320 && second <= 57343) {
703
3575
  return (first - 55296) * 1024 + second - 56320 + 65536;
@@ -754,8 +3626,8 @@ function getIconName(familyPrefix, cls) {
754
3626
  }
755
3627
  var build = function build2() {
756
3628
  var lookup = function lookup2(reducer) {
757
- return reduce(styles, function(o, style, prefix) {
758
- o[prefix] = reduce(style, reducer, {});
3629
+ return reduce(styles, function(o, style2, prefix) {
3630
+ o[prefix] = reduce(style2, reducer, {});
759
3631
  return o;
760
3632
  }, {});
761
3633
  };
@@ -863,8 +3735,8 @@ var emptyCanonicalIcon = function emptyCanonicalIcon2() {
863
3735
  };
864
3736
  };
865
3737
  function getCanonicalPrefix(styleOrPrefix) {
866
- var style = PREFIX_TO_STYLE[styleOrPrefix];
867
- var prefix = STYLE_TO_PREFIX[styleOrPrefix] || STYLE_TO_PREFIX[style];
3738
+ var style2 = PREFIX_TO_STYLE[styleOrPrefix];
3739
+ var prefix = STYLE_TO_PREFIX[styleOrPrefix] || STYLE_TO_PREFIX[style2];
868
3740
  var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
869
3741
  return prefix || defined || null;
870
3742
  }
@@ -970,8 +3842,8 @@ function registerPlugins(nextPlugins, _ref2) {
970
3842
  delete providers[k];
971
3843
  }
972
3844
  });
973
- _plugins.forEach(function(plugin) {
974
- var mixout8 = plugin.mixout ? plugin.mixout() : {};
3845
+ _plugins.forEach(function(plugin2) {
3846
+ var mixout8 = plugin2.mixout ? plugin2.mixout() : {};
975
3847
  Object.keys(mixout8).forEach(function(tk) {
976
3848
  if (typeof mixout8[tk] === "function") {
977
3849
  obj[tk] = mixout8[tk];
@@ -985,8 +3857,8 @@ function registerPlugins(nextPlugins, _ref2) {
985
3857
  });
986
3858
  }
987
3859
  });
988
- if (plugin.hooks) {
989
- var hooks8 = plugin.hooks();
3860
+ if (plugin2.hooks) {
3861
+ var hooks8 = plugin2.hooks();
990
3862
  Object.keys(hooks8).forEach(function(hook) {
991
3863
  if (!_hooks[hook]) {
992
3864
  _hooks[hook] = [];
@@ -994,8 +3866,8 @@ function registerPlugins(nextPlugins, _ref2) {
994
3866
  _hooks[hook].push(hooks8[hook]);
995
3867
  });
996
3868
  }
997
- if (plugin.provides) {
998
- plugin.provides(providers);
3869
+ if (plugin2.provides) {
3870
+ plugin2.provides(providers);
999
3871
  }
1000
3872
  });
1001
3873
  return obj;
@@ -1588,11 +4460,11 @@ function disconnect() {
1588
4460
  mo.disconnect();
1589
4461
  }
1590
4462
  function styleParser(node) {
1591
- var style = node.getAttribute("style");
4463
+ var style2 = node.getAttribute("style");
1592
4464
  var val = [];
1593
- if (style) {
1594
- val = style.split(";").reduce(function(acc, style2) {
1595
- var styles2 = style2.split(":");
4465
+ if (style2) {
4466
+ val = style2.split(";").reduce(function(acc, style3) {
4467
+ var styles2 = style3.split(":");
1596
4468
  var prop = styles2[0];
1597
4469
  var value = styles2.slice(1);
1598
4470
  if (prop && value.length > 0) {
@@ -16057,8 +18929,8 @@ var toConsumableArray = function(arr) {
16057
18929
  return Array.from(arr);
16058
18930
  }
16059
18931
  };
16060
- function styleToObject(style) {
16061
- return style.split(";").map(function(s) {
18932
+ function styleToObject(style2) {
18933
+ return style2.split(";").map(function(s) {
16062
18934
  return s.trim();
16063
18935
  }).filter(function(s) {
16064
18936
  return s;
@@ -16436,14 +19308,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
16436
19308
  }
16437
19309
  return list;
16438
19310
  });
16439
- function onClick(event) {
19311
+ function onClick2(event) {
16440
19312
  emits("click", event);
16441
19313
  }
16442
19314
  return (_ctx, _cache) => {
16443
19315
  return openBlock(), createElementBlock("div", {
16444
19316
  class: normalizeClass(["ck-icon", unref$1(computedClass)]),
16445
19317
  style: normalizeStyle(unref$1(computedStyle)),
16446
- onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
19318
+ onClick: _cache[0] || (_cache[0] = ($event) => onClick2($event))
16447
19319
  }, [
16448
19320
  unref$1(computediconPack) === "font-awesome" ? (openBlock(), createBlock(unref$1(FontAwesomeIcon), {
16449
19321
  key: 0,
@@ -16795,7 +19667,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16795
19667
  list.push({ width: props.width });
16796
19668
  return list;
16797
19669
  });
16798
- function onClick(event) {
19670
+ function onClick2(event) {
16799
19671
  emits("click", event);
16800
19672
  }
16801
19673
  onMounted(() => {
@@ -16810,7 +19682,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16810
19682
  "aria-label": __props.title,
16811
19683
  disabled: __props.disabled,
16812
19684
  style: normalizeStyle(unref$1(computedStyle)),
16813
- onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
19685
+ onClick: _cache[0] || (_cache[0] = ($event) => onClick2($event))
16814
19686
  }, [
16815
19687
  __props.icon ? (openBlock(), createBlock(ckIcon, {
16816
19688
  key: 0,
@@ -16907,7 +19779,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16907
19779
  return props.align;
16908
19780
  return "left";
16909
19781
  });
16910
- const onClick = (event) => {
19782
+ const onClick2 = (event) => {
16911
19783
  if (props.autoSelect)
16912
19784
  event.target.select();
16913
19785
  emits("click", event);
@@ -16992,7 +19864,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16992
19864
  disabled: __props.disabled,
16993
19865
  onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
16994
19866
  onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
16995
- onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
19867
+ onClick: _cache[3] || (_cache[3] = ($event) => onClick2($event))
16996
19868
  }, null, 42, _hoisted_1$e), [
16997
19869
  [vModelDynamic, unref$1(value)]
16998
19870
  ]),
@@ -18386,8 +21258,8 @@ const qmStr = {
18386
21258
  }
18387
21259
  return result;
18388
21260
  },
18389
- padZeros(num, size = 2) {
18390
- return `000000000${num}`.substr(-size);
21261
+ padZeros(num, size2 = 2) {
21262
+ return `000000000${num}`.substr(-size2);
18391
21263
  },
18392
21264
  removeDiacritics(str) {
18393
21265
  return str.normalize("NFD").replace(/([^n\u0300-\u036f]|n(?!\u0303(?![\u0300-\u036f])))[\u0300-\u036f]+/gi, "$1").normalize();
@@ -19127,7 +21999,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19127
21999
  return props.modelValue === null;
19128
22000
  }
19129
22001
  });
19130
- function onClick(event) {
22002
+ function onClick2(event) {
19131
22003
  emits("click", event);
19132
22004
  }
19133
22005
  function onChange2(event) {
@@ -19175,7 +22047,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19175
22047
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(value) ? value.value = $event : null),
19176
22048
  class: normalizeClass(unref$1(computedClassSelect)),
19177
22049
  disabled: __props.disabled,
19178
- onClick: _cache[2] || (_cache[2] = ($event) => onClick($event)),
22050
+ onClick: _cache[2] || (_cache[2] = ($event) => onClick2($event)),
19179
22051
  onChange: _cache[3] || (_cache[3] = ($event) => onChange2($event))
19180
22052
  }, [
19181
22053
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredOptions), (option) => {
@@ -19228,10 +22100,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
19228
22100
  list.push("is-squared");
19229
22101
  if (props.outlined)
19230
22102
  list.push("is-outlined");
19231
- let size = "s";
22103
+ let size2 = "s";
19232
22104
  if (props.size === "xs" || props.size === "m" || props.size === "l")
19233
- size = props.size;
19234
- list.push(`ck-switch--size-${size}`);
22105
+ size2 = props.size;
22106
+ list.push(`ck-switch--size-${size2}`);
19235
22107
  return list;
19236
22108
  });
19237
22109
  const computedAttributes = computed$2(() => {
@@ -19466,13 +22338,13 @@ function isShadowRoot(node) {
19466
22338
  function applyStyles(_ref2) {
19467
22339
  var state = _ref2.state;
19468
22340
  Object.keys(state.elements).forEach(function(name) {
19469
- var style = state.styles[name] || {};
22341
+ var style2 = state.styles[name] || {};
19470
22342
  var attributes = state.attributes[name] || {};
19471
22343
  var element = state.elements[name];
19472
22344
  if (!isHTMLElement(element) || !getNodeName(element)) {
19473
22345
  return;
19474
22346
  }
19475
- Object.assign(element.style, style);
22347
+ Object.assign(element.style, style2);
19476
22348
  Object.keys(attributes).forEach(function(name2) {
19477
22349
  var value = attributes[name2];
19478
22350
  if (value === false) {
@@ -19507,14 +22379,14 @@ function effect$2(_ref2) {
19507
22379
  var element = state.elements[name];
19508
22380
  var attributes = state.attributes[name] || {};
19509
22381
  var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
19510
- var style = styleProperties.reduce(function(style2, property) {
19511
- style2[property] = "";
19512
- return style2;
22382
+ var style2 = styleProperties.reduce(function(style3, property) {
22383
+ style3[property] = "";
22384
+ return style3;
19513
22385
  }, {});
19514
22386
  if (!isHTMLElement(element) || !getNodeName(element)) {
19515
22387
  return;
19516
22388
  }
19517
- Object.assign(element.style, style);
22389
+ Object.assign(element.style, style2);
19518
22390
  Object.keys(attributes).forEach(function(attribute) {
19519
22391
  element.removeAttribute(attribute);
19520
22392
  });
@@ -19618,8 +22490,8 @@ function getTrueOffsetParent(element) {
19618
22490
  }
19619
22491
  function getContainingBlock(element) {
19620
22492
  var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
19621
- var isIE = navigator.userAgent.indexOf("Trident") !== -1;
19622
- if (isIE && isHTMLElement(element)) {
22493
+ var isIE2 = navigator.userAgent.indexOf("Trident") !== -1;
22494
+ if (isIE2 && isHTMLElement(element)) {
19623
22495
  var elementCss = getComputedStyle$1(element);
19624
22496
  if (elementCss.position === "fixed") {
19625
22497
  return null;
@@ -19650,8 +22522,8 @@ function getOffsetParent(element) {
19650
22522
  function getMainAxisFromPlacement(placement) {
19651
22523
  return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
19652
22524
  }
19653
- function within(min$1, value, max$1) {
19654
- return max(min$1, min(value, max$1));
22525
+ function within(min$12, value, max$12) {
22526
+ return max(min$12, min(value, max$12));
19655
22527
  }
19656
22528
  function withinMaxClamp(min2, value, max2) {
19657
22529
  var v = within(min2, value, max2);
@@ -20132,14 +23004,14 @@ function computeAutoPlacement(state, options) {
20132
23004
  }
20133
23005
  var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
20134
23006
  var variation = getVariation(placement);
20135
- var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
23007
+ var placements$12 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
20136
23008
  return getVariation(placement2) === variation;
20137
23009
  }) : basePlacements;
20138
- var allowedPlacements = placements$1.filter(function(placement2) {
23010
+ var allowedPlacements = placements$12.filter(function(placement2) {
20139
23011
  return allowedAutoPlacements.indexOf(placement2) >= 0;
20140
23012
  });
20141
23013
  if (allowedPlacements.length === 0) {
20142
- allowedPlacements = placements$1;
23014
+ allowedPlacements = placements$12;
20143
23015
  }
20144
23016
  var overflows = allowedPlacements.reduce(function(acc, placement2) {
20145
23017
  acc[placement2] = detectOverflow(state, {
@@ -20407,8 +23279,8 @@ function preventOverflow(_ref2) {
20407
23279
  var altSide = mainAxis === "y" ? bottom : right;
20408
23280
  var len = mainAxis === "y" ? "height" : "width";
20409
23281
  var offset2 = popperOffsets2[mainAxis];
20410
- var min$1 = offset2 + overflow[mainSide];
20411
- var max$1 = offset2 - overflow[altSide];
23282
+ var min$12 = offset2 + overflow[mainSide];
23283
+ var max$12 = offset2 - overflow[altSide];
20412
23284
  var additive = tether ? -popperRect[len] / 2 : 0;
20413
23285
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
20414
23286
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
@@ -20428,7 +23300,7 @@ function preventOverflow(_ref2) {
20428
23300
  var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
20429
23301
  var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset;
20430
23302
  var tetherMax = offset2 + maxOffset - offsetModifierValue;
20431
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1);
23303
+ var preventedOffset = within(tether ? min(min$12, tetherMin) : min$12, offset2, tether ? max(max$12, tetherMax) : max$12);
20432
23304
  popperOffsets2[mainAxis] = preventedOffset;
20433
23305
  data[mainAxis] = preventedOffset - offset2;
20434
23306
  }
@@ -20973,8 +23845,8 @@ var setDefaultProps = function setDefaultProps2(partialProps) {
20973
23845
  };
20974
23846
  function getExtendedPassedProps(passedProps) {
20975
23847
  var plugins2 = passedProps.plugins || [];
20976
- var pluginProps2 = plugins2.reduce(function(acc, plugin) {
20977
- var name = plugin.name, defaultValue = plugin.defaultValue;
23848
+ var pluginProps2 = plugins2.reduce(function(acc, plugin2) {
23849
+ var name = plugin2.name, defaultValue = plugin2.defaultValue;
20978
23850
  if (name) {
20979
23851
  var _name;
20980
23852
  acc[name] = passedProps[name] !== void 0 ? passedProps[name] : (_name = defaultProps[name]) != null ? _name : defaultValue;
@@ -21176,11 +24048,11 @@ function createTippy(reference2, passedProps) {
21176
24048
  instance.popper = popper2;
21177
24049
  reference2._tippy = instance;
21178
24050
  popper2._tippy = instance;
21179
- var pluginsHooks = plugins2.map(function(plugin) {
21180
- return plugin.fn(instance);
24051
+ var pluginsHooks = plugins2.map(function(plugin2) {
24052
+ return plugin2.fn(instance);
21181
24053
  });
21182
24054
  var hasAriaExpanded = reference2.hasAttribute("aria-expanded");
21183
- addListeners();
24055
+ addListeners2();
21184
24056
  handleAriaExpandedAttribute();
21185
24057
  handleStyles();
21186
24058
  invokeHook("onCreate", [instance]);
@@ -21324,21 +24196,21 @@ function createTippy(reference2, passedProps) {
21324
24196
  function onTouchMove() {
21325
24197
  didTouchMove = true;
21326
24198
  }
21327
- function onTouchStart() {
24199
+ function onTouchStart2() {
21328
24200
  didTouchMove = false;
21329
24201
  }
21330
24202
  function addDocumentPress() {
21331
24203
  var doc = getDocument();
21332
24204
  doc.addEventListener("mousedown", onDocumentPress, true);
21333
24205
  doc.addEventListener("touchend", onDocumentPress, TOUCH_OPTIONS);
21334
- doc.addEventListener("touchstart", onTouchStart, TOUCH_OPTIONS);
24206
+ doc.addEventListener("touchstart", onTouchStart2, TOUCH_OPTIONS);
21335
24207
  doc.addEventListener("touchmove", onTouchMove, TOUCH_OPTIONS);
21336
24208
  }
21337
24209
  function removeDocumentPress() {
21338
24210
  var doc = getDocument();
21339
24211
  doc.removeEventListener("mousedown", onDocumentPress, true);
21340
24212
  doc.removeEventListener("touchend", onDocumentPress, TOUCH_OPTIONS);
21341
- doc.removeEventListener("touchstart", onTouchStart, TOUCH_OPTIONS);
24213
+ doc.removeEventListener("touchstart", onTouchStart2, TOUCH_OPTIONS);
21342
24214
  doc.removeEventListener("touchmove", onTouchMove, TOUCH_OPTIONS);
21343
24215
  }
21344
24216
  function onTransitionedOut(duration, callback) {
@@ -21381,7 +24253,7 @@ function createTippy(reference2, passedProps) {
21381
24253
  });
21382
24254
  });
21383
24255
  }
21384
- function addListeners() {
24256
+ function addListeners2() {
21385
24257
  if (getIsCustomTouchBehavior()) {
21386
24258
  on("touchstart", onTrigger2, {
21387
24259
  passive: true
@@ -21408,7 +24280,7 @@ function createTippy(reference2, passedProps) {
21408
24280
  }
21409
24281
  });
21410
24282
  }
21411
- function removeListeners() {
24283
+ function removeListeners2() {
21412
24284
  listeners.forEach(function(_ref2) {
21413
24285
  var node = _ref2.node, eventType = _ref2.eventType, handler = _ref2.handler, options = _ref2.options;
21414
24286
  node.removeEventListener(eventType, handler, options);
@@ -21646,13 +24518,13 @@ function createTippy(reference2, passedProps) {
21646
24518
  return;
21647
24519
  }
21648
24520
  invokeHook("onBeforeUpdate", [instance, partialProps]);
21649
- removeListeners();
24521
+ removeListeners2();
21650
24522
  var prevProps = instance.props;
21651
24523
  var nextProps = evaluateProps(reference2, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {
21652
24524
  ignoreAttributes: true
21653
24525
  }));
21654
24526
  instance.props = nextProps;
21655
- addListeners();
24527
+ addListeners2();
21656
24528
  if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
21657
24529
  cleanupInteractiveMouseListeners();
21658
24530
  debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
@@ -21808,7 +24680,7 @@ function createTippy(reference2, passedProps) {
21808
24680
  }
21809
24681
  instance.clearDelayTimeouts();
21810
24682
  instance.unmount();
21811
- removeListeners();
24683
+ removeListeners2();
21812
24684
  delete reference2._tippy;
21813
24685
  instance.state.isDestroyed = true;
21814
24686
  invokeHook("onDestroy", [instance]);
@@ -22067,6 +24939,7 @@ function getCleekOptions(userOptions) {
22067
24939
  }
22068
24940
  const install = function installCleek(app, options) {
22069
24941
  app.config.globalProperties.$cleekOptions = getCleekOptions(options);
24942
+ app.use(plugin);
22070
24943
  Object.entries(components).forEach(([componentName, component]) => {
22071
24944
  app.component(componentName, component);
22072
24945
  });