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