@editora/ui-core 0.1.19 → 0.1.20
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/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
- package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
- package/dist/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +39 -62
- package/dist/alert-dialog.cjs.js +19 -19
- package/dist/alert-dialog.esm.js +69 -87
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +4 -7
- package/dist/anchor.cjs.js +2 -2
- package/dist/anchor.esm.js +3 -3
- package/dist/animated-beam.cjs.js +83 -83
- package/dist/animated-beam.esm.js +250 -277
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +47 -61
- package/dist/animated-text.cjs.js +2 -2
- package/dist/animated-text.esm.js +13 -24
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +11 -13
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +4 -7
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +7 -13
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +4 -7
- package/dist/block-controls.cjs.js +2 -2
- package/dist/block-controls.esm.js +19 -35
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +8 -15
- package/dist/breadcrumb.cjs.js +2 -2
- package/dist/breadcrumb.esm.js +20 -37
- package/dist/button.cjs.js +1 -521
- package/dist/button.esm.js +2 -671
- package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
- package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +8 -9
- package/dist/card.cjs.js +4 -4
- package/dist/card.esm.js +13 -19
- package/dist/chart.cjs.js +64 -64
- package/dist/chart.esm.js +223 -254
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +2 -3
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +5 -9
- package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +4 -7
- package/dist/color-picker.cjs.js +9 -9
- package/dist/color-picker.esm.js +189 -252
- package/dist/combobox.cjs.js +13 -13
- package/dist/combobox.esm.js +93 -126
- package/dist/command-palette.cjs.js +3 -3
- package/dist/command-palette.esm.js +19 -30
- package/dist/command.cjs.js +4 -4
- package/dist/command.esm.js +41 -53
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-skeleton.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +1 -0
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/container.cjs.js +2 -2
- package/dist/container.esm.js +2 -3
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +157 -219
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +2 -3
- package/dist/data-table.cjs.js +4 -4
- package/dist/data-table.esm.js +299 -381
- package/dist/date-field.cjs.js +3 -3
- package/dist/date-field.esm.js +68 -80
- package/dist/date-picker.cjs.js +9 -9
- package/dist/date-picker.esm.js +69 -97
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +32 -56
- package/dist/date-range-time-picker.cjs.js +9 -9
- package/dist/date-range-time-picker.esm.js +111 -140
- package/dist/date-time-picker.cjs.js +4 -4
- package/dist/date-time-picker.esm.js +112 -144
- package/dist/date-time-utils-Dmost5Ee.js +1 -0
- package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +3 -5
- package/dist/dialog.cjs.js +12 -12
- package/dist/dialog.esm.js +44 -63
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +2 -3
- package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
- package/dist/dismissable-layer-DNfrKA20.js +1 -0
- package/dist/dismissable-layer.cjs.js +2 -2
- package/dist/dismissable-layer.esm.js +4 -6
- package/dist/dock.cjs.js +5 -5
- package/dist/dock.esm.js +134 -155
- package/dist/drawer.cjs.js +2 -2
- package/dist/drawer.esm.js +18 -35
- package/dist/dropdown.cjs.js +2 -2
- package/dist/dropdown.esm.js +119 -149
- package/dist/dropzone.cjs.js +1 -1
- package/dist/dropzone.esm.js +0 -1
- package/dist/empty-state.cjs.js +1 -1
- package/dist/empty-state.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +3 -5
- package/dist/field.cjs.js +5 -5
- package/dist/field.esm.js +27 -34
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +19 -24
- package/dist/file-upload.cjs.js +4 -4
- package/dist/file-upload.esm.js +69 -93
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +5 -9
- package/dist/floating-toolbar.cjs.js +4 -4
- package/dist/floating-toolbar.esm.js +60 -85
- package/dist/focus-scope-Bwug2gDv.js +1 -0
- package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
- package/dist/focus-scope.cjs.js +2 -2
- package/dist/focus-scope.esm.js +15 -20
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +26 -53
- package/dist/gantt.cjs.js +43 -43
- package/dist/gantt.esm.js +295 -322
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +5 -9
- package/dist/hover-card.cjs.js +4 -4
- package/dist/hover-card.esm.js +22 -28
- package/dist/icon-cloud.cjs.js +7 -7
- package/dist/icon-cloud.esm.js +48 -62
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +2 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +378 -390
- package/dist/inline-edit.cjs.js +11 -11
- package/dist/inline-edit.esm.js +32 -36
- package/dist/input.cjs.js +17 -17
- package/dist/input.esm.js +50 -63
- package/dist/label.cjs.js +2 -2
- package/dist/label.esm.js +8 -17
- package/dist/layout.cjs.js +2 -2
- package/dist/layout.esm.js +20 -26
- package/dist/listbox-B6QgECax.js +46 -0
- package/dist/listbox-DJamVeFj.mjs +200 -0
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +2 -4
- package/dist/marquee.cjs.js +5 -5
- package/dist/marquee.esm.js +33 -50
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +5 -9
- package/dist/menu.cjs.js +3 -3
- package/dist/menu.esm.js +106 -126
- package/dist/menubar.cjs.js +5 -5
- package/dist/menubar.esm.js +118 -164
- package/dist/meter.cjs.js +2 -2
- package/dist/meter.esm.js +4 -4
- package/dist/multi-select.cjs.js +4 -4
- package/dist/multi-select.esm.js +120 -140
- package/dist/navigation-menu.cjs.js +4 -4
- package/dist/navigation-menu.esm.js +44 -55
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +73 -98
- package/dist/number-ticker.cjs.js +3 -3
- package/dist/number-ticker.esm.js +22 -43
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +5 -9
- package/dist/orbiter.cjs.js +13 -13
- package/dist/orbiter.esm.js +79 -90
- package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
- package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
- package/dist/pagination.cjs.js +2 -2
- package/dist/pagination.esm.js +14 -18
- package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
- package/dist/panel-group-CaD0_KQf.js +36 -0
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +2 -5
- package/dist/panel.cjs.js +4 -4
- package/dist/panel.esm.js +8 -10
- package/dist/password-field.cjs.js +9 -9
- package/dist/password-field.esm.js +62 -82
- package/dist/pin-input.cjs.js +3 -3
- package/dist/pin-input.esm.js +33 -39
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +108 -131
- package/dist/plugin-panel.cjs.js +7 -7
- package/dist/plugin-panel.esm.js +13 -15
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +21 -31
- package/dist/portal-DgpQ3Jo1.js +1 -0
- package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
- package/dist/portal.cjs.js +2 -2
- package/dist/portal.esm.js +10 -19
- package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
- package/dist/positioner-D_fqyx_j.js +1 -0
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +11 -18
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +7 -13
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +5 -9
- package/dist/quick-actions.cjs.js +6 -6
- package/dist/quick-actions.esm.js +52 -62
- package/dist/radio-group.cjs.js +13 -13
- package/dist/radio-group.esm.js +39 -51
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +5 -9
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +12 -23
- package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +3 -5
- package/dist/runtime-CTaOSmBj.js +1 -0
- package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +6 -6
- package/dist/scroll-area.cjs.js +3 -3
- package/dist/scroll-area.esm.js +38 -46
- package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +7 -7
- package/dist/select.esm.js +67 -97
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +8 -15
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +18 -18
- package/dist/sidebar.esm.js +117 -139
- package/dist/skeleton.cjs.js +11 -11
- package/dist/skeleton.esm.js +27 -24
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +6 -11
- package/dist/slot.cjs.js +4 -4
- package/dist/slot.esm.js +16 -19
- package/dist/sortable.cjs.js +45 -45
- package/dist/sortable.esm.js +421 -524
- package/dist/spinning-text.cjs.js +12 -12
- package/dist/spinning-text.esm.js +80 -92
- package/dist/split-button.cjs.js +4 -4
- package/dist/split-button.esm.js +77 -62
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +8 -8
- package/dist/stepper.esm.js +32 -52
- package/dist/switch.cjs.js +7 -7
- package/dist/switch.esm.js +23 -31
- package/dist/table.cjs.js +2 -2
- package/dist/table.esm.js +46 -56
- package/dist/tabs.cjs.js +3 -3
- package/dist/tabs.esm.js +35 -55
- package/dist/tags-input.cjs.js +4 -4
- package/dist/tags-input.esm.js +45 -62
- package/dist/textarea.cjs.js +6 -6
- package/dist/textarea.esm.js +32 -41
- package/dist/time-field.cjs.js +4 -4
- package/dist/time-field.esm.js +70 -84
- package/dist/time-picker.cjs.js +22 -22
- package/dist/time-picker.esm.js +88 -110
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +3 -5
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +33 -47
- package/dist/toggle-group.cjs.js +6 -6
- package/dist/toggle-group.esm.js +85 -105
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +3 -5
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +13 -24
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +31 -42
- package/dist/transfer-list.cjs.js +19 -19
- package/dist/transfer-list.esm.js +98 -111
- package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
- package/dist/tree-Dx_kv_ih.js +39 -0
- package/dist/tree-item.cjs.js +2 -2
- package/dist/tree-item.esm.js +2 -3
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +2 -5
- package/dist/ui-button-Q0GNNWKC.mjs +665 -0
- package/dist/ui-button-rXQOS9QJ.js +521 -0
- package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
- package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +14 -14
- package/dist/wizard.esm.js +85 -105
- package/package.json +2 -2
- package/dist/date-time-utils-66480de4.js +0 -1
- package/dist/date-time-utils-a2c7af25.mjs +0 -307
- package/dist/dismissable-layer-193e3bed.js +0 -1
- package/dist/focus-scope-2b12b4e7.js +0 -1
- package/dist/listbox-308789a0.mjs +0 -210
- package/dist/listbox-ef2f708e.js +0 -46
- package/dist/panel-group-40254cdd.js +0 -36
- package/dist/portal-c69756c0.js +0 -1
- package/dist/positioner-33529bb8.js +0 -1
- package/dist/runtime-3f13807b.js +0 -1
- package/dist/tree-0a7a8d05.js +0 -39
- /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
- /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
- /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
- /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
- /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const T = [
|
|
2
2
|
"top",
|
|
3
3
|
"top-start",
|
|
4
4
|
"top-end",
|
|
@@ -12,59 +12,55 @@ const k = [
|
|
|
12
12
|
"left-start",
|
|
13
13
|
"left-end"
|
|
14
14
|
];
|
|
15
|
-
function
|
|
15
|
+
function z(e) {
|
|
16
16
|
return e instanceof HTMLElement;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function B(e) {
|
|
19
19
|
return !!e && typeof e.top == "number" && typeof e.left == "number";
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function $(e) {
|
|
22
22
|
return !!e && typeof e.getBoundingClientRect == "function";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function S(e) {
|
|
25
25
|
const t = e.x ?? 0, n = e.y ?? 0;
|
|
26
26
|
return typeof DOMRect.fromRect == "function" ? DOMRect.fromRect({ x: t, y: n, width: e.width, height: e.height }) : new DOMRect(t, n, e.width, e.height);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return e instanceof DOMRect ? e :
|
|
28
|
+
function w(e) {
|
|
29
|
+
return e instanceof DOMRect ? e : S({
|
|
30
30
|
x: e.x ?? e.left,
|
|
31
31
|
y: e.y ?? e.top,
|
|
32
32
|
width: e.width,
|
|
33
33
|
height: e.height
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function x(e) {
|
|
37
|
+
return z(e) ? e.getBoundingClientRect() : B(e) ? w(e) : w(e.getBoundingClientRect());
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
const n = (i = t == null ? void 0 : t.getClientRects) == null ? void 0 : i.call(t, e);
|
|
42
|
-
if (n)
|
|
43
|
-
return Array.from(n).map((o) => A(o)).filter((o) => o.width > 0 || o.height > 0);
|
|
44
|
-
const r = (S(e) || V(e)) && typeof e.getClientRects == "function" ? e.getClientRects() : null;
|
|
45
|
-
return r ? Array.from(r).map((o) => A(o)).filter((o) => o.width > 0 || o.height > 0) : [];
|
|
46
|
-
}
|
|
47
|
-
function q(e, t, n, r) {
|
|
48
|
-
if (!n)
|
|
49
|
-
return y(e);
|
|
50
|
-
const i = j(e, r);
|
|
51
|
-
if (i.length === 0)
|
|
52
|
-
return y(e);
|
|
53
|
-
const { side: o } = w(t);
|
|
54
|
-
return o === "bottom" || o === "right" ? i[i.length - 1] || y(e) : i[0] || y(e);
|
|
55
|
-
}
|
|
56
|
-
function W(e) {
|
|
57
|
-
return S(e) ? e : V(e) && e.contextElement instanceof HTMLElement ? e.contextElement : null;
|
|
58
|
-
}
|
|
59
|
-
function N(e, t, n) {
|
|
39
|
+
function V(e, t) {
|
|
40
|
+
const n = t?.getClientRects?.(e);
|
|
60
41
|
if (n)
|
|
61
|
-
return n;
|
|
62
|
-
const r =
|
|
42
|
+
return Array.from(n).map((i) => w(i)).filter((i) => i.width > 0 || i.height > 0);
|
|
43
|
+
const r = (z(e) || $(e)) && typeof e.getClientRects == "function" ? e.getClientRects() : null;
|
|
44
|
+
return r ? Array.from(r).map((i) => w(i)).filter((i) => i.width > 0 || i.height > 0) : [];
|
|
45
|
+
}
|
|
46
|
+
function k(e, t, n, r) {
|
|
47
|
+
if (!n) return x(e);
|
|
48
|
+
const i = V(e, r);
|
|
49
|
+
if (i.length === 0) return x(e);
|
|
50
|
+
const { side: o } = b(t);
|
|
51
|
+
return o === "bottom" || o === "right" ? i[i.length - 1] || x(e) : i[0] || x(e);
|
|
52
|
+
}
|
|
53
|
+
function C(e) {
|
|
54
|
+
return z(e) ? e : $(e) && e.contextElement instanceof HTMLElement ? e.contextElement : null;
|
|
55
|
+
}
|
|
56
|
+
function I(e, t, n) {
|
|
57
|
+
if (n) return n;
|
|
58
|
+
const r = C(e) || (t instanceof HTMLElement ? t : null);
|
|
63
59
|
return r && window.getComputedStyle(r).direction === "rtl" ? "rtl" : "ltr";
|
|
64
60
|
}
|
|
65
|
-
function
|
|
61
|
+
function se(e, t, n) {
|
|
66
62
|
return {
|
|
67
|
-
getBoundingClientRect: () =>
|
|
63
|
+
getBoundingClientRect: () => S({
|
|
68
64
|
x: e,
|
|
69
65
|
y: t,
|
|
70
66
|
width: 0,
|
|
@@ -73,8 +69,8 @@ function me(e, t, n) {
|
|
|
73
69
|
contextElement: n
|
|
74
70
|
};
|
|
75
71
|
}
|
|
76
|
-
function
|
|
77
|
-
const n =
|
|
72
|
+
function fe(e, t) {
|
|
73
|
+
const n = S({
|
|
78
74
|
x: e.x ?? e.left,
|
|
79
75
|
y: e.y ?? e.top,
|
|
80
76
|
width: e.width,
|
|
@@ -85,14 +81,14 @@ function he(e, t) {
|
|
|
85
81
|
contextElement: t
|
|
86
82
|
};
|
|
87
83
|
}
|
|
88
|
-
function
|
|
84
|
+
function ue(e, t) {
|
|
89
85
|
return {
|
|
90
|
-
getBoundingClientRect: () =>
|
|
86
|
+
getBoundingClientRect: () => w(e.getBoundingClientRect()),
|
|
91
87
|
getClientRects: () => e.getClientRects(),
|
|
92
88
|
contextElement: t
|
|
93
89
|
};
|
|
94
90
|
}
|
|
95
|
-
function
|
|
91
|
+
function j() {
|
|
96
92
|
const e = window.innerWidth || document.documentElement.clientWidth || 0, t = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
97
93
|
return {
|
|
98
94
|
top: 0,
|
|
@@ -103,7 +99,7 @@ function X() {
|
|
|
103
99
|
height: t
|
|
104
100
|
};
|
|
105
101
|
}
|
|
106
|
-
function
|
|
102
|
+
function H(e) {
|
|
107
103
|
return {
|
|
108
104
|
top: e.top,
|
|
109
105
|
left: e.left,
|
|
@@ -113,7 +109,7 @@ function F(e) {
|
|
|
113
109
|
height: e.height
|
|
114
110
|
};
|
|
115
111
|
}
|
|
116
|
-
function
|
|
112
|
+
function q(e, t) {
|
|
117
113
|
const n = Math.max(e.left, t.left), r = Math.max(e.top, t.top), i = Math.min(e.right, t.right), o = Math.min(e.bottom, t.bottom);
|
|
118
114
|
return {
|
|
119
115
|
top: r,
|
|
@@ -124,64 +120,63 @@ function Y(e, t) {
|
|
|
124
120
|
height: Math.max(0, o - r)
|
|
125
121
|
};
|
|
126
122
|
}
|
|
127
|
-
function
|
|
123
|
+
function N(e) {
|
|
128
124
|
const t = window.getComputedStyle(e), n = `${t.overflow}${t.overflowX}${t.overflowY}`;
|
|
129
125
|
return /(auto|scroll|overlay|hidden|clip)/.test(n);
|
|
130
126
|
}
|
|
131
|
-
function
|
|
127
|
+
function R(e) {
|
|
132
128
|
const t = [];
|
|
133
|
-
let n =
|
|
129
|
+
let n = e?.parentElement ?? null;
|
|
134
130
|
for (; n && n !== document.body && n !== document.documentElement; )
|
|
135
|
-
|
|
131
|
+
N(n) && t.push(n), n = n.parentElement;
|
|
136
132
|
return t.push(window), t;
|
|
137
133
|
}
|
|
138
|
-
function
|
|
139
|
-
let r = n instanceof HTMLElement ?
|
|
140
|
-
if (n instanceof HTMLElement)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return o && P(o).forEach((c) => {
|
|
134
|
+
function X(e, t, n) {
|
|
135
|
+
let r = n instanceof HTMLElement ? H(n.getBoundingClientRect()) : j();
|
|
136
|
+
if (n instanceof HTMLElement) return r;
|
|
137
|
+
const i = /* @__PURE__ */ new Set(), o = C(e);
|
|
138
|
+
return o && R(o).forEach((c) => {
|
|
144
139
|
c instanceof Element && i.add(c);
|
|
145
|
-
}), t instanceof HTMLElement &&
|
|
140
|
+
}), t instanceof HTMLElement && R(t).forEach((c) => {
|
|
146
141
|
c instanceof Element && i.add(c);
|
|
147
142
|
}), i.forEach((c) => {
|
|
148
|
-
r =
|
|
143
|
+
r = q(r, H(c.getBoundingClientRect()));
|
|
149
144
|
}), r;
|
|
150
145
|
}
|
|
151
|
-
function
|
|
146
|
+
function b(e) {
|
|
152
147
|
const [t, n] = e.split("-");
|
|
153
148
|
return {
|
|
154
149
|
side: t,
|
|
155
150
|
align: n || "center"
|
|
156
151
|
};
|
|
157
152
|
}
|
|
158
|
-
function
|
|
153
|
+
function Y(e) {
|
|
159
154
|
return e === "top" ? "bottom" : e === "bottom" ? "top" : e === "left" ? "right" : "left";
|
|
160
155
|
}
|
|
161
|
-
function
|
|
162
|
-
const { side: t, align: n } =
|
|
163
|
-
return `${
|
|
156
|
+
function _(e) {
|
|
157
|
+
const { side: t, align: n } = b(e);
|
|
158
|
+
return `${Y(t)}${n === "center" ? "" : `-${n}`}`;
|
|
164
159
|
}
|
|
165
|
-
function
|
|
166
|
-
const { side: c, align:
|
|
167
|
-
let
|
|
168
|
-
return c === "top" || c === "bottom" ? (
|
|
160
|
+
function O(e, t, n, r = 0, i = 0, o = !1) {
|
|
161
|
+
const { side: c, align: a } = b(n);
|
|
162
|
+
let l = 0, d = 0;
|
|
163
|
+
return c === "top" || c === "bottom" ? (a === "start" ? l = o ? e.right - t.width : e.left : a === "end" ? l = o ? e.left : e.right - t.width : l = e.left + (e.width - t.width) / 2, d = c === "top" ? e.top - t.height - r : e.bottom + r, l += i) : (a === "start" ? d = e.top : a === "end" ? d = e.bottom - t.height : d = e.top + (e.height - t.height) / 2, l = c === "left" ? e.left - t.width - r : e.right + r, d += i), { x: l, y: d };
|
|
169
164
|
}
|
|
170
|
-
function
|
|
165
|
+
function E(e, t, n) {
|
|
171
166
|
return Math.min(n, Math.max(t, e));
|
|
172
167
|
}
|
|
173
|
-
function
|
|
168
|
+
function P(e) {
|
|
174
169
|
return Math.max(0, e.top) + Math.max(0, e.right) + Math.max(0, e.bottom) + Math.max(0, e.left);
|
|
175
170
|
}
|
|
176
|
-
function
|
|
177
|
-
const { side: n } =
|
|
171
|
+
function L(e, t) {
|
|
172
|
+
const { side: n } = b(e);
|
|
178
173
|
return Math.max(0, t[n]);
|
|
179
174
|
}
|
|
180
|
-
function
|
|
181
|
-
const { side: n } =
|
|
175
|
+
function G(e, t) {
|
|
176
|
+
const { side: n } = b(e);
|
|
182
177
|
return n === "top" || n === "bottom" ? Math.max(0, t.left) + Math.max(0, t.right) : Math.max(0, t.top) + Math.max(0, t.bottom);
|
|
183
178
|
}
|
|
184
|
-
function
|
|
179
|
+
function p(e, t = {}) {
|
|
185
180
|
const n = t.padding ?? e.padding, r = t.elementContext === "reference" ? {
|
|
186
181
|
x: e.rects.reference.left,
|
|
187
182
|
y: e.rects.reference.top,
|
|
@@ -200,12 +195,12 @@ function R(e, t = {}) {
|
|
|
200
195
|
left: e.boundary.left + n - r.x
|
|
201
196
|
};
|
|
202
197
|
}
|
|
203
|
-
function
|
|
198
|
+
function U(e = 0) {
|
|
204
199
|
return {
|
|
205
200
|
name: "offset",
|
|
206
201
|
options: e,
|
|
207
202
|
fn(t) {
|
|
208
|
-
const n = typeof e == "number" ? { mainAxis: e, crossAxis: 0 } : { mainAxis: e.mainAxis ?? 0, crossAxis: e.crossAxis ?? 0 }, r =
|
|
203
|
+
const n = typeof e == "number" ? { mainAxis: e, crossAxis: 0 } : { mainAxis: e.mainAxis ?? 0, crossAxis: e.crossAxis ?? 0 }, r = O(
|
|
209
204
|
t.rects.reference,
|
|
210
205
|
t.rects.floating,
|
|
211
206
|
t.placement,
|
|
@@ -224,53 +219,50 @@ function Q(e = 0) {
|
|
|
224
219
|
}
|
|
225
220
|
};
|
|
226
221
|
}
|
|
227
|
-
function
|
|
222
|
+
function J(e = {}) {
|
|
228
223
|
return {
|
|
229
224
|
name: "flip",
|
|
230
225
|
options: e,
|
|
231
226
|
fn(t) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const f = t.getAnchorRect(d), s = t.getCoords(d, f), g = R({
|
|
227
|
+
const n = e.fallbackPlacements?.length ? e.fallbackPlacements : [_(t.initialPlacement)], i = [t.placement, ...n].map((l) => {
|
|
228
|
+
const d = t.getAnchorRect(l), s = t.getCoords(l, d), f = p({
|
|
235
229
|
...t,
|
|
236
230
|
x: s.x,
|
|
237
231
|
y: s.y,
|
|
238
|
-
rects: { ...t.rects, reference:
|
|
232
|
+
rects: { ...t.rects, reference: d }
|
|
239
233
|
}, { padding: e.padding ?? t.padding });
|
|
240
|
-
return { placement:
|
|
234
|
+
return { placement: l, overflow: f, coords: s, reference: d };
|
|
241
235
|
}), o = i[0];
|
|
242
|
-
if (!o ||
|
|
243
|
-
return { data: { overflows: i.map(({ placement:
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
-
x:
|
|
247
|
-
y:
|
|
248
|
-
placement:
|
|
249
|
-
data: { overflows: i.map(({ placement:
|
|
236
|
+
if (!o || L(t.placement, o.overflow) <= 0)
|
|
237
|
+
return { data: { overflows: i.map(({ placement: l, overflow: d }) => ({ placement: l, overflow: d })) } };
|
|
238
|
+
const a = i.find(({ placement: l, overflow: d }) => L(l, d) <= 0 && G(l, d) <= 0) || i.reduce((l, d) => P(d.overflow) < P(l.overflow) ? d : l, o);
|
|
239
|
+
return a.placement === t.placement ? { data: { overflows: i.map(({ placement: l, overflow: d }) => ({ placement: l, overflow: d })) } } : {
|
|
240
|
+
x: a.coords.x,
|
|
241
|
+
y: a.coords.y,
|
|
242
|
+
placement: a.placement,
|
|
243
|
+
data: { overflows: i.map(({ placement: l, overflow: d }) => ({ placement: l, overflow: d })) }
|
|
250
244
|
};
|
|
251
245
|
}
|
|
252
246
|
};
|
|
253
247
|
}
|
|
254
|
-
function
|
|
248
|
+
function K(e = {}) {
|
|
255
249
|
return {
|
|
256
250
|
name: "autoPlacement",
|
|
257
251
|
options: e,
|
|
258
252
|
fn(t) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
const l = t.getAnchorRect(c), a = t.getCoords(c, l), d = R({
|
|
253
|
+
const n = e.allowedPlacements?.length ? e.allowedPlacements : T, r = n.map((o) => {
|
|
254
|
+
const c = t.getAnchorRect(o), a = t.getCoords(o, c), l = p({
|
|
262
255
|
...t,
|
|
263
256
|
x: a.x,
|
|
264
257
|
y: a.y,
|
|
265
|
-
rects: { ...t.rects, reference:
|
|
258
|
+
rects: { ...t.rects, reference: c }
|
|
266
259
|
}, { padding: e.padding ?? t.padding });
|
|
267
|
-
return { placement:
|
|
268
|
-
}), i = r.reduce((
|
|
269
|
-
const a =
|
|
270
|
-
if (a !==
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return f > s ? l : c;
|
|
260
|
+
return { placement: o, overflow: l, coords: a, reference: c };
|
|
261
|
+
}), i = r.reduce((o, c) => {
|
|
262
|
+
const a = P(c.overflow), l = P(o.overflow);
|
|
263
|
+
if (a !== l) return a < l ? c : o;
|
|
264
|
+
const d = Math.max(0, t.boundary.right - c.coords.x) * Math.max(0, t.boundary.bottom - c.coords.y), s = Math.max(0, t.boundary.right - o.coords.x) * Math.max(0, t.boundary.bottom - o.coords.y);
|
|
265
|
+
return d > s ? c : o;
|
|
274
266
|
}, r[0]);
|
|
275
267
|
if (i)
|
|
276
268
|
return {
|
|
@@ -279,38 +271,37 @@ function ee(e = {}) {
|
|
|
279
271
|
placement: i.placement,
|
|
280
272
|
data: {
|
|
281
273
|
index: n.indexOf(i.placement),
|
|
282
|
-
overflows: r.map(({ placement:
|
|
274
|
+
overflows: r.map(({ placement: o, overflow: c }) => ({ placement: o, overflow: c }))
|
|
283
275
|
}
|
|
284
276
|
};
|
|
285
277
|
}
|
|
286
278
|
};
|
|
287
279
|
}
|
|
288
|
-
function
|
|
280
|
+
function Q(e = {}) {
|
|
289
281
|
return {
|
|
290
282
|
name: "shift",
|
|
291
283
|
options: e,
|
|
292
284
|
fn(t) {
|
|
293
|
-
const n = e.mainAxis ?? !0, r = e.crossAxis ?? !0, { side: i } =
|
|
294
|
-
let c = t.x,
|
|
295
|
-
return i === "top" || i === "bottom" ? (r && (c += Math.max(0, o.left) - Math.max(0, o.right)), n && (
|
|
285
|
+
const n = e.mainAxis ?? !0, r = e.crossAxis ?? !0, { side: i } = b(t.placement), o = p(t, { padding: e.padding ?? t.padding });
|
|
286
|
+
let c = t.x, a = t.y;
|
|
287
|
+
return i === "top" || i === "bottom" ? (r && (c += Math.max(0, o.left) - Math.max(0, o.right)), n && (a += i === "top" ? Math.max(0, o.top) : -Math.max(0, o.bottom))) : (r && (a += Math.max(0, o.top) - Math.max(0, o.bottom)), n && (c += i === "left" ? Math.max(0, o.left) : -Math.max(0, o.right))), {
|
|
296
288
|
x: c,
|
|
297
|
-
y:
|
|
289
|
+
y: a,
|
|
298
290
|
data: {
|
|
299
291
|
x: c - t.x,
|
|
300
|
-
y:
|
|
292
|
+
y: a - t.y
|
|
301
293
|
}
|
|
302
294
|
};
|
|
303
295
|
}
|
|
304
296
|
};
|
|
305
297
|
}
|
|
306
|
-
function
|
|
298
|
+
function Z(e = {}) {
|
|
307
299
|
return {
|
|
308
300
|
name: "size",
|
|
309
301
|
options: e,
|
|
310
302
|
fn(t) {
|
|
311
|
-
var o;
|
|
312
303
|
const n = e.padding ?? t.padding, r = Math.max(0, t.boundary.right - t.x - n), i = Math.max(0, t.boundary.bottom - t.y - n);
|
|
313
|
-
return
|
|
304
|
+
return e.apply?.({
|
|
314
305
|
availableWidth: r,
|
|
315
306
|
availableHeight: i,
|
|
316
307
|
rects: t.rects,
|
|
@@ -324,23 +315,22 @@ function ne(e = {}) {
|
|
|
324
315
|
}
|
|
325
316
|
};
|
|
326
317
|
}
|
|
327
|
-
function
|
|
318
|
+
function ee(e = {}) {
|
|
328
319
|
return {
|
|
329
320
|
name: "arrow",
|
|
330
321
|
options: e,
|
|
331
322
|
fn(t) {
|
|
332
|
-
|
|
333
|
-
const { side: n } = w(t.placement), r = e.padding ?? 8, i = (u = e.element) == null ? void 0 : u.getBoundingClientRect(), o = (i == null ? void 0 : i.width) || ((x = e.element) == null ? void 0 : x.offsetWidth) || 0, c = (i == null ? void 0 : i.height) || ((b = e.element) == null ? void 0 : b.offsetHeight) || 0, l = t.rects.reference.left + t.rects.reference.width / 2, a = t.rects.reference.top + t.rects.reference.height / 2;
|
|
323
|
+
const { side: n } = b(t.placement), r = e.padding ?? 8, i = e.element?.getBoundingClientRect(), o = i?.width || e.element?.offsetWidth || 0, c = i?.height || e.element?.offsetHeight || 0, a = t.rects.reference.left + t.rects.reference.width / 2, l = t.rects.reference.top + t.rects.reference.height / 2;
|
|
334
324
|
if (n === "top" || n === "bottom") {
|
|
335
|
-
const
|
|
325
|
+
const u = o / 2, y = r, v = Math.max(y, t.rects.floating.width - r - o), M = a - t.x - u, A = E(M, y, v);
|
|
336
326
|
return {
|
|
337
327
|
data: {
|
|
338
|
-
x:
|
|
339
|
-
centerOffset: M -
|
|
328
|
+
x: A,
|
|
329
|
+
centerOffset: M - A
|
|
340
330
|
}
|
|
341
331
|
};
|
|
342
332
|
}
|
|
343
|
-
const d = c / 2,
|
|
333
|
+
const d = c / 2, s = r, f = Math.max(s, t.rects.floating.height - r - c), g = l - t.y - d, m = E(g, s, f);
|
|
344
334
|
return {
|
|
345
335
|
data: {
|
|
346
336
|
y: m,
|
|
@@ -350,15 +340,15 @@ function re(e = {}) {
|
|
|
350
340
|
}
|
|
351
341
|
};
|
|
352
342
|
}
|
|
353
|
-
function
|
|
343
|
+
function te(e = {}) {
|
|
354
344
|
return {
|
|
355
345
|
name: "hide",
|
|
356
346
|
options: e,
|
|
357
347
|
fn(t) {
|
|
358
|
-
const n = e.padding ?? t.padding, r =
|
|
348
|
+
const n = e.padding ?? t.padding, r = p(t, {
|
|
359
349
|
elementContext: "reference",
|
|
360
350
|
padding: n
|
|
361
|
-
}), i =
|
|
351
|
+
}), i = p(t, { padding: n }), o = Object.values(r).some((a) => a > 0), c = Object.values(i).some((a) => a > 0);
|
|
362
352
|
return {
|
|
363
353
|
data: {
|
|
364
354
|
referenceHidden: o,
|
|
@@ -370,26 +360,24 @@ function ie(e = {}) {
|
|
|
370
360
|
}
|
|
371
361
|
};
|
|
372
362
|
}
|
|
373
|
-
function
|
|
374
|
-
var r;
|
|
363
|
+
function ne(e) {
|
|
375
364
|
const t = typeof e.boundaryPadding == "number" ? e.boundaryPadding : 4, n = [];
|
|
376
|
-
return e.autoPlacement ? n.push(
|
|
365
|
+
return e.autoPlacement ? n.push(K({
|
|
377
366
|
padding: t,
|
|
378
367
|
allowedPlacements: e.allowedPlacements
|
|
379
|
-
})) : e.flip && n.push(
|
|
368
|
+
})) : e.flip && n.push(J({
|
|
380
369
|
padding: t,
|
|
381
370
|
fallbackPlacements: e.fallbackPlacements
|
|
382
|
-
})), n.push(
|
|
371
|
+
})), n.push(U({
|
|
383
372
|
mainAxis: typeof e.offset == "number" ? e.offset : 8,
|
|
384
373
|
crossAxis: typeof e.crossOffset == "number" ? e.crossOffset : 0
|
|
385
|
-
})), (e.shift || e.fitViewport) && n.push(
|
|
374
|
+
})), (e.shift || e.fitViewport) && n.push(Q({ padding: t })), (e.matchWidth || e.fitViewport) && n.push(Z({ padding: t })), e.arrow && n.push(ee({
|
|
386
375
|
element: e.arrow,
|
|
387
376
|
padding: e.arrowPadding
|
|
388
|
-
})), e.hideWhenDetached && n.push(
|
|
377
|
+
})), e.hideWhenDetached && n.push(te({ padding: t })), e.middleware?.length && n.push(...e.middleware), n;
|
|
389
378
|
}
|
|
390
|
-
function
|
|
391
|
-
if (!n)
|
|
392
|
-
return;
|
|
379
|
+
function re(e, t, n) {
|
|
380
|
+
if (!n) return;
|
|
393
381
|
typeof n.x == "number" && (e.x = n.x), typeof n.y == "number" && (e.y = n.y);
|
|
394
382
|
const i = (typeof n.reset == "object" ? n.reset.placement : void 0) || n.placement;
|
|
395
383
|
if (i && i !== e.placement) {
|
|
@@ -399,103 +387,98 @@ function ce(e, t, n) {
|
|
|
399
387
|
}
|
|
400
388
|
typeof n.x == "number" && (e.x = n.x), typeof n.y == "number" && (e.y = n.y), n.data !== void 0 && (e.middlewareData[t.name] = n.data);
|
|
401
389
|
}
|
|
402
|
-
function
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
};
|
|
415
|
-
}, d = (h) => a(h).reference, f = a(i), s = H(f.reference, f.floating, i, 0, 0, l), g = {}, m = ((M = (p = n.platform) == null ? void 0 : p.getClippingRect) == null ? void 0 : M.call(p, { anchor: e, floating: t, boundary: n.boundary ?? null })) ?? G(e, t, n.boundary ?? null), u = {
|
|
416
|
-
x: s.x,
|
|
417
|
-
y: s.y,
|
|
390
|
+
function D(e, t, n = {}) {
|
|
391
|
+
const r = z(t) ? t.getBoundingClientRect() : t, i = n.placement || "bottom", o = n.strategy || "fixed", c = typeof n.boundaryPadding == "number" ? n.boundaryPadding : 4, a = I(e, t, n.dir) === "rtl", l = (h) => n.platform?.getElementRects?.({
|
|
392
|
+
anchor: e,
|
|
393
|
+
floating: t,
|
|
394
|
+
placement: h,
|
|
395
|
+
inline: !!n.inline
|
|
396
|
+
}) ?? {
|
|
397
|
+
reference: k(e, h, !!n.inline, n.platform),
|
|
398
|
+
floating: r
|
|
399
|
+
}, d = (h) => l(h).reference, s = l(i), f = O(s.reference, s.floating, i, 0, 0, a), g = {}, m = n.platform?.getClippingRect?.({ anchor: e, floating: t, boundary: n.boundary ?? null }) ?? X(e, t, n.boundary ?? null), u = {
|
|
400
|
+
x: f.x,
|
|
401
|
+
y: f.y,
|
|
418
402
|
initialPlacement: i,
|
|
419
403
|
placement: i,
|
|
420
404
|
strategy: o,
|
|
421
|
-
rects:
|
|
405
|
+
rects: s,
|
|
422
406
|
elements: {
|
|
423
407
|
anchor: e,
|
|
424
408
|
floating: t
|
|
425
409
|
},
|
|
426
410
|
boundary: m,
|
|
427
411
|
padding: c,
|
|
428
|
-
rtl:
|
|
412
|
+
rtl: a,
|
|
429
413
|
middlewareData: g,
|
|
430
|
-
getRects:
|
|
414
|
+
getRects: l,
|
|
431
415
|
getAnchorRect: d,
|
|
432
|
-
getCoords: (h,
|
|
416
|
+
getCoords: (h, F = d(h)) => O(F, u.rects.floating, h, 0, 0, a)
|
|
433
417
|
};
|
|
434
|
-
|
|
435
|
-
|
|
418
|
+
ne(n).forEach((h) => {
|
|
419
|
+
re(u, h, h.fn(u));
|
|
436
420
|
});
|
|
437
|
-
const
|
|
421
|
+
const y = g.size, v = g.hide, M = y?.availableWidth ?? Math.max(0, u.boundary.right - u.x - c), A = y?.availableHeight ?? Math.max(0, u.boundary.bottom - u.y - c);
|
|
438
422
|
return {
|
|
439
423
|
x: u.x,
|
|
440
424
|
y: u.y,
|
|
441
425
|
placement: u.placement,
|
|
442
426
|
strategy: o,
|
|
443
|
-
availableWidth:
|
|
444
|
-
availableHeight:
|
|
427
|
+
availableWidth: M,
|
|
428
|
+
availableHeight: A,
|
|
445
429
|
middlewareData: g,
|
|
446
|
-
referenceHidden:
|
|
447
|
-
escaped:
|
|
430
|
+
referenceHidden: v?.referenceHidden,
|
|
431
|
+
escaped: v?.escaped,
|
|
448
432
|
rects: u.rects
|
|
449
433
|
};
|
|
450
434
|
}
|
|
451
|
-
function
|
|
435
|
+
function W(e, t) {
|
|
452
436
|
return t !== "absolute" ? e : {
|
|
453
437
|
...e,
|
|
454
438
|
x: e.x + window.scrollX,
|
|
455
439
|
y: e.y + window.scrollY
|
|
456
440
|
};
|
|
457
441
|
}
|
|
458
|
-
function
|
|
459
|
-
if (typeof IntersectionObserver > "u")
|
|
460
|
-
|
|
461
|
-
};
|
|
442
|
+
function ie(e, t) {
|
|
443
|
+
if (typeof IntersectionObserver > "u") return () => {
|
|
444
|
+
};
|
|
462
445
|
let n = () => {
|
|
463
446
|
};
|
|
464
447
|
return (() => {
|
|
465
448
|
n();
|
|
466
|
-
const i = e.getBoundingClientRect(), o = document.documentElement, c = `${-Math.floor(i.top)}px ${-Math.floor(o.clientWidth - i.right)}px ${-Math.floor(o.clientHeight - i.bottom)}px ${-Math.floor(i.left)}px`,
|
|
449
|
+
const i = e.getBoundingClientRect(), o = document.documentElement, c = `${-Math.floor(i.top)}px ${-Math.floor(o.clientWidth - i.right)}px ${-Math.floor(o.clientHeight - i.bottom)}px ${-Math.floor(i.left)}px`, a = new IntersectionObserver(() => t(), {
|
|
467
450
|
rootMargin: c,
|
|
468
451
|
threshold: 1
|
|
469
452
|
});
|
|
470
|
-
|
|
453
|
+
a.observe(e), n = () => a.disconnect();
|
|
471
454
|
})(), () => n();
|
|
472
455
|
}
|
|
473
|
-
function
|
|
474
|
-
let i = 0, o = 0, c = null,
|
|
475
|
-
const d = [],
|
|
456
|
+
function oe(e, t, n, r) {
|
|
457
|
+
let i = 0, o = 0, c = null, a = null, l = null;
|
|
458
|
+
const d = [], s = C(e), f = () => {
|
|
476
459
|
i || (i = requestAnimationFrame(() => {
|
|
477
460
|
i = 0, n();
|
|
478
461
|
}));
|
|
479
462
|
};
|
|
480
|
-
if (r.observeWindowResize && (window.addEventListener("resize",
|
|
481
|
-
...
|
|
482
|
-
...
|
|
463
|
+
if (r.observeWindowResize && (window.addEventListener("resize", f), d.push(() => window.removeEventListener("resize", f))), r.observeScroll && (window.addEventListener("scroll", f, { passive: !0, capture: !0 }), d.push(() => window.removeEventListener("scroll", f, !0))), (r.observeAncestorScroll || r.observeAncestorResize ? /* @__PURE__ */ new Set([
|
|
464
|
+
...s ? R(s) : [],
|
|
465
|
+
...R(t)
|
|
483
466
|
]) : /* @__PURE__ */ new Set()).forEach((m) => {
|
|
484
|
-
m !== window && (r.observeAncestorScroll && (m.addEventListener("scroll",
|
|
485
|
-
}),
|
|
486
|
-
c =
|
|
467
|
+
m !== window && (r.observeAncestorScroll && (m.addEventListener("scroll", f, { passive: !0 }), d.push(() => m.removeEventListener("scroll", f))), r.observeAncestorResize && (m.addEventListener("resize", f), d.push(() => m.removeEventListener("resize", f))));
|
|
468
|
+
}), s && r.observeLayoutShift && d.push(ie(s, f)), typeof ResizeObserver < "u" && (r.observeAnchorResize && s && (a = new ResizeObserver(f), a.observe(s)), r.observeFloatingResize && (l = new ResizeObserver(f), l.observe(t))), r.animationFrame) {
|
|
469
|
+
c = x(e);
|
|
487
470
|
const m = () => {
|
|
488
|
-
const u =
|
|
489
|
-
c && (c.top !== u.top || c.left !== u.left || c.width !== u.width || c.height !== u.height) &&
|
|
471
|
+
const u = x(e);
|
|
472
|
+
c && (c.top !== u.top || c.left !== u.left || c.width !== u.width || c.height !== u.height) && f(), c = u, o = requestAnimationFrame(m);
|
|
490
473
|
};
|
|
491
474
|
o = requestAnimationFrame(m);
|
|
492
475
|
}
|
|
493
476
|
return () => {
|
|
494
|
-
d.forEach((m) => m()),
|
|
477
|
+
d.forEach((m) => m()), a && a.disconnect(), l && l.disconnect(), i && cancelAnimationFrame(i), o && cancelAnimationFrame(o);
|
|
495
478
|
};
|
|
496
479
|
}
|
|
497
|
-
function
|
|
498
|
-
return
|
|
480
|
+
function ce(e, t, n, r = {}) {
|
|
481
|
+
return oe(e, t, n, {
|
|
499
482
|
observeWindowResize: r.observeWindowResize ?? !0,
|
|
500
483
|
observeScroll: r.observeScroll ?? !0,
|
|
501
484
|
observeAncestorScroll: r.observeAncestorScroll ?? !0,
|
|
@@ -506,38 +489,36 @@ function ae(e, t, n, r = {}) {
|
|
|
506
489
|
animationFrame: r.animationFrame ?? !1
|
|
507
490
|
});
|
|
508
491
|
}
|
|
509
|
-
function
|
|
510
|
-
const { side: i } =
|
|
492
|
+
function le(e, t, n, r) {
|
|
493
|
+
const { side: i } = b(t.placement), o = n.left + n.width / 2, c = n.top + n.height / 2;
|
|
511
494
|
if (i === "top" || i === "bottom") {
|
|
512
|
-
const
|
|
495
|
+
const l = Math.max(8, r.width - 8), d = E(o - t.x, 8, l);
|
|
513
496
|
e.style.left = `${Math.round(d)}px`;
|
|
514
497
|
} else {
|
|
515
|
-
const
|
|
498
|
+
const l = Math.max(8, r.height - 8), d = E(c - t.y, 8, l);
|
|
516
499
|
e.style.top = `${Math.round(d)}px`;
|
|
517
500
|
}
|
|
518
501
|
}
|
|
519
|
-
function
|
|
520
|
-
|
|
521
|
-
const n = (r = t.middlewareData) == null ? void 0 : r.arrow;
|
|
502
|
+
function ae(e, t) {
|
|
503
|
+
const n = t.middlewareData?.arrow;
|
|
522
504
|
n && (typeof n.x == "number" && (e.style.left = `${Math.round(n.x)}px`), typeof n.y == "number" && (e.style.top = `${Math.round(n.y)}px`));
|
|
523
505
|
}
|
|
524
|
-
function
|
|
525
|
-
var i;
|
|
506
|
+
function de(e, t, n, r) {
|
|
526
507
|
if (e.style.position = n, e.style.left = `${Math.round(t.x)}px`, e.style.top = `${Math.round(t.y)}px`, e.style.setProperty("--ui-positioner-x", `${Math.round(t.x)}px`), e.style.setProperty("--ui-positioner-y", `${Math.round(t.y)}px`), r.matchWidth) {
|
|
527
|
-
const
|
|
528
|
-
e.style.width = `${Math.round(
|
|
508
|
+
const i = x(r.anchor);
|
|
509
|
+
e.style.width = `${Math.round(i.width)}px`;
|
|
529
510
|
}
|
|
530
|
-
r.fitViewport && (e.style.maxWidth = `${Math.round(t.availableWidth)}px`, e.style.maxHeight = `${Math.round(t.availableHeight)}px`), e.setAttribute("data-placement", t.placement), typeof t.referenceHidden == "boolean" || typeof t.escaped == "boolean" ? (e.setAttribute("data-reference-hidden", t.referenceHidden ? "true" : "false"), e.setAttribute("data-escaped", t.escaped ? "true" : "false")) : (e.removeAttribute("data-reference-hidden"), e.removeAttribute("data-escaped")), r.arrow instanceof HTMLElement && (
|
|
511
|
+
r.fitViewport && (e.style.maxWidth = `${Math.round(t.availableWidth)}px`, e.style.maxHeight = `${Math.round(t.availableHeight)}px`), e.setAttribute("data-placement", t.placement), typeof t.referenceHidden == "boolean" || typeof t.escaped == "boolean" ? (e.setAttribute("data-reference-hidden", t.referenceHidden ? "true" : "false"), e.setAttribute("data-escaped", t.escaped ? "true" : "false")) : (e.removeAttribute("data-reference-hidden"), e.removeAttribute("data-escaped")), r.arrow instanceof HTMLElement && (t.middlewareData?.arrow ? ae(r.arrow, t) : le(r.arrow, t, x(r.anchor), e.getBoundingClientRect()));
|
|
531
512
|
}
|
|
532
|
-
function
|
|
513
|
+
function me(e) {
|
|
533
514
|
if (!(e.floating instanceof HTMLElement))
|
|
534
515
|
throw new Error("createPositioner requires a valid floating HTMLElement");
|
|
535
516
|
const t = e.strategy || "fixed", n = e.floating;
|
|
536
|
-
let r =
|
|
537
|
-
|
|
517
|
+
let r = W(
|
|
518
|
+
D(e.anchor, n, e),
|
|
538
519
|
t
|
|
539
520
|
);
|
|
540
|
-
const i =
|
|
521
|
+
const i = ce(e.anchor, n, o, {
|
|
541
522
|
observeWindowResize: e.observeWindowResize ?? !0,
|
|
542
523
|
observeScroll: e.observeScroll ?? !0,
|
|
543
524
|
observeAncestorScroll: e.observeAncestorScroll ?? !0,
|
|
@@ -550,12 +531,11 @@ function xe(e) {
|
|
|
550
531
|
animationFrame: e.animationFrame ?? !1
|
|
551
532
|
});
|
|
552
533
|
function o() {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
T(e.anchor, n, e),
|
|
534
|
+
const c = W(
|
|
535
|
+
D(e.anchor, n, e),
|
|
556
536
|
t
|
|
557
537
|
);
|
|
558
|
-
return r = c,
|
|
538
|
+
return r = c, de(n, c, t, e), e.onUpdate?.(c), r;
|
|
559
539
|
}
|
|
560
540
|
return o(), {
|
|
561
541
|
update: o,
|
|
@@ -565,18 +545,18 @@ function xe(e) {
|
|
|
565
545
|
};
|
|
566
546
|
}
|
|
567
547
|
export {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
548
|
+
ce as a,
|
|
549
|
+
ee as b,
|
|
550
|
+
D as c,
|
|
551
|
+
K as d,
|
|
552
|
+
me as e,
|
|
553
|
+
se as f,
|
|
554
|
+
ue as g,
|
|
555
|
+
fe as h,
|
|
556
|
+
p as i,
|
|
557
|
+
J as j,
|
|
558
|
+
te as k,
|
|
559
|
+
Z as l,
|
|
560
|
+
U as o,
|
|
561
|
+
Q as s
|
|
582
562
|
};
|