aptechka 0.33.8 → 0.34.1
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/Tweened-DJzAFsVZ.js +44 -0
- package/lib/Tweened-lT5myPAZ.cjs +1 -0
- package/lib/animation/Tweened.d.ts +2 -2
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/scroll/vanilla/ScrollButtonElement.d.ts +3 -0
- package/lib/scroll/vanilla/ScrollElement.d.ts +7 -2
- package/lib/scroll/vanilla/ScrollSetButtonElement.d.ts +3 -0
- package/lib/scroll/vanilla/ScrollStepButtonElement.d.ts +3 -0
- package/lib/scroll/vanilla/index.cjs +1 -1
- package/lib/scroll/vanilla/index.js +457 -407
- package/package.json +1 -1
- package/lib/Tweened-B_ZFQKGQ.js +0 -44
- package/lib/Tweened-C0-UzxN-.cjs +0 -1
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var be = Object.getOwnPropertySymbols;
|
|
3
|
+
var De = Object.prototype.hasOwnProperty, Ie = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ge = (a) => {
|
|
5
5
|
throw TypeError(a);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
for (var e in
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
for (var e of
|
|
12
|
-
|
|
7
|
+
var Se = (a, h, e) => h in a ? ze(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e, ve = (a, h) => {
|
|
8
|
+
for (var e in h || (h = {}))
|
|
9
|
+
De.call(h, e) && Se(a, e, h[e]);
|
|
10
|
+
if (be)
|
|
11
|
+
for (var e of be(h))
|
|
12
|
+
Ie.call(h, e) && Se(a, e, h[e]);
|
|
13
13
|
return a;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
16
|
-
var t = (a,
|
|
17
|
-
import { S as
|
|
18
|
-
import { i as
|
|
19
|
-
import { q as
|
|
20
|
-
import { d as
|
|
21
|
-
import { c as
|
|
22
|
-
import { a as
|
|
23
|
-
import { c as
|
|
15
|
+
var he = (a, h, e) => h.has(a) || ge("Cannot " + e);
|
|
16
|
+
var t = (a, h, e) => (he(a, h, "read from private field"), e ? e.call(a) : h.get(a)), s = (a, h, e) => h.has(a) ? ge("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(a) : h.set(a, e), n = (a, h, e, i) => (he(a, h, "write to private field"), i ? i.call(a, e) : h.set(a, e), e), d = (a, h, e) => (he(a, h, "access private method"), e);
|
|
17
|
+
import { S as Te } from "../../Store-OTdcl6SX.js";
|
|
18
|
+
import { i as ne } from "../../browser-0zX67oeU.js";
|
|
19
|
+
import { q as Ae } from "../../easings-BEmRlrDd.js";
|
|
20
|
+
import { d as ee } from "../../events-CsVF98U6.js";
|
|
21
|
+
import { c as Ce } from "../../jss-CjccJC-K.js";
|
|
22
|
+
import { a as oe, g as le } from "../../layout-HoBT_Da2.js";
|
|
23
|
+
import { c as we } from "../../math-BOBiC4TN.js";
|
|
24
24
|
import "../../ticker/vanilla/index.js";
|
|
25
|
-
import { TICK_ORDER as
|
|
26
|
-
import { D as
|
|
27
|
-
import { T as
|
|
28
|
-
import { WheelControls as
|
|
29
|
-
import { windowResizer as
|
|
30
|
-
import { scrollEntries as
|
|
31
|
-
import { cssUnitParser as
|
|
32
|
-
import { CSSProperty as
|
|
33
|
-
import { device as
|
|
34
|
-
import { elementResizer as
|
|
35
|
-
import { s as
|
|
36
|
-
import { f as
|
|
37
|
-
import { d as
|
|
38
|
-
import { ScrollSegmentElement as
|
|
39
|
-
var m,
|
|
40
|
-
class
|
|
41
|
-
constructor(
|
|
25
|
+
import { TICK_ORDER as Me, RESIZE_ORDER as Ee } from "../../order/index.js";
|
|
26
|
+
import { D as Ve } from "../../Damped-Chu29wn-.js";
|
|
27
|
+
import { T as Oe } from "../../Tweened-DJzAFsVZ.js";
|
|
28
|
+
import { WheelControls as Re, KeyboardControls as He, DragControls as Be, AutoplayControls as We } from "../../controls/index.js";
|
|
29
|
+
import { windowResizer as re } from "../../window-resizer/vanilla/index.js";
|
|
30
|
+
import { scrollEntries as dt } from "../../scroll-entries/index.js";
|
|
31
|
+
import { cssUnitParser as ye } from "../../css-unit-parser/index.js";
|
|
32
|
+
import { CSSProperty as f } from "../../css-property/index.js";
|
|
33
|
+
import { device as Fe } from "../../device/index.js";
|
|
34
|
+
import { elementResizer as Nt } from "../../element-resizer/vanilla/index.js";
|
|
35
|
+
import { s as $e } from "../../gestures-D2Fdra_G.js";
|
|
36
|
+
import { f as xe } from "../../dom-0S_WDL4g.js";
|
|
37
|
+
import { d as qe } from "../../function-C10DGppn.js";
|
|
38
|
+
import { ScrollSegmentElement as Ne } from "../../scroll-segment/index.js";
|
|
39
|
+
var m, Gt, g, ft, R, Z;
|
|
40
|
+
class Ue {
|
|
41
|
+
constructor(h, e, i) {
|
|
42
42
|
s(this, m);
|
|
43
|
-
s(this,
|
|
44
|
-
s(this,
|
|
45
|
-
s(this,
|
|
46
|
-
s(this,
|
|
47
|
-
s(this,
|
|
48
|
-
|
|
43
|
+
s(this, Gt);
|
|
44
|
+
s(this, g);
|
|
45
|
+
s(this, ft, 0);
|
|
46
|
+
s(this, R, 0);
|
|
47
|
+
s(this, Z, null);
|
|
48
|
+
n(this, m, h), n(this, Gt, e), n(this, g, i), dt.register(t(this, m));
|
|
49
49
|
}
|
|
50
50
|
get index() {
|
|
51
|
-
return t(this,
|
|
51
|
+
return t(this, Gt);
|
|
52
52
|
}
|
|
53
53
|
get size() {
|
|
54
|
-
return t(this,
|
|
54
|
+
return t(this, ft);
|
|
55
55
|
}
|
|
56
56
|
get position() {
|
|
57
|
-
return t(this,
|
|
57
|
+
return t(this, R);
|
|
58
58
|
}
|
|
59
59
|
destroy() {
|
|
60
|
-
|
|
60
|
+
dt.unregister(t(this, m)), this.unsetTransform();
|
|
61
61
|
}
|
|
62
62
|
unsetTransform() {
|
|
63
63
|
t(this, m).style.transform = "", this.mark(null);
|
|
64
64
|
}
|
|
65
|
-
setSize(
|
|
66
|
-
|
|
65
|
+
setSize(h) {
|
|
66
|
+
h ? (t(this, m).style.setProperty("--size", h + "px"), t(this, g).axisCSSProperty.current === "x" ? (t(this, m).style.width = h + "px", t(this, m).style.height = "") : (t(this, m).style.height = h + "px", t(this, m).style.width = "")) : (t(this, m).style.width = "", t(this, m).style.height = "", t(this, m).style.removeProperty("--size"));
|
|
67
67
|
}
|
|
68
68
|
resize() {
|
|
69
|
-
|
|
69
|
+
n(this, ft, t(this, g).vertical ? t(this, m).offsetHeight : t(this, m).offsetWidth), n(this, R, t(this, g).vertical ? oe(t(this, m)) : le(t(this, m))), n(this, R, t(this, R) - t(this, g).contentPosition);
|
|
70
70
|
}
|
|
71
71
|
transform() {
|
|
72
|
-
let
|
|
73
|
-
const e = t(this,
|
|
74
|
-
t(this,
|
|
72
|
+
let h = 0;
|
|
73
|
+
const e = t(this, g).viewportSize * t(this, g).sectionDistanceScaleCSSProperty.current;
|
|
74
|
+
t(this, g).loopCSSProperty.current && t(this, g).overscroll && t(this, R) + t(this, ft) < t(this, g).currentScrollValue && (h = t(this, g).distance * -1 - t(this, g).gap), dt.update(
|
|
75
75
|
t(this, m),
|
|
76
|
-
t(this,
|
|
77
|
-
|
|
76
|
+
t(this, g).axisCSSProperty.current,
|
|
77
|
+
h
|
|
78
78
|
);
|
|
79
|
-
const i = t(this,
|
|
80
|
-
t(this,
|
|
79
|
+
const i = t(this, g).currentScrollValue + h, r = t(this, R) - t(this, g).viewportSize - e, c = t(this, R) + t(this, ft) + e, b = we(i, r, c);
|
|
80
|
+
t(this, g).vertical ? t(this, m).style.transform = `translate3d(0px, ${b * -1}px, 0px)` : t(this, m).style.transform = `translate3d(${b * -1}px, 0px, 0px)`;
|
|
81
81
|
}
|
|
82
|
-
mark(
|
|
83
|
-
t(this,
|
|
82
|
+
mark(h) {
|
|
83
|
+
t(this, Z) !== h && (t(this, Z) && t(this, m).classList.remove(t(this, Z)), h && t(this, m).classList.add(h), n(this, Z, h), ee(t(this, m), "scrollSectionMarkChange", {
|
|
84
84
|
composed: !0,
|
|
85
85
|
detail: {
|
|
86
|
-
mark: t(this,
|
|
86
|
+
mark: t(this, Z)
|
|
87
87
|
},
|
|
88
88
|
custom: !0
|
|
89
89
|
}));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
m = new WeakMap(),
|
|
93
|
-
const
|
|
92
|
+
m = new WeakMap(), Gt = new WeakMap(), g = new WeakMap(), ft = new WeakMap(), R = new WeakMap(), Z = new WeakMap();
|
|
93
|
+
const Ge = Ce({
|
|
94
94
|
":host": {
|
|
95
95
|
position: "relative",
|
|
96
96
|
width: "100%",
|
|
@@ -128,350 +128,354 @@ const He = fe({
|
|
|
128
128
|
flexShrink: "0"
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
|
-
var u,
|
|
132
|
-
class
|
|
131
|
+
var u, pt, x, H, B, W, D, j, J, F, Q, mt, I, y, bt, St, gt, vt, Pt, z, yt, X, T, Y, $, tt, Ct, wt, et, st, p, Lt, l, Kt, _t, v, S, P, A, it, M, C, w, kt, rt, q, nt, Et, zt, ht, N, Zt, V, o, qt, xt, se, ie, ce, ae, L, Dt, Pe, It, jt, ue, de, ut, fe;
|
|
132
|
+
class Ut extends HTMLElement {
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
s(this, o);
|
|
136
136
|
s(this, u, null);
|
|
137
|
-
s(this,
|
|
138
|
-
s(this,
|
|
139
|
-
s(this,
|
|
140
|
-
s(this,
|
|
137
|
+
s(this, pt, new f(this, "--controls", !0));
|
|
138
|
+
s(this, x, new f(this, "--axis", "y"));
|
|
139
|
+
s(this, H, new f(this, "--direction", 0));
|
|
140
|
+
s(this, B, new f(this, "--pages", 0, {
|
|
141
141
|
validate: (e) => Math.max(0, e - 1)
|
|
142
142
|
}));
|
|
143
|
-
s(this,
|
|
144
|
-
s(this,
|
|
145
|
-
s(this,
|
|
143
|
+
s(this, W, new f(this, "--split", !1));
|
|
144
|
+
s(this, D, new f(this, "--sectional", !1));
|
|
145
|
+
s(this, j, new f(
|
|
146
146
|
this,
|
|
147
|
-
"--easing",
|
|
147
|
+
"--tween-easing",
|
|
148
148
|
!1
|
|
149
149
|
));
|
|
150
|
-
s(this,
|
|
150
|
+
s(this, J, new f(
|
|
151
151
|
this,
|
|
152
|
-
"--duration",
|
|
152
|
+
"--tween-duration",
|
|
153
153
|
!1
|
|
154
154
|
));
|
|
155
|
-
s(this,
|
|
156
|
-
s(this,
|
|
155
|
+
s(this, F, new f(this, "--auto-size", !1));
|
|
156
|
+
s(this, Q, new f(
|
|
157
157
|
this,
|
|
158
158
|
"--wheel-max-delta",
|
|
159
159
|
!1
|
|
160
160
|
));
|
|
161
|
-
s(this,
|
|
162
|
-
s(this,
|
|
161
|
+
s(this, mt, new f(this, "--drag-inertion", 1));
|
|
162
|
+
s(this, I, new f(
|
|
163
163
|
this,
|
|
164
164
|
"--sections-in-view",
|
|
165
165
|
1
|
|
166
166
|
));
|
|
167
|
-
s(this,
|
|
168
|
-
s(this,
|
|
169
|
-
s(this,
|
|
170
|
-
s(this,
|
|
171
|
-
s(this,
|
|
172
|
-
s(this,
|
|
167
|
+
s(this, y, new f(this, "--loop", !1));
|
|
168
|
+
s(this, bt, new f(this, "--damping", 20));
|
|
169
|
+
s(this, St, new f(this, "--mass", 0));
|
|
170
|
+
s(this, gt, new f(this, "--stiffness", 0));
|
|
171
|
+
s(this, vt, new f(this, "--mouse-drag", !1));
|
|
172
|
+
s(this, Pt, new f(
|
|
173
173
|
this,
|
|
174
174
|
"--section-distance-scale",
|
|
175
175
|
0.5
|
|
176
176
|
));
|
|
177
|
-
s(this,
|
|
178
|
-
s(this,
|
|
177
|
+
s(this, z, new f(this, "--autoplay", 0));
|
|
178
|
+
s(this, yt, new f(
|
|
179
179
|
this,
|
|
180
180
|
"--autoplay-pause-duration",
|
|
181
181
|
0
|
|
182
182
|
));
|
|
183
|
-
s(this,
|
|
183
|
+
s(this, X, new f(
|
|
184
184
|
this,
|
|
185
185
|
"--autoplay-user-direction",
|
|
186
186
|
!1
|
|
187
187
|
));
|
|
188
|
-
s(this,
|
|
189
|
-
s(this,
|
|
188
|
+
s(this, T, new f(this, "--classes", !1));
|
|
189
|
+
s(this, Y, new f(
|
|
190
190
|
this,
|
|
191
191
|
"--current-index-start-offset",
|
|
192
192
|
0
|
|
193
193
|
));
|
|
194
|
-
s(this,
|
|
194
|
+
s(this, $, new f(
|
|
195
195
|
this,
|
|
196
196
|
"--current-index-end-offset",
|
|
197
197
|
0
|
|
198
198
|
));
|
|
199
|
-
s(this,
|
|
200
|
-
s(this,
|
|
199
|
+
s(this, tt, new f(this, "--focus-delay", 0));
|
|
200
|
+
s(this, Ct, new f(
|
|
201
201
|
this,
|
|
202
202
|
"--focus-duration",
|
|
203
203
|
3e3
|
|
204
204
|
));
|
|
205
|
-
s(this,
|
|
206
|
-
s(this,
|
|
207
|
-
s(this,
|
|
208
|
-
s(this,
|
|
209
|
-
s(this,
|
|
205
|
+
s(this, wt, new f(this, "--disabled", !1));
|
|
206
|
+
s(this, et, new f(this, "--hibernated", !1));
|
|
207
|
+
s(this, st, null);
|
|
208
|
+
s(this, p, null);
|
|
209
|
+
s(this, Lt, null);
|
|
210
210
|
s(this, l, []);
|
|
211
|
-
s(this,
|
|
212
|
-
s(this,
|
|
213
|
-
s(this,
|
|
211
|
+
s(this, Kt, 0);
|
|
212
|
+
s(this, _t, 0);
|
|
213
|
+
s(this, v, 0);
|
|
214
214
|
s(this, S, 0);
|
|
215
|
-
s(this,
|
|
216
|
-
s(this,
|
|
217
|
-
s(this,
|
|
215
|
+
s(this, P, 0);
|
|
216
|
+
s(this, A, null);
|
|
217
|
+
s(this, it, null);
|
|
218
218
|
s(this, M, null);
|
|
219
|
-
s(this,
|
|
220
|
-
s(this,
|
|
221
|
-
s(this,
|
|
222
|
-
s(this,
|
|
223
|
-
s(this,
|
|
224
|
-
s(this,
|
|
225
|
-
s(this,
|
|
226
|
-
s(this,
|
|
227
|
-
s(this,
|
|
228
|
-
s(this,
|
|
229
|
-
s(this,
|
|
230
|
-
s(this,
|
|
219
|
+
s(this, C, null);
|
|
220
|
+
s(this, w, new Te(0));
|
|
221
|
+
s(this, kt, 0);
|
|
222
|
+
s(this, rt, 0);
|
|
223
|
+
s(this, q, !1);
|
|
224
|
+
s(this, nt, !0);
|
|
225
|
+
s(this, Et, !0);
|
|
226
|
+
s(this, zt);
|
|
227
|
+
s(this, ht);
|
|
228
|
+
s(this, N, new Oe());
|
|
229
|
+
s(this, Zt, !1);
|
|
230
|
+
s(this, V, null);
|
|
231
|
+
s(this, L, () => {
|
|
231
232
|
t(this, u).unlistenAnimationFrame();
|
|
232
|
-
const e = this.currentScrollValue / t(this, S) || 0, i = t(this,
|
|
233
|
-
if (
|
|
234
|
-
getComputedStyle(t(this,
|
|
235
|
-
)) :
|
|
236
|
-
getComputedStyle(t(this,
|
|
237
|
-
)), t(this,
|
|
238
|
-
const
|
|
233
|
+
const e = this.currentScrollValue / t(this, S) || 0, i = t(this, w).current;
|
|
234
|
+
if (n(this, Kt, this.vertical ? oe(this) : le(this)), n(this, _t, this.vertical ? oe(t(this, p)) : le(t(this, p))), n(this, v, this.vertical ? this.offsetHeight : this.offsetWidth), this.vertical ? n(this, P, ye.parse(
|
|
235
|
+
getComputedStyle(t(this, p)).rowGap
|
|
236
|
+
)) : n(this, P, ye.parse(
|
|
237
|
+
getComputedStyle(t(this, p)).columnGap
|
|
238
|
+
)), t(this, F).current && t(this, l).length) {
|
|
239
|
+
const r = t(this, I).current, c = (t(this, v) - t(this, P) * (r - 1)) / r;
|
|
239
240
|
t(this, l).forEach((b) => {
|
|
240
241
|
b.setSize(c);
|
|
241
242
|
});
|
|
242
243
|
} else
|
|
243
|
-
t(this, l).forEach((
|
|
244
|
-
|
|
244
|
+
t(this, l).forEach((r) => {
|
|
245
|
+
r.setSize();
|
|
245
246
|
});
|
|
246
|
-
if (t(this, l).forEach((
|
|
247
|
-
|
|
248
|
-
}), t(this,
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
this.vertical ? (t(this,
|
|
247
|
+
if (t(this, l).forEach((r) => {
|
|
248
|
+
r.resize();
|
|
249
|
+
}), t(this, B).current) {
|
|
250
|
+
n(this, S, t(this, v) * t(this, B).current);
|
|
251
|
+
const r = t(this, S) + t(this, v);
|
|
252
|
+
this.vertical ? (t(this, p).style.width = r + "px", t(this, p).style.height = "100%") : (t(this, p).style.height = r + "px", t(this, p).style.width = "100%");
|
|
252
253
|
} else
|
|
253
|
-
this.vertical ? (t(this,
|
|
254
|
-
if (!t(this,
|
|
255
|
-
const
|
|
256
|
-
|
|
254
|
+
this.vertical ? (t(this, p).style.width = "100%", t(this, p).style.height = "max-content", n(this, S, t(this, p).offsetHeight - t(this, v))) : (t(this, p).style.width = "max-content", t(this, p).style.height = "100%", n(this, S, t(this, p).offsetWidth - t(this, v)));
|
|
255
|
+
if (!t(this, y).current) {
|
|
256
|
+
const r = getComputedStyle(this), c = this.vertical ? parseFloat(r.paddingBlockStart) + parseFloat(r.paddingBlockEnd) : parseFloat(r.paddingInlineStart) + parseFloat(r.paddingInlineEnd);
|
|
257
|
+
n(this, S, t(this, S) + c), t(this, u).max = t(this, S);
|
|
257
258
|
}
|
|
258
|
-
if (t(this,
|
|
259
|
-
const
|
|
260
|
-
|
|
259
|
+
if (t(this, y).current && t(this, l).length) {
|
|
260
|
+
const r = t(this, l)[t(this, l).length - 1], c = r.position + r.size - t(this, v), b = t(this, S) - c;
|
|
261
|
+
n(this, rt, r.position + r.size + b);
|
|
261
262
|
} else
|
|
262
|
-
|
|
263
|
-
if (t(this,
|
|
264
|
-
const
|
|
265
|
-
t(this, u).set(
|
|
263
|
+
n(this, rt, t(this, S));
|
|
264
|
+
if (t(this, D).current && t(this, l).length) {
|
|
265
|
+
const r = t(this, l)[i];
|
|
266
|
+
t(this, u).set(r.position, {
|
|
266
267
|
equalize: !0
|
|
267
268
|
});
|
|
268
269
|
} else
|
|
269
270
|
t(this, u).set(e * t(this, S), {
|
|
270
271
|
equalize: !0
|
|
271
272
|
});
|
|
272
|
-
|
|
273
|
+
n(this, q, (this.vertical ? t(this, p).offsetHeight : t(this, p).offsetWidth) > t(this, v)), this.classList.toggle("has-overflow", t(this, q)), t(this, q) ? d(this, o, ie).call(this) : d(this, o, se).call(this), t(this, Dt).call(this);
|
|
273
274
|
});
|
|
274
|
-
s(this,
|
|
275
|
-
if (!t(this,
|
|
275
|
+
s(this, Dt, () => {
|
|
276
|
+
if (!t(this, q))
|
|
276
277
|
return;
|
|
277
278
|
const e = this.currentScrollValue;
|
|
278
|
-
if (
|
|
279
|
+
if (n(this, kt, Math.max(0, e - t(this, S))), t(this, l).length) {
|
|
279
280
|
let i = 0;
|
|
280
|
-
for (let
|
|
281
|
-
const c = t(this, l)[
|
|
282
|
-
c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i =
|
|
281
|
+
for (let r = 0; r < t(this, l).length; r++) {
|
|
282
|
+
const c = t(this, l)[r];
|
|
283
|
+
c.transform(), this.targetScrollValue + c.size / 2 >= c.position && (i = r);
|
|
283
284
|
}
|
|
284
|
-
t(this,
|
|
285
|
+
t(this, w).current = i;
|
|
285
286
|
} else
|
|
286
|
-
this.vertical ? t(this,
|
|
287
|
-
|
|
287
|
+
this.vertical ? t(this, p).style.transform = `translate3d(0px, ${e * -1}px, 0px)` : t(this, p).style.transform = `translate3d(${e * -1}px, 0px, 0px)`;
|
|
288
|
+
dt.update(
|
|
288
289
|
this,
|
|
289
|
-
t(this,
|
|
290
|
+
t(this, x).current,
|
|
290
291
|
e
|
|
291
292
|
);
|
|
292
293
|
});
|
|
293
|
-
s(this,
|
|
294
|
-
t(this,
|
|
294
|
+
s(this, It, (e, i) => {
|
|
295
|
+
t(this, pt).current && (d(this, o, ue).call(this, Math.sign(i) || 1), t(this, jt).call(this, e, i));
|
|
295
296
|
});
|
|
296
|
-
s(this,
|
|
297
|
-
if (t(this,
|
|
298
|
-
if (t(this,
|
|
297
|
+
s(this, jt, (e, i) => {
|
|
298
|
+
if (t(this, H).current) {
|
|
299
|
+
if (t(this, H).current < 0 && i > 0)
|
|
299
300
|
return;
|
|
300
|
-
if (t(this,
|
|
301
|
+
if (t(this, H).current > 0 && i < 0)
|
|
301
302
|
return;
|
|
302
303
|
}
|
|
303
|
-
if (t(this,
|
|
304
|
-
const
|
|
305
|
-
|
|
304
|
+
if (t(this, ht) || t(this, N).unlistenAnimationFrame(), !t(this, z).current && t(this, tt).current && (clearInterval(t(this, zt)), n(this, zt, setTimeout(() => {
|
|
305
|
+
const r = d(this, o, fe).call(this);
|
|
306
|
+
r && this.scrollToSection(r.index, {
|
|
306
307
|
tween: {
|
|
307
|
-
duration: t(this,
|
|
308
|
-
easing:
|
|
308
|
+
duration: t(this, Ct).current,
|
|
309
|
+
easing: Ae
|
|
309
310
|
}
|
|
310
311
|
});
|
|
311
|
-
}, t(this,
|
|
312
|
-
if (t(this,
|
|
313
|
-
const
|
|
312
|
+
}, t(this, tt).current))), !(e.includes("drag") && !Fe.isMobile && !t(this, vt).current)) {
|
|
313
|
+
if (t(this, D).current && e !== "drag") {
|
|
314
|
+
const r = Math.sign(i);
|
|
314
315
|
if (t(this, l).length) {
|
|
315
316
|
const c = {
|
|
316
|
-
tween: t(this,
|
|
317
|
-
easing: t(this,
|
|
318
|
-
duration: t(this,
|
|
317
|
+
tween: t(this, j).current || t(this, J).current ? {
|
|
318
|
+
easing: t(this, j).current || "easeInOutCubic",
|
|
319
|
+
duration: t(this, J).current || 500
|
|
319
320
|
} : void 0
|
|
320
321
|
};
|
|
321
|
-
t(this,
|
|
322
|
+
t(this, Zt) ? this.scrollToSection(t(this, w).current, c) : this.shiftSections(r, c);
|
|
322
323
|
} else
|
|
323
|
-
t(this, u).shift(
|
|
324
|
+
t(this, u).shift(r * t(this, v));
|
|
324
325
|
} else
|
|
325
326
|
t(this, u).shift(i);
|
|
326
|
-
|
|
327
|
+
n(this, Zt, e === "drag");
|
|
327
328
|
}
|
|
328
329
|
});
|
|
329
|
-
if (
|
|
330
|
+
if (ne) {
|
|
330
331
|
const e = this.attachShadow({ mode: "open" });
|
|
331
|
-
e.adoptedStyleSheets = [
|
|
332
|
+
e.adoptedStyleSheets = [Ge];
|
|
332
333
|
const i = document.createElement("div");
|
|
333
|
-
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i),
|
|
334
|
+
i.className = "static", i.innerHTML = '<slot name="static"></slot>', e.appendChild(i), n(this, st, document.createElement("div")), t(this, st).className = "content-wrapper", n(this, p, document.createElement("div")), t(this, p).className = "content", n(this, Lt, document.createElement("slot")), t(this, p).appendChild(t(this, Lt)), t(this, st).appendChild(t(this, p)), e.appendChild(t(this, st));
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
337
|
get damped() {
|
|
337
338
|
return t(this, u);
|
|
338
339
|
}
|
|
339
340
|
get controlsCSSProperty() {
|
|
340
|
-
return t(this,
|
|
341
|
+
return t(this, pt);
|
|
341
342
|
}
|
|
342
343
|
get axisCSSProperty() {
|
|
343
|
-
return t(this,
|
|
344
|
+
return t(this, x);
|
|
344
345
|
}
|
|
345
346
|
get directionCSSProperty() {
|
|
346
|
-
return t(this,
|
|
347
|
+
return t(this, H);
|
|
347
348
|
}
|
|
348
349
|
get pagesCSSProperty() {
|
|
349
|
-
return t(this,
|
|
350
|
+
return t(this, B);
|
|
350
351
|
}
|
|
351
352
|
get splitCSSProperty() {
|
|
352
|
-
return t(this,
|
|
353
|
+
return t(this, W);
|
|
353
354
|
}
|
|
354
355
|
get sectionalCSSProperty() {
|
|
355
|
-
return t(this,
|
|
356
|
+
return t(this, D);
|
|
356
357
|
}
|
|
357
358
|
get easingCSSProperty() {
|
|
358
|
-
return t(this,
|
|
359
|
+
return t(this, j);
|
|
359
360
|
}
|
|
360
361
|
get durationCSSProperty() {
|
|
361
|
-
return t(this,
|
|
362
|
+
return t(this, J);
|
|
362
363
|
}
|
|
363
364
|
get autoSizeCSSProperty() {
|
|
364
|
-
return t(this,
|
|
365
|
+
return t(this, F);
|
|
365
366
|
}
|
|
366
367
|
get wheelMaxDeltaCSSProperty() {
|
|
367
|
-
return t(this,
|
|
368
|
+
return t(this, Q);
|
|
368
369
|
}
|
|
369
370
|
get dragInertionCSSProperty() {
|
|
370
|
-
return t(this,
|
|
371
|
+
return t(this, mt);
|
|
371
372
|
}
|
|
372
373
|
get sectionsInViewCSSProperty() {
|
|
373
|
-
return t(this,
|
|
374
|
+
return t(this, I);
|
|
374
375
|
}
|
|
375
376
|
get loopCSSProperty() {
|
|
376
|
-
return t(this,
|
|
377
|
+
return t(this, y);
|
|
377
378
|
}
|
|
378
379
|
get dampingCSSProperty() {
|
|
379
|
-
return t(this,
|
|
380
|
+
return t(this, bt);
|
|
380
381
|
}
|
|
381
382
|
get massCSSProperty() {
|
|
382
|
-
return t(this,
|
|
383
|
+
return t(this, St);
|
|
383
384
|
}
|
|
384
385
|
get stiffnessCSSProperty() {
|
|
385
|
-
return t(this,
|
|
386
|
+
return t(this, gt);
|
|
386
387
|
}
|
|
387
388
|
get mouseDragCSSProperty() {
|
|
388
|
-
return t(this,
|
|
389
|
+
return t(this, vt);
|
|
389
390
|
}
|
|
390
391
|
get sectionDistanceScaleCSSProperty() {
|
|
391
|
-
return t(this,
|
|
392
|
+
return t(this, Pt);
|
|
392
393
|
}
|
|
393
394
|
get autoplayCSSProperty() {
|
|
394
|
-
return t(this,
|
|
395
|
+
return t(this, z);
|
|
395
396
|
}
|
|
396
397
|
get autoplayPauseDurationCSSProperty() {
|
|
397
|
-
return t(this,
|
|
398
|
+
return t(this, yt);
|
|
398
399
|
}
|
|
399
400
|
get autoplayUserDirectionCSSProperty() {
|
|
400
|
-
return t(this,
|
|
401
|
+
return t(this, X);
|
|
401
402
|
}
|
|
402
403
|
get classesCSSProperty() {
|
|
403
|
-
return t(this,
|
|
404
|
+
return t(this, T);
|
|
404
405
|
}
|
|
405
406
|
get currentIndexStartOffsetCSSProperty() {
|
|
406
|
-
return t(this,
|
|
407
|
+
return t(this, Y);
|
|
407
408
|
}
|
|
408
409
|
get currentIndexEndOffsetCSSProperty() {
|
|
409
|
-
return t(this,
|
|
410
|
+
return t(this, $);
|
|
410
411
|
}
|
|
411
412
|
get focusDelayCSSProperty() {
|
|
412
|
-
return t(this,
|
|
413
|
+
return t(this, tt);
|
|
413
414
|
}
|
|
414
415
|
get focusDurationCSSProperty() {
|
|
415
|
-
return t(this,
|
|
416
|
+
return t(this, Ct);
|
|
416
417
|
}
|
|
417
418
|
get disabledCSSProperty() {
|
|
418
|
-
return t(this,
|
|
419
|
+
return t(this, wt);
|
|
419
420
|
}
|
|
420
421
|
get hibernatedCSSProperty() {
|
|
421
|
-
return t(this,
|
|
422
|
+
return t(this, et);
|
|
422
423
|
}
|
|
423
424
|
get currentScrollValue() {
|
|
424
|
-
return d(this, o,
|
|
425
|
+
return d(this, o, de).call(this, "current");
|
|
425
426
|
}
|
|
426
427
|
get targetScrollValue() {
|
|
427
|
-
return d(this, o,
|
|
428
|
+
return d(this, o, de).call(this, "target");
|
|
428
429
|
}
|
|
429
430
|
get contentWrapperElement() {
|
|
430
|
-
return t(this,
|
|
431
|
+
return t(this, st);
|
|
431
432
|
}
|
|
432
433
|
get contentElement() {
|
|
433
|
-
return t(this,
|
|
434
|
+
return t(this, p);
|
|
434
435
|
}
|
|
435
436
|
get sections() {
|
|
436
437
|
return t(this, l);
|
|
437
438
|
}
|
|
438
439
|
get position() {
|
|
439
|
-
return t(this,
|
|
440
|
+
return t(this, Kt);
|
|
440
441
|
}
|
|
441
442
|
get contentPosition() {
|
|
442
|
-
return t(this,
|
|
443
|
+
return t(this, _t);
|
|
443
444
|
}
|
|
444
445
|
get viewportSize() {
|
|
445
|
-
return t(this,
|
|
446
|
+
return t(this, v);
|
|
446
447
|
}
|
|
447
448
|
get scrollSize() {
|
|
448
449
|
return t(this, S);
|
|
449
450
|
}
|
|
450
451
|
get gap() {
|
|
451
|
-
return t(this,
|
|
452
|
+
return t(this, P);
|
|
452
453
|
}
|
|
453
454
|
get counter() {
|
|
454
|
-
return t(this,
|
|
455
|
+
return t(this, w);
|
|
455
456
|
}
|
|
456
457
|
get limit() {
|
|
457
458
|
return Math.ceil(
|
|
458
|
-
t(this, l).length - t(this,
|
|
459
|
+
t(this, l).length - t(this, I).current
|
|
459
460
|
);
|
|
460
461
|
}
|
|
461
462
|
get distance() {
|
|
462
|
-
return t(this,
|
|
463
|
+
return t(this, rt);
|
|
463
464
|
}
|
|
464
465
|
get loopDistance() {
|
|
465
|
-
return t(this,
|
|
466
|
+
return t(this, y).current ? t(this, rt) + t(this, P) : t(this, rt);
|
|
466
467
|
}
|
|
467
468
|
get hasOverflow() {
|
|
468
|
-
return t(this,
|
|
469
|
+
return t(this, q);
|
|
469
470
|
}
|
|
470
471
|
get overscroll() {
|
|
471
|
-
return t(this,
|
|
472
|
+
return t(this, kt);
|
|
473
|
+
}
|
|
474
|
+
get scrollLine() {
|
|
475
|
+
return t(this, V);
|
|
472
476
|
}
|
|
473
477
|
get vertical() {
|
|
474
|
-
return t(this,
|
|
478
|
+
return t(this, x).current === "y";
|
|
475
479
|
}
|
|
476
480
|
get currentProgress() {
|
|
477
481
|
return this.currentScrollValue / this.loopDistance || 0;
|
|
@@ -480,10 +484,10 @@ class Ht extends HTMLElement {
|
|
|
480
484
|
return this.targetScrollValue / this.loopDistance || 0;
|
|
481
485
|
}
|
|
482
486
|
get scrollWidth() {
|
|
483
|
-
return t(this,
|
|
487
|
+
return t(this, x).current === "y" ? 0 : t(this, u).distance;
|
|
484
488
|
}
|
|
485
489
|
get scrollHeight() {
|
|
486
|
-
return t(this,
|
|
490
|
+
return t(this, x).current === "x" ? 0 : t(this, u).distance;
|
|
487
491
|
}
|
|
488
492
|
onScroll(...e) {
|
|
489
493
|
return t(this, u).subscribe(...e);
|
|
@@ -492,36 +496,34 @@ class Ht extends HTMLElement {
|
|
|
492
496
|
t(this, u).unsubscribe(...e);
|
|
493
497
|
}
|
|
494
498
|
//https://github.com/pmndrs/drei/blob/d3282cdd02d170ef603a5e096505d83dc93cd57a/src/web/ScrollControls.tsx#L85C7-L100C9
|
|
495
|
-
range(e, i,
|
|
496
|
-
const c = e -
|
|
499
|
+
range(e, i, r = 0) {
|
|
500
|
+
const c = e - r, b = c + i + r * 2;
|
|
497
501
|
return this.currentProgress < c ? 0 : this.currentProgress > b ? 1 : (this.currentProgress - c) / (b - c);
|
|
498
502
|
}
|
|
499
|
-
curve(e, i,
|
|
500
|
-
return Math.sin(this.range(e, i,
|
|
503
|
+
curve(e, i, r = 0) {
|
|
504
|
+
return Math.sin(this.range(e, i, r) * Math.PI);
|
|
501
505
|
}
|
|
502
|
-
visible(e, i,
|
|
503
|
-
const c = e -
|
|
506
|
+
visible(e, i, r = 0) {
|
|
507
|
+
const c = e - r, b = c + i + r * 2;
|
|
504
508
|
return this.currentProgress >= c && this.currentProgress <= b;
|
|
505
509
|
}
|
|
506
510
|
scrollToSection(e, i) {
|
|
507
511
|
if (!t(this, l).length)
|
|
508
512
|
return;
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
const Ct = d(this, o, he).call(this), ve = Ct ? this.targetScrollValue - Ct.position : 0;
|
|
515
|
-
t(this, C).current ? t(this, g).current === 0 && n === t(this, l).length - 1 ? x = t(this, S) + t(this, y) - c.position + t(this, L) : t(this, g).current === t(this, l).length - 1 && n === 0 ? x = b.position - (t(this, S) + t(this, y) + t(this, L)) : x = b.position - c.position : x = b.position - c.position, this.shiftPosition(x - ve, i);
|
|
513
|
+
const r = t(this, w).current, c = d(this, o, Pe).call(this, e), b = t(this, l)[r], k = t(this, l)[c];
|
|
514
|
+
if (b && k) {
|
|
515
|
+
let O = 0;
|
|
516
|
+
const me = d(this, o, fe).call(this), ke = me ? this.targetScrollValue - me.position : 0;
|
|
517
|
+
t(this, y).current ? c === 0 && r === t(this, l).length - 1 ? O = t(this, S) + t(this, v) - b.position + t(this, P) : c === t(this, l).length - 1 && r === 0 ? O = k.position - (t(this, S) + t(this, v) + t(this, P)) : O = k.position - b.position : O = k.position - b.position, this.shiftPosition(O - ke, i);
|
|
516
518
|
}
|
|
517
519
|
}
|
|
518
520
|
shiftSections(e, i) {
|
|
519
|
-
t(this, l).length && this.scrollToSection(t(this,
|
|
521
|
+
t(this, l).length && this.scrollToSection(t(this, w).current + e, i);
|
|
520
522
|
}
|
|
521
523
|
setPosition(e, i) {
|
|
522
|
-
d(this, o,
|
|
523
|
-
|
|
524
|
-
}, i.tween.duration))) : t(this, u).set(e, {
|
|
524
|
+
d(this, o, ue).call(this, Math.sign(e) || 1), i != null && i.tween ? t(this, ht) || (t(this, N).set(t(this, u).current, { equalize: !0 }), t(this, N).set(e, ve({}, i.tween)), n(this, ht, setTimeout(() => {
|
|
525
|
+
n(this, ht, void 0);
|
|
526
|
+
}, i.tween.duration || 0))) : t(this, u).set(e, {
|
|
525
527
|
equalize: (i == null ? void 0 : i.behaviour) === "instant"
|
|
526
528
|
});
|
|
527
529
|
}
|
|
@@ -529,174 +531,179 @@ class Ht extends HTMLElement {
|
|
|
529
531
|
this.setPosition(t(this, u).target + e, i);
|
|
530
532
|
}
|
|
531
533
|
connectedCallback() {
|
|
532
|
-
|
|
534
|
+
dt.register(this), n(this, u, new Ve(0, {
|
|
533
535
|
damping: 0.01,
|
|
534
536
|
min: 0,
|
|
535
|
-
order:
|
|
536
|
-
})), this.setAttribute("tabindex", "0"),
|
|
537
|
+
order: Me.SCROLL
|
|
538
|
+
})), this.setAttribute("tabindex", "0"), n(this, A, new Re({ element: t(this, p) })), t(this, A).changeEvent.subscribe(t(this, It)), n(this, it, new He({
|
|
537
539
|
element: this
|
|
538
|
-
})), t(this,
|
|
539
|
-
t(this,
|
|
540
|
-
),
|
|
540
|
+
})), t(this, it).changeEvent.subscribe(
|
|
541
|
+
t(this, It)
|
|
542
|
+
), n(this, M, new Be({ element: t(this, p) })), t(this, M).changeEvent.subscribe(t(this, It)), n(this, C, new We({
|
|
541
543
|
culling: this
|
|
542
|
-
})), t(this,
|
|
543
|
-
t(this,
|
|
544
|
-
}), t(this,
|
|
545
|
-
t(this,
|
|
546
|
-
}), t(this,
|
|
544
|
+
})), t(this, C).changeEvent.subscribe(t(this, jt)), t(this, x).subscribe(({ current: e }) => {
|
|
545
|
+
t(this, p).style.flexDirection = e === "x" ? "row" : "column", t(this, A).axis = t(this, Q).current ? "max" : e, t(this, it).dimension = e === "x" ? "width" : "height", t(this, M).axis = e, e === "x" ? this.style.touchAction = "pan-y" : e === "y" && (this.style.touchAction = "pan-x"), this.isConnected && t(this, L).call(this);
|
|
546
|
+
}), t(this, Q).subscribe((e) => {
|
|
547
|
+
t(this, A).axis = e.current ? "max" : t(this, x).current;
|
|
548
|
+
}), t(this, mt).subscribe((e) => {
|
|
547
549
|
t(this, M).inertion = typeof e.current == "number" ? e.current : 1;
|
|
548
|
-
}), t(this,
|
|
549
|
-
this.isConnected && t(this,
|
|
550
|
-
}), t(this,
|
|
551
|
-
this.isConnected && (e ? d(this, o,
|
|
552
|
-
}), t(this, I).subscribe((e) => {
|
|
553
|
-
t(this, T).debounce = e.current, t(this, M).swipe = e.current, t(this, E).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, Ot).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, Et).call(this));
|
|
554
|
-
}), t(this, B).subscribe((e) => {
|
|
555
|
-
this.isConnected && (t(this, z).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, Ot).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, Et).call(this));
|
|
550
|
+
}), t(this, B).subscribe(() => {
|
|
551
|
+
this.isConnected && t(this, L).call(this);
|
|
552
|
+
}), t(this, W).subscribe(({ current: e }) => {
|
|
553
|
+
this.isConnected && (e ? d(this, o, qt).call(this) : d(this, o, xt).call(this));
|
|
556
554
|
}), t(this, D).subscribe((e) => {
|
|
557
|
-
this.isConnected && (t(this,
|
|
558
|
-
}), t(this,
|
|
559
|
-
|
|
560
|
-
}), t(this,
|
|
555
|
+
t(this, A).debounce = e.current, t(this, M).swipe = e.current, t(this, C).interval = e.current, this.isConnected && (e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
556
|
+
}), t(this, F).subscribe((e) => {
|
|
557
|
+
this.isConnected && (t(this, L).call(this), e.current && !e.previous && !t(this, l).length ? d(this, o, qt).call(this) : !e.current && e.previous && t(this, l).length && d(this, o, xt).call(this));
|
|
558
|
+
}), t(this, I).subscribe((e) => {
|
|
559
|
+
this.isConnected && (t(this, L).call(this), d(this, o, ut).call(this));
|
|
560
|
+
}), t(this, y).subscribe((e) => {
|
|
561
|
+
e.current ? (this.isConnected && (t(this, l).length || (t(this, W).current = !0)), t(this, l).length && (t(this, u).max = 1 / 0, t(this, u).min = -1 / 0)) : (n(this, kt, 0), t(this, u).max = t(this, S), t(this, u).min = 0);
|
|
562
|
+
}), t(this, bt).subscribe((e) => {
|
|
561
563
|
t(this, u).damping = e.current;
|
|
562
|
-
}), t(this,
|
|
564
|
+
}), t(this, St).subscribe((e) => {
|
|
563
565
|
t(this, u).mass = e.current;
|
|
564
|
-
}), t(this,
|
|
566
|
+
}), t(this, gt).subscribe((e) => {
|
|
565
567
|
t(this, u).stiffness = e.current;
|
|
566
|
-
}), t(this,
|
|
567
|
-
t(this,
|
|
568
|
-
}), t(this,
|
|
569
|
-
e.current || (t(this,
|
|
570
|
-
}), t(this,
|
|
571
|
-
this.isConnected && d(this, o,
|
|
572
|
-
}), t(this,
|
|
573
|
-
this.isConnected && t(this,
|
|
574
|
-
}), t(this,
|
|
575
|
-
this.isConnected && t(this,
|
|
568
|
+
}), t(this, z).subscribe((e) => {
|
|
569
|
+
t(this, C).speed = e.current, !t(this, nt) && e.current && !e.previous ? t(this, C).connect() : !e.current && e.previous && t(this, C).disconnect();
|
|
570
|
+
}), t(this, X).subscribe((e) => {
|
|
571
|
+
e.current || (t(this, C).direction = 1);
|
|
572
|
+
}), t(this, T).subscribe((e) => {
|
|
573
|
+
this.isConnected && d(this, o, ut).call(this);
|
|
574
|
+
}), t(this, Y).subscribe((e) => {
|
|
575
|
+
this.isConnected && t(this, T).current && d(this, o, ut).call(this);
|
|
576
|
+
}), t(this, $).subscribe((e) => {
|
|
577
|
+
this.isConnected && t(this, T).current && d(this, o, ut).call(this);
|
|
576
578
|
}), t(this, u).isRunning.subscribe((e) => {
|
|
577
579
|
this.classList.toggle("active", e.current);
|
|
578
|
-
}), t(this,
|
|
579
|
-
t(this, l).length && d(this, o,
|
|
580
|
-
}), t(this,
|
|
581
|
-
t(this,
|
|
582
|
-
}), t(this,
|
|
583
|
-
e.current && !e.previous ? d(this, o, Zt).call(this) : !e.current && e.previous && d(this, o, jt).call(this);
|
|
584
|
-
}), t(this, X).subscribe((e) => {
|
|
580
|
+
}), t(this, w).subscribe((e) => {
|
|
581
|
+
t(this, l).length && d(this, o, ut).call(this);
|
|
582
|
+
}), t(this, N).subscribe((e) => {
|
|
583
|
+
t(this, N).isRunning.current && t(this, u).set(e.current, { equalize: !0 });
|
|
584
|
+
}), t(this, wt).subscribe((e) => {
|
|
585
585
|
e.current && !e.previous ? d(this, o, se).call(this) : !e.current && e.previous && d(this, o, ie).call(this);
|
|
586
|
-
}), t(this,
|
|
586
|
+
}), t(this, et).subscribe((e) => {
|
|
587
|
+
e.current && !e.previous ? d(this, o, ce).call(this) : !e.current && e.previous && d(this, o, ae).call(this);
|
|
588
|
+
}), t(this, pt).observe(), t(this, x).observe(), t(this, H).observe(), t(this, B).observe(), t(this, W).observe(), t(this, D).observe(), t(this, j).observe(), t(this, J).observe(), t(this, F).observe(), t(this, Q).observe(), t(this, mt).observe(), t(this, I).observe(), t(this, y).observe(), t(this, bt).observe(), t(this, St).observe(), t(this, gt).observe(), t(this, vt).observe(), t(this, Pt).observe(), t(this, z).observe(), t(this, z).observe(), t(this, yt).observe(), t(this, X).observe(), t(this, T).observe(), t(this, Y).observe(), t(this, $).observe(), t(this, tt).observe(), t(this, Ct).observe(), t(this, wt).observe(), t(this, et).observe(), t(this, et).current || d(this, o, ae).call(this);
|
|
587
589
|
}
|
|
588
590
|
disconnectedCallback() {
|
|
589
|
-
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this,
|
|
591
|
+
this.removeAttribute("tabindex"), this.classList.remove("has-overflow"), t(this, pt).unobserve(), t(this, x).unobserve(), t(this, H).unobserve(), t(this, B).unobserve(), t(this, W).unobserve(), t(this, D).unobserve(), t(this, j).unobserve(), t(this, J).unobserve(), t(this, F).unobserve(), t(this, Q).unobserve(), t(this, mt).unobserve(), t(this, I).unobserve(), t(this, y).unobserve(), t(this, bt).unobserve(), t(this, St).unobserve(), t(this, gt).unobserve(), t(this, vt).unobserve(), t(this, Pt).unobserve(), t(this, z).unobserve(), t(this, yt).unobserve(), t(this, X).unobserve(), t(this, T).unobserve(), t(this, Y).unobserve(), t(this, $).unobserve(), t(this, tt).unobserve(), t(this, Ct).unobserve(), t(this, wt).unobserve(), t(this, et).unobserve(), d(this, o, ce).call(this);
|
|
590
592
|
}
|
|
591
593
|
}
|
|
592
|
-
u = new WeakMap(),
|
|
593
|
-
d(this, o,
|
|
594
|
-
e instanceof HTMLElement && t(this, l).push(new
|
|
595
|
-
}), t(this,
|
|
594
|
+
u = new WeakMap(), pt = new WeakMap(), x = new WeakMap(), H = new WeakMap(), B = new WeakMap(), W = new WeakMap(), D = new WeakMap(), j = new WeakMap(), J = new WeakMap(), F = new WeakMap(), Q = new WeakMap(), mt = new WeakMap(), I = new WeakMap(), y = new WeakMap(), bt = new WeakMap(), St = new WeakMap(), gt = new WeakMap(), vt = new WeakMap(), Pt = new WeakMap(), z = new WeakMap(), yt = new WeakMap(), X = new WeakMap(), T = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), wt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), p = new WeakMap(), Lt = new WeakMap(), l = new WeakMap(), Kt = new WeakMap(), _t = new WeakMap(), v = new WeakMap(), S = new WeakMap(), P = new WeakMap(), A = new WeakMap(), it = new WeakMap(), M = new WeakMap(), C = new WeakMap(), w = new WeakMap(), kt = new WeakMap(), rt = new WeakMap(), q = new WeakMap(), nt = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), ht = new WeakMap(), N = new WeakMap(), Zt = new WeakMap(), V = new WeakMap(), o = new WeakSet(), qt = function() {
|
|
595
|
+
d(this, o, xt).call(this), t(this, Lt).assignedElements().forEach((e, i) => {
|
|
596
|
+
e instanceof HTMLElement && t(this, l).push(new Ue(e, i, this));
|
|
597
|
+
}), t(this, p).style.transform = "", ee(this, "scrollSectionsChange", {
|
|
596
598
|
custom: !0,
|
|
597
599
|
composed: !0
|
|
598
|
-
}), t(this,
|
|
599
|
-
},
|
|
600
|
+
}), t(this, L).call(this), d(this, o, ut).call(this);
|
|
601
|
+
}, xt = function() {
|
|
600
602
|
t(this, l).forEach((e) => {
|
|
601
603
|
e.destroy();
|
|
602
|
-
}),
|
|
604
|
+
}), n(this, l, []), t(this, w).reset(), t(this, u).reset(), ee(this, "scrollSectionsChange", {
|
|
603
605
|
custom: !0,
|
|
604
606
|
composed: !0
|
|
605
607
|
});
|
|
606
|
-
},
|
|
607
|
-
t(this,
|
|
608
|
+
}, se = function() {
|
|
609
|
+
t(this, nt) || (n(this, nt, !0), t(this, u).unsubscribe(t(this, Dt)), t(this, u).unlistenAnimationFrame(), clearInterval(t(this, zt)), clearInterval(t(this, ht)), t(this, N).unlistenAnimationFrame(), t(this, A).disconnect(), t(this, it).disconnect(), t(this, M).disconnect(), t(this, C).disconnect(), t(this, q) || this.sections.forEach((e) => {
|
|
608
610
|
e.unsetTransform();
|
|
609
611
|
}));
|
|
610
|
-
}, jt = function() {
|
|
611
|
-
t(this, st) && (h(this, st, !1), t(this, u).subscribe(t(this, zt)), t(this, T).connect(), t(this, tt).connect(), t(this, M).connect(), t(this, k).current && t(this, E).connect());
|
|
612
|
-
}, se = function() {
|
|
613
|
-
t(this, yt) || (h(this, yt, !0), Jt.unsubscribe(t(this, z)), Rt.unsubscribe(t(this, z)), d(this, o, Zt).call(this), t(this, f).style.transform = "", t(this, l).length ? d(this, o, Et).call(this) : (t(this, g).reset(), t(this, u).reset()), ct.unregister(this));
|
|
614
612
|
}, ie = function() {
|
|
615
|
-
t(this,
|
|
616
|
-
},
|
|
617
|
-
t(this,
|
|
618
|
-
},
|
|
619
|
-
t(this,
|
|
620
|
-
|
|
613
|
+
t(this, nt) && (n(this, nt, !1), t(this, u).subscribe(t(this, Dt)), t(this, A).connect(), t(this, it).connect(), t(this, M).connect(), t(this, z).current && t(this, C).connect());
|
|
614
|
+
}, ce = function() {
|
|
615
|
+
t(this, Et) || (n(this, Et, !0), re.unsubscribe(t(this, L)), Nt.unsubscribe(t(this, L)), d(this, o, se).call(this), t(this, p).style.transform = "", t(this, l).length ? d(this, o, xt).call(this) : (t(this, w).reset(), t(this, u).reset()), dt.unregister(this));
|
|
616
|
+
}, ae = function() {
|
|
617
|
+
t(this, Et) && (n(this, Et, !1), dt.register(this), (t(this, y).current || t(this, W).current || t(this, y).current || t(this, F).current || t(this, D).current) && d(this, o, qt).call(this), d(this, o, ie).call(this), re.subscribe(t(this, L), Ee.SCROLL), Nt.subscribe(this, t(this, L)));
|
|
618
|
+
}, L = new WeakMap(), Dt = new WeakMap(), Pe = function(e) {
|
|
619
|
+
let i = t(this, w).current;
|
|
620
|
+
return t(this, y).current ? (i = e % t(this, l).length, i = i < 0 ? t(this, l).length + i : i) : i = we(e, 0, this.limit), i;
|
|
621
|
+
}, It = new WeakMap(), jt = new WeakMap(), ue = function(e = 1) {
|
|
622
|
+
t(this, X).current && (t(this, C).direction = e), t(this, z).current && t(this, C).pauseAndContinue(
|
|
623
|
+
t(this, yt).current,
|
|
621
624
|
this.sectionalCSSProperty.current
|
|
622
625
|
);
|
|
623
|
-
},
|
|
624
|
-
if (t(this,
|
|
625
|
-
const i = t(this, u)[e] % (t(this, S) + t(this,
|
|
626
|
-
return i < 0 ? t(this, S) + i + t(this,
|
|
626
|
+
}, de = function(e = "current") {
|
|
627
|
+
if (t(this, y).current && t(this, l).length) {
|
|
628
|
+
const i = t(this, u)[e] % (t(this, S) + t(this, v) + t(this, P));
|
|
629
|
+
return i < 0 ? t(this, S) + i + t(this, v) + t(this, P) : i;
|
|
627
630
|
} else
|
|
628
631
|
return t(this, u)[e];
|
|
629
|
-
},
|
|
630
|
-
if (t(this,
|
|
631
|
-
const e = t(this,
|
|
632
|
-
e === 0 ? this
|
|
633
|
-
|
|
634
|
-
t(this,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
632
|
+
}, ut = function() {
|
|
633
|
+
if (t(this, l).length) {
|
|
634
|
+
const e = t(this, w).current + t(this, Y).current;
|
|
635
|
+
if (e === 0 ? n(this, V, "start") : e === this.limit ? n(this, V, "end") : n(this, V, null), ee(this, "scrollLine", {
|
|
636
|
+
detail: { line: t(this, V) }
|
|
637
|
+
}), t(this, T).current) {
|
|
638
|
+
this.classList.remove("end", "start"), t(this, V) && this.classList.add(t(this, V));
|
|
639
|
+
const i = t(this, I).current + t(this, $).current;
|
|
640
|
+
t(this, l).forEach((r, c) => {
|
|
641
|
+
const b = e - this.limit - 1 + t(this, $).current, k = e + i, O = this.sections.length - k;
|
|
642
|
+
c >= e && c < k || c <= b ? r.mark("current") : c >= k && c < k + O / 2 || c <= b + i ? r.mark("next") : r.mark("previous");
|
|
643
|
+
});
|
|
644
|
+
}
|
|
638
645
|
}
|
|
639
|
-
},
|
|
640
|
-
let i = null,
|
|
646
|
+
}, fe = function(e = this.targetScrollValue) {
|
|
647
|
+
let i = null, r = 1 / 0;
|
|
641
648
|
for (let c = 0; c < t(this, l).length; c++) {
|
|
642
649
|
const b = Math.abs(t(this, l)[c].position - e);
|
|
643
|
-
b <
|
|
650
|
+
b < r && (r = b, i = c);
|
|
644
651
|
}
|
|
645
652
|
return i !== null ? t(this, l)[i] : null;
|
|
646
653
|
};
|
|
647
|
-
customElements.get("e-scroll") || customElements.define("e-scroll",
|
|
648
|
-
var
|
|
649
|
-
class
|
|
654
|
+
customElements.get("e-scroll") || customElements.define("e-scroll", Ut);
|
|
655
|
+
var Jt;
|
|
656
|
+
class pe extends HTMLElement {
|
|
650
657
|
constructor() {
|
|
651
658
|
super(...arguments);
|
|
652
|
-
s(this,
|
|
659
|
+
s(this, Jt, null);
|
|
653
660
|
}
|
|
654
661
|
get scrollElement() {
|
|
655
|
-
return t(this,
|
|
662
|
+
return t(this, Jt);
|
|
656
663
|
}
|
|
657
664
|
connectedCallback() {
|
|
658
|
-
const e =
|
|
659
|
-
e instanceof
|
|
665
|
+
const e = xe(this, Ut);
|
|
666
|
+
e instanceof Ut ? n(this, Jt, e) : console.error(this, "e-scroll not found");
|
|
660
667
|
}
|
|
661
668
|
}
|
|
662
|
-
|
|
663
|
-
var
|
|
664
|
-
class
|
|
669
|
+
Jt = new WeakMap();
|
|
670
|
+
var ot, E, U, G, Tt, At, lt, Mt, Qt, Xt;
|
|
671
|
+
class Ke extends pe {
|
|
665
672
|
constructor() {
|
|
666
673
|
super();
|
|
667
|
-
s(this,
|
|
668
|
-
s(this,
|
|
669
|
-
s(this,
|
|
670
|
-
s(this,
|
|
671
|
-
s(this,
|
|
672
|
-
s(this,
|
|
673
|
-
s(this,
|
|
674
|
-
|
|
675
|
-
const e = t(this,
|
|
676
|
-
|
|
674
|
+
s(this, ot, null);
|
|
675
|
+
s(this, E, null);
|
|
676
|
+
s(this, U, !1);
|
|
677
|
+
s(this, G, 0);
|
|
678
|
+
s(this, Tt, 0);
|
|
679
|
+
s(this, At, 0);
|
|
680
|
+
s(this, lt, () => {
|
|
681
|
+
n(this, U, this.offsetWidth > this.offsetHeight);
|
|
682
|
+
const e = t(this, U) ? this.offsetWidth : this.offsetHeight;
|
|
683
|
+
n(this, G, e / ((this.scrollElement.scrollSize + this.scrollElement.viewportSize) / e)), n(this, G, Math.max(t(this, G), 30)), t(this, U) ? (t(this, E).style.width = t(this, G) + "px", t(this, E).style.height = "100%") : (t(this, E).style.width = "100%", t(this, E).style.height = t(this, G) + "px"), n(this, Tt, e - t(this, G)), this.scrollElement.scrollSize ? this.style.display = "" : this.style.display = "none", t(this, Mt).call(this);
|
|
677
684
|
});
|
|
678
|
-
s(this,
|
|
679
|
-
|
|
685
|
+
s(this, Mt, () => {
|
|
686
|
+
n(this, At, this.scrollElement.currentProgress * t(this, Tt)), t(this, U) ? t(this, E).style.transform = `translate3d(${t(this, At)}px, 0px, 0px)` : t(this, E).style.transform = `translate3d(0px, ${t(this, At)}px, 0px)`;
|
|
680
687
|
});
|
|
681
|
-
s(this,
|
|
688
|
+
s(this, Qt, () => {
|
|
682
689
|
this.setAttribute("axis", this.scrollElement.axisCSSProperty.current);
|
|
683
690
|
});
|
|
684
|
-
s(this,
|
|
685
|
-
document.documentElement.classList.add("grabbing"),
|
|
691
|
+
s(this, Xt, (e) => {
|
|
692
|
+
document.documentElement.classList.add("grabbing"), $e(
|
|
686
693
|
(c) => {
|
|
687
|
-
const b = t(this,
|
|
688
|
-
this.scrollElement.setPosition(i +
|
|
694
|
+
const b = t(this, U) ? c.x : c.y, k = this.scrollElement.distance / t(this, Tt), O = (b - r) * k;
|
|
695
|
+
this.scrollElement.setPosition(i + O);
|
|
689
696
|
},
|
|
690
697
|
() => {
|
|
691
698
|
document.documentElement.classList.remove("grabbing");
|
|
692
699
|
}
|
|
693
700
|
);
|
|
694
|
-
const i = this.scrollElement.damped.target,
|
|
701
|
+
const i = this.scrollElement.damped.target, r = t(this, U) ? e.x : e.y;
|
|
695
702
|
});
|
|
696
|
-
if (
|
|
703
|
+
if (ne) {
|
|
697
704
|
const e = this.attachShadow({ mode: "open" });
|
|
698
705
|
e.adoptedStyleSheets = [
|
|
699
|
-
|
|
706
|
+
Ce({
|
|
700
707
|
":host": {
|
|
701
708
|
display: "inline-block",
|
|
702
709
|
zIndex: "1",
|
|
@@ -725,123 +732,166 @@ class Be extends oe {
|
|
|
725
732
|
touchAction: "none"
|
|
726
733
|
}
|
|
727
734
|
})
|
|
728
|
-
],
|
|
735
|
+
], n(this, ot, document.createElement("slot")), t(this, ot).innerHTML = '<div class="default-thumb"></div>', e.appendChild(t(this, ot));
|
|
729
736
|
}
|
|
730
737
|
}
|
|
731
738
|
get thumbElement() {
|
|
732
|
-
return t(this,
|
|
739
|
+
return t(this, E);
|
|
733
740
|
}
|
|
734
741
|
connectedCallback() {
|
|
735
742
|
super.connectedCallback(), this.setAttribute("drag-dead-zone", "");
|
|
736
|
-
const e = t(this,
|
|
737
|
-
|
|
743
|
+
const e = t(this, ot).assignedElements()[0] || t(this, ot).firstElementChild;
|
|
744
|
+
n(this, E, e), t(this, E).addEventListener("pointerdown", t(this, Xt)), re.subscribe(t(this, lt), Ee.SCROLL), Nt.subscribe(this, t(this, lt)), Nt.subscribe(this.scrollElement, t(this, lt)), this.scrollElement.onScroll(t(this, Mt)), this.scrollElement.axisCSSProperty.subscribe(t(this, Qt));
|
|
738
745
|
}
|
|
739
746
|
disconnectedCallback() {
|
|
740
|
-
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this,
|
|
747
|
+
this.removeAttribute("drag-dead-zone"), this.style.display = "", t(this, E).removeEventListener("pointerdown", t(this, Xt)), re.unsubscribe(t(this, lt)), Nt.unsubscribe(t(this, lt)), this.scrollElement.offScroll(t(this, Mt)), this.scrollElement.axisCSSProperty.unsubscribe(t(this, Qt));
|
|
741
748
|
}
|
|
742
749
|
}
|
|
743
|
-
|
|
744
|
-
customElements.get("e-scrollbar") || customElements.define("e-scrollbar",
|
|
745
|
-
|
|
750
|
+
ot = new WeakMap(), E = new WeakMap(), U = new WeakMap(), G = new WeakMap(), Tt = new WeakMap(), At = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap();
|
|
751
|
+
customElements.get("e-scrollbar") || customElements.define("e-scrollbar", Ke);
|
|
752
|
+
var Vt, Ot, Rt;
|
|
753
|
+
class Le extends pe {
|
|
746
754
|
constructor() {
|
|
747
|
-
super()
|
|
748
|
-
|
|
755
|
+
super();
|
|
756
|
+
s(this, Vt, new f(this, "--behaviour", "smooth"));
|
|
757
|
+
s(this, Ot, new f(
|
|
758
|
+
this,
|
|
759
|
+
"--tween-easing",
|
|
760
|
+
!1
|
|
761
|
+
));
|
|
762
|
+
s(this, Rt, new f(this, "--tween-duration", 0));
|
|
763
|
+
ne && this.addEventListener("click", () => {
|
|
764
|
+
const e = t(this, Vt).current, i = t(this, Ot).current, r = t(this, Rt).current;
|
|
749
765
|
this.handleClick({
|
|
750
|
-
behaviour:
|
|
751
|
-
tween:
|
|
766
|
+
behaviour: e,
|
|
767
|
+
tween: i || r ? { easing: i, duration: r } : void 0
|
|
752
768
|
});
|
|
753
769
|
});
|
|
754
770
|
}
|
|
771
|
+
connectedCallback() {
|
|
772
|
+
super.connectedCallback(), t(this, Vt).observe(), t(this, Ot).observe(), t(this, Rt).observe();
|
|
773
|
+
}
|
|
774
|
+
disconnectedCallback() {
|
|
775
|
+
t(this, Vt).close(), t(this, Ot).close(), t(this, Rt).close();
|
|
776
|
+
}
|
|
755
777
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
778
|
+
Vt = new WeakMap(), Ot = new WeakMap(), Rt = new WeakMap();
|
|
779
|
+
var Ht;
|
|
780
|
+
class _e extends Le {
|
|
781
|
+
constructor() {
|
|
782
|
+
super(...arguments);
|
|
783
|
+
s(this, Ht, new f(this, "--set", 1));
|
|
784
|
+
}
|
|
785
|
+
handleClick(e) {
|
|
786
|
+
this.scrollElement.scrollToSection(t(this, Ht).current, e);
|
|
787
|
+
}
|
|
788
|
+
connectedCallback() {
|
|
789
|
+
super.connectedCallback(), t(this, Ht).observe();
|
|
790
|
+
}
|
|
791
|
+
disconnectedCallback() {
|
|
792
|
+
super.disconnectedCallback(), t(this, Ht).close();
|
|
760
793
|
}
|
|
761
794
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
795
|
+
Ht = new WeakMap();
|
|
796
|
+
customElements.get("e-scroll-set-button") || customElements.define("e-scroll-set-button", _e);
|
|
797
|
+
var K, Bt;
|
|
798
|
+
class Ze extends Le {
|
|
799
|
+
constructor() {
|
|
800
|
+
super(...arguments);
|
|
801
|
+
s(this, K, new f(this, "--step", 1));
|
|
802
|
+
s(this, Bt, () => {
|
|
803
|
+
this.scrollElement.loopCSSProperty.current ? this.removeAttribute("disabled") : t(this, K).current > 0 && this.scrollElement.scrollLine === "end" || t(this, K).current < 0 && this.scrollElement.scrollLine === "start" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
handleClick(e) {
|
|
807
|
+
this.scrollElement.shiftSections(t(this, K).current, e);
|
|
808
|
+
}
|
|
809
|
+
connectedCallback() {
|
|
810
|
+
super.connectedCallback(), t(this, K).subscribe(() => {
|
|
811
|
+
t(this, Bt).call(this);
|
|
812
|
+
}), t(this, K).observe(), this.scrollElement.addEventListener("scrollLine", t(this, Bt)), t(this, Bt).call(this);
|
|
813
|
+
}
|
|
814
|
+
disconnectedCallback() {
|
|
815
|
+
super.disconnectedCallback(), t(this, K).close(), this.removeAttribute("disabled");
|
|
767
816
|
}
|
|
768
817
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
s(this,
|
|
775
|
-
s(this,
|
|
776
|
-
s(this,
|
|
777
|
-
s(this,
|
|
778
|
-
|
|
779
|
-
|
|
818
|
+
K = new WeakMap(), Bt = new WeakMap();
|
|
819
|
+
customElements.get("e-scroll-step-button") || customElements.define("e-scroll-step-button", Ze);
|
|
820
|
+
var _, ct, Wt, Yt, te, Ft;
|
|
821
|
+
class je {
|
|
822
|
+
constructor(h, e, i) {
|
|
823
|
+
s(this, _, null);
|
|
824
|
+
s(this, ct, null);
|
|
825
|
+
s(this, Wt, null);
|
|
826
|
+
s(this, Yt, null);
|
|
827
|
+
s(this, te, () => {
|
|
828
|
+
t(this, ct).scrollToSection(t(this, Wt), {
|
|
829
|
+
behaviour: t(this, Yt)
|
|
780
830
|
});
|
|
781
831
|
});
|
|
782
|
-
s(this,
|
|
783
|
-
t(this,
|
|
832
|
+
s(this, Ft, () => {
|
|
833
|
+
t(this, _).classList.toggle(
|
|
784
834
|
"current",
|
|
785
|
-
t(this,
|
|
835
|
+
t(this, ct).counter.current === t(this, Wt)
|
|
786
836
|
);
|
|
787
837
|
});
|
|
788
|
-
|
|
838
|
+
ne && (n(this, _, document.createElement("button")), n(this, ct, h), n(this, Yt, i), n(this, Wt, e), t(this, _).addEventListener("click", t(this, te)), t(this, ct).counter.subscribe(t(this, Ft)), t(this, Ft).call(this));
|
|
789
839
|
}
|
|
790
840
|
get element() {
|
|
791
|
-
return t(this,
|
|
841
|
+
return t(this, _);
|
|
792
842
|
}
|
|
793
843
|
destroy() {
|
|
794
|
-
t(this,
|
|
844
|
+
t(this, _).removeEventListener("click", t(this, te)), t(this, ct).counter.unsubscribe(t(this, Ft)), t(this, _).remove();
|
|
795
845
|
}
|
|
796
846
|
}
|
|
797
|
-
|
|
798
|
-
var
|
|
799
|
-
class
|
|
847
|
+
_ = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), Yt = new WeakMap(), te = new WeakMap(), Ft = new WeakMap();
|
|
848
|
+
var at, $t;
|
|
849
|
+
class Je extends pe {
|
|
800
850
|
constructor() {
|
|
801
851
|
super(...arguments);
|
|
802
|
-
s(this,
|
|
803
|
-
s(this,
|
|
804
|
-
t(this,
|
|
852
|
+
s(this, at, []);
|
|
853
|
+
s(this, $t, qe(() => {
|
|
854
|
+
t(this, at).forEach((e) => e.destroy()), n(this, at, []);
|
|
805
855
|
for (let e = 0; e < this.scrollElement.sections.length; e++) {
|
|
806
|
-
const i = new
|
|
856
|
+
const i = new je(
|
|
807
857
|
this.scrollElement,
|
|
808
858
|
e,
|
|
809
859
|
this.getAttribute("behaviour") || "smooth"
|
|
810
860
|
);
|
|
811
|
-
this.appendChild(i.element), t(this,
|
|
861
|
+
this.appendChild(i.element), t(this, at).push(i);
|
|
812
862
|
}
|
|
813
863
|
}, 0));
|
|
814
864
|
}
|
|
815
865
|
connectedCallback() {
|
|
816
866
|
super.connectedCallback(), this.scrollElement.addEventListener(
|
|
817
867
|
"sectionsChange",
|
|
818
|
-
t(this,
|
|
819
|
-
), t(this,
|
|
868
|
+
t(this, $t)
|
|
869
|
+
), t(this, $t).call(this);
|
|
820
870
|
}
|
|
821
871
|
disconnectedCallback() {
|
|
822
872
|
this.scrollElement.removeEventListener(
|
|
823
873
|
"sectionsChange",
|
|
824
|
-
t(this,
|
|
825
|
-
), t(this,
|
|
874
|
+
t(this, $t)
|
|
875
|
+
), t(this, at).forEach((e) => e.destroy()), n(this, at, []);
|
|
826
876
|
}
|
|
827
877
|
}
|
|
828
|
-
|
|
829
|
-
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons",
|
|
830
|
-
class
|
|
878
|
+
at = new WeakMap(), $t = new WeakMap();
|
|
879
|
+
customElements.get("e-scroll-bullet-buttons") || customElements.define("e-scroll-bullet-buttons", Je);
|
|
880
|
+
class Qe extends Ne {
|
|
831
881
|
connectedCallback() {
|
|
832
|
-
const
|
|
833
|
-
|
|
882
|
+
const h = xe(this, Ut);
|
|
883
|
+
h instanceof Ut ? (this.scrollContainer = h, this.scrollContainer.addEventListener(
|
|
834
884
|
"scrollSectionsChange",
|
|
835
885
|
this.findAnotherScrollEntries
|
|
836
886
|
)) : console.error(this, "e-scroll not found");
|
|
837
887
|
}
|
|
838
888
|
}
|
|
839
|
-
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment",
|
|
889
|
+
customElements.get("e-scroll-segment") || customElements.define("e-scroll-segment", Qe);
|
|
840
890
|
export {
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
891
|
+
Je as ScrollBulletButtonsElement,
|
|
892
|
+
Ut as ScrollElement,
|
|
893
|
+
Qe as ScrollSegmentElement,
|
|
894
|
+
_e as ScrollSetButtonElement,
|
|
895
|
+
Ze as ScrollStepButtonElement,
|
|
896
|
+
Ke as ScrollbarElement
|
|
847
897
|
};
|