@trintel/zooy 1.0.20 → 1.1.1
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/chunks/component-library-registry-BBQV6Kpv.js +1 -0
- package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
- package/dist/chunks/register-D3pWAXhm.js +266 -0
- package/dist/chunks/register-D7SMu1Gy.js +1372 -0
- package/dist/chunks/register-HYODt48Q.js +1 -0
- package/dist/chunks/register-g5KUNRdI.js +1 -0
- package/dist/chunks/{tree-utils-D7kpr-Wj.js → tree-utils-B2JEGXHR.js} +2 -1
- package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
- package/dist/chunks/zoo-CY2QpG41.js +52 -0
- package/dist/chunks/zoo-DgdxBjlN.js +390 -0
- package/dist/zooy.cjs.js +4 -4
- package/dist/zooy.es.js +226 -237
- package/package.json +1 -1
- package/dist/chunks/16-B2HVhDIW.js +0 -1
- package/dist/chunks/16-B9Ad4Fob.js +0 -19
- package/dist/chunks/16-BXsOcjPx.js +0 -19
- package/dist/chunks/16-BZCBqUx6.js +0 -1
- package/dist/chunks/16-BmOXGjZf.js +0 -1
- package/dist/chunks/16-BsQdCz_w.js +0 -27
- package/dist/chunks/16-C-Rp3Nso.js +0 -1
- package/dist/chunks/16-C36sVk5F.js +0 -26
- package/dist/chunks/16-CZycT1I8.js +0 -1
- package/dist/chunks/16-Ce_hDgPW.js +0 -1
- package/dist/chunks/16-CinLDpNC.js +0 -19
- package/dist/chunks/16-Cj0hOjaI.js +0 -1
- package/dist/chunks/16-Cx-PCMJJ.js +0 -26
- package/dist/chunks/16-D8XFc44J.js +0 -110
- package/dist/chunks/16-DVx7Niko.js +0 -33
- package/dist/chunks/16-DZJZDJYY.js +0 -1
- package/dist/chunks/16-DoCnqtvj.js +0 -35
- package/dist/chunks/16-DyCV3lkl.js +0 -19
- package/dist/chunks/16-SwMpxJpB.js +0 -19
- package/dist/chunks/16-jVjxC8Bu.js +0 -1
- package/dist/chunks/16-ma2Q_204.js +0 -1
- package/dist/chunks/16-qZ3FOIw0.js +0 -1
- package/dist/chunks/20-BwzzGcZC.js +0 -80
- package/dist/chunks/20-CqNSki3g.js +0 -1
- package/dist/chunks/accordion-0mybViUv.js +0 -236
- package/dist/chunks/accordion-CvcaulG8.js +0 -45
- package/dist/chunks/badge-indicator-BUdDkz6Z.js +0 -18
- package/dist/chunks/badge-indicator-DuYbJV5o.js +0 -1
- package/dist/chunks/breadcrumb-CYKgjbdB.js +0 -19
- package/dist/chunks/breadcrumb-DB0PkiBX.js +0 -140
- package/dist/chunks/button-1g5b3tWS.js +0 -268
- package/dist/chunks/button-BKj8189A.js +0 -4
- package/dist/chunks/button-DAOoyQ8b.js +0 -67
- package/dist/chunks/button-DfRkC-OR.js +0 -72
- package/dist/chunks/button-skeleton-C0mW3D7v.js +0 -44
- package/dist/chunks/button-skeleton-KFGdwtUH.js +0 -21
- package/dist/chunks/carbon-element-BsPGNbmz.js +0 -1
- package/dist/chunks/carbon-element-Z5iEnFdr.js +0 -24
- package/dist/chunks/checkbox-CBD8Qmjx.js +0 -37
- package/dist/chunks/checkbox-CewERWBu.js +0 -40
- package/dist/chunks/checkbox-CxxD4wgP.js +0 -176
- package/dist/chunks/checkbox-DKS7fw29.js +0 -168
- package/dist/chunks/class-map-BwUbMyhc.js +0 -1
- package/dist/chunks/class-map-qeLb1IA_.js +0 -27
- package/dist/chunks/code-snippet-BJhK27fG.js +0 -205
- package/dist/chunks/code-snippet-BUQFh_v7.js +0 -53
- package/dist/chunks/collection-helpers-DPVzwwb8.js +0 -7
- package/dist/chunks/collection-helpers-g7DrZSRQ.js +0 -1
- package/dist/chunks/combo-box-BCOUQHyG.js +0 -39
- package/dist/chunks/combo-box-Bms5blM6.js +0 -325
- package/dist/chunks/combo-button-BSBAvBIW.js +0 -15
- package/dist/chunks/combo-button-Bc3hx7VJ.js +0 -92
- package/dist/chunks/component-library-registry-CJ1Yb_8E.js +0 -98
- package/dist/chunks/component-library-registry-Co7WzTfw.js +0 -1
- package/dist/chunks/content-switcher-BuLZ3Aae.js +0 -1
- package/dist/chunks/content-switcher-DIODRHwc.js +0 -2
- package/dist/chunks/content-switcher-item-0YPDXW1z.js +0 -27
- package/dist/chunks/content-switcher-item-DkRD8k8n.js +0 -272
- package/dist/chunks/copy-button-XD4reiTK.js +0 -121
- package/dist/chunks/copy-button-eI9B8iKc.js +0 -17
- package/dist/chunks/data-table-BImLEoIA.js +0 -1243
- package/dist/chunks/data-table-YLNCQhJx.js +0 -158
- package/dist/chunks/date-picker-CWIAwkKj.js +0 -66
- package/dist/chunks/date-picker-CXjiOkZH.js +0 -2167
- package/dist/chunks/decorate-Cnz2C5jL.js +0 -62
- package/dist/chunks/decorate-DT052P_1.js +0 -72
- package/dist/chunks/decorators-CHZSYVOk.js +0 -1
- package/dist/chunks/decorators-CK8kfuyw.js +0 -87
- package/dist/chunks/deep-shadow-contains-BlQ_KSu4.js +0 -15
- package/dist/chunks/deep-shadow-contains-OTuAt1VE.js +0 -1
- package/dist/chunks/directive-CtTB8jL3.js +0 -31
- package/dist/chunks/directive-DWoJrOxt.js +0 -1
- package/dist/chunks/dropdown-Cg9JduA5.js +0 -4
- package/dist/chunks/dropdown-item-CYwutWei.js +0 -677
- package/dist/chunks/dropdown-item-H53zayYk.js +0 -73
- package/dist/chunks/dropdown-jdFaaXEa.js +0 -32
- package/dist/chunks/file-uploader-6FOP_GAh.js +0 -79
- package/dist/chunks/file-uploader-BTk1MqcJ.js +0 -342
- package/dist/chunks/floating-controller-BphaSUPY.js +0 -1012
- package/dist/chunks/floating-controller-C4ivnNvp.js +0 -1
- package/dist/chunks/focus-C1mbe9-i.js +0 -1
- package/dist/chunks/focus-Dpis0wA_.js +0 -13
- package/dist/chunks/form-BEmId1-D.js +0 -20
- package/dist/chunks/form-BmSVyKnm.js +0 -1
- package/dist/chunks/form-DUzcwJO9.js +0 -23
- package/dist/chunks/form-crnrWPVH.js +0 -3
- package/dist/chunks/form-group-Dax3eYD4.js +0 -43
- package/dist/chunks/form-group-dIvuqjw2.js +0 -12
- package/dist/chunks/heading-BbB6mvMG.js +0 -47
- package/dist/chunks/heading-UN9MO1TN.js +0 -5
- package/dist/chunks/host-listener-BBI7oAFw.js +0 -37
- package/dist/chunks/host-listener-BzjpIsFF.js +0 -1
- package/dist/chunks/host-listener-CtA1D-wt.js +0 -1
- package/dist/chunks/host-listener-DJEakRMM.js +0 -17
- package/dist/chunks/icon-B_S1_kDJ.js +0 -1
- package/dist/chunks/icon-CINf5Icb.js +0 -28
- package/dist/chunks/icon-button-BtE0-oCE.js +0 -1
- package/dist/chunks/icon-button-CACU21y5.js +0 -16
- package/dist/chunks/icon-button-D2STrB4d.js +0 -6
- package/dist/chunks/icon-button-D569kvcZ.js +0 -84
- package/dist/chunks/icon-indicator-BkILzP5o.js +0 -1
- package/dist/chunks/icon-indicator-D_IHkSon.js +0 -445
- package/dist/chunks/icon-loader-B9uu2SkP.js +0 -7
- package/dist/chunks/icon-loader-CZ8MQjNl.js +0 -1
- package/dist/chunks/icon-loader-utils-BKulYpY6.js +0 -110
- package/dist/chunks/icon-loader-utils-C-vWa1iy.js +0 -1
- package/dist/chunks/if-defined-C4rY5CqG.js +0 -1
- package/dist/chunks/if-defined-DvPh-nZx.js +0 -5
- package/dist/chunks/if-non-empty-CqihXhSU.js +0 -1
- package/dist/chunks/if-non-empty-DIcT03Pc.js +0 -5
- package/dist/chunks/inline-loading-BIB-coVZ.js +0 -83
- package/dist/chunks/inline-loading-C4MpPNzv.js +0 -12
- package/dist/chunks/link-Bz8knkhr.js +0 -1
- package/dist/chunks/link-CyrOt3Yx.js +0 -24
- package/dist/chunks/link-DlDoN1r0.js +0 -1
- package/dist/chunks/link-MrslkhR7.js +0 -106
- package/dist/chunks/lit-BNk7ncU9.js +0 -3
- package/dist/chunks/lit-uyM4-HrV.js +0 -552
- package/dist/chunks/loading-CUUY8ITP.js +0 -68
- package/dist/chunks/loading-CX_B-YYv.js +0 -1
- package/dist/chunks/loading-SDDHeWof.js +0 -1
- package/dist/chunks/loading-icon-BsInpAjb.js +0 -16
- package/dist/chunks/loading-icon-iCI-C5ZG.js +0 -24
- package/dist/chunks/loading-xKooWNUJ.js +0 -2
- package/dist/chunks/menu-D2kFhclQ.js +0 -56
- package/dist/chunks/menu-DG7s9yXJ.js +0 -682
- package/dist/chunks/modal-C2EEHjQh.js +0 -27
- package/dist/chunks/modal-DEGWE2iT.js +0 -414
- package/dist/chunks/multi-select-BXST526m.js +0 -63
- package/dist/chunks/multi-select-CgDCOBWa.js +0 -384
- package/dist/chunks/notification-BEvb6zBP.js +0 -89
- package/dist/chunks/notification-DLOgEfr6.js +0 -426
- package/dist/chunks/number-input-CRIgLD3k.js +0 -284
- package/dist/chunks/number-input-CiXkIGVz.js +0 -76
- package/dist/chunks/on-D2_IwJad.js +0 -8
- package/dist/chunks/on-_BJL2XbM.js +0 -1
- package/dist/chunks/overflow-menu-BSMy7pUY.js +0 -34
- package/dist/chunks/overflow-menu-CGghH3Mz.js +0 -387
- package/dist/chunks/pagination-4SuGaSx6.js +0 -77
- package/dist/chunks/pagination-D7VFRyN2.js +0 -293
- package/dist/chunks/password-input-Cx2ItLqG.js +0 -68
- package/dist/chunks/password-input-NoZg_DjL.js +0 -210
- package/dist/chunks/popover--wvkgqdv.js +0 -1
- package/dist/chunks/popover-Ca4f4ZCE.js +0 -6
- package/dist/chunks/popover-content-BOaLSQt3.js +0 -15
- package/dist/chunks/popover-content-Bi-ydBhZ.js +0 -277
- package/dist/chunks/progress-bar-BTHREDPK.js +0 -101
- package/dist/chunks/progress-bar-p0YwLsuh.js +0 -22
- package/dist/chunks/progress-indicator-BP8k-xTC.js +0 -252
- package/dist/chunks/progress-indicator-cr687P29.js +0 -35
- package/dist/chunks/radio-button-CNOPBUK8.js +0 -396
- package/dist/chunks/radio-button-CU2ngHxo.js +0 -44
- package/dist/chunks/radio-group-manager-iPCcbWB8.js +0 -60
- package/dist/chunks/radio-group-manager-zfU1GLIW.js +0 -1
- package/dist/chunks/register-BXKEXKsC.js +0 -15
- package/dist/chunks/register-Bx7SlevL.js +0 -8198
- package/dist/chunks/register-CnJjkv07.js +0 -1
- package/dist/chunks/register-DqgfpeXv.js +0 -1399
- package/dist/chunks/search-BYWQ80wI.js +0 -4
- package/dist/chunks/search-BgSG9LA9.js +0 -22
- package/dist/chunks/search-CET7sHGW.js +0 -173
- package/dist/chunks/search-CUuRRsTX.js +0 -31
- package/dist/chunks/select-BifhTIxt.js +0 -37
- package/dist/chunks/select-Dh4AFZ2v.js +0 -4
- package/dist/chunks/select-item-BvwJ4Wc-.js +0 -77
- package/dist/chunks/select-item-DLWdT1CE.js +0 -272
- package/dist/chunks/shared-enums-BdDASwq-.js +0 -1
- package/dist/chunks/shared-enums-Cd0vBQFM.js +0 -6
- package/dist/chunks/skeleton-placeholder-Czj5sAeI.js +0 -28
- package/dist/chunks/skeleton-placeholder-aS-woCl8.js +0 -1
- package/dist/chunks/skeleton-text-BIHdj7Jx.js +0 -1
- package/dist/chunks/skeleton-text-CZ2bSuDE.js +0 -6
- package/dist/chunks/skeleton-text-DJrow5mh.js +0 -1
- package/dist/chunks/skeleton-text-INjLvc2Y.js +0 -71
- package/dist/chunks/slider-CoHP_UJ2.js +0 -878
- package/dist/chunks/slider-DhIZP9Ms.js +0 -246
- package/dist/chunks/stack-C66k74Zo.js +0 -1
- package/dist/chunks/stack-vrK3hQYJ.js +0 -85
- package/dist/chunks/structured-list-BWjXHFbX.js +0 -19
- package/dist/chunks/structured-list-lqhD2RqL.js +0 -234
- package/dist/chunks/tabs-DixpRz83.js +0 -58
- package/dist/chunks/tabs-DkIGB3cC.js +0 -316
- package/dist/chunks/tag-DpezbQqm.js +0 -93
- package/dist/chunks/tag-rQOD2v2s.js +0 -412
- package/dist/chunks/text-input-BYjtsh0H.js +0 -26
- package/dist/chunks/text-input-C2jRG8Lb.js +0 -72
- package/dist/chunks/text-input-DvygxhCJ.js +0 -4
- package/dist/chunks/text-input-DzSNpORC.js +0 -309
- package/dist/chunks/textarea-BZ34-RaT.js +0 -190
- package/dist/chunks/textarea-Be3YTme6.js +0 -57
- package/dist/chunks/tile-CQ9nINGM.js +0 -524
- package/dist/chunks/tile-DNWy90OU.js +0 -74
- package/dist/chunks/time-picker-CJ_ONMZi.js +0 -267
- package/dist/chunks/time-picker-DK_Lu3AK.js +0 -52
- package/dist/chunks/toggle-BBdusHAx.js +0 -36
- package/dist/chunks/toggle-Bfx6cOUM.js +0 -156
- package/dist/chunks/toggle-tip-CkH7fFX4.js +0 -46
- package/dist/chunks/toggle-tip-DF_GKfoM.js +0 -169
- package/dist/chunks/tooltip-COwRDvmc.js +0 -85
- package/dist/chunks/tooltip-DbGsUOZ8.js +0 -23
- package/dist/chunks/tooltip-content-BDcgoT6r.js +0 -1
- package/dist/chunks/tooltip-content-CkxKIMDr.js +0 -116
- package/dist/chunks/tree-utils-AeNlEhIR.js +0 -1
- package/dist/chunks/tree-view-BmoD8n0Y.js +0 -292
- package/dist/chunks/tree-view-Drfa7DNm.js +0 -82
- package/dist/chunks/unsafe-html-BP-z2WTp.js +0 -26
- package/dist/chunks/unsafe-html-Dego4Lbw.js +0 -1
- package/dist/chunks/validity-CMW3OiFU.js +0 -31
- package/dist/chunks/validity-zT-XWh2t.js +0 -1
- package/dist/chunks/zoo-Bb5HHyrn.js +0 -721
- package/dist/chunks/zoo-C_CBOaHL.js +0 -52
|
@@ -1,1012 +0,0 @@
|
|
|
1
|
-
var Ht = [
|
|
2
|
-
"top",
|
|
3
|
-
"right",
|
|
4
|
-
"bottom",
|
|
5
|
-
"left"
|
|
6
|
-
], I = Math.min, P = Math.max, nt = Math.round, et = Math.floor, W = (t) => ({
|
|
7
|
-
x: t,
|
|
8
|
-
y: t
|
|
9
|
-
}), Nt = {
|
|
10
|
-
left: "right",
|
|
11
|
-
right: "left",
|
|
12
|
-
bottom: "top",
|
|
13
|
-
top: "bottom"
|
|
14
|
-
}, Vt = {
|
|
15
|
-
start: "end",
|
|
16
|
-
end: "start"
|
|
17
|
-
};
|
|
18
|
-
function _t(t, e, n) {
|
|
19
|
-
return P(t, I(e, n));
|
|
20
|
-
}
|
|
21
|
-
function K(t, e) {
|
|
22
|
-
return typeof t == "function" ? t(e) : t;
|
|
23
|
-
}
|
|
24
|
-
function j(t) {
|
|
25
|
-
return t.split("-")[0];
|
|
26
|
-
}
|
|
27
|
-
function J(t) {
|
|
28
|
-
return t.split("-")[1];
|
|
29
|
-
}
|
|
30
|
-
function zt(t) {
|
|
31
|
-
return t === "x" ? "y" : "x";
|
|
32
|
-
}
|
|
33
|
-
function mt(t) {
|
|
34
|
-
return t === "y" ? "height" : "width";
|
|
35
|
-
}
|
|
36
|
-
var It = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
37
|
-
function z(t) {
|
|
38
|
-
return It.has(j(t)) ? "y" : "x";
|
|
39
|
-
}
|
|
40
|
-
function ht(t) {
|
|
41
|
-
return zt(z(t));
|
|
42
|
-
}
|
|
43
|
-
function Xt(t, e, n) {
|
|
44
|
-
n === void 0 && (n = !1);
|
|
45
|
-
const o = J(t), i = ht(t), r = mt(i);
|
|
46
|
-
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
47
|
-
return e.reference[r] > e.floating[r] && (s = ot(s)), [s, ot(s)];
|
|
48
|
-
}
|
|
49
|
-
function Yt(t) {
|
|
50
|
-
const e = ot(t);
|
|
51
|
-
return [
|
|
52
|
-
ut(t),
|
|
53
|
-
e,
|
|
54
|
-
ut(e)
|
|
55
|
-
];
|
|
56
|
-
}
|
|
57
|
-
function ut(t) {
|
|
58
|
-
return t.replace(/start|end/g, (e) => Vt[e]);
|
|
59
|
-
}
|
|
60
|
-
var yt = ["left", "right"], bt = ["right", "left"], jt = ["top", "bottom"], Ut = ["bottom", "top"];
|
|
61
|
-
function qt(t, e, n) {
|
|
62
|
-
switch (t) {
|
|
63
|
-
case "top":
|
|
64
|
-
case "bottom":
|
|
65
|
-
return n ? e ? bt : yt : e ? yt : bt;
|
|
66
|
-
case "left":
|
|
67
|
-
case "right":
|
|
68
|
-
return e ? jt : Ut;
|
|
69
|
-
default:
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function Gt(t, e, n, o) {
|
|
74
|
-
const i = J(t);
|
|
75
|
-
let r = qt(j(t), n === "start", o);
|
|
76
|
-
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ut)))), r;
|
|
77
|
-
}
|
|
78
|
-
function ot(t) {
|
|
79
|
-
return t.replace(/left|right|bottom|top/g, (e) => Nt[e]);
|
|
80
|
-
}
|
|
81
|
-
function Kt(t) {
|
|
82
|
-
return {
|
|
83
|
-
top: 0,
|
|
84
|
-
right: 0,
|
|
85
|
-
bottom: 0,
|
|
86
|
-
left: 0,
|
|
87
|
-
...t
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function Pt(t) {
|
|
91
|
-
return typeof t != "number" ? Kt(t) : {
|
|
92
|
-
top: t,
|
|
93
|
-
right: t,
|
|
94
|
-
bottom: t,
|
|
95
|
-
left: t
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function it(t) {
|
|
99
|
-
const { x: e, y: n, width: o, height: i } = t;
|
|
100
|
-
return {
|
|
101
|
-
width: o,
|
|
102
|
-
height: i,
|
|
103
|
-
top: n,
|
|
104
|
-
left: e,
|
|
105
|
-
right: e + o,
|
|
106
|
-
bottom: n + i,
|
|
107
|
-
x: e,
|
|
108
|
-
y: n
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function xt(t, e, n) {
|
|
112
|
-
let { reference: o, floating: i } = t;
|
|
113
|
-
const r = z(e), s = ht(e), l = mt(s), c = j(e), u = r === "y", a = o.x + o.width / 2 - i.width / 2, m = o.y + o.height / 2 - i.height / 2, h = o[l] / 2 - i[l] / 2;
|
|
114
|
-
let f;
|
|
115
|
-
switch (c) {
|
|
116
|
-
case "top":
|
|
117
|
-
f = {
|
|
118
|
-
x: a,
|
|
119
|
-
y: o.y - i.height
|
|
120
|
-
};
|
|
121
|
-
break;
|
|
122
|
-
case "bottom":
|
|
123
|
-
f = {
|
|
124
|
-
x: a,
|
|
125
|
-
y: o.y + o.height
|
|
126
|
-
};
|
|
127
|
-
break;
|
|
128
|
-
case "right":
|
|
129
|
-
f = {
|
|
130
|
-
x: o.x + o.width,
|
|
131
|
-
y: m
|
|
132
|
-
};
|
|
133
|
-
break;
|
|
134
|
-
case "left":
|
|
135
|
-
f = {
|
|
136
|
-
x: o.x - i.width,
|
|
137
|
-
y: m
|
|
138
|
-
};
|
|
139
|
-
break;
|
|
140
|
-
default:
|
|
141
|
-
f = {
|
|
142
|
-
x: o.x,
|
|
143
|
-
y: o.y
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
switch (J(e)) {
|
|
147
|
-
case "start":
|
|
148
|
-
f[s] -= h * (n && u ? -1 : 1);
|
|
149
|
-
break;
|
|
150
|
-
case "end":
|
|
151
|
-
f[s] += h * (n && u ? -1 : 1);
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
return f;
|
|
155
|
-
}
|
|
156
|
-
var Jt = async (t, e, n) => {
|
|
157
|
-
const { placement: o = "bottom", strategy: i = "absolute", middleware: r = [], platform: s } = n, l = r.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
158
|
-
let u = await s.getElementRects({
|
|
159
|
-
reference: t,
|
|
160
|
-
floating: e,
|
|
161
|
-
strategy: i
|
|
162
|
-
}), { x: a, y: m } = xt(u, o, c), h = o, f = {}, d = 0;
|
|
163
|
-
for (let g = 0; g < l.length; g++) {
|
|
164
|
-
const { name: w, fn: y } = l[g], { x: b, y: p, data: x, reset: v } = await y({
|
|
165
|
-
x: a,
|
|
166
|
-
y: m,
|
|
167
|
-
initialPlacement: o,
|
|
168
|
-
placement: h,
|
|
169
|
-
strategy: i,
|
|
170
|
-
middlewareData: f,
|
|
171
|
-
rects: u,
|
|
172
|
-
platform: s,
|
|
173
|
-
elements: {
|
|
174
|
-
reference: t,
|
|
175
|
-
floating: e
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
a = b ?? a, m = p ?? m, f = {
|
|
179
|
-
...f,
|
|
180
|
-
[w]: {
|
|
181
|
-
...f[w],
|
|
182
|
-
...x
|
|
183
|
-
}
|
|
184
|
-
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (u = v.rects === !0 ? await s.getElementRects({
|
|
185
|
-
reference: t,
|
|
186
|
-
floating: e,
|
|
187
|
-
strategy: i
|
|
188
|
-
}) : v.rects), { x: a, y: m } = xt(u, h, c)), g = -1);
|
|
189
|
-
}
|
|
190
|
-
return {
|
|
191
|
-
x: a,
|
|
192
|
-
y: m,
|
|
193
|
-
placement: h,
|
|
194
|
-
strategy: i,
|
|
195
|
-
middlewareData: f
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
async function rt(t, e) {
|
|
199
|
-
var n;
|
|
200
|
-
e === void 0 && (e = {});
|
|
201
|
-
const { x: o, y: i, platform: r, rects: s, elements: l, strategy: c } = t, { boundary: u = "clippingAncestors", rootBoundary: a = "viewport", elementContext: m = "floating", altBoundary: h = !1, padding: f = 0 } = K(e, t), d = Pt(f), g = l[h ? m === "floating" ? "reference" : "floating" : m], w = it(await r.getClippingRect({
|
|
202
|
-
element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
203
|
-
boundary: u,
|
|
204
|
-
rootBoundary: a,
|
|
205
|
-
strategy: c
|
|
206
|
-
})), y = m === "floating" ? {
|
|
207
|
-
x: o,
|
|
208
|
-
y: i,
|
|
209
|
-
width: s.floating.width,
|
|
210
|
-
height: s.floating.height
|
|
211
|
-
} : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), p = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
212
|
-
x: 1,
|
|
213
|
-
y: 1
|
|
214
|
-
} : {
|
|
215
|
-
x: 1,
|
|
216
|
-
y: 1
|
|
217
|
-
}, x = it(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
218
|
-
elements: l,
|
|
219
|
-
rect: y,
|
|
220
|
-
offsetParent: b,
|
|
221
|
-
strategy: c
|
|
222
|
-
}) : y);
|
|
223
|
-
return {
|
|
224
|
-
top: (w.top - x.top + d.top) / p.y,
|
|
225
|
-
bottom: (x.bottom - w.bottom + d.bottom) / p.y,
|
|
226
|
-
left: (w.left - x.left + d.left) / p.x,
|
|
227
|
-
right: (x.right - w.right + d.right) / p.x
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
var Qt = (t) => ({
|
|
231
|
-
name: "arrow",
|
|
232
|
-
options: t,
|
|
233
|
-
async fn(e) {
|
|
234
|
-
const { x: n, y: o, placement: i, rects: r, platform: s, elements: l, middlewareData: c } = e, { element: u, padding: a = 0 } = K(t, e) || {};
|
|
235
|
-
if (u == null) return {};
|
|
236
|
-
const m = Pt(a), h = {
|
|
237
|
-
x: n,
|
|
238
|
-
y: o
|
|
239
|
-
}, f = ht(i), d = mt(f), g = await s.getDimensions(u), w = f === "y", y = w ? "top" : "left", b = w ? "bottom" : "right", p = w ? "clientHeight" : "clientWidth", x = r.reference[d] + r.reference[f] - h[f] - r.floating[d], v = h[f] - r.reference[f], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
240
|
-
let S = A ? A[p] : 0;
|
|
241
|
-
(!S || !await (s.isElement == null ? void 0 : s.isElement(A))) && (S = l.floating[p] || r.floating[d]);
|
|
242
|
-
const E = x / 2 - v / 2, L = S / 2 - g[d] / 2 - 1, R = I(m[y], L), H = I(m[b], L), F = R, N = S - g[d] - H, O = S / 2 - g[d] / 2 + E, Y = _t(F, O, N), $ = !c.arrow && J(i) != null && O !== Y && r.reference[d] / 2 - (O < F ? R : H) - g[d] / 2 < 0, C = $ ? O < F ? O - F : O - N : 0;
|
|
243
|
-
return {
|
|
244
|
-
[f]: h[f] + C,
|
|
245
|
-
data: {
|
|
246
|
-
[f]: Y,
|
|
247
|
-
centerOffset: O - Y - C,
|
|
248
|
-
...$ && { alignmentOffset: C }
|
|
249
|
-
},
|
|
250
|
-
reset: $
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
}), Zt = function(t) {
|
|
254
|
-
return t === void 0 && (t = {}), {
|
|
255
|
-
name: "flip",
|
|
256
|
-
options: t,
|
|
257
|
-
async fn(e) {
|
|
258
|
-
var n, o;
|
|
259
|
-
const { placement: i, middlewareData: r, rects: s, initialPlacement: l, platform: c, elements: u } = e, { mainAxis: a = !0, crossAxis: m = !0, fallbackPlacements: h, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: d = "none", flipAlignment: g = !0, ...w } = K(t, e);
|
|
260
|
-
if ((n = r.arrow) != null && n.alignmentOffset) return {};
|
|
261
|
-
const y = j(i), b = z(l), p = j(l) === l, x = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), v = h || (p || !g ? [ot(l)] : Yt(l)), A = d !== "none";
|
|
262
|
-
!h && A && v.push(...Gt(l, g, d, x));
|
|
263
|
-
const S = [l, ...v], E = await rt(e, w), L = [];
|
|
264
|
-
let R = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
265
|
-
if (a && L.push(E[y]), m) {
|
|
266
|
-
const O = Xt(i, s, x);
|
|
267
|
-
L.push(E[O[0]], E[O[1]]);
|
|
268
|
-
}
|
|
269
|
-
if (R = [...R, {
|
|
270
|
-
placement: i,
|
|
271
|
-
overflows: L
|
|
272
|
-
}], !L.every((O) => O <= 0)) {
|
|
273
|
-
var H, F;
|
|
274
|
-
const O = (((H = r.flip) == null ? void 0 : H.index) || 0) + 1, Y = S[O];
|
|
275
|
-
if (Y && (!(m === "alignment" && b !== z(Y)) || R.every((C) => z(C.placement) === b ? C.overflows[0] > 0 : !0)))
|
|
276
|
-
return {
|
|
277
|
-
data: {
|
|
278
|
-
index: O,
|
|
279
|
-
overflows: R
|
|
280
|
-
},
|
|
281
|
-
reset: { placement: Y }
|
|
282
|
-
};
|
|
283
|
-
let $ = (F = R.filter((C) => C.overflows[0] <= 0).sort((C, V) => C.overflows[1] - V.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
284
|
-
if (!$) switch (f) {
|
|
285
|
-
case "bestFit": {
|
|
286
|
-
var N;
|
|
287
|
-
const C = (N = R.filter((V) => {
|
|
288
|
-
if (A) {
|
|
289
|
-
const _ = z(V.placement);
|
|
290
|
-
return _ === b || _ === "y";
|
|
291
|
-
}
|
|
292
|
-
return !0;
|
|
293
|
-
}).map((V) => [V.placement, V.overflows.filter((_) => _ > 0).reduce((_, $t) => _ + $t, 0)]).sort((V, _) => V[1] - _[1])[0]) == null ? void 0 : N[0];
|
|
294
|
-
C && ($ = C);
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
case "initialPlacement":
|
|
298
|
-
$ = l;
|
|
299
|
-
break;
|
|
300
|
-
}
|
|
301
|
-
if (i !== $) return { reset: { placement: $ } };
|
|
302
|
-
}
|
|
303
|
-
return {};
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
function vt(t, e) {
|
|
308
|
-
return {
|
|
309
|
-
top: t.top - e.height,
|
|
310
|
-
right: t.right - e.width,
|
|
311
|
-
bottom: t.bottom - e.height,
|
|
312
|
-
left: t.left - e.width
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
function At(t) {
|
|
316
|
-
return Ht.some((e) => t[e] >= 0);
|
|
317
|
-
}
|
|
318
|
-
var te = function(t) {
|
|
319
|
-
return t === void 0 && (t = {}), {
|
|
320
|
-
name: "hide",
|
|
321
|
-
options: t,
|
|
322
|
-
async fn(e) {
|
|
323
|
-
const { rects: n } = e, { strategy: o = "referenceHidden", ...i } = K(t, e);
|
|
324
|
-
switch (o) {
|
|
325
|
-
case "referenceHidden": {
|
|
326
|
-
const r = vt(await rt(e, {
|
|
327
|
-
...i,
|
|
328
|
-
elementContext: "reference"
|
|
329
|
-
}), n.reference);
|
|
330
|
-
return { data: {
|
|
331
|
-
referenceHiddenOffsets: r,
|
|
332
|
-
referenceHidden: At(r)
|
|
333
|
-
} };
|
|
334
|
-
}
|
|
335
|
-
case "escaped": {
|
|
336
|
-
const r = vt(await rt(e, {
|
|
337
|
-
...i,
|
|
338
|
-
altBoundary: !0
|
|
339
|
-
}), n.floating);
|
|
340
|
-
return { data: {
|
|
341
|
-
escapedOffsets: r,
|
|
342
|
-
escaped: At(r)
|
|
343
|
-
} };
|
|
344
|
-
}
|
|
345
|
-
default:
|
|
346
|
-
return {};
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
}, ee = /* @__PURE__ */ new Set(["left", "top"]);
|
|
351
|
-
async function ne(t, e) {
|
|
352
|
-
const { placement: n, platform: o, elements: i } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = j(n), l = J(n), c = z(n) === "y", u = ee.has(s) ? -1 : 1, a = r && c ? -1 : 1, m = K(e, t);
|
|
353
|
-
let { mainAxis: h, crossAxis: f, alignmentAxis: d } = typeof m == "number" ? {
|
|
354
|
-
mainAxis: m,
|
|
355
|
-
crossAxis: 0,
|
|
356
|
-
alignmentAxis: null
|
|
357
|
-
} : {
|
|
358
|
-
mainAxis: m.mainAxis || 0,
|
|
359
|
-
crossAxis: m.crossAxis || 0,
|
|
360
|
-
alignmentAxis: m.alignmentAxis
|
|
361
|
-
};
|
|
362
|
-
return l && typeof d == "number" && (f = l === "end" ? d * -1 : d), c ? {
|
|
363
|
-
x: f * a,
|
|
364
|
-
y: h * u
|
|
365
|
-
} : {
|
|
366
|
-
x: h * u,
|
|
367
|
-
y: f * a
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
var oe = function(t) {
|
|
371
|
-
return t === void 0 && (t = 0), {
|
|
372
|
-
name: "offset",
|
|
373
|
-
options: t,
|
|
374
|
-
async fn(e) {
|
|
375
|
-
var n, o;
|
|
376
|
-
const { x: i, y: r, placement: s, middlewareData: l } = e, c = await ne(e, t);
|
|
377
|
-
return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
378
|
-
x: i + c.x,
|
|
379
|
-
y: r + c.y,
|
|
380
|
-
data: {
|
|
381
|
-
...c,
|
|
382
|
-
placement: s
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
}, ie = function(t) {
|
|
388
|
-
return t === void 0 && (t = {}), {
|
|
389
|
-
name: "size",
|
|
390
|
-
options: t,
|
|
391
|
-
async fn(e) {
|
|
392
|
-
var n, o;
|
|
393
|
-
const { placement: i, rects: r, platform: s, elements: l } = e, { apply: c = () => {
|
|
394
|
-
}, ...u } = K(t, e), a = await rt(e, u), m = j(i), h = J(i), f = z(i) === "y", { width: d, height: g } = r.floating;
|
|
395
|
-
let w, y;
|
|
396
|
-
m === "top" || m === "bottom" ? (w = m, y = h === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = m, w = h === "end" ? "top" : "bottom");
|
|
397
|
-
const b = g - a.top - a.bottom, p = d - a.left - a.right, x = I(g - a[w], b), v = I(d - a[y], p), A = !e.middlewareData.shift;
|
|
398
|
-
let S = x, E = v;
|
|
399
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (E = p), (o = e.middlewareData.shift) != null && o.enabled.y && (S = b), A && !h) {
|
|
400
|
-
const R = P(a.left, 0), H = P(a.right, 0), F = P(a.top, 0), N = P(a.bottom, 0);
|
|
401
|
-
f ? E = d - 2 * (R !== 0 || H !== 0 ? R + H : P(a.left, a.right)) : S = g - 2 * (F !== 0 || N !== 0 ? F + N : P(a.top, a.bottom));
|
|
402
|
-
}
|
|
403
|
-
await c({
|
|
404
|
-
...e,
|
|
405
|
-
availableWidth: E,
|
|
406
|
-
availableHeight: S
|
|
407
|
-
});
|
|
408
|
-
const L = await s.getDimensions(l.floating);
|
|
409
|
-
return d !== L.width || g !== L.height ? { reset: { rects: !0 } } : {};
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
};
|
|
413
|
-
function st() {
|
|
414
|
-
return typeof window < "u";
|
|
415
|
-
}
|
|
416
|
-
function Q(t) {
|
|
417
|
-
return Tt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
418
|
-
}
|
|
419
|
-
function T(t) {
|
|
420
|
-
var e;
|
|
421
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
422
|
-
}
|
|
423
|
-
function B(t) {
|
|
424
|
-
var e;
|
|
425
|
-
return (e = (Tt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
426
|
-
}
|
|
427
|
-
function Tt(t) {
|
|
428
|
-
return st() ? t instanceof Node || t instanceof T(t).Node : !1;
|
|
429
|
-
}
|
|
430
|
-
function D(t) {
|
|
431
|
-
return st() ? t instanceof Element || t instanceof T(t).Element : !1;
|
|
432
|
-
}
|
|
433
|
-
function M(t) {
|
|
434
|
-
return st() ? t instanceof HTMLElement || t instanceof T(t).HTMLElement : !1;
|
|
435
|
-
}
|
|
436
|
-
function Ot(t) {
|
|
437
|
-
return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof T(t).ShadowRoot;
|
|
438
|
-
}
|
|
439
|
-
var re = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
440
|
-
function tt(t) {
|
|
441
|
-
const { overflow: e, overflowX: n, overflowY: o, display: i } = k(t);
|
|
442
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !re.has(i);
|
|
443
|
-
}
|
|
444
|
-
var se = /* @__PURE__ */ new Set([
|
|
445
|
-
"table",
|
|
446
|
-
"td",
|
|
447
|
-
"th"
|
|
448
|
-
]);
|
|
449
|
-
function le(t) {
|
|
450
|
-
return se.has(Q(t));
|
|
451
|
-
}
|
|
452
|
-
var ce = [":popover-open", ":modal"];
|
|
453
|
-
function lt(t) {
|
|
454
|
-
return ce.some((e) => {
|
|
455
|
-
try {
|
|
456
|
-
return t.matches(e);
|
|
457
|
-
} catch {
|
|
458
|
-
return !1;
|
|
459
|
-
}
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
var ae = [
|
|
463
|
-
"transform",
|
|
464
|
-
"translate",
|
|
465
|
-
"scale",
|
|
466
|
-
"rotate",
|
|
467
|
-
"perspective"
|
|
468
|
-
], fe = [
|
|
469
|
-
"transform",
|
|
470
|
-
"translate",
|
|
471
|
-
"scale",
|
|
472
|
-
"rotate",
|
|
473
|
-
"perspective",
|
|
474
|
-
"filter"
|
|
475
|
-
], ue = [
|
|
476
|
-
"paint",
|
|
477
|
-
"layout",
|
|
478
|
-
"strict",
|
|
479
|
-
"content"
|
|
480
|
-
];
|
|
481
|
-
function gt(t) {
|
|
482
|
-
const e = pt(), n = D(t) ? k(t) : t;
|
|
483
|
-
return ae.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || fe.some((o) => (n.willChange || "").includes(o)) || ue.some((o) => (n.contain || "").includes(o));
|
|
484
|
-
}
|
|
485
|
-
function de(t) {
|
|
486
|
-
let e = X(t);
|
|
487
|
-
for (; M(e) && !G(e); ) {
|
|
488
|
-
if (gt(e)) return e;
|
|
489
|
-
if (lt(e)) return null;
|
|
490
|
-
e = X(e);
|
|
491
|
-
}
|
|
492
|
-
return null;
|
|
493
|
-
}
|
|
494
|
-
function pt() {
|
|
495
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
496
|
-
}
|
|
497
|
-
var me = /* @__PURE__ */ new Set([
|
|
498
|
-
"html",
|
|
499
|
-
"body",
|
|
500
|
-
"#document"
|
|
501
|
-
]);
|
|
502
|
-
function G(t) {
|
|
503
|
-
return me.has(Q(t));
|
|
504
|
-
}
|
|
505
|
-
function k(t) {
|
|
506
|
-
return T(t).getComputedStyle(t);
|
|
507
|
-
}
|
|
508
|
-
function ct(t) {
|
|
509
|
-
return D(t) ? {
|
|
510
|
-
scrollLeft: t.scrollLeft,
|
|
511
|
-
scrollTop: t.scrollTop
|
|
512
|
-
} : {
|
|
513
|
-
scrollLeft: t.scrollX,
|
|
514
|
-
scrollTop: t.scrollY
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
function X(t) {
|
|
518
|
-
if (Q(t) === "html") return t;
|
|
519
|
-
const e = t.assignedSlot || t.parentNode || Ot(t) && t.host || B(t);
|
|
520
|
-
return Ot(e) ? e.host : e;
|
|
521
|
-
}
|
|
522
|
-
function Et(t) {
|
|
523
|
-
const e = X(t);
|
|
524
|
-
return G(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : M(e) && tt(e) ? e : Et(e);
|
|
525
|
-
}
|
|
526
|
-
function Z(t, e, n) {
|
|
527
|
-
var o;
|
|
528
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
529
|
-
const i = Et(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = T(i);
|
|
530
|
-
if (r) {
|
|
531
|
-
const l = dt(s);
|
|
532
|
-
return e.concat(s, s.visualViewport || [], tt(i) ? i : [], l && n ? Z(l) : []);
|
|
533
|
-
}
|
|
534
|
-
return e.concat(i, Z(i, [], n));
|
|
535
|
-
}
|
|
536
|
-
function dt(t) {
|
|
537
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
538
|
-
}
|
|
539
|
-
function Dt(t) {
|
|
540
|
-
const e = k(t);
|
|
541
|
-
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
542
|
-
const i = M(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = nt(n) !== r || nt(o) !== s;
|
|
543
|
-
return l && (n = r, o = s), {
|
|
544
|
-
width: n,
|
|
545
|
-
height: o,
|
|
546
|
-
$: l
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
function wt(t) {
|
|
550
|
-
return D(t) ? t : t.contextElement;
|
|
551
|
-
}
|
|
552
|
-
function q(t) {
|
|
553
|
-
const e = wt(t);
|
|
554
|
-
if (!M(e)) return W(1);
|
|
555
|
-
const n = e.getBoundingClientRect(), { width: o, height: i, $: r } = Dt(e);
|
|
556
|
-
let s = (r ? nt(n.width) : n.width) / o, l = (r ? nt(n.height) : n.height) / i;
|
|
557
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
558
|
-
x: s,
|
|
559
|
-
y: l
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
var he = /* @__PURE__ */ W(0);
|
|
563
|
-
function kt(t) {
|
|
564
|
-
const e = T(t);
|
|
565
|
-
return !pt() || !e.visualViewport ? he : {
|
|
566
|
-
x: e.visualViewport.offsetLeft,
|
|
567
|
-
y: e.visualViewport.offsetTop
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
function ge(t, e, n) {
|
|
571
|
-
return e === void 0 && (e = !1), !n || e && n !== T(t) ? !1 : e;
|
|
572
|
-
}
|
|
573
|
-
function U(t, e, n, o) {
|
|
574
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
575
|
-
const i = t.getBoundingClientRect(), r = wt(t);
|
|
576
|
-
let s = W(1);
|
|
577
|
-
e && (o ? D(o) && (s = q(o)) : s = q(t));
|
|
578
|
-
const l = ge(r, n, o) ? kt(r) : W(0);
|
|
579
|
-
let c = (i.left + l.x) / s.x, u = (i.top + l.y) / s.y, a = i.width / s.x, m = i.height / s.y;
|
|
580
|
-
if (r) {
|
|
581
|
-
const h = T(r), f = o && D(o) ? T(o) : o;
|
|
582
|
-
let d = h, g = dt(d);
|
|
583
|
-
for (; g && o && f !== d; ) {
|
|
584
|
-
const w = q(g), y = g.getBoundingClientRect(), b = k(g), p = y.left + (g.clientLeft + parseFloat(b.paddingLeft)) * w.x, x = y.top + (g.clientTop + parseFloat(b.paddingTop)) * w.y;
|
|
585
|
-
c *= w.x, u *= w.y, a *= w.x, m *= w.y, c += p, u += x, d = T(g), g = dt(d);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return it({
|
|
589
|
-
width: a,
|
|
590
|
-
height: m,
|
|
591
|
-
x: c,
|
|
592
|
-
y: u
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
function at(t, e) {
|
|
596
|
-
const n = ct(t).scrollLeft;
|
|
597
|
-
return e ? e.left + n : U(B(t)).left + n;
|
|
598
|
-
}
|
|
599
|
-
function Ft(t, e) {
|
|
600
|
-
const n = t.getBoundingClientRect();
|
|
601
|
-
return {
|
|
602
|
-
x: n.left + e.scrollLeft - at(t, n),
|
|
603
|
-
y: n.top + e.scrollTop
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
function pe(t) {
|
|
607
|
-
let { elements: e, rect: n, offsetParent: o, strategy: i } = t;
|
|
608
|
-
const r = i === "fixed", s = B(o), l = e ? lt(e.floating) : !1;
|
|
609
|
-
if (o === s || l && r) return n;
|
|
610
|
-
let c = {
|
|
611
|
-
scrollLeft: 0,
|
|
612
|
-
scrollTop: 0
|
|
613
|
-
}, u = W(1);
|
|
614
|
-
const a = W(0), m = M(o);
|
|
615
|
-
if ((m || !m && !r) && ((Q(o) !== "body" || tt(s)) && (c = ct(o)), M(o))) {
|
|
616
|
-
const f = U(o);
|
|
617
|
-
u = q(o), a.x = f.x + o.clientLeft, a.y = f.y + o.clientTop;
|
|
618
|
-
}
|
|
619
|
-
const h = s && !m && !r ? Ft(s, c) : W(0);
|
|
620
|
-
return {
|
|
621
|
-
width: n.width * u.x,
|
|
622
|
-
height: n.height * u.y,
|
|
623
|
-
x: n.x * u.x - c.scrollLeft * u.x + a.x + h.x,
|
|
624
|
-
y: n.y * u.y - c.scrollTop * u.y + a.y + h.y
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
function we(t) {
|
|
628
|
-
return Array.from(t.getClientRects());
|
|
629
|
-
}
|
|
630
|
-
function ye(t) {
|
|
631
|
-
const e = B(t), n = ct(t), o = t.ownerDocument.body, i = P(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = P(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
632
|
-
let s = -n.scrollLeft + at(t);
|
|
633
|
-
const l = -n.scrollTop;
|
|
634
|
-
return k(o).direction === "rtl" && (s += P(e.clientWidth, o.clientWidth) - i), {
|
|
635
|
-
width: i,
|
|
636
|
-
height: r,
|
|
637
|
-
x: s,
|
|
638
|
-
y: l
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
var Rt = 25;
|
|
642
|
-
function be(t, e) {
|
|
643
|
-
const n = T(t), o = B(t), i = n.visualViewport;
|
|
644
|
-
let r = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
|
|
645
|
-
if (i) {
|
|
646
|
-
r = i.width, s = i.height;
|
|
647
|
-
const a = pt();
|
|
648
|
-
(!a || a && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
|
|
649
|
-
}
|
|
650
|
-
const u = at(o);
|
|
651
|
-
if (u <= 0) {
|
|
652
|
-
const a = o.ownerDocument, m = a.body, h = getComputedStyle(m), f = a.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, d = Math.abs(o.clientWidth - m.clientWidth - f);
|
|
653
|
-
d <= Rt && (r -= d);
|
|
654
|
-
} else u <= Rt && (r += u);
|
|
655
|
-
return {
|
|
656
|
-
width: r,
|
|
657
|
-
height: s,
|
|
658
|
-
x: l,
|
|
659
|
-
y: c
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
var xe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
663
|
-
function ve(t, e) {
|
|
664
|
-
const n = U(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = M(t) ? q(t) : W(1);
|
|
665
|
-
return {
|
|
666
|
-
width: t.clientWidth * r.x,
|
|
667
|
-
height: t.clientHeight * r.y,
|
|
668
|
-
x: i * r.x,
|
|
669
|
-
y: o * r.y
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
function St(t, e, n) {
|
|
673
|
-
let o;
|
|
674
|
-
if (e === "viewport") o = be(t, n);
|
|
675
|
-
else if (e === "document") o = ye(B(t));
|
|
676
|
-
else if (D(e)) o = ve(e, n);
|
|
677
|
-
else {
|
|
678
|
-
const i = kt(t);
|
|
679
|
-
o = {
|
|
680
|
-
x: e.x - i.x,
|
|
681
|
-
y: e.y - i.y,
|
|
682
|
-
width: e.width,
|
|
683
|
-
height: e.height
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
return it(o);
|
|
687
|
-
}
|
|
688
|
-
function Wt(t, e) {
|
|
689
|
-
const n = X(t);
|
|
690
|
-
return n === e || !D(n) || G(n) ? !1 : k(n).position === "fixed" || Wt(n, e);
|
|
691
|
-
}
|
|
692
|
-
function Ae(t, e) {
|
|
693
|
-
const n = e.get(t);
|
|
694
|
-
if (n) return n;
|
|
695
|
-
let o = Z(t, [], !1).filter((l) => D(l) && Q(l) !== "body"), i = null;
|
|
696
|
-
const r = k(t).position === "fixed";
|
|
697
|
-
let s = r ? X(t) : t;
|
|
698
|
-
for (; D(s) && !G(s); ) {
|
|
699
|
-
const l = k(s), c = gt(s);
|
|
700
|
-
!c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && i && xe.has(i.position) || tt(s) && !c && Wt(t, s)) ? o = o.filter((u) => u !== s) : i = l, s = X(s);
|
|
701
|
-
}
|
|
702
|
-
return e.set(t, o), o;
|
|
703
|
-
}
|
|
704
|
-
function Oe(t) {
|
|
705
|
-
let { element: e, boundary: n, rootBoundary: o, strategy: i } = t;
|
|
706
|
-
const r = [...n === "clippingAncestors" ? lt(e) ? [] : Ae(e, this._c) : [].concat(n), o], s = r[0], l = r.reduce((c, u) => {
|
|
707
|
-
const a = St(e, u, i);
|
|
708
|
-
return c.top = P(a.top, c.top), c.right = I(a.right, c.right), c.bottom = I(a.bottom, c.bottom), c.left = P(a.left, c.left), c;
|
|
709
|
-
}, St(e, s, i));
|
|
710
|
-
return {
|
|
711
|
-
width: l.right - l.left,
|
|
712
|
-
height: l.bottom - l.top,
|
|
713
|
-
x: l.left,
|
|
714
|
-
y: l.top
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function Re(t) {
|
|
718
|
-
const { width: e, height: n } = Dt(t);
|
|
719
|
-
return {
|
|
720
|
-
width: e,
|
|
721
|
-
height: n
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
function Se(t, e, n) {
|
|
725
|
-
const o = M(e), i = B(e), r = n === "fixed", s = U(t, !0, r, e);
|
|
726
|
-
let l = {
|
|
727
|
-
scrollLeft: 0,
|
|
728
|
-
scrollTop: 0
|
|
729
|
-
};
|
|
730
|
-
const c = W(0);
|
|
731
|
-
function u() {
|
|
732
|
-
c.x = at(i);
|
|
733
|
-
}
|
|
734
|
-
if (o || !o && !r)
|
|
735
|
-
if ((Q(e) !== "body" || tt(i)) && (l = ct(e)), o) {
|
|
736
|
-
const m = U(e, !0, r, e);
|
|
737
|
-
c.x = m.x + e.clientLeft, c.y = m.y + e.clientTop;
|
|
738
|
-
} else i && u();
|
|
739
|
-
r && !o && i && u();
|
|
740
|
-
const a = i && !o && !r ? Ft(i, l) : W(0);
|
|
741
|
-
return {
|
|
742
|
-
x: s.left + l.scrollLeft - c.x - a.x,
|
|
743
|
-
y: s.top + l.scrollTop - c.y - a.y,
|
|
744
|
-
width: s.width,
|
|
745
|
-
height: s.height
|
|
746
|
-
};
|
|
747
|
-
}
|
|
748
|
-
function ft(t) {
|
|
749
|
-
return k(t).position === "static";
|
|
750
|
-
}
|
|
751
|
-
function Lt(t, e) {
|
|
752
|
-
if (!M(t) || k(t).position === "fixed") return null;
|
|
753
|
-
if (e) return e(t);
|
|
754
|
-
let n = t.offsetParent;
|
|
755
|
-
return B(t) === n && (n = n.ownerDocument.body), n;
|
|
756
|
-
}
|
|
757
|
-
function Mt(t, e) {
|
|
758
|
-
const n = T(t);
|
|
759
|
-
if (lt(t)) return n;
|
|
760
|
-
if (!M(t)) {
|
|
761
|
-
let i = X(t);
|
|
762
|
-
for (; i && !G(i); ) {
|
|
763
|
-
if (D(i) && !ft(i)) return i;
|
|
764
|
-
i = X(i);
|
|
765
|
-
}
|
|
766
|
-
return n;
|
|
767
|
-
}
|
|
768
|
-
let o = Lt(t, e);
|
|
769
|
-
for (; o && le(o) && ft(o); ) o = Lt(o, e);
|
|
770
|
-
return o && G(o) && ft(o) && !gt(o) ? n : o || de(t) || n;
|
|
771
|
-
}
|
|
772
|
-
var Le = async function(t) {
|
|
773
|
-
const e = this.getOffsetParent || Mt, n = this.getDimensions, o = await n(t.floating);
|
|
774
|
-
return {
|
|
775
|
-
reference: Se(t.reference, await e(t.floating), t.strategy),
|
|
776
|
-
floating: {
|
|
777
|
-
x: 0,
|
|
778
|
-
y: 0,
|
|
779
|
-
width: o.width,
|
|
780
|
-
height: o.height
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
};
|
|
784
|
-
function Ce(t) {
|
|
785
|
-
return k(t).direction === "rtl";
|
|
786
|
-
}
|
|
787
|
-
var Pe = {
|
|
788
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: pe,
|
|
789
|
-
getDocumentElement: B,
|
|
790
|
-
getClippingRect: Oe,
|
|
791
|
-
getOffsetParent: Mt,
|
|
792
|
-
getElementRects: Le,
|
|
793
|
-
getClientRects: we,
|
|
794
|
-
getDimensions: Re,
|
|
795
|
-
getScale: q,
|
|
796
|
-
isElement: D,
|
|
797
|
-
isRTL: Ce
|
|
798
|
-
};
|
|
799
|
-
function Bt(t, e) {
|
|
800
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
801
|
-
}
|
|
802
|
-
function Te(t, e) {
|
|
803
|
-
let n = null, o;
|
|
804
|
-
const i = B(t);
|
|
805
|
-
function r() {
|
|
806
|
-
var l;
|
|
807
|
-
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
808
|
-
}
|
|
809
|
-
function s(l, c) {
|
|
810
|
-
l === void 0 && (l = !1), c === void 0 && (c = 1), r();
|
|
811
|
-
const u = t.getBoundingClientRect(), { left: a, top: m, width: h, height: f } = u;
|
|
812
|
-
if (l || e(), !h || !f) return;
|
|
813
|
-
const d = et(m), g = et(i.clientWidth - (a + h)), w = et(i.clientHeight - (m + f)), y = et(a), b = {
|
|
814
|
-
rootMargin: -d + "px " + -g + "px " + -w + "px " + -y + "px",
|
|
815
|
-
threshold: P(0, I(1, c)) || 1
|
|
816
|
-
};
|
|
817
|
-
let p = !0;
|
|
818
|
-
function x(v) {
|
|
819
|
-
const A = v[0].intersectionRatio;
|
|
820
|
-
if (A !== c) {
|
|
821
|
-
if (!p) return s();
|
|
822
|
-
A ? s(!1, A) : o = setTimeout(() => {
|
|
823
|
-
s(!1, 1e-7);
|
|
824
|
-
}, 1e3);
|
|
825
|
-
}
|
|
826
|
-
A === 1 && !Bt(u, t.getBoundingClientRect()) && s(), p = !1;
|
|
827
|
-
}
|
|
828
|
-
try {
|
|
829
|
-
n = new IntersectionObserver(x, {
|
|
830
|
-
...b,
|
|
831
|
-
root: i.ownerDocument
|
|
832
|
-
});
|
|
833
|
-
} catch {
|
|
834
|
-
n = new IntersectionObserver(x, b);
|
|
835
|
-
}
|
|
836
|
-
n.observe(t);
|
|
837
|
-
}
|
|
838
|
-
return s(!0), r;
|
|
839
|
-
}
|
|
840
|
-
function Ee(t, e, n, o) {
|
|
841
|
-
o === void 0 && (o = {});
|
|
842
|
-
const { ancestorScroll: i = !0, ancestorResize: r = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: l = typeof IntersectionObserver == "function", animationFrame: c = !1 } = o, u = wt(t), a = i || r ? [...u ? Z(u) : [], ...Z(e)] : [];
|
|
843
|
-
a.forEach((y) => {
|
|
844
|
-
i && y.addEventListener("scroll", n, { passive: !0 }), r && y.addEventListener("resize", n);
|
|
845
|
-
});
|
|
846
|
-
const m = u && l ? Te(u, n) : null;
|
|
847
|
-
let h = -1, f = null;
|
|
848
|
-
s && (f = new ResizeObserver((y) => {
|
|
849
|
-
let [b] = y;
|
|
850
|
-
b && b.target === u && f && (f.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
851
|
-
var p;
|
|
852
|
-
(p = f) == null || p.observe(e);
|
|
853
|
-
})), n();
|
|
854
|
-
}), u && !c && f.observe(u), f.observe(e));
|
|
855
|
-
let d, g = c ? U(t) : null;
|
|
856
|
-
c && w();
|
|
857
|
-
function w() {
|
|
858
|
-
const y = U(t);
|
|
859
|
-
g && !Bt(g, y) && n(), g = y, d = requestAnimationFrame(w);
|
|
860
|
-
}
|
|
861
|
-
return n(), () => {
|
|
862
|
-
var y;
|
|
863
|
-
a.forEach((b) => {
|
|
864
|
-
i && b.removeEventListener("scroll", n), r && b.removeEventListener("resize", n);
|
|
865
|
-
}), m?.(), (y = f) == null || y.disconnect(), f = null, c && cancelAnimationFrame(d);
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
var De = oe, ke = Zt, Ct = ie, Fe = te, We = Qt, Me = (t, e, n) => {
|
|
869
|
-
const o = /* @__PURE__ */ new Map(), i = {
|
|
870
|
-
platform: Pe,
|
|
871
|
-
...n
|
|
872
|
-
}, r = {
|
|
873
|
-
...i.platform,
|
|
874
|
-
_c: o
|
|
875
|
-
};
|
|
876
|
-
return Jt(t, e, {
|
|
877
|
-
...i,
|
|
878
|
-
platform: r
|
|
879
|
-
});
|
|
880
|
-
}, Be = class {
|
|
881
|
-
constructor(t) {
|
|
882
|
-
this.updatePlacement = () => {
|
|
883
|
-
this.computePlacement();
|
|
884
|
-
}, this.host = t, t.addController(this);
|
|
885
|
-
}
|
|
886
|
-
async setPlacement(t = this.options) {
|
|
887
|
-
this.options = t;
|
|
888
|
-
const { trigger: e, target: n } = t;
|
|
889
|
-
this.cleanup = Ee(e, n, this.updatePlacement);
|
|
890
|
-
}
|
|
891
|
-
async computePlacement() {
|
|
892
|
-
const { arrowElement: t, alignment: e, caret: n, trigger: o, target: i, styleElement: r, matchWidth: s, open: l, alignmentAxisOffset: c, autoAlignBoundary: u, isTabTip: a } = this.options, m = i?.role === "listbox", h = i?.localName === "cds-menu", f = r ?? i;
|
|
893
|
-
if (!f) return;
|
|
894
|
-
let d;
|
|
895
|
-
switch (e) {
|
|
896
|
-
case "top-left":
|
|
897
|
-
d = "top-start";
|
|
898
|
-
break;
|
|
899
|
-
case "top-right":
|
|
900
|
-
d = "top-end";
|
|
901
|
-
break;
|
|
902
|
-
case "bottom-left":
|
|
903
|
-
d = "bottom-start";
|
|
904
|
-
break;
|
|
905
|
-
case "bottom-right":
|
|
906
|
-
d = "bottom-end";
|
|
907
|
-
break;
|
|
908
|
-
case "left-bottom":
|
|
909
|
-
d = "left-end";
|
|
910
|
-
break;
|
|
911
|
-
case "left-top":
|
|
912
|
-
d = "left-start";
|
|
913
|
-
break;
|
|
914
|
-
case "right-bottom":
|
|
915
|
-
d = "right-end";
|
|
916
|
-
break;
|
|
917
|
-
case "right-top":
|
|
918
|
-
d = "right-start";
|
|
919
|
-
break;
|
|
920
|
-
default:
|
|
921
|
-
d = e;
|
|
922
|
-
break;
|
|
923
|
-
}
|
|
924
|
-
const g = getComputedStyle(f), y = a ? 0 : ((p) => {
|
|
925
|
-
const x = parseFloat(p);
|
|
926
|
-
return p.trim().endsWith("rem") ? x * 16 : x;
|
|
927
|
-
})(g.getPropertyValue("--cds-popover-offset").trim()) ?? 10, b = [
|
|
928
|
-
De(a ? 0 : {
|
|
929
|
-
alignmentAxis: c,
|
|
930
|
-
mainAxis: n ? y : 4
|
|
931
|
-
}),
|
|
932
|
-
ke({
|
|
933
|
-
fallbackPlacements: a ? d.includes("bottom") ? [
|
|
934
|
-
"bottom-start",
|
|
935
|
-
"bottom-end",
|
|
936
|
-
"top-start",
|
|
937
|
-
"top-end"
|
|
938
|
-
] : [
|
|
939
|
-
"top-start",
|
|
940
|
-
"top-end",
|
|
941
|
-
"bottom-start",
|
|
942
|
-
"bottom-end"
|
|
943
|
-
] : m || h ? ["top", "bottom"] : d.includes("bottom") ? [
|
|
944
|
-
"bottom",
|
|
945
|
-
"bottom-start",
|
|
946
|
-
"bottom-end",
|
|
947
|
-
"right",
|
|
948
|
-
"right-start",
|
|
949
|
-
"right-end",
|
|
950
|
-
"left",
|
|
951
|
-
"left-start",
|
|
952
|
-
"left-end",
|
|
953
|
-
"top",
|
|
954
|
-
"top-start",
|
|
955
|
-
"top-end"
|
|
956
|
-
] : [
|
|
957
|
-
"top",
|
|
958
|
-
"top-start",
|
|
959
|
-
"top-end",
|
|
960
|
-
"left",
|
|
961
|
-
"left-start",
|
|
962
|
-
"left-end",
|
|
963
|
-
"right",
|
|
964
|
-
"right-start",
|
|
965
|
-
"right-end",
|
|
966
|
-
"bottom",
|
|
967
|
-
"bottom-start",
|
|
968
|
-
"bottom-end"
|
|
969
|
-
],
|
|
970
|
-
fallbackStrategy: "initialPlacement",
|
|
971
|
-
fallbackAxisSideDirection: "start",
|
|
972
|
-
boundary: u
|
|
973
|
-
}),
|
|
974
|
-
...s && (d === "bottom" || d === "top") ? [Ct({ apply({ rects: p, elements: x }) {
|
|
975
|
-
x.floating.style.width = `${p.reference.width}px`;
|
|
976
|
-
} })] : [Ct({ apply({ elements: p }) {
|
|
977
|
-
p.floating.style.removeProperty("width");
|
|
978
|
-
} })],
|
|
979
|
-
...n && t ? [We({
|
|
980
|
-
element: t,
|
|
981
|
-
padding: 15
|
|
982
|
-
})] : [],
|
|
983
|
-
Fe()
|
|
984
|
-
];
|
|
985
|
-
if (l) {
|
|
986
|
-
const { x: p, y: x, placement: v, middlewareData: A, strategy: S } = await Me(o, f, {
|
|
987
|
-
strategy: "fixed",
|
|
988
|
-
middleware: b,
|
|
989
|
-
placement: d
|
|
990
|
-
});
|
|
991
|
-
if (f.setAttribute("align", v), f.style.left = `${p}px`, f.style.top = `${x}px`, f.style.position = `${S}`, f.style.visibility = A.hide?.referenceHidden ? "hidden" : "visible", t) {
|
|
992
|
-
const { x: E, y: L } = A.arrow, R = {
|
|
993
|
-
top: "bottom",
|
|
994
|
-
right: "left",
|
|
995
|
-
bottom: "top",
|
|
996
|
-
left: "right"
|
|
997
|
-
}[v.split("-")[0]];
|
|
998
|
-
t.style.left = E != null ? `${E}px` : "", t.style.top = L != null ? `${L}px` : "", t.style.right = "", t.style.bottom = "", t.style[R] = `${-t.offsetWidth / 2}px`;
|
|
999
|
-
}
|
|
1000
|
-
(this.host.tagName === "CDS-AI-LABEL" || this.host.tagName === "CDS-SLUG") && this.host?.setAttribute("alignment", v);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
hostUpdated() {
|
|
1004
|
-
this.host.hasAttribute("open") || (this.cleanup?.(), this.cleanup = void 0);
|
|
1005
|
-
}
|
|
1006
|
-
hostDisconnected() {
|
|
1007
|
-
this.cleanup?.(), this.cleanup = void 0;
|
|
1008
|
-
}
|
|
1009
|
-
};
|
|
1010
|
-
export {
|
|
1011
|
-
Be as t
|
|
1012
|
-
};
|