@lazycatcloud/lzc-toolkit 0.0.157 → 0.0.159
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 +316 -315
- package/dist/index.umd.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/dialog/Dialog.vue.d.ts +9 -1
- package/dist/types/useDelayAsync/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8,8 +8,8 @@ const kt = {
|
|
|
8
8
|
function s(a) {
|
|
9
9
|
if (a.button != 0 || n === void 0)
|
|
10
10
|
return;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const f = a.clientX, u = a.clientY, d = Math.abs(f - n), v = Math.abs(u - o);
|
|
12
|
+
d > 5 || v > 5 || t.value && t.value(a);
|
|
13
13
|
}
|
|
14
14
|
e.__mouse_down__ = l, e.__mouse_up__ = s, e.addEventListener("mousedown", l), e.addEventListener("mouseup", s);
|
|
15
15
|
},
|
|
@@ -44,15 +44,15 @@ function Yt(e, t) {
|
|
|
44
44
|
s.value = !0, l();
|
|
45
45
|
};
|
|
46
46
|
G(e, a, { flush: "sync" });
|
|
47
|
-
const
|
|
47
|
+
const f = typeof t == "function" ? t : t.get, u = typeof t == "function" ? void 0 : t.set, d = Lt((v, i) => (o = v, l = i, {
|
|
48
48
|
get() {
|
|
49
|
-
return s.value && (n =
|
|
49
|
+
return s.value && (n = f(), s.value = !1), o(), n;
|
|
50
50
|
},
|
|
51
51
|
set(g) {
|
|
52
|
-
|
|
52
|
+
u?.(g);
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
|
-
return Object.isExtensible(
|
|
55
|
+
return Object.isExtensible(d) && (d.trigger = a), d;
|
|
56
56
|
}
|
|
57
57
|
function $e(e) {
|
|
58
58
|
return At() ? (zt(e), !0) : !1;
|
|
@@ -74,33 +74,33 @@ function gt(e, t) {
|
|
|
74
74
|
}
|
|
75
75
|
function Rt(e, t = {}) {
|
|
76
76
|
let n, o, l = re;
|
|
77
|
-
const s = (
|
|
78
|
-
clearTimeout(
|
|
77
|
+
const s = (f) => {
|
|
78
|
+
clearTimeout(f), l(), l = re;
|
|
79
79
|
};
|
|
80
|
-
return (
|
|
81
|
-
const
|
|
82
|
-
return n && s(n),
|
|
83
|
-
l = t.rejectOnCancel ?
|
|
84
|
-
n && s(n), o = null, v(
|
|
85
|
-
},
|
|
86
|
-
o && s(o), o = null, v(
|
|
87
|
-
},
|
|
80
|
+
return (f) => {
|
|
81
|
+
const u = J(e), d = J(t.maxWait);
|
|
82
|
+
return n && s(n), u <= 0 || d !== void 0 && d <= 0 ? (o && (s(o), o = null), Promise.resolve(f())) : new Promise((v, i) => {
|
|
83
|
+
l = t.rejectOnCancel ? i : v, d && !o && (o = setTimeout(() => {
|
|
84
|
+
n && s(n), o = null, v(f());
|
|
85
|
+
}, d)), n = setTimeout(() => {
|
|
86
|
+
o && s(o), o = null, v(f());
|
|
87
|
+
}, u);
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
function $t(...e) {
|
|
92
|
-
let t = 0, n, o = !0, l = re, s, a,
|
|
93
|
-
!jt(e[0]) && typeof e[0] == "object" ? { delay: a, trailing:
|
|
92
|
+
let t = 0, n, o = !0, l = re, s, a, f, u, d;
|
|
93
|
+
!jt(e[0]) && typeof e[0] == "object" ? { delay: a, trailing: f = !0, leading: u = !0, rejectOnCancel: d = !1 } = e[0] : [a, f = !0, u = !0, d = !1] = e;
|
|
94
94
|
const v = () => {
|
|
95
95
|
n && (clearTimeout(n), n = void 0, l(), l = re);
|
|
96
96
|
};
|
|
97
97
|
return (g) => {
|
|
98
98
|
const M = J(a), r = Date.now() - t, T = () => s = g();
|
|
99
|
-
return v(), M <= 0 ? (t = Date.now(), T()) : (r > M && (
|
|
100
|
-
l =
|
|
99
|
+
return v(), M <= 0 ? (t = Date.now(), T()) : (r > M && (u || !o) ? (t = Date.now(), T()) : f && (s = new Promise((h, c) => {
|
|
100
|
+
l = d ? c : h, n = setTimeout(() => {
|
|
101
101
|
t = Date.now(), o = !0, h(T()), v();
|
|
102
102
|
}, Math.max(0, M - r));
|
|
103
|
-
})), !
|
|
103
|
+
})), !u && !n && (n = setTimeout(() => o = !0, M)), o = !1, s);
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
function Pt(e) {
|
|
@@ -134,21 +134,21 @@ function we(...e) {
|
|
|
134
134
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
135
135
|
const s = [], a = () => {
|
|
136
136
|
s.forEach((v) => v()), s.length = 0;
|
|
137
|
-
},
|
|
137
|
+
}, f = (v, i, g, M) => (v.addEventListener(i, g, M), () => v.removeEventListener(i, g, M)), u = G(
|
|
138
138
|
() => [se(t), J(l)],
|
|
139
|
-
([v,
|
|
139
|
+
([v, i]) => {
|
|
140
140
|
if (a(), !v)
|
|
141
141
|
return;
|
|
142
|
-
const g = Ut(
|
|
142
|
+
const g = Ut(i) ? { ...i } : i;
|
|
143
143
|
s.push(
|
|
144
|
-
...n.flatMap((M) => o.map((r) =>
|
|
144
|
+
...n.flatMap((M) => o.map((r) => f(v, M, r, g)))
|
|
145
145
|
);
|
|
146
146
|
},
|
|
147
147
|
{ immediate: !0, flush: "post" }
|
|
148
|
-
),
|
|
149
|
-
|
|
148
|
+
), d = () => {
|
|
149
|
+
u(), a();
|
|
150
150
|
};
|
|
151
|
-
return $e(
|
|
151
|
+
return $e(d), d;
|
|
152
152
|
}
|
|
153
153
|
function Ht() {
|
|
154
154
|
const e = m(!1), t = Qe();
|
|
@@ -170,20 +170,20 @@ function Xt(e) {
|
|
|
170
170
|
function ht(e, t, n = {}) {
|
|
171
171
|
const { window: o = Le, ...l } = n;
|
|
172
172
|
let s;
|
|
173
|
-
const a = Wt(() => o && "ResizeObserver" in o),
|
|
173
|
+
const a = Wt(() => o && "ResizeObserver" in o), f = () => {
|
|
174
174
|
s && (s.disconnect(), s = void 0);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
(
|
|
178
|
-
if (
|
|
175
|
+
}, u = N(() => Array.isArray(e) ? e.map((i) => se(i)) : [se(e)]), d = G(
|
|
176
|
+
u,
|
|
177
|
+
(i) => {
|
|
178
|
+
if (f(), a.value && o) {
|
|
179
179
|
s = new ResizeObserver(t);
|
|
180
|
-
for (const g of
|
|
180
|
+
for (const g of i)
|
|
181
181
|
g && s.observe(g, l);
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
{ immediate: !0, flush: "post" }
|
|
185
185
|
), v = () => {
|
|
186
|
-
|
|
186
|
+
f(), d();
|
|
187
187
|
};
|
|
188
188
|
return $e(v), {
|
|
189
189
|
isSupported: a,
|
|
@@ -192,42 +192,42 @@ function ht(e, t, n = {}) {
|
|
|
192
192
|
}
|
|
193
193
|
function Zt(e, t = { width: 0, height: 0 }, n = {}) {
|
|
194
194
|
const { window: o = Le, box: l = "content-box" } = n, s = N(() => {
|
|
195
|
-
var
|
|
196
|
-
return (g = (
|
|
197
|
-
}), a = m(t.width),
|
|
195
|
+
var i, g;
|
|
196
|
+
return (g = (i = se(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : g.includes("svg");
|
|
197
|
+
}), a = m(t.width), f = m(t.height), { stop: u } = ht(
|
|
198
198
|
e,
|
|
199
|
-
([
|
|
200
|
-
const g = l === "border-box" ?
|
|
199
|
+
([i]) => {
|
|
200
|
+
const g = l === "border-box" ? i.borderBoxSize : l === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
201
201
|
if (o && s.value) {
|
|
202
202
|
const M = se(e);
|
|
203
203
|
if (M) {
|
|
204
204
|
const r = o.getComputedStyle(M);
|
|
205
|
-
a.value = Number.parseFloat(r.width),
|
|
205
|
+
a.value = Number.parseFloat(r.width), f.value = Number.parseFloat(r.height);
|
|
206
206
|
}
|
|
207
207
|
} else if (g) {
|
|
208
208
|
const M = Array.isArray(g) ? g : [g];
|
|
209
|
-
a.value = M.reduce((r, { inlineSize: T }) => r + T, 0),
|
|
209
|
+
a.value = M.reduce((r, { inlineSize: T }) => r + T, 0), f.value = M.reduce((r, { blockSize: T }) => r + T, 0);
|
|
210
210
|
} else
|
|
211
|
-
a.value =
|
|
211
|
+
a.value = i.contentRect.width, f.value = i.contentRect.height;
|
|
212
212
|
},
|
|
213
213
|
n
|
|
214
214
|
);
|
|
215
215
|
Pe(() => {
|
|
216
|
-
const
|
|
217
|
-
|
|
216
|
+
const i = se(e);
|
|
217
|
+
i && (a.value = "offsetWidth" in i ? i.offsetWidth : t.width, f.value = "offsetHeight" in i ? i.offsetHeight : t.height);
|
|
218
218
|
});
|
|
219
|
-
const
|
|
219
|
+
const d = G(
|
|
220
220
|
() => se(e),
|
|
221
|
-
(
|
|
222
|
-
a.value =
|
|
221
|
+
(i) => {
|
|
222
|
+
a.value = i ? t.width : 0, f.value = i ? t.height : 0;
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
225
|
function v() {
|
|
226
|
-
|
|
226
|
+
u(), d();
|
|
227
227
|
}
|
|
228
228
|
return {
|
|
229
229
|
width: a,
|
|
230
|
-
height:
|
|
230
|
+
height: f,
|
|
231
231
|
stop: v
|
|
232
232
|
};
|
|
233
233
|
}
|
|
@@ -244,18 +244,18 @@ function Vt(e, t = {}) {
|
|
|
244
244
|
top: 0,
|
|
245
245
|
bottom: 0
|
|
246
246
|
},
|
|
247
|
-
eventListenerOptions:
|
|
247
|
+
eventListenerOptions: f = {
|
|
248
248
|
capture: !1,
|
|
249
249
|
passive: !0
|
|
250
250
|
},
|
|
251
|
-
behavior:
|
|
252
|
-
window:
|
|
251
|
+
behavior: u = "auto",
|
|
252
|
+
window: d = Le,
|
|
253
253
|
onError: v = (p) => {
|
|
254
254
|
console.error(p);
|
|
255
255
|
}
|
|
256
|
-
} = t,
|
|
256
|
+
} = t, i = m(0), g = m(0), M = N({
|
|
257
257
|
get() {
|
|
258
|
-
return
|
|
258
|
+
return i.value;
|
|
259
259
|
},
|
|
260
260
|
set(p) {
|
|
261
261
|
T(p, void 0);
|
|
@@ -270,13 +270,13 @@ function Vt(e, t = {}) {
|
|
|
270
270
|
});
|
|
271
271
|
function T(p, z) {
|
|
272
272
|
var Q, D, w;
|
|
273
|
-
if (!
|
|
273
|
+
if (!d)
|
|
274
274
|
return;
|
|
275
275
|
const A = J(e);
|
|
276
|
-
!A || (w = A instanceof Document ?
|
|
276
|
+
!A || (w = A instanceof Document ? d.document.body : A) == null || w.scrollTo({
|
|
277
277
|
top: (Q = J(z)) != null ? Q : r.value,
|
|
278
278
|
left: (D = J(p)) != null ? D : M.value,
|
|
279
|
-
behavior: J(
|
|
279
|
+
behavior: J(u)
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
const h = m(!1), c = Te({
|
|
@@ -293,19 +293,19 @@ function Vt(e, t = {}) {
|
|
|
293
293
|
!h.value || (h.value = !1, y.left = !1, y.right = !1, y.top = !1, y.bottom = !1, l(p));
|
|
294
294
|
}, W = ze(x, n + o), H = (p) => {
|
|
295
295
|
var z;
|
|
296
|
-
if (!
|
|
296
|
+
if (!d)
|
|
297
297
|
return;
|
|
298
298
|
const Q = ((z = p?.document) == null ? void 0 : z.documentElement) || p?.documentElement || se(p), { display: D, flexDirection: w } = getComputedStyle(Q), A = Q.scrollLeft;
|
|
299
|
-
y.left = A <
|
|
299
|
+
y.left = A < i.value, y.right = A > i.value;
|
|
300
300
|
const k = Math.abs(A) <= (a.left || 0), Y = Math.abs(A) + Q.clientWidth >= Q.scrollWidth - (a.right || 0) - ot;
|
|
301
|
-
D === "flex" && w === "row-reverse" ? (c.left = Y, c.right = k) : (c.left = k, c.right = Y),
|
|
301
|
+
D === "flex" && w === "row-reverse" ? (c.left = Y, c.right = k) : (c.left = k, c.right = Y), i.value = A;
|
|
302
302
|
let C = Q.scrollTop;
|
|
303
|
-
p ===
|
|
303
|
+
p === d.document && !C && (C = d.document.body.scrollTop), y.top = C < g.value, y.bottom = C > g.value;
|
|
304
304
|
const L = Math.abs(C) <= (a.top || 0), E = Math.abs(C) + Q.clientHeight >= Q.scrollHeight - (a.bottom || 0) - ot;
|
|
305
305
|
D === "flex" && w === "column-reverse" ? (c.top = E, c.bottom = L) : (c.top = L, c.bottom = E), g.value = C;
|
|
306
306
|
}, _ = (p) => {
|
|
307
307
|
var z;
|
|
308
|
-
if (!
|
|
308
|
+
if (!d)
|
|
309
309
|
return;
|
|
310
310
|
const Q = (z = p.target.documentElement) != null ? z : p.target;
|
|
311
311
|
H(Q), h.value = !0, W(p), s(p);
|
|
@@ -314,7 +314,7 @@ function Vt(e, t = {}) {
|
|
|
314
314
|
e,
|
|
315
315
|
"scroll",
|
|
316
316
|
n ? ke(_, n, !0, !1) : _,
|
|
317
|
-
|
|
317
|
+
f
|
|
318
318
|
), Pe(() => {
|
|
319
319
|
try {
|
|
320
320
|
const p = J(e);
|
|
@@ -328,7 +328,7 @@ function Vt(e, t = {}) {
|
|
|
328
328
|
e,
|
|
329
329
|
"scrollend",
|
|
330
330
|
x,
|
|
331
|
-
|
|
331
|
+
f
|
|
332
332
|
), {
|
|
333
333
|
x: M,
|
|
334
334
|
y: r,
|
|
@@ -337,7 +337,7 @@ function Vt(e, t = {}) {
|
|
|
337
337
|
directions: y,
|
|
338
338
|
measure() {
|
|
339
339
|
const p = J(e);
|
|
340
|
-
|
|
340
|
+
d && p && H(p);
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
}
|
|
@@ -348,35 +348,35 @@ function Fe(e, t = {}) {
|
|
|
348
348
|
immediate: l = !0,
|
|
349
349
|
manual: s = !1,
|
|
350
350
|
id: a = `vueuse_styletag_${++Kt}`
|
|
351
|
-
} = t,
|
|
352
|
-
let
|
|
351
|
+
} = t, f = m(e);
|
|
352
|
+
let u = () => {
|
|
353
353
|
};
|
|
354
|
-
const
|
|
354
|
+
const d = () => {
|
|
355
355
|
if (!o)
|
|
356
356
|
return;
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
const i = o.getElementById(a) || o.createElement("style");
|
|
358
|
+
i.isConnected || (i.id = a, t.media && (i.media = t.media), o.head.appendChild(i)), !n.value && (u = G(
|
|
359
|
+
f,
|
|
360
360
|
(g) => {
|
|
361
|
-
|
|
361
|
+
i.textContent = g;
|
|
362
362
|
},
|
|
363
363
|
{ immediate: !0 }
|
|
364
364
|
), n.value = !0);
|
|
365
365
|
}, v = () => {
|
|
366
|
-
!o || !n.value || (
|
|
366
|
+
!o || !n.value || (u(), o.head.removeChild(o.getElementById(a)), n.value = !1);
|
|
367
367
|
};
|
|
368
|
-
return l && !s && Pe(
|
|
368
|
+
return l && !s && Pe(d), s || $e(v), {
|
|
369
369
|
id: a,
|
|
370
|
-
css:
|
|
370
|
+
css: f,
|
|
371
371
|
unload: v,
|
|
372
|
-
load:
|
|
372
|
+
load: d,
|
|
373
373
|
isLoaded: rt(n)
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
function Gt(e, t) {
|
|
377
|
-
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = m(null), a = Zt(s),
|
|
378
|
-
let
|
|
379
|
-
const v = ut(e),
|
|
377
|
+
const { scrollEndHook: n, itemHeight: o, overscan: l = 5 } = t, s = m(null), a = Zt(s), f = m(!0), u = ze(H, 100);
|
|
378
|
+
let d;
|
|
379
|
+
const v = ut(e), i = m(0), g = m({ start: 0, end: 10 }), M = m({ start: 0, end: l });
|
|
380
380
|
let r = 0;
|
|
381
381
|
const T = m([]), h = N(() => {
|
|
382
382
|
let { sum: L, height: E } = { sum: 0, height: 0 };
|
|
@@ -386,7 +386,7 @@ function Gt(e, t) {
|
|
|
386
386
|
return T.value.slice(L, E);
|
|
387
387
|
});
|
|
388
388
|
ie(() => {
|
|
389
|
-
}), ct(() => cancelAnimationFrame(
|
|
389
|
+
}), ct(() => cancelAnimationFrame(d)), G(
|
|
390
390
|
v,
|
|
391
391
|
() => {
|
|
392
392
|
(a.width.value || a.height.value) && _();
|
|
@@ -398,22 +398,22 @@ function Gt(e, t) {
|
|
|
398
398
|
(L || E) && _();
|
|
399
399
|
},
|
|
400
400
|
{ deep: !0 }
|
|
401
|
-
), G(
|
|
402
|
-
W(),
|
|
401
|
+
), G(i, () => {
|
|
402
|
+
W(), u();
|
|
403
403
|
});
|
|
404
404
|
function W() {
|
|
405
|
-
|
|
405
|
+
f.value = !1;
|
|
406
406
|
}
|
|
407
407
|
function H() {
|
|
408
|
-
|
|
408
|
+
f.value = !0, n?.();
|
|
409
409
|
}
|
|
410
410
|
function _() {
|
|
411
|
-
cancelAnimationFrame(
|
|
411
|
+
cancelAnimationFrame(d), d = requestAnimationFrame(p);
|
|
412
412
|
}
|
|
413
413
|
function p() {
|
|
414
414
|
if (s.value) {
|
|
415
|
-
|
|
416
|
-
let L = z(
|
|
415
|
+
i.value = s.value.scrollTop;
|
|
416
|
+
let L = z(i.value);
|
|
417
417
|
r = Q(L);
|
|
418
418
|
let E = Math.max(0, L - l), R = Math.min(
|
|
419
419
|
L + r + l,
|
|
@@ -458,7 +458,7 @@ function Gt(e, t) {
|
|
|
458
458
|
style: {
|
|
459
459
|
width: "100%",
|
|
460
460
|
height: `${y.value}px`,
|
|
461
|
-
pointerEvents:
|
|
461
|
+
pointerEvents: f.value ? void 0 : "none"
|
|
462
462
|
}
|
|
463
463
|
})), Y = N(() => ({
|
|
464
464
|
style: {
|
|
@@ -476,8 +476,8 @@ function Gt(e, t) {
|
|
|
476
476
|
totalHeight: y,
|
|
477
477
|
clientHeight: a.height,
|
|
478
478
|
scrollTo: A,
|
|
479
|
-
scrollTop:
|
|
480
|
-
isScrollEnd:
|
|
479
|
+
scrollTop: i,
|
|
480
|
+
isScrollEnd: f,
|
|
481
481
|
containerProps: {
|
|
482
482
|
ref: s,
|
|
483
483
|
onScroll: () => {
|
|
@@ -498,15 +498,15 @@ function wo() {
|
|
|
498
498
|
boolRef: N(() => !1),
|
|
499
499
|
numberRef: N(() => 0),
|
|
500
500
|
arrayRef: N(() => [])
|
|
501
|
-
}, s = te(Ze, l), a = te(Xe, t),
|
|
501
|
+
}, s = te(Ze, l), a = te(Xe, t), f = te(qe, n), u = te(We, e), d = te(He, e), v = te(Ve, e), i = te(Ke, e), g = te(Ge, e), M = te(ye, e), r = te(Je, o);
|
|
502
502
|
return {
|
|
503
503
|
selected: s,
|
|
504
504
|
isSelected: a,
|
|
505
|
-
isAllSelected:
|
|
506
|
-
toggle:
|
|
507
|
-
toggleAll:
|
|
505
|
+
isAllSelected: f,
|
|
506
|
+
toggle: u,
|
|
507
|
+
toggleAll: d,
|
|
508
508
|
select: v,
|
|
509
|
-
selectAll:
|
|
509
|
+
selectAll: i,
|
|
510
510
|
unselect: g,
|
|
511
511
|
unselectAll: M,
|
|
512
512
|
selectedCount: r
|
|
@@ -535,10 +535,10 @@ function No(e, t, n = { deep: !0 }) {
|
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
return c;
|
|
538
|
-
}),
|
|
538
|
+
}), f = N(() => {
|
|
539
539
|
let c = 0;
|
|
540
540
|
return o.value != null ? o.value && (c = s.value.size) : c = l.value.size, c;
|
|
541
|
-
}),
|
|
541
|
+
}), u = N(() => {
|
|
542
542
|
let c;
|
|
543
543
|
if (o.value != null)
|
|
544
544
|
c = o.value;
|
|
@@ -548,13 +548,13 @@ function No(e, t, n = { deep: !0 }) {
|
|
|
548
548
|
}
|
|
549
549
|
return c;
|
|
550
550
|
});
|
|
551
|
-
function
|
|
551
|
+
function d() {
|
|
552
552
|
o.value = !0;
|
|
553
553
|
}
|
|
554
554
|
function v() {
|
|
555
555
|
o.value = !1;
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function i(c) {
|
|
558
558
|
r(() => {
|
|
559
559
|
c.forEach((y) => {
|
|
560
560
|
l.value.add(y[t]);
|
|
@@ -582,20 +582,20 @@ function No(e, t, n = { deep: !0 }) {
|
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
function h() {
|
|
585
|
-
const { value: c } =
|
|
586
|
-
c ? v() :
|
|
585
|
+
const { value: c } = u;
|
|
586
|
+
c ? v() : d();
|
|
587
587
|
}
|
|
588
|
-
return F(He, h), F(We, T), F(Xe, M), F(Ze, a), F(Ve,
|
|
588
|
+
return F(He, h), F(We, T), F(Xe, M), F(Ze, a), F(Ve, i), F(Ke, d), F(Ge, g), F(qe, u), F(ye, v), F(ye, v), F(Je, f), {
|
|
589
589
|
selected: a,
|
|
590
|
-
select:
|
|
591
|
-
selectAll:
|
|
590
|
+
select: i,
|
|
591
|
+
selectAll: d,
|
|
592
592
|
unselect: g,
|
|
593
593
|
unselectAll: v,
|
|
594
594
|
toggle: T,
|
|
595
595
|
toggleAll: h,
|
|
596
596
|
isSelected: M,
|
|
597
|
-
isAllSelected:
|
|
598
|
-
selectedCount:
|
|
597
|
+
isAllSelected: u,
|
|
598
|
+
selectedCount: f
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
function Eo(e) {
|
|
@@ -618,18 +618,18 @@ function Eo(e) {
|
|
|
618
618
|
function a() {
|
|
619
619
|
t.value = !0;
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function f() {
|
|
622
622
|
t.value = !1;
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
624
|
+
function u(r) {
|
|
625
|
+
i(() => {
|
|
626
626
|
r.forEach((T) => {
|
|
627
627
|
n.value.add(T);
|
|
628
628
|
});
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
631
|
+
function d(r) {
|
|
632
|
+
i(() => {
|
|
633
633
|
r.forEach((T) => {
|
|
634
634
|
n.value.delete(T);
|
|
635
635
|
});
|
|
@@ -638,11 +638,11 @@ function Eo(e) {
|
|
|
638
638
|
function v(r) {
|
|
639
639
|
return t.value != null ? t.value : n.value.has(r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function i(r) {
|
|
642
642
|
t.value != null && (t.value ? n.value = new Set(Array.from(e.value)) : n.value = /* @__PURE__ */ new Set()), r(), n.value.size == 0 ? t.value = !1 : n.value.size == e.value.length ? t.value = !0 : t.value = null;
|
|
643
643
|
}
|
|
644
644
|
function g(r) {
|
|
645
|
-
|
|
645
|
+
i(() => {
|
|
646
646
|
r.forEach((T) => {
|
|
647
647
|
v(T) ? n.value.delete(T) : n.value.add(T);
|
|
648
648
|
});
|
|
@@ -650,14 +650,14 @@ function Eo(e) {
|
|
|
650
650
|
}
|
|
651
651
|
function M() {
|
|
652
652
|
const { value: r } = s;
|
|
653
|
-
r ?
|
|
653
|
+
r ? f() : a();
|
|
654
654
|
}
|
|
655
|
-
return F(He, M), F(We, g), F(Xe, v), F(Ze, o), F(Ve,
|
|
655
|
+
return F(He, M), F(We, g), F(Xe, v), F(Ze, o), F(Ve, u), F(Ke, a), F(Ge, d), F(qe, s), F(ye, f), F(ye, f), F(Je, l), {
|
|
656
656
|
selected: o,
|
|
657
|
-
select:
|
|
657
|
+
select: u,
|
|
658
658
|
selectAll: a,
|
|
659
|
-
unselect:
|
|
660
|
-
unselectAll:
|
|
659
|
+
unselect: d,
|
|
660
|
+
unselectAll: f,
|
|
661
661
|
toggle: g,
|
|
662
662
|
toggleAll: M,
|
|
663
663
|
isSelected: v,
|
|
@@ -681,16 +681,16 @@ function mt({
|
|
|
681
681
|
unselect: s = xe("\u53D6\u6D88\u9009\u62E9"),
|
|
682
682
|
unselectAll: a = xe("\u53D6\u6D88\u5168\u9009")
|
|
683
683
|
} = o();
|
|
684
|
-
let
|
|
685
|
-
const
|
|
684
|
+
let f = {};
|
|
685
|
+
const u = N(
|
|
686
686
|
() => ke(t === "colum" ? ce : wt, 50)
|
|
687
|
-
),
|
|
687
|
+
), d = /* @__PURE__ */ new Set(), v = m(!0), i = m(), g = m(!1), M = m({ x: 0, y: 0 }), r = m({ x: 0, y: 0, scrollTop: 0 }), T = new ResizeObserver(
|
|
688
688
|
(j) => h.value = j[0].target.getBoundingClientRect()
|
|
689
689
|
), h = m({}), c = m({
|
|
690
690
|
top: 0,
|
|
691
691
|
height: 0,
|
|
692
692
|
sync(j = !1) {
|
|
693
|
-
c.value.top =
|
|
693
|
+
c.value.top = i.value?.scrollTop || 0, j && (c.value.height = i.value?.scrollHeight || 0);
|
|
694
694
|
}
|
|
695
695
|
}), y = N(() => g.value ? {
|
|
696
696
|
left: Math.min(M.value.x, r.value.x) - h.value.left,
|
|
@@ -706,7 +706,7 @@ function mt({
|
|
|
706
706
|
Math.min(w, Q),
|
|
707
707
|
-Q
|
|
708
708
|
), w !== 0) {
|
|
709
|
-
const S =
|
|
709
|
+
const S = i.value;
|
|
710
710
|
if (!S || !g.value)
|
|
711
711
|
return;
|
|
712
712
|
const Z = c.value.height - h.value.height;
|
|
@@ -715,7 +715,7 @@ function mt({
|
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
function k(j) {
|
|
718
|
-
if (
|
|
718
|
+
if (i.value) {
|
|
719
719
|
const Z = h.value, X = Z.bottom - j;
|
|
720
720
|
if (X < p)
|
|
721
721
|
return z * D(1 - X / p);
|
|
@@ -751,19 +751,19 @@ function mt({
|
|
|
751
751
|
function E(j, S) {
|
|
752
752
|
v.value = !0, g.value = !0, c.value.sync(!0);
|
|
753
753
|
const Z = S + c.value.top;
|
|
754
|
-
M.value.x = j, M.value.y = Z, r.value.x = j, r.value.y = Z,
|
|
754
|
+
M.value.x = j, M.value.y = Z, r.value.x = j, r.value.y = Z, i.value?.classList.add("disable-scroll-behavior"), d.clear();
|
|
755
755
|
}
|
|
756
756
|
function R(j, S, Z) {
|
|
757
757
|
!g.value || (v.value && t === "colum" && !P() && (a(), v.value = !1), Z?.(), A(S), r.value.x = Math.max(j, h.value.left), r.value.y = Math.min(
|
|
758
758
|
S + c.value.top,
|
|
759
759
|
c.value.height + h.value.top
|
|
760
|
-
), r.value.scrollTop = c.value.top,
|
|
760
|
+
), r.value.scrollTop = c.value.top, u.value());
|
|
761
761
|
}
|
|
762
762
|
function $() {
|
|
763
|
-
g.value = !1,
|
|
763
|
+
g.value = !1, i.value?.classList.remove("disable-scroll-behavior");
|
|
764
764
|
}
|
|
765
765
|
function B() {
|
|
766
|
-
!g.value || (w || C(),
|
|
766
|
+
!g.value || (w || C(), u.value());
|
|
767
767
|
}
|
|
768
768
|
function P() {
|
|
769
769
|
if (!g.value)
|
|
@@ -775,22 +775,22 @@ function mt({
|
|
|
775
775
|
P() && a();
|
|
776
776
|
}
|
|
777
777
|
function ce() {
|
|
778
|
-
P() ||
|
|
779
|
-
|
|
778
|
+
P() || i.value?.querySelectorAll(`[${e}]`).forEach((j) => {
|
|
779
|
+
f[`${e}`] = j.getAttribute(`${e}`), Y(j.getBoundingClientRect()) ? l([f]) : s([f]);
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
function wt() {
|
|
783
783
|
const j = [];
|
|
784
784
|
let S = null, Z = 0;
|
|
785
|
-
|
|
785
|
+
i.value?.querySelectorAll(`[${e}]`).forEach((X, ne) => {
|
|
786
786
|
const de = X.getAttribute(`${e}`);
|
|
787
|
-
j.push(de), Y(X.getBoundingClientRect()) ? (S === null && (S = ne), S = Math.min(S, ne), Z = Math.max(Z, ne)) : (
|
|
787
|
+
j.push(de), Y(X.getBoundingClientRect()) ? (S === null && (S = ne), S = Math.min(S, ne), Z = Math.max(Z, ne)) : (f[`${e}`] = de, d.has(de) && s([f]));
|
|
788
788
|
});
|
|
789
789
|
for (let X = S; X < Z + 1; X++)
|
|
790
|
-
|
|
790
|
+
f[`${e}`] = j[X], l([f]), d.add(j[X]);
|
|
791
791
|
}
|
|
792
792
|
function Nt(j) {
|
|
793
|
-
return !j?.value || (
|
|
793
|
+
return !j?.value || (i.value = j.value, !i?.value) ? !1 : (T.observe(i.value), L(".disable-scroll-behavior", "scroll-behavior: unset !important;"), !0);
|
|
794
794
|
}
|
|
795
795
|
return {
|
|
796
796
|
init: Nt,
|
|
@@ -800,10 +800,10 @@ function mt({
|
|
|
800
800
|
onScroll: B,
|
|
801
801
|
isSingleClick: P,
|
|
802
802
|
cancelSelectAllBySingleClick: V,
|
|
803
|
-
selectFn:
|
|
803
|
+
selectFn: u,
|
|
804
804
|
selectRange: y,
|
|
805
805
|
isPressing: g,
|
|
806
|
-
containerEl:
|
|
806
|
+
containerEl: i,
|
|
807
807
|
observer: T
|
|
808
808
|
};
|
|
809
809
|
}
|
|
@@ -812,9 +812,9 @@ function Io(e) {
|
|
|
812
812
|
onScroll: l,
|
|
813
813
|
dragStart: s,
|
|
814
814
|
dragMove: a,
|
|
815
|
-
dragEnd:
|
|
816
|
-
cancelSelectAllBySingleClick:
|
|
817
|
-
} = t,
|
|
815
|
+
dragEnd: f,
|
|
816
|
+
cancelSelectAllBySingleClick: u
|
|
817
|
+
} = t, d = N(() => ({
|
|
818
818
|
left: `${o.value.left}px`,
|
|
819
819
|
top: `${o.value.top}px`,
|
|
820
820
|
width: `${o.value.width}px`,
|
|
@@ -827,12 +827,12 @@ function Io(e) {
|
|
|
827
827
|
opacity: 0.5;
|
|
828
828
|
}`,
|
|
829
829
|
{ id: "styletag_lzc_dragselect", manual: !0 }
|
|
830
|
-
),
|
|
830
|
+
), i = q({
|
|
831
831
|
render() {
|
|
832
832
|
return ae("div", {
|
|
833
833
|
id: "selectBoxEl",
|
|
834
834
|
class: "drag-select-box",
|
|
835
|
-
style:
|
|
835
|
+
style: d.value
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
});
|
|
@@ -843,7 +843,7 @@ function Io(e) {
|
|
|
843
843
|
a(c.x, c.y);
|
|
844
844
|
}
|
|
845
845
|
function r(c) {
|
|
846
|
-
c.composedPath().some((x) => x?.getAttribute?.(e.attribute)) ||
|
|
846
|
+
c.composedPath().some((x) => x?.getAttribute?.(e.attribute)) || u(), f();
|
|
847
847
|
}
|
|
848
848
|
function T(c) {
|
|
849
849
|
try {
|
|
@@ -851,7 +851,7 @@ function Io(e) {
|
|
|
851
851
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
852
852
|
if (!t.containerEl?.value)
|
|
853
853
|
return !1;
|
|
854
|
-
me(ae(
|
|
854
|
+
me(ae(i), t.containerEl.value), v(), t.containerEl.value?.addEventListener("scroll", l), t.containerEl.value?.addEventListener("mousedown", g), window.addEventListener("mousemove", M), window.addEventListener("mouseup", r);
|
|
855
855
|
} catch (y) {
|
|
856
856
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", y);
|
|
857
857
|
}
|
|
@@ -869,24 +869,24 @@ function Ao(e, t, n = 600) {
|
|
|
869
869
|
startSpeed: 5,
|
|
870
870
|
maxSpeed: 5
|
|
871
871
|
}
|
|
872
|
-
}), { observer: l } = o, { onScroll: s, dragStart: a, dragMove:
|
|
873
|
-
let
|
|
872
|
+
}), { observer: l } = o, { onScroll: s, dragStart: a, dragMove: f, dragEnd: u } = o;
|
|
873
|
+
let d;
|
|
874
874
|
function v() {
|
|
875
|
-
clearTimeout(
|
|
875
|
+
clearTimeout(d);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
v(), h.composedPath().some((y) => !!y?.getAttribute?.(e.attribute)) && (
|
|
877
|
+
function i(h) {
|
|
878
|
+
v(), h.composedPath().some((y) => !!y?.getAttribute?.(e.attribute)) && (d = setTimeout(() => {
|
|
879
879
|
const { clientX: y, clientY: x } = h.targetTouches[0];
|
|
880
|
-
a(y, x), t?.(),
|
|
880
|
+
a(y, x), t?.(), f(y, x, () => h.preventDefault()), h.preventDefault();
|
|
881
881
|
}, n));
|
|
882
882
|
}
|
|
883
883
|
function g(h) {
|
|
884
884
|
v();
|
|
885
885
|
const { clientX: c, clientY: y } = h.targetTouches[0];
|
|
886
|
-
|
|
886
|
+
f(c, y, () => h.preventDefault());
|
|
887
887
|
}
|
|
888
888
|
function M() {
|
|
889
|
-
v(),
|
|
889
|
+
v(), u();
|
|
890
890
|
}
|
|
891
891
|
function r(h) {
|
|
892
892
|
try {
|
|
@@ -894,13 +894,13 @@ function Ao(e, t, n = 600) {
|
|
|
894
894
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
895
895
|
if (!o.containerEl?.value)
|
|
896
896
|
return !1;
|
|
897
|
-
o.containerEl.value?.addEventListener("scroll", s), o.containerEl.value?.addEventListener("touchstart",
|
|
897
|
+
o.containerEl.value?.addEventListener("scroll", s), o.containerEl.value?.addEventListener("touchstart", i), o.containerEl.value?.addEventListener("touchmove", g), window.addEventListener("touchcancel", M), window.addEventListener("touchend", M);
|
|
898
898
|
} catch (c) {
|
|
899
899
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", c);
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
902
|
function T() {
|
|
903
|
-
l.disconnect(), o.containerEl.value?.removeEventListener("scroll", s), o.containerEl.value?.removeEventListener("touchstart",
|
|
903
|
+
l.disconnect(), o.containerEl.value?.removeEventListener("scroll", s), o.containerEl.value?.removeEventListener("touchstart", i), o.containerEl.value?.removeEventListener("touchmove", g), window.removeEventListener("touchcancel", M), window.removeEventListener("touchEnd", M);
|
|
904
904
|
}
|
|
905
905
|
return { init: r, unMount: T };
|
|
906
906
|
}
|
|
@@ -910,7 +910,8 @@ const qt = Symbol(), Jt = /* @__PURE__ */ q({
|
|
|
910
910
|
visiable: { type: Boolean, default: !1 },
|
|
911
911
|
closeOnClickOverlay: { type: Boolean, default: !0 },
|
|
912
912
|
hiddenOverlay: { type: Boolean },
|
|
913
|
-
dialogClass: { default: "" }
|
|
913
|
+
dialogClass: { default: "" },
|
|
914
|
+
modalClass: { default: "" }
|
|
914
915
|
},
|
|
915
916
|
emits: ["update:visiable"],
|
|
916
917
|
setup(e, { emit: t }) {
|
|
@@ -921,7 +922,7 @@ const qt = Symbol(), Jt = /* @__PURE__ */ q({
|
|
|
921
922
|
default: Be(() => [
|
|
922
923
|
e.visiable ? ve((b(), U("div", {
|
|
923
924
|
key: 0,
|
|
924
|
-
class: oe(e.hiddenOverlay ? "no-overlay-modal" : "lzc-modal")
|
|
925
|
+
class: oe([e.hiddenOverlay ? "no-overlay-modal" : "lzc-modal", e.modalClass])
|
|
925
926
|
}, [
|
|
926
927
|
O("div", {
|
|
927
928
|
onMousedown: s[0] || (s[0] = he(() => {
|
|
@@ -943,7 +944,7 @@ const ee = (e, t) => {
|
|
|
943
944
|
for (const [o, l] of t)
|
|
944
945
|
n[o] = l;
|
|
945
946
|
return n;
|
|
946
|
-
}, en = /* @__PURE__ */ ee(Jt, [["__scopeId", "data-v-
|
|
947
|
+
}, en = /* @__PURE__ */ ee(Jt, [["__scopeId", "data-v-783a5618"]]);
|
|
947
948
|
function zo(e) {
|
|
948
949
|
function t(n, o) {
|
|
949
950
|
const l = document.createElement("div"), s = {
|
|
@@ -989,9 +990,9 @@ function yt({
|
|
|
989
990
|
}`
|
|
990
991
|
), { LoadingComp: q({
|
|
991
992
|
setup() {
|
|
992
|
-
const
|
|
993
|
+
const f = Xt();
|
|
993
994
|
return ie(() => {
|
|
994
|
-
|
|
995
|
+
f.value?.classList?.add(l);
|
|
995
996
|
}), () => ae(e, t);
|
|
996
997
|
}
|
|
997
998
|
}) };
|
|
@@ -1079,27 +1080,27 @@ const dn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1079
1080
|
emits: ["close"],
|
|
1080
1081
|
setup(e, { emit: t }) {
|
|
1081
1082
|
const n = e, o = "lzc-loading-toast", l = N(() => {
|
|
1082
|
-
let
|
|
1083
|
-
return n.captureEventP && (
|
|
1083
|
+
let d = {};
|
|
1084
|
+
return n.captureEventP && (d.pointerEvents = "none"), d;
|
|
1084
1085
|
}), s = N(() => {
|
|
1085
|
-
let
|
|
1086
|
+
let d = {
|
|
1086
1087
|
padding: "12px"
|
|
1087
1088
|
};
|
|
1088
|
-
return (n.icon || n.showIcon) && (
|
|
1089
|
-
...
|
|
1089
|
+
return (n.icon || n.showIcon) && (d.padding = "20px"), n.width && (d.width = n.width), n.maxWidth && (d.maxWidth = n.maxWidth), n.overlayContentStyle && (d = {
|
|
1090
|
+
...d,
|
|
1090
1091
|
...n.overlayContentStyle
|
|
1091
|
-
}),
|
|
1092
|
+
}), d;
|
|
1092
1093
|
}), a = N(() => {
|
|
1093
|
-
let
|
|
1094
|
-
return n.showClose && !n.icon && (
|
|
1094
|
+
let d = {};
|
|
1095
|
+
return n.showClose && !n.icon && (d.paddingRight = "16px"), d;
|
|
1095
1096
|
});
|
|
1096
|
-
function
|
|
1097
|
+
function f() {
|
|
1097
1098
|
n.closeOnClickOverlay && t("close");
|
|
1098
1099
|
}
|
|
1099
|
-
function
|
|
1100
|
+
function u() {
|
|
1100
1101
|
n.closeOnClick && t("close");
|
|
1101
1102
|
}
|
|
1102
|
-
return (
|
|
1103
|
+
return (d, v) => (b(), Ee(Ye, {
|
|
1103
1104
|
"enter-active-class": "lzc-animate-fade-in lzc-animate-duration-300",
|
|
1104
1105
|
"leave-active-class": "lzc-animate-fade-out lzc-animate-duration-300"
|
|
1105
1106
|
}, {
|
|
@@ -1110,11 +1111,11 @@ const dn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1110
1111
|
}, [
|
|
1111
1112
|
ve(O("div", {
|
|
1112
1113
|
class: oe(`${o} ${e.className}`),
|
|
1113
|
-
onClick: he(
|
|
1114
|
+
onClick: he(f, ["stop"])
|
|
1114
1115
|
}, [
|
|
1115
1116
|
O("div", {
|
|
1116
1117
|
class: oe(`${o}-wrap`),
|
|
1117
|
-
onClick: he(
|
|
1118
|
+
onClick: he(u, ["stop"])
|
|
1118
1119
|
}, [
|
|
1119
1120
|
O("div", {
|
|
1120
1121
|
class: oe(`${o}-content`),
|
|
@@ -1122,7 +1123,7 @@ const dn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4Ii
|
|
|
1122
1123
|
}, [
|
|
1123
1124
|
e.showClose ? (b(), U("img", {
|
|
1124
1125
|
key: 0,
|
|
1125
|
-
onClick: v[0] || (v[0] = he((
|
|
1126
|
+
onClick: v[0] || (v[0] = he((i) => t("close"), ["stop"])),
|
|
1126
1127
|
src: I(dn),
|
|
1127
1128
|
class: oe(`${o}-close`)
|
|
1128
1129
|
}, null, 10, gn)) : ue("", !0),
|
|
@@ -1181,7 +1182,7 @@ class pn {
|
|
|
1181
1182
|
}
|
|
1182
1183
|
}
|
|
1183
1184
|
function xo(e, t) {
|
|
1184
|
-
const n = !!t?.debug, o = t?.printErrorLog !== !1, l = t?.loading !== !1, s = t?.autoClose !== !1, a = t?.delay
|
|
1185
|
+
const n = !!t?.debug, o = t?.printErrorLog !== !1, l = t?.loading !== !1, s = t?.autoClose !== !1, a = t?.delay !== void 0 ? t.delay : 300, f = t?.hook !== void 0 ? t.hook : !0, u = {
|
|
1185
1186
|
...t,
|
|
1186
1187
|
showIcon: t?.showIcon !== !1,
|
|
1187
1188
|
captureEventP: t?.captureEventP === !0
|
|
@@ -1191,59 +1192,59 @@ function xo(e, t) {
|
|
|
1191
1192
|
l,
|
|
1192
1193
|
s,
|
|
1193
1194
|
a,
|
|
1194
|
-
|
|
1195
|
+
u
|
|
1195
1196
|
);
|
|
1196
|
-
const
|
|
1197
|
-
let
|
|
1198
|
-
const
|
|
1199
|
-
async function
|
|
1200
|
-
if (n && console.log(`useDelayAsync - handler - processing: ${
|
|
1201
|
-
|
|
1197
|
+
const d = m(!1);
|
|
1198
|
+
let v = null;
|
|
1199
|
+
const i = new pn(u);
|
|
1200
|
+
async function g(...r) {
|
|
1201
|
+
if (n && console.log(`useDelayAsync - handler - processing: ${d.value}`), !d.value) {
|
|
1202
|
+
d.value = !0, v = setTimeout(() => {
|
|
1202
1203
|
n && console.log(
|
|
1203
1204
|
"useDelayAsync - handler - setTimeout - loading: %s processing: %s",
|
|
1204
1205
|
l,
|
|
1205
|
-
|
|
1206
|
-
), l && (!
|
|
1206
|
+
d.value
|
|
1207
|
+
), l && (!d.value || i.show());
|
|
1207
1208
|
}, a);
|
|
1208
1209
|
try {
|
|
1209
1210
|
n && console.time("useDelayAsync - handler-execute-time");
|
|
1210
|
-
const
|
|
1211
|
-
n && console.log("useDelayAsync - execute res: ",
|
|
1212
|
-
} catch (
|
|
1213
|
-
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(
|
|
1211
|
+
const T = await e(...r);
|
|
1212
|
+
n && console.log("useDelayAsync - execute res: ", T), n && console.timeEnd("useDelayAsync - handler-execute-time"), await M(s), await t?.onSuccess?.(T, [...r]);
|
|
1213
|
+
} catch (T) {
|
|
1214
|
+
n && console.timeEnd("useDelayAsync - handler-execute-time"), o && console.error(T), await M(s), await t?.onError?.(T, [...r]);
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1216
1217
|
}
|
|
1217
|
-
async function
|
|
1218
|
-
n && console.log("useDelayAsync - close - closeLoading: ",
|
|
1218
|
+
async function M(r = !0) {
|
|
1219
|
+
n && console.log("useDelayAsync - close - closeLoading: ", r), d.value = !1, v && clearTimeout(v), v = null, r && await i.destory();
|
|
1219
1220
|
}
|
|
1220
|
-
return dt(() => {
|
|
1221
|
-
n && console.log("useDelayAsync - onBeforeUnmount - close"),
|
|
1221
|
+
return f && dt(() => {
|
|
1222
|
+
n && console.log("useDelayAsync - onBeforeUnmount - close"), M();
|
|
1222
1223
|
}), {
|
|
1223
|
-
processing:
|
|
1224
|
-
handler:
|
|
1225
|
-
close:
|
|
1224
|
+
processing: d,
|
|
1225
|
+
handler: g,
|
|
1226
|
+
close: M
|
|
1226
1227
|
};
|
|
1227
1228
|
}
|
|
1228
1229
|
function Dn(e, t) {
|
|
1229
1230
|
return e > t ? "horizontal" : t > e ? "vertical" : "";
|
|
1230
1231
|
}
|
|
1231
1232
|
function Tn() {
|
|
1232
|
-
const e = m(0), t = m(0), n = m(0), o = m(0), l = m(0), s = m(0), a = m(""),
|
|
1233
|
+
const e = m(0), t = m(0), n = m(0), o = m(0), l = m(0), s = m(0), a = m(""), f = () => a.value === "vertical", u = () => a.value === "horizontal", d = () => {
|
|
1233
1234
|
n.value = 0, o.value = 0, l.value = 0, s.value = 0, a.value = "";
|
|
1234
1235
|
};
|
|
1235
1236
|
function v(g, M) {
|
|
1236
|
-
|
|
1237
|
+
d(), e.value = g, t.value = M;
|
|
1237
1238
|
}
|
|
1238
|
-
function
|
|
1239
|
+
function i(g, M) {
|
|
1239
1240
|
n.value = (g < 0 ? 0 : g) - e.value, o.value = M - t.value, l.value = Math.abs(n.value), s.value = Math.abs(o.value);
|
|
1240
1241
|
const r = 10;
|
|
1241
1242
|
(!a.value || l.value < r && s.value < r) && (a.value = Dn(l.value, s.value));
|
|
1242
1243
|
}
|
|
1243
1244
|
return {
|
|
1244
|
-
move:
|
|
1245
|
+
move: i,
|
|
1245
1246
|
start: v,
|
|
1246
|
-
reset:
|
|
1247
|
+
reset: d,
|
|
1247
1248
|
startX: e,
|
|
1248
1249
|
startY: t,
|
|
1249
1250
|
deltaX: n,
|
|
@@ -1251,8 +1252,8 @@ function Tn() {
|
|
|
1251
1252
|
offsetX: l,
|
|
1252
1253
|
offsetY: s,
|
|
1253
1254
|
direction: a,
|
|
1254
|
-
isVertical:
|
|
1255
|
-
isHorizontal:
|
|
1255
|
+
isVertical: f,
|
|
1256
|
+
isHorizontal: u
|
|
1256
1257
|
};
|
|
1257
1258
|
}
|
|
1258
1259
|
const lt = 250, st = 5, wn = 500;
|
|
@@ -1262,11 +1263,11 @@ function Nn(e) {
|
|
|
1262
1263
|
function l() {
|
|
1263
1264
|
n = Date.now();
|
|
1264
1265
|
}
|
|
1265
|
-
async function s(a,
|
|
1266
|
-
const
|
|
1267
|
-
a < st &&
|
|
1266
|
+
async function s(a, f) {
|
|
1267
|
+
const u = Date.now() - n;
|
|
1268
|
+
a < st && f < st && (u < lt ? t ? o ? (clearTimeout(o), o = null, e.onDoubleTap?.()) : o = setTimeout(async () => {
|
|
1268
1269
|
e.onTap?.(), o = null;
|
|
1269
|
-
}, lt) : e.onTap?.() :
|
|
1270
|
+
}, lt) : e.onTap?.() : u > wn && e.onLongPress?.());
|
|
1270
1271
|
}
|
|
1271
1272
|
return { startTap: l, checkTap: s };
|
|
1272
1273
|
}
|
|
@@ -1314,16 +1315,16 @@ function zn(e) {
|
|
|
1314
1315
|
};
|
|
1315
1316
|
}
|
|
1316
1317
|
function pt(e) {
|
|
1317
|
-
const { disableZoom: t } = e, n = m(1), o = m(9), l = m(), s = m(), a = m({ width: 0, height: 0 }),
|
|
1318
|
+
const { disableZoom: t } = e, n = m(1), o = m(9), l = m(), s = m(), a = m({ width: 0, height: 0 }), f = m({ width: 0, height: 0 }), u = Te({
|
|
1318
1319
|
level: 1,
|
|
1319
1320
|
offsetX: 0,
|
|
1320
1321
|
offsetY: 0,
|
|
1321
1322
|
zooming: !1,
|
|
1322
1323
|
preview: !0,
|
|
1323
1324
|
lastCenter: { x: 0, y: 0 }
|
|
1324
|
-
}),
|
|
1325
|
+
}), d = m({}), v = Tn(), i = En(s, {
|
|
1325
1326
|
onComplate() {
|
|
1326
|
-
|
|
1327
|
+
u.preview || h();
|
|
1327
1328
|
}
|
|
1328
1329
|
}), g = Nn({
|
|
1329
1330
|
onTap() {
|
|
@@ -1345,33 +1346,33 @@ function pt(e) {
|
|
|
1345
1346
|
);
|
|
1346
1347
|
async function M(D) {
|
|
1347
1348
|
const [w] = D;
|
|
1348
|
-
w.contentRect.width ==
|
|
1349
|
+
w.contentRect.width == f.value.width && w.contentRect.height == f.value.height || (await r(l.value), await h(u.level, !0));
|
|
1349
1350
|
}
|
|
1350
1351
|
async function r(D, w) {
|
|
1351
1352
|
await z(D, w), D && Q();
|
|
1352
1353
|
}
|
|
1353
1354
|
async function T(D) {
|
|
1354
|
-
if (!
|
|
1355
|
+
if (!u.preview)
|
|
1355
1356
|
return;
|
|
1356
|
-
|
|
1357
|
+
u.preview = !1, D = D ?? u.level;
|
|
1357
1358
|
const w = s.value;
|
|
1358
1359
|
if (!w)
|
|
1359
1360
|
return;
|
|
1360
1361
|
const { scrollTop: A, scrollLeft: k } = w, { width: Y, height: C } = a.value, { scaleW: L, scaleH: E } = _(D), { top: R, left: $ } = p(L, E), B = $ != 0 ? $ : k * -1, P = R != 0 ? R : A * -1;
|
|
1361
1362
|
w.scrollTop = 0, w.scrollLeft = 0;
|
|
1362
|
-
const { value: V } =
|
|
1363
|
-
V.width = `${Y}px`, V.height = `${C}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = Se(B, P, D),
|
|
1363
|
+
const { value: V } = d;
|
|
1364
|
+
V.width = `${Y}px`, V.height = `${C}px`, V.maxHeight = "none", V.transitionDuration = "0s", V.transform = Se(B, P, D), d.value = V, await fe(), u.offsetX = B, u.offsetY = P, await et(20);
|
|
1364
1365
|
}
|
|
1365
1366
|
async function h(D, w) {
|
|
1366
|
-
if (!w &&
|
|
1367
|
+
if (!w && u.preview)
|
|
1367
1368
|
return;
|
|
1368
|
-
|
|
1369
|
-
const { value: A } =
|
|
1370
|
-
D === 1 && (A.maxHeight = "100%"), A.width = `${k}px`, A.height = `${Y}px`, A.transitionDuration = "0s", A.transform = Se(C, L, 1),
|
|
1369
|
+
u.preview = !0, D = D ?? u.level;
|
|
1370
|
+
const { value: A } = d, { scaleW: k, scaleH: Y } = _(D), { left: C, top: L } = p(k, Y);
|
|
1371
|
+
D === 1 && (A.maxHeight = "100%"), A.width = `${k}px`, A.height = `${Y}px`, A.transitionDuration = "0s", A.transform = Se(C, L, 1), d.value = A, await fe();
|
|
1371
1372
|
const E = s.value;
|
|
1372
1373
|
if (!E)
|
|
1373
1374
|
return;
|
|
1374
|
-
const { offsetX: R, offsetY: $ } =
|
|
1375
|
+
const { offsetX: R, offsetY: $ } = u;
|
|
1375
1376
|
R < 0 && (E.scrollLeft = Math.abs(R)), $ < 0 && (E.scrollTop = Math.abs($));
|
|
1376
1377
|
}
|
|
1377
1378
|
async function c(D, w, A) {
|
|
@@ -1379,36 +1380,36 @@ function pt(e) {
|
|
|
1379
1380
|
D,
|
|
1380
1381
|
n.value - n.value * 0.5,
|
|
1381
1382
|
o.value + o.value * 0.5
|
|
1382
|
-
), D ==
|
|
1383
|
+
), D == u.level))
|
|
1383
1384
|
return;
|
|
1384
|
-
|
|
1385
|
-
const { value: k } =
|
|
1386
|
-
left: Math.abs(Y * D -
|
|
1387
|
-
top: Math.abs(C * D -
|
|
1385
|
+
u.preview && await T(), w || (w = { x: v.startX.value, y: v.startY.value });
|
|
1386
|
+
const { value: k } = d, { width: Y, height: C } = a.value, { scaleW: L, scaleH: E } = _(D), { top: R, left: $ } = p(L, E), B = D / u.level, P = {
|
|
1387
|
+
left: Math.abs(Y * D - f.value.width) * -1,
|
|
1388
|
+
top: Math.abs(C * D - f.value.height) * -1,
|
|
1388
1389
|
right: $,
|
|
1389
1390
|
bottom: R
|
|
1390
1391
|
};
|
|
1391
|
-
let V = $ != 0 ? $ : (
|
|
1392
|
-
V = le(Ce(V, P.left, P.right)), ce = le(Ce(ce, P.top, P.bottom)), k.width = `${Y}px`, k.height = `${C}px`, k.transitionDuration = A ? An(D) : "0s", k.transform = Se(V, ce, D),
|
|
1392
|
+
let V = $ != 0 ? $ : (u.offsetX - w.x) * B + w.x, ce = R != 0 ? R : (u.offsetY - w.y) * B + w.y;
|
|
1393
|
+
V = le(Ce(V, P.left, P.right)), ce = le(Ce(ce, P.top, P.bottom)), k.width = `${Y}px`, k.height = `${C}px`, k.transitionDuration = A ? An(D) : "0s", k.transform = Se(V, ce, D), u.offsetX = V, u.offsetY = ce, u.level = D, d.value = k, await fe(), A && i.startTransition(), e.onScale?.(D);
|
|
1393
1394
|
}
|
|
1394
1395
|
function y() {
|
|
1395
|
-
const D =
|
|
1396
|
+
const D = u.level > 1 ? 1 : H();
|
|
1396
1397
|
c(D, void 0, !0);
|
|
1397
1398
|
}
|
|
1398
1399
|
function x(D, w) {
|
|
1399
|
-
if (!
|
|
1400
|
+
if (!u.preview)
|
|
1400
1401
|
return;
|
|
1401
1402
|
const A = s.value;
|
|
1402
1403
|
!A || A.scrollTo({
|
|
1403
|
-
left:
|
|
1404
|
-
top:
|
|
1404
|
+
left: u.offsetX - D,
|
|
1405
|
+
top: u.offsetY - w
|
|
1405
1406
|
});
|
|
1406
1407
|
}
|
|
1407
1408
|
async function W() {
|
|
1408
|
-
|
|
1409
|
+
u.level >= n.value && u.level <= o.value ? u.zooming && await h() : u.level < n.value ? await c(n.value, void 0, !0) : u.level > o.value && await c(o.value, u.lastCenter, !0), u.zooming = !1;
|
|
1409
1410
|
}
|
|
1410
1411
|
function H() {
|
|
1411
|
-
const { width: D, height: w } = a.value, { width: A, height: k } =
|
|
1412
|
+
const { width: D, height: w } = a.value, { width: A, height: k } = f.value, Y = 2.5;
|
|
1412
1413
|
let C;
|
|
1413
1414
|
return w == k ? (C = A / D, C - 1 < 0.1 && (C = Y)) : C = Math.max(Y, A / D, k / w), C;
|
|
1414
1415
|
}
|
|
@@ -1420,7 +1421,7 @@ function pt(e) {
|
|
|
1420
1421
|
};
|
|
1421
1422
|
}
|
|
1422
1423
|
function p(D, w) {
|
|
1423
|
-
const { width: A, height: k } =
|
|
1424
|
+
const { width: A, height: k } = f.value, Y = Math.max(0, (k - w) * 0.5), C = Math.max(0, (A - D) * 0.5);
|
|
1424
1425
|
return { top: Y, left: C };
|
|
1425
1426
|
}
|
|
1426
1427
|
async function z(D, w) {
|
|
@@ -1440,7 +1441,7 @@ function pt(e) {
|
|
|
1440
1441
|
(k === 0 || Y === 0) && (k = a.value.width || C, Y = a.value.height || L), a.value = {
|
|
1441
1442
|
width: Math.min(k, C),
|
|
1442
1443
|
height: Math.min(Y, L)
|
|
1443
|
-
},
|
|
1444
|
+
}, f.value = { width: C, height: L };
|
|
1444
1445
|
}
|
|
1445
1446
|
function Q() {
|
|
1446
1447
|
const D = H();
|
|
@@ -1448,10 +1449,10 @@ function pt(e) {
|
|
|
1448
1449
|
}
|
|
1449
1450
|
return {
|
|
1450
1451
|
touch: v,
|
|
1451
|
-
state:
|
|
1452
|
-
style:
|
|
1452
|
+
state: u,
|
|
1453
|
+
style: d,
|
|
1453
1454
|
gesture: g,
|
|
1454
|
-
transition:
|
|
1455
|
+
transition: i,
|
|
1455
1456
|
imageRef: l,
|
|
1456
1457
|
containerRef: s,
|
|
1457
1458
|
switchToZoom: T,
|
|
@@ -1469,42 +1470,42 @@ function Co(e) {
|
|
|
1469
1470
|
},
|
|
1470
1471
|
...e
|
|
1471
1472
|
}), { state: n, touch: o, gesture: l, transition: s } = t;
|
|
1472
|
-
let a = !1,
|
|
1473
|
-
const
|
|
1473
|
+
let a = !1, f = null;
|
|
1474
|
+
const u = { top: 0, left: 0 }, d = ze(r, 150);
|
|
1474
1475
|
we("keyup", h), we("keydown", T);
|
|
1475
1476
|
function v(c) {
|
|
1476
1477
|
const y = t.containerRef.value;
|
|
1477
1478
|
if (!y)
|
|
1478
1479
|
return;
|
|
1479
1480
|
const { left: x, top: W } = y.getBoundingClientRect();
|
|
1480
|
-
l.startTap(), o.start(c.clientX - x, c.clientY - W), s.transitioning.value || (a = !0,
|
|
1481
|
+
l.startTap(), o.start(c.clientX - x, c.clientY - W), s.transitioning.value || (a = !0, u.left = x, u.top = W, n.offsetX = y.scrollLeft, n.offsetY = y.scrollTop), window.addEventListener("pointermove", i), window.addEventListener("pointerup", g);
|
|
1481
1482
|
}
|
|
1482
|
-
function
|
|
1483
|
+
function i(c) {
|
|
1483
1484
|
!a || (o.move(c.clientX, c.clientY), n.level !== 1 && t.panTo(
|
|
1484
|
-
o.deltaX.value -
|
|
1485
|
-
o.deltaY.value -
|
|
1485
|
+
o.deltaX.value - u.left,
|
|
1486
|
+
o.deltaY.value - u.top
|
|
1486
1487
|
));
|
|
1487
1488
|
}
|
|
1488
1489
|
function g(c) {
|
|
1489
|
-
l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove",
|
|
1490
|
+
l.checkTap(o.offsetX.value, o.offsetY.value), o.reset(), a = !1, window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", g);
|
|
1490
1491
|
}
|
|
1491
1492
|
function M(c) {
|
|
1492
1493
|
if (!c.ctrlKey)
|
|
1493
1494
|
return;
|
|
1494
|
-
n.zooming || (n.zooming = !0,
|
|
1495
|
+
n.zooming || (n.zooming = !0, f == "Control" && window.addEventListener("keyup", r)), c.preventDefault();
|
|
1495
1496
|
let y = -c.deltaY;
|
|
1496
|
-
c.deltaMode === 1 ? y *= 0.05 : y *= c.deltaMode ? 1 : 2e-3,
|
|
1497
|
+
c.deltaMode === 1 ? y *= 0.05 : y *= c.deltaMode ? 1 : 2e-3, f != "Control" && (y *= 10), y = 2 ** y;
|
|
1497
1498
|
const x = n.level * y;
|
|
1498
|
-
n.lastCenter = { x: c.offsetX, y: c.offsetY }, t.zoomTo(x, n.lastCenter),
|
|
1499
|
+
n.lastCenter = { x: c.offsetX, y: c.offsetY }, t.zoomTo(x, n.lastCenter), f != "Control" && d();
|
|
1499
1500
|
}
|
|
1500
1501
|
function r() {
|
|
1501
1502
|
t.zoomFinished(), window.removeEventListener("keyup", r);
|
|
1502
1503
|
}
|
|
1503
1504
|
function T(c) {
|
|
1504
|
-
|
|
1505
|
+
f = c.key;
|
|
1505
1506
|
}
|
|
1506
1507
|
function h() {
|
|
1507
|
-
|
|
1508
|
+
f = null;
|
|
1508
1509
|
}
|
|
1509
1510
|
return { core: t, onPointerDown: v, onWheel: M };
|
|
1510
1511
|
}
|
|
@@ -1514,17 +1515,17 @@ function So(e) {
|
|
|
1514
1515
|
t.toggleZoom();
|
|
1515
1516
|
},
|
|
1516
1517
|
...e
|
|
1517
|
-
}), { state: n, touch: o, gesture: l, transition: s, containerRef: a } = t,
|
|
1518
|
-
let
|
|
1518
|
+
}), { state: n, touch: o, gesture: l, transition: s, containerRef: a } = t, f = Vt(a);
|
|
1519
|
+
let u, d, v, i;
|
|
1519
1520
|
async function g(h) {
|
|
1520
1521
|
const { touches: c } = h;
|
|
1521
|
-
|
|
1522
|
+
u = c.length, n.zooming = u === 2, l.startTap(), o.start(c[0].clientX, c[0].clientY), T("start", h), n.zooming && (h.preventDefault(), d = n.level, v = at(c), await t.switchToZoom(), n.lastCenter = zn(c));
|
|
1522
1523
|
}
|
|
1523
1524
|
async function M(h) {
|
|
1524
1525
|
const { touches: c } = h;
|
|
1525
|
-
if (
|
|
1526
|
+
if (u = c.length, o.move(c[0].clientX, c[0].clientY), T("move", h), n.zooming && u == 2) {
|
|
1526
1527
|
h.preventDefault();
|
|
1527
|
-
const y = at(c), x =
|
|
1528
|
+
const y = at(c), x = d * y / v;
|
|
1528
1529
|
t.zoomTo(x, n.lastCenter);
|
|
1529
1530
|
}
|
|
1530
1531
|
}
|
|
@@ -1532,27 +1533,27 @@ function So(e) {
|
|
|
1532
1533
|
h.touches.length || (T("end", h), l.checkTap(o.offsetX.value, o.offsetY.value), t.zoomFinished(), o.reset());
|
|
1533
1534
|
}
|
|
1534
1535
|
function T(h, c) {
|
|
1535
|
-
|
|
1536
|
+
f.measure();
|
|
1536
1537
|
let { clientX: y, clientY: x } = c.touches.length != 0 ? c.touches[0] : c.changedTouches[0];
|
|
1537
|
-
const { top: W, left: H, right: _, bottom: p } =
|
|
1538
|
+
const { top: W, left: H, right: _, bottom: p } = f.arrivedState;
|
|
1538
1539
|
if (h == "start")
|
|
1539
|
-
|
|
1540
|
-
else if (
|
|
1541
|
-
|
|
1542
|
-
else if (
|
|
1540
|
+
i = W || H || _ || p;
|
|
1541
|
+
else if (u == 2)
|
|
1542
|
+
i = !1;
|
|
1543
|
+
else if (i) {
|
|
1543
1544
|
if (o.direction.value == "vertical")
|
|
1544
1545
|
if (n.level != 1)
|
|
1545
|
-
|
|
1546
|
+
i = !1;
|
|
1546
1547
|
else {
|
|
1547
1548
|
const z = o.startY.value < x;
|
|
1548
|
-
|
|
1549
|
+
i = W && z || p && !z;
|
|
1549
1550
|
}
|
|
1550
1551
|
else if (o.direction.value == "horizontal") {
|
|
1551
1552
|
const z = o.startX.value < y;
|
|
1552
|
-
|
|
1553
|
+
i = H && z || _ && !z;
|
|
1553
1554
|
}
|
|
1554
1555
|
}
|
|
1555
|
-
|
|
1556
|
+
i && s.transitioning.value && (i = !1, c.preventDefault()), h == "end" && !i && (y = o.startX.value, x = o.startY.value, i = !0), (h != "move" || i) && e.onSwipeEdge?.(h, o.direction.value, y, x);
|
|
1556
1557
|
}
|
|
1557
1558
|
return { core: t, onTouchStart: g, onTouchMove: M, onTouchEnd: r };
|
|
1558
1559
|
}
|
|
@@ -1638,7 +1639,7 @@ const xn = ["onClick"], Cn = /* @__PURE__ */ q({
|
|
|
1638
1639
|
padding: "14px 19px",
|
|
1639
1640
|
top: `calc(${s.value}% - ${l.value}px)`,
|
|
1640
1641
|
left: `calc(50% - ${o.value}px)`
|
|
1641
|
-
})),
|
|
1642
|
+
})), f = N(() => ({
|
|
1642
1643
|
width: "fit-content",
|
|
1643
1644
|
display: "flex",
|
|
1644
1645
|
justifyContent: "center",
|
|
@@ -1646,13 +1647,13 @@ const xn = ["onClick"], Cn = /* @__PURE__ */ q({
|
|
|
1646
1647
|
color: "white",
|
|
1647
1648
|
fontSize: "14px"
|
|
1648
1649
|
}));
|
|
1649
|
-
function
|
|
1650
|
+
function u() {
|
|
1650
1651
|
!t.buttonClickEvent || t.buttonClickEvent();
|
|
1651
1652
|
}
|
|
1652
1653
|
return fe(() => {
|
|
1653
1654
|
o.value = n.value.offsetWidth / 2, l.value = n.value.offsetHeight / 2;
|
|
1654
|
-
}), (
|
|
1655
|
-
onClick: he(
|
|
1655
|
+
}), (d, v) => (b(), U("div", {
|
|
1656
|
+
onClick: he(u, ["stop"]),
|
|
1656
1657
|
id: "toastWrapper",
|
|
1657
1658
|
ref_key: "toastWrapper",
|
|
1658
1659
|
ref: n,
|
|
@@ -1660,7 +1661,7 @@ const xn = ["onClick"], Cn = /* @__PURE__ */ q({
|
|
|
1660
1661
|
style: K([I(a), { zIndex: 9999999 }])
|
|
1661
1662
|
}, [
|
|
1662
1663
|
O("div", {
|
|
1663
|
-
style: K(I(
|
|
1664
|
+
style: K(I(f))
|
|
1664
1665
|
}, [
|
|
1665
1666
|
O("span", null, Re(e.message), 1)
|
|
1666
1667
|
], 4)
|
|
@@ -1738,9 +1739,9 @@ function On(e) {
|
|
|
1738
1739
|
performance: l = {},
|
|
1739
1740
|
maxHeightRatio: s = 0.9,
|
|
1740
1741
|
observeMethod: a = "classList"
|
|
1741
|
-
} = e,
|
|
1742
|
-
let
|
|
1743
|
-
const
|
|
1742
|
+
} = e, f = m(!0), u = ze(D, 100);
|
|
1743
|
+
let d, v = "";
|
|
1744
|
+
const i = m(0), g = m(0), M = m(0), r = m({
|
|
1744
1745
|
top: 0,
|
|
1745
1746
|
scrollTop: 0,
|
|
1746
1747
|
scrollHeight: 0,
|
|
@@ -1759,13 +1760,13 @@ function On(e) {
|
|
|
1759
1760
|
Q(), g.value = B.clientY - n.value.getBoundingClientRect().top || 1, v = getComputedStyle(t.value).scrollBehavior, v === "smooth" && (t.value.style.scrollBehavior = "unset");
|
|
1760
1761
|
}
|
|
1761
1762
|
function z() {
|
|
1762
|
-
t.value.style.scrollBehavior = v, g.value = 0,
|
|
1763
|
+
t.value.style.scrollBehavior = v, g.value = 0, u();
|
|
1763
1764
|
}
|
|
1764
1765
|
function Q() {
|
|
1765
|
-
|
|
1766
|
+
f.value = !1;
|
|
1766
1767
|
}
|
|
1767
1768
|
function D() {
|
|
1768
|
-
h.value || (
|
|
1769
|
+
h.value || (f.value = !0);
|
|
1769
1770
|
}
|
|
1770
1771
|
function w(B) {
|
|
1771
1772
|
if (!h.value)
|
|
@@ -1779,10 +1780,10 @@ function On(e) {
|
|
|
1779
1780
|
h.value || k();
|
|
1780
1781
|
}
|
|
1781
1782
|
function k() {
|
|
1782
|
-
cancelAnimationFrame(
|
|
1783
|
+
cancelAnimationFrame(d), d = requestAnimationFrame(Y);
|
|
1783
1784
|
}
|
|
1784
1785
|
function Y() {
|
|
1785
|
-
t.value && (
|
|
1786
|
+
t.value && (i.value = l.scrollTop?.value ?? t.value.scrollTop, M.value = i.value / x.value * y.value);
|
|
1786
1787
|
}
|
|
1787
1788
|
function C(B) {
|
|
1788
1789
|
let P = "addEventListener";
|
|
@@ -1817,13 +1818,13 @@ function On(e) {
|
|
|
1817
1818
|
} else
|
|
1818
1819
|
console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: t, sliderEl: n });
|
|
1819
1820
|
}
|
|
1820
|
-
return G(
|
|
1821
|
-
Q(),
|
|
1821
|
+
return G(i, () => {
|
|
1822
|
+
Q(), u();
|
|
1822
1823
|
}), {
|
|
1823
|
-
isScrollEnd:
|
|
1824
|
+
isScrollEnd: f,
|
|
1824
1825
|
isDragSlider: h,
|
|
1825
1826
|
offsetTop: M,
|
|
1826
|
-
scrollTop:
|
|
1827
|
+
scrollTop: i,
|
|
1827
1828
|
scrollable: c,
|
|
1828
1829
|
sliderPos: _,
|
|
1829
1830
|
init: $,
|
|
@@ -1846,7 +1847,7 @@ const bn = (e) => (pe("data-v-405c22cf"), e = e(), De(), e), kn = /* @__PURE__ *
|
|
|
1846
1847
|
autoHeight: o ? n.autoHeight : !0,
|
|
1847
1848
|
performance: n.performance,
|
|
1848
1849
|
observeMethod: n.observeMethod
|
|
1849
|
-
}), { scrollable:
|
|
1850
|
+
}), { scrollable: f, isScrollEnd: u, sliderPos: d } = a, v = m(!1), i = n.autoHide ? N(() => v.value || !u.value) : N(() => f.value), { load: g } = Fe(
|
|
1850
1851
|
`.hide-scrollbar {
|
|
1851
1852
|
scrollbar-width: none;
|
|
1852
1853
|
-ms-overflow-style: none;
|
|
@@ -1877,13 +1878,13 @@ const bn = (e) => (pe("data-v-405c22cf"), e = e(), De(), e), kn = /* @__PURE__ *
|
|
|
1877
1878
|
class: "slider-wrapper",
|
|
1878
1879
|
onMouseenter: M,
|
|
1879
1880
|
onMouseleave: r,
|
|
1880
|
-
style: K(I(
|
|
1881
|
+
style: K(I(d))
|
|
1881
1882
|
}, [
|
|
1882
1883
|
Ie(T.$slots, "default", {}, () => [
|
|
1883
1884
|
kn
|
|
1884
1885
|
], !0)
|
|
1885
1886
|
], 36), [
|
|
1886
|
-
[Ae, I(
|
|
1887
|
+
[Ae, I(i)]
|
|
1887
1888
|
])
|
|
1888
1889
|
]),
|
|
1889
1890
|
_: 3
|
|
@@ -1905,34 +1906,34 @@ const ko = /* @__PURE__ */ ee(Qn, [["__scopeId", "data-v-405c22cf"]]), Yn = (e)
|
|
|
1905
1906
|
pullRefreshContainer: null
|
|
1906
1907
|
},
|
|
1907
1908
|
setup(e) {
|
|
1908
|
-
const t = e, n = 0.7, o = "#2EC1CC", l = m(-999), s = m(1), a = m(0),
|
|
1909
|
+
const t = e, n = 0.7, o = "#2EC1CC", l = m(-999), s = m(1), a = m(0), f = m(0.3), u = m(!1), d = m(0), v = m(0), i = m(0), g = m(0), M = m(0), r = m(), T = N(() => t.scrollTop), h = N(() => ({
|
|
1909
1910
|
transition: `${g.value}ms`,
|
|
1910
1911
|
transform: `translate3d(0,${l.value}px, 0) scale(${s.value})`
|
|
1911
1912
|
})), c = N(() => ({
|
|
1912
1913
|
borderColor: o,
|
|
1913
1914
|
transition: g.value,
|
|
1914
1915
|
transform: `rotate(${100 + a.value}deg)`,
|
|
1915
|
-
opacity:
|
|
1916
|
+
opacity: f.value
|
|
1916
1917
|
}));
|
|
1917
1918
|
G(M, (p) => {
|
|
1918
|
-
p === 0 && (l.value = -50,
|
|
1919
|
+
p === 0 && (l.value = -50, f.value = 0.3);
|
|
1919
1920
|
}), G(v, (p) => {
|
|
1920
1921
|
if (M.value === 2)
|
|
1921
1922
|
return;
|
|
1922
1923
|
const z = Math.pow(p, n);
|
|
1923
|
-
z === 0 && (l.value = -50), z <= 50 && z > 0 && (l.value = z - 45, a.value = Math.pow(z, 1.5), z > 15 ?
|
|
1924
|
+
z === 0 && (l.value = -50), z <= 50 && z > 0 && (l.value = z - 45, a.value = Math.pow(z, 1.5), z > 15 ? u.value = !0 : u.value = !1), z > 50 && (l.value = 5, f.value = 1, M.value);
|
|
1924
1925
|
});
|
|
1925
1926
|
const y = m(0), x = (p) => {
|
|
1926
1927
|
y.value = p.touches[0].pageY;
|
|
1927
1928
|
}, W = (p) => {
|
|
1928
1929
|
const z = p.touches[0].pageY - y.value;
|
|
1929
|
-
y.value = p.touches[0].pageY, !t.refreshOff && (!t?.refresh || M.value !== 2 && T.value === 0 && (
|
|
1930
|
+
y.value = p.touches[0].pageY, !t.refreshOff && (!t?.refresh || M.value !== 2 && T.value === 0 && (d.value === 0 && (d.value = p.touches[0].pageY), i.value = 0, _.value.style.transition = `${i.value}ms`, g.value = 0, v.value = p.touches[0].pageY - d.value, _.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, z > 0 && p.preventDefault()));
|
|
1930
1931
|
}, H = () => {
|
|
1931
1932
|
if (t.refreshOff || !t?.refresh || M.value === 2)
|
|
1932
1933
|
return;
|
|
1933
|
-
|
|
1934
|
+
d.value = 0, i.value = 300;
|
|
1934
1935
|
const p = Math.pow(v.value, n);
|
|
1935
|
-
_.value.style.transition = `${
|
|
1936
|
+
_.value.style.transition = `${i.value}ms`, p > 50 ? (M.value = 2, v.value = Math.pow(50, 1 / n), _.value.style.transform = `translate3d(0, ${Math.pow(v.value, n)}px, 0)`, g.value = 300, t?.refresh && t?.refresh().then(() => {
|
|
1936
1937
|
r.value = "\u5237\u65B0\u6210\u529F";
|
|
1937
1938
|
}).catch(() => {
|
|
1938
1939
|
r.value = "\u5237\u65B0\u5931\u8D25";
|
|
@@ -1978,7 +1979,7 @@ const ko = /* @__PURE__ */ ee(Qn, [["__scopeId", "data-v-405c22cf"]]), Yn = (e)
|
|
|
1978
1979
|
}, [
|
|
1979
1980
|
O("div", Hn, [
|
|
1980
1981
|
O("div", {
|
|
1981
|
-
class: oe(["arrows", { opacity:
|
|
1982
|
+
class: oe(["arrows", { opacity: u.value }]),
|
|
1982
1983
|
style: K({ borderBottomColor: o })
|
|
1983
1984
|
}, null, 6)
|
|
1984
1985
|
])
|
|
@@ -2012,15 +2013,15 @@ const Zn = /* @__PURE__ */ ee(Xn, [["__scopeId", "data-v-df5da876"]]), Vn = ["da
|
|
|
2012
2013
|
}), {
|
|
2013
2014
|
list: s,
|
|
2014
2015
|
containerProps: a,
|
|
2015
|
-
wrapperProps:
|
|
2016
|
-
innerProps:
|
|
2017
|
-
getItemHeightData:
|
|
2016
|
+
wrapperProps: f,
|
|
2017
|
+
innerProps: u,
|
|
2018
|
+
getItemHeightData: d,
|
|
2018
2019
|
scrollTop: v
|
|
2019
2020
|
} = l;
|
|
2020
2021
|
t({
|
|
2021
2022
|
vListReturn: l
|
|
2022
2023
|
});
|
|
2023
|
-
const
|
|
2024
|
+
const i = "virtualListWrapper" + new Date().getTime();
|
|
2024
2025
|
function g(M, r) {
|
|
2025
2026
|
return o.getItemKey ? o.getItemKey(M, r) : `${r}`;
|
|
2026
2027
|
}
|
|
@@ -2029,24 +2030,24 @@ const Zn = /* @__PURE__ */ ee(Xn, [["__scopeId", "data-v-df5da876"]]), Vn = ["da
|
|
|
2029
2030
|
refresh: e.refresh,
|
|
2030
2031
|
refreshOff: e.refreshOff,
|
|
2031
2032
|
scrollTop: I(v),
|
|
2032
|
-
pullRefreshContainer: "#" +
|
|
2033
|
+
pullRefreshContainer: "#" + i
|
|
2033
2034
|
}, null, 8, ["refresh", "refreshOff", "scrollTop", "pullRefreshContainer"]),
|
|
2034
2035
|
O("div", {
|
|
2035
2036
|
class: "virtualListWrapper",
|
|
2036
|
-
id:
|
|
2037
|
+
id: i
|
|
2037
2038
|
}, [
|
|
2038
2039
|
O("div", ge({
|
|
2039
2040
|
onScrollPassive: r[0] || (r[0] = (...T) => I(a).onScroll && I(a).onScroll(...T)),
|
|
2040
2041
|
ref: I(a).ref,
|
|
2041
2042
|
class: "virtualList"
|
|
2042
2043
|
}, M.$attrs), [
|
|
2043
|
-
O("div", _e(Oe(I(
|
|
2044
|
-
O("div", _e(Oe(I(
|
|
2044
|
+
O("div", _e(Oe(I(f))), [
|
|
2045
|
+
O("div", _e(Oe(I(u))), [
|
|
2045
2046
|
(b(!0), U(be, null, bt(I(s), ({ data: T, index: h }) => (b(), U("div", {
|
|
2046
2047
|
key: g(T, h),
|
|
2047
2048
|
"data-key": g(T, h),
|
|
2048
2049
|
style: K({
|
|
2049
|
-
height: `${I(
|
|
2050
|
+
height: `${I(d)(h).height}px`,
|
|
2050
2051
|
display: "flex"
|
|
2051
2052
|
})
|
|
2052
2053
|
}, [
|
|
@@ -2129,13 +2130,13 @@ const Yo = /* @__PURE__ */ ee(lo, [["__scopeId", "data-v-33519afd"]]), so = [
|
|
|
2129
2130
|
];
|
|
2130
2131
|
function Dt(e, t) {
|
|
2131
2132
|
const n = m(e?.value), o = N(() => n.value?.startsWith("/_lzc")), l = m(!1), s = N(() => l.value), a = N(() => {
|
|
2132
|
-
const
|
|
2133
|
-
return !
|
|
2133
|
+
const u = t?.value;
|
|
2134
|
+
return !u || u.startsWith("video/") ? !0 : u.startsWith("image/") ? o.value ? so.includes(u) : ao.includes(u) : !1;
|
|
2134
2135
|
});
|
|
2135
|
-
e && G(e, (
|
|
2136
|
-
n.value =
|
|
2136
|
+
e && G(e, (u) => {
|
|
2137
|
+
n.value = u, l.value = !1;
|
|
2137
2138
|
});
|
|
2138
|
-
function
|
|
2139
|
+
function f() {
|
|
2139
2140
|
l.value = !0;
|
|
2140
2141
|
}
|
|
2141
2142
|
return {
|
|
@@ -2143,7 +2144,7 @@ function Dt(e, t) {
|
|
|
2143
2144
|
isError: l,
|
|
2144
2145
|
hasError: s,
|
|
2145
2146
|
isSupport: a,
|
|
2146
|
-
handleError:
|
|
2147
|
+
handleError: f
|
|
2147
2148
|
};
|
|
2148
2149
|
}
|
|
2149
2150
|
function Tt() {
|
|
@@ -2165,15 +2166,15 @@ const io = (e) => (pe("data-v-774cb54a"), e = e(), De(), e), uo = ["title"], ro
|
|
|
2165
2166
|
},
|
|
2166
2167
|
emits: ["load"],
|
|
2167
2168
|
setup(e, { emit: t }) {
|
|
2168
|
-
const n = e, o = m(), l = m(), s = m(!1), a = m(!1),
|
|
2169
|
+
const n = e, o = m(), l = m(), s = m(!1), a = m(!1), f = m(!1), { src: u, mime: d } = vt(n), { imgSrc: v, isSupport: i, hasError: g, handleError: M } = Dt(u, d), { vImageCancel: r } = Tt(), { LoadingComp: T } = yt({
|
|
2169
2170
|
component: sn,
|
|
2170
2171
|
delay: 300
|
|
2171
|
-
}), h = Qt(() =>
|
|
2172
|
+
}), h = Qt(() => f.value && n.autoRemoveThumbnail ? !1 : n.thumbnail && !f.value);
|
|
2172
2173
|
function c() {
|
|
2173
2174
|
a.value = !0;
|
|
2174
2175
|
}
|
|
2175
2176
|
function y() {
|
|
2176
|
-
a.value && (
|
|
2177
|
+
a.value && (f.value = !0);
|
|
2177
2178
|
}
|
|
2178
2179
|
async function x() {
|
|
2179
2180
|
c(), h.value ? (o.value?.addEventListener("animationend", W), o.value?.classList.add("showing"), await et(10)) : o.value && t("load", o.value), o.value?.classList.remove("src-class");
|
|
@@ -2189,7 +2190,7 @@ const io = (e) => (pe("data-v-774cb54a"), e = e(), De(), e), uo = ["title"], ro
|
|
|
2189
2190
|
}
|
|
2190
2191
|
return (p, z) => (b(), U(be, null, [
|
|
2191
2192
|
s.value ? ue("", !0) : (b(), Ee(I(T), { key: 0 })),
|
|
2192
|
-
I(
|
|
2193
|
+
I(i) ? I(g) ? (b(), U("div", ge({ key: 3 }, p.$attrs, {
|
|
2193
2194
|
title: I(v),
|
|
2194
2195
|
class: "tip-wrap"
|
|
2195
2196
|
}), [
|
|
@@ -2243,8 +2244,8 @@ const Bo = /* @__PURE__ */ ee(go, [["__scopeId", "data-v-774cb54a"]]), ho = ["ti
|
|
|
2243
2244
|
mime: null
|
|
2244
2245
|
},
|
|
2245
2246
|
setup(e) {
|
|
2246
|
-
const t = e, n = m(!1), { src: o, mime: l } = vt(t), { imgSrc: s, hasError: a, isSupport:
|
|
2247
|
-
return (v,
|
|
2247
|
+
const t = e, n = m(!1), { src: o, mime: l } = vt(t), { imgSrc: s, hasError: a, isSupport: f, handleError: u } = Dt(o, l), { vImageCancel: d } = Tt();
|
|
2248
|
+
return (v, i) => I(f) ? I(a) ? (b(), U("div", {
|
|
2248
2249
|
key: 2,
|
|
2249
2250
|
title: I(s),
|
|
2250
2251
|
class: "icon-wrap"
|
|
@@ -2256,11 +2257,11 @@ const Bo = /* @__PURE__ */ ee(go, [["__scopeId", "data-v-774cb54a"]]), ho = ["ti
|
|
|
2256
2257
|
], 8, yo)) : ve((b(), U("img", {
|
|
2257
2258
|
key: 1,
|
|
2258
2259
|
fetchpriority: "high",
|
|
2259
|
-
onLoad:
|
|
2260
|
-
onError:
|
|
2260
|
+
onLoad: i[0] || (i[0] = (g) => n.value = !0),
|
|
2261
|
+
onError: i[1] || (i[1] = (...g) => I(u) && I(u)(...g)),
|
|
2261
2262
|
src: I(s)
|
|
2262
2263
|
}, null, 40, mo)), [
|
|
2263
|
-
[I(
|
|
2264
|
+
[I(d)],
|
|
2264
2265
|
[Ae, n.value]
|
|
2265
2266
|
]) : (b(), U("div", {
|
|
2266
2267
|
key: 0,
|