@lazycatcloud/lzc-toolkit 0.0.211 → 0.0.213
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/index.es.js +1155 -1146
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/types/useDragSelect/index.d.ts +4 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
const
|
|
1
|
+
import { shallowRef as vt, watchEffect as kt, readonly as Mt, getCurrentScope as Qt, onScopeDispose as gt, onMounted as fe, nextTick as ge, ref as g, watch as G, customRef as Yt, unref as C, isRef as Bt, getCurrentInstance as Re, onUpdated as Ut, computed as L, reactive as De, onUnmounted as ht, inject as ne, provide as P, defineComponent as J, h as re, render as Te, openBlock as R, createBlock as ze, Transition as $e, withCtx as He, withDirectives as ce, createElementBlock as H, normalizeClass as ae, createElementVNode as U, withModifiers as pe, renderSlot as he, createCommentVNode as de, useCssVars as Pe, normalizeProps as Qe, guardReactiveProps as Ye, pushScopeId as Le, popScopeId as je, normalizeStyle as q, toDisplayString as Fe, vShow as Ce, createVNode as me, onBeforeUnmount as mt, onActivated as yt, onBeforeMount as Rt, onDeactivated as $t, useSlots as Ht, toRef as Pt, Fragment as Be, mergeProps as ye, renderList as Ft, toRefs as pt, createTextVNode as Wt } from "vue";
|
|
2
|
+
const Xt = {
|
|
3
3
|
created(e, t) {
|
|
4
4
|
let n, o, l;
|
|
5
|
-
function s(
|
|
6
|
-
|
|
5
|
+
function s(r) {
|
|
6
|
+
r.button == 0 && (n = Date.now(), o = r.clientX, l = r.clientY, t.modifiers?.stop && r.stopPropagation());
|
|
7
7
|
}
|
|
8
|
-
function a(
|
|
9
|
-
if (
|
|
8
|
+
function a(r) {
|
|
9
|
+
if (r.button != 0 || o === void 0)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const u = r.clientX, f = r.clientY, d = Math.abs(u - o), c = Math.abs(f - l);
|
|
12
|
+
d > 5 || c > 5 || Date.now() - n > 300 || t.value?.(r);
|
|
13
13
|
}
|
|
14
14
|
e._down__ = s, e._up__ = a, e.addEventListener("pointerdown", s), e.addEventListener("pointerup", a);
|
|
15
15
|
},
|
|
16
16
|
unmounted(e) {
|
|
17
17
|
e.removeEventListener("pointerdown", e._down__), e.removeEventListener("pointerup", e._up__);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, _o = {
|
|
20
20
|
created(e, t) {
|
|
21
21
|
const { fn: n, ms: o = 1500 } = t.value;
|
|
22
22
|
let l = null;
|
|
@@ -27,48 +27,48 @@ const Ft = {
|
|
|
27
27
|
}
|
|
28
28
|
e.addEventListener("click", s);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, Dt = {
|
|
31
31
|
beforeMount(e, t) {
|
|
32
32
|
t.value();
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function Zt(e, t) {
|
|
36
36
|
var n;
|
|
37
|
-
const o =
|
|
38
|
-
return
|
|
37
|
+
const o = vt();
|
|
38
|
+
return kt(() => {
|
|
39
39
|
o.value = e();
|
|
40
40
|
}, {
|
|
41
41
|
...t,
|
|
42
42
|
flush: (n = t?.flush) != null ? n : "sync"
|
|
43
|
-
}),
|
|
43
|
+
}), Mt(o);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Vt(e, t) {
|
|
46
46
|
let n, o, l;
|
|
47
|
-
const s =
|
|
47
|
+
const s = g(!0), a = () => {
|
|
48
48
|
s.value = !0, l();
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
const
|
|
50
|
+
G(e, a, { flush: "sync" });
|
|
51
|
+
const r = typeof t == "function" ? t : t.get, u = typeof t == "function" ? void 0 : t.set, f = Yt((d, c) => (o = d, l = c, {
|
|
52
52
|
get() {
|
|
53
|
-
return s.value && (n =
|
|
53
|
+
return s.value && (n = r(), s.value = !1), o(), n;
|
|
54
54
|
},
|
|
55
55
|
set(M) {
|
|
56
|
-
|
|
56
|
+
u?.(M);
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
|
-
return Object.isExtensible(
|
|
59
|
+
return Object.isExtensible(f) && (f.trigger = a), f;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function We(e) {
|
|
62
|
+
return Qt() ? (gt(e), !0) : !1;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return typeof e == "function" ? e() :
|
|
64
|
+
function oe(e) {
|
|
65
|
+
return typeof e == "function" ? e() : C(e);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Tt = typeof window < "u" && typeof document < "u";
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
69
|
-
const
|
|
69
|
+
const Kt = Object.prototype.toString, Gt = (e) => Kt.call(e) === "[object Object]", ve = () => {
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function Nt(e, t) {
|
|
72
72
|
function n(...o) {
|
|
73
73
|
return new Promise((l, s) => {
|
|
74
74
|
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(l).catch(s);
|
|
@@ -76,308 +76,308 @@ function Tt(e, t) {
|
|
|
76
76
|
}
|
|
77
77
|
return n;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
let n, o, l =
|
|
81
|
-
const s = (
|
|
82
|
-
clearTimeout(
|
|
79
|
+
function qt(e, t = {}) {
|
|
80
|
+
let n, o, l = ve;
|
|
81
|
+
const s = (r) => {
|
|
82
|
+
clearTimeout(r), l(), l = ve;
|
|
83
83
|
};
|
|
84
|
-
return (
|
|
85
|
-
const
|
|
86
|
-
return n && s(n),
|
|
87
|
-
l = t.rejectOnCancel ? c :
|
|
88
|
-
n && s(n), o = null,
|
|
89
|
-
},
|
|
90
|
-
o && s(o), o = null,
|
|
91
|
-
},
|
|
84
|
+
return (r) => {
|
|
85
|
+
const u = oe(e), f = oe(t.maxWait);
|
|
86
|
+
return n && s(n), u <= 0 || f !== void 0 && f <= 0 ? (o && (s(o), o = null), Promise.resolve(r())) : new Promise((d, c) => {
|
|
87
|
+
l = t.rejectOnCancel ? c : d, f && !o && (o = setTimeout(() => {
|
|
88
|
+
n && s(n), o = null, d(r());
|
|
89
|
+
}, f)), n = setTimeout(() => {
|
|
90
|
+
o && s(o), o = null, d(r());
|
|
91
|
+
}, u);
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
let t = 0, n, o = !0, l =
|
|
97
|
-
!
|
|
98
|
-
const
|
|
99
|
-
n && (clearTimeout(n), n = void 0, l(), l =
|
|
95
|
+
function Jt(...e) {
|
|
96
|
+
let t = 0, n, o = !0, l = ve, s, a, r, u, f;
|
|
97
|
+
!Bt(e[0]) && typeof e[0] == "object" ? { delay: a, trailing: r = !0, leading: u = !0, rejectOnCancel: f = !1 } = e[0] : [a, r = !0, u = !0, f = !1] = e;
|
|
98
|
+
const d = () => {
|
|
99
|
+
n && (clearTimeout(n), n = void 0, l(), l = ve);
|
|
100
100
|
};
|
|
101
101
|
return (M) => {
|
|
102
|
-
const
|
|
103
|
-
return
|
|
104
|
-
l =
|
|
105
|
-
t = Date.now(), o = !0, y(
|
|
106
|
-
}, Math.max(0,
|
|
107
|
-
})), !
|
|
102
|
+
const v = oe(a), i = Date.now() - t, y = () => s = M();
|
|
103
|
+
return d(), v <= 0 ? (t = Date.now(), y()) : (i > v && (u || !o) ? (t = Date.now(), y()) : r && (s = new Promise((T, N) => {
|
|
104
|
+
l = f ? N : T, n = setTimeout(() => {
|
|
105
|
+
t = Date.now(), o = !0, T(y()), d();
|
|
106
|
+
}, Math.max(0, v - i));
|
|
107
|
+
})), !u && !n && (n = setTimeout(() => o = !0, v)), o = !1, s);
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return e ||
|
|
110
|
+
function en(e) {
|
|
111
|
+
return e || Re();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
115
|
-
|
|
113
|
+
function xe(e, t = 200, n = {}) {
|
|
114
|
+
return Nt(
|
|
115
|
+
qt(t, n),
|
|
116
116
|
e
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
return
|
|
121
|
-
|
|
119
|
+
function Ue(e, t = 200, n = !1, o = !0, l = !1) {
|
|
120
|
+
return Nt(
|
|
121
|
+
Jt(t, n, o, l),
|
|
122
122
|
e
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
125
|
+
function Xe(e, t = !0, n) {
|
|
126
|
+
en() ? fe(e, n) : t ? e() : ge(e);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function ue(e) {
|
|
129
129
|
var t;
|
|
130
|
-
const n =
|
|
130
|
+
const n = oe(e);
|
|
131
131
|
return (t = n?.$el) != null ? t : n;
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
133
|
+
const Se = Tt ? window : void 0, tn = Tt ? window.document : void 0;
|
|
134
|
+
function Ee(...e) {
|
|
135
135
|
let t, n, o, l;
|
|
136
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t =
|
|
137
|
-
return
|
|
136
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, l] = e, t = Se) : [t, n, o, l] = e, !t)
|
|
137
|
+
return ve;
|
|
138
138
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
139
139
|
const s = [], a = () => {
|
|
140
|
-
s.forEach((
|
|
141
|
-
},
|
|
142
|
-
() => [
|
|
143
|
-
([
|
|
144
|
-
if (a(), !
|
|
140
|
+
s.forEach((d) => d()), s.length = 0;
|
|
141
|
+
}, r = (d, c, M, v) => (d.addEventListener(c, M, v), () => d.removeEventListener(c, M, v)), u = G(
|
|
142
|
+
() => [ue(t), oe(l)],
|
|
143
|
+
([d, c]) => {
|
|
144
|
+
if (a(), !d)
|
|
145
145
|
return;
|
|
146
|
-
const M =
|
|
146
|
+
const M = Gt(c) ? { ...c } : c;
|
|
147
147
|
s.push(
|
|
148
|
-
...n.flatMap((
|
|
148
|
+
...n.flatMap((v) => o.map((i) => r(d, v, i, M)))
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
{ immediate: !0, flush: "post" }
|
|
152
|
-
),
|
|
153
|
-
|
|
152
|
+
), f = () => {
|
|
153
|
+
u(), a();
|
|
154
154
|
};
|
|
155
|
-
return
|
|
155
|
+
return We(f), f;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const e =
|
|
159
|
-
return t &&
|
|
157
|
+
function nn() {
|
|
158
|
+
const e = g(!1), t = Re();
|
|
159
|
+
return t && fe(() => {
|
|
160
160
|
e.value = !0;
|
|
161
161
|
}, t), e;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
const t =
|
|
165
|
-
return
|
|
163
|
+
function on(e) {
|
|
164
|
+
const t = nn();
|
|
165
|
+
return L(() => (t.value, Boolean(e())));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
const t =
|
|
167
|
+
function ln(e) {
|
|
168
|
+
const t = Re(), n = Vt(
|
|
169
169
|
() => null,
|
|
170
|
-
() => e ?
|
|
170
|
+
() => e ? ue(e) : t.proxy.$el
|
|
171
171
|
);
|
|
172
|
-
return
|
|
172
|
+
return Ut(n.trigger), fe(n.trigger), n;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const { window: o =
|
|
174
|
+
function Ze(e, t, n = {}) {
|
|
175
|
+
const { window: o = Se, ...l } = n;
|
|
176
176
|
let s;
|
|
177
|
-
const a =
|
|
177
|
+
const a = on(() => o && "ResizeObserver" in o), r = () => {
|
|
178
178
|
s && (s.disconnect(), s = void 0);
|
|
179
|
-
},
|
|
180
|
-
|
|
179
|
+
}, u = L(() => Array.isArray(e) ? e.map((c) => ue(c)) : [ue(e)]), f = G(
|
|
180
|
+
u,
|
|
181
181
|
(c) => {
|
|
182
|
-
if (
|
|
182
|
+
if (r(), a.value && o) {
|
|
183
183
|
s = new ResizeObserver(t);
|
|
184
184
|
for (const M of c)
|
|
185
185
|
M && s.observe(M, l);
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{ immediate: !0, flush: "post" }
|
|
189
|
-
),
|
|
190
|
-
|
|
189
|
+
), d = () => {
|
|
190
|
+
r(), f();
|
|
191
191
|
};
|
|
192
|
-
return
|
|
192
|
+
return We(d), {
|
|
193
193
|
isSupported: a,
|
|
194
|
-
stop:
|
|
194
|
+
stop: d
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const { window: o =
|
|
197
|
+
function sn(e, t = { width: 0, height: 0 }, n = {}) {
|
|
198
|
+
const { window: o = Se, box: l = "content-box" } = n, s = L(() => {
|
|
199
199
|
var c, M;
|
|
200
|
-
return (M = (c =
|
|
201
|
-
}), a =
|
|
200
|
+
return (M = (c = ue(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : M.includes("svg");
|
|
201
|
+
}), a = g(t.width), r = g(t.height), { stop: u } = Ze(
|
|
202
202
|
e,
|
|
203
203
|
([c]) => {
|
|
204
204
|
const M = l === "border-box" ? c.borderBoxSize : l === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
205
205
|
if (o && s.value) {
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
a.value = Number.parseFloat(
|
|
206
|
+
const v = ue(e);
|
|
207
|
+
if (v) {
|
|
208
|
+
const i = o.getComputedStyle(v);
|
|
209
|
+
a.value = Number.parseFloat(i.width), r.value = Number.parseFloat(i.height);
|
|
210
210
|
}
|
|
211
211
|
} else if (M) {
|
|
212
|
-
const
|
|
213
|
-
a.value =
|
|
212
|
+
const v = Array.isArray(M) ? M : [M];
|
|
213
|
+
a.value = v.reduce((i, { inlineSize: y }) => i + y, 0), r.value = v.reduce((i, { blockSize: y }) => i + y, 0);
|
|
214
214
|
} else
|
|
215
|
-
a.value = c.contentRect.width,
|
|
215
|
+
a.value = c.contentRect.width, r.value = c.contentRect.height;
|
|
216
216
|
},
|
|
217
217
|
n
|
|
218
218
|
);
|
|
219
|
-
|
|
220
|
-
const c =
|
|
221
|
-
c && (a.value = "offsetWidth" in c ? c.offsetWidth : t.width,
|
|
219
|
+
Xe(() => {
|
|
220
|
+
const c = ue(e);
|
|
221
|
+
c && (a.value = "offsetWidth" in c ? c.offsetWidth : t.width, r.value = "offsetHeight" in c ? c.offsetHeight : t.height);
|
|
222
222
|
});
|
|
223
|
-
const
|
|
224
|
-
() =>
|
|
223
|
+
const f = G(
|
|
224
|
+
() => ue(e),
|
|
225
225
|
(c) => {
|
|
226
|
-
a.value = c ? t.width : 0,
|
|
226
|
+
a.value = c ? t.width : 0, r.value = c ? t.height : 0;
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
function
|
|
230
|
-
|
|
229
|
+
function d() {
|
|
230
|
+
u(), f();
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
233
|
width: a,
|
|
234
|
-
height:
|
|
235
|
-
stop:
|
|
234
|
+
height: r,
|
|
235
|
+
stop: d
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
238
|
+
const ut = 1;
|
|
239
|
+
function an(e, t = {}) {
|
|
240
240
|
const {
|
|
241
241
|
throttle: n = 0,
|
|
242
242
|
idle: o = 200,
|
|
243
|
-
onStop: l =
|
|
244
|
-
onScroll: s =
|
|
243
|
+
onStop: l = ve,
|
|
244
|
+
onScroll: s = ve,
|
|
245
245
|
offset: a = {
|
|
246
246
|
left: 0,
|
|
247
247
|
right: 0,
|
|
248
248
|
top: 0,
|
|
249
249
|
bottom: 0
|
|
250
250
|
},
|
|
251
|
-
eventListenerOptions:
|
|
251
|
+
eventListenerOptions: r = {
|
|
252
252
|
capture: !1,
|
|
253
253
|
passive: !0
|
|
254
254
|
},
|
|
255
|
-
behavior:
|
|
256
|
-
window:
|
|
257
|
-
onError:
|
|
258
|
-
console.error(
|
|
255
|
+
behavior: u = "auto",
|
|
256
|
+
window: f = Se,
|
|
257
|
+
onError: d = (p) => {
|
|
258
|
+
console.error(p);
|
|
259
259
|
}
|
|
260
|
-
} = t, c =
|
|
260
|
+
} = t, c = g(0), M = g(0), v = L({
|
|
261
261
|
get() {
|
|
262
262
|
return c.value;
|
|
263
263
|
},
|
|
264
|
-
set(
|
|
265
|
-
|
|
264
|
+
set(p) {
|
|
265
|
+
y(p, void 0);
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), i = L({
|
|
268
268
|
get() {
|
|
269
269
|
return M.value;
|
|
270
270
|
},
|
|
271
|
-
set(
|
|
272
|
-
|
|
271
|
+
set(p) {
|
|
272
|
+
y(void 0, p);
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
function
|
|
276
|
-
var Y,
|
|
277
|
-
if (!
|
|
275
|
+
function y(p, x) {
|
|
276
|
+
var Y, Z, D;
|
|
277
|
+
if (!f)
|
|
278
278
|
return;
|
|
279
|
-
const A =
|
|
280
|
-
!A || (
|
|
281
|
-
top: (Y =
|
|
282
|
-
left: (
|
|
283
|
-
behavior:
|
|
279
|
+
const A = oe(e);
|
|
280
|
+
!A || (D = A instanceof Document ? f.document.body : A) == null || D.scrollTo({
|
|
281
|
+
top: (Y = oe(x)) != null ? Y : i.value,
|
|
282
|
+
left: (Z = oe(p)) != null ? Z : v.value,
|
|
283
|
+
behavior: oe(u)
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const T = g(!1), N = De({
|
|
287
287
|
left: !0,
|
|
288
288
|
right: !1,
|
|
289
289
|
top: !0,
|
|
290
290
|
bottom: !1
|
|
291
|
-
}), E =
|
|
291
|
+
}), E = De({
|
|
292
292
|
left: !1,
|
|
293
293
|
right: !1,
|
|
294
294
|
top: !1,
|
|
295
295
|
bottom: !1
|
|
296
|
-
}),
|
|
297
|
-
!
|
|
298
|
-
},
|
|
299
|
-
var
|
|
300
|
-
if (!
|
|
296
|
+
}), j = (p) => {
|
|
297
|
+
!T.value || (T.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, l(p));
|
|
298
|
+
}, h = xe(j, n + o), m = (p) => {
|
|
299
|
+
var x;
|
|
300
|
+
if (!f)
|
|
301
301
|
return;
|
|
302
|
-
const Y = ((
|
|
302
|
+
const Y = ((x = p?.document) == null ? void 0 : x.documentElement) || p?.documentElement || ue(p), { display: Z, flexDirection: D } = getComputedStyle(Y), A = Y.scrollLeft;
|
|
303
303
|
E.left = A < c.value, E.right = A > c.value;
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
const z = Math.abs(
|
|
309
|
-
|
|
310
|
-
}, w = (
|
|
311
|
-
var
|
|
312
|
-
if (!
|
|
304
|
+
const b = Math.abs(A) <= (a.left || 0), Q = Math.abs(A) + Y.clientWidth >= Y.scrollWidth - (a.right || 0) - ut;
|
|
305
|
+
Z === "flex" && D === "row-reverse" ? (N.left = Q, N.right = b) : (N.left = b, N.right = Q), c.value = A;
|
|
306
|
+
let k = Y.scrollTop;
|
|
307
|
+
p === f.document && !k && (k = f.document.body.scrollTop), E.top = k < M.value, E.bottom = k > M.value;
|
|
308
|
+
const z = Math.abs(k) <= (a.top || 0), I = Math.abs(k) + Y.clientHeight >= Y.scrollHeight - (a.bottom || 0) - ut;
|
|
309
|
+
Z === "flex" && D === "column-reverse" ? (N.top = I, N.bottom = z) : (N.top = z, N.bottom = I), M.value = k;
|
|
310
|
+
}, w = (p) => {
|
|
311
|
+
var x;
|
|
312
|
+
if (!f)
|
|
313
313
|
return;
|
|
314
|
-
const Y = (
|
|
315
|
-
|
|
314
|
+
const Y = (x = p.target.documentElement) != null ? x : p.target;
|
|
315
|
+
m(Y), T.value = !0, h(p), s(p);
|
|
316
316
|
};
|
|
317
|
-
return
|
|
317
|
+
return Ee(
|
|
318
318
|
e,
|
|
319
319
|
"scroll",
|
|
320
|
-
n ?
|
|
321
|
-
|
|
322
|
-
),
|
|
320
|
+
n ? Ue(w, n, !0, !1) : w,
|
|
321
|
+
r
|
|
322
|
+
), Xe(() => {
|
|
323
323
|
try {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
324
|
+
const p = oe(e);
|
|
325
|
+
if (!p)
|
|
326
326
|
return;
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
|
|
327
|
+
m(p);
|
|
328
|
+
} catch (p) {
|
|
329
|
+
d(p);
|
|
330
330
|
}
|
|
331
|
-
}),
|
|
331
|
+
}), Ee(
|
|
332
332
|
e,
|
|
333
333
|
"scrollend",
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
j,
|
|
335
|
+
r
|
|
336
336
|
), {
|
|
337
|
-
x:
|
|
338
|
-
y:
|
|
339
|
-
isScrolling:
|
|
337
|
+
x: v,
|
|
338
|
+
y: i,
|
|
339
|
+
isScrolling: T,
|
|
340
340
|
arrivedState: N,
|
|
341
341
|
directions: E,
|
|
342
342
|
measure() {
|
|
343
|
-
const
|
|
344
|
-
|
|
343
|
+
const p = oe(e);
|
|
344
|
+
f && p && m(p);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
let
|
|
349
|
-
function
|
|
350
|
-
const n =
|
|
351
|
-
document: o =
|
|
348
|
+
let un = 0;
|
|
349
|
+
function Ve(e, t = {}) {
|
|
350
|
+
const n = g(!1), {
|
|
351
|
+
document: o = tn,
|
|
352
352
|
immediate: l = !0,
|
|
353
353
|
manual: s = !1,
|
|
354
|
-
id: a = `vueuse_styletag_${++
|
|
355
|
-
} = t,
|
|
356
|
-
let
|
|
354
|
+
id: a = `vueuse_styletag_${++un}`
|
|
355
|
+
} = t, r = g(e);
|
|
356
|
+
let u = () => {
|
|
357
357
|
};
|
|
358
|
-
const
|
|
358
|
+
const f = () => {
|
|
359
359
|
if (!o)
|
|
360
360
|
return;
|
|
361
361
|
const c = o.getElementById(a) || o.createElement("style");
|
|
362
|
-
c.isConnected || (c.id = a, t.media && (c.media = t.media), o.head.appendChild(c)), !n.value && (
|
|
363
|
-
|
|
362
|
+
c.isConnected || (c.id = a, t.media && (c.media = t.media), o.head.appendChild(c)), !n.value && (u = G(
|
|
363
|
+
r,
|
|
364
364
|
(M) => {
|
|
365
365
|
c.textContent = M;
|
|
366
366
|
},
|
|
367
367
|
{ immediate: !0 }
|
|
368
368
|
), n.value = !0);
|
|
369
|
-
},
|
|
370
|
-
!o || !n.value || (
|
|
369
|
+
}, d = () => {
|
|
370
|
+
!o || !n.value || (u(), o.head.removeChild(o.getElementById(a)), n.value = !1);
|
|
371
371
|
};
|
|
372
|
-
return l && !s &&
|
|
372
|
+
return l && !s && Xe(f), s || We(d), {
|
|
373
373
|
id: a,
|
|
374
|
-
css:
|
|
375
|
-
unload:
|
|
376
|
-
load:
|
|
377
|
-
isLoaded:
|
|
374
|
+
css: r,
|
|
375
|
+
unload: d,
|
|
376
|
+
load: f,
|
|
377
|
+
isLoaded: Mt(n)
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function rn(e, t, n) {
|
|
381
381
|
const o = e.style[t];
|
|
382
382
|
return o != n && (e.style[t] = n), {
|
|
383
383
|
reset() {
|
|
@@ -385,345 +385,345 @@ function an(e, t, n) {
|
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s =
|
|
390
|
-
let
|
|
391
|
-
const
|
|
392
|
-
let
|
|
393
|
-
const
|
|
394
|
-
let { sum: z, height:
|
|
395
|
-
return
|
|
396
|
-
}), N =
|
|
397
|
-
const { start: z, end:
|
|
398
|
-
return
|
|
388
|
+
function cn(e, t) {
|
|
389
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = g(null), a = sn(s), r = g(!0), u = xe(m, 100);
|
|
390
|
+
let f;
|
|
391
|
+
const d = vt(e), c = g(0), M = g({ start: 0, end: 10 }), v = g({ start: 0, end: l });
|
|
392
|
+
let i = 0;
|
|
393
|
+
const y = g([]), T = L(() => {
|
|
394
|
+
let { sum: z, height: I } = { sum: 0, height: 0 };
|
|
395
|
+
return d.value.map((B, $) => (typeof o == "number" ? I = o : I = o($), z += I, { height: I, sum: z }));
|
|
396
|
+
}), N = L(() => Z(M.value.start)), E = L(() => typeof o == "number" ? T.value.length * o : T.value[T.value.length - 1]?.sum || 0), j = L(() => {
|
|
397
|
+
const { start: z, end: I } = v.value;
|
|
398
|
+
return y.value.slice(z, I);
|
|
399
399
|
});
|
|
400
|
-
|
|
401
|
-
}),
|
|
402
|
-
|
|
400
|
+
fe(() => {
|
|
401
|
+
}), ht(() => cancelAnimationFrame(f)), G(
|
|
402
|
+
d,
|
|
403
403
|
() => {
|
|
404
404
|
(a.width.value || a.height.value) && w();
|
|
405
405
|
},
|
|
406
406
|
{ deep: !0 }
|
|
407
|
-
),
|
|
407
|
+
), G(
|
|
408
408
|
[a.width, a.height],
|
|
409
|
-
([z,
|
|
410
|
-
(z ||
|
|
409
|
+
([z, I]) => {
|
|
410
|
+
(z || I) && w();
|
|
411
411
|
},
|
|
412
412
|
{ deep: !0 }
|
|
413
|
-
),
|
|
414
|
-
|
|
413
|
+
), G(c, () => {
|
|
414
|
+
h(), u();
|
|
415
415
|
});
|
|
416
|
-
function
|
|
417
|
-
|
|
416
|
+
function h() {
|
|
417
|
+
r.value = !1;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
419
|
+
function m() {
|
|
420
|
+
r.value = !0, n?.();
|
|
421
421
|
}
|
|
422
422
|
function w() {
|
|
423
|
-
cancelAnimationFrame(
|
|
423
|
+
cancelAnimationFrame(f), f = requestAnimationFrame(p);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function p() {
|
|
426
426
|
if (s.value) {
|
|
427
427
|
c.value = s.value.scrollTop;
|
|
428
|
-
let z =
|
|
429
|
-
|
|
430
|
-
let
|
|
431
|
-
z +
|
|
432
|
-
|
|
428
|
+
let z = x(c.value);
|
|
429
|
+
i = Y(z);
|
|
430
|
+
let I = Math.max(0, z - l), B = Math.min(
|
|
431
|
+
z + i + l,
|
|
432
|
+
d.value.length
|
|
433
433
|
);
|
|
434
|
-
M.value = { start:
|
|
434
|
+
M.value = { start: I, end: B }, y.value = d.value.slice(I, B).map(($, _) => ({
|
|
435
435
|
data: $,
|
|
436
|
-
index:
|
|
437
|
-
})),
|
|
436
|
+
index: _ + I
|
|
437
|
+
})), v.value.start = z - I, v.value.end = v.value.start + i;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let
|
|
442
|
-
for (;
|
|
443
|
-
const
|
|
444
|
-
|
|
440
|
+
function x(z) {
|
|
441
|
+
let I = 0, B = T.value.length - 1, $ = -1;
|
|
442
|
+
for (; I <= B; ) {
|
|
443
|
+
const _ = Math.floor((I + B) / 2);
|
|
444
|
+
T.value[_].sum >= z ? ($ = _, B = _ - 1) : I = _ + 1;
|
|
445
445
|
}
|
|
446
446
|
return Math.max(0, $);
|
|
447
447
|
}
|
|
448
448
|
function Y(z) {
|
|
449
|
-
let
|
|
450
|
-
for (let $ = z; $ <
|
|
449
|
+
let I = 0, B = 0;
|
|
450
|
+
for (let $ = z; $ < T.value.length && (I++, B += T.value[$].height, !(B >= a.height.value)); $++)
|
|
451
451
|
;
|
|
452
|
-
return
|
|
452
|
+
return I;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Z(z) {
|
|
455
455
|
if (typeof o == "number")
|
|
456
456
|
return z * o;
|
|
457
|
-
let
|
|
458
|
-
return
|
|
457
|
+
let I = T.value[z];
|
|
458
|
+
return I ? I.sum - I.height : 0;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
460
|
+
function D(z) {
|
|
461
|
+
return T.value[z] || { sum: 0, height: 0 };
|
|
462
462
|
}
|
|
463
|
-
function A(z,
|
|
463
|
+
function A(z, I = "smooth") {
|
|
464
464
|
if (s.value) {
|
|
465
|
-
const { reset: B } =
|
|
465
|
+
const { reset: B } = rn(
|
|
466
466
|
s.value,
|
|
467
467
|
"scrollBehavior",
|
|
468
|
-
|
|
469
|
-
), $ =
|
|
470
|
-
s.value.scrollTop = $.sum - $.height,
|
|
468
|
+
I
|
|
469
|
+
), $ = D(z);
|
|
470
|
+
s.value.scrollTop = $.sum - $.height, p(), B();
|
|
471
471
|
}
|
|
472
472
|
if (s.value) {
|
|
473
|
-
const B =
|
|
474
|
-
s.value.scrollTop = B.sum - B.height,
|
|
473
|
+
const B = D(z);
|
|
474
|
+
s.value.scrollTop = B.sum - B.height, p();
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
const
|
|
477
|
+
const b = L(() => ({
|
|
478
478
|
style: {
|
|
479
479
|
width: "100%",
|
|
480
480
|
height: `${E.value}px`,
|
|
481
|
-
pointerEvents:
|
|
481
|
+
pointerEvents: r.value ? void 0 : "none"
|
|
482
482
|
}
|
|
483
|
-
})), Q =
|
|
483
|
+
})), Q = L(() => ({
|
|
484
484
|
style: {
|
|
485
485
|
transform: `translate3d(0, ${N.value}px, 0)`,
|
|
486
486
|
"will-change": "transform"
|
|
487
487
|
}
|
|
488
|
-
})),
|
|
488
|
+
})), k = {
|
|
489
489
|
overflowY: "auto"
|
|
490
490
|
};
|
|
491
491
|
return {
|
|
492
|
-
list:
|
|
493
|
-
visiableList:
|
|
494
|
-
getItemHeightData:
|
|
495
|
-
getoffsetTopIndex:
|
|
492
|
+
list: y,
|
|
493
|
+
visiableList: j,
|
|
494
|
+
getItemHeightData: D,
|
|
495
|
+
getoffsetTopIndex: x,
|
|
496
496
|
totalHeight: E,
|
|
497
497
|
clientHeight: a.height,
|
|
498
498
|
scrollTo: A,
|
|
499
499
|
scrollTop: c,
|
|
500
|
-
isScrollEnd:
|
|
500
|
+
isScrollEnd: r,
|
|
501
501
|
containerProps: {
|
|
502
502
|
ref: s,
|
|
503
503
|
onScroll: () => {
|
|
504
504
|
w();
|
|
505
505
|
},
|
|
506
|
-
style:
|
|
506
|
+
style: k
|
|
507
507
|
},
|
|
508
|
-
wrapperProps:
|
|
508
|
+
wrapperProps: b,
|
|
509
509
|
innerProps: Q
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
function
|
|
512
|
+
const wt = Symbol(), Ke = Symbol(), Ge = Symbol(), qe = Symbol(), Je = Symbol(), et = Symbol(), tt = Symbol(), nt = Symbol(), ot = Symbol(), Ne = Symbol(), lt = Symbol();
|
|
513
|
+
function ko() {
|
|
514
514
|
const { voidFn: e, boolFn: t, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
515
|
-
voidFn: (
|
|
515
|
+
voidFn: (T) => {
|
|
516
516
|
},
|
|
517
|
-
boolFn: (
|
|
518
|
-
boolRef:
|
|
519
|
-
numberRef:
|
|
520
|
-
arrayRef:
|
|
521
|
-
}, s =
|
|
517
|
+
boolFn: (T) => !1,
|
|
518
|
+
boolRef: L(() => !1),
|
|
519
|
+
numberRef: L(() => 0),
|
|
520
|
+
arrayRef: L(() => [])
|
|
521
|
+
}, s = ne(wt, "id"), a = ne(Je, l), r = ne(qe, t), u = ne(ot, n), f = ne(Ge, e), d = ne(Ke, e), c = ne(et, e), M = ne(tt, e), v = ne(nt, e), i = ne(Ne, e), y = ne(lt, o);
|
|
522
522
|
return {
|
|
523
523
|
itemKey: s,
|
|
524
524
|
selected: a,
|
|
525
|
-
isSelected:
|
|
526
|
-
isAllSelected:
|
|
527
|
-
toggle:
|
|
528
|
-
toggleAll:
|
|
525
|
+
isSelected: r,
|
|
526
|
+
isAllSelected: u,
|
|
527
|
+
toggle: f,
|
|
528
|
+
toggleAll: d,
|
|
529
529
|
select: c,
|
|
530
530
|
selectAll: M,
|
|
531
|
-
unselect:
|
|
532
|
-
unselectAll:
|
|
533
|
-
selectedCount:
|
|
531
|
+
unselect: v,
|
|
532
|
+
unselectAll: i,
|
|
533
|
+
selectedCount: y
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
const o =
|
|
538
|
-
|
|
536
|
+
function Qo(e, t, n = { deep: !0, useAllFlagOptimizatiofn: !0 }) {
|
|
537
|
+
const o = g(!1), l = g(/* @__PURE__ */ new Set()), s = De(/* @__PURE__ */ new Map());
|
|
538
|
+
G(
|
|
539
539
|
e,
|
|
540
|
-
(
|
|
541
|
-
a(
|
|
540
|
+
(h) => {
|
|
541
|
+
a(h);
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
544
|
deep: n.deep,
|
|
545
545
|
immediate: !0
|
|
546
546
|
}
|
|
547
|
-
),
|
|
547
|
+
), G(
|
|
548
548
|
() => e.value.length,
|
|
549
549
|
() => {
|
|
550
550
|
a(e.value);
|
|
551
551
|
}
|
|
552
|
-
),
|
|
552
|
+
), gt(() => {
|
|
553
553
|
o.value = !1, l.value.clear(), s.clear();
|
|
554
554
|
});
|
|
555
|
-
function a(
|
|
556
|
-
s.clear(),
|
|
557
|
-
s.has(
|
|
558
|
-
}),
|
|
555
|
+
function a(h) {
|
|
556
|
+
s.clear(), h.forEach((m) => {
|
|
557
|
+
s.has(m[t]) || s.set(m[t], m);
|
|
558
|
+
}), j();
|
|
559
559
|
}
|
|
560
|
-
const
|
|
561
|
-
let
|
|
560
|
+
const r = L(() => {
|
|
561
|
+
let h = [];
|
|
562
562
|
if (o.value != null)
|
|
563
|
-
o.value && (
|
|
563
|
+
o.value && (h = Array.from(s.values()));
|
|
564
564
|
else if (l.value.size) {
|
|
565
|
-
let
|
|
565
|
+
let m;
|
|
566
566
|
l.value.forEach((w) => {
|
|
567
|
-
|
|
567
|
+
m = s.get(w), m && h.push(m);
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
return
|
|
571
|
-
}),
|
|
572
|
-
let
|
|
573
|
-
return o.value != null ? o.value && (
|
|
574
|
-
}),
|
|
575
|
-
let
|
|
570
|
+
return h;
|
|
571
|
+
}), u = L(() => {
|
|
572
|
+
let h = 0;
|
|
573
|
+
return o.value != null ? o.value && (h = s.size) : h = l.value.size, h;
|
|
574
|
+
}), f = L(() => {
|
|
575
|
+
let h;
|
|
576
576
|
if (o.value != null)
|
|
577
|
-
|
|
577
|
+
h = o.value;
|
|
578
578
|
else {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const m = l.value.size, w = s.size;
|
|
580
|
+
h = m == w;
|
|
581
581
|
}
|
|
582
|
-
return
|
|
582
|
+
return h;
|
|
583
583
|
});
|
|
584
|
-
function
|
|
584
|
+
function d() {
|
|
585
585
|
o.value = !0;
|
|
586
586
|
}
|
|
587
587
|
function c() {
|
|
588
588
|
o.value = !1;
|
|
589
589
|
}
|
|
590
|
-
function M(
|
|
591
|
-
s.has(
|
|
590
|
+
function M(h) {
|
|
591
|
+
s.has(h) && l.value.add(h);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
M(
|
|
593
|
+
function v(h) {
|
|
594
|
+
T(() => {
|
|
595
|
+
h.forEach((m) => {
|
|
596
|
+
M(m[t]);
|
|
597
597
|
});
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
l.value.delete(
|
|
600
|
+
function i(h) {
|
|
601
|
+
T(() => {
|
|
602
|
+
h.forEach((m) => {
|
|
603
|
+
l.value.delete(m[t]);
|
|
604
604
|
});
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
-
function
|
|
608
|
-
return o.value != null ? o.value : l.value.has(
|
|
607
|
+
function y(h) {
|
|
608
|
+
return o.value != null ? o.value : l.value.has(h[t]);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()),
|
|
610
|
+
function T(h) {
|
|
611
|
+
o.value != null && (o.value ? l.value = new Set(Array.from(s.keys())) : l.value = /* @__PURE__ */ new Set()), h(), n.useAllFlagOptimizatiofn ? l.value.size == 0 ? o.value = !1 : l.value.size == s.size ? o.value = !0 : o.value = null : o.value = null;
|
|
612
612
|
}
|
|
613
|
-
function N(
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
613
|
+
function N(h) {
|
|
614
|
+
T(() => {
|
|
615
|
+
h.forEach((m) => {
|
|
616
|
+
y(m) ? l.value.delete(m[t]) : M(m[t]);
|
|
617
617
|
});
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
620
|
function E() {
|
|
621
|
-
const { value:
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
626
|
-
l.value.forEach((
|
|
627
|
-
s.get(
|
|
628
|
-
}),
|
|
629
|
-
}
|
|
630
|
-
return P(
|
|
631
|
-
selected:
|
|
632
|
-
select:
|
|
633
|
-
selectAll:
|
|
634
|
-
unselect:
|
|
621
|
+
const { value: h } = f;
|
|
622
|
+
h ? c() : d();
|
|
623
|
+
}
|
|
624
|
+
function j() {
|
|
625
|
+
const h = [];
|
|
626
|
+
l.value.forEach((m) => {
|
|
627
|
+
s.get(m) || h.push(m);
|
|
628
|
+
}), h.forEach((m) => l.value.delete(m));
|
|
629
|
+
}
|
|
630
|
+
return P(wt, t), P(Ke, E), P(Ge, N), P(qe, y), P(Je, r), P(et, v), P(tt, d), P(nt, i), P(ot, f), P(Ne, c), P(Ne, c), P(lt, u), {
|
|
631
|
+
selected: r,
|
|
632
|
+
select: v,
|
|
633
|
+
selectAll: d,
|
|
634
|
+
unselect: i,
|
|
635
635
|
unselectAll: c,
|
|
636
636
|
toggle: N,
|
|
637
637
|
toggleAll: E,
|
|
638
|
-
isSelected:
|
|
639
|
-
isAllSelected:
|
|
640
|
-
selectedCount:
|
|
638
|
+
isSelected: y,
|
|
639
|
+
isAllSelected: f,
|
|
640
|
+
selectedCount: u
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
const t =
|
|
645
|
-
let
|
|
646
|
-
return t.value != null ? t.value && (
|
|
647
|
-
}), l =
|
|
648
|
-
let
|
|
649
|
-
return t.value != null ? t.value && (
|
|
650
|
-
}), s =
|
|
651
|
-
let
|
|
643
|
+
function Yo(e) {
|
|
644
|
+
const t = g(!1), n = g(/* @__PURE__ */ new Set()), o = L(() => {
|
|
645
|
+
let i = [];
|
|
646
|
+
return t.value != null ? t.value && (i = e.value) : n.value.size && (i = Array.from(n.value.values())), i;
|
|
647
|
+
}), l = L(() => {
|
|
648
|
+
let i = 0;
|
|
649
|
+
return t.value != null ? t.value && (i = e.value.length) : i = n.value.size, i;
|
|
650
|
+
}), s = L(() => {
|
|
651
|
+
let i;
|
|
652
652
|
if (t.value != null)
|
|
653
|
-
|
|
653
|
+
i = t.value;
|
|
654
654
|
else {
|
|
655
|
-
const
|
|
656
|
-
|
|
655
|
+
const y = n.value.size, T = e.value.length;
|
|
656
|
+
i = y == T;
|
|
657
657
|
}
|
|
658
|
-
return
|
|
658
|
+
return i;
|
|
659
659
|
});
|
|
660
660
|
function a() {
|
|
661
661
|
t.value = !0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function r() {
|
|
664
664
|
t.value = !1;
|
|
665
665
|
}
|
|
666
|
-
function i
|
|
666
|
+
function u(i) {
|
|
667
667
|
c(() => {
|
|
668
|
-
|
|
669
|
-
n.value.add(
|
|
668
|
+
i.forEach((y) => {
|
|
669
|
+
n.value.add(y);
|
|
670
670
|
});
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function f(i) {
|
|
674
674
|
c(() => {
|
|
675
|
-
|
|
676
|
-
n.value.delete(
|
|
675
|
+
i.forEach((y) => {
|
|
676
|
+
n.value.delete(y);
|
|
677
677
|
});
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return t.value != null ? t.value : n.value.has(
|
|
680
|
+
function d(i) {
|
|
681
|
+
return t.value != null ? t.value : n.value.has(i);
|
|
682
682
|
}
|
|
683
|
-
function c(
|
|
684
|
-
t.value != null && (t.value ? n.value = new Set(Array.from(e.value)) : n.value = /* @__PURE__ */ new Set()),
|
|
683
|
+
function c(i) {
|
|
684
|
+
t.value != null && (t.value ? n.value = new Set(Array.from(e.value)) : n.value = /* @__PURE__ */ new Set()), i(), n.value.size == 0 ? t.value = !1 : n.value.size == e.value.length ? t.value = !0 : t.value = null;
|
|
685
685
|
}
|
|
686
|
-
function M(
|
|
686
|
+
function M(i) {
|
|
687
687
|
c(() => {
|
|
688
|
-
|
|
689
|
-
|
|
688
|
+
i.forEach((y) => {
|
|
689
|
+
d(y) ? n.value.delete(y) : n.value.add(y);
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
const { value:
|
|
695
|
-
|
|
693
|
+
function v() {
|
|
694
|
+
const { value: i } = s;
|
|
695
|
+
i ? r() : a();
|
|
696
696
|
}
|
|
697
|
-
return P(
|
|
697
|
+
return P(Ke, v), P(Ge, M), P(qe, d), P(Je, o), P(et, u), P(tt, a), P(nt, f), P(ot, s), P(Ne, r), P(Ne, r), P(lt, l), {
|
|
698
698
|
selected: o,
|
|
699
|
-
select:
|
|
699
|
+
select: u,
|
|
700
700
|
selectAll: a,
|
|
701
|
-
unselect:
|
|
702
|
-
unselectAll:
|
|
701
|
+
unselect: f,
|
|
702
|
+
unselectAll: r,
|
|
703
703
|
toggle: M,
|
|
704
|
-
toggleAll:
|
|
705
|
-
isSelected:
|
|
704
|
+
toggleAll: v,
|
|
705
|
+
isSelected: d,
|
|
706
706
|
isAllSelected: s,
|
|
707
707
|
selectedCount: l
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function fn(e, t) {
|
|
711
711
|
return e > t ? "horizontal" : t > e ? "vertical" : "";
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
const e =
|
|
713
|
+
function dn() {
|
|
714
|
+
const e = g(0), t = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), r = () => a.value === "vertical", u = () => a.value === "horizontal", f = () => {
|
|
715
715
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
716
716
|
};
|
|
717
717
|
return {
|
|
718
|
-
move: (M,
|
|
719
|
-
n.value = (M < 0 ? 0 : M) - e.value, o.value =
|
|
720
|
-
const
|
|
721
|
-
(!a.value || l.value <
|
|
718
|
+
move: (M, v) => {
|
|
719
|
+
n.value = (M < 0 ? 0 : M) - e.value, o.value = v - t.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
720
|
+
const i = 10;
|
|
721
|
+
(!a.value || l.value < i && s.value < i) && (a.value = fn(l.value, s.value));
|
|
722
722
|
},
|
|
723
|
-
start: (M,
|
|
724
|
-
|
|
723
|
+
start: (M, v) => {
|
|
724
|
+
f(), e.value = M, t.value = v;
|
|
725
725
|
},
|
|
726
|
-
reset:
|
|
726
|
+
reset: f,
|
|
727
727
|
startX: e,
|
|
728
728
|
startY: t,
|
|
729
729
|
deltaX: n,
|
|
@@ -731,16 +731,16 @@ function cn() {
|
|
|
731
731
|
offsetX: l,
|
|
732
732
|
offsetY: s,
|
|
733
733
|
direction: a,
|
|
734
|
-
isVertical:
|
|
735
|
-
isHorizontal:
|
|
734
|
+
isVertical: r,
|
|
735
|
+
isHorizontal: u
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function be(e) {
|
|
739
739
|
return () => {
|
|
740
740
|
console.debug(`\u9ED8\u8BA4${e}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function It({
|
|
744
744
|
key: e,
|
|
745
745
|
customAttributeValue: t,
|
|
746
746
|
attribute: n,
|
|
@@ -749,153 +749,162 @@ function wt({
|
|
|
749
749
|
getSelectMap: s = () => ({})
|
|
750
750
|
}) {
|
|
751
751
|
const {
|
|
752
|
-
select: a =
|
|
753
|
-
unselect:
|
|
754
|
-
unselectAll:
|
|
752
|
+
select: a = be("\u9009\u62E9"),
|
|
753
|
+
unselect: r = be("\u53D6\u6D88\u9009\u62E9"),
|
|
754
|
+
unselectAll: u = be("\u53D6\u6D88\u5168\u9009"),
|
|
755
|
+
selected: f = L(() => [])
|
|
755
756
|
} = s();
|
|
756
|
-
let
|
|
757
|
-
const
|
|
758
|
-
() =>
|
|
759
|
-
),
|
|
757
|
+
let d = {};
|
|
758
|
+
const c = L(
|
|
759
|
+
() => Ue(o === "colum" ? Ot : bt, 50)
|
|
760
|
+
), M = L(() => e ?? n), v = (() => t ? (O) => t(O) : (O) => O)(), i = /* @__PURE__ */ new Set();
|
|
761
|
+
let y = /* @__PURE__ */ new Set();
|
|
762
|
+
const T = g(!0), N = g(), E = g(!1), j = g({ x: 0, y: 0 }), h = g({ x: 0, y: 0, scrollTop: 0 }), m = g({}), w = g({
|
|
760
763
|
top: 0,
|
|
761
764
|
height: 0,
|
|
762
|
-
sync(
|
|
763
|
-
|
|
765
|
+
sync(O = !1) {
|
|
766
|
+
w.value.top = N.value?.scrollTop || 0, O && (w.value.height = N.value?.scrollHeight || 0);
|
|
764
767
|
}
|
|
765
|
-
}),
|
|
766
|
-
left: Math.min(
|
|
767
|
-
top: Math.min(
|
|
768
|
-
width: Math.abs(
|
|
769
|
-
height: Math.abs(
|
|
770
|
-
} : { left: 0, top: 0, width: 0, height: 0 }),
|
|
771
|
-
let
|
|
772
|
-
const
|
|
773
|
-
let
|
|
774
|
-
function
|
|
775
|
-
if (cancelAnimationFrame(
|
|
776
|
-
Math.min(
|
|
777
|
-
-
|
|
778
|
-
),
|
|
779
|
-
const
|
|
780
|
-
if (!
|
|
768
|
+
}), p = L(() => E.value ? {
|
|
769
|
+
left: Math.min(j.value.x, h.value.x) - m.value.left,
|
|
770
|
+
top: Math.min(j.value.y, h.value.y) - m.value.top,
|
|
771
|
+
width: Math.abs(j.value.x - h.value.x),
|
|
772
|
+
height: Math.abs(j.value.y - h.value.y)
|
|
773
|
+
} : { left: 0, top: 0, width: 0, height: 0 }), x = g(!1), { margin: Y = 50, startSpeed: Z = 30, maxSpeed: D = 30 } = l;
|
|
774
|
+
let A;
|
|
775
|
+
const b = Y, Q = Z, k = D, z = (O) => O ** 1;
|
|
776
|
+
let I = 0;
|
|
777
|
+
function B(O) {
|
|
778
|
+
if (cancelAnimationFrame(A), I = $(O), I = Math.max(
|
|
779
|
+
Math.min(I, k),
|
|
780
|
+
-k
|
|
781
|
+
), I !== 0) {
|
|
782
|
+
const S = N.value;
|
|
783
|
+
if (!S || !E.value)
|
|
781
784
|
return;
|
|
782
|
-
const
|
|
783
|
-
let W =
|
|
784
|
-
W = Math.min(Math.max(0, W),
|
|
785
|
+
const X = w.value.height - m.value.height;
|
|
786
|
+
let W = w.value.top + Number(I);
|
|
787
|
+
W = Math.min(Math.max(0, W), X), S.scrollTop = W, F(), A = requestAnimationFrame(() => B(O));
|
|
785
788
|
}
|
|
786
789
|
}
|
|
787
|
-
function
|
|
788
|
-
if (
|
|
789
|
-
const
|
|
790
|
-
if (W <
|
|
791
|
-
return
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return -
|
|
790
|
+
function $(O) {
|
|
791
|
+
if (N.value) {
|
|
792
|
+
const X = m.value, W = X.bottom - O;
|
|
793
|
+
if (W < b)
|
|
794
|
+
return Q * z(1 - W / b);
|
|
795
|
+
const K = O - X.top;
|
|
796
|
+
if (K < b)
|
|
797
|
+
return -Q * z(1 - K / b);
|
|
795
798
|
}
|
|
796
799
|
return 0;
|
|
797
800
|
}
|
|
798
|
-
function
|
|
799
|
-
const
|
|
800
|
-
return
|
|
801
|
-
}
|
|
802
|
-
function
|
|
803
|
-
|
|
804
|
-
const { top:
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
),
|
|
809
|
-
}
|
|
810
|
-
function
|
|
811
|
-
let W = document.getElementById(
|
|
812
|
-
W || (W = document.createElement("style"), W.id =
|
|
813
|
-
const
|
|
814
|
-
for (let
|
|
815
|
-
const
|
|
816
|
-
if (
|
|
801
|
+
function _(O) {
|
|
802
|
+
const S = { ...p.value, right: 0, bottom: 0 };
|
|
803
|
+
return S.left += m.value.left, S.top += m.value.top - w.value.top, S.right = S.width + S.left, S.bottom = S.height + S.top, S.left < O.right && S.right > O.left && S.top < O.bottom && S.bottom > O.top;
|
|
804
|
+
}
|
|
805
|
+
function F() {
|
|
806
|
+
w.value.sync();
|
|
807
|
+
const { top: O, height: S } = w.value;
|
|
808
|
+
h.value.y = Math.min(
|
|
809
|
+
S + m.value.top,
|
|
810
|
+
h.value.y + O - h.value.scrollTop
|
|
811
|
+
), h.value.scrollTop = O;
|
|
812
|
+
}
|
|
813
|
+
function ee(O, S, X = "dynamic-styles") {
|
|
814
|
+
let W = document.getElementById(X);
|
|
815
|
+
W || (W = document.createElement("style"), W.id = X, document.head.appendChild(W));
|
|
816
|
+
const K = W.sheet.cssRules, te = K.length, Ie = `${O} { ${S} }`;
|
|
817
|
+
for (let Me = 0; Me < te; Me++) {
|
|
818
|
+
const Oe = K[Me];
|
|
819
|
+
if (Oe.selectorText === O && Oe.style.cssText === S)
|
|
817
820
|
return;
|
|
818
821
|
}
|
|
819
|
-
W.sheet.insertRule(
|
|
820
|
-
}
|
|
821
|
-
function
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
|
|
822
|
+
W.sheet.insertRule(Ie, te);
|
|
823
|
+
}
|
|
824
|
+
function V(O, S) {
|
|
825
|
+
T.value = !0, E.value = !0, w.value.sync(!0);
|
|
826
|
+
const X = S + w.value.top;
|
|
827
|
+
j.value.x = O, j.value.y = X, h.value.x = O, h.value.y = X, N.value?.classList.add("disable-scroll-behavior"), i.clear();
|
|
828
|
+
const W = f.value;
|
|
829
|
+
y = new Set(
|
|
830
|
+
W.map((K) => K[M.value])
|
|
831
|
+
), it();
|
|
832
|
+
}
|
|
833
|
+
function se(O, S, X) {
|
|
834
|
+
!E.value || (T.value && o === "colum" && !we() && (x.value || u(), T.value = !1), X?.(), B(S), h.value.x = Math.max(O, m.value.left), h.value.y = Math.min(
|
|
835
|
+
S + w.value.top,
|
|
836
|
+
w.value.height + m.value.top
|
|
837
|
+
), h.value.scrollTop = w.value.top, c.value());
|
|
825
838
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
828
|
-
_ + m.value.top,
|
|
829
|
-
m.value.height + I.value.top
|
|
830
|
-
), E.value.scrollTop = m.value.top, v.value());
|
|
831
|
-
}
|
|
832
|
-
function V() {
|
|
833
|
-
y.value = !1, g.value?.classList.remove("disable-scroll-behavior");
|
|
839
|
+
function Ct() {
|
|
840
|
+
E.value = !1, N.value?.classList.remove("disable-scroll-behavior");
|
|
834
841
|
}
|
|
835
|
-
function
|
|
836
|
-
!
|
|
842
|
+
function xt() {
|
|
843
|
+
!E.value || (I || F(), c.value());
|
|
837
844
|
}
|
|
838
|
-
function
|
|
839
|
-
if (!
|
|
845
|
+
function we() {
|
|
846
|
+
if (!E.value)
|
|
840
847
|
return !1;
|
|
841
|
-
const { width:
|
|
842
|
-
return !(Math.max(
|
|
843
|
-
}
|
|
844
|
-
function
|
|
845
|
-
|
|
846
|
-
}
|
|
847
|
-
function
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
848
|
+
const { width: O, height: S } = p.value;
|
|
849
|
+
return !(Math.max(O, S) > 5);
|
|
850
|
+
}
|
|
851
|
+
function St() {
|
|
852
|
+
we() && u();
|
|
853
|
+
}
|
|
854
|
+
function Ot() {
|
|
855
|
+
we() || N.value?.querySelectorAll(`[${n}]`).forEach((O) => {
|
|
856
|
+
const S = v(O.getAttribute(`${n}`));
|
|
857
|
+
d[M.value] = S;
|
|
858
|
+
const X = y.has(S), W = i.has(S);
|
|
859
|
+
_(O.getBoundingClientRect()) ? W || (X ? r([d]) : a([d]), i.add(S)) : W && (X ? a([d]) : r([d]), i.delete(S));
|
|
852
860
|
});
|
|
853
861
|
}
|
|
854
|
-
function
|
|
855
|
-
const
|
|
856
|
-
let
|
|
857
|
-
|
|
858
|
-
const
|
|
859
|
-
|
|
862
|
+
function bt() {
|
|
863
|
+
const O = [];
|
|
864
|
+
let S = null, X = 0;
|
|
865
|
+
N.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
866
|
+
const te = v(W.getAttribute(`${n}`));
|
|
867
|
+
O.push(te), _(W.getBoundingClientRect()) && (S === null && (S = K), S = Math.min(S, K), X = Math.max(X, K));
|
|
868
|
+
}), N.value?.querySelectorAll(`[${n}]`).forEach((W, K) => {
|
|
869
|
+
const te = O[K], Ie = y.has(te), Me = i.has(te);
|
|
870
|
+
S !== null && K >= S && K <= X ? Me || (d[M.value] = te, Ie ? r([d]) : a([d]), i.add(te)) : Me && (d[M.value] = te, Ie ? a([d]) : r([d]), i.delete(te));
|
|
860
871
|
});
|
|
861
|
-
for (let W = _; W < Z + 1; W++)
|
|
862
|
-
r[c.value] = C[W], a([r]), d.add(C[W]);
|
|
863
872
|
}
|
|
864
|
-
function
|
|
865
|
-
!
|
|
873
|
+
function it() {
|
|
874
|
+
!N.value || (m.value = N.value.getBoundingClientRect());
|
|
866
875
|
}
|
|
867
|
-
function
|
|
868
|
-
return !
|
|
876
|
+
function _t(O) {
|
|
877
|
+
return !O?.value || (N.value = O.value, !N?.value) ? !1 : (it(), ee(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
869
878
|
}
|
|
870
879
|
return {
|
|
871
|
-
init:
|
|
872
|
-
dragStart:
|
|
873
|
-
dragMove:
|
|
874
|
-
dragEnd:
|
|
875
|
-
onScroll:
|
|
876
|
-
isSingleClick:
|
|
877
|
-
cancelSelectAllBySingleClick:
|
|
878
|
-
selectFn:
|
|
879
|
-
getAttributeValue:
|
|
880
|
-
incrementalSelect:
|
|
881
|
-
selectRange:
|
|
882
|
-
isPressing:
|
|
883
|
-
containerEl:
|
|
880
|
+
init: _t,
|
|
881
|
+
dragStart: V,
|
|
882
|
+
dragMove: se,
|
|
883
|
+
dragEnd: Ct,
|
|
884
|
+
onScroll: xt,
|
|
885
|
+
isSingleClick: we,
|
|
886
|
+
cancelSelectAllBySingleClick: St,
|
|
887
|
+
selectFn: c,
|
|
888
|
+
getAttributeValue: v,
|
|
889
|
+
incrementalSelect: x,
|
|
890
|
+
selectRange: p,
|
|
891
|
+
isPressing: E,
|
|
892
|
+
containerEl: N
|
|
884
893
|
};
|
|
885
894
|
}
|
|
886
|
-
function
|
|
887
|
-
const n =
|
|
895
|
+
function Bo(e, t = !1) {
|
|
896
|
+
const n = It(e), { selectRange: o } = n, {
|
|
888
897
|
onScroll: l,
|
|
889
898
|
dragStart: s,
|
|
890
899
|
dragMove: a,
|
|
891
|
-
dragEnd:
|
|
892
|
-
cancelSelectAllBySingleClick:
|
|
893
|
-
} = n,
|
|
900
|
+
dragEnd: r,
|
|
901
|
+
cancelSelectAllBySingleClick: u
|
|
902
|
+
} = n, f = L(() => ({
|
|
894
903
|
left: `${o.value.left}px`,
|
|
895
904
|
top: `${o.value.top}px`,
|
|
896
905
|
width: `${o.value.width}px`,
|
|
897
906
|
height: `${o.value.height}px`
|
|
898
|
-
})), { load:
|
|
907
|
+
})), { load: d } = Ve(
|
|
899
908
|
`.drag-select-box {
|
|
900
909
|
position: absolute;
|
|
901
910
|
z-index: 99999;
|
|
@@ -903,106 +912,106 @@ function Qo(e, t = !1) {
|
|
|
903
912
|
opacity: 0.5;
|
|
904
913
|
}`,
|
|
905
914
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
906
|
-
), c =
|
|
915
|
+
), c = J({
|
|
907
916
|
render() {
|
|
908
|
-
return
|
|
917
|
+
return re("div", {
|
|
909
918
|
id: "selectBoxEl",
|
|
910
919
|
class: "drag-select-box",
|
|
911
|
-
style:
|
|
920
|
+
style: f.value
|
|
912
921
|
});
|
|
913
922
|
}
|
|
914
923
|
});
|
|
915
924
|
function M(N) {
|
|
916
|
-
N.button === 0 && (
|
|
925
|
+
N.button === 0 && (N.ctrlKey || N.metaKey ? n.incrementalSelect.value = !0 : n.incrementalSelect.value = !1, s(N.x, N.y), window.addEventListener("mousemove", v), window.addEventListener("mouseup", i));
|
|
917
926
|
}
|
|
918
|
-
function
|
|
927
|
+
function v(N) {
|
|
919
928
|
a(N.x, N.y);
|
|
920
929
|
}
|
|
921
|
-
function
|
|
922
|
-
window.removeEventListener("mousemove",
|
|
923
|
-
(
|
|
924
|
-
|
|
930
|
+
function i(N) {
|
|
931
|
+
window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", i), N.composedPath().some(
|
|
932
|
+
(j) => n.getAttributeValue(
|
|
933
|
+
j?.getAttribute?.(e.attribute)
|
|
925
934
|
)
|
|
926
|
-
) ||
|
|
935
|
+
) || u(), r(), n.incrementalSelect.value = !1;
|
|
927
936
|
}
|
|
928
|
-
function
|
|
937
|
+
function y(N) {
|
|
929
938
|
try {
|
|
930
939
|
if (!n.init(N))
|
|
931
940
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
932
941
|
if (!n.containerEl?.value)
|
|
933
942
|
return !1;
|
|
934
|
-
|
|
943
|
+
Te(re(c), n.containerEl.value), d(), n.containerEl.value?.addEventListener("scroll", l), n.containerEl.value?.addEventListener("mousedown", M);
|
|
935
944
|
} catch (E) {
|
|
936
945
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", E);
|
|
937
946
|
}
|
|
938
947
|
}
|
|
939
|
-
function
|
|
948
|
+
function T() {
|
|
940
949
|
n.containerEl.value?.removeEventListener("scroll", l), n.containerEl.value?.removeEventListener("mousedown", M);
|
|
941
950
|
}
|
|
942
|
-
return { init:
|
|
951
|
+
return { init: y, unMount: T };
|
|
943
952
|
}
|
|
944
|
-
function
|
|
945
|
-
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } = t, s =
|
|
953
|
+
function Uo(e, t = {}) {
|
|
954
|
+
const { joinSelectMode: n, pressTime: o = 600, selectModeRef: l } = t, s = It({
|
|
946
955
|
...e,
|
|
947
956
|
selectWay: "row",
|
|
948
957
|
scrollOptions: {
|
|
949
958
|
startSpeed: 5,
|
|
950
959
|
maxSpeed: 5
|
|
951
960
|
}
|
|
952
|
-
}), { onScroll: a, dragStart:
|
|
953
|
-
let
|
|
954
|
-
const c =
|
|
961
|
+
}), { onScroll: a, dragStart: r, dragMove: u, dragEnd: f } = s;
|
|
962
|
+
let d;
|
|
963
|
+
const c = dn();
|
|
955
964
|
function M() {
|
|
956
|
-
clearTimeout(
|
|
965
|
+
clearTimeout(d);
|
|
957
966
|
}
|
|
958
|
-
function
|
|
959
|
-
return
|
|
967
|
+
function v(m) {
|
|
968
|
+
return m.composedPath().some((w) => !!w?.getAttribute?.(e.attribute));
|
|
960
969
|
}
|
|
961
|
-
function
|
|
970
|
+
function i() {
|
|
962
971
|
return l?.value && !s.isPressing.value && c.isHorizontal();
|
|
963
972
|
}
|
|
964
|
-
function
|
|
965
|
-
(w == null ||
|
|
973
|
+
function y(m, w, p) {
|
|
974
|
+
(w == null || p == null) && (w = m.targetTouches[0].clientX, p = m.targetTouches[0].clientY), r(w, p), n?.(), u(w, p, () => m.preventDefault());
|
|
966
975
|
}
|
|
967
|
-
function
|
|
968
|
-
const { clientX: w, clientY:
|
|
969
|
-
c.start(w,
|
|
970
|
-
|
|
976
|
+
function T(m) {
|
|
977
|
+
const { clientX: w, clientY: p } = m.targetTouches[0];
|
|
978
|
+
c.start(w, p), M(), v(m) && (d = setTimeout(() => {
|
|
979
|
+
y(m), m.preventDefault();
|
|
971
980
|
}, o));
|
|
972
981
|
}
|
|
973
|
-
function N(
|
|
982
|
+
function N(m) {
|
|
974
983
|
M();
|
|
975
|
-
const { clientX: w, clientY:
|
|
976
|
-
if (c.move(w,
|
|
977
|
-
|
|
984
|
+
const { clientX: w, clientY: p } = m.targetTouches[0];
|
|
985
|
+
if (c.move(w, p), i()) {
|
|
986
|
+
y(m, c.startX.value, c.startY.value);
|
|
978
987
|
return;
|
|
979
988
|
}
|
|
980
|
-
|
|
989
|
+
u(w, p, () => m.preventDefault());
|
|
981
990
|
}
|
|
982
991
|
function E() {
|
|
983
|
-
M(),
|
|
992
|
+
M(), f();
|
|
984
993
|
}
|
|
985
|
-
function
|
|
994
|
+
function j(m) {
|
|
986
995
|
try {
|
|
987
|
-
if (!s.init(
|
|
996
|
+
if (!s.init(m))
|
|
988
997
|
throw new Error("\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E");
|
|
989
998
|
if (!s.containerEl?.value)
|
|
990
999
|
return !1;
|
|
991
1000
|
const w = s.containerEl.value;
|
|
992
|
-
w.addEventListener("scroll", a), w.addEventListener("touchstart",
|
|
1001
|
+
w.addEventListener("scroll", a), w.addEventListener("touchstart", T), w.addEventListener("touchmove", N), window.addEventListener("pointerup", E);
|
|
993
1002
|
} catch (w) {
|
|
994
1003
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", w);
|
|
995
1004
|
}
|
|
996
1005
|
}
|
|
997
|
-
function
|
|
1006
|
+
function h() {
|
|
998
1007
|
if (!s.containerEl?.value)
|
|
999
1008
|
return;
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1009
|
+
const m = s.containerEl.value;
|
|
1010
|
+
m.removeEventListener("scroll", a), m.removeEventListener("touchstart", T), m.removeEventListener("touchmove", N), window.removeEventListener("pointerup", E);
|
|
1002
1011
|
}
|
|
1003
|
-
return { init:
|
|
1012
|
+
return { init: j, unMount: h };
|
|
1004
1013
|
}
|
|
1005
|
-
const
|
|
1014
|
+
const vn = Symbol(), Mn = /* @__PURE__ */ J({
|
|
1006
1015
|
__name: "Dialog",
|
|
1007
1016
|
props: {
|
|
1008
1017
|
visiable: { type: Boolean, default: !1 },
|
|
@@ -1017,39 +1026,39 @@ const fn = Symbol(), dn = /* @__PURE__ */ q({
|
|
|
1017
1026
|
const n = e, o = () => {
|
|
1018
1027
|
n.onClickOverlay?.(), n.closeOnClickOverlay && t("update:visiable", !1);
|
|
1019
1028
|
};
|
|
1020
|
-
return P(
|
|
1021
|
-
default:
|
|
1022
|
-
e.visiable ?
|
|
1029
|
+
return P(vn, () => t("update:visiable", !1)), (l, s) => (R(), ze($e, { name: "modal" }, {
|
|
1030
|
+
default: He(() => [
|
|
1031
|
+
e.visiable ? ce((R(), H("div", {
|
|
1023
1032
|
key: 0,
|
|
1024
|
-
class:
|
|
1033
|
+
class: ae([e.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", e.modalClass])
|
|
1025
1034
|
}, [
|
|
1026
1035
|
U("div", {
|
|
1027
|
-
onMousedown: s[0] || (s[0] =
|
|
1036
|
+
onMousedown: s[0] || (s[0] = pe(() => {
|
|
1028
1037
|
}, ["stop"])),
|
|
1029
|
-
class:
|
|
1038
|
+
class: ae(["lzc-dialog", e.dialogClass])
|
|
1030
1039
|
}, [
|
|
1031
|
-
|
|
1040
|
+
he(l.$slots, "default", {}, void 0, !0)
|
|
1032
1041
|
], 34)
|
|
1033
1042
|
], 2)), [
|
|
1034
|
-
[
|
|
1035
|
-
]) :
|
|
1043
|
+
[C(Xt), () => o()]
|
|
1044
|
+
]) : de("", !0)
|
|
1036
1045
|
]),
|
|
1037
1046
|
_: 3
|
|
1038
1047
|
}));
|
|
1039
1048
|
}
|
|
1040
1049
|
});
|
|
1041
|
-
const
|
|
1050
|
+
const le = (e, t) => {
|
|
1042
1051
|
const n = e.__vccOpts || e;
|
|
1043
1052
|
for (const [o, l] of t)
|
|
1044
1053
|
n[o] = l;
|
|
1045
1054
|
return n;
|
|
1046
|
-
},
|
|
1047
|
-
function
|
|
1055
|
+
}, gn = /* @__PURE__ */ le(Mn, [["__scopeId", "data-v-3d61e60a"]]);
|
|
1056
|
+
function Ro(e) {
|
|
1048
1057
|
function t(n, o) {
|
|
1049
1058
|
const l = document.createElement("div"), s = {
|
|
1050
1059
|
setup() {
|
|
1051
|
-
return () =>
|
|
1052
|
-
|
|
1060
|
+
return () => re(
|
|
1061
|
+
gn,
|
|
1053
1062
|
{
|
|
1054
1063
|
visiable: !0,
|
|
1055
1064
|
"onUpdate:visiable": () => {
|
|
@@ -1058,12 +1067,12 @@ function Bo(e) {
|
|
|
1058
1067
|
...e
|
|
1059
1068
|
},
|
|
1060
1069
|
{
|
|
1061
|
-
default: () =>
|
|
1070
|
+
default: () => re(n, o)
|
|
1062
1071
|
}
|
|
1063
1072
|
);
|
|
1064
1073
|
}
|
|
1065
1074
|
};
|
|
1066
|
-
return document.body.appendChild(l),
|
|
1075
|
+
return document.body.appendChild(l), Te(re(s), l), {
|
|
1067
1076
|
close: () => l?.remove()
|
|
1068
1077
|
};
|
|
1069
1078
|
}
|
|
@@ -1077,7 +1086,7 @@ function Et({
|
|
|
1077
1086
|
delay: n = 300
|
|
1078
1087
|
}) {
|
|
1079
1088
|
const l = `lzc-delay-loading-${`${new Date().getTime()}`}`, s = `${n}ms`;
|
|
1080
|
-
return
|
|
1089
|
+
return Ve(
|
|
1081
1090
|
`@keyframes lzcDelayLoad {
|
|
1082
1091
|
to {
|
|
1083
1092
|
opacity: 1;
|
|
@@ -1087,16 +1096,16 @@ function Et({
|
|
|
1087
1096
|
opacity: 0;
|
|
1088
1097
|
animation: lzcDelayLoad 0s ${s} forwards;
|
|
1089
1098
|
}`
|
|
1090
|
-
), { LoadingComp:
|
|
1099
|
+
), { LoadingComp: J({
|
|
1091
1100
|
setup() {
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1095
|
-
}), () =>
|
|
1101
|
+
const r = ln();
|
|
1102
|
+
return fe(() => {
|
|
1103
|
+
r.value?.classList?.add(l);
|
|
1104
|
+
}), () => re(e, t);
|
|
1096
1105
|
}
|
|
1097
1106
|
}) };
|
|
1098
1107
|
}
|
|
1099
|
-
function
|
|
1108
|
+
function $o({
|
|
1100
1109
|
component: e,
|
|
1101
1110
|
componentProps: t,
|
|
1102
1111
|
delay: n = 300
|
|
@@ -1105,7 +1114,7 @@ function Uo({
|
|
|
1105
1114
|
component: e,
|
|
1106
1115
|
componentProps: t,
|
|
1107
1116
|
delay: n
|
|
1108
|
-
}), l =
|
|
1117
|
+
}), l = g(!1);
|
|
1109
1118
|
function s() {
|
|
1110
1119
|
l.value = !0;
|
|
1111
1120
|
}
|
|
@@ -1114,24 +1123,24 @@ function Uo({
|
|
|
1114
1123
|
}
|
|
1115
1124
|
return { LoadingComp: o, loading: l, load: s, unload: a };
|
|
1116
1125
|
}
|
|
1117
|
-
const
|
|
1126
|
+
const hn = (e) => (Le("data-v-92a1804d"), e = e(), je(), e), mn = /* @__PURE__ */ hn(() => /* @__PURE__ */ U("div", { class: "ldio-mm5gwljcryb" }, [
|
|
1118
1127
|
/* @__PURE__ */ U("div")
|
|
1119
|
-
], -1)),
|
|
1120
|
-
|
|
1121
|
-
],
|
|
1128
|
+
], -1)), yn = [
|
|
1129
|
+
mn
|
|
1130
|
+
], pn = /* @__PURE__ */ J({
|
|
1122
1131
|
__name: "DefaultLoading",
|
|
1123
1132
|
props: {
|
|
1124
1133
|
width: { default: 24 },
|
|
1125
1134
|
height: { default: 24 }
|
|
1126
1135
|
},
|
|
1127
1136
|
setup(e) {
|
|
1128
|
-
return
|
|
1137
|
+
return Pe((t) => ({
|
|
1129
1138
|
"4e4a9ce4": e.width + "px",
|
|
1130
1139
|
e56fe5c2: e.height + "px"
|
|
1131
|
-
})), (t, n) => (R(), H("div",
|
|
1140
|
+
})), (t, n) => (R(), H("div", Qe(Ye(t.$attrs)), yn, 16));
|
|
1132
1141
|
}
|
|
1133
1142
|
});
|
|
1134
|
-
const
|
|
1143
|
+
const Dn = /* @__PURE__ */ le(pn, [["__scopeId", "data-v-92a1804d"]]), Tn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAQAAAC0jZKKAAAAAnNCSVQICFXsRgQAAAABc1JHQgCuzhzpAAAEMklEQVRIx62XzW9VZRDGn2fmPff23qYtlvIRqVVQICgGoS21wYUGEA0x0YUYE/8BNTHujBsNiS5cGBeujAtXLiTGjUnFjRKNQWgJVoqxC/m2RMpX7cf9OOedcXFrg1qutPc+ZzM5b84vc+bNZOYh6sp5tKWQr2qmBZ/Biqxq03Eybsh6I63+l7z90Wirts0VoyU2bYm1ZdFXZtf9shUMWckL8XGrBw+Lvx7pqHTN5Toy9cQSZMgtnLR7m19Hj//i9TNeBDyU7+jOWj2mDgBVlqXqRmHOgXZPvNOLXsHzSwWPdeKelMEiDKlkThMIhSVGTqGKaZRxxm/4VlsSeLTb17ojkpkESwlPrDhTLmn6VXbQACd4RFbhBoElgEfur6yJMXhE9Aoz+mz56sDMP+7a4TDcgW4Bn7wPax05VpGnQ6u4NPgnlq0F8Ojq6n2puxehXkFydeAsDWgYfLFwcYtLztQjieLv2y6hQc2DJx5qSYAUZJV+rr9hLCAAcGoNu6oSSZrI5K7zaIICAJQ2iwZGuGHuwjiaIgFGV2sHmQpIJr8eiM0BB6Byr6i7OBAmd0yiSRJXWQeQFDA5g6YpDK+SxB2As7z1SvPA0rKKJElQ/qA3MeNyp4Raxuk1NFGBHSZwcUFhqqlgKZgAjoj8bFPBlhephQ+kDdM4vKkWmAdXE0DRjL4YCfiiFmk1MGPemEFxJIdyg+QO3zQ/+q8FTa1VCER2tDUM7kE2v1BcEUyBoItLpavRUtiDNNSeccFNBARqIi3dDXfbIFJkyBD9tJQmMq1lbBvelkawrthDh8Hd9XvJT+Qi1NUSa9+3oRHw8T2+0iNNImbtqPSl6VkToVAlP9BQIV6hubuZyVDfnAA4LSoaNaqv/3HjsvPdLb3IkDFjhk8BAQbOZpNGpRCUp8dyy8GOtspBczgNjtO938wP08IP1BiyQJWVc88uB1x5F+sYEd0Y/f2FKb1tPJ4nhVFMuO34niW38mu639ycRuN3/UMLYCAbktSFKkrVvcf2LQV74lW8jChRMzOfxpv/2uhHHrYDokYVYab4acWhjZU7yLWIt3w/1Uklo+D1nV/+xyqc3Bt3O11JCMmb9nn/WH3s8C68Id0QV9CV9I/6P1jUg5x4Tgar6hLoQgX9nH69/dRiy+Eh3fhofMl7QSoE4qT6Z/0Hb2tuTjyFJ10gLlTSleKzPMXx7FL75OUSUCjm11TW6yMYRBfpAURwUZroxzs+rOuaRnb4C1Ks/ZoFCNUFAZTg4oFiQeiJi4gJlOJKasnf6T38v3ZspAsv2hYq6YFCqZXFEsyDhAguVK/FiuPxvZ0X79DnDW/nM94DodRu/G+wEOriAQIlqfjNP+n7dokGcnirPma93jJf73ALWF00xVE/3HdsGc605vk6Nydb0GN38y4UqV7BjE/ggv48NfZE3UH2F3Kp4Zn6aTweAAAAAElFTkSuQmCC", Nn = { class: "loading-wrap" }, wn = ["src"], In = /* @__PURE__ */ J({
|
|
1135
1144
|
__name: "PageLoading",
|
|
1136
1145
|
props: {
|
|
1137
1146
|
delay: { default: "0.15s" },
|
|
@@ -1139,27 +1148,27 @@ const yn = /* @__PURE__ */ ne(mn, [["__scopeId", "data-v-92a1804d"]]), pn = "dat
|
|
|
1139
1148
|
},
|
|
1140
1149
|
setup(e) {
|
|
1141
1150
|
const t = e;
|
|
1142
|
-
|
|
1151
|
+
Pe((o) => ({
|
|
1143
1152
|
b1cf73a8: e.delay
|
|
1144
1153
|
}));
|
|
1145
|
-
const n =
|
|
1154
|
+
const n = L(() => {
|
|
1146
1155
|
const o = {};
|
|
1147
1156
|
return t.size === "mini" ? (o.width = "22px", o.height = "22px") : t.size === "large" && (o.width = "28px", o.height = "28px"), o;
|
|
1148
1157
|
});
|
|
1149
|
-
return (o, l) => (R(), H("div",
|
|
1158
|
+
return (o, l) => (R(), H("div", Nn, [
|
|
1150
1159
|
U("img", {
|
|
1151
1160
|
class: "loading-circle",
|
|
1152
|
-
src:
|
|
1153
|
-
style:
|
|
1154
|
-
}, null, 12,
|
|
1161
|
+
src: C(Tn),
|
|
1162
|
+
style: q(C(n))
|
|
1163
|
+
}, null, 12, wn)
|
|
1155
1164
|
]));
|
|
1156
1165
|
}
|
|
1157
1166
|
});
|
|
1158
|
-
const
|
|
1159
|
-
async function
|
|
1167
|
+
const Ho = /* @__PURE__ */ le(In, [["__scopeId", "data-v-3c54972f"]]);
|
|
1168
|
+
async function st(e) {
|
|
1160
1169
|
return new Promise((t) => setTimeout(() => t(), e));
|
|
1161
1170
|
}
|
|
1162
|
-
const
|
|
1171
|
+
const En = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTAyLjAwMDAwMCwgLTQwNi4wMDAwMDApIiBmaWxsPSIjOTk5OTk5IiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDc5MC4wMDAwMDAsIDM5MC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzEyLjAwMDAwMCwgMTYuMDAwMDAwKSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjU0NjQyODU3MiwwLjA5NjM0MjU1MTMgTDYuMDEsNS41NTUgTDExLjQ1MzU3MTQsMC4xMTc3NTIwMTEgQzExLjU4MjE0MjksLTAuMDEwNzA0NzIzNyAxMS43NzUsLTAuMDEwNzA0NzIzNyAxMS45MDM1NzE0LDAuMTE3NzUyMDExIEMxMi4wMzIxNDI5LDAuMjQ2MjA4NzQ2IDEyLjAzMjE0MjksMC40Mzg4OTM4NDkgMTEuOTAzNTcxNCwwLjU2NzM1MDU4NCBMNi40Niw2LjAwNSBMMTEuOTAzNTcxNCwxMS40NDMzNTQxIEMxMi4wMzIxNDI5LDExLjU3MTgxMDkgMTIuMDMyMTQyOSwxMS43NjQ0OTYgMTEuOTAzNTcxNCwxMS44OTI5NTI3IEMxMS44NjA3MTQzLDExLjk3ODU5MDUgMTEuNzc1LDEyIDExLjY4OTI4NTcsMTIgQzExLjYwMzU3MTQsMTIgMTEuNTE3ODU3MiwxMS45Nzg1OTA1IDExLjQ1MzU3MTQsMTEuOTE0MzYyMiBMNiw2LjQ2NSBMMC41NDY0Mjg1NzIsMTEuOTE0MzYyMiBDMC41MDM1NzE0MzMsMTEuOTc4NTkwNSAwLjQxNzg1NzE0MywxMiAwLjMzMjE0Mjg1MywxMiBDMC4yNDY0Mjg1NjMsMTIgMC4xNjA3MTQyODYsMTEuOTc4NTkwNSAwLjA5NjQyODU3MTUsMTEuOTE0MzYyMiBDLTAuMDMyMTQyODU3MiwxMS43ODU5MDU0IC0wLjAzMjE0Mjg1NzIsMTEuNTkzMjIwMyAwLjA5NjQyODU3MTUsMTEuNDY0NzYzNiBMNS41NDksNi4wMTUgTDAuMDk2NDI4NTcxNSwwLjU2NzM1MDU4NCBDLTAuMDEwNzE0MjgxNSwwLjQzODg5Mzg0OSAtMC4wMTA3MTQyODE1LDAuMjI0Nzk5Mjg2IDAuMDk2NDI4NTcxNSwwLjA5NjM0MjU1MTMgQzAuMjAzNTcxNDI0LC0wLjAzMjExNDE4MzggMC40MTc4NTcxNDMsLTAuMDMyMTE0MTgzOCAwLjU0NjQyODU3MiwwLjA5NjM0MjU1MTMgWiIgaWQ9IuW9oueKtue7k+WQiCI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+", An = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzVweCIgaGVpZ2h0PSIzNXB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNjguMDAwMDAwLCAtMzczLjAwMDAwMCkiIGZpbGw9IiM5RjlGOUYiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTE4LjAwMDAwMCwgMzU2LjAwMDAwMCkiPgogICAgICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MC4wMDAwMDAsIDE3LjAwMDAwMCkiPgogICAgICAgICAgICA8cGF0aCBkPSJNMjAsMTIuMzQ0ODI3NiBDMTkuMjAwMTM5MywxMi4zNDQ4Mjc2IDE4LjU1MTcyNDEsMTEuNjk2NDEyNCAxOC41NTE3MjQxLDEwLjg5NjU1MTcgTDE4LjU1MTcyNDEsMy40NDgyNzU4NiBDMTguNTUxNzI0MSwyLjY0ODQxNTE5IDE5LjIwMDEzOTMsMiAyMCwyIEMyMC43OTk4NjA3LDIgMjEuNDQ4Mjc1OSwyLjY0ODQxNTE5IDIxLjQ0ODI3NTksMy40NDgyNzU4NiBMMjEuNDQ4Mjc1OSwxMC44OTY1NTE3IEMyMS40NDgyNzU5LDExLjY5NjQxMjQgMjAuNzk5ODYwNywxMi4zNDQ4Mjc2IDIwLDEyLjM0NDgyNzYgTDIwLDEyLjM0NDgyNzYgWiBNMjAsMzggQzE5LjYxNTg5MzQsMzggMTkuMjQ3NTE4NywzNy44NDc0MTQyIDE4Ljk3NTkxNDMsMzcuNTc1ODA5OCBDMTguNzA0MzA5OSwzNy4zMDQyMDU0IDE4LjU1MTcyNDEsMzYuOTM1ODMwOCAxOC41NTE3MjQxLDM2LjU1MTcyNDEgTDE4LjU1MTcyNDEsMjkuMTAzNDQ4MyBDMTguNTUxNzI0MSwyOC4zMDM1ODc2IDE5LjIwMDEzOTMsMjcuNjU1MTcyNCAyMCwyNy42NTUxNzI0IEMyMC43OTk4NjA3LDI3LjY1NTE3MjQgMjEuNDQ4Mjc1OSwyOC4zMDM1ODc2IDIxLjQ0ODI3NTksMjkuMTAzNDQ4MyBMMjEuNDQ4Mjc1OSwzNi41NTE3MjQxIEMyMS40NDgyNzU5LDM3LjM1MTU4NDggMjAuNzk5ODYwNywzOCAyMCwzOCBMMjAsMzggWiBNMjUuNDEzMDM0NSwxNC41ODY5NjU1IEMyNS4xNDE0MTA3LDE0LjMxNTM5MjIgMjQuOTg4ODA5OCwxMy45NDcwMjk0IDI0Ljk4ODgwOTgsMTMuNTYyOTMxIEMyNC45ODg4MDk4LDEzLjE3ODgzMjcgMjUuMTQxNDEwNywxMi44MTA0Njk5IDI1LjQxMzAzNDUsMTIuNTM4ODk2NiBMMzAuNjc5NzkzMSw3LjI3MjEzNzkzIEMzMC45NTEzNjY0LDcuMDAwNTE0MTQgMzEuMzE5NzI5Miw2Ljg0NzkxMzI0IDMxLjcwMzgyNzYsNi44NDc5MTMyNCBDMzIuMDg3OTI2LDYuODQ3OTEzMjQgMzIuNDU2Mjg4Nyw3LjAwMDUxNDE0IDMyLjcyNzg2MjEsNy4yNzIxMzc5MyBDMzIuOTk5NDg1OSw3LjU0MzcxMTI3IDMzLjE1MjA4NjgsNy45MTIwNzQwNCAzMy4xNTIwODY4LDguMjk2MTcyNDEgQzMzLjE1MjA4NjgsOC42ODAyNzA3OSAzMi45OTk0ODU5LDkuMDQ4NjMzNTYgMzIuNzI3ODYyMSw5LjMyMDIwNjkgTDI3LjQ2MTEwMzQsMTQuNTg2OTY1NSBDMjcuMTg5NTMwMSwxNC44NTg1ODkzIDI2LjgyMTE2NzMsMTUuMDExMTkwMiAyNi40MzcwNjksMTUuMDExMTkwMiBDMjYuMDUyOTcwNiwxNS4wMTExOTAyIDI1LjY4NDYwNzgsMTQuODU4NTg5MyAyNS40MTMwMzQ1LDE0LjU4Njk2NTUgTDI1LjQxMzAzNDUsMTQuNTg2OTY1NSBaIE03LjI3MjEzNzkzLDMyLjcyNzg2MjEgQzcuMDAwNTE0MTQsMzIuNDU2Mjg4NyA2Ljg0NzkxMzI0LDMyLjA4NzkyNiA2Ljg0NzkxMzI0LDMxLjcwMzgyNzYgQzYuODQ3OTEzMjQsMzEuMzE5NzI5MiA3LjAwMDUxNDE0LDMwLjk1MTM2NjQgNy4yNzIxMzc5MywzMC42Nzk3OTMxIEwxMi41Mzg4OTY2LDI1LjQxMzAzNDUgQzEyLjgxMDQ2OTksMjUuMTQxNDEwNyAxMy4xNzg4MzI3LDI0Ljk4ODgwOTggMTMuNTYyOTMxLDI0Ljk4ODgwOTggQzEzLjk0NzAyOTQsMjQuOTg4ODA5OCAxNC4zMTUzOTIyLDI1LjE0MTQxMDcgMTQuNTg2OTY1NSwyNS40MTMwMzQ1IEMxNC44NTg1ODkzLDI1LjY4NDYwNzggMTUuMDExMTkwMiwyNi4wNTI5NzA2IDE1LjAxMTE5MDIsMjYuNDM3MDY5IEMxNS4wMTExOTAyLDI2LjgyMTE2NzMgMTQuODU4NTg5MywyNy4xODk1MzAxIDE0LjU4Njk2NTUsMjcuNDYxMTAzNCBMOS4zMjAyMDY5LDMyLjcyNzg2MjEgQzkuMDQ4NjMzNTYsMzIuOTk5NDg1OSA4LjY4MDI3MDc5LDMzLjE1MjA4NjggOC4yOTYxNzI0MSwzMy4xNTIwODY4IEM3LjkxMjA3NDA0LDMzLjE1MjA4NjggNy41NDM3MTEyNywzMi45OTk0ODU5IDcuMjcyMTM3OTMsMzIuNzI3ODYyMSBMNy4yNzIxMzc5MywzMi43Mjc4NjIxIFogTTI3LjY1NTE3MjQsMjAgQzI3LjY1NTE3MjQsMTkuMjAwMTM5MyAyOC4zMDM1ODc2LDE4LjU1MTcyNDEgMjkuMTAzNDQ4MywxOC41NTE3MjQxIEwzNi41NTE3MjQxLDE4LjU1MTcyNDEgQzM3LjM1MTU4NDgsMTguNTUxNzI0MSAzOCwxOS4yMDAxMzkzIDM4LDIwIEMzOCwyMC43OTk4NjA3IDM3LjM1MTU4NDgsMjEuNDQ4Mjc1OSAzNi41NTE3MjQxLDIxLjQ0ODI3NTkgTDI5LjEwMzQ0ODMsMjEuNDQ4Mjc1OSBDMjguMzAzNTg3NiwyMS40NDgyNzU5IDI3LjY1NTE3MjQsMjAuNzk5ODYwNyAyNy42NTUxNzI0LDIwIEwyNy42NTUxNzI0LDIwIFogTTIsMjAgQzIsMTkuMjAwMTM5MyAyLjY0ODQxNTE5LDE4LjU1MTcyNDEgMy40NDgyNzU4NiwxOC41NTE3MjQxIEwxMC44OTY1NTE3LDE4LjU1MTcyNDEgQzExLjY5NjQxMjQsMTguNTUxNzI0MSAxMi4zNDQ4Mjc2LDE5LjIwMDEzOTMgMTIuMzQ0ODI3NiwyMCBDMTIuMzQ0ODI3NiwyMC43OTk4NjA3IDExLjY5NjQxMjQsMjEuNDQ4Mjc1OSAxMC44OTY1NTE3LDIxLjQ0ODI3NTkgTDMuNDQ4Mjc1ODYsMjEuNDQ4Mjc1OSBDMi42NDg0MTUxOSwyMS40NDgyNzU5IDIsMjAuNzk5ODYwNyAyLDIwIFogTTI1LjQxMzAzNDUsMjUuNDEzMDM0NSBDMjUuNjg0NjA3OCwyNS4xNDE0MTA3IDI2LjA1Mjk3MDYsMjQuOTg4ODA5OCAyNi40MzcwNjksMjQuOTg4ODA5OCBDMjYuODIxMTY3MywyNC45ODg4MDk4IDI3LjE4OTUzMDEsMjUuMTQxNDEwNyAyNy40NjExMDM0LDI1LjQxMzAzNDUgTDMyLjcyNzg2MjEsMzAuNjc5NzkzMSBDMzIuOTk5NDg1OSwzMC45NTEzNjY0IDMzLjE1MjA4NjgsMzEuMzE5NzI5MiAzMy4xNTIwODY4LDMxLjcwMzgyNzYgQzMzLjE1MjA4NjgsMzIuMDg3OTI2IDMyLjk5OTQ4NTksMzIuNDU2Mjg4NyAzMi43Mjc4NjIxLDMyLjcyNzg2MjEgQzMyLjQ1NjI4ODcsMzIuOTk5NDg1OSAzMi4wODc5MjYsMzMuMTUyMDg2OCAzMS43MDM4Mjc2LDMzLjE1MjA4NjggQzMxLjMxOTcyOTIsMzMuMTUyMDg2OCAzMC45NTEzNjY0LDMyLjk5OTQ4NTkgMzAuNjc5NzkzMSwzMi43Mjc4NjIxIEwyNS40MTMwMzQ1LDI3LjQ2MTEwMzQgQzI1LjE0MTQxMDcsMjcuMTg5NTMwMSAyNC45ODg4MDk4LDI2LjgyMTE2NzMgMjQuOTg4ODA5OCwyNi40MzcwNjkgQzI0Ljk4ODgwOTgsMjYuMDUyOTcwNiAyNS4xNDE0MTA3LDI1LjY4NDYwNzggMjUuNDEzMDM0NSwyNS40MTMwMzQ1IEwyNS40MTMwMzQ1LDI1LjQxMzAzNDUgWiBNNy4yNzIxMzc5Myw3LjI3MjEzNzkzIEM3LjU0MzcxMTI3LDcuMDAwNTE0MTQgNy45MTIwNzQwNCw2Ljg0NzkxMzI0IDguMjk2MTcyNDEsNi44NDc5MTMyNCBDOC42ODAyNzA3OSw2Ljg0NzkxMzI0IDkuMDQ4NjMzNTYsNy4wMDA1MTQxNCA5LjMyMDIwNjksNy4yNzIxMzc5MyBMMTQuNTg2OTY1NSwxMi41Mzg4OTY2IEMxNC44NTg1ODkzLDEyLjgxMDQ2OTkgMTUuMDExMTkwMiwxMy4xNzg4MzI3IDE1LjAxMTE5MDIsMTMuNTYyOTMxIEMxNS4wMTExOTAyLDEzLjk0NzAyOTQgMTQuODU4NTg5MywxNC4zMTUzOTIyIDE0LjU4Njk2NTUsMTQuNTg2OTY1NSBDMTQuMzE1MzkyMiwxNC44NTg1ODkzIDEzLjk0NzAyOTQsMTUuMDExMTkwMiAxMy41NjI5MzEsMTUuMDExMTkwMiBDMTMuMTc4ODMyNywxNS4wMTExOTAyIDEyLjgxMDQ2OTksMTQuODU4NTg5MyAxMi41Mzg4OTY2LDE0LjU4Njk2NTUgTDcuMjcyMTM3OTMsOS4zMjAyMDY5IEM3LjAwMDUxNDE0LDkuMDQ4NjMzNTYgNi44NDc5MTMyNCw4LjY4MDI3MDc5IDYuODQ3OTEzMjQsOC4yOTYxNzI0MSBDNi44NDc5MTMyNCw3LjkxMjA3NDA0IDcuMDAwNTE0MTQsNy41NDM3MTEyNyA3LjI3MjEzNzkzLDcuMjcyMTM3OTMgWiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+", zn = ["onClick"], Ln = ["onClick"], jn = ["src"], Cn = ["src"], xn = /* @__PURE__ */ J({
|
|
1163
1172
|
__name: "index",
|
|
1164
1173
|
props: {
|
|
1165
1174
|
visible: null,
|
|
@@ -1178,68 +1187,68 @@ const wn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1178
1187
|
},
|
|
1179
1188
|
emits: ["close"],
|
|
1180
1189
|
setup(e, { emit: t }) {
|
|
1181
|
-
const n = e, o = "lzc-loading-toast", l =
|
|
1182
|
-
let
|
|
1183
|
-
return n.captureEventP && (
|
|
1184
|
-
}), s =
|
|
1185
|
-
let
|
|
1190
|
+
const n = e, o = "lzc-loading-toast", l = L(() => {
|
|
1191
|
+
let f = {};
|
|
1192
|
+
return n.captureEventP && (f.pointerEvents = "none"), f;
|
|
1193
|
+
}), s = L(() => {
|
|
1194
|
+
let f = {
|
|
1186
1195
|
padding: "12px"
|
|
1187
1196
|
};
|
|
1188
|
-
return (n.icon || n.showIcon) && (
|
|
1189
|
-
...
|
|
1197
|
+
return (n.icon || n.showIcon) && (f.padding = "20px"), n.width && (f.width = n.width), n.maxWidth && (f.maxWidth = n.maxWidth), n.overlayContentStyle && (f = {
|
|
1198
|
+
...f,
|
|
1190
1199
|
...n.overlayContentStyle
|
|
1191
|
-
}),
|
|
1192
|
-
}), a =
|
|
1193
|
-
let
|
|
1194
|
-
return n.showClose && !n.icon && (
|
|
1200
|
+
}), f;
|
|
1201
|
+
}), a = L(() => {
|
|
1202
|
+
let f = {};
|
|
1203
|
+
return n.showClose && !n.icon && (f.paddingRight = "16px"), f;
|
|
1195
1204
|
});
|
|
1196
|
-
function
|
|
1205
|
+
function r() {
|
|
1197
1206
|
n.closeOnClickOverlay && t("close");
|
|
1198
1207
|
}
|
|
1199
|
-
function
|
|
1208
|
+
function u() {
|
|
1200
1209
|
n.closeOnClick && t("close");
|
|
1201
1210
|
}
|
|
1202
|
-
return (
|
|
1211
|
+
return (f, d) => (R(), ze($e, {
|
|
1203
1212
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1204
1213
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1205
1214
|
}, {
|
|
1206
|
-
default:
|
|
1215
|
+
default: He(() => [
|
|
1207
1216
|
U("div", {
|
|
1208
1217
|
id: o,
|
|
1209
|
-
style:
|
|
1218
|
+
style: q(C(l))
|
|
1210
1219
|
}, [
|
|
1211
|
-
|
|
1212
|
-
class:
|
|
1213
|
-
onClick:
|
|
1220
|
+
ce(U("div", {
|
|
1221
|
+
class: ae(`${o} ${e.className}`),
|
|
1222
|
+
onClick: pe(r, ["stop"])
|
|
1214
1223
|
}, [
|
|
1215
1224
|
U("div", {
|
|
1216
|
-
class:
|
|
1217
|
-
onClick:
|
|
1225
|
+
class: ae(`${o}-wrap`),
|
|
1226
|
+
onClick: pe(u, ["stop"])
|
|
1218
1227
|
}, [
|
|
1219
1228
|
U("div", {
|
|
1220
|
-
class:
|
|
1221
|
-
style:
|
|
1229
|
+
class: ae(`${o}-content`),
|
|
1230
|
+
style: q(C(s))
|
|
1222
1231
|
}, [
|
|
1223
1232
|
e.showClose ? (R(), H("img", {
|
|
1224
1233
|
key: 0,
|
|
1225
|
-
onClick:
|
|
1226
|
-
src:
|
|
1227
|
-
class:
|
|
1228
|
-
}, null, 10,
|
|
1234
|
+
onClick: d[0] || (d[0] = pe((c) => t("close"), ["stop"])),
|
|
1235
|
+
src: C(En),
|
|
1236
|
+
class: ae(`${o}-close`)
|
|
1237
|
+
}, null, 10, jn)) : de("", !0),
|
|
1229
1238
|
e.showIcon ? (R(), H("img", {
|
|
1230
1239
|
key: 1,
|
|
1231
|
-
src: e.icon ||
|
|
1232
|
-
class:
|
|
1233
|
-
}, null, 10,
|
|
1240
|
+
src: e.icon || C(An),
|
|
1241
|
+
class: ae(`${o}-icon`)
|
|
1242
|
+
}, null, 10, Cn)) : de("", !0),
|
|
1234
1243
|
e.message ? (R(), H("div", {
|
|
1235
1244
|
key: 2,
|
|
1236
|
-
class:
|
|
1237
|
-
style:
|
|
1238
|
-
},
|
|
1245
|
+
class: ae(`${o}-message`),
|
|
1246
|
+
style: q(C(a))
|
|
1247
|
+
}, Fe(e.message), 7)) : de("", !0)
|
|
1239
1248
|
], 6)
|
|
1240
|
-
], 10,
|
|
1241
|
-
], 10,
|
|
1242
|
-
[
|
|
1249
|
+
], 10, Ln)
|
|
1250
|
+
], 10, zn), [
|
|
1251
|
+
[Ce, e.visible]
|
|
1243
1252
|
])
|
|
1244
1253
|
], 4)
|
|
1245
1254
|
]),
|
|
@@ -1247,23 +1256,23 @@ const wn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1247
1256
|
}));
|
|
1248
1257
|
}
|
|
1249
1258
|
});
|
|
1250
|
-
const
|
|
1251
|
-
class
|
|
1259
|
+
const Sn = /* @__PURE__ */ le(xn, [["__scopeId", "data-v-0947d1e3"]]);
|
|
1260
|
+
class On {
|
|
1252
1261
|
loadingToast;
|
|
1253
1262
|
el;
|
|
1254
1263
|
options;
|
|
1255
|
-
visible =
|
|
1264
|
+
visible = g(!1);
|
|
1256
1265
|
animateDuration = 300;
|
|
1257
1266
|
constructor(t) {
|
|
1258
|
-
this.options = { ...t, visible: this.visible }, this.options.duration == null && (this.options.duration = 60 * 10 * 1e3), this.el = document.createElement("div"), this.loadingToast =
|
|
1267
|
+
this.options = { ...t, visible: this.visible }, this.options.duration == null && (this.options.duration = 60 * 10 * 1e3), this.el = document.createElement("div"), this.loadingToast = Sn;
|
|
1259
1268
|
}
|
|
1260
1269
|
async show() {
|
|
1261
1270
|
const t = this.options, o = { ...t, onClose: () => {
|
|
1262
1271
|
this.close(), t?.onClose?.();
|
|
1263
|
-
} }, l =
|
|
1264
|
-
|
|
1272
|
+
} }, l = me(this.loadingToast, o);
|
|
1273
|
+
Te(l, this.el), document.body.insertBefore(this.el, document.body.firstChild), this.visible.value = !0, t.duration !== 0 && setTimeout(() => {
|
|
1265
1274
|
this.destory();
|
|
1266
|
-
}, t.duration), await
|
|
1275
|
+
}, t.duration), await st(t.duration + this.animateDuration);
|
|
1267
1276
|
}
|
|
1268
1277
|
async destory() {
|
|
1269
1278
|
!this.visible.value || (this.visible.value = !1, await new Promise((t) => {
|
|
@@ -1280,8 +1289,8 @@ class Cn {
|
|
|
1280
1289
|
document.querySelector("#lzc-loading-toast")?.remove();
|
|
1281
1290
|
}
|
|
1282
1291
|
}
|
|
1283
|
-
function
|
|
1284
|
-
const n = !!t?.debug, o = t?.printErrorLog !== !1, l = t?.loading !== !1, s = t?.autoClose !== !1, a = t?.delay !== void 0 ? t.delay : 300,
|
|
1292
|
+
function Po(e, t) {
|
|
1293
|
+
const n = !!t?.debug, o = t?.printErrorLog !== !1, l = t?.loading !== !1, s = t?.autoClose !== !1, a = t?.delay !== void 0 ? t.delay : 300, r = t?.hook !== void 0 ? t.hook : !0, u = {
|
|
1285
1294
|
...t,
|
|
1286
1295
|
showIcon: t?.showIcon !== !1,
|
|
1287
1296
|
captureEventP: t?.captureEventP === !0
|
|
@@ -1291,59 +1300,59 @@ function $o(e, t) {
|
|
|
1291
1300
|
l,
|
|
1292
1301
|
s,
|
|
1293
1302
|
a,
|
|
1294
|
-
|
|
1303
|
+
u
|
|
1295
1304
|
);
|
|
1296
|
-
const
|
|
1297
|
-
let
|
|
1298
|
-
const c = new
|
|
1299
|
-
async function M(...
|
|
1300
|
-
if (n && console.log(`useDelayAsync - handler - processing: ${
|
|
1301
|
-
|
|
1305
|
+
const f = g(!1);
|
|
1306
|
+
let d = null;
|
|
1307
|
+
const c = new On(u);
|
|
1308
|
+
async function M(...i) {
|
|
1309
|
+
if (n && console.log(`useDelayAsync - handler - processing: ${f.value}`), !f.value) {
|
|
1310
|
+
f.value = !0, d = setTimeout(() => {
|
|
1302
1311
|
n && console.log(
|
|
1303
1312
|
"useDelayAsync - handler - setTimeout - loading: %s processing: %s",
|
|
1304
1313
|
l,
|
|
1305
|
-
|
|
1306
|
-
), l && (!
|
|
1314
|
+
f.value
|
|
1315
|
+
), l && (!f.value || c.show());
|
|
1307
1316
|
}, a);
|
|
1308
1317
|
try {
|
|
1309
1318
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1310
|
-
const
|
|
1311
|
-
return n && console.log("useDelayAsync - execute res: ",
|
|
1312
|
-
} catch (
|
|
1313
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(
|
|
1319
|
+
const y = await e(...i);
|
|
1320
|
+
return n && console.log("useDelayAsync - execute res: ", y), n && console.timeEnd("useDelayAsync - handler-execute-time"), await v(s), await t?.onSuccess?.(y, [...i]), y;
|
|
1321
|
+
} catch (y) {
|
|
1322
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(y), await v(s), await t?.onError?.(y, [...i]);
|
|
1314
1323
|
}
|
|
1315
1324
|
}
|
|
1316
1325
|
}
|
|
1317
|
-
async function
|
|
1318
|
-
n && console.log("useDelayAsync - close - closeLoading: ",
|
|
1326
|
+
async function v(i = !0) {
|
|
1327
|
+
n && console.log("useDelayAsync - close - closeLoading: ", i), f.value = !1, d && clearTimeout(d), d = null, i && await c.destory();
|
|
1319
1328
|
}
|
|
1320
|
-
return
|
|
1321
|
-
n && console.log("useDelayAsync - onBeforeUnmount - close"),
|
|
1329
|
+
return r && mt(() => {
|
|
1330
|
+
n && console.log("useDelayAsync - onBeforeUnmount - close"), v();
|
|
1322
1331
|
}), {
|
|
1323
|
-
processing:
|
|
1332
|
+
processing: f,
|
|
1324
1333
|
handler: M,
|
|
1325
|
-
close:
|
|
1334
|
+
close: v
|
|
1326
1335
|
};
|
|
1327
1336
|
}
|
|
1328
|
-
function
|
|
1337
|
+
function bn(e, t) {
|
|
1329
1338
|
return e > t ? "horizontal" : t > e ? "vertical" : "";
|
|
1330
1339
|
}
|
|
1331
|
-
function
|
|
1332
|
-
const e =
|
|
1340
|
+
function _n() {
|
|
1341
|
+
const e = g(0), t = g(0), n = g(0), o = g(0), l = g(0), s = g(0), a = g(""), r = () => a.value === "vertical", u = () => a.value === "horizontal", f = () => {
|
|
1333
1342
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1334
1343
|
};
|
|
1335
|
-
function
|
|
1336
|
-
|
|
1344
|
+
function d(M, v) {
|
|
1345
|
+
f(), e.value = M, t.value = v;
|
|
1337
1346
|
}
|
|
1338
|
-
function c(M,
|
|
1339
|
-
n.value = (M < 0 ? 0 : M) - e.value, o.value =
|
|
1340
|
-
const
|
|
1341
|
-
(!a.value || l.value <
|
|
1347
|
+
function c(M, v) {
|
|
1348
|
+
n.value = (M < 0 ? 0 : M) - e.value, o.value = v - t.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1349
|
+
const i = 10;
|
|
1350
|
+
(!a.value || l.value < i && s.value < i) && (a.value = bn(l.value, s.value));
|
|
1342
1351
|
}
|
|
1343
1352
|
return {
|
|
1344
1353
|
move: c,
|
|
1345
|
-
start:
|
|
1346
|
-
reset:
|
|
1354
|
+
start: d,
|
|
1355
|
+
reset: f,
|
|
1347
1356
|
startX: e,
|
|
1348
1357
|
startY: t,
|
|
1349
1358
|
deltaX: n,
|
|
@@ -1351,81 +1360,81 @@ function On() {
|
|
|
1351
1360
|
offsetX: l,
|
|
1352
1361
|
offsetY: s,
|
|
1353
1362
|
direction: a,
|
|
1354
|
-
isVertical:
|
|
1355
|
-
isHorizontal:
|
|
1363
|
+
isVertical: r,
|
|
1364
|
+
isHorizontal: u
|
|
1356
1365
|
};
|
|
1357
1366
|
}
|
|
1358
|
-
const
|
|
1359
|
-
function
|
|
1367
|
+
const rt = 250, ct = 5, kn = 500;
|
|
1368
|
+
function Qn(e) {
|
|
1360
1369
|
const { isDouble: t = !0 } = e;
|
|
1361
1370
|
let n, o;
|
|
1362
1371
|
function l() {
|
|
1363
1372
|
n = Date.now();
|
|
1364
1373
|
}
|
|
1365
|
-
async function s(a,
|
|
1366
|
-
const
|
|
1367
|
-
a <
|
|
1374
|
+
async function s(a, r) {
|
|
1375
|
+
const u = Date.now() - n;
|
|
1376
|
+
a < ct && r < ct && (u < rt ? t ? o ? (clearTimeout(o), o = null, e.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1368
1377
|
e.onTap?.(), o = null;
|
|
1369
|
-
},
|
|
1378
|
+
}, rt) : e.onTap?.() : u > kn && e.onLongPress?.());
|
|
1370
1379
|
}
|
|
1371
1380
|
return { startTap: l, checkTap: s };
|
|
1372
1381
|
}
|
|
1373
|
-
function
|
|
1374
|
-
const n =
|
|
1382
|
+
function Yn(e, t) {
|
|
1383
|
+
const n = g(!1);
|
|
1375
1384
|
function o() {
|
|
1376
|
-
n.value || (n.value = !0,
|
|
1385
|
+
n.value || (n.value = !0, C(e)?.addEventListener("transitionend", l));
|
|
1377
1386
|
}
|
|
1378
1387
|
function l() {
|
|
1379
|
-
|
|
1388
|
+
C(e)?.removeEventListener("transitionend", l), n.value = !1, t.onComplate?.();
|
|
1380
1389
|
}
|
|
1381
1390
|
return { transitioning: n, startTransition: o };
|
|
1382
1391
|
}
|
|
1383
|
-
function
|
|
1392
|
+
function Bn(e, t, n, o) {
|
|
1384
1393
|
var l = Math.min(
|
|
1385
1394
|
n / e,
|
|
1386
1395
|
o / t
|
|
1387
1396
|
), s = e * l, a = t * l;
|
|
1388
1397
|
return {
|
|
1389
|
-
width:
|
|
1390
|
-
height:
|
|
1398
|
+
width: ie(s),
|
|
1399
|
+
height: ie(a)
|
|
1391
1400
|
};
|
|
1392
1401
|
}
|
|
1393
|
-
function
|
|
1402
|
+
function Un(e) {
|
|
1394
1403
|
return e < 3 ? "444ms" : e < 6 ? "555ms" : "666ms";
|
|
1395
1404
|
}
|
|
1396
|
-
function
|
|
1405
|
+
function _e(e, t, n) {
|
|
1397
1406
|
return Math.min(Math.max(e, t), n);
|
|
1398
1407
|
}
|
|
1399
|
-
function
|
|
1408
|
+
function ie(e, t = 2) {
|
|
1400
1409
|
return parseFloat(e.toFixed(t));
|
|
1401
1410
|
}
|
|
1402
|
-
function
|
|
1403
|
-
return e =
|
|
1411
|
+
function ke(e, t, n) {
|
|
1412
|
+
return e = ie(e), t = ie(t), `translate3d(${e}px, ${t}px, 0) scale3d(${n},${n},${n})`;
|
|
1404
1413
|
}
|
|
1405
|
-
function
|
|
1414
|
+
function ft(e) {
|
|
1406
1415
|
return Math.sqrt(
|
|
1407
1416
|
(e[0].clientX - e[1].clientX) ** 2 + (e[0].clientY - e[1].clientY) ** 2
|
|
1408
1417
|
);
|
|
1409
1418
|
}
|
|
1410
|
-
function
|
|
1419
|
+
function Rn(e) {
|
|
1411
1420
|
return {
|
|
1412
1421
|
x: (e[0].clientX + e[1].clientX) / 2,
|
|
1413
1422
|
y: (e[0].clientY + e[1].clientY) / 2
|
|
1414
1423
|
};
|
|
1415
1424
|
}
|
|
1416
|
-
function
|
|
1417
|
-
const t =
|
|
1425
|
+
function At(e) {
|
|
1426
|
+
const t = g(!1), n = g(1), o = g(9), l = g(), s = g(), a = g({ width: 0, height: 0 }), r = g({ width: 0, height: 0 }), u = De({
|
|
1418
1427
|
level: 1,
|
|
1419
1428
|
offsetX: 0,
|
|
1420
1429
|
offsetY: 0,
|
|
1421
1430
|
zooming: !1,
|
|
1422
1431
|
preview: !0,
|
|
1423
1432
|
lastCenter: { x: 0, y: 0 }
|
|
1424
|
-
}),
|
|
1433
|
+
}), f = g({}), d = _n(), c = Yn(s, {
|
|
1425
1434
|
onComplate() {
|
|
1426
|
-
|
|
1435
|
+
u.preview || T();
|
|
1427
1436
|
}
|
|
1428
|
-
}), M =
|
|
1437
|
+
}), M = Qn({
|
|
1429
1438
|
onTap() {
|
|
1430
1439
|
e.onTap?.();
|
|
1431
1440
|
},
|
|
@@ -1436,265 +1445,265 @@ function It(e) {
|
|
|
1436
1445
|
e.onLongPress?.();
|
|
1437
1446
|
}
|
|
1438
1447
|
});
|
|
1439
|
-
|
|
1448
|
+
Ze(s, (D) => v(D)), G(
|
|
1440
1449
|
[l, s],
|
|
1441
|
-
([
|
|
1442
|
-
|
|
1450
|
+
([D, A]) => {
|
|
1451
|
+
i(D, A);
|
|
1443
1452
|
},
|
|
1444
1453
|
{ immediate: !0 }
|
|
1445
1454
|
);
|
|
1446
|
-
async function
|
|
1447
|
-
const [A] =
|
|
1448
|
-
A.contentRect.width ==
|
|
1455
|
+
async function v(D) {
|
|
1456
|
+
const [A] = D;
|
|
1457
|
+
A.contentRect.width == r.value.width && A.contentRect.height == r.value.height || (await i(l.value), await T(u.level, !0));
|
|
1449
1458
|
}
|
|
1450
|
-
async function
|
|
1451
|
-
await
|
|
1459
|
+
async function i(D, A) {
|
|
1460
|
+
await x(D, A), D && Y();
|
|
1452
1461
|
}
|
|
1453
|
-
async function
|
|
1454
|
-
if (!
|
|
1462
|
+
async function y(D) {
|
|
1463
|
+
if (!u.preview)
|
|
1455
1464
|
return;
|
|
1456
|
-
|
|
1465
|
+
u.preview = !1, D = D ?? u.level;
|
|
1457
1466
|
const A = s.value;
|
|
1458
1467
|
if (!A)
|
|
1459
1468
|
return;
|
|
1460
|
-
const { scrollTop:
|
|
1469
|
+
const { scrollTop: b, scrollLeft: Q } = A, { width: k, height: z } = a.value, { scaleW: I, scaleH: B } = w(D), { top: $, left: _ } = p(I, B), F = _ != 0 ? _ : Q * -1, ee = $ != 0 ? $ : b * -1;
|
|
1461
1470
|
A.scrollTop = 0, A.scrollLeft = 0;
|
|
1462
|
-
const { value: V } =
|
|
1463
|
-
V.width = `${
|
|
1471
|
+
const { value: V } = f;
|
|
1472
|
+
V.width = `${k}px`, V.height = `${z}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = ke(F, ee, D), f.value = V, await ge(), u.offsetX = F, u.offsetY = ee, await st(20);
|
|
1464
1473
|
}
|
|
1465
|
-
async function
|
|
1466
|
-
if (!A &&
|
|
1474
|
+
async function T(D, A) {
|
|
1475
|
+
if (!A && u.preview)
|
|
1467
1476
|
return;
|
|
1468
|
-
|
|
1469
|
-
const { value:
|
|
1470
|
-
|
|
1477
|
+
u.preview = !0, D = D ?? u.level;
|
|
1478
|
+
const { value: b } = f, { scaleW: Q, scaleH: k } = w(D), { left: z, top: I } = p(Q, k);
|
|
1479
|
+
D === 1 && (b.maxHeight = "100%"), b.width = `${Q}px`, b.height = `${k}px`, b.transitionDuration = "0s", b.transform = ke(z, I, 1), f.value = b, await ge();
|
|
1471
1480
|
const B = s.value;
|
|
1472
1481
|
if (!B)
|
|
1473
1482
|
return;
|
|
1474
|
-
const { offsetX: $, offsetY:
|
|
1475
|
-
$ < 0 && (B.scrollLeft = Math.abs($)),
|
|
1483
|
+
const { offsetX: $, offsetY: _ } = u;
|
|
1484
|
+
$ < 0 && (B.scrollLeft = Math.abs($)), _ < 0 && (B.scrollTop = Math.abs(_));
|
|
1476
1485
|
}
|
|
1477
|
-
async function N(
|
|
1478
|
-
if (t.value || (
|
|
1479
|
-
|
|
1486
|
+
async function N(D, A, b) {
|
|
1487
|
+
if (t.value || (D = ie(D), D = _e(
|
|
1488
|
+
D,
|
|
1480
1489
|
n.value - n.value * 0.5,
|
|
1481
1490
|
o.value + o.value * 0.5
|
|
1482
|
-
),
|
|
1491
|
+
), D == u.level))
|
|
1483
1492
|
return;
|
|
1484
|
-
|
|
1485
|
-
const { value: Q } =
|
|
1486
|
-
left: Math.abs(
|
|
1487
|
-
top: Math.abs(z *
|
|
1488
|
-
right:
|
|
1493
|
+
u.preview && await y(), A || (A = { x: d.startX.value, y: d.startY.value });
|
|
1494
|
+
const { value: Q } = f, { width: k, height: z } = a.value, { scaleW: I, scaleH: B } = w(D), { top: $, left: _ } = p(I, B), F = D / u.level, ee = {
|
|
1495
|
+
left: Math.abs(k * D - r.value.width) * -1,
|
|
1496
|
+
top: Math.abs(z * D - r.value.height) * -1,
|
|
1497
|
+
right: _,
|
|
1489
1498
|
bottom: $
|
|
1490
1499
|
};
|
|
1491
|
-
let V =
|
|
1492
|
-
V =
|
|
1500
|
+
let V = _ != 0 ? _ : (u.offsetX - A.x) * F + A.x, se = $ != 0 ? $ : (u.offsetY - A.y) * F + A.y;
|
|
1501
|
+
V = ie(_e(V, ee.left, ee.right)), se = ie(_e(se, ee.top, ee.bottom)), Q.width = `${k}px`, Q.height = `${z}px`, Q.transitionDuration = b ? Un(D) : "0s", Q.transform = ke(V, se, D), u.offsetX = V, u.offsetY = se, u.level = D, f.value = Q, await ge(), b && c.startTransition(), e.onScale?.(D);
|
|
1493
1502
|
}
|
|
1494
1503
|
function E() {
|
|
1495
|
-
const
|
|
1496
|
-
N(
|
|
1504
|
+
const D = u.level > 1 ? 1 : m();
|
|
1505
|
+
N(D, void 0, !0);
|
|
1497
1506
|
}
|
|
1498
|
-
function
|
|
1499
|
-
if (!
|
|
1507
|
+
function j(D, A) {
|
|
1508
|
+
if (!u.preview)
|
|
1500
1509
|
return;
|
|
1501
|
-
const
|
|
1502
|
-
!
|
|
1503
|
-
left:
|
|
1504
|
-
top:
|
|
1510
|
+
const b = s.value;
|
|
1511
|
+
!b || b.scrollTo({
|
|
1512
|
+
left: u.offsetX - D,
|
|
1513
|
+
top: u.offsetY - A
|
|
1505
1514
|
});
|
|
1506
1515
|
}
|
|
1507
|
-
async function
|
|
1508
|
-
|
|
1516
|
+
async function h() {
|
|
1517
|
+
u.level >= n.value && u.level <= o.value ? u.zooming && await T() : u.level < n.value ? await N(n.value, void 0, !0) : u.level > o.value && await N(o.value, u.lastCenter, !0), u.zooming = !1;
|
|
1509
1518
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const { width:
|
|
1519
|
+
function m() {
|
|
1520
|
+
const { width: D, height: A } = a.value, { width: b, height: Q } = r.value, k = 2.5;
|
|
1512
1521
|
let z;
|
|
1513
|
-
return A == Q ? (z =
|
|
1522
|
+
return A == Q ? (z = b / D, z - 1 < 0.1 && (z = k)) : z = Math.max(k, b / D, Q / A), z;
|
|
1514
1523
|
}
|
|
1515
|
-
function w(
|
|
1516
|
-
const { width: A, height:
|
|
1524
|
+
function w(D) {
|
|
1525
|
+
const { width: A, height: b } = a.value;
|
|
1517
1526
|
return {
|
|
1518
|
-
scaleW:
|
|
1519
|
-
scaleH:
|
|
1527
|
+
scaleW: ie(D * A),
|
|
1528
|
+
scaleH: ie(D * b)
|
|
1520
1529
|
};
|
|
1521
1530
|
}
|
|
1522
|
-
function
|
|
1523
|
-
const { width:
|
|
1524
|
-
return { top:
|
|
1531
|
+
function p(D, A) {
|
|
1532
|
+
const { width: b, height: Q } = r.value, k = Math.max(0, (Q - A) * 0.5), z = Math.max(0, (b - D) * 0.5);
|
|
1533
|
+
return { top: k, left: z };
|
|
1525
1534
|
}
|
|
1526
|
-
async function
|
|
1527
|
-
if (
|
|
1535
|
+
async function x(D, A) {
|
|
1536
|
+
if (D = D ?? l.value, A = A ?? s.value, !A)
|
|
1528
1537
|
return;
|
|
1529
|
-
let
|
|
1530
|
-
const { clientWidth: z, clientHeight:
|
|
1531
|
-
if (
|
|
1532
|
-
const B =
|
|
1533
|
-
|
|
1534
|
-
|
|
1538
|
+
let b, { clientWidth: Q = 0, clientHeight: k = 0 } = D || {};
|
|
1539
|
+
const { clientWidth: z, clientHeight: I } = A;
|
|
1540
|
+
if (D instanceof HTMLImageElement ? b = { width: D.naturalWidth, height: D.naturalHeight } : D instanceof HTMLVideoElement && (b = { width: D.videoWidth, height: D.videoHeight }), b) {
|
|
1541
|
+
const B = Bn(
|
|
1542
|
+
b.width,
|
|
1543
|
+
b.height,
|
|
1535
1544
|
z,
|
|
1536
|
-
|
|
1545
|
+
I
|
|
1537
1546
|
);
|
|
1538
|
-
Q = B.width,
|
|
1547
|
+
Q = B.width, k = B.height;
|
|
1539
1548
|
}
|
|
1540
|
-
(Q === 0 ||
|
|
1549
|
+
(Q === 0 || k === 0) && (Q = a.value.width || z, k = a.value.height || I), a.value = {
|
|
1541
1550
|
width: Math.min(Q, z),
|
|
1542
|
-
height: Math.min(
|
|
1543
|
-
},
|
|
1551
|
+
height: Math.min(k, I)
|
|
1552
|
+
}, r.value = { width: z, height: I }, T(void 0, !0);
|
|
1544
1553
|
}
|
|
1545
1554
|
function Y() {
|
|
1546
|
-
const
|
|
1547
|
-
o.value = Math.max(o.value,
|
|
1555
|
+
const D = m();
|
|
1556
|
+
o.value = Math.max(o.value, D * 2);
|
|
1548
1557
|
}
|
|
1549
|
-
function
|
|
1550
|
-
t.value =
|
|
1558
|
+
function Z(D) {
|
|
1559
|
+
t.value = D;
|
|
1551
1560
|
}
|
|
1552
1561
|
return {
|
|
1553
|
-
touch:
|
|
1554
|
-
state:
|
|
1555
|
-
style:
|
|
1562
|
+
touch: d,
|
|
1563
|
+
state: u,
|
|
1564
|
+
style: f,
|
|
1556
1565
|
gesture: M,
|
|
1557
1566
|
transition: c,
|
|
1558
1567
|
imageRef: l,
|
|
1559
1568
|
containerRef: s,
|
|
1560
|
-
switchToZoom:
|
|
1561
|
-
switchToPreview:
|
|
1562
|
-
panTo:
|
|
1569
|
+
switchToZoom: y,
|
|
1570
|
+
switchToPreview: T,
|
|
1571
|
+
panTo: j,
|
|
1563
1572
|
zoomTo: N,
|
|
1564
|
-
zoomFinished:
|
|
1573
|
+
zoomFinished: h,
|
|
1565
1574
|
toggleZoom: E,
|
|
1566
|
-
setDisableZoom:
|
|
1575
|
+
setDisableZoom: Z
|
|
1567
1576
|
};
|
|
1568
1577
|
}
|
|
1569
|
-
function
|
|
1570
|
-
const { state: n, touch: o, transition: l, containerRef: s } = e, a =
|
|
1571
|
-
let
|
|
1572
|
-
function
|
|
1573
|
-
|
|
1578
|
+
function zt(e, t) {
|
|
1579
|
+
const { state: n, touch: o, transition: l, containerRef: s } = e, a = an(s);
|
|
1580
|
+
let r, u;
|
|
1581
|
+
function f(M) {
|
|
1582
|
+
r = M;
|
|
1574
1583
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
1584
|
+
function d(M) {
|
|
1585
|
+
return r == M;
|
|
1577
1586
|
}
|
|
1578
|
-
function c(M,
|
|
1587
|
+
function c(M, v, i, y) {
|
|
1579
1588
|
a.measure();
|
|
1580
|
-
const { top:
|
|
1589
|
+
const { top: T, left: N, right: E, bottom: j } = a.arrivedState;
|
|
1581
1590
|
if (M == "start")
|
|
1582
|
-
|
|
1583
|
-
else if (
|
|
1584
|
-
|
|
1585
|
-
else if (
|
|
1591
|
+
u = T || N || E || j;
|
|
1592
|
+
else if (r == 2)
|
|
1593
|
+
u = !1;
|
|
1594
|
+
else if (u) {
|
|
1586
1595
|
if (o.direction.value == "vertical")
|
|
1587
1596
|
if (n.level != 1)
|
|
1588
|
-
|
|
1597
|
+
u = !1;
|
|
1589
1598
|
else {
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1599
|
+
const h = o.startY.value < i;
|
|
1600
|
+
u = T && h || j && !h;
|
|
1592
1601
|
}
|
|
1593
1602
|
else if (o.direction.value == "horizontal") {
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1603
|
+
const h = o.startX.value < v;
|
|
1604
|
+
u = N && h || E && !h;
|
|
1596
1605
|
}
|
|
1597
1606
|
}
|
|
1598
|
-
|
|
1607
|
+
u && l.transitioning.value && (u = !1, y?.preventDefault()), M == "end" && !u && (v = o.startX.value, i = o.startY.value, u = !0), (M != "move" || u) && t?.(M, o.direction.value, v, i, y);
|
|
1599
1608
|
}
|
|
1600
|
-
return { onSwipeEdge: c, setFingerNum:
|
|
1609
|
+
return { onSwipeEdge: c, setFingerNum: f, isEqualFingerNum: d };
|
|
1601
1610
|
}
|
|
1602
|
-
function
|
|
1603
|
-
const t =
|
|
1611
|
+
function Fo(e) {
|
|
1612
|
+
const t = At({
|
|
1604
1613
|
onDoubleTap() {
|
|
1605
1614
|
t.toggleZoom();
|
|
1606
1615
|
},
|
|
1607
1616
|
...e
|
|
1608
1617
|
}), { state: n, touch: o, gesture: l, transition: s } = t;
|
|
1609
|
-
let a = !1,
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
function M(
|
|
1613
|
-
const
|
|
1614
|
-
if (!
|
|
1618
|
+
let a = !1, r = null;
|
|
1619
|
+
const u = { top: 0, left: 0 }, f = xe(T, 150), { onSwipeEdge: d } = zt(t, e.onSwipeEdge), c = g({ top: 0, left: 0 });
|
|
1620
|
+
Ee("keyup", E), Ee("keydown", N);
|
|
1621
|
+
function M(j) {
|
|
1622
|
+
const h = t.containerRef.value;
|
|
1623
|
+
if (!h)
|
|
1615
1624
|
return;
|
|
1616
|
-
const { left:
|
|
1617
|
-
c.value.left =
|
|
1618
|
-
let
|
|
1619
|
-
o.start(
|
|
1625
|
+
const { left: m, top: w } = h.getBoundingClientRect();
|
|
1626
|
+
c.value.left = m, c.value.top = w, l.startTap();
|
|
1627
|
+
let p = j.clientX - m, x = j.clientY - w;
|
|
1628
|
+
o.start(p, x), d("start", p, x, j), s.transitioning.value || (a = !0, u.left = m, u.top = w, n.offsetX = h.scrollLeft, n.offsetY = h.scrollTop), window.addEventListener("pointermove", v), window.addEventListener("pointerup", i);
|
|
1620
1629
|
}
|
|
1621
|
-
function
|
|
1630
|
+
function v(j) {
|
|
1622
1631
|
if (!a)
|
|
1623
1632
|
return;
|
|
1624
|
-
let
|
|
1625
|
-
o.move(
|
|
1633
|
+
let h = j.clientX, m = j.clientY;
|
|
1634
|
+
o.move(h, m), d(
|
|
1626
1635
|
"move",
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1636
|
+
h - c.value.left,
|
|
1637
|
+
m - c.value.top,
|
|
1638
|
+
j
|
|
1630
1639
|
), n.level !== 1 && t.panTo(
|
|
1631
|
-
o.deltaX.value -
|
|
1632
|
-
o.deltaY.value -
|
|
1640
|
+
o.deltaX.value - u.left,
|
|
1641
|
+
o.deltaY.value - u.top
|
|
1633
1642
|
);
|
|
1634
1643
|
}
|
|
1635
|
-
function
|
|
1636
|
-
|
|
1644
|
+
function i(j) {
|
|
1645
|
+
d("end", o.offsetX.value, o.offsetY.value, j), l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", i);
|
|
1637
1646
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (!
|
|
1647
|
+
function y(j) {
|
|
1648
|
+
if (!j.ctrlKey)
|
|
1640
1649
|
return;
|
|
1641
|
-
n.zooming || (n.zooming = !0,
|
|
1642
|
-
let
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1650
|
+
n.zooming || (n.zooming = !0, r == "Control" && window.addEventListener("keyup", T)), j.preventDefault();
|
|
1651
|
+
let h = -j.deltaY;
|
|
1652
|
+
j.deltaMode === 1 ? h *= 0.05 : h *= j.deltaMode ? 1 : 2e-3, r != "Control" && (h *= 10), h = 2 ** h;
|
|
1653
|
+
const m = n.level * h;
|
|
1645
1654
|
n.lastCenter = {
|
|
1646
|
-
x:
|
|
1647
|
-
y:
|
|
1648
|
-
}, t.zoomTo(
|
|
1655
|
+
x: j.clientX - c.value.left,
|
|
1656
|
+
y: j.clientY - c.value.top
|
|
1657
|
+
}, t.zoomTo(m, n.lastCenter), r != "Control" && f();
|
|
1649
1658
|
}
|
|
1650
|
-
function
|
|
1651
|
-
t.zoomFinished(), window.removeEventListener("keyup",
|
|
1659
|
+
function T() {
|
|
1660
|
+
t.zoomFinished(), window.removeEventListener("keyup", T);
|
|
1652
1661
|
}
|
|
1653
|
-
function N(
|
|
1654
|
-
|
|
1662
|
+
function N(j) {
|
|
1663
|
+
r = j.key;
|
|
1655
1664
|
}
|
|
1656
1665
|
function E() {
|
|
1657
|
-
|
|
1666
|
+
r = null;
|
|
1658
1667
|
}
|
|
1659
|
-
return { core: t, onPointerDown: M, onWheel:
|
|
1668
|
+
return { core: t, onPointerDown: M, onWheel: y };
|
|
1660
1669
|
}
|
|
1661
|
-
function
|
|
1662
|
-
const t =
|
|
1670
|
+
function Wo(e) {
|
|
1671
|
+
const t = At({
|
|
1663
1672
|
onDoubleTap() {
|
|
1664
1673
|
t.toggleZoom();
|
|
1665
1674
|
},
|
|
1666
1675
|
...e
|
|
1667
|
-
}), { state: n, touch: o, gesture: l } = t, { setFingerNum: s, onSwipeEdge: a, isEqualFingerNum:
|
|
1676
|
+
}), { state: n, touch: o, gesture: l } = t, { setFingerNum: s, onSwipeEdge: a, isEqualFingerNum: r } = zt(
|
|
1668
1677
|
t,
|
|
1669
1678
|
e.onSwipeEdge
|
|
1670
1679
|
);
|
|
1671
|
-
let
|
|
1672
|
-
async function v
|
|
1673
|
-
const { touches:
|
|
1674
|
-
s(
|
|
1675
|
-
const { clientX:
|
|
1676
|
-
o.start(
|
|
1677
|
-
}
|
|
1678
|
-
async function c(
|
|
1679
|
-
const { touches:
|
|
1680
|
-
s(
|
|
1681
|
-
const { clientX:
|
|
1682
|
-
if (o.move(
|
|
1683
|
-
|
|
1684
|
-
const N =
|
|
1680
|
+
let u, f;
|
|
1681
|
+
async function d(v) {
|
|
1682
|
+
const { touches: i } = v;
|
|
1683
|
+
s(i.length), n.zooming = r(2), l.startTap();
|
|
1684
|
+
const { clientX: y, clientY: T } = i[0];
|
|
1685
|
+
o.start(y, T), a("start", y, T, v), n.zooming && (v.preventDefault(), u = n.level, f = ft(i), await t.switchToZoom(), n.lastCenter = Rn(i));
|
|
1686
|
+
}
|
|
1687
|
+
async function c(v) {
|
|
1688
|
+
const { touches: i } = v;
|
|
1689
|
+
s(i.length);
|
|
1690
|
+
const { clientX: y, clientY: T } = i[0];
|
|
1691
|
+
if (o.move(y, T), a("move", y, T, v), n.zooming && r(2)) {
|
|
1692
|
+
v.preventDefault();
|
|
1693
|
+
const N = ft(i), E = u * N / f;
|
|
1685
1694
|
t.zoomTo(E, n.lastCenter);
|
|
1686
1695
|
}
|
|
1687
1696
|
}
|
|
1688
|
-
async function M(
|
|
1689
|
-
if (
|
|
1697
|
+
async function M(v) {
|
|
1698
|
+
if (v.touches.length)
|
|
1690
1699
|
return;
|
|
1691
|
-
const { clientX:
|
|
1692
|
-
a("end",
|
|
1700
|
+
const { clientX: i, clientY: y } = v.changedTouches[0];
|
|
1701
|
+
a("end", i, y, v), l.checkTap(o.offsetX.value, o.offsetY.value), t.zoomFinished(), o.reset();
|
|
1693
1702
|
}
|
|
1694
|
-
return { core: t, onTouchStart:
|
|
1703
|
+
return { core: t, onTouchStart: d, onTouchMove: c, onTouchEnd: M };
|
|
1695
1704
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const e =
|
|
1705
|
+
function Xo() {
|
|
1706
|
+
const e = De({
|
|
1698
1707
|
scale: 1,
|
|
1699
1708
|
startX: 0,
|
|
1700
1709
|
startY: 0,
|
|
@@ -1714,11 +1723,11 @@ function Fo() {
|
|
|
1714
1723
|
}
|
|
1715
1724
|
return { state: e, dragStart: t, dragMove: n, dragEnd: o };
|
|
1716
1725
|
}
|
|
1717
|
-
function
|
|
1718
|
-
const e =
|
|
1719
|
-
return
|
|
1726
|
+
function $n() {
|
|
1727
|
+
const e = g(!1), t = g(!1);
|
|
1728
|
+
return yt(() => {
|
|
1720
1729
|
!t.value || (e.value = !0);
|
|
1721
|
-
}),
|
|
1730
|
+
}), fe(() => {
|
|
1722
1731
|
t.value = !1, setTimeout(() => {
|
|
1723
1732
|
t.value = !0;
|
|
1724
1733
|
});
|
|
@@ -1726,32 +1735,32 @@ function Un() {
|
|
|
1726
1735
|
isActivated: e
|
|
1727
1736
|
};
|
|
1728
1737
|
}
|
|
1729
|
-
function
|
|
1738
|
+
function Hn(e) {
|
|
1730
1739
|
let t = !1;
|
|
1731
1740
|
return () => {
|
|
1732
1741
|
t || (e(), t = !0);
|
|
1733
1742
|
};
|
|
1734
1743
|
}
|
|
1735
|
-
function
|
|
1744
|
+
function Zo(e) {
|
|
1736
1745
|
let t = null;
|
|
1737
|
-
const { isActivated: n } =
|
|
1746
|
+
const { isActivated: n } = $n(), o = Hn(() => t = window.onBackPress);
|
|
1738
1747
|
function l() {
|
|
1739
1748
|
o(), window.onBackPress = () => e();
|
|
1740
1749
|
}
|
|
1741
1750
|
function s() {
|
|
1742
1751
|
window.onBackPress = t;
|
|
1743
1752
|
}
|
|
1744
|
-
return
|
|
1753
|
+
return yt(() => {
|
|
1745
1754
|
!n.value || l();
|
|
1746
|
-
}),
|
|
1755
|
+
}), Rt(() => {
|
|
1747
1756
|
l();
|
|
1748
|
-
}),
|
|
1757
|
+
}), mt(() => {
|
|
1749
1758
|
s();
|
|
1750
|
-
}),
|
|
1759
|
+
}), $t(() => {
|
|
1751
1760
|
s();
|
|
1752
1761
|
}), { register: l, unregister: s };
|
|
1753
1762
|
}
|
|
1754
|
-
const
|
|
1763
|
+
const Pn = ["onClick"], Fn = /* @__PURE__ */ J({
|
|
1755
1764
|
__name: "Toast",
|
|
1756
1765
|
props: {
|
|
1757
1766
|
message: null,
|
|
@@ -1759,7 +1768,7 @@ const $n = ["onClick"], Hn = /* @__PURE__ */ q({
|
|
|
1759
1768
|
buttonClickEvent: null
|
|
1760
1769
|
},
|
|
1761
1770
|
setup(e) {
|
|
1762
|
-
const t = e, n =
|
|
1771
|
+
const t = e, n = g(), o = g(), l = g(), s = L(() => {
|
|
1763
1772
|
switch (t.position) {
|
|
1764
1773
|
case "top":
|
|
1765
1774
|
return 10;
|
|
@@ -1768,14 +1777,14 @@ const $n = ["onClick"], Hn = /* @__PURE__ */ q({
|
|
|
1768
1777
|
case "bottom":
|
|
1769
1778
|
return 85;
|
|
1770
1779
|
}
|
|
1771
|
-
}), a =
|
|
1780
|
+
}), a = L(() => ({
|
|
1772
1781
|
position: "absolute",
|
|
1773
1782
|
borderRadius: "10px",
|
|
1774
1783
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1775
1784
|
padding: "14px 19px",
|
|
1776
1785
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1777
1786
|
left: `calc(50% - ${o.value}px)`
|
|
1778
|
-
})),
|
|
1787
|
+
})), r = L(() => ({
|
|
1779
1788
|
width: "fit-content",
|
|
1780
1789
|
display: "flex",
|
|
1781
1790
|
justifyContent: "center",
|
|
@@ -1783,44 +1792,44 @@ const $n = ["onClick"], Hn = /* @__PURE__ */ q({
|
|
|
1783
1792
|
color: "white",
|
|
1784
1793
|
fontSize: "14px"
|
|
1785
1794
|
}));
|
|
1786
|
-
function
|
|
1795
|
+
function u() {
|
|
1787
1796
|
!t.buttonClickEvent || t.buttonClickEvent();
|
|
1788
1797
|
}
|
|
1789
|
-
return
|
|
1798
|
+
return ge(() => {
|
|
1790
1799
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1791
|
-
}), (
|
|
1792
|
-
onClick:
|
|
1800
|
+
}), (f, d) => (R(), H("div", {
|
|
1801
|
+
onClick: pe(u, ["stop"]),
|
|
1793
1802
|
id: "toastWrapper",
|
|
1794
1803
|
ref_key: "toastWrapper",
|
|
1795
1804
|
ref: n,
|
|
1796
1805
|
class: "toastWrapper",
|
|
1797
|
-
style:
|
|
1806
|
+
style: q([C(a), { zIndex: 9999999 }])
|
|
1798
1807
|
}, [
|
|
1799
1808
|
U("div", {
|
|
1800
|
-
style:
|
|
1809
|
+
style: q(C(r))
|
|
1801
1810
|
}, [
|
|
1802
|
-
U("span", null,
|
|
1811
|
+
U("span", null, Fe(e.message), 1)
|
|
1803
1812
|
], 4)
|
|
1804
|
-
], 12,
|
|
1813
|
+
], 12, Pn));
|
|
1805
1814
|
}
|
|
1806
1815
|
});
|
|
1807
|
-
const
|
|
1816
|
+
const Wn = /* @__PURE__ */ le(Fn, [["__scopeId", "data-v-25d39b90"]]), dt = {
|
|
1808
1817
|
message: "\u61D2\u732B\u4E91 Yes!!!",
|
|
1809
1818
|
position: "middle",
|
|
1810
1819
|
duration: 1500,
|
|
1811
1820
|
buttonClickEvent: () => {
|
|
1812
1821
|
}
|
|
1813
1822
|
};
|
|
1814
|
-
class
|
|
1823
|
+
class Vo {
|
|
1815
1824
|
options;
|
|
1816
1825
|
container;
|
|
1817
1826
|
constructor(t) {
|
|
1818
1827
|
this.options = t, this.container = document.createElement("div");
|
|
1819
1828
|
}
|
|
1820
1829
|
present() {
|
|
1821
|
-
const t =
|
|
1822
|
-
|
|
1823
|
-
const n = this.options.duration ||
|
|
1830
|
+
const t = re(re(Wn), { ...dt, ...this.options });
|
|
1831
|
+
Te(t, this.container), document.body.insertBefore(this.container, document.body.firstChild);
|
|
1832
|
+
const n = this.options.duration || dt.duration;
|
|
1824
1833
|
setTimeout(() => {
|
|
1825
1834
|
this.dismiss();
|
|
1826
1835
|
}, n);
|
|
@@ -1831,12 +1840,12 @@ class Xo {
|
|
|
1831
1840
|
"#toastWrapper"
|
|
1832
1841
|
);
|
|
1833
1842
|
t.style.opacity = "0", t.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
|
|
1834
|
-
this.container && (
|
|
1843
|
+
this.container && (Te(null, this.container), document.body.removeChild(this.container));
|
|
1835
1844
|
}, 500);
|
|
1836
1845
|
}
|
|
1837
1846
|
}
|
|
1838
1847
|
}
|
|
1839
|
-
const
|
|
1848
|
+
const Xn = ["xlink:href", "fill", "color"], Ae = /* @__PURE__ */ J({
|
|
1840
1849
|
__name: "SvgIcon",
|
|
1841
1850
|
props: {
|
|
1842
1851
|
name: null,
|
|
@@ -1846,7 +1855,7 @@ const Fn = ["xlink:href", "fill", "color"], Ee = /* @__PURE__ */ q({
|
|
|
1846
1855
|
height: null
|
|
1847
1856
|
},
|
|
1848
1857
|
setup(e) {
|
|
1849
|
-
const t = e, n =
|
|
1858
|
+
const t = e, n = L(() => `#${t.prefix}-${t.name}`), o = L(() => ({
|
|
1850
1859
|
width: `${t.width ?? t.height}px`,
|
|
1851
1860
|
height: `${t.height ?? t.width}px`,
|
|
1852
1861
|
aspectRatio: t.width && t.height ? void 0 : "1/1"
|
|
@@ -1857,17 +1866,17 @@ const Fn = ["xlink:href", "fill", "color"], Ee = /* @__PURE__ */ q({
|
|
|
1857
1866
|
}
|
|
1858
1867
|
return (s, a) => (R(), H("svg", {
|
|
1859
1868
|
"aria-hidden": "",
|
|
1860
|
-
style:
|
|
1869
|
+
style: q({ ...C(o), ...l(s.$attrs) })
|
|
1861
1870
|
}, [
|
|
1862
1871
|
U("use", {
|
|
1863
|
-
"xlink:href":
|
|
1872
|
+
"xlink:href": C(n),
|
|
1864
1873
|
fill: e.color,
|
|
1865
1874
|
color: e.color
|
|
1866
|
-
}, null, 8,
|
|
1875
|
+
}, null, 8, Xn)
|
|
1867
1876
|
], 4));
|
|
1868
1877
|
}
|
|
1869
1878
|
});
|
|
1870
|
-
function
|
|
1879
|
+
function Zn(e) {
|
|
1871
1880
|
const {
|
|
1872
1881
|
containerEl: t,
|
|
1873
1882
|
sliderEl: n,
|
|
@@ -1875,106 +1884,106 @@ function Wn(e) {
|
|
|
1875
1884
|
performance: l = {},
|
|
1876
1885
|
maxHeightRatio: s = 0.9,
|
|
1877
1886
|
observeMethod: a = "classList"
|
|
1878
|
-
} = e,
|
|
1879
|
-
let
|
|
1880
|
-
const c =
|
|
1887
|
+
} = e, r = g(!0), u = xe(Z, 100);
|
|
1888
|
+
let f, d = "";
|
|
1889
|
+
const c = g(0), M = g(0), v = g(0), i = g({
|
|
1881
1890
|
top: 0,
|
|
1882
1891
|
scrollTop: 0,
|
|
1883
1892
|
scrollHeight: 0,
|
|
1884
1893
|
clientHeight: 0
|
|
1885
|
-
}),
|
|
1894
|
+
}), y = g({
|
|
1886
1895
|
clientHeight: 0
|
|
1887
|
-
}),
|
|
1888
|
-
|
|
1896
|
+
}), T = L(() => !!M.value), N = L(() => i.value.scrollHeight > i.value.clientHeight), E = L(() => o ? i.value.clientHeight - m.value : i.value.clientHeight - y.value.clientHeight), j = L(() => i.value.scrollHeight - i.value.clientHeight), h = L(() => !i.value.clientHeight && !i.value.scrollHeight ? 1 : Math.max(
|
|
1897
|
+
i.value.clientHeight / i.value.scrollHeight,
|
|
1889
1898
|
0.05
|
|
1890
|
-
)),
|
|
1899
|
+
)), m = L(() => h.value > s ? 0 : h.value * i.value.clientHeight), w = L(() => ({
|
|
1891
1900
|
willChange: "transform",
|
|
1892
|
-
transform: `translate3d(0,${
|
|
1893
|
-
height: o ? `${
|
|
1901
|
+
transform: `translate3d(0,${v.value}px,0)`,
|
|
1902
|
+
height: o ? `${m.value}px` : void 0
|
|
1894
1903
|
}));
|
|
1895
|
-
|
|
1896
|
-
function
|
|
1897
|
-
Y(), M.value =
|
|
1904
|
+
Ze(t, () => I());
|
|
1905
|
+
function p(_) {
|
|
1906
|
+
Y(), M.value = _.clientY - n.value.getBoundingClientRect().top || 1, d = getComputedStyle(t.value).scrollBehavior, d === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
1898
1907
|
}
|
|
1899
|
-
function
|
|
1900
|
-
t.value.style.scrollBehavior =
|
|
1908
|
+
function x() {
|
|
1909
|
+
t.value.style.scrollBehavior = d, M.value = 0, u();
|
|
1901
1910
|
}
|
|
1902
1911
|
function Y() {
|
|
1903
|
-
|
|
1912
|
+
r.value = !1;
|
|
1904
1913
|
}
|
|
1905
|
-
function
|
|
1906
|
-
|
|
1914
|
+
function Z() {
|
|
1915
|
+
T.value || (r.value = !0);
|
|
1907
1916
|
}
|
|
1908
|
-
function
|
|
1909
|
-
if (!
|
|
1917
|
+
function D(_) {
|
|
1918
|
+
if (!T.value)
|
|
1910
1919
|
return;
|
|
1911
|
-
let F =
|
|
1912
|
-
F < 0 ?
|
|
1913
|
-
top:
|
|
1920
|
+
let F = _.clientY - i.value.top - M.value;
|
|
1921
|
+
F < 0 ? v.value = 0 : F >= E.value ? v.value = E.value : v.value = F, t.value.scrollTo({
|
|
1922
|
+
top: v.value / E.value * j.value
|
|
1914
1923
|
});
|
|
1915
1924
|
}
|
|
1916
1925
|
function A() {
|
|
1917
|
-
|
|
1926
|
+
T.value || b();
|
|
1918
1927
|
}
|
|
1919
|
-
function
|
|
1920
|
-
cancelAnimationFrame(
|
|
1928
|
+
function b() {
|
|
1929
|
+
cancelAnimationFrame(f), f = requestAnimationFrame(Q);
|
|
1921
1930
|
}
|
|
1922
1931
|
function Q() {
|
|
1923
|
-
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop,
|
|
1932
|
+
t.value && (c.value = l.scrollTop?.value ?? t.value.scrollTop, v.value = c.value / j.value * E.value);
|
|
1924
1933
|
}
|
|
1925
|
-
function
|
|
1934
|
+
function k(_) {
|
|
1926
1935
|
let F = "addEventListener";
|
|
1927
|
-
|
|
1936
|
+
_ === "add" ? F = "addEventListener" : F = "removeEventListener", n.value?.[F]("pointerdown", p, {
|
|
1928
1937
|
passive: !0
|
|
1929
|
-
}), window[F]("pointermove",
|
|
1938
|
+
}), window[F]("pointermove", D, { passive: !0 }), window[F]("pointerup", x, { passive: !0 });
|
|
1930
1939
|
}
|
|
1931
|
-
const z = new MutationObserver((
|
|
1932
|
-
(a == "classList" ||
|
|
1940
|
+
const z = new MutationObserver((_) => {
|
|
1941
|
+
(a == "classList" || _.map((ee) => ee.oldValue).join().includes("height")) && I();
|
|
1933
1942
|
});
|
|
1934
|
-
function
|
|
1935
|
-
|
|
1936
|
-
const { scrollHeight:
|
|
1937
|
-
|
|
1938
|
-
const { clientHeight:
|
|
1939
|
-
|
|
1943
|
+
function I() {
|
|
1944
|
+
i.value.top = t.value?.getBoundingClientRect().top ?? 0;
|
|
1945
|
+
const { scrollHeight: _ = 0, clientHeight: F = 0 } = t.value || {}, { scrollHeight: ee, clientHeight: V } = i.value;
|
|
1946
|
+
_ != ee && (i.value.scrollHeight = _, Q()), F != V && (i.value.clientHeight = F, Q());
|
|
1947
|
+
const { clientHeight: se = 0 } = n.value || {};
|
|
1948
|
+
se != y.value.clientHeight && (y.value.clientHeight = se);
|
|
1940
1949
|
}
|
|
1941
1950
|
function B() {
|
|
1942
1951
|
Y(), setTimeout(() => {
|
|
1943
|
-
|
|
1952
|
+
y.value.clientHeight = n.value?.clientHeight ?? 0, Z();
|
|
1944
1953
|
}, 150);
|
|
1945
1954
|
}
|
|
1946
1955
|
function $() {
|
|
1947
1956
|
if (t.value && n.value) {
|
|
1948
1957
|
t.value.classList.add("hide-scrollbar"), t.value.addEventListener("scroll", A, {
|
|
1949
1958
|
passive: !0
|
|
1950
|
-
}),
|
|
1951
|
-
const
|
|
1952
|
-
a === "classList" ? Object.assign(
|
|
1959
|
+
}), k("add");
|
|
1960
|
+
const _ = {};
|
|
1961
|
+
a === "classList" ? Object.assign(_, { subtree: !0, childList: !0 }) : Object.assign(_, {
|
|
1953
1962
|
subtree: !0,
|
|
1954
1963
|
attributeOldValue: !0,
|
|
1955
1964
|
attributeFilter: ["style"]
|
|
1956
|
-
}), z.observe(t.value,
|
|
1957
|
-
|
|
1965
|
+
}), z.observe(t.value, _), setTimeout(() => {
|
|
1966
|
+
I();
|
|
1958
1967
|
}, 100), B();
|
|
1959
1968
|
} else
|
|
1960
1969
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
1961
1970
|
}
|
|
1962
|
-
return
|
|
1963
|
-
Y(),
|
|
1971
|
+
return G(c, () => {
|
|
1972
|
+
Y(), u();
|
|
1964
1973
|
}), {
|
|
1965
|
-
isScrollEnd:
|
|
1966
|
-
isDragSlider:
|
|
1967
|
-
offsetTop:
|
|
1974
|
+
isScrollEnd: r,
|
|
1975
|
+
isDragSlider: T,
|
|
1976
|
+
offsetTop: v,
|
|
1968
1977
|
scrollTop: c,
|
|
1969
1978
|
scrollable: N,
|
|
1970
1979
|
sliderPos: w,
|
|
1971
1980
|
sliderRollableHeight: E,
|
|
1972
1981
|
init: $,
|
|
1973
|
-
modifySliderEventListener:
|
|
1974
|
-
heightRatio:
|
|
1982
|
+
modifySliderEventListener: k,
|
|
1983
|
+
heightRatio: h
|
|
1975
1984
|
};
|
|
1976
1985
|
}
|
|
1977
|
-
const
|
|
1986
|
+
const Vn = (e) => (Le("data-v-7fd39e51"), e = e(), je(), e), Kn = /* @__PURE__ */ Vn(() => /* @__PURE__ */ U("div", { class: "default-slider" }, null, -1)), Gn = /* @__PURE__ */ J({
|
|
1978
1987
|
__name: "ScrollBar",
|
|
1979
1988
|
props: {
|
|
1980
1989
|
containerEl: null,
|
|
@@ -1985,13 +1994,13 @@ const Xn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Zn = /* @__PURE__ *
|
|
|
1985
1994
|
maxHeightRatio: { default: 0.9 }
|
|
1986
1995
|
},
|
|
1987
1996
|
setup(e, { expose: t }) {
|
|
1988
|
-
const n = e, o = !!
|
|
1997
|
+
const n = e, o = !!Ht().default, l = g(null), s = L(() => n.containerEl), a = Zn({
|
|
1989
1998
|
containerEl: s,
|
|
1990
1999
|
sliderEl: l,
|
|
1991
2000
|
autoHeight: o ? n.autoHeight : !0,
|
|
1992
2001
|
performance: n.performance,
|
|
1993
2002
|
observeMethod: n.observeMethod
|
|
1994
|
-
}), { scrollable:
|
|
2003
|
+
}), { scrollable: r, isScrollEnd: u, sliderPos: f, heightRatio: d } = a, c = g(!1), M = n.autoHide ? L(() => n.maxHeightRatio < d.value ? !1 : c.value || !u.value) : L(() => n.maxHeightRatio < d.value ? !1 : r.value), { load: v } = Ve(
|
|
1995
2004
|
`.hide-scrollbar {
|
|
1996
2005
|
scrollbar-width: none;
|
|
1997
2006
|
-ms-overflow-style: none;
|
|
@@ -2001,47 +2010,47 @@ const Xn = (e) => (Ae("data-v-7fd39e51"), e = e(), ze(), e), Zn = /* @__PURE__ *
|
|
|
2001
2010
|
}`,
|
|
2002
2011
|
{ id: "styletag_lzc_scrollbar", manual: !0 }
|
|
2003
2012
|
);
|
|
2004
|
-
|
|
2005
|
-
|
|
2013
|
+
fe(() => {
|
|
2014
|
+
v(), ge(() => {
|
|
2006
2015
|
a.init();
|
|
2007
2016
|
});
|
|
2008
|
-
}),
|
|
2017
|
+
}), ht(() => {
|
|
2009
2018
|
a.modifySliderEventListener("remove");
|
|
2010
2019
|
});
|
|
2011
|
-
function
|
|
2020
|
+
function i() {
|
|
2012
2021
|
c.value = !0;
|
|
2013
2022
|
}
|
|
2014
|
-
function
|
|
2023
|
+
function y() {
|
|
2015
2024
|
c.value = !1;
|
|
2016
2025
|
}
|
|
2017
|
-
return t({ uScrollBarReturn: a }), (
|
|
2018
|
-
default:
|
|
2019
|
-
|
|
2026
|
+
return t({ uScrollBarReturn: a }), (T, N) => (R(), ze($e, null, {
|
|
2027
|
+
default: He(() => [
|
|
2028
|
+
ce(U("div", {
|
|
2020
2029
|
ref_key: "sliderRef",
|
|
2021
2030
|
ref: l,
|
|
2022
2031
|
class: "slider-wrapper",
|
|
2023
|
-
onMouseenter:
|
|
2024
|
-
onMouseleave:
|
|
2025
|
-
style:
|
|
2032
|
+
onMouseenter: i,
|
|
2033
|
+
onMouseleave: y,
|
|
2034
|
+
style: q(C(f))
|
|
2026
2035
|
}, [
|
|
2027
|
-
|
|
2028
|
-
|
|
2036
|
+
he(T.$slots, "default", {}, () => [
|
|
2037
|
+
Kn
|
|
2029
2038
|
], !0)
|
|
2030
2039
|
], 36), [
|
|
2031
|
-
[
|
|
2040
|
+
[Ce, C(M)]
|
|
2032
2041
|
])
|
|
2033
2042
|
]),
|
|
2034
2043
|
_: 3
|
|
2035
2044
|
}));
|
|
2036
2045
|
}
|
|
2037
2046
|
});
|
|
2038
|
-
const
|
|
2047
|
+
const Ko = /* @__PURE__ */ le(Gn, [["__scopeId", "data-v-7fd39e51"]]), qn = (e) => (Le("data-v-df5da876"), e = e(), je(), e), Jn = { class: "pull-refresh" }, eo = {
|
|
2039
2048
|
key: 0,
|
|
2040
2049
|
class: "pull-arrow-circle"
|
|
2041
|
-
},
|
|
2050
|
+
}, to = {
|
|
2042
2051
|
key: 0,
|
|
2043
2052
|
class: "box-load"
|
|
2044
|
-
},
|
|
2053
|
+
}, no = { class: "left-load" }, oo = { class: "right-load" }, lo = /* @__PURE__ */ qn(() => /* @__PURE__ */ U("div", { class: "among-load" }, null, -1)), so = { class: "pull-arrow" }, ao = { key: 1 }, io = /* @__PURE__ */ J({
|
|
2045
2054
|
__name: "PullRefresh",
|
|
2046
2055
|
props: {
|
|
2047
2056
|
refresh: null,
|
|
@@ -2050,81 +2059,81 @@ const Zo = /* @__PURE__ */ ne(Vn, [["__scopeId", "data-v-7fd39e51"]]), Kn = (e)
|
|
|
2050
2059
|
pullRefreshContainer: null
|
|
2051
2060
|
},
|
|
2052
2061
|
setup(e) {
|
|
2053
|
-
const t = e, n = 0.7, o = "#2EC1CC", l =
|
|
2062
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = g(-999), s = g(1), a = g(0), r = g(0.3), u = g(!1), f = g(0), d = g(0), c = g(0), M = g(0), v = g(0), i = g(), y = L(() => t.scrollTop), T = L(() => ({
|
|
2054
2063
|
transition: `${M.value}ms`,
|
|
2055
2064
|
transform: `translate3d(0,${l.value}px, 0) scale(${s.value})`
|
|
2056
|
-
})), N =
|
|
2065
|
+
})), N = L(() => ({
|
|
2057
2066
|
borderColor: o,
|
|
2058
2067
|
transition: M.value,
|
|
2059
2068
|
transform: `rotate(${100 + a.value}deg)`,
|
|
2060
|
-
opacity:
|
|
2069
|
+
opacity: r.value
|
|
2061
2070
|
}));
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
}),
|
|
2065
|
-
if (
|
|
2071
|
+
G(v, (p) => {
|
|
2072
|
+
p === 0 && (l.value = -50, r.value = 0.3);
|
|
2073
|
+
}), G(d, (p) => {
|
|
2074
|
+
if (v.value === 2)
|
|
2066
2075
|
return;
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2076
|
+
const x = Math.pow(p, n);
|
|
2077
|
+
x === 0 && (l.value = -50), x <= 50 && x > 0 && (l.value = x - 45, a.value = Math.pow(x, 1.5), x > 15 ? u.value = !0 : u.value = !1), x > 50 && (l.value = 5, r.value = 1, v.value);
|
|
2069
2078
|
});
|
|
2070
|
-
const E =
|
|
2071
|
-
E.value =
|
|
2072
|
-
},
|
|
2073
|
-
const
|
|
2074
|
-
E.value =
|
|
2075
|
-
},
|
|
2076
|
-
if (t.refreshOff || !t?.refresh ||
|
|
2079
|
+
const E = g(0), j = (p) => {
|
|
2080
|
+
E.value = p.touches[0].pageY;
|
|
2081
|
+
}, h = (p) => {
|
|
2082
|
+
const x = p.touches[0].pageY - E.value;
|
|
2083
|
+
E.value = p.touches[0].pageY, !t.refreshOff && (!t?.refresh || v.value !== 2 && y.value === 0 && (f.value === 0 && (f.value = p.touches[0].pageY), c.value = 0, w.value.style.transition = `${c.value}ms`, M.value = 0, d.value = p.touches[0].pageY - f.value, w.value.style.transform = `translate3d(0, ${Math.pow(d.value, n)}px, 0)`, x > 0 && p.preventDefault()));
|
|
2084
|
+
}, m = () => {
|
|
2085
|
+
if (t.refreshOff || !t?.refresh || v.value === 2)
|
|
2077
2086
|
return;
|
|
2078
|
-
|
|
2079
|
-
const
|
|
2080
|
-
w.value.style.transition = `${c.value}ms`,
|
|
2081
|
-
|
|
2087
|
+
f.value = 0, c.value = 300;
|
|
2088
|
+
const p = Math.pow(d.value, n);
|
|
2089
|
+
w.value.style.transition = `${c.value}ms`, p > 50 ? (v.value = 2, d.value = Math.pow(50, 1 / n), w.value.style.transform = `translate3d(0, ${Math.pow(d.value, n)}px, 0)`, M.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
2090
|
+
i.value = "\u5237\u65B0\u6210\u529F";
|
|
2082
2091
|
}).catch(() => {
|
|
2083
|
-
|
|
2092
|
+
i.value = "\u5237\u65B0\u5931\u8D25";
|
|
2084
2093
|
}).finally(() => {
|
|
2085
2094
|
setTimeout(() => {
|
|
2086
|
-
|
|
2087
|
-
|
|
2095
|
+
v.value = 0, d.value = 0, w.value.style.transform = `translate3d(0, ${Math.pow(
|
|
2096
|
+
d.value,
|
|
2088
2097
|
n
|
|
2089
2098
|
)}px, 0)`, setTimeout(() => {
|
|
2090
|
-
|
|
2099
|
+
i.value = void 0;
|
|
2091
2100
|
}, M.value);
|
|
2092
2101
|
}, 600);
|
|
2093
|
-
})) : (
|
|
2094
|
-
}, w =
|
|
2095
|
-
return
|
|
2102
|
+
})) : (d.value = 0, w.value.style.transform = `translate3d(0, ${Math.pow(d.value, n)}px, 0)`);
|
|
2103
|
+
}, w = g(null);
|
|
2104
|
+
return fe(() => {
|
|
2096
2105
|
t?.refreshOff || (w.value = document.querySelector(
|
|
2097
2106
|
t.pullRefreshContainer
|
|
2098
|
-
), w.value?.addEventListener("touchstart",
|
|
2099
|
-
}), (
|
|
2107
|
+
), w.value?.addEventListener("touchstart", j), w.value?.addEventListener("touchmove", h), w.value?.addEventListener("touchend", m));
|
|
2108
|
+
}), (p, x) => (R(), H("div", Jn, [
|
|
2100
2109
|
U("div", {
|
|
2101
2110
|
class: "pull-refresh-box",
|
|
2102
|
-
style:
|
|
2111
|
+
style: q(C(T))
|
|
2103
2112
|
}, [
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
U("div",
|
|
2113
|
+
i.value ? (R(), H("div", ao, Fe(i.value), 1)) : (R(), H("div", eo, [
|
|
2114
|
+
v.value == 2 ? (R(), H("div", to, [
|
|
2115
|
+
U("div", no, [
|
|
2107
2116
|
U("div", {
|
|
2108
2117
|
class: "left-circle",
|
|
2109
|
-
style:
|
|
2118
|
+
style: q({ backgroundColor: o })
|
|
2110
2119
|
}, null, 4)
|
|
2111
2120
|
]),
|
|
2112
|
-
U("div",
|
|
2121
|
+
U("div", oo, [
|
|
2113
2122
|
U("div", {
|
|
2114
2123
|
class: "right-circle",
|
|
2115
|
-
style:
|
|
2124
|
+
style: q({ backgroundColor: o })
|
|
2116
2125
|
}, null, 4)
|
|
2117
2126
|
]),
|
|
2118
|
-
|
|
2127
|
+
lo
|
|
2119
2128
|
])) : (R(), H("div", {
|
|
2120
2129
|
key: 1,
|
|
2121
2130
|
class: "pull-circle-line",
|
|
2122
|
-
style:
|
|
2131
|
+
style: q(C(N))
|
|
2123
2132
|
}, [
|
|
2124
|
-
U("div",
|
|
2133
|
+
U("div", so, [
|
|
2125
2134
|
U("div", {
|
|
2126
|
-
class:
|
|
2127
|
-
style:
|
|
2135
|
+
class: ae(["arrows", { opacity: u.value }]),
|
|
2136
|
+
style: q({ borderBottomColor: o })
|
|
2128
2137
|
}, null, 6)
|
|
2129
2138
|
])
|
|
2130
2139
|
], 4))
|
|
@@ -2133,10 +2142,10 @@ const Zo = /* @__PURE__ */ ne(Vn, [["__scopeId", "data-v-7fd39e51"]]), Kn = (e)
|
|
|
2133
2142
|
]));
|
|
2134
2143
|
}
|
|
2135
2144
|
});
|
|
2136
|
-
const
|
|
2145
|
+
const uo = /* @__PURE__ */ le(io, [["__scopeId", "data-v-df5da876"]]), ro = ["data-key"], co = {
|
|
2137
2146
|
inheritAttrs: !1
|
|
2138
|
-
},
|
|
2139
|
-
...
|
|
2147
|
+
}, fo = /* @__PURE__ */ J({
|
|
2148
|
+
...co,
|
|
2140
2149
|
__name: "VirtualList",
|
|
2141
2150
|
props: {
|
|
2142
2151
|
data: null,
|
|
@@ -2148,8 +2157,8 @@ const ao = /* @__PURE__ */ ne(so, [["__scopeId", "data-v-df5da876"]]), io = ["da
|
|
|
2148
2157
|
},
|
|
2149
2158
|
emits: ["scrollEnd"],
|
|
2150
2159
|
setup(e, { expose: t, emit: n }) {
|
|
2151
|
-
const o = e, l =
|
|
2152
|
-
itemHeight: (
|
|
2160
|
+
const o = e, l = cn(Pt(o, "data"), {
|
|
2161
|
+
itemHeight: (v) => o.itemHeight(o.data[v]),
|
|
2153
2162
|
overscan: o.overscan,
|
|
2154
2163
|
scrollEndHook: () => {
|
|
2155
2164
|
n("scrollEnd");
|
|
@@ -2157,49 +2166,49 @@ const ao = /* @__PURE__ */ ne(so, [["__scopeId", "data-v-df5da876"]]), io = ["da
|
|
|
2157
2166
|
}), {
|
|
2158
2167
|
list: s,
|
|
2159
2168
|
containerProps: a,
|
|
2160
|
-
wrapperProps:
|
|
2161
|
-
innerProps:
|
|
2162
|
-
getItemHeightData:
|
|
2163
|
-
scrollTop:
|
|
2169
|
+
wrapperProps: r,
|
|
2170
|
+
innerProps: u,
|
|
2171
|
+
getItemHeightData: f,
|
|
2172
|
+
scrollTop: d
|
|
2164
2173
|
} = l;
|
|
2165
2174
|
t({
|
|
2166
2175
|
vListReturn: l
|
|
2167
2176
|
});
|
|
2168
2177
|
const c = "virtualListWrapper" + new Date().getTime();
|
|
2169
|
-
function M(
|
|
2170
|
-
return o.getItemKey ? o.getItemKey(
|
|
2178
|
+
function M(v, i) {
|
|
2179
|
+
return o.getItemKey ? o.getItemKey(v, i) : `${i}`;
|
|
2171
2180
|
}
|
|
2172
|
-
return (
|
|
2173
|
-
|
|
2181
|
+
return (v, i) => (R(), H(Be, null, [
|
|
2182
|
+
me(uo, {
|
|
2174
2183
|
refresh: e.refresh,
|
|
2175
2184
|
refreshOff: e.refreshOff,
|
|
2176
|
-
scrollTop:
|
|
2185
|
+
scrollTop: C(d),
|
|
2177
2186
|
pullRefreshContainer: "#" + c
|
|
2178
2187
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2179
2188
|
U("div", {
|
|
2180
2189
|
class: "virtualListWrapper",
|
|
2181
2190
|
id: c
|
|
2182
2191
|
}, [
|
|
2183
|
-
U("div",
|
|
2184
|
-
onScrollPassive:
|
|
2185
|
-
ref:
|
|
2192
|
+
U("div", ye({
|
|
2193
|
+
onScrollPassive: i[0] || (i[0] = (...y) => C(a).onScroll && C(a).onScroll(...y)),
|
|
2194
|
+
ref: C(a).ref,
|
|
2186
2195
|
class: "virtualList"
|
|
2187
|
-
},
|
|
2188
|
-
U("div",
|
|
2189
|
-
U("div",
|
|
2190
|
-
(R(!0), H(
|
|
2191
|
-
key: M(
|
|
2192
|
-
"data-key": M(
|
|
2193
|
-
style:
|
|
2194
|
-
height: `${
|
|
2196
|
+
}, v.$attrs), [
|
|
2197
|
+
U("div", Qe(Ye(C(r))), [
|
|
2198
|
+
U("div", Qe(Ye(C(u))), [
|
|
2199
|
+
(R(!0), H(Be, null, Ft(C(s), ({ data: y, index: T }) => (R(), H("div", {
|
|
2200
|
+
key: M(y, T),
|
|
2201
|
+
"data-key": M(y, T),
|
|
2202
|
+
style: q({
|
|
2203
|
+
height: `${C(f)(T).height}px`,
|
|
2195
2204
|
display: "flex"
|
|
2196
2205
|
})
|
|
2197
2206
|
}, [
|
|
2198
|
-
|
|
2199
|
-
data:
|
|
2200
|
-
index:
|
|
2207
|
+
he(v.$slots, "default", {
|
|
2208
|
+
data: y,
|
|
2209
|
+
index: T
|
|
2201
2210
|
}, void 0, !0)
|
|
2202
|
-
], 12,
|
|
2211
|
+
], 12, ro))), 128))
|
|
2203
2212
|
], 16)
|
|
2204
2213
|
], 16)
|
|
2205
2214
|
], 16)
|
|
@@ -2207,7 +2216,7 @@ const ao = /* @__PURE__ */ ne(so, [["__scopeId", "data-v-df5da876"]]), io = ["da
|
|
|
2207
2216
|
], 64));
|
|
2208
2217
|
}
|
|
2209
2218
|
});
|
|
2210
|
-
const
|
|
2219
|
+
const Go = /* @__PURE__ */ le(fo, [["__scopeId", "data-v-dfe60586"]]), at = (e) => (Le("data-v-33519afd"), e = e(), je(), e), vo = { style: { position: "absolute" } }, Mo = /* @__PURE__ */ at(() => /* @__PURE__ */ U("div", { class: "wrapper" }, null, -1)), go = ["width", "height"], ho = /* @__PURE__ */ at(() => /* @__PURE__ */ U("title", null, "logo", -1)), mo = /* @__PURE__ */ at(() => /* @__PURE__ */ U("g", {
|
|
2211
2220
|
id: "group-1",
|
|
2212
2221
|
stroke: "none",
|
|
2213
2222
|
"stroke-width": "1",
|
|
@@ -2219,10 +2228,10 @@ const Vo = /* @__PURE__ */ ne(ro, [["__scopeId", "data-v-dfe60586"]]), lt = (e)
|
|
|
2219
2228
|
id: "path-1",
|
|
2220
2229
|
fill: "#FFF"
|
|
2221
2230
|
})
|
|
2222
|
-
], -1)),
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
],
|
|
2231
|
+
], -1)), yo = [
|
|
2232
|
+
ho,
|
|
2233
|
+
mo
|
|
2234
|
+
], po = /* @__PURE__ */ J({
|
|
2226
2235
|
__name: "Loading",
|
|
2227
2236
|
props: {
|
|
2228
2237
|
width: { default: "90" },
|
|
@@ -2231,12 +2240,12 @@ const Vo = /* @__PURE__ */ ne(ro, [["__scopeId", "data-v-dfe60586"]]), lt = (e)
|
|
|
2231
2240
|
},
|
|
2232
2241
|
setup(e) {
|
|
2233
2242
|
const t = e;
|
|
2234
|
-
|
|
2243
|
+
Pe((o) => ({
|
|
2235
2244
|
"312487ac": n
|
|
2236
2245
|
}));
|
|
2237
2246
|
const n = `${t.duration}ms`;
|
|
2238
|
-
return (o, l) => (R(), H("div",
|
|
2239
|
-
|
|
2247
|
+
return (o, l) => (R(), H("div", vo, [
|
|
2248
|
+
Mo,
|
|
2240
2249
|
(R(), H("svg", {
|
|
2241
2250
|
style: { position: "relative" },
|
|
2242
2251
|
width: e.width,
|
|
@@ -2244,25 +2253,25 @@ const Vo = /* @__PURE__ */ ne(ro, [["__scopeId", "data-v-dfe60586"]]), lt = (e)
|
|
|
2244
2253
|
viewBox: "0 0 260 260",
|
|
2245
2254
|
version: "1.1",
|
|
2246
2255
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2247
|
-
},
|
|
2256
|
+
}, yo, 8, go))
|
|
2248
2257
|
]));
|
|
2249
2258
|
}
|
|
2250
2259
|
});
|
|
2251
|
-
const
|
|
2260
|
+
const qo = /* @__PURE__ */ le(po, [["__scopeId", "data-v-33519afd"]]), Do = [
|
|
2252
2261
|
"image/vnd.adobe.photoshop",
|
|
2253
2262
|
"image/x-photoshop",
|
|
2254
2263
|
"image/jp2",
|
|
2255
2264
|
"image/pcx"
|
|
2256
2265
|
];
|
|
2257
|
-
function
|
|
2258
|
-
const n =
|
|
2259
|
-
const
|
|
2260
|
-
return !
|
|
2266
|
+
function Lt(e, t) {
|
|
2267
|
+
const n = g(e?.value), o = L(() => n.value?.startsWith("/_lzc")), l = g(!1), s = L(() => l.value), a = L(() => {
|
|
2268
|
+
const u = t?.value;
|
|
2269
|
+
return !u || u.startsWith("video/") ? !0 : u.startsWith("image/") ? o.value ? !0 : !Do.includes(u) : !1;
|
|
2261
2270
|
});
|
|
2262
|
-
e &&
|
|
2263
|
-
n.value =
|
|
2271
|
+
e && G(e, (u) => {
|
|
2272
|
+
n.value = u, l.value = !1;
|
|
2264
2273
|
});
|
|
2265
|
-
function
|
|
2274
|
+
function r() {
|
|
2266
2275
|
l.value = !0;
|
|
2267
2276
|
}
|
|
2268
2277
|
return {
|
|
@@ -2270,20 +2279,20 @@ function zt(e, t) {
|
|
|
2270
2279
|
isError: l,
|
|
2271
2280
|
hasError: s,
|
|
2272
2281
|
isSupport: a,
|
|
2273
|
-
handleError:
|
|
2282
|
+
handleError: r
|
|
2274
2283
|
};
|
|
2275
2284
|
}
|
|
2276
|
-
function
|
|
2285
|
+
function jt() {
|
|
2277
2286
|
return { vImageCancel: {
|
|
2278
2287
|
beforeUnmount(t) {
|
|
2279
2288
|
!t || (t.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
|
2280
2289
|
}
|
|
2281
2290
|
} };
|
|
2282
2291
|
}
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
],
|
|
2286
|
-
...
|
|
2292
|
+
const To = ["title"], No = { class: "tip" }, wo = /* @__PURE__ */ Wt("\u5F53\u524D\u683C\u5F0F\u4E0D\u652F\u6301"), Io = [
|
|
2293
|
+
wo
|
|
2294
|
+
], Eo = ["src"], Ao = ["src"], zo = ["title"], Lo = { inheritAttrs: !1 }, jo = /* @__PURE__ */ J({
|
|
2295
|
+
...Lo,
|
|
2287
2296
|
__name: "Image",
|
|
2288
2297
|
props: {
|
|
2289
2298
|
src: null,
|
|
@@ -2296,84 +2305,84 @@ const po = ["title"], Do = { class: "tip" }, To = /* @__PURE__ */ Pt("\u5F53\u52
|
|
|
2296
2305
|
},
|
|
2297
2306
|
emits: ["load", "noSupport", "loadError"],
|
|
2298
2307
|
setup(e, { emit: t }) {
|
|
2299
|
-
const n = e, o =
|
|
2300
|
-
component:
|
|
2308
|
+
const n = e, o = g(), l = g(), s = g(!1), a = g(!1), r = g(!1), { src: u, mime: f } = pt(n), { imgSrc: d, isSupport: c, hasError: M, handleError: v } = Lt(u, f), { vImageCancel: i } = jt(), { LoadingComp: y } = Et({
|
|
2309
|
+
component: Dn,
|
|
2301
2310
|
delay: 300
|
|
2302
|
-
}),
|
|
2311
|
+
}), T = Zt(() => r.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !r.value);
|
|
2303
2312
|
function N() {
|
|
2304
2313
|
a.value = !0;
|
|
2305
2314
|
}
|
|
2306
2315
|
function E() {
|
|
2307
|
-
a.value && (
|
|
2316
|
+
a.value && (r.value = !0);
|
|
2308
2317
|
}
|
|
2309
|
-
async function
|
|
2310
|
-
N(),
|
|
2318
|
+
async function j() {
|
|
2319
|
+
N(), T.value ? (o.value?.addEventListener("animationend", h), o.value?.classList.add("showing"), await st(10)) : o.value && t("load", o.value), o.value?.classList.remove("src-class");
|
|
2311
2320
|
}
|
|
2312
|
-
function
|
|
2313
|
-
o.value?.removeEventListener("animationend",
|
|
2321
|
+
function h() {
|
|
2322
|
+
o.value?.removeEventListener("animationend", h), o.value?.classList.remove("showing"), o.value && t("load", o.value), E();
|
|
2314
2323
|
}
|
|
2315
|
-
async function
|
|
2316
|
-
|
|
2324
|
+
async function m(x) {
|
|
2325
|
+
x ? j() : l.value && t("load", l.value), s.value = !0;
|
|
2317
2326
|
}
|
|
2318
|
-
function w(
|
|
2319
|
-
|
|
2327
|
+
function w(x) {
|
|
2328
|
+
x ? (v(), t("loadError")) : N(), s.value = !0;
|
|
2320
2329
|
}
|
|
2321
|
-
function
|
|
2330
|
+
function p() {
|
|
2322
2331
|
t("noSupport");
|
|
2323
2332
|
}
|
|
2324
|
-
return (
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
title:
|
|
2333
|
+
return (x, Y) => (R(), H(Be, null, [
|
|
2334
|
+
C(c) && !s.value ? (R(), ze(C(y), { key: 0 })) : de("", !0),
|
|
2335
|
+
C(c) ? C(M) ? (R(), H("div", ye({ key: 3 }, x.$attrs, {
|
|
2336
|
+
title: C(d),
|
|
2328
2337
|
class: "tip-wrap"
|
|
2329
2338
|
}), [
|
|
2330
|
-
|
|
2339
|
+
me(Ae, {
|
|
2331
2340
|
class: "bad-image",
|
|
2332
2341
|
name: e.badImageIconName
|
|
2333
2342
|
}, null, 8, ["name"])
|
|
2334
|
-
], 16,
|
|
2343
|
+
], 16, zo)) : he(x.$slots, "default", {
|
|
2335
2344
|
key: 2,
|
|
2336
|
-
src:
|
|
2337
|
-
onLoad:
|
|
2345
|
+
src: C(d),
|
|
2346
|
+
onLoad: m,
|
|
2338
2347
|
onError: w,
|
|
2339
|
-
vImageCancel:
|
|
2348
|
+
vImageCancel: C(i)
|
|
2340
2349
|
}, () => [
|
|
2341
|
-
|
|
2350
|
+
C(T) ? ce((R(), H("img", ye({ key: 0 }, x.$attrs, {
|
|
2342
2351
|
ref_key: "thumbnailRef",
|
|
2343
2352
|
ref: l,
|
|
2344
|
-
onLoad: Y[0] || (Y[0] = (
|
|
2345
|
-
onError: Y[1] || (Y[1] = (
|
|
2353
|
+
onLoad: Y[0] || (Y[0] = (Z) => m()),
|
|
2354
|
+
onError: Y[1] || (Y[1] = (Z) => w()),
|
|
2346
2355
|
src: e.thumbnail
|
|
2347
|
-
}), null, 16,
|
|
2348
|
-
[
|
|
2349
|
-
]) :
|
|
2350
|
-
e.isShowSrc || a.value ?
|
|
2356
|
+
}), null, 16, Eo)), [
|
|
2357
|
+
[C(i)]
|
|
2358
|
+
]) : de("", !0),
|
|
2359
|
+
e.isShowSrc || a.value ? ce((R(), H("img", ye({ key: 1 }, x.$attrs, {
|
|
2351
2360
|
ref_key: "srcRef",
|
|
2352
2361
|
ref: o,
|
|
2353
2362
|
class: "src-class",
|
|
2354
|
-
onLoad: Y[2] || (Y[2] = (
|
|
2355
|
-
onError: Y[3] || (Y[3] = (
|
|
2356
|
-
src:
|
|
2357
|
-
}), null, 16,
|
|
2358
|
-
[
|
|
2359
|
-
[
|
|
2360
|
-
]) :
|
|
2361
|
-
], !0) : (R(), H("div",
|
|
2362
|
-
title:
|
|
2363
|
+
onLoad: Y[2] || (Y[2] = (Z) => m(!0)),
|
|
2364
|
+
onError: Y[3] || (Y[3] = (Z) => w(!0)),
|
|
2365
|
+
src: C(d)
|
|
2366
|
+
}), null, 16, Ao)), [
|
|
2367
|
+
[C(i)],
|
|
2368
|
+
[Ce, a.value]
|
|
2369
|
+
]) : de("", !0)
|
|
2370
|
+
], !0) : (R(), H("div", ye({ key: 1 }, x.$attrs, {
|
|
2371
|
+
title: C(d),
|
|
2363
2372
|
class: "tip-wrap"
|
|
2364
2373
|
}), [
|
|
2365
|
-
|
|
2374
|
+
me(Ae, {
|
|
2366
2375
|
class: "no-support-icon",
|
|
2367
2376
|
name: e.noSupportIconName
|
|
2368
2377
|
}, null, 8, ["name"]),
|
|
2369
|
-
|
|
2370
|
-
[
|
|
2378
|
+
ce((R(), H("span", No, Io)), [
|
|
2379
|
+
[C(Dt), p]
|
|
2371
2380
|
])
|
|
2372
|
-
], 16,
|
|
2381
|
+
], 16, To))
|
|
2373
2382
|
], 64));
|
|
2374
2383
|
}
|
|
2375
2384
|
});
|
|
2376
|
-
const
|
|
2385
|
+
const Jo = /* @__PURE__ */ le(jo, [["__scopeId", "data-v-bfec1a6b"]]), Co = ["title"], xo = ["src"], So = ["title"], Oo = /* @__PURE__ */ J({
|
|
2377
2386
|
__name: "Thumbnail",
|
|
2378
2387
|
props: {
|
|
2379
2388
|
src: null,
|
|
@@ -2381,89 +2390,89 @@ const Go = /* @__PURE__ */ ne(zo, [["__scopeId", "data-v-bfec1a6b"]]), Lo = ["ti
|
|
|
2381
2390
|
},
|
|
2382
2391
|
emits: ["noSupport"],
|
|
2383
2392
|
setup(e, { emit: t }) {
|
|
2384
|
-
const n = e, o =
|
|
2393
|
+
const n = e, o = g(!1), { src: l, mime: s } = pt(n), { imgSrc: a, hasError: r, isSupport: u, handleError: f } = Lt(l, s), { vImageCancel: d } = jt();
|
|
2385
2394
|
function c() {
|
|
2386
2395
|
t("noSupport");
|
|
2387
2396
|
}
|
|
2388
|
-
return (M,
|
|
2397
|
+
return (M, v) => C(u) ? C(r) ? he(M.$slots, "imageError", { key: 2 }, () => [
|
|
2389
2398
|
U("div", {
|
|
2390
|
-
title:
|
|
2399
|
+
title: C(a),
|
|
2391
2400
|
class: "icon-wrap"
|
|
2392
2401
|
}, [
|
|
2393
|
-
|
|
2402
|
+
me(Ae, {
|
|
2394
2403
|
class: "icon",
|
|
2395
2404
|
name: "\u56FE\u7247\u635F\u574F"
|
|
2396
2405
|
})
|
|
2397
|
-
], 8,
|
|
2398
|
-
], !0) :
|
|
2406
|
+
], 8, So)
|
|
2407
|
+
], !0) : ce((R(), H("img", {
|
|
2399
2408
|
key: 1,
|
|
2400
2409
|
fetchpriority: "high",
|
|
2401
|
-
onLoad:
|
|
2402
|
-
onError:
|
|
2403
|
-
src:
|
|
2404
|
-
}, null, 40,
|
|
2405
|
-
[
|
|
2406
|
-
[
|
|
2407
|
-
]) :
|
|
2410
|
+
onLoad: v[0] || (v[0] = (i) => o.value = !0),
|
|
2411
|
+
onError: v[1] || (v[1] = (...i) => C(f) && C(f)(...i)),
|
|
2412
|
+
src: C(a)
|
|
2413
|
+
}, null, 40, xo)), [
|
|
2414
|
+
[C(d)],
|
|
2415
|
+
[Ce, o.value]
|
|
2416
|
+
]) : he(M.$slots, "noSupport", { key: 0 }, () => [
|
|
2408
2417
|
U("div", {
|
|
2409
|
-
title:
|
|
2418
|
+
title: C(a),
|
|
2410
2419
|
class: "icon-wrap"
|
|
2411
2420
|
}, [
|
|
2412
|
-
|
|
2421
|
+
ce(me(Ae, {
|
|
2413
2422
|
class: "icon",
|
|
2414
2423
|
name: "\u672A\u77E5\u7C7B\u578B"
|
|
2415
2424
|
}, null, 512), [
|
|
2416
|
-
[
|
|
2425
|
+
[C(Dt), c]
|
|
2417
2426
|
])
|
|
2418
|
-
], 8,
|
|
2427
|
+
], 8, Co)
|
|
2419
2428
|
], !0);
|
|
2420
2429
|
}
|
|
2421
2430
|
});
|
|
2422
|
-
const
|
|
2431
|
+
const el = /* @__PURE__ */ le(Oo, [["__scopeId", "data-v-ab86da1e"]]);
|
|
2423
2432
|
export {
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2433
|
+
Dn as DefaultLoading,
|
|
2434
|
+
Jo as Image,
|
|
2435
|
+
qo as Loading,
|
|
2436
|
+
On as LoadingToast,
|
|
2437
|
+
Ho as PageLoading,
|
|
2438
|
+
uo as PullRefresh,
|
|
2439
|
+
Ko as ScrollBar,
|
|
2440
|
+
Ae as SvgIcon,
|
|
2441
|
+
el as Thumbnail,
|
|
2442
|
+
Vo as ToastCreator,
|
|
2443
|
+
Go as VirtualList,
|
|
2444
|
+
Je as allSelectedKey,
|
|
2445
|
+
vn as closeDialogKey,
|
|
2446
|
+
Ro as dialogController,
|
|
2447
|
+
ke as getTransform,
|
|
2448
|
+
ot as isAllSelectedKey,
|
|
2449
|
+
qe as isSelectedKey,
|
|
2450
|
+
wt as itemKeyKey,
|
|
2451
|
+
Hn as once,
|
|
2452
|
+
tt as selectAllKey,
|
|
2453
|
+
et as selectKey,
|
|
2454
|
+
lt as selectedCountKey,
|
|
2455
|
+
Ke as toggleAllKey,
|
|
2456
|
+
Ge as toggleKey,
|
|
2457
|
+
Ne as unselectAllKey,
|
|
2458
|
+
nt as unselectKey,
|
|
2459
|
+
Zo as useBackPress,
|
|
2460
|
+
Po as useDelayAsync,
|
|
2461
|
+
$o as useDelayLoad,
|
|
2453
2462
|
Et as useDelayLoadComp,
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2463
|
+
Xo as useDownDrag,
|
|
2464
|
+
It as useDragSelect,
|
|
2465
|
+
Uo as useDragSelectByMobile,
|
|
2466
|
+
Bo as useDragSelectByPc,
|
|
2467
|
+
$n as useRouterActivated,
|
|
2468
|
+
Wo as useScaleImageByMobile,
|
|
2469
|
+
Fo as useScaleImageByPc,
|
|
2470
|
+
Qo as useSelectable,
|
|
2471
|
+
Yo as useSelectableByBase,
|
|
2472
|
+
ko as useSelectableInjectors,
|
|
2473
|
+
cn as useVirtualList,
|
|
2474
|
+
_o as vDebounceClick,
|
|
2475
|
+
Dt as vEnter,
|
|
2476
|
+
Xt as vSingleClick
|
|
2468
2477
|
};
|
|
2469
2478
|
//# sourceMappingURL=index.es.js.map
|