@astrake/lumora-ui 0.2.1 → 0.7.2
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/CHANGELOG.md +230 -141
- package/README.md +23 -21
- package/dist/LuAccordion.vue_vue_type_script_setup_true_lang-CwG5Ml8t.js +5032 -0
- package/dist/{LuEmbeddedStatusBar.vue_vue_type_script_setup_true_lang-CIksvebU.js → LuEmbeddedStatusBar.vue_vue_type_script_setup_true_lang-D4rqklgo.js} +1 -1
- package/dist/LuOverlay.vue_vue_type_script_setup_true_lang-C5jhqCgy.js +221 -0
- package/dist/__mocks__/empty.d.ts +4 -0
- package/dist/components/LuAccordion.vue.d.ts +23 -0
- package/dist/components/LuBarChart.vue.d.ts +22 -0
- package/dist/components/LuBottomSheet.vue.d.ts +27 -0
- package/dist/components/LuCalendar.vue.d.ts +34 -0
- package/dist/components/LuCard.vue.d.ts +0 -3
- package/dist/components/LuCheckbox.vue.d.ts +19 -5
- package/dist/components/LuChip.vue.d.ts +35 -0
- package/dist/components/LuChipGroup.vue.d.ts +23 -0
- package/dist/components/LuCodeBlock.vue.d.ts +11 -14
- package/dist/components/LuCollapsible.vue.d.ts +7 -4
- package/dist/components/LuCommandPalette.vue.d.ts +25 -0
- package/dist/components/LuDataGrid.types.d.ts +39 -0
- package/dist/components/LuDataGrid.vue.d.ts +84 -0
- package/dist/components/LuDateRangePicker.vue.d.ts +29 -0
- package/dist/components/LuDoughnutChart.vue.d.ts +17 -0
- package/dist/components/LuDrawer.vue.d.ts +33 -0
- package/dist/components/LuFileUpload.vue.d.ts +38 -0
- package/dist/components/LuForm.vue.d.ts +2 -2
- package/dist/components/LuFormField.vue.d.ts +21 -0
- package/dist/components/LuFormWizard.types.d.ts +7 -0
- package/dist/components/LuFormWizard.vue.d.ts +33 -0
- package/dist/components/LuGaugeChart.vue.d.ts +16 -0
- package/dist/components/LuKanban.types.d.ts +24 -0
- package/dist/components/LuKanban.vue.d.ts +30 -0
- package/dist/components/LuLineChart.vue.d.ts +19 -0
- package/dist/components/LuList.vue.d.ts +18 -0
- package/dist/components/LuListDivider.vue.d.ts +5 -0
- package/dist/components/LuListItem.vue.d.ts +32 -0
- package/dist/components/LuListSubheader.vue.d.ts +16 -0
- package/dist/components/LuMediaGallery.vue.d.ts +25 -0
- package/dist/components/LuMenu.vue.d.ts +2 -2
- package/dist/components/LuModal.vue.d.ts +5 -5
- package/dist/components/LuPagination.vue.d.ts +2 -2
- package/dist/components/LuPlanner.types.d.ts +14 -0
- package/dist/components/LuPlanner.vue.d.ts +23 -0
- package/dist/components/LuPopover.vue.d.ts +24 -0
- package/dist/components/LuRadioGroup.types.d.ts +1 -0
- package/dist/components/LuRadioGroup.vue.d.ts +2 -2
- package/dist/components/LuRichTextEditor.vue.d.ts +27 -0
- package/dist/components/LuSelect.vue.d.ts +35 -2
- package/dist/components/{LuPageHeader.vue.d.ts → LuSparkline.vue.d.ts} +9 -5
- package/dist/components/LuSwitch.vue.d.ts +19 -5
- package/dist/components/LuTimeline.vue.d.ts +17 -0
- package/dist/components/LuTimelineItem.vue.d.ts +24 -0
- package/dist/components/LuToast.vue.d.ts +5 -0
- package/dist/components/LuTree.types.d.ts +9 -0
- package/dist/components/LuTree.vue.d.ts +25 -0
- package/dist/components/LuTreeNode.vue.d.ts +37 -0
- package/dist/components/__tests__/LuAccordion.test.d.ts +1 -0
- package/dist/components/__tests__/LuBarChart.test.d.ts +1 -0
- package/dist/components/__tests__/LuBottomSheet.test.d.ts +1 -0
- package/dist/components/__tests__/LuCalendar.test.d.ts +1 -0
- package/dist/components/__tests__/LuCheckbox.test.d.ts +1 -0
- package/dist/components/__tests__/LuChip.test.d.ts +1 -0
- package/dist/components/__tests__/LuCommandPalette.test.d.ts +1 -0
- package/dist/components/__tests__/LuDataGrid.test.d.ts +1 -0
- package/dist/components/__tests__/LuDateRangePicker.test.d.ts +1 -0
- package/dist/components/__tests__/LuDoughnutChart.test.d.ts +1 -0
- package/dist/components/__tests__/LuDrawer.test.d.ts +1 -0
- package/dist/components/__tests__/LuFileUpload.test.d.ts +1 -0
- package/dist/components/__tests__/LuFormWizard.test.d.ts +1 -0
- package/dist/components/__tests__/LuGaugeChart.test.d.ts +1 -0
- package/dist/components/__tests__/LuKanban.test.d.ts +1 -0
- package/dist/components/__tests__/LuLineChart.test.d.ts +1 -0
- package/dist/components/__tests__/LuList.test.d.ts +1 -0
- package/dist/components/__tests__/LuMediaGallery.test.d.ts +1 -0
- package/dist/components/__tests__/LuPlanner.test.d.ts +1 -0
- package/dist/components/__tests__/LuPopover.test.d.ts +1 -0
- package/dist/components/__tests__/LuRadio.test.d.ts +1 -0
- package/dist/components/__tests__/LuRichTextEditor.test.d.ts +1 -0
- package/dist/components/__tests__/LuSelect.test.d.ts +1 -0
- package/dist/components/__tests__/LuSparkline.test.d.ts +1 -0
- package/dist/components/__tests__/LuSwitch.test.d.ts +1 -0
- package/dist/components/__tests__/LuTimeline.test.d.ts +1 -0
- package/dist/components/__tests__/LuToast.test.d.ts +1 -0
- package/dist/components/__tests__/LuTree.test.d.ts +1 -0
- package/dist/components/_all.d.ts +3 -0
- package/dist/components/index.d.ts +42 -3
- package/dist/components/index.js +73 -44
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +34 -14
- package/dist/composables/lazyVChart.d.ts +10 -0
- package/dist/composables/useChartTheme.d.ts +65 -0
- package/dist/composables/useDataGrid.d.ts +52 -0
- package/dist/composables/useFloating.d.ts +12 -0
- package/dist/composables/useLuToast.d.ts +14 -0
- package/dist/composables/useShiki.d.ts +2 -0
- package/dist/context-CGS7Ou_x.js +36 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +217 -81
- package/dist/layout/LuFill.vue.d.ts +0 -3
- package/dist/layout/LuFixed.vue.d.ts +0 -3
- package/dist/layout/LuGrid.vue.d.ts +0 -4
- package/dist/layout/LuStack.vue.d.ts +5 -3
- package/dist/layout/index.js +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/skins/components.d.ts +2 -0
- package/dist/skins/index.js +1053 -219
- package/dist/skins/layout.d.ts +2 -0
- package/dist/skins/shell/desktop.d.ts +2 -0
- package/dist/skins/shell/embedded.d.ts +2 -0
- package/dist/skins/shell/mobile.d.ts +2 -0
- package/dist/useLuToast-D5d7Wrcr.js +1029 -0
- package/dist/utils.d.ts +0 -11
- package/package.json +95 -94
- package/src/lumora.css +259 -16
- package/dist/LuCodeBlock.vue_vue_type_script_setup_true_lang-BjwcjuXF.js +0 -1623
- package/dist/LuOverlay.vue_vue_type_script_setup_true_lang-DZch4Vrw.js +0 -226
- package/dist/components/LuThemeSelect.vue.d.ts +0 -2
- package/dist/components/LuThemeSwitch.vue.d.ts +0 -2
- package/dist/context-0gENwESP.js +0 -62
- package/dist/useTheme-Cd4wVaLs.js +0 -21
|
@@ -0,0 +1,1029 @@
|
|
|
1
|
+
import { ref as ft, watch as bt, onMounted as It, onBeforeUnmount as zt, shallowReactive as Xt } from "vue";
|
|
2
|
+
import { createHighlighter as jt } from "shiki";
|
|
3
|
+
const J = Math.min, N = Math.max, Q = Math.round, K = Math.floor, S = (t) => ({
|
|
4
|
+
x: t,
|
|
5
|
+
y: t
|
|
6
|
+
}), Ut = {
|
|
7
|
+
left: "right",
|
|
8
|
+
right: "left",
|
|
9
|
+
bottom: "top",
|
|
10
|
+
top: "bottom"
|
|
11
|
+
};
|
|
12
|
+
function Rt(t, e, o) {
|
|
13
|
+
return N(t, J(e, o));
|
|
14
|
+
}
|
|
15
|
+
function et(t, e) {
|
|
16
|
+
return typeof t == "function" ? t(e) : t;
|
|
17
|
+
}
|
|
18
|
+
function B(t) {
|
|
19
|
+
return t.split("-")[0];
|
|
20
|
+
}
|
|
21
|
+
function nt(t) {
|
|
22
|
+
return t.split("-")[1];
|
|
23
|
+
}
|
|
24
|
+
function Dt(t) {
|
|
25
|
+
return t === "x" ? "y" : "x";
|
|
26
|
+
}
|
|
27
|
+
function Pt(t) {
|
|
28
|
+
return t === "y" ? "height" : "width";
|
|
29
|
+
}
|
|
30
|
+
function P(t) {
|
|
31
|
+
const e = t[0];
|
|
32
|
+
return e === "t" || e === "b" ? "y" : "x";
|
|
33
|
+
}
|
|
34
|
+
function Ft(t) {
|
|
35
|
+
return Dt(P(t));
|
|
36
|
+
}
|
|
37
|
+
function Yt(t, e, o) {
|
|
38
|
+
o === void 0 && (o = !1);
|
|
39
|
+
const n = nt(t), i = Ft(t), r = Pt(i);
|
|
40
|
+
let s = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
41
|
+
return e.reference[r] > e.floating[r] && (s = Z(s)), [s, Z(s)];
|
|
42
|
+
}
|
|
43
|
+
function qt(t) {
|
|
44
|
+
const e = Z(t);
|
|
45
|
+
return [mt(t), e, mt(e)];
|
|
46
|
+
}
|
|
47
|
+
function mt(t) {
|
|
48
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
49
|
+
}
|
|
50
|
+
const At = ["left", "right"], Ot = ["right", "left"], Kt = ["top", "bottom"], Gt = ["bottom", "top"];
|
|
51
|
+
function Jt(t, e, o) {
|
|
52
|
+
switch (t) {
|
|
53
|
+
case "top":
|
|
54
|
+
case "bottom":
|
|
55
|
+
return o ? e ? Ot : At : e ? At : Ot;
|
|
56
|
+
case "left":
|
|
57
|
+
case "right":
|
|
58
|
+
return e ? Kt : Gt;
|
|
59
|
+
default:
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function Qt(t, e, o, n) {
|
|
64
|
+
const i = nt(t);
|
|
65
|
+
let r = Jt(B(t), o === "start", n);
|
|
66
|
+
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(mt)))), r;
|
|
67
|
+
}
|
|
68
|
+
function Z(t) {
|
|
69
|
+
const e = B(t);
|
|
70
|
+
return Ut[e] + t.slice(e.length);
|
|
71
|
+
}
|
|
72
|
+
function Zt(t) {
|
|
73
|
+
return {
|
|
74
|
+
top: 0,
|
|
75
|
+
right: 0,
|
|
76
|
+
bottom: 0,
|
|
77
|
+
left: 0,
|
|
78
|
+
...t
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function te(t) {
|
|
82
|
+
return typeof t != "number" ? Zt(t) : {
|
|
83
|
+
top: t,
|
|
84
|
+
right: t,
|
|
85
|
+
bottom: t,
|
|
86
|
+
left: t
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function tt(t) {
|
|
90
|
+
const {
|
|
91
|
+
x: e,
|
|
92
|
+
y: o,
|
|
93
|
+
width: n,
|
|
94
|
+
height: i
|
|
95
|
+
} = t;
|
|
96
|
+
return {
|
|
97
|
+
width: n,
|
|
98
|
+
height: i,
|
|
99
|
+
top: o,
|
|
100
|
+
left: e,
|
|
101
|
+
right: e + n,
|
|
102
|
+
bottom: o + i,
|
|
103
|
+
x: e,
|
|
104
|
+
y: o
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function Ct(t, e, o) {
|
|
108
|
+
let {
|
|
109
|
+
reference: n,
|
|
110
|
+
floating: i
|
|
111
|
+
} = t;
|
|
112
|
+
const r = P(e), s = Ft(e), c = Pt(s), l = B(e), f = r === "y", u = n.x + n.width / 2 - i.width / 2, a = n.y + n.height / 2 - i.height / 2, m = n[c] / 2 - i[c] / 2;
|
|
113
|
+
let d;
|
|
114
|
+
switch (l) {
|
|
115
|
+
case "top":
|
|
116
|
+
d = {
|
|
117
|
+
x: u,
|
|
118
|
+
y: n.y - i.height
|
|
119
|
+
};
|
|
120
|
+
break;
|
|
121
|
+
case "bottom":
|
|
122
|
+
d = {
|
|
123
|
+
x: u,
|
|
124
|
+
y: n.y + n.height
|
|
125
|
+
};
|
|
126
|
+
break;
|
|
127
|
+
case "right":
|
|
128
|
+
d = {
|
|
129
|
+
x: n.x + n.width,
|
|
130
|
+
y: a
|
|
131
|
+
};
|
|
132
|
+
break;
|
|
133
|
+
case "left":
|
|
134
|
+
d = {
|
|
135
|
+
x: n.x - i.width,
|
|
136
|
+
y: a
|
|
137
|
+
};
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
d = {
|
|
141
|
+
x: n.x,
|
|
142
|
+
y: n.y
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
switch (nt(e)) {
|
|
146
|
+
case "start":
|
|
147
|
+
d[s] -= m * (o && f ? -1 : 1);
|
|
148
|
+
break;
|
|
149
|
+
case "end":
|
|
150
|
+
d[s] += m * (o && f ? -1 : 1);
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
return d;
|
|
154
|
+
}
|
|
155
|
+
async function ee(t, e) {
|
|
156
|
+
var o;
|
|
157
|
+
e === void 0 && (e = {});
|
|
158
|
+
const {
|
|
159
|
+
x: n,
|
|
160
|
+
y: i,
|
|
161
|
+
platform: r,
|
|
162
|
+
rects: s,
|
|
163
|
+
elements: c,
|
|
164
|
+
strategy: l
|
|
165
|
+
} = t, {
|
|
166
|
+
boundary: f = "clippingAncestors",
|
|
167
|
+
rootBoundary: u = "viewport",
|
|
168
|
+
elementContext: a = "floating",
|
|
169
|
+
altBoundary: m = !1,
|
|
170
|
+
padding: d = 0
|
|
171
|
+
} = et(e, t), h = te(d), w = c[m ? a === "floating" ? "reference" : "floating" : a], g = tt(await r.getClippingRect({
|
|
172
|
+
element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
173
|
+
boundary: f,
|
|
174
|
+
rootBoundary: u,
|
|
175
|
+
strategy: l
|
|
176
|
+
})), x = a === "floating" ? {
|
|
177
|
+
x: n,
|
|
178
|
+
y: i,
|
|
179
|
+
width: s.floating.width,
|
|
180
|
+
height: s.floating.height
|
|
181
|
+
} : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), v = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
182
|
+
x: 1,
|
|
183
|
+
y: 1
|
|
184
|
+
} : {
|
|
185
|
+
x: 1,
|
|
186
|
+
y: 1
|
|
187
|
+
}, A = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
188
|
+
elements: c,
|
|
189
|
+
rect: x,
|
|
190
|
+
offsetParent: y,
|
|
191
|
+
strategy: l
|
|
192
|
+
}) : x);
|
|
193
|
+
return {
|
|
194
|
+
top: (g.top - A.top + h.top) / v.y,
|
|
195
|
+
bottom: (A.bottom - g.bottom + h.bottom) / v.y,
|
|
196
|
+
left: (g.left - A.left + h.left) / v.x,
|
|
197
|
+
right: (A.right - g.right + h.right) / v.x
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
const ne = 50, oe = async (t, e, o) => {
|
|
201
|
+
const {
|
|
202
|
+
placement: n = "bottom",
|
|
203
|
+
strategy: i = "absolute",
|
|
204
|
+
middleware: r = [],
|
|
205
|
+
platform: s
|
|
206
|
+
} = o, c = s.detectOverflow ? s : {
|
|
207
|
+
...s,
|
|
208
|
+
detectOverflow: ee
|
|
209
|
+
}, l = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
210
|
+
let f = await s.getElementRects({
|
|
211
|
+
reference: t,
|
|
212
|
+
floating: e,
|
|
213
|
+
strategy: i
|
|
214
|
+
}), {
|
|
215
|
+
x: u,
|
|
216
|
+
y: a
|
|
217
|
+
} = Ct(f, n, l), m = n, d = 0;
|
|
218
|
+
const h = {};
|
|
219
|
+
for (let p = 0; p < r.length; p++) {
|
|
220
|
+
const w = r[p];
|
|
221
|
+
if (!w)
|
|
222
|
+
continue;
|
|
223
|
+
const {
|
|
224
|
+
name: g,
|
|
225
|
+
fn: x
|
|
226
|
+
} = w, {
|
|
227
|
+
x: y,
|
|
228
|
+
y: v,
|
|
229
|
+
data: A,
|
|
230
|
+
reset: b
|
|
231
|
+
} = await x({
|
|
232
|
+
x: u,
|
|
233
|
+
y: a,
|
|
234
|
+
initialPlacement: n,
|
|
235
|
+
placement: m,
|
|
236
|
+
strategy: i,
|
|
237
|
+
middlewareData: h,
|
|
238
|
+
rects: f,
|
|
239
|
+
platform: c,
|
|
240
|
+
elements: {
|
|
241
|
+
reference: t,
|
|
242
|
+
floating: e
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
u = y ?? u, a = v ?? a, h[g] = {
|
|
246
|
+
...h[g],
|
|
247
|
+
...A
|
|
248
|
+
}, b && d < ne && (d++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (f = b.rects === !0 ? await s.getElementRects({
|
|
249
|
+
reference: t,
|
|
250
|
+
floating: e,
|
|
251
|
+
strategy: i
|
|
252
|
+
}) : b.rects), {
|
|
253
|
+
x: u,
|
|
254
|
+
y: a
|
|
255
|
+
} = Ct(f, m, l)), p = -1);
|
|
256
|
+
}
|
|
257
|
+
return {
|
|
258
|
+
x: u,
|
|
259
|
+
y: a,
|
|
260
|
+
placement: m,
|
|
261
|
+
strategy: i,
|
|
262
|
+
middlewareData: h
|
|
263
|
+
};
|
|
264
|
+
}, ie = function(t) {
|
|
265
|
+
return t === void 0 && (t = {}), {
|
|
266
|
+
name: "flip",
|
|
267
|
+
options: t,
|
|
268
|
+
async fn(e) {
|
|
269
|
+
var o, n;
|
|
270
|
+
const {
|
|
271
|
+
placement: i,
|
|
272
|
+
middlewareData: r,
|
|
273
|
+
rects: s,
|
|
274
|
+
initialPlacement: c,
|
|
275
|
+
platform: l,
|
|
276
|
+
elements: f
|
|
277
|
+
} = e, {
|
|
278
|
+
mainAxis: u = !0,
|
|
279
|
+
crossAxis: a = !0,
|
|
280
|
+
fallbackPlacements: m,
|
|
281
|
+
fallbackStrategy: d = "bestFit",
|
|
282
|
+
fallbackAxisSideDirection: h = "none",
|
|
283
|
+
flipAlignment: p = !0,
|
|
284
|
+
...w
|
|
285
|
+
} = et(t, e);
|
|
286
|
+
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
287
|
+
return {};
|
|
288
|
+
const g = B(i), x = P(c), y = B(c) === c, v = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), A = m || (y || !p ? [Z(c)] : qt(c)), b = h !== "none";
|
|
289
|
+
!m && b && A.push(...Qt(c, p, h, v));
|
|
290
|
+
const H = [c, ...A], ct = await l.detectOverflow(e, w), q = [];
|
|
291
|
+
let _ = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
292
|
+
if (u && q.push(ct[g]), a) {
|
|
293
|
+
const M = Yt(i, s, v);
|
|
294
|
+
q.push(ct[M[0]], ct[M[1]]);
|
|
295
|
+
}
|
|
296
|
+
if (_ = [..._, {
|
|
297
|
+
placement: i,
|
|
298
|
+
overflows: q
|
|
299
|
+
}], !q.every((M) => M <= 0)) {
|
|
300
|
+
var xt, yt;
|
|
301
|
+
const M = (((xt = r.flip) == null ? void 0 : xt.index) || 0) + 1, lt = H[M];
|
|
302
|
+
if (lt && (!(a === "alignment" ? x !== P(lt) : !1) || // We leave the current main axis only if every placement on that axis
|
|
303
|
+
// overflows the main axis.
|
|
304
|
+
_.every((O) => P(O.placement) === x ? O.overflows[0] > 0 : !0)))
|
|
305
|
+
return {
|
|
306
|
+
data: {
|
|
307
|
+
index: M,
|
|
308
|
+
overflows: _
|
|
309
|
+
},
|
|
310
|
+
reset: {
|
|
311
|
+
placement: lt
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
let j = (yt = _.filter((k) => k.overflows[0] <= 0).sort((k, O) => k.overflows[1] - O.overflows[1])[0]) == null ? void 0 : yt.placement;
|
|
315
|
+
if (!j)
|
|
316
|
+
switch (d) {
|
|
317
|
+
case "bestFit": {
|
|
318
|
+
var vt;
|
|
319
|
+
const k = (vt = _.filter((O) => {
|
|
320
|
+
if (b) {
|
|
321
|
+
const D = P(O.placement);
|
|
322
|
+
return D === x || // Create a bias to the `y` side axis due to horizontal
|
|
323
|
+
// reading directions favoring greater width.
|
|
324
|
+
D === "y";
|
|
325
|
+
}
|
|
326
|
+
return !0;
|
|
327
|
+
}).map((O) => [O.placement, O.overflows.filter((D) => D > 0).reduce((D, $t) => D + $t, 0)]).sort((O, D) => O[1] - D[1])[0]) == null ? void 0 : vt[0];
|
|
328
|
+
k && (j = k);
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
case "initialPlacement":
|
|
332
|
+
j = c;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
if (i !== j)
|
|
336
|
+
return {
|
|
337
|
+
reset: {
|
|
338
|
+
placement: j
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
return {};
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}, se = /* @__PURE__ */ new Set(["left", "top"]);
|
|
346
|
+
async function re(t, e) {
|
|
347
|
+
const {
|
|
348
|
+
placement: o,
|
|
349
|
+
platform: n,
|
|
350
|
+
elements: i
|
|
351
|
+
} = t, r = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), s = B(o), c = nt(o), l = P(o) === "y", f = se.has(s) ? -1 : 1, u = r && l ? -1 : 1, a = et(e, t);
|
|
352
|
+
let {
|
|
353
|
+
mainAxis: m,
|
|
354
|
+
crossAxis: d,
|
|
355
|
+
alignmentAxis: h
|
|
356
|
+
} = typeof a == "number" ? {
|
|
357
|
+
mainAxis: a,
|
|
358
|
+
crossAxis: 0,
|
|
359
|
+
alignmentAxis: null
|
|
360
|
+
} : {
|
|
361
|
+
mainAxis: a.mainAxis || 0,
|
|
362
|
+
crossAxis: a.crossAxis || 0,
|
|
363
|
+
alignmentAxis: a.alignmentAxis
|
|
364
|
+
};
|
|
365
|
+
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), l ? {
|
|
366
|
+
x: d * u,
|
|
367
|
+
y: m * f
|
|
368
|
+
} : {
|
|
369
|
+
x: m * f,
|
|
370
|
+
y: d * u
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
const ce = function(t) {
|
|
374
|
+
return t === void 0 && (t = 0), {
|
|
375
|
+
name: "offset",
|
|
376
|
+
options: t,
|
|
377
|
+
async fn(e) {
|
|
378
|
+
var o, n;
|
|
379
|
+
const {
|
|
380
|
+
x: i,
|
|
381
|
+
y: r,
|
|
382
|
+
placement: s,
|
|
383
|
+
middlewareData: c
|
|
384
|
+
} = e, l = await re(e, t);
|
|
385
|
+
return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
386
|
+
x: i + l.x,
|
|
387
|
+
y: r + l.y,
|
|
388
|
+
data: {
|
|
389
|
+
...l,
|
|
390
|
+
placement: s
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
}, le = function(t) {
|
|
396
|
+
return t === void 0 && (t = {}), {
|
|
397
|
+
name: "shift",
|
|
398
|
+
options: t,
|
|
399
|
+
async fn(e) {
|
|
400
|
+
const {
|
|
401
|
+
x: o,
|
|
402
|
+
y: n,
|
|
403
|
+
placement: i,
|
|
404
|
+
platform: r
|
|
405
|
+
} = e, {
|
|
406
|
+
mainAxis: s = !0,
|
|
407
|
+
crossAxis: c = !1,
|
|
408
|
+
limiter: l = {
|
|
409
|
+
fn: (g) => {
|
|
410
|
+
let {
|
|
411
|
+
x,
|
|
412
|
+
y
|
|
413
|
+
} = g;
|
|
414
|
+
return {
|
|
415
|
+
x,
|
|
416
|
+
y
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
...f
|
|
421
|
+
} = et(t, e), u = {
|
|
422
|
+
x: o,
|
|
423
|
+
y: n
|
|
424
|
+
}, a = await r.detectOverflow(e, f), m = P(B(i)), d = Dt(m);
|
|
425
|
+
let h = u[d], p = u[m];
|
|
426
|
+
if (s) {
|
|
427
|
+
const g = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", y = h + a[g], v = h - a[x];
|
|
428
|
+
h = Rt(y, h, v);
|
|
429
|
+
}
|
|
430
|
+
if (c) {
|
|
431
|
+
const g = m === "y" ? "top" : "left", x = m === "y" ? "bottom" : "right", y = p + a[g], v = p - a[x];
|
|
432
|
+
p = Rt(y, p, v);
|
|
433
|
+
}
|
|
434
|
+
const w = l.fn({
|
|
435
|
+
...e,
|
|
436
|
+
[d]: h,
|
|
437
|
+
[m]: p
|
|
438
|
+
});
|
|
439
|
+
return {
|
|
440
|
+
...w,
|
|
441
|
+
data: {
|
|
442
|
+
x: w.x - o,
|
|
443
|
+
y: w.y - n,
|
|
444
|
+
enabled: {
|
|
445
|
+
[d]: s,
|
|
446
|
+
[m]: c
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
function ot() {
|
|
454
|
+
return typeof window < "u";
|
|
455
|
+
}
|
|
456
|
+
function X(t) {
|
|
457
|
+
return Mt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
458
|
+
}
|
|
459
|
+
function R(t) {
|
|
460
|
+
var e;
|
|
461
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
462
|
+
}
|
|
463
|
+
function T(t) {
|
|
464
|
+
var e;
|
|
465
|
+
return (e = (Mt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
466
|
+
}
|
|
467
|
+
function Mt(t) {
|
|
468
|
+
return ot() ? t instanceof Node || t instanceof R(t).Node : !1;
|
|
469
|
+
}
|
|
470
|
+
function C(t) {
|
|
471
|
+
return ot() ? t instanceof Element || t instanceof R(t).Element : !1;
|
|
472
|
+
}
|
|
473
|
+
function E(t) {
|
|
474
|
+
return ot() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
|
|
475
|
+
}
|
|
476
|
+
function Lt(t) {
|
|
477
|
+
return !ot() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
|
|
478
|
+
}
|
|
479
|
+
function Y(t) {
|
|
480
|
+
const {
|
|
481
|
+
overflow: e,
|
|
482
|
+
overflowX: o,
|
|
483
|
+
overflowY: n,
|
|
484
|
+
display: i
|
|
485
|
+
} = L(t);
|
|
486
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && i !== "inline" && i !== "contents";
|
|
487
|
+
}
|
|
488
|
+
function fe(t) {
|
|
489
|
+
return /^(table|td|th)$/.test(X(t));
|
|
490
|
+
}
|
|
491
|
+
function it(t) {
|
|
492
|
+
try {
|
|
493
|
+
if (t.matches(":popover-open"))
|
|
494
|
+
return !0;
|
|
495
|
+
} catch {
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
return t.matches(":modal");
|
|
499
|
+
} catch {
|
|
500
|
+
return !1;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
const ae = /transform|translate|scale|rotate|perspective|filter/, ue = /paint|layout|strict|content/, W = (t) => !!t && t !== "none";
|
|
504
|
+
let at;
|
|
505
|
+
function gt(t) {
|
|
506
|
+
const e = C(t) ? L(t) : t;
|
|
507
|
+
return W(e.transform) || W(e.translate) || W(e.scale) || W(e.rotate) || W(e.perspective) || !pt() && (W(e.backdropFilter) || W(e.filter)) || ae.test(e.willChange || "") || ue.test(e.contain || "");
|
|
508
|
+
}
|
|
509
|
+
function de(t) {
|
|
510
|
+
let e = F(t);
|
|
511
|
+
for (; E(e) && !z(e); ) {
|
|
512
|
+
if (gt(e))
|
|
513
|
+
return e;
|
|
514
|
+
if (it(e))
|
|
515
|
+
return null;
|
|
516
|
+
e = F(e);
|
|
517
|
+
}
|
|
518
|
+
return null;
|
|
519
|
+
}
|
|
520
|
+
function pt() {
|
|
521
|
+
return at == null && (at = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), at;
|
|
522
|
+
}
|
|
523
|
+
function z(t) {
|
|
524
|
+
return /^(html|body|#document)$/.test(X(t));
|
|
525
|
+
}
|
|
526
|
+
function L(t) {
|
|
527
|
+
return R(t).getComputedStyle(t);
|
|
528
|
+
}
|
|
529
|
+
function st(t) {
|
|
530
|
+
return C(t) ? {
|
|
531
|
+
scrollLeft: t.scrollLeft,
|
|
532
|
+
scrollTop: t.scrollTop
|
|
533
|
+
} : {
|
|
534
|
+
scrollLeft: t.scrollX,
|
|
535
|
+
scrollTop: t.scrollY
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
function F(t) {
|
|
539
|
+
if (X(t) === "html")
|
|
540
|
+
return t;
|
|
541
|
+
const e = (
|
|
542
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
543
|
+
t.assignedSlot || // DOM Element detected.
|
|
544
|
+
t.parentNode || // ShadowRoot detected.
|
|
545
|
+
Lt(t) && t.host || // Fallback.
|
|
546
|
+
T(t)
|
|
547
|
+
);
|
|
548
|
+
return Lt(e) ? e.host : e;
|
|
549
|
+
}
|
|
550
|
+
function kt(t) {
|
|
551
|
+
const e = F(t);
|
|
552
|
+
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : E(e) && Y(e) ? e : kt(e);
|
|
553
|
+
}
|
|
554
|
+
function U(t, e, o) {
|
|
555
|
+
var n;
|
|
556
|
+
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
557
|
+
const i = kt(t), r = i === ((n = t.ownerDocument) == null ? void 0 : n.body), s = R(i);
|
|
558
|
+
if (r) {
|
|
559
|
+
const c = ht(s);
|
|
560
|
+
return e.concat(s, s.visualViewport || [], Y(i) ? i : [], c && o ? U(c) : []);
|
|
561
|
+
} else
|
|
562
|
+
return e.concat(i, U(i, [], o));
|
|
563
|
+
}
|
|
564
|
+
function ht(t) {
|
|
565
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
566
|
+
}
|
|
567
|
+
function Wt(t) {
|
|
568
|
+
const e = L(t);
|
|
569
|
+
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
570
|
+
const i = E(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, c = Q(o) !== r || Q(n) !== s;
|
|
571
|
+
return c && (o = r, n = s), {
|
|
572
|
+
width: o,
|
|
573
|
+
height: n,
|
|
574
|
+
$: c
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
function wt(t) {
|
|
578
|
+
return C(t) ? t : t.contextElement;
|
|
579
|
+
}
|
|
580
|
+
function I(t) {
|
|
581
|
+
const e = wt(t);
|
|
582
|
+
if (!E(e))
|
|
583
|
+
return S(1);
|
|
584
|
+
const o = e.getBoundingClientRect(), {
|
|
585
|
+
width: n,
|
|
586
|
+
height: i,
|
|
587
|
+
$: r
|
|
588
|
+
} = Wt(e);
|
|
589
|
+
let s = (r ? Q(o.width) : o.width) / n, c = (r ? Q(o.height) : o.height) / i;
|
|
590
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
591
|
+
x: s,
|
|
592
|
+
y: c
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
const me = /* @__PURE__ */ S(0);
|
|
596
|
+
function Nt(t) {
|
|
597
|
+
const e = R(t);
|
|
598
|
+
return !pt() || !e.visualViewport ? me : {
|
|
599
|
+
x: e.visualViewport.offsetLeft,
|
|
600
|
+
y: e.visualViewport.offsetTop
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function he(t, e, o) {
|
|
604
|
+
return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
|
|
605
|
+
}
|
|
606
|
+
function V(t, e, o, n) {
|
|
607
|
+
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
608
|
+
const i = t.getBoundingClientRect(), r = wt(t);
|
|
609
|
+
let s = S(1);
|
|
610
|
+
e && (n ? C(n) && (s = I(n)) : s = I(t));
|
|
611
|
+
const c = he(r, o, n) ? Nt(r) : S(0);
|
|
612
|
+
let l = (i.left + c.x) / s.x, f = (i.top + c.y) / s.y, u = i.width / s.x, a = i.height / s.y;
|
|
613
|
+
if (r) {
|
|
614
|
+
const m = R(r), d = n && C(n) ? R(n) : n;
|
|
615
|
+
let h = m, p = ht(h);
|
|
616
|
+
for (; p && n && d !== h; ) {
|
|
617
|
+
const w = I(p), g = p.getBoundingClientRect(), x = L(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, v = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
618
|
+
l *= w.x, f *= w.y, u *= w.x, a *= w.y, l += y, f += v, h = R(p), p = ht(h);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
return tt({
|
|
622
|
+
width: u,
|
|
623
|
+
height: a,
|
|
624
|
+
x: l,
|
|
625
|
+
y: f
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
function rt(t, e) {
|
|
629
|
+
const o = st(t).scrollLeft;
|
|
630
|
+
return e ? e.left + o : V(T(t)).left + o;
|
|
631
|
+
}
|
|
632
|
+
function Bt(t, e) {
|
|
633
|
+
const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - rt(t, o), i = o.top + e.scrollTop;
|
|
634
|
+
return {
|
|
635
|
+
x: n,
|
|
636
|
+
y: i
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
function ge(t) {
|
|
640
|
+
let {
|
|
641
|
+
elements: e,
|
|
642
|
+
rect: o,
|
|
643
|
+
offsetParent: n,
|
|
644
|
+
strategy: i
|
|
645
|
+
} = t;
|
|
646
|
+
const r = i === "fixed", s = T(n), c = e ? it(e.floating) : !1;
|
|
647
|
+
if (n === s || c && r)
|
|
648
|
+
return o;
|
|
649
|
+
let l = {
|
|
650
|
+
scrollLeft: 0,
|
|
651
|
+
scrollTop: 0
|
|
652
|
+
}, f = S(1);
|
|
653
|
+
const u = S(0), a = E(n);
|
|
654
|
+
if ((a || !a && !r) && ((X(n) !== "body" || Y(s)) && (l = st(n)), a)) {
|
|
655
|
+
const d = V(n);
|
|
656
|
+
f = I(n), u.x = d.x + n.clientLeft, u.y = d.y + n.clientTop;
|
|
657
|
+
}
|
|
658
|
+
const m = s && !a && !r ? Bt(s, l) : S(0);
|
|
659
|
+
return {
|
|
660
|
+
width: o.width * f.x,
|
|
661
|
+
height: o.height * f.y,
|
|
662
|
+
x: o.x * f.x - l.scrollLeft * f.x + u.x + m.x,
|
|
663
|
+
y: o.y * f.y - l.scrollTop * f.y + u.y + m.y
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
function pe(t) {
|
|
667
|
+
return Array.from(t.getClientRects());
|
|
668
|
+
}
|
|
669
|
+
function we(t) {
|
|
670
|
+
const e = T(t), o = st(t), n = t.ownerDocument.body, i = N(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = N(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
671
|
+
let s = -o.scrollLeft + rt(t);
|
|
672
|
+
const c = -o.scrollTop;
|
|
673
|
+
return L(n).direction === "rtl" && (s += N(e.clientWidth, n.clientWidth) - i), {
|
|
674
|
+
width: i,
|
|
675
|
+
height: r,
|
|
676
|
+
x: s,
|
|
677
|
+
y: c
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
const St = 25;
|
|
681
|
+
function xe(t, e) {
|
|
682
|
+
const o = R(t), n = T(t), i = o.visualViewport;
|
|
683
|
+
let r = n.clientWidth, s = n.clientHeight, c = 0, l = 0;
|
|
684
|
+
if (i) {
|
|
685
|
+
r = i.width, s = i.height;
|
|
686
|
+
const u = pt();
|
|
687
|
+
(!u || u && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
|
|
688
|
+
}
|
|
689
|
+
const f = rt(n);
|
|
690
|
+
if (f <= 0) {
|
|
691
|
+
const u = n.ownerDocument, a = u.body, m = getComputedStyle(a), d = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(n.clientWidth - a.clientWidth - d);
|
|
692
|
+
h <= St && (r -= h);
|
|
693
|
+
} else f <= St && (r += f);
|
|
694
|
+
return {
|
|
695
|
+
width: r,
|
|
696
|
+
height: s,
|
|
697
|
+
x: c,
|
|
698
|
+
y: l
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
function ye(t, e) {
|
|
702
|
+
const o = V(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = E(t) ? I(t) : S(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, f = n * r.y;
|
|
703
|
+
return {
|
|
704
|
+
width: s,
|
|
705
|
+
height: c,
|
|
706
|
+
x: l,
|
|
707
|
+
y: f
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
function Tt(t, e, o) {
|
|
711
|
+
let n;
|
|
712
|
+
if (e === "viewport")
|
|
713
|
+
n = xe(t, o);
|
|
714
|
+
else if (e === "document")
|
|
715
|
+
n = we(T(t));
|
|
716
|
+
else if (C(e))
|
|
717
|
+
n = ye(e, o);
|
|
718
|
+
else {
|
|
719
|
+
const i = Nt(t);
|
|
720
|
+
n = {
|
|
721
|
+
x: e.x - i.x,
|
|
722
|
+
y: e.y - i.y,
|
|
723
|
+
width: e.width,
|
|
724
|
+
height: e.height
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
return tt(n);
|
|
728
|
+
}
|
|
729
|
+
function Vt(t, e) {
|
|
730
|
+
const o = F(t);
|
|
731
|
+
return o === e || !C(o) || z(o) ? !1 : L(o).position === "fixed" || Vt(o, e);
|
|
732
|
+
}
|
|
733
|
+
function ve(t, e) {
|
|
734
|
+
const o = e.get(t);
|
|
735
|
+
if (o)
|
|
736
|
+
return o;
|
|
737
|
+
let n = U(t, [], !1).filter((c) => C(c) && X(c) !== "body"), i = null;
|
|
738
|
+
const r = L(t).position === "fixed";
|
|
739
|
+
let s = r ? F(t) : t;
|
|
740
|
+
for (; C(s) && !z(s); ) {
|
|
741
|
+
const c = L(s), l = gt(s);
|
|
742
|
+
!l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && (i.position === "absolute" || i.position === "fixed") || Y(s) && !l && Vt(t, s)) ? n = n.filter((u) => u !== s) : i = c, s = F(s);
|
|
743
|
+
}
|
|
744
|
+
return e.set(t, n), n;
|
|
745
|
+
}
|
|
746
|
+
function be(t) {
|
|
747
|
+
let {
|
|
748
|
+
element: e,
|
|
749
|
+
boundary: o,
|
|
750
|
+
rootBoundary: n,
|
|
751
|
+
strategy: i
|
|
752
|
+
} = t;
|
|
753
|
+
const s = [...o === "clippingAncestors" ? it(e) ? [] : ve(e, this._c) : [].concat(o), n], c = Tt(e, s[0], i);
|
|
754
|
+
let l = c.top, f = c.right, u = c.bottom, a = c.left;
|
|
755
|
+
for (let m = 1; m < s.length; m++) {
|
|
756
|
+
const d = Tt(e, s[m], i);
|
|
757
|
+
l = N(d.top, l), f = J(d.right, f), u = J(d.bottom, u), a = N(d.left, a);
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
width: f - a,
|
|
761
|
+
height: u - l,
|
|
762
|
+
x: a,
|
|
763
|
+
y: l
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
function Re(t) {
|
|
767
|
+
const {
|
|
768
|
+
width: e,
|
|
769
|
+
height: o
|
|
770
|
+
} = Wt(t);
|
|
771
|
+
return {
|
|
772
|
+
width: e,
|
|
773
|
+
height: o
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
function Ae(t, e, o) {
|
|
777
|
+
const n = E(e), i = T(e), r = o === "fixed", s = V(t, !0, r, e);
|
|
778
|
+
let c = {
|
|
779
|
+
scrollLeft: 0,
|
|
780
|
+
scrollTop: 0
|
|
781
|
+
};
|
|
782
|
+
const l = S(0);
|
|
783
|
+
function f() {
|
|
784
|
+
l.x = rt(i);
|
|
785
|
+
}
|
|
786
|
+
if (n || !n && !r)
|
|
787
|
+
if ((X(e) !== "body" || Y(i)) && (c = st(e)), n) {
|
|
788
|
+
const d = V(e, !0, r, e);
|
|
789
|
+
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
790
|
+
} else i && f();
|
|
791
|
+
r && !n && i && f();
|
|
792
|
+
const u = i && !n && !r ? Bt(i, c) : S(0), a = s.left + c.scrollLeft - l.x - u.x, m = s.top + c.scrollTop - l.y - u.y;
|
|
793
|
+
return {
|
|
794
|
+
x: a,
|
|
795
|
+
y: m,
|
|
796
|
+
width: s.width,
|
|
797
|
+
height: s.height
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
function ut(t) {
|
|
801
|
+
return L(t).position === "static";
|
|
802
|
+
}
|
|
803
|
+
function Et(t, e) {
|
|
804
|
+
if (!E(t) || L(t).position === "fixed")
|
|
805
|
+
return null;
|
|
806
|
+
if (e)
|
|
807
|
+
return e(t);
|
|
808
|
+
let o = t.offsetParent;
|
|
809
|
+
return T(t) === o && (o = o.ownerDocument.body), o;
|
|
810
|
+
}
|
|
811
|
+
function Ht(t, e) {
|
|
812
|
+
const o = R(t);
|
|
813
|
+
if (it(t))
|
|
814
|
+
return o;
|
|
815
|
+
if (!E(t)) {
|
|
816
|
+
let i = F(t);
|
|
817
|
+
for (; i && !z(i); ) {
|
|
818
|
+
if (C(i) && !ut(i))
|
|
819
|
+
return i;
|
|
820
|
+
i = F(i);
|
|
821
|
+
}
|
|
822
|
+
return o;
|
|
823
|
+
}
|
|
824
|
+
let n = Et(t, e);
|
|
825
|
+
for (; n && fe(n) && ut(n); )
|
|
826
|
+
n = Et(n, e);
|
|
827
|
+
return n && z(n) && ut(n) && !gt(n) ? o : n || de(t) || o;
|
|
828
|
+
}
|
|
829
|
+
const Oe = async function(t) {
|
|
830
|
+
const e = this.getOffsetParent || Ht, o = this.getDimensions, n = await o(t.floating);
|
|
831
|
+
return {
|
|
832
|
+
reference: Ae(t.reference, await e(t.floating), t.strategy),
|
|
833
|
+
floating: {
|
|
834
|
+
x: 0,
|
|
835
|
+
y: 0,
|
|
836
|
+
width: n.width,
|
|
837
|
+
height: n.height
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
};
|
|
841
|
+
function Ce(t) {
|
|
842
|
+
return L(t).direction === "rtl";
|
|
843
|
+
}
|
|
844
|
+
const Le = {
|
|
845
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ge,
|
|
846
|
+
getDocumentElement: T,
|
|
847
|
+
getClippingRect: be,
|
|
848
|
+
getOffsetParent: Ht,
|
|
849
|
+
getElementRects: Oe,
|
|
850
|
+
getClientRects: pe,
|
|
851
|
+
getDimensions: Re,
|
|
852
|
+
getScale: I,
|
|
853
|
+
isElement: C,
|
|
854
|
+
isRTL: Ce
|
|
855
|
+
};
|
|
856
|
+
function _t(t, e) {
|
|
857
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
858
|
+
}
|
|
859
|
+
function Se(t, e) {
|
|
860
|
+
let o = null, n;
|
|
861
|
+
const i = T(t);
|
|
862
|
+
function r() {
|
|
863
|
+
var c;
|
|
864
|
+
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
865
|
+
}
|
|
866
|
+
function s(c, l) {
|
|
867
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
868
|
+
const f = t.getBoundingClientRect(), {
|
|
869
|
+
left: u,
|
|
870
|
+
top: a,
|
|
871
|
+
width: m,
|
|
872
|
+
height: d
|
|
873
|
+
} = f;
|
|
874
|
+
if (c || e(), !m || !d)
|
|
875
|
+
return;
|
|
876
|
+
const h = K(a), p = K(i.clientWidth - (u + m)), w = K(i.clientHeight - (a + d)), g = K(u), y = {
|
|
877
|
+
rootMargin: -h + "px " + -p + "px " + -w + "px " + -g + "px",
|
|
878
|
+
threshold: N(0, J(1, l)) || 1
|
|
879
|
+
};
|
|
880
|
+
let v = !0;
|
|
881
|
+
function A(b) {
|
|
882
|
+
const H = b[0].intersectionRatio;
|
|
883
|
+
if (H !== l) {
|
|
884
|
+
if (!v)
|
|
885
|
+
return s();
|
|
886
|
+
H ? s(!1, H) : n = setTimeout(() => {
|
|
887
|
+
s(!1, 1e-7);
|
|
888
|
+
}, 1e3);
|
|
889
|
+
}
|
|
890
|
+
H === 1 && !_t(f, t.getBoundingClientRect()) && s(), v = !1;
|
|
891
|
+
}
|
|
892
|
+
try {
|
|
893
|
+
o = new IntersectionObserver(A, {
|
|
894
|
+
...y,
|
|
895
|
+
// Handle <iframe>s
|
|
896
|
+
root: i.ownerDocument
|
|
897
|
+
});
|
|
898
|
+
} catch {
|
|
899
|
+
o = new IntersectionObserver(A, y);
|
|
900
|
+
}
|
|
901
|
+
o.observe(t);
|
|
902
|
+
}
|
|
903
|
+
return s(!0), r;
|
|
904
|
+
}
|
|
905
|
+
function Te(t, e, o, n) {
|
|
906
|
+
n === void 0 && (n = {});
|
|
907
|
+
const {
|
|
908
|
+
ancestorScroll: i = !0,
|
|
909
|
+
ancestorResize: r = !0,
|
|
910
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
911
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
912
|
+
animationFrame: l = !1
|
|
913
|
+
} = n, f = wt(t), u = i || r ? [...f ? U(f) : [], ...e ? U(e) : []] : [];
|
|
914
|
+
u.forEach((g) => {
|
|
915
|
+
i && g.addEventListener("scroll", o, {
|
|
916
|
+
passive: !0
|
|
917
|
+
}), r && g.addEventListener("resize", o);
|
|
918
|
+
});
|
|
919
|
+
const a = f && c ? Se(f, o) : null;
|
|
920
|
+
let m = -1, d = null;
|
|
921
|
+
s && (d = new ResizeObserver((g) => {
|
|
922
|
+
let [x] = g;
|
|
923
|
+
x && x.target === f && d && e && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
924
|
+
var y;
|
|
925
|
+
(y = d) == null || y.observe(e);
|
|
926
|
+
})), o();
|
|
927
|
+
}), f && !l && d.observe(f), e && d.observe(e));
|
|
928
|
+
let h, p = l ? V(t) : null;
|
|
929
|
+
l && w();
|
|
930
|
+
function w() {
|
|
931
|
+
const g = V(t);
|
|
932
|
+
p && !_t(p, g) && o(), p = g, h = requestAnimationFrame(w);
|
|
933
|
+
}
|
|
934
|
+
return o(), () => {
|
|
935
|
+
var g;
|
|
936
|
+
u.forEach((x) => {
|
|
937
|
+
i && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
|
|
938
|
+
}), a == null || a(), (g = d) == null || g.disconnect(), d = null, l && cancelAnimationFrame(h);
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
const Ee = ce, De = le, Pe = ie, Fe = (t, e, o) => {
|
|
942
|
+
const n = /* @__PURE__ */ new Map(), i = {
|
|
943
|
+
platform: Le,
|
|
944
|
+
...o
|
|
945
|
+
}, r = {
|
|
946
|
+
...i.platform,
|
|
947
|
+
_c: n
|
|
948
|
+
};
|
|
949
|
+
return oe(t, e, {
|
|
950
|
+
...i,
|
|
951
|
+
platform: r
|
|
952
|
+
});
|
|
953
|
+
};
|
|
954
|
+
function Ne(t, e, o = {}) {
|
|
955
|
+
const n = ft(0), i = ft(0), r = ft(o.placement || "bottom");
|
|
956
|
+
let s = null;
|
|
957
|
+
function c() {
|
|
958
|
+
const u = t.value, a = e.value;
|
|
959
|
+
!u || !a || Fe(u, a, {
|
|
960
|
+
placement: o.placement || "bottom",
|
|
961
|
+
middleware: [
|
|
962
|
+
Ee(o.offset !== void 0 ? o.offset : 8),
|
|
963
|
+
Pe(),
|
|
964
|
+
De({ padding: 8 })
|
|
965
|
+
]
|
|
966
|
+
}).then((m) => {
|
|
967
|
+
n.value = m.x, i.value = m.y, r.value = m.placement;
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
function l() {
|
|
971
|
+
!t.value || !e.value || (s = Te(t.value, e.value, c));
|
|
972
|
+
}
|
|
973
|
+
function f() {
|
|
974
|
+
s && (s(), s = null);
|
|
975
|
+
}
|
|
976
|
+
return bt([t, e], ([u, a]) => {
|
|
977
|
+
f(), u && a && l();
|
|
978
|
+
}, { flush: "post" }), bt(() => o.placement, () => {
|
|
979
|
+
t.value && e.value && c();
|
|
980
|
+
}), It(() => {
|
|
981
|
+
t.value && e.value && l();
|
|
982
|
+
}), zt(() => {
|
|
983
|
+
f();
|
|
984
|
+
}), {
|
|
985
|
+
x: n,
|
|
986
|
+
y: i,
|
|
987
|
+
placement: r,
|
|
988
|
+
update: c
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
let G = null, dt = null;
|
|
992
|
+
async function Be() {
|
|
993
|
+
return G || (dt || (dt = jt({
|
|
994
|
+
themes: ["one-dark-pro"],
|
|
995
|
+
langs: ["bash", "vue", "ts", "html", "css", "json"]
|
|
996
|
+
})), G = await dt, G);
|
|
997
|
+
}
|
|
998
|
+
const $ = Xt([]);
|
|
999
|
+
let Me = 0;
|
|
1000
|
+
function Ve() {
|
|
1001
|
+
const t = (n) => {
|
|
1002
|
+
const i = `lu-toast-${Me++}`, r = n.duration !== void 0 ? n.duration : 4e3, s = {
|
|
1003
|
+
id: i,
|
|
1004
|
+
title: n.title,
|
|
1005
|
+
description: n.description,
|
|
1006
|
+
variant: n.variant || "info",
|
|
1007
|
+
duration: r
|
|
1008
|
+
};
|
|
1009
|
+
return $.push(s), r > 0 && setTimeout(() => {
|
|
1010
|
+
e(i);
|
|
1011
|
+
}, r), i;
|
|
1012
|
+
}, e = (n) => {
|
|
1013
|
+
const i = $.findIndex((r) => r.id === n);
|
|
1014
|
+
i !== -1 && $.splice(i, 1);
|
|
1015
|
+
};
|
|
1016
|
+
return {
|
|
1017
|
+
toasts: $,
|
|
1018
|
+
toast: t,
|
|
1019
|
+
dismiss: e,
|
|
1020
|
+
dismissAll: () => {
|
|
1021
|
+
$.splice(0, $.length);
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
export {
|
|
1026
|
+
Ve as a,
|
|
1027
|
+
Be as g,
|
|
1028
|
+
Ne as u
|
|
1029
|
+
};
|