aptechka 0.71.24 → 0.71.26
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/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +8 -11
- package/lib/scroll/ScrollSection.d.ts +1 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +426 -417
- package/package.json +1 -1
package/lib/scroll/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var oi = Object.defineProperty;
|
|
2
|
-
var Ns = Object.getOwnPropertySymbols,
|
|
3
|
-
var Gs = (
|
|
4
|
-
throw TypeError(
|
|
2
|
+
var Ns = Object.getOwnPropertySymbols, ci = Object.getPrototypeOf, li = Object.prototype.hasOwnProperty, ui = Object.prototype.propertyIsEnumerable, ai = Reflect.get;
|
|
3
|
+
var Gs = (d) => {
|
|
4
|
+
throw TypeError(d);
|
|
5
5
|
};
|
|
6
|
-
var qs = (
|
|
6
|
+
var qs = (d, n, e) => n in d ? oi(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e, Us = (d, n) => {
|
|
7
7
|
for (var e in n || (n = {}))
|
|
8
|
-
|
|
8
|
+
li.call(n, e) && qs(d, e, n[e]);
|
|
9
9
|
if (Ns)
|
|
10
10
|
for (var e of Ns(n))
|
|
11
|
-
ui.call(n, e) && qs(
|
|
12
|
-
return
|
|
11
|
+
ui.call(n, e) && qs(d, e, n[e]);
|
|
12
|
+
return d;
|
|
13
13
|
};
|
|
14
|
-
var Ls = (
|
|
15
|
-
var t = (
|
|
16
|
-
var ks = (
|
|
17
|
-
var Vs = (
|
|
14
|
+
var Ls = (d, n, e) => n.has(d) || Gs("Cannot " + e);
|
|
15
|
+
var t = (d, n, e) => (Ls(d, n, "read from private field"), e ? e.call(d) : n.get(d)), i = (d, n, e) => n.has(d) ? Gs("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(d) : n.set(d, e), r = (d, n, e, s) => (Ls(d, n, "write to private field"), s ? s.call(d, e) : n.set(d, e), e), o = (d, n, e) => (Ls(d, n, "access private method"), e);
|
|
16
|
+
var ks = (d, n, e) => ai(ci(d), e, n);
|
|
17
|
+
var Vs = (d, n, e) => new Promise((s, h) => {
|
|
18
18
|
var u = (C) => {
|
|
19
19
|
try {
|
|
20
20
|
v(e.next(C));
|
|
@@ -28,15 +28,15 @@ var Vs = (a, n, e) => new Promise((s, h) => {
|
|
|
28
28
|
h(le);
|
|
29
29
|
}
|
|
30
30
|
}, v = (C) => C.done ? s(C.value) : Promise.resolve(C.value).then(u, g);
|
|
31
|
-
v((e = e.apply(
|
|
31
|
+
v((e = e.apply(d, n)).next());
|
|
32
32
|
});
|
|
33
|
-
import { S as
|
|
33
|
+
import { S as ue } from "../Store-0BVty6AZ.js";
|
|
34
34
|
import { i as q } from "../index-Bv9zgfdb.js";
|
|
35
35
|
import { q as di } from "../easings-BEmRlrDd.js";
|
|
36
|
-
import { i as
|
|
37
|
-
import { d as
|
|
36
|
+
import { i as fi } from "../element-CGVl1jA-.js";
|
|
37
|
+
import { d as st } from "../events-CsVF98U6.js";
|
|
38
38
|
import { d as ws } from "../function-C10DGppn.js";
|
|
39
|
-
import { a as os, g as
|
|
39
|
+
import { a as os, g as cs, c as pi } from "../layout-DpZo-I0y.js";
|
|
40
40
|
import { c as Zs, s as bi } from "../math-BOBiC4TN.js";
|
|
41
41
|
import { p as mi, l as Si } from "../number-CumqY64S.js";
|
|
42
42
|
import { c as js } from "../stylesheet-DpnWNVyD.js";
|
|
@@ -45,41 +45,41 @@ import { TICK_ORDER as Js, RESIZE_ORDER as xs } from "../order/index.js";
|
|
|
45
45
|
import { D as Qs } from "../Damped-CtQmJ52v.js";
|
|
46
46
|
import { T as gi } from "../Tweened-BlZB0vl4.js";
|
|
47
47
|
import { W as vi, K as yi, D as Ci, A as Pi } from "../DragControls-CkhCt-4W.js";
|
|
48
|
-
import { windowResizer as
|
|
49
|
-
import { scrollEntries as
|
|
48
|
+
import { windowResizer as pt } from "../window-resizer/index.js";
|
|
49
|
+
import { scrollEntries as ce } from "../scroll-entries/index.js";
|
|
50
50
|
import { cssUnitParser as Ks } from "../css-unit-parser/index.js";
|
|
51
|
-
import { CSSProperty as
|
|
51
|
+
import { CSSProperty as c } from "../css-property/index.js";
|
|
52
52
|
import { d as Ei } from "../Viewport-DA10iWAO.js";
|
|
53
53
|
import "construct-style-sheets-polyfill";
|
|
54
54
|
import { elementResizer as ns } from "../element-resizer/index.js";
|
|
55
55
|
import { s as wi } from "../gestures-CcXV6fCp.js";
|
|
56
56
|
import { b as xi } from "../dom-CVWzyXPH.js";
|
|
57
|
-
var
|
|
57
|
+
var p, Te, E, ls, us, fe, bt, Dt, pe, Ot, Me;
|
|
58
58
|
class Li {
|
|
59
59
|
constructor(n, e, s) {
|
|
60
|
-
i(this,
|
|
61
|
-
i(this,
|
|
62
|
-
i(this,
|
|
60
|
+
i(this, Ot);
|
|
61
|
+
i(this, p);
|
|
62
|
+
i(this, Te);
|
|
63
63
|
i(this, E);
|
|
64
|
-
i(this,
|
|
64
|
+
i(this, ls, 0);
|
|
65
65
|
i(this, us, 0);
|
|
66
|
-
i(this,
|
|
66
|
+
i(this, fe, 0);
|
|
67
67
|
i(this, bt, 0);
|
|
68
68
|
i(this, Dt, null);
|
|
69
69
|
i(this, pe, 0);
|
|
70
|
-
r(this,
|
|
70
|
+
r(this, p, n), r(this, Te, e), r(this, E, s), ce.register(t(this, p)), this.setIndex(t(this, Te));
|
|
71
71
|
}
|
|
72
72
|
get element() {
|
|
73
|
-
return t(this,
|
|
73
|
+
return t(this, p);
|
|
74
74
|
}
|
|
75
75
|
get index() {
|
|
76
|
-
return t(this,
|
|
76
|
+
return t(this, Te);
|
|
77
77
|
}
|
|
78
78
|
get size() {
|
|
79
|
-
return t(this,
|
|
79
|
+
return t(this, fe);
|
|
80
80
|
}
|
|
81
81
|
get width() {
|
|
82
|
-
return t(this,
|
|
82
|
+
return t(this, ls);
|
|
83
83
|
}
|
|
84
84
|
get height() {
|
|
85
85
|
return t(this, us);
|
|
@@ -91,31 +91,31 @@ class Li {
|
|
|
91
91
|
return t(this, pe);
|
|
92
92
|
}
|
|
93
93
|
destroy() {
|
|
94
|
-
|
|
94
|
+
ce.unregister(t(this, p)), this.unsetTransform();
|
|
95
95
|
}
|
|
96
96
|
unsetTransform() {
|
|
97
|
-
t(this,
|
|
97
|
+
t(this, p).style.transform = "", this.setMark(null), this.setIndex(null), this.setCurrentIndex(null), this.setCurrentIndexArc(null), this.setCurrentIndexArcAbs(null), this.setOffsetIndex(null), this.setMiddle(!1), this.setSize();
|
|
98
98
|
}
|
|
99
99
|
setSize(n) {
|
|
100
|
-
n ? (t(this,
|
|
100
|
+
n ? (t(this, p).style.setProperty("--size", n + "px"), t(this, E).axisCSSProperty.current === "x" ? (t(this, p).style.width = n + "px", t(this, p).style.height = "") : (t(this, p).style.height = n + "px", t(this, p).style.width = "")) : (t(this, p).style.width = "", t(this, p).style.height = "", t(this, p).style.removeProperty("--size"));
|
|
101
101
|
}
|
|
102
102
|
resize() {
|
|
103
|
-
r(this,
|
|
103
|
+
r(this, ls, t(this, p).offsetWidth), r(this, us, t(this, p).offsetHeight), r(this, fe, t(this, E).vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth), r(this, bt, t(this, E).vertical ? os(t(this, p)) : cs(t(this, p))), r(this, bt, t(this, bt) - t(this, E).contentPosition);
|
|
104
104
|
}
|
|
105
105
|
transform() {
|
|
106
106
|
const n = t(this, E).shiftSectionPositionCSSProperty.current;
|
|
107
107
|
let e = n;
|
|
108
108
|
const s = t(this, E).viewportSize * t(this, E).sectionDistanceScaleCSSProperty.current;
|
|
109
|
-
t(this, E).loopCSSProperty.current && t(this, bt) + t(this,
|
|
110
|
-
t(this,
|
|
109
|
+
t(this, E).loopCSSProperty.current && t(this, bt) + t(this, fe) <= t(this, E).currentScrollValue - n / 2 && (e = (t(this, E).distance - n) * -1 - t(this, E).gap), ce.update(
|
|
110
|
+
t(this, p),
|
|
111
111
|
t(this, E).axisCSSProperty.current,
|
|
112
112
|
e
|
|
113
113
|
);
|
|
114
|
-
const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this,
|
|
115
|
-
r(this, pe, v * -1), t(this, E).vertical ? t(this,
|
|
114
|
+
const h = t(this, E).currentScrollValue + e, u = t(this, bt) - t(this, E).viewportSize - s, g = t(this, bt) + t(this, fe) + s, v = mi(Zs(h, u, g), 3);
|
|
115
|
+
r(this, pe, v * -1), t(this, E).vertical ? t(this, p).style.transform = `translate3d(0px, ${t(this, pe)}px, 0px)` : t(this, p).style.transform = `translate3d(${t(this, pe)}px, 0px, 0px)`;
|
|
116
116
|
}
|
|
117
117
|
setMark(n) {
|
|
118
|
-
t(this, Dt) !== n && (t(this, Dt) && t(this,
|
|
118
|
+
t(this, Dt) !== n && (t(this, Dt) && t(this, p).classList.remove(t(this, Dt)), n && t(this, p).classList.add(n), r(this, Dt, n), st(t(this, p), "scrollSectionMarkChange", {
|
|
119
119
|
composed: !0,
|
|
120
120
|
detail: {
|
|
121
121
|
mark: t(this, Dt)
|
|
@@ -124,23 +124,26 @@ class Li {
|
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
126
|
setMiddle(n) {
|
|
127
|
-
t(this,
|
|
127
|
+
t(this, p).classList.toggle("middle", n);
|
|
128
128
|
}
|
|
129
129
|
setIndex(n) {
|
|
130
|
-
o(this,
|
|
130
|
+
o(this, Ot, Me).call(this, "index", n);
|
|
131
131
|
}
|
|
132
132
|
setCurrentIndex(n) {
|
|
133
|
-
o(this,
|
|
133
|
+
o(this, Ot, Me).call(this, "current-index", n);
|
|
134
134
|
}
|
|
135
135
|
setCurrentIndexArc(n) {
|
|
136
|
-
o(this,
|
|
136
|
+
o(this, Ot, Me).call(this, "current-index-arc", n);
|
|
137
|
+
}
|
|
138
|
+
setOffsetIndex(n) {
|
|
139
|
+
o(this, Ot, Me).call(this, "offset-index", n);
|
|
137
140
|
}
|
|
138
141
|
setCurrentIndexArcAbs(n) {
|
|
139
|
-
o(this,
|
|
142
|
+
o(this, Ot, Me).call(this, "current-index-arc-abs", n);
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
|
-
|
|
143
|
-
e !== null ? (t(this,
|
|
145
|
+
p = new WeakMap(), Te = new WeakMap(), E = new WeakMap(), ls = new WeakMap(), us = new WeakMap(), fe = new WeakMap(), bt = new WeakMap(), Dt = new WeakMap(), pe = new WeakMap(), Ot = new WeakSet(), Me = function(n, e) {
|
|
146
|
+
e !== null ? (t(this, p).style.setProperty(`--${n}`, e.toString()), t(this, p).setAttribute(`data-${n}`, e.toString())) : (t(this, p).style.removeProperty(`--${n}`), t(this, p).removeAttribute(`data-${n}`));
|
|
144
147
|
};
|
|
145
148
|
const ki = js({
|
|
146
149
|
":host": {
|
|
@@ -181,177 +184,177 @@ const ki = js({
|
|
|
181
184
|
flexShrink: "0"
|
|
182
185
|
}
|
|
183
186
|
});
|
|
184
|
-
var
|
|
187
|
+
var f, be, D, Ht, mt, St, gt, J, $t, Bt, vt, Wt, me, Q, V, Se, ge, ve, ye, Re, Ce, X, Pe, Nt, Y, qt, yt, Ee, Gt, we, Ut, Kt, Zt, b, De, G, a, as, ds, L, P, U, it, jt, rt, F, z, Oe, Ct, Pt, Et, K, He, Jt, Qt, xe, ht, A, $e, wt, Le, Be, l, As, rs, Fe, Ps, Es, Is, Ms, T, fs, Xs, We, ps, Fs, Ts, ae, Ys, bs, hs, Ne;
|
|
185
188
|
class zs extends HTMLElement {
|
|
186
189
|
constructor() {
|
|
187
190
|
super();
|
|
188
|
-
i(this,
|
|
189
|
-
i(this,
|
|
190
|
-
i(this, be, new
|
|
191
|
-
i(this,
|
|
192
|
-
i(this,
|
|
193
|
-
i(this, mt, new
|
|
194
|
-
i(this, St, new
|
|
191
|
+
i(this, l);
|
|
192
|
+
i(this, f, null);
|
|
193
|
+
i(this, be, new c(this, "--controls", !0));
|
|
194
|
+
i(this, D, new c(this, "--axis", "y"));
|
|
195
|
+
i(this, Ht, new c(this, "--reverse", !1));
|
|
196
|
+
i(this, mt, new c(this, "--direction", 0));
|
|
197
|
+
i(this, St, new c(this, "--pages", 0, {
|
|
195
198
|
validate: (e) => Math.max(0, e - 1)
|
|
196
199
|
}));
|
|
197
|
-
i(this, gt, new
|
|
198
|
-
i(this,
|
|
199
|
-
i(this,
|
|
200
|
+
i(this, gt, new c(this, "--split", !1));
|
|
201
|
+
i(this, J, new c(this, "--sectional", !1));
|
|
202
|
+
i(this, $t, new c(
|
|
200
203
|
this,
|
|
201
204
|
"--tween-easing",
|
|
202
205
|
!1
|
|
203
206
|
));
|
|
204
|
-
i(this,
|
|
207
|
+
i(this, Bt, new c(
|
|
205
208
|
this,
|
|
206
209
|
"--tween-duration",
|
|
207
210
|
!1
|
|
208
211
|
));
|
|
209
|
-
i(this, vt, new
|
|
210
|
-
i(this,
|
|
212
|
+
i(this, vt, new c(this, "--auto-size", !1));
|
|
213
|
+
i(this, Wt, new c(
|
|
211
214
|
this,
|
|
212
215
|
"--wheel-max-delta",
|
|
213
216
|
!1
|
|
214
217
|
));
|
|
215
|
-
i(this, me, new
|
|
216
|
-
i(this,
|
|
218
|
+
i(this, me, new c(this, "--drag-inertion", 1));
|
|
219
|
+
i(this, Q, new c(
|
|
217
220
|
this,
|
|
218
221
|
"--sections-in-view",
|
|
219
222
|
1
|
|
220
223
|
));
|
|
221
|
-
i(this, V, new
|
|
222
|
-
i(this, Se, new
|
|
223
|
-
i(this, ge, new
|
|
224
|
-
i(this, ve, new
|
|
225
|
-
i(this, ye, new
|
|
226
|
-
i(this,
|
|
224
|
+
i(this, V, new c(this, "--loop", !1));
|
|
225
|
+
i(this, Se, new c(this, "--damping", 20));
|
|
226
|
+
i(this, ge, new c(this, "--mass", 0));
|
|
227
|
+
i(this, ve, new c(this, "--stiffness", 0));
|
|
228
|
+
i(this, ye, new c(this, "--mouse-drag", !1));
|
|
229
|
+
i(this, Re, new c(
|
|
227
230
|
this,
|
|
228
231
|
"--section-distance-scale",
|
|
229
232
|
0.5
|
|
230
233
|
));
|
|
231
|
-
i(this, Ce, new
|
|
232
|
-
i(this,
|
|
233
|
-
i(this, Pe, new
|
|
234
|
+
i(this, Ce, new c(this, "--start-section", 0));
|
|
235
|
+
i(this, X, new c(this, "--autoplay", 0));
|
|
236
|
+
i(this, Pe, new c(
|
|
234
237
|
this,
|
|
235
238
|
"--autoplay-pause-duration",
|
|
236
239
|
0
|
|
237
240
|
));
|
|
238
|
-
i(this,
|
|
241
|
+
i(this, Nt, new c(
|
|
239
242
|
this,
|
|
240
243
|
"--autoplay-user-direction",
|
|
241
244
|
!1
|
|
242
245
|
));
|
|
243
|
-
i(this,
|
|
244
|
-
i(this,
|
|
246
|
+
i(this, Y, new c(this, "--classes", !1));
|
|
247
|
+
i(this, qt, new c(
|
|
245
248
|
this,
|
|
246
249
|
"--current-index-start-offset",
|
|
247
250
|
0
|
|
248
251
|
));
|
|
249
|
-
i(this, yt, new
|
|
252
|
+
i(this, yt, new c(
|
|
250
253
|
this,
|
|
251
254
|
"--current-index-end-offset",
|
|
252
255
|
0
|
|
253
256
|
));
|
|
254
|
-
i(this, Ee, new
|
|
257
|
+
i(this, Ee, new c(
|
|
255
258
|
this,
|
|
256
259
|
"--shift-section-position",
|
|
257
260
|
0,
|
|
258
261
|
{ rawValueCheck: !1 }
|
|
259
262
|
));
|
|
260
|
-
i(this,
|
|
261
|
-
i(this, we, new
|
|
263
|
+
i(this, Gt, new c(this, "--focus-delay", 0));
|
|
264
|
+
i(this, we, new c(
|
|
262
265
|
this,
|
|
263
266
|
"--focus-duration",
|
|
264
267
|
3e3
|
|
265
268
|
));
|
|
266
|
-
i(this,
|
|
267
|
-
i(this,
|
|
268
|
-
i(this,
|
|
269
|
+
i(this, Ut, new c(this, "--disabled", !1));
|
|
270
|
+
i(this, Kt, new c(this, "--hibernate", !1));
|
|
271
|
+
i(this, Zt, null);
|
|
269
272
|
i(this, b, null);
|
|
270
|
-
i(this,
|
|
273
|
+
i(this, De, null);
|
|
271
274
|
i(this, G, []);
|
|
272
|
-
i(this,
|
|
275
|
+
i(this, a, []);
|
|
273
276
|
i(this, as, 0);
|
|
274
277
|
i(this, ds, 0);
|
|
275
278
|
i(this, L, 0);
|
|
276
279
|
i(this, P, 0);
|
|
277
280
|
i(this, U, 0);
|
|
278
281
|
i(this, it, null);
|
|
279
|
-
i(this,
|
|
282
|
+
i(this, jt, null);
|
|
280
283
|
i(this, rt, null);
|
|
281
|
-
i(this,
|
|
282
|
-
i(this,
|
|
283
|
-
i(this,
|
|
284
|
+
i(this, F, null);
|
|
285
|
+
i(this, z, new ue(0));
|
|
286
|
+
i(this, Oe, 0);
|
|
284
287
|
i(this, Ct, 0);
|
|
285
288
|
i(this, Pt, !1);
|
|
286
289
|
i(this, Et, !0);
|
|
287
290
|
i(this, K, !0);
|
|
288
|
-
i(this,
|
|
289
|
-
i(this,
|
|
290
|
-
i(this,
|
|
291
|
+
i(this, He);
|
|
292
|
+
i(this, Jt);
|
|
293
|
+
i(this, Qt, new gi());
|
|
291
294
|
i(this, xe, !1);
|
|
292
295
|
i(this, ht, null);
|
|
293
|
-
i(this,
|
|
294
|
-
i(this,
|
|
296
|
+
i(this, A, !1);
|
|
297
|
+
i(this, $e, null);
|
|
295
298
|
i(this, wt, []);
|
|
296
299
|
i(this, Le, !1);
|
|
297
|
-
i(this,
|
|
298
|
-
i(this,
|
|
300
|
+
i(this, Be);
|
|
301
|
+
i(this, T, (e) => {
|
|
299
302
|
if (e && t(this, Le)) {
|
|
300
303
|
r(this, Le, !1);
|
|
301
304
|
return;
|
|
302
305
|
}
|
|
303
306
|
this.resize();
|
|
304
307
|
});
|
|
305
|
-
i(this,
|
|
308
|
+
i(this, fs, () => {
|
|
306
309
|
if (!t(this, Pt) || t(this, K) || t(this, Et))
|
|
307
310
|
return;
|
|
308
311
|
const e = this.currentScrollValue;
|
|
309
|
-
if (r(this,
|
|
312
|
+
if (r(this, Oe, Math.max(0, e - t(this, P))), t(this, a).length) {
|
|
310
313
|
for (let s = 0; s < t(this, G).length; s++)
|
|
311
314
|
t(this, G)[s].transform();
|
|
312
|
-
t(this,
|
|
315
|
+
t(this, J).current || (t(this, z).current = o(this, l, hs).call(this));
|
|
313
316
|
} else
|
|
314
317
|
this.vertical ? t(this, b).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, b).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
315
|
-
o(this,
|
|
318
|
+
o(this, l, Ys).call(this), ce.update(
|
|
316
319
|
this,
|
|
317
|
-
t(this,
|
|
320
|
+
t(this, D).current,
|
|
318
321
|
e
|
|
319
322
|
);
|
|
320
323
|
});
|
|
321
|
-
i(this,
|
|
322
|
-
t(this, be).current && (o(this,
|
|
324
|
+
i(this, We, (e, s) => {
|
|
325
|
+
t(this, be).current && (o(this, l, Fs).call(this, Math.sign(s) || 1), t(this, ps).call(this, e, s));
|
|
323
326
|
});
|
|
324
|
-
i(this,
|
|
325
|
-
if (!t(this,
|
|
327
|
+
i(this, ps, (e, s) => {
|
|
328
|
+
if (!t(this, Jt)) {
|
|
326
329
|
if (t(this, mt).current) {
|
|
327
330
|
if (t(this, mt).current < 0 && s > 0)
|
|
328
331
|
return;
|
|
329
332
|
if (t(this, mt).current > 0 && s < 0)
|
|
330
333
|
return;
|
|
331
334
|
}
|
|
332
|
-
if (!t(this,
|
|
333
|
-
const h = t(this,
|
|
335
|
+
if (!t(this, X).current && t(this, Gt).current && (clearInterval(t(this, He)), r(this, He, setTimeout(() => {
|
|
336
|
+
const h = t(this, a)[o(this, l, hs).call(this)];
|
|
334
337
|
h && this.scrollToSection(h.index, {
|
|
335
338
|
tween: {
|
|
336
339
|
duration: t(this, we).current,
|
|
337
340
|
easing: di
|
|
338
341
|
}
|
|
339
342
|
});
|
|
340
|
-
}, t(this,
|
|
341
|
-
if (t(this,
|
|
343
|
+
}, t(this, Gt).current))), !(e.includes("drag") && !Ei.isTouch && !t(this, ye).current)) {
|
|
344
|
+
if (t(this, J).current && e !== "drag") {
|
|
342
345
|
const h = Math.sign(s);
|
|
343
|
-
if (t(this,
|
|
346
|
+
if (t(this, a).length) {
|
|
344
347
|
const u = {
|
|
345
|
-
tween: t(this,
|
|
346
|
-
easing: t(this,
|
|
347
|
-
duration: t(this,
|
|
348
|
+
tween: t(this, $t).current || t(this, Bt).current ? {
|
|
349
|
+
easing: t(this, $t).current || "easeInOutCubic",
|
|
350
|
+
duration: t(this, Bt).current || 500
|
|
348
351
|
} : void 0
|
|
349
352
|
};
|
|
350
|
-
t(this, xe) ? this.scrollToSection(o(this,
|
|
353
|
+
t(this, xe) ? this.scrollToSection(o(this, l, hs).call(this, !0), u) : this.shiftSections(h, u);
|
|
351
354
|
} else
|
|
352
|
-
t(this,
|
|
355
|
+
t(this, f).shift(h * t(this, L));
|
|
353
356
|
} else
|
|
354
|
-
t(this,
|
|
357
|
+
t(this, f).shift(s);
|
|
355
358
|
r(this, xe, e === "drag");
|
|
356
359
|
}
|
|
357
360
|
}
|
|
@@ -361,18 +364,18 @@ class zs extends HTMLElement {
|
|
|
361
364
|
const u = this.vertical ? h.width : h.height;
|
|
362
365
|
return u > s ? u : s;
|
|
363
366
|
}, 0);
|
|
364
|
-
clearTimeout(t(this,
|
|
367
|
+
clearTimeout(t(this, Be)), r(this, Le, !0), this.style.setProperty("--max-section-size", ""), r(this, Be, setTimeout(() => {
|
|
365
368
|
r(this, Le, !0), this.style.setProperty("--max-section-size", e + "px");
|
|
366
369
|
}, 10));
|
|
367
370
|
}, 20));
|
|
368
|
-
i(this,
|
|
369
|
-
r(this,
|
|
371
|
+
i(this, Ne, () => {
|
|
372
|
+
r(this, A, !0), this.hibernatedCSSProperty.current || o(this, l, Ms).call(this), ns.subscribe(this, t(this, T)), pt.unsubscribe(t(this, Ne));
|
|
370
373
|
});
|
|
371
374
|
if (q) {
|
|
372
375
|
const e = this.attachShadow({ mode: "open" });
|
|
373
376
|
e.adoptedStyleSheets = [ki];
|
|
374
377
|
const s = document.createElement("div");
|
|
375
|
-
s.className = "static", s.innerHTML = '<slot name="static"></slot>', e.appendChild(s), r(this,
|
|
378
|
+
s.className = "static", s.innerHTML = '<slot name="static"></slot>', e.appendChild(s), r(this, Zt, document.createElement("div")), t(this, Zt).className = "content-wrapper", r(this, b, document.createElement("div")), t(this, b).className = "content", r(this, De, document.createElement("slot")), t(this, b).appendChild(t(this, De)), t(this, Zt).appendChild(t(this, b)), e.appendChild(t(this, Zt)), r(this, $e, new MutationObserver(
|
|
376
379
|
ws(() => {
|
|
377
380
|
this.tryResplit();
|
|
378
381
|
}, 10)
|
|
@@ -380,16 +383,16 @@ class zs extends HTMLElement {
|
|
|
380
383
|
}
|
|
381
384
|
}
|
|
382
385
|
get damped() {
|
|
383
|
-
return t(this,
|
|
386
|
+
return t(this, f);
|
|
384
387
|
}
|
|
385
388
|
get controlsCSSProperty() {
|
|
386
389
|
return t(this, be);
|
|
387
390
|
}
|
|
388
391
|
get axisCSSProperty() {
|
|
389
|
-
return t(this,
|
|
392
|
+
return t(this, D);
|
|
390
393
|
}
|
|
391
394
|
get reverseCSSProperty() {
|
|
392
|
-
return t(this,
|
|
395
|
+
return t(this, Ht);
|
|
393
396
|
}
|
|
394
397
|
get directionCSSProperty() {
|
|
395
398
|
return t(this, mt);
|
|
@@ -401,25 +404,25 @@ class zs extends HTMLElement {
|
|
|
401
404
|
return t(this, gt);
|
|
402
405
|
}
|
|
403
406
|
get sectionalCSSProperty() {
|
|
404
|
-
return t(this,
|
|
407
|
+
return t(this, J);
|
|
405
408
|
}
|
|
406
409
|
get easingCSSProperty() {
|
|
407
|
-
return t(this,
|
|
410
|
+
return t(this, $t);
|
|
408
411
|
}
|
|
409
412
|
get durationCSSProperty() {
|
|
410
|
-
return t(this,
|
|
413
|
+
return t(this, Bt);
|
|
411
414
|
}
|
|
412
415
|
get autoSizeCSSProperty() {
|
|
413
416
|
return t(this, vt);
|
|
414
417
|
}
|
|
415
418
|
get wheelMaxDeltaCSSProperty() {
|
|
416
|
-
return t(this,
|
|
419
|
+
return t(this, Wt);
|
|
417
420
|
}
|
|
418
421
|
get dragInertionCSSProperty() {
|
|
419
422
|
return t(this, me);
|
|
420
423
|
}
|
|
421
424
|
get sectionsInViewCSSProperty() {
|
|
422
|
-
return t(this,
|
|
425
|
+
return t(this, Q);
|
|
423
426
|
}
|
|
424
427
|
get loopCSSProperty() {
|
|
425
428
|
return t(this, V);
|
|
@@ -437,25 +440,25 @@ class zs extends HTMLElement {
|
|
|
437
440
|
return t(this, ye);
|
|
438
441
|
}
|
|
439
442
|
get sectionDistanceScaleCSSProperty() {
|
|
440
|
-
return t(this,
|
|
443
|
+
return t(this, Re);
|
|
441
444
|
}
|
|
442
445
|
get startSectionCSSProperty() {
|
|
443
446
|
return t(this, Ce);
|
|
444
447
|
}
|
|
445
448
|
get autoplayCSSProperty() {
|
|
446
|
-
return t(this,
|
|
449
|
+
return t(this, X);
|
|
447
450
|
}
|
|
448
451
|
get autoplayPauseDurationCSSProperty() {
|
|
449
452
|
return t(this, Pe);
|
|
450
453
|
}
|
|
451
454
|
get autoplayUserDirectionCSSProperty() {
|
|
452
|
-
return t(this,
|
|
455
|
+
return t(this, Nt);
|
|
453
456
|
}
|
|
454
457
|
get classesCSSProperty() {
|
|
455
|
-
return t(this,
|
|
458
|
+
return t(this, Y);
|
|
456
459
|
}
|
|
457
460
|
get currentIndexStartOffsetCSSProperty() {
|
|
458
|
-
return t(this,
|
|
461
|
+
return t(this, qt);
|
|
459
462
|
}
|
|
460
463
|
get currentIndexEndOffsetCSSProperty() {
|
|
461
464
|
return t(this, yt);
|
|
@@ -464,25 +467,25 @@ class zs extends HTMLElement {
|
|
|
464
467
|
return t(this, Ee);
|
|
465
468
|
}
|
|
466
469
|
get focusDelayCSSProperty() {
|
|
467
|
-
return t(this,
|
|
470
|
+
return t(this, Gt);
|
|
468
471
|
}
|
|
469
472
|
get focusDurationCSSProperty() {
|
|
470
473
|
return t(this, we);
|
|
471
474
|
}
|
|
472
475
|
get disabledCSSProperty() {
|
|
473
|
-
return t(this,
|
|
476
|
+
return t(this, Ut);
|
|
474
477
|
}
|
|
475
478
|
get hibernatedCSSProperty() {
|
|
476
|
-
return t(this,
|
|
479
|
+
return t(this, Kt);
|
|
477
480
|
}
|
|
478
481
|
get currentScrollValue() {
|
|
479
|
-
return o(this,
|
|
482
|
+
return o(this, l, Ts).call(this, "current");
|
|
480
483
|
}
|
|
481
484
|
get targetScrollValue() {
|
|
482
|
-
return o(this,
|
|
485
|
+
return o(this, l, Ts).call(this, "target");
|
|
483
486
|
}
|
|
484
487
|
get contentWrapperElement() {
|
|
485
|
-
return t(this,
|
|
488
|
+
return t(this, Zt);
|
|
486
489
|
}
|
|
487
490
|
get contentElement() {
|
|
488
491
|
return t(this, b);
|
|
@@ -491,7 +494,7 @@ class zs extends HTMLElement {
|
|
|
491
494
|
return t(this, G);
|
|
492
495
|
}
|
|
493
496
|
get visibleSections() {
|
|
494
|
-
return t(this,
|
|
497
|
+
return t(this, a);
|
|
495
498
|
}
|
|
496
499
|
get position() {
|
|
497
500
|
return t(this, as);
|
|
@@ -509,11 +512,11 @@ class zs extends HTMLElement {
|
|
|
509
512
|
return t(this, U);
|
|
510
513
|
}
|
|
511
514
|
get counter() {
|
|
512
|
-
return t(this,
|
|
515
|
+
return t(this, z);
|
|
513
516
|
}
|
|
514
517
|
get limit() {
|
|
515
518
|
return Math.ceil(
|
|
516
|
-
t(this,
|
|
519
|
+
t(this, a).length - t(this, Q).current
|
|
517
520
|
);
|
|
518
521
|
}
|
|
519
522
|
get distance() {
|
|
@@ -526,13 +529,13 @@ class zs extends HTMLElement {
|
|
|
526
529
|
return t(this, Pt);
|
|
527
530
|
}
|
|
528
531
|
get overscroll() {
|
|
529
|
-
return t(this,
|
|
532
|
+
return t(this, Oe);
|
|
530
533
|
}
|
|
531
534
|
get scrollLine() {
|
|
532
535
|
return t(this, ht);
|
|
533
536
|
}
|
|
534
537
|
get vertical() {
|
|
535
|
-
return t(this,
|
|
538
|
+
return t(this, D).current === "y";
|
|
536
539
|
}
|
|
537
540
|
get currentProgress() {
|
|
538
541
|
return this.currentScrollValue / this.loopDistance || 0;
|
|
@@ -541,19 +544,19 @@ class zs extends HTMLElement {
|
|
|
541
544
|
return this.targetScrollValue / this.loopDistance || 0;
|
|
542
545
|
}
|
|
543
546
|
get scrollWidth() {
|
|
544
|
-
return t(this,
|
|
547
|
+
return t(this, D).current === "y" ? 0 : t(this, f).distance;
|
|
545
548
|
}
|
|
546
549
|
get scrollHeight() {
|
|
547
|
-
return t(this,
|
|
550
|
+
return t(this, D).current === "x" ? 0 : t(this, f).distance;
|
|
548
551
|
}
|
|
549
552
|
tryResplit() {
|
|
550
|
-
!t(this, K) && (t(this, V).current || t(this, gt).current || t(this, V).current || t(this, vt).current || t(this,
|
|
553
|
+
!t(this, K) && (t(this, V).current || t(this, gt).current || t(this, V).current || t(this, vt).current || t(this, J).current) && o(this, l, rs).call(this);
|
|
551
554
|
}
|
|
552
555
|
onScroll(...e) {
|
|
553
|
-
return t(this,
|
|
556
|
+
return t(this, f).subscribe(...e);
|
|
554
557
|
}
|
|
555
558
|
offScroll(...e) {
|
|
556
|
-
t(this,
|
|
559
|
+
t(this, f).unsubscribe(...e);
|
|
557
560
|
}
|
|
558
561
|
//https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
|
|
559
562
|
range(e, s, h = 0) {
|
|
@@ -568,53 +571,55 @@ class zs extends HTMLElement {
|
|
|
568
571
|
return this.currentProgress >= u && this.currentProgress <= g;
|
|
569
572
|
}
|
|
570
573
|
scrollToSection(e, s) {
|
|
571
|
-
if (!t(this,
|
|
574
|
+
if (!t(this, a).length || t(this, K))
|
|
572
575
|
return;
|
|
573
|
-
const h = t(this,
|
|
576
|
+
const h = t(this, z).current, u = o(this, l, Xs).call(this, e);
|
|
577
|
+
t(this, z).current = u;
|
|
578
|
+
const g = t(this, a)[h], v = t(this, a)[u];
|
|
574
579
|
if (g && v) {
|
|
575
580
|
let C = 0;
|
|
576
|
-
const le = o(this,
|
|
577
|
-
let
|
|
578
|
-
t(this, V).current ? u === 0 && h === t(this,
|
|
581
|
+
const le = o(this, l, hs).call(this), Ie = t(this, a)[le];
|
|
582
|
+
let is = Ie ? this.targetScrollValue - Ie.position : 0;
|
|
583
|
+
t(this, V).current ? u === 0 && h === t(this, a).length - 1 ? (C = t(this, P) + t(this, L) - g.position + t(this, U), t(this, xe) || (is = 0)) : u === t(this, a).length - 1 && h === 0 ? C = v.position - (t(this, P) + t(this, L) + t(this, U)) : C = v.position - g.position : C = v.position - g.position, this.shiftPosition(C - is, s);
|
|
579
584
|
}
|
|
580
585
|
}
|
|
581
586
|
shiftSections(e, s) {
|
|
582
|
-
t(this,
|
|
587
|
+
t(this, a).length && this.scrollToSection(t(this, z).current + e, s);
|
|
583
588
|
}
|
|
584
589
|
setPosition(e, s) {
|
|
585
|
-
t(this, K) || (o(this,
|
|
586
|
-
r(this,
|
|
587
|
-
}, s.tween.duration || 0))) : t(this,
|
|
590
|
+
t(this, K) || (o(this, l, Fs).call(this, Math.sign(e) || 1), s != null && s.tween ? (clearTimeout(t(this, Jt)), t(this, Qt).set(t(this, f).current, { equalize: !0 }), t(this, Qt).set(Math.min(e, this.distance), Us({}, s.tween)), r(this, Jt, setTimeout(() => {
|
|
591
|
+
r(this, Jt, void 0);
|
|
592
|
+
}, s.tween.duration || 0))) : t(this, f).set(e, {
|
|
588
593
|
equalize: (s == null ? void 0 : s.behaviour) === "instant"
|
|
589
594
|
}));
|
|
590
595
|
}
|
|
591
596
|
shiftPosition(e, s) {
|
|
592
|
-
this.setPosition(t(this,
|
|
597
|
+
this.setPosition(t(this, f).target + e, s);
|
|
593
598
|
}
|
|
594
599
|
resize() {
|
|
595
|
-
if (t(this,
|
|
600
|
+
if (t(this, Kt).current)
|
|
596
601
|
return;
|
|
597
|
-
r(this,
|
|
598
|
-
(h) =>
|
|
602
|
+
r(this, a, t(this, G).filter(
|
|
603
|
+
(h) => fi(h.element)
|
|
599
604
|
)), this.style.setProperty(
|
|
600
605
|
"--sections",
|
|
601
|
-
t(this,
|
|
602
|
-
), t(this,
|
|
603
|
-
const e = this.currentScrollValue / t(this, P) || 0, s = t(this,
|
|
604
|
-
if (r(this, as, this.vertical ? os(this) :
|
|
606
|
+
t(this, a).length.toString()
|
|
607
|
+
), t(this, f).unlistenAnimationFrame();
|
|
608
|
+
const e = this.currentScrollValue / t(this, P) || 0, s = t(this, z).current;
|
|
609
|
+
if (r(this, as, this.vertical ? os(this) : cs(this)), r(this, ds, this.vertical ? os(t(this, b)) : cs(t(this, b))), r(this, L, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? r(this, U, Ks.parse(
|
|
605
610
|
getComputedStyle(t(this, b)).rowGap
|
|
606
611
|
)) : r(this, U, Ks.parse(
|
|
607
612
|
getComputedStyle(t(this, b)).columnGap
|
|
608
|
-
)), t(this, vt).current && t(this,
|
|
609
|
-
const h = t(this,
|
|
610
|
-
t(this,
|
|
613
|
+
)), t(this, vt).current && t(this, a).length) {
|
|
614
|
+
const h = t(this, Q).current, u = (t(this, L) - t(this, U) * (h - 1)) / h;
|
|
615
|
+
t(this, a).forEach((g) => {
|
|
611
616
|
g.setSize(u);
|
|
612
617
|
});
|
|
613
618
|
} else
|
|
614
|
-
t(this,
|
|
619
|
+
t(this, a).forEach((h) => {
|
|
615
620
|
h.setSize();
|
|
616
621
|
});
|
|
617
|
-
if (t(this,
|
|
622
|
+
if (t(this, a).forEach((h) => {
|
|
618
623
|
h.resize();
|
|
619
624
|
}), t(this, St).current) {
|
|
620
625
|
r(this, P, t(this, L) * t(this, St).current);
|
|
@@ -624,144 +629,144 @@ class zs extends HTMLElement {
|
|
|
624
629
|
this.vertical ? (t(this, b).style.width = "100%", t(this, b).style.height = "max-content", r(this, P, t(this, b).offsetHeight - t(this, L))) : (t(this, b).style.width = "max-content", t(this, b).style.height = "100%", r(this, P, t(this, b).offsetWidth - t(this, L)));
|
|
625
630
|
if (!t(this, V).current) {
|
|
626
631
|
const h = getComputedStyle(this), u = this.vertical ? parseFloat(h.paddingBlockStart) + parseFloat(h.paddingBlockEnd) : parseFloat(h.paddingInlineStart) + parseFloat(h.paddingInlineEnd);
|
|
627
|
-
r(this, P, t(this, P) + u), t(this,
|
|
632
|
+
r(this, P, t(this, P) + u), t(this, f).max = t(this, P);
|
|
628
633
|
}
|
|
629
|
-
if (t(this, V).current && t(this,
|
|
630
|
-
const h = t(this,
|
|
634
|
+
if (t(this, V).current && t(this, a).length) {
|
|
635
|
+
const h = t(this, a)[t(this, a).length - 1], u = h.position + h.size - t(this, L), g = t(this, P) - u;
|
|
631
636
|
r(this, Ct, h.position + h.size + g);
|
|
632
637
|
} else
|
|
633
638
|
r(this, Ct, t(this, P));
|
|
634
|
-
if (t(this,
|
|
635
|
-
const h = t(this,
|
|
636
|
-
t(this,
|
|
639
|
+
if (t(this, J).current && t(this, a).length) {
|
|
640
|
+
const h = t(this, a)[s];
|
|
641
|
+
t(this, f).set(h.position, {
|
|
637
642
|
equalize: !0
|
|
638
643
|
});
|
|
639
644
|
} else
|
|
640
|
-
t(this,
|
|
645
|
+
t(this, f).set(e * t(this, P), {
|
|
641
646
|
equalize: !0
|
|
642
647
|
});
|
|
643
|
-
r(this, Pt, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, L)), this.classList.toggle("has-overflow", t(this, Pt)), t(this, Pt) ? t(this,
|
|
648
|
+
r(this, Pt, (this.vertical ? t(this, b).offsetHeight : t(this, b).offsetWidth) > t(this, L)), this.classList.toggle("has-overflow", t(this, Pt)), t(this, Pt) ? t(this, Ut).current || o(this, l, Es).call(this) : o(this, l, Ps).call(this), t(this, bs).call(this), st(this, "scrollResize", { custom: !0 }), t(this, f).notify();
|
|
644
649
|
}
|
|
645
650
|
connectedCallback() {
|
|
646
|
-
|
|
651
|
+
ce.register(this), r(this, f, new Qs(0, {
|
|
647
652
|
damping: 0.01,
|
|
648
653
|
min: 0,
|
|
649
654
|
order: Js.SCROLL
|
|
650
|
-
})), this.setAttribute("tabindex", "0"), r(this, it, new vi({ element: t(this, b) })), t(this, it).changeEvent.subscribe(t(this,
|
|
655
|
+
})), this.setAttribute("tabindex", "0"), r(this, it, new vi({ element: t(this, b) })), t(this, it).changeEvent.subscribe(t(this, We)), r(this, jt, new yi({
|
|
651
656
|
element: this
|
|
652
|
-
})), t(this,
|
|
653
|
-
t(this,
|
|
657
|
+
})), t(this, jt).changeEvent.subscribe(
|
|
658
|
+
t(this, We)
|
|
654
659
|
), r(this, rt, new Ci({
|
|
655
660
|
element: t(this, b),
|
|
656
661
|
rootElement: this
|
|
657
|
-
})), t(this, rt).changeEvent.subscribe(t(this,
|
|
662
|
+
})), t(this, rt).changeEvent.subscribe(t(this, We)), r(this, F, new Pi({
|
|
658
663
|
culling: this
|
|
659
|
-
})), t(this,
|
|
660
|
-
o(this,
|
|
661
|
-
}), t(this,
|
|
662
|
-
o(this,
|
|
663
|
-
}), t(this,
|
|
664
|
-
t(this, it).axis = e.current ? "max" : t(this,
|
|
664
|
+
})), t(this, F).changeEvent.subscribe(t(this, ps)), t(this, D).subscribe(() => {
|
|
665
|
+
o(this, l, As).call(this);
|
|
666
|
+
}), t(this, Ht).subscribe(() => {
|
|
667
|
+
o(this, l, As).call(this);
|
|
668
|
+
}), t(this, Wt).subscribe((e) => {
|
|
669
|
+
t(this, it).axis = e.current ? "max" : t(this, D).current;
|
|
665
670
|
}), t(this, me).subscribe((e) => {
|
|
666
671
|
t(this, rt).inertion = typeof e.current == "number" ? e.current : 1;
|
|
667
672
|
}), t(this, St).subscribe(() => {
|
|
668
|
-
t(this,
|
|
673
|
+
t(this, A) && t(this, T).call(this);
|
|
669
674
|
}), t(this, gt).subscribe(({ current: e }) => {
|
|
670
|
-
t(this,
|
|
671
|
-
}), t(this,
|
|
672
|
-
t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this,
|
|
675
|
+
t(this, A) && (e ? o(this, l, rs).call(this) : o(this, l, Fe).call(this));
|
|
676
|
+
}), t(this, J).subscribe((e) => {
|
|
677
|
+
t(this, it).debounce = e.current, t(this, rt).swipe = e.current, t(this, F).interval = e.current, t(this, A) && (e.current && !e.previous && !t(this, a).length ? o(this, l, rs).call(this) : !e.current && e.previous && t(this, a).length && o(this, l, Fe).call(this));
|
|
673
678
|
}), t(this, vt).subscribe((e) => {
|
|
674
|
-
t(this,
|
|
675
|
-
}), t(this,
|
|
676
|
-
t(this,
|
|
679
|
+
t(this, A) && (t(this, T).call(this), e.current && !e.previous && !t(this, a).length ? o(this, l, rs).call(this) : !e.current && e.previous && t(this, a).length && o(this, l, Fe).call(this));
|
|
680
|
+
}), t(this, Q).subscribe((e) => {
|
|
681
|
+
t(this, A) && (t(this, T).call(this), o(this, l, ae).call(this));
|
|
677
682
|
}), t(this, V).subscribe((e) => {
|
|
678
|
-
e.current ? (t(this,
|
|
683
|
+
e.current ? (t(this, A) && (t(this, a).length || (t(this, gt).current = !0)), t(this, f).max = 1 / 0, t(this, f).min = -1 / 0) : (r(this, Oe, 0), t(this, f).max = t(this, P), t(this, f).min = 0);
|
|
679
684
|
}), t(this, Se).subscribe((e) => {
|
|
680
|
-
t(this,
|
|
685
|
+
t(this, f).damping = e.current;
|
|
681
686
|
}), t(this, ge).subscribe((e) => {
|
|
682
|
-
t(this,
|
|
687
|
+
t(this, f).mass = e.current;
|
|
683
688
|
}), t(this, ve).subscribe((e) => {
|
|
684
|
-
t(this,
|
|
685
|
-
}), t(this,
|
|
686
|
-
t(this,
|
|
687
|
-
}), t(this, Wt).subscribe((e) => {
|
|
688
|
-
e.current || (t(this, M).direction = 1);
|
|
689
|
-
}), t(this, Q).subscribe((e) => {
|
|
690
|
-
t(this, z) && o(this, c, ue).call(this);
|
|
689
|
+
t(this, f).stiffness = e.current;
|
|
690
|
+
}), t(this, X).subscribe((e) => {
|
|
691
|
+
t(this, F).speed = e.current, !t(this, Et) && e.current && !e.previous ? t(this, F).connect() : !e.current && e.previous && t(this, F).disconnect();
|
|
691
692
|
}), t(this, Nt).subscribe((e) => {
|
|
692
|
-
|
|
693
|
+
e.current || (t(this, F).direction = 1);
|
|
694
|
+
}), t(this, Y).subscribe((e) => {
|
|
695
|
+
t(this, A) && o(this, l, ae).call(this);
|
|
696
|
+
}), t(this, qt).subscribe((e) => {
|
|
697
|
+
t(this, A) && t(this, Y).current && o(this, l, ae).call(this);
|
|
693
698
|
}), t(this, yt).subscribe((e) => {
|
|
694
|
-
t(this,
|
|
699
|
+
t(this, A) && t(this, Y).current && o(this, l, ae).call(this);
|
|
695
700
|
}), t(this, Ee).subscribe((e) => {
|
|
696
|
-
t(this,
|
|
697
|
-
}), t(this,
|
|
701
|
+
t(this, A) && t(this, f).notify();
|
|
702
|
+
}), t(this, f).isRunning.subscribe((e) => {
|
|
698
703
|
this.classList.toggle("active", e.current);
|
|
699
|
-
}), t(this,
|
|
700
|
-
t(this, K) || (t(this,
|
|
701
|
-
}), t(this,
|
|
702
|
-
t(this,
|
|
703
|
-
}), t(this, Gt).subscribe((e) => {
|
|
704
|
-
e.current && !e.previous ? (this.classList.add("disabled"), o(this, c, Ps).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), o(this, c, Es).call(this));
|
|
704
|
+
}), t(this, z).subscribe((e) => {
|
|
705
|
+
t(this, K) || (t(this, a).length && o(this, l, ae).call(this), this.style.setProperty("--counter", e.current + ""));
|
|
706
|
+
}), t(this, Qt).subscribe((e) => {
|
|
707
|
+
t(this, Qt).isRunning.current && t(this, f).set(e.current, { equalize: !0 });
|
|
705
708
|
}), t(this, Ut).subscribe((e) => {
|
|
706
|
-
e.current && !e.previous ? (this.classList.add("
|
|
707
|
-
}), t(this,
|
|
709
|
+
e.current && !e.previous ? (this.classList.add("disabled"), o(this, l, Ps).call(this)) : !e.current && e.previous && (this.classList.remove("disabled"), o(this, l, Es).call(this));
|
|
710
|
+
}), t(this, Kt).subscribe((e) => {
|
|
711
|
+
e.current && !e.previous ? (this.classList.add("hibernated"), o(this, l, Is).call(this)) : !e.current && e.previous && (this.classList.remove("hibernated"), o(this, l, Ms).call(this));
|
|
712
|
+
}), t(this, be).observe(), t(this, D).observe(), t(this, Ht).observe(), t(this, mt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, J).observe(), t(this, $t).observe(), t(this, Bt).observe(), t(this, vt).observe(), t(this, Wt).observe(), t(this, me).observe(), t(this, Q).observe(), t(this, V).observe(), t(this, Se).observe(), t(this, ge).observe(), t(this, ve).observe(), t(this, ye).observe(), t(this, Re).observe(), t(this, Ce).observe(), t(this, X).observe(), t(this, X).observe(), t(this, Pe).observe(), t(this, Nt).observe(), t(this, Y).observe(), t(this, qt).observe(), t(this, yt).observe(), t(this, Ee).observe(), t(this, Gt).observe(), t(this, we).observe(), t(this, Ut).observe(), t(this, Kt).observe(), pt.subscribe(t(this, Ne), xs.LAST), t(this, $e).observe(this, { childList: !0 });
|
|
708
713
|
}
|
|
709
714
|
disconnectedCallback() {
|
|
710
|
-
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, be).unobserve(), t(this,
|
|
715
|
+
this.removeAttribute("tabindex"), this.classList.remove("disabled"), this.classList.remove("hibernated"), t(this, be).unobserve(), t(this, D).unobserve(), t(this, Ht).unobserve(), t(this, mt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, J).unobserve(), t(this, $t).unobserve(), t(this, Bt).unobserve(), t(this, vt).unobserve(), t(this, Wt).unobserve(), t(this, me).unobserve(), t(this, Q).unobserve(), t(this, V).unobserve(), t(this, Se).unobserve(), t(this, ge).unobserve(), t(this, ve).unobserve(), t(this, ye).unobserve(), t(this, Re).unobserve(), t(this, Ce).unobserve(), t(this, X).unobserve(), t(this, Pe).unobserve(), t(this, Nt).unobserve(), t(this, Y).unobserve(), t(this, qt).unobserve(), t(this, yt).unobserve(), t(this, Ee).unobserve(), t(this, Gt).unobserve(), t(this, we).unobserve(), t(this, Ut).unobserve(), t(this, Kt).unobserve(), pt.unsubscribe(t(this, Ne)), pt.unsubscribe(t(this, T)), ns.unsubscribe(t(this, T)), o(this, l, Is).call(this), t(this, $e).disconnect();
|
|
711
716
|
}
|
|
712
717
|
}
|
|
713
|
-
|
|
714
|
-
const e = t(this,
|
|
715
|
-
t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this,
|
|
718
|
+
f = new WeakMap(), be = new WeakMap(), D = new WeakMap(), Ht = new WeakMap(), mt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), J = new WeakMap(), $t = new WeakMap(), Bt = new WeakMap(), vt = new WeakMap(), Wt = new WeakMap(), me = new WeakMap(), Q = new WeakMap(), V = new WeakMap(), Se = new WeakMap(), ge = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), Re = new WeakMap(), Ce = new WeakMap(), X = new WeakMap(), Pe = new WeakMap(), Nt = new WeakMap(), Y = new WeakMap(), qt = new WeakMap(), yt = new WeakMap(), Ee = new WeakMap(), Gt = new WeakMap(), we = new WeakMap(), Ut = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), b = new WeakMap(), De = new WeakMap(), G = new WeakMap(), a = new WeakMap(), as = new WeakMap(), ds = new WeakMap(), L = new WeakMap(), P = new WeakMap(), U = new WeakMap(), it = new WeakMap(), jt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), z = new WeakMap(), Oe = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), Et = new WeakMap(), K = new WeakMap(), He = new WeakMap(), Jt = new WeakMap(), Qt = new WeakMap(), xe = new WeakMap(), ht = new WeakMap(), A = new WeakMap(), $e = new WeakMap(), wt = new WeakMap(), Le = new WeakMap(), Be = new WeakMap(), l = new WeakSet(), As = function() {
|
|
719
|
+
const e = t(this, D).current, s = t(this, Ht).current ? "-reverse" : "";
|
|
720
|
+
t(this, b).style.flexDirection = e === "x" ? `row${s}` : `column${s}`, t(this, it).axis = t(this, Wt).current ? "max" : e, t(this, jt).dimension = e === "x" ? "width" : "height", t(this, rt).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), t(this, A) && t(this, T).call(this);
|
|
716
721
|
}, rs = function() {
|
|
717
|
-
o(this,
|
|
722
|
+
o(this, l, Fe).call(this), t(this, De).assignedElements().forEach((e, s) => {
|
|
718
723
|
e instanceof HTMLElement && e.tagName !== "SCRIPT" && t(this, G).push(new Li(e, s, this));
|
|
719
|
-
}), r(this,
|
|
724
|
+
}), r(this, a, [...t(this, G)]), t(this, b).style.transform = "", st(this, "scrollSectionsChange", {
|
|
720
725
|
custom: !0,
|
|
721
726
|
composed: !0
|
|
722
|
-
}), t(this,
|
|
723
|
-
},
|
|
727
|
+
}), t(this, T).call(this), o(this, l, ae).call(this);
|
|
728
|
+
}, Fe = function() {
|
|
724
729
|
t(this, G).forEach((e) => {
|
|
725
730
|
e.destroy();
|
|
726
|
-
}), r(this, G, []), r(this,
|
|
731
|
+
}), r(this, G, []), r(this, a, []), t(this, z).reset(), t(this, f).reset(), this.style.removeProperty("--max-section-size"), st(this, "scrollSectionsChange", {
|
|
727
732
|
custom: !0,
|
|
728
733
|
composed: !0
|
|
729
734
|
});
|
|
730
735
|
}, Ps = function() {
|
|
731
|
-
t(this, Et) || (r(this, Et, !0), t(this,
|
|
736
|
+
t(this, Et) || (r(this, Et, !0), t(this, f).unsubscribe(t(this, fs)), t(this, f).unlistenAnimationFrame(), clearInterval(t(this, He)), clearInterval(t(this, Jt)), t(this, Qt).unlistenAnimationFrame(), t(this, it).disconnect(), t(this, jt).disconnect(), t(this, rt).disconnect(), t(this, F).disconnect(), t(this, Pt) || (this.sections.forEach((e) => {
|
|
732
737
|
e.unsetTransform();
|
|
733
|
-
}), t(this,
|
|
738
|
+
}), t(this, T).call(this)));
|
|
734
739
|
}, Es = function() {
|
|
735
|
-
t(this, Et) && (r(this, Et, !1), t(this,
|
|
740
|
+
t(this, Et) && (r(this, Et, !1), t(this, f).subscribe(t(this, fs), -1e4), t(this, f).notify(), t(this, it).connect(), t(this, jt).connect(), t(this, rt).connect(), t(this, X).current && t(this, F).connect());
|
|
736
741
|
}, Is = function() {
|
|
737
|
-
t(this, K) || (r(this, K, !0), clearTimeout(t(this,
|
|
742
|
+
t(this, K) || (r(this, K, !0), clearTimeout(t(this, Be)), pt.unsubscribe(t(this, T)), o(this, l, Ps).call(this), t(this, b).style.transform = "", t(this, b).style.height = "", t(this, b).style.width = "", this.classList.remove("has-overflow", "start", "end"), this.style.removeProperty("--counter"), t(this, G).length ? o(this, l, Fe).call(this) : (t(this, z).reset(), t(this, f).reset()), ce.unregister(this));
|
|
738
743
|
}, Ms = function() {
|
|
739
|
-
t(this, K) && (r(this, K, !1),
|
|
744
|
+
t(this, K) && (r(this, K, !1), ce.register(this), this.tryResplit(), o(this, l, Es).call(this), this.scrollToSection(t(this, Ce).current, {
|
|
740
745
|
behaviour: "instant"
|
|
741
|
-
}),
|
|
742
|
-
},
|
|
743
|
-
let s = t(this,
|
|
744
|
-
return t(this, V).current ? s = Si(e, t(this,
|
|
745
|
-
},
|
|
746
|
-
t(this,
|
|
746
|
+
}), pt.subscribe(t(this, T), xs.SCROLL));
|
|
747
|
+
}, T = new WeakMap(), fs = new WeakMap(), Xs = function(e) {
|
|
748
|
+
let s = t(this, z).current;
|
|
749
|
+
return t(this, V).current ? s = Si(e, t(this, a).length) : s = Zs(e, 0, this.limit), s;
|
|
750
|
+
}, We = new WeakMap(), ps = new WeakMap(), Fs = function(e = 1) {
|
|
751
|
+
t(this, Nt).current && (t(this, F).direction = e), t(this, X).current && t(this, F).pauseAndContinue(
|
|
747
752
|
t(this, Pe).current,
|
|
748
753
|
this.sectionalCSSProperty.current
|
|
749
754
|
);
|
|
750
755
|
}, Ts = function(e = "current") {
|
|
751
|
-
if (t(this, V).current && t(this,
|
|
752
|
-
const s = t(this,
|
|
756
|
+
if (t(this, V).current && t(this, a).length) {
|
|
757
|
+
const s = t(this, f)[e] % Math.round(t(this, P) + t(this, L) + t(this, U));
|
|
753
758
|
return s < 0 ? t(this, P) + s + t(this, L) + t(this, U) : s;
|
|
754
759
|
} else
|
|
755
|
-
return t(this,
|
|
756
|
-
},
|
|
757
|
-
if (t(this,
|
|
758
|
-
const e = t(this,
|
|
759
|
-
if (e === 0 ? r(this, ht, "start") : e === this.limit ? r(this, ht, "end") : r(this, ht, null),
|
|
760
|
+
return t(this, f)[e];
|
|
761
|
+
}, ae = function() {
|
|
762
|
+
if (t(this, a).length) {
|
|
763
|
+
const e = t(this, z).current + t(this, qt).current;
|
|
764
|
+
if (e === 0 ? r(this, ht, "start") : e === this.limit ? r(this, ht, "end") : r(this, ht, null), st(this, "scrollLine", {
|
|
760
765
|
detail: { line: t(this, ht) }
|
|
761
|
-
}), t(this,
|
|
766
|
+
}), t(this, Y).current) {
|
|
762
767
|
this.classList.remove("end", "start"), t(this, ht) && this.classList.add(t(this, ht));
|
|
763
|
-
const s = t(this,
|
|
764
|
-
r(this, wt, []), t(this,
|
|
768
|
+
const s = t(this, Q).current + t(this, yt).current;
|
|
769
|
+
r(this, wt, []), t(this, a).forEach((h, u) => {
|
|
765
770
|
h.setCurrentIndex(null), h.setCurrentIndexArc(null), h.setCurrentIndexArcAbs(null), h.setMiddle(!1);
|
|
766
771
|
const g = e - this.limit - 1 + t(this, yt).current, v = e + s, C = this.sections.length - v;
|
|
767
772
|
u >= e && u < v || u <= g ? (h.setMark("current"), t(this, wt).push(h)) : u >= v && u < v + C / 2 || u <= g + s ? h.setMark("next") : h.setMark("previous");
|
|
@@ -769,28 +774,32 @@ p = new WeakMap(), be = new WeakMap(), R = new WeakMap(), Ot = new WeakMap(), mt
|
|
|
769
774
|
}
|
|
770
775
|
}
|
|
771
776
|
}, Ys = function() {
|
|
772
|
-
if (t(this,
|
|
777
|
+
if (t(this, Y).current) {
|
|
773
778
|
const e = Math.floor(t(this, wt).length / 2);
|
|
774
779
|
t(this, wt).sort((s, h) => s.element.getBoundingClientRect().left - h.element.getBoundingClientRect().left), t(this, wt).forEach((s, h) => {
|
|
775
780
|
const u = h - e;
|
|
776
781
|
s.setCurrentIndex(h), s.setCurrentIndexArc(u), s.setCurrentIndexArcAbs(Math.abs(u)), s.setMiddle(h === e);
|
|
782
|
+
}), t(this, a).forEach((s, h) => {
|
|
783
|
+
s.setOffsetIndex(
|
|
784
|
+
h - (t(this, z).current + t(this, Q).current)
|
|
785
|
+
);
|
|
777
786
|
});
|
|
778
787
|
}
|
|
779
788
|
}, bs = new WeakMap(), hs = function(e = !1) {
|
|
780
789
|
let s = this.targetScrollValue, h = 1 / 0, u = 0;
|
|
781
|
-
const g = t(this,
|
|
782
|
-
for (let v = 0; v < t(this,
|
|
783
|
-
const C = t(this,
|
|
790
|
+
const g = t(this, f).direction;
|
|
791
|
+
for (let v = 0; v < t(this, a).length; v++) {
|
|
792
|
+
const C = t(this, a)[v];
|
|
784
793
|
let le = t(this, xe) ? C.size * g * -1 * 0.4 : 0, Ie = C.position;
|
|
785
794
|
this.overscroll && Ie === 0 && e && (Ie = t(this, Ct));
|
|
786
|
-
let
|
|
787
|
-
|
|
795
|
+
let is = Math.abs(Ie + le - s);
|
|
796
|
+
is <= h && (h = is, u = v);
|
|
788
797
|
}
|
|
789
798
|
return u;
|
|
790
|
-
},
|
|
799
|
+
}, Ne = new WeakMap();
|
|
791
800
|
q && !customElements.get("e-scroll") && customElements.define("e-scroll", zs);
|
|
792
801
|
var ms;
|
|
793
|
-
class
|
|
802
|
+
class ss extends HTMLElement {
|
|
794
803
|
constructor() {
|
|
795
804
|
super(...arguments);
|
|
796
805
|
i(this, ms, null);
|
|
@@ -804,23 +813,23 @@ class es extends HTMLElement {
|
|
|
804
813
|
}
|
|
805
814
|
}
|
|
806
815
|
ms = new WeakMap();
|
|
807
|
-
var
|
|
808
|
-
class Vi extends
|
|
816
|
+
var Xt, O, xt, Lt, qe, Ge, Yt, Ue, Ss, gs;
|
|
817
|
+
class Vi extends ss {
|
|
809
818
|
constructor() {
|
|
810
819
|
super();
|
|
811
|
-
i(this,
|
|
820
|
+
i(this, Xt, null);
|
|
812
821
|
i(this, O, null);
|
|
813
822
|
i(this, xt, !1);
|
|
814
823
|
i(this, Lt, 0);
|
|
815
|
-
i(this, Ne, 0);
|
|
816
824
|
i(this, qe, 0);
|
|
817
|
-
i(this,
|
|
825
|
+
i(this, Ge, 0);
|
|
826
|
+
i(this, Yt, () => {
|
|
818
827
|
r(this, xt, this.offsetWidth > this.offsetHeight);
|
|
819
828
|
const e = t(this, xt) ? this.offsetWidth : this.offsetHeight;
|
|
820
|
-
r(this, Lt, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, Lt, Math.max(t(this, Lt), 30)), t(this, xt) ? (t(this, O).style.width = t(this, Lt) + "px", t(this, O).style.height = "100%") : (t(this, O).style.width = "100%", t(this, O).style.height = t(this, Lt) + "px"), r(this,
|
|
829
|
+
r(this, Lt, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), r(this, Lt, Math.max(t(this, Lt), 30)), t(this, xt) ? (t(this, O).style.width = t(this, Lt) + "px", t(this, O).style.height = "100%") : (t(this, O).style.width = "100%", t(this, O).style.height = t(this, Lt) + "px"), r(this, qe, e - t(this, Lt)), this.scrollElement.scrollSize <= 0 ? this.style.display = "none" : this.style.display = "", t(this, Ue).call(this);
|
|
821
830
|
});
|
|
822
|
-
i(this,
|
|
823
|
-
r(this,
|
|
831
|
+
i(this, Ue, () => {
|
|
832
|
+
r(this, Ge, this.scrollElement.currentProgress * t(this, qe)), t(this, xt) ? t(this, O).style.transform = `translate3d(${t(this, Ge)}px, 0px, 0px)` : t(this, O).style.transform = `translate3d(0px, ${t(this, Ge)}px, 0px)`;
|
|
824
833
|
});
|
|
825
834
|
i(this, Ss, () => {
|
|
826
835
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
@@ -828,7 +837,7 @@ class Vi extends es {
|
|
|
828
837
|
i(this, gs, (e) => {
|
|
829
838
|
document.documentElement.classList.add("grabbing"), wi(
|
|
830
839
|
(u) => {
|
|
831
|
-
const g = t(this, xt) ? u.x : u.y, v = this.scrollElement.distance / t(this,
|
|
840
|
+
const g = t(this, xt) ? u.x : u.y, v = this.scrollElement.distance / t(this, qe), C = (g - h) * v;
|
|
832
841
|
this.scrollElement.setPosition(s + C);
|
|
833
842
|
},
|
|
834
843
|
() => {
|
|
@@ -869,7 +878,7 @@ class Vi extends es {
|
|
|
869
878
|
touchAction: "none"
|
|
870
879
|
}
|
|
871
880
|
})
|
|
872
|
-
], r(this,
|
|
881
|
+
], r(this, Xt, document.createElement("slot")), t(this, Xt).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, Xt));
|
|
873
882
|
}
|
|
874
883
|
}
|
|
875
884
|
get thumbElement() {
|
|
@@ -877,28 +886,28 @@ class Vi extends es {
|
|
|
877
886
|
}
|
|
878
887
|
connectedCallback() {
|
|
879
888
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
880
|
-
const e = t(this,
|
|
881
|
-
r(this, O, e), t(this, O).addEventListener("pointerdown", t(this, gs)),
|
|
889
|
+
const e = t(this, Xt).assignedElements()[0] || t(this, Xt).firstElementChild;
|
|
890
|
+
r(this, O, e), t(this, O).addEventListener("pointerdown", t(this, gs)), pt.subscribe(t(this, Yt), xs.SCROLL), ns.subscribe(this, t(this, Yt)), ns.subscribe(this.scrollElement, t(this, Yt)), this.scrollElement.onScroll(t(this, Ue)), this.scrollElement.axisCSSProperty.subscribe(t(this, Ss));
|
|
882
891
|
}
|
|
883
892
|
disconnectedCallback() {
|
|
884
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, O).removeEventListener("pointerdown", t(this, gs)),
|
|
893
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, O).removeEventListener("pointerdown", t(this, gs)), pt.unsubscribe(t(this, Yt)), ns.unsubscribe(t(this, Yt)), this.scrollElement.offScroll(t(this, Ue)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Ss));
|
|
885
894
|
}
|
|
886
895
|
}
|
|
887
|
-
|
|
896
|
+
Xt = new WeakMap(), O = new WeakMap(), xt = new WeakMap(), Lt = new WeakMap(), qe = new WeakMap(), Ge = new WeakMap(), Yt = new WeakMap(), Ue = new WeakMap(), Ss = new WeakMap(), gs = new WeakMap();
|
|
888
897
|
q && !customElements.get("e-scrollbar") && customElements.define("e-scrollbar", Vi);
|
|
889
|
-
var
|
|
890
|
-
class $s extends
|
|
898
|
+
var Ke, Ze, je;
|
|
899
|
+
class $s extends ss {
|
|
891
900
|
constructor() {
|
|
892
901
|
super();
|
|
893
|
-
i(this,
|
|
894
|
-
i(this,
|
|
902
|
+
i(this, Ke, new c(this, "--behaviour", "smooth"));
|
|
903
|
+
i(this, Ze, new c(
|
|
895
904
|
this,
|
|
896
905
|
"--tween-easing",
|
|
897
906
|
!1
|
|
898
907
|
));
|
|
899
|
-
i(this,
|
|
908
|
+
i(this, je, new c(this, "--tween-duration", 0));
|
|
900
909
|
q && this.addEventListener("click", () => {
|
|
901
|
-
const e = t(this,
|
|
910
|
+
const e = t(this, Ke).current, s = t(this, Ze).current, h = t(this, je).current;
|
|
902
911
|
this.handleClick({
|
|
903
912
|
behaviour: e,
|
|
904
913
|
tween: s || h ? { easing: s, duration: h } : void 0
|
|
@@ -906,37 +915,37 @@ class $s extends es {
|
|
|
906
915
|
});
|
|
907
916
|
}
|
|
908
917
|
connectedCallback() {
|
|
909
|
-
super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this,
|
|
918
|
+
super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.hasAttribute("role") || this.setAttribute("role", "button"), t(this, Ke).observe(), t(this, Ze).observe(), t(this, je).observe();
|
|
910
919
|
}
|
|
911
920
|
disconnectedCallback() {
|
|
912
|
-
this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this,
|
|
921
|
+
this.removeAttribute("tabindex"), this.removeAttribute("role"), t(this, Ke).close(), t(this, Ze).close(), t(this, je).close();
|
|
913
922
|
}
|
|
914
923
|
}
|
|
915
|
-
|
|
916
|
-
var
|
|
924
|
+
Ke = new WeakMap(), Ze = new WeakMap(), je = new WeakMap();
|
|
925
|
+
var Je;
|
|
917
926
|
class zi extends $s {
|
|
918
927
|
constructor() {
|
|
919
928
|
super(...arguments);
|
|
920
|
-
i(this,
|
|
929
|
+
i(this, Je, new c(this, "--set", 1));
|
|
921
930
|
}
|
|
922
931
|
handleClick(e) {
|
|
923
|
-
this.scrollElement.scrollToSection(t(this,
|
|
932
|
+
this.scrollElement.scrollToSection(t(this, Je).current, e);
|
|
924
933
|
}
|
|
925
934
|
connectedCallback() {
|
|
926
|
-
super.connectedCallback(), t(this,
|
|
935
|
+
super.connectedCallback(), t(this, Je).observe();
|
|
927
936
|
}
|
|
928
937
|
disconnectedCallback() {
|
|
929
|
-
super.disconnectedCallback(), t(this,
|
|
938
|
+
super.disconnectedCallback(), t(this, Je).close();
|
|
930
939
|
}
|
|
931
940
|
}
|
|
932
|
-
|
|
941
|
+
Je = new WeakMap();
|
|
933
942
|
q && !customElements.get("e-scroll-set-button") && customElements.define("e-scroll-set-button", zi);
|
|
934
|
-
var kt,
|
|
943
|
+
var kt, Qe;
|
|
935
944
|
class Ai extends $s {
|
|
936
945
|
constructor() {
|
|
937
946
|
super(...arguments);
|
|
938
|
-
i(this, kt, new
|
|
939
|
-
i(this,
|
|
947
|
+
i(this, kt, new c(this, "--step", 1));
|
|
948
|
+
i(this, Qe, () => {
|
|
940
949
|
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, kt).current > 0 && this.scrollElement.scrollLine === "end" || t(this, kt).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
941
950
|
});
|
|
942
951
|
}
|
|
@@ -945,54 +954,54 @@ class Ai extends $s {
|
|
|
945
954
|
}
|
|
946
955
|
connectedCallback() {
|
|
947
956
|
super.connectedCallback(), this.scrollElement && (t(this, kt).subscribe(() => {
|
|
948
|
-
t(this,
|
|
957
|
+
t(this, Qe).call(this);
|
|
949
958
|
}), t(this, kt).observe(), this.scrollElement.addEventListener(
|
|
950
959
|
"scrollLine",
|
|
951
|
-
t(this,
|
|
952
|
-
), t(this,
|
|
960
|
+
t(this, Qe)
|
|
961
|
+
), t(this, Qe).call(this));
|
|
953
962
|
}
|
|
954
963
|
disconnectedCallback() {
|
|
955
964
|
super.disconnectedCallback(), t(this, kt).close(), this.removeAttribute("disabled");
|
|
956
965
|
}
|
|
957
966
|
}
|
|
958
|
-
kt = new WeakMap(),
|
|
967
|
+
kt = new WeakMap(), Qe = new WeakMap();
|
|
959
968
|
q && !customElements.get("e-scroll-step-button") && customElements.define("e-scroll-step-button", Ai);
|
|
960
|
-
var nt,
|
|
969
|
+
var nt, _t, Xe, vs, ys, Ye;
|
|
961
970
|
class Ii {
|
|
962
971
|
constructor(n, e, s) {
|
|
963
972
|
i(this, nt, null);
|
|
964
|
-
i(this,
|
|
965
|
-
i(this,
|
|
973
|
+
i(this, _t, null);
|
|
974
|
+
i(this, Xe, null);
|
|
966
975
|
i(this, vs, null);
|
|
967
976
|
i(this, ys, () => {
|
|
968
|
-
t(this,
|
|
977
|
+
t(this, _t).scrollToSection(t(this, Xe), {
|
|
969
978
|
behaviour: t(this, vs)
|
|
970
979
|
});
|
|
971
980
|
});
|
|
972
|
-
i(this,
|
|
981
|
+
i(this, Ye, () => {
|
|
973
982
|
t(this, nt).classList.toggle(
|
|
974
983
|
"current",
|
|
975
|
-
t(this,
|
|
984
|
+
t(this, _t).counter.current === t(this, Xe)
|
|
976
985
|
);
|
|
977
986
|
});
|
|
978
|
-
q && (r(this, nt, document.createElement("button")), t(this, nt).setAttribute("aria-label", `Go to section ${e + 1}`), r(this,
|
|
987
|
+
q && (r(this, nt, document.createElement("button")), t(this, nt).setAttribute("aria-label", `Go to section ${e + 1}`), r(this, _t, n), r(this, vs, s), r(this, Xe, e), t(this, nt).addEventListener("click", t(this, ys)), t(this, _t).counter.subscribe(t(this, Ye)), t(this, Ye).call(this));
|
|
979
988
|
}
|
|
980
989
|
get element() {
|
|
981
990
|
return t(this, nt);
|
|
982
991
|
}
|
|
983
992
|
destroy() {
|
|
984
|
-
t(this, nt).removeEventListener("click", t(this, ys)), t(this,
|
|
993
|
+
t(this, nt).removeEventListener("click", t(this, ys)), t(this, _t).counter.unsubscribe(t(this, Ye)), t(this, nt).remove();
|
|
985
994
|
}
|
|
986
995
|
}
|
|
987
|
-
nt = new WeakMap(),
|
|
988
|
-
var ke,
|
|
989
|
-
class Mi extends
|
|
996
|
+
nt = new WeakMap(), _t = new WeakMap(), Xe = new WeakMap(), vs = new WeakMap(), ys = new WeakMap(), Ye = new WeakMap();
|
|
997
|
+
var ke, te, ot;
|
|
998
|
+
class Mi extends ss {
|
|
990
999
|
constructor() {
|
|
991
1000
|
super(...arguments);
|
|
992
1001
|
i(this, ke, null);
|
|
993
|
-
i(this,
|
|
1002
|
+
i(this, te, []);
|
|
994
1003
|
i(this, ot, ws(() => {
|
|
995
|
-
t(this,
|
|
1004
|
+
t(this, te).forEach((s) => s.destroy()), r(this, te, []);
|
|
996
1005
|
let e = 0;
|
|
997
1006
|
this.scrollElement.loopCSSProperty.current ? e = this.scrollElement.visibleSections.length : e = this.scrollElement.visibleSections.length - Math.max(this.scrollElement.sectionsInViewCSSProperty.current - 1, 0);
|
|
998
1007
|
for (let s = 0; s < e; s++) {
|
|
@@ -1001,7 +1010,7 @@ class Mi extends es {
|
|
|
1001
1010
|
s,
|
|
1002
1011
|
this.getAttribute("behaviour") || "smooth"
|
|
1003
1012
|
);
|
|
1004
|
-
t(this, ke).appendChild(h.element), t(this,
|
|
1013
|
+
t(this, ke).appendChild(h.element), t(this, te).push(h);
|
|
1005
1014
|
}
|
|
1006
1015
|
}, 0));
|
|
1007
1016
|
}
|
|
@@ -1019,33 +1028,33 @@ class Mi extends es {
|
|
|
1019
1028
|
t(this, ot)
|
|
1020
1029
|
), this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
|
|
1021
1030
|
t(this, ot)
|
|
1022
|
-
), this.scrollElement.loopCSSProperty.unsubscribe(t(this, ot)), t(this,
|
|
1031
|
+
), this.scrollElement.loopCSSProperty.unsubscribe(t(this, ot)), t(this, te).forEach((e) => e.destroy()), r(this, te, []), t(this, ke).remove();
|
|
1023
1032
|
}
|
|
1024
1033
|
}
|
|
1025
|
-
ke = new WeakMap(),
|
|
1034
|
+
ke = new WeakMap(), te = new WeakMap(), ot = new WeakMap();
|
|
1026
1035
|
q && !customElements.get("e-scroll-bullet-buttons") && customElements.define("e-scroll-bullet-buttons", Mi);
|
|
1027
|
-
var
|
|
1028
|
-
class Fi extends
|
|
1036
|
+
var ee, se, ie, re, Vt, zt, At, It, I, H, $, B, Mt, k, ct, lt, _, Ft, Ve, ut, at, dt, w, W, N, tt, et, Z, _e, S, Tt, he, ts, x, ft, R, M, j, ze, Rt, y, ne, m, _s, ti, ei, si, ii, ri, es, Ae, Rs, de, hi, ni, Ds;
|
|
1037
|
+
class Fi extends ss {
|
|
1029
1038
|
constructor() {
|
|
1030
1039
|
super(...arguments);
|
|
1031
1040
|
i(this, m);
|
|
1032
|
-
i(this, te);
|
|
1033
1041
|
i(this, ee);
|
|
1034
1042
|
i(this, se);
|
|
1035
1043
|
i(this, ie);
|
|
1044
|
+
i(this, re);
|
|
1036
1045
|
i(this, Vt);
|
|
1037
1046
|
i(this, zt);
|
|
1038
1047
|
i(this, At);
|
|
1039
1048
|
i(this, It);
|
|
1040
|
-
i(this,
|
|
1049
|
+
i(this, I);
|
|
1041
1050
|
i(this, H);
|
|
1042
1051
|
i(this, $);
|
|
1043
1052
|
i(this, B);
|
|
1044
1053
|
i(this, Mt);
|
|
1045
1054
|
i(this, k);
|
|
1046
|
-
i(this, lt);
|
|
1047
1055
|
i(this, ct);
|
|
1048
|
-
i(this,
|
|
1056
|
+
i(this, lt);
|
|
1057
|
+
i(this, _);
|
|
1049
1058
|
i(this, Ft);
|
|
1050
1059
|
i(this, Ve);
|
|
1051
1060
|
i(this, ut);
|
|
@@ -1054,78 +1063,78 @@ class Fi extends es {
|
|
|
1054
1063
|
i(this, w);
|
|
1055
1064
|
i(this, W);
|
|
1056
1065
|
i(this, N);
|
|
1057
|
-
i(this,
|
|
1058
|
-
i(this,
|
|
1066
|
+
i(this, tt);
|
|
1067
|
+
i(this, et);
|
|
1059
1068
|
i(this, Z);
|
|
1060
|
-
i(this,
|
|
1069
|
+
i(this, _e);
|
|
1061
1070
|
i(this, S);
|
|
1062
1071
|
i(this, Tt);
|
|
1063
|
-
i(this,
|
|
1064
|
-
i(this,
|
|
1072
|
+
i(this, he);
|
|
1073
|
+
i(this, ts);
|
|
1065
1074
|
i(this, x);
|
|
1066
|
-
i(this,
|
|
1067
|
-
i(this,
|
|
1068
|
-
i(this,
|
|
1075
|
+
i(this, ft);
|
|
1076
|
+
i(this, R);
|
|
1077
|
+
i(this, M);
|
|
1069
1078
|
i(this, j);
|
|
1070
1079
|
i(this, ze);
|
|
1071
1080
|
i(this, Rt);
|
|
1072
1081
|
i(this, y);
|
|
1073
|
-
i(this,
|
|
1074
|
-
i(this,
|
|
1082
|
+
i(this, ne);
|
|
1083
|
+
i(this, es);
|
|
1075
1084
|
i(this, Ae);
|
|
1076
|
-
r(this,
|
|
1085
|
+
r(this, ee, new c(this, "--damping", 20)), r(this, se, new c(this, "--mass", 0)), r(this, ie, new c(this, "--stiffness", 0)), r(this, re, new c(this, "--target", "")), r(this, Vt, new c(this, "--disabled", !1)), r(this, zt, new c(
|
|
1077
1086
|
this,
|
|
1078
1087
|
"--distance-offset",
|
|
1079
1088
|
0,
|
|
1080
1089
|
{ rawValueCheck: !1 }
|
|
1081
|
-
)), r(this, At, new
|
|
1090
|
+
)), r(this, At, new c(this, "--start-offset", 0, {
|
|
1082
1091
|
rawValueCheck: !1
|
|
1083
|
-
})), r(this, It, new
|
|
1092
|
+
})), r(this, It, new c(
|
|
1084
1093
|
this,
|
|
1085
1094
|
"--capture-once",
|
|
1086
1095
|
!1
|
|
1087
|
-
)), r(this,
|
|
1096
|
+
)), r(this, I, new c(this, "--captured", "")), r(this, H, new c(this, "--released", "")), r(this, $, new c(
|
|
1088
1097
|
this,
|
|
1089
1098
|
"--captured-from-start",
|
|
1090
1099
|
""
|
|
1091
|
-
)), r(this, B, new
|
|
1100
|
+
)), r(this, B, new c(
|
|
1092
1101
|
this,
|
|
1093
1102
|
"--captured-from-finish",
|
|
1094
1103
|
""
|
|
1095
|
-
)), r(this, Mt, new
|
|
1104
|
+
)), r(this, Mt, new c(
|
|
1096
1105
|
this,
|
|
1097
1106
|
"--released-from-start",
|
|
1098
1107
|
""
|
|
1099
|
-
)), r(this, k, new
|
|
1108
|
+
)), r(this, k, new c(
|
|
1100
1109
|
this,
|
|
1101
1110
|
"--released-from-finish",
|
|
1102
1111
|
""
|
|
1103
|
-
)), r(this,
|
|
1112
|
+
)), r(this, ct, new c(this, "--passed-var", "")), r(this, lt, new c(this, "--progress-var", "")), r(this, _, new c(
|
|
1104
1113
|
this,
|
|
1105
1114
|
"--progress-arc-var",
|
|
1106
1115
|
""
|
|
1107
|
-
)), r(this, Ft, new
|
|
1116
|
+
)), r(this, Ft, new c(
|
|
1108
1117
|
this,
|
|
1109
1118
|
"--progress-arc-mult",
|
|
1110
1119
|
1
|
|
1111
|
-
)), r(this, Ve, new
|
|
1120
|
+
)), r(this, Ve, new c(
|
|
1112
1121
|
this,
|
|
1113
1122
|
"--animation-var-type",
|
|
1114
1123
|
"target"
|
|
1115
|
-
)), r(this, ut, new
|
|
1116
|
-
r(this,
|
|
1117
|
-
const e =
|
|
1124
|
+
)), r(this, ut, new c(this, "--distance-var", "")), r(this, at, new c(this, "--start-var", "")), r(this, dt, new c(this, "--finish-var", "")), r(this, w, new ue(!1)), r(this, W, new ue(!1)), r(this, N, new ue(!1)), r(this, tt, new ue(!1)), r(this, et, new ue(!1)), r(this, Z, new ue(!1)), r(this, _e, []), r(this, S, this), r(this, Tt, 0), r(this, he, 0), r(this, ts, 0), r(this, x, new Qs(0, { order: Js.SEGMENT, min: 0, max: 1 })), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, ze, !1), r(this, Rt, !1), r(this, y, !0), r(this, ne, !1), this.resize = () => {
|
|
1125
|
+
r(this, he, this.scrollElement.vertical ? this.offsetHeight : this.offsetWidth), r(this, Tt, this.scrollElement.vertical ? os(this, this.scrollElement) : cs(this, this.scrollElement));
|
|
1126
|
+
const e = pi(
|
|
1118
1127
|
this,
|
|
1119
1128
|
this.scrollElement.vertical ? "top" : "left"
|
|
1120
1129
|
);
|
|
1121
|
-
r(this, Tt, t(this, Tt) - e), r(this,
|
|
1130
|
+
r(this, Tt, t(this, Tt) - e), r(this, R, this.getStart()), r(this, M, this.getDistance()), r(this, R, t(this, R) + t(this, At).current), r(this, M, t(this, M) + t(this, zt).current), r(this, j, t(this, R) + t(this, M)), this.scrollElement.currentScrollValue > t(this, j) && !t(this, w).current && !t(this, W).current && (t(this, w).current = !0), this.setVar(t(this, at).current, t(this, R)), this.setVar(t(this, dt).current, t(this, j)), this.setVar(t(this, ut).current, t(this, M)), t(this, x).max = t(this, M), r(this, ze, !0), t(this, Ae).call(this);
|
|
1122
1131
|
}, this.findAnotherScrollEntries = ws(() => {
|
|
1123
|
-
const e =
|
|
1132
|
+
const e = ce.getAll(this).reverse();
|
|
1124
1133
|
let s = 0;
|
|
1125
1134
|
e.forEach((h, u) => {
|
|
1126
1135
|
h.element === this.scrollElement && (s = u);
|
|
1127
|
-
}), r(this,
|
|
1128
|
-
}, 0), r(this,
|
|
1136
|
+
}), r(this, _e, e.slice(s + 1)), this.tick();
|
|
1137
|
+
}, 0), r(this, es, () => {
|
|
1129
1138
|
t(this, y) || this.resize();
|
|
1130
1139
|
}), r(this, Ae, () => {
|
|
1131
1140
|
!t(this, y) && t(this, ze) && this.tick();
|
|
@@ -1141,7 +1150,7 @@ class Fi extends es {
|
|
|
1141
1150
|
return t(this, It);
|
|
1142
1151
|
}
|
|
1143
1152
|
get capturedCSSProperty() {
|
|
1144
|
-
return t(this,
|
|
1153
|
+
return t(this, I);
|
|
1145
1154
|
}
|
|
1146
1155
|
get releasedCSSProperty() {
|
|
1147
1156
|
return t(this, H);
|
|
@@ -1159,13 +1168,13 @@ class Fi extends es {
|
|
|
1159
1168
|
return t(this, k);
|
|
1160
1169
|
}
|
|
1161
1170
|
get passedVarCSSProperty() {
|
|
1162
|
-
return t(this,
|
|
1171
|
+
return t(this, ct);
|
|
1163
1172
|
}
|
|
1164
1173
|
get progressVarCSSProperty() {
|
|
1165
|
-
return t(this,
|
|
1174
|
+
return t(this, lt);
|
|
1166
1175
|
}
|
|
1167
1176
|
get progressArcVarCSSProperty() {
|
|
1168
|
-
return t(this,
|
|
1177
|
+
return t(this, _);
|
|
1169
1178
|
}
|
|
1170
1179
|
get progressArcMultCSSProperty() {
|
|
1171
1180
|
return t(this, Ft);
|
|
@@ -1186,16 +1195,16 @@ class Fi extends es {
|
|
|
1186
1195
|
return t(this, Vt);
|
|
1187
1196
|
}
|
|
1188
1197
|
get dampingCSSProperty() {
|
|
1189
|
-
return t(this,
|
|
1198
|
+
return t(this, ee);
|
|
1190
1199
|
}
|
|
1191
1200
|
get massCSSProperty() {
|
|
1192
|
-
return t(this,
|
|
1201
|
+
return t(this, se);
|
|
1193
1202
|
}
|
|
1194
1203
|
get stiffnessCSSProperty() {
|
|
1195
|
-
return t(this,
|
|
1204
|
+
return t(this, ie);
|
|
1196
1205
|
}
|
|
1197
1206
|
get targetCSSProperty() {
|
|
1198
|
-
return t(this,
|
|
1207
|
+
return t(this, re);
|
|
1199
1208
|
}
|
|
1200
1209
|
get isCaptured() {
|
|
1201
1210
|
return t(this, w);
|
|
@@ -1207,10 +1216,10 @@ class Fi extends es {
|
|
|
1207
1216
|
return t(this, N);
|
|
1208
1217
|
}
|
|
1209
1218
|
get isReleasedFromStart() {
|
|
1210
|
-
return t(this,
|
|
1219
|
+
return t(this, tt);
|
|
1211
1220
|
}
|
|
1212
1221
|
get isCapturedFromFinish() {
|
|
1213
|
-
return t(this,
|
|
1222
|
+
return t(this, et);
|
|
1214
1223
|
}
|
|
1215
1224
|
get isReleasedFromFinish() {
|
|
1216
1225
|
return t(this, Z);
|
|
@@ -1219,25 +1228,25 @@ class Fi extends es {
|
|
|
1219
1228
|
return t(this, Tt);
|
|
1220
1229
|
}
|
|
1221
1230
|
get directionSize() {
|
|
1222
|
-
return t(this,
|
|
1231
|
+
return t(this, he);
|
|
1223
1232
|
}
|
|
1224
1233
|
get passed() {
|
|
1225
1234
|
return t(this, x);
|
|
1226
1235
|
}
|
|
1227
1236
|
get progress() {
|
|
1228
|
-
return t(this,
|
|
1237
|
+
return t(this, ft);
|
|
1229
1238
|
}
|
|
1230
1239
|
get progressArc() {
|
|
1231
|
-
return Math.abs(Math.cos(t(this,
|
|
1240
|
+
return Math.abs(Math.cos(t(this, ft) * Math.PI)) * t(this, Ft).current;
|
|
1232
1241
|
}
|
|
1233
1242
|
get start() {
|
|
1234
|
-
return t(this,
|
|
1243
|
+
return t(this, R);
|
|
1235
1244
|
}
|
|
1236
1245
|
get finish() {
|
|
1237
1246
|
return t(this, j);
|
|
1238
1247
|
}
|
|
1239
1248
|
get distance() {
|
|
1240
|
-
return t(this,
|
|
1249
|
+
return t(this, M);
|
|
1241
1250
|
}
|
|
1242
1251
|
get isCapturedOnce() {
|
|
1243
1252
|
return t(this, Rt);
|
|
@@ -1247,62 +1256,62 @@ class Fi extends es {
|
|
|
1247
1256
|
}
|
|
1248
1257
|
tick() {
|
|
1249
1258
|
let e = this.scrollElement.currentScrollValue;
|
|
1250
|
-
t(this,
|
|
1259
|
+
t(this, _e).forEach((u) => {
|
|
1251
1260
|
e += u.value;
|
|
1252
1261
|
});
|
|
1253
|
-
const s = e - t(this,
|
|
1254
|
-
t(this,
|
|
1262
|
+
const s = e - t(this, R);
|
|
1263
|
+
t(this, ne) || r(this, ne, t(this, x).previous ? Math.abs(t(this, x).previous - s) > 1e3 : !1), t(this, x).set(s);
|
|
1255
1264
|
const h = Math.round(e);
|
|
1256
|
-
t(this, w).current && (h >= t(this,
|
|
1257
|
-
bi(t(this,
|
|
1258
|
-
), o(this, m, ti).call(this)), t(this, Rt) && t(this, It).current && (t(this,
|
|
1265
|
+
t(this, w).current && (h >= t(this, R) ? t(this, N).current || o(this, m, ei).call(this) : t(this, N).current && !t(this, tt).current && o(this, m, ii).call(this), h < t(this, j) ? t(this, Z).current && !t(this, et).current && o(this, m, si).call(this) : t(this, N).current && !t(this, Z).current && o(this, m, ri).call(this)), h >= t(this, R) && h < t(this, j) ? t(this, w).current || o(this, m, _s).call(this) : t(this, w).current && (t(this, x).set(
|
|
1266
|
+
bi(t(this, M) / 2, t(this, x).target, 0, t(this, M))
|
|
1267
|
+
), o(this, m, ti).call(this)), t(this, Rt) && t(this, It).current && (t(this, I).current && t(this, S).classList.add(t(this, I).current), r(this, y, !0));
|
|
1259
1268
|
}
|
|
1260
1269
|
disable() {
|
|
1261
|
-
this.style.cssText = "", r(this, Tt, 0), r(this,
|
|
1270
|
+
this.style.cssText = "", r(this, Tt, 0), r(this, he, 0), t(this, x).reset(), r(this, ft, 0), r(this, R, 0), r(this, M, 0), r(this, j, 0), r(this, ze, !1), t(this, w).current = !1, t(this, W).current = !1, t(this, N).current = !1, t(this, tt).current = !1, t(this, et).current = !1, t(this, Z).current = !1, r(this, Rt, !1), r(this, y, !0), o(this, m, Ds).call(this);
|
|
1262
1271
|
}
|
|
1263
1272
|
enable() {
|
|
1264
1273
|
r(this, y, !1);
|
|
1265
1274
|
}
|
|
1266
1275
|
connectedCallback() {
|
|
1267
1276
|
super.connectedCallback(), t(this, w).subscribe((s) => {
|
|
1268
|
-
s.current &&
|
|
1277
|
+
s.current && st(this, "scrollSegmentCapture", {
|
|
1269
1278
|
composed: !0,
|
|
1270
1279
|
custom: !0
|
|
1271
1280
|
});
|
|
1272
1281
|
}), t(this, N).subscribe((s) => {
|
|
1273
|
-
s.current &&
|
|
1282
|
+
s.current && st(this, "scrollSegmentCaptureFromStart", {
|
|
1274
1283
|
composed: !0,
|
|
1275
1284
|
custom: !0
|
|
1276
1285
|
});
|
|
1277
|
-
}), t(this,
|
|
1278
|
-
s.current &&
|
|
1286
|
+
}), t(this, et).subscribe((s) => {
|
|
1287
|
+
s.current && st(this, "scrollSegmentCaptureFromFinish", {
|
|
1279
1288
|
composed: !0,
|
|
1280
1289
|
custom: !0
|
|
1281
1290
|
});
|
|
1282
1291
|
}), t(this, W).subscribe((s) => {
|
|
1283
|
-
s.current &&
|
|
1292
|
+
s.current && st(this, "scrollSegmentRelease", {
|
|
1284
1293
|
composed: !0,
|
|
1285
1294
|
custom: !0
|
|
1286
1295
|
});
|
|
1287
|
-
}), t(this,
|
|
1288
|
-
s.current &&
|
|
1296
|
+
}), t(this, tt).subscribe((s) => {
|
|
1297
|
+
s.current && st(this, "scrollSegmentReleaseFromStart", {
|
|
1289
1298
|
composed: !0,
|
|
1290
1299
|
custom: !0
|
|
1291
1300
|
});
|
|
1292
1301
|
}), t(this, Z).subscribe((s) => {
|
|
1293
|
-
s.current &&
|
|
1302
|
+
s.current && st(this, "scrollSegmentReleaseFromFinish", {
|
|
1294
1303
|
composed: !0,
|
|
1295
1304
|
custom: !0
|
|
1296
1305
|
});
|
|
1297
|
-
}), t(this,
|
|
1306
|
+
}), t(this, ee).observe(), t(this, se).observe(), t(this, ie).observe(), t(this, re).observe(), t(this, Vt).observe(), t(this, zt).observe(), t(this, At).observe(), t(this, It).observe(), t(this, I).observe(), t(this, H).observe(), t(this, $).observe(), t(this, B).observe(), t(this, Mt).observe(), t(this, k).observe(), t(this, ct).observe(), t(this, lt).observe(), t(this, _).observe(), t(this, Ft).observe(), t(this, Ve).observe(), t(this, ut).observe(), t(this, at).observe(), t(this, dt).observe();
|
|
1298
1307
|
let e = !1;
|
|
1299
|
-
this.findAnotherScrollEntries(), t(this, Vt).current || this.enable(), t(this,
|
|
1308
|
+
this.findAnotherScrollEntries(), t(this, Vt).current || this.enable(), t(this, ee).subscribe((s) => {
|
|
1300
1309
|
t(this, x).damping = s.current;
|
|
1301
|
-
}), t(this, ee).subscribe((s) => {
|
|
1302
|
-
t(this, x).mass = s.current;
|
|
1303
1310
|
}), t(this, se).subscribe((s) => {
|
|
1304
|
-
t(this, x).
|
|
1311
|
+
t(this, x).mass = s.current;
|
|
1305
1312
|
}), t(this, ie).subscribe((s) => {
|
|
1313
|
+
t(this, x).stiffness = s.current;
|
|
1314
|
+
}), t(this, re).subscribe((s) => {
|
|
1306
1315
|
s.previous && o(this, m, Ds).call(this), s.current ? s.current === "parent" ? r(this, S, this.parentElement || this) : r(this, S, document.querySelector(s.current) || this) : r(this, S, this);
|
|
1307
1316
|
}), t(this, Vt).subscribe((s) => {
|
|
1308
1317
|
s.current && !s.previous ? this.disable() : !s.current && s.previous && (this.resize(), this.enable());
|
|
@@ -1310,50 +1319,50 @@ class Fi extends es {
|
|
|
1310
1319
|
e && !t(this, y) && this.resize();
|
|
1311
1320
|
}), t(this, zt).subscribe(() => {
|
|
1312
1321
|
e && !t(this, y) && this.resize();
|
|
1313
|
-
}), t(this,
|
|
1314
|
-
o(this, m,
|
|
1322
|
+
}), t(this, I).subscribe((s) => {
|
|
1323
|
+
o(this, m, de).call(this, s);
|
|
1315
1324
|
}), t(this, $).subscribe((s) => {
|
|
1316
|
-
o(this, m,
|
|
1325
|
+
o(this, m, de).call(this, s);
|
|
1317
1326
|
}), t(this, B).subscribe((s) => {
|
|
1318
|
-
o(this, m,
|
|
1327
|
+
o(this, m, de).call(this, s);
|
|
1319
1328
|
}), t(this, H).subscribe((s) => {
|
|
1320
|
-
o(this, m,
|
|
1329
|
+
o(this, m, de).call(this, s);
|
|
1321
1330
|
}), t(this, Mt).subscribe((s) => {
|
|
1322
|
-
o(this, m,
|
|
1331
|
+
o(this, m, de).call(this, s);
|
|
1323
1332
|
}), t(this, k).subscribe((s) => {
|
|
1324
|
-
o(this, m,
|
|
1333
|
+
o(this, m, de).call(this, s);
|
|
1325
1334
|
}), t(this, It).subscribe((s) => {
|
|
1326
1335
|
t(this, y) || !s.current && s.previous && (this.resize(), this.enable());
|
|
1327
|
-
}), t(this, lt).subscribe((s) => {
|
|
1328
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
1329
1336
|
}), t(this, ct).subscribe((s) => {
|
|
1330
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current,
|
|
1331
|
-
}), t(this,
|
|
1337
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.passed.current));
|
|
1338
|
+
}), t(this, lt).subscribe((s) => {
|
|
1339
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, ft)));
|
|
1340
|
+
}), t(this, _).subscribe((s) => {
|
|
1332
1341
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, this.progressArc));
|
|
1333
1342
|
}), t(this, Ft).subscribe((s) => {
|
|
1334
1343
|
t(this, y) || o(this, m, Rs).call(this);
|
|
1335
1344
|
}), t(this, at).subscribe((s) => {
|
|
1336
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
1345
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, R)));
|
|
1337
1346
|
}), t(this, dt).subscribe((s) => {
|
|
1338
1347
|
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, j)));
|
|
1339
1348
|
}), t(this, ut).subscribe((s) => {
|
|
1340
|
-
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this,
|
|
1349
|
+
t(this, y) || (this.removeVar(s.previous), this.setVar(s.current, t(this, M)));
|
|
1341
1350
|
}), t(this, x).subscribe((s) => {
|
|
1342
|
-
if (t(this,
|
|
1343
|
-
r(this,
|
|
1351
|
+
if (t(this, ne)) {
|
|
1352
|
+
r(this, ne, !1);
|
|
1344
1353
|
return;
|
|
1345
1354
|
}
|
|
1346
1355
|
o(this, m, Rs).call(this);
|
|
1347
1356
|
}), this.scrollElement.addEventListener(
|
|
1348
1357
|
"scrollSectionsChange",
|
|
1349
1358
|
this.findAnotherScrollEntries
|
|
1350
|
-
), this.scrollElement.addEventListener("scrollResize", this.resize),
|
|
1359
|
+
), this.scrollElement.addEventListener("scrollResize", this.resize), pt.subscribe(t(this, es), xs.SCROLL + 1), this.scrollElement.onScroll(t(this, Ae)), e = !0;
|
|
1351
1360
|
}
|
|
1352
1361
|
disconnectedCallback() {
|
|
1353
|
-
|
|
1362
|
+
pt.unsubscribe(t(this, es)), this.scrollElement.offScroll(t(this, Ae)), this.scrollElement.removeEventListener(
|
|
1354
1363
|
"scrollSectionsChange",
|
|
1355
1364
|
this.findAnotherScrollEntries
|
|
1356
|
-
), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this,
|
|
1365
|
+
), this.scrollElement.removeEventListener("scrollResize", this.resize), t(this, ee).close(), t(this, se).close(), t(this, ie).close(), t(this, re).close(), t(this, Vt).close(), t(this, zt).close(), t(this, At).close(), t(this, It).close(), t(this, I).close(), t(this, H).close(), t(this, $).close(), t(this, B).close(), t(this, Mt).close(), t(this, k).close(), t(this, ct).close(), t(this, lt).close(), t(this, _).close(), t(this, Ft).close(), t(this, ut).close(), t(this, at).close(), t(this, dt).close(), t(this, w).close(), t(this, W).close(), t(this, N).close(), t(this, tt).close(), t(this, et).close(), t(this, Z).close(), this.disable(), t(this, x).close();
|
|
1357
1366
|
}
|
|
1358
1367
|
removeVar(e) {
|
|
1359
1368
|
e && t(this, S).style.removeProperty(`--${e}`);
|
|
@@ -1365,44 +1374,44 @@ class Fi extends es {
|
|
|
1365
1374
|
}
|
|
1366
1375
|
}
|
|
1367
1376
|
getDistance() {
|
|
1368
|
-
return t(this,
|
|
1377
|
+
return t(this, he) + t(this, ts);
|
|
1369
1378
|
}
|
|
1370
1379
|
getStart() {
|
|
1371
|
-
return t(this, Tt) - t(this,
|
|
1380
|
+
return t(this, Tt) - t(this, ts);
|
|
1372
1381
|
}
|
|
1373
1382
|
}
|
|
1374
|
-
|
|
1383
|
+
ee = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), Vt = new WeakMap(), zt = new WeakMap(), At = new WeakMap(), It = new WeakMap(), I = new WeakMap(), H = new WeakMap(), $ = new WeakMap(), B = new WeakMap(), Mt = new WeakMap(), k = new WeakMap(), ct = new WeakMap(), lt = new WeakMap(), _ = new WeakMap(), Ft = new WeakMap(), Ve = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), dt = new WeakMap(), w = new WeakMap(), W = new WeakMap(), N = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), Z = new WeakMap(), _e = new WeakMap(), S = new WeakMap(), Tt = new WeakMap(), he = new WeakMap(), ts = new WeakMap(), x = new WeakMap(), ft = new WeakMap(), R = new WeakMap(), M = new WeakMap(), j = new WeakMap(), ze = new WeakMap(), Rt = new WeakMap(), y = new WeakMap(), ne = new WeakMap(), m = new WeakSet(), _s = function() {
|
|
1375
1384
|
t(this, w).current = !0, t(this, W).current = !1, r(this, Rt, !0), t(this, H).current && t(this, S).classList.remove(t(this, H).current), t(this, k).current && t(this, S).classList.remove(
|
|
1376
1385
|
t(this, k).current
|
|
1377
1386
|
), t(this, k).current && t(this, S).classList.remove(
|
|
1378
1387
|
t(this, k).current
|
|
1379
|
-
), t(this,
|
|
1388
|
+
), t(this, I).current && t(this, S).classList.add(t(this, I).current);
|
|
1380
1389
|
}, ti = function() {
|
|
1381
|
-
t(this, W).current = !0, t(this, w).current = !1, r(this, Rt, !0), t(this,
|
|
1390
|
+
t(this, W).current = !0, t(this, w).current = !1, r(this, Rt, !0), t(this, I).current && t(this, S).classList.remove(t(this, I).current), t(this, $).current && t(this, S).classList.remove(
|
|
1382
1391
|
t(this, $).current
|
|
1383
1392
|
), t(this, B).current && t(this, S).classList.remove(
|
|
1384
1393
|
t(this, B).current
|
|
1385
1394
|
), t(this, H).current && t(this, S).classList.add(t(this, H).current);
|
|
1386
1395
|
}, ei = function() {
|
|
1387
|
-
t(this, w).current = !0, t(this, N).current = !0, t(this,
|
|
1396
|
+
t(this, w).current = !0, t(this, N).current = !0, t(this, tt).current = !1, t(this, $).current && t(this, S).classList.add(
|
|
1388
1397
|
t(this, $).current
|
|
1389
1398
|
);
|
|
1390
1399
|
}, si = function() {
|
|
1391
|
-
t(this, w).current = !0, t(this,
|
|
1400
|
+
t(this, w).current = !0, t(this, et).current = !0, t(this, Z).current = !1, t(this, B).current && t(this, S).classList.add(
|
|
1392
1401
|
t(this, B).current
|
|
1393
1402
|
);
|
|
1394
1403
|
}, ii = function() {
|
|
1395
|
-
t(this, W).current = !0, t(this,
|
|
1404
|
+
t(this, W).current = !0, t(this, tt).current = !0, t(this, N).current = !1, t(this, k).current && t(this, S).classList.add(
|
|
1396
1405
|
t(this, k).current
|
|
1397
1406
|
);
|
|
1398
1407
|
}, ri = function() {
|
|
1399
|
-
t(this, W).current = !0, t(this, Z).current = !0, t(this,
|
|
1408
|
+
t(this, W).current = !0, t(this, Z).current = !0, t(this, et).current = !1, t(this, k).current && t(this, S).classList.add(
|
|
1400
1409
|
t(this, k).current
|
|
1401
1410
|
);
|
|
1402
|
-
},
|
|
1411
|
+
}, es = new WeakMap(), Ae = new WeakMap(), Rs = function() {
|
|
1403
1412
|
const e = t(this, x)[t(this, Ve).current];
|
|
1404
|
-
this.setVar(t(this,
|
|
1405
|
-
},
|
|
1413
|
+
this.setVar(t(this, ct).current, e), r(this, ft, e / t(this, M) || 0), this.setVar(t(this, lt).current, t(this, ft)), t(this, _).current && this.setVar(t(this, _).current, this.progressArc);
|
|
1414
|
+
}, de = function(e) {
|
|
1406
1415
|
if (t(this, y)) {
|
|
1407
1416
|
e.previous && t(this, S).classList.remove(e.previous), e.current && t(this, S).classList.remove(e.current);
|
|
1408
1417
|
return;
|
|
@@ -1417,13 +1426,13 @@ te = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ie = new WeakMap(),
|
|
|
1417
1426
|
s && t(this, S).style.removeProperty(`--${s}`);
|
|
1418
1427
|
});
|
|
1419
1428
|
}, Ds = function() {
|
|
1420
|
-
o(this, m, hi).call(this, t(this,
|
|
1429
|
+
o(this, m, hi).call(this, t(this, I).current, t(this, $).current, t(this, B).current, t(this, H).current, t(this, Mt).current, t(this, k).current), o(this, m, ni).call(this, t(this, ct).current, t(this, lt).current, t(this, _).current, t(this, ut).current, t(this, at).current, t(this, dt).current);
|
|
1421
1430
|
};
|
|
1422
1431
|
q && !customElements.get("e-scroll-segment") && customElements.define("e-scroll-segment", Fi);
|
|
1423
1432
|
class Ti extends $s {
|
|
1424
1433
|
handleClick(n) {
|
|
1425
1434
|
this.scrollElement.setPosition(
|
|
1426
|
-
this.scrollElement.vertical ? os(this) :
|
|
1435
|
+
this.scrollElement.vertical ? os(this) : cs(this),
|
|
1427
1436
|
n
|
|
1428
1437
|
);
|
|
1429
1438
|
}
|
|
@@ -1436,7 +1445,7 @@ class Ti extends $s {
|
|
|
1436
1445
|
}
|
|
1437
1446
|
q && !customElements.get("e-scroll-section-button") && customElements.define("e-scroll-section-button", Ti);
|
|
1438
1447
|
var Cs;
|
|
1439
|
-
const Bs = class Bs extends
|
|
1448
|
+
const Bs = class Bs extends ss {
|
|
1440
1449
|
constructor() {
|
|
1441
1450
|
super(...arguments);
|
|
1442
1451
|
i(this, Cs, () => {
|
|
@@ -1456,11 +1465,11 @@ const Bs = class Bs extends es {
|
|
|
1456
1465
|
Cs = new WeakMap();
|
|
1457
1466
|
let Os = Bs;
|
|
1458
1467
|
q && !customElements.get("e-scroll-counter") && customElements.define("e-scroll-counter", Os);
|
|
1459
|
-
var
|
|
1460
|
-
const Ws = class Ws extends
|
|
1468
|
+
var oe;
|
|
1469
|
+
const Ws = class Ws extends ss {
|
|
1461
1470
|
constructor() {
|
|
1462
1471
|
super(...arguments);
|
|
1463
|
-
i(this,
|
|
1472
|
+
i(this, oe, () => {
|
|
1464
1473
|
const e = this.scrollElement.limit + 1, s = parseInt(this.getAttribute("pad") || "0");
|
|
1465
1474
|
this.textContent = e.toString().padStart(s, "0");
|
|
1466
1475
|
});
|
|
@@ -1468,23 +1477,23 @@ const Ws = class Ws extends es {
|
|
|
1468
1477
|
connectedCallback() {
|
|
1469
1478
|
return Vs(this, null, function* () {
|
|
1470
1479
|
ks(Ws.prototype, this, "connectedCallback").call(this), this.scrollElement.sectionsInViewCSSProperty.subscribe(
|
|
1471
|
-
t(this,
|
|
1480
|
+
t(this, oe)
|
|
1472
1481
|
), this.scrollElement.addEventListener(
|
|
1473
1482
|
"scrollSectionsChange",
|
|
1474
|
-
t(this,
|
|
1475
|
-
), t(this,
|
|
1483
|
+
t(this, oe)
|
|
1484
|
+
), t(this, oe).call(this);
|
|
1476
1485
|
});
|
|
1477
1486
|
}
|
|
1478
1487
|
disconnectedCallback() {
|
|
1479
1488
|
this.scrollElement.sectionsInViewCSSProperty.unsubscribe(
|
|
1480
|
-
t(this,
|
|
1489
|
+
t(this, oe)
|
|
1481
1490
|
), this.scrollElement.removeEventListener(
|
|
1482
1491
|
"scrollSectionsChange",
|
|
1483
|
-
t(this,
|
|
1492
|
+
t(this, oe)
|
|
1484
1493
|
);
|
|
1485
1494
|
}
|
|
1486
1495
|
};
|
|
1487
|
-
|
|
1496
|
+
oe = new WeakMap();
|
|
1488
1497
|
let Hs = Ws;
|
|
1489
1498
|
q && !customElements.get("e-scroll-total") && customElements.define("e-scroll-total", Hs);
|
|
1490
1499
|
export {
|