x-sccba 0.2.3 → 0.2.4
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/umd/index.js +2 -2
- package/dist/vue2/index122.cjs +1 -1
- package/dist/vue2/index122.mjs +1 -1
- package/dist/vue2/index144.cjs +1 -1
- package/dist/vue2/index144.mjs +3 -3
- package/dist/vue2/index211.cjs +1 -1
- package/dist/vue2/index211.cjs.map +1 -1
- package/dist/vue2/index211.mjs +1 -1
- package/dist/vue2/index230.cjs +1 -1
- package/dist/vue2/index230.cjs.map +1 -1
- package/dist/vue2/index230.mjs +5 -167
- package/dist/vue2/index230.mjs.map +1 -1
- package/dist/vue2/index231.cjs +1 -1
- package/dist/vue2/index231.mjs +5 -5
- package/dist/vue2/index232.cjs +1 -1
- package/dist/vue2/index232.mjs +5 -5
- package/dist/vue2/index233.cjs +1 -1
- package/dist/vue2/index233.cjs.map +1 -1
- package/dist/vue2/index233.mjs +167 -5
- package/dist/vue2/index233.mjs.map +1 -1
- package/dist/vue2/index238.cjs +1 -1
- package/dist/vue2/index238.cjs.map +1 -1
- package/dist/vue2/index238.mjs +283 -49
- package/dist/vue2/index238.mjs.map +1 -1
- package/dist/vue2/index239.cjs +1 -1
- package/dist/vue2/index239.cjs.map +1 -1
- package/dist/vue2/index239.mjs +2 -127
- package/dist/vue2/index239.mjs.map +1 -1
- package/dist/vue2/index240.cjs +1 -1
- package/dist/vue2/index240.cjs.map +1 -1
- package/dist/vue2/index240.mjs +56 -35
- package/dist/vue2/index240.mjs.map +1 -1
- package/dist/vue2/index241.cjs +1 -1
- package/dist/vue2/index241.cjs.map +1 -1
- package/dist/vue2/index241.mjs +2 -208
- package/dist/vue2/index241.mjs.map +1 -1
- package/dist/vue2/index242.cjs +1 -1
- package/dist/vue2/index242.cjs.map +1 -1
- package/dist/vue2/index242.mjs +31 -170
- package/dist/vue2/index242.mjs.map +1 -1
- package/dist/vue2/index243.cjs +1 -1
- package/dist/vue2/index243.cjs.map +1 -1
- package/dist/vue2/index243.mjs +2 -970
- package/dist/vue2/index243.mjs.map +1 -1
- package/dist/vue2/index244.cjs +1 -1
- package/dist/vue2/index244.cjs.map +1 -1
- package/dist/vue2/index244.mjs +3 -845
- package/dist/vue2/index244.mjs.map +1 -1
- package/dist/vue2/index73.cjs.map +1 -1
- package/dist/vue2/index73.mjs.map +1 -1
- package/dist/vue3/index123.cjs +1 -1
- package/dist/vue3/index123.mjs +1 -1
- package/dist/vue3/index212.cjs +1 -1
- package/dist/vue3/index212.cjs.map +1 -1
- package/dist/vue3/index212.mjs +1 -1
- package/dist/vue3/index231.cjs +1 -1
- package/dist/vue3/index231.mjs +2 -2
- package/dist/vue3/index232.cjs +1 -1
- package/dist/vue3/index232.mjs +2 -2
- package/dist/vue3/index233.cjs +1 -1
- package/dist/vue3/index233.mjs +2 -2
- package/dist/vue3/index238.cjs +1 -1
- package/dist/vue3/index238.cjs.map +1 -1
- package/dist/vue3/index238.mjs +165 -32
- package/dist/vue3/index238.mjs.map +1 -1
- package/dist/vue3/index239.cjs +1 -1
- package/dist/vue3/index239.cjs.map +1 -1
- package/dist/vue3/index239.mjs +284 -167
- package/dist/vue3/index239.mjs.map +1 -1
- package/dist/vue3/index240.cjs +1 -1
- package/dist/vue3/index240.cjs.map +1 -1
- package/dist/vue3/index240.mjs +2 -284
- package/dist/vue3/index240.mjs.map +1 -1
- package/dist/vue3/index241.cjs +1 -1
- package/dist/vue3/index241.cjs.map +1 -1
- package/dist/vue3/index241.mjs +56 -2
- package/dist/vue3/index241.mjs.map +1 -1
- package/dist/vue3/index242.cjs +1 -1
- package/dist/vue3/index242.cjs.map +1 -1
- package/dist/vue3/index242.mjs +2 -56
- package/dist/vue3/index242.mjs.map +1 -1
- package/dist/vue3/index243.cjs +1 -1
- package/dist/vue3/index243.cjs.map +1 -1
- package/dist/vue3/index243.mjs +31 -2
- package/dist/vue3/index243.mjs.map +1 -1
- package/dist/vue3/index244.cjs +1 -1
- package/dist/vue3/index244.cjs.map +1 -1
- package/dist/vue3/index244.mjs +2 -31
- package/dist/vue3/index244.mjs.map +1 -1
- package/dist/vue3/index245.cjs +1 -1
- package/dist/vue3/index245.mjs +4 -2
- package/dist/vue3/index245.mjs.map +1 -1
- package/dist/vue3/index73.cjs.map +1 -1
- package/dist/vue3/index73.mjs.map +1 -1
- package/package.json +12 -27
- package/dist/vue2/index245.cjs +0 -2
- package/dist/vue2/index245.cjs.map +0 -1
- package/dist/vue2/index245.mjs +0 -59
- package/dist/vue2/index245.mjs.map +0 -1
- package/dist/vue2/index246.cjs +0 -2
- package/dist/vue2/index246.cjs.map +0 -1
- package/dist/vue2/index246.mjs +0 -36
- package/dist/vue2/index246.mjs.map +0 -1
- package/dist/vue2/index247.cjs +0 -2
- package/dist/vue2/index247.cjs.map +0 -1
- package/dist/vue2/index247.mjs +0 -167
- package/dist/vue2/index247.mjs.map +0 -1
- package/dist/vue2/index248.cjs +0 -2
- package/dist/vue2/index248.cjs.map +0 -1
- package/dist/vue2/index248.mjs +0 -17
- package/dist/vue2/index248.mjs.map +0 -1
- package/dist/vue2/index249.cjs +0 -2
- package/dist/vue2/index249.cjs.map +0 -1
- package/dist/vue2/index249.mjs +0 -287
- package/dist/vue2/index249.mjs.map +0 -1
- package/dist/vue2/index250.cjs +0 -2
- package/dist/vue2/index250.cjs.map +0 -1
- package/dist/vue2/index250.mjs +0 -5
- package/dist/vue2/index250.mjs.map +0 -1
- package/dist/vue2/index251.cjs +0 -2
- package/dist/vue2/index251.cjs.map +0 -1
- package/dist/vue2/index251.mjs +0 -59
- package/dist/vue2/index251.mjs.map +0 -1
- package/dist/vue2/index252.cjs +0 -2
- package/dist/vue2/index252.cjs.map +0 -1
- package/dist/vue2/index252.mjs +0 -5
- package/dist/vue2/index252.mjs.map +0 -1
- package/dist/vue2/index253.cjs +0 -2
- package/dist/vue2/index253.cjs.map +0 -1
- package/dist/vue2/index253.mjs +0 -34
- package/dist/vue2/index253.mjs.map +0 -1
- package/dist/vue2/index254.cjs +0 -2
- package/dist/vue2/index254.cjs.map +0 -1
- package/dist/vue2/index254.mjs +0 -5
- package/dist/vue2/index254.mjs.map +0 -1
- package/dist/vue2/index255.cjs +0 -2
- package/dist/vue2/index255.cjs.map +0 -1
- package/dist/vue2/index255.mjs +0 -105
- package/dist/vue2/index255.mjs.map +0 -1
- package/dist/vue2/index256.cjs +0 -2
- package/dist/vue2/index256.cjs.map +0 -1
- package/dist/vue2/index256.mjs +0 -21
- package/dist/vue2/index256.mjs.map +0 -1
- package/dist/vue2/index257.cjs +0 -2
- package/dist/vue2/index257.cjs.map +0 -1
- package/dist/vue2/index257.mjs +0 -134
- package/dist/vue2/index257.mjs.map +0 -1
- package/dist/vue2/index258.cjs +0 -2
- package/dist/vue2/index258.cjs.map +0 -1
- package/dist/vue2/index258.mjs +0 -7
- package/dist/vue2/index258.mjs.map +0 -1
- package/dist/vue3/index246.cjs +0 -2
- package/dist/vue3/index246.cjs.map +0 -1
- package/dist/vue3/index246.mjs +0 -130
- package/dist/vue3/index246.mjs.map +0 -1
- package/dist/vue3/index247.cjs +0 -2
- package/dist/vue3/index247.cjs.map +0 -1
- package/dist/vue3/index247.mjs +0 -38
- package/dist/vue3/index247.mjs.map +0 -1
- package/dist/vue3/index248.cjs +0 -2
- package/dist/vue3/index248.cjs.map +0 -1
- package/dist/vue3/index248.mjs +0 -211
- package/dist/vue3/index248.mjs.map +0 -1
- package/dist/vue3/index249.cjs +0 -2
- package/dist/vue3/index249.cjs.map +0 -1
- package/dist/vue3/index249.mjs +0 -173
- package/dist/vue3/index249.mjs.map +0 -1
- package/dist/vue3/index250.cjs +0 -2
- package/dist/vue3/index250.cjs.map +0 -1
- package/dist/vue3/index250.mjs +0 -936
- package/dist/vue3/index250.mjs.map +0 -1
- package/dist/vue3/index251.cjs +0 -2
- package/dist/vue3/index251.cjs.map +0 -1
- package/dist/vue3/index251.mjs +0 -807
- package/dist/vue3/index251.mjs.map +0 -1
- package/dist/vue3/index252.cjs +0 -2
- package/dist/vue3/index252.cjs.map +0 -1
- package/dist/vue3/index252.mjs +0 -55
- package/dist/vue3/index252.mjs.map +0 -1
- package/dist/vue3/index253.cjs +0 -2
- package/dist/vue3/index253.cjs.map +0 -1
- package/dist/vue3/index253.mjs +0 -36
- package/dist/vue3/index253.mjs.map +0 -1
- package/dist/vue3/index254.cjs +0 -2
- package/dist/vue3/index254.cjs.map +0 -1
- package/dist/vue3/index254.mjs +0 -138
- package/dist/vue3/index254.mjs.map +0 -1
- package/dist/vue3/index255.cjs +0 -2
- package/dist/vue3/index255.cjs.map +0 -1
- package/dist/vue3/index255.mjs +0 -17
- package/dist/vue3/index255.mjs.map +0 -1
- package/dist/vue3/index256.cjs +0 -2
- package/dist/vue3/index256.cjs.map +0 -1
- package/dist/vue3/index256.mjs +0 -7
- package/dist/vue3/index256.mjs.map +0 -1
- package/dist/vue3/index257.cjs +0 -2
- package/dist/vue3/index257.cjs.map +0 -1
- package/dist/vue3/index257.mjs +0 -105
- package/dist/vue3/index257.mjs.map +0 -1
- package/dist/vue3/index258.cjs +0 -2
- package/dist/vue3/index258.cjs.map +0 -1
- package/dist/vue3/index258.mjs +0 -21
- package/dist/vue3/index258.mjs.map +0 -1
- package/dist/vue3/index259.cjs +0 -2
- package/dist/vue3/index259.cjs.map +0 -1
- package/dist/vue3/index259.mjs +0 -134
- package/dist/vue3/index259.mjs.map +0 -1
package/dist/vue2/index243.mjs
CHANGED
|
@@ -1,973 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { computed, toValue, ref, onMounted, nextTick, onActivated, onBeforeUnmount, watch, markRaw, shallowReactive } from "vue";
|
|
21
|
-
import { r as f } from "./index256.mjs";
|
|
22
|
-
function st(n, o, s) {
|
|
23
|
-
return f(n, o, s);
|
|
24
|
-
}
|
|
25
|
-
function Be(n, o) {
|
|
26
|
-
return n.map((s, u) => st(s, u, o));
|
|
27
|
-
}
|
|
28
|
-
function wn(n, o, s) {
|
|
29
|
-
const u = [], l = [];
|
|
30
|
-
for (let f2 = 0; f2 < n.length; f2++) {
|
|
31
|
-
const I = n[f2], x = st(I, f2, o), T = s(I, f2, x);
|
|
32
|
-
u.push(x), l.push(typeof T == "number" && T > 0 ? T : null);
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
keys: u,
|
|
36
|
-
sizes: l
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function xn(n, o, s) {
|
|
40
|
-
if (!n || n.keys.length !== o.length || n.sizes.length !== o.length)
|
|
41
|
-
return false;
|
|
42
|
-
for (let u = 0; u < o.length; u++)
|
|
43
|
-
if (n.keys[u] !== st(o[u], u, s))
|
|
44
|
-
return false;
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
function bn(n, o, s) {
|
|
48
|
-
if (!xn(n, o, s))
|
|
49
|
-
return {};
|
|
50
|
-
const u = {};
|
|
51
|
-
for (let l = 0; l < n.keys.length; l++) {
|
|
52
|
-
const f2 = n.sizes[l];
|
|
53
|
-
typeof f2 == "number" && f2 > 0 && (u[n.keys[l]] = f2);
|
|
54
|
-
}
|
|
55
|
-
return u;
|
|
56
|
-
}
|
|
57
|
-
function zn(n, o) {
|
|
58
|
-
if (!n.length || o.length <= n.length)
|
|
59
|
-
return 0;
|
|
60
|
-
const s = n[0], u = o.indexOf(s);
|
|
61
|
-
if (u <= 0 || u + n.length < o.length && n.length > o.length - u)
|
|
62
|
-
return 0;
|
|
63
|
-
for (let l = 0; l < n.length; l++)
|
|
64
|
-
if (o[u + l] !== n[l])
|
|
65
|
-
return 0;
|
|
66
|
-
return u;
|
|
67
|
-
}
|
|
68
|
-
function At(n, o, s, u, l, f2 = 0) {
|
|
69
|
-
const I = l != null ? l : "start";
|
|
70
|
-
if (I === "nearest") {
|
|
71
|
-
const x = s + u, T = n + o;
|
|
72
|
-
return n >= s && T <= x ? null : n < s ? n + f2 : T - u + f2;
|
|
73
|
-
}
|
|
74
|
-
return I === "end" ? n + o - u + f2 : I === "center" ? n + (o - u) / 2 + f2 : n + f2;
|
|
75
|
-
}
|
|
76
|
-
function Mn(n) {
|
|
77
|
-
return n.flowMode && n.direction === "vertical" && !n.gridItems ? "flow" : n.disableTransform ? "position" : "transform";
|
|
78
|
-
}
|
|
79
|
-
function Tn(n, o) {
|
|
80
|
-
var _a;
|
|
81
|
-
const s = o.direction === "vertical", u = (_a = o.mode) != null ? _a : "transform", l = {
|
|
82
|
-
visibility: n.nr.used ? "visible" : "hidden",
|
|
83
|
-
pointerEvents: n.nr.used ? void 0 : "none"
|
|
84
|
-
};
|
|
85
|
-
if (u === "flow" ? l.display = n.nr.used ? void 0 : "none" : (l.position = "absolute", l.top = "0px", l.left = "0px", l.display = void 0), u === "position" ? (l[s ? "top" : "left"] = `${n.position}px`, l[s ? "left" : "top"] = `${n.offset}px`, l.transform = "none", l.willChange = "unset") : u === "transform" && (l.transform = s ? `translateY(${n.position}px) translateX(${n.offset}px)` : `translateX(${n.position}px) translateY(${n.offset}px)`, l.willChange = "transform"), o.gridItems && o.itemSize != null) {
|
|
86
|
-
const f2 = o.itemSecondarySize || o.itemSize;
|
|
87
|
-
l.width = `${s ? f2 : o.itemSize}px`, l.height = `${s ? o.itemSize : f2}px`;
|
|
88
|
-
}
|
|
89
|
-
return l;
|
|
90
|
-
}
|
|
91
|
-
function Ut(n) {
|
|
92
|
-
return computed(() => toValue(n));
|
|
93
|
-
}
|
|
94
|
-
function En(n, o, s, u, l) {
|
|
95
|
-
const f2 = Ut(n);
|
|
96
|
-
return {
|
|
97
|
-
el: computed(() => {
|
|
98
|
-
const I = f2.value.el;
|
|
99
|
-
return toValue(o != null ? o : I);
|
|
100
|
-
}),
|
|
101
|
-
before: computed(() => {
|
|
102
|
-
const I = f2.value.before;
|
|
103
|
-
return toValue(s != null ? s : I);
|
|
104
|
-
}),
|
|
105
|
-
after: computed(() => {
|
|
106
|
-
const I = f2.value.after;
|
|
107
|
-
return toValue(u != null ? u : I);
|
|
108
|
-
}),
|
|
109
|
-
scrollParent: computed(() => {
|
|
110
|
-
const I = f2.value.scrollParent;
|
|
111
|
-
return toValue(I);
|
|
112
|
-
}),
|
|
113
|
-
callbacks: {
|
|
114
|
-
onResize: () => {
|
|
115
|
-
var _a;
|
|
116
|
-
var I;
|
|
117
|
-
return (I = (_a = l == null ? void 0 : l.onResize) != null ? _a : f2.value.onResize) == null ? void 0 : I();
|
|
118
|
-
},
|
|
119
|
-
onVisible: () => {
|
|
120
|
-
var _a;
|
|
121
|
-
var I;
|
|
122
|
-
return (I = (_a = l == null ? void 0 : l.onVisible) != null ? _a : f2.value.onVisible) == null ? void 0 : I();
|
|
123
|
-
},
|
|
124
|
-
onHidden: () => {
|
|
125
|
-
var _a;
|
|
126
|
-
var I;
|
|
127
|
-
return (I = (_a = l == null ? void 0 : l.onHidden) != null ? _a : f2.value.onHidden) == null ? void 0 : I();
|
|
128
|
-
},
|
|
129
|
-
onUpdate: (I, x, T, N) => {
|
|
130
|
-
var _a;
|
|
131
|
-
var ge;
|
|
132
|
-
return (ge = (_a = l == null ? void 0 : l.onUpdate) != null ? _a : f2.value.onUpdate) == null ? void 0 : ge(I, x, T, N);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
const Vn = {
|
|
138
|
-
itemsLimit: 1e3
|
|
139
|
-
};
|
|
140
|
-
function $t(n) {
|
|
141
|
-
return typeof window < "u" && n === window;
|
|
142
|
-
}
|
|
143
|
-
const _n = (() => {
|
|
144
|
-
if (typeof document > "u")
|
|
145
|
-
return "negative";
|
|
146
|
-
const n = document.createElement("div"), o = document.createElement("div");
|
|
147
|
-
n.style.width = "4px", n.style.height = "1px", n.style.overflow = "auto", n.style.direction = "rtl", o.style.width = "8px", o.style.height = "1px", n.appendChild(o), document.body.appendChild(n), n.scrollLeft = -1;
|
|
148
|
-
const s = n.scrollLeft < 0;
|
|
149
|
-
return document.body.removeChild(n), s ? "negative" : "default";
|
|
150
|
-
})();
|
|
151
|
-
function pe(n, o, s) {
|
|
152
|
-
return o !== "horizontal" || !s || $t(s) || getComputedStyle(s).direction !== "rtl" ? n : _n === "negative" ? -n : n;
|
|
153
|
-
}
|
|
154
|
-
function Pn(n, o, s) {
|
|
155
|
-
return pe(n, o, s);
|
|
156
|
-
}
|
|
157
|
-
function it(n, o, s, u) {
|
|
158
|
-
const l = Pn(s, o, n), f2 = !!(u != null && u.smooth);
|
|
159
|
-
if ($t(n)) {
|
|
160
|
-
o === "vertical" ? n.scrollTo({
|
|
161
|
-
top: l,
|
|
162
|
-
behavior: f2 ? "smooth" : "auto"
|
|
163
|
-
}) : n.scrollTo({
|
|
164
|
-
left: l,
|
|
165
|
-
behavior: f2 ? "smooth" : "auto"
|
|
166
|
-
});
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (typeof n.scrollTo == "function") {
|
|
170
|
-
n.scrollTo(o === "vertical" ? { top: l, behavior: f2 ? "smooth" : "auto" } : { left: l, behavior: f2 ? "smooth" : "auto" });
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
o === "vertical" ? n.scrollTop = l : n.scrollLeft = l;
|
|
174
|
-
}
|
|
175
|
-
function Fn(n, o, s, u) {
|
|
176
|
-
if (s) {
|
|
177
|
-
if (u && u !== window) {
|
|
178
|
-
const l = u;
|
|
179
|
-
return o === "vertical" ? l.clientHeight : l.clientWidth;
|
|
180
|
-
}
|
|
181
|
-
return o === "vertical" ? window.innerHeight : window.innerWidth;
|
|
182
|
-
}
|
|
183
|
-
return o === "vertical" ? n.clientHeight : n.clientWidth;
|
|
184
|
-
}
|
|
185
|
-
const Ln = /auto|scroll/;
|
|
186
|
-
function jt(n, o) {
|
|
187
|
-
return n.parentNode === null ? o : jt(n.parentNode, [...o, n]);
|
|
188
|
-
}
|
|
189
|
-
function ot(n, o) {
|
|
190
|
-
return getComputedStyle(n, null).getPropertyValue(o);
|
|
191
|
-
}
|
|
192
|
-
function Cn(n) {
|
|
193
|
-
return ot(n, "overflow") + ot(n, "overflow-y") + ot(n, "overflow-x");
|
|
194
|
-
}
|
|
195
|
-
function Rn(n) {
|
|
196
|
-
return Ln.test(Cn(n));
|
|
197
|
-
}
|
|
198
|
-
function Wn(n) {
|
|
199
|
-
if (!(n instanceof HTMLElement || n instanceof SVGElement))
|
|
200
|
-
return;
|
|
201
|
-
if (n.parentNode === null)
|
|
202
|
-
return document.scrollingElement || document.documentElement;
|
|
203
|
-
const o = jt(n.parentNode, []);
|
|
204
|
-
for (let s = 0; s < o.length; s += 1)
|
|
205
|
-
if (o[s] instanceof Element && Rn(o[s]))
|
|
206
|
-
return o[s];
|
|
207
|
-
return document.scrollingElement || document.documentElement;
|
|
208
|
-
}
|
|
209
|
-
function kn(n, o) {
|
|
210
|
-
if (o)
|
|
211
|
-
return o;
|
|
212
|
-
if (!n)
|
|
213
|
-
return;
|
|
214
|
-
const s = Wn(n);
|
|
215
|
-
if (s)
|
|
216
|
-
return typeof window < "u" && window.document && (s === window.document.documentElement || s === window.document.body) ? window : s;
|
|
217
|
-
}
|
|
218
|
-
let lt = false;
|
|
219
|
-
function Nn() {
|
|
220
|
-
return lt;
|
|
221
|
-
}
|
|
222
|
-
if (typeof window < "u") {
|
|
223
|
-
lt = false;
|
|
224
|
-
try {
|
|
225
|
-
const n = Object.defineProperty({}, "passive", {
|
|
226
|
-
get() {
|
|
227
|
-
lt = true;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
window.addEventListener("test", null, n);
|
|
231
|
-
} catch (e) {
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
function D(n) {
|
|
235
|
-
return typeof n == "number" ? n : null;
|
|
236
|
-
}
|
|
237
|
-
function Hn(n, o, s, u, l) {
|
|
238
|
-
return typeof s == "number" ? s : typeof s == "function" ? s(n, o) || u || void 0 : u || (n == null ? void 0 : n[l != null ? l : "size"]) || void 0;
|
|
239
|
-
}
|
|
240
|
-
function An(n, o, s, u, l, f2) {
|
|
241
|
-
return typeof s == "function" ? s(n, o) || u || Number(l) || 0 : u || (n == null ? void 0 : n[f2 != null ? f2 : "size"]) || Number(l) || 0;
|
|
242
|
-
}
|
|
243
|
-
let Bn = 0;
|
|
244
|
-
const Yn = [];
|
|
245
|
-
function On(n) {
|
|
246
|
-
for (let o = 0; o < n.length; o++)
|
|
247
|
-
n[o];
|
|
248
|
-
}
|
|
249
|
-
function Un(n, o) {
|
|
250
|
-
return n && typeof n == "object" ? n[o] : void 0;
|
|
251
|
-
}
|
|
252
|
-
function Ye(n, o) {
|
|
253
|
-
return n.map((s) => Un(s, o));
|
|
254
|
-
}
|
|
255
|
-
function $n(n, o, s, u) {
|
|
256
|
-
if (n.length !== s.length || o.length !== u.length)
|
|
257
|
-
return false;
|
|
258
|
-
for (let l = 0; l < n.length; l++)
|
|
259
|
-
if (n[l] !== s[l] || o[l] !== u[l])
|
|
260
|
-
return false;
|
|
261
|
-
return true;
|
|
262
|
-
}
|
|
263
|
-
function jn(n) {
|
|
264
|
-
const o = n;
|
|
265
|
-
o._vs_styleStamp++;
|
|
266
|
-
}
|
|
267
|
-
function Bt(n) {
|
|
268
|
-
const o = n;
|
|
269
|
-
o._vs_visibilityStamp++, o._vs_styleStamp++;
|
|
270
|
-
}
|
|
271
|
-
function Dn(n, o, s, u) {
|
|
272
|
-
if (s) {
|
|
273
|
-
for (const l of s)
|
|
274
|
-
u(l);
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
for (let l = n; l < o; l++)
|
|
278
|
-
u(l);
|
|
279
|
-
}
|
|
280
|
-
const Yt = 8, Ot = 1;
|
|
281
|
-
function qn(n, o, s, u, l, f$1) {
|
|
282
|
-
const I = Ut(n), x = En(I, o, s, u, l), T = computed(() => {
|
|
283
|
-
const e = toValue(v().items);
|
|
284
|
-
return On(e), e;
|
|
285
|
-
}), N = ref([]), ge = ref(0), Se = ref(0), ye = ref(0), le = ref(false);
|
|
286
|
-
let G = 0, X = 0, at = 0, ut = 0, ct = false, ee = null;
|
|
287
|
-
const Ue = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
|
|
288
|
-
let Ee = false, je = 0, dt = 0, De = false, se = null, ae = null, q = null, Ge = 0, Ie = null, we = null, Ve = [], xe = [], te = null, Y = null, be = null, Xe = false, ft = false, mt = false;
|
|
289
|
-
const _e = /* @__PURE__ */ new Set(), Pe = ref({}), qe = [], ht = {
|
|
290
|
-
accumulator: 0
|
|
291
|
-
};
|
|
292
|
-
function v() {
|
|
293
|
-
return I.value;
|
|
294
|
-
}
|
|
295
|
-
function ue() {
|
|
296
|
-
var _a;
|
|
297
|
-
return (_a = f$1 == null ? void 0 : f$1.pageMode) != null ? _a : v().pageMode;
|
|
298
|
-
}
|
|
299
|
-
const M = computed(() => {
|
|
300
|
-
var _a;
|
|
301
|
-
return toValue((_a = v().enabled) != null ? _a : true);
|
|
302
|
-
}), ze = computed(() => kn(
|
|
303
|
-
x.el.value,
|
|
304
|
-
x.scrollParent.value
|
|
305
|
-
)), Z = computed(() => {
|
|
306
|
-
const e = T.value;
|
|
307
|
-
return e.length > 0 && typeof e[0] != "object";
|
|
308
|
-
}), Me = computed(() => {
|
|
309
|
-
var _a;
|
|
310
|
-
const e = v();
|
|
311
|
-
if (D(e.itemSize) === null) {
|
|
312
|
-
const r = T.value, i = Array.from({ length: r.length });
|
|
313
|
-
ht.accumulator = 0, i[-1] = ht;
|
|
314
|
-
const a = e.minItemSize, d = Pe.value, h = Z.value;
|
|
315
|
-
let S = 1e4, p = 0, z;
|
|
316
|
-
for (let c = 0, m = r.length; c < m; c++) {
|
|
317
|
-
const V = h ? c : f(r[c], c, e.keyField);
|
|
318
|
-
z = An(
|
|
319
|
-
r[c],
|
|
320
|
-
c,
|
|
321
|
-
e.itemSize,
|
|
322
|
-
d[V],
|
|
323
|
-
a,
|
|
324
|
-
e.sizeField
|
|
325
|
-
), z < S && (S = z), p += z;
|
|
326
|
-
const E = (_a = qe[c]) != null ? _a : qe[c] = {
|
|
327
|
-
accumulator: 0,
|
|
328
|
-
size: void 0
|
|
329
|
-
};
|
|
330
|
-
E.accumulator = p, E.size = z, i[c] = E;
|
|
331
|
-
}
|
|
332
|
-
return qe.length = r.length, Ge = S, i;
|
|
333
|
-
}
|
|
334
|
-
return Yn;
|
|
335
|
-
}), Dt = computed(
|
|
336
|
-
() => N.value.filter((e) => (e._vs_visibilityStamp, e.nr.used)).sort((e, t) => e.nr.index - t.nr.index)
|
|
337
|
-
), Gt = computed(() => {
|
|
338
|
-
const e = v(), t = Z.value ? null : e.keyField;
|
|
339
|
-
return wn(T.value, t, (r, i, a) => Hn(
|
|
340
|
-
r,
|
|
341
|
-
i,
|
|
342
|
-
e.itemSize,
|
|
343
|
-
Pe.value[a],
|
|
344
|
-
e.sizeField
|
|
345
|
-
));
|
|
346
|
-
});
|
|
347
|
-
function J(e = v()) {
|
|
348
|
-
var _a;
|
|
349
|
-
return (_a = e.direction) != null ? _a : "vertical";
|
|
350
|
-
}
|
|
351
|
-
function ce(e = v()) {
|
|
352
|
-
var _a, _b;
|
|
353
|
-
const t = J(e);
|
|
354
|
-
let r = (_a = e.flowMode) != null ? _a : false;
|
|
355
|
-
return r && t !== "vertical" && (ft || (console.warn("[vue-recycle-scroller] flowMode only supports vertical lists. Falling back to standard positioning."), ft = true), r = false), r && e.gridItems && (mt || (console.warn("[vue-recycle-scroller] flowMode does not support gridItems. Falling back to standard positioning."), mt = true), r = false), Mn({
|
|
356
|
-
direction: t,
|
|
357
|
-
disableTransform: (_b = e.disableTransform) != null ? _b : false,
|
|
358
|
-
flowMode: r,
|
|
359
|
-
gridItems: e.gridItems
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
function vt() {
|
|
363
|
-
N.value.sort((e, t) => e.nr.used !== t.nr.used ? e.nr.used ? -1 : 1 : e.nr.used && t.nr.used ? e.nr.index - t.nr.index : e.nr.id - t.nr.id);
|
|
364
|
-
}
|
|
365
|
-
function Ze(e) {
|
|
366
|
-
const t = v();
|
|
367
|
-
return Pe.value = bn(e, T.value, Z.value ? null : t.keyField), Object.keys(Pe.value).length > 0;
|
|
368
|
-
}
|
|
369
|
-
function pt(e) {
|
|
370
|
-
let t = $e.get(e);
|
|
371
|
-
return t || (t = [], $e.set(e, t)), t;
|
|
372
|
-
}
|
|
373
|
-
function Xt(e, t, r, i, a) {
|
|
374
|
-
const d = markRaw({
|
|
375
|
-
id: Bn++,
|
|
376
|
-
index: t,
|
|
377
|
-
used: true,
|
|
378
|
-
key: i,
|
|
379
|
-
type: a
|
|
380
|
-
}), h = shallowReactive({
|
|
381
|
-
item: r,
|
|
382
|
-
position: 0,
|
|
383
|
-
offset: 0,
|
|
384
|
-
nr: d,
|
|
385
|
-
_vs_styleStamp: 0,
|
|
386
|
-
_vs_visibilityStamp: 0
|
|
387
|
-
});
|
|
388
|
-
return e.push(h), h;
|
|
389
|
-
}
|
|
390
|
-
function qt(e) {
|
|
391
|
-
const t = pt(e);
|
|
392
|
-
if (t && t.length) {
|
|
393
|
-
const r = t.pop();
|
|
394
|
-
return r.nr.used = true, Bt(r), r;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function gt(e, t) {
|
|
398
|
-
const r = N.value, i = r.indexOf(e);
|
|
399
|
-
if (i === -1)
|
|
400
|
-
return;
|
|
401
|
-
const a = Math.max(0, Math.min(t, r.length - 1));
|
|
402
|
-
i !== a && (r.splice(i, 1), r.splice(a, 0, e));
|
|
403
|
-
}
|
|
404
|
-
function Zt(e) {
|
|
405
|
-
gt(e, N.value.length - 1);
|
|
406
|
-
}
|
|
407
|
-
function Jt() {
|
|
408
|
-
const e = N.value;
|
|
409
|
-
let t = 0;
|
|
410
|
-
for (; t < e.length && !e[t].nr.used; )
|
|
411
|
-
t++;
|
|
412
|
-
let r = 0;
|
|
413
|
-
for (let i = t; i < e.length && e[i].nr.used; i++)
|
|
414
|
-
r++;
|
|
415
|
-
return {
|
|
416
|
-
activeStart: t,
|
|
417
|
-
activeCount: r,
|
|
418
|
-
headInsertCount: 0
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
function Qt(e, t, r) {
|
|
422
|
-
let i = null;
|
|
423
|
-
t < G ? (i = r.activeStart + r.headInsertCount, r.headInsertCount++, r.activeCount++) : t >= X && (i = r.activeStart + r.activeCount, r.activeCount++), i != null && gt(e, i);
|
|
424
|
-
}
|
|
425
|
-
function St(e, t = false) {
|
|
426
|
-
var _a;
|
|
427
|
-
const r = e.nr.type;
|
|
428
|
-
pt(r).push(e), e.nr.used = false, e.position = (_a = v().hiddenPosition) != null ? _a : -999999, Bt(e), Ue.delete(e.nr.key), t && Zt(e);
|
|
429
|
-
}
|
|
430
|
-
function Kt() {
|
|
431
|
-
Ue.clear(), $e.clear();
|
|
432
|
-
for (let e = 0, t = N.value.length; e < t; e++) {
|
|
433
|
-
const r = N.value[e];
|
|
434
|
-
r && St(r);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function Je(e) {
|
|
438
|
-
let t = -1;
|
|
439
|
-
return t = requestAnimationFrame(() => {
|
|
440
|
-
_e.delete(t), e();
|
|
441
|
-
}), _e.add(t), t;
|
|
442
|
-
}
|
|
443
|
-
function yt() {
|
|
444
|
-
for (const e of _e)
|
|
445
|
-
cancelAnimationFrame(e);
|
|
446
|
-
_e.clear();
|
|
447
|
-
}
|
|
448
|
-
function It() {
|
|
449
|
-
se && (clearTimeout(se), se = null), ae && (clearTimeout(ae), ae = null), q && (clearTimeout(q), q = null), Y && (clearTimeout(Y), Y = null), be && (clearTimeout(be), be = null);
|
|
450
|
-
}
|
|
451
|
-
function Qe() {
|
|
452
|
-
var e, t;
|
|
453
|
-
M.value && ((t = (e = x.callbacks).onResize) == null || t.call(e), le.value && L(false));
|
|
454
|
-
}
|
|
455
|
-
function Ke() {
|
|
456
|
-
if (!M.value)
|
|
457
|
-
return;
|
|
458
|
-
te && !Xe && ne();
|
|
459
|
-
const e = v();
|
|
460
|
-
if (!Ee) {
|
|
461
|
-
if (Ee = true, se)
|
|
462
|
-
return;
|
|
463
|
-
const t = () => Je(() => {
|
|
464
|
-
Ee = false;
|
|
465
|
-
const { continuous: r } = L(false, true);
|
|
466
|
-
r || (ae && clearTimeout(ae), ae = setTimeout(Ke, e.updateInterval + 100));
|
|
467
|
-
});
|
|
468
|
-
t(), e.updateInterval && (se = setTimeout(() => {
|
|
469
|
-
se = null, Ee && t();
|
|
470
|
-
}, e.updateInterval));
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
function en(e, t) {
|
|
474
|
-
var r, i, a, d;
|
|
475
|
-
M.value && le.value && (e || t.boundingClientRect.width !== 0 || t.boundingClientRect.height !== 0 ? ((i = (r = x.callbacks).onVisible) == null || i.call(r), Je(() => {
|
|
476
|
-
L(false);
|
|
477
|
-
})) : (d = (a = x.callbacks).onHidden) == null || d.call(a));
|
|
478
|
-
}
|
|
479
|
-
function tn() {
|
|
480
|
-
var _a;
|
|
481
|
-
return (_a = ze.value) != null ? _a : window;
|
|
482
|
-
}
|
|
483
|
-
function Fe() {
|
|
484
|
-
const e = x.before.value;
|
|
485
|
-
if (!e)
|
|
486
|
-
return 0;
|
|
487
|
-
const t = v();
|
|
488
|
-
return J(t) === "vertical" ? e.scrollHeight : e.scrollWidth;
|
|
489
|
-
}
|
|
490
|
-
function de() {
|
|
491
|
-
const e = x.el.value;
|
|
492
|
-
if (!e)
|
|
493
|
-
return { start: 0, end: 0 };
|
|
494
|
-
const t = v(), r = J(t), i = r === "vertical";
|
|
495
|
-
let a;
|
|
496
|
-
if (ue()) {
|
|
497
|
-
const d = e.getBoundingClientRect(), h = i ? d.height : d.width, S = ze.value, p = !S || S === window, z = p ? 0 : S.getBoundingClientRect().top, c = p ? 0 : S.getBoundingClientRect().left, m = p ? window.innerHeight : S.clientHeight, V = p ? window.innerWidth : S.clientWidth;
|
|
498
|
-
let E = i ? -(d.top - z) : -(d.left - c), W = i ? m : V;
|
|
499
|
-
E < 0 && (W += E, E = 0), E + W > h && (W = h - E), a = {
|
|
500
|
-
start: E,
|
|
501
|
-
end: E + W
|
|
502
|
-
};
|
|
503
|
-
} else i ? a = {
|
|
504
|
-
start: e.scrollTop,
|
|
505
|
-
end: e.scrollTop + e.clientHeight
|
|
506
|
-
} : a = {
|
|
507
|
-
start: pe(e.scrollLeft, r, e),
|
|
508
|
-
end: pe(e.scrollLeft, r, e) + e.clientWidth
|
|
509
|
-
};
|
|
510
|
-
return a;
|
|
511
|
-
}
|
|
512
|
-
function nn() {
|
|
513
|
-
const e = x.el.value;
|
|
514
|
-
if (!e)
|
|
515
|
-
return { start: 0, end: 0 };
|
|
516
|
-
const t = v();
|
|
517
|
-
if (J(t) === "vertical") {
|
|
518
|
-
const r = pe(e.scrollLeft, "horizontal", e);
|
|
519
|
-
return {
|
|
520
|
-
start: r,
|
|
521
|
-
end: r + e.clientWidth
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
return {
|
|
525
|
-
start: e.scrollTop,
|
|
526
|
-
end: e.scrollTop + e.clientHeight
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
function rn(e, t, r, i) {
|
|
530
|
-
var _a, _b, _c, _d;
|
|
531
|
-
var S, p, z, c;
|
|
532
|
-
const a = Fe(), d = e.start - i - a, h = e.end + i - a;
|
|
533
|
-
if (G > 0) {
|
|
534
|
-
const m = (_a = (S = r[G - 1]) == null ? void 0 : S.accumulator) != null ? _a : 0;
|
|
535
|
-
if (d <= m)
|
|
536
|
-
return true;
|
|
537
|
-
}
|
|
538
|
-
if (G < t - 1) {
|
|
539
|
-
const m = (_b = (p = r[G]) == null ? void 0 : p.accumulator) != null ? _b : Number.POSITIVE_INFINITY;
|
|
540
|
-
if (d > m)
|
|
541
|
-
return true;
|
|
542
|
-
}
|
|
543
|
-
if (X > 1) {
|
|
544
|
-
const m = (_c = (z = r[X - 2]) == null ? void 0 : z.accumulator) != null ? _c : 0;
|
|
545
|
-
if (h <= m)
|
|
546
|
-
return true;
|
|
547
|
-
}
|
|
548
|
-
if (X < t) {
|
|
549
|
-
const m = (_d = (c = r[X - 1]) == null ? void 0 : c.accumulator) != null ? _d : Number.POSITIVE_INFINITY;
|
|
550
|
-
if (h > m)
|
|
551
|
-
return true;
|
|
552
|
-
}
|
|
553
|
-
return false;
|
|
554
|
-
}
|
|
555
|
-
function Le(e) {
|
|
556
|
-
const t = v(), r = D(t.itemSize);
|
|
557
|
-
if (r !== null)
|
|
558
|
-
return r;
|
|
559
|
-
const i = Me.value[e];
|
|
560
|
-
return (i == null ? void 0 : i.size) || Number(t.minItemSize) || 0;
|
|
561
|
-
}
|
|
562
|
-
function on(e) {
|
|
563
|
-
const t = v();
|
|
564
|
-
return Tn(e, {
|
|
565
|
-
direction: J(t),
|
|
566
|
-
mode: ce(t),
|
|
567
|
-
itemSize: D(t.itemSize),
|
|
568
|
-
gridItems: t.gridItems,
|
|
569
|
-
itemSecondarySize: t.itemSecondarySize
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
function U(e) {
|
|
573
|
-
var a;
|
|
574
|
-
const t = v(), r = t.gridItems || 1, i = D(t.itemSize);
|
|
575
|
-
return e <= 0 ? 0 : i !== null ? Math.floor(e / r) * i : ((a = Me.value[e - 1]) == null ? void 0 : a.accumulator) || 0;
|
|
576
|
-
}
|
|
577
|
-
function wt(e) {
|
|
578
|
-
const t = v(), r = T.value.length, i = t.gridItems || 1, a = D(t.itemSize);
|
|
579
|
-
if (!r)
|
|
580
|
-
return 0;
|
|
581
|
-
if (a !== null) {
|
|
582
|
-
const p = Math.floor(e / a) * i;
|
|
583
|
-
return Math.min(Math.max(p, 0), r - 1);
|
|
584
|
-
}
|
|
585
|
-
let d = 0, h = r - 1, S = 0;
|
|
586
|
-
for (; d <= h; ) {
|
|
587
|
-
const p = Math.floor((d + h) / 2);
|
|
588
|
-
U(p) <= e ? (S = p, d = p + 1) : h = p - 1;
|
|
589
|
-
}
|
|
590
|
-
return S;
|
|
591
|
-
}
|
|
592
|
-
function ne() {
|
|
593
|
-
Y && (clearTimeout(Y), Y = null), te = null;
|
|
594
|
-
}
|
|
595
|
-
function ln() {
|
|
596
|
-
Y && clearTimeout(Y), Y = setTimeout(() => {
|
|
597
|
-
te = null, Y = null;
|
|
598
|
-
}, 150);
|
|
599
|
-
}
|
|
600
|
-
function sn(e, t) {
|
|
601
|
-
if (!e.length) {
|
|
602
|
-
ne();
|
|
603
|
-
return;
|
|
604
|
-
}
|
|
605
|
-
const r = Math.max(de().start - Fe(), 0), i = Math.min(wt(r), e.length - 1), a = e[i], d = t ? f(a, i, t) : i, h = Fe() + U(i);
|
|
606
|
-
te = {
|
|
607
|
-
key: d,
|
|
608
|
-
offset: de().start - h
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
function xt(e) {
|
|
612
|
-
if (!te)
|
|
613
|
-
return false;
|
|
614
|
-
const t = v(), r = e != null ? e : T.value, i = Z.value ? null : t.keyField, d = Be(r, i).indexOf(te.key);
|
|
615
|
-
if (d === -1)
|
|
616
|
-
return ne(), false;
|
|
617
|
-
const h = Fe() + U(d) + te.offset, S = de().start;
|
|
618
|
-
return Math.abs(h - S) < 0.5 ? false : (Xe = true, Ce(h), Je(() => {
|
|
619
|
-
Xe = false;
|
|
620
|
-
}), true);
|
|
621
|
-
}
|
|
622
|
-
function Te() {
|
|
623
|
-
if (fe(), !M.value)
|
|
624
|
-
return;
|
|
625
|
-
const e = ue() ? tn() : x.el.value;
|
|
626
|
-
e && (Ie = e, Ie.addEventListener("scroll", Ke, Nn() ? { passive: true } : false), ue() && e === window && (we = e, we.addEventListener("resize", Qe)));
|
|
627
|
-
}
|
|
628
|
-
function fe() {
|
|
629
|
-
Ie && (Ie.removeEventListener("scroll", Ke), Ie = null), we && (we.removeEventListener("resize", Qe), we = null);
|
|
630
|
-
}
|
|
631
|
-
function an(e, t, r, i, a, d) {
|
|
632
|
-
var _a, _b;
|
|
633
|
-
const h = Math.ceil(e / t) * r, S = Math.max(0, Math.floor(a.start / r)), p = Math.min(Math.ceil(a.end / r), Math.ceil(e / t)), z = Math.max(0, Math.floor(d.start / i)), c = Math.min(Math.ceil(d.end / i), t), m = [];
|
|
634
|
-
for (let W = S; W < p; W++) {
|
|
635
|
-
const me = W * t;
|
|
636
|
-
for (let w = z; w < c; w++) {
|
|
637
|
-
const g = me + w;
|
|
638
|
-
if (g >= e)
|
|
639
|
-
break;
|
|
640
|
-
m.push(g);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
const V = (_a = m[0]) != null ? _a : 0, E = (_b = m.at(-1)) != null ? _b : -1;
|
|
644
|
-
return {
|
|
645
|
-
renderedIndices: m,
|
|
646
|
-
startIndex: V,
|
|
647
|
-
endIndex: E + 1,
|
|
648
|
-
visibleStartIndex: V,
|
|
649
|
-
visibleEndIndex: E,
|
|
650
|
-
totalSize: h
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
function un() {
|
|
654
|
-
const e = v(), t = D(e.itemSize);
|
|
655
|
-
if (!e.gridItems || t == null)
|
|
656
|
-
return false;
|
|
657
|
-
const r = x.el.value;
|
|
658
|
-
if (!r)
|
|
659
|
-
return false;
|
|
660
|
-
const i = e.itemSecondarySize || t, a = J(e) === "vertical" ? r.clientWidth : r.clientHeight;
|
|
661
|
-
return i * e.gridItems > a;
|
|
662
|
-
}
|
|
663
|
-
function bt(e, t, r, i) {
|
|
664
|
-
if (Math.abs(e - t) !== 1 || t < 0 || t >= r)
|
|
665
|
-
return e;
|
|
666
|
-
const a = e > t ? U(t) + Le(t) : U(t);
|
|
667
|
-
return Math.abs(a - i) <= Yt ? t : e;
|
|
668
|
-
}
|
|
669
|
-
function zt(e, t, r, i, a) {
|
|
670
|
-
if (Math.abs(e - t) !== 1)
|
|
671
|
-
return e;
|
|
672
|
-
const d = a ? t - 1 : t;
|
|
673
|
-
if (d < 0 || d >= r)
|
|
674
|
-
return e;
|
|
675
|
-
const h = e > t ? U(d) + Le(d) : U(d);
|
|
676
|
-
return Math.abs(h - i) <= Yt ? t : e;
|
|
677
|
-
}
|
|
678
|
-
function cn(e, t, r) {
|
|
679
|
-
const i = __spreadProps(__spreadValues({}, e), {
|
|
680
|
-
visibleStartIndex: bt(e.visibleStartIndex, at, t, r.rawViewportStart),
|
|
681
|
-
visibleEndIndex: zt(e.visibleEndIndex, ut, t, r.rawViewportEnd, false),
|
|
682
|
-
startIndex: bt(e.startIndex, G, t, r.renderStart),
|
|
683
|
-
endIndex: zt(e.endIndex, X, t, r.renderEnd, true)
|
|
684
|
-
});
|
|
685
|
-
i.startIndex > i.visibleStartIndex && (i.startIndex = i.visibleStartIndex);
|
|
686
|
-
const a = Math.min(t, i.visibleEndIndex + 1);
|
|
687
|
-
return i.endIndex < a && (i.endIndex = a), i.endIndex < i.startIndex && (i.endIndex = i.startIndex), i;
|
|
688
|
-
}
|
|
689
|
-
function L(e, t = false) {
|
|
690
|
-
var _a, _b, _c, _d, _e2, _f, _g;
|
|
691
|
-
var Vt, _t, Pt, Ft, Lt, Ct, Rt, Wt, kt;
|
|
692
|
-
if (!M.value)
|
|
693
|
-
return { continuous: true };
|
|
694
|
-
const r = v(), i = D(r.itemSize), a = r.gridItems || 1, d = r.itemSecondarySize || i || 0, h = Ge, S = r.typeField, p = Z.value ? null : r.keyField, z = T.value, c = z.length, m = Me.value, V = Ue, E = N.value;
|
|
695
|
-
let W = null, me = null, w, g, H, _, P;
|
|
696
|
-
const hn = i !== null || c === 0 || m[c - 1] != null;
|
|
697
|
-
if (!c || !hn)
|
|
698
|
-
!c || !ee ? w = g = _ = P = H = 0 : (w = Math.min(ee.startIndex, c), g = Math.min(ee.endIndex, c), _ = Math.min(ee.visibleStartIndex, c), P = Math.min(ee.visibleEndIndex, c), H = (_a = (Vt = m[c - 1]) == null ? void 0 : Vt.accumulator) != null ? _a : ee.totalSizeValue);
|
|
699
|
-
else if (De)
|
|
700
|
-
w = _ = 0, g = P = Math.min(r.prerender, z.length), H = 0;
|
|
701
|
-
else {
|
|
702
|
-
const b = de(), R = nn(), $ = je, j = dt, C = __spreadValues({}, b), he = __spreadValues({}, R);
|
|
703
|
-
if (t) {
|
|
704
|
-
let F = b.start - $;
|
|
705
|
-
F < 0 && (F = -F);
|
|
706
|
-
let oe = R.start - j;
|
|
707
|
-
oe < 0 && (oe = -oe);
|
|
708
|
-
const Ne = i === null && rn(b, c, m, r.buffer), k = i === null && (F >= h || Ne) || i !== null && F >= i, He = a > 1 && i != null && oe >= d;
|
|
709
|
-
if (!k && !He)
|
|
710
|
-
return {
|
|
711
|
-
continuous: true
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
|
-
je = b.start, dt = R.start;
|
|
715
|
-
const Q = r.buffer;
|
|
716
|
-
C.start -= Q, C.end += Q, he.start -= Q, he.end += Q;
|
|
717
|
-
let O = 0;
|
|
718
|
-
const Nt = x.before.value;
|
|
719
|
-
Nt && (O = Nt.scrollHeight, C.start -= O);
|
|
720
|
-
const Ht = x.after.value;
|
|
721
|
-
if (Ht) {
|
|
722
|
-
const F = Ht.scrollHeight;
|
|
723
|
-
C.end += F;
|
|
724
|
-
}
|
|
725
|
-
const vn = ce(r) === "flow" && i === null && !t && ct && Math.abs(b.start - $) <= Ot && Math.abs(R.start - j) <= Ot;
|
|
726
|
-
if (i === null) {
|
|
727
|
-
let F, oe = 0, Ne = c - 1, k = ~~(c / 2), He;
|
|
728
|
-
do
|
|
729
|
-
He = k, F = (_b = (_t = m[k]) == null ? void 0 : _t.accumulator) != null ? _b : 0, F < C.start ? oe = k : k < c - 1 && ((_c = (Pt = m[k + 1]) == null ? void 0 : Pt.accumulator) != null ? _c : Number.POSITIVE_INFINITY) > C.start && (Ne = k), k = ~~((oe + Ne) / 2);
|
|
730
|
-
while (k !== He);
|
|
731
|
-
for (k < 0 && (k = 0), w = k, H = (_d = (Ft = m[c - 1]) == null ? void 0 : Ft.accumulator) != null ? _d : 0, g = k; g < c && ((_e2 = (Lt = m[g]) == null ? void 0 : Lt.accumulator) != null ? _e2 : 0) < C.end; g++) ;
|
|
732
|
-
for (g === -1 ? g = z.length - 1 : (g++, g > c && (g = c)), _ = w; _ < c && O + ((_f = (Ct = m[_]) == null ? void 0 : Ct.accumulator) != null ? _f : Number.POSITIVE_INFINITY) < C.start; _++) ;
|
|
733
|
-
for (P = _; P < c && O + ((_g = (Rt = m[P]) == null ? void 0 : Rt.accumulator) != null ? _g : 0) < C.end; P++) ;
|
|
734
|
-
if (vn) {
|
|
735
|
-
const Ae = cn({
|
|
736
|
-
startIndex: w,
|
|
737
|
-
endIndex: g,
|
|
738
|
-
visibleStartIndex: _,
|
|
739
|
-
visibleEndIndex: P
|
|
740
|
-
}, c, {
|
|
741
|
-
rawViewportStart: b.start - O,
|
|
742
|
-
rawViewportEnd: b.end - O,
|
|
743
|
-
renderStart: b.start - Q - O,
|
|
744
|
-
renderEnd: b.end + Q - O
|
|
745
|
-
});
|
|
746
|
-
w = Ae.startIndex, g = Ae.endIndex, _ = Ae.visibleStartIndex, P = Ae.visibleEndIndex;
|
|
747
|
-
}
|
|
748
|
-
ee = {
|
|
749
|
-
startIndex: w,
|
|
750
|
-
endIndex: g,
|
|
751
|
-
visibleStartIndex: _,
|
|
752
|
-
visibleEndIndex: P,
|
|
753
|
-
totalSizeValue: H
|
|
754
|
-
};
|
|
755
|
-
} else if (a > 1) {
|
|
756
|
-
const F = an(
|
|
757
|
-
c,
|
|
758
|
-
a,
|
|
759
|
-
i,
|
|
760
|
-
d,
|
|
761
|
-
C,
|
|
762
|
-
he
|
|
763
|
-
);
|
|
764
|
-
W = F.renderedIndices, me = new Set(W), w = F.startIndex, g = F.endIndex, _ = F.visibleStartIndex, P = F.visibleEndIndex, H = F.totalSize;
|
|
765
|
-
} else {
|
|
766
|
-
w = ~~(C.start / i * a);
|
|
767
|
-
const F = w % a;
|
|
768
|
-
w -= F, g = Math.ceil(C.end / i * a), _ = Math.max(0, Math.floor((C.start - O) / i * a)), P = Math.floor((C.end - O) / i * a), w < 0 && (w = 0), g > c && (g = c), _ < 0 && (_ = 0), P > c && (P = c), H = Math.ceil(c / a) * i;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
g - w > Vn.itemsLimit && dn(), ge.value = H, Se.value = 0, ye.value = ce(r) === "flow" ? H : 0;
|
|
772
|
-
let y;
|
|
773
|
-
const et = w <= X && g >= G, Tt = ce(r) === "flow", tt = Tt && et && !e;
|
|
774
|
-
let nt = null;
|
|
775
|
-
if (!et || e)
|
|
776
|
-
Kt();
|
|
777
|
-
else {
|
|
778
|
-
const b = (R) => {
|
|
779
|
-
const $ = E[R];
|
|
780
|
-
$ && (y = $, y.nr.used && ((me ? me.has(y.nr.index) : y.nr.index >= w && y.nr.index < g) || St(y, tt)));
|
|
781
|
-
};
|
|
782
|
-
if (tt) {
|
|
783
|
-
for (let R = E.length - 1; R >= 0; R--)
|
|
784
|
-
b(R);
|
|
785
|
-
nt = Jt();
|
|
786
|
-
} else
|
|
787
|
-
for (let R = 0, $ = E.length; R < $; R++)
|
|
788
|
-
b(R);
|
|
789
|
-
}
|
|
790
|
-
let ie, We, ke = null, Et = 0;
|
|
791
|
-
return Dn(w, g, W, (b) => {
|
|
792
|
-
var he;
|
|
793
|
-
const R = m[b] && m[b].size, $ = i || R || Ge || 1;
|
|
794
|
-
ie = z[b];
|
|
795
|
-
const j = p ? f(ie, b, p) : b;
|
|
796
|
-
y = V.get(j);
|
|
797
|
-
let C = false;
|
|
798
|
-
if (y)
|
|
799
|
-
y.item !== ie && (y.item = ie), y.nr.used || console.warn(`Expected existing view's used flag to be true, got ${y.nr.used}`);
|
|
800
|
-
else {
|
|
801
|
-
if (We = ie[S], y = qt(We), y) {
|
|
802
|
-
const Q = y.nr.index !== b || y.nr.key !== j;
|
|
803
|
-
y.item = ie, y.nr.index = b, y.nr.key = j, y.nr.type !== We && console.warn("Reused view's type does not match pool's type"), Q && jn(y);
|
|
804
|
-
} else
|
|
805
|
-
y = Xt(E, b, ie, j, We);
|
|
806
|
-
V.set(j, y), C = true;
|
|
807
|
-
}
|
|
808
|
-
i === null ? (y.position = ((he = m[b - 1]) == null ? void 0 : he.accumulator) || 0, y.offset = 0) : (y.position = Math.floor(b / a) * i, y.offset = b % a * d), nt && C && Qt(y, b, nt), ke != null ? ke : ke = y.position, Et += $;
|
|
809
|
-
}), Tt ? (ke == null ? (Se.value = 0, ye.value = H) : (Se.value = ke, ye.value = Math.max(0, H - ke - Et)), tt || vt()) : (Se.value = 0, ye.value = 0), G = w, X = g, at = _, ut = P, ct = true, r.emitUpdate && ((kt = (Wt = x.callbacks).onUpdate) == null || kt.call(Wt, w, g, _, P)), ce(r) !== "flow" && (q && clearTimeout(q), q = setTimeout(Mt, r.updateInterval + 300)), {
|
|
810
|
-
continuous: et
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
function dn() {
|
|
814
|
-
throw be = setTimeout(() => {
|
|
815
|
-
be = null, console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", x.el.value), console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
|
|
816
|
-
}), new Error("Rendered items limit reached");
|
|
817
|
-
}
|
|
818
|
-
function fn() {
|
|
819
|
-
if (un())
|
|
820
|
-
return false;
|
|
821
|
-
const e = N.value.filter(({ nr: t }) => t.used);
|
|
822
|
-
for (let t = 1; t < e.length; t++)
|
|
823
|
-
if (e[t].nr.index !== e[t - 1].nr.index + 1)
|
|
824
|
-
return true;
|
|
825
|
-
return false;
|
|
826
|
-
}
|
|
827
|
-
function Mt() {
|
|
828
|
-
if (M.value) {
|
|
829
|
-
if (ce() === "flow") {
|
|
830
|
-
vt();
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
N.value.sort((e, t) => e.nr.index - t.nr.index), fn() && (L(false), q && clearTimeout(q));
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
function mn(e, t) {
|
|
837
|
-
var _a, _b;
|
|
838
|
-
if (!M.value)
|
|
839
|
-
return;
|
|
840
|
-
const r = v(), i = J(r), a = x.el.value;
|
|
841
|
-
if (!a)
|
|
842
|
-
return;
|
|
843
|
-
const d = Math.max(0, Math.min(e, T.value.length - 1)), h = de().start, S = Fn(a, i, r.pageMode, ze.value), p = U(d), z = Le(d), c = At(
|
|
844
|
-
p,
|
|
845
|
-
z,
|
|
846
|
-
h,
|
|
847
|
-
S,
|
|
848
|
-
t == null ? void 0 : t.align,
|
|
849
|
-
(_a = t == null ? void 0 : t.offset) != null ? _a : 0
|
|
850
|
-
);
|
|
851
|
-
if (c == null)
|
|
852
|
-
return;
|
|
853
|
-
Ce(c, t);
|
|
854
|
-
const m = D(r.itemSize);
|
|
855
|
-
if (r.gridItems && m != null) {
|
|
856
|
-
const V = x.el.value;
|
|
857
|
-
if (!V)
|
|
858
|
-
return;
|
|
859
|
-
const E = r.gridItems, W = r.itemSecondarySize || m, w = d % E * W, g = i === "vertical" ? "horizontal" : "vertical", H = g === "horizontal" ? pe(V.scrollLeft, "horizontal", V) : V.scrollTop, _ = g === "horizontal" ? V.clientWidth : V.clientHeight, P = At(
|
|
860
|
-
w,
|
|
861
|
-
W,
|
|
862
|
-
H,
|
|
863
|
-
_,
|
|
864
|
-
t == null ? void 0 : t.align,
|
|
865
|
-
(_b = t == null ? void 0 : t.offset) != null ? _b : 0
|
|
866
|
-
);
|
|
867
|
-
P != null && it(V, g, P, t);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
function Ce(e, t) {
|
|
871
|
-
var _a;
|
|
872
|
-
if (!M.value)
|
|
873
|
-
return;
|
|
874
|
-
const r = v(), i = J(r), a = x.el.value;
|
|
875
|
-
if (a)
|
|
876
|
-
if (ue()) {
|
|
877
|
-
const d = (_a = ze.value) != null ? _a : window, h = i === "vertical" ? "top" : "left", S = d === window, p = S ? document.scrollingElement || document.documentElement : d, z = p.getBoundingClientRect(), c = a.getBoundingClientRect(), m = S ? i === "vertical" ? window.scrollY : window.scrollX : pe(
|
|
878
|
-
i === "vertical" ? p.scrollTop : p.scrollLeft,
|
|
879
|
-
i,
|
|
880
|
-
p
|
|
881
|
-
), V = c[h] - z[h];
|
|
882
|
-
it(S ? window : p, i, e + m + V, t);
|
|
883
|
-
} else
|
|
884
|
-
it(a, i, e, t);
|
|
885
|
-
}
|
|
886
|
-
const re = v(), Re = T.value;
|
|
887
|
-
return Ve = Be(Re, Re.length > 0 && typeof Re[0] != "object" ? null : re.keyField), xe = Ye(Re, re.typeField), re.cache && Ze(re.cache), M.value && re.prerender && (De = true, L(false)), re.gridItems && D(re.itemSize) == null && console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"), onMounted(() => {
|
|
888
|
-
M.value && (Te(), nextTick(() => {
|
|
889
|
-
De = false, L(true), le.value = true;
|
|
890
|
-
}));
|
|
891
|
-
}), onActivated(() => {
|
|
892
|
-
if (!M.value)
|
|
893
|
-
return;
|
|
894
|
-
const e = je;
|
|
895
|
-
typeof e == "number" && nextTick(() => {
|
|
896
|
-
Ce(e);
|
|
897
|
-
});
|
|
898
|
-
}), onBeforeUnmount(() => {
|
|
899
|
-
It(), yt(), fe();
|
|
900
|
-
}), watch(M, (e) => {
|
|
901
|
-
e ? (Te(), nextTick(() => {
|
|
902
|
-
L(true), le.value = true;
|
|
903
|
-
})) : (fe(), It(), yt(), le.value = false);
|
|
904
|
-
}), watch(() => v().cache, (e) => {
|
|
905
|
-
M.value && (Ze(e), L(true));
|
|
906
|
-
}), watch(() => toValue(v().items).slice(), (e, t) => {
|
|
907
|
-
if (!M.value)
|
|
908
|
-
return;
|
|
909
|
-
const r = v(), i = Z.value ? null : r.keyField, a = Be(e, i), d = Ye(e, r.typeField), h = Ve, p = !$n(
|
|
910
|
-
a,
|
|
911
|
-
d,
|
|
912
|
-
h,
|
|
913
|
-
xe
|
|
914
|
-
);
|
|
915
|
-
r.shift && zn(h, a) > 0 ? sn(t != null ? t : [], i) : ne(), Ve = a, xe = d, xt(e), L(p);
|
|
916
|
-
}), watch(() => v().keyField, () => {
|
|
917
|
-
if (!M.value)
|
|
918
|
-
return;
|
|
919
|
-
const e = v(), t = Z.value ? null : e.keyField;
|
|
920
|
-
Ve = Be(T.value, t), xe = Ye(T.value, e.typeField), ne(), L(true);
|
|
921
|
-
}), watch(() => v().typeField, () => {
|
|
922
|
-
if (!M.value)
|
|
923
|
-
return;
|
|
924
|
-
const e = v();
|
|
925
|
-
xe = Ye(T.value, e.typeField), ne(), L(true);
|
|
926
|
-
}), watch(ue, () => {
|
|
927
|
-
M.value && (fe(), Te(), L(false));
|
|
928
|
-
}), watch(x.el, () => {
|
|
929
|
-
M.value && (fe(), Te(), L(false));
|
|
930
|
-
}), watch(ze, () => {
|
|
931
|
-
!M.value || !ue() || (fe(), Te(), L(false));
|
|
932
|
-
}), watch(Me, () => {
|
|
933
|
-
M.value && (xt() && ln(), L(false));
|
|
934
|
-
}), watch(() => v().gridItems, () => {
|
|
935
|
-
M.value && L(true);
|
|
936
|
-
}), watch(() => v().itemSecondarySize, () => {
|
|
937
|
-
M.value && L(true);
|
|
938
|
-
}), {
|
|
939
|
-
pool: N,
|
|
940
|
-
visiblePool: Dt,
|
|
941
|
-
totalSize: ge,
|
|
942
|
-
startSpacerSize: Se,
|
|
943
|
-
endSpacerSize: ye,
|
|
944
|
-
ready: le,
|
|
945
|
-
sizes: Me,
|
|
946
|
-
simpleArray: Z,
|
|
947
|
-
scrollToItem: mn,
|
|
948
|
-
scrollToPosition: Ce,
|
|
949
|
-
getScroll: de,
|
|
950
|
-
findItemIndex: wt,
|
|
951
|
-
getItemOffset: U,
|
|
952
|
-
getItemSize: Le,
|
|
953
|
-
getViewStyle: on,
|
|
954
|
-
cacheSnapshot: Gt,
|
|
955
|
-
restoreCache: Ze,
|
|
956
|
-
updateVisibleItems: L,
|
|
957
|
-
handleResize: Qe,
|
|
958
|
-
handleVisibilityChange: en,
|
|
959
|
-
sortViews: Mt
|
|
960
|
-
};
|
|
961
|
-
}
|
|
1
|
+
var weekOfYear = { exports: {} };
|
|
962
2
|
export {
|
|
963
|
-
|
|
964
|
-
Be as b,
|
|
965
|
-
Vn as c,
|
|
966
|
-
bn as d,
|
|
967
|
-
Tn as e,
|
|
968
|
-
zn as f,
|
|
969
|
-
D as g,
|
|
970
|
-
Mn as r,
|
|
971
|
-
qn as u
|
|
3
|
+
weekOfYear as __module
|
|
972
4
|
};
|
|
973
5
|
//# sourceMappingURL=index243.mjs.map
|