@opentiny/tiny-robot 0.3.1-alpha.8 → 0.3.1-alpha.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/base-popper/index.js +1 -1
- package/dist/bubble/index.js +4017 -11
- package/dist/chat-input/index.js +3154 -0
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +684 -968
- package/dist/index.js +104 -108
- package/dist/index2.js +90 -90
- package/dist/index3.js +150 -155
- package/dist/index4.js +295 -319
- package/dist/index5.js +279 -507
- package/dist/index6.js +146 -286
- package/dist/loading.js +4 -0
- package/dist/mcp-server-picker/index.js +57 -58
- package/dist/sender/index.js +6 -3261
- package/dist/sender-compat/index.js +109 -105
- package/dist/style.css +1 -1
- package/dist/suggestion-popover/index.js +185 -184
- package/package.json +17 -17
- package/dist/index7.js +0 -161
- /package/dist/{sender-actions → chat-input-actions}/index.js +0 -0
package/dist/index4.js
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import { onMounted as ie, nextTick as
|
|
2
|
-
function
|
|
1
|
+
import { onMounted as ie, nextTick as me, watch as A, getCurrentScope as he, onScopeDispose as ge, getCurrentInstance as j, isRef as le, toValue as w, hasInjectionContext as se, inject as we, toRefs as ye, customRef as be, shallowRef as b, computed as _, reactive as ee, unref as Se, watchEffect as ue, ref as Oe, readonly as Te } from "vue";
|
|
2
|
+
function z(e) {
|
|
3
3
|
return he() ? (ge(e), !0) : !1;
|
|
4
4
|
}
|
|
5
5
|
// @__NO_SIDE_EFFECTS__
|
|
6
6
|
function te() {
|
|
7
|
-
const e = /* @__PURE__ */ new Set(), t = (
|
|
8
|
-
e.delete(
|
|
7
|
+
const e = /* @__PURE__ */ new Set(), t = (l) => {
|
|
8
|
+
e.delete(l);
|
|
9
9
|
};
|
|
10
10
|
return {
|
|
11
|
-
on: (
|
|
12
|
-
e.add(
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
off:
|
|
11
|
+
on: (l) => {
|
|
12
|
+
e.add(l);
|
|
13
|
+
const f = () => t(l);
|
|
14
|
+
return z(f), {
|
|
15
|
+
off: f
|
|
16
16
|
};
|
|
17
17
|
},
|
|
18
18
|
off: t,
|
|
19
|
-
trigger: (...
|
|
19
|
+
trigger: (...l) => Promise.all(Array.from(e).map((f) => f(...l))),
|
|
20
20
|
clear: () => {
|
|
21
21
|
e.clear();
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const B = /* @__PURE__ */ new WeakMap(), Ee = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
|
|
26
26
|
var t;
|
|
27
|
-
const o = e[0], n = (t =
|
|
27
|
+
const o = e[0], n = (t = j()) == null ? void 0 : t.proxy;
|
|
28
28
|
if (n == null && !se())
|
|
29
29
|
throw new Error("injectLocal must be called in setup");
|
|
30
|
-
return n &&
|
|
31
|
-
},
|
|
30
|
+
return n && B.has(n) && o in B.get(n) ? B.get(n)[o] : we(...e);
|
|
31
|
+
}, $ = typeof window < "u" && typeof document < "u";
|
|
32
32
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
33
|
-
const
|
|
34
|
-
},
|
|
35
|
-
function
|
|
33
|
+
const Pe = (e) => e != null, xe = Object.prototype.toString, We = (e) => xe.call(e) === "[object Object]", x = () => {
|
|
34
|
+
}, Me = (e, t) => Object.prototype.hasOwnProperty.call(e, t), _e = /* @__PURE__ */ Ie();
|
|
35
|
+
function Ie() {
|
|
36
36
|
var e, t;
|
|
37
|
-
return
|
|
37
|
+
return $ && ((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));
|
|
38
38
|
}
|
|
39
39
|
function Y(e, t) {
|
|
40
40
|
function o(...n) {
|
|
41
|
-
return new Promise((u,
|
|
42
|
-
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(u).catch(
|
|
41
|
+
return new Promise((u, l) => {
|
|
42
|
+
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(u).catch(l);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
return o;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const Ae = (e) => e();
|
|
48
48
|
function ce(e, t = {}) {
|
|
49
49
|
let o, n, u = x;
|
|
50
|
-
const
|
|
50
|
+
const l = (s) => {
|
|
51
51
|
clearTimeout(s), u(), u = x;
|
|
52
52
|
};
|
|
53
|
-
let
|
|
53
|
+
let f;
|
|
54
54
|
return (s) => {
|
|
55
|
-
const
|
|
56
|
-
return o &&
|
|
57
|
-
u = t.rejectOnCancel ? d :
|
|
58
|
-
o &&
|
|
59
|
-
},
|
|
60
|
-
n &&
|
|
61
|
-
},
|
|
55
|
+
const a = w(e), c = w(t.maxWait);
|
|
56
|
+
return o && l(o), a <= 0 || c !== void 0 && c <= 0 ? (n && (l(n), n = void 0), Promise.resolve(s())) : new Promise((i, d) => {
|
|
57
|
+
u = t.rejectOnCancel ? d : i, f = s, c && !n && (n = setTimeout(() => {
|
|
58
|
+
o && l(o), n = void 0, i(f());
|
|
59
|
+
}, c)), o = setTimeout(() => {
|
|
60
|
+
n && l(n), n = void 0, i(s());
|
|
61
|
+
}, a);
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function ae(...e) {
|
|
66
|
-
let t = 0, o, n = !0, u = x,
|
|
67
|
-
!le(e[0]) && typeof e[0] == "object" ? { delay:
|
|
68
|
-
const
|
|
66
|
+
let t = 0, o, n = !0, u = x, l, f, r, s, a;
|
|
67
|
+
!le(e[0]) && typeof e[0] == "object" ? { delay: f, trailing: r = !0, leading: s = !0, rejectOnCancel: a = !1 } = e[0] : [f, r = !0, s = !0, a = !1] = e;
|
|
68
|
+
const c = () => {
|
|
69
69
|
o && (clearTimeout(o), o = void 0, u(), u = x);
|
|
70
70
|
};
|
|
71
71
|
return (d) => {
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
u =
|
|
75
|
-
t = Date.now(), n = !0, v(
|
|
76
|
-
}, Math.max(0,
|
|
77
|
-
})), !s && !o && (o = setTimeout(() => n = !0,
|
|
72
|
+
const p = w(f), m = Date.now() - t, S = () => l = d();
|
|
73
|
+
return c(), p <= 0 ? (t = Date.now(), S()) : (m > p && (s || !n) ? (t = Date.now(), S()) : r && (l = new Promise((v, h) => {
|
|
74
|
+
u = a ? h : v, o = setTimeout(() => {
|
|
75
|
+
t = Date.now(), n = !0, v(S()), c();
|
|
76
|
+
}, Math.max(0, p - m));
|
|
77
|
+
})), !s && !o && (o = setTimeout(() => n = !0, p)), n = !1, l);
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function ne(e) {
|
|
81
81
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Fe(e, t, o = !1) {
|
|
84
84
|
return t.reduce((n, u) => (u in e && (!o || e[u] !== void 0) && (n[u] = e[u]), n), {});
|
|
85
85
|
}
|
|
86
86
|
function D(e) {
|
|
87
87
|
return Array.isArray(e) ? e : [e];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function ke(e) {
|
|
90
|
+
return j();
|
|
91
91
|
}
|
|
92
92
|
// @__NO_SIDE_EFFECTS__
|
|
93
|
-
function
|
|
93
|
+
function Ce(e, t = 200, o = {}) {
|
|
94
94
|
return Y(
|
|
95
95
|
ce(t, o),
|
|
96
96
|
e
|
|
@@ -105,7 +105,7 @@ function Le(e, t = 200, o = !1, n = !0, u = !1) {
|
|
|
105
105
|
}
|
|
106
106
|
function fe(e, t, o = {}) {
|
|
107
107
|
const {
|
|
108
|
-
eventFilter: n =
|
|
108
|
+
eventFilter: n = Ae,
|
|
109
109
|
...u
|
|
110
110
|
} = o;
|
|
111
111
|
return A(
|
|
@@ -117,18 +117,18 @@ function fe(e, t, o = {}) {
|
|
|
117
117
|
u
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Re(e, t = {}) {
|
|
121
121
|
if (!le(e))
|
|
122
|
-
return
|
|
122
|
+
return ye(e);
|
|
123
123
|
const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
124
124
|
for (const n in e.value)
|
|
125
|
-
o[n] =
|
|
125
|
+
o[n] = be(() => ({
|
|
126
126
|
get() {
|
|
127
127
|
return e.value[n];
|
|
128
128
|
},
|
|
129
129
|
set(u) {
|
|
130
|
-
var
|
|
131
|
-
if ((
|
|
130
|
+
var l;
|
|
131
|
+
if ((l = w(t.replaceRef)) != null ? l : !0)
|
|
132
132
|
if (Array.isArray(e.value)) {
|
|
133
133
|
const r = [...e.value];
|
|
134
134
|
r[n] = u, e.value = r;
|
|
@@ -142,48 +142,25 @@ function De(e, t = {}) {
|
|
|
142
142
|
}));
|
|
143
143
|
return o;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
145
|
+
function N(e, t = !0, o) {
|
|
146
|
+
ke() ? ie(e, o) : t ? e() : me(e);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const {
|
|
150
|
-
immediate: n = !0,
|
|
151
|
-
immediateCallback: u = !1
|
|
152
|
-
} = o, i = b(!1);
|
|
153
|
-
let c;
|
|
154
|
-
function r() {
|
|
155
|
-
c && (clearTimeout(c), c = void 0);
|
|
156
|
-
}
|
|
157
|
-
function s() {
|
|
158
|
-
i.value = !1, r();
|
|
159
|
-
}
|
|
160
|
-
function f(...a) {
|
|
161
|
-
u && e(), r(), i.value = !0, c = setTimeout(() => {
|
|
162
|
-
i.value = !1, c = void 0, e(...a);
|
|
163
|
-
}, w(t));
|
|
164
|
-
}
|
|
165
|
-
return n && (i.value = !0, N && f()), V(s), {
|
|
166
|
-
isPending: Te(i),
|
|
167
|
-
start: f,
|
|
168
|
-
stop: s
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function Ue(e, t, o = {}) {
|
|
148
|
+
function Xe(e, t, o = {}) {
|
|
172
149
|
const {
|
|
173
150
|
debounce: n = 0,
|
|
174
151
|
maxWait: u = void 0,
|
|
175
|
-
...
|
|
152
|
+
...l
|
|
176
153
|
} = o;
|
|
177
154
|
return fe(
|
|
178
155
|
e,
|
|
179
156
|
t,
|
|
180
157
|
{
|
|
181
|
-
...
|
|
158
|
+
...l,
|
|
182
159
|
eventFilter: ce(n, { maxWait: u })
|
|
183
160
|
}
|
|
184
161
|
);
|
|
185
162
|
}
|
|
186
|
-
function
|
|
163
|
+
function De(e, t, o) {
|
|
187
164
|
return A(
|
|
188
165
|
e,
|
|
189
166
|
t,
|
|
@@ -193,24 +170,24 @@ function Ve(e, t, o) {
|
|
|
193
170
|
}
|
|
194
171
|
);
|
|
195
172
|
}
|
|
196
|
-
function
|
|
173
|
+
function Qe(e, t, o = {}) {
|
|
197
174
|
const {
|
|
198
175
|
throttle: n = 0,
|
|
199
176
|
trailing: u = !0,
|
|
200
|
-
leading:
|
|
201
|
-
...
|
|
177
|
+
leading: l = !0,
|
|
178
|
+
...f
|
|
202
179
|
} = o;
|
|
203
180
|
return fe(
|
|
204
181
|
e,
|
|
205
182
|
t,
|
|
206
183
|
{
|
|
207
|
-
...
|
|
208
|
-
eventFilter: ae(n, u,
|
|
184
|
+
...f,
|
|
185
|
+
eventFilter: ae(n, u, l)
|
|
209
186
|
}
|
|
210
187
|
);
|
|
211
188
|
}
|
|
212
|
-
const I =
|
|
213
|
-
function
|
|
189
|
+
const I = $ ? window : void 0, Ve = $ ? window.document : void 0;
|
|
190
|
+
function O(e) {
|
|
214
191
|
var t;
|
|
215
192
|
const o = w(e);
|
|
216
193
|
return (t = o == null ? void 0 : o.$el) != null ? t : o;
|
|
@@ -218,304 +195,304 @@ function S(e) {
|
|
|
218
195
|
function W(...e) {
|
|
219
196
|
const t = [], o = () => {
|
|
220
197
|
t.forEach((r) => r()), t.length = 0;
|
|
221
|
-
}, n = (r, s,
|
|
198
|
+
}, n = (r, s, a, c) => (r.addEventListener(s, a, c), () => r.removeEventListener(s, a, c)), u = _(() => {
|
|
222
199
|
const r = D(w(e[0])).filter((s) => s != null);
|
|
223
200
|
return r.every((s) => typeof s != "string") ? r : void 0;
|
|
224
|
-
}),
|
|
201
|
+
}), l = De(
|
|
225
202
|
() => {
|
|
226
203
|
var r, s;
|
|
227
204
|
return [
|
|
228
|
-
(s = (r = u.value) == null ? void 0 : r.map((
|
|
205
|
+
(s = (r = u.value) == null ? void 0 : r.map((a) => O(a))) != null ? s : [I].filter((a) => a != null),
|
|
229
206
|
D(w(u.value ? e[1] : e[0])),
|
|
230
207
|
D(Se(u.value ? e[2] : e[1])),
|
|
231
208
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
232
209
|
w(u.value ? e[3] : e[2])
|
|
233
210
|
];
|
|
234
211
|
},
|
|
235
|
-
([r, s,
|
|
236
|
-
if (o(), !(r != null && r.length) || !(s != null && s.length) || !(
|
|
212
|
+
([r, s, a, c]) => {
|
|
213
|
+
if (o(), !(r != null && r.length) || !(s != null && s.length) || !(a != null && a.length))
|
|
237
214
|
return;
|
|
238
|
-
const
|
|
215
|
+
const i = We(c) ? { ...c } : c;
|
|
239
216
|
t.push(
|
|
240
217
|
...r.flatMap(
|
|
241
218
|
(d) => s.flatMap(
|
|
242
|
-
(
|
|
219
|
+
(p) => a.map((m) => n(d, p, m, i))
|
|
243
220
|
)
|
|
244
221
|
)
|
|
245
222
|
);
|
|
246
223
|
},
|
|
247
224
|
{ flush: "post" }
|
|
248
|
-
),
|
|
249
|
-
|
|
225
|
+
), f = () => {
|
|
226
|
+
l(), o();
|
|
250
227
|
};
|
|
251
|
-
return
|
|
228
|
+
return z(o), f;
|
|
252
229
|
}
|
|
253
230
|
let oe = !1;
|
|
254
|
-
function
|
|
255
|
-
const { window: n = I, ignore: u = [], capture:
|
|
231
|
+
function Ue(e, t, o = {}) {
|
|
232
|
+
const { window: n = I, ignore: u = [], capture: l = !0, detectIframe: f = !1, controls: r = !1 } = o;
|
|
256
233
|
if (!n)
|
|
257
234
|
return r ? { stop: x, cancel: x, trigger: x } : x;
|
|
258
|
-
if (
|
|
235
|
+
if (_e && !oe) {
|
|
259
236
|
oe = !0;
|
|
260
237
|
const v = { passive: !0 };
|
|
261
238
|
Array.from(n.document.body.children).forEach((h) => h.addEventListener("click", x, v)), n.document.documentElement.addEventListener("click", x, v);
|
|
262
239
|
}
|
|
263
240
|
let s = !0;
|
|
264
|
-
const
|
|
241
|
+
const a = (v) => w(u).some((h) => {
|
|
265
242
|
if (typeof h == "string")
|
|
266
243
|
return Array.from(n.document.querySelectorAll(h)).some((y) => y === v.target || v.composedPath().includes(y));
|
|
267
244
|
{
|
|
268
|
-
const y =
|
|
245
|
+
const y = O(h);
|
|
269
246
|
return y && (v.target === y || v.composedPath().includes(y));
|
|
270
247
|
}
|
|
271
248
|
});
|
|
272
|
-
function
|
|
249
|
+
function c(v) {
|
|
273
250
|
const h = w(v);
|
|
274
251
|
return h && h.$.subTree.shapeFlag === 16;
|
|
275
252
|
}
|
|
276
|
-
function
|
|
277
|
-
const y = w(v),
|
|
278
|
-
return
|
|
253
|
+
function i(v, h) {
|
|
254
|
+
const y = w(v), T = y.$.subTree && y.$.subTree.children;
|
|
255
|
+
return T == null || !Array.isArray(T) ? !1 : T.some((E) => E.el === h.target || h.composedPath().includes(E.el));
|
|
279
256
|
}
|
|
280
257
|
const d = (v) => {
|
|
281
|
-
const h =
|
|
282
|
-
if (v.target != null && !(!(h instanceof Element) &&
|
|
283
|
-
if ("detail" in v && v.detail === 0 && (s = !
|
|
258
|
+
const h = O(e);
|
|
259
|
+
if (v.target != null && !(!(h instanceof Element) && c(e) && i(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
|
|
260
|
+
if ("detail" in v && v.detail === 0 && (s = !a(v)), !s) {
|
|
284
261
|
s = !0;
|
|
285
262
|
return;
|
|
286
263
|
}
|
|
287
264
|
t(v);
|
|
288
265
|
}
|
|
289
266
|
};
|
|
290
|
-
let
|
|
291
|
-
const
|
|
267
|
+
let p = !1;
|
|
268
|
+
const m = [
|
|
292
269
|
W(n, "click", (v) => {
|
|
293
|
-
|
|
294
|
-
|
|
270
|
+
p || (p = !0, setTimeout(() => {
|
|
271
|
+
p = !1;
|
|
295
272
|
}, 0), d(v));
|
|
296
|
-
}, { passive: !0, capture:
|
|
273
|
+
}, { passive: !0, capture: l }),
|
|
297
274
|
W(n, "pointerdown", (v) => {
|
|
298
|
-
const h =
|
|
299
|
-
s = !
|
|
275
|
+
const h = O(e);
|
|
276
|
+
s = !a(v) && !!(h && !v.composedPath().includes(h));
|
|
300
277
|
}, { passive: !0 }),
|
|
301
|
-
|
|
278
|
+
f && W(n, "blur", (v) => {
|
|
302
279
|
setTimeout(() => {
|
|
303
280
|
var h;
|
|
304
|
-
const y =
|
|
281
|
+
const y = O(e);
|
|
305
282
|
((h = n.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(y != null && y.contains(n.document.activeElement)) && t(v);
|
|
306
283
|
}, 0);
|
|
307
284
|
}, { passive: !0 })
|
|
308
|
-
].filter(Boolean),
|
|
285
|
+
].filter(Boolean), S = () => m.forEach((v) => v());
|
|
309
286
|
return r ? {
|
|
310
|
-
stop:
|
|
287
|
+
stop: S,
|
|
311
288
|
cancel: () => {
|
|
312
289
|
s = !1;
|
|
313
290
|
},
|
|
314
291
|
trigger: (v) => {
|
|
315
292
|
s = !0, d(v), s = !1;
|
|
316
293
|
}
|
|
317
|
-
} :
|
|
294
|
+
} : S;
|
|
318
295
|
}
|
|
319
296
|
// @__NO_SIDE_EFFECTS__
|
|
320
|
-
function
|
|
321
|
-
const e = b(!1), t =
|
|
297
|
+
function He() {
|
|
298
|
+
const e = b(!1), t = j();
|
|
322
299
|
return t && ie(() => {
|
|
323
300
|
e.value = !0;
|
|
324
301
|
}, t), e;
|
|
325
302
|
}
|
|
326
303
|
// @__NO_SIDE_EFFECTS__
|
|
327
304
|
function G(e) {
|
|
328
|
-
const t = /* @__PURE__ */
|
|
305
|
+
const t = /* @__PURE__ */ He();
|
|
329
306
|
return _(() => (t.value, !!e()));
|
|
330
307
|
}
|
|
331
308
|
function X(e, t, o = {}) {
|
|
332
309
|
const { window: n = I, ...u } = o;
|
|
333
|
-
let
|
|
334
|
-
const
|
|
335
|
-
|
|
310
|
+
let l;
|
|
311
|
+
const f = /* @__PURE__ */ G(() => n && "MutationObserver" in n), r = () => {
|
|
312
|
+
l && (l.disconnect(), l = void 0);
|
|
336
313
|
}, s = _(() => {
|
|
337
|
-
const d = w(e),
|
|
338
|
-
return new Set(
|
|
339
|
-
}),
|
|
314
|
+
const d = w(e), p = D(d).map(O).filter(Pe);
|
|
315
|
+
return new Set(p);
|
|
316
|
+
}), a = A(
|
|
340
317
|
s,
|
|
341
318
|
(d) => {
|
|
342
|
-
r(),
|
|
319
|
+
r(), f.value && d.size && (l = new MutationObserver(t), d.forEach((p) => l.observe(p, u)));
|
|
343
320
|
},
|
|
344
321
|
{ immediate: !0, flush: "post" }
|
|
345
|
-
),
|
|
346
|
-
|
|
322
|
+
), c = () => l == null ? void 0 : l.takeRecords(), i = () => {
|
|
323
|
+
a(), r();
|
|
347
324
|
};
|
|
348
|
-
return
|
|
349
|
-
isSupported:
|
|
350
|
-
stop:
|
|
351
|
-
takeRecords:
|
|
325
|
+
return z(i), {
|
|
326
|
+
isSupported: f,
|
|
327
|
+
stop: i,
|
|
328
|
+
takeRecords: c
|
|
352
329
|
};
|
|
353
330
|
}
|
|
354
|
-
const
|
|
331
|
+
const ze = Symbol("vueuse-ssr-width");
|
|
355
332
|
// @__NO_SIDE_EFFECTS__
|
|
356
|
-
function
|
|
357
|
-
const e = se() ? /* @__PURE__ */
|
|
333
|
+
function Ne() {
|
|
334
|
+
const e = se() ? /* @__PURE__ */ Ee(ze, null) : null;
|
|
358
335
|
return typeof e == "number" ? e : void 0;
|
|
359
336
|
}
|
|
360
|
-
function
|
|
361
|
-
const { window: o = I, ssrWidth: n = /* @__PURE__ */
|
|
362
|
-
r.value =
|
|
337
|
+
function Be(e, t = {}) {
|
|
338
|
+
const { window: o = I, ssrWidth: n = /* @__PURE__ */ Ne() } = t, u = /* @__PURE__ */ G(() => o && "matchMedia" in o && typeof o.matchMedia == "function"), l = b(typeof n == "number"), f = b(), r = b(!1), s = (a) => {
|
|
339
|
+
r.value = a.matches;
|
|
363
340
|
};
|
|
364
341
|
return ue(() => {
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
r.value =
|
|
369
|
-
const
|
|
370
|
-
let
|
|
371
|
-
return d &&
|
|
342
|
+
if (l.value) {
|
|
343
|
+
l.value = !u.value;
|
|
344
|
+
const a = w(e).split(",");
|
|
345
|
+
r.value = a.some((c) => {
|
|
346
|
+
const i = c.includes("not all"), d = c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), p = c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
347
|
+
let m = !!(d || p);
|
|
348
|
+
return d && m && (m = n >= ne(d[1])), p && m && (m = n <= ne(p[1])), i ? !m : m;
|
|
372
349
|
});
|
|
373
350
|
return;
|
|
374
351
|
}
|
|
375
|
-
u.value && (
|
|
376
|
-
}), W(
|
|
352
|
+
u.value && (f.value = o.matchMedia(w(e)), r.value = f.value.matches);
|
|
353
|
+
}), W(f, "change", s, { passive: !0 }), _(() => r.value);
|
|
377
354
|
}
|
|
378
|
-
function
|
|
379
|
-
const { window: n = I, initialValue: u, observe:
|
|
380
|
-
var
|
|
381
|
-
return
|
|
355
|
+
function qe(e, t, o = {}) {
|
|
356
|
+
const { window: n = I, initialValue: u, observe: l = !1 } = o, f = b(u), r = _(() => {
|
|
357
|
+
var a;
|
|
358
|
+
return O(t) || ((a = n == null ? void 0 : n.document) == null ? void 0 : a.documentElement);
|
|
382
359
|
});
|
|
383
360
|
function s() {
|
|
384
|
-
var
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
387
|
-
const d = (
|
|
388
|
-
|
|
361
|
+
var a;
|
|
362
|
+
const c = w(e), i = w(r);
|
|
363
|
+
if (i && n && c) {
|
|
364
|
+
const d = (a = n.getComputedStyle(i).getPropertyValue(c)) == null ? void 0 : a.trim();
|
|
365
|
+
f.value = d || f.value || u;
|
|
389
366
|
}
|
|
390
367
|
}
|
|
391
|
-
return
|
|
368
|
+
return l && X(r, s, {
|
|
392
369
|
attributeFilter: ["style", "class"],
|
|
393
370
|
window: n
|
|
394
371
|
}), A(
|
|
395
372
|
[r, () => w(e)],
|
|
396
|
-
(
|
|
397
|
-
|
|
373
|
+
(a, c) => {
|
|
374
|
+
c[0] && c[1] && c[0].style.removeProperty(c[1]), s();
|
|
398
375
|
},
|
|
399
376
|
{ immediate: !0 }
|
|
400
377
|
), A(
|
|
401
|
-
[
|
|
402
|
-
([
|
|
403
|
-
const
|
|
404
|
-
|
|
378
|
+
[f, r],
|
|
379
|
+
([a, c]) => {
|
|
380
|
+
const i = w(e);
|
|
381
|
+
c != null && c.style && i && (a == null ? c.style.removeProperty(i) : c.style.setProperty(i, a));
|
|
405
382
|
},
|
|
406
383
|
{ immediate: !0 }
|
|
407
|
-
),
|
|
384
|
+
), f;
|
|
408
385
|
}
|
|
409
386
|
function de(e, t, o = {}) {
|
|
410
387
|
const { window: n = I, ...u } = o;
|
|
411
|
-
let
|
|
412
|
-
const
|
|
413
|
-
|
|
388
|
+
let l;
|
|
389
|
+
const f = /* @__PURE__ */ G(() => n && "ResizeObserver" in n), r = () => {
|
|
390
|
+
l && (l.disconnect(), l = void 0);
|
|
414
391
|
}, s = _(() => {
|
|
415
|
-
const
|
|
416
|
-
return Array.isArray(
|
|
417
|
-
}),
|
|
392
|
+
const i = w(e);
|
|
393
|
+
return Array.isArray(i) ? i.map((d) => O(d)) : [O(i)];
|
|
394
|
+
}), a = A(
|
|
418
395
|
s,
|
|
419
|
-
(
|
|
420
|
-
if (r(),
|
|
421
|
-
|
|
422
|
-
for (const d of
|
|
423
|
-
d &&
|
|
396
|
+
(i) => {
|
|
397
|
+
if (r(), f.value && n) {
|
|
398
|
+
l = new ResizeObserver(t);
|
|
399
|
+
for (const d of i)
|
|
400
|
+
d && l.observe(d, u);
|
|
424
401
|
}
|
|
425
402
|
},
|
|
426
403
|
{ immediate: !0, flush: "post" }
|
|
427
|
-
),
|
|
428
|
-
r(),
|
|
404
|
+
), c = () => {
|
|
405
|
+
r(), a();
|
|
429
406
|
};
|
|
430
|
-
return
|
|
431
|
-
isSupported:
|
|
432
|
-
stop:
|
|
407
|
+
return z(c), {
|
|
408
|
+
isSupported: f,
|
|
409
|
+
stop: c
|
|
433
410
|
};
|
|
434
411
|
}
|
|
435
|
-
function
|
|
412
|
+
function Je(e, t = {}) {
|
|
436
413
|
const {
|
|
437
414
|
reset: o = !0,
|
|
438
415
|
windowResize: n = !0,
|
|
439
416
|
windowScroll: u = !0,
|
|
440
|
-
immediate:
|
|
441
|
-
updateTiming:
|
|
442
|
-
} = t, r = b(0), s = b(0),
|
|
443
|
-
function
|
|
444
|
-
const h =
|
|
417
|
+
immediate: l = !0,
|
|
418
|
+
updateTiming: f = "sync"
|
|
419
|
+
} = t, r = b(0), s = b(0), a = b(0), c = b(0), i = b(0), d = b(0), p = b(0), m = b(0);
|
|
420
|
+
function S() {
|
|
421
|
+
const h = O(e);
|
|
445
422
|
if (!h) {
|
|
446
|
-
o && (r.value = 0, s.value = 0,
|
|
423
|
+
o && (r.value = 0, s.value = 0, a.value = 0, c.value = 0, i.value = 0, d.value = 0, p.value = 0, m.value = 0);
|
|
447
424
|
return;
|
|
448
425
|
}
|
|
449
426
|
const y = h.getBoundingClientRect();
|
|
450
|
-
r.value = y.height, s.value = y.bottom,
|
|
427
|
+
r.value = y.height, s.value = y.bottom, a.value = y.left, c.value = y.right, i.value = y.top, d.value = y.width, p.value = y.x, m.value = y.y;
|
|
451
428
|
}
|
|
452
429
|
function v() {
|
|
453
|
-
|
|
430
|
+
f === "sync" ? S() : f === "next-frame" && requestAnimationFrame(() => S());
|
|
454
431
|
}
|
|
455
|
-
return de(e, v), A(() =>
|
|
432
|
+
return de(e, v), A(() => O(e), (h) => !h && v()), X(e, v, {
|
|
456
433
|
attributeFilter: ["style", "class"]
|
|
457
|
-
}), u && W("scroll", v, { capture: !0, passive: !0 }), n && W("resize", v, { passive: !0 }),
|
|
458
|
-
|
|
434
|
+
}), u && W("scroll", v, { capture: !0, passive: !0 }), n && W("resize", v, { passive: !0 }), N(() => {
|
|
435
|
+
l && v();
|
|
459
436
|
}), {
|
|
460
437
|
height: r,
|
|
461
438
|
bottom: s,
|
|
462
|
-
left:
|
|
463
|
-
right:
|
|
464
|
-
top:
|
|
439
|
+
left: a,
|
|
440
|
+
right: c,
|
|
441
|
+
top: i,
|
|
465
442
|
width: d,
|
|
466
|
-
x:
|
|
467
|
-
y:
|
|
443
|
+
x: p,
|
|
444
|
+
y: m,
|
|
468
445
|
update: v
|
|
469
446
|
};
|
|
470
447
|
}
|
|
471
|
-
function
|
|
472
|
-
const { window: n = I, box: u = "content-box" } = o,
|
|
473
|
-
var
|
|
474
|
-
return (d = (
|
|
475
|
-
}),
|
|
448
|
+
function Ke(e, t = { width: 0, height: 0 }, o = {}) {
|
|
449
|
+
const { window: n = I, box: u = "content-box" } = o, l = _(() => {
|
|
450
|
+
var i, d;
|
|
451
|
+
return (d = (i = O(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
452
|
+
}), f = b(t.width), r = b(t.height), { stop: s } = de(
|
|
476
453
|
e,
|
|
477
|
-
([
|
|
478
|
-
const d = u === "border-box" ?
|
|
479
|
-
if (n &&
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
|
|
454
|
+
([i]) => {
|
|
455
|
+
const d = u === "border-box" ? i.borderBoxSize : u === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
456
|
+
if (n && l.value) {
|
|
457
|
+
const p = O(e);
|
|
458
|
+
if (p) {
|
|
459
|
+
const m = p.getBoundingClientRect();
|
|
460
|
+
f.value = m.width, r.value = m.height;
|
|
484
461
|
}
|
|
485
462
|
} else if (d) {
|
|
486
|
-
const
|
|
487
|
-
|
|
463
|
+
const p = D(d);
|
|
464
|
+
f.value = p.reduce((m, { inlineSize: S }) => m + S, 0), r.value = p.reduce((m, { blockSize: S }) => m + S, 0);
|
|
488
465
|
} else
|
|
489
|
-
|
|
466
|
+
f.value = i.contentRect.width, r.value = i.contentRect.height;
|
|
490
467
|
},
|
|
491
468
|
o
|
|
492
469
|
);
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
|
|
470
|
+
N(() => {
|
|
471
|
+
const i = O(e);
|
|
472
|
+
i && (f.value = "offsetWidth" in i ? i.offsetWidth : t.width, r.value = "offsetHeight" in i ? i.offsetHeight : t.height);
|
|
496
473
|
});
|
|
497
|
-
const
|
|
498
|
-
() =>
|
|
499
|
-
(
|
|
500
|
-
|
|
474
|
+
const a = A(
|
|
475
|
+
() => O(e),
|
|
476
|
+
(i) => {
|
|
477
|
+
f.value = i ? t.width : 0, r.value = i ? t.height : 0;
|
|
501
478
|
}
|
|
502
479
|
);
|
|
503
|
-
function
|
|
504
|
-
s(),
|
|
480
|
+
function c() {
|
|
481
|
+
s(), a();
|
|
505
482
|
}
|
|
506
483
|
return {
|
|
507
|
-
width:
|
|
484
|
+
width: f,
|
|
508
485
|
height: r,
|
|
509
|
-
stop:
|
|
486
|
+
stop: c
|
|
510
487
|
};
|
|
511
488
|
}
|
|
512
|
-
const
|
|
489
|
+
const je = {
|
|
513
490
|
multiple: !0,
|
|
514
491
|
accept: "*",
|
|
515
492
|
reset: !1,
|
|
516
493
|
directory: !1
|
|
517
494
|
};
|
|
518
|
-
function
|
|
495
|
+
function $e(e) {
|
|
519
496
|
if (!e)
|
|
520
497
|
return null;
|
|
521
498
|
if (e instanceof FileList)
|
|
@@ -525,52 +502,52 @@ function Ye(e) {
|
|
|
525
502
|
t.items.add(o);
|
|
526
503
|
return t.files;
|
|
527
504
|
}
|
|
528
|
-
function
|
|
505
|
+
function Ze(e = {}) {
|
|
529
506
|
const {
|
|
530
|
-
document: t =
|
|
531
|
-
} = e, o = Oe(
|
|
532
|
-
var
|
|
533
|
-
const d = (
|
|
534
|
-
return d && (d.type = "file", d.onchange = (
|
|
535
|
-
const
|
|
536
|
-
o.value =
|
|
507
|
+
document: t = Ve
|
|
508
|
+
} = e, o = Oe($e(e.initialFiles)), { on: n, trigger: u } = /* @__PURE__ */ te(), { on: l, trigger: f } = /* @__PURE__ */ te(), r = _(() => {
|
|
509
|
+
var i;
|
|
510
|
+
const d = (i = O(e.input)) != null ? i : t ? t.createElement("input") : void 0;
|
|
511
|
+
return d && (d.type = "file", d.onchange = (p) => {
|
|
512
|
+
const m = p.target;
|
|
513
|
+
o.value = m.files, u(o.value);
|
|
537
514
|
}, d.oncancel = () => {
|
|
538
|
-
|
|
515
|
+
f();
|
|
539
516
|
}), d;
|
|
540
517
|
}), s = () => {
|
|
541
518
|
o.value = null, r.value && r.value.value && (r.value.value = "", u(null));
|
|
542
|
-
},
|
|
519
|
+
}, a = (i) => {
|
|
543
520
|
const d = r.value;
|
|
544
|
-
d && (d.multiple = w(
|
|
545
|
-
},
|
|
521
|
+
d && (d.multiple = w(i.multiple), d.accept = w(i.accept), d.webkitdirectory = w(i.directory), Me(i, "capture") && (d.capture = w(i.capture)));
|
|
522
|
+
}, c = (i) => {
|
|
546
523
|
const d = r.value;
|
|
547
524
|
if (!d)
|
|
548
525
|
return;
|
|
549
|
-
const
|
|
550
|
-
|
|
526
|
+
const p = {
|
|
527
|
+
...je,
|
|
551
528
|
...e,
|
|
552
|
-
...
|
|
529
|
+
...i
|
|
553
530
|
};
|
|
554
|
-
|
|
531
|
+
a(p), w(p.reset) && s(), d.click();
|
|
555
532
|
};
|
|
556
533
|
return ue(() => {
|
|
557
|
-
|
|
534
|
+
a(e);
|
|
558
535
|
}), {
|
|
559
|
-
files:
|
|
560
|
-
open:
|
|
536
|
+
files: Te(o),
|
|
537
|
+
open: c,
|
|
561
538
|
reset: s,
|
|
562
|
-
onCancel:
|
|
539
|
+
onCancel: l,
|
|
563
540
|
onChange: n
|
|
564
541
|
};
|
|
565
542
|
}
|
|
566
543
|
const re = 1;
|
|
567
|
-
function
|
|
544
|
+
function et(e, t = {}) {
|
|
568
545
|
const {
|
|
569
546
|
throttle: o = 0,
|
|
570
547
|
idle: n = 200,
|
|
571
548
|
onStop: u = x,
|
|
572
|
-
onScroll:
|
|
573
|
-
offset:
|
|
549
|
+
onScroll: l = x,
|
|
550
|
+
offset: f = {
|
|
574
551
|
left: 0,
|
|
575
552
|
right: 0,
|
|
576
553
|
top: 0,
|
|
@@ -583,44 +560,44 @@ function nt(e, t = {}) {
|
|
|
583
560
|
capture: !1,
|
|
584
561
|
passive: !0
|
|
585
562
|
},
|
|
586
|
-
behavior:
|
|
587
|
-
window:
|
|
588
|
-
onError:
|
|
563
|
+
behavior: a = "auto",
|
|
564
|
+
window: c = I,
|
|
565
|
+
onError: i = (g) => {
|
|
589
566
|
console.error(g);
|
|
590
567
|
}
|
|
591
568
|
} = t, d = typeof r == "boolean" ? {
|
|
592
569
|
mutation: r
|
|
593
|
-
} : r,
|
|
570
|
+
} : r, p = b(0), m = b(0), S = _({
|
|
594
571
|
get() {
|
|
595
|
-
return
|
|
572
|
+
return p.value;
|
|
596
573
|
},
|
|
597
574
|
set(g) {
|
|
598
575
|
h(g, void 0);
|
|
599
576
|
}
|
|
600
577
|
}), v = _({
|
|
601
578
|
get() {
|
|
602
|
-
return
|
|
579
|
+
return m.value;
|
|
603
580
|
},
|
|
604
581
|
set(g) {
|
|
605
582
|
h(void 0, g);
|
|
606
583
|
}
|
|
607
584
|
});
|
|
608
585
|
function h(g, k) {
|
|
609
|
-
var P,
|
|
610
|
-
if (!
|
|
586
|
+
var P, L, R, H;
|
|
587
|
+
if (!c)
|
|
611
588
|
return;
|
|
612
589
|
const M = w(e);
|
|
613
590
|
if (!M)
|
|
614
591
|
return;
|
|
615
|
-
(
|
|
592
|
+
(R = M instanceof Document ? c.document.body : M) == null || R.scrollTo({
|
|
616
593
|
top: (P = w(k)) != null ? P : v.value,
|
|
617
|
-
left: (
|
|
618
|
-
behavior: w(
|
|
594
|
+
left: (L = w(g)) != null ? L : S.value,
|
|
595
|
+
behavior: w(a)
|
|
619
596
|
});
|
|
620
|
-
const F = ((
|
|
621
|
-
|
|
597
|
+
const F = ((H = M == null ? void 0 : M.document) == null ? void 0 : H.documentElement) || (M == null ? void 0 : M.documentElement) || M;
|
|
598
|
+
S != null && (p.value = F.scrollLeft), v != null && (m.value = F.scrollTop);
|
|
622
599
|
}
|
|
623
|
-
const y = b(!1),
|
|
600
|
+
const y = b(!1), T = ee({
|
|
624
601
|
left: !0,
|
|
625
602
|
right: !1,
|
|
626
603
|
top: !0,
|
|
@@ -632,44 +609,44 @@ function nt(e, t = {}) {
|
|
|
632
609
|
bottom: !1
|
|
633
610
|
}), Q = (g) => {
|
|
634
611
|
y.value && (y.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, u(g));
|
|
635
|
-
},
|
|
612
|
+
}, pe = /* @__PURE__ */ Ce(Q, o + n), V = (g) => {
|
|
636
613
|
var k;
|
|
637
|
-
if (!
|
|
614
|
+
if (!c)
|
|
638
615
|
return;
|
|
639
|
-
const P = ((k = g == null ? void 0 : g.document) == null ? void 0 : k.documentElement) || (g == null ? void 0 : g.documentElement) ||
|
|
640
|
-
E.left = F <
|
|
641
|
-
const q = Math.abs(F * M) <= (
|
|
642
|
-
|
|
616
|
+
const P = ((k = g == null ? void 0 : g.document) == null ? void 0 : k.documentElement) || (g == null ? void 0 : g.documentElement) || O(g), { display: L, flexDirection: R, direction: H } = getComputedStyle(P), M = H === "rtl" ? -1 : 1, F = P.scrollLeft;
|
|
617
|
+
E.left = F < p.value, E.right = F > p.value;
|
|
618
|
+
const q = Math.abs(F * M) <= (f.left || 0), J = Math.abs(F * M) + P.clientWidth >= P.scrollWidth - (f.right || 0) - re;
|
|
619
|
+
L === "flex" && R === "row-reverse" ? (T.left = J, T.right = q) : (T.left = q, T.right = J), p.value = F;
|
|
643
620
|
let C = P.scrollTop;
|
|
644
|
-
g ===
|
|
645
|
-
const K = Math.abs(C) <= (
|
|
646
|
-
|
|
621
|
+
g === c.document && !C && (C = c.document.body.scrollTop), E.top = C < m.value, E.bottom = C > m.value;
|
|
622
|
+
const K = Math.abs(C) <= (f.top || 0), Z = Math.abs(C) + P.clientHeight >= P.scrollHeight - (f.bottom || 0) - re;
|
|
623
|
+
L === "flex" && R === "column-reverse" ? (T.top = Z, T.bottom = K) : (T.top = K, T.bottom = Z), m.value = C;
|
|
647
624
|
}, U = (g) => {
|
|
648
625
|
var k;
|
|
649
|
-
if (!
|
|
626
|
+
if (!c)
|
|
650
627
|
return;
|
|
651
628
|
const P = (k = g.target.documentElement) != null ? k : g.target;
|
|
652
|
-
|
|
629
|
+
V(P), y.value = !0, pe(g), l(g);
|
|
653
630
|
};
|
|
654
631
|
return W(
|
|
655
632
|
e,
|
|
656
633
|
"scroll",
|
|
657
634
|
o ? /* @__PURE__ */ Le(U, o, !0, !1) : U,
|
|
658
635
|
s
|
|
659
|
-
),
|
|
636
|
+
), N(() => {
|
|
660
637
|
try {
|
|
661
638
|
const g = w(e);
|
|
662
639
|
if (!g)
|
|
663
640
|
return;
|
|
664
|
-
|
|
641
|
+
V(g);
|
|
665
642
|
} catch (g) {
|
|
666
|
-
|
|
643
|
+
i(g);
|
|
667
644
|
}
|
|
668
|
-
}), d != null && d.mutation && e != null && e !==
|
|
645
|
+
}), d != null && d.mutation && e != null && e !== c && e !== document && X(
|
|
669
646
|
e,
|
|
670
647
|
() => {
|
|
671
648
|
const g = w(e);
|
|
672
|
-
g &&
|
|
649
|
+
g && V(g);
|
|
673
650
|
},
|
|
674
651
|
{
|
|
675
652
|
attributes: !0,
|
|
@@ -682,14 +659,14 @@ function nt(e, t = {}) {
|
|
|
682
659
|
Q,
|
|
683
660
|
s
|
|
684
661
|
), {
|
|
685
|
-
x:
|
|
662
|
+
x: S,
|
|
686
663
|
y: v,
|
|
687
664
|
isScrolling: y,
|
|
688
|
-
arrivedState:
|
|
665
|
+
arrivedState: T,
|
|
689
666
|
directions: E,
|
|
690
667
|
measure() {
|
|
691
668
|
const g = w(e);
|
|
692
|
-
|
|
669
|
+
c && g && V(g);
|
|
693
670
|
}
|
|
694
671
|
};
|
|
695
672
|
}
|
|
@@ -704,64 +681,63 @@ const ve = {
|
|
|
704
681
|
height: 0,
|
|
705
682
|
twist: 0,
|
|
706
683
|
pointerType: null
|
|
707
|
-
},
|
|
708
|
-
function
|
|
684
|
+
}, Ye = /* @__PURE__ */ Object.keys(ve);
|
|
685
|
+
function tt(e = {}) {
|
|
709
686
|
const {
|
|
710
687
|
target: t = I
|
|
711
688
|
} = e, o = b(!1), n = b(e.initialValue || {});
|
|
712
689
|
Object.assign(n.value, ve, n.value);
|
|
713
|
-
const u = (
|
|
714
|
-
o.value = !0, !(e.pointerTypes && !e.pointerTypes.includes(
|
|
690
|
+
const u = (l) => {
|
|
691
|
+
o.value = !0, !(e.pointerTypes && !e.pointerTypes.includes(l.pointerType)) && (n.value = Fe(l, Ye, !1));
|
|
715
692
|
};
|
|
716
693
|
if (t) {
|
|
717
|
-
const
|
|
718
|
-
W(t, ["pointerdown", "pointermove", "pointerup"], u,
|
|
694
|
+
const l = { passive: !0 };
|
|
695
|
+
W(t, ["pointerdown", "pointermove", "pointerup"], u, l), W(t, "pointerleave", () => o.value = !1, l);
|
|
719
696
|
}
|
|
720
697
|
return {
|
|
721
|
-
...
|
|
698
|
+
...Re(n),
|
|
722
699
|
isInside: o
|
|
723
700
|
};
|
|
724
701
|
}
|
|
725
702
|
// @__NO_SIDE_EFFECTS__
|
|
726
|
-
function
|
|
703
|
+
function nt(e = {}) {
|
|
727
704
|
const {
|
|
728
705
|
window: t = I,
|
|
729
706
|
initialWidth: o = Number.POSITIVE_INFINITY,
|
|
730
707
|
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
731
708
|
listenOrientation: u = !0,
|
|
732
|
-
includeScrollbar:
|
|
733
|
-
type:
|
|
734
|
-
} = e, r = b(o), s = b(n),
|
|
709
|
+
includeScrollbar: l = !0,
|
|
710
|
+
type: f = "inner"
|
|
711
|
+
} = e, r = b(o), s = b(n), a = () => {
|
|
735
712
|
if (t)
|
|
736
|
-
if (
|
|
713
|
+
if (f === "outer")
|
|
737
714
|
r.value = t.outerWidth, s.value = t.outerHeight;
|
|
738
|
-
else if (
|
|
739
|
-
const { width:
|
|
740
|
-
r.value = Math.round(
|
|
741
|
-
} else
|
|
715
|
+
else if (f === "visual" && t.visualViewport) {
|
|
716
|
+
const { width: i, height: d, scale: p } = t.visualViewport;
|
|
717
|
+
r.value = Math.round(i * p), s.value = Math.round(d * p);
|
|
718
|
+
} else l ? (r.value = t.innerWidth, s.value = t.innerHeight) : (r.value = t.document.documentElement.clientWidth, s.value = t.document.documentElement.clientHeight);
|
|
742
719
|
};
|
|
743
|
-
|
|
744
|
-
const
|
|
745
|
-
if (W("resize",
|
|
746
|
-
const
|
|
747
|
-
A(
|
|
720
|
+
a(), N(a);
|
|
721
|
+
const c = { passive: !0 };
|
|
722
|
+
if (W("resize", a, c), t && f === "visual" && t.visualViewport && W(t.visualViewport, "resize", a, c), u) {
|
|
723
|
+
const i = Be("(orientation: portrait)");
|
|
724
|
+
A(i, () => a());
|
|
748
725
|
}
|
|
749
726
|
return { width: r, height: s };
|
|
750
727
|
}
|
|
751
728
|
export {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
729
|
+
O as a,
|
|
730
|
+
nt as b,
|
|
731
|
+
Ke as c,
|
|
732
|
+
Je as d,
|
|
733
|
+
Ze as e,
|
|
734
|
+
Xe as f,
|
|
758
735
|
W as g,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
qe as w
|
|
736
|
+
Be as h,
|
|
737
|
+
et as i,
|
|
738
|
+
de as j,
|
|
739
|
+
qe as k,
|
|
740
|
+
Ue as o,
|
|
741
|
+
tt as u,
|
|
742
|
+
Qe as w
|
|
767
743
|
};
|