tuikit-atomicx-vue3 3.5.0-beta.7 → 3.5.0-beta.9
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/{PopoverTrigger-L8abAry7.js → PopoverTrigger-CglNN8IV.js} +3 -3
- package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-CQa08BXt.js} +1 -1
- package/dist/{Teleport-CSEuZbpM.js → Teleport-D3gvcBbZ.js} +278 -268
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +1 -1
- package/dist/components/LiveScenePanel/index.js +25 -24
- package/dist/components/MessageInput/AttachmentPicker/index.js +1 -1
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/styles/index.css +1 -1
- package/dist/{useId-CtirfF0W.js → useId-oQ5JZeuH.js} +1 -1
- package/dist/{utils-DaB7eSu5.js → utils-DuzSgmS6.js} +1 -1
- package/package.json +2 -2
- package/src/components/LiveScenePanel/index.vue +1 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { inject as Ee, provide as be, Fragment as
|
|
1
|
+
import { inject as Ee, provide as be, Fragment as Oe, effectScope as ue, getCurrentScope as we, onScopeDispose as Se, onBeforeUnmount as Pe, getCurrentInstance as x, computed as P, shallowRef as ae, watchEffect as L, readonly as Ae, customRef as _e, toValue as O, watch as T, isRef as K, reactive as W, unref as A, toRefs as G, ref as b, nextTick as M, onMounted as Ce, toHandlerKey as De, camelize as Te, onUnmounted as le, defineComponent as B, h as R, Comment as Le, mergeProps as Me, cloneVNode as Fe, createBlock as X, openBlock as Q, normalizeStyle as Ne, withCtx as ce, renderSlot as Z, createCommentVNode as Ie, Teleport as xe } from "vue";
|
|
2
2
|
function Be(e, t) {
|
|
3
3
|
const n = typeof e == "string" && !t ? `${e}Context` : t, r = Symbol(n);
|
|
4
4
|
return [(s) => {
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
5
|
+
const u = Ee(r, s);
|
|
6
|
+
if (u || u === null) return u;
|
|
7
7
|
throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e) ? `one of the following components: ${e.join(", ")}` : `\`${e}\``}`);
|
|
8
8
|
}, (s) => (be(r, s), s)];
|
|
9
9
|
}
|
|
@@ -21,11 +21,14 @@ function fe(e, t, n) {
|
|
|
21
21
|
});
|
|
22
22
|
t && r.addEventListener(e, t, { once: !0 }), r.dispatchEvent(o);
|
|
23
23
|
}
|
|
24
|
+
function ke(e) {
|
|
25
|
+
return e == null;
|
|
26
|
+
}
|
|
24
27
|
function ee(e) {
|
|
25
|
-
return e ? e.flatMap((t) => t.type ===
|
|
28
|
+
return e ? e.flatMap((t) => t.type === Oe ? ee(t.children) : [t]) : [];
|
|
26
29
|
}
|
|
27
|
-
const [
|
|
28
|
-
function
|
|
30
|
+
const [je] = Be("ConfigProvider");
|
|
31
|
+
function Dt(e, t) {
|
|
29
32
|
var n;
|
|
30
33
|
const r = ae();
|
|
31
34
|
return L(() => {
|
|
@@ -33,29 +36,29 @@ function Ct(e, t) {
|
|
|
33
36
|
}, {
|
|
34
37
|
...t,
|
|
35
38
|
flush: (n = void 0) != null ? n : "sync"
|
|
36
|
-
}),
|
|
39
|
+
}), Ae(r);
|
|
37
40
|
}
|
|
38
41
|
function te(e) {
|
|
39
|
-
return
|
|
42
|
+
return we() ? (Se(e), !0) : !1;
|
|
40
43
|
}
|
|
41
44
|
function Ue(e) {
|
|
42
45
|
let t = !1, n;
|
|
43
46
|
const r = ue(!0);
|
|
44
47
|
return (...o) => (t || (n = r.run(() => e(...o)), t = !0), n);
|
|
45
48
|
}
|
|
46
|
-
function
|
|
49
|
+
function Re(e) {
|
|
47
50
|
let t = 0, n, r;
|
|
48
51
|
const o = () => {
|
|
49
52
|
t -= 1, r && t <= 0 && (r.stop(), n = void 0, r = void 0);
|
|
50
53
|
};
|
|
51
54
|
return (...i) => (t += 1, r || (r = ue(!0), n = r.run(() => e(...i))), te(o), n);
|
|
52
55
|
}
|
|
53
|
-
function
|
|
56
|
+
function We(e) {
|
|
54
57
|
if (!K(e))
|
|
55
58
|
return W(e);
|
|
56
59
|
const t = new Proxy({}, {
|
|
57
60
|
get(n, r, o) {
|
|
58
|
-
return
|
|
61
|
+
return A(Reflect.get(e.value, r, o));
|
|
59
62
|
},
|
|
60
63
|
set(n, r, o) {
|
|
61
64
|
return K(e.value[r]) && !K(o) ? e.value[r].value = o : e.value[r] = o, !0;
|
|
@@ -78,46 +81,46 @@ function Re(e) {
|
|
|
78
81
|
});
|
|
79
82
|
return W(t);
|
|
80
83
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
84
|
+
function $e(e) {
|
|
85
|
+
return We(P(e));
|
|
83
86
|
}
|
|
84
|
-
function
|
|
87
|
+
function Tt(e, ...t) {
|
|
85
88
|
const n = t.flat(), r = n[0];
|
|
86
|
-
return
|
|
89
|
+
return $e(() => Object.fromEntries(typeof r == "function" ? Object.entries(G(e)).filter(([o, i]) => !r(O(i), o)) : Object.entries(G(e)).filter((o) => !n.includes(o[0]))));
|
|
87
90
|
}
|
|
88
|
-
const F = typeof window < "u" && typeof document < "u",
|
|
89
|
-
function
|
|
91
|
+
const F = typeof window < "u" && typeof document < "u", Ke = (e) => typeof e < "u", qe = Object.prototype.toString, He = (e) => qe.call(e) === "[object Object]", re = /* @__PURE__ */ Ve();
|
|
92
|
+
function Ve() {
|
|
90
93
|
var e, t;
|
|
91
94
|
return F && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
92
95
|
}
|
|
93
|
-
function
|
|
96
|
+
function ze(e) {
|
|
94
97
|
return x();
|
|
95
98
|
}
|
|
96
99
|
function q(e) {
|
|
97
100
|
return Array.isArray(e) ? e : [e];
|
|
98
101
|
}
|
|
99
|
-
function
|
|
102
|
+
function Lt(e, t = 1e4) {
|
|
100
103
|
return _e((n, r) => {
|
|
101
|
-
let o =
|
|
104
|
+
let o = O(e), i;
|
|
102
105
|
const s = () => setTimeout(() => {
|
|
103
|
-
o =
|
|
104
|
-
},
|
|
106
|
+
o = O(e), r();
|
|
107
|
+
}, O(t));
|
|
105
108
|
return te(() => {
|
|
106
109
|
clearTimeout(i);
|
|
107
110
|
}), {
|
|
108
111
|
get() {
|
|
109
112
|
return n(), o;
|
|
110
113
|
},
|
|
111
|
-
set(
|
|
112
|
-
o =
|
|
114
|
+
set(u) {
|
|
115
|
+
o = u, r(), clearTimeout(i), i = s();
|
|
113
116
|
}
|
|
114
117
|
};
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
120
|
+
function Ye(e, t) {
|
|
121
|
+
ze() && Pe(e, t);
|
|
119
122
|
}
|
|
120
|
-
function
|
|
123
|
+
function Ge(e, t, n) {
|
|
121
124
|
return T(
|
|
122
125
|
e,
|
|
123
126
|
t,
|
|
@@ -130,34 +133,34 @@ function Ye(e, t, n) {
|
|
|
130
133
|
const ne = F ? window : void 0;
|
|
131
134
|
function $(e) {
|
|
132
135
|
var t;
|
|
133
|
-
const n =
|
|
136
|
+
const n = O(e);
|
|
134
137
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
135
138
|
}
|
|
136
139
|
function de(...e) {
|
|
137
140
|
const t = [], n = () => {
|
|
138
|
-
t.forEach((
|
|
139
|
-
}, r = (
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
}), i =
|
|
141
|
+
t.forEach((u) => u()), t.length = 0;
|
|
142
|
+
}, r = (u, c, d, l) => (u.addEventListener(c, d, l), () => u.removeEventListener(c, d, l)), o = P(() => {
|
|
143
|
+
const u = q(O(e[0])).filter((c) => c != null);
|
|
144
|
+
return u.every((c) => typeof c != "string") ? u : void 0;
|
|
145
|
+
}), i = Ge(
|
|
143
146
|
() => {
|
|
144
|
-
var
|
|
147
|
+
var u, c;
|
|
145
148
|
return [
|
|
146
|
-
(c = (
|
|
147
|
-
q(
|
|
148
|
-
q(
|
|
149
|
+
(c = (u = o.value) == null ? void 0 : u.map((d) => $(d))) != null ? c : [ne].filter((d) => d != null),
|
|
150
|
+
q(O(o.value ? e[1] : e[0])),
|
|
151
|
+
q(A(o.value ? e[2] : e[1])),
|
|
149
152
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
150
|
-
|
|
153
|
+
O(o.value ? e[3] : e[2])
|
|
151
154
|
];
|
|
152
155
|
},
|
|
153
|
-
([
|
|
154
|
-
if (n(), !(
|
|
156
|
+
([u, c, d, l]) => {
|
|
157
|
+
if (n(), !(u != null && u.length) || !(c != null && c.length) || !(d != null && d.length))
|
|
155
158
|
return;
|
|
156
|
-
const
|
|
159
|
+
const a = He(l) ? { ...l } : l;
|
|
157
160
|
t.push(
|
|
158
|
-
...
|
|
159
|
-
(
|
|
160
|
-
(
|
|
161
|
+
...u.flatMap(
|
|
162
|
+
(v) => c.flatMap(
|
|
163
|
+
(f) => d.map((y) => r(v, f, y, a))
|
|
161
164
|
)
|
|
162
165
|
)
|
|
163
166
|
);
|
|
@@ -168,68 +171,68 @@ function de(...e) {
|
|
|
168
171
|
};
|
|
169
172
|
return te(n), s;
|
|
170
173
|
}
|
|
171
|
-
function
|
|
174
|
+
function Je() {
|
|
172
175
|
const e = ae(!1), t = x();
|
|
173
176
|
return t && Ce(() => {
|
|
174
177
|
e.value = !0;
|
|
175
178
|
}, t), e;
|
|
176
179
|
}
|
|
177
|
-
function
|
|
180
|
+
function Xe(e) {
|
|
178
181
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
179
182
|
}
|
|
180
|
-
function
|
|
183
|
+
function Qe(...e) {
|
|
181
184
|
let t, n, r = {};
|
|
182
185
|
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
183
186
|
const {
|
|
184
187
|
target: o = ne,
|
|
185
188
|
eventName: i = "keydown",
|
|
186
189
|
passive: s = !1,
|
|
187
|
-
dedupe:
|
|
188
|
-
} = r, c =
|
|
190
|
+
dedupe: u = !1
|
|
191
|
+
} = r, c = Xe(t);
|
|
189
192
|
return de(o, i, (l) => {
|
|
190
|
-
l.repeat &&
|
|
193
|
+
l.repeat && O(u) || c(l) && n(l);
|
|
191
194
|
}, s);
|
|
192
195
|
}
|
|
193
|
-
function
|
|
196
|
+
function Ze(e) {
|
|
194
197
|
return JSON.parse(JSON.stringify(e));
|
|
195
198
|
}
|
|
196
|
-
function
|
|
199
|
+
function Mt(e, t, n, r = {}) {
|
|
197
200
|
var o, i, s;
|
|
198
201
|
const {
|
|
199
|
-
clone:
|
|
202
|
+
clone: u = !1,
|
|
200
203
|
passive: c = !1,
|
|
201
|
-
eventName:
|
|
204
|
+
eventName: d,
|
|
202
205
|
deep: l = !1,
|
|
203
|
-
defaultValue:
|
|
204
|
-
shouldEmit:
|
|
205
|
-
} = r,
|
|
206
|
-
let
|
|
207
|
-
t || (t = "modelValue"),
|
|
208
|
-
const
|
|
209
|
-
|
|
206
|
+
defaultValue: a,
|
|
207
|
+
shouldEmit: v
|
|
208
|
+
} = r, f = x(), y = n || (f == null ? void 0 : f.emit) || ((o = f == null ? void 0 : f.$emit) == null ? void 0 : o.bind(f)) || ((s = (i = f == null ? void 0 : f.proxy) == null ? void 0 : i.$emit) == null ? void 0 : s.bind(f == null ? void 0 : f.proxy));
|
|
209
|
+
let p = d;
|
|
210
|
+
t || (t = "modelValue"), p = p || `update:${t.toString()}`;
|
|
211
|
+
const g = (E) => u ? typeof u == "function" ? u(E) : Ze(E) : E, m = () => Ke(e[t]) ? g(e[t]) : a, h = (E) => {
|
|
212
|
+
v ? v(E) && y(p, E) : y(p, E);
|
|
210
213
|
};
|
|
211
214
|
if (c) {
|
|
212
215
|
const E = m(), _ = b(E);
|
|
213
216
|
let C = !1;
|
|
214
217
|
return T(
|
|
215
218
|
() => e[t],
|
|
216
|
-
(
|
|
217
|
-
C || (C = !0, _.value =
|
|
219
|
+
(w) => {
|
|
220
|
+
C || (C = !0, _.value = g(w), M(() => C = !1));
|
|
218
221
|
}
|
|
219
222
|
), T(
|
|
220
223
|
_,
|
|
221
|
-
(
|
|
222
|
-
!C && (
|
|
224
|
+
(w) => {
|
|
225
|
+
!C && (w !== e[t] || l) && h(w);
|
|
223
226
|
},
|
|
224
227
|
{ deep: l }
|
|
225
228
|
), _;
|
|
226
229
|
} else
|
|
227
|
-
return
|
|
230
|
+
return P({
|
|
228
231
|
get() {
|
|
229
232
|
return m();
|
|
230
233
|
},
|
|
231
234
|
set(E) {
|
|
232
|
-
|
|
235
|
+
h(E);
|
|
233
236
|
}
|
|
234
237
|
});
|
|
235
238
|
}
|
|
@@ -256,40 +259,40 @@ function J(e, t, n = ".", r) {
|
|
|
256
259
|
}
|
|
257
260
|
return o;
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function et(e) {
|
|
260
263
|
return (...t) => (
|
|
261
264
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
262
265
|
t.reduce((n, r) => J(n, r, "", e), {})
|
|
263
266
|
);
|
|
264
267
|
}
|
|
265
|
-
const
|
|
266
|
-
const e = b(/* @__PURE__ */ new Map()), t = b(), n =
|
|
268
|
+
const tt = et(), nt = Re(() => {
|
|
269
|
+
const e = b(/* @__PURE__ */ new Map()), t = b(), n = P(() => {
|
|
267
270
|
for (const s of e.value.values()) if (s) return !0;
|
|
268
271
|
return !1;
|
|
269
|
-
}), r =
|
|
272
|
+
}), r = je({ scrollBody: b(!0) });
|
|
270
273
|
let o = null;
|
|
271
274
|
const i = () => {
|
|
272
275
|
document.body.style.paddingRight = "", document.body.style.marginRight = "", document.body.style.pointerEvents = "", document.documentElement.style.removeProperty("--scrollbar-width"), document.body.style.overflow = t.value ?? "", re && (o == null || o()), t.value = void 0;
|
|
273
276
|
};
|
|
274
|
-
return T(n, (s,
|
|
275
|
-
var
|
|
277
|
+
return T(n, (s, u) => {
|
|
278
|
+
var a;
|
|
276
279
|
if (!F) return;
|
|
277
280
|
if (!s) {
|
|
278
|
-
|
|
281
|
+
u && i();
|
|
279
282
|
return;
|
|
280
283
|
}
|
|
281
284
|
t.value === void 0 && (t.value = document.body.style.overflow);
|
|
282
|
-
const c = window.innerWidth - document.documentElement.clientWidth,
|
|
285
|
+
const c = window.innerWidth - document.documentElement.clientWidth, d = {
|
|
283
286
|
padding: c,
|
|
284
287
|
margin: 0
|
|
285
|
-
}, l = (
|
|
288
|
+
}, l = (a = r.scrollBody) != null && a.value ? typeof r.scrollBody.value == "object" ? tt({
|
|
286
289
|
padding: r.scrollBody.value.padding === !0 ? c : r.scrollBody.value.padding,
|
|
287
290
|
margin: r.scrollBody.value.margin === !0 ? c : r.scrollBody.value.margin
|
|
288
|
-
},
|
|
291
|
+
}, d) : d : {
|
|
289
292
|
padding: 0,
|
|
290
293
|
margin: 0
|
|
291
294
|
};
|
|
292
|
-
c > 0 && (document.body.style.paddingRight = typeof l.padding == "number" ? `${l.padding}px` : String(l.padding), document.body.style.marginRight = typeof l.margin == "number" ? `${l.margin}px` : String(l.margin), document.documentElement.style.setProperty("--scrollbar-width", `${c}px`), document.body.style.overflow = "hidden"), re && (o = de(document, "touchmove", (
|
|
295
|
+
c > 0 && (document.body.style.paddingRight = typeof l.padding == "number" ? `${l.padding}px` : String(l.padding), document.body.style.marginRight = typeof l.margin == "number" ? `${l.margin}px` : String(l.margin), document.documentElement.style.setProperty("--scrollbar-width", `${c}px`), document.body.style.overflow = "hidden"), re && (o = de(document, "touchmove", (v) => rt(v), { passive: !1 })), M(() => {
|
|
293
296
|
document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden";
|
|
294
297
|
});
|
|
295
298
|
}, {
|
|
@@ -297,14 +300,14 @@ const et = Ze(), tt = je(() => {
|
|
|
297
300
|
flush: "sync"
|
|
298
301
|
}), e;
|
|
299
302
|
});
|
|
300
|
-
function
|
|
301
|
-
const t = Math.random().toString(36).substring(2, 7), n =
|
|
303
|
+
function Ft(e) {
|
|
304
|
+
const t = Math.random().toString(36).substring(2, 7), n = nt();
|
|
302
305
|
n.value.set(t, e ?? !1);
|
|
303
|
-
const r =
|
|
306
|
+
const r = P({
|
|
304
307
|
get: () => n.value.get(t) ?? !1,
|
|
305
308
|
set: (o) => n.value.set(t, o)
|
|
306
309
|
});
|
|
307
|
-
return
|
|
310
|
+
return Ye(() => {
|
|
308
311
|
n.value.delete(t);
|
|
309
312
|
}), r;
|
|
310
313
|
}
|
|
@@ -316,20 +319,20 @@ function ve(e) {
|
|
|
316
319
|
return !(n instanceof Element) || n.tagName === "BODY" ? !1 : ve(n);
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
|
-
function
|
|
322
|
+
function rt(e) {
|
|
320
323
|
const t = e || window.event, n = t.target;
|
|
321
324
|
return n instanceof Element && ve(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.cancelable && t.preventDefault(), !1);
|
|
322
325
|
}
|
|
323
|
-
function
|
|
326
|
+
function Nt(e) {
|
|
324
327
|
const t = x(), n = t == null ? void 0 : t.type.emits, r = {};
|
|
325
328
|
return n != null && n.length || console.warn(`No emitted event found. Please check component: ${t == null ? void 0 : t.type.__name}`), n == null || n.forEach((o) => {
|
|
326
329
|
r[De(Te(o))] = (...i) => e(o, ...i);
|
|
327
330
|
}), r;
|
|
328
331
|
}
|
|
329
332
|
function pe() {
|
|
330
|
-
const e = x(), t = b(), n =
|
|
331
|
-
var s,
|
|
332
|
-
return ["#text", "#comment"].includes((s = t.value) == null ? void 0 : s.$el.nodeName) ? (
|
|
333
|
+
const e = x(), t = b(), n = P(() => {
|
|
334
|
+
var s, u;
|
|
335
|
+
return ["#text", "#comment"].includes((s = t.value) == null ? void 0 : s.$el.nodeName) ? (u = t.value) == null ? void 0 : u.$el.nextElementSibling : $(t);
|
|
333
336
|
}), r = Object.assign({}, e.exposed), o = {};
|
|
334
337
|
for (const s in e.props) Object.defineProperty(o, s, {
|
|
335
338
|
enumerable: !0,
|
|
@@ -347,11 +350,19 @@ function pe() {
|
|
|
347
350
|
get: () => e.vnode.el
|
|
348
351
|
}), e.exposed = o;
|
|
349
352
|
function i(s) {
|
|
350
|
-
t.value = s, s && (Object.defineProperty(o, "$el", {
|
|
353
|
+
if (t.value = s, !!s && (Object.defineProperty(o, "$el", {
|
|
351
354
|
enumerable: !0,
|
|
352
355
|
configurable: !0,
|
|
353
356
|
get: () => s instanceof Element ? s : s.$el
|
|
354
|
-
}),
|
|
357
|
+
}), !(s instanceof Element) && !Object.hasOwn(s, "$el"))) {
|
|
358
|
+
const u = s.$.exposed, c = Object.assign({}, o);
|
|
359
|
+
for (const d in u) Object.defineProperty(c, d, {
|
|
360
|
+
enumerable: !0,
|
|
361
|
+
configurable: !0,
|
|
362
|
+
get: () => u[d]
|
|
363
|
+
});
|
|
364
|
+
e.exposed = c;
|
|
365
|
+
}
|
|
355
366
|
}
|
|
356
367
|
return {
|
|
357
368
|
forwardRef: i,
|
|
@@ -359,14 +370,14 @@ function pe() {
|
|
|
359
370
|
currentElement: n
|
|
360
371
|
};
|
|
361
372
|
}
|
|
362
|
-
var
|
|
373
|
+
var ot = function(e) {
|
|
363
374
|
if (typeof document > "u")
|
|
364
375
|
return null;
|
|
365
376
|
var t = Array.isArray(e) ? e[0] : e;
|
|
366
377
|
return t.ownerDocument.body;
|
|
367
|
-
}, N = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(),
|
|
378
|
+
}, N = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), j = {}, V = 0, me = function(e) {
|
|
368
379
|
return e && (e.host || me(e.parentNode));
|
|
369
|
-
},
|
|
380
|
+
}, it = function(e, t) {
|
|
370
381
|
return t.map(function(n) {
|
|
371
382
|
if (e.contains(n))
|
|
372
383
|
return n;
|
|
@@ -375,48 +386,48 @@ var rt = function(e) {
|
|
|
375
386
|
}).filter(function(n) {
|
|
376
387
|
return !!n;
|
|
377
388
|
});
|
|
378
|
-
},
|
|
379
|
-
var o =
|
|
380
|
-
|
|
381
|
-
var i =
|
|
382
|
-
!
|
|
389
|
+
}, st = function(e, t, n, r) {
|
|
390
|
+
var o = it(t, Array.isArray(e) ? e : [e]);
|
|
391
|
+
j[n] || (j[n] = /* @__PURE__ */ new WeakMap());
|
|
392
|
+
var i = j[n], s = [], u = /* @__PURE__ */ new Set(), c = new Set(o), d = function(a) {
|
|
393
|
+
!a || u.has(a) || (u.add(a), d(a.parentNode));
|
|
383
394
|
};
|
|
384
|
-
o.forEach(
|
|
385
|
-
var l = function(
|
|
386
|
-
!
|
|
387
|
-
if (
|
|
388
|
-
l(
|
|
395
|
+
o.forEach(d);
|
|
396
|
+
var l = function(a) {
|
|
397
|
+
!a || c.has(a) || Array.prototype.forEach.call(a.children, function(v) {
|
|
398
|
+
if (u.has(v))
|
|
399
|
+
l(v);
|
|
389
400
|
else
|
|
390
401
|
try {
|
|
391
|
-
var
|
|
392
|
-
N.set(
|
|
402
|
+
var f = v.getAttribute(r), y = f !== null && f !== "false", p = (N.get(v) || 0) + 1, g = (i.get(v) || 0) + 1;
|
|
403
|
+
N.set(v, p), i.set(v, g), s.push(v), p === 1 && y && k.set(v, !0), g === 1 && v.setAttribute(n, "true"), y || v.setAttribute(r, "true");
|
|
393
404
|
} catch (m) {
|
|
394
|
-
console.error("aria-hidden: cannot operate on ",
|
|
405
|
+
console.error("aria-hidden: cannot operate on ", v, m);
|
|
395
406
|
}
|
|
396
407
|
});
|
|
397
408
|
};
|
|
398
|
-
return l(t),
|
|
399
|
-
s.forEach(function(
|
|
400
|
-
var
|
|
401
|
-
N.set(
|
|
402
|
-
}), V--, V || (N = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(),
|
|
409
|
+
return l(t), u.clear(), V++, function() {
|
|
410
|
+
s.forEach(function(a) {
|
|
411
|
+
var v = N.get(a) - 1, f = i.get(a) - 1;
|
|
412
|
+
N.set(a, v), i.set(a, f), v || (k.has(a) || a.removeAttribute(r), k.delete(a)), f || a.removeAttribute(n);
|
|
413
|
+
}), V--, V || (N = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), j = {});
|
|
403
414
|
};
|
|
404
|
-
},
|
|
415
|
+
}, ut = function(e, t, n) {
|
|
405
416
|
n === void 0 && (n = "data-aria-hidden");
|
|
406
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
407
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))),
|
|
417
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = ot(e);
|
|
418
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), st(r, o, n, "aria-hidden")) : function() {
|
|
408
419
|
return null;
|
|
409
420
|
};
|
|
410
421
|
};
|
|
411
|
-
function
|
|
422
|
+
function It(e) {
|
|
412
423
|
let t;
|
|
413
424
|
T(() => $(e), (n) => {
|
|
414
|
-
n ? t =
|
|
425
|
+
n ? t = ut(n) : t && t();
|
|
415
426
|
}), le(() => {
|
|
416
427
|
t && t();
|
|
417
428
|
});
|
|
418
429
|
}
|
|
419
|
-
function
|
|
430
|
+
function at(e, t) {
|
|
420
431
|
const n = b(e);
|
|
421
432
|
function r(i) {
|
|
422
433
|
return t[n.value][i] ?? n.value;
|
|
@@ -428,11 +439,11 @@ function ut(e, t) {
|
|
|
428
439
|
}
|
|
429
440
|
};
|
|
430
441
|
}
|
|
431
|
-
function
|
|
432
|
-
var
|
|
442
|
+
function lt(e, t) {
|
|
443
|
+
var g;
|
|
433
444
|
const n = b({}), r = b("none"), o = b(e), i = e.value ? "mounted" : "unmounted";
|
|
434
445
|
let s;
|
|
435
|
-
const
|
|
446
|
+
const u = ((g = t.value) == null ? void 0 : g.ownerDocument.defaultView) ?? ne, { state: c, dispatch: d } = at(i, {
|
|
436
447
|
mounted: {
|
|
437
448
|
UNMOUNT: "unmounted",
|
|
438
449
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -443,49 +454,49 @@ function at(e, t) {
|
|
|
443
454
|
},
|
|
444
455
|
unmounted: { MOUNT: "mounted" }
|
|
445
456
|
}), l = (m) => {
|
|
446
|
-
var
|
|
457
|
+
var h;
|
|
447
458
|
if (F) {
|
|
448
459
|
const E = new CustomEvent(m, {
|
|
449
460
|
bubbles: !1,
|
|
450
461
|
cancelable: !1
|
|
451
462
|
});
|
|
452
|
-
(
|
|
463
|
+
(h = t.value) == null || h.dispatchEvent(E);
|
|
453
464
|
}
|
|
454
465
|
};
|
|
455
|
-
T(e, async (m,
|
|
466
|
+
T(e, async (m, h) => {
|
|
456
467
|
var _;
|
|
457
|
-
const E =
|
|
468
|
+
const E = h !== m;
|
|
458
469
|
if (await M(), E) {
|
|
459
|
-
const C = r.value,
|
|
460
|
-
m ? (
|
|
470
|
+
const C = r.value, w = U(t.value);
|
|
471
|
+
m ? (d("MOUNT"), l("enter"), w === "none" && l("after-enter")) : w === "none" || w === "undefined" || ((_ = n.value) == null ? void 0 : _.display) === "none" ? (d("UNMOUNT"), l("leave"), l("after-leave")) : h && C !== w ? (d("ANIMATION_OUT"), l("leave")) : (d("UNMOUNT"), l("after-leave"));
|
|
461
472
|
}
|
|
462
473
|
}, { immediate: !0 });
|
|
463
|
-
const
|
|
464
|
-
const
|
|
465
|
-
if (m.target === t.value && E && (l(`after-${_}`),
|
|
474
|
+
const a = (m) => {
|
|
475
|
+
const h = U(t.value), E = h.includes(CSS.escape(m.animationName)), _ = c.value === "mounted" ? "enter" : "leave";
|
|
476
|
+
if (m.target === t.value && E && (l(`after-${_}`), d("ANIMATION_END"), !o.value)) {
|
|
466
477
|
const C = t.value.style.animationFillMode;
|
|
467
|
-
t.value.style.animationFillMode = "forwards", s =
|
|
468
|
-
var
|
|
469
|
-
((
|
|
478
|
+
t.value.style.animationFillMode = "forwards", s = u == null ? void 0 : u.setTimeout(() => {
|
|
479
|
+
var w;
|
|
480
|
+
((w = t.value) == null ? void 0 : w.style.animationFillMode) === "forwards" && (t.value.style.animationFillMode = C);
|
|
470
481
|
});
|
|
471
482
|
}
|
|
472
|
-
m.target === t.value &&
|
|
473
|
-
},
|
|
474
|
-
m.target === t.value && (r.value =
|
|
475
|
-
},
|
|
476
|
-
m ? (n.value = getComputedStyle(m), m.addEventListener("animationstart",
|
|
477
|
-
}, { immediate: !0 }),
|
|
478
|
-
const m =
|
|
483
|
+
m.target === t.value && h === "none" && d("ANIMATION_END");
|
|
484
|
+
}, v = (m) => {
|
|
485
|
+
m.target === t.value && (r.value = U(t.value));
|
|
486
|
+
}, f = T(t, (m, h) => {
|
|
487
|
+
m ? (n.value = getComputedStyle(m), m.addEventListener("animationstart", v), m.addEventListener("animationcancel", a), m.addEventListener("animationend", a)) : (d("ANIMATION_END"), s !== void 0 && (u == null || u.clearTimeout(s)), h == null || h.removeEventListener("animationstart", v), h == null || h.removeEventListener("animationcancel", a), h == null || h.removeEventListener("animationend", a));
|
|
488
|
+
}, { immediate: !0 }), y = T(c, () => {
|
|
489
|
+
const m = U(t.value);
|
|
479
490
|
r.value = c.value === "mounted" ? m : "none";
|
|
480
491
|
});
|
|
481
492
|
return le(() => {
|
|
482
|
-
|
|
483
|
-
}), { isPresent:
|
|
493
|
+
f(), y();
|
|
494
|
+
}), { isPresent: P(() => ["mounted", "unmountSuspended"].includes(c.value)) };
|
|
484
495
|
}
|
|
485
|
-
function
|
|
496
|
+
function U(e) {
|
|
486
497
|
return e && getComputedStyle(e).animationName || "none";
|
|
487
498
|
}
|
|
488
|
-
var
|
|
499
|
+
var xt = B({
|
|
489
500
|
name: "Presence",
|
|
490
501
|
props: {
|
|
491
502
|
present: {
|
|
@@ -496,49 +507,49 @@ var It = B({
|
|
|
496
507
|
},
|
|
497
508
|
slots: {},
|
|
498
509
|
setup(e, { slots: t, expose: n }) {
|
|
499
|
-
var
|
|
500
|
-
const { present: r, forceMount: o } = G(e), i = b(), { isPresent: s } =
|
|
510
|
+
var d;
|
|
511
|
+
const { present: r, forceMount: o } = G(e), i = b(), { isPresent: s } = lt(r, i);
|
|
501
512
|
n({ present: s });
|
|
502
|
-
let
|
|
503
|
-
|
|
513
|
+
let u = t.default({ present: s.value });
|
|
514
|
+
u = ee(u || []);
|
|
504
515
|
const c = x();
|
|
505
|
-
if (
|
|
506
|
-
const l = (
|
|
516
|
+
if (u && (u == null ? void 0 : u.length) > 1) {
|
|
517
|
+
const l = (d = c == null ? void 0 : c.parent) != null && d.type.name ? `<${c.parent.type.name} />` : "component";
|
|
507
518
|
throw new Error([
|
|
508
519
|
`Detected an invalid children for \`${l}\` for \`Presence\` component.`,
|
|
509
520
|
"",
|
|
510
521
|
"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",
|
|
511
522
|
"You can apply a few solutions:",
|
|
512
|
-
["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((
|
|
523
|
+
["Provide a single child element so that `presence` directive attach correctly.", "Ensure the first child is an actual element instead of a raw text node or comment node."].map((a) => ` - ${a}`).join(`
|
|
513
524
|
`)
|
|
514
525
|
].join(`
|
|
515
526
|
`));
|
|
516
527
|
}
|
|
517
528
|
return () => o.value || r.value || s.value ? R(t.default({ present: s.value })[0], { ref: (l) => {
|
|
518
|
-
const
|
|
519
|
-
return typeof (
|
|
529
|
+
const a = $(l);
|
|
530
|
+
return typeof (a == null ? void 0 : a.hasAttribute) > "u" || (a != null && a.hasAttribute("data-reka-popper-content-wrapper") ? i.value = a.firstElementChild : i.value = a), a;
|
|
520
531
|
} }) : null;
|
|
521
532
|
}
|
|
522
533
|
});
|
|
523
|
-
const
|
|
534
|
+
const ct = B({
|
|
524
535
|
name: "PrimitiveSlot",
|
|
525
536
|
inheritAttrs: !1,
|
|
526
537
|
setup(e, { attrs: t, slots: n }) {
|
|
527
538
|
return () => {
|
|
528
539
|
var c;
|
|
529
540
|
if (!n.default) return null;
|
|
530
|
-
const r = ee(n.default()), o = r.findIndex((
|
|
541
|
+
const r = ee(n.default()), o = r.findIndex((d) => d.type !== Le);
|
|
531
542
|
if (o === -1) return r;
|
|
532
543
|
const i = r[o];
|
|
533
544
|
(c = i.props) == null || delete c.ref;
|
|
534
|
-
const s = i.props ? Me(t, i.props) : t,
|
|
545
|
+
const s = i.props ? Me(t, i.props) : t, u = Fe({
|
|
535
546
|
...i,
|
|
536
547
|
props: {}
|
|
537
548
|
}, s);
|
|
538
|
-
return r.length === 1 ?
|
|
549
|
+
return r.length === 1 ? u : (r[o] = u, r);
|
|
539
550
|
};
|
|
540
551
|
}
|
|
541
|
-
}),
|
|
552
|
+
}), ft = [
|
|
542
553
|
"area",
|
|
543
554
|
"img",
|
|
544
555
|
"input"
|
|
@@ -557,72 +568,73 @@ const lt = B({
|
|
|
557
568
|
},
|
|
558
569
|
setup(e, { attrs: t, slots: n }) {
|
|
559
570
|
const r = e.asChild ? "template" : e.as;
|
|
560
|
-
return typeof r == "string" &&
|
|
571
|
+
return typeof r == "string" && ft.includes(r) ? () => R(r, t) : r !== "template" ? () => R(e.as, t, { default: n.default }) : () => R(ct, t, { default: n.default });
|
|
561
572
|
}
|
|
562
|
-
}),
|
|
573
|
+
}), dt = "dismissableLayer.pointerDownOutside", vt = "dismissableLayer.focusOutside";
|
|
563
574
|
function he(e, t) {
|
|
564
575
|
const n = t.closest("[data-dismissable-layer]"), r = e.dataset.dismissableLayer === "" ? e : e.querySelector("[data-dismissable-layer]"), o = Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));
|
|
565
576
|
return !!(n && (r === n || o.indexOf(r) < o.indexOf(n)));
|
|
566
577
|
}
|
|
567
|
-
function
|
|
578
|
+
function pt(e, t, n = !0) {
|
|
568
579
|
var s;
|
|
569
580
|
const r = ((s = t == null ? void 0 : t.value) == null ? void 0 : s.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), o = b(!1), i = b(() => {
|
|
570
581
|
});
|
|
571
|
-
return L((
|
|
572
|
-
if (!F || !
|
|
582
|
+
return L((u) => {
|
|
583
|
+
if (!F || !O(n)) return;
|
|
573
584
|
const c = async (l) => {
|
|
574
|
-
const
|
|
575
|
-
if (!(!(t != null && t.value) || !
|
|
576
|
-
if (he(t.value,
|
|
585
|
+
const a = l.target;
|
|
586
|
+
if (!(!(t != null && t.value) || !a)) {
|
|
587
|
+
if (he(t.value, a)) {
|
|
577
588
|
o.value = !1;
|
|
578
589
|
return;
|
|
579
590
|
}
|
|
580
591
|
if (l.target && !o.value) {
|
|
581
|
-
let
|
|
582
|
-
fe(
|
|
592
|
+
let f = function() {
|
|
593
|
+
fe(dt, e, v);
|
|
583
594
|
};
|
|
584
|
-
const
|
|
585
|
-
l.pointerType === "touch" ? (r.removeEventListener("click", i.value), i.value =
|
|
595
|
+
const v = { originalEvent: l };
|
|
596
|
+
l.pointerType === "touch" ? (r.removeEventListener("click", i.value), i.value = f, r.addEventListener("click", i.value, { once: !0 })) : f();
|
|
586
597
|
} else r.removeEventListener("click", i.value);
|
|
587
598
|
o.value = !1;
|
|
588
599
|
}
|
|
589
|
-
},
|
|
600
|
+
}, d = window.setTimeout(() => {
|
|
590
601
|
r.addEventListener("pointerdown", c);
|
|
591
602
|
}, 0);
|
|
592
|
-
|
|
593
|
-
window.clearTimeout(
|
|
603
|
+
u(() => {
|
|
604
|
+
window.clearTimeout(d), r.removeEventListener("pointerdown", c), r.removeEventListener("click", i.value);
|
|
594
605
|
});
|
|
595
606
|
}), { onPointerDownCapture: () => {
|
|
596
|
-
|
|
607
|
+
O(n) && (o.value = !0);
|
|
597
608
|
} };
|
|
598
609
|
}
|
|
599
|
-
function
|
|
610
|
+
function mt(e, t, n = !0) {
|
|
600
611
|
var i;
|
|
601
612
|
const r = ((i = t == null ? void 0 : t.value) == null ? void 0 : i.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), o = b(!1);
|
|
602
613
|
return L((s) => {
|
|
603
|
-
if (!F || !
|
|
604
|
-
const
|
|
614
|
+
if (!F || !O(n)) return;
|
|
615
|
+
const u = async (c) => {
|
|
605
616
|
if (!(t != null && t.value)) return;
|
|
606
617
|
await M(), await M();
|
|
607
|
-
const
|
|
608
|
-
!t.value || !
|
|
618
|
+
const d = c.target;
|
|
619
|
+
!t.value || !d || he(t.value, d) || c.target && !o.value && fe(vt, e, { originalEvent: c });
|
|
609
620
|
};
|
|
610
|
-
r.addEventListener("focusin",
|
|
621
|
+
r.addEventListener("focusin", u), s(() => r.removeEventListener("focusin", u));
|
|
611
622
|
}), {
|
|
612
623
|
onFocusCapture: () => {
|
|
613
|
-
|
|
624
|
+
O(n) && (o.value = !0);
|
|
614
625
|
},
|
|
615
626
|
onBlurCapture: () => {
|
|
616
|
-
|
|
627
|
+
O(n) && (o.value = !1);
|
|
617
628
|
}
|
|
618
629
|
};
|
|
619
630
|
}
|
|
620
|
-
const
|
|
631
|
+
const S = W({
|
|
621
632
|
layersRoot: /* @__PURE__ */ new Set(),
|
|
622
633
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
634
|
+
originalBodyPointerEvents: void 0,
|
|
623
635
|
branches: /* @__PURE__ */ new Set()
|
|
624
636
|
});
|
|
625
|
-
var
|
|
637
|
+
var yt = /* @__PURE__ */ B({
|
|
626
638
|
__name: "DismissableLayer",
|
|
627
639
|
props: {
|
|
628
640
|
disableOutsidePointerEvents: {
|
|
@@ -647,39 +659,37 @@ var mt = /* @__PURE__ */ B({
|
|
|
647
659
|
"dismiss"
|
|
648
660
|
],
|
|
649
661
|
setup(e, { emit: t }) {
|
|
650
|
-
const n = e, r = t, { forwardRef: o, currentElement: i } = pe(), s =
|
|
662
|
+
const n = e, r = t, { forwardRef: o, currentElement: i } = pe(), s = P(() => {
|
|
651
663
|
var f;
|
|
652
664
|
return ((f = i.value) == null ? void 0 : f.ownerDocument) ?? globalThis.document;
|
|
653
|
-
}),
|
|
654
|
-
const f = Array.from(
|
|
655
|
-
return c.value >=
|
|
656
|
-
}),
|
|
657
|
-
const
|
|
658
|
-
!l.value ||
|
|
659
|
-
}, i),
|
|
660
|
-
[...
|
|
665
|
+
}), u = P(() => S.layersRoot), c = P(() => i.value ? Array.from(u.value).indexOf(i.value) : -1), d = P(() => S.layersWithOutsidePointerEventsDisabled.size > 0), l = P(() => {
|
|
666
|
+
const f = Array.from(u.value), [y] = [...S.layersWithOutsidePointerEventsDisabled].slice(-1), p = f.indexOf(y);
|
|
667
|
+
return c.value >= p;
|
|
668
|
+
}), a = pt(async (f) => {
|
|
669
|
+
const y = [...S.branches].some((p) => p == null ? void 0 : p.contains(f.target));
|
|
670
|
+
!l.value || y || (r("pointerDownOutside", f), r("interactOutside", f), await M(), f.defaultPrevented || r("dismiss"));
|
|
671
|
+
}, i), v = mt((f) => {
|
|
672
|
+
[...S.branches].some((p) => p == null ? void 0 : p.contains(f.target)) || (r("focusOutside", f), r("interactOutside", f), f.defaultPrevented || r("dismiss"));
|
|
661
673
|
}, i);
|
|
662
|
-
|
|
663
|
-
c.value ===
|
|
664
|
-
})
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
i.value && (n.disableOutsidePointerEvents && (A.layersWithOutsidePointerEventsDisabled.size === 0 && (p = s.value.body.style.pointerEvents, s.value.body.style.pointerEvents = "none"), A.layersWithOutsidePointerEventsDisabled.add(i.value)), a.value.add(i.value), f(() => {
|
|
668
|
-
n.disableOutsidePointerEvents && A.layersWithOutsidePointerEventsDisabled.size === 1 && (s.value.body.style.pointerEvents = p);
|
|
674
|
+
return Qe("Escape", (f) => {
|
|
675
|
+
c.value === u.value.size - 1 && (r("escapeKeyDown", f), f.defaultPrevented || r("dismiss"));
|
|
676
|
+
}), L((f) => {
|
|
677
|
+
i.value && (n.disableOutsidePointerEvents && (S.layersWithOutsidePointerEventsDisabled.size === 0 && (S.originalBodyPointerEvents = s.value.body.style.pointerEvents, s.value.body.style.pointerEvents = "none"), S.layersWithOutsidePointerEventsDisabled.add(i.value)), u.value.add(i.value), f(() => {
|
|
678
|
+
n.disableOutsidePointerEvents && S.layersWithOutsidePointerEventsDisabled.size === 1 && !ke(S.originalBodyPointerEvents) && (s.value.body.style.pointerEvents = S.originalBodyPointerEvents);
|
|
669
679
|
}));
|
|
670
680
|
}), L((f) => {
|
|
671
681
|
f(() => {
|
|
672
|
-
i.value && (
|
|
682
|
+
i.value && (u.value.delete(i.value), S.layersWithOutsidePointerEventsDisabled.delete(i.value));
|
|
673
683
|
});
|
|
674
|
-
}), (f,
|
|
675
|
-
ref:
|
|
684
|
+
}), (f, y) => (Q(), X(A(ye), {
|
|
685
|
+
ref: A(o),
|
|
676
686
|
"as-child": f.asChild,
|
|
677
687
|
as: f.as,
|
|
678
688
|
"data-dismissable-layer": "",
|
|
679
|
-
style: Ne({ pointerEvents:
|
|
680
|
-
onFocusCapture:
|
|
681
|
-
onBlurCapture:
|
|
682
|
-
onPointerdownCapture:
|
|
689
|
+
style: Ne({ pointerEvents: d.value ? l.value ? "auto" : "none" : void 0 }),
|
|
690
|
+
onFocusCapture: A(v).onFocusCapture,
|
|
691
|
+
onBlurCapture: A(v).onBlurCapture,
|
|
692
|
+
onPointerdownCapture: A(a).onPointerDownCapture
|
|
683
693
|
}, {
|
|
684
694
|
default: ce(() => [Z(f.$slots, "default")]),
|
|
685
695
|
_: 3
|
|
@@ -692,10 +702,10 @@ var mt = /* @__PURE__ */ B({
|
|
|
692
702
|
"onPointerdownCapture"
|
|
693
703
|
]));
|
|
694
704
|
}
|
|
695
|
-
}),
|
|
696
|
-
const
|
|
697
|
-
function
|
|
698
|
-
const e =
|
|
705
|
+
}), Bt = yt;
|
|
706
|
+
const ht = Ue(() => b([]));
|
|
707
|
+
function gt() {
|
|
708
|
+
const e = ht();
|
|
699
709
|
return {
|
|
700
710
|
add(t) {
|
|
701
711
|
const n = e.value[0];
|
|
@@ -711,19 +721,19 @@ function oe(e, t) {
|
|
|
711
721
|
const n = [...e], r = n.indexOf(t);
|
|
712
722
|
return r !== -1 && n.splice(r, 1), n;
|
|
713
723
|
}
|
|
714
|
-
function
|
|
724
|
+
function Et(e) {
|
|
715
725
|
return e.filter((t) => t.tagName !== "A");
|
|
716
726
|
}
|
|
717
727
|
const z = "focusScope.autoFocusOnMount", Y = "focusScope.autoFocusOnUnmount", ie = {
|
|
718
728
|
bubbles: !1,
|
|
719
729
|
cancelable: !0
|
|
720
730
|
};
|
|
721
|
-
function
|
|
731
|
+
function bt(e, { select: t = !1 } = {}) {
|
|
722
732
|
const n = I();
|
|
723
733
|
for (const r of e)
|
|
724
734
|
if (D(r, { select: t }), I() !== n) return !0;
|
|
725
735
|
}
|
|
726
|
-
function
|
|
736
|
+
function Ot(e) {
|
|
727
737
|
const t = ge(e), n = se(t, e), r = se(t.reverse(), e);
|
|
728
738
|
return [n, r];
|
|
729
739
|
}
|
|
@@ -747,16 +757,16 @@ function wt(e, { upTo: t }) {
|
|
|
747
757
|
}
|
|
748
758
|
return !1;
|
|
749
759
|
}
|
|
750
|
-
function
|
|
760
|
+
function St(e) {
|
|
751
761
|
return e instanceof HTMLInputElement && "select" in e;
|
|
752
762
|
}
|
|
753
763
|
function D(e, { select: t = !1 } = {}) {
|
|
754
764
|
if (e && e.focus) {
|
|
755
765
|
const n = I();
|
|
756
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
766
|
+
e.focus({ preventScroll: !0 }), e !== n && St(e) && t && e.select();
|
|
757
767
|
}
|
|
758
768
|
}
|
|
759
|
-
var
|
|
769
|
+
var Pt = /* @__PURE__ */ B({
|
|
760
770
|
__name: "FocusScope",
|
|
761
771
|
props: {
|
|
762
772
|
loop: {
|
|
@@ -780,7 +790,7 @@ var St = /* @__PURE__ */ B({
|
|
|
780
790
|
},
|
|
781
791
|
emits: ["mountAutoFocus", "unmountAutoFocus"],
|
|
782
792
|
setup(e, { emit: t }) {
|
|
783
|
-
const n = e, r = t, { currentRef: o, currentElement: i } = pe(), s = b(null),
|
|
793
|
+
const n = e, r = t, { currentRef: o, currentElement: i } = pe(), s = b(null), u = gt(), c = W({
|
|
784
794
|
paused: !1,
|
|
785
795
|
pause() {
|
|
786
796
|
this.paused = !0;
|
|
@@ -791,69 +801,69 @@ var St = /* @__PURE__ */ B({
|
|
|
791
801
|
});
|
|
792
802
|
L((l) => {
|
|
793
803
|
if (!F) return;
|
|
794
|
-
const
|
|
804
|
+
const a = i.value;
|
|
795
805
|
if (!n.trapped) return;
|
|
796
|
-
function
|
|
797
|
-
if (c.paused || !
|
|
798
|
-
const m =
|
|
799
|
-
|
|
806
|
+
function v(g) {
|
|
807
|
+
if (c.paused || !a) return;
|
|
808
|
+
const m = g.target;
|
|
809
|
+
a.contains(m) ? s.value = m : D(s.value, { select: !0 });
|
|
800
810
|
}
|
|
801
|
-
function
|
|
802
|
-
if (c.paused || !
|
|
803
|
-
const m =
|
|
804
|
-
m !== null && (
|
|
811
|
+
function f(g) {
|
|
812
|
+
if (c.paused || !a) return;
|
|
813
|
+
const m = g.relatedTarget;
|
|
814
|
+
m !== null && (a.contains(m) || D(s.value, { select: !0 }));
|
|
805
815
|
}
|
|
806
|
-
function
|
|
807
|
-
|
|
816
|
+
function y(g) {
|
|
817
|
+
a.contains(s.value) || D(a);
|
|
808
818
|
}
|
|
809
|
-
document.addEventListener("focusin",
|
|
810
|
-
const
|
|
811
|
-
|
|
819
|
+
document.addEventListener("focusin", v), document.addEventListener("focusout", f);
|
|
820
|
+
const p = new MutationObserver(y);
|
|
821
|
+
a && p.observe(a, {
|
|
812
822
|
childList: !0,
|
|
813
823
|
subtree: !0
|
|
814
824
|
}), l(() => {
|
|
815
|
-
document.removeEventListener("focusin",
|
|
825
|
+
document.removeEventListener("focusin", v), document.removeEventListener("focusout", f), p.disconnect();
|
|
816
826
|
});
|
|
817
827
|
}), L(async (l) => {
|
|
818
|
-
const
|
|
819
|
-
if (await M(), !
|
|
820
|
-
|
|
821
|
-
const
|
|
822
|
-
if (!
|
|
823
|
-
const
|
|
824
|
-
|
|
828
|
+
const a = i.value;
|
|
829
|
+
if (await M(), !a) return;
|
|
830
|
+
u.add(c);
|
|
831
|
+
const v = I();
|
|
832
|
+
if (!a.contains(v)) {
|
|
833
|
+
const y = new CustomEvent(z, ie);
|
|
834
|
+
a.addEventListener(z, (p) => r("mountAutoFocus", p)), a.dispatchEvent(y), y.defaultPrevented || (bt(Et(ge(a)), { select: !0 }), I() === v && D(a));
|
|
825
835
|
}
|
|
826
836
|
l(() => {
|
|
827
|
-
|
|
828
|
-
const
|
|
829
|
-
r("unmountAutoFocus",
|
|
837
|
+
a.removeEventListener(z, (g) => r("mountAutoFocus", g));
|
|
838
|
+
const y = new CustomEvent(Y, ie), p = (g) => {
|
|
839
|
+
r("unmountAutoFocus", g);
|
|
830
840
|
};
|
|
831
|
-
|
|
832
|
-
|
|
841
|
+
a.addEventListener(Y, p), a.dispatchEvent(y), setTimeout(() => {
|
|
842
|
+
y.defaultPrevented || D(v ?? document.body, { select: !0 }), a.removeEventListener(Y, p), u.remove(c);
|
|
833
843
|
}, 0);
|
|
834
844
|
});
|
|
835
845
|
});
|
|
836
|
-
function
|
|
846
|
+
function d(l) {
|
|
837
847
|
if (!n.loop && !n.trapped || c.paused) return;
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
840
|
-
const
|
|
841
|
-
|
|
848
|
+
const a = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, v = I();
|
|
849
|
+
if (a && v) {
|
|
850
|
+
const f = l.currentTarget, [y, p] = Ot(f);
|
|
851
|
+
y && p ? !l.shiftKey && v === p ? (l.preventDefault(), n.loop && D(y, { select: !0 })) : l.shiftKey && v === y && (l.preventDefault(), n.loop && D(p, { select: !0 })) : v === f && l.preventDefault();
|
|
842
852
|
}
|
|
843
853
|
}
|
|
844
|
-
return (l,
|
|
854
|
+
return (l, a) => (Q(), X(A(ye), {
|
|
845
855
|
ref_key: "currentRef",
|
|
846
856
|
ref: o,
|
|
847
857
|
tabindex: "-1",
|
|
848
858
|
"as-child": l.asChild,
|
|
849
859
|
as: l.as,
|
|
850
|
-
onKeydown:
|
|
860
|
+
onKeydown: d
|
|
851
861
|
}, {
|
|
852
862
|
default: ce(() => [Z(l.$slots, "default")]),
|
|
853
863
|
_: 3
|
|
854
864
|
}, 8, ["as-child", "as"]));
|
|
855
865
|
}
|
|
856
|
-
}),
|
|
866
|
+
}), kt = Pt, At = /* @__PURE__ */ B({
|
|
857
867
|
__name: "Teleport",
|
|
858
868
|
props: {
|
|
859
869
|
to: {
|
|
@@ -875,8 +885,8 @@ var St = /* @__PURE__ */ B({
|
|
|
875
885
|
}
|
|
876
886
|
},
|
|
877
887
|
setup(e) {
|
|
878
|
-
const t =
|
|
879
|
-
return (n, r) =>
|
|
888
|
+
const t = Je();
|
|
889
|
+
return (n, r) => A(t) || n.forceMount ? (Q(), X(xe, {
|
|
880
890
|
key: 0,
|
|
881
891
|
to: n.to,
|
|
882
892
|
disabled: n.disabled,
|
|
@@ -887,27 +897,27 @@ var St = /* @__PURE__ */ B({
|
|
|
887
897
|
"defer"
|
|
888
898
|
])) : Ie("v-if", !0);
|
|
889
899
|
}
|
|
890
|
-
}),
|
|
900
|
+
}), jt = At;
|
|
891
901
|
export {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
902
|
+
Bt as D,
|
|
903
|
+
kt as F,
|
|
904
|
+
xt as P,
|
|
905
|
+
ct as S,
|
|
906
|
+
jt as T,
|
|
897
907
|
pe as a,
|
|
898
|
-
|
|
908
|
+
Ft as b,
|
|
899
909
|
Be as c,
|
|
900
|
-
|
|
910
|
+
It as d,
|
|
901
911
|
ye as e,
|
|
902
|
-
|
|
912
|
+
Nt as f,
|
|
903
913
|
I as g,
|
|
904
914
|
F as h,
|
|
905
|
-
|
|
915
|
+
je as i,
|
|
906
916
|
$ as j,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
917
|
+
Dt as k,
|
|
918
|
+
Lt as l,
|
|
919
|
+
Re as m,
|
|
910
920
|
de as n,
|
|
911
|
-
|
|
912
|
-
|
|
921
|
+
Tt as r,
|
|
922
|
+
Mt as u
|
|
913
923
|
};
|